query
stringlengths
7
5.25k
document
stringlengths
15
1.06M
metadata
dict
negatives
sequencelengths
3
101
negative_scores
sequencelengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
A Dusk test .
public function test() { $data = [ 'name' => 'Test user', 'email' => '[email protected]', 'password' => 'test123', ]; $this->browse(function (Browser $browser) use ($data) { $browser->visit('/') ->assertSee('ZAREJESTRUJ SIĘ') ->clickLink('Zarejestruj się') ->screenshot('1.Register_form') ->type('name', $data['name']) ->type('email', $data['email']) ->type('password', $data['password']) ->type('password_confirmation', $data['password']) ->screenshot('2.Register_form_filled') ->press('Zarejestruj się') ->screenshot('3.Registred') ->assertSee('Witaj, Test user!') ->clickLink($data['name']) ->clickLink('Wyloguj') ->screenshot('4.Logout') ->clickLink('Logowanie') ->type('email', $data['email']) ->type('password', $data['password']) ->press('Logowanie') ->screenshot('5.Logged') ->assertSee('Witaj, Test user!') ; }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testExample()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/login')\n ->assertSee('SIGN IN')\n ->type('email', '[email protected]')\n ->type('password', '123456')\n ->press('LOGIN')\n ->assertPathIs('/home')\n ->visit('/addProduct')\n ->type('nama_product', 'air jordan')\n ->type('harga_product', '100000')\n ->type('stock_product', '100000')\n ->type('deskripsi', 'haip bis parah ngga sih')\n ->select('kategori_product', 'Lainnya')\n ->select('nama_marketplace', 'Shopee')\n ->attach('img_path', __DIR__.'\\test.jpg')\n ->press('Submit');\n });\n }", "public function testBasicExample()\n {\n $this->browse(function (Browser $browser) {\n \n $browser->visit('/')\n ->pause(2000)\n ->assertSee('后台登录');\n \n\n // 页面 url, 是否有All按钮, select 选择框\n // 模板 [\"url\" => \"\", \"select\" => [\"name\" => \"\", \"value\" => \"\"]]\n /*\n $pages = [\n [\"url\" => \"/user_manage/all_users\", \"all\" => true, \"select\" => [\"name\" => \"id_grade\", \"value\" => 102], \"click\" => \".td-info\"],\n [\"url\" => \"human_resource/index_new\", \"select\" => [\"name\" => \"id_teacher_money_type\", \"value\" => 0], \"click\" => \".opt-freeze-list\"],\n [\"url\" => \"/authority/manager_list\", \"select\" =>[\"name\" => \"id_call_phone_type\", \"value\" => \"2\"]]\n ];\n \n foreach($pages as $item) {\n $browser->visit($item[\"url\"])->pause(5000);\n if (isset($item[\"all\"]))\n $browser->press(\"ALL\");\n //$browser->select($item[\"select\"]['name'], $item[\"select\"][\"value\"]);\n if (isset($item[\"click\"]) && $item[\"click\"])\n $browser->click($item[\"click\"]);\n //$browser->pause(5000);\n }*/\n\n /* $browser->visit(\"/user_manage/all_users\")\n ->press(\"ALL\")\n ->select(\"id_grade\", 101)\n ->select(\"id_grade\", 102)\n ->click(\".td-info\")\n ->pause(500);\n /*\n\n //$browser->click(\".bootstrap-dialog-body .opt-user\");\n\n $browser->click(\".bootstrap-dialog-header .close\"); // 关闭模态框\n\n $browser->visit(\"/tea_manage/lesson_list\")\n ->press(\"ALL\")\n ->pause(2000);\n */\n\n });\n }", "public function testExample()\n {\n $this->visit('/admin/login')\n ->type('admin1', 'txtUsername')\n ->type(12345, 'txtPassword')\n ->press('Login')\n ->seePageIs('admin/cate/list');\n }", "public function testExample()\n {\n $this->browse(function (Browser $browser) {\n\n\n $browser->visit(new RegisterTaskPage)\n ->type('email', '[email protected]')\n ->type('password', 'secret')\n ->type('password_confirmation', 'secret')\n ->Click('@element')\n ->pause(5000)\n ->assertPathIs('/home');\n\n });\n }", "public function testExample()\n {\n $this->browse(function ($browser , $second) {\n $browser->visit('/')\n //->assertVueContains('name','sina','@editor');\n ->assertVue('name','sina','@editor');\n // ->pause(3000)\n // ->click('.test');\n // ->assertSee('Register')\n // ->value('#name' , 'sina')\n // ->value('#email' , Str::random(10).'@gmail.com')\n // ->value('#password' , '123456789')\n // ->value('#password-confirm' , '123456789')\n // ->click('button[type=\"submit\"]')\n // ->assertPathIs('/home')\n // ->refresh()\n // ->script('alert(\"ok\")');\n });\n }", "public function testExample()\n {\n $this->visit(\"http://localhost/laravel/cdp/public/project/1/visitor\");\n $this->seePageIs('http://localhost/laravel/cdp/public/project/1/visitor');\n }", "public function testExample()\n {\n //this test is empty as we have not yet decided if we want to use dusk\n\n // $this->get('/')\n // ->click('About')\n // ->seePageIs('/about');\n }", "public function testExample()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/project_bookstore/client')\n ->click('nav > div > div.collapse.navbar-collapse.navbar-ex1-collapse > ul > li:nth-child(5) > a')\n ->type('username', 'client4')\n ->type('password', 123456)\n ->click('a#btn-login')\n ->waitForText('client4')\n ->assertSee('client4')\n ->assertPathIs('/project_bookstore/client');\n });\n }", "public function test()\n {\n $this->executeScenario();\n }", "public function testExample()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/giris-yap')\n ->type('input[name=\"email\"]','[email protected]')\n ->type('input[name=\"pass\"]','123')\n ->check('input[name=\"rememberme\"]')\n ->click('button[name=\"login\"]')\n ->waitForLocation('/')\n ->click('a[href=\"yeni-is-ekle\"]')\n ->pause(1000)\n ->select('select[name=\"project\"]')\n ->type('input[name=\"title\"]','İş Adı')\n ->type('input[name=\"desc\"]','İş Açıklama')\n ->click('button[name=\"create\"]')\n ->waitForDialog()\n ->assertDialogOpened('İş oluşturma işlemi başarı ile tamamlandı.');\n });\n }", "public function testRegistrarmeSinDatos(){\n $this->browse(function ($browser) {\n $browser->visit('/registrar')\n ->press('Registrarme')\n ->assertPathIs('/registrar'); \n }); \n }", "public function testBasicTest()\n {\n\n }", "public function run_tests()\n {\n }", "public function testExample()\n {\n $this->visit('/')\n ->type('[email protected]', 'email')\n ->type('7encoeaz', 'password')\n ->press('submit')\n ->see('You\\'ve logged into your online dashboard');\n }", "function test_sample() {\n\n\t\t$this->assertTrue( true );\n\n\t}", "public function test1()\n {\n \t$this->visit('/')\n \t\t->type('management','name')\n \t\t ->press('submit')\n ->see('Search Results')\n ->see('Management');\n }", "public function testExample()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/giris-yap')\n ->type('input[name=\"email\"]','[email protected]')\n ->type('input[name=\"pass\"]','123')\n ->check('input[name=\"rememberme\"]')\n ->click('button[name=\"login\"]')\n ->waitForLocation('/')\n ->click('a[href=\"yeni-proje-ekle\"]')\n ->type('input[name=\"date\"]','15.01.2021')\n ->type('input[name=\"name\"]','Proje Adı')\n ->type('input[name=\"technician\"]','Teknik Uzman')\n ->type('input[name=\"actualtime\"]','100')\n ->type('textarea[name=\"desc\"]','Açıklama')\n ->type('textarea[name=\"notes\"]','Notlar')\n ->click('button[name=\"create\"]')\n ->waitForDialog()\n ->assertDialogOpened('Proje oluşturma işlemi başarı ile tamamlandı.');\n });\n }", "public function testLoginTest()\n {\n $this->browse(function (Browser $browser) {\n $browser\n // ->visit('logout')\n ->visit('/login')\n ->type('email','[email protected]')\n ->type('password','123456')\n ->click('#btnsubmit')\n ->waitForText('Welcome')\n ->assertSee('Welcome');\n });\n }", "private static function test()\n {\n $files = ['TestCase'];\n $folder = static::$root.'Testing'.'/';\n\n self::call($files, $folder);\n }", "public function testExample()\n {\n $this->browse(function (Browser $browser) {\n $browser->loginAs(\"[email protected]\")\n ->visit(\"/home\");\n });\n }", "public function testMyTestCase()\n { $this->artisan('migrate');\n \t$this->visit(\"/project/1/add\");\n $this->type('[email protected]', 'email');\n $this->press('Ajouter');\n $this->seePageIs('/project/1/add/confirm');\n }", "function test(){\r\n //placeholder for future test functions\r\n }", "function test_sampleme() {\n\t\t// Replace this with some actual testing code.\n\t\t$this->assertTrue( true );\n\t}", "public function testExample()\n {\n $this->visit('ticket')\n ->see('Listado de Tickets')\n ->seeLink('Ver Ticket') \n ->visit('ticket/1')\n ->see('Quod et autem sed')\n ->seeLink('Ver todos los tickets')\n ->click('Ver todos los tickets')\n ->see('Listado de Tickets')\n ->seeLink('Agregar un ticket', 'ticket/crear');\n }", "public function testBasicTest()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/')\n ->visit('/login')\n ->assertSee('Login here')\n ->type('email', '[email protected]')\n ->type('password', 'secret')\n ->press('button')\n ->assertPathIs('/company');\n });\n }", "function test_sample() {\n\t\t$this->assertTrue( true );\n\t}", "public function testBasicExample()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/')\n ->assertSee('Login to Airtel Sales Force System');\n });\n }", "public function testExample()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/user/profile')\n ->assertSee('Profile');\n \n });\n }", "public function testRuns()\n {\n $this->assertTrue(true);\n }", "public function testWebinars()\n {\n }", "public function testBasicExample()\n {\n $this->browse(function ( Browser $browser) {\n $browser->visit('/')\n ->press('demo')\n ->press('form')\n ->assertTitle('FORM')\n ->type('email', '[email protected]')\n ->type('pwd', '1')\n ->press('submit')\n ->assertPathIs('/')\n ->assertSee('1')\n ->clickLink('Page 1')\n ->assertSee('About')\n ->clickLink('About')\n ->assertTitle('127.0.0.1:8000/about')\n ->resize(1100, 2400)->driver->takeScreenshot();\n\n\n });\n }", "public function testBasicExample()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit(Storage::get('url.txt'));\n // $browser->pause(5000);\n try{\n $browser->click('.close-layer');\n $browser->pause(5000);\n }\n catch(Exception $e){\n \n }\n \n try{\n $browser->click('#j-shipping-company');\n $browser->pause(5000);\n $elements = $browser->elements('#j-shipping-dialog');\n foreach ($elements as $element) {\n $data[] = $element->getAttribute('innerHTML');\n }\n Storage::put('data.txt',$data);\n \n }\n catch(Exception $e){\n //$this->data = $e;\n }\n });\n }", "public function test() {\n\n\t}", "function testSample() {\n\t\t$this->assertTrue( true );\n\t}", "public function testExample()\n {\n $this->browse(function ($browser) {\n $browser->visit('/register')\n ->type('surname', 'Surname')\n ->type('name', 'Name')\n ->type('login', '')\n ->type('phone_number' . '89999999999')\n ->type('email', '[email protected]')\n ->type('password', 'user_test')\n ->type('password_confirmation', 'user_test')\n ->press('Enter')\n ->assertPathIs('/');\n });\n }", "function test()\n\t{\n\t\t$this->open('tickets/index.php/ticket653');\n\t\t$this->verifyTitle(\"Verifying Ticket 653\", \"\");\n\n\t\t$this->assertText('textspan', 'This is the page for Ticket653');\n\t}", "public function test_login()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/login')\n ->assertSee('Email')\n ->type(\"#email\", '[email protected]')\n ->type('#password', '11111111')\n ->press('button[type=\"submit\"]')\n ->waitFor('#menu')\n ->assertSee('수강목록');\n });\n }", "public function testGetPayrun()\n {\n }", "public function testHome()\n {\n $this->visit('/')->see('Comité Cantonal de Deportes y Recreación de Grecia');\n\n \n }", "public function testGetSuperfund()\n {\n }", "public function testBasicExample()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/admin/news/create')\n ->type('title', '123')\n ->type('text', 'test123')\n ->press('Добавить новость')\n\n ->assertSee('Мало букв в поле Заголовок');\n });\n }", "public function testExample()\n {\n }", "public function testGetExpert()\n {\n }", "public function testUserRegister()\n {\n //Voter user registration testing\n $this->browse(function (Browser $voter,$photographer,$organizer) {\n $voter->visit('/')\n ->clickLink('Register')\n ->assertSee('User Registration')\n ->value('#name','VoterTesting')\n ->value('#email','[email protected]')\n ->value('#address','University of Moratuwa')\n ->Value('#telephone','0716485403')\n ->Value('#password','123456789')\n ->value('#password-confirm','123456789')\n ->click('.checker')\n ->check('condition')\n ->click('button[type=\"submit\"]')\n ->assertSee('LensView Timeline')\n ->clickLink('View Profile')\n ->assertTitle('LensView | User Profile')\n ->click('#deleteButton')\n ->value('input[type=\"password\"]','123456789')\n ->click('.btn-red');\n\n //Photographer user registration testing\n $photographer->visit('/')\n ->clickLink('Register')\n ->assertSee('User Registration')\n ->value('#name','PhotographerTesting')\n ->value('#email','[email protected]')\n ->value('#address','University of Moratuwa')\n ->Value('#telephone','0716485403')\n ->click('.role2')\n ->Value('#password','123456789')\n ->value('#password-confirm','123456789')\n ->click('.checker')\n ->check('condition')\n ->click('button[type=\"submit\"]')\n ->assertSee(\"Photographer Dashboard\")\n ->clickLink('View Profile')\n ->assertTitle('LensView | User Profile')\n ->click('#deleteButton')\n ->value('input[type=\"password\"]','123456789')\n ->click('.btn-red');\n \n\n // Contest Organizer registration testing\n $organizer->visit('/')\n ->clickLink('Register')\n ->assertSee('User Registration')\n ->value('#name','OrganizerTesting')\n ->value('#email','[email protected]')\n ->value('#address','University of Moratuwa')\n ->Value('#telephone','0716485403')\n ->click('.role3')\n ->Value('#password','123456789')\n ->value('#password-confirm','123456789')\n ->click('.checker')\n ->check('condition')\n ->click('button[type=\"submit\"]')\n ->assertSee(\"Organizer Dashboard\")\n ->clickLink('View Profile')\n ->assertTitle('LensView | User Profile')\n ->click('#deleteButton')\n ->value('input[type=\"password\"]','123456789')\n ->click('.btn-red');\n });\n}", "public function testMain()\n {\n echo \"\\n >----------- Test Main : ---------> \\n\";\n// $this->getRandomNumber();\n// $this->getLoggedUserMail();\n// $this->saveVerificationCode();\n// $this->verification();\n// $this->checkEmailVerification();\n// $this->checkSendCode();\n }", "public function testHomeLogin()\n {\n\n\n $this->browse(function ($browser) {\n\n\n $browser->visit('/login')\n ->type('email', '[email protected]')\n ->type('password', '1qwertyu')\n ->press('Entrar')\n ->assertPathIs('/home')\n ->click('.abv-logout-menu-wrapper')\n ->clickLink('Sair');\n \n });\n\n\n\n }", "protected function test9() {\n\n }", "public function testExample()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/dashboard/projects/')\n ->assertSee('Laravel');\n });\n }", "public function testExample()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/login')\n ->assertSee('Авторизация');\n });\n\n $user = User::factory()->create([\n 'email' => '[email protected]',\n 'password' => Hash::make('password'),\n ]);\n\n $this->browse(function ($browser) {\n $browser->visit('/login')\n ->type('email', '[email protected]')\n ->type('password', 'password')\n ->press('Авторизоваться')\n ->assertPathIs('/dashboard')\n ->assertSee('Главная');\n });\n\n }", "public function testGetSuperfunds()\n {\n }", "public function test_admin_monitoring()\n {\n $this->request('POST', 'pages/Login',['username'=>'superadmin-samuel','password'=>'J6gDEXs1yUxB7ssa9QtDRsk=']);\n $this->request('GET', ['pages/Home', 'member_dsc_summary']);\n $this->assertResponseCode(404);\n }", "function testCreateDailyReprtSingleMerchant()\n {\n \t$this->assertTrue(true);\n }", "public function preTest() {}", "public function testGetSurveys0()\n {\n }", "public function testGetSurveys0()\n {\n }", "public function testExample()\n {\n /**\n * @group search\n */\n $this->browse(function (Browser $browser) {\n $browser->visit(route('admin.login'))\n ->type('username', 'admin1')\n ->type('password', '123456')\n ->press('login')\n ->assertPathIs('/admin/index');\n });\n\n /**\n * @group search\n */\n $this->browse(function (Browser $browser) {\n $browser->visit(route('admin.product.list'))\n ->type('search-product', 'abcd')\n ->press('submit-product-search')\n ->assertPathIs('/admin/product/search');\n });\n\n /**\n * @group search\n */\n $this->browse(function (Browser $browser) {\n $browser->visit(route('admin.product.list'))\n ->type('search-product', 'nhân dâu')\n ->press('submit-product-search')\n ->assertPathIs('/admin/product/search');\n });\n\n /**\n * @group search\n */\n $this->browse(function (Browser $browser) {\n $browser->visit(route('admin.product.list'))\n ->type('search-product', 'valentine')\n ->press('submit-product-search')\n ->assertPathIs('/admin/product/search');\n });\n }", "public function test_welcome()\n {\n $this->assertTrue(true);\n }", "public function testFight()\n {\n }", "public function testOrder()\n {\n// $this->visit('/')\n// ->see('Забронировать')\n// ->click('Забронировать')\n// ->see('HELLO');\n }", "public function testGetContador()\n {\n }", "public function testExample()\n {\n $this->browse(function (Browser $browser) {\n $browser->loginAs(User::find(1))\n ->visitRoute('subscription', ['id' => '1'])\n ->radio('gender', 'L')\n ->type('fullName', 'GHF')\n ->type('birthdate', '04/24/1999')\n ->type('phone', '088177552')\n ->type('address', 'Bandung')\n ->press('Submit');\n });\n }", "public function testSuccess()\n {\n }", "public function testExample()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/register')\n ->type('name', 'TestBot1')\n ->type('email', '[email protected]')\n ->type('password', '123')\n ->type('password_confirmation', '123')\n ->press('Register')\n ->assertPathIs('/computers');\n });\n }", "public function preTesting() {}", "public function testGetSurvey0()\n {\n }", "public function testGetSurvey0()\n {\n }", "protected function setUp(): void\n {\n //Página que vai executar o teste\n self::$driver->navigate()->to('https://www.precodogas.com.br');\n }", "public function test_method()\n\t{\n\n\t}", "protected abstract function test();", "protected abstract function test();", "public function testRegister()\n {\n $this->visit('/')\n ->click('Login')\n ->type('[email protected]', 'email')\n ->type('password', 'password')\n ->press('Login')\n ->see('Dashboard');\n }", "public function testRegistro()\n {\n $this->browse(function (Browser $browser) {\n $browser ->visit('/registro')\n ->type ('nombre','prueba unitaria')\n ->type ('correo','[email protected]')\n ->type ('usuario','prueba1')\n ->type ('contra','123')\n ->press('registro')\n ->assertSee('su pin de seguridad es');\n\n });\n }", "public function testExample()\n {\n $this->browse(function ($browser) {\n $browser->clickLink('Homes');\n });\n }", "public function testWebinar()\n {\n }", "public function testExample()\n {\n $this->browse(function ($browser) {\n $browser->on(new LoginPage)\n ->loginUser()\n ->visit('/talk/talk')\n ->waitFor('.is-login')\n ->assertSee('TALKに話題を投稿しましょう!');\n });\n }", "public function testSuitSuccess()\n {\n $this->visit('/register')\n ->type('Tester', 'name')\n ->type('[email protected]', 'email')\n ->type('password12', 'password')\n ->type('password12', 'password_confirmation')\n ->press('Register')\n ->seePageIs('/login');\n }", "public function testBasicExample()\n {\n $this->visit('/')\n ->see('Laravel')\n ->see('Login')\n ->see('Register');\n }", "function test0()\n {\n $this->assertTrue(true);\n }", "function cork_test()\n\t{\n\t}", "public function testSignUp()\n {\n //add new user\n $this->browse(function ($browser) {\n $browser->visit('user/signup')\n ->type('email', '[email protected]')\n ->type('phone', '0775635458')\n ->type('name', 'ABC')\n ->type('password', '1234')\n ->type('passwordConfirm', '1234')\n ->click('.signup')\n ->assertPathIs('/');\n\n });\n }", "public function testBasicExample()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/')\n ->with('.special-text', function ($text) {\n $text->assertSee('title1');\n });\n\n // 確認商品數量\n $browser->click('.check_product')\n ->waitForDialog(5)\n ->assertDialogOpened('商品數量充足')\n ->acceptDialog();\n\n // 設定中斷點\n eval(\\Psy\\sh());\n });\n }", "public function testInstrumentCreate()\n {\n $this->browse(function (Browser $browser) {\n $user = User::find(1);\n $browser->loginAs($user)\n ->visit(new instrumentManagementPage())\n ->assertSee('Instruments')\n ->press('@actions-button')\n ->press('@actions-create-menu')\n ->assertSee('New Instrument')\n ->type('@code',uniqid('TestInstrument_'))\n ->type('@category', 'Dusk Testing')\n ->type('@module','Summer Capstone')\n ->type('@reference','Test - safe to delete')\n ->press('Save')\n //->press('@save-button') //TODO: use this once DUSK tag is fixed\n ->assertsee('View Instrument - TestInstrument_');\n });\n }", "public function testVoAccessSU(){\n $this->logInSUUser();\n $crawler = $this->client->request('GET', \"/vo/update/serial/1\");\n $this->assertEquals(1, $crawler->filter('h1:contains(\"Update VO aegis\")')->count());\n\n\n }", "public function testBasicTest()\n {\n $response = $this->get('/dangthi');\n $response->assertStatus(200);\n }", "public function testBasicTest()\n {\n $response = $this->get('tasks');\n $response->assertStatus(200);\n\n\n }", "public function testBasicTest()\n {\n// $response = $this->get('/');\n//\n// $response->assertStatus(200);\n $response = $this->get('/');\n\n $response->assertStatus(200);\n $response->assertSee('Laravel Homestead 2');\n\n }", "public function testGetUnitDetails()\n {\n }", "public function testExample()\n {\n # 会员\n $oUser = \\App\\Models\\User::orderBy(\"id\", \"desc\")->first();\n\n # step 2. 会员登入\n $this->UserLogin($oUser->name, \"123qwe\"); \n\n\n # step 3. 遊戲列表\n $sUrl = \"/api/games\";\n $sMethod = \"GET\";\n\n # 傳送參數設定\n $this->aHeader[\"currency\"] = \"VND\";\n $aData = [];\n # 測試接口\n $response = $this->withHeaders($this->aHeader)->json($sMethod, $sUrl, $aData); \n \n\n $sUrl = \"/api/games/9/login\";\n $sMethod = \"POST\";\n\n # 傳送參數設定\n $this->aHeader[\"currency\"] = \"VND\";\n $this->aHeader[\"device\"] = \"1\";\n $aData = [];\n # 測試接口\n $response = $this->withHeaders($this->aHeader)->json($sMethod, $sUrl, $aData);\n\n $response->assertStatus(200);\n }", "function setUp()\n {\n }", "public function testGetExpedicao()\n {\n }", "public function testExample()\n {\n $this->assertTrue(true);\n \n }", "public function testBasicExample()\n {\n $this->browse(function (Browser $browser) {\n// $browser->visit('/login/twitter')\n// ->type('session[username_or_email]', 'MatchMtg')\n// ->type('session[password]', 'boc0805k')\n// ->click('#allow')\n// ->assertPathIs('/login/twitter/callback')\n// ->pause(5000)\n $browser->loginAs(User::find(1))\n ->visit('/home')\n ->press('募集してみる!')\n ->assertSee('新規募集ページ');\n\n });\n }", "public function test_login5()\n {\n $this->visit('login')\n ->type('[email protected]', 'email')\n ->type('','password')\n ->press('Login')\n ->see('The password field is required.');\n }", "function setUp() {\n }", "public function testGetChamado()\n {\n }", "public function testListPastWebinarQA()\n {\n }", "public function test_login6()\n {\n $this->visit('login')\n ->type('[email protected]', 'email')\n ->type('','password')\n ->press('Login')\n ->see('The password field is required.');\n }", "public function testShowingAdmin(){\n }", "public function testBasicTest()\n {\n dd('here');\n $this->assertTrue(true);\n }", "public function testing(){\n\t\t$this->load->library(\"unit_test\");\n\n\t\t$this->unit->run($this->isValid(\"\"), \"null\", \"Test Validasi Null\");\n\t\t$this->unit->run($this->isValid(\"*&&^^\"), \"symbolerror\", \"Test Validasi Symbol\");\n\t\t$this->unit->run($this->isValidHari(\"Selasa\"), true, \"Test Validasi Hari\");\n\t\t$this->unit->run($this->isValidJam(\"0\"), false, \"Test Validasi Jam\");\n\n\t\techo $this->unit->report();\n\t}" ]
[ "0.73618716", "0.73263144", "0.7261532", "0.72321284", "0.7225523", "0.7146328", "0.71345335", "0.7109863", "0.70167536", "0.69687253", "0.6957556", "0.69375235", "0.6932138", "0.6921155", "0.69135004", "0.68969166", "0.68956774", "0.68483615", "0.6846954", "0.68465", "0.6786766", "0.67836976", "0.6766529", "0.67621577", "0.67514867", "0.673357", "0.67304367", "0.6728859", "0.6709868", "0.670312", "0.66995454", "0.668903", "0.6686671", "0.6676129", "0.6669965", "0.66397125", "0.6635314", "0.6631638", "0.66215146", "0.6614006", "0.66132575", "0.66006535", "0.65922844", "0.6589103", "0.65874773", "0.6580302", "0.65786296", "0.6578521", "0.6568048", "0.6566232", "0.65641457", "0.6556763", "0.6552669", "0.65386087", "0.65386087", "0.65250194", "0.6516555", "0.6516283", "0.65132046", "0.6510859", "0.65080094", "0.6501822", "0.6499269", "0.64935124", "0.6484777", "0.6484777", "0.647815", "0.6464562", "0.6463268", "0.6463268", "0.6453917", "0.6450169", "0.6447621", "0.64443415", "0.64382184", "0.6398727", "0.6394707", "0.639304", "0.63908416", "0.6383891", "0.6383548", "0.638326", "0.6378418", "0.63769263", "0.6376411", "0.6367037", "0.6362789", "0.636234", "0.6360139", "0.63592315", "0.6359179", "0.6358308", "0.63565147", "0.6353886", "0.63527423", "0.6352389", "0.6346634", "0.63445663", "0.63411516", "0.63376635" ]
0.72459424
3
public $redis_db = 0;
public function __construct() { return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function redis()\n {\n return $this->redis;\n }", "public function redis_instance()\n {\n return $this->redis;\n }", "function __construct()\n {\n try \n { \n \n $this->database = new Predis\\Client( [ \n \"scheme\" => \"tcp\", \n \"host\" => \"localhost\", \n \"port\" => 6379] );\n \n }\n catch (Exception $e)\n { \n error_log('error with Redis '. $e->getMessage() ); \n exit; \n \n } \n }", "public function getConnection() {\n return $this->redis;\n }", "public function __construct()\n\t{\n\t\t//\n\t\t$this->redis = \\Illuminate\\Support\\Facades\\Redis::connection();\n\t}", "public function __construct()\n\t{\n\t\tif( !$this->redis ) $this->redis = Redis::connection();\n\t}", "private function init() {\r\n parent::init();\r\n $this->redisInit();\r\n}", "public function __construct($redis) {\n $this->redis = $redis;\n }", "public static function getDb()\n {\n return Yii::$app->get('redis');\n }", "private function getRedis()\r\n {\r\n if ($this->redis === null) {\r\n $this->redis = new PredisClient($this->redis_options);\r\n }\r\n\r\n return $this->redis;\r\n }", "function comicjet_db() {\n\treturn new Redis_DB();\n}", "protected function setUpRedis() {}", "function set_client($db=0) {\n\t\ttry {\n\t\t\t$CI =& get_instance();\n\t\t\t$conf = array(\n\t\t\t\t\"scheme\" => \"tcp\",\n\t\t\t\t\"host\" => '127.0.0.1',\n\t\t\t\t\"port\" => 6379\n\t\t\t);\n\t\t\tif(is_numeric($db)) if($db > 0) $conf['database'] = $db;\n\n\t\t\t$redis = new Predis\\Client($conf);\n\t\t\t\n\t\t\treturn $redis;\n\t\t}\n\t\tcatch (Exception $e) {\n\t\t\techo $e->getMessage();\n\t\t}\n\t}", "public function redis()\n {\n return $this->resque->redis();\n }", "public function __construct()\r\n {\r\n //设置中国时区\r\n date_default_timezone_set('PRC');\r\n $this->hostList = ['163.com'];\r\n $this->proxyLog = '/4T/www/huangj/proxyLog';\r\n\r\n $this->redis = new \\Redis();\r\n $this->redis->connect('127.0.0.1', 6379); //连接Redis\r\n $this->redis->auth('dw5w@%wZx'); //密码验证\r\n $this->redis->select(0);//选择数据库2\r\n }", "function conn_redis() {\n\tglobal $REDIS_HOSTS, $REDIS_PORTS;\n\n\tif (false) {\n\t\t// nrk/Predis, deprecated at 2013.07.25 by performance issue\n\t\t$redis_config = array(\n\t\t\t\t'host' => 'ew_tb_was_3p',\n\t\t\t\t'read_write_timeout' => 60,\n\t\t\t\t'connection_persistent' => true,\n\t\t);\n\n\t\trequire_once 'Predis/Autoloader.php';\n\t\tPredis\\Autoloader::register();\n\n\t\t$redis = new Predis\\Client($redis_config);\n\t} else {\n\t\tglobal $global_redis;\n\n\t\t$host = $REDIS_HOSTS[0];\n\t\t$port = $REDIS_PORTS[0];\n\n\t\ttry {\n\t\t\tif ( $global_redis ) {\n\t\t\t\t# $global_redis->ping();\n\t\t\t\treturn $global_redis;\n\t\t\t}\n\t\t} catch (RedisException $e) {\n\t\t\t$global_redis = null;\n\t\t}\n\n\t\tif ( !$global_redis ) {\n\t\t\t$redis = new Redis();\n\t\t\t$redis->connect($host, $port);\n\t\t\t#$redis->pconnect($host, $port);\n\t\t\t#$redis->setOption(Redis::OPT_READ_TIMEOUT, \"60.0\");\n\t\t\t$global_redis = $redis;\n\t\t}\n\t}\n\n\treturn $redis;\n}", "public function __construct()\n {\n // $this->middleware('auth');\n //$this->redis = Redis::connect();\n\n \n\n }", "public function GetRedisConn() {\n\t\treturn $this->redis_conn;\n\t}", "public function redis_version()\n {\n return $this->redis_version;\n }", "function db ( )\n{\n return $this->_db;\n}", "public function __construct($redis_name)\n {\n $this->redis_name = $redis_name;\n }", "public static function getClient(){\n $redis=new \\Redis();\n $redis->connect(self::CLIENT_CONF['host'], self::CLIENT_CONF['port']);\n $redis->auth(self::CLIENT_CONF['password']);\n return $redis;\n }", "public function __construct()\n {\n try\n {\n $this->redis = new Redis();\n $this->redis->connect('127.0.0.1', 6379);\n } catch(RedisException $e)\n {\n return $e->getMessage();\n }\n\n $this->redis->delete('prd');\n\n }", "private function __construct()\n {\n $this->cache = new \\Redis();\n if ($this->cache->connect('redis')) {\n echo 'Connected to Redis' . PHP_EOL;\n $this->cache->delete(self::CLIENTS_KEY);\n }\n }", "public function init()\n {\n parent::init();\n if (!empty($this->gateway)) {\n $continer = new Container();\n $continer->set($this->gateway['class'], $this->gateway);\n $this->redis = $continer->get($this->gateway['class']);\n } else {\n $this->redis = Yii::$app->redis;\n }\n }", "public function __construct(){\n $this->db = DB::getInstance();\n }", "public function __construct(){\n $this->db = Database::connect();\n }", "public function __construct() {\n global $db;\n $this->db = $db;\n }", "public function __construct(){\n $this->_db = DB::getInstance();\n }", "public function constructor($options) {\n $this->_redis = new Redis($options->databaseConfig->redis);\n }", "public function __construct() {\n $this->database = Drupal::database();\n }", "public function getConnection(){\r\n return $this->memcache;\r\n }", "function getDBH(){return $this->DBH;}", "function connectToRedis()\n {\n\n Predis\\Autoloader::register();\n try {\n $redis = new Predis\\Client(array(\n \"host\" => \"\",\n \"port\" => \"6379\"\n ));\n } catch (Exception $e) {\n echo (\"Could not connected to Redis \" . $e->getMessage());\n }\n return $redis;\n }", "public function __construct() {\r\n /* * * maybe set the db name here later ** */\r\n }", "public function open() {\n $host = Configure::read('RedisSession.hostname');\n $port = Configure::read('RedisSession.port');\n $password = Configure::read('RedisSession.password');\n $database = Configure::read('RedisSession.database');\n\n if ($host !== null && $port !== null) {\n $redis = new iRedisForRedisSession(array('hostname' => $host, 'port' => $port));\n }\n else {\n $redis = new iRedisForRedisSession();\n }\n if (!empty($password)) {\n $redis->auth($password);\n }\n if (!empty($database)) {\n $redis->select($database);\n }\n\n self::$store = $redis;\n }", "public function __construct()\n {\n $this->ci =& get_instance();\n\n $this->redis = new Redis();\n\n $this->redis_ip = $this->ci->config->item('redis_ip');\n $this->redis_port = $this->ci->config->item('redis_port');\n $this->redis_ttl = $this->ci->config->item('redis_ttl');\n\n $this->redis->connect($this->redis_ip, $this->redis_port, $this->redis_ttl);\n }", "function testRedis(){\n// Cache::remember('demo_redis_3',60,function(){\n// return 'hello redis';\n// });\n// Cache::forget('demo_redis_3');\n }", "function __construct()\n {\n $this->_db = DB::getInstance();\n }", "public function __construct() {\n\t\t$this->keysDB = array();\n\t}", "protected function connection()\n {\n return $this->redis->connection('horizon');\n }", "public function getRedisClient( ){\n if( empty( $this->redisHandler ) ){\n $this->redisHandler = new RedisHandler();\n }\n return $this->redisHandler->getConnection();\n }", "public function connection()\n {\n return $this->redis->connection('horizon');\n }", "public function resolveConnection() {\n if ( !is_null($this->redis) ) return $this->redis;\n\n $parameters = $this->parameters ?: getenv('REDIS_URL') ?: 'tcp://127.0.0.1/6379?database=0';\n\n $this->redis = new Client($parameters);\n\n return $this->redis;\n }", "public function __construct(){\r\n\r\n $db = new DB;\r\n\r\n $this->db = $db->get_connection();\r\n\r\n }", "public function setUp()\n {\n $this->redis = new \\Redis();\n $this->redis->connect('127.0.0.1', 6379);\n $this->redis->flushDB();\n $this->testNotStrict = new \\AWonderPHP\\SimpleCacheRedis\\SimpleCacheRedis($this->redis);\n }", "public function __construct(){\r\n \r\n $this->db = parent::getInstance(); \r\n }", "public function __construct()\n {\n\n\n\n $this->db = Conectdb::conection();\n }", "public function __construct() {\n $this->db = database::getInstance();\n }", "public function __construct($host='127.0.0.1', $port=6379, $db=0) \n {\n $this->host = $host;\n $this->port = $port;\n $this->db = $db;\n }", "public function get_database(){\n return $this->database;\n }", "public function __construct() {\t\t\n\t\t;\n\t}", "public function __construct(){\n $this->db = new Database;\n }", "public function __construct()\n {\n $this->db = \\Config\\Database::connect();\n }", "public function __construct(){\n $this->db = new Database;\n }", "public function __construct()\n {\n $this->db = new DB();\n }", "public function __construct()\n {\n include __DIR__ . '/config/config.php';\n if (isset($config['redis_password']) && !$config['redis_password'] == '') {\n Resque::setBackend('redis://redis:' . $config['redis_password'] . '@' . $config['redis_host']);\n }\n if (isset($config['test_url'])) {\n $this->test_url = $config['test_url'];\n }\n }", "public function uniqueVia()\n {\n return Cache::driver('redis');\n }", "public function __construct(RedisFactory $redis)\n {\n $this->redis = $redis;\n }", "public function __construct(RedisFactory $redis)\n {\n $this->redis = $redis;\n }", "public function __construct(){\n $this->dbConnection = new database_connection();\n }", "public function db()\n {\n return $this->db;\n }", "public function __construct() {\n $this->_db = DB::getInstance();\n }", "public function availible()\n\t{\n\t\treturn null;//class_exists('Redis');\n\t}", "public function __construct()\n {\n global $db;\n $this->db = $db;\n }", "function db(){\n\treturn Database::getInstance();\n}", "public function connection(){ return $this->connection; }", "function __construct(){\n $this->connection=connect_db(); \n }", "public function init()\n {\n if (!class_exists('Predis\\\\Client', false)) {\n $path = !empty($this->predisLibPath) ? $this->predisLibPath : dirname(__FILE__) . '/predis/lib';\n $path = rtrim($path, '/') . '/Predis';\n Yii::setPathOfAlias('Predis', $path);\n }\n \n if (!is_array($this->connections))\n $this->connections = array();\n \n parent::init();\n }", "public function __construct() {\n $this->_db = DB::connect();\n }", "public function __construct()\n {\n $this->db = DataBase::dbConnect();\n }", "public function __construct() {\n\t\t$this->db = getDatabase();\n\t}", "public function __construct(){\n $this->connection = new Connection();\n\t}", "public function __construct()\n {\n parent::__construct();\n $this->mongo=Mongo::connect();\n $this->db = \\DB::connection('direct_db');\n }", "public function __construct(){\n $database = new Database();\n $db = $database->dbConnection();\n $this->conn = $db;\n }", "public function __construct()\n {\n $this->init_config();//init cache config set the driver and path/key;\n if($this->driver==\"redis\") {\n $this->redis = new \\Redis();\n $this->redis->connect(\"127.0.0.1\", 6379);\n }\n if($this->driver==\"file\"){\n $this->file=new file();\n $this->path=dirname(dirname(dirname(__FILE__))).\"/$this->path/\";//set file store path\n }\n }", "public function getConnection()\n\t{\n\t\tif ($this->_connection === null) {\n\t\t\t$this->_connection = Yii::createComponent(\n\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t\"class\" => \"packages.redis.ARedisConnection\",\n\t\t\t\t\t\t\t\t\t\t\"hostname\" => REDIS_HOSTNAME,\n\t\t\t\t\t\t\t\t\t\t\"port\" => REDIS_PORT,\n\t\t\t\t\t\t\t\t\t\t\"database\" => REDIS_DATABASE\n\t\t\t\t\t\t\t\t\t));\n\t\t}\n\t\treturn $this->_connection;\n\t}", "public function getConnection()\n\t{\n\t\tif ($this->_connection === null) {\n\t\t\t$this->_connection = Yii::createComponent(\n\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t\"class\" => \"packages.redis.ARedisConnection\",\n\t\t\t\t\t\t\t\t\t\t\"hostname\" => REDIS_HOSTNAME,\n\t\t\t\t\t\t\t\t\t\t\"port\" => REDIS_PORT,\n\t\t\t\t\t\t\t\t\t\t\"database\" => REDIS_DATABASE\n\t\t\t\t\t\t\t\t\t));\n\t\t}\n\t\treturn $this->_connection;\n\t}", "public function getRedisClient()\n {\n if (empty($this->redisClient)) {\n $this->redisClient = new Client($this->redisParams, $this->redisOptions);\n }\n return $this->redisClient;\n }", "public function getClient()\n\t{\n\t\treturn $this->redisClient;\n\t}", "public function db()\n {\n if ($this->db!=='_' && $this->db!=='default')\n {\n\n if (!$this->_def_cnf)\n {\n// $this->_def_cnf=Mongo_Database::instance('default')->config();\n// $this->_def_cnf['database']=$this->db;\n\n }\n return engine::mongo($this->db);\n// return Mongo_Database::instance($this->db,$this->_def_cnf);\n }\n return engine::mongo($this->db);\n }", "function __construct(Cache $cache) {\n// $client = RedisAdapter::createConnection('redis://localhost');\n// $this->cache = new RedisTagAwareAdapter($client);\n $this->cache = $cache->getCache();\n\n }", "public function __construct() {\n\t\t$this->db = DB::getInstance();\n\t}", "public function __construct()\n {\n parent::__construct();\n $this->db_mongo = DB::connection('mongodb');\n }", "public function __construct()\n {\n $this->db = new Database();\n }", "public function __construct()\n {\n $this->db = new Database();\n }", "function &dbm()\n{\n\treturn dbManager::get_instance();\n}", "public static function getConnection(){\n return static::$db;\n }", "public function __construct(){\r\n $this->database = new mysqli(\"XXXX\", \"XXXX\", \"XXXX\", \"XXXX\");\r\n \r\n }", "public function __construct()\n {\n $this->db = Db::getInstance();\n }", "function __construct(){\n $this->_db = (new DataBaseServices())->connect();\n }", "public function __construct() {\n\t\t$this->_db = Database::getInstance();\n\t}", "function set_db(){\r\n\t\t$this->db=$this->db;\r\n\t}", "public function __construct()\n {\n $this->storage = array();\n }", "private function setRedis_info($gid){\n $client = new Predis\\Client([\n 'scheme' => 'tcp',\n 'host' => '127.0.0.1',\n 'port' => 6379,\n ]);\n\t\t$exists = $client->exists($gid);\n\t\tif($exists){\n\t\t\treturn json_decode($client->get($gid), true);\n\t\t}else{\n\t\t\treturn;\n\t\t}\n }", "public function index()\n\t{\n\t\t$this->load->library('redis');\n\t\t$redis=$this->redis->config();\n\t\t$redis->set('message', 'Hello world');\n\t\t$value = $redis->get('message');\n\n// Hello world\n\t\tprint($value);\t\n\t}", "public function setUp()\n {\n $this->redis = new \\Redis();\n $this->redis->connect('127.0.0.1', 6379);\n $this->redis->flushDB();\n $key = random_bytes(32);\n $hex = bin2hex($key);\n $this->testNotStrict = new \\AWonderPHP\\SimpleCacheRedis\\SimpleCacheRedisSodium($this->redis, $hex);\n }", "public function __construct() {\r\n $this->conn = PersistentManager::getInstance()->get_connection();\r\n }", "public function __construct() {\r\n $this->db = new Database;\r\n }", "public function __construct()\n {\n $this -> connection = $this ->connecdatabase();\n }", "function __construct(){\n $this->con = new db_connect('', '', '', '');\n }" ]
[ "0.7402313", "0.7281365", "0.70879704", "0.69890183", "0.69725066", "0.696806", "0.69229996", "0.6856602", "0.67668974", "0.676214", "0.670282", "0.66634077", "0.6647488", "0.66313815", "0.6568603", "0.6470686", "0.6443546", "0.643003", "0.6408555", "0.6382263", "0.6330571", "0.6326825", "0.63102835", "0.6276688", "0.6242279", "0.6107715", "0.61065114", "0.6095042", "0.6093065", "0.608923", "0.60673344", "0.6052987", "0.60426956", "0.6028474", "0.6019376", "0.6010872", "0.6000818", "0.597303", "0.59640026", "0.59307355", "0.59187955", "0.5916565", "0.5911611", "0.587992", "0.5873186", "0.5865244", "0.5863875", "0.5835011", "0.5830537", "0.58291364", "0.5820592", "0.5810949", "0.5809552", "0.5805301", "0.5799263", "0.579151", "0.5791163", "0.577554", "0.57703304", "0.57703304", "0.5770112", "0.5748566", "0.574418", "0.57398194", "0.5735876", "0.5734699", "0.57276076", "0.5722318", "0.57211494", "0.57119167", "0.57102495", "0.5701184", "0.5700663", "0.5698499", "0.5693217", "0.5691179", "0.5691124", "0.5691124", "0.56906056", "0.56825924", "0.5680245", "0.5679861", "0.56752086", "0.56750005", "0.566294", "0.566294", "0.5662923", "0.5660223", "0.56507707", "0.5649315", "0.5646577", "0.56432444", "0.56427926", "0.56419545", "0.5636176", "0.56329995", "0.56312585", "0.56239474", "0.5623913", "0.5619672", "0.56190985" ]
0.0
-1
Stop the underlying server / worker.
public function stop(): void;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function stop(): void\n {\n $server = $this->createServer();\n\n // Check if it has started\n if (!$server->isRunning()) {\n output()->writeln('<error>The server is not running! cannot stop.</error>');\n return;\n }\n\n // Do stopping.\n $server->stop();\n }", "public function stop() {\n\t\t$this->invoke(\"stop\");\n\t}", "private function stopServer() {\n\t\t$this->socketSend('shutdown');\n\t\tforeach($this->pipes as $pipe) {\n\t\t\tfclose($pipe);\n\t\t}\n\t\tproc_close($this->server);\n\t}", "public function stop() {}", "public function stop()\n {\n // Update worker state and set it as finished\n $this->update(['resume_token' => 0, 'has_finished' => true]);\n }", "public function stop()\n {\n $className = str_replace(__NAMESPACE__ . '\\\\', '', get_called_class());\n\n if (!$this->started) {\n return;\n }\n\n $this->destroy();\n $this->started = false;\n Log::d($className . ' stopped.');\n }", "public function stop() {\n $cmd = sprintf(\"./control.sh stop %s -game %s\", $this->sid, $this->gameId);\n ssh($cmd, $this->host);\n DB::get()->query(\"UPDATE `servers` SET `status` = 0 WHERE `serverID` = '\" . $this->serverId . \"'\");\n }", "public function stop();", "public function stop();", "public function stop();", "public function stop();", "public function stop();", "public function stop();", "public function stop();", "public function stop();", "public function stop()\n {\n $this->loop->stop();\n }", "public function onWorkerStop(\\swoole_server $server, $workerId)\n {\n \n }", "public function shutdown() {\n\t\t$this->stop();\n\t}", "public function stop()\n {\n if (OS::isWin()) {\n $cmd = \"taskkill /pid {$this->pid} -t -f\";\n } else {\n $cmd = \"kill -9 {$this->pid}\";\n }\n shell_exec($cmd);\n }", "public static function stop()\n {\n }", "abstract public function stop();", "public function stop()\n {\n // nop\n }", "public function onWorkerStop(Server $server, int $worker_id)\n {\n }", "protected static function shutdown()\n\t{\n\t\tif (MHTTPD::$debug) {cecho(\"Shutting down the server ...\\n\");}\n\t\tMHTTPD::$running = false;\n\t\t\n\t\t// Close listener\n\t\tMHTTPD::closeSocket(MHTTPD::$listener);\n\t\t\n\t\t// Kill all running FCGI processes\n\t\texec('taskkill /F /IM php-cgi.exe');\n\t\t\t\t\n\t\t// Remove any active clients\n\t\tforeach ($this->clients as $client) {\n\t\t\tMHTTPD::removeClient($client);\n\t\t}\n\t\t\n\t\t// Flush any buffered logs\n\t\tMHTTPD_Logger::flushLogs();\t\t\n\t}", "public function stop() {\n\t\tforeach ( $this->connections as $id => $conn ) {\n\t\t\tif ($this->connections [$id]->isAlive ())\n\t\t\t\t$this->connections [$id]->stop ();\n\t\t}\n\t\t$this->active = null;\n\t}", "public function stop()\n\t{\n\t\treturn $this->CLI->pingQuery($this->SqueezePlyrID.\" stop\");\n\t}", "public function stop()\n {\n }", "public function stop()\n {\n // TODO: Implement stop() method.\n }", "private function serveStop()\n {\n foreach ($this->pid as $pid) {\n $command = \"kill -9 {$pid} > /dev/null 2> /dev/null &\";\n @exec($command, $output);\n }\n }", "public function stop() {\n\t\t// Setup\n\t\t$options = array(\n\t\t\t'appName' => 'cakedaemon',\n\t\t\t'logLocation' => TMP . \"logs\" . DS . 'cakedaemon.log'\n\t\t);\n\n\t\tSystem_Daemon::setOptions($options);\n\t\tSystem_Daemon::stopRunning();\n\t}", "public function stop()\n {\n }", "function stop_dev_server(): void\n{\n if (optional(this()->server)->isRunning()) {\n this()->server->stop();\n }\n}", "public function onWorkerStop(Swoole\\Server $swooleServer, $workerId)\n {\n }", "function stop() {\n return getReactor()->stop();\n}", "public function stop()\r\n {\r\n\r\n }", "public function stopping($callback)\n {\n $this->app['events']->listen(Events\\WorkerStopping::class, $callback);\n }", "public function stopping($callback)\n {\n $this->app['events']->listen(Events\\WorkerStopping::class, $callback);\n }", "public static function stop() {\n\t\tself::$con->close();\n\t}", "public function stop()\n {\n\n }", "public function stop()\n {/*{{{*/\n $this->_loop = false;\n }", "public function stop()\n\t{\n\t\t$this->data->directSet(\"state\", self::STATE_STOPPED);\n\t}", "public function stop()\n {\n $this->stopped = true;\n\n foreach ($this->threads as $threadId => $task) {\n if (false !== $task) {\n $this->dispatchEvent(self::EVENT_TASK_TERMINATED_PRE, $task);\n $task->forceStop();\n $this->runningThreads--;\n $this->threads[$threadId] = false;\n $this->dispatchEvent(self::EVENT_TASK_TERMINATED_POST, $task);\n }\n }\n }", "public function stop()\n {\n throw new Stop();\n }", "public function stop() {\n try {\n $pid = $this->getPidFile()->read();\n\n Logger::log(\"Killing THIS PID: \" . $pid, \\Zend_Log::WARN);\n posix_kill($pid, SIGTERM);\n } catch (\\Exception $e) {\n echo $e->getMessage();\n }\n $this->_exit();\n }", "public function gracefulStop(){\n $this->handleWorkerOutput('warn', \"Work done, exiting now.\");\n $this->stop();\n }", "public static function _stop() {\n self::response()\n ->write(ob_get_clean())\n ->send();\n }", "public function stop()\n {\n $this->mark('__stop');\n }", "public function stopServer(): bool\n {\n [\n 'masterProcessId' => $masterProcessId,\n ] = $this->serverStateFile->read();\n\n return (bool) $this->posix->kill($masterProcessId, SIGTERM);\n }", "public function stop( $args, $assoc_args ) {\n\t\t$this->site_docker_compose_execute( $args[0], 'stop', $args, $assoc_args);\n\t}", "public static function stop()\n {\n self::$executionTime = round(abs(microtime(true) - $_ENV['W']['START_TIME']) * 1000, 0);\n }", "public function shutdown();", "public function shutdown();", "public function stop() {\n\t\tLogger::getRootLogger ()->info ( \"Stopping IPsec\" );\n\t\t$pid = file_exists ( self::PID_PATH ) ? Functions::shellCommand ( \"pgrep -F \" . self::PID_PATH ) : 0;\n\t\tif ($pid > 0) {\n\t\t\tFunctions::shellCommand ( \"/bin/kill {$pid}\" );\n\t\t}\n\t}", "public function stop(): bool {}", "public function stop($status = 0)\n {\n $this->event->trigger(new WorkerStopping($status));\n\n exit($status);\n }", "public function stop()\n {\n die;\n }", "public function shutdown ()\n {\n $this->_signalAllWorkers(SIGKILL);\n \n $this->_logger->info('Exiting...');\n $this->_shutdown = true;\n \n exit(1);\n }", "function stop()\n{\n global $ipfsutils, $avahi_type, $avahi_port, $staticFile, $urlpath;\n\n // Stop the daemon\n $cmd = $ipfsutils.\" stop \";\n $cmd_res = execute_program($cmd);\n\n // Un-announce the IPFS instance to the community cloud via any of the\n // available methods -including IPFS itself, if enabled-\n $unpub_res = avahi_unpublish($avahi_type, $avahi_port);\n\n $flash_content = txt(t('ipfs_flash_stopping')) . ptxt($cmd_res['output'][0]);\n $flash_content .= txt(t('ipfs_flash_unpublish')) . ptxt($unpub_res);\n\n setFlash($flash_content);\n return(array('type'=>'redirect','url'=>$staticFile.$urlpath));\n}", "public function shutdown() {}", "public function shutdown() {}", "public function shutdown() {}", "public function shutdown() {}", "public function shutdown() {}", "public function shutdown() {\r\n\t\tif($this->status == 'running') {\r\n\t\t\toutput('Shutting Down Blossom Server');\r\n\t\t\t$this->status = 'shutdown';\r\n\t\t\t$this->start_shutdown_time = time();\r\n\t\t\r\n\t\t\tforeach ($this->socket_array as $socket) {\r\n\t\t\t\tif(!$socket->live_past_shutdown) {\r\n\t\t\t\t\t$socket->trigger_remove();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$this->set_interval($this, 'check_shutdown', 1);\r\n\t\t}\r\n\t\t\r\n\t\telse {\r\n\t\t\texit();\r\n\t\t}\r\n\t}", "protected function stop()\n {\n $pidFile = $this->getPidFile();\n\n if(!is_file($pidFile)){\n echo \"PID file not present, so service is not started\\n\";\n exit;\n }\n if(!is_writable($pidFile)){\n echo \"Insufficient permissions. Please execute as service like 'sudo service anyterm start'\";\n exit;\n }\n\n shell_exec('kill `cat /var/run/anyterm.pid`');\n unlink($pidFile);\n }", "protected function stopTask() {}", "public function stop()\n {\n // Put your code here;\n }", "protected function stopped()\n {\n $this->redis->zrem(Queue::redisKey($this->queue, 'running'), $this->payload);\n\n Stats::decr('running', 1);\n Stats::decr('running', 1, Queue::redisKey($this->queue, 'stats'));\n }", "public function JStop() {}", "public function stop(): static\n {\n if ($this->listening) {\n $this->breakLoop = true;\n }\n\n return $this;\n }", "function stop();", "public function destroy()\n {\n $this->stop();\n $this->setupListeners();\n }", "public function stop() {\n if (!$this->isRunning()) {\n return false;\n }\n\n $this->execute('stop');\n\n return true;\n }", "public function stopEngine()\n {\n }", "public function stop()\n {\n $this->_timeStopInMicroSeconds = microtime(true);\n }", "public function onManagerStop(Server $server)\n {\n }", "public function stop($id);", "public static function stop(?string $pidFile = null): void\n {\n $pidFile = $pidFile ?? self::getDefaultPidFile();\n\n if (! \\file_exists($pidFile)) {\n throw new RuntimeException('No web server is listening.');\n }\n\n \\unlink($pidFile);\n }", "abstract public function shutdown();", "public function onWorkerStop($serv, $worker_id)\n {\n Console::info(\"Vary proxy service worker %s stop.\", [$worker_id]);\n }", "public function stop($status = 0)\n {\n $this->events->dispatch(new WorkerStopping($status));\n\n // Cleanly handle stopping a batch without resorting to killing the process\n // This is required for end to end testing\n $this->exitCode = $status;\n }", "public function onStop();", "function ts3client_stopConnection($serverConnectionHandlerID, $quitMessage) {}", "public function stop()\n {\n $this->_running = false;\n return $this;\n }", "public function unregisterWorker()\n\t{\n\t\tif (is_object($this->currentJob)) {\n\t\t\t$this->currentJob->fail(new DirtyExitException());\n\t\t}\n\n\t\t$id = (string)$this;\n\t\tResque::redis()->srem('workers', $id);\n\t\tResque::redis()->del('worker:' . $id);\n\t\tResque::redis()->del('worker:' . $id . ':started');\n\t\tStat::clear('processed:' . $id);\n\t\tStat::clear('failed:' . $id);\n\t}", "abstract function shutdown();", "public function stop(): bool\n {\n return $this->processRunner->stop();\n }", "public function gearmanWorkerStop()\n {\n for($i = 0; $i < $this->_gearmanForkCount; $i++){\n $this->sub_process_keys[] = $i+1;\n }\n foreach ($this->sub_process_keys as $_sub_key) {\n $shell_cmd = \"ps aux | grep \".$this->_workerFileName. \" |\";\n $shell_cmd .= \"grep -v 'grep' | awk '{print $2}' |\";\n $sub_process_name = $this->_workerFileName.\"_\".$_sub_key;\n $pid_file = $this->_lockDir.$this->_workerFileName.\"_\".$_sub_key.\".pid\";\n $pid_cmd = \"cat $pid_file\";\n $pid = exec($pid_cmd);\n $shell_cmd .= \" grep $pid\";\n echo $shell_cmd.\"\\n\";\n //查看进程是不是存在\n $ps_res = exec($shell_cmd);\n if (empty($ps_res)) {\n echo \"process $sub_process_name is not running!\\n\";\n } else {\n $kill_cmd = \"kill $pid\";\n exec($kill_cmd);\n $this->killed_sub_process_keys[] = $_sub_key;\n echo \"process $sub_process_name is stopped\\n\";\n }\n }\n }", "public function kill();", "public function stop(): void\n {\n $this->end = microtime(true);\n }", "public function stop(){\n return $this->bitcoin->stop();\n }", "public function testStop()\n {\n $loop = $this->mockLoop();\n\n $loop\n ->expects($this->once())\n ->method('stop');\n\n // loop should not start on destruct if it has been stopped\n $loop\n ->expects($this->never())\n ->method('run');\n\n zeromq()->setLoop($loop);\n\n zeromq()->stop();\n zeromq()->__destruct();\n }", "public function stop() {\r\n\t\tif (( string ) $this->data->ipaddr == 'dhcp') {\r\n\t\t\t$this->disableDHCP ();\r\n\t\t}\r\n\t\tparent::stop ();\r\n\t}", "public static function stop(Vm $vm);", "public function __destruct()\n\t{\n\t\tif ($this->_connection AND $this->_connection->is_started())\n\t\t{\n\t\t\t$this->_connection->stop();\n\t\t}\n\t}", "public function stop() {\n\n\t\tif (is_null($this->_httpq->stop())) { return false; }\n\t\treturn true;\n\n\t}" ]
[ "0.7606969", "0.7564158", "0.7301298", "0.7047882", "0.70174444", "0.6992386", "0.69501686", "0.6883482", "0.6883482", "0.6883482", "0.6883482", "0.6883482", "0.6883482", "0.6883482", "0.6883482", "0.67921", "0.67897993", "0.670616", "0.66915035", "0.6666815", "0.6659839", "0.6599214", "0.65986806", "0.65595907", "0.65547234", "0.6543579", "0.6531818", "0.650307", "0.64939064", "0.6455722", "0.64343446", "0.64235204", "0.6412369", "0.63837814", "0.6339122", "0.6318271", "0.6318271", "0.62921715", "0.62724817", "0.6226962", "0.6223652", "0.6213605", "0.6212852", "0.61907995", "0.6169716", "0.61623186", "0.61337113", "0.6133605", "0.61073846", "0.60970116", "0.6090682", "0.6090682", "0.6058911", "0.60534173", "0.6052464", "0.604755", "0.60345244", "0.60187244", "0.60041595", "0.60041595", "0.60041595", "0.60041595", "0.60041595", "0.6000515", "0.5931552", "0.5929175", "0.5922368", "0.59198487", "0.5900433", "0.58978134", "0.58935094", "0.5884354", "0.5860879", "0.58513385", "0.5850335", "0.5838591", "0.58218384", "0.5805546", "0.58041185", "0.5799229", "0.57761645", "0.5758479", "0.57558924", "0.57526994", "0.57386917", "0.56927776", "0.56895864", "0.56894165", "0.5669092", "0.56347847", "0.56293035", "0.56218344", "0.5618543", "0.55777687", "0.5577633", "0.5550259" ]
0.67671365
21
Ensures that the buyer's cart contains the contents of the given deal.
protected function prepareCart(PriceWaiter_NYPWidget_Model_Deal $deal) { $cart = Mage::getSingleton('checkout/cart'); $quote = $cart->getQuote(); $deal->ensurePresentInQuote($quote); $cart->save(); // Track the current PW buyer ID so we can automatically discover // other deals the buyer has made. Mage::getSingleton('nypwidget/session') ->setBuyerId($deal->getPricewaiterBuyerId()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function check_cart_items() {\n\t\t\tglobal $cmdeals;\n\t\t\t\n\t\t\t$result = $this->check_cart_item_stock();\n\t\t\tif (is_wp_error($result)) $cmdeals->add_error( $result->get_error_message() );\n\t\t}", "function check_cart_item_stock() {\n\t\t\t$error = new WP_Error();\n\t\t\tforeach ($this->cart_contents as $cart_item_key => $values) :\n\t\t\t\t$_deals = $values['data'];\n\t\t\t\tif ($_deals->managing_stock()) :\n\t\t\t\t\tif ($_deals->is_in_stock() && $_deals->has_enough_stock( $values['quantity'] )) :\n\t\t\t\t\t\t// :)\n\t\t\t\t\telse :\n\t\t\t\t\t\t$error->add( 'out-of-stock', sprintf(__('Sorry, we do not have enough \"%s\" in stock to fulfill your order (%s in stock). Please edit your cart and try again. We apologise for any inconvenience caused.', 'cmdeals'), $_deals->get_title(), $_deals->_stock ) );\n\t\t\t\t\t\treturn $error;\n\t\t\t\t\tendif;\n\t\t\t\tendif;\n\t\t\tendforeach;\n\t\t\treturn true;\n\t\t}", "private function check_cart() {\n $users_id = $this->session->userdata('id');\n if ($users_id) {\n // User connected > DB\n $this->data['deals'] = $this->users_cart->getForUser($users_id);\n } else {\n // Guest > Session\n $deals = $this->session->userdata('cart');\n if ($deals) {\n $this->data['deals'] = $this->deals->getDeals(false, false, false, false, false, false, $deals);\n } else {\n $this->data['deals'] = array();\n }\n }\n }", "public function prepare($deal = null)\n\t{\n\t\tif ($deal)\n\t\t{\n\t\t\t// Set some coupon values\n\t\t\t$deal->coupon_value \t= (float) @$deal->f_coupon_value;\n\t\t\t$deal->original_value \t= (float) @$deal->f_original_value;\n\t\t\t$deal->saved_value \t\t= $deal->original_value - $deal->coupon_value;\n\t\t\t$deal->discount \t\t= round((1 - ($deal->coupon_value / $deal->original_value)) * 100, 0);\n\t\t\t$deal->expires_at \t\t= (int) $deal->f_expires_at;\n\t\t\t$deal->time_left \t\t= (int) $deal->expires_at - time();\n\t\t\t$coupon_expires \t\t= (int) @$deal->f_coupon_expiration_date;\n\t\t\t$deal->coupon_expires \t= mktime(23,59,59,date('m', $coupon_expires),date('d', $coupon_expires),date('Y', $coupon_expires)); // 'Till theend of the day\n\t\t\t\n\t\t\t// Get number of sold items\n\t\t\t$deal->sold_number = (int) $this->cart_item_m->count_by(array(\n\t\t\t\t 'entry_id'\t=> $deal->id\n\t\t\t\t,'status'\t=> 'pg-success'\n\t\t\t));\n\t\t\t\n\t\t\t// There's the possibility to fake the number of sold coupons so we set that here\n\t\t\tif (isset($deal->f_fake_coupons) and (int) $deal->f_fake_coupons)\n\t\t\t{\n\t\t\t\t$deal->sold_number += (int) $deal->f_fake_coupons;\n\t\t\t}\n\t\t\t\n\t\t\t// Get number of bought items\n\t\t\t$deal->bought_number = (int) $this->cart_item_m->count_by(array(\n\t\t\t\t 'entry_id'\t=> $deal->id\n\t\t\t\t,'status'\t=> 'pg-success'\n\t\t\t\t,'user_id'\t=> user_id()\n\t\t\t));\n\t\t\t\n\t\t\t// Still needed number to sell\n\t\t\t$deal->need_to_sell = (int) @$deal->f_minimum_coupons - $deal->sold_number;\n\t\t\t\n\t\t\t// Is expired, successful, available\n\t\t\t$deal->is_expired = (bool) $this->is_expired($deal);\n\t\t\t$deal->is_successful = (bool) $this->is_successful($deal);\n\t\t\t$deal->is_available = (bool) $this->is_available($deal);\n\t\t}\n\t\t\n\t\treturn $deal;\n\t\t\n\t}", "function add_to_cart( $deal_id, $quantity = 1, $variation_id = '', $variation = '' ) {\n\t\t\tglobal $cmdeals;\n\t\t\t\n\t\t\tif ($quantity < 1) return false;\n\t\t\t\n\t\t\t// Load cart item data - may be added by other plugins\n\t\t\t$cart_item_data = (array) apply_filters('cmdeals_add_cart_item_data', array(), $deal_id);\n\t\t\t\n\t\t\t// Generate a ID based on deals ID, variation ID, variation data, and other cart item data\n\t\t\t$cart_id = $this->generate_cart_id( $deal_id, $variation_id, $variation, $cart_item_data );\n\t\t\t\n\t\t\t// See if this deals and its options is already in the cart\n\t\t\t$cart_item_key = $this->find_deals_in_cart($cart_id);\n\t\t\t\n\t\t\tif ($variation_id>0) :\n\t\t\t\t$deal_data = new cmdeals_deals_variation( $variation_id );\n\t\t\telse :\n\t\t\t\t$deal_data = new cmdeals_deals( $deal_id );\n\t\t\tendif;\n\t\t\t\n\t\t\t// Type/Exists check\n\t\t\tif ( $deal_data->is_type('external') || !$deal_data->exists() ) :\n\t\t\t\t$cmdeals->add_error( __('This deals cannot be purchased.', 'cmdeals') );\n\t\t\t\treturn false; \n\t\t\tendif;\n\t\t\t\n\t\t\t// Price set check\n\t\t\tif( $deal_data->get_price() === '' ) :\n\t\t\t\t$cmdeals->add_error( __('This deals cannot be purchased - the price is not yet set.', 'cmdeals') );\n\t\t\t\treturn false; \n\t\t\tendif;\n\t\n\t\t\t// Stock check - only check if we're managing stock and backsales are not allowed\n\t\t\tif ( !$deal_data->has_enough_stock( $quantity ) ) :\n\t\t\t\t$cmdeals->add_error( sprintf(__('You cannot add that amount to the cart since there is not enough stock. We have %s in stock.', 'cmdeals'), $deal_data->get_stock_quantity() ));\n\t\t\t\treturn false; \n\t\t\telseif ( !$deal_data->is_in_stock() ) :\n\t\t\t\t$cmdeals->add_error( __('You cannot add that deals to the cart since the deals is out of stock.', 'cmdeals') );\n\t\t\t\treturn false;\n\t\t\tendif;\n\t\t\t\n\t\t\tif ($cart_item_key) :\n\t\n\t\t\t\t$quantity = $quantity + $this->cart_contents[$cart_item_key]['quantity'];\n\t\t\t\t\n\t\t\t\t// Stock check - this time accounting for whats already in-cart\n\t\t\t\tif ( !$deal_data->has_enough_stock( $quantity ) ) :\n\t\t\t\t\t$cmdeals->add_error( sprintf(__('You cannot add that amount to the cart since there is not enough stock. We have %s in stock and you already have %s in your cart.', 'cmdeals'), $deal_data->get_stock_quantity(), $this->cart_contents[$cart_item_key]['quantity'] ));\n\t\t\t\t\treturn false; \n\t\t\t\telseif ( !$deal_data->is_in_stock() ) :\n\t\t\t\t\t$cmdeals->add_error( __('You cannot add that deals to the cart since the deals is out of stock.', 'cmdeals') );\n\t\t\t\t\treturn false;\n\t\t\t\tendif;\n\t\n\t\t\t\t$this->cart_contents[$cart_item_key]['quantity'] = $quantity;\n\t\n\t\t\telse :\n\t\t\t\t\n\t\t\t\t// Add item after merging with $cart_item_data - hook to allow plugins to modify cart item\n\t\t\t\t$this->cart_contents[$cart_id] = apply_filters('cmdeals_add_cart_item', array_merge( $cart_item_data, array(\n\t\t\t\t\t'deal_id'\t=> $deal_id,\n\t\t\t\t\t'variation_id'\t=> $variation_id,\n\t\t\t\t\t'variation' \t=> $variation,\n\t\t\t\t\t'quantity' \t\t=> $quantity,\n\t\t\t\t\t'data'\t\t\t=> $deal_data\n\t\t\t\t)));\n\t\t\t\n\t\t\tendif;\n\t\n\t\t\t$this->set_session();\n\t\t\t\n\t\t\treturn true;\n\t\t}", "private function validate_sale_items() {\n\t\tif ( 'yes' === $this->exclude_sale_items && $this->is_type( wc_get_product_coupon_types() ) ) {\n\t\t\t$valid_for_cart = false;\n\t\t\t$product_ids_on_sale = wc_get_product_ids_on_sale();\n\n\t\t\tif ( ! WC()->cart->is_empty() ) {\n\t\t\t\tforeach( WC()->cart->get_cart() as $cart_item_key => $cart_item ) {\n\t\t\t\t\tif ( ! empty( $cart_item['variation_id'] ) ) {\n\t\t\t\t\t\tif ( ! in_array( $cart_item['variation_id'], $product_ids_on_sale, true ) ) {\n\t\t\t\t\t\t\t$valid_for_cart = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t} elseif ( ! in_array( $cart_item['product_id'], $product_ids_on_sale, true ) ) {\n\t\t\t\t\t\t$valid_for_cart = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( ! $valid_for_cart ) {\n\t\t\t\tthrow new Exception( self::E_WC_COUPON_NOT_VALID_SALE_ITEMS );\n\t\t\t}\n\t\t}\n\t}", "function wordimpress_is_conditional_product_in_cart( $product_id ) {\n //Check to see if user has product in cart\n global $woocommerce;\n \n //flag no book in cart\n $book_in_cart = false;\n \n foreach ( $woocommerce->cart->get_cart() as $cart_item_key => $values ) {\n $_product = $values['data'];\n \n if ( in_array($_product->id, $product_id) ) {\n //book is in cart!\n $book_in_cart = true;\n \n }\n }\n \n return $book_in_cart;\n \n}", "public static function check_cart_for_specials() {\n\n $contains_special = false;\n\n foreach ( WC()->cart->get_cart() as $cart_item ) {\n if ( self::is_item_special( $cart_item['data'] ) ) {\n $contains_special = true;\n break;\n }\n }\n\n return $contains_special;\n }", "public function check_cart_items() {\n\t\t$return = true;\n\t\t$result = $this->check_cart_item_validity();\n\n\t\tif ( is_wp_error( $result ) ) {\n\t\t\twc_add_notice( $result->get_error_message(), 'error' );\n\t\t\t$return = false;\n\t\t}\n\n\t\t$result = $this->check_cart_item_stock();\n\n\t\tif ( is_wp_error( $result ) ) {\n\t\t\twc_add_notice( $result->get_error_message(), 'error' );\n\t\t\t$return = false;\n\t\t}\n\n\t\treturn $return;\n\n\t}", "private function validate_cart_excluded_sale_items() {\n\t\tif ( $this->exclude_sale_items == 'yes' ) {\n\t\t\t$valid_for_cart = true;\n\t\t\t$product_ids_on_sale = wc_get_product_ids_on_sale();\n\t\t\tif ( ! WC()->cart->is_empty() ) {\n\t\t\t\tforeach( WC()->cart->get_cart() as $cart_item_key => $cart_item ) {\n\t\t\t\t\tif ( ! empty( $cart_item['variation_id'] ) ) {\n\t\t\t\t\t\tif ( in_array( $cart_item['variation_id'], $product_ids_on_sale, true ) ) {\n\t\t\t\t\t\t\t$valid_for_cart = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t} elseif ( in_array( $cart_item['product_id'], $product_ids_on_sale, true ) ) {\n\t\t\t\t\t\t$valid_for_cart = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( ! $valid_for_cart ) {\n\t\t\t\tthrow new Exception( self::E_WC_COUPON_NOT_VALID_SALE_ITEMS );\n\t\t\t}\n\t\t}\n\t}", "protected function checkStock()\n {\n DB::beginTransaction();\n try{\n foreach ($this->cart as $item){\n $unit = Itens::find($item->id);\n $qtd = !empty($unit->quantity) ? $unit->quantity : $unit->weight;\n\n if($qtd >= $item->qty){\n if(!empty($unit->quantity)){\n $unit->quantity = $unit->quantity - $item->qty;\n }else{\n $unit->weight = $unit->weight - $item->qty;\n }\n $unit->save();\n }\n }\n DB::commit();\n $this->addItensToOrder();\n Session::flash('error', 'INfelizmente não foi possível processar sua compra devido a falta de estoque para um de nossos itens em cotação');\n }catch (Exception $e){\n DB::rollback();\n DebugBar::addException($e);\n }\n\n }", "public function testDealCard() {\n\t\t\t#test we have one card missing when we deal a card\n\t\t\t$d = new Deck();\n\t\t\t$this->assertEquals(True,is_object($d->dealCard()));\n\t\t\t$this->assertEquals(51,count($d->getDeck()));\n\t\t}", "protected function CheckBasketContents()\n {\n if ('basket' !== $this->fieldSystemname) {\n $oBasket = $this->getShopService()->getActiveBasket();\n if ($oBasket->dTotalNumberOfArticles <= 0) {\n $oBasketStep = TdbShopOrderStep::GetStep('basket');\n $this->JumpToStep($oBasketStep);\n }\n }\n }", "function VariationIsInCart() {\r\n\t\t$variations = $this->owner->Variations();\r\n\t\tif($variations) {\r\n\t\t\tforeach($variations as $variation) {\r\n\t\t\t\tif($variation->OrderItem() && $variation->OrderItem()->Quantity > 0) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "function checkOut($order, $cart)\n {\n $db = new Database();\n $conn = $db->getConnection();\n\n $success = false;\n\n $conn->autocommit(FALSE);\n $conn->begin_transaction();\n\n $ordersDataService = new OrderDataService();\n $productBusinessService = new ProductBusinessService();\n\n $orderID = $this->addOrdersLine($order, $conn);\n\n foreach ($cart->getItems() as $product_id => $qty) {\n\n $product = $productBusinessService->getProductByID($product_id);\n\n $orderDetails = new OrderDetails($orderID, $product_id, $qty, ($qty * $product->getPrice()), \"here is some description\");\n $okdetails = $this->addDetailsLine($orderID, $orderDetails, $conn);\n }\n\n if ($orderID && $okdetails) {\n $conn->commit();\n $success = true;\n } else {\n $conn->rollback();\n }\n\n $conn->close();\n\n return $success;\n }", "function getfaircoin_only_one_item_on_cart($download_id) {\r\n //echo 'CART CONTENTS: ';\r\n //print_r($cart_contents);\r\n //$cart_contents = edd_get_cart_contents();\r\n //if($cart_contents) return false;\r\n //else return $download_id;\r\n edd_empty_cart();\r\n}", "public function isGoodsInShopcart()\n\t{\n\t\treturn !!$this->count();\n\t}", "public function bought_coupons($deal_id = null, $user_id = null)\n\t{\n\t\t$bought = 0;\n\t\t\n\t\tif ( ! $user_id) $user_id = user_id();\n\t\t\n\t\t// Get number of bought items\n\t\tif ($entry_id AND $user_id)\n\t\t{\n\t\t\t$bought = self::$_ci->cart_item_m->count_by(array\n\t\t\t(\n\t\t\t\t'user_id' => $user_id,\n\t\t\t\t'entry_id' => $entry_id,\n\t\t\t\t'status' => 'pg-success',\n\t\t\t));\n\t\t}\n\t\t\t\n\t\treturn (int) $bought;\n\t\t\n\t}", "function is_purchased($song){\n if (in_array($song, $this->purchased_songs)){\n return True;\n }\n return False;\n }", "private function validate_cart_excluded_items() {\n\t\tif ( ! $this->is_type( wc_get_product_coupon_types() ) ) {\n\t\t\t$this->validate_cart_excluded_product_ids();\n\t\t\t$this->validate_cart_excluded_product_categories();\n\t\t\t$this->validate_cart_excluded_sale_items();\n\t\t}\n\t}", "public function testRepeatOrderSuccess() {\n $order = new Yourdelivery_Model_Order($this->placeOrder());\n $this->dispatch('/request_order/repeat?hash=' . $order->getHashtag());\n $this->assertResponseCode(200);\n $response = $this->getResponse()->getBody();\n $this->assertGreaterThan(0, strlen($response));\n $json = json_decode($response);\n $this->assertTrue(is_object($json));\n\n $cart = $order->getCard();\n foreach ($cart['bucket'] as $cElem) {\n foreach ($cElem as $elem) {\n\n $count = (integer) $elem['count'];\n $mealId = (integer) $elem['meal']->getId();\n $sizeId = (integer) $elem['size'];\n\n $found = false;\n foreach ($json->meal as $hash => $meal) {\n if ((integer) $meal->id == $mealId &&\n (integer) $meal->size == $sizeId &&\n (integer) $meal->count == $count) {\n $found = true;\n break;\n }\n }\n\n $this->assertTrue($found);\n }\n }\n }", "function checkAuthors () {\n\t\tif ( count ( $this->authors) == 0 ) return ;\n\t\n\t\tif ( isset($this->existing_q) ) {\n\t\t\t$this->wd->loadItem ( $this->existing_q ) ;\n\t\t\t$i = $this->wd->getItem ( $this->existing_q ) ;\n\t\t\t$c1 = $i->getClaims ( $this->props['author'] ) ;\n\t\t\t$c2 = $i->getClaims ( $this->props['short author'] ) ;\n\t\t\t$this->invalidateExistingAuthors ( $c1 ) ;\n\t\t\t$this->invalidateExistingAuthors ( $c2 ) ;\n\t\t\t\n\t\t\t// Special case: Single author, one author already in item...\n\t\t\tif ( count($this->authors) == 1 && count($c1)+count($c2) == 1 ) {\n\t\t\t\t$this->authors[1]->hadthat = true ;\n\t\t\t}\n\t\t}\n\t}", "private function checkIfExistsProducts()\n {\n if (isset($_COOKIE['cart-data'])) {\n $productCookie = htmlspecialchars($_COOKIE['cart-data']);\n $products = trim($productCookie, '|');\n $products = explode('|', $products);\n foreach ($products as $product) {\n if (!Product::find($product)) {\n $productCookie = str_replace('|' . $product . '|', '|', $productCookie);\n }\n }\n setcookie('cart-data', $productCookie, time() + (86400 * 365), \"/\");\n }\n }", "public function cartExists() {\n\t\t$cart = $this->find('first', array('conditions' => $this->cartConditions(), 'contain' => FALSE));\n\t\treturn !empty($cart);\n\t}", "public function sold($deal = null)\n\t{\n\t\t$sold = 0;\n\t\t\n\t\t// Find deal by ID\n\t\tif (is_numeric($deal))\n\t\t{\n\t\t\t$deal = $this->get($deal);\n\t\t}\n\t\t\n\t\t\n\t\t// Find number of sold coupons\n\t\tif ($deal and isset($deal->sold_number))\n\t\t{\n\t\t\t$sold = (int) $deal->sold_number;\n\t\t}\n\t\telseif ($deal)\n\t\t{\n\t\t\t// Get number of sold items\n\t\t\t$sold = (int) $this->cart_item_m->count_by(array\n\t\t\t(\n\t\t\t\t'entry_id' => $deal->id,\n\t\t\t\t'status' => 'pg-success',\n\t\t\t));\n\t\t}\n\t\t\n\t\t\n\t\t// There's the possibility to fake the number of sold coupons so we set that here\n\t\tif (isset($deal->f_fake_coupons) and (int) $deal->f_fake_coupons)\n\t\t{\n\t\t\t$deal->sold_number += (int) $deal->f_fake_coupons;\n\t\t}\n\t\t\n\t\treturn $sold;\n\t\t\n\t}", "function checkCart($TmpCart){\n\t\t$result = array();\n\t\tforeach ($this->Cart as $k => $v){ if($v[\"id\"] == $TmpCart[\"id\"]) $result[] = $k; } // Find Elements with the same product Id\n\t\t$unigue = true;\n\t\tif(count($result)>0){\n\t\t\tforeach ($result as $v){ // Check to see if all the data is the same. Messages and Engravins will always add a new item\n\t\t\t\tif($this->Cart[$v][\"spec\"] == $TmpCart[\"spec\"] && \n\t\t\t\t\t $this->Cart[$v][\"special\"] == $TmpCart[\"special\"] && \n\t\t\t\t\t $this->Cart[$v][\"selections\"] == $TmpCart[\"selections\"] && \n\t\t\t\t\t intval($this->Cart[$v][\"msgs\"]) == 0){ $newattnd=true;\n\t\t\t\t\t\t// Lets check our attendee list and make sure we have any new Attendees: this check is for NITA\n\t\t\t\t\t\tif(isset($this->Cart[$v][\"attnd\"]) && count($this->Cart[$v]['attnd']) > 0 && count($TmpCart['attnd']) > 0){\n\t\t\t\t\t\t\tforeach($this->Cart[$v][\"attnd\"] as $attnd){\n\t\t\t\t\t\t\t\tif($TmpCart['attnd'][0]==$attnd) { $newattnd=false; $unigue = false; break; }\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif($newattnd && count($TmpCart['attnd'])>0) $this->Cart[$v][\"attnd\"][]=$TmpCart['attnd'][0]; // Add our new Attendee\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(isset($this->Cart[$v]['attnd']) && count($this->Cart[$v]['attnd'])>0 && $this->Cart[$v]['attnd']!==0){\n\t\t\t\t\t\t\t$FoundNull=true;\n\t\t\t\t\t\t\twhile($FoundNull){ $FoundNull=false;\n\t\t\t\t\t\t\t\tforeach($this->Cart[$v]['attnd'] as $KeyAttnd => $ValAttnd){\n\t\t\t\t\t\t\t\t\tif( (is_int($ValAttnd) && intval($ValAttnd)==0) || is_null($ValAttnd) ){\n\t\t\t\t\t\t\t\t\t\tunset( $this->Cart[$v]['attnd'][$KeyAttnd] ); $FoundNull=true; break;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(!isset($this->Cart[$v]['attnd']) || $this->Cart[$v]['attnd']===0) $this->Cart[$v]['attnd']=array();\n\t\t\t\t\t\t$this->Cart[$v]['name'] = $TmpCart['name']; // Going to store the name here so we don't have to query the web service for every item in the cart\n\t\t\t\t\t\t$this->Cart[$v][\"type\"] = $TmpCart['type']; // Type 1 = program, Type 2 = product\n\t\t\t\t\t\t//if($TmpCart['type']==1 && count($this->Cart[$v]['attnd'])>0) $this->Cart[$v][\"qty\"]= count($this->Cart[$v]['attnd']); // If product is program quantity equals the number of attendees have a check for zero to allow for item to placed in cart without any attendee's selected\n\t\t\t\t\t\t//else\n\t\t\t\t\t\t$this->Cart[$v][\"qty\"] += $TmpCart[\"qty\"]; $unigue = false; break; // Updates our cart quantitee\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif($unigue) $this->Cart[] = $TmpCart; // If we have a unigue item add it to the cart.\n\t}", "public static function geoCart_initItem_forceOutsideCart()\n {\n //most need to return false.\n return false;\n }", "function is_deal_booked_by_user($mobile,$deal_id){\n //check this deal is not booked by this user already\n $count = Db::rowCount(\"booked_deals\",array(\n \"mobile\" => $mobile,\n \"deal_id\" => $deal_id\n ),array(\"=\",\"=\"));\n return $count >= 1 ? true : false;\n}", "private function verifyItems(string $objectId): void\n {\n //====================================================================//\n // Read Order Data from Module\n $data = $this->getOrderItemsData($objectId);\n //====================================================================//\n // Read Order from Magento\n $items = $this->getMagentoOrderItems($objectId);\n //====================================================================//\n // Verify Quantities\n $totalFound = 0;\n foreach ($items as $key => $orderItem) {\n $splashItem = $data[\"lines\"][$key];\n //====================================================================//\n // Splash Item Has Qty & Prices Set\n $this->assertArrayHasKey(\"qty_ordered\", $splashItem);\n $this->assertArrayHasKey(\"unit_price\", $splashItem);\n $this->assertNotEmpty($splashItem[\"unit_price\"]);\n if ((\"bundle\" == $orderItem->getProductType()) || $orderItem->getHasChildren()) {\n //====================================================================//\n // Bundle Has Null Qty\n $this->assertEquals(0, $splashItem[\"qty_ordered\"]);\n //====================================================================//\n // Bundle Has Real Prices\n $this->assertGreaterThan(0, $splashItem[\"unit_price\"][\"ht\"]);\n $this->assertGreaterThan(0, $splashItem[\"unit_price\"][\"ttc\"]);\n $totalFound++;\n }\n //====================================================================//\n // Bundle Has Qty\n if ($orderItem->getParentItemId()) {\n $this->assertGreaterThan(0, $splashItem[\"qty_ordered\"]);\n $this->assertGreaterThan(0, $splashItem[\"unit_price\"][\"ht\"]);\n $this->assertGreaterThan(0, $splashItem[\"unit_price\"][\"ttc\"]);\n $totalFound++;\n }\n }\n $this->assertGreaterThan(1, $totalFound);\n }", "function checkCartForItem($addItem, $cartItems) {\n if (is_array($cartItems) && !(is_null($cartItems)))\n {\n foreach($cartItems as $key => $item) \n {\n if($item['productId'] == $addItem)\n return true;\n }\n }\n return false;\n}", "public function checkCookieCart()\n {\n if (!isset($_COOKIE['user_cart'])) {\n return \"\";\n } else {\n // Multidimensional array containing a SKU Key and a quantity Value (key-value pair)\n $cart = $this->getCookie(\"user_cart\");\n // Get all the keys of the Cart array\n $cart_keys = array_keys($cart);\n\n $count = 0;\n for ($counter = 0; $counter < count($cart_keys); $counter++) {\n // Count the number of items the User has selected\n $count = $count + $cart[$cart_keys[$counter]];\n }\n\n return \"data-badge=\" . $count;\n }\n }", "public function addDealsToCart( $itemMap ) {\r\n\t\t\t$params = array('session_cookie'=>$itemMap['cart_session'],'dealid'=>$itemMap['dealid']);\r\n\t\t\t$this->db->select('COUNT(*) as count')->from(TABLES::$ORDER_DEALS_CART)->where($params);\r\n\t\t\t$query = $this->db->get();\r\n\t\t\t$result = $query->result_array();\r\n\t\t\tif($result[0]['count'] <=0 ) {\r\n\t\t\t\t$params = array('session_cookie'=>$itemMap['cart_session'],'restid'=>$itemMap['restid'],'dealid'=>$itemMap['dealid']);\r\n\t\t\t\t/* New item */\r\n\t\t\t\t$this->db->insert(TABLES::$ORDER_DEALS_CART,$params);\r\n\t\t\t\t$map['message'] = 'Deal Applied To Cart';\r\n\t\t\t\t$map['status'] = 0;\r\n\t\t\t}else {\r\n// \t\t\t\t$this->updateDealsInCart( $itemMap );\r\n\t\t\t\t$map['message'] = 'Deal Applied To Cart';\r\n\t\t\t\t$map['status'] = 1;\r\n\t\t\t}\r\n\t\t\treturn $map;\r\n\t\t}", "function check_if_product_was_bought($product_id,$purchase_id)\n\t{\n\t\t\n\t\t$sql = \"SELECT p_details_id FROM cane_purchase_details WHERE purchase_id = ? AND p_product_id= ? \";\n\t\t\n \t\t$query = $this->db->query($sql,array( $purchase_id, $product_id ));\t\t\n\n\t\tif ($query->num_rows() > 0)\n\t\t{ \n\t\t\treturn true;\n\t\t} \n\t\telse \n\t\t{ \n\t\t\techo false; \n\t\t}\n\n\n\t}", "public function testCheckCart()\n {\n \n\n $customerSession = $this->getModelMock('customer/session', array('getQuote', 'start', 'renewSession', 'init'));\n $this->replaceByMock('model', 'customer/session', $customerSession);\n \n $itemsCollection = array();\n $product = new Varien_Object();\n $product->setId(1);\n $item = new Varien_Object();\n $item->setProduct($product);\n $item->setId(1);\n $itemsCollection[] = $item;\n $item = new Varien_Object();\n $product->setId(2);\n $item->setProduct($product);\n $item->setId(2);\n $itemsCollection[] = $item;\n $item = new Varien_Object();\n $product->setId(3);\n $item->setProduct($product);\n $item->setId(3);\n $itemsCollection[] = $item;\n $quoteMock = $this->getModelMock('sales/quote', array('getAllItems'));\n $quoteMock->expects($this->any())\n ->method('getAllItems')\n ->will($this->returnValue($itemsCollection));\n $this->replaceByMock('model', 'sales/quote', $quoteMock);\n $quote = Mage::getModel('sales/quote')->load(2);\n $checkoutSession = $this->getModelMock('checkout/session', array('getQuote', 'start', 'renewSession', 'init'));\n $checkoutSession->expects($this->any())\n ->method('getQuote')\n ->will($this->returnValue($quote));\n $this->replaceByMock('model', 'checkout/session', $checkoutSession);\n \n $this->assertEquals(21, Mage::helper('postident/data')->checkCart());\n }", "function is_available($deal = null)\n\t{\n\t\t$available = true;\n\t\t\n\t\tif ($deal)\n\t\t{\n\t\t\t// Get bought and sold numbers\n\t\t\t$bought = $this->bought($deal->id);\n\t\t\t$sold = $deal->sold_number;\n\t\t\t\n\t\t\t// Based on number of coupons sold\n\t\t\tif ($bought >= $deal->f_maximum_coupons_per_user) $available = false;\n\t\t\tif ($sold >= $deal->f_maximum_coupons) $available = false;\n\t\t\t\n\t\t\t// Based on time\n\t\t\tif ($deal->time_left <= 0) $available = false;\n\t\t}\n\t\t\n\t\treturn $available;\n\t\t\n\t}", "public function HasCart() {\n\tif ($this->IsNew()) {\n\t return FALSE;\n\t} else {\n\t return (!is_null($this->GetCartID()));\n\t}\n }", "private function getAlreadyPurchasedProduct()\n {\n // If is Guest then hide the review form\n if (!$this->getCustomerId()) {\n return false;\n }\n try {\n $product = $this->getProductInfo();\n $orders = $this->getCustomerOrders();\n foreach ($orders as $order) {\n // Get all visible items in the order\n /** @var $items \\Magento\\Sales\\Api\\Data\\OrderItemInterface[] **/\n $items = $order->getAllVisibleItems();\n // Loop all items\n foreach ($items as $item) {\n // Check whether the current product exist in the order.\n if ($item->getProductId() == $product->getId()) {\n return true;\n }\n }\n }\n return false;\n } catch (\\Exception $e) {\n return false;\n }\n }", "public function canItemsAddToCart()\n {\n foreach ($this->getItems() as $item) {\n if (!$item->isComposite() && $item->isSaleable() && !$item->getRequiredOptions()) {\n return true;\n }\n }\n return false;\n }", "public function validateCart($cart = null)\n {\n\n $check = true;\n $messages = [];\n\n if(!$cart) {\n $cart = $this->getCart(['cartItems.product']);\n }\n\n // Check we actually have items\n if(count($cart->cartItems) <= 0) {\n $check = false;\n \\Notification::warning('There are no items in your cart.');\n }\n\n\n // Check the validity of all cart items\n $cart->cartItems->each(function($item){\n if (!$item->valid){\n $check = false;\n \\Notification::warning('An item in your cart is invalid. Please either remove or replace it.');\n }\n\n });\n\n foreach($cart->cartItems->groupBy('product_id') as $itemGroup) {\n\n $cartQuantity = 0;\n\n foreach($itemGroup as $item) {\n $cartQuantity += $item->quantity;\n }\n\n $product = $itemGroup->first()->product;\n\n // Check product stock\n if (!$product->checkStock($cartQuantity)) {\n $check = false;\n \\Notification::warning('We don\\'t have enough of this product in stock.');\n }\n\n // Check product extras stock\n// foreach($product->extras as $extra) {\n// if (!$extra->checkStock($cartQuantity)) {\n// $check = false;\n// \\Notification::warning('We don\\'t have enough of this product extra in stock.');\n// }\n// };\n\n };\n\n return [\n 'check' => $check,\n 'messages' => $messages\n ];\n\n\n // Check that item products exist\n\n // Check that item options exist\n\n // Check that item extras exist\n\n\n // Check that item product has stock\n\n\n // Check that item extras have stock\n\n\n\n\n }", "function harvest_in_cart() {\n\t\n\tglobal $woocommerce;\n\t\n\t$product_id = 37592;\n\t\n\t$parent_id = wp_get_post_parent_id( $product_id );\n\t\n\t$product_id = $parent_id > 0 ? $parent_id : $product_id;\n\t\n\tforeach ( $woocommerce->cart->get_cart() as $cart_item ) {\n\t \n\t if ( $cart_item['product_id'] === $product_id ) {\n\t \n\t return true;\n\t \n\t } else {\n\t \n\t return false;\n\t \n\t }\n\t\n\t}\n\n}", "function check_product_in_the_cart($product){\n if (auth()->check()){\n $cart = Cart::where('user_id', auth()->user()->id)->where('product_id', $product->id)->first();\n }else{\n if(session()->has('carts')){\n $cart = key_exists($product->uuid, session('carts'));\n }else{\n $cart = false;\n }\n }\n\n if ($cart){\n return true;\n }else{\n return false;\n }\n}", "function VariationOrProductIsInCart() {\r\n\t\treturn ($this->owner->IsInCart() || $this->VariationIsInCart());\r\n\t}", "public function check_cart_coupons() {\n\t\tforeach ( $this->get_applied_coupons() as $code ) {\n\t\t\t$coupon = new WC_Coupon( $code );\n\n\t\t\tif ( ! $coupon->is_valid() ) {\n\t\t\t\t$coupon->add_coupon_message( WC_Coupon::E_WC_COUPON_INVALID_REMOVED );\n\t\t\t\t$this->remove_coupon( $code );\n\t\t\t}\n\t\t}\n\t}", "public function checkCoupon(CartCouponOnCheckEvent $event)\n {\n if ($event->getCart()->getQuantity() === 0) {\n throw new CouponIncompatibleException();\n }\n\n $coupon = $event->getCoupon();\n\n $this\n ->couponManager\n ->checkCoupon($coupon);\n }", "public function hasPartsToIssue(): bool\n {\n return count($this->issuedItems) > 0;\n }", "function checkInventory($userid, $ingredient){\n\t\n\t\t $count = @mysql_query(\"SELECT COUNT(*) as count FROM Inventory WHERE (UserID = '$userid' \n\t\t AND IngredientName = '$ingredient')\");\n\t\t $countdata = mysql_fetch_assoc($count);\n\t\t if($countdata['count'] <= 0)\n\t\t return false;\n\t\t else return true;\n\t}", "function get_fu_view_cart() {\n if ( WC()->cart->get_cart_contents_count() > 0 ) {\n return \"<p>Your cart contains items and can be viewed <a href=\\\"\" . home_url( '/cart/' ) . \"\\\">here</a>.</p>\";\n }\n}", "function harvest_in_order( $order ) {\n\n\t$items = $order->get_items(); \n\n\tforeach ( $items as $item_id => $item ) {\n\n\t\tif ( $item->get_product_id() === 37592 ) {\n\t\t\t\n\t\t\treturn true;\n\t\t\t\n\t\t}\n\n\t}\n\t\n\treturn false;\n\n}", "private function checkItemPurchaseBounds() : void\n {\n if ($this->item->available < 1) {\n throw new InventoryException('quantity not available');\n }\n\n if ($this->coinService->getCurrenCoinCount() < $this->item->cost) {\n throw new InsufficientFundsException('insufficient funds available');\n }\n }", "public function testPurchasesIsShown()\n {\n // Create a user\n $user = User::create([\n 'password' => Hash::make('password'),\n 'email' => '[email protected]',\n 'name' => 'John Doe',\n ]);\n\n // Create room\n $room = Room::create([\n 'id' => 1,\n 'name' => 'Test room',\n ]);\n\n // Create sample product\n $product = Product::create([\n 'name' => 'Test product',\n 'color' => 'fff',\n 'quantity' => '1,2,5',\n 'price' => '1232.00',\n ]);\n\n $quantity = 2;\n\n // Buy something\n $beer = new Beer();\n $beer->room = $room->id;\n $beer->quantity = $quantity;\n $beer->product = $product->id;\n $beer->ipAddress = request()->ip();\n $beer->amount = -($product->price * $quantity);\n $beer->save();\n\n // Login that user in\n Auth::login($user);\n\n // Get the page\n $response = $this->get('/rooms/1');\n\n // Asser user is logged in\n $this->assertAuthenticatedAs($user);\n\n // And that we get the expected 200 OK\n $response->assertStatus(200);\n\n // And the purchase shows up, we only check if the price is shown\n $response->assertSee('-'.($product->price * 2).'.00');\n }", "public function store(StoreDealRequest $request)\n {\n if ($request->person_name && ! $request->person_id) {\n $person = $this->personService->createFromRelated($request);\n } elseif ($request->person_id) {\n $person = Person::find($request->person_id);\n }\n\n if ($request->organisation_name && ! $request->organisation_id) {\n $organisation = $this->organisationService->createFromRelated($request);\n } elseif ($request->organisation_id) {\n $organisation = Organisation::find($request->organisation_id);\n }\n \n $this->dealService->create($request, $person ?? null, $organisation ?? null);\n \n flash(ucfirst(trans('laravel-crm::lang.deal_stored')))->success()->important();\n\n return redirect(route('laravel-crm.deals.index'));\n }", "public function dealCardToDealer();", "function checkout_cart ($external_cart_id) {\n $db = getDb();\n\n //We use a transaction so that all purchases either succeed\n //or all fail\n $transactionStarted = $db->beginTransaction();\n if (!$transactionStarted) {\n throw new Exception(\"An unexpected error occurred; failed to enter transaction\");\n }\n\n $cart = fetch_cart($external_cart_id);\n if (count($cart->products) == 0) {\n throw new InvalidOperationException(\"Cart is empty\");\n }\n foreach ($cart->products as $product) {\n purchase_product($product->product_id, $product->quantity);\n }\n\n $committed = $db->commit();\n if (!$committed) {\n throw new Exception(\"An unexpected error occurred; failed to commit\");\n }\n}", "function checkCart() {\r\n if (! isset($_SESSION['cart'])) {\r\n $_SESSION['cart'] = [];\r\n return true;\r\n } else {\r\n return true;\r\n }\r\n}", "public function checkStock()\n {\n if ($this->qty > ($this->beer->stock - $this->beer->requested_stock)){\n return false;\n }\n\n return true;\n }", "public function store(Request $request)\n {\n $shopping_cart = $request->shopping_cart;\n\n $in_shopping_carts = InShoppingCart::where(\n 'shopping_cart_id',\n $shopping_cart->id\n )->get();\n\n $article = Article::find($request->article_id);\n\n $exists = false;\n\n foreach ($in_shopping_carts as $in_shopping_cart) {\n //We go through all these instances to check if the article_id of the current selected article matches the article_id of any of the instances already existing in the cart.\n if ($in_shopping_cart->article_id == $request->article_id) {\n //If it exists, we increase the quantity field of that instance to 1 and set $ exists to true\n $in_shopping_cart->update([\n 'quantity' => $in_shopping_cart->quantity + 1,\n ]);\n $exists = true;\n $article->update(['quantity' => $article->quantity - 1]); //We also reduce the stock of said item by 1 again.\n }\n }\n\n if ($exists == false) {\n //If in the end it does not exist we create a new instance with that article.\n $response = InShoppingCart::create([\n 'user_id' => null,\n 'shopping_cart_id' => $shopping_cart->id,\n 'article_id' => $request->article_id,\n 'quantity' => 1,\n ]);\n $article->update(['quantity' => $article->quantity - 1]);\n }\n return back();\n }", "public function is_empty() {\n\t\treturn 0 === count( $this->get_cart() );\n\t}", "private function validate_product_ids() {\n\t\tif ( sizeof( $this->product_ids ) > 0 ) {\n\t\t\t$valid_for_cart = false;\n\t\t\tif ( ! WC()->cart->is_empty() ) {\n\t\t\t\tforeach( WC()->cart->get_cart() as $cart_item_key => $cart_item ) {\n\t\t\t\t\tif ( in_array( $cart_item['product_id'], $this->product_ids ) || in_array( $cart_item['variation_id'], $this->product_ids ) || in_array( $cart_item['data']->get_parent(), $this->product_ids ) ) {\n\t\t\t\t\t\t$valid_for_cart = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( ! $valid_for_cart ) {\n\t\t\t\tthrow new Exception( self::E_WC_COUPON_NOT_APPLICABLE );\n\t\t\t}\n\t\t}\n\t}", "function wcfm_wcpvendors_order_mark_fulfilled() {\r\n\t\tglobal $WCFM, $WCFMu, $woocommerce, $wpdb;\r\n\t\t\r\n\t\t$user_id = apply_filters( 'wcfm_current_vendor_id', get_current_user_id() );\r\n\t\t\r\n\t\tif ( !empty( $_POST['orderid'] ) ) {\r\n\t\t\t$order_id = $_POST['orderid'];\r\n\t\t\t$product_id = $_POST['productid'];\r\n\t\t\t$order_item_id = $_POST['orderitemid'];\r\n\t\t\t$tracking_url = $_POST['tracking_url'];\r\n\t\t\t$tracking_code = $_POST['tracking_code'];\r\n\t\t\t$order = wc_get_order( $order_id );\r\n\t\t\t\r\n\t\t\t$tracking_url = apply_filters( 'wcfm_tracking_url', $tracking_url, $tracking_code, $order_id );\r\n\t\t\t\r\n\t\t\tif( $order_item_id ) {\r\n\t\t\t\tif( wcfm_is_vendor() ) {\r\n\t\t\t\t\t$vendor_data = WC_Product_Vendors_Utils::get_vendor_data_from_user();\r\n\t\t\t\t\t\r\n\t\t\t\t\tWC_Product_Vendors_Utils::set_fulfillment_status( absint( $order_item_id ), 'fulfilled' );\r\n\t\t\t\r\n\t\t\t\t\tWC_Product_Vendors_Utils::send_fulfill_status_email( $vendor_data, 'fulfilled', $order_item_id );\r\n\t\t\t\t\t\r\n\t\t\t\t\tWC_Product_Vendors_Utils::clear_reports_transients();\r\n\t\t\t\t\t\r\n\t\t\t\t\t$shop_name = ! empty( $vendor_data['shop_name'] ) ? $vendor_data['shop_name'] : '';\r\n\t\t\t\t\t$wcfm_messages = sprintf( __( 'Vendor <b>%s</b> has shipped <b>%s</b> to customer.<br/>Tracking Code : %s <br/>Tracking URL : <a class=\"wcfm_dashboard_item_title\" target=\"_blank\" href=\"%s\">%s</a>', 'wc-frontend-manager-ultimate' ), $shop_name, get_the_title( $product_id ), $tracking_code, $tracking_url, $tracking_url );\r\n\t\t\t\t\t$WCFM->wcfm_notification->wcfm_send_direct_message( $user_id, 0, 0, 1, $wcfm_messages, 'shipment_tracking' );\r\n\t\t\t\t\t$comment_id = $order->add_order_note( $wcfm_messages, '1');\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$comment_id = $order->add_order_note( sprintf( __( 'Product <b>%s</b> has been shipped to customer.<br/>Tracking Code : %s <br/>Tracking URL : <a href=\"%s\">%s</a>', 'wc-frontend-manager-ultimate' ), get_the_title( $product_id ), $tracking_code, $tracking_url, $tracking_url ), '1');\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// Update Shipping Tracking Info\r\n\t\t\t\t$this->updateShippingTrackingInfo( $order_id, $order_item_id, $tracking_code, $tracking_url, $product_id );\r\n\t\t\t\t\r\n\t\t\t\tdo_action( 'wcfm_after_order_mark_shipped', $order_id, $order_item_id, $tracking_code, $tracking_url, $product_id );\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\techo \"complete\";\r\n\t\tdie;\r\n\t}", "public function has(Buyable $buyable): bool\n {\n return $this->items->has($this->getItemId($buyable));\n }", "public function checkout(Cart $cart, Request $request)\n {\n\n if (Auth::guard('api')->check()) {\n $userID = auth('api')->user()->getKey();\n }\n $this->validate($request, [\n 'cartKey' => 'required',\n 'name' => 'required',\n 'adress' => 'required',\n /* 'credit_card_number' => 'required',\n 'expiration_year' => 'required',\n 'expiration_month' => 'required',\n 'cvc' => 'required', */\n ]);\n /* $validator = Validator::make($request->all(), [\n 'cartKey' => 'required',\n 'name' => 'required',\n 'adress' => 'required',\n //'credit_card_number' => 'required',\n //'expiration_year' => 'required',\n //'expiration_month' => 'required',\n //'cvc' => 'required',\n ]);\n\n if ($validator->fails()) {\n return response()->json([\n 'errors' => $validator->errors(),\n ], 400);\n } */\n\n $cartKey = $request->input('cartKey');\n if ($cart->key == $cartKey) {\n $name = $request->input('name');\n $adress = $request->input('adress');\n //$creditCardNumber = $request->input('credit_card_number');\n $TotalPrice = (float) 0.0;\n $items = $cart->items;\n\n foreach ($items as $item) {\n\n $product = Product::find($item->product_id);\n $price = $item->price/$item->quantity;\n //$inStock = $product->UnitsInStock;\n $TotalPrice = $TotalPrice + ($price * $item->quantity);\n /* if ($inStock >= $item->quantity) {\n\n $TotalPrice = $TotalPrice + ($price * $item->quantity);\n\n $product->UnitsInStock = $product->UnitsInStock - $item->quantity;\n $product->save();\n } else {\n return response()->json([\n 'message' => 'The quantity you\\'re ordering of ' . $item->Name .\n ' isn\\'t available in stock, only ' . $inStock . ' units are in Stock, please update your cart to proceed',\n ], 400);\n } */\n }\n\n /**\n * Credit Card information should be sent to a payment gateway for processing and validation,\n * the response should be dealt with here, but since this is a dummy project we'll\n * just assume that the information is sent and the payment process was done succefully,\n */\n\n $PaymentGatewayResponse = true;\n $transactionID = md5( uniqid( rand(), true ) );\n\n if ( $PaymentGatewayResponse ) {\n $order = Order::create( [\n 'products' => json_encode( new CartItemCollection( $items ) ),\n 'order_type'=>$cart->cart_type,\n 'totalPrice' => $TotalPrice,\n 'name' => $name,\n 'address' => $adress,\n 'userID' => isset( $userID ) ? $userID : null,\n 'transactionID' => $transactionID,\n ] );\n\n $cart->delete();\n\n return response()->json( [\n 'message' => 'you\\'re order has been completed succefully, thanks for shopping with us!',\n 'orderID' => $order->getKey(),\n ], 200);\n }\n } else {\n return response()->json([\n 'message' => 'The CarKey you provided does not match the Cart Key for this Cart.',\n ], 400 );\n }\n\n }", "public function review() {\n\t\t$this->layout = 'iframe';\n\t\t$this->Order->contain(array('OrderItem' => array('Artwork'), 'Client'));\n\t\t//debug($this->Session->read('Cart'), true, true);\n\t\t$items = array();\n\n\t\tif($this->request->is('get')){\n\t\t\t$cart = $this->_checkCartForOrder();\n\t\t\t//debug($cart, true, true);\n\t\t\tif(!$cart['has_order']){ // If there's no order number saved in the session, create one in db.\n\t\t\t\t//echo \"NO order present\";\n\t\t\t\t$order = $this->_createNewCartOrder();\n\t\t\t\t//debug($order, true, true);\n\t\t\t\tif($this->_getCartItems()){ //If there are items in the cart, add to db, setup form and render.\n\t\t\t\t\t$items = $this->_createOrderItems($this->Session->read('Cart.item'), $order['Order']['order_id']);\n\t\t\t\t\t//debug($items, true, true);\n\t\t\t\t\t$this->_setupOrderForm($order, $items);\n\t\t\t\t\t$this->render();\n\t\t\t\t} else { // If there's an order with no items, show empty cart.\n\t\t\t\t\t$this->set('cart_empty', true);\n\t\t\t\t\t$this->render();\n\t\t\t\t}\n\t\t\t} elseif ($cart['has_order'] && !$cart['has_items']){ //If there's an order number but no items, check db for existing order.\n\t\t\t\t//echo \"Order and NO items present.\";\n\t\t\t\t$order = $this->Order->find('first', array('conditions' => array('Order.order_id' => $this->Session->read('Cart.order'))));\n\t\t\t\t////debug($order, true, true);\n\t\t\t\tif(!empty($order['OrderItem'])){ //We got items from db, so display form.\n\t\t\t\t\t$this->_setupOrderForm($order, $items);\n\t\t\t\t} else { //Nothing in db, so empty cart.\n\t\t\t\t\t$this->set('cart_empty', true);\n\t\t\t\t\t$this->render();\n\t\t\t\t}\n\t\t\t} elseif ($cart['has_order'] && $cart['has_items']) { //If both are present, make sure items are saved.\n\t\t\t\t$order = $this->Order->find('first', array('conditions' => array('Order.order_id' => $this->Session->read('Cart.order'))));\n\t\t\t\t//echo \"Order and items present.\";\n\t\t\t\t////debug($order, true, true);\n\t\t\t\tif(empty($order['OrderItem'])){\n\t\t\t\t\t$items = $this->_createOrderItems($this->Session->read('Cart.item'), $order['Order']['order_id']);\n\t\t\t\t\t////debug($items, true, true);\n\t\t\t\t}\n\t\t\t\tif($this->_checkCartCount($order)){\n\t\t\t\t\t$items = $this->_addOrderItems($this->Session->read('Cart.item'), $order['Order']['order_id']);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$this->_setupOrderForm($order, $items);\n\t\t\t\t$this->render();\n\t\t\t} else { //If all else fails, show the empty cart.\n\t\t\t\t$this->set('cart_empty', true);\n\t\t\t\t$this->render();\n\t\t\t}\n\t\t}\n\t}", "public function markCartsAdditionalProducts(Order $draftOrder): bool;", "public function store(Request $request)\n {\n $this->validate(request(),[\n 'user_id'=>'required',\n 'product_id'=>'required',\n 'product_price'=>'required',\n 'seller_id'=>'required',\n ]);\n \n $orders = Order::where('user_id', Auth::user()->id)\n ->where('order_status_id', 1)->get();\n if(!count($orders)){\n $seller = User::find($request->seller_id);\n $order = new Order();\n $order->user_id = $request->user_id;\n $order->order_status_id = 1;\n $order->order_number = mt_rand();\n\n if( $order->save() ){\n $order_id = $order->id;\n }\n\n $seller->addCart()->attach($order_id);\n $orderitem = new OrderItem();\n $orderitem->order_id=$order_id;\n $orderitem->product_id = $request->product_id;\n $orderitem->product_price = $request->product_price;\n $orderitem->quantity = 1;\n $orderitem->save();\n return redirect('/buyers');\n }\n else{\n $order = Order::where('user_id', Auth::user()->id)\n ->where('order_status_id', 1)->first();\n $order_id = $order->id;\n\n $orderInCart = OrderUser::where('user_id',$request->seller_id)\n ->where('order_id',$order_id)->get();\n\n if( !count($orderInCart) ) {\n $seller = User::find($request->seller_id);\n $seller->addCart()->attach($order_id);\n }\n \n $orderitem = new OrderItem();\n $orderitem->order_id=$order_id;\n $orderitem->product_id = $request->product_id;\n $orderitem->product_price = $request->product_price;\n $orderitem->quantity = 1;\n $orderitem->save();\n return redirect('/buyers');\n }\n \n return back();\n }", "public function testDeclined(){ \n\n $unBuyableProduct = Product::where('price', '>', 75)\n ->where('quantity','>',10)\n ->first();\n\n //test card 1\n $response = $this->checkoutAction($unBuyableProduct, $this->testVisaPan);\n $response->assertSee(\"Declined\");\n\n\n //test card 2\n $response = $this->checkoutAction($unBuyableProduct, $this->testMasterCardPan);\n $response->assertSee(\"Declined\"); \n \n }", "public function testBuy()\n {\n VCR::insertCassette('orders/buy.yml');\n\n $order = Order::create(Fixture::basicOrder());\n\n $order->buy([\n 'carrier' => Fixture::usps(),\n 'service' => Fixture::uspsService(),\n ]);\n\n $shipmentsArray = $order['shipments'];\n\n foreach ($shipmentsArray as $shipment) {\n $this->assertNotNull($shipment->postage_label);\n }\n }", "function find_deals_in_cart( $cart_id = false ) {\n\t if ($cart_id !== false) foreach ($this->cart_contents as $cart_item_key => $cart_item) if ($cart_item_key == $cart_id) return $cart_item_key;\n\t }", "public function test__it_should_be_block_close_stock_removal_when_has_product_withdrawn()\n {\n $removal = Removal::create();\n\n // enviado\n RemovalProduct::create([\n 'stock_removal_id' => $removal->id,\n 'status' => 2,\n ]);\n\n // retirado\n RemovalProduct::create([\n 'stock_removal_id' => $removal->id,\n 'status' => 0,\n ]);\n\n $this->json('POST', \"/api/estoque/retirada/fechar/{$removal->id}\")\n ->seeStatusCode(400)\n ->seeJson([\n 'status' => 'ValidationFail'\n ]);\n }", "function add_to_purchased_songs($song){\n echo 'Adding song to purchased songs...';\n if ($this->is_purchased($song)){\n echo $song->print_song_info() . 'is already purchased';\n return False;\n }\n array_push($this->purchased_songs, $song);\n echo '</br>' . $song->print_song_info() . 'added to purchases' . '</br>';\n return True;\n }", "function validMeal($meal)\n {\n global $meals; //This is defined in the controller\n return in_array($meal, $meals);\n }", "public function cart(): void\n {\n $userData = $this->getSession()->getCurrentUserData();\n\n if ($userData->getCart() && $userData->getCart()->hasProducts())\n {\n echo $this->render('cart/shoppingCart', $userData->getRenderCartParams());\n }\n }", "public function hasInvoiceItems(): bool\n {\n return ($this->invoices()->count() !== 0) ? true : false;\n }", "function check_deal_id_is_valid($deal_id){\n $count = Db::rowCount(\"deals\",array(\n \"id\" => $deal_id,\n \"active\" => \"y\"\n ),array(\"=\",\"=\"));\n return $count == 1 ? true : false;\n}", "public function can_be_buyed_by(Character $character)\n\t{\n\t\tif ( $this->has_expired() )\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif ( $character->id == $this->seller_id )\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( $this->clan_id > 0 )\n\t\t{\n\t\t\tif ( $character->clan_id != $this->clan_id )\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$coins = $character->get_coins();\n\t\t\n\t\tif ( ! $coins )\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif ( $coins->count < $this->price_copper )\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "public function CartIsEmpty($username){\r\n $check = $this->DB->prepare(\"SELECT * FROM shopping_cart WHERE User_Name = '$username';\");\r\n $check->bindParam('User_Name', $username);\r\n $check->execute();\r\n $check = $check->fetchAll (PDO::FETCH_ASSOC);\r\n if(count($check) == 0){\r\n return True;\r\n } else {\r\n return False;\r\n }\r\n }", "public function isAddingThisProductToCartASuccess($order_id,$product_id,$quantity_of_purchase,$amount_saved_on_purchase,$prevailing_retail_selling_price,$cobuy_member_selling_price,$start_price_validity_period,$end_price_validity_period,$is_escrowed,$is_escrow_accepted){\n \n $model = new OrderHasProducts;\n return $model->isAddingThisProductToCartASuccess($order_id,$product_id,$quantity_of_purchase,$amount_saved_on_purchase,$prevailing_retail_selling_price,$cobuy_member_selling_price,$start_price_validity_period,$end_price_validity_period,$is_escrowed,$is_escrow_accepted);\n }", "function wyz_cart_content_count() {\n\t$nonce = filter_input( INPUT_POST, 'nonce' );\n\n\n\tif ( ! wp_verify_nonce( $nonce, 'wyz_ajax_custom_nonce' ) ) {\n\t\twp_die( 'busted' );\n\t}\n\n\twp_die( WC()->cart->get_cart_contents_count() );\n}", "public function add_to_cart_quote($quote_request_id)\n {\n $this->load->model('bidding_model');\n $quote_request = $this->bidding_model->get_quote_request($quote_request_id);\n\n if (!empty($quote_request)) {\n $product = $this->product_model->get_product_by_id($quote_request->product_id);\n if (!empty($product)) {\n $cart = $this->session_cart_items;\n $item = new stdClass();\n $item->cart_item_id = generate_unique_id();\n $item->product_id = $product->id;\n $item->product_type = $product->product_type;\n $item->product_title = $quote_request->product_title;\n $item->options_array = array();\n $item->quantity = $quote_request->product_quantity;\n $item->unit_price = $quote_request->price_offered / $quote_request->product_quantity;\n $item->total_price = $quote_request->price_offered;\n $item->currency = $quote_request->price_currency;\n $item->product_vat = 0;\n $item->shipping_cost = $quote_request->shipping_cost;\n $item->is_stock_available = 1;\n $item->purchase_type = 'bidding';\n $item->quote_request_id = $quote_request->id;\n array_push($cart, $item);\n\n $this->session->set_userdata('mds_shopping_cart', $cart);\n return true;\n }\n }\n return false;\n }", "public function is_firm_associated_with_deal($deal_id,$deal_partner_firm_id,&$is_associated){\n $q = \"select count(*) as cnt from \".TP.\"transaction_partners where transaction_id='\".$deal_id.\"' and partner_id='\".$deal_partner_firm_id.\"'\";\n $res = mysql_query($q);\n if(!$res){\n return false;\n }\n $row = mysql_fetch_assoc($res);\n if($row['cnt'] == 0){\n //this partner firm was not found for the deal\n $is_associated = false;\n\t\t}else{\n\t\t\t$is_associated = true;\n\t\t}\n\t\treturn true;\n\t}", "public function hasItem(CartItemInterface $item);", "public function isCartEmpty()\n {\n return empty($_SESSION['cart']) ? true : false;\n }", "public function checkAllTicketsAndCarts(){\n date_default_timezone_set(\"Europe/Amsterdam\");\n\n $tickets = Ticket::all();\n $now = date(\"Y-m-d H:i:s\");\n $now = strtotime($now);\n\n foreach($tickets as $key => $ticket) {\n if(isset($ticket->reservation) && $ticket->reservation->status == 'R') {\n $reservationExpiration = strtotime($ticket->reservation->created_at->toDateTimeString() . ' +10 seconds');\n if ($now >= $reservationExpiration ) {\n $reservation = Reservation::where('ticket_id', $ticket->id)->first();\n\n $cartContent = Cart::restoreFromDB($reservation->buyer_id);\n\n if($cartContent) {\n foreach($cartContent as $cartItem) {\n if($cartItem->id == $ticket->id) {\n $cartContent->pull($cartItem->rowId); \n }\n }\n $cartContent = serialize($cartContent);\n\n DB::table('shoppingcart')\n ->where('identifier', $reservation->buyer_id)\n ->update(['content' => $cartContent]);\n }\n }\n }\n }\n }", "public static function remove_specials_from_cart(){\n\n foreach( WC()->cart->get_cart() as $cart_item_key => $cart_item ){\n if ( self::is_item_special( $cart_item['product_id'] ) ){\n WC()->cart->set_quantity( $cart_item_key, 0 );\n $product_title = $cart_item['data']->get_title();\n\n wc_add_notice( sprintf( __( '&quot;%s&quot; has been removed from your cart. It cannot be purchased in conjunction with other products.', 'wc-only-item-in-cart' ), $product_title ), 'error' );\n }\n\n }\n\n }", "function get_deal_ids_from_cart($cart = null)\n\t{\n\t\tif ($cart)\n\t\t{\n\t\t\t$cart_items = $this->cart_item_m->get_many_by('cart_id', $cart->id);\n\t\t\t\n\t\t\tif ($cart_items)\n\t\t\t{\n\t\t\t\t$deal_ids = array();\n\t\t\t\t\n\t\t\t\tforeach ($cart_items as $item)\n\t\t\t\t{\n\t\t\t\t\tif ( ! in_array($item->entry_id, $deal_ids)) $deal_ids[] = (int) $item->entry_id;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn $deal_ids;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn null;\n\t\t\n\t}", "public function taskVerify($id,$quantity,$user=null)\n\t{\n\t\t// price\n\t\t$price = MDealPrice::model()->findByPk($id);\n\t\tif(!$price)\n\t\t\treturn $this->t('Deal not found.');\n\t\t\n\t\t$deal = $price->deal;\n\t\tif(!$deal)\n\t\t\treturn $this->t('Deal not found.');\n\t\t\t\n\t\t// if $user is provided - this is re-verification\n\t\t// we need to proceed even if the deal is not available anymore\n\t\tif(!$user && !wm()->get('deal.helper')->available($deal))\n\t\t\treturn $this->t('You can\\'t order coupons for deal \"{name}\". It is either over or cancelled.',array(\n\t\t\t\t'{name}' => $deal->name\n\t\t\t));\n\t\t\n\t\t$user = $user?$user:(app()->user->isGuest?null:app()->user->model());\n\t\t\t\n\t\tif($user)\n\t\t{\n\t\t\t// get coupons which user has already bought for this deal\n\t\t\t$userCoupons = wm()->get('deal.helper')->userCoupons($deal, $user->id);\n\t\t\t\n\t\t\t// check if current order will break any of deal limits\n\t\t\tif($deal->limitPerUser\n\t\t\t\t&& $deal->limitPerUser < ($userCoupons + $quantity))\n\t\t\t{\n\t\t\t\t$left = $deal->limitPerUser - $userCoupons;\n\t\t\t\tif($left>0)\n\t\t\t\t\treturn $this->t('Sorry, you can order only {num} coupons for this deal.', array(\n\t\t\t\t\t\t'{num}' => $left\n\t\t\t\t\t));\n\t\t\t\telse\n\t\t\t\t\treturn $this->t('Sorry, you can\\'t order anymore coupons for this deal.');\n\t\t\t}\n\t\t}\n\t\t\n\t\tif($deal->stats && $deal->purchaseMax\n\t\t\t&& $deal->purchaseMax < $deal->stats->bought+$quantity)\n\t\t{\n\t\t\t$left = $deal->purchaseMax - $deal->stats->bought;\n\t\t\tif($left>0)\n\t\t\t\treturn $this->t('Sorry, you can order only {num} coupons for this deal.', array(\n\t\t\t\t\t'{num}' => $left\n\t\t\t\t));\n\t\t\telse\n\t\t\t\treturn $this->t('Sorry, you can\\'t order anymore coupons for this deal.');\n\t\t}\n\t\t\n\t\t// all limits are respected - add item to the checkout items stack\n\t\t\n\t\t$status = wm()->get('deal.helper')->dealStatus($deal);\n\n\t\t$checkout = wm()->get('payment.checkout');\n\t\t$checkout->amount+= $deal->price * $quantity;\n\t\t$checkout->items[] = array(\n\t\t\t'name' => $deal->name,\n\t\t\t'quantity' => $quantity,\n\t\t\t'price' => $deal->price\n\t\t);\n\t\t\n\t\t// if the deal is tipped already - charge user immediately, authorize otherwise\n\t\t$checkout->transactionType = $status == 'tipped' ? 'pay' : 'authorize';\n\t\t\n\t\t// push deal's payment options\n\t\tif($deal->paymentOptions)\n\t\t{\n\t\t\t$opts = explode(':',$deal->paymentOptions);\n\t\t\t$checkout->paymentTypes = is_array($checkout->paymentTypes)\n\t\t\t\t? array_intersect($checkout->paymentTypes,$opts)\n\t\t\t\t: $opts;\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "private function validate_cart_excluded_product_ids() {\n\t\t// Exclude Products\n\t\tif ( sizeof( $this->exclude_product_ids ) > 0 ) {\n\t\t\t$valid_for_cart = true;\n\t\t\tif ( ! WC()->cart->is_empty() ) {\n\t\t\t\tforeach( WC()->cart->get_cart() as $cart_item_key => $cart_item ) {\n\t\t\t\t\tif ( in_array( $cart_item['product_id'], $this->exclude_product_ids ) || in_array( $cart_item['variation_id'], $this->exclude_product_ids ) || in_array( $cart_item['data']->get_parent(), $this->exclude_product_ids ) ) {\n\t\t\t\t\t\t$valid_for_cart = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( ! $valid_for_cart ) {\n\t\t\t\tthrow new Exception( self::E_WC_COUPON_EXCLUDED_PRODUCTS );\n\t\t\t}\n\t\t}\n\t}", "protected function checkIfCartIsValid(UserInterface $user, ApiOrderInterface $cart, $locale)\n {\n if (count($cart->getItems()) < 1) {\n throw new OrderException('Empty Cart');\n }\n }", "public static function process_wc_meta_box( $post_id, $post ) {\n\n if ( isset( $_POST['_only_item_in_cart'] ) ) {\n update_post_meta( $post_id, '_only_item_in_cart', 'yes' );\n } else {\n update_post_meta( $post_id, '_only_item_in_cart', 'no' );\n }\n\n }", "function validMeal($meal)\r\n {\r\n return in_array($meal, getMeals());\r\n }", "public function forceCheckoutOnContribute(){\n\t\tif(!$this->canContribute()){\n\t\t\t$_SESSION['flashMessage'] = \"Sorry, you will need complete this purchase before you can send another gift.\";\n\t\t\tview::Redirect('cart', 'index');\n\t\t}\n\t}", "public function postCartCheckout($request, $response)\n\t{\n\t\t// and calculate totals\n\t\t// otherwise show error message in cart page\n\n\t\t// get the data from session\n\t\t$cart = $this->session->get('cart');\n\t\t$user = $this->session->getUser();\n\n\t\t// check that cart is not empty\n\t\tif(empty($cart))\n\t\t{\n\t\t\t$this->flash->addMessage('warning', 'Cart is empty. order not submitted.');\n\t\t\treturn $response->withRedirect($this->router->pathFor('me.cart'));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// calculate totals\n\t\t\t$subtotals = [];\n\t\t\t$grandtotal = 0;\n\t\t\tforeach($cart as $item)\n\t\t\t{\n\t\t\t\t// check the domain option is entered\n\t\t\t\tif($item['type'] == 'domain' && empty(trim($item['options'])))\n\t\t\t\t{\n\t\t\t\t\t$this->flash->addMessage('danger', 'Please ensure all domain names are specified for domain registration, and then Update the cart.');\n\t\t\t\t\treturn $response->withRedirect($this->router->pathFor('me.cart'));\n\t\t\t\t}\n\n\t\t\t\t// calculate totals\n\t\t\t\t$total = $item['quantity'] * $item['price'];\n\t\t\t\t$subtotals[] = $total;\n\t\t\t\t$grandtotal += $total;\n\t\t\t}\n\n\t\t\t$contacts = Contact::where('user_id', $user->id)->get();\n\n\t\t\treturn $response->setContext(function($request, $response, $data) {\n\t\t\t\t$this->view->render($response, 'checkout.twig', $data);\n\t\t\t}, [\n\t\t\t\t'subtotals' => $subtotals,\n\t\t\t\t'grandtotal' => $grandtotal,\n\t\t\t\t'contacts' => $contacts->toArray()\n\t\t\t]);\n\t\t}\n\t}", "public function isInvoiced() {\n\t\treturn true;\n\t}", "public function applyCartDiscount(Varien_Event_Observer $observer)\n { \n try\n { \n $bundle_product_ids = [];\n $quote_product_ids = [];\n $cookieValue = Mage::getModel('core/cookie')->get('ivid');\n $userBundleCollection = Mage::getModel('increasingly_analytics/bundle')->getCollection()->addFieldToFilter('increasingly_visitor_id',$cookieValue);\n $items = $observer->getEvent()->getQuote()->getAllItems();\n $eligibleProducts = [];\n $discount = 0;\n foreach ($items as $item) {\n array_push($quote_product_ids, $item->getProductId());\n }\n foreach ($userBundleCollection as $bundle) {\n //First Bundle products\n $bundle_product_ids = explode(',', $bundle->getProductIds()); \n $productsIds = array_intersect($quote_product_ids, $bundle_product_ids);\n if(count($productsIds) == count($bundle_product_ids) )\n $discount += $bundle->getDiscountPrice();\n }\n\n if($discount > 0){\n $quote=$observer->getEvent()->getQuote();\n $quoteid=$quote->getId();\n $discountAmount=$discount;\n if($quoteid) { \n if($discountAmount>0) {\n $total=$quote->getBaseSubtotal();\n $quote->setSubtotal(0);\n $quote->setBaseSubtotal(0);\n\n $quote->setSubtotalWithDiscount(0);\n $quote->setBaseSubtotalWithDiscount(0);\n\n $quote->setGrandTotal(0);\n $quote->setBaseGrandTotal(0);\n \n\n $canAddItems = $quote->isVirtual()? ('billing') : ('shipping'); \n foreach ($quote->getAllAddresses() as $address) {\n\n $address->setSubtotal(0);\n $address->setBaseSubtotal(0);\n\n $address->setGrandTotal(0);\n $address->setBaseGrandTotal(0);\n\n $address->collectTotals();\n\n $quote->setSubtotal((float) $quote->getSubtotal() + $address->getSubtotal());\n $quote->setBaseSubtotal((float) $quote->getBaseSubtotal() + $address->getBaseSubtotal());\n\n $quote->setSubtotalWithDiscount(\n (float) $quote->getSubtotalWithDiscount() + $address->getSubtotalWithDiscount()\n );\n $quote->setBaseSubtotalWithDiscount(\n (float) $quote->getBaseSubtotalWithDiscount() + $address->getBaseSubtotalWithDiscount()\n );\n\n $quote->setGrandTotal((float) $quote->getGrandTotal() + $address->getGrandTotal());\n $quote->setBaseGrandTotal((float) $quote->getBaseGrandTotal() + $address->getBaseGrandTotal());\n\n $quote ->save(); \n\n $quote->setGrandTotal($quote->getBaseSubtotal()-$discountAmount)\n ->setBaseGrandTotal($quote->getBaseSubtotal()-$discountAmount)\n ->setSubtotalWithDiscount($quote->getBaseSubtotal()-$discountAmount)\n ->setBaseSubtotalWithDiscount($quote->getBaseSubtotal()-$discountAmount)\n ->save(); \n\n\n if($address->getAddressType()==$canAddItems) {\n //echo $address->setDiscountAmount; exit;\n $address->setSubtotalWithDiscount((float) $address->getSubtotalWithDiscount()-$discountAmount);\n $address->setGrandTotal((float) $address->getGrandTotal()-$discountAmount);\n $address->setBaseSubtotalWithDiscount((float) $address->getBaseSubtotalWithDiscount()-$discountAmount);\n $address->setBaseGrandTotal((float) $address->getBaseGrandTotal()-$discountAmount);\n if($address->getDiscountDescription()){\n $address->setDiscountAmount(-($address->getDiscountAmount()-$discountAmount));\n $address->setDiscountDescription($address->getDiscountDescription().', Custom Discount');\n $address->setBaseDiscountAmount(-($address->getBaseDiscountAmount()-$discountAmount));\n }else {\n $address->setDiscountAmount(-($discountAmount));\n $address->setDiscountDescription('Custom Discount');\n $address->setBaseDiscountAmount(-($discountAmount));\n }\n $address->save();\n }//end: if\n } //end: foreach\n //echo $quote->getGrandTotal();\n\n foreach($quote->getAllItems() as $item){\n //We apply discount amount based on the ratio between the GrandTotal and the RowTotal\n $rat=$item->getPriceInclTax()/$total;\n $ratdisc=$discountAmount*$rat;\n $item->setDiscountAmount(($item->getDiscountAmount()+$ratdisc) * $item->getQty());\n $item->setBaseDiscountAmount(($item->getBaseDiscountAmount()+$ratdisc) * $item->getQty())->save(); \n }\n } \n }\n }\n }\n catch(Exception $e)\n {\n Mage::log(\"Remove from cart tracking - \" . $e->getMessage(), null, 'Increasingly_Analytics.log');\n }\n\n }", "public function testShoppingCartCanBeUpdated()\n {\n $id1 = new UUID();\n $cart1 = new ShoppingCart($id1);\n $cart1->addItem($this->item);\n $this->gateway->insert($id1, $cart1);\n\n // Assert that item is added\n $this->assertEquals(1, count($cart1->getItems()));\n\n // Remove Item and assert\n $cart1->removeItem($this->item);\n $this->assertEquals(0, count($cart1->getItems()));\n\n // Update Cart Database\n $this->gateway->update($id1, $cart1);\n\n // Assert that the change has affected the cart in the database\n $cart = $this->gateway->findById($id1);\n $this->assertEquals(0, count($cart->getItems()));\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 actionAftercheckout($did)\n {\n $order = Orders::find()->where(\"orders.Delivery_ID = :id and User_Username = :name\",[':id'=>$did,':name'=>Yii::$app->user->identity->username])->joinWith(['address'])->one();\n\n if(empty($order))\n {\n Yii::$app->session->setFlash('danger', Yii::t('cart','Wrong Format Enter'));\n return $this->redirect(['/site/index']);\n }\n \n if($order->Orders_Status == 1)\n {\n return $this->redirect(['/payment/default/process','did'=>$did]);\n }\n else\n {\n\n Yii::$app->session->setFlash('success', Yii::t('cart','Order Success'));\n $requireName = self::detectName($order->Delivery_ID,$order->User_Username);\n\n $orderitem = Orderitem::find()->joinWith('food')->where('Delivery_ID=:id',[':id'=>$did])->orderBy('Order_ID ASC')->all();\n\n return $this->render('aftercheckout', ['did'=>$did, 'order'=>$order,'orderitem'=>$orderitem ,'requireName'=>$requireName]);\n }\n \n }", "public function testAssigningCustomerToNonExistentCart(): void\n {\n $guestQuoteMaskedId = \"non_existent_masked_id\";\n $this->expectException(\\Exception::class);\n $this->expectExceptionMessage(\"Could not find a cart with ID \\\"{$guestQuoteMaskedId}\\\"\");\n\n $this->graphQlMutation(\n $this->getAssignCustomerToGuestCartMutation($guestQuoteMaskedId),\n [],\n '',\n $this->getHeaderMap()\n );\n }", "public function hasItems () {\n\n $order = $this->getOrder();\n\n if ( !$order ) {\n return false;\n }\n\n return $order->hasItems();\n }", "function my_check_cost_of_bookings() {\n if ( is_cart() || is_checkout() ) {\n $bookable_total = $bookable_minimum = 0;\n foreach ( WC()->cart->get_cart() as $cart_item_key => $cart_item ) {\n if ( isset( $cart_item['booking'] ) ) {//the cart contains a bookable product\n $quantity = $cart_item['quantity'];\n $_product = apply_filters( 'woocommerce_cart_item_product', $cart_item['data'], $cart_item, $cart_item_key );\n $bookable_minimum = 20;\n $price = $_product->get_price();\n $taxable = $_product->is_taxable();\n if ( $taxable ) {\n if ( WC()->cart->tax_display_cart == 'excl' ) {\n $product_subtotal = $_product->get_price_excluding_tax( $quantity );\n } else {\n $product_subtotal = $_product->get_price_including_tax( $quantity );\n }\n // Non-taxable\n } else {\n $product_subtotal = $price * $quantity;\n }\n $bookable_total += $product_subtotal;\n if ( $bookable_total >= $bookable_minimum ) {\n return;\n }\n }\n }\n if ( $bookable_total > $bookable_minimum ) {\n wc_add_notice( sprintf( '<strong>A Minimum of %s %s is required before checking out.</strong>' . '<br />Current cart\\'s total: %s %s', $bookable_minimum, get_option( 'woocommerce_currency'), $bookable_total,get_option( 'woocommerce_currency') ), 'error' );\n }\n }\n}", "function pre_confirmation_check() {\n global $cartID;\n global $cart;\n \n if (empty($cart->cartID)) {\n $cartID = $cart->cartID = $cart->generate_cart_id();\n }\n \n if (! tep_session_is_registered('cartID')) {\n tep_session_register('cartID');\n }\n }" ]
[ "0.5724019", "0.56867766", "0.5617687", "0.5592178", "0.55857885", "0.53485966", "0.5319544", "0.53194904", "0.5308252", "0.5212544", "0.51938987", "0.5121895", "0.5091952", "0.5048193", "0.5046037", "0.5021176", "0.5005272", "0.4992454", "0.49872866", "0.49625215", "0.49554121", "0.49460617", "0.4945084", "0.49373484", "0.48701638", "0.4852172", "0.48103714", "0.47966915", "0.47912577", "0.4775891", "0.47548565", "0.47538155", "0.47511935", "0.4746397", "0.4724944", "0.4720083", "0.47149202", "0.47090656", "0.47073856", "0.47040367", "0.4694603", "0.46902826", "0.468773", "0.46797046", "0.4673798", "0.46682253", "0.46641043", "0.46485877", "0.46422422", "0.46418977", "0.46413687", "0.4634643", "0.4634101", "0.46318227", "0.46103713", "0.46080285", "0.46042925", "0.4603986", "0.4599473", "0.4599444", "0.45992577", "0.45988485", "0.4587885", "0.45840833", "0.45810536", "0.45765355", "0.4566909", "0.45608923", "0.4560609", "0.45536137", "0.4552405", "0.45455134", "0.45358396", "0.45343196", "0.45333034", "0.45221934", "0.45221916", "0.4500672", "0.45001408", "0.44929427", "0.44917643", "0.4487129", "0.4483292", "0.44822794", "0.4481035", "0.4478426", "0.44759813", "0.44728762", "0.44723076", "0.44672528", "0.44604936", "0.44598228", "0.44585523", "0.44561553", "0.4453912", "0.44501486", "0.44475454", "0.44471776", "0.44463015", "0.4443344" ]
0.5968807
0
Redirects the buyer back to the cart page.
protected function redirectToCart($errorCode = null, $errorMessage = null) { $url = Mage::getUrl('checkout/cart'); $this->_doRedirectWithError($url, $errorCode, $errorMessage); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _redirectToCart()\n {\n $this->_redirect(\"checkout/cart\");\n }", "public function redirectAction()\n {\n $session = Mage::getSingleton('checkout/session');\n $session->setAlipayPaymentQuoteId($session->getQuoteId());\n\n $order = $this->getOrder();\n\n if (!$order->getId()) {\n $this->norouteAction();\n return;\n }\n\n $order->addStatusToHistory(\n $order->getStatus(),\n Mage::helper('alipay')->__('客户跳转到支付宝网站')\n );\n $order->save();\n\n $this->getResponse()\n ->setBody($this->getLayout()\n ->createBlock('alipay/redirect')\n ->setOrder($order)\n ->toHtml());\n\n $session->unsQuoteId();\n }", "protected function _goBack()\n {\n\t $buy_now = $this->getRequest()->getParam('buy_now');\n\n\t $returnUrl = $this->getRequest()->getParam('return_url');\n if ($returnUrl) {\n\n if (!$this->_isUrlInternal($returnUrl)) {\n throw new Mage_Exception('External urls redirect to \"' . $returnUrl . '\" denied!');\n }\n\n $this->_getSession()->getMessages(true);\n\t $this->getResponse()->setRedirect($returnUrl);\n\n } elseif (!Mage::getStoreConfig('checkout/cart/redirect_to_cart')\n && !$this->getRequest()->getParam('in_cart')\n && $backUrl = $this->_getRefererUrl()\n ) {\n $referralUrl=Mage::getSingleton('core/session')->getCustomRefererUrl();\n if(!empty($referralUrl)){\n $backUrl = Mage::getSingleton('core/session')->getCustomRefererUrl();\n Mage::getSingleton('core/session')->unsCustomRefererUrl();\n }\n //$this->getResponse()->setRedirect($backUrl);\n\t if (!empty($buy_now)) {\n\t\t $this->_redirect('onestepcheckout'); // If you are using onepagecheckout or use this $this->_redirect('checkout/onepage/')\n\t }else{\n\t\t $this->getResponse()->setRedirect($backUrl);\n\t }\n } else {\n if ((strtolower($this->getRequest()->getActionName()) == 'add') && !$this->getRequest()->getParam('in_cart')) {\n $this->_getSession()->setContinueShoppingUrl($this->_getRefererUrl());\n }\n $this->_redirect('checkout/cart');\n }\n return $this;\n }", "private function _redirect()\n\t{\n\n\t\t$this->_urlPagSeguro = $this->request->post['url_ps'];\n\n\t\tif (!empty($this->_urlPagSeguro )) {\n\t\t\theader('Location: ' . $this->_urlPagSeguro);\n\t\t\t$this->cart->clear();\n\t\t}\n\t}", "public function redirectAction()\n {\n $session = Mage::getSingleton('checkout/session');\n $session->setCriptopayStandardQuoteId($session->getQuoteId());\n\n $order = Mage::getModel('sales/order');\n $order->loadByIncrementId($session->getLastRealOrderId());\n $order->addStatusToHistory(\n $order->getStatus(),\n Mage::helper('criptopay')->__('Customer was redirected to CriptoPay')\n );\n $order->save();\n\n $this->getResponse()\n ->setBody($this->getLayout()\n ->createBlock('criptopay/standard_redirect')\n ->setOrder($order)\n ->toHtml());\n\n $session->unsQuoteId();\n }", "public function redirectAction()\n {\n /** @var $session Mage_Checkout_Model_Session */\n $session = Mage::getSingleton('checkout/session');\n\n /** @var $checkout MultiSafepay_Msp_Model_Checkout */\n $checkout = Mage::getModel(\"msp/checkout\");\n\n // empty cart -> redirect\n if (!$session->getQuote()->hasItems()) {\n $this->getResponse()->setRedirect(Mage::getUrl('checkout/cart'));\n return;\n }\n\n // create new quote\n /** @var $storeQuote Mage_Sales_Model_Quote */\n $storeQuote = Mage::getModel('sales/quote')->setStoreId(Mage::app()->getStore()->getId());\n $storeQuote->setCustomerId(Mage::getModel('customer/session')->getCustomerId());\n $storeQuote->merge($session->getQuote());\n $storeQuote->setItemsCount($session->getQuote()->getItemsCount())->setItemsQty($session->getQuote()->getItemsQty())->setChangedFlag(false);\n $storeQuote->save();\n\n $baseCurrency = $session->getQuote()->getBaseCurrencyCode();\n $currency = Mage::app()->getStore($session->getQuote()->getStoreId())->getBaseCurrency();\n $session->getQuote()->collectTotals()->save();\n\n // replace quote into session\n $oldQuote = $session->getQuote();\n $oldQuote->setIsActive(false)->save();\n $session->replaceQuote($storeQuote);\n Mage::getModel('checkout/cart')->init();\n Mage::getModel('checkout/cart')->save();\n\n // checkout\n $checkoutLink = $checkout->startCheckout();\n\n header(\"Location: \" . $checkoutLink);\n exit();\n }", "public function redirectAction()\n {\n\t\t\n $session = Mage::getSingleton('checkout/session');\n $session->setHdfcStandardQuoteId($session->getQuoteId());\n\t\t$order = $this->getOrder();\n\t\t\n \n if (!$order->getId()) {\n\t\t\n\t\t\t$this->_forward('failurerefresh');\n return;\n }\n\n $order->addStatusToHistory(\n $order->getStatus(),\n Mage::helper('hdfc')->__('Customer was redirected to hdfc')\n );\n $order->save();\n\n $this->getResponse()\n ->setBody($this->getLayout()\n ->createBlock('hdfc/standard_redirect')\n ->setOrder($order)\n ->toHtml());\n\n $session->unsQuoteId();\n }", "public function vpup_redirect_to_cart( $should_redirect ) \n {\n // Check our quantities and redirect if any products are set. \n if( $should_redirect ) {\n $cart_redirect_url = get_site_url() . '/cart';\n echo \"<script>window.location.replace('\" . $cart_redirect_url . \"')</script>\";\n }\n }", "public function gotoCheckOutPage(){\n if(session('cart')){\n $cart = session('cart');\n if(count($cart['items'])>0){\n return $this->redirect('/checkout');\n }\n\n }\n $this->dispatchBrowserEvent('from-backend',['is'=>'toastr','type'=>'info','message'=>'Cart is empty.']);\n }", "function cart_redirect() {\n\t\tglobal $post;\n\t\tif ( $post->post_name == 'cart' ) {\n\t\t\t$longleafurl = get_option('heweb17_longleaf_url');\n\t\t\tif ( $longleafurl && WC()->cart->get_cart_contents_count() == 0 ) {\n\t\t\t\twp_redirect( trailingslashit( $longleafurl ) );\n\t\t\t\texit;\n\t\t\t}\n\t\t}\n\t}", "public function redirectAction() \n\t{\n\t\t$session = Mage::getSingleton('checkout/session');\n $order = Mage::getModel('sales/order');\n $order->loadByIncrementId($session->getLastRealOrderId());\n $order->addStatusToHistory($order->getStatus(), Mage::helper('payza')->__('Customer was redirected to Payza.'));\n $order->save();\n\t\t\n\t\t$this->loadLayout();\n $block = $this->getLayout()->createBlock('Mage_Core_Block_Template','payza',array('template' => 'payza/redirect.phtml'));\n\t\t$this->getLayout()->getBlock('content')->append($block);\n $this->renderLayout();\n\t}", "protected function _redirectToCartOrError()\n {\n if ($this->_getQuote()->getIsActive()) {\n $this->_redirectToCart();\n } else {\n $this->_redirectToError();\n }\n }", "public function redirectAction()\n {\n $model = new KBariotis_NBP_Model_NBP();\n\n $redirectUrl = $model->getRedirectUrl();\n\n if ($redirectUrl)\n $this->_redirectUrl($redirectUrl);\n else\n $this->_redirectUrl(Mage::getUrl('checkout/onepage/failure'));\n }", "public function redirect() {\n\n if (isset($_GET['view'])) {\n $view = \"view=\" . $_GET['view'];\n } else {\n $view = \"view=return\";\n }\n\n $return_url = substr(BASE_URL, 0, -12) . 'index.php?' . $view . '&transactionid=' . $_GET['transactionid'];\n header(\"Location: \" . $return_url);\n }", "public function creditredirectAction()\n {\n $session = Mage::getSingleton('checkout/session');\n $session->setAlipayPaymentCreditId($session->getCreditLastOrderId());\n\n $creditorder = $this->getCreditOrder();\n\n if (!$creditorder->getId()) {\n $this->norouteAction();\n return;\n }\n\n $this->getResponse()\n ->setBody($this->getLayout()\n ->createBlock('alipay/creditredirect')\n ->setCreditOrder($creditorder)\n ->toHtml());\n\n }", "public function redirectAction()\n\t\t{\n\t\t\t// Load /app/code/community/Mage/Idealcheckoutdirectebanking/Model/Idealcheckoutdirectebanking.php\n\t\t\t$oIdealcheckoutdirectebankingModel = Mage::getSingleton('idealcheckoutdirectebanking/idealcheckoutdirectebanking');\n\n\n\t\t\t// Create transaction record and get URL to /idealcheckoutdirectebanking/setup.php\n\t\t\t$sIdealcheckoutdirectebankingUrl = $oIdealcheckoutdirectebankingModel->setupPayment();\n\n\n\t\t\t// redirect\n\t\t\theader('Location: ' . $sIdealcheckoutdirectebankingUrl);\n\t\t\texit();\n\t\t}", "public function successAction()\n {\n $event = Mage::getModel('payanyway/event')\n ->setEventData($this->getRequest()->getParams());\n try {\n $quoteId = $event->successEvent();\n $this->_getCheckout()->setLastSuccessQuoteId($quoteId);\n $this->_redirect('checkout/onepage/success');\n return;\n } catch (Mage_Core_Exception $e) {\n $this->_getCheckout()->addError($e->getMessage());\n } catch(Exception $e) {\n Mage::logException($e);\n }\n $this->_redirect('checkout/cart');\n }", "protected function redirectToCartSummary()\n {\n return $this->redirect($this->generateUrl($this->getCartSummaryRoute()));\n }", "protected function _redirectBack()\n {\n $this->_helper->redirector->gotoUrl($this->_request->getServer('HTTP_REFERER'));\n }", "public function redirectAction()\n {\n $this->getResponse()->setBody($this->getLayout()->createBlock('paymentsensegateway/redirect')->toHtml());\n }", "public function cancelAction()\n {\n $session = Mage::getSingleton('checkout/session');\n $session->setQuoteId($session->getPaypalStandardQuoteId(true));\n\n $this->_redirect('checkout/cart');\n }", "public function return_page_action ()\n\t{\n\t\t$status = $this->get_order_status($_GET['order_id']);\n\n\t\tif ($status == \"paid\")\n\t\t{\n\t\t\t// Cleanup cart and session.\n\t\t\tglobal $cart;\n\t\t\t$cart->reset(TRUE);\n\n\t\t\ttep_session_unregister(\"sendto\");\n\t\t\ttep_session_unregister(\"billto\");\n\t\t\ttep_session_unregister(\"shipping\");\n\t\t\ttep_session_unregister(\"payment\");\n\t\t\ttep_session_unregister(\"comments\");\n\n\t\t\t// Show success page.\n\t\t\theader(\"Location: /checkout_success.php\");\n\t\t}\n\t\telse \n\t\t{\n\t\t\t// Send back to cart.\n\t\t\theader(\"Location: /shopping_cart.php\");\n\t\t}\n\t}", "public function referredAction()\n {\n $this->_logger->debug(__('Calling referredAction'));\n try {\n $this->loadLayout()\n ->_initLayoutMessages('checkout/session')\n ->_initLayoutMessages('catalog/session')\n ->_initLayoutMessages('customer/session');\n $this->renderLayout();\n $this->_logger->info(__('Successful to redirect to referred page.'));\n } catch (\\Exception $e) {\n $this->_logger->error(json_encode($this->getRequest()->getParams()));\n $this->_logger->error($e->getMessage());\n $this->_getCheckoutSession()->addError($this->__('An error occurred during redirecting to referred page.'));\n }\n }", "function redirect_to_checkout( $checkout_url ) {\n global $woocommerce;\n if( ! empty( $_GET['quick_buy'] ) ) {\n $checkout_url = $woocommerce->cart->get_checkout_url();\n }\n return $checkout_url;\n}", "public function redirectBack()\n {\n $httpReferer = $this->referer();\n $previousRoute = \\explode(\"?\", $httpReferer)[0];\n\n $this->redirect($previousRoute);\n }", "public function redirectAction() {\n $session = Mage::getSingleton('chargepayment/session_quote');\n $redirectUrl = $session->getHostedPaymentRedirect();\n\n if (empty($redirectUrl)) {\n $this->norouteAction();\n return $this;\n }\n\n $this->loadLayout();\n $this->renderLayout();\n }", "public function redirectAction()\n {\n $redirectParams = $this->getRequest()->getParams();\n $params = array();\n if (!empty($redirectParams['success'])\n && isset($redirectParams['x_invoice_num'])\n && isset($redirectParams['controller_action_name'])\n ) {\n $params['redirect_parent'] = Mage::helper('authorizenet/admin')->getSuccessOrderUrl($redirectParams);\n $this->_getDirectPostSession()->unsetData('quote_id');\n //cancel old order\n $oldOrder = $this->_getOrderCreateModel()->getSession()->getOrder();\n if ($oldOrder->getId()) {\n /* @var $order Mage_Sales_Model_Order */\n $order = Mage::getModel('sales/order')->loadByIncrementId($redirectParams['x_invoice_num']);\n if ($order->getId()) {\n $oldOrder->cancel()\n ->save();\n $order->save();\n $this->_getOrderCreateModel()->getSession()->unsOrderId();\n }\n }\n //clear sessions\n $this->_getSession()->clear();\n $this->_getDirectPostSession()->removeCheckoutOrderIncrementId($redirectParams['x_invoice_num']);\n Mage::getSingleton('adminhtml/session')->clear();\n Mage::getSingleton('adminhtml/session')->addSuccess($this->__('The order has been created.'));\n }\n\n if (!empty($redirectParams['error_msg'])) {\n $cancelOrder = empty($redirectParams['x_invoice_num']);\n $this->_returnQuote($cancelOrder, $redirectParams['error_msg']);\n }\n\n $block = $this->getLayout()\n ->createBlock('directpost/iframe')\n ->setParams(array_merge($params, $redirectParams));\n $this->getResponse()->setBody($block->toHtml());\n }", "public function abortAction()\n {\n /** @var $session Mage_Checkout_Model_Session */\n $session = Mage::getSingleton('checkout/session');\n $order = Mage::getModel('sales/order');\n\n try {\n /** @var $order Mage_Sales_Model_Order */\n\n $order->loadByIncrementId($session->getLastRealOrderId());\n $order->addStatusHistoryComment('Customer cancelled the payment',false);\n\n if (!$order->getId()) {\n Mage::throwException('No order for processing found');\n }\n if($order->canCancel()) {\n $order->cancel()->save();\n }\n } catch (Exception $e) {\n\n }\n\n $quote = Mage::getSingleton('sales/quote');\n $quote->load($order->getQuoteId());\n $session->setQuoteId($order->getQuoteId());\n $session->getQuote()->setIsActive(1)->save();\n\n // redirect customer to the cart (dirty)\n $redirectUrl = Mage::helper('checkout/cart')->getCartUrl();\n $block = new Mage_Core_Block_Template();\n $block->setTemplate('mcpservice/redirect.phtml');\n $block->assign('url',$redirectUrl);\n $block->assign('media_url',Mage::getBaseUrl() . '/../../media/micropayment/');\n $block->assign('year',date('Y'));\n $block->assign('payment_method',$order->getPayment());\n $block->assign('target','parent');\n\n echo $block->renderView();\n\n }", "public function processPaypal(){\r\n\t// and redirect to thransaction details page\r\n\t}", "public function getContinueShoppingUrl()\n {\n return Mage::getUrl('checkout/cart');\n }", "public function checkAndRedirectUserToFinishUrl(){\n if(isset($_COOKIE['wc_midtrans_last_order_finish_url'])){\n // authorized transacting-user\n wp_redirect($_COOKIE['wc_midtrans_last_order_finish_url']);\n }else{\n // else, unauthorized user, redirect to shop homepage by default.\n wp_redirect( get_permalink( wc_get_page_id( 'shop' ) ) );\n }\n }", "public function yith_wfbt_redirect_after_add_to_cart( $url ){\n\t\t\tif( ! isset( $_REQUEST['yith_wfbt_shortcode'] ) ) {\n\t\t\t\treturn $url;\n\t\t\t}\n\n\t\t\treturn get_option( 'yith_wcwl_redirect_cart' ) == 'yes' ? wc_get_cart_url() : YITH_WCWL()->get_wishlist_url();\n\t\t}", "function localproduct_add_to_cart_redirect() {\n\t\tglobal $woocommerce;\n\t\t$checkout_url = $woocommerce->cart->get_checkout_url();\n\n\t\treturn $checkout_url;\n\t}", "public static function back()\n {\n resolve('session')->set('errors', resolve('bag')->errors);\n\n self::redirect('/' . self::uri());\n }", "public function seller_thanx() {\n\t\tLog::info ( 'Seller has been successfully redirected to Payment Page:' . $this->user_pk, array (\n\t\t\t\t'c' => '1' \n\t\t) );\n\t\tDB::table('users')->where('id',$this->user_pk)->update(['is_business'=>1]);\n\t\treturn view ( 'thankyou.seller_pay' );\n\t}", "protected function success_redirect()\n {\n tep_redirect(tep_href_link(FILENAME_CHECKOUT_SUCCESS, '', 'SSL'));\n }", "private function _signUpPageRequested()\n {\n $this->utility->redirect('signup');\n }", "public function forceCheckoutOnContribute(){\n\t\tif(!$this->canContribute()){\n\t\t\t$_SESSION['flashMessage'] = \"Sorry, you will need complete this purchase before you can send another gift.\";\n\t\t\tview::Redirect('cart', 'index');\n\t\t}\n\t}", "public function checkoutPage()\n {\n $cartSession = session('cart');\n // Check if cart has a product\n if (empty($cartSession) || empty($cartSession[\"products\"])) {\n return redirect()->back()->withErrors(['You need to add a product in your cart!']);\n }\n\n // buildCardData() returns an array with\n // \"products\" => product data from DB\n // \"cartProducts\" => products ids and quantities\n // \"productCost\" => sum of products\n // \"shippingCost\" => cost of shipping methods\n return view('checkout', $this->orderHandler->buildCartData());\n }", "public function decrementCartItem()\n {\n cart()->decrementQuantityAt(request('id'));\n\n return redirect()->route('cart');\n }", "public function goToCart(){\n $cart = Cart::content();\n $this->data['cart'] = $cart;\n return view('Customer.Layouts.cart',$this->data);\n }", "public function index()\n {\n //basically reset the steps\n $this->set_step(0);\n\n if($this->current_user)\n {\n $this->session->set_userdata('user_id', $this->current_user->id);\n $this->set_step(1);\n redirect( NC_ROUTE .'/checkout/billing');\n }\n //else\n redirect( NC_ROUTE . '/checkout/customer');\n }", "public function cancelAction()\n\t{\n\t\t$this->_redirect('checkout/onepage/failure');\n\t}", "public function buyFormOnSuccess($form){\n $session = $this->hlp->sess(\"listing\");\n $listingID = $session->listingDetails->id;\n $session->postageDetails = $form->getValues(TRUE);\n \n $this->redirect(\"Listings:Buy\", $listingID);\n }", "function checkout_redirect_page() {\r\n\t\tglobal $blog_id;\r\n\r\n\t\t/*\r\n\t\tif( !current_user_can('edit_pages') ) {\r\n\t\t\techo \"<p>\" . __('Nice Try...', 'psts') . \"</p>\"; //If accessed properly, this message doesn't appear.\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t*/\r\n\r\n\t echo '<div class=\"wrap\">';\r\n\t echo \"<script type='text/javascript'>window.location='\".$this->checkout_url($blog_id).\"';</script>\";\r\n\t echo '<a href=\"'.$this->checkout_url($blog_id).'\">Go Here</a>';\r\n\t echo '</div>'; //div wrap\r\n\t}", "public function confirmAction()\r\n {\r\n if (empty($this->View()->sUserLoggedIn)) {\r\n return $this->forward('login', 'account', null, array('sTarget'=>'sKUZOOffer', 'sTargetAction'=>'confirm'));\r\n } elseif ($this->basket->sCountBasket() < 1) {\r\n return $this->redirect(array(\r\n 'module' => 'frontend',\r\n 'controller' => 'checkout',\r\n 'action' => 'cart'\r\n ));\r\n }\r\n\r\n $this->View()->sCountry = $this->getSelectedCountry();\r\n $this->View()->sState = $this->getSelectedState();\r\n $this->View()->sPayment = $this->getSelectedPayment();\r\n $this->View()->sUserData[\"payment\"] = $this->View()->sPayment;\r\n\r\n $this->View()->sDispatch = $this->getSelectedDispatch();\r\n $this->View()->sPayments = $this->getPayments();\r\n $this->View()->sDispatches = $this->getDispatches();\r\n\r\n $this->View()->sBasket = $this->getBasket();\r\n\r\n $this->View()->sLaststock = $this->basket->sCheckBasketQuantities();\r\n $this->View()->sShippingcosts = $this->View()->sBasket['sShippingcosts'];\r\n $this->View()->sShippingcostsDifference = $this->View()->sBasket['sShippingcostsDifference'];\r\n $this->View()->sAmount = $this->View()->sBasket['sAmount'];\r\n $this->View()->sAmountWithTax = $this->View()->sBasket['sAmountWithTax'];\r\n $this->View()->sAmountTax = $this->View()->sBasket['sAmountTax'];\r\n $this->View()->sAmountNet = $this->View()->sBasket['AmountNetNumeric'];\r\n\r\n $this->View()->sPremiums = $this->getPremiums();\r\n\r\n $this->View()->sNewsletter = isset($this->session['sNewsletter']) ? $this->session['sNewsletter'] : null;\r\n $this->View()->sComment = isset($this->session['sComment']) ? $this->session['sComment'] : null;\r\n\r\n $this->View()->sShowEsdNote = $this->getEsdNote();\r\n\r\n $this->View()->sDispatchNoOrder = $this->getDispatchNoOrder();\r\n if(!$this->View()->sDispatch)\r\n {\r\n $this->View()->sDispatchNoOrder = true;\r\n }\r\n $this->View()->sRegisterFinished = !empty($this->session['sRegisterFinished']);\r\n\r\n $this->saveTemporaryOrder();\r\n\r\n if ($this->getMinimumCharge()) {\r\n return $this->forward('cart');\r\n }\r\n\r\n if($this->View()->sBasket['sAmount'] < Shopware()->Config()->inquiryvalue)\r\n {\r\n return $this->redirect(array(\r\n 'module' => 'frontend',\r\n 'controller' => 'checkout',\r\n 'action' => 'cart',\r\n 'amountError' => true\r\n ));\r\n }\r\n\r\n if(Shopware()->Plugins()->Backend()->sKUZOOffer()->assertMinimumVersion(\"5.2\")) {\r\n $activeBillingAddressId = $this->session->offsetGet('checkoutBillingAddressId', null);\r\n if(empty($activeBillingAddressId)) {\r\n $activeBillingAddressId = $this->View()->sUserData['additional']['user']['default_billing_address_id'];\r\n }\r\n\r\n $activeShippingAddressId = $this->session->offsetGet('checkoutShippingAddressId', null);\r\n if(empty($activeShippingAddressId)) {\r\n $activeShippingAddressId = $this->View()->sUserData['additional']['user']['default_shipping_address_id'];\r\n }\r\n\r\n $this->View()->assign('activeBillingAddressId', $activeBillingAddressId);\r\n $this->View()->assign('activeShippingAddressId', $activeShippingAddressId);\r\n\r\n $this->View()->assign('invalidBillingAddress', !$this->isValidAddress($activeBillingAddressId));\r\n $this->View()->assign('invalidShippingAddress', !$this->isValidAddress($activeShippingAddressId));\r\n\r\n $billingAddress = Shopware()->Models()->find('Shopware\\Models\\Customer\\Address',$activeBillingAddressId);\r\n $this->get('shopware_account.address_service')->setDefaultBillingAddress($billingAddress);\r\n $shippingAddress = Shopware()->Models()->find('Shopware\\Models\\Customer\\Address',$activeShippingAddressId);\r\n $this->get('shopware_account.address_service')->setDefaultShippingAddress($shippingAddress);\r\n\r\n $userData = $this->View()->sUserData;\r\n $userAddressData = Shopware()->Modules()->Admin()->sGetUserData();\r\n $userData['billingaddress'] = $userAddressData['billingaddress'];\r\n $userData['shippingaddress'] = $userAddressData['shippingaddress'];\r\n $this->View()->sUserData = $userData;\r\n }\r\n\r\n $this->session['sOrderVariables'] = new ArrayObject($this->View()->getAssign(), ArrayObject::ARRAY_AS_PROPS);\r\n $this->View()->sKUZOOffer = true;\r\n $this->View()->sTargetAction = 'confirm';\r\n }", "protected function redirectToCurrentPage() {}", "public function cancelAction() \n {\n if (Mage::getEdition() == Mage::EDITION_ENTERPRISE) {\n $this->helper()->storeCreditSessionUnset();\n $this->helper()->giftCardsSessionUnset();\n }\n\n $this->_redirect('checkout/cart');\n }", "public function testSuccessAction()\n {\n $order = Mage::getModel('sales/order')->loadByIncrementId($this->getRequest()->getParam('order'));\n\n if (!$order->getId()) {\n $this->_redirect('checkout/cart');\n return;\n }\n\n $session = $this->getOnepage()\n ->getCheckout()\n ->setLastOrderId($order->getId())\n ->setLastQuoteId($order->getQuoteId())\n ->setLastSuccessQuoteId($order->getQuoteId());\n\n $this->_forward('success');\n }", "public function returnAction() \n\t\t{\n\t\t\t$oIdealcheckoutdirectebankingModel = Mage::getSingleton('idealcheckoutdirectebanking/idealcheckoutdirectebanking');\n\n\t\t\t$sOrderId = $this->getRequest()->get('order_id');\n\t\t\t$sOrderCode = $this->getRequest()->get('order_code');\n\n\t\t\tif($oIdealcheckoutdirectebankingModel->validatePayment($sOrderId, $sOrderCode))\n\t\t\t{ \n\t\t\t\t$this->_redirect('checkout/onepage/success', array('_secure' => true));\n\t\t\t}\n\t\t\telse \n\t\t\t{\n\t\t\t\t$this->_redirect('checkout/cart');\n\t\t\t} \n\t\t}", "public function index()\n {\n return Redirect( url('member/wishlist') );\n }", "public function checkout()\n\t{\t\n\t\t// Sanitize User Input\n\t\t$input = [];\n\t\tforeach(Input::all() as $key=>$val) {\n\t\t\t$input[$key]= $val;\n\t\t}\n\n\t\t// Instantiate PayPal API \n\t\t$result = App::make('tools\\Billing\\BillingInterface');\n\t\t\n\t\t// Make Request to PayPal API\n\t\t// Passes the transaction ID to pull\n\t\t// the transaction info. from the database\n\t\t// Returns a Pay Key to point to PayPal transaction\n\t\t$result = $result->charge(['hash'=>$input['hash']]);\n\n\t\t// Append the Pay Key to the PayPal End Point\n\t\t$url = 'https://www.paypal.com/cgi-bin/webscr?cmd=_ap-payment&paykey='\n\t\t\t\t.$result['payKey'];\n\n\t\t// Redirect Client to PayPal for Checkout\t\t\n\t\treturn Redirect::to($url);\n\t}", "public function successAction()\n\t{\n\t\t$this->_redirect('checkout/onepage/success', array('_secure'=>true));\n\t}", "public function indexAction()\n {\n if ($this->getPaymentShortName() == 'zwillaweb_payment_bitcoincash') {\n $this->forward('gateway');\n } else {\n $this->redirect(array('controller' => 'checkout'));\n }\n }", "protected function redirect()\n\t{\n\t\theader('Location: /ru/marafon/');\n\t\texit;\n\t}", "protected function doAfterOrderCopyed()\n\t{\n\t\tLocalRedirect($this->arParams[\"PATH_TO_BASKET\"]);\n\t}", "public function execute()\n {\n $params = $this->getRequest()->getParams();\n\n try {\n $product = $this->_initProduct();\n\n /**\n * Check product availability\n */\n if (!$product) {\n $this->messageManager->addError(__(\"This product is not available.\"));\n //redirect to homepage\n return $this->resultRedirectFactory->create()->setPath('');\n }\n\n $this->cart->addProduct($product, $params);\n\n $this->cart->save();\n\n /**\n * @todo remove wishlist observer \\Magento\\Wishlist\\Observer\\AddToCart\n */\n $this->_eventManager->dispatch(\n 'checkout_cart_add_product_complete',\n ['product' => $product, 'request' => $this->getRequest(), 'response' => $this->getResponse()]\n );\n\n if (!$this->cart->getQuote()->getHasError()) {\n $message = __(\n 'You added %1 to your shopping cart.',\n $product->getName()\n );\n $this->messageManager->addSuccessMessage($message);\n }\n\n //redirect to cart\n return $this->resultRedirectFactory->create()->setPath('checkout/cart');\n\n } catch (\\Magento\\Framework\\Exception\\LocalizedException $e) {\n if ($this->_checkoutSession->getUseNotice(true)) {\n $this->messageManager->addNotice(\n $this->_objectManager->get(\\Magento\\Framework\\Escaper::class)->escapeHtml($e->getMessage())\n );\n } else {\n $messages = array_unique(explode(\"\\n\", $e->getMessage()));\n foreach ($messages as $message) {\n $this->messageManager->addError(\n $this->_objectManager->get(\\Magento\\Framework\\Escaper::class)->escapeHtml($message)\n );\n }\n }\n\n //redirect to homepage\n return $this->resultRedirectFactory->create()->setPath('');\n } catch (\\Exception $e) {\n $this->messageManager->addException($e, __('We can\\'t add this item to your shopping cart right now.'));\n $this->_objectManager->get(\\Psr\\Log\\LoggerInterface::class)->critical($e);\n\n //redirect to homepage\n return $this->resultRedirectFactory->create()->setPath('');\n }\n }", "public function redirect_to_referrer()\n\t\t{\n\t\t\tif ( isset($_SERVER['HTTP_REFERER']) )\n\t\t\t\theader(\"Location: \" . $_SERVER[\"HTTP_REFERER\"]);\n\t\t\telse\n\t\t\t\theader(\"Location: \" . root_url('', true));\n\t\t}", "public function redirectAction() {\n \n $this->getResponse()->setBody($this->getLayout()->createBlock('CardstreamHosted/standard_redirect')->toHtml());\n \n }", "public function cartAction()\n {\n if (!$this->_validateFormKey()) {\n return $this->_redirect('*/*');\n }\n $itemId = (int) $this->getRequest()->getParam('item');\n\n /* @var $item Mage_Wishlist_Model_Item */\n $item = Mage::getModel('wishlist/item')->load($itemId);\n if (!$item->getId()) {\n return $this->_redirect('*/*');\n }\n $wishlist = $this->_getWishlist($item->getWishlistId());\n if (!$wishlist) {\n return $this->_redirect('*/*');\n }\n\n // Set qty\n $qty = $this->getRequest()->getParam('qty');\n if (is_array($qty)) {\n if (isset($qty[$itemId])) {\n $qty = $qty[$itemId];\n } else {\n $qty = 1;\n }\n }\n $qty = $this->_processLocalizedQty($qty);\n if ($qty) {\n $item->setQty($qty);\n }\n\n /* @var $session Mage_Wishlist_Model_Session */\n $session = Mage::getSingleton('wishlist/session');\n $cart = Mage::getSingleton('checkout/cart');\n\n $redirectUrl = Mage::getUrl('*/*');\n\n try {\n $options = Mage::getModel('wishlist/item_option')->getCollection()\n ->addItemFilter(array($itemId));\n $item->setOptions($options->getOptionsByItem($itemId));\n \n $itemBuyRequest = $item->getBuyRequest();\n $childProduct = null;\n if($itemBuyRequest['super_attribute']) {\n $childProduct = $item->getProduct()->getTypeInstance(true)->getProductByAttributes($itemBuyRequest['super_attribute'], $item->getProduct());\n $childProduct = Mage::getModel('catalog/product')->load($childProduct->getId());\n\n $itemBuyRequest->setData('product', $childProduct->getId());\n } \n\n $buyRequest = Mage::helper('catalog/product')->addParamsToBuyRequest(\n $this->getRequest()->getParams(),\n array('current_config' => $itemBuyRequest)\n );\n \n // Overwrite stored product with loaded simple configurable because it holds stock info\n if($childProduct) {\n $buyRequest->setData('product', $childProduct->getId()); \n $item->setProduct($childProduct); \n }\n $item->mergeBuyRequest($buyRequest);\n \n if ($item->addToCart($cart, true)) {\n $cart->save()->getQuote()->collectTotals();\n }\n\n $wishlist->save();\n Mage::helper('wishlist')->calculate();\n\n if (Mage::helper('checkout/cart')->getShouldRedirectToCart()) {\n $redirectUrl = Mage::helper('checkout/cart')->getCartUrl();\n }\n Mage::helper('wishlist')->calculate();\n\n $product = Mage::getModel('catalog/product')\n ->setStoreId(Mage::app()->getStore()->getId())\n ->load($item->getProductId());\n $productName = Mage::helper('core')->escapeHtml($product->getName());\n $message = $this->__('%s was added to your shopping cart.', $productName);\n Mage::getSingleton('catalog/session')->addSuccess($message);\n } catch (Mage_Core_Exception $e) {\n if ($e->getCode() == Mage_Wishlist_Model_Item::EXCEPTION_CODE_NOT_SALABLE) {\n $session->addError($this->__('This product(s) is currently out of stock'));\n } else if ($e->getCode() == Mage_Wishlist_Model_Item::EXCEPTION_CODE_HAS_REQUIRED_OPTIONS) {\n Mage::getSingleton('catalog/session')->addNotice($e->getMessage());\n $redirectUrl = Mage::getUrl('*/*/configure/', array('id' => $item->getId()));\n } else {\n Mage::getSingleton('catalog/session')->addNotice($e->getMessage());\n $redirectUrl = Mage::getUrl('*/*/configure/', array('id' => $item->getId()));\n }\n } catch (Exception $e) {\n Mage::logException($e);\n $session->addException($e, $this->__('Cannot add item to shopping cart'));\n }\n\n Mage::helper('wishlist')->calculate();\n\n return $this->_redirectUrl($redirectUrl);\n }", "public function indexAction() {\r\n if($this->Request()->getParam('controller', false)==\"sKUZOOffer\") {\r\n return $this->forward('offers');\r\n }\r\n\r\n if ($this->basket->sCountBasket()<1 || empty($this->View()->sUserLoggedIn)) {\r\n $this->forward('cart');\r\n } else {\r\n $this->forward('confirm');\r\n }\r\n }", "public function back_to_cart_button_on_checkout() {\n\t\t\tif ( is_checkout() && ! is_wc_endpoint_url( 'order-received' ) && astra_get_option( 'checkout-back-to-cart-button' ) ) {\n\n\t\t\t\t$back_to_cart_text = astra_get_option( 'checkout-back-to-cart-button-text' );\n\n\t\t\t\tob_start();\n\t\t\t\t?>\n\t\t\t\t\t<div class=\"ast-back-to-cart\">\n\t\t\t\t\t\t<a href=\"<?php echo esc_url( wc_get_cart_url() ); ?>\" ><?php echo esc_html( $back_to_cart_text ); ?></a>\n\t\t\t\t\t</div>\n\t\t\t\t<?php\n\t\t\t\techo wp_kses_post( ob_get_clean() );\n\t\t\t}\n\t\t}", "public function redirect();", "public function redirect();", "public function redirect();", "protected function _redirectToError()\n {\n $this->_redirect(self::ZIPMONEY_ERROR_ROUTE);\n }", "function checkOut ( ) {\r\n\r\n\t\t// make sure the cart stays locked\r\n\t\t$this->lockCart(true);\r\n\r\n\t\t$this->glmsg .= '<checkout-shopping-cart xmlns=\"http://checkout.google.com/schema/2\">';\r\n\t\t$this->addProductsToMessage();\r\n\r\n\t\t$this->glmsg .= '<checkout-flow-support>';\r\n\t\t$this->glmsg .= '<merchant-checkout-flow-support>';\r\n\t\t$this->glmsg .= '<edit-cart-url>' . htmlspecialchars( $this->getFullUrl( 'cart.php', false, true ), ENT_NOQUOTES) . '</edit-cart-url>';\r\n\t\t$this->addShippingToMessage();\r\n\t\t$this->addTaxRates();\r\n\t\t$this->glmsg .= '</merchant-checkout-flow-support>';\r\n\t\t$this->glmsg .= '</checkout-flow-support>';\r\n\r\n\t\t$this->glmsg .= '</checkout-shopping-cart>';\r\n\r\n\t\t// contact Google\r\n\t\t$this->htmlapi_call();\r\n\t\t#print_r($this->resArray);\r\n\r\n\t\tif( $this->resArray['ACK'] != 'redirect' ) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\theader(\"Location: \" . $this->resArray['URL']);\r\n\r\n\t\treturn true;\r\n\t}", "public function cancel()\n\t{\n\t\t$option = JRequest::getVar('option');\n\t\t$Itemid = JRequest::getVar('Itemid');\n\n\t\t$link = JRoute::_('index.php?option=' . $option . '&view=cart&Itemid=' . $Itemid, false); ?>\n\t\t<script language=\"javascript\">\n\t\t\twindow.parent.location.href = \"<?php echo $link ?>\";\n\t\t</script>\n\t\t<?php exit;\n\t}", "public function kaufen(){\n\t\t\t$shopping_cart = array(\n\t\t\t'id' => $_POST['id'],\n\t\t\t'product_name' => $_POST['product_name'],\n\t\t\t'price' => $_POST['price']\n\t\t\t);\n\n\t\t//put the product information into the session\n\t\t\t$this->session->set_userdata($shopping_cart);\n\n\t\t//load the page where you buy your products via Stripe\n\t\tredirect(base_url('buy'));\n\t}", "function redirect()\n {\n global $wgOut;\n $wgOut->redirect( $this->getRedirectLink(), 302);\n }", "abstract protected function redirectTo();", "public function kick_pro_suc(){\n\n\t\tif (empty($_GET['order_success'])) {\n\n\t\t\t$this->redirect_to('index.php');\n\t\t}\n\t}", "function orderup()\n\t{\n\t\tJRequest::checkToken() or jexit( 'Invalid Token' );\n\n\t\t$model = $this->getModel('weblink');\n\t\t$model->move(-1);\n\n\t\t$this->setRedirect( 'index.php?option=com_weblinks');\n\t}", "public function goBack($record)\n {\n $this->setRejectInfo($record);\n $this->_handleRedirect();\n }", "public function index(){\n\n //Fetch cookie\n $basket = $this->input->cookie('basket');\n\n if( !empty($basket) ){\n echo '<a class=\"btn-navbar\" href=\"'. site_url('cart/view') .'\" id=\"shopCartLink\"><i class=\"fa fa-shopping-basket\"></i></a>';\n }\n\n }", "abstract protected function redirect();", "public function vpup_set_cart() \n {\n // Used to decide if we need to redirect to the cart. \n $should_redirect = false;\n\n // TODO: Refactor this to be dynamic. \n // Check our Product Quantity then add a cart item, if we have any items. \n if( $_GET[ 'vetCertQuantity' ] > 0 ) {\n WC()->cart->add_to_cart( 147, $_GET[ 'vetCertQuantity'] );\n $should_redirect = true;\n }\n\n // Check our Product Quantity then add a cart item, if we have any items. \n if( $_GET[ 'vetCertAvianQuantity' ] > 0 ) {\n WC()->cart->add_to_cart( 149, $_GET[ 'vetCertAvianQuantity'] );\n $should_redirect = true;\n }\n\n // Check our Product Quantity then add a cart item, if we have any items. \n if( $_GET[ 'groomerQuantity' ] > 0 ) {\n WC()->cart->add_to_cart( 150, $_GET[ 'groomerQuantity'] );\n $should_redirect = true;\n }\n\n // Check our Product Quantity then add a cart item, if we have any items. \n if( $_GET[ 'trainerQuantity' ] > 0 ) {\n WC()->cart->add_to_cart( 151, $_GET[ 'trainerQuantity'] );\n $should_redirect = true;\n }\n\n // Return our cart redirect value\n return $should_redirect;\n }", "public function execute()\n {\n // Return to the cart\n try {\n // Get the session id\n $sessionId = $this->getRequest()->getParam('cko-session-id', null);\n if ($sessionId) {\n // Get the store code\n $storeCode = $this->storeManager->getStore()->getCode();\n\n // Initialize the API handler\n $api = $this->apiHandler->init($storeCode);\n\n // Get the payment details\n $response = $api->getPaymentDetails($sessionId);\n \n // Check for zero dollar auth\n if ($response->status !== \"Card Verified\") {\n // Set the method ID\n $this->methodId = $response->metadata['methodId'];\n\n // Find the order from increment id\n $order = $this->orderHandler->getOrder([\n 'increment_id' => $response->reference\n ]);\n\n // Process the order\n if ($this->orderHandler->isOrder($order)) {\n // Logging\n $this->logger->display($response);\n\n // Process the response\n if ($api->isValidResponse($response)) {\n if (isset($response->metadata['successUrl']) &&\n !str_contains($response->metadata['successUrl'], 'checkout_com/payment/verify'))\n {\n return $this->_redirect($response->metadata['successUrl']);\n } else {\n return $this->_redirect('checkout/onepage/success', ['_secure' => true]);\n }\n } else {\n // Restore the quote\n $this->session->restoreQuote();\n\n // Add and error message\n $this->messageManager->addErrorMessage(\n __('The transaction could not be processed or has been cancelled.')\n );\n }\n } else {\n // Add and error message\n $this->messageManager->addErrorMessage(\n __('Invalid request. No order found.')\n );\n }\n } else {\n // Save the card\n $this->saveCard($response);\n\n // Redirect to the account\n return $this->_redirect('vault/cards/listaction', ['_secure' => true]);\n }\n } else {\n // Add and error message\n $this->messageManager->addErrorMessage(\n __('Invalid request. No session ID found.')\n );\n }\n } catch (\\Checkout\\Library\\Exceptions\\CheckoutHttpException $e) {\n $this->messageManager->addErrorMessage(\n __($e->getBody())\n );\n return $this->_redirect('checkout/cart', ['_secure' => true]);\n }\n\n return $this->_redirect('checkout/cart', ['_secure' => true]);\n }", "private function redirectToSpotifyAuthorizeUrl()\n {\n header(\"Location: {$this->session->getAuthorizeUrl($this->options)}\");\n die();\n }", "public function clearcartAction()\n {\n $request = $this->getRequest();\n $session = $request->getSession();\n $session->remove('carrito'); \n \n return $this->redirect($request->headers->get('referer')); //Envia a la pagina anterior segun la URL!!!\n //return $this->forward('PafpfcBundle:Producto:listatodos'); \n // Esto ejecuta el controlador y muestra listatodos pero no cambia la url... lo cual genera problemas. \n }", "private function merchantPageCancel()\n {\n $cart = $this->context->cart;\n\n $customer = new Customer($cart->id_customer);\n\n if (!Validate::isLoadedObject($customer) || !isset($this->module->currentOrder)) {\n $error_message = $this->module->l('You have cancelled the payment, please try again.');\n\n $id_order = $this->module->currentOrder;\n if (! $id_order || null == $id_order || empty($id_order)) {\n $id_order = Context::getContext()->cookie->__get('aps_apple_order_id');\n $this->aps_payment->refillCart($id_order);\n $this->aps_helper->log('refill cart and merchantPageCancel called');\n }\n Context::getContext()->cookie->apsErrors = $error_message;\n Tools::redirect('index.php?controller=order&step=1');\n }\n $this->aps_payment->merchantPageCancel();\n $objOrder = new Order($this->module->currentOrder);\n if ($objOrder) {\n $this->aps_payment->refillCart($objOrder->id);\n $error_message = $this->module->l('You have cancelled the payment, please try again.');\n Context::getContext()->cookie->apsErrors = $error_message;\n $this->aps_helper->log('merchantPageCancel called');\n\n Tools::redirect('index.php?controller=order&step=1');\n } else {\n $error_message = $this->module->l('You have cancelled the payment, please try again.');\n Context::getContext()->cookie->__set('aps_error_msg', $error_message);\n Tools::redirect(\n 'index.php?fc=module&module=amazonpaymentservices&controller=error&action=displayError'\n );\n }\n }", "public function postProcess()\n {\n /*\n * Oops, an error occured.\n */\n if (Tools::getValue('action') == 'error') {\n return $this->displayError('An error occurred while trying to redirect the customer');\n } else {\n $this->context->smarty->assign(array(\n 'cart_id' => Context::getContext()->cart->id,\n 'secure_key' => Context::getContext()->customer->secure_key,\n ));\n\n return $this->setTemplate('redirect.tpl');\n }\n }", "public function goToOrder(int $id)\n {\n $this->redirectRoute('shopper.orders.show', $id);\n }", "function orderdown()\n\t{\n\t\tJRequest::checkToken() or jexit( 'Invalid Token' );\n\n\t\t$model = $this->getModel('weblink');\n\t\t$model->move(1);\n\n\t\t$this->setRedirect( 'index.php?option=com_weblinks');\n\t}", "function glv_login_redirect( $redirect_to, $request, $user ) {\t\tif ( class_exists( 'WooCommerce' ) ) {\n\t\t\tif ( WC()->cart->get_cart_contents_count() != 0 ) {\n\t\t\t\t$redirect_to = get_permalink( get_option( 'woocommerce_myaccount_page_id' ) );\n\n//\t\t\t Do something fun\n\t\t\t}\n\t\t}\n\n\t\treturn $redirect_to;\n\t}", "public function redmasscart()\n\t{\n\t\t$app = JFactory::getApplication();\n\t\t$option = JRequest::getVar('option');\n\t\t$post = JRequest::get('post');\n\t\t$Itemid = JRequest::getVar('Itemid');\n\n\t\tif ($post[\"numbercart\"] == \"\")\n\t\t{\n\t\t\t$msg = JText::_('COM_REDSHOP_PLEASE_ENTER_PRODUCT_NUMBER');\n\t\t\t$rurl = base64_decode($post[\"rurl\"]);\n\t\t\t$app->redirect($rurl, $msg);\n\t\t}\n\n\t\t$model = $this->getModel('cart');\n\t\t$model->redmasscart($post);\n\n\t\t$link = JRoute::_('index.php?option=' . $option . '&view=cart&Itemid=' . $Itemid, false);\n\t\t$this->setRedirect($link);\n\t}", "public function actionBuy($id){\n \n //URL not wanted\n $n = \"/listings/buy\";\n \n //catch corner cases\n if (is_null($this->request->getReferer()) && !is_null($id)){\n $this->redirect(\"Listings:view\", $id);\n }\n \n else if (is_null($this->request->getReferer()) && is_null($id)){\n $this->redirect(\"Dashboard:in\");\n }\n \n else if ($this->URL == $n){\n $this->redirect(\"Dashboard:in\");\n }\n \n else if ($this->URL == $n . \"/\"){\n $this->redirect(\"Dashboard:in\");\n }\n \n else {\n if (!$this->listings->isActive($id)){\n $this->redirect(\"Dashboard:in\");\n }\n } \n }", "function redirect() {\n\t\theader('Location: admin.php');\n\t\texit();\n\t}", "public function index()\n {\n if(Cart::content()->isNotEmpty()){\n return view('order.checkout');\n }else{\n return redirect()->route('acceuil', app()->getLocale());\n }\n \n }", "public function incrementCartItem()\n {\n cart()->incrementQuantityAt(request('id'));\n\n\n return redirect()->route('cart');;\n }", "public function backAction()\n\t{\n\t\t$paylanecreditcard = Mage::getSingleton(\"paylanecreditcard/standard\");\n\n\t\tif (!is_null($this->getHttpVariable('status')))\n\t\t{\n\t\t\t$status = $this->getHttpVariable('status');\n\t\t\tif (self::STATUS_ERROR === $status)\n\t\t\t{\n\t\t\t\tif( !is_null($this->getHttpVariable('error_text')))\n\t\t\t\t{\n\t\t\t\t\t// an error message\n\t\t\t \t$paylanecreditcard->addComment($this->getHttpVariable('error_text'), true);\n\n\t\t\t \t$this->_redirect('checkout/onepage/failure');\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tMage::app()->getFrontController()->getResponse()->setRedirect(Mage::getUrl(\"checkout/onepage/failure\"));\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!is_null($this->getHttpVariable('id_3dsecure_auth')))\n\t\t\t{\n\t\t\t\t$id_secure3d_auth = $this->getHttpVariable('id_3dsecure_auth');\n\n\t\t\t\tif ($id_secure3d_auth == $paylanecreditcard->getIdSecure3dAuth())\n\t\t\t\t{\n\t\t\t\t\t// connect to PayLane Direct System\n\t\t\t\t\t$paylane_client = new PayLaneClient();\n\n\t\t\t\t\t// get login and password from store config\n\t\t\t\t\t$direct_login = Mage::getStoreConfig('payment/paylanecreditcard/direct_login');\n\t\t\t\t\t$direct_password = Mage::getStoreConfig('payment/paylanecreditcard/direct_password');\n\n\t\t\t\t\t$status = $paylane_client->connect($direct_login, $direct_password);\n\t\t\t\t\tif ($status == false)\n\t\t\t\t\t{\n\t\t\t\t\t\t// an error message\n\t\t\t\t \t$paylanecreditcard->addComment(\"Error connecting to the payment gateway... Please try again later.\", false);\n\n\t\t\t\t \tsession_write_close();\n\t\t\t\t \t$this->_redirect('checkout/onepage/failure');\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t$result = $paylane_client->saleBy3DSecureAuthorization($id_secure3d_auth);\n\t\t\t\t\tif ($result == false)\n\t\t\t\t\t{\n\t\t\t\t\t\t// an error message\n\t\t\t\t\t \t$paylanecreditcard->addComment(\"Error processing your payment... Please try again later.\", true);\n\n\t\t\t\t\t \tsession_write_close();\n\t\t\t\t\t \t$this->_redirect('checkout/onepage/failure');\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (isset($result->ERROR))\n\t\t\t\t\t{\n\t\t\t\t\t\t// an error message\n\t\t\t\t\t \t$paylanecreditcard->addComment($result->ERROR->error_description, true);\n\n\t\t\t\t\t \tsession_write_close();\n\t\t\t\t\t \t$this->_redirect('checkout/onepage/failure');\n\t\t\t\t\t \treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (isset($result->OK))\n\t\t\t\t\t{\n\t\t\t\t\t\t$paylanecreditcard->setCurrentOrderPaid();\n\t\t\t\t\t\t$paylanecreditcard->addComment('id_sale=' . $result->OK->id_sale);\n\t\t\t\t\t\t$paylanecreditcard->addTransaction($result->OK->id_sale);\n\n\t\t\t\t\t \tsession_write_close();\n\t\t\t\t\t \t$this->_redirect('checkout/onepage/success');\n\t\t\t\t\t \treturn;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tMage::app()->getFrontController()->getResponse()->setRedirect(Mage::getUrl(\"/\"));\n\t\t\t\t\t\treturn;\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\tMage::app()->getFrontController()->getResponse()->setRedirect(Mage::getUrl(\"/checkout/onepage/failure\"));\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tMage::app()->getFrontController()->getResponse()->setRedirect(Mage::getUrl(\"/\"));\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tMage::app()->getFrontController()->getResponse()->setRedirect(Mage::getUrl(\"/\"));\n\t\t\treturn;\n\t\t}\n\t}", "public function destroy()\n {\n Cart::destroy();\n return redirect()->back()->with('success', 'Your cart is now empty');\n }", "public function mustRedirect();", "public function Redirect ( $cmd )\r\n {\r\n // Redirect to paypal.com here\r\n //global $Env;\r\n\r\n $payPalURL = \"\";\r\n \r\n if ($this->Env == \"sandbox\") \r\n {\r\n $payPalURL = \"https://www.sandbox.paypal.com/webscr?\" . $cmd;\r\n }\r\n else\r\n {\r\n $payPalURL = \"https://www.paypal.com/webscr?\" . $cmd;\r\n }\r\n\r\n header(\"Location: \".$payPalURL);\r\n }", "public function doRedirect() {\n if(is_null($this->redirect)) {\n return;\n }\n\n if(is_string($this->redirect)) {\n $this->setHeader(\"Location: \" . $this->redirect);\n }\n\n if(is_array($this->redirect)) {\n $url = '/?' . http_build_query($this->redirect);\n $this->setHeader(\"Location: \" . $url);\n }\n return;\n }", "public function switchToCart($id)\n {\n $item = Cart::instance('saveForLater')->get($id);\n\n Cart::instance('saveForLater')->remove($id);\n\n $duplicates = Cart::instance('default')->search(function ($cartItem, $rowId) use ($id) {\n return $rowId === $id;\n });\n\n if ($duplicates->isNotEmpty()) {\n return redirect()->route('cart.index')->with('success_message', 'Item is already in your Cart!');\n }\n\n Cart::instance('default')->add($item->id, $item->name, 1, $item->price)\n ->associate('App\\Product');\n\n return redirect()->route('cart.index')->with('success_message', 'Item has been moved to Cart!');\n }", "public function checkout(Request $request){\n $shopping_cart = $request->shopping_cart; \n\n $paypal = new PayPal($shopping_cart);\n //generar el pago \n $payment = $paypal->generate();\n //mandar a paypal para pagar\n return redirect($payment->getApprovalLink());\n }", "public function facebookRedirect ()\n {\n $user = Socialite::driver('facebook')->stateless()->user();\n\n $name_real = $user->name;\n $role = 0;\n\n // register if not existing in DB\n\n $user = User::firstOrCreate([\n 'email' => $user->email\n ], [\n 'name' => $name_real,\n 'password' => Hash::make(Str::random(24)),\n 'role' => 0\n ]);\n\n Auth::login($user, true);\n\n if (\\Cart::getTotal() == 0.0) {\n return redirect('/');\n }\n\n return redirect('/cart');\n }", "public function githubRedirect ()\n {\n $user = Socialite::driver('github')->stateless()->user();\n\n // register if not existing in DB\n\n $user = User::firstOrNew([\n 'email' => $user->email\n ], [\n 'name' => ($user->name = null ? $user->name : $user->nickname ),\n 'password' => Hash::make(Str::random(24)),\n 'role' => 0\n ]);\n\n Auth::login($user, true);\n\n\n if (\\Cart::getTotal() == 0.0) {\n return redirect('/');\n }\n\n return redirect('/cart');\n }", "public function redirect(){\r\n\t}", "public function cancelAction() {\n\n return $this->_redirect('/order_basis/payment');\n }" ]
[ "0.786399", "0.72627443", "0.72194785", "0.7183043", "0.7173328", "0.715228", "0.710139", "0.6942087", "0.6885453", "0.6869131", "0.68352914", "0.68084586", "0.65970856", "0.65542907", "0.6494677", "0.64663947", "0.6435239", "0.6415688", "0.6398064", "0.6381716", "0.6350806", "0.63073134", "0.6298085", "0.6287242", "0.62760025", "0.62455225", "0.6187289", "0.614005", "0.6136484", "0.6135053", "0.6130913", "0.6109181", "0.61081123", "0.60531944", "0.6047371", "0.6036421", "0.6018537", "0.60135007", "0.59918535", "0.59861535", "0.59799427", "0.5979896", "0.59725755", "0.5970069", "0.5952162", "0.5922334", "0.5921569", "0.59141433", "0.5898206", "0.5880081", "0.5878147", "0.5875864", "0.5871715", "0.58714134", "0.5858433", "0.58570343", "0.58486235", "0.58358145", "0.5830832", "0.5829041", "0.58198357", "0.58154684", "0.58032274", "0.58032274", "0.58032274", "0.5801346", "0.57946473", "0.57908416", "0.5789542", "0.5769518", "0.576746", "0.5762636", "0.5762479", "0.57613397", "0.5742691", "0.57421935", "0.57409847", "0.5739495", "0.5731594", "0.5731376", "0.57268715", "0.57204247", "0.57155895", "0.5713305", "0.5706734", "0.5702084", "0.5695249", "0.5694085", "0.56913847", "0.5683434", "0.56823784", "0.5676119", "0.5674883", "0.56714827", "0.5663866", "0.5659651", "0.5659273", "0.5650818", "0.5641032", "0.5639782", "0.5636691" ]
0.0
-1
Redirects the buyer back to the store's homepage. Used when deal is invalid in some way.
protected function redirectToHomepage($errorCode = null) { $url = Mage::getUrl('/'); $this->_doRedirectWithError($url, $errorCode); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function redirectAction()\n\t\t{\n\t\t\t// Load /app/code/community/Mage/Idealcheckoutdirectebanking/Model/Idealcheckoutdirectebanking.php\n\t\t\t$oIdealcheckoutdirectebankingModel = Mage::getSingleton('idealcheckoutdirectebanking/idealcheckoutdirectebanking');\n\n\n\t\t\t// Create transaction record and get URL to /idealcheckoutdirectebanking/setup.php\n\t\t\t$sIdealcheckoutdirectebankingUrl = $oIdealcheckoutdirectebankingModel->setupPayment();\n\n\n\t\t\t// redirect\n\t\t\theader('Location: ' . $sIdealcheckoutdirectebankingUrl);\n\t\t\texit();\n\t\t}", "public function redirectAction()\n {\n\t\t\n $session = Mage::getSingleton('checkout/session');\n $session->setHdfcStandardQuoteId($session->getQuoteId());\n\t\t$order = $this->getOrder();\n\t\t\n \n if (!$order->getId()) {\n\t\t\n\t\t\t$this->_forward('failurerefresh');\n return;\n }\n\n $order->addStatusToHistory(\n $order->getStatus(),\n Mage::helper('hdfc')->__('Customer was redirected to hdfc')\n );\n $order->save();\n\n $this->getResponse()\n ->setBody($this->getLayout()\n ->createBlock('hdfc/standard_redirect')\n ->setOrder($order)\n ->toHtml());\n\n $session->unsQuoteId();\n }", "public function redirectAction()\n {\n $session = Mage::getSingleton('checkout/session');\n $session->setAlipayPaymentQuoteId($session->getQuoteId());\n\n $order = $this->getOrder();\n\n if (!$order->getId()) {\n $this->norouteAction();\n return;\n }\n\n $order->addStatusToHistory(\n $order->getStatus(),\n Mage::helper('alipay')->__('客户跳转到支付宝网站')\n );\n $order->save();\n\n $this->getResponse()\n ->setBody($this->getLayout()\n ->createBlock('alipay/redirect')\n ->setOrder($order)\n ->toHtml());\n\n $session->unsQuoteId();\n }", "public function redirectAction()\n {\n $model = new KBariotis_NBP_Model_NBP();\n\n $redirectUrl = $model->getRedirectUrl();\n\n if ($redirectUrl)\n $this->_redirectUrl($redirectUrl);\n else\n $this->_redirectUrl(Mage::getUrl('checkout/onepage/failure'));\n }", "protected function _goBack()\n {\n\t $buy_now = $this->getRequest()->getParam('buy_now');\n\n\t $returnUrl = $this->getRequest()->getParam('return_url');\n if ($returnUrl) {\n\n if (!$this->_isUrlInternal($returnUrl)) {\n throw new Mage_Exception('External urls redirect to \"' . $returnUrl . '\" denied!');\n }\n\n $this->_getSession()->getMessages(true);\n\t $this->getResponse()->setRedirect($returnUrl);\n\n } elseif (!Mage::getStoreConfig('checkout/cart/redirect_to_cart')\n && !$this->getRequest()->getParam('in_cart')\n && $backUrl = $this->_getRefererUrl()\n ) {\n $referralUrl=Mage::getSingleton('core/session')->getCustomRefererUrl();\n if(!empty($referralUrl)){\n $backUrl = Mage::getSingleton('core/session')->getCustomRefererUrl();\n Mage::getSingleton('core/session')->unsCustomRefererUrl();\n }\n //$this->getResponse()->setRedirect($backUrl);\n\t if (!empty($buy_now)) {\n\t\t $this->_redirect('onestepcheckout'); // If you are using onepagecheckout or use this $this->_redirect('checkout/onepage/')\n\t }else{\n\t\t $this->getResponse()->setRedirect($backUrl);\n\t }\n } else {\n if ((strtolower($this->getRequest()->getActionName()) == 'add') && !$this->getRequest()->getParam('in_cart')) {\n $this->_getSession()->setContinueShoppingUrl($this->_getRefererUrl());\n }\n $this->_redirect('checkout/cart');\n }\n return $this;\n }", "public function redirect() {\n\n if (isset($_GET['view'])) {\n $view = \"view=\" . $_GET['view'];\n } else {\n $view = \"view=return\";\n }\n\n $return_url = substr(BASE_URL, 0, -12) . 'index.php?' . $view . '&transactionid=' . $_GET['transactionid'];\n header(\"Location: \" . $return_url);\n }", "private function _redirect()\n\t{\n\n\t\t$this->_urlPagSeguro = $this->request->post['url_ps'];\n\n\t\tif (!empty($this->_urlPagSeguro )) {\n\t\t\theader('Location: ' . $this->_urlPagSeguro);\n\t\t\t$this->cart->clear();\n\t\t}\n\t}", "protected function _redirectBack()\n {\n $this->_helper->redirector->gotoUrl($this->_request->getServer('HTTP_REFERER'));\n }", "private function _signUpPageRequested()\n {\n $this->utility->redirect('signup');\n }", "public function redirectAction()\n {\n $session = Mage::getSingleton('checkout/session');\n $session->setCriptopayStandardQuoteId($session->getQuoteId());\n\n $order = Mage::getModel('sales/order');\n $order->loadByIncrementId($session->getLastRealOrderId());\n $order->addStatusToHistory(\n $order->getStatus(),\n Mage::helper('criptopay')->__('Customer was redirected to CriptoPay')\n );\n $order->save();\n\n $this->getResponse()\n ->setBody($this->getLayout()\n ->createBlock('criptopay/standard_redirect')\n ->setOrder($order)\n ->toHtml());\n\n $session->unsQuoteId();\n }", "public function redirectAction()\n {\n $this->getResponse()->setBody($this->getLayout()->createBlock('paymentsensegateway/redirect')->toHtml());\n }", "protected function _redirectToError()\n {\n $this->_redirect(self::ZIPMONEY_ERROR_ROUTE);\n }", "public function checkAndRedirectUserToFinishUrl(){\n if(isset($_COOKIE['wc_midtrans_last_order_finish_url'])){\n // authorized transacting-user\n wp_redirect($_COOKIE['wc_midtrans_last_order_finish_url']);\n }else{\n // else, unauthorized user, redirect to shop homepage by default.\n wp_redirect( get_permalink( wc_get_page_id( 'shop' ) ) );\n }\n }", "protected function redirectToProductPage(\n PriceWaiter_NYPWidget_Model_Deal $deal,\n $errorCode = null,\n $errorMessage = null\n )\n {\n $offerItems = $deal->getOfferItems();\n if (count($offerItems) > 0) {\n try\n {\n $url = $offerItems[0]->getMagentoProductUrl();\n return $this->_doRedirectWithError($url, $errorCode, $errorMessage);\n }\n catch (Exception $ex)\n {\n // A malformed deal could result in getMagentoProductUrl() throwing\n Mage::logException($ex);\n }\n }\n\n // Fall back to homepage when something horrible happens\n return $this->redirectToHomepage($errorCode);\n }", "public function indexAction()\n {\n if ($this->getPaymentShortName() == 'zwillaweb_payment_bitcoincash') {\n $this->forward('gateway');\n } else {\n $this->redirect(array('controller' => 'checkout'));\n }\n }", "public function returnAction() \n\t\t{\n\t\t\t$oIdealcheckoutdirectebankingModel = Mage::getSingleton('idealcheckoutdirectebanking/idealcheckoutdirectebanking');\n\n\t\t\t$sOrderId = $this->getRequest()->get('order_id');\n\t\t\t$sOrderCode = $this->getRequest()->get('order_code');\n\n\t\t\tif($oIdealcheckoutdirectebankingModel->validatePayment($sOrderId, $sOrderCode))\n\t\t\t{ \n\t\t\t\t$this->_redirect('checkout/onepage/success', array('_secure' => true));\n\t\t\t}\n\t\t\telse \n\t\t\t{\n\t\t\t\t$this->_redirect('checkout/cart');\n\t\t\t} \n\t\t}", "public function redirect_to_referrer()\n\t\t{\n\t\t\tif ( isset($_SERVER['HTTP_REFERER']) )\n\t\t\t\theader(\"Location: \" . $_SERVER[\"HTTP_REFERER\"]);\n\t\t\telse\n\t\t\t\theader(\"Location: \" . root_url('', true));\n\t\t}", "public function redirectAction() \n\t{\n\t\t$session = Mage::getSingleton('checkout/session');\n $order = Mage::getModel('sales/order');\n $order->loadByIncrementId($session->getLastRealOrderId());\n $order->addStatusToHistory($order->getStatus(), Mage::helper('payza')->__('Customer was redirected to Payza.'));\n $order->save();\n\t\t\n\t\t$this->loadLayout();\n $block = $this->getLayout()->createBlock('Mage_Core_Block_Template','payza',array('template' => 'payza/redirect.phtml'));\n\t\t$this->getLayout()->getBlock('content')->append($block);\n $this->renderLayout();\n\t}", "public function seller_thanx() {\n\t\tLog::info ( 'Seller has been successfully redirected to Payment Page:' . $this->user_pk, array (\n\t\t\t\t'c' => '1' \n\t\t) );\n\t\tDB::table('users')->where('id',$this->user_pk)->update(['is_business'=>1]);\n\t\treturn view ( 'thankyou.seller_pay' );\n\t}", "function checkout_redirect_page() {\r\n\t\tglobal $blog_id;\r\n\r\n\t\t/*\r\n\t\tif( !current_user_can('edit_pages') ) {\r\n\t\t\techo \"<p>\" . __('Nice Try...', 'psts') . \"</p>\"; //If accessed properly, this message doesn't appear.\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t*/\r\n\r\n\t echo '<div class=\"wrap\">';\r\n\t echo \"<script type='text/javascript'>window.location='\".$this->checkout_url($blog_id).\"';</script>\";\r\n\t echo '<a href=\"'.$this->checkout_url($blog_id).'\">Go Here</a>';\r\n\t echo '</div>'; //div wrap\r\n\t}", "public function redirectAction()\n {\n /** @var $session Mage_Checkout_Model_Session */\n $session = Mage::getSingleton('checkout/session');\n\n /** @var $checkout MultiSafepay_Msp_Model_Checkout */\n $checkout = Mage::getModel(\"msp/checkout\");\n\n // empty cart -> redirect\n if (!$session->getQuote()->hasItems()) {\n $this->getResponse()->setRedirect(Mage::getUrl('checkout/cart'));\n return;\n }\n\n // create new quote\n /** @var $storeQuote Mage_Sales_Model_Quote */\n $storeQuote = Mage::getModel('sales/quote')->setStoreId(Mage::app()->getStore()->getId());\n $storeQuote->setCustomerId(Mage::getModel('customer/session')->getCustomerId());\n $storeQuote->merge($session->getQuote());\n $storeQuote->setItemsCount($session->getQuote()->getItemsCount())->setItemsQty($session->getQuote()->getItemsQty())->setChangedFlag(false);\n $storeQuote->save();\n\n $baseCurrency = $session->getQuote()->getBaseCurrencyCode();\n $currency = Mage::app()->getStore($session->getQuote()->getStoreId())->getBaseCurrency();\n $session->getQuote()->collectTotals()->save();\n\n // replace quote into session\n $oldQuote = $session->getQuote();\n $oldQuote->setIsActive(false)->save();\n $session->replaceQuote($storeQuote);\n Mage::getModel('checkout/cart')->init();\n Mage::getModel('checkout/cart')->save();\n\n // checkout\n $checkoutLink = $checkout->startCheckout();\n\n header(\"Location: \" . $checkoutLink);\n exit();\n }", "public function redirectBack()\n {\n $httpReferer = $this->referer();\n $previousRoute = \\explode(\"?\", $httpReferer)[0];\n\n $this->redirect($previousRoute);\n }", "private function redirect(){\n\t\tredirect('browse/office_industrial');//default re-route\n\t}", "public function processPaypal(){\r\n\t// and redirect to thransaction details page\r\n\t}", "abstract protected function redirect();", "public static function back()\n {\n resolve('session')->set('errors', resolve('bag')->errors);\n\n self::redirect('/' . self::uri());\n }", "protected function redirect()\n\t{\n\t\theader('Location: /ru/marafon/');\n\t\texit;\n\t}", "function redirect() {\n\t\theader('Location: admin.php');\n\t\texit();\n\t}", "public function handle_redirects() {\n global $CFG, $SESSION;\n require_once(__DIR__.'/../../signuplib.php');\n\n if(isset($SESSION->cancel) and $SESSION->cancel == 1) {\n $SESSION->cancel = 0;\n redirect($CFG->wwwroot);\n } elseif($this->page_number != convert_progressstring_to_progressnum($this->applicantprogress)) {\n force_signup_flow($this->page_number);\n }\n return true;\n }", "protected function _redirectToCart()\n {\n $this->_redirect(\"checkout/cart\");\n }", "function cart_redirect() {\n\t\tglobal $post;\n\t\tif ( $post->post_name == 'cart' ) {\n\t\t\t$longleafurl = get_option('heweb17_longleaf_url');\n\t\t\tif ( $longleafurl && WC()->cart->get_cart_contents_count() == 0 ) {\n\t\t\t\twp_redirect( trailingslashit( $longleafurl ) );\n\t\t\t\texit;\n\t\t\t}\n\t\t}\n\t}", "public function redirectAction() {\n $session = Mage::getSingleton('chargepayment/session_quote');\n $redirectUrl = $session->getHostedPaymentRedirect();\n\n if (empty($redirectUrl)) {\n $this->norouteAction();\n return $this;\n }\n\n $this->loadLayout();\n $this->renderLayout();\n }", "protected function _returnToReferer() {\n\n return $this->redirect(\n $this->referer(\n array(\n 'action' => 'admin_index'\n )));\n }", "public function storeFailed()\r\n {\r\n return $this->redirect(handles('antares::install/create'));\r\n }", "public function mustRedirect();", "abstract protected function redirectTo();", "public function indexAction() {\n /**\n * check that seller is login or not.\n */\n if (! $this->_getSession ()->isLoggedIn ()) {\n Mage::getSingleton ( 'core/session' )->addError ( $this->__ ( 'You must have a Seller Account to access this page' ) );\n $this->_redirect ( 'marketplace/seller/login' );\n return;\n }\n /**\n * Load and render layout\n */\n $this->loadLayout ();\n $this->renderLayout ();\n }", "public function index()\n {\n return Redirect( url('member/wishlist') );\n }", "function dokan_redirect_if_not_seller( $redirect = '' ) {\n if ( !dokan_is_user_seller( get_current_user_id() ) ) {\n $redirect = empty( $redirect ) ? home_url( '/' ) : $redirect;\n\n wp_redirect( $redirect );\n exit;\n }\n}", "public function referredAction()\n {\n $this->_logger->debug(__('Calling referredAction'));\n try {\n $this->loadLayout()\n ->_initLayoutMessages('checkout/session')\n ->_initLayoutMessages('catalog/session')\n ->_initLayoutMessages('customer/session');\n $this->renderLayout();\n $this->_logger->info(__('Successful to redirect to referred page.'));\n } catch (\\Exception $e) {\n $this->_logger->error(json_encode($this->getRequest()->getParams()));\n $this->_logger->error($e->getMessage());\n $this->_getCheckoutSession()->addError($this->__('An error occurred during redirecting to referred page.'));\n }\n }", "private function _redirect_to_homepage()\n {\n header(\"Location: /\");\n die();\n }", "public function goBackToHome()\n {\n if (Gate::allows('isContractor')) {\n abort(420, 'You Are not Allowed to access this site');\n }\n return view('welcome');\n }", "public function creditredirectAction()\n {\n $session = Mage::getSingleton('checkout/session');\n $session->setAlipayPaymentCreditId($session->getCreditLastOrderId());\n\n $creditorder = $this->getCreditOrder();\n\n if (!$creditorder->getId()) {\n $this->norouteAction();\n return;\n }\n\n $this->getResponse()\n ->setBody($this->getLayout()\n ->createBlock('alipay/creditredirect')\n ->setCreditOrder($creditorder)\n ->toHtml());\n\n }", "protected function redirectToCurrentPage() {}", "protected function expulsaVisitante()\n {\n header( \"Location: \".self::index );\n }", "public static function redirect() {\n\t\tunset( $_GET['action'] );\n\n\t\twp_safe_redirect( admin_url( 'admin.php?page=' . WPFC_QS_Setup::get_template_name() . '-setup' ) );\n\n\t\texit();\n\t}", "public function return_page_action ()\n\t{\n\t\t$status = $this->get_order_status($_GET['order_id']);\n\n\t\tif ($status == \"paid\")\n\t\t{\n\t\t\t// Cleanup cart and session.\n\t\t\tglobal $cart;\n\t\t\t$cart->reset(TRUE);\n\n\t\t\ttep_session_unregister(\"sendto\");\n\t\t\ttep_session_unregister(\"billto\");\n\t\t\ttep_session_unregister(\"shipping\");\n\t\t\ttep_session_unregister(\"payment\");\n\t\t\ttep_session_unregister(\"comments\");\n\n\t\t\t// Show success page.\n\t\t\theader(\"Location: /checkout_success.php\");\n\t\t}\n\t\telse \n\t\t{\n\t\t\t// Send back to cart.\n\t\t\theader(\"Location: /shopping_cart.php\");\n\t\t}\n\t}", "public function index(){\t\r\n\t\tif ($this->checkLogin('A') == ''){\r\n\t\t\tredirect('admin');\r\n\t\t}else {\r\n\t\t\tredirect('admin/seller/display_seller_dashboard');\r\n\t\t}\r\n\t}", "public function goHome()\n {\n $this->redirect(url($this->getHomeUrl()));\n }", "public function gotoCheckOutPage(){\n if(session('cart')){\n $cart = session('cart');\n if(count($cart['items'])>0){\n return $this->redirect('/checkout');\n }\n\n }\n $this->dispatchBrowserEvent('from-backend',['is'=>'toastr','type'=>'info','message'=>'Cart is empty.']);\n }", "public function redirect();", "public function redirect();", "public function redirect();", "public function deliver()\n {\n $GLOBALS['SITE_DB']->query_update('invoices', array('i_state' => 'delivered'), array('id' => get_param_integer('id')), '', 1);\n\n $url = build_url(array('page' => '_SELF', 'type' => 'undelivered'), '_SELF');\n return redirect_screen($this->title, $url, do_lang_tempcode('SUCCESS'));\n }", "public function index()\n {\n //basically reset the steps\n $this->set_step(0);\n\n if($this->current_user)\n {\n $this->session->set_userdata('user_id', $this->current_user->id);\n $this->set_step(1);\n redirect( NC_ROUTE .'/checkout/billing');\n }\n //else\n redirect( NC_ROUTE . '/checkout/customer');\n }", "public function goBack($record)\n {\n $this->setRejectInfo($record);\n $this->_handleRedirect();\n }", "function orderup()\n\t{\n\t\tJRequest::checkToken() or jexit( 'Invalid Token' );\n\n\t\t$model = $this->getModel('weblink');\n\t\t$model->move(-1);\n\n\t\t$this->setRedirect( 'index.php?option=com_weblinks');\n\t}", "public function homeAction()\n {\n return $this->redirect($this->generateUrl('system_tracking_homepage'), 301);\n }", "public function destroy(Deal $deal): RedirectResponse\n {\n if(!auth()->user()->can('deal-delete'))\n session()->flash('error', 'You have no right to delete deal');\n\n $deal->delete();\n return redirect()->back();\n }", "function display()\n\t{\n\t\t$this->setRedirect('index.php?option=com_redirect');\n\t}", "private function redirectAndDie() {\n header('Location: ' . $_SERVER['PHP_SELF']);\n die;\n }", "private function redirectToSpotifyAuthorizeUrl()\n {\n header(\"Location: {$this->session->getAuthorizeUrl($this->options)}\");\n die();\n }", "function RedirectPage($page_name) {\n\t\theader( sprintf('Location: %s', $page_name));\n\t\tdie(\"You don't belong here.\");\n\t}", "protected function goHomePage()\n {\n $this->_redirect($this->homeURL);\n }", "function back() {\n if (!empty($_SERVER['HTTP_REFERER'])) {\n header('location: ' . $_SERVER['HTTP_REFERER']);\n exit;\n }\n}", "function redirect()\n {\n global $wgOut;\n $wgOut->redirect( $this->getRedirectLink(), 302);\n }", "protected function _redirectToCartOrError()\n {\n if ($this->_getQuote()->getIsActive()) {\n $this->_redirectToCart();\n } else {\n $this->_redirectToError();\n }\n }", "function shd_maybe_redirect() {\n\n\tif( ! is_page( 'update' ) ) {\n\t\treturn;\n\t}\n\n\tif( ! class_exists( '\\Stripe\\Stripe' ) ) {\n\t\treturn;\n\t}\n\n\tif( empty( $_GET['customer_id'] ) || empty( $_GET['email'] ) ) {\n\t\twp_redirect( home_url() ); exit; // Get out of here if loading page from anywhere but Baremetrics email\n\t}\n\n\t$email = sanitize_text_field( $_GET['email'] );\n\t$customer_id = sanitize_text_field( $_GET['customer_id'] );\n\n\t/*\n\t * Check if this is an RCP customer\n\t */\n\n\t\\Stripe\\Stripe::setApiKey( RCP_STRIPE_KEY );\n\n\ttry {\n\n\t\t$customer = \\Stripe\\Customer::retrieve( $customer_id );\n\n\t\tif( ! empty( $customer->subscriptions->data ) ) {\n\n\t\t\tforeach( $customer->subscriptions->data as $sub ) {\n\t\t\t\tif( false !== strpos( $sub->plan->name, 'restrict-content-pro' ) ) {\n\t\t\t\t\twp_redirect( 'https://restrictcontentpro.com/account/?sh_action=update#tabs=1' ); exit;\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\twp_redirect( 'https://pippinsplugins.com/account/update-billing-card/?sh_action=update' ); exit;\n\n\n\t} catch ( Exception $e ) {\n\n\n\t\t/*\n\t\t * Not and RCP customer, check if it's an AffiliateWP customer\n\t\t */\n\n\t\t\\Stripe\\Stripe::setApiKey( AFFWP_STRIPE_KEY );\n\n\t\ttry {\n\n\t\t\t$customer = \\Stripe\\Customer::retrieve( $customer_id );\n\t\t\twp_redirect( 'https://affiliatewp.com/account/?sh_action=update#tabs=1' ); exit;\n\n\t\t} catch ( Exception $e ) {\n\n\t\t\t/*\n\t\t\t * Not and RCP or AffWP customer, check if it's an EDD customer\n\t\t\t */\n\n\t\t\t\\Stripe\\Stripe::setApiKey( EDD_STRIPE_KEY );\n\n\t\t\ttry {\n\n\t\t\t\t$customer = \\Stripe\\Customer::retrieve( $customer_id );\n\t\t\t\twp_redirect( 'https://easydigitaldownloads.com/your-account/?sh_action=update#tab-subscriptions' ); exit;\n\n\t\t\t} catch ( Exception $e ) {\n\n\t\t\t\t$message = 'Customer ' . $customer_id . ' was not found. Email address was ' . $email;\n\n\t\t\t\twp_mail( '[email protected]', 'Dunning Email Failed for ' . $email, $message );\n\n\t\t\t\t// Still no customer found, bail\n\t\t\t\twp_redirect( home_url() ); exit;\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n}", "public function successAction()\n {\n $event = Mage::getModel('payanyway/event')\n ->setEventData($this->getRequest()->getParams());\n try {\n $quoteId = $event->successEvent();\n $this->_getCheckout()->setLastSuccessQuoteId($quoteId);\n $this->_redirect('checkout/onepage/success');\n return;\n } catch (Mage_Core_Exception $e) {\n $this->_getCheckout()->addError($e->getMessage());\n } catch(Exception $e) {\n Mage::logException($e);\n }\n $this->_redirect('checkout/cart');\n }", "public function store(DealCreateRequest $request): RedirectResponse\n {\n try {\n $this->deals->create($request->validated());\n } catch (\\Throwable $exception) {\n dd($exception);\n session()->flash('error', $exception->getMessage());\n return redirect()->back();\n }\n\n return redirect()->route('deal.index');\n }", "public function redirect_to_add_booking() {\n $redirect_url = dokan_get_navigation_url( 'booking/my-bookings' );\n\n ?>\n <script type=\"text/javascript\">\n function pageRedirect() {\n window.location.replace(\"<?php echo esc_url( $redirect_url ); ?>\");\n }\n setTimeout(\"pageRedirect()\", 1500);\n </script>\n <?php\n }", "public function redirectAction()\n {\n $redirectParams = $this->getRequest()->getParams();\n $params = array();\n if (!empty($redirectParams['success'])\n && isset($redirectParams['x_invoice_num'])\n && isset($redirectParams['controller_action_name'])\n ) {\n $params['redirect_parent'] = Mage::helper('authorizenet/admin')->getSuccessOrderUrl($redirectParams);\n $this->_getDirectPostSession()->unsetData('quote_id');\n //cancel old order\n $oldOrder = $this->_getOrderCreateModel()->getSession()->getOrder();\n if ($oldOrder->getId()) {\n /* @var $order Mage_Sales_Model_Order */\n $order = Mage::getModel('sales/order')->loadByIncrementId($redirectParams['x_invoice_num']);\n if ($order->getId()) {\n $oldOrder->cancel()\n ->save();\n $order->save();\n $this->_getOrderCreateModel()->getSession()->unsOrderId();\n }\n }\n //clear sessions\n $this->_getSession()->clear();\n $this->_getDirectPostSession()->removeCheckoutOrderIncrementId($redirectParams['x_invoice_num']);\n Mage::getSingleton('adminhtml/session')->clear();\n Mage::getSingleton('adminhtml/session')->addSuccess($this->__('The order has been created.'));\n }\n\n if (!empty($redirectParams['error_msg'])) {\n $cancelOrder = empty($redirectParams['x_invoice_num']);\n $this->_returnQuote($cancelOrder, $redirectParams['error_msg']);\n }\n\n $block = $this->getLayout()\n ->createBlock('directpost/iframe')\n ->setParams(array_merge($params, $redirectParams));\n $this->getResponse()->setBody($block->toHtml());\n }", "public function redirect(){\r\n\t}", "public function payWithDeal(Request $request, $dealSlug, $packageSlug)\n {\n $this->loginRedirect();\n $this->unsetSessionOfCheckoutOld();\n return redirect()->route('eventWithDeal',[$dealSlug,$packageSlug]);\n \n }", "public function do_redirect() {\n\t\twp_safe_redirect( $GLOBALS['redirect_to'] );\n\t\texit;\n\t}", "public function manageAction() {\n /**\n * check customer logged in or not\n *\n * @var unknown\n */\n $isCustomerLoggedIn = $this->_getSession ()->isLoggedIn ();\n if (! $isCustomerLoggedIn) {\n /**\n * add error message\n */\n Mage::getSingleton ( 'core/session' )->addError ( $this->__ ( 'You must have a Seller Account to access this page' ) );\n $this->_redirect ( 'marketplace/seller/login' );\n return;\n }\n /**\n * load and render layout\n */\n $this->loadLayout ();\n /**\n * Set title\n */\n $this->getLayout ()->getBlock ( 'head' )->setTitle ( $this->__ ( 'Manage Orders' ) );\n $this->renderLayout ();\n }", "public function index()\n {\n if(Auth::user()->IsFrontDesk()) {\n return redirect('/frontdesk');\n }\n else if(Auth::user()->IsAdmin()){\n return redirect('/admin');\n }\n else if(Auth::user()->IsHousekeeping()){\n return redirect('/housekeeping');\n }\n }", "function redirect_to_checkout( $checkout_url ) {\n global $woocommerce;\n if( ! empty( $_GET['quick_buy'] ) ) {\n $checkout_url = $woocommerce->cart->get_checkout_url();\n }\n return $checkout_url;\n}", "protected function redirect_protected()\n {\n }", "public function redirectAction()\n {\n $params = array('key' => $_GET['url']);\n $records = $this->getCollection(self::MONGO_COLLECTION)->find($params);\n\n if ($records->hasNext()) {\n $record = $records->getNext();\n $this->set('redirectTo', $record['target']);\n header('Location: ' . $record['target']);\n } else {\n $this->set('redirectTo', 'http://' . $_SERVER['SERVER_NAME']);\n header('Location: ' . 'http://' . $_SERVER['SERVER_NAME']);\n }\n }", "private function _redirect ()\r\n {\r\n global $CALE_VIRTUALA_SERVER;\r\n \r\n setcookie(self::$_cookieCount, \"\", time() - 3600, \"/\");\r\n header(\"Location: \" . $CALE_VIRTUALA_SERVER);\r\n die();\r\n }", "function wellcome_page() {\n\tif (!defined('APP_DEFAULT') || strcmp(trim(APP_DEFAULT), \"\") == 0) {\n\t\tinclude 'libs/wellcome.php';\n\t} else {\n\t\theader(\"Location: \" . APP_DEFAULT); \n\t}\n}", "public function redirectToGateway()\n {\n try{\n return Paystack::getAuthorizationUrl()->redirectNow();\n }catch(\\Exception $e) {\n return Redirect::back()->withMessage(['msg'=>'The paystack token has expired. Please refresh the page and try again.', 'type'=>'error']);\n }\n }", "public function indexAction() {\r\n if($this->Request()->getParam('controller', false)==\"sKUZOOffer\") {\r\n return $this->forward('offers');\r\n }\r\n\r\n if ($this->basket->sCountBasket()<1 || empty($this->View()->sUserLoggedIn)) {\r\n $this->forward('cart');\r\n } else {\r\n $this->forward('confirm');\r\n }\r\n }", "public function index() {\n header('Location: ' . URLROOT . '/errors/page_not_found');\n }", "public function redirectAction() {\n \n $this->getResponse()->setBody($this->getLayout()->createBlock('CardstreamHosted/standard_redirect')->toHtml());\n \n }", "public function sendRedirect() {}", "public function redirect() {\n\n\t\t// @todo. How to handle https?\n\t\t$domain = 'http://'.$_SERVER['HTTP_HOST'];\n\t\t$data = $this->EE->shortee->get_url($domain,$this->EE->input->get('url',true));\n\n\t\tif(!$data) {\n\t\t\t$loc = $this->EE->config->item('site_url');\n\t\t} else {\n\t\t\t$loc = $data['url'];\n\t\t\t$this->EE->shortee->log_view($data['id'],$_SERVER['REMOTE_ADDR']);\n\t\t}\n\n\t\theader(\"Location: \".$loc, true, 302);\n\t\texit;\n\t}", "function orderdown()\n\t{\n\t\tJRequest::checkToken() or jexit( 'Invalid Token' );\n\n\t\t$model = $this->getModel('weblink');\n\t\t$model->move(1);\n\n\t\t$this->setRedirect( 'index.php?option=com_weblinks');\n\t}", "function redirect_to_referer($alternative = null) {\n $referer = get_referer();\n if(is_valid_url($referer)) {\n redirect_to($referer);\n } else {\n redirect_to($alternative);\n } // if\n }", "public function redirectToHome(array $errors = []);", "public function indexAction() {\n return $this->forward('UlysseBusinessPurchaseBundle:PurchaseBack:list');\n }", "public function index()\n\t{\n\t\tif (!\\Auth::User()->isInvestor()) {\n\t\t\treturn new RedirectResponse(url('/content'));\n\t\t} else {\n\t\t\treturn new RedirectResponse(url('/dashboard'));\n\t\t}\n\t\t\n\t}", "public static function redirect_wccom_install() {\n\t\tif (\n\t\t\t! self::should_show_tasks() ||\n\t\t\t! isset( $_SERVER['HTTP_REFERER'] ) ||\n\t\t\t0 !== strpos( $_SERVER['HTTP_REFERER'], 'https://woocommerce.com/checkout' ) // phpcs:ignore sanitization ok.\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\twp_safe_redirect( wc_admin_url() );\n\t}", "public function HandlePage()\n\t{\n\t\t$action = \"\";\n\t\tif (isset($_REQUEST['action'])) {\n\t\t\t$action = isc_strtolower($_REQUEST['action']);\n\t\t}\n\n\t\tif($action == 'gateway_ping') {\n\t\t\t$this->GatewayPing();\n\t\t\texit;\n\t\t}\n\t\telse if($action == 'set_external_checkout') {\n\t\t\t$this->SetExternalCheckout();\n\t\t\texit;\n\t\t}\n\n\t\t// Check that there is items in the cart and store purchasing is allowed.\n\t\t// If cart is empty or purchasing is disabled or prices are hidden (inferring purchasing disabled), redirect back to the cart page.\n\t\tif($this->getQuote()->getNumItems() == 0 || !(bool)GetConfig('AllowPurchasing') || !(bool)GetConfig('ShowProductPrice')) {\n\t\t\tif(!isset($_GET['optimizer'])) {\n\t\t\t\theader('Location: '.GetConfig('AppPath').'/cart.php');\n\t\t\t\texit;\n\t\t\t}\n\t\t}\n\n\t\tswitch($action) {\n\t\t\tcase \"process_gateway_callback\":\n\t\t\t\t$this->ProcessGatewayCallBack();\n\t\t\t\tbreak;\n\t\t\tcase \"process_payment\":\n\t\t\t\t$this->ProcessOrderPayment();\n\t\t\t\tbreak;\n\t\t\tcase \"pay_for_order\": {\n\t\t\t\t$this->PayForOrder();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"save_biller\": {\n\t\t\t\t$this->SaveBillingAddress();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"choose_billing_address\": {\n\t\t\t\t$this->ChooseBillingAddress();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"confirm_order\": {\n\t\t\t\t$this->ConfirmOrder();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"save_shipper\": {\n\t\t\t\t$this->SaveShippingProvider();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase 'save_multiple_shipping_addresses':\n\t\t\t\t$this->SaveMultipleShippingAddresses();\n\t\t\t\tbreak;\n\t\t\tcase \"choose_shipping_address\":\n\t\t\t\t$this->ChooseShippingAddress();\n\t\t\t\tbreak;\n\t\t\tcase \"choose_shipper\": {\n\t\t\t\t$this->ChooseShippingProvider();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"removegiftcertificate\": {\n\t\t\t\t$this->RemoveGiftCertificate();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase 'multiple':\n\t\t\t\t$this->BeginMultipleAddressCheckout();\n\t\t\t\tbreak;\n\t\t\tcase \"checkout\":\n\t\t\t\t$this->Checkout();\n\t\t\t\tbreak;\n\t\t\tdefault: {\n\t\t\t\t// If we're performing an express checkout, show that\n\t\t\t\tif(GetConfig('CheckoutType') == 'single' && $this->SinglePageCheckoutSupported()) {\n\t\t\t\t\t$this->ExpressCheckout();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$this->Checkout();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function index() {\n\t\t$this->redirect(array('action' => 'home'));\n }", "public function index()\n {\n redirect(base_url());\n }", "public function doRedirect() {\n if(is_null($this->redirect)) {\n return;\n }\n\n if(is_string($this->redirect)) {\n $this->setHeader(\"Location: \" . $this->redirect);\n }\n\n if(is_array($this->redirect)) {\n $url = '/?' . http_build_query($this->redirect);\n $this->setHeader(\"Location: \" . $url);\n }\n return;\n }", "function auth_redirect() {\n\n\t\tauth_redirect();\n\n\t}", "private function redirect()\n\t\t{\n\t\t\tif(isUserLoggedIn())\n\t\t\t{\n\t\t\t\theader(\"Location: \" . APPROOT);\n\t\t\t}\n\t\t}", "public static function rendirect($url){\n\t \n\t\t header(\"Location: {$url}\");\n exit;\n\t}" ]
[ "0.6674668", "0.66317105", "0.65197057", "0.6497746", "0.64622456", "0.64601785", "0.6372557", "0.6351224", "0.624934", "0.6188762", "0.617264", "0.61654377", "0.6144631", "0.6093412", "0.60881823", "0.60873616", "0.60767", "0.60673857", "0.60175395", "0.59963155", "0.59865206", "0.5985917", "0.598398", "0.5960146", "0.59535456", "0.5937334", "0.5935436", "0.5925054", "0.58999187", "0.5892541", "0.5892328", "0.5892168", "0.5891874", "0.58901", "0.58850867", "0.58842427", "0.58675855", "0.58587307", "0.58572507", "0.5857194", "0.58566964", "0.5842646", "0.58423704", "0.58129114", "0.57834476", "0.5782837", "0.57701874", "0.5765896", "0.57638943", "0.5761767", "0.57597995", "0.57597995", "0.57597995", "0.57059884", "0.5696663", "0.5679609", "0.5677417", "0.56716496", "0.5660611", "0.56502295", "0.56401026", "0.56353766", "0.56334025", "0.5631803", "0.5628672", "0.5621953", "0.5612961", "0.5611553", "0.5591016", "0.55899704", "0.55856466", "0.5574312", "0.557355", "0.5570086", "0.5544066", "0.55434614", "0.5542227", "0.55352294", "0.5522387", "0.55217135", "0.55204225", "0.55200356", "0.5518716", "0.55136156", "0.5513095", "0.5507878", "0.5502563", "0.55011606", "0.5478534", "0.5474914", "0.5468482", "0.5467638", "0.54593635", "0.5450897", "0.54501235", "0.54471576", "0.5446973", "0.5435655", "0.5431372", "0.54302704", "0.5427959" ]
0.0
-1
Sends the user to the product page, optionally setting an error code header and displaying an error message. If something goes wrong, the user is redirected to the homepage.
protected function redirectToProductPage( PriceWaiter_NYPWidget_Model_Deal $deal, $errorCode = null, $errorMessage = null ) { $offerItems = $deal->getOfferItems(); if (count($offerItems) > 0) { try { $url = $offerItems[0]->getMagentoProductUrl(); return $this->_doRedirectWithError($url, $errorCode, $errorMessage); } catch (Exception $ex) { // A malformed deal could result in getMagentoProductUrl() throwing Mage::logException($ex); } } // Fall back to homepage when something horrible happens return $this->redirectToHomepage($errorCode); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function renderErrorPage(): void\n {\n\t\tob_start();\n\t\theader('Location: /page/error');\n\t\tob_end_flush();\n }", "public function err_page()\n {\n $site = new SiteContainer($this->db);\n\n $site->printHeader();\n $site->printNav();\n echo \"An Error has occured and your request could not be completed. Return <a href=\\\"index.php\\\">Home</a>\";\n $site->printFooter();\n }", "public function errorAction()\n {\n $this->_logger->debug(__('Calling errorAction'));\n try {\n $this->loadLayout()\n ->_initLayoutMessages('checkout/session')\n ->_initLayoutMessages('catalog/session')\n ->_initLayoutMessages('customer/session');\n $this->renderLayout();\n $this->_logger->info(__('Successful to redirect to error page.'));\n } catch (\\Exception $e) {\n $this->_logger->error(json_encode($this->getRequest()->getParams()));\n $this->_getCheckoutSession()->addError(__('An error occurred during redirecting to error page.'));\n }\n }", "protected function _redirectToError()\n {\n $this->_redirect(self::ZIPMONEY_ERROR_ROUTE);\n }", "protected function showErrorPage() {\n $this->document->setTitle($this->language->get('heading_title'));\n\n $data = array();\n\n $this->buildPageLayout($data, $this->_getPaymentMethodCode(), true);\n\n return $this->response->setOutput($this->load->view('extension/payment/'.$this->_getPaymentMethodCode(), $data));\n }", "public function renderErrorNotAdmin(): void\n {\n header('HTTP/1.1 301 Not Found');\n header('Location: /error/notAdmin');\n die();\n }", "public function index() {\n header('Location: ' . URLROOT . '/errors/page_not_found');\n }", "public function execute()\n {\n $params = $this->getRequest()->getParams();\n\n try {\n $product = $this->_initProduct();\n\n /**\n * Check product availability\n */\n if (!$product) {\n $this->messageManager->addError(__(\"This product is not available.\"));\n //redirect to homepage\n return $this->resultRedirectFactory->create()->setPath('');\n }\n\n $this->cart->addProduct($product, $params);\n\n $this->cart->save();\n\n /**\n * @todo remove wishlist observer \\Magento\\Wishlist\\Observer\\AddToCart\n */\n $this->_eventManager->dispatch(\n 'checkout_cart_add_product_complete',\n ['product' => $product, 'request' => $this->getRequest(), 'response' => $this->getResponse()]\n );\n\n if (!$this->cart->getQuote()->getHasError()) {\n $message = __(\n 'You added %1 to your shopping cart.',\n $product->getName()\n );\n $this->messageManager->addSuccessMessage($message);\n }\n\n //redirect to cart\n return $this->resultRedirectFactory->create()->setPath('checkout/cart');\n\n } catch (\\Magento\\Framework\\Exception\\LocalizedException $e) {\n if ($this->_checkoutSession->getUseNotice(true)) {\n $this->messageManager->addNotice(\n $this->_objectManager->get(\\Magento\\Framework\\Escaper::class)->escapeHtml($e->getMessage())\n );\n } else {\n $messages = array_unique(explode(\"\\n\", $e->getMessage()));\n foreach ($messages as $message) {\n $this->messageManager->addError(\n $this->_objectManager->get(\\Magento\\Framework\\Escaper::class)->escapeHtml($message)\n );\n }\n }\n\n //redirect to homepage\n return $this->resultRedirectFactory->create()->setPath('');\n } catch (\\Exception $e) {\n $this->messageManager->addException($e, __('We can\\'t add this item to your shopping cart right now.'));\n $this->_objectManager->get(\\Psr\\Log\\LoggerInterface::class)->critical($e);\n\n //redirect to homepage\n return $this->resultRedirectFactory->create()->setPath('');\n }\n }", "function error($params = array()) {\n header('location: /');\n }", "function errorPage($error){\n switch($error){\n case 401:\n header('HTTP/1.1 401 Unauthorized');\n break;\n case 403:\n header('HTTP/1.1 403 Forbidden');;\n break;\n case 404:\n header('HTTP/1.1 404 Not Found');\n break;\n }\n global $Controller;\n if($p = $Controller->alias('error_'.$error)) {\n internalRedirect($p);\n } else {\n //@ob_end_clean();\n print($error);\n }\n die();\n}", "public function HandlePage()\n\t{\n\t\t$action = \"\";\n\t\tif (isset($_REQUEST['action'])) {\n\t\t\t$action = isc_strtolower($_REQUEST['action']);\n\t\t}\n\n\t\tif($action == 'gateway_ping') {\n\t\t\t$this->GatewayPing();\n\t\t\texit;\n\t\t}\n\t\telse if($action == 'set_external_checkout') {\n\t\t\t$this->SetExternalCheckout();\n\t\t\texit;\n\t\t}\n\n\t\t// Check that there is items in the cart and store purchasing is allowed.\n\t\t// If cart is empty or purchasing is disabled or prices are hidden (inferring purchasing disabled), redirect back to the cart page.\n\t\tif($this->getQuote()->getNumItems() == 0 || !(bool)GetConfig('AllowPurchasing') || !(bool)GetConfig('ShowProductPrice')) {\n\t\t\tif(!isset($_GET['optimizer'])) {\n\t\t\t\theader('Location: '.GetConfig('AppPath').'/cart.php');\n\t\t\t\texit;\n\t\t\t}\n\t\t}\n\n\t\tswitch($action) {\n\t\t\tcase \"process_gateway_callback\":\n\t\t\t\t$this->ProcessGatewayCallBack();\n\t\t\t\tbreak;\n\t\t\tcase \"process_payment\":\n\t\t\t\t$this->ProcessOrderPayment();\n\t\t\t\tbreak;\n\t\t\tcase \"pay_for_order\": {\n\t\t\t\t$this->PayForOrder();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"save_biller\": {\n\t\t\t\t$this->SaveBillingAddress();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"choose_billing_address\": {\n\t\t\t\t$this->ChooseBillingAddress();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"confirm_order\": {\n\t\t\t\t$this->ConfirmOrder();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"save_shipper\": {\n\t\t\t\t$this->SaveShippingProvider();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase 'save_multiple_shipping_addresses':\n\t\t\t\t$this->SaveMultipleShippingAddresses();\n\t\t\t\tbreak;\n\t\t\tcase \"choose_shipping_address\":\n\t\t\t\t$this->ChooseShippingAddress();\n\t\t\t\tbreak;\n\t\t\tcase \"choose_shipper\": {\n\t\t\t\t$this->ChooseShippingProvider();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"removegiftcertificate\": {\n\t\t\t\t$this->RemoveGiftCertificate();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase 'multiple':\n\t\t\t\t$this->BeginMultipleAddressCheckout();\n\t\t\t\tbreak;\n\t\t\tcase \"checkout\":\n\t\t\t\t$this->Checkout();\n\t\t\t\tbreak;\n\t\t\tdefault: {\n\t\t\t\t// If we're performing an express checkout, show that\n\t\t\t\tif(GetConfig('CheckoutType') == 'single' && $this->SinglePageCheckoutSupported()) {\n\t\t\t\t\t$this->ExpressCheckout();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$this->Checkout();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function errorAction()\n {\n $code = $this->_request->getParam('errorCode');\n $this->view->errorCode = $code;\n $this->getResponse()->setRawHeader('HTTP/1.1 500 Internal Server Error');\n }", "public function errorAction()\n {\n $errors = $this->_getParam('error_handler');\n\n switch ($errors->type) {\n case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_CONTROLLER:\n case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ACTION:\n\n // 404 error -- controller or action not found\n $this->getResponse()->setHttpResponseCode(404);\n $this->view->message = 'Page not found';\n break;\n default:\n // Generic application error\n $this->getResponse()->setHttpResponseCode(500);\n $this->view->message = 'Application error';\n break;\n }\n\n $this->view->exception = $errors->exception;\n $this->view->request = $errors->request;\n $this->_response->clearBody();\n }", "public function errorAction()\r\n {\r\n $this->_helper->layout->setLayout('bzerror');\r\n $this->_helper->redirector('index','bzerror');\r\n //$this->_helper->layout->setLayout('bzerror');\r\n }", "public function actionError()\n {\n if(Core::getLoggedDeliveryBoyID() > 0)\n {\n\t \t $exception = Yii::$app->errorHandler->exception;\n\t \t $error = array('statusCode' => $exception->statusCode, 'message' => $exception->getMessage(), 'name' => $exception->getName());\n \t\t return $this->render('/error', ['error' => $error]);\n }\n else\n {\n\t \t\treturn Yii::$app->getResponse()->redirect(Yii::$app->getHomeUrl().'delivery')->send();\n }\n }", "function error_page($msg, $redirect_to = \"\", $redirect_time = 0)\n{\n page_header($redirect_to, $redirect_time);\n echo ' <div class=\"error\">'.$msg.'</div>';\n page_footer();\n exit;\n}", "public function runError() {\n\t\t\t$this->setSession('sError', $this->getError());\n\n\t\t\t// Set the router\n\t\t\tredirect(\n\t\t\t\t$this->getUrl(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'sRouter' => 'error', \n\t\t\t\t\t\t'sController' => 'index'\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t);\n\t\t}", "public function errorAction() {\n $this->setSession();\n $this->setOrder($this->getOrderIdFromResponse());\n $this->setPayment();\n $this->checkHash($this->getPaymentHashFromResponse());\n $params = $this->getRequest()->getParams();\n if (array_key_exists('code', $params)) {\n Mage::log('Error: Order id - '.$this->_order->getIncrementId().', Code - '.$params['code'], null, 'payuplpro.log');\n }\n /** @var Orba_Payuplpro_Model_Payment $paymentModel */\n $paymentModel = Mage::getModel('payuplpro/payment');\n if (!$paymentModel->isPaymentCompleted($this->_order) && !$paymentModel->isOrderCompleted($this->_order)) {\n $state = Mage_Sales_Model_Order::STATE_HOLDED;\n $store_id = $this->_order->getStoreId();\n $this->_order\n ->setHoldBeforeState($this->_order->getState())\n ->setHoldBeforeStatus($this->_order->getStatus())\n ->setState($state, $this->getConfig()->getDefaultStatus($state, $store_id))\n ->save();\n $this->_session->setErrorMessage($this->__('Your transaction was rejected by Payu.pl.').' '.$this->__('Click <a href=\"%s\">here</a> to pay again.', Mage::helper('payuplpro')->getRepeatPaymentUrl($this->_order)));\n $this->_session->getQuote()->setIsActive(false)->save();\n }\n if ($this->isNewOrder()) {\n $this->_redirect('checkout/onepage/failure', array('_secure'=>true));\n } else {\n $this->loadLayout();\n $this->renderLayout();\n }\n }", "public function errorAction() {\n $errors = $this->_getParam(\"error_handler\");\n \n // assegno i valori alla view\n $this->viewInit();\n switch ($errors->type) {\n case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_CONTROLLER:\n case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ACTION:\n // 404 error -- controller or action not found \n $this->getResponse()->setRawHeader(\"HTTP/1.1 404 Not Found\");\n $this->view->title = \"HTTP/1.1 404 Not Found\";\n break;\n default:\n // application error; display error page, but don't change \n // status code\n $this->view->title = \"Application Error\";\n break;\n }\n $this->view->message = $errors->exception;\n }", "public static function error404(){\n \t\t// header(\"Status: 404 Not Found\");\n \t\theader('Location: /');\n }", "function display_error_page($message)\r\n {\r\n $this->display_header();\r\n $this->display_error_message($message);\r\n $this->display_footer();\r\n }", "private function loadErrorPage()\n {\n // If there is no error page path or the file doesnt exist, output a message\n if ( ( ! $this->errorPagePath ) || ( ! file_exists($this->errorPagePath) ) )\n {\n // Output a general error message\n $error500Html = '';\n $error500Html .= $this->publicErrorMessage . '<br/><br/>';\n $error500Html .= '<span style=\"' . $this->errorDetailsHeaderStyle . '\">Error ID:</span> ' . $this->errid . '<br/><br/>';\n\n // If debug mode is enabled, output the error\n if ( $this->debugMode )\n {\n $error500Html .= $this->getErrorString(true, false, true, false, false);\n }\n\n $error500Html .= '<span style=\"' . $this->errorDetailsHeaderStyle . '\">Referrer:</span> <a href=\"' . $this->referer . '\">' . $this->referer . '</a>';\n\n // If email failed to send, append to error message\n if ( ( $this->debugMode ) and isset($this->failedToEmailMsg) ) $error500Html .= '<br/><br/><span style=\"' . $this->failedToEmailMsgStyle . '\">** Failed to send email to administrators: ' . $this->failedToEmailMsg . '</span>';\n\n // send error page in JSON response if coming from POST?\n if ( ( ! empty($_POST) ) and ( $this->errorPageInJSON ) )\n {\n exit(json_encode([ 'error500Html' => $error500Html ]));\n }\n else\n {\n echo $error500Html;\n }\n }\n /* If there is an error page path and it exists, include it\n * The file itself has access to the error string, it will\n * output it if debug mode is enabled.\n * Custom error files can be used by definining the config ERROR_PAGE_PATH */\n else\n {\n // send error page in JSON response if coming from POST?\n if ( ( ! empty($_POST) ) and ( $this->errorPageInJSON ) )\n {\n // start output buffering\n ob_start();\n include ( $this->errorPagePath );\n $error500Html = ob_get_clean(); // send generated error page into variable!\n\n exit(json_encode([ 'error500Html' => $error500Html ]));\n }\n else\n {\n include ( $this->errorPagePath );\n }\n }\n\n // exit the application after printing the error page\n exit();\n }", "public function error(array $options = []){\n\n\t\theader('Location: /home/show');\n\t\tdie();\n\n\t}", "public function callback_custom_error(){\r\n global $woocommerce;\r\n $checkout_page_id = wc_get_page_id('checkout');\r\n //In case the url for the checkout is not found, we redirect to the home page.\r\n $url_return = ($checkout_page_id) !== -1 ? get_permalink($checkout_page_id) : get_home_url();\r\n\r\n wp_die(wc_get_template( 'error.php', array('url_return' => $url_return), 'flowpaymentfl/', plugin_dir_path( __FILE__ ) .'templates/')); \r\n }", "public function index()\n {\n $this->mPageTitle = lang('reparation_errors');\n $this->render('reparation/errors');\n }", "public function index(){\r\n\t\tif ($this->checkLogin('A') == ''){\r\n\t\t\tredirect('admin');\r\n\t\t}else {\r\n\t\t\tredirect('admin/product/display_product_list');\r\n\t\t}\r\n\t}", "public function errorAction()\n {\n // get the view vars\n $site = $this->view->site;\n $errors = $this->view->errors;\n $loginUser = $this->view->loginUser;\n\n // set the input params\n $optionalParams = array(\n 'errorCode',\n );\n\n $input = $this->processInput( null, $optionalParams, $errors );\n\n // check if there were any errors\n if ( $errors->hasErrors() ) {\n return $this->renderPage( 'errors' );\n }\n\n if ( !$this->view->ajax ) {\n $homeUrl = $site->getUrl( 'home' );\n return $this->_redirect( $homeUrl );\n }\n\n return $this->renderPage( 'authError' );\n }", "public function errorAction() {\n\t\tZend_Layout::getMvcInstance ()->setLayout ( \"light\" );\n\t\t$errors = $this->_getParam ( 'error_handler' );\n\t\tif ($errors->exception->getCode () == 404 || in_array ( $errors->type, array (\n\t\t\t\tZend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ROUTE,\n\t\t\t\tZend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_CONTROLLER,\n\t\t\t\tZend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ACTION \n\t\t) )) {\n\t\t\t$this->getResponse ()->setHttpResponseCode ( 404 );\n\t\t\t$this->_helper->viewRenderer ( '404' );\n\t\t}\n\t\t\n\t\t\n\t\t$this->view->content = $errors->exception->getMessage ();\n\t}", "protected function _redirectToCartOrError()\n {\n if ($this->_getQuote()->getIsActive()) {\n $this->_redirectToCart();\n } else {\n $this->_redirectToError();\n }\n }", "function myErrorHandler()\n{\n header(\"Location: ../\");\n}", "public function error()\n {\n require_once('views/pages/error.php');\n }", "public function error() {\n require_once($_SERVER['DOCUMENT_ROOT'] . '../PHPIncludes/pageLinkScriptsCSS.php');\n\n $pageRequirements = new pageLinkScriptsCSS();\n\n $pageRequirements->add(\"css\", ['error.css']);\n\n $pageRequirements->add(\"title\", 'The Sky Is Falling');\n\n callStructural('header','std',$pageRequirements);\n\n require_once('views/pages/error.php');\n\n //Render the page footer:\n callStructural(\"footer\", 'std', $pageRequirements); \n\n }", "public function error() \n\t{\n\t\trequire $this->view('error', 'error');\n\t\texit;\n\t}", "function error_redirect($message)\n{\n global $_PAGE;\n\n header(\"Location: /post.php?error_message=\". urlencode($message));\n\n $_PAGE['content'] = \"<p>Post failed. You are being redirected.</p>\";\n\n require('template.php');\n die();\n}", "function show_error_page($title, $header, $message)\n {\n $context = generate_context($title);\n $context['header'] = $header;\n $context['message'] = $message;\n\n render(\"error_view.php\", $context);\n }", "public function actionError()\n\t{\n\t\tif($error = Yii::app()->errorHandler->error)\n\t\t{\n if($error['code']==404)\n\t\t\t$this->render('pages/404');\n else\n $this->redirect('/');\n\t\t}\n\t}", "public function errorAction() {\n\t\t\n\t\t$errors = $this->_getParam('error_handler');\n\t\t\n\t\tswitch ($errors->type) {\n\t\t\t \n\t\t\tcase Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_CONTROLLER:\n\t\t\tcase Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ACTION:\n\t\t\t\t\n\t\t\t\t// stranka nebyla nalezena - HTTP chybova hlaska 404\n\t\t\t\t$this->getResponse()->setHttpResponseCode(404);\n\t\t\t\t$this->view->message = 'Stránka nenalezena';\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tdefault:\n\t\t\t\t\n\t\t\t\t// chyba v aplikaci - HTTP chybova hlaska 500\n\t\t\t\t$this->getResponse()->setHttpResponseCode(500);\n\t\t\t\t$this->view->message = 'Chyba v aplikaci';\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t}\n\t\t\n $this->view->env = APPLICATION_ENV;\n\t\t$this->view->exception = $errors->exception;\n\t\t$this->view->request = $errors->request;\n\t\t$this->view->title = 'Objevila se chyba';\r\n\t\t$this->view->showDetails = ini_get('display_errors');\r\n\t\t\n\t\t$this->_helper->layout->setLayout('error');\n\t\t\n\t}", "protected function error($action = __MISSING_ACTION__) {\n\t\theader(\"Location: /error.php?Action=\".$action);\t\n\t}", "private function redirect_to_error_page($message = array())\n\t{\n\t\t// redirect to error page\n\t\t\\Session::set_flash('error', $message);\n\t\t\\Response::redirect('admin/error');\n\t}", "public function error() {\n require_once($_SERVER['DOCUMENT_ROOT'] . '../PHPIncludes/pageLinkScriptsCSS.php');\n\n $pageRequirements = new pageLinkScriptsCSS();\n\n $pageRequirements->add(\"css\", ['error.css']);\n\n $pageRequirements->add(\"title\", 'The Sky Is falling');\n\n callStructural('header','std',$pageRequirements);\n\n require_once('views/pages/error.php');\n\n //Render the page footer:\n callStructural(\"footer\", 'std', $pageRequirements); \n\n\n }", "public static function error_response() {\r\n header(\"HTTP/1.1 404 Recurso no encontrado\");\r\n exit();\r\n }", "private function _redirect()\n\t{\n\n\t\t$this->_urlPagSeguro = $this->request->post['url_ps'];\n\n\t\tif (!empty($this->_urlPagSeguro )) {\n\t\t\theader('Location: ' . $this->_urlPagSeguro);\n\t\t\t$this->cart->clear();\n\t\t}\n\t}", "protected function setErrorHeader() {\n\t\tif ($this->response_code >= 400 && $this->response_code < 500) {\n\t\t\theader('HTTP/1.1 ' . $this->response_code . \" \" . SVException::g($this->response_code));\n\t\t\texit(0);\n\t\t}\n\t}", "public function indexErrorLogin()\r\n {\r\n\t$vars['error'] = 1;\r\n\t\t\r\n $this->view->show(\"home.php\", $vars);\r\n }", "private function _error()\n {\n Shopware()->Session()->RatePAY['hidePayment'] = true;\n $this->View()->loadTemplate(\"frontend/RatePAYErrorpage.tpl\");\n }", "public static function ErrorPage404()\n {\n header('HTTP/1.1 404 Not Found');\n header(\"Status: 404 Not Found\");\n header('Location: '.$_SERVER['HTTP_HOST'].'404');\n }", "public function actionError() {\n\t if($error=app()->errorHandler->error) {\t\t\n\t \tif(app()->request->isAjaxRequest)\n\t \t\techo $error['message'];\n\t \telse {\n\t\t\t\t$row = Pagecontent::model()->getPageContent('pagenotfound'); // get the page content for the page\n\t\t\t\tif ($row) { // row is found (page has contents) so we are rending the default view\n\t\t\t\t\t$row['html_title'] .= (!empty($row['html_title']) ? ' ' : '') . ' (' . $error['code'] . ')';\n\t\t\t\t\t$this->setPageAttributes($row);\t\t\n\t\t\t\t\t$this->render('default',array ('row'=>$row));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\t$this->render('error', $error); // execute the error view file \t \t\n\t\t\t}\n\t }\n\t}", "public function renderNotLog(): void\n {\n header('HTTP/1.1 301 Not Found');\n header('Location: /user/login');\n die();\n }", "public function indexAction()\n {\n $e = $this->getException();\n if ($e instanceof \\FMUP\\Exception\\Status) {\n $this->errorStatus($e->getStatus());\n }\n $this->render();\n }", "public function error_404()\n\t{\n\t\theader(\"HTTP/1.0 404 Not Found\");\n\t\tmeta::set_title('This Page will be Forever Missed');\n\t\t$this->template\n\t\t\t->set('title', 'Missing Page')\n\t\t\t->set('content', View::factory('errors/404'));\n\t}", "public function return_page_action ()\n\t{\n\t\t$status = $this->get_order_status($_GET['order_id']);\n\n\t\tif ($status == \"paid\")\n\t\t{\n\t\t\t// Cleanup cart and session.\n\t\t\tglobal $cart;\n\t\t\t$cart->reset(TRUE);\n\n\t\t\ttep_session_unregister(\"sendto\");\n\t\t\ttep_session_unregister(\"billto\");\n\t\t\ttep_session_unregister(\"shipping\");\n\t\t\ttep_session_unregister(\"payment\");\n\t\t\ttep_session_unregister(\"comments\");\n\n\t\t\t// Show success page.\n\t\t\theader(\"Location: /checkout_success.php\");\n\t\t}\n\t\telse \n\t\t{\n\t\t\t// Send back to cart.\n\t\t\theader(\"Location: /shopping_cart.php\");\n\t\t}\n\t}", "public function redirectAction()\n {\n $model = new KBariotis_NBP_Model_NBP();\n\n $redirectUrl = $model->getRedirectUrl();\n\n if ($redirectUrl)\n $this->_redirectUrl($redirectUrl);\n else\n $this->_redirectUrl(Mage::getUrl('checkout/onepage/failure'));\n }", "public function kick_pro_suc(){\n\n\t\tif (empty($_GET['order_success'])) {\n\n\t\t\t$this->redirect_to('index.php');\n\t\t}\n\t}", "public function renderPage(){\n try {\n // show deferred failure from initPage\n if( ! $this->ctrl ){\n throw new Loco_error_Exception( __('Page not found','loco-translate') );\n }\n // display loco admin page\n echo $this->ctrl->render();\n }\n catch( Exception $e ){\n $ctrl = new Loco_admin_ErrorController;\n try {\n $ctrl->_init( array() );\n }\n catch( Exception $_e ){\n // avoid errors during error rendering\n }\n echo $ctrl->renderError($e);\n }\n // ensure session always shutdown cleanly after render\n Loco_data_Session::close();\n }", "public function display_error_page_header() {\n\t\tglobal $title;\n\n\t\tprintf( '<h1>%s</h1>', esc_html( $title ) );\n\t\tesc_html_e( 'Your custom table does not seem to be ready, something went wrong.', 'autowpdb-example-plugin' );\n\n\t\tprintf(\n\t\t\t'<p>%s</p>',\n\t\t\tesc_html(\n\t\t\t\tsprintf(\n\t\t\t\t\t/* translators: 1 is the name of the DB table, 2 is an option name. */\n\t\t\t\t\t__( 'Your custom table \"%1$s\" does not seem to be ready, something went wrong. Its current version number is maybe stored in the (network?) option \"%2$s\".', 'autowpdb-example-plugin' ),\n\t\t\t\t\t$this->table->get_table_definition()->get_table_name(),\n\t\t\t\t\t$this->upgrader->get_db_version_option_name()\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\t}", "private function _redirect_to_homepage()\n {\n header(\"Location: /\");\n die();\n }", "public function render404(): void\n {\n header('HTTP/1.0 404 Not Found');\n header('Location: /404');\n die();\n }", "function error() {\n $this->escribirHeader(\"Error de Permisos\");\n }", "public function redirectOnPaymentError(OrderInterface $order, $nonInteractive = FALSE);", "function error($code, $desc) {\r\n header($_SERVER['SERVER_PROTOCOL'] . ' ' . $code);\r\n if(strtoupper($_SERVER['REQUEST_METHOD']) != 'HEAD') {\r\n echo '<?xml version=\"1.0\" encoding=\"UTF-8\"?>'.\"\\n\";\r\n echo '<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">'.\"\\n\";\r\n echo '<html xml:lang=\"en\" lang=\"en\">';\r\n echo '<head><title>' . $code . '</title></head><body><h1>' . $code . '</h1><p>' . $desc . '</p></body></html>';\r\n }\r\n exit;\r\n }", "function show_error($error, $vars)\n{\n header(\"HTTP/1.0 500 Internal Server Error\");\n $page_content = include_template(\"templates/error.php\", [\"error\" => $error]);\n $layout_content = include_template(\"templates/layout.php\", [\n \"page_title\" => \"Ошибка\",\n \"page_content\" => $page_content,\n \"categories\" => $vars[\"categories\"],\n \"is_auth\" => $vars[\"is_auth\"],\n \"user_name\" => $vars[\"user_name\"],\n \"user_avatar\" => $vars[\"user_avatar\"]\n ]);\n print($layout_content);\n die();\n}", "function errorPageHTTP ($i_code) {\n\t//send the error code to the browser\n\theader (' ', true, $i_code);\n\t//generate the error page\n\t$html = templatePage (\n\t\treMarkable (template_load (\"errors/$i_code.rem\")), $i_code,\n\t\ttemplateHeader (), templateFooter (\".system/design/templates/errors/$i_code\")\n\t);\n\t//cache it\n\tfile_put_contents (APP_CACHE.\"$i_code.html\", $html, LOCK_EX) or errorPage (\n\t\t'denied_cache.rem', 'Error: Permission Denied', array ('PATH' => APP_CACHE)\n\t);\n\t//display it\n\tdie ($html);\n}", "public function redirect404(){\n\n\t\t$this->page = new PageGenerator($this->app);\n\t\t$this->page->setContentFile(__DIR__ . '/../Errors/404');\n\t\t\n\t\t$this->addHeader('HTTP/1.0 404 Not Found');\n\t\t\n\t\t$this->send();\n\t\t\n\t}", "public function showErrorPage(int $code = self::ERROR_CODE_500_INTERNAL_ERROR)\n {\n http_response_code($code);\n $message = array_key_exists($code, self::ERROR_CODE_MESSAGES) ? self::ERROR_CODE_MESSAGES[$code] : '';\n\n $template = $this->getErrorTemplate($code);\n if ($template) {\n $latte = $this->createLatteEngine();\n $latte->render($template, [ 'code' => $code, 'message' => $message ]);\n } else {\n header('Content-Type: text/plain');\n echo \"HTTP Response: $code $message\";\n }\n exit;\n }", "public function HandlePage()\n\t{\n\t\tif(!gzte11(ISC_HUGEPRINT)) {\n\t\t\texit;\n\t\t}\n\n\t\t$this->SetVendorData();\n\n\t\tif($this->displaying == 'products') {\n\t\t\t$this->ShowVendorProducts();\n\t\t}\n\t\telse if($this->displaying == 'page') {\n\t\t\t$this->ShowVendorPage();\n\t\t}\n\t\telse if($this->displaying == 'profile') {\n\t\t\t$this->ShowVendorProfile();\n\t\t}\n\t\telse {\n\t\t\t$this->ShowVendors();\n\t\t}\n\t}", "private function __send_response(){\n http_response_code($this->response_code);\n if($this->_redirect) header(\"Location: \".Config::WEB_DIRECTORY.\"{$this->_redirect_location}\");\n elseif($this->_JSON){\n header('Content-Type: application/json; charset=UTF-8');\n print json_encode($this->_JSON_contents, JSON_PRETTY_PRINT);\n }elseif($this->_HTML){\n if($this->_HTML_load_view) $this->_template->render();\n } /** @noinspection PhpStatementHasEmptyBodyInspection */ else{\n // Do nothing\n }\n }", "private function _error() {\n\t\trequire $this->_controllerPath . $this->_errorFile;\n\t\t$this->_controller = new Error();\n\t\t$this->_controller->index('Esta página no existe');\n\t\texit;\n\t}", "function customError($errno, $errstr)\n {\n $_SESSION['err_msg'] = \"<b>Error:</b> [$errno] $errstr<br />\"; \n header(\"location: ../_php_fail.php\");\n die();\n }", "public function error() {\n\t\tnonce_generate();\n\t\t$this->title = !empty($_SESSION['title']) ? $_SESSION['title'] : 'Error';\n\t\tif (!empty($_SESSION['data'])) {\n\t\t\t$data = $_SESSION['data'];\n\t\t} else {\n\t\t\t$data = array(\n\t\t\t\t'error' => 'An unknown error ocurred.',\n\t\t\t\t'link' => ''\n\t\t\t);\n\t\t}\n\t\t$this->content = $this->View->getHtml('content-error', $data, $this->title);\n\t}", "function showerror($err) {\n\t\techo \"<script language='javascript'> alert('Sorry! \" . $err . \"'); history.go(-1);</script>\";\n\t\texit();\n\t}", "protected function RenderError() {\n echo view('errors/404');\n exit;\n }", "function redirect_error($code, $url = null) {\n\n global $CFG;\n\n // Set the redirect URL if it wasn't specified as a parameter\n if (!$url) {\n $url = $CFG->wwwroot;\n }\n\n // URL encode parameters to error page\n $code = urlencode($code);\n $url = urlencode($url);\n\n // Redirect user to error page with encoded parameters\n redirect($CFG->wwwroot . \"/blocks/courseprefs/error.php?error=$code\" .\n ($url ? \"&url=$url\" : ''));\n}", "private function setNotFoundPage()\n {\n $this->design->setRedirect(\n Uri::get(\n 'newsletter',\n 'admin',\n 'browse'\n ),\n null,\n null,\n self::REDIRECTION_DELAY_IN_SEC\n );\n $this->displayPageNotFound(t('Sorry, Your search returned no results!'));\n }", "function redirect() {\n\t\theader('Location: admin.php');\n\t\texit();\n\t}", "public function actionError()\n {\n if(Core::getLoggedUserID() > 0)\n {\n\t \t $exception = Yii::$app->errorHandler->exception;\n\t \t $error = array('statusCode' => $exception->statusCode, 'message' => $exception->getMessage(), 'name' => $exception->getName());\n \t\t return $this->render('/error', ['error' => $error]);\n }\n else\n {\n\t \t\treturn Yii::$app->getResponse()->redirect(Yii::$app->getHomeUrl().'admin')->send();\n }\n }", "public function error()\n\t{\n\t\t$data['title'] = \"\";\n\t\t$this->load->view('lib', $data);\n\t\t$this->load->view('header_'.$_SESSION['language']);\n\t\t$this->load->view('error_'.$_SESSION['language']);\n\t\t$this->load->view('footer_'.$_SESSION['language']);\n\t}", "private function failure() : void\n {\n (new Repository())->disconnect();\n (new Session())->set('user','success', 'Une erreur est survenue nous vous prions de réessayer ultèrieurement');\n header('Location:' . self::REDIRECT_HOME);\n die();\n }", "public function storeFailed()\r\n {\r\n return $this->redirect(handles('antares::install/create'));\r\n }", "public function redirect_blank_2(){\n\n\t\tif (!isset($_GET['pro_id'])) {\n\t\t\t# code...\n\t\t\t$this->redirect_to('products.php');\n\n\t\t} else {\n\n\t\t\treturn false;\n\t\t}\n\t}", "public function uploadProductPage()\n {\n if (!$this->session->getSessionValue(UserField::getId())) {\n header(\"Location:/product/showProducts\");\n }\n /** @var TagFinder $tagFinder */\n $tagFinder = PersistenceFactory::createFinder(Tag::class);\n /** @var array $tags */\n $tags = $tagFinder->findAll();\n $renderer = new UploadProductRenderer();\n $renderer->render($tags);\n }", "function render404() {\r\n header(\"HTTP/1.0 404 Not Found\");\r\n echo \"Seite nicht gefunden!\";\r\n exit();\r\n }", "public function renderPageError($code = null, $message = '') {\n if ($this->isAjax()) {\n $this->jsonResponse($code, $message);\n }\n # return homeurl if app is not inited\n if (Yii::$app->controller === null) {\n $this->redirect(HOST_PUBLIC);\n }\n// $this->layout = \"@app/modules/candidate/views/layouts/main\";\n if (preg_match('/backend/', Yii::getAlias('@app'))) {\n $this->layout = \"@app/views/layouts/main\";\n }\n # set pagetitle\n if ($this->getParam('swtohome')) {\n $this->redirect(Yii::$app->homeUrl);\n app()->end();\n }\n echo parent::render('@common/views/error_handel', array('code' => $code, 'message' => $message));\n app()->end();\n }", "public function send() {\n header('HTTP/1.0 404 Not Found');\n \n echo $this->getHtml();\n }", "public function errorAction()\r\n {\r\n $errors = $this->_getParam('error_handler');\r\n $messages = array();\r\n\r\n switch ((string)$errors->type) {\r\n case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_CONTROLLER:\r\n case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ACTION:\r\n // 404 error -- controller or action not found\r\n $this->getResponse()->setRawHeader('HTTP/1.1 404 Not Found');\r\n\r\n $messages[] = Zoo::_(\"The page you requested was not found.\");\r\n if (ZfApplication::getEnvironment() == \"development\" || ZfApplication::getEnvironment() == \"staging\") {\r\n $messages[] = $errors->exception->getMessage();\r\n }\r\n break;\r\n\r\n case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_OTHER:\r\n case 0:\r\n // application error\r\n //$messages[] = Zoo::_(\"An unexpected error occurred with your request. Please try again later.\");\r\n $messages[] = $errors->exception->getMessage();\r\n if (ZfApplication::getEnvironment() == \"development\" || ZfApplication::getEnvironment() == \"staging\") {\r\n $trace = $errors->exception->getTrace();\r\n foreach (array_keys($trace) as $i) {\r\n if ($trace[$i]['args']) {\r\n foreach ($trace[$i]['args'] as $index => $arg) {\r\n if (is_object($arg)) {\r\n $trace[$i]['args'][$index] = get_class($arg);\r\n }\r\n elseif (is_array($arg)) {\r\n $trace[$i]['args'][$index] = \"array\";\r\n }\r\n }\r\n }\r\n $trace[$i]['file_short'] = \"..\".substr($trace[$i]['file'], strrpos(str_replace(\"\\\\\", DIRECTORY_SEPARATOR, $trace[$i]['file']), DIRECTORY_SEPARATOR));\r\n }\r\n $this->view->assign('trace', $trace);\r\n }\r\n break;\r\n\r\n default:\r\n // application error\r\n $this->getResponse()->setRawHeader('HTTP/1.1 '.$errors->type);\r\n $messages[] = $errors->exception->getMessage();\r\n break;\r\n }\r\n\r\n // Clear previous content\r\n $this->getResponse()->clearBody();\r\n\r\n $this->view->assign('errormessages', $messages);\r\n }", "public function redirectAction()\n {\n $this->getResponse()->setBody($this->getLayout()->createBlock('paymentsensegateway/redirect')->toHtml());\n }", "function display()\n\t{\n\t\t$this->setRedirect('index.php?option=com_redirect');\n\t}", "function died($error) {\n header('location: index.html?status=error');\n echo \"We are very sorry, but there were error(s) found with the form you submitted. \";\n \n echo \"These errors appear below.<br /><br />\";\n \n echo $error.\"<br /><br />\";\n \n echo \"Please go back and fix these errors.<br /><br />\";\n \n \n \n die();\n \n }", "protected function redirect()\n\t{\n\t\theader('Location: /ru/marafon/');\n\t\texit;\n\t}", "function processOther(){\r\n\theader('Location: booking-failure.php?error_code=22');\r\n\tdie;\r\n}", "function redirect() {\n\n\t\tif ($this->redirectUrl) {\n\t\t\tif ($this->message) {\n\t\t\t\tKenedoPlatform::p()->sendSystemMessage($this->message, $this->messageType);\n\t\t\t}\n\t\t\tKenedoPlatform::p()->redirect($this->redirectUrl);\n\t\t}\n\n\t}", "public function redirect404()\n\t{\n\t\t$this->page = new Page($this->app);\n\t\t$this->page->setView('404.php');\n\t\t$this->addHeader('HTTP/1.0 404 Not Found');\n \t$this->send();\n\t}", "public function redirect418(){\n\n\t\t$this->page = new PageGenerator($this->app);\n\t\t$this->page->setContentFile(__DIR__ . '/../Errors/418');\n\t\t\n\t\t$this->addHeader('HTTP/1.0 418 Not Found');\n\t\t\n\t\t$this->send();\n\t}", "function errorPage(string $title, string $message, int $code, string $template = null)\n{\n $data = [];\n // page information\n $data['code'] = $code;\n $data['title'] = $title;\n $data['message'] = $message;\n // the default template\n $render = 'error.twig';\n // template from the env file\n if (Env::has('ERROR_PAGE')) {\n $render = Env::get('ERROR_PAGE');\n }\n // custom template\n if (isset($template)) {\n $render = $template;\n }\n // check if the file exists\n if (!file_exists(VIEWS_DIR . 'renders' . DS . $render)) {\n throw new Exception(\"ERROR PAGE '{$render}' NOT EXISTS \");\n }\n // display the page\n view($render, $data, $code);\n}", "public static function error404()\r\n\t{\r\n\t\theader(\"HTTP/1.1 404 Not Found\");\r\n\t\theader(\"Status: 404 Not Found\");\r\n\t\texit();\r\n\t}", "public function index(){\t\n\t\tif ($this->checkLogin('A') == ''){\n\t\t\tredirect(ADMIN_PATH);\n\t\t}else {\n\t\t\tredirect(ADMIN_PATH.'/promocodes/display_promocodes');\n\t\t}\n\t}", "public function show404()\n {\n header(\"HTTP/1.1 404 Not Found\");\n $this->title .= 'ошибка 404'; \n $this->content = System::template('client/v_404.php');\n }", "private function getErrorPage($url){\r\n header(\"HTTP/1.0 404 Not Found\");\r\n die(strtoupper(\"error 404 $url not found\"));\r\n }", "public function successAction()\n\t{\n\t\t$this->_redirect('checkout/onepage/success', array('_secure'=>true));\n\t}", "private function redirectAndDie() {\n header('Location: ' . $_SERVER['PHP_SELF']);\n die;\n }", "public function postProcess()\n {\n /*\n * Oops, an error occured.\n */\n if (Tools::getValue('action') == 'error') {\n return $this->displayError('An error occurred while trying to redirect the customer');\n } else {\n $this->context->smarty->assign(array(\n 'cart_id' => Context::getContext()->cart->id,\n 'secure_key' => Context::getContext()->customer->secure_key,\n ));\n\n return $this->setTemplate('redirect.tpl');\n }\n }" ]
[ "0.6825298", "0.658131", "0.6461355", "0.6452078", "0.63881326", "0.6373711", "0.6307944", "0.6288244", "0.62805986", "0.62028325", "0.61670184", "0.61231375", "0.6107828", "0.6098752", "0.60912126", "0.60840523", "0.6056212", "0.60510856", "0.6049926", "0.59803665", "0.59573746", "0.5937079", "0.59132606", "0.59002876", "0.5888144", "0.5856041", "0.58361936", "0.58352125", "0.5824969", "0.5823999", "0.5823309", "0.5822201", "0.580981", "0.5804168", "0.580309", "0.5800346", "0.5799843", "0.57886803", "0.57872236", "0.57809997", "0.5777133", "0.57600594", "0.57474667", "0.5743951", "0.57177097", "0.5713119", "0.56955826", "0.56773573", "0.56742984", "0.56647485", "0.56635135", "0.5662129", "0.5653434", "0.564913", "0.5646591", "0.5642609", "0.5639439", "0.56325215", "0.56324244", "0.5630787", "0.5617506", "0.5613768", "0.56120926", "0.56095743", "0.5607814", "0.5594004", "0.55871975", "0.5585932", "0.5585599", "0.5579271", "0.5574088", "0.5573375", "0.55707884", "0.556835", "0.55561197", "0.5547073", "0.5542021", "0.5536715", "0.55227405", "0.5522644", "0.552257", "0.5520363", "0.551625", "0.5510164", "0.55098385", "0.550372", "0.5495321", "0.5492478", "0.54904324", "0.5485624", "0.5478723", "0.547688", "0.5461461", "0.54496264", "0.54494923", "0.544918", "0.5441337", "0.543133", "0.5429116", "0.5428383" ]
0.5906997
23
get array number day by month current
function getDay($month, $year) { if ( empty($year) ) { $year = date('Y'); } $day_arr = array(); if ( $month != 0 ) { $number = date('t', mktime(0, 0, 0, $month, 1, $year)); for ( $i = 1; $i <= $number; $i++ ) { $i = sprintf('%02d', $i); $day_arr[$i] = $i; } } return $day_arr; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_month_days_cm ($fecha) {\n $labels = array();\n $month = month_converter($fecha->month);\n $monthdays = cal_days_in_month(CAL_GREGORIAN, $fecha->month, $fecha->year);\n $i = 0;\n while ($i < $monthdays) {\n $i++;\n $labels[] = $i;\n }\n return $labels;\n}", "function getCurrentDayInMonthNumber ()\n\t{\n\t\treturn date ('j');\n\t}", "private function _daysInMonth ()\n {\n return date('t', strtotime($this->currentYear.'-'.$this->currentMonth));\n }", "function get_month_days ($month) {\n $labels = array();\n $month = month_converter($month);\n $monthdays = cal_days_in_month(CAL_GREGORIAN, $month, $date->format('Y'));\n $day = $date->format('d');\n $i = 0;\n while ($i < 30) {\n if ($day <= $monthdays) {\n if (strlen($day) == 1) {\n $day = '0' . $day;\n }\n if (strlen($month) == 1) {\n $month = '0' . $month;\n }\n $labels[] = $day.'-'.$month;\n $day++;\n $i++;\n } else {\n $day = 1;\n $month++;\n $monthdays = cal_days_in_month(CAL_GREGORIAN, $month, $date->format('Y'));\n }\n }\n return $labels;\n}", "function get_daily_weather_for_month( \n $y = 2014, \n $m = 01 )\n {\n $days = date( 't', mktime( 0, 0, 0, $m, 1, $y ) );\n $data = array();\n for ( $i = 1; $i <= $days; $i++ ) {\n $date = date( 'Y-m-d', mktime( 0, 0, 0, $m, $i, $y ) );\n $results = $this->_db->select( \n \"SELECT * \n FROM weather_days\n WHERE date_day = '\".$date.\"'\" );\n if ( is_object( $results[0] ) ) {\n $data[$i] = $results[0];\n }\n }\n return $data;\n }", "public function daysOfMonthProvider(): array\n {\n return [\n // Time Days Match?\n ['1st January', [1], true],\n ['2nd January', [1], false],\n ['2nd January', [2], true],\n ['2nd January', [1, 2], true],\n ['31st January', [1, 8, 23, 31], true],\n ['29th February 2020', [29], true],\n ];\n }", "public function getDaysAsArray()\n {\n $days = [];\n $startCurrent = $this->weekdayIndexes[$this->currentMonth[\"weekday\"]];\n $startPrevious = $this->noOfDaysPrevious - ($startCurrent - 1);\n // Add days of previous month\n for ($i = $startPrevious; $i <= $this->noOfDaysPrevious; $i++) {\n $days[] = $i;\n }\n // Add days of current month\n for ($j = 1; $j <= $this->noOfDays; $j++) {\n $days[] = $j;\n }\n // Add days of next month\n for ($k = 1; count($days) % 7 !== 0; $k++) {\n $days[] = $k;\n }\n return $days;\n }", "protected function getDaysArray($month, $year)\n\t{\n\t\t$daysinmonth = $this->days_in_month($month, $year);\n\t\t$domStar = false;\n\t\t$dowStar = false;\n\t\t$da = array_pad([], $daysinmonth + 1, null);\n\t\tunset($da[0]);\n\t\t$dwa = array_pad([], $daysinmonth + 1, null);\n\t\tunset($dwa[0]);\n\t\tforeach ($this->_attr[self::DAY_OF_MONTH] as $d) {\n\t\t\tif ($d['dom'] === '*' || $d['dom'] === '?') {\n\t\t\t\t$domStar = (($d['dom'] == '?') || ($d['period'] == 1));\n\t\t\t\tforeach ($da as $key => $value) {\n\t\t\t\t\tif (($key - 1) % $d['period'] == 0) {\n\t\t\t\t\t\t$da[$key] = 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} elseif (is_numeric($d['dom'])) {\n\t\t\t\t$startDay = $d['dom'];\n\t\t\t\tif ($d['domWeekday']) {\n\t\t\t\t\t$datea = getdate(strtotime(\"$year-$month-$startDay\"));\n\t\t\t\t\tif ($datea['wday'] == 6) {\n\t\t\t\t\t\tif ($startDay == 1) {\n\t\t\t\t\t\t\t$startDay = 3;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$startDay--;\n\t\t\t\t\t\t}\n\t\t\t\t\t} elseif ($datea['wday'] == 0) {\n\t\t\t\t\t\tif ($startDay == $daysinmonth) {\n\t\t\t\t\t\t\t$startDay = $daysinmonth - 2;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$startDay++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$endDay = $d['end'];\n\t\t\t\tif ($d['endWeekday']) {\n\t\t\t\t\t$datea = getdate(strtotime(\"$year-$month-$endDay\"));\n\t\t\t\t\tif ($datea['wday'] == 6) {\n\t\t\t\t\t\tif ($endDay == 1) {\n\t\t\t\t\t\t\t$endDay = 3;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$endDay--;\n\t\t\t\t\t\t}\n\t\t\t\t\t} elseif ($datea['wday'] == 0) {\n\t\t\t\t\t\tif ($endDay == $daysinmonth) {\n\t\t\t\t\t\t\t$endDay = $daysinmonth - 2;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$endDay++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfor ($i = $startDay; $i <= $endDay && $i <= 31; $i += $d['period']) {\n\t\t\t\t\t$da[$i] = 1;\n\t\t\t\t}\n\t\t\t} elseif ($d['dom'] == 'L') {\n\t\t\t\t$less = empty($d['end']) ? 0 : $d['end'];\n\t\t\t\t$da[$daysinmonth - $less] = 1;\n\t\t\t}\n\t\t}\n\t\t$firstDatea = getdate(strtotime(\"$year-$month-01\"));\n\t\tforeach ($this->_attr[self::DAY_OF_WEEK] as $d) {\n\t\t\tif (is_numeric($d['dow'])) {\n\t\t\t\t//start at the first sunday on or before the 1st day of the month\n\t\t\t\tfor ($i = 1 - $firstDatea['wday']; $i <= $daysinmonth; $i += 7) {\n\t\t\t\t\tfor ($ii = $d['dow']; ($ii <= $d['end']) && ($ii < 7) && (($i + $ii) <= $daysinmonth); $ii += $d['period']) {\n\t\t\t\t\t\t$iii = $i + $ii;\n\t\t\t\t\t\t$w = floor(($iii + 6) / 7);\n\t\t\t\t\t\t$lw = floor(($daysinmonth - $iii) / 7);\n\n\t\t\t\t\t\tif (($iii >= 0) && ((!$d['week'] || $d['week'] == $w) && (!$d['lastDow'] || $lw == 0))) {\n\t\t\t\t\t\t\t$dwa[$iii] = 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\t\tif ($dowStar) {\n\t\t\treturn $da;\n\t\t} elseif ($domStar) {\n\t\t\treturn $dwa;\n\t\t}\n\t\tforeach ($da as $key => $value) {\n\t\t\t$da[$key] = $value && ($dwa[$key] ?? 0);\n\t\t}\n\t\treturn $da;\n\t}", "function getDays_ym($month, $year){\n // Start of Month\n $start = new DateTime(\"{$year}-{$month}-01\");\n $month = $start->format('F');\n\n // Prepare results array\n $results = array();\n\n // While same month\n while($start->format('F') == $month){\n // Add to array\n $day = $start->format('D');\n $sort_date = $start->format('j');\n $date = $start->format('Y-m-d');\n $results[$date] = ['day' => $day,'sort_date' => $sort_date,'date' => $date];\n\n // Next Day\n $start->add(new DateInterval(\"P1D\"));\n }\n // Return results\n return $results;\n}", "function getDaysInMonth()\r\n {\r\n return Data_Calc::diasInMonth($this->mes, $this->ano);\r\n }", "function ShowDayOfMonth($get_month){\n\t$arr_d1 = explode(\"-\",$get_month);\n\t$xdd = \"01\";\n\t$xmm = \"$arr_d1[1]\";\n\t$xyy = \"$arr_d1[0]\";\n\t$get_date = \"$xyy-$xmm-$xdd\"; // วันเริ่มต้น\n\t//echo $get_date.\"<br>\";\n\t$xFTime1 = getdate(date(mktime(0, 0, 0, intval($xmm+1), intval($xdd-1), intval($xyy))));\n\t$numcount = $xFTime1['mday']; // ฝันที่สุดท้ายของเดือน\n\tif($numcount > 0){\n\t\t$j=1;\n\t\t\tfor($i = 0 ; $i < $numcount ; $i++){\n\t\t\t\t$xbasedate = strtotime(\"$get_date\");\n\t\t\t\t $xdate = strtotime(\"$i day\",$xbasedate);\n\t\t\t\t $xsdate = date(\"Y-m-d\",$xdate);// วันถัดไป\t\t\n\t\t\t\t $arr_d2 = explode(\"-\",$xsdate);\n\t\t\t\t $xFTime = getdate(date(mktime(0, 0, 0, intval($arr_d2[1]), intval($arr_d2[2]), intval($arr_d2[0]))));\t\n\t\t\t\t if($xFTime['wday'] == 0){\n\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($xFTime['wday'] != \"0\"){\n\t\t\t\t\t\t$arr_date[$j][$xFTime['wday']] = $xsdate;\t\n\t\t\t\t\t}\n\t\t\t\t \n\t\t\t}\n\t\t\t\n\t}//end if($numcount > 0){\n\treturn $arr_date;\t\n}", "private function daysDefault(){\n $data = array();\n\n for($i=1; $i<=31; $i++){\n $data['day_'.$i] = 0;\n }\n\n return $data;\n }", "function get_month()\n {\n $datearray=getdate($this->timestamp);\n return $datearray[\"mon\"];\n }", "private function _getDaysArray($month, $year = 0)\n {\n if ($year == 0)\n {\n $year = $this->year;\n }\n\n $days = array();\n\n // Return everyday of the month if both bit[2] and bit[4] are '*'\n if ($this->bits[2] == '*' AND $this->bits[4] == '*')\n {\n $days = $this->_getDays($month, $year);\n }\n else\n {\n // Create an array for the weekdays\n if (substr($this->bits[4], 0, 1) == '*')\n {\n if (substr($this->bits[4], 1, 1) == '/')\n {\n $step = (int) substr($this->bits[4], 2);\n }\n else\n {\n $step = 1;\n }\n \n for ($i = 0; $i <= 6; $i += $step)\n {\n $arWeekdays[] = $i;\n }\n }\n else\n {\n $arWeekdays = $this->_expandRanges($this->bits[4]);\n $arWeekdays = $this->_sanitize($arWeekdays, 0, 7);\n\n // Map 7 to 0, both represents Sunday. Array is sorted already!\n if (in_array(7, $arWeekdays))\n {\n if (in_array(0, $arWeekdays))\n {\n array_pop($arWeekdays);\n }\n else\n {\n $tmp[] = 0;\n array_pop($arWeekdays);\n $arWeekdays = array_merge($tmp, $arWeekdays);\n }\n }\n }\n\n if ($this->bits[2] == '*')\n {\n $daysmonth = $this->_getDays($month, $year);\n }\n else\n {\n $daysmonth = $this->_expandRanges($this->bits[2]);\n\n // So that we do not end up with 31 of Feb\n $daysInMonth = $this->_daysInMonth($month, $year);\n $daysmonth = $this->_sanitize($daysmonth, 1, $daysInMonth);\n }\n\n // Now match these days with weekdays\n foreach ($daysmonth AS $day)\n {\n $wkday = date('w', mktime(0, 0, 0, $month, $day, $year));\n if (in_array($wkday, $arWeekdays))\n {\n $days[] = $day;\n }\n }\n }\n\n return $days;\n }", "function get_day()\n {\n $datearray=getdate($this->timestamp);\n return $datearray[\"mday\"];\n }", "public static function getDaysInMonth($month, $year) {}", "private function _daysInMonth($month=null,$year=null){\n \n if(null==($year))\n $year = date(\"Y\",time()); \n \n if(null==($month))\n $month = date(\"m\",time());\n \n return date('t',strtotime($year.'-'.$month.'-01'));\n }", "private function _getDays($month, $year)\n {\n $daysInMonth = $this->_daysInMonth($month, $year);\n $days = array();\n\n for ($i = 1; $i <= $daysInMonth; $i++)\n {\n $days[] = $i;\n }\n\n return $days;\n }", "function getMonthArray()\n{\n\t$arrMonths = array();\n\n\tfor ($i=1; $i<13; $i++)\n\t{\n\t\t$arrMonths[$i] = date('M', mktime(0, 0, 1, $i, 1));\n\t}\n\t\n\treturn $arrMonths;\n}", "public function getMonthEn() \n {\n $month = array('January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December');\n \n return $month;\n }", "public function mes(){\n\n\t\t$date = $this->dia;\n $date = DateTime::createFromFormat('Y-m-d', $date);\n \t \n\t\treturn $date->format('m') - 1;\n\t}", "public function getTwelveMonth() {\n $result = array();\n $cur = strtotime(date('Y-m-01', time()));\n for ($i = 0; $i <= 11; $i++) {\n $result[$i] = date('M', $cur);\n $cur = strtotime('next month', $cur);\n }\n\n return $result;\n }", "function _makeMonth($date){\n // YYYY-MM and return an array of all the days\n // in the the month. The array that is returned\n // is in the same formate which is returned by\n // 'makeWeek' function\n $start = Carbon::parse($date)->startOfMonth();\n $end = Carbon::parse($date)->endOfMonth();\n $month = [];\n while ($start->lte($end)) {\n $carbon = $start;\n $month[] = $this->_makeDay($carbon);\n $start->addDay();\n }\n return $month;\n }", "public function SelectArrayStartingToday()\n {\n\t\t$ListOfDates;\n\t\t\n\t\t\n\t\t$TodayDay = $this->GetThisDay();\n\t\t$ThisMonth = date('m');\n\t\t$ThisYear = $this->GetThisYear();\n\t\t$NextYear = $ThisYear+1;\n\t\t$ListOfDates = [ $ThisYear, $NextYear ];\n\t\t\n\t\t$rangeMonths = array();\n\t\tfor ($i = $ThisMonth; $i <= 12; $i++ )\n\t\t{\n\t\t\tarray_push( $rangeMonths, $i);\n\t\t}\n\t\t$ListOfDates[$ThisYear] = $rangeMonths;\n\t\t\n\t\t$rangeMonths = array();\n\t\tfor ($i = 1; $i <= 12; $i++ )\n\t\t{\n\t\t\tarray_push($rangeMonths, $i );\n\t\t}\n\t\t$ListOfDates[$NextYear] = $rangeMonths;\n\t\t\n\t\t//Get the number of days in this month\n\t\t$NumberofDays = cal_days_in_month(CAL_GREGORIAN, $ThisMonth, $ThisYear);\n\t\t\n\t\t//Subtract NumberofDays by $TodayDay to get days left. 31 - 14 = 17days left 15, 16 , 17 to 31 \n\t\t$Daysleft = $NumberofDays - $TodayDay;\n\t\t$rangeofdaysleft = array(); // will hold the array of days left in the month, including today.\n\t\t\n\t\tfor( $i = $TodayDay; $i <= $NumberofDays; $i++ )\n\t\t{\n\t\t\tarray_push($rangeofdaysleft, $i);\n\t\t}\n\t\n\t\t//$ListOfDates[$ThisYear];\n\t\tfor( $i = $ThisMonth; $i <= 12 ; $i++)\n\t\t{\n\t\t\tif($i == $ThisMonth)\n\t\t\t{\n\t\t\t\t$ListOfDates[$ThisYear][$i] = $rangeofdaysleft;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$range = array();\n\t\t\t\t$MaxDays = cal_days_in_month(CAL_GREGORIAN, $i, $ThisYear);\n\t\t\t\tfor($d = 1; $d <= $MaxDays; $d++)\n\t\t\t\t{\n\t\t\t\t\tarray_push($range, $d);\n\t\t\t\t}\n\t\t\t\t$ListOfDates[$ThisYear][$i] = $range;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t//array_push($ListOfDates, $arrCurrentYear);\n\t\t\n\t\n\t\tfor( $i = 1 ; $i <= 12; $i++\t)\n\t\t{\n\t\t\t$range = array();\n\t\t\t$MaxDays = cal_days_in_month(CAL_GREGORIAN, $i, $NextYear);\n\t\t\tfor($d = 1; $d <= $MaxDays; $d++)\n\t\t\t{\n\t\t\t\tarray_push($range, $d);\n\t\t\t}\n\t\t\t$ListOfDates[$NextYear][$i] = $range;\n\t\t\t\n\t\t}\n\t\t//array_push($ListOfDates, $arrNextYear);\n\t\t\n\t\t\n\t\t\n\t\treturn json_encode($ListOfDates);\n\t\n\t}", "function getDayInMonthFromDate ($theDate)\n\t{\n\t\tif (gettype($theDate) == 'string')\n\t\t{\n\t\t\t$theDate = strtotime ($theDate);\n\t\t}\n\t\t$dateArray = getdate ($theDate);\n\t\treturn $dateArray ['mday'];\n\t}", "protected function getMonthValues()\r\n {\r\n\t $month = array();\r\n\t $month[1] = 'January';\r\n\t $month[2] = 'February';\r\n\t $month[3] = 'March';\r\n\t $month[4] = 'April';\r\n\t $month[5] = 'May';\r\n\t $month[6] = 'June';\r\n\t $month[7] = 'July';\r\n\t $month[8] = 'August';\r\n\t $month[9] = 'September';\r\n\t $month[10] = 'October';\r\n\t $month[11] = 'November';\r\n\t $month[12] = 'December';\t \r\n\t \r\n\t return $month;\r\n }", "function createNextMonthArray() { \n\t\t$date = date(\"Ymd\");\n\t\t$result = array($date);\n\n\n\t\tfor ($i=0; $i < 5; $i++) { \n\t\t\t$timestamp = strtotime($date);\n\t\t\t$date =date(\"Ymd\", strtotime('+1 day', $timestamp));\n\t\t\tarray_push($result,$date);\n\t\t}\n\t\treturn $result;\n\t}", "public function getNumberOfDays($month = \"\"){ $month = ($month == \"\")? $this->getMonth(): $month; return cal_days_in_month(CAL_GREGORIAN,$month,$this->getYear());}", "public function getDayOfMonth()\n {\n return $this->dayOfMonth;\n }", "protected function month(){\n return $this->now->format('m');\n }", "function _data_first_month_day()\n {\n $month = date('m');\n $year = date('Y');\n return date('Y-m-d', mktime(0, 0, 0, $month, 1, $year));\n }", "function _makeDay($carbon){\n $_date = $carbon->year.'-'.$carbon->month.'-'.$carbon->day;\n $day = $carbon->englishDayOfWeek;\n return [\n 'date' => $carbon->day,\n 'month' => $carbon->month,\n 'year' => $carbon->year,\n 'english_month' => $carbon->englishMonth,\n 'full_date' => $_date,\n 'day' => $day,\n 'items' => [],\n ];\n }", "function getDaysInMonth($y, $m)\n {\n return (int)Date_Calc::daysInMonth($m, $y);\n }", "function create_calendar_array($used_dates){\n\n\t//create array of dates for October with false attributes\n\t$october = array();\n\tfor($day=1;$day<=31;$day++){\n\t\t$october[$day]=FALSE;\n\t}\n\t\n\t//compare used dates to whole month\n\tforeach\t($used_dates as $post_id=>$date){\n\t\t$october[intval($date['day'])][]=$post_id;\n\t}\n\t\t\n\t\n\treturn $october;\n}", "protected function getMonthsArray()\n\t{\n\t\t$ma = array_pad([], 13, null);\n\t\tunset($ma[0]);\n\t\tforeach ($this->_attr[self::MONTH_OF_YEAR] as $m) {\n\t\t\tif (is_numeric($m['moy'])) {\n\t\t\t\tfor ($i = $m['moy']; $i <= $m['end'] && $i <= 12; $i += $m['period']) {\n\t\t\t\t\t$ma[$i] = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $ma;\n\t}", "function _data_first_month_day() {\r\n $month = date('m');\r\n $year = date('Y');\r\n return date('d/m/Y', mktime(0,0,0, $month, 1, $year));\r\n }", "public static function month_num($month){\n if (is_numeric($month)){\n return $month;\n }\n\n $m = array();\n $ret_val = 0;\n if (is_string($month)){\n /* $m = array(1 => 'january', 'february', 'march', 'april', 'may', 'june', 'july',\n 'august', 'september', 'october', 'november', 'december',); */\n $month = drupal_strtolower($month);\n for($ctr = 1; $ctr <= 12; $ctr++){\n $m[$ctr] = drupal_strtolower(date('F', mktime(0, 0, 0, $ctr, 1, date('Y'))));\n if ($m[$ctr] == $month){\n $ret_val = $ctr;\n break;\n }\n }\n }\n\n return $ret_val;\n\n }", "function daysInMonth( $month=0, $year=0 ) {\n\t\t$month = intval( $month );\n\t\t$year = intval( $year );\n\t\tif (!$month) {\n\t\t\tif (isset( $this )) {\n\t\t\t\t$month = $this->month;\n\t\t\t} else {\n\t\t\t\t$month = date( \"m\" );\n\t\t\t}\n\t\t}\n\t\tif (!$year) {\n\t\t\tif (isset( $this )) {\n\t\t\t\t$year = $this->year;\n\t\t\t} else {\n\t\t\t\t$year = date( \"Y\" );\n\t\t\t}\n\t\t}\n\t\tif ($month == 2) {\n\t\t\tif (($year % 4 == 0 && $year % 100 != 0) || $year % 400 == 0) {\n\t\t\t\treturn 29;\n\t\t\t} else {\n\t\t\t\treturn 28;\n\t\t\t}\n\t\t} else if ($month == 4 || $month == 6 || $month == 9 || $month == 11) {\n\t\t\treturn 30;\n\t\t} else {\n\t\t\treturn 31;\n\t\t}\n\t}", "function getCurrentMonthNumDays() {\n\t\treturn $this->_currentMonthNumDays;\n\t}", "function _data_first_month_day() {\n\t$month = date('m');\n\t$year = date('Y');\n\treturn date('Y-m-d', mktime(0,0,0, $month, 1, $year));\n}", "function getMonth(){\r\n return date('F',$this->timestamp);\r\n }", "function find_day_of_month ($n, $day, $month, $year)\n{\n\tglobal $time_zone_offset;\n\n\t$times_day_found = 0;\n\t$date_month = $month;\n\t$date = 1;\n\twhile (($times_day_found < $n || $n == 'last') && $date_month == $month)\n\t{\n\t\t$time = parse_date(\"$month $date, $year\");\n\t\t$date_month = date('M', $time + $time_zone_offset);\n\t\t$day_found = date('D', $time + $time_zone_offset);\n\n\t\tif ($day_found == $day)\n\t\t{\n\t\t\t$times_day_found++;\n\t\t}\n\n\t\t$date++;\n\t}\n\n\treturn $time;\n}", "public static function getMonths() \n\t {\n\t\t $month=array(1,2,3,4,5,6,7,8,9,10,11,12);\n\t\t return $month;\n\t }", "private function getDatesInMonth() {\n $viewer = $this->getViewer();\n\n $timezone = new DateTimeZone($viewer->getTimezoneIdentifier());\n\n $month = $this->month;\n $year = $this->year;\n\n list($next_year, $next_month) = $this->getNextYearAndMonth();\n\n $end_date = new DateTime(\"{$next_year}-{$next_month}-01\", $timezone);\n\n list($start_of_week, $end_of_week) = $this->getWeekStartAndEnd();\n\n $days_in_month = id(clone $end_date)->modify('-1 day')->format('d');\n\n $first_month_day_date = new DateTime(\"{$year}-{$month}-01\", $timezone);\n $last_month_day_date = id(clone $end_date)->modify('-1 day');\n\n $first_weekday_of_month = $first_month_day_date->format('w');\n $last_weekday_of_month = $last_month_day_date->format('w');\n\n $day_date = id(clone $first_month_day_date);\n\n $num_days_display = $days_in_month;\n if ($start_of_week !== $first_weekday_of_month) {\n $interim_start_num = ($first_weekday_of_month + 7 - $start_of_week) % 7;\n $num_days_display += $interim_start_num;\n\n $day_date->modify('-'.$interim_start_num.' days');\n }\n if ($end_of_week !== $last_weekday_of_month) {\n $interim_end_day_num = ($end_of_week - $last_weekday_of_month + 7) % 7;\n $num_days_display += $interim_end_day_num;\n $end_date->modify('+'.$interim_end_day_num.' days');\n }\n\n $days = array();\n\n for ($day = 1; $day <= $num_days_display; $day++) {\n $day_epoch = $day_date->format('U');\n $end_epoch = $end_date->format('U');\n if ($day_epoch >= $end_epoch) {\n break;\n } else {\n $days[] = clone $day_date;\n }\n $day_date->modify('+1 day');\n }\n\n return $days;\n }", "public function getIncomeDaysWeek() {\r\n $month_array = array();\r\n $income_days = Income::where('resto_id', Session::get('id'))->pluck('added_on');\r\n $income_days = json_decode( $income_days );\r\n $i = 0;\r\n foreach($income_days as $date) {\r\n $date_name = Carbon::createFromFormat('Y-m-d', $date)->format('d M Y');\r\n $month_array[$i] = $date_name;\r\n $i++;\r\n\r\n }\r\n return $month_array;\r\n }", "function this_month()\n{\n global $db; // golbalize db variable:\n $thisMonth = array(\n \"start\" => date('Y-m-d', strtotime('first day of this month', strtotime(date('Y-m-d')))),\n \"end\" => date('Y-m-d', strtotime('last day of this month', strtotime(date('Y-m-d'))))\n );\n $datesIds = $db->getMany(DATES, [\n 'date' => $thisMonth['start'],\n 'dates.date' => $thisMonth['end']\n ], ['id', 'date'], ['date' => '>=', 'dates.date' => '<=']);\n\n if ($db->count > 0) {\n return $datesIds;\n }\n}", "public function Dates() {\r\n $dates = [];\r\n for ($i = 1; $i <= 31; $i++) {\r\n $dates[$i] = $i;\r\n }\r\n return $dates;\r\n }", "function live_get_current_daily(): array\r\n{\r\n\tglobal $DATABASE;\r\n\tglobal $UNIX_TIMESTAMP;\r\n\t\r\n\t$out = [];\r\n\t$group = $DATABASE->execute_query('SELECT MAX(daily_category), MIN(daily_category) FROM `daily_rotation`')[0];\r\n\t$max_group = $group[0];\r\n\t$min_group = $group[1];\r\n\t\r\n\tfor($i = $min_group; $i <= $max_group; $i++)\r\n\t{\r\n\t\t$current_days = intdiv($UNIX_TIMESTAMP, 86400);\r\n\t\t$current_rot = $DATABASE->execute_query(\"SELECT live_id FROM `daily_rotation` WHERE daily_category = $i\");\r\n\t\t$out[] = $current_rot[$current_days % count($current_rot)][0];\r\n\t}\r\n\t\r\n\treturn $out;\r\n}", "protected function compileDays()\n\t{\n\t\t$arrDays = array();\n\n\t\tfor ($i=0; $i<7; $i++)\n\t\t{\n\t\t\t$intCurrentDay = ($i + $this->cal_startDay) % 7;\n\t\t\t$arrDays[$intCurrentDay] = $GLOBALS['TL_LANG']['DAYS'][$intCurrentDay];\n\t\t}\n\n\t\treturn $arrDays;\n\t}", "public function empty_days(string $month, int $year){\r\n $active_month = static::month_str_to_int($month);\r\n $first_date_of_month = new DateTime(\"$year-$month-1\");\r\n $first_day_of_month = $first_date_of_month->format('D');\r\n switch ($first_day_of_month) {\r\n case \"Mon\":\r\n $empty_days = 0;\r\n break;\r\n case \"Tue\":\r\n $empty_days = 1;\r\n break;\r\n case \"Wed\":\r\n $empty_days = 2;\r\n break;\r\n case \"Thu\":\r\n $empty_days = 3;\r\n break;\r\n case \"Fri\":\r\n $empty_days = 4;\r\n break\r\n ;case \"Sat\":\r\n $empty_days = 5;\r\n break;\r\n case \"Sun\":\r\n $empty_days = 6;\r\n break;\r\n default: die(\"wrong m/y format\");\r\n } \r\n return $empty_days; \r\n \r\n }", "function getMonthDir() {\n return date(\"Y_m\");\n }", "public function getMonth() \n {\n $month = array('Januar', 'Februar', 'Mart', 'April', 'Maj', 'Juni', 'Juli', 'Avgust', 'Septembar', 'Octobar', 'Novembar', 'Decembar');\n \n return $month;\n }", "function getCurrentMonthNumber ()\n\t{\n\t\treturn date('m');\n\t}", "public static function getDays()\n\t {\n\t\t $days=array(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31);\n\t\t return $days;\n\t }", "public function getCalendarColumns() {\n $dates = array();\n $date = new DateTime();\n\n $dates[] = $date->format(\"Y-m\");\n\n for ($i = 1; $i < 12; $i++) {\n $date->modify('+1 month');\n $dates[] = $date->format(\"Y-m\");\n }\n return $dates;\n }", "function days_in_month($month, $year)\n{\n\treturn $month == 2 ? ($year % 4 ? 28 : ($year % 100 ? 29 : ($year % 400 ? 28 : 29))) : (($month - 1) % 7 % 2 ? 30 : 31);\n}", "function getFirstDayInMonth($y, $m)\n {\n return (int)Date_Calc::dayOfWeek(1, $m, $y);\n }", "public function getCurrentMonthData() {\n\t\t//return $this->getDataByInterval($currentMonth, $currentYear, $currentMonth, $currentYear);\n\t\t$dates = getPeriods('CurrentMonth');\n\t\treturn $this->getDataByInterval($dates['startMonth'], $dates['startYear'], $dates['endMonth'], $dates['endYear']);\t\t\n\t}", "protected function unav_days_to_dates(string $month, int $year, Room $room_for_check){\r\n $days = $this->row_to_days($month, $year, $room_for_check);\r\n// var_dump($days);\r\n \r\n if (!$days){\r\n return;\r\n }\r\n\r\n $this->year = $year;\r\n $this->active_month = $month;\r\n\r\n $unav_dates_in_month = array();\r\n \r\n foreach($days as $day){\r\n $fixed_month = ucfirst ($this->active_month); \r\n $date_string = $day.\"/\".$fixed_month.\"/\".$this->year;\r\n $new_date = DateTime::createFromFormat('d/M/Y', $date_string);\r\n// var_dump($new_date);\r\n $unav_dates_in_month[] = $new_date;\r\n// var_dump($new_date->format('d/M/Y'));\r\n\r\n //OVIM SU NAPRAVLJENI DATUMI ZA POREDJENJE OD UNESENIH ARGUMENATA\r\n }\r\n// var_dump($unav_dates_in_month);\r\n $this->$month = $unav_dates_in_month;\r\n return $unav_dates_in_month;\r\n}", "public function get_days() {\n\t\t\treturn iterator_to_array( $this->days );\n\t\t}", "public function daily()\n {\n $days = [];\n if ($this->daily) {\n setlocale(LC_ALL, 'sv_SV');\n $comingDays = array_slice($this->daily[\"data\"], 1, 30);\n foreach ($comingDays as $i => $data) {\n if ($data[\"time\"]) {\n $this->parseDate(\"daily\", $i, $data[\"time\"]);\n $days[$i] = $this->pushInfo(\n $this->daily[\"data\"][$i],\n [\n \"weekday\",\n \"date\",\n \"icon\",\n \"summary\",\n \"temperatureMax\",\n \"apparentTemperatureMax\",\n \"temperatureMin\",\n \"apparentTemperatureMin\",\n \"time\"\n ]\n );\n }\n }\n }\n return $days;\n }", "function ordinal_day($ord, $day, $month, $year) {\n\n\t$firstOfMonth = get_timestamp(\"$year-$month-01\");\n\t$lastOfMonth = $firstOfMonth + date(\"t\", $firstOfMonth) * 86400;\n\t$dayOccurs = 0;\n\n\tfor ($i = $firstOfMonth; $i < $lastOfMonth ; $i += 86400){\n\t\tif (date(\"D\", $i) == $day){\n\t\t\t$dayOccurs++;\n\t\t\tif ($dayOccurs == $ord){\n\t\t\t\t$ordDay = $i;\n\t\t\t}\n\t\t}\n\t}\n\treturn $ordDay;\n}", "public function getCurrentMonth() {\n return date('m');\n }", "protected function get_mes()\n {\n $date = DB::SELECT(\"SELECT TO_CHAR(CURRENT_DATE,'MONTH') AS mes;\");\n foreach($date as $fecha)\n {\n $mes = $fecha->mes;\n }\n return $mes; \n }", "function get_month_to_search() {\n global $DB;\n $sql = \"SELECT date AS fecha FROM {report_user_statistics};\";\n $dates = $DB->get_records_sql($sql);\n $result = array();\n foreach ($dates as $date) {\n $fecha = new DateTime(\"@$date->fecha\");\n $result[$fecha->format('m')] = month_converter($fecha->format('m'));\n }\n return $result;\n}", "public static function getCurrentMonth() {\n return date('n');\n }", "function getDay()\r\n {\r\n return $this->dia;\r\n }", "function getNbDayInMonth()\n {\n return $this->nbDaysMonth;\n }", "function days_in_month($month, $year)\n\t{\n\t\tif(checkdate($month, 31, $year)) return 31;\n\t\tif(checkdate($month, 30, $year)) return 30;\n\t\tif(checkdate($month, 29, $year)) return 29;\n\t\tif(checkdate($month, 28, $year)) return 28;\n\t\treturn 0; // error\n\t}", "public function takePostBaseOnMonth();", "function daysInMonth($m, $y)\n\t{\n\t\tif( $m < 1 || $m > 12 )\n\t\t{\n\t\t\treturn 0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// 30: 9, 4, 6, 11\n\t\t\tif( $m == 9 || $m == 4 || $m == 6 || $m == 11 )\n\t\t\t{\n\t\t\t\treturn 30;\n\t\t\t}\n\t\t\telse if( $m != 2 )\n\t\t\t{\n\t\t\t\t// all the rest have 31\n\t\t\t\treturn 31;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// except for february alone\n\t\t\t\tif( $y % 4 != 0 )\n\t\t\t\t{\n\t\t\t\t\t// which has 28\n\t\t\t\t\treturn 28;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif( $y % 100 != 0 ) \n\t\t\t\t\t{\n\t\t\t\t\t\t// and on leap years 29\n\t\t\t\t\t\treturn 29;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tif( $y % 400 != 0 )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// deja vu: which has 28\n\t\t\t\t\t\t\treturn 28;\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// deja vu: and on leap years 29\n\t\t\t\t\t\t\treturn 29;\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}", "public function indivMonthly(Request $request){\n $id = $request->SLAVE_ID;\n $year = date('Y');\n $month = [];\n for($i = 1; $i<=12; $i++){\n $perMonth = 0;\n $res = EMeterData::where('METER_ID',$id)\n ->whereMonth('CREATED_AT', '=', $i)\n ->whereYear('CREATED_AT','=',$year)->latest()->first();\n if (!empty($res) || $res == !null) {\n $perMonth += $res->CURRENT_MONTH_KWH;\n $perMonth = round($perMonth, 4);\n }\n $json = array(\n 'months' => date('D F d Y H:i:s O',mktime(0,0,0,$i,25)),\n 'usage' => $perMonth,\n );\n array_push($month,$json);\n }\n return $month;\n }", "function num_to_days($array){\n foreach ($array as $key => $value){\n $array[$key] = date('D', strtotime(\"Sunday +{$value} days\"));\n }\n return $array;\n }", "function semanasMes($year,$month){\n \n # Obtenemos el ultimo dia del mes\n $ultimoDiaMes=date(\"t\",mktime(0,0,0,$month,1,$year)); \n # Obtenemos la semana del primer dia del mes\n $primeraSemana=date(\"W\",mktime(0,0,0,$month,1,$year)); \n # Obtenemos la semana del ultimo dia del mes\n $ultimaSemana=date(\"W\",mktime(0,0,0,$month,$ultimoDiaMes,$year)); \n # Devolvemos en un array los dos valores\n return array($primeraSemana,$ultimaSemana);\n \n}", "public function getMonths();", "public function days_in_month($month, $year)\n\t{\n\t\treturn $month == 2 ? ($year % 4 ? 28 : ($year % 100 ? 29 : ($year % 400 ? 28 : 29))) : (($month - 1) % 7 % 2 ? 30 : 31);\n\t}", "function days_to_num($array){\n foreach ($array as $key => $value){\n $array[$key] = date('N',strtotime($value));\n }\n return $array;\n }", "function getDay(){\r\n return date('l',$this->timestamp);\r\n }", "function days($day, $month, $year) {\n\t\t// Hour, Minute, Second, Month, Day, Year\n\t\t$target = mktime(0, 0, 0, $month, $day, $year);\n\t\t$today = time();\n\t\t$difference = ($target - $today);\n\t\t$days = (int)($difference/86400); // 86400 being the number of seconds in a day\n\t\t\n\t\t// Make sure that we show the correct number of zeros when the number gets smaller\n\t\t// + if the date passes then we don't show a minus value\n\t\tif ($days < 0) {\n\t\t\t$days = '000';\n\t\t} else if ($days < 10) {\n\t\t\t$days = '00'.$days;\n\t\t} else if ($days < 100) {\n\t\t\t$days = '0'.$days;\n\t\t} \n\t\t\n\t\t// Needs to be returned as a String so we can split it into individual characters\n\t\treturn (String)$days;\n\t}", "public function get_data_index($any, $mes)\n {\n $ret = array();\n $els = Incidencies::whereMonth('data', '=', date($mes))->whereYear('data', '=', date($any))->get();\n foreach ($els as $el) {\n $item=array(\"id\"=>$el->id, \"name\"=>$el->user['name'], \"data\"=>$el->data, \"inici\"=>$el->inici, \"fi\"=>$el->fi, \"incidencia\"=>$el->incidencia);\n array_push($ret, $item);\n }\n return $ret;\n }", "public function getDay() : int \n {\n return $this->day;\n }", "public static function getDateArray($baseDate) {\n\t\t$ra = array();\n\t\t$month = substr($baseDate,5,2);\n\t\t$day = substr($baseDate,8,2);\n\t\t$year = substr($baseDate,0,4);\n\t\t$ra = getDate(mktime(9,0,0,$month,$day,$year));\n\t\treturn $ra;\n\t}", "function int_to_day($int){\n\tglobal $days;\n\treturn $days[$int];\n}", "function getMonthIndex()\n {\n return $this->currentMonthIndex;\n }", "function daysOnMonth($month, $year) {\n\tif (month <= 0) {\n\t\t$year -= 1;\n\t\t$month += 12;\n\t}\n\tif ( in_array( $month, array(4,6,9,11) ) ) return 30;\n\telseif ($month == 2) {\n\t\tif ( isBissextile($year) ) return 29;\n\t\telse return 28;\n\t} else return 31;\n}", "public function getDay()\n {\n return $this->_getDateValue('d');\n }", "public static function getMonthDates()\n {\n $current_year = date('Y-01-01 00:00:00');\n $month_names = self::getMonthNames();\n $months = array();\n for ($i=0; $i<12; $i++) {\n $months[$i] = array( 'name'=>$month_names[$i],'date'=>date('Y-m-d 00:00:00',strtotime(\"$current_year + $i months\")));\n }\n\n return $months;\n }", "public function Months() {\r\n// $months = array(1 => 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December');\r\n $months = array(1 => 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sept', 'Oct', 'Nov', 'Dec');\r\n return $months;\r\n }", "function _data_last_month_day()\n {\n $month = date('m');\n $year = date('Y');\n $day = date(\"d\", mktime(0, 0, 0, $month + 1, 0, $year));\n\n return date('Y-m-d', mktime(0, 0, 0, $month, $day, $year));\n }", "protected function getThisMonthInterval(): array\n\t{\n\t\treturn [\n\t\t\tnew \\DateTime(date('Y-m-01', strtotime(date('Y-m-d')))),\n\t\t\tnew \\DateTime(date('Y-m-t', strtotime(date('Y-m-d'))))\n\t\t];\n\t}", "function getMonth()\r\n {\r\n return $this->mes;\r\n }", "public static function daysInMonth($month, $year)\n {\n return cal_days_in_month(CAL_GREGORIAN, $month, $year);\n }", "function _data_last_month_day() {\n\t$month = date('m');\n\t$year = date('Y');\n\t$day = date(\"d\", mktime(0,0,0, $month+1, 0, $year));\n\n\treturn date('Y-m-d', mktime(0,0,0, $month, $day, $year));\n}", "public function get_month_permastruct()\n {\n }", "public static function getDayName() {\n $fecha = [\n 'dia' => ['domingo','lunes','martes','miercoles','jueves','viernes','sabado',],\n 'mes' => ['enero','febrero','marzo','abril','mayo','junio','julio',\n 'agosto','septiembre','octubre','noviembre','diciembre']\n ];\n return $fecha;\n }", "function totalHari($month,$year){\n $jumlah = cal_days_in_month(CAL_GREGORIAN,$month,$year);\n return $jumlah;\n}", "public function getMonth($date){\n // OUTPUT : JSON format of all the month according the the DB\n $month = $this->_makeMonth($date);\n for($i = 0; $i < count($month); $i += 1){\n $_day = $month[$i];\n $day = \\App\\Day::where('date', $_day['full_date'])->first(); // Same as in $this->getWeek($date)\n if ($day != null){\n foreach($day->Agenda as $agenda){\n $month[$i]['items'][] = $this->_makeAgenda($agenda);\n }\n }\n }\n return $month;\n }", "public function getFirstDay(){$day = getdate(mktime(0, 0, 0, $this->getMonth(), 1, $this->getYear())); return $day['wday'];}", "public function getMonth()\n {\n return $this->_getDateValue('m');\n }", "public static function listMonth()\r\n {\r\n $mes[1] = 'Janeiro';\r\n $mes[2] = 'Fevereiro';\r\n $mes[3] = 'Março';\r\n $mes[4] = 'Abril';\r\n $mes[5] = 'Maio';\r\n $mes[6] = 'Junho';\r\n $mes[7] = 'Julho';\r\n $mes[8] = 'Agosto';\r\n $mes[9] = 'Setembro';\r\n $mes[10] = 'Outubro';\r\n $mes[11] = 'Novembro';\r\n $mes[12] = 'Dezembro';\r\n\r\n return $mes;\r\n }" ]
[ "0.6923537", "0.6776679", "0.6755445", "0.66507155", "0.66411805", "0.6601844", "0.65470237", "0.65130025", "0.6460665", "0.64301217", "0.6428734", "0.637385", "0.6306657", "0.6304316", "0.62353903", "0.61570704", "0.61460215", "0.6082594", "0.6061218", "0.6047434", "0.60170555", "0.5999408", "0.59577006", "0.5947453", "0.59359235", "0.59295714", "0.5917627", "0.5908068", "0.59025484", "0.5883601", "0.5883074", "0.58825517", "0.5875207", "0.5862767", "0.58547723", "0.5853638", "0.5852404", "0.58395493", "0.58167404", "0.5812621", "0.577598", "0.57745075", "0.574409", "0.5735017", "0.57266843", "0.5720735", "0.57157785", "0.571176", "0.5706565", "0.5700597", "0.56875235", "0.566542", "0.56575143", "0.5656402", "0.56411207", "0.5639265", "0.5638386", "0.56379354", "0.56225353", "0.5613333", "0.5611261", "0.56023586", "0.55929226", "0.55922836", "0.55899614", "0.5584426", "0.5581811", "0.5578822", "0.5575746", "0.5572508", "0.55587655", "0.5553984", "0.55492294", "0.5543533", "0.5540748", "0.5534395", "0.55314183", "0.55252016", "0.55217457", "0.5520297", "0.5517462", "0.5515357", "0.55100244", "0.5509081", "0.5508668", "0.55032843", "0.5503206", "0.5499255", "0.5495003", "0.5488386", "0.54819304", "0.5480687", "0.5478904", "0.5476212", "0.547547", "0.5475081", "0.5466445", "0.5445489", "0.54434997", "0.5443482" ]
0.70013785
0
ex: 20160711, 1 return array( '20160710' => 20160710, '20160711' => 20160711, '20160712' => 20160712, )
function getSomeDayFromDay($currentDay, $number) { if ( $number == 0 ) { return $tmpDates[$currentDay] = $currentDay; } $tmpDates = array(); $newdate = ''; for ( $i = $number; $i >= 1; $i-- ) { $newdate = strtotime ( '-' . $i . ' day' , strtotime ( $currentDay ) ) ; $newdate = date ( 'Y-m-j' , $newdate ); $tmpDates[$newdate] = $newdate; } $tmpDates[$currentDay] = $currentDay; for ( $i = 1; $i <= $number; $i++ ) { $newdate = strtotime ( '+' . $i . ' day' , strtotime ( $currentDay ) ) ; $newdate = date ( 'Y-m-j' , $newdate ); $tmpDates[$newdate] = $newdate; } return $tmpDates; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createNextMonthArray() { \n\t\t$date = date(\"Ymd\");\n\t\t$result = array($date);\n\n\n\t\tfor ($i=0; $i < 5; $i++) { \n\t\t\t$timestamp = strtotime($date);\n\t\t\t$date =date(\"Ymd\", strtotime('+1 day', $timestamp));\n\t\t\tarray_push($result,$date);\n\t\t}\n\t\treturn $result;\n\t}", "public static function date_keys()\n {\n $nullable = static::$nullable??[];\n $zero_date = static::$zero_date??[];\n\t\t$zero_datetime = static::$zero_datetime??[];\n return array_merge($nullable,$zero_date,$zero_datetime);\n }", "public function getArray()\n{\n\t$ts=$this->getTimestamp();return array('year'=>date('Y',$ts),'month'=>date('m',$ts),'day'=>date('d',$ts),'hour'=>date('H',$ts),'minute'=>date('i',$ts),'second'=>date('s',$ts));\n}", "function getMonthArray()\n{\n\t$arrMonths = array();\n\n\tfor ($i=1; $i<13; $i++)\n\t{\n\t\t$arrMonths[$i] = date('M', mktime(0, 0, 1, $i, 1));\n\t}\n\t\n\treturn $arrMonths;\n}", "function createDateRangeArray($strDateFrom,$strDateTo)\n{\n // inclusive array of the dates between the from and to dates.\n\n // could test validity of dates here but I'm already doing\n // that in the main script\n $i=0;\n $aryRange=array();\n\n//$aryRange[] = array(\"DATA\"=>\"\");\n\n $iDateFrom=mktime(1,0,0,substr($strDateFrom,5,2), substr($strDateFrom,8,2),substr($strDateFrom,0,4));\n $iDateTo=mktime(1,0,0,substr($strDateTo,5,2), substr($strDateTo,8,2),substr($strDateTo,0,4));\n\n if ($iDateTo>=$iDateFrom)\n {\n// array_push($aryRange,date('Y-m-d',$iDateFrom)); // first entry\n// array_push($aryRange[\"DATA\"],date('Y-m-d',$iDateFrom)); // first entry\n$aryRange[] = array(\"DATE\"=>date('Y-m-d',$iDateFrom), 'KEY=>'.$i);\n$i=$i+1;\n\n//$array[] = $var;\n\n while ($iDateFrom<$iDateTo)\n {\n $iDateFrom+=86400; // add 24 hours\n// array_push($aryRange,date('Y-m-d',$iDateFrom));\n// array_push($aryRange[\"DATA\"],date('Y-m-d',$iDateFrom));\n//$aryRange[] = array(\"DATE\"=>date('Y-m-d',$iDateFrom));\n$aryRange[] = array(\"DATE\"=>date('Y-m-d',$iDateFrom), 'KEY=>'.$i);\n$i=$i+1;\n\n }\n }\n$aryRange=array_reverse($aryRange);\n\n return $aryRange;\n}", "function create_calendar_array($used_dates){\n\n\t//create array of dates for October with false attributes\n\t$october = array();\n\tfor($day=1;$day<=31;$day++){\n\t\t$october[$day]=FALSE;\n\t}\n\t\n\t//compare used dates to whole month\n\tforeach\t($used_dates as $post_id=>$date){\n\t\t$october[intval($date['day'])][]=$post_id;\n\t}\n\t\t\n\t\n\treturn $october;\n}", "function get_years_to_search() {\n global $DB;\n $sql = \"SELECT date AS fecha FROM {report_user_statistics};\";\n $dates = $DB->get_records_sql($sql);\n $result = array();\n foreach ($dates as $date) {\n $fecha = new DateTime(\"@$date->fecha\");\n $result[$fecha->format('Y')] = $fecha->format('Y');\n }\n return $result;\n}", "function createDateRangeArray( $strDateFrom,$strDateTo,$format ) {\n \n $aryRange=array();\n if ( $format == \"european\" ) {\n\t\t$iDateFrom=mktime(1,0,0,substr($strDateFrom,3,2),substr($strDateFrom,0,2),substr($strDateFrom,6,4));\n\t\t$iDateTo=mktime(1,0,0,substr($strDateTo,3,2),substr($strDateTo,0,2),substr($strDateTo,6,4));\n\t} else if ( $format == \"american\" ) {\n\t\t$iDateFrom=mktime(1,0,0,substr($strDateFrom,0,2),substr($strDateFrom,3,2),substr($strDateFrom,6,4));\n\t\t$iDateTo=mktime(1,0,0,substr($strDateTo,0,2),substr($strDateTo,3,2),substr($strDateTo,6,4));\n\t}\n\n\t\n if ($iDateTo>=$iDateFrom) {\n if ( $format == \"european\" ) {\n\t\t\tarray_push($aryRange, date('d-m-Y',$iDateFrom)); \n\t\t} else if ( $format == \"american\" ) {\n\t\t\tarray_push($aryRange,date('m/d/Y',$iDateFrom)); \n\t\t}\n while ($iDateFrom<$iDateTo) {\n $iDateFrom+=86400; // add 24 hours\n if ( $format == \"european\" ) {\n\t\t\t\tarray_push($aryRange,date('d-m-Y',$iDateFrom)); \n\t\t\t} else if ( $format == \"american\" ) {\n\t\t\t\tarray_push($aryRange,date('m/d/Y',$iDateFrom)); \n\t\t\t}\n }\n }\n\t\n return $aryRange;\n}", "function makeArray($res,$from,$to,$exc_entries){\n /* order result by days */\n\t\t$entries=array();\n\t\twhile ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {\n\t\t\t$row = $this->setItems($row, $from, $to, $exc_entries);\n if (is_array($row)) {\n\t\t\t\tforeach($row as $item){\n\t\t\t\t\t$d = strftime('%d', $item['begin']);\n\t\t\t\t\t$m = strftime('%m', $item['begin']);\n\t\t\t\t\t $entries[$m][$d][] = $item;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $entries;\n\t}", "function createDateRangeArray($strDateFrom,$strDateTo)\n{\n // inclusive array of the dates between the from and to dates.\n\n // could test validity of dates here but I'm already doing\n // that in the main script\n\n $aryRange=array();\n\n $iDateFrom=mktime(1,0,0,substr($strDateFrom,5,2), substr($strDateFrom,8,2),substr($strDateFrom,0,4));\n $iDateTo=mktime(1,0,0,substr($strDateTo,5,2), substr($strDateTo,8,2),substr($strDateTo,0,4));\n\n if ($iDateTo>=$iDateFrom)\n {\n array_push($aryRange,date('Y-m-d',$iDateFrom)); // first entry\n while ($iDateFrom<$iDateTo)\n {\n $iDateFrom+=86400; // add 24 hours\n array_push($aryRange,date('Y-m-d',$iDateFrom));\n }\n }\n return $aryRange;\n}", "private function createDateRangeArray($strDateFrom,$strDateTo)\n{\n // inclusive array of the dates between the from and to dates.\n\n // could test validity of dates here but I'm already doing\n // that in the main script\n\n $aryRange=array();\n\n $iDateFrom=mktime(1,0,0,substr($strDateFrom,5,2), substr($strDateFrom,8,2),substr($strDateFrom,0,4));\n $iDateTo=mktime(1,0,0,substr($strDateTo,5,2), substr($strDateTo,8,2),substr($strDateTo,0,4));\n\n if ($iDateTo>=$iDateFrom)\n {\n array_push($aryRange,date('Y-m-d',$iDateFrom)); // first entry\n while ($iDateFrom<$iDateTo)\n {\n $iDateFrom+=86400; // add 24 hours\n array_push($aryRange,date('Y-m-d',$iDateFrom));\n }\n }\n return $aryRange;\n}", "public function to_array()\r\n {\r\n $d = array();\r\n if($this->start) {\r\n $d['start'] = PiplApi_Utils::piplapi_date_to_str($this->start);\r\n }\r\n if($this->end){\r\n $d['end'] = PiplApi_Utils::piplapi_date_to_str($this->end);\r\n }\r\n return $d;\r\n }", "function CGI2Dates()\n {\n $dateids=$this->CGI_POSTint($this->DatesSelectField);\n if (empty($dateids))\n {\n $date=$this->CGI_GETOrPOSTint($this->DateGETField);\n if (!empty($date))\n {\n $dateids=array($date);\n }\n else\n {\n $dateids=array();\n foreach ($this->Dates() as $did => $date)\n {\n array_push($dateids,$date[ \"ID\" ]);\n }\n }\n }\n\n return $dateids;\n }", "public function getDateList()\n {\n $return = array();\n \n for (\n $i = strtotime($this->from_date); \n $i <= strtotime($this->to_date); \n $i = strtotime('+ 1 day', $i)\n )\n {\n $date = date('Y-m-d', $i);\n $weekday = date('w', $i);\n $weekend = (in_array($weekday, array(0,6))) ? true : false;\n $calendarWeek = (int) date('W', $i); //cast to integer to remove leading 0\n \n $return[$date] = array('date' => $date, 'weekend' => $weekend, 'calendarWeek' => $calendarWeek);\n }\n \n return $return;\n }", "function monthOptions(){\n\t\t$months = range('01', '12');\n\t\tforeach ($months as $key => $month) {\n\t\t\t$months[$key] = str_pad($month, 2, '0', STR_PAD_LEFT);\n\t\t}\n\t\treturn array_combine($months, $months);\n\t}", "public function explodeDate($date)\n\t{\n\t\t$day = substr($date,6,2);\n\t\t$month = substr($date,4,2);\n\t\t$year = substr($date,0,4);\n\t\treturn array('day'=>$day,'month'=>$month,'year'=>$year);\n\t}", "function createDateRangeArray($strDateFrom, $strDateTo) {\n // inclusive array of the dates between the from and to dates.\n // could test validity of dates here but I'm already doing\n // that in the main script\n\n $aryRange = array();\n\n $iDateFrom = mktime(1, 0, 0, substr($strDateFrom, 5, 2), substr($strDateFrom, 8, 2), substr($strDateFrom, 0, 4));\n $iDateTo = mktime(1, 0, 0, substr($strDateTo, 5, 2), substr($strDateTo, 8, 2), substr($strDateTo, 0, 4));\n\n if ($iDateTo >= $iDateFrom) {\n array_push($aryRange, date('Y-m-d', $iDateFrom)); // first entry\n while ($iDateFrom < $iDateTo) {\n $iDateFrom+=86400; // add 24 hours\n array_push($aryRange, date('Y-m-d', $iDateFrom));\n }\n }\n return $aryRange;\n}", "function createDateRangeArray($strDateFrom, $strDateTo) {\n // inclusive array of the dates between the from and to dates.\n // could test validity of dates here but I'm already doing\n // that in the main script\n\n $aryRange = array();\n\n $iDateFrom = mktime(1, 0, 0, substr($strDateFrom, 5, 2), substr($strDateFrom, 8, 2), substr($strDateFrom, 0, 4));\n $iDateTo = mktime(1, 0, 0, substr($strDateTo, 5, 2), substr($strDateTo, 8, 2), substr($strDateTo, 0, 4));\n\n if ($iDateTo >= $iDateFrom) {\n array_push($aryRange, date('Y-m-d', $iDateFrom)); // first entry\n\n while ($iDateFrom < $iDateTo) {\n $iDateFrom+=86400; // add 24 hours\n array_push($aryRange, date('Y-m-d', $iDateFrom));\n }\n }\n return $aryRange;\n}", "private function range() {\n\n $data = array();\n\n for($i = 1; $i<= 2; $i++) {\n\n array_push($data, $this->id($i));\n\n }\n\n return $data;\n\n }", "protected static function splitDate($value) {\n\t\t$year = $month = $day = 0;\n\t\t$optionValue = explode('-', $value);\n\t\tif (isset($optionValue[0])) $year = intval($optionValue[0]);\n\t\tif (isset($optionValue[1])) $month = intval($optionValue[1]);\n\t\tif (isset($optionValue[2])) $day = intval($optionValue[2]);\n\t\t\n\t\treturn array('year' => $year, 'month' => $month, 'day' => $day);\n\t}", "function date_list( $from_date, $to_date )\n {\n $from_time = strtotime(\"midnight\", is_numeric($from_date) ? $from_date : strtotime($from_date));\n $to_time = strtotime(\"midnight\", is_numeric($to_date ) ? $to_date : strtotime($to_date ));\n\n $dates = array();\n while( $from_time <= $to_time )\n {\n $dates[] = date(\"Y-m-d\", $from_time);\n $from_time = strtotime(\"+1 day\", $from_time);\n }\n\n return $dates;\n }", "public function Dates() {\r\n $dates = [];\r\n for ($i = 1; $i <= 31; $i++) {\r\n $dates[$i] = $i;\r\n }\r\n return $dates;\r\n }", "function get_month_to_search() {\n global $DB;\n $sql = \"SELECT date AS fecha FROM {report_user_statistics};\";\n $dates = $DB->get_records_sql($sql);\n $result = array();\n foreach ($dates as $date) {\n $fecha = new DateTime(\"@$date->fecha\");\n $result[$fecha->format('m')] = month_converter($fecha->format('m'));\n }\n return $result;\n}", "public static function getDateArray($baseDate) {\n\t\t$ra = array();\n\t\t$month = substr($baseDate,5,2);\n\t\t$day = substr($baseDate,8,2);\n\t\t$year = substr($baseDate,0,4);\n\t\t$ra = getDate(mktime(9,0,0,$month,$day,$year));\n\t\treturn $ra;\n\t}", "public function getYears() {\r\n\t\t$year = array();\r\n\t\t$current_year = strftime(\"%Y\");\r\n\t\tfor($i = 2000; $i <= $current_year+1 && $y = strftime(\"%Y\", mktime(0,0,0,0,0,$i)); ++$i) {\r\n\t\t\t$year[$i] = array('id' => $i, 'name' => $y+1);\r\n\t\t}\r\n\t\treturn $year; //array\r\n\t}", "protected function getMonthValues()\r\n {\r\n\t $month = array();\r\n\t $month[1] = 'January';\r\n\t $month[2] = 'February';\r\n\t $month[3] = 'March';\r\n\t $month[4] = 'April';\r\n\t $month[5] = 'May';\r\n\t $month[6] = 'June';\r\n\t $month[7] = 'July';\r\n\t $month[8] = 'August';\r\n\t $month[9] = 'September';\r\n\t $month[10] = 'October';\r\n\t $month[11] = 'November';\r\n\t $month[12] = 'December';\t \r\n\t \r\n\t return $month;\r\n }", "function createDateRangeArray($strDateFrom,$strDateTo,$id_tamu)\n\t{\n\t\t// inclusive array of the dates between the from and to dates.\n\n\t\t// could test validity of dates here but I'm already doing\n\t\t// that in the main script\n\n\t\t$aryRange=array();\n\n\t\t$iDateFrom=mktime(1,0,0,substr($strDateFrom,5,2), substr($strDateFrom,8,2),substr($strDateFrom,0,4));\n\t\t$iDateTo=mktime(1,0,0,substr($strDateTo,5,2), substr($strDateTo,8,2),substr($strDateTo,0,4));\n\n\t\tif ($iDateTo>=$iDateFrom)\n\t\t{\n\t\t\tarray_push($aryRange,date('Y-m-d',$iDateFrom).\"_\".$id_tamu); // first entry\n\t\t\twhile ($iDateFrom<$iDateTo)\n\t\t\t{\n\t\t\t\t$iDateFrom+=86400; // add 24 hours\n\t\t\t\tarray_push($aryRange,date('Y-m-d',$iDateFrom).\"_\".$id_tamu);\n\t\t\t}\n\t\t}\n\t\treturn $aryRange;\n\t}", "public function datesProvider(): array\n {\n return [\n // Time Dates Match?\n ['January 1st 2018', ['2018-01-01'], true],\n ['January 1st 2018', ['2018-01-02'], false],\n ['January 1st 2018', ['2018-02-01'], false],\n ['January 1st 2018', ['2019-01-01'], false],\n ['January 2nd 2018', ['2018-01-01'], false],\n ['February 1st 2018', ['2018-02-01'], true],\n ['January 1st 2019', ['2019-01-01'], true],\n ['January 1st 2018', ['2018-01-01', '2018-05-23'], true],\n ['January 1st 2018', ['2018-01-02', '2018-01-01'], true],\n ['January 1st 2018', ['2018-02-01', '2018-01-01'], true],\n ['January 1st 2018', ['2019-01-01', '2018-01-01'], true],\n ['January 2nd 2018', ['2018-01-01', '2018-01-02'], true],\n ['February 1st 2018', ['2018-02-01', '2019-02-01'], true],\n ['January 1st 2019', ['2019-01-01', '2019-02-01'], true],\n ['February 29th 2020', ['2020-02-29'], true],\n ['February 29th 2020', ['2020-03-01'], false],\n ];\n }", "private function daysDefault(){\n $data = array();\n\n for($i=1; $i<=31; $i++){\n $data['day_'.$i] = 0;\n }\n\n return $data;\n }", "function createDateArray($start_dt, $end_dt)\n\t{\n\t\t$arr_dates = array();\n\t\t$arr_dates[] = $start_dt = strtotime($start_dt);\n\t\twhile(1)\n\t\t{ \n\t\t\t$start_dt = strtotime(\"+1 day\", $start_dt);\n\t\t\tif($start_dt <= strtotime($end_dt))\n\t\t\t{\n\t\t\t\t$arr_dates[] = $start_dt;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn $arr_dates;\n\t}", "public function getDataForMakeCreatedAtMethod(): array\n {\n return [\n 0 => [\n 0 => [\n 'createdAt' => '1972-08-03',\n ],\n ],\n ];\n }", "public function date_duplication($date)\n\t\t{\n\t\t\t$sql=\"SELECT * FROM `covid_data` WHERE `pub_date`='$date' \";\n\t\t\t$row=array();\n\t\t\t$stmt = $this->con->prepare($sql);\n\t\t\t$stmt->execute();\n\t\t\t$row=$stmt->fetchAll();\n\t\t\treturn $row;\n\t\t}", "function semanasMes($year,$month){\n \n # Obtenemos el ultimo dia del mes\n $ultimoDiaMes=date(\"t\",mktime(0,0,0,$month,1,$year)); \n # Obtenemos la semana del primer dia del mes\n $primeraSemana=date(\"W\",mktime(0,0,0,$month,1,$year)); \n # Obtenemos la semana del ultimo dia del mes\n $ultimaSemana=date(\"W\",mktime(0,0,0,$month,$ultimoDiaMes,$year)); \n # Devolvemos en un array los dos valores\n return array($primeraSemana,$ultimaSemana);\n \n}", "private function CreateDates($dates)\n {\n $duplicateSeen = array(); // $duplicateSeen = new HashSet<double>();\n $datesOut = array();\n\n// echo \"input dates=\\n\";\n// var_dump($dates);\n for ($i = 0; $i < count($dates); $i++)\n {\n $date = $dates[$i];\n // var_dump($date);\n if ($date->GetDuplicateGroup() == -1)\n {\n $datesOut[] = $date;\n }\n else if (!in_array($date->GetDuplicateGroup(), $duplicateSeen)) // else if (!duplicateSeen.Contains(date.GetDuplicateGroup()))\n {\n $duplicateSeen[] = $date->GetDuplicateGroup(); // duplicateSeen.Add(date.GetDuplicateGroup());\n $datesOut[] = $date;\n }\n else\n {\n// echo 'Token to REMOVE {'.$i.\"}\\n\";\n $this->_tokensToRemove[] = '{'.$i.'}';\n }\n }\n// echo \"DatesOut=\\n\";\n// var_dump($datesOut);\n return $datesOut;\n }", "public function Months() {\r\n// $months = array(1 => 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December');\r\n $months = array(1 => 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sept', 'Oct', 'Nov', 'Dec');\r\n return $months;\r\n }", "function explode_date($str_date)\n\t{\n\t\t$ac = 1;\n\t\tif ( substr($str_date, 0, 1) == '-' )\n\t\t{\n\t\t\t$ac = -1;\n\t\t\t$str_date = substr($str_date, 1);\n\t\t}\n\t\t$day = intval(substr($str_date, strlen($str_date) - 2));\n\t\t$str_date = substr($str_date, 0, -2);\n\t\t$month = intval(substr($str_date, strlen($str_date) - 2));\n\t\t$year = intval(substr($str_date, 0, -2));\n\t\t$xtime = array(\n\t\t\t'm' => $month,\n\t\t\t'd' => $day,\n\t\t\t'y' => $ac * $year,\n\t\t);\n\t\treturn $this->checkdate($xtime) ? $xtime : array();\n\t}", "function getArchiveList()\n {\n $sql = \"SELECT LEFT(`published`, 7) AS `year_month`, COUNT(*) AS `count` FROM `blog_articles` WHERE `published` < NOW() GROUP BY `year_month` ASC\";\n $rows = $this->db->fetchAll($sql);\n\n $years = [];\n foreach ($rows as $row) {\n list($year, $month) = explode('-', $row->year_month);\n $time = strtotime($row->year_month.'-01 00:00:00');\n\n if (!isset($years[$year])) {\n $years[$year] = [ 'count' => 0, 'months' => [] ];\n }\n $years[$year]['count'] += (int)$row->count;\n $years[$year]['months'][$month] = [ 'count' => (int)$row->count, 'name' => strftime('%B', $time) ];\n }\n\n return $years;\n }", "public static function answerDate($array){\n $tmp_array = [];\n foreach($array as $a){\n $tmp_array[] = $a->getAnswer();\n }\n return $tmp_array;\n }", "function createDateRangeArray($strDateFrom,$strDateTo)\n {\n // inclusive array of the dates between the from and to dates.\n // could test validity of dates here but I'm already doing that in the main script\n \n $aryRange=array();\n $iDateFrom=mktime(1,0,0,substr($strDateFrom,5,2), substr($strDateFrom,8,2),substr($strDateFrom,0,4));\n $iDateTo=mktime(1,0,0,substr($strDateTo,5,2), substr($strDateTo,8,2),substr($strDateTo,0,4));\n if ($iDateTo>=$iDateFrom)\n {\n array_push($aryRange,date(DATE_FORMAT,$iDateFrom)); // first entry\n while ($iDateFrom<$iDateTo)\n {\n $iDateFrom+=86400; // add 24 hours\n array_push($aryRange,date(DATE_FORMAT,$iDateFrom));\n }\n }\n \n return $aryRange;\n }", "function getAllDates($from,$to)\n{\n $dates = array();\n $fromdate = new DateTime($from);\n $todate = new DateTime($to);\n $datePeriod = new \\DatePeriod(\n $fromdate,\n new \\DateInterval('P1D'),\n $todate->modify('+1 day')\n );\n \n \n foreach($datePeriod as $date) {\n $dates[] = $date->format('Y-m-d');\n } \n \n return $dates;\n}", "function getDays_ym($month, $year){\n // Start of Month\n $start = new DateTime(\"{$year}-{$month}-01\");\n $month = $start->format('F');\n\n // Prepare results array\n $results = array();\n\n // While same month\n while($start->format('F') == $month){\n // Add to array\n $day = $start->format('D');\n $sort_date = $start->format('j');\n $date = $start->format('Y-m-d');\n $results[$date] = ['day' => $day,'sort_date' => $sort_date,'date' => $date];\n\n // Next Day\n $start->add(new DateInterval(\"P1D\"));\n }\n // Return results\n return $results;\n}", "public static function getCreatedDates()\n {\n return array( 'this_week' => TextHelper::_(\"COBALT_THIS_WEEK\"),\n 'last_week' => TextHelper::_(\"COBALT_LAST_WEEK\"),\n 'this_month' => TextHelper::_(\"COBALT_THIS_MONTH\"),\n 'last_month' => TextHelper::_(\"COBALT_LAST_MONTH\"),\n 'today' => TextHelper::_(\"COBALT_TODAY\"),\n 'yesterday' => TextHelper::_(\"COBALT_YESTERDAY\"), );\n }", "private function setMonthNames()\n\t{\n\t\t$range = range(1,12);\n\t\t$return = array();\n\t\tforeach($range AS $key => $monthNum)\n\t\t{\n\t\t $fmt = datefmt_create ($this->locale, null, null, null, IntlDateFormatter::GREGORIAN, 'MMMM');\n\t\t\t$return[$monthNum] = datefmt_format( $fmt , mktime(12,0,0,$monthNum,1,date('Y')));\n\t\t}\n\n\t\treturn $return;\n\t}", "function get_year_dates($year = null, $start_month = 12, $end_month = 11)\n{\n if (!isset($year)) {\n $year = date('Y');\n }\n $start_date = $year - 1 . '-' . $start_month . '-01';\n $end_date = $year . '-' . $end_month . '-30';\n return [\n 'start_date' => $start_date,\n 'end_date' => $end_date\n ];\n}", "public function getDataForMakeUpdatedAtMethod(): array\n {\n return [\n 0 => [\n 0 => [\n 'updatedAt' => '1972-08-03',\n ],\n ],\n ];\n }", "function get_imc($dataSet) {\n $index_imc = 2;\n $column_imc = $dataSet[0][$index_imc];\n $imc = array();\n for ($i = 1; $i < count($dataSet); $i++){\n $daily_imc = $dataSet[$i][$column_imc];\n $imc[] = array(\"date\" => $dataSet[$i][\"date\"],\n $dataSet[0][$index_imc] => $daily_imc);\n }\n return $imc;\n}", "public function getApiVersions()\n {\n $version = array(\n \"2006-03-01\" => \"2006-03-01 (default)\",\n \"latest\" => \"latest\",\n );\n return $version;\n }", "static function splitMysqlDate($mydsqlDate) {\r\n\t\t$date = strtotime($mydsqlDate);\r\n\t\treturn array(\r\n\t\t\t'year' => date('Y', $date),\r\n\t\t\t'month' => date('m', $date),\r\n\t\t\t'day' => date('d', $date),\r\n\t\t);\r\n\t}", "public function stringDateToArray($str)\n {\n $pos=strpos($str, \" \");\n $str1=substr($str, 0,$pos);\n $str2=substr($str, $pos+1);\n $arraydate=explode(\":\", $str1);\n $arrayHour=explode(\":\",$str2);\n return array(\"day\"=>$arraydate[2],\"month\"=>$arraydate[1],\"year\"=>$arraydate[0],\n \"hour\"=>$arrayHour[0],\"minute\"=>$arrayHour[1],\"second\"=>$arrayHour[2]);\n }", "private function createRequestsArray(){\n \n\t$doctorNames = $this->getDoctorNames();\n\t\n $requests = $this->getDatabaseRequests();\n\t\n\t$reqArray = array();\n\t\n\tforeach($requests as $req) {\n\t\tforeach($doctorNames as $doc) {\n\t\t\tif($doc[0] == $req[0]) {\n\t\t\t\t$dateFromRequest = strtotime($req[2]);\n\t\t\t\t$dateReq = date('Y-m-d',$dateFromRequest);\n\t\t\t\tif($req[1] == '0'){\n\t\t\t\t\t$color = \"#FF0000\";\n\t\t\t\t} else {\n\t\t\t\t\t$color = \"#00FF00\";\n\t\t\t\t}\n\t\t\t\t$request = array('title'=>\"$doc[1]\",'start'=>\"$dateReq\",'backgroundColor'=>\"$color\");\n\t\t\t\t$reqArray[] = $request;\n\t\t\t\tunset($request);\n\t\t\t}\n\t\t}\n\t}\n\t\n\t//$reqArray = array(array('title'=>'TEST','start'=>\"2013-04-04\",'backgroundColor'=>\"#FF0000\"),\n\t//array('title'=>'TEST2','start'=>\"2013-04-06\",'backgroundColor'=>\"#00FF00\"));\n\t\n\treturn $reqArray;\n}", "function ScheduleDates()\n {\n $dateids=$this->CGI2Dates();\n\n $dates=array();\n foreach ($this->Dates() as $did => $date)\n {\n if (preg_grep('/^'.$date[ \"ID\" ].'$/',$dateids))\n {\n array_push($dates,$date);\n }\n }\n\n return $dates;\n }", "public function migrateDateDataProvider()\n {\n return [\n [['20120111235330', '20120116183504'], '20120118', '20120116183504', 'Failed to migrate all migrations when migrate to date is later than all the migrations'],\n [['20120111235330', '20120116183504'], '20120115', '20120111235330', 'Failed to migrate 1 migration when the migrate to date is between 2 migrations'],\n [['20120111235330', '20120116183504'], '20120111235330', '20120111235330', 'Failed to migrate 1 migration when the migrate to date is one of the migrations'],\n [['20120111235330', '20120116183504'], '20110115', null, 'Failed to migrate 0 migrations when the migrate to date is before all the migrations'],\n ];\n }", "function years()\n{\n $years = array();\n for($i=date('Y');$i>(date('Y') - 100); $i--)\n $years[$i] = $i;\n return $years;\n}", "function get_dates() {\n $m = date('m');\n $d = date('d');\n $y = date('Y');\n $retour['j'] = date('d/m/Y', mktime(0, 0, 0, $m, $d, $y));\n $retour['s1'] = date('d/m/Y', mktime(0, 0, 0, $m, $d +7, $y));\n $retour['s2'] = date('d/m/Y', mktime(0, 0, 0, $m, $d +14, $y));\n $retour['s3'] = date('d/m/Y', mktime(0, 0, 0, $m, $d +21, $y));\n $retour['m1'] = date('d/m/Y', mktime(0, 0, 0, $m +1, $d, $y));\n $retour['m2'] = date('d/m/Y', mktime(0, 0, 0, $m +2, $d, $y));\n $retour['m3'] = date('d/m/Y', mktime(0, 0, 0, $m +3, $d, $y));\n $retour['m6'] = date('d/m/Y', mktime(0, 0, 0, $m +6, $d, $y));\n $retour['m9'] = date('d/m/Y', mktime(0, 0, 0, $m +9, $d, $y));\n $retour['m12'] = date('d/m/Y', mktime(0, 0, 0, $m, $d, $y +1));\n return $retour;\n}", "private static function _cookData($data) {\n\t\t$tmp = array();\n\t\tif(isset($data['DAY_ID'])) $tmp['DAY_ID'] = intval($data['DAY_ID']);\n\t\tif(isset($data['GAME_ID'])) $tmp['GAME_ID'] = $data['GAME_ID'];\n\t\tif(isset($data['DL_TIMES'])) $tmp['DL_TIMES'] = intval($data['DL_TIMES']);\n\t\tif(isset($data['CRT_TIME'])) $tmp['CRT_TIME'] = $data['CRT_TIME'];\n\t\treturn $tmp;\n\t}", "function break_date($iso_date) // template for new classes\r\n {\r\n $broken_date = array();\r\n $broken_date['yyyy'] = substr($iso_date,0,4);\r\n $broken_date['mm'] = substr($iso_date,5,2);\r\n $broken_date['dd'] = substr($iso_date,8,2);\r\n return $broken_date;\r\n }", "function break_date($iso_date) // template for new classes\r\n {\r\n $broken_date = array();\r\n $broken_date['yyyy'] = substr($iso_date,0,4);\r\n $broken_date['mm'] = substr($iso_date,5,2);\r\n $broken_date['dd'] = substr($iso_date,8,2);\r\n return $broken_date;\r\n }", "function break_date($iso_date) // template for new classes\r\n {\r\n $broken_date = array();\r\n $broken_date['yyyy'] = substr($iso_date,0,4);\r\n $broken_date['mm'] = substr($iso_date,5,2);\r\n $broken_date['dd'] = substr($iso_date,8,2);\r\n return $broken_date;\r\n }", "function break_date($iso_date) // template for new classes\r\n {\r\n $broken_date = array();\r\n $broken_date['yyyy'] = substr($iso_date,0,4);\r\n $broken_date['mm'] = substr($iso_date,5,2);\r\n $broken_date['dd'] = substr($iso_date,8,2);\r\n return $broken_date;\r\n }", "public function definition()\n {\n $now = new DateTime();\n $previousMonth = (new DateTime())->setDate(\n (int)$now->format('Y'),\n (int)$now->format('m') - 1,\n 1,\n );\n\n return [\n 'begin_date' => $previousMonth->format('Y.m.01 00:00:00'),\n 'end_date' => $previousMonth->format('Y.m.t 23:59:59'),\n ];\n }", "private function ical_dt_date($key, $value)\n\t{\n\t$value = $this->ical_date_to_unix($value);\n\n\t// zjisteni TZID\n\t$temp = explode(\";\", $key);\n\n\tif (empty($temp[1])) // neni TZID\n\t{\n\t\t\t// 2011-06-02 ms fix\n\t\t$value = str_replace('T', '', $value);\n\t\treturn [$key, $value];\n\t}\n\t// pridani $value a $tzid do pole\n\t$key = $temp[0];\n\t$temp = explode(\"=\", $temp[1]);\n\t$return_value[$temp[0]] = $temp[1];\n\t$return_value['unixtime'] = $value;\n\n\treturn [$key, $return_value];\n\t}", "public function convertDateProvider()\n {\n return [\n [\n 'fieldValue' => '@1534505233',\n 'expected' => 'Aug 17, 2018 11:27:13 AM',\n ],\n [\n 'fieldValue' => '@1534530000',\n 'expected' => 'Aug 17, 2018 06:20:00 PM',\n ],\n ];\n }", "public function getDates()\r\n\t{\r\n\t\treturn array(\r\n\t\t\t'producedAt' => $this->producedAt,\r\n\t\t\t'thisUpdate' => $this->getThisUpdate(),\r\n\t\t\t'nextUpdate' => $this->getNextUpdate()\r\n\t\t);\r\n\t}", "public static function getAllPublicationByDate() :array {\n \tglobal $base, $login, $password;\n\n $publicationGW = new PublicationGateway(new Connection($base, $login, $password));\n $results = $publicationGW->getAllPublicationsByDate(); \n $data = array();\n foreach ($results as $row){\n $data[]=new Publication ($row['ID'], $row['reference'], $row['authors'], $row['title'], $row['date'], $row['journal'], $row['volume'], $row['number'], $row['pages'], $row['note'], $row['abstract'], $row['keywords'], $row['series'], $row['localite'], $row['publisher'], $row['editor'], $row['pdf'], $row['date_display'], $row['categorie_id']);\n }\n \n return $data;\n }", "function dates_interconv( $date_format1, $date_format2, $date_str )\n {\n $base_struc = split('[/.-]', $date_format1);\n $date_str_parts = split('[/.-]', $date_str );\n \n //print_r( $base_struc ); echo \"<br>\";\n //print_r( $date_str_parts ); echo \"<br>\";\n \n $date_elements = array();\n \n $p_keys = array_keys( $base_struc );\n foreach ( $p_keys as $p_key )\n {\n if ( !empty( $date_str_parts[$p_key] ))\n {\n $date_elements[$base_struc[$p_key]] = $date_str_parts[$p_key];\n }\n else\n return false;\n }\n \n $dummy_ts = mktime( 0,0,0, $date_elements['m'],$date_elements['d'],$date_elements['Y']);\n \n return date( $date_format2, $dummy_ts );\n }", "static function idValueArray(array $input) \n\t{\n\t\t$return = array();\n\t\tforeach ($input as $key => $value) {\n\n\n\t\t\tif (is_array($value))\n\t\t\t\t$value = self::idValueArray($value);\n\n\t\t\t$return[] = ['id' => $key, 'value' => $value];\n\t\t}\n\n\t\treturn $return;\n\t}", "public function getYearValues() {\n\t return array (\n\t array (2012),\n\t array (900),\n\t array (2050),\n\t array ('2050'),\n\t array ('year')\n\t );\n }", "public function getIncomeDaysWeek() {\r\n $month_array = array();\r\n $income_days = Income::where('resto_id', Session::get('id'))->pluck('added_on');\r\n $income_days = json_decode( $income_days );\r\n $i = 0;\r\n foreach($income_days as $date) {\r\n $date_name = Carbon::createFromFormat('Y-m-d', $date)->format('d M Y');\r\n $month_array[$i] = $date_name;\r\n $i++;\r\n\r\n }\r\n return $month_array;\r\n }", "function getReservationTimeArrayAsInteger(){\n //setting variables;\n //$dateformat = 'H:i:s';\n $int_start_time;\n $int_duration = strtotime($this->end_time) - strtotime($this->start_time);\n $int_duration = (int)date('h', $int_duration);\n //$reservationTimeArray = array($this->start_time, $this->end_time);\n\n //first switch case function will convert all possible bookings to integer value\n switch($this->start_time){\n case '9:00:00':\n $int_start_time = 0;\n break;\n case '10:00:00':\n $int_start_time = 1;\n break;\n case '11:00:00':\n $int_start_time = 2;\n break;\n case '12:00:00':\n $int_start_time = 3;\n break;\n case '13:00:00':\n $int_start_time = 4;\n break;\n case '14:00:00':\n $int_start_time = 5;\n break;\n case '15:00:00':\n $int_start_time = 6;\n break;\n case '16:00:00':\n $int_start_time = 7;\n break;\n case '17:00:00':\n $int_start_time = 8;\n break;\n }\n\n //by the end of this switch case we have array which will have exactly 2 values inside\n //the problem is if smbd booked for more than 1 hour the array will be missing these intermediate value\n // EXAMPLE: Booking from 15:00 to 18:00 will result in array value of [6,9];\n //the next step is we need to fill up missing values;\n\n for($i = $int_start_time; $i < ($int_start_time + $int_duration); $i++){\n $int_reservationTimeArray[] = $i;\n }\n \n\n //after this we have array which can look as [6,9,7,8];\n //the array is not sorted, so we better sort it before we pass it back\n\n\n sort($int_reservationTimeArray);\n\n return $int_reservationTimeArray;\n\n\n }", "public function listDate($date)\n\t{\n\t\t$datetime = new DateTime($date);\n\t\t$i_dt = array();\n\t\t$i_dt['year'] = $datetime->format('Y');\n\t\t$i_dt['month'] = $datetime->format('m');\n\t\t$i_dt['day'] = $datetime->format('d');\n\t\t$i_dt['hour'] = $datetime->format('H');\n\t\t$i_dt['minutes'] = $datetime->format('i');\n\t\t$i_dt['seconds'] = $datetime->format('s');\n\t\t$i_dt['microsec'] = $datetime->format('u');\n\t\treturn $i_dt;\n\t}", "protected function unav_days_to_dates(string $month, int $year, Room $room_for_check){\r\n $days = $this->row_to_days($month, $year, $room_for_check);\r\n// var_dump($days);\r\n \r\n if (!$days){\r\n return;\r\n }\r\n\r\n $this->year = $year;\r\n $this->active_month = $month;\r\n\r\n $unav_dates_in_month = array();\r\n \r\n foreach($days as $day){\r\n $fixed_month = ucfirst ($this->active_month); \r\n $date_string = $day.\"/\".$fixed_month.\"/\".$this->year;\r\n $new_date = DateTime::createFromFormat('d/M/Y', $date_string);\r\n// var_dump($new_date);\r\n $unav_dates_in_month[] = $new_date;\r\n// var_dump($new_date->format('d/M/Y'));\r\n\r\n //OVIM SU NAPRAVLJENI DATUMI ZA POREDJENJE OD UNESENIH ARGUMENATA\r\n }\r\n// var_dump($unav_dates_in_month);\r\n $this->$month = $unav_dates_in_month;\r\n return $unav_dates_in_month;\r\n}", "function to_array() \n {\n $d = array();\n $d[\"id\"] = $this->id;\n $d[\"offset\"] = $this->offset;\n $d[\"title\"] = $this->title;\n $d[\"description\"] = $this->description;\n $d[\"author\"] = $this->author;\n $d[\"type\"] = $this->type;\n $d[\"updated\"] = $this->updated;\n $d[\"published\"] = $this->published;\n $d[\"publish_time\"] = $this->publish_time;\n $d[\"insert_time\"] = $this->insert_time;\n return $d;\n }", "protected function getMonthsArray()\n\t{\n\t\t$ma = array_pad([], 13, null);\n\t\tunset($ma[0]);\n\t\tforeach ($this->_attr[self::MONTH_OF_YEAR] as $m) {\n\t\t\tif (is_numeric($m['moy'])) {\n\t\t\t\tfor ($i = $m['moy']; $i <= $m['end'] && $i <= 12; $i += $m['period']) {\n\t\t\t\t\t$ma[$i] = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $ma;\n\t}", "function prim_options_date() {\n $dates = array(\n 'd1' => t('1:a'),\n 'd2' => t('2:a'),\n 'd3' => t('3:e'),\n 'd4' => t('4:e'),\n 'd5' => t('5:e'),\n 'd6' => t('6:e'),\n 'd7' => t('7:e'),\n 'd8' => t('8:e'),\n 'd9' => t('9:e'),\n 'd10' => t('10:e'),\n 'd11' => t('11:e'),\n 'd12' => t('12:e'),\n 'd13' => t('13:e'),\n 'd14' => t('14:e'),\n 'd15' => t('15:e'),\n 'd16' => t('16:e'),\n 'd17' => t('17:e'),\n 'd18' => t('18:e'),\n 'd19' => t('19:e'),\n 'd20' => t('20:e'),\n 'd21' => t('21:a'),\n 'd22' => t('22:e'),\n 'd23' => t('23:e'),\n 'd24' => t('24:e'),\n 'd25' => t('25:e'),\n 'd26' => t('26:e'),\n 'd27' => t('27:e'),\n 'd28' => t('28:e'),\n 'd29' => t('29:e'),\n 'd30' => t('30:e'),\n 'd31' => t('31:a'),\n );\n\n return $dates;\n}", "public function get_distinct_dates($date){\n $this->load->database();\n\n $query = $this->db->select('distinct(date)')->order_by('date')\n ->get_where('tbl_transactions',array('left(date,7)' => $date));\n return $query->result_array();\n }", "function getfileCreateDates($fileArray){\n $imageDatesArray = [];\n foreach($fileArray as $file){\n $imageDatesArray[] = $file[\"imageMediaMetadata\"][\"time\"];\n }\n return $imageDatesArray;\n}", "function days_to_num($array){\n foreach ($array as $key => $value){\n $array[$key] = date('N',strtotime($value));\n }\n return $array;\n }", "public function findPoids(){\n // $year=2013;\n $qb = $this->createQueryBuilder('p');\n //$qb->select('COUNT(p)')\n // $qb->select('p.id,p.publicationDateStart');\n // ->where('YEAR(p.publicationDateStart) = :year');\n // $qb->setParameter('year', $year);\n $arr=array();\n // ->getSingleScalarResult();\n//print_r($qb->getQuery()->getResult());\n // $arr[\"$year\"]=0;\n \nforeach ($qb->getQuery()->getResult() as $d){\n \n // echo $d['publicationDateStart']->format('Y-m-d H:i:s') . \"<br>\";\n // echo $d['publicationDateStart']->format('Y') . \"<br>\";\n $year=$d['publicationDateStart']->format('Y');\n if (!(isset($arr[\"$year\"]))) $arr[\"$year\"]=0;\n $arr[\"$year\"]=$arr[\"$year\"]+1;\n \n}\n//print_r($arr);\n//exit(1);\nreturn ($arr);\n// return $query->getResult();\n\n }", "function all_sale_date_n($product_id)\n {\n $dates = array();\n $first_date = '';\n $sales = $this->db->get('sale')->result_array();\n foreach ($sales as $i => $row) {\n if($this->session->userdata('title') !== 'vendor' || $this->is_sale_of_vendor($row['sale_id'],$this->session->userdata('vendor_id'))){\n if ($this->product_in_sale($row['sale_id'], $product_id, 'id')) {\n $first_date = $this->get_type_name_by_id('sale', $row['sale_id'], 'sale_datetime');\n break;\n }\n }\n }\n if ($first_date !== '') {\n $current = $first_date;\n $last = time();\n while ($current <= $last) {\n $dates[] = date('Y-m-d', $current);\n $current = strtotime('+1 day', $current);\n }\n }\n return $dates;\n\n }", "function create_all_program_dates_array($valid_post_array = FALSE){\n\t\n\tglobal $wpdb;\n\t\n\t//Build Query. Fetch all post id's and dates from Post Meta\n\t$query = \"SELECT post_id, meta_value FROM $wpdb->postmeta WHERE meta_key='mf_SALF_meta_date'\";\n\t// Run Query\n\t$post_ID_query= $wpdb->get_results($query);\n\t$post_ID_query = remove_unpublished_posts($post_ID_query);\n\t\n\t\n\t\n\t\n\t\n\t//seperate days/months/years\n\tforeach ($post_ID_query as $post_dates){\n\t\t\n\t\t//create $post_id->$date array\n\t\t$dates[$post_dates->post_id]=$post_dates->meta_value;\n\t\t\n\t\t//unset invalid posts (program dates from unselected venues)\n\t\tif($valid_post_array){//if have valid posts\n\t\t\tforeach ($dates as $post_id=>$post_date){\n\t\t\t\tif(!in_array($post_id,$valid_post_array)) unset($dates[$post_id]);\n\t\t\t}\n\t\t}\n\t\t//explode dates within array as day/month/year\n\t\tforeach ($dates as $post_id=>$post_date){\n\t\t\t\n\t\t\t\n\t\t\t\t$exploded_post_date_array[$post_id] = explode('/',$post_date);\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\t//Create Key Values, Day, Month, Year\n\t\t\t\t$exploded_post_date_array[$post_id]['day']= $exploded_post_date_array[$post_id][0];\n\t\t\t\t$exploded_post_date_array[$post_id]['month']= $exploded_post_date_array[$post_id][1];\n\t\t\t\t$exploded_post_date_array[$post_id]['year']= $exploded_post_date_array[$post_id][2];\n\t\t\t\n\t\t\t\t//remove old key values\n\t\t\t\tunset($exploded_post_date_array[$post_id][0]);\n\t\t\t\tunset($exploded_post_date_array[$post_id][1]);\n\t\t\t\tunset($exploded_post_date_array[$post_id][2]);\n\t\t}\n\t\n\t}\n\t\n\t\n\treturn $exploded_post_date_array;\n}", "function _makeMonth($date){\n // YYYY-MM and return an array of all the days\n // in the the month. The array that is returned\n // is in the same formate which is returned by\n // 'makeWeek' function\n $start = Carbon::parse($date)->startOfMonth();\n $end = Carbon::parse($date)->endOfMonth();\n $month = [];\n while ($start->lte($end)) {\n $carbon = $start;\n $month[] = $this->_makeDay($carbon);\n $start->addDay();\n }\n return $month;\n }", "private function _processTwitterData($data): array {\n $result = array();\n foreach ($data as $value) {\n if (isset($value->created_at)) {\n $dt = \\DateTime::createFromFormat('D M d H:i:s O Y', $value->created_at);\n $date = $dt->format('Y-m-d');\n $hour = $dt->format('H');\n if (isset($result[$date][$hour])) {\n $result[$date][$hour]++;\n } else {\n $result[$date][$hour] = 1;\n }\n }\n }\n return $result;\n }", "public function raffleDate() {\n\t\tif((date('G') >= 0) && (date('G') < 8)) {\n\t\t\t$date = date('Y-m-d', time() - 60 * 60 * 24);\n\t\t} else {\n\t\t\t$date = date('Y-m-d');\n\t\t}\n\t\n\t\t$start_date = $date . ' 08:00:00';\n\t\t$end_date = $date . ' 20:00:00';\n\t\t\n\t\treturn array(\n\t\t\t'start_date' => $start_date,\n\t\t\t'end_date' => $end_date\n\t\t);\n\t}", "static public function okresConvert($strOkres)\n\t{\n\t\t$tab = split(\"-\",$strOkres);\n\t\tif (count($tab) < 2)\n\t\t\t$tab[] = $tab[0];\n\n\t\t$result = array();\n\n\t\tforeach ($tab as $dni) {\n\t\t\t$result[] = self::makeData(mktime(0,0,0,date('n'),date('j')-$dni,date('Y')));\n\t\t}\n\n\t\treturn $result;\n\t}", "public function findSaneparDate(){\n $data = $this->sanepar->findSaneparDate();\n foreach($data as $dt){\n $data[$dt] = substr($dt,0,4) . '/' . substr($dt,4,5);\n }\n return $data;\n }", "public function provideDate()\n {\n return array(\n array(array(\"date\\before{date:'2013-04-04'}\"), true),\n array(array(\"date\\before{date:'1998-04-04'}\"), false),\n array(array(\"date\\after{date:'2013-04-04'}\"), false),\n array(array(\"date\\after{date:'1998-04-04'}\"), true),\n );\n }", "public function prepare_to_cache() {\n return array($this->property1.'_ptc', $this->property2.'_ptc', $this->propertytime);\n }", "function getDatesFromRange($start, $end, $format = 'Y-m-d') { \n \n // Declare an empty array \n $array = array(); \n \n // Variable that store the date interval \n // of period 1 day \n $interval = new DateInterval('P1D'); \n \n $realEnd = new DateTime($end); \n $realEnd->add($interval); \n \n $period = new DatePeriod(new DateTime($start), $interval, $realEnd); \n \n // Use loop to store date into array \n foreach($period as $date) { \n $array[] = $date->format($format); \n } \n \n // Return the array elements \n return $array; \n}", "public function value_by_keys($keys)\n {\n $data = array();\n $current_time = time();\n $values = $this->storevalues;\n $keys_array = explode(',', $keys);\n foreach ($values as $key => $value) {\n if (in_array($key, $keys_array)) {\n $values[$key]['created_at'] = $current_time;\n $data[$key] = $value;\n }\n }\n $this->save($values);\n return $data;\n }", "function cpl_group_article_by_date($articles, $button, $numberArticle) {\r\n $result = [];\r\n for ($i=4*($button-1); $i < 4*($button-1)+4 && $i < $numberArticle; $i++) {\r\n $date = substr($articles[$i]['arDatePublication'],0,6);\r\n $result[$date][] = $articles[$i];\r\n }\r\n return $result;\r\n }", "private function returnPaymentDateArray($inputDate, $numberOfMonths){\n \t$results = array();\n \tfor ( $i=1; $i < $numberOfMonths+1; $i++){\n \t\t$results[] = Carbon::parse($inputDate)->addMonthsNoOverflow($i)->format('Y-m-d');\n \t}\n \treturn $results;\n }", "function utilDatesDBVersLocale($data)\n {\n foreach ($data as $key => $value) {\n\n if (is_array($value)) {\n /*\n * Traitement recursif\n */\n $data[$key] = $this->utilDatesDBVersLocale($value);\n } else {\n if (!empty($this->colonnes[$key]) && ($this->colonnes[$key][\"type\"] == 2 || $this->colonnes[$key][\"type\"] == 3) && !empty($value)) {\n /*\n * Formatage de la date\n */\n $data[$key] = $this->formatDateDBversLocal($value, $this->colonnes[$key][\"type\"]);\n }\n }\n\n }\n\n return $data;\n }", "function utilDatesLocaleVersDB($data)\n {\n foreach ($data as $key => $value) {\n if (is_array($value)) {\n /*\n * Traitement recursif\n */\n $data[$key] = $this->utilDatesDBVersLocale($value);\n } else {\n if (($this->colonnes[$key][\"type\"] == 2 || $this->colonnes[$key][\"type\"] == 3) && strlen($value) > 0) {\n /*\n * Formatage de la date\n */\n $data[$key] = $this->formatDateLocaleVersDB($value, $this->colonnes[$key][\"type\"]);\n }\n }\n }\n\n return $data;\n }", "function date_dates_between( $date1, $date2 ) {\n\tif ( is_int( $date1 ) ) {\n\t\t$date1 = date( 'Y-m-d H:i:s', $date1 );\n\t\t$date2 = date( 'Y-m-d H:i:s', $date2 );\n\t}\n\t$dates = array();\n\t$date = substr( $date1, 0, 10 );\n\n\twhile ( $date <= $date2 ) {\n\t\t$dates[] = $date;\n\t\t$date = date( 'Y-m-d', mktime( 0, 0, 0, substr( $date, 5, 2 ), substr( $date, 8, 2 ) + 1, substr( $date, 0, 4 ) ) );\n\t}\n\n\treturn $dates;\n}", "protected function getDayMonthYearFieldNames($value)\n {\n if (empty($value) || !is_string($value)) {\n return $value;\n }\n \n $ret = array(\n 'day' => $value . '_day',\n 'month' => $value . '_month',\n 'year' => $value . '_year'\n );\n \n if (strstr($value, '['))\n {\n $endPos = strlen($value) - 1;\n if (']' != $value[$endPos]) {\n return $ret;\n }\n \n $start = strrpos($value, '[') + 1;\n $name = substr($value, $start, $endPos - $start);\n $arrayName = substr($value, 0, $start-1);\n $ret = array(\n 'day' => $arrayName . '[' . $name . '_day' . ']',\n 'month' => $arrayName . '[' . $name . '_month' . ']',\n 'year' => $arrayName . '[' . $name . '_year' . ']'\n );\n }\n return $ret;\n }", "public function getArrayCopy() \n { \n $obj_vars = get_object_vars($this);\n $obj_vars['startDate'] = $obj_vars['startDate']->format('d/m/y');\n $obj_vars['endDate'] = $obj_vars['endDate']->format('d/m/y');\n return $obj_vars;\n // return get_object_vars($this);\n }", "private function getFinalArray($date) {\r\n if(self::sanitizeDate($date)){\r\n $db1 = $this->parseDB($date);\r\n $aulario = $this->getArrayFromAulario($date);\r\n $merge = $this->mergeArrays($aulario, $db1); // aggiunge il secondo array in coda al primo\r\n // var_dump($merge);//die();\r\n $risultato;\r\n foreach ($merge as $row) {\r\n if (isset($row)){\r\n $aula = $row[0];\r\n $oraIn = $this->convertiOra($row[2]);\r\n if (isset($row[3]))\r\n $oraFine = $this->convertiOra($row[3]);\r\n else\r\n $oraFine = $this->convertiOra(null);\r\n $risultato[$oraIn][$aula] = $row;\r\n $diffOre = $oraFine - $oraIn;\r\n for ($i = 1; $i < $diffOre; $i++) {\r\n $risultato[$oraIn + $i][$aula] = \"\\\"\";\r\n }\r\n }\r\n }\r\n return $risultato;\r\n }\r\n return array();\r\n }", "protected function getMesesArray(){\n\n $dt = new \\DateTime();\n $dt->modify('-13 months');\n for ($i = 0 ; $i < 12 ; $i ++){\n \t\t$dt->modify('+1 month');\n $meses[$i] = strftime(\"%b %Y\" , $dt->getTimeStamp());\n }\n return json_encode($meses);\n }", "function acadp_parse_mysql_date_format( $date ) {\n\n\t$date = preg_split( '([^0-9])', $date );\n\n\treturn array(\n\t\t'year' => $date[0],\n\t\t'month' => $date[1],\n\t\t'day' => $date[2],\n\t\t'hour' => $date[3],\n\t\t'min' => $date[4],\n\t\t'sec' => $date[5]\n\t);\n\n}", "public function getdates() {\n\n $dates = array();\n\n // This can be multiple reservations per property\n foreach ($this->data as $changelog) {\n\n $status_flag = strtolower($changelog['strStatusFlag']);\n\n $rows = $this->createDateRows($changelog, $status_flag);\n\n foreach ($rows as $row ) {\n $dates[] = $row;\n }\n\n }\n\n return $dates;\n }", "public function getPeriod($data,$date2 = null){\n\n if($date2 != null){\n\n $firstDay = $data;\n $lastDay = $date2;\n $periodos[0] = \"$data,$date2\";\n $dataMax = strtotime($date2);\n }else{\n # Get first day of month\n $firstDay = date(\"j-n-Y\",strtotime($data));\n # Get last day of month\n $lastDay = date(\"t-n-Y\",strtotime($data));\n # First period\n $periodos[0] = $firstDay.','.$lastDay;\n #Define the last date\n $dataMax = strtotime($lastDay);\n }\n\n $z = 1;\n\n $current=0;\n # Get first month\n $month = date(\"n\",strtotime($data));\n # Get first year\n $year = date(\"Y\", strtotime($data));\n # While the current date is less than max date, then continue\n while($current <= $dataMax){\n # Get next month\n $month = $month+1;\n # First date's period\n $p1 = \"1-$month-$year\"; //2014-02-01\n # Last day of date's period\n $p2D = date(\"t\",strtotime($p1)); // 28\n # Get second date's period\n $p2 = \"$p2D-$month-$year\";\n #\n $limit1 = strtotime($p1);\n # Check if first date of this period is bigger than max date\n if( $limit1 >= $dataMax){\n break;\n }\n $periodos[$z] = \"$p1,$p2\";\n if($month >= 12)\n {\n $month = 0;\n $year = $year+1;\n }\n\n $current = strtotime($p2);\n if($current >= $dataMax)\n {\n $p2 = date(\"j-n-Y\",$dataMax);\n $periodos[$z] = \"$p1,$p2\";\n break;\n }\n ++$z;\n\n }\n\n return $periodos;\n // $x = 0;\n\n // # Get current month\n // $mon = date(\"m\",strtotime($data));\n // # Get current year\n // $year = date(\"Y\",strtotime($data));\n // # Get periods previous\n // for($i=1;$i < 7;$i++){\n // # Changes of year\n // if($mon-1 == 0){$mon = 12;$year -= 1;}\n // else{--$mon;}\n\n // # Get first day of month\n // $ini = \"1-$mon-$year\";\n // # Get last day of month\n // $end = date(\"t-n-Y\",strtotime($ini));\n // # Get Period\n // $periodos[$i] = \"$ini,$end\";\n // }\n // # Set period\n // $this->periodos = $periodos;\n // # Return period\n // return $periodos;\n }" ]
[ "0.61138034", "0.6065718", "0.60334146", "0.5942667", "0.5919838", "0.58815956", "0.5710571", "0.56908935", "0.5687792", "0.5660913", "0.5648701", "0.5618342", "0.5579745", "0.55626565", "0.5562131", "0.55431247", "0.5519851", "0.55157673", "0.55064815", "0.549766", "0.5489915", "0.5482515", "0.547077", "0.5468065", "0.5431599", "0.53967047", "0.53958964", "0.5382526", "0.53645104", "0.53228676", "0.53016853", "0.52997196", "0.5299657", "0.5294847", "0.52924967", "0.52900976", "0.5289511", "0.52839196", "0.5271019", "0.5262383", "0.52533454", "0.52207965", "0.52187496", "0.5200727", "0.5161415", "0.51539797", "0.5151174", "0.5150866", "0.5145617", "0.51352936", "0.51346874", "0.51340854", "0.51296103", "0.51170397", "0.511551", "0.5106607", "0.5106607", "0.5106607", "0.5106607", "0.51016206", "0.51007766", "0.5098944", "0.50878763", "0.50843763", "0.5082242", "0.5077952", "0.50735724", "0.50680876", "0.5063302", "0.505686", "0.505519", "0.50534755", "0.5043743", "0.50432664", "0.50410366", "0.50392056", "0.5025008", "0.50208724", "0.50160795", "0.50106335", "0.5008591", "0.50067735", "0.4997221", "0.49908563", "0.49892473", "0.49819905", "0.49770108", "0.49760014", "0.4969467", "0.49694514", "0.49694064", "0.49577248", "0.4956139", "0.49533087", "0.49528772", "0.49475127", "0.49392802", "0.49386466", "0.49293718", "0.4928044", "0.492626" ]
0.0
-1
convert date to YYYYMM
function date2YearMonth($date=null){ if(!empty($date)){ return date('Ym', strtotime($date)); }else{ return ''; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function convert_date_to_mmdd($date) {\n\t$date = date('m/d', strtotime($date));\n\n\treturn $date;\n}", "public function transform($date)\n {\n if ($date === null) {\n return '';\n }\n return $date->format('d') . '/' . $date->format('m') . '/' . $date->format('Y');\n }", "public function convert_month_year_display($created_date){\n\t\tif(($created_date != '') && ($created_date != '0000-00-00') && ($created_date != '0000-00-00 00:00:00')){\n\t\t\t$c_d = date('M-Y', strtotime($created_date));\n\t\t\treturn $c_d;\n\t\t}\n\t}", "public function transform($date)\n {\n if (null === $date) {\n return '';\n }\n return $date->format('d') . '/' . $date->format('m') . '/' . $date->format('Y');\n }", "function uwwtd_get_MM_DD_YYYY_from_YYYY_MM_DD_XXX($date) {\n $return = '';\n if (!empty($date)) {\n if (strlen($date) > 10) {\n $date = substr($date, 0, 10);\n }\n $dateObj = new DateTime($date);\n $return = $dateObj->format('m/d/Y');\n }\n return $return;\n}", "function utility_convertDateToWikiMonth($date) {\n $s = date_create_from_format('Ymd', '20010101');\n $e = date_create_from_format('Ymd', $date);\n $diff = $s->diff($e);\n // Need to add years to the month diff\n $m = ($diff->format('%y') * 12) + $diff->format('%m');\n return $m;\n}", "function monthdate($date) {\n #print \"monthdate($date)<br>\\n\";\n return trim(substr($date, 5, 2) . substr($date, 8, 2));\n }", "function conv_date($date)\n\t{\n\t\t$arr = explode(' ', $date);\n\t\t$y = $arr[2];\n\t\t$m = $this->convert_month_name('Eng-Num', str_replace(',','',$arr[0]));\n\t\t$d = $arr[1];\n\t\t\n\t\treturn $y.'-'.$m.'-'.$d; // output : 1986-1-24\n\t}", "public function convertCCYYMMDD($date = null);", "function uwwtd_get_DD_MM_YYYY_from_YYYY_MM_DD_XXX($date) {\n $return = '';\n if (!empty($date)) {\n if (strlen($date) > 10) {\n $date = substr($date, 0, 10);\n }\n $dateObj = new DateTime($date);\n $return = $dateObj->format('d/m/Y');\n }\n return $return;\n}", "public function transform($date)\n {\n if (null === $date) {\n return '';\n }\n\n return $date->format('Y');\n }", "function convertdateanglais($date){\n\t$ladate=explode('-',$date);\n\t$jour=$ladate[2];\n\t$moi=$ladate[1];\n\t$anne=$ladate[0];\n\t$madate=date(\"d/m/Y\", mktime(0, 0, 0, $moi, $jour, $anne));\n\treturn $madate;\n}", "public static function getFullMonthNumberFromDate($date) {\n\t\treturn substr($date, 5, 2);\n\t}", "function date_month($date){\r\n\t$month = NULL;\r\n\t$cont = 0;\r\n\tfor($i = 0; $i < strlen($date); $i++){\r\n\t\tif(is_numeric(substr($date, $i, 1))){\r\n\t\t\tif($cont == 1){\r\n\t\t\t\t$month .= substr($date, $i, 1);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif($cont > 0){\r\n\t\t\t\treturn $month;\r\n\t\t\t}else{\r\n\t\t\t\t$cont++;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn $month;\r\n}", "function numtomonth($nmonth)\n {\n if($nmonth==1){\n return \"January\";\n }elseif ($nmonth==2) {\n return \"February\";\n }elseif ($nmonth==3) {\n return \"March\";\n }elseif ($nmonth==4) {\n return \"April\";\n }elseif ($nmonth==5) {\n return \"May\";\n }elseif ($nmonth==6) {\n return \"Jun\";\n }elseif ($nmonth==7) {\n return \"July\";\n }elseif ($nmonth==8) {\n return \"August\";\n }elseif ($nmonth==9) {\n return \"September\";\n }elseif ($nmonth==10) {\n return \"October\";\n }elseif ($nmonth==11) {\n return \"November\";\n }elseif ($nmonth==12) {\n return \"December\";\n }else\n {\n $nmonth=$nmonth-12;\n return numtomonth($nmonth);\n }\n }", "function convert_date_to_daymmdd($date) {\n\t$date = date('l m/d', strtotime($date));\n\n\treturn $date;\n}", "public function convert_quater_month($created_date){\n\t\tif(($created_date != '') && ($created_date != '0000-00-00')){\n\t\t\t$c_d = date('M', strtotime($created_date));\n\t\t\treturn $c_d;\n\t\t}\n\t}", "function getMonthDir() {\n return date(\"Y_m\");\n }", "function dateformatusa($date)\n{\n\t$ndate = explode(\"-\",$date);\n\t$year = $ndate[2];\n\t$day = $ndate[0];\n\t$month = $ndate[1];\n\t\n\treturn $year . \"-\" . $month . \"-\" . $day;\n}", "public function monthPadDates()\n {\n return date('w', strtotime(date('Y-m-01', strtotime($this->strStart))));\n }", "function numtomonth($nmonth)\n\t {\n\t if($nmonth==1){\n\t return \"January\";\n\t }elseif ($nmonth==2) {\n\t return \"February\";\n\t }elseif ($nmonth==3) {\n\t return \"March\";\n\t }elseif ($nmonth==4) {\n\t return \"April\";\n\t }elseif ($nmonth==5) {\n\t return \"May\";\n\t }elseif ($nmonth==6) {\n\t return \"Jun\";\n\t }elseif ($nmonth==7) {\n\t return \"July\";\n\t }elseif ($nmonth==8) {\n\t return \"August\";\n\t }elseif ($nmonth==9) {\n\t return \"September\";\n\t }elseif ($nmonth==10) {\n\t return \"October\";\n\t }elseif ($nmonth==11) {\n\t return \"November\";\n\t }elseif ($nmonth==12) {\n\t return \"December\";\n\t }else\n\t {\n\t $nmonth=$nmonth-12;\n\t return numtomonth($nmonth);\n\t }\n\t }", "function _reformat_date($inDate) {\n $outDate = $inDate;\n $months = array(\n \"Maa\" => \"Mar\",\n \"Mei\" => \"May\",\n \"Okt\" => \"Oct\"\n );\n if (empty($inDate)) {\n return $outDate;\n }\n $parts = explode(\"-\", $inDate);\n if (!isset($parts[1]) || !isset($parts[2])) {\n return $outDate;\n } else {\n $newMonth = CRM_Utils_Array::value($parts[1], $months);\n if (!empty($newMonth)) {\n $outDate = $parts[0].\"-\".$newMonth.\"-\".$parts[2];\n }\n }\n return $outDate;\n}", "function dateToDDMMYYYY ($dateSource, $date) {\n\t$dateOUT = \"\";\n\t$dateSource = strtolower($dateSource);\n\t// Replace '/' by '-' from original date. This allow me use \"sscanf($date,\"%d %d %d\")\"\n\t$date = str_ireplace(\"/\", \"-\", $date);\n\tif ($date != \"\") {\n\t\tif ($dateSource == \"yyyymmdd\")\n\t\t\tlist($year, $month, $day) = sscanf($date,\"%d %d %d\");\n\t\tif ($dateSource == \"ddmmyyyy\")\n\t\t\tlist($day, $month, $year) = sscanf($date,\"%d %d %d\");\n\t\tif ($dateSource == \"yyyyddmm\")\n\t\t\tlist($year, $day, $month) = sscanf($date,\"%d %d %d\");\n\t\tif ($dateSource == \"mmyyyydd\")\n\t\t\tlist($month, $year, $day) = sscanf($date,\"%d %d %d\");\n\t\tif ($dateSource == \"\") {\n\t\t\t// Autodetect mode [Supported modes: (YYYYMMDD) Or (DDMMYYYY)]\n\t\t\tlist($day, $month, $year) = sscanf($date,\"%d %d %d\");\n\t\t\tif (strlen($year) <= 3) {\n\t\t\t\tlist($year, $month, $day) = sscanf($date,\"%d %d %d\");\n\t\t\t}\n\t\t}\n\t\t$dateOUT = sprintf (\"%02d/%02d/%04d\", abs($day), abs($month), abs($year));\n\t}\n\treturn ($dateOUT);\n}", "public function getMonth($date=null){\n\t\treturn date_format($this->createDate($date),\"m\");\n\t}", "function format_date_YYYYMMDD($filename = '')\n{\n $dff = date_from_filename($filename);\n if (count($dff) == 0) return '';\n return join('', $dff);\n}", "function dateToGoodFormat($date){\n\t\t$toTest = explode(\"/\",$date);\n\t\t$jj = intval($toTest[0]);\n\t\t$mm = intval($toTest[1]);\n\t\t$aaaa = intval($toTest[2]);\n\t\treturn ($aaaa.\"-\".$mm.\"-\".$jj);\n\t}", "function dateFix($date) {\n\n $dateArray = explode(\"-\",$date);\n\n $year = $dateArray[0];\n $month = $dateArray[1];\n $day = $dateArray[2];\n\n return date(\"Y-m-d\",mktime(0,0,0,$month,$day,$year));\n\n}", "function dbdate($date){\n\t\t$date=explode(\"-\",$date);\n\t\t$year=explode(\" \",$date[2]);\n\t\t$date1=$year[0].\"-\";\n\t\tif($date[1]<10 && (substr($date[1],0,1)!=0))\n\t\t\t$date1.=\"0\".$date[1].\"-\";\n\t\telse\n\t\t\t$date1.=$date[1].\"-\";\n\t\tif($date[0]<10 && (substr($date[0],0,1)!=0))\n\t\t\t$date1.=\"0\".$date[0].\" \".$year[1];\n\t\telse\n\t\t$date1.=$date[0].\" \".$year[1];\n\t\treturn $date1;\n\t}", "static function getFolderMonthYear($filename) {\n $str = explode('_', $filename);\n return $str [0] . '_' . $str [1];\n }", "public function toMonth(int $int)\n {\n return date('F', mktime(0, 0, 0, $int, 10));\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}", "function getMonthName($code)\n{\n\treturn date(\"F\",strtotime(\"2012-{$code}-01\"));\n}", "public static function getYearFromDate($date) {\n\t\treturn substr($date, 0, 4);\n\t}", "function getMois($date)\r\n{\r\n @list ($jour, $mois, $annee) = explode('/', $date);\r\n unset($jour);\r\n if (strlen($mois) == 1) {\r\n $mois = '0' . $mois;\r\n }\r\n return $annee . $mois;\r\n}", "function convertExpirationDateToYearAndMonth(string $date)\n{\n $date = trim($date);\n $boom = explode(\"/\", $date);\n\n $month = rtrim($boom[0]);\n $year = ltrim($boom[1]);\n\n if (strlen($year) == 2) {\n $now = Carbon::now(config(\"app.timezone\"));\n $year = substr($now->year, 0, 2) . $year;\n }\n\n return array($year, $month);\n}", "function getMois($date){\r\n\t\t@list($jour,$mois,$annee) = explode('/',$date);\r\n\t\tif(strlen($mois) == 1){\r\n\t\t\t$mois = \"0\".$mois;\r\n\t\t}\r\n\t\treturn $annee.$mois;\r\n}", "function convertDate($date){\n\treturn implode('.', array_reverse(explode('-', $date)));\n}", "function getMois($date)\n{\n @list($jour, $mois, $annee) = explode('/', $date);\n unset($jour);\n if (strlen($mois) == 1) {\n $mois = '0' . $mois;\n }\n return $annee . $mois;\n}", "private function _sql_yearmonth() {\n\t\tglobal $wpdb;\n\t\tif ( !$this->yearmonth ) {\n\t\t\treturn '';\n\t\t}\n\t\t// e.g. AND DATE_FORMAT(wp_posts.post_modified, '%Y%m') = '201102'\n\t\treturn sprintf(\"%s DATE_FORMAT(%s.%s, '%%Y%%m') = %s\" // note the double percentage to placate sprintf \n\t\t\t, $this->join_rule\n\t\t\t, $wpdb->posts\n\t\t\t, $this->date_column\n\t\t\t, $wpdb->prepare('%s', $this->yearmonth)\n\t\t);\n\t}", "function codeDate ($date) {\r\n\t $tab = explode (\"-\", $date);\r\n\t $r = $tab[1].\"/\".$tab[2].\"/\".$tab[0];\r\n\t return $r;\r\n\t}", "function codeDate ($date) {\r\n\t $tab = explode (\"-\", $date);\r\n\t $r = $tab[1].\"/\".$tab[2].\"/\".$tab[0];\r\n\t return $r;\r\n\t}", "function codeDate ($date) {\r\n\t $tab = explode (\"-\", $date);\r\n\t $r = $tab[1].\"/\".$tab[2].\"/\".$tab[0];\r\n\t return $r;\r\n\t}", "function codeDate ($date) {\r\n\t $tab = explode (\"-\", $date);\r\n\t $r = $tab[1].\"/\".$tab[2].\"/\".$tab[0];\r\n\t return $r;\r\n\t}", "function codeDate ($date) {\r\n\t $tab = explode (\"-\", $date);\r\n\t $r = $tab[1].\"/\".$tab[2].\"/\".$tab[0];\r\n\t return $r;\r\n\t}", "function codeDate ($date) {\r\n\t $tab = explode (\"-\", $date);\r\n\t $r = $tab[1].\"/\".$tab[2].\"/\".$tab[0];\r\n\t return $r;\r\n\t}", "function codeDate ($date) {\r\n\t $tab = explode (\"-\", $date);\r\n\t $r = $tab[1].\"/\".$tab[2].\"/\".$tab[0];\r\n\t return $r;\r\n\t}", "function codeDate ($date) {\r\n\t $tab = explode (\"-\", $date);\r\n\t $r = $tab[1].\"/\".$tab[2].\"/\".$tab[0];\r\n\t return $r;\r\n\t}", "function parse_date2($data) {\n\t $timestamp = strtotime($data);\n\t if (false === $timestamp) {\n\t return '';\n\t } else {\n\t return date('Y/m', $timestamp);\n\t }\n\t}", "private static function formatQueryDate($date) {\n\t\t$dateComponents = self::parseDateArgument($date);\n\t\t$y = $dateComponents[0];\n\t\t$m = $dateComponents[1];\n\t\t$d = $dateComponents[2];\n\t\t$format = 'j M Y';\n\t\tif( preg_match('/[?]/', $d) ) {\n\t\t\t$format = 'M Y';\n\t\t\t$d = 1;\n\t\t}\n\t\tif( preg_match('/[?]/', $m) ) {\n\t\t\t$format = 'Y';\n\t\t\t$m = 1;\n\t\t}\n\t\tif( preg_match('/[?]/', $y) ) {\n\t\t\treturn $y;\n\t\t}\n\t\t$timestamp = mktime(0, 0, 0, intval($m) , intval($d), intval($y));\n\t\t$date = new DateTime(\"@$timestamp\");\n\t\treturn $date->format($format); // e.g. 1 Jan 2018 (no leading zero on days)\n\t}", "protected function _formatDate($month, $year)\n {\n return sprintf(\n '%02d/%02d', \n substr($month, -2, 2),\n substr($year, -2, 2)\n );\n }", "function get_date_numeral($format = 'Y-m-d') {\n\t$format = ($format == '') ? 'Y-m-d' : $format;\n\t$format = str_replace('Y', '9999', $format);\n\t$format = str_replace('m', '99', $format);\n\t$format = str_replace('d', '99', $format);\n\treturn $format;\n}", "private function convertMonthToDay($date)\n {\n $string = null;\n switch ($date) {\n case 1:\n $string = 'Senin';\n break;\n case 2:\n $string = 'Selasa';\n break;\n case 3:\n $string = 'Rabu';\n break;\n case 4:\n $string = 'Kamis';\n break;\n case 5:\n $string = 'Jumat';\n break;\n case 6:\n $string = 'Sabtu';\n break;\n case 7:\n $string = 'Minggu';\n break;\n default:\n $string = \"Undefined\";\n break;\n }\n return $string;\n }", "function convertDate_jmA_Amj($date)\r\n{\r\n\tsetlocale (LC_TIME, 'en_EN','en');\r\n\treturn strftime(\"%Y-%m-%d\", strtotime($date));\r\n}", "public function getMonth() : string\n {\n return date('m', $this->getUnixTimestamp());\n }", "function _makeMonth($date){\n // YYYY-MM and return an array of all the days\n // in the the month. The array that is returned\n // is in the same formate which is returned by\n // 'makeWeek' function\n $start = Carbon::parse($date)->startOfMonth();\n $end = Carbon::parse($date)->endOfMonth();\n $month = [];\n while ($start->lte($end)) {\n $carbon = $start;\n $month[] = $this->_makeDay($carbon);\n $start->addDay();\n }\n return $month;\n }", "function date_year($date){\r\n\t$year = NULL;\r\n\t$cont = 0;\r\n\tfor($i = 0; $i < strlen($date); $i++){\r\n\t\tif(is_numeric(substr($date, $i, 1))){\r\n\t\t\tif($cont == 2){\r\n\t\t\t\t$year .= substr($date, $i, 1);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tif($cont > 1){\r\n\t\t\t\treturn $year;\r\n\t\t\t}else{\r\n\t\t\t\t$cont++;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn $year;\r\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 codeDate ($date) \r\n\r\n{\r\n\r\n\t$tab = explode (\"-\", $date);\r\n\r\n\t$r = $tab[1].\"/\".$tab[2].\"/\".$tab[0];\r\n\r\n\treturn $r;\r\n\r\n}", "function dateformat($date)\n{\n\tif($date != \"0000-00-00\")\n\t{\n\t$ndate = explode(\"-\",$date);\n\t$year = $ndate[0];\n\t$day = $ndate[2];\n\t$month = intval($ndate[1])-1;\n\t$montharr = array(\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\");\n\t$month1 = $montharr[$month];\n\t\n\t\n\treturn $day . \" \" . $month1 . \" \" . $year;\n\t}\n\telse\n\treturn \"\";\n}", "function returnDate($date){\r\n $Newdate = explode(\" \",$date);\r\n $Newdate = substr($Newdate[0],0, 10);\r\n return($Newdate);\r\n }", "public function convert_quater_year($created_date){\n\t\tif(($created_date != '') && ($created_date != '0000-00-00')){\n\t\t\t$c_d = date('Y', strtotime($created_date));\n\t\t\treturn $c_d;\n\t\t}\n\t}", "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}", "private function formatDate($data)\n {\n if ($data['year'] == '') {\n $data['year'] = '0000';\n }\n\n if ($data['month'] == '') {\n $data['month'] = '00';\n } elseif ($data['month'] < 10) {\n $data['month'] = '0' . $data['month'];\n }\n\n if ($data['day'] == '') {\n $data['day'] = '00';\n } elseif ($data['day'] < 10) {\n $data['day'] = '0' . $data['day'];\n }\n\n return $data['year'] . $data['month'] . $data['day'];\n }", "protected function formatDate($date)\n {\n $date = explode('-', $date);\n\n $month = $date[0];\n\n $day = $date[1];\n\n $year = $date[2];\n\n return implode('-', [$year, $month, $day]);\n }", "function shiftMonth($date_str,$shift) {\n $dates = explode(\"-\",$date_str);\n $month = $dates[1];\n $year = $dates[0];\n $count = abs($shift);\n if($shift < 0) {\n for($i=1;$i<=$count;$i++) {\n if($month == 1) {\n $month = 12;\n $year--;\n }\n else {\n $month--;\n }\n }\n }\n elseif($shift > 0) {\n for($i=1;$i<=$count;$i++) {\n if($month == 12) {\n $month = 1;\n $year++;\n }\n else {\n $month++;\n }\n }\n }\n return \"$year-\" . sprintf(\"%02d\",$month) . \"-\" . $dates[2];\n }", "public function mes(){\n\n\t\t$date = $this->dia;\n $date = DateTime::createFromFormat('Y-m-d', $date);\n \t \n\t\treturn $date->format('m') - 1;\n\t}", "public function GetMonth($leadingZero = true) {\n return $leadingZero ? $this->format('m') : $this->format('n');\n }", "function date($date) {\n\t\tif (!is_int($date)) {\n\t\t\t$date = strtotime($date);\n\t\t}\n\t\t$format = 'd. M y @ H:i';\n\t\tif (date('Y', $date) == date('Y')) {\n\t\t\t$format = 'd. M @ H:i';\n\t\t}\n\t\treturn date($format, $date);\n\t}", "public function getDate($date){\n\t\t$date = explode('-', $date);\n\t\t$year = intval($date[0]);\n\t\t$month = $this->getMonthName(intval($date[1]));\n\t\t$day = intval($date[2]);\n\t\t\t\n\t\treturn $month . ' ' . $day . ', ' . $year;\n\t}", "public function getIncMonth($date=null,$inc){\n\t\t$dateNew = date(\"Y-m-d H:i:s\",strtotime(\"+\".$inc.\" month\", strtotime($date)));\n\t\treturn $dateNew;\n\t}", "function convertdate($date) {\n\t$date = strtotime($date);\n\treturn date(\"M j, Y g:ia\", $date);\n}", "public static function data_first_month() {\n\t$month = date('m');\n\t$year = date('Y');\n\treturn date('Y-m-d', mktime(0,0,0, $month, 1, $year));\n}", "function dateFromStr1($strDate){\n $d=explode('/',$strDate);\n $year = $d[2];\n $month = $d[0];\n $day = $d[1];\n return mktime(0,0,0,$month,$day,$year);\n\n}", "static function textual2NumericMonth ($mon){\r\n\t\t$months = array(\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\");\r\n\t\t$monthFull = array(\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\");\r\n\t\t$idx = array_search($mon, $months);\r\n\t\tif($idx===false){\r\n\t\t\t$idx = array_search($mon, $monthFull);\r\n\t\t}\r\n\t\tif($idx===false)\r\n\t\t\treturn \"00\";\r\n\t\t$idx ++;\r\n\t\treturn $idx < 10 ? \"0\".$idx : \"\".$idx;\r\n\t}", "public function generate_year_from_date($date)\n {\n $year = explode('-', $date);\n return $year[0];\n }", "public function getDateStartYear($date=null){\n\t\t$dateNew = date(\"Y-01-01 H:i:s\",strtotime($date));\n\t\treturn $dateNew;\n\t}", "public function getMonth($leadingZero = false)\r\n\t{\r\n\t\tif ($leadingZero)\r\n\t\t{\r\n\t\t\treturn $this->format('m');\r\n\t\t}\r\n\t\telse \r\n\t\t{\r\n\t\t\treturn $this->format('n');\r\n\t\t}\r\n\t}", "function get_month($cur_date,$type){\n $date_split=split(\"-\",$cur_date);\n if ($type=='1'){\n // Return January format\n return $this->translate_month($this->cal_lang,date(\"F\",mktime(0,0,0,$date_split[1],$date_split[0],$date_split[2])));}\n elseif ($type=='2'){\n // Return Jan format\n return date(\"M\",mktime (0,0,0,$date_split[1],$date_split[0],$date_split[2]));}\n elseif ($type=='3'){\n // Return 01 format\n return date(\"m\",mktime (0,0,0,$date_split[1],$date_split[0],$date_split[2]));}\n elseif ($type=='4'){\n // Return 1 format\n return date(\"n\",mktime (0,0,0,$date_split[1],$date_split[0],$date_split[2]));}\n }", "public function getAbrevMonthName(){\n\t\tif($this->_year>1970&&$this->_year<2038){\n\t\t\t$timestamp = $this->_timestamp;\n\t\t} else {\n\t\t\t$timestamp = mktime(0, 0, 0, $this->_month, 1, date('Y'));\n\t\t}\n\t\t$locale = $this->getLocale();\n\t\t$months = $locale->getAbrevMonthList();\n\t\treturn ucfirst($months[$this->_month-1]);\n\t}", "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 getMois($date): string\n {\n @list($jour, $mois, $annee) = explode('/', $date);\n unset($jour);\n if (strlen($mois) == 1) {\n $mois = '0' . $mois;\n }\n return $annee . $mois;\n }", "public function generate_indonesia_month($date)\n {\n $bulan = self::generate_integer_month();\n return $bulan[$date];\n }", "public static function formatDate($date)\n {\n \n // keep track of slashes, if there's only one we need to format it\n $slashPos = strpos($date, \"/\");\n $slashPos2 = strpos($date, \"/\", $slashPos + 1);\n \n if ($slashPos2 === false) {\n if (substr($date, 1, 1) == \"/\") {\n $month = substr($date, 0, 1);\n } else {\n $month = substr($date, 0, 2);\n }\n \n if (substr($date, -3, 1) == \"/\") {\n $year = substr($date, -2, 2);\n } else {\n $year = substr($date, -4, 4);\n }\n $actualDate = $month . \"/01/\" . $year;\n return $actualDate;\n } else {\n return $date;\n }\n }", "protected function formatAggregateMonthDate($result)\n {\n [$year, $month] = explode('-', $result);\n\n return with(Chronos::create((int) $year, (int) $month, 1), function ($date) {\n return __($date->format('F')).' '.$date->format('Y');\n });\n }", "function monthchange($mon){\n\t\t\tif ($mon == \"January\"){\n\t\t\t\treturn \"01\";\n\t\t\t} else if ($mon == \"February\"){\n\t\t\t\treturn \"02\";\n\t\t\t} else if ($mon == \"March\"){\n\t\t\t\treturn \"03\";\n\t\t\t} else if ($mon == \"April\"){\n\t\t\t\treturn \"04\";\n\t\t\t} else if ($mon == \"May\"){\n\t\t\t\treturn \"05\";\n\t\t\t} else if ($mon == \"June\"){\n\t\t\t\treturn \"06\";\n\t\t\t} else if ($mon == \"July\"){\n\t\t\t\treturn \"07\";\n\t\t\t} else if ($mon == \"August\"){\n\t\t\t\treturn \"08\";\n\t\t\t} else if ($mon == \"September\"){\n\t\t\t\treturn \"09\";\n\t\t\t} else if ($mon == \"October\"){\n\t\t\t\treturn \"10\";\n\t\t\t} else if ($mon == \"November\"){\n\t\t\t\treturn \"11\";\n\t\t\t} else if ($mon == \"Desember\"){\n\t\t\t\treturn \"12\";\n\t\t\t}\n\t\t}", "function COM_JSdate(&$date) {\r\n\t//note: the \"intval\" removes the leading zero which JS interprets as octal number;\r\n\t//\t\"-1\" needed because JS expects month rel to 0 (but not day) and same as \"intval\")\r\n\treturn $date->format(\"Y\").\",\".($date->format(\"m\")-1).\",\".intval($date->format(\"d\"));\r\n}", "function getMois($date)\n{\n\t@list($jour, $mois, $annee) = explode('/', $date);\n\tif (strlen($mois) == 1) {\n\t\t$mois = \"0\" . $mois;\n\t}\n\treturn $annee . $mois;\n}", "public function calcDate($date)\n {\n list($year, $month, $day) = explode(\"-\", $date);\n return \"$day-$month-$year\";\n }", "private function set_date()\r\n\t{\r\n\t\tif ($this->month > 12)\r\n\t\t{\r\n\t\t\t$this->month=1;\r\n\t\t\t$this->year++;\r\n\t\t}\r\n\r\n\t\tif ($this->month < 1)\r\n\t\t{\r\n\t\t\t$this->month=12;\r\n\t\t\t$this->year--;\r\n\t\t}\r\n\r\n\t\tif ($this->year > 2037) $this->year = 2037;\r\n\t\tif ($this->year < 1971) $this->year = 1971;\r\n\t}", "function convertdate($date) {\r\n\t$date = strtotime($date);\r\n\treturn date(\"M j, Y g:ia\", $date);\r\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 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 static function setDateFormatMonth()\n {\n self::$settings[0] = 'Y-m';\n }", "function join_ymd($y, $m, $d) {\n $y = str_pad($y, 4, \"0\", STR_PAD_LEFT); \n $m = str_pad($m, 2, \"0\", STR_PAD_LEFT); \n $d = str_pad($d, 2, \"0\", STR_PAD_LEFT); \n return $y.'-'.$m.'-'.$d;\n}", "public function getMonthName(){\n\t\tif($this->_year>1970&&$this->_year<2038){\n\t\t\t$timestamp = $this->_timestamp;\n\t\t} else {\n\t\t\t$timestamp = mktime(0, 0, 0, $this->_month, 1, date('Y'));\n\t\t}\n\t\t$locale = $this->getLocale();\n\t\t$months = $locale->getMonthList();\n\t\treturn ucfirst($months[$this->_month-1]);\n\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}", "public function getDateEndYear($date=null){\n\t\t$dateNew = $this->getDateEndMonth(date(\"Y-12-d H:i:s\",strtotime($date)));\n\t\treturn $dateNew;\n\t}", "protected function month(){\n return $this->now->format('m');\n }", "private function generateCurrentMonth()\n {\n date_default_timezone_set('UTC');\n \n return date(\"n\");\n }", "function splitdate( $date ) {\n\t\n\t$year = substr( $date, 0, 4 );\n\t$mon = substr( $date, 4, 2 );\n\t$day = substr( $date, 6, 2 );\n\t$datum= $day.\".\".$mon.\".\".$year;\n\n\treturn $datum;\n}" ]
[ "0.6681563", "0.6523007", "0.6498544", "0.6492454", "0.6471678", "0.64606804", "0.6431762", "0.6411973", "0.6279234", "0.6236314", "0.6206356", "0.61481196", "0.61475796", "0.6126886", "0.6065553", "0.6064248", "0.6042289", "0.6038749", "0.603303", "0.602878", "0.6013536", "0.59800947", "0.5971009", "0.590334", "0.5881195", "0.5849746", "0.5843576", "0.58235127", "0.57997215", "0.57974523", "0.5767996", "0.5765295", "0.5763574", "0.5763186", "0.5760163", "0.5738313", "0.57143104", "0.5705752", "0.5691043", "0.568585", "0.568585", "0.568585", "0.568585", "0.568585", "0.568585", "0.568585", "0.568585", "0.5664835", "0.5656131", "0.5642929", "0.564165", "0.5638021", "0.5633229", "0.5627429", "0.56171507", "0.55901337", "0.5585489", "0.55827576", "0.55710924", "0.55619484", "0.555826", "0.5542624", "0.5540073", "0.5535192", "0.5531776", "0.5516961", "0.5508227", "0.5503766", "0.5494812", "0.54745203", "0.545864", "0.5458377", "0.54445165", "0.544383", "0.54425716", "0.5436135", "0.5429645", "0.542939", "0.54257643", "0.5422382", "0.5420196", "0.54127383", "0.54065925", "0.540159", "0.5391303", "0.53845704", "0.5378687", "0.5368046", "0.5352083", "0.5332955", "0.53319657", "0.5327086", "0.5319814", "0.53177667", "0.5315855", "0.53137934", "0.5310249", "0.530235", "0.5302213", "0.5301494" ]
0.7367376
0
ex: 00,02 > 00,03 ==> 60s
function totalSecond($hh1, $mm1, $ss1 = '0', $hh2, $mm2, $ss3 = '0') { $seconds = mktime($hh1, $mm1, $ss1) - mktime($hh2, $mm2, $ss3); return $seconds; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function time_to_secs($time)\n{\n$timeArr = array_reverse(split(\":\", $time));\n$seconds = 0;\n$vals = Array(1, 60, 3600, 86400);\nforeach($timeArr as $key => $value)\n{\nif(!isset($vals[$key]))\nbreak;\n$seconds += $value * $vals[$key];\n}\nreturn $seconds;\n}", "function get_60_seconds() {\n\t$array = array();\n\n\tfor ($i = 0; $i <= 59; $i++) {\n\t\tif($i < 10) {\n\t\t\t$array[$i] = 0 . $i;\n\t\t}\n\t\telse {\n\t\t\t$array[$i] = $i;\n\t\t}\n\t}\n\n\treturn $array;\n}", "static public function get_time() {\n // By Zach Buller ([email protected])\n $time1 = \\microtime();\n \\settype($time1, 'string'); //convert to string to keep trailing zeroes\n $time2 = explode(\" \", $time1);\n $sub_secs = \\preg_replace('/0./', '', $time2[0], 1);\n $time3 = ($time2[1].$sub_secs)/100;\n return $time3;\n }", "function tiemposHMS($min){\n $min=(int)$min;\n $heure=(int)($min/60);\n $minute=(($min/60)-$heure)*60; \n return $heure .':' . $minute; \n \n \n \n }", "function convertTime($number)\n{\n $str_arr = explode('.', $number);\n\n $num = ($str_arr[0]);\n //floatval\n $point = ($str_arr[1]);\n $count = strlen($str_arr[1]);\n\n if ($count == 1 && $point < 10) {\n $point = $point * 10;\n }\n\n while ($point >= 60) {\n $num = $num + 1;\n $point = $point - 60;\n }\n $t = floatval($num . \".\" . $point);\n\n return $t;\n}", "function timify($input) {return \"about \".round($input*100)/100;}", "function humanTiming ($time)\n {\n\n $time = time() - $time; // to get the time since that moment\n $time = ($time<1)? 1 : $time;\n $tokens = array (\n 31536000 => 'tahun',\n 2592000 => 'bulan',\n 604800 => 'minggu',\n 86400 => 'hari',\n 3600 => 'jam',\n 60 => 'menit',\n 1 => 'detik'\n );\n\n foreach ($tokens as $unit => $text) {\n if ($time < $unit) continue;\n $numberOfUnits = floor($time / $unit);\n return $numberOfUnits.' '.$text.(($numberOfUnits>1)?'s':'');\n }\n\n }", "function dec_time()\n{\n $ds = 86400; // total seconds in day\n $dt = microtime(true) - mktime(0,0,0);\n\n $hs = $ds / pow(10,1);\n $ms = $ds / pow(10,3);\n $ss = $ds / pow(10,5);\n\n $hour = floor($dt/$hs);\n $min = floor($dt/$ms) - ($hour * 100);\n $sec = floor($dt/$ss) - ($hour * 10000) - ($min * 100);\n //$usec = floor($dt/$us) - ($hour * 10000) - ($min * 100);\n\n return sprintf('%01d',$hour).'h '.sprintf('%02d',$min).'m '.sprintf('%02d',$sec).'s';\n}", "function milisecond_to_time($time) {\n $hours = gmdate(\"H\", $time / 1000);\n $mins = gmdate(\"i\", $time / 1000);\n $seconds = gmdate(\"s\", $time / 1000);\n if($hours > 24) {\n $tags = Math.floor($hours/24);\n $hours = $hours % 24;\n }\n $res = \"$hours:$mins:$seconds\";\n return $res;\n }", "function mstime ()\r\n{\r\n\t$t = explode (' ', microtime ());\r\n\treturn (int) (($t[0] + $t[1]) * 1000);\r\n}", "function convert_time($total)\n{\n return sprintf('%2d:%2d:%2d', intval($total/3600), intval($total/60) % 60, $total % 60);\n}", "static function ts(){\r\n $dt = microtime(true) - self::$starttime;\r\n return self::mtformat($dt);\r\n }", "function convert_time ($time = '') {\n $str_time = '';\n\n $time_in_second = $time / 1000;\n\n $nb_minutes = $time_in_second / 60;\n $nb_seconds = $time_in_second % 60;\n\n $str_time = $nb_seconds.'s';\n\n if ($nb_minutes >= 60) {\n $nb_heures = $nb_minutes / 60;\n $nb_minutes = $nb_minutes % 60;\n $str_time = floor($nb_heures).'h '.$nb_minutes.'m '.$str_time;\t\t\t\t\t\t\t\t\t\n } else {\n $str_time = floor($nb_minutes).'m '.$str_time;\n }\t\t\n return $str_time;\n\n }", "function getMilliSecond() {\n\tlist($s1, $s2) = explode(' ', microtime());\n\treturn (float)sprintf('%.0f', (floatval($s1) + floatval($s2)) * 1000);\n}", "function humanTiming ($time){\n $time = (time()- 2*60*60)- $time; // to get the time since that moment\n $time = ($time<1)? 1 : $time;\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) continue;\n $numberOfUnits = floor($time / $unit);\n return $numberOfUnits.' '.$text.(($numberOfUnits>1)?'s':'');\n }\n }", "function GetuTime()\n{\n\tlist($uSec, $Sec)=explode(\" \", microtime()); \n\treturn((float)$uSec+(float)$Sec); \n}", "function format_time($secs) {\n\t\t $times = array(3600, 60, 1);\n\t\t $time = '';\n\t\t $tmp = '';\n\t\t for($i = 1; $i < 3; $i++) {\n\t\t\t $tmp = floor($secs / $times[$i]);\n\t\t\t if($tmp < 1) {\n\t\t\t\t $tmp = '00';\n\t\t\t }\n\t\t\t elseif($tmp < 10) {\n\t\t\t\t $tmp = '0' . $tmp;\n\t\t\t }\n\t\t\t $time .= $tmp;\n\t\t\t if($i < 2) {\n\t\t\t\t $time .= ':';\n\t\t\t }\n\t\t\t $secs = $secs % $times[$i];\n\t\t }\n\t\t return $time;\n\t\t}", "function hms2sec ($hms) {\n\tlist($h, $m, $s) = explode (\":\", $hms);\n\t$seconds = 0;\n\t$seconds += (intval($h) * 3600);\n\t$seconds += (intval($m) * 60);\n\t$seconds += (intval($s));\n\treturn $seconds;\n}", "function sec2time ($sec) {\n $sec = (int) $sec;\n $time = ''; $h = 0;\n if ($sec >= 3600 ) {\n $h = (int) ($sec / 3600);\n if ($h > 0) { $time .= $h.':'; }\n $sec = $sec - $h*3600;\n }\n $m = (int) ($sec / 60);\n if ($h == 0) { $time .= $m.':'; }\n else { $time .= sprintf(\"%02d\", $m).':'; };\n if ($m > 0) { $sec = $sec - $m*60; }\n $time .= sprintf(\"%02d\", $sec);\n return $time;\n}", "function process_time(){\n $time = number_format( microtime(true) - LIM_START_MICROTIME, 6);\n return($time);\n}", "function counttime()\n{\n global $time;\n\n $arrHour = explode(\":\", $time);\n $arrTime2 = array(8, 10, 12, 14, 16, 18, 20, 22, 24);\n foreach ($arrTime2 as $intTime)\n {\n if ($arrHour[0] < $intTime)\n {\n $intWait = (($intTime - $arrHour[0]) * 60) - $arrHour[1];\n $intHours = floor($intWait / 60);\n $intMinutes = $intWait % 60;\n break;\n }\n }\n $arrTime = array('', '');\n if ($intHours < 1)\n {\n $arrTime[0] = '';\n }\n if ($intHours == 1)\n {\n $arrTime[0] = $intHours.T_HOUR;\n }\n if ($intHours > 1 && $intHours < 5)\n {\n $arrTime[0] = $intHours.T_HOURS2;\n }\n if ($intHours > 4)\n {\n $arrTime[0] = $intHours.T_HOURS;\n }\n if ($intMinutes < 1)\n {\n $arrTime[1] = '';\n }\n if ($intMinutes == 1)\n {\n $arrTime[1] = $intMinutes.T_MINUTE;\n }\n if (($intMinutes > 1 && $intMinutes < 5) || @ereg(\"^[2-5][2-4]*$\", $intMinutes))\n {\n $arrTime[1] = $intMinutes.T_MINUTES2;\n }\n if (($intMinutes > 4 && $intMinutes < 20) || @ereg(\"^[2-5][5-9]*$\", $intMinutes) || @ereg(\"^[2-5][0-1]*$\", $intMinutes))\n {\n $arrTime[1] = $intMinutes.T_MINUTES;\n }\n\n return $arrTime;\n}", "function timeElapsed($sec){\n\n if( $sec <= 1 ) 'Agora mesmo';\n\n $date = [ 'ano' => 31536000,\n 'mes' => 2592000,\n 'dia' => 86400,\n 'hora' => 3600,\n 'minuto' => 60,\n 'segundo' => 1];\n \n foreach( $date as $name => $time ){\n $qtde = $sec / $time;\n if( $qtde >= 1 ) return 'há ' . floor( $qtde ) . ' ' . $name . ($qtde > 2 ? 's' : '');\n }\n\n }", "function sec2qty($sec)\r\n{\r\n $seconds = $sec / 3600;\r\n return round($seconds, 2);\r\n}", "function format_time($value, $event, $is_avg) {\n\tif ($event === \"333fm\" && $is_avg == false) return $value;\n\n\tif ($event === \"333mbf\") {\n\t\t$difference = 99 - intval(substr($value,-9,2));\n\t\t$missed = intval(substr($value,-1,2));\n\t\t$time = intval(substr($value,-7,5));\n\t\t$solved = $difference + $missed;\n\t\t$tried = $solved + $missed;\n\t\t$minutes = intval(intval($time) / 60);\n\t\t$seconds = intval($time) % 60;\n\t\tif ($minutes>0) $seconds = \"0\".$seconds;\n\t\treturn \"$solved/$tried $minutes:\".sprintf(\"%02d\",$seconds);\n\t}\n\n\t$minutes = intval(intval($value) / 6000);\n\t$seconds = (intval($value) % 6000) / 100;\n\n\tif ($minutes > 0) {\n\t\treturn \"$minutes:\".sprintf(\"%05.2f\",$seconds);\n\t}\n\n\treturn sprintf(\"%.2f\",$seconds);\n}", "function timecheck ($time) {\n $min = 0;\n if($time->h >= 1) {\n $min += 60*$time->h;\n }\n $min += $time->i;\n if($min == 0) {\n return \"Passage en cours...\";\n } else {\n return $min.\" min\";\n }\n \n\n}", "function get_hh_mm($seconds) {\n $hours = floor($seconds / 60 / 60);\n $remaining_seconds = $seconds - ($hours * 60 * 60);\n $minutes = floor($remaining_seconds / 60);\n $f_hours = strlen($hours) == 1 ? \"0$hours\" : $hours;\n $f_minutes = strlen($minutes) == 1 ? \"0$minutes\" : $minutes;\n return \"$f_hours:$f_minutes\";\n}", "function get_hh_ss($seconds) {\n $hours = floor($seconds / 60 / 60);\n $minutes = floor(($seconds - ($hours * 60 * 60)) / 60);\n $d_seconds = $seconds - (($hours * 60 * 60) + ($minutes * 60));\n $f_hours = strlen($hours) == 1 ? \"0$hours\" : $hours;\n $f_minutes = strlen($minutes) == 1 ? \"0$minutes\" : $minutes;\n $f_seconds = strlen($d_seconds) == 1 ? \"0$d_seconds\" : $d_seconds;\n return \"$f_hours:$f_minutes:$f_seconds\";\n}", "function time_duration($seconds = '', $use = null, $zeros = false)\n{\n\n // Define time periods\n $periods = array (\n 'years' => 31556926,\n 'Months' => 2629743,\n 'weeks' => 604800,\n 'days' => 86400,\n 'hours' => 3600,\n 'minutes' => 60,\n 'seconds' => 1\n );\n \n // Break into periods\n $seconds = (float) $seconds;\n $segments = array();\n foreach ($periods as $period => $value) {\n if ($use && strpos($use, $period[0]) === false) {\n continue;\n }\n $count = floor($seconds / $value);\n if ($count == 0 && !$zeros) {\n continue;\n }\n $segments[strtolower($period)] = $count;\n $seconds = $seconds % $value;\n }\n \n // Build the string\n $string = array();\n foreach ($segments as $key => $value) {\n $segment_name = substr($key, 0, -1);\n $segment = $value . ' ' . $segment_name;\n if ($value != 1) {\n $segment .= 's';\n }\n $string[] = $segment;\n }\n \n return implode(', ', $string);\n}", "function turnTotalMinsIntoTime($totalMins) {\n $mins = intval($totalMins % 60);\n $hour = round((($totalMins - $mins) / 60),0);\n $mins = strlen($mins) < 2 ? \"0\".$mins : $mins;\n return $hour.\":\".$mins;\n}", "abstract public function toMilliseconds();", "function getDuration(){\r\n\t$bytes = 30;\r\n\r\n\t$fp = fopen('./out', 'r');\r\n\tfseek($fp, $bytes * -1, SEEK_END); \r\n\t$data = fgets($fp, $bytes);\r\n\t\r\n\t\t\r\n\t$matches = [];\r\n\t$regex = '/-[0-9]{2}:.*$/';\r\n\t$result = preg_match($regex, $data, $matches);\r\n\t\r\n\tif($result === 1){\r\n\t\t$matches[0];\r\n\t\tlist($remaining, $total) = explode('/', $matches[0], 2);\r\n\t\t$remaining = ltrim ($remaining, '-');\r\n\t\t\r\n\t\tlist($remMins, $remSecs) = explode(':', $remaining, 2);\r\n\t\t$thing[] = intval($remMins) * 60 + $remSecs;\r\n\t\t\r\n\t\tlist($totMins, $totSecs) = explode(':', $total, 2);\r\n\t\t$thing[] = intval($totMins) * 60 + $totSecs;\r\n\t\t\r\n\t\treturn $thing;\r\n\t}else{\r\n\t\treturn [0, 0];\r\n\t}\r\n\t\r\n}", "function msecsToTime($content)\n{\n\t$secs = floor($content / 1000);\n\t$mins = floor($secs / 60);\n\t$hours = floor($mins / 60);\n\t$secs = $secs % 60;\n\t$mins = $mins % 60; \n\tif (strlen($mins) < 2) $mins = \"0\" . $mins;\n\treturn \"$hours\" . \":\" . \"$mins\";\n}", "public function timeLowLow();", "function humanTiming($time) {\n\tif(time() - $time >= 345600) {\n return date(\"m/d/Y g:i A\", $time);\n }\n $time = time() - $time;\n if (strval($time) < 1) {\n $time = 1;\n }\n $tokens = array(86400 => 'day', 3600 => 'hour', 60 => 'minute', 1 => 'second');\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}", "public function ntc_seconds($input) {\n $this->seconds_input = substr(-5, 2);\n return $this->seconds_output = date('s') - $this->seconds_input;\n }", "function SecondsToTimeNEW($inputTime) \n{\t\n\t//echo nl2br(\"Seconds are now: $Seconds \\n\");\n\t//HOUR\n\tif($inputTime>=(60*60))\n\t{\n\t\t$CaryOver=$inputTime%(60*60);\n\t\t$Hours=floor($inputTime/(60*60));\n\t\t$inputTime=$CaryOver;\n\t\t\n\t}\n //MIN\n\tif($inputTime>=60)\n\t{\n\t\t$CaryOver=$inputTime%60; //Remainder\n\t\t$Minutes=floor($inputTime/60);\n\t\t$inputTime=$CaryOver;\n\t\t//echo nl2br(\"Minutes are now: $CarryOver \\n\");\n\t\t\n\t}\n\t//SEC\n\t$Seconds=$inputTime;\n\t\t\n\t//NOW Correct the FORMAT\n\tif($Hours<10)\n\t{$Hours=\"0\".$Hours;}\t\n\tif($Minutes<10)\n\t{$Minutes=\"0\".$Minutes;}\n\tif($Seconds<10)\n\t{$Seconds=\"0\".$Seconds;}\n\t\n\t\n\treturn (\"$Hours:$Minutes:$Seconds\");\n}", "public static function milliseconds() {}", "function gallo_reading_time() {\n\t$content = get_post_field( 'post_content', $post->ID );\n\t$word_count = str_word_count( strip_tags( $content ) );\n\t$readingtime = ceil($word_count / 200);\n\t\n\tif ($readingtime == 1) {\n\t\t$timer = \" min\"; // singular\n\t} else {\n\t\t$timer = \" min\"; // plural\n\t}\n\t\n\t$totalreadingtime = $readingtime . $timer;\n\treturn $totalreadingtime;\n\t\n}", "function getTime() {\n list($usec, $sec) = explode(\" \", microtime());\n return ((float)$usec + (float)$sec);\n}", "private function _getMillisecond()\n {\n\n list($s1, $s2) = explode(' ', microtime());\n return (float)sprintf('%.0f', (floatval($s1) + floatval($s2)) * 1000);\n }", "static function time($value){\n\t\t$separator = \":\";\n\t\t$value = substr($value, 0, 8);\n\t\tif((strlen($value) == 8) && (substr($value, 2, 1) == $separator) && (substr($value, 5, 1) == $separator)){\n\t\t\t$hou = (int) substr($value, 0, 2);\n\t\t\t$min = (int) substr($value, 3, 2);\n\t\t\t$sec = (int) substr($value, 6, 2);\n\t\t}elseif((strlen($value) == 5) && (substr($value, 2, 1) == $separator)){\n\t\t\t$hou = (int) substr($value, 0, 2);\n\t\t\t$min = (int) substr($value, 3, 2);\n\t\t\t$sec = 0;\n\t\t}else{\n\t\t\treturn null;\n\t\t}\n\t\tif(($hou < 0 || $hou > 23) || ($min < 0 || $min > 59) || ($sec < 0 || $sec > 59)){\n\t\t\treturn null;\n\t\t}else{\n\t\t\treturn str_pad($hou, 2, \"0\", STR_PAD_LEFT).$separator.str_pad($min, 2, \"0\", STR_PAD_LEFT).$separator.str_pad($sec, 2, \"0\", STR_PAD_LEFT);\n\t\t}\n\t}", "function value_time($value){\r\n\t$separator = \":\";\r\n\tif(strlen($value) == 12){\r\n\t\t$value = substr($value, 0, 8);\r\n\t}\r\n\tif((strlen($value) == 8) && (substr($value, 2, 1) == $separator) && (substr($value, 5, 1) == $separator)){\r\n\t\t$hou = (int) substr($value, 0, 2);\r\n\t\t$min = (int) substr($value, 3, 2);\r\n\t\t$sec = (int) substr($value, 6, 2);\r\n\t}elseif((strlen($value) == 5) && (substr($value, 2, 1) == $separator)){\r\n\t\t$hou = (int) substr($value, 0, 2);\r\n\t\t$min = (int) substr($value, 3, 2);\r\n\t\t$sec = 0;\r\n\t}else{\r\n\t\treturn NULL;\r\n\t}\r\n\tif(($hou < 0 || $hou > 23) || ($min < 0 || $min > 59) || ($sec < 0 || $sec > 59)){\r\n\t\treturn NULL;\r\n\t}else{\r\n\t\treturn str_pad($hou, 2, \"0\", STR_PAD_LEFT).$separator.str_pad($min, 2, \"0\", STR_PAD_LEFT).$separator.str_pad($sec, 2, \"0\", STR_PAD_LEFT);\r\n\t}\r\n}", "function sec2hms ($sec, $padHours = false) \n {\n\n $hours = intval(intval($sec) / 3600);\n $minutes = intval(($sec / 60) % 60);\n $seconds = intval($sec % 60); \n\t\n\t\n $hms = ($padHours?str_pad($hours, 2, \"0\", STR_PAD_LEFT):$hours). ':'.\n\t\t\tstr_pad($minutes, 2, \"0\", STR_PAD_LEFT). ':'.\n\t\t\tstr_pad($seconds, 2, \"0\", STR_PAD_LEFT);\n\n return $hms;\n \n }", "private function calculateTime()\n {\n $slowest = 1000000;\n for($i=1; $i<=12; $i++){\n if($_GET['Tr'.$i] > 0 && $slowest > $this->troopCostsProperties['Tr'.$i][5] ){\n $slowest = $this->troopCostsProperties['Tr'.$i][5];\n }\n }\n $time = $this->distance/($slowest*SERVER_SPEED_RATE);\n return $time;\n }", "public function timeMid();", "function microtime_diff($message, $start, $end = null)\n{\n if (!$end) {\n $end = microtime();\n }\n\n list($start_usec, $start_sec) = explode(\" \", $start);\n list($end_usec, $end_sec) = explode(\" \", $end);\n $diff_sec = intval($end_sec) - intval($start_sec);\n $diff_usec = floatval($end_usec) - floatval($start_usec);\n $value = floatval($diff_sec) + $diff_usec;\n echo $message . ' ' . $value;\n echo PHP_EOL . PHP_EOL;\n}", "function toS($t, $f = '%dh %dm') {\n if (intval($t) < 1) {\n\t\t\t\t return;\n\t\t\t }\n\t\t\t $h = floor($t/60);\n\t\t\t $m = $t%60;\n\t\t\t return sprintf($f, $h, $m);\n\t\t}", "function time_diff($start_time,$end_time) {\n\n\t//subtract our times to get the difference\n\t$calcStArray = explode(\":\",$start_time);\n\t$calcEtArray = explode(\":\",$end_time);\n\n\t$start_hour = $calcStArray[0];\n\t$start_min = $calcStArray[1];\n\n\t$end_hour = $calcEtArray[0];\n\t$end_min = $calcEtArray[1];\n\n\t//reduce our dates to timestamps. We use a random date here, since it does not matter\n\t$ts1 = mktime($start_hour,$start_min,\"0\",1,1,2000);\n\t$ts2 = mktime($end_hour,$end_min,\"0\",1,1,2000);\n\n\t//get the number of seconds\n\t$diff = $ts2 - $ts1;\n\n\t$temp = $diff/3600;\n\n\t//get the place of the decimal point\n\t$pos = strpos($temp,\".\");\n\n\t//if we have pos, there is a decimal point\n\tif ($pos) {\n\n\t\t$dur_hour = intval($temp);\n\t\t$min = substr($temp,$pos);\n\n\t\t//convert to clock nums\n\t\tif ($min==\".5\") $dur_min = \"30\";\n\t\telseif ($min==\".25\") $dur_min = \"15\";\n\t\telseif ($min==\".75\") $dur_min = \"45\";\n\n\t}\n\telse {\n\t\t$dur_hour = $temp;\n\t\t$dur_min = \"00\";\n\t}\n\n\treturn array($dur_hour,$dur_min);\n\n}", "function ReturnTimer( $decimal=5 )\n {\n if( !is_int($decimal) ):\n $decimal = 5;\n endif;\n $format = '%.'.$decimal.'f %s';\n $time = $this->pCalcTime();\n $sec = ( ($time > 1) ? 'secs.' : 'sec.' );\n return sprintf( $format, $time, $sec );\n }", "function milliseconds()\n{\n $mt = explode(' ', microtime());\n return ((int)$mt[1]) * 1000 + ((int)round($mt[0] * 1000));\n}", "function second()\r\n {\r\n $value = $this->SecondsElapsed;\r\n\r\n $second = $value % 60;\r\n\r\n return $second;\r\n }", "function time_to_go($timestamp) {\n $periods = array(\n \"second\",\n \"minute\",\n \"hour\",\n \"day\",\n \"week\",\n \"month\",\n \"year\"\n );\n $lengths = array(\n \"60\",\n \"60\",\n \"24\",\n \"7\",\n \"4.35\",\n \"12\"\n );\n $current_timestamp = time();\n $difference = abs($current_timestamp - $timestamp);\n for ($i = 0; $difference >= $lengths[$i] && $i < count($lengths) - 1; $i ++) {\n $difference /= $lengths[$i];\n }\n $difference = round($difference);\n if (isset($difference)) {\n if ($difference != 1)\n $periods[$i] .= \"s\";\n $output = \"$difference $periods[$i]\";\n return $output;\n }\n }", "function get_time_description($seconds)\r\n{\r\n $weeks = (int) ($seconds / 604800);\r\n $weeks_p = $weeks > 1 ? 'weeks' : 'week';\r\n $days=(int)($seconds/86400);\r\n $days_p = $days > 1 ? 'days' : 'day';\r\n $hours = (int)(($seconds-($days*86400))/3600);\r\n $mins = (int)(($seconds-$days*86400-$hours*3600)/60);\r\n $secs = (int)($seconds - ($days*86400)-($hours*3600)-($mins*60));\r\n\r\n //build a string\r\n $ret = \"$secs sec\";\r\n if ($mins > 0 && $sec >= 0)\r\n $ret = \"$mins min $ret\";\r\n if ($hours > 0 && $min >= 0 && sec >=0)\r\n $ret = \"$hours hours $ret\";\r\n if ($days > 0 && $hours >= 0 && $min >= 0 && sec >= 0)\r\n $ret = \"$days $days_p $ret\";\r\n\r\n return $ret;\r\n}", "function sec2hms($sec, $padHours = false) {\r\n $hms = \"\";\r\n \r\n // do the hours first: there are 3600 seconds in an hour, so if we divide\r\n // the total number of seconds by 3600 and throw away the remainder, we're\r\n // left with the number of hours in those seconds\r\n $hours = intval(intval($sec) / 3600); \r\n\r\n // add hours to $hms (with a leading 0 if asked for)\r\n $hms .= ($padHours) \r\n ? str_pad($hours, 2, \"0\", STR_PAD_LEFT). \":\"\r\n : $hours. \":\";\r\n \r\n // dividing the total seconds by 60 will give us the number of minutes\r\n // in total, but we're interested in *minutes past the hour* and to get\r\n // this, we have to divide by 60 again and then use the remainder\r\n $minutes = intval(($sec / 60) % 60); \r\n\r\n // add minutes to $hms (with a leading 0 if needed)\r\n $hms .= str_pad($minutes, 2, \"0\", STR_PAD_LEFT). \":\";\r\n\r\n // seconds past the minute are found by dividing the total number of seconds\r\n // by 60 and using the remainder\r\n $seconds = intval($sec % 60); \r\n\r\n // add seconds to $hms (with a leading 0 if needed)\r\n $hms .= str_pad($seconds, 2, \"0\", STR_PAD_LEFT);\r\n\r\n // done!\r\n return $hms;\r\n \r\n}", "protected static function getTime($seconds) {\n\t\t$units = array_reverse(Date::$units);\n\t\tforeach ($units as $unitName => $unitTotal) {\n\t\t\tif ($seconds > $unitTotal) {\n\t\t\t\t$timeTotal = floor($seconds / $unitTotal);\n\t\t\t\t$isPlural = ($timeTotal > 1);\n\t\t\t\treturn $timeTotal . ' ' . static::$unitsName[$unitName][$isPlural];\n\t\t\t}\n\t\t}\n\t\treturn 0;\n\t}", "function getTimeS($timestamp){\n\t\tif ($timestamp > 60*60*24){\n\t\t\t$timestamp = $timestamp % (60*60*24) + 2*(60*60);\n\t\t}\n\t\t$hours = intval($timestamp / (60*60));\n\t\t$minutes = intval(($timestamp % (60*60)) / 60);\n\t\treturn sprintf('%02d', $hours).\":\".sprintf('%02d', $minutes); \n\t}", "function rlip_schedule_period_minutes($period) {\n $period_elems = array('d' => DAYSECS/60,\n 'h' => HOURSECS/60,\n 'm' => 1);\n $parray = str_split($period);\n $num = '';\n $min = 0;\n foreach ($parray as $char) {\n if (ctype_space($char)) {\n continue;\n } else if (ctype_digit($char)) {\n $num .= $char;\n } else {\n if (!array_key_exists($char, $period_elems)) {\n return -1; // error\n }\n $multiplier = $period_elems[$char];\n $min += intval($num) * $multiplier;\n $num = '';\n }\n }\n return $min;\n}", "function formatSeconds( $seconds ) {\n $hours = 0;\n $milliseconds = str_replace( \"0.\", '', $seconds - floor( $seconds ) );\n\n if ( $seconds > 3600 ) {\n $hours = floor( $seconds / 3600 );\n }\n $seconds = $seconds % 3600;\n\n return str_pad( $hours, 2, '0', STR_PAD_LEFT ) . gmdate( ':i:s', $seconds ) . ($milliseconds ? \".$milliseconds\" : '') ;\n}", "function formatTime($sec){\n if($sec > 100){\n $sec /= 60;\n if($sec > 100){\n $sec /= 60;\n return number_format($sec) . \" hr\";\n }\n return number_format($sec) . \" min\";\n }\n return number_format($sec) . \" sec\";\n}", "public static function timeunit(/* Long */ $time) {\n if ($time == null)\n return '';\n $sec = (int) $time % 60;\n $min = (int) ($time / 60) % 60;\n $hours = (int) ($time / 3600);\n return \"$hours:\" . sprintf('%02d', $min) . ':' . sprintf('%02d', $sec);\n }", "function getTime($distance,$speed) {\r\n\tif (gettype($speed)==\"array\") {\r\n\t\t$min=0;\r\n\t\tforeach ($speed as $value) {\r\n\t\t\tif (($min==0)||($min>$value)) {\r\n\t\t\t\t$min=$value;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif ($min==0) {\r\n\t\t\t\t\r\n\t\t\t$log=Zend_Registry::get(\"log\");\r\n\t\t\t$log->log(\"velocità 0!!!!\",Zend_Log::CRIT);\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t\telse $speed=$min;\r\n\t}\r\n\treturn intval(($distance/$speed)*3600);\r\n}", "function sec2hms ($sec, $padHours = false) \n {\n\n // start with a blank string\n $hms = \"\";\n \n $minutes = intval(($sec / 60) % 60); \n\n // add minutes to $hms (with a leading 0 if needed)\n $hms .= str_pad($minutes, 2, \"0\", STR_PAD_LEFT). \":\";\n\n // seconds past the minute are found by dividing the total number of seconds\n // by 60 and using the remainder\n $seconds = intval($sec % 60); \n\n // add seconds to $hms (with a leading 0 if needed)\n $hms .= str_pad($seconds, 2, \"0\", STR_PAD_LEFT);\n\n // done!\n return $hms;\n \n }", "function pretty_timespan($seconds = 1, $time = '')\n{\n\t$timespan = timespan($seconds, $time);\n\n\tif (strpos($timespan, ',') !== FALSE)\n\t\t$timespan = strstr($timespan, ',', TRUE);\n\n\t/* The tilde is added as a token to be able to limit the str_replace to the\n\t beginning of the string. */\n\t$timespan = '~' . strtolower($timespan);\n\t$numbers = array('~1 ', '~2 ', '~3 ', '~4 ', '~5 ', '~6 ', '~7 ', '~8 ', '~9 ');\n\t$names = array('One ', 'Two ', 'Three ', 'Four ', 'Five ', 'Six ', 'Seven ', 'Eight ', 'Nine ');\n\t$timespan = str_replace($numbers, $names, $timespan);\n\t$timespan = str_replace('~', '', $timespan);\n\n\treturn $timespan;\n}", "public function passedTicks() {\r\n\t\t$seconds = 300;\r\n\r\n\t\t$lastUpdate = (int)($this->lastUpdate() / $seconds);\r\n\t\t$now = (int)(TIME / $seconds);\r\n\r\n\t\treturn ($now - $lastUpdate);\r\n\t}", "private function time_to_second($time) {\n\t\tlist($h, $m, $s) = explode(':', $time);\n\t\t$s += $h * 3600 + $m * 60;\n\t\treturn $s;\n\t}", "private function milliseconds()\n {\n $mt = explode(' ', microtime());\n return bcadd($mt[1], $mt[0], 8);\n }", "public static function ms(): int\n {\n return round((static::elapsed() * 1000), 0);\n }", "function hms($duree = 0) \n\t{\n\t\t$heures = round($duree / 3600);\n\t\t$minutes = round(($duree - $heures * 3600) / 60);\n\t\t$secondes = round(($duree - $heures * 3600 - $minutes * 60) / 60);\n\n\t\treturn str_pad($heures, 2, \"0\", STR_PAD_LEFT).':'.str_pad($minutes, 2, \"0\", STR_PAD_LEFT).':'.str_pad($secondes, 2, \"0\", STR_PAD_LEFT);\n\t}", "function getTime(){\n\t\t$mtime = microtime();//print(\"\\n time : \" . $mtime);\n\t\t$mtime = explode(' ', $mtime);\n\t\t$mtime = $mtime[1] + $mtime[0];\n\t\treturn $mtime;\n\t}", "private static function time()\n {\n list($usec, $sec) = explode(\" \", microtime());\n return ((float)$usec + (float)$sec);\n }", "function m2h($mins) {\n if ($mins < 0)\n $min = abs($mins); \n else\n $min = $mins; \n \n // Arredonda a hora\n $h = floor($min / 60); \n $m = ($min - ($h * 60)) / 100; \n $horas = $h + $m; \n \n // Matemática da quinta série\n // Detalhe: Aqui também pode se usar o abs()\n if ($mins < 0)\n $horas *= -1; \n \n // Separa a hora dos minutos\n $sep = explode('.', $horas); \n $h = $sep[0]; \n if (empty($sep[1]))\n $sep[1] = 0; \n \n $m = $sep[1]; \n \n // Aqui um pequeno artifício pra colocar um zero no final\n if (strlen($m) < 2)\n $m = $m . 0; \n if($h > 0){\n\t\t\treturn sprintf('%2dh e %2dm', $h, $m);\n }else{\n\t\t\treturn sprintf('%2dm', $m);\n\t\t}\t\n}", "function timeConversion($s) {\n return DATE(\"H:i:s\", STRTOTIME($s));\n\n}", "function getTimeFromSeconds($seconds = '') {\n\n\t\t$hours = floor($seconds / 3600);\n\t\t$mins = floor($seconds / 60 % 60);\n\t\t$secs = floor($seconds % 60);\n\n\t\t$timeFormat = sprintf('%02d:%02d:%02d', $hours, $mins, $secs);\n\n\t\treturn $timeFormat;\n\t}", "function fa_video_duration( $seconds, $msg_none = '' ){\n\t$seconds = absint( $seconds );\n\t\n\tif( $seconds <= 0 ){\n\t\treturn $msg_none;\n\t}\n\t\n\t$h = floor( $seconds / 3600 );\n\t$m = floor( $seconds % 3600 / 60 );\n\t$s = floor( $seconds %3600 % 60 );\n\t\n\treturn ( ($h > 0 ? $h . \":\" : \"\") . ( ($m < 10 ? \"0\" : \"\") . $m . \":\" ) . ($s < 10 ? \"0\" : \"\") . $s);\n}", "function TimeToSecondsNEW($inputTime) \n{\t\n\t//now i need to strip h m s from this \n\t$s= substr($inputTime, (strlen($inputTime)-2)); // makes seconds the last 2 chars\n $inputTime=substr($inputTime,0,-3);//$inputTime=str_replace((\":\" . $s), \"\", $inputTime);\t//gets rid of seconds and :\n\t$m= substr($inputTime, (strlen($inputTime)-2)); \n\t$inputTime=substr($inputTime,0,-3);//$inputTime=str_replace((\":\" . $m), \"\", $inputTime);\t//gets rid of minutes and :\n\t$h= $inputTime; \n\t\n\t//USE THIS FOR TOTALS? add each individual piece\n\t$totalH=($h*60*60);\n\t$totalM=($m*60);\n\t$totalS=($s);\n\t\n\t//Then send updated totals back to user\t\t\n\treturn ($totalH+$totalM+$totalS);\n}", "function timeserial($hour,$minute=\"00\",$second=\"00\"){\n if ($hour==\"\") return \"\";\n return (strlen($hour)<2?\"0\":\"\").$hour.\":\".(strlen($minute)<2?\"0\":\"\").$minute.\":\".(strlen($second)<2?\"0\":\"\").$second;\n}", "function seconds_to_string($sec)\n {\n $hms = \"\";\n\t\t\n\t\t// for days\n\t\t$days = intval(intval($sec) / 86400);\n\t\t\n\t\t$hms .= ($days > 0) ? $days. \"d - \" : \"\";\n \n // do the hours first: there are 3600 seconds in an hour, so if we divide\n // the total number of seconds by 3600 and throw away the remainder, we're\n // left with the number of hours in those seconds\n $hours = intval(intval($sec / 3600) % 24);\n \n // add hours to $hms (with a leading 0 if asked for)\n $hms .= ($days == 0 && $hours == 0) ? \"\" : $hours. \"h - \";\n \n // dividing the total seconds by 60 will give us the number of minutes\n // in total, but we're interested in *minutes past the hour* and to get\n // this, we have to divide by 60 again and then use the remainder\n $minutes = intval(($sec / 60) % 60); \n \n // add minutes to $hms (with a leading 0 if needed) but only if minutes are not 0\n $hms .= ($days == 0 && $hours == 0 && $minutes == 0) ? \"\" : $minutes.\"m\";\n \n // seconds past the minute are found by dividing the total number of seconds\n // by 60 and using the remainder\n //$seconds = intval($sec % 60); \n \n // add seconds to $hms (with a leading 0 if needed)\n //$hms .= $seconds.\"s\";\n \n // if the total time is 0, show so\n\t\t$hms = empty($hms) ? 0 : $hms;\n\t\t\n\t\t// done!\n return $hms;\n }", "function sec2time($sec){\n\t// Parameters:\t$sec\n\t//\t\t\t\tType: integer\n\t// Returns:\t\tstring\n\t$returnstring = \" \";\n\t$days = intval($sec/86400);\n\t$hours = intval ( ($sec/3600) - ($days*24));\n\t$minutes = intval( ($sec - (($days*86400)+ ($hours*3600)))/60);\n\t$seconds = $sec - ( ($days*86400)+($hours*3600)+($minutes * 60));\n\t// if($seconds =='') $seconds = '00';\n\n\t$returnstring .= ($days)?(($days == 1) ? \"1 Day \" : sprintf(\"%02d\", $days). \" Days \") : \"\";\n\t$returnstring .= ($days && $hours && !$minutes && !$seconds) ? \"\" : \"\";\n\t$returnstring .= ($days > 0 && $hours == 0)? \"00:\": \"\";\n\t$returnstring .= ($hours)?( ($hours == 1) ? \"01:\" : sprintf(\"%02d\", $hours) .\":\") : \"00:\";\n\t$returnstring .= (($days || $hours) && ($minutes && !$seconds))?\"\":\"\";\n\t$returnstring .= ($minutes)?( ($minutes == 1)?\"1:\": sprintf(\"%02d\", $minutes) .\":\"):\"00:\";\n\t$returnstring .= (($days || $hours || $minutes) && $seconds)?\"\":\"\";\n\t$returnstring .= ($seconds) ? (($seconds == 1)? \"1\" : sprintf(\"%02d\", $seconds)):\"00\";\n\tif ($returnstring != \" \") return ($returnstring);\n}", "function secs_to_h($secs)\n{\n$units = array(\n\"week\" => 7*24*3600,\n\"day\" => 24*3600,\n\"hour\" => 3600,\n\"minute\" => 60,\n\"second\" => 1);\n// specifically handle zero, or a value less than 1 if it's a floating point number\n//Trying out handling anything less than a minute.\nif ($secs < 60)\nreturn \"$secs seconds\";\n$s = \"\";\nforeach ( $units as $name => $divisor )\n{\nif ($name == \"second\")\n{\n$quot = round($secs / $divisor, 2);\n}\nelse\n{\n$quot = intval($secs / $divisor);\n}\nif ($quot)\n{\n$s .= \"$quot $name\";\n$s .= (abs($quot) > 1 ? \"s\" : \"\") . \", \";\n$secs -= $quot * $divisor;\n}\n}\nreturn substr($s, 0, -2);\n}", "function countTime($connection, $sql_tiempo){\n $sql = mysqli_query($connection, $sql_tiempo);\n $horas = 0;\n $minutos = 0;\n while($row = mysqli_fetch_row($sql)){\n \n $timeTo = explode(':', $row[0]);\n \n $horas += intval($timeTo[0]);\n $minutos += intval($timeTo[1]);\n \n }\n $final_time = intval((($horas*60) + $minutos)/60).\":\".(($horas*60) + $minutos)%60;\n return $final_time;\n}", "public function timeLowHi();", "public function format(): string\n {\n foreach ($this->times as $unit => $value) {\n if ($this->time >= $value) {\n $time = floor($this->time / $value * 100) / 100;\n return \"{$time} {$unit}\";\n }\n }\n\n return round($this->time * 1000) . \" ms\";\n }", "function human_time_diff($from, $to = 0)\n {\n }", "function late_ride(int $n): int {\n // Coding and coding ... \n return array_sum(str_split(gmdate(\"H:i\", $n*60)));\n}", "private function time_rule($time){\n $hour = floor($time/3600);//divisão retornando parte inteira.\n $hour_rest = fmod($time, 3600);//divisão retornando restante\n $min = floor($hour_rest/60); // calculo de minutos apartir do restante de horas\n $sec = fmod($hour_rest, 60); // calculos dos segundos\n return $this->number_format($sec,$min,$hour);\n }", "function timer_stop(){\n\t\t$mtime = explode(' ', microtime());\n\t\t$time_end = $mtime[1] + $mtime[0];\n\t\t$time_total = $time_end - $this->time_start;\n\t\treturn $time_total;\n\t}", "function getTimeDuration();", "function compareTimes($t1, $t2) {\n\t\t$h1 = (int) substr($t1, 0, 2);\n\t\t$m1 = (int) substr($t1, 3, 2);\n\t\t$h2 = (int) substr($t2, 0, 2);\n\t\t$m2 = (int) substr($t2, 3, 2);\n\n\t\t//echo \"h:\" . $h1 . \" m - \" . $m1 . \"\\n\" ;\n\t\t//echo \"h:\" . $h2 . \" m - \" . $m2 . \"\\n\" ;\n\n\t\t$res;\n\n\t\tif( $h1 > $h2 )\n\t\t\t$res = 1;\n\t\telse if( $h1 == $h2 && $m1 > $m2 )\n\t\t\t$res = 1;\n\t\telse\n\t\t\t$res = 0;\n\n\t\treturn $res;\n\n\t}", "function humanReadableTime($seconds) {\n\n\t$hours = '00';\n\t$mins = '00';\n\n\tif ($seconds > 0) {\n\t\t$hours = str_pad(floor($seconds / 3600), 2, '0', STR_PAD_LEFT);\n\t\t$seconds %= 3600;\n\t}\n\n\tif ($seconds > 0) {\n\t\t$mins = str_pad(floor($seconds / 60), 2, '0', STR_PAD_LEFT);\n\t\t$seconds %= 60;\n\t}\n\n\t$seconds = str_pad($seconds, 2, '0', STR_PAD_LEFT);\n\n\n\treturn \"$hours:$mins:$seconds\";\n\n}", "function time_since($original)\n{\n// http://www.dreamincode.net/code/snippet86.htm\n\n // array of time period chunks\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, 'minute'),\n );\n \n $today = time();\n $since = $today - $original;\n \n // $j saves performing the count function each time around the loop\n for( $i=0, $j=count($chunks); $i<$j; $i++ )\n {\n \n $seconds = $chunks[$i][0];\n $name = $chunks[$i][1];\n \n // finding the biggest chunk (if the chunk fits, break)\n if( ($count = floor($since / $seconds)) != 0 )\n {\n break;\n }\n }\n \n $print = ($count == 1) ? '1 '.$name : \"$count {$name}s\";\n \n if( $i + 1 < $j )\n {\n // now getting the second item\n $seconds2 = $chunks[$i + 1][0];\n $name2 = $chunks[$i + 1][1];\n \n // add second item if it's greater than 0\n if( ($count2 = floor(($since - ($seconds * $count)) / $seconds2)) != 0 )\n {\n $print .= ($count2 == 1) ? ', 1 '.$name2 : \", $count2 {$name2}s\";\n }\n }\n return $print;\n}", "protected function time()\n {\n $time = microtime();\n $time = explode(' ', $time);\n $time = $time[1] + $time[0];\n return $time;\n }", "function net_time($timestamp=NULL)\n{\n $ts = ($timestamp == NULL) ? time() : intval($timestamp);\n\n list($h,$m,$s) = split(':',gmdate('H:i:s',$ts));\n list($u,$ts) = ($timestamp == NULL) ? split(' ',microtime()) : array(0,0);\n\n $deg = $h * 15; // 0-345 (increments of 15)\n $deg = $deg + floor($m / 4); // 0-14\n\n $min = ($m % 4) * 15; // 0,15,30,45\n $min = $min + floor($s / 4); // 0-14\n\n $sec = ($s % 4) * 15; // 0,15,30,45\n $sec = $sec + ((60 * $u) / 4); // 0-14\n\n return sprintf('%d%s %02d\\' %02d\" NET',$deg,unichr(176),$min,$sec);\n}", "function check_time($ts){\n\n // 1: Read the hh:mm in seperate variables and convert to int\n\t$ts_unix = strtotime($ts);\n\t$ts_hour = idate('H', $ts_unix);\n\t$ts_minute = idate('i',$ts_unix);\n\n // 2: Convert into decimal \n\t$ts_sum = $ts_hour + ($ts_minute * 1/60);\n\n\t$time_now_hour = idate('H');\n\t$time_now_minute = idate('i');\n\t\n\t$time_now_sum = $time_now_hour + ($time_now_minute * 1/60);\n \n // 3: Calculate the difference between now and the timestamp\n\t$div_minutes = ($time_now_sum - $ts_sum) * 60;\n\n // 4: Generate a tag with red background if difference > 5 min\n\tif(($div_minutes <= 5) && ($div_minutes >= 0) && (date(\"Y-m-d\") == date(\"Y-m-d\",$ts_unix)))\n\t{\n\t\treturn '<td class =\"ok_color\">'.$ts.'</td>';\n\t} else\n\t{\n\t\treturn '<td class =\"fail_color\">'.$ts.'</td>';\n\t}\n }", "private function getTime() {\n // Get the current microtime string as `microseconds seconds`\n $time_arr = microtime();\n // Add the two numbers together\n $time = array_sum(explode(' ', $time_arr));\n // Multiply by 1000 and return a 13 digit timestamp\n $microtime = $time * 1000;\n return substr($microtime, 0, 13); \n }", "function TimeToSec($time) {\n\t$dot2 = strpos($time, ':');\n\tif($dot2 > 0) {\n\t\t$min = substr($time, 0, $dot2);\n\t\t$time = substr($time, $dot2+1);\n\t}\n\t\t\n\t$time = ($min * 60) + $time;\n\treturn $time;\n}", "function humanTiming ($time)\n{\n $time = time() - $time;\n\n // time unit constants\n $timeUnits = 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 // iterate over time contants to build a human \n //$humanTiming;\n foreach ($timeUnits as $unit => $text)\n {\n if ($time < $unit)\n continue;\n $numberOfUnits = floor($time / $unit);\nif(!isset($humanTiming)){\n // human readable token for current time unit\n $humanTiming = $numberOfUnits.' '.$text.(($numberOfUnits>1)?'s':'');\n}\n // compute remaining time for next loop iteration\n $time -= $unit*$numberOfUnits;\n }\n return $humanTiming;\n}", "function seconds_to_time( $seconds, $format = 'H:m:s' ) {\n\t// extract hours\n\t$hours = floor($seconds / (60 * 60));\n\t\n\t// extract minutes\n\t$divisor_for_minutes = $seconds % ( 60 * 60 );\n\t$minutes = floor( $divisor_for_minutes / 60 );\n\t\n\t// extract the remaining seconds\n\t$divisor_for_seconds = $divisor_for_minutes % 60;\n\t$seconds = ceil( $divisor_for_seconds );\n\t\n\t$format = str_replace( 'H', str_pad( $hours, 2, \"0\", STR_PAD_LEFT ), $format );\n\t$format = str_replace( 'm', str_pad( $minutes, 2, \"0\", STR_PAD_LEFT ), $format );\n\t$format = str_replace( 's', str_pad( $seconds, 2, \"0\", STR_PAD_LEFT ), $format );\n\t\n\treturn $format;\n\t\n}", "function phpTrafficA_getmicrotime() {\nlist($usec, $sec) = explode(\" \", microtime());\nreturn ((float)$usec + (float)$sec);\n}", "public function microtime();", "function time_elapsed_string($ptime)\n{\n if (empty($ptime)) {\n return \"No Time\";\n }\n $etime = time() - $ptime;\n\n if ($etime < 1) {\n return '0 seconds';\n }\n\n $a = array(365 * 24 * 60 * 60 => 'year',\n 30 * 24 * 60 * 60 => 'month',\n 24 * 60 * 60 => 'day',\n 60 * 60 => 'hour',\n 60 => 'min',\n 1 => 'sec'\n );\n $a_plural = array('year' => 'years',\n 'month' => 'months',\n 'day' => 'days',\n 'hour' => 'hours',\n 'min' => 'min',\n 'sec' => 'secs'\n );\n\n foreach ($a as $secs => $str) {\n $d = $etime / $secs;\n if ($d >= 1) {\n $r = round($d);\n return $r . ' ' . ($r > 1 ? $a_plural[$str] : $str) . '';\n }\n }\n}" ]
[ "0.64060503", "0.62583244", "0.624695", "0.6213211", "0.6212911", "0.61362195", "0.60882473", "0.6057313", "0.60476893", "0.6039389", "0.6035256", "0.602655", "0.6025913", "0.6000323", "0.5989791", "0.59797883", "0.596151", "0.5953394", "0.5952983", "0.5948764", "0.5936608", "0.59251547", "0.58853614", "0.5873316", "0.5867996", "0.5850336", "0.58441216", "0.58373725", "0.581606", "0.580516", "0.5787452", "0.57524925", "0.57327217", "0.5715846", "0.5704953", "0.567287", "0.5667547", "0.5665969", "0.566269", "0.5662421", "0.5658292", "0.5650175", "0.5649197", "0.56483245", "0.56449574", "0.56339693", "0.5631962", "0.56276435", "0.5612207", "0.5611982", "0.5607934", "0.56072843", "0.5597818", "0.5595496", "0.5593192", "0.5580514", "0.55719066", "0.55718756", "0.5570159", "0.5569972", "0.55638313", "0.55584365", "0.5551275", "0.5546604", "0.5546392", "0.5539459", "0.5538763", "0.5536112", "0.5535188", "0.55341274", "0.5533395", "0.5526995", "0.5526717", "0.55226946", "0.55195343", "0.5516338", "0.55158013", "0.5514064", "0.5512196", "0.55081636", "0.5506788", "0.5505065", "0.5503198", "0.5494633", "0.54895675", "0.5486541", "0.54782444", "0.5477948", "0.5477559", "0.5476043", "0.54688895", "0.5463487", "0.5446845", "0.5446635", "0.54370534", "0.5433566", "0.54290384", "0.5424457", "0.54212445", "0.54193527" ]
0.59032047
22
ex: 70 => 01:10 ex: 70, 'H:i:s' => 01:10:00
function convertSecond2Time($seconds, $formatTime = 'H:i:s') { $result = date($formatTime, mktime(0, 0, $seconds)); return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function timeConversion($s) {\n return DATE(\"H:i:s\", STRTOTIME($s));\n\n}", "function timeConversion($s) {\n /*\n * Write your code here.\n */\n $tim = \"\";\n $arr = preg_split(\"/[:]/\",$s);\n\n if( preg_match( '/AM$/', $arr[2]) ) {\n $replace = str_replace('AM', '', $arr[2]);\n if($arr[0] === \"12\"){\n $arr[0] = \"00\";\n }\n }else{ // PM\n $replace = str_replace('PM', '', $arr[2]);\n\n if($arr[0] !== \"12\"){\n $arr[0] = strval(intval($arr[0]) + 12);\n }\n }\n $arr[2] = $replace;\n return $arr[0] .\":\". $arr[1] .\":\". $arr[2];\n}", "function sec2time ($sec) {\n $sec = (int) $sec;\n $time = ''; $h = 0;\n if ($sec >= 3600 ) {\n $h = (int) ($sec / 3600);\n if ($h > 0) { $time .= $h.':'; }\n $sec = $sec - $h*3600;\n }\n $m = (int) ($sec / 60);\n if ($h == 0) { $time .= $m.':'; }\n else { $time .= sprintf(\"%02d\", $m).':'; };\n if ($m > 0) { $sec = $sec - $m*60; }\n $time .= sprintf(\"%02d\", $sec);\n return $time;\n}", "function convert_time ($time = '') {\n $str_time = '';\n\n $time_in_second = $time / 1000;\n\n $nb_minutes = $time_in_second / 60;\n $nb_seconds = $time_in_second % 60;\n\n $str_time = $nb_seconds.'s';\n\n if ($nb_minutes >= 60) {\n $nb_heures = $nb_minutes / 60;\n $nb_minutes = $nb_minutes % 60;\n $str_time = floor($nb_heures).'h '.$nb_minutes.'m '.$str_time;\t\t\t\t\t\t\t\t\t\n } else {\n $str_time = floor($nb_minutes).'m '.$str_time;\n }\t\t\n return $str_time;\n\n }", "function convertTime($time){\n return date(\"H:i\", strtotime($time));\n}", "function get_hh_ss($seconds) {\n $hours = floor($seconds / 60 / 60);\n $minutes = floor(($seconds - ($hours * 60 * 60)) / 60);\n $d_seconds = $seconds - (($hours * 60 * 60) + ($minutes * 60));\n $f_hours = strlen($hours) == 1 ? \"0$hours\" : $hours;\n $f_minutes = strlen($minutes) == 1 ? \"0$minutes\" : $minutes;\n $f_seconds = strlen($d_seconds) == 1 ? \"0$d_seconds\" : $d_seconds;\n return \"$f_hours:$f_minutes:$f_seconds\";\n}", "function timeConversion($s) {\n /*\n * Write your code here.\n */\n $timeArray = explode(':', $s);\n $hour = $timeArray[0];\n $minute = $timeArray[1];\n $sec = $timeArray[2];\n $period = substr($sec, 2);\n $originalSec = rtrim($sec, $period);\n $newTime;\n if((0 <= $hour && $hour < 12) && ($period == 'AM')) {\n $newTime = $hour.\":\".$minute.\":\".$originalSec;\n }elseif ((0 <= $hour && $hour < 12) && ($period == 'PM')) {\n $newTime = 12+$hour.\":\".$minute.\":\".$originalSec;\n }elseif (($hour == 12) && ($period == 'AM')) {\n $newTime = \"00\".\":\".$minute.\":\".$originalSec;\n }elseif (($hour == 12) && ($period == 'PM')) {\n $newTime = $hour.\":\".$minute.\":\".$originalSec;\n }\n\n return $newTime; \n\n\n\n}", "function formatTime($sec){\n if($sec > 100){\n $sec /= 60;\n if($sec > 100){\n $sec /= 60;\n return number_format($sec) . \" hr\";\n }\n return number_format($sec) . \" min\";\n }\n return number_format($sec) . \" sec\";\n}", "function time2str ($t) {\n\tif ($t == '00:00:00' OR $t == '') {\n\t\treturn '';\n\t}\n\tlist($h,$m,$s) = explode(\":\",$t);\n\t$ampm = ($h >= 12) ? \"p.m.\" : \"a.m.\";\n\t// if between 12 - 1 p.m.\n if ($h % 12 == 0) {\n return ($m > 0) ? \"12:\" . $m . \" \" . $ampm : \"Noon\";\n\t } else {\n\t\t\treturn ($m > 0) ? $h % 12 . \":\" . $m . \" \" . $ampm : $h % 12 . \" \" . $ampm;\n\t }\n}", "function toS($t, $f = '%dh %dm') {\n if (intval($t) < 1) {\n\t\t\t\t return;\n\t\t\t }\n\t\t\t $h = floor($t/60);\n\t\t\t $m = $t%60;\n\t\t\t return sprintf($f, $h, $m);\n\t\t}", "function formatTime($time){\n if(!$time){\n return '-';\n }\n $seconds = ($time/1000);//\n $minutes =floor($seconds / 60);\n $seconds = ($seconds % 60);//\n $hours = floor($seconds / 3600);\n\n return $hours.':'.$minutes.':'.$seconds;\n }", "function times2str_ampm ($t) {\n\tif ($t == '00:00:00' OR $t == '') {\n\t\treturn $t;\n\t}\n\tlist($h,$m,$s) = explode(\":\",$t);\n\t$ampm = ($h >= 12) ? \"PM\" : \"AM\";\n\t$h = ($h > 12) ? $h - 12 : $h;\n\treturn \"{$h}:{$m}:{$s} {$ampm}\";\n}", "function get_hh_mm($seconds) {\n $hours = floor($seconds / 60 / 60);\n $remaining_seconds = $seconds - ($hours * 60 * 60);\n $minutes = floor($remaining_seconds / 60);\n $f_hours = strlen($hours) == 1 ? \"0$hours\" : $hours;\n $f_minutes = strlen($minutes) == 1 ? \"0$minutes\" : $minutes;\n return \"$f_hours:$f_minutes\";\n}", "function times2str ($t1,$t2) {\n\tif ($t1 == '00:00:00' OR $t1 == '')\n\t\treturn '';\n\t// no end time\n\tif ($t2 == '00:00:00' OR $t2 == '')\n\t\treturn time2str($t1);\n\tlist($h1,$m1,$s1) = explode(\":\",$t1);\n\tlist($h2,$m2,$s2) = explode(\":\",$t2);\n\t$ampm1 = ($h1 >= 12) ? \" p.m.\" : \" a.m.\";\n\t$ampm2 = ($h2 >= 12) ? \" p.m.\" : \" a.m.\";\n\t$ampm1 = ($ampm1 != $ampm2) ? $ampm1 : \"\";\n\t// if time1 is 12:xx p.m.\n\tif ($h1 == \"12\") {\n\t\t$time_str = ($m1 > 0) ? \"12:\" . $m1 . $ampm1 : \"Noon\";\n\t} else {\n\t\t$time_str = ($m1 > 0) ? $h1 % 12 . \":\" . $m1 . $ampm1 : $h1 % 12 . $ampm1;\n\t}\n\t$time_str .= \"-\";\n\tif ($h2 == \"12\") {\n\t\t$time_str .= ($m2 > 0) ? \"12:\" . $m2 . $ampm2 : \"Noon\";\n\t} else {\n\t\t$time_str .= ($m2 > 0) ? $h2 % 12 . \":\" . $m2 . $ampm2 : $h2 % 12 . $ampm2;\n\t}\n\treturn ($time_str);\n}", "function value_time($value){\r\n\t$separator = \":\";\r\n\tif(strlen($value) == 12){\r\n\t\t$value = substr($value, 0, 8);\r\n\t}\r\n\tif((strlen($value) == 8) && (substr($value, 2, 1) == $separator) && (substr($value, 5, 1) == $separator)){\r\n\t\t$hou = (int) substr($value, 0, 2);\r\n\t\t$min = (int) substr($value, 3, 2);\r\n\t\t$sec = (int) substr($value, 6, 2);\r\n\t}elseif((strlen($value) == 5) && (substr($value, 2, 1) == $separator)){\r\n\t\t$hou = (int) substr($value, 0, 2);\r\n\t\t$min = (int) substr($value, 3, 2);\r\n\t\t$sec = 0;\r\n\t}else{\r\n\t\treturn NULL;\r\n\t}\r\n\tif(($hou < 0 || $hou > 23) || ($min < 0 || $min > 59) || ($sec < 0 || $sec > 59)){\r\n\t\treturn NULL;\r\n\t}else{\r\n\t\treturn str_pad($hou, 2, \"0\", STR_PAD_LEFT).$separator.str_pad($min, 2, \"0\", STR_PAD_LEFT).$separator.str_pad($sec, 2, \"0\", STR_PAD_LEFT);\r\n\t}\r\n}", "function milisecond_to_time($time) {\n $hours = gmdate(\"H\", $time / 1000);\n $mins = gmdate(\"i\", $time / 1000);\n $seconds = gmdate(\"s\", $time / 1000);\n if($hours > 24) {\n $tags = Math.floor($hours/24);\n $hours = $hours % 24;\n }\n $res = \"$hours:$mins:$seconds\";\n return $res;\n }", "function convert_time($total)\n{\n return sprintf('%2d:%2d:%2d', intval($total/3600), intval($total/60) % 60, $total % 60);\n}", "function Hora_prog($valor){\t\n\n return date(\"H:i\", strtotime($valor));\n\n}", "function to_time($string){\n $split = explode(':', $string);\n $front = $split[0];\n $back = $split[1];\n // am or pm\n $period = substr($back, -2);\n $back = substr($back, 0,2);\n\n if($period == 'PM' and $front != '12'){\n $front += 12;\n }\n\n return ((string)$front . \":\" . (string)$back . \":00\");\n }", "function tiemposHMS($min){\n $min=(int)$min;\n $heure=(int)($min/60);\n $minute=(($min/60)-$heure)*60; \n return $heure .':' . $minute; \n \n \n \n }", "function sec2hms($sec, $padHours = false) {\r\n $hms = \"\";\r\n \r\n // do the hours first: there are 3600 seconds in an hour, so if we divide\r\n // the total number of seconds by 3600 and throw away the remainder, we're\r\n // left with the number of hours in those seconds\r\n $hours = intval(intval($sec) / 3600); \r\n\r\n // add hours to $hms (with a leading 0 if asked for)\r\n $hms .= ($padHours) \r\n ? str_pad($hours, 2, \"0\", STR_PAD_LEFT). \":\"\r\n : $hours. \":\";\r\n \r\n // dividing the total seconds by 60 will give us the number of minutes\r\n // in total, but we're interested in *minutes past the hour* and to get\r\n // this, we have to divide by 60 again and then use the remainder\r\n $minutes = intval(($sec / 60) % 60); \r\n\r\n // add minutes to $hms (with a leading 0 if needed)\r\n $hms .= str_pad($minutes, 2, \"0\", STR_PAD_LEFT). \":\";\r\n\r\n // seconds past the minute are found by dividing the total number of seconds\r\n // by 60 and using the remainder\r\n $seconds = intval($sec % 60); \r\n\r\n // add seconds to $hms (with a leading 0 if needed)\r\n $hms .= str_pad($seconds, 2, \"0\", STR_PAD_LEFT);\r\n\r\n // done!\r\n return $hms;\r\n \r\n}", "function sec2hms ($sec, $padHours = false) \n {\n\n // start with a blank string\n $hms = \"\";\n \n $minutes = intval(($sec / 60) % 60); \n\n // add minutes to $hms (with a leading 0 if needed)\n $hms .= str_pad($minutes, 2, \"0\", STR_PAD_LEFT). \":\";\n\n // seconds past the minute are found by dividing the total number of seconds\n // by 60 and using the remainder\n $seconds = intval($sec % 60); \n\n // add seconds to $hms (with a leading 0 if needed)\n $hms .= str_pad($seconds, 2, \"0\", STR_PAD_LEFT);\n\n // done!\n return $hms;\n \n }", "function format_time($t,$f=':'){\n\t\t//return ($t< 0 ? '-' : '') . sprintf(\"%02d%s%02d%s%02d\", floor(abs($t)/3600), $f, (abs($t)/60)%60, $f, abs($t)%60);\n\t\t\n\t\t$seconds = abs($t)%60;\n\t\t$minutes = (abs($t)/60)%60;\n\t \n\t\tif($seconds>30){\n\t\t\t$minutes = $minutes+1;\n\t\t}\n\t\treturn sprintf(\"%02d\",$minutes);//($t< 0 ? '-' : '') . sprintf(\"%02d%s%02d%s%02d\", floor(abs($t)/3600), $f, (abs($t)/60)%60, $f, abs($t)%60);\n }", "function reservation_min_to_hours($value,$type=\"H:i\"){\n return gmdate($type,$value*60);\n}", "function intToTime($sec, $padHours = true, $padMins = true, $padSecs = true) \n{\n\t$hms = \"\";\n\n\t// do the hours first: there are 3600 seconds in an hour, so if we divide\n\t// the total number of seconds by 3600 and throw away the remainder, we're\n\t// left with the number of hours in those seconds\n\t$hours = intval(intval($sec) / 3600); \n\n\t// add hours to $hms (with a leading 0 if asked for)\n\t$hms .= ($padHours) ? str_pad($hours, 2, \"0\", STR_PAD_LEFT). \":\" : $hours. \":\";\n\n\t// dividing the total seconds by 60 will give us the number of minutes\n\t// in total, but we're interested in *minutes past the hour* and to get\n\t// this, we have to divide by 60 again and then use the remainder\n\t$minutes = intval(($sec / 60) % 60); \n\n\t// add minutes to $hms (with a leading 0 if needed)\n\t$hms .= ($padMins) ? str_pad($minutes, 2, \"0\", STR_PAD_LEFT). \":\" : $minutes. \":\";\n\n\t// seconds past the minute are found by dividing the total number of seconds\n\t// by 60 and using the remainder\n\t$seconds = intval($sec % 60); \n\n\t// add seconds to $hms (with a leading 0 if needed)\n\t$hms .= ($padSecs) ? str_pad($seconds, 2, \"0\", STR_PAD_LEFT) : $seconds;\n\n\t// done!\n\treturn $hms;\n\n}", "static function time($value){\n\t\t$separator = \":\";\n\t\t$value = substr($value, 0, 8);\n\t\tif((strlen($value) == 8) && (substr($value, 2, 1) == $separator) && (substr($value, 5, 1) == $separator)){\n\t\t\t$hou = (int) substr($value, 0, 2);\n\t\t\t$min = (int) substr($value, 3, 2);\n\t\t\t$sec = (int) substr($value, 6, 2);\n\t\t}elseif((strlen($value) == 5) && (substr($value, 2, 1) == $separator)){\n\t\t\t$hou = (int) substr($value, 0, 2);\n\t\t\t$min = (int) substr($value, 3, 2);\n\t\t\t$sec = 0;\n\t\t}else{\n\t\t\treturn null;\n\t\t}\n\t\tif(($hou < 0 || $hou > 23) || ($min < 0 || $min > 59) || ($sec < 0 || $sec > 59)){\n\t\t\treturn null;\n\t\t}else{\n\t\t\treturn str_pad($hou, 2, \"0\", STR_PAD_LEFT).$separator.str_pad($min, 2, \"0\", STR_PAD_LEFT).$separator.str_pad($sec, 2, \"0\", STR_PAD_LEFT);\n\t\t}\n\t}", "function sec2hms ($sec, $padHours = false) \n {\n\n $hours = intval(intval($sec) / 3600);\n $minutes = intval(($sec / 60) % 60);\n $seconds = intval($sec % 60); \n\t\n\t\n $hms = ($padHours?str_pad($hours, 2, \"0\", STR_PAD_LEFT):$hours). ':'.\n\t\t\tstr_pad($minutes, 2, \"0\", STR_PAD_LEFT). ':'.\n\t\t\tstr_pad($seconds, 2, \"0\", STR_PAD_LEFT);\n\n return $hms;\n \n }", "function func_start_time_from_simple_military ( $in_military_time ///< The military time as an integer (100s are hours 0000 -> 2359).\n )\n {\n $time = abs ( intval ( $in_military_time ) );\n $hours = min ( 23, $time / 100 );\n $minutes = min ( 59, ($time - (intval ($time / 100) * 100)) );\n \n return sprintf ( \"%d:%02d:00\", $hours, $minutes );\n }", "function humanReadableTime($seconds) {\n\n\t$hours = '00';\n\t$mins = '00';\n\n\tif ($seconds > 0) {\n\t\t$hours = str_pad(floor($seconds / 3600), 2, '0', STR_PAD_LEFT);\n\t\t$seconds %= 3600;\n\t}\n\n\tif ($seconds > 0) {\n\t\t$mins = str_pad(floor($seconds / 60), 2, '0', STR_PAD_LEFT);\n\t\t$seconds %= 60;\n\t}\n\n\t$seconds = str_pad($seconds, 2, '0', STR_PAD_LEFT);\n\n\n\treturn \"$hours:$mins:$seconds\";\n\n}", "static function string_format_time($time){\r\n $h = intval($time / 60);\r\n $min = $time % 60;\r\n $ret = '';\r\n\r\n if($h > 0){\r\n if($h == 1){\r\n $ret .= $h.' heure ';\r\n } else {\r\n $ret .= $h.' heures ';\r\n }\r\n }\r\n\r\n if($min > 0){\r\n $ret .= $min . ' minutes';\r\n }\r\n\r\n if($time == 0){\r\n $ret .= '0 heure';\r\n }\r\n\r\n return $ret;\r\n }", "function convertToHoursMins($time, $format = '%02d:%02d')\n{\n if ($time < 1) {\n return;\n }\n $hours = floor($time / 60);\n $minutes = ($time % 60);\n return sprintf($format, $hours, $minutes);\n}", "private function time_rule($time){\n $hour = floor($time/3600);//divisão retornando parte inteira.\n $hour_rest = fmod($time, 3600);//divisão retornando restante\n $min = floor($hour_rest/60); // calculo de minutos apartir do restante de horas\n $sec = fmod($hour_rest, 60); // calculos dos segundos\n return $this->number_format($sec,$min,$hour);\n }", "function formatDiffTime($t) {\n\n\t\t/*\n\t\tif ($t) {\n\t\t\t$t = $t/10; // convert from 10ths of seconds into seconds\n\t\t\tif ($t > 3600) \t\t\n\t\t\t\treturn sprintf(\"+%d:%02d:%02d\", $t/3600, ($t/60)%60, $t%60);\n\t\t\telse\n\t\t\t\treturn sprintf(\"+%d:%02d\", ($t/60)%60, $t%60);\n\t\t}\n\t\t*/\n\n\t\t// This code does mmm:ss for everyone\n\t\tif ($t) {\n\t\t\t$t = $t/10; // convert from 10ths of seconds into seconds\n\t\t\treturn sprintf(\"+%d:%02d\", ($t/60), $t%60);\n\t\t}\n\n\t\treturn null;\n\t}", "public static function formatTime($seconds){\n $time = \"\";\n // avoid dummi values\n if($seconds != \"n/a\"){\n $hours = floor($seconds / 3600);\n $mins = floor(($seconds - ($hours*3600)) / 60);\n $secs = floor(($seconds - ($hours*3600)) % 60);\n\n if($hours < 10)\n $hours = \"0\".$hours;\n if($mins < 10)\n $mins = \"0\".$mins;\n if($secs < 10)\n $secs = \"0\".$secs;\n\n $time = $hours.\":\".$mins.\":\".$secs;\n }\n else\n $time = \"n/a\";\n\n return $time; \n }", "function translate_time($t) {\n /* US only :)\n $a_times = array(\n '9:00' => '9am' , '9:45' => '9:45'\n , '10:00' => '10am', '10:15' =>'10:15', '10:30' =>'10:30', '10:45' => '10:45'\n , '11:00' => '11am', '11:15' =>'11:15', '11:30' =>'11:30', '11:45' => '11:45'\n , '12:00' => '12pm', '12:15' =>'12:15', '12:30' =>'12:30', '12:45' => '12:45'\n , '13:00' => '1pm', '13:15' => '1:15', '13:30' => '1:30', '13:45' => '1:45'\n , '14:00' => '2pm', '14:15' => '2:15', '14:30' => '2:30', '14:45' => '2:45'\n , '15:00' => '3pm', '15:15' => '3:15', '15:30' => '3:30', '15:45' => '3:45'\n , '16:00' => '4pm', '16:15' => '4:15', '16:30' => '4:30', '16:45' => '4:45'\n , '17:00' => '5pm', '17:15' => '5:15', '17:30' => '5:30', '17:45' => '5:45'\n , '18:00' => '6pm', '18:15' => '6:15'\n , '20:00' => '8pm', '22:00' => '10pm'\n );\n if (isset($a_times[$t])) return $a_times[$t];\n */\n return $t;\n }", "function getTimeS($timestamp){\n\t\tif ($timestamp > 60*60*24){\n\t\t\t$timestamp = $timestamp % (60*60*24) + 2*(60*60);\n\t\t}\n\t\t$hours = intval($timestamp / (60*60));\n\t\t$minutes = intval(($timestamp % (60*60)) / 60);\n\t\treturn sprintf('%02d', $hours).\":\".sprintf('%02d', $minutes); \n\t}", "function HsToMin($hs) {\r\n $time = explode(\":\", $hs);\r\n if (!is_numeric($time[0]) || !is_numeric($time[1]))\r\n return -1;\r\n return ($time[0] * 60) + $time[1];\r\n}", "public function timeFormat();", "function format_time($secs) {\n\t\t $times = array(3600, 60, 1);\n\t\t $time = '';\n\t\t $tmp = '';\n\t\t for($i = 1; $i < 3; $i++) {\n\t\t\t $tmp = floor($secs / $times[$i]);\n\t\t\t if($tmp < 1) {\n\t\t\t\t $tmp = '00';\n\t\t\t }\n\t\t\t elseif($tmp < 10) {\n\t\t\t\t $tmp = '0' . $tmp;\n\t\t\t }\n\t\t\t $time .= $tmp;\n\t\t\t if($i < 2) {\n\t\t\t\t $time .= ':';\n\t\t\t }\n\t\t\t $secs = $secs % $times[$i];\n\t\t }\n\t\t return $time;\n\t\t}", "function convertir_hora_militar($seg_ini) {\n\n\t\t\t$horas = floor($seg_ini/3600);\n\t\t\t$minutos = floor(($seg_ini-($horas*3600))/60);\n\t\t\t\t\t\t\t\n\t\t\treturn $horas.\":\".$minutos;\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}", "function get_time_description($seconds)\r\n{\r\n $weeks = (int) ($seconds / 604800);\r\n $weeks_p = $weeks > 1 ? 'weeks' : 'week';\r\n $days=(int)($seconds/86400);\r\n $days_p = $days > 1 ? 'days' : 'day';\r\n $hours = (int)(($seconds-($days*86400))/3600);\r\n $mins = (int)(($seconds-$days*86400-$hours*3600)/60);\r\n $secs = (int)($seconds - ($days*86400)-($hours*3600)-($mins*60));\r\n\r\n //build a string\r\n $ret = \"$secs sec\";\r\n if ($mins > 0 && $sec >= 0)\r\n $ret = \"$mins min $ret\";\r\n if ($hours > 0 && $min >= 0 && sec >=0)\r\n $ret = \"$hours hours $ret\";\r\n if ($days > 0 && $hours >= 0 && $min >= 0 && sec >= 0)\r\n $ret = \"$days $days_p $ret\";\r\n\r\n return $ret;\r\n}", "function hms2sec ($hms) {\n\tlist($h, $m, $s) = explode (\":\", $hms);\n\t$seconds = 0;\n\t$seconds += (intval($h) * 3600);\n\t$seconds += (intval($m) * 60);\n\t$seconds += (intval($s));\n\treturn $seconds;\n}", "function msecsToTime($content)\n{\n\t$secs = floor($content / 1000);\n\t$mins = floor($secs / 60);\n\t$hours = floor($mins / 60);\n\t$secs = $secs % 60;\n\t$mins = $mins % 60; \n\tif (strlen($mins) < 2) $mins = \"0\" . $mins;\n\treturn \"$hours\" . \":\" . \"$mins\";\n}", "function format($seconds) {\r\n\t$days = floor($seconds / 86400);\r\n\tif ($days > 0) {\r\n\t\t$seconds -= $days * 86400;\r\n\t}\r\n\t$hours = floor($seconds / 3600);\r\n\tif ($days > 0 || $hours > 0) {\r\n\t\t$seconds -= $hours * 3600;\r\n\t}\r\n\t$minutes = floor($seconds / 60);\r\n\tif ($days > 0 || $hours > 0 || $minutes > 0) {\r\n\t\t$seconds -= $minutes * 60;\r\n\t}\r\n\tif ($hours < 10) $hours = '0'. $hours;\r\n\tif ($minutes < 10) $minutes = '0'.$minutes;\r\n\tif ($seconds < 10) $seconds = '0'.$seconds;\r\n\tif ($days > 0) {\r\n\t\treturn sprintf('%sj %sh %sm %ss', (string)$days, (string)$hours, (string)$minutes, (string)$seconds);\r\n\t} elseif ($hours > 0) {\r\n\t\treturn sprintf('%sh %sm %ss', (string)$hours, (string)$minutes, (string)$seconds);\r\n\t} elseif ($minutes > 0) {\r\n\t\treturn sprintf('%sm %ss', (string)$minutes, (string)$seconds);\r\n\t} else {\r\n\t\treturn sprintf('%ss', (string)$seconds);\r\n\t}\r\n}", "function seconds_to_time( $seconds, $format = 'H:m:s' ) {\n\t// extract hours\n\t$hours = floor($seconds / (60 * 60));\n\t\n\t// extract minutes\n\t$divisor_for_minutes = $seconds % ( 60 * 60 );\n\t$minutes = floor( $divisor_for_minutes / 60 );\n\t\n\t// extract the remaining seconds\n\t$divisor_for_seconds = $divisor_for_minutes % 60;\n\t$seconds = ceil( $divisor_for_seconds );\n\t\n\t$format = str_replace( 'H', str_pad( $hours, 2, \"0\", STR_PAD_LEFT ), $format );\n\t$format = str_replace( 'm', str_pad( $minutes, 2, \"0\", STR_PAD_LEFT ), $format );\n\t$format = str_replace( 's', str_pad( $seconds, 2, \"0\", STR_PAD_LEFT ), $format );\n\t\n\treturn $format;\n\t\n}", "function getTimeFromSeconds($seconds = '') {\n\n\t\t$hours = floor($seconds / 3600);\n\t\t$mins = floor($seconds / 60 % 60);\n\t\t$secs = floor($seconds % 60);\n\n\t\t$timeFormat = sprintf('%02d:%02d:%02d', $hours, $mins, $secs);\n\n\t\treturn $timeFormat;\n\t}", "function toM($s) { \n $t = explode(\":\", $s); \n $h = settype($t[0], integer);\n $m = settype($t[1], integer);\n $mm = ($h * 60) + $m;\n return $mm;\n\t\t}", "function timeConversion($originalTime) {\n\t$newTime;\n\n $hours = substr($originalTime, 0, 2);\n $minutes = substr($originalTime, 3, 2);\n\n if ($hours > 12) $newTime = ($hours - 12) . \":\" . $minutes . \" PM\";\n else if ($hours == 12) $newTime = $hours . \":\" . $minutes . \" PM\";\n else if ($hours == 0) $newTime = 12 . \":\" . $minutes . \" AM\";\n else $newTime = substr($hours, 1) . \":\" . $minutes . \" AM\";\n\n \treturn $newTime;\n}", "function time_compact_ap_format($hours,$minutes,$meridien){\r\n\t$patterns = array(\"am\",\"pm\",\"AM\",\"PM\");\r\n\t$replacements = array(\"a.m.\",\"p.m.\",\"A.M.\",\"P.M.\");\r\n\t\r\n\t$meridien = str_replace($patterns,$replacements,$meridien);\r\n\t\r\n\tif($minutes == \"00\") return sprintf(\"%s %s\",$hours,$meridien);\r\n\telse return sprintf(\"%s:%s %s\",$hours,$minutes,$meridien);\r\n}", "function sec2time($sec){\n\t// Parameters:\t$sec\n\t//\t\t\t\tType: integer\n\t// Returns:\t\tstring\n\t$returnstring = \" \";\n\t$days = intval($sec/86400);\n\t$hours = intval ( ($sec/3600) - ($days*24));\n\t$minutes = intval( ($sec - (($days*86400)+ ($hours*3600)))/60);\n\t$seconds = $sec - ( ($days*86400)+($hours*3600)+($minutes * 60));\n\t// if($seconds =='') $seconds = '00';\n\n\t$returnstring .= ($days)?(($days == 1) ? \"1 Day \" : sprintf(\"%02d\", $days). \" Days \") : \"\";\n\t$returnstring .= ($days && $hours && !$minutes && !$seconds) ? \"\" : \"\";\n\t$returnstring .= ($days > 0 && $hours == 0)? \"00:\": \"\";\n\t$returnstring .= ($hours)?( ($hours == 1) ? \"01:\" : sprintf(\"%02d\", $hours) .\":\") : \"00:\";\n\t$returnstring .= (($days || $hours) && ($minutes && !$seconds))?\"\":\"\";\n\t$returnstring .= ($minutes)?( ($minutes == 1)?\"1:\": sprintf(\"%02d\", $minutes) .\":\"):\"00:\";\n\t$returnstring .= (($days || $hours || $minutes) && $seconds)?\"\":\"\";\n\t$returnstring .= ($seconds) ? (($seconds == 1)? \"1\" : sprintf(\"%02d\", $seconds)):\"00\";\n\tif ($returnstring != \" \") return ($returnstring);\n}", "function getFormattedTime($seconds) {\r\n\t\t\t\t$formatted = \"\";\r\n\t\t\t\t\r\n\t\t\t\t// Calculate the amount of hours, minutes, and seconds.\r\n\t\t\t\t$hours = floor($seconds / 3600);\r\n\t\t\t\t$formatted .= str_pad($hours, 2, \"0\", STR_PAD_LEFT) . 'h ';\r\n\t\t\t\t$minutes = floor(($seconds / 60) - ($hours * 60)); \r\n\t\t\t\t$formatted .= str_pad($minutes, 2, \"0\", STR_PAD_LEFT) . 'm ';\r\n\t\t\t\t$seconds = floor($seconds - $hours * 3600 - $minutes * 60); \r\n\t\t\t\t$formatted .= str_pad($seconds, 2, \"0\", STR_PAD_LEFT) . 's ';\r\n\t\t\t\t\r\n\t\t\t\t// Return the new formatted string.\r\n\t\t\t\treturn $formatted;\r\n\t\t\t}", "function seconds_to_string($sec)\n {\n $hms = \"\";\n\t\t\n\t\t// for days\n\t\t$days = intval(intval($sec) / 86400);\n\t\t\n\t\t$hms .= ($days > 0) ? $days. \"d - \" : \"\";\n \n // do the hours first: there are 3600 seconds in an hour, so if we divide\n // the total number of seconds by 3600 and throw away the remainder, we're\n // left with the number of hours in those seconds\n $hours = intval(intval($sec / 3600) % 24);\n \n // add hours to $hms (with a leading 0 if asked for)\n $hms .= ($days == 0 && $hours == 0) ? \"\" : $hours. \"h - \";\n \n // dividing the total seconds by 60 will give us the number of minutes\n // in total, but we're interested in *minutes past the hour* and to get\n // this, we have to divide by 60 again and then use the remainder\n $minutes = intval(($sec / 60) % 60); \n \n // add minutes to $hms (with a leading 0 if needed) but only if minutes are not 0\n $hms .= ($days == 0 && $hours == 0 && $minutes == 0) ? \"\" : $minutes.\"m\";\n \n // seconds past the minute are found by dividing the total number of seconds\n // by 60 and using the remainder\n //$seconds = intval($sec % 60); \n \n // add seconds to $hms (with a leading 0 if needed)\n //$hms .= $seconds.\"s\";\n \n // if the total time is 0, show so\n\t\t$hms = empty($hms) ? 0 : $hms;\n\t\t\n\t\t// done!\n return $hms;\n }", "private function GetTimeHHMM() : string {\n\t\t\t$dt = new DateTime();\n\t\t\t$dtz = new DateTimeZone(\"EUROPE/Berlin\");\n\t\t\t$dt->setTimezone($dtz);\n\t\t\treturn $dt->format(\"H:i\");\n\t\t}", "static function convertTime($s_time){\n\t\tif(is_numeric($s_time))\n\t\t\treturn (int) $s_time;\n\n\t\t$a_time = array(\n\t\t\t's' => 1,\n\t\t\t'm' => 60,\n\t\t\t'h' => 3600,\n\t\t\t'd' => 86400\n\t\t);\n\t\t$s_time = trim(strtolower($s_time));\n\t\t$s_char = substr($s_time, -1);\n\t\t$i = substr($s_time,0, -1);\n\t\treturn isset($a_time[$s_char]) ?\n\t\t\t$i*$a_time[$s_char]:\n\t\t\t$i;\n\t}", "function timeFormat($str){\n\t$dbToNormalize = '#[0-2][0-9]:[0-5][0-9]:[0-5][0-9]#';\n\t$normalizeToDb = '#[0-2][0-9]h[0-5][0-9]#';\n\t$errorToDb = '#[0-2][0-9]h#';\n\n\tif (preg_match($dbToNormalize, $str)) {\n\t\t$time = DateTime::createFromFormat('H:i:s', $str);\n\t\treturn $formatedTime = $time->format('H\\hi');\n\t}\n\telseif (preg_match($normalizeToDb, $str)) {\n\t\t$time = DateTime::createFromFormat('H\\hi', $str);\n\t\treturn $formatedTime = $time->format('H:i:s');\n\t}\n\telseif (preg_match($errorToDb, $str)) {\n\t\t$time = DateTime::createFromFormat('H\\h', $str);\n\t\treturn $formatedTime = $time->format('H:i:s');\n\t}\n\telse{\n\t\treturn FALSE;\n\t}\n}", "function tambahWaktu2($jam_mulai,$jam_selesai){\n//echo \"<br>\";\n//echo \"Jam Selesai : \".$jam_selesai='09:45:01';\n//echo \"<br>\";\n $times = array($jam_mulai,$jam_selesai);\n//$times = array('08:30:22','09:45:53');\n $seconds = 0;\n foreach ( $times as $time )\n {\n \tlist( $g, $i, $s ) = explode( ':', $time );\n \t$seconds += $g * 3600;\n \t$seconds += $i * 60;\n \t$seconds += $s;\n \n \n }\n $hours = floor( $seconds / 3600);\n if($hours<10){\n $hours='0'.$hours;\n }\n \n $seconds -= $hours * 3600;\n $minutes = floor( $seconds / 60);\n if($minutes<10){\n $minutes='0'.$minutes;\n }\n \n $seconds -= $minutes * 60; \n if($seconds<10){\n $seconds='0'.$seconds;\n } \n \n $waktu2=\"{$hours}:{$minutes}:{$seconds}\";\n return $waktu2;\n \n}", "function formatSeconds( $seconds ) {\n $hours = 0;\n $milliseconds = str_replace( \"0.\", '', $seconds - floor( $seconds ) );\n\n if ( $seconds > 3600 ) {\n $hours = floor( $seconds / 3600 );\n }\n $seconds = $seconds % 3600;\n\n return str_pad( $hours, 2, '0', STR_PAD_LEFT ) . gmdate( ':i:s', $seconds ) . ($milliseconds ? \".$milliseconds\" : '') ;\n}", "function segundos_hhmm($seg) {\n $horas = floor($seg / 3600);\n $minutos = floor($seg / 60 % 60);\n $segundos = floor($seg % 60);\n\n return sprintf('%02d:%02d:%02d', $horas, $minutos, $segundos);\n }", "function parse_minutes_to_hours($minutes) {\n $h = floor($minutes / 60);\n $m = $minutes % 60;\n $m = $m < 10 ? '0' . $m : $m;\n\n return $h . \"h\" . $m;\n}", "function TimeToSec($time) {\n\t$dot2 = strpos($time, ':');\n\tif($dot2 > 0) {\n\t\t$min = substr($time, 0, $dot2);\n\t\t$time = substr($time, $dot2+1);\n\t}\n\t\t\n\t$time = ($min * 60) + $time;\n\treturn $time;\n}", "function seconds_to_time_format($seconds = 0, $include_seconds = false) {\r\n $hours = floor($seconds / 3600);\r\n $mins = floor(($seconds - ($hours * 3600)) / 60);\r\n $secs = floor($seconds % 60);\r\n\r\n $hours = ($hours < 10) ? \"0\" . $hours : $hours;\r\n $mins = ($mins < 10) ? \"0\" . $mins : $mins;\r\n $secs = ($secs < 10) ? \"0\" . $secs : $secs;\r\n $sprintF = $include_seconds == true ? '%02d:%02d:%02d' : '%02d:%02d';\r\n return sprintf($sprintF, $hours, $mins, $secs);\r\n}", "function horas_em_mintutos($hora)\n{\n\n if ($hora == '') {\n $hora = '00:00';\n }\n\n $h1 = explode(\":\", $hora);\n\n\n $minuto = $h1[1];\n $horas = $h1[0];\n\n\n if ($horas > 0) {\n\n if (substr($horas, 0, 1) == 0) {\n $horas = substr($horas, 1, 1);\n }\n\n $horas = $horas * 60;\n\n $minuto = $minuto + $horas;\n }\n\n\n\n\n return $minuto;\n}", "function m2h($mins) {\n if ($mins < 0)\n $min = abs($mins); \n else\n $min = $mins; \n \n // Arredonda a hora\n $h = floor($min / 60); \n $m = ($min - ($h * 60)) / 100; \n $horas = $h + $m; \n \n // Matemática da quinta série\n // Detalhe: Aqui também pode se usar o abs()\n if ($mins < 0)\n $horas *= -1; \n \n // Separa a hora dos minutos\n $sep = explode('.', $horas); \n $h = $sep[0]; \n if (empty($sep[1]))\n $sep[1] = 0; \n \n $m = $sep[1]; \n \n // Aqui um pequeno artifício pra colocar um zero no final\n if (strlen($m) < 2)\n $m = $m . 0; \n if($h > 0){\n\t\t\treturn sprintf('%2dh e %2dm', $h, $m);\n }else{\n\t\t\treturn sprintf('%2dm', $m);\n\t\t}\t\n}", "function CommonTimeToMilitaryTime($time)\n {\n if ($time == \"\")\n return \"\";\n\n return date(\"H:i\", strtotime($time));\n }", "public function format_time_save($time){ \n\t\t$exp_time = explode(' ', $time);\n\t\t$time = '2014-03-29 '.$exp_time[0].':00 '.$exp_time[1];\n\t\treturn date('H:i', strtotime($time));\t\t\t\n\t}", "function FormatTime($time) {\n $hour = $time[0];\n $min = $time[1];\n\n $hourModulo12 = $hour % 12;\n if ($hourModulo12 == 0) $hourModulo12 = 12;\n\n if ($hour >= 12)\n $ampm = \"PM\";\n else\n $ampm = \"AM\";\n\n if ($hourModulo12 < 10)\n $hourStr = \"0\" . $hourModulo12;\n else\n $hourStr = $hourModulo12;\n if ($min < 10)\n $minStr = \"0\" . $min;\n else\n $minStr = $min;\n return $hourStr . \":\" . $minStr . $ampm;\n}", "function convertTime($dec)\n {\n $seconds = ($dec * 3600);\n // we're given hours, so let's get those the easy way\n $hours = floor($dec);\n // since we've \"calculated\" hours, let's remove them from the seconds variable\n $seconds -= $hours * 3600;\n // calculate minutes left\n $minutes = floor($seconds / 60);\n // remove those from seconds as well\n $seconds -= $minutes * 60;\n // return the time formatted HH:MM:SS\n return $hours.\":\".$minutes.\":\".$seconds;\n }", "public function toTimeString()\n {\n return $this->toLocalizedString('HH:mm:ss');\n }", "function am_pm($hour)\r\n{ \r\n return ($hour < 12) ? 'am' : 'pm';\r\n}", "function time_to_secs($time)\n{\n$timeArr = array_reverse(split(\":\", $time));\n$seconds = 0;\n$vals = Array(1, 60, 3600, 86400);\nforeach($timeArr as $key => $value)\n{\nif(!isset($vals[$key]))\nbreak;\n$seconds += $value * $vals[$key];\n}\nreturn $seconds;\n}", "function SecondsToTimeNEW($inputTime) \n{\t\n\t//echo nl2br(\"Seconds are now: $Seconds \\n\");\n\t//HOUR\n\tif($inputTime>=(60*60))\n\t{\n\t\t$CaryOver=$inputTime%(60*60);\n\t\t$Hours=floor($inputTime/(60*60));\n\t\t$inputTime=$CaryOver;\n\t\t\n\t}\n //MIN\n\tif($inputTime>=60)\n\t{\n\t\t$CaryOver=$inputTime%60; //Remainder\n\t\t$Minutes=floor($inputTime/60);\n\t\t$inputTime=$CaryOver;\n\t\t//echo nl2br(\"Minutes are now: $CarryOver \\n\");\n\t\t\n\t}\n\t//SEC\n\t$Seconds=$inputTime;\n\t\t\n\t//NOW Correct the FORMAT\n\tif($Hours<10)\n\t{$Hours=\"0\".$Hours;}\t\n\tif($Minutes<10)\n\t{$Minutes=\"0\".$Minutes;}\n\tif($Seconds<10)\n\t{$Seconds=\"0\".$Seconds;}\n\t\n\t\n\treturn (\"$Hours:$Minutes:$Seconds\");\n}", "public function getTime() : string\r\n {\r\n return $this->format('H:i:s');\r\n }", "public function formatTime()\n { \n return sprintf('%02d:%02d:%02d', ($this->totaltime / 3600), \n ($this->totaltime / 60 % 60), $this->totaltime % 60); \n }", "function to_time($datetime)\n {\n return date('H:i:s', strtotime($datetime));\n }", "function convertToHoursMins($time, $format = '%02d:%02d') \n {\n if ($time < 1) {\n return;\n }\n $hours = floor($time / 60);\n $minutes = ($time % 60);\n $result['hours'] = $hours;\n $result['minutes'] = $minutes;\n return $result;\n }", "private function time_to_second($time) {\n\t\tlist($h, $m, $s) = explode(':', $time);\n\t\t$s += $h * 3600 + $m * 60;\n\t\treturn $s;\n\t}", "public function asString(): string\n {\n $hours = floor($this->value / 3600);\n $minutes = floor($this->value / 60) - ($hours * 60);\n $seconds = $this->value - ($minutes * 60) - ($hours * 3600);\n\n $hours = ($hours < 10) ? \"0{$hours}\" : $hours;\n $minutes = ($minutes < 10) ? \"0{$minutes}\" : $minutes;\n $seconds = ($seconds < 10) ? \"0{$seconds}\" : $seconds;\n\n return \"{$hours}:{$minutes}:{$seconds}\";\n }", "function hms($duree = 0) \n\t{\n\t\t$heures = round($duree / 3600);\n\t\t$minutes = round(($duree - $heures * 3600) / 60);\n\t\t$secondes = round(($duree - $heures * 3600 - $minutes * 60) / 60);\n\n\t\treturn str_pad($heures, 2, \"0\", STR_PAD_LEFT).':'.str_pad($minutes, 2, \"0\", STR_PAD_LEFT).':'.str_pad($secondes, 2, \"0\", STR_PAD_LEFT);\n\t}", "function timecheck ($time) {\n $min = 0;\n if($time->h >= 1) {\n $min += 60*$time->h;\n }\n $min += $time->i;\n if($min == 0) {\n return \"Passage en cours...\";\n } else {\n return $min.\" min\";\n }\n \n\n}", "function convert_time($time) {\n\t$date = date('g:i A', strtotime($time));\n\n\treturn $date;\n}", "function turnTotalMinsIntoTime($totalMins) {\n $mins = intval($totalMins % 60);\n $hour = round((($totalMins - $mins) / 60),0);\n $mins = strlen($mins) < 2 ? \"0\".$mins : $mins;\n return $hour.\":\".$mins;\n}", "function stripTime($t){\n $temp = substr($t, 0, 2);\n return $temp;\n }", "function secs_to_h($secs)\n{\n$units = array(\n\"week\" => 7*24*3600,\n\"day\" => 24*3600,\n\"hour\" => 3600,\n\"minute\" => 60,\n\"second\" => 1);\n// specifically handle zero, or a value less than 1 if it's a floating point number\n//Trying out handling anything less than a minute.\nif ($secs < 60)\nreturn \"$secs seconds\";\n$s = \"\";\nforeach ( $units as $name => $divisor )\n{\nif ($name == \"second\")\n{\n$quot = round($secs / $divisor, 2);\n}\nelse\n{\n$quot = intval($secs / $divisor);\n}\nif ($quot)\n{\n$s .= \"$quot $name\";\n$s .= (abs($quot) > 1 ? \"s\" : \"\") . \", \";\n$secs -= $quot * $divisor;\n}\n}\nreturn substr($s, 0, -2);\n}", "function sc_time_format($datetime){\n\treturn date('G:i', $datetime);\n}", "public static function timeunit(/* Long */ $time) {\n if ($time == null)\n return '';\n $sec = (int) $time % 60;\n $min = (int) ($time / 60) % 60;\n $hours = (int) ($time / 3600);\n return \"$hours:\" . sprintf('%02d', $min) . ':' . sprintf('%02d', $sec);\n }", "function display_time ( $time, $ignore_offset=0 ) {\n\tglobal $TZ_OFFSET;\n\t$hour = (int) ( $time / 10000 );\n\tif ( ! $ignore_offset )\n\t$hour += $TZ_OFFSET;\n\t$min = abs( ( $time / 100 ) % 100 );\n\t//Prevent goofy times like 8:00 9:30 9:00 10:30 10:00\n\tif ( $time < 0 && $min > 0 ) $hour = $hour - 1;\n\twhile ( $hour < 0 )\n\t$hour += 24;\n\twhile ( $hour > 23 )\n\t$hour -= 24;\n\tif ( $GLOBALS[\"TIME_FORMAT\"] == \"12\" ) {\n\t\t$ampm = ( $hour >= 12 ) ? \"pm\" : \"am\";\n\t\t$hour %= 12;\n\t\tif ( $hour == 0 )\n\t\t$hour = 12;\n\t\t$ret = sprintf ( \"%d:%02d%s\", $hour, $min, $ampm );\n\t} else {\n\t\t$ret = sprintf ( \"%d:%02d\", $hour, $min );\n\t}\n\treturn $ret;\n}", "function timeserial($hour,$minute=\"00\",$second=\"00\"){\n if ($hour==\"\") return \"\";\n return (strlen($hour)<2?\"0\":\"\").$hour.\":\".(strlen($minute)<2?\"0\":\"\").$minute.\":\".(strlen($second)<2?\"0\":\"\").$second;\n}", "function heure_to_minute($time)\n\t{\n\t\t$time = explode(':', $time);\n\t\treturn ($time[0]*60) + $time[1];\n\t}", "function getrsstime($d) \r\n{ \r\n $parts=explode(' ',$d); \r\n $month=$parts[2]; \r\n $monthreal=getmonth($month);\r\n $time=explode(':',$parts[4]); \r\n $date=\"$parts[3]-$monthreal-$parts[1] $time[0]:$time[1]:$time[2]\"; \r\n return $date;\r\n}", "function minus_time_str($timestr, $sec)\n\t{\n\t\tlist($hour, $minute, $second) = split(\":\", $timestr);\n\t\t\n\t\tif($hour == 0) $hour = 24;\n\t\t\n\t\t$t = $hour * 3600 + $minute * 60 + $second;\n\n\t\tassert($t > $sec);\n\n\t\t$t -= $sec;\n\t\t\n\t\t$hour = floor($t / 3600);\n\t\t\n\t\t$t -= $hour * 3600;\n\t\t\n\t\t$minute = floor($t / 60);\n\t\t\n\t\t$t -= $minute * 60;\n\t\t\n\t\t$second = $t;\n\t\t\n\t\tif($hour == 24) $hour = 0;\n\t\t\n\t\treturn $hour . \":\" . $minute . \":\" . $second;\n\t}", "function getStripDuration() {\n $minutes = floor($this->duration / 60);\n $seconds = $this->duration - $minutes * 60;\n if (strlen($seconds) === 0) {\n $seconds = '00';\n } else if (strlen($seconds) === 1) {\n $seconds = '0' . $seconds;\n }\n return $minutes . ':' . $seconds;\n }", "public static function secondsToHms(int $seconds): string\n\t{\n\t\t$hours = floor($seconds / 3600);\n\t\t$minutes = floor(($seconds / 60) % 60);\n\t\t$seconds = $seconds % 60;\n\n\t\t$return_hours = $hours > 0 ? $hours.\"h\" : \"\";\n\t\t$return_minutes = $minutes > 0 ? $minutes.\"min\" : \"\";\n\t\t$return_seconds = $seconds > 0 ? $seconds.\"s\" : \"\";\n\n\t\treturn $return_hours.$return_minutes.$return_seconds;\n\t}", "public function formatTime($value)\n\t{\n\t\treturn $value;\n\t}", "protected function processTime($time)\n {\n return \\PHPExcel_Style_NumberFormat::toFormattedString($time,'hh:mm:ss');\n }", "function dec_time()\n{\n $ds = 86400; // total seconds in day\n $dt = microtime(true) - mktime(0,0,0);\n\n $hs = $ds / pow(10,1);\n $ms = $ds / pow(10,3);\n $ss = $ds / pow(10,5);\n\n $hour = floor($dt/$hs);\n $min = floor($dt/$ms) - ($hour * 100);\n $sec = floor($dt/$ss) - ($hour * 10000) - ($min * 100);\n //$usec = floor($dt/$us) - ($hour * 10000) - ($min * 100);\n\n return sprintf('%01d',$hour).'h '.sprintf('%02d',$min).'m '.sprintf('%02d',$sec).'s';\n}", "function time2D4($time){\n if ( strlen($time) <= 3 )\n $time = sprintf('%04d', $time);\n\n $result = array(\n 'hh' => '00',\n 'mm' => '00'\n );\n\n if ( strlen($time) == 4 ) {\n $result['hh'] = substr($time, 0, 2);\n $result['mm'] = substr($time, 2, 2);\n }\n\n return $result;\n }", "function tstotime($timestamp){\n return date(\"Y-m-d H:i:s\", $timestamp);\n}", "static function formatTime($time){\n return date('j.n.Y G:i:s', $time);\n\n }", "function TimeToSecondsNEW($inputTime) \n{\t\n\t//now i need to strip h m s from this \n\t$s= substr($inputTime, (strlen($inputTime)-2)); // makes seconds the last 2 chars\n $inputTime=substr($inputTime,0,-3);//$inputTime=str_replace((\":\" . $s), \"\", $inputTime);\t//gets rid of seconds and :\n\t$m= substr($inputTime, (strlen($inputTime)-2)); \n\t$inputTime=substr($inputTime,0,-3);//$inputTime=str_replace((\":\" . $m), \"\", $inputTime);\t//gets rid of minutes and :\n\t$h= $inputTime; \n\t\n\t//USE THIS FOR TOTALS? add each individual piece\n\t$totalH=($h*60*60);\n\t$totalM=($m*60);\n\t$totalS=($s);\n\t\n\t//Then send updated totals back to user\t\t\n\treturn ($totalH+$totalM+$totalS);\n}", "public static function formatTime($seconds)\n {\n return gmdate(\"H:i:s\", $seconds);\n }", "function MilitaryTimeToCommonTime($time)\n {\n if ($time == \"\")\n return \"\";\n return date(\"h:i A\", strtotime($time));\n }" ]
[ "0.7713241", "0.71539074", "0.70058256", "0.69766915", "0.68982416", "0.6871347", "0.681657", "0.6809225", "0.6800612", "0.67737705", "0.6752846", "0.6741955", "0.6716263", "0.66980886", "0.6673749", "0.66317064", "0.66280556", "0.6607994", "0.6574564", "0.65567416", "0.65483844", "0.6497853", "0.6493229", "0.6491856", "0.649042", "0.6489616", "0.6488805", "0.64780223", "0.6473222", "0.64635783", "0.64292127", "0.6410466", "0.6393796", "0.63899285", "0.638284", "0.637356", "0.6366861", "0.6364901", "0.6362107", "0.6351667", "0.63202244", "0.6310171", "0.63068724", "0.6281597", "0.62704426", "0.6266508", "0.62628406", "0.6255675", "0.62464434", "0.6243135", "0.6241099", "0.6237836", "0.6228295", "0.6212216", "0.6200166", "0.6190463", "0.6175909", "0.6170559", "0.6170302", "0.6165915", "0.6136411", "0.6134868", "0.6132698", "0.6131031", "0.6114994", "0.61064446", "0.60877544", "0.6084729", "0.60837454", "0.60786706", "0.60749555", "0.60667825", "0.6061925", "0.60535336", "0.60474265", "0.6037982", "0.6035324", "0.6021402", "0.60180044", "0.59916425", "0.5988179", "0.5977178", "0.59766334", "0.596796", "0.5957057", "0.5952433", "0.5934965", "0.5932056", "0.5929826", "0.5929088", "0.5923499", "0.5911021", "0.5904862", "0.59044504", "0.5898908", "0.5897956", "0.58972293", "0.5884675", "0.5880807", "0.58728284", "0.5870826" ]
0.0
-1
ex: 20160722 => 20160723
function addOneDay($currentDay) { if ( empty($currentDay) ) { $currentDay = date('Y-m-d'); } $nextDate = strtotime ( '+ 1 day' , strtotime ( $currentDay ) ) ; $nextDate = date ( 'Y-m-d' , $nextDate ); return $nextDate; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function convert_timestamp($timestamp){ \n $limit=date(\"U\"); \n $limiting=$timestamp-$limit; \n return date (\"Ymd\", mktime (0,0,$limiting)); \n}", "function swapdate($temp){\n\t$d\t\t\t= explode(\"-\",$temp);\n\t$ndate \t= ($d[0] - 543).\"-\".$d[1].\"-\".$d[2];\n\treturn $ndate;\n}", "function convertDate ($matches) {\n\t$year = array_pop($matches['year']); //Get last found year\n\t$year = ($year) ? $year : date('Y'); //If nothing found, use this year\n\t$month = array_pop($matches['month']); //Get last found month\n\t$month = ($month) ? $month : '01'; //If nothing found, use January\n\t$day = array_pop($matches['day']); //Get last found day\n\t$day = ($day) ? $day : '01'; //If nothing found, use 1st\n\t$time = date('U', strtotime($month . '/' . $day . '/' . $year)); //Convert to unix timestamp\n\treturn $time;\n}", "private function _consolideDate(){\n\t\t$this->_mktime();\n\t\t$this->_setDate();\n\t}", "function dateFix($date) {\n\n $dateArray = explode(\"-\",$date);\n\n $year = $dateArray[0];\n $month = $dateArray[1];\n $day = $dateArray[2];\n\n return date(\"Y-m-d\",mktime(0,0,0,$month,$day,$year));\n\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}", "function fixday($s,$i){\n\treturn $n = mktime(0,0,0,date(\"m\",$s) ,date(\"d\",$s)+$i,date(\"Y\",$s));\n}", "function dates_interconv( $date_format1, $date_format2, $date_str )\n {\n $base_struc = split('[/.-]', $date_format1);\n $date_str_parts = split('[/.-]', $date_str );\n \n //print_r( $base_struc ); echo \"<br>\";\n //print_r( $date_str_parts ); echo \"<br>\";\n \n $date_elements = array();\n \n $p_keys = array_keys( $base_struc );\n foreach ( $p_keys as $p_key )\n {\n if ( !empty( $date_str_parts[$p_key] ))\n {\n $date_elements[$base_struc[$p_key]] = $date_str_parts[$p_key];\n }\n else\n return false;\n }\n \n $dummy_ts = mktime( 0,0,0, $date_elements['m'],$date_elements['d'],$date_elements['Y']);\n \n return date( $date_format2, $dummy_ts );\n }", "function date_creation($date_creation){\n $timestamp = strtotime($date_creation);\n $months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];\n $day = date('d', $timestamp);\n $month = date('m', $timestamp) - 1;\n $year = date('Y', $timestamp);\n $date_creation = \"$months[$month] \" . \"$day, \" . \"$year\";\n return $date_creation;\n}", "function dateFromStr1($strDate){\n $d=explode('/',$strDate);\n $year = $d[2];\n $month = $d[0];\n $day = $d[1];\n return mktime(0,0,0,$month,$day,$year);\n\n}", "function convertDate($date){\n\treturn implode('.', array_reverse(explode('-', $date)));\n}", "function date_compare($first_date, $second_date)\n{\n $first_date = date('Ymd', strtotime($first_date));\n $second_date = date('Ymd', strtotime($second_date));\n\n if ($first_date == $second_date) {\n return 0;\n } else {\n if ($first_date > $second_date) {\n return 1;\n } else {\n return 2;\n }\n }\n}", "function convertdateanglais($date){\n\t$ladate=explode('-',$date);\n\t$jour=$ladate[2];\n\t$moi=$ladate[1];\n\t$anne=$ladate[0];\n\t$madate=date(\"d/m/Y\", mktime(0, 0, 0, $moi, $jour, $anne));\n\treturn $madate;\n}", "function dateToCal($timestamp) {\nreturn date('Ymd\\THis', $timestamp);\n}", "function get_mnt_nxt($cur_date){\n $date_split=split(\"-\",$cur_date);\n return date(\"d-m-Y\",mktime (0,0,0,($date_split[1]+1),$date_split[0],$date_split[2]));\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 }", "protected function convertDateUser()\n{\n$jour = substr($this->getDateUtilisateur(), 0, 2);\n$mois= substr($this->getDateUtilisateur(), 3, 2);\n$annee= substr($this->getDateUtilisateur(), 6, 4);\n$dateSys = $annee.\"-\".$mois.\"-\".$jour;\nreturn $dateSys;\n}", "function str2date($in){\n\n\t$t = split(\"/\",$in);\n\n\tif (count($t)!=3) return -1;\n\n\tif (!is_numeric($t[0])) return -1;\n\tif (!is_numeric($t[1])) return -2;\n\tif (!is_numeric($t[2])) return -3;\n\n\tif ($t[2]<1902 || $t[2]>2037) return -3;\n\n\treturn mktime (0,0,0, $t[1], $t[0], $t[2]);\n}", "function convDate($arg1) {\n\t\t$arr = explode(\"/\",$arg1);\n\t\treturn $arr[2].\"/\".$arr[0].\"/\".$arr[1];\n\t}", "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 fix_date($date) {\n\t$tc = 0;\n\t$tok = strtok($date, \"/\");\n\twhile ($tok) {\n\t\t$td[$tc] = $tok;\n\t\t$tc++; \t\t\t\n \t$tok = strtok(\"/\");\n }\n return ($td[2].\"-\".$td[0].\"-\".$td[1]);\n}", "public function forcreated(){\n $created = $this->created_at;\n $newcreated = date('d-m-Y',strtotime(str_replace('/', '-', $created)));\n return $newcreated;\n }", "function dateformatusa($date)\n{\n\t$ndate = explode(\"-\",$date);\n\t$year = $ndate[2];\n\t$day = $ndate[0];\n\t$month = $ndate[1];\n\t\n\treturn $year . \"-\" . $month . \"-\" . $day;\n}", "function uwwtd_get_MM_DD_YYYY_from_YYYY_MM_DD_XXX($date) {\n $return = '';\n if (!empty($date)) {\n if (strlen($date) > 10) {\n $date = substr($date, 0, 10);\n }\n $dateObj = new DateTime($date);\n $return = $dateObj->format('m/d/Y');\n }\n return $return;\n}", "function parse_date2($data) {\n\t $timestamp = strtotime($data);\n\t if (false === $timestamp) {\n\t return '';\n\t } else {\n\t return date('Y/m', $timestamp);\n\t }\n\t}", "private function dateDuJour(){\n return date(\"Y-m-d\");\n }", "function getDateJhjjmmtt() {\n\t\n\t$date \t= getdate();\n\t$year \t= $date['year'];\n\t$mon \t= $date['mon'];\n $day\t\t= $date['mday'];\n \n\tif( $mon < \"10\" ) \t\t$mon = \"0\".$mon;\n\tif( $day < \"10\" )\t\t$day = \"0\".$day;\n\t\n\t$moddate \t= $year.$mon.$day;\n\n\treturn $moddate;\n}", "function convert_date_to_offset($month,$year,$days){\n $day = date('D',mktime(0, 0, 0, $month,1,$year));\n for ($ct = 0; $ct < sizeof($days); $ct++ ) {\n if ($day == $days[$ct]){\n return (6 + $ct); }\n else{\n } \n }\n}", "function maandagmorgen($ts){\n\t\t$monday=strtotime(\"last Monday\",$ts);\n\t\t$info=getdate($ts);\n\t\tif($info['wday']==1){\n\t\t\t//$ts is al een maandag\n\t\t\t$monday=$ts;\n\t\t}\n\t\t\n\t\t$result= date('D d M Y',$monday);\n\t\treturn $result;\n\t}", "function tstamptotime($tstamp) {\n // 1984-09-01T14:21:31Z\n sscanf($tstamp,\"%u-%u-%uT%u:%u:%uZ\",$year,$month,$day,\n $hour,$min,$sec);\n $newtstamp=mktime($hour,$min,$sec,$month,$day,$year);\n return $newtstamp;\n }", "function dbdate($date){\n\t\t$date=explode(\"-\",$date);\n\t\t$year=explode(\" \",$date[2]);\n\t\t$date1=$year[0].\"-\";\n\t\tif($date[1]<10 && (substr($date[1],0,1)!=0))\n\t\t\t$date1.=\"0\".$date[1].\"-\";\n\t\telse\n\t\t\t$date1.=$date[1].\"-\";\n\t\tif($date[0]<10 && (substr($date[0],0,1)!=0))\n\t\t\t$date1.=\"0\".$date[0].\" \".$year[1];\n\t\telse\n\t\t$date1.=$date[0].\" \".$year[1];\n\t\treturn $date1;\n\t}", "public function getModDate();", "function remove_day_from_date_and_format($date_in)\n{\n//print_r($date_ro);\n // $date_out = substr_replace($date_in, \"\", 4);\n $date_in = explode(' ', $date_in);\n $date_out = $date_in[3] . \"-\" . $date_in[2] . \"-\" . $date_in[1];\n return $date_out;\n}", "function highestDate($date1,$date2)\n {\n $year1 = substr($date1, -4);\n $month1 = substr(substr($date1, -6),0,2);\n $day1 = substr($date1,0,strlen($date1)-6);\n\n $year2 = substr($date2, -4);\n $month2 = substr(substr($date2, -6),0,2);\n $day2 = substr($date2,0,strlen($date2)-6);\n\n //check if the date is more recent than the one we had in storage, if it is we continue\n if ($year1 < $year2) \n {\n return($date2);\n }\n if ($year1 > $year2)\n { \n return($date1);\n }\n if ($year1 == $year2)\n {\n //check month now\n if ($month1 < $month2) \n {\n return($date2);\n }\n if ($month1 > $month2)\n {\n return($date1); \n }\n if ($month1 == $month2)\n {\n //check day now\n if ($day1 < $day2) \n {\n return($date2);\n }\n if ($day1 > $day2)\n {\n return($date1);\n }\n }\n }\n //equally high, so we return the first\n\n return($date1);\n }", "private function GetUanicDate(&$s, &$res) {\n $s = $this->substr($s, 0, 8);\t \n\tif ($s && (strlen($s) == 8) && @is_numeric($s)) {\n\t $res = @substr_replace(@substr_replace($s, \"-\", 4,0), \"-\", 7, 0);\n }\n }", "function modify_date($fe)\n\t{\n\t\t$cdate = mktime(substr($fe,5,2), substr($fe,7,2), 0, 1, 1, 2000+substr($fe,0,2)) + (substr($fe,2,3)-1)*24*60*60;\n\t\treturn Date(\"Y.m.d H:i\", $cdate);\n\t}", "function uwwtd_get_DD_MM_YYYY_from_YYYY_MM_DD_XXX($date) {\n $return = '';\n if (!empty($date)) {\n if (strlen($date) > 10) {\n $date = substr($date, 0, 10);\n }\n $dateObj = new DateTime($date);\n $return = $dateObj->format('d/m/Y');\n }\n return $return;\n}", "function ExibeData($data){\n\t\treturn date(\"d/m/Y\", strtotime($data));\n\t}", "function dateToGoodFormat($date){\n\t\t$toTest = explode(\"/\",$date);\n\t\t$jj = intval($toTest[0]);\n\t\t$mm = intval($toTest[1]);\n\t\t$aaaa = intval($toTest[2]);\n\t\treturn ($aaaa.\"-\".$mm.\"-\".$jj);\n\t}", "function iso_date($date) {\n if (preg_match('/^\\d\\d-\\d\\d\\-\\d\\d$/', $date)) $date = \"20\" . $date;\n if (!preg_match('/^\\d\\d\\d\\d-\\d\\d\\-\\d\\d$/', $date)) {\n if (strlen($date) == 6) $date = \"20\" . $date; //150923 => 20150923\n $date = substr_replace($date, '-', 6, 0);\n $date = substr_replace($date, '-', 4, 0);\n }\n return date(\"Y-m-d\", strtotime($date)) == $date ? $date : false;\n }", "function getCorrectDate ($dates) {\n\trsort($dates);\n\tdo {\n\t\t$date = array_pop($dates);\n\t} while ($date < 852094800 && count($dates)); //852094800 = 01/01/1997\n\treturn $date;\n}", "function dateNumberForm_1($dateTime)\n{\n\t$rtnValue\t=\t\"\";\n\tif(substr($dateTime,0,10) == date(\"Y-m-d\"))\n\t{\n\t\t$rtnValue\t=\tsubstr($dateTime, 11 , 8);\n\t}else{\n\t\t$rtnValue\t=\tsubstr($dateTime, 0 , 10);\n\t}//\tend if\n\t\n\treturn $rtnValue;\n}", "function tep_date_raw($date, $reverse = false) {\r\n if ($reverse) {\r\n return substr($date, 0, 2) . substr($date, 3, 2) . substr($date, 6, 4);\r\n } else {\r\n return substr($date, 6, 4) . substr($date, 3, 2) . substr($date, 0, 2);\r\n }\r\n}", "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}", "function moisAnPasse()\n{\n\t$dateActuelle = date(\"d/m/Y\");\n\t@list($jour, $mois, $annee) = explode('/', $dateActuelle);\n\t$annee--;\n\t$moisActuel = $annee . $mois;\n\treturn $moisActuel;\n}", "private function to_zruth_date($date) {\n if (strlen($date) >= 10 && substr($date, 4, 1) == '-' && substr($date, 7, 1) == '-')\n return substr($date, 8, 2) . '-' . substr($date, 5, 2) . '-' . substr($date, 0, 4);\n else\n return $date;\n }", "function date2mysql($date)\r\n\t{\r\n\t\tif($date != \"\")\r\n\t\t{\r\n\t\t@list($jour,$mois,$annee)=explode('/',$date);\t\t\t\t//récupération des différentes valeurs en utilisant les / comme séparateurs\r\n \t\treturn @date('Y-m-d',mktime(0,0,0,$mois,$jour,$annee));\t\t//retour de la date modifié au bon format grace à un mktime\r\n \t\t}\r\n \t\telse\r\n \t\t{\r\n \t\t\treturn $date;\r\n \t\t}\r\n\t}", "function convert_date_to_mmdd($date) {\n\t$date = date('m/d', strtotime($date));\n\n\treturn $date;\n}", "function NiceFromToDate() {\r\n\t\tif (!$this->ToDate && $this->FromDate) return '';\r\n\t\t\r\n\t\t$from_date = new Date();\r\n\t\t$to_date = new Date();\r\n\t\t$from_date->setValue($this->FromDate);\r\n\t\t$to_date->setValue($this->ToDate);\r\n\t\t\t\t\r\n\t\tif (!$this->ToDate && $this->FromDate) return $from_date->FormatI18N('%e. %B %Y');\r\n\r\n\t\t$from_month = $from_date->FormatI18N('%B');\r\n\t\t$to_month = $to_date->FormatI18N('%B');\r\n\t\t\r\n\t\t$from_year = $from_date->Format('Y');\r\n\t\t$to_year = $from_date->Format('Y');\r\n\t\t\r\n\t\tif($from_month == $to_month) {\r\n\t\t\t$long_from_to_date = $from_date->Format('j. - ').$to_date->Format('j. ').$to_month.' '.$to_year;\r\n\t\t}\r\n\t\telseif($from_year == $to_year) {\r\n\t\t\t$long_from_to_date = $from_date->Format('j. ').$from_month.' - '.$to_date->Format('j. ').$to_month.' '.$to_year;\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$long_from_to_date = $from_date->FormatI18N('%e. %B %Y') . ' - ' . $to_date->FormatI18N('%e. %B %Y');\r\n\t\t}\r\n\t\treturn $long_from_to_date;\r\n\t\t//$this->FromDate->setConfig('dateformat','dd/MM/y');//.FormatI18N('%e. %B %Y');\r\n\t}", "function sqlToDate($sql){\n \treturn substr($sql, 8, 2) . \"/\" . substr($sql, 5, 2) . \"/\" . substr($sql, 0, 4);\n }", "function COM_JSdate(&$date) {\r\n\t//note: the \"intval\" removes the leading zero which JS interprets as octal number;\r\n\t//\t\"-1\" needed because JS expects month rel to 0 (but not day) and same as \"intval\")\r\n\treturn $date->format(\"Y\").\",\".($date->format(\"m\")-1).\",\".intval($date->format(\"d\"));\r\n}", "function FriendlyDateFromTo($p_from,$p_to) {\n\t$v_from=DateToSeconds($p_from);\n\t$v_to=DateToSeconds($p_to);\n\n\t/* SPLIT THE DATES ABOVER INTO AN ARRAY */\n\t$v_arr_from = split('[- :]', $p_from);\n\t$v_arr_to = split('[- :]', $p_to);\n\n\t/* CHECK IF IT'S TODAY */\n\t$v_yesterday=mktime(0, 0, 0, date(\"m\") , date(\"d\")-1, date(\"Y\"));\n\t$v_tomorrow=mktime(0, 0, 0, date(\"m\") , date(\"d\")+1, date(\"Y\"));\n\tif ($v_from>$v_yesterday && $v_to<$v_tomorrow && ($v_from-$v_to) < 86400) {\n\t\treturn \"Today \".$v_arr_from[3].\":\".$v_arr_from[4].\" to \".$v_arr_to[3].\":\".$v_arr_to[4];\n\t}\n\telse {\n\t\treturn Date(\"D\",$v_from).\" \".Date(\"j\",$v_from).\" \".Date(\"M\",$v_from).\" \".$v_arr_from[3].\":\".$v_arr_from[4].\" to \".Date(\"D\",$v_to).\" \".Date(\"j\",$v_from).\" \".Date(\"M\",$v_from).\" \".$v_arr_to[3].\":\".$v_arr_to[4];\n\t}\n\n}", "function TidyTimeStamp($str)\n{\n\t$date=strtok($str, \"T\");\n\t$time=strtok(\"T\");\n\t$finalDate=date_format(date_create($date),\"d.m\");\n\t$finalTime=substr($time,0,5);\n\t//$weekday=weekdayFromEnglish(\"fi_FI\",date_format(date_create($date),\"D\"));\n\t$weekday=localizeWeekDay(date_format(date_create($date),\"D\"));\n\treturn $weekday .\" \". $finalDate .\" \". $finalTime;\n}", "function MakeDateForDb($date)\n\t{\n\t\tif (strpos($date, '-'))\n\t\t{\n\t\t\t$dateArray = explode('-', $date);\n\t\t}\n\t\telse if (strpos($date, '/'))\n\t\t{\n\t\t\t$dateArray = explode('/', $date);\n\t\t}\n\t\telse\n\t\t{\n echo ERROR_DOB;\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t$dateArray = explode('-', $date);\n\t\t// $dateArray is somethink like [0]=01, [1]=22, [2]=1975\n\t\t// make a unix timestamp out of the original date string.\n\t\t$timestamp = mktime(0, 0, 0, $dateArray[0], $dateArray[1], $dateArray[2]);\n\t\treturn $timestamp;\n\t}", "function sort_notes($a, $b) {\n return strtotime($b['date']) - strtotime($a['date']);\n }", "function entrydate($str='now'){\n return $time=strtotime($str); \n }", "function convertdate($date) {\r\n\t$date = strtotime($date);\r\n\treturn date(\"M j, Y g:ia\", $date);\r\n}", "public function getDate4Database2($date=null){\n\t\treturn date_format($this->createDate($date),\"Y-m-d\");\n\t}", "public function getCreateDate(): int;", "function convert_date( $uglydate ){\n\t$date = new DateTime( $uglydate );\n\treturn $nicedate = $date->format('F j, Y');\n}", "function formldatesimp2($gdate, $gcode, $tdate, $tcode, $go, $to)\n{\n if (!empty($go)) {\n $go = ' ' . $go;\n $go2 = '*' . $go;\n }\n if (!empty($to)) {\n $to = ' ' . $to;\n $to2 = ' &dagger;' . $to;\n }\n $code = 10 * $gcode + $tcode;\n\n switch ($code) {\n case 0:\n return substr($gdate, 8, 2) . '.' . substr($gdate, 5, 2) . '.' . substr($gdate, 0, 4) . $go . ' - ' . substr($tdate, 8, 2) . '.' . substr($tdate, 5, 2) . '.' . substr($tdate, 0, 4) . $to;\n case 1:\n return substr($gdate, 8, 2) . '.' . substr($gdate, 5, 2) . '.' . substr($gdate, 0, 4) . $go . ' - ' . substr($tdate, 0, 4) . $to;\n case 2:\n return substr($gdate, 8, 2) . '.' . substr($gdate, 5, 2) . '.' . substr($gdate, 0, 4) . $go . ' - ' . $to;\n case 8:\n return substr($gdate, 8, 2) . '.' . substr($gdate, 5, 2) . '.' . substr($gdate, 0, 4) . $go . $to;\n case 9:\n return '*' . substr($gdate, 8, 2) . '.' . substr($gdate, 5, 2) . '.' . substr($gdate, 0, 4) . $go . $to;\n case 10:\n return substr($gdate, 0, 4) . $go . ' - ' . substr($tdate, 8, 2) . '.' . substr($tdate, 5, 2) . '.' . substr($tdate, 0, 4) . $to;\n case 11:\n return substr($gdate, 0, 4) . $go . ' - ' . substr($tdate, 0, 4) . $to;\n case 12:\n return substr($gdate, 0, 4) . $go . ' - ' . $to;\n case 18:\n return substr($gdate, 0, 4) . $go . $to;\n case 19:\n return '*' . substr($gdate, 0, 4) . $go . $to;\n case 20:\n return $go2 . ' - ' . substr($tdate, 8, 2) . '.' . substr($tdate, 5, 2) . '.' . substr($tdate, 0, 4) . $to;\n case 21:\n return $go2 . ' - ' . substr($tdate, 0, 4) . $to;\n case 22:\n return $go2 . \" \" . $to2;\n case 28:\n return $go2 . \" \" . $to2;\n case 29:\n return $go2 . \" \" . $to2;\n }\n return date(\"d.m.Y\", strtotime($date));\n}", "function codeDate ($date) \r\n\r\n{\r\n\r\n\t$tab = explode (\"-\", $date);\r\n\r\n\t$r = $tab[1].\"/\".$tab[2].\"/\".$tab[0];\r\n\r\n\treturn $r;\r\n\r\n}", "function sql2stamp($ymd) { #trace();\r\n if ( $ymd=='0000-00-00' )\r\n $t= 0;\r\n else {\r\n $y= 0+substr($ymd,0,4);\r\n $m= 0+substr($ymd,5,2);\r\n $d= 0+substr($ymd,8,2);\r\n $t= mktime(0,0,0,$m,$d,$y)+1;\r\n }\r\n return $t;\r\n}", "function date_compare($a, $b) {\n //var_dump($a);\n $t1 = strtotime($a);\n $t2 = strtotime($b);\n // The negative in front the result sorts by the most recent entry\n return -($t1 - $t2);\n }", "function dynamic_date() {\n$all_posts = get_posts( 'post_status=publish&order=ASC' );\n$first_post = $all_posts[0];\n$first_date = $first_post->post_date_gmt;\nif ( substr( $first_date, 0, 4 ) == date( 'Y' ) ) {\necho date( 'Y' );\n} else {\necho substr( $first_date, 0, 4 ) . \"-\" . date( 'Y' );\n}\n}", "function get_dy_nxt($cur_date){\n $date_split=split(\"-\",$cur_date);\n return date(\"d-m-Y\",mktime (0,0,0,$date_split[1],($date_split[0]+ 1),$date_split[2]));\n }", "function affdate_archive($date, $type = 'mois') {\n\t\treturn affdate_base($date, 'annee').'-'.affdate_base($date, 'mois').(($type == 'jour')?'-'.affdate($date, 'd'):'');\n\t}", "function variant_date_to_timestamp($variant) {}", "function conv_date($date)\n\t{\n\t\t$arr = explode(' ', $date);\n\t\t$y = $arr[2];\n\t\t$m = $this->convert_month_name('Eng-Num', str_replace(',','',$arr[0]));\n\t\t$d = $arr[1];\n\t\t\n\t\treturn $y.'-'.$m.'-'.$d; // output : 1986-1-24\n\t}", "function dateConvert($date,$format){\n //Casting created_at\n $date = new DateTime($date);\n $waktu = $date->Format($format);\n return $waktu;\n}", "public function getNextChangeDate(string $date): string\n {\n $date = getdate(strtotime($date));\n\n $newDay = $date['mday'];\n $newMonth = $date['mon'] + 1;\n $newYear = $date['year'];\n if ($newMonth > 12) {\n $newYear++;\n $newMonth = 1;\n }\n\n $newDate = sprintf('%s-%s-%s', $newYear, $newMonth, $newDay);\n\n if (!checkdate($newMonth, $newDay, $newYear)) {\n $newDate = date(\"Y-m-t\", strtotime($newDate) - 1);\n }\n return $newDate;\n }", "function standard_date_time2($date) {\n\t$timestamp = strtotime($date);\n\t$fdate=date('d M, Y h:i A', $timestamp);\n\treturn $fdate;\n\t}", "public function getPublishDateTo();", "function date_ajourdhui()\n{\n $date = localtime(time());\n\n $mois = $date[4]+1;\n $annee = $date[5] + 1900;\n\n $aujourdhui = mktime(0,0,0,$mois,$date[3],$annee,-1);\n \n return date('Y-m-d', $aujourdhui); \n}", "function utility_convertDateToWikiMonth($date) {\n $s = date_create_from_format('Ymd', '20010101');\n $e = date_create_from_format('Ymd', $date);\n $diff = $s->diff($e);\n // Need to add years to the month diff\n $m = ($diff->format('%y') * 12) + $diff->format('%m');\n return $m;\n}", "function v1_get_pubdate($object) {\n\t\n\t// XML functions\n\trequire_once \"php/funcs/xml_funcs.php\";\n\t\n\t// Global list of general publish dates\n\tglobal $gen_pubdates;\n\t\n\t$pubdate=xml_get_att($object, \"PUBDATE\");\n\t\n\t// Store pubdate in list\n\tarray_unshift($gen_pubdates, $pubdate);\n\t\n}", "function codeDate ($date) {\r\n\t $tab = explode (\"-\", $date);\r\n\t $r = $tab[1].\"/\".$tab[2].\"/\".$tab[0];\r\n\t return $r;\r\n\t}", "function codeDate ($date) {\r\n\t $tab = explode (\"-\", $date);\r\n\t $r = $tab[1].\"/\".$tab[2].\"/\".$tab[0];\r\n\t return $r;\r\n\t}", "function codeDate ($date) {\r\n\t $tab = explode (\"-\", $date);\r\n\t $r = $tab[1].\"/\".$tab[2].\"/\".$tab[0];\r\n\t return $r;\r\n\t}", "function codeDate ($date) {\r\n\t $tab = explode (\"-\", $date);\r\n\t $r = $tab[1].\"/\".$tab[2].\"/\".$tab[0];\r\n\t return $r;\r\n\t}", "function codeDate ($date) {\r\n\t $tab = explode (\"-\", $date);\r\n\t $r = $tab[1].\"/\".$tab[2].\"/\".$tab[0];\r\n\t return $r;\r\n\t}", "function codeDate ($date) {\r\n\t $tab = explode (\"-\", $date);\r\n\t $r = $tab[1].\"/\".$tab[2].\"/\".$tab[0];\r\n\t return $r;\r\n\t}", "function codeDate ($date) {\r\n\t $tab = explode (\"-\", $date);\r\n\t $r = $tab[1].\"/\".$tab[2].\"/\".$tab[0];\r\n\t return $r;\r\n\t}", "function codeDate ($date) {\r\n\t $tab = explode (\"-\", $date);\r\n\t $r = $tab[1].\"/\".$tab[2].\"/\".$tab[0];\r\n\t return $r;\r\n\t}", "function timestampToDate($t) {\n return date(\"d-m-Y\",$t);\n}", "function dateToTimestamp($date){\n\t$dia=substr($date,0,2);\n\t$mes=substr($date,3,2);\n\t$ano=substr($date, 6,4);\t\n\t\n\t$timestamp= mktime(0,0,0,$mes,$dia,$ano);\n\treturn $timestamp;\n }", "function dateToDBDate($date)\n\t{\n\n\t\tif (is_numeric($date))\n\t\t{\n\t\t\treturn date('Y-m-d', $date);\n\t\t}\n\t\telse if (preg_match('/\\d{2}\\.\\d{2}\\.\\d{4}/', $date))\n\t\t{\n\t\t\t$arDate = explode('.', $date);\n\n\t\t\treturn $arDate[2].'-'.$arDate[1].'-'.$arDate[0];\n\t\t}\n\t\telse if (strtotime($date) > 0)\n\t\t{\n\t\t\treturn date('Y-m-d', strtotime($date));\n\t\t}\n\n\t\treturn '0000-00-00';\n\n\t}", "function cambiaf($stamp) \n{\n\t$fdia = explode(\"-\",$stamp);\n\t$fecha = $fdia[2].\"-\".$fdia[1].\"-\".$fdia[0];\n\treturn $fecha;\n}", "private function from_zruth_date($date) {\n if (strlen($date) == 10 && substr($date, 2, 1) == '-' && substr($date, 5, 1) == '-')\n return substr($date, 6, 4) . '-' . substr($date, 3, 2) . '-' . substr($date, 0, 2);\n else\n return $date;\n }", "function dateConvert($date,$func)\n{\n\t\n\tif($func==1) \n\t{\n\t\t\n list($day,$month,$year)=preg_split('/[-\\.\\/]/',$date);\n\t\t$date=\"$year-$month-$day\";\n\t\treturn $date;\n\t}\n\n\tif($func==2) \n\t{\n\t\tlist($year,$month,$day)=preg_split('/[-\\.\\/]/',$date);\n $date=\"$day/$month/$year\";\n\t\treturn $date;\n\t\n\t}\n\n}", "function sortByDate(array $a, array $b): int {\n return strtotime($b['publishDate']) - strtotime($a['publishDate']);\n}", "function tep_date_raw($date, $reverse = false) {\n if ($reverse) {\n return substr($date, 3, 2) . substr($date, 0, 2) . substr($date, 6, 4);\n } else {\n return substr($date, 6, 4) . substr($date, 0, 2) . substr($date, 3, 2);\n }\n}", "function tep_date_raw($date, $reverse = false) {\n if ($reverse) {\n return substr($date, 3, 2) . substr($date, 0, 2) . substr($date, 6, 4);\n } else {\n return substr($date, 6, 4) . substr($date, 0, 2) . substr($date, 3, 2);\n }\n}", "function tep_date_raw($date, $reverse = false) {\n if ($reverse) {\n return substr($date, 3, 2) . substr($date, 0, 2) . substr($date, 6, 4);\n } else {\n return substr($date, 6, 4) . substr($date, 3, 2) . substr($date, 0, 2);\n }\n}", "function moisActuel()\n{\n\t$dateActuelle = date(\"d/m/Y\");\n\t@list($jour, $mois, $annee) = explode('/', $dateActuelle);\n\t//$annee--;\n\t$moisActuel = $mois;\n\treturn $annee . $moisActuel;\n}", "function join_ymd($y, $m, $d) {\n $y = str_pad($y, 4, \"0\", STR_PAD_LEFT); \n $m = str_pad($m, 2, \"0\", STR_PAD_LEFT); \n $d = str_pad($d, 2, \"0\", STR_PAD_LEFT); \n return $y.'-'.$m.'-'.$d;\n}", "function convertMysqlDate($date) {\n $date = str_replace('/', '-', $date);\n $result = $date;\n if(!empty($date)) {\n $arr = explode('-', $date);\n if(checkdate($arr[1], $arr[0], $arr[2])) {\n $result = \"$arr[2]-$arr[1]-$arr[0]\";\n }\n }\n return $result;\n }", "function dateFR($date){\n $date = explode(\"/\", $date);\n return $date[2].\"/\".$date[1].\"/\".$date[0];\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}", "function tep_date_raw($date, $reverse = false) {\n if ($reverse) {\n return substr($date, 0, 2) . substr($date, 3, 2) . substr($date, 6, 4);\n } else {\n return substr($date, 6, 4) . substr($date, 3, 2) . substr($date, 0, 2);\n }\n}", "function int_to_day($int){\n\tglobal $days;\n\treturn $days[$int];\n}" ]
[ "0.6040183", "0.5963474", "0.5873314", "0.5821957", "0.5812504", "0.5763699", "0.56561613", "0.5630863", "0.56225145", "0.56008685", "0.5504813", "0.5488977", "0.54772466", "0.5444491", "0.5403296", "0.5385395", "0.537084", "0.5363716", "0.5360833", "0.53448737", "0.53293353", "0.5309652", "0.53069335", "0.53031486", "0.52898276", "0.5280178", "0.5275602", "0.5264594", "0.5257054", "0.524257", "0.52402514", "0.5217848", "0.5206746", "0.5205236", "0.52015436", "0.5190982", "0.5174078", "0.5172165", "0.5171506", "0.51679915", "0.5164105", "0.5161226", "0.5145287", "0.5137211", "0.5129188", "0.5127313", "0.51174045", "0.51143104", "0.5112634", "0.5109315", "0.5108795", "0.50960106", "0.5095205", "0.5088121", "0.5086802", "0.50851494", "0.50772756", "0.5076406", "0.5072403", "0.50714934", "0.50679326", "0.50664616", "0.5055643", "0.5054716", "0.505464", "0.50530225", "0.5040879", "0.5036161", "0.5025334", "0.50189394", "0.50178486", "0.5014525", "0.50119907", "0.50040615", "0.49976757", "0.4996978", "0.49956352", "0.49956352", "0.49956352", "0.49956352", "0.49956352", "0.49956352", "0.49956352", "0.49956352", "0.49944282", "0.49942583", "0.49911907", "0.49823326", "0.4980753", "0.49798405", "0.49766633", "0.49688196", "0.49688196", "0.49661034", "0.49614105", "0.49608678", "0.49605584", "0.49593306", "0.49583268", "0.495285", "0.49527693" ]
0.0
-1
convert time 3 digit to 4 digit
function time2D4($time){ if ( strlen($time) <= 3 ) $time = sprintf('%04d', $time); $result = array( 'hh' => '00', 'mm' => '00' ); if ( strlen($time) == 4 ) { $result['hh'] = substr($time, 0, 2); $result['mm'] = substr($time, 2, 2); } return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function convert_time ($time = '') {\n $str_time = '';\n\n $time_in_second = $time / 1000;\n\n $nb_minutes = $time_in_second / 60;\n $nb_seconds = $time_in_second % 60;\n\n $str_time = $nb_seconds.'s';\n\n if ($nb_minutes >= 60) {\n $nb_heures = $nb_minutes / 60;\n $nb_minutes = $nb_minutes % 60;\n $str_time = floor($nb_heures).'h '.$nb_minutes.'m '.$str_time;\t\t\t\t\t\t\t\t\t\n } else {\n $str_time = floor($nb_minutes).'m '.$str_time;\n }\t\t\n return $str_time;\n\n }", "function timeFormat($string1, $string2, $string3){\n if ($string1 >=0 && $string1 <=9){\n $string1 = 0 . $string1;\n }\n if ($string2 >=0 && $string2 <=9){\n $string2 = 0 . $string2;\n }\n if ($string3 >=0 && $string2 <=9){\n $string3 = 0 . $string3;\n }\n return $string1 . \":\" . $string2 .\":\" . $string3;\n}", "static function string_format_time($time){\r\n $h = intval($time / 60);\r\n $min = $time % 60;\r\n $ret = '';\r\n\r\n if($h > 0){\r\n if($h == 1){\r\n $ret .= $h.' heure ';\r\n } else {\r\n $ret .= $h.' heures ';\r\n }\r\n }\r\n\r\n if($min > 0){\r\n $ret .= $min . ' minutes';\r\n }\r\n\r\n if($time == 0){\r\n $ret .= '0 heure';\r\n }\r\n\r\n return $ret;\r\n }", "function formatTime($time){\n if(!$time){\n return '-';\n }\n $seconds = ($time/1000);//\n $minutes =floor($seconds / 60);\n $seconds = ($seconds % 60);//\n $hours = floor($seconds / 3600);\n\n return $hours.':'.$minutes.':'.$seconds;\n }", "function time2str ($t) {\n\tif ($t == '00:00:00' OR $t == '') {\n\t\treturn '';\n\t}\n\tlist($h,$m,$s) = explode(\":\",$t);\n\t$ampm = ($h >= 12) ? \"p.m.\" : \"a.m.\";\n\t// if between 12 - 1 p.m.\n if ($h % 12 == 0) {\n return ($m > 0) ? \"12:\" . $m . \" \" . $ampm : \"Noon\";\n\t } else {\n\t\t\treturn ($m > 0) ? $h % 12 . \":\" . $m . \" \" . $ampm : $h % 12 . \" \" . $ampm;\n\t }\n}", "public function timeFormat();", "function convert_time($time) {\n\t$date = date('g:i A', strtotime($time));\n\n\treturn $date;\n}", "function formatTime($tokenList)\n\t{\n\t\t$time = join(\" \",$tokenList);\t\t\n\n\t\t// if am/pm denoted as a or p, remove space between digit and a/p char\t\t\n\t\t$time = preg_replace(\"/([0-9]*[0-9]) (A|P) /i\", \" \\\\1\\\\2 \",$time);\n\t\t\n\t\t// compress small times like 8 - 5 or 8a - 5p\n\n\t\t$time = str_replace(\" - \",\"-\",$time);\n\t\t$time = str_replace(\"- \",\"-\",$time);\n\t\treturn $time;\t\t\n\t}", "function timeConversion($s) {\n /*\n * Write your code here.\n */\n $tim = \"\";\n $arr = preg_split(\"/[:]/\",$s);\n\n if( preg_match( '/AM$/', $arr[2]) ) {\n $replace = str_replace('AM', '', $arr[2]);\n if($arr[0] === \"12\"){\n $arr[0] = \"00\";\n }\n }else{ // PM\n $replace = str_replace('PM', '', $arr[2]);\n\n if($arr[0] !== \"12\"){\n $arr[0] = strval(intval($arr[0]) + 12);\n }\n }\n $arr[2] = $replace;\n return $arr[0] .\":\". $arr[1] .\":\". $arr[2];\n}", "function to_time($string){\n $split = explode(':', $string);\n $front = $split[0];\n $back = $split[1];\n // am or pm\n $period = substr($back, -2);\n $back = substr($back, 0,2);\n\n if($period == 'PM' and $front != '12'){\n $front += 12;\n }\n\n return ((string)$front . \":\" . (string)$back . \":00\");\n }", "function FormatTime($time) {\n $hour = $time[0];\n $min = $time[1];\n\n $hourModulo12 = $hour % 12;\n if ($hourModulo12 == 0) $hourModulo12 = 12;\n\n if ($hour >= 12)\n $ampm = \"PM\";\n else\n $ampm = \"AM\";\n\n if ($hourModulo12 < 10)\n $hourStr = \"0\" . $hourModulo12;\n else\n $hourStr = $hourModulo12;\n if ($min < 10)\n $minStr = \"0\" . $min;\n else\n $minStr = $min;\n return $hourStr . \":\" . $minStr . $ampm;\n}", "public function convertTimeToDisplayTime( $twentFourHourTime )\n\t{\n\t\t$AmPm = \"TIME\";\t\t\n\t\t$AmPm = date(\"g:i a\", strtotime($twentFourHourTime));\t\t\n\t\treturn $AmPm;\n\t}", "function format_time($secs) {\n\t\t $times = array(3600, 60, 1);\n\t\t $time = '';\n\t\t $tmp = '';\n\t\t for($i = 1; $i < 3; $i++) {\n\t\t\t $tmp = floor($secs / $times[$i]);\n\t\t\t if($tmp < 1) {\n\t\t\t\t $tmp = '00';\n\t\t\t }\n\t\t\t elseif($tmp < 10) {\n\t\t\t\t $tmp = '0' . $tmp;\n\t\t\t }\n\t\t\t $time .= $tmp;\n\t\t\t if($i < 2) {\n\t\t\t\t $time .= ':';\n\t\t\t }\n\t\t\t $secs = $secs % $times[$i];\n\t\t }\n\t\t return $time;\n\t\t}", "private function time_rule($time){\n $hour = floor($time/3600);//divisão retornando parte inteira.\n $hour_rest = fmod($time, 3600);//divisão retornando restante\n $min = floor($hour_rest/60); // calculo de minutos apartir do restante de horas\n $sec = fmod($hour_rest, 60); // calculos dos segundos\n return $this->number_format($sec,$min,$hour);\n }", "function times2str ($t1,$t2) {\n\tif ($t1 == '00:00:00' OR $t1 == '')\n\t\treturn '';\n\t// no end time\n\tif ($t2 == '00:00:00' OR $t2 == '')\n\t\treturn time2str($t1);\n\tlist($h1,$m1,$s1) = explode(\":\",$t1);\n\tlist($h2,$m2,$s2) = explode(\":\",$t2);\n\t$ampm1 = ($h1 >= 12) ? \" p.m.\" : \" a.m.\";\n\t$ampm2 = ($h2 >= 12) ? \" p.m.\" : \" a.m.\";\n\t$ampm1 = ($ampm1 != $ampm2) ? $ampm1 : \"\";\n\t// if time1 is 12:xx p.m.\n\tif ($h1 == \"12\") {\n\t\t$time_str = ($m1 > 0) ? \"12:\" . $m1 . $ampm1 : \"Noon\";\n\t} else {\n\t\t$time_str = ($m1 > 0) ? $h1 % 12 . \":\" . $m1 . $ampm1 : $h1 % 12 . $ampm1;\n\t}\n\t$time_str .= \"-\";\n\tif ($h2 == \"12\") {\n\t\t$time_str .= ($m2 > 0) ? \"12:\" . $m2 . $ampm2 : \"Noon\";\n\t} else {\n\t\t$time_str .= ($m2 > 0) ? $h2 % 12 . \":\" . $m2 . $ampm2 : $h2 % 12 . $ampm2;\n\t}\n\treturn ($time_str);\n}", "function format_time($t,$f=':'){\n\t\t//return ($t< 0 ? '-' : '') . sprintf(\"%02d%s%02d%s%02d\", floor(abs($t)/3600), $f, (abs($t)/60)%60, $f, abs($t)%60);\n\t\t\n\t\t$seconds = abs($t)%60;\n\t\t$minutes = (abs($t)/60)%60;\n\t \n\t\tif($seconds>30){\n\t\t\t$minutes = $minutes+1;\n\t\t}\n\t\treturn sprintf(\"%02d\",$minutes);//($t< 0 ? '-' : '') . sprintf(\"%02d%s%02d%s%02d\", floor(abs($t)/3600), $f, (abs($t)/60)%60, $f, abs($t)%60);\n }", "function MilitaryTimeToCommonTime($time)\n {\n if ($time == \"\")\n return \"\";\n return date(\"h:i A\", strtotime($time));\n }", "function stripTime($t){\n $temp = substr($t, 0, 2);\n return $temp;\n }", "function win_time($timestr) {\r\n return substr($timestr, 4, 2) . \"/\" . substr($timestr, 6, 2) . \"/\" .\r\n substr($timestr, 0, 4) . \" \" . substr($timestr, 8, 2) . \":\" .\r\n substr($timestr, 10, 2) . \":\" . substr($timestr, 12, 2) . \" \" .\r\n substr($timestr, -4);\r\n}", "function CommonTimeToMilitaryTime($time)\n {\n if ($time == \"\")\n return \"\";\n\n return date(\"H:i\", strtotime($time));\n }", "function times2str_ampm ($t) {\n\tif ($t == '00:00:00' OR $t == '') {\n\t\treturn $t;\n\t}\n\tlist($h,$m,$s) = explode(\":\",$t);\n\t$ampm = ($h >= 12) ? \"PM\" : \"AM\";\n\t$h = ($h > 12) ? $h - 12 : $h;\n\treturn \"{$h}:{$m}:{$s} {$ampm}\";\n}", "function sec2time ($sec) {\n $sec = (int) $sec;\n $time = ''; $h = 0;\n if ($sec >= 3600 ) {\n $h = (int) ($sec / 3600);\n if ($h > 0) { $time .= $h.':'; }\n $sec = $sec - $h*3600;\n }\n $m = (int) ($sec / 60);\n if ($h == 0) { $time .= $m.':'; }\n else { $time .= sprintf(\"%02d\", $m).':'; };\n if ($m > 0) { $sec = $sec - $m*60; }\n $time .= sprintf(\"%02d\", $sec);\n return $time;\n}", "function timeConversion($originalTime) {\n\t$newTime;\n\n $hours = substr($originalTime, 0, 2);\n $minutes = substr($originalTime, 3, 2);\n\n if ($hours > 12) $newTime = ($hours - 12) . \":\" . $minutes . \" PM\";\n else if ($hours == 12) $newTime = $hours . \":\" . $minutes . \" PM\";\n else if ($hours == 0) $newTime = 12 . \":\" . $minutes . \" AM\";\n else $newTime = substr($hours, 1) . \":\" . $minutes . \" AM\";\n\n \treturn $newTime;\n}", "function value_time($value){\r\n\t$separator = \":\";\r\n\tif(strlen($value) == 12){\r\n\t\t$value = substr($value, 0, 8);\r\n\t}\r\n\tif((strlen($value) == 8) && (substr($value, 2, 1) == $separator) && (substr($value, 5, 1) == $separator)){\r\n\t\t$hou = (int) substr($value, 0, 2);\r\n\t\t$min = (int) substr($value, 3, 2);\r\n\t\t$sec = (int) substr($value, 6, 2);\r\n\t}elseif((strlen($value) == 5) && (substr($value, 2, 1) == $separator)){\r\n\t\t$hou = (int) substr($value, 0, 2);\r\n\t\t$min = (int) substr($value, 3, 2);\r\n\t\t$sec = 0;\r\n\t}else{\r\n\t\treturn NULL;\r\n\t}\r\n\tif(($hou < 0 || $hou > 23) || ($min < 0 || $min > 59) || ($sec < 0 || $sec > 59)){\r\n\t\treturn NULL;\r\n\t}else{\r\n\t\treturn str_pad($hou, 2, \"0\", STR_PAD_LEFT).$separator.str_pad($min, 2, \"0\", STR_PAD_LEFT).$separator.str_pad($sec, 2, \"0\", STR_PAD_LEFT);\r\n\t}\r\n}", "function timeConversion($s) {\n /*\n * Write your code here.\n */\n $timeArray = explode(':', $s);\n $hour = $timeArray[0];\n $minute = $timeArray[1];\n $sec = $timeArray[2];\n $period = substr($sec, 2);\n $originalSec = rtrim($sec, $period);\n $newTime;\n if((0 <= $hour && $hour < 12) && ($period == 'AM')) {\n $newTime = $hour.\":\".$minute.\":\".$originalSec;\n }elseif ((0 <= $hour && $hour < 12) && ($period == 'PM')) {\n $newTime = 12+$hour.\":\".$minute.\":\".$originalSec;\n }elseif (($hour == 12) && ($period == 'AM')) {\n $newTime = \"00\".\":\".$minute.\":\".$originalSec;\n }elseif (($hour == 12) && ($period == 'PM')) {\n $newTime = $hour.\":\".$minute.\":\".$originalSec;\n }\n\n return $newTime; \n\n\n\n}", "function convertTime($time){\n return date(\"H:i\", strtotime($time));\n}", "private function timeToHex($time)\n {\n return str_pad(dechex($time), 4, \"0\", STR_PAD_LEFT);\n }", "function milisecond_to_time($time) {\n $hours = gmdate(\"H\", $time / 1000);\n $mins = gmdate(\"i\", $time / 1000);\n $seconds = gmdate(\"s\", $time / 1000);\n if($hours > 24) {\n $tags = Math.floor($hours/24);\n $hours = $hours % 24;\n }\n $res = \"$hours:$mins:$seconds\";\n return $res;\n }", "static function time($value){\n\t\t$separator = \":\";\n\t\t$value = substr($value, 0, 8);\n\t\tif((strlen($value) == 8) && (substr($value, 2, 1) == $separator) && (substr($value, 5, 1) == $separator)){\n\t\t\t$hou = (int) substr($value, 0, 2);\n\t\t\t$min = (int) substr($value, 3, 2);\n\t\t\t$sec = (int) substr($value, 6, 2);\n\t\t}elseif((strlen($value) == 5) && (substr($value, 2, 1) == $separator)){\n\t\t\t$hou = (int) substr($value, 0, 2);\n\t\t\t$min = (int) substr($value, 3, 2);\n\t\t\t$sec = 0;\n\t\t}else{\n\t\t\treturn null;\n\t\t}\n\t\tif(($hou < 0 || $hou > 23) || ($min < 0 || $min > 59) || ($sec < 0 || $sec > 59)){\n\t\t\treturn null;\n\t\t}else{\n\t\t\treturn str_pad($hou, 2, \"0\", STR_PAD_LEFT).$separator.str_pad($min, 2, \"0\", STR_PAD_LEFT).$separator.str_pad($sec, 2, \"0\", STR_PAD_LEFT);\n\t\t}\n\t}", "static function formatTime($time){\n return date('j.n.Y G:i:s', $time);\n\n }", "public function formatTimeForTimePicker($time)\n\t{\n\t\t[$h, $m] = explode(':', $time);\n\t\t$mn = str_pad($m - $m % 15, 2, 0, STR_PAD_LEFT);\n\t\t$AM_PM = ['am', 'pm'];\n\n\t\treturn str_pad(($h % 12), 2, 0, STR_PAD_LEFT) . ':' . $mn . $AM_PM[($h / 12) % 2];\n\t}", "public function format_time_save($time){ \n\t\t$exp_time = explode(' ', $time);\n\t\t$time = '2014-03-29 '.$exp_time[0].':00 '.$exp_time[1];\n\t\treturn date('H:i', strtotime($time));\t\t\t\n\t}", "public function getTime24($time)\n {\n if (!strpos($time, ':'))\n $time = substr_replace($time, ':', 2, 0);\n\n return $time;\n }", "function timeFormat($str){\n\t$dbToNormalize = '#[0-2][0-9]:[0-5][0-9]:[0-5][0-9]#';\n\t$normalizeToDb = '#[0-2][0-9]h[0-5][0-9]#';\n\t$errorToDb = '#[0-2][0-9]h#';\n\n\tif (preg_match($dbToNormalize, $str)) {\n\t\t$time = DateTime::createFromFormat('H:i:s', $str);\n\t\treturn $formatedTime = $time->format('H\\hi');\n\t}\n\telseif (preg_match($normalizeToDb, $str)) {\n\t\t$time = DateTime::createFromFormat('H\\hi', $str);\n\t\treturn $formatedTime = $time->format('H:i:s');\n\t}\n\telseif (preg_match($errorToDb, $str)) {\n\t\t$time = DateTime::createFromFormat('H\\h', $str);\n\t\treturn $formatedTime = $time->format('H:i:s');\n\t}\n\telse{\n\t\treturn FALSE;\n\t}\n}", "function get_str_time( $strdate )\r\n{\r\n $time = substr( $strdate, 11, 8);\r\n\r\n return $time;\r\n}", "function timeConversion($s) {\n return DATE(\"H:i:s\", STRTOTIME($s));\n\n}", "function rlip_sanitize_time_string($time_string, $default = '') {\n //valid time units - hours, minutes, seconds\n $valid_units = array('d', 'h', 'm');\n\n $result = '';\n //track the current \"group\", e.g. 2d\n $current_group = '';\n\n //iterate through characters\n for ($i = 0; $i < strlen($time_string); $i++) {\n //retrieve current character\n $character = strtolower(substr($time_string, $i, 1));\n\n if ($character >= '0' && $character <= '9') {\n //append digit\n $current_group .= $character;\n } else {\n if (in_array($character, $valid_units)) {\n //time unit is valid\n if ($current_group != '') {\n //a number was specified, so append the \"group\" to the\n //result\n $current_group .= $character;\n $result .= $current_group;\n }\n }\n\n //looking for new entry\n $current_group = '';\n }\n }\n\n if ($result == '') {\n //no valid data, so use the default\n return $default;\n }\n\n return $result;\n}", "function gettimepattern($time) {\n if (preg_match('/\\d{1,2}:\\d{1,2}:\\d{2}[\\s]{0,1}[A|P]M/',$time)){\n $tmpattern = \"%r'\";\n }\n elseif (preg_match('/\\d{2}:\\d{2}[A|P]M/',$time)) {\n $tmpattern = \"%h:%i%p'\";\n }\n elseif (preg_match('/\\d{2}:\\d{2}[\\s][A|P]M/',$time)) {\n $tmpattern = \"%h:%i %p'\";\n }\n elseif (preg_match('/\\d{1}:\\d{2}[A|P]M/',$time)) {\n $tmpattern = \"%l:%i%p'\";\n }\n elseif (preg_match('/\\d{1}:\\d{2}[\\s][A|P]M/',$time)) {\n $tmpattern = \"%l:%i %p'\";\n }\n else {\n $tmpattern = \"%T'\";\n }\n \n return $tmpattern;\n }", "function convert_time($total)\n{\n return sprintf('%2d:%2d:%2d', intval($total/3600), intval($total/60) % 60, $total % 60);\n}", "function TidyTimeStampJustTime($str)\n{\n\t$date=strtok($str, \"T\");\n\t$time=strtok(\"T\");\n\t$finalTime=substr($time,0,5);\n\treturn $finalTime;\n}", "public function timeMid();", "function convertTime($number)\n{\n $str_arr = explode('.', $number);\n\n $num = ($str_arr[0]);\n //floatval\n $point = ($str_arr[1]);\n $count = strlen($str_arr[1]);\n\n if ($count == 1 && $point < 10) {\n $point = $point * 10;\n }\n\n while ($point >= 60) {\n $num = $num + 1;\n $point = $point - 60;\n }\n $t = floatval($num . \".\" . $point);\n\n return $t;\n}", "function changeMysqlTime ($mysql_time) {\n\n\t$mysql_year = substr($mysql_time, 0, 4);\n\t$mysql_month = substr($mysql_time, 5, 2);\n\t$mysql_day = substr($mysql_time, 8, 2);\n\n\t$mysql_hours = substr($mysql_time, 11, 2);\n\t$mysql_minutes = substr($mysql_time, 14, 2);\n\t$mysql_seconds = substr($mysql_time, 17, 2);\n\n\t$return = $mysql_day . \"/\" . $mysql_month . \" \" . $mysql_hours . ':' . $mysql_minutes;\n\n\treturn $return;\n}", "function rfc_3339($time)\n {\n return \\Carbon\\Carbon::createFromFormat('Y-m-d H:i:s', $time)->toRfc3339String();\n }", "public function formatTime($time = null);", "function time_compact_ap_format($hours,$minutes,$meridien){\r\n\t$patterns = array(\"am\",\"pm\",\"AM\",\"PM\");\r\n\t$replacements = array(\"a.m.\",\"p.m.\",\"A.M.\",\"P.M.\");\r\n\t\r\n\t$meridien = str_replace($patterns,$replacements,$meridien);\r\n\t\r\n\tif($minutes == \"00\") return sprintf(\"%s %s\",$hours,$meridien);\r\n\telse return sprintf(\"%s:%s %s\",$hours,$minutes,$meridien);\r\n}", "static function convertTime($s_time){\n\t\tif(is_numeric($s_time))\n\t\t\treturn (int) $s_time;\n\n\t\t$a_time = array(\n\t\t\t's' => 1,\n\t\t\t'm' => 60,\n\t\t\t'h' => 3600,\n\t\t\t'd' => 86400\n\t\t);\n\t\t$s_time = trim(strtolower($s_time));\n\t\t$s_char = substr($s_time, -1);\n\t\t$i = substr($s_time,0, -1);\n\t\treturn isset($a_time[$s_char]) ?\n\t\t\t$i*$a_time[$s_char]:\n\t\t\t$i;\n\t}", "function timeserial($hour,$minute=\"00\",$second=\"00\"){\n if ($hour==\"\") return \"\";\n return (strlen($hour)<2?\"0\":\"\").$hour.\":\".(strlen($minute)<2?\"0\":\"\").$minute.\":\".(strlen($second)<2?\"0\":\"\").$second;\n}", "public static function renderTime($time)\n {\n return floor($time / 60) . \" min \" . $time % 60 . \" secondes\";\n }", "protected function processTime($time)\n {\n return \\PHPExcel_Style_NumberFormat::toFormattedString($time,'hh:mm:ss');\n }", "public function formatTime($time) {\n\t\t$timestamp = strtotime($time);\n\t\treturn date(\"F d, Y - g:i A\", $timestamp);\n\t}", "function dbToUItime() {\r\n\r\n\t\t$hour = substr($this->event_date_time, -8, 2);\r\n\t\t$min = substr($this->event_date_time, -5, 2);\r\n\r\n\t\t$am_pm = \"AM\";\r\n\r\n\t\t//change hour based on certain conditions\r\n\t\t$hour = changeTo12hour($hour, $am_pm);\r\n\r\n\t\t$this->time = $hour . \":\" . $min . \" \" . $am_pm;\r\n\t}", "private function parseUTCTime($time){\n $r = \"\";\n $pattern = \"/^([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})Z$/\";\n if (preg_match($pattern, $time, $matches) === 1){\n $year = intval($matches[1]);\n $year = ($year >= 70 && $year <= 99) ? sprintf(\"19%02d\", $year) : sprintf(\"20%02d\", $year);\n $t = sprintf(\"%04d-%02d-%02d %02d:%02d:%02d\", $year, $matches[2], $matches[3], $matches[4], $matches[5], $matches[6]);\n $r = date(\"d.m.Y h:m:s\", strtotime($t));\n }\n return $r;\n }", "function TimeToSec($time) {\n\t$dot2 = strpos($time, ':');\n\tif($dot2 > 0) {\n\t\t$min = substr($time, 0, $dot2);\n\t\t$time = substr($time, $dot2+1);\n\t}\n\t\t\n\t$time = ($min * 60) + $time;\n\treturn $time;\n}", "protected static function formatTimeWithRandomBytes(string $time): string\n {\n return sprintf(static::FORMAT, $time, ...static::getConvertedRandomBytesForFormat());\n }", "function net_time($timestamp=NULL)\n{\n $ts = ($timestamp == NULL) ? time() : intval($timestamp);\n\n list($h,$m,$s) = split(':',gmdate('H:i:s',$ts));\n list($u,$ts) = ($timestamp == NULL) ? split(' ',microtime()) : array(0,0);\n\n $deg = $h * 15; // 0-345 (increments of 15)\n $deg = $deg + floor($m / 4); // 0-14\n\n $min = ($m % 4) * 15; // 0,15,30,45\n $min = $min + floor($s / 4); // 0-14\n\n $sec = ($s % 4) * 15; // 0,15,30,45\n $sec = $sec + ((60 * $u) / 4); // 0-14\n\n return sprintf('%d%s %02d\\' %02d\" NET',$deg,unichr(176),$min,$sec);\n}", "function heure_to_minute($time)\n\t{\n\t\t$time = explode(':', $time);\n\t\treturn ($time[0]*60) + $time[1];\n\t}", "public static function time_only($time) {\n\t\treturn Self::date_format($time, \"g:i A\");\n\t}", "public static function time12to24($time, $suffix = \"\")\n {\n $result = date(\"H:i\", strtotime($time)) . \" \" . $suffix;\n return $result;\n }", "function func_start_time_from_simple_military ( $in_military_time ///< The military time as an integer (100s are hours 0000 -> 2359).\n )\n {\n $time = abs ( intval ( $in_military_time ) );\n $hours = min ( 23, $time / 100 );\n $minutes = min ( 59, ($time - (intval ($time / 100) * 100)) );\n \n return sprintf ( \"%d:%02d:00\", $hours, $minutes );\n }", "function translate_time($t) {\n /* US only :)\n $a_times = array(\n '9:00' => '9am' , '9:45' => '9:45'\n , '10:00' => '10am', '10:15' =>'10:15', '10:30' =>'10:30', '10:45' => '10:45'\n , '11:00' => '11am', '11:15' =>'11:15', '11:30' =>'11:30', '11:45' => '11:45'\n , '12:00' => '12pm', '12:15' =>'12:15', '12:30' =>'12:30', '12:45' => '12:45'\n , '13:00' => '1pm', '13:15' => '1:15', '13:30' => '1:30', '13:45' => '1:45'\n , '14:00' => '2pm', '14:15' => '2:15', '14:30' => '2:30', '14:45' => '2:45'\n , '15:00' => '3pm', '15:15' => '3:15', '15:30' => '3:30', '15:45' => '3:45'\n , '16:00' => '4pm', '16:15' => '4:15', '16:30' => '4:30', '16:45' => '4:45'\n , '17:00' => '5pm', '17:15' => '5:15', '17:30' => '5:30', '17:45' => '5:45'\n , '18:00' => '6pm', '18:15' => '6:15'\n , '20:00' => '8pm', '22:00' => '10pm'\n );\n if (isset($a_times[$t])) return $a_times[$t];\n */\n return $t;\n }", "function convetDate($date, $time)\n{\n $tmp = explode(\"-\", $date);\n $newDate = $tmp[2] . '-' . $tmp[1] . '-' . $tmp[0] . ' ' . $time;\n return $newDate;\n}", "public function formatTime()\n { \n return sprintf('%02d:%02d:%02d', ($this->totaltime / 3600), \n ($this->totaltime / 60 % 60), $this->totaltime % 60); \n }", "public static function timeunit(/* Long */ $time) {\n if ($time == null)\n return '';\n $sec = (int) $time % 60;\n $min = (int) ($time / 60) % 60;\n $hours = (int) ($time / 3600);\n return \"$hours:\" . sprintf('%02d', $min) . ':' . sprintf('%02d', $sec);\n }", "protected function formatTime($time) {\n $year = date('Y');\n $date = null;\n $formattedTime = trim($time);\n $normalFormat = preg_match('/^([0-9]{1,2}) (\\S+) в ([0-9:]{5})/', $formattedTime, $date);\n if ($normalFormat) {\n $day = $date[1];\n $month = $this->formatMonth($date[2]);\n $hoursAndMinutes = $date[3];\n $formattedTime = \"{$year}-{$month}-{$day} {$hoursAndMinutes}\";\n } else {\n preg_match('/(\\S+) в ([0-9:]{5})/', $formattedTime, $date);\n $yearMonthDay = ($date[1] == 'сегодня')?date('Y-n-j'):date('Y-n-j', strtotime('yesterday'));\n $hoursAndMinutes = $date[2];\n $formattedTime = \"{$yearMonthDay} {$hoursAndMinutes}\";\n }\n\n return $formattedTime;\n }", "function makeTimeString($arg) {\n\t$left = $arg;\n\t//Day\n\t$days = floor($left / 86400);\n\t$left = $left % 86400;\n\t//Hour\n\t$hour = floor($left / 3600);\n\t$left = $left % 3600;\n\t//Mins\n\t$mins = floor($left / 60);\n\t\n\t//make strings\n\t$days = $days.\"d \";\n\t$hour = str_pad($hour, 2, \"0\", STR_PAD_LEFT).\"h \";\n\t$mins = str_pad($mins, 2, \"0\", STR_PAD_LEFT).\"m\";\n\n\treturn $days.$hour.$mins;\n}", "protected static function getTimeFromMicroTime(string $time): string\n {\n return substr($time, 11) . substr($time, 2, 3);\n }", "function getrsstime($d) \r\n{ \r\n $parts=explode(' ',$d); \r\n $month=$parts[2]; \r\n $monthreal=getmonth($month);\r\n $time=explode(':',$parts[4]); \r\n $date=\"$parts[3]-$monthreal-$parts[1] $time[0]:$time[1]:$time[2]\"; \r\n return $date;\r\n}", "function reservation_min_to_hours($value,$type=\"H:i\"){\n return gmdate($type,$value*60);\n}", "function acf_convert_time_to_php($time = '')\n{\n}", "protected function reformatTime($timeStr){\n\t\t$time = strtotime($timeStr);\n\t\t$weekName = $this->chineseWeek[date('w', $time)];\n\t\t$date = date('m-d', $time) . '(' . $weekName . ')';\n\t\t$hour = date('H', $time);\n\t\treturn compact('date', 'hour');\n\t}", "function msecsToTime($content)\n{\n\t$secs = floor($content / 1000);\n\t$mins = floor($secs / 60);\n\t$hours = floor($mins / 60);\n\t$secs = $secs % 60;\n\t$mins = $mins % 60; \n\tif (strlen($mins) < 2) $mins = \"0\" . $mins;\n\treturn \"$hours\" . \":\" . \"$mins\";\n}", "protected function ohBlahHours($value) {\n return (strlen($value) < 4 ? '0' . $value : $value);\n }", "static function convertToDBFormat($timeStr){\n\t\t$date = new DateTime();\n\t\t$time = Vtiger_Time_UIType::getTimeValueWithSeconds($timeStr);\n\t\t$dbInsertDateTime = DateTimeField::convertToDBTimeZone($date->format('Y-m-d').' '.$time);\n\t\treturn $dbInsertDateTime->format('H:i:s');\n\t}", "function display_time ( $time, $ignore_offset=0 ) {\n\tglobal $TZ_OFFSET;\n\t$hour = (int) ( $time / 10000 );\n\tif ( ! $ignore_offset )\n\t$hour += $TZ_OFFSET;\n\t$min = abs( ( $time / 100 ) % 100 );\n\t//Prevent goofy times like 8:00 9:30 9:00 10:30 10:00\n\tif ( $time < 0 && $min > 0 ) $hour = $hour - 1;\n\twhile ( $hour < 0 )\n\t$hour += 24;\n\twhile ( $hour > 23 )\n\t$hour -= 24;\n\tif ( $GLOBALS[\"TIME_FORMAT\"] == \"12\" ) {\n\t\t$ampm = ( $hour >= 12 ) ? \"pm\" : \"am\";\n\t\t$hour %= 12;\n\t\tif ( $hour == 0 )\n\t\t$hour = 12;\n\t\t$ret = sprintf ( \"%d:%02d%s\", $hour, $min, $ampm );\n\t} else {\n\t\t$ret = sprintf ( \"%d:%02d\", $hour, $min );\n\t}\n\treturn $ret;\n}", "function convertToHoursMins($time, $format = '%02d:%02d')\n{\n if ($time < 1) {\n return;\n }\n $hours = floor($time / 60);\n $minutes = ($time % 60);\n return sprintf($format, $hours, $minutes);\n}", "function standard_date_time3($date) {\n\t$timestamp = strtotime($date);\n\t$fdate=date('d-m-Y H:i A', $timestamp);\n\treturn $fdate;\n\t}", "function uiToDBtime() {\r\n\t\t\t\t\r\n\t\t//break time up into hours, minutes, seconds, and am or pm.\r\n\t\t$hour = (int)substr($this->time, -8, 2);\r\n\t\t$min = substr($this->time, -5, 2);\r\n\t\t$sec = \"00\";\r\n\t\t$am_pm = substr($this->time, -2, 2);\r\n\t\t\r\n\t\t//To reassemble into date-time format, must change hours to 24 hour time\r\n\t\t$hour = changeTo24hour($hour, $am_pm);\r\n\t\t\r\n\t\t//concatenate hours, minutes, and seconds together with colons inbetween for formatted time.\r\n\t\t$formattedTime = $hour . \":\" . $min . \":\" . $sec;\r\n\t\t\r\n\t\t//set object time to formatted time.\r\n\t\t$this->time = $formattedTime;\r\n\t}", "function format_traveltime($time) {\n\tglobal $message_hour, $message_min;\n\tif (is_null($time)) {\n\t\treturn null;\n\t} elseif ($time > 1) {\n\t\treturn round($time) . \" $message_hour\";\n\t} else {\n\t\treturn 5 * ceil($time * 60 / 5) . \" $message_min\";\n\t}\n}", "public function timeToStr( $time )\r\n\t{\r\n\t\t/* Atempt to convert string to long */\r\n\t\tif ( !is_int( $time ) ) {\r\n\t\t\tif ( preg_match( '/\\d*/' , $time ) ) \r\n\t\t\t\tsettype( $time , 'integer' );\r\n\t\t\telse \r\n\t\t\t return null;\t\r\n\t\t}\r\n\t\t\r\n\t\treturn date( 'm/d/Y h:i:s A' , $time );\r\n\t}", "private function GetTimeHHMM() : string {\n\t\t\t$dt = new DateTime();\n\t\t\t$dtz = new DateTimeZone(\"EUROPE/Berlin\");\n\t\t\t$dt->setTimezone($dtz);\n\t\t\treturn $dt->format(\"H:i\");\n\t\t}", "function sc_time_format($datetime){\n\treturn date('G:i', $datetime);\n}", "function formatTime($sec){\n if($sec > 100){\n $sec /= 60;\n if($sec > 100){\n $sec /= 60;\n return number_format($sec) . \" hr\";\n }\n return number_format($sec) . \" min\";\n }\n return number_format($sec) . \" sec\";\n}", "function intToTime($sec, $padHours = true, $padMins = true, $padSecs = true) \n{\n\t$hms = \"\";\n\n\t// do the hours first: there are 3600 seconds in an hour, so if we divide\n\t// the total number of seconds by 3600 and throw away the remainder, we're\n\t// left with the number of hours in those seconds\n\t$hours = intval(intval($sec) / 3600); \n\n\t// add hours to $hms (with a leading 0 if asked for)\n\t$hms .= ($padHours) ? str_pad($hours, 2, \"0\", STR_PAD_LEFT). \":\" : $hours. \":\";\n\n\t// dividing the total seconds by 60 will give us the number of minutes\n\t// in total, but we're interested in *minutes past the hour* and to get\n\t// this, we have to divide by 60 again and then use the remainder\n\t$minutes = intval(($sec / 60) % 60); \n\n\t// add minutes to $hms (with a leading 0 if needed)\n\t$hms .= ($padMins) ? str_pad($minutes, 2, \"0\", STR_PAD_LEFT). \":\" : $minutes. \":\";\n\n\t// seconds past the minute are found by dividing the total number of seconds\n\t// by 60 and using the remainder\n\t$seconds = intval($sec % 60); \n\n\t// add seconds to $hms (with a leading 0 if needed)\n\t$hms .= ($padSecs) ? str_pad($seconds, 2, \"0\", STR_PAD_LEFT) : $seconds;\n\n\t// done!\n\treturn $hms;\n\n}", "function toM($s) { \n $t = explode(\":\", $s); \n $h = settype($t[0], integer);\n $m = settype($t[1], integer);\n $mm = ($h * 60) + $m;\n return $mm;\n\t\t}", "private static function parseTime($time) {\n\t\tif (stristr($time, ' ')) list($date, $time) = explode(' ', $time);\n\t\tlist($hour, $minute, $second) = explode(':', $time);\n\t\t$ampm = 'a.m.';\n\t\tif ($hour > 11) $ampm = 'p.m.';\n\t\tif ($hour > 12) $hour -= 12;\n\t\t$hour -= 0;\n\t\treturn compact('hour', 'minute', 'ampm');\n\t}", "function Time($time){\r\n\r\n\t}", "function format_time($value, $event, $is_avg) {\n\tif ($event === \"333fm\" && $is_avg == false) return $value;\n\n\tif ($event === \"333mbf\") {\n\t\t$difference = 99 - intval(substr($value,-9,2));\n\t\t$missed = intval(substr($value,-1,2));\n\t\t$time = intval(substr($value,-7,5));\n\t\t$solved = $difference + $missed;\n\t\t$tried = $solved + $missed;\n\t\t$minutes = intval(intval($time) / 60);\n\t\t$seconds = intval($time) % 60;\n\t\tif ($minutes>0) $seconds = \"0\".$seconds;\n\t\treturn \"$solved/$tried $minutes:\".sprintf(\"%02d\",$seconds);\n\t}\n\n\t$minutes = intval(intval($value) / 6000);\n\t$seconds = (intval($value) % 6000) / 100;\n\n\tif ($minutes > 0) {\n\t\treturn \"$minutes:\".sprintf(\"%05.2f\",$seconds);\n\t}\n\n\treturn sprintf(\"%.2f\",$seconds);\n}", "function tstamptotime($tstamp) {\n // 1984-09-01T14:21:31Z\n sscanf($tstamp,\"%u-%u-%uT%u:%u:%uZ\",$year,$month,$day,\n $hour,$min,$sec);\n $newtstamp=mktime($hour,$min,$sec,$month,$day,$year);\n return $newtstamp;\n }", "function conv12to24($arg1) {\n\t\t//check if single hour, if so add a 0 in front\n\t\t$arr1 = explode(\":\",$arg1);\n\t\t$hour = $arr1[0];\n\t\tif(strlen($arr1[0]) == 1) {\n\t\t\t$hour = '0'.$hour;\n\t\t}\n\t\t//Check if am or pm\n\t\t$arr2 = str_split($arr1[1],2);\n\t\t$min = $arr2[0];\n\t\tif($arr2[1] == 'pm') {\n\t\t\t$hour += 12;\n\t\t}\n\t\treturn $hour.\":\".$min;\n\t}", "function translate_time( $experiment, $str ) {\n $str_trimmed = trim( $str );\n if( $str_trimmed == '' ) return null;\n switch( $str_trimmed[0] ) {\n case 'b':\n case 'B': return $experiment->begin_time();\n case 'e':\n case 'E': return $experiment->end_time();\n case 'm':\n case 'M': return LusiTime::minus_month();\n case 'w':\n case 'W': return LusiTime::minus_week();\n case 'd':\n case 'D': return LusiTime::minus_day();\n case 'y':\n case 'Y': return LusiTime::yesterday();\n case 't':\n case 'T': return LusiTime::today();\n case 'h':\n case 'H': return LusiTime::minus_hour();\n }\n $result = LusiTime::parse( $str_trimmed );\n if( is_null( $result )) $result = LusiTime::from64( $str_trimmed );\n return $result;\n}", "function buildTimeString($time_array)\n{\n return $time_array[\"tm_hour\"].':'.$time_array[\"tm_min\"].':'.$time_array[\"tm_sec\"];\n}", "function sec2hms ($sec, $padHours = false) \n {\n\n $hours = intval(intval($sec) / 3600);\n $minutes = intval(($sec / 60) % 60);\n $seconds = intval($sec % 60); \n\t\n\t\n $hms = ($padHours?str_pad($hours, 2, \"0\", STR_PAD_LEFT):$hours). ':'.\n\t\t\tstr_pad($minutes, 2, \"0\", STR_PAD_LEFT). ':'.\n\t\t\tstr_pad($seconds, 2, \"0\", STR_PAD_LEFT);\n\n return $hms;\n \n }", "function niceDate($time) {\n return date('M d, Y h:i a', strtotime($time)) . \" \";\n}", "function TimeToBase62Guid($time = '')\n {\n # Define $time as `Y-m-d H:i:s.u` format while the time string is empty (by default)\n if ($time == '')\n {\n $time = date('Y-m-d H:i:s.u');\n }\n\n # Remove quotation marks in the inputted time string\n $time = str_replace('\"', '', $time);\n $time = str_replace(\"'\", '', $time);\n\n # Append default microsecond value while there is no microsecond part in the inputted time string\n if (preg_match('/^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$/', $time))\n {\n $time .= '.000000';\n }\n else\n {\n # Return null while the inputted time string is not match neither `Y-m-d H:i:s` nor `Y-m-d H:i:s.u` format\n if (!preg_match('/^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}\\.\\d{1,6}$/', $time))\n {\n return null;\n }\n }\n\n # Divide the time string as second-and-longer and microsecond part\n $date = explode('.', $time)[0];\n $microtime = explode('.', $time)[1];\n\n # Convert the second-and-longer part to hexadecimal timestamp\n $timestampDec = strtotime($date);\n $timestampHex = dechex($timestampDec);\n\n # Append 0 to the microsecond part to make it 6-digit, converting it to hexadecimal, and prepend 0 to 1 to make it 6-digit again\n $microtimeDec = str_pad($microtime, 6, '0', STR_PAD_RIGHT);\n $microtimeHex = str_pad(dechex($microtimeDec), 6, '0', STR_PAD_LEFT);\n\n # Combine the two hexadecimal time string\n $prototHex = $timestampHex . $microtimeHex;\n\n # Convert the hexadecimal time string to base 62\n $base62 = gmp_strval(gmp_init($prototHex, 16), 62);\n\n # Prepend 0 to the base 62 time string to make it 10-digit\n $base62 = str_pad($base62, 10, '0', STR_PAD_LEFT);\n\n return $base62;\n }", "public function getTimeFormatter();", "function group_addTime($time, $addition)\r\n{\r\n $orgTime_0 = explode(' ', $time); \r\n\r\n $orgTime = explode('-', $orgTime_0[0]);\r\n $addTime = explode('-', $addition);\r\n\r\n for($i = 0; $i < 3; $i ++)\r\n {\r\n $new[$i] = $orgTime[$i] + $addTime[$i];\r\n }\r\n\r\n $return = implode('-', $new);\r\n if($orgTime_0[1]) $return .= ' ' . $orgTime_0[1];\r\n return $return;\r\n}", "function validate_time() {\n # Check the time is in ISO time format\n if (ereg('([0-9]{2}[: /.]([0-9]{2})[: /.]([0-9]{2})', $this->cur_val)) {\n # Remove any existing error message\n $this->error_message = \"\";\n\n # Return Value\n return $this->cur_val;\n }\n else {\n # Set Error Message\n $this->set_error(\"Validation for time ({$this->cur_val}) failed. This is type \" . gettype($this->cur_val));\n\n # Return Blank Time\n return \"00:00:00\";\n }\n }", "function DateTimeToInt ($s) {\n\tGlobal $iTimeType;\n\t\n\t$y = (int)substr($s, 0, 4);\t\t// year\n\t$m = (int)substr($s, 4, 2);\t\t// month\n\t$d = (int)substr($s, 6, 2);\t\t// day\n\t$h = (int)substr($s, 8, 2);\t\t// hour\n\t$n = (int)substr($s,10, 2);\t\t// minute\n\t\n\tif ($m < 1) $m = 1;\n\tif (12 < $m) $m = 12;\n\tif ($d < 1) $d = 1;\n\tif (31 < $d) $d = 31;\n\tif ($h < 0) $h = 0;\n\tif (23 < $h) $h = 23;\n\tif ($n < 0) $n = 0;\n\tif (59 < $n) $n = 59;\n\t\n\tif ($iTimeType == 1) {\n\t\t$z = (int)substr($s,12, 2);\t// second\n\t\tif ($y < 1970) $y = 1970;\n\t\tif (2037 < $y) $y = 2037;\n\t\tif ($z < 0) $z = 0;\n\t\tif (59 < $z) $z = 59;\n\t\treturn mktime($h,$n,$z,$m,$d,$y);\n\t}\n\t\n\t$y -= 2000;\n\tif ($y < 0) $y = 0;\n\tif (213 < $y) $y = 213;\n\treturn ($y*10000000)+((50+$m*50+$d)*10000) + ($h*100) + $n;\t// 3+3+2+2\n}", "function sec2hms ($sec, $padHours = false) \n {\n\n // start with a blank string\n $hms = \"\";\n \n $minutes = intval(($sec / 60) % 60); \n\n // add minutes to $hms (with a leading 0 if needed)\n $hms .= str_pad($minutes, 2, \"0\", STR_PAD_LEFT). \":\";\n\n // seconds past the minute are found by dividing the total number of seconds\n // by 60 and using the remainder\n $seconds = intval($sec % 60); \n\n // add seconds to $hms (with a leading 0 if needed)\n $hms .= str_pad($seconds, 2, \"0\", STR_PAD_LEFT);\n\n // done!\n return $hms;\n \n }" ]
[ "0.71102345", "0.6962839", "0.6711381", "0.6686256", "0.6601823", "0.65190905", "0.65145236", "0.65109605", "0.649926", "0.64447546", "0.639491", "0.637864", "0.6365775", "0.6347314", "0.6306025", "0.6298372", "0.62940764", "0.628181", "0.6281184", "0.62802505", "0.6277497", "0.6247091", "0.6240519", "0.6233741", "0.6213663", "0.61765397", "0.6171888", "0.617029", "0.6160623", "0.61446077", "0.6138018", "0.6135153", "0.60560316", "0.6050453", "0.6049656", "0.60208994", "0.6018992", "0.60084933", "0.5989929", "0.59780926", "0.5958952", "0.59523755", "0.5941024", "0.592929", "0.5910597", "0.5908711", "0.58939034", "0.58805394", "0.58537316", "0.5845946", "0.5844207", "0.58431584", "0.5840432", "0.5829708", "0.5808259", "0.5797603", "0.57938474", "0.57900584", "0.5789846", "0.5761082", "0.5750721", "0.574722", "0.57435554", "0.5736637", "0.5729095", "0.57153857", "0.5705443", "0.5690069", "0.56816864", "0.568111", "0.5678303", "0.56742615", "0.5669134", "0.5652423", "0.56508756", "0.5644391", "0.5636173", "0.56353146", "0.563352", "0.5621117", "0.55980337", "0.55844635", "0.5544486", "0.5532268", "0.5529536", "0.552124", "0.55185395", "0.5508821", "0.5506266", "0.55032146", "0.5502489", "0.55007666", "0.5500257", "0.5499136", "0.5495996", "0.5495585", "0.548627", "0.5480195", "0.547555", "0.54748726" ]
0.801905
0
/ Add discovery process.
protected function _addDiscoveryProcess() { if (empty($this->_server)) { throw new Exception('init failed'); } $process = new SwooleProcess([ $this, 'onDiscoveryProcessAdd' ]); $this->setProcess($process); $this->_server->addProcess($process); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function buildDiscovery();", "public function discover () {\n\t\techo \"They can only discover\";\n\t}", "public function addCachedDiscovery(CachedDiscoveryInterface $cached_discovery);", "function wp_oembed_add_discovery_links()\n {\n }", "protected function listen()\n {\n // Set time limit to indefinite execution\n set_time_limit (0);\n\n $this->socket = socket_create(\n AF_INET,\n SOCK_DGRAM,\n SOL_UDP\n );\n\n if (!is_resource($this->socket))\n {\n $this->logger->log(\"Failed to create a socket for the discovery server. The reason was: \" .\n socket_strerror(socket_last_error()));\n }\n\n if (!@socket_bind(\n $this->socket,\n $this->config->getSetting('discovery-address'),\n $this->config->getSetting('discovery-port')))\n {\n $this->logger->log(\"Failed to bind to socket while initialising the discovery server.\");\n }\n\n // enter an infinite loop, waiting for data\n $data = '';\n while (true)\n {\n if (@socket_recv($this->socket, $data, 9999, MSG_WAITALL))\n {\n $this->logger->log(\"Discovery server received the following: $data\");\n\n $this->handleMessage($data);\n }\n }\n }", "abstract protected function createDiscovery(array $initializers = array());", "public function process(ContainerBuilder $container)\n {\n if (!$container->has('ho_peter1018.service_helper.services.registry_registry')) {\n return;\n }\n $definition = $container->findDefinition('ho_peter1018.service_helper.services.registry_registry');\n\n // find all service IDs with the ho_peter1018.service_helper.services.registry_pool tag\n $taggedServices = $container->findTaggedServiceIds('ho_peter1018.service_helper.services.registry_pool');\n\n foreach ($taggedServices as $id => $tags) {\n // add the service to the registry service\n $definition->addMethodCall('add', [$id, new Reference($id), $tags]);\n }\n }", "function discover_install() {\n\t\t$installer =& JInstaller::getInstance();\n\t\t$eid = JRequest::getVar('eid',0);\n\t\tif (is_array($eid) || $eid) {\n\t\t\tif (!is_array($eid)) {\n\t\t\t\t$eid = Array($eid);\n\t\t\t}\n\t\t\tJArrayHelper::toInteger($eid);\n\t\t\t$app =& JFactory::getApplication();\n\t\t\t$failed = false;\n\t\t\tforeach($eid as $id) {\n\t\t\t\t$result = $installer->discover_install($id);\n\t\t\t\tif (!$result) {\n\t\t\t\t\t$failed = true;\n\t\t\t\t\t$app->enqueueMessage(JText::_('Discover install failed').': '. $id);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->setState('action', 'remove');\n\t\t\t$this->setState('name', $installer->get('name'));\n\t\t\t$this->setState('message', $installer->message);\n\t\t\t$this->setState('extension_message', $installer->get('extension_message'));\n\t\t\tif (!$failed) $app->enqueueMessage(JText::_('Discover install successful'));\n\t\t} else {\n\t\t\t$app =& JFactory::getApplication();\n\t\t\t$app->enqueueMessage(JText::_('No extension selected'));\n\t\t}\n\t}", "public function discover($url)\n {\n }", "public function discovery()\n {\n return $this->discovery;\n }", "protected function add() {\n\t}", "public function onSpeakersAdd()\n\t{\n\t\t$this->onTaskAdd();\n\t}", "public function onEventAdd()\n\t{\n\t\t$this->onTaskAdd();\n\t}", "public function add(ProcessDefinition $definition);", "public function add()\n {\n foreach ($this->filters as $filter) {\n call_user_func_array($this->addCallback, $filter);\n }\n }", "public function startListening();", "public function prepareDiscoverInstall()\n\t{\n\t\t$client = ApplicationHelper::getClientInfo($this->parent->extension->client_id);\n\t\t$manifestPath = $client->path . '/modules/' . $this->parent->extension->element . '/' . $this->parent->extension->element . '.xml';\n\t\t$this->parent->manifest = $this->parent->isManifest($manifestPath);\n\t\t$this->parent->setPath('manifest', $manifestPath);\n\t\t$this->setManifest($this->parent->getManifest());\n\t}", "private function registerServices() {\n // Modules\n $this->addService('modules', 'MyTravel\\Core\\Service\\Modules::setService');\n // Routing\n $this->addService('routing', 'MyTravel\\Core\\Service\\Routing::setService');\n // Event dispatcher\n $this->serviceContainer\n ->register('events', 'Symfony\\Component\\EventDispatcher\\EventDispatcher');\n // Database\n $this->addService('db', 'MyTravel\\Core\\Service\\Db::setService');\n // Access\n $this->addService('access', 'MyTravel\\Core\\Service\\Access::setService');\n }", "public function start() {\r\n\t\tparent::start ();\r\n\t\tif (( string ) $this->data->ipaddr == 'dhcp') {\r\n\t\t\t$this->enableDHCP ();\r\n\t\t}\r\n\t}", "public function add()\n\t{\n\t\t// Only add the events if we are on that controller\n\t\tif (Router::$controller == 'main')\n\t\t{\n\t\t\tEvent::add('ushahidi_filter.view_pre_render.layout', array($this, 'add_requirements'));\n\t\t\t\n\t\t\tEvent::add('ushahidi_action.header_scripts', array($this, '_main_js'));\n\t\t\tEvent::add('ushahidi_action.map_main_filters', array($this, '_button'));\n\t\t}\n\t}", "function addProcess (&$processCallback) {\n\t\t$this->_processCallbacks[] =& $processCallback;\n\t}", "public function run()\n {\n Service::create([\n 'name'=>'consultation'\n ]);\n Service::create([\n 'name'=>'operation'\n ]);\n }", "public function process(ContainerBuilder $container)\n {\n $services = $container->findTaggedServiceIds('find_me');\n\n /** @var OptionalRegistry $seeker */\n $seeker = $container->get('seeker');\n\n foreach($services as $service){\n $seeker->addDependency(new OptionalDependency());\n }\n }", "public function register_services(): void {\n\t\t// Bail early so we don't instantiate services twice.\n\t\tif ( \\count( $this->service_container ) > 0 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Add the injector as the very first service.\n\t\t$this->service_container->put(\n\t\t\tstatic::SERVICE_PREFIX . static::INJECTOR_ID,\n\t\t\t$this->injector\n\t\t);\n\n\t\t$services = $this->get_service_classes();\n\n\t\tif ( $this->enable_filters ) {\n\t\t\t/**\n\t\t\t * Filter the default services that make up this plugin.\n\t\t\t *\n\t\t\t * This can be used to add services to the service container for\n\t\t\t * this plugin.\n\t\t\t *\n\t\t\t * @param array<string, string> $services Associative array of identifier =>\n\t\t\t * class mappings. The provided\n\t\t\t * classes need to implement the\n\t\t\t * Service interface.\n\t\t\t */\n\t\t\t$filtered_services = apply_filters(\n\t\t\t\tstatic::HOOK_PREFIX . static::SERVICES_FILTER,\n\t\t\t\t$services\n\t\t\t);\n\n\t\t\t$services = $this->validate_services( $filtered_services );\n\t\t}\n\n\t\twhile ( null !== key( $services ) ) {\n\t\t\t$id = $this->maybe_resolve( key( $services ) );\n\n\t\t\t$class = $this->maybe_resolve( current( $services ) );\n\n\t\t\t// Delay registering the service until all requirements are met.\n\t\t\tif (\n\t\t\t\tis_a( $class, HasRequirements::class, true )\n\t\t\t) {\n\t\t\t\tif ( ! $this->requirements_are_met( $id, $class, $services ) ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$this->schedule_potential_service_registration( $id, $class );\n\n\t\t\tnext( $services );\n\t\t}\n\t}", "public function run()\n {\n $advertisements = factory(Advertisement::class, 5)->create();\n }", "protected function add()\n {\n $this->numArgs = $this->findNumArgs($this->callback);\n if (is_string($this->callback) && class_exists($this->callback)) {\n $this->useCallbackManager('invoke', $this->callback);\n }\n foreach ((array) $this->hook as $hook) {\n \\add_filter($hook, $this->callback, $this->priority, $this->numArgs);\n }\n }", "public function announce();", "public function run()\n {\n factory(Ospiti::class, 10) -> create();// create server per INSERIRE I DATI NEL DATABASE\n }", "function start()\n{\n global $ipfsutils, $staticFile, $urlpath, $avahi_type, $avahi_port, $avahi_desc;\n $ret = execute_program_detached($ipfsutils.\" startDaemon $avahi_port $avahi_type\");\n //$output = ptxt(\" \". print_r($ret['output'][0],1));\n\n // Announce the IPFS instance to the community cloud via any of the\n // available methods -including IPFS itself, if enabled-\n $pub_res = avahi_publish($avahi_type, $avahi_desc, $avahi_port, null);\n\n setFlash(txt(t('ipfs_flash_publish')) . ptxt($pub_res));\n return(array('type'=>'redirect','url'=>$staticFile.$urlpath));\n}", "public function process(ContainerBuilder $container):void \n {\n $definition = $container->findDefinition(FactoryBuilderInterface::class);\n $taggedServices = $container->findTaggedServiceIds(FactoryInterface::TAG_NAME);\n foreach ($taggedServices as $id => $tags) {\n $definition->addMethodCall('addFactory', [new Reference($id)]);\n }\n }", "public function addProcessor(array $configuration);", "abstract public function install_OSF_Drupal();", "function configure()\n\t{\n\n\t\t$this->setMetaData('provider',\n\t\t\tarray(\n\t\t\t\t'Name' =>\n\t\t\t\t\t'Natural History Museum', \n\t\t\t\t'Implementation'=>\n\t\t\t\t\t'KE Software EMu, \n\t\t\t\t\tPHP KE EMu DiGIR Interface',\n\t\t\t\t'AccessPoint' => 'default',\n\t\t\t)\n\t\t);\n\t\t$this->setMetaData('host',\n\t\t\tarray(\n\t\t\t\t'Name' =>\n\t\t\t\t\t'Natural History Museum (NHM)',\n\t\t\t\t'Code' => 'NHM',\n\t\t\t\t'RelatedInformation' =>\n\t\t\t\t\t'',\n\t\t\t\t'Abstract' =>\n\t\t\t\t\t'Data provider via EMu/DiGIR',\n\t\t\t)\n\t\t);\n\n\t\t// add contacts to host\n\t\t$this->setMetaData('host contact',\n\t\t\tarray(\n\t\t\t\t'Type' => 'Administrative',\n\t\t\t\t'Name' => '',\n\t\t\t\t'Title' => '',\n\t\t\t\t'Email' => '',\n\t\t\t\t'Phone' => '',\n\t\t\t)\n\t\t);\n\n\t\t$this->setMetaData('host contact',\n\t\t\tarray(\n\t\t\t\t'Type' => 'Technical',\n\t\t\t\t'Name' => '',\n\t\t\t\t'Title' => '',\n\t\t\t\t'Email' => '',\n\t\t\t\t'Phone' => '',\n\t\t\t)\n\t\t);\n\n\t\t // add a resource\n\t\t$this->setMetadata('resource',\n\t\t\tarray(\n\t\t\t\t'Name' => 'NHM Collections',\n\t\t\t\t'Code' => 'NhmEMu',\n\t\t\t\t'RelatedInformation' => \n\t\t\t\t\t'',\n\t\t\t\t'Abstract' =>\n\t\t\t\t\t'',\n\t\t\t\t'Keywords' => '',\n\t\t\t\t'Citation' \n\t\t\t\t\t=> 'Not for publication - test data only',\n\t\t\t\t'UseRestrictions' \n\t\t\t\t\t=> '',\n\t\t\t\t'ConceptualSchema' \n\t\t\t\t\t=> 'http://digir.net/schema/conceptual/darwin/2003/1.0',\n\t\t\t\t'SchemaLocation' \n\t\t\t\t\t=> 'http://digir.sourceforge.net/schema/conceptual/darwin/full/2003/1.0/darwin2full.xsd',\n\t\t\t\t'RecordIdentifier' => 'NhmEMu',\n\t\t\t\t'RecordBasis' => '',\n\t\t\t\t'NumberOfRecords' => '23',\n\t\t\t\t'DateLastUpdated' => '1970-01-01 00:00:00.00Z',\n\t\t\t\t'MinQueryTermLength' => '0',\n\t\t\t\t'MaxSearchResponseRecords' => '1000',\n\t\t\t\t'MaxInventoryResponseRecords' => '1000',\n\t\t\t)\n\t\t);\n\n\t\t// add any contacts to this resource\n\t\t$this->setMetaData('resource contact',\n\t\t\tarray(\n\t\t\t\t'Type' => 'Administrative',\n\t\t\t\t'Name' => '',\n\t\t\t\t'Title' => '',\n\t\t\t\t'Email' => '',\n\t\t\t\t'Phone' => '',\n\t\t\t)\n\t\t);\n\t\t$this->setMetaData('resource contact',\n\t\t\tarray(\n\t\t\t\t'Type' => 'Technical',\n\t\t\t\t'Name' => '',\n\t\t\t\t'Title' => '',\n\t\t\t\t'Email' => '',\n\t\t\t\t'Phone' => '',\n\t\t\t)\n\t\t);\n\n\n\t\t// if any simple mappings - specify them here - if here then\n\t\t// not required to write specific translation code for them in\n\t\t// generateValue or generateTexql methods \n\t\t// (these should mostly be purpose built darwin fields in\n\t\t// catalogue)\n\n\t\t$this->setSimpleMapping('Kingdom','DarKingdom');\n\t\t$this->setSimpleMapping('Phylum','DarPhylum');\n\t\t$this->setSimpleMapping('Class','DarClass');\n\t\t$this->setSimpleMapping('Order','DarOrder');\n\t\t$this->setSimpleMapping('Family','DarFamily');\n\t\t$this->setSimpleMapping('Genus','DarGenus');\n\t\t$this->setSimpleMapping('Species','DarSpecies');\n\t\t$this->setSimpleMapping('Subspecies','DarSubspecies');\n\t\t$this->setSimpleMapping('ScientificName','DarScientificName');\n\t\t$this->setSimpleMapping('TypeStatus','DarTypeStatus');\n\t\t$this->setSimpleMapping('IdentifiedBy','DarIdentifiedBy');\n\t\t$this->setSimpleMapping('Collector','DarCollector');\n\t\t$this->setSimpleMapping('Country','DarCountry');\n\t\t$this->setSimpleMapping('StateProvince','DarStateProvince');\n\t\t$this->setSimpleMapping('County','DarCounty');\n\t\t$this->setSimpleMapping('CatalogNumber','DarCatalogNumber');\n\t\t$this->setSimpleMapping('Locality','DarLocality');\n\t\t$this->setSimpleMapping('Latitude','DarLatitude');\n\t\t$this->setSimpleMapping('Longitude','DarLongitude');\n\t\t// any fields NOT specified above should be coded into localised\n\t\t// generateValue and generateTexql methods\n\t\t\n\t}", "protected function registerSystem() { }", "public function processApi()\n\t\t{\n\t\t\t$this->createEntry();\n\t\t}", "public function reg(){\n\t\tServer::getInstance()->getCommandMap()->register($this->getPlugin()->getName(), $this);\n\t}", "protected function addAdminServices()\n {\n $this->container->SefLinks = function ($container) {\n return new SefLinks($container);\n };\n }", "public function getDiscovery() {\n return $this->discovery;\n }", "public function registerServices() {\n\t\t$services = $this->getServices();\n\t\t$services = array_map( [ $this, 'instantiateServices' ], $services );\n\t\t\n\t\tarray_walk( $services, function ( Service $service ) {\n\t\t\t$service->register();\n\t\t} );\n\t}", "public function process(ContainerBuilder $container): void\n {\n if (! $container->has(self::SERVICE_NAME)) {\n return;\n }\n\n $definition = $container->findDefinition(self::SERVICE_NAME);\n\n $taggedServices = $container->findTaggedServiceIds(self::TAG_NAME);\n $listeners = [];\n\n foreach ($taggedServices as $id => $tags) {\n $listeners[] = new Reference($id);\n }\n\n $definition->addMethodCall('register', [$listeners]);\n }", "public function run()\n {\n $services = [\n [\"type\" =>'wifi'],\n [\"type\" =>'posto auto'],\n [\"type\" =>'piscina'],\n [\"type\" =>'sauna'],\n [\"type\" =>'vista mare'],\n [\"type\" =>'reception']\n ];\n \n foreach($services as $service){\n $newService = new Service;\n $newService -> fill($service) -> save();\n }\n }", "public function addServer($host, $port, $weight = 0) {}", "public function start()\n {\n try {\n $this->registerProvider(Dependents::class);\n $route = Router::match();\n $response = $this->startAction($route);\n }\n catch (\\Throwable $e) {\n $response = $this->handleException($e);\n }\n catch (\\Exception $e) {\n $response = $this->handleException($e);\n }\n\n if ($response instanceof Response) {\n $this->accept($response);\n }\n }", "public function process(ContainerBuilder $container)\n {\n if (!$container->has(PlaylistManager::class)) {\n return;\n }\n\n $definition = $container->findDefinition(PlaylistManager::class);\n\n // find all service IDs with the app.mail_transport tag\n $taggedServices = $container->findTaggedServiceIds('playlist.generator');\n\n foreach ($taggedServices as $id => $tags) {\n // add the transport service to the TransportChain service\n $definition->addArgument(new Reference($id));\n }\n }", "public function add($host)\n {\n $this->hosts[] = $host;\n }", "public function process(ContainerBuilder $container)\n {\n if (!$container->has($this->registry)) {\n return;\n }\n\n $definition = $container->findDefinition($this->registry);\n $taggedServices = $container->findTaggedServiceIds($this->tag);\n\n foreach ($taggedServices as $id => $tags) {\n $arguments = [new Reference($id)];\n if ($this->withPriority) {\n $arguments[] = $this->resolvePriority($tags);\n }\n $definition->addMethodCall($this->method, $arguments);\n }\n }", "public function addContainerServices()\n {\n $this->replaceParamsObject();\n\n $this->addCommonServices();\n\n if ( $this->container->platform->isBackend() )\n {\n $this->addAdminServices();\n }\n else\n {\n $this->addSiteServices();\n }\n }", "public function process(ContainerBuilder $container)\n {\n if (!$container->hasDefinition('bankiru_api.client_registry')) {\n return;\n }\n\n $registry = $container->getDefinition('bankiru_api.client_registry');\n\n $clients = $container->findTaggedServiceIds('rpc_client');\n\n foreach ($clients as $id => $tags) {\n foreach ($tags as $tag => $attributes) {\n $registry->addMethodCall('add', [$attributes['client_name'], new Reference($id)]);\n }\n }\n }", "public function start () {\n $this->cache = new Memcache;\n $this->cache->addServer($this->server, $this->port);\n }", "public function prepareDiscoverInstall()\n\t{\n\t\t$client = ApplicationHelper::getClientInfo($this->extension->client_id);\n\t\t$basePath = $client->path . '/plugins/' . $this->extension->folder;\n\n\t\tif (is_dir($basePath . '/' . $this->extension->element))\n\t\t{\n\t\t\t$manifestPath = $basePath . '/' . $this->extension->element . '/' . $this->extension->element . '.xml';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// @deprecated 4.0 - This path supports Joomla! 1.5 plugin folder layouts\n\t\t\t$manifestPath = $basePath . '/' . $this->extension->element . '.xml';\n\t\t}\n\n\t\t$this->parent->manifest = $this->parent->isManifest($manifestPath);\n\t\t$this->parent->setPath('manifest', $manifestPath);\n\t\t$this->setManifest($this->parent->getManifest());\n\t}", "public function discover(): Discover {\n $cacheKey = 'discover';\n if ($this->cache->exists($cacheKey)) return $this->cache->handleDiscover($cacheKey);\n $query = [\n 'count' => 30,\n 'from_page' => 'fyp',\n 'noUser' => 0,\n 'userId' => ''\n ];\n $req = $this->sender->sendApi('/node/share/discover', 'www', $query);\n $response = new Discover;\n $response->setMeta($req);\n if ($response->meta->success) {\n $response->setItems(\n $req->data->body[0]->exploreList,\n $req->data->body[1]->exploreList,\n $req->data->body[2]->exploreList\n );\n $this->cache->set($cacheKey, $response->toJson());\n }\n return $response;\n }", "public function add()\n\t{\n\t\tEvent::add('ushahidi_filter.map_base_layers', array($this, '_add_layer'));\n\t\tif (Router::$controller != 'settings')\n\t\t{\n\t\t\tEvent::add('ushahidi_filter.map_layers_js', array($this, '_add_map_layers_js'));\n\t\t}\n\t}", "public function onAwardnominationsAdd()\n\t{\n\t\t$this->onTaskAdd();\n\t}", "public function onDaysAdd()\n\t{\n\t\t$this->onTaskAdd();\n\t}", "public function startup();", "protected static function register() {}", "public function add_new_feed(){\n\t\tadd_feed( 'wptticsfeeds', array( $this, 'generate_feed' ) );\n\t}", "function insta_f_install(){\n}", "public function startServices()\n\t{\n\t\t/** store service connections for use, as needed, by the application */\n\t\t$this->service_connection = array();\n\n\t\t/** store connection messages */\n\t\t$this->message = array();\n\n\t\t/** start services in this sequence */\n\t\t$services = simplexml_load_file(CONFIGURATION_FOLDER . '/Application/services.xml');\n\n\t\tforeach ($services->service as $item) {\n\t\t\t$connectionSucceeded = true;\n\t\t\t$connection = '';\n\n\t\t\t/** class name */\n\t\t\t$entry = (string)$item . 'Service';\n\t\t\t$folder = (string)$item;\n\t\t\t$serviceClass = 'Molajo\\\\Service\\\\Services\\\\' . $folder . '\\\\' . $entry;\n\n\t\t\t/** method name */\n\t\t\t$serviceMethod = 'getInstance';\n\n\t\t\t/** trap errors for missing class or method */\n\t\t\tif (class_exists($serviceClass)) {\n\t\t\t\tif (method_exists($serviceClass, $serviceMethod)) {\n\n\t\t\t\t} else {\n\t\t\t\t\t$connectionSucceeded = false;\n\t\t\t\t\t$connection = $serviceClass . '::' . $serviceMethod . ' Class Method does not exist';\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$connectionSucceeded = false;\n\t\t\t\t$connection = $serviceClass . ' Class does not exist';\n\t\t\t}\n\n\t\t\t/** make service connection */\n\t\t\tif ($connectionSucceeded == true) {\n\t\t\t\ttry {\n\t\t\t\t\t$connection = $serviceClass::$serviceMethod();\n\n\t\t\t\t} catch (\\Exception $e) {\n\t\t\t\t\t$connectionSucceeded = false;\n\t\t\t\t\t$connection = 'Fatal Error: ' . $e->getMessage();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/** store connection or error message */\n\t\t\tif ($connectionSucceeded == false) {\n\t\t\t\techo 'service failed for ' . $entry . '<br />';\n\t\t\t}\n\t\t\t$this->set($entry, $connection, $connectionSucceeded);\n\n\t\t}\n\n\t\tforeach ($this->message as $message) {\n\t\t\tServices::Profiler()->set($message, LOG_OUTPUT_SERVICES, VERBOSE);\n\t\t}\n\n\t\treturn true;\n\t}", "public function _register()\n {\n }", "abstract protected function loadDiscoveryFromStorage(EditableDiscovery $discovery, array $initializers = array());", "public function setup()\n {\n\n $sock = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);\n socket_set_option($sock, SOL_SOCKET, SO_BROADCAST, 1);\n socket_set_option($sock, SOL_SOCKET, SO_RCVTIMEO, array(\"sec\"=>1, \"usec\"=>0));\n $MSG = \"hello\";\n socket_sendto($sock, $MSG, strlen($MSG), MSG_EOR, '255.255.255.255', 8686);\n socket_recvfrom($sock, $buf, 1000, 0, $addr, $port);\n socket_close($sock);\n\n if(preg_match(\"/^(\\d+\\.\\d+\\.\\d+\\.\\d+):(\\d+)$/i\", $buf, $ms)) {\n echo \"Server found at $ms[1]:$ms[2]\\n\";\n $this->tcpClient = new TcpClient($ms[1], $ms[2]);\n $this->login( $this->tcpClient );\n } else {\n throw new SPSException(\"Can not login on ikarus master-slave server. Please run it first\", -88);\n }\n }", "public static function loadPersistentServices()\n {\n $handlers = ModUtil::getVar(self::HANDLERS, 'definitions', array());\n if (!$handlers) {\n return;\n }\n\n foreach ($handlers as $id => $handler) {\n self::$serviceManager->registerService(new Zikula_ServiceManager_Service($id, $handler['definition'], $handler['shared']));\n }\n }", "function add() {\n\n\t\t/**\n\t\t * Check if DNS module is enabled.\n\t\t * Call \"Module\" component to check.\n\t\t * 'DNS' is the module name (check in database).\n\t\t */\n\t\t$this->Module->check('DNS');\n\n\t\t/**\n\t\t * Check if maintenance is on.\n\t\t * Call the \"Maintenance\" component to check.\n\t\t */\n\t\t$this->Maintenance->check();\n\n\t\t/**\n\t\t * Check if subdomain quota is not over.\n\t\t * If yes, the user see an error message.\n\t\t * Call the \"Quota\" component to check.\n\t\t */\n\t\t$this->Quota->check('Subdomain', 'subdomain');\n\n\t\tif (!empty($this->data)) {\n\n\t\t\t/**\n\t\t\t * Select the user ID of the domain owner.\n\t\t\t * @var array\n\t\t\t */\n\t\t\t$conditionUserId = array('conditions' => array('Domain.id' => $this->params['data']['Subdomain']['domain_id']));\n\t\t\t$queryUserDomainId = $this->Subdomain->Domain->find('first', $conditionUserId);\n\t\t\t\n\t\t\t/**\n\t\t\t * Split the subdomain string in an array. \n\t\t\t * @var array\n\t\t\t */\n\t\t\t$analyze = explode('.', $this->data['Subdomain']['name']);\n\n\t\t\t/**\n\t\t\t * Check if the domain name in the subdomain is the same than the domain name selected in the domains list.\n\t\t\t */\n\t\t\tif (isset($analyze['1']) && isset($analyze['2']) && $analyze['1'] . '.' . $analyze['2'] != $queryUserDomainId['Domain']['name']) {\n\t\t\t\t$this->Session->setFlash(__d('domain', 'Wrong domain name used in the subdomain name string.', true), 'default', array('class' => 'error'));\n\t\t\t\t$this->redirect(array('action' => 'add'));\n\t\t\t}\n\n\t\t\t$this->Subdomain->create();\n\n\t\t\t/**\n\t\t\t * Save new subdomain.\n\t\t\t */\n\t\t\tif ($this->Subdomain->save($this->data)) {\n\n\t\t\t\t/**\n\t\t\t\t * Insert the create action in the \"robot\" table.\n\t\t\t\t * The Perl robot will check in this table.\n\t\t\t\t */\n\t\t\t\t$this->Robot->insert($this->data['Subdomain']['name'], 'SUBDOMAIN', $this->Auth->user('name'), $this->Auth->user('email'), $this->data['Subdomain']['domain_id'], NULL, 1);\n\n\t\t\t\t/**\n\t\t\t\t * Insert the create action in the \"logs\" table.\n\t\t\t\t */\n\t\t\t\t$this->Logs->insert($this->Auth->user('id'), '<strong>[ ' . $this->data['Subdomain']['name'] . ' ]</strong> ' . __d('domain', 'The subdomain has been saved.', true) , 'DNS', $_SERVER[\"REMOTE_ADDR\"]);\n\n\t\t\t\t/**\n\t\t\t\t * Save the user ID.\n\t\t\t\t */\n\t\t\t\t$this->Subdomain->saveField('user_id', $this->Auth->user('id'));\n\n\t\t\t\t/**\n\t\t\t\t * If the new subdomain is saved, a success message is displayed.\n\t\t\t\t * Redirect to the index page.\n\t\t\t\t */\n\t\t\t\t$this->Session->setFlash(__d('domain', 'The subdomain has been saved.', true));\n\t\t\t\t$this->redirect(array('action' => 'index'));\n\n\t\t\t} else {\n\t\t\t\t/**\n\t\t\t\t * If the subdomain is not saved, an error message is displayed.\n\t\t\t\t */\n\t\t\t\t$this->Session->setFlash(__d('domain', 'The subdomain has not been saved.', true), 'default', array('class' => 'error'));\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Select all domains who belongs to the user.\n\t\t * Select by user ID.\n\t\t * @var array\n\t\t */\n\t\t$conditions = array('conditions' => array('Domain.user_id' => $this->Auth->user('id')));\n\t\t$domains = $this->Subdomain->Domain->find('list', $conditions);\n\n\t\t/**\n\t\t * Put all domains in \"$domains\".\n\t\t * $domains will be available in the view.\n\t\t */\n\t\t$this->set(compact('domains'));\n\n\t}", "protected function registerServices()\n {\n\n $di = new FactoryDefault();\n\n /**\n * Read services\n */\n include CORE_PATH . \"/config/services.php\";\n\n /**\n * Get config service for use in inline setup below\n */\n $config = $di->getConfig();\n\n\n include CORE_PATH . '/config/loader.php';\n\n \n\n $this->setDI($di);\n }", "public static function register_services()\n {\n foreach ( self::get_services() as $class ) {\n $service = self::instantiate( $class );\n if ( method_exists( $service, 'register' ) ) {\n $service->register();\n }\n }\n }", "protected function registered()\n {\n //\n }", "public static function register_services()\n {\n foreach (self::get_services() as $class) {\n $service = self::instantiate($class);\n if (method_exists($service, 'register')) {\n $service->register();\n }\n }\n }", "public function register(){}", "public function onSessiontypesAdd()\n\t{\n\t\t$this->onTaskAdd();\n\t}", "public function newImportProcesses()\n {\n \n }", "public function register() {}", "function install($data='') {\n subscribeToEvent($this->name, 'SAY');\n parent::install();\n }", "public function process(ContainerBuilder $container)\n {\n foreach ($container->findTaggedServiceIds(MakeCommandRegistrationPass::MAKER_TAG) as $id => $tags) {\n $defn = $container->getDefinition($id);\n $defn->setPublic(true);\n }\n }", "abstract public function boot();", "abstract public function boot();", "abstract public function boot();", "abstract public function boot();", "public static function register_services()\n {\n foreach ( self::get_services() as $class )\n {\n $service = self::instantiate( $class );\n if( method_exists( $service, 'register' ) )\n $service->register();\n }\n }", "private function attach_external_plugin_integration() {\n\t\t$daos = ShoutemStandardDaoFactory :: instance()->get_external_plugin_integration_daos();\n\t\tforeach ($daos as $dao) {\n\t\t\t$dao->attach_to_hooks();\n\t\t}\n\t}", "public function register() {\n\t\tadd_action( 'bp_loaded', [ $this, 'registerServices' ] );\n\t}", "public function registerServices($di)\n {\n // echo \"admin module registerServices....\";\n\n require_once '../apps/admin/config/services.php';\n }", "public function run()\n {\n Partner::create([\n \t'name'=>\"LyuboINC\"\n \t]);\n Partner::create([\n \t'name'=>'Classic2000'\n \t]);\n }", "public function run()\n {\n //\n SystemService::create([\n 'nombre' => 'La carta mozo'\n ]);\n SystemService::create([\n 'nombre' => 'Delivery'\n ]);\n SystemService::create([\n 'nombre' => 'Reservas'\n ]);\n SystemService::create([\n 'nombre' => 'Marketing'\n ]);\n }", "function service(&$dom) {\n\t\t$dom->appendChild($pagenode = $dom->createElement(\"page\"));\n\t\t$pagenode->setAttribute(\"title\", \"New FTP Mirror\");\n\n\t\t// Security check\n\t\tif(!check_permissions($dom, $pagenode, GROUP)) return;\n\n\t\t// Start the page off\t\t\n\t\t$formnode = $pagenode->appendChild($dom->createElement(\"newftpmirror\"));\n\n\t\t// If posting details, attempt to add the new details\n\t\tif($_SERVER['REQUEST_METHOD'] == 'POST') {\n\t\t\t$this->process($dom, $formnode);\n\t\t}\n\t\t\n\t\t// Add current details to form\n\t\t$this->ftpmirror->add_to_node($dom, $formnode);\n\t\t\n\t\treturn;\n\t}", "public function process(ContainerBuilder $container)\n {\n $registryDefinition = $container->findDefinition(PlatformRegistry::class);\n\n foreach ($container->findTaggedServiceIds('account_updater') as $id => $tags) {\n $registryDefinition->addMethodCall(\n 'registerUpdater',\n [\n new Reference($id)\n ]\n );\n }\n }", "function guifi_domain_add() {\n guifi_log(GUIFILOG_TRACE,'function guifi_domain_add()');\n if (arg(8) == 'external')\n $ipv4 = '';\n else\n $ipv4 = arg(6);\n\n $output = drupal_get_form('guifi_domain_form',array(\n 'add' => arg(3),\n 'dname' => arg(4),\n 'type' => arg(5),\n 'ipv4' => $ipv4,\n 'mname' => arg(7),\n 'scope' => arg(8),\n 'management' => arg(9)));\n\n // To gain space, save bandwith and CPU, omit blocks\n print theme('page', $output, FALSE);\n}", "public function run_service()\n\t{\n\t\t// Route the API task\n\t\t$this->_route_api_task();\n\t}", "public static function register_services(): void\n {\n foreach (self::get_services() as $class) {\n $service = self::instantiate($class);\n if (method_exists($class, 'register')) {\n $service->register();\n }\n }\n }", "protected function addSiteServices()\n {\n $this->container->JobPosting = function ($container) {\n return new JobPosting();\n };\n\n $this->container->Pagination = $this->container->factory(function ($container) {\n return new Pagination($container);\n });\n\n $this->container->Registration = function ($container) {\n return new Registration($container);\n };\n\n $this->container->Semantic = function ($container) {\n return new Semantic($container);\n };\n\n $this->container->User = function ($container) {\n return new User($container);\n };\n }", "public function register(): void\n {\n // Register collection loading prioritization macro\n Collection::macro(\n 'prioritizeLoading',\n fn () => $this->partition(fn ($item) => Str::contains($item, config('app.provider_loading.priority_5')))->flatMap(fn ($values) => $values)\n ->partition(fn ($item) => Str::contains($item, config('app.provider_loading.priority_4')))->flatMap(fn ($values) => $values)\n ->partition(fn ($item) => Str::contains($item, config('app.provider_loading.priority_3')))->flatMap(fn ($values) => $values)\n ->partition(fn ($item) => Str::contains($item, config('app.provider_loading.priority_2')))->flatMap(fn ($values) => $values)\n ->partition(fn ($item) => Str::contains($item, config('app.provider_loading.priority_1')))->flatMap(fn ($values) => $values)\n );\n\n // Register modules list\n $this->app->singleton('cortex.foundation.modules', fn () => collect(is_file(config('rinvex.composer.cortex-module.manifest')) ? $this->app['files']->getRequire(config('rinvex.composer.cortex-module.manifest')) : []));\n $this->app->singleton('cortex.foundation.modules.enabled', fn () => $this->app['cortex.foundation.modules']->filter(fn ($module) => $module['active'] && $module['autoload']));\n $this->app->singleton('cortex.foundation.modules.enabled.paths', fn () => $this->app['cortex.foundation.modules.enabled']->map(fn ($val, $key) => app()->modulePath($key))->filter(fn ($path) => file_exists($path))->toArray());\n\n $this->app->singleton('cortex.foundation.extensions', fn () => collect(is_file(config('rinvex.composer.cortex-extension.manifest')) ? $this->app['files']->getRequire(config('rinvex.composer.cortex-extension.manifest')) : []));\n $this->app->singleton('cortex.foundation.extensions.enabled', fn () => $this->app['cortex.foundation.extensions']->filter(fn ($extension) => $extension['active'] && $extension['autoload'] && $this->app['cortex.foundation.modules.enabled']->has($extension['extends'] ?? null)));\n $this->app->singleton('cortex.foundation.extensions.enabled.paths', fn () => $this->app['cortex.foundation.extensions.enabled']->map(fn ($val, $key) => app()->extensionPath($key))->filter(fn ($path) => file_exists($path))->toArray());\n\n $enabledModulesPaths = $this->app['cortex.foundation.modules.enabled.paths'];\n $enabledExtensionsPaths = $this->app['cortex.foundation.extensions.enabled.paths'];\n\n // Register filesystem module resources macro\n Filesystem::macro('moduleResources', function ($resource, $type = 'files', $depth = 1) use ($enabledModulesPaths) {\n return $enabledModulesPaths ? iterator_to_array(Finder::create()->{$type}()->in($enabledModulesPaths)->path($resource)->depth($depth)->sortByName(), false) : [];\n });\n\n // Register filesystem extension resources macro\n Filesystem::macro('extensionResources', function ($resource, $type = 'files', $depth = 1) use ($enabledExtensionsPaths) {\n return $enabledExtensionsPaths ? iterator_to_array(Finder::create()->{$type}()->in($enabledExtensionsPaths)->path($resource)->depth($depth)->sortByName(), false) : [];\n });\n }", "public function add_factory() {\n $this->factorycount++;\n }", "public function boot() {\r\n\t\t$hosting_service = HostResolver::get_host_service();\r\n\r\n\t\tif ( ! empty( $hosting_service ) ) {\r\n\t\t\t$this->provides[] = $hosting_service;\r\n\t\t}\r\n\t}", "private function load_dependencies() {\n\n\t\t$this->loader = new Service_Tracker_Loader();\n\n\t}", "protected function registeringDomain()\n {\n }", "public function process(ContainerBuilder $container)\n {\n if (!$container->has('aw.media.manager'))\n {\n return;\n }\n\n $definition = $container->findDefinition('aw.media.manager');\n\n $taggedServices = $container->findTaggedServiceIds('aw.media.gallery_provider');\n\n foreach ($taggedServices as $id => $tags)\n {\n foreach ($tags as $attributes)\n {\n $definition->addMethodCall('addGalleryProvider', array(\n new Reference($id),\n $attributes['alias']\n ));\n }\n }\n }", "public function addServices($provider)\n\t{\n\t\t$services = new $provider;\n\t\t$services = $services->register();\n\t\tforeach($services as $key => $item)\n\t\t\tContainer::registerClass( $key , $item );\n\t}", "public function process(ContainerBuilder $container): void {\n $factoryMapper = $container->getDefinition('preprocess_event.factory_mapper');\n\n $factoryIds = $container->findTaggedServiceIds('preprocess_event_default_factory');\n $factoryIds += $container->findTaggedServiceIds('preprocess_event_factory');\n\n foreach (array_keys($factoryIds) as $id) {\n $factoryMapper->addMethodCall(\n 'addFactory',\n [new Reference($id)]\n );\n }\n }", "public function install(){\r\n\t\t\r\n\t}", "public function add()\n\t{\n\t\tregister_setting(\n\t\t\tSettingsSection::SETTINGS_OPTION,\n\t\t\t'jigoshop_chronous_hsc_enable'\n\t\t);\n\t\tregister_setting(\n\t\t\tSettingsSection::SETTINGS_OPTION,\n\t\t\t'jigoshop_chronous_hsc_icon_display'\n\t\t);\n\t\tregister_setting(\n\t\t\tSettingsSection::SETTINGS_OPTION,\n\t\t\t'jigoshop_chronous_hsc_display_empty'\n\t\t);\n\t\tregister_setting(\n\t\t\tSettingsSection::SETTINGS_OPTION,\n\t\t\t'jigoshop_chronous_hsc_select_menu'\n\t\t);\n\t\tregister_setting(\n\t\t\tSettingsSection::SETTINGS_OPTION,\n\t\t\t'jigoshop_chronous_hsc_text'\n\t\t);\n\t\t\n\t\tregister_setting(\n\t\t\tSettingsSection::SETTINGS_OPTION,\n\t\t\t'jigoshop_chronous_hsc_icon'\n\t\t);\n\t\tregister_setting(\n\t\t\tSettingsSection::SETTINGS_OPTION,\n\t\t\t'jigoshop_chronous_ccm_enable'\n\t\t);\n\t\tregister_setting(\n\t\t\tSettingsSection::SETTINGS_OPTION,\n\t\t\t'jigoshop_chronous_ccm_text'\n\t\t);\n\t\tregister_setting(\n\t\t\tSettingsSection::SETTINGS_OPTION,\n\t\t\t'jigoshop_chronous_dc_enable'\n\t\t);\n\t}" ]
[ "0.648646", "0.57982194", "0.5671558", "0.53643703", "0.5324215", "0.5293005", "0.52735525", "0.5151731", "0.51439315", "0.51206493", "0.51106125", "0.5098104", "0.507639", "0.49984893", "0.49599975", "0.49526846", "0.49359635", "0.4885875", "0.4883293", "0.4833266", "0.48331675", "0.48277485", "0.48120236", "0.47987854", "0.47975183", "0.4780243", "0.47605526", "0.4756793", "0.47561282", "0.47521895", "0.47470474", "0.47363794", "0.47332463", "0.47264555", "0.47208163", "0.47188604", "0.47042468", "0.46967265", "0.46945685", "0.468582", "0.46763083", "0.46684268", "0.46590227", "0.4653327", "0.4651805", "0.46364608", "0.46346584", "0.46329412", "0.46144643", "0.46047845", "0.45955998", "0.45945385", "0.45945126", "0.45814133", "0.45793647", "0.4569079", "0.45685837", "0.45668003", "0.45477164", "0.45437106", "0.45394915", "0.45382", "0.4534565", "0.4532343", "0.4530206", "0.45297688", "0.45182484", "0.4517234", "0.45123002", "0.45058513", "0.45046514", "0.4501918", "0.45004103", "0.44988522", "0.44938746", "0.44938746", "0.44938746", "0.44938746", "0.44902304", "0.44898486", "0.4489187", "0.44888186", "0.44869545", "0.44863498", "0.44845483", "0.448031", "0.4474705", "0.44698653", "0.4469125", "0.44688144", "0.44672558", "0.44632414", "0.44626606", "0.4457619", "0.44568643", "0.44544423", "0.44540533", "0.44463605", "0.4444933", "0.44448426" ]
0.780687
0
Whether the storage backend contains a specific user. Having a user is defined as HAVING the USERSETTINGSportion of the data. The usercookies may be stored separately (such as in a cookiefile) and are NOT essential since they can be regenerated. So the data storage implementation MUST ONLY check for the existence of the USERSETTINGS.
public function hasUser ($username) { // Check whether the user's settings exist (empty string allowed). return $this->_getUserKey($username, self::SETTINGS); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hasUserCookies ()\n\t{\n\t\t// Simply check if the storage key for cookies exists and is non-empty.\n\t\treturn ! empty($this->loadUserCookies()) ? true : false;\n\t}", "private function checkCurrentUser(){\n return isset($_SESSION['user']);\n }", "public function hasUser();", "function isUser(){\n\t\tif(isset($_SESSION['type']) && $_SESSION['type']=='user')\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}", "public function hasUser()\n {\n return $this->getUser() !== null;\n }", "public function isConfiguredForThisStore()\n {\n return $this->getUsername() && $this->isEnabled();\n }", "public function exists() {\n\t\treturn !isset($userData);\n\t}", "function canEdit($user){\n\t\tif($_COOKIE && array_key_exists($user, $_COOKIE))return true;\n\t\telse return false;\n\t}", "function user_AuthIsUser() {\n\tglobal $AUTH;\n\t\n\treturn isset($AUTH['user']) && ($AUTH['user'] !== 0);\n}", "function storage_can_set($sv_user) {\n $allowed = ((api_is_platform_admin()) || ($sv_user == api_get_user_id()));\n if (!$allowed) {\n print \"ERROR : Not allowed\";\n }\n return $allowed;\n}", "public function has() {\n\t\t$userid = $this->get();\n\t\treturn ! empty( $userid );\n\t}", "public function hasUserData(){\n return $this->_has(3);\n }", "function hasStoredCard ( \n $user = false )\n {\n if ( $user == false )\n $user = eZUser::currentUser();\n if ( ! $user->isLoggedIn() )\n return false;\n $userObj = $user->contentObject();\n if ( ! is_object( $userObj ) )\n return false;\n $contentObjectAttributes = $userObj->contentObjectAttributes();\n foreach ( $contentObjectAttributes as $key => $attribute )\n {\n if ( $attribute->DataTypeString == self::DATA_TYPE_STRING )\n {\n $content = $attribute->content();\n if ( isset( $content['has_stored_card'] ) and $content['has_stored_card'] == 1 )\n return true; else\n return false;\n }\n }\n return false;\n }", "static public function isUser(){\n if ( isset($_SESSION['id']) && $_SESSION['id'] != 0 ) {\n return true;\n } else {\n return false;\n }\n }", "function is() {\n global $_SESSION;\n if (! empty($_SESSION['payback']['user'])) return true;\n else return false;\n }", "public function hasuser()\n {\n return is_object($this->luser);\n }", "protected function isCurrentUser()\n {\n return ($this->credentials->check() && $this->credentials->getUser()->id == $this->wrappedObject->revisionable_id);\n }", "public function hasUserData(){\n return $this->_has(2);\n }", "public function hasUserData(){\n return $this->_has(2);\n }", "public function hasUserData(){\n return $this->_has(2);\n }", "public function hasUserData(){\n return $this->_has(2);\n }", "public function isUser()\n\t{\n\t\tif( $this->permission != array_search( 'user', $this->permissions ) )\n\t\t\treturn false;\n\n\t\treturn true;\n\t}", "public function isUserLogged(){\r\n return isset($_SESSION[$this->userSessionKey]);\r\n }", "public function hasUserId(){\n return $this->_has(2);\n }", "public function hasUserId(){\n return $this->_has(2);\n }", "public function hasUserId(){\n return $this->_has(2);\n }", "public function hasUserId(){\n return $this->_has(2);\n }", "public function hasUserId(){\n return $this->_has(2);\n }", "function is_user_option_local($key, $user_id = 0, $blog_id = 0)\n {\n }", "private function usr(){\r\n\r\n if(defined(\"USER_ID\")){ return true;}else{return false;}\r\n\r\n }", "public function user_exists() {\n\t\t$user = $this->search(\"(uid=\".$this->user.\")\");\n\t\treturn $user !== false;\n\t}", "function isUserLogged() {\r\n return isset($_SESSION['user']);\r\n }", "public function doesUserAssociationExist(){\r\n\t\tif($this->userDevices){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public static function exists()\n {\n return Session::get('UserID') != null;\n }", "public function isBelongUserStore(User $user)\n {\n return $this->getStore()->getId() === $user->getStore()->getId();\n }", "public function hasUser(): bool\n {\n return ! is_null($this->user);\n }", "public function store(User $user)\n {\n $role = $user->role->role;\n return $role == 'superadmin' || $role == 'staff hr';\n }", "public function hasAccountUser($store=null)\n {\n return 0 < strlen(trim($this->getAccountUser($store)));\n }", "protected function loggedIn() {\n return isset($_SESSION) && array_key_exists(self::user, $_SESSION);\n }", "public function checkAuth ()\n {\n if ($this->storage->isAvailable()) {\n if ($this->storage->get(self::$prefix . 'userId') !== NULL) {\n return true;\n } else {\n $this->logout();\n return false;\n }\n }\n\n return false;\n }", "public function containsUser($user) {\n\t\treturn in_array($user->getUserID(), $this->getValue());\n\t}", "public function hasIdentity()\n {\n return !empty($this->storage[$this->storageKey]);\n }", "function hasKnown() {\n\t if (\\Idno\\Core\\site()->session()->currentUser()->known) {\n\t\treturn true;\n\t }\n\t return false;\n\t}", "private function userHasAccess()\n {\n $required_perm = $this->route['perm'];\n $user_group = $_SESSION['user_group'];\n if ($required_perm == 'all') {\n return true;\n } elseif ($user_group == $required_perm) {\n return true;\n }\n return false;\n }", "public function exists() {\n\t\tglobal $wpdb, $bp;\n\n\t\t// Check cache first\n\t\t$cached = wp_cache_get( $this->field_id, 'bp_xprofile_data_' . $this->user_id );\n\n\t\tif ( $cached && ! empty( $cached->id ) ) {\n\t\t\t$retval = true;\n\t\t} else {\n\t\t\t$retval = $wpdb->get_row( $wpdb->prepare( \"SELECT id FROM {$bp->profile->table_name_data} WHERE user_id = %d AND field_id = %d\", $this->user_id, $this->field_id ) );\n\t\t}\n\n\t\treturn apply_filters_ref_array( 'xprofile_data_exists', array( (bool)$retval, $this ) );\n\t}", "public function isCurrentUser()\n {\n return $this->_vars instanceof \\Zend_Session_Namespace;\n }", "function is_user()\n\t{\n\n\tif ($this->session->userdata('user') == false)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\telse\n\t\t{\n\t\t\treturn true;\n\n\t\t}\n\n\t}", "private function isUser() : bool\n {\n return $this->role('user');\n }", "public static function isInstalled(){\n\t\treturn !empty(\\GO::config()->db_user);\n\t}", "public static function check()\n {\n if (isset($_SESSION['user'])) {\n return true;\n }\n return false;\n }", "public function isAllowedForUser(){\n\t\treturn true;\n\t}", "public function isAvailableForUser()\n {\n $c_user = fx::user();\n $ib_visibility = isset($this['scope']['visibility']) ? $this['scope']['visibility'] : null;\n if (!$ib_visibility || $ib_visibility === 'all') {\n return true;\n }\n if ($ib_visibility === 'nobody') {\n return false;\n }\n if ($ib_visibility === 'admin' && !$c_user->isAdmin()) {\n return false;\n }\n if ($ib_visibility === 'user' && $c_user->isGuest()) {\n return false;\n }\n if ($ib_visibility === 'guest' && !$c_user->isGuest()) {\n return false;\n }\n return true;\n }", "protected function hasUser()\n {\n $user = $this->tokenStorage->getToken();\n\n if (null === $user) {\n return false;\n }\n\n return (!$user instanceof AnonymousToken);\n }", "public function hasUsername() {\n return $this->_has(1);\n }", "public function view(User $user, Storage $storage)\n {\n return ($user->id == $storage->user_id);\n }", "public function userExists( $user_name ) { return true;}", "function is_pro_user($user_id = false) {\r\n\t\tglobal $wpdb, $current_user, $current_site;\r\n\r\n\t\tif ( !$user_id ) {\r\n\t\t\t$user_id = $current_user->ID;\r\n\t\t}\r\n $user_id = intval($user_id);\r\n\r\n\t\tif ( is_super_admin($user_id) )\r\n\t\t\treturn true;\r\n\r\n\t\t//very db intensive, so we cache (1 hour)\r\n\t\t$expire_time = time()-3600;\r\n\t\t@list($expire, $is_pro) = get_user_meta($user_id, 'psts_user', true);\r\n\t\tif ($expire && $expire >= $expire_time) {\r\n\t return $is_pro;\r\n\t }\r\n\r\n\t\t//TODO - add option to select which user levels from supporter blog will be supporter user. Right now it's all (>= Subscriber)\r\n\t\t//$results = $wpdb->get_results(\"SELECT * FROM `$wpdb->usermeta` WHERE `user_id` = $user_id AND `meta_key` LIKE 'wp_%_capabilities' AND `meta_value` LIKE '%administrator%'\");\r\n\t\t$results = $wpdb->get_results(\"SELECT * FROM `$wpdb->usermeta` WHERE `user_id` = $user_id AND `meta_key` LIKE '{$wpdb->base_prefix}%_capabilities'\");\r\n\t if (!$results) {\r\n\t //update cache\r\n\t update_user_meta($user_id, 'psts_user', array(time(), 0));\r\n\t return false;\r\n\t }\r\n\r\n\t foreach ($results as $row) {\r\n\t\t $tmp = explode('_', $row->meta_key);\r\n\t\t //skip main blog\r\n\t\t if ($tmp[1] != $current_site->blogid)\r\n\t $blog_ids[] = $tmp[1];\r\n\t }\r\n\t $blog_ids = implode(',',$blog_ids);\r\n\r\n\t $count = $wpdb->get_var(\"SELECT COUNT(*) FROM {$wpdb->base_prefix}pro_sites WHERE expire > '\" . time() . \"' AND blog_ID IN ($blog_ids)\");\r\n\t if ($count) {\r\n\t update_user_meta($user_id, 'psts_user', array(time(), 1)); //update cache\r\n\t return true;\r\n\t } else {\r\n\t //update cache\r\n\t update_user_meta($user_id, 'psts_user', array(time(), 0)); //update cache\r\n\t return false;\r\n\t }\r\n\t}", "public function has_tyk_id() {\n\t\t$tyk_user_id = get_user_meta($this->user->ID, self::META_TYK_USER_ID_KEY, true);\n\t\treturn !empty($tyk_user_id);\t\n\t}", "public static function check(){\n\t\tif (isset($_SESSION['username'])) {\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "static function isLoaded() {\n return Ak::getStaticVar('CurrentUser') != null;\n }", "public function isAllowed() {\n\t\tif (!$this->session->has('auth')) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$user = User::findFirst(array('username' => $this->session->get('auth')));\n\n\t\treturn $user->getSuperUser() ? true : false;\n\t}", "public function read(User $user): bool {\n if ($user->is_super_admin) {\n return true;\n }else if ($user->tokenCan(['read-registrations-dev', 'read-registrations-stage', 'read-registrations-prod'])) {\n return true;\n }else {\n return false;\n }\n }", "public function isAdmin()\n {\n $quarkCookie = Mage::getModel('core/cookie')->get('quark_bar');\n\n $quarkSession = $this->getCollection()\n ->addFieldToFilter('identifier', $quarkCookie)\n ->getData();\n\n if (count($quarkSession)) {\n return true;\n }\n\n return false;\n }", "function loaded_user(string $id): bool { return isset($this->users[$id]); }", "public function canLikesettings() {\n $viewer = Engine_Api::_()->user()->getViewer();\n if (!$viewer || !$viewer->getIdentity()) {\n return false;\n }\n\t\t$like_profile_show = Engine_Api::_()->getApi( 'settings' , 'core' )->getSetting( 'like.profile.show' ) ;\n $like_setting_show = Engine_Api::_()->getApi( 'settings' , 'core' )->getSetting( 'like.setting.show' ) ;\n\t\tif ( empty( $like_profile_show ) || empty( $like_setting_show ) ) {\n\t\t\t\treturn false;\n\t\t}\n\t\treturn true;\n }", "function user_exists()\n\t{\t\n\t\tif((empty($_SESSION['username'])))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t}", "public function hasUsername(){\n return $this->_has(4);\n }", "public function hasUsershow(){\n return $this->_has(32);\n }", "public function hasWpUserId(){\n return $this->_has(7);\n }", "public function read(User $user, $model)\n {\n return $user->hasPermission('read_settings');\n }", "private static function is_logged_in () {\n\t\t# Check for the existence of the cookie\n\t\tif (isset($_COOKIE[\"user_id\"])) {\n\t\t\treturn (true);\n\t\t} else {\n\t\t\treturn (false);\n\t\t}\n\t}", "function is_user_opted_in( ?WP_User $user = null ) : ?bool {\n\tif ( ! $user ) {\n\t\t$user = wp_get_current_user();\n\t}\n\tif ( ! $user->exists() ) {\n\t\treturn null;\n\t}\n\n\t$did_opt_in = get_user_meta( $user->ID, META_OPT_IN, true );\n\n\tif ( $did_opt_in === '' ) {\n\t\treturn null;\n\t}\n\n\treturn intval( $did_opt_in ) === 1;\n}", "public function getIsUserAttribute()\n {\n return $this->attributes['user_type'] == '3';\n }", "public function hasUserLimit()\n {\n return $this->user_limit !== null;\n }", "function subsite_manager_is_superadmin($user_guid = 0){\n static $superadmin_cache;\n\n $result = false;\n\n $user_guid = sanitise_int($user_guid, false);\n\n if(empty($user_guid)){\n $user_guid = elgg_get_logged_in_user_guid();\n }\n\n if(!empty($user_guid)){\n if(!isset($superadmin_cache)){\n $superadmin_cache = array();\n }\n\n if(!isset($superadmin_cache[$user_guid])){\n $superadmin_cache[$user_guid] = false;\n\n $query = \"SELECT value\";\n $query .= \" FROM \" . get_config(\"dbprefix\") . \"private_settings\";\n $query .= \" WHERE name = 'superadmin'\";\n $query .= \" AND entity_guid = \" . $user_guid;\n\n if ($setting = get_data_row($query)) {\n if($setting->value == true){\n $superadmin_cache[$user_guid] = true;\n }\n }\n }\n\n $result = $superadmin_cache[$user_guid];\n }\n\n return $result;\n }", "function is_loaded()\n {\n return empty($this->userID) ? false : true;\n }", "public static function isEnabled()\n {\n $app_model = new waAppSettingsModel();\n $is_enabled = $app_model->get(array('shop', self::PLUGIN_ID), self::PLUGIN_ID . '-profile');\n $profile_cookie = $app_model->get(array('shop', self::PLUGIN_ID), self::PLUGIN_ID_SHORT . '-profile-cookie');\n $cookie_enabled = $profile_cookie && waRequest::cookie($profile_cookie, '');\n return $is_enabled && $cookie_enabled;\n }", "public function isAuthorized() {\n\t\treturn (bool)$this->_storage->hasData();\n\t}", "private function if_user_logged_in()\n {\n\n session_start();\n\n if(!empty($_SESSION)){\n\n if(isset($_SESSION[\"user_id\"]) && isset($_SESSION[\"user_type\"])){\n \n return true;\n\n }else{\n\n return false;\n }\n\n }else{\n\n return false;\n }\n }", "public function store($user = null)\n {\n return $_SERVER['restify.post.store'] ?? true;\n }", "public function isLogined()\n {\n return isset($_SESSION['userLogin']);\n }", "public function isUserManager()\n\t{\n\t\treturn (Bn::getValue('user_type') == 'M');\n\t}", "public function isUserOrGroupSet() {}", "function isUserActive($userId) {\n\n if (($ini = getUserIni($userId))) {\n if (!isset($ini[SECTION_Settings][VALUE_DeleteDate]) || strlen($ini[SECTION_Settings][VALUE_DeleteDate]) == 0)\n return true;\n }\n\n return false;\n}", "function workWithUserSetting($setting)\n\t{\n\t\t$result = TRUE;\n\t\tif ($this->settings[\"usr_settings_hide_\".$setting] == 1)\n\t\t{\n\t\t\t$result = FALSE;\n\t\t}\n\t\tif ($this->settings[\"usr_settings_disable_\".$setting] == 1)\n\t\t{\n\t\t\t$result = FALSE;\n\t\t}\n\t\treturn $result;\n\t}", "public function isLogged(){\n return isset($_SESSION[\"user\"]);\n }", "function exists($userName)\n{\n\treturn (bool)$this->getUser($userName);\n}", "public function is_user_auth(){\n if($this->user_id==auth()->user()->id){\n return true;\n }else{\n return false;\n }\n }", "static function isCurrentUser(User $user) {\n return $user == self::currentUser();\n }", "public function hasUsername(){\n return $this->_has(6);\n }", "public function hasUsername(){\n return $this->_has(6);\n }", "public static function hasUser()\n\t\t{\n\t\t\tif (!Yii::$app instanceof Application)\n\t\t\t\treturn FALSE;\n\n\t\t\tif (!Yii::$app->db->getTableSchema(User::tableName()))\n\t\t\t\treturn FALSE;\n\n\t\t\ttry {\n\t\t\t\t$identityClass = Yii::$app->user->identityClass;\n\t\t\t} catch (Exception $e) {\n\t\t\t\t$identityClass = FALSE;\n\t\t\t}\n\n\t\t\tif (!$identityClass)\n\t\t\t\treturn FALSE;\n\n\t\t\treturn !Yii::$app->user->isGuest;\n\t\t}", "function wp_sub_user_exists_on_site( int $user_id, int $site_id ) : bool {\n\t$allowed = in_array( $site_id, get_user_meta( $user_id, \\WP_SUB\\WP_Separate_User_Base::SITE_META_KEY, false ) );\n\n\treturn apply_filters( 'wp_sub_user_exists_on_network', $allowed, $user_id, $site_id );\n}", "public function CheckTransactionUser() {\n\t\t\t\t\t\tif (isset ( $_SESSION ['UserSession'] )) {\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t}", "public function userSettingExists($where){\n\n\t\t$res = $this->db->get_where(\"user_settings\", $where);\n\t\treturn $res->num_rows();\n\t}", "public function hasStored()\n\t{\n\t\tif( $_SESSION[__CLASS__][$this->questionId] !== null )\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "public function hasLoggedUser()\n {\n return ($this->getLoggedUser() !== null);\n }", "public function store(User $user)\n {\n return isAllowed($user, 'bankaccount-store');\n }", "function check_user_analytics_exist( $post ) {\n\n $form_id = get_post_meta( $post->ID, '_wpuf_form_id', true );\n $user_analytics_info = get_post_meta( $post->ID, 'user_analytics_info', true );\n\n if ( empty( $form_id ) && empty( $user_analytics_info ) ) {\n return false;\n }\n\n return true;\n }", "function have_profile(){\n\treturn ( get_profile('enabled') === true && get_profile() !== -1 );\n}" ]
[ "0.7035816", "0.67715937", "0.6540043", "0.6504999", "0.64896387", "0.6460639", "0.64487886", "0.6431249", "0.642298", "0.64196783", "0.6394352", "0.6341454", "0.6297206", "0.629277", "0.627108", "0.626311", "0.6261317", "0.6226791", "0.6226791", "0.6226791", "0.6226791", "0.6211204", "0.61978424", "0.6181177", "0.6181177", "0.6181177", "0.6181177", "0.6181177", "0.61686605", "0.6151784", "0.6134693", "0.610975", "0.6106791", "0.61032605", "0.6060735", "0.60472", "0.6044405", "0.6041106", "0.60390997", "0.60245126", "0.6023392", "0.6014828", "0.60088027", "0.5998417", "0.5995353", "0.5992061", "0.59877783", "0.59741765", "0.59389114", "0.5935983", "0.59344596", "0.593333", "0.5931701", "0.5928695", "0.5918793", "0.59098333", "0.5900288", "0.58993393", "0.5887668", "0.58733565", "0.5871403", "0.58695287", "0.5855484", "0.58533365", "0.5846485", "0.58418906", "0.5841346", "0.5834766", "0.58200115", "0.5816792", "0.5814103", "0.58094716", "0.58047354", "0.58035725", "0.5803232", "0.57994807", "0.5794523", "0.5792028", "0.57861286", "0.5784781", "0.5782605", "0.57781374", "0.57697123", "0.57675606", "0.5766825", "0.5761155", "0.5756106", "0.5752118", "0.57500136", "0.57493424", "0.57493424", "0.57473403", "0.5747111", "0.57379955", "0.57225776", "0.57134825", "0.5708864", "0.5706696", "0.5704704", "0.5701267" ]
0.6734622
2
Move the internal data for a username to a new username. Is NEVER called for the currently loaded user, so Storage backend writers can safely assume that you'll never be asked to rename the loaded user. Before performing the move, this function MUST validate that the OLD user EXISTS and that the NEW user DOESN'T EXIST, and MUST throw an exception if either of those checks fail. This is to ensure that users don't lose data by accidentally overwriting something.
public function moveUser ($oldUsername, $newUsername) { // Verify that the old username exists and fetch the old data. $oldSettings = $this->_getUserKey($oldUsername, self::SETTINGS); $oldCookies = $this->_getUserKey($oldUsername, self::COOKIES); if ($oldSettings === null) { // Only settings are vital. throw new SettingsException(sprintf( 'Cannot move non-existent user "%s".', $oldUsername )); } // Verify that the new username does not exist. if ($this->hasUser($newUsername)) { throw new SettingsException(sprintf( 'Refusing to overwrite existing user "%s".', $newUsername )); } // Now attempt to write all data to the new name. $this->_setUserKey($newUsername, self::SETTINGS, $oldSettings); if ($oldCookies !== null) { // Only if cookies existed. $this->_setUserKey($newUsername, self::COOKIES, $oldCookies); } // Delete the previous user keys. $this->deleteUser($oldUsername); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function change_username($new_username) {\n $this->user->username = $new_username;\n $this->user->update();\n\n $this->impersonate($this->id);\n }", "function user_set_name($user_id, $new_username)\n{\n\tif(strcmp($new_username,user_get_name($user_id)))\n\t{\n\t\t//check that no other user has it\n\t\tif(!user_name_exists($new_username))\n\t\t{\n\t\t\t//set it\n\t\t\t$sql=\"UPDATE \".PREFIX.\"user SET username='\".sql_safe($new_username).\"' WHERE id=\".sql_safe($user_id).\";\";\n\t\t\tif(mysql_query($sql))\n\t\t\t\tadd_message(\"New user name set\");\n\t\t\telse\n\t\t\t\tadd_error(\"User name could not be set: \".mysql_error());\n\t\t}\n\t\telse\n\t\t\tadd_error(\"User name '$new_username' is already in use.\");\n\t}\n}", "public function user_move($username, $container) {\n if (!$this->_bind){ return (false); }\n if ($username === null){ return (\"Missing compulsory field [username]\"); }\n if ($container === null){ return (\"Missing compulsory field [container]\"); }\n if (!is_array($container)){ return (\"Container must be an array\"); }\n \n $userinfo = $this->user_info($username, array(\"*\"));\n $dn = $userinfo[0]['distinguishedname'][0];\n $newrdn = \"cn=\" . $username;\n $container = array_reverse($container);\n $newcontainer = \"ou=\" . implode(\",ou=\",$container);\n $newbasedn = strtolower($newcontainer) . \",\" . $this->_base_dn;\n $result=@ldap_rename($this->_conn,$dn,$newrdn,$newbasedn,true);\n if ($result !== true) {\n return (false);\n }\n return (true);\n }", "public function changeUsername( $userid, $username )\r\n\t{\r\n\t\t$this->debug->guard( );\r\n\r\n\t\tif ( empty( $username ) )\r\n\t\t{\r\n\t\t\t$this->debug->write( 'Problem changing username of a user: no username was given for the user', 'warning' );\r\n\t\t\t$this->messages->setMessage( 'Problem changing the username of a user: no username was given for the user', 'warning' );\r\n\t\t\t$this->debug->unguard( false );\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t$sql = $this->database->prepare( \"SELECT * FROM \" . $this->configuration->getConfiguration( 'zeitgeist', 'tables', 'table_users' ) . \" WHERE user_username = ?\" );\r\n\t\t$sql->bindParam( 1, $username );\r\n\r\n\t\tif ( !$sql->execute( ) )\r\n\t\t{\r\n\t\t\t$this->debug->write( 'Problem changing username of a user: could not read from users table', 'warning' );\r\n\t\t\t$this->messages->setMessage( 'Problem changing username of a user: could not read from users table', 'warning' );\r\n\r\n\t\t\t$this->debug->unguard( false );\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif ( $sql->rowCount( ) > 0 )\r\n\t\t{\r\n\t\t\t$this->debug->write( 'Problem changing username of a user: username already exists', 'warning' );\r\n\t\t\t$this->messages->setMessage( 'Problem changing username of a user: username already exists', 'warning' );\r\n\t\t\t$this->debug->unguard( false );\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t$sql = $this->database->prepare( \"UPDATE \" . $this->configuration->getConfiguration( 'zeitgeist', 'tables', 'table_users' ) . \" SET user_username = ? WHERE user_id = ?\" );\r\n\t\t$sql->bindParam( 1, $username );\r\n\t\t$sql->bindParam( 2, $userid );\r\n\r\n\t\tif ( !$sql->execute( ) )\r\n\t\t{\r\n\t\t\t$this->debug->write( 'Problem changing username of a user: could not update database', 'warning' );\r\n\t\t\t$this->messages->setMessage( 'Problem changing username of a user:could not update database', 'warning' );\r\n\r\n\t\t\t$this->debug->unguard( false );\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t$this->debug->unguard( true );\r\n\t\treturn true;\r\n\t}", "public function setUserName($newUserName) {\n\t\t$this->userName = $newUserName;\n\t}", "public function validate_username_update($errors, $update, $user)\n {\n if (property_exists($user, 'ID')){\n $user_id = $user->ID;\n $old_user_login = $user->user_login;\n $new_user_login = $old_user_login;\n if (isset($_POST['user_login'])) {\n $new_user_login = trim( sanitize_text_field($_POST['user_login']) );\n }\n\n\n\n //we need to validate annother user doesn't exist with the same name\n if ($new_user_login !== $old_user_login) {\n $another_user_has_user_login = username_exists($new_user_login);\n if ($another_user_has_user_login) {\n $errors->add('user_login', '<strong>ERROR</strong>: You can\\'t change your username to ' . $new_user_login . ', another user is using that username.');\n return;\n }\n\n\n\n if (is_plugin_active('appthemes-xero-invoices/appthemes-xero-invoices.php')) {\n $xero_contact_exists = AXI_User_Validation::check_if_xero_contact_exists($new_user_login);\n //check if there is Xero Contact with the desired name\n if ($xero_contact_exists) {\n $message = '<strong>ERROR</strong>: You can\\'t change your username to ' . $new_user_login . ', another user is using that username.';\n if(current_user_can( 'manage_options' )){\n $message = '<strong>ERROR</strong>: You can\\'t change this user\\'s username to <strong>' . $new_user_login . '</strong>, there is an existing Xero Contact using that name.';\n }\n $errors->add('user_login', $message);\n return;\n }\n }\n\n // //now update the username\n global $wpdb;\n $update1 = $wpdb->prepare(\"UPDATE $wpdb->users SET user_login = %s WHERE user_login = %s\", $new_user_login, $old_user_login);\n\n if ($wpdb->query($update1) !== false) {\n // Update user_nicename.\n $update2 = $wpdb->prepare(\"UPDATE $wpdb->users SET user_nicename = %s WHERE user_login = %s AND user_nicename = %s\", $new_user_login, $new_user_login, $old_user_login); // phpcs:ignore WordPressVIPMinimum.Variables.RestrictedVariables\n $wpdb->query(\n $update2\n );\n\n // Update display_name.\n $update3 = $wpdb->prepare(\"UPDATE $wpdb->users SET display_name = %s WHERE user_login = %s AND display_name = %s\", $new_user_login, $new_user_login, $old_user_login); // phpcs:ignore WordPressVIPMinimum.Variables.RestrictedVariables\n $wpdb->query(\n $update3\n );\n\n // If the user is a Super Admin, update their permissions.\n if (is_multisite() && is_super_admin($user_id)) {\n grant_super_admin($user_id);\n }\n }\n\n //we may also need to update the contact name in Xero\n if (is_plugin_active('appthemes-xero-invoices/appthemes-xero-invoices.php')) {\n $xero_contact_update = AXI_User_Validation::update_contact_name($user_id, $new_user_login);\n }\n\n }\n }\n }", "public function save()\n {\n $this->validate();\n $user = User::findOrFail($this->userId);\n if(strtolower($this->origName) == strtolower($this->newName)){\n $this->updateName($user);\n return;\n }else{\n $user->info->update(['company_name' => $this->newName]);\n $user->save();\n $this->updateName($user);\n }\n\n\n }", "public function testUpdateUser()\n {\n // grab test user data\n $user = User::where('email', '[email protected]') -> first();\n $oldName = $user -> name;\n $newName = 'name'.rand(1,999999);\n // update user name\n User::where('email', '[email protected]') -> update(['name' => $newName]);\n // verify name is different\n $user = User::where('email', '[email protected]') -> first();\n $this -> assertSame($user -> name, $newName);\n $this -> assertFalse($oldName == $user -> name);\n }", "public function renameUser( $OldID, $NewID, $Pass = \"\" ) {\r\n if ( $this->EMPTY ) {\r\n return FALSE;\r\n }\r\n if ( empty( $OldID ) ) {\r\n return FALSE;\r\n }\r\n if ( empty( $NewID ) ) {\r\n return FALSE;\r\n }\r\n if ( !($this->isUser( $OldID )) ) {\r\n //\tSend an auth failure - prevents people from fishing for\r\n //\tvalid userIDs.\r\n //\tYOU will know its's because User is Unknown -\r\n //\tthis error is slightly different than the real\r\n //\tauthentication failure message. Compare the two.\r\n //\tSecurity through obscurity sucks but oh well..\r\n $this->error( \"renameUser failure for [$OldID]: Authentication Failure\", 0 );\r\n return FALSE;\r\n }\r\n if ( $this->isUser( $NewID ) ) {\r\n $this->error( \"Cannot change UserID, [$NewID] already exists\", 0 );\r\n return FALSE;\r\n }\r\n // If no Password, force a name change,\r\n // otherwise authenticate first.\r\n // Be SURE to always send the Pass!\r\n if ( !(empty( $Pass )) ) {\r\n //\tMust validate the user now\r\n if ( !($this->verifyUser( $OldID, $Pass )) ) {\r\n $this->error( \"renameUser failure for [$OldID] : Authentication Failed\", 0 );\r\n return FALSE;\r\n }\r\n // OK - so the password is valid - are we planning\r\n // on actually changing our name ?\r\n if ( $NewID == $OldID ) {\r\n // Nice new name ya got there Homer...\r\n return TRUE;\r\n }\r\n }\r\n // Valid user, OK to change.\r\n $usernum = $this->getUserNum( $OldID );\r\n if ( $usernum == -1 ) {\r\n return FALSE;\r\n }\r\n $this->USERS[$usernum][\"user\"] = $NewID;\r\n if ( !($this->htWriteFile()) ) {\r\n $this->error( \"FATAL could not save password file! [$php_errormsg]\", 1 );\r\n }\r\n return TRUE;\r\n }", "function updateName($NewUsername, $OldUsername){\n\t\t\t$query=\"UPDATE users SET name='{$NewUsername}' WHERE name='{$OldUsername}';\" ;\n\t\t\t$this->db->ExecuteSQL($query);\n\t\t\treturn true;\n\t\t}", "public function updateUsername()\n {\n $user = User::find(Database::connection(), $_SESSION['id']);\n\n // Update Username\n return $user->updateUsername(Database::connection(), $_POST['username']);\n }", "function forum_user_change($new_username) {\n\t global $vbulletin;\n\n\t // LOG USER OUT\n\t $this->forum_logout();\n\n\n\t $vb_username = $new_username;\n\n\t $vbulletin->db->query_write(\"UPDATE \" . TABLE_PREFIX . \"user SET username='$vb_username' WHERE userid='\".$this->forum_user[userid].\"'\");\n\n\t // RESET USER INFO\n\t $this->user_info[user_username] = $new_username;\n\n\t // RETRIEVE INFORMATION\n\t $this->forum_user_check();\n\n\t // LOG USER BACK IN\n\t $this->forum_login(1);\n\n\t}", "public static function setUsername(string $newUsername): void\n {\n self::writeConfiguration(['username' => $newUsername]);\n }", "protected function OnBeforeCopy()\n {\n parent::OnBeforeCopy();\n\n $sUserNameBase = 'newuser';\n $sUserName = $sUserNameBase;\n $iCount = 1;\n $bNameAvailable = false;\n do {\n $query = \"SELECT * FROM `cms_user` WHERE `login` = '\".MySqlLegacySupport::getInstance()->real_escape_string($sUserName).\"'\";\n $tRes = MySqlLegacySupport::getInstance()->query($query);\n if (MySqlLegacySupport::getInstance()->num_rows($tRes) > 0) {\n $sUserName = $sUserNameBase.'-'.$iCount;\n } else {\n $bNameAvailable = true;\n }\n ++$iCount;\n } while (!$bNameAvailable);\n $this->oTable->sqlData['login'] = $sUserName;\n }", "public function testUserUpdateWithUninstalledDomainAccessFields() {\n $user = $this->drupalCreateUser();\n $user->save();\n self::assertNotEmpty($user->id());\n\n $this->deleteDomainAccessFields('user', 'user');\n $reloaded_user = $this->entityTypeManager->getStorage('user')->load($user->id());\n\n $new_name = $this->randomMachineName();\n $reloaded_user->setUsername($new_name);\n $reloaded_user->save();\n self::assertSame($new_name, $reloaded_user->getAccountName());\n }", "public function setUsername($newUsername) {\n\t\t$this->netxUsername = $newUsername;\n\t}", "protected function _oldUser() {\n\t\t$user_id = trim($this->in('User ID:'));\n\n\t\tif (!$user_id || !is_numeric($user_id)) {\n\t\t\t$user_id = $this->_oldUser();\n\n\t\t} else {\n\t\t\t$result = $this->db->fetchRow(sprintf(\"SELECT * FROM `%s` AS `User` WHERE `id` = %d LIMIT 1\",\n\t\t\t\t$this->install['table'],\n\t\t\t\t$user_id\n\t\t\t));\n\n\t\t\tif (!$result) {\n\t\t\t\t$this->out('User ID does not exist, please try again.');\n\t\t\t\t$user_id = $this->_oldUser();\n\n\t\t\t} else {\n\t\t\t\t$this->install['username'] = $result['User'][$this->config['userMap']['username']];\n\t\t\t\t$this->install['password'] = $result['User'][$this->config['userMap']['password']];\n\t\t\t\t$this->install['email'] = $result['User'][$this->config['userMap']['email']];\n\t\t\t}\n\t\t}\n\n\t\treturn $user_id;\n\t}", "public function update($username)\n\t{\n\n\t\t$user = User::where('username', '=', $username)->first();\n\n\t\tif (Auth::user()->getId() == $user->id) {\n\n\t\t\t$rules = array(\n\t\t\t\t'name' => 'required|min:3|regex:/^[a-zA-Z][a-zA-Z ]*$/'\n\t\t\t);\n\n\t\t\t$validator = Validator::make(Request::all(), $rules);\n\n\t\t\tif ($validator->fails()) {\n\n\t\t\t\treturn Redirect::back()\n\t\t\t\t\t->withErrors($validator)\n\t\t\t\t\t->withInput();\n\n\t\t\t} else {\n\n\t\t\t\t$user->name = Request::get('name');\n\n\t\t\t\t$user->save();\n\n\t\t\t\t// Redirect\n\t\t\t\tSession::flash('message', 'Successfully updated!');\n\t\t\t\treturn redirect(route('users.show', [$user->username]));\n\t\t\t}\n\t\t\t\n\t\t} else {\n\t\t\tSession::flash('info_message', 'You do not have that permission!');\n\t\t\treturn redirect(route('users.show', [$user->username]));\n\t\t}\n\t}", "function editUserName($data){\n\t\t\t$conn = $this->connect();\n\t\t\t$fname = $this->modify(mysqli_real_escape_string($conn, $data['fname']));\n\t\t\t$lname = $this->modify(mysqli_real_escape_string($conn, $data['lname']));\n\t\t\tif(empty($fname) || empty($lname)) {\n\t\t\t\t$this->re_direct(\"profile\", \"input=empty\");\n\t\t\t} else {\n\t\t\t\tif(preg_match(\"/^[a-z]+(\\.)?( )?[a-z]*$/i\", $fname) && preg_match(\"/^[a-z]+$/i\", $lname)) {\n\t\t\t\t\tif($this->length($fname, 25, 4) && $this->length($lname, 25, 4)) {\n\t\t\t\t\t\t$result = $this->change(\"user_login\", \"user_fname\", $fname , $_SESSION['userid']);\n\t\t\t\t\t\t$result1 = $this->change(\"user_login\", \"user_lname\", $lname , $_SESSION['userid']);\n\t\t\t\t\t\tif($result == false || $result1 == false) {\n\t\t\t\t\t\t\t$this->re_direct(\"profile\", \"Failed\");\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$this->re_direct(\"profile\", \"Successfull\");\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->re_direct(\"profile\", \"Error=toobigOrtooSmall\");\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$this->re_direct(\"profile\", \"invalid=name\");\n\t\t\t\t}\n\t\t\t}\n\t\t}", "private function saveUser(?User $oldUser, ?User $newUser)\n {\n if ($oldUser !== $newUser) {\n if ($oldUser && !$oldUser->isLocked()) {\n $this->userManager->save($oldUser);\n }\n if ($newUser && !$newUser->isLocked()) {\n $this->userManager->save($newUser);\n }\n }\n }", "function putData($username, $data) {\n\t\t$dbObject = getDatabase();\n\t\t\n\t\t// we need to check if the user exists, and if so put the data, if not create the data\n\t\t$sql = \"select * from users where users_username='$username'\";\n\t\t$res = $dbObject->query($sql);\n\t\tif($res->fetchColumn() > 0) {\n\t\t\t// do update\n\t\t\terror_log(\"doing userdata update\");\n\t\t\t$sql = \"update users set users_tokendata='$data' where users_username='$username'\";\n\t\t} else {\n\t\t\t// do insert\n\t\t\terror_log(\"doing user data create\");\n\t\t\t$sql = \"insert into users values (NULL, '$username', '', '', '$data', '')\";\n\t\t}\n\t\t\n\t\tif($dbObject->query($sql)) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\n\t}", "function setUserName($newVal)\r\n\t{\r\n\t\t$this->UserName = $newVal;\r\n\t}", "private function handleKeyUsername(UserInterface $user, Request $request) {\n $data = $request->request->all();\n\n if (array_key_exists('username', $data)) {\n // Change username only if username is changed\n if ($data['username'] != $user->getUsername()) {\n // Check if username is already taken\n $user1 = $this->container->get('fos_user.user_manager')->findUserByUsernameOrEmail($data['username']);\n if (null != $user1) {\n $this->logAndThrowError(400, 'Already taken by Username: '.$user1->getUsername(), $this->get('translator')->trans('api.show_error_username_taken', array(), 'messages', $request->getLocale()), $request->getLocale());\n }\n $user->setUsername($data['username']);\n }\n }\n }", "function editInfo($user) {\n\n if (isset ($_POST ['submit'])) {\n $newUsername = trim(strip_tags($_POST['username']));\n $newFirstName = trim(strip_tags($_POST['firstname']));\n $newLastName = trim(strip_tags($_POST['lastname']));\n $newEmail = trim(strip_tags($_POST['email']));\n\n if(!empty($_POST['username']) AND !empty($_POST['email']) AND !empty($_POST['firstname'] AND !empty($_POST['lastname']))) {\n\n if(strlen($newUsername) <= 100 && strlen($newFirstName) <= 100 && strlen($newLastName) <= 100) {\n\n if (filter_var($newEmail, FILTER_VALIDATE_EMAIL)){\n\n $bdd = dbConnect();\n $reqmail = $bdd->prepare(\"SELECT * FROM user WHERE email = ?\");\n $reqmail->execute(array($newEmail));\n\n if ($reqmail->rowCount() > 0){\n $result = $reqmail->fetch(PDO::FETCH_ASSOC);\n if ($result['username'] == $user) // We can replace its old mail with the same one\n $mailexist = 0;\n else\n $mailexist = 1;\n }\n\n $requsername = $bdd->prepare(\"SELECT * FROM user WHERE username = ?\");\n $requsername->execute(array($newUsername));\n\n if ($requsername->rowCount() > 0){\n $result = $requsername->fetch(PDO::FETCH_ASSOC);\n if ($result['username'] == $user) // We can replace its old username with the same one\n $usernameexist = 0;\n else\n $usernameexist = 1;\n }\n\n if($mailexist == 0) {\n if($usernameexist == 0) {\n try {\n $stmt = $bdd->prepare(\"UPDATE user SET username=:newUsername, first_name=:newFirstName, last_name=:newLastName, email=:newEmail WHERE username=:username\");\n $stmt->execute(array(\n 'newUsername' => $newUsername,\n 'newFirstName' => $newFirstName,\n 'newLastName' => $newLastName,\n 'newEmail' => $newEmail,\n 'username' => $user\n ));\n $_SESSION['username'] = $newUsername;\n }\n catch(PDOException $e) {\n echo $sql . \"<br>\" . $e->getMessage();\n }\n return 0;\n\n } else\n return -3; // Username already used\n } else\n return -2; // Mail already used\n }\n }\n }\n }\n\n return -1;\n\n }", "public function __construct($newUsername){\n $this -> loadUser($newUsername);\n }", "public function updateProfileFor($username, $updatedData)\n {\n $profile = User::whereUsername($username)->firstOrFail()->profile;\n $profile->fill($updatedData)->save();\n }", "public function put($arguments = []) {\n try {\n //Attempt to update the row.\n $this->dbh->query($this->query_array['put'], $arguments);\n $this->result_array['new_username'] = $arguments['new_username'];\n } catch (PDOException $e) {\n $this->result_array['ok'] = false;\n if ($e->errorInfo[1] == 19) {\n //We've got a duplicate entry for the username.\n $this->result_array['error'] = 'Username already exists!';\n } else {\n //Other error.\n $this->result_array['error'] = $e->getMessage();\n }\n }\n }", "public function testUpdateInvalidUser() {\n\t\t// create a USer and try to update it without actually inserting it\n\t\t$user = new User(null, $this->VALID_SALT, $this->VALID_HASH, $this->VALID_EMAIL, $this->VALID_NAME);\n\t\t$user->update($this->getPDO());\n\t}", "function transferOwnership($oldUserId, $newUserId) {\n\t\t$submissionFiles =& $this->_getInternally(null, null, null, null, null, null, null, $oldUserId, null, null);\n\t\tforeach ($submissionFiles as $file) {\n\t\t\t$daoDelegate =& $this->_getDaoDelegateForObject($file);\n\t\t\t$file->setUploaderUserId($newUserId);\n\t\t\t$daoDelegate->updateObject($file, $file); // nothing else changes\n\t\t}\n\t}", "public function testUpdateUserGetsHandled()\n {\n $handler = new UpdateUserHandler(\n new EncoderFactory([User::class => new PlaintextPasswordEncoder()]),\n $this->userRepositoryCollection\n );\n\n $user = $this->userRepository->findByUsername('wouter');\n $originalUser = clone $user;\n\n $baseUserTransferObject = UserDataTransferObject::fromUser($user);\n $baseUserTransferObject->displayName = 'test';\n $baseUserTransferObject->plainPassword = 'randomPassword';\n $baseUserTransferObject->email = '[email protected]';\n\n $handler->handle($baseUserTransferObject);\n\n $this->assertNotEquals(\n 'test',\n $this->userRepository->findByUsername('wouter')->getUsername()\n );\n $this->assertEquals(\n 'test',\n $this->userRepository->findByUsername('wouter')->getDisplayName()\n );\n $this->assertEquals(\n 'randomPassword{' . $this->userRepository->findByUsername('wouter')->getSalt() . '}',\n $this->userRepository->findByUsername('wouter')->getPassword()\n );\n $this->assertNotEquals(\n $originalUser->getDisplayName(),\n $this->userRepository->findByUsername('wouter')->getDisplayName()\n );\n $this->assertNotEquals(\n $originalUser->getPassword(),\n $this->userRepository->findByUsername('wouter')->getPassword()\n );\n }", "function updateUsers($newUser,$action){\n if($action == \"add\"){\n array_push($this->names,$newUser);\n }\n elseif($action == \"remove\"){\n $index = array_search($newUser,$this->names);\n array_splice($this->names,$index,1);\n }\n }", "public function SetUserName ($userName);", "public function rename(Storable $storable, string $newName): void;", "public function updateUsername($user){\n\t\tUser::where('id', $this->id)\n\t\t\t->update([\n\t\t\t\t'name' => $user['username'],\n\t\t\t\t'updated_by' => $user['username']\n\t\t]);\n\t}", "public function setUserProfileName(string $newUserProfileName): void {\n\t\t$newUserProfileName = trim($newUserProfileName);\n\t\t$newUserProfileName = filter_var($newUserProfileName, FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES);\n\t\tif(empty($newUserProfileName) === true) {\n\t\t\tthrow(new \\InvalidArgumentException(\"input is empty or insecure\"));\n\t\t}\n\t\tif(strlen($newUserProfileName) > 32) {\n\t\t\tthrow(new \\RangeException(\"Unfortunately, this is too long to store.\"));\n\t\t}\n\t\t$this->userProfileName = $newUserProfileName;\n\t}", "public function setUName($newName)\n\t{\t\tif (updateContact($id, 'uname', $newName))\n\t\t{\n\t\t\t$this->uname = $newName;\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function promoteUser($username, $rankID) {\n $stmt = $this->connection->prepare(\"UPDATE \".DB_USER_TABLE.\"\n SET \".COL_USER_RANK.\" = ?\n WHERE \".COL_USER_USERNAME.\" = ?\");\n $stmt->bind_param(\"is\", $rankID, $username);\n return $stmt->execute();\n }", "function update_username($args) {\n //check input to make sure everything is set.\n if (!isset($args['uid']) || !$args['uid'])\n throw new Zim_Exception_UIDNotSet();\n if (!isset($args['uname']) || empty($args['uname']) || trim($args['uname']) == '') {\n $args['uname'] = UserUtil::getVar('uname', $args['uid']);\n } \n $args['uname'] = trim($args['uname']);\n $q = Doctrine_Query::create()\n ->update('Zim_Model_User')\n ->set('uname', \"?\", $args['uname'])\n ->where('uid = ?', $args['uid']);\n $result = $q->execute();\n \n $q = Doctrine_Query::create()\n ->from('Zim_Model_User user')\n ->where('user.uid = ?', $args['uid'])\n ->limit(1);\n $contact = $q->fetchOne();\n $contact = $contact->get('uname');\n \n if (!isset($result) || $result == 0) {\n if ($contact != $args['uname']) {\n throw new Zim_Exception_UsernameCouldNotBeUpdated();\n }\n }\n\n //return the users uname\n return $contact;\n }", "function setUserName($userName);", "public function testSaveOtherUser()\n {\n // verify we cannot swap to an invalid user\n $this->assertFalse(User::exists('swapped'));\n $change = Change::fetch('default');\n\n try {\n $change->setDescription('Test submit')\n ->setUser('swapped')\n ->save();\n $this->fail('should not have worked');\n } catch (CommandException $e) {\n $this->assertSame(\n \"Command failed: Error in change specification.\\nUser swapped doesn't exist.\",\n $e->getMessage()\n );\n }\n\n\n // add the user swapped to make later attempts work\n $user = new User;\n $user->setId('swapped')->setEmail('[email protected]')->setFullName('Swapped User')->save();\n\n\n // verify set user works on existing change\n $change = Change::fetch('default');\n $change->setDescription('Test submit2')\n ->save();\n\n $this->assertSame('tester', Change::fetch(1)->getUser());\n\n $change = Change::fetch(1);\n $change->setUser('swapped')->save();\n\n $this->assertSame('swapped', Change::fetch(1)->getUser());\n\n\n // verify out of the gate set user works\n $change = Change::fetch('default');\n $change->setDescription('Test submit')\n ->setUser('swapped')\n ->save();\n\n $this->assertSame('swapped', Change::fetch(2)->getUser());\n }", "public static function saveUser(User $newUser) {\n // Checks if user already exists\n $users = self::getUsers();\n $index = 0;\n $size = count($users);\n $found = false;\n while ($index < $size && $found === FALSE) {\n $obj = unserialize($users[$index]);\n if ($obj->getName() == $newUser->getName()) {\n $found = $index;\n } else {\n $index++;\n }\n }\n if ($found !== FALSE) {\n $users[$index] = serialize($newUser);\n } else {\n array_push($users, serialize($newUser));\n }\n file_put_contents(self::$usersFile, json_encode($users));\n }", "public function testSetAndGetUserName()\r\n {\r\n $testObj = $this->_createMockModel();\r\n $baseObj = $this->_createMockModel();\r\n\r\n // Set the Username\r\n $testObj->setUserName('testUserName');\r\n\r\n // Assert that a change occurred in the test object\r\n $this->assertNotEquals($testObj, $baseObj);\r\n\r\n // Assert that Username field was updated\r\n $this->assertEquals('testUserName', $testObj->getUserName());\r\n\r\n // Assert that no other return values were affected\r\n $this->_assertModelsSameExcept($testObj, $baseObj, 'UserName');\r\n }", "public function insertUsernameChangeLog(\n\t\t$userId, $oldUsername, $newUsername, $visible = true, $changeUserId = null, $changeDate = null\n\t): \\XF\\Entity\\UsernameChange\n\t{\n\t\tif ($changeUserId === null)\n\t\t{\n\t\t\t$changeUserId = \\XF::visitor()->user_id;\n\t\t}\n\n\t\t/** @var \\XF\\Entity\\UsernameChange $entry */\n\t\t$entry = $this->em->create('XF:UsernameChange');\n\n\t\t$entry->bulkSet([\n\t\t\t'user_id' => $userId,\n\t\t\t'old_username' => $oldUsername,\n\t\t\t'change_state' => 'approved',\n\t\t\t'change_user_id' => $changeUserId,\n\t\t\t'visible' => $visible\n\t\t]);\n\n\t\t// this method is for logging changes that are happening, not for validating the change itself,\n\t\t// so we need to force this through.\n\t\t$entry->setTrusted('new_username', $newUsername);\n\n\t\tif ($changeDate !== null)\n\t\t{\n\t\t\t$entry->change_date = $changeDate;\n\t\t}\n\n\t\t$entry->save();\n\n\t\treturn $entry;\n\t}", "Public Function RestoreUser($ID)\n\t{\n\t\t$Data = array('deleted'=>0);\n\t\t$this->_db->update('bevomedia_user', $Data, 'id = ' . $ID);\n\t\t$this->_db->update('bevomedia_user_info', $Data, 'id = ' . $ID);\n\t}", "public function setUser2($username, $keys)\n {\n $keys = $this->setKeys($keys);\n $this->user2 = array_merge(array('username'=>$username), $keys);\n $this->setFilename($username);\n }", "public function testUpdateUser()\n {\n }", "function updateUser( &$user ){\n $user->setName($this->getFasUsername());\n $user->mEmail = strtolower($user->getName()).\"@fedoraproject.org\";\n //error_log(\"FAS [updateUser]: \" . $user->getName() . \", \" . $this->getFasUsername(), 0);\n return true;\n }", "public function switchUser($username, $switch_back=True) {\r\n if ($switch_back) {\r\n // get user entry in database.\r\n $findUserID = intval($this->dbConn->queryFirstValue(\"SELECT `userid` FROM `seinma_llusers`.`ll_users` WHERE `username` = \".$this->dbConn->quoteSmart($username).\" LIMIT 1\"));\r\n if (!$findUserID) {\r\n return array(\"location\" => \"main.php\", \"status\" => \"The given user to switch to doesn't exist in the database.\", 'class' => 'error');\r\n }\r\n $newUser = new User($this->dbConn, $findUserID);\r\n $newUser->switched_user = $_SESSION['id'];\r\n $_SESSION['lastLoginCheckTime'] = $newUser->lastLoginCheckTime = microtime(true);\r\n $_SESSION['id'] = $newUser->id;\r\n $_SESSION['switched_user'] = $newUser->switched_user;\r\n } else {\r\n $newUser = new User($this->dbConn, $_SESSION['switched_user']);\r\n $_SESSION['id'] = $newUser->id;\r\n $_SESSION['lastLoginCheckTime'] = microtime(true);\r\n unset($_SESSION['switched_user']);\r\n }\r\n return array(\"location\" => \"main.php\", \"status\" => \"Successfully switched to \".escape_output($newUser->username).\".\".(($switch_back) ? \" LOG OUT OR SWITCH BACK WHEN YOU ARE DONE.\" : \"\"), 'class' => 'success');\r\n }", "function set_comusername($new_username)\n {\n $this->username = $new_username;\n }", "function renameFolder($oldName,$newName){\r\n\t\t\t\t// open the user's directory\r\n\t\t\t\t\t$path = './cloud/'.$_SESSION['SESS_USER_ID'].'/'; // '.' for current\r\n\r\n\r\n\t\t\t}", "public function setUserName($value) { $this->setState('__username',$value); }", "protected function update_username($username,$not_strict = false) : bool\n {\n\n\n if(empty($username))\n\n return $not_strict;\n\n\n $username = constraint::htmlspecialchars($username)[0];\n\n\n $username_exist = $this->isUsernameExist($username);\n\n\n if($username_exist)\n\n return false;\n\n\n $this->update_info([\"user_url\" => $username]);\n\n\n /** @var password , set_session_key() update sessions */\n\n $this->username = $username;\n $this->set_session_key();\n\n\n return true;\n\n\n\n }", "function change_username(){\n\t\t$result=$this->ObjM->all_user_cng_user();\n\t\t\tfor($i=0;$i<count($result);$i++)\n\t\t\t{\n\t\t\t\t$data['username']=$result[$i]['phone_no'];\n\t\t\t\t$this->ObjM->update($data,'user_master',array('user_type_id'=>'3','status'=>'Active','usercode'=>$result[$i]['usercode']));\n\t\t\t\t//echo $this->db->last_query();\n\t\t\t\t//exit;\n\t\t\t}\n\t\t\n\t}", "protected function beforeUserSave(DeveloperToUserConversionResult $result) : void {\n // Abort the operation if any of these special problems occurred\n // meanwhile the conversation.\n foreach ($result->getProblems() as $problem) {\n // Skip user save if username is already taken or the username\n // is too long instead of getting a database exception in a lower layer.\n // (Username field's value is not limited on Apigee Edge and it is not\n // unique either.)\n if (($problem instanceof DeveloperToUserConversationInvalidValueException) && $problem->getTarget() === 'name') {\n throw $problem;\n }\n }\n // It's necessary because changed time is automatically updated on the\n // UI only.\n $result->getUser()->setChangedTime(\\Drupal::time()->getCurrentTime());\n }", "function renameFile($newName, $currentName)\n{\n session_start();\n include_once 'parentDataClass.php';\n mysqli_report(MYSQLI_REPORT_STRICT);\n try\n {\n $conn = new mysqli(HOST, USER, PASSWORD, NAME, PORT);\n }\n catch (Exception $e)\n {\n setErrorMsg(\"Error adding file, please try again later!\",DASHBOARD_PATH);\n }\n \n //Parameters\n $email = '';\n $date_modified = date(\"Y-m-d h:i:sa\");\n \n if(isset($_SESSION['email']))\n {\n $email = $_SESSION['email'];\n }\n \n $query = \"UPDATE user_files f SET file_name=?, date_modified=? WHERE file_name=? AND f.user_details_id=\"\n . \"(Select user_details_id From user_details d WHERE d.user_details_id = f.user_details_id AND email=?);\";\n \n if(!$statement = $conn->prepare($query))\n {\n setErrorMsg('SQL Error: ' . $conn->error, DASHBOARD_PATH);\n mysqli_close($conn);\n }\n else\n {\n //Set statement and bind parameters\n $statement = $conn->prepare($query);\n $statement->bind_param(\"ssss\", $newName, $date_modified, $currentName, $email);\n $statement->execute();\n mysqli_close($conn);\n header('Location:' . DASHBOARD_PATH);\n }\n}", "public function modify_user($user);", "protected function apiRename($args)\n {\n // Check rename possibility\n if (Settings::get('usercanchangename') != \"1\") {\n throw new ThreadProcessorException(\n 'server: forbidden to change name',\n ThreadProcessorException::ERROR_FORBIDDEN_RENAME\n );\n }\n\n // Load thread\n $thread = self::getThread($args['threadId'], $args['token']);\n\n // Check if new name exists\n self::checkParams($args, array('name'));\n\n //Rename user\n $thread->renameUser($args['name']);\n // Update user name in cookies\n $data = strtr(base64_encode($args['name']), '+/=', '-_,');\n\n $cookie_properties = array( 'expires' => time() + 60 * 60 * 24 * 365 );\n if (version_compare(phpversion(), '7.3.0', '<')) {\n setcookie(USERNAME_COOKIE_NAME, $data, $cookie_properties['expires']);\n } else {\n if ($this->currentRequest && $this->currentRequest->isSecure()) {\n $cookie_properties['samesite'] = 'None';\n $cookie_properties['secure'] = true;\n }\n setcookie(USERNAME_COOKIE_NAME, $data, $cookie_properties);\n }\n }", "public function recoverUsername() {\n\t\tif(!check($this->_email)) throw new Exception(lang('error_4',true));\n\t\t\n\t\t$accountData = $this->getAccountData();\n\t\tif(!is_array($accountData)) throw new Exception(lang('error_12',true));\n\t\t$this->setUsername($accountData[_CLMN_USERNM_]);\n\t\t\n\t\tif(!$this->_sendUsernameRecoveryEmail()) throw new Exception(lang('error_25',true));\n\t}", "function updateUser() {\n\t\tif ($this->id == null || $this->id == 0) return false;\n\n\t\t$db = getDb();\n\n\t\t$update_query = \"UPDATE user_table SET\n\t\tuser_name = '$this->username',\n\t\tuser_password = '$this->password',\n\t\tuser_first_name = '$this->firstName',\n\t\tisAdmin = '$this->isAdmin',\n\t\tuser_last_name = '$this->lastName' WHERE user_id = '$this->id';\";\n\n\t\t$result = mysqli_query($db, $update_query);\n\n\t\tmysqli_close($db);\n\n\t\tif (!$result) return false;\n\n\t\treturn true;\n\n\t}", "public function updateUser( UserDataInf $user )\n {\n \n $userName = $user->getName();\n \n $userId = $this->getUserId( $userName );\n $passwd = Password::passwordHash( $user->getPasswd() );\n \n $sqlUser = <<<SQL\nUPDATE wbfsys_role_user\nSET\n name = '{$userName}', \n inactive = FALSE, \n non_cert_login = TRUE,\n profile = '{$user->getProfile()}',\n level = '{$user->getLevel()}',\n password = '{$passwd}'\nWHERE rowid = {$userId}\n;\nSQL;\n \n $this->db->update( $sqlUser );\n \n $personId = $this->db->select( 'SELECT id_person from wbfsys_role_user where rowid = '.$userId );\n \n \n $sqlPerson = <<<SQL\nUPDATE core_person\nSET\nfirstname = '{$user->getFirstname()}', \nlastname = '{$user->getLastname()}'\nWHERE rowid = {$personId};\nSQL;\n\n $this->db->update( $sqlPerson );\n \n }", "public function changeUser($parameters):void\n {\n \n if(isset($parameters['idUser']))$this->idUser = $parameters[\"idUser\"];\n if(isset($parameters['nameUser']))(string) $this->nameUser = $parameters['nameUser'];\n if(isset($parameters['emailUser']))(string) $this->emailUser = $parameters['emailUser'];\n if(isset($parameters['passwordUser']))$this->passwordUser = $parameters[\"passwordUser\"];\n if(isset($parameters['genderUser']))(string) $this->genderUser = $parameters['genderUser'];\n if(isset($parameters['birthDateUser']))$this->birthDateUser = new \\DateTime($parameters['birthDateUser']);\n if(isset($parameters['birthDateUser']))$this->birthDateUser = $this->birthDateUser->format('YYYY-MM-DD');\n if(isset($parameters['dateCreationUser']))(string) $this->dateCreationUser = $parameters['dateCreationUser'];\n if(isset($parameters['permissionUser']))$this->permissionUser = $parameters['permissionUser'];\n \n }", "function userUpdate(User $new, ?User $old);", "private function processUpdateUser(){\n\n\t\tif($_FILES[\"foto_usuario\"][\"error\"] == 0){\n\t\t\t$randNumber = rand(0, 999999);\n\t\t\t$imgName = $randNumber . $_FILES['foto_usuario']['name'];\n\t\t\t$image_upload = Config::$userDirImage . $imgName;\n\t\t\tif (move_uploaded_file($_FILES['foto_usuario']['tmp_name'], $image_upload)) {\n\t\t\t\t$result = $this->users->updateUser($_REQUEST[\"idusuario\"], $imgName); //Devuelve 1 si inserta user\n\t\t\t\tif($result){\n\t\t\t\t\tif($_REQUEST[\"nombre_foto\"] != \"\")\n\t\t\t\t\t\tunlink(Config::$userDirImage.$_REQUEST[\"nombre_foto\"]);\n\t\t\t\t\tView::redireccion(\"user\", \"userController\");\n\t\t\t\t} else {\n\t\t\t\t\tunlink($image_upload);\n\t\t\t\t\techo \"Ocurrio un error al insertar el usuario.\";\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\techo \"Ocurrio un error al guardar el archivo.\";\n\t\t\t}\n\t\t} else {\n\t\t\techo \"Ocurrio un error al cargar el archivo.\";\n\t\t}\n\t}", "function gratis_preprocess_username(&$vars) {\n // Update the username so it's the full name of the user.\n $account = $vars['account'];\n\n // Revise the name trimming done in template_preprocess_username.\n $name = $vars['name_raw'] = format_username($account);\n\n // Trim the altered name as core does, but with a higher character limit.\n if (drupal_strlen($name) > 35) {\n $name = drupal_substr($name, 0, 18) . '...';\n }\n\n // Assign the altered name to $vars['name'].\n $vars['name'] = check_plain($name);\n}", "protected function _setupUser($username) {}", "public function UpdateAvatar($username, $filename)\n {\n $nono = new db($this->returnType);\n $query = \"update players set avatarpath='$filename' where username='$username';\";\n $nono->InsertQuietly($query);\n }", "public function testCannotEditOtherUser()\n {\n $faker = \\Faker\\Factory::create();\n $user = factory(User::class)->create();\n $user->activate();\n $other = factory(User::class)->create();\n $other->activate();\n $newName = $faker->name;\n Auth::login($other);\n \n $this->put('/api/v1/user/'.$user->id, ['name' => $newName], ['HTTP_X-Requested-With' => 'XMLHttpRequest'])\n ->assertStatus(403);\n $this->assertDatabaseHas('users', [\n 'name' => $user->name,\n 'email' => $user->email\n ]);\n }", "function setUsername($Username);", "public function setUserAvatar(&$newUserAvatar){\n //check if null\n if($newUserAvatar === null){\n $this->userAvatar = null;\n return;\n }\n \n //create the white list of allowed types\n $goodExtensions = array(\"jpg\", \"jpeg\", \"png\");\n $goodMimes = array(\"image/jpeg\", \"image/png\");\n\n //verify the file was uploaded ok\n if($newUserAvatar[\"error\"] !== UPLOAD_ERR_OK) {\n throw(new RunTimeException (\"error while uploading file: \" . $newUserAvatar[\"error\"]));\n }\n\n //verify the file is an allowed extension and type\n $extension = strtolower(end(explode(\".\", $newUserAvatar[\"name\"])));\n if(in_array($extension, $goodExtensions) === false \n || in_array($newUserAvatar[\"type\"], $goodMimes) === false ) {\n throw(new RuntimeException($newUserAvatar[\"name\"]. \" is not a JPEG or PNG file\"));\n }\n \n //move the file to its peramanent home\n $destination = \"/var/www/html/group-out/images/user\";\n //sanitize file name for security reasons\n $fileName = \"avatar-\". $this->userProfileId . \".$extension\";\n if(move_uploaded_file($newUserAvatar[\"tmp_name\"], \"$destination/$fileName\") === false) {\n throw(new RuntimeException(\"Unable to move file\"));\n\n }\n \n //sets value for user's avatar\n $this->userAvatar = \"$destination/$fileName\";\n \n }", "public function update()\n { if (is_null($this->id))\n trigger_error(\"User::update(): Attempt to update a User object that does not have its ID property set.\", E_USER_ERROR);\n \n // Update the User\n $conn = new PDO(DB_DSN, DB_USER, DB_PASS);\n $sql = \"UPDATE users SET user_name=:user_name, user_password_hash=:user_password_hash, user_email=:user_email, orcid=:orcid, orcid_code=:orcid_code, orcid_access_token=:orcid_access_token WHERE user_id = :id\";\n $st = $conn->prepare($sql);\n $st->bindValue(\":user_name\", $this->userName, PDO::PARAM_STR);\n $st->bindValue(\":user_password_hash\", $this->userPasswordHash, PDO::PARAM_STR);\n\t$st->bindValue(\":user_email\", $this->userEmail, PDO::PARAM_STR);\n $st->bindValue(\":orcid\", $this->orcid, PDO::PARAM_STR);\n $st->bindValue(\":orcid_code\", $this->orcidCode, PDO::PARAM_STR);\n $st->bindValue(\":orcid_access_token\", $this->orcidAccessToken, PDO::PARAM_STR);\n $st->bindValue(\":id\", $this->id, PDO::PARAM_INT);\n $st->execute();\n $conn = null;\n }", "public function check_new_username($username){\n\t\t\t$error['error_exists'] = false;\n\t\t\t$error['error_message'] = false;\n\n\t\t\tif (strlen($username) < $this->min_user_name_length){\n\t\t\t\t$error['error_exists'] = true;\n\t\t\t\t$error['error_message'] = $this->len_user_name_error_msg;\n\t\t\t}\n\t\t\telse if (strlen($username) >= $this->max_user_name_length){\n\t\t\t\t$error['error_exists'] = true;\n\t\t\t\t$error['error_message'] = $this->len_user_name_error_msg;\n\t\t\t}\n\n\t\t\telse if (preg_match($this->main_user_name_char_regex, $username)){\n\t\t\t\t$error['error_exists'] = true;\n\t\t\t\t$error['error_message'] = $this->char_user_name_error_msg;\n\t\t\t}\n\n\t\t\treturn $error;\n\n\t\t}", "public function updateUser($old_in, $new_in)\n {\n $em = $this->doctrine->getEntityManager();\n $user = $em->getRepository('CmarMeetingBundle:User')->findOneBy(array('login' => $old_in->{'login'}));\n \n if (!$user) {\n throw new \\LogicException(\"The user does not exist\", -1);\n } \n $old_user = new User();\n $this->mapUser($old_user, $old_in);\n\n $this->mapUser($user, $new_in);\n $errors = $this->validator->validate($user);\n if (count($errors) > 0) {\n throw new \\LogicException(\"Validation Exception \\\"\" . $errors[0]->getPropertyPath() . \"\\\": \" . $errors[0]->getMessageTemplate(), -1);\n } \n\n $em->persist($user);\n \n try {\n $em->flush();\n } catch (\\Exception $e) {\n $this->logger->info(\"DDBB Exception\"); \n throw new \\LogicException(\"DDBB Exception\", -1);\n }\n \n\n try {\n $id_user = $this->adoAdmin->principalFindByEmail($old_user->getEmail());\n //TODO comprobar si cambiamos esta frase al actualizar usuario o no\n $sal = $this->adoAdmin->principalUpdate($user->getLogin(), $user->getEmail(), $old_user->getPassword(), $user->getName(), $user->getSurname(), \"Automatically updated user in meeting\", $id_user);\n $sal2 = $this->adoAdmin->updateUserPassword($user, $user->getPassword(), $id_user);\n } catch (\\Exception $e) {\n $this->logger->info(\"User does not updated\"); \n throw new \\LogicException(\"User does not updated\", -1);\n }\n }", "public function update(Request $request, $id)\n {\n\n $validator = Validator::make($request->all(), [\n 'name' => 'required|max:255',\n 'position' => 'required|max:255',\n 'functional_unit' => 'required',\n 'isActivated' => 'required',\n 'role' => 'required',\n 'profile_photo' => 'image|nullable|max:5000'\n ], $this->custom_messages);\n\n\n //Check if new username alredy exists\n $old_user = User::find($id);\n if($request->username === $old_user->username){\n $validator->validate();\n }else{\n $username = User::where('username', $request->username)->pluck('username');\n \n if(count($username) === 0){\n $validator->validate();\n }else{\n \n $validator->after(function ($validator) {\n $validator->errors()->add('username', 'The username has already been taken.');\n });\n $validator->validate();\n \n }\n }\n\n\n\n\n $user = User::find($id);\n $log = new Log;\n $log->name = Auth::user()->name;\n $log->action = 'EDIT';\n $log->module = 'USER';\n $log->description = 'Updated user Name: ' . $user->name . ' Position: ' . $user->position;\n $log->save();\n\n $fileNameToStore = '';\n $this->get_photo($request, $fileNameToStore, $user->profile_photo);\n\n \n //if the user account is uograded to admin account\n if($request->role === 'admin'){\n $this->update_user($request, $request->role, '1,1,1,1,1,1,1,1,1,1,1,1', $fileNameToStore, $id);\n return redirect('/sysmg/accounts');\n\n }\n\n //if admin account is downgraded to employee\n if($request->role === 'employee' && $user->role === 'admin'){\n $this->update_user($request, $request->role, '1,0,0,1,0,0,1,0,0,1,0,0', $fileNameToStore, $id);\n return redirect('/sysmg/accounts');\n\n }\n\n //if admin account is downgraded to manager\n if($request->role === 'manager' && $user->role === 'admin'){\n $this->update_user($request, $request->role, '1,1,1,1,1,1,1,1,1,1,1,1', $fileNameToStore, $id);\n return redirect('/sysmg/accounts');\n\n }\n\n //if manager account is downgraded to employee\n if($request->role === 'employee' && $user->role === 'manager'){\n $this->update_user($request, $request->role, '1,0,0,1,0,0,1,0,0,1,0,0', $fileNameToStore, $id);\n return redirect('/sysmg/accounts');\n\n }\n\n //if employee account is upgraded to manager\n if($request->role === 'manager' && $user->role === 'employee'){\n $this->update_user($request, $request->role, '1,0,0,1,0,0,1,0,0,1,0,0', $fileNameToStore, $id);\n return redirect('/sysmg/accounts');\n }\n\n\n\n $temp_permission = [\"0\", \"0\", \"0\", \"0\", \"0\", \"0\", \"0\", \"0\", \"0\", \"0\", \"0\", \"0\"];\n $this->process_permission_array($request, $temp_permission);\n \n $this->update_user($request, $request->role, $temp_permission, $fileNameToStore, $id);\n return redirect('/sysmg/accounts');\n\n \n }", "public function testUpdateValidUser() {\n\t\t// Count the number of rows and save it for later\n\t\t$numRows = $this->getConnection()->getRowCount(\"user\");\n\t\t// Create a new User and insert to into mySQL\n\t\t$userId = generateUuidV4();\n\t\t$user = new User($userId, $this->VALID_ACTIVATION, $this->VALID_USEREMAIL, $this->VALID_HASH, $this->VALID_USERNAME);\n\t\t$user->insert($this->getPDO());\n\t\t// Edit the User and update it in mySQL\n\t\t$user->setUserName($this->VALID_USERNAME);\n\t\t$user->update($this->getPDO());\n\t\t// Grab the data from mySQL and enforce the fields match our expectations\n\t\t$pdoUser = User::getUserByUserId($this->getPDO(), $user->getUserId());\n\t\t$this->assertEquals($numRows + 1, $this->getConnection()->getRowCount(\"user\"));\n\t\t$this->assertEquals($pdoUser->getUserId(), $userId);\n\t\t$this->assertEquals($pdoUser->getUserActivationToken(), $this->VALID_ACTIVATION);\n\n\t\t$this->assertEquals($pdoUser->getUserEmail(), $this->VALID_USEREMAIL);\n\t\t$this->assertEquals($pdoUser->getUserHash(), $this->VALID_HASH);\n\t\t$this->assertEquals($pdoUser->getUserName(), $this->VALID_USERNAME);\n\t}", "public function testUpdateValidUser() {\n\t\t// count the number of rows and save it for later\n\t\t$numRows = $this->getConnection()->getRowCount(\"user\");\n\n\t\t// create a new user and insert to into mySQL\n\t\t$user = new User(null, $this->VALID_SALT, $this->VALID_HASH, $this->VALID_EMAIL, $this->VALID_NAME);\n\t\t$user->insert($this->getPDO());\n\n\t\t// edit the user and update it in mySQL\n\t\t$user->setHash($this->VALID_HASH);\n\t\t$user->update($this->getPDO());\n\n\t\t// grab the data from mySQL and enforce the fields match our expectations\n\t\t$pdoUser = User::getUserByUserId($this->getPDO(), $user->getUserId());\n\t\t$this->assertSame($numRows + 1, $this->getConnection()->getRowCount(\"user\"));\n\t\t$this->assertLessThan($pdoUser->getUserId(), 0);\n\t\t$this->assertSame($pdoUser->getSalt(), $this->VALID_SALT);\n\t\t$this->assertSame($pdoUser->getHash(), $this->VALID_HASH);\n\t\t$this->assertSame($pdoUser->getEmail(), $this->VALID_EMAIL);\n\t\t$this->assertSame($pdoUser->getName(), $this->VALID_NAME);\n\t}", "function HookAuto_groupTeam_userReplace_create_user_save(){\n\tglobal $lang,$baseurl_short;\n\tif (getval(\"newuser\",\"\")!=\"\" && getval(\"auto_group\",\"\")==\"yes\"){\n\t\t$new=getvalescaped(\"newuser\",\"\");\n\t\t# Username already exists?\n\t\t$c=sql_value(\"select count(*) value from user where username='$new'\",0);\n\t\tif($c>0){\n\t\t\t$error=$lang[\"useralreadyexists\"];\n\t\t\treturn false;\n\t\t}\n\t\telse{\n\t\t\tredirect($baseurl_short.\"plugins/auto_group/pages/new_group.php?username=\" . $new);\n\t\t}\n\t}\n}", "function delUser($username){\n // Reading names from file\n $file=fopen($path.$this->fPasswd,\"r\");\n $i=0;\n while($line=fgets($file,200)){\n $lineArr=explode(\":\",$line);\n if($username!=$lineArr[0]){\n $newUserlist[$i][0]=$lineArr[0];\n $newUserlist[$i][1]=$lineArr[1];\n $i++;\n }else{\n $deleted=true;\n }\n }\n fclose($file);\n\n // Writing names back to file (without the user to delete)\n $file=fopen($path.$this->fPasswd,\"w\");\n for($i=0;$i<count($newUserlist);$i++){\n fputs($file,$newUserlist[$i][0].\":\".$newUserlist[$i][1].\"\\n\");\n }\n fclose($file);\n \n if($deleted==true){\n return true;\n }else{\n return false;\n }\n }", "abstract protected function getOldName();", "public function writeNewUser () {\n if (! $this->Writeable()){\n throw new Exception('User object is not writeable, cannot write to DB');\n }\n\n if ($this->exists($this->loginId)) {\n throw new Exception('User already exists, cannot be created');\n }\n\n $i = new folksoDBinteract($this->dbc);\n if ($i->db_error()) {\n throw new Exception('DB connect error: ' . $i->error_info());\n }\n\n $i->sp_query(\n sprintf(\"call create_user(\"\n .\"'%s', '%s', '%s', '%s', '', %d, '%s', '%s', '%s')\",\n $i->dbescape($this->nick),\n $i->dbescape($this->firstName),\n $i->dbescape($this->lastName),\n $i->dbescape($this->email),\n $i->dbescape($this->loginId),\n $i->dbescape($this->institution),\n $i->dbescape($this->pays),\n $i->dbescape($this->fonction)));\n\n if ($i->result_status == 'DBERR') {\n throw new Exception('DB query error on create FB user: ' . $i->error_info());\n }\n }", "public function rename($source, $destination);", "public function setUsername(?string $username): void;", "public function setUserName($value) {\r\n if ($value === null) $value = \"User\";\r\n $this->userName = $value;\r\n }", "public function setUserProfileFirstName(string $newUserProfileFirstName): void {\n\t\t$newUserProfileFirstName = trim($newUserProfileFirstName);\n\t\t$newUserProfileFirstName = filter_var($newUserProfileFirstName, FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES);\n\t\tif(empty($newUserProfileFirstName) === true) {\n\t\t\tthrow(new \\InvalidArgumentException(\"input is empty or insecure\"));\n\t\t}\n\t\tif(strlen($newUserProfileFirstName) > 32) {\n\t\t\tthrow(new \\RangeException(\"Unfortunately, this is too long to store.\"));\n\t\t}\n\t\t$this->userProfileFirstName = $newUserProfileFirstName;\n\t}", "function delUser($username){\n // Reading names from file\n $file=fopen($this->fPasswd,\"r\");\n $i=0;\n while($line=fgets($file,200)){\n $lineArr=explode(\":\",$line);\n if($username!=$lineArr[0]){\n $newUserlist[$i][0]=$lineArr[0];\n $newUserlist[$i][1]=$lineArr[1];\n $i++;\n }else{\n $deleted=true;\n }\n }\n fclose($file);\n\n // Writing names back to file (without the user to delete)\n $file=fopen($path.$this->fPasswd,\"w\");\n for($i=0;$i<count($newUserlist);$i++){\n fputs($file,$newUserlist[$i][0].\":\".$newUserlist[$i][0].\"\\n\");\n }\n fclose($file);\n \n if($deleted==true){\n return true;\n }else{\n return false;\n }\n }", "public function testUserEditNonUniqueUsername()\n {\n $this->browse(function (Browser $browser) {\n $update_button = self::$locator . ' td .update_button';\n\n $browser->visit('/')\n ->click($update_button)\n ->type('username', 'testuser1')\n ->type('first_name', 'aaaa')\n ->type('last_name', 'aaaa')\n ->type('password', 'abcd1234')\n ->type('password_confirmation', 'abcd1234')\n ->click('button[type=\"submit\"]')\n\n ->waitForText('The username has already been taken.')\n ->assertSee('The username has already been taken.');\n });\n }", "public function forceRename(string $path, string $newpath)\n\t{\n\t\t$deleted = true;\n\t\tif ($this->has($newpath)) {\n\t\t\t$deleted = $this->delete($newpath);\n\t\t}\n\n\t\tif ($deleted) {\n\t\t\treturn $this->move($path, $newpath);\n\t\t}\n\n\t\treturn false;\n\t}", "public function updateUserName($username, $name) {\n $stmt = $this->db->prepare(\"update user set name = :uname where username = :username and is_active = 1;\");\n $stmt->bindValue(\"uname\", $name, PDO::PARAM_STR);\n $stmt->bindValue(\"username\", $username, PDO::PARAM_STR);\n $stmt->execute();\n }", "public function rename()\n {\n $oldPath = $this->getFullPath($this->oldPath, $this->oldName);\n $newPath = $this->getFullPath();\n\n $renamed = $this->conn->getSFTP()->rename($oldPath, $newPath);\n\n $this->conn->getLogger()->debug(get_class($this) . '::rename', array('phpseclib_logs' => $this->conn->getSFTP()->getSFTPLog()));\n $this->conn->getLogger()->info(get_class($this) . '::rename - Renaming \"{old_path}\" to \"{path}\" on sftp server \"{server}\" {ret}', array(\n 'old_path' => $oldPath,\n 'path' => $newPath,\n 'server' => $this->conn->getServer(),\n 'ret' => ($renamed != false) ? 'succeed' : 'failed',\n ));\n\n if ($renamed == false) {\n throw new UnreachableItemException($this);\n }\n\n return $renamed;\n }", "public function setUserName(?string $value): void {\n $this->getBackingStore()->set('userName', $value);\n }", "public function setUserName(?string $value): void {\n $this->getBackingStore()->set('userName', $value);\n }", "public function getOldUsername() {\n\t\tif ($this->oldUsername) {\n\t\t\tif ($this->lastUsernameChange + PROFILE_SHOW_OLD_USERNAME * 86400 > TIME_NOW) {\n\t\t\t\treturn $this->oldUsername;\n\t\t\t}\n\t\t}\n\t}", "public function restore(User $user, User $user1)\n {\n //\n }", "public function testCreateAndUpdateUser()\n {\n $username = '[email protected]';\n\n $currentEmail = $username;\n $newEmail = '[email protected]';\n\n $raw = $this->getUser($username, $currentEmail);\n\n // Create\n $this->adapter->send(new Request(array(\n $raw,\n )));\n\n $real = static::$repository->getUserService()->loadUserByLogin($username);\n $this->assertInstanceOf(User::class, $real);\n $this->assertEquals($currentEmail, $real->email);\n\n // Update\n $raw->data['email'] = $newEmail;\n $this->adapter->send(new Request(array(\n $raw,\n )));\n\n $real = static::$repository->getUserService()->loadUserByLogin($username);\n $this->assertInstanceOf(User::class, $real);\n $this->assertEquals($newEmail, $real->email);\n }", "public function promote($username);", "public function rename($old, $new)\n {\n Horde_Kolab_Storage_Exception_Pear::catchError(\n $this->getBackend()->renameMailbox(\n $this->encodePath($old),\n $this->encodePath($new)\n )\n );\n }", "function UserNameExistsEdit($username) {\n\t$usernameUser = GetUser('username');\n\n\t$result = DBRead('usuarios', $params = 'username', $fields = 'username');\n\t$query = \"SELECT username FROM usuarios WHERE username = '$username'\";\n\t$result = DBExecute($query);\n\t$resultUsername = mysqli_fetch_assoc($result);\n\t$resultUsername = $resultUsername['username'];\n\n\tif (mysqli_num_rows($result) <= 0 || $usernameUser == $resultUsername)\n\t\treturn true;\n\telse\n\t\treturn false;\n}", "public function update_user(&$userdata)\n {\n\t //Validate userdata by passing through our userdata_convert function\n $vbuser = $this->userdata_convert($userdata);\n\t //Check for userinfo from the username provided\n \tif (!($existing_user = $this->fetch_userinfo_from_username($vbuser['username'])))\n\t\t{\n \treturn 'Username does not exist.';\n\t\t}\n\t //Set existing user data\n $this->userdm->set_existing($existing_user);\n\t \n\t //Loop through new user data and set it\n foreach($vbuser as $key => $value)\n\t {\n $this->userdm->set($key, $value);\n\t }\n\t \n // reset password cookie in case password changed\n if (isset($vbuser['password']))\n\t {\n\t\t vbsetcookie('password', md5($this->vbulletin->userinfo['password'].COOKIE_SALT), PERMANENT_COOKIE, true, true);\n\t }\n\t \n\t //If there are any errors return them\n if (count($this->userdm->errors))\n\t {\n return $this->userdm->errors;\n\t }\n\t \n\t //If there are no errors then SAVE the set data and return false.\n $this->vbulletin->userinfo['userid'] = $this->userdm->save();\n return false;\n }", "public function setUserProfileLastName(string $newUserProfileLastName): void {\n\t\t$newUserProfileLastName = trim($newUserProfileLastName);\n\t\t$newUserProfileLastName = filter_var($newUserProfileLastName, FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES);\n\t\tif(empty($newUserProfileLastName) === true) {\n\t\t\tthrow(new \\InvalidArgumentException(\"input is empty or insecure\"));\n\t\t}\n\t\tif(strlen($newUserProfileLastName) > 32) {\n\t\t\tthrow(new \\RangeException(\"Unfortunately, this is too long to store.\"));\n\t\t}\n\t\t$this->userProfileLastName = $newUserProfileLastName;\n\t}", "public function testRenameTo()\n {\n /*\n * remove all tables\n */\n $tables = $this->fixture->getDBObject()->fetchList('SHOW TABLES');\n foreach($tables as $table) {\n $this->fixture->getDBObject()->simpleQuery('DROP TABLE '. $table['Tables_in_'.$this->fixture->a['db_name']]);\n }\n\n /*\n * create fresh store and check tables\n */\n $this->fixture->setup();\n\n $tables = $this->fixture->getDBObject()->fetchList('SHOW TABLES');\n foreach($tables as $table) {\n $this->assertTrue(\n false !== strpos($table['Tables_in_'.$this->fixture->a['db_name']], $this->dbConfig['db_table_prefix'].'_')\n );\n }\n\n /*\n * rename store\n */\n $prefix = 'new_store';\n $this->fixture->renameTo($prefix);\n\n /*\n * check for new prefixes\n */\n $tables = $this->fixture->getDBObject()->fetchList('SHOW TABLES');\n foreach($tables as $table) {\n $this->assertTrue(\n false !== strpos($table['Tables_in_'.$this->fixture->a['db_name']], $prefix)\n );\n }\n }", "public function editUsername($uname)\n\t{\n\t\tglobal $username;\n\t\tglobal $user_id;\n\t\n\t\t$uname = addslashes($uname);\n\t\n\t\tif(strlen($uname) <= 32)\n\t\t{\n\t\t\t$qry = 'UPDATE admin_table SET username = \"' . $uname;\n\t\t\t$result = mysql_query($qry, $GLOBALS['connection']);\n\t\t}\n\t\n\t\t$username = $uname;\n\t}" ]
[ "0.64323926", "0.63914484", "0.6341779", "0.62913924", "0.60810673", "0.60505277", "0.6014536", "0.59819937", "0.5809437", "0.5794171", "0.57554567", "0.57224655", "0.5705922", "0.56143767", "0.55717576", "0.5559833", "0.5557186", "0.55230534", "0.5513415", "0.55081934", "0.54914093", "0.5438901", "0.5395692", "0.5386302", "0.5377774", "0.5377488", "0.5363749", "0.53632975", "0.5356981", "0.535324", "0.5349616", "0.53412735", "0.53314334", "0.53232414", "0.5294063", "0.52887243", "0.52737135", "0.52674246", "0.52527213", "0.52423537", "0.52390265", "0.5221501", "0.5215144", "0.5204003", "0.52004004", "0.5183609", "0.5183561", "0.5179854", "0.51788706", "0.5173805", "0.5160117", "0.5150315", "0.5144341", "0.5143907", "0.51324785", "0.5131223", "0.51230276", "0.512186", "0.51177824", "0.5113346", "0.5106985", "0.5101784", "0.5096014", "0.5085768", "0.50835294", "0.5066666", "0.50566673", "0.5053568", "0.50454974", "0.5043035", "0.5041485", "0.5033403", "0.50270617", "0.5025919", "0.50249255", "0.50229174", "0.50204766", "0.50202215", "0.50176483", "0.50155956", "0.50119984", "0.5004017", "0.5003193", "0.49947432", "0.49930468", "0.499111", "0.498941", "0.4988974", "0.49862236", "0.49862236", "0.498538", "0.4985039", "0.49845785", "0.49797902", "0.4974278", "0.49665198", "0.4964404", "0.49536675", "0.49533486", "0.4950811" ]
0.70961016
0
Delete all internal data for a given username. Is NEVER called for the currently loaded user, so Storage backend writers can safely assume that you'll never be asked to delete the loaded user. This function MUST treat a nonexistent or already deleted user as "success". ONLY throw an exception if ACTUAL deletion fails.
public function deleteUser ($username) { $this->_delUserKey($username, self::SETTINGS); $this->_delUserKey($username, self::COOKIES); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete()\n {\n foreach ($this->users as $user) {\n $uid = $user->id;\n // delete whole website info for this user\n if ((bool)$this->delete) {\n $model = new FormUserClear($user);\n $model->comments = true;\n $model->content = true;\n $model->feedback = true;\n $model->wall = true;\n $model->make();\n }\n\n // delete avatars\n File::remove('/upload/user/avatar/big/' . $uid . '.jpg');\n File::remove('/upload/user/avatar/medium/' . $uid . '.jpg');\n File::remove('/upload/user/avatar/small/' . $uid . '.jpg');\n File::remove('/upload/user/avatar/original/' . $uid . '.jpg');\n // delete user profile and auth data\n $user->profile()->delete();\n // delete user provider data\n $user->provider()->delete();\n // delete user object\n $user->delete();\n }\n }", "function deleteUser($username)\r\n {\r\n $this->querySimpleExecute('delete from t_user where useUsername = ' . $username);\r\n }", "public function delete() {\n try {\n $db = Database::getInstance();\n $sql = \"DELETE FROM `User` WHERE username = :username\";\n $stmt = $db->prepare($sql);\n $stmt->execute([\"username\" => $this->username]);\n } catch (PDOException $e) {\n exitError(500, \"Internal error.\");\n }\n }", "protected function _destroyUser($username) {}", "public function deleteUser()\n {\n $this->delete();\n }", "public function delete($username)\n {\n }", "public static function del($userName){\n\t\treturn (new Database())->connectToDatabase()->query('DELETE FROM User WHERE userName=?',array($userName));\n\t}", "public function deleteData()\n {\t\t\n \t$arrayId = $this->getAllUserId($this->readFromLocalFile());\n \tforeach($arrayId as $id)\n \t{\n \t\t$user = User::find()->where(['id' => $id])->one();\n \t\tif($user)\n \t\t{\n \t\t\t$user->delete();\n \t\t}\n \t}\n \t$this->deleteSelectedLocalItems('user');\n }", "public function delete() {\n\t\t$query = \"DELETE FROM Users WHERE userId = :id\";\n\t\t$query_params = array(':id' => $this->userData['userId']);\n\t\texecuteSQL($query, $query_params);\n\t}", "public function userDeleted()\n\t{\n\t\tself::authenticate();\n\n\t\t$userId = FormUtil::getPassedValue('user', null, 'GETPOST');\n\t\tif(!is_string($userId)) {\n\t\t\treturn self::ret(false);\n\t\t}\n\n\t\t$user = $this->entityManager->getRepository('Owncloud_Entity_DeleteUser')->findOneBy(array('uname' => $userId));\n\t\tif(!($user instanceof Owncloud_Entity_DeleteUser)) {\n\t\t\treturn self::ret(false);\n\t\t}\n\t\t$this->entityManager->remove($user);\n\t\t$this->entityManager->flush();\n\n\t\treturn self::ret(true);\n\t}", "public function deleteUser($username) \n {\n $conn = new DBConnect();\n $dbObj = $conn->getDBConnect();\n $this->DAO = new SecurityDAO($dbObj);\n return $this->DAO->deleteUser($username);\n }", "public function delete($username)\r\n {\r\n $result = $this->query(\"DROP USER {$username}\");\r\n\r\n return ($result->hasError() === false);\r\n }", "function mysql_deluser($username)\n{\n $user_id = mysql_auth_user_id($username);\n\n dbDelete('entity_permissions', \"`user_id` = ?\", array($user_id));\n dbDelete('users_prefs', \"`user_id` = ?\", array($user_id));\n dbDelete('users_ckeys', \"`username` = ?\", array($username));\n\n return dbDelete('users', \"`username` = ?\", array($username));\n}", "function delUser($username){\n // Reading names from file\n $file=fopen($path.$this->fPasswd,\"r\");\n $i=0;\n while($line=fgets($file,200)){\n $lineArr=explode(\":\",$line);\n if($username!=$lineArr[0]){\n $newUserlist[$i][0]=$lineArr[0];\n $newUserlist[$i][1]=$lineArr[1];\n $i++;\n }else{\n $deleted=true;\n }\n }\n fclose($file);\n\n // Writing names back to file (without the user to delete)\n $file=fopen($path.$this->fPasswd,\"w\");\n for($i=0;$i<count($newUserlist);$i++){\n fputs($file,$newUserlist[$i][0].\":\".$newUserlist[$i][1].\"\\n\");\n }\n fclose($file);\n \n if($deleted==true){\n return true;\n }else{\n return false;\n }\n }", "public function deleteAllForUser($userId);", "public function deleteAllForUser($userId);", "function delUser($username){\n // Reading names from file\n $file=fopen($this->fPasswd,\"r\");\n $i=0;\n while($line=fgets($file,200)){\n $lineArr=explode(\":\",$line);\n if($username!=$lineArr[0]){\n $newUserlist[$i][0]=$lineArr[0];\n $newUserlist[$i][1]=$lineArr[1];\n $i++;\n }else{\n $deleted=true;\n }\n }\n fclose($file);\n\n // Writing names back to file (without the user to delete)\n $file=fopen($path.$this->fPasswd,\"w\");\n for($i=0;$i<count($newUserlist);$i++){\n fputs($file,$newUserlist[$i][0].\":\".$newUserlist[$i][0].\"\\n\");\n }\n fclose($file);\n \n if($deleted==true){\n return true;\n }else{\n return false;\n }\n }", "public function delete_user($user);", "public function delete_user($username)\n\t{\n\t\t$this->db->where('username', $username);\n\t\t$this->db->delete('ag_users');\n\t}", "public function deleteUser($username)\n {\n $isCommit = FALSE;\n $conn = new MySqlConnect();\n\n $username = $conn -> sqlCleanup($username);\n $isCommit = $conn -> executeQuery(\"DELETE FROM users WHERE username = '%s'\", $username);\n\n $conn -> freeConnection();\n return $isCommit;\n }", "public function delete()\n { if (is_null($this->id))\n trigger_error(\"User::delete(): Attempt to delete a User object that does not have its ID property set.\", E_USER_ERROR);\n\n // Delete the User\n $conn = new PDO(DB_DSN, DB_USER, DB_PASS);\n $st = $conn->prepare(\"DELETE FROM users WHERE id = :id LIMIT 1\");\n $st->bindValue(\":id\", $this->id, PDO::PARAM_INT); \n $st->execute();\n \n $conn = null;\n }", "function deleteUsuario($username){\r\n\r\n\t\t$sql = \"DELETE FROM \" . $this->_tablename . \" WHERE usuario = '\" . $username . \"'\";\r\n\r\n\t\t$rs = $this->_db->leer($sql);\r\n\t}", "public function destroy($username)\n {\n //\n }", "public function delete_user(&$username)\n {\n // The vBulletin documentation suggests using userdm->delete()\n // to delete a user, but upon examining the code, this doesn't\n // delete everything associated with the user. The following\n // is adapted from admincp/user.php instead.\n // NOTE: THIS MAY REQUIRE MAINTENANCE WITH NEW VBULLETIN UPDATES.\n\n $userdata = $this->db->query_first_slave(\"SELECT userid FROM \"\n . TABLE_PREFIX . \"user WHERE username='{$username}'\");\n $userid = $userdata['userid'];\n if ($userid) {\n\n // from admincp/user.php 'do prune users (step 1)'\n\n // delete subscribed forums\n $this->db->query_write(\"DELETE FROM \" . TABLE_PREFIX\n . \"subscribeforum WHERE userid={$userid}\");\n // delete subscribed threads\n $this->db->query_write(\"DELETE FROM \" . TABLE_PREFIX\n . \"subscribethread WHERE userid={$userid}\");\n // delete events\n $this->db->query_write(\"DELETE FROM \" . TABLE_PREFIX\n . \"event WHERE userid={$userid}\");\n // delete event reminders\n $this->db->query_write(\"DELETE FROM \" . TABLE_PREFIX\n . \"subscribeevent WHERE userid={$userid}\");\n // delete custom avatars\n $this->db->query_write(\"DELETE FROM \" . TABLE_PREFIX\n . \"customavatar WHERE userid={$userid}\");\n $customavatars = $this->db->query_read(\"SELECT userid, avatarrevision FROM \"\n . TABLE_PREFIX . \"user WHERE userid={$userid}\");\n while ($customavatar = $this->db->fetch_array($customavatars)) {\n @unlink($this->vbulletin->options['avatarpath'] . \"/avatar{$customavatar['userid']}_{$customavatar['avatarrevision']}.gif\");\n }\n // delete custom profile pics\n $this->db->query_write(\"DELETE FROM \" . TABLE_PREFIX\n . \"customprofilepic WHERE userid={$userid}\");\n $customprofilepics = $this->db->query_read(\n \"SELECT userid, profilepicrevision FROM \"\n . TABLE_PREFIX . \"user WHERE userid={$userid}\");\n while ($customprofilepic = $this->db->fetch_array($customprofilepics)) {\n @unlink($this->vbulletin->options['profilepicpath'] . \"/profilepic$customprofilepic[userid]_$customprofilepic[profilepicrevision].gif\");\n }\n // delete user forum access\n $this->db->query_write(\"DELETE FROM \" . TABLE_PREFIX\n . \"access WHERE userid={$userid}\");\n // delete moderator\n $this->db->query_write(\"DELETE FROM \" . TABLE_PREFIX\n . \"moderator WHERE userid={$userid}\");\n // delete private messages\n $this->db->query_write(\"DELETE FROM \" . TABLE_PREFIX\n . \"pm WHERE userid={$userid}\");\n $this->db->query_write(\"DELETE FROM \" . TABLE_PREFIX\n . \"pmreceipt WHERE userid={$userid}\");\n $this->db->query_write(\"DELETE FROM \" . TABLE_PREFIX\n . \"session WHERE userid={$userid}\");\n // delete user group join requests\n $this->db->query_write(\"DELETE FROM \" . TABLE_PREFIX\n . \"usergrouprequest WHERE userid={$userid}\");\n // delete bans\n $this->db->query_write(\"DELETE FROM \" . TABLE_PREFIX\n . \"userban WHERE userid={$userid}\");\n // delete user notes\n $this->db->query_write(\"DELETE FROM \" . TABLE_PREFIX\n . \"usernote WHERE userid={$userid}\");\n\n // from admincp/users.php 'do prune users (step 2)'\n\n // update deleted user's posts with userid=0\n $this->db->query_write(\"UPDATE \" . TABLE_PREFIX\n . \"thread SET postuserid = 0, postusername = '\"\n . $this->db->escape_string($username)\n . \"' WHERE postuserid = $userid\");\n $this->db->query_write(\"UPDATE \" . TABLE_PREFIX\n . \"post SET userid = 0, username = '\"\n . $this->db->escape_string($username)\n . \"' WHERE userid = $userid\");\n\n // finally, delete the user\n $this->db->query_write(\"DELETE FROM \" . TABLE_PREFIX\n . \"usertextfield WHERE userid={$userid}\");\n $this->db->query_write(\"DELETE FROM \" . TABLE_PREFIX\n . \"userfield WHERE userid={$userid}\");\n $this->db->query_write(\"DELETE FROM \" . TABLE_PREFIX\n . \"user WHERE userid={$userid}\");\n }\n /*\n the following is suggested in the documentation but doesn't work:\n\n $existing_user = fetch_userinfo_from_username($username);\n $this->userdm->set_existing($existing_user);\n return $this->userdm->delete();\n */\n }", "public function destroyAll()\n {\n if ( ! Input::has('users')) return;\n\n $ids = [];\n\n foreach(Input::get('users') as $k => $user) {\n $ids[] = $user['id'];\n }\n\n if ($deleted = User::destroy($ids)) {\n return response(trans('app.deleted', ['number' => $deleted]));\n }\n }", "public function delete()\n {\n $logger = $this->getLogger();\n\n $logger->info(\n 'Deleting user and all their LPAs',\n $this->getAuthenticationService()->getIdentity()->toArray()\n );\n\n try {\n $this->apiClient->httpDelete('/v2/user/' . $this->getUserId());\n } catch (ApiException $ex) {\n $logger->err($ex->getMessage());\n return false;\n }\n\n return true;\n }", "public function deleted(User $user)\n {\n // delete all files\n }", "function delUser($username){\r\n\t\t// Reading names from file\r\n\t\t$file=fopen($this->fPasswd,\"r\");\r\n\t\t$i=0;\r\n\t\t$newUserlist = array();\r\n\t\twhile($line=fgets($file,200)){\r\n\t\t\t$lineArr=explode(\":\",$line);\r\n\t\t\tif($username!=$lineArr[0]){\r\n\t\t\t\t$newUserlist[$i][0]=$lineArr[0];\r\n\t\t\t\t$newUserlist[$i][1]=$lineArr[1];\r\n\t\t\t\t$i++;\r\n\t\t\t}else{\r\n\t\t\t\t$deleted=true;\r\n\t\t\t}\r\n\t\t}\r\n\t\tfclose($file);\r\n\r\n\t\t// Writing names back to file (without the user to delete)\r\n\t\t$file=fopen($this->fPasswd,\"w\");\r\n\t\tfor($i=0;$i<count($newUserlist);$i++){\r\n\t\t\tfputs($file,$newUserlist[$i][0].\":\".$newUserlist[$i][1]);\r\n\t\t}\r\n\t\tfclose($file);\r\n\r\n\t\tif($deleted==true){\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "function delete_user($username) {\n\n $qDelete = \"DELETE FROM authuser WHERE uname='$username'\";\n\n\n\n if ($username == \"sa\") {\n\n return \"User sa cannot be deleted.\";\n } elseif ($username == \"admin\") {\n\n return \"User admin cannot be deleted.\";\n } elseif ($username == \"test\") {\n\n return \"User test cannot be deleted.\";\n }\n\n $link = new mysqli($this->HOST, $this->USERNAME, $this->PASSWORD, $this->DBNAME);\n if ($link->connect_error) {\n die(\"Error al conectarse a la BD $dbname: \" . $mysqli->connect_error);\n }\n\n $result = $link->query($qDelete);\n\n\n\n return $result->error;\n }", "public function delete_user_account() {\n \n // Verify if session exists and if the user is admin\n $this->if_session_exists($this->user_role,0);\n \n // Delete the user's data saved by apps\n $this->load->file(APPPATH . '/apps/main.php');\n\n // List all apps\n foreach (glob(APPPATH . 'apps/collection/*', GLOB_ONLYDIR) as $dir) {\n\n $app_dir = trim(basename($dir) . PHP_EOL);\n\n // Create an array\n $array = array(\n 'MidrubApps',\n 'Collection',\n ucfirst($app_dir),\n 'Main'\n );\n\n // Implode the array above\n $cl = implode('\\\\', $array);\n\n // Delete user's data\n (new $cl())->delete_account($this->user_id);\n\n }\n \n // Delete connected social accounts\n $this->networks->delete_network('all', $this->user_id);\n \n // Delete campaigns\n $this->campaigns->delete_campaigns($this->user_id);\n \n // Delete templates\n $this->campaigns->delete_templates($this->user_id);\n \n // Delete lists\n $this->campaigns->delete_lists($this->user_id);\n \n // Delete schedules\n $this->campaigns->delete_schedules($this->user_id);\n \n // Load Fourth Helper\n $this->load->helper('fourth_helper');\n \n // Load Tickets Model\n $this->load->model('tickets');\n \n // Delete tickets\n $this->tickets->delete_tickets($this->user_id);\n \n // Load Botis Model\n $this->load->model('botis');\n \n // Delete all user's bots\n $this->botis->delete_user_bots($this->user_id);\n \n // Load Activity Model\n $this->load->model('activity');\n \n // Delete all user's activity\n $this->activity->delete_user_activity($this->user_id);\n \n // Load Media Model\n $this->load->model('media');\n \n // Get all user medias\n $getmedias = $this->media->get_user_medias($this->user_id, 0, 1000000);\n \n // Verify if user has media and delete them\n if ( $getmedias ) {\n \n // Load Media Helper\n $this->load->helper('media_helper');\n \n foreach( $getmedias as $media ) {\n delete_media($media->media_id, false);\n }\n \n }\n \n // Load Team Model\n $this->load->model('team');\n \n // Delete the user's team\n $this->team->delete_members( $this->user_id );\n \n // Load Activities Model\n $this->load->model('activities');\n \n // Delete the user's activities\n $this->activities->delete_activity( $this->user_id, 0 ); \n \n // Delete user account\n if ( $this->user->delete_user($this->user_id) ) {\n \n // Deletes user's session\n $this->session->unset_userdata('username');\n $this->session->unset_userdata('member');\n $this->session->unset_userdata('autodelete');\n \n echo json_encode(array(\n 'success' => TRUE,\n 'message' => $this->lang->line('mm64')\n )); \n \n } else {\n \n echo json_encode(array(\n 'success' => FALSE,\n 'message' => $this->lang->line('mm65')\n )); \n \n }\n \n }", "private function deleteUser()\n {\n try \n {\n $request = $_REQUEST;\n\n if(!isset($request['userid']) || $request['userid']==\"\")\n throw_error_msg(\"user id not provided\");\n else if(!is_numeric($request['userid']))\n throw_error_msg(\"invalid user id\");\n else\n $userid = (int)$request['userid'];\n\n global $userquery;\n $user = $userquery->delete_user($userid);\n \n if( error() )\n {\n throw_error_msg(error('single')); \n }\n\n if( msg() )\n {\n $data = array('code' => \"200\", 'status' => \"success\", \"msg\" => 'user deleted successfully', \"data\" => array());\n $this->response($this->json($data));\n } \n }\n catch(Exception $e)\n {\n $this->getExceptionDelete($e->getMessage()); \n } \n }", "public function deleteUser($userId);", "function deleteUser($userName) {\n\n Util::throwExceptionIfNullOrBlank($userName, \"User Name\");\n $encodedUserName = Util::encodeParams($userName);\n $responseObj = new App42Response();\n $objUtil = new Util($this->apiKey, $this->secretKey);\n try {\n\t\t $params = null;\n $headerParams = array();\n $queryParams = array();\n $signParams = $this->populateSignParams();\n $metaHeaders = $this->populateMetaHeaderParams();\n $headerParams = array_merge($signParams, $metaHeaders);\n $signParams['userName'] = $userName;\n $signature = urlencode($objUtil->sign($signParams)); //die();\n $headerParams['signature'] = $signature;\n $contentType = $this->content_type;\n $accept = $this->accept;\n $baseURL = $this->url;\n $baseURL = $baseURL . \"/\" . $encodedUserName;\n $response = RestClient::delete($baseURL, $params, null, null, $contentType, $accept, $headerParams);\n $responseObj->setStrResponse($response->getResponse());\n $responseObj->setResponseSuccess(true);\n } catch (App42Exception $e) {\n throw $e;\n } catch (Exception $e) {\n throw new App42Exception($e);\n }\n return $responseObj;\n }", "function delete() {\n db_begin_work();\n $delete = parent::delete();\n if($delete && !is_error($delete)) {\n unlink($this->getAvatarPath());\n \tunlink($this->getAvatarPath(true));\n\n ProjectUsers::deleteByUser($this);\n Assignments::deleteByUser($this);\n Subscriptions::deleteByUser($this);\n StarredObjects::deleteByUser($this);\n PinnedProjects::deleteByUser($this);\n UserConfigOptions::deleteByUser($this);\n Reminders::deleteByUser($this);\n\n search_index_remove($this->getId(), 'User');\n\n $cleanup = array();\n event_trigger('on_user_cleanup', array(&$cleanup));\n\n if(is_foreachable($cleanup)) {\n foreach($cleanup as $table_name => $fields) {\n foreach($fields as $field) {\n $condition = '';\n if(is_array($field)) {\n $id_field = array_var($field, 'id');\n $name_field = array_var($field, 'name');\n $email_field = array_var($field, 'email');\n $condition = array_var($field, 'condition');\n } else {\n $id_field = $field . '_id';\n $name_field = $field . '_name';\n $email_field = $field . '_email';\n } // if\n\n if($condition) {\n db_execute('UPDATE ' . TABLE_PREFIX . \"$table_name SET $id_field = 0, $name_field = ?, $email_field = ? WHERE $id_field = ? AND $condition\", $this->getName(), $this->getEmail(), $this->getId());\n } else {\n db_execute('UPDATE ' . TABLE_PREFIX . \"$table_name SET $id_field = 0, $name_field = ?, $email_field = ? WHERE $id_field = ?\", $this->getName(), $this->getEmail(), $this->getId());\n } // if\n } // foreach\n } // foreach\n } // if\n\n db_commit();\n return true;\n } else {\n db_rollback();\n return $delete;\n } // if\n }", "function deleteUser()\n {\n $validateF = new ValidateFunctions();\n if ($_SESSION['id'] == $_GET['']) {\n logUserOut();\n }\n $id = $validateF->sanitize($_GET['id']);\n $userRp = new UserRepository();;\n $hasUser = $userRp->getOneFromDB($id);\n if ($hasUser != 0) {\n $this->deleteUserImage($id);\n $this->removeUser($id);\n $_SESSION['success'] = ['User deleted successfully'];\n } else {\n $_SESSION['error'] = ['No user found.'];\n }\n header('Location:index.php?action=adminUsers');\n }", "public function userDeleted();", "public function destroy($username)\n {\n Auth::logout();\n $user = User::where('username',$username)->firstOrFail();\n if ($user->avatar && file_exists(storage_path('app/public/'.$user->avatar))) {\n Storage::delete('public/'.$user->avatar);\n }\n $user->delete();\n return redirect()->route('home');\n }", "public function deleteUser() {\n //validations\n if ($this->deleteUserValidator()->fails()) {\n return redirect()->back()\n ->withErrors($this->deleteUserValidator())\n ->withInput();\n }\n\n //check login user id\n $login_user_id = session('user_id');\n $user_id = $this->request->input(\"user_id\");\n if ($user_id == $login_user_id) {\n return false;\n }\n\n //delete logic\n $whereArray = [\n \"user_id\" => $this->request->input(\"user_id\"),\n ];\n\n //Begin the transaction\n $this->usersModel->dbTransactionBegin();\n\n\n $this->usersModel->setTableName(\"cvd_users\");\n $this->usersModel->setWhere($whereArray);\n $this->usersModel->deleteData();\n\n //Remove Below table links as well\n //event_users group_users notification_users role_users\n //survey_users\n\n $this->usersModel->setTableName(\"event_users\");\n $this->usersModel->setWhere($whereArray);\n $this->usersModel->deleteData();\n\n $this->usersModel->setTableName(\"group_users\");\n $this->usersModel->setWhere($whereArray);\n $this->usersModel->deleteData();\n\n $this->usersModel->setTableName(\"notification_users\");\n $this->usersModel->setWhere($whereArray);\n $this->usersModel->deleteData();\n\n $this->usersModel->setTableName(\"role_users\");\n $this->usersModel->setWhere($whereArray);\n $this->usersModel->deleteData();\n\n $this->usersModel->setTableName(\"survey_users\");\n $this->usersModel->setWhere($whereArray);\n $this->usersModel->deleteData();\n\n //commit the transaction\n $this->usersModel->dbTransactionCommit();\n\n return TRUE;\n }", "public function deleteAccount($username) {\n $stmt = $this->db->prepare(\"update user set is_active = 0 where username = :username and is_active = 1;\");\n $stmt->bindValue(\"username\", $username, PDO::PARAM_STR);\n $stmt->execute();\n\n return $stmt->fetchAll(PDO::FETCH_ASSOC);\n }", "public function delete()\n {\n $pdo = static::getDB();\n\n $sql = \"DELETE FROM users WHERE user_id = :user_id\";\n\n $result = $pdo->prepare($sql);\n\n return $result->execute([$this->user_id]);\n }", "protected function deleteAdminUserFixture()\n {\n if ($this->userName) {\n $users = Mage::getModel('admin/user')->getCollection();\n $users->addFieldToFilter('username', array( 'eq' => $this->userName));\n $users->load();\n foreach ( $users as $user ) {\n $user->delete();\n }\n }\n \n if ($this->roleName) {\n $roles = Mage::getModel('api/roles')->getCollection();\n $roles->addFieldToFilter('role_name', array('eq' => $this->roleName));\n $roles->load();\n foreach ( $roles as $role ) {\n $role->delete();\n }\n }\n }", "function deleteUser(){\n\t\t\tif($this->rest->getRequestMethod() != \"DELETE\"){\n\t\t\t\t$this->rest->response('',406);\n\t\t\t}\n\t\t\t//Validate the user\n\t\t\t$validUser = $this->validateUser(\"admin\", \"basic\");\n\t\t\tif ($validUser) {\n\t\t\t\tif (isset($_POST['_id'])){\n\t\t\t\t\t$where = \"_id='\".$_POST['_id'].\"'\";\n\t\t\t\t\t$delete = $this->model->getUser('*',$where);\n\t\t\t\t\t$result = $this->model->deleteUser($where);\n\t\t\t\t\tif($result) {\n\t\t\t\t\t\t$response_array['status']='success';\n\t\t\t\t\t\t$response_array['message']='One record deleted.';\n\t\t\t\t\t\t$response_array['data']=$delete;\n\t\t\t\t\t\t$this->rest->response($response_array, 200);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$response_array['status']='fail';\n\t\t\t\t\t\t$response_array['message']='The record does not exist';\n\t\t\t\t\t\t$data['user_id'] = $_POST['_id'];\n\t\t\t\t\t\t$response_array['data']=$data;\n\t\t\t\t\t\t$this->rest->response($response_array, 404);\n\t\t\t\t\t}\n\n\t\t\t\t}else{\n\t\t\t\t\t$this->rest->response('No parameters given',204);\t// If no records \"No Content\" status\n\t\t\t\t}\n\n\t\t\t}else{\n\t\t\t\t$this->rest->response('Unauthorized Access ',401);\n\t\t\t}\n\t\t\t\n\t\t}", "protected function deleteUser()\n {\n $userId = $this->request->variable('user_id',0);\n\n if($userId === 0)\n {\n $this->sendResponse([\n 'status' => 'failed',\n 'message' => 'Invalid data supplied',\n 'error' => ['User ID was not supplied']\n ]);\n }\n\n // Determine if this user is an administrator\n $arrUserData = $this->auth->obtain_user_data($userId);\n $this->auth->acl($arrUserData);\n $isAdmin = $this->auth->acl_get('a_');\n\n if($isAdmin)\n {\n $this->sendResponse([\n 'status' => 'failed',\n 'message' => 'User was not deleted because they are an admin',\n 'error' => ['phpBB admin accounts cannot be automatically deleted. Please delete via ACP.']\n ]);\n }\n\n user_delete('remove', $userId);\n\n // Send success response\n $this->sendResponse([\n 'status' => 'success',\n 'message' => 'phpBB user was deleted',\n 'data' => [\n 'user_id' => $userId\n ]\n ]);\n }", "public function delete()\n {\n // deleting all related comments\n $this->comments()->delete();\n // deleting all related posts\n $this->posts()->delete();\n\n // deleting user\n return parent::delete();\n }", "function delete($conn)\n{\n $response[\"loggedIn\"] = getSessionValue(\"user\", \"\") != \"\";\n if (!$response[\"loggedIn\"])\n {\n $response[\"error\"] = \"You must login to delete your user account.\";\n return $response;\n } \n \n // make sure the user exists...\n $userID = getSessionValue(\"user\", \"\")[\"userID\"];\n $stmt = $conn->prepare(\"SELECT USER_ID FROM USER WHERE USER_ID = ?\");\n $stmt->bind_param(\"i\", $userID);\n $stmt->execute();\n if (!$stmt->fetch()) \n {\n $response[\"error\"] = sprintf(\"User %d does not exist.\", $userID);\n return $response;\n }\n $stmt->close();\n \n // delete the user...\n $stmt = $conn->prepare(\"DELETE FROM USER WHERE USER_ID = ?\");\n $stmt->bind_param(\"i\", $userID);\n $stmt->execute();\n \n // log the user out...\n setSessionValue(\"user\", \"\");\n $response[\"loggedIn\"] = false;\n return $response;\n}", "function delete() {\n db_begin_work();\n \n $delete = parent::delete();\n if($delete && !is_error($delete)) {\n cache_remove('companies_id_name'); // remove ID - name map from cache\n \n $users = $this->getUsers();\n if(is_foreachable($users)) {\n foreach($users as $user) {\n $user->delete();\n } // foreach\n } // if\n \n Projects::resetByCompany($this);\n \n db_commit();\n } else {\n db_rollback();\n } // if\n return $delete;\n }", "public function deleteUser()\n {\n \n $headers = getallheaders();\n $token = $headers['Authorization'];\n $key = $this->key;\n $userData = JWT::decode($token, $key, array('HS256'));\n $id_user = Users::where('email', $userData->email)->first()->id;\n $id_users = $_POST['idUser'];\n $id = $id_users;\n\n $user = Users::find($id);\n\n $rolUser = Users::where('email', $userData->email)->first();\n \n\n if ($rolUser->rol_id == 1){\n\n $user_name = Users::where('id', $id_users)->first()->name;\n Users::destroy($id);\n\n return $this->success('Acabas de borrar a', $user_name);\n\n }else{\n return $this->error(403, 'No tienes permisos');\n }\n \n\n if (is_null($user)) \n {\n return $this->error(400, 'El lugar no existe');\n }\n // }else{\n\n // $user_name = Users::where('id', $id_users)->first()->name;\n // Users::destroy($id);\n\n // return $this->success('Carlos he borrado el usuario', $user_name);\n // }\n }", "public function user_delete($data = array())\n\t{\n\t\tunset($data['user']['u_password']);\n\t\t\n\t\t$this->CI->logger->add('users/user_delete', $data);\n\t}", "public function adminDeleteAllByUser($userId)\n\t{\n\t\t// get the user\n\t\t$user = $this->getUser($userId);\n\t\t// get the authkeys for that user\n\t\t$authKeys = $user->authKey()->get();\n\t\t// delete links between the user and any authkeys\n\t\t$user->authKey()->detach();\n\t\t// We need to delete any authkeys that have been detached\n\t\t// and that don't belong to another user\n\t\t$authKeys->each(function($authKey) {\n\t\t\t// If there is no user for the authkey\n\t\t\tif( $authKey->user()->get()->isEmpty() ) {\n\t\t\t\t// soft delete authkey\n\t\t\t\t$authKey->forceDelete();\n\t\t\t}\n\t\t});\n\t\t\n\t\t// return a code 204 header and no content\n\t\treturn $this->setHttpStatusCode('204')->respondWithEmpty();\n\t}", "function deleteUser($userinfo)\r\n {\r\n $status = array();\r\n $status['debug'] = array();\r\n $status['error'] = array();\r\n\r\n \t\t$user[$userinfo->username] = $userinfo->username;\r\n $share = Dokuwiki::getInstance();\r\n if (!$share->auth->deleteUsers($user)) {\r\n \t\t$status['error'][] = JText::_('USER_DELETION_ERROR') . ' ' . 'No User Deleted';\r\n } else {\r\n\t\t\t$status['error'] = false;\r\n\t\t\t$status['debug'][] = JText::_('USER_DELETION'). ' ' . $userinfo->username;\r\n\t\t}\r\n\t\treturn $status;\r\n }", "public function deleting(User $user)\n {\n //\n }", "public function deleting(User $user)\n {\n //\n }", "public function deleting(User $user)\n {\n //\n }", "function deleteUser($userinfo)\r\n {\r\n $status = array();\r\n $status['debug'] = array();\r\n $status['error'] = array();\r\n\r\n $db = JFusionFactory::getDatabase($this->getJname());\r\n\r\n\t\t$query = 'DELETE FROM #__user WHERE user_name = '.$db->quote($userinfo->username);\r\n\t\t$db->setQuery($query);\r\n if (!$db->query()) {\r\n \t\t$status['error'][] = JText::_('USER_DELETION_ERROR') . ' ' . $db->stderr();\r\n } else {\r\n\t\t\t$query = 'DELETE FROM #__user_groups WHERE ug_user = '.$db->quote($userinfo->userid);\r\n\t\t\t$db->setQuery($query);\r\n\t\t\t$db->query();\r\n\r\n\t\t\t$status['error'] = false;\r\n\t\t\t$status['debug'][] = JText::_('USER_DELETION'). ' ' . $userinfo->username;\r\n\t\t}\r\n\r\n\t\treturn $status;\r\n }", "public function destroy(User $user)\n {\n $conteudos = $user->contents()->get();\n\n //Delete user contents from disk\n foreach($conteudos as $conteudo) {\n Storage::delete($conteudo->nome);\n $conteudo->forceDelete();\n }\n\n if ($user->forceDelete()) {\n return redirect()->back()->withSuccess(__('controllers.delete_user'));\n } else {\n return redirect()->back()->withErrors(__('controllers.error_occured'));\n }\n }", "public function deleteUser()\n {\t\t\n\t\t$user = $this->checkToken();\n\t\tif ($user) {\t\n\t\t\t$userModel = UserModel::find($user->id);\n\t\t\t$userModel->destroy();\n\t\t\t$this->expireToken($userModel);\n\t\t\treturn $this->sendResponse('Your account has been deleted');\n\t\t}\n\t\treturn $this->sendResponse('You are not authorised to delete this account');\n }", "function d4os_io_db_070_os_user_delete($uuid) {\n // TODO : delete all assets (impossible ?)\n // TODO : delete groups\n\n // delete offline messages\n drupal_set_message(t('Deleting offline messages.'));\n d4os_io_db_070_offline_message_user_delete($uuid);\n/*\n // delete search\n drupal_set_message(t('Deleting search info.'));\n d4os_io_db_070_os_search_user_delete($uuid);\n*/\n // delete profile\n drupal_set_message(t('Deleting profile info.'));\n d4os_io_db_070_os_profile_user_delete($uuid);\n\n // delete attachments and inventory\n drupal_set_message(t('Deleting inventory.'));\n d4os_io_db_070_os_inventory_user_delete($uuid);\n\n // delete sessions\n drupal_set_message(t('Deleting sessions.'));\n d4os_io_db_070_set_active('os_robust');\n db_query(\"DELETE FROM {Presence} WHERE UserID='%s'\", $uuid);\n d4os_io_db_070_set_active('default');\n/*\n // delete friends\n drupal_set_message(t('Deleting friends.'));\n d4os_io_db_070_set_active('os_users');\n db_query(\"DELETE FROM {userfriends} WHERE ownerID='%s' OR friendID = '%s'\", array($uuid, $uuid));\n d4os_io_db_070_set_active('default');\n*/\n // delete user entry in the grid\n drupal_set_message(t('Deleting user.'));\n d4os_io_db_070_set_active('os_robust');\n db_query(\"DELETE FROM {UserAccounts} WHERE PrincipalID='%s'\", $uuid);\n d4os_io_db_070_set_active('default');\n d4os_io_db_070_set_active('os_robust');\n db_query(\"DELETE FROM {auth} WHERE UUID='%s'\", $uuid);\n d4os_io_db_070_set_active('default');\n d4os_io_db_070_set_active('os_robust');\n db_query(\"DELETE FROM {GridUser} WHERE UserID='%s'\", $uuid);\n d4os_io_db_070_set_active('default');\n\n // delete the user drupal link \n db_query(\"DELETE FROM {d4os_ui_users} WHERE UUID='%s'\", $uuid);\n}", "public function destroy($username)\n {\n $model = new User;\n $user = $model->getUserByUsername($username);\n\n if ($user) {\n $user->delete();\n $message = 'Data telah dihapus';\n } else {\n $message = 'Data tidak ditemukan';\n }\n\n return redirect()->route('user.index')->with('success', $message);\n }", "public function deleteFromDb($user) {\n $sql = \"DELETE FROM users WHERE username = ?\";\n $stmt = $this->dbh->prepare($sql);\n $succ = $stmt->execute(array($user->getUsername()));\n }", "public function deleteAllFromUser(string $userId)\n {\n $queryBuilder = $this->getQueryBuilder()\n ->delete(\"entry\")\n ->where(\"userid = ?\")\n ->setParameter(0, $userId);\n \n $queryBuilder->execute();\n }", "function deleteUser( $sessionID, $username ) {\r\n\t\t//@session_start();\r\n\t\tif( $this->userCanDeleteUser( $sessionID, $username ) ) {\r\n\t\t\t//mysql_select_db('students');\r\n\t\t\t$query = \"UPDATE `users` SET AccessLevel=0 WHERE ID='\".$username.\"'\";\r\n\t\t\t//echo $query;\r\n\t\t\treturn mysql_query( $query );\r\n\t\t}\r\n\t}", "public function delete()\n {\n try {\n global $connection;\n //generate sql\n $sql = \"CALL customers_delete(:username)\";\n // adding the current values from fields to local variables..\n $username = $this->getUsername();\n //preparing the statement using prepare function\n $stmt = $connection->prepare($sql);\n //binding the parameters into sql using local appropriate fields\n $stmt->bindParam(':username', $username);\n //if execution is successful it will return true else false.. because execte function will return bool\n return $stmt->execute();\n } catch (Exception $e) {\n echo 'Exception occurred: ' . $e->getMessage();\n }\n }", "public function delete(){\n\t\t$user_id = $this->input->post(\"user_id\");\n\t\t$username = $this->input->post(\"username\");\n\n\t\t$condition = array(\n\t\t\t\"user_id\" => $user_id\n\t\t);\n\n\t\t$this->load->model(\"User_model\", \"users\", true);\n\n\t\t$this->users->delete($condition);\n\n\t\t$toast = array('state' => true, 'msg' => $username.' is Deleted Successfully!');\n\t\t$this->session->set_flashdata('toast', $toast);\n\n\t\techo \"success\";\n\t}", "public function deleteUser(){\n\t\t$sql = \"SELECT COUNT(aid) AS theCount FROM administrator where uid=:uid\";\n\n\t\tif($stmt = $this->_db->prepare($sql)){\n\t\t\t$stmt->bindParam(\":uid\", $_SESSION['UID'], PDO::PARAM_INT);\n\t\t\t$stmt->execute();\n\t\t\t$row = $stmt->fetch();\n\t\t\tif($row['theCount']==0){\n\t\t\t\treturn \"<h2> Error </h2>\" . \n\t\t\t\t\t\"<p> Only administrators can do this. </p>\";\n\t\t\t}\n\t\t\t$stmt ->closeCursor();\n\t\t}\n\t\telse{\n\t\t\treturn \"Something went wrong checking the admin table.\";\n\t\t}\n\t\t\n\t\t//TODO: send the deleted user an email telling them they have been deleted\n\t\t\n\t\t$sql = \"DELETE FROM user WHERE uid=:uid\";\n\t\tif($stmt = $this->_db->prepare($sql)){\n\t\t\t$stmt->bindParam(\":uid\", $_GET['u'], PDO::PARAM_INT);\n\t\t\t$stmt->execute();\n\t\t}\n\t\telse{\n\t\t\treturn \"Something went wrong deleting the user.\";\n\t\t}\n\n\t\treturn \"done\";\n\t}", "public function deleteUser( $userid )\r\n\t{\r\n\t\t$this->debug->guard( );\r\n\r\n\t\t// user\r\n\t\t$sql = $this->database->prepare( \"DELETE FROM \" . $this->configuration->getConfiguration( 'zeitgeist', 'tables', 'table_users' ) . \" WHERE user_id = ?\" );\r\n\t\t$sql->bindParam( 1, $userid );\r\n\r\n\t\tif ( !$sql->execute( ) )\r\n\t\t{\r\n\t\t\t$this->debug->write( 'Problem deleting user: could not delete the user from database', 'warning' );\r\n\t\t\t$this->messages->setMessage( 'Problem deleting user: could not delete the user from database', 'warning' );\r\n\r\n\t\t\t$this->debug->unguard( false );\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t// userdata\r\n\t\t$sql = $this->database->prepare( \"DELETE FROM \" . $this->configuration->getConfiguration( 'zeitgeist', 'tables', 'table_userdata' ) . \" WHERE userdata_user = ?\" );\r\n\t\t$sql->bindParam( 1, $userid );\r\n\r\n\t\tif ( !$sql->execute( ) )\r\n\t\t{\r\n\t\t\t$this->debug->write( 'Problem deleting user: could not delete the userdata from database', 'warning' );\r\n\t\t\t$this->messages->setMessage( 'Problem deleting user: could not delete the userdata from database', 'warning' );\r\n\r\n\t\t\t$this->debug->unguard( false );\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t// userrights\r\n\t\t$sql = $this->database->prepare( \"DELETE FROM \" . $this->configuration->getConfiguration( 'zeitgeist', 'tables', 'table_userrights' ) . \" WHERE userright_user = ?\" );\r\n\t\t$sql->bindParam( 1, $userid );\r\n\r\n\t\tif ( !$sql->execute( ) )\r\n\t\t{\r\n\t\t\t$this->debug->write( 'Problem deleting user: could not delete the userrights from database', 'warning' );\r\n\t\t\t$this->messages->setMessage( 'Problem deleting user: could not delete the userrights from database', 'warning' );\r\n\r\n\t\t\t$this->debug->unguard( false );\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t// userroles\r\n\t\t$sql = $this->database->prepare( \"DELETE FROM \" . $this->configuration->getConfiguration( 'zeitgeist', 'tables', 'table_userroles_to_users' ) . \" WHERE userroleuser_user = ?\" );\r\n\t\t$sql->bindParam( 1, $userid );\r\n\r\n\t\tif ( !$sql->execute( ) )\r\n\t\t{\r\n\t\t\t$this->debug->write( 'Problem deleting user: could not delete the userroles from database', 'warning' );\r\n\t\t\t$this->messages->setMessage( 'Problem deleting user: could not delete the userroles from database', 'warning' );\r\n\r\n\t\t\t$this->debug->unguard( false );\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t// userconfirmation\r\n\t\t$sql = $this->database->prepare( \"DELETE FROM \" . $this->configuration->getConfiguration( 'zeitgeist', 'tables', 'table_userconfirmation' ) . \" WHERE userconfirmation_user = ?\" );\r\n\t\t$sql->bindParam( 1, $userid );\r\n\r\n\t\tif ( !$sql->execute( ) )\r\n\t\t{\r\n\t\t\t$this->debug->write( 'Problem deleting user: could not delete the userconfirmation from database', 'warning' );\r\n\t\t\t$this->messages->setMessage( 'Problem deleting user: could not delete the userconfirmation from database', 'warning' );\r\n\r\n\t\t\t$this->debug->unguard( false );\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t$this->debug->unguard( true );\r\n\t\treturn true;\r\n\t}", "public function deleteUserById($user_id){\n $this->dao->deleteUserByid($user_id);\n }", "function procDeleteUser() {\n global $session, $database, $form;\n /* Username error checking */\n $subuser = $this->checkUsername(\"deluser\");\n\n /* Errors exist, have user correct them */\n if ($form->num_errors > 0) {\n $_SESSION['value_array'] = $_POST;\n $_SESSION['error_array'] = $form->getErrorArray();\n header(\"Location: \" . $session->referrer);\n }\n /* Delete user from database */ else {\n $q = \"DELETE FROM \" . TBL_USERS . \" WHERE username = '$subuser'\";\n $database->query($q);\n header(\"Location: \" . $session->referrer);\n }\n }", "public function supprime_user() {\n\t\t$this->onDebug ( __METHOD__, 1 );\n\t\t$userdata = $this->creer_definition_user_delete_ws ();\n\t\t$this->onDebug ( $userdata, 1 );\n\t\treturn $this->getObjetZabbixWsclient ()\n\t\t\t->userDelete ( $userdata );\n\t}", "public function delete()\n {\n $this->images()->delete();\n // as suggested by Dirk in comment,\n // it's an uglier alternative, but faster\n // Photo::where(\"user_id\", $this->id)->delete()\n\n // delete the user\n return parent::delete();\n }", "public function deleterUser( $userID)\n {\n\t\t$data = $this->call(array(), \"DELETE\", \"users/\".$userID.\".json\");\n\t\treturn $data;\n }", "public function deleteUser($userId)\n {\n return $this->start()->uri(\"/api/user\")\n ->urlSegment($userId)\n ->urlParameter(\"hardDelete\", true)\n ->delete()\n ->go();\n }", "public function delete_delete()\n {\n $response = $this->UserM->delete_user(\n $this->delete('id')\n );\n $this->response($response);\n }", "function delete_user()\n {\n\n //return true if successful\n }", "public function deleted(): void\n {\n Cache::forget('users');\n }", "public function delete($user)\n {\n $user->deleteProfilePhoto();\n $user->tokens->each->delete();\n\n // $user->delete(); csak logikai törlés a megngedett\n $user->update([\"name\" => \"deleted\".$user->id,\n \"email\" => \"deleted\".$user->id.\"@deleted.com\",\n \"password\" => \"psw\".rand(100000,999999)]);\n\n \\DB::table('members')\n ->where('user_id','=',$user->id)\n ->delete();\n\n }", "function deleteUserImageFiles($username) {\n $target_dir = \"uploads/\" . $username . \"/\";\n\n $files = glob(\"$target_dir/*.*\");\n foreach ($files as $file) {\n unlink($file);\n }\n if (is_dir($target_dir)) {\n rmdir($target_dir);\n }\n}", "public function delete($user){\n }", "public function delete(): void\n {\n $id = $this->id;\n $this->fetch(\n 'DELETE FROM user WHERE id = ?;',\n [$id]\n );\n }", "public function destroy(NameUser $nameUser)\n {\n //\n }", "function delete() {\n try {\n DB::beginWork('Deleting company @ ' . __CLASS__);\n \n parent::delete();\n\n $users = Users::findByCompany($this->object, null, STATE_TRASHED);\n if (is_foreachable($users)) {\n foreach ($users as $user) {\n $user->state()->delete();\n } // foreach\n } // if\n\n AngieApplication::cache()->removeByModel('users');\n \n DB::commit('Company deleted @ ' . __CLASS__);\n } catch(Exception $e) {\n DB::rollback('Failed to delete company @ ' . __CLASS__);\n \n throw $e;\n } // try\n }", "public function delete()\n {\n $this->getMasterApiClient()->deleteSubUser($this->getSubAccountUsername());\n LaravelLog::info('Sub account deleted: ' . $this->getSubAccountUsername());\n parent::delete();\n }", "function deleteUser($id)\n {\n \n $userLogged = Auth::check(['administrateur']);\n\n $errors = [];\n \n // deletion of all user comments from the database \n $commentManager = new CommentManager();\n $listCommentsDelete = $commentManager->listCommentsForUser($id);\n\n if ($listCommentsDelete !== []) {\n foreach($listCommentsDelete as $comment){\n try{\n $commentManager->deleteComment($comment->getId()); //deletion from the database \n } catch (Exception $e) {\n $errors[] = $e->getMessage();\n }\n }\n }\n\n // deletion of all user-related media (logos, deactivate image, ...) to delete them from the server (media folder) and from the database \n $mediaManager = new MediaManager();\n $listMedias = $mediaManager->getListMediasForUser($id); // we retrieve the list of user logos \n\n if (!empty($listMedias)) {\n foreach($listMedias as $media){\n try{\n unlink($media->getPath()); //delete media on the server in the media folder \n $mediaManager->deleteMedia($media->getId()); //deletion from the database \n } catch (Exception $e) {\n $errors[] = $e->getMessage();\n } \n }\n }\n\n // deletion of the database of all the user's socialNetworks \n $socialNetworkManager = new SocialNetworkManager();\n $listSocialNetworksForUserDelete = $socialNetworkManager->getListSocialNetworksForUser($id);\n \n if (!empty($listSocialNetworksForUserDelete)) {\n foreach($listSocialNetworksForUserDelete as $socialnetwork){\n try\n { \n $socialNetworkManager->deleteSocialNetwork($socialnetwork->getId()); //deletion from the database \n }\n catch (Exception $e)\n {\n $errors[] = $e->getMessage();\n } \n }\n }\n\n //deletion of all post related to use \n $postManager = new PostManager();\n $listPostsForUser = $postManager->getListPostsForUser($id);\n \n if (!empty($listPostsForUser)) {\n foreach($listPostsForUser as $post){ // deletion of all posts (and their associated media) from the user \n \n // we delete the media linked to the post (if there is any) \n $listMediasDelete = $mediaManager->getListMediasForPost($post->getId());// on recupere la liste des media pour ce $post\n\n if ($listMediasDelete !== []) {\n foreach($listMediasDelete as $media){\n try{\n unlink($media->getPath()); //delete media on the server in the media folder \n $mediaManager->deleteMedia($media->getId()); //deletion from the database \n } catch (Exception $e) {\n $errors[] = $e->getMessage();\n } \n }\n }\n\n // we delete the comments linked to the post (if there are any) \n $listCommentsDelete = $commentManager->getListCommentsForPost($post->getId());// we get the list of comments for this $ post \n \n if ($listCommentsDelete !== []) {\n foreach($listCommentsDelete as $comment){\n try{\n $commentManager->deleteComment($comment->getId()); //deletion from the database \n } catch (Exception $e) {\n $errors[] = $e->getMessage();\n } \n }\n }\n\n // we delete the post \n try{\n $post = $postManager->deletePost($post->getId());\n } catch (Exception $e) {\n $errors[] = $e->getMessage();\n } \n }\n }\n\n // user removal \n $userManager = new UserManager();\n\n try{\n $user = $userManager->deleteUser($id);\n } catch (Exception $e) {\n $errors[] = $e->getMessage();\n\n }\n\n setFlashErrors($errors); // to manage flash message errors (see globalFunctions.php file) \n\n require'../app/Views/backViews/user/backDeleteUserView.php';\n }", "public function deleted(User $user)\n {\n $this->clearCache($this->key);\n\n FileHelpers::deleteFile($user->avatar);\n }", "function delete($user_id) {\n $oldName = get_user_by_id($user_id['id']);\n $oldImage = 'img/demo/avatars/' . $oldName['image'];\n if(!empty($oldName['image'])) {\n if(file_exists($oldImage)) {\n unlink($oldImage);\n }\n }\n\n $db = new PDO(\"mysql:host=localhost; dbname=registration\", \"root\", \"root\");\n $sql = \"DELETE FROM users WHERE id=:id\";\n $statement = $db->prepare($sql);\n $statement->execute([\n 'id' => $user_id['id'],\n ]);\n\n}", "public function delete_user() {\n $query = 'DELETE FROM ' . $this->table_name . ' WHERE vendor_id = :vendor_id';\n\n // Prepare statement\n $stmt = $this->conn->prepare($query);\n\n // Clean data\n\n // Bind data\n $stmt->bindParam(':vendor_id', $this->vendor_id);\n\n // Execute query\n if($stmt->execute()) {\n return true;\n }\n\n //Error $stmt->error;\n return false;\n }", "public function destroy()\n {\n $userId = Helper::getIdFromUrl('user');\n \n if ((Helper::checkUrlIdAgainstLoginId($userId)) !== 'super-admin') {\n Usermodel::load()->destroy($userId);\n } else { \n View::render('errors/403.view', [\n 'message' => 'You cannot delete yourself!',\n ]);\n }\n }", "function procDeleteUser(){\r\n\t\t\tglobal $session, $database, $form;\r\n\t\t\t/* Username error checking */\r\n\t\t\t$subuser = $this->checkUsername(\"deluser\");\r\n\t\t\t\r\n\t\t\t/* Errors exist, have user correct them */\r\n\t\t\tif($form->num_errors > 0){\r\n\t\t\t\t$_SESSION['value_array'] = $_POST;\r\n\t\t\t\t$_SESSION['error_array'] = $form->getErrorArray();\r\n\t\t\t\theader(\"Location: \".$session->referrer);\r\n\t\t\t}\r\n\t\t\t/* Delete user from database */\r\n\t\t\telse{\r\n\t\t\t\t$q = \"DELETE FROM \".TBL_USERS.\" WHERE username = '$subuser'\";\r\n\t\t\t\t$database->query($q);\r\n\t\t\t\theader(\"Location: \".$session->referrer);\r\n\t\t\t}\r\n\t\t}", "public function delete_user($con, $username) {\n $query = \"DELETE FROM user WHERE username = '$username'\";\n $result = mysqli_query($con,$query);\n if ($result) {\n return true;\n }\n else {\n return false;\n }\n }", "public static function delete(Users $user)\n {\n $email=$user->Email;\n DB::delete(\"user\",\"Email='$email' AND IsDeleted=0\");\n \n //$conn->close();\n header('location: DeleteUser.php');\n\n }", "public function deleteFileInfo(User $user)\n {\n }", "public function delete(){\t\t\tif( is_null( $this->id ) ) trigger_error( \"User::delete(): Attempt to delete a user object that does not have its ID property set.\", E_USER_ERROR );\r\n\t\t\t\r\n\t\t\t//Delete the object\r\n\t\t\t$conn = new PDO( DB_DSN, DB_USERNAME, DB_PASSWORD );\r\n\t\t\t$st = $conn->prepare ( \"DELETE FROM \".TABLENAME_GROUPS.\" WHERE id = :id LIMIT 1\" );\r\n\t\t\t$st->bindValue( \":id\", $this->id, PDO::PARAM_INT );\r\n\t\t\t$st->execute();\r\n\t\t\t$conn = null;\t\t\r\n\t\t}", "function delete_user($email)\n{\n\t$uid = get_user_id($email);\n\tif (!$uid)\n\t\techo \"Sorry! <font color=\\\"red\\\">:-/</font> This user doesn't exist.\";\n\telseif ($uid > 10)\n\t{\n\t\techo \"So you wanted to delete user \".$uid.\"...<br>\";\n\t\tif ($uid)\n\t\t\t$ucs = getUserConnections($uid);\n\t\tforeach ($ucs as $k => $uc)\n\t\t{\t\n\t\t\techo \"User connection \".$uc['connection_id'].\":<br/>\";\n\t\t\t$q = \"DELETE FROM generic_measurement WHERE connection_id=?\"; \n\t\t\tif(execute_prepared_query($q,array($uc['connection_id']),'i'))\n\t\t\t{\t$q = \"DELETE FROM generic_measurements_stats WHERE connection_id={$uc['connection_id']}\"; \n\t\t\t\tif(execute_query($q))\n\t\t\t\t\techo \"Connection NDT measurements deleted.<br/>\";\n\t\t\t}\n\t\t\t$q = \"DELETE FROM glasnost_measurement WHERE connection_id=?\"; \n\t\t\tif(execute_prepared_query($q,array($uc['connection_id']),'i'))\n\t\t\t{\t$q = \"DELETE FROM glasnost_measurements_stats WHERE connection_id={$uc['connection_id']}\"; \n\t\t\t\tif(execute_query($q))\n\t\t\t\t\techo \"Connection Glasnost measurements deleted.<br/>\";\n\t\t\t}\n\t\t\t$q = \"DELETE FROM connection WHERE connection_id=?\"; \n\t\t\tif(execute_prepared_query($q,array($uc['connection_id']),'i'))\n\t\t\t\techo \"Connection itself deleted.<hr/>\";\n\t\t}\n\t\t$q = \"DELETE FROM user_connection WHERE user_id=?\"; \n\t\tif(execute_prepared_query($q,array($uid),'i'))\n\t\t{\n\t\t\t$q = \"DELETE FROM user WHERE user_id=?\";\n\t\t\tif(execute_prepared_query($q,array($uid),'i'))\n\t\t\t{\t\n\t\t\t\techo \"Finally user $uid is deleted.<br/><font color=\\\"green\\\">DONE :-)</font><hr/>\";\n\t\t\t\t$q = \"DELETE FROM access_logs WHERE user_id=$uid\"; \n\t\t\t\texecute_prepared_query($q,array($uid),'i');\n\t\t\t}\n\t\t\n\t\t}\n\t}\n\telse\n\t\techo \"Sorry! <font color=\\\"red\\\">:-/</font> Not allowed to delete user $uid.\";\n}", "function cvs_delete_user($cvs_user, $cvs_project) {\r\n $all_cvs_users = cvs_read_passwd($cvs_project);\r\n $cvs_fields=$all_cvs_users[$cvs_user];\r\n if (!is_null($cvs_fields)) {\r\n\tunset($all_cvs_users[$cvs_user]);\r\n\tcvs_write_file($all_cvs_users, $cvs_project);\r\n\tcvs_log(1, \"Deleted user $cvs_user\");\r\n } else {\r\n\tcvs_log(3, \"User $cvs_user does not exist\");\r\n } \r\n}", "public function delete($userid) {\n $sql = \"DELETE FROM usertable WHERE userid = :userid\";\n $stmt = $this->db_connect->prepare($sql);\n $stmt->bindParam(':userid', $userid, PDO::PARAM_INT);\n $stmt->execute();\n }", "public function deleted(User $user)\n {\n //\n }", "public function deleted(User $user)\n {\n //\n }", "public function deleted(User $user)\n {\n //\n }", "public function deleted(User $user)\n {\n //\n }", "public function deleted(User $user)\n {\n //\n }", "public function deleted(User $user)\n {\n //\n }" ]
[ "0.6725239", "0.66722304", "0.6621715", "0.6576141", "0.6549368", "0.64631426", "0.6409221", "0.640288", "0.63376594", "0.63102615", "0.630034", "0.6261187", "0.6214425", "0.6210117", "0.6203356", "0.6203356", "0.617481", "0.6133425", "0.61160725", "0.61039466", "0.60968286", "0.60866195", "0.60845804", "0.60644156", "0.6045577", "0.60233676", "0.6007658", "0.6006783", "0.6000419", "0.59831405", "0.597017", "0.5964518", "0.5964288", "0.5958706", "0.5952815", "0.59508044", "0.5950392", "0.59063625", "0.58949655", "0.5877455", "0.58567953", "0.58488244", "0.58472973", "0.58459604", "0.584537", "0.5835306", "0.58341426", "0.5828267", "0.5805608", "0.579236", "0.5771988", "0.5771988", "0.5771988", "0.57680595", "0.575822", "0.57561874", "0.5742484", "0.5741168", "0.57328546", "0.57325184", "0.57152694", "0.5714234", "0.57116055", "0.5708997", "0.57070565", "0.5687528", "0.5686201", "0.5664288", "0.5650625", "0.56430954", "0.5641966", "0.56207013", "0.56180716", "0.56157154", "0.5612108", "0.5605482", "0.5598946", "0.55966365", "0.5592172", "0.55862343", "0.55800337", "0.55763286", "0.55751204", "0.5574958", "0.55738634", "0.55677515", "0.55621326", "0.5554336", "0.555274", "0.5548975", "0.55467206", "0.55464673", "0.55460435", "0.55449396", "0.5536631", "0.5536631", "0.5536631", "0.5536631", "0.5536631", "0.5536631" ]
0.63200593
9
Open the data storage for a specific user. If the user does not exist, THIS call MUST create their user storage, or at least do any necessary preparations so that the other functions can read/write to the user's storage (and behave as specified). Is called every time we're switching to a user, and happens before we call any userspecific data retrieval functions. This function must cache the user reference and perform necessary backend operations, such as opening file/database handles and finding the row ID for the given user, so that all further queries know what user to use. All further calls relating to that user will assume that your storage class has cached the user reference we gave you in this call.
public function openUser ($username) { $this->_username = $username; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function openUser()\n {\n $this->isUser = true;\n }", "function d4os_io_db_070_os_user_load($data = array()) {\n\n if (is_numeric($data)) {\n\n // get the user by uid\n $UUID = db_result(db_query(\"SELECT UUID FROM {d4os_ui_users} WHERE uid = %d\", array($data)));\n\n if (!$UUID) {\n return FALSE;\n }\n\n $query = \"SELECT * FROM {UserAccounts} AS ua\"\n . \" LEFT JOIN {auth} AS a ON a.UUID=ua.PrincipalID\"\n . \" LEFT JOIN {GridUser} AS gu ON gu.UserID=ua.PrincipalID\"\n . \" WHERE ua.PrincipalID='%s'\";\n\n d4os_io_db_070_set_active('os_robust');\n $user = db_fetch_object(db_query($query, $UUID));\n d4os_io_db_070_set_active('default');\n \n if ($user) {\n $user = _d4os_io_db_070_os_070_to_grid($user);\n d4os_io_db_070_users_add_extra_fields($user);\n return $user;\n }\n else {\n return FALSE;\n }\n }\n\n // get only inworld fields\n $user_fields = d4os_ui_users_get_grid_fields();\n\n // Dynamically compose a SQL query:\n $query = array();\n $values = array();\n\n // get the user by keys\n foreach ($data as $key => $value) {\n if (in_array($key, $user_fields)) {\n switch ($key) {\n case 'UUID':\n $query[]= \"ua.PrincipalID = '%s'\";\n $values[] = $value;\n break;\n case 'username':\n $query[]= \"ua.FirstName = '%s'\";\n $values[] = $value;\n break;\n case 'lastname':\n $query[]= \"ua.LastName = '%s'\";\n $values[] = $value;\n break;\n case 'email':\n $query[]= \"ua.Email = '%s'\";\n $values[] = $value;\n break;\n case 'created':\n $query[]= \"ua.Created = %d\";\n $values[] = $value;\n break;\n case 'godLevel':\n $query[]= \"ua.UserLevel = %d\";\n $values[] = $value;\n break;\n }\n }\n }\n $sql = \"SELECT * FROM {UserAccounts} AS ua\"\n . \" LEFT JOIN {auth} AS a ON a.UUID=ua.PrincipalID\"\n . \" LEFT JOIN {GridUser} AS gu ON gu.UserID=ua.PrincipalID\"\n . \" WHERE \". implode(' AND ', $query);\n\n d4os_io_db_070_set_active('os_robust');\n $user = db_fetch_object(db_query($sql, $values));\n d4os_io_db_070_set_active('default');\n \n if ($user) {\n $uid = db_result(db_query(\"SELECT uid FROM {d4os_ui_users} WHERE UUID = '%s'\", array($user->PrincipalID)));\n $user->uid = $uid;\n $user = _d4os_io_db_070_os_070_to_grid($user);\n d4os_io_db_070_users_add_extra_fields($user);\n return $user;\n }\n else {\n return FALSE;\n }\n}", "function user() {\r\r\r\n\t\t$this->_dao = DB_DataObject::factory('Users');\r\r\r\n\t}", "protected function getUserFromAvailableData()\n {\n $storage = $this->getStorage();\n\n //get saved values\n $user = $storage->get('user', null);\n $persistedAccessToken = $storage->get('access_token');\n\n $accessToken = $this->getAccessToken();\n\n /**\n * This is true if both statements are true:\n * 1: We got an access token\n * 2: The access token has changed or if we don't got a user.\n */\n if ($accessToken && !($user !== null && $persistedAccessToken == $accessToken)) {\n $user = $this->getUserFromAccessToken();\n if ($user !== null) {\n $storage->set('user', $user);\n } else {\n $storage->clearAll();\n }\n }\n\n return $user;\n }", "function getUser($userName = null)\n{\n\tif (!$userName) return $this->loggedUser;\n\t$user = $this->getStorage()->getUser($userName);\n\tif ($user) $user->auth = $this;\n\treturn $user;\n}", "public function loadStorage($file){\n\t\tif (file_exists($file)) {\n\t\t\t$this->user = unserialize(file_get_contents($file));\n\t\t}\n\t}", "public static function getUserRecord()\n {\n // we cache the user entry per request\n if(self::$user)\n return self::$user;\n\n $res = getDb()->getUser();\n // if null create, onerror return false\n if($res === null)\n {\n // user entry does not exist, create it\n $res = self::create();\n if(!$res)\n return false;\n }\n elseif($res === false)\n {\n return false;\n }\n\n self::$user = $res;\n return self::$user;\n }", "private function init_user() {\n global $USER, $DB;\n\n $userdata = new stdClass;\n $userdata->username = 'user';\n $userid = user_create_user($userdata);\n $USER = $DB->get_record('user', array('id' => $userid));\n context_user::instance($USER->id);\n }", "public function __loadUser()\n {\n\t$facebook = $this->fb;\n\t$this->user = $facebook->api(\"/me\", \"GET\");\n\t$this->userid = $facebook->getUser();\n\treturn;\n }", "public function user($userId = null)\n {\n // Figure out user & access\n $userId ??= user_id();\n\n // Not logged in\n if ($userId === null) {\n // Check for list permission\n if (! $this->model->mayList()) {\n return $this->failure(403, lang('Files.notPermitted'));\n }\n\n $this->setData([\n 'access' => 'display',\n 'title' => 'All Files',\n 'userName' => '',\n ]);\n }\n // Logged in, looking at another user\n elseif ((int) $userId !== user_id()) {\n // Check for list permission\n if (! $this->model->mayList()) {\n return $this->failure(403, lang('Files.notPermitted'));\n }\n\n $this->setData([\n 'title' => 'User Files',\n 'userName' => 'User',\n ]);\n }\n // Looking at own files\n else {\n $this->setData([\n 'access' => 'manage',\n 'title' => 'My Files',\n 'userName' => 'My',\n ]);\n }\n\n $this->setData([\n 'userId' => $userId,\n 'source' => 'user/' . $userId,\n ]);\n\n return $this->display();\n }", "function load($oUser)\n {\n $this->p_oUser = $oUser;\n $this->refresh();\n }", "public function getUserRecord()\n {\n // we cache the user entry per request\n if($this->user)\n return $this->user;\n\n $res = $this->db->getUser();\n // if null create, onerror return false\n if($res === null)\n {\n // user entry does not exist, create it\n $res = $this->create();\n if(!$res)\n return false;\n\n // fetch the record to return\n $res = $this->db->getUser();\n if(!$res)\n return false;\n }\n elseif($res === false)\n {\n return false;\n }\n\n $this->user = $res;\n return $this->user;\n }", "function loadUser($user_id)\n\t\t{\n\t\t\t$query=sqlite_query($this->connection, \"SELECT name FROM user WHERE user_id='$user_id'\");\n\t\t\treturn $query;\n\t\t}", "protected function loadUserData()\n {\n $this->userData = ($this->session->userData?:[]) + $this->userDataTemplate;\n }", "public function public_user_data($user_name)\n {\n $url = preg_replace('/set/i', 'user:' . $user_name, $this->public_url);\n return $this->curl($url)->user;\n }", "public function setUser()\n\t{\n\t\t$user = User::getInstance();\n\t\t\n\t\tif ( $this->session->get( 'user_id' ) ) {\n\t\t\t$user->set( 'id', $this->session->get( 'user_id' ) );\n\t\t\t$user->read();\n\t\t}\n\t}", "abstract protected function getUser();", "public function store_user_data() {\n\n\t\t$user = User::where('mobile_number', session('phone_number'))->where('type', 0)->get();\n\n\t\tif (count($user)) {\n\t\t\tflash_message('danger', trans('messages.driver.this_number_already_have_account_please_login'));\n\t\t\treturn redirect()->route('login');\n\t\t} else {\n\t\t\t$user = new User;\n\t\t\t$user->mobile_number = session('phone_number');\n\t\t\t$user->name = session('user_name');\n\t\t\t$user->type = 0;\n\t\t\t$user->password = bcrypt(session('password'));\n\t\t\t$user->country_code = session('country_code');\n\t\t\t$user->email = session('email_address');\n\t\t\t$user->status = \"1\";\n\t\t\t$user->save();\n\n\t\t\tif (Auth::guard()->attempt(['mobile_number' => session('phone_number'), 'password' => session('password')])) {\n\t\t\t\t$intended_url = session('url.intended');\n\t\t\t\tif ($intended_url) {\n\t\t\t\t\t//create new order use session values\n\t\t\t\t\tadd_order_data();\n\t\t\t\t\treturn redirect()->route($intended_url); // Redirect to intended url page\n\t\t\t\t} else {\n\t\t\t\t\treturn redirect()->route('search'); // Redirect to search page\n\t\t\t\t}\n\t\t\t} else {\n\n\t\t\t\treturn redirect()->route('login'); // Redirect to login page\n\t\t\t}\n\t\t}\n\t}", "function loadUser($userID)\n {\n\t$this->userData = $this->db->get_results(\"SELECT * FROM \".$this->usertable.\" WHERE \".$this->user_id.\" = '\".$this->escape($userID).\"' LIMIT 1\");\n if ( count($res) == 0 )\n \treturn false;\n $this->user_id = $userID;\n $_SESSION[$this->sessionVariable] = $this->userID;\n return true;\n }", "static function setupUser()\n {\n global $sugar_config;\n require_once 'modules/Users/User.php';\n $_SESSION['unique_key'] = $sugar_config['unique_key'];\n $user_id = $GLOBALS['db']->getOne(\"SELECT id FROM users WHERE user_name='{$GLOBALS['bob_config']['global']['admin_user_name']}' AND is_admin=1\");\n if(empty($user_id)) {\n throw new Exception(\"Can't find user \".$GLOBALS['bob_config']['global']['admin_user_name'], 1);\n }\n $_SESSION['authenticated_user_id'] = $user_id;\n $GLOBALS['current_user'] = new User();\n $GLOBALS['current_user'] = $GLOBALS['current_user']->retrieve($user_id); \n }", "function LoadCurrent()\n {\n $this->user = null;\n $userID = null;\n if (isset($_SESSION[self::$sessionParam]))\n $userID = $_SESSION[self::$sessionParam];\n \n if ($userID)\n {\n $user = new User($userID);\n if ($user->Exists())\n $this->user = $user;\n }\n return $this->user !== null;\n }", "public function user()\n {\n if ($this->loggedOut) {\n return;\n }\n\n // If we've already retrieved the user for the current request we can just\n // return it back immediately. We do not want to fetch the user data on\n // every call to this method because that would be tremendously slow.\n if (! is_null($this->user)) {\n return $this->user;\n }\n\n $id = $this->session->get($this->getName());\n\n // First we will try to load the user using the identifier in the session if\n // one exists. Otherwise we will check for a \"remember me\" cookie in this\n // request, and if one exists, attempt to retrieve the user using that.\n if (! is_null($id)) {\n if ($this->user = $this->provider->retrieveById($id)) {\n $this->fireAuthenticatedEvent($this->user);\n }\n }\n\n // If the user is null, but we decrypt a \"recaller\" cookie we can attempt to\n // pull the user data on that cookie which serves as a remember cookie on\n // the application. Once we have a user we can return it to the caller.\n $recaller = $this->recaller();\n\n if (is_null($this->user) && ! is_null($recaller)) {\n $this->user = $this->userFromRecaller($recaller);\n\n if ($this->user) {\n $this->replaceRememberToken($this->user, $recaller->token());\n\n $this->updateSession($this->user->getAuthIdentifier());\n\n $this->fireLoginEvent($this->user, true);\n }\n }\n\n return $this->user;\n }", "public function store()\n\t{\n\t\t$user = $this->user->store( Input::all() );\n\t}", "function _read_user_session()\n {\t\t\n\t\tif($this->sh_Options['keeping_logic'] == 'db'){\n\t\t\t$this->is_present = $this->_read_user_session_db();\n\t\t} else {\n\t\t\t$this->is_present = $this->_read_user_session_ss();\n\t\t}\n\t}", "public function _initAuthStorage()\n {\n $bootstrap = $this->getApplication()->bootstrap('doctrine');\n $em = $bootstrap->getResource('doctrine');\n\n $storage = new DoctrineStorage($em, 'User\\Model\\Session');\n Authenticator::getInstance()->setStorage($storage)->getIdentity();\n }", "public function user()\n {\n // check if user is already loaded, if not, we fetch it from database\n if ($this->_user) {\n return $this->_user;\n } else {\n $users = new Application_Model_DbTable_Users();\n if ($user = $users->findById($this->_user_id)) {\n $this->_user = $user;\n return $user ;\n } else {\n throw new Exception(\"Can't fetch user data\");\n }\n }\n }", "function get_user($userName){\n return get_user_object($userName);\n}", "public function LoadUser($userId)\r\n {\r\n $queryUser = \"SELECT * FROM users WHERE user_id=:user_id\";\r\n $user = $this->sqlDataBase->prepare($queryUser);\r\n $user->execute(array(':user_id'=>$userId));\r\n $userInfo = $user->fetch(PDO::FETCH_ASSOC);\r\n $this->userId = $userId;\r\n $this->userName = $userInfo['user_name'];\r\n $this->userRole = $userInfo['user_role'];\r\n $this->authKey = $userInfo['auth_key'];\r\n }", "protected function loadUsers() {\r\n $this->users = new \\App\\Table\\UserTable(App::getInstance()->getDb());\r\n }", "public function initStorage()\n {\n $this->open();\n }", "protected function fetchUserSessionFromDB() {}", "function fromDb($conn, $user)\n {\n \n $sql_saverId = \"select * from Tenders where ProductID = \" . $this->ID;\n \n\n $result = mysqli_query($conn, $sql_saverId);\n $resultNumber = mysqli_num_rows($result);\n if ($resultNumber != 1)\n {\n OH_NO(\"Failed to get the user for for this product \" . $this->ID);\n return FALSE;\n }\n $row = mysqli_fetch_array($result); \n $saverId = $row['UserID'];\n $this->openTime = $row['OpenTime'];\n $this->closureTime = $row['CloseTime'];\n $this->payment = $row['Payment'];\n \n \n //get the details about that user id\n $sql_detailsOnSaverId = \"select * from users where ID = \" . $saverId;\n $result = mysqli_query($conn, $sql_detailsOnSaverId);\n $resultNumber = mysqli_num_rows($result);\n if ($resultNumber != 1)\n {\n OH_NO(\"Failed to get the user details for for this user \" . $saverId);\n return FALSE;\n }\n $row = mysqli_fetch_array($result); \n $this->sBirthDate = $row['BirthDate'];\n $this->sStatus = $row['Status'];\n $this->sGender = $row['Gender'];\n $this->sOccupation = $row['Occupotion'];\n \n \n //get the last management fee of this user for this product:\n $sql_lastManagementFee = \"select value from product_events where ProductID = \" . $this->ID . \" and userID = \" . $saverId . \" and eventType = 2 order by date DESC limit 1\";\n $result = mysqli_query($conn, $sql_lastManagementFee);\n $resultNumber = mysqli_num_rows($result);\n if ($resultNumber != 1)\n {\n OH_NO(\"Failed to get the last managment fee for this product \" . $this->ID);\n return FALSE;\n }\n $row = mysqli_fetch_array($result); \n $this->managementFee = $row['value'];\n\n //get the last empoyer commit\n $sql_lastEmployerCommit = \"select value from product_events where ProductID = \" . $this->ID . \" and userID = \" . $saverId . \" and eventType = 0 order by date DESC limit 1\";\n $result = mysqli_query($conn, $sql_lastEmployerCommit);\n $resultNumber = mysqli_num_rows($result);\n if ($resultNumber != 1)\n {\n OH_NO(\"Failed to get the last employer commit for this product \" . $this->ID);\n return FALSE;\n }\n $row = mysqli_fetch_array($result); \n $this->employer = $row['value'];\n\n //get the last employee commit\n $sql_lastEmployeeCommit = \"select value from product_events where ProductID = \" . $this->ID . \" and userID = \" . $saverId . \" and eventType = 1 order by date DESC limit 1\";\n $result = mysqli_query($conn, $sql_lastEmployeeCommit);\n $resultNumber = mysqli_num_rows($result);\n if ($resultNumber != 1)\n {\n OH_NO(\"Failed to get the last employee commit for this product \" . $this->ID);\n return FALSE;\n }\n $row = mysqli_fetch_array($result); \n $this->employee = $row['value'];\n \n //get the total value of this product id for this saver \n $sql_totalValue = \"select Total from products where UserID = \" . $saverId . \" and ProductID = \" . $this->ID;\n $result = mysqli_query($conn, $sql_totalValue);\n $resultNumber = mysqli_num_rows($result);\n if ($resultNumber != 1)\n {\n OH_NO(\"Failed to get the total value for this product \" . $this->ID);\n return FALSE;\n }\n $row = mysqli_fetch_array($result); \n $this->totalValue = $row['Total'];\n \n //is this product is mine ? get the institution id of this product\n $sql_institutionIdForThisProduct = \"select InstitutionalID from products where UserID = \" . $saverId . \" and ProductID = \" . $this->ID;\n $result = mysqli_query($conn, $sql_institutionIdForThisProduct);\n $resultNumber = mysqli_num_rows($result);\n if ($resultNumber != 1)\n {\n OH_NO(\"Failed to get the institute id for this product \" . $this->ID);\n return FALSE;\n }\n $row = mysqli_fetch_array($result); \n $productInsituteId = $row['InstitutionalID'];\n //and compare it with the user's institute\n $userInstituteId = $user->institute->ID;\n //figure out - why not presented as table ? $this->isMine = ($userInstituteId == $productInsituteId);\n \n \n //check the status of that tender for the user's institute according to the offers' table\n $sql_offerStatus = \"select OfferStatus from offers where ProductID = \" . $this->ID . \" and InstituteID = \" . $userInstituteId;\n $result = mysqli_query($conn, $sql_offerStatus);\n $row = mysqli_fetch_array($result); \n $this->status = $row['OfferStatus'];\n if ($this->status == NULL) $this->status = -1;//no offers submitted by my institute\n \n return TRUE;\n\n }", "protected function loadUserTypeAccess(UserType $userType){\n\t\t\t$userType->purgeAccess();\n\t\t\tif($userType->id != 0){\n\t\t\t\t$accessType = $this->getUserTypeAccess($userType);\n\t\t\t\tfor ($i = 0; $i < count($accessType); $i++) {\n\t\t\t\t\t$userType->addAccess($accessType[$i]['id_section'], new AccessType($accessType[$i]['id_type_access']));\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $userType;\n\t\t}", "public function identity()\r\n {\r\n\t\t$storage = $this->get_storage();\r\n\r\n if ($storage->is_empty()) {\r\n return null;\r\n }\r\n if( is_null(self::$login_user) ){\r\n $u = $storage->read();\r\n\t\t\tself::$login_user = Model_User::instance()->user($u['uid']);\r\n \r\n global $VIEW_AUTH_USERID;\r\n $VIEW_AUTH_USERID = idtourl(self::$login_user['uid']);\r\n }\r\n return self::$login_user; \r\n }", "function getUser() {\n $DBA = new DatabaseInterface();\n $fields = array(0 => 'username', 1 => 'title', 2 => 'first_name', 3 => 'last_name', 4 => 'password', 5 => 'contactemail', 6 => 'contacttelephone', 7 => 'newsletter', 8 =>'pcode', 9 => 'store_owner', 10 => 'house', 11 => 'street', 12 => 'town', 13 => 'county', 14 => 'geolong', 15 => 'geolat', 16 => 'avatar', 17 => 'mobile', 18 => 'optout');\n $idfields = array(0 => 'id');\n $idvals = array(0 => $this->ID);\n $rs = $DBA->selectQuery(DBUSERTABLE, $fields, $idfields, $idvals);\n\n if (!isset($rs[2]))\n {\n while ($res = mysql_fetch_array($rs[0]))\n {\n $this->setUserVar('Username', $res['username']);\n $this->setUserVar('Title', $res['title']);\n $this->setUserVar('FirstName', $res['first_name']);\n $this->setUserVar('LastName', $res['last_name']);\n $this->setUserVar('ContactEmail', $res['contactemail']);\n $this->setUserVar('ContactTelephone', $res['contacttelephone']);\n $this->setUserVar('NewsletterSubscriber', $res['newsletter']);\n $this->setUserVar('Area', $res['pcode']);\n $this->setUserVar('StoreOwner', $res['store_owner']);\n $this->setUserVar('House', $res['house']);\n $this->setUserVar('Street', $res['street']);\n $this->setUserVar('Town', $res['town']);\n $this->setUserVar('County', $res['county']);\n $this->setUserVar('PCode', $res['pcode']);\n $this->setUserVar('Long', $res['geolong']);\n $this->setUserVar('Lat', $res['geolat']);\n $this->setUserVar('Avatar', $res['avatar']);\n $this->setUserVar('Mobile', $res['mobile']);\n $this->setUserVar('DMOptOut', $res['optout']);\n $this->formatAddress();\n $this->formatEmail();\n if ($this->Lat == '')\n {\n $this->GeoLocate();\n }\n }\n }\n }", "function userconnection_users_information($path_array) {\r\n\tglobal $setting, $database,$user;\r\n $path = NULL;\r\n \r\n // CACHING\r\n $cache_object = SECache::getInstance('serial');\r\n if (is_object($cache_object) ) {\r\n $path = $cache_object->get('shortest_path');\r\n }\r\n \r\n // RETRIEVAL\r\n if (!is_array($path)) {\r\n \t// HERE WE WILL TAKE ALL USER ID'S IN A SINGLE VARIABLE $USERS_ID\r\n \t$users_id = implode(\",\", $path_array);\r\n \t$id =\t $user->user_info['user_id'];\r\n \t$sql = \"SELECT user_id, user_username, user_fname, user_lname, user_photo, user_lastlogindate, user_dateupdated FROM se_users WHERE ((user_verified='1' AND user_enabled='1' AND user_search='1') OR (user_id = '$id')) AND user_id IN ($users_id) \";\r\n $resource = $database->database_query($sql);\r\n $path = array(); \r\n while ($user_info = $database->database_fetch_assoc($resource)) {\r\n \t\r\n $shortest_user = new se_user();\r\n $shortest_user->user_info['user_id'] = $user_info['user_id'];\r\n $shortest_user->user_info['user_username'] = $user_info['user_username'];\r\n $shortest_user->user_info['user_photo'] = $user_info['user_photo'];\r\n $shortest_user->user_info['user_fname'] = $user_info['user_fname'];\r\n $shortest_user->user_info['user_lname'] = $user_info['user_lname'];\r\n $shortest_user->user_info['user_lastlogindate'] = $user_info['user_lastlogindate'];\r\n $shortest_user->user_info['user_dateupdated'] = $user_info['user_dateupdated'];\r\n $shortest_user->user_displayname();\r\n $path[$user_info['user_id']] =& $shortest_user;\r\n \r\n unset($shortest_user);\r\n }\r\n// \r\n foreach ($path_array as $l) {\r\n \tif (!empty($path[$l])) {\r\n \t $new_user_array[] = $path[$l];\r\n \t}\r\n }\r\n // CACHE\r\n if (is_object($cache_object)) {\r\n $cache_object->store($path, 'shortest_path');\r\n }\r\n }\r\n\t\r\n return $new_user_array;\r\n}", "public function loadUser()\n {\n if ($this->_model === null) {\n if (Yii::app()->user->id)\n $this->_model = Yii::app()->controller->module->user();\n if ($this->_model === null)\n $this->redirect(Yii::app()->controller->module->loginUrl);\n }\n return $this->_model;\n }", "public function load_current_user()\n\t{\n\t\t$userid = $this->CI->session->userdata('userid');\n\t\tif($userid)\n\t\t{\n\t\t\t$userdata = $this->CI->user_model->get_by_id($userid);\n\t\t\tif($userdata !== NULL)\n\t\t\t{\n\t\t\t\t$this->set_current_user($userdata);\n\t\t\t}\n\t\t}\n\t}", "public function restore(User $user, Storage $storage)\n {\n //\n }", "public function set_user_data($user_data)\n {\n Session::_start();\n Session::_set($user_data->id, \"user\", \"id\");\n Session::_set($user_data->name, \"user\", \"name\");\n Session::_set($user_data->email, \"user\", \"email\");\n }", "function conductUserLogin($userData)\n{\n include '../dataUtils/dataClass.php';\n include '../dataUtils/auditDataClass.php';\n include '../helper/auditHelperClass.php';\n \n $auditData = array(getIpAddress(), browserNameResolver(getBrowserDetails()), 'Login');\n \n $userDetails = logInUser($userData);\n if($userDetails != \"User not found!\")\n {\n initiateUserSessionAndSetVar($userDetails[0], $userDetails[1]); \n }\n else if($userDetails == \"User not found!\")\n {\n setErrorMsg('User not found!', PATH);\n exit();\n }\n \n header('Location: ../../pages/fileIsleDashboard.php');\n \n writeAuditEntry($auditData);\n}", "function getUser()\r\n {\r\n $users = file_get_contents('storage/users.json');\r\n return json_decode($users);\r\n }", "public static function user()\n\t{\n return IoC::resolve( 'user_cache', array( Auth::user()->username ) );\n\t}", "public function user()\n {\n if ($this->loggedOut) {\n return;\n }\n\n // If we've already retrieved the user for the current request we can just\n // return it back immediately. We do not want to fetch the user data on\n // every call to this method because that would be tremendously slow.\n if (! is_null($this->user)) {\n return $this->user;\n }\n\n if (\\session()->has($this->user_provider->getAuthIdentifierName()))\n {\n $user = \\session()->get($this->user_provider->getAuthIdentifierName());\n return $user;\n }\n\n $authenticated_user = $this->user_provider->retrieveById($this->user_provider->getAuthIdentifier());\n if (!isset($authenticated_user))\n {\n return;\n }\n $this->user_provider->setUserAttribute($authenticated_user);\n $this->setUser($this->user_provider);\n\n return $this->user;\n }", "static function logIn($user) {\n if (isset($user)) {\n session_start();\n $_SESSION['userId'] = $user->id;\n }\n }", "function _read_user_session_db()\n {\n if (!$this->sessionModel->read()) {return false;}\n\t\t\n\t\t$this->user = SHIN_Core::$_models['sys_user_model']->get_instance();\n\n if (!$this->user->fetchByID($this->sessionModel->uid)) {\n\t\t\t$pk = $this->user->primary_key;\n $this->user->$pk = 0;\n return false;\n }\n\n\t\t$pk = $this->user->primary_key;\n\t\tSHIN_Core::$_user = $this->user;\n\t\t\n\t\t// addons for new field added //////////////////////////\n\t\t// request by Stefano. Detail: http://binary-studio.office-on-the.net/issues/5287\n\t\t//$data = array('updated' => date('Y-m-d H:i:s'));\n\t\t//SHIN_Core::$_db[SHIN_Core::$_shdb->active_group]->where('idUser', SHIN_Core::$_user->idUser);\n\t\t//SHIN_Core::$_db[SHIN_Core::$_shdb->active_group]->update('sys_user', $data); \t\t\n\t\t////////////////////////////////////////////////////////\t\t\n\n\t\t// lang //////////////////////////////////////////////////////////////////////////////\n\t\t$_current_language = '';\n\t\t//dump(SHIN_Core::$_libs['session']->userdata('language'));\n\t\tif(SHIN_Core::$_libs['session']->userdata('language')){\n\t\t\t$_current_language = SHIN_Core::$_libs['session']->userdata('language');\n\t\t} else {\n\t\t\t$_current_language = SHIN_Core::$_user->lang;\n\t\t}\n\t\tif($_current_language == '') {$_current_language = SHIN_Core::$_config['lang']['language'];} \n//\t\tSHIN_Core::$_libs['session']->set_userdata('language', $_current_language);\n\t\t//dump($_current_language);\n\t\t\n\t\t// addons from Dimas (need disscuss with Stefano) \n\t\t// Logic follow. each application can override native language /////\n\t\t// if($_current_language != SHIN_Core::$_config['lang']['language']){\n\t\t// $_current_language = SHIN_Core::$_config['lang']['language'];\n\t\t// }\n\t\t////////////////////////////////////////////////////////////////////\n\n\t\tSHIN_Core::$_language->load('app', $_current_language);\n\t SHIN_Core::$_current_lang = $_current_language;\n\t SHIN_Core::log('debug', '[LANGUAGE] Current language: '.SHIN_Core::$_current_lang);\n\t\t//////////////////////////////////////////////////////////////////////////////////////\n \n\t\t// theme /////////////////////////////////////////////////////////////////////////////\n\t\t$_current_theme = '';\n if(SHIN_Core::$_libs['session']->userdata('theme')){\n $_current_theme = SHIN_Core::$_libs['session']->userdata('theme');\n } else {\n\t\t\t$_current_theme = SHIN_Core::$_user->theme;\n }\n\t\tif($_current_theme == '') {SHIN_Core::$_config['theme']['default_theme'];}\n\n\t SHIN_Core::$_theme = $_current_theme;\n\t\t//////////////////////////////////////////////////////////////////////////////////////\n\n return true;\n }", "public function loadUser()\r\n\t{\r\n\t\tif($this->_model===null)\r\n\t\t{\r\n\t\t\tif(Yii::app()->user->id)\r\n\t\t\t\t$this->_model=Yii::app()->controller->module->user();\r\n\t\t\tif($this->_model===null)\r\n\t\t\t\t$this->redirect(Yii::app()->controller->module->loginUrl);\r\n\t\t}\r\n\t\treturn $this->_model;\r\n\t}", "public function user($iUser = NULL) {\n\t\t\tif (!is_null($iUser)) {\n\t\t\t\t$this->iUser = $iUser; \n\t\t\t\tme($iUser); \n\t\t\t} \n\t\t\treturn user($this->iUser); \t\n\t\t}", "protected function getCurrentUserData() {}", "protected function getCurrentUserData() {}", "protected function readUsers() {\n\t\t// get user ids\n\t\t$userIDs = array();\n\t\t$sql = \"SELECT\t\tuser_table.userID\n\t\t\tFROM\t\twcf\".WCF_N.\"_user user_table\n\t\t\t\".(isset($this->options[$this->sortField]) ? \"LEFT JOIN wcf\".WCF_N.\"_user_option_value USING (userID)\" : '').\"\n\t\t\t\".(!empty($this->sqlConditions) ? 'WHERE '.$this->sqlConditions : '').\"\n\t\t\tORDER BY\t\".(($this->sortField != 'email' && isset($this->options[$this->sortField])) ? 'userOption'.$this->options[$this->sortField]['optionID'] : $this->sortField).\" \".$this->sortOrder;\n\t\t$result = WCF::getDB()->sendQuery($sql, $this->itemsPerPage, ($this->pageNo - 1) * $this->itemsPerPage);\n\t\twhile ($row = WCF::getDB()->fetchArray($result)) {\n\t\t\t$userIDs[] = $row['userID'];\n\t\t}\n\n\t\t// get user data\n\t\tif (count($userIDs)) {\n\t\t\t$sql = \"SELECT\t\toption_value.*, user_table.*,\n\t\t\t\t\t\tGROUP_CONCAT(groupID SEPARATOR ',') AS groupIDs\n\t\t\t\tFROM\t\twcf\".WCF_N.\"_user user_table\n\t\t\t\tLEFT JOIN\twcf\".WCF_N.\"_user_option_value option_value\n\t\t\t\tON\t\t(option_value.userID = user_table.userID)\n\t\t\t\tLEFT JOIN\twcf\".WCF_N.\"_user_to_groups groups\n\t\t\t\tON\t\t(groups.userID = user_table.userID)\n\t\t\t\tWHERE\t\tuser_table.userID IN (\".implode(',', $userIDs).\")\n\t\t\t\tGROUP BY\tuser_table.userID\n\t\t\t\tORDER BY\t\".(($this->sortField != 'email' && isset($this->options[$this->sortField])) ? 'option_value.userOption'.$this->options[$this->sortField]['optionID'] : 'user_table.'.$this->sortField).\" \".$this->sortOrder;\n\t\t\t$result = WCF::getDB()->sendQuery($sql);\n\t\t\twhile ($row = WCF::getDB()->fetchArray($result)) {\n\t\t\t\t$accessible = Group::isAccessibleGroup(explode(',', $row['groupIDs']));\n\t\t\t\t$row['accessible'] = $accessible;\n\t\t\t\t$row['deletable'] = ($accessible && WCF::getUser()->getPermission('admin.user.canDeleteUser') && $row['userID'] != WCF::getUser()->userID) ? 1 : 0;\n\t\t\t\t$row['editable'] = ($accessible && WCF::getUser()->getPermission('admin.user.canEditUser')) ? 1 : 0;\n\t\t\t\t$row['isMarked'] = intval(in_array($row['userID'], $this->markedUsers));\n\t\t\t\t\n\t\t\t\t$this->users[] = new User(null, $row);\n\t\t\t}\n\t\t\t\n\t\t\t// get special columns\n\t\t\tforeach ($this->users as $key => $user) {\n\t\t\t\tforeach ($this->columns as $column) {\n\t\t\t\t\tif (isset($this->options[$column])) {\n\t\t\t\t\t\tif ($this->options[$column]['outputClass']) {\n\t\t\t\t\t\t\t$outputObj = $this->getOutputObject($this->options[$column]['outputClass']);\n\t\t\t\t\t\t\t$this->columnValues[$user->userID][$column] = $outputObj->getOutput($user, $this->options[$column], $user->{$column});\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t$this->columnValues[$user->userID][$column] = StringUtil::encodeHTML($user->{$column});\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\tswitch ($column) {\n\t\t\t\t\t\t\tcase 'email':\n\t\t\t\t\t\t\t\t$this->columnValues[$user->userID][$column] = '<a href=\"mailto:'.StringUtil::encodeHTML($user->email).'\">'.StringUtil::encodeHTML($user->email).'</a>';\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 'registrationDate':\n\t\t\t\t\t\t\t\t$this->columnValues[$user->userID][$column] = DateUtil::formatDate(null, $user->{$column});\n\t\t\t\t\t\t\t\tbreak;\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}", "function user($object = false)\n\t{\n\t\tglobal $user;\n\n\t\tif($object !== false)\n\t\t{\n\t\t\t$user = $object;\n\t\t\treturn $user;\n\t\t}\n\n\t\tif(isset($_COOKIE['user']) && !$user)\n\t\t{\n\t\t\t$user = dbGetSingle('its_users', 'id = ' . intval($_COOKIE['user']));\n\t\t}\n\n\t\treturn $user;\n\t}", "function loginUser() {\n\tsession_start();\n\trequire_once(\"sql/dbQueries.php\");\n\n\t// Fetching user data from login data\n\t$userData = getUserFromLogin($_POST['vms_email'], $_POST['userPassword']);\n\n\tif($userData == False) {\n\t\tprintLoginPage(\"The login information supplied is not valid.\");\n\t\treturn;\n\t} else {\n\t\t// Saving the user's info in a session variable\n\t\t$_SESSION['auth'] = TRUE;\n\t\t$_SESSION['auth_info'] = $userData[0];\n\n\t\t// Fetching the DID for the user's default DID.\n\t\t$activeDID = getDIDFromID($userData[0]['didID_default']);\n\t\tif($activeDID != false) {\n\t\t\t$_SESSION['auth_info']['activeDID'] = $activeDID['did'];\n\t\t} else {\n\t\t\t$_SESSION['auth_info']['activeDID'] = null;\n\t\t}\n\t\t//print_r($_SESSION);\n\n\t\t// Head back home\n\t\theader(\"Location: index.php\");\n\t\treturn;\n\t}\n}", "function loadUserProfile($username){\n\t\t//the user informaiton comes from the database\n\t\t$_SESSION['username']=$username;\n\t\t$_SESSION['usertype']=1;\n\t\t//permission\n\t}", "public function get_storage($for = null)\n {\n if (!isset($this->storage) || (!empty($for) && $this->storage->username !== $for)) {\n $rcmail = rcmail::get_instance();\n try {\n $this->storage = \\Kolab2FA\\Storage\\Base::factory(\n $rcmail->config->get('kolab_2fa_storage', 'roundcube'),\n $rcmail->config->get('kolab_2fa_storage_config', array())\n );\n\n $this->storage->set_username($for);\n $this->storage->set_logger(new \\Kolab2FA\\Log\\RcubeLogger());\n\n // set user properties from active session\n if (!empty($_SESSION['kolab_dn'])) {\n $this->storage->userdn = $_SESSION['kolab_dn'];\n }\n }\n catch (Exception $e) {\n $this->storage = false;\n\n rcube::raise_error(array(\n 'code' => 600,\n 'type' => 'php',\n 'file' => __FILE__,\n 'line' => __LINE__,\n 'message' => $error),\n true, false);\n }\n }\n\n return $this->storage;\n }", "public static function get_user_data()\n {\n }", "protected function loadUser()\n {\n $sixreps = new Sixreps(Yii::app()->params['api_host']);\n\n try {\n list($body, $info) = $sixreps->get('/users/me', array(\n 'access_token' => Yii::app()->user->user_token,\n ));\n }\n catch (Exception $e) {}\n\n $this->_model = $body;\n\n return $this->_model;\n }", "public function loadUser(ArenaAuthUser $user): ArenaAuthUser;", "public function getFilesCurrentUser(User $user)\n {\n }", "static function PopulateSession($userid) {\n\t\t$db = new Database ();\n\t\t\n\t\t$query = \"SELECT * FROM users WHERE `id` = '\" . PIE_Security::sanitizeString ( $userid ) . \"' LIMIT 1\";\n\t\ttry {\n\t\t\tforeach ( $db->query ( $query ) as $resultset ) {\n\t\t\t\t$_SESSION ['userid'] = $userid;\n\t\t\t\t// @ TODO delete it?\n\t\t\t\t$_SESSION ['permissions'] = $resultset ['auth'];\n\t\t\t}\n\t\t} catch ( Exception $e ) {\n\t\t}\n\t}", "public function user()\n\t{\n\t\tif (is_null($this->user) and $this->session->has(static::$key))\n\t\t{\n\t\t\t$this->user = call_user_func(Config::get('auth.by_id'), $this->session->get(static::$key));\n\t\t}\n\n\t\treturn $this->user;\n\t}", "function LGIUser($user=null) {\n\t\tif (is_null($user)) $user = $_SESSION['user'];\n\t\t$this->userid = $user;\n\t}", "protected function _get_object($user, $strong_check = FALSE)\n {\n \t$name = $this->_config['entry'];\n \tstatic $current;\n\n \t//make sure the user is loaded only once.\n \tif ( ! is_object($current[$name]) AND is_string($user))\n \t{\n \t\t// Load the user\n \t\t$current[$name] = Mango::factory($this->_config['model_name']);\n \t\t$current[$name] = Mango::factory($this->_config['model_name'], array($current[$name]->unique_key($user), $user))->load();\n \t}\n\n \tif (is_object($user) AND is_subclass_of($user, 'Model_Rauth_User') AND $user->loaded())\n \t{\n \t\tif ($strong_check)\n \t\t{\n \t\t\t$current[$name] = Mango::factory($this->_config['model_name'], array(\n \t\t\t\t'_id'\t\t=> $user->_id,\n \t\t\t\t'username'\t=> $user->username\n \t\t\t))->load();\n \t\t}\n \t\telse\n \t\t{\n \t\t\t$current[$name] = $user;\n \t\t}\n \t}\n\n \treturn $current[$name];\n }", "public function read($user, $ident);", "public function getCurrentUser(){\n $currentUser = $_SESSION['userdata'];\n\n // Sets the user object\n $this->setUser($currentUser->control);\n\n }", "function getUser() {\n return user_load($this->uid);\n }", "public static function user()\n {\n if(static::$_auth_user) {\n return static::$_auth_user;\n }\n\n #Check for authenticated session\n $auth_id = Session::get(static::$_auth_name);\n $instance = static::getConfig('instance');\n\n if($auth_id) {\n static::$_auth_user = new $instance($auth_id);\n return static::$_auth_user;\n }\n\n #Check for user auto log cookie\n $cookie_token = Cookie::get(static::$_auth_name);\n\n if($cookie_token) {\n $user_id = static::validateAuthCookieToken($cookie_token);\n\n if(!$user_id) {\n static::logout();\n return false;\n }\n\n static::$_auth_user = new $instance($user_id);\n #update cookie\n static::setUserCookieToken($user_id);\n return static::$_auth_user;\n }\n\n return false;\n }", "public static function &getUser($identity) {\n\n\t\tif ( false === ( $user = cache::getStatic('user', $identity) ) ) {\n\t\t\t$user = self::get($identity);\n\t\t\tcache::setStatic('user', $identity, $user);\n\t\t}\n\t\tif ( !$user ) {\n\t\t\t$user = new user;\n\t\t}\n\t\treturn $user;\n\t}", "protected function getUser()\n {\n if ($this->_user === null) {\n $this->_user = OrderUser::findOne(['user_name' => $this->username]);\n if (empty($this->_user)) {\n $this->_user = OrderUser::findOne([\n 'mobile_phone' => $this->username,\n ]);\n }\n\n // 如果账号验证通过,验证用户的基本权限\n// if (!empty($this->_user) && Yii::$app->user->can('/order-site/index'))\n if (\n !empty($this->_user) &&\n !Yii::$app->authManager->checkAccess($this->_user->user_id, '3rd_order_import')\n ) {\n Yii::warning(\"$this->username 尝试登录,缺少权限\", __METHOD__);\n $this->_user = null;\n }\n }\n\n return $this->_user;\n }", "function get_user() {\n static $auth_user = false;\n if ($auth_user !== false)\n return $auth_user;\n if (isset($_SESSION['userx\\auth'])) {\n // Check if the user has timed out.\n if (time() > intval(@$_SESSION['userx\\auth']['timeout'])) {\n // It doesn't matter how many shells are stacked,\n // if the top user times out - all users time out.\n unset($_SESSION['userx\\auth']);\n // Forward user to timeout page.\n \\melt\\messenger\\redirect_message(REQ_URL, __(\"Your session expired due to inactivity. You need to log in again.\"));\n }\n // Get the user and cache it.\n $_SESSION['userx\\auth']['timeout'] = config\\SESSION_TIMEOUT_MINUTES !== false? time() + config\\SESSION_TIMEOUT_MINUTES * 60: \\PHP_INT_MAX;\n $auth_user = UserModel::selectByID(intval($_SESSION['userx\\auth']['user']));\n if ($auth_user === null) {\n // Account does not exist, just redirect.\n logout();\n \\melt\\request\\redirect(REQ_URL);\n }\n // Call prototyped login session validation.\n $error = $auth_user->sessionValidate();\n if ($error != \"\") {\n logout();\n deny($error);\n }\n if (config\\LAST_DENY_AUTOREDIRECT) {\n // Handle autoredirection.\n if ($auth_user !== null && isset($_SESSION['userx\\LAST_DENY_PATH'])) {\n $path = $_SESSION['userx\\LAST_DENY_PATH'];\n unset($_SESSION['userx\\LAST_DENY_PATH']);\n \\melt\\request\\redirect($path);\n }\n }\n } else\n $auth_user = null;\n return $auth_user;\n}", "public function authForUser( $user ){ return $user->authForDB( $this ); }", "public function loadFromId(){\r\n\t\t$id = $this -> getUserId();\r\n\t\tif(is_numeric($id))\r\n\t\t\t$this -> loadFromQuery(\"select * from UserTab where UserId=\".$id);\r\n\t }", "public function getUserData($userID)\n {\n return Filesystem::getUserInformation($userID);\n }", "public function initUser( &$user, $autocreate=false )\n {\n\n }", "protected function getUser()\n {\n return $this->loadUser(array(\n 'user_name' => $this->context['admin'],\n ));\n }", "public function getUserData($userId);", "public static function for_user($userid) {}", "public function processUser()\n {\n $directory=\"data/user\";\n set_time_limit(160);\n \n\n $files = File::allFiles($directory);\n\n foreach ($files as $file) {\n $file_exists=File_load::where('file_name', $file)\n ->where('type', 6)\n ->exists();\n if(!$file_exists){\n File_load::create([\n 'file_name' => $file,\n 'type' => 6, \n ]);\n \n $data = Excel::load($file)->toArray();\n \n foreach ($data as $row) {\n \n $data_value=$row;\n if(is_numeric ($data_value['supervisor']))\n $supervisor=$data_value['supervisor'];\n else\n $supervisor=0;\n \n $user=User::create([\n 'first_name' => ucfirst($data_value['firstname']),\n 'middle_name' => \"\",\n 'last_name' => ucfirst($data_value['lastname']),\n 'email' => ucfirst($data_value['firstname']).\".\".ucfirst($data_value['lastname']).\".\".$data_value['employeenumber'].\"@encompassonsite.com\",\n 'role' => 9,\n 'employee_number' => $data_value['employeenumber'],\n 'manager_parent' => $supervisor,\n 'manager_id' => 0,\n 'password' => bcrypt(\"encompass123\"),\n ]);\n\n //Insert Profile\n UserProfile::create([\n 'user_id' => $user->id,\n 'note' => \"User\",\n ]);\n\n\n \n }\n }\n } \n return \"Data Inserted\";\n }", "public function readUserAuth(){\n $user = new \\Filebase\\Database([\n 'dir' => $this->getDataSource()\n ]);\n\n if ($user->has($this->username)) {\n $item = $user->get($this->username);\n $data = [\n 'result' => $item->auth,\n 'attribute' => [\n 'username' => $this->username\n ],\n 'status' => 'success',\n 'message' => 'Data found!'\n ];\n } else {\n $data = [\n 'status' => 'error',\n 'message' => 'User not found!'\n ];\n }\n return $data;\n }", "function loadFromDatabase() {\n\t # Paranoia\n\t $this->mId = intval( $this->mId );\n\t $this->mCedarId = intval( $this->mCedarId );\n\n\t /** Anonymous user */\n\t if( !$this->mId ) {\n\t\tif( !$this->mCedarId ) {\n\t\t if( $this->mName == '' ) {\n\t\t\t$this->loadDefaults();\n\t\t\treturn false;\n\t\t }\n\t\t}\n\t }\n\n\t $dbr =& wfGetDB( DB_MASTER );\n\t if( $this->mId ) {\n\t\t$s = $dbr->selectRow( 'cedar_user_info', '*', array( 'user_id' => $this->mId ), __METHOD__ );\n\t }\n\t else if( $this->mCedarId ) {\n\t\t$s = $dbr->selectRow( 'cedar_user_info', '*', array( 'user_info_id' => $this->mCedarId ), __METHOD__ );\n\t }\n\t else if( $this->mName != '' ) {\n\t\t$s = $dbr->selectRow( 'cedar_user_info', '*', array( 'user_name' => $this->mName ), __METHOD__ );\n\t }\n\n\t if ( $s !== false ) {\n\t\t # Initialise user table data\n\t\t $this->mCedarId = $s->user_info_id ;\n\t\t $this->mOrg = $s->organization ;\n\t\t $this->mAddress1 = $s->address1 ;\n\t\t $this->mAddress2 = $s->address2 ;\n\t\t $this->mCity = $s->city ;\n\t\t $this->mState = $s->state ;\n\t\t $this->mCountry = $s->country ;\n\t\t $this->mPostalCode = $s->postal_code ;\n\t\t $this->mPhone = $s->phone ;\n\t\t $this->mMobilePhone = $s->mobile_phone ;\n\t\t $this->mFax = $s->fax ;\n\t\t $this->mSupervisorName = $s->supervisor_name ;\n\t\t $this->mSupervisorEmail = $s->supervisor_email ;\n\t\t $this->mRegistrationDate = $s->registration_date ;\n\t\t return true;\n\t } else {\n\t\t # Invalid user_id\n\t\t $this->mId = 0;\n\t\t $this->loadDefaults();\n\t\t return false;\n\t }\n }", "public function getUser();", "public function getUser();", "public function getUser();", "public function getUser();", "public function getUser();", "public function getUser();", "public function getUser();", "public function loadDocsFromUserSession() {}", "function getUser()\n {\n if (empty($this->user_id))\n return $this->_user = null;\n if (empty($this->_user) || $this->_user->user_id != $this->user_id) {\n $this->_user = $this->getDi()->userTable->load($this->user_id);\n }\n return $this->_user;\n }", "public function getUserByLoginSession()\n {\n $this->userModule->user = $this->userModule->getUser($_SESSION['userLogin']['id']);\n }", "public function attachUser($user, $reload = true);", "public static function getUser();", "function saveLoginUserInfo($id_user, $isReload = false) {\n\tupdateUserLastLogin($id_user);\n\n\t$finalQuery = \"select id_user, nama, username, bidang_pekerjaan, tanggal_lahir, jenis_kelamin, alamat, email, nomor_hp, level, avatar, login_terakhir, status, id_rekam, wk_rekam, id_ubah, wk_ubah from tp_user where id_user = $id_user\";\n\t$tmpLogin = execSelectQuery($finalQuery);\n\t$_SESSION['login_detail'] = array_shift($tmpLogin);\n\treturn;\n}", "public function getUser($userID){\n $this->path = \"users/$userID\";\n return $this->get();\n }", "function load_data(&$preferences, $userid){\n return null;\n }", "function retrieveUser()\n {\n $loginUserId = $_COOKIE[\"userid\"];\n $loginUserRole = $_COOKIE[\"userRole\"];\n if (isset($_GET['userId'])) {\n $userId = $_GET['userId'];\n } else {\n $userId = null;\n }\n // print($loginUserId);\n $company_name = $this->getCompanyIdFromUser($loginUserId);\n $retrieveUser_query = \"select * from users where is_deleted='0'\";\n // print($loginUserRole);\n /* if ($loginUserRole != '' && $loginUserRole != \"0\" && $company_name != '') {\n $retrieveUser_query .= \" and company_name= '$company_name'\";\n } */\n \n if ($userId != null && $userId != '') {\n $retrieveUser_query .= \" and id='$userId'\";\n }\n // print($retrieveUser_query);\n $r3 = $this->mysqli->query($retrieveUser_query);\n // print(\"number of rows\".$r3->num_rows);\n if ($r3->num_rows > 0) {\n $result = array();\n while ($row1 = $r3->fetch_assoc()) {\n $result[] = $row1;\n }\n }\n $this->response(json_encode($result), 200); // send user details\n $this->response('', 204);\n }", "function initCurrentUser(){\n if (!XUser::isNobody()){\n $user = XUser::get_user();\n } else {\n $user = NULL;\n }\n if ($user == NULL)\n die(json_encode(array('fullnam'=>'', 'error'=>1)));\n // gestion de la fidelite : groupe associé\n $ok = $this->modcustomer->initUser($user);\n if (!$ok)\n die(json_encode(array('fullnam'=>'', 'error'=>1)));\n $loyalty = NULL;\n if ($this->modcustomer->loyaltyActive())\n $loyalty = getSessionVar('epl_loyalty');\n die(json_encode(array('fullnam'=>$user->_cur['fullnam'], 'loyalty'=>$loyalty)));\n }", "public function getDataUser($loginUser)\n {\n $objDataBase = $this->_connectSuperDataBase();\n\n $arraySetVariable = array('@InLogin');\n $arrayValueVariable = array($loginUser);\n $arrayTipeDataVariable = array(Class_Object::DATA_STRING);\n $arraySizeDataVariable = array(35);\n\n $result = $objDataBase->executeQueryStoreProcedure('get_dataUser', $arraySetVariable,\n $arrayValueVariable, $arrayTipeDataVariable, $arraySizeDataVariable);\n\n if ($tempRows = $objDataBase->exploreRowSelect($result)) {\n\n $objUser = new Class_User();\n\n $objUser->setEmail($tempRows[0]);\n $objUser->setPkStaff($tempRows[1]);\n $objUser->setLogin($tempRows[2]);\n $objUser->setName($tempRows[3]);\n $objUser->setFirstLastName($tempRows[4]);\n $objUser->setSecondLastName($tempRows[5]);\n $objUser->setTab($tempRows[6]);\n $objUser->setFkRol($tempRows[7]);\n $objUser->setFkDependency($tempRows[8]);\n $objUser->setState($tempRows[9]);\n $objUser->setFkOperation($tempRows[10]);\n\n return $objUser;\n } else {\n return null;\n }\n }", "public function loaduser($userid = false, $newdata = false){\n if(!$userid){$userid = read(\"id\");}//$info[\"user_id\"]\n $user = first(\"SELECT * FROM users WHERE id = \" . $userid, true, \"HomeController.loaduser\");\n if($newdata) {//attempt to update user profile\n if (!isset($newdata[\"phone\"])) {$newdata[\"phone\"] = $user[\"phone\"];}\n if ($user[\"name\"] != $newdata[\"name\"] || $user[\"phone\"] != $newdata[\"phone\"]) {\n $user[\"name\"] = $newdata[\"name\"];\n $user[\"phone\"] = $newdata[\"phone\"];\n insertdb(\"users\", array(\"id\" => $userid, \"name\" => $newdata[\"name\"], \"phone\" => $newdata[\"phone\"]));\n }\n }\n return $user;\n }", "public function read($user_id = 0) {\r\n if ($user_id !== 0) {\r\n return $this->readByID($user_id);\r\n } else {\r\n return $this->readAll();\r\n }\r\n \r\n }", "public function forUser($user);" ]
[ "0.5788557", "0.5474228", "0.5471119", "0.543494", "0.5422425", "0.5401421", "0.5387428", "0.52846587", "0.52310467", "0.5225515", "0.5223881", "0.5216988", "0.52132887", "0.52106684", "0.5204202", "0.5203848", "0.51933724", "0.5188568", "0.5163132", "0.51616025", "0.51615125", "0.5159585", "0.5151433", "0.51480484", "0.5140446", "0.51329803", "0.5131301", "0.5129299", "0.51289856", "0.5127649", "0.5123488", "0.5121027", "0.5117253", "0.5105246", "0.51039237", "0.50926584", "0.5078463", "0.5074618", "0.50708205", "0.5068238", "0.50678766", "0.50496566", "0.5038395", "0.50344306", "0.5018478", "0.5010045", "0.5007453", "0.4998771", "0.49984735", "0.49976265", "0.49909917", "0.4985011", "0.49820682", "0.49820176", "0.49773005", "0.49697375", "0.4965206", "0.4954819", "0.4953865", "0.49531066", "0.49492142", "0.49488032", "0.494136", "0.49344054", "0.4933942", "0.49296445", "0.49283004", "0.49262303", "0.49231097", "0.49230862", "0.49178615", "0.49157247", "0.49148616", "0.4912979", "0.4904991", "0.49032435", "0.48966765", "0.4895758", "0.4895068", "0.4885672", "0.48855346", "0.48855346", "0.48855346", "0.48855346", "0.48855346", "0.48855346", "0.48855346", "0.48754334", "0.48733848", "0.48703262", "0.48604003", "0.48600158", "0.48571944", "0.4852756", "0.48450422", "0.4844744", "0.48426986", "0.4839466", "0.4828527", "0.4828345", "0.4827844" ]
0.0
-1
Load all settings for the currently active user.
public function loadUserSettings () { $userSettings = []; $encodedData = $this->_getUserKey($this->_username, self::SETTINGS); if ( ! empty($encodedData)) { $userSettings = @json_decode($encodedData, true, 512, JSON_BIGINT_AS_STRING); if ( ! is_array($userSettings)) { throw new SettingsException(sprintf( 'Failed to decode corrupt settings for account "%s".', $this->_username )); } } return $userSettings; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function Load() {\n\t\t\n\t\tglobal $sql;\n\t\t$query = array(\n\t\t\t\"*\" => \"SELECT DISTINCT * FROM user_options WHERE user=?;\",\n\t\t\t\"pgsql\" => 'SELECT DISTINCT * FROM user_options WHERE \"user\"=?;',\n\t\t);\n\t\t$bind_variables = array(\n\t\t\t$this->username\n\t\t);\n\t\t\n\t\t$options = $sql->query( $query, $bind_variables, array() );\n\t\t\n\t\tif( ! empty( $options ) ) {\n\t\t\t\n\t\t\techo formatJSEND( \"success\", $options );\n\t\t} else {\n\t\t\t\n\t\t\techo formatJSEND( \"error\", \"Error, Could not load user's settings.\" );\n\t\t}\n\t}", "public static function loadSettingsAfterLogin() {\r\n\t\t//try to load from DB\r\n\t\t$settings=UserSettings::model()->findByAttributes(array('userId'=>Yii::app()->user->getId()));\r\n\t\t\r\n\t\tif(is_null($settings)) {\r\n\t\t\t//if there is nothing in DB, keep what is in session data, if anything is there\r\n\t\t\t$settings=Yii::app()->user->getState('settings');\r\n\t\t\t\r\n\t\t\t//else just use new\r\n\t\t\tif(is_null($settings)) {\r\n\t\t\t\t$settings=new UserSettings();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\t\r\n\t\tYii::app()->user->setState('settings', $settings);\r\n\t}", "function get_all_user_settings()\n {\n }", "protected function loadSettings() {}", "protected function loadSettings() {}", "protected function loadSettings() {}", "public function loadSettings()\n {\n\n $db = $this->getDb();\n $user = $this->getUser();\n $cache = $this->getL1Cache();\n\n $settingsLoader = new LibUserSettings($db, $user, $cache);\n\n return $settingsLoader->getUserSetting(EUserSettingType::MESSAGES);\n\n }", "private function load_settings() {\n\t\t\n\t}", "public function loadSettings()\n {\n $this->loadJSON($this->settings);\n }", "protected function _loadSettings()\n {\n $settings = Cache::remember('settings', function () {\n /** @var SettingsTable $Settings */\n $Settings = $this->loadModel('Wasabi/Core.Settings');\n return $Settings->getAllKeyValues();\n }, 'wasabi/core/longterm');\n\n $event = new Event('Settings.afterLoad', $settings);\n $this->eventManager()->dispatch($event);\n\n if ($event->result !== null) {\n $settings = $event->result;\n }\n\n Configure::write('Settings', $settings);\n }", "public function load_settings()\r\n\t{\r\n\t\tif (!$this->_use_cache || !($this->_settings = $this->cache->get('settings')))\r\n\t\t{\r\n\t\t\t// Get settings from database\r\n\t\t\t$this->db->select('setting,value');\r\n\t\t\t$query = $this->db->get('settings');\r\n\r\n\t\t\tforeach ($query->result() as $row)\r\n\t\t\t{\r\n\t\t\t\t$this->_settings[$row->setting] = $row->value;\r\n\t\t\t}\r\n\r\n\t\t\t// Check if we want to cache the results\r\n\t\t\tif ($this->_use_cache)\r\n\t\t\t{\r\n\t\t\t\t$this->cache->save('settings', $this->_settings, $this->_cache_ttl);\r\n\t\t\t\t$this->_repopulated_cache = true;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function load_settings() {\n\n include( trailingslashit( CUSTOM_LOGIN_DIR ) . 'includes/default-settings.php' );\n $this->settings_api = new CL_Settings_API(\n $sections,\n $fields,\n array(\n 'option_name' => CUSTOM_LOGIN_OPTION,\n 'option_group' => CUSTOM_LOGIN_OPTION . '_group',\n 'domain' => CUSTOM_LOGIN_DIRNAME,\n 'prefix' => $this->prefix,\n 'version' => $this->version,\n 'menu_page' => $this->menu_page,\n 'nonce' => CUSTOM_LOGIN_OPTION . '_nonce_' . CUSTOM_LOGIN_BASENAME,\n 'file' => CUSTOM_LOGIN_FILE,\n )\n );\n $this->settings_api->admin_init();\n }", "private function load_site_settings() {\n\t\t\n\t\t$this->helper->load_editor_settings();\n\t\t$this->settings = array_merge($this->settings,$this->EE->session->cache['eeck']['eeck_settings']);\n\t}", "protected function load_settings() {\n\t\t$this->settings = WP_United_Settings::Create();\n\t\t$this->init_style_keys();\n\t}", "public function load() {\n\t\t$statement = $this -> db -> query(\"SELECT * FROM \" . FORUM_DB . \".forum_settings\");\n\t\twhile($settingData = $statement -> fetch(PDO::FETCH_ASSOC)) {\n\t\t\t$this -> settings[$settingData['key']] = new ForumSetting($settingData['key'], $settingData['value']);\n\t\t}\n\t}", "private function loadSettings()\n {\n if ($this->settingsLoaded)\n {\n return;\n }\n\n $courseTypeIds = json_decode($this->getBlock()->getSetting(self::CONFIGURATION_COURSE_TYPE));\n\n if (!is_array($courseTypeIds))\n {\n $courseTypeIds = array($courseTypeIds);\n }\n\n $this->courseTypeId = $courseTypeIds[0];\n $this->userCourseCategoryId = $courseTypeIds[1];\n $this->settingsLoaded = true;\n }", "public function settings() \n {\n if (!isset($_SESSION)) { \n session_start(); \n }\n $title = 'User Settings';\n require('../src/View/UserSettingsView.php');\n }", "abstract protected function loadSettings();", "public function settings() {\n \n // Verify if is a team's member\n if ( $this->session->userdata( 'member' ) ) {\n redirect('user/app/dashboard');\n }\n \n // Check if the current user is admin and if session exists\n $this->check_session($this->user_role, 0);\n \n // Verify if account is confirmed\n $this->_check_unconfirmed_account();\n \n // Load Team Model\n $this->load->model('team');\n \n if ( file_exists( APPPATH . 'language/' . $this->config->item('language') . '/default_settings_lang.php') ) {\n $this->lang->load( 'default_settings', $this->config->item('language') );\n }\n \n // Get User Information\n $getdata = $this->user->get_user_info($this->user_id);\n\n // Get User's options\n $options = $this->user_meta->get_all_user_options($this->user_id);\n\n // display user data in settings page\n $this->content = array(\n 'udata' => $getdata,\n 'options' => $options\n );\n\n // Load view/user/settings.php file\n $this->body = 'user/settings';\n\n $this->user_layout();\n \n }", "public function load()\n {\n $this->settings = get_option($this->optionName);\n }", "private function settings()\n {\n if (!$this->settings) {\n $this->settings = userSettings::findOrMake($this->tid);\n }\n return $this->settings;\n }", "function __loadConfig() {\n\t\t$area = $this->__determineArea();\n\t\tConfigure::write('Area', $area);\n\t\t$user = $this->User->findById($this->Session->read('Auth.User.id'));\n\t\tConfigure::write('User', $user['User']);\n\t}", "private function loadPersonalSettings ($userid)\n\t{\n\t\t$QE = $this->cms->connection->query(\"SELECT p.*, s.category_name, s.type, s.name FROM \" . TAB_PERSSETTINGS . \" p LEFT JOIN \" . TAB_SETTINGS . \" s ON p.setting_id = s.id WHERE user_id = \" . intval($userid));\n\t\twhile ($res = $this->cms->connection->fetch_assoc($QE))\n\t\t{\n\t\t\tswitch ($res['type'])\n\t\t\t{\n\t\t\t\tcase 'bool':\n\t\t\t\t\tif ($res['value'] == 'true')\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->settings[$res['category_name']][$res['name']] = true;\n\t\t\t\t\t} else\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->settings[$res['category_name']][$res['name']] = false;\n\t\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\tcase 'int':\n\t\t\t\t\t$this->settings[$res['category_name']][$res['name']] = intval($res['value']);\n\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$this->settings[$res['category_name']][$res['name']] = $res['value'];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "function wp_set_all_user_settings($user_settings)\n {\n }", "public function getSettings()\n {\n $this->view('user.settings');\n }", "protected function loadSettingsIfNotLoaded()\n {\n if ( !$this->loaded ) {\n $this->settings = $this->load();\n $this->loaded = true;\n }\n }", "function loadSettings() {\n\tsetupSiteURLs();\n}", "private function _loadGlobalSettings(){\r\n\r\n $settings = ROOT.DS.'site'.DS.'content'.DS.'global_settings.json';\r\n\r\n if(file_exists($settings)){\r\n $this->globalSettings = json_decode(file_get_contents($settings));\r\n } else {\r\n $globalSettings = new stdClass();\r\n $globalSettings->website_name = '';\r\n $globalSettings->global_script = '';\r\n file_put_contents($settings, json_encode($globalSettings));\r\n }\r\n\r\n }", "protected function loadUserData()\n {\n $this->userData = ($this->session->userData?:[]) + $this->userDataTemplate;\n }", "public function load() {\n\t\tif ($this -> user -> getRights() < 2) {\n\t\t\techo \"Permission denied.\";\n\t\t\treturn;\n\t\t}\n\t\t$this -> configure();\n\t\t$this -> template = TemplateManager::load(\"AdministratorPreferences\");\n\t\t$this -> template -> insert(\"worlds\", $this -> getWorlds());\n\t\t$this -> template -> insert(\"configs\", $this -> getConfigs());\n\t\t$this -> display();\n\t}", "public static function getCurrentSettings() {\r\n\t\t$settings=Yii::app()->user->getState('settings');\r\n\t\t\r\n\t\tif(is_null($settings)) {\r\n\t\t\t//it can also happen that the current session is lost, but the user stays logged in - so pull it out of the db \r\n\t\t\t$settings=UserSettings::model()->findByAttributes(array('userId'=>Yii::app()->user->getId()));\r\n\r\n\t\t\tif(is_null($settings)) {\r\n\t\t\t\t$settings=new UserSettings();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tYii::app()->user->setState('settings', $settings);\r\n\t\t}\r\n\t\t\r\n\t\treturn $settings;\r\n\t}", "public function loadSettings()\n\t{\n\t\t// Update picto for Dolibarr 12++\n\t\tif (function_exists('version_compare') && version_compare(DOL_VERSION, '12.0.0') >= 0) {\n\t\t\t$this->picto = \"quicknotes_128.png@quicknotes\";\n\t\t}\n\n\t\t$this->addJsFile('quicknotes.js.php');\n\t\t$this->enableHooks(array(\n\t\t\t'toprightmenu',\n\t\t\t'main',\n\t\t\t'login'\n\t\t));\n\t}", "private function getAllConfig() {\n $this->user_panel->checkAuth();\n $this->config->findAll();\n }", "private function getSettings(){\n $settings = Auth::user()->settings;\n if(!$settings){\n $settings = new \\App\\Setting;\n $settings->user_id = Auth::id();\n foreach(Cons::$default_settings as $key => $value){\n $settings->{$key} = $value;\n }\n $settings->save();\n return Cons::$default_settings;\n }\n return $settings; // return created settings\n }", "public function init_settings()\n {\n /** @noinspection PhpUndefinedClassInspection */\n parent::init_settings();\n\n $sharedOptions = get_option(SharedPersistor::OPTION_NAME, []) ?: [];\n $this->settings = array_merge($this->settings, $sharedOptions);\n }", "function all_settings( $key ) {\n \n $CI = & get_instance();\n $cache_key = get_cache_id().'user_info';\n $cache_data = get_cache_data( $cache_key );\n \n if( $cache_data ) {\n $all_settings = $cache_data;\n \n }else{\n \n $CI->load->model('users_model');\n $user_information = $CI->users_model->get_user_information_by_id( get_user_id() );\n \n set_cache_data( $cache_key ,$user_information);\n \n $all_settings = $user_information;\n }\n \n \n if( $key ){\n return (isset($all_settings[$key]))?$all_settings[$key]:\"\";\n }\n \n return $all_settings;\n}", "function LoadSettings()\n\t{\n\t\t$stash = IEM_InterspireStash::getInstance();\n\n\t\t/**\n\t\t * Trigger event\n\t\t */\n\t\t\t$tempEventData = new EventData_IEM_SETTINGSAPI_LOADSETTINGS();\n\t\t\t$tempEventData->data = $this;\n\t\t\t$tempEventData->trigger();\n\n\t\t\tunset($tempEventData);\n\t\t/**\n\t\t * -----\n\t\t */\n\n\t\t$areas = $this->Areas;\n\t\tunset($areas['config']);\n\t\tunset($areas['whitelabel']);\n\n\t\t// ----- Obtain the settings value either from the database OR from the stash (ie. cache)\n\t\t\tdo {\n\t\t\t\t// Check if the settings is available in our cache\n\t\t\t\tif ($stash->exists('IEM_SYSTEM_SETTINGS')) {\n\t\t\t\t\t$settings = $stash->read('IEM_SYSTEM_SETTINGS');\n\n\t\t\t\t\tif (!empty($settings) && is_array($settings)) {\n\t\t\t\t\t\tforeach ($settings as $area => $aravalue) {\n\t\t\t\t\t\t\t/**\n\t\t\t\t\t\t\t * TODO refactor\n\t\t\t\t\t\t\t * As it stands we are defining constants dynamically. This is a bad programming practice.\n\t\t\t\t\t\t\t * Once you have time, you might want to consider refactoring this code.\n\t\t\t\t\t\t\t *\n\t\t\t\t\t\t\t * As you may have notice, this is a duplicated code\n\t\t\t\t\t\t\t * (see the codes that fetches this value from database below).\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\tif (!defined('SENDSTUDIO_' . $area)) {\n\t\t\t\t\t\t\t\tdefine('SENDSTUDIO_' . $area, $aravalue);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\n\t\t\t\t// ------------------------------------------------------------------------\n\t\t\t\t// The settings cannot be found in stash cache,\n\t\t\t\t// so we will need to load it from database and put them in our cache\n\t\t\t\t// ------------------------------------------------------------------------\n\t\t\t\t\t$result = $this->Db->Query(\"SELECT * FROM \" . SENDSTUDIO_TABLEPREFIX . \"config_settings\");\n\n\t\t\t\t\t$settings = array();\n\t\t\t\t\twhile ($row = $this->Db->Fetch($result)) {\n\t\t\t\t\t\t$area = $row['area'];\n\t\t\t\t\t\t// eh? How did a config setting get in the db without it being in the settings api??\n\t\t\t\t\t\tif (!in_array($area, $areas)) {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// this is for the 'upgrade' process - which moves them from the config file to being in the database.\n\t\t\t\t\t\tif (!defined('SENDSTUDIO_' . $area)) {\n\t\t\t\t\t\t\t/**\n\t\t\t\t\t\t\t * @todo Remove hacks like these and refactor code that causes us to use these hacks!!!\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\tif ($area == 'CRON_TRIGGEREMAILS_P' && $row['areavalue'] == '') {\n\t\t\t\t\t\t\t\t$row['areavalue'] = 1440;\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 * TODO refactor\n\t\t\t\t\t\t\t * As it stands we are defining constants dynamically. This is a bad programming practice.\n\t\t\t\t\t\t\t * Once you have time, you might want to consider refactoring this code.\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\tdefine('SENDSTUDIO_' . $area, $row['areavalue']);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$k = array_search($area, $areas);\n\t\t\t\t\t\tunset($areas[$k]);\n\n\t\t\t\t\t\t$settings[$area] = $row['areavalue'];\n\t\t\t\t\t}\n\n\t\t\t\t\t$this->Db->FreeResult($result);\n\n\n\n\t\t\t\t\t// Cache the settings\n\t\t\t\t\t$stash->write('IEM_SYSTEM_SETTINGS', $settings, true);\n\t\t\t\t// ------------------------------------------------------------------------\n\t\t\t} while(false);\n\t\t// -----\n\n\n\t\t// ----- Default settings\n\t\t\t// \"Multiple unsubscribe\" feature\n\t\t\tif (!defined('SENDSTUDIO_USEMULTIPLEUNSUBSCRIBE')) {\n\t\t\t\tdefine('SENDSTUDIO_USEMULTIPLEUNSUBSCRIBE', 0);\n\t\t\t}\n\n\t\t\t// As a default you do not want contacts to be able to modify their own email\n\t\t\tif (!defined('SENDSTUDIO_CONTACTCANMODIFYEMAIL')) {\n\t\t\t\tdefine('SENDSTUDIO_CONTACTCANMODIFYEMAIL', '0');\n\t\t\t}\n\n\t\t\t// Number of seconds to sleep when login failed\n\t\t\tif (!defined('SENDSTUDIO_SECURITY_WRONG_LOGIN_WAIT')) {\n\t\t\t\tdefine('SENDSTUDIO_SECURITY_WRONG_LOGIN_WAIT', 5);\n\t\t\t}\n\n\t\t\t// Number of attempts threshold\n\t\t\tif (!defined('SENDSTUDIO_SECURITY_WRONG_LOGIN_THRESHOLD_COUNT')) {\n\t\t\t\tdefine('SENDSTUDIO_SECURITY_WRONG_LOGIN_THRESHOLD_COUNT', 5);\n\t\t\t}\n\n\t\t\t// Number of seconds that wrong login threshold is checking for\n\t\t\t// (ie. 5 failed log in attempts in 300 seconds)\n\t\t\tif (!defined('SENDSTUDIO_SECURITY_WRONG_LOGIN_THRESHOLD_DURATION')) {\n\t\t\t\tdefine('SENDSTUDIO_SECURITY_WRONG_LOGIN_THRESHOLD_DURATION', 300);\n\t\t\t}\n\n\t\t\t// Ban duration\n\t\t\tif (!defined('SENDSTUDIO_SECURITY_BAN_DURATION')) {\n\t\t\t\tdefine('SENDSTUDIO_SECURITY_BAN_DURATION', 300);\n\t\t\t}\n\n\t\t\t// Autoresponders takes credit\n\t\t\tif (!defined('SENDSTUDIO_CREDIT_INCLUDE_AUTORESPONDERS')) {\n\t\t\t\tdefine('SENDSTUDIO_CREDIT_INCLUDE_AUTORESPONDERS', 1);\n\t\t\t}\n\n\t\t\t// Trigger takes credit\n\t\t\tif (!defined('SENDSTUDIO_CREDIT_INCLUDE_TRIGGERS')) {\n\t\t\t\tdefine('SENDSTUDIO_CREDIT_INCLUDE_TRIGGERS', 1);\n\t\t\t}\n\n\t\t\t// Whether or not to enable credit warnings\n\t\t\tif (!defined('SENDSTUDIO_CREDIT_WARNINGS')) {\n\t\t\t\tdefine('SENDSTUDIO_CREDIT_WARNINGS', 1);\n\t\t\t}\n\n\t\t\t// Triggeremails_P is defaulted to run every 24 hours\n\t\t\tif (!defined('SENDSTUDIO_CRON_TRIGGEREMAILS_P')) {\n\t\t\t\tdefine('SENDSTUDIO_CRON_TRIGGEREMAILS_P', 1440);\n\t\t\t}\n\n\t\t\t// Maintenance will default to run once a day\n\t\t\tif (!defined('SENDSTUDIO_CRON_MAINTENANCE')) {\n\t\t\t\tdefine('SENDSTUDIO_CRON_MAINTENANCE', 1440);\n\t\t\t}\n\t\t// -----\n\n\n\t\t// ------------------------------------------------------------------------------------------------------------------\n\t\t// There is an issue with MySQL database connection whereby most server had it's connection set to latin1\n\t\t// The problem lies when we defaulted our database to UTF8 and the application to use UTF8, non standard\n\t\t// English characters will be transformed to latin1, but stored as UTF8 in the database\n\t\t// See Issue 4807 in RedMine.\n\t\t//\n\t\t// A fix proved to be a bit difficult, assuming that there will be alot of people that were affected by this issue.\n\t\t// Once we set the characterset connection to UTF8, non-English characterset will be BROKEN.\n\t\t//\n\t\t// To make sure that only NEW installation uses this fix, the settings DATABASE_UTF8PATCH is introduced.\n\t\t// It will be set to 1 for newer install, but set to 0 for existing install.\n\t\t//\n\t\t// Once we work out the details for converting existing data out, we can safely remove this.\n\t\t// ------------------------------------------------------------------------------------------------------------------\n\t\t\tif (!defined('SENDSTUDIO_DATABASE_UTF8PATCH')) {\n\t\t\t\tdefine('SENDSTUDIO_DATABASE_UTF8PATCH', '0');\n\t\t\t}\n\t\t// ------------------------------------------------------------------------------------------------------------------\n\n\n\t\t/**\n\t\t * Addons might define their own things.\n\t\t * To make everything work we need to go through the left over $areas items to define them.\n\t\t * If we don't do this, then we'd get errors when we try to view the settings page\n\t\t * as the option/variable would not be defined yet.\n\t\t *\n\t\t * Set them to null by default.\n\t\t */\n\t\tforeach ($areas as $area) {\n\t\t\t$name = 'SENDSTUDIO_' . $area;\n\t\t\tif (!defined($name)) {\n\t\t\t\tdefine($name, null);\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Load the whitelabel settings\n\t\t */\n\t\t$this->LoadWhiteLabelSettings();\n\t\t/**\n\t\t * -----\n\t\t */\n\n\t\t$this->CheckCron();\n\t}", "public static function load($compat_mode = false)\n\t{\n\t\tif (self::$instance === null)\n\t\t{\n\t\t\t$db = database();\n\t\t\t$cache = Cache::instance();\n\t\t\t$req = request();\n\n\t\t\tself::$instance = new UserSettingsLoader($db, $cache, $req);\n\t\t\t$already_verified = self::loadFromIntegration();\n\t\t\tself::loadFromCookie($req->user_agent());\n\t\t\tself::$instance->loadUserById(self::$id, $already_verified, self::$session_password);\n\t\t\tself::$settings = self::$instance->getSettings();\n\t\t\tself::$info = self::$instance->getInfo();\n\t\t\tif ($compat_mode)\n\t\t\t{\n\t\t\t\tglobal $user_info;\n\t\t\t\t$user_info = User::$info;\n\t\t\t}\n\t\t}\n\t}", "public function checkUserSettings(){\n $data = $this->db->start()->get('*','user', array(array('id', '=', $_SESSION['_user']['id'])))->first();\n $_SESSION['_user'] = array('id' => $data->id, 'firstname' => $data->firstname, 'lastname' => $data->lastname, 'email' => $data->email, 'userLevel' => $this->getuserLevel($data->id)); \n }", "public function user_settings()\n {\n\n //if existing user, go to settings\n if (Session::has('user'))\n {\n //remember url user is coming from\n Session::put('redirect', URL::previous());\n\n $user = Session::get('user');\n $failure = Session::get('failure');\n\n //specify whether user is new or not\n $user->new = 0;\n\n //get the grille's phone number, and put it in readable format\n $grille_num = Grille::where('id', $this->grille_id)->pluck('phone_number');\n $user->grille_number = '(' . substr($grille_num, 0, 3) . ') ' . substr($grille_num, 3, 3) \n . '-' . substr($grille_num, 6, 4);\n\n //format phone number to prefill\n $user->phone_formatted = '(' . substr($user->phone_number, 0, 3) . ') ' . substr($user->phone_number, 3, 3) \n . '-' . substr($user->phone_number, 6, 4);\n\n $this->layout->content = View::make('users.edit', ['user' => $user, 'failure' => $failure]);\n }\n //else redirect back to where came from\n else\n {\n try {\n return Redirect::back();\n }\n catch (Exception $e) {\n return Redirect::to('/');\n }\n\n }\n }", "function settings() \n {\n $api = new Module_UserManagement_API();\n $view = Core_View::factory('usersettings');\n\n $user = $api->getUser();\n\n $settings = array();\n $settings[] = array(\"name\" => 'UserID',\n \"id\" => 'userid', \n \"value\" => $user['userid'], \n \"editable\" => false);\n\n $settings[] = array(\"name\" => 'Password',\n \"id\" => 'password', \n \"value\" => '********', \n \"editable\" => true);\n\n $settings[] = array(\"name\" => 'Maximum Heart Rate',\n \"id\" => 'max_heartrate', \n \"value\" => $user['max_heartrate'], \n \"editable\" => true);\n\n $settings[] = array(\"name\" => 'Resting Heart Rate',\n \"id\" => 'resting_heartrate', \n \"value\" => $user['resting_heartrate'], \n \"editable\" => true);\n\n $settings[] = array(\"name\" => 'Date of Birth',\n \"id\" => 'dob', \n \"value\" => $user['dob'], \n \"editable\" => true);\n\n $settings[] = array(\"name\" => 'Rider Weight',\n \"id\" => 'rider_weight', \n \"value\" => $user['rider_weight'], \n \"editable\" => true);\n\n $settings[] = array(\"name\" => 'Bike Weight',\n \"id\" => 'bike_weight', \n \"value\" => $user['bike_weight'], \n \"editable\" => true);\n\n $settings[] = array(\"name\" => 'Athlete',\n \"id\" => 'athlete', \n \"value\" => $user['athlete'] ? 'Yes' : 'No', \n \"editable\" => true);\n\n $settings[] = array(\"name\" => 'Coach',\n \"id\" => 'coach', \n \"value\" => $user['coach'] ? 'Yes' : 'No', \n \"editable\" => true);\n\n $view->settings = $settings;\n\n echo $view->render();\n }", "public function loadGlobalProfile()\n {\n $globalProfile = UserProfile::find()\n ->where('user_id = ' . Yii::$app->user->id)\n ->one();\n Yii::$app->session->set('user.global_profile', $globalProfile);\n }", "protected function readUserOptions() {\n\t\t// add cache resource\n\t\t$cacheName = 'user-option-'.PACKAGE_ID;\n\t\tWCF::getCache()->addResource($cacheName, WCF_DIR.'cache/cache.'.$cacheName.'.php', WCF_DIR.'lib/system/cache/CacheBuilderOption.class.php');\n\t\t\n\t\t// get options\n\t\t$this->options = WCF::getCache()->get($cacheName, 'options');\n\t}", "public function load_settings() {\n\t\tadd_action( 'admin_init', [ $this, 'register_option' ] );\n\t\tadd_action( 'admin_init', [ $this, 'license_action' ] );\n\t\tadd_action( 'admin_notices', [ $this, 'show_error' ] );\n\t\tadd_action( 'admin_init', [ $this, 'update_settings' ] );\n\t\tadd_filter( 'http_request_args', [ $this, 'disable_wporg_request' ], 5, 2 );\n\t\tadd_filter( 'edd_sl_updater_add_admin_page', [ $this, 'license_page' ] );\n\t}", "public function all()\n {\n $this->loadSettingsIfNotLoaded();\n\n return $this->settings;\n }", "public function getUserSettings()\n {\n return $this->postRequest('GetUserSettings', null, '5.3.1.68');\n }", "public function updateUserPreferences()\n {\n $userList = $this->_userDao->getUserList();\n\n // loop through every user and fix it\n foreach ($userList as $user) {\n /*\n * Because we do not get all users' properties from\n * getUserList, retrieve the users' settings from scratch\n */\n $user = $this->_userDao->getUser($user['userid']);\n\n // set the users' preferences\n $this->setSettingIfNot($user['prefs'], 'perpage', 25);\n $this->setSettingIfNot($user['prefs'], 'date_formatting', 'human');\n $this->setSettingIfNot($user['prefs'], 'normal_template', 'we1rdo');\n $this->setSettingIfNot($user['prefs'], 'mobile_template', 'mobile');\n $this->setSettingIfNot($user['prefs'], 'tablet_template', 'we1rdo');\n $this->setSettingIfNot($user['prefs'], 'count_newspots', true);\n $this->setSettingIfNot($user['prefs'], 'mouseover_subcats', true);\n $this->setSettingIfNot($user['prefs'], 'keep_seenlist', true);\n $this->setSettingIfNot($user['prefs'], 'auto_markasread', true);\n $this->setSettingIfNot($user['prefs'], 'keep_downloadlist', true);\n $this->setSettingIfNot($user['prefs'], 'keep_watchlist', true);\n $this->setSettingIfNot($user['prefs'], 'nzb_search_engine', 'nzbindex');\n $this->setSettingIfNot($user['prefs'], 'show_filesize', true);\n $this->setSettingIfNot($user['prefs'], 'show_reportcount', true);\n $this->setSettingIfNot($user['prefs'], 'minimum_reportcount', 1);\n $this->setSettingIfNot($user['prefs'], 'show_nzbbutton', true);\n $this->setSettingIfNot($user['prefs'], 'show_multinzb', true);\n $this->setSettingIfNot($user['prefs'], 'customcss', '');\n $this->setSettingIfNot($user['prefs'], 'newspotdefault_tag', $user['username']);\n $this->setSettingIfNot($user['prefs'], 'newspotdefault_body', '');\n $this->setSettingIfNot($user['prefs'], 'user_language', 'en_US');\n $this->setSettingIfNot($user['prefs'], 'show_avatars', true);\n $this->setSettingIfNot($user['prefs'], 'usemailaddress_for_gravatar', true);\n\n $this->setSettingIfNot($user['prefs']['nzbhandling'], 'action', 'disable');\n $this->setSettingIfNot($user['prefs']['nzbhandling'], 'local_dir', '/tmp');\n $this->setSettingIfNot($user['prefs']['nzbhandling'], 'prepare_action', 'merge');\n $this->setSettingIfNot($user['prefs']['nzbhandling'], 'command', '');\n $this->setSettingIfNot($user['prefs']['nzbhandling']['sabnzbd'], 'url', '');\n $this->setSettingIfNot($user['prefs']['nzbhandling']['sabnzbd'], 'apikey', '');\n $this->setSettingIfNot($user['prefs']['nzbhandling']['sabnzbd'], 'username', '');\n $this->setSettingIfNot($user['prefs']['nzbhandling']['sabnzbd'], 'password', '');\n $this->setSettingIfNot($user['prefs']['nzbhandling']['nzbget'], 'host', '');\n $this->setSettingIfNot($user['prefs']['nzbhandling']['nzbget'], 'port', '');\n $this->setSettingIfNot($user['prefs']['nzbhandling']['nzbget'], 'ssl', '');\n $this->setSettingIfNot($user['prefs']['nzbhandling']['nzbget'], 'username', '');\n $this->setSettingIfNot($user['prefs']['nzbhandling']['nzbget'], 'password', '');\n $this->setSettingIfNot($user['prefs']['nzbhandling']['nzbget'], 'timeout', 15);\n $this->setSettingIfNot($user['prefs']['nzbhandling']['nzbvortex'], 'host', '');\n $this->setSettingIfNot($user['prefs']['nzbhandling']['nzbvortex'], 'port', '');\n $this->setSettingIfNot($user['prefs']['nzbhandling']['nzbvortex'], 'apikey', '');\n\n $this->setSettingIfNot($user['prefs']['notifications']['growl'], 'host', '');\n $this->setSettingIfNot($user['prefs']['notifications']['growl'], 'password', '');\n /* Notifo and NMA are discontinued. */\n $this->unsetSetting($user['prefs']['notifications'], 'nma');\n $this->unsetSetting($user['prefs']['notifications'], 'notifo');\n $this->setSettingIfNot($user['prefs']['notifications']['prowl'], 'apikey', '');\n $this->setSettingIfNot($user['prefs']['notifications']['twitter'], 'screen_name', '');\n $this->setSettingIfNot($user['prefs']['notifications']['twitter'], 'request_token', '');\n $this->setSettingIfNot($user['prefs']['notifications']['twitter'], 'request_token_secret', '');\n $this->setSettingIfNot($user['prefs']['notifications']['twitter'], 'access_token', '');\n $this->setSettingIfNot($user['prefs']['notifications']['twitter'], 'access_token_secret', '');\n $notifProviders = Notifications_Factory::getActiveServices();\n foreach ($notifProviders as $notifProvider) {\n $this->setSettingIfNot($user['prefs']['notifications'][$notifProvider], 'enabled', false);\n $this->setSettingIfNot($user['prefs']['notifications'][$notifProvider]['events'], 'watchlist_handled', false);\n $this->setSettingIfNot($user['prefs']['notifications'][$notifProvider]['events'], 'nzb_handled', false);\n $this->setSettingIfNot($user['prefs']['notifications'][$notifProvider]['events'], 'retriever_finished', false);\n $this->setSettingIfNot($user['prefs']['notifications'][$notifProvider]['events'], 'report_posted', false);\n $this->setSettingIfNot($user['prefs']['notifications'][$notifProvider]['events'], 'spot_posted', false);\n $this->setSettingIfNot($user['prefs']['notifications'][$notifProvider]['events'], 'user_added', false);\n $this->setSettingIfNot($user['prefs']['notifications'][$notifProvider]['events'], 'newspots_for_filter', false);\n } // foreach\n\n // make sure a sort preference is defined. An empty field means relevancy\n $this->setSettingIfNot($user['prefs'], 'defaultsortfield', '');\n\n // Remove deprecated preferences\n $this->unsetSetting($user['prefs'], 'search_url');\n $this->unsetSetting($user['prefs'], 'template');\n $this->unsetSetting($user['prefs']['notifications'], 'libnotify');\n\n // Make sure the user has a valid RSA key\n if ($user['userid'] > 2) {\n $rsaKey = $this->_userDao->getUserPrivateRsaKey($user['userid']);\n if (empty($rsaKey)) {\n // Creer een private en public key paar voor deze user\n $spotSigning = Services_Signing_Base::factory();\n $userKey = $spotSigning->createPrivateKey($this->_settings->get('openssl_cnf_path'));\n\n $this->_userDao->setUserRsaKeys($user['userid'], $userKey['public'], $userKey['private']);\n } // if\n } // if\n\n /*\n * In earlier versions, we always appended \"sabnzbd/\" to the URL, so we do this once\n * manually\n */\n if ($this->_settings->get('securityversion') < 0.31) {\n if (!empty($user['prefs']['nzbhandling']['sabnzbd']['url'])) {\n $user['prefs']['nzbhandling']['sabnzbd']['url'] = $user['prefs']['nzbhandling']['sabnzbd']['url'].'sabnzbd/';\n } // if\n } // if\n\n // update the user record in the database\n $this->_userDao->setUser($user);\n } // foreach\n }", "public function settings()\r\n {\r\n if ($this->request->is('post')) {\r\n\r\n $settingsChanged = false;\r\n\r\n $userId = $this->Session->read('Auth.User.id');\r\n\r\n $this->User->id = $userId;\r\n\r\n if ($this->request->data['User']['Clear All']) {\r\n $this->User->Reminder->deleteAll(\r\n array('Reminder.user_id' => $this->Session->read('Auth.User.id'), false)\r\n );\r\n }\r\n\r\n if (!empty($this->request->data['User']['email'])) {\r\n\r\n $this->User->set($this->request->data);\r\n $this->OpauthUser->set($this->request->data);\r\n\r\n $validUser = $this->User->validates(array('fieldList' => array('email')));\r\n $validOpauth = $this->OpauthUser->validates(array('fieldList' => array('email')));\r\n\r\n if ($this->Session->read('User.authType') == 'opauth') {\r\n\r\n $this->OpauthUser->id = $userId;\r\n\r\n if ($validOpauth && $validUser) {\r\n $this->OpauthUser->saveField('email', $this->request->data['User']['email'], false);\r\n $settingsChanged = true;\r\n }\r\n\r\n } else {\r\n\r\n if ($validUser && $validOpauth) {\r\n $this->User->saveField('email', $this->request->data['User']['email'], false);\r\n $settingsChanged = true;\r\n }\r\n }\r\n }\r\n\r\n if (!empty($this->request->data['User']['password'])) {\r\n\r\n if ($this->User->saveField('password', $this->request->data['User']['password'], true)) {\r\n $settingsChanged = true;\r\n }\r\n }\r\n\r\n if ($this->request->data['User']['timezone'] !== \"empty\") {\r\n\r\n if ($this->Session->read('User.authType') == 'opauth') {\r\n\r\n $this->OpauthUser->id = $userId;\r\n\r\n if ($this->OpauthUser->saveField('timezone', $this->request->data['User']['timezone'], false)) {\r\n $this->Session->write('Auth.User.timezone', $this->request->data['User']['timezone']);\r\n $settingsChanged = true;\r\n }\r\n\r\n } else {\r\n if ($this->User->saveField('timezone', $this->request->data['User']['timezone'], true)) {\r\n $this->Session->write('Auth.User.timezone', $this->request->data['User']['timezone']);\r\n $settingsChanged = true;\r\n }\r\n }\r\n }\r\n\r\n if ($this->request->data['User']['Clear All']) {\r\n $settingsChanged = true;\r\n $this->Session->setFlash('Cleared all reminders', 'successFlash');\r\n }\r\n\r\n if ($settingsChanged) {\r\n $this->Session->setFlash('Settings Changed', 'successFlash');\r\n\r\n } else {\r\n $this->Session->setFlash('Nothing to update', 'failureFlash');\r\n }\r\n }\r\n }", "protected static function getSettings()\r\n {\r\n if(!self::$avail_settings)\r\n {\r\n $data = self::db()->query(\r\n 'SELECT * FROM `:prefix:rbac_user_settings` AS `t1` '\r\n . 'JOIN `:prefix:forms_fieldtypes` AS `t2` '\r\n . 'ON `t1`.`fieldtype`=`t2`.`type_id` '\r\n . 'WHERE `is_editable`=? '\r\n . 'ORDER BY `fieldset` ASC, `position` ASC',\r\n array('Y')\r\n );\r\n if($data)\r\n {\r\n self::$avail_settings = $data->fetchAll();\r\n }\r\n }\r\n return self::$avail_settings;\r\n }", "public function index()\n {\n $userSettings = UserSettings::all();\n return $userSettings;\n }", "public function getCurrentUserConfig();", "function delete_all_user_settings()\n {\n }", "public function getSettings();", "public function settings()\n {\n\n $this->data['page'] = 'settings';\n $this->data['user'] = $this->user;\n\n // get privacy settings\n\n $my_privacy = explode(',',$this->user['privacy_settings']);\n\n $this->data['settings'] = $my_privacy;\n\n $this->load->view('/dash/header',$this->data);\n $this->load->view('/dash/settings',$this->data);\n $this->load->view('/dash/footer',$this->data);\n\n }", "function getUserSettings() {\n\n\t$database = new Database();\n\t$database->query(\"SELECT * FROM papi_user WHERE id=1;\");\n\t$database->bind(':rows', $rows);\n\treturn $database->single();\n\n}", "protected function define_settings() {\n\n // All the settings related to this activity will include this prefix\n $settingprefix = $this->info->modulename . '_' . $this->info->moduleid . '_';\n\n // All these are common settings to be shared by all activities\n\n // Define activity_include (to decide if the whole task must be really executed)\n // Dependent of:\n // - activities root setting\n // - section_included setting (if exists)\n $settingname = $settingprefix . 'included';\n $activity_included = new restore_activity_generic_setting($settingname, base_setting::IS_BOOLEAN, true);\n $activity_included->get_ui()->set_icon(new image_icon('icon', get_string('pluginname', $this->modulename),\n $this->modulename, array('class' => 'iconlarge icon-post')));\n $this->add_setting($activity_included);\n // Look for \"activities\" root setting\n $activities = $this->plan->get_setting('activities');\n $activities->add_dependency($activity_included);\n // Look for \"section_included\" section setting (if exists)\n $settingname = 'section_' . $this->info->sectionid . '_included';\n if ($this->plan->setting_exists($settingname)) {\n $section_included = $this->plan->get_setting($settingname);\n $section_included->add_dependency($activity_included);\n }\n\n // Define activity_userinfo. Dependent of:\n // - users root setting\n // - section_userinfo setting (if exists)\n // - activity_included setting.\n $settingname = $settingprefix . 'userinfo';\n $defaultvalue = false;\n if (isset($this->info->settings[$settingname]) && $this->info->settings[$settingname]) { // Only enabled when available\n $defaultvalue = true;\n }\n\n $activity_userinfo = new restore_activity_userinfo_setting($settingname, base_setting::IS_BOOLEAN, $defaultvalue);\n if (!$defaultvalue) {\n // This is a bit hacky, but if there is no user data to restore, then\n // we replace the standard check-box with a select menu with the\n // single choice 'No', and the select menu is clever enough that if\n // there is only one choice, it just displays a static string.\n //\n // It would probably be better design to have a special UI class\n // setting_ui_checkbox_or_no, rather than this hack, but I am not\n // going to do that today.\n $activity_userinfo->set_ui(new backup_setting_ui_select($activity_userinfo, '-',\n array(0 => get_string('no'))));\n } else {\n $activity_userinfo->get_ui()->set_label('-');\n }\n\n $this->add_setting($activity_userinfo);\n\n // Look for \"users\" root setting\n $users = $this->plan->get_setting('users');\n $users->add_dependency($activity_userinfo);\n\n // Look for \"section_userinfo\" section setting (if exists)\n $settingname = 'section_' . $this->info->sectionid . '_userinfo';\n if ($this->plan->setting_exists($settingname)) {\n $section_userinfo = $this->plan->get_setting($settingname);\n $section_userinfo->add_dependency($activity_userinfo);\n }\n\n // Look for \"activity_included\" setting.\n $activity_included->add_dependency($activity_userinfo);\n\n // End of common activity settings, let's add the particular ones.\n $this->define_my_settings();\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 refreshSettings() {\n\tglobal $settings;\n\n\t$settings = json_decode(file_get_contents('settings.json'), true);\n}", "function get_user_settings( $user )\n {\n //Unimplemented\n }", "public function getAllSettings()\n {\n return $this->settings;\n }", "function retrieveSettings()\n\t\t{\t\n\t\t\t$this->settings = array();\n\t\t\t// first retrieve the \"external\" settings\n\t\t\t$this->retrieveExternalSettings();\n\t\t\t// read the settings property\n\t\t\t$stream = mapi_openpropertytostream($this->store, PR_EC_WEBACCESS_SETTINGS);\n\t\t\tif ($stream == false) {\n\t\t\t\treturn ;\n\t\t\t}\n\n\t\t\t$stat = mapi_stream_stat($stream);\n\t\t\tmapi_stream_seek($stream, 0, STREAM_SEEK_SET);\n\t\t\t$settings_string = '';\n\t\t\tfor($i=0;$i<$stat['cb'];$i+=1024){\n\t\t\t\t$settings_string .= mapi_stream_read($stream, 1024);\n\t\t\t}\n\t\t\t\n\t\t\t// suppress php notice in case unserializing fails\n\t\t\t$settings = @unserialize($settings_string);\n\n\t\t\tif (!$settings){ // backwards compatible with old saving method using XML\n\t\t\t\t$xml = new XMLParser();\n\t\t\t\t$settings = $xml->getData($settings_string);\n\t\t\t}\n\n\t\t\tif (is_array($settings) && isset($settings['settings']) && is_array($settings['settings'])){\n\t\t\t\t$this->settings = array_merge_recursive_overwrite($settings['settings'],$this->settings);\n\t\t\t}\n\t\t}", "public function actionSettings(){\n $user = Users::findOne(\\Yii::$app->user->getId());\n return $this->render('settings', ['user'=>$user]);\n }", "protected static function LoadSavedSyncSettings($userId)\n\t{\n\t\t$defaultSettings = array(\n\t\t\t'ENABLED' => static::IS_RESOURCE_SYNC_ENABLED,\n\t\t\t'MAX_COUNT' => static::MAX_SYNC_COUNT,\n\t\t\t//'FILTER' => static::RESOURCE_SYNC_OWNER,\n\t\t);\n\t\treturn CUserOptions::GetOption('DAV_SYNC', static::RESOURCE_SYNC_SETTINGS_NAME, $defaultSettings, $userId);\n\t}", "function LoadWhiteLabelSettings() {\n\t\t$tempWhiteLabelCache = array();\n\n\t\t// Load the customizable white label settings.\n\t\tif (!$this->WhiteLabelCache->exists('IEM_SETTINGS_WHITELABEL')) {\n\t\t\t// Read from Database\n\t\t\t$query = \"SELECT * FROM [|PREFIX|]whitelabel_settings\";\n\t\t\t$result = @$this->Db->Query($query);\n\t\t\tif (!$result) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Restore from Database\n\t\t\twhile ($row = $this->Db->Fetch($result)) {\n\t\t\t\tif ($row['name']) {\n\t\t\t\t\t$tempWhiteLabelCache[] = $row;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$this->Db->FreeResult($result);\n\n\t\t\t// Cache it\n\t\t\tif (sizeof($tempWhiteLabelCache)) {\n\t\t\t\t$this->WhiteLabelCache->write('IEM_SETTINGS_WHITELABEL', $tempWhiteLabelCache);\n\t\t\t}\n\n\n\t\t// Restore from cached\n\t\t} else {\n\t\t\t$tempWhiteLabelCache = $this->WhiteLabelCache->read('IEM_SETTINGS_WHITELABEL');\n\t\t}\n\n\n\t\t// Defining the white label settings\n\t\tforeach ($tempWhiteLabelCache as $eachWhiteLabelCache) {\n\t\t\tdefined($eachWhiteLabelCache['name']) or define($eachWhiteLabelCache['name'], $eachWhiteLabelCache['value']);\n\t\t}\n\t}", "public function get_settings()\n {\n }", "public function loadSettings()\n {\n // old Alfred v4 settings\n $settings = \\Alfred\\getVariables(self::$settingsArgs);\n\n\n if (\\Alfred\\getAlfredVersion() >= 5) {\n $new_settings = \\Alfred\\getVariables(self::$settingsArgsV5);\n\n if (!empty($settings['language']) && $settings['language'] !== 'en_EN' && $new_settings['language'] !== 'en_EN') {\n $settings['language'] = $new_settings['language'];\n }\n if (empty($settings['language'])) {\n $settings['language'] = $new_settings['language'];\n }\n if (!empty($new_settings['timezone']) && $new_settings['timezone'] !== 'none') {\n $settings['time_zone'] = $new_settings['timezone'];\n }\n if (!empty($new_settings['base_currencies'])) {\n $settings['base_currency'] = str_replace(' ', '', $new_settings['base_currencies']);\n $settings['base_currency'] = explode(',', $settings['base_currency']);\n }\n if (!empty($new_settings['apikey_fixer'])) {\n $settings['fixer_apikey'] = $new_settings['apikey_fixer'];\n }\n if (!empty($new_settings['apikey_coinmarket'])) {\n $settings['coinmarket_apikey'] = $new_settings['apikey_coinmarket'];\n }\n if (!empty($new_settings['crypto_decimals'])) {\n $settings['crypto_decimals'] = $new_settings['crypto_decimals'];\n }\n if (!empty($new_settings['vat_value'])) {\n $settings['vat_percentage'] = $new_settings['vat_value'];\n }\n if (!empty($new_settings['pixels_base'])) {\n $settings['base_pixels'] = $new_settings['pixels_base'];\n }\n if (\n !empty($new_settings['date_format']) && $new_settings['date_format'] !== 'j F, Y, g:i:s a' ||\n empty($settings['time_format'])\n ) {\n $settings['time_format'] = $new_settings['date_format'];\n if (is_string($settings['time_format'])) {\n $settings['time_format'] = explode('|', $new_settings['date_format']);\n }\n }\n if (!empty($new_settings['number_output_format'])) {\n $settings['number_output_format'] = $new_settings['number_output_format'];\n }\n if (!empty($new_settings['currency_decimals'])) {\n $settings['currency_decimals'] = $new_settings['currency_decimals'];\n }\n }\n\n return $settings;\n }", "static public function get_saved_settings() {\n\t\tif ( self::$settings ) {\n\t\t\treturn self::$settings;\n\t\t}\n\n\t\t$roles = self::get_all_roles();\n\t\t$settings = FLBuilderModel::get_admin_settings_option( '_fl_builder_user_access', true );\n\t\t$ms_settings = FLBuilderModel::get_admin_settings_option( '_fl_builder_user_access', false );\n\t\t$ms_support = FLBuilderAdminSettings::multisite_support();\n\n\t\tif ( ! is_array( $settings ) ) {\n\t\t\t$settings = array();\n\t\t}\n\n\t\tforeach ( self::$registered_settings as $key => $data ) {\n\n\t\t\tif ( ! isset( $settings[ $key ] ) ) {\n\t\t\t\tif ( $ms_support && isset( $ms_settings[ $key ] ) ) {\n\t\t\t\t\t$settings[ $key ] = $ms_settings[ $key ];\n\t\t\t\t} else {\n\t\t\t\t\t$settings[ $key ] = array();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tforeach ( $roles as $role_key => $role_data ) {\n\n\t\t\t\tif ( ! isset( $settings[ $key ][ $role_key ] ) ) {\n\n\t\t\t\t\tif ( ! isset( $data['default'] ) || ! $data['default'] ) {\n\t\t\t\t\t\t$settings[ $key ][ $role_key ] = false;\n\t\t\t\t\t} elseif ( is_array( $data['default'] ) ) {\n\n\t\t\t\t\t\tif ( in_array( $role_key, $data['default'] ) ) {\n\t\t\t\t\t\t\t$settings[ $key ][ $role_key ] = true;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$settings[ $key ][ $role_key ] = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$settings[ $key ][ $role_key ] = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tself::$settings = $settings;\n\n\t\treturn $settings;\n\t}", "static public function get_raw_settings() {\n\t\t$settings = FLBuilderModel::get_admin_settings_option( '_fl_builder_user_access', true );\n\n\t\tif ( ! is_array( $settings ) ) {\n\t\t\t$settings = array();\n\t\t}\n\n\t\treturn $settings;\n\t}", "public function getSettings() {\n $file = SETTINGS_PATH.'/'.$this->domain.'.json';\n $siteSettings = file_get_contents($file);\n return json_decode($siteSettings);\n }", "function wp_user_settings()\n {\n }", "public function load_options() {\n\t\t$this->disable_hash = get_option( 'health-check-disable-plugin-hash', null );\n\t\t$this->allowed_plugins = get_option( 'health-check-allowed-plugins', array() );\n\t\t$this->default_theme = ( 'yes' === get_option( 'health-check-default-theme', 'yes' ) ? true : false );\n\t\t$this->active_plugins = $this->get_unfiltered_plugin_list();\n\t\t$this->current_theme = get_option( 'health-check-current-theme', false );\n\t}", "public function load_settings_values() {\n\t\t\tparent::load_settings_values();\n\n\t\t\t// If the settings set as a whole is empty then we set a default.\n\t\t\tif ( empty( $this->setting_option_values ) ) {\n\t\t\t\t// If the settings set as a whole is empty then we set a default.\n\t\t\t\tif ( false === $this->setting_option_values ) {\n\t\t\t\t\t$this->transition_deprecated_settings();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( ! isset( $this->setting_option_values['admin_mail_from_name'] ) ) {\n\t\t\t\t$this->setting_option_values['admin_mail_from_name'] = '';\n\t\t\t}\n\n\t\t\tif ( ! isset( $this->setting_option_values['admin_mail_from_email'] ) ) {\n\t\t\t\t$this->setting_option_values['admin_mail_from_email'] = '';\n\t\t\t}\n\n\t\t\tif ( ! isset( $this->setting_option_values['admin_mail_to'] ) ) {\n\t\t\t\t$this->setting_option_values['admin_mail_to'] = '';\n\t\t\t}\n\n\t\t\tif ( ! isset( $this->setting_option_values['admin_mail_subject'] ) ) {\n\t\t\t\t$this->setting_option_values['admin_mail_subject'] = '';\n\t\t\t}\n\n\t\t\tif ( ! isset( $this->setting_option_values['admin_mail_message'] ) ) {\n\t\t\t\t$this->setting_option_values['admin_mail_message'] = '';\n\t\t\t}\n\n\t\t\tif ( ! isset( $this->setting_option_values['admin_mail_html'] ) ) {\n\t\t\t\t$this->setting_option_values['admin_mail_html'] = '';\n\t\t\t}\n\t\t}", "public function reload_settings()\r\n\t{\r\n\t\t$this->clear_cache();\r\n\t\t$this->load_settings();\r\n\t}", "public function settings() {\n $user = Auth::user();\n return view('site.settings', compact('user'));\n }", "public function settings_load() {\n\t\t\t// First restore settings feedback lost as $parent file is no more options-general.php\n\t\t\tadd_action( 'all_admin_notices', array( $this, 'restore_settings_feedback' ) );\n\n\t\t\t$this->is_plugin_settings = true;\n\t\t}", "public function loadConfig()\n {\n $this->setGlobalStoreOfShopNumber($this->getShopNumber());\n $this->loadArray($this->toArray());\n $this->setExportTmpAndLogSettings();\n }", "public function initSettings()\n {\n register_setting('flickr_group_gallery_settings', 'flickr_group_gallery_api_key');\n register_setting('flickr_group_gallery_settings', 'flickr_group_gallery_api_secret');\n register_setting('flickr_group_gallery_settings', 'flickr_group_gallery_cache_path');\n register_setting('flickr_group_gallery_settings', 'flickr_group_gallery_cache_expires');\n }", "public function load_current_user()\n\t{\n\t\t$userid = $this->CI->session->userdata('userid');\n\t\tif($userid)\n\t\t{\n\t\t\t$userdata = $this->CI->user_model->get_by_id($userid);\n\t\t\tif($userdata !== NULL)\n\t\t\t{\n\t\t\t\t$this->set_current_user($userdata);\n\t\t\t}\n\t\t}\n\t}", "public function collectSettings()\n {\n $session = Session::getInstance();\n\n if (Input::get('import') !== 'analysis') {\n $this->settings = $session->get('member-import-settings');\n\n return;\n }\n\n $dataBase = Database::getInstance();\n $result = $dataBase->prepare('SELECT * FROM tl_member_import WHERE disable_import=?')\n ->execute(0);\n\n while ($result->next()) {\n if (!$source = $this->sourceExists($result->importSource)) {\n continue;\n }\n\n $result->importSource = $source;\n\n $result->translate_properties = unserialize($result->translate_properties);\n $result->groups = unserialize($result->groups);\n\n $this->settings[] = $result->row();\n }\n\n $session->set('member-import-settings', $this->settings);\n\n $GLOBALS['TL_MOOTOOLS'][] =\n \"<script>location.href = 'contao/main.php\" .\n \"?do=member_import&import=load&rt=\" . REQUEST_TOKEN . \"&ref=\" . TL_REFERER_ID . \"'</script>\";\n }", "public function getAccountSettings() {\n\t\t\n\t\treturn $this->_getResponse(self::URL_USERS_SETTING);\n\t}", "public function load() {\n\t\t$this -> template = TemplateManager::load(\"ForumPreference\");\n\t\t$this -> template -> insert(\"profileImage\", $this -> user -> getProfileImage());\n\t\t$this -> template -> insert(\"signature\", $this -> user -> getSignature());\n\t\t$this -> display();\n\t}", "public function getSettings() \n {\n $userLogin = Auth::user();\n\n return view('dashboard/settings', ['userLogin'=>$userLogin]);\n }", "public function actionSettings()\n\t{\n\t\t// using the default layout 'protected/views/layouts/main.php'\n\t\t\n\t\t\n\t\t$this->checkUser();\n\t\t\n\t\t$record = SiteUser::model()->findByAttributes(array('id'=> Yii::app()->user->id));\n\t\t\n\t\tif($record===null)\n\t\t\t\tthrow new CHttpException(404, Yii::t('app', 'Internal server error.'));\n\n\t\t\n\t\tif(isset($_POST['SiteUser']))\n\t\t{\n\t\t\t$record->attributes=$_POST['SiteUser'];\n\t\t\n\t\t\t\n\n\t\t\tModeratorLogHelper::AddToLog('edited-user-'.$record->id,'Изменены данные пользователя '.$record->email,null,$record->id);\n\t\t\tif($record->save())\n\t\t\t\t$this->redirect(array('personal'));\n\t\t}\n\t\t\n\t\t$this->render('settings',array('user'=>$record));\n\t}", "abstract public function getSettings();", "public static function load()\n {\n $files = glob(BASEDIR . '/config/*.php');\n foreach ($files as $file){\n $key = str_replace('.php', '', basename($file));\n static::$values[$key] = include $file;\n }\n }", "public function settings()\n {\n $user = Auth::user();\n return view('admin.users.setting', compact('user'));\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 }", "public function load()\n {\n if ($this->is_loaded()) {\n return;\n }\n\n foreach($this->get_shortcodes() as $shortcode) {\n $this->register_shortcode($shortcode);\n }\n\n foreach ($this->get_subscribers() as $subscriber) {\n $this->event_manager->add_subscriber($subscriber);\n }\n \n // Settings Page\n $settings_page = new CommentIQ_Admin_Settings();\n $settings_page->run();\n\n $this->loaded = true;\n }", "function getSessionSettings(){\n\t\t\t$this->Init();\n\n\t\t\treturn array(\n\t\t\t\t\t\t\"lang\"=>$this->get(\"global/language\",LANG),\n\t\t\t\t\t\t\"color\"=>$this->get(\"global/theme_color\",THEME_COLOR)\n\t\t\t\t);\n\t\t}", "public static function getSettings()\n {\n return Settings::getSettings();\n }", "public function getSettings()\n {\n return Initiatives::getInstance()->getSettings();\n }", "public function fetchSettings()\n {\n return $this->store->fetch();\n }", "function getAllSettings()\n\t\t{\n\t\t\t\n\t\t\ttry{\n\n\t\t\t\t$query = $this->_db->prepare( \"SELECT * FROM settings\" );\n\n\t\t\t\t$query->execute();\n\n\t\t\t\t$data = $query->fetchAll();\n\t\t\t\t\n\t\t\t\tforeach( $data as $setting )\n\t\t\t\t{\n\t\t\t\t\n\t\t\t\t\t$settings[ $setting[ \"settings_key\" ] ] = $setting[ \"settings_value\" ];\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn $settings;\n\n\t\t\t} catch ( PDOException $e ) {\n\n\t\t\t\techo $e->getMessage();\n\n\t\t\t}\n\t\t\t\n\t\t}", "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 }", "function saveSettings()\n {\n\t if ( wfReadOnly() ) {\n\t\treturn;\n\t }\n\t if ( 0 == $this->mCedarId ) {\n\t\treturn;\n\t }\n\t \n\t $dbw =& wfGetDB( DB_MASTER );\n\t $dbw->update( 'cedar_user_info',\n\t\t array( /* SET */\n\t\t\t 'user_id' => $this->mId,\n\t\t\t 'organization' => $this->mOrg,\n\t\t\t 'address1' => $this->mAddress1,\n\t\t\t 'address2' => $this->mAddress2,\n\t\t\t 'city' => $this->mCity,\n\t\t\t 'state' => $this->mState,\n\t\t\t 'country' => $this->mCountry,\n\t\t\t 'postal_code' => $this->mPostalCode,\n\t\t\t 'phone' => $this->mPhone,\n\t\t\t 'mobile_phone' => $this->mMobilePhone,\n\t\t\t 'fax' => $this->mFax,\n\t\t\t 'supervisor_name' => $this->mSupervisorName,\n\t\t\t 'supervisor_email' => $this->mSupervisorEmail\n\t\t ), array( /* WHERE */\n\t\t\t 'user_info_id' => $this->mCedarId\n\t\t ), __METHOD__\n\t );\n\t $this->clearSharedCache();\n }", "public function load_config() {\n if (!isset($this->config)) {\n $settingspluginname = 'assessmentsettings';\n $this->config = get_config(\"local_$settingspluginname\");\n }\n }", "function get_settings()\n\t{\n\t\t$this->settings = array();\n\t\t\n\t\treturn true;\n\t}", "function wassupoptions() {\n\t\t//# initialize class variables with current options \n\t\t//# or with defaults if none\n\t\t$this->loadSettings();\n\t}", "public function __loadUser()\n {\n\t$facebook = $this->fb;\n\t$this->user = $facebook->api(\"/me\", \"GET\");\n\t$this->userid = $facebook->getUser();\n\treturn;\n }", "private static function setup() {\n if(!isset(self::$settings)) {\n require 'regain/global_settings.php';\n self::$settings = $settings;\n }\n }" ]
[ "0.74938136", "0.74524033", "0.7412404", "0.7350385", "0.7350385", "0.73496497", "0.7174167", "0.71131295", "0.7061629", "0.697353", "0.691621", "0.6778691", "0.6764884", "0.67509246", "0.65682435", "0.65356743", "0.6527539", "0.65065765", "0.64947325", "0.6486868", "0.6479693", "0.6476205", "0.64510685", "0.64485735", "0.6399266", "0.6355162", "0.6317841", "0.62470853", "0.6196362", "0.619392", "0.6143311", "0.6104522", "0.61009306", "0.6100508", "0.60907894", "0.6046398", "0.59974205", "0.59895444", "0.59850436", "0.5974263", "0.596027", "0.59589225", "0.5955937", "0.59557706", "0.59524125", "0.5944578", "0.59388155", "0.59217215", "0.5907639", "0.5901113", "0.5890249", "0.5876982", "0.5865091", "0.58635813", "0.5853928", "0.58492684", "0.5837172", "0.58345914", "0.5821833", "0.5811456", "0.5799854", "0.57947403", "0.57701284", "0.5755461", "0.5751213", "0.57493144", "0.57329273", "0.5730458", "0.5727739", "0.57089174", "0.5700849", "0.56932884", "0.5692348", "0.56895053", "0.5688437", "0.5686917", "0.56842345", "0.56802666", "0.56578773", "0.5656026", "0.56506014", "0.5640613", "0.56359076", "0.5624158", "0.561158", "0.5609753", "0.55997473", "0.55969334", "0.55864215", "0.55748916", "0.5574055", "0.55681753", "0.5567594", "0.55664426", "0.555939", "0.55590105", "0.555684", "0.5548586", "0.554593", "0.55452245" ]
0.6553745
15
Save the settings for the currently active user. Is called every time any setting changes. The triggerkey can be used for selectively saving only the modified setting. But most backends should simply JSONencode the whole $userSettings array and store that string.
public function saveUserSettings (array $userSettings, $triggerKey) { // Store the settings as a JSON blob. $encodedData = json_encode($userSettings); $this->_setUserKey($this->_username, self::SETTINGS, $encodedData); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function SaveSettings()\n\t{\n\t\t$this->GetDb();\n\n\t\t$tempSettings = $this->Db->Quote(serialize($this->settings));\n\t\t$tempUserID = intval($this->userid);\n\n\t\t$query = \"\n\t\t\tUPDATE [|PREFIX|]users\n\t\t\tSET settings='{$tempSettings}'\n\t\t\tWHERE userid={$tempUserID}\n\t\t\";\n\n\t\t$result = $this->Db->Query($query);\n\t\tif (!$result) {\n\t\t\tlist($error, $level) = $this->Db->GetError();\n\t\t\ttrigger_error($error, $level);\n\t\t\treturn false;\n\t\t}\n\n\t\t$currentUser = IEM::userGetCurrent();\n\t\tif ($currentUser && $currentUser->userid == $this->userid) {\n\t\t\tIEM::userFlushCache();\n\t\t}\n\n\t\treturn true;\n\t}", "function saveSettings()\n {\n\t if ( wfReadOnly() ) {\n\t\treturn;\n\t }\n\t if ( 0 == $this->mCedarId ) {\n\t\treturn;\n\t }\n\t \n\t $dbw =& wfGetDB( DB_MASTER );\n\t $dbw->update( 'cedar_user_info',\n\t\t array( /* SET */\n\t\t\t 'user_id' => $this->mId,\n\t\t\t 'organization' => $this->mOrg,\n\t\t\t 'address1' => $this->mAddress1,\n\t\t\t 'address2' => $this->mAddress2,\n\t\t\t 'city' => $this->mCity,\n\t\t\t 'state' => $this->mState,\n\t\t\t 'country' => $this->mCountry,\n\t\t\t 'postal_code' => $this->mPostalCode,\n\t\t\t 'phone' => $this->mPhone,\n\t\t\t 'mobile_phone' => $this->mMobilePhone,\n\t\t\t 'fax' => $this->mFax,\n\t\t\t 'supervisor_name' => $this->mSupervisorName,\n\t\t\t 'supervisor_email' => $this->mSupervisorEmail\n\t\t ), array( /* WHERE */\n\t\t\t 'user_info_id' => $this->mCedarId\n\t\t ), __METHOD__\n\t );\n\t $this->clearSharedCache();\n }", "function save_settings(array $settings)\n {\n //if user is not active do not log changes\n if ($user = user()){\n $logs = [];\n foreach ($settings as $key => $value){\n //changed\n if (!settings($key) || settings($key) != $value){\n $old_val = settings($key);\n $logs[] = \"$user changed setting: '{$key}' from '{$old_val}' to '{$value}'\";\n }\n }\n }\n\n //sync settings and save\n \\Setting::set($settings);\n \\Setting::save();\n\n //log any changes\n if (!empty($logs))\n event(new \\App\\Events\\SettingsChanged($logs, $user));\n\n return $settings;\n }", "public function Save() {\n\t\t\n\t\tglobal $sql;\n\t\tforeach( $this->settings as $option => $value ) {\n\t\t\t\n\t\t\t$this->update_option( $option, $value, $this->username );\n\t\t}\n\t}", "public function saveSettings()\n {\n if (empty($this->settings)) {\n $this->loadSettings();\n }\n \n $this->saveJSON($this->settings);\n }", "public function save_settings()\n\t{\n\t\t// Create settings array.\n\t\t$settings = array();\n\n\t\t// Loop through default settings and check for saved values.\n\t\tforeach (ee()->simple_cloner_settings->_default_settings as $key => $value)\n\t\t{\n\t\t\tif(($settings[$key] = ee()->input->post($key)) == FALSE)\n\t\t\t{\n\t\t\t\t$settings[$key] = $value;\n\t\t\t}\n\t\t}\n\n\t\t// Serialize settings array and update the extensions table.\n\t\tee()->db->where('class', $this->class_name.'_ext');\n\t\tee()->db->update('extensions', array('settings' => serialize($settings)));\n\n\t\t// Create alert when settings are saved and redirect back to settings page.\n\t\tee('CP/Alert')->makeInline('simple-cloner-save')\n\t\t\t->asSuccess()\n\t\t\t->withTitle(lang('message_success'))\n\t\t\t->addToBody(lang('preferences_updated'))\n\t\t\t->defer();\n\n\t\tee()->functions->redirect(ee('CP/URL')->make('addons/settings/simple_cloner'));\n\t}", "public function saveSettings()\n\t{\n\t\t$this->ensureAuthed();\n\t\t$input = Input::getInstance();\n\t\t$settings = $input->getInput('settings');\n\t\t$settingsManager = Settings::getInstance();\n\t\t$settingsManager->setSettings($this->username, $settings);\n\t\treturn true;\n\t}", "public function saveSettings($settings)\n {\n\n $db = $this->getDb();\n $user = $this->getUser();\n $cache = $this->getL1Cache();\n\n $settingsLoader = new LibUserSettings($db, $user, $cache);\n $settingsLoader->saveUserSetting(EUserSettingType::MESSAGES, $settings);\n\n }", "function saveSettings()\n\t\t{\n\t\t\t$this->Init();\n\n\t\t\t$this->saveExternalSettings();\n\t\t\t\n\t\t\t$settings = serialize(array(\"settings\"=>$this->settings));\n\t\n\t\n\t\t\t$stream = mapi_openpropertytostream($this->store, PR_EC_WEBACCESS_SETTINGS, MAPI_CREATE | MAPI_MODIFY);\n\t\t\tmapi_stream_setsize($stream, strlen($settings));\n\t\t\tmapi_stream_seek($stream, 0, STREAM_SEEK_SET);\n\t\t\tmapi_stream_write($stream, $settings);\n\t\t\tmapi_stream_commit($stream);\n\t\n\t\t\tmapi_savechanges($this->store);\n\t\n\t\t\t// reload settings from store...\n\t\t\t$this->retrieveSettings();\n\t\t}", "public function dokan_live_chat_save_seller_settings( $user_id ) {\n if ( ! isset( $_POST['_wpnonce'] ) || ! wp_verify_nonce( sanitize_key( $_POST['_wpnonce'] ), 'dokan_store_settings_nonce' ) ) {\n return;\n }\n\n if ( ! isset( $_POST['live_chat'] ) ) {\n return;\n }\n\n $store_info = dokan_get_store_info( $user_id );\n $store_info['live_chat'] = isset( $_POST['live_chat'] ) ? wc_clean( wp_unslash( $_POST['live_chat'] ) ) : '';\n $store_info['fb_page_id'] = isset( $_POST['fb_page_id'] ) ? wc_clean( wp_unslash( $_POST['fb_page_id'] ) ) : '';\n $store_info['tawkto_property_id'] = isset( $_POST['tawkto_property_id'] ) ? wc_clean( wp_unslash( $_POST['tawkto_property_id'] ) ) : '';\n $store_info['tawkto_widget_id'] = isset( $_POST['tawkto_widget_id'] ) ? wc_clean( wp_unslash( $_POST['tawkto_widget_id'] ) ) : '';\n $store_info['whatsapp_number'] = isset( $_POST['whatsapp_number'] ) ? wc_clean( wp_unslash( $_POST['whatsapp_number'] ) ) : '';\n\n update_user_meta( $user_id, 'dokan_profile_settings', $store_info );\n }", "function save_settings() {\n\t\t$this->update_option( static::SETTINGS_KEY, $this->settings );\n\t}", "public function saveSettings() {\n\t\t\tif ( isset( $_POST['muut_settings_save'] )\n\t\t\t\t&& $_POST['muut_settings_save'] == 'true'\n\t\t\t\t&& check_admin_referer( 'muut_settings_save', 'muut_settings_nonce' )\n\t\t\t) {\n\t\t\t\t$this->submittedSettings = $_POST['setting'];\n\n\t\t\t\t$settings = $this->settingsValidate( $this->getSubmittedSettings() );\n\n\t\t\t\t// Save all the options by passing an array into setOption.\n\t\t\t\tif ( muut()->setOption( $settings ) ) {\n\t\t\t\t\tif ( !empty( $this->errorQueue ) ) {\n\t\t\t\t\t\t// Display partial success notice if they were updated or matched the previous settings.\n\t\t\t\t\t\tmuut()->queueAdminNotice( 'updated', __( 'Settings successfully saved, other than the errors listed.', 'muut' ) );\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Display success notice if they were updated or matched the previous settings.\n\t\t\t\t\t\tmuut()->queueAdminNotice( 'updated', __( 'Settings successfully saved.', 'muut' ) );\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// Display error if the settings failed to save.\n\t\t\t\t\tmuut()->queueAdminNotice( 'error', __( 'Failed to save settings.', 'muut' ) );\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public function save_settings()\n {\n if(isset($_POST) && isset($_POST['api_settings'])) {\n $data = $_POST['api_settings'];\n update_option('api_settings', json_encode($data));\n }\n }", "public function save_settings($settings)\n {\n }", "public function saveSettings()\n {\n $this->store->save($this->data);\n }", "function notification_user_settings_save() {\n\tglobal $CONFIG;\n\t//@todo Wha??\n\tinclude($CONFIG->path . \"actions/notifications/settings/usersettings/save.php\");\n}", "function saveSettings() {\n\tglobal $settings;\n\n\tfile_put_contents(\"settings.json\",json_encode($settings));\n}", "public function settings_save()\n {\n $method = rcube_utils::get_input_value('_method', rcube_utils::INPUT_POST);\n $data = @json_decode(rcube_utils::get_input_value('_data', rcube_utils::INPUT_POST), true);\n\n $rcmail = rcmail::get_instance();\n $storage = $this->get_storage($rcmail->get_user_name());\n $success = false;\n $errors = 0;\n $save_data = array();\n\n if ($driver = $this->get_driver($method)) {\n if ($data === false) {\n if ($this->check_secure_mode()) {\n // remove method from active factors and clear stored settings\n $success = $driver->clear();\n }\n else {\n $errors++;\n }\n }\n else {\n // verify the submitted code before saving\n $verify_code = rcube_utils::get_input_value('_verify_code', rcube_utils::INPUT_POST);\n $timestamp = intval(rcube_utils::get_input_value('_timestamp', rcube_utils::INPUT_POST));\n if (!empty($verify_code)) {\n if (!$driver->verify($verify_code, $timestamp)) {\n $this->api->output->command('plugin.verify_response', array(\n 'id' => $driver->id,\n 'method' => $driver->method,\n 'success' => false,\n 'message' => str_replace('$method', $this->gettext($driver->method), $this->gettext('codeverificationfailed'))\n ));\n $this->api->output->send();\n }\n }\n\n foreach ($data as $prop => $value) {\n if (!$driver->set($prop, $value)) {\n $errors++;\n }\n }\n\n $driver->set('active', true);\n }\n\n // commit changes to the user properties\n if (!$errors) {\n if ($success = $driver->commit()) {\n $save_data = $data !== false ? $this->format_props($driver->props()) : array();\n }\n else {\n $errors++;\n }\n }\n }\n\n if ($success) {\n $this->api->output->show_message($data === false ? $this->gettext('factorremovesuccess') : $this->gettext('factorsavesuccess'), 'confirmation');\n $this->api->output->command('plugin.save_success', array(\n 'method' => $method,\n 'active' => $data !== false,\n 'id' => $driver->id) + $save_data);\n }\n else if ($errors) {\n $this->api->output->show_message($this->gettext('factorsaveerror'), 'error');\n $this->api->output->command('plugin.reset_form', $method);\n }\n\n $this->api->output->send();\n }", "function saveSettings() {\n\t\t//# convert class variables into an array and save using\n\t\t//# Wordpress functions, \"update_option\" or \"add_option\"\n\t\t//#convert class into array...\n\t\t$settings_array = array();\n\t\t$obj = $this;\n\t\tforeach (array_keys(get_class_vars(get_class($obj))) as $k){\n\t\t\tif (is_array($obj->$k)) {\n\t\t\t\t//serialize any arrays within $obj\n\t\t\t\tif (count($obj->$k)>0) {\n\t\t\t\t\t$settings_array[$k] = esc_attr(serialize($obj->$k));\n\t\t\t\t} else {\n\t\t\t\t\t$settings_array[$k] = \"\";\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$settings_array[$k] = \"{$obj->$k}\";\n\t\t\t}\n\t\t}\n\t\t//#save array to options table...\n\t\t$options_check = get_option('wassup_settings');\n\t\tif (!empty($options_check)) {\n\t\t\tupdate_option('wassup_settings', $settings_array);\n\t\t} else {\n\t\t\tadd_option('wassup_settings', $settings_array, 'Options for WassUp');\n\t\t}\n\t\treturn true;\n\t}", "public function save_settings()\n\t{\n\t\tif ( $_POST && wp_verify_nonce( $_POST['save-confirm-user-registration-settings-nonce'], 'save-confirm-user-registration-settings' ) ) :\n\t\t\t$options = array(\n\t\t\t\t'error' => $_POST['error'],\n\t\t\t\t'from' => $_POST['from'],\n\t\t\t\t'subject' => $_POST['subject'],\n\t\t\t\t'message' => $_POST['message']\n\t\t\t);\n\n\t\t\t$options = apply_filters( 'confirm-user-registration-save-options', $options );\n\t\t\tupdate_site_option( 'confirm-user-registration', $options);\n\n\t\t\t?>\n\t\t\t<div class=\"updated message\">\n\t\t\t\t<p><?php _e( 'Saved' ); ?></p>\n\t\t\t</div>\n\t\t\t<?php\n\t\tendif;\n\t}", "public function setUserSettings($userSettings) {\n\t\t$this->_userSettings = (array)$userSettings;\n\t}", "public function user_settings($public_key) {\n\t\tif($this->Auth->user('public_key') != $public_key) {\n\t\t\t$this->Session->setFlash('Those are not your settings to change.');\n\t\t\t$this->redirect('/');\t\n\t\t}\n\t\t$this->recursive = -1;\n\t\t\n\t\t$user = $this->User->find(\n\t\t\t'first', array(\n\t\t\t\t'conditions' => array(\n\t\t\t\t\t'public_key' => $public_key\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\t\t\n\t\tif(!empty($this->request->data)) {\n\t\t\t\n\t\t\t\n\t\t\t$data['User']['location'] = $this->request->data['User']['location'];\n\t\t\t$data['User']['website'] = $this->request->data['User']['website'];\n\t\t\t$data['User']['info'] = $this->request->data['User']['info'];\n\t\t\t$data['User']['id'] = $this->Auth->user('id');\n\t\t\tif($this->Auth->password($this->request->data['User']['current_password']) == $user['User']['password']) {\n\t\t\t\t\t\n\t\t\t\t$data['User']['password'] = $this->request->data['User']['password'];\n\t\t\t\t$data['User']['password_confirmation'] = $this->request->data['User']['password_confirmation'];\t\t\t\n\t\t\t\t$this->User->id = $this->Auth->user('id');\n\t\t\t\t\n\t\t\t\tif($this->User->save($data))\n\t\t\t\t\t$this->Session->setFlash('Settings updated!');\n\t\t\t\telse \n\t\t\t\t\t$this->Session->setFlash('Something is wrong. Settings are not updated');\n\t\t\t\t\t\n\t\t\t}elseif(empty($this->request->data['User']['old_password'])) {\n\t\t\t\tif($this->User->save($data))\n\t\t\t\t\t$this->Session->setFlash('Settings updated, except password.');\n\t\t\t\telse \n\t\t\t\t\t$this->Session->setFlash('Something is wrong. Settings are not updated');\t\n\t\t\t}else {\n\t\t\t\t$this->Session->setFlash('Old Password incorrect. Settings remain unchanged.');\n\t\t\t\t$this->redirect(Controller::referer('/'));\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t$user = $this->User->find(\n\t\t\t'first', array(\n\t\t\t\t'conditions' => array(\n\t\t\t\t\t'public_key' => $public_key\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\t\t\n\t\t$this -> set('title_for_layout', $user['User']['username']);\n\t\t$this->set('user_info', $user);\n\t\t\n\t}", "public function save_settings() {\n\n\t\twoocommerce_update_options( $this->get_settings() );\n\t}", "public function save_settings( $settings = array() ) {\n\t\tglobal $socialflow;\n\t\t$socialflow_params = filter_input_array( INPUT_POST );\n\t\t$settings = empty( $settings ) ? array() : $settings;\n\n\t\t// Merge current settings (we need to store account information which is not stored in the fields).\n\t\t$settings = $socialflow->array_merge_recursive( $socialflow->options->options, $settings );\n\n\t\t// Allow plugins/modules to add/modify settings when having post request.\n\t\t$settings = isset( $socialflow_params['socialflow'] ) ? apply_filters( 'sf_save_settings', $settings ) : $settings;\n\n\t\treturn $settings;\n\t}", "public function updateSettings(User $user, array $data);", "public function save_settings( $settings ) {\n\t\t$settings['_multiwidget'] = 1;\n\t\tupdate_option( $this->option_name, $settings );\n\t}", "public function updraft_ajax_savesettings() {\n\t\ttry {\n\t\t\tif (empty($_POST) || empty($_POST['subaction']) || 'savesettings' != $_POST['subaction'] || !isset($_POST['nonce']) || !is_user_logged_in() || !UpdraftPlus_Options::user_can_manage() || !wp_verify_nonce($_POST['nonce'], 'updraftplus-settings-nonce')) die('Security check');\n\t\n\t\t\tif (empty($_POST['settings']) || !is_string($_POST['settings'])) die('Invalid data');\n\t\n\t\t\tparse_str(stripslashes($_POST['settings']), $posted_settings);\n\t\t\t// We now have $posted_settings as an array\n\t\t\tif (!empty($_POST['updraftplus_version'])) $posted_settings['updraftplus_version'] = $_POST['updraftplus_version'];\n\t\t\t\n\t\t\techo json_encode($this->save_settings($posted_settings));\n\t\t} catch (Exception $e) {\n\t\t\t$log_message = 'PHP Fatal Exception error ('.get_class($e).') has occurred during save settings. Error Message: '.$e->getMessage().' (Code: '.$e->getCode().', line '.$e->getLine().' in '.$e->getFile().')';\n\t\t\terror_log($log_message);\n\t\t\techo json_encode(array(\n\t\t\t\t'fatal_error' => true,\n\t\t\t\t'fatal_error_message' => $log_message\n\t\t\t));\n\t\t// @codingStandardsIgnoreLine\n\t\t} catch (Error $e) {\n\t\t\t$log_message = 'PHP Fatal error ('.get_class($e).') has occurred during save settings. Error Message: '.$e->getMessage().' (Code: '.$e->getCode().', line '.$e->getLine().' in '.$e->getFile().')';\n\t\t\terror_log($log_message);\n\t\t\techo json_encode(array(\n\t\t\t\t'fatal_error' => true,\n\t\t\t\t'fatal_error_message' => $log_message\n\t\t\t));\n\t\t}\n\t\tdie;\n\t}", "public function settings()\r\n {\r\n if ($this->request->is('post')) {\r\n\r\n $settingsChanged = false;\r\n\r\n $userId = $this->Session->read('Auth.User.id');\r\n\r\n $this->User->id = $userId;\r\n\r\n if ($this->request->data['User']['Clear All']) {\r\n $this->User->Reminder->deleteAll(\r\n array('Reminder.user_id' => $this->Session->read('Auth.User.id'), false)\r\n );\r\n }\r\n\r\n if (!empty($this->request->data['User']['email'])) {\r\n\r\n $this->User->set($this->request->data);\r\n $this->OpauthUser->set($this->request->data);\r\n\r\n $validUser = $this->User->validates(array('fieldList' => array('email')));\r\n $validOpauth = $this->OpauthUser->validates(array('fieldList' => array('email')));\r\n\r\n if ($this->Session->read('User.authType') == 'opauth') {\r\n\r\n $this->OpauthUser->id = $userId;\r\n\r\n if ($validOpauth && $validUser) {\r\n $this->OpauthUser->saveField('email', $this->request->data['User']['email'], false);\r\n $settingsChanged = true;\r\n }\r\n\r\n } else {\r\n\r\n if ($validUser && $validOpauth) {\r\n $this->User->saveField('email', $this->request->data['User']['email'], false);\r\n $settingsChanged = true;\r\n }\r\n }\r\n }\r\n\r\n if (!empty($this->request->data['User']['password'])) {\r\n\r\n if ($this->User->saveField('password', $this->request->data['User']['password'], true)) {\r\n $settingsChanged = true;\r\n }\r\n }\r\n\r\n if ($this->request->data['User']['timezone'] !== \"empty\") {\r\n\r\n if ($this->Session->read('User.authType') == 'opauth') {\r\n\r\n $this->OpauthUser->id = $userId;\r\n\r\n if ($this->OpauthUser->saveField('timezone', $this->request->data['User']['timezone'], false)) {\r\n $this->Session->write('Auth.User.timezone', $this->request->data['User']['timezone']);\r\n $settingsChanged = true;\r\n }\r\n\r\n } else {\r\n if ($this->User->saveField('timezone', $this->request->data['User']['timezone'], true)) {\r\n $this->Session->write('Auth.User.timezone', $this->request->data['User']['timezone']);\r\n $settingsChanged = true;\r\n }\r\n }\r\n }\r\n\r\n if ($this->request->data['User']['Clear All']) {\r\n $settingsChanged = true;\r\n $this->Session->setFlash('Cleared all reminders', 'successFlash');\r\n }\r\n\r\n if ($settingsChanged) {\r\n $this->Session->setFlash('Settings Changed', 'successFlash');\r\n\r\n } else {\r\n $this->Session->setFlash('Nothing to update', 'failureFlash');\r\n }\r\n }\r\n }", "public function update(UserSettingsRequest $request)\n {\n $input = $request->except(['_method', '_token']);\n\n foreach ($input as $key => $value) {\n\n setting()->set(\n $key,\n $value\n );\n setting()->setExtraColumns(['user_id' => auth()->user()->id]);\n }\n setting()->save();\n\n return redirect(route('settings.index'))->with('message', 'Settings have been saved!');\n }", "public function save_settings($settings) {\n\t\n\t\tglobal $updraftplus;\n\t\t\n\t\t// Make sure that settings filters are registered\n\t\tUpdraftPlus_Options::admin_init();\n\t\t\n\t\t$more_files_path_updated = false;\n\n\t\tif (isset($settings['updraftplus_version']) && $updraftplus->version == $settings['updraftplus_version']) {\n\n\t\t\t$return_array = array('saved' => true);\n\t\t\t\n\t\t\t$add_to_post_keys = array('updraft_interval', 'updraft_interval_database', 'updraft_interval_increments', 'updraft_starttime_files', 'updraft_starttime_db', 'updraft_startday_files', 'updraft_startday_db');\n\t\t\t\n\t\t\t// If database and files are on same schedule, override the db day/time settings\n\t\t\tif (isset($settings['updraft_interval_database']) && isset($settings['updraft_interval_database']) && $settings['updraft_interval_database'] == $settings['updraft_interval'] && isset($settings['updraft_starttime_files'])) {\n\t\t\t\t$settings['updraft_starttime_db'] = $settings['updraft_starttime_files'];\n\t\t\t\t$settings['updraft_startday_db'] = $settings['updraft_startday_files'];\n\t\t\t}\n\t\t\tforeach ($add_to_post_keys as $key) {\n\t\t\t\t// For add-ons that look at $_POST to find saved settings, add the relevant keys to $_POST so that they find them there\n\t\t\t\tif (isset($settings[$key])) {\n\t\t\t\t\t$_POST[$key] = $settings[$key];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Check if updraft_include_more_path is set, if it is then we need to update the page, if it's not set but there's content already in the database that is cleared down below so again we should update the page.\n\t\t\t$more_files_path_updated = false;\n\n\t\t\t// i.e. If an option has been set, or if it was currently active in the settings\n\t\t\tif (isset($settings['updraft_include_more_path']) || UpdraftPlus_Options::get_updraft_option('updraft_include_more_path')) {\n\t\t\t\t$more_files_path_updated = true;\n\t\t\t}\n\t\t\t\n\t\t\t// Wipe the extra retention rules, as they are not saved correctly if the last one is deleted\n\t\t\tUpdraftPlus_Options::update_updraft_option('updraft_retain_extrarules', array());\n\t\t\tUpdraftPlus_Options::update_updraft_option('updraft_email', array());\n\t\t\tUpdraftPlus_Options::update_updraft_option('updraft_report_warningsonly', array());\n\t\t\tUpdraftPlus_Options::update_updraft_option('updraft_report_wholebackup', array());\n\t\t\tUpdraftPlus_Options::update_updraft_option('updraft_extradbs', array());\n\t\t\tUpdraftPlus_Options::update_updraft_option('updraft_include_more_path', array());\n\t\t\t\n\t\t\t$relevant_keys = $updraftplus->get_settings_keys();\n\n\t\t\tif (isset($settings['updraft_auto_updates']) && in_array('updraft_auto_updates', $relevant_keys)) {\n\t\t\t\t$updraftplus->set_automatic_updates($settings['updraft_auto_updates']);\n\t\t\t\tunset($settings['updraft_auto_updates']); // unset the key and its value to prevent being processed the second time\n\t\t\t}\n\n\t\t\tif (method_exists('UpdraftPlus_Options', 'mass_options_update')) {\n\t\t\t\t$original_settings = $settings;\n\t\t\t\t$settings = UpdraftPlus_Options::mass_options_update($settings);\n\t\t\t\t$mass_updated = true;\n\t\t\t}\n\n\t\t\tforeach ($settings as $key => $value) {\n\n\t\t\t\tif (in_array($key, $relevant_keys)) {\n\t\t\t\t\tif ('updraft_service' == $key && is_array($value)) {\n\t\t\t\t\t\tforeach ($value as $subkey => $subvalue) {\n\t\t\t\t\t\t\tif ('0' == $subvalue) unset($value[$subkey]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// This flag indicates that either the stored database option was changed, or that the supplied option was changed before being stored. It isn't comprehensive - it's only used to update some UI elements with invalid input.\n\t\t\t\t\t$updated = empty($mass_updated) ? (is_string($value) && UpdraftPlus_Options::get_updraft_option($key) != $value) : (is_string($value) && (!isset($original_settings[$key]) || $original_settings[$key] != $value));\n\n\t\t\t\t\tif (empty($mass_updated)) UpdraftPlus_Options::update_updraft_option($key, $value);\n\t\t\t\t\t\n\t\t\t\t\t// Add information on what has changed to array to loop through to update links etc.\n\t\t\t\t\t// Restricting to strings for now, to prevent any unintended leakage (since this is just used for UI updating)\n\t\t\t\t\tif ($updated) {\n\t\t\t\t\t\t$value = UpdraftPlus_Options::get_updraft_option($key);\n\t\t\t\t\t\tif (is_string($value)) $return_array['changed'][$key] = $value;\n\t\t\t\t\t}\n\t\t\t\t// @codingStandardsIgnoreLine\n\t\t\t\t} else {\n\t\t\t\t\t// This section is ignored by CI otherwise it will complain the ELSE is empty.\n\t\t\t\t\t\n\t\t\t\t\t// When last active, it was catching: option_page, action, _wpnonce, _wp_http_referer, updraft_s3_endpoint, updraft_dreamobjects_endpoint. The latter two are empty; probably don't need to be in the page at all.\n\t\t\t\t\t// error_log(\"Non-UD key when saving from POSTed data: \".$key);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t$return_array = array('saved' => false, 'error_message' => sprintf(__('UpdraftPlus seems to have been updated to version (%s), which is different to the version running when this settings page was loaded. Please reload the settings page before trying to save settings.', 'updraftplus'), $updraftplus->version));\n\t\t}\n\t\t\n\t\t// Checking for various possible messages\n\t\t$updraft_dir = $updraftplus->backups_dir_location(false);\n\t\t$really_is_writable = UpdraftPlus_Filesystem_Functions::really_is_writable($updraft_dir);\n\t\t$dir_info = $this->really_writable_message($really_is_writable, $updraft_dir);\n\t\t$button_title = esc_attr(__('This button is disabled because your backup directory is not writable (see the settings).', 'updraftplus'));\n\t\t\n\t\t$return_array['backup_now_message'] = $this->backup_now_remote_message();\n\t\t\n\t\t$return_array['backup_dir'] = array('writable' => $really_is_writable, 'message' => $dir_info, 'button_title' => $button_title);\n\n\t\t// Check if $more_files_path_updated is true, is so then there's a change and we should update the backup modal\n\t\tif ($more_files_path_updated) {\n\t\t\t$return_array['updraft_include_more_path'] = $this->files_selector_widgetry('backupnow_files_', false, 'sometimes');\n\t\t}\n\t\t\n\t\t// Because of the single AJAX call, we need to remove the existing UD messages from the 'all_admin_notices' action\n\t\tremove_all_actions('all_admin_notices');\n\t\t\n\t\t// Moving from 2 to 1 ajax call\n\t\tob_start();\n\n\t\t$service = UpdraftPlus_Options::get_updraft_option('updraft_service');\n\t\t\n\t\t$this->setup_all_admin_notices_global($service);\n\t\t$this->setup_all_admin_notices_udonly($service);\n\t\t\n\t\tdo_action('all_admin_notices');\n\t\t\n\t\tif (!$really_is_writable) { // Check if writable\n\t\t\t$this->show_admin_warning_unwritable();\n\t\t}\n\t\t\n\t\tif ($return_array['saved']) { //\n\t\t\t$this->show_admin_warning(__('Your settings have been saved.', 'updraftplus'), 'updated fade');\n\t\t} else {\n\t\t\tif (isset($return_array['error_message'])) {\n\t\t\t\t$this->show_admin_warning($return_array['error_message'], 'error');\n\t\t\t} else {\n\t\t\t\t$this->show_admin_warning(__('Your settings failed to save. Please refresh the settings page and try again', 'updraftplus'), 'error');\n\t\t\t}\n\t\t}\n\t\t\n\t\t$messages_output = ob_get_contents();\n\t\t\n\t\tob_clean();\n\t\t\n\t\t// Backup schedule output\n\t\t$this->next_scheduled_backups_output('line');\n\t\t\n\t\t$scheduled_output = ob_get_clean();\n\t\t\n\t\t$return_array['messages'] = $messages_output;\n\t\t$return_array['scheduled'] = $scheduled_output;\n\t\t$return_array['files_scheduled'] = $this->next_scheduled_files_backups_output(true);\n\t\t$return_array['database_scheduled'] = $this->next_scheduled_database_backups_output(true);\n\t\t\n\t\t\n\t\t// Add the updated options to the return message, so we can update on screen\n\t\treturn $return_array;\n\t\t\n\t}", "public static function write($user_id, $key, $value) {\n\t\t$opts = [\n\t\t\t'type' => 'first',\n\t\t\t'conditions' => [\n\t\t\t\t'Usersetting.user_id' => $user_id,\n\t\t\t\t'Usersetting.setting' => $key\n\t\t\t]\n\t\t];\n\t\t$result = parent::$db->selectEx(new self(), $opts);\n\t\tif ($result) {\n\t\t\t//Check match\n\t\t\tif (strcmp($result['Usersetting']->value, $value) == 0) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\t//Update with new value\n\t\t\t$success = parent::updateData(new self(),\n\t\t\t\t['value' => $value],\n\t\t\t\t['user_id' => $user_id, 'setting' => $key]\n\t\t\t);\n\n\t\t\tif ($success) {\n\t\t\t\t//Create new record with old values and revision system\n\t\t\t\t$result['Usersetting'] = self::$app->obj2array($result['Usersetting']);\n\t\t\t\t$result['Usersetting']['revision_id'] = $result['Usersetting']['id'];\n\t\t\t\tunset($result['Usersetting']['id']);\n\t\t\t\tparent::insertData(new self(), $result['Usersetting']);\n\t\t\t}\n\n\t\t\treturn $success;\n\t\t}\n\n\t\t//Insert new result\n\t\treturn parent::insertData(new self(),\n\t\t\t['user_id' => $user_id, 'setting' => $key, 'value' => $value]\n\t\t);\n\t}", "public function saveSettingsSelling($settings,$user_group_id)\n {\n $table = Engine_Api::_()->getDbtable('sellingSettings', 'mp3music');\n $where = $table->getAdapter()->quoteInto('user_group_id = ?', $user_group_id);\n $table->delete($where);\n foreach($settings as $key=>$value)\n {\n if ($key != 'select_group_member') \n {\n $ss = $table->createRow(); \n $ss->user_group_id = $user_group_id; \n $ss->module_id = 'mp3music'; \n $ss->name = $key ; \n $ss->default_value = $value ;\n $ss->save();\n }\n }\n }", "public static function save_settings($settings = array())\n\t{\n\t\t//be sure to save all settings possible\n\t\t$_tmp_settings = array_merge(self::_get_default_settings(), $settings);\n\t\t//No way to do INSERT IF NOT EXISTS so...\n\t\tforeach ($_tmp_settings as $setting_name => $setting_value)\n\t\t{\n\t\t\t$query = ee()->db->get_where(self::$_settings_table_name, array('setting_name'=>$setting_name), 1, 0);\n\t\t\tif ($query->num_rows() == 0) {\n\t\t\t // A record does not exist, insert one.\n\t\t\t $query = ee()->db->insert(self::$_settings_table_name, array('setting_name' => $setting_name, 'setting_value' => $setting_value));\n\t\t\t} else {\n\t\t\t // A record does exist, update it.\n\t\t\t $query = ee()->db->update(self::$_settings_table_name, array('setting_value' => $setting_value), array('setting_name'=>$setting_name));\n\t\t\t}\n\t\t}\n\t\tself::$_settings = $_tmp_settings;\n\t}", "public static function updateUserSettings($value, $users)\n {\n\n\n $users->settings = JSON::encode($value);\n\n $users->save();\n\n JSON::buildJsonContent(\n 'success',\n 'ok'\n\n );\n\n }", "public function save_settings() {\n\n if (!isset($_REQUEST['action']) || !isset($_GET['page']))\n return;\n\n if ('swpm-settings' !== $_GET['page'])\n return;\n\n if ('swpm_settings' !== $_REQUEST['action'])\n return;\n\n check_admin_referer('swpm-update-settings');\n\n $data = array();\n\n foreach ($_POST['swpm-settings'] as $key => $val) {\n $data[$key] = esc_html($val);\n }\n\n update_option('swpm-settings', $data);\n }", "public function save_settings() {\n\n\t\tif ( !isset( $_REQUEST['action'] ) || !isset( $_GET['page'] ) )\n\t\t\treturn;\n\n\t\tif ( 'vfb-settings' !== $_GET['page'] )\n\t\t\treturn;\n\n\t\tif ( 'vfb_settings' !== $_REQUEST['action'] )\n\t\t\treturn;\n\n\t\tcheck_admin_referer( 'vfb-update-settings' );\n\n\t\t$data = array();\n\n\t\tforeach ( $_POST['vfb-settings'] as $key => $val ) {\n\t\t\t$data[ $key ] = esc_html( $val );\n\t\t}\n\n\t\tupdate_option( 'vfb-settings', $data );\n\t}", "function wp_set_all_user_settings($user_settings)\n {\n }", "public function saveSettings(){\n\n $vars = $this->getAllSubmittedVariablesByName();\n\n $vars['email'] = $this->email;\n $vars['firstname'] = $this->firstname;\n $vars['lastname'] = $this->lastname;\n $vars['real_name'] = $this->firstname .' ' .$this->lastname;\n $vars['phone'] = $this->phone;\n\n $vars['name'] = $this->firstname;\n $vars['surname'] = $this->lastname;\n $vars['screen_name'] = $this->firstname;\n\n\n $vars['about_my_artwork'] = $this->getSubmittedVariableByName('about_my_artwork');\n $vars['what_i_like_to_do'] = $this->getSubmittedVariableByName('what_i_like_to_do');\n $vars['experience'] = $this->getSubmittedVariableByName('experience');\n $vars['instructions'] = $this->getSubmittedVariableByName('instructions');\n $vars['aftercare'] = $this->getSubmittedVariableByName('aftercare');\n $vars['apprenticeship'] = $this->getSubmittedVariableByName('apprenticeship');\n\n $this->saveNamedVariables($vars);\n }", "public function save_user_settings() {\n \n // Check if data was submitted\n if ( $this->CI->input->post() ) {\n\n // Add form validation\n $this->CI->form_validation->set_rules('all_inputs', 'All Inputs', 'trim');\n $this->CI->form_validation->set_rules('all_options', 'All Options', 'trim');\n $this->CI->form_validation->set_rules('selected_options', 'Selected Options', 'trim');\n\n // Get data\n $all_inputs = $this->CI->input->post('all_inputs');\n $all_options = $this->CI->input->post('all_options');\n $selected_options = $this->CI->input->post('selected_options');\n\n // Check form validation\n if ($this->CI->form_validation->run() === false) {\n\n $data = array(\n 'success' => FALSE,\n 'message' => $this->CI->lang->line('an_error_occurred')\n );\n\n echo json_encode($data);\n\n } else {\n \n $allowed_metas = array(\n 'country',\n 'city',\n 'address',\n 'email_notifications',\n 'notification_tickets',\n 'display_activities',\n 'settings_delete_activities',\n '24_hour_format',\n 'invoices_by_email',\n 'user_language'\n );\n\n // Get apps and components\n $ca_options = md_the_user_component_options();\n\n // If options exists\n if ( $ca_options ) {\n\n // List all options\n foreach ( $ca_options as $ca_option ) {\n\n if ( !empty($ca_option['section_fields']) ) {\n\n foreach( $ca_option['section_fields'] as $field ) {\n $allowed_metas[] = $field['slug'];\n }\n\n }\n\n }\n\n }\n \n $count = 0;\n\n if ( $all_inputs ) {\n \n foreach( $all_inputs as $input ) {\n\n if ( $input[0] === 'email' ) {\n\n $email = trim($input[1]);\n\n if ( !filter_var( $email, FILTER_VALIDATE_EMAIL ) ) {\n\n $data = array(\n 'success' => FALSE,\n 'message' => $this->CI->lang->line('please_enter_valid_email')\n );\n\n echo json_encode($data);\n exit();\n\n } else {\n\n if ( $this->CI->user->check_email( $email, $this->CI->user_id ) ) {\n\n $data = array(\n 'success' => FALSE,\n 'message' => $this->CI->lang->line('please_enter_valid_email')\n );\n\n echo json_encode($data);\n exit();\n\n } else {\n\n $data = array(\n 'email' => $email\n );\n\n if ( $this->CI->base_model->update_ceil( 'users', array( 'user_id' => $this->CI->user_id ), $data ) ) {\n\n $count++;\n\n }\n\n }\n\n }\n\n } else if ( $input[0] === 'last_name' ) {\n\n $data = array(\n 'last_name' => $input[1]\n );\n\n if ( $this->CI->base_model->update_ceil( 'users', array( 'user_id' => $this->CI->user_id ), $data ) ) {\n\n $count++;\n\n }\n\n } else if ( $input[0] === 'first_name' ) {\n\n $data = array(\n 'first_name' => $input[1]\n );\n\n if ( $this->CI->base_model->update_ceil( 'users', array( 'user_id' => $this->CI->user_id ), $data ) ) {\n\n $count++;\n\n }\n\n } else if ( in_array( $input[0], $allowed_metas ) ) {\n\n if ( update_user_option($this->CI->user_id, $input[0], $input[1]) ) {\n\n $count++;\n\n }\n\n }\n\n }\n \n }\n \n if ( $all_options ) {\n \n foreach( $all_options as $option ) {\n\n if (in_array($option[0], $allowed_metas)) {\n\n if ( update_user_option($this->CI->user_id, $option[0], $option[1]) ) {\n\n $count++;\n }\n\n }\n\n }\n \n }\n \n if ( $selected_options ) {\n \n foreach( $selected_options as $selected ) {\n\n if (in_array($selected[0], $allowed_metas)) {\n\n if ( update_user_option($this->CI->user_id, $selected[0], $selected[1]) ) {\n\n $count++;\n }\n\n }\n\n } \n \n }\n \n if( $count ) {\n \n $data = array(\n 'success' => TRUE,\n 'message' => $this->CI->lang->line('the_changes_were_saved')\n );\n\n echo json_encode($data); \n \n } else {\n \n $data = array(\n 'success' => FALSE,\n 'message' => $this->CI->lang->line('the_changes_were_not_saved')\n );\n\n echo json_encode($data); \n \n }\n \n }\n \n }\n \n }", "public function postSettings()\n {\n $form = $this->users->getSettingsForm();\n\n if (! $form->isValid()) {\n return $this->redirectBack([ 'errors' => $form->getErrors() ]);\n }\n\n $this->users->updateSettings($this->user, Input::all());\n\n return $this->redirectRoute('user.settings', [], [ 'settings_updated' => true ]);\n }", "public function store(UserSettingStoreRequest $request, User $user)\n {\n $setting = new UserSetting;\n\n $setting->fill($request->all());\n\n $user->setting()->save($setting);\n\n return $this->jsonItem(\n $user->setting\n );\n }", "function wp_yubikey_profile_save( $user_id ) {\n\tcheck_admin_referer( 'update-user_' . $user_id );\n\n\tif ( ! current_user_can( 'edit_user', $user_id ) ) {\n\t\treturn false;\n\t}\n\n\t$is_enable = filter_input( INPUT_POST, 'wp_yubkey_enable', FILTER_VALIDATE_BOOLEAN, array(\n\t\t'options' => array(\n\t\t\t'default' => false,\n\t\t),\n\t) );\n\n\t$post_keys = filter_input( INPUT_POST, 'wp_yubikey_keys', FILTER_SANITIZE_STRING, FILTER_REQUIRE_ARRAY );\n\n\t$keys = array();\n\tforeach ( $post_keys as $key ) {\n\t\tif ( empty( $key ) ) {\n\t\t\tcontinue;\n\t\t}\n\t\tif ( strlen( $key ) < 12 ) {\n\t\t\tcontinue;\n\t\t}\n\t\t$keys[] = substr( $key, 0, 12 );\n\t}\n\tupdate_user_meta( $user_id, '_yubikey', array(\n\t\t'enable' => $is_enable,\n\t\t'keys' => $keys,\n\t) );\n}", "function set_user_setting( $user, $key, $value )\n {\n //Unimplemented\n }", "public static function save_settings(array $settings)\n {\n $whitelisted_settings = array();\n foreach ($settings as $key => $value) {\n if (array_key_exists($key, self::$defaults)) {\n $whitelisted_settings[$key] = array();\n foreach ($value as $k => $v) {\n if (array_key_exists($k, self::$defaults[$key])) {\n $whitelisted_settings[$key][$k] = $v;\n }\n }\n }\n }\n update_option(self::$option_key, $whitelisted_settings);\n self::write_color_css();\n }", "public function saveSettings(Request $request)\n {\n // update the values in the DB\n $this->user->name = $request->name;\n $this->user->sf_address = $request->sf_address;\n $this->user->signature = $request->signature;\n $this->user->timezone = $request->timezone;\n\n if($request->track_email == 'yes')\n {\n $this->user->track_email = 'yes';\n }\n else\n {\n $this->user->track_email = NULL;\n }\n\n if($request->track_links == 'yes')\n {\n $this->user->track_links = 'yes';\n }\n else\n {\n $this->user->track_links = NULL;\n }\n \n $this->user->save();\n\n return 'success';\n }", "public function saveExportSetting($settings)\r\n {\r\n\r\n }", "public function set($key, $value, $useUserSettings = false, $package = 'mybb/core')\n\t{\n\t\t$this->assertLoaded();\n\n\t\tif (!is_array($key) && $value === null) {\n\t\t\t$this->delete($key, $useUserSettings, $package);\n\n\t\t\treturn;\n\t\t}\n\n\t\tif (is_array($key)) {\n\t\t\tforeach ($key as $k => $v) {\n\t\t\t\t$settingKey = $k;\n\t\t\t\t$settingVal = $v;\n\n\t\t\t\tif (is_array($value) && isset($value[$k])) {\n\t\t\t\t\t$settingKey = $v;\n\t\t\t\t\t$settingVal = $value[$k];\n\n\t\t\t\t}\n\n\t\t\t\t$this->set($settingKey, $settingVal, $useUserSettings, $package);\n\t\t\t}\n\t\t} else {\n\t\t\t$settingType = ($useUserSettings === true) ? static::USER_SETTING_KEY : static::DEFAULT_SETTING_KEY;\n\n\t\t\t// Updating setting or adding user/default value to existing setting\n\t\t\tif (isset($this->settings[$package][$key])) {\n\t\t\t\tif (!isset($this->settings[$package][$key][$settingType])) {\n\t\t\t\t\t$this->modified = true;\n\n\t\t\t\t\t$existingSettingType =\n\t\t\t\t\t\t($settingType == static::USER_SETTING_KEY)\n\t\t\t\t\t\t\t? static::DEFAULT_SETTING_KEY\n\t\t\t\t\t\t\t: static::USER_SETTING_KEY;\n\n\t\t\t\t\t$id = -1;\n\n\t\t\t\t\tif (isset($this->settings[$package][$key][$existingSettingType]['id'])) {\n\t\t\t\t\t\t$id = $this->settings[$package][$key][$existingSettingType]['id'];\n\t\t\t\t\t}\n\n\t\t\t\t\t$setting = $this->settings[$package][$key][$settingType] = [\n\t\t\t\t\t\t'id' => $id,\n\t\t\t\t\t\t'package' => $package,\n\t\t\t\t\t\t'name' => $key,\n\t\t\t\t\t\t'value' => $value,\n\t\t\t\t\t\t'user_id' => null,\n\t\t\t\t\t];\n\n\t\t\t\t\tif ($useUserSettings && ($user = $this->guard->user()) !== null) {\n\t\t\t\t\t\t$setting['user_id'] = $user->getAuthIdentifier();\n\t\t\t\t\t}\n\n\t\t\t\t\t$this->modifiedSettings[$package . '.' . $key . '-' . $settingType] = $setting;\n\t\t\t\t} else {\n\t\t\t\t\tif ($this->settings[$package][$key][$settingType]['value'] != $value) {\n\t\t\t\t\t\t$this->modified = true;\n\t\t\t\t\t\t$this->settings[$package][$key][$settingType]['value'] = $value;\n\n\t\t\t\t\t\t$setting = $this->settings[$package][$key][$settingType];\n\t\t\t\t\t\t$setting['user_id'] = null;\n\n\t\t\t\t\t\tif ($useUserSettings && ($user = $this->guard->user()) !== null) {\n\t\t\t\t\t\t\t$setting['user_id'] = $user->getAuthIdentifier();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$this->modifiedSettings[$this->settings[$package][$key][$settingType]['id']] = $setting;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else { // Creating setting\n\t\t\t\t$this->modified = true;\n\t\t\t\t$setting = $this->settings[$package][$key][$settingType] = [\n\t\t\t\t\t'package' => $package,\n\t\t\t\t\t'name' => $key,\n\t\t\t\t\t'value' => $value,\n\t\t\t\t];\n\n\t\t\t\t$this->createdSettings[$settingType][$package . '.' . $key] = $setting;\n\t\t\t}\n\t\t}\n\t}", "public function afterSave() {\n\t\t$setting = GPrivacySetting::model ()->cache ( 500 )->findByPk ( $this->id );\n\t\tif (! $setting) {\n\t\t\t$setting = new GPrivacySetting ();\n\t\t\t$setting->userId = $this->id;\n\t\t\t$setting->save ();\n\t\t}\n\t\t\n\t\tif ($this->isNewRecord) {\n\t\t\tG::log ( G::t ( 'A user has been created: user: {user}', array (\n\t\t\t\t\t'{user}' => CJavaScript::jsonEncode ( $this->attributes ) \n\t\t\t) ) );\n\t\t}\n\t\treturn parent::afterSave ();\n\t}", "function save_settings( $setting, $value ){\n //global $disp_body;\n\n //ensure paths use forward slashes\n if( $setting === 'CIFS_SHARE' || $setting === 'CIFS_MOUNT' ){\n $value = str_replace('\\\\', '/', $value);\n }\n\n //only store the password if it is not empty\n $setting_part = substr( $setting, -9);\n if( $setting_part === '_PASSWORD' && $value == '' ){\n //write old password to $value to keep the old one\n $value = $_SESSION['settings.conf'][$setting];\n }\n\n //escape slashes for 'sed' in pia-settings\n $value = str_replace(array('\\\\','/'), array('\\\\\\\\','\\\\/'), $value);\n\n $k = escapeshellarg($setting);\n $v = escapeshellarg($value);\n exec(\"/usr/local/pia/pia-settings $k $v\");\n //$disp_body .= \"$k is now $v<br>\\n\"; //dev stuff\n\n //clear to force a reload\n unset($_SESSION['settings.conf']);\n }", "function settings() \n {\n $api = new Module_UserManagement_API();\n $view = Core_View::factory('usersettings');\n\n $user = $api->getUser();\n\n $settings = array();\n $settings[] = array(\"name\" => 'UserID',\n \"id\" => 'userid', \n \"value\" => $user['userid'], \n \"editable\" => false);\n\n $settings[] = array(\"name\" => 'Password',\n \"id\" => 'password', \n \"value\" => '********', \n \"editable\" => true);\n\n $settings[] = array(\"name\" => 'Maximum Heart Rate',\n \"id\" => 'max_heartrate', \n \"value\" => $user['max_heartrate'], \n \"editable\" => true);\n\n $settings[] = array(\"name\" => 'Resting Heart Rate',\n \"id\" => 'resting_heartrate', \n \"value\" => $user['resting_heartrate'], \n \"editable\" => true);\n\n $settings[] = array(\"name\" => 'Date of Birth',\n \"id\" => 'dob', \n \"value\" => $user['dob'], \n \"editable\" => true);\n\n $settings[] = array(\"name\" => 'Rider Weight',\n \"id\" => 'rider_weight', \n \"value\" => $user['rider_weight'], \n \"editable\" => true);\n\n $settings[] = array(\"name\" => 'Bike Weight',\n \"id\" => 'bike_weight', \n \"value\" => $user['bike_weight'], \n \"editable\" => true);\n\n $settings[] = array(\"name\" => 'Athlete',\n \"id\" => 'athlete', \n \"value\" => $user['athlete'] ? 'Yes' : 'No', \n \"editable\" => true);\n\n $settings[] = array(\"name\" => 'Coach',\n \"id\" => 'coach', \n \"value\" => $user['coach'] ? 'Yes' : 'No', \n \"editable\" => true);\n\n $view->settings = $settings;\n\n echo $view->render();\n }", "private function saveSettings()\n {\n $this->form_validation->set_rules('title', 'lang:bf_site_name', 'required|trim');\n $this->form_validation->set_rules('system_email', 'lang:bf_site_email', 'required|trim|valid_email');\n $this->form_validation->set_rules('offline_reason', 'lang:settings_offline_reason', 'trim');\n $this->form_validation->set_rules('list_limit', 'lang:settings_list_limit', 'required|trim|numeric');\n $this->form_validation->set_rules('password_min_length', 'lang:bf_password_length', 'required|trim|numeric');\n $this->form_validation->set_rules('password_force_numbers', 'lang:bf_password_force_numbers', 'trim|numeric');\n $this->form_validation->set_rules('password_force_symbols', 'lang:bf_password_force_symbols', 'trim|numeric');\n $this->form_validation->set_rules('password_force_mixed_case', 'lang:bf_password_force_mixed_case', 'trim|numeric');\n $this->form_validation->set_rules('password_show_labels', 'lang:bf_password_show_labels', 'trim|numeric');\n $this->form_validation->set_rules('language', 'lang:bf_language', 'required|trim');\n\n if ($this->form_validation->run() === false) {\n return false;\n }\n\n $data = array(\n array('name' => 'site.title', 'value' => $this->input->post('title')),\n array('name' => 'site.system_email', 'value' => $this->input->post('system_email')),\n array('name' => 'site.status', 'value' => $this->input->post('status')),\n array('name' => 'site.offline_reason', 'value' => $this->input->post('offline_reason')),\n array('name' => 'site.list_limit', 'value' => $this->input->post('list_limit')),\n\n array('name' => 'auth.allow_register', 'value' => $this->input->post('allow_register') ? 1 : 0),\n array('name' => 'auth.user_activation_method', 'value' => $this->input->post('user_activation_method') ?: 0),\n array('name' => 'auth.login_type', 'value' => $this->input->post('login_type')),\n array('name' => 'auth.allow_remember', 'value' => $this->input->post('allow_remember') ? 1 : 0),\n array('name' => 'auth.remember_length', 'value' => (int) $this->input->post('remember_length')),\n array('name' => 'auth.password_min_length', 'value' => $this->input->post('password_min_length')),\n array('name' => 'auth.password_force_numbers', 'value' => $this->input->post('password_force_numbers') ? 1 : 0),\n array('name' => 'auth.password_force_symbols', 'value' => $this->input->post('password_force_symbols') ? 1 : 0),\n array('name' => 'auth.password_force_mixed_case', 'value' => $this->input->post('password_force_mixed_case') ? 1 : 0),\n array('name' => 'auth.password_show_labels', 'value' => $this->input->post('password_show_labels') ? 1 : 0),\n array('name' => 'password_iterations', 'value' => $this->input->post('password_iterations')),\n\n\t\t\tarray('name' => 'tips.allow_post', 'value' => $this->input->post('allow_post') ? 1 : 0),\n\t\t\tarray('name' => 'tips.rules', 'value' => $this->input->post('tips_rules')),\n\t\t\t\n array(\n 'name' => 'site.default_language',\n 'value' => $this->input->post('language') ? $this->input->post('language') : ''\n ),\t\t\t\n );\n\n log_activity(\n $this->auth->user_id(),\n lang('bf_act_settings_saved') . ': ' . $this->input->ip_address(),\n 'core'\n );\n\n // Save the settings to the DB.\n $updated = $this->settings_lib->update_batch($data);\n\n return $updated;\n }", "public abstract function settingsSave(array &$pluginInfo);", "public function save()\n {\n return update_option($this->optionName, $this->settings);\n }", "public function actionSettings()\n\t{\n\t\t// using the default layout 'protected/views/layouts/main.php'\n\t\t\n\t\t\n\t\t$this->checkUser();\n\t\t\n\t\t$record = SiteUser::model()->findByAttributes(array('id'=> Yii::app()->user->id));\n\t\t\n\t\tif($record===null)\n\t\t\t\tthrow new CHttpException(404, Yii::t('app', 'Internal server error.'));\n\n\t\t\n\t\tif(isset($_POST['SiteUser']))\n\t\t{\n\t\t\t$record->attributes=$_POST['SiteUser'];\n\t\t\n\t\t\t\n\n\t\t\tModeratorLogHelper::AddToLog('edited-user-'.$record->id,'Изменены данные пользователя '.$record->email,null,$record->id);\n\t\t\tif($record->save())\n\t\t\t\t$this->redirect(array('personal'));\n\t\t}\n\t\t\n\t\t$this->render('settings',array('user'=>$record));\n\t}", "function power_user_meta_save( $user_id ) {\n\n\tif ( ! current_user_can( 'edit_users', $user_id ) ) {\n\t\treturn;\n\t}\n\t// phpcs:ignore WordPress.Security.NonceVerification.Missing -- $_POST['power-meta'] is not a nonce field.\n\tif ( ! isset( $_POST['power-meta'] ) || ! is_array( $_POST['power-meta'] ) ) {\n\t\treturn;\n\t}\n\n\t$defaults = [\n\t\t'power_admin_menu' => '',\n\t\t'power_seo_settings_menu' => '',\n\t\t'power_import_export_menu' => '',\n\t\t'power_author_box_single' => '',\n\t\t'power_author_box_archive' => '',\n\t\t'headline' => '',\n\t\t'intro_text' => '',\n\t\t'doctitle' => '',\n\t\t'meta_description' => '',\n\t\t'meta_keywords' => '',\n\t\t'noindex' => '',\n\t\t'nofollow' => '',\n\t\t'noarchive' => '',\n\t\t'layout' => '',\n\t];\n\n\t/**\n\t * Filter the user meta defaults array.\n\t *\n\t * Allows developer to filter the default array of user meta key => value pairs.\n\t *\n\t * @since 2.1.0\n\t *\n\t * @param array $defaults Default user meta array.\n\t */\n\t$defaults = apply_filters( 'power_user_meta_defaults', $defaults );\n\n\t// phpcs:ignore WordPress.Security.NonceVerification.Missing -- $_POST['power-meta'] is not a nonce field.\n\t$meta = wp_parse_args( $_POST['power-meta'], $defaults );\n\n\t$meta['headline'] = wp_strip_all_tags( $meta['headline'] );\n\t$meta['intro_text'] = current_user_can( 'unfiltered_html' ) ? $meta['intro_text'] : power_formatting_kses( $meta['intro_text'] );\n\n\tforeach ( $meta as $key => $value ) {\n\t\tupdate_user_meta( $user_id, $key, $value );\n\t}\n\n}", "function save_settings()\n\t{\n\t\t// --------------------------------------\n\t\t// Get channel and field ids\n\t\t// --------------------------------------\n\n\t\t$channel_id = $this->EE->input->post('channel_id');\n\t\t$field_id = $this->EE->input->post('field_id');\n\n\t\t// no channel or field id -> invalid request\n\t\tif ( ! $channel_id || ! $field_id )\n\t\t{\n\t\t\treturn $this->_show_error('invalid_request');\n\t\t}\n\n\t\t// --------------------------------------\n\t\t// Init settings array\n\t\t// --------------------------------------\n\n\t\t$settings = array();\n\n\t\t// --------------------------------------\n\t\t// Do what with categories?\n\t\t// --------------------------------------\n\n\t\tif ( in_array($this->EE->input->post('category_options'), array('all', 'one')) )\n\t\t{\n\t\t\t$settings['categories'] = $this->EE->input->post('category_options');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$settings['categories'] = $this->EE->input->post('categories') ? implode('|', $this->EE->input->post('categories')) : '';\n\t\t}\n\n\t\t// Check input\n\t\t$settings['statuses'] = $this->EE->input->post('statuses') ? implode('|', $this->EE->input->post('statuses')) : '';\n\t\t$settings['show_expired'] = $this->EE->input->post('show_expired') ? 'y' : 'n';\n\t\t$settings['show_future'] = $this->EE->input->post('show_future') ? 'y' : 'n';\n\t\t$settings['sort_order'] = $this->EE->input->post('sort_order');\n\t\t$settings['clear_cache'] = $this->EE->input->post('clear_cache') ? 'y' : 'n';\n\t\t$settings['permissions'] = $this->EE->input->post('permissions');\n\n\t\t// Data to put into the DB\n\t\t$data = array(\n\t\t\t'channel_id' => $channel_id,\n\t\t\t'field_id' => $field_id,\n\t\t\t'settings' => encode_reorder_settings($settings)\n\t\t);\n\n\t\t// I want to use REPLACE INTO, to replace existing settings and insert if not exists\n\t\t// That means no active record!\n\t\t$sql = \"REPLACE INTO exp_low_reorder_settings (\".implode(',', array_keys($data)).\") VALUES ('\".implode(\"','\", $this->EE->db->escape_str(array_values($data))).\"')\";\n\t\t$this->EE->db->query($sql);\n\n\t\t$this->EE->session->set_flashdata('reorder_msg', $this->EE->lang->line('settings_saved'));\n\t\t$this->EE->functions->redirect($this->base_url);\n\t\texit;\n\t}", "public function settings() {\n \n // Verify if is a team's member\n if ( $this->session->userdata( 'member' ) ) {\n redirect('user/app/dashboard');\n }\n \n // Check if the current user is admin and if session exists\n $this->check_session($this->user_role, 0);\n \n // Verify if account is confirmed\n $this->_check_unconfirmed_account();\n \n // Load Team Model\n $this->load->model('team');\n \n if ( file_exists( APPPATH . 'language/' . $this->config->item('language') . '/default_settings_lang.php') ) {\n $this->lang->load( 'default_settings', $this->config->item('language') );\n }\n \n // Get User Information\n $getdata = $this->user->get_user_info($this->user_id);\n\n // Get User's options\n $options = $this->user_meta->get_all_user_options($this->user_id);\n\n // display user data in settings page\n $this->content = array(\n 'udata' => $getdata,\n 'options' => $options\n );\n\n // Load view/user/settings.php file\n $this->body = 'user/settings';\n\n $this->user_layout();\n \n }", "static public function save_settings( $data = array() ) {\n\t\t$roles = self::get_all_roles();\n\t\t$settings = array();\n\t\t$ms_support = FLBuilderAdminSettings::multisite_support();\n\t\t$ms_overrides = $ms_support && isset( $_POST['fl_ua_override_ms'] ) ? $_POST['fl_ua_override_ms'] : array();\n\n\t\tforeach ( self::$registered_settings as $registered_key => $registered_data ) {\n\n\t\t\tif ( ! isset( $data[ $registered_key ] ) ) {\n\t\t\t\t$data[ $registered_key ] = array();\n\t\t\t}\n\t\t}\n\n\t\tforeach ( $data as $data_key => $data_roles ) {\n\n\t\t\tif ( ! is_network_admin() && $ms_support && ! isset( $ms_overrides[ $data_key ] ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$settings[ $data_key ] = array();\n\n\t\t\tforeach ( $roles as $role_key => $role_data ) {\n\t\t\t\t$settings[ $data_key ][ $role_key ] = in_array( $role_key, $data_roles ) ? true : false;\n\t\t\t}\n\t\t}\n\n\t\tself::$settings = null;\n\n\t\tFLBuilderModel::update_admin_settings_option( '_fl_builder_user_access', $settings, false );\n\t}", "private function save() {\n global $config;\n\n //Save Config\n file_put_contents($config[\"usersFile\"],json_encode($this->users,JSON_UNESCAPED_SLASHES|JSON_PRETTY_PRINT));\n }", "public static function storeSettings($settings)\n\t{\n\t\t$registry = Registry::singleton();\n\t\t\n\t\tforeach ($settings as $key => $value) {\n\t\t\t$registry->_settings [ $key ] = $value;\n\t\t}\n\t}", "public function site_settings()\n\t\t{\n\t\t\t$this->is_login();\n\t\t\t$data['form_submit_message'] = '';\n\t\t\t$this->load->model('settings_model', 'sm');\n\t\t\t\n\t\t\tif(count($_POST) > 0)\n\t\t\t{\n\t\t\t\tforeach($_POST as $key => $value)\n\t\t\t\t{\n\t\t\t\t\t$settings_data['value'] = $value;\n\t\t\t\t\t$this->sm->update($key, $settings_data);\n\t\t\t\t}\n\t\t\t\t$data['form_submit_message'] = '<div style=\"font-weight:bold;color:#0000FF;\">'.lang('msg_settings_saved') .'</div>';\n\t\t\t}\n\t\t\t\n\t\t\t$settings_raw_data = $this->sm->get_all();\n\t\t\t$settings_data = array();\n\t\t\tforeach($settings_raw_data as $raw_settings)\n\t\t\t\t$settings_data[$raw_settings->name] = $raw_settings->value;\n\t\t\t$data['settings'] = $settings_data;\n\t\t\t$this->load->view('settings-admin', $data);\n\t\t}", "public function updateUserPreferences()\n {\n $userList = $this->_userDao->getUserList();\n\n // loop through every user and fix it\n foreach ($userList as $user) {\n /*\n * Because we do not get all users' properties from\n * getUserList, retrieve the users' settings from scratch\n */\n $user = $this->_userDao->getUser($user['userid']);\n\n // set the users' preferences\n $this->setSettingIfNot($user['prefs'], 'perpage', 25);\n $this->setSettingIfNot($user['prefs'], 'date_formatting', 'human');\n $this->setSettingIfNot($user['prefs'], 'normal_template', 'we1rdo');\n $this->setSettingIfNot($user['prefs'], 'mobile_template', 'mobile');\n $this->setSettingIfNot($user['prefs'], 'tablet_template', 'we1rdo');\n $this->setSettingIfNot($user['prefs'], 'count_newspots', true);\n $this->setSettingIfNot($user['prefs'], 'mouseover_subcats', true);\n $this->setSettingIfNot($user['prefs'], 'keep_seenlist', true);\n $this->setSettingIfNot($user['prefs'], 'auto_markasread', true);\n $this->setSettingIfNot($user['prefs'], 'keep_downloadlist', true);\n $this->setSettingIfNot($user['prefs'], 'keep_watchlist', true);\n $this->setSettingIfNot($user['prefs'], 'nzb_search_engine', 'nzbindex');\n $this->setSettingIfNot($user['prefs'], 'show_filesize', true);\n $this->setSettingIfNot($user['prefs'], 'show_reportcount', true);\n $this->setSettingIfNot($user['prefs'], 'minimum_reportcount', 1);\n $this->setSettingIfNot($user['prefs'], 'show_nzbbutton', true);\n $this->setSettingIfNot($user['prefs'], 'show_multinzb', true);\n $this->setSettingIfNot($user['prefs'], 'customcss', '');\n $this->setSettingIfNot($user['prefs'], 'newspotdefault_tag', $user['username']);\n $this->setSettingIfNot($user['prefs'], 'newspotdefault_body', '');\n $this->setSettingIfNot($user['prefs'], 'user_language', 'en_US');\n $this->setSettingIfNot($user['prefs'], 'show_avatars', true);\n $this->setSettingIfNot($user['prefs'], 'usemailaddress_for_gravatar', true);\n\n $this->setSettingIfNot($user['prefs']['nzbhandling'], 'action', 'disable');\n $this->setSettingIfNot($user['prefs']['nzbhandling'], 'local_dir', '/tmp');\n $this->setSettingIfNot($user['prefs']['nzbhandling'], 'prepare_action', 'merge');\n $this->setSettingIfNot($user['prefs']['nzbhandling'], 'command', '');\n $this->setSettingIfNot($user['prefs']['nzbhandling']['sabnzbd'], 'url', '');\n $this->setSettingIfNot($user['prefs']['nzbhandling']['sabnzbd'], 'apikey', '');\n $this->setSettingIfNot($user['prefs']['nzbhandling']['sabnzbd'], 'username', '');\n $this->setSettingIfNot($user['prefs']['nzbhandling']['sabnzbd'], 'password', '');\n $this->setSettingIfNot($user['prefs']['nzbhandling']['nzbget'], 'host', '');\n $this->setSettingIfNot($user['prefs']['nzbhandling']['nzbget'], 'port', '');\n $this->setSettingIfNot($user['prefs']['nzbhandling']['nzbget'], 'ssl', '');\n $this->setSettingIfNot($user['prefs']['nzbhandling']['nzbget'], 'username', '');\n $this->setSettingIfNot($user['prefs']['nzbhandling']['nzbget'], 'password', '');\n $this->setSettingIfNot($user['prefs']['nzbhandling']['nzbget'], 'timeout', 15);\n $this->setSettingIfNot($user['prefs']['nzbhandling']['nzbvortex'], 'host', '');\n $this->setSettingIfNot($user['prefs']['nzbhandling']['nzbvortex'], 'port', '');\n $this->setSettingIfNot($user['prefs']['nzbhandling']['nzbvortex'], 'apikey', '');\n\n $this->setSettingIfNot($user['prefs']['notifications']['growl'], 'host', '');\n $this->setSettingIfNot($user['prefs']['notifications']['growl'], 'password', '');\n /* Notifo and NMA are discontinued. */\n $this->unsetSetting($user['prefs']['notifications'], 'nma');\n $this->unsetSetting($user['prefs']['notifications'], 'notifo');\n $this->setSettingIfNot($user['prefs']['notifications']['prowl'], 'apikey', '');\n $this->setSettingIfNot($user['prefs']['notifications']['twitter'], 'screen_name', '');\n $this->setSettingIfNot($user['prefs']['notifications']['twitter'], 'request_token', '');\n $this->setSettingIfNot($user['prefs']['notifications']['twitter'], 'request_token_secret', '');\n $this->setSettingIfNot($user['prefs']['notifications']['twitter'], 'access_token', '');\n $this->setSettingIfNot($user['prefs']['notifications']['twitter'], 'access_token_secret', '');\n $notifProviders = Notifications_Factory::getActiveServices();\n foreach ($notifProviders as $notifProvider) {\n $this->setSettingIfNot($user['prefs']['notifications'][$notifProvider], 'enabled', false);\n $this->setSettingIfNot($user['prefs']['notifications'][$notifProvider]['events'], 'watchlist_handled', false);\n $this->setSettingIfNot($user['prefs']['notifications'][$notifProvider]['events'], 'nzb_handled', false);\n $this->setSettingIfNot($user['prefs']['notifications'][$notifProvider]['events'], 'retriever_finished', false);\n $this->setSettingIfNot($user['prefs']['notifications'][$notifProvider]['events'], 'report_posted', false);\n $this->setSettingIfNot($user['prefs']['notifications'][$notifProvider]['events'], 'spot_posted', false);\n $this->setSettingIfNot($user['prefs']['notifications'][$notifProvider]['events'], 'user_added', false);\n $this->setSettingIfNot($user['prefs']['notifications'][$notifProvider]['events'], 'newspots_for_filter', false);\n } // foreach\n\n // make sure a sort preference is defined. An empty field means relevancy\n $this->setSettingIfNot($user['prefs'], 'defaultsortfield', '');\n\n // Remove deprecated preferences\n $this->unsetSetting($user['prefs'], 'search_url');\n $this->unsetSetting($user['prefs'], 'template');\n $this->unsetSetting($user['prefs']['notifications'], 'libnotify');\n\n // Make sure the user has a valid RSA key\n if ($user['userid'] > 2) {\n $rsaKey = $this->_userDao->getUserPrivateRsaKey($user['userid']);\n if (empty($rsaKey)) {\n // Creer een private en public key paar voor deze user\n $spotSigning = Services_Signing_Base::factory();\n $userKey = $spotSigning->createPrivateKey($this->_settings->get('openssl_cnf_path'));\n\n $this->_userDao->setUserRsaKeys($user['userid'], $userKey['public'], $userKey['private']);\n } // if\n } // if\n\n /*\n * In earlier versions, we always appended \"sabnzbd/\" to the URL, so we do this once\n * manually\n */\n if ($this->_settings->get('securityversion') < 0.31) {\n if (!empty($user['prefs']['nzbhandling']['sabnzbd']['url'])) {\n $user['prefs']['nzbhandling']['sabnzbd']['url'] = $user['prefs']['nzbhandling']['sabnzbd']['url'].'sabnzbd/';\n } // if\n } // if\n\n // update the user record in the database\n $this->_userDao->setUser($user);\n } // foreach\n }", "public function setSettingsAttribute( $settings ){\n\n \t$base = self::$base_settings;\n $result = array();\n\n \tforeach ($base as $key => $value) { //for each key in the base\n $result[$key] = $settings; //$base[$key]['value'];\n \t\tif ( isset($settings[$key]) ){\n \t\t\t$result[$key] = $settings[$key];\n \t\t}\n \t}\n\n \t\t$this->attributes['settings'] = json_encode($result);\n }", "public function save_var_settings($settings) {\n\t\treturn $this->save_settings($settings);\n\t}", "public function save( $user_id ) {\r\n\t\t// Unhook action to garantee single save\r\n\t\tremove_action( 'profile_update', array( $this, '_save' ) );\r\n\r\n\t\t$this->set_user_id( $user_id );\r\n\r\n\t\tforeach ( $this->fields as $field ) {\r\n\t\t\t$field->set_value_from_input();\r\n\t\t\t$field->save();\r\n\t\t}\r\n\r\n\t\tdo_action( 'carbon_after_save_user_meta', $user_id );\r\n\t}", "public function SaveUserSettings()\n {\n $output['token'] = $this->security->get_csrf_hash();\n header('Content-Type: application/json');\n\n if (!empty($this->session->userdata('user_id'))) {\n $thumbnaildb = $this->database->getUserData($this->session->userdata('user_id'))[0]['thumbnail'];\n if (!empty(pathinfo($_FILES[\"uploadthumbnail\"][\"name\"])['filename'])) {\n if ($thumbnaildb !== pathinfo($_FILES[\"uploadthumbnail\"][\"name\"])['filename']) {\n if ($this->security->xss_clean($_FILES['uploadthumbnail']['name'], TRUE) === TRUE) {\n $thumbnail = $this->upload__image('uploadthumbnail', USER_UPLOAD);\n } else {\n $thumbnail = $thumbnaildb;\n }\n } else {\n $thumbnail = $thumbnaildb;\n }\n } else {\n $thumbnail = $thumbnaildb;\n }\n\n $data = array(\n 'firstname' => $this->input->post('firstname'),\n 'lastname' => $this->input->post('lastname'),\n 'email' => $this->input->post('email'),\n 'thumbnail' => $thumbnail,\n 'user_metadescription' => $this->input->post('user_metadescription'),\n 'user_description' => $this->input->post('user_description'),\n 'online' => $this->input->post('account-online-radio'),\n 'user_country' => $this->input->post('user_country'),\n 'social_twitter' => $this->input->post('social_twitter'),\n 'social_facebook' => $this->input->post('social_facebook'),\n 'social_youtube' => $this->input->post('social_youtube'),\n 'paypal' => $this->input->post('paypal_email'),\n 'payoneer' => $this->input->post('payoneer_email'),\n 'bank_transfer' => $this->input->post('bank_details')\n );\n\n $data = html_escape($this->security->xss_clean($data));\n if (!empty($this->input->post('user_id'))) {\n $output['response'] = $this->database->_update_to_table('tbl_users', $data, array('user_id' => $this->input->post('user_id')));\n exit(json_encode($output));\n }\n }\n\n $output['response'] = false;\n exit(json_encode($output));\n }", "function updateUserSettings($user_id, $userSettings)\n {\n $params['table'] = USERS_TBL;\n $params['where'] = \"user_id = $user_id\";\n $params['data'] = $userSettings;\n \n $this->db->update($params);\n \n }", "public function paymentSettingsUpdate($data, $user = null)\n {\n $user = $user ? : auth()->user();\n\n $user->setMeta('cod', array_get($data, 'cod'));\n $user->setMeta('bank_transaction', array_get($data, 'bank_transaction'));\n $user->setMeta('bank_credentials', strip_tags(array_get($data, 'bank_credentials')));\n $user->save();\n\n }", "public function saveSettings($params) {\n\t\tif (!$this->canEdit()) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// plugin hook handlers should return true to indicate the settings have\n\t\t// been saved so that default code does not run\n\t\t$hook_params = array(\n\t\t\t'widget' => $this,\n\t\t\t'params' => $params\n\t\t);\n\t\tif (elgg_trigger_plugin_hook('widget_settings', $this->handler, $hook_params, false) == true) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif (is_array($params) && count($params) > 0) {\n\t\t\tforeach ($params as $name => $value) {\n\t\t\t\tif (is_array($value)) {\n\t\t\t\t\t// private settings cannot handle arrays\n\t\t\t\t\treturn false;\n\t\t\t\t} else {\n\t\t\t\t\t$this->$name = $value;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->save();\n\t\t}\n\n\t\treturn true;\n\t}", "private function cache_settings( array $settings ) {\n\t\t$site_settings = array();\n\t\t$user_settings = array();\n\n\t\tforeach ( $settings as $setting_key => $setting_data ) {\n\t\t\tif ( ! isset( $setting_data['scope'] ) || ! isset( $setting_data['values'] ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ( 'site' === $setting_data['scope'] ) {\n\t\t\t\t$site_settings[ $setting_key ] = $setting_data;\n\t\t\t} elseif ( 'user' === $setting_data['scope'] ) {\n\t\t\t\t$user_settings[ $setting_key ] = $setting_data;\n\t\t\t}\n\t\t}\n\n\t\t$this->transients->set( self::TRANSIENT_NAME, $site_settings, WEEK_IN_SECONDS );\n\t\t$this->user_transients->set( self::TRANSIENT_NAME, $user_settings, WEEK_IN_SECONDS );\n\t}", "public function saveSettings($params)\n {\n\n // SettingsModel param assignment\n $settingsModel = new SettingsModel();\n $settingsModel->allow_registration = isset($params[\"allow_registration\"]) ? $params[\"allow_registration\"] : null;\n $settingsModel->redirect_after_login = isset($params[\"redirect_after_login\"]) ? $params[\"redirect_after_login\"] : null;\n\n // Validate\n if(!$settingsModel->validate()){\n Craft::$app->getSession()->setError(\"Form validation failed. Empty or incorrect values\");\n return false;\n }\n\n $settingsRecord = $this->getSettings();\n $currentDate = new DateTime();\n\n $settingsRecord->allow_registration = $params[\"allow_registration\"];\n $settingsRecord->dateUpdated = $currentDate;\n $settingsRecord->redirect_after_login = $params[\"redirect_after_login\"];\n\n if(!$settingsRecord->save()){\n Craft::$app->getSession()->setError(\"Database error\");\n return false;\n }\n\n return true;\n\n }", "public function commit(){\n\t\t$event = EventHandler::getInstance();\n\t\t$this->_getDAO();\n\t\t$event->trigger(new UserSettingModifyBeforeCommit($this));\n\t\t$r = $this->_update();\n\t\tif($r !== false){\n\t\t\t$event->trigger(new UserSettingModifyAfterCommit($this));\n\t\t}\n\t\treturn $r;\n\t}", "function cinerama_edge_save_options() {\n\t\tglobal $cinerama_edge_global_options;\n\n\t\tif ( current_user_can( 'administrator' ) ) {\n\t\t\t$_REQUEST = stripslashes_deep( $_REQUEST );\n\n\t\t\tunset( $_REQUEST['action'] );\n\n\t\t\tcheck_ajax_referer( 'edgtf_ajax_save_nonce', 'edgtf_ajax_save_nonce' );\n\n\t\t\t$cinerama_edge_global_options = array_merge( $cinerama_edge_global_options, $_REQUEST );\n\n\t\t\tupdate_option( 'edgtf_options_cinerama', $cinerama_edge_global_options );\n\n\t\t\tdo_action( 'cinerama_edge_action_after_theme_option_save' );\n\t\t\techo esc_html__( 'Saved', 'cinerama' );\n\n\t\t\tdie();\n\t\t}\n\t}", "public function save()\n\t{\n\t\t$updatedProfile = Yii::$app->user->identity->profile;\n\t\t\n\t\t$updatedProfile = Yii::$app->user->identity->profile;\n\t\t\n\t\t$updatedProfile->{Yii::$app->request->post()['flag']} = Yii::$app->request->post()['val'];\n\n\t\t$updatedProfile->save();\n\t}", "public function save_widget_state() {\n\n\t\tcheck_ajax_referer( 'mi-admin-nonce', 'nonce' );\n\n\t\t$default = self::$default_options;\n\t\t$current_options = $this->get_options();\n\n\t\t$reports = $default['reports'];\n\t\tif ( isset( $_POST['reports'] ) ) {\n\t\t\t$reports = json_decode( sanitize_text_field( wp_unslash( $_POST['reports'] ) ), true );\n\t\t\tforeach ( $reports as $report => $reports_sections ) {\n\t\t\t\t$reports[ $report ] = array_map( 'boolval', $reports_sections );\n\t\t\t}\n\t\t}\n\n\t\t$options = array(\n\t\t\t'width' => ! empty( $_POST['width'] ) ? sanitize_text_field( wp_unslash( $_POST['width'] ) ) : $default['width'],\n\t\t\t'interval' => ! empty( $_POST['interval'] ) ? absint( wp_unslash( $_POST['interval'] ) ) : $default['interval'],\n\t\t\t'compact' => ! empty( $_POST['compact'] ) ? 'true' === sanitize_text_field( wp_unslash( $_POST['compact'] ) ) : $default['compact'],\n\t\t\t'reports' => $reports,\n\t\t\t'notice30day' => $current_options['notice30day'],\n\t\t);\n\n\t\tarray_walk( $options, 'sanitize_text_field' );\n\t\tupdate_user_meta( get_current_user_id(), 'monsterinsights_user_preferences', $options );\n\n\t\twp_send_json_success();\n\n\t}", "public function setSettings($settings)\r\n\t{\r\n $id = $this->_constructId();\r\n\t\t$this->_arr_settings[$id] = $this->owner->json_settings = json_encode(self::castArray($settings));\r\n\t}", "public function saveSettings($file, $settings)\n {\n if (!is_array($file)) {\n $file = $this->get($file, false);\n }\n $this->db->query(\n \"UPDATE {$this->table} SET settings = ? WHERE id = ?\",\n [ json_encode($settings), $file['id'] ]\n );\n $file['settings'] = $settings;\n return $file;\n }", "public function user_settings()\n {\n\n //if existing user, go to settings\n if (Session::has('user'))\n {\n //remember url user is coming from\n Session::put('redirect', URL::previous());\n\n $user = Session::get('user');\n $failure = Session::get('failure');\n\n //specify whether user is new or not\n $user->new = 0;\n\n //get the grille's phone number, and put it in readable format\n $grille_num = Grille::where('id', $this->grille_id)->pluck('phone_number');\n $user->grille_number = '(' . substr($grille_num, 0, 3) . ') ' . substr($grille_num, 3, 3) \n . '-' . substr($grille_num, 6, 4);\n\n //format phone number to prefill\n $user->phone_formatted = '(' . substr($user->phone_number, 0, 3) . ') ' . substr($user->phone_number, 3, 3) \n . '-' . substr($user->phone_number, 6, 4);\n\n $this->layout->content = View::make('users.edit', ['user' => $user, 'failure' => $failure]);\n }\n //else redirect back to where came from\n else\n {\n try {\n return Redirect::back();\n }\n catch (Exception $e) {\n return Redirect::to('/');\n }\n\n }\n }", "function _savesettings()\r\n {\r\n\t\t$settings = JRequest::getVar('settings');\r\n\r\n\t\tjimport('joomla.registry.registry');\r\n\t\t$reg = new JRegistry();\r\n\t\t$reg->loadArray($settings);\r\n\t\t\t\t\r\n\t\tif(JFusionConnect::isJoomlaVersion('1.6')) {\r\n\t\t\t$component =& JTable::getInstance('extension');\r\n\t\t\t$componentid = $component->find(array('type' => 'component','element' => 'com_jfusionconnect'));\r\n\t\t\t$component->load($componentid);\r\n\t\t\t\r\n\t\t\t$plugin =& JTable::getInstance('extension');\r\n\t\t\t$pluginid = $plugin->find(array('type' => 'plugin','element' => 'jfusionconnect'));\r\n\t\t\t$plugin->load($pluginid);\r\n\t\t\t$key='enabled';\r\n\t\t} else {\r\n\t\t\t$component =& JTable::getInstance('component');\r\n\t\t\t$component->loadByOption('com_jfusionconnect');\r\n\t\t\t\r\n\t\t\t$plugin =& JTable::getInstance('plugin');\r\n\t\t\t$plugin->_tbl_key = 'element';\r\n\t\t\t$plugin->load('jfusionconnect');\r\n\t\t\t$key='published';\r\n\t\t}\r\n\t\t$component->params = $reg->toString();\r\n\t\t$component->store();\r\n \tif ($settings['enabled']) {\r\n\t\t\t$plugin->$key = 1;\r\n\t\t} else {\r\n\t\t\t$plugin->$key = 0;\r\n\t\t}\r\n\t\t$plugin->store();\r\n }", "public function save_smtp_settings() {\n if ($this->checkLogin('A') == '') {\n redirect(ADMIN_ENC_URL);\n } else {\n if ($this->checkPrivileges('admin', '2') == TRUE) {\n $condition = array('admin_id' => '1');\n $this->admin_model->commonInsertUpdate(ADMIN, 'update', array(), array(), $condition);\n $smtp_settings_val = $this->input->post(\"smtp\");\n $config = '<?php ';\n foreach ($smtp_settings_val as $key => $val) {\n $value = addslashes($val);\n $config .= \"\\n\\$config['$key'] = '$value'; \";\n }\n $config .= \"\\n ?>\";\n $file = 'commonsettings/dectar_smtp_settings.php';\n\t\t\t\t file_put_contents($file, $config);\n $this->setErrorMessage('success', 'SMTP settings updated successfully','admin_adminlogin_smtp_settings_updated');\n redirect(ADMIN_ENC_URL.'/adminlogin/admin_smtp_settings');\n } else {\n redirect(ADMIN_ENC_URL);\n }\n }\n }", "public function saveSettings()\n {\n return $this->config->saveFile();\n }", "function email_revalidate_user_settings_save() {\n\t$email = get_input('email');\n\t$user_id = get_input('guid');\n\n\tif (!$user_id) {\n\t\t$user = elgg_get_logged_in_user_entity();\n\t} else {\n\t\t$user = get_entity($user_id);\n\t}\n\n\tif (!is_email_address($email)) {\n\t\tregister_error(elgg_echo('email:save:fail'));\n\t\treturn false;\n\t}\n\n\tif ($user) {\n\t\tif (strcmp($email, $user->email) != 0) {\n\t\t\tif (!get_user_by_email($email)) {\n\t\t\t\t$user->new_email = $email;\n\t\t\t\tset_input('email', $user->email);\n\t\t\t\temail_revalidate_request_validation($user->guid);\n\t\t\t} else {\n\t\t\t\tregister_error(elgg_echo('registration:dupeemail'));\n\t\t\t}\n\t\t} else {\n\t\t\tunset($user->new_email);\n\t\t\treturn null;\n\t\t}\n\t} else {\n\t\tregister_error(elgg_echo('email:save:fail'));\n\t}\n\treturn false;\n}", "public function save_settings_callback() {\r\n $setting_data = $this->ajax_data['setting_data'];\r\n\r\n labb_update_options($setting_data);\r\n\r\n $template = false;\r\n // get new restore global settings panel\r\n if ($this->ajax_data['reset']) {\r\n ob_start();\r\n require_once('views/settings.php');\r\n $template = ob_get_clean();\r\n }\r\n\r\n $response = $this->ajax_response(true, $this->ajax_data['reset'], $template);\r\n return $response;\r\n\r\n }", "public static function Save()\r\n {\r\n return update_option(self::OPT_SETTINGS, self::$Data);\r\n }", "public function save()\n\t{\n\t\tglobal $tpl, $lng, $ilCtrl;\n\t\n\t\t$pl = $this->getPluginObject();\n\t\t\n\t\t$form = $this->initConfigurationForm();\n\t\tif ($form->checkInput())\n\t\t{\n\t\t\t$set1 = $form->getInput(\"setting_1\");\n\t\t\t$set2 = $form->getInput(\"setting_2\");\n\t\n\t\t\t// @todo: implement saving to db\n\t\t\t\n\t\t\tilUtil::sendSuccess($pl->txt(\"saving_invoked\"), true);\n\t\t\t$ilCtrl->redirect($this, \"configure\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$form->setValuesByPost();\n\t\t\t$tpl->setContent($form->getHtml());\n\t\t}\n\t}", "function store(){\n update_option( $this->option_name, $this->settings );\n }", "private function _saveSettings($type)\n {\n $success = true;\n\n // Get all available settings for this type\n $availableSettings = craft()->amSearch_settings->getSettingsByType($type);\n\n // Save each available setting\n foreach ($availableSettings as $setting) {\n // Find new settings\n $newSettings = craft()->request->getPost($setting->handle, false);\n\n if ($newSettings !== false) {\n $setting->value = $newSettings;\n if(! craft()->amSearch_settings->saveSettings($setting)) {\n $success = false;\n }\n }\n }\n\n if ($success) {\n craft()->userSession->setNotice(Craft::t('Settings saved.'));\n }\n else {\n craft()->userSession->setError(Craft::t('Couldn’t save settings.'));\n }\n }", "public function save(array $options = [])\n {\n parent::save($options);\n\n // delete cache\n Cache::forget('Klaravel\\Settings\\Setting');\n }", "protected static function setSettingData($arSettings)\r\n\t{\r\n\t\treturn (boolean)file_put_contents(__DIR__ . '/settings.json', static::wrapData($arSettings));\r\n\t}", "public function save_settings($profile_id, $elements, $settings)\n\t{\n\t\t// --------------------------------------------\n\t\t// Check for Required Fields\n\t\t// --------------------------------------------\n\n\t\tif ( empty($_POST['unique_field_element']) OR empty($_POST['unique_field']))\n\t\t{\n\t\t\treturn $this->error_page('A Unique Field Element with valid EE Field Are Required.');\n\t\t}\n\n\t\t$group_id_default = ee()->input->post('group_id_default');\n\n\t\tif ( empty($_POST['group_id_element']) && ! ctype_digit($group_id_default))\n\t\t{\n\t\t\treturn $this->error_page('Must choose a valid Member Group element or valid default option.');\n\t\t}\n\n\t\tif ( empty($_POST['username_element']) && ee()->input->post('username_default') == 'none')\n\t\t{\n\t\t\treturn $this->error_page('Must choose a valid Username element or valid default option.');\n\t\t}\n\n\t\tif ( empty($_POST['screen_name_element']) && ee()->input->post('screen_name_default') == 'none')\n\t\t{\n\t\t\treturn $this->error_page('Must choose a valid Screen Name element or valid default option.');\n\t\t}\n\n\t\tif ( empty($_POST['email_element']))\n\t\t{\n\t\t\treturn $this->error_page('Must choose a valid Email element.');\n\t\t}\n\n\t\t// --------------------------------------------\n\t\t// Forced Security!\n\t\t// --------------------------------------------\n\n\t\t$_POST['unique_id_default'] = 'auto';\n\t\t$_POST['unique_id_element'] = '';\n\t\t$_POST['password_default'] = 'auto';\n\t\t$_POST['password_element'] = '';\n\n\t\t// --------------------------------------------\n\t\t// Custom Fields\n\t\t// --------------------------------------------\n\n\t\t$query = ee()->db->query(\"SHOW COLUMNS FROM exp_members\");\n\n\t\tforeach($query->result_array() as $row)\n\t\t{\n\t\t\t$field_name = $row['Field'];\n\n\t\t\tif ( in_array($field_name, $this->ignore_fields())) continue;\n\n\t\t\t// Keep our default settings\n\t\t\tif ( ! empty($this->default_settings[$field_name.'_element'])) continue;\n\n\t\t\t// Create defaults for fields (POST data is handled below)\n\t\t\t$this->default_settings[$field_name.'_element']\t= '';\n\t\t\t$this->default_settings[$field_name.'_default']\t= '';\n\t\t}\n\n\t\t// --------------------------------------------\n\t\t// Retrieve the Member Custom Fields\n\t\t// --------------------------------------------\n\n\t\t$vars['custom_fields'] = array();\n\n\t\t$query = ee()->db->query(\"SELECT *,\n\t\t\t\t\t\t\t\t m_field_name AS field_name,\n\t\t\t\t\t\t\t\t m_field_label AS field_label,\n\t\t\t\t\t\t\t\t m_field_id AS field_id,\n\t\t\t\t\t\t\t\t m_field_type AS field_type,\n\t\t\t\t\t\t\t\t m_field_required AS field_required,\n\t\t\t\t\t\t\t\t m_field_list_items AS field_list_items\n\t\t\t\t\t\t\t\t FROM exp_member_fields\n\t\t\t\t\t\t\t\t ORDER BY m_field_order\");\n\n\t\tforeach($query->result_array() as $row)\n\t\t{\n\t\t\textract($row);\n\n\t\t\t$field_name = 'm_field_id_'.$row['field_id'];\n\n\t\t\tif ( in_array($field_name, $this->ignore_fields())) continue;\n\n\t\t\t// Create defaults for fields (POST data is handled below)\n\t\t\t$this->default_settings[$field_name.'_element']\t= '';\n\t\t\t$this->default_settings[$field_name.'_default']\t= '';\n\n\t\t\t// Do a little validation for list_items?\n\t\t\t// One wonders why a SuperAdmin would do an import and then hack the form...\n\t\t\t// Definitely should validate during the Importing though.\n\t\t}\n\n\t\t// --------------------------------------------\n\t\t// Insert Settings!\n\t\t// --------------------------------------------\n\n\t\t$insert_settings = array();\n\n\t\tforeach($this->default_settings as $field => $default_value)\n\t\t{\n\t\t\tif (ee()->input->post($field) === FALSE)\n\t\t\t{\n\t\t\t\t$insert_settings[$field] = (is_array($default_value)) ?\n\t\t\t\t\t\t\t\t\t\t\timplode('|', $default_value) :\n\t\t\t\t\t\t\t\t\t\t\t$default_value;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$insert_settings[$field] = (is_array(ee()->input->post($field))) ?\n\t\t\t\t\t\t\t\t\t\t\timplode('|', ee()->input->post($field)) :\n\t\t\t\t\t\t\t\t\t\t\tee()->input->post($field);\n\t\t\t}\n\t\t}\n\n\t\treturn $insert_settings;\n\t}", "function saveExternalSettings()\n\t\t{\n\t\t\t$this->Init();\n\n\t\t\t$props = array();\n\t\t\t$props[PR_EC_OUTOFOFFICE] = $this->settings[\"outofoffice\"][\"set\"] == \"true\";\n\t\t\t$props[PR_EC_OUTOFOFFICE_MSG] = utf8_to_windows1252($this->settings[\"outofoffice\"][\"message\"]);\n\t\t\t$props[PR_EC_OUTOFOFFICE_SUBJECT] = utf8_to_windows1252($this->settings[\"outofoffice\"][\"subject\"]);\n\t\n\t\t\tmapi_setprops($this->store, $props);\n\t\t\tmapi_savechanges($this->store);\n\t\t\t\n\t\t\t// remove external settings so we don't save the external settings to PR_EC_WEBACCESS_SETTINGS\n\t\t\tunset($this->settings[\"outofoffice\"]);\n\t\t}", "private function saveConfig(){\n\t\tif(!isset($_POST['services_ipsec_settings_enabled'])){\n\t\t\t$this->data['enable'] = 'false';\n\t\t}\n\t\telseif($_POST['services_ipsec_settings_enabled'] == 'true'){\n\t\t\t$this->data['enable'] = 'true';\n\t\t}\n\t\t\n\t\t$this->config->saveConfig();\n\t\t$this->returnConfig();\n\t}", "public function settings( $settings ) {\n\t\t$settings['dev_fund_user'] = array(\n\t\t\t'id' => 'dev_fund_user',\n\t\t\t'type' => 'text',\n\t\t\t'size' => 'small',\n\t\t\t'name' => 'Development Fund User ID',\n\t\t\t'desc' => 'Enter the User ID of the development fund account'\n\t\t);\n\t\treturn $settings;\n\t}", "public function save()\n\t{\n\t\t// -> means the file was never loaded because no setting was changed\n\t\t// -> means no need to save\n\t\tif ($this->settings === null) return;\n\t\t\n\t\t$yaml = Spyc::YAMLDump($this->settings);\n\t}", "public function saveSettings($namespace, Settings $settings);", "static public function get_saved_settings() {\n\t\tif ( self::$settings ) {\n\t\t\treturn self::$settings;\n\t\t}\n\n\t\t$roles = self::get_all_roles();\n\t\t$settings = FLBuilderModel::get_admin_settings_option( '_fl_builder_user_access', true );\n\t\t$ms_settings = FLBuilderModel::get_admin_settings_option( '_fl_builder_user_access', false );\n\t\t$ms_support = FLBuilderAdminSettings::multisite_support();\n\n\t\tif ( ! is_array( $settings ) ) {\n\t\t\t$settings = array();\n\t\t}\n\n\t\tforeach ( self::$registered_settings as $key => $data ) {\n\n\t\t\tif ( ! isset( $settings[ $key ] ) ) {\n\t\t\t\tif ( $ms_support && isset( $ms_settings[ $key ] ) ) {\n\t\t\t\t\t$settings[ $key ] = $ms_settings[ $key ];\n\t\t\t\t} else {\n\t\t\t\t\t$settings[ $key ] = array();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tforeach ( $roles as $role_key => $role_data ) {\n\n\t\t\t\tif ( ! isset( $settings[ $key ][ $role_key ] ) ) {\n\n\t\t\t\t\tif ( ! isset( $data['default'] ) || ! $data['default'] ) {\n\t\t\t\t\t\t$settings[ $key ][ $role_key ] = false;\n\t\t\t\t\t} elseif ( is_array( $data['default'] ) ) {\n\n\t\t\t\t\t\tif ( in_array( $role_key, $data['default'] ) ) {\n\t\t\t\t\t\t\t$settings[ $key ][ $role_key ] = true;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$settings[ $key ][ $role_key ] = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$settings[ $key ][ $role_key ] = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tself::$settings = $settings;\n\n\t\treturn $settings;\n\t}", "public static function loadSettingsAfterLogin() {\r\n\t\t//try to load from DB\r\n\t\t$settings=UserSettings::model()->findByAttributes(array('userId'=>Yii::app()->user->getId()));\r\n\t\t\r\n\t\tif(is_null($settings)) {\r\n\t\t\t//if there is nothing in DB, keep what is in session data, if anything is there\r\n\t\t\t$settings=Yii::app()->user->getState('settings');\r\n\t\t\t\r\n\t\t\t//else just use new\r\n\t\t\tif(is_null($settings)) {\r\n\t\t\t\t$settings=new UserSettings();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\t\r\n\t\tYii::app()->user->setState('settings', $settings);\r\n\t}", "function savesettings()\r\n {\r\n\t\t$this->_savesettings();\r\n $this->setRedirect('index.php?option=com_jfusionconnect&view=cpanel');\r\n }", "function set( $key , $value , $autoload = false , $user = 0 , $app = 'system' )\n\t{\n\t\t// get option if exists\n\t\tif( $key != null )\n\t\t{\n\t\t\t$this->db->where( 'key' , $key );\n\t\t}\n\t\tif( $user != 0 )\n\t\t{\n\t\t\t$this->db->where( 'user' , $user );\n\t\t}\n\t\t\n\t\t$query\t\t=\t$this->db->get( 'options' );\t\t\t\n\t\t$options\t=\t$query->result_array();\n\t\t$value\t\t=\tis_array( $value ) ? json_encode( $value ) : $value; // converting array to JSON\n\t\t$value\t\t=\tis_bool( $value ) ? $value === true ? 'true' : 'false' : $value; // Converting Bool to string\n\t\tif( $options )\n\t\t{\n\t\t\t$this->db->where( 'key' , $key );\n\t\t\t\n\t\t\tif( $user != 0 )\n\t\t\t{\n\t\t\t\t$this->db->where( 'user' , $user );\n\t\t\t}\n\t\t\t$this->db->update( 'options' , array(\n\t\t\t\t'key'\t\t=>\t$key,\n\t\t\t\t'value'\t\t=>\t$value,\n\t\t\t\t'autoload'\t=>\t$autoload,\n\t\t\t\t'user'\t\t=>\t$user,\n\t\t\t\t'app'\t\t=>\t$app\n\t\t\t) );\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->db->insert( 'options' , array( \n\t\t\t\t'key'\t=>\t$key,\n\t\t\t\t'value'\t=>\t$value,\n\t\t\t\t'autoload'\t=>\t$autoload,\n\t\t\t\t'user'\t\t=>\t$user,\n\t\t\t\t'app'\t\t=>\t$app\n\t\t\t) );\n\t\t}\n\t}", "function update_setting($option)\n\t{\n\t\tswitch ($option)\n\t\t{\n\t\t\tcase 'general':\n\t\t\t\t$this->db->set('language', $this->input->post('language'));\n\t\t\t\t$this->db->set('paging', $this->input->post('paging'));\n\t\t\t\t$this->db->set('permanent_delete', $this->input->post('permanent_delete'));\n\t\t\t\t$this->db->set('delivery_report', $this->input->post('delivery_report'));\n\t\t\t\t$this->db->set('conversation_sort', $this->input->post('conversation_sort'));\n\t\t\t\t$this->db->set('country_code', $this->input->post('dial_code'));\n\t\t\t\t$this->db->where('id_user', $this->session->userdata('id_user'));\n\t\t\t\t$this->db->update('user_settings');\n\t\t\t\tbreak;\n\n\t\t\tcase 'personal':\n\t\t\t\t$this->db->set('realname', $this->input->post('realname'));\n\t\t\t\t$this->db->set('username', $this->input->post('username'));\n\t\t\t\t$this->db->set('phone_number', $this->input->post('phone_number'));\n\t\t\t\t$this->db->where('id_user', $this->session->userdata('id_user'));\n\t\t\t\t$this->db->update('user');\n\n\t\t\t\t$sig_opt = $this->input->post('signatureoption');\n\t\t\t\t$this->db->set('signature', $sig_opt.';'.$this->input->post('signature'));\n\t\t\t\t$this->db->where('id_user', $this->session->userdata('id_user'));\n\t\t\t\t$this->db->update('user_settings');\n\t\t\t\tbreak;\n\n\t\t\tcase 'appearance':\n\t\t\t\t$this->db->set('theme', $this->input->post('theme'));\n\t\t\t\t$this->db->set('bg_image', $this->input->post('bg_image_option').';background.jpg');\n\t\t\t\t$this->db->where('id_user', $this->session->userdata('id_user'));\n\t\t\t\t$this->db->update('user_settings');\n\t\t\t\tbreak;\n\n\t\t\tcase 'password':\n\t\t\t\t$this->db->set('password', password_hash($this->input->post('new_password'), PASSWORD_BCRYPT));\n\t\t\t\t$this->db->where('id_user', $this->session->userdata('id_user'));\n\t\t\t\t$this->db->update('user');\n\t\t\t\tbreak;\n\n\t\t\tcase 'filters':\n\t\t\t\t$id_filter = $this->input->post('id_filter');\n\t\t\t\t$this->db->set('from', $this->input->post('from'));\n\t\t\t\t$this->db->set('has_the_words', $this->input->post('has_the_words'));\n\t\t\t\t$this->db->set('id_folder', $this->input->post('id_folder'));\n\t\t\t\t$this->db->set('id_user', $this->input->post('id_user'));\n\n\t\t\t\tif ( ! empty($id_filter))\n\t\t\t\t{\n\t\t\t\t\t$this->db->where('id_filter', $id_filter);\n\t\t\t\t\t$this->db->update('user_filters');\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$this->db->insert('user_filters');\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t}" ]
[ "0.7115756", "0.68787223", "0.6819958", "0.6615483", "0.64693767", "0.6369531", "0.6365924", "0.63436824", "0.63341576", "0.63057685", "0.6304582", "0.6268117", "0.62590814", "0.6219204", "0.6161533", "0.6159846", "0.6023926", "0.6004178", "0.5995158", "0.5974717", "0.5957768", "0.59275496", "0.59069943", "0.58692706", "0.5864377", "0.58563244", "0.58299583", "0.57943124", "0.5791594", "0.5773017", "0.5769336", "0.57653725", "0.5744896", "0.57388616", "0.56725824", "0.5664474", "0.56597817", "0.5654122", "0.5621039", "0.5603351", "0.56026274", "0.556072", "0.55522364", "0.55185395", "0.54967684", "0.54939675", "0.5477192", "0.5470245", "0.5452228", "0.5448345", "0.54456604", "0.5426737", "0.541879", "0.5415861", "0.5404616", "0.53872687", "0.53826356", "0.5378817", "0.5364827", "0.53353137", "0.53226286", "0.53003913", "0.5295084", "0.5273115", "0.52658314", "0.52653086", "0.52580565", "0.5254467", "0.52543527", "0.524422", "0.52253723", "0.5213657", "0.5205255", "0.5201435", "0.51841664", "0.5176449", "0.5176169", "0.5167606", "0.5161511", "0.5141305", "0.51362073", "0.5110839", "0.5099184", "0.50910497", "0.509052", "0.50724065", "0.50618213", "0.50532264", "0.504654", "0.5043653", "0.5029055", "0.5019179", "0.50164276", "0.5015174", "0.5014287", "0.5013336", "0.5011178", "0.50076014", "0.50019073", "0.49984896" ]
0.83645856
0
Whether the storage backend has cookies for the currently active user. Even cookiefile (filebased jars) MUST answer this question, for example by checking if their desired cookiefile exists and is nonempty. And all other storage backends (such as databases) MUST also verify that their existing cookie data is nonempty. Don't validate the actual cookie contents, just look for nonzero size!
public function hasUserCookies () { // Simply check if the storage key for cookies exists and is non-empty. return ! empty($this->loadUserCookies()) ? true : false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function cookieExists(): bool\n {\n $result = true;\n if (empty($_COOKIE)) {\n $result = false;\n }\n return $result;\n }", "public function hasCookies() {\n\t\treturn $this->hasFirstPartyCookies() || $this->hasThirdPartyCookies();\n\t}", "public function cookieExists() {\n if (isset($_COOKIE[$this->cookie['name']])){\n return true;\n }\n\n return false;\n }", "public static function checkAuthCookie()\n {\n foreach (self::get() as $value) {\n if ($value === null) {\n return false;\n }\n }\n\n return true;\n }", "public function cookieIsset() {\n\t\tif(isset($_COOKIE[$this->cookieName])) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public function isSetSessionCookie() {}", "public function isSetSessionCookie() {}", "public static function isExist() {\n return ((self::$_isSessionRunning) && !empty($_COOKIE[session_name()]));\n }", "public function kapee_cookie_setted() {\n\t\treturn isset( $_COOKIE[self::$cookie['name']] );\n\t}", "public function isCookieSet() {}", "function _checkCookies() {\n if(isset($_COOKIE)) {\n if(isset($_COOKIE['user'])) {\n $_SESSION['is_login'] = true;\n $_SESSION['userid'] = $_COOKIE['user'];\n }\n }\n }", "public function is_cookie_set()\n {\n }", "private function checkCookie()\n\t\t{\n\t\t\tif(!empty($_COOKIE['auth_username']) && !empty($_COOKIE['auth_password']))\n\t\t\t\treturn $this->check($_COOKIE['auth_username'], $_COOKIE['auth_password']);\n\t\t}", "function checkCookie(){\n global $cookie;\n\n // Check database to see if a user exists with this cookie\n if (getSingleValue(\"SELECT COUNT(`id`) FROM `private_users` WHERE `cookie` ='\" . $cookie . \"' LIMIT 0 , 1\") != 1){\n // Some user has this cookie, it is valid\n return false;\n }else{\n // Nobody has this cookie, therefore it's invalid\n return true;\n }\n}", "public function valid() \n {\n return isset($_COOKIE[$this->key()]);\n }", "public function hasRememberMe()\n\t{\n return $this->cookies->has('RMU');\n }", "public static function exists($name){\n return (isset($_COOKIE[$name])) ? true : false;\n }", "public function has_cookie($name) {\n if (isset($this->_cookies[$name])) {\n return true;\n } else {\n return false;\n }\n }", "public function isLoggedIn() {\n $auth_cookie = Cookie::get(\"auth_cookie\"); //get hash from browser\n //check if cookie is valid\n if ($auth_cookie != '' && $this->cookieIsValid($auth_cookie)) {\n return true;\n } else {\n return false;\n }\n }", "function exists() {\n $this->log .= \"exists() called<br />\";\n if (!isset($_COOKIE['sid'])) {\n $this->log .= \"sid cookie does not exist.<br />\";\n return false;\n }\n $this->id = $_COOKIE['sid'];\n $this->filename = $this->dir.\"sid_\".$this->id;\n return true;\n }", "private function _loginPermitted ()\r\n {\r\n if(empty($_COOKIE[self::$_cookieCount])) {\r\n return true;\r\n }\r\n\r\n return $_COOKIE[self::$_cookieCount] < self::$_incercari;\r\n }", "public function hasRememberMe()\n {\n return $this->cookies->has('RMU');\n }", "public static function exists($name){\n\t\treturn (isset($_COOKIE[$name])) ? true : false;\t\t\t\t// Returns similar to the session method for the name we have defined and see if the cookie has been set.\n\t}", "public static function exists($name) {\n return (isset($_COOKIE[$name])) ? true : false;\n }", "function exists() {\r\n\t\t$this->log .= \"exists() called<br />\";\r\n\t\tif (!isset($_COOKIE['sid'])) {\r\n\t\t $this->log .= \"sid cookie does not exist.<br />\";\r\n\t\t return false;\r\n\t\t}\r\n\t\t$this->id = $_COOKIE['sid'];\r\n\t\t$this->filename = $this->dir.\"sid_\".$this->id;\r\n\t\treturn true;\r\n\t}", "protected function _hasCookie($cookie_name)\n {\n\n if (!$this->request->hasCookie($cookie_name))\n {\n Cookie::queue(Cookie::forever($cookie_name, 1)); //Cookie::forever($cookie_name, '1');\n return false;\n }\n else\n {\n return true;\n }\n\n }", "public function hasQueueingCookie(): bool;", "private static function is_logged_in () {\n\t\t# Check for the existence of the cookie\n\t\tif (isset($_COOKIE[\"user_id\"])) {\n\t\t\treturn (true);\n\t\t} else {\n\t\t\treturn (false);\n\t\t}\n\t}", "public static function exists($name) {\n\t\t\treturn (isset($_COOKIE[$name])) ? true : false;\n\t\t}", "public static function exists($name) {\n\t\t\treturn (isset($_COOKIE[$name])) ? true : false;\n\t\t}", "public function hasFirstPartyCookies() {\n\t\treturn $this->firstPartyCookies;\n\t}", "public function exists($key){\n return isset($_COOKIE[$key]);\n }", "public function has($path) {\n\t\treturn isset($_COOKIE[$path]);\n\t}", "public static function exists($name){\n\t\treturn isset($_COOKIE[$name]);\n\t}", "function isCookieSet (){\n if (empty ($_COOKIE['id'])){\n header (\"location: error.php\");\n }\n}", "private function verifyCookie()\n {\n if (isset($this->cookie['auth'])\n && isset($this->cookie['userid'])\n && !empty($this->cookie['auth'])\n && !empty($this->cookie['userid'])\n && ($this->cookie['userid'] > 0)\n ) {\n $this->db->prepare('SELECT `authSalt` FROM `' . $this->config['authTable'] . '` WHERE `' . $this->config['userColumn'] . '` = ?');\n $this->db->execute(array($this->cookie['userid']), 's');\n $result = $this->db->fetch();\n\n if (!$result) {\n return false;\n }\n\n $dbHash = hash('sha256', $result['authSalt'] . $this->cookie['userid']);\n\n if ($dbHash === $this->cookie['auth']) {\n return true;\n }\n }\n return false;\n }", "function verifyCookies()\n\t{\n\t\tif (isset($_COOKIE['cookieUserName']))\n\t\t{\n\t\t\techo json_encode(array('cookieUserName' => $_COOKIE['cookieUserName']));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t# Cookie not set yet\n\t\t die(json_encode(errors(417)));\n\t\t}\n\t}", "public function cookieExists($key) {\n return isset($_COOKIE[$key]);\n }", "public static function has($key){\n\n return isset($_COOKIE[$key]);\n }", "function isCookieValid($db){\n $isValid = false;\n\n if(isset($_COOKIE['rememberUserCookie'])){\n /**\n * Decode cookies and extract user ID\n */\n $decryptCookieData = base64_decode($_COOKIE['rememberUserCookie']);\n $user_id = explode(\"abcdefABCDEF1234567890\", $decryptCookieData);\n $userID = $user_id[1];\n /**\n * check if id retrieved from the cookie exists in the database\n */\n $sqlQuery = \"SELECT * FROM users WHERE id = :id\";\n $statement = $db->prepare($sqlQuery);\n $statement->exectue(array(':id' => $userID));\n \n if($row = $statement->fetch()){\n $id = $row['id'];\n $username = $row['username'];\n //create the user session variable\n $_SESSION['id']=$id;\n $_SESSION['username']=$username;\n $isValid = true;\n }else{\n $isValid = false;\n signout();\n }\n }\n return $isValid;\n }", "public static function isExist($key) {\n return isset($_COOKIE[$key]);\n }", "public static function isLoggedIn()\n {\n return array_key_exists(LOGIN_USERNAME, $_COOKIE) && array_key_exists(LOGIN_PASSWORD, $_COOKIE);\n }", "function isCookieValid( $db ) {\n\n\t$isValid = false;\n\n\tif ( isset( $_COOKIE['rememberUserCookie']) ) {\n\n\t\t/**\n\t\t * Decode cookies and extract user ID\n\t\t */\n\t\t$decryptCookieData = base64_decode( $_COOKIE['rememberUserCookie'] );\n\t\t$user_id = explode( \"UaQteh5i4y3dntstemYODEC\", $decryptCookieData );\n\t\t$userID = $user_id[1];\n\n\t\t/**\n\t\t * check if id retrieved from the cookie exist in the database\n\t\t */\n\t\t$sqlQuery = \"SELECT * FROM users WHERE id = :id\";\n\t\t$statement = $db->prepare($sqlQuery);\n\t\t$statement->execute( array( ':id' => $userID) );\n\n\t\tif ( $row = $statement->fetch() ) {\n\n\t\t\t$id = $row['id'];\n\t\t\t$username = $row['username'];\n\n\t\t\t/**\n\t\t\t * Create the user session variable\n\t\t\t */\n\t\t\t$_SESSION['id'] = $id;\n\t\t\t$_SESSION['username'] = $username;\n\t\t\t$isValid = true;\n\n\t\t}else {\n\t\t\t/**\n\t\t\t * cookie ID is invalid destroy session and logout user\n\t\t\t */\n\t\t\t$isValid = false;\n\t\t\tsignout();\n\t\t}\n\n\t}\n\n\treturn $isValid;\n}", "public static function exists(string $name) : bool {\n\n\t\t\treturn isset($_COOKIE[$name]);\n\t\t}", "public function hasThirdPartyCookies() {\n\t\treturn $this->thirdPartyCookies;\n\t}", "function _verify_cookie()\n\t{\n\t\tif((array_key_exists('login_attempts', $_COOKIE)) && ($_COOKIE['login_attempts'] >= 5))\n\t\t{\n\t\t\t$username = $this->CI->session->userdata('username');\n\t\t\t$userdata = $this->CI->db->query(\"SELECT * FROM `users` WHERE `username` = '$username'\");\n\t\t\t\n\t\t\t$result = $userdata->row();\n\n\t\t\t$identifier = $result->username . $result->token;\n\t\t\t$identifier = $this->_salt($identifier);\n\t\t\t\n\t\t\tif($identifier !== $_COOKIE['logged_in'])\n\t\t\t{\n\t\t\t\t$this->CI->session->sess_destroy();\n\t\t\t\t\n\t\t\t\tshow_error($this->CI->lang->line('logout_perms_error'));\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->_generate();\n\t\t}\n\t}", "protected function validateRememberMeCookie()\r\n\t{\r\n\t\t$cookieValue = $this->getCookie()->getValue();\r\n\r\n\t\tif (!$cookieValue) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t$triplet = PersistentTriplet::fromString($cookieValue);\r\n\r\n\t\tif (!$triplet->isValid()) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\t}", "public static function has(string $name): bool\n {\n return isset($_COOKIE[$name]);\n }", "public function has($name)\n\t{\n\t\tif (isset($this->cookies[$name])) {\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\tif (isset($_COOKIE[\"{$this->prefix}$name\"])) {\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "public static function validateCookies() {\n\t\tforeach ( $_COOKIE as $key => $value ) {\n\t\t\t// Skip our session cookie which isn't created via our cookie functions\n\t\t\tif ($key != session_name ()) {\n\t\t\t\t$parts = explode ( '--', $value );\n\t\t\t\tif (! isset ( $parts [1] ) or $parts [1] != md5 ( $parts [0] . Security_Config::$salt )) {\n\t\t\t\t\tself::destroyCookie ( $key );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn;\n\t}", "private static function Detect() {\n\t\n\t\t#print_r($_COOKIE); core_halt();\n\t\t\n\t\t// check to see if a cookie is set\n\t\t$cookie = isset($_COOKIE[self::$variable]) ? strtolower($_COOKIE[self::$variable]) : false;\n\t\tif($cookie !== false && strlen($cookie) == self::$KeyLen && ctype_alnum($cookie)) {\n\t\t\tself::$sid = $cookie;\n\t\t} else {\n\t\t\tself::$sid = FALSE;\n\t\t}\n\t}", "public static function exists (string $cookie_name)\n {\n if (isset($_COOKIE[$cookie_name])){\n return true;\n }\n return false;\n }", "function testCookies() {\n\t$config = getConfig();\n\t$root = getRootPath();\n\t\n\t// Get the test page.\n\t$http = new \\AutoHttp\\Http($config);\n\t$page = $http->getPage($root . '/test/pages/http/cookie.php');\n\t\n\t// Verify we didn't send a cookie.\n\tif (strpos($page['body'], \"Cookie named 'user' is not set!\") === false)\n\t\treturn 'The cookie shouldn\\'t be set on our first page access.';\n\t\t\n\t// Get the page again.\n\t$page = $http->getPage($root . '/test/pages/http/cookie.php');\n\t\n\t// Verify we sent a cookie this time.\t\t\n\tif (strpos($page['body'], \"Cookie 'user' is set!\") === false ||\n\t\tstrpos($page['body'], \"Value is: John Doe\") === false)\n\t\treturn 'The cookie should be set on our second page access.';\n\t\t\n\treturn true;\n}", "function _tsuiseki_tracking_validate_cookie_value($cookie_data) {\n $cookie_data = (string)trim($cookie_data);\n $time = time();\n $valid = FALSE;\n if (!empty($cookie_data)) {\n $parts = _tsuiseki_tracking_extract_cookie_data($cookie_data);\n if ($parts['expiration_time'] > $time) {\n $name = (string)trim($parts['name']);\n $expiration_time = (int)$parts['expiration_time'];\n $data = (string)trim($parts['data']);\n $hmac = (string)trim($parts['hmac']);\n $key = _tsuiseki_tracking_calculate_k($name, $expiration_time, TSUISEKI_TRACKER_HMAC_KEY);\n $t_hmac = hash_hmac(TSUISEKI_TRACKER_HMAC_ALGORITHM, $name . $expiration_time . $data . session_id(), $key);\n if ($hmac === $t_hmac) {\n $valid = TRUE;\n }\n }\n }\n return $valid;\n}", "public function isLoggedIn() {\n $cookie = $this->login();\n return $cookie != NULL;\n }", "public function isRefreshTimeBasedCookie() {}", "public function isRefreshTimeBasedCookie() {}", "function check_cookie($p)\n{\n\tif(isset($_COOKIE['star_'.$p])) \n\t{ \n\t\treturn true;\n\t}\n\telse\n\t{\n\t\treturn false;\n\t} \n}", "public function isCookieHttpOnly()\n {\n return $this->_cookieHttpOnly;\n }", "public function hasIdentity() {\n $objAuth = Zend_Auth::getInstance();\n \n // Verifica se já está autenticado\n if ($objAuth->hasIdentity()) {\n \treturn true;\n } else {\n \tif(Zf_Util_Cookie::cookieExists( Zend_Registry::get('admin_config')->resources->cookie->name )) {\n \t\t\n \t}\n }\n }", "public function count() {\n\t\treturn count($_COOKIE);\n\t}", "public function hasIdentity()\n {\n return !empty($this->storage[$this->storageKey]);\n }", "public function hasObjectForKey($key)\n {\n $key = $this->cookieScopePrefix . $key;\n\n return isset($this->cookies[$key]);\n }", "public static function exists($name)\r\n\t{\r\n\t\t$name = \\Filter::systemID($name);\r\n\t\treturn (array_key_exists($name, $_COOKIE) ? true : false);\r\n\t}", "static function keepMeLogged() {\n\t\treturn isset ( $_COOKIE [session_name ()] );\n\t}", "public function hasStored()\n\t{\n\t\tif( $_SESSION[__CLASS__][$this->questionId] !== null )\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "public static function cookieExists($cookieName)\n\t\t{\n\t\t if(isset($_COOKIE[$cookieName]))\n\t\t {\n\t\t \treturn(true);\n\t\t }\n\t\t else\n\t\t {\n\t\t \treturn(false);\n\t\t }\n\t\t}", "public function hasCookie($name)\n {\n return (bool) $this->getCookie($name);\n }", "function _checkRemembered($cookie) {\n list ($username, $cookie) = @ unserialize($cookie);\n\n if (!$username or !$cookie)\n return;\n\n $sql = \"SELECT * FROM user WHERE \" .\n \"(userid = \\\"$username\\\") AND (cookie = \\\"$cookie\\\");\";\n $result = $this->db->mysql_query($sql);\n $result = mysql_fetch_object($result);\n\n // if remember-me user is found in the database, set session for the user\n if (is_object($result)) {\n $this->_setSession($result, false, true);\n } else {\n $this->_logout();\n }\n }", "public static function isAllowedCookie( string $cookieName, WebRequest $request, User $user ): bool {\n\t\t$config = self::getConfig();\n\t\t$prefix = MediaWikiServices::getInstance()->getMainConfig()->get( 'CookiePrefix' );\n\t\t$name = str_replace( $prefix, '', $cookieName );\n\n\t\t$preferences = [\n\t\t\t'required' => true,\n\t\t\t'preference' => false,\n\t\t\t'statistic' => false,\n\t\t\t'marketing' => false,\n\t\t];\n\n\t\tif ( $user->isLoggedIn() ) {\n\t\t\t$options = MediaWikiServices::getInstance()->getUserOptionsManager()->getOptions( $user );\n\n\t\t\t$preferences['preference'] = $options['cookiewarning_cookies_preference'] ?? false;\n\t\t\t$preferences['statistic'] = $options['cookiewarning_cookies_statistic'] ?? false;\n\t\t\t$preferences['marketing'] = $options['cookiewarning_cookies_marketing'] ?? false;\n\t\t} elseif ( $request->getCookie( 'cookiewarning_preferences', $prefix ) !== null ) {\n\t\t\t$decoded = json_decode( $request->getCookie( 'cookiewarning_preferences', $prefix ), true );\n\t\t\tif ( $decoded !== null ) {\n\t\t\t\t$preferences['preference'] = $decoded['preference'] ?? false;\n\t\t\t\t$preferences['statistic'] = $decoded['statistic'] ?? false;\n\t\t\t\t$preferences['marketing'] = $decoded['marketing'] ?? false;\n\t\t\t}\n\t\t}\n\n\t\tif ( in_array( $name, $config->get( 'CookieWarningRequiredCookies' ), true ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif ( $preferences['preference'] === true && in_array( $name, $config->get( 'CookieWarningPreferenceCookies' ), true ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif ( $preferences['statistic'] === true && in_array( $name, $config->get( 'CookieWarningStatisticCookies' ), true ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif ( $preferences['marketing'] === true && in_array( $name, $config->get( 'CookieWarningMarketingCookies' ), true ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "private function cookieIsValid($hash) {\n //if hash in db\n $sql = \"SELECT username, expiredate, ip FROM \".PREFIX.\"sessions WHERE hash=:hash\";\n $cookie = $this->db->select($sql, array(\":hash\" => $hash));\n $count = count($cookie);\n if ($count == 0) {\n //hash did not exists deleting cookie\n Cookie::destroy(\"auth_cookie\", $hash);\n //Cookie::destroy(\"auth_cookie\", $hash, '');\n //setcookie(\"auth_cookie\", $hash, time() - 3600, \"/\");\n $this->logActivity('UNKNOWN', \"AUTH_CHECKCOOKIE\", \"User cookie cookie deleted - Hash ({$hash}) didn't exist\");\n return false;\n } else {\n $username = $cookie[0]->username;\n $db_expiredate = $cookie[0]->expiredate;\n $db_ip = $cookie[0]->ip;\n if ($_SERVER['REMOTE_ADDR'] != $db_ip) {\n //hash exists but ip is changed, delete cookie and hash\n $this->db->delete(PREFIX.'sessions', array('username' => $username));\n Cookie::destroy(\"auth_cookie\", $hash);\n //setcookie(\"auth_cookie\", $hash, time() - 3600, \"/\");\n $this->logActivity($username, \"AUTH_CHECKCOOKIE\", \"User cookie cookie deleted - IP Different ( DB : {$db_ip} / Current : \" . $_SERVER['REMOTE_ADDR'] . \" )\");\n return false;\n } else {\n $expiredate = strtotime($db_expiredate);\n $currentdate = strtotime(date(\"Y-m-d H:i:s\"));\n if ($currentdate > $expiredate) {\n //cookie has expired delete cookie and cookies\n $this->db->delete(PREFIX.'sessions', array('username' => $username));\n Cookie::destroy(\"auth_cookie\", $hash);\n //setcookie(\"auth_cookie\", $hash, time() - 3600, \"/\");\n $this->logActivity($username, \"AUTH_CHECKCOOKIE\", \"User cookie cookie deleted - Cookie expired ( Expire date : {$db_expiredate} )\");\n } else {\n //all ok\n return true;\n }\n }\n }\n }", "function check() {\n\t\tif (isset($_SESSION['id_user']) and isset($_SESSION['login_user'])) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\t//~ Verify the existence of cookies\n\t\t\tif (isset($_COOKIE['id_user']) and isset($_COOKIE['code_user'])) {\n\t\t\t\t//~ cookies exist. Verified with a table sessions.\n\t\t\t\t$id_user=mysql::screening($_COOKIE['id_user']);\n\t\t\t\t$code_user=mysql::screening($_COOKIE['code_user']);\n\t\t\t\t$query=mysql::query(\"SELECT `session`.*, `users`.`login_user` FROM `session` INNER JOIN `users` ON `users`.`id_user`=`session`.`id_user` WHERE `session`.`id_user`=\".$id_user.\";\");\n\t\t\t\tif ($query and mysql_num_rows($query)!=0) {\n\t\t\t\t\t//~ Cookies are found in the database\n\t\t\t\t\t$user_agent=mysql::screening($_SERVER['HTTP_USER_AGENT']);\n\t\t\t\t\twhile ($row=mysql_fetch_assoc($query)) {\n\t\t\t\t\t\tif ($row['code_sess']==$code_user and $row['user_agent_sess']==$user_agent) {\n\t\t\t\t\t\t\t//~ found record\n\t\t\t\t\t\t\tmysql::query(\"UPDATE `session` SET `used_sess` = `used_sess`+1 WHERE `id_sess` = \".$row['id_sess'].\";\");\n\t\t\t\t\t\t\t//~ start session and update cookie\n\t\t\t\t\t\t\t$_SESSION['id_user']=$row['id_user'];\n\t\t\t\t\t\t\t$_SESSION['login_user']=$row['login_user'];\n\t\t\t\t\t\t\tsetcookie(\"id_user\", $row['id_user'], time()+3600*24*30);\n\t\t\t\t\t\t\tsetcookie(\"code_user\", $row['code_sess'], time()+3600*24*30);\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t//~ No records with this pair of matching cookies/user agent\n\t\t\t\t\t$this->destroy_cookie();\n\t\t\t\t\treturn false;\n\t\t\t\t} else {\n\t\t\t\t\t//~ No records for this user\n\t\t\t\t\t$this->destroy_cookie();\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t//~ cookies nit exist\n\t\t\t\t$this->destroy_cookie();\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}", "function checkCookie( $cookie )\n {\n $query = $this->db->get_where( $this->_tablename, 'cookie = \\'' . $cookie . '\\'');\n $result = $query->result();\n \n if( count( $result ) <= 0 ) return false;\n \n foreach( $result as $row )\n {\n $this->setSessoin( $row );\n }\n \n return true;\n }", "public function hasCookie($name)\n {\n // check if request has specific cookie\n return (isset($this->cookies[$name]) && $this->cookies[$name]->getName() === $name);\n }", "function validate_auth_cookie( $user_id, $cookie ) {\n\t\tif ( wp_validate_auth_cookie( $cookie, 'logged_in' ) == $user_id ) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "private function _delete_auth_cookie()\n {\n // delete authentication user iformations from cookie if available\n if (get_cookie($this->config->item('auth_cookie_id'))) {\n delete_cookie($this->config->item('auth_cookie_id'));\n }\n\n // delete authentication encrypted key from cookie if available\n if (get_cookie($this->config->item('auth_cookie_key'))) {\n delete_cookie($this->config->item('auth_cookie_key'));\n }\n\n return TRUE;\n }", "public function exists() {\n return $this->sessionData !== false;\n }", "function is_cookie_invalid($username, $expiration, $hmac, $scheme) {\n\t\t\tglobal $wpdb;\n\t\t\t$table_name = $wpdb->prefix.InvalidateLoggedOutCookies::db_table();\n\n\t\t\t$sql = $wpdb->prepare( \"\n\t\t\t\tSELECT ID\n\t\t\t\tFROM $table_name\n\t\t\t\tWHERE username = %s\n\t\t\t\tAND expiration = %d\n\t\t\t\tAND hash = %s\n\t\t\t\tAND scheme = %s\n\t\t\t\tAND logged_out = 1\n\t\t\t\tLIMIT 1\",\n\t\t\t\t$username, $expiration, $hmac, $scheme);\n\t\t\t$row = $wpdb->get_row( $sql );\n\t\t\tif ( is_object($row) )\n\t\t\t\treturn true;\n\t\t\treturn false;\n\t\t}", "function checkLogined()\r\n{\r\n if ($_COOKIE['userName'] != \"\") {\r\n $mes=\"logined\";\r\n return $mes;\r\n }\r\n}", "public function hasPersistentLogin();", "public function testCookieEmpty()\n {\n $this->assertArrayEmpty($this->get_reflection_property_value('cookie'));\n }", "public function is_premium()\n {\n $cookie_manager = new CookieManager();\n if ($cookie_manager->validate_cookie($this->post_id)) {\n return true;\n } else {\n return false;\n }\n }", "public function checkAuth(){\n if( isset($_COOKIE['Auth']) ) {\n $result = $this->select(array(\"hash\"=>$_COOKIE['Auth']));\n if(!empty($result)){\n return $result[0];\n } else {\n return false;\n }\n \n } else {\n return false;\n }\n }", "public function isPreviewMode(){\n\n $cookie = Mage::getModel('core/cookie');\n\n if (isset($_GET['favizone_preview']) && $_GET['favizone_preview'] == \"true\") {\n\n $cookie->set('favizone_preview', true, Favizone_Recommender_Helper_Data::getLifeTime(), '/', null, false, false);\n return true;\n }\n if (isset($_GET['favizone_preview']) && $_GET['favizone_preview'] == \"false\") {\n\n $cookie->delete('favizone_preview');\n return false;\n }\n $preview_data = $cookie->get('favizone_preview');\n if(!empty($preview_data))\n return true;\n\n return false;\n\n }", "public function isRemembered() {\n if (isset($_SESSION) && isset($_SESSION[self::SESSION_FIELD_REMEMBERED])) {\n return $_SESSION[self::SESSION_FIELD_REMEMBERED];\n } else {\n return null;\n }\n }", "public function getCount() {\n\t\treturn count($_COOKIE);\n\t}", "function logged_in()\n{\n if(isset($_SESSION['email']) || isset($_COOKIE['email'])){\n return true;\n }else{\n return false;\n }\n}", "public function is_remember_me() {\n\t\treturn ! empty( $this->data['remember_me'] );\n\t}", "private static function hasCacheFile() {\r\n if (!isset(self::$_hasCacheFile)) {\r\n self::$_hasCacheFile = File::exists(ZEEYE_TMP_PATH . self::CACHE_FILE_PATH);\r\n }\r\n return self::$_hasCacheFile;\r\n }", "function has_account()\n{\n return file_exists(DEFAULT_ACCOUNTFILE);\n}", "public function checkAuth ()\n {\n if ($this->storage->isAvailable()) {\n if ($this->storage->get(self::$prefix . 'userId') !== NULL) {\n return true;\n } else {\n $this->logout();\n return false;\n }\n }\n\n return false;\n }", "function ts_check_if_use_control_panel_cookies()\r\n{\r\n\treturn false;\r\n}", "public static function isAuthenticated() {\n\n return isset($_SESSION[Security::SESSION_USER]) && $_SESSION[Security::SESSION_USER]->id > 0;\n\n }", "private function hasCache()\n {\n if (!$this->isActive()) {\n return false;\n }\n\n return !empty($this->getCache(false));\n }", "public function __isset($index) {\n\t\treturn isset($_COOKIE[$index]);\n\t}", "public function checkingManipulatedCookies($cookie){\n if($this->cookieStorage->load(self::$cookiePassword) != $cookie[0] || //coockie password\n $this->loginModel->setCookieTime() != $cookie[1] || //coockie time\n $this->cookieStorage->load(self::$cookieName) != $cookie[2] || //coockie username\n $this->getUsersBrowser() != $cookie[3] ) //users browser\n {\n return $this->returnMessages('Wrong information in cookies');\n }\n return false;\n }", "function is_logged()\n {\n // 1. Connect to the database.\n $link = connect();\n\n // 2. we'll need the information from the cookies.\n $id = array_key_exists('id', $_COOKIE) ? $_COOKIE['id'] : 0;\n $auth_code = array_key_exists('auth_code', $_COOKIE) ? $_COOKIE['auth_code'] : '';\n\n // 3. Protect variables to avoid any SQL injection\n $id = mysqli_real_escape_string($link, $id);\n $auth_code = mysqli_real_escape_string($link, $auth_code);\n $expiration = mysqli_real_escape_string($link, time());\n\n // 4. Generate a query and return the result.\n $result = mysqli_query($link, \"\n SELECT user_id\n FROM tbl_user_auth\n WHERE\n user_id = {$id} AND\n auth_code = '{$auth_code}' AND\n expiration > {$expiration}\n \");\n\n // 5. Disconnect from the database.\n disconnect($link);\n\n // 6. There should only be one row, or FALSE if nothing.\n return mysqli_num_rows($result) == 1;\n }", "public function hasCacheStore(): bool;", "function isLogged(){\n\n\tglobal $db;\n\tif(!isset($_COOKIE['caledonian']) || empty($_COOKIE['caledonian'])){\n\t\treturn false;\n\t}else{\n\t\t$db->where('session_token=?',array($_COOKIE['caledonian']))->getOne('users');\n\t\tif($db->count==0){return false;}else{return true;}\n\t}\n\n}", "public function getCookie() {\n\t\t$ret_val = false;\n\t\tif ($this->_cookie instanceof Http\\Cookie\\Iface\\Base) {\n\t\t\t$ret_val = $this->_cookie;\n\t\t}\n\t\treturn $ret_val;\n\t}" ]
[ "0.73646384", "0.72484255", "0.7026608", "0.69638735", "0.6844069", "0.6802924", "0.6802924", "0.67953223", "0.6784761", "0.67574275", "0.67271584", "0.66777676", "0.66728944", "0.664498", "0.65714896", "0.65262324", "0.649147", "0.64878434", "0.6419699", "0.6406596", "0.63996667", "0.6388033", "0.63722646", "0.63658935", "0.63493544", "0.6343249", "0.6336697", "0.63338387", "0.6332436", "0.6332436", "0.63263845", "0.63212264", "0.63192403", "0.62876713", "0.628724", "0.62331337", "0.623034", "0.6227665", "0.6195798", "0.61382306", "0.61328924", "0.6105385", "0.6094722", "0.6083631", "0.6080738", "0.60769343", "0.6076401", "0.6056802", "0.6050334", "0.6039658", "0.60336345", "0.60193956", "0.5961059", "0.59594595", "0.59503716", "0.5942231", "0.5942231", "0.59210813", "0.59187686", "0.59141964", "0.59137434", "0.59128094", "0.59027517", "0.58914876", "0.5889795", "0.5889366", "0.5888589", "0.5880687", "0.5841246", "0.58370763", "0.5836716", "0.5821566", "0.5801815", "0.5796053", "0.5790239", "0.57839346", "0.57834536", "0.5770309", "0.5739727", "0.57349366", "0.5728303", "0.5718439", "0.5714193", "0.57076097", "0.56950396", "0.56916875", "0.56788707", "0.5666662", "0.5640637", "0.56372756", "0.5630928", "0.56292665", "0.56233525", "0.56228584", "0.56127137", "0.56022626", "0.5593933", "0.55920184", "0.5590797", "0.55889803" ]
0.8070163
0
Get the cookiefile disk path (only if a filebased cookie jar is wanted). The file does not have to exist yet. It will be created by the caller ondemand when necessary.
public function getUserCookiesFilePath () { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function configCookiePath()\n\t{\n\t\treturn dirname(__FILE__) . '\\cookiefile';\n\t}", "function get_cookie_path()\n{\n global $SITE_INFO;\n $ret = array_key_exists('cookie_path', $SITE_INFO) ? $SITE_INFO['cookie_path'] : '/';\n return ($ret == '') ? null : $ret;\n}", "function getCookiePath()\n{\n\t$URL_Array = array();\n\t$URL_Array = parse_url(curPageURL());\n\t$cookie_path = $URL_Array['path'];\n\n\t$pos = strrpos($cookie_path, \"/\");\n\tif ($pos === false) \n\t{ \n\t // can't find a proper URL, return \"/\" as the cookie position.\n\t $cookie_path = \"/\";\n\t}\n\telse\n\t $cookie_path = substr($cookie_path, 0, $pos) . \"/\";\n\n\treturn $cookie_path;\n}", "private function getCacheFile() {\n return new File($this->rootPath, self::CACHE_FILE);\n }", "protected function filepath() {\n if (is_null($this->path)) {\n try {\n $path = $this->config->get('path');\n $jar = $this->config->get('jar');\n\n $this->path = rtrim($path, '/') . DIRECTORY_SEPARATOR . $jar;\n } catch (Exception $exception) {\n $this->setErrorFromException($exception);\n }\n }\n\n return $this->path;\n }", "protected function getSwarmCookie()\n {\n return $this->getSession()->getCookie('SwarmDataPath');\n }", "protected function getCacheFile(){\n\t\treturn $this->getPath() . $this->getCacheName();\n\t}", "public function get_path()\n\t\t{\n\t\t\tif ($this->path) {\n\t\t\t\treturn $this->path.'/'.$this->get_full_name();\n\t\t\t} else {\n\t\t\t\ttry {\n\t\t\t\t\t$hash = $this->hash();\n\t\t\t\t} catch(\\System\\Error\\File $e) {\n\t\t\t\t\t$hash = null;\n\t\t\t\t}\n\n\t\t\t\tif ($hash) {\n\t\t\t\t\treturn $this->get_path_hashed();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn null;\n\t\t}", "private function get_filename() {\n \n $md5 = md5($_SERVER[\"HTTP_HOST\"] . $_SERVER[\"REQUEST_URI\"]);\n return CACHE_DIR . \"/\" . $md5;\n }", "public function cookieJar($loc) {\n\t\tif(is_null($loc))\n\t\t\tthrow new Exception(\"cURL::cookieJar() expects a file path of where to save the requested file.\");\n\n\t\tif(!is_dir(dirname($loc)))\n\t\t\tthrow new Exception(\"cURL::cookieJar() Directory `\" . dirname($loc) . \"` does not exist.\");\n\n\t\tif(!is_writable(dirname($loc)))\n\t\t\tthrow new Exception(\"cURL::cookieJar() Directory `\" . dirname($loc) . \"` is not writable by PHP.\");\n\n\t\t$this->cookieJar = $loc;\n\t}", "private function getFilePath() {\n return FileService::getInstance()->getTempDirPath() . DIRECTORY_SEPARATOR . $this->fileBaseName;\n }", "public function getCacheFile()\n\t{\n\t\treturn $this->tempDir . '/' . $this->filename;\n\t}", "private function getLoggerFile()\n {\n return $this->getLoggerFolder() . DIRECTORY_SEPARATOR . self::FILE_NAME;\n }", "public static function getFilePath(): string\n {\n return static::getInstance()->getFilePath();\n }", "public function getDiskCachingDirectory()\n {\n return $this->diskCachingDirectory;\n }", "public function getDiskCachingDirectory()\n {\n return $this->diskCachingDirectory;\n }", "public static function getFilePath()\n\t{\n\t\treturn __FILE__;\n\t}", "public static function getFilePath()\n\t{\n\t\treturn __FILE__;\n\t}", "private function getThumbFilepath() {\n\t\t$filename = $this->getThumbFilename();\n\t\t$filepath = $this->pathCache . $filename;\n\t\treturn($filepath);\n\t}", "private function getFilePath() {\n\t\treturn $this->options['path'].'/'.md5($this->options['revision']).'/'.$this->path;\n\t}", "public function get_cached_path() {\n // Set either the source or cache file as our datasource\n if ($this->serve_default)\n {\n $file_data = $this->source_file;\n }\n else\n {\n $file_data = $this->cached_file;\n }\n\n // Output the file\n return $file_data;\n }", "public function getSavePath(): string\n {\n return session_save_path();\n }", "public function sessionDirectoryPath();", "public static function getCacheFile()\r\n {\r\n return self::$_cacheFile;\r\n }", "protected function get_file() {\r\n\t\t$file = '';\r\n\r\n\t\tif ( @file_exists( $this->file ) ) {\r\n\t\t\tif ( ! is_writeable( $this->file ) ) {\r\n\t\t\t\t$this->is_writable = false;\r\n\t\t\t}\r\n\r\n\t\t\t$file = @file_get_contents( $this->file );\r\n\t\t} else {\r\n\t\t\t@file_put_contents( $this->file, '' );\r\n\t\t\t@chmod( $this->file, 0664 );\r\n\t\t}\r\n\r\n\t\treturn $file;\r\n\t}", "public function getFilePath()\n {\n\n if (is_writable($_SERVER['DOCUMENT_ROOT'])) {\n return $_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . $this->getFileName();\n }\n\n }", "public function getPathToFile(): string;", "private function tempFilePath()\n {\n $path = 'exports/'.Str::random();\n\n // Make sure the file exists\n Storage::put($path, null);\n\n return Storage::path($path);\n }", "protected function tempPath() {\n if ($nonce = $this->getNonce()) {\n return sys_get_temp_dir() . DIRECTORY_SEPARATOR . $nonce;\n }\n }", "protected function get_file() {\n\n\t\t$file = '';\n\n\t\tif ( @file_exists( $this->file ) ) {\n\n\t\t\tif ( ! is_writeable( $this->file ) ) {\n\t\t\t\t$this->is_writable = false;\n\t\t\t}\n\n\t\t\t$file = @file_get_contents( $this->file );\n\n\t\t} else {\n\n\t\t\t@file_put_contents( $this->file, '' );\n\t\t\t@chmod( $this->file, 0664 );\n\n\t\t}\n\n\t\treturn $file;\n\t}", "public function getFilepath() {\n\t\treturn $this->directory.$this->fileprefix.'-'.$this->filename.'.'.static::EXTENSION;\n\t}", "public function filePath($var = null): ?string\n {\n if (null !== $var) {\n // TODO:\n throw new RuntimeException(__METHOD__ . '(string): Not Implemented');\n }\n\n $folder = $this->getStorageFolder();\n if (!$folder) {\n return null;\n }\n\n /** @var UniformResourceLocator $locator */\n $locator = Grav::instance()['locator'];\n $folder = $locator->isStream($folder) ? $locator->getResource($folder) : GRAV_ROOT . \"/{$folder}\";\n\n return $folder . '/' . ($this->isPage() ? $this->name() : 'default.md');\n }", "public function getEnvironmentFilePath(): string;", "function get_cookie_secret(){\n $file = dirname(__FILE__).'/../cache/.htcookiesecret.php';\n if(@file_exists($file)){\n return md5(trim(file($file)));\n }\n\n $secret = '<?php #'.(rand()*time()).'?>';\n if(!$fh = fopen($file,'w')) die(\"Couldn't write to $file\");\n if(fwrite($fh, $secret) === FALSE) die(\"Couldn't write to $file\");\n fclose($fh);\n\n return md5($secret);\n}", "public function getCachePath()\n {\n return $this->getSettingArray()[\"cache_path\"];\n }", "public function getFilepath();", "public function getEnvironmentFilePath()\n {\n return $this->getEnvironmentPath() . '/' . $this->getEnvironmentFile();\n }", "public function getFile_path() {\n return $this->_file_path ? $this->_file_path : null;\n }", "protected function getCacheFilePath(): string\n {\n return self::env('CONFIG_CACHE_FILE_PATH', Directory::cachePath('config.php'));\n }", "public function getFile(): string\n {\n return $this->filePath;\n }", "private function getSessionSavePath() {}", "function _getFilePath($key){\n return $this->savePath .'/'. $this->prefix . md5($key);\n }", "public function getFilePath();", "public function getFilePath();", "public function getFilePath();", "public function getFilePath();", "public function getFilepath()\n {\n $filepath = $this->_path['dirname'].DIRECTORY_SEPARATOR.$this->_path['filename'];\n\n if ($this->_path['extension'])\n $filepath .= '.'.$this->_path['extension'];\n\n return $filepath;\n }", "function getCookieData() {\n\t\t$oEncrypt = utilityEncrypt::factory(file_get_contents(system::getConfig()->getPathData().'/dash.session.key'));\n\t\treturn utilityEncrypt::toUriString(\n\t\t\t$oEncrypt->encrypt(\n\t\t\t\tserialize(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => $this->getUser()->getID(),\n\t\t\t\t\t\t'email' => $this->getUser()->getEmail(),\n\t\t\t\t\t\t'expiry' => strtotime('+72 hours'),\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\t}", "public function setCookiesPath($path);", "public function getFilePath()\n {\n if (array_key_exists(\"filePath\", $this->_propDict)) {\n return $this->_propDict[\"filePath\"];\n } else {\n return null;\n }\n }", "public static function getTemporaryPath()\n {\n if (is_gae_std() || env('GAE_CACHEFS')) {\n return 'cachefs://'.gae_project().'/'.gae_service().'/'.gae_version();\n } else {\n return '/tmp/laravel/storage';\n }\n }", "private function storeFile()\n {\n if (trim($this->path) == '') {\n throw new CacheException('no valid path is set!!');\n }\n if (!is_dir($this->path)) {\n $this->files->makeDirectory($this->path, $mode = 0777, true, true);\n }\n\n return $this->path.$this->file;\n }", "function getCacheFilePath($eventData)\n {\n global $serendipity;\n\n $cache_filename = $this->getCacheFileName($eventData);\n if (!isset($cache_filename)) {\n return null;\n }\n return $this->getCacheDirectory() .'/' . $cache_filename;;\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}", "private function writeCookieFileCache()\n {\n $timeLive = Carbon::now()->addMinutes(480);\n Cache::put('AuthApiBpmCookie', $this->cookies, $timeLive);\n Log::info('Получены новые куки'.$this->cookies);\n }", "public function test_public_getCookies_DifferentPath()\n {\n // Verify that our cookie is available.\n $cookies = $this->object->getCookies($this->serviceUrl_1c);\n $this->assertEquals(1, count($cookies));\n $this->assertEquals('k1jut1r1bqrumpei837kk4jks0', $cookies['SID']);\n }", "protected function get_file() {\n\n\t\treturn __FILE__;\n\t}", "public function get_certificate_file() {\n return '../data/certificates/' . hash_secure($this->name) . '.crt';\n }", "public function getPath()\n {\n return str_replace(\n ['/', '\\\\'],\n Storage::GetSeparator(),\n Storage::GetPath() . '/' . $this->dirname . '/' . $this->basename\n );\n }", "public static function getCacheFile() {\n\t\t$cache = false;\n\t\t$can_be_cached = PageCache::canBeCached();\n\t\tif ($can_be_cached) {\n\t\t\t// Before checking cache, lets check cache reffreshment triggers (specific prices)\n\t\t\tPageCacheDAO::triggerReffreshment();\n\n\t\t\t$controller = Dispatcher::getInstance()->getController();\n\t\t\t$cache_life = 60 * ((int)Configuration::get('pagecache_'.$controller.'_timeout'));\n\t\t\t$cache_file = PageCache::_getCacheFilepath();\n\n\t\t\tif (Tools::getIsset('delpagecache') && file_exists($cache_file)) {\n\t\t\t\tunlink($cache_file);\n\t\t\t}\n\n\t\t\t$pseudo_uri = self::getPseudoRequestURI();\n\t\t\t$filemtime = @filemtime($cache_file);\n\t\t\tif ($filemtime && ($cache_life < 0 or (microtime(true) - $filemtime < $cache_life))) {\n\t\t\t\tif (Configuration::get('pagecache_stats')) {\n\t\t\t\t\tPageCacheDAO::incrementCountHit($pseudo_uri);\n\t\t\t\t}\n\t\t\t\t$cache = $cache_file;\n\t\t\t}\n\n\t\t\t// Store cache used in a readable cookie (0=no cache; 1=server cache; 2=browser cache)\n\t\t\tif (self::isDisplayStats()) {\n\t\t\t\t$cache_type = 0;\n\t\t\t\tif ($cache) {\n\t\t\t\t\t$cache_type = 1;\n\t\t\t\t}\n\t\t\t\tif (PHP_VERSION_ID <= 50200) /* PHP version > 5.2.0 */\n\t\t\t\t\tsetcookie('pc_type_' . md5($pseudo_uri), $cache_type, time()+60*60*1, '/', null, 0);\n\t\t\t\telse\n\t\t\t\t\tsetcookie('pc_type_' . md5($pseudo_uri), $cache_type, time()+60*60*1, '/', null, 0, false);\n\t\t\t}\n\t\t}\n\t\tif (Configuration::get('pagecache_logs') > 1) {\n\t\t\t// Log debug\n\t\t\t$controller = Dispatcher::getInstance()->getController();\n\t\t\t$is_ajax = Tools::getIsset('ajax') ? 'true' : 'false';\n\t\t\t$is_get = strcmp($_SERVER['REQUEST_METHOD'], 'GET') == 0 ? 'true' : 'false';\n\t\t\t$ctrl_enabled = Configuration::get('pagecache_'.$controller) ? 'true' : 'false';\n\t\t\t$is_debug = !Configuration::get('pagecache_debug') || Tools::getValue('dbgpagecache') !== false ? 'false' : 'true';\n\t\t\t$token_ok = (int)(Configuration::get('PS_TOKEN_ENABLE')) != 1 ? 'true' : 'false';\n\t\t\t$is_logout = Tools::getValue('logout') === false && Tools::getValue('mylogout') === false ? 'false' : 'true';\n\t\t\t$can_be_cached = $can_be_cached ? 'true' : 'false';\n\t\t\t$cache_life = 60 * ((int)Configuration::get('pagecache_'.$controller.'_timeout'));\n\t\t\t$cache_file = PageCache::_getCacheFilepath();\n\t\t\t$exists = file_exists($cache_file) ? 'true' : 'false';\n\t\t\t$date_infos = '';\n\t\t\tif (file_exists($cache_file)) {\n\t\t\t\t$now = date(\"d/m/Y H:i:s\", microtime(true));\n\t\t\t\t$last_date = date(\"d/m/Y H:i:s\", filemtime($cache_file));\n\t\t\t\t$date_infos = \"now=$now file=$last_date\";\n\t\t\t}\n\t\t\tLogger::addLog(\"PageCache | cache | !is_ajax($is_ajax) && is_get($is_get) && ctrl_enabled($ctrl_enabled) \".\n\t\t\t\t\"&& !is_debug($is_debug) && token_ok($token_ok) && !is_logout($is_logout) = $can_be_cached \".\n\t\t\t\t\"controller=$controller cache_life=$cache_life cache_file=$cache_file exists=$exists $date_infos\", 1, null, null, null, true);\n\t\t}\n\t\treturn $cache;\n\t}", "public static function getCookieJar(){\n return \\Illuminate\\Auth\\Guard::getCookieJar();\n }", "public function __construct($cookiePath=\"\", $userAgent=\"\") {\r\n\r\n\t\tif(!empty($cookiePath))\r\n\r\n\t\t\t$this->cookiefile = $cookiePath;\r\n\r\n\t\telse\r\n\r\n\t\t\t$this->cookiefile =\"cookies.txt\";\r\n\r\n\t\t\r\n\r\n\t\tif (!file_exists($this->cookiefile)) {\r\n\r\n\t\t\t$fp = fopen($this->cookiefile,\"w+\");\r\n\r\n\t\t\tfwrite($fp,\"\");\r\n\r\n\t\t\tfclose($fp);\r\n\r\n\t\t}\r\n\r\n\t\tswitch ($userAgent) {\r\n\r\n\t\t\tcase 'mozilla':\r\n\r\n\t\t\t\t$this->userAgent='Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3';break;\r\n\r\n\t\t\tcase 'ie':\r\n\r\n\t\t\t\t$this->userAgent='Mozilla/5.0 (Windows; U; MSIE 7.0; Windows NT 6.0; en-US)';break;\r\n\r\n\t\t\tcase '':\r\n\r\n\t\t\t\t$this->userAgent='Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3';break;\r\n\r\n\t\t\tdefault:\r\n\r\n\t\t\t\t$this->userAgent=$userAgent;\r\n\r\n\t\t}\r\n\r\n\t}", "protected function initFilePath() {\n \n $result = $this->profiler->getLogsPath();\n \n $result .= $this->key.'.log';\n \n if ( !file_exists( $result ) ) {\n touch( $result );\n }\n \n return $result;\n }", "private function get_cookie_domain() {\n\t\t$requested_domain_parts = explode( '.', $_SERVER['HTTP_HOST'] );\n\t\t$cookie_domain = array_pop( $requested_domain_parts );\n\t\t$cookie_domain = '.' . array_pop( $requested_domain_parts ) . '.' . $cookie_domain;\n\n\t\treturn $cookie_domain;\n\t}", "public function getCachePath()\r\n\t{\r\n\t\t$path = AD.$this->getConfig()->getChildren(\"cache\")->getString(\"path\");\r\n\t\tif(!is_dir($path))\r\n\t\t{\r\n\t\t\tmkdir($path, 0777, true);\r\n\t\t}\r\n\t\treturn $path;\r\n\t}", "static public function path($filename, $disk='local'){\n if( $disk == 'public' ){\n \n return public_path( 'assets/files/' . $filename );\n\n }\n \n return storage_path( 'app/' . $filename );\n }", "protected function createCookieDriver()\n {\n $determiner = new Determiners\\Cookie(\n $this->app['config']['localize-middleware']['cookie']\n );\n\n $determiner->setFallback($this->app['config']['app']['fallback_locale']);\n\n return $determiner;\n }", "protected function getFilePath()\n {\n return $this->filePath;\n }", "public static function getPath()\r\n {\r\n if ( ! self::$_path) {\r\n self::$_path = dirname(__FILE__);\r\n }\r\n return self::$_path;\r\n }", "public function getFileSystem() {}", "public function getDownloadPath() {}", "public static function file() {\r\n\t\treturn __FILE__;\r\n\t}", "static public function cookie( $var, $default = NULL )\r\n\t\t{\r\n\t\t\treturn isset( $_COOKIE[ $var ] ) ? stripslashes( trim( $_COOKIE[ $var ] ) ) : $default;\r\n\t\t}", "protected function getStorageFile()\n\t{\n\t\t$this->createDirectory();\n\t\treturn $this->storagePath.$this->storageFileName;\n\t}", "function get_tmp_file() {\n\tglobal $g;\n\treturn \"{$g['tmp_path']}/tmp-\" . time();\n}", "protected function getFilesystemPath()\n {\n return dirname($this->path);\n }", "public function getCookie()\n {\n return $this->cookie;\n }", "static function viaRemember()\n\t{\n\t\treturn self::$cookie;\n\t}", "public function path(): string\n {\n return realpath($this->file);\n }", "private function getVersionFile()\n {\n return $this->dir . DIRECTORY_SEPARATOR . self::VERSION_FILE;\n }", "public function getCachePath() {\r\n\t\treturn $this->getFramework()->getPath(Core::PATH_CACHE);\r\n\t}", "public function getFilePath()\n {\n return $this->file_path;\n }", "public function getFilepath()\n {\n return $this->filepath;\n }", "public function getCookie() {\n return $this->cookie;\n }", "public function getCachedConfigPath();", "function cookie($key, $value = '')\n{\n if ('' === $value) {\n $res = fnGet($_COOKIE, $key);\n return is_null($res) ? null : unserialize($res);\n }\n if (null === $value) {\n return setcookie($key, $value, time() - 3600, '/');\n }\n return setcookie($key, serialize($value), null, '/');\n}", "public static function cookie($var = null)\n {\n if(is_null($var))\n {\n return (!empty($_COOKIE)) ? $_COOKIE : null;\n }\n\n return (isset($_COOKIE[$var])) ? $_COOKIE[$var] : null;\n }", "public function getCachedServicesPath();", "public function getFile()\n {\n return $this->getAbsolutePath($this->avatarName);\n }", "private function getFilePath($key) {\n return $this->cacheFilePath . md5($key) . '.cache';\n }", "public function profilePhotoDisk(): string\n {\n return isset($_ENV['VAPOR_ARTIFACT_NAME']) ? 's3' : config('filament-jet.profile_photo_disk', 'public');\n }", "public function getFilename()\n {\n return __FILE__;\n }", "function getFilename()\n {\n return __FILE__;\n }", "protected function getCookieDomain() {}", "public function environmentFilePath(): string\n {\n return $this->environmentPath().DIRECTORY_SEPARATOR.$this->environmentFile();\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 }", "private function set_cookiefile($file) {\r\n\t\tif (!empty($this->options[\"CURLOPT_COOKIEFILE\"])) { trigger_error(\"file cookie is activated and cannot be modified\", E_USER_WARNING); }\r\n\t\telseif (empty($file)) { trigger_error(\"an accessible file is required for CURLOPT_COOKIEFILE\", E_USER_WARNING); }\r\n\t\telse {\r\n\t\t\tif (!file_exists($file)) { touch($file); }\r\n\t\t\tif (is_dir($file)) { trigger_error(\"'{$file}' is a directory\", E_USER_WARNING); }\r\n\t\t\telseif (!is_readable($file)) { trigger_error(\"no read permission to access '{$file}'\", E_USER_WARNING); }\r\n\t\t\telse {\r\n\t\t\t\t$this->session_cookie = false;\r\n\t\t\t\tif (substr($file, 0, 2) == \".\".DIRECTORY_SEPARATOR) { $file = rtrim(getcwd(), DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR.substr($file, 2); }\t\t\t\t# fix relative path\r\n\t\t\t\t$this->options[\"CURLOPT_COOKIEFILE\"] = $file;\r\n\t\t\t\tcurl_setopt($this->ch, CURLOPT_COOKIEFILE, $file);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function getCachePath()\n {\n return $this->cachePath;\n }", "protected function getCacheFilePath($key) {\n $tempPath = sys_get_temp_dir();\n if (!$tempPath)\n throw new RuntimeException('Unable to get temp directory');\n\n return $tempPath . '/' . $key . '.webcache';\n }", "protected function makeTemporaryFile(): string\n {\n return DIRECTORY_SEPARATOR . trim(sys_get_temp_dir(), DIRECTORY_SEPARATOR) .\n DIRECTORY_SEPARATOR . ltrim(uniqid('epp', true), DIRECTORY_SEPARATOR);\n }" ]
[ "0.7095272", "0.6541507", "0.65231365", "0.60637665", "0.57342523", "0.569794", "0.56609076", "0.5528602", "0.55081236", "0.5483616", "0.5446217", "0.5440193", "0.5433883", "0.5433056", "0.5375775", "0.5375775", "0.53735507", "0.53735507", "0.5372021", "0.5351479", "0.5328312", "0.5318508", "0.53002673", "0.52961004", "0.52957493", "0.5261202", "0.5258311", "0.5228425", "0.5204298", "0.51936823", "0.5189785", "0.5174895", "0.5171754", "0.5168022", "0.5166657", "0.5164042", "0.5157566", "0.51574576", "0.5137568", "0.5135479", "0.51285875", "0.51247394", "0.5116387", "0.5116387", "0.5116387", "0.5116387", "0.51112556", "0.51075983", "0.50942475", "0.5092103", "0.50768465", "0.50704974", "0.5068472", "0.50664085", "0.5053594", "0.50354975", "0.5027413", "0.5019891", "0.50180936", "0.50168383", "0.50166464", "0.5015862", "0.5015732", "0.5009823", "0.50030684", "0.49944225", "0.498553", "0.4978352", "0.49769136", "0.49626374", "0.49534926", "0.4952062", "0.49489135", "0.49485454", "0.49412504", "0.49402937", "0.4926048", "0.49170306", "0.4914739", "0.49085176", "0.49056056", "0.49051693", "0.49035698", "0.4903149", "0.49013534", "0.48971564", "0.4896053", "0.48949504", "0.48914406", "0.4889882", "0.48874697", "0.48863775", "0.4882253", "0.48778307", "0.48742247", "0.4870801", "0.4867284", "0.48526648", "0.48501965", "0.48447666" ]
0.73801416
0
(Noncookiefile) Load all cookies for the currently active user. Note that this function is ONLY called if a nonstring answer was returned by the getUserCookiesFilePath() call. If your Storage backend class uses a cookiefile, make this a noop.
public function loadUserCookies () { return $this->_getUserKey($this->_username, self::COOKIES); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function loadCookies($username = '');", "public function getUserCookiesFilePath ()\n\t{\n\t\treturn null;\n\t}", "function load_cookie($file) {\n if (!is_file($file)) {\n return [];\n }\n return json_decode(file_get_contents($file), true);\n}", "public function getCookiesUser(): ?array\n {\n $email = $_COOKIE[APP_USERS_COOKIES_EMAIL] ?? '';\n return (new UserController())->getUser($email);\n }", "public function enableCookies() {}", "public function getCookie(): array;", "public static function all(){\n return $_COOKIE;\n }", "public function getCookies()\n {\n\n }", "function load()\n {\n $this->cookieJar = $this->getSession()->get($this->getCookieJarName(), []);\n }", "public function restoreLoginFromCookie() {\n\t$this->Cookie->name = 'Users';\n\t$cookie = $this->Cookie->read('rememberMe');\n\tif (!empty($cookie) && !$this->Auth->user()) {\n\t $data['User'][$this->Auth->fields['username']] = $cookie[$this->Auth->fields['username']];\n\t $data['User'][$this->Auth->fields['password']] = $cookie[$this->Auth->fields['password']];\n\t $this->Auth->login($data);\n\n\t if ($this->Auth->isLoggedin()) {\n\t\t$this->log('Cookie login succesful');\n\t }\n\t}\n }", "public function get_cookies()\n {\n }", "function _checkCookies() {\n if(isset($_COOKIE)) {\n if(isset($_COOKIE['user'])) {\n $_SESSION['is_login'] = true;\n $_SESSION['userid'] = $_COOKIE['user'];\n }\n }\n }", "public static function remember_from_cookies() {\n\t\tif (isset($_COOKIE['remember']) && !(self::logged_in())) {\n\t\t\t$user_id = explode(\"==\", $_COOKIE['remember'])[0];\n\t\t\t$user = User::find_where(\"users\", array(\"id\" => $user_id));\n\t\t\t$expected = $user_id.\"==\".$user[0][\"remember_token\"];\n\t\t\tif ($user_id && $user && $expected == $_COOKIE['remember']) {\n\t\t\t\tSession::write(\"user\", $user);\n\t\t\t\t$remember_token = $user[0][\"remember_token\"];\n\t\t\t\tsetcookie(\"remember\", $user[0][\"id\"]. \"==\". $remember_token, time()+60*60*24*7);\n\t\t\t} else {\n\t\t\t\tsetcookie(\"remember\", null, -1);\n\t\t\t}\n\t\t}\n\t}", "public function hasUserCookies ()\n\t{\n\t\t// Simply check if the storage key for cookies exists and is non-empty.\n\t\treturn ! empty($this->loadUserCookies()) ? true : false;\n\t}", "private function refreshCookiesLifetime() {\n\t\t// @see https://www.ccm19.de/\n\t\treturn;\n\n\t\tif (is_array($_COOKIE) == false) {\n\t\t\treturn;\n\t\t}\n\n\t\t$expire = time() + (int)$this->settings[\"cookie_lifetime\"] * 60 * 60 * 24;\n\t\t$path = rtrim(PAPOO_WEB_PFAD, \"/\").\"/\";\n\t\t// Cookie-Domain setzen, Cookie mit und ohne www. gültig machen. Dabei ebenfalls lokale Installationen beachten. (aus session_class uebernommen)\n\t\t$domain = str_replace('.www.', '.', (strpos($_SERVER['SERVER_NAME'], '.') === false ? '' : '.'.$_SERVER['SERVER_NAME']));\n\n\t\t// RegEx-Patterns zum Filtern der Cookies nach deren Namen\n\t\t$blacklist = array(\n\t\t\t\"~^_{1,2}g~\",\n\t\t);\n\n\t\tforeach ($_COOKIE as $key => $value) {\n\t\t\t$cookieIsBlacklisted = array_reduce($blacklist, function ($blacklisted, $pattern) use ($key) {\n\t\t\t\treturn $blacklisted || preg_match($pattern, $key);\n\t\t\t}, false);\n\n\t\t\tif ($cookieIsBlacklisted) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t@setcookie($key, $value, $expire, $path, $domain, false, true);\n\t\t}\n\t}", "public function getHttpCookies(): array\n {\n return $_COOKIE;\n }", "public function cookies() {\n $cookies = $this->command('cookies');\n $objCookies = array();\n foreach ($cookies as $cookie) {\n $objCookies[$cookie[\"name\"]] = new Cookie($cookie);\n }\n return $objCookies;\n }", "public function cookies() {\n\t\t$cookie = $this->getHeader('Cookie');\n\t\treturn $cookie === null ? array() : (array) self::parseCookies($cookie);\n\t}", "protected function _getSessionFromCookie(){\n\t\n\t\tif (isset($_COOKIE) && isset($_COOKIE[$this->_cookie_var_name])){\n\t\t\treturn json_decode($_COOKIE[$this->_cookie_var_name], true);\n\t\t} else\n\t\t\treturn array();\n\t\n\t}", "public function disableCookies() {\n\t\t$this->cookiesEnabled = FALSE;\n\t}", "private function _prepareCookieJar() {\n if(!empty($_SESSION['AppceleratorCloudServices']['cookie_jar'])) {\n // update modified time so it doesn't get cleaned up\n $this->_cookieJar = $_SESSION['AppceleratorCloudServices']['cookie_jar'];\n return touch($this->_cookieJar);\n }\n\n $cookieFile = tempnam($this->tempDir, 'ACS');\n if(!$cookieFile)\n throw new UnexpectedValueException('There was a problem storing your authentication cookie.');\n\n $this->_cookieJar = $cookieFile;\n $loginResponse = $this->usersLogin();\n\n $_SESSION['AppceleratorCloudServices']['cookie_jar'] = $this->_cookieJar;\n $_SESSION['AppceleratorCloudServices']['current_user'] = $loginResponse->response->users[0];\n return true;\n }", "public static function initCookies() {\n // Get valid cookies\n $cookies = array_map('self::mapCookies', $_COOKIE, array_keys($_COOKIE));\n $cookies = array_filter($cookies);\n $cookies = array_values($cookies);\n\n // Get valid sessions\n $sessions = array_map('self::mapCookies', $_SESSION, array_keys($_SESSION));\n $sessions = array_filter($sessions);\n $sessions = array_values($sessions);\n\n // Sort valid cookies and create objects to save\n for ($i = 0; $i < count($cookies); $i++) {\n $cookie = new NativeCookie;\n $cookie->setName($cookies[$i][0])->setContent($cookies[$i][1]);\n\n $expirationDate = explode(NativeCookie::$lifetimeSeperator, $cookies[$i][1]);\n\n if (array_key_exists(1, $expirationDate)) {\n $cookie->setLifetime((int)($expirationDate[1]));\n }\n else {\n $cookie->setLifetime(false);\n }\n\n self::$sessions[] = $cookie;\n }\n\n // Sort valid sessions and create objects to save\n for ($i = 0; $i < count($sessions); $i++) {\n $session = new NativeSession;\n $session->setName($sessions[$i][0])->setContent($sessions[$i][1]);\n\n self::$sessions[] = $session;\n }\n }", "public function getQueuedCookies(): array;", "#[Pure]\n public function getCookies() {}", "public function getCookies()\n {\n return $this->__getCookies();\n }", "function getPartnerInfoFromCookies()\n{\n return cache()->remember('i.partnerInfoFromCookies.' . $_SERVER['REMOTE_ADDR'], getCacheILifetime('partnerInfoFromCookies'), function () {\n $partnerId = isset($_COOKIE['partner_id']) ? $_COOKIE['partner_id'] : null;\n\n if (null === $partnerId) {\n return [];\n }\n\n return \\App\\Models\\User::where('my_id', $partnerId)->first()->toArray();\n });\n}", "public function getCookies()\n\t{\n\t\treturn $this->cookies->all();\n\t}", "public static function tryLoginByCookies() {\n if (Session::isUserLoggedIn() || !self::isCookiesSet()) {\n return;\n }\n\n $username = self::get(self::$usernameCookieName);\n $token = self::get(self::$passwordCookieName);\n $user = UserDALMySql::select($username);\n\n if ($user && $user->getToken() === $token) {\n Session::setFeedback('Welcome back with cookie');\n Session::setUserLoggedInStatus(true);\n Session::setUser($user);\n } else {\n self::deleteRememberMeCookies();\n Session::setFeedback('Wrong information in cookies');\n }\n }", "function loginThrowCookie()\n {\n\n // define all the global variables\n global $database, $message, $user, $settings, $functions, $browser;\n\n if (empty($_SESSION[\"user_data\"])) { // check if the current session is empty\n if (!empty($_COOKIE[\"user_data\"])) { // check if the current cookie is not empty or null\n\n // decrypt the user data\n $data = $functions->decryptIt($_COOKIE['user_data']);\n $data = explode(\",\", $data);\n\n // check if empty cookie\n if ($data[0] == \"\" || $data[1] == \"\") {\n return false;\n }\n\n $userID = $database->secureInput($data[0]);\n $cookieValue = $database->secureInput($data[1]);\n\n // ** Get the needed information from the database ** //\n $sql = \"SELECT * FROM \" . TBL_USERS . \" WHERE \" . TBL_USERS_ID . \" = '\" . $userID . \"'\";\n\n // get the sql results\n $result = $database->getQueryResults($sql);\n if ($database->anyError()) {\n return false;\n }\n\n // ** Check if such a user exists ** //\n if ($database->getQueryNumRows($result, true) > 0) {\n $row = $database->getQueryEffectedRow($result, true);\n\n // un-serialize the token array\n $tokenArray = unserialize($row[TBL_USERS_TOKEN]);\n\n // check if token and user data cookie match to continue\n if ($tokenArray['token'] != $cookieValue) {\n return false;\n }\n\n // check if the cookie was first created on the same device\n if ($tokenArray['browser_platform'] != $browser->getPlatform()) {\n return false;\n }\n\n // check if same ip login is disabled\n // then check if the stored ip matches the current device ip address\n if (!$settings->sameIpLogin()) {\n if ($tokenArray['ip'] != $functions->getUserIP()) {\n return false;\n }\n }\n\n // check if user has to sign in again with his credentials\n if ($row[TBL_USERS_SIGNIN_AGAIN]) {\n unset($_COOKIE[\"user_data\"]);\n unset($_COOKIE[\"user_id\"]);\n setcookie(\"user_data\", null, -1, '/');\n setcookie(\"user_id\", null, -1, '/');\n\n // update the database so that the user can log in again\n $sql = \"UPDATE \" . TBL_USERS . \" SET \" . TBL_USERS_SIGNIN_AGAIN . \" = '0' WHERE \" . TBL_USERS_ID . \" = '\" . $user->getID() . \"' AND \" . TBL_USERS_USERNAME . \" = '\" . $user->getUsername() . \"'\";\n\n // get the sql results\n $database->getQueryResults($sql);\n if ($database->anyError()) {\n return false;\n }\n\n $message->setError(\"You've been logged out for security reasons\", Message::Error);\n return false;\n }\n\n // ** Update the current session data ** //\n foreach ($row As $rowName => $rowValue) {\n $_SESSION[\"user_data\"][$rowName] = $rowValue;\n }\n\n // initiate the user data\n $user->initUserData();\n\n } else {\n return false;\n }\n } else {\n return false;\n }\n } else {\n return false;\n }\n\n return true;\n }", "protected function load(): void\n {\n if (!isset($_SESSION[$this->sessionKey])) {\n return;\n }\n $data = \\json_decode($_SESSION[$this->sessionKey], true);\n if (\\is_array($data)) {\n foreach ($data as $cookie) {\n $this->setCookie(new SetCookie($cookie));\n }\n } elseif (\\strlen($data)) {\n throw new \\RuntimeException('Invalid cookie data');\n }\n }", "protected function getCookies(): array\n {\n return $this->cookies;\n }", "public static function getCookieJar(){\n return \\Illuminate\\Auth\\Guard::getCookieJar();\n }", "protected static function loadFromCookie($user_agent)\n\t{\n\t\tglobal $cookiename, $modSettings;\n\n\t\tif (empty(self::$id) && isset($_COOKIE[$cookiename]))\n\t\t{\n\t\t\tlist ($id, self::$session_password) = serializeToJson($_COOKIE[$cookiename], function ($array_from) use ($cookiename) {\n\t\t\t\tglobal $modSettings;\n\n\t\t\t\trequire_once(SUBSDIR . '/Auth.subs.php');\n\t\t\t\t$_COOKIE[$cookiename] = json_encode($array_from);\n\t\t\t\tsetLoginCookie(60 * $modSettings['cookieTime'], $array_from[0], $array_from[1]);\n\t\t\t});\n\n\t\t\tself::$id = !empty($id) && self::$session_password !== '' ? (int) $id : 0;\n\t\t}\n\t\telseif (empty(self::$id) && isset($_SESSION['login_' . $cookiename]) && (!empty($modSettings['disableCheckUA']) || (!empty($_SESSION['USER_AGENT']) && $_SESSION['USER_AGENT'] == $user_agent)))\n\t\t{\n\t\t\t// @todo Perhaps we can do some more checking on this, such as on the first octet of the IP?\n\t\t\tlist ($id, self::$session_password, $login_span) = serializeToJson($_SESSION['login_' . $cookiename], function ($array_from) use ($cookiename) {\n\t\t\t\t$_SESSION['login_' . $cookiename] = json_encode($array_from);\n\t\t\t});\n\n\t\t\tself::$id = !empty($id) && strlen(self::$session_password) === 64 && $login_span > time() ? (int) $id : 0;\n\t\t}\n\t}", "public function getCookieVariables();", "public function cookies() {\n return $this->cookies;\n }", "public function getQueuedCookies();", "public static function restore_from_cookie(){\n\t\tglobal $con;\n\t\t\n\t\tif(isset($_COOKIE['id'])){\n\t\t\t$prep = $con->prepare(\"\n\t\t\t\tSELECT user_name FROM `users`\n\t\t\t\tINNER JOIN `tokens`\n\t\t\t\t\tON token_user = user_id\n\t\t\t\tWHERE token_val = ?\n\t\t\t\t\tAND token_created_on < DATE_ADD(NOW(), INTERVAL 30 DAY)\n\t\t\t\");\n\t\t\t\n\t\t\t$prep->bind_param(\"s\", $_COOKIE['id']);\n\t\t\t\n\t\t\tif($prep->execute()) {\n\t\t\t\t$prep->bind_result($user_name);\n\t\t\t\t\n\t\t\t\tif($prep->fetch()) {\n\t\t\t\t\t\n\t\t\t\t\t$_SESSION['user-name'] = $user_name;\n\t\t\t\t\t$prep->close();\n\t\t\t\t\t\n\t\t\t\t\treturn true;\n\t\t\t\t} else {\n\t\t\t\t\t$prep->close();\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$prep->close();\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "protected function _setCookies() {\n\t\tforeach ($this->_cookies as $name => $c) {\n\t\t\tsetcookie(\n\t\t\t\t$name, $c['value'], $c['expire'], $c['path'],\n\t\t\t\t$c['domain'], $c['secure'], $c['httpOnly']\n\t\t\t);\n\t\t}\n\t}", "public function getCookies()\n {\n return $this->wrapped->getCookies();\n }", "public function acceptCookies(){\n\t\tsetcookie('isUsingCookies', true, time()+60*60*24*365);\n\t\treturn redirect()->route('home');\n\t}", "private function _tryHttpCookie()\n {\n // global variables, in case they are not declared as global yet\n global $_COOKIE;\n\n if (!array_key_exists(self::COOKIE_NAME, $_COOKIE)) {\n return array();\n }\n\n // we already have authentication information in COOKIE, we just\n // need to parse it and validate\n $data = explode(':', $_COOKIE[self::COOKIE_NAME]);\n return array (\n 'login' => $data[0],\n 'hash' => $data[1]\n );\n }", "protected function load($cookies)\n {\n foreach ($_COOKIE as $name => $value) {\n $cookie = $this->cookie->get($name);\n\n if ($cookie instanceof SetCookie) {\n $cookies[] = $cookie;\n }\n }\n\n return $cookies;\n }", "public function clearCookies() {\n\t\t\t$this->_cookies = [];\n\t\t}", "function getCookies(){\n\t\treturn $this->_HTTPCookies;\n\t}", "public function clearCookies()\n {\n $this->cookie_data = array();\n }", "public function cookies()\r\n {\r\n return $this->cookies;\r\n }", "public function cookies()\r\n {\r\n return $this->cookies;\r\n }", "public function cookies()\n\t{\n\t\treturn $this->connection()->get('cookies');\n\t}", "public function enableCookies() {\n\t\t$this->cookiesEnabled = TRUE;\n\t}", "function verifyCookies()\n\t{\n\t\tif (isset($_COOKIE['cookieUserName']))\n\t\t{\n\t\t\techo json_encode(array('cookieUserName' => $_COOKIE['cookieUserName']));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t# Cookie not set yet\n\t\t die(json_encode(errors(417)));\n\t\t}\n\t}", "public function flushQueuedCookies(): static;", "public function getCookies()\n {\n return $this->_getCookies();\n }", "protected function setCookies() {\n $this->cookies = array();\n\n $headers = $this->getHeader(Header::HEADER_COOKIE);\n if (!$headers) {\n return;\n }\n\n if (!is_array($headers)) {\n $headers = array($headers);\n }\n\n foreach ($headers as $header) {\n $cookies = explode(';', $header);\n foreach ($cookies as $cookie) {\n if (strpos($cookie, '=')) {\n list($name, $value) = explode('=', trim($cookie), 2);\n } else {\n $name = $cookie;\n $value = true;\n }\n\n $this->cookies[$name] = $value;\n }\n }\n }", "public function getCookieCollection()\n {\n $this->buildCookieCollection();\n\n return $this->cookies;\n }", "public function testCookiesDisabled()\n {\n $port = rand(2000, 9999);\n $process = new Process([\n 'php',\n dirname(__FILE__).'/../bin/server',\n 'run',\n \"0.0.0.0:$port\",\n '--adapter='.FakeAdapter::class,\n '--no-cookies',\n '--dev',\n ]);\n\n $process->start();\n usleep(300000);\n\n list($content, $headers) = Utils::curl(\"http://127.0.0.1:$port/cookies\", [], [], 'cookie1=val1');\n $content = json_decode($content, true);\n $this->assertEmpty($content['cookies']);\n }", "function getFromCookies() {\r\n\t\t//Data stored in cache as a cookie.\r\n\t\t$this->phone_number = $_COOKIE['phoneNumber'];\r\n\t\t$this->email = $_COOKIE['email'];\r\n\t}", "function set_usercookies() {\r\n\t\tglobal $login_name, $login_password, $lang, $actual_user_is_admin, $actual_user_is_logged_in, $actual_user_id, $actual_user_name, $actual_user_showname, $actual_user_passwd_md5, $actual_user_lang, $actual_user_online_id, $_COOKIE;\r\n\t\r\n\t\t$actual_user_online_id = \"\";\r\n\t\t$actual_user_is_admin = false;\r\n\t\t$actual_user_is_logged_in = false;\r\n\t\t$actual_user_id = 0;\r\n\t\t//\r\n\t\t// FIX ME: get this by default config or by HTTP headers of the client\r\n\t\t//\r\n\t\t$actual_user_lang = 'de'; \r\n\t\t$actual_user_name = '';\r\n\t\t$actual_user_showname = '';\r\n\t\t$actual_user_passwd_md5 = '';\r\n\t\t$languages = array('de', 'en');\r\n\t\t//\r\n\t\t// Check: has the user changed the language by hand?\r\n\t\t//\r\n\t\tif(isset($lang)) {\r\n\t\t\tif(in_array($lang, $languages))\r\n\t\t\t\t$actual_user_lang = $lang;\r\n\t\t}\r\n\t\t//\r\n\t\t// Get the language from the cookie if it' s not changed\r\n\t\t//\r\n\t\telseif(isset($_COOKIE['CMS_user_lang'])) {\r\n\t\t\tif(in_array($_COOKIE['CMS_user_lang'], $languages))\r\n\t\t\t\t$actual_user_lang = $_COOKIE['CMS_user_lang'];\r\n\t\t}\r\n\t\t//\r\n\t\t// Set the cookie (for the next 93(= 3x31) Days)\r\n\t\t//\r\n\t\tsetcookie('CMS_user_lang', $actual_user_lang, time() + 8035200); \r\n\t\t//\r\n\t\t// Tells the cookie: \"the user is logged in!\"?\r\n\t\t//\r\n\t\tif(isset($_COOKIE['CMS_user_cookie'])) {\r\n\t\t\t$data = explode('|', $_COOKIE['CMS_user_cookie']);\r\n\t\t\t$actual_user_online_id = @$data[0];\r\n\t\t\t$actual_user_name = @$data[1];\r\n\t\t\t$actual_user_passwd_md5 = @$data[2];\r\n\t\t}\r\n\t\t//\r\n\t\t// Tries somebody to log in?\r\n\t\t//\r\n\t\tif(isset($login_name) && isset($login_password)) {\r\n\t\t\t$actual_user_name = $login_name;\r\n\t\t\t$actual_user_passwd_md5 = md5($login_password);\r\n\t\t}\r\n\t\t\r\n\t\tif($actual_user_online_id == '')\r\n\t\t\t$actual_user_online_id = md5(uniqid(rand()));\r\n\t\t//\r\n\t\t// Check: is the user really logged in?\r\n\t\t//\r\n\t\tif($actual_user_name != \"\" && $actual_user_passwd_md5 != \"\") {\r\n\t\t\t$sql = \"SELECT *\r\n\t\t\t\tFROM \" . DB_PREFIX . \"users\r\n\t\t\t\tWHERE user_name='$actual_user_name' AND user_password='$actual_user_passwd_md5'\";\r\n\t\t\t$original_user_result = db_result($sql);\r\n\t\t\t$original_user = mysql_fetch_object($original_user_result);\r\n\t\t\tif(@$original_user->user_name == '') {\r\n\t\t\t\t$actual_user_is_admin = false;\r\n\t\t\t\t$actual_user_is_logged_in = false;\r\n\t\t\t\t$actual_user_name = '';\r\n\t\t\t\t$actual_user_passwd_md5 = '';\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t$actual_user_is_logged_in = true;\r\n\t\t\t\t$actual_user_showname = $original_user->user_showname;\r\n\t\t\t\t$actual_user_id = $original_user->user_id;\r\n\t\t\t\tif($original_user->user_admin == 'y')\r\n\t\t\t\t\t$actual_user_is_admin = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tsetcookie('CMS_user_cookie',$actual_user_online_id . '|' . $actual_user_name . '|' . $actual_user_passwd_md5, time() + 14400);\r\n\t}", "public function getCookies()\n {\n // just returns the array of cookie objects\n return $this->cookies;\n }", "public function getResponseCookies(){\n\t\treturn $this->response->getCookies();\n\t}", "public function getCookieCache()\n {\n if (Cache::has('AuthApiBpmCookie') && !empty(Cache::get('AuthApiBpmCookie'))) {\n return Cache::get('AuthApiBpmCookie');\n } else {\n $this->UpdateCookie();\n return Cache::get('AuthApiBpmCookie');\n }\n }", "function getCookies() {\n\t\treturn $this->cookies;\n\t}", "public function getCookies(){\n\t\treturn $this->cookies;\n\t}", "public function setCookies(?array $cookies = null) {}", "public function getCookies()\n {\n return $this->cookies;\n }", "function cookiesEnabled(){\r\n\t\t//localhost won't work -> setcookie(\"test\", \"1\", 0, \"/\", FALSE);\r\n\t\tsetcookie(\"test\", \"1\");\r\n\t\tif (!isset($_REQUEST[\"cookies\"])) {\r\n\t\t\t\theader(\"Location: \". $_SERVER['PHP_SELF'].\"?cookies=1\".$_SESSION['params']);\r\n \t\t } \t\t \r\n \t\t if (!isset($_COOKIE[\"test\"]) || (isset($_COOKIE[\"test\"]) && $_COOKIE[\"test\"] != \"1\"))\r\n \t\t\tdie(\"<h1>It seems that your browser doesn't accept cookies!</h1> <h3>Unfortunately we need cookies to provide you a good service.\r\n \t\t\tIn order to proceed on our website: enable them and reload the page</h3>\");\r\n \r\n\t}", "function clearCookies(){\n\t\t$this->_HTTPCookies = array();\n\t}", "public function get_cookie() {\r\n\t\tforeach ($this->cookies as $key => $this_cookie) {\r\n\t\t\tif ($this_cookie[\"expires\"] < time()) { unset($this->cookies[$key]); }\r\n\t\t}\r\n\t\treturn $this->cookies;\r\n\t}", "protected function _getCookies()\n {\n $this->buildCookieCollection();\n\n $cookies = [];\n foreach ($this->cookies as $cookie) {\n $cookies[$cookie->getName()] = $this->convertCookieToArray($cookie);\n }\n\n return $cookies;\n }", "private function processRememberDirective() {\n // if the user is not signed in yet\n if (!$this->isLoggedIn()) {\n // if there is currently no cookie for the 'remember me' feature\n if (!isset($_COOKIE[$this->rememberCookieName])) {\n // if an old cookie for that feature from versions v1.x.x to v6.x.x has been found\n if (isset($_COOKIE['auth_remember'])) {\n // use the value from that old cookie instead\n $_COOKIE[$this->rememberCookieName] = $_COOKIE['auth_remember'];\n }\n }\n\n // if a remember cookie is set\n if (isset($_COOKIE[$this->rememberCookieName])) {\n // assume the cookie and its contents to be invalid until proven otherwise\n $valid = false;\n\n // split the cookie's content into selector and token\n $parts = \\explode(self::COOKIE_CONTENT_SEPARATOR, $_COOKIE[$this->rememberCookieName], 2);\n\n // if both selector and token were found\n if (!empty($parts[0]) && !empty($parts[1])) {\n $rememberData = $this->CI->db\n ->query(\n 'SELECT a.user, a.token, a.expires, b.email, b.username, b.status, b.roles_mask, b.force_logout\n FROM ' . $this->makeTableName('users_remembered') . ' AS a\n JOIN ' . $this->makeTableName('users') . ' AS b ON a.user = b.id\n WHERE a.selector = ?',\n [ $parts[0] ]\n )\n ->row_array();\n\n if (!empty($rememberData)) {\n if ($rememberData['expires'] >= \\time()) {\n if (\\password_verify($parts[1], $rememberData['token'])) {\n // the cookie and its contents have now been proven to be valid\n $valid = true;\n\n $this->onLoginSuccessful($rememberData['user'], $rememberData['email'], $rememberData['username'], $rememberData['status'], $rememberData['roles_mask'], $rememberData['force_logout'], true);\n }\n }\n }\n }\n\n // if the cookie or its contents have been invalid\n if (!$valid) {\n // mark the cookie as such to prevent any further futile attempts\n $this->setRememberCookie('', '', \\time() + 60 * 60 * 24 * 365.25);\n }\n }\n }\n }", "public static function loginFromRememberCookie()\n\t{\n\t\t\n\t\tif(isset($_COOKIE['remember_me'])){\n\t\t\t\n\t\t\t$cookie = $_COOKIE['remember_me'];\n\t\t\t\n\t\t\t$remembered_login = RememberedLogin::findByToken($cookie);\n\t\t\t\n\t\t\tif($remembered_login && ! $remembered_login->hasExpired()){\n\t\t\t\t\n\t\t\t\t$user = $remembered_login->getUser();\n\t\t\t\t\n\t\t\t\tstatic::login($user, false);\n\t\t\t\t\n\t\t\t\treturn $user;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "function get_cookie($name)\n{\n if (isset($_COOKIE[$name])) {\n return json_decode(base64_decode(stripslashes($_COOKIE[$name])), true);\n }\n\n return array();\n}", "public function cookies()\n {\n return $this->response_cookies;\n }", "abstract public function prepare(): CookieJar;", "private function get_auth_cookie() {\r\n $postfields = http_build_query([\r\n 'username' => $this->username,\r\n 'password' => $this->password,\r\n 'csrfmiddlewaretoken' => $this->csrf_token\r\n ]);\r\n curl_setopt_array($this->curl_handle, [\r\n CURLOPT_URL => $this->auth_url,\r\n CURLOPT_COOKIEJAR => self::COOKIE_FILE,\r\n CURLOPT_COOKIEFILE => self::COOKIE_FILE,\r\n CURLOPT_POST\t => false,\r\n CURLOPT_POSTFIELDS => $postfields,\r\n CURLOPT_FAILONERROR => true,\r\n CURLOPT_FOLLOWLOCATION => true,\r\n CURLOPT_REFERER => $this->auth_url,\r\n CURLOPT_AUTOREFERER => true,\r\n CURLOPT_HTTPHEADER => ['User-Agent: '.self::USER_AGENT],\r\n //CURLOPT_VERBOSE => true,\r\n CURLOPT_RETURNTRANSFER => true\r\n ]);\r\n\r\n curl_exec($this->curl_handle);\r\n }", "private function initializeCookieMode(): void\n {\n if (isset($this->configuration['cookieHandling']) && (bool)$this->configuration['cookieHandling'] === true) {\n $this->logger->info('Cookie Handling is set.');\n $this->cookieMode = true;\n $this->cookieName = $this->configuration['cookieName'] ?? self::COOKIE_NAME;\n }\n }", "public function getCookies()\n {\n return $this->cookies;\n }", "protected function checkRememberMeCookie() {\n\n if (!isset($_SESSION[\"id_user\"])) {\n //echo \"check the cookie <br/>\";\n if (isset($_COOKIE['auth'])) {\n $auth = $_COOKIE['auth'];\n //echo \"cookie auth = \" . $auth . \"<br/>\";\n $authArray = explode('-', $auth);\n //print_r($authArray);\n $modelUser = new CoreUser();\n if (!$modelUser->isUserId($authArray[0])) {\n //echo \"user not found <br/>\";\n $this->redirect(\"coreconnection\");\n return 1;\n }\n\n $key = $modelUser->getRemeberKey($authArray[0]);\n //echo \"database key = \" . $key . \"<br/>\"; \n if ($key == $authArray[1]) {\n //echo \"cookie good<br/>\";\n // update the cookie\n $key = sha1($this->generateRandomKey());\n $cookieSet = setcookie(\"auth\", $authArray[0] . \"-\" . $key, time() + 3600 * 24 * 3);\n if (!$cookieSet) {\n throw new Exception('cannot set the cookie in coresecure <br>');\n }\n $modelUser->setRememberKey($authArray[0], $key);\n\n $this->initSession($modelUser->getUserLogin($authArray[0]));\n\n // redirect\n return 2;\n } else {\n\n setcookie('auth', '', time() - 3600);\n //echo \"cookie not good <br/>\";\n $this->redirectNoRemoveHeader(\"coreconnection\");\n return 0;\n }\n } else {\n //echo \"cookie not found\";\n return 0;\n }\n }\n return 0;\n //echo \"check cookie <br/>\";\n }", "private function writeCookieFileCache()\n {\n $timeLive = Carbon::now()->addMinutes(480);\n Cache::put('AuthApiBpmCookie', $this->cookies, $timeLive);\n Log::info('Получены новые куки'.$this->cookies);\n }", "public function getCookies() {\n return $this->cookies;\n }", "function Cookies()\n{\n //en bewaar zijn antwoord in een sessievariabele\n\n\n //check of eerder al een antwoord ivm de cookies opgeslagen werd in de sessievariabele,\n //zoniet toon dan de cookies-tekst en stop de PHP code uitvoering\n\n //toon in een hidden div waarop de gebruiker geklikt heeft (cookies geaccepteerd of niet)\n\n}", "function extra_cookies_assets() {\n\n\t// Make sure the theme allows the cookie module\n\tif ( ! apply_filters( 'extra_enabled_extra_cookies', false ) ) {\n\t\treturn;\n\t}\n\twp_enqueue_style( 'extra.cookies', EXTRA_MODULES_URI . '/extra.cookies/lib/css/extra.cookies.less', array(), EXTRA_VERSION, 'all' );\n\twp_enqueue_script( 'js.cookie', EXTRA_MODULES_URI . '/extra.cookies/lib/js/js.cookie.js', array(), EXTRA_VERSION, true );\n\twp_enqueue_script( 'extra.cookies', EXTRA_MODULES_URI . '/extra.cookies/lib/js/extra.cookies.js', array(\n\t\t'jquery',\n\t\t'js.cookie'\n\t), EXTRA_VERSION, true );\n\n\n\t////////////////// DEFAULT USAGE //////////////////\n\n\t// Make sure the theme allows the default cookie behaviour (strip to accept cookie usage)\n\tif ( ! apply_filters( 'extra_enabled_extra_cookies_default', true ) ) {\n\t\treturn;\n\t}\n\n\tglobal $extra_options;\n\n\twp_enqueue_script( 'extra.cookies.default', EXTRA_MODULES_URI . '/extra.cookies/front/js/extra.cookies.default.js', array(\n\t\t'jquery',\n\t\t'js.cookie',\n\t\t'extra.cookies'\n\t), EXTRA_VERSION, true );\n\twp_localize_script( 'extra.cookies.default', 'extraCookiesParams', array(\n\t\t'delay' => $extra_options['cookies-default-delay'] * 1000,\n\t\t'expiration' => $extra_options['cookies-default-expiration'],\n\t\t'position' => $extra_options['cookies-default-position']\n\t) );\n}", "function _setCookies($user) {\n setcookie(\"user\", $user, time()+3600);\n }", "public function decodeCookie()\n {\n return json_decode($_COOKIE[self::SITE_USER]);\n }", "private function getCookie() {\n $Cookie = filter_input(INPUT_COOKIE, 'useronline', FILTER_DEFAULT);\n if (!$Cookie):\n return FALSE;\n else:\n return TRUE;\n endif;\n setcookie(\"useronline\", base64_encode(\"ccs\"), time() + 86400);\n }", "public function setCookieValues()\r\n {\r\n $objectManager = \\Magento\\Framework\\App\\ObjectManager::getInstance();\r\n $coreSession = $objectManager->get('Magento\\Framework\\Session\\Generic');\r\n $_cookieMetadata = $objectManager->get('Magento\\Framework\\Stdlib\\Cookie\\CookieMetadataFactory');\r\n\r\n $customerName = self::ANONYMOUS_USER;\r\n $customerEmail = self::ANONYMOUS_USER;\r\n $customerId = '';\r\n\r\n $metadata = $_cookieMetadata\r\n ->createPublicCookieMetadata()\r\n ->setDuration(self::TIMEOUT)\r\n ->setPath('/')\r\n ->setDomain($coreSession->getCookieDomain())\r\n ->setHttpOnly(false);\r\n\r\n if ($this->_customerSession->isLoggedIn()) {\r\n $customer = $this->_customerSession->getCustomer();\r\n $customerName = $customer->getName();\r\n $customerId = $customer->getId();\r\n $customerEmail = $customer->getEmail();\r\n $this->_cookieManager->setPublicCookie('user_loggedin', true, $metadata);\r\n $this->_cookieManager->setPublicCookie('afterlogin_session_id', \r\n $coreSession->getCustomerSessionId(), \r\n $metadata);\r\n $this->_cookieManager->setPublicCookie('trackingid', $customerId, $metadata);\r\n } else {\r\n if (!empty($this->_request->getParam('guest_user_id'))) {\r\n $customerId = $coreSession->getTrackingSessionId();\r\n } elseif (empty($this->_cookieManager->getCookie('trackingid'))) {\r\n $customerId = $coreSession->getTrackingSessionId();\r\n }\r\n $this->_cookieManager->setPublicCookie('user_loggedin', false, $metadata);\r\n }\r\n !empty($customerId) ? $this->_cookieManager->setPublicCookie('trackingid', \r\n $customerId, \r\n $metadata) : '';\r\n\r\n $this->_cookieManager->setPublicCookie('trackingemail', $customerEmail, $metadata);\r\n $this->_cookieManager->setPublicCookie('trackingname', $customerName, $metadata);\r\n\r\n $quoteId = $this->_checkoutSession->getQuoteId() ? $this->_checkoutSession->getQuoteId() : '';\r\n $this->_cookieManager->setPublicCookie('trackingorderid', $quoteId, $metadata);\r\n\r\n if (!$this->_cookieManager->getCookie('trackingsession')) {\r\n $this->_cookieManager->setPublicCookie('trackingsession', \r\n $coreSession->getTrackingSessionId(), \r\n $metadata);\r\n }\r\n }", "public function setCookiesPath($path);", "function store_cookies($cookie_file)\n\t{\n\t\t//连接关闭以后,存放cookie信息的文件名称 (cookies stored in $cookie_file)\n\t\tcurl_setopt ($this->ch, CURLOPT_COOKIEJAR, $cookie_file);\n\t\t//包含cookie信息的文件名称,这个cookie文件可以是Netscape格式或者HTTP风格的header信息\n\t\tcurl_setopt ($this->ch, CURLOPT_COOKIEFILE, $cookie_file);\n\t}", "public function test_public_getCookies_DifferentPath()\n {\n // Verify that our cookie is available.\n $cookies = $this->object->getCookies($this->serviceUrl_1c);\n $this->assertEquals(1, count($cookies));\n $this->assertEquals('k1jut1r1bqrumpei837kk4jks0', $cookies['SID']);\n }", "public function getCookiesList() {\n\t\t$val = array_merge($this->requestCookies, $this->updatedCookies);\n\t\twhile ($pos = array_search(null, $val))\n\t\t\tunset($val[$pos]);\n\t\treturn $val;\n\t}", "public static function validateCookies() {\n\t\tforeach ( $_COOKIE as $key => $value ) {\n\t\t\t// Skip our session cookie which isn't created via our cookie functions\n\t\t\tif ($key != session_name ()) {\n\t\t\t\t$parts = explode ( '--', $value );\n\t\t\t\tif (! isset ( $parts [1] ) or $parts [1] != md5 ( $parts [0] . Security_Config::$salt )) {\n\t\t\t\t\tself::destroyCookie ( $key );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn;\n\t}", "public function addCookies(array $cookies) {}", "public function get_cookies() {\n return $this->_cookies;\n }", "public function getCookieCredentials() {\n $server_name = $this->full_server_name;\n\n if ($server_name == '[manual]') {\n // Manual server - no login.\n return array(\n 'uri' => $server_name,\n 'username' => 'none',\n 'password' => 'none',\n );\n }\n\n // Get the user name and password from the login field.\n preg_match('/user-name=\\\"(.*)\\\" user-password/i', $server_name, $user_matches);\n preg_match('/user-password=\\\"(.*)\\\" /i', $server_name, $password_matches);\n $username = $user_matches[1];\n $password = $password_matches[1];\n\n return array(\n 'uri' => $server_name,\n 'username' => $username,\n 'password' => $password,\n );\n }", "#[Pure]\n public function getResponseCookies($flags = null, ?array $allowed_extras = null) {}", "public function clearCookies() {\n return $this->command('clear_cookies');\n }", "function get_unique_cookies() : array {\n\t$config = Cloud\\get_config();\n\t$unique_cookies = $config['page-cache']['unique-cookies'] ?? [];\n\t$unique_keys = [];\n\n\tforeach ( $unique_cookies as $cookie ) {\n\t\tif ( ! empty( $_COOKIE[ $cookie ] ) ) {\n\t\t\t// Add header to batcache vary keys.\n\t\t\t// phpcs:ignore HM.Security.ValidatedSanitizedInput.InputNotSanitized, HM.Security.ValidatedSanitizedInput.MissingUnslash\n\t\t\t$unique_keys[ $cookie ] = $_COOKIE[ $cookie ];\n\t\t}\n\t}\n\n\treturn $unique_keys;\n}", "function testCookies() {\n\t$config = getConfig();\n\t$root = getRootPath();\n\t\n\t// Get the test page.\n\t$http = new \\AutoHttp\\Http($config);\n\t$page = $http->getPage($root . '/test/pages/http/cookie.php');\n\t\n\t// Verify we didn't send a cookie.\n\tif (strpos($page['body'], \"Cookie named 'user' is not set!\") === false)\n\t\treturn 'The cookie shouldn\\'t be set on our first page access.';\n\t\t\n\t// Get the page again.\n\t$page = $http->getPage($root . '/test/pages/http/cookie.php');\n\t\n\t// Verify we sent a cookie this time.\t\t\n\tif (strpos($page['body'], \"Cookie 'user' is set!\") === false ||\n\t\tstrpos($page['body'], \"Value is: John Doe\") === false)\n\t\treturn 'The cookie should be set on our second page access.';\n\t\t\n\treturn true;\n}", "function _rocket_add_aelia_currencyswitcher_dynamic_cookies( $cookies ) {\n\t$cookies[] = 'aelia_cs_recalculate_cart_totals';\n\t$cookies[] = 'aelia_cs_selected_currency';\n\t$cookies[] = 'aelia_customer_country';\n\treturn $cookies;\n}", "public function __construct($cookiePath=\"\", $userAgent=\"\") {\r\n\r\n\t\tif(!empty($cookiePath))\r\n\r\n\t\t\t$this->cookiefile = $cookiePath;\r\n\r\n\t\telse\r\n\r\n\t\t\t$this->cookiefile =\"cookies.txt\";\r\n\r\n\t\t\r\n\r\n\t\tif (!file_exists($this->cookiefile)) {\r\n\r\n\t\t\t$fp = fopen($this->cookiefile,\"w+\");\r\n\r\n\t\t\tfwrite($fp,\"\");\r\n\r\n\t\t\tfclose($fp);\r\n\r\n\t\t}\r\n\r\n\t\tswitch ($userAgent) {\r\n\r\n\t\t\tcase 'mozilla':\r\n\r\n\t\t\t\t$this->userAgent='Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3';break;\r\n\r\n\t\t\tcase 'ie':\r\n\r\n\t\t\t\t$this->userAgent='Mozilla/5.0 (Windows; U; MSIE 7.0; Windows NT 6.0; en-US)';break;\r\n\r\n\t\t\tcase '':\r\n\r\n\t\t\t\t$this->userAgent='Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3';break;\r\n\r\n\t\t\tdefault:\r\n\r\n\t\t\t\t$this->userAgent=$userAgent;\r\n\r\n\t\t}\r\n\r\n\t}", "public function declineCookies(){\n\t\tsetcookie('isUsingCookies', false, 0);\n\t\treturn redirect()->route('home');\n\t}" ]
[ "0.6486365", "0.61643726", "0.59896064", "0.5717968", "0.57139874", "0.5662884", "0.56552374", "0.56539065", "0.5605654", "0.55328864", "0.5508583", "0.5483877", "0.54750156", "0.5471019", "0.54589176", "0.53041375", "0.52894527", "0.52894413", "0.526278", "0.52358335", "0.52197725", "0.52075905", "0.5186487", "0.51684475", "0.51400936", "0.51157254", "0.5114709", "0.50945735", "0.5076982", "0.5075058", "0.5067643", "0.50625515", "0.5048309", "0.5044441", "0.50406456", "0.5039609", "0.5030129", "0.5023764", "0.5001449", "0.4996322", "0.49958375", "0.4995538", "0.49775496", "0.49694636", "0.49688873", "0.49630862", "0.49630862", "0.4954457", "0.4948451", "0.49409023", "0.49336928", "0.49255925", "0.4924207", "0.49215627", "0.49174857", "0.49070594", "0.48811582", "0.48762777", "0.4874287", "0.48692995", "0.4868917", "0.48628655", "0.4859941", "0.48596218", "0.48529017", "0.48448813", "0.48418206", "0.4830821", "0.4827031", "0.48255244", "0.4822958", "0.48139784", "0.47924623", "0.47809398", "0.47653267", "0.47622558", "0.4760414", "0.4757895", "0.47555953", "0.47505802", "0.4746953", "0.47346422", "0.47319204", "0.47305167", "0.47289133", "0.472435", "0.47231135", "0.4711412", "0.47112712", "0.4708678", "0.47053915", "0.47049716", "0.4704847", "0.46916148", "0.469126", "0.46898594", "0.46878728", "0.46858782", "0.4675881", "0.46756887" ]
0.66864043
0
(Noncookiefile) Save all cookies for the currently active user. Note that this function is called frequently! But it is ONLY called if a nonstring answer was returned by the getUserCookiesFilePath() call. If your Storage backend class uses a cookiefile, make this a noop.
public function saveUserCookies ($rawData) { $this->_setUserKey($this->_username, self::COOKIES, $rawData); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function saveCookie(){\n\t\t$expire = time() + Configuration::get(Configuration::APP_COOKIE_TIME) ;\n\t\tforeach( self::$cookiesToSave as $n => $v ){\n\t\t\tsetcookie($n,$v,$expire) ;\n\t\t}\n\t}", "private function writeCookieFileCache()\n {\n $timeLive = Carbon::now()->addMinutes(480);\n Cache::put('AuthApiBpmCookie', $this->cookies, $timeLive);\n Log::info('Получены новые куки'.$this->cookies);\n }", "public function save(): void\n {\n $json = [];\n /** @var SetCookie $cookie */\n foreach ($this as $cookie) {\n if (CookieJar::shouldPersist($cookie, $this->storeSessionCookies)) {\n $json[] = $cookie->toArray();\n }\n }\n\n $_SESSION[$this->sessionKey] = \\json_encode($json);\n }", "function store_cookies($cookie_file)\n\t{\n\t\t//连接关闭以后,存放cookie信息的文件名称 (cookies stored in $cookie_file)\n\t\tcurl_setopt ($this->ch, CURLOPT_COOKIEJAR, $cookie_file);\n\t\t//包含cookie信息的文件名称,这个cookie文件可以是Netscape格式或者HTTP风格的header信息\n\t\tcurl_setopt ($this->ch, CURLOPT_COOKIEFILE, $cookie_file);\n\t}", "public function getUserCookiesFilePath ()\n\t{\n\t\treturn null;\n\t}", "public static function remember_from_cookies() {\n\t\tif (isset($_COOKIE['remember']) && !(self::logged_in())) {\n\t\t\t$user_id = explode(\"==\", $_COOKIE['remember'])[0];\n\t\t\t$user = User::find_where(\"users\", array(\"id\" => $user_id));\n\t\t\t$expected = $user_id.\"==\".$user[0][\"remember_token\"];\n\t\t\tif ($user_id && $user && $expected == $_COOKIE['remember']) {\n\t\t\t\tSession::write(\"user\", $user);\n\t\t\t\t$remember_token = $user[0][\"remember_token\"];\n\t\t\t\tsetcookie(\"remember\", $user[0][\"id\"]. \"==\". $remember_token, time()+60*60*24*7);\n\t\t\t} else {\n\t\t\t\tsetcookie(\"remember\", null, -1);\n\t\t\t}\n\t\t}\n\t}", "private function writeCookieData($cookieHash) {\n $userId=$_SESSION['user_id'];\n $data = [\n \"user_id\" => $userId,\n \"last_activity\" => time(),\n \"bag\" => isset($_SESSION['bag']) ? $_SESSION['bag'] : []\n ];\n $cookieHash = preg_replace(\"/[^A-Za-z0-9]/\", '', $cookieHash);\n $cookieFile = $this->_cookiePath. $cookieHash . \".txt\"; \n file_put_contents($cookieFile, serialize($data));\n }", "public function save()\n {\n if (headers_sent())\n {\n throw new \\RuntimeException('Cache cookie can not be saved as headers have '\n . 'already been sent to the user agent.');\n }\n\n $headers = headers_list(); // List all headers\n header_remove(); // remove all headers\n $regexp = '/^Set-Cookie\\\\s*:\\\\s*' . preg_quote($this->name) . '=/';\n\n foreach ($headers as $header)\n {\n // Re-add every header except the one for this cookie\n if (!preg_match($regexp, $header))\n {\n header($header, true);\n }\n }\n\n if (!empty($this->content) && count($this->content) > 0)\n {\n if (function_exists('msgpack_pack'))\n {\n $data = msgpack_pack($this->content);\n }\n else\n {\n $data = json_encode($this->content);\n }\n\n // Store expiration time in minutes\n $data = round((time() - $this->start_timestamp + $this->duration*60)/60) . '|' . $data;\n\n $cookie = hash_hmac($this->digest_method, $data, $this->secret) . '|' . $data;\n\n $duration = $this->duration ? time() + $this->duration * 60 : 0;\n\n if (strlen($cookie . $this->path . $duration . $this->domain . $this->name) > 4080)\n {\n throw new \\OverflowException('Cache cookie can not be saved as its size exceeds 4KB.');\n }\n\n setcookie($this->name, $cookie, $duration, $this->path, $this->domain, $this->secure, true);\n $_COOKIE[$this->name] = $cookie;\n }\n else\n {\n setcookie($this->name, '', 1, $this->path, $this->domain, $this->secure, true);\n unset($_COOKIE[$this->name]);\n }\n\n return true;\n }", "function save()\n {\n $this->getSession()->set($this->getCookieJarName(), $this->cookieJar);\n }", "protected function _setCookies() {\n\t\tforeach ($this->_cookies as $name => $c) {\n\t\t\tsetcookie(\n\t\t\t\t$name, $c['value'], $c['expire'], $c['path'],\n\t\t\t\t$c['domain'], $c['secure'], $c['httpOnly']\n\t\t\t);\n\t\t}\n\t}", "public function setCookieValues()\r\n {\r\n $objectManager = \\Magento\\Framework\\App\\ObjectManager::getInstance();\r\n $coreSession = $objectManager->get('Magento\\Framework\\Session\\Generic');\r\n $_cookieMetadata = $objectManager->get('Magento\\Framework\\Stdlib\\Cookie\\CookieMetadataFactory');\r\n\r\n $customerName = self::ANONYMOUS_USER;\r\n $customerEmail = self::ANONYMOUS_USER;\r\n $customerId = '';\r\n\r\n $metadata = $_cookieMetadata\r\n ->createPublicCookieMetadata()\r\n ->setDuration(self::TIMEOUT)\r\n ->setPath('/')\r\n ->setDomain($coreSession->getCookieDomain())\r\n ->setHttpOnly(false);\r\n\r\n if ($this->_customerSession->isLoggedIn()) {\r\n $customer = $this->_customerSession->getCustomer();\r\n $customerName = $customer->getName();\r\n $customerId = $customer->getId();\r\n $customerEmail = $customer->getEmail();\r\n $this->_cookieManager->setPublicCookie('user_loggedin', true, $metadata);\r\n $this->_cookieManager->setPublicCookie('afterlogin_session_id', \r\n $coreSession->getCustomerSessionId(), \r\n $metadata);\r\n $this->_cookieManager->setPublicCookie('trackingid', $customerId, $metadata);\r\n } else {\r\n if (!empty($this->_request->getParam('guest_user_id'))) {\r\n $customerId = $coreSession->getTrackingSessionId();\r\n } elseif (empty($this->_cookieManager->getCookie('trackingid'))) {\r\n $customerId = $coreSession->getTrackingSessionId();\r\n }\r\n $this->_cookieManager->setPublicCookie('user_loggedin', false, $metadata);\r\n }\r\n !empty($customerId) ? $this->_cookieManager->setPublicCookie('trackingid', \r\n $customerId, \r\n $metadata) : '';\r\n\r\n $this->_cookieManager->setPublicCookie('trackingemail', $customerEmail, $metadata);\r\n $this->_cookieManager->setPublicCookie('trackingname', $customerName, $metadata);\r\n\r\n $quoteId = $this->_checkoutSession->getQuoteId() ? $this->_checkoutSession->getQuoteId() : '';\r\n $this->_cookieManager->setPublicCookie('trackingorderid', $quoteId, $metadata);\r\n\r\n if (!$this->_cookieManager->getCookie('trackingsession')) {\r\n $this->_cookieManager->setPublicCookie('trackingsession', \r\n $coreSession->getTrackingSessionId(), \r\n $metadata);\r\n }\r\n }", "public function enableCookies() {}", "function _setCookies($user) {\n setcookie(\"user\", $user, time()+3600);\n }", "private function _prepareCookieJar() {\n if(!empty($_SESSION['AppceleratorCloudServices']['cookie_jar'])) {\n // update modified time so it doesn't get cleaned up\n $this->_cookieJar = $_SESSION['AppceleratorCloudServices']['cookie_jar'];\n return touch($this->_cookieJar);\n }\n\n $cookieFile = tempnam($this->tempDir, 'ACS');\n if(!$cookieFile)\n throw new UnexpectedValueException('There was a problem storing your authentication cookie.');\n\n $this->_cookieJar = $cookieFile;\n $loginResponse = $this->usersLogin();\n\n $_SESSION['AppceleratorCloudServices']['cookie_jar'] = $this->_cookieJar;\n $_SESSION['AppceleratorCloudServices']['current_user'] = $loginResponse->response->users[0];\n return true;\n }", "private function storeCookie() {\n try {\n $this->cookie->store(URLDATATRACKER_ISDATAINURL, $this->checkDataInURL() ? 'TRUE' : 'FALSE');\n echo \"Successfully stored cookie.\\n\";\n } catch (Exception $e) {\n echo \"Failed to store cookie.\\n\";\n throw $e;\n }\n }", "public function loadUserCookies ()\n\t{\n\t\treturn $this->_getUserKey($this->_username, self::COOKIES);\n\t}", "public static function all(){\n return $_COOKIE;\n }", "public function restoreLoginFromCookie() {\n\t$this->Cookie->name = 'Users';\n\t$cookie = $this->Cookie->read('rememberMe');\n\tif (!empty($cookie) && !$this->Auth->user()) {\n\t $data['User'][$this->Auth->fields['username']] = $cookie[$this->Auth->fields['username']];\n\t $data['User'][$this->Auth->fields['password']] = $cookie[$this->Auth->fields['password']];\n\t $this->Auth->login($data);\n\n\t if ($this->Auth->isLoggedin()) {\n\t\t$this->log('Cookie login succesful');\n\t }\n\t}\n }", "public function store()\n {\n return response('200')->cookie(\n 'cookie-popup',\n 'checked',\n time() + (365 * 24 * 60 * 60)\n );\n }", "protected static function persistCurrentUser()\n {\n // Black hole\n trigger_error(\n \"Method for remembering the current user isn't implemented. \" .\n \"You can use the Jasny\\Auth\\Sessions trait to store the current user in a session\",\n E_USER_NOTICE\n );\n }", "private function __setCookies( $cookieArray) {\n\t\t$expire = (time() + 3600) * 30;\n\t\t$path = COOKIE_PATH;\n\t\t$domain = COOKIE_DOMAIN;\n\t\t$secure = COOKIE_SECURE;\n\t\t$httpOnly = COOKIE_HTTP_ONLY;\n\n\t\tforeach ((array)$cookieArray as $key => $value) {\n\t\t\tswitch ($key) {\n\t\t\tcase 'ss_EmKey':\n\t\t\t\t\tsetrawcookie('ERIGHTS', $value, $expire, $path, $domain, $secure, $httpOnly);\n\t\t\t\t\tbreak;\n\n\t\t\tcase 'i_Constit':\n\t\t\t\t\tsetrawcookie('sm_constitid', $value, $expire, $path, $domain, $secure, $httpOnly);\n\t\t\t\t\tbreak;\n\n\t\t\tcase 'i_EmId':\n\t\t\t\t\tsetrawcookie('emeta_id', $value, $expire, $path, $domain, $secure, $httpOnly);\n\t\t\t\t\tbreak;\n\n\t\t\tcase 's_Name1':\n\t\t\t\t\tsetcookie('first_name', $value, $expire, $path, $domain, $secure, $httpOnly);\n\t\t\t\t\tbreak;\n\n\t\t\tcase 's_Name2':\n\t\t\t\t\tsetcookie('last_name', $value, $expire, $path, $domain, $secure, $httpOnly);\n\t\t\t\t\tbreak;\n\n\t\t\tcase 'sb_IsOrg':\n\t\t\t\t\tsetcookie('is_org', $value, $expire, $path, $domain, $secure, $httpOnly);\n\t\t\t\t\tbreak;\n\n\t\t\tcase 'se_Email':\n\t\t\t\t\tsetrawcookie('email', $value, $expire, $path, $domain, $secure, $httpOnly);\n\t\t\t\t\tbreak;\n\n\t\t\tcase 's_MemStatus':\n\t\t\t\t\tsetcookie('status', $value, $expire, $path, $domain, $secure, $httpOnly);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif (isset($this->__cookies) && !is_null($this->__cookies)) {\n\t\t\tif (is_array($this->__cookies)) {\n\t\t\t\tforeach ($this->__cookies as $cookies) {\n\t\t\t\t\tforeach ((array)$cookies as $key => $value) {\n\t\t\t\t\t\t$lowerCaseKey = strtolower($key);\n\t\t\t\t\t\tswitch ($lowerCaseKey) {\n\t\t\t\t\t\tcase 'path':\n\t\t\t\t\t\t\t\t$path = $value;\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'domain':\n\t\t\t\t\t\t\t\t$domain = $value;\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'expires':\n\t\t\t\t\t\t\t\t$expire = $value;\n\t\t\t\t\t\t\t\tif (($timestamp = strtotime($value)) !== false) {\n\t\t\t\t\t\t\t\t\t$expire = $timestamp;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'secure':\n\t\t\t\t\t\t\t\t$secure = true;\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'httponly':\n\t\t\t\t\t\t\t\t$httpOnly = true;\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t$cookieName = $key;\n\t\t\t\t\t\t\t\t$cookieValue = $value;\n\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tsetrawcookie($cookieName, $cookieValue, $expire, $path, $domain, $secure, $httpOnly);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function cookies() {\n $cookies = $this->command('cookies');\n $objCookies = array();\n foreach ($cookies as $cookie) {\n $objCookies[$cookie[\"name\"]] = new Cookie($cookie);\n }\n return $objCookies;\n }", "private function refreshCookiesLifetime() {\n\t\t// @see https://www.ccm19.de/\n\t\treturn;\n\n\t\tif (is_array($_COOKIE) == false) {\n\t\t\treturn;\n\t\t}\n\n\t\t$expire = time() + (int)$this->settings[\"cookie_lifetime\"] * 60 * 60 * 24;\n\t\t$path = rtrim(PAPOO_WEB_PFAD, \"/\").\"/\";\n\t\t// Cookie-Domain setzen, Cookie mit und ohne www. gültig machen. Dabei ebenfalls lokale Installationen beachten. (aus session_class uebernommen)\n\t\t$domain = str_replace('.www.', '.', (strpos($_SERVER['SERVER_NAME'], '.') === false ? '' : '.'.$_SERVER['SERVER_NAME']));\n\n\t\t// RegEx-Patterns zum Filtern der Cookies nach deren Namen\n\t\t$blacklist = array(\n\t\t\t\"~^_{1,2}g~\",\n\t\t);\n\n\t\tforeach ($_COOKIE as $key => $value) {\n\t\t\t$cookieIsBlacklisted = array_reduce($blacklist, function ($blacklisted, $pattern) use ($key) {\n\t\t\t\treturn $blacklisted || preg_match($pattern, $key);\n\t\t\t}, false);\n\n\t\t\tif ($cookieIsBlacklisted) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t@setcookie($key, $value, $expire, $path, $domain, false, true);\n\t\t}\n\t}", "public function flushQueuedCookies(): static;", "public function setCookies(?array $cookies = null) {}", "protected function sendCookies()\n {\n if ($this->getCookies() === null) {\n return;\n }\n $request = Yii::$app->getRequest();\n if ($request->enableCookieValidation) {\n if ($request->cookieValidationKey == '') {\n throw new InvalidConfigException(get_class($request) . '::cookieValidationKey must be configured with a secret key.');\n }\n $validationKey = $request->cookieValidationKey;\n }\n foreach ($this->getCookies() as $cookie) {\n $value = $cookie->value;\n if ($cookie->expire != 1 && isset($validationKey) && !($cookie instanceof PlainCookie)) {\n $value = Yii::$app->getSecurity()->hashData(serialize([$cookie->name, $value]), $validationKey);\n }\n setcookie($cookie->name, $value, $cookie->expire, $cookie->path, $cookie->domain, $cookie->secure, $cookie->httpOnly);\n }\n }", "public static function initCookies() {\n // Get valid cookies\n $cookies = array_map('self::mapCookies', $_COOKIE, array_keys($_COOKIE));\n $cookies = array_filter($cookies);\n $cookies = array_values($cookies);\n\n // Get valid sessions\n $sessions = array_map('self::mapCookies', $_SESSION, array_keys($_SESSION));\n $sessions = array_filter($sessions);\n $sessions = array_values($sessions);\n\n // Sort valid cookies and create objects to save\n for ($i = 0; $i < count($cookies); $i++) {\n $cookie = new NativeCookie;\n $cookie->setName($cookies[$i][0])->setContent($cookies[$i][1]);\n\n $expirationDate = explode(NativeCookie::$lifetimeSeperator, $cookies[$i][1]);\n\n if (array_key_exists(1, $expirationDate)) {\n $cookie->setLifetime((int)($expirationDate[1]));\n }\n else {\n $cookie->setLifetime(false);\n }\n\n self::$sessions[] = $cookie;\n }\n\n // Sort valid sessions and create objects to save\n for ($i = 0; $i < count($sessions); $i++) {\n $session = new NativeSession;\n $session->setName($sessions[$i][0])->setContent($sessions[$i][1]);\n\n self::$sessions[] = $session;\n }\n }", "public function test_public_storeCookies_DontStoreExpiresPast() {\n\t// Verify that we have on cookie to start.\n\t$this->assertEquals(1, count($this->object->getCookies($this->serviceUrl_1)));\n\n\t// Send set-cookie header to remove the cookie\n\t$headers = array('Set-Cookie: bob=jones; path=/; expires='.gmdate('D, d-M-Y H:i:s e', time() - 90000));\n\t$this->object->storeCookies($this->serviceUrl_1, $headers);\n\n\t$cookies = $this->object->getCookies($this->serviceUrl_1);\n\t$this->assertEquals(1, count($cookies));\n\t$this->assertArrayNotHasKey('jones', $cookies);\n }", "function storeInCookie($user_profile_data)\n{\n\t$context = Context::getContext();\n\t$cookie = $context->cookie;\n\t$cookie->login_radius_data = serialize($user_profile_data);\n}", "public function disableCookies() {\n\t\t$this->cookiesEnabled = FALSE;\n\t}", "function setCookies() {\r\n\t\t//cookies are set to 1 month, or 30 days, from now.\r\n\t\tsetcookie(\"phoneNumber\", $this->phone_number, time() + (60 * 60 * 24 * 30));\r\n\t\tsetcookie(\"email\", $this->email, time() + (60 * 60 * 24 * 30));\r\n\t}", "function _checkCookies() {\n if(isset($_COOKIE)) {\n if(isset($_COOKIE['user'])) {\n $_SESSION['is_login'] = true;\n $_SESSION['userid'] = $_COOKIE['user'];\n }\n }\n }", "public function setCookiesPath($path);", "function set_usercookies() {\r\n\t\tglobal $login_name, $login_password, $lang, $actual_user_is_admin, $actual_user_is_logged_in, $actual_user_id, $actual_user_name, $actual_user_showname, $actual_user_passwd_md5, $actual_user_lang, $actual_user_online_id, $_COOKIE;\r\n\t\r\n\t\t$actual_user_online_id = \"\";\r\n\t\t$actual_user_is_admin = false;\r\n\t\t$actual_user_is_logged_in = false;\r\n\t\t$actual_user_id = 0;\r\n\t\t//\r\n\t\t// FIX ME: get this by default config or by HTTP headers of the client\r\n\t\t//\r\n\t\t$actual_user_lang = 'de'; \r\n\t\t$actual_user_name = '';\r\n\t\t$actual_user_showname = '';\r\n\t\t$actual_user_passwd_md5 = '';\r\n\t\t$languages = array('de', 'en');\r\n\t\t//\r\n\t\t// Check: has the user changed the language by hand?\r\n\t\t//\r\n\t\tif(isset($lang)) {\r\n\t\t\tif(in_array($lang, $languages))\r\n\t\t\t\t$actual_user_lang = $lang;\r\n\t\t}\r\n\t\t//\r\n\t\t// Get the language from the cookie if it' s not changed\r\n\t\t//\r\n\t\telseif(isset($_COOKIE['CMS_user_lang'])) {\r\n\t\t\tif(in_array($_COOKIE['CMS_user_lang'], $languages))\r\n\t\t\t\t$actual_user_lang = $_COOKIE['CMS_user_lang'];\r\n\t\t}\r\n\t\t//\r\n\t\t// Set the cookie (for the next 93(= 3x31) Days)\r\n\t\t//\r\n\t\tsetcookie('CMS_user_lang', $actual_user_lang, time() + 8035200); \r\n\t\t//\r\n\t\t// Tells the cookie: \"the user is logged in!\"?\r\n\t\t//\r\n\t\tif(isset($_COOKIE['CMS_user_cookie'])) {\r\n\t\t\t$data = explode('|', $_COOKIE['CMS_user_cookie']);\r\n\t\t\t$actual_user_online_id = @$data[0];\r\n\t\t\t$actual_user_name = @$data[1];\r\n\t\t\t$actual_user_passwd_md5 = @$data[2];\r\n\t\t}\r\n\t\t//\r\n\t\t// Tries somebody to log in?\r\n\t\t//\r\n\t\tif(isset($login_name) && isset($login_password)) {\r\n\t\t\t$actual_user_name = $login_name;\r\n\t\t\t$actual_user_passwd_md5 = md5($login_password);\r\n\t\t}\r\n\t\t\r\n\t\tif($actual_user_online_id == '')\r\n\t\t\t$actual_user_online_id = md5(uniqid(rand()));\r\n\t\t//\r\n\t\t// Check: is the user really logged in?\r\n\t\t//\r\n\t\tif($actual_user_name != \"\" && $actual_user_passwd_md5 != \"\") {\r\n\t\t\t$sql = \"SELECT *\r\n\t\t\t\tFROM \" . DB_PREFIX . \"users\r\n\t\t\t\tWHERE user_name='$actual_user_name' AND user_password='$actual_user_passwd_md5'\";\r\n\t\t\t$original_user_result = db_result($sql);\r\n\t\t\t$original_user = mysql_fetch_object($original_user_result);\r\n\t\t\tif(@$original_user->user_name == '') {\r\n\t\t\t\t$actual_user_is_admin = false;\r\n\t\t\t\t$actual_user_is_logged_in = false;\r\n\t\t\t\t$actual_user_name = '';\r\n\t\t\t\t$actual_user_passwd_md5 = '';\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t$actual_user_is_logged_in = true;\r\n\t\t\t\t$actual_user_showname = $original_user->user_showname;\r\n\t\t\t\t$actual_user_id = $original_user->user_id;\r\n\t\t\t\tif($original_user->user_admin == 'y')\r\n\t\t\t\t\t$actual_user_is_admin = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tsetcookie('CMS_user_cookie',$actual_user_online_id . '|' . $actual_user_name . '|' . $actual_user_passwd_md5, time() + 14400);\r\n\t}", "public static function restore_from_cookie(){\n\t\tglobal $con;\n\t\t\n\t\tif(isset($_COOKIE['id'])){\n\t\t\t$prep = $con->prepare(\"\n\t\t\t\tSELECT user_name FROM `users`\n\t\t\t\tINNER JOIN `tokens`\n\t\t\t\t\tON token_user = user_id\n\t\t\t\tWHERE token_val = ?\n\t\t\t\t\tAND token_created_on < DATE_ADD(NOW(), INTERVAL 30 DAY)\n\t\t\t\");\n\t\t\t\n\t\t\t$prep->bind_param(\"s\", $_COOKIE['id']);\n\t\t\t\n\t\t\tif($prep->execute()) {\n\t\t\t\t$prep->bind_result($user_name);\n\t\t\t\t\n\t\t\t\tif($prep->fetch()) {\n\t\t\t\t\t\n\t\t\t\t\t$_SESSION['user-name'] = $user_name;\n\t\t\t\t\t$prep->close();\n\t\t\t\t\t\n\t\t\t\t\treturn true;\n\t\t\t\t} else {\n\t\t\t\t\t$prep->close();\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$prep->close();\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "protected function sendCookies()\n {\n if ($this->_cookies === null) {\n return;\n }\n $request = Yii::$app->getRequest();\n if ($request->enableCookieValidation) {\n if ($request->cookieValidationKey == '') {\n throw new InvalidConfigException(get_class($request) . '::cookieValidationKey must be configured with a secret key.');\n }\n $validationKey = $request->cookieValidationKey;\n }\n foreach ($this->getCookies() as $cookie) {\n $value = $cookie->value;\n if ($cookie->expire != 1 && isset($validationKey)) {\n $value = Yii::$app->getSecurity()->hashData(serialize([$cookie->name, $value]), $validationKey);\n }\n $this->swoole_http_response->cookie($cookie->name, $value, $cookie->expire, $cookie->path, $cookie->domain, $cookie->secure, $cookie->httpOnly);\n }\n }", "public function getCookie(): array;", "function getCookieData() {\n\t\t$oEncrypt = utilityEncrypt::factory(file_get_contents(system::getConfig()->getPathData().'/dash.session.key'));\n\t\treturn utilityEncrypt::toUriString(\n\t\t\t$oEncrypt->encrypt(\n\t\t\t\tserialize(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => $this->getUser()->getID(),\n\t\t\t\t\t\t'email' => $this->getUser()->getEmail(),\n\t\t\t\t\t\t'expiry' => strtotime('+72 hours'),\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\t}", "public function getCookies()\n {\n\n }", "public function clearCookies()\n {\n $this->cookie_data = array();\n }", "public function acceptCookies(){\n\t\tsetcookie('isUsingCookies', true, time()+60*60*24*365);\n\t\treturn redirect()->route('home');\n\t}", "private function set_cookiefile($file) {\r\n\t\tif (!empty($this->options[\"CURLOPT_COOKIEFILE\"])) { trigger_error(\"file cookie is activated and cannot be modified\", E_USER_WARNING); }\r\n\t\telseif (empty($file)) { trigger_error(\"an accessible file is required for CURLOPT_COOKIEFILE\", E_USER_WARNING); }\r\n\t\telse {\r\n\t\t\tif (!file_exists($file)) { touch($file); }\r\n\t\t\tif (is_dir($file)) { trigger_error(\"'{$file}' is a directory\", E_USER_WARNING); }\r\n\t\t\telseif (!is_readable($file)) { trigger_error(\"no read permission to access '{$file}'\", E_USER_WARNING); }\r\n\t\t\telse {\r\n\t\t\t\t$this->session_cookie = false;\r\n\t\t\t\tif (substr($file, 0, 2) == \".\".DIRECTORY_SEPARATOR) { $file = rtrim(getcwd(), DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR.substr($file, 2); }\t\t\t\t# fix relative path\r\n\t\t\t\t$this->options[\"CURLOPT_COOKIEFILE\"] = $file;\r\n\t\t\t\tcurl_setopt($this->ch, CURLOPT_COOKIEFILE, $file);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "function clear_cookies($exeptions=array())\r\n\t{\r\n\t\tif(is_array($exeptions))\r\n\t\t{\r\n\t\t\tforeach($_COOKIE as $key => $value)\r\n\t\t\t{\r\n\t\t\t\tif(!array_key_exists($key,$exeptions) || !in_array($key,$exeptions))\r\n\t\t\t\t\tsetcookie(\"$key\",'');\r\n\t\t\t}\r\n\t\t}else\r\n\t\t{\r\n\t\t\tforeach($_COOKIE as $key => $value)\r\n\t\t\t{\r\n\t\t\t\tsetcookie(\"$key\",'');\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public static function send()\n {\n foreach (static::$jar as $cookie) {\n setcookie($cookie['name'], $cookie['value'], $cookie['expiration'], $cookie['path'], $cookie['domain'],\n $cookie['secure'], true);\n }\n }", "public function serialize()\n {\n return serialize($this->cookies);\n }", "public static function checkSystemCookie(){\n \n if (isset($_COOKIE['system_cookie'])){\n \n // user is in session. Can only be this after first request. \n \n if (isset($_SESSION['in_session'])){\n return;\n }\n\n if (isset($_SESSION['id'])){\n // user is logged in we return\n return;\n }\n \n // get a system cookie if any\n $row = q::select('system_cookie')->\n filter('cookie_id =', @$_COOKIE['system_cookie'])->\n fetchSingle();\n \n // we got a cookie that equals one found in database\n if (!empty($row)){\n $days = self::getCookiePersistentDays();\n \n // delete system_cookies that are out of date. \n $now = date::getDateNow();\n $last = date::substractDaysFromTimestamp($now, $days);\n q::delete('system_cookie')->\n filter('account_id =', $row['account_id'])->condition('AND')->\n filter('last_login <', $last)->\n exec();\n\n // on every cookie login we update the cookie id \n $last_login = date::getDateNow(array('hms' => true));\n $new_cookie_id = random::md5();\n $values = array (\n 'account_id' => $row['account_id'],\n 'cookie_id' => $new_cookie_id,\n 'last_login' => $last_login);\n \n q::delete('system_cookie')->\n filter('cookie_id=', @$_COOKIE['system_cookie'])->\n exec();\n \n q::insert('system_cookie')->\n values($values)->\n exec();\n //filter('cookie_id =' , $new_cookie_id)->condition('AND')->\n //filter('last_login =', $last_login)->exec();\n \n // set the new cookie\n self::setCookie('system_cookie', $new_cookie_id);\n \n // get account which is connected to account id\n $account = self::getAccount($row['account_id']);\n \n // user with account\n if (!empty($account)){\n \n $_SESSION['id'] = $account['id'];\n $_SESSION['admin'] = $account['admin'];\n $_SESSION['super'] = $account['super'];\n $_SESSION['type'] = $account['type'];\n \n } else {\n // keep anon user in session\n $_SESSION['id'] = 0;\n $_SESSION['type'] = 'anon';\n }\n } \n }\n }", "public function clearCookies() {\n\t\t\t$this->_cookies = [];\n\t\t}", "function doCookies() {\r\n setcookie(\"cli_num\", 123456789, time() + (86400 * 1), \"/\");\r\n setcookie(\"cli_fname\", $_POST['first_name'], time() + (86400 * 1), \"/\");\r\n setcookie(\"cli_lname\", $_POST['last_name'], time() + (86400 * 1), \"/\");\r\n setcookie(\"cli_dob\", $_POST['dob'], time() + (86400 * 1), \"/\");\r\n setcookie(\"cli_email\", $_POST['email'], time() + (86400 * 1), \"/\");\r\n setcookie(\"cli_phone\", $_POST['phone'], time() + (86400 * 1), \"/\");\r\n setcookie(\"cli_add\", $_POST['address'], time() + (86400 * 1), \"/\");\r\n \r\n /* //print the cookies\r\n echo \"Value is: \" . $_COOKIE[\"cli_num\"];\r\n echo \"Value is: \" . $_COOKIE[\"cli_fname\"];\r\n echo \"Value is: \" . $_COOKIE[\"cli_lname\"];\r\n echo \"Value is: \" . $_COOKIE[\"cli_dob\"];\r\n echo \"Value is: \" . $_COOKIE[\"cli_email\"];\r\n echo \"Value is: \" . $_COOKIE[\"cli_phone\"];\r\n echo \"Value is: \" . $_COOKIE[\"cli_add\"];*/\r\n \r\n}", "public function get_cookie() {\r\n\t\tforeach ($this->cookies as $key => $this_cookie) {\r\n\t\t\tif ($this_cookie[\"expires\"] < time()) { unset($this->cookies[$key]); }\r\n\t\t}\r\n\t\treturn $this->cookies;\r\n\t}", "public function clear_remember_cookie() {\n\t\treturn setcookie( self::REMEMBER_COOKIE, ' ', ITSEC_Core::get_current_time_gmt() - YEAR_IN_SECONDS, ITSEC_Lib::get_home_root(), COOKIE_DOMAIN, is_ssl(), true );\n\t}", "public function clear_wider_cookie() {\n\t\tglobal $phpbbForum, $config;\n\t\t\n\t\tif($this->is_working()) {\n\t\t\t\n\t\t\t// Do this even for unintegrated users -- it must be cleared if set\n\t\t\t$fStateChanged = $phpbbForum->foreground();\n\t\t\t$domain = $config['cookie_domain'];\n\t\t\t$path = $config['cookie_path'];\n\t\t\t$phpbbForum->restore_state($fStateChanged);\n\t\t\n\t\t\tsetcookie( LOGGED_IN_COOKIE, ' ', time() - YEAR_IN_SECONDS, $path, $domain);\n\t\t}\n\t\t\n\t}", "public function iDestroyMyCookies() {\n $this->getSession()->reset();\n }", "public function resetCookies($session_only = null) {}", "public function get_cookies()\n {\n }", "public function getCookies()\n {\n return $this->__getCookies();\n }", "public function cookies() {\n return $this->cookies;\n }", "function save_cookie($data) {\n //set for ~2 months\n setcookie(Main::getCookieName(), $data, time()+60*60*24*7*8);\n }", "public function test_public_storeCookies_ExpiresFuture() {\n\t// Verify that we have on cookie to start.\n\t$this->assertEquals(1, count($this->object->getCookies($this->serviceUrl_1)));\n\n\t// Send set-cookie header to remove the cookie\n\t$headers = array('Set-Cookie: bob=jones; path=/; expires='.gmdate('D, d-M-Y H:i:s e', time() + 600));\n\t$this->object->storeCookies($this->serviceUrl_1, $headers);\n\n\t$cookies = $this->object->getCookies($this->serviceUrl_1);\n\t$this->assertEquals(2, count($cookies));\n\t$this->assertEquals('jones', $cookies['bob']);\n }", "public function getHttpCookies(): array\n {\n return $_COOKIE;\n }", "public function getCookiesUser(): ?array\n {\n $email = $_COOKIE[APP_USERS_COOKIES_EMAIL] ?? '';\n return (new UserController())->getUser($email);\n }", "public function addCookies(array $cookies) {}", "public static function autoLogout()\n {\n \n foreach (array_keys($_COOKIE) as $name) {\n if (preg_match('/^WRAP.*/', $name)) {\n\n // Set the expiration date to one hour ago\n setcookie($name, \"\", time() - 3600, \"/\", \"ncsu.edu\");\n }\n }\n }", "private function set_cookiejar($file) {\r\n\t\tif (!empty($this->options[\"CURLOPT_COOKIEJAR\"])) { trigger_error(\"file cookie is activated and cannot be modified\", E_USER_WARNING); }\r\n\t\telseif (empty($file)) { trigger_error(\"an accessible file is required for CURLOPT_COOKIEJAR\", E_USER_WARNING); }\r\n\t\telseif (is_dir($file)) { trigger_error(\"'{$file}' is a directory\", E_USER_WARNING); }\r\n\t\telseif (!$this->is_writable($file)) { trigger_error(\"no write permission to access '{$file}'\", E_USER_WARNING); }\r\n\t\telse {\r\n\t\t\t$this->session_cookie = false;\r\n\t\t\tif (substr($file, 0, 2) == \".\".DIRECTORY_SEPARATOR) { $file = rtrim(getcwd(), DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR.substr($file, 2); }\t\t\t\t\t# fix relative path\r\n\t\t\t$this->options[\"CURLOPT_COOKIEJAR\"] = $file;\r\n\t\t\tcurl_setopt($this->ch, CURLOPT_COOKIEJAR, $file);\r\n\t\t}\r\n\t}", "function clearCookies(){\n\t\t$this->_HTTPCookies = array();\n\t}", "public function clearCookies() {\n return $this->command('clear_cookies');\n }", "public function loadCookies($username = '');", "protected function setCookies() {\n $this->cookies = array();\n\n $headers = $this->getHeader(Header::HEADER_COOKIE);\n if (!$headers) {\n return;\n }\n\n if (!is_array($headers)) {\n $headers = array($headers);\n }\n\n foreach ($headers as $header) {\n $cookies = explode(';', $header);\n foreach ($cookies as $cookie) {\n if (strpos($cookie, '=')) {\n list($name, $value) = explode('=', trim($cookie), 2);\n } else {\n $name = $cookie;\n $value = true;\n }\n\n $this->cookies[$name] = $value;\n }\n }\n }", "static function viaRemember()\n\t{\n\t\treturn self::$cookie;\n\t}", "public function cookies()\r\n {\r\n return $this->cookies;\r\n }", "public function cookies()\r\n {\r\n return $this->cookies;\r\n }", "public function getCookies()\n\t{\n\t\treturn $this->cookies->all();\n\t}", "public function saveStorage($file){\n\t\t$ser_storage = serialize($this->user);\n\t\tfile_put_contents($file, $ser_storage) or die(\"save: unable to open File\");\t\t\n\t}", "protected function _convert_cookies_to_session(){\n\t\t\t$cookie = yith_getcookie( 'yith_wcwl_products' );\n\n if( ! empty( $cookie ) ){\n\n $default_list = YITH_WCWL_Wishlist_Factory::get_default_wishlist();\n\n if( ! $default_list ){\n \treturn false;\n }\n\n foreach ( $cookie as $item ){\n if( $default_list->has_product( $item['prod_id'] ) ){\n continue;\n }\n\n $new_item = new YITH_WCWL_Wishlist_Item();\n\n $new_item->set_product_id( $item['prod_id'] );\n $new_item->set_quantity( $item['quantity'] );\n\n if( isset( $item['dateadded'] ) ){\n $new_item->set_date_added( $item['dateadded'] );\n }\n\n $default_list->add_item( $new_item );\n }\n\n $default_list->save();\n\n\t yith_destroycookie( 'yith_wcwl_products' );\n }\n\t\t}", "public function testTamperedCookiesAreReturnedAsNull()\n\t{\n\t\t$_COOKIE['foo'] = Cookie::sign('foo', 'bar');\n\t\t$this->assertEquals('bar', Cookie::get('foo'));\n\n\t\t$_COOKIE['foo'] .= '-baz';\n\t\t$this->assertNull(Cookie::get('foo'));\n\n\t\t$_COOKIE['foo'] = Cookie::sign('foo', 'bar');\n\t\t$_COOKIE['foo'] = 'aslk'.$_COOKIE['foo'];\n\t\t$this->assertNull(Cookie::get('foo'));\n\t}", "function loginThrowCookie()\n {\n\n // define all the global variables\n global $database, $message, $user, $settings, $functions, $browser;\n\n if (empty($_SESSION[\"user_data\"])) { // check if the current session is empty\n if (!empty($_COOKIE[\"user_data\"])) { // check if the current cookie is not empty or null\n\n // decrypt the user data\n $data = $functions->decryptIt($_COOKIE['user_data']);\n $data = explode(\",\", $data);\n\n // check if empty cookie\n if ($data[0] == \"\" || $data[1] == \"\") {\n return false;\n }\n\n $userID = $database->secureInput($data[0]);\n $cookieValue = $database->secureInput($data[1]);\n\n // ** Get the needed information from the database ** //\n $sql = \"SELECT * FROM \" . TBL_USERS . \" WHERE \" . TBL_USERS_ID . \" = '\" . $userID . \"'\";\n\n // get the sql results\n $result = $database->getQueryResults($sql);\n if ($database->anyError()) {\n return false;\n }\n\n // ** Check if such a user exists ** //\n if ($database->getQueryNumRows($result, true) > 0) {\n $row = $database->getQueryEffectedRow($result, true);\n\n // un-serialize the token array\n $tokenArray = unserialize($row[TBL_USERS_TOKEN]);\n\n // check if token and user data cookie match to continue\n if ($tokenArray['token'] != $cookieValue) {\n return false;\n }\n\n // check if the cookie was first created on the same device\n if ($tokenArray['browser_platform'] != $browser->getPlatform()) {\n return false;\n }\n\n // check if same ip login is disabled\n // then check if the stored ip matches the current device ip address\n if (!$settings->sameIpLogin()) {\n if ($tokenArray['ip'] != $functions->getUserIP()) {\n return false;\n }\n }\n\n // check if user has to sign in again with his credentials\n if ($row[TBL_USERS_SIGNIN_AGAIN]) {\n unset($_COOKIE[\"user_data\"]);\n unset($_COOKIE[\"user_id\"]);\n setcookie(\"user_data\", null, -1, '/');\n setcookie(\"user_id\", null, -1, '/');\n\n // update the database so that the user can log in again\n $sql = \"UPDATE \" . TBL_USERS . \" SET \" . TBL_USERS_SIGNIN_AGAIN . \" = '0' WHERE \" . TBL_USERS_ID . \" = '\" . $user->getID() . \"' AND \" . TBL_USERS_USERNAME . \" = '\" . $user->getUsername() . \"'\";\n\n // get the sql results\n $database->getQueryResults($sql);\n if ($database->anyError()) {\n return false;\n }\n\n $message->setError(\"You've been logged out for security reasons\", Message::Error);\n return false;\n }\n\n // ** Update the current session data ** //\n foreach ($row As $rowName => $rowValue) {\n $_SESSION[\"user_data\"][$rowName] = $rowValue;\n }\n\n // initiate the user data\n $user->initUserData();\n\n } else {\n return false;\n }\n } else {\n return false;\n }\n } else {\n return false;\n }\n\n return true;\n }", "function setcookie($name, $value, $expire = 0, $path = null,\n $domain = null, $secure = false, $httponly = false\n) {\n MockHttp::$cookies[] = [\n 'name' => $name,\n 'value' => $value,\n 'expire' => $expire,\n 'path' => $path,\n 'domain' => $domain,\n 'secure' => $secure,\n 'httponly' => $httponly,\n ];\n}", "public function test_public_storeCookies_httponly()\n {\n\t$headers = array('Set-Cookie: SID=\"hello world\"; path=/; domain=.example.com; HttpOnly');\n $this->object->storeCookies($this->serviceUrl_1, $headers);\n\n $cookies = $this->object->getCookies($this->serviceUrl_1b);\n\n $this->assertInternalType('array', $cookies);\n $this->assertEquals('hello world', $cookies['SID']);\n $this->assertEquals(1, count($cookies), \"Should only a single SID cookie, not a cookie for the HttpOnly attribute\");\n }", "function _rocket_add_aelia_currencyswitcher_dynamic_cookies( $cookies ) {\n\t$cookies[] = 'aelia_cs_recalculate_cart_totals';\n\t$cookies[] = 'aelia_cs_selected_currency';\n\t$cookies[] = 'aelia_customer_country';\n\treturn $cookies;\n}", "private function newCookie($username, $rememberme) {\n $hash = md5(microtime()); // unique cookie hash\n // Fetch User ID :\n $queryUid = $this->db->select(\"SELECT userID FROM \".PREFIX.\"users WHERE username=:username\", array(':username' => $username));\n $uid = $queryUid[0]->userID;\n // Delete all previous cookies :\n $this->db->delete(PREFIX.'sessions', array('username' => $username));\n $ip = $_SERVER['REMOTE_ADDR'];\n\t\tif($rememberme == \"true\"){\n\t\t\t// User wants to be remembered for a while\n\t\t\t$expiredate = date(\"Y-m-d H:i:s\", strtotime(SESSION_DURATION_RM));\n\t\t}else{\n\t\t\t$expiredate = date(\"Y-m-d H:i:s\", strtotime(SESSION_DURATION));\n\t\t}\n $expiretime = strtotime($expiredate);\n $this->db->insert(PREFIX.'sessions', array('uid' => $uid, 'username' => $username, 'hash' => $hash, 'expiredate' => $expiredate, 'ip' => $ip));\n\t\t// Check to see if user checked the remember me box\n\t\tCookie::set('auth_cookie', $hash, $expiretime, \"/\", FALSE);\n }", "public function save($name, $value = NULL, $expire = 1440)\r\n {\r\n // No given value, the user is requesting the cookie value.\r\n if( is_null($value) ):\r\n $this->_cookie = ( (isset($_COOKIE[$name]) ) ? $_COOKIE[$name] : NULL);\r\n\r\n return $this->_cookie;\r\n endif;\r\n $expire = time() + ($expire * 60); // Excfre will passed in minutes, so multiply by 60 seconds.\r\n setcookie($name, $value, $expire); // Define Cookie.\r\n }", "function expire() {\r\n\t\t$this->log .= \"expire() called<br />\";\r\n\t\t$ret = true;\r\n\t\t$this->data = array();\r\n\t\tif (!file_exists($this->filename)) {\r\n\t\t\t$this->log .= $this->filename.\" does not exist.<br />\";\r\n\t\t\t$ret = false;\r\n\t\t} else {\r\n\t\t\tif (!@unlink($this->filename)) {\r\n\t\t\t\t$this->log .= \"session file delete failed for \"\r\n\t\t\t\t.$this->filename.\"<br />\";\r\n\t\t\t\t$ret = false;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (!setcookie('sid' ,$this->id, time()-3600, \"/\")) {\r\n\t\t\t$this->log .= \"sid cookie expire failed. This may be due to browser\"\r\n\t\t\t.\" output started prior.<br />\";\r\n\t\t\t$ret = false;\r\n\t\t}\r\n\t\treturn $ret;\r\n\t}", "public function getCookieCollection()\n {\n $this->buildCookieCollection();\n\n return $this->cookies;\n }", "protected function _setCookie($options = array(), $cookieKey = 'User') {\n\t\tif (empty($this->request->data[$this->modelClass]['remember_me'])) {\n\t\t\t$this->Cookie->delete($cookieKey);\n\t\t} else {\n\t\t\t$validProperties = array('domain', 'key', 'name', 'path', 'secure', 'time');\n\t\t\t$defaults = array(\n\t\t\t\t'name' => 'rememberMe');\n\n\t\t\t$options = array_merge($defaults, $options);\n\t\t\tforeach ($options as $key => $value) {\n\t\t\t\tif (in_array($key, $validProperties)) {\n\t\t\t\t\t$this->Cookie->{$key} = $value;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$cookieData = array(\n\t\t\t\t'email' => $this->request->data[$this->modelClass]['email'],\n\t\t\t\t'password' => $this->request->data[$this->modelClass]['password']);\n\t\t\t$this->Cookie->write($cookieKey, $cookieData, true, '1 Month');\n\t\t}\n\t\tunset($this->request->data[$this->modelClass]['remember_me']);\n\t}", "public function hasUserCookies ()\n\t{\n\t\t// Simply check if the storage key for cookies exists and is non-empty.\n\t\treturn ! empty($this->loadUserCookies()) ? true : false;\n\t}", "public function getCookies()\n {\n return $this->wrapped->getCookies();\n }", "public function deleteAllCookies($path = NULL){\n\n return self::$oCRNRSTN_ENV->oCOOKIE_MGR->deleteAllCookies($path);\n\n }", "public function enableCookies() {\n\t\t$this->cookiesEnabled = TRUE;\n\t}", "protected function getCookies(): array\n {\n return $this->cookies;\n }", "function Cookies()\n{\n //en bewaar zijn antwoord in een sessievariabele\n\n\n //check of eerder al een antwoord ivm de cookies opgeslagen werd in de sessievariabele,\n //zoniet toon dan de cookies-tekst en stop de PHP code uitvoering\n\n //toon in een hidden div waarop de gebruiker geklikt heeft (cookies geaccepteerd of niet)\n\n}", "function savesession_scartcookies ($selecteditemarray) {\n $cartitemcount = count($selecteditemarray);\n if ( isset($_SESSION['custCart_ID']) ) {\n\t$cartItems = $_SESSION['custCart_ID']; // the customer saved COOKIE cart items array\n } else {\n\t$cartItems = \"cartItems\".$_SESSION['custID']; // custid specific $_COOKIE array\n }\n $cartArray = array(); // initialize customer shopping cart with current items\n // add $_SESSION cart array, jason encode, and set the new cookie\n array_push($cartArray, $selecteditemarray); // push next item onto cart array\n $json = json_encode($cartArray, true); //\n // setcookie($cookie_name, $cookie_value, time() + (86400 * 30), '/'); // 86400 = 1 day\n setcookie($cartItems, $json, time() + (86400 * 5), '/'); // 86400-1day, public-root\n return $cartitemcount; // customer shopping cart item stored for return \n}", "function getPartnerInfoFromCookies()\n{\n return cache()->remember('i.partnerInfoFromCookies.' . $_SERVER['REMOTE_ADDR'], getCacheILifetime('partnerInfoFromCookies'), function () {\n $partnerId = isset($_COOKIE['partner_id']) ? $_COOKIE['partner_id'] : null;\n\n if (null === $partnerId) {\n return [];\n }\n\n return \\App\\Models\\User::where('my_id', $partnerId)->first()->toArray();\n });\n}", "public function cookies()\n\t{\n\t\treturn $this->connection()->get('cookies');\n\t}", "public function loginWithRememberMe()\n {\n $userId = $this->cookies->get('RMU')->getValue();\n $cookieToken = $this->cookies->get('RMT')->getValue();\n\n $user = Users::findFirstById($userId);\n if ($user) {\n $userAgent = $this->request->getUserAgent();\n $token = md5($user->email . $user->password . $userAgent);\n\n if ($cookieToken == $token) {\n $remember = RememberTokens::findFirst([\n 'usersId = ?0 AND token = ?1',\n 'bind' => [\n $user->id,\n $token\n ]\n ]);\n if ($remember) {\n\n // Check if the cookie has not expired\n if ((time() - (86400 * 8)) < $remember->createdAt) {\n\n // Check if the user was flagged\n $this->checkUserFlags($user);\n\n // Register identity\n $this->session->set('auth-identity', [\n 'id' => $user->id,\n 'profile' => $user->profile->name,\n 'subdomain_id' => $user->subdomain_id,\n 'role' => $user->role,\n 'profilesId' => $user->profilesId,\n 'username' => $user->username,\n 'folder' => $user->subdomain->folder,\n 'not_thumb' => $user->subdomain->not_thumb,\n 'isLoggedIn' => true\n ]);\n\n $this->session->set('subdomain-child', [\n 'subdomain_id' => $user->subdomain_id,\n 'subdomain_name' => $user->subdomain->name,\n 'folder' => $user->subdomain->folder,\n 'not_thumb' => $user->subdomain->not_thumb,\n 'host' => $_SERVER['HTTP_HOST']\n ]);\n\n // Register the successful login\n $this->saveSuccessLogin($user);\n\n return $this->response->redirect('users');\n }\n }\n }\n }\n\n $this->cookies->get('RMU')->delete();\n $this->cookies->get('RMT')->delete();\n\n return $this->response->redirect('session/login');\n }", "public static function setSystemCookie($user_id){\n\n $uniqid = random::md5();\n self::setCookie('system_cookie', $uniqid);\n \n $db = new db();\n\n // place cookie in system cookie table\n // last login is auto updated\n $values = array (\n 'account_id' => $user_id, \n 'cookie_id' => $uniqid,\n 'last_login' => date::getDateNow(array ('hms' => true))\n );\n \n return $db->insert('system_cookie', $values);\n }", "public static function logout() {\n\t\tif (isset($_COOKIE['sm_constitid'])) {\n\t\t\tsetrawcookie('sm_constitid', \"\", time() - 3600, COOKIE_PATH, COOKIE_DOMAIN);\n\t\t}\n\n\t\tif (isset($_COOKIE['ERIGHTS'])) {\n\t\t\tsetrawcookie('ERIGHTS', \"\", time() - 3600, COOKIE_PATH, COOKIE_DOMAIN);\n\t\t}\n\n\t\tif (isset($_COOKIE['JSESSIONID'])) {\n\t\t\tsetrawcookie('JSESSIONID', \"\", time() - 3600, COOKIE_PATH, COOKIE_DOMAIN);\n\t\t}\n\n\t\tif (isset($_COOKIE['emeta_id'])) {\n\t\t\tsetrawcookie('emeta_id', \"\", time() - 3600, COOKIE_PATH, COOKIE_DOMAIN);\n\t\t}\n\n\t\tif (isset($_COOKIE['first_name'])) {\n\t\t\tsetrawcookie('first_name', \"\", time() - 3600, COOKIE_PATH, COOKIE_DOMAIN);\n\t\t}\n\n\t\tif (isset($_COOKIE['last_name'])) {\n\t\t\tsetrawcookie('last_name', \"\", time() - 3600, COOKIE_PATH, COOKIE_DOMAIN);\n\t\t}\n\n\t\tif (isset($_COOKIE['is_org'])) {\n\t\t\tsetrawcookie('is_org', \"\", time() - 3600, COOKIE_PATH, COOKIE_DOMAIN);\n\t\t}\n\n\t\tif (isset($_COOKIE['email'])) {\n\t\t\tsetrawcookie('email', \"\", time() - 3600, COOKIE_PATH, COOKIE_DOMAIN);\n\t\t}\n\n\t\tif (isset($_COOKIE['status'])) {\n\t\t\tsetrawcookie('status', \"\", time() - 3600, COOKIE_PATH, COOKIE_DOMAIN);\n\t\t}\n\t\texit;\n\t}", "public function declineCookies(){\n\t\tsetcookie('isUsingCookies', false, 0);\n\t\treturn redirect()->route('home');\n\t}", "private function deleteFacebookCookies()\n\t{\n\t\tinclude 'config.php';\n\n\t\t$apiKey = $facebookSettings['appId'];\n\n\t\t$cookies = array('user', 'session_key', 'expires', 'ss');\n\t\tforeach ($cookies as $name) \n\t\t{\n\t\t\tsetcookie($apiKey . '_' . $name, false, time() - 3600);\n\t\t\tunset($_COOKIE[$apiKey . '_' . $name]);\n\t\t}\n\n\t\tsetcookie($apiKey, false, time() - 3600);\n\t\tunset($_COOKIE[$apiKey]); \n\t}", "public function onUserAfterLogin($options)\n\t{\n\t\t// No remember me for admin\n\t\tif ($this->app->isAdmin())\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\tif (isset($options['responseType']) && $options['responseType'] == 'Cookie')\n\t\t{\n\t\t\t// Logged in using a cookie\n\t\t\t$cookieName\t\t= JUserHelper::getShortHashedUserAgent();\n\n\t\t\t// We need the old data to get the existing series\n\t\t\t$cookieValue\t= $this->app->input->cookie->get($cookieName);\n\t\t\t$cookieArray\t= explode('.', $cookieValue);\n\n\t\t\t// Filter series since we're going to use it in the query\n\t\t\t$filter\t\t\t= new JFilterInput;\n\t\t\t$series\t\t\t= $filter->clean($cookieArray[1], 'ALNUM');\n\t\t}\n\t\telseif (!empty($options['remember']))\n\t\t{\n\t\t\t// Remember checkbox is set\n\t\t\t$cookieName\t\t= JUserHelper::getShortHashedUserAgent();\n\n\t\t\t// Create an unique series which will be used over the lifespan of the cookie\n\t\t\t$unique = false;\n\n\t\t\tdo\n\t\t\t{\n\t\t\t\t$series = JUserHelper::genRandomPassword(20);\n\t\t\t\t$query = $this->db->getQuery(true)\n\t\t\t\t\t->select($this->db->quoteName('series'))\n\t\t\t\t\t->from($this->db->quoteName('#__user_keys'))\n\t\t\t\t\t->where($this->db->quoteName('series') . ' = ' . $this->db->quote($series));\n\t\t\t\t$results = $this->db->setQuery($query)->loadResult();\n\n\t\t\t\tif (is_null($results))\n\t\t\t\t{\n\t\t\t\t\t$unique = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\twhile ($unique === false);\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t// Get the parameter values\n\t\t$lifetime\t\t= $this->params->get('cookie_lifetime', '60') * 24 * 60 * 60;\n\t\t$length\t\t = $this->params->get('key_length', '16');\n\n\t\t// Generate new cookie\n\t\t$token\t\t = JUserHelper::genRandomPassword($length);\n\t\t$cookieValue = $token . '.' . $series;\n\n\t\t// Overwrite existing cookie with new value\n\t\t$this->app->input->cookie->set(\n\t\t\t$cookieName, $cookieValue, time() + $lifetime, $this->app->get('cookie_path', '/'), $this->app->get('cookie_domain'), $this->app->isSSLConnection()\n\t\t);\n\t\t$query = $this->db->getQuery(true);\n\n\t\tif (!empty($options['remember']))\n\t\t{\n\t\t\t// Create new record\n\t\t\t$query\n\t\t\t\t->insert($this->db->quoteName('#__user_keys'))\n\t\t\t\t->set($this->db->quoteName('user_id') . ' = ' . $this->db->quote($options['user']->username))\n\t\t\t\t->set($this->db->quoteName('series') . ' = ' . $this->db->quote($series))\n\t\t\t\t->set($this->db->quoteName('uastring') . ' = ' . $this->db->quote($cookieName))\n\t\t\t\t->set($this->db->quoteName('time') . ' = ' . (time() + $lifetime));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Update existing record with new token\n\t\t\t$query\n\t\t\t\t->update($this->db->quoteName('#__user_keys'))\n\t\t\t\t->where($this->db->quoteName('user_id') . ' = ' . $this->db->quote($options['user']->username))\n\t\t\t\t->where($this->db->quoteName('series') . ' = ' . $this->db->quote($series))\n\t\t\t\t->where($this->db->quoteName('uastring') . ' = ' . $this->db->quote($cookieName));\n\t\t}\n\n\t\t$hashed_token\t= JUserHelper::hashPassword($token);\n\t\t$query\n\t\t\t->set($this->db->quoteName('token') . ' = ' . $this->db->quote($hashed_token));\n\t\t$this->db->setQuery($query)->execute();\n\n\t\treturn true;\n\t}", "protected function checkRememberMeCookie() {\n\n if (!isset($_SESSION[\"id_user\"])) {\n //echo \"check the cookie <br/>\";\n if (isset($_COOKIE['auth'])) {\n $auth = $_COOKIE['auth'];\n //echo \"cookie auth = \" . $auth . \"<br/>\";\n $authArray = explode('-', $auth);\n //print_r($authArray);\n $modelUser = new CoreUser();\n if (!$modelUser->isUserId($authArray[0])) {\n //echo \"user not found <br/>\";\n $this->redirect(\"coreconnection\");\n return 1;\n }\n\n $key = $modelUser->getRemeberKey($authArray[0]);\n //echo \"database key = \" . $key . \"<br/>\"; \n if ($key == $authArray[1]) {\n //echo \"cookie good<br/>\";\n // update the cookie\n $key = sha1($this->generateRandomKey());\n $cookieSet = setcookie(\"auth\", $authArray[0] . \"-\" . $key, time() + 3600 * 24 * 3);\n if (!$cookieSet) {\n throw new Exception('cannot set the cookie in coresecure <br>');\n }\n $modelUser->setRememberKey($authArray[0], $key);\n\n $this->initSession($modelUser->getUserLogin($authArray[0]));\n\n // redirect\n return 2;\n } else {\n\n setcookie('auth', '', time() - 3600);\n //echo \"cookie not good <br/>\";\n $this->redirectNoRemoveHeader(\"coreconnection\");\n return 0;\n }\n } else {\n //echo \"cookie not found\";\n return 0;\n }\n }\n return 0;\n //echo \"check cookie <br/>\";\n }", "protected function sendCookies()\n {\n if (!$this->swoole) {\n return;\n }\n if ($this->isSent) {\n return;\n }\n if ($this->_cookies === null) {\n return;\n }\n $request = Yii::$app->getRequest();\n if ($request->enableCookieValidation) {\n if ($request->cookieValidationKey == '') {\n throw new InvalidConfigException(get_class($request) . '::cookieValidationKey must be configured with a secret key.');\n }\n $validationKey = $request->cookieValidationKey;\n }\n foreach ($this->getCookies() as $cookie) {\n $value = $cookie->value;\n if ($cookie->expire != 1 && isset($validationKey)) {\n $value = Yii::$app->getSecurity()->hashData(serialize([$cookie->name, $value]), $validationKey);\n }\n $this->swoole->cookie($cookie->name, $value, $cookie->expire, $cookie->path, $cookie->domain, $cookie->secure, $cookie->httpOnly);\n }\n }" ]
[ "0.6589307", "0.62283117", "0.6061447", "0.59656036", "0.5960204", "0.57877743", "0.57456857", "0.56925523", "0.5662862", "0.56384635", "0.56050086", "0.5593898", "0.55532295", "0.5547641", "0.554029", "0.5535725", "0.548314", "0.5480192", "0.5402688", "0.5396596", "0.53720963", "0.537094", "0.5365473", "0.53522813", "0.53363097", "0.5299722", "0.52866066", "0.5272482", "0.526677", "0.5265891", "0.5262846", "0.52383703", "0.5234646", "0.52236575", "0.52161175", "0.5214775", "0.52125525", "0.52049404", "0.5200844", "0.5195482", "0.5186727", "0.51702404", "0.51657504", "0.5164232", "0.5161114", "0.51480985", "0.51104945", "0.50904936", "0.50897795", "0.50741", "0.50737095", "0.50717694", "0.50654966", "0.50463897", "0.50462264", "0.50439286", "0.50366545", "0.5036513", "0.50355166", "0.50320876", "0.5026527", "0.5022538", "0.5016445", "0.501367", "0.5011811", "0.5010539", "0.5007733", "0.5006998", "0.5006676", "0.5006676", "0.49950165", "0.49771452", "0.49744278", "0.4974393", "0.49719235", "0.49695346", "0.49639788", "0.49575818", "0.49477038", "0.492578", "0.4921347", "0.49212855", "0.4918575", "0.49163827", "0.49126434", "0.49083433", "0.4907523", "0.49061504", "0.4894418", "0.48935926", "0.48905978", "0.48874307", "0.48858765", "0.48792994", "0.48774502", "0.48732027", "0.48706347", "0.4870578", "0.48638427", "0.4860893" ]
0.5415325
18
Close the settings storage for the currently active user. Is called every time we're switching away from a user, BEFORE the new user's loadUserSettings() call. Should be used for doing things like closing previous peruser file handles in the backend, and unsetting the cached user information that was set in the openUser() call. After this call, there will not be any other userrelated calls until the next openUser() call.
public function closeUser () { $this->_username = null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function closeUser()\n {\n $this->isUser = false;\n }", "protected function closed ($user) {\n }", "protected function closed($user)\n\t{\n\t}", "public static function loadSettingsAfterLogin() {\r\n\t\t//try to load from DB\r\n\t\t$settings=UserSettings::model()->findByAttributes(array('userId'=>Yii::app()->user->getId()));\r\n\t\t\r\n\t\tif(is_null($settings)) {\r\n\t\t\t//if there is nothing in DB, keep what is in session data, if anything is there\r\n\t\t\t$settings=Yii::app()->user->getState('settings');\r\n\t\t\t\r\n\t\t\t//else just use new\r\n\t\t\tif(is_null($settings)) {\r\n\t\t\t\t$settings=new UserSettings();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\t\r\n\t\tYii::app()->user->setState('settings', $settings);\r\n\t}", "abstract protected function closed($user);", "abstract protected function closed($user);", "function delete_all_user_settings()\n {\n }", "private function _logoutUser() { \n unlink(realpath('config/user_'.$this->username.'.conf'));\n session_destroy();\n return true;\n }", "public function clearUserNativePreferences()\n\t{\n\t\t$this->isInitialized();\n\t\t$this->getUserNativePreferencesTable()->delete($this->user_local_identifier);\n\t}", "protected function clearUserDataFromStorage()\n {\n $this->session->remove($this->getName());\n\n $recaller = $this->recaller();\n\n if (! is_null($recaller)) {\n $this->getCookieJar()->queue($this->getCookieJar()\n ->forget($this->getRecallerName()));\n\n $this->provider->deleteRememberToken($recaller->id(), $recaller->token());\n }\n }", "protected function closed ($user)\n\t\t{\n\t\t\techo \"User closed connectionn\";\n\t\t}", "public function user_settings()\n {\n\n //if existing user, go to settings\n if (Session::has('user'))\n {\n //remember url user is coming from\n Session::put('redirect', URL::previous());\n\n $user = Session::get('user');\n $failure = Session::get('failure');\n\n //specify whether user is new or not\n $user->new = 0;\n\n //get the grille's phone number, and put it in readable format\n $grille_num = Grille::where('id', $this->grille_id)->pluck('phone_number');\n $user->grille_number = '(' . substr($grille_num, 0, 3) . ') ' . substr($grille_num, 3, 3) \n . '-' . substr($grille_num, 6, 4);\n\n //format phone number to prefill\n $user->phone_formatted = '(' . substr($user->phone_number, 0, 3) . ') ' . substr($user->phone_number, 3, 3) \n . '-' . substr($user->phone_number, 6, 4);\n\n $this->layout->content = View::make('users.edit', ['user' => $user, 'failure' => $failure]);\n }\n //else redirect back to where came from\n else\n {\n try {\n return Redirect::back();\n }\n catch (Exception $e) {\n return Redirect::to('/');\n }\n\n }\n }", "function SaveSettings()\n\t{\n\t\t$this->GetDb();\n\n\t\t$tempSettings = $this->Db->Quote(serialize($this->settings));\n\t\t$tempUserID = intval($this->userid);\n\n\t\t$query = \"\n\t\t\tUPDATE [|PREFIX|]users\n\t\t\tSET settings='{$tempSettings}'\n\t\t\tWHERE userid={$tempUserID}\n\t\t\";\n\n\t\t$result = $this->Db->Query($query);\n\t\tif (!$result) {\n\t\t\tlist($error, $level) = $this->Db->GetError();\n\t\t\ttrigger_error($error, $level);\n\t\t\treturn false;\n\t\t}\n\n\t\t$currentUser = IEM::userGetCurrent();\n\t\tif ($currentUser && $currentUser->userid == $this->userid) {\n\t\t\tIEM::userFlushCache();\n\t\t}\n\n\t\treturn true;\n\t}", "public function shutdown()\n {\n $this->setAttribute('lastrequest', time(), 'user');\n\n // rimozione variabili flash da eliminare\n foreach ($names = $this->getNames('core/user/flash/remove') as $name)\n {\n $this->removeAttribute($name, 'core/user/flash');\n $this->removeAttribute($name, 'core/user/flash/remove');\n }\n\n // termina immediatamente\n session_write_close();\n }", "function deleteSettings($userId) {\n\t\treturn $this->update(\n\t\t\t'DELETE FROM user_settings WHERE user_id = ?', $userId\n\t\t);\n\t}", "public function destroy(UserSetting $userSetting)\n {\n //\n }", "public function disconnect($user_id){\n delete_user_meta($user_id, $this->umeta_id);\n }", "function saveSettings()\n {\n\t if ( wfReadOnly() ) {\n\t\treturn;\n\t }\n\t if ( 0 == $this->mCedarId ) {\n\t\treturn;\n\t }\n\t \n\t $dbw =& wfGetDB( DB_MASTER );\n\t $dbw->update( 'cedar_user_info',\n\t\t array( /* SET */\n\t\t\t 'user_id' => $this->mId,\n\t\t\t 'organization' => $this->mOrg,\n\t\t\t 'address1' => $this->mAddress1,\n\t\t\t 'address2' => $this->mAddress2,\n\t\t\t 'city' => $this->mCity,\n\t\t\t 'state' => $this->mState,\n\t\t\t 'country' => $this->mCountry,\n\t\t\t 'postal_code' => $this->mPostalCode,\n\t\t\t 'phone' => $this->mPhone,\n\t\t\t 'mobile_phone' => $this->mMobilePhone,\n\t\t\t 'fax' => $this->mFax,\n\t\t\t 'supervisor_name' => $this->mSupervisorName,\n\t\t\t 'supervisor_email' => $this->mSupervisorEmail\n\t\t ), array( /* WHERE */\n\t\t\t 'user_info_id' => $this->mCedarId\n\t\t ), __METHOD__\n\t );\n\t $this->clearSharedCache();\n }", "public function killUserSession(){\t\n\t\t@session_unset();\n\t\t@session_destroy();\n\t}", "function close() {\n if($this->locked) {\n foreach($this->users as $user => $pass) {\n if($this->cvs[$user]) {\n fputs($this->fplock, \"$user:$pass:\" . $this->cvs[$user] . \"\\n\");\n } else {\n fputs($this->fplock, \"$user:$pass\\n\");\n }\n }\n rename($this->lockfile, $this->filename);\n flock($this->fplock, LOCK_UN);\n $this->locked = false;\n fclose($this->fplock);\n }\n }", "public static function logoutUser( ) {\r\n self::$database->update(\"UPDATE users set sid=? where sid=?\", \r\n \"\", session_id());\r\n session_destroy();\r\n }", "protected function teardown() {\n User::delete($this->state[\"user\"]->id);\n }", "protected function teardown() {\n User::delete($this->state[\"user\"]->id);\n }", "protected function unlock_session() {\n \\core\\session\\manager::write_close();\n ignore_user_abort(true);\n }", "public function close() {\n if ($this->opened) {\n if ($this->shouldRegenerateId()) {\n $this->regenerateId();\n }\n\n $this->updateLastTrace();\n $this->save();\n\n $this->values = array();\n $this->opened = false;\n }\n }", "private function delete_all_user_metas() {\n\t\tglobal $wpdb;\n\n\t\t// User option keys are prefixed in single site and multisite when not in network mode.\n\t\t$key_prefix = $this->context->is_network_mode() ? '' : $wpdb->get_blog_prefix();\n\t\t$user_query = new \\WP_User_Query(\n\t\t\tarray(\n\t\t\t\t'fields' => 'id',\n\t\t\t\t'meta_key' => $key_prefix . OAuth_Client::OPTION_ACCESS_TOKEN,\n\t\t\t\t'compare' => 'EXISTS',\n\t\t\t)\n\t\t);\n\n\t\t$users = $user_query->get_results();\n\n\t\tforeach ( $users as $user_id ) {\n\t\t\t// Deletes all user stored options.\n\t\t\t$user_options = new User_Options( $this->context, $user_id );\n\t\t\t$user_options->delete( OAuth_Client::OPTION_ACCESS_TOKEN );\n\t\t\t$user_options->delete( OAuth_Client::OPTION_ACCESS_TOKEN_EXPIRES_IN );\n\t\t\t$user_options->delete( OAuth_Client::OPTION_ACCESS_TOKEN_CREATED );\n\t\t\t$user_options->delete( OAuth_Client::OPTION_REFRESH_TOKEN );\n\t\t\t$user_options->delete( OAuth_Client::OPTION_REDIRECT_URL );\n\t\t\t$user_options->delete( OAuth_Client::OPTION_AUTH_SCOPES );\n\t\t\t$user_options->delete( OAuth_Client::OPTION_ERROR_CODE );\n\t\t\t$user_options->delete( OAuth_Client::OPTION_PROXY_ACCESS_CODE );\n\t\t\t$user_options->delete( Verification::OPTION );\n\t\t\t$user_options->delete( Verification_Tag::OPTION );\n\t\t\t$user_options->delete( Profile::OPTION );\n\n\t\t\t// Clean up old user api key data, moved to options.\n\t\t\t// @todo remove after RC.\n\t\t\t$user_options->delete( 'googlesitekit_api_key' );\n\t\t\t$user_options->delete( 'sitekit_authentication' );\n\t\t\t$user_options->delete( 'googlesitekit_stored_nonce_user_id' );\n\t\t}\n\t}", "public function logoutUser()\n {\n // Unset session-key user\n $this->di->get(\"session\")->delete(\"my_user_id\");\n $this->di->get(\"session\")->delete(\"my_user_name\");\n //$this->di->get(\"session\")->delete(\"my_user_password\");\n $this->di->get(\"session\")->delete(\"my_user_email\");\n //$this->di->get(\"session\")->delete(\"my_user_created\");\n //$this->di->get(\"session\")->delete(\"my_user_updated\");\n //$this->di->get(\"session\")->delete(\"my_user_deleted\");\n //$this->di->get(\"session\")->delete(\"my_user_active\");\n $this->di->get(\"session\")->delete(\"my_user_admin\");\n }", "public function destroy(){\n\t\t//Update last visit of the user\n\t\t$sql = \"UPDATE __users\n\t\t\t\tSET user_lastvisit='\" . $this->db->escape(intval($this->data['session_current'])) . \"'\n\t\t\t\tWHERE user_id='\" . $this->db->escape($this->data['user_id']) . \"'\";\n\t\t$this->db->query($sql);\n\n\t\t// Delete existing session\n\t\t$this->destroy_session($this->sid);\n\n\t\tset_cookie('data', '0', -1);\n\t\tset_cookie('sid', '0', -1);\n\t\tregistry::add_const('SID', '?s=');\n\t\t$this->sid = '';\n\t\treturn true;\n\t}", "public function restored(User $user)\n {\n $this->clearCache($this->key);\n }", "public function profileLogout()\n {\n unset($this->getApp()->getSession()->BRACP_PROFILE_ID);\n self::$loggedUser = null;\n }", "public function logout()\n {\n $this->webUser = false;\n $this->refresh();\n \\Bdr\\Vendor\\Database::logout();\n }", "public static function killAllSessions ($user_id){\n // only keep one system cookie (e.g. if user clears his cookies)\n $db = new db();\n $db->delete('system_cookie', 'account_id', $user_id);\n \n setcookie (\"system_cookie\", \"\", time() - 3600, \"/\");\n unset($_SESSION['id'], $_SESSION['admin'], $_SESSION['super'], $_SESSION['account_type']);\n session_destroy();\n }", "function exit_user() {\n\t\t//~ Destroy session, delete cookie and redirect to main page\n\t\tsession_destroy();\n\t\tsetcookie(\"id_user\", '', time()-3600);\n\t\tsetcookie(\"code_user\", '', time()-3600);\n\t\theader(\"Location: index.php\");\n\t}", "public function destroy() {\n\t\t\t$this->session->unset('user');\n\t\t}", "public function logout()\n {\n $user = $this->user();\n\n // If we have an event dispatcher instance, we can fire off the logout event\n // so any further processing can be done. This allows the developer to be\n // listening for anytime a user signs out of this application manually.\n $this->clearUserDataFromStorage();\n\n if (isset($this->events)) {\n $this->events->dispatch(new LogoutEvent($this->name, $user));\n }\n\n // Once we have fired the logout event we will clear the users out of memory\n // so they are no longer available as the user is no longer considered as\n // being signed into this application and should not be available here.\n $this->user = null;\n\n $this->loggedOut = true;\n }", "function logout() {\n if (!isset($_SESSION['userx\\auth']['shells']) || count($_SESSION['userx\\auth']['shells']) == 0) {\n unset($_SESSION['userx\\auth']);\n // Make sure remember keys are forgotten when logging out.\n if (isset($_COOKIE[\"REMBR_USR_KEY\"])) {\n // Unset this key, whomever it belongs too.\n if (strlen($_COOKIE[\"REMBR_USR_KEY\"]) == 16) {\n $user = UserModel::select()->byKey(array(\"user_remember_key\" => $_COOKIE['REMBR_USR_KEY']))->first();\n if ($user !== null) {\n $user->user_remember_key = \"\";\n $user->store();\n }\n }\n unset_cookie(\"REMBR_USR_KEY\");\n }\n } else {\n $_SESSION['userx\\auth']['user'] = array_pop($_SESSION['userx\\auth']['shells']);\n }\n}", "function destroy()\n {\n $user_meta = get_user_meta(get_current_user_id(), self::USER_META_KEY, true);\n\n if ($user_meta) {\n unset($user_meta[ $this->id ]);\n return update_user_meta(get_current_user_id(), self::USER_META_KEY, $user_meta);\n } else {\n throw new Exception(\"Unable to destroy collection '$id'.\");\n }\n }", "function subsite_manager_login_shutdown_hook(ElggUser $user){\n\n if(!empty($user) && elgg_instanceof($user, \"user\", null, \"ElggUser\")){\n $user->save();\n }\n }", "public function purgeSessions($user);", "public static function forceClearUserSession()\n {\n global $user;\n $uid = $user->uid;\n error_log(\"About to clear session via forceClearUserSession for user $uid\");\n unset($_SESSION['CREATED']); \n unset($_SESSION[CONST_NM_RAPTOR_CONTEXT]);\n\n $all_literalnames = self::getAllSessionValueNames();\n foreach($all_literalnames as $onename=>$onevalue)\n {\n unset($_SESSION[$onename]);\n }\n error_log(\"Cleared session via forceClearUserSession for user $uid\");\n }", "public function saved(Settings $settings)\n {\n Settings::forget();\n }", "function disconnect_user() {\n\tunset( $_SESSION['GHOME'] );\n\tunset( $_SESSION['GHOME_CUSER'] );\n}", "public static function DestroySession(){\n\t\tself::$_leuser=NULL; \n\t\t//unset(User::$_leuser);\n\t\tunset($_SESSION['user']);\n\t}", "public function __destruct() {\n\t\t\t$_SESSION['user'] = &$this;\n\t\t}", "protected function tearDown() {\n \n $this->userDao->close();\n \n $this->userDao = null;\n \n parent::tearDown();\n }", "function closeChatUser($chatUserId)\n\t{\n\t\t$key = array_search($chatUserId, $this->chatUsers);\n\t\tif($key !== false) {\n\t\t\tunset($this->chatUsers[$key]);\n\t\t}\n\t\tif(!in_array($chatUserId, $this->chatCloseUsers)){\n\t\t\tarray_push($this->chatCloseUsers, $chatUserId); \n\t\t}\n\t\t$_SESSION['closeChatUser'] = $this->chatCloseUsers;\n\t\t$_SESSION['chatUser'] = $this->chatUsers;\n\t\treturn true;\n\t}", "function deleteSettings() {\n\t\tdelete_option('wassup_settings');\n\t}", "protected function switchUserBack() {\n if ($this->isUserSwitched) {\n $this->accountSwitcher->switchBack();\n $this->isUserSwitched = FALSE;\n }\n }", "public function logoutUser() {\n $this->session->unsetSession(self::$storedUserId);\n $this->session->setFlashMessage(2);\n self::$isLoggedIn = false;\n }", "public function logout()\r\n\t{\r\n\t\tif(!$this->loggedIn()) return;\r\n\t\t$query = 'UPDATE users SET fingerprint=NULL WHERE id=' . $this->user->id . ' LIMIT 1';\r\n\t\tmysql_query($query);\r\n\t\tsetcookie('qw_login', '', time()-60*60*24, '/');\r\n\t\tsetcookie('tree_grid_cookie', '', time()-60*60*24, '/');\r\n\t\t$this->user = false;\r\n\t}", "public function tearDown()\n\t{\n\t\tMockery::close();\n\n\t\t$user = Sentry::findUserByLogin('[email protected]');\n\n $user->delete();\n\n\t\tparent::tearDown();\n\t}", "public function unlockSite() {\n\t\tif (is_resource($this->lockResource)) {\n\t\t\tflock($this->lockResource, LOCK_UN);\n\t\t\tfclose($this->lockResource);\n\t\t}\n\t\t@unlink($this->lockFlagPathAndFilename);\n\t}", "public function onUserLogout(&$user)\n {\n // User logs out of the wiki we want to log them out of the form too.\n if (!isset($this->_SessionTB))\n {\n return true; // If the value is not set just return true and move on.\n }\n return true;\n // @todo: Add code here to delete the session.\n }", "public static function disconnect(User $user)\n\t{\n\t\tUser::current(new User);\n\t\tSession::current()->removeAny(get_class($user));\n\t}", "public function saveUserSettings (array $userSettings, $triggerKey)\n\t{\n\t\t// Store the settings as a JSON blob.\n\t\t$encodedData = json_encode($userSettings);\n\t\t$this->_setUserKey($this->_username, self::SETTINGS, $encodedData);\n\t}", "public function shutdown() {\n $this->saveStorage();\n }", "function deconnect()\r\n\t{ \r\n\t\tHybrid_Auth::expireStorage();\r\n\r\n\t\treturn TRUE;\r\n\t}", "public function logout()\n {\n $this->user_provider->destroyAuthIdentifierSession();\n\n \\session()->flush();\n \n $this->user = null;\n\n $this->loggedOut = true;\n }", "public function logout()\n {\n $session = new SessionContainer($this->getStorage()->getNameSpace());\n $session->getManager()->destroy();\n $this->getStorage()->forgetMe();\n\n $storage = $this->getStorage()->read();\n\n if (isset($storage['identity'])) {\n unset($storage['identity']);\n }\n }", "public static function removeAllUserSettingsForUser($userLogin)\n {\n if (empty($userLogin)) {\n throw new Exception('No userLogin specified. Cannot remove all settings for this user');\n }\n\n try {\n $table = Common::prefixTable('plugin_setting');\n Db::get()->query(sprintf('DELETE FROM %s WHERE user_login = ?', $table), array($userLogin));\n } catch (Exception $e) {\n if ($e->getCode() != 42) {\n // ignore table not found error, which might occur when updating from an older version of Piwik\n throw $e;\n }\n }\n }", "public function cleanup(){\n\t\n\t\t$this->_p->user->setSessionVal($this->_session_var_name);\n\t\n\t}", "protected function tearDown()\n {\n $test_user = Auth::instance()->get_user();\n $test_user->logins = 1;\n $test_user->save();\n\n // Stop the search daemon\n exec('killall searchd');\n }", "public function logoutUser() {\r\n\t\t$this->coreAuthenticationFactory->logoutUser ();\r\n\t}", "function user_logout() {\n\tsession_unset();\n\tsession_destroy();\n}", "public function delete()\n {\n foreach ($this->users as $user) {\n $uid = $user->id;\n // delete whole website info for this user\n if ((bool)$this->delete) {\n $model = new FormUserClear($user);\n $model->comments = true;\n $model->content = true;\n $model->feedback = true;\n $model->wall = true;\n $model->make();\n }\n\n // delete avatars\n File::remove('/upload/user/avatar/big/' . $uid . '.jpg');\n File::remove('/upload/user/avatar/medium/' . $uid . '.jpg');\n File::remove('/upload/user/avatar/small/' . $uid . '.jpg');\n File::remove('/upload/user/avatar/original/' . $uid . '.jpg');\n // delete user profile and auth data\n $user->profile()->delete();\n // delete user provider data\n $user->provider()->delete();\n // delete user object\n $user->delete();\n }\n }", "public function logoutUser(){\n $userHandler = new UserHandler();\n $userHandler->logout();\n }", "public function logout()\n {\n $this->user = null;\n $this->synchronize();\n unset($_SESSION);\n }", "public function reset()\n {\n $this->values[self::_USER] = null;\n }", "public function reset()\n {\n $this->values[self::_USER] = null;\n }", "public function reset()\n {\n $this->values[self::_USER] = null;\n }", "public function logout_user() {\n\t\tif(isset($_SESSION['eeck'])) {\n\t\t\tunset($_SESSION['eeck']);\n\t\t}\n\t}", "function saveSettings()\n\t\t{\n\t\t\t$this->Init();\n\n\t\t\t$this->saveExternalSettings();\n\t\t\t\n\t\t\t$settings = serialize(array(\"settings\"=>$this->settings));\n\t\n\t\n\t\t\t$stream = mapi_openpropertytostream($this->store, PR_EC_WEBACCESS_SETTINGS, MAPI_CREATE | MAPI_MODIFY);\n\t\t\tmapi_stream_setsize($stream, strlen($settings));\n\t\t\tmapi_stream_seek($stream, 0, STREAM_SEEK_SET);\n\t\t\tmapi_stream_write($stream, $settings);\n\t\t\tmapi_stream_commit($stream);\n\t\n\t\t\tmapi_savechanges($this->store);\n\t\n\t\t\t// reload settings from store...\n\t\t\t$this->retrieveSettings();\n\t\t}", "function uninitFox() { \n\t\t\t$theOptions = get_option($this->adminOptionsName);\n\t\t\tif ( $theOptions['remember_settings'] == \"false\" ) {\n\t\t\t\tdelete_option($this->adminOptionsName);\n\t\t\t}\n\t\t}", "public function logout() {\n\t\t//Log this connection into the users_activity table\n\t\t\\DB::table('users_activity')->insert(array(\n\t\t\t'user_id'=>$this->user->attributes[\"id\"],\n\t\t\t'type_id'=>15,\n\t\t\t'data'=>'Log out',\n\t\t\t'created_at'=>date(\"Y-m-d H:i:s\")\n\t\t));\n\t\t$this->user = null;\n\t\t$this->cookie($this->recaller(), null, -2000);\n\t\tSession::forget($this->token());\n\t\t$this->token = null;\n\t}", "public function deleteSettings()\n {\n $master = new DynaGridStore([\n 'id' => $this->dynaGridId,\n 'category' => DynaGridStore::STORE_GRID,\n 'storage' => $this->storage,\n 'userSpecific' => $this->userSpecific\n ]);\n $config = $this->storage == DynaGrid::TYPE_DB ? null : $master->fetch();\n $master->deleteConfig($this->category, $config);\n $this->store->delete();\n }", "function LogOut() {\n\t\tunset($user);\n\t\t$loggedIn=false;\n\t}", "public function Action_Logout()\n {\n Zero_App::$Users->IsOnline = 'no';\n Zero_App::$Users->Save();\n Zero_Session::Unset_Instance();\n session_unset();\n session_destroy();\n Zero_Response::Redirect(ZERO_HTTP);\n }", "public function logout()\n {\n $this->deleteAllPersistentData();\n $this->accessToken = null;\n $this->user = null;\n $this->idToken = null;\n $this->refreshToken = null;\n }", "function Close($other_close_reason = null)\n\t{\n\t\t$this->db->qI(\n\t\t\t'#_PREF_lc_sessions', \n\t\t\tarray('closed' => 1, 'other_close_reason' => $other_close_reason, 'closed_at' => 'NOW()'), \n\t\t\t'UPDATE', array('sid' => $this->sid)\n\t\t);\n\t\t$this->db->qI('#_PREF_lc_users', array('`status`' => 'closed'), 'UPDATE', array('sid' => $this->sid));\n\t}", "protected function clearUserSessionFromCache()\r\n\t{\r\n\t\t$this->cache->tags([$this->config['cache.prefix'], '_s' . session_id()])->flush();\t\t\r\n\t}", "function deleteSetting($userId, $name, $assocType = null, $assocId = null) {\n\t\treturn $this->update(\n\t\t\t'DELETE FROM user_settings WHERE user_id = ? AND setting_name = ? AND assoc_type = ? AND assoc_id = ?',\n\t\t\tarray((int) $userId, $name, (int) $assocType, (int) $assocId)\n\t\t);\n\t}", "public function saveSettings()\n\t{\n\t\t$this->ensureAuthed();\n\t\t$input = Input::getInstance();\n\t\t$settings = $input->getInput('settings');\n\t\t$settingsManager = Settings::getInstance();\n\t\t$settingsManager->setSettings($this->username, $settings);\n\t\treturn true;\n\t}", "public function close(){\r\n\t\tself::$dbh = null;\r\n\t\tself::$db = null;\r\n\t}", "public function destroy(Userpreference $userpreference)\n {\n //\n }", "public function flush_values(){\n \n return apc_clear_cache('user');\n }", "Public Function Logout()\n\t{\n\t\tunset($_SESSION['User']);\n\t}", "public static function logoutUser()\n\t{\n\t wp_logout();\n\t\twp_send_json_success();\n\t}", "public static function user_logout()\n {\n // Check if the cookie is set\n if( is_array($_COOKIE) )\n {\n foreach($_COOKIE as $key => $blah)\n {\n setcookie( $key, false, $_SERVER['REQUEST_TIME'] - 3600, '/', \n (isset($_ENV['SERVER_PROTOCOL']) && (strpos($_ENV['SERVER_PROTOCOL'],'https') \n || strpos($_ENV['SERVER_PROTOCOL'],'HTTPS'))) );\n unset($_COOKIE[$key]);\n }\n }\n AuthUser::logout();\n // Delete the session cookie as well\n if( ini_get(\"session.use_cookies\") )\n {\n $params = session_get_cookie_params();\n setcookie( session_name(), '', time() - 3600,\n $params['path'], $params['domain'], \n $params['secure'], $params['httponly'] );\n }\n // Destroy the session\n session_destroy();\n \n redirect(URL_PUBLIC);\n }", "function db_pwassist_session_close()\n{\n\treturn true;\n}", "public function close()\n {\n $this->db = null;\n }", "static function logout() {\n self::forget(self::currentUser());\n unset($_SESSION['userId']);\n session_destroy();\n }", "public function setUserSettings($userSettings) {\n\t\t$this->_userSettings = (array)$userSettings;\n\t}", "public function tearDown() {\n User::find($this->user_id)->delete();\n }", "public function logout() {\n $db = Db::getInstance();\n $user = new User($db);\n $user->logout();\n }", "public static function reloadByUser(UserSettingsLoader $user, $compat_mode = false)\n\t{\n\t\tself::$instance = $user;\n\t\tself::$settings = self::$instance->getSettings();\n\t\tself::$info = self::$instance->getInfo();\n\t\tif ($compat_mode)\n\t\t{\n\t\t\tglobal $user_info;\n\t\t\t$user_info = User::$info;\n\t\t}\n\t}", "public function destroy(WxUser $wxUser)\n {\n //\n }", "public function tearDown() \n {\n $this->flushSession();\n \n $this->inactiveUser->delete();\n $this->basicUser->delete();\n $this->contactManager->delete();\n $this->projectManager->delete();\n $this->administrator->delete();\n\n parent::tearDown();\n Mockery::close();\n }", "static function userLogout()\r\n {\r\n $user = self::getCurrentUser();\r\n\r\n if ($user->getOffline == 0) //is Online\r\n {\r\n $user->setOffline(1);\r\n self::updateUser($user);\r\n\r\n $_SESSION[\"user_name\"] = NULL;\r\n $_SESSION[\"user_type\"] = NULL;\r\n $_SESSION[\"user_id\"] = NULL;\r\n $_SESSION[\"last_page\"] = NULL;\r\n $_SESSION[\"curr_page\"] = NULL;\r\n\r\n return true;\r\n }\r\n else\r\n {\r\n return false;\r\n }\r\n }", "public function close()\n {\n fclose($this->migration_file);\n $this->is_open = false;\n }", "public function tearDown() {\n\t\tUser::destroy($this->User->id);\n\t\t$this->password = null;\n\t\t$this->User = null;\n\t\tparent::tearDown();\n\t}" ]
[ "0.64519835", "0.5937539", "0.5919718", "0.57041454", "0.55767655", "0.55767655", "0.5532869", "0.5532494", "0.5427404", "0.54094124", "0.5364938", "0.5349593", "0.5319141", "0.5299789", "0.5289071", "0.5276134", "0.5228051", "0.5217518", "0.51942533", "0.5174687", "0.51173866", "0.50992674", "0.50992674", "0.50908905", "0.5080505", "0.50466436", "0.50446635", "0.5023006", "0.5009741", "0.49851376", "0.49755687", "0.49699003", "0.4944163", "0.494109", "0.49148813", "0.49047062", "0.48929518", "0.4889306", "0.48712987", "0.48698092", "0.48505628", "0.48344797", "0.48270595", "0.48014522", "0.4796753", "0.47903946", "0.4776071", "0.4760427", "0.4757198", "0.47412726", "0.47145367", "0.4711283", "0.46832955", "0.46787792", "0.4674653", "0.46635863", "0.4644076", "0.4639615", "0.46273276", "0.46247745", "0.46241325", "0.4623349", "0.46074697", "0.45983696", "0.45945698", "0.45769572", "0.45687702", "0.4560761", "0.45599532", "0.45599532", "0.45557246", "0.45538366", "0.45468178", "0.4545485", "0.45407692", "0.45305654", "0.45296833", "0.45252445", "0.45218876", "0.45195723", "0.4513834", "0.4513514", "0.45132273", "0.45115244", "0.45044145", "0.44995725", "0.4496624", "0.44949627", "0.44947702", "0.44931245", "0.4478938", "0.4474231", "0.44742188", "0.44703543", "0.44484407", "0.44476867", "0.44455913", "0.4439339", "0.4432245", "0.44307062" ]
0.6198137
1
Disconnect from a storage location and perform necessary shutdown steps. This function is called ONCE, when we no longer need to access the currently open storage. But we may still open another storage afterwards, so do NOT treat this as a "class destructor"! Implementing this is optional, but the function must exist.
public function closeLocation () { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function shutdown() {\n $this->saveStorage();\n }", "public function __destruct()\n {\n try {\n $this->disconnect(true);\n } catch (Exception $e) {\n }\n }", "public function __destruct() {\r\n\t\ttry {\r\n\t\t\t$this->disconnect();\r\n\t\t} catch (\\Exception $e) { // avoid fatal error on script termination\r\n\t\t}\r\n\t}", "function __DESTRUCT() {\n self::disconnect();\n }", "public function __destruct() {\n $this->disconnect();\n }", "public function __destruct()\n {\n $this->disconnect(true);\n }", "function __destruct() {\r\n\t\t$this->disconnect();\r\n\t}", "protected function disconnect()\n {\n $this->pd = null;\n }", "public function __destruct()\n {\n $this->disconnect();\n }", "public function __destruct()\n {\n $this->disconnect();\n }", "public function __destruct() {\n // disconnect\n $this->host = null;\n }", "public function disconnect()\n\t{\n\t\t$this->disconnectInternal();\n\t}", "function __destruct() {\n $this->Disconnect();\n unset($this);\n }", "function __destruct() {\n $this->Disconnect();\n unset($this);\n }", "function __destruct()\n {\n $this->disconnect();\n }", "public function disconnect() {\n if ($this->isConnected()) {\n fclose($this->handle);\n\n $this->handle = null;\n }\n }", "public function disconnect()\n {\n $this->cluster = null;\n }", "public function __destruct()\n\t{\n\t\t$this->disconnect();\n\t}", "public function __destruct()\n {\n if ($this->isConnected) {\n $this->close();\n }\n }", "public function __destruct(){\n\t\t$this->disconnect();\n\t}", "public function shutdown() {}", "public function shutdown() {}", "public function shutdown() {}", "public function shutdown() {}", "public function shutdown() {}", "protected function _disconnect() {\n\t\t@fclose($this->socket);\n\t\t$this->socket = NULL;\n\t}", "function __destruct(){\n\t\t$this->disconnect();\n\t}", "public function disconnect(){\n\t\t$this->connected=false;\n\t\tif(is_file($this->cookiefile)){\n\t\t\tunlink($this->cookiefile);\n\t\t}\n\t\t$this->cookiefile=false;\n\t}", "public function __destruct() \n {\n $this->disconnect();\n }", "public static function disconnect() {\n\tself::$instance->disconnect();\n }", "public function disconnect() {\n $this->exec('exit;');\n $this->connection = null;\n }", "protected function disconnectIfConnected() {}", "public function disconnect();", "public function disconnect();", "public function disconnect();", "public function disconnect();", "public function disconnect();", "public function disconnect();", "public function disconnect();", "public function disconnect();", "public function shutdown();", "public function shutdown();", "public function __destruct()\n {\n if (!empty($this->whatsapp) && $this->connected) {\n $this->whatsapp->disconnect();\n }\n }", "public function disconnect()\n\t{\n\t\t$this->_connection = null;\n\t}", "public function disconnect() {\n $this->db = null;\n }", "public function disconnect()\n {\n parent::disconnect();\n\n unset($this->connection);\n }", "public function __destruct()\n\t{\n\t\t$this->return_die = true;\n\t\t$this->_isShutDown = true;\n\t\t\n\t\tif ( count( $this->obj['shutdown_queries'] ) )\n\t\t{\n\t\t\tforeach( $this->obj['shutdown_queries'] as $q )\n\t\t\t{\n\t\t\t\t$this->query( $q );\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->writeDebugLog( '{end}', '', '' );\n\n\t\t$this->obj['shutdown_queries'] = array();\n\t\t\n\t\t$this->disconnect();\n\t}", "static function shutdown()\n\t{\n\t\tif (!empty(self::$channel))\n\t\t{\n\t\t\tself::$channel->close();\n\t\t\tself::$channel = null;\n\t\t}\n\n\t\tif (!empty(self::$connection))\n\t\t{\n\t\t\tself::$connection->close();\n\t\t\tself::$connection = null;\n\t\t}\n\t}", "public function disconnect() {\n $this->db = null;\n }", "public function __destruct(){\r\n //Turn off the lights, and stuff\r\n $this->database->disconnect();\r\n }", "public function shutdown()\n {\n if ($this->db) {\n $db->disconnect();\n }\n }", "abstract public function shutdown();", "public function disconnect() {\n $this->exec('echo \"EXITING\" && exit;');\n $this->connection = null;\n }", "protected function case_teardown() {\r\n if ($this->service->is_connected()) {\r\n $this->service->disconnect();\r\n }\r\n }", "public function __destruct() {\n\n // cleanup resources\n $this->disconnect();\n $this->buffer = NULL;\n $this->global_buffer = NULL;\n }", "public function __destruct()\n {\n try {\n if (!empty($this->databaseConnection)) {\n $this->databaseConnection->disconnect();\n }\n } catch (\\Exception) {\n }\n }", "function DisConnect()\n\t{\n\t\t$this->__connection = null;\n\t\t$this->__connected = false;\n\t}", "public function disconnect(): void;", "public function disconnect()\n\t{\n\t}", "public static function disconnect()\n\t{\n\t\tself::getConnection()->disconnect();\n\t}", "public function disconnect() \n\t{\n\t\tunset($this->connection);\n\t}", "public function disconnect()\r\n {\r\n }", "public function disconnect(){\n\t\t$this->Connection = null;\n\t}", "function disconnect()\n\t{\n\t\tswitch($this->dbtype)\n\t\t{\n\t\t\tcase 'mysql':\n\t\t\t\t@mysql_close($this->handle);\n\t\t\t\tbreak;\n\n\t\t\tcase 'mysqli':\n\t\t\t\t@mysqli_close($this->handle);\n\t\t\t\tbreak;\n\t\t}\n\t}", "abstract function shutdown();", "public function disconnect() : void\r\n {\r\n fclose($this->connection);\r\n }", "public function __destruct()\n {\n if (isset($this->socket)) {\n fclose($this->socket);\n }\n\n if (isset($this->config['write_pidfile']) && $this->config['write_pidfile']) {\n unlink($this->pidfile);\n }\n }", "abstract public function disconnect();", "abstract public function disconnect();", "abstract public function disconnect();", "public function __destruct()\n\t{\n\t\tforeach ( self::$connected_client as $client )\n\t\t{\n\t\t\t$client->disconnect();\n\t\t}\n\t}", "public function __destruct()\n {\n foreach (static::$sessions as $session_id => $session) {\n try {\n static::$retry->retry(function () use ($session) {\n $session->delete();\n }, true);\n } catch (\\Exception $e) {\n }\n }\n }", "public function __destruct()\n\t{\n\t\tif ( null !== self::$connected_client[self::$connection_params] )\n\t\t{\n\t\t\t$this->disconnect();\n\t\t}\n\t}", "public function disconnect() {\n \n $this->con = null;\n \n }", "public function disconnect()\n {\n if ($this->m_connect) $this->m_connect->Disconnect();\n }", "public function __destruct() {\n\t\t$this->Unsubscribe();\n\t\t$this->CloseConnections();\n\t}", "public function __destructor(){\n $this->connect->close();\n }", "public function disconnect()\n {\n \t//$GLOBALS['log']->debug('Calling DBManager::disconnect()');\n $close = $this->backendFunctions['close'];\n if(isset($this->database)){\n $this->freeResult();\n if ( is_resource($this->database) || is_object($this->database) )\n\t\t\t\t$close($this->database);\n unset($this->database);\n }\n }", "public function shutdown() {\n\t\t\t//\n\t\t}", "function __destruct() {\n\t\t$Model = null;\n\t\t$this->serviceDisconnect($Model);\n\t}", "public function disconnect() {\n\t\t@fclose ( $this->socket );\n\t}", "abstract public static function cleanShutDown();", "public function disconnect() {\n if (isset($this->database))\n @$this->database->close();\n }", "private function _disconnect()\n {\n //\tDisconnect\n $this->_db->conn = null;\n $this->_db->clear();\n }", "public function shutdown()\n {\n // Do nothing. Can be overridden by extending classes.\n }", "protected function disconnect() {\n $this->connection = null;\n echo $this->name . ' disconnected' .\"<br>\";\n }", "public function disconnect()\n {\n $this->pdo = null;\n }", "public function disconnect()\n {\n if (MEMCACHE_ENABLED) {\n $this->memc->close();\n if (MEMCACHE_DEBUG) {\n Logger::write('Memcache::disconnect(): disconnected');\n }\n }\n }", "public function __destruct()\n {\n if ($this->tsfeBackup instanceof tslib_fe) {\n $GLOBALS['TSFE'] = $this->tsfeBackup;\n }\n\n if (!is_null($this->workingDirBackup)) {\n chdir($this->workingDirBackup);\n }\n }", "public function __destruct() {\n $this->disconnect();\n echo $this->name . ' was destroyed' .\"<br>\";\n }", "public function disconnect(): void\n {\n $this->pdo = null;\n }", "public function shutdown()\n {\n }", "public static function disconnect(){\n\t\tself::$cnx = NULL;\t\n\t\t\n\t}", "public function __destruct()\n {\n $this->conn = false;\n if ($this->driver) {\n unset($this->driver);\n }\n }", "static function shutdown() {\n\t\tif (self::hasCurrent()) {\n\t\t\tself::$_ctrl->__destruct();\n\t\t\tself::$_ctrl = null;\n\t\t}\n\t}", "public function __destruct() {\r\n\t\t\r\n\t\t// cleanup resources\r\n\t\t$this->disconnect();\r\n\t\t$this->buffer = NULL;\r\n\t\t\r\n\t}", "public function __destruct()\r\n {\r\n if ( $this->state != self::STATE_NOT_CONNECTED )\r\n {\r\n $this->connection->sendData( 'QUIT' );\r\n $this->connection->getLine(); // discard\r\n $this->connection->close();\r\n }\r\n }", "function deconnect()\r\n\t{ \r\n\t\tHybrid_Auth::expireStorage();\r\n\r\n\t\treturn TRUE;\r\n\t}", "public function __destruct()\n\t{\n\t\t$this->delete_local_file();\n\t}", "public static function disconnect() {\n self::$PDO = null;\n }", "public function __destruct()\n\t{\n\t\tif ($this->_connection AND $this->_connection->is_started())\n\t\t{\n\t\t\t$this->_connection->stop();\n\t\t}\n\t}" ]
[ "0.6964641", "0.66301185", "0.65672", "0.6563482", "0.64772725", "0.6460958", "0.6436846", "0.6406668", "0.63995814", "0.63995814", "0.63719463", "0.6366932", "0.6321927", "0.6321927", "0.63209975", "0.63070345", "0.6294602", "0.6266812", "0.62356657", "0.62189436", "0.6216756", "0.6216756", "0.6216756", "0.6216756", "0.6216756", "0.6171704", "0.61695665", "0.61599374", "0.6147036", "0.60950124", "0.6085303", "0.6043998", "0.6039266", "0.6039266", "0.6039266", "0.6039266", "0.6039266", "0.6039266", "0.6039266", "0.6039266", "0.6030013", "0.6030013", "0.6012904", "0.59992176", "0.59979385", "0.5984954", "0.59822005", "0.598176", "0.598124", "0.5980254", "0.5956396", "0.59554887", "0.5953359", "0.5946099", "0.5943838", "0.5939519", "0.5937142", "0.59370697", "0.5933477", "0.5922933", "0.5919942", "0.5918199", "0.5907651", "0.5900183", "0.58934426", "0.588943", "0.5880576", "0.5864443", "0.5864443", "0.5864443", "0.58576405", "0.58547443", "0.58478856", "0.58440584", "0.5843104", "0.58404624", "0.5836116", "0.583463", "0.5818933", "0.57917523", "0.57900506", "0.57771534", "0.57737875", "0.5772589", "0.57669", "0.5764015", "0.5763404", "0.5760243", "0.5758255", "0.5750925", "0.5743139", "0.5734396", "0.57321817", "0.57246685", "0.5718658", "0.57129216", "0.5706899", "0.5702386", "0.5698768", "0.56938577", "0.56822234" ]
0.0
-1
Retrieve a redis key for a particular user.
private function _getUserKey ($username, $key) { $realKey = $username . '_' . $key; return $this->cache->get($realKey); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function pmpromrss_getMemberKey($user_id = NULL)\r\n{\r\n\t//default to current user\r\n\tif(empty($user_id))\r\n\t{\r\n\t\tglobal $current_user;\r\n\t\t$user_id = $current_user->ID;\r\n\t}\r\n\t\r\n\t//make sure we have a user\r\n\tif(empty($user_id))\r\n\t\treturn false;\r\n\t\t\r\n\t$user = get_userdata($user_id);\r\n\r\n\t//get key\r\n\t$key = get_user_meta($user->ID, \"pmpromrss_key\", true);\r\n\t\r\n\t//create member key if they don't already have one\r\n\tif(empty($key))\r\n\t{\r\n\t\t$key = md5(time() . $user->user_login . AUTH_KEY);\r\n\t\tupdate_user_meta($user->ID, \"pmpromrss_key\", $key);\r\n\t}\r\n\t\r\n\treturn $key;\r\n}", "function get_user_api_key() {\n $currentUser = current_user();\n if ($currentUser) {\n $db = get_db();\n $res = $db->getTable('Key')->findBy(array('user_id' => $currentUser->id));\n if (sizeof($res) > 0) {\n return $res[0]->key;\n }\n }\n}", "public function getUserkeyBy()\n {\n return $this->userRepo->getUserkeyBy();\n }", "public function getKey(PKEncryptionEnabledUserInterface $user)\n {\n $userClass = $this->getUserClass($user);\n $userId = $user->getId();\n\n return isset($this->encryptedKeys[$userClass]) && isset($this->encryptedKeys[$userClass][$userId])\n ? $this->encryptedKeys[$userClass][$userId]\n : null;\n }", "private function getKey($user) {\n\t\t$uid = $user['uid'];\n\t\t$pwd = $user['password'];\n\t\t$ip = $this->input->getip();\n\t\t$time = SYSTIME;\n\t\t$skey = \"$pwd\\t$uid\\t$ip\\t$time\";\n\t\t$auth = authcode($skey, 'ENCODE');\n\t\treturn $auth;\n\t}", "private function getKey($user) {\n\t\t$uid = $user['uid'];\n\t\t$pwd = $user['password'];\n\t\t$ip = $this->input->getip();\n\t\t$time = SYSTIME;\n\t\t$skey = \"$pwd\\t$uid\\t$ip\\t$time\";\n\t\t$auth = authcode($skey, 'ENCODE');\n\t\treturn $auth;\n\t}", "public function findOneByUserAndKey($user, $key)\n {\n $queryBuilder = $this->getRepository()->createQueryBuilder('UserMeta');\n\n $queryBuilder->where($queryBuilder->expr()->andX(\n $this->getExprUserId($queryBuilder, $user->getId()),\n $this->getExprKey($queryBuilder, $key)\n ));\n\n $queryBuilder->setMaxResults(1);\n\n return $queryBuilder->getQuery()->getOneOrNullResult();\n }", "public function getApiKeyById($user_id) {\n $stmt = $this->conn->prepare(\"SELECT api_key FROM app_users WHERE id = ?\");\n $stmt->bind_param(\"i\", $user_id);\n if ($stmt->execute()) {\n $api_key = $stmt->get_result()->fetch_assoc();\n $stmt->close();\n return $api_key;\n } else {\n return NULL;\n }\n }", "function get_key() {\n\t\t// get_cert() also fetches key\n\t\tif (!isset($_SESSION['user_key']))\n\t\t\t$this->get_cert();\n\t\treturn $_SESSION['user_key'];\n\t}", "private static function getUserFromKey() {\n\t\tstatic $user;\n\t\t\n\t\tif ($user === null) {\n\t\t\t$user = false;\n\t\t\tif ($key = Request::getGET('key')) {\n\t\t\t\t$l = User::getUsers();\n\t\t\t\t$l = $l->filter($l->exprEqual($l->exprMember('unconfirmedEmailKey'),\n\t\t\t\t\t$key));\n\t\t\t\tif ($l->getCount() == 1)\n\t\t\t\t\t$user = $l->get(0);\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ($user === false)\n\t\t\treturn null;\n\t\telse\n\t\t\treturn $user;\n\t}", "public function getKey();", "public function getKey();", "public function getKey();", "public function getKey();", "public function getKey();", "public function getKey();", "public function getKey();", "public function getKey();", "public function getKey();", "public function getKey();", "public function getKey();", "public function getKey();", "public function getKey();", "public function getKey();", "public function getKey();", "public function getKey();", "public function getKey();", "public function getKey();", "public function getKey();", "public function getKey();", "public function getPrivateKey(PKEncryptionEnabledUserInterface $user);", "function staticGet($k,$v=null)\n { return Memcached_DataObject::staticGet('User_yubikey',$k,$v); }", "public static function getAuthKey($userType)\n {\n return isset(self::$_auth_keys[$userType]) ?\n self::$_auth_keys[$userType] : false;\n }", "public function getKeysWithRoomUsername($userRef) {\n echo '// Cas 5 //<br/>';\n $id_user = $this->_userDAO->getIdWithRef($userRef);\n if($id_user != -1) {\n echo '$id_user='.$id_user.'<br/>';\n $id_keychain = $this->_keychainDAO->getIdWithUserId($id_user);\n if($id_keychain != -1) {\n echo '$id_keychain='.$id_keychain.'<br/>';\n $id_keys = $this->_keyDAO->getInfosWithIdKeychain($id_keychain);\n foreach ($id_keys as $key_infos) {\n echo '<pre>';\n print_r($key_infos);\n echo '</pre>';\n }\n } else {\n echo 'Aucune <strong>$id_keychain</strong> trouvée pour <strong>'.$id_keychain.'</strong>.';\n }\n } else {\n echo 'Aucune <strong>$id_user</strong> trouvée pour <strong>'.$id_user.'</strong>.';\n }\n echo '<br/><br/>';\n }", "public function getUserIdentifier(): string\n {\n return (string)$this->key_hash;\n }", "public static function getKey();", "public static function getKey();", "public function userFromKey($key){\r\n $query = $this->conn->prepare('SELECT `user_id` FROM `user` WHERE confirmationKey = :key'); // Création de la requête + utilisation order by pour ne pas utiliser sort\r\n $query->execute([':key' => $key ]); // Exécution de la requête\r\n return $query->fetch(\\PDO::FETCH_ASSOC);\r\n\r\n }", "public function getKey() {}", "public function getKey() {}", "public static function getInRedis($user) {\n // Log::debug('Get from redis for user ' . $user['username']);\n \n $redisKey = 'user:' . $user['id'] . ':hotelStats';\n $redisResp = Redis::get($redisKey);\n \n // Log::debug('Redis resp:');\n // Log::debug($redisResp);\n if ($redisResp != null) {\n $redisArray = json_decode($redisResp, true);\n\n uasort($redisArray, function ($a, $b) {\n return $b['view'] <=> $a['view'];\n });\n\n // Log::debug($redisArray);\n return $redisArray;\n } else { // No hay información en redis para ese usuario\n return null;\n }\n }", "private function getInRedis($id, $key)\r\n {\r\n return $this->getRedis()->hget($this->redis_options['prefix'].$id, $key);\r\n }", "public function getConfirmationKey( $userid )\r\n\t{\r\n\t\t$this->debug->guard( );\r\n\r\n\t\t$sql = $this->database->prepare( \"SELECT * FROM \" . $this->configuration->getConfiguration( 'zeitgeist', 'tables', 'table_userconfirmation' ) . \" WHERE userconfirmation_user = ?\" );\r\n\t\t$sql->bindParam( 1, $userid );\r\n\r\n\t\tif ( !$sql->execute( ) )\r\n\t\t{\r\n\t\t\t$this->debug->write( 'Problem confirming a user: could not read from user confirmation table', 'warning' );\r\n\t\t\t$this->messages->setMessage( 'Problem confirming a user: could not read from user confirmation table', 'warning' );\r\n\r\n\t\t\t$this->debug->unguard( false );\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif ( $sql->rowCount( ) > 0 )\r\n\t\t{\r\n\t\t\t$row = $sql->fetch( PDO::FETCH_ASSOC );\r\n\t\t\t$ret = $row[ 'userconfirmation_key' ];\r\n\r\n\t\t\t$this->debug->unguard( $ret );\r\n\t\t\treturn $ret;\r\n\t\t}\r\n\r\n\t\t$this->debug->write( 'Problem confirming a user: key not found for given user', 'warning' );\r\n\t\t$this->messages->setMessage( 'Problem confirming a user: key not found for given user', 'warning' );\r\n\r\n\t\t$this->debug->unguard( false );\r\n\t\treturn false;\r\n\t}", "function get_user( $user_id ){\n\t$app = \\Jolt\\Jolt::getInstance();\n\treturn $app->store('db')->findOne('user', array( '_id'=>$user_id ));\n}", "public function getPublicKey(PKEncryptionEnabledUserInterface $user);", "public function get_pgp_key($user_id)\n {\n $this->db->select('fingerprint, public_key');\n $query = $this->db->get_where('pgp_keys', array('user_id' => $user_id));\n\n if ($query->num_rows() > 0) {\n $row = $query->row_array();\n $row['fingerprint_f'] = '0x' . substr($row['fingerprint'], (strlen($row['fingerprint']) - 16), 16);\n return $row;\n }\n\n return FALSE;\n }", "public function getKey(): string;", "public function getKey(): string;", "public function getKey()\n {\n return $this->get(self::KEY);\n }", "public function getKey()\n {\n return $this->get(self::KEY);\n }", "function getKey($keyname = 'generic') {\n if (array_key_exists($keyname . '_key', $_COOKIE)) {\n\t\t\treturn $_COOKIE[$keyname . '_key'];\n\t\t} else {\n\t\t\treturn $GLOBALS['TSFE']->fe_user->user['ses_id'];\n\t\t}\n }", "abstract public function getKey();", "abstract public function getKey();", "function get_user_validation_key($user_id) {\n $details = $this->get_user_details($user_id);\n return $details['ValidationKey'];\n\t}", "public function getByKey($key);", "function GetKey() { return( $this->key ); }", "public function user_key(string $user_key = null)\n {\n if (null === $user_key) {\n return $this->user_key;\n }\n\n $this->user_key = $user_key;\n return $this;\n }", "private function getDbUser(string $userKey)\n {\n\n $key = 'primaryEmail';\n if (! filter_var($userKey, FILTER_VALIDATE_EMAIL)) {\n $key = 'id';\n }\n\n $sqliteUtils = new SqliteUtils($this->dbFile);\n return $sqliteUtils->getRecordByDataKey(\n $this->dataType,\n $this->dataClass,\n $key,\n $userKey\n );\n }", "public static function adminKey(){\n \n // Cache ID\n $cid = 'senior_systems_authkey';\n\n $expired = TRUE;\n\n if($cache = \\Drupal::cache()->get($cid)){\n // Was this cached within the last two hours?\n $expired = time() - $cache->created > 7200;\n }\n\n if (!$expired) {\n $key = $cache->data;\n } else {\n // Request a new authorization key\n $config = \\Drupal::config('senior_systems_api.settings');\n $params = array(\n 'username' => $config->get('username'),\n 'password' => $config->get('password'),\n );\n $service = self::service('UserManagementService');\n $result = $service->loginExt($params);\n $key = $result->AuthKey;\n\n // Don't cache a bad key\n $pattern = '/^\\w{8}(-\\w{4}){3}-\\w{12}$/';\n if(preg_match($pattern,$key)){\n \\Drupal::cache()->set($cid, $key);\n } else {\n // Don't return a bad key either\n return;\n }\n }\n\n return $key;\n\n }", "function _get_additional_user_keys($user)\n {\n }", "private function userKeyName()\n {\n $userModel = config('follow.user');\n\n return (new $userModel)->getKeyName();\n }", "public function retrieve($key)\n {\n list($name, $userId) = explode('/user-', $key);\n\n $userMeta = $this->getModel()->search($name, $userId)->first();\n\n if (! is_null($userMeta)) {\n if (! $value = @unserialize($userMeta->value)) {\n $value = $userMeta->value;\n }\n\n $this->addKey($key, array(\n 'id' => $userMeta->id,\n 'value' => $value,\n ));\n\n return $value;\n }\n\n return null;\n }", "public function getUserPrivateRsaKey($userId)\n {\n return $this->_userDao->getUserPrivateRsaKey($userId);\n }", "protected function userKeyName()\n {\n $userModel = config('blockable.user');\n\n return (new $userModel)->getKeyName();\n }", "public static function get_user($user_id);", "public function storeKey()\n {\n return $this->repository->get($this->repoOptionString($this->sessionKey));\n }", "public function getRedisKey($where)\n {\n $key = $this->prefix;\n if ($this->key !== null) {\n $key .= $this->serializeConfFields('key', $where->mongoNotation);\n }\n return $key;\n }", "function user_data($key){\n global $mysqli;\n @$token = addslashes($_SESSION['user']['token']);\n @$username = addslashes($_SESSION['user']['name']);\n\n if(!isset($token) && !isset($username)){\n return false;\n } else {\n\n $sql = \"SELECT * FROM user WHERE username = '\" . $username . \"' AND token = '\" . $token . \"'\";\n $result = $mysqli->query($sql);\n\n $result = $result->fetch_object();\n return @$result->$key;\n }\n }", "public function get_user_info($key, $id) {\r\n $connection = DB::connect();\r\n $stmt = \"SELECT $key FROM users WHERE `id` = '$id'\";\r\n $result = $connection->query($stmt);\r\n\r\n return $result->fetch_assoc()[$key];\r\n }", "public function getKey(): KeyInterface;", "function getByUser(User $user);", "public static function getRealUserKey($userId)\r\n {\r\n return md5( $userId . '_' . CrownConfig::$serverAuthKey );\r\n }", "public function getKey()\n {\n return $this->__get(\"key\");\n }", "public function getIdKey();", "public function getKey($container, $key) {\n\t\treturn $this->_memcached->get('@@'.$container.'.'.$key);\n\t}", "public function getKey( $key )\n {\n /** @var $client \\Memcached */\n $client = $this->getClient();\n\n return $client->get( $key );\n }", "public function getKey()\r\n {\r\n return $this->key;\r\n }", "public function get($strKey);", "public function key(): mixed;", "public function getUser( int $user_id ) {\n $result = $this->db->query(\"SELECT * FROM users WHERE user_id = $user_id\");\n return $result->fetch_assoc();\n }", "public function getKey() {\n return $this->key;\n }", "public function getKey() : string\n {\n return $this->key;\n }", "function ajan_get_user_meta_key( $key = false ) {\n\treturn apply_filters( 'ajan_get_user_meta_key', $key );\n}", "public function getKey(): string\n {\n return $this->key;\n }", "public function retrieveKey($keyId)\n {\n return $this->start()->uri(\"/api/key\")\n ->urlSegment($keyId)\n ->get()\n ->go();\n }", "public function key()\n {\n $currentRecord = $this->storage->current();\n return $currentRecord['uid'];\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 }" ]
[ "0.68722844", "0.68278205", "0.65183866", "0.6509063", "0.6476094", "0.6476094", "0.635055", "0.62263197", "0.6162484", "0.613968", "0.61144423", "0.61144423", "0.61144423", "0.61144423", "0.61144423", "0.61144423", "0.61144423", "0.61144423", "0.61144423", "0.61144423", "0.61144423", "0.61144423", "0.61144423", "0.61144423", "0.61144423", "0.61144423", "0.61144423", "0.61144423", "0.61144423", "0.61144423", "0.6073804", "0.6044388", "0.603634", "0.60336584", "0.6032489", "0.6025109", "0.6025109", "0.59973586", "0.59849423", "0.59849423", "0.5950492", "0.59120816", "0.5904303", "0.5847538", "0.5846549", "0.58083105", "0.58051366", "0.58051366", "0.57835394", "0.57835394", "0.57682097", "0.5767928", "0.5767928", "0.57261115", "0.57072073", "0.57031316", "0.56937283", "0.56934977", "0.56914514", "0.56863385", "0.56813437", "0.56631845", "0.56626946", "0.5661377", "0.56436795", "0.56353855", "0.56344265", "0.56271076", "0.56263644", "0.5625159", "0.5609498", "0.5608749", "0.5565726", "0.5563811", "0.5553548", "0.5551386", "0.5549447", "0.5546948", "0.55415714", "0.5532793", "0.55301887", "0.55026376", "0.5502497", "0.5501323", "0.5500991", "0.5497781", "0.5493745", "0.5493745", "0.5493745", "0.5493745", "0.5493745", "0.5493745", "0.5493745", "0.5493745", "0.5493745", "0.5493745", "0.5493745", "0.5493745", "0.5493745", "0.5493745" ]
0.65531415
2
Set a redis key for a particular user.
private function _setUserKey (string $username, string $key, $value) { $realKey = $username . '_' . $key; $this->cache->put($realKey, (string) $value, self::CACHE_TIME); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function SetKey($key = ''){\n \tself::$userKey = $key;\n }", "function set_user_setting( $user, $key, $value )\n {\n //Unimplemented\n }", "private function setRedis_set($gid, $object){\n $client = new Predis\\Client([\n 'scheme' => 'tcp',\n 'host' => '127.0.0.1',\n 'port' => 6379,\n ]);\n\t\t$object = json_encode($object);\n $client->set($gid, $object);\n }", "public function setAccessTokenAndUserId($token, $user_id)\n {\n $ret = \\Yii::$app->redis->set('token_' . $token, $user_id); //设置redis缓存\n return $ret;\n }", "private function setInRedis($id, $key, $value)\r\n {\r\n if (is_array($value) === true) {\r\n $this->getRedis()->hmset($this->redis_options['prefix'].$id, $key, $value);\r\n } else {\r\n $this->getRedis()->hset($this->redis_options['prefix'].$id, $key, $value);\r\n }\r\n }", "public function setResetKeyForUser($user_id)\n {\n\n /*\n $this->reset_key = sha1(\n $user_id .\n \\Helpers\\Consts::appSecretKey .\n (new \\DateTime())->format(\\Helpers\\Consts::mysqlDateTimeColumnFormat)\n );\n\n */\n\n $this->reset_key = \\Helpers\\String::generateRandomString(\n $this->config->getResetKeyLength()\n );\n return $this;\n }", "function setKey($value) {\r\n $this->key = $value;\r\n }", "public function send_restore_key($user, $key)\n {\n $this->db->set('restore_key', $key)->where('email', $user)->update('ec_client');\n }", "public function user_key(string $user_key = null)\n {\n if (null === $user_key) {\n return $this->user_key;\n }\n\n $this->user_key = $user_key;\n return $this;\n }", "function update_auth_key($user_id)\n\t{\n\t\t$string = $this->random_string(20);\n\n\t\t$sql = \"\n\t\t\t\tUPDATE users\n\t\t\t\tSET auth_key = '$string'\n\t\t\t\tWHERE id_user = $user_id\n\t\t\t\";\n\n\t\t$dbdata = $this->conn->prepare($sql);\n\t\t$dbdata->execute();\n\n\t\treturn $string;\n\t}", "public function setKey(string $key);", "public function setKey($key);", "public function set(string $key, $data);", "public function set($key, $data);", "public function set( $key, $value );", "public function set( $key, $value );", "public function set_auth_key($data) {\n\t\t$this->UserAuth = ClassRegistry::init('UserAuth');\n\t\t$input = array(\n\t\t\t'key'\t=> $data['key'],\n\t\t\t'params'\t=> serialize($data),\n\t\t\t'created_at' => date('Y-m-d H:i:s'),\n\t\t\t);\n\t\t$this->UserAuth->create();\n\t\t$this->UserAuth->save($input);\n\t\treturn;\n\t}", "public function setKey( $key )\r\n {\r\n $this->key = $key;\r\n }", "function SetKey( $i ) { $this->_key = $i; $this->SetValue('_key', $i ); }", "public function set(string $key, $value);", "public function set(string $key, $value);", "public function set ($key, $value);", "public function set_user_id( $user_id ) {\r\n\t\t$this->user_id = $user_id;\r\n\t\t$this->store->set_id( $user_id );\r\n\t}", "public function set($key, $value);", "public function set($key, $value);", "public function set($key, $value);", "public function set($key, $value);", "public function set($key, $value);", "public function set($key, $value);", "public function set($key, $value);", "public function set($key, $value);", "public function set($key, $value);", "public function set($key, $value);", "public function set($key, $value);", "public function set($key, $value);", "public function set($key, $value);", "public function set($key, $value);", "public function set($key, $value);", "public function set($key, $value);", "public function set($key, $value);", "public function set($user, array $input);", "public function setKey($key)\n\t{\n\t\t$this->key = $key;\n\t}", "public function setKey($key)\n\t{\n\t\t$this->key = $key;\n\t}", "public function setKey($key)\n\t{\n\t\t$this->key = $key;\n\t}", "public function setKey($key)\n {\n $this->_key = $key;\n }", "public function setKey($key)\n {\n $this->key = $key;\n }", "public function setKey($key)\n {\n $this->key = $key;\n }", "public function setKey($key)\n {\n $this->key = $key;\n }", "function set($key, $value);", "function set($key, $value);", "function set($key, $value);", "public static function setKey($key){\n\t\tself::$_key = $key;\n\t}", "function set_key($key)\n\t{\n\t\tif(empty($key) || !isset($GLOBALS['ACCESS_KEYS'][$key])) return;\n\t\tif(ACCESS_MODEL === \"roles\") {\n\t\t\tforeach($GLOBALS['ACCESS_KEYS'][$key] as $k) {\n\t\t\t\tif(substr($k, 0, 1) == '@') {\n\t\t\t\t\t// This key references another role - pull in all keys from that role\n\t\t\t\t\t$this->set_key(substr($k, 1));\n\t\t\t\t} else {\n\t\t\t\t\t$this->access_keys[] = $k;\n\t\t\t\t}\n\t\t\t}\n\t\t} else if(ACCESS_MODEL === \"discrete\") {\n\t\t\t$this->access_keys[] = $key;\n\t\t}\n\n\t\t$_SESSION['_ACCESS']['keys'] = $this->access_keys;\n\t}", "public function SetIdUser($id_user)\n {\n $this->id_user = $id_user;\n return;\n\n }", "protected function setSessionSauce($user, $key) {\r\n\t\t$this->sauceKey = $key;\r\n\t\t$this->sauceUser = $user;\r\n\t}", "public function setKey(string $key) : void {\n\t\t$this->key = $key;\n\t}", "protected function addUserToCache($user_id, $user) {\n $this->user_cache[$user_id] = $user;\n }", "public function setCacheKey(string $key): void;", "public function setKey(?string $key): void\n {\n $this->key = $key;\n }", "public function remember($user)\n\t{\n\t\t$this->user = $user;\n\n\t\t$this->session->put(static::$key, $user->id);\n\t}", "public function setUserId(?string $value): void {\n $this->getBackingStore()->set('userId', $value);\n }", "public function setUserId(?string $value): void {\n $this->getBackingStore()->set('userId', $value);\n }", "public function setUserId(?string $value): void {\n $this->getBackingStore()->set('userId', $value);\n }", "function setUser( $user )\r\n {\r\n if ( is_a( $user, \"eZUser\" ) )\r\n {\r\n $userID = $user->id();\r\n\r\n $this->UserID = $userID;\r\n }\r\n }", "function SetUser(&$user)\n\t{\n\t\t$this->userId = $user->userId;\n\t}", "public function __set($key, $value);", "public function set($key, $value) {\n $this->memcached->set($key, $value);\n }", "public function set($key, $value) {\n\n }", "public function setIduser($value)\n {\n $this->iduser = $value;\n }", "private static function set($key, $value)\n {\n shm_put_var(self::getShmem(), $key, $value);\n }", "public function useKey(string $key)\n {\n $this->key = $key;\n }", "private function setPasskey($passkey)\n {\n $this->passkey = $passkey;\n $this->redis->set('passkey_'.$this->token, $passkey);\n }", "function update_usermeta($user_id, $meta_key, $meta_value)\n {\n }", "public function set_user($var_user) {\r\n\t\t$this->id = $var_user;\r\n\t}", "abstract public function set ($key, $value);", "public function setKey($keyname,$keyvalue) {\n\t\t$this->keysDB[$keyname] = $keyvalue;\n\t}", "public function updateUnidentifiedKey($user)\n {\n $userClass = $this->getUserClass($user);\n if (isset($this->encryptedKeys[$userClass]) && isset($this->encryptedKeys[$userClass][\"\"])) {\n $this->encryptedKeys[$userClass][$user->getId()] = $this->encryptedKeys[$userClass][\"\"];\n unset($this->encryptedKeys[$userClass][\"\"]);\n }\n }", "abstract public function set($key, $value);", "abstract public function set($key, $value);", "public function set_key($value) {\n\t\treturn $this->set_attribute(static::$key, $value);\n\t}", "public static function set($key,$val,$expire);", "public function setKey(?string $key): void\n {\n }", "public function setUserID($user_id){\n\t\t$this->user_id = $user_id;\n\t}", "function setKey($key)\r\n {\r\n $this->key = $key;\r\n $this->changed = true;\r\n }", "public function setUserId($userId);", "public function set($key, $value, $ttl=0);", "public function setKeyName($key);", "public function set( $key , $value ) {\n\t\teval( '$this->items' . $this->nodelize( $key ) . ' = $value;' );\n\t}", "public function set_user($user) {\n $this->user = $user;\n }", "public function set($key, $value)\n {\n $this->session->set($key,$value);\n }", "public function set($key, $data, $ttl = 0);", "public function set($key, $data, $ttl = 0);", "public function setItem($key, $item);", "public function set(string $key, string $data) : void;", "function setKey($clave){\n $this->key = $clave;\n }", "public function setMaconomyId(string $key): void\n {\n $this->data['instancekeyField'] = $key;\n }", "public function setKey($key, $data) {\n\t $this->_memcached->set($key, $data);\n\t return $this;\n\t}", "public function set($key, $value, $expiration = 0);", "public function setByKey($master, $key, $value, $expiry = 0) {}", "public function setKey($key)\n {\n return $this->set('key', $key);\n }" ]
[ "0.7010619", "0.63163507", "0.6311698", "0.629011", "0.62325096", "0.6226584", "0.61845386", "0.6122072", "0.6028243", "0.6006594", "0.5960473", "0.59544694", "0.58589417", "0.5847366", "0.5818005", "0.5818005", "0.581017", "0.579398", "0.5788379", "0.57704365", "0.57704365", "0.57688546", "0.57565415", "0.57482684", "0.57482684", "0.57482684", "0.57482684", "0.57482684", "0.57482684", "0.57482684", "0.57482684", "0.57482684", "0.57482684", "0.57482684", "0.57482684", "0.57482684", "0.57482684", "0.57482684", "0.57482684", "0.57482684", "0.57090956", "0.56776935", "0.56776935", "0.56776935", "0.5673582", "0.5670736", "0.5670736", "0.5670736", "0.5653517", "0.5653517", "0.5653517", "0.5641899", "0.56248534", "0.56237876", "0.5620723", "0.5618345", "0.55798864", "0.5562633", "0.55592847", "0.55571", "0.5555453", "0.5555453", "0.5555453", "0.55508786", "0.55465525", "0.55438775", "0.552575", "0.5520213", "0.5507868", "0.5490774", "0.5485212", "0.5480373", "0.5473405", "0.54629004", "0.545368", "0.5451684", "0.5450405", "0.54437506", "0.54437506", "0.54283637", "0.5406217", "0.5405823", "0.54033273", "0.53890693", "0.53872794", "0.5384242", "0.53808653", "0.5379873", "0.53679645", "0.53589034", "0.53553337", "0.53553337", "0.5348329", "0.53479177", "0.5337051", "0.53369975", "0.533196", "0.5313981", "0.5312564", "0.5305214" ]
0.6628035
1
Delete a memcached key for a particular user.
private function _delUserKey ($username, $key) { $realKey = $username . '_' . $key; $result = $this->cache->forget($realKey); if ( ! $result) throw new SettingsException('Redis Error: can not delete key - ' . $realKey); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function del($key);", "public function delete($key);", "public function delete($key);", "public function delete($key);", "public function delInCache($key);", "public function delete( $key );", "abstract public function delete_cached( $key );", "public function delete($userKey)\n {\n $userEntry = $this->getDbUser($userKey);\n\n if ($userEntry === null) {\n return null;\n }\n\n $sqliteUtils = new SqliteUtils($this->dbFile);\n $sqliteUtils->deleteRecordById($userEntry['id']);\n return true;\n }", "public function deleteByKey($key)\n {\n // Direct delete from memcached and local cache\n unset($this->cache[$key]);\n foreach ($this->mc as $mc) {\n $mc->delete($key);\n }\n }", "public function deleteKey( $key )\n {\n /** @var $client \\Memcached */\n $client = $this->getClient();\n $client->delete( $key );\n }", "function delete ($key) {\n return $this->memcached->delete($key);\n }", "public static function cacheDelete($userid)\n\t{\n\t\t$myCacher = new Cacher(self::cacheBuildKeystring($userid));\n\t\treturn $myCacher->clear();\n\t}", "public function delete($key): void;", "abstract public function deleteSyncCache($devid, $user);", "abstract public function delete($key);", "public function revokeUserKey($appUserID, $label)\n {\n // Check to see if the key exists for the user first\n $result = $this->sdb->query(\"select id from api_keys where uid=$1 and label=$2;\", [$appUserID, $label]);\n\n // Return only the data returned (one row);\n $all = array();\n while($row = $this->sdb->fetchrow($result))\n {\n $all = $row;\n }\n\n // If key exists for the user, then delete it\n if (!empty($all) && isset($all[\"id\"])) {\n $result = $this->sdb->query(\"delete from api_keys where id=$1 returning *;\", [$all[\"id\"]]);\n // Return only the data returned (one row);\n $check = array();\n while($row = $this->sdb->fetchrow($result))\n {\n $check = $row;\n }\n\n // Sanity check: did we actually delete something?\n if (empty($all))\n return false;\n return true;\n }\n\n return false;\n }", "public function delete(string $key): void;", "public function deleted(User $user)\n {\n clearCacheByArray($this->getCacheKeys($user));\n clearCacheByTags($this->getCacheTags($user));\n }", "abstract public function delete ($key);", "abstract public function delete( $key );", "public function deleteItem($key);", "public function delete_key($key){\n if($this->driver==\"file\"){\n $this->file->delete_file($this->path.md5($key).\".txt\");\n }\n if($this->driver==\"redis\"){\n $this->redis->hDel($this->path,md5($key));\n }\n }", "public function erase($key);", "public static function delete(string $key)\n {\n return \\apcu_delete(self::PREFIX.$key);\n }", "public function delete($key) {\n\t\t// and return the result\n\t\treturn eaccelerator_rm($key);\n\t}", "public function delete($key) {\n\t\treturn $this->_Memcached->delete($key);\n\t}", "function delete_usermeta($user_id, $meta_key, $meta_value = '')\n {\n }", "function delete($key) {\n\t\tunset($this->_cache[$key]);\n\t}", "public function unsetKey(string $key);", "public function unlink($key);", "public function delete($key) {\n return apc_delete($key);\n }", "public function delete_user($user);", "public function delete(User $user, ServerAuthKey $key)\n {\n return true;\n }", "public function delete ($key)\n {\n return apc_delete($key);\n }", "function ajan_delete_user_meta( $user_id, $key, $value = '' ) {\n\treturn delete_user_meta( $user_id, ajan_get_user_meta_key( $key ), $value );\n}", "public function removeKeys(PKEncryptionEnabledUserInterface $user);", "public function delete(string $key): void\n {\n $app = App::get();\n $keyMD5 = md5($key);\n $app->data->delete('.temp/cache/' . substr($keyMD5, 0, 3) . '/' . substr($keyMD5, 3) . '.2');\n }", "function delete_user_meta($user_id, $meta_key, $meta_value = '')\n {\n }", "public function remove($key);", "public function remove($key);", "public function remove($key);", "public function remove($key);", "public function remove($key);", "public function remove($key);", "public function remove($key);", "public function remove($key);", "public function rem($key);", "public function deleteAnItem()\n {\n $keys = [\n 'cache-bin:user_1', 'cache-bin:article_1212'\n ];\n $key = 'article_*';\n $server = $this->getMemcachedMock(['getAllKeys', 'delete']);\n $server->expects($this->once())\n ->method('getAllKeys')\n ->willReturn($keys);\n $server->expects($this->once())\n ->method('delete')\n ->with('cache-bin:article_1212')\n ->willReturn(true);\n $this->driver->server = $server;\n $this->assertSame($this->driver, $this->driver->erase($key));\n }", "public function remove($userid) {\n $sql =<<<SQL\nDELETE FROM $this->tableName\nWHERE userid=?\nSQL;\n $pdo = $this->pdo();\n $statement = $pdo->prepare($sql);\n $statement->execute(array($userid));\n }", "public function delete($user)\n {\n $user->deleteProfilePhoto();\n $user->tokens->each->delete();\n\n // $user->delete(); csak logikai törlés a megngedett\n $user->update([\"name\" => \"deleted\".$user->id,\n \"email\" => \"deleted\".$user->id.\"@deleted.com\",\n \"password\" => \"psw\".rand(100000,999999)]);\n\n \\DB::table('members')\n ->where('user_id','=',$user->id)\n ->delete();\n\n }", "function delUserProperty($key,$field){\n return $this->redis->hdel($key,$field);\n }", "public static function delete($key)\n\t\t{\n\t\t\tself::getCache()->delete($key);\n\t\t}", "protected function _removeKey($key) {}", "public function delete($userid) {\n $sql = \"DELETE FROM usertable WHERE userid = :userid\";\n $stmt = $this->db_connect->prepare($sql);\n $stmt->bindParam(':userid', $userid, PDO::PARAM_INT);\n $stmt->execute();\n }", "public function remove(string $key);", "function rm($key) {\n }", "public static function delete(string $key): void {\n\t\tself::$sessionInstance->delete ( $key );\n\t}", "public function deleteHash($user_id){\r\n\t\t$query = $this->connection->prepare('DELETE FROM password_reset WHERE user_ID = :user_id');\r\n\t\treturn $query->execute(array('user_id' => $user_id));\r\n\t}", "public function delete($user, $ident);", "function remove($key);", "function remove($key);", "public function remove($key) {}", "public function remove($key) {\n return apc_delete($key);\n }", "public function delete_pgp_key($user_id)\n {\n $this->db->where('user_id', $user_id);\n\n if ($this->db->delete('pgp_keys') == TRUE) {\n // When deleting the PGP key,\n $changes = array('pgp_two_factor' => '0',\n 'force_pgp_messages' => '0',\n 'block_non_pgp' => '0');\n $this->update($changes);\n return TRUE;\n }\n\n return FALSE;\n }", "function delete($key, $time=0) {\n return $this->memcached->delete($key, $time);\n }", "public function deleted(User $user)\n {\n $this->clearCache($this->key);\n\n FileHelpers::deleteFile($user->avatar);\n }", "public function deleted(User $user)\n {\n $users = User::paginate(100);\n $delete = Cache::forget('users');\n Cache::put('users', $users , now()->addMinutes(10));\n }", "function remove($key) {\n return apc_delete($key);\n }", "public function deleteUser($userId);", "public function deleteUserById($user_id){\n $this->dao->deleteUserByid($user_id);\n }", "function KeyDelete($key)\n\t{\n\t\tif($this->apcu->enabled)\n\t\t\treturn $this->apcu->KeyDelete($key);\n\t\tif($this->redis->enabled)\n\t\t\treturn $this->redis->KeyDelete($key);\n\n\t\treturn false;\n\t}", "public function remove($key)\r\n {\r\n return apc_delete($key);\r\n }", "public function forget($key);", "public function forget($key);", "public function forget($key);", "public function forget($key);", "public function delUser($user_id) {\n $db = $this->dbConnect();\n $req = $db->prepare('DELETE FROM `p5_users` WHERE USER_ID = ?');\n $req->execute(array($user_id));\n $req->closeCursor();\n }", "abstract public function remove($key);", "public function delete($ssh_key);", "public static function del($key) {\t\t\t\n\t\t\tif(isset($_SESSION[base64_encode(BASE_PATH.'_'.$key)]))\n\t\t\tunset($_SESSION[base64_encode(BASE_PATH.'_'.$key)]);\n\t\t}", "function remove ($key);", "public function delete($key){\n return $this->connection->del($key);\n }", "public function delete(string $key) : bool;", "private function delKey($key)\n {\n $this->model::where('key', $key)->get()->map(function($row){ $row->delete(); });\n }", "public function __unset($key);", "public function __unset($key);", "public function destroy($user_id)\n\t{\n\t\t//\n\t}", "public function deleteUserKeys($uid) {\n\t\t$this->backupAllKeys('password_reset');\n\t\t$this->deletePublicKey($uid);\n\t\t$this->deletePrivateKey($uid);\n\t}", "public function delete($user){\n }", "public function delete( $key )\n\t{\n\t\t$this->getObject()->delete( $key );\n\t}", "public function deleteServer ( $key, $user_id, $user_is_admin = false ) { \n\t\t$servers = get_option('oauth_servers');\n\t\tif (array_key_exists($key, $servers)) {\n\t\t\tunset($servers[$key]);\n\t\t\tupdate_option('oauth_servers', $servers);\n\t\t}\n\t}", "public function delete($key)\n {\n // don't start a new session to remove something that isn't there\n $this->lazyStart();\n unset($this->_store[$key]);\n }", "function delete (string $key) : bool {\n $key = $this->getUnsafePrefix() . $key;\n\n return $this->memcached->delete($key);\n }", "public function delete($api_key = FALSE, $user_id = FALSE, $id = FALSE)\n {\n if (! $api_key || ! $user_id || ! $id)\n return FALSE;\n \n $data = $this->db->query(\"\n\t\tDELETE clients FROM clients\n\t\tLEFT JOIN `users` ON `users`.id = `clients`.user_id\n\t\tLEFT JOIN `keys` ON `keys`.id = `users`.api_key\n\t\tWHERE `clients`.id = ? AND `clients`.user_id = ? AND `keys`.key = ?;\n\t\t\", array(\n $id,\n $user_id,\n $api_key\n ));\n \n return $data;\n }", "public function deleteKey($key) {\n\t $this->_memcached->delete($key);\n\t return $this;\n\t}", "public function deleteByUser($user_id)\n {\n return $this->getMapper()->delete(\n $this->getModel()\n ->setUserId($user_id)\n );\n }", "public function remove($key){\n\n }", "public function delete($user)\n {\n\n }", "function remove($key) {\n $memObj = self::getMemcacheObj();\n return $memObj->delete($key);\n }", "function remove($key) {\n $memObj = self::getMemcacheObj();\n return $memObj->delete($key);\n }" ]
[ "0.6957491", "0.6752543", "0.6752543", "0.6752543", "0.67215824", "0.67214817", "0.6693249", "0.65895", "0.6560337", "0.65207994", "0.6466811", "0.6465134", "0.6460812", "0.6386242", "0.6374395", "0.63148254", "0.6284899", "0.6283343", "0.6278164", "0.6278081", "0.62776124", "0.62775433", "0.6252678", "0.6226981", "0.6225866", "0.6224772", "0.6219426", "0.62130135", "0.62092745", "0.61907303", "0.6155973", "0.6154257", "0.61535674", "0.614613", "0.61291265", "0.60986525", "0.6086511", "0.60656965", "0.60580724", "0.60580724", "0.60580724", "0.60580724", "0.60580724", "0.60580724", "0.60580724", "0.60580724", "0.60238177", "0.60190725", "0.60154766", "0.6001165", "0.5999254", "0.59957653", "0.599217", "0.59911627", "0.5988212", "0.59828883", "0.5981574", "0.5980731", "0.59773695", "0.5974639", "0.5974639", "0.5973183", "0.5964762", "0.5956548", "0.5936101", "0.5932133", "0.59230787", "0.59117395", "0.5889126", "0.58872396", "0.58798486", "0.5867458", "0.5857407", "0.5857407", "0.5857407", "0.5857407", "0.5839287", "0.583914", "0.58370703", "0.58370304", "0.5831823", "0.5825115", "0.58104515", "0.5809803", "0.5803847", "0.5803847", "0.5798344", "0.57956696", "0.57926196", "0.5781875", "0.5770053", "0.57596046", "0.57491577", "0.5745219", "0.57419753", "0.5738694", "0.57372326", "0.5728822", "0.57273203", "0.57273203" ]
0.6926232
1
Realizamos la consulta para ver los modulos instalados y su estatus
public function loadViewPanel() { $query = $this->db->query("SELECT * FROM db_modulos"); //Creamos variable para contener resultado $modulos = array(); //Cargamos los valores en la variable para mandarlos a la vista foreach ($query->result() as $row) { $modulos["modulo"][] = $row->modulo; $modulos["estatus"][] = $row->activo; } //Mandamos el nombre del usuario para mostrarlo $modulos["nombreUsuario"] = strtoupper($this->session->userdata('nombreUsuario')); $modulos["correoUsuario"] = $this->session->userdata('correo'); //Cargamos las vistas para implementarlas $coleccion = array( "header" => $this->load->view("layout/header", '', TRUE), "menu" => $this->load->view("layout/panel", $modulos, TRUE), "header_navegation" => $this->load->view("layout/header_navegation", array("nombreUsuario"=>$modulos["nombreUsuario"],"correoUsuario"=>$modulos["correoUsuario"]), TRUE), "contenido" => $this->load->view("welcome_message", '', TRUE), "footer" => $this->load->view("layout/footer", '', TRUE), "titulo" => "Tienda" ); //Cargamos la estructura principal para cargar el Panel $this->load->view("layout/main",$coleccion); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function listar_so_software() {\n\t\t$query = \"SELECT software_so.*\n\t\tFROM software_so\n\t\tORDER BY so asc\";\n\n $connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\t\t\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\t\n\t\t$numrows = mysql_num_rows($result);\n\t\tmysql_close($connection);\n\t\t// COMPROBAMOS QUE HAYA RESULTADOS\n\t\t// SI EL NUMERO DE RESULTADOS ES 0 SIGNIFICA QUE NO HAY REGISTROS CON ESOS DATOS\n\t\tif ($numrows == 0) {\n\t\t\treturn $result;\n\t\t}\n\t\telse {\n\t\t\treturn $result;\n\t\t}\n\t}", "function getInstalled();", "function check_packages() {\n global $xoopsDB, $xoopsModuleConfig, $xoopsConfig;\n $res = $xoopsDB->query(\"SELECT p1.*, p2.vcheck dirname, p2.pversion ppversion FROM \".UPDATE_PKG.\" p1 LEFT JOIN \".UPDATE_PKG.\" p2 ON p1.parent=p2.pkgid WHERE p1.pversion='HEAD' ORDER BY p1.vcheck\");\n $pkgs = get_packages('all', false);\n echo \"<div class='adminnavi'>\"._AM_CHECK_LIST.\"</div>\\n\";\n echo \"<table cellspacing='1' class='outer'>\\n\";\n echo \"<tr><th>\"._AM_PKG_PNAME.\"</th><th>\"._AM_PKG_CURRENT.\"</th><th>\".\n\t_AM_PKG_DIRNAME.\"</th><th>\"._AM_PKG_NEW.\"</th><th>\".\n\t_AM_PKG_DTIME.\"</th><th>\"._AM_CHANGES.\"</th><th>\".\n\t_AM_MODIFYS.\"</th><th></th></tr>\\n\";\n $n = 0;\n $update = false;\t// find update package?\n $modify = false;\n $errors = array();\n $module_handler =& xoops_gethandler('module');\n while ($data = $xoopsDB->fetchArray($res)) {\n\t$pname = $data['pname'];\n\t$dirname = $data['vcheck'];\t// real dirname\n\t$pdir = empty($data['dirname'])?$dirname:$data['dirname'];\n\t$bg = $n++%2?'even':'odd';\n\t$id = $data['pkgid'];\n\t$newpkg = isset($pkgs[$pdir])?$pkgs[$pdir]:array();\n\tif (empty($newpkg)) {\n\t foreach ($pkgs as $pkg) {\t// find by name\n\t\tif ($pname == $pkg['pname']) {\n\t\t $newpkg = $pkg;\n\t\t break;\n\t\t}\n\t }\n\t}\n\t$newver = isset($newpkg['pversion'])?$newpkg['pversion']:'';\n\t$curver = get_current_version($pname, $dirname);\n\t$modver = $curver[1];\t// version string (0: normalize, 1: raw)\n\tif (empty($data['parent']) ||\n\t !in_array($data['ppversion'], $curver)) {\n\n\t $par = import_new_package($pname, $modver, $pdir);\n\t if (empty($par)) {\n\t\t$errors[] = \"$pname $modver: \"._AM_PKG_NOTFOUND;\n\t } else {\n\t\t$pid = $data['parent'] = $par->getVar('pkgid');\n\t\t$pnm = $data['name'] = $par->getVar('name');\n\t\t$ctm = $data['ctime'] = time();\n\t\t$data['ppversion'] = $par->getVar('pversion');\n\t\t$xoopsDB->queryF(\"UPDATE \".UPDATE_PKG.\" SET parent=$pid, name=\".$xoopsDB->quoteString($pnm).\", mtime=0, ctime=$ctm WHERE pkgid=$id\");\n\t }\n\t}\n\tif (!empty($data['ppversion'])) {\n\t $pversion = $data['ppversion'];\n\t $past = time()-$data['mtime'];\n\t if ($past>$xoopsModuleConfig['cache_time']) {\n\t\t$pkg = new InstallPackage($data);\n\t\t$pkg->load();\n\t\t$count = count($pkg->checkFiles());\n\t\tif (!$count) $xoopsDB->queryF(\"UPDATE \".UPDATE_PKG.\" SET mtime=\".time().\" WHERE pkgid=\".$id);\n\t } else {\n\t\t$count = 0;\n\t }\n\t $opt = \"&pkgid=$id\";\n\t if (!$count) $opt .= \"&view=yes\";\n\t $op = \"<a href='index.php?op=detail$opt'><img src='\".XOOPS_URL.\"/images/icons/edit.png' alt='\".($count?_AM_MODIFY:_AM_DETAIL).\"' title='\".($count?_AM_MODIFY:_AM_DETAIL).\"' /></a>\";\n\t} else {\t\t// no manifesto\n\t $pversion = \"\";\n\t $op = \"\";\n\t $count = 0;\n\t}\n\tif ($count) $modify = true;\n\tif (!empty($newpkg)) {\n\t $newver = $newpkg['pversion'];\n\t $newdate = formatTimestamp($newpkg['dtime'], \"m\");\n\t} else {\n\t $newver = '-';\n\t $newdate = '-';\n\t}\n\t$mcount = count_modify_files($data['pkgid']);\n\tif ($pversion != $newver) {\n\t $bg = 'up';\n\t $uppkg = import_new_package($pname, $newver);\n\t if ($uppkg) {\n\t\t$pid = $uppkg->getVar('pkgid');\n\t\t$newver = \"<a href='index.php?op=detail&pkgid=$id&new=$pid&view=yes'>\".htmlspecialchars($newver).\"</a>\";\n\t\t$update = true;\n\t }\n\t} else {\n\t $newver = htmlspecialchars($newver);\n\t}\n\n\tif ($count) $bg = 'fix';\n\n\t// check module update\n\t$vers = htmlspecialchars($modver);\n\tif (!empty($dirname)) {\n\t $module = $module_handler->getByDirname($dirname);\n\t if (is_object($module)) { // installed?\n\t\t$mver = $module->getVar(\"version\")/100;\n\t\tif (!in_array($mver, $curver)) {\n\t\t $url = get_system_url(\"ModuleUpdate\", $dirname);\n\t\t $vers = \"<a href='$url' title='\"._AM_PKG_NEEDUPDATE.\"'>$vers ($mver)</a>\";\n\t\t}\n\t } else {\n\t\t$url = get_system_url(\"ModuleInstall\", $dirname);\n\t\t$vers = \"<a href='$url' title='\"._AM_PKG_NOTINSTALL.\"'>$vers (-)</span>\";\n\t }\n\t}\n\techo \"<tr class='$bg'><td><a href='index.php?op=opts&pkgid=$id'>\".\n\t htmlspecialchars($pname).\"</a></td><td>\".\n\t $vers.\"</td><td align='center'>$dirname</td><td align='center'>\".$newver.\n\t \"</td><td align='center'>$newdate</td><td align='right'>$count</td><td align='right'>$mcount</td><td align='center'>$op</td></tr>\\n\";\n }\n echo \"</table>\\n\";\n if ($update && !$modify) {\n\techo \"<table cellpadding='5'>\n<tr>\n <td><a href='pack.php?op=backup'>\"._AM_UPDATE_BACKUP.\"</a></td>\n <td><a href='pack.php?op=update'>\"._AM_UPDATE_ARCHIVE.\"</a></td>\n <td>\";\n\tif (preg_match('/^Yes/', mysystem(\"check\"))) {\n\t echo \"\n <form action='pack.php?op=exec' method='post'>\n <input type='submit' value='\"._AM_UPDATE_SUBMIT.\"'>\n </form>\";\n\t}\n\techo \"\n </td>\n</tr>\n</table>\\n\";\n }\n $rollback = ROLLBACK;\n if (file_exists($rollback)) {\n\t$ctime = filectime($rollback);\n\t$expire = $ctime+$xoopsModuleConfig['cache_time'];\n\tif ($expire < time()) unlink($rollback);\n\telse {\n\t $tm = _AM_UPDATE_TIME.' '.formatTimestamp($ctime, 'm');\n\t $until = _AM_UPDATE_EXPIRE.' '.formatTimestamp($expire, 'H:i');\n\techo \"<table cellpadding='5'>\n <tr><td>\n <form action='index.php?op=rollback' method='post'>\n <input type='submit' value='\"._AM_UPDATE_ROLLBACK.\"'></form></td>\n <td>$tm ($until)</td></tr>\n</table>\\n\";\n\t}\n }\n if ($errors) {\n\techo \"<br/><div class='errorMsg'>\\n\";\n\tforeach ($errors as $msg) {\n\t echo \"$msg<br/>\\n\";\n\t}\n\techo \"</div>\\n\";\n }\n}", "function check() {\n $model = & $this->getModel('update');\n $view = & $this->getView('check', 'raw');\n $view->setModel($model, true);\n\n // Purge updates\n $model->purge();\n $model->enableSites();\n\n // Get the caching duration\n jimport('joomla.application.component.helper');\n $component = JComponentHelper::getComponent('com_installer');\n $params = $component->params;\n $cache_timeout = $params->get('cachetimeout', 6, 'int');\n $cache_timeout = 3600 * $cache_timeout;\n\n // Find updates\n $result = $model->findUpdates(0, $cache_timeout);\n \n // Display the view\n $view->display();\n }", "public function CambiaEstatus()\n {\n \t$consulta = $this->Modelo_direccion->getAllEntradas($this->session->userdata('id_direccion'));\n \t\n \tforeach ($consulta as $key) {\n \t\t$idoficio = $key->id_recepcion;\n\n \t\tif($this->db->query(\"CALL comparar_fechas('\".$idoficio.\"')\"))\n \t\t{\n \t\t\techo 'Ejecutando Cambios';\n \t\t}else{\n \t\t\tshow_error('Error! al ejecutar');\n \t\t}\n \t}\n\n redirect(base_url() . 'Direcciones/Externos/RecepcionDir/');\n }", "function listar_tipo_software() {\n\t\t$query = \"SELECT software_tipo.*\n\t\tFROM software_tipo\n\t\tORDER BY tipo_software asc\";\n\n $connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\t\t\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\t\n\t\t$numrows = mysql_num_rows($result);\n\t\tmysql_close($connection);\n\t\t// COMPROBAMOS QUE HAYA RESULTADOS\n\t\t// SI EL NUMERO DE RESULTADOS ES 0 SIGNIFICA QUE NO HAY REGISTROS CON ESOS DATOS\n\t\tif ($numrows == 0) {\n\t\t\treturn $result;\n\t\t}\n\t\telse {\n\t\t\treturn $result;\n\t\t}\n\t}", "function consultarProyectos() {\n $cadena_sql = $this->sql->cadena_sql(\"consultaProyectos\",\"\");\n return $resultadoProyectos = $this->ejecutarSQL($this->configuracion, $this->accesoOracle, $cadena_sql, \"busqueda\");\n }", "public function getEmvModulesVersionStatus()\n {\n $namespacePath = mage::getBaseDir('base') . DS . 'app' . DS . 'code'\n . DS . self::BASE_CODE_POOL . DS . self::BASE_EXTENSION_DIR . DS;\n\n $message = '';\n $namespaceDir = @opendir($namespacePath);\n $moduleVersion = array();\n while ($subModule = readdir($namespaceDir)) {\n if ($this->_directoryIsValid($subModule)) {\n //parse modules within namespace\n $modulePath = $namespacePath . $subModule . DS;\n if (is_dir($modulePath)) {\n $configXmlPath = $modulePath . 'etc/config.xml';\n if (file_exists($configXmlPath)) {\n $config = new Varien_Simplexml_Config();\n $config->loadFile($configXmlPath);\n $path = $config->getNode('modules');\n foreach ($path->asArray() as $subModuleName => $version) {\n $moduleVersion[] = $subModuleName . ' : ' . $version['version'];\n }\n }\n }\n }\n }\n closedir($namespaceDir);\n\n $message = Mage::helper('emvcore')->__(\n '<span class=\"icon-status\">%s</span> List of installed modules <strong>%s</strong>.',\n $this->_getWarningTickImageLink(),\n implode(', ', $moduleVersion)\n );\n\n return $message;\n }", "function installCheck() {\n // Check if user table exists for check.\n $result = $this->db->exec('SELECT name FROM sqlite_master WHERE type=\"table\" AND name=\"users\"');\n if (empty($result)) {\n $this->installSetupForm();\n } else {\n echo 'The site has already been installed.';\n }\n }", "function consultarNotasDefinitivas() {\r\n \r\n $cadena_sql = $this->sql->cadena_sql(\"consultarEspaciosCursados\", $this->datosEstudiante['CODIGO']);\r\n $resultado = $this->ejecutarSQL($this->configuracion, $this->accesoOracle, $cadena_sql, \"busqueda\"); \r\n \r\n return $resultado;\r\n \r\n }", "public function availableAction()\n {\n $modules = array();\n //$modulesInstalled = $this->installedModules();\n $iterator = new \\DirectoryIterator(Pi::path('module'));\n foreach ($iterator as $fileinfo) {\n if (!$fileinfo->isDir() || $fileinfo->isDot()) {\n continue;\n }\n $directory = $fileinfo->getFilename();\n if (preg_match('/[^a-z0-9_]/i', $directory)) {\n continue;\n }\n $meta = Pi::service('module')->loadMeta($directory, 'meta');\n if (empty($meta)) {\n continue;\n }\n $author = Pi::service('module')->loadMeta($directory, 'author');\n //$clonable = isset($meta['clonable']) ? $meta['clonable'] : false;\n //$meta['installed'] = in_array($directory, $modulesInstalled);\n $meta['installed'] = Pi::registry('module')\n ->read($directory) ? true : false;\n if (empty($meta['clonable']) && $meta['installed']) {\n continue;\n }\n $meta['logo'] = !empty($meta['logo'])\n ? Pi::url('script/browse.php') . '?'\n . sprintf('module/%s/asset/%s', $directory, $meta['logo'])\n : Pi::url('static/image/module.png');\n $modules[$directory] = array(\n 'meta' => $meta,\n 'author' => $author,\n );\n }\n\n $this->view()->assign('modules', $modules);\n $this->view()->assign('title', __('Modules ready for installation'));\n }", "private function getSystemStatus() {\n $data = array();\n\n $profile = drupal_get_profile();\n if ($profile != 'standard') {\n $info = system_get_info('module', $profile);\n $data['install_profile'] = array(\n 'title' => 'Install profile',\n 'value' => sprintf('%s (%s-%s)', $info['name'], $profile, $info['version']),\n );\n }\n $data['php'] = array(\n 'title' => 'PHP',\n 'value' => phpversion(),\n );\n $conf_dir = TRUE;\n $settings = TRUE;\n $dir = DrupalKernel::findSitePath(\\Drupal::request(), TRUE);\n if (is_writable($dir) || is_writable($dir . '/settings.php')) {\n $value = 'Not protected';\n if (is_writable($dir)) {\n $conf_dir = FALSE;\n }\n elseif (is_writable($dir . '/settings.php')) {\n $settings = FALSE;\n }\n }\n else {\n $value = 'Protected';\n }\n $data['settings.php'] = array(\n 'title' => 'Configuration file',\n 'value' => $value,\n 'conf_dir' => $conf_dir,\n 'settings' => $settings,\n );\n $cron_last = \\Drupal::state()->get('system.cron_last');\n if (!is_numeric($cron_last)) {\n $cron_last = \\Drupal::state()->get('install_time', 0);\n }\n $data['cron'] = array(\n 'title' => 'Cron maintenance tasks',\n 'value' => sprintf('Last run %s ago', \\Drupal::service('date.formatter')->formatInterval(REQUEST_TIME - $cron_last)),\n 'cron_last' => $cron_last,\n );\n if (!empty(Settings::get('update_free_access'))) {\n $data['update access'] = array(\n 'value' => 'Not protected',\n 'protected' => FALSE,\n );\n }\n else {\n $data['update access'] = array(\n 'value' => 'Protected',\n 'protected' => TRUE,\n );\n }\n $data['update access']['title'] = 'Access to update.php';\n if (!\\Drupal::moduleHandler()->moduleExists('update')) {\n $data['update status'] = array(\n 'value' => 'Not enabled',\n );\n }\n else {\n $data['update status'] = array(\n 'value' => 'Enabled',\n );\n }\n $data['update status']['title'] = 'Update notifications';\n return $data;\n }", "public function get_modules( $status = 'all' );", "function drush_pm_updatestatus() {\n // We don't provide for other options here, so we supply an explicit path.\n drush_include_engine('update_info', 'drupal', NULL, DRUSH_BASE_PATH . '/commands/pm/update_info');\n\n // Get specific requests.\n $requests = pm_parse_arguments(func_get_args(), FALSE);\n\n // Get installed extensions and projects.\n $extensions = drush_get_extensions();\n $projects = drush_get_projects($extensions);\n\n // Parse out project name and version.\n $requests = pm_parse_project_version($requests, $projects);\n\n $update_info = _pm_get_update_info($projects);\n\n foreach ($extensions as $name => $extension) {\n // Add an item to $update_info for each enabled extension which was obtained\n // from cvs or git and its project is unknown (because of cvs_deploy or\n // git_deploy is not enabled).\n if (!isset($extension->info['project'])) {\n if ((isset($extension->vcs)) && ($extension->status)) {\n $update_info[$name] = array(\n 'name' => $name,\n 'label' => $extension->label,\n 'existing_version' => 'Unknown',\n 'status' => DRUSH_PM_REQUESTED_PROJECT_NOT_PACKAGED,\n 'status_msg' => dt('Project was not packaged by drupal.org but obtained from !vcs. You need to enable !vcs_deploy module', array('!vcs' => $extension->vcs)),\n );\n // The user may have requested to update a project matching this\n // extension. If it was by coincidence or error we don't mind as we've\n // already added an item to $update_info. Just clean up $requests.\n if (isset($requests[$name])) {\n unset($requests[$name]);\n }\n }\n }\n // Additionally if the extension name is distinct to the project name and\n // the user asked to update the extension, fix the request.\n elseif ((isset($requests[$name])) && ($extension->name != $extension->info['project'])) {\n $requests[$extension->info['project']] = $requests[$name];\n unset($requests[$name]);\n }\n }\n // If specific project updates were requested then remove releases for all\n // others.\n $requested = func_get_args();\n if (!empty($requested)) {\n foreach ($update_info as $name => $project) {\n if (!isset($requests[$name])) {\n unset($update_info[$name]);\n }\n }\n }\n // Add an item to $update_info for each request not present in $update_info.\n foreach ($requests as $name => $request) {\n if (!isset($update_info[$name])) {\n // Disabled projects.\n if ((isset($projects[$name])) && ($projects[$name]['status'] == 0)) {\n $update_info[$name] = array(\n 'name' => $name,\n 'label' => $projects[$name]['label'],\n 'existing_version' => $projects[$name]['version'],\n 'status' => DRUSH_PM_REQUESTED_PROJECT_NOT_UPDATEABLE,\n );\n unset($requests[$name]);\n }\n // At this point we are unable to find matching installed project.\n // It does not exist at all or it is misspelled,...\n else {\n $update_info[$name] = array(\n 'name' => $name,\n 'label' => $name,\n 'existing_version' => 'Unknown',\n 'status'=> DRUSH_PM_REQUESTED_PROJECT_NOT_FOUND,\n );\n }\n }\n }\n\n // If specific versions were requested, match the requested release.\n foreach ($requests as $name => $request) {\n if (!empty($request['version'])) {\n $release = pm_get_release($request, $update_info[$name]);\n if (!$release) {\n $update_info[$name]['status'] = DRUSH_PM_REQUESTED_VERSION_NOT_FOUND;\n }\n else if ($release['version'] == $update_info[$name]['existing_version']) {\n $update_info[$name]['status'] = DRUSH_PM_REQUESTED_CURRENT;\n }\n else {\n $update_info[$name]['status'] = DRUSH_PM_REQUESTED_UPDATE;\n }\n // Set the candidate version to the requested release.\n $update_info[$name]['candidate_version'] = $release['version'];\n }\n }\n // Process locks specified on the command line.\n $locked_list = drush_pm_update_lock($update_info, drush_get_option_list('lock'), drush_get_option_list('unlock'), drush_get_option('lock-message'));\n\n // Build project updatable messages, set candidate version and mark\n // 'updatable' in the project.\n foreach ($update_info as $key => $project) {\n switch($project['status']) {\n case DRUSH_PM_REQUESTED_UPDATE:\n $status = dt('Specified version available');\n $project['updateable'] = TRUE;\n break;\n case DRUSH_PM_REQUESTED_CURRENT:\n $status = dt('Specified version already installed');\n break;\n case DRUSH_PM_REQUESTED_PROJECT_NOT_PACKAGED:\n $status = $project['status_msg'];\n break;\n case DRUSH_PM_REQUESTED_VERSION_NOT_FOUND:\n $status = dt('Specified version not found');\n break;\n case DRUSH_PM_REQUESTED_PROJECT_NOT_FOUND:\n $status = dt('Specified project not found');\n break;\n case DRUSH_PM_REQUESTED_PROJECT_NOT_UPDATEABLE:\n $status = dt('Project has no enabled extensions and can\\'t be updated');\n break;\n default:\n // This can set $project['updateable'] and $project['candidate_version']\n $status = pm_update_filter($project);\n break;\n }\n\n if (isset($project['locked'])) {\n $status = $project['locked'] . \" ($status)\";\n }\n // Persist candidate_version in $update_info (plural).\n if (empty($project['candidate_version'])) {\n $update_info[$key]['candidate_version'] = $project['existing_version']; // Default to no change\n }\n else {\n $update_info[$key]['candidate_version'] = $project['candidate_version'];\n }\n $update_info[$key]['status_msg'] = $status;\n if (isset($project['updateable'])) {\n $update_info[$key]['updateable'] = $project['updateable'];\n }\n }\n\n // Only list projects that have updates available. Use pm-list if you want more info.\n $updateable = pm_project_filter($update_info, drush_get_option('security-only'));\n return $updateable;\n}", "static public function mdlMostrarComprasExternasIndicador($tabla){\r\n\t\t$stmt = Conexion::conectar()->prepare(\"SELECT count(tipoCompra) as comprasExternas from $tabla where tipoCompra = 1 && sinAdquisicion = 1\");\r\n\r\n\t\t$stmt -> execute();\r\n\r\n\t\treturn $stmt -> fetch();\r\n\r\n\t\t$stmt -> close();\r\n\r\n\t\t$stmt = null;\r\n\t}", "function ultimas_fichas_software() {\n\t\n\t\t$query = \"SELECT COUNT(1) FROM software\";\n\n\t\t$connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\t\n\t\t$rows = mysql_fetch_array($result);\n\t\tmysql_close($connection);\n\t\treturn $rows[0];\n\t}", "public function listarAdmin()\n {\n $sql = \"SELECT US.nombre,CO.problema,CO.tipo_problema,CO.solucion, CO.modo_contacto, CO.tipo_estado \n FROM usuarios US JOIN consulta CO\n ON US.idusuarios = CO.idusuario\n WHERE CO.tipo_estado = 'Ejecutado'\";\n return ejecutarConsulta($sql);\n\n }", "public function listarActivos(){\n\t\t$sql = \"SELECT * FROM producto\n\t\t\t\tWHERE prod_estado = 1\";\n\n\t\treturn ejecutarConsulta($sql);\n\t}", "public function getUpdateInfo($mbooth_xml, $status = 1){\n\t\t$result = array();\n\n\t\t$current_version = $this->getVersion($mbooth_xml);\n\t\t$customer_url = HTTP_SERVER;\n\t\t$query = $this->db->query(\"SELECT * FROM `\" . DB_PREFIX . \"language` WHERE language_id = \" . (int)$this->config->get('config_language_id') ); \n\t\t$language_code = $query->row['code'];\n\t\t$ip = $this->request->server['REMOTE_ADDR'];\n\n\t\t$request = 'http://opencart.dreamvention.com/api/1/index.php?route=extension/check&mbooth=' . $mbooth_xml . '&store_url=' . $customer_url . '&module_version=' . $current_version . '&language_code=' . $language_code . '&opencart_version=' . VERSION . '&ip='.$ip . '&status=' .$status;\n\n\t\t$curl = curl_init();\n\t\tcurl_setopt($curl, CURLOPT_URL, $request);\n\t\tcurl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n\t\t$result['data'] = curl_exec($curl);\n\t\t$result['code'] = curl_getinfo($curl, CURLINFO_HTTP_CODE);\n\t\tcurl_close($curl);\n\n\t\treturn $result;\n\t}", "function show_tools()\n{\n\tglobal $ns,$tp;\n\t\n\tif(is_readable(e_ADMIN.\"ver.php\"))\n\t{\n\t\tinclude(e_ADMIN.\"ver.php\");\n\t\tlist($ver, $tmp) = explode(\" \", $e107info['e107_version']);\n\t}\n\t\t\n\t$lans = getLanList();\n\t\n\t$release_diz = defined(\"LANG_LAN_30\") ? LANG_LAN_30 : \"Release Date\";\n\t$compat_diz = defined(\"LANG_LAN_31\") ? LANG_LAN_31 : \"Compatibility\";\n\t$lan_pleasewait = (defsettrue('LAN_PLEASEWAIT')) ? $tp->toJS(LAN_PLEASEWAIT) : \"Please Wait\";\n\t$lan_displayerrors = (defsettrue('LANG_LAN_33')) ? LANG_LAN_33 : \"Display only errors during verification\";\n\t\n\t\n\t$text = \"<form id='lancheck' method='post' action='\".e_SELF.\"?tools'>\n\t\t\t<table class='fborder' style='\".ADMIN_WIDTH.\"'>\";\n\t$text .= \"\n\t\t<tr>\n\t\t<td class='fcaption'>\".ADLAN_132.\"</td>\n\t\t<td class='fcaption'>\".$release_diz.\"</td>\t\t\n\t\t<td class='fcaption'>\".$compat_diz.\"</td>\n\t\t<td class='fcaption' style='text-align:center'>\".ADLAN_134.\"</td>\n\t\t<td class='fcaption' style='text-align:center;width:25%;white-space:nowrap'>\".LAN_OPTIONS.\"</td>\n\t\t</tr>\n\t\t\";\n\t\n\trequire_once(e_HANDLER.\"xml_class.php\");\n\t$xm = new XMLParse();\n\t\n\tforeach($lans as $language)\n\t{\n\t\tif($language == \"English\")\n\t\t{\n\t\t\tcontinue;\n\t\t}\n\t\t$metaFile = e_LANGUAGEDIR.$language.\"/\".$language.\".xml\";\n\t\t\n\t\tif(is_readable($metaFile))\n\t\t{\n\t\t\t$rawData = file_get_contents($metaFile);\n\t\t\tif($rawData)\n\t\t\t{\n\t\t\t\t$array = $xm->parse($rawData);\n\t\t\t\t$value = $array['e107Language']['attributes'];\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$value = array(\n\t\t\t\t'date' \t\t\t=> \"&nbsp;\",\n\t\t\t\t'compatibility' => '&nbsp;'\n\t\t\t);\t\t\n\t\t\t}\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$value = array(\n\t\t\t\t'date' \t\t\t=> \"&nbsp;\",\n\t\t\t\t'compatibility' => '&nbsp;'\n\t\t\t);\t\n\t\t}\n\t\t\n\t\t$errFound = (isset($_SESSION['lancheck'][$language]['total']) && $_SESSION['lancheck'][$language]['total'] > 0) ? TRUE : FALSE;\n\t\t\n\t\t\t\t\t\t\n\t\t$text .= \"<tr>\n\t\t\t<td class='forumheader3' >\".$language.\"</td>\n\t\t\t<td class='forumheader3' >\".$value['date'].\"</td>\n\t\t\t<td class='forumheader3' >\".$value['compatibility'].\"</td>\n\t\t\t<td class='forumheader3' style='text-align:center' >\".($ver != $value['compatibility'] || $errFound ? ADMIN_FALSE_ICON : ADMIN_TRUE_ICON ).\"</td>\n\t\t\t<td class='forumheader3' style='text-align:center'><input type='submit' name='language_sel[{$language}]' value=\\\"\".LAN_CHECK_2.\"\\\" class='button' />\n\t\t\t<input type='submit' name='ziplang[{$language}]' value=\\\"\".LANG_LAN_23.\"\\\" class='button' onclick=\\\"this.value = '\".$lan_pleasewait.\"'\\\" /></td>\t\n\t\t\t</tr>\";\n\t\t}\n\t\t\n\t\t$srch = array(\"[\",\"]\");\n\t\t$repl = array(\"<a rel='external' href='http://e107.org/content/About-Us:The-Team#translation-team'>\",\"</a>\");\n\t\t$diz = (defsettrue(\"LANG_LAN_28\")) ? LANG_LAN_28 : \"Check this box if you're an [e107 certified translator].\";\n\t\n\t\t$checked = varset($_COOKIE['e107_certified']) == 1 ? \"checked='checked'\" : \"\";\n\t\t$text .= \"<tr><td class='forumheader' colspan='4' style='text-align:center'>\n\t\t <input type='checkbox' name='contribute_pack' value='1' {$checked} />\".str_replace($srch,$repl,$diz);\n\t\t\n\t\t$echecked = varset($_SESSION['lancheck-errors-only']) == 1 ? \"checked='checked'\" : \"\";\t\t\n\t\t$text .= \"</td>\n\t\t<td class='forumheader' style='text-align:center'>\n\t\t<input type='checkbox' name='errorsonly' value='1' {$echecked} /> \".$lan_displayerrors.\" </td>\n\t\t\n\t\t</tr></table>\";\n\t\t\n\t\t\n\t\t$text .= \"</form>\";\n\t\n\t$text .= \"<div class='smalltext' style='padding-top:50px;text-align:center'>\".LANG_LAN_AGR.\"</div>\";\t\n\t$ns->tablerender(LANG_LAN_32, $text);\t\t\n\treturn;\n\t\t\n}", "public function VerificaVentas()\n{\n\tself::SetNames();\n\t$sql = \" select ivav, simbolo from configuracion\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute();\n\t\t$num = $stmt->rowCount();\n\t\tif($num == 0)\n\t\t{\n\t\t\t$ivav = \"0.00\";\n\t $simbolo = \"\";\n\t\t}\n\t\telse\n\t\t{\n\n\t$con = \"select ivav, simbolo from configuracion\";\n\tforeach ($this->dbh->query($con) as $rowcon)\n\t{\n\t\t$this->pcon[] = $rowcon;\n\t}\n\t$ivav = $rowcon['ivav'];\n\t$simbolo = $rowcon['simbolo'];\n\n$sql = \" SELECT clientes.codcliente, clientes.cedcliente, clientes.nomcliente, clientes.tlfcliente, clientes.direccliente, clientes.emailcliente, ventas.codventa, ventas.codcaja, ventas.codcliente as cliente, ventas.subtotalivasive, ventas.subtotalivanove, ventas.ivave, ventas.totalivave, ventas.descuentove, ventas.totaldescuentove, ventas.totalpago, ventas.totalpago2, ventas.codigo, ventas.observaciones, detalleventas.coddetalleventa, detalleventas.codproducto, detalleventas.producto, detalleventas.cantventa, detalleventas.ivaproducto, detalleventas.importe, salas.nombresala, mesas.codmesa, mesas.nombremesa, usuarios.nombres FROM mesas INNER JOIN ventas ON mesas.codmesa = ventas.codmesa INNER JOIN detalleventas ON detalleventas.codventa = ventas.codventa LEFT JOIN clientes ON ventas.codcliente = clientes.codcliente INNER JOIN salas ON salas.codsala = mesas.codsala LEFT JOIN usuarios ON ventas.codigo = usuarios.codigo WHERE mesas.codmesa = ? and mesas.statusmesa = '1' AND detalleventas.statusdetalle = '1'\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute( array(base64_decode($_GET[\"codmesa\"])) );\n\t\t$num = $stmt->rowCount();\n\t\tif($num==0)\n\t\t{\n\t\t\t?>\n\t\t\t\n\n<div class=\"col-sm-8\">\n <div class=\"panel panel-primary\">\n <div class=\"panel-heading\">\n <h3 class=\"panel-title\"><i class=\"fa fa-cutlery\"></i> Detalles de Productos</h3>\n </div>\n <div class=\"panel-body\">\n <div class=\"row\">\n <div class=\"col-sm-12 col-xs-12\">\n <div class=\"box-body\">\n\n\n<div id=\"favoritos\"><?php\n $favoritos = new Login();\n $favoritos = $favoritos->ListarProductosFavoritos();\n $x=1;\n\necho $status = ( $favoritos[0][\"codproducto\"] == '' ? '' : '<label class=\"control-label\"><h4>Productos Favoritos: </h4></label><br>');\n\nif($favoritos==\"\"){\n\n echo \"\"; \n\n} else {\n\n for($i=0;$i<sizeof($favoritos);$i++){ \n ?>\n\n<button type=\"button\" class=\"button ng-scope\" \nstyle=\"font-size:8px;border-radius:5px;width:69px; height:50px;cursor:pointer;\"\n\nert-add-pending-addition=\"\" ng-click=\"afterClick()\" ng-repeat=\"product in ::getFavouriteProducts()\" OnClick=\"DoAction('<?php echo $favoritos[$i]['codproducto']; ?>','<?php echo $favoritos[$i]['producto']; ?>','<?php echo $favoritos[$i]['codcategoria']; ?>','<?php echo $precioconiva = ( $favoritos[$i]['ivaproducto'] == 'SI' ? $favoritos[$i]['preciocompra'] : \"0.00\"); ?>','<?php echo $favoritos[$i]['preciocompra']; ?>','<?php echo $favoritos[$i]['precioventa']; ?>','<?php echo $favoritos[$i]['ivaproducto']; ?>','<?php echo $favoritos[$i]['existencia']; ?>');\" title=\"<?php echo $favoritos[$i]['producto'];?>\">\n\n<?php if (file_exists(\"./fotos/\".$favoritos[$i][\"codproducto\"].\".jpg\")){\n\necho \"<img src='./fotos/\".$favoritos[$i]['codproducto'].\".jpg?' alt='x' style='border-radius:4px;width:40px;height:35px;'>\"; \n}else{\necho \"<img src='./fotos/producto.png' alt='x' style='border-radius:4px;width:40px;height:35px;'>\"; \n} ?>\n\n<span class=\"product-label ng-binding \"><?php echo getSubString($favoritos[$i]['producto'], 8);?></span>\n</button>\n\n <?php if($x==8){ echo \"<div class='clearfix'></div>\"; $x=0; } $x++; } }\n\n echo $status = ( $favoritos[0][\"codproducto\"] == '' ? '' : '<hr>');?></div>\n\n\n<div class=\"row\"> \n\t\t\t\t<div class=\"col-md-12\"> \n\t\t\t\t\t<div class=\"form-group has-feedback\"> \n<label class=\"control-label\">B&uacute;squeda de Productos:<span class=\"symbol required\"></span></label>\n<input class=\"form-control\" type=\"text\" name=\"busquedaproducto\" id=\"busquedaproducto\" onKeyUp=\"this.value=this.value.toUpperCase();\" autocomplete=\"off\" placeholder=\"Realice la B&uacute;squeda de Producto\">\n\t\t\t\t\t<i class=\"fa fa-search form-control-feedback\"></i> \n\t\t\t\t\t</div> \n\t\t\t\t</div>\n\t\t\t</div>\n\n<input type=\"hidden\" name=\"codproducto\" id=\"codproducto\" placeholder=\"Codigo\">\n<input type=\"hidden\" name=\"codcategoria\" id=\"codcategoria\" placeholder=\"Categoria\">\n<input type=\"hidden\" name=\"precioconiva\" id=\"precioconiva\" placeholder=\"Precio con Iva\">\n<input type=\"hidden\" name=\"precio\" id=\"precio\" placeholder=\"Precio de Compra\">\n<input type=\"hidden\" name=\"precio2\" id=\"precio2\" placeholder=\"Precio de Venta\">\n<input type=\"hidden\" name=\"ivaproducto\" id=\"ivaproducto\" placeholder=\"Iva Producto\">\n<input type=\"hidden\" name=\"existencia\" id=\"existencia\" placeholder=\"Existencia\">\n<input type=\"hidden\" name=\"cantidad\" id=\"cantidad\" value=\"1\" placeholder=\"Cantidad\">\n\n\t\t\t\t<div class=\"row\"> \n\t\t\t\t\t<div class=\"col-md-12\"> \n\t\t\t\t\t\t<div class=\"table-responsive\" data-pattern=\"priority-columns\">\n\t\t\t\t\t\t\t<table id=\"carrito\" class=\"table table-small-font table-striped\">\n\t\t\t\t\t\t\t\t<thead>\n<tr style=\"background:#f0ad4e;\">\n<th style=\"color:#FFFFFF;\"><h3 class=\"panel-title\"><div align=\"center\">Cantidad</div></h3></th>\n<th style=\"color:#FFFFFF;\"><h3 class=\"panel-title\"><div align=\"center\">Descripci&oacute;n de Producto</div></h3></th>\n<th style=\"color:#FFFFFF;\"><h3 class=\"panel-title\"><div align=\"center\">Precio</div></h3></th>\n<th style=\"color:#FFFFFF;\"><h3 class=\"panel-title\"><div align=\"center\">Acci&oacute;n</div></h3></th>\n</tr>\n </thead>\n\t\t\t\t\t\t\t\t<tbody>\n\t\t\t\t\t\t\t\t\t<tr>\n<td colspan=4><center><label><h5>NO HAY PRODUCTOS AGREGADOS</h5></label></center></td>\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t</tbody>\n\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t\t<table width=\"250\" id=\"carritototal\">\n\t\t\t\t\t\t\t\t<tr>\n<td colspan=3><span class=\"Estilo9\"><label>Total a Confirmar:</label></span></td>\n<td><div align=\"right\" class=\"Estilo9\"><?php echo \"<strong>\".$simbolo.\"</strong>\"; ?><label id=\"lbltotal\" name=\"lbltotal\">0.00</label>\n<input type=\"hidden\" name=\"txtsubtotal\" id=\"txtsubtotal\" value=\"0.00\"/>\n<input type=\"hidden\" name=\"txtsubtotal2\" id=\"txtsubtotal2\" value=\"0.00\"/>\n<input type=\"hidden\" name=\"iva\" id=\"iva\" value=\"<?php echo $ivav ?>\"/>\n<input type=\"hidden\" name=\"txtIva\" id=\"txtIva\" value=\"0.00\"/>\n<input type=\"hidden\" name=\"txtDescuento\" id=\"txtDescuento\" value=\"0.00\"/>\n<input type=\"hidden\" name=\"txtTotal\" id=\"txtTotal\" value=\"0.00\"/>\n<input type=\"hidden\" name=\"txtTotall\" id=\"txtTotall\" value=\"0.00\"/>\n<input type=\"hidden\" name=\"txtTotalCompra\" id=\"txtTotalCompra\" value=\"0.00\"/></div></td>\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\n<hr>\n\n<div class=\"row\">\n <div class=\"col-md-12\"> \n <label id=\"boton\" onClick=\"mostrar();\" style=\"cursor: pointer;\">Agregar Observaciones: </label>\n<div id=\"observaciones\" style=\"display: none;\">\n <div class=\"form-group has-feedback\"> \n<textarea name=\"observaciones\" class=\"form-control\" id=\"observaciones\" onKeyUp=\"this.value=this.value.toUpperCase();\" autocomplete=\"off\" placeholder=\"Ingrese Observaciones\" required=\"\" aria-required=\"true\"></textarea>\n\n <i class=\"fa fa-comments form-control-feedback\"></i>\n </div>\n</div> \n </div> \n </div><br>\n\n\t\t\t\t\t<div class=\"modal-footer\"> \n<button type=\"submit\" name=\"btn-venta\" id=\"btn-venta\" class=\"btn btn-primary\"><span class=\"fa fa-save\"></span> Confirmar Pedido</button> \n<button type=\"button\" id=\"vaciarv\" class=\"btn btn-danger\" title=\"Vaciar Carrito\"><span class=\"fa fa-trash-o\"></span> Limpiar</button> \n\t\t\t\t\t</div>\n\n\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n\n\n <div class=\"col-sm-4\">\n <div class=\"panel panel-primary\">\n <div class=\"panel-heading\">\n <h3 class=\"panel-title\"><i class=\"fa fa-file-pdf-o\"></i> Detalles de Factura</h3>\n </div>\n <div class=\"panel-body\">\n <div class=\"row\">\n <div class=\"col-sm-12 col-xs-12\">\n <div class=\"box-body\">\n\n<?php\n$mesa = new Login();\n$mesa = $mesa->MesasPorId();\n?>\n\n<div class=\"row\"> \n\t\t\t\t<div class=\"col-md-12\"> \n\t\t\t\t\t<div class=\"form-group has-feedback\"> \n<strong style=\"color:#990000; font-size:17px;\"><?php echo $mesa[0]['nombresala']; ?></strong><br> \n<strong style=\"color:#990000; font-size:17px;\"><?php echo $mesa[0]['nombremesa']; ?></strong>\n<input type=\"hidden\" name=\"codmesa\" id=\"codmesa\" value=\"<?php echo $mesa[0]['codmesa'] ?>\">\n<input type=\"hidden\" name=\"nombremesa\" id=\"nombremesa\" value=\"<?php echo $mesa[0]['nombremesa'] ?>\">\n<input type=\"hidden\" name=\"delivery\" id=\"delivery\" value=\"0\">\n<input type=\"hidden\" name=\"repartidor\" id=\"repartidor\" value=\"0\">\n<input type=\"hidden\" name=\"cliente\" id=\"cliente\" value=\"\">\n<input type=\"hidden\" name=\"tipo\" id=\"tipo\" value=\"0\">\n\t\t\t\t\t</div> \n\t\t\t\t</div>\n\t\t\t</div>\n\n<div class=\"row\"> \n\t<div class=\"col-md-12\"> \n\t\t<div class=\"form-group has-feedback\"> \n<label for=\"field-6\" class=\"control-label\">B&uacute;squeda de Cliente: <span class=\"symbol required\"></span></label>\n\t\t\t<div class=\"input-group\">\n\t<input type=\"text\" id=\"busquedacliente\" name=\"busquedacliente\" class=\"form-control\" placeholder=\"B&uacute;squeda del Cliente\">\n <span class=\"input-group-btn\">\n <button type=\"button\" class=\"btn waves-effect waves-light btn-primary\" data-toggle=\"modal\" data-target=\"#myModal\" data-backdrop=\"static\" data-keyboard=\"false\"><i class=\"fa fa-user-plus\"></i></button></span>\n </div>\n\t\t</div>\n\t</div>\n</div>\n\n<div class=\"row\"> \n\t<div class=\"col-md-12\"> \n\t\t<div class=\"form-group has-feedback\"> \n\t\t\t<label class=\"control-label\">Mesero: <span class=\"symbol required\"></span></label><br>\n\t\t\t<?php echo $_SESSION[\"nombres\"] ?> \n\t\t</div> \n\t</div>\n</div>\n\n<input type=\"hidden\" name=\"descuento\" id=\"descuento\" value=\"0.00\">\n\n <div class=\"modal-footer\"> \n<button type=\"button\" id=\"mostrar-mesa\" class=\"btn btn-warning\"><span class=\"fa fa-cutlery\"></span> Mostrar Mesas</button> \n\t\t\t\t\t</div>\n\n\t\t\t\t\t </div>\n <!-- /.box-body -->\n </div>\n </div>\n </div>\n </div>\n </div>\n\n\t\t\t\t\t<?php \n\t\t\t\t\texit;\n\t\t\t\t} else {\n\t\twhile($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t{\n\t\t\t$this->p[]=$row;\n\t\t}\n\t\treturn $this->p;\n\t\t$this->dbh=null;\n\t }\n\t}\n}", "function verifyStatusEx($id_user, $id_ex){\n $db = connect_start();\n if($_SESSION[\"status\"] == \"student\"){\n $request = $db->prepare(\"SELECT * FROM return_exo WHERE id_user = '$id_user' AND progress_exo LIKE 'en_class'\");\n $request->execute();\n $result = $request->fetchAll();\n if(empty($result)){\n pasLuEnclass($id_user, $id_ex);\n }\n } \n }", "function consultarNotas(){ \n $cadena_sql=$this->cadena_sql(\"notas\",$this->codProyecto);\n $estudiantes=$this->funcionGeneral->ejecutarSQL($this->configuracion, $this->accesoOracle, $cadena_sql,\"busqueda\" );\n return $estudiantes;\n }", "function install() {\n // output structure\n $status = [];\n\n // get configuration\n $config = $this->getModules();\n\n // TODO: check modules integrity\n\n // install missing modules\n $modules = [ 'env', 'users', 'pages' ];\n\n foreach ($modules as $module) {\n $itemStatus = $this->installModule($module);\n print_r($itemStatus);\n array_push($status, $itemStatus);\n }\n\n return $status;\n }", "function consultarenviodetalles (){\n\t\t$x = $this->pdo->prepare('SELECT * FROM enviodetalles');\n\t\t$x->execute();\n\t\treturn $x->fetchALL(PDO::FETCH_OBJ);\n\t}", "function listar_ejemplos_uso() {\n\t\n\t\t$query = \"SELECT *\n\t\tFROM ejemplos_uso\n\t\tWHERE estado = 1\n\t\tORDER BY id_eu desc\";\n\n $connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\t\t\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\tmysql_close($connection);\n\t\treturn $result;\n\t\n\t\n\t}", "function view_mods()\n\t{\n\t\t//-----------------------------------------\n\t\t// Page Info\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->ipsclass->admin->page_title = \"(FSY23) Universal Mod Installer: Manage Mod Installations\";\n\t\t$this->ipsclass->admin->page_detail = \"Install, upgrade, and uninstall all compatible mods\";\n\t\t$this->ipsclass->admin->nav[] = array( '', 'Manage Mod Installations' );\n\t\t\n\t\t//-----------------------------------------\n\t\t// Instantiate some arrays\n\t\t//-----------------------------------------\n\t\t\n\t\t$installable_mods = array();\n\t\t$installed_names = array();\n\t\t$installed_info = array();\n\t\t\n\t\t//-----------------------------------------\n\t\t// Page jump stuff\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( $this->ipsclass->input['st'] > 0 )\n\t\t{\n\t\t\t$first = intval( $this->ipsclass->input['st'] );\n\t\t}\n\t\t\n\t\t$this->ipsclass->vars['umi_mods_perpage'] = ( $this->ipsclass->vars['umi_mods_perpage'] ) ? $this->ipsclass->vars['umi_mods_perpage'] : 10;\n\t\t\n\t\t//-----------------------------------------\n\t\t// Does PHP have CURL available?\n\t\t//-----------------------------------------\n\t\t\n\t\t$can_curl = function_exists( 'curl_init' );\n\t\t\n\t\t//-----------------------------------------\n\t\t// Make sure we have a mod_install directory\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( !file_exists( ROOT_PATH.\"mod_install/\" ) )\n\t\t{\n\t\t\tif ( !@mkdir( ROOT_PATH.\"mod_install/\", 0755 ) )\n\t\t\t{\n\t\t\t\t$this->ipsclass->admin->error( \"You have no ./mod_install directory. Please create this directory using your FTP program, and ensure the CHMOD is set to 755.\" );\n\t\t\t}\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Look for any installer files\n\t\t//-----------------------------------------\n\t\t\n\t\t$path = ROOT_PATH.\"mod_install/\";\n\t\t$files = array();\n\t\t\n\t\tif ( $handle = opendir( $path ) )\n\t\t{\n\t\t\twhile ( false !== ( $file = readdir( $handle ) ) )\n\t\t\t{\n\t\t\t\t$ext = preg_replace( \"/^.*\\.(\\S+)$/\", \"\\\\1\", $file );\n\t\t\t\t\n\t\t\t\tif ( $ext == \"xml\" )\n\t\t\t\t{\n\t\t\t\t\t$files[] = $file;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tclosedir( $handle );\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Do we have any files to look at?\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( count( $files ) )\n\t\t{\n\t\t\tforeach ( $files as $k => $v )\n\t\t\t{\n\t\t\t\t$this->ipsclass->xml->xml_parse_document( file_get_contents( ROOT_PATH.\"mod_install/\".$v ) );\n\t\t\t\t\n\t\t\t\tif ( !is_array( $this->ipsclass->xml->xml_array['mod_data'] ) )\n\t\t\t\t{\n\t\t\t\t\t$this->ipsclass->admin->error( \"There was an error reading the XML file '$v' in your mod_install directory. Please correct the problem before continuing.\" );\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$themod = array();\n\t\t\t\t$temp = $this->ipsclass->xml->xml_array['mod_data']['mod_info'];\n\t\t\t\t\n\t\t\t\t$themod['title'] = $temp['title']['VALUE'];\n\t\t\t\t$themod['version'] = $temp['version']['VALUE'];\n\t\t\t\t$themod['author'] = $temp['author']['VALUE'];\n\t\t\t\t$themod['website'] = $temp['website']['VALUE'];\n\t\t\t\t$themod['file'] = str_replace( \".xml\", \"\", $v );\n\t\t\t\t$themod['ipbver'] = $temp['ipbver']['VALUE'];\n\t\t\t\t$themod['version_file'] = $temp['version_file']['VALUE'];\n\t\t\t\t\n\t\t\t\t$key = strtolower( $temp['title']['VALUE'] );\n\t\t\t\t$key = str_replace( \" \", \"_\", $key );\n\t\t\t\t\n\t\t\t\tif ( $themod['title'] != \"\" && in_array( $themod['ipbver'], array( '2.2', '2.3' ) ) )\n\t\t\t\t{\n\t\t\t\t\t$installable_mods[str_replace( '.', '', $themod['ipbver'])][ $key ] = $themod;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tforeach ( $installable_mods as $ver => $mods )\n\t\t\t{\n\t\t\t\tksort( $installable_mods[ $ver ] );\n\t\t\t}\n\t\t\t\n\t\t\t$new_mods = $installable_mods;\n\t\t\tunset( $installable_mods );\n\t\t\t$installable_mods = array();\n\t\t\t\n\t\t\tforeach ( $new_mods as $version => $itsmods )\n\t\t\t{\n\t\t\t\t$new_index = 0;\n\t\t\t\t\n\t\t\t\tforeach ( $itsmods as $key => $mod )\n\t\t\t\t{\n\t\t\t\t\t$installable_mods[ $version ][ $new_index++ ] = $mod;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Let's find what the latest mods are\n\t\t//-----------------------------------------\n\t\t\n\t\t$latest_mods = array();\n\t\t$latest_umi = 0;\n\t\t$link = base64_decode( \"aHR0cDovL3d3dy5pbnZpc2lvbm1vZGRpbmcuY29tL3VtaS9tb2RzLnhtbA==\" );\n\t\t$mod_files = array();\n\t\t$file_contents = \"\";\n\t\t\n\t\tif ( $this->ipsclass->vars['umi_do_callbacks'] )\n\t\t{\n\t\t\tif ( $can_curl )\n\t\t\t{\n\t\t\t\t$ch = curl_init();\n\t\t\t\t\n\t\t\t\tcurl_setopt( $ch, CURLOPT_URL, $link );\n\t\t\t\tcurl_setopt( $ch, CURLOPT_HEADER, 0 );\n\t\t\t\tcurl_setopt( $ch, CURLOPT_TIMEOUT, 3 );\n\t\t\t\t\n\t\t\t\tob_start();\n\t\t\t\t\n\t\t\t\tcurl_exec( $ch );\n\t\t\t\tcurl_close( $ch );\n\t\t\t\t$file_contents = ob_get_contents();\n\t\t\t\t\n\t\t\t\tob_end_clean();\n\t\t\t}\n\t\t\t\n\t\t\tif ( !$file_contents )\n\t\t\t{\n\t\t\t\t$handle = @fopen( $link, \"r\" );\n\t\t\t\t\t\n\t\t\t\tif ( $handle !== false )\n\t\t\t\t{\n\t\t\t\t\t@fclose( $handle );\n\t\t\t\t\t$file_contents = @file_get_contents( $link );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ( $file_contents )\n\t\t{\n\t\t\t$this->ipsclass->xml->xml_parse_document( $file_contents );\n\t\t\t\n\t\t\tif ( is_array( $this->ipsclass->xml->xml_array['mods']['ipb22']['mod'] ) )\n\t\t\t{\n\t\t\t\tforeach ( $this->ipsclass->xml->xml_array['mods']['ipb22']['mod'] as $k => $v )\n\t\t\t\t{\n\t\t\t\t\t$latest_mods[22][ $v['file']['VALUE'] ] = $v['version']['VALUE'];\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif ( is_array( $this->ipsclass->xml->xml_array['mods']['ipb23']['mod'] ) )\n\t\t\t{\n\t\t\t\tforeach ( $this->ipsclass->xml->xml_array['mods']['ipb23']['mod'] as $k => $v )\n\t\t\t\t{\n\t\t\t\t\t$latest_mods[23][ $v['file']['VALUE'] ] = $v['version']['VALUE'];\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$latest_umi = $this->ipsclass->xml->xml_array['mods']['umi']['VALUE'];\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Build the mods table\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->ipsclass->adskin->td_header[] = array( \"Mod Title\" , \"40%\" );\n\t\t$this->ipsclass->adskin->td_header[] = array( \"Version\" , \"10%\" );\n\t\t$this->ipsclass->adskin->td_header[] = array( \"Author\" , \"15%\" );\n\t\t$this->ipsclass->adskin->td_header[] = array( \"Installed?\" , \"10%\" );\n\t\t\n\t\tif ( $this->ipsclass->vars['umi_do_callbacks'] )\n\t\t{\n\t\t\t$this->ipsclass->adskin->td_header[] = array( \"Up To Date?\" , \"15%\" );\n\t\t}\n\t\t\n\t\t$this->ipsclass->adskin->td_header[] = array( \"Options\" , \"10%\" );\n\t\t\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->start_table( \"Available Modifications\" );\n\t\t\n\t\t//-----------------------------------------\n\t\t// What mods are we displaying?\n\t\t//-----------------------------------------\n\t\t\n\t\t$to_display = array();\n\t\t$i = 0;\n\t\t\n\t\tforeach ( $installable_mods as $a => $b )\n\t\t{\n\t\t\tforeach ( $b as $c => $d )\n\t\t\t{\n\t\t\t\t$to_display[ $i++ ] = $d;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Get the latest info for these mods\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( count( $to_display ) )\n\t\t{\n\t\t\tforeach ( $to_display as $idx => $mod )\n\t\t\t{\n\t\t\t\tif ( $idx < $first )\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ( $idx >= $first + $this->ipsclass->vars['umi_mods_perpage'] )\n\t\t\t\t{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ( $mod['version_file'] && !in_array( $mod['version_file'], $mod_files ) )\n\t\t\t\t{\n\t\t\t\t\t$mod_files[] = $mod['version_file'];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ( $this->ipsclass->vars['umi_do_callbacks'] && count( $mod_files ) )\n\t\t{\n\t\t\tforeach ( $mod_files as $mod_file )\n\t\t\t{\n\t\t\t\tif ( $can_curl )\n\t\t\t\t{\n\t\t\t\t\t$ch = curl_init();\n\t\t\t\t\t\n\t\t\t\t\tcurl_setopt( $ch, CURLOPT_URL, $mod_file );\n\t\t\t\t\tcurl_setopt( $ch, CURLOPT_HEADER, 0 );\n\t\t\t\t\tcurl_setopt( $ch, CURLOPT_TIMEOUT, 3 );\n\t\t\t\t\t\n\t\t\t\t\tob_start();\n\t\t\t\t\t\n\t\t\t\t\tcurl_exec( $ch );\n\t\t\t\t\tcurl_close( $ch );\n\t\t\t\t\t$version_contents = ob_get_contents();\n\t\t\t\t\t\n\t\t\t\t\tob_end_clean();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ( !$version_contents )\n\t\t\t\t{\n\t\t\t\t\t$handle = @fopen( $mod_file, \"r\" );\n\t\t\t\t\t\n\t\t\t\t\tif ( $handle !== false )\n\t\t\t\t\t{\n\t\t\t\t\t\t@fclose( $handle );\n\t\t\t\t\t\t$version_contents = @file_get_contents( $mod_file );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ( $version_contents )\n\t\t\t\t{\n\t\t\t\t\t$this->ipsclass->xml->xml_parse_document( $version_contents );\n\t\t\t\t\t\n\t\t\t\t\tif ( !is_array( $this->ipsclass->xml->xml_array['mods']['ipb22']['mod'][0] ) )\n\t\t\t\t\t{\n\t\t\t\t\t\t$tmp = $this->ipsclass->xml->xml_array['mods']['ipb22']['mod'];\n\t\t\t\t\t\tunset( $this->ipsclass->xml->xml_array['mods']['ipb22']['mod'] );\n\t\t\t\t\t\t$this->ipsclass->xml->xml_array['mods']['ipb22']['mod'][0] = $tmp;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif ( !is_array( $this->ipsclass->xml->xml_array['mods']['ipb23']['mod'][0] ) )\n\t\t\t\t\t{\n\t\t\t\t\t\t$tmp = $this->ipsclass->xml->xml_array['mods']['ipb23']['mod'];\n\t\t\t\t\t\tunset( $this->ipsclass->xml->xml_array['mods']['ipb23']['mod'] );\n\t\t\t\t\t\t$this->ipsclass->xml->xml_array['mods']['ipb23']['mod'][0] = $tmp;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tforeach ( $this->ipsclass->xml->xml_array['mods']['ipb22']['mod'] as $kk => $vv )\n\t\t\t\t\t{\n\t\t\t\t\t\tif ( !in_array( $vv['file']['VALUE'], array_keys( $latest_mods ) ) )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$latest_mods[22][ $vv['file']['VALUE'] ] = $vv['version']['VALUE'];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tforeach ( $this->ipsclass->xml->xml_array['mods']['ipb23']['mod'] as $kk => $vv )\n\t\t\t\t\t{\n\t\t\t\t\t\tif ( !in_array( $vv['file']['VALUE'], array_keys( $latest_mods ) ) )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$latest_mods[23][ $vv['file']['VALUE'] ] = $vv['version']['VALUE'];\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//-----------------------------------------\n\t\t// What mods do we have installed?\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->ipsclass->DB->build_query( array( 'select' => '*',\n\t\t\t\t\t\t\t\t\t\t\t\t 'from' => 'installed_mods',\n\t\t\t\t\t\t\t\t\t\t\t\t 'order' => 'm_name',\n\t\t\t\t\t\t\t\t\t\t)\t );\n\t\t$this->ipsclass->DB->exec_query();\n\t\t\n\t\tif ( $this->ipsclass->DB->get_num_rows() )\n\t\t{\n\t\t\twhile ( $r = $this->ipsclass->DB->fetch_row() )\n\t\t\t{\n\t\t\t\t$installed_names[] = $r['m_name'];\n\t\t\t\t$installed_info[ str_replace( \" \", \"_\", $r['m_name'] ) ] = $r;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// OK, let's show some mods\n\t\t//-----------------------------------------\n\t\t\n\t\tforeach ( $to_display as $k => $v )\n\t\t{\n\t\t\t//-----------------------------------------\n\t\t\t// Page jump stuff\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\tif ( $k < $first )\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\tif ( $k >= $first + $this->ipsclass->vars['umi_mods_perpage'] )\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\t//-----------------------------------------\n\t\t\t// Possible row entries\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\t$title = \"<strong>{$v['title']}</strong>\";\n\t\t\t$version = \"<div align='center'>v{$v['version']}</div>\";\n\t\t\t$author = \"<div align='center'><a href='{$v['website']}' target='_blank'>{$v['author']}</a></div>\";\n\t\t\t$outdated = \"<div align='center'><img src='{$this->ipsclass->skin_acp_url}/images/memsearch_delete.gif' border='0' title='Out of Date, you have v<!--VERSION--> installed' /></div>\";\n\t\t\t$installed = \"<div align='center'><img src='{$this->ipsclass->skin_acp_url}/images/aff_tick.png' border='0' title='Installed' /></div>\";\n\t\t\t$problem = \"<div align='center'><img src='{$this->ipsclass->skin_acp_url}/images/acp_trashcan.gif' border='0' title='There was a problem completing a previous installation, it is recommended that you uninstall this mod' /></div>\";\n\t\t\t$not_ins = \"<div align='center'><img src='{$this->ipsclass->skin_acp_url}/images/aff_cross.png' border='0' title='Not Installed' /></div>\";\n\t\t\t$upd_avail = \"<div align='center'><img src='{$this->ipsclass->skin_acp_url}/images/aff_cross.png' border='0' title='An update to this mod is available!' /></div>\";\n\t\t\t$uptodate = \"<div align='center'><img src='{$this->ipsclass->skin_acp_url}/images/aff_tick.png' border='0' title='You have the latest version of this mod installed!' /></div>\";\n\t\t\t$unknown = \"<div align='center'><img src='{$this->ipsclass->skin_acp_url}/images/memsearch_delete.gif' border='0' title='Unknown' /></div>\";\n\t\t\t$options = \"<div align='center'><img id='menu{$v['file']}' src='{$this->ipsclass->skin_acp_url}/images/filebrowser_action.gif' border='0' title='Options' class='ipd' /></div>\";\n\t\t\t\n\t\t\t//-----------------------------------------\n\t\t\t// Possible install options\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\t$opts = \"\";\n\t\t\t$opts_1 = \"img_add + \\\" <a href='{$this->ipsclass->base_url}&amp;{$this->ipsclass->form_code}&amp;code=install&amp;mod={$v['file']}&amp;st={$this->ipsclass->input['st']}'>Upgrade...</a>\\\",\nimg_delete + \\\" <a href='{$this->ipsclass->base_url}&amp;{$this->ipsclass->form_code}&amp;code=install&amp;mod={$v['file']}&amp;un=1&amp;st={$this->ipsclass->input['st']}'>Uninstall...</a>\\\"\";\n\t\t\t$opts_2 = \"img_add + \\\" <a href='{$this->ipsclass->base_url}&amp;{$this->ipsclass->form_code}&amp;code=install&amp;mod={$v['file']}&amp;st={$this->ipsclass->input['st']}'>Reinstall...</a>\\\",\nimg_delete + \\\" <a href='{$this->ipsclass->base_url}&amp;{$this->ipsclass->form_code}&amp;code=install&amp;mod={$v['file']}&amp;un=1&amp;st={$this->ipsclass->input['st']}'>Uninstall...</a>\\\"\";\n\t\t\t$opts_3 = \"img_delete + \\\" <a href='{$this->ipsclass->base_url}&amp;{$this->ipsclass->form_code}&amp;code=install&amp;mod={$v['file']}&amp;un=1&amp;st={$this->ipsclass->input['st']}'>Uninstall...</a>\\\"\";\n\t\t\t$opts_4 = \"img_add + \\\" <a href='{$this->ipsclass->base_url}&amp;{$this->ipsclass->form_code}&amp;code=install&amp;mod={$v['file']}&amp;st={$this->ipsclass->input['st']}'>Install...</a>\\\"\";\n\t\t\t\n\t\t\t//-----------------------------------------\n\t\t\t// Our different possibilities\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\tif ( in_array( $v['title'], $installed_names ) )\n\t\t\t{\n\t\t\t\t$mod_info = $installed_info[ str_replace( \" \", \"_\", $v['title'] ) ];\n\t\t\t\t\n\t\t\t\tif ( $mod_info['m_started'] == 1 )\n\t\t\t\t{\n\t\t\t\t\tif ( $mod_info['m_finished'] == 1 )\n\t\t\t\t\t{\n\t\t\t\t\t\tif ( $mod_info['m_version'] < $v['version'] )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$opts = $opts_1;\n\t\t\t\t\t\t\t$outdated = str_replace( \"<!--VERSION-->\", $mod_info['m_version'], $outdated );\n\t\t\t\t\t\t\t$data = ( $this->ipsclass->vars['umi_do_callbacks'] ) ? array( $title, $version, $author, $outdated, $upd_avail, $options ): array( $title, $version, $author, $outdated, $options );\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$ipbver = str_replace( '.', '', $v['ipbver'] );\n\t\t\t\t\t\t\tif ( isset( $latest_mods[ $ipbver ][ $v['file'] ] ) )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif ( $latest_mods[ $ipbver ][ $v['file'] ] > $v['version'] )\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$uptodate = $upd_avail;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$uptodate = $unknown;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$opts = $opts_2;\n\t\t\t\t\t\t\t$data = ( $this->ipsclass->vars['umi_do_callbacks'] ) ? array( $title, $version, $author, $installed, $uptodate, $options ) : array( $title, $version, $author, $installed, $options );\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$opts = $opts_3;\n\t\t\t\t\t\t$data = ( $this->ipsclass->vars['umi_do_callbacks'] ) ? array( $title, $version, $author, $problem, $unknown, $options ) : array( $title, $version, $author, $problem, $options );\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 ( $mod_info['m_finished'] == 1 )\n\t\t\t\t\t{\n\t\t\t\t\t\t$opts = $opts_3;\n\t\t\t\t\t\t$data = ( $this->ipsclass->vars['umi_do_callbacks'] ) ? array( $title, $version, $author, $problem, $unknown, $options ) : array( $title, $version, $author, $problem, $options );\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$opts = $opts_4;\n\t\t\t\t\t\t$data = ( $this->ipsclass->vars['umi_do_callbacks'] ) ? array( $title, $version, $author, $not_ins, $not_ins, $options ) : array( $title, $version, $author, $not_ins, $options );\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\t$opts = $opts_4;\n\t\t\t\t$data = ( $this->ipsclass->vars['umi_do_callbacks'] ) ? array( $title, $version, $author, $not_ins, $not_ins, $options ) : array( $title, $version, $author, $not_ins, $options );\n\t\t\t}\n\t\t\t\n\t\t\t$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( $data );\n\t\t\t\n\t\t\t//-----------------------------------------\n\t\t\t// Add the file options\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\t$this->ipsclass->html .=\"<script type=\\\"text/javascript\\\">\n menu_build_menu(\n \\\"menu{$v['file']}\\\",\n new Array( \".$opts.\"\n\t\t ) );\n </script>\n\";\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Page Jump\n\t\t//-----------------------------------------\n\t\t\n\t\t$pages = $this->ipsclass->adskin->build_pagelinks( array( 'TOTAL_POSS' => count( $to_display ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'PER_PAGE' => $this->ipsclass->vars['umi_mods_perpage'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'CUR_ST_VAL' => $first,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'L_SINGLE' => \"\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'L_MULTI' => \"Pages: \",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'BASE_URL' => $this->ipsclass->base_url.\"&amp;\".$this->ipsclass->form_code.\"&amp;code=view\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t ) );\n\t\t\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic( $pages, 'right', 'tablerow2' );\n\t\t\n\t\t//-----------------------------------------\n\t\t// Finish the table\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->end_table();\n\t\t\n\t\t//-----------------------------------------\n\t\t// Make sure UMI is up to date\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( $this->ipsclass->vars['umi_do_callbacks'] )\n\t\t{\n\t\t\t$this->ipsclass->html .= $this->ipsclass->adskin->start_table( \"Update Checker\" );\n\t\t\t\t\n\t\t\tif ( $latest_umi > 0 )\n\t\t\t{\n\t\t\t\t$latest_text = ( $latest_umi != $this->umi_ver ) ? \"<span style='font-weight: bold; color: red;'>OUT OF DATE</span>\" : \"<span style='font-weight: bold; color: green;'>UP TO DATE</span>\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$latest_text = \"<span style='font-weight: bold; color: red;'>UNKNOWN</span>\";\n\t\t\t}\n\t\t\t\n\t\t\t$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( \"<div align='center'>Your copy of (FSY23) Universal Mod Installer is $latest_text!</div>\" ) );\n\t\t\t\n\t\t\t$this->ipsclass->html .= $this->ipsclass->adskin->end_table();\n\t\t}\n\t\t\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->add_standalone_row( \"(FSY23) Universal Mod Installer v{$this->umi_ver}, by <a href='http://www.invisionmodding.com/' target='_blank'>Invision Modding</a>, &copy; \".date(\"Y\"), 'center', 'tablefooter' );\n\t\t\n\t\t//-----------------------------------------\n\t\t// All done, output it!\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->ipsclass->admin->output();\n\t}", "public function installed() {\n\t\t//return $query->num_rows;\n \n\t\tif ( is_null($this->installed) ) {\n\t\t\t$query = $this->db->query(\"SELECT * FROM \" . DB_PREFIX . \"extension WHERE `type` = 'module' AND `code` = 'product_option_image_pro'\");\n\t\t\t$this->installed = $query->num_rows;\n\t\t}\n // not working in mijoshop\n //$query = $this->db->query('SHOW TABLES LIKE \"' . DB_PREFIX . 'poip_option_image\"');\n return $this->installed;\n }", "function ShowAllSoftware()\n{\n\tget_all_software();\n\n\t//show_table_title( \"Click a Build CRC to see panic data\" );\n\t//show_all_software();\t\t\n\n\tshow_table_title( \"Official Release (Click a Build CRC to see panic data)\" );\n\tshow_all_official_software();\t\t\n\n\tshow_table_title( \"Unofficial Release (Click a Build CRC to see panic data)\" );\n\tshow_all_test_software();\t\t\n}", "function ois_activation() {\r\n\t// Create the database table for statistics.\r\n ois_install_database();\r\n update_option('ois_table_created', 'yes');\r\n //update_option('ois-valid', 'no'); // Must validate after every install.\r\n \r\n // Check if old version has been installed.\r\n if (get_option('ois_installed') != 'yes') \r\n {\r\n\t // Reset any old variables that might conflict with new version (from 3.1).\r\n\t\t update_option('ois_skins', array()); // Delete any old settings\r\n\t\t update_option('ois_custom_designs', array()); // Custom designs.\r\n\t\t update_option('ois_installed', 'yes'); // Set to installed.\r\n } // if\r\n}", "function listar_licencias() {\n\t\t$query = \"SELECT licencias.*\n\t\tFROM licencias\";\n\n $connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\t\t\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\t\n\t\t$numrows = mysql_num_rows($result);\n\t\tmysql_close($connection);\n\t\t// COMPROBAMOS QUE HAYA RESULTADOS\n\t\t// SI EL NUMERO DE RESULTADOS ES 0 SIGNIFICA QUE NO HAY REGISTROS CON ESOS DATOS\n\t\tif ($numrows == 0) {\n\t\t\treturn $result;\n\t\t}\n\t\telse {\n\t\t\treturn $result;\n\t\t}\n\t}", "public static function installToolEnableFileExists() {}", "public static function verCompetencia(){\n\n $rel=Conexion::conectar('localhost','proyecto','root','');\n $resultado=$rel->prepare(\"SELECT * FROM resultados_aprendizaje\");\n $resultado->execute();\n\n return $resultado;\n }", "function check_install(){\n\tglobal $config, $install_errors;\n\t\n\t// Error friendly messages\n\t$requirements_error = array(\n\t\t'There is a problem regarding server requirements. This means that Chevereto can\\'t run because of the following:',\n\t\t'Please notice that this issue is because your server setup. If you want to run Chevereto please contact your hosting company or system admin regarding this report.'\n\t);\n\t$folder_error = array(\n\t\t'There is a problem regarding folders. This means that Chevereto can\\'t run because one or more folders required doesn\\'t exists. The missing folders are:',\n\t\t'Please double-check your current setup for the missing files.'\n\t);\n\t$admin_folder_error = array(\n\t\t'There is a problem regarding the admin folder and Chevereto won\\'t run because the admin folder doesn\\'t exists.',\n\t\t'Please double-check <code>$config[\\'admin_folder\\']</code> in the <code>includes/config.php</code> file.'\n\t);\t\n\t$htaccess = 'In some operating systems this files are hidden, therefore you can\\'t upload them. You need to <a href=\"http://www.google.com/search?q=show+hidden+htaccess\" target=\"_blank\">show this file</a> and then upload it.';\n\t$htaccess_error = array(\n\t\t'Some <code>.htaccess</code> file(s) doesn\\'t exists and the system can\\'t create this files.', $htaccess\n\t);\n\t$root_htaccess_error = array(\n\t\t'The <code>.htaccess</code> file doesn\\'t exists in the Chevereto root directory. This file must be uploaded to run Chevereto.', $htaccess\n\t);\n\t$file_error = array(\n\t\tstr_replace('folders', 'files', $folder_error[0]),\n\t\tstr_replace('folders', 'files', $folder_error[1])\n\t);\n\t$permission_error = array(\n\t\t'There is a problem regarding permissions. This means that Chevereto can\\'t upload files because of the following:',\n\t\t'Chevereto needs a way to write in this folders. You can do this by doing <a href=\"http://www.google.com/search?q=chmod+777\" target=\"_blank\">chmod 0777</a> on the above folders or use <a href=\"http://www.suphp.org/\" target=\"_blank\">suPHP</a> or <a href=\"http://httpd.apache.org/docs/current/suexec.html\" target=\"_blank\">suEXEC</a> on your server setup.'\n\t);\n\t$config_error = array(\n\t\t'There is a problem regarding your config setup. This means that Chevereto won\\'t run because the config is not valid:',\n\t\t'Please double-check your settings in the <code>includes/config.php</code> file.'\n\t);\n\t$definitions_error = array(\n\t\t'Please take note that you must edit the <code>definitions.php</code> file the first time that you install Chevereto.',\n\t\t'Please double-check your definitions in the <code>includes/definitions.php</code> file.'\n\t);\n\t$theme_error = array(\n\t\t'There is a problem regarding your current theme. This means that Chevereto won\\'t run because <code>'.$config['theme'].'</code> theme has missing files:',\n\t\t'Please double-check the theme hierarchy.'\n\t);\n\t$theme_data_error = array(\n\t\t'There is a problem regarding your current theme data. This means that Chevereto won\\'t run because <code>'.$config['theme'].'</code> theme has not valid theme data in <code>style.css</code> header comments:',\n\t\t'Please double-check the <code>style.css</code> header comments and refer to the <a href=\"http://chevereto.com/docs#themes\">theme documentation</a> page.'\n\t);\n\t$virtual_folder_error = array(\n\t\t'There is a problem regarding your virtual folders setup:',\n\t\t'Either you set different values for virtual folders in <code>includes/config.php</code> or you delete this directories.'\n\t);\n\t\n\t// Check for the server requirements\n\tif(!check_requirements()) {\n\t\tchevereto_die($install_errors, 'System error', $requirements_error);\n\t}\n\t\n\t// Check for the image folders\n\t$image_folders = array(__CHV_PATH_IMAGES__);\n\tif(!check_files_folders($image_folders, 'Directory')) {\n\t\tchevereto_die($install_errors, 'Folder error', $folder_error);\n\t}\n\tif(!check_permissions($image_folders)) {\n\t\tchevereto_die($install_errors, 'Permissions error', $permission_error);\n\t}\n\t\n\t// Check for virtual folders\n\t$virtual_folders = array(sanitize_path($config['virtual_folder_image']), sanitize_path($config['virtual_folder_uploaded']));\n\tforeach($virtual_folders as $folder) {\n\t\tif(file_exists(__CHV_ROOT_DIR__.$folder)) {\n\t\t\t$install_errors[] = 'The directory <code>'.__CHV_RELATIVE_ROOT__.$folder.'</code> must not exists';\n\t\t}\n\t}\n\tif(count($install_errors)>0) chevereto_die($install_errors, 'Virtual folders error', $virtual_folder_error);\n\t\n\t// Check for upload.php\n\tif(!file_exists(__CHV_ROOT_DIR__.'upload.php')) {\n\t\tchevereto_die('Can\\'t find <code>upload.php</code>', 'Missing upload.php', $file_error);\n\t}\n\t\n\t// Check for the root .htaccess file\n\tif(!file_exists(__CHV_ROOT_DIR__.'.htaccess')) {\n\t\tchevereto_die('', '.htaccess error', $root_htaccess_error);\n\t}\n\t\n\t// Admin folder\n\tif(!check_value($config[\"admin_folder\"])) $config[\"admin_folder\"] = \"admin\";\n\tif(!file_exists(__CHV_PATH_ADMIN__)) {\n\t\tchevereto_die('', 'Admin folder doesn\\'t exists', $admin_folder_error);\n\t}\n\t\n\t// Check for the other .htaccess files\n\t$htaccess_files = array(__CHV_PATH_IMAGES__, __CHV_PATH_INCLUDES__, __CHV_PATH_ADMIN_INCLUDES__);\n\tforeach($htaccess_files as $dir) {\n\t\tif(!file_exists($dir.'.htaccess')) {\n\t\t\tswitch($dir) {\n\t\t\t\tcase __CHV_PATH_IMAGES__:\n\t\t\t\t\t$rules = 'static';\n\t\t\t\tbreak;\n\t\t\t\tcase __CHV_PATH_INCLUDES__:\n\t\t\t\tcase __CHV_PATH_ADMIN_INCLUDES__:\n\t\t\t\t\t$rules = 'deny';\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif(!htaccess($rules, $dir)) {\n\t\t\t\t$install_errors[] = 'Can\\'t create <code>'.$dir.'.htaccess</code> file. Please upload the <code>.htaccess</code> file to the target dir';\n\t\t\t}\n\t\t}\n\t}\n\tif(count($install_errors)>0) chevereto_die($install_errors, '.htaccess error', $htaccess_error);\n\t\n\t// Files check\n\t$include_files = array(\n\t\t'chevereto.php',\n\t\t'uploader.php',\n\t\t'shorturl.php',\n\t\t'definitions.php',\n\t\t'template.functions.php'\n\t);\n\t$classes_files = array(\n\t\t'class.handler.php',\n\t\t'class.db.php',\n\t\t'class.upload.php',\n\t\t'class.filelist.php',\n\t\t'class.imageresize.php',\n\t\t'class.imageconvert.php',\n\t\t'class.minify.php',\n\t\t'class.shorturl.php'\n\t);\n\t\n\t$system_files = array(\n\t\t'login.php',\n\t\t'error.php',\n\t\t'style.css',\n\t\t'img/chevereto.png',\n\t\t'img/logo.png',\n\t\t'img/ico-warn.png',\n\t\t'img/background.png',\n\t\t'img/bkg-content.png'\n\t);\n\t$system_files_minify = array('style.css');\n\t$system_files = array_merge_minified($system_files, $system_files_minify);\n\t\n\t$system_js_files = array(\n\t\t'uploadify.swf',\n\t\t'ZeroClipboard.swf',\n\t\t'pref.php'\n\t);\n\t$system_js_files_minify = array('jquery.js', 'chevereto.js', 'functions.js', 'jquery.uploadify-3.1_chevereto.js');\n\t$system_js_files = array_merge_minified($system_js_files, $system_js_files_minify);\n\t\n\t// Admin files\n\t$admin_classes_files = array(\n\t\t'class.adminhandler.php',\n\t\t'class.manage.php'\n\t);\n\t$admin_system_files = array(\n\t\t'header.php',\n\t\t'filemanager.php'\n\t);\n\t$admin_system_files_minify = array('style.css', 'js/admin.js');\n\t$admin_system_files = array_merge_minified($admin_system_files, $admin_system_files_minify);\n\t\n\tforeach($include_files as $key => $value) $include_files[$key] = __CHV_PATH_INCLUDES__.$value;\n\tforeach($classes_files as $key => $value) $classes_files[$key] = __CHV_PATH_CLASSES__.$value;\n\tforeach($system_files as $key => $value) $system_files[$key] = __CHV_PATH_SYSTEM__.$value;\n\tforeach($system_js_files as $key => $value) $system_js_files[$key] = __CHV_PATH_SYSTEM_JS__.$value;\n\tforeach($admin_classes_files as $key => $value) $admin_classes_files[$key] = __CHV_PATH_ADMIN_CLASSES__.$value;\n\tforeach($admin_system_files as $key => $value) $admin_system_files[$key] = __CHV_PATH_ADMIN_SYSTEM__.$value;\n\t\n\t/*** The complete file check array ***/\n\t$check_files = array(\n\t\t'Includes'\t\t\t=> $include_files,\n\t\t'Classes'\t\t\t=> $classes_files,\n\t\t'System Files'\t\t=> array_merge($system_files, $system_js_files),\n\t\t'Admin .htaccess'\t=> array(__CHV_PATH_ADMIN_INCLUDES__.'.htaccess'),\n\t\t'Admin Classes'\t\t=> $admin_classes_files,\n\t\t'Admin System'\t\t=> $admin_system_files\n\t);\n\t\n\tforeach($check_files as $key => $value) {\n\t\tcheck_files_folders($value, 'File');\n\t}\n\tif((count($install_errors)>0)) {\n\t\tchevereto_die($install_errors, 'Setup error', $file_error);\n\t}\n\t\t\n\tif(!check_config()) {\n\t\tchevereto_die($install_errors, 'Config error', $config_error);\n\t}\n\t\n\tif(!check_definitions()) {\n\t\tchevereto_die($install_errors, 'Please change definitions.php', $definitions_error);\n\t}\n\t\n\tif(!check_theme()) {\n\t\tchevereto_die($install_errors, 'Theme error', $theme_error);\n\t}\n\t\n\tif(!check_theme_data()) {\n\t\tchevereto_die($install_errors, 'Theme data error', $theme_data_error);\n\t}\n\n}", "function virustotalscan_activate()\r\n{\r\n\tglobal $db;\r\n\t// grupul de setari\r\n\t$group = array(\r\n \"name\" => \"virustotalscan_group\", \r\n\t\t\"title\" => \"Virus Total Scanner\", \r\n\t\t\"description\" => \"Settings for \\\"Virus Total Scanner\\\" plugin.\", \r\n\t\t\"disporder\" => 100, \r\n\t\t\"isdefault\" => 0\r\n\t);\r\n\t$gid = $db->insert_query(\"settinggroups\", $group);\r\n // setarile modificarii\r\n \t$setting_1 = array(\r\n\t\t\"sid\"\t\t\t=> NULL,\r\n\t\t\"name\"\t\t\t=> \"virustotalscan_setting_key\",\r\n\t\t\"title\"\t\t\t=> \"Public Key\",\r\n\t\t\"description\"\t=> \"Enter your VirusTotal.com public key. Without this key you cannot use \\\"Virus Total Scanner\\\" application. You can get one by visiting <a href=\\\"http://www.virustotal.com/vt-community/register.html\\\" target=\\\"_blank\\\">this</a> page.\",\r\n\t\t\"optionscode\"\t=> \"text\",\r\n\t\t\"value\"\t\t\t=> \"\",\r\n\t\t\"disporder\"\t\t=> 1,\r\n\t\t\"gid\"\t\t\t=> $gid\r\n\t);\r\n\t$db->insert_query(\"settings\", $setting_1);\r\n \t$setting_2 = array(\r\n\t\t\"sid\"\t\t\t=> NULL,\r\n\t\t\"name\"\t\t\t=> \"virustotalscan_setting_attach_enable\",\r\n\t\t\"title\"\t\t\t=> \"Is \\\"Attachment Scan\\\" module enabled?\",\r\n\t\t\"description\"\t=> \"If it is set to \\\"Yes\\\" then all your new attachments will be checked before they are inserted in database.\",\r\n\t\t\"optionscode\"\t=> \"yesno\",\r\n\t\t\"value\"\t\t\t=> \"yes\",\r\n\t\t\"disporder\"\t\t=> 2,\r\n\t\t\"gid\"\t\t\t=> $gid\r\n\t);\r\n\t$db->insert_query(\"settings\", $setting_2);\r\n\t$setting_3 = array(\r\n\t\t\"sid\"\t\t\t=> NULL,\r\n\t\t\"name\"\t\t\t=> \"virustotalscan_setting_bantime\",\r\n\t\t\"title\"\t\t\t=> \"Ban Time for \\\"Attachment Scan\\\" module :\",\r\n\t\t\"description\"\t=> \"For how much time a user will be banned from the administration panel. Leave blank or enter negative values if you want the ban to be permanently. (Default : \\\"\\\")\",\r\n\t\t\"optionscode\"\t=> \"text\",\r\n\t\t\"value\"\t\t\t=> \"\",\r\n\t\t\"disporder\"\t\t=> 3,\r\n\t\t\"gid\"\t\t\t=> $gid\r\n\t);\r\n\t$db->insert_query(\"settings\", $setting_3);\r\n\t$setting_4 = array(\r\n\t\t\"sid\"\t\t\t=> NULL,\r\n\t\t\"name\"\t\t\t=> \"virustotalscan_setting_bangroup\",\r\n\t\t\"title\"\t\t\t=> \"After banning user, he will be moved to usergroup :\",\r\n\t\t\"description\"\t=> \"When a member is banned then it will be moved to the group below. The group is represented by its id. (Default : 7)\",\r\n\t\t\"optionscode\"\t=> \"text\",\r\n\t\t\"value\"\t\t\t=> \"7\",\r\n\t\t\"disporder\"\t\t=> 4,\r\n\t\t\"gid\"\t\t\t=> $gid\r\n\t);\r\n\t$db->insert_query(\"settings\", $setting_4);\r\n\t$setting_5 = array(\r\n\t\t\"sid\"\t\t\t=> NULL,\r\n\t\t\"name\"\t\t\t=> \"virustotalscan_setting_email\",\r\n\t\t\"title\"\t\t\t=> \"Email\",\r\n\t\t\"description\"\t=> \"Enter the email address of the person who receives an email once someone tries to upload an infected file. Leave blank to disable this feature.\",\r\n\t\t\"optionscode\"\t=> \"text\",\r\n\t\t\"value\"\t\t\t=> \"\",\r\n\t\t\"disporder\"\t\t=> 5,\r\n\t\t\"gid\"\t\t\t=> $gid\r\n\t);\r\n\t$db->insert_query(\"settings\", $setting_5);\r\n \t$setting_6 = array(\r\n\t\t\"sid\"\t\t\t=> NULL,\r\n\t\t\"name\"\t\t\t=> \"virustotalscan_setting_url_enable\",\r\n\t\t\"title\"\t\t\t=> \"Is \\\"Link Scan\\\" module enabled?\",\r\n\t\t\"description\"\t=> \"If it is set to \\\"Yes\\\" then all links from messages will be checked for viruses.\",\r\n\t\t\"optionscode\"\t=> \"yesno\",\r\n\t\t\"value\"\t\t\t=> \"yes\",\r\n\t\t\"disporder\"\t\t=> 6,\r\n\t\t\"gid\"\t\t\t=> $gid\r\n\t);\r\n\t$db->insert_query(\"settings\", $setting_6);\r\n\t$setting_7 = array(\r\n\t\t\"sid\"\t\t\t=> NULL,\r\n\t\t\"name\"\t\t\t=> \"virustotalscan_setting_url_protection\",\r\n\t\t\"title\"\t\t\t=> \"Protection level :\",\r\n\t\t\"description\"\t=> \"Set a protection level for your \\\"Link Scan\\\" module. (Default : Medium Protection)\",\r\n\t\t\"optionscode\"\t=> \"select\\n25=Low Protection\\n50=Medium Protection\\n75=Maximum Protection\\n\",\r\n\t\t\"value\"\t\t\t=> \"50\",\r\n\t\t\"disporder\"\t\t=> 7,\r\n\t\t\"gid\"\t\t\t=> $gid\r\n\t);\r\n\t$db->insert_query(\"settings\", $setting_7);\r\n\t$setting_8 = array(\r\n\t\t\"sid\"\t\t\t=> NULL,\r\n\t\t\"name\"\t\t\t=> \"virustotalscan_setting_url_rescan\",\r\n\t\t\"title\"\t\t\t=> \"Rescan frequency :\",\r\n\t\t\"description\"\t=> \"Set a rescan frequency for your \\\"Link Scan\\\" module. (Default : 1 Month)\",\r\n\t\t\"optionscode\"\t=> \"select\\n7=7 Days\\n14=14 Days\\n30=1 Month\\n90=3 Months\\n180=6 Months\\n\",\r\n\t\t\"value\"\t\t\t=> \"30\",\r\n\t\t\"disporder\"\t\t=> 8,\r\n\t\t\"gid\"\t\t\t=> $gid\r\n\t);\r\n\t$db->insert_query(\"settings\", $setting_8);\r\n\t$setting_9 = array(\r\n\t\t\"sid\"\t\t\t=> NULL,\r\n\t\t\"name\"\t\t\t=> \"virustotalscan_setting_url_loadlimit\",\r\n\t\t\"title\"\t\t\t=> \"Server load limit :\",\r\n\t\t\"description\"\t=> \"Set an upper limit for your server load time over the module \\\"Link Scan\\\" stop working. (Default : 5)\",\r\n\t\t\"optionscode\"\t=> \"select\\n1=1.0\\n3=3.0\\n5=5.0\\n7=7.0\\n9=9.0\\n\",\r\n\t\t\"value\"\t\t\t=> \"5\",\r\n\t\t\"disporder\"\t\t=> 9,\r\n\t\t\"gid\"\t\t\t=> $gid\r\n\t);\r\n\t$db->insert_query(\"settings\", $setting_9);\r\n\t$setting_10 = array(\r\n\t\t\"sid\"\t\t\t=> NULL,\r\n\t\t\"name\"\t\t\t=> \"virustotalscan_setting_url_groups\",\r\n\t\t\"title\"\t\t\t=> \"Groups Except :\",\r\n\t\t\"description\"\t=> \"User groups defined below will not benefit from the scanning links. (Default : 7)\",\r\n\t\t\"optionscode\"\t=> \"text\",\r\n\t\t\"value\"\t\t\t=> \"7\",\r\n\t\t\"disporder\"\t\t=> 10,\r\n\t\t\"gid\"\t\t\t=> $gid\r\n\t);\r\n\t$db->insert_query(\"settings\", $setting_10);\r\n\t// se actualizeaza toate setarile\r\n\trebuild_settings();\r\n // inainte de a crea eventuale tabele vom vedea ce colocatie avem...\r\n\t$collation = $db->build_create_table_collation();\r\n\t// daca tabelul cu log-uri exista atunci nu se va mai crea\r\n\tif(!$db->table_exists(\"virustotalscan_log\")) {\r\n // daca nu exista se purcede la crearea lui\r\n $db->write_query(\"CREATE TABLE `\".TABLE_PREFIX.\"virustotalscan_log` (\r\n `lid` bigint(30) UNSIGNED NOT NULL auto_increment,\r\n `uid` bigint(30) UNSIGNED NOT NULL default '0',\r\n `username` varchar(128) NOT NULL default '',\r\n `date` bigint(30) UNSIGNED NOT NULL default '0',\r\n `data` TEXT NOT NULL,\r\n PRIMARY KEY (`lid`), KEY(`date`)\r\n ) ENGINE=MyISAM{$collation}\");\r\n }\r\n // se adauga in baza de date noi stiluri\r\n $css_url_template = array(\r\n \"title\" => \"virustotalscan_url_css\",\r\n \"template\" => $db->escape_string('\r\n <style type=\"text/css\">\r\n a.virustotalscan_found, a.virustotalscan_notfound \r\n {\r\n position: relative;\r\n z-index:24; \r\n text-decoration:none\r\n }\r\n a.virustotalscan_found:hover\r\n {\r\n z-index:25; \r\n background-color:#800000\r\n }\r\n a.virustotalscan_notfound:hover\r\n {\r\n z-index:25; \r\n background-color:#008000\r\n }\r\n a.virustotalscan_found span, a.virustotalscan_notfound span\r\n {\r\n display: none\r\n }\r\n a.virustotalscan_found:hover span \r\n { \r\n display:block;\r\n position:absolute;\r\n top:2em; left:2em; width:15em;\r\n border:1px solid #0cf;\r\n background-color:#cff; \r\n color:#FF0000;\r\n text-align: center\r\n }\r\n a.virustotalscan_notfound:hover span \r\n { \r\n display:block;\r\n position:absolute;\r\n top:2em; left:2em; width:15em;\r\n border:1px solid #0cf;\r\n background-color:#cff; \r\n color:#000;\r\n text-align: center\r\n }\r\n </style>\r\n '),\r\n \"sid\" => \"-1\",\r\n \"version\" => \"1.0\",\r\n \"dateline\" => TIME_NOW\r\n );\r\n $db->insert_query('templates', $css_url_template); \r\n}", "function checkIfInstalledAlready($manifestInformation) {\r\n\t //select the right query based on the manifest information\r\n\t switch ($manifestInformation[\"type\"]) {\r\n\t case \"component\":\r\n\t \tif(version_compare(JVERSION,'1.6.0','ge')) {\r\n // Joomla! 1.6+ code here\r\n $query = \"SELECT `extension_id` AS id FROM #__extensions WHERE `type` = 'component' AND `element` = '\".$manifestInformation[\"element\"].\"'\";\r\n } else {\r\n // Joomla! 1.5 code here\r\n $query = \"SELECT `id` FROM #__components WHERE `option` = '\".$manifestInformation[\"element\"].\"'\";\r\n }\r\n\t break;\r\n\t case \"module\":\r\n $mname = $manifestInformation[\"element\"];\r\n\r\n \t \t if(version_compare(JVERSION,'1.6.0','ge')) {\r\n // Joomla! 1.6+ code here\r\n $query = \"SELECT `extension_id` AS id FROM #__extensions WHERE `type` = 'module' AND `element` = '\".$mname.\"'\";\r\n } else {\r\n // Joomla! 1.5 code here\r\n $query = \"SELECT `id` FROM #__modules WHERE `module` = '\".$mname.\"'\";\r\n }\t \r\n\t break;\r\n\t case \"plugin\":\r\n\t \t if(version_compare(JVERSION,'1.6.0','ge')) {\r\n // Joomla! 1.6+ code here\r\n $query = \"SELECT `extension_id` AS id FROM #__extensions WHERE `type` = 'plugin' AND `folder` = '\".$manifestInformation[\"group\"].\"' AND `element` = '\".$manifestInformation[\"element\"].\"'\";\r\n } else {\r\n // Joomla! 1.5 code here\r\n $query = \"SELECT `id` FROM #__plugins WHERE `folder` = '\".$manifestInformation[\"group\"].\"' AND `element` = '\".$manifestInformation[\"element\"].\"'\";\r\n }\r\n\t break;\r\n\t default:\r\n\t $query = \"\";\r\n\t }\r\n\t //run the query if it was formed\r\n\t if ($query != \"\") {\r\n\t $this->_db->setQuery($query);\r\n\t $extension_id = intval($this->_db->loadResult());\r\n\t\r\n\t //return 0 if the extension was not found\r\n\t if (intval($extension_id) < 1) {\r\n\t return 0;\r\n\t }\r\n\t return $extension_id;\r\n\t } else {\r\n\t return 0;\r\n\t }\r\n\t }", "public function checkForUpdates()\n\t{\n\t\tif (!is_numeric(BUILD))\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t// HOOK: proxy module\n\t\tif (Config::get('useProxy')) {\n\t\t\t$objRequest = new \\ProxyRequest();\n\t\t} else {\n\t\t\t$objRequest = new \\Request();\n\t\t}\n\n\t\t$objRequest->send(\\Config::get('liveUpdateBase') . (LONG_TERM_SUPPORT ? 'lts-version.txt' : 'version.txt'));\n\n\t\tif (!$objRequest->hasError())\n\t\t{\n\t\t\t\\Config::set('latestVersion', $objRequest->response);\n\t\t\t\\Config::persist('latestVersion', $objRequest->response);\n\t\t}\n\n\t\t// Add a log entry\n\t\t$this->log('Checked for Contao updates', __METHOD__, TL_CRON);\n\t}", "function rstatus() {\n\t\t$this->checkOnce();\n\t\t$versionPath = $this->getVersionPath();\n\t\t$remoteCmd = 'cd '.$versionPath.' && hg status';\n\t\t$this->ssh_exec($remoteCmd);\n\t}", "public function Consultar()\n {\n $condicion = $this->obtenerCondicion();\n $sentenciaSql = \"SELECT \n d.id_detalle_orden\n ,d.valor_inventario\n ,d.valor_venta\n ,d.cantidad\n ,d.id_orden\n ,d.id_producto\n ,d.estado\n ,p.descripcion AS nombre_producto \n FROM \n detalle_orden AS d \n INNER JOIN producto AS p ON d.id_producto = p.id_producto \".$condicion;\n $this->conn->preparar($sentenciaSql);\n $this->conn->ejecutar();\n return true;\n }", "public function action_update_check()\n\t{\n\t\tUpdate::add( 'StatusNet', '8676A858-E4B1-11DD-9968-131C56D89593', $this->info->version );\n\t}", "public function app_update(){\n return [\n 'update_available' => (new Installer)->web_update_available(),\n ];\n\t}", "public function getChecks()\n {\n $result = (version_compare(phpversion(), '5.2.8', '>=')) ? self::CHECK_OK : self::CHECK_ERROR;\n $this->addResult('system', 'PHP version', $result, \"PHP version 5.2.8 or higher is needed. A latest PHP version is always recommended.\");\n\n $current = ini_get('memory_limit');\n $result = (version_compare($current, '255M', '>')) ? self::CHECK_OK : self::CHECK_WARNING;\n $this->addResult('system', 'PHP memory', $result, \"The minimum requirement for Magento itself is 256Mb. Current memory: \".$current);\n\n $result = (function_exists('json_decode')) ? self::CHECK_OK : self::CHECK_ERROR;\n $this->addResult('system', 'JSON', $result, 'The JSON-extension for PHP is needed');\n\n $result = (function_exists('curl_init')) ? self::CHECK_OK : self::CHECK_ERROR;\n $this->addResult('system', 'CURL', $result, 'The CURL-extension for PHP is needed');\n\n $result = (function_exists('simplexml_load_string')) ? self::CHECK_OK : self::CHECK_ERROR;\n $this->addResult('system', 'SimpleXML', $result, 'The SimpleXML-extension for PHP is needed');\n\n $result = (in_array('ssl', stream_get_transports())) ? self::CHECK_OK : self::CHECK_WARNING;\n $this->addResult('system', 'OpenSSL', $result, 'PHP support for OpenSSL is needed if you want to use HTTPS');\n\n $result = (function_exists('iconv')) ? self::CHECK_OK : self::CHECK_ERROR;\n $this->addResult('system', 'iconv', $result, 'The iconv-extension for PHP is needed');\n\n $result = (ini_get('safe_mode')) ? self::CHECK_ERROR : self::CHECK_OK;\n $this->addResult('system', 'Safe Mode', $result, 'PHP Safe Mode is strongly outdated and not supported by either Joomla! or Magento');\n\n $result = (ini_get('magic_quotes_gpc')) ? self::CHECK_ERROR : self::CHECK_OK;\n $this->addResult('system', 'Magic Quotes GPC', $result, 'Magic Quotes GPC is outdated and should be disabled');\n\n $remote_domain = 'api.yireo.com';\n $result = (@fsockopen($remote_domain, 80, $errno, $errmsg, 5)) ? self::CHECK_OK : self::CHECK_ERROR;\n $this->addResult('system', 'Firewall', $result, 'Firewall needs to allow outgoing access on port 80.');\n\n $logfile = Mage::helper('vm2mage')->getDebugLog();\n $result = (@is_writable($logfile)) ? self::CHECK_OK : self::CHECK_ERROR;\n $this->addResult('system', 'Logfile', $result, 'Logfile \"'.$logfile.'\" should be writable');\n\n $import_dir = Mage::getBaseDir('media').DS.'import';\n if(!is_dir($import_dir)) @mkdir($import_dir);\n $result = (@is_writable($import_dir)) ? self::CHECK_OK : self::CHECK_ERROR;\n $this->addResult('system', 'Import folder', $result, 'Import-folder \"'.$import_dir.'\" should be writable');\n\n $catalog_dir = Mage::getBaseDir('media').DS.'catalog';\n if(!is_dir($catalog_dir)) @mkdir($catalog_dir);\n $result = (@is_writable($catalog_dir)) ? self::CHECK_OK : self::CHECK_ERROR;\n $this->addResult('system', 'Catalog folder', $result, 'Catalog-folder \"'.$catalog_dir.'\" should be writable');\n\n $collection = Mage::getResourceModel('api/user_collection');\n $result = ($collection->count() > 0) ? self::CHECK_OK : self::CHECK_ERROR;\n $this->addResult('system', 'API-user', $result, 'You should create an API-user with API resource-access');\n\n return $this->system_checks;\n }", "function updatedb_status() {\n $return = array();\n\n $modules = drupal_get_installed_schema_version(NULL, FALSE, TRUE);\n foreach ($modules as $module => $schema_version) {\n $updates = drupal_get_schema_versions($module);\n // Skip incompatible module updates completely, otherwise test schema versions.\n if (!update_check_incompatibility($module) && $updates !== FALSE && $schema_version >= 0) {\n // module_invoke returns NULL for nonexisting hooks, so if no updates\n // are removed, it will == 0.\n $last_removed = module_invoke($module, 'update_last_removed');\n if ($schema_version < $last_removed) {\n drush_set_error('PROVISION_DRUPAL_UPDATE_FAILED', dt( $module .' module can not be updated. Its schema version is '. $schema_version .'. Updates up to and including '. $last_removed .' have been removed in this release. In order to update '. $module .' module, you will first <a href=\"http://drupal.org/upgrade\">need to upgrade</a> to the last version in which these updates were available.'));\n continue;\n }\n\n $updates = drupal_map_assoc($updates);\n\n // Record the starting update number for each module.\n foreach (array_keys($updates) as $update) {\n if ($update > $schema_version) {\n $start[$module] = $update;\n break;\n }\n }\n if (isset($start['system'])) {\n // Ensure system module's updates run first.\n $start = array('system' => $start['system']) + $start;\n }\n\n // Record any pending updates. Used for confirmation prompt.\n foreach (array_keys($updates) as $update) {\n if ($update > $schema_version) {\n if (class_exists('ReflectionFunction')) {\n // The description for an update comes from its Doxygen.\n $func = new ReflectionFunction($module. '_update_'. $update);\n $description = trim(str_replace(array(\"\\n\", '*', '/'), '', $func->getDocComment()));\n }\n if (empty($description)) {\n $description = dt('description not available');\n }\n\n $return[] = array('module' => ucfirst($module), 'update_id' => $update, 'description' => $description);\n }\n }\n }\n }\n\n return array($return, $start);\n}", "public function Catalogo()\n {\n \n try{\n $AccesoAdatos = new AD();\n $vlcScript = \"SELECT * \"\n . \" FROM fve_prod\";\n \n return $AccesoAdatos->RetornarResultado($vlcScript) ;\n } catch (Exception $ex) {\n \n echo $ERROR_MESSAGE; \n \n }\n \n }", "public function check(){\n $query = \"SELECT ordine.id_ordine, ordine.id_fornitore, fornitore.nome as fornitore, ordine.articolo, articolo.taglia, ordine.stato \n FROM \" . $this->table_name . \" LEFT JOIN fornitore ON ordine.id_fornitore = fornitore.id_fornitore \n INNER JOIN articolo ON ordine.id_ordine = articolo.id_ordine WHERE stato = 3\";\n $stmt = $this->conn->prepare( $query );\n $stmt->execute();\n return $stmt;\n }", "function checkInstallationStatus() {\n global $configFile, $_PATHCONFIG;\n\n $result = @include_once'..'.$configFile;\n if ($result === false) {\n return false;\n } else {\n return (defined('CONTREXX_INSTALLED') && CONTREXX_INSTALLED);\n }\n }", "function consultarNotaAprobatoria() {\r\n\r\n $variables=array('codProyectoEstudiante'=> $this->datosEstudiante['CARRERA'] \r\n );\r\n $cadena_sql = $this->sql->cadena_sql(\"nota_aprobatoria\", $variables);\r\n $resultado = $this->ejecutarSQL($this->configuracion, $this->accesoOracle, $cadena_sql, \"busqueda\");\r\n return $resultado[0][0];\r\n }", "public function getAllAvailable()\n {\n try{\n $stmt = $this->connection->prepare(\n \"SELECT id, partenza, destinazione, durata, data_di_partenza, creato_al, contributo, v.foto, v.numero_posti\n FROM viaggio \n JOIN veicolo v on v.targa = viaggio.id_veicolo and v.id_autista = viaggio.id_autista\n WHERE stato = 'Not Completed'\n AND data_di_partenza > NOW()\n ORDER BY data_di_partenza;\");\n $stmt->execute();\n HTTP_Response::SendWithBody(HTTP_Response::MSG_OK, $stmt->fetchAll(), HTTP_Response::OK);\n }\n catch (PDOException $exception){\n HTTP_Response::SendWithBody(HTTP_Response::MSG_INTERNAL_SERVER_ERROR, $exception, HTTP_Response::INTERNAL_SERVER_ERROR);\n }\n }", "private function _consultarListaArchivos() {\n $_objMTablas = new \\cprogresa\\MTablas();\n $tabla2 = $_objMTablas->getTablaCheckBox(2);\n $tabla6 = $_objMTablas->getTablaCheckBox(6);\n //print_r($tabla2);\n //print_r($tabla6);\n $R = [];\n foreach ($tabla2 as $id => $valor) {\n $R[] = ['id' => $id, 'archivo' => $valor, 'descripcion' => $tabla6[$id]];\n }\n $this->_ok = 1;\n $this->_mensaje = \"Lista de archivos\";\n $this->_guardarLog($_SESSION['id_usu_cent'], ['accion' => 'consulta', 'metodo' => get_class() . ':_consultarListaArchivos', 'parametros' => '']);\n return $R;\n }", "function monitis_addon_activate() {\n // Create Custom DB Table\n // TODO handle DB failures\n $query = \"CREATE TABLE `mod_monitis_addon` (`id` INT( 1 ) NOT NULL AUTO_INCREMENT PRIMARY KEY ,`demo` TEXT NOT NULL )\";\n\t$result = mysql_query($query);\n $query = \"CREATE TABLE `mod_monitis_server` (`id` INT( 1 ) NOT NULL AUTO_INCREMENT PRIMARY KEY ,\"\n . \"`ip_addr` TEXT NOT NULL, \"\n . \"`monitored` BOOL, test_id INT, page_id INT, `agent_name` TEXT)\";\n\t$result = mysql_query($query);\n return array('status'=>'success','description'=>'');\n}", "function get_host_status($host_data)\n{\n global $API_version;\n global $CGM_version;\n\n $arr = array ('command'=>'version','parameter'=>'');\n $version_arr = send_request_to_host($arr, $host_data);\n\n if ($version_arr)\n {\n if ($version_arr['STATUS'][0]['STATUS'] == 'S')\n {\n $API_version = $version_arr['VERSION'][0]['API'];\n $CGM_version = $version_arr['VERSION'][0]['CGMiner'];\n \n if ($API_version >= 1.0)\n return true;\n }\n }\n return false;\n}", "function VerificarRegistrosNuevos(){\n $obCon = new Backups($_SESSION['idUser']);\n $sql=\"SHOW FULL TABLES WHERE Table_type='BASE TABLE'\";\n $consulta=$obCon->Query($sql);\n $i=0;\n $RegistrosXCopiar=0;\n $TablasLocales=[];\n \n while ($DatosTablas=$obCon->FetchArray($consulta)){\n $Tabla=$DatosTablas[0];\n if($Tabla<>'precotizacion' and $Tabla<>'preventa'){\n $sql=\"SELECT COUNT(*) as TotalRegistros FROM $Tabla WHERE Sync = '0000-00-00 00:00:00' OR Sync<>Updated\";\n $ConsultaConteo=$obCon->Query($sql);\n $Registros=$obCon->FetchAssoc($ConsultaConteo);\n $TotalRegistros=$Registros[\"TotalRegistros\"];\n if($TotalRegistros>0){ \n $RegistrosXCopiar=$RegistrosXCopiar+$TotalRegistros;\n $TablasLocales[$i][\"Nombre\"]=$Tabla;\n $TablasLocales[$i][\"Registros\"]=$TotalRegistros;\n $i++; \n }\n }\n }\n\n print(\"OK;$RegistrosXCopiar;\".json_encode($TablasLocales, JSON_FORCE_OBJECT));\n }", "public function check_activation_status () {\n $licenses_link = get_option( $this->token . '-url', '' );\n //echo \"<pre>\"; print_r( $this ); echo \"</pre>\"; die();\n $products = $this->get_detected_products();\n //echo \"<pre>\"; print_r( $products ); echo \"</pre>\"; die();\n $messages = array();\n if ( 0 < count( $products ) ) {\n foreach ( $products as $k => $v ) {\n if ( isset( $v['product_status'] ) && 'inactive' == $v['product_status'] ) {\n if( !empty( $licenses_link ) ) {\n $message = sprintf( __( '%s License is not active. To get started, activate it <a href=\"%s\">here</a>.', $this->domain ), $v['product_name'], $licenses_link );\n } else {\n $message = sprintf( __( '%s License is not active.', $this->domain ), $v['product_name'] );\n }\n if( !empty( $v[ 'errors_callback' ] ) && is_callable( $v[ 'errors_callback' ] ) ) {\n call_user_func_array( $v[ 'errors_callback' ], array( $message, 'warning' ) );\n } else {\n $messages[] = $message;\n }\n }\n }\n }\n if( !empty( $messages ) ) {\n $this->messages = $messages;\n }\n\n /**\n * We also ping UD server once per 24h\n * for getting any specific information.\n */\n $this->maybe_ping_ud();\n }", "function install_other()\n\t{\n\t\t//-----------------------------------------\n\t\t// Get DB\n\t\t//-----------------------------------------\n\t\t\n\t\trequire_once( INS_KERNEL_PATH . 'class_db_' . $this->install->saved_data['sql_driver'] . '.php' );\t\t\n\t\t\n\t\t$this->install->ipsclass->init_db_connection( $this->install->saved_data['db_name'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t $this->install->saved_data['db_user'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t $this->install->saved_data['db_pass'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t $this->install->saved_data['db_host'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t $this->install->saved_data['db_pre'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t $this->install->ipsclass->vars['mysql_codepage'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t $this->install->saved_data['sql_driver'] );\n\t\t//-----------------------------------------\n\t\t// XML: COMPONENTS\n\t\t//-----------------------------------------\n\t\t\n\t\t$output[] = \"Анализ информации компонентов...\";\n\t\t$xml = new class_xml();\n\t\t$xml->lite_parser = 1;\n\t\t\n\t\t$content = implode( \"\", file( INS_DOC_ROOT_PATH . 'resources/components.xml' ) );\n\t\t$xml->xml_parse_document( $content );\n\t\t\n\t\tforeach( $xml->xml_array['export']['group']['row'] as $id => $entry )\n\t\t{\n\t\t\t$newrow = array();\n\t\t\t\n\t\t\tforeach( $entry as $f => $data )\n\t\t\t{\n\t\t\t\tif ( $f == 'VALUE' or $f == 'com_id' )\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$newrow[$f] = $entry[ $f ]['VALUE'];\n\t\t\t}\n\t\t\t\n\t\t\t$this->install->ipsclass->DB->do_insert( 'components', $newrow );\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// XML: LOG IN MODULES\n\t\t//-----------------------------------------\n\t\t\n\t\t$output[] = \"Подключение модулей авторизации...\";\n\t\t$xml = new class_xml();\n\t\t$xml->lite_parser = 1;\n\t\t\n\t\t$content = implode( \"\", file( INS_ROOT_PATH . 'installfiles/loginauth.xml' ) );\n\t\t$xml->xml_parse_document( $content );\n\t\t\n\t\tforeach( $xml->xml_array['export']['group']['row'] as $id => $entry )\n\t\t{\n\t\t\t$newrow = array();\n\t\t\t\n\t\t\tforeach( $entry as $f => $data )\n\t\t\t{\n\t\t\t\tif ( $f == 'VALUE' or $f == 'login_id' )\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$newrow[$f] = $this->install->ipsclass->txt_convert_charsets($entry[ $f ]['VALUE'], 'UTF-8');\n\t\t\t}\n\t\t\t\n\t\t\t$this->install->ipsclass->DB->do_insert( 'login_methods', $newrow );\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// XML: GROUPS\n\t\t//-----------------------------------------\n\t\t\n\t\t$output[] = \"Создание пользовательских групп...\";\n\t\t$xml = new class_xml();\n\t\t$xml->lite_parser = 1;\n\t\t\n\t\t$content = implode( \"\", file( INS_ROOT_PATH . 'installfiles/groups.xml' ) );\n\t\t$xml->xml_parse_document( $content );\n\t\t\n\t\tforeach( $xml->xml_array['export']['group']['row'] as $id => $entry )\n\t\t{\n\t\t\t$newrow = array();\n\t\t\t\n\t\t\tforeach( $entry as $f => $data )\n\t\t\t{\n\t\t\t\tif ( $f == 'VALUE' or $f == 'g_id' or preg_match( \"#^g_blog_#is\", $f ) )\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$newrow[$f] = $this->install->ipsclass->txt_convert_charsets($entry[ $f ]['VALUE'], 'UTF-8');\n\t\t\t}\n\t\t\t\n\t\t\t$this->install->ipsclass->DB->do_insert( 'groups', $newrow );\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// XML: ATTACHMENTS\n\t\t//-----------------------------------------\n\t\t\n\t\t$output[] = \"Настройка системы прикрепления файлов...\";\n\t\t$xml = new class_xml();\n\t\t$xml->lite_parser = 1;\n\t\t\n\t\t$content = implode( \"\", file( INS_ROOT_PATH . 'installfiles/attachments.xml' ) );\n\t\t$xml->xml_parse_document( $content );\n\t\t\n\t\tforeach( $xml->xml_array['export']['group']['row'] as $id => $entry )\n\t\t{\n\t\t\t$newrow = array();\n\t\t\t\n\t\t\tforeach( $entry as $f => $data )\n\t\t\t{\n\t\t\t\tif ( $f == 'VALUE' or $f == 'atype_id' )\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$newrow[$f] = $entry[ $f ]['VALUE'];\n\t\t\t}\n\t\t\t\n\t\t\t$this->install->ipsclass->DB->do_insert( 'attachments_type', $newrow );\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// XML: SKIN SETS\n\t\t//-----------------------------------------\n\t\n\t\t$output[] = \"Добавление стилей...\";\n\t\t$xml = new class_xml();\n\t\t$xml->lite_parser = 1;\n\t\t\n\t\t$content = implode( \"\", file( INS_DOC_ROOT_PATH . 'resources/skinsets.xml' ) );\n\t\t$xml->xml_parse_document( $content );\n\t\n\t\t//-----------------------------------------\n\t\t// Fix up...\n\t\t//-----------------------------------------\n\n\t\tif ( ! is_array( $xml->xml_array['export']['group']['row'][0] ) )\n\t\t{\n\t\t\t//-----------------------------------------\n\t\t\t// Ensure [0] is populated\n\t\t\t//-----------------------------------------\n\n\t\t\t$tmp = $xml->xml_array['export']['group']['row'];\n\n\t\t\tunset($xml->xml_array['export']['group']['row']);\n\n\t\t\t$xml->xml_array['export']['group']['row'][0] = $tmp;\n\t\t}\n\t\t\n\t\tforeach( $xml->xml_array['export']['group']['row'] as $id => $entry )\n\t\t{\n\t\t\t$newrow = array();\n\t\t\t\n\t\t\tforeach( $entry as $f => $data )\n\t\t\t{\n\t\t\t\tif ( $f == 'VALUE' or $f == 'set_skin_set_id' )\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$newrow[$f] = $entry[ $f ]['VALUE'];\n\t\t\t}\n\t\t\t\n\t\t\t$this->install->ipsclass->DB->allow_sub_select = 1;\n\t\t\t$this->install->ipsclass->DB->do_insert( 'skin_sets', $newrow );\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// XML: TASKS :D\n\t\t//-----------------------------------------\n\t\t\n\t\t$output[] = \"Настройка планировщика задач...\";\n\t\t$xml = new class_xml();\n\t\t$xml->lite_parser = 1;\n\t\t\n\t\t$content = implode( \"\", file( INS_DOC_ROOT_PATH . 'resources/tasks.xml' ) );\n\t\t$xml->xml_parse_document( $content );\n\t\t\n\t\tforeach( $xml->xml_array['export']['group']['row'] as $id => $entry )\n\t\t{\n\t\t\t$newrow = array();\n\t\t\t\n\t\t\tforeach( $entry as $f => $data )\n\t\t\t{\n\t\t\t\tif ( $f == 'VALUE' or $f == 'task_id' )\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ( $f == 'task_cronkey' )\n\t\t\t\t{\n\t\t\t\t\t$entry[ $f ]['VALUE'] = md5( uniqid( microtime() ) );\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ( $f == 'task_next_run' )\n\t\t\t\t{\n\t\t\t\t\t$entry[ $f ]['VALUE'] = time();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$newrow[$f] = $entry[ $f ]['VALUE'];\n\t\t\t}\n\t\t\t\n\t\t\t$this->install->ipsclass->DB->do_insert( 'task_manager', $newrow );\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// XML: FAQ\n\t\t//-----------------------------------------\n\t\t\n\t\t$output[] = \"Заполнение разделов FAQ...\";\n\t\t$xml = new class_xml();\n\t\t$xml->lite_parser = 1;\n\t\t\n\t\t$content = implode( \"\", file( INS_DOC_ROOT_PATH . 'resources/faq.xml' ) );\n\t\t$xml->xml_parse_document( $content );\n\t\t\n\t\tforeach( $xml->xml_array['export']['group']['row'] as $id => $entry )\n\t\t{\n\t\t\t$newrow = array();\n\t\t\t\n\t\t\tforeach( $entry as $f => $data )\n\t\t\t{\n\t\t\t\tif ( $f == 'VALUE' or $f == 'id' )\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$newrow[$f] = $entry[ $f ]['VALUE'];\n\t\t\t}\n\t\t\t\n\t\t\t$this->install->ipsclass->DB->do_insert( 'faq', $newrow );\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// XML: BBCode\n\t\t//-----------------------------------------\n\t\t\n\t\t$output[] = \"Настройка пользовательских BB-кодов...\";\n\t\t$xml = new class_xml();\n\t\t$xml->lite_parser = 1;\n\t\t\n\t\t$content = implode( \"\", file( INS_DOC_ROOT_PATH . 'resources/bbcode.xml' ) );\n\t\t$xml->xml_parse_document( $content );\n\t\t\n\t\tforeach( $xml->xml_array['bbcodeexport']['bbcodegroup']['bbcode'] as $id => $entry )\n\t\t{\n\t\t\t$newrow = array();\n\t\t\t\n\t\t\tforeach( $entry as $f => $data )\n\t\t\t{\n\t\t\t\tif ( $f == 'VALUE' or $f == 'bbcode_id' )\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$newrow[$f] = $entry[ $f ]['VALUE'];\n\t\t\t}\n\t\t\t\n\t\t\t$this->install->ipsclass->DB->do_insert( 'custom_bbcode', $newrow );\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// XML: MACROS\n\t\t//-----------------------------------------\n\t\t\n\t\t/* - Macros inserted on line 560 above - only need to be inserted once..\n\t\t$output[] = \"Inserting macro information...\";\n\t\t$xml = new class_xml();\n\t\t\n\t\t$content = implode( \"\", file( INS_ROOT_PATH . 'installfiles/macro.xml' ) );\n\t\t$xml->xml_parse_document( $content );\n\t\t\n\t\tforeach( $xml->xml_array['macroexport']['macrogroup']['macro'] as $id => $entry )\n\t\t{\n\t\t\t$newrow = array();\n\n\t\t\t$newrow['macro_value'] = $entry[ 'macro_value' ]['VALUE'];\n\t\t\t$newrow['macro_replace'] = $entry[ 'macro_replace' ]['VALUE'];\n\t\t\t$newrow['macro_set'] = 1;\n\n\t\t\t$this->install->ipsclass->DB->do_insert( 'skin_macro', $newrow );\n\t\t}*/\n\t\t\n\t\t//-----------------------------------------\n\t\t// Next...\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->install->template->append( $this->install->template->install_page_refresh( $output ) );\t\t\n\t\t$this->install->template->next_action = '?p=install&sub=caches';\n\t\t$this->install->template->hide_next = 1;\n\t}", "public function get_status()\n\t{\n\t\ttry\n\t\t{\n\t\t\t$q = $this->_conn->prepare(\"select * from sandbox.dbo.daemon where dbtype = :dbtype order by object asc\");\n\t\t\t\n\t\t\t$dbtype = 'live';\n\t\t\t$q->bindParam(':dbtype', $dbtype);\n\n\t\t\t$q->execute();\n\t\t\t$rs = $q->fetchAll(PDO::FETCH_ASSOC);\n\t\t}\n\t\tcatch (PDOException $e)\n\t\t{\n\t\t\treturn 'ERRORdd: ' . $e->getMessage();\n\t\t}\n\t\t\n\t\treturn $rs;\n\t}", "function VM_downloadedVBoxAddons()\n{\n\texec(\"ls \".VBOX_addonStoreDir.\"VBoxLinuxAdditions-amd64*.run | sed 's/.*amd64-//g' | grep -v VBoxLinuxAdditions | sed 's/.run//g'\",$out);\n\treturn(HELPER_array2AssociativeArray($out));\n}", "public function getStatusInstallments(){\n\n if (!Mage::getStoreConfig(self::XPATH_CONFIG_ACTIVE)) {\n return false;\n }\n\n return true;\n }", "function ifi_CIM_checkforupdates()\n{\n//ifi_pmpro_CIM_db_version\nglobal $ifi_pmpro_CIM_db_version;\nif($ifi_pmpro_CIM_db_version < 2.0)\nifi_pmpro_CIM_setDBTables();\n}", "public function listarStatusCelularTodos()\n {\n $pdo = new \\PDO(DSN, USER, PASSWD);\n //cria sql\n $sql = \"SELECT Discipulo.nome AS discipulo , TipoStatusCelular.nome AS status FROM Discipulo,StatusCelular, TipoStatusCelular\n WHERE Discipulo.id = StatusCelular.discipuloId And StatusCelular.tipoOferta = TipoStatusCelular.id ORDER BY discipulo\";\n\n //prepara sql\n $stm = $pdo->prepare($sql);\n //trocar valores\n\n $resposta = $stm->execute();\n\n //fechar conexão\n $pdo = null ;\n\n return $stm->fetchAll();\n }", "public function listarStatusCelularTodos()\n {\n $pdo = new \\PDO(DSN, USER, PASSWD);\n //cria sql\n $sql = \"SELECT Discipulo.nome AS discipulo , TipoStatusCelular.nome AS status FROM Discipulo,StatusCelular, TipoStatusCelular\n WHERE Discipulo.id = StatusCelular.discipuloId And StatusCelular.tipoOferta = TipoStatusCelular.id ORDER BY discipulo\";\n\n //prepara sql\n $stm = $pdo->prepare($sql);\n //trocar valores\n\n $resposta = $stm->execute();\n\n //fechar conexão\n $pdo = null ;\n\n return $stm->fetchAll();\n }", "function consultarEstudiantesParaHomologacion($cod_proyecto){\n $cadena_sql = $this->sql->cadena_sql(\"consultarEstudiantesProyecto\",$cod_proyecto);\n return $resultadoEspacio = $this->ejecutarSQL($this->configuracion, $this->accesoOracle, $cadena_sql, \"busqueda\");\n }", "function opcion__info()\n\t{\n\t\t$p = $this->get_proyecto();\n\t\t$param = $this->get_parametros();\n\t\t$this->consola->titulo( \"Informacion sobre el PROYECTO '\" . $p->get_id() . \"' en la INSTANCIA '\" . $p->get_instancia()->get_id() . \"'\");\n\t\t$this->consola->mensaje(\"Version de la aplicación: \".$p->get_version_proyecto().\"\\n\");\n\t\tif ( isset( $param['-c'] ) ) {\n\t\t\t// COMPONENTES\n\t\t\t$this->consola->subtitulo('Listado de COMPONENTES');\n\t\t\t$this->consola->tabla( $p->get_resumen_componentes_utilizados() , array( 'Tipo', 'Cantidad') );\n\t\t} elseif ( isset( $param['-g'] ) ) {\n\t\t\t// GRUPOS de ACCESO\n\t\t\t$this->consola->subtitulo('Listado de GRUPOS de ACCESO');\n\t\t\t$this->consola->tabla( $p->get_lista_grupos_acceso() , array( 'ID', 'Nombre') );\n\t\t} else {\n\t\t\t$this->consola->subtitulo('Reportes');\n\t\t\t$subopciones = array( \t'-c' => 'Listado de COMPONENTES',\n\t\t\t\t\t\t\t\t\t'-g' => 'Listado de GRUPOS de ACCESO' ) ;\n\t\t\t$this->consola->coleccion( $subopciones );\n\t\t}\n\t}", "public function getDetailedSystemStatus() {}", "function afficherAdmins(){\n\t\t$sql=\"SElECT * From administrateur\";\n\t\t$db = config::getConnexion();\n\t\ttry{\n\t\t$liste=$db->query($sql);\n\t\treturn $liste;\n\t\t}\n catch (Exception $e){\n die('Erreur: '.$e->getMessage());\n }\n\t}", "public static function checkInstallToolEnableFile() {}", "function obtenerSesionEjecutada(){\n\n\t\t$query1 = ('select sesion.id, sesion.checkin, sesion.pagada, sesion.id_servicio, sesion.id_usuario, sesion.id_agenda, sesion.ejecutada, usuario.nombre,\n\t\t\t\t\tusuario.apellido, servicio.descripcion from sesion \n\t\t\t\t\tInner JOIN usuario\n\t\t\t\t\ton sesion.id_usuario = usuario.id\n\t\t\t\t\tInner Join servicio\n\t\t\t\t\ton sesion.id_servicio = servicio.id\n\t\t\t\t\twhere (sesion.pagada = FALSE) AND (sesion.ejecutada = TRUE) ' ); //QUERY PARA OBTENER TODO DE UNA VEZ.\n\t\t$query = $this->db->query($query1);\n\t\t\n\t\t//$array = $array = array('pagada' => FALSE, 'ejecutada' => TRUE);\n\t //$query = $this->db->from('sesion')->where($array)->get();\n\t if($query-> num_rows() > 0) return $query->result_array();\n\t else return false ;\n\t \n\t \n\t \n\t}", "public function checkStatus() {\n\t\t// Check connection\n\t\tif (!$this->db->isConnected()) {\n\t\t\t$this->out(sprintf('Error: Database connection for %s failed!', $this->install['database']));\n\n\t\t\treturn false;\n\t\t}\n\n\t\t// Check the users tables\n\t\t$tables = $this->db->listSources();\n\n\t\tif (!in_array($this->install['table'], $tables)) {\n\t\t\t$this->out(sprintf('Error: No %s table was found in %s.', $this->install['table'], $this->install['database']));\n\n\t\t\treturn false;\n\t\t}\n\n\t\t$this->out('Installation status good, proceeding...');\n\n\t\treturn true;\n\t}", "public function verRequisitos($id){\n $atr=array();\n $sql = \"SELECT id,nombre,tipo,vigencia,estatus,orden\n FROM mos_requisitos \n WHERE id =$id\"; \n $this->operacion($sql, $atr);\n return $this->dbl->data[0];\n }", "function ListarPermiso()\n\t{\n\t\t$sql = \"SELECT * FROM permiso\";\n\t\treturn EjecutarConsulta($sql);\n\t}", "function dashboard_admin_buildContent($data,$db) {\n\t//$url = 'http://localhost/proprietary/version/'; // base url for version \n\t$url = 'https://sitesense.org/dev/version/'; // base url for version \n\t// modules versions contact\n\t$statement = $db->prepare('getEnabledModules','admin_modules'); // modules don't register versions until they're enabled, so this function is borderline useless if you get every module\n\t$statement->execute();\n\t$modules = $statement->fetchAll();\n\t$moduleQuery = array();\n\tforeach($modules as $module){\n\t\tif(file_exists('modules/'.$module['name'].'/README.md')&&dashboard_parse_readme('modules/'.$module['name'].'/README.md')){\n\t\t\t$moduleQuery[$module['shortName']]=$module['version'];\n\t\t}\n\t}\n\t$statement=$db->prepare('getEnabledPlugins','plugins');\n\t$statement->execute();\n\twhile($fetch=$statement->fetch(PDO::FETCH_ASSOC)){\n\t\tif(file_exists('plugins/'.$module['name'].'/README.md')&&dashboard_parse_readme('modules/'.$module['name'].'/README.md')){\n\t\t\tif(file_exists('plugins/'.$fetch['name'].'/install.php')){\n\t\t\t\tcommon_include('plugins/'.$fetch['name'].'/install.php');\n\t\t\t}\n\t\t\tif(function_exists($fetch['name'].'_settings')){\n\t\t\t\t$settings=call_user_func($fetch['name'].'_settings');\n\t\t\t\tif(isset($settings['version'])){\n\t\t\t\t\t$moduleQuery[$fetch['name']]=$settings['version'];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t$moduleQuery = http_build_query(array('modules'=>$moduleQuery));\n\t$moduleQuery = rawurldecode($moduleQuery);\n\t$moduleUrl = $url . 'modules?' . $moduleQuery;\n\tif(isset($data->version)){\n\t\t$moduleUrl .= '&core='.$data->version;\n\t}\n\t$ch = curl_init($moduleUrl);\n\tcurl_setopt($ch,CURLOPT_RETURNTRANSFER,true);\n\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n\t$data->output['moduleUpdates'] = curl_exec($ch);\n\t$data->output['moduleUpdates'] = json_decode($data->output['moduleUpdates'],TRUE);\n\n\t// sitesense version contact\n $info['SiteSense Version'] = $data->version;\n\t$info['Server time']=strftime('%B %d, %Y, %I:%M:%S %p');\n\t$info['Server Signature']=$_SERVER['SERVER_SIGNATURE'];\n\t$info['Server Name']=$_SERVER['SERVER_NAME'];\n\t$info['Server Address']=$_SERVER['SERVER_ADDR'];\n\t$info['Gateway Interface']=$_SERVER['GATEWAY_INTERFACE'];\n\t$info['Server Protocol']=$_SERVER['SERVER_PROTOCOL'];\n\t$info['PHP Version']=phpversion().'</td></tr><tr><td colspan=\"2\">\n\t\t<img src=\"'.$_SERVER['PHP_SELF'].'?='.php_logo_guid().'\" alt=\"PHP Logo\" />';\n\t$info['Zend Version']=zend_version().'</td></tr><tr><td colspan=\"2\">\n\t\t<img src=\"'.$_SERVER['PHP_SELF'].'?='.zend_logo_guid().'\" alt=\"Zend Logo\" />';\n\t$info['Host OS']=PHP_OS;\n\t$data->output['secondSidebar']='\n\t<table class=\"sysInfo\">\n\t\t<caption>System Info</caption>\n\t\t';\n\tforeach ($info as $title => $value) {\n\t\tif (is_array($value)) {\n\t\t\t$data->output['secondSidebar'].='<tr>\n\t\t\t<th colspan=\"2\" class=\"section\">'.$title.'</th>';\n\t\t\tforeach ($value as $subTitle => $subValue) {\n\t\t\t\t$data->output['secondSidebar'].='<tr>\n\t\t\t<th>'.$subTitle.'</th>\n\t\t\t<td>'.$subValue.'</td>\n\t\t</tr>';\n\t\t\t}\n\t\t} else {\n\t\t\t$data->output['secondSidebar'].='<tr>\n\t\t\t<th>'.$title.'</th>\n\t\t\t<td>'.$value.'</td>\n\t\t</tr>';\n\t\t}\n\t}\n\t$data->output['secondSidebar'].='\n\t</table>';\n\t$data->output['pageTitle']='About This CMS -';\n\t//-----Call Home-----//\n\t$field = array(\n\t\t'version' => $data->version,\n\t\t'host' => $data->domainName . $data->linkRoot,\n\t\t'removeAttribution' => $data->settings['removeAttribution'],\n\t\t'serverName' => $info['Server Name'],\n\t\t'serverAddress' => $info['Server Address'],\n\t\t'gatewayInterface' => $info['Gateway Interface'],\n\t\t'serverProtocol' => $info['Server Protocol'],\n\t\t'phpVersion' => phpversion(),\n\t\t'zendVersion' => zend_version()\n\t);\n\t\n\t$ch = curl_init($url);\n\tcurl_setopt($ch,CURLOPT_POST,true);\n\tcurl_setopt($ch,CURLOPT_POSTFIELDS,$field);\n\tcurl_setopt($ch,CURLOPT_RETURNTRANSFER,true);\n\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n\n\t$data->output['result'] = curl_exec($ch);\n\t$data->output['result'] = json_decode($data->output['result'],TRUE);\n\n\t/* \n\t *\n\t * 0 = Attribution\n\t * 1 = Version\n\t**/\n\t// Update Attribution Setting In The DB\n\t$statement = $db->prepare('updateSettings','admin_settings');\n\t$statement->execute(array(\n\t\t':name' => 'removeAttribution',\n\t\t':value' => $data->output['result']['removeAttribution']\n\t));\n\t// Push Across All Languages...\n\tcommon_updateAcrossLanguageTables($data,$db,'settings',array('name'=>'removeAttribution'),array('value'=>$data->output['result']['removeAttribution']));\n\t\n}", "function status_relais($nom_domain){\n\t\tglobal $bdd;\n\n\t\t$req = $bdd->prepare(\"SELECT status_relais FROM relais_mail WHERE nom_domain = :domain\");\n\t\t$req->execute(array(\"domain\"=>$nom_domain));\n\n\t\twhile($results = $req->fetch()){\n\t\t\t$result = $results[\"status_relais\"];\n\t\t}\n\n\t\treturn $result;\n\t}", "private function checkinstallrequirement()\r\n\t{\r\n\t\t$userCount = Core_User::getUsers(array(), '', '', '', true);\r\n\t\t\r\n\r\n\t\t\r\n\t\tif($userCount > 0)\r\n\t\t\treturn false;\r\n\t\telse\r\n\t\t\treturn true;\r\n\t}", "public function all_choose_us_info(){\r\n $query = \"SELECT * FROM tbl_aboutus_choose_us WHERE publication_status = 1\";\r\n if(mysqli_query($this->db_connect, $query)){\r\n $query_result = mysqli_query($this->db_connect, $query);\r\n return $query_result;\r\n }else{\r\n die(\"Query Problem! \".mysqli_error($this->db_connect));\r\n }\r\n }", "public function consultarCatalogCor() {\n \t\t$existen = false;\n \t\t$this->conn = new Conexion('../../php/datosServer.php');\n\t\t\t$this->conn = $this->conn->conectar();\n\t\t\t\n\t\t\t\t $sql = \"CALL consultarCatalog('coordinadores');\"; \n\t\t\t\t\t$info = '<div class=\"animated fadeInDown BtnShadow\" id=\"resultados\">\n\t\t\t\t\t<span class=\"label warning\" style=\"margin: 8px;\"><i class=\"fa fa-list-alt fa-lg\"></i> Catálogo de Coordinadores</span><br>\n\t\t\t\t\t\t <div class=\"form-item\">\n\t\t\t\t\t <input data-tipso=\"Escribe una palabra clave.\" type=\"text\" id=\"resultados\" placeholder=\"Filtrar Resultados\" class=\"filterBoxy\">\n\t\t\t\t\t </div>\t\t\t\t\n\t\t\t\t\t<table class=\"flat tableLines\">\n \t \t\t\t\t<tr class=\"titleTable\"><th>RFC</th>\n\t\t\t \t\t<th>Nombre</th>\n\t\t\t \t\t<th>Activo</th>\n\t\t\t\t\t\t<th>Correo</th>\n\t\t\t\t\t\t<th>Carrera</th></tr><tbody id=\"resultadoBus\">';\n\t\n\t\t\t\n\t\t\t$result = $this->conn->query($sql);\n if ($result->num_rows > 0) {\n while($row = $result->fetch_array(MYSQLI_NUM)) {\n \t$info .= '<tr><td style=\"color: #400101;\">'.$row[0].'</td>'.\n \t\t'<td><b>'.$row[1].' '.$row[2].' '.$row[3].'</b></td>';\n \t$info .= ($row[4] == 1 ? '<td><span class=\"label success\">SI</span></td>' : '<td><span class=\"label error\">NO</span></td>');\n \t$info .= '<td>'.$row[5].'</td>'.'<td>'.$row[6].'</td></tr>';\n \t}\n \t$info .= '</tbody></table></div>';\n \t\n \t$info .= '\n\t\t\t\t\t\t\t<script type=\"text/javascript\" src=\"../js/table-filter.js\"></script> \t\n \t';\n $existen = true;\n }\n \n if($existen == true) {\n \t\techo $info;\n \t}else echo -1;\n $this->conn->close();\n \t\t}", "public function statusAction()\n {\n /**\n * Get Request & verify ConsoleRequest\n */\n $request = $this->getRequest();\n\n if (!$request instanceof ConsoleRequest) {\n throw new \\RuntimeException(self::NOTCONSOLE);\n }\n\n\n /**\n * Output header\n */\n $output = $this->header;\n $output .= \"\\nApplication version status:\\n\\n\";\n\n\n /**\n * Loop Managers\n */\n $managers = $this->getConfig('managers');\n foreach ($managers as $manager) {\n $class = new $manager($this->getServiceLocator());\n $output .= $class->getStatus().\"\\n\";\n }\n\n return $output;\n }", "public function listarActivos(){\n $sql = \"SELECT c.idcompra, c.nrofactura, date(c.fecha) as fecha, p.razonsocial AS proveedor, concat(per.nombre, ' ', per.apellido) AS personal, c.monto, c.estado \n FROM compras c JOIN proveedores p ON c.idproveedor = p.idproveedor JOIN personales per ON c.idpersonal = per.idpersonal WHERE c.estado = '1'\n ORDER BY c.idcompra DESC\";\n return ejecutarConsulta($sql);\n }", "function PKG_listSelectedpackages($client,$distr,$release)\n{\nCHECK_FW(CC_clientname, $client);\n\ninclude(\"/m23/inc/i18n/\".$GLOBALS[\"m23_language\"].\"/m23base.php\");\n\nHTML_jsCheckboxChanger('JS_checkboxChanger');\nHTML_checkboxChangerButtons('BUT_checkboxChanger');\n\n//search for all packages witn status wait4acc\n$sql = \"SELECT package,params,normalPackage,id,installedSize,priority FROM `clientjobs` WHERE client='$client' AND status='wait4acc' ORDER BY package, normalPackage\";\n$result = DB_query($sql); //FW ok\n\necho(JS_checkboxChanger.\"\n\t<tr>\n\t\t<td></td>\n\t\t<td><span class=\\\"subhighlight\\\">$I18N_status</span></td>\n\t\t<td><span class=\\\"subhighlight\\\">$I18N_package_name</span></td>\n\t\t<td><span class=\\\"subhighlight\\\">$I18N_size</span></td>\n\t\t<td><span class=\\\"subhighlight\\\">$I18N_parameter</span></td>\n\t\t<td><span class=\\\"subhighlight\\\">$I18N_options</span></td>\n\t\t<td><span class=\\\"subhighlight\\\">$I18N_priority</span></td>\n\t\t<td>\".BUT_checkboxChanger.\"</td>\n\t</tr>\n\t\");\n\n\n$i=0;\n\n$allInstalledSize=0;\n$packageAmount=0;\n\nwhile ($line=mysql_fetch_row($result))\n\t{\n\t $status=PKG_getClientjobsStatus($client,$line[0],$distr,$line[1],$line[2]);\n\n\n\t $packageID = $line[3];\n\n\t\tif ($line[0]==\"m23normalRemove\")\n\t\t\t$allInstalledSize-=$line[4];\n\t\telse\n\t\t\t$allInstalledSize+=$line[4];\n\t $packageAmount++;\n\t $isNormal = false;\n\n\tif (($i % 2) == 0)\n\t\t$col = 'bgcolor=\"#A4D9FF\" bordercolor=\"#A4D9FF\"';\n\telse\n\t\t$col = '';\n\n\tif ($line[0]=='m23normal')\n\t\t{\n\t\t\t$isNormal = true;\n\t\t\t$cbBaseName=\"CB_rmNormalpkg\";\n\t\t\t$jobImg=\"<img src=\\\"/gfx/button_ok-mini.png\\\" alt=\\\"$I18N_install\\\" longdesc=\\\"$I18N_install\\\" title=\\\"$I18N_install\\\">\";\n\t\t}\n\telseif ($line[0]=='m23normalRemove')\n\t\t{\n\t\t\t$isNormal = true;\n\t\t\t$cbBaseName=\"CB_rmNormalRemovepkg\";\n\t\t\t$jobImg=\"<img src=\\\"/gfx/button_cancel-mini.png\\\" alt=\\\"$I18N_deinstall\\\" longdesc=\\\"$I18N_deinstall\\\" title=\\\"$I18N_deinstall\\\">\";\n\t\t}\n\telse\n\t\t$jobImg=\"\";\n\n\t if ($isNormal)\n\t\t{//adds remove line for m23normal + m23normalRemove packages\n\n\t\t $var=$cbBaseName.$i;\n\t\t echo(\"\n\t\t \t<tr $col>\n\t\t\t\t<td>$jobImg</td>\n\t\t\t\t<td valign=\\\"top\\\">$status</td>\n\t\t\t\t<td valign=\\\"top\\\"><b>\".$line[2].\"</b></td>\n\t\t\t\t<td valign=\\\"top\\\">\".number_format((float)$line[4]/1024,2).\" MB</td>\n\t\t\t\t<td valign=\\\"top\\\">\".PKG_listParams($line[1]).\"</td>\n\t\t\t\t<td valign=\\\"top\\\"><CENTER>\".PKG_hasOptions($line[2], $packageID, $distr, $client, $release).\"</CENTER></td>\n\t\t\t\t<td valign=\\\"top\\\"><CENTER>\".$line[5].\"</CENTER></b></td>\n\t\t\t\t<td valign=\\\"top\\\"><CENTER><input type=\\\"checkbox\\\" name=\\\"$var\\\" value=\\\"\".$line[2].\"\\\"></CENTER></td>\n\t\t\t</tr>\\n\");\n\t\t}\n\telse\n\t\t{//adds remove line for other packages\n\t\t $var=\"CB_rmpkg\".$i;\n\t\t echo(\"\n\t\t \t<tr $col>\n\t\t\t\t<td>$jobImg</td>\n\t\t\t\t<td valign=\\\"top\\\">$status</td>\n\t\t\t\t<td valign=\\\"top\\\"><b>\".$line[0].\"</b></td>\n\t\t\t\t<td valign=\\\"top\\\">\".number_format((float)$line[4]/1024,2).\" MB</td>\n\t\t\t\t<td valign=\\\"top\\\">\".PKG_listParams($line[1]).\"</td>\n\t\t\t\t<td valign=\\\"top\\\"><CENTER>\".PKG_hasOptions($line[0], $packageID, $distr, $client, $release).\"</CENTER></td>\n\t\t\t\t<td valign=\\\"top\\\"><CENTER>\".$line[5].\"</CENTER></b></td>\n\t\t\t\t<td valign=\\\"top\\\"><CENTER><input type=\\\"checkbox\\\" name=\\\"$var\\\" value=\\\"\".$line[0].\"\\\"></CENTER></td>\n\t\t\t</tr>\\n\");\n\t\t}\n\t $i++;\n\t};\n\techo(\"\n\t\t<tr>\n\t\t\t<td colspan=\\\"7\\\">\n\t\t\t\t<hr>\n\t\t\t\t$I18N_packageAmount: $packageAmount<br>\n\t\t\t\t$I18N_wholeSize: \".number_format((float)$allInstalledSize/1024,2).\" MB<br>\n\t\t\t</td>\n\t\t\t<td>\n\t\t\t\t\".BUT_checkboxChanger.\"\n\t\t\t</td>\n\t\t</tr>\");\n}", "public static function _doCheck()\n\t{\n\t\t// when user click on \"check updates\" button\n\t\t// we don't actually try to get updates info\n\t\t$sefConfig = Sh404sefFactory::getConfig();\n\n\t\t// prepare a default response object\n\t\t$response = new stdClass();\n\t\t$response->status = true;\n\t\t$response->statusMessage = JText::_('COM_SH404SEF_CLICK_TO_CHECK_UPDATES');\n\t\t$response->current = 0;\n\t\t$response->note = '';\n\t\t$response->noteHtml = '';\n\t\t$response->changelogLink = '';\n\t\t$response->minVersionToUpgrade = 0;\n\t\t$response->maxVersionToUpgrade = 0;\n\t\t$response->shouldUpdate = false;\n\t\t$response->excludes = array();\n\n\t\t// check if allowed to auto check, w/o user clicking on button\n\t\tif (!$sefConfig->autoCheckNewVersion && empty(self::$_forced['updates']))\n\t\t{\n\t\t\treturn $response;\n\t\t}\n\n\t\t// get an http client\n\t\t$hClient = new Zendshl_Http_Client;\n\t\t$hClient->setConfig(array('maxredirects' => 3, 'timeout' => 10));\n\n\t\t// find where to call ...\n\t\t$remoteConfig = self::getRemoteConfig($forced = false);\n\t\t// hardcoded default update server\n\t\t$defaultServers = array(array('url' => self::$_endPoint . '/' . self::$_updateFile));\n\t\t// try to read from remote, central, configuration file\n\t\t$remoteServers = empty($remoteConfig->config['updateservers']) ? array() : $remoteConfig->config['updateservers'];\n\t\t// merge default and remote\n\t\t$servers = array_merge($remoteServers, $defaultServers);\n\t\t// check for urls in both defaults and remote\n\t\t$serverList = array();\n\t\tforeach ($servers as $server)\n\t\t{\n\t\t\tif(!empty($server['url']))\n\t\t\t{\n\t\t\t\t$serverList[] = JString::trim(($server['url']));\n\t\t\t}\t\n\t\t}\n\t\t$serverList = array_unique($serverList);\n\t\t// now iterate over server list, until we find one that responds\n\t\tforeach ($serverList as $server)\n\t\t{\n\t\t\t$response->status = true;\n\n\t\t\t// actually place a call to find about available updates\n\t\t\ttry\n\t\t\t{\n\t\t\t\t$hClient->setUri($server);\n\t\t\t}\n\t\t\tcatch (Exception $e)\n\t\t\t{\n\t\t\t\t// move to next update server in list\n\t\t\t\t$response->status = false;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// request file content\n\t\t\t$adapters = array('Zendshl_Http_Client_Adapter_Curl', 'Zendshl_Http_Client_Adapter_Socket');\n\t\t\t$rawResponse = null;\n\n\t\t\tforeach ($adapters as $adapter)\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\t$hClient->setAdapter($adapter);\n\t\t\t\t\t$rawResponse = $hClient->request();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcatch (Exception $e)\n\t\t\t\t{\n\t\t\t\t\t// we failed, let's try another method\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// (un)set flag if we have a response\n\t\t\tif (empty($rawResponse))\n\t\t\t{\n\t\t\t\t$response->status = false;\n\t\t\t\t$msg = 'unknown code';\n\t\t\t\t$response->statusMessage = JText::sprintf('COM_SH404SEF_COULD_NOT_CHECK_FOR_NEW_VERSION', $msg);\n\t\t\t}\n\t\t\telse if (!is_object($rawResponse) || $rawResponse->isError())\n\t\t\t{\n\t\t\t\t$response->status = false;\n\t\t\t\t$msg = method_exists($rawResponse, 'getStatus') ? $rawResponse->getStatus() : 'unknown code';\n\t\t\t\t$response->statusMessage = JText::sprintf('COM_SH404SEF_COULD_NOT_CHECK_FOR_NEW_VERSION', $msg);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// communication was fine, check the file type\n\t\t\t\t$type = $rawResponse->getHeader('Content-type');\n\t\t\t\tif (strtolower($type) != 'text/xml' && strtolower($type) != 'application/xml')\n\t\t\t\t{\n\t\t\t\t\t$response->status = false;\n\t\t\t\t\t$response->statusMessage = JText::sprintf('COM_SH404SEF_COULD_NOT_CHECK_FOR_NEW_VERSION', $rawResponse->getStatus());\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// if there was a valid response, break out of\n\t\t\t// loop over available update servers\n\t\t\tif ($response->status)\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t// if we were not able to contact any update server\n\t\t// return this\n\t\tif (!$response->status)\n\t\t{\n\t\t\treturn $response;\n\t\t}\n\n\t\ttry\n\t\t{\n\t\t\t// get an xml object and parse the response\n\t\t\t$xml = new SimpleXMLElement($rawResponse->getBody());\n\n\t\t\t// into our response object\n\t\t\t// first version of version check used an xml file that could only hold one\n\t\t\t// version data set. So we only iterate over the \"update\" group if it exists\n\t\t\tif (empty($xml->update))\n\t\t\t{\n\t\t\t\t$response = self::_readUpdateInformation($xml, $response);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tforeach ($xml->update as $updateRecord)\n\t\t\t\t{\n\t\t\t\t\t$product = (string) $updateRecord->product[0];\n\n\t\t\t\t\t// only use if this update record is for us\n\t\t\t\t\tif (strtolower($product) == strtolower(self::$_product))\n\t\t\t\t\t{\n\t\t\t\t\t\t$response = self::_readUpdateInformation($updateRecord, $response);\n\n\t\t\t\t\t\t// find if user should update\n\t\t\t\t\t\t$response = self::_updateRequired($response);\n\n\t\t\t\t\t\t// if found an update, break out\n\t\t\t\t\t\tif ($response->shouldUpdate)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tbreak;\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\tcatch (Exception $e)\n\t\t{\n\n\t\t}\n\n\t\t// check if this is a valid information file\n\t\treturn $response;\n\t}", "function consultarEstadoNomina(){\n \n $conexion = new conexion();\n $sql = \"select * from mod_nomina_estado\";\n $resulConsulta = $conexion->consultar($sql);\n return $resulConsulta; \n \n }", "public function all_choose_us_info_for_admin(){\r\n $query = \"SELECT * FROM tbl_aboutus_choose_us\";\r\n if(mysqli_query($this->db_connect, $query)){\r\n $query_result = mysqli_query($this->db_connect, $query);\r\n return $query_result;\r\n }else{\r\n die(\"Query Problem! \".mysqli_error($this->db_connect));\r\n }\r\n }", "function check_server()\r\n{\r\n global $username, $ticket, $address, $url, $timeout, $mode, $warn, $crit;\r\n global $debug;\r\n\r\n $components = array(\r\n \"nagios\" => \"Monitoring Engine\",\r\n \"ndo2db\" => \"Database Backend\",\r\n \"npcd\" => \"Performance Grapher\",\r\n );\r\n $jobs = array(\r\n \"reportengine\" => \"Report Engine\",\r\n \"sysstat\" => \"System Statistics\",\r\n \"eventman\" => \"Event Manager\",\r\n \"feedprocessor\" => \"Feed Processor\",\r\n \"cmdsubsys\" => \"Command Subsystem\",\r\n \"nom\" => \"Nonstop Operations Manager\",\r\n \"dbmaint\" => \"Database Maintenance\",\r\n \"cleaner\" => \"Cleaner\",\r\n );\r\n\r\n $returncode = 0;\r\n\r\n check_args();\r\n\r\n\r\n // base url to access the backend\r\n $url_base = $url . \"/backend/\";\r\n\r\n // common options used to access backend\r\n $query = \"username=\" . $username . \"&ticket=\" . $ticket;\r\n\r\n // mode-specific options\r\n switch ($mode) {\r\n case \"corecomponents\":\r\n default:\r\n $query .= \"&cmd=getsysstat\";\r\n break;\r\n }\r\n\r\n // generate full url to use\r\n $xiurl = $url_base . \"?\" . $query;\r\n\r\n if ($debug)\r\n echo \"ACCESSING URL: $xiurl\\n\";\r\n\r\n $opts = array(\r\n \"method\" => \"post\",\r\n \"return_info\" => true,\r\n \"timeout\" => $timeout,\r\n );\r\n\r\n $result = load_url($xiurl, $opts);\r\n\r\n if ($debug) {\r\n echo \"RESULT:\\n\";\r\n print_r($result);\r\n }\r\n\r\n // check for errors\r\n if (isset($result['error']) && $result['error'] == true) {\r\n echo \"Error: Unable to contact XI server backend at \" . $url . \"\\n\";\r\n exit(2);\r\n }\r\n\r\n // parse output\r\n $body = $result['body'];\r\n $xml = @simplexml_load_string($body);\r\n if (!$xml) {\r\n echo \"Error: Could not parse XML from \" . $url . \" (\" . $body . \")\\n\";\r\n exit(2);\r\n }\r\n\r\n // check for authentication, command errors\r\n if ($xml->error) {\r\n $msg = strval($xml->error->errormsg);\r\n echo \"Error: Received error from XI server backend (\" . $msg . \")\\n\";\r\n exit(2);\r\n }\r\n\r\n if ($debug)\r\n echo \"XML DATA LOOKS OK\\n\";\r\n\r\n // handle mode\r\n switch ($mode) {\r\n\r\n case \"daemons\":\r\n\r\n $output = \"\";\r\n $total = 0;\r\n $daemonlist = \"\";\r\n\r\n foreach ($xml->daemons->daemon as $d) {\r\n\r\n $total++;\r\n\r\n if ($debug)\r\n echo \"DAEMON: \" . $d->name . \"=\" . $d->status . \"\\n\";\r\n\r\n $name = strval($d->name);\r\n $status = intval($d->status);\r\n\r\n if ($daemonlist != \"\")\r\n $daemonlist .= \", \";\r\n $daemonlist .= $name;\r\n\r\n // get a friendly name\r\n $fname = \"\";\r\n if (array_key_exists($name, $components))\r\n $fname = $components[$name];\r\n\r\n // handle errors;\r\n if ($status != 0) {\r\n if ($output != \"\")\r\n $output .= \", \";\r\n $output .= $name;\r\n if ($fname != \"\")\r\n $output .= \" (\" . $fname . \")\";\r\n $output .= \" stopped\";\r\n // performance grapher gets a warning\r\n if ($name == \"npcd\")\r\n $returncode = 1;\r\n // everything else gets a critical\r\n else\r\n $returncode = 2;\r\n }\r\n }\r\n\r\n // no daemons were found\r\n if ($total == 0) {\r\n $output = \"No daemon information found.\";\r\n $returncode = 3;\r\n } // no problems\r\n else if ($output == \"\") {\r\n //$output=\"All daemons (\".$daemonlist.\") are running okay.\";\r\n $output = \"All daemons are running okay.\";\r\n }\r\n\r\n echo $output . \"\\n\";;\r\n\r\n break;\r\n\r\n case \"jobs\":\r\n\r\n $output = \"\";\r\n $total = 0;\r\n $joblist = \"\";\r\n\r\n $now = time();\r\n\r\n foreach ($jobs as $jn => $jfn) {\r\n\r\n if ($debug)\r\n echo \"CHECKING JOB $jn ($jfn)\\n\";\r\n\r\n $lci = intval($xml->$jn->last_check);\r\n\r\n // error\r\n if ($lci == 0) {\r\n if ($output != \"\")\r\n $output .= \", \";\r\n $output .= $jfn . \" (\" . $jn . \") stale\";\r\n } else {\r\n\r\n $total++;\r\n\r\n $diff = $now - $lci;\r\n\r\n // defaults\r\n $warn = 90;\r\n $crit = 300;\r\n\r\n // db maintenance has longer interval\r\n $warn = 360;\r\n $crit = 900;\r\n\r\n // warning\r\n if ($diff > $warn) {\r\n $returncode = 1;\r\n if ($output != \"\")\r\n $output .= \", \";\r\n $output .= $jfn . \" (\" . $jn . \") stale (\" . $diff . \" seconds old)\";\r\n }\r\n\r\n // critical\r\n if ($diff > $crit) {\r\n $returncode = 2;\r\n if ($output != \"\")\r\n $output .= \", \";\r\n $output .= $jfn . \" (\" . $jn . \") stale (\" . $diff . \" seconds old)\";\r\n }\r\n }\r\n }\r\n\r\n // no daemons were found\r\n if ($total == 0) {\r\n $output = \"No job information found.\";\r\n $returncode = 3;\r\n } // no problems\r\n else if ($output == \"\") {\r\n $output = \"All jobs are running okay.\";\r\n }\r\n\r\n echo $output . \"\\n\";;\r\n\r\n break;\r\n\r\n case \"iowait\":\r\n\r\n $output = \"\";\r\n\r\n $iowait = floatval($xml->iostat->iowait);\r\n\r\n $w = floatval($warn);\r\n $c = floatval($crit);\r\n\r\n if ($iowait >= $c) {\r\n $returncode = 2;\r\n $output = \"Critical:\";\r\n } else if ($iowait >= $w) {\r\n $returncode = 1;\r\n $output = \"Warning:\";\r\n } else\r\n $output = \"Ok:\";\r\n\r\n $output .= \" I/O Wait = \" . $iowait . \"%|iowait=\" . $iowait . \"%;\" . $w . \";\" . $c . \";;\\n\";\r\n\r\n echo $output;\r\n\r\n break;\r\n\r\n case \"load\":\r\n\r\n $output = \"\";\r\n\r\n $load1 = floatval($xml->load->load1);\r\n $load5 = floatval($xml->load->load5);\r\n $load15 = floatval($xml->load->load15);\r\n\r\n $wvals = explode(\",\", $warn);\r\n $cvals = explode(\",\", $crit);\r\n\r\n for ($x = 0; $x <= 2; $x++) {\r\n $w = floatval($wvals[$x]);\r\n $c = floatval($cvals[$x]);\r\n\r\n if ($x == 0) {\r\n if ($load1 >= $c)\r\n $returncode = 2;\r\n else if ($load1 >= $w)\r\n $returncode = 1;\r\n } else if ($x == 1) {\r\n if ($load5 >= $c)\r\n $returncode = 2;\r\n else if ($load5 >= $w)\r\n $returncode = 1;\r\n } else if ($x == 2) {\r\n if ($load15 >= $c)\r\n $returncode = 2;\r\n else if ($load15 >= $w)\r\n $returncode = 1;\r\n }\r\n }\r\n\r\n if ($returncode == 2)\r\n $output = \"Load Critical:\";\r\n else if ($returncode == 1)\r\n $output = \"Load Warning:\";\r\n else\r\n $output = \"Load Ok:\";\r\n\r\n $output .= \" load1=\" . $load1 . \", load5=\" . $load5 . \", load15=\" . $load15 . \"|load1=\" . $load1 . \";\" . $wvals[0] . \";\" . $cvals[0] . \";; load5=\" . $load5 . \";\" . $wvals[1] . \";\" . $cvals[1] . \";; load15=\" . $load15 . \";\" . $wvals[2] . \";\" . $cvals[2] . \";;\\n\";\r\n\r\n echo $output;\r\n\r\n break;\r\n\r\n default:\r\n echo \"Error: Unknown mode '\" . $mode . \"' specified.\\n\";\r\n $returncode = 3;\r\n break;\r\n }\r\n\r\n\r\n // everything is okay, but we should never get here...\r\n exit($returncode);\r\n}", "public function getCorporativos() {\n $this->consulta = \"SELECT usuario.idUsuario, usuario.idCorporativo, \n corporativo.razonSocial, usuario.login, \n usuario.fechaHoraUltIN, usuario.estado \n FROM usuario \n INNER JOIN corporativo ON usuario.idCorporativo = corporativo.idCorporativo \n WHERE usuario.tipoUsuario = 'Cliente Corporativo'\";\n if ($this->consultarBD() > 0) {\n $this->mensaje = 'Seccion Usuarios Corporativos <br> Registros Encontrados: <b>' . count($this->registros) . '</b>';\n return true;\n } else {\n return false;\n }\n }", "public function Consultar(){\n require_once 'view/include/cabecera_usuario.php';\n require_once 'view/mostrar_estadobien.php';\n require_once 'view/include/pie_mostrar.php';\n }", "public function getAllInstalledAvailableStable(){\r\n\t\t$extDir = Constants::EXT_DIR.DS;\r\n\r\n\t\tif( !isset($this->_config['modules'])){\r\n\t\t\treturn [];\r\n\t\t}\r\n\r\n\t\t$vendors = $this->_config['modules'];\r\n\r\n\t\t$allTables = []; \r\n\t\tforeach($vendors as $keyVendor => $modules){\r\n\t\t\tforeach($modules as $module){\r\n\t\t\t\t\r\n\t\t\t\t$modDir = $extDir . $keyVendor . DS . $module;\r\n\t\t\t\t$tableDir = $modDir.Constants::MODULE_DB_TABLES_DIR;\r\n\r\n\t\t\t\t$extName = $keyVendor . '_' . $module;\r\n\t\t\t\t$allTables[$extName] = [];\r\n\r\n\t\t\t\tif(is_dir($tableDir)){\r\n\t\t\t\t\t$files = scandir($tableDir);\r\n\t\t\t\t\tforeach ($files as $key => $table) {\r\n\t\t\t\t\t\tif($table == '.' || $table == '..' || $this->checkIfFileIsData($table)){\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t$targetFile = $tableDir . DS . $table;\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t$tableContent = file_get_contents($targetFile);\r\n\t\t\t\t\t\t\t$tableContent = json_decode($tableContent, true);\r\n\r\n\t\t\t\t\t\t\tif(json_last_error() == JSON_ERROR_NONE){\r\n\t\t\t\t\t\t\t\t$tableName = $this->getTableNameFromFileName($targetFile);\r\n\t\t\t\t\t\t\t\t$dbTableName = $this->_connection->getTablename($tableName);\r\n\r\n\t\t\t\t\t\t\t\t$isExist = $this->fetchTableName($dbTableName);\r\n\t\t\t\t\t\t\t\t$tableContent['is_installed'] = false;\r\n\t\t\t\t\t\t\t\tif($isExist){\r\n\t\t\t\t\t\t\t\t\t$tableContent['is_installed'] = true;\r\n\t\t\t\t\t\t\t\t}\r\n \r\n\t\t\t\t\t\t\t\t$tableContent['prefixed_tablename'] = $dbTableName;\r\n\t\t\t\t\t\t\t\t$allTables[$extName][$tableName] = $tableContent;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcatch (\\Exception $e) {\r\n\t\t\t\t\t\t\t/** do nothing */\r\n\t\t\t\t\t\t} \r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn $allTables;\r\n\t}", "function verArchivos() {\n\t\t$archivos_incluidos = get_included_files();\n\t\techo \"<pre>\";\n\t\tprint_r( $archivos_incluidos );\n\t\techo \"</pre>\";\n\t}", "function pre_install()\n\t{\n\t\t//-----------------------------------------\n\t\t// Installing, or uninstalling?\n\t\t//-----------------------------------------\n\t\t\n\t\t$type = ( $this->ipsclass->input['un'] == 1 ) ? 'uninstallation' : 'installation';\n\t\t$text = ( $this->ipsclass->input['un'] == 1 ) ? 'Uninstalling' : 'Installing';\n\t\t\n\t\t//-----------------------------------------\n\t\t// Page Info\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->ipsclass->admin->page_title = \"(FSY23) Universal Mod Installer: XML Analysis\";\n\t\t$this->ipsclass->admin->page_detail = \"The mod's XML file has been analyzed and the proper {$type} steps have been determined.\";\n\t\t$this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code.'&code=view', 'Manage Mod Installations' );\n\t\t$this->ipsclass->admin->nav[] = array( '', $text.\" \".$this->xml_array['mod_info']['title']['VALUE'] );\n\t\t\n\t\t//-----------------------------------------\n\t\t// Show the output\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->start_table( $this->xml_array['mod_info']['title']['VALUE'] );\n\t\t\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic( \"<span style='font-size: 12px;'>Click the button below to proceed with the mod $type.<br /><br /><input type='button' class='realbutton' value='Proceed...' onclick='locationjump(\\\"&amp;{$this->ipsclass->form_code}&amp;code=work&amp;mod={$this->ipsclass->input['mod']}&amp;un={$this->ipsclass->input['un']}&amp;step=0&amp;st={$this->ipsclass->input['st']}\\\")' /></span>\", \"center\" );\n\t\t\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->end_table();\n\t\t\n\t\t$this->ipsclass->admin->output();\n\t}", "public function getSystemStatus() {}", "public function consultarCatalogTut() {\n \t\t$existen = false;\n \t\t$this->conn = new Conexion('../../php/datosServer.php');\n\t\t\t$this->conn = $this->conn->conectar();\n\t\t\t\n\t\t\t\t $sql = \"CALL consultarCatalog('tutores');\"; \n\t\t\t\t\t$info = '<div class=\"animated fadeInDown BtnShadow\" id=\"resultados\">\n\t\t\t\t\t<span class=\"label warning\" style=\"margin: 8px;\"><i class=\"fa fa-list-alt fa-lg\"></i> Catálogo de Tutores</span><br>\n\t\t\t\t\t\t <div class=\"form-item\">\n\t\t\t\t\t <input data-tipso=\"Escribe una palabra clave.\" type=\"text\" id=\"resultados\" placeholder=\"Filtrar Resultados\" class=\"filterBoxy\">\n\t\t\t\t\t </div>\t\t\t\t\n\t\t\t\t\t<table class=\"flat tableLines\">\n \t \t\t\t\t<tr class=\"titleTable\"><th>RFC</th>\n\t\t\t \t\t<th>Nombre</th>\n\t\t\t \t\t<th>Activo</th>\n\t\t\t\t\t\t<th>Correo</th>\n\t\t\t\t\t\t<th>Carrera</th></tr><tbody id=\"resultadoBus\">';\n\t\n\t\t\t\n\t\t\t$result = $this->conn->query($sql);\n if ($result->num_rows > 0) {\n while($row = $result->fetch_array(MYSQLI_NUM)) {\n \t$info .= '<tr><td style=\"color: #400101;\">'.$row[0].'</td>'.\n \t\t'<td><b>'.$row[1].' '.$row[2].' '.$row[3].'</b></td>';\n \t$info .= ($row[4] == 1 ? '<td><span class=\"label success\">SI</span></td>' : '<td><span class=\"label error\">NO</span></td>');\n \t$info .= '<td>'.$row[5].'</td>'.'<td>'.$row[6].'</td></tr>';\n \t}\n \t$info .= '</tbody></table></div>';\n \t\n \t$info .= '\n\t\t\t\t\t\t\t<script type=\"text/javascript\" src=\"../js/table-filter.js\"></script> \t\n \t';\n $existen = true;\n }\n \n if($existen == true) {\n \t\techo $info;\n \t}else echo -1;\n $this->conn->close();\n \t\t}", "public function check_addon_status()\n {\n $checker = array('unique_identifier' => $this->unique_identifier);\n $this->db->where($checker);\n $addon_details = $this->db->get('addons')->row_array();\n if ($addon_details['status']) {\n return true;\n } else {\n redirect(site_url(), 'refresh');\n }\n }", "public function verExistencias(){\n \ttry{\n $existencias = \\DB::select('call listar_existencias_almacen()');\n $ok = true;\n }catch(QueryException $ex){\n $existencias = null;\n $ok = false;\n }\n\n $rtn = [\n 'ok' => $ok,\n 'result' => $existencias\n ];\n\n return response()->json($rtn, 200);\n }", "public function publicacaoMostrar()\r\n {\r\n try\r\n {\r\n $resposta = $this->conexao->Conectar()->prepare(\" SELECT id_missao, onde, data,(SELECT usuario FROM tbusuario \"\r\n . \" WHERE tbmissao.id_usuario = tbusuario.id_usuario) AS id_usuario, status,descricao FROM tbmissao WHERE status = '0'\");\r\n if($resposta->execute())\r\n {\r\n return $resposta->fetchAll();\r\n }\r\n else\r\n {\r\n return false;\r\n }\r\n }\r\n catch (PDOException $e)\r\n {\r\n return $e->getMenssage();\r\n }\r\n }", "static function installVerif($em) {\n $repository = $em->getRepository('maindbBundle:Role');\n $rolesOk = false;\n $roles = $repository->findAll();\n if ($roles && sizeof($roles) == 3 && $roles[0]->getId() == 1 && $roles[0]->getNom() == 'user' && $roles[1]->getId() == 2 && $roles[1]->getNom() == 'team leader' && $roles[2]->getId() == 3 && $roles[2]->getNom() == 'administrator') {\n $rolesOk = true;\n }\n if ($rolesOk) {\n return (1);\n }\n else {\n return (-1);\n }\n }", "public function checkInstalled() {\n $query = $this->db->query(sprintf('SHOW TABLES LIKE \"%s\"',\n Config::getTableName('requests')));\n $request_table_result = $query->rowCount();\n\n $query = $this->db->query(sprintf('SHOW TABLES LIKE \"%s\"',\n Config::getTableName('users')));\n $user_table_result = $query->rowCount();\n\n if ($request_table_result > 0 || $user_table_result > 0) {\n return true;\n } else {\n return false;\n }\n }", "function cargar_informacion_reducida()\n\t{\n\t\t// Cabecera del proyecto\n\t\t$this->manejador_interface->mensaje('Cargando datos globales', false);\n\t\t$archivo = $this->get_dir_tablas() . '/apex_proyecto.sql';\n\t\t$this->db->ejecutar_archivo( $archivo );\n\t\t$this->manejador_interface->mensaje('.OK');\n\t\t// Grupos de acceso y permisos\n\t\t$this->cargar_perfiles();\n\t}", "public function compoList(){\n\t\t\n\t\t/*Load all components data from the status page via the curl req function in this class */\n\t\t\n\t\t$req = $this -> curl_req(\"GET\", \"api/v1/components\"); \n\t\t\n\t\t/* Check if the transaction was successfull and pass the data else return false */\n\t\t\n\t\treturn ($req[1]['http_code'] === 200) ? $req[0] : false;\t\t\n\t}", "function VM_getStatus($clientName)\n{\n\t$info = VM_getSWandHost($clientName);\n\n\t//Create the status command string and execute it on the VM host\n\t$cmd = VM_status($info['vmSoftware'], $clientName);\n\n// \tprint(\"<pre>$cmd</cmd>\");\n\n\t$ret = CLIENT_executeOnClientOrIP($info['vmHost'],\"VM_status\",\"$cmd\",\"m23-vbox\",false);\n\treturn(VM_parseStatus($info['vmSoftware'],$ret));\n}", "public function afficheAdministrateurs(){\r\n //Requete\r\n $sql4=$this->db->conn_id->prepare (\"SELECT * FROM view_admin\");\r\n $sql4->execute();\r\n $compte_admin=$sql4->fetchAll();//Execution total\r\n //ferme la connexion\r\n //$this->db=null;\r\n return $compte_admin;\r\n }", "function mainPull()\n {\n x_echoFlush('<pre>');\n x_EchoFlush('<h2>Looking For Andromeda Version</h2>');\n x_EchoFlush(\"\");\n\n // First take care of where we are pulling version\n // information from\n $def = \"http://andro.svn.sourceforge.net/svnroot/andro/releases/\";\n $row = SQL_OneRow(\n \"Select * from applications where application='andro'\"\n );\n if (!isset($row['svn_url'])) {\n x_EchoFlush(\"-- This looks like the first time this node has\");\n x_EchoFlush(\" been upgraded from Subversion. Using default\");\n x_echoFlush(\" URL to look for releases:\");\n x_EchoFlush(\" \".$def);\n $url = $def;\n } else {\n if (is_null($row['svn_url']) || trim($row['svn_url'])=='') {\n x_EchoFlush(\"-- Setting the Subversion URL to default:\");\n x_EchoFlush(\" \".$def);\n $url = $def;\n $row['svn_url'] = $def;\n SQLX_Update('applications', $row);\n } else {\n $url = trim($row['svn_url']);\n x_EchoFlush(\"-- Using the following URL for Subversion:\");\n x_EchoFlush(\" \".$url);\n }\n }\n\n // Find out what the latest version is\n x_EchoFlush(\"\");\n x_EchoFlush(\"-- Querying for latest version...\");\n $command = 'svn list '.$url;\n x_EchoFlush(\" Command is: \".$command);\n $rawtext = `$command`;\n if ($rawtext=='') {\n x_EchoFlush(\"-- NO VERSIONS RETRIEVED!\");\n x_EchoFlush(\" It may be that the Sourceforge site is down?\");\n x_EchoFlush(\"\");\n x_echoFlush(\" ---- Stopped Unexpectedly --- \");\n return;\n }\n $rawtext = str_replace(\"\\r\", \"\", $rawtext);\n $lines = explode(\"\\n\", $rawtext);\n // Pop off empty entry at end, then get latest version\n array_pop($lines);\n $latest=array_pop($lines);\n if (substr($latest, -1)=='/') {\n $latest = substr($latest, 0, strlen($latest)-1);\n }\n\n x_EchoFlush(\" Latest published version: \".$latest);\n\n // now find out what version we have\n x_EchoFlush(\" \");\n x_EchoFlush(\"-- Finding out what version the node manager is at\");\n $file=$GLOBALS['AG']['dirs']['application'].'_andro_version_.txt';\n x_EchoFlush(\" Looking at file: $file\");\n if (!file_exists($file)) {\n x_EchoFlush(\" File not found, it appears this is the first time\");\n x_EchoFlush(\" this node has been upgraded this way. Will proceed\");\n x_EchoFlush(\" to get latest version.\");\n } else {\n $version = file_get_contents($file);\n x_EchoFlush(\" Current version is \".$version);\n \n if ($version == $latest) {\n x_echoFlush(\" This node is current! Nothing to do!\");\n x_EchoFlush(\"\");\n x_echoFlush(\" ---- Processing completed normally ---- \");\n return;\n } else {\n x_echoFlush(\" Newer version available, will get latest.\");\n }\n }\n \n // now get the latest code\n $dir = $GLOBALS['AG']['dirs']['root'];\n $command = 'svn export --force '.$url.$latest.' '.$dir;\n x_EchoFlush(\"\");\n x_EchoFlush(\"-- Overwriting Node Manager now\");\n x_echoFlush(\" Command is \".$command);\n `$command`;\n x_echoFlush(\"\");\n file_put_contents($file, $latest);\n x_EchoFlush(\" ---- Processing completed normally ---- \");\n\n }", "public function testComAdobeGraniteQueriesImplHcQueriesStatusHealthCheck()\n {\n $client = static::createClient();\n\n $path = '/system/console/configMgr/com.adobe.granite.queries.impl.hc.QueriesStatusHealthCheck';\n\n $crawler = $client->request('POST', $path);\n }", "public function app_version_get(){\n $data = $this->model->getAllwhere('app_version_history','','versioncode,versionname','id','DESC','1');\n\n $resp = array('rccode' => 1, 'version' => !empty($data) ? $data[0]:[]); \n $this->response($resp);\n \n }", "function ListarModuloOpcion() {\n\t\n\t\t\t$sql = \"SELECT * FROM modulo\";\n\t\t\t$db = new conexion();\n\t\t\t$result = $db->consulta($sql);\n\t\t\t$num = $db->encontradas($result);\n\t\t\t$respuesta->datos_modulo = [];\n\t\t\t$respuesta->datos_opcion = [];\n\t\t\t$respuesta->mensaje = \"\";\n\t\t\t$respuesta->codigo = \"\";\n\t\t\tif ($num != 0) {\n\t\t\t\tfor ($i=0; $i < $num; $i++) {\n\t\t\t\t\t$respuesta->datos_modulo[] = mysql_fetch_array($result);\n\t\t\t\t}\n\t\t\n\t\t\t\t$sql = \"SELECT * FROM opcion\";\n\t\t\t\t$db = new conexion();\n\t\t\t\t$result = $db->consulta($sql);\n\t\t\t\t$num = $db->encontradas($result);\n\t\t\n\t\t\t\tif ($num != 0) {\n\t\t\t\t\tfor ($i=0; $i < $num; $i++) {\n\t\t\t\t\t\t$respuesta->datos_opcion[] = mysql_fetch_array($result);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\n\t\t\t\t$respuesta->mensaje = \"Ok\";\n\t\t\t\t$respuesta->codigo = 1;\n\t\t\t} else {\n\t\t\t\t$respuesta->mensaje = \"No existen modulos.\";\n\t\t\t\t$respuesta->codigo = 0;\n\t\t\t}\n\t\t\treturn json_encode($respuesta);\n\t\t}" ]
[ "0.6170189", "0.5949224", "0.5833679", "0.5832849", "0.5796465", "0.57706505", "0.5766823", "0.5765556", "0.5758209", "0.56835", "0.558471", "0.5571547", "0.5513512", "0.5475244", "0.54690003", "0.5465753", "0.5436823", "0.5435033", "0.5427798", "0.5415151", "0.54082984", "0.5407753", "0.53988177", "0.5396218", "0.5396207", "0.5391727", "0.5353239", "0.5341284", "0.53380847", "0.53319526", "0.53240836", "0.5310498", "0.52938133", "0.52926695", "0.5275835", "0.5271477", "0.5252193", "0.524728", "0.5246403", "0.5245492", "0.5244687", "0.5244525", "0.52348566", "0.52322286", "0.5228864", "0.52285445", "0.5222148", "0.522091", "0.52116895", "0.52077943", "0.520004", "0.519257", "0.5192429", "0.5189111", "0.5184462", "0.5174482", "0.5174443", "0.5171718", "0.51715", "0.51715", "0.5168717", "0.51653945", "0.5163731", "0.5162283", "0.51617134", "0.5158059", "0.51492405", "0.5142133", "0.5141292", "0.51395", "0.5137009", "0.51348335", "0.51305604", "0.5128444", "0.5127536", "0.5127494", "0.512596", "0.51253855", "0.512485", "0.5119943", "0.5118755", "0.5118081", "0.5115592", "0.51123077", "0.5109372", "0.5109218", "0.5102642", "0.5096357", "0.5096229", "0.50958234", "0.50953853", "0.5090525", "0.50738984", "0.5073459", "0.5073274", "0.50721204", "0.5069838", "0.506965", "0.50685364", "0.50675404", "0.5061425" ]
0.0
-1
Display a listing of the resource.
public function index(Request $request) { $parametros = self::filtroEstatico($request, 'imagem.index', ['ativo' => 1]); $model = Imagem::search($parametros)->orderBy('codimagem', 'DESC')->paginate(30); return view('imagem.index', compact('model')); }
{ "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
Carrega Model do Produto
public function produtoStore(Request $request, $id) { $model = Produto::find($id); // Carrega Imagens do SLIM $images = Slim::getImages(); if (!isset($images[0])) { abort(500, 'Nenhuma imagem informada!'); } $image = $images[0]; // Se tipo for diferente de JPEG if ($image['input']['type'] != 'image/jpeg') { abort(500, 'Imagem deve ser um JPEG!'); } // Salva para ganhar o ID $imagem = new Imagem(); $imagem->save(); // Grava nome do arquivo nas observacoes $arquivo = "{$imagem->codimagem}.jpg"; $imagem->observacoes = $arquivo; $imagem->arquivo = $arquivo; $imagem->save(); // Anexa imagem ao produto $ret = $model->ImagemS()->attach($imagem->codimagem); // Anexa imagem as variacoes sem imagem $sql = ' update tblprodutovariacao set codprodutoimagem = ( select i.codprodutoimagem from tblprodutoimagem i where i.codimagem = :codimagem and i.codproduto = tblprodutovariacao.codproduto ) where codprodutoimagem is null and codproduto = :codproduto '; DB::update($sql, [ 'codimagem' => $imagem->codimagem, 'codproduto' => $model->codproduto ]); // Salva o arquivo Slim::saveFile($image['output']['data'], $arquivo, './public/imagens', false); // Se havia alguma imagem para inativar if($request->get('imagem')) { $imagem_inativa = Imagem::find($request->get('imagem')); $imagem_inativa->inativo = Carbon::now(); $imagem_inativa->save(); $model->ImagemS()->detach($request->get('imagem')); } // Redireciona Session::flash('flash_update', 'Imagem inserida.'); return redirect("produto/$id"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function __construct(){\n $this->toko = new M_Toko();\n $this->produk = new M_Produk(); //variabel model merupakan objek baru yang dibuat dari class model\n }", "public function model()\n {\n return ParametroEmpresa::class;\n }", "function contador_proyectoI(){\r\n $contadorProyectoI= new ContadorEstuModel();\r\n return $contadorProyectoI->contadorProyectoI();\r\n }", "public function model()\n {\n return Projeto::class;\n }", "function hola(){\n $pruebas = new model_pruebas(\"bd\");\n $pruebas->pruebas();\n }", "public function __construct()\n {\n $this->profil = new ProfilModel();\n /* Catatan:\n Apa yang ada di dalam function construct ini nantinya bisa digunakan\n pada function di dalam class Product \n */\n }", "public function model()\n {\n return Pescaria::class;\n }", "function __construct()\n\t{\n\t\t// this->model = new Producto();\n\t}", "public function __construct() {\n $this->pengguna = new MsPenggunaModel();\n /* Catatan:\n Apa yang ada di dalam function construct ini nantinya bisa digunakan\n pada function di dalam class Product \n */\n }", "public function __construct()\n {\n $this->pelanggan = new PelangganModel();\n /* Catatan:\n Apa yang ada di dalam function construct ini nantinya bisa digunakan\n pada function di dalam class Product \n */\n }", "public function model()\n {\n return Movimento::class;\n }", "function __construct(){\n parent::__construct(\"ModelPaciente\");\n }", "public function model()\n {\n return Pedidos::class;\n }", "public function getModel()\r\n {\r\n\r\n return new Penias();\r\n\r\n\r\n }", "public function getPRODUTOS()\n {\n return $this->hasOne(Produto::className(), ['ID' => 'PRODUTOS_ID']);\n }", "public function __construct() {\n\t\t\t$this->modelName = 'concreeeeeete';\n\t\t}", "protected function _getProduto(){\n if (!is_object($this->_produto)){\n $this->_produto = new Vendas_Model_Produto_Mapper();\n }\n return $this->_produto;\n }", "public function model()\n {\n return TipoContrato::class;\n }", "public function __CONSTRUCT(){\n $this->model = new Estadobien();\n }", "public function __construct(){\n $this->productos = new Producto();\n }", "public function __construct() {\n $this->noticia_modelo = $this->modelo('NoticiaModelo');\n }", "public function model()\n {\n return PejabatDaerah::class;\n }", "public function prodi(){\n\t\treturn $this->hasMany(Prodi::class, \"id_jurusan\", \"id\");\n\t}", "public function model($nome){\r\n\r\n\t\t\t#procura arquivo do model\r\n\t\t\tif(file_exists(\"model/{$nome}.php\")){\r\n\t\t\t\tinclude_once \"model/{$nome}.php\";\r\n\t\t\t} else {\r\n\t\t\t\tdie(\"Model {$nome} não encontrado na pasta modelos\");\r\n\t\t\t}\r\n\r\n\t\t\t#instancia o arquivo caso encontrado\r\n\t\t\t$this->$nome = new $nome();\r\n\t\t}", "public function __construct() {\n $this->porcentajesCursoModel = $this->model('PorcentajesCursoModel');\n $this->tipoModuloModel = $this->model('TipoModuloModel');\n $this->cursoModel = $this->model('CursoModel');\n }", "public function tipoProduto()\n {\n return $this->belongsTo(TipoProduto::class, 'tipo_produto_id', 'id');\n }", "public function getPkProduto()\n {\n return $this->hasOne(Produto::className(), ['id' => 'pk_produto']);\n }", "public function relasiProdi()\n {\n return $this->belongsTo(\n 'PMW\\Models\\Prodi',\n 'id_prodi');\n }", "public function __construct(){\n\t\t\t$this->productoDetalleModelo = new productoDetalleModelo;\n\t\t\t$this->productoFavoritoControlador = new productoFavoritoControlador();\n\t\t\t$this->productoEstrellaControlador = new productoEstrellaControlador();\n\t\t\t$this->productoCarritoControlador = new productoCarritoControlador();\n\t\t}", "public function getModelo(){ return $this->modelo;}", "public function __construct()\n {\n $this->model= new Estudiante;\n $this->curso= new Curso;\n $this->usuario= new Usuario;\n $this->centrointeres= new Centrointeres;\n $this->clase= new Clase;\n $this->grado = new Grado;\n $this->asistencia= new Asistencia;\n }", "function __construct() {\n\t\t$this->cotizacionModel = new cotizacionModel();\n\t}", "public function model()\n {\n return ProfessorResponsavelCurso::class;\n }", "public function mObjetivo()\n {\n return $this->belongsTo('App\\Models\\MObjetivo', 'equipo_id', 'id');\n }", "function __construct() {\n $this->loteModel = new loteModel();\n }", "public function __construct() {\n $this->adminProveedorModelo = new adminProveedorModelo();\n }", "function __construct(){\n\t\t$this -> modelo = new usuarioBss();\n\t}", "public function model()\n {\n return AnggotaKeluarga::class;\n }", "public function __construct() {\n\t\t$this->empleadoModel = $this->model('Empleado');\n\t}", "public function prodi() {\n return $this->belongsTo( 'App\\Prodi', 'kd_prodi', 'kd_prodi' );\n }", "public function model()\n {\n return Localidade::class;\n }", "function __construct(){\n \t$this->comentario = new Comentarios();\n\n }", "public function getModel(){ }", "public function model()\n {\n return Modalidade::class;\n }", "public function model()\n {\n return Modalidade::class;\n }", "public function __construct($id=null){\n\t\tif($id==null){\n\t\t\t$this->_model_poliza = new Model_Poliza();\n\t\t\t$this->_model_poliza_valores = new Model_PolizaValores();\n\t\t\t$this->_mode_detalle_poliza = null; //Aca todavia no se el tipo de poliza, no puedo traer el modelo asociado\n\n\t\t}else{\n\n\t\t\t$model_poliza = new Model_Poliza();\n\t\t\t$model_poliza_valores = new Model_PolizaValores();\n\n\t\t\t$this->_model_poliza = $model_poliza->getTable()->find($id) ;\n\t\t\t$this->_model_poliza_valores = $model_poliza_valores->getTable()->find($this->_model_poliza->poliza_valores_id);\n\t\t\t//En este caso tengo el tipo de poliza ergo traigo el detalle correspondiente\n\t\t\t$this->_model_detalle_poliza = $this->getModelDetallePoliza($this->_model_poliza->tipo_poliza_id);\n\t\t}\n\n\t\t//como tengo varios modelos en esta clase tengo que instanciar primero el Modelo\n\t\t//Principal, luego traer los id de los otros modelos e instanciarlos\n\t\t//$model_poliza_valores = new Model_PolizaValores();\n\t\t//$this->_model_poliza_valores = ($id==null)?new $model_poliza_valores: $model_poliza->getTable()->find($id) ;\n\n\t}", "abstract function getModel();", "protected function _getParcela(){\n if (!is_object($this->_parcela)){\n $this->_parcela = new Vendas_Model_Parcela_Mapper();\n }\n return $this->_parcela;\n }", "public function proceso()\n {\n return $this->belongsTo(Proceso::class, 'FK_ECT_Proceso', 'PK_PCS_Id');\n }", "public function GruporModelo()\n\t\t{\n\t\t\t$id = \"\";\n\t\t\t$numero = \"\";\n\t\t\t$franja = \"\";\n\t\t}", "public function __construct() {\n $this->docenteModel = $this->model('DocenteModel');\n }", "public function setProducto($pro){ $this->producto = $pro;}", "public function produtos() \n \t{\n \t\treturn $this->belongsToMany(Produto::class);\n \t}", "function __construct() {\n\t //llamo al contructor de Controller.php\n\t parent::__construct();\n\n\t //instancio el modelo\n $this->modelo(array('cortos','ediciones','categorias'));\n\n\n\t}", "abstract public function getModel();", "public function __construct()\n {\n $this->modelpaises = new PaisesModel();\n $this->view = new DestinosPaisesView();\n }", "abstract protected function getModel();", "public function mojeObjave(){\n $korisnik = $this->session->get('korisnik');\n $objavaModel = new ObjavaModel();\n \n $data = [\n 'prikaz' => 'moje_objave',\n 'objave' => $objavaModel->where('idKor',$korisnik->idKor)->paginate(10),\n 'pager' => $objavaModel->pager,\n ];\n \n $this->prikaz('prikazPoStranicama', $data);\n \n }", "public function proyecto()\n {\n return $this->belongsTo('App\\Proyectos', 'proyecto_fk_rp', 'id_proyecto');\n }", "public static function proba(){\n \n $prodaja = new Application_Model_DbTable_Prodaja();\n \n //$upit=\"SELECT naziv_proizvoda FROM prodaja WHERE id=\".$id;\n \n //$rezultat=$db->query($upit);\n \n $select = $prodaja->select();\n \n $rezultat=$prodaja->fetchAll($select);\n \n return $rezultat;\n \n \n \n }", "public function getPessoa()\n { return $this->hasOne(PessoaFisica::className(), ['id' => 'pessoa'])->one(); }", "function miguel_MCourse() \r\n {\t\r\n $this->base_Model();\r\n }", "function __construct()\n {\n $this->pembeli = new Model_Pembeli();\n }", "public function __construct(){\n \n $pagini = new PaginaModel();\n $pagina = $pagini->pagina(100);\n $this->continut = $pagini->content;\n \n $pagini->inchideConexiune();\n }", "protected abstract function model();", "public function __construct() {\n\t\tparent::__construct();\n\t\t$this->dados = $this->funcoes_gerais->getConstantes($this->dados);\n\n $this->load->model('produto_model', 'produto'); \n $this->load->model('categoria_model', 'categoria'); \n\t}", "public function model()\n {\n return Empre::class;\n }", "public function carpeta(){\n return $this->hasOne('App\\CarpetaAdjuntos','id_carpeta_adjuntos','id_carpeta_adjuntos');\n }", "private function ObtenModelPost()\n\t{\n $item = new GrupoModel();\n\t\t$item->Id = sanitizar(obtenParametroArray($_POST, \"Id\", 0));\n\t\t$item->IdCiclo = sanitizar(obtenParametroArray($_POST, \"IdCiclo\", 0));\n\t\t$item->Ciclo = sanitizar(obtenParametroArray($_POST, \"Ciclo\", 0));\n\t\t$item->Nombre = sanitizar(obtenParametroArray($_POST, \"Nombre\", \"\"));\n\t\t// Sanitizarlos, porque no nos fiamos del cliente\n\t\t$item->Sanitize();\n\t\t\t\n\t\treturn $item;\n\t}", "public function producto() {\n return $this->belongsTo(Producto::class);\n }", "function __construct(){\n\t\t\t$this->model = new model(); //variabel model merupakan objek baru yang dibuat dari class model\n\t\t\t$this->model->table=\"tb_dosen\";\n\t\t}", "function\t__construct()\t{\n\t\t\t\t/* contrutor da classe pai */\n\t\t\t\tparent::__construct();\n\t\t\t\t/* abaixo deverão ser carregados helpers, libraries e models utilizados\n\t\t\t\t\t por este model */\n\t\t}", "public function getPessoa()\n {\n return $this->hasOne(Pessoas::className(), \n [\n 'id' => 'pessoa_id'\n \n ]);\n }", "function __construct() {\n parent::__construct();\n $this->load->model('pessoasModel', 'pessoasModel');\n $this->load->model('projetoModel', 'projetoModel');\n $this->load->model('programaModel','programaModel');\n }", "public function getProducto()\n {\n return $this->belongsTo(Producto::class, 'producto');\n }", "public function model()\n {\n return TipoNivelSistema::class;\n }", "public function __construct()\n {\n \t parent::__construct();\n \t $this->load->model('Modelo');\n }", "public function listado(){\n //return view('proveedores.listado', ['proveedores' => Proveedor::all()]);\n return Provincia::find(1)->with(['Pais'])->first(); \n }", "public function getModelDetallePoliza($tipo=null){\n\t\t$factory_detalle_poliza = new Domain_FactoryDetallePoliza();\n\t\t\n\t\t$tipo_poliza = Domain_TipoPoliza::getNameById($tipo);\n\t\techo $tipo_poliza;\n\t\t//Por ahora con los ids\n\t\tswitch ($tipo_poliza) {\n\t\t\tcase '1':\n\t\t\t\t\t\n\t\t\t\t$m_detalle_poliza_caucion = $factory_detalle_poliza->crearDetallePolizaCaucion();\n\t\t\t\t//Si no tiene poliza_id devuelve el modelo solo\n\t\t\t\tif($this->_model_poliza->poliza_id == null){\n\n\t\t\t\t\treturn $m_detalle_poliza_caucion;\n\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\treturn $m_detalle_poliza_caucion->getTable()\n\t\t\t\t->find($this->_model_poliza->poliza_detalle_id);\n\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\t//Aduaneros\n\t\t\tcase 'ADUANEROS':\n\t\t\t\t\t\n\t\t\t\t$m_detalle_poliza_aduaneros = $factory_detalle_poliza->crearDetallePolizaAduaneros();\n\t\t\t\t//Si no tiene poliza_id devuelve el modelo solo\n\t\t\t\tif($this->_model_poliza->poliza_id == null){\n\n\t\t\t\t\treturn $m_detalle_poliza_aduaneros;\n\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\treturn $m_detalle_poliza_aduaneros->getTable()\n\t\t\t\t->find($this->_model_poliza->poliza_detalle_id);\n\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t//Accidentes Personales\n\t\t\tcase 'ACCIDENTES_PERSONALES':\n\t\t\t\t\t\n\t\t\t\t$m_detalle_poliza = $factory_detalle_poliza->crearDetallePolizaAccidentesPersonales();\n\t\t\t\t//Si no tiene poliza_id devuelve el modelo solo\n\t\t\t\tif($this->_model_poliza->poliza_id == null){\n\n\t\t\t\t\treturn $m_detalle_poliza;\n\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\treturn $m_detalle_poliza->getTable()\n\t\t\t\t->find($this->_model_poliza->poliza_detalle_id);\n\t\t\t\t\t\n\t\t\t\tbreak;\n\n\t\t\t\t//Caucion - Construccion\n\t\t\tcase 'CONSTRUCCION':\n\t\t\t\t\t\n\t\t\t\t$m_detalle_poliza = $factory_detalle_poliza->crearDetallePolizaConstruccion();\n\t\t\t\t//Si no tiene poliza_id devuelve el modelo solo\n\t\t\t\tif($this->_model_poliza->poliza_id == null){\n\n\t\t\t\t\treturn $m_detalle_poliza;\n\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\treturn $m_detalle_poliza->getTable()\n\t\t\t\t->find($this->_model_poliza->poliza_detalle_id);\n\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\tcase 'ALQUILER':\n\t\t\t\t\t\n\t\t\t\t$m_detalle_poliza = $factory_detalle_poliza->crearDetallePolizaAlquiler();\n\t\t\t\t//Si no tiene poliza_id devuelve el modelo solo\n\t\t\t\tif($this->_model_poliza->poliza_id == null){\n\n\t\t\t\t\treturn $m_detalle_poliza;\n\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\treturn $m_detalle_poliza->getTable()\n\t\t\t\t->find($this->_model_poliza->poliza_detalle_id);\n\t\t\t\t\t\n\t\t\t\tbreak;\n\n\t\t\tcase 'RESPONSABILIDAD_CIVIL':\n\t\t\t\t\t\n\t\t\t\t$m_detalle_poliza = $factory_detalle_poliza->crearDetallePolizaResponsabilidadCivil();\n\t\t\t\t//Si no tiene poliza_id devuelve el modelo solo\n\t\t\t\tif($this->_model_poliza->poliza_id == null){\n\n\t\t\t\t\treturn $m_detalle_poliza;\n\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\treturn $m_detalle_poliza->getTable()\n\t\t\t\t->find($this->_model_poliza->poliza_detalle_id);\n\t\t\t\t\t\n\t\t\t\tbreak;\n\n\t\t\tcase 'TRANSPORTE_MERCADERIA':\n\t\t\t\t\t\n\t\t\t\t$m_detalle_poliza = $factory_detalle_poliza->crearDetallePolizaTransporteMercaderia();\n\t\t\t\t//Si no tiene poliza_id devuelve el modelo solo\n\t\t\t\tif($this->_model_poliza->poliza_id == null){\n\n\t\t\t\t\treturn $m_detalle_poliza;\n\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\treturn $m_detalle_poliza->getTable()\n\t\t\t\t->find($this->_model_poliza->poliza_detalle_id);\n\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 'IGJ':\n\t\t\t\t\t\n\t\t\t\t$m_detalle_poliza = $factory_detalle_poliza->crearDetallePolizaIGJ();\n\t\t\t\t//Si no tiene poliza_id devuelve el modelo solo\n\t\t\t\tif($this->_model_poliza->poliza_id == null){\n\n\t\t\t\t\treturn $m_detalle_poliza;\n\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\treturn $m_detalle_poliza->getTable()\n\t\t\t\t->find($this->_model_poliza->poliza_detalle_id);\n\t\t\t\t\t\n\t\t\t\tbreak;\t\n\t\t\t\t\n\t\t\tcase 'JUDICIALES':\n\t\t\t\t\t\n\t\t\t\t$m_detalle_poliza = $factory_detalle_poliza->crearDetallePolizaJudiciales();\n\t\t\t\t//Si no tiene poliza_id devuelve el modelo solo\n\t\t\t\tif($this->_model_poliza->poliza_id == null){\n\n\t\t\t\t\treturn $m_detalle_poliza;\n\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\treturn $m_detalle_poliza->getTable()\n\t\t\t\t->find($this->_model_poliza->poliza_detalle_id);\n\t\t\t\t\t\n\t\t\t\tbreak;\t\t\n\n\t\t\tcase 'VIDA':\n\t\t\t\t\t\n\t\t\t\t$m_detalle_poliza = $factory_detalle_poliza->crearDetallePolizaVida();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t//Si no tiene poliza_id devuelve el modelo solo\n\t\t\t\tif($this->_model_poliza->poliza_id == null){\n\n\t\t\t\t\treturn $m_detalle_poliza;\n\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\treturn $m_detalle_poliza->getTable()\n\t\t\t\t->find($this->_model_poliza->poliza_detalle_id);\n\t\t\t\t\t\n\t\t\t\tbreak;\n\n\n\t\t\t\t\tcase 'INTEGRAL_COMERCIO':\n\t\t\t\t\t\n\t\t\t\t$m_detalle_poliza = $factory_detalle_poliza->crearDetallePolizaIntegralComercio();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t//Si no tiene poliza_id devuelve el modelo solo\n\t\t\t\tif($this->_model_poliza->poliza_id == null){\n\n\t\t\t\t\treturn $m_detalle_poliza;\n\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\treturn $m_detalle_poliza->getTable()\n\t\t\t\t->find($this->_model_poliza->poliza_detalle_id);\n\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\n\t\t\t\t\tcase 'INCENDIO':\n\t\t\t\t\t\n\t\t\t\t$m_detalle_poliza = $factory_detalle_poliza->crearDetallePolizaIncendio();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t//Si no tiene poliza_id devuelve el modelo solo\n\t\t\t\tif($this->_model_poliza->poliza_id == null){\n\n\t\t\t\t\treturn $m_detalle_poliza;\n\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\treturn $m_detalle_poliza->getTable()\n\t\t\t\t->find($this->_model_poliza->poliza_detalle_id);\n\t\t\t\t\t\n\t\t\t\tbreak;\t\t\n\t\t\t\t\n\t\t\tcase 'AUTOMOTORES':\n\t\t\t\t\t\n\t\t\t\t$m_detalle_poliza_automotor = $factory_detalle_poliza->crearDetallePolizaAutomotor();\n\t\t\t\t//Si no tiene poliza_id devuelve el modelo solo\n\t\t\t\tif($this->_model_poliza->poliza_id == null){\n\n\t\t\t\t\treturn $m_detalle_poliza_automotor;\n\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\treturn $m_detalle_poliza_automotor->getTable()\n\t\t\t\t->find($this->_model_poliza->poliza_detalle_id);\n\n\t\t\t\tbreak;\n\t\t\t\t\t\n\n\t\t\tdefault:\n\t\t\t\t//echo \"nada todavia\"\t;\n\t\t\t\tbreak;\n\t\t}\n\n\n\n\t}", "public function productos()\n {\n return $this->belongsTo('App\\Models\\Producto');\n }", "function __construct()\n\t{\n\n\t\t$this->PantallaElectronicaModel = new PantallaElectronicaModel();\n\t\t$this->PantallaElectronicaModel->connect();\n\t}", "public function tipo_procesos()\n {\n return $this->belongsTo('App\\TipoProceso');\n }", "public function getModele()\n{\nreturn $this->modele;\n}", "public function geraClasseControle(){\n # Abre o template da classe Controle e armazena conteudo do modelo\t\t\n $modelo = Util::getConteudoTemplate('class.Modelo.Controle.tpl');\n\n # Abre o template dos metodos de cadastros e armazena conteudo do modelo\n $modeloCAD = Util::getConteudoTemplate('metodoCadastra.tpl');\n $modeloExclui = Util::getConteudoTemplate('metodoExclui.tpl');\n $modeloSelecionar = Util::getConteudoTemplate('metodoSeleciona.tpl');\n $modeloGetAll = Util::getConteudoTemplate('metodoGetAll.tpl'); \n $modeloConsultar = Util::getConteudoTemplate('metodoConsulta.tpl');\n $modeloAlterar = Util::getConteudoTemplate('metodoAltera.tpl');\n\n # Abre arquivo xml para navegacao\n $aBanco = simplexml_load_string($this->xml);\n\n # Varre a estrutura das tabelas\n $aRequire = $aCadastro = $aExclui = $aSelecionar = $aGetAll = $aAlterar = $aConsultar = array();\n $copiaModelo = $modelo;\n //print_r($aBanco);exit;\n foreach($aBanco as $aTabela){\n $aPKDoc = $aPK = array(); \n foreach($aTabela as $oCampo){\n if((string)$oCampo->CHAVE == '1'){\n $aPKDoc[] = \"\\t * @param integer \\$\".(string)$oCampo->NOME;\n $aPK[] = \"\\$\".(string)$oCampo->NOME;\n }\n }\n\n # Montar a Lista de DOC do metodo selecionar\n $listaPKDoc = join(\"\\n\", $aPKDoc);\n $listaPK = join(\",\", $aPK);\n\n # Recupera o nome da tabela e gera os valores a serem gerados\n $nomeClasse = ucfirst($this->getCamelMode($aTabela['NOME']));\n $copiaModeloCAD = str_replace('%%NOME_CLASS%%', $nomeClasse, $modeloCAD);\n $copiaModeloExclui = str_replace('%%NOME_CLASS%%', $nomeClasse, $modeloExclui);\n $copiaModeloSelecionar = str_replace('%%NOME_CLASS%%', $nomeClasse, $modeloSelecionar);\n $copiaModeloGetAll = str_replace('%%NOME_CLASS%%', $nomeClasse, $modeloGetAll);\n $copiaModeloAlterar = str_replace('%%NOME_CLASS%%', $nomeClasse, $modeloAlterar);\n $copiaModeloConsultar = str_replace('%%NOME_CLASS%%', $nomeClasse, $modeloConsultar);\n\n $montaObjeto = $this->retornaObjetosMontados($aTabela['NOME']);\n $montaObjetoBD = $this->retornaObjetosBDMontados($aTabela['NOME']);\n\n $copiaModeloCAD = str_replace('%%MONTA_OBJETO%%', $montaObjeto, $copiaModeloCAD);\n $copiaModeloCAD = str_replace('%%MONTA_OBJETOBD%%', $montaObjetoBD, $copiaModeloCAD);\n $copiaModeloExclui = str_replace('%%MONTA_OBJETOBD%%', $montaObjetoBD, $copiaModeloExclui);\n $copiaModeloSelecionar = str_replace('%%MONTA_OBJETOBD%%', $montaObjetoBD, $copiaModeloSelecionar);\n $copiaModeloSelecionar = str_replace('%%DOC_LISTA_PK%%', $listaPKDoc, $copiaModeloSelecionar);\n $copiaModeloSelecionar = str_replace('%%LISTA_PK%%', \t$listaPK, $copiaModeloSelecionar);\n $copiaModeloGetAll = str_replace('%%MONTA_OBJETOBD%%', $montaObjetoBD, $copiaModeloGetAll);\n $copiaModeloAlterar = str_replace('%%MONTA_OBJETO%%', $montaObjeto, $copiaModeloAlterar);\n $copiaModeloAlterar = str_replace('%%MONTA_OBJETOBD%%', $montaObjetoBD, $copiaModeloAlterar);\n $copiaModeloConsultar = str_replace('%%MONTA_OBJETOBD%%', $montaObjetoBD, $copiaModeloConsultar);\n\n $aRequire[] = \"require_once(dirname(__FILE__).'/bd/class.$nomeClasse\".\"BD.php');\";\n $aCadastro[] = $copiaModeloCAD;\n $aExclui[] = $copiaModeloExclui;\n $aSelecionar[] = $copiaModeloSelecionar;\n $aGetAll[] = $copiaModeloGetAll;\n $aAlterar[] = $copiaModeloAlterar;\n $aConsultar[] = $copiaModeloConsultar;\n }\n\n # Monta demais valores a serem substituidos\n $listaRequire = join(\"\\n\", $aRequire);\n $listaCadastro = join(\"\\n\\n\", $aCadastro);\n $listaExclui = join(\"\\n\\n\", $aExclui);\n $listaSelecionar = join(\"\\n\\n\", $aSelecionar);\n $listaGetAll = join(\"\\n\\n\", $aGetAll);\n $listaAlterar = join(\"\\n\\n\", $aAlterar);\n //print \"<pre>\"; print_r($aAlterar); print \"</pre>\"; \n //print \"<pre>\"; print_r($aConsultar); print \"</pre>\"; \n $listaConsultar = join(\"\\n\\n\", $aConsultar);\n\n # Substitui todas os parametros pelas variaveis ja processadas\n $copiaModelo = str_replace('%%LISTA_REQUIRE%%',\t\t $listaRequire, $copiaModelo);\n $copiaModelo = str_replace('%%METODOS_CADASTRA%%',\t $listaCadastro, $copiaModelo);\n $copiaModelo = str_replace('%%METODOS_EXCLUI%%',\t $listaExclui, $copiaModelo);\n $copiaModelo = str_replace('%%METODOS_SELECIONAR%%',\t $listaSelecionar, $copiaModelo);\n $copiaModelo = str_replace('%%METODOS_CARREGAR_COLECAO%%', $listaGetAll, $copiaModelo);\n $copiaModelo = str_replace('%%METODOS_ALTERA%%',\t $listaAlterar, $copiaModelo);\n $copiaModelo = str_replace('%%METODOS_CONSULTA%%',\t $listaConsultar, $copiaModelo);\n\n $dir = dirname(dirname(__FILE__)).\"/geradas/\".$this->projeto.\"/classes\";\n if(!file_exists($dir)) mkdir($dir);\n\n $fp = fopen(\"$dir/class.Controle.php\",\"w\");\n fputs($fp,$copiaModelo);\n\n # ============ Adicionando Classes de core/Config =========\n $modeloConfig = Util::getConteudoTemplate(\"Modelo.Config.\".$aBanco['SGBD'].\".tpl\");\n $modeloConfig = str_replace('%%DATABASE%%', $this->projeto, $modeloConfig);\n \n $fpConfig = fopen(\"$dir/core/config.ini\",\"w\"); \t\n fputs($fpConfig, $modeloConfig); \n fclose($fpConfig);\n\n copy(dirname(__FILE__).\"/core/class.Seguranca.php\", \"$dir/class.Seguranca.php\");\n copy(dirname(__FILE__).\"/class.Util.php\",\t \"$dir/core/class.Util.php\");\n copy(dirname(__FILE__).\"/class.Conexao.php\", \"$dir/core/class.Conexao.php\");\n \n return true;\n }", "public function proyecto()\n {\n return $this->belongsTo('App\\Proyecto', 'id_proyecto');\n }", "public function Mproblema()\n {\n return $this->belongsTo('App\\Models\\poa\\problema\\Mproblema');\n }", "public function plaza()\n {\n return $this->belongsTo(App\\Models\\Plaza::class);\n }", "public function loadModel()\n {\n $data = ModelsPegawai::find($this->dataId);\n $this->name = $data->name;\n $this->email = $data->email;\n $this->username = $data->username;\n $this->password = $data->password;\n $this->level = $data->level;\n\n }", "public function __construct()\n {\n $this->model = new OrderProduct();\n }", "public function model()\n {\n return Questionario::class;\n }", "public function __construct(){\n\t\tparent::__construct();\n\t\tinit_painel();\n\t\t$this->load->model('Comentarios_model', 'Comentarios');\n\t}", "abstract protected function model();", "abstract protected function model();", "public function __construct(){\n $this->pegaProjetos();\n }", "public function __construct()\n {\n parent::__construct();\n //METODO CARGADO EN EL MODELO\n $this->load->model(array('PublicacionModel'));\n }", "public function model()\n {\n return Despesas::class;\n }", "abstract public function model();", "abstract public function model();", "abstract public function model();", "abstract public function model();", "public function actionTonerperProdotti() {\n $_prodotti = \\Yii::$app->db->createCommand(\n \"select p.id, sku, colore, resa, tipologia, ean, m.nome as marca\n , compatibile, compatibile_prezzo_tonerper as compatibile_prezzo, compatibile_url_foto\n , originale, originale_prezzo, originale_disponibile, originale_url_foto\n , p.part_number, p.sort, p.secondario\n from toner_product p\n join toner_marche m on p.id_marca = m.id\n where enabled = 1\"\n )->queryAll();\n\n //$ret = array();\n foreach($_prodotti as $k=>&$p) {\n\n $product_modelli = \\app\\models\\Toner\\ProductModelli::find()\n ->joinWith(\"modello\")\n ->andWhere([\"id_prodotto\" => $p[\"id\"]])\n ->andWhere([\"!=\", \"disabled\", 1])\n ->select([\"id_modello\"])\n ->asArray()\n ->all();\n\n $modelli = array();\n\n foreach ($product_modelli as $value) {\n $modelli[] = $value[\"id_modello\"];\n }\n\n $p[\"modelli\"] = $modelli;\n\n if (strpos($p[\"compatibile_url_foto\"], \"/photo/compatibili/\")===false)\n $p[\"compatibile_url_foto\"] = null;\n else\n $p[\"compatibile_url_foto\"] = \"https://galileo.pointec.it\".$p[\"compatibile_url_foto\"];\n\n if (strpos($p[\"originale_url_foto\"], \"/photo/originali/\")===false)\n $p[\"originale_url_foto\"] = null;\n else\n $p[\"originale_url_foto\"] = \"https://galileo.pointec.it\".$p[\"originale_url_foto\"];\n\n $oem = explode(\"#\", $p[\"part_number\"]);\n\n $oem = array_unique($oem);\n $oem = array_filter($oem);\n\n $p[\"part_number\"] = $oem;\n\n }\n\n \\Yii::$app->response->format = \\yii\\web\\Response::FORMAT_JSON;\n\n return $_prodotti;\n\n print_r($_prodotti);\n\n }" ]
[ "0.7181921", "0.7110956", "0.7100433", "0.7085738", "0.7025644", "0.6976664", "0.69443333", "0.6942189", "0.68680537", "0.68593895", "0.6838697", "0.6827481", "0.6793342", "0.6770842", "0.6756266", "0.67437255", "0.6727502", "0.67119986", "0.6707109", "0.66899735", "0.66824526", "0.6670298", "0.66605586", "0.6554959", "0.6526246", "0.6522606", "0.65017503", "0.64997077", "0.6497607", "0.64935297", "0.64671034", "0.6449577", "0.6431303", "0.6417589", "0.63883823", "0.63882816", "0.6378822", "0.63764274", "0.63732696", "0.636833", "0.6351186", "0.63508797", "0.6342998", "0.63368917", "0.63368917", "0.63277364", "0.6317372", "0.6311514", "0.6286215", "0.62774926", "0.6264108", "0.6248541", "0.62240964", "0.62231356", "0.6222274", "0.62210065", "0.62208503", "0.621033", "0.62049633", "0.61775565", "0.6171075", "0.6169113", "0.61679155", "0.6166078", "0.6163486", "0.6159996", "0.61528206", "0.61517966", "0.6142943", "0.6141336", "0.6136573", "0.61351395", "0.6122365", "0.6121127", "0.6119243", "0.6117609", "0.61143506", "0.6113832", "0.61083186", "0.6106493", "0.6101953", "0.6096454", "0.60730433", "0.6073018", "0.6071341", "0.6066123", "0.60548395", "0.6051302", "0.6049513", "0.6046536", "0.6034767", "0.60273474", "0.60273474", "0.6022118", "0.60213095", "0.60212857", "0.6021207", "0.6021207", "0.6021207", "0.6021207", "0.6016069" ]
0.0
-1
Show the form for creating a new resource.
public function create(Request $request) { // }
{ "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) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }", "public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }", "public function createStorage();", "public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "function storeAndNew() {\n $this->store();\n }", "public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }", "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "public function store()\n\t{\n\t\t\n\t\t//\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}" ]
[ "0.72865677", "0.7145327", "0.71325725", "0.6640912", "0.66209733", "0.65685713", "0.652643", "0.65095705", "0.64490104", "0.637569", "0.63736665", "0.63657933", "0.63657933", "0.63657933", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437" ]
0.0
-1
Display the specified resource.
public function show($id) { $model = Imagem::find($id); return view('imagem.show', compact('model')); }
{ "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(Request $request) { $Model = '\MGLara\Models\\' . $request->get('model'); $model = $Model::find($request->get('id')); return view('imagem.edit', compact('model', 'request')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function edit()\n {\n return view('hirmvc::edit');\n }", "public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}", "public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }", "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }", "public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }", "private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }", "public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }", "public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}", "public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }", "public function edit($model, $form);", "function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}", "public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}", "public function edit()\n { \n return view('admin.control.edit');\n }", "public function edit(Form $form)\n {\n //\n }", "public function edit()\n {\n return view('common::edit');\n }", "public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\r\n {\r\n return view('petro::edit');\r\n }", "public function edit($id)\n {\n // show form edit user info\n }", "public function edit()\n {\n return view('escrow::edit');\n }", "public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }", "public function edit()\n {\n return view('commonmodule::edit');\n }", "public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit(form $form)\n {\n //\n }", "public function actionEdit($id) { }", "public function edit()\n {\n return view('admincp::edit');\n }", "public function edit()\n {\n return view('scaffold::edit');\n }", "public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }", "public function edit()\n {\n return view('Person.edit');\n }", "public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }", "public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}", "public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }", "public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}", "public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }", "public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }", "public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }", "function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}", "public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "protected function _edit(){\n\t\treturn $this->_editForm();\n\t}", "public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }", "public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }", "public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}", "public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}", "public function edit($id)\n {\n return view('models::edit');\n }", "public function edit()\n {\n return view('home::edit');\n }", "public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }", "public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }", "public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }", "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('consultas::edit');\n }", "public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }", "public function edit()\n {\n return view('dashboard::edit');\n }", "public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }", "public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }", "public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }", "public function edit() {\n return view('routes::edit');\n }", "public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }", "public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('cataloguemodule::edit');\n }", "public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }", "public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }", "public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }", "public function edit()\n {\n return view('website::edit');\n }", "public function edit()\n {\n return view('inventory::edit');\n }", "public function edit()\n {\n return view('initializer::edit');\n }", "public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }", "public function edit($id)\n {\n return view('backend::edit');\n }", "public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }", "public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }", "public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}", "public function edit($id)\n {\n \t$product = Product::find($id);\n \treturn view('admin.products.edit')->with(compact('product')); // formulario de actualizacion de datos del producto\n }", "public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }", "public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\n }", "public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }", "public function edit($id)\n\t{\n\t\t // get the project\n $project = Project::find($id);\n\n // show the edit form and pass the project\n return View::make('logicViews.projects.edit')->with('project', $project);\n\t}" ]
[ "0.78550774", "0.7692893", "0.7273195", "0.7242132", "0.7170847", "0.70622855", "0.7053459", "0.6982539", "0.69467914", "0.6945275", "0.6941114", "0.6928077", "0.69019294", "0.68976134", "0.68976134", "0.6877213", "0.68636996", "0.68592185", "0.68566656", "0.6844697", "0.68336326", "0.6811471", "0.68060875", "0.68047357", "0.68018645", "0.6795623", "0.6791791", "0.6791791", "0.6787701", "0.67837197", "0.67791027", "0.677645", "0.6768301", "0.6760122", "0.67458534", "0.67458534", "0.67443407", "0.67425704", "0.6739898", "0.6735328", "0.6725465", "0.6712817", "0.6693891", "0.6692419", "0.6688581", "0.66879624", "0.6687282", "0.6684741", "0.6682786", "0.6668777", "0.6668427", "0.6665287", "0.6665287", "0.66610634", "0.6660843", "0.66589665", "0.66567147", "0.66545695", "0.66527975", "0.6642529", "0.6633056", "0.6630304", "0.6627662", "0.6627662", "0.66192114", "0.6619003", "0.66153085", "0.6614968", "0.6609744", "0.66086483", "0.66060555", "0.6596137", "0.65950733", "0.6594648", "0.65902114", "0.6589043", "0.6587102", "0.65799844", "0.65799403", "0.65799177", "0.657708", "0.65760696", "0.65739626", "0.656931", "0.6567826", "0.65663105", "0.65660435", "0.65615267", "0.6561447", "0.6561447", "0.65576506", "0.655686", "0.6556527", "0.6555543", "0.6555445", "0.65552044", "0.65543956", "0.65543705", "0.6548264", "0.65475875", "0.65447706" ]
0.0
-1
Update the specified resource in storage.
public function update(Request $request, $id) { $Model = '\MGLara\Models\\' . $request->get('model'); $model = $Model::findOrFail($id); $codimagem = Input::file('codimagem'); $extensao = $codimagem->getClientOriginalExtension(); $imagem = new Imagem(); $imagem->save(); if(!is_null($model->codimagem)) { $imagem_inativa = Imagem::find($model->codimagem); $imagem_inativa->inativo = Carbon::now(); $imagem_inativa->save(); } $imagem_update = Imagem::findOrFail($imagem->codimagem); $imagem_update->observacoes = $imagem->codimagem.'.'.$extensao; $imagem_update->save(); $diretorio = './public/imagens'; $arquivo = $imagem->codimagem.'.'.$extensao; try { $codimagem->move($diretorio, $arquivo); $model->codimagem = $imagem->codimagem; $model->save(); Session::flash('flash_update', 'Registro atualizado.'); return redirect(modelUrl($request->get('model')).'/'.$id); } catch (\Symfony\Component\HttpFoundation\File\Exception\FileException $e) { Session::flash('flash_danger', "Não foi possível cadastrar essa imagem!"); Session::flash('flash_danger_detail', $e->getMessage()); return redirect(modelUrl($request->get('model')).'/'.$id); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }", "public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }", "public function update(Request $request, Resource $resource)\n {\n //\n }", "public function updateStream($resource);", "public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }", "protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }", "public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }", "public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}", "public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }", "public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }", "protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }", "public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }", "public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }", "public function update($path);", "public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }", "public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }", "public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}", "public function updateStream($path, $resource, Config $config)\n {\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }", "public function update($data) {}", "public function update($data) {}", "public function putStream($resource);", "public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function update($entity);", "public function update($entity);", "public function setResource($resource);", "public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }", "public function isUpdateResource();", "public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }", "public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }", "public function store($data, Resource $resource);", "public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }", "public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }", "public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }", "public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }", "public function update(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($id) { try{ $model = Imagem::find($id); $model->delete(); unlink('./public/imagens/'.$model->observacoes); $ret = ['resultado' => true, 'mensagem' => 'Imagem excluída com sucesso!']; } catch(\Exception $e){ $ret = ['resultado' => false, 'mensagem' => 'Erro ao excluir imagem!', 'exception' => $e]; } return json_encode($ret); }
{ "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
recibe idplan , anio
public function buscarMaterias($datos){ try { $parametros = array("id_plan" => $datos["id_plan"] , "anio" => $datos["anio"]); $resultado = $this->refControladorPersistencia->ejecutarSentencia(DbSentencias::BUSCAR_MATERIAS_EC, $parametros); $fila = $resultado->fetchAll(PDO::FETCH_ASSOC); return $fila; } catch(Exception $e){ echo "Error :" . $e->getMessage(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mostrar_plan(){\n\t\tif (isset($_GET['temp']) && $_GET['temp']!=\"\"){\n\t\t\t$id=$_GET['id'];\n\t\t\t$temp=$_GET['temp'];\n\t\t\t$sql=\"SELECT * FROM habitaciones2 WHERE id='$temp'\";\n\t\t\t$consulta=mysql_query($sql) or die(mysql_error());\n\t\t\t$resultado = mysql_fetch_array($consulta);\n\t\t\t$this->id=$id;\n\t\t\t$this->id_cat=$resultado['id'];\n\t\t\t$this->nombre=$resultado['nombre'];\n\t\t\t$this->prioridad=$resultado['orden'];\n\t\t\t$this->mostrar=$resultado['listar'];\n\t\t\t$this->descripcion=$resultado['descripcion'];\n\t\t\t$this->precio=$resultado['precio'];\n\t\t\t$this->maxadultos=$resultado['maxAdultos'];\n\t\t} \n\t}", "public function leer($idplan)\n {\n include_once 'controlador/util/bd_conexion_pdo.php';\n\n $conexion = (new Conexion())->conectarPDO();\n\n $sentencia = $conexion->prepare(\"SELECT * FROM plan WHERE idplan = :idplan\");\n $sentencia->bindParam(\":idplan\", $idplan, PDO::PARAM_INT);\n $sentencia->execute();\n\n $resultado = $sentencia->fetchAll(PDO::FETCH_ASSOC);\n\n $sentencia = null;\n $conexion = null;\n\n return $resultado;\n }", "function elPlanTieneEstructuraDefinida(){\r\n \r\n $plan_id = $this->data['Anio']['plan_id'];\r\n\r\n $et = $this->Plan->tieneEstructuraDefinida($plan_id);\r\n\r\n return $et;\r\n\r\n }", "function getAniosDePlanPorCiclo($plan_id, $ciclo_id = 0) {\r\n $conds['Anio.plan_id'] = $plan_id;\r\n if (!empty($ciclo_id)) {\r\n $conds['Anio.ciclo_id'] = $ciclo_id;\r\n }\r\n\r\n $aniosPlan = $this->find('all', array(\r\n 'contain' => array('EstructuraPlanesAnio','Etapa'),\r\n 'order' => array('Anio.ciclo_id','Anio.anio'),\r\n 'conditions' => $conds,\r\n ));\r\n $i = 0;\r\n foreach ($aniosPlan as &$a) {\r\n $a = $a['Anio'] + $a;\r\n unset($a['Anio']);\r\n }\r\n return $aniosPlan;\r\n }", "function buscarPorID(Visita $obj)\r\n {\r\n $this->sql = sprintf(\"SELECT * FROM tipovisita WHERE id = %d\",\r\n mysqli_real_escape_string($this->con, $obj->getId()));\r\n $result = mysqli_query($this->con, $this->sql);\r\n\r\n $this->superdao->resetResponse();\r\n\r\n if(!$result) {\r\n $this->superdao->setMsg( resolve( mysqli_errno( $this->con ), mysqli_error( $this->con ), get_class( $obj ), 'BuscarPorId' ) );\r\n }else{\r\n while($row = mysqli_fetch_object($result)) {\r\n //classe pessoa\r\n // $controlPessoa = new PessoaControl(new Pessoa($row->idpessoa));\r\n // $objPessoa = $controlPessoa->buscarPorId();\r\n $this->obj = $row;\r\n }\r\n $this->superdao->setSuccess( true );\r\n $this->superdao->setData( $this->obj );\r\n }\r\n return $this->superdao->getResponse();\r\n }", "function listarPlanArb()\n {\n $node = $this->objParam->getParametro('node');\n\n //$clasificacion = $this->objParam->getParametro('clasificacion');\n $id_plan = $this->objParam->getParametro('id_plan');\n //\n $tipo_nodo = $this->objParam->getParametro('tipo_nodo');\n\n\n if ($node == 'id') {\n $this->objParam->addParametro('id_padre', '%');\n } else {\n $this->objParam->addParametro('id_padre', $id_plan);\n }\n\n\n //$this->objParam->addParametro('clasificacion', $clasificacion);\n\n //creamos el modelo\n $this->objFunc = $this->create('MODPlan');\n $this->res = $this->objFunc->listarPlanArb();\n\n $this->res->setTipoRespuestaArbol();\n\n $arreglo = array();\n\n //$arreglo_valores=array();\n\n //para cambiar un valor por otro en una variable\n // array_push($arreglo_valores,array('variable'=>'checked','val_ant'=>'true','val_nue'=>true));\n // array_push($arreglo_valores,array('variable'=>'checked','val_ant'=>'false','val_nue'=>false));\n // $this->res->setValores($arreglo_valores);\n\n\n array_push($arreglo, array('nombre' => 'id', 'valor' => 'id_plan'));\n array_push($arreglo, array('nombre' => 'id_p', 'valor' => 'id_plan_padre'));\n\n array_push($arreglo, array('nombre' => 'text', 'valores' => '#nombre_plan# <font color=\"blue\">PESO:#peso#%</font> #porcentaje_acum# #porcentaje_rest#'));\n array_push($arreglo, array('nombre' => 'cls', 'valor' => 'peso'));\n array_push($arreglo, array('nombre' => 'qtip', 'valores' => '<b>ID PLAN:</b> #id_plan# <br><b>NOMBRE:</b> #nombre_plan#<br/><b>PESO:</b> #peso# %'));\n\n /*Estas funciones definen reglas para los nodos en funcion a los tipo de nodos que contenga cada uno*/\n $this->res->addNivelArbol('tipo_nodo', 'raiz', array('leaf' => false, 'draggable' => false, 'allowDelete' => true, 'allowEdit' => true, 'cls' => 'folder', 'tipo_nodo' => 'raiz', 'icon' => '../../../lib/imagenes/orga32x32.png'), $arreglo);\n\n $this->res->addNivelArbol('tipo_nodo', 'hijo', array('leaf' => false, 'draggable' => false, 'allowDelete' => true, 'allowEdit' => true, 'tipo_nodo' => 'hijo', 'icon' => '../../../lib/imagenes/alma32x32.png'), $arreglo);\n\n $this->res->addNivelArbol('tipo_nodo', 'hoja', array('leaf' => true, 'draggable' => false, 'allowDelete' => true, 'allowEdit' => true, 'tipo_nodo' => 'hoja', 'icon' => '../../../lib/imagenes/a_form.png'), $arreglo);\n \n\n //Se imprime el arbol en formato JSON\n //var_dump($this->res->generarJson());exit;\n $this->res->imprimirRespuesta($this->res->generarJson());\n }", "public function dodajPlanAction() {\n\t\t\t$db = Zend_Registry::get('db');\n\t\t\t$id = (int)$this->getRequest()->getParam('id');\n\t\t\t$this->view->inwestycja = $db->fetchRow($db->select()->from('inwestycje')->where('id = ?', $id));\n\t\t\t$this->view->plan = $db->fetchRow($db->select()->from('inwestycje_plan')->where('id_inwest = ?', $id));\t\n\t\t}", "public function getHorarioActualPorPlan($plan, $ciclo)\n {\n\t\t $query=\"SELECT a.CODHOR, b.ASIGNATURA, a.SECCION FROM hordetalle AS a LEFT JOIN planes AS b ON a.CODIGO = b.ASIGNATURA\nWHERE b.CODIGO_PLA = '$plan'\nAND a.CICLO = '$ciclo' ORDER BY b.ASIGNATURA, a.SECCION ASC\";\n\t//echo $query;\n return $this->conexionHorarios->consulta($query);\n }", "function buscar_cuenta_por_id($id) {\n $sql = \"SELECT cuenta_plan_contable,descripcion_plan_contable FROM prosic_plan_contable WHERE id_plan_contable = \" . $id;\n $result = $this->Consulta_Mysql($sql);\n $row = mysql_fetch_array($result);\n return $row;\n }", "function buscarPorId($id) {\r\n \r\n }", "public function show($id)\n {\n $plan = Plan::where(['id' => $id])->with([\n 'programaAcademico',\n 'planesActividades.actividad.indicador',\n 'planesActividades.actividad.proyecto.programas.programa.linea.eje'\n ])->get()->toArray()[0];\n\n $planesActividades = $plan['planes_actividades'];\n $proyectos = [];\n\n for ($i = 0, $long = count($planesActividades); $i < $long; $i++) {\n $actividad = $planesActividades[$i]['actividad'];\n $proyecto = $actividad['proyecto'];\n $encontro = false;\n\n $actividad_data = [\n 'nombre' => $actividad['nombre'],\n 'descripcion' => $actividad['descripcion'],\n 'fecha_inicio' => $planesActividades[$i]['fecha_inicio'],\n 'fecha_fin' => $planesActividades[$i]['fecha_inicio'],\n 'costo' => $planesActividades[$i]['costo'],\n 'unidad_medida' => $actividad['descripcion'],\n 'peso' => $planesActividades[$i]['peso'],\n 'incidacor' => $actividad['indicador']\n ];\n\n for ($j=0; $j < count($proyectos); $j++) {\n $encontro = $proyectos[$j]['id'] == $proyecto['id'];\n\n if($proyectos[$j]['id'] == $proyecto['id']){\n array_push($proyectos[$j]['actividades'], $actividad_data);\n break;\n }\n }\n\n if(!$encontro){\n $proyecto['actividades'] = [$actividad_data];\n array_push($proyectos, $proyecto);\n }\n }\n\n $data = [];\n $data['nombre'] = $plan['nombre'];\n $data['url_documento'] = $plan['url_documento'];\n $data['periodo_inicio'] = $plan['periodo_inicio'];\n $data['periodo_fin'] = $plan['periodo_fin'];\n $data['fecha_cierre'] = $plan['fecha_cierre'];\n $data['programa_academico'] = $plan['programa_academico'];\n $data['proyectos'] = $proyectos;\n\n if (count($plan) > 0)\n return response()->json([\n 'message' => 'Consulta exitosa',\n 'data' => $data,\n 'status' => 'ok'\n ], 200);\n\n return response()->json([\n 'message' => 'No existen registros',\n 'data' => [],\n 'status' => 'error'\n ], 404);\n }", "public function show(captacion $id) {\n //\n }", "public function getIncapNom($id)\n {\n $result=$this->adapter->query(\"select h.id, a.idEmp, a.idEmp, d.idConc as idCon,0 as dias,\n f.formula , e.tipo, g.idCcos , e.idFor, a.diasAp, a.diasDp,\n\t\t\t\t\t case when ( ( a.diasAp + a.diasDp ) >= (c.dias - 1) )# Dias inicio pago empreasa\n\t\t\t\t\t then ( c.dias - 1) else ( a.diasAp + a.diasDp ) end as diasEmp, \n\t\t\t\t\t # Se buscan dias anteriores reportados o no reportados \n\t\t\t\t\tcase when a.reportada = 1 then \n \t\t\t\t\t case when ( ( a.diasDp ) > (c.dias - 1) )# Dias inicio pago entidad\n\t\t\t\t\t then ( ( a.diasDp ) - ( c.dias - 1 ) ) else 0 end \n\t\t\t\t\telse \n \t\t\t\t\t case when ( ( a.diasAp + a.diasDp ) > (c.dias - 1) )# Dias inicio pago entidad\n\t\t\t\t\t then ( ( a.diasAp + a.diasDp ) - ( c.dias - 1 ) ) else 0 end \n\t\t\t\t\tend as diasEnt,\t\t\t\t\t \n\t\t\t\t\t\t d.tipo as tipInc, b.id as idInc \n from n_nomina_e_i a \n inner join n_incapacidades b on b.id=a.idInc \n inner join n_tipinc c on c.id=b.idInc\n inner join n_tipinc_c d on d.idTinc=c.id \n inner join n_conceptos e on e.id=d.idConc\n inner join n_formulas f on f.id=e.idFor\n inner join a_empleados g on g.id=a.idEmp\n inner join n_nomina_e h on h.idEmp = a.idEmp and h.idNom = a.idNom \n where a.idNom = \".$id.\" and a.tipo = 0 \n order by a.idEmp\",Adapter::QUERY_MODE_EXECUTE); \n \n $datos=$result->toArray();\n return $datos;\n }", "public function planFind($id);", "public function getPlan();", "function select($id){\n\t\t\t$query=\"SELECT * FROM immobile WHERE id='$id';\";\n\t\t\t$this->database->Query($query);\n\t\t\t$result=$this->database->result;\n\t\t\t$row=mysql_fetch_array($result);\n\t\t\tif($row){\n\t\t\t\t$this->id=$row[0];\n\t\t\t\t$this->approvato=$row[1];\n\t\t\t\t$this->agente=$row[2];\n\t\t\t\t$this->contratto=$row[3];\n\t\t\t\t$this->descrizione=$row[4];\n\t\t\t\t$this->proprietario=$row[5];\n\t\t\t\t$this->immagine=$row[6];\n\t\t\t\t$this->metratura=$row[7];\n\t\t\t\t$this->prezzo=$row[8];\n\t\t\t\t$this->tipo=$row[9];\n\t\t\t\t$this->comune=$row[10];\n\t\t\t}\n\t\t}", "public function index($id = null)\n {\n $id = Input::get('id');\n $planes = DB::connection('control')->select('call general_obt_planes');\n $planes = Collection::make($planes);\n \n if($id)\n {\n $id = Crypt::decrypt(Input::get('id'));\n $plan = DB::connection('control')->select('call general_obt_id_plan(?)',array($id));\n $plan = Collection::make($plan)->first();\n \n }else{\n $plan = Collection::make($planes)->first();\n }\n\n //$plan = Collection::make($plan); \n \n\n $municipios=Municipio::where('idestado',27)->pluck('nombre','idmunicipio');\n // dd($plan);\n // $dos = Crypt::decrypt($id); \n // dd($dos);\n return view('empresas.index',compact('id','planes','plan','municipios'));\n }", "public function buscarGradoId($grado,$turno,$seccion,$anio){\n $match = ['grado' => $grado, 'anios_id' => $anio,'seccion'=>$seccion,'turnos_id'=>$turno];\n $id=Grado::where($match)->select('id')->get();\n //dd($id);\n return $id;\n }", "function cargarDatosVotante($idactual){\n $sql=\"SELECT correovotante,nombrevotante,apellidovotante FROM votante WHERE idvotante=$idactual;\";\n\t\t\treturn $sql;\n }", "function tampil_data_id($tabel,$where,$id)\n {\n $row = $this->db->prepare(\"SELECT * FROM $tabel WHERE $where = :id,:teks,:label,:predict\");\n $row->execute(array($id));\n return $hasil = $row->fetch();\n }", "public function subok($id)\n {\n }", "function get_tipo_plan($plan)\n{\n $cadena = '';\n $tipo = $plan->tipo;\n switch ($tipo) {\n case 'propio':\n $cadena = 'Plan de Lectura Propio';\n break;\n case 'cronologico':\n $cadena = 'Plan de Lectura Cronológico';\n break;\n case 'variado':\n $cadena = 'Plan de Lectura Variado';\n break;\n case 'todo':\n $cadena = 'Plan de Lectura de Inicio a Fin';\n break;\n }\n\n return $cadena;\n}", "public function getPlanById()\n {\n // Arrange\n // Act\n if (! isset($this->plans)) {\n $this->getsAListOfPlans();\n }\n $plans = $this->plans;\n $plan = $plans['data'][0];\n\n $plan = Ezypay::getPlan($plan['id']);\n\n // Assert\n $this->assertNotNull($plan);\n $this->assertEquals($plan['id'], $plan['id']);\n }", "public function AbonosCreditosId() \n{\n\tself::SetNames();\n\t$sql = \" SELECT clientes.codcliente, clientes.cedcliente, clientes.nomcliente, ventas.idventa, ventas.codventa, ventas.totalpago, ventas.statusventa, abonoscreditos.codventa as codigo, abonoscreditos.fechaabono, SUM(montoabono) AS abonototal FROM (clientes INNER JOIN ventas ON clientes.codcliente = ventas.codcliente) LEFT JOIN abonoscreditos ON ventas.codventa = abonoscreditos.codventa WHERE abonoscreditos.codabono = ? AND clientes.cedcliente = ? AND ventas.codventa = ? AND ventas.tipopagove ='CREDITO'\";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->bindValue(1, trim(base64_decode($_GET['codabono'])));\n\t$stmt->bindValue(2, trim(base64_decode($_GET['cedcliente'])));\n\t$stmt->bindValue(3, trim(base64_decode($_GET['codventa'])));\n\t$stmt->execute();\n\t$num = $stmt->rowCount();\n\tif($num==0)\n\t{\n\t\techo \"\";\n\t\texit;\n\t}\n\telse\n\t{\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[] = $row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\t\t}\n\t}", "public function user_by_plan(Request $req, $id)\n {\n $this->check_account($req);\n\n // $param_insert = array(\n // 'name' => 'user_by_plan',\n // 'params' => json_encode(collect($req)->toArray()),\n // 'result' => ''\n // );\n\n // $access_log_id = $this->create_access_log($param_insert);\n\n $plan = new Plan;\n $plan = $plan->with('user', 'guide');\n $plan = $plan->where('user_id', $id);\n $plan = $plan->where('status', '!=', 'deleted');\n\n // search query\n if ($req->input('search_query')) {\n $search_query = $req->input('search_query') ? $req->input('search_query') : '';\n\n $plan = $plan->where('start_date', 'LIKE', '%'.$search_query.'%');\n }\n\n // where custom\n if ($req->input('where_by') && $req->input('where_value')) {\n $explode_by = explode('|', $req->input('where_by'));\n $explode_value = explode('|', $req->input('where_value'));\n\n if ((count($explode_by)==count($explode_value)) && ($this->check_where($explode_by, $this->fields_plans))) {\n foreach ($explode_by as $key => $value) {\n if ($explode_value[$key]=='except_active') {\n $plan = $plan->where($explode_by[$key], '!=', 'active');\n } else {\n $plan = $plan->where($explode_by[$key], '=', $explode_value[$key]);\n }\n }\n } else {\n $result = $this->generate_response($plan, 400, 'Bad Request.', true);\n\n // $this->update_access_log($access_log_id, $result);\n\n return response()->json($result, 400);\n }\n }\n\n if (!$req->input('order_by')) {\n $plan = $plan->orderBy(\"id\", \"desc\");\n }\n\n // order\n if ($req->input('order_by')) {\n if (in_array($req->input('order_by'), $this->fields_plans)) {\n $order_type = $req->input('order_type') ? $req->input('order_type') : 'asc';\n\n $plan = $plan->orderBy($req->input('order_by'), $order_type);\n } else {\n $result = $this->generate_response($plan, 400, 'Bad Request.', true);\n\n // $this->update_access_log($access_log_id, $result);\n\n return response()->json($result, 400);\n }\n }\n\n // limit\n if ($req->input('limit')) {\n $offset = $req->input('offset') ? $req->input('offset') : 0;\n\n $plan = $plan->offset($offset);\n $plan = $plan->limit($req->input('limit'));\n }\n\n $plan = $plan->get();\n\n $result = $this->generate_response($plan, 200, 'All Data.', false);\n\n // $this->update_access_log($access_log_id, $result);\n\n return response()->json($result, 200);\n }", "private function get_plan()\n\t{\n\t\treturn $this->m_plan;\n\t}", "function TestCase_link_plan($case_id, $plan_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestCase.link_plan', array(new xmlrpcval($case_id, \"int\"), new xmlrpcval($plan_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}", "function select($id){\r\n\t\t$sql = \"SELECT * FROM gestaoti.unidade_organizacional WHERE seq_unidade_organizacional = $id\";\r\n\t\t$result = $this->database->query($sql);\r\n\t\t$result = $this->database->result;\r\n\r\n\t\t$row = pg_fetch_object($result);\r\n\t\t$this->SEQ_UNIDADE_ORGANIZACIONAL = $row->seq_unidade_organizacional;\r\n\t\t$this->NOM_UNIDADE_ORGANIZACIONAL = $row->nom_unidade_organizacional;\r\n\t\t$this->SEQ_UNIDADE_ORGANIZACIONAL_PAI = $row->seq_unidade_organizacional_pai;\r\n\t\t$this->SGL_UNIDADE_ORGANIZACIONAL = $row->sgl_unidade_organizacional;\r\n\t}", "function mostrar_producto_cotizacion($producto, $temporada, $plan){\n\t\t\t$sql=\"SELECT * FROM producto, temporadas2, habitaciones2 WHERE id_pro='$producto' AND temporadas2.id_alojamiento='$producto' AND temporadas2.id='$temporada' AND temporadas2.id=habitaciones2.id_temporada AND habitaciones2.id='$plan'\";\n\t\t\t\n\t\t\t$consulta=mysql_query($sql) or die(mysql_error());\n\t\t\t$resultado = mysql_fetch_array($consulta);\n\t\t\t$resultado['fecha_inicio']=$this->convertir_fecha($resultado['fecha_inicio']);\n\t\t\t$resultado['fecha_fin']=$this->convertir_fecha($resultado['fecha_fin']);\n\t\t\t$resultado['precio']=$this->mostrar_precio($resultado['precio']);\n\t\t\tif($resultado['maxAdultos']==NULL)\n\t\t\t\t$resultado['maxAdultos']=4;\n\t\t\t$this->listado[]=$resultado;\n\t}", "function adjudicarTodo(){\n $this->procedimiento='adq.f_cotizacion_ime';\n $this->transaccion='ADQ_ADJTODO_IME';\n $this->tipo_procedimiento='IME';\n \n //Define los parametros para la funcion\n $this->setParametro('id_cotizacion','id_cotizacion','int4');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "function abm($id)\n { \n $db['registro'] = $this->model->getRegistros($id);\n $db['id'] = $id;\n $db['cantidad'] = $this->model->getCantidad();\n \n \n $this->armarVista('abm', $db);\n }", "public function traerPorId($id)\n {\n }", "public function traerPorId($id)\n {\n }", "public function traerPorId($id)\n {\n }", "function matricula_del_plan($plan_id){\r\n\t\t$aux_vec[$plan_id] = 0;\r\n\t\t$this->recursive = -1;\r\n\t\t$temp= $this->find('all',array(\r\n\t\t\t\t\t\t'conditions'=>array('plan_id'=>$plan_id),\r\n\t\t\t\t\t\t'group'=>array('ciclo_id','plan_id'),\r\n\t\t\t\t\t\t'order'=>array('ciclo_id DESC'),\t\t\t\t\t\r\n\t\t\t\t\t\t'fields'=>array('sum(matricula) as \"matricula\"','plan_id','ciclo_id')));\t\r\n\r\n\r\n\t\t//esta linea es para que solo muestre los datos de matricula del \r\n\t\t//ULTIMO ciclo (año lectivo) cargado\r\n\t\tif($temp){\t\r\n\t\t\t$ciclo_aux = $temp[0]['Anio']['ciclo_id'];\r\n\t\t} \r\n\t\t\r\n\t\t//reordeno el vector para que quede de una manera linda para recorrerlo con foreach en la vista\r\n\t\tforeach($temp as $v){\r\n\t\t\t//como el array vine ordenado por cicl_id descendiente, si leo otro ciclo y \r\n\t\t\t//es distinto es porque estoy en un año anterir, por lo tanto \r\n\t\t\t//debo cortar la ejecucion y entregar el array como quedó\r\n\t\t\tif ($ciclo_aux != $v['Anio']['ciclo_id']) break; \r\n\t\t\t\r\n\t\t\t$aux_vec[$v['Anio']['plan_id']] = $v[0]['matricula'];\r\n\t\t}\r\n\t\t\r\n\t\treturn $aux_vec;\r\n\t}", "public function plaEnr($id){\n \n $requete = $this->db->query(\"SELECT * FROM PlanningRestauration where pla_id= ?\", $id);\n $enrPla = $requete->row();\n return $enrPla; \n }", "public function getIdfa();", "public function id_tarjeta();", "public function CreditosPorId()\n{\n\tself::SetNames();\n\t$sql = \" SELECT clientes.codcliente, clientes.cedcliente, clientes.nomcliente, clientes.tlfcliente, clientes.direccliente, clientes.emailcliente, ventas.idventa, ventas.codventa, ventas.codcaja, ventas.codcliente, ventas.subtotalivasive, ventas.subtotalivanove, ventas.ivave, ventas.totalivave, ventas.descuentove, ventas.totaldescuentove, ventas.totalpago, ventas.totalpago2, ventas.tipopagove, ventas.formapagove, ventas.fechaventa, ventas.fechavencecredito, ventas.statusventa, usuarios.nombres, cajas.nrocaja, abonoscreditos.codventa as cod, abonoscreditos.fechaabono, SUM(montoabono) AS abonototal FROM (ventas LEFT JOIN clientes ON clientes.codcliente = ventas.codcliente) LEFT JOIN abonoscreditos ON ventas.codventa = abonoscreditos.codventa LEFT JOIN cajas ON ventas.codcaja = cajas.codcaja LEFT JOIN usuarios ON ventas.codigo = usuarios.codigo WHERE ventas.codventa =? GROUP BY cod\";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->execute( array(base64_decode($_GET[\"codventa\"])) );\n\t$num = $stmt->rowCount();\n\tif($num==0)\n\t{\n\t\techo \"\";\n\t}\n\telse\n\t{\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[] = $row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\t\t}\n\t}", "function ColsultarTodosLosID(){///funciona\n try {\n $FKAREA=$this->objRequerimiento->getFKAREA();\n $objControlConexion = new ControlConexion();\n $objControlConexion->abrirBd();\n //$comandoSql = \"select * from Requerimiento where FKAREA = '\".$FKAREA.\"' \";\n $comandoSql = \"SELECT IDREQ ,TITULO,FKEMPLE,FKAREA,FKESTADO,OBSERVACION,FKEMPLEASIGNADO FROM Requerimiento INNER JOIN detallereq ON Requerimiento.IDREQ=detallereq.FKREQ where FKAREA = '\".$FKAREA.\"'\";\n $rs = $objControlConexion->ejecutarSelect($comandoSql);\n return $rs;\n $objControlConexion->cerrarBd();\n } catch(Exception $e) {\n echo \"Error: \" . $e->getMessage();\n }\n}", "public function idDefinitivo($tipo,$id){\n $iddef=0;\n $objA=new admonDAO(); //direcionador =1 mandar a admon\n $objM=new medicoDAO(); //direcionar=2 mandar a medico\n $objP=new pacienteDAO(); //direccionar=3 mandar a paciente\n $resul1=$objA->readOneById($id); //error en datos\n $resul2=$objM->readOneById($id);\n $resul3=$objP->readOneById($id);\n \n if($tipo==1){\n for($i=0;$i<count($resul1);$i++){\n $iddef=$resul1[$i]['id_admon'];\n }\n }\n if($tipo==2){\n for($i=0;$i<count($resul2);$i++){\n $iddef=$resul2[$i]['id_medico'];\n }\n }\n if($tipo==3){\n for($i=0;$i<count($resul3);$i++){\n $iddef=$resul3[$i]['id_paciente'];\n }\n }\n \n return $iddef;\n }", "function solicitarAprobacion(){\n $this->procedimiento='adq.f_cotizacion_ime';\n $this->transaccion='ADQ_SOLAPRO_IME';\n $this->tipo_procedimiento='IME';\n \n //Define los parametros para la funcion\n $this->setParametro('id_cotizacion','id_cotizacion','int4');\n \n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "public function displaytask($plan){\n $date = date(\"Y/m/d\");\n // SQL statement\n $sql = \"SELECT * FROM task WHERE date = '\".$date.\"' AND (plan = '\".$plan.\"' OR plan = 'all') ORDER BY task_id DESC LIMIT 1\";\n $result = $this->con->query($sql);\n $result = $result->fetch_assoc();\n return Array (\n \"first_task\" => $result['first_task'],\n \"first_task_url\" => $result['first_task_url'],\n \"first_task_inst\" => $result['first_task_inst'],\n \"second_task\" => $result['second_task'],\n \"second_task_url\" => $result['second_task_url'],\n \"second_task_inst\" => $result['second_task_inst'],\n \"third_task\" => $result['third_task'],\n \"third_task_url\" => $result['third_task_url'],\n \"third_task_inst\" => $result['third_task_inst']\n );\n }", "function select($id)\r\n{\r\n\r\n$sql = \"SELECT * FROM aattribut WHERE aatribut_pk_id = $id;\";\r\n$result = $this->database->query($sql);\r\n$result = $this->database->result;\r\n$row = mysql_fetch_object($result);\r\n\r\n\r\n$this->id_attribut = $row->id_attribut;\r\n\r\n$this->id_produit = $row->id_produit;\r\n\r\n$this->valeur = $row->valeur;\r\n\r\n}", "public function ObtenerPaciente() {\n $sql= $this->config_mdl->_get_data_condition('os_rx',array(\n 'triage_id'=> $this->input->post('triage_id')\n ));\n $info= $this->config_mdl->_get_data_condition('os_triage',array(\n 'triage_id'=> $this->input->post('triage_id')\n ));\n if(!empty($sql)){\n $this->setOutput(array('accion'=>'1','rx'=>$sql[0],'paciente'=>$info[0]));\n }else{\n $this->setOutput(array('accion'=>'2'));\n }\n }", "public static function listOne($id){\n \n $conexion = new Conexion();\n $sql = $conexion->prepare('SELECT nome, imagem, id_aservo FROM ' . self::TABLA . ' WHERE id = :id');\n $sql->bindParam(':id', $id);\n $sql->execute();\n $reg = $sql->fetch(); //Devuelve una única linea (array con cada campo) de la TABLA(id seleccionado).\n return $reg;\n \n }", "public function pplanpro($anho){\n\n\t\t\t$this->db->select('p.idmoneda,pro.idemfk,pro.iddivision,pro.iddom,c.numcategoria,p.enero_p,p.febrero_p,p.marzo_p,p.abril_p,p.mayo_p,p.junio_p,p.julio_p,p.agosto_p,p.septiembre_p,p.octubre_p,p.noviembre_p,p.diciembre_p');\n\t\t\t$this->db->from('plan p');\n\t\t\t$this->db->join('proyecto pro','p.idproyecto = pro.idproyecto');\n\t\t\t$this->db->join('categoria c','pro.idcategoria =c.id');\n\t \t\t$this->db->where('p.idanho',$anho);\n\t\t\treturn $this->db->get(); \n\n\t\t}", "function identificar_pago_cli_mercantil($acceso,$id_cuba,$abrev_cuba){\n\t$acceso2=conexion();\n\t\n\t\tsession_start();\n\t\t$ini_u = $_SESSION[\"ini_u\"]; \n\t\tif($ini_u==''){\n\t\t\t$ini_u =\"AA\";\n\t\t}\n\t$acceso->objeto->ejecutarSql(\"select *from pagodeposito where (id_pd ILIKE '$ini_u%') ORDER BY id_pd desc\"); \n\t$id_pd = $ini_u.verCoo($acceso,\"id_pd\");\n\t$login = $_SESSION[\"login\"]; \n\t$fecha= date(\"Y-m-d\");\n\t$hora= date(\"H:i:s\");\n\t\n\t$palabra_clave='DEPOSITO EN EFECTIVO';\n\t$palabra_clave1='DEPO-FACIL ELECTRONICO';\n\t//ECHO \" select * from vista_tablabancos where id_cuba='$id_cuba' and descrip_tb ilike 'REC. INT. CARGO CUENTA%'\";\n\t$acceso2->objeto->ejecutarSql(\" select * from vista_tablabancos where id_cuba='$id_cuba' and (descrip_tb ilike '$palabra_clave%' or descrip_tb ilike '$palabra_clave1%' )AND (Status_tb='REGISTRADO' or status_tb='NO RELACIONADO')order by id_tb \");\n\t\twhile($row=row($acceso2)){\n\t\t\t$abrev_cuba=trim($row[\"abrev_cuba\"]);\n\t\t\t$id_tb=trim($row[\"id_tb\"]);\n\t\t\t//echo \"<br>$abrev_cuba:\";\n\t\t\t$fecha_tb=trim($row[\"fecha_tb\"]);\n\t\t\t$referencia_tb=trim($row[\"referencia_tb\"]);\n\t\t\t$monto_tb=trim($row[\"monto_tb\"]);\n\t\t\t$descrip_tb=trim($row[\"descrip_tb\"]);\n\t\t\t$valor=explode($palabra_clave,$descrip_tb);\n\t\t\t$ini=substr($referencia_tb, 0, 3);\n\t\t\t$nro_contrato='00000000000000000000000000';\n\t\t\t//echo \"<br>:$referencia_tb:\";\n\t\t\t//if($ini=='000'){\n\t\t\t\t//$nro_contrato=\t$ano=substr($referencia_tb, 3, 8);\n\t\t\t\t$nro_contrato=\t$referencia_tb;\n\t\t\t\tif(strlen($nro_contrato)!=8 && strlen($nro_contrato)!=7){\n\t\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t//\techo \"<br>nro_contrato:$nro_contrato:\";\n\t\t\t//}\n\t\t\t//echo \"<br>$referencia_tb: select * from contrato where nro_contrato ilike '%$nro_contrato%' \";\n\t\t\t$acceso->objeto->ejecutarSql(\" select * from contrato where nro_contrato ilike '%$nro_contrato%' \");\n\t\t\tif($row=row($acceso)){\n\t\t\t\t$id_contrato=trim($row[\"id_contrato\"]);\n\t\t\t\t$acceso->objeto->ejecutarSql(\"insert into pagodeposito(id_pd,id_contrato,fecha_reg,hora_reg,login_reg,fecha_dep,banco,numero_ref,status_pd,tipo_dt,monto_dep,obser_p,id_tb,fecha_conf,hora_conf,login_conf) values \n\t\t\t\t('$id_pd','$id_contrato','$fecha','$hora','$login','$fecha_tb','$id_cuba','$referencia_tb','CONFIRMADO','DEPOSITO','$monto_tb','$descrip_tb','$id_tb','$fecha','$hora','$login')\");\t\n\t\t\t\t$acceso->objeto->ejecutarSql(\"update tabla_bancos set status_tb='CONCILIADO' , tipo_tb='CLIENTES' where id_tb='$id_tb'\");\t\n\t\t\t\t$id_pd=$ini_u.verCoo_inc($acceso,$id_pd);\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\t$acceso->objeto->ejecutarSql(\"update tabla_bancos set status_tb='NO RELACIONADO', tipo_tb='CLIENTES' where id_tb='$id_tb'\");\t\n\t\t\t}\n\t\t}\n\treturn $cad;\t\n}", "function getSolicitud_id ($id_solicitud) {\n $db = new MySQL();\n $sql = \"SELECT \n t01.id as id_solicitud,\n date_format(t01.fecha_solicitud,'%d-%m-%Y') fecha_solicitud, \n t01.id_paciente, \n t01.id_medico,\n t03.nombre as medico,\n t01.id_lugarentrega,\n t01.id_servicio,\n concat(t02.nombres,' ', t02.apellidos) paciente,\n t02.edad,\n t02.id_sexo,\n t02.id_empresa,\n t04.nombre as empresa,\n t01.sumas,\n t01.descuento,\n t01.venta_total\n FROM lab_solicitud t01\n LEFT JOIN mnt_paciente t02 ON t02.id = t01.id_paciente\n LEFT JOIN ctl_medico t03 ON t03.id = t01.id_medico\n LEFT JOIN ctl_empresa t04 ON t04.id = t01.id_empresa\n WHERE t01.id=$id_solicitud\";\n return $db->fetch_array($db->consulta($sql));\n }", "public function selectMatiere($id){\n $con=new Connexion();\n $conn2=$con->con; \n $query=\"SELECT * FROM matiere where IdM=$id\";\n $result = $conn2->prepare($query);\n $result->execute();\n return $result->fetchAll(PDO::FETCH_ASSOC);\n }", "public function selectById($id){\r\n $sql = SELECT . VIEW_ANUNCIOS . \" WHERE idVeiculo=\".$id;\r\n\r\n //Abrindo conexão com o BD\r\n $PDO_conex = $this->conex->connectDataBase();\r\n\r\n //executa o script de select no bd\r\n $select = $PDO_conex->query($sql);\r\n\r\n /* $select->fetch no formado pdo retorna os dados do BD\r\n também retorna com característica do PDO como o fetch\r\n é necessário especificar o modelo de conversão.\r\n EX: PDO::FETCH_ASSOC, PDO::FETCH_ARRAY etc. */\r\n if($rsAnuncios=$select->fetch(PDO::FETCH_ASSOC)){\r\n $anuncios = new anuncios();\r\n $anuncios->setIdVeiculo($rsAnuncios[\"idVeiculo\"]);\r\n $anuncios->setNomeModelo($rsAnuncios[\"nomeModelo\"]);\r\n $anuncios->setNomeMarca($rsAnuncios[\"nomeMarca\"]);\r\n $anuncios->setFotoVeiculo($rsAnuncios[\"fotoVeiculo\"]);\r\n }\r\n\r\n $this->conex->closeDataBase();\r\n\r\n return($anuncios);\r\n }", "function buscarPerId($id) {\n\n $con = new db();\n $query = $con->prepare(\"SELECT * FROM missatge INNER JOIN usuari ON missatge.id_usuari = usuari.id_usuari WHERE id_missatge='$id';\");\n $result = $con->consultar($query);\n\n $usuari = $result[0][\"usuari\"];\n $llegit = $result[0][\"llegit\"];\n if ($llegit == '0') {\n $llegit = 'no';\n } else {\n $llegit = 'si';\n }\n $titol = $result[0][\"titol\"];\n $data = $result[0][\"data\"];\n $text = $result[0][\"missatge\"];\n $id_missatge = $result[0][\"id_missatge\"];\n $missatge = new Missatge($usuari, $llegit, $titol, $data, $text);\n $missatge->setId_missatge($id_missatge);\n\n if ($llegit == 'no') {\n $query = $con->prepare(\"UPDATE missatge set llegit=1 WHERE id_missatge='$id';\");\n }\n\n $con->consulta($query);\n $con = null;\n\n\n return $missatge;\n }", "public function selectById($id) {\n $conn = $this->conex->connectDatabase();\n $sql = \"select * from tbl_patrocinio where id_patrocinio= ?;\";\n $stm = $conn->prepare($sql);\n $stm->bindValue(1, $id);\n $success = $stm->execute();\n if ($success) {\n \n foreach ($stm->fetchAll(PDO::FETCH_ASSOC) as $result) {\n $Patrocinio = new Patrocinio();\n $Patrocinio->setId($result['id_patrocinio']);\n $Patrocinio->setNome($result['nome']);\n $Patrocinio->setDescricao($result['descricao']);\n $Patrocinio->setApagado($result['apagado']);\n $Patrocinio->setStatus($result['ativo']);\n return $Patrocinio;\n };\n $this->conex -> closeDataBase();\n }\n }", "public function obteneriddeporte($id){\n $sql = \"SELECT Sport.id as iddeporte FROM `sporte`.`coaches` AS `Coach` LEFT JOIN `sporte`.`users` AS `User` ON (`Coach`.`user_id` = `User`.`id`) LEFT JOIN `sporte`.`ligas` AS `Liga` ON (`Coach`.`liga_id` = `Liga`.`id`) LEFT JOIN `sporte`.`sports` AS `Sport` ON (`Liga`.`sport_id` = `Sport`.`id`) WHERE `user_id`=:em\";\n $sentencia = $this->dblink->prepare($sql);\n $sentencia->bindParam(\":em\", $id);\n $sentencia->execute(); \n $resultado = $sentencia->fetchObject();\n return $resultado->iddeporte;\n }", "public function personaYCargo($id)\n {\n\n }", "public function getIncaPpNom($id)\n {\n $result=$this->adapter->query(\"select h.id, a.idEmp, a.idEmp, d.idConc as idCon,0 as dias,\n f.formula , e.tipo, g.idCcos , e.idFor, a.diasAp, a.diasDp,\n case when ( ( a.diasAp + a.diasDp ) >= (c.dias - 1) )# Dias inicio pago empreasa\n then ( c.dias - 1) else ( a.diasAp + a.diasDp ) end as diasEmp, \n # Se buscan dias anteriores reportados o no reportados \n case when a.reportada = 1 then \n case when ( ( a.diasDp ) > (c.dias - 1) )# Dias inicio pago entidad\n then ( ( a.diasDp ) - ( c.dias - 1 ) ) else 0 end \n else \n case when ( ( a.diasAp + a.diasDp ) > (c.dias - 1) )# Dias inicio pago entidad\n then ( ( a.diasAp + a.diasDp ) - ( c.dias - 1 ) ) else 0 end \n end as diasEnt, \n d.tipo as tipInc, b.id as idInc \n from n_nomina_e_i a \n inner join n_incapacidades_pro b on b.id=a.idInc \n inner join n_incapacidades bp on bp.id = b.idInc \n inner join n_tipinc c on c.id=bp.idInc\n inner join n_tipinc_c d on d.idTinc=c.id \n inner join n_conceptos e on e.id=d.idConc\n inner join n_formulas f on f.id=e.idFor\n inner join a_empleados g on g.id=a.idEmp\n inner join n_nomina_e h on h.idEmp = a.idEmp and h.idNom = a.idNom \n where a.idNom = \".$id.\" and a.tipo = 1 \n order by a.idEmp\",Adapter::QUERY_MODE_EXECUTE); \n \n $datos=$result->toArray();\n return $datos;\n }", "function mostrar_operador(){\n\t\t\t$id=$_GET['id'];\n\t\t\t$sql=\"SELECT * FROM operador WHERE id_op='$id'\";\n\t\t\t$consulta=mysql_query($sql) or die(mysql_error());\n\t\t\t$resultado = mysql_fetch_array($consulta);\n\t\t\t$this->id=$id;\n\t\t\t$this->nombre=$resultado['nombre_op'];\n\t\t\t$this->apellido=$resultado['apellido_op'];\n\t\t\t$this->cedula=$resultado['cedula_op'];\n\t\t\t$this->correo=$resultado['correo_op'];\n\t\t\t$this->cantidad=$resultado['cantidad_op'];\n\t\t\t$this->fecha=$resultado['fecha_op'];\t\t\n}", "function fill_form_so_plan($gml_id) {\n\t\t$sql = \"\n\t\t\tSELECT\n\t\t\t\t\" . \n\t\t\t\t\"'\" . $this->trim_gml_prefix_if_exists($gml_id) . \"'::text::uuid AS plan_gml_id,\n\t\t\t\tgmlas.xplan_name AS name,\n\t\t\t\tgmlas.nummer AS nummer,\n\t\t\t\tgmlas.internalid AS internalid,\n\t\t\t\tgmlas.beschreibung AS beschreibung,\n\t\t\t\tgmlas.kommentar AS kommentar,\n\t\t\t\tto_char(gmlas.technherstelldatum, 'DD.MM.YYYY') AS technherstelldatum,\n\t\t\t\tto_char(gmlas.genehmigungsdatum, 'DD.MM.YYYY') AS genehmigungsdatum,\n\t\t\t\tto_char(gmlas.untergangsdatum, 'DD.MM.YYYY') AS untergangsdatum,\n\t\t\t\tCASE WHEN vpa.planname IS NOT NULL OR vpa.rechtscharakter IS NOT NULL OR vpa.nummer IS NOT NULL OR vpa.verbundenerplan_href IS NOT NULL THEN\n\t\t\t\t\tarray_to_json(ARRAY[(vpa.planname, vpa.rechtscharakter::xplan_gml.xp_rechtscharakterplanaenderung, vpa.nummer, vpa.verbundenerplan_href)]::xplan_gml.xp_verbundenerplan[])\n\t\t\t\t\tELSE NULL\n\t\t\t\tEND AS aendert,\n\t\t\t\tCASE WHEN vpwgv.planname IS NOT NULL OR vpwgv.rechtscharakter IS NOT NULL OR vpwgv.nummer IS NOT NULL OR vpwgv.verbundenerplan_href IS NOT NULL THEN\n\t\t\t\t\tarray_to_json(ARRAY[(vpwgv.planname, vpwgv.rechtscharakter::xplan_gml.xp_rechtscharakterplanaenderung, vpwgv.nummer, vpwgv.verbundenerplan_href)]::xplan_gml.xp_verbundenerplan[])\n\t\t\t\t\tELSE NULL\n\t\t\t\tEND AS wurdegeaendertvon,\n\t\t\t\tgmlas.erstellungsmassstab AS erstellungsmassstab,\n\t\t\t\tgmlas.bezugshoehe AS bezugshoehe,\n\t\t\t\tst_assvg(st_transform(gmlas.raeumlichergeltungsbereich,\". $this->epsg .\"), 0, 8) AS newpath,\n\t\t\t\tst_astext(st_transform(ST_ForceRHR(gmlas.raeumlichergeltungsbereich),\". $this->epsg .\")) AS newpathwkt,\n\t\t\t\tCASE WHEN vm.xp_verfahrensmerkmal_vermerk IS NOT NULL OR vm.xp_verfahrensmerkmal_datum IS NOT NULL OR vm.xp_verfahrensmerkmal_signatur IS NOT NULL OR vm.xp_verfahrensmerkmal_signiert IS NOT NULL THEN\n\t\t\t\t\tarray_to_json(ARRAY[(vm.xp_verfahrensmerkmal_vermerk, vm.xp_verfahrensmerkmal_datum, vm.xp_verfahrensmerkmal_signatur, vm.xp_verfahrensmerkmal_signiert)]::xplan_gml.xp_verfahrensmerkmal[])\n\t\t\t\t\tELSE NULL\n\t\t\t\tEND AS verfahrensmerkmale,\n\t\t\t\tCASE\n\t\t\t\t\tWHEN count_externeref > 0\n\t\t\t\t\tTHEN array_to_json(externeref.externereferenz)\n\t\t\t\t\tELSE NULL\n\t\t\t\tEND AS externereferenz,\n\t\t\t\tto_json((pg.name, pg.kennziffer)::xplan_gml.xp_plangeber) AS plangeber,\n\t\t\t\tto_json((gmlas.planart_codespace, gmlas.planart, NULL)::xplan_gml.so_planart) AS planart\n\t\t\t\t/*ARRAY[(g.ags,g.rs,g.gemeindename,g.ortsteilname)]::xplan_gml.xp_gemeinde[] AS gemeinde*/\n\t\t\tFROM\n\t\t\t\t\" . $this->gmlas_schema . \".so_plan gmlas LEFT JOIN\n\t\t\t\t/*\" . $this->gmlas_schema . \".so_plan_gemeinde gemeindelink ON gmlas.id = gemeindelink.parent_id LEFT JOIN*/\n\t\t\t\t/*\" . $this->gmlas_schema . \".xp_gemeinde g ON gemeindelink.xp_gemeinde_pkid = g.ogr_pkid LEFT JOIN*/\n\t\t\t\t(\n\t\t\t\t\tSElECT\n\t\t\t\t\t\tCOUNT(*) AS count_externeref,\n\t\t\t\t\t\texternereferenzlink_sub.parent_id,\n\t\t\t\t\t\tarray_agg((e_sub.georefurl,\n\t\t\t\t\t\t\t\t(e_sub.georefmimetype_codespace, e_sub.georefmimetype, NULL)::xplan_gml.xp_mimetypes,\n\t\t\t\t\t\t\t\te_sub.art::xplan_gml.xp_externereferenzart,\n\t\t\t\t\t\t\t\te_sub.informationssystemurl,\n\t\t\t\t\t\t\t\te_sub.referenzname,\n\t\t\t\t\t\t\t\te_sub.referenzurl,\n\t\t\t\t\t\t\t\t(e_sub.referenzmimetype_codespace, e_sub.referenzmimetype, NULL)::xplan_gml.xp_mimetypes,\n\t\t\t\t\t\t\t\te_sub.beschreibung,\n\t\t\t\t\t\t\t\tto_char(e_sub.datum, 'DD.MM.YYYY'),\n\t\t\t\t\t\t\t\te_sub.typ::xplan_gml.xp_externereferenztyp\n\t\t\t\t\t\t\t)::xplan_gml.xp_spezexternereferenz) AS externereferenz\n\t\t\t\t\tFROM\n\t\t\t\t\t\t\" . $this->gmlas_schema . \".so_plan_externereferenz externereferenzlink_sub LEFT JOIN\n\t\t\t\t\t\t\" . $this->gmlas_schema . \".xp_spezexternereferenz e_sub ON externereferenzlink_sub.xp_spezexternereferenz_pkid = e_sub.ogr_pkid\n\t\t\t\t\tGROUP BY\n\t\t\t\t\t\texternereferenzlink_sub.parent_id\n\t\t\t\t) externeref ON gmlas.id = externeref.parent_id LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".xp_plangeber pg ON gmlas.plangeber_xp_plangeber_pkid = pg.ogr_pkid LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".so_plan_aendert_aendert aendertlink ON gmlas.id = aendertlink.parent_pkid LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".aendert aendertlinktwo ON aendertlink.child_pkid = aendertlinktwo.ogr_pkid LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".xp_verbundenerplan vpa ON aendertlinktwo.xp_verbundenerplan_pkid = vpa.ogr_pkid LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".so_plan_wurdegeaendertvon_wurdegeaendertvon wurdegeaendertvonlink ON gmlas.id = wurdegeaendertvonlink.parent_pkid LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".wurdegeaendertvon wurdegeaendertvonlinktwo ON wurdegeaendertvonlink.child_pkid = wurdegeaendertvonlinktwo.ogr_pkid LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".xp_verbundenerplan vpwgv ON wurdegeaendertvonlinktwo.xp_verbundenerplan_pkid = vpwgv.ogr_pkid LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".so_plan_verfahrensmerkmale_verfahrensmerkmale verfahrensmerkmalelink ON gmlas.id = verfahrensmerkmalelink.parent_pkid LEFT JOIN\n\t\t\t\t\" . $this->gmlas_schema . \".verfahrensmerkmale vm ON verfahrensmerkmalelink.child_pkid = vm.ogr_pkid\n\t\t\tWHERE\n\t\t\t\tgmlas.id ='\" . $gml_id . \"'\n\t\t\t;\";\n\t\t$ret = $this->pgdatabase->execSQL($sql, 4, 0);\n\t\t$result = pg_fetch_assoc($ret[1]);\n\t\treturn $result;\n\t}", "public function mostrar($id)\n {\n //\n }", "public function mostrar($id)\n {\n //\n }", "public function mostrar($id)\n {\n //\n }", "public function mostrar($id)\n {\n //\n }", "protected function cargaIdUbicacion() {\n $dao = new PGDAO();\n $strSql = $this->COLECCIONMAPEOUBICA . $this->propiedad->getId_ubica();\n $arrayDatos = $this->leeDBArray($dao->execSql($strSql));\n $id = $arrayDatos[0]['zpubica'];\n return $id;\n }", "public function cargarCuentas($idPlan)\n\t{\n\t\t$sql='SELECT ID_SUBTIPOCUENTA,DESCRIPCION_CUENTA from Cuenta WHERE ID_PLANCUENTA='.$idPlan.'';\n\t\t$connection = Yii::app()->db;\n $command = $connection->createCommand($sql);\n $dataReader = $command->queryAll();\n return $dataReader;\n\t}", "public function por_id($id){\n $this->db->select('a.id, b.nombre as Empresa, c.nombre as Servicio, d.nombre as Linea, a.nombre, a.fecha_inicio, a.fecha_fin, a.habilitado, a.tiene_ticket, a.horas_disponibles, a.facturable');\n $this->db->from('proyectos a');\n $this->db->join('empresas b', 'a.id_empresa = b.id');\n $this->db->join('vmca_tipo_servicio c', 'a.id_tipo_servicio = c.id');\n $this->db->join('vmca_lineas_servicio d', 'a.id_linea_servicio = d.id');\n $this->db->where(array('a.id' => $id));\n $query = $this->db->get();\n $resultado = array(\n 'err' => FALSE,\n 'mensaje' => 'Proyecto cargado exitosamente',\n 'proyecto' => $query->result()\n );\n\n return $resultado;\n }", "public function cargarCita(){\n if(isset($_GET[\"id\"])){\n echo ($_GET[\"datos\"]);\n }\n else\n {\n echo (\"No hay Id\");\n }\n }", "public function idinformacion(){\n\t\treturn $this->_idinformacion;\n\t}", "public function handleGetSolicitudesAutorizado($id){\n return Response::json(RendicionSolicitud::where('AUTORIZADO_ID',$id)->where('ESTADO',1)->with('banco','solicitado','autorizado','solicitado.sucursal','centrocostos','tiposolicitud')->get());\n }", "function cargar_cuenta_de_ingreso() {\n $sql = \"SELECT id_plan_contable,cuenta_plan_contable,descripcion_plan_contable,cargar_plan_contable,abonar_plan_contable,transferencia_plan_contable FROM prosic_plan_contable WHERE cuenta_plan_contable LIKE '7%' ORDER BY cuenta_plan_contable\";\n $result = $this->Consulta_Mysql($sql);\n return $result;\n }", "function ambil_data_id($id_admin){\n\t\t$this->db->where($this->id_admin, $id_admin);\n\t\treturn $this->db->get($this->nama_table)->row();\n\t}", "function cl_issplan() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"issplan\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "public function conseguirId (){\n $query = $this->db->query (\"SELECT * FROM acceso WHERE id_acceso = '{$this->id_acceso}'\");\n if ($query->num_rows === 1)\n {\n $this->datos= $query->fetch_assoc();\n \n }\n return $this->datos;\n }", "public function edit($id)\n {\n\n Log::debug(\"EDIT PLAN IN CONTROLLER\");\n\n $stripeService = new StripeService();\n $stripeService->setStripeKey();\n\n $stripeSubscriptionService = new StripeSubscriptionService();\n $result = $stripeSubscriptionService->findPlan($id);\n\n if ($result['message'] == 'Success'){\n\n $plan = $result['plan'];\n\n $amountLen = strlen($plan->amount_decimal); \n $amount = substr_replace( $plan->amount_decimal, '.', $amountLen - 2, 0 ); \n\n $planArray[0]['id'] = $plan->id;\n $planArray[0]['product'] = $plan->product;\n $planArray[0]['interval'] = $plan->interval;\n $planArray[0]['amount'] = $amount;\n $planArray[0]['nickname'] = $plan->nickname;\n \n $plan = json_decode(json_encode($planArray), FALSE);\n \n return view('stripe.plan.create', ['plan' => $plan ]);\n\n } else {\n\n Log::debug($result['message']);\n\n session()->flash('error', $result['message']);\n\n return redirect()->back();\n\n }\n }", "function seleccionInicio($idP){\r\n }", "public static function obtenerInfoDesignacion($iddesignacion)\n {\n $sql =\"SELECT \n mp.idplanestudio, DATE_FORMAT(des.inicio, '%d/%m/%Y') AS inicioformat, DATE_FORMAT(des.fin, '%d/%m/%Y') AS finformat, des.horas, des.adhonorem, des.licencia, des.idprofesor, prof.idpersona, td.idcategoriadesignacion, \n des.iddesignacion, des.idcatedra, ifnull(des.observaciones,'') as observaciones, ifnull(des.motivonuevadesignacion,'') as motivonuevadesignacion, des.idprofesor, des.idtipodesignacion, des.inicio, des.fin, des.idresolucionprofesor, des.idresolucioncsu, des.iddedicacion, des.idestadodesignacion, cat.idsede, sed.nombre as sede, sed.abreviacion as sedeabv, \n CONCAT(per.apellido, ', ', per.nombre) as persona, td.descripcion as tipodesignacion, cd.descripcion as categoriadesignacion, m.nombre as materia, concat(car.nombre, ', ', pe.nombre) as carreraplan \n FROM designaciones des \n JOIN tipos_designaciones td on des.idtipodesignacion= td.idtipodesignacion\n JOIN categoria_designaciones cd ON td.idcategoriadesignacion = cd.idcategoriadesignacion\n JOIN profesores prof ON des.idprofesor = prof.idprofesor\n JOIN personas per ON prof.idpersona = per.idpersona\n JOIN catedras cat ON des.idcatedra = cat.idcatedra \n JOIN sedes sed ON cat.idsede = sed.idsede \n JOIN materias_planes mp ON cat.idmateriaplan = mp.idmateriaplan \n JOIN planes_estudios pe ON mp.idplanestudio = pe.idplanestudio\n JOIN carreras car on pe.idcarrera = car.idcarrera\n JOIN materias m ON mp.idmateria = m.idmateria\n WHERE des.iddesignacion = \".$iddesignacion.\" \";\n \n $q = Doctrine_Manager::getInstance()->getCurrentConnection()->fetchAssoc($sql);\n \n return $q;\n }", "function ler_id($id) {\n $x = (int)$id;\n if($x >= $this->bd[0][0] || $x <= 0) {return false;}\n //comecando a setar tudo\n $this->id = $this->bd[$x][0];\n $this->maximo = $this->bd[$x][1];\n $this->nome = $this->bd[$x][2];\n $this->categoria = $this->bd[$x][3];\n $this->tipo = $this->bd[$x][4];\n $this->atributo = $this->bd[$x][5];\n $this->specie = $this->bd[$x][6];\n $this->lv = $this->bd[$x][7];\n $this->atk = $this->bd[$x][8];\n $this->def = $this->bd[$x][9];\n $this->preco = $this->bd[$x][10];\n $this->descricao = $this->bd[$x][11];\n $this->img = '../imgs/cards/'.$this->id.'.png';\n return true;\n }", "function anagrafica($id, $type) {\n ?>\n <div class=\"border border-secondary rounded p-3\">\n <h5>Dati paziente</h5>\n <div class=\"table-responsive\" >\n <table align=\"center\" style='width: 70%'>\n <?php\n try {\n $conn = connect();\n\n $sql = \"\";\n\n switch ($type) {\n case 0:\n $sql = \"SELECT pazienti.nome AS nome_paziente, pazienti.cognome AS cognome_paziente, ddn, sesso, email, telefono,\n data_inizio, motivo, posti.nome AS nome_posto,\n medici.nome AS nome_medico, medici.cognome AS cognome_medico\n FROM pazienti, ricoveri, posti, medici\n WHERE cod_paziente = pazienti.cf AND\n cod_posto = posti.id AND\n cod_medico = medici.id AND\n ricoveri.id = :id\";\n break;\n\n case 1:\n $sql = \"SELECT pazienti.nome AS nome_paziente, pazienti.cognome AS cognome_paziente, ddn, sesso, email, telefono,\n data_inizio, motivo, posti.nome AS nome_posto,\n medici.nome AS nome_medico, medici.cognome AS cognome_medico\n FROM pazienti, ricoveri, posti, medici, visite\n WHERE cod_paziente = pazienti.cf AND\n cod_posto = posti.id AND\n ricoveri.cod_medico = medici.id AND\n cod_ricovero = ricoveri.id AND\n visite.id = :id\";\n break;\n }\n\n $stmt = $conn->prepare($sql);\n $stmt->bindParam(\":id\", $id, PDO::PARAM_INT);\n $stmt->execute();\n $res = $stmt->fetch();\n\n if(!empty($res)) {\n $nome = htmlentities($res[\"nome_paziente\"]);\n $cognome = htmlentities($res[\"cognome_paziente\"]);\n $ddn = date(\"d/m/Y\", strtotime($res[\"ddn\"]));\n $sesso = htmlentities($res[\"sesso\"]);\n $email = htmlentities($res[\"email\"]);\n $telefono = htmlentities($res[\"telefono\"]);\n $data_inizio = date(\"d/m/Y H:i\", strtotime($res[\"data_inizio\"]));\n $nominaivo_medico = htmlentities($res[\"cognome_medico\"] . \" \" . $res[\"nome_medico\"]);\n $posto = htmlentities($res[\"nome_posto\"]);\n $motivo = htmlentities($res[\"motivo\"]);\n\n echo \"<tr>\n <td class='anagrafica' style='width: 33.33%'><b>Nome</b><br>$nome</td>\n <td class='anagrafica' style='width: 33.33%'><b>Cognome</b><br>$cognome</td>\n <td class='anagrafica' style='width: 33.33%'><b>Sesso</b><br>$sesso</td>\n </tr>\n <tr>\n <td class='anagrafica'><b>Data di nascita</b><br>$ddn</td>\n <td class='anagrafica'><b>Email</b><br>$email</td>\n <td class='anagrafica'><b>Telefono</b><br>$telefono</td>\n </tr>\n <tr>\n <td class='anagrafica'><b>Data ricovero</b><br>$data_inizio</td>\n <td class='anagrafica'><b>Stanza</b><br>$posto</td>\n <td class='anagrafica'><b>Medico</b><br>$nominaivo_medico</td>\n </tr>\n <tr>\n <td colspan='3'><b>Motivo</b><br>$motivo</td>\n </tr>\";\n }\n else {\n die(\"<br><span class='error'>Non è stato possibile trovare i dati del paziente</span>\");\n }\n\n } catch (PDOException $e) {\n $conn = null;\n die(\"<br><span class='error'>Qualcosa non ha funzionato</span>\");\n }\n ?>\n </table>\n </div>\n </div>\n <?php\n }", "static function get_destino($id = false)\n {\n if($id)\n {\n $sql = \"SELECT descripcion FROM tribunal.mov_destinos Where id_mov_destino = $id\";\n }else{\n //$perfil_datos = toba::manejador_sesiones()->get_perfil_datos();\n $sql = \"SELECT id_mov_destino, descripcion FROM tribunal.mov_destinos\";\n\n if(toba::perfil_de_datos()->posee_dimension('mesa','staf') == 1)\n {\n $sql = toba::perfil_de_datos('mesa')->filtrar($sql,'staf');\n }\n elseif(toba::perfil_de_datos()->posee_dimension('gestion','staf') == 1)\n {\n $sql = toba::perfil_de_datos('gestion')->filtrar($sql,'staf');\n }\n elseif(toba::perfil_de_datos()->posee_dimension('procuracion','staf') == 1)\n {\n $sql = toba::perfil_de_datos('procuracion')->filtrar($sql,'staf');\n }\n }\n $datos = toba::db()->consultar($sql);\n return $datos;\n }", "public function obtenerNombredeporte($id){\n $sql = \"SELECT `Sport`.`nombre` FROM `sporte`.`coaches` AS `Coach` LEFT JOIN `sporte`.`users` AS `User` ON (`Coach`.`user_id` = `User`.`id`) LEFT JOIN `sporte`.`ligas` AS `Liga` ON (`Coach`.`liga_id` = `Liga`.`id`) LEFT JOIN `sporte`.`sports` AS `Sport` ON (`Liga`.`sport_id` = `Sport`.`id`) WHERE `user_id`=:em\";\n $sentencia = $this->dblink->prepare($sql);\n $sentencia->bindParam(\":em\", $id);\n $sentencia->execute(); \n $resultado = $sentencia->fetchObject();\n return $resultado->nombre;\n }", "static function getMembershipPlan($sub_id){\n $db = JFactory::getDbo();\n $query = $db->getQuery(true);\n $query->select('plan_id')->from('#__osmembership_subscribers')->where('id = \"'.$sub_id.'\"');\n $db->setQuery($query);\n return $db->loadResult();\n }", "public function show($id)\n {\n Log::debug(\"SHOW PLAN IN CONTROLLER\");\n\n $stripeService = new StripeService();\n $stripeService->setStripeKey();\n\n $stripeSubscriptionService = new StripeSubscriptionService();\n $result = $stripeSubscriptionService->findPlan($id);\n\n if ($result['message'] == 'Success'){\n\n return new StripePlanResource($result['plan']);\n\n } else {\n\n Log::debug($result['message']);\n\n session()->flash('error', $result['message']);\n\n return redirect()->back();\n\n }\n\n }", "public function activar_cliente($id,$estado){\n $conectar= parent::conexion();\n parent::set_names();\n $sql=\"CALL spc_actualizar_estadoCliente(?,?)\";\n $sql=$conectar->prepare($sql);\n $sql->bindValue(1, $estado);\n $sql->bindValue(2, $id);\n $sql->execute();\n return $resultado=$sql->fetchAll(PDO::FETCH_ASSOC);\n }", "function get_entrada_pr_factura_id($id,$auth){\n\t\tif($auth==0){\n\t\t\t$validacion=\"and prf.usuario_validador_id=0 \";\n\t\t} else {\n\t\t\t$validacion=\" and prf.usuario_validador_id>0 \";\n\t\t}\n\t\t\t\n\t\t$u = new Entrada();\n\t\t$sql=\"select distinct on (e.pr_facturas_id) e.pr_facturas_id, e.id as id1, date(e.fecha) fecha, ( prf.monto_total - prf.descuento ) as importe_factura, pr.razon_social as proveedor,prf.folio_factura, prf.pr_pedido_id, ef.tag as espacio_fisico, eg.tag as estatuse, e.lote_id, cel.tag as estatus_traspaso \".\n\t\t\t\t\"from entradas as e \".\n\t\t\t\t\"left join cproveedores as pr on pr.id=e.cproveedores_id \".\n\t\t\t\t\"left join pr_facturas as prf on prf.id=e.pr_facturas_id \".\n\t\t\t\t\"left join espacios_fisicos as ef on ef.id=e.espacios_fisicos_id \".\n\t\t\t\t\"left join estatus_general as eg on eg.id=e.estatus_general_id \".\n\t\t\t\t\"left join lotes_pr_facturas as lf on lf.pr_factura_id=prf.id \".\n\t\t\t\t\"left join cestatus_lotes as cel on cel.id=lf.cestatus_lote_id \".\n\t\t\t\t\"where e.estatus_general_id=1 and ctipo_entrada=1 and prf.id='$id' $validacion\".\n\t\t\t\t\"group by e.pr_facturas_id, e.id, e.fecha, importe_factura, pr.razon_social, prf.folio_factura, prf.pr_pedido_id, ef.tag, eg.tag, e.pr_facturas_id, e.cproveedores_id,e.lote_id, prf.descuento, cel.tag \".\n\t\t\t\t\"order by e.pr_facturas_id desc,e.fecha desc\";\n\t\t$u->query($sql);\n\t\tif($u->c_rows > 0){\n\t\t\treturn $u;\n\t\t} else {\n\t\t\treturn FALSE;\n\t\t}\n\t}", "public function traerPorVehiculo($id)\n {\n }", "public function MesasPorId()\n{\n\tself::SetNames();\n\t$sql = \" select salas.codsala, salas.nombresala, salas.salacreada, mesas.codmesa, mesas.nombremesa, mesas.mesacreada, mesas.statusmesa FROM mesas INNER JOIN salas ON salas.codsala = mesas.codsala where mesas.codmesa = ? \";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->execute( array(base64_decode($_GET[\"codmesa\"])) );\n\t$num = $stmt->rowCount();\n\tif($num==0)\n\t{\n\t\techo \"\";\n\t}\n\telse\n\t{\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[] = $row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\t\t}\n\t}", "public function getAllitemPlanos($id)\n {\n $this->db->select('planos.*, users.*, setores.*')\n ->join('users', 'planos.responsavel = users.id', 'left')\n ->join('setores', 'planos.setor = setores.id', 'left') \n \n ->order_by('idplanos', 'desc');\n $q = $this->db->get_where('planos', array('idatas' => $id));\n \n if ($q->num_rows() > 0) {\n foreach (($q->result()) as $row) {\n $data[] = $row;\n }\n return $data;\n }\n return FALSE;\n }", "public function mirarForanea($idCarpetaDestino){\n $dbh = BaseDatos::getInstance(); \n $mirarArchiu = $dbh->prepare('SELECT *\n FROM carpeta\n WHERE ID_CARPETA = :idCarpetaDestino');\n $mirarArchiu->bindParam(':idCarpetaDestino', $idCarpetaDestino, PDO::PARAM_INT);\n $mirarArchiu->execute();\n $foranea = $mirarArchiu-> fetch(PDO::FETCH_ASSOC);\n return $foranea['ID_CARPETA_FORANA'];\n }", "public function getListadoAsignaturasPorPlan($plan)\n {\n\t\t $query=\"SELECT ASIGNATURA FROM planes WHERE CODIGO_PLA='$plan' ORDER BY CORRELATIV;\";\n\t\t if($registro=$this->conexionPlanes->consulta($query))\n\t\t {\n\t\t\t for($i=0; $i<count($registro);$i++)\n\t\t\t {\n\t\t\t\t $resultado[$i]=$registro[$i]['ASIGNATURA'];\n\t\t\t }\n\t\t\t \n\t\t\t return $resultado;\n\t\t }\n\t\t else\n\t\t {\n\t\t\t return false;\n\t\t }\n }", "function info($id) \n { \n $oaux=new maritalStatus();\n if($id==$oaux->single())\n \t$this->single();\n if($id==$oaux->married())\n $this->married();\n if($id==$oaux->divorced())\n $this->divorced(); \n return($this->marsta_id);\n }", "function modeloObtenerTipo($user){\n \n $nplan = $_SESSION['tusuarios'][$user]['plan'];\n return PLANES[$nplan]; // Máster\n}", "public function edit($id, $tab) {\n\n $corredores = Persona::where('tipo_cargo', '=', 'Corredor - Externo')\n ->Orwhere('tipo_cargo', '=', 'Empleado')\n ->select(DB::raw('id , CONCAT_WS(\" \",nombre,apellido_paterno,apellido_materno) as Corredor'))\n ->pluck('Corredor', 'id');\n\n $portales = Portales::pluck('nombre', 'id');\n $regiones = Region::pluck('region_nombre', 'region_id');\n $captacion = Captacion::find($id);\n $persona = Persona::find(isset($captacion->id_propietario) ? $captacion->id_propietario : 0);\n $inmueble = Inmueble::find(isset($captacion->id_inmueble) ? $captacion->id_inmueble : 0);\n\n $captaciones_persona = DB::table('cap_publicaciones as c')\n ->leftjoin('personas as p1', 'c.id_propietario', '=', 'p1.id')\n ->leftjoin('inmuebles as i', 'c.id_inmueble', '=', 'i.id')\n ->leftjoin('users as p2', 'c.id_creador', '=', 'p2.id')\n ->leftjoin('personas as p3', 'c.id_modificador', '=', 'p3.id')\n ->leftjoin('comunas as o', 'i.id_comuna', '=', 'o.comuna_id')\n ->leftjoin('portales as po', 'c.portal', '=', 'po.id')\n ->where(\"c.id_propietario\", \"=\", isset($captacion->id_propietario) ? $captacion->id_propietario : 0)\n ->where(\"c.id_propietario\", \"!=\", \"null\")\n ->whereNotIn(\"c.id_estado\", [0, 4])\n ->select(DB::raw('(select count(*) from cap_gestion where id_captacion_gestion=c.id) as cantGes, c.id as id_publicacion, DATE_FORMAT(c.created_at, \"%d/%m/%Y\") as fecha_creacion, c.id_estado as id_estado, CONCAT(p1.nombre,\" \",p1.apellido_paterno,\" \",p1.apellido_materno) as Propietario, p2.name as Creador'), 'i.id as id_inmueble', 'i.direccion', 'i.numero', 'i.departamento', 'o.comuna_nombre', 'po.nombre as portal')\n ->get();\n\n $captaciones_inmueble = DB::table('cap_publicaciones as c')\n ->leftjoin('personas as p1', 'c.id_propietario', '=', 'p1.id')\n ->leftjoin('inmuebles as i', 'c.id_inmueble', '=', 'i.id')\n ->leftjoin('users as p2', 'c.id_creador', '=', 'p2.id')\n ->leftjoin('personas as p3', 'c.id_modificador', '=', 'p3.id')\n ->leftjoin('comunas as o', 'i.id_comuna', '=', 'o.comuna_id')\n ->leftjoin('portales as po', 'c.portal', '=', 'po.id')\n ->where(\"c.id_inmueble\", \"=\", isset($captacion->id_inmueble) ? $captacion->id_inmueble : 0)\n ->where(\"c.id_inmueble\", \"!=\", \"null\")\n ->whereNotIn(\"c.id_estado\", [0, 4])\n ->select(DB::raw('(select count(*) from cap_gestion where id_captacion_gestion=c.id) as cantGes,c.id as id_publicacion, DATE_FORMAT(c.created_at, \"%d/%m/%Y\") as fecha_creacion, c.id_estado as id_estado, CONCAT(p1.nombre,\" \",p1.apellido_paterno,\" \",p1.apellido_materno) as Propietario, p2.name as Creador'), 'i.id as id_inmueble', 'i.direccion', 'i.numero', 'i.departamento', 'o.comuna_nombre', 'po.nombre as portal')\n ->get();\n $idr = null;\n\n $gestion = DB::table('cap_gestion as g')\n ->leftjoin('users as p2', 'g.id_creador_gestion', '=', 'p2.id')\n ->where(\"g.id_captacion_gestion\", \"=\", $id)\n ->select(DB::raw('g.id, DATE_FORMAT(g.fecha_gestion, \"%d/%m/%Y\") as fecha_gestion, p2.name as Creador'), 'g.dir', 'g.tipo_contacto', 'g.hora_gestion')\n ->get();\n\n\n $imagenes = CaptacionFoto::where('id_captacion', '=', $id)->get();\n if ($tab == 2) {\n if (count($imagenes) > 0) {\n $tab = 3;\n }\n\n if (count($gestion) > 0) {\n $tab = 4;\n }\n }\n\n return view('captaciones.edit', compact('captacion', 'regiones', 'persona', 'inmueble', 'idr', 'captaciones_persona', 'captaciones_inmueble', 'imagenes', 'portales', 'gestion', 'tab', 'corredores'));\n }", "function insertarAnalisisPorqueDet(){\n\t\t$this->procedimiento='gem.ft_analisis_porque_det_ime';\n\t\t$this->transaccion='GM_DET_INS';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_analisis_porque','id_analisis_porque','int4');\n\t\t$this->setParametro('solucion','solucion','varchar');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('porque','porque','varchar');\n\t\t$this->setParametro('respuesta','respuesta','varchar');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function ArqueoCajaPorId()\n{\n\tself::SetNames();\n\t$sql = \" select * FROM arqueocaja INNER JOIN cajas ON arqueocaja.codcaja = cajas.codcaja LEFT JOIN usuarios ON cajas.codigo = usuarios.codigo where arqueocaja.codarqueo = ? \";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->execute( array(base64_decode($_GET[\"codarqueo\"])) );\n\t$num = $stmt->rowCount();\n\tif($num==0)\n\t{\n\t\techo \"\";\n\t}\n\telse\n\t{\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[] = $row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\t\t}\n\t}", "public function sanphamdetail()\n\t\t{\n\t\t\t$id = $_GET['chitiet_sanpham'];\n\t\t\t//goi ham model de xu li\n\t\t\t$ketqua = $this->sanpham_model->OneRecordData1($id);\n\t\t\treturn $ketqua;\n\t\t}", "public function DisplayAchat($id_marchant){\n $req = $this->pdo->prepare(\"SELECT * FROM inventaire \n INNER JOIN objet on objet.id_objet = inventaire.id_objet\n WHERE id_perso = :id\n \");\n $req->execute([\n \":id\" => $id_marchant\n ]);\n return $req->fetchAll(PDO::FETCH_ASSOC);\n }", "function get_convocatoria_actual($tipo){\n $actual=date('Y-m-d');\n $anio_actual= date(\"Y\", strtotime($actual));\n switch ($tipo) {\n case 3:$id_tipo=1;//3 es reco\n break;\n default:$id_tipo=2;\n break;\n }\n $sql=\"select id_conv from convocatoria_proyectos \"\n //. \" where anio=$anio_actual and id_tipo=$id_tipo\";\n .\" where fec_inicio<='\".$actual.\"' and fec_fin >='\".$actual.\"'\"\n . \" and id_tipo=$id_tipo\";\n $resul=toba::db('designa')->consultar($sql);\n if(count($resul)>0){\n return $resul[0]['id_conv'];\n }else \n return null;\n }", "public function getIdarl(){\n return $this->idarl;\n }", "function payplan($id=0){\r\n\t\t$row = $this->accounts_model->getAccountById($id);\r\n\r\n\t\tif(count($row) <= 0){\r\n\t\t\t$this->session->set_flashdata('error_msg', 'Account info incorrect');\r\n\t\t\tredirect('/');\r\n\t\t}\r\n\r\n\t\tif (strpos($row['role'], 'pro_artist')) {\r\n\t\t\t$price = $row['pay_plan'] == 'annually' ? 12*12 : 18;//us$\r\n\t\t}\r\n\t\telse{\r\n\t\t\t$price = $row['pay_plan'] == 'annually' ? 25*12 : 32;//us$\t\r\n\t\t}\r\n\r\n\t\t$this->load->view('header/header');\r\n\t\t$this->load->view('payplan_view', ['row'=>$row, 'price'=>$price]);\r\n\t\t$this->load->view('footer');\r\n\t}", "function getdatait( $id = 0 )\n\t{\n\t\tif ($id === 0 ){\n\t\t\t$id = $this->datasis->dameval(\"SELECT MAX(id) FROM prdo\");\n\t\t}\n\t\tif(empty($id)) return \"\";\n\t\t$numero = $this->datasis->dameval(\"SELECT numero FROM prdo WHERE id=$id\");\n\t\t$grid = $this->jqdatagrid;\n\t\t$mSQL = \"SELECT * FROM itprdo WHERE numero='${numero}' \";\n\t\t$response = $grid->getDataSimple($mSQL);\n\t\t$rs = $grid->jsonresult( $response);\n\t\techo $rs;\n\t}", "public function getConsultapersonas_acta($id_asignacion)\n {\n $query = \"select id_asignar,consecutivo_asignar,nombre_proyecto,observacion,YEAR(fecha_asignacion) as anio,MONTH(fecha_asignacion) as MES,DAY(fecha_asignacion) as dia,concat(nombres_persona,' ',apellidos_persona) as nombre_entrega,(SELECT concat(nombres_persona,' ',apellidos_persona) from persona where id_persona= fkID_persona_recibe and asignar.estado= 1 ) as nombres_recibe,(SELECT nombre_cargo from persona\n INNER JOIN cargo on id_cargo = persona.fkID_cargo where id_persona= fkID_persona_recibe and asignar.estado= 1 ) as cargo_recibe,(SELECT documento_persona from persona where id_persona= fkID_persona_recibe and asignar.estado= 1 ) as documento_recibe,nombre_cargo as cargo_entrega,documento_persona as documento_entrega FROM `asignar`\n INNER JOIN proyecto on id_proyecto = fkID_proyecto\n INNER JOIN persona on id_persona = fkID_persona_entrega\n INNER JOIN cargo on id_cargo = persona.fkID_cargo\n WHERE id_asignar='\" . $id_asignacion . \"'\";\n $result = mysqli_query($this->link, $query);\n $data = array();\n while ($data[] = mysqli_fetch_assoc($result));\n array_pop($data);\n return $data;\n }", "public function getPlanById(int $id){\n $this->open();\n\n $result = $this->query('SELECT * FROM '.$this->TABLE_NAME.' WHERE id=:id', array(\n new QueryParam(':id', $id, PDO::PARAM_INT)\n ));\n\n // Close connection\n $this->close();\n\n // Check if is found\n if($result->rowCount() > 0){\n\n // Check result\n while($row = $result->fetch(PDO::FETCH_OBJ)){\n $foundPlan = new Plan(\n $row->id,\n $row->name,\n $row->price,\n $row->detail,\n $row->docsUrl\n );\n\n return $foundPlan;\n }\n\n }\n else{\n // It isn't found so return false\n return false;\n }\n\n }" ]
[ "0.68574417", "0.64684856", "0.6467074", "0.6298044", "0.6258166", "0.61663127", "0.61555743", "0.6007302", "0.60039926", "0.5991225", "0.596222", "0.59620845", "0.59478194", "0.594757", "0.59277296", "0.5894378", "0.5885193", "0.5874222", "0.5856647", "0.5841292", "0.58375907", "0.5816927", "0.58141637", "0.58130085", "0.58128643", "0.58100057", "0.57930714", "0.5792214", "0.57907975", "0.5786399", "0.57816124", "0.57673764", "0.57673764", "0.57673764", "0.5759385", "0.5734686", "0.57289404", "0.5715891", "0.57123643", "0.5711386", "0.57104945", "0.57088286", "0.5706329", "0.5679875", "0.5666389", "0.5646581", "0.5635689", "0.563081", "0.5628709", "0.56142443", "0.5601571", "0.55949974", "0.55931836", "0.55904025", "0.5590064", "0.5588009", "0.55841553", "0.55822235", "0.5576545", "0.5576545", "0.5576545", "0.5576545", "0.55723906", "0.55661273", "0.5552781", "0.55514157", "0.5549754", "0.5548817", "0.5543742", "0.55408823", "0.5538209", "0.5528275", "0.55270624", "0.5526786", "0.552291", "0.5521722", "0.5502336", "0.54988253", "0.54970014", "0.549633", "0.5495177", "0.54931307", "0.54896605", "0.5487266", "0.5485244", "0.5485049", "0.54827464", "0.5479476", "0.5474987", "0.5474367", "0.54731804", "0.5446735", "0.54457843", "0.54433936", "0.54430217", "0.5442709", "0.544202", "0.54399234", "0.5439787", "0.5430567", "0.5430288" ]
0.0
-1
TODO: Implement first() method.
public function first() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function first();", "public function first();", "public function first();", "public function first();", "public function first();", "public function first();", "public function first();", "public function first();", "public function first() {}", "public static function first();", "public function getFirst();", "public function first(){\n // return $this->_results[0];\n return $this->results()[0];\n }", "public function first(): mixed;", "public function first(): mixed;", "public function first()\n {\n // return $this->_results[0];\n return $this->results()[0];\n }", "public function getFirst() {}", "public function first(){\n return $this->find(1);\n }", "function first()\n{\n\t$this->rewind();\n\treturn $this->current();\n}", "public function first() {\n\t\t$result = $this->get_result();\n\n\t\treturn array_shift( $result );\n\t}", "public function first() {\n\t\treturn $this->valueForKey($this->firstKey());\n\t}", "public function getFirst()\n\t{\t\treturn $this->first;\n\t}", "public function first()\n {\n return $this->results()[0];\n }", "public function first() {\n return $this->nth( 0 );\n }", "public function first()\n {\n return $this->take(1)->get()->first();\n }", "public function first(){\n\n //using the above (results) method here\n return $this->results()[0]; //depends on the version of your PHP server\n //return $this->results[0];\n }", "function getFirst() ;", "public function first()\n {\n $this->cursor = 0;\n\n return $this->at($this->cursor);\n }", "public function first()\n {\n return $this->results()[0];\n }", "public function getFirst()\n\t{\n\t\treturn $this->first;\n\t}", "public function findFirst();", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n\t{\n\t\treturn parent::first();\n\t}", "public function first()\n {\n return parent::first();\n }", "public function first()\n {\n return parent::first();\n }", "public function first()\n {\n return parent::first();\n }", "public function first()\n {\n return parent::first();\n }", "public function first()\n {\n return parent::first();\n }", "public function first()\n {\n return parent::first();\n }", "public function first()\n {\n return parent::first();\n }", "public function first()\n {\n return parent::first();\n }", "public function first()\n {\n return parent::first();\n }", "public function first()\n {\n return parent::first();\n }", "public function first()\n {\n return parent::first();\n }", "public function first()\n {\n return parent::first();\n }", "public function first()\n {\n return parent::first();\n }", "public function first()\n {\n return parent::first();\n }", "public function first()\n {\n return parent::first();\n }", "public function first()\n {\n return parent::first();\n }", "public function First()\n {\n return $this->Results()[0];\n }", "public function getFirst()\n {\n return $this->first;\n }", "public function getFirst()\n {\n return $this->first;\n }", "public function first()\n {\n $this->rewind();\n return $this->current();\n }", "public function first()\n {\n return $this->getData(0);\n }", "public function first() {\n\t\treturn $this->items[0];\n\t}", "public function first() {\n return reset($this->list);\n }", "public function firstItem();", "public function first(): mixed\n {\n return Iterators::first($this->iterator);\n }", "public function first()\n {\n foreach ($this->items as $currentItem) {\n return $currentItem;\n }\n }", "final public function first()\n {\n $items = $this->all();\n if (count($items) === 0) {\n return null;\n }\n return reset($items);\n }", "public function first() { \t\n \ttry{\n if (!is_array($this->Items)) return $this->Items ; \t\t\n if (!count($this->Items)) return null; \t\n \treset($this->Items); \t\t\n return $this->Items[key($this->Items)]; \n }catch(Exception $e){\n throw $e;\n } \t\n }", "public function first() {\n\n\t\treturn $this->search[0];\n\n\t}", "public function first(){\n $this->execute();\n if(count($this->results) > 0){\n return current($this->results);\n } else {\n return null;\n }\n }", "public function first() {\n return $this->seek(0);\n }", "public function first()\n\t{\n\t\treturn $this->find()->first();\n\t}", "public function first()\n {\n $data = parent::first();\n\n // For singletons, wrap them as a one-item array and then unwrap on return\n $data = $this->addRelations([$data]);\n\n return reset($data);\n }", "public function first()\n {\n return current($this->_data);\n }", "public function first()\r\n\t{\r\n\t\treturn reset($this->_items);\r\n\t}", "function first ()\n {\n return $this->A ? $this->A[0] : null;\n }", "public function first() {\n if (sizeof($this) < 1) return null;\n $keys = array_keys($this);\n return $this[$keys[0]];\n }", "public function first()\n {\n $sql = $this->get() . ' LIMIT 1';\n $this->query = $sql;\n }", "public function first()\n {\n return $this->all()->first();\n }", "public function first()\n\t{\n\t\tif ($this->count()) {\n\t\t\treturn $this->_items[0];\n\t\t}\n\t}", "final public function first()\n {\n $queryBuilder = $this->createQueryBuilder();\n $queryBuilder->selectAll();\n $queryBuilder->limit(1);\n\n return $this->fetchOne($queryBuilder);\n }", "public function first() {\n\t\treturn $this->execute()->first();\n\t}", "public function first()\n {\n $collection = $this->get();\n return count($collection) ? $collection[0] : null;\n }", "function first()\n\t{\n\t\treturn array_values($this->_data)[0];\n\t}", "public function getFirstItem() {}", "public function getFirstItem() {}", "final public function getFirst() {\n\t\treturn null;\n\t}", "public function first()\n {\n $result = $this->limit(1)->get();\n\n return $result[0] ?? null;\n }", "public function first()\n {\n return call_user_func($this->class . \"::__createInstanceFromArray\", $this->query->first());\n }" ]
[ "0.91696584", "0.91696584", "0.91696584", "0.91696584", "0.91696584", "0.91696584", "0.91696584", "0.91696584", "0.89991844", "0.8694712", "0.83998865", "0.83673", "0.834337", "0.834337", "0.8284112", "0.82821184", "0.8229505", "0.8175767", "0.8174162", "0.8156844", "0.81467956", "0.81212485", "0.80469257", "0.8039696", "0.80264026", "0.80182904", "0.79904073", "0.79755676", "0.7945921", "0.7933927", "0.79143655", "0.79143655", "0.79143655", "0.79143655", "0.79143655", "0.79143655", "0.79143655", "0.79143655", "0.79143655", "0.79143655", "0.79143655", "0.79143655", "0.79143655", "0.79143655", "0.79143655", "0.79143655", "0.79143655", "0.79143655", "0.79143655", "0.79143655", "0.79143655", "0.79132926", "0.79132926", "0.79132926", "0.79132926", "0.79132926", "0.79132926", "0.79132926", "0.79132926", "0.79132926", "0.79132926", "0.79132926", "0.79132926", "0.79132926", "0.79132926", "0.79132926", "0.79132926", "0.79116285", "0.79077125", "0.79077125", "0.7888648", "0.78813803", "0.7874006", "0.7853764", "0.7843586", "0.781572", "0.7814329", "0.7779217", "0.7776054", "0.7731439", "0.7722551", "0.7700649", "0.76878875", "0.7657121", "0.7636326", "0.7619506", "0.761889", "0.7616952", "0.75978947", "0.75963694", "0.75904477", "0.7587658", "0.75780493", "0.75748163", "0.75720227", "0.7539853", "0.7539805", "0.75330305", "0.75196475", "0.7508595" ]
0.8246237
16
TODO: Implement fetch() method.
public function fetch(): array { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function fetch();", "abstract public function fetch();", "public function fetch();", "public function fetch();", "public function fetch();", "public function fetch();", "public function fetch();", "public function fetch();", "public function fetch();", "public function fetch();", "public function fetch();", "public function fetch() {}", "function fetch();", "public function fetch() {\n\t\t\treturn $this->run(\"fetch\");\n\t\t}", "public function fetchObject();", "public function fetchObject();", "public abstract function fetchObject();", "private function fetch() {\n\t\treturn $this->storage = $this->connection->fetch($this->request);\n\t}", "function fetch() {\n\t\t$this->i++;\n\t\treturn $this->result->fetch_object($this->class_name);\n\t}", "public function __invoke() {\r\n return $this->fetch();\r\n }", "abstract public function fetchData();", "abstract public function fetchData();", "public function getFetch()\n {\n return $this->get(self::_FETCH);\n }", "public abstract function FetchObject();", "public function fetchInto(){\n\t\t\t}", "public function load(){return $this->fetch();}", "function FetchObj() {}", "public function fetchResult();", "protected function fetch()\n {\n if (!$this->valid) {\n return;\n }\n\n if (!$this->initialized) {\n $this->initialize();\n }\n\n $this->valid = false;\n\n $callback = $this->fetchCallback;\n $callback($this);\n\n if (!$this->valid) {\n $this->dispose();\n }\n\n }", "public function fetch()\n {\n return mysql_fetch_object($this->res);\n }", "abstract protected function _doFetch($id);", "public function fetch()\r\n {\r\n $this->query();\r\n return $this->sth->fetch();\r\n }", "protected function runFetch()\n\t{\n\t\tif ($this->iterate_class) {\n\t\t\treturn $this->fetchClass();\n\t\t}\n\n\t\treturn $this->fetch();\n\t}", "abstract public function retrieve();", "abstract public function fetch($fetchType = \\PDO::FETCH_ASSOC);", "public function fetch()\n {\n return $this->info;\n }", "public function fetch($fetchStyle= null);", "public function fetchObject(){\n $this->debugBacktrace();\n $this->fetchType = \"fetch_object\";\n return $this;\n }", "public function fetch($name);", "public function retrieveData() {\n return $this->fetch();\n }", "function fetch(){\n\t\tif($this->result==null){\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif($this->result==false){\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\treturn $this->result->fetch_assoc();\n\t}", "public function fetch() {\r\n $atomic = !$this->in_transaction();\r\n if ($atomic) {\r\n $this->transaction_start();\r\n }\r\n $shm_id = $this->_open_existing();\r\n $result = '';\r\n if ($shm_id) {\r\n $result = shmop_read($shm_id, 0, shmop_size($shm_id));\r\n shmop_close($shm_id);\r\n }\r\n if ($atomic) {\r\n $this->transaction_finish();\r\n }\r\n return $result;\r\n }", "function fetch()\n\t{\n\t\t// check if results has content\n\t\tif($this->result == false)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t//return result\n\t\treturn mysqli_fetch_assoc($this->result);\n\t}", "private function fetch()\n\t{\n\t\tif ($this->sqlResource)\n\t\t{\n\t\t\treturn mysql_fetch_assoc($this->sqlResource);\n\t\t}\n\t\telse\n\t\t\treturn FALSE;\n\t}", "public function fetch($fetchMode = \\PDO::FETCH_BOTH);", "public function fetchObject()\n {\n return sasql_fetch_object($this->result);\n }", "public function fetch()\n {\n return $this->statement->fetch();\n }", "public function fetch()\n\t{\n\t\t//$this -> error();\n\t\t$dbName = $this -> databaseName;\n\t\treturn $dbName() -> fetch();\n\t}", "function fetch()\n {\n return mysqli_fetch_assoc($this->dboutcomes);\n }", "abstract protected function doFetchAll();", "public function fetch($id);", "public function fetch($id);", "function FetchNextObj() {}", "public function fetch() {\n\t\t$this->checkResultSet();\n\t\treturn $this->fetchRowAssoc();\n\t}", "public function fetch_object()\n\t{\n\t\t$object = null;\n\t\tif (current($this->result)) {\n\t\t\tforeach (current($this->result) AS $key => $value) {\n\t\t\t\t$object->$key = $value;\n\t\t\t}\n\t\t}else {\n\t\t\t$object = FALSE;\n\t\t}\n\t\tnext($this->result);\n\t\treturn $object;\n\t}", "public function fetch()\n {\n return mysqli_fetch_assoc($this->lastResults);\n }", "public abstract function fetch($result_set, $class_name = null);", "public function fetch($queryResult);", "public function fetchUpdates()\n\t{\n\t}", "public function fetch($x, $y);", "public function fetch()\n\t{\t\t\n\t\tob_start();\t\t\n\t\t$this->display();\n\t\t$content = ob_get_clean();\n\t\treturn $content;\n\t}", "public function fetch( $query_id=null );", "public function fetch() {\r\n\t\tif ($this->hasError()) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\treturn @mysql_fetch_assoc($this->result);\r\n\t}", "public function fetch() {\r\n $h = null;\r\n if (isset($this->handle)) {\r\n $h = $this->handle;\r\n }\r\n else {\r\n $h = $this->_open();\r\n flock($h, LOCK_SH); // shared lock for reading\r\n }\r\n fseek($h,0);\r\n $result = '';\r\n while (!feof($h)) {\r\n $result .= fread($h, 8192);\r\n }\r\n if (is_null($this->handle)) {\r\n flock($h, LOCK_UN);\r\n fclose($h);\r\n }\r\n return $result;\r\n }", "public function fetch($name, &$result);", "public function fetch(): ?IEntity;", "abstract protected function fetchData( $identifier );", "function fetch($res = null, $fmt = 'a')\n{\n\treturn $this->drv->fetch($res, $fmt);\n}", "protected function fetch_data(&$cache)\n {\n }", "function FetchObject() {\n\t\t\treturn pg_fetch_object($this->result);\n\t\t}", "public function fetch($id)\n {\n return parent::fetch($id);\n }", "public function fetchList();", "public function fetch($key);", "public function fetch($key);", "public function fetch($key);", "function bbfetch($r)\n{\n\tif (dbtype == 'mysql') return mysql_fetch_object($r);\n\tif (dbtype == 'pgsql') return pg_fetch_object( $r);\n\tif (dbtype == 'sqlite') return $r->fetch(PDO::FETCH_OBJ);\n}", "function _fetch_object()\n\t{\n\t\treturn mysqli_fetch_object($this->result_id);\n\t}", "function FetchRow() {}", "public function fetch()\n\t{\n\t\t$this->context = null;\n\t\t\n\t\tif (!$this->output) {\n\t\t\t$this->perform();\n\t\t}\n\t\t\n\t\treturn $this->getOutput();\n\t}", "private function cacheFetch() {\n //$data = cache_get($this->id, 'cache');;\n $data = NULL;\n if ($data) {\n foreach ($this->properties as $prop) {\n if (isset($data->data[$prop]) && !empty($data->data[$prop])) {\n $this->$prop = $data->data[$prop];\n }\n }\n }\n }", "public function fetch()\n {\n $this->execute();\n return $this->dbStmt->fetch(PDO::FETCH_ASSOC);\n }", "public function fetch($fetch_style = NULL, $cursor_orientation = false, $cursor_offset = false)\n {\n }", "function _fetch_object()\n\t{\n\t\treturn sqlsrv_fetch_object($this->result_id);\n\t}", "public function fetch($res, $as_object = true, $index = null)\n\t{\n\t\t\n\t}", "function fetch($result)\n\t{\n\t\treturn mysql_fetch_assoc($result);\n\t}", "public function fetch()\n\t{\n\t\treturn $this->data = $this->df->fetchAll();\n\t}", "public function fetch() {\r\n $this->resource_fetched=true;\r\n return new dbconnect_rowset($this, $this->result);\r\n }", "abstract public function FetchRow();", "public function fetch($url);", "public function fetch()\n\t{\n\t\treturn $this->values;\n\t}", "function & fetch() {\n // Call the PEAR::DB Result fetchRow() method\n if ( $row = & $this->result->fetchRow(DB_FETCHMODE_ASSOC) ) {\n return $row;\n } else {\n return false;\n }\n }", "function fetch()\r\n {\r\n ob_start();\r\n $this->display();\r\n return ob_get_clean();\r\n }", "abstract protected function fetchAssoc();", "public function fetch() {\r\n if (empty($this->id)) {\r\n throw new Exception(\"Cannot fetch download object - no download ID given\"); \r\n }\r\n \r\n $query = \"SELECT d.*, UNIX_TIMESTAMP(d.date) AS date_unix FROM download_items AS d WHERE d.id = ?\";\r\n \r\n $row = $this->db->fetchRow($query, $this->id);\r\n \r\n if (!is_array($row) || count($row) === 0) {\r\n throw new Exception(\"Requested download not found\");\r\n }\r\n \r\n // Populate the vars\r\n $this->name = $row['title']; \r\n $this->desc = $row['description']; \r\n $this->url_file = $row['url']; \r\n $this->filename = empty($row['filename']) ? basename($row['url']) : $row['filename']; \r\n $this->Date = new DateTime($row['date'], new DateTimeZone(\"Australia/Melbourne\"));\r\n $this->hits = $row['hits'];\r\n $this->filesize = isset($row['filesize']) && $row['filesize'] > 0 ? formatBytes($row['filesize']) : \"Unknown\";\r\n $this->user_id = $row['user_id'];\r\n $this->filepath = $row['filepath'];\r\n \r\n $this->object_id = $row['object_id'];\r\n $this->approved = $row['approved'];\r\n $this->active = $row['active'];\r\n $this->extra_data = $row['extra_data'];\r\n $this->mime = $row['mime'];\r\n \r\n if (empty($this->filepath) && !empty($this->url_file)) {\r\n $pathinfo = parse_url($this->url_file); \r\n $this->filepath = str_replace(\"/uploads/\", \"\", $pathinfo['path']);\r\n \r\n try {\r\n $this->commit(); \r\n } catch (Exception $e) {\r\n // Do nothing\r\n }\r\n }\r\n \r\n if (!preg_match(\"@^(http|https)://@\", $this->url_file)) {\r\n $this->url_file = parent::DOWNLOAD_HOST . parent::DOWNLOAD_DIR . $this->url_file; \r\n }\r\n \r\n if ($row['date'] == \"0000-00-00 00:00:00\") {\r\n $this->Date = new DateTime(\"now\", new DateTimeZone(\"Australia/Melbourne\")); \r\n $this->commit();\r\n }\r\n \r\n if (empty($this->user_id) && !empty($row['submitter'])) {\r\n $this->submitter = $row['submitter'];\r\n }\r\n \r\n /**\r\n * Load the category this download belongs to\r\n */\r\n \r\n $this->Category = new Category($row['category_id']); \r\n \r\n /**\r\n * Load the author\r\n */\r\n \r\n $this->Author = UserFactory::CreateUser($this->user_id);\r\n \r\n if (empty($this->mime) && file_exists(RP_DOWNLOAD_DIR . $this->filepath)) {\r\n $finfo = finfo_open(FILEINFO_MIME_TYPE); \r\n $this->mime = finfo_file($finfo, RP_DOWNLOAD_DIR . $this->filepath);\r\n $this->commit(); \r\n }\r\n \r\n $this->url = Utility\\DownloadUtility::buildUrls($this); \r\n \r\n }", "final public function fetch(): ProviderResult\n {\n $this->lastTimeFetched = date('H:i:s');\n $this->statistics['lastStatus'] = '...';\n\n $result = $this->getAvailableEntries();\n\n $this->statistics['success']++;\n $this->available = $result->count;\n $this->statistics['lastStatus'] = $result->status;\n\n return $result;\n }", "public function fetch ($fetch_method = PDO::FETCH_ASSOC) {\n return $this->query->fetch($fetch_method);\n }", "public function getFetchMode()\n\t{\n\t\treturn $this->fetchMode;\n\t}", "public abstract function fetchAssoc();", "public function fetchAll()\n {\n }", "function fetch($result) {\n\t\n\t$row = mysql_fetch_array($result);\n\t\n\treturn $row;\n}" ]
[ "0.8722348", "0.8722348", "0.8570398", "0.8570398", "0.8570398", "0.8570398", "0.8570398", "0.8570398", "0.8570398", "0.8570398", "0.8570398", "0.84123003", "0.7664436", "0.7566381", "0.7510386", "0.7510386", "0.74389964", "0.7435424", "0.7378753", "0.73154825", "0.7285948", "0.7285948", "0.72641146", "0.71946335", "0.7178118", "0.71635365", "0.7128235", "0.70965827", "0.70703954", "0.70447356", "0.6892998", "0.6868672", "0.68522644", "0.68263584", "0.67112035", "0.66988426", "0.66759956", "0.66277814", "0.66257286", "0.66211927", "0.65629417", "0.654624", "0.6534153", "0.65331185", "0.6525319", "0.64853066", "0.6476458", "0.64623344", "0.64393264", "0.64037955", "0.6401189", "0.6401189", "0.6398496", "0.63898754", "0.63803273", "0.63580334", "0.63481414", "0.63356847", "0.63113534", "0.630946", "0.6302535", "0.6292947", "0.62864053", "0.6271591", "0.62634057", "0.6261314", "0.6258252", "0.6246191", "0.62275696", "0.6214225", "0.62122333", "0.62033325", "0.62010396", "0.62010396", "0.62010396", "0.6198673", "0.61939985", "0.6189141", "0.61766243", "0.61661047", "0.6158512", "0.61397743", "0.61390954", "0.6124925", "0.61243457", "0.6070943", "0.6068802", "0.60616374", "0.60601044", "0.60410124", "0.6023945", "0.59976614", "0.5995552", "0.59646916", "0.5942724", "0.5937379", "0.5928494", "0.5927301", "0.59255934", "0.5917761" ]
0.679323
34
TODO: Implement rowCount() method.
public function rowCount(): int { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function rowCount() {}", "public function rowCount();", "public function rowCount();", "public function rowCount()\n {\n }", "public function getRowCount()\n {\n return $this->rowCount;\n }", "public function getRowCount();", "public function rowCount()\n {\n return $this->exec()->rowCount();\n }", "public abstract function row_count();", "public function get_row_count() {\n return 0;\n }", "public function rowCount () {\n return $this->query->rowCount();\n }", "public function rowCount() {\n $this->stmt->rowCount();\n }", "function RowCount() {}", "public static function rowCount(){\n $dbCon = self::getPdoCon();\n return $dbCon::rowCount;\n }", "public function getRowCount() {\n return $this->statement->rowCount();\n }", "public function getRowCount(): int\n {\n return $this->rowCount;\n }", "public function getRowCount() {\n return $this->rowCount;\n }", "public abstract function GetNumRows();", "public function rowCount()\n {\n return sasql_num_rows($this->result);\n }", "public function getRowCount() {\n return $this->Read->rowCount();\n }", "public function numberOfRows();", "abstract public function getNumRows();", "abstract public function getNumRows();", "public function getNumberOfRows();", "public function rowCount() {\n return $this->stmt->rowCount();\n }", "public function rowCount()\n {\n return oci_num_rows($this->sth);\n }", "public function getRowCount()\n {\n return $this->statement->rowCount();\n }", "public function getRowCount()\n {\n return $this->row_count;\n }", "public function getRowCount()\n {\n return $this->row_count;\n }", "public function getRowCount()\n {\n return $this->row_count;\n }", "public function numRows() {\n\t\treturn $this->sth->rowCount();\n\t}", "abstract public function AffectedRows();", "abstract public function getAffectedRows();", "public function testRowCount() {\n $result = $this->connection->query('SELECT [name] FROM {test}');\n try {\n $result->rowCount();\n $exception = FALSE;\n }\n catch (RowCountException $e) {\n $exception = TRUE;\n }\n $this->assertTrue($exception, 'Exception was thrown');\n }", "public function GetRowCount() : INT\r\n {\r\n return($this->preparedStatement->rowCount());\r\n }", "public function getNumRows();", "public function numOfRows();", "abstract public function affectedRows();", "abstract public function affectedRows();", "public function getNumRows(){\n return $this->numrows;\n }", "function get_row_count() {\n return $this->row_count;\n }", "public function rowCount()\r\n\t{\r\n\t\treturn $this->rowsAffected;\r\n\t}", "abstract public function NumRows();", "public function rowCount(): string {\n return $this->rowCount;\n }", "function numRows()\n\t{\n\t\treturn $this->_num_rows;\n\t}", "public function getRowCount() {\n\t\treturn $this->ROW_COUNT;\n\t}", "public function getRowCountAndClose(): int;", "public function fetchRow();", "public function rowCount() {\n return $this->stmt->rowCount();\n }", "public function affectedRows() : int;", "function numrows() {\r\n\t\treturn $this->numrows;\r\n\t}", "public function count()\n\t{\n\t\treturn $this->query->rowCount();\n\t}", "function sql_num_rows($res)\n {\n // DELETE, INSERT, UPDATE\n // do not use : SELECT\n return $res->rowCount();\n }", "public abstract function affectedRows();", "public function countRows($sql,$params)\n{\n $stmt = $this->dbh->prepare($sql);\n $stmt->execute($params);\n return $stmt->rowCount();\n}", "function size()\n\t{\n return $this->_iRows;\n\t}", "public function total_rows();", "function AffectedRows ();", "public function countRows()\n {\n return $this->_result !== null ? $this->_result->rowCount() : 0;\n }", "public function countAll(){\n \n $query = \"SELECT id FROM \" . $this->table_name . \"\";\n \n $stmt = $this->conn->prepare( $query );\n $stmt->execute();\n \n $num = $stmt->rowCount();\n \n return $num;\n}", "public function rows(){\n return $this->rowNum(\"SELECT * FROM Anuncios\");\n }", "public function countAll(){\r\n \r\n $query = \"SELECT id FROM \" . $this->table_name . \"\";\r\n \r\n $stmt = $this->conn->prepare( $query );\r\n $stmt->execute();\r\n \r\n $num = $stmt->rowCount();\r\n \r\n return $num;\r\n}", "public function rowCount(): int\n {\n if (!$this->wasExecuted()) {\n $this->exec();\n }\n\n return $this->getAdapter()->getStatement()->rowCount();\n }", "public function getAffectedRows();", "public function getAffectedRows();", "public function rowCount()\n {\n // mengembalikan rowCount()l milik PDO\n return $this->stmt->rowCount();\n }", "function num_rows() {\r\n\t\treturn $this->dbh->num_rows();\r\n\t}", "public function hasRowCount(){\n return $this->_has(7);\n }", "public function count()\n\t{\n\t\treturn (int) $this->getStatement()->rowCount();\n\t}", "public function getNumRows(){\n\t\treturn $this->instance->getNumRows();\n\t}", "public function countAll(){\n \n // query to select all user records\n $query = \"SELECT Mabh FROM \" . $this->table_name . \"\";\n \n // prepare query statement\n $stmt = $this->conn->prepare($query);\n \n // execute query\n $stmt->execute();\n \n // get number of rows\n $num = $stmt->rowCount();\n \n // return row count\n return $num;\n}", "function numRows()\n {\n $this->getRows();\n return $this->row_counter;\n }", "public function num_rows() {\n\t\treturn $this->GetNumRows();\n\t}", "public function affectedRows();", "public function affectedRows();", "public function affectedRows();", "public function affectedRows();", "public function getRows()\n {\n return 1;\n }", "public function countRows()\n {\n return count($this->rows);\n }", "public function rowCount() {\n\t\tif( !$this->_result ) return 0;\n\t\treturn mssql_num_rows($this->_result);\n\t}", "public function affectedRows(): int\n\t{\n\t\t//log_message('error', 'affectedRows');\n\t\treturn is_object($this->resultID) ? $this->resultID->rowCount() : 0;\n\t}", "function get_total_all_records($connect,$query)\n{\n $statement = $connect->prepare($query);\n $statement->execute();\n return $statement->rowCount();\n}", "public function affectedRows() {\r\n return $this->query->rowCount();\r\n }", "public function nbRows();", "public function count()\n {\n return $this->rows;\n }", "function rowCount ($sql, $params = false) {\n\t\t\t$this->init();\n\t\t\t$this->close = false;\n\t\t\treturn $this->query($sql, $params)->rowCount();\n\t\t}", "public function found_rows() {\n\t\t$this->FoundRows();\n\t}", "public function getNumRows()\n {\n \treturn $this->previouslyExecuted->num_rows;\n }", "abstract public function get_rows();", "public function count(): int\n {\n return $this->statement->rowCount();\n }", "public function getTheRows(){\n if($this->dboutcomes == false){\n return false;\n }\n //get the total number of rows affected\n return mysqli_num_rows($this->dboutcomes);\n }", "public function count() {\n return count($this->__rows__);\n }", "public function numRows() : int\n\t{\n\t\treturn $this->handle->numRows($this->result);\n\t}", "function getRows() { return $this->_rows; }", "public function getFoundRows();", "public function num_rows() {\n\t\t\treturn $this->count();\n\t\t}", "public function RowCount() {\n return $this->_row == '' ? $this->_rown : $this->_rown + 1;\n }", "function numRows()\n{\n\t$num = mysql_num_rows($this->res);\n\treturn $num;\n}", "public function affectedRows()\n {\n return $this->query->rowCount();\n }", "function NumRows() {}", "public function countAll(){\n \n $query = \"SELECT id FROM \" . $this->table_name . \"\";\n \n $stmt = $this->conn->prepare( $query );\n $stmt->execute();\n \n $num = $stmt->rowCount();\n \n return $num;\n }" ]
[ "0.8909583", "0.8780282", "0.8780282", "0.8598367", "0.7927319", "0.7839986", "0.7731738", "0.773095", "0.76068586", "0.75856614", "0.75518376", "0.7503742", "0.74809974", "0.7425162", "0.73811835", "0.736698", "0.7332763", "0.73013526", "0.7297756", "0.72881234", "0.7287593", "0.7287593", "0.72725296", "0.7253323", "0.72389096", "0.7231257", "0.72301924", "0.72301924", "0.72301924", "0.7206346", "0.7163566", "0.7159449", "0.713624", "0.71362156", "0.7129706", "0.7122131", "0.7105886", "0.7105886", "0.7104201", "0.7097245", "0.70958227", "0.7063656", "0.70490056", "0.7025205", "0.702287", "0.7005725", "0.7003384", "0.69951487", "0.69845366", "0.6976749", "0.6968297", "0.6958012", "0.6941791", "0.69361526", "0.6930371", "0.6928797", "0.69226724", "0.69210833", "0.6920004", "0.6918739", "0.69175506", "0.69111204", "0.6908453", "0.6908453", "0.6894032", "0.68890643", "0.68851024", "0.687149", "0.6859267", "0.68512", "0.68486863", "0.68466264", "0.6845248", "0.6845248", "0.6845248", "0.6845248", "0.6813897", "0.68118924", "0.68072987", "0.6792989", "0.67897993", "0.67884827", "0.6787293", "0.6784399", "0.6783653", "0.67821646", "0.6781914", "0.6781729", "0.6772535", "0.6768751", "0.675174", "0.6750969", "0.6750532", "0.6745618", "0.6740964", "0.67286044", "0.67280936", "0.67228884", "0.6718791", "0.67019165" ]
0.8368667
4
TODO: Implement getAffectedRowsCount() method.
public function getAffectedRowsCount(): int { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function getAffectedRows();", "public function getAffectedRows();", "public function getAffectedRows();", "public function getAffectedRows()\n\t{\n\t\treturn 0;\n\t}", "public function getAffectedRows() {\n\t\treturn $this->last_sth->rowCount();\n\t}", "public function affectedRows();", "public function affectedRows();", "public function affectedRows();", "public function affectedRows();", "abstract public function affectedRows();", "abstract public function affectedRows();", "public function getAffectedRows()\n {\n return $this->_result !== null\n ? $this->_result->rowCount(): 0;\n }", "public function getAffectedRows()\r\n\t{\r\n\t\treturn $this->db->getAffectedRows();\r\n\t}", "public function affectedRows(): int\n\t{\n\t\t//log_message('error', 'affectedRows');\n\t\treturn is_object($this->resultID) ? $this->resultID->rowCount() : 0;\n\t}", "function getNumAffectedRows() {\r\n\t\t\treturn($this->privateVars['affectedrows']);\r\n\t\t}", "public function getAffectedRows()\n {\n $this->connect();\n\n if ($this->prepared instanceof Statement) {\n return $this->prepared->rowCount();\n } else {\n return 0;\n }\n }", "public function getNumRowsAffected(){\n\t\treturn $this->instance->getNumRowsAffected();\n\t}", "public function affectedRows() : int\n\t{\n\t\treturn $this->handle->affectedRows();\n\t}", "public function getAffectedRows() {\r\n\t\treturn $this->PDOStatement->rowCount();\r\n\t}", "protected abstract function getRowsAffected(Result $result);", "public function affected_rows();", "public function getAffectedRows(){\n\t\treturn $this->connection->affected_rows;\n\t}", "public function getAffectedRows(){\n\t\treturn $this->lastAffectedRows;\n\t}", "public function affectedRows() : int;", "public function rowCount()\r\n\t{\r\n\t\treturn $this->rowsAffected;\r\n\t}", "public abstract function affectedRows();", "public function affectedRows() {\r\n return $this->query->rowCount();\r\n }", "public static function getAffectedRows()\n\t{\n\t\treturn self::getConnection()->getAffectedRows();\n\t}", "public function getAffectedRows(): int\n {\n return $this->pdoStatement->rowCount();\n }", "public function sql_affected_rows() {}", "public function sql_affected_rows() {}", "public function affected_rows()\n\t{\n\t\t// Return number of rows affected\n\t\treturn $this->statement->rowCount();\n\t}", "public function affectedRows()\n {\n return $this->query->rowCount();\n }", "public function getNumAffectedRows()\n {\n \treturn $this->connections[$this->activeConnection]->affected_rows;\n }", "public function affectedRows(): int {\n\t\treturn $this->stmt->rowCount();\n\t}", "function Affected_Rows()\n {\n $this->init();\n return ($this->db->Affected_Rows());\n }", "public static function affectedRows() {\n\treturn self::$instance->affectedRows();\n }", "function AffectedRows()\n\t{\n\t\treturn $this->__affectedRows;\n\t}", "function affectedRows();", "public static function affectedRows()\n\t{\n\t\treturn self::getConnection()->getAffectedRows();\n\t}", "public function getNumRowsAffected() {\n\t\treturn $this->rowsAffected;\n\t}", "public function affected_rows() {\n return $this->stmt->rowCount();\n }", "public function rowsAffected() {\n\t\tif (is_null($this->rowsAffected)) {\n\t\t\tthrow new Exception('Query did not affect rows');\n\t\t}\n\n\t\treturn $this->rowsAffected;\n\t}", "public function getAffectedRows()\n {\n return mysqli_affected_rows($this->conn);\n }", "public function rows_affected() {\n\t\tif ($this->q) {\n\t\t\treturn $this->q->numrows();\n\t\t}\n\n\t\treturn 0;\n\t}", "function fvls_db_AffectedRows(){\n\t\tglobal $FLVS_db_link;\n\n\t\treturn $FLVS_db_link->affected_rows;\n\t}", "function AffectedRows() {\n\t\t\t$result = pg_affected_rows($this->result);\n\t\t\treturn $result;\n\t\t}", "public function affectedRows()\r\n\t{\r\n\t\treturn (int) mysqli_affected_rows($this->link);\r\n\t}", "function sql_affected_rows($res)\n {\n return $res->rowCount();\n }", "public function affectedRows(){\n return (int) mysql_affected_rows($this->connection);\n }", "public function affectedRows(): int\n {\n //for some reason this need to be explicitly swapped, or will be optimized away\n $broken = $this->getConn()->affected_rows;\n return $broken;\n }", "function affected_rows();", "public static function get_affected_rows(){\r\n\t\treturn self::$affected_rows;\r\n\t}", "function get_affected_rows() {\n\t\t\treturn $this->affected_rows;\n\t\t}", "function affected_rows() {\n\t\t// return mssql_affected_rows($this->Query_ID);\n\t\t$rsRows = mssql_query(\"Select @@rowcount as rows\", $this->Link_ID);\n\t\tif ($rsRows) { \n\t\t return mssql_result($rsRows, 0, \"rows\");\n\t\t}\n\t}", "public function getAffectedItemsCount() {}", "function affectedRows()\n {\n return mysql_affected_rows();\n }", "function AffectedRows() {\n return @mysql_affected_rows();\n }", "function get_affected_rows(){\n\t\treturn $this->affected_rows;\n\t}", "public static function affectedRows()\n\t{\n\t\treturn mysqli_affected_rows(self::$link);\n\t}", "abstract public function AffectedRows();", "public function affectedRows()\n {\n return sasql_affected_rows($this->connection);\n }", "function my_affected_rows( ){ \r\n\t\tglobal $connection; \r\n\t\treturn $connection->affected_rows(); \r\n\t\t\r\n\t}", "function affected_rows() {\r\n\t\treturn $this->dbh->affected_rows();\r\n\t}", "function affected_rows()\n\t{\n\t\treturn $this->m_affected_rows;\n\t}", "function numAffected() {\n return mysql_affected_rows($this->db);\n }", "public function getAffectedRows()\n {\n trigger_error(__METHOD__ . \" is deprecated.\", E_USER_DEPRECATED);\n //return mysql_affected_rows($this->conn->getConnection());\n if (is_object($this->conn->currentResult)) {\n $count = $this->conn->currentResult->rowCount();\n } else {\n $count = $this->conn->currentResult;\n }\n return $count;\n }", "function Affected_Rows()\n\t{\n return sqlsrv_rows_affected($this->_queryID);\n\t}", "function affectedRows() \n \t{\n \t\treturn @mysql_affected_rows($this->linkId);\n \t}", "function affectedRows(){\n\t\treturn sqlite_changes($this->id);\n\t}", "function NumAffected($result=null)\n\t{\n\t\treturn oci_num_rows($result);\n\t}", "protected function affectedRows()\n {\n return $this->mysqli->affected_rows;\n }", "public function get_affected_rows() {\r\n\t\treturn mysql_affected_rows ();\r\n\t}", "public function getRowsAffected()\r\n\t{\r\n\t\treturn mssql_rows_affected($this->mssql);\r\n\t}", "function affectedRows(){\r\n return mysql_affected_rows();\r\n }", "public function GetLastAffectedCount()\r\n\t{\r\n\t\tif ($this->IsConnected())\r\n\t\t{\r\n\t\t\treturn $this->_db->affected_rows;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t}", "public function affected(){ \n\t\treturn $resultset = $this->showErrors ? mysqli_affected_rows($this->connection) : @mysqli_affected_rows($this->connection); \n\t}", "public function affected_rows(){\n return mysql_affected_rows($this->connection);\n }", "function pdo_affected_rows($stmt=NULL) {\r\n return pdo_stmt($stmt)->rowCount();\r\n }", "public function affected_rows()\n {\n return mysqli_affected_rows($this->connection);\n }", "public static function affectedRows()\n {\n return self::$connection ? mysqli_affected_rows(self::$connection) : false;\n }", "function affected_rows() {\n return mysql_affected_rows($this->db_conn);\n }", "function affected_rows() {\r\n\t\treturn mysql_affected_rows($this->link);\r\n\t}", "public function affected_rows()\n {\n return $this->mysqli->affected_rows;\n }", "public function getAffectedRows()\n\t{\n\t\tif(!$this->mysqli)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\treturn mysqli_affected_rows($this->mysqli);\n\t}", "function affected_rows($query)\n\t{\n\t\treturn $query->rowCount();\n\t}", "public function rowCount()\n {\n return $this->exec()->rowCount();\n }", "public function affected( )\n {\n if ( !underQL::$db_handle )\n return 0;\n\n return @ mysql_affected_rows( underQL::$db_handle );\n }", "public function sql_affected_rows()\n {\n return $this->link->affected_rows;\n }", "public function affected_rows() {\n\t\treturn mysqli_affected_rows($this->connection);\n\t}", "public function rowCount() {\n $this->stmt->rowCount();\n }", "function AffectedRows ();", "function affected_rows()\n\t{\n\t\treturn ($this->link) ? @mysqli_affected_rows($this->link) : false;\n\t}", "public function affected_rows()\n {\n if(is_resource($this->resource))\n {\n $result = pg_affected_rows($this->resource);\n\n if(!$result)\n {\n return false;\n }\n else\n {\n return $result;\n }\n }\n else\n {\n return false;\n }\n }", "public function rowCount() {}", "function affected_rows() {\r\n\t\tif ($this->database) {\r\n\t\t\treturn mysql_affected_rows($this->database);\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public function numRows() {\n\t\treturn $this->sth->rowCount();\n\t}", "public function rowCount() {\n return $this->stmt->rowCount();\n }", "private function resetRowsAffected() {\n $this->setRowsAffected(0);\n }", "function affected_rows($resultQuery=''){\n\t\tif(!$this->id_connection){\n\t\t\treturn false;\n\t\t}\n\t\tif(!$resultQuery){\n\t\t\t$resultQuery = $this->last_result_query;\n\t\t\tif(!$resultQuery){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\tif(($numberRows = pg_affected_rows($resultQuery))!==false){\n\t\t\treturn $numberRows;\n\t\t} else {\n\t\t\tthrow new DbException($this->error(), $this->no_error());\n\t\t\treturn false;\n\t\t}\n\t\treturn false;\n\t}" ]
[ "0.90783185", "0.88833", "0.88833", "0.85172284", "0.8286501", "0.8266638", "0.8266638", "0.8266638", "0.8266638", "0.8258826", "0.8258826", "0.82306176", "0.82055706", "0.81668186", "0.816464", "0.8154431", "0.81372356", "0.81257904", "0.8097121", "0.808465", "0.80766577", "0.804724", "0.80409503", "0.8038869", "0.8018834", "0.8000274", "0.7999548", "0.7997738", "0.7984654", "0.79615045", "0.79615045", "0.79116076", "0.7909032", "0.79058254", "0.7896927", "0.7891801", "0.7872628", "0.786161", "0.78544235", "0.7794597", "0.7775258", "0.77692765", "0.7723314", "0.76901174", "0.7681387", "0.76678574", "0.7658388", "0.76263106", "0.76189667", "0.76187557", "0.76056933", "0.7582611", "0.7582469", "0.7575108", "0.755548", "0.7543294", "0.75322264", "0.75147134", "0.7507323", "0.7501175", "0.7477706", "0.74705344", "0.74632186", "0.74191785", "0.7409707", "0.7402075", "0.7400215", "0.7393229", "0.7378273", "0.73643494", "0.73640877", "0.73341", "0.73316467", "0.73276526", "0.73183393", "0.7305779", "0.72943485", "0.7288818", "0.7270531", "0.7249803", "0.723671", "0.7203904", "0.7186517", "0.7163341", "0.7156335", "0.71443504", "0.7132898", "0.71298355", "0.7116976", "0.7113961", "0.70928967", "0.702872", "0.70239604", "0.69879967", "0.6987104", "0.6983756", "0.6973359", "0.69667107", "0.6965178", "0.6963131" ]
0.8565536
3
Run the database seeds.
public function run() { ProviderReportsController::generateReports(); // //monthly report // // $time = Carbon::now('Europe/London'); // $end = Carbon::parse($time)->endOfDay(); // $start = Carbon::parse(Carbon::parse($end)->subMonth()->addSecond()); // // $providers = Provider::get(); // for ($i = 0; $i < count($providers); $i++) { // // $report = new ProviderMonthlyReport(); // $r = new Report(); // $provider = Provider::where('user_id', $providers[$i]->user_id)->first(); // // $r->user_id = $provider->user_id; // $r->type = 'month'; // $report->provider_id = $provider->provider_id; // // $messages = Messages::where('provider_id', $provider->provider_id)->get(); // //$conversations =; // // if (Carbon::parse($provider->created_at) > $start) { // $report->start_date = Carbon::parse($provider->created_at); // $first = true; // $report->report_index = 0; // } else { // $report->start_date = $start; // if (ProviderMonthlyReport::where('provider_id', $provider->provider_id)->first()) { // $first = false; // } else { // //if all goes well, this should never be called // $report->start_date = Carbon::parse($provider->created_at); // $first = true; // $report->report_index = 0; // } // } // // $report->end_date = $end; // $conversation_ids = DB::table('conversations')->where('provider_id', $provider->provider_id)->select('conversation_id')->get(); // // if ($first) { // //first report of this type // $report->page_visits = $provider->visits;//checked // // //provider stats // // //message stats // $report->messages_unread = Messages::where('provider_id', $provider->provider_id)->where('read', 'no')->count(); // $report->new_conversations = Conversations::where('provider_id', $provider->provider_id)->count(); // //// // $offered_searches_ids = DB::table('offered_searches')->whereIn('conversation_id', $conversation_ids)->select('offered_search_id')->get(); // // //$report->searches_offered =; // } else { // $report->report_index = (ProviderMonthlyReport::where('provider_id', $provider->provider_id)->max('report_index') + 1); // $lastMonth = ProviderMonthlyReport::where('report_index', ($report->report_index - 1))->first(); // // $report->page_visits = ($provider->visits - $lastMonth->total_page_visits);//change to total // $report->messages_unread = Messages::where('provider_id', $provider->provider_id)->where('created_at', '>', Carbon::parse($lastMonth->end_date))->where('read', 'no')->count(); // $report->new_conversations = Conversations::where('provider_id', $provider->provider_id)->where('date_started', '>', Carbon::parse($lastMonth->end_date))->count(); // // // $offered_searches_ids = DB::table('offered_searches')->whereIn('conversation_id', $conversation_ids)->where('updated_at', '>', Carbon::parse($lastMonth->end_date))->select('offered_search_id')->get(); // // // } // //searches // $report->searches_offered = OfferedSearches::whereIn('offered_search_id', $offered_searches_ids)->where('status', 'pending')->count(); // $report->searches_accepted = OfferedSearches::whereIn('offered_search_id', $offered_searches_ids)->where('status', 'accepted')->count(); // $report->searches_completed = OfferedSearches::whereIn('offered_search_id', $offered_searches_ids)->where('status', 'completed')->count(); // //totals // // // $report->total_page_visits = $provider->visits; // $report->total_messages = Messages::where('provider_id', $provider->provider_id)->count(); // $report->total_messages_unread = Messages::where('provider_id', $provider->provider_id)->where('read', 'no')->count(); // $report->total_conversations = Conversations::where('provider_id', $provider->provider_id)->count(); // $report->total_searches_completed = OfferedSearches::whereIn('conversation_id', $conversation_ids)->count(); // // // $r->title = "My Ancestral Scotland Progress Report (" . Carbon::parse($report->start_date)->format('j M') . " - " . // Carbon::parse($report->end_date)->format('j M Y') . ")"; // $r->save(); // $report->report_id = $r->report_id; // $report->save(); // } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function run()\n {\n // $this->call(UserTableSeeder::class);\n // $this->call(PostTableSeeder::class);\n // $this->call(TagTableSeeder::class);\n // $this->call(PostTagTableSeeder::class);\n\n /*AB - use faker to populate table see file ModelFactory.php */\n factory(App\\Editeur::class, 40) ->create();\n factory(App\\Auteur::class, 40) ->create();\n factory(App\\Livre::class, 80) ->create();\n\n for ($i = 1; $i < 41; $i++) {\n $number = rand(2, 8);\n for ($j = 1; $j <= $number; $j++) {\n DB::table('auteur_livre')->insert([\n 'livre_id' => rand(1, 40),\n 'auteur_id' => $i\n ]);\n }\n }\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n // Let's truncate our existing records to start from scratch.\n Assignation::truncate();\n\n $faker = \\Faker\\Factory::create();\n \n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 40; $i++) {\n Assignation::create([\n 'ad_id' => $faker->numberBetween(1,20),\n 'buyer_id' => $faker->numberBetween(1,6),\n 'seller_id' => $faker->numberBetween(6,11),\n 'state' => NULL,\n ]);\n }\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n \t$faker = Faker::create();\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$post = new Post;\n \t\t$post->title = $faker->sentence();\n \t\t$post->body = $faker->paragraph();\n \t\t$post->category_id = rand(1, 5);\n \t\t$post->save();\n \t}\n\n \t$list = ['General', 'Technology', 'News', 'Internet', 'Mobile'];\n \tforeach($list as $name) {\n \t\t$category = new Category;\n \t\t$category->name = $name;\n \t\t$category->save();\n \t}\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$comment = new Comment;\n \t\t$comment->comment = $faker->paragraph();\n \t\t$comment->post_id = rand(1,20);\n \t\t$comment->save();\n \t}\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n $this->call(RoleTableSeeder::class);\n $this->call(UserTableSeeder::class);\n \n factory('App\\Cat', 5)->create();\n $tags = factory('App\\Tag', 8)->create();\n\n factory(Post::class, 15)->create()->each(function($post) use ($tags){\n $post->comments()->save(factory(Comment::class)->make());\n $post->tags()->attach( $tags->random(mt_rand(1,4))->pluck('id')->toArray() );\n });\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('post')->insert(\n [\n 'title' => 'Test Post1',\n 'desc' => str_random(100).\" post1\",\n 'alias' => 'test1',\n 'keywords' => 'test1',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post2',\n 'desc' => str_random(100).\" post2\",\n 'alias' => 'test2',\n 'keywords' => 'test2',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post3',\n 'desc' => str_random(100).\" post3\",\n 'alias' => 'test3',\n 'keywords' => 'test3',\n ]\n );\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n \t$faker = Factory::create();\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\tDepartment::create([\n \t\t\t'name' => $department\n \t\t]);\n \t}\n \tforeach ($this->collections as $key => $collection) {\n \t\tCollection::create([\n \t\t\t'name' => $collection\n \t\t]);\n \t}\n \t\n \t\n \tfor ($i=0; $i < 40; $i++) {\n \t\tUser::create([\n \t\t\t'name' \t=>\t$faker->name,\n \t\t\t'email' \t=>\t$faker->email,\n \t\t\t'password' \t=>\tbcrypt('123456'),\n \t\t]);\n \t} \n \t\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\t//echo ($key + 1) . PHP_EOL;\n \t\t\n \t\tfor ($i=0; $i < 10; $i++) { \n \t\t\techo $faker->name . PHP_EOL;\n\n \t\t\tArt::create([\n \t\t\t\t'name'\t\t\t=> $faker->sentence(2),\n \t\t\t\t'img'\t\t\t=> $this->filenames[$i],\n \t\t\t\t'medium'\t\t=> 'canvas',\n \t\t\t\t'department_id'\t=> $key + 1,\n \t\t\t\t'user_id'\t\t=> $this->userIndex,\n \t\t\t\t'dimension'\t\t=> '18.0 x 24.0',\n\t\t\t\t]);\n \t\t\t\t\n \t\t\t\t$this->userIndex ++;\n \t\t}\n \t}\n \t\n \tdd(\"END\");\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->dataCategory();\n factory(App\\Model\\Category::class, 70)->create();\n factory(App\\Model\\Producer::class, rand(5,10))->create();\n factory(App\\Model\\Provider::class, rand(5,10))->create();\n factory(App\\Model\\Product::class, 100)->create();\n factory(App\\Model\\Album::class, 300)->create();\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n\n factory('App\\User', 10 )->create();\n\n $users= \\App\\User::all();\n $users->each(function($user){ factory('App\\Category', 1)->create(['user_id'=>$user->id]); });\n $users->each(function($user){ factory('App\\Tag', 3)->create(['user_id'=>$user->id]); });\n\n\n $users->each(function($user){\n factory('App\\Post', 10)->create([\n 'user_id'=>$user->id,\n 'category_id'=>rand(1,20)\n ]\n );\n });\n\n $posts= \\App\\Post::all();\n $posts->each(function ($post){\n\n $post->tags()->attach(array_unique([rand(1,20),rand(1,20),rand(1,20)]));\n });\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $types = factory(\\App\\Models\\Type::class, 5)->create();\n\n $cities = factory(\\App\\Models\\City::class, 10)->create();\n\n $cities->each(function ($city) {\n $districts = factory(\\App\\Models\\District::class, rand(2, 5))->create([\n 'city_id' => $city->id,\n ]);\n\n $districts->each(function ($district) {\n $properties = factory(\\App\\Models\\Property::class, rand(2, 5))->create([\n 'type_id' => rand(1, 5),\n 'district_id' => $district->id\n ]);\n\n $properties->each(function ($property) {\n $galleries = factory(\\App\\Models\\Gallery::class, rand(3, 10))->create([\n 'property_id' => $property->id\n ]);\n });\n });\n });\n }", "public function run()\n {\n $this->call(UsersTableSeeder::class);\n\n $categories = factory(App\\Models\\Category::class, 10)->create();\n\n $categories->each(function ($category) {\n $category\n ->posts()\n ->saveMany(\n factory(App\\Models\\Post::class, 3)->make()\n );\n });\n }", "public function run()\n {\n $this->call(CategoriesTableSeeder::class);\n\n $users = factory(App\\User::class, 5)->create();\n $recipes = factory(App\\Recipe::class, 30)->create();\n $preparations = factory(App\\Preparation::class, 70)->create();\n $photos = factory(App\\Photo::class, 90)->create();\n $comments = factory(App\\Comment::class, 200)->create();\n $flavours = factory(App\\Flavour::class, 25)->create();\n $flavour_recipe = factory(App\\FlavourRecipe::class, 50)->create();\n $tags = factory(App\\Tag::class, 25)->create();\n $recipe_tag = factory(App\\RecipeTag::class, 50)->create();\n $ingredients = factory(App\\Ingredient::class, 25)->create();\n $ingredient_preparation = factory(App\\IngredientPreparation::class, 300)->create();\n \n \n \n DB::table('users')->insert(['name' => 'SimpleUtilisateur', 'email' => '[email protected]', 'password' => bcrypt('SimpleMotDePasse')]);\n \n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n // Sample::truncate();\n // TestItem::truncate();\n // UOM::truncate();\n Role::truncate();\n User::truncate();\n\n // factory(Role::class, 4)->create();\n Role::create([\n 'name'=> 'Director',\n 'description'=> 'Director type'\n ]);\n\n Role::create([\n 'name'=> 'Admin',\n 'description'=> 'Admin type'\n ]);\n Role::create([\n 'name'=> 'Employee',\n 'description'=> 'Employee type'\n ]);\n Role::create([\n 'name'=> 'Technician',\n 'description'=> 'Technician type'\n ]);\n \n factory(User::class, 20)->create()->each(\n function ($user){\n $roles = \\App\\Role::all()->random(mt_rand(1, 2))->pluck('id');\n $user->roles()->attach($roles);\n }\n );\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n UsersLevel::create([\n 'name' => 'Administrator'\n ]);\n\n UsersLevel::create([\n 'name' => 'User'\n ]);\n\n User::create([\n 'username' => 'admin',\n 'password' => bcrypt('admin123'),\n 'level_id' => 1,\n 'fullname' => \"Super Admin\",\n 'email'=> \"[email protected]\"\n ]);\n\n\n \\App\\CategoryPosts::create([\n 'name' =>'Paket Trip'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' =>'Destinasi Kuliner'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Event'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Profil'\n ]);\n }", "public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'avatar' => \"avatar\",\n 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi',\n ]);\n $this->call(CategorySeeder::class);\n // \\App\\Models\\Admin::factory(1)->create();\n \\App\\Models\\User::factory(10)->create();\n // \\App\\Models\\Category::factory(50)->create();\n \\App\\Models\\PetComment::factory(50)->create();\n $pets = \\App\\Models\\Pet::factory(50)->create();\n foreach ($pets as $pet) {\n \\App\\Models\\PetTag::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\PetPhotoUrl::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\Order::factory(1)->create(['pet_id' => $pet->id]);\n };\n }", "public function run()\n { \n\n $this->call(RoleSeeder::class);\n \n $this->call(UserSeeder::class);\n\n Storage::deleteDirectory('socials-icon');\n Storage::makeDirectory('socials-icon');\n $socials = Social::factory(7)->create();\n\n Storage::deleteDirectory('countries-flag');\n Storage::deleteDirectory('countries-firm');\n Storage::makeDirectory('countries-flag');\n Storage::makeDirectory('countries-firm');\n $countries = Country::factory(18)->create();\n\n // Se llenan datos de la tabla muchos a muchos - social_country\n foreach ($countries as $country) {\n foreach ($socials as $social) {\n\n $country->socials()->attach($social->id, [\n 'link' => 'https://www.facebook.com/ministeriopalabrayespiritu/'\n ]);\n }\n }\n\n Person::factory(50)->create();\n\n Category::factory(7)->create();\n\n Video::factory(25)->create(); \n\n $this->call(PostSeeder::class);\n\n Storage::deleteDirectory('documents');\n Storage::makeDirectory('documents');\n Document::factory(25)->create();\n\n }", "public function run()\n {\n $faker = Faker::create('id_ID');\n /**\n * Generate fake author data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('author')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Generate fake publisher data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('publisher')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Seeding payment method\n */\n DB::table('payment')->insert([\n ['name' => 'Mandiri'],\n ['name' => 'BCA'],\n ['name' => 'BRI'],\n ['name' => 'BNI'],\n ['name' => 'Pos Indonesia'],\n ['name' => 'BTN'],\n ['name' => 'Indomaret'],\n ['name' => 'Alfamart'],\n ['name' => 'OVO'],\n ['name' => 'Cash On Delivery']\n ]);\n }", "public function run()\n {\n DatabaseSeeder::seedLearningStylesProbs();\n DatabaseSeeder::seedCampusProbs();\n DatabaseSeeder::seedGenderProbs();\n DatabaseSeeder::seedTypeStudentProbs();\n DatabaseSeeder::seedTypeProfessorProbs();\n DatabaseSeeder::seedNetworkProbs();\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n // MyList::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 3; $i++) {\n MyList::create([\n 'title' => 'List-'.($i+1),\n 'color' => $faker->sentence,\n 'icon' => $faker->randomDigitNotNull,\n 'index' => $faker->randomDigitNotNull,\n 'user_id' => 1,\n ]);\n }\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Products::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few products in our database:\n for ($i = 0; $i < 50; $i++) {\n Products::create([\n 'name' => $faker->word,\n 'sku' => $faker->randomNumber(7, false),\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n User::create([\n 'name' => 'Pablo Rosales',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'status' => 1,\n 'role_id' => 1,\n 'movil' => 0\n ]);\n\n User::create([\n 'name' => 'Usuario Movil',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'status' => 1,\n 'role_id' => 3,\n 'movil' => 1\n ]);\n\n Roles::create([\n 'name' => 'Administrador'\n ]);\n Roles::create([\n 'name' => 'Operaciones'\n ]);\n Roles::create([\n 'name' => 'Comercial'\n ]);\n Roles::create([\n 'name' => 'Aseguramiento'\n ]);\n Roles::create([\n 'name' => 'Facturación'\n ]);\n Roles::create([\n 'name' => 'Creditos y Cobros'\n ]);\n\n factory(App\\Customers::class, 100)->create();\n }", "public function run()\n {\n // php artisan db:seed --class=StoreTableSeeder\n\n foreach(range(1,20) as $i){\n $faker = Faker::create();\n Store::create([\n 'name' => $faker->name,\n 'desc' => $faker->text,\n 'tags' => $faker->word,\n 'address' => $faker->address,\n 'longitude' => $faker->longitude($min = -180, $max = 180),\n 'latitude' => $faker->latitude($min = -90, $max = 90),\n 'created_by' => '1'\n ]);\n }\n\n }", "public function run()\n {\n DB::table('users')->insert([\n 'name'=>\"test\",\n 'password' => Hash::make('123'),\n 'email'=>'[email protected]'\n ]);\n DB::table('tags')->insert(['name'=>'tags']);\n $this->call(UserSeed::class);\n $this->call(CategoriesSeed::class);\n $this->call(TopicsSeed::class);\n $this->call(CommentariesSeed::class);\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n echo 'seeding permission...', PHP_EOL;\n $permissions = [\n 'role-list',\n 'role-create',\n 'role-edit',\n 'role-delete',\n 'formation-list',\n 'formation-create',\n 'formation-edit',\n 'formation-delete',\n 'user-list',\n 'user-create',\n 'user-edit',\n 'user-delete'\n ];\n foreach ($permissions as $permission) {\n Permission::create(['name' => $permission]);\n }\n echo 'seeding users...', PHP_EOL;\n\n $user= User::create(\n [\n 'name' => 'Mr. admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'remember_token' => null,\n ]\n );\n echo 'Create Roles...', PHP_EOL;\n Role::create(['name' => 'former']);\n Role::create(['name' => 'learner']);\n Role::create(['name' => 'admin']);\n Role::create(['name' => 'manager']);\n Role::create(['name' => 'user']);\n\n echo 'seeding Role User...', PHP_EOL;\n $user->assignRole('admin');\n $role = $user->assignRole('admin');\n $role->givepermissionTo(Permission::all());\n\n \\DB::table('languages')->insert(['name' => 'English', 'code' => 'en']);\n \\DB::table('languages')->insert(['name' => 'Français', 'code' => 'fr']);\n }", "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(PermissionsSeeder::class);\n $this->call(RolesSeeder::class);\n $this->call(ThemeSeeder::class);\n\n //\n\n DB::table('paypal_info')->insert([\n 'client_id' => '',\n 'client_secret' => '',\n 'currency' => '',\n ]);\n DB::table('contact_us')->insert([\n 'content' => '',\n ]);\n DB::table('setting')->insert([\n 'site_name' => ' ',\n ]);\n DB::table('terms_and_conditions')->insert(['terms_and_condition' => 'text']);\n }", "public function run()\n {\n $this->call([\n UserSeeder::class,\n ]);\n\n User::factory(20)->create();\n Author::factory(20)->create();\n Book::factory(60)->create();\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UserSeeder::class);\n $this->call(RolePermissionSeeder::class);\n $this->call(AppmodeSeeder::class);\n\n // \\App\\Models\\Appmode::factory(3)->create();\n \\App\\Models\\Doctor::factory(100)->create();\n \\App\\Models\\Unit::factory(50)->create();\n \\App\\Models\\Broker::factory(100)->create();\n \\App\\Models\\Patient::factory(100)->create();\n \\App\\Models\\Expence::factory(100)->create();\n \\App\\Models\\Testcategory::factory(100)->create();\n \\App\\Models\\Test::factory(50)->create();\n \\App\\Models\\Parameter::factory(50)->create();\n \\App\\Models\\Sale::factory(50)->create();\n \\App\\Models\\SaleItem::factory(100)->create();\n \\App\\Models\\Goption::factory(1)->create();\n \\App\\Models\\Pararesult::factory(50)->create();\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // DB::table('roles')->insert(\n // [\n // ['name' => 'admin', 'description' => 'Administrator'],\n // ['name' => 'student', 'description' => 'Student'],\n // ['name' => 'lab_tech', 'description' => 'Lab Tech'],\n // ['name' => 'it_staff', 'description' => 'IT Staff Member'],\n // ['name' => 'it_manager', 'description' => 'IT Manager'],\n // ['name' => 'lab_manager', 'description' => 'Lab Manager'],\n // ]\n // );\n\n // DB::table('users')->insert(\n // [\n // 'username' => 'admin', \n // 'password' => Hash::make('password'), \n // 'active' => 1,\n // 'name' => 'Administrator',\n // 'email' => '[email protected]',\n // 'role_id' => \\App\\Role::where('name', 'admin')->first()->id\n // ]\n // );\n\n DB::table('status')->insert([\n // ['name' => 'Active'],\n // ['name' => 'Cancel'],\n // ['name' => 'Disable'],\n // ['name' => 'Open'],\n // ['name' => 'Closed'],\n // ['name' => 'Resolved'],\n ['name' => 'Used'],\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create([\n 'name' => 'Qwerty',\n 'email' => '[email protected]',\n 'password' => bcrypt('secretpassw'),\n ]);\n\n factory(User::class, 59)->create([\n 'password' => bcrypt('secretpassw'),\n ]);\n\n for ($i = 1; $i < 11; $i++) {\n factory(Category::class)->create([\n 'name' => 'Category ' . $i,\n ]);\n }\n\n for ($i = 1; $i < 101; $i++) {\n factory(Product::class)->create([\n 'name' => 'Product ' . $i,\n ]);\n }\n }", "public function run()\n {\n\n \t// Making main admin role\n \tDB::table('roles')->insert([\n 'name' => 'Admin',\n ]);\n\n // Making main category\n \tDB::table('categories')->insert([\n 'name' => 'Other',\n ]);\n\n \t// Making main admin account for testing\n \tDB::table('users')->insert([\n 'name' \t\t=> 'Admin',\n 'email' \t=> '[email protected]',\n 'password' => bcrypt('12345'),\n 'role_id' => 1,\n 'created_at' => date('Y-m-d H:i:s' ,time()),\n 'updated_at' => date('Y-m-d H:i:s' ,time())\n ]);\n\n \t// Making random users and posts\n factory(App\\User::class, 10)->create();\n factory(App\\Post::class, 35)->create();\n }", "public function run()\n {\n $faker = Faker::create();\n\n \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Chef',\n 'salario' => '15000.00'\n ));\n\n\t\t \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Mesonero',\n 'salario' => '12000.00'\n ));\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = \\Faker\\Factory::create();\n\n foreach (range(1,5) as $index) {\n Lista::create([\n 'name' => $faker->sentence(2),\n 'description' => $faker->sentence(10), \n ]);\n } \n\n foreach (range(1,20) as $index) {\n $n = $faker->sentence(2);\n \tTarea::create([\n \t\t'name' => $n,\n \t\t'description' => $faker->sentence(10),\n 'lista_id' => $faker->numberBetween(1,5),\n 'slug' => Str::slug($n),\n \t\t]);\n } \n }", "public function run()\n {\n $faker = Faker::create('lt_LT');\n\n DB::table('users')->insert([\n 'name' => 'user',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n DB::table('users')->insert([\n 'name' => 'user2',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n\n foreach (range(1,100) as $val)\n DB::table('authors')->insert([\n 'name' => $faker->firstName(),\n 'surname' => $faker->lastName(),\n \n ]);\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UsersTableSeeder::class);\n\n // DB::table('users')->insert([\n // 'name' => 'User1',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('password'),\n // ]);\n\n\n $faker = Faker::create();\n \n foreach (range(1,10) as $index){\n DB::table('companies')->insert([\n 'name' => $faker->company(),\n 'email' => $faker->email(10).'@gmail.com',\n 'logo' => $faker->image($dir = '/tmp', $width = 640, $height = 480),\n 'webiste' => $faker->domainName(),\n \n ]);\n }\n \n \n foreach (range(1,10) as $index){\n DB::table('employees')->insert([\n 'first_name' => $faker->firstName(),\n 'last_name' => $faker->lastName(),\n 'company' => $faker->company(),\n 'email' => $faker->str_random(10).'@gmail.com',\n 'phone' => $faker->e164PhoneNumber(),\n \n ]);\n }\n\n\n\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Flight::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 100; $i++) {\n\n\n Flight::create([\n 'flightNumber' => $faker->randomNumber(5),\n 'depAirport' => $faker->city,\n 'destAirport' => $faker->city,\n 'reservedWeight' => $faker->numberBetween(1000 - 10000),\n 'deptTime' => $faker->dateTime('now'),\n 'arrivalTime' => $faker->dateTime('now'),\n 'reservedVolume' => $faker->numberBetween(1000 - 10000),\n 'airlineName' => $faker->colorName,\n ]);\n }\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->truncteTables([\n 'users',\n 'products'\n ]);\n\n $this->call(UsersSeeder::class);\n $this->call(ProductsSeeder::class);\n\n }", "public function run()\n {\n /**\n * Dummy seeds\n */\n DB::table('metas')->truncate();\n $faker = Faker::create();\n\n for ($i=0; $i < 10; $i++) { \n DB::table('metas')->insert([\n 'id_rel' => $faker->randomNumber(),\n 'titulo' => $faker->sentence,\n 'descricao' => $faker->paragraph,\n 'justificativa' => $faker->paragraph,\n 'valor_inicial' => $faker->numberBetween(0,100),\n 'valor_atual' => $faker->numberBetween(0,100),\n 'valor_final' => $faker->numberBetween(0,10),\n 'regras' => json_encode([$i => [\"values\" => $faker->words(3)]]),\n 'types' => json_encode([$i => [\"values\" => $faker->words(2)]]),\n 'categorias' => json_encode([$i => [\"values\" => $faker->words(4)]]),\n 'tags' => json_encode([$i => [\"values\" => $faker->words(5)]]),\n 'active' => true,\n ]);\n }\n\n\n }", "public function run()\n {\n // $this->call(UserTableSeeder::class);\n\n $faker = Faker::create();\n\n $lessonIds = Lesson::lists('id')->all(); // An array of ID's in that table [1, 2, 3, 4, 5, 7]\n $tagIds = Tag::lists('id')->all();\n\n foreach(range(1, 30) as $index)\n {\n // a real lesson id\n // a real tag id\n DB::table('lesson_tag')->insert([\n 'lesson_id' => $faker->randomElement($lessonIds),\n 'tag_id' => $faker->randomElement($tagIds),\n ]);\n }\n }", "public function run()\n {\n $this->call(CategoriasTableSeeder::class);\n $this->call(UfsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(UserTiposTableSeeder::class);\n factory(App\\User::class, 2)->create();\n/* factory(App\\Models\\Categoria::class, 20)->create();*/\n/* factory(App\\Models\\Anuncio::class, 50)->create();*/\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n Language::truncate();\n Reason::truncate();\n Report::truncate();\n Category::truncate();\n Position::truncate();\n\n $languageQuantity = 10;\n $reasonQuantity = 10;\n $reportQuantity = 10;\n $categoryQuantity = 10;\n $positionQuantity = 10;\n\n factory(Language::class,$languageQuantity)->create();\n factory(Reason::class,$reasonQuantity)->create();\n \n factory(Report::class,$reportQuantity)->create();\n \n factory(Category::class,$categoryQuantity)->create();\n \n factory(Position::class,$positionQuantity)->create();\n\n }", "public function run()\n {\n // \\DB::statement('SET_FOREIGN_KEY_CHECKS=0');\n \\DB::table('users')->truncate();\n \\DB::table('posts')->truncate();\n // \\DB::table('category')->truncate();\n \\DB::table('photos')->truncate();\n \\DB::table('comments')->truncate();\n \\DB::table('comment_replies')->truncate();\n\n \\App\\Models\\User::factory()->times(10)->hasPosts(1)->create();\n \\App\\Models\\Role::factory()->times(10)->create();\n \\App\\Models\\Category::factory()->times(10)->create();\n \\App\\Models\\Comment::factory()->times(10)->hasReplies(1)->create();\n \\App\\Models\\Photo::factory()->times(10)->create();\n\n \n // \\App\\Models\\User::factory(10)->create([\n // 'role_id'=>2,\n // 'is_active'=>1\n // ]);\n\n // factory(App\\Models\\Post::class, 10)->create();\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n $this->call([\n ArticleSeeder::class, \n TagSeeder::class,\n Arttagrel::class\n ]);\n // \\App\\Models\\User::factory(10)->create();\n \\App\\Models\\Article::factory()->count(7)->create();\n \\App\\Models\\Tag::factory()->count(15)->create(); \n \\App\\Models\\Arttagrel::factory()->count(15)->create(); \n }", "public function run()\n {\n $this->call(ArticulosTableSeeder::class);\n /*DB::table('articulos')->insert([\n 'titulo' => str_random(50),\n 'cuerpo' => str_random(200),\n ]);*/\n }", "public function run()\n {\n $this->call(CategoryTableSeeder::class);\n $this->call(ProductTableSeeder::class);\n\n \t\t\n\t\t\tDB::table('users')->insert([\n 'first_name' => 'Ignacio',\n 'last_name' => 'Garcia',\n 'email' => '[email protected]',\n 'password' => bcrypt('123456'),\n 'role' => '1',\n 'avatar' => 'CGnABxNYYn8N23RWlvTTP6C2nRjOLTf8IJcbLqRP.jpeg',\n ]);\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(RoleSeeder::class);\n $this->call(UserSeeder::class);\n\n Medicamento::factory(50)->create();\n Reporte::factory(5)->create();\n Cliente::factory(200)->create();\n Asigna_valor::factory(200)->create();\n Carga::factory(200)->create();\n }", "public function run()\n {\n $this->call([\n RoleSeeder::class,\n TicketSeeder::class\n ]);\n\n DB::table('departments')->insert([\n 'abbr' => 'IT',\n 'name' => 'Information Technologies',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'email_verified_at' => Carbon::now(),\n 'password' => Hash::make('admin'),\n 'department_id' => 1,\n 'avatar' => 'default.png',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('role_user')->insert([\n 'role_id' => 1,\n 'user_id' => 1\n ]);\n }", "public function run()\n {\n \\App\\Models\\Article::factory(20)->create();\n \\App\\Models\\Category::factory(5)->create();\n \\App\\Models\\Comment::factory(40)->create();\n\n \\App\\Models\\User::create([\n \"name\"=>\"Alice\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n \\App\\Models\\User::create([\n \"name\"=>\"Bob\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n }", "public function run()\n {\n /** \n * Note: You must add these lines to your .env file for this Seeder to work (replace the values, obviously):\n SEEDER_USER_FIRST_NAME = 'Firstname'\n SEEDER_USER_LAST_NAME = 'Lastname'\n\t\tSEEDER_USER_DISPLAY_NAME = 'Firstname Lastname'\n\t\tSEEDER_USER_EMAIL = [email protected]\n SEEDER_USER_PASSWORD = yourpassword\n */\n\t\tDB::table('users')->insert([\n 'user_first_name' => env('SEEDER_USER_FIRST_NAME'),\n 'user_last_name' => env('SEEDER_USER_LAST_NAME'),\n 'user_name' => env('SEEDER_USER_DISPLAY_NAME'),\n\t\t\t'user_email' => env('SEEDER_USER_EMAIL'),\n 'user_status' => 1,\n \t'password' => Hash::make((env('SEEDER_USER_PASSWORD'))),\n 'permission_fk' => 1,\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class,3)->create()->each(\n \tfunction($user)\n \t{\n \t\t$user->questions()\n \t\t->saveMany(\n \t\t\tfactory(App\\Question::class, rand(2,6))->make()\n \t\t)\n ->each(function ($q) {\n $q->answers()->saveMany(factory(App\\Answer::class, rand(1,5))->make());\n })\n \t}\n );\n }\n}", "public function run()\n {\n $faker = Faker::create();\n\n // $this->call(UsersTableSeeder::class);\n\n DB::table('posts')->insert([\n 'id'=>str_random(1),\n 'user_id'=> str_random(1),\n 'title' => $faker->name,\n 'body' => $faker->safeEmail,\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s'),\n ]);\n }", "public function run()\n\t{\n\t\tDB::table(self::TABLE_NAME)->delete();\n\n\t\tforeach (seed(self::TABLE_NAME) as $row)\n\t\t\t$records[] = [\n\t\t\t\t'id'\t\t\t\t=> $row->id,\n\t\t\t\t'created_at'\t\t=> $row->created_at ?? Carbon::now(),\n\t\t\t\t'updated_at'\t\t=> $row->updated_at ?? Carbon::now(),\n\n\t\t\t\t'sport_id'\t\t\t=> $row->sport_id,\n\t\t\t\t'gender_id'\t\t\t=> $row->gender_id,\n\t\t\t\t'tournamenttype_id'\t=> $row->tournamenttype_id ?? null,\n\n\t\t\t\t'name'\t\t\t\t=> $row->name,\n\t\t\t\t'external_id'\t\t=> $row->external_id ?? null,\n\t\t\t\t'is_top'\t\t\t=> $row->is_top ?? null,\n\t\t\t\t'logo'\t\t\t\t=> $row->logo ?? null,\n\t\t\t\t'position'\t\t\t=> $row->position ?? null,\n\t\t\t];\n\n\t\tinsert(self::TABLE_NAME, $records ?? []);\n\t}", "public function run()\n\t{\n\t\tDB::table('libros')->truncate();\n\n\t\t$faker = Faker\\Factory::create();\n\n\t\tfor ($i=0; $i < 10; $i++) { \n\t\t\tLibro::create([\n\n\t\t\t\t'titulo'\t\t=> $faker->text(40),\n\t\t\t\t'isbn'\t\t\t=> $faker->numberBetween(100,999),\n\t\t\t\t'precio'\t\t=> $faker->randomFloat(2,3,150),\n\t\t\t\t'publicado'\t\t=> $faker->numberBetween(0,1),\n\t\t\t\t'descripcion'\t=> $faker->text(400),\n\t\t\t\t'autor_id'\t\t=> $faker->numberBetween(1,3),\n\t\t\t\t'categoria_id'\t=> $faker->numberBetween(1,3)\n\n\t\t\t]);\n\t\t}\n\n\t\t// Uncomment the below to run the seeder\n\t\t// DB::table('libros')->insert($libros);\n\t}", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 10)->create()->each(function ($user) {\n // Seed the relation with 5 purchases\n // $videos = factory(App\\Video::class, 5)->make();\n // $user->videos()->saveMany($videos);\n // $user->videos()->each(function ($video){\n // \t$video->videometa()->save(factory(App\\VideoMeta::class)->make());\n // \t// :( \n // });\n factory(App\\User::class, 10)->create()->each(function ($user) {\n\t\t\t factory(App\\Video::class, 5)->create(['user_id' => $user->id])->each(function ($video) {\n\t\t\t \tfactory(App\\VideoMeta::class, 1)->create(['video_id' => $video->id]);\n\t\t\t // $video->videometa()->save(factory(App\\VideoMeta::class)->create(['video_id' => $video->id]));\n\t\t\t });\n\t\t\t});\n\n });\n }", "public function run()\n {\n // for($i=1;$i<11;$i++){\n // DB::table('post')->insert(\n // ['title' => 'Title'.$i,\n // 'post' => 'Post'.$i,\n // 'slug' => 'Slug'.$i]\n // );\n // }\n $faker = Faker\\Factory::create();\n \n for($i=1;$i<20;$i++){\n $dname = $faker->name;\n DB::table('post')->insert(\n ['title' => $dname,\n 'post' => $faker->text($maxNbChars = 200),\n 'slug' => str_slug($dname)]\n );\n }\n }", "public function run()\n {\n $this->call([\n CountryTableSeeder::class,\n ProvinceTableSeeder::class,\n TagTableSeeder::class\n ]);\n\n User::factory()->count(10)->create();\n Category::factory()->count(5)->create();\n Product::factory()->count(20)->create();\n Section::factory()->count(5)->create();\n Bundle::factory()->count(20)->create();\n\n $bundles = Bundle::all();\n // populate bundle-product table (morph many-to-many)\n Product::all()->each(function ($product) use ($bundles) {\n $product->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray(),\n ['default_quantity' => rand(1, 10)]\n );\n });\n // populate bundle-tags table (morph many-to-many)\n Tag::all()->each(function ($tag) use ($bundles) {\n $tag->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray()\n );\n });\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Contract::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Contract::create([\n 'serialnumbers' => $faker->numberBetween($min = 1000000, $max = 2000000),\n 'address' => $faker->address,\n 'landholder' => $faker->lastName,\n 'renter' => $faker->lastName,\n 'price' => $faker->numberBetween($min = 10000, $max = 50000),\n 'rent_start' => $faker->date($format = 'Y-m-d', $max = 'now'),\n 'rent_end' => $faker->date($format = 'Y-m-d', $max = 'now'),\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker=Faker\\Factory::create();\n\n for($i=0;$i<100;$i++){\n \tApp\\Blog::create([\n \t\t'title' => $faker->catchPhrase,\n 'description' => $faker->text,\n 'showns' =>true\n \t\t]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0'); // TO PREVENT CHECKS FOR foreien key in seeding\n\n User::truncate();\n Category::truncate();\n Product::truncate();\n Transaction::truncate();\n\n DB::table('category_product')->truncate();\n\n User::flushEventListeners();\n Category::flushEventListeners();\n Product::flushEventListeners();\n Transaction::flushEventListeners();\n\n $usersQuantities = 1000;\n $categoriesQuantities = 30;\n $productsQuantities = 1000;\n $transactionsQuantities = 1000;\n\n factory(User::class, $usersQuantities)->create();\n factory(Category::class, $categoriesQuantities)->create();\n\n factory(Product::class, $productsQuantities)->create()->each(\n function ($product) {\n $categories = Category::all()->random(mt_rand(1, 5))->pluck('id');\n $product->categories()->attach($categories);\n });\n\n factory(Transaction::class, $transactionsQuantities)->create();\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n $this->call(PermissionsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n\n $this->call(BusinessTableSeeder::class);\n $this->call(PrinterTableSeeder::class);\n factory(App\\Tag::class,10)->create();\n factory(App\\Category::class,10)->create();\n factory(App\\Subcategory::class,50)->create();\n factory(App\\Provider::class,10)->create();\n factory(App\\Product::class,24)->create()->each(function($product){\n\n $product->images()->saveMany(factory(App\\Image::class, 4)->make());\n\n });\n\n\n factory(App\\Client::class,10)->create();\n }", "public function run()\n {\n Article::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Article::create([\n 'name' => $faker->sentence,\n 'sku' => $faker->paragraph,\n 'price' => $faker->number,\n ]);\n }\n }", "public function run()\n {\n Storage::deleteDirectory('public/products');\n Storage::makeDirectory('public/products');\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n $this->call(ProductSeeder::class);\n Order::factory(4)->create();\n Order_Detail::factory(4)->create();\n Size::factory(100)->create();\n }", "public function run()\n {\n $this->call(RolSeeder::class);\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n Doctor::factory(25)->create();\n Patient::factory(50)->create();\n Status::factory(3)->create();\n Appointment::factory(100)->create();\n }", "public function run()\n\t{\n\t\t\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n\t\t$faker = \\Faker\\Factory::create();\n\n\t\tTodolist::truncate();\n\n\t\tforeach(range(1, 50) as $index)\n\t\t{\n\n\t\t\t$user = User::create([\n\t\t\t\t'name' => $faker->name,\n\t\t\t\t'email' => $faker->email,\n\t\t\t\t'password' => 'password',\n\t\t\t\t'confirmation_code' => mt_rand(0, 9),\n\t\t\t\t'confirmation' => rand(0,1) == 1\n\t\t\t]);\n\n\t\t\t$list = Todolist::create([\n\t\t\t\t'name' => $faker->sentence(2),\n\t\t\t\t'description' => $faker->sentence(4),\n\t\t\t]);\n\n\t\t\t// BUILD SOME TASKS FOR EACH LIST ITEM\n\t\t\tforeach(range(1, 10) as $index) \n\t\t\t{\n\t\t\t\t$task = new Task;\n\t\t\t\t$task->name = $faker->sentence(2);\n\t\t\t\t$task->description = $faker->sentence(4);\n\t\t\t\t$list->tasks()->save($task);\n\t\t\t}\n\n\t\t}\n\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 1'); \n\n\t}", "public function run()\n {\n Campus::truncate();\n Canteen::truncate();\n Dorm::truncate();\n\n $faker = Faker\\Factory::create();\n $schools = School::all();\n foreach ($schools as $school) {\n \tforeach (range(1, 2) as $index) {\n\t \t$campus = Campus::create([\n\t \t\t'school_id' => $school->id,\n\t \t\t'name' => $faker->word . '校区',\n\t \t\t]);\n\n \t$campus->canteens()->saveMany(factory(Canteen::class, mt_rand(2,3))->make());\n $campus->dorms()->saveMany(factory(Dorm::class, mt_rand(2,3))->make());\n\n }\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'seq_q'=>'1',\n 'seq_a'=>'admin'\n ]);\n\n // DB::table('bloods')->insert([\n // ['name' => 'A+'],\n // ['name' => 'A-'],\n // ['name' => 'B+'],\n // ['name' => 'B-'],\n // ['name' => 'AB+'],\n // ['name' => 'AB-'],\n // ['name' => 'O+'],\n // ['name' => 'O-'],\n // ]);\n\n \n }", "public function run()\n {\n // $this->call(UserTableSeeder::class);\n \\App\\User::create([\n 'name'=>'PAPE SAMBA NDOUR',\n 'email'=>'[email protected]',\n 'password'=>bcrypt('Admin1122'),\n ]);\n\n $faker = Faker::create();\n\n for ($i = 0; $i < 100 ; $i++)\n {\n $firstName = $faker->firstName;\n $lastName = $faker->lastName;\n $niveau = \\App\\Niveau::inRandomOrder()->first();\n \\App\\Etudiant::create([\n 'prenom'=>$firstName,\n 'nom'=>$lastName,\n 'niveau_id'=>$niveau->id\n ]);\n }\n\n\n }", "public function run()\n {\n //\n DB::table('foods')->delete();\n\n Foods::create(array(\n 'name' => 'Chicken Wing',\n 'author' => 'Bambang',\n 'overview' => 'a deep-fried chicken wing, not in spicy sauce'\n ));\n\n Foods::create(array(\n 'name' => 'Beef ribs',\n 'author' => 'Frank',\n 'overview' => 'Slow baked beef ribs rubbed in spices'\n ));\n\n Foods::create(array(\n 'name' => 'Ice cream',\n 'author' => 'Lou',\n 'overview' => ' A sweetened frozen food typically eaten as a snack or dessert.'\n ));\n\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n News::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 10; $i++) {\n News::create([\n 'title' => $faker->sentence,\n 'summary' => $faker->sentence,\n 'content' => $faker->paragraph,\n 'imagePath' => '/img/exclamation_mark.png'\n ]);\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 3)->create();\n factory(App\\Models\\Category::class, 3)\n ->create()\n ->each(function ($u) {\n $u->courses()->saveMany(factory(App\\Models\\Course::class,3)->make())->each(function ($c){\n $c->exams()->saveMany(factory(\\App\\Models\\Exam::class,3)->make())->each(function ($e){\n $e->questions()->saveMany(factory(\\App\\Models\\Question::class,4)->make())->each(function ($q){\n $q->answers()->saveMany(factory(\\App\\Models\\Answer::class,4)->make())->each(function ($a){\n $a->correctAnswer()->save(factory(\\App\\Models\\Correct_answer::class)->make());\n });\n });\n });\n });\n\n });\n\n }", "public function run()\n {\n \\DB::table('employees')->delete();\n\n $faker = \\Faker\\Factory::create('ja_JP');\n\n $role_id = ['1','2','3'];\n\n for ($i = 0; $i < 10; $i++) {\n \\App\\Models\\Employee::create([\n 'last_name' =>$faker->lastName() ,\n 'first_name' => $faker->firstName(),\n 'mail' => $faker->email(),\n 'password' => Hash::make( \"password.$i\"),\n 'birthday' => $faker->date($format='Y-m-d',$max='now'),\n 'role_id' => $faker->randomElement($role_id)\n ]);\n }\n }", "public function run()\n {\n\n DB::table('clients')->delete();\n DB::table('trips')->delete();\n error_log('empty tables done.');\n\n $random_cities = City::inRandomOrder()->select('ar_name')->limit(5)->get();\n $GLOBALS[\"random_cities\"] = $random_cities->pluck('ar_name')->toArray();\n\n $random_airlines = Airline::inRandomOrder()->select('code')->limit(5)->get();\n $GLOBALS[\"random_airlines\"] = $random_airlines->pluck('code')->toArray();\n\n factory(App\\Client::class, 5)->create();\n error_log('Client seed done.');\n\n\n factory(App\\Trip::class, 50)->create();\n error_log('Trip seed done.');\n\n\n factory(App\\Quicksearch::class, 10)->create();\n error_log('Quicksearch seed done.');\n }", "public function run()\n {\n // Admins\n User::factory()->create([\n 'name' => 'Zaiman Noris',\n 'username' => 'rognales',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n User::factory()->create([\n 'name' => 'Affiq Rashid',\n 'username' => 'affiqr',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n // Only seed test data in non-prod\n if (! app()->isProduction()) {\n Member::factory()->count(1000)->create();\n Staff::factory()->count(1000)->create();\n\n Participant::factory()\n ->addSpouse()\n ->addChildren()\n ->addInfant()\n ->addOthers()\n ->count(500)\n ->hasUploads(2)\n ->create();\n }\n }", "public function run()\n {\n $this->call([\n RoleSeeder::class,\n UserSeeder::class,\n ]);\n\n \\App\\Models\\Category::factory(4)->create();\n \\App\\Models\\View::factory(6)->create();\n \\App\\Models\\Room::factory(8)->create();\n \n $rooms = \\App\\Models\\Room::all();\n // \\App\\Models\\User::all()->each(function ($user) use ($rooms) { \n // $user->rooms()->attach(\n // $rooms->random(rand(1, \\App\\Models\\Room::max('id')))->pluck('id')->toArray()\n // ); \n // });\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n Employee::factory()->create(['email' => '[email protected]']);\n Brand::factory()->count(3)->create();\n $this->call([\n TagSeeder::class,\n AttributeSeeder::class,\n AttributeValueSeeder::class,\n ProductSeeder::class,\n ]);\n }", "public function run()\n {\n $this->call(RolesTableSeeder::class); // crée les rôles\n $this->call(PermissionsTableSeeder::class); // crée les permissions\n\n factory(Employee::class,3)->create();\n factory(Provider::class,1)->create();\n\n $user = User::create([\n 'name'=>'Alioune Bada Ndoye',\n 'email'=>'[email protected]',\n 'phone'=>'773012470',\n 'password'=>bcrypt('123'),\n ]);\n Employee::create([\n 'job'=>'Informaticien',\n 'user_id'=>User::where('email','[email protected]')->first()->id,\n 'point_id'=>Point::find(1)->id,\n ]);\n $user->assignRole('admin');\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(User::class, 1)\n \t->create(['email' => '[email protected]']);\n\n factory(Category::class, 5)->create();\n }", "public function run()\n {\n //$this->call(UsersTableSeeder::class);\n $this->call(rootSeed::class);\n factory(App\\Models\\Egresado::class,'hombre',15)->create();\n factory(App\\Models\\Egresado::class,'mujer',15)->create();\n factory(App\\Models\\Administrador::class,5)->create();\n factory(App\\Models\\Notificacion::class,'post',10)->create();\n factory(App\\Models\\Notificacion::class,'mensaje',5)->create();\n factory(App\\Models\\Egresado::class,'bajaM',5)->create();\n factory(App\\Models\\Egresado::class,'bajaF',5)->create();\n factory(App\\Models\\Egresado::class,'suscritam',5)->create();\n factory(App\\Models\\Egresado::class,'suscritaf',5)->create();\n }", "public function run()\n {\n \n User::factory(1)->create([\n 'rol'=>'EPS'\n ]);\n Person::factory(10)->create();\n $this->call(EPSSeeder::class);\n $this->call(OfficialSeeder::class);\n $this->call(VVCSeeder::class);\n $this->call(VaccineSeeder::class);\n }", "public function run()\n {\n // $faker=Faker::create();\n // foreach(range(1,100) as $index)\n // {\n // DB::table('products')->insert([\n // 'name' => $faker->name,\n // 'price' => rand(10,100000)/100\n // ]);\n // }\n }", "public function run()\n {\n $this->call([\n LanguagesTableSeeder::class,\n ListingAvailabilitiesTableSeeder::class,\n ListingTypesTableSeeder::class,\n RoomTypesTableSeeder::class,\n AmenitiesTableSeeder::class,\n UsersTableSeeder::class,\n UserLanguagesTableSeeder::class,\n ListingsTableSeeder::class,\n WishlistsTableSeeder::class,\n StaysTableSeeder::class,\n GuestsTableSeeder::class,\n TripsTableSeeder::class,\n ReviewsTableSeeder::class,\n RatingsTableSeeder::class,\n PopularDestinationsTableSeeder::class,\n ImagesTableSeeder::class,\n ]);\n\n // factory(App\\User::class, 5)->states('host')->create();\n // factory(App\\User::class, 10)->states('hostee')->create();\n\n // factory(App\\User::class, 10)->create();\n // factory(App\\Models\\Listing::class, 30)->create();\n }", "public function run()\n {\n Schema::disableForeignKeyConstraints();\n Grade::truncate();\n Schema::enableForeignKeyConstraints();\n\n $faker = \\Faker\\Factory::create();\n\n for ($i = 0; $i < 10; $i++) {\n Grade::create([\n 'letter' => $faker->randomElement(['а', 'б', 'в']),\n 'school_id' => $faker->unique()->numberBetween(1, School::count()),\n 'level' => 1\n ]);\n }\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(App\\User::class,5)->create();//5 User created\n factory(App\\Model\\Genre::class,5)->create();//5 genres\n factory(App\\Model\\Film::class,6)->create();//6 films\n factory(App\\Model\\Comment::class, 20)->create();// 20 comments\n }", "public function run()\n {\n\n $this->call(UserSeeder::class);\n factory(Empresa::class,10)->create();\n factory(Empleado::class,50)->create();\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n User::create([\n 'name' => 'jose luis',\n 'email' => '[email protected]',\n 'password' => bcrypt('xxxxxx'),\n 'role' => 'admin',\n ]);\n\n Category::create([\n 'name' => 'inpods',\n 'description' => 'auriculares inalambricos que funcionan con blouthue genial'\n ]);\n\n Category::create([\n 'name' => 'other',\n 'description' => 'otra cosa diferente a un inpods'\n ]);\n\n\n /* Create 10 products */\n Product::factory(10)->create();\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Russell'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Bitfumes'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Paul'\n ]);\n }", "public function run()\n {\n $user_ids = [1,2,3];\n $faker = app(\\Faker\\Generator::class);\n $posts = factory(\\App\\Post::class)->times(50)->make()->each(function($post) use ($user_ids,$faker){\n $post->user_id = $faker->randomElement($user_ids);\n });\n \\App\\Post::insert($posts->toArray());\n }", "public function run()\n {\n // Vaciar la tabla.\n Favorite::truncate();\n $faker = \\Faker\\Factory::create();\n // Crear artículos ficticios en la tabla\n\n // factory(App\\Models\\User::class, 2)->create()->each(function ($user) {\n // $user->users()->saveMany(factory(App\\Models\\User::class, 25)->make());\n //});\n }", "public function run()\n\t{\n\t\t$this->call(ProductsTableSeeder::class);\n\t\t$this->call(CategoriesTableSeeder::class);\n\t\t$this->call(BrandsTableSeeder::class);\n\t\t$this->call(ColorsTableSeeder::class);\n\n\t\t$products = \\App\\Product::all();\n \t$categories = \\App\\Category::all();\n \t$brands = \\App\\Brand::all();\n \t$colors = \\App\\Color::all();\n\n\t\tforeach ($products as $product) {\n\t\t\t$product->colors()->sync($colors->random(3));\n\n\t\t\t$product->category()->associate($categories->random(1)->first());\n\t\t\t$product->brand()->associate($brands->random(1)->first());\n\n\t\t\t$product->save();\n\t\t}\n\n\t\t// for ($i = 0; $i < count($products); $i++) {\n\t\t// \t$cat = $categories[rand(0,5)];\n\t\t// \t$bra = $brands[rand(0,7)];\n\t\t// \t$cat->products()->save($products[$i]);\n\t\t// \t$bra->products()->save($products[$i]);\n\t\t// }\n\n\t\t// $products = factory(App\\Product::class)->times(20)->create();\n\t\t// $categories = factory(App\\Category::class)->times(6)->create();\n\t\t// $brands = factory(App\\Brand::class)->times(8)->create();\n\t\t// $colors = factory(App\\Color::class)->times(15)->create();\n\t}", "public function run()\n {\n /*$this->call(UsersTableSeeder::class);\n $this->call(GroupsTableSeeder::class);\n $this->call(TopicsTableSeeder::class);\n $this->call(CommentsTableSeeder::class);*/\n DB::table('users')->insert([\n 'name' => 'pkw',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'type' => '1'\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = Faker::create();\n foreach (range(1,200) as $index) {\n DB::table('users')->insert([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'phone' => $faker->randomDigitNotNull,\n 'address'=> $faker->streetAddress,\n 'password' => bcrypt('secret'),\n ]);\n }\n }", "public function run()\n {\n $this->call(UsersSeeder::class);\n User::factory(2)->create();\n Company::factory(2)->create();\n\n }", "public function run()\n {\n echo PHP_EOL , 'seeding roles...';\n\n Role::create(\n [\n 'name' => 'Admin',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Principal',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Teacher',\n 'deletable' => false,\n ]\n );\n\n Role::create(\n [\n 'name' => 'Student',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Parents',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Accountant',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Librarian',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Receptionist',\n 'deletable' => false,\n ]\n );\n\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->call(QuestionTableSeed::class);\n\n $this->call([\n QuestionTableSeed::class,\n AlternativeTableSeed::class,\n ScheduleActionTableSeeder::class,\n UserTableSeeder::class,\n CompanyClassificationTableSeed::class,\n ]);\n // DB::table('clients')->insert([\n // 'name' => 'Empresa-02',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('07.052.477/0001-60'),\n // ]);\n }", "public function run()\n {\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 5; $i++) {\n Runner::create([\n 'external_id' => $faker->uuid,\n 'name' => $faker->name,\n 'race_id' =>rand(1,5),\n 'age' => rand(30, 45),\n 'sex' => $faker->randomElement(['male', 'female']),\n 'color' => $faker->randomElement(['#ecbcb4', '#d1a3a4']),\n ]);\n }\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n User::factory()->create([\n 'name' => 'Carlos',\n 'email' => '[email protected]',\n 'email_verified_at' => now(),\n 'password' => bcrypt('123456'), // password\n 'remember_token' => Str::random(10),\n ]);\n \n $this->call([PostsTableSeeder::class]);\n $this->call([TagTableSeeder::class]);\n\n }", "public function run()\n {\n $this->call(AlumnoSeeder::class);\n //Alumnos::factory()->count(30)->create();\n //DB::table('alumnos')->insert([\n // 'dni_al' => '13189079',\n // 'nom_al' => 'Jose',\n // 'ape_al' => 'Araujo',\n // 'rep_al' => 'Principal',\n // 'esp_al' => 'Tecnologia',\n // 'lnac_al' => 'Valencia'\n //]);\n }", "public function run()\n {\n Eloquent::unguard();\n\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\n // $this->call([\n // CountriesTableSeeder::class,\n // ]);\n\n factory(App\\User::class, 100)->create();\n factory(App\\Type::class, 10)->create();\n factory(App\\Item::class, 100)->create();\n factory(App\\Order::class, 1000)->create();\n\n $items = App\\Item::all();\n\n App\\Order::all()->each(function($order) use ($items) {\n\n $n = rand(1, 10);\n\n $order->items()->attach(\n $items->random($n)->pluck('id')->toArray()\n , ['quantity' => $n]);\n\n $order->total = $order->items->sum(function($item) {\n return $item->price * $item->pivot->quantity;\n });\n\n $order->save();\n\n });\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'izzanni',\n \n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'aina',\n\n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'sab',\n\n ]\n );\n }", "public function run()\n {\n\n factory('App\\Models\\Pessoa', 60)->create();\n factory('App\\Models\\Profissional', 10)->create();\n factory('App\\Models\\Paciente', 50)->create();\n $this->call(UsersTableSeeder::class);\n $this->call(ProcedimentoTableSeeder::class);\n // $this->call(PessoaTableSeeder::class);\n // $this->call(ProfissionalTableSeeder::class);\n // $this->call(PacienteTableSeeder::class);\n // $this->call(AgendaProfissionalTableSeeder::class);\n }", "public function run()\n {\n //Acá se define lo que el seeder va a hacer.\n //insert() para insertar datos.\n //Array asociativo. La llave es el nombre de la columna.\n// DB::table('users')->insert([\n// //Para un solo usuario.\n// 'name' => 'Pedrito Perez',\n// 'email' => '[email protected]',\n// 'password' => bcrypt('123456')\n// ]);//Se indica el nombre de la tabla.\n\n //Crea 50 usuarios (sin probar)\n// factory(App\\User::class, 50)->create()->each(function($u) {\n// $u->posts()->save(factory(App\\Post::class)->make());\n// });\n\n factory(App\\User::class, 10)->create(); //Así se ejecuta el model factory creado en ModelFactory.php\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //nhập liệu mẫu cho bảng users\n DB::table('users')->insert([\n \t['id'=>'1001', 'name'=>'Phan Thị Hiền', 'email'=>'[email protected]', 'password'=>'123456', 'isadmin'=>1],\n \t['id'=>'1002', 'name'=>'Phan Thị Hà', 'email'=>'[email protected]', 'password'=>'111111', 'isadmin'=>0]\n ]);\n\n\n //nhập liệu mẫu cho bảng suppliers\n DB::table('suppliers')->insert([\n \t['name'=>'FPT', 'address'=>'151 Hùng Vương, TP. Đà Nẵng', 'phonenum'=>'0971455395'],\n \t['name'=>'Điện Máy Xanh', 'address'=>'169 Phan Châu Trinh, TP. Đà Nẵng', 'phonenum'=>'0379456011']\n ]);\n\n\n //Bảng phiếu bảo hành\n }", "public function run()\n {\n \t// DB::table('categories')->truncate();\n // factory(App\\Models\\Category::class, 10)->create();\n Schema::disableForeignKeyConstraints();\n Category::truncate();\n $faker = Faker\\Factory::create();\n\n $categories = ['SAMSUNG','NOKIA','APPLE','BLACK BERRY'];\n foreach ($categories as $key => $value) {\n Category::create([\n 'name'=>$value,\n 'description'=> 'This is '.$value,\n 'markup'=> rand(10,100),\n 'category_id'=> null,\n 'UUID' => $faker->uuid,\n ]);\n }\n }" ]
[ "0.8013876", "0.79804534", "0.7976992", "0.79542726", "0.79511505", "0.7949612", "0.794459", "0.7942486", "0.7938189", "0.79368967", "0.79337025", "0.78924936", "0.78811055", "0.78790957", "0.78787595", "0.787547", "0.7871811", "0.78701615", "0.7851422", "0.7850352", "0.7841468", "0.7834583", "0.7827792", "0.7819104", "0.78088796", "0.7802872", "0.7802348", "0.78006834", "0.77989215", "0.7795819", "0.77903426", "0.77884805", "0.77862066", "0.7778816", "0.7777486", "0.7765202", "0.7762492", "0.77623445", "0.77621746", "0.7761383", "0.77606887", "0.77596676", "0.7757001", "0.7753607", "0.7749522", "0.7749292", "0.77466977", "0.7729947", "0.77289546", "0.772796", "0.77167094", "0.7714503", "0.77140456", "0.77132195", "0.771243", "0.77122366", "0.7711113", "0.77109736", "0.7710777", "0.7710086", "0.7705484", "0.770464", "0.7704354", "0.7704061", "0.77027386", "0.77020216", "0.77008796", "0.7698617", "0.76985973", "0.76973504", "0.7696405", "0.7694293", "0.7692694", "0.7691264", "0.7690576", "0.76882726", "0.7687433", "0.7686844", "0.7686498", "0.7685065", "0.7683827", "0.7679184", "0.7678287", "0.76776296", "0.76767945", "0.76726556", "0.76708084", "0.76690495", "0.766872", "0.76686716", "0.7666299", "0.76625943", "0.7662227", "0.76613766", "0.7659881", "0.7656644", "0.76539344", "0.76535016", "0.7652375", "0.7652313", "0.7652022" ]
0.0
-1
adds `force` option to ansiblegalaxy
public function force() { $this->option('--force'); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sync_jetpack_options() {\n\t\tif ( class_exists( 'Jetpack_Sync' ) && method_exists( 'Jetpack_Sync', 'sync_options' ) && defined( 'JETPACK__VERSION' ) && version_compare( JETPACK__VERSION, '4.1', '<' ) ) {\n\t\t\tJetpack_Sync::sync_options( __FILE__, $this->auto_register_option, $this->option_name );\n\t\t}\n\t}", "function force_ssl_admin($force = \\null)\n {\n }", "function gumlet_plugin_activate()\n{\n if (!get_option('gumlet_settings')) {\n update_option('gumlet_settings', [\"lazy_load\" => 1, \"original_images\" => 1, \"auto_compress\"=> 1, \"server_webp\"=> 0]);\n }\n}", "protected function configure()\n {\n $this\n ->setName('laravel')\n ->setDescription('Quickstart a new Laravel application')\n ->addArgument('name', InputArgument::REQUIRED)\n ->addOption('force', 'f', InputOption::VALUE_NONE, 'Forces install even if the directory already exists');\n }", "public function set_woocommerce_setup_jetpack_opted_in() {\n\t\tupdate_option( 'woocommerce_setup_jetpack_opted_in', true );\n\t}", "public function testForceDisabled()\n {\n $command = new TypeUpdateCommand();\n $app = new Application();\n $app->add($command);\n\n $commandToTest = $app->find('es:type:update');\n $commandTester = new CommandTester($commandToTest);\n $result = $commandTester->execute(\n [\n 'command' => $command->getName(),\n ]\n );\n\n $this->assertEquals(1, $result);\n }", "function astrizstudios_pro_block_options_uninstal()\r\n{\r\n\tif(!current_user_can('activate_plugins'))\t{ return; }\r\n\r\n\tcheck_admin_referer('bulk-plugins');\r\n\r\n\tif(!defined('WP_UNINSTALL_PLUGIN'))\t\t\t{ return; }\r\n\r\n\tif(__FILE__ != WP_UNINSTALL_PLUGIN)\t\t\t{ return; }\r\n\r\n\trequire_once('profanity-blocker-options.php');\r\n\t\r\n\tforeach($options as $option)\t\t\t\t{ delete_option($option); }\r\n\r\n\treturn 'DEACTIVATED!';\r\n}", "function post_sql_sync_extras_drush_help_alter(&$command) {\n if ($command['command'] == 'sql-sync') {\n $command['options']['rr'] = \"Rebuild the registry on the target site after the sync operation has completed.\";\n $command['options']['fra'] = \"Revert all features on the target site after the sync operation has completed.\";\n $command['options']['enable'] = \"Enable the specified modules in the target database after the sync operation has completed.\";\n $command['options']['disable'] = \"Disable the specified modules in the target database after the sync operation has completed.\";\n $command['options']['permission'] = \"Add or remove permissions from a role in the target database after the sync operation has completed. The value of this option must be an array, so it may only be specified in a site alias record or drush configuration file. See `drush topic docs-example-sync-extension`.\";\n }\n}", "function force() { \n if (is_array($this->force_this)) { \n for($i=0 ; $i< count($this->force_this) ; $i++) { \n if ($this->force_this[$i][1] == \"SIMPLE\" && !$this->passed($this->force_this[$i][0])) {\n die(\"\\n\\nMissing \" . $this->force_this[$i][0] . \"\\n\\n\"); \n }\n\n if ($this->force_this[$i][1] == \"FULL\" && !$this->full_passed($this->force_this[$i][0])) {\n die(\"\\n\\nMissing \" . $this->force_this[$i][0] .\" <arg>\\n\\n\"); \n } \n } \n } \n }", "function deactivate_sitewide_plugin($plugin = \\false)\n {\n }", "function make_compatible() {\n\t\t\tif ( $this->iscompat == true ) { \n\t\t\t\treturn;\n\t\t\t}\n\t\t\t$options = get_option($this->adminOptionsName);\t\t\t\n\t\t\tif ( !empty($options) ) {\n\t\t\t\tif ( !isset($options['db_plugin_version']) || $options['db_plugin_version'] != $this->version_of_plugin ) {\n\t\t\t\t\t$options = $this->getAdminOptions(); // does the compatibiliy\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->theSettings = $options;\n\t\t\t$this->iscompat = true;\n\t\t\treturn;\n\t\t}", "public function setup($force = false) {\n\t\tif(!$force && $this->description)\n\t\t\treturn;\n\n\t\t$this->changeDescription($this->fetchDescription());\n\t}", "public function siteSettingsRemoveAutoAssign(Event $event)\n {\n// $event->getTarget()->get('general')->get('o:assign_new_items')->setAttribute('disabled', 'disabled');\n $event->getTarget()->get('general')\n ->get('o:assign_new_items')\n ->setOption('info', 'The Teams Module manages how items become associated with sites, so this has been disabled.');\n\n }", "public function allow_auto_upgrade()\n\t{\n\t\treturn TRUE;\n\t}", "function unInstall() {\n\t\tif ($this->getOption('save_options') == 'yes')\t{\n\t\t\t//save options\n\t\t\tsql_query(\"CREATE TABLE IF NOT EXISTS \".sql_table('plug_ldapauth_save_options').\n\t\t\t\t\" (enable_ldapauth varchar(256) NOT NULL,\".\n\t\t\t\t\" host_1 varchar(256) NOT NULL,\".\n\t\t\t\t\" search_dn_1 varchar(256) NOT NULL,\".\n\t\t\t\t\" search_pwd_1 varchar(256) NOT NULL,\".\n\t\t\t\t\" base_dn_1 varchar(256) NOT NULL,\".\n\t\t\t\t\" user_objectclass_1 varchar(256) NOT NULL,\".\n\t\t\t\t\" custom_filter_1 text NOT NULL,\".\n\t\t\t\t\" ldap_proto_1 varchar(256) NOT NULL,\".\n\t\t\t\t\" username_attr_1 varchar(256),\".\n\t\t\t\t\" display_attr_1 varchar(256),\".\n\t\t\t\t\" realname_attr_1 varchar(256),\".\n\t\t\t\t\" email_attr_1 varchar(256),\".\n\t\t\t\t\" team_to_join varchar(256) NOT NULL,\".\n\t\t\t\t\" allow_admin varchar(256) NOT NULL\".\n\t\t\t\t\" ) TYPE=MyISAM;\");\n\n\t\t\tsql_query(\"INSERT INTO \".sql_table('plug_ldapauth_save_options')\n\t\t\t\t.\" (enable_ldapauth, host_1, search_dn_1, search_pwd_1, base_dn_1, \"\n\t\t\t\t.\"user_objectclass_1, custom_filter_1, ldap_proto_1, username_attr_1, \"\n\t\t\t\t.\"display_attr_1, realname_attr_1, email_attr_1, team_to_join, allow_admin)\"\n\t\t\t\t.\" VALUES ('\".addslashes($this->getOption('enable_ldapauth')).\"'\"\n\t\t\t\t\t\t\t .\", '\".addslashes($this->getOption('host_1')).\"'\"\n\t\t\t\t\t\t\t .\", '\".addslashes($this->getOption('search_dn_1')).\"'\"\n\t\t\t\t\t\t\t .\", '\".addslashes($this->getOption('search_pwd_1')).\"'\"\n\t\t\t\t\t\t\t .\", '\".addslashes($this->getOption('base_dn_1')).\"'\"\n\t\t\t\t\t\t\t .\", '\".addslashes($this->getOption('user_objectclass_1')).\"'\"\n\t\t\t\t\t\t\t .\", '\".addslashes($this->getOption('custom_filter_1')).\"'\"\n\t\t\t\t\t\t\t .\", '\".addslashes($this->getOption('ldap_proto_1')).\"'\"\n\t\t\t\t\t\t\t .\", '\".addslashes($this->getOption('username_attr_1')).\"'\"\n\t\t\t\t\t\t\t .\", '\".addslashes($this->getOption('display_attr_1')).\"'\"\n\t\t\t\t\t\t\t .\", '\".addslashes($this->getOption('realname_attr_1')).\"'\"\n\t\t\t\t\t\t\t .\", '\".addslashes($this->getOption('email_attr_1')).\"'\"\n\t\t\t\t\t\t\t .\", '\".addslashes($this->getOption('team_to_join')).\"'\"\n\t\t\t\t\t\t\t .\", '\".addslashes($this->getOption('allow_admin')).\"')\"\n\t\t\t\t );\n\t\t}\n\t}", "private function migrateAll($force = false)\n {\n $modules = $force ? $this->module->all() : $this->module->enabled();\n\n foreach ($modules as $module) {\n $this->migrate($module->name);\n }\n }", "protected function migrateFeatureManager() {\n\t\tif ( empty( $this->oldOptions['modules']['aiosp_feature_manager_options'] ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( empty( $this->oldOptions['modules']['aiosp_feature_manager_options']['aiosp_feature_manager_enable_opengraph'] ) ) {\n\t\t\taioseo()->options->social->facebook->general->enable = false;\n\t\t\taioseo()->options->social->twitter->general->enable = false;\n\t\t}\n\n\t\tif ( empty( $this->oldOptions['modules']['aiosp_feature_manager_options']['aiosp_feature_manager_enable_sitemap'] ) ) {\n\t\t\taioseo()->options->sitemap->general->enable = false;\n\t\t\taioseo()->options->sitemap->rss->enable = false;\n\t\t}\n\n\t\tif ( ! empty( $this->oldOptions['modules']['aiosp_feature_manager_options']['aiosp_feature_manager_enable_robots'] ) ) {\n\t\t\taioseo()->options->tools->robots->enable = true;\n\t\t}\n\t}", "function LoginRadius_restore_config($force=false) {\r\nif ( $force or !( get_option('LoginRadius_apikey')) ) {\r\n\t\tupdate_option('LoginRadius_apikey',false);\r\n\t}\r\n\t\r\nif ( $force or !( get_option('LoginRadius_secret')) ) {\r\n\t\tupdate_option('LoginRadius_secret',false);\r\n\t}\r\nif ( $force or !( get_option('dummyemail')) ) {\r\n\t\tupdate_option('dummyemail',false);\r\n\t}\t\r\nif ( $force or !( get_option('LoginRadius_redirect')) ) {\r\n\t\tupdate_option('LoginRadius_redirect',false);\r\n\t}\t\r\nif ( $force or !( get_option('title')) ) {\r\n\t\tupdate_option('title',false);\r\n\t}\r\n\t}", "protected function maybe_update_options() {\n $current_version = get_option( 'laterpay_version' );\n\n if ( version_compare( $current_version, '0.9.8.1', '>=' ) ) {\n delete_option( 'laterpay_plugin_is_activated' );\n }\n }", "function hook_uninstall() {\r\n\t\tupdate_options('foliamaptool', '');\r\n\t}", "private function upgrade_settings()\n {\n $currentModVars = $this->getVars();\n $defVars = $this->getDefaultVars();\n\n foreach ($defVars as $key => $defVar) {\n if (array_key_exists($key, $currentModVars)) {\n $type = gettype($defVar);\n switch ($type) {\n case 'boolean':\n if (in_array($currentModVars[$key], ['yes', 'no'])) {\n $var = 'yes' === $currentModVars[$key] ? true : false;\n } else {\n $var = ((bool) ($currentModVars[$key]));\n }\n\n break;\n default:\n $var = $defVar;\n\n break;\n }\n if ('defaultPoster' === $key) {\n $var = 2; // not bolean anymore assume admin id but maybe guest?\n }\n }\n $this->setVar($key, $var);\n }\n\n return true;\n }", "function change_framework_args($args){\n\t\n\t//$args['dev_mode'] = false;\n\t\n\treturn $args;\n\t\n}", "function apc_cache_shunt_all_options($false) {\n\tglobal $ydb; \n\t\n\t$key = APC_CACHE_ALL_OPTIONS; \n\tif(apc_exists($key)) {\n\t\t$ydb->option = apc_fetch($key);\n\t\t$ydb->installed = apc_fetch(APC_CACHE_YOURLS_INSTALLED);\n\t\treturn true;\n\t} \n\t\n\treturn false;\n}", "function change_framework_args($args){\r\n\t\r\n\t//$args['dev_mode'] = false;\r\n\t\r\n\treturn $args;\r\n\t\r\n}", "public function install() {\r\n\t\tadd_option(ShoppWholesale::OPTION_NAME, $this->defaults);\r\n\t}", "protected function configure()\n {\n $this->addOption(\n 'v|version', '-s',\n 'The version of the template that is to be installed; optional if '\n .'project is installed with PEAR'\n );\n }", "function add_option($option, $value = '', $deprecated = '', $autoload = 'yes')\n {\n }", "public function setForce($var)\n {\n GPBUtil::checkBool($var);\n $this->force = $var;\n\n return $this;\n }", "public function allow_auto_install()\n\t{\n\t\treturn TRUE;\n\t}", "public function disableAutoSetupFabric()\n {\n $this->autoSetupFabric = false;\n }", "function setupAutoUpdate() {\n try {\n DB::execute('INSERT INTO ' . TABLE_PREFIX . \"config_options (name, module, value) VALUES ('new_modules_available', 'system', 'b:0;')\");\n DB::execute(\"INSERT INTO \" . TABLE_PREFIX . \"config_options (name, module, value) VALUES ('update_archive_url', 'system', 'N;')\");\n DB::execute('INSERT INTO ' . TABLE_PREFIX . \"config_options (name, module, value) VALUES ('update_download_progress', 'system', 'i:0;')\");\n } catch(Exception $e) {\n return $e->getMessage();\n } // try\n\n return true;\n }", "public function testExecuteWithoutForce()\n {\n $commandTester = $this->createCommandTester(new DeleteCommand());\n $commandTester->execute([\n 'url' => 'my-queue-url'\n ]);\n\n $output = $commandTester->getDisplay();\n $this->assertContains('Option --force is mandatory to drop data', $output);\n }", "protected function configure()\n {\n $this->setName('key:drop')\n ->setDescription('Drops registered key')\n ->setHelp(\"<comment>\\nDrops registered key.\\n</comment>\")\n ->addOption('storage', null, InputOption::VALUE_REQUIRED, 'Specify the storage of the key to delete', 'file');\n }", "private function upgradeMismatchedTaskCount(): void\n {\n $new_options = [];\n $old_options = Option::getOptions();\n $legacy_tasks = $this->getLegacyOptions();\n foreach ($old_options as $option_key => $task) {\n $models = \\array_map(static function (UpgradeModel $model): string {\n return Option::getOptionKey($model);\n }, $this->models);\n if (!$models) {\n continue;\n }\n $key = \\array_search($option_key, $models, true);\n if ($key === false) {\n $legacy_tasks[$option_key] = $task;\n unset($old_options[$option_key]);\n continue;\n }\n $new_options[$option_key] = $task;\n }\n Option::updateOption($new_options);\n \\update_option(self::OPTION_NAME, $legacy_tasks, false);\n unset($new_options, $old_options, $legacy_tasks); // Memory cleanup\n \\wp_safe_redirect(\\remove_query_arg(self::NONCE_NAME));\n exit;\n }", "public function testOptionsNotFound()\n {\n $this->_task->execute();\n }", "function qoorate_install() {\n\tadd_option('qoorate_api_key', '');\n\tadd_option('qoorate_api_secret', '');\n\tadd_option('qoorate_api_shortname', '');\n}", "protected function specifyParameters()\n {\n $this->addOption('force-renew', null, InputOption::VALUE_NONE, '');\n }", "protected function appendOptions(): void\n {\n $this->signature .= '\n {--force : Force the worker to run even in maintenance mode}\n {--memory=128 : The memory limit in megabytes}\n {--sleep=0 : Number of seconds to sleep at each iteration in a loop}\n {--timeout=60 : The number of seconds a child process can run}\n ';\n }", "public function setForceDelivery($force) {\n $this->setParam('force', $force);\n return $this;\n }", "protected function getOptions()\n {\n return [\n ['force', null, InputOption::VALUE_NONE, 'Publish the files, even if already exists'],\n ];\n }", "function deactivate_sitewide_plugin( $plugin = false ) {\n\t_deprecated_function( __FUNCTION__, '3.0.0', 'deactivate_plugin()' );\n}", "protected function configure()\n {\n $this\n ->addDefaults()\n ->setName('maintenance')\n ->setDescription('Run maintenance on all Skylab projects')\n ->setHelp(<<<EOT\nThe <info>maintenance</info> command will run the maintenance commands of all skeletons on a project. Most notably, it\nwill create the apache config files and make sure the the databases are available.\n\n<info>php skylab.phar maintenance</info>\n\nEOT\n );\n }", "function jigoshop_upgrade_145() {\n\t\n\tJigoshop_Base::get_options()->delete_option( 'jigoshop_paypal_send_shipping' );\n\tdelete_option( 'jigoshop_paypal_send_shipping' );\n\tJigoshop_Base::get_options()->delete_option( 'jigoshop_display_totals_tax' );\n\tdelete_option( 'jigoshop_display_totals_tax' );\n\t\n}", "private function manage_plugins( $option = NULL ){\n\t\tif ( 'skip' === $option )\n\t\t\treturn;\n\n\t\t# default plugin set\n\t\t$std_plugin = array(\n\t\t\t'debug-bar',\n\t\t\t'debug-bar-console',\n\t\t\t'debug-bar-cron',\n\t\t\t'debug-bar-extender',\n\t\t\t'developer',\n\t\t\t'log-viewer',\n\t\t\t'monster-widget',\n\t\t\t'piglatin',\n\t\t\t'regenerate-thumbnails',\n\t\t\t'rewrite-rules-inspector',\n\t\t\t'rtl-tester',\n\t\t\t'simply-show-ids',\n\t\t\t'theme-check',\n\t\t\t'theme-test-drive',\n\t\t\t'user-switching',\n\t\t\t'wordpress-importer',\n\t\t\t'wordpress-beta-tester',\n\t\t);\n\n\t\t# wpcom VIP plugin set\n\t\t$vip_plugin = array(\n\t\t\t'grunion-contact-form',\n\t\t\t'jetpack',\n\t\t\t'mp6',\n\t\t\t'polldaddy',\n\t\t\t'vip-scanner',\n\t\t);\n\t\t\n\t\t# plugin developers bundle\n\t\t$dev_plugin = array(\n\t\t\t'log-deprecated-notices',\n\t\t);\n\t\t\n\t\t# debug plugin bundle (author's choice)\n\t\t# please file a pull request to include/exclude plugins\n\t\t$debug_plugin = array(\n\t\t\t'debug-bar-actions-and-filters-addon',\n\t\t\t'debug-bar-constants',\n\t\t\t'debug-my-plugin',\n\t\t\t'debug-objects',\n\t\t\t'uploadplus',\n\t\t);\n\n\t\tswitch ( $option ):\n\t\tcase 'vip':\n\t\t\t\t$plugin_list = array_merge( $std_plugin, $vip_plugin );\n\t\t\t\tbreak;\n\n\t\tcase 'devel':\n\t\t\t\t$plugin_list = array_merge( $std_plugin, $dev_plugin );\n\t\t\t\tbreak;\n\n\t\tcase 'debug':\n\t\t\t\t$plugin_list = array_merge( $std_plugin, $debug_plugin );\n\t\t\t\tbreak;\n\n\t\tcase 'all':\n\t\t\t\t$plugin_list = array_merge( $std_plugin, $vip_plugin, $dev_plugin, $debug_plugin );\n\n\t\tcase 'theme':\n\t\tdefault:\n\t\t\t\t$plugin_list = $std_plugin;\n\t\t\t\tbreak;\n\t\tendswitch;\n\n\t\t$skip_activation = array( 'piglatin', 'wordpress-beta-tester' );\n\t\t# do install\n\t\tforeach ( $plugin_list as $plugin ) :\n\t\t\t$res = WP_CLI::launch( 'wp plugin status '.$plugin, false );\n\t\t\t\n\t\t\tif ( isset( $res ) && $res === 1 ) {\n\t\t\t\t# install plugin (maybe skip piglatin)\n\t\t\t\t$cmdflag = ( in_array( $plugin, $skip_activation ) ) ? '' : ' --activate';\n\t\t\t\tWP_CLI::launch( 'wp plugin install ' . $plugin . $cmdflag );\n\t\t\t} else {\n\t\t\t\t# activate plugin (maybe skip piglatin)\n\t\t\t\tif ( false === in_array( $plugin, $skip_activation ) )\n\t\t\t\t\tWP_CLI::launch( 'wp plugin activate '.$plugin );\n\t\t\t}\n\t\tendforeach;\n\t}", "public function listenForJetpackOption( $old_value, $value, $option ) {\n\t\t$settings = Auth_Settings::instance();\n\t\tif ( array_search( 'sso', $value ) !== false ) {\n\t\t\t$settings->markAsConflict( 'jetpack/jetpack.php' );\n\t\t} else {\n\t\t\t$settings->markAsUnConflict( 'jetpack/jetpack.php' );\n\t\t}\n\t}", "function configure_propack() {\n global $quotepress_plugin;\n $quotepress_plugin->propack_enabled = true;\n }", "protected function writeConfig($force = false)\n {\n $setup = new Setup($this->config, $this->output, $this->php);\n $setup->config();\n\n if ($this->firstRun) {\n $setup->env(false, true);\n\n return;\n }\n\n if ($this->fileExists('.env') && $force === false) {\n return $this->write('-> Configuration already set up. Use --force to regenerate.', 'comment');\n }\n\n $setup->env();\n }", "public static function activate( $force = false ) {\n if ( ! is_blog_installed() ) return;\n\n // Post Type in single and plural\n $key_single = static::$names['key_single'];\n $key_plural = static::$names['key_plural'];\n\n // Check if this has been activated before\n $isnt_activated = ( '1' !== get_option( \"nf_{$key_single}_activated\" ) ) ? true : false;\n\n // Activate if it hasn't, or if being forced to\n if ( ($isnt_activated) or ($force) ) {\n\n // Add default caps to default roles\n foreach( static::roles_caps() as $role_type => $cap_types ) {\n $role = get_role( $role_type );\n\n foreach( $cap_types as $cap_type ) {\n $role->add_cap( \"${cap_type}_${key_plural}\" );\n }\n }\n\n // Update rewrite database\n flush_rewrite_rules(false);\n\n }\n\n // Set this as activated now\n if ($isnt_activated) {\n update_option( \"nf_{$key_single}_activated\", '1' );\n }\n\n }", "protected function configure()\n {\n $this\n ->setName('module:fix')\n ->setDescription('Fixes a module')\n ->addArgument('module', InputArgument::REQUIRED, 'Module name');\n }", "function allonsy_plugin_activation() {\n\n\tadd_option( 'allonsy_plugin_activated', 1, '', 'no' );\n}", "function realanswers_uninstall_options() {\r\n delete_option('real_apikey');\r\n delete_option('real_max_results');\r\n delete_option('real_custom_css');\r\n delete_option('real_captcha_public');\r\n delete_option('real_captcha_private');\r\n delete_option('real_location_count');\r\n delete_option('real_location_value');\r\n}", "function __block_caps( $caps, $cap )\n\t{\n\t if ( $cap === 'install_themes' )\n\t $caps[] = 'do_not_allow';\n\t return $caps;\n\t}", "function openqrm_ansible_remove_cloud_applications($appliance_name) {\n\tglobal $event;\n\tglobal $OPENQRM_SERVER_BASE_DIR;\n\tglobal $OPENQRM_SERVER_IP_ADDRESS;\n\tglobal $OPENQRM_EXEC_PORT;\n\t$ansible = new ansible();\n\t$ansible->remove_appliance($appliance_name);\n}", "function plugin_satisfactionsmiley_check_config() {\n return true;\n}", "function setDefaultOverrideOptions() {\n\tglobal $fm_module_options;\n\t\n\t$config = null;\n\t$server_os_distro = isDebianSystem($_POST['server_os_distro']) ? 'debian' : strtolower($_POST['server_os_distro']);\n\t\n\tswitch ($server_os_distro) {\n\t\tcase 'debian':\n\t\t\t$config = array(\n\t\t\t\t\t\t\tarray('cfg_type' => 'global', 'server_serial_no' => $_POST['SERIALNO'], 'cfg_name' => 'pid-file', 'cfg_data' => '/var/run/named/named.pid')\n\t\t\t\t\t\t);\n\t}\n\t\n\tif (is_array($config)) {\n\t\tif (!isset($fm_module_options)) include(ABSPATH . 'fm-modules/' . $_SESSION['module'] . '/classes/class_options.php');\n\t\t\n\t\tforeach ($config as $config_data) {\n\t\t\t$fm_module_options->add($config_data);\n\t\t}\n\t}\n}", "public function maybe_update_unlimited_access() {\n $current_version = get_option( 'laterpay_version' );\n if ( version_compare( $current_version, '0.9.11', '<' ) ) {\n return;\n }\n\n if ( $unlimited_role = get_option( 'laterpay_unlimited_access_to_paid_content' ) ) {\n add_option( 'laterpay_unlimited_access', array( $unlimited_role => array( 'all' ) ) );\n delete_option( 'laterpay_unlimited_access_to_paid_content' );\n }\n }", "function activate() {\n $existing_blogname = $this->ext->get_option( 'livefyre_blogname', false );\n if ( $existing_blogname ) {\n $site_id = $existing_blogname;\n $existing_key = $this->ext->get_option( 'livefyre_secret', false );\n update_option('livefyre_apps-'. 'livefyre_site_id', $site_id );\n $this->ext->delete_option( 'livefyre_blogname' );\n update_option('livefyre_apps-'. 'livefyre_site_key', $existing_key );\n $this->ext->delete_option( 'livefyre_secret' );\n } else {\n $site_id = get_option('livefyre_apps-livefyre_site_id', false );\n }\n \n if ( !get_option('livefyre_apps-livefyre_domain_name', false) ) {\n // Initialize default profile domain i.e. livefyre.com\n $defaultDomainName = get_option('livefyre_apps-livefyre_domain_name', LF_DEFAULT_PROFILE_DOMAIN);\n update_option('livefyre_apps-'. 'livefyre_domain_name', $defaultDomainName );\n } \n if ( !get_option('livefyre_apps-livefyre_auth_delegate_name', false) ) {\n $defaultDelegate = get_option('livefyre_apps-livefyre_auth_delegate_name', '');\n update_option('livefyre_apps-'. 'livefyre_auth_delegate_name', $defaultDelegate );\n } \n if ( !get_option('livefyre_apps-livefyre_domain_key', false) ) {\n $defaultKey = get_option('livefyre_apps-livefyre_domain_key', ''); \n update_option('livefyre_apps-'. 'livefyre_domain_key', $defaultKey );\n }\n \n if ( !$this->ext->get_option( 'livefyre_v3_installed', false ) ) {\n // Set a flag to show the 'hey you just upgraded' (or installed) flash message\n // Set the timestamp so we know which posts use V2 vs V3\n if ( $site_id ) {\n $this->ext->update_option( 'livefyre_v3_installed', current_time('timestamp') );\n $this->ext->update_option( 'livefyre_v3_notify_upgraded', 1 );\n $this->run_backfill( $site_id ); //only run backfill on existing blogs\n } else {\n // !IMPORTANT\n // livefyre_v3_installed == 0 is used elsewhere to determine if this\n // installation was derived from a former V2 installation\n $this->ext->update_option( 'livefyre_v3_installed', 0 );\n $this->ext->update_option( 'livefyre_v3_notify_installed', 1 );\n $this->ext->update_option( 'livefyre_backend_upgrade', 'skipped' );\n }\n }\n }", "function backup_sync_package() {\n\tglobal $config;\n\tif ($config['installedpackages']['backup']['config'] != \"\") {\n\t\tforeach ($config['installedpackages']['backup']['config'] as $rowhelper) {\n\t\t\tif ($rowhelper['enabled'] != \"false\") {\n\t\t\t\t//$tmp_php = base64_decode($rowhelper['php']);\n\t\t\t\tif (strlen($tmp_php) > 0) {\n\t\t\t\t\t$tmp .= \"// name: \" . $rowhelper['name'] . \" \\n\";\n\t\t\t\t\t$tmp .= \"// description: \" . $rowhelper['description'] . \" \\n\\n\";\n\t\t\t\t\t$tmp .= base64_decode($rowhelper['php']);\n\t\t\t\t\t$tmp .= \"\\n\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}", "protected function maybe_migrate() {\n\n\t\tif ( 'yes' === get_option( 'wc_avatax_migrated' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$this->log( 'Starting migration from legacy extension' );\n\n\t\t/**\n\t\t * Process settings\n\t\t */\n\n\t\t$legacy_settings = get_option( 'woocommerce_avatax_settings', array() );\n\n\t\tif ( ! empty( $legacy_settings ) ) {\n\n\t\t\t$settings = array(\n\t\t\t\t'wc_avatax_origin_address' => array(),\n\t\t\t);\n\n\t\t\t// These options can be copied to ours directly\n\t\t\t$direct_options = array(\n\t\t\t\t'account' => 'wc_avatax_api_account_number',\n\t\t\t\t'license' => 'wc_avatax_api_license_key',\n\t\t\t\t'company_code' => 'wc_avatax_company_code',\n\t\t\t\t'default_tax_code' => 'wc_avatax_default_product_code',\n\t\t\t\t'default_freight_code' => 'wc_avatax_shipping_code',\n\t\t\t\t'addr_filter_list' => 'wc_avatax_address_validation_countries',\n\t\t\t);\n\n\t\t\tforeach ( $legacy_settings as $name => $value ) {\n\n\t\t\t\tswitch ( $name ) {\n\n\t\t\t\t\tcase 'avalara_url':\n\t\t\t\t\t\t$settings['wc_avatax_api_environment'] = ( SV_WC_Helper::str_starts_with( $value, 'https://development' ) ) ? 'development' : 'production';\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'disable_tax_calc':\n\n\t\t\t\t\t\tif ( 'yes' !== $value ) {\n\t\t\t\t\t\t\t$settings['wc_avatax_enable_tax_calculation'] = 'yes';\n\n\t\t\t\t\t\t\t// Enable WC taxes as the legacy plugin required them to be disabled\n\t\t\t\t\t\t\tupdate_option( 'woocommerce_calc_taxes', 'yes' );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'disable_addr_validation':\n\t\t\t\t\t\t$settings['wc_avatax_enable_address_validation'] = ( 'yes' !== $value ) ? 'yes' : 'no';\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'commit_action':\n\t\t\t\t\t\t$settings['wc_avatax_commit'] = ( 'c' === $value ) ? 'yes' : 'no';\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'enable_exempt_id':\n\t\t\t\t\t\t$settings['wc_avatax_enable_vat'] = ( 'b' === $value ) ? 'yes' : 'no';\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t// Rebuild the origin address\n\t\t\t\t\tcase 'origin_street':\n\t\t\t\t\t\t$settings['wc_avatax_origin_address']['address_1'] = $value;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'origin_city':\n\t\t\t\t\t\t$settings['wc_avatax_origin_address']['city'] = $value;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'origin_state':\n\t\t\t\t\t\t$settings['wc_avatax_origin_address']['state'] = $value;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'origin_zip':\n\t\t\t\t\t\t$settings['wc_avatax_origin_address']['postcode'] = $value;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'origin_country':\n\t\t\t\t\t\t$settings['wc_avatax_origin_address']['country'] = $value;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tif ( isset( $direct_options[ $name ] ) ) {\n\t\t\t\t\t\t\t$settings[ $direct_options[ $name ] ] = $value;\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Update the settings with the migrated values\n\t\t\tforeach ( $settings as $name => $value ) {\n\n\t\t\t\tif ( '' !== $value ) {\n\t\t\t\t\tupdate_option( $name, $value );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Remove the legacy settings\n\t\t\tdelete_option( 'woocommerce_avatax_settings' );\n\t\t}\n\n\t\t/**\n\t\t * Process orders\n\t\t */\n\n\t\t// Get order that have been processed by AvaTax but haven't been migrated yet\n\t\t$legacy_orders = get_posts( array(\n\t\t\t'post_type' => 'shop_order',\n\t\t\t'post_status' => 'any',\n\t\t\t'meta_query' => array(\n\t\t\t\t'relation' => 'AND',\n\t\t\t\tarray(\n\t\t\t\t\t'key' => '_taxnow_avalaracommit',\n\t\t\t\t\t'compare' => 'EXISTS',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'key' => '_wc_avatax_status',\n\t\t\t\t\t'value' => 'The tops of UPS trucks are not brown :( (bug #23268)',\n\t\t\t\t\t'compare' => 'NOT EXISTS',\n\t\t\t\t),\n\t\t\t),\n\t\t) );\n\n\t\t// Convert to our custom order statuses\n\t\tforeach ( $legacy_orders as $order ) {\n\n\t\t\t$order = wc_get_order( $order->ID );\n\n\t\t\t$order_id = SV_WC_Order_Compatibility::get_prop( $order, 'id' );\n\n\t\t\tadd_post_meta( $order_id, '_wc_avatax_status', 'posted' );\n\n\t\t\tif ( 'return' === get_post_meta( $order_id, '_taxnow_avalaracommit', true ) ) {\n\t\t\t\tadd_post_meta( $order_id, '_wc_avatax_status', 'refunded' );\n\t\t\t}\n\n\t\t\tif ( $order->has_status( 'cancelled' ) ) {\n\t\t\t\tadd_post_meta( $order_id, '_wc_avatax_status', 'voided' );\n\t\t\t}\n\n\t\t\t// Don't process this one again\n\t\t\tadd_post_meta( $order_id, '_wc_avatax_status', 'migrated' );\n\t\t}\n\n\t\tglobal $wpdb;\n\n\t\t// Migrate the product tax codes\n\t\t// legacy key: _taxnow_taxcode\n\t\t// new key: _wc_avatax_code\n\t\t$wpdb->update( $wpdb->postmeta, array(\n\t\t\t'meta_key' => '_wc_avatax_code',\n\t\t), array(\n\t\t\t'meta_key' => '_taxnow_taxcode',\n\t\t) );\n\n\t\t// Migration complete\n\t\tupdate_option( 'wc_avatax_migrated', 'yes' );\n\n\t\t$this->log( 'Migration complete' );\n\t}", "function wp_protect_special_option($option)\n {\n }", "function top10_install() {\r\n/* Creates new database field */\r\n//add_option('omekafeedpull_omekaroot', '/omeka', '', 'yes');\r\n}", "public function resetPartialPackageHasArticless($v = true)\n {\n $this->collPackageHasArticlessPartial = $v;\n }", "public function handle()\n {\n $module = $this->argument('module');\n $isForce = $this->option('force') == null || $this->option('force') == true || $this->option('force') == 'true' ? true : false;\n $moduleDir = app_path() . '/Modules';\n if (!File::isDirectory($moduleDir)) {\n File::makeDirectory($moduleDir, 0777, true, true);\n }\n if ($module == null || $module == 'n/a') {\n $moduleConfigs = ModuleUtil::getAllModuleConfigs();\n foreach ($moduleConfigs['modules'] as $moduleNamespace => $moduleConfig) {\n if ($moduleConfig['status'] === 'enable') {\n $moduleURL = $this->getModuleDownloadURL($moduleConfig['namespace']);\n $downloadedModuleName = $this->downloadModule($moduleURL, $moduleDir);\n if ($downloadedModuleName != null) {\n $this->installModule($moduleDir . '/' . $downloadedModuleName);\n }\n }\n }\n } else {\n $moduleType = $this->checkModuleArgType($module);\n switch ($moduleType) {\n case self::TYPE_NAME:\n {\n $moduleVersion = $this->getModuleVersion($module);\n $moduleNamespace = $this->buildNamespace($module);\n $moduleConfigs = ModuleUtil::getAllModuleConfigs();\n $isInstall = true;\n if (array_key_exists($moduleNamespace, $moduleConfigs['modules'])) {\n if ($moduleConfigs['modules'][$moduleNamespace]['status'] !== 'enable') {\n $isInstall = false;\n }\n if (isset($moduleConfigs['modules'][$moduleNamespace]['version'])\n && $moduleVersion == '') {\n $moduleVersion = $moduleConfigs['modules'][$moduleNamespace]['version'];\n }\n }\n if ($isInstall) {\n $moduleURL = $this->getModuleDownloadURL($moduleNamespace);\n if ($moduleVersion !== '') {\n $moduleURL .= '?version=' . $moduleVersion;\n }\n $downloadedModuleName = $this->downloadModule($moduleURL, $moduleDir);\n if ($downloadedModuleName != null) {\n $this->installModule($moduleDir . '/' . $downloadedModuleName);\n }\n }\n break;\n }\n case self::TYPE_URL:\n {\n $downloadedModuleName = $this->downloadModule($module, $moduleDir);\n if ($downloadedModuleName != null) {\n $this->installModule($moduleDir . '/' . $downloadedModuleName);\n }\n break;\n }\n case self::TYPE_PATH:\n {\n $downloadedModuleName = $this->downloadModule($module, $moduleDir);\n if ($downloadedModuleName != null) {\n $this->installModule($moduleDir . '/' . $downloadedModuleName);\n }\n break;\n }\n default:\n break;\n }\n }\n }", "public function immortal($liveForever = TRUE)\n {\n return $this->set_option('immortal', $liveForever);\n }", "public static function installWpPlugin($force = false)\n {\n if(!config('laradmin.wp_enable')){\n Log::error(__CLASS__.':'.__METHOD__.': msg=>WordPress is not enabled');\n return null;\n }\n $wp_plugins_rpath = '/wp-content/plugins'; //TODO: (perhaps set in config in future) CAUTION: We are assuming that wp plugin relative path is not changed from its default value.\n //$wp_tpls_rpath='/wp-contents/themes/'.trim(config('laradmin.wp_theme'),'\\/').'/page_templates';//TODO: (perhaps set in config in future) CAUTION: We are assuming that wp theme relative path is not changed from its default value.\n\n\n $wp_plugins_path = (public_path() . '/' . trim(config('laradmin.wp_rpath'), '\\/') . $wp_plugins_rpath);\n //$wp_tpls_path=(public_path().'/'.trim(config('laradmin.wp_rpath'),'\\/').$wp_tpls_rpath);\n\n\n if (!$force and file_exists($wp_plugins_path . '/laradmin')) {\n return -1;\n } \n else {\n try{\n \n self::rcopy(self::basePath() . '/wp_plugins/laradmin', $wp_plugins_path.'/laradmin');\n }catch (\\Exception $ex) {\n Log::error(__CLASS__.':'.__METHOD__.': msg=>'.$ex->getMessage());\n return 0;\n }\n\n return 1;\n }\n }", "function instant_ide_manager_activate_post() {\n\n\tif ( ! get_option( 'instant_ide_manager_version_number' ) )\n\t\tupdate_option( 'instant_ide_manager_version_number', IIDEM_VERSION );\n\t\t\n\tinstant_ide_manager_dir_check( instant_ide_manager_get_uploads_path() );\n\n}", "function change_arguments( $args ) {\n //$args['dev_mode'] = true;\n\n return $args;\n }", "function onUninstall(){\n\tdelete_option( 'stackoverflowUser' );\n\tdelete_option( 'StackoverflowData' );\n}", "public static function removeInstallToolEnableFile() {}", "public function doAutoUpdate($force = false)\n {\n $siteConfig = SiteConfig::current_site_config();\n\n if ($force || $siteConfig->VimeoFeed_AutoUpdate) {\n $lastUpdated = $siteConfig->VimeoFeed_LastSaved;\n $nextUpdateInterval = $siteConfig->VimeoFeed_UpdateInterval;\n $nextUpdateIntervalUnit = $siteConfig->VimeoFeed_UpdateIntervalUnit;\n\n if ($lastUpdated) {\n // Assemble the time another update became required as per SiteConfig options\n // VimeoFeed_NextUpdateInterval & ..Unit\n $minimumUpdateTime = strtotime($lastUpdated . ' +' . $nextUpdateInterval . ' ' . $nextUpdateIntervalUnit);\n }\n\n // If we haven't auto-updated before (fresh install), or an update is due, do update\n if ($force || !isset($minimumUpdateTime) || $minimumUpdateTime < time()) {\n $this->getRecentUploads();\n\n // Save the time the update was performed\n $siteConfig->VimeoFeed_LastSaved = SS_Datetime::now()->value;\n $siteConfig->write();\n }\n }\n }", "function change_arguments( $args ) {\n //$args['dev_mode'] = true;\n\n return $args;\n }", "protected function configure()\n {\n $this\n ->setName('install')\n ->setDescription('Install October CMS.')\n ->addOption(\n 'force',\n null,\n InputOption::VALUE_NONE,\n 'Make the installer behave as if it is run for the first time. Existing files may get overwritten.'\n )\n ->addOption(\n 'php',\n null,\n InputOption::VALUE_OPTIONAL,\n 'Specify the path to a custom PHP binary',\n 'php'\n )\n ->addOption(\n 'templates-from',\n null,\n InputOption::VALUE_OPTIONAL,\n 'Specify from where to fetch template files (git remote)',\n ''\n );\n }", "public function setForce(bool $force = null)\n {\n $this->force = $force;\n\n return $this;\n }", "function delete(&$yogurt_suspensions, $force = false)\r\n\t{\r\n\t\tif (get_class($yogurt_suspensions) != 'yogurt_suspensions') {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t$sql = sprintf(\"DELETE FROM %s WHERE uid = %u\", $this->db->prefix(\"yogurt_suspensions\"), $yogurt_suspensions->getVar('uid'));\r\n\t\tif (false != $force) {\r\n\t\t\t$result = $this->db->queryF($sql);\r\n\t\t} else {\r\n\t\t\t$result = $this->db->query($sql);\r\n\t\t}\r\n\t\tif (!$result) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public function testDomainRemoveForceCommand()\n {\n $site = Arr::get($_SERVER, 'SERVER_NAME');\n if (!$site) {\n $this->assertTrue(true);\n return;\n }\n $argDomain = $site ? ['domain' => $site, '--force' => 1] : ['--force' => 1];\n\n $this->artisan('domain:remove', $argDomain);\n\n $this->assertFileDoesNotExist(env_path('.env.'.$site));\n\n $domainListed = Config::get('domain.domains');\n\n $this->assertArrayNotHasKey($site,$domainListed);\n\n //$this->assertDirectoryDoesNotExist(storage_path(domain_sanitized($site)));\n $this->assertDirectoryDoesNotExist(app()->exactDomainStoragePath());\n }", "protected function _fixSetup() {\n $project = $this->bootstrap->getBootstrap()->getResource('project');\n $project->salt = 'TESTCASE';\n }", "protected function configure()\n {\n $this\n ->setName('generate')\n ->setDescription('Generate Licenses file from project dependencies.')\n ->addOption('hide-version', 'hv', InputOption::VALUE_NONE, 'Hide dependency version')\n ->addOption('csv', null, InputOption::VALUE_NONE, 'Output csv format');\n }", "public function allowOverwrite($setting = true) {\n\t\t$this->allow_overwrite = $setting;\n\t}", "protected function configure()\n {\n $this->setDescription('Update the Sitepackage');\n }", "public function ensureSettings() {\n $settings = $this->getSettings();\n if (!$settings) {\n $defaults = $this->getDefaultSettings();\n add_option($this->getSettingsKey(), $defaults, '', 'yes');\n }\n }", "function example_module_noop_sysconfig()\n{\n return true;\n}", "function onInit(&$man) {\r\n\t\t$config = $man->getConfig();\r\n\r\n\t\t// Override option\r\n\t\t$config['somegroup.someoption'] = true;\r\n\r\n\t\treturn true;\r\n\t}", "protected function configure() {\n $this\n ->setName('mesd:jasper:delete-broken-records')\n ->setDescription('Removes any history record that points to a report that is no longer in the report store')\n ->addOption('dry-run', 'd', InputOption::VALUE_NONE, 'Dont make any database changes, just display the records that will be deleted')\n ;\n }", "protected function configure()\n {\n $this->setName('cs:remove:group')\n ->setDescription('Remove a group')\n ->addArgument('name', InputArgument::OPTIONAL, \"What's the group name?\");\n }", "protected function configure()\n {\n $this\n ->setName('check')\n ->setDescription('Check current for build or runtime')\n //->addOption('path', null, InputOption::VALUE_REQUIRED, 'Install on specific path', getcwd())\n ;\n }", "public function setForce($force) {\n $this->_force = $force;\n return $this;\n }", "protected function preflightWriteSugar()\n {\n if (!is_writable(\"config.php\")) {\n return $this->error(\"config.php is not writable!\", true);\n }\n\n if (file_exists('config_override.php') && !is_writable(\"config_override.php\")) {\n return $this->error(\"config_override.php is not writable!\", true);\n }\n return true;\n }", "function freeze() {\r\n\r\n\t\t$this->configured = True;\r\n\r\n\t}", "function freeze() {\r\n\r\n\t\t$this->configured = True;\r\n\r\n\t}", "function wpcom_vip_disable_zemanta_for_all_users() {\n _deprecated_function( __FUNCTION__, '2.0.0' );\n}", "function _drush_pm_disable($args) {\n drush_include_engine('drupal', 'environment');\n // To be consistent call the environment.inc function which will show the user\n // an error.\n drush_module_disable($args);\n}", "function wcfmgs_shop_manager_capability_option_updates( $options = array() ) {\r\n \t\r\n\t\t$options = get_option( 'wcfm_shop_manager_capability_options' );\r\n\t\t$shop_manager_role = get_role( 'shop_manager' );\r\n\t\t\r\n\t\t// Delete Media Capability\r\n\t\tif( isset( $options['delete_media'] ) && $options[ 'delete_media' ] == 'yes' ) {\r\n\t\t\t$shop_manager_role->remove_cap( 'delete_attachments' );\r\n\t\t\t$shop_manager_role->remove_cap( 'delete_posts' );\r\n\t\t} else {\r\n\t\t\t$shop_manager_role->add_cap( 'delete_attachments' );\r\n\t\t\t$shop_manager_role->add_cap( 'delete_posts' );\r\n\t\t}\r\n\t\t\t\r\n\t\t// Booking Capability\r\n\t\tif( wcfm_is_booking() ) {\r\n\t\t\tif( isset( $options['manage_booking'] ) && $options[ 'manage_booking' ] == 'yes' ) {\r\n\t\t\t\t$shop_manager_role->remove_cap( 'manage_bookings' );\r\n\t\t\t} else {\r\n\t\t\t\t$shop_manager_role->add_cap( 'manage_bookings' );\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Appointment Capability\r\n\t\tif( WCFM_Dependencies::wcfmu_plugin_active_check() ) {\r\n\t\t\tif( WCFMu_Dependencies::wcfm_wc_appointments_active_check() ) {\r\n\t\t\t\tif( isset( $options['manage_appointment'] ) && $options[ 'manage_appointment' ] == 'yes' ) {\r\n\t\t\t\t\t$shop_manager_role->remove_cap( 'manage_appointments' );\r\n\t\t\t\t\t$shop_manager_role->remove_cap( 'manage_others_appointments' );\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$shop_manager_role->add_cap( 'manage_appointments' );\r\n\t\t\t\t\t$shop_manager_role->add_cap( 'manage_others_appointments' );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Submit Products\r\n\t\tif( isset( $options[ 'submit_products' ] ) && $options[ 'submit_products' ] == 'yes' ) {\r\n\t\t\t$shop_manager_role->remove_cap( 'edit_products' );\r\n\t\t\t$shop_manager_role->remove_cap( 'manage_products' );\r\n\t\t\t$shop_manager_role->remove_cap( 'read_products' );\r\n\t\t} else {\r\n\t\t\t$shop_manager_role->add_cap( 'edit_products' );\r\n\t\t\t$shop_manager_role->add_cap( 'manage_products' );\r\n\t\t\t$shop_manager_role->add_cap( 'read_products' );\r\n\t\t}\r\n\t\t\r\n\t\t// Publish Coupon\r\n\t\tif( isset( $options[ 'publish_products' ] ) && $options[ 'publish_products' ] == 'yes' ) {\r\n\t\t\t$shop_manager_role->remove_cap( 'publish_products' );\r\n\t\t} else {\r\n\t\t\t$shop_manager_role->add_cap( 'publish_products' );\r\n\t\t}\r\n\t\t\r\n\t\t// Live Products Edit\r\n\t\tif( isset( $options[ 'edit_live_products' ] ) && $options[ 'edit_live_products' ] == 'yes' ) {\r\n\t\t\t$shop_manager_role->remove_cap( 'edit_published_products' );\r\n\t\t} else {\r\n\t\t\t$shop_manager_role->add_cap( 'edit_published_products' );\r\n\t\t}\r\n\t\t\r\n\t\t// Delete Products\r\n\t\tif( isset( $options[ 'delete_products' ] ) && $options[ 'delete_products' ] == 'yes' ) {\r\n\t\t\t$shop_manager_role->remove_cap( 'delete_published_products' );\r\n\t\t\t$shop_manager_role->remove_cap( 'delete_products' );\r\n\t\t} else {\r\n\t\t\t$shop_manager_role->add_cap( 'delete_published_products' );\r\n\t\t\t$shop_manager_role->add_cap( 'delete_products' );\r\n\t\t}\r\n\t\t\r\n\t\t// Submit Cuopon\r\n\t\tif( isset( $options[ 'submit_coupons' ] ) && $options[ 'submit_coupons' ] == 'yes' ) {\r\n\t\t\t$shop_manager_role->remove_cap( 'edit_shop_coupons' );\r\n\t\t\t$shop_manager_role->remove_cap( 'manage_shop_coupons' );\r\n\t\t\t$shop_manager_role->remove_cap( 'read_shop_coupons' );\r\n\t\t} else {\r\n\t\t\t$shop_manager_role->add_cap( 'edit_shop_coupons' );\r\n\t\t\t$shop_manager_role->add_cap( 'manage_shop_coupons' );\r\n\t\t\t$shop_manager_role->add_cap( 'read_shop_coupons' );\r\n\t\t}\r\n\t\t\r\n\t\t// Publish Coupon\r\n\t\tif( isset( $options[ 'publish_coupons' ] ) && $options[ 'publish_coupons' ] == 'yes' ) {\r\n\t\t\t$shop_manager_role->remove_cap( 'publish_shop_coupons' );\r\n\t\t} else {\r\n\t\t\t$shop_manager_role->add_cap( 'publish_shop_coupons' );\r\n\t\t}\r\n\t\t\r\n\t\t// Live Coupon Edit\r\n\t\tif( isset( $options[ 'edit_live_coupons' ] ) && $options[ 'edit_live_coupons' ] == 'yes' ) {\r\n\t\t\t$shop_manager_role->remove_cap( 'edit_published_shop_coupons' );\r\n\t\t} else {\r\n\t\t\t$shop_manager_role->add_cap( 'edit_published_shop_coupons' );\r\n\t\t}\r\n\t\t\r\n\t\t// Delete Coupon\r\n\t\tif( isset( $options[ 'delete_coupons' ] ) && $options[ 'delete_coupons' ] == 'yes' ) {\r\n\t\t\t$shop_manager_role->remove_cap( 'delete_published_shop_coupons' );\r\n\t\t\t$shop_manager_role->remove_cap( 'delete_shop_coupons' );\r\n\t\t} else {\r\n\t\t\t$shop_manager_role->add_cap( 'delete_published_shop_coupons' );\r\n\t\t\t$shop_manager_role->add_cap( 'delete_shop_coupons' );\r\n\t\t}\r\n }", "function wp_cli_app_set_remote( $args, $assoc_args ) {\n\n\t/** Force Only run With --Prompt */\n\tif ( ! isset ( $assoc_args['prompt'] ) and count( $assoc_args ) == 0 ) {\n\t\tWP_CLI::runcommand( \"app set:remote --prompt\" );\n\t\treturn;\n\t}\n\n\t//Check Empty Arg\n\t$require_key = array( \"ftp_host\", \"ftp_login\", \"ftp_password\", \"website_url\" );\n\tforeach ( $require_key as $r ) {\n\t\tif ( empty( $assoc_args[ $r ] ) ) {\n\t\t\tCLI::error( \"Please Enter `$r` Field.\" );\n\t\t\texit;\n\t\t}\n\t}\n\n\t//Sanitize arg\n\t$port = CLI::get_flag_value( $assoc_args, 'port', '21' );\n\t$is_ssl = CLI::get_flag_value( $assoc_args, 'ssl_connect', 0 );\n\t$passive_mode = CLI::get_flag_value( $assoc_args, 'passive_mode', 1 );\n\t$url = CLI::get_flag_value( $assoc_args, 'website_url', '' );\n\t$url = filter_var( trim( $url ), FILTER_SANITIZE_URL );\n\tif ( ! empty( $url ) and function_exists( 'parse_url' ) ) {\n\t\tif ( $ret = parse_url( $url ) ) {\n\t\t\tif ( ! isset( $ret[\"scheme\"] ) ) {\n\t\t\t\t$url = \"http://{$url}\";\n\t\t\t}\n\t\t}\n\t}\n\n\t//Set Number Step\n\t$step = 3;\n\n\t//Check Ftp Connect\n\t$ftp = new FTP();\n\t$ftp->host = trim( $assoc_args['ftp_host'] );\n\t$ftp->login = trim( $assoc_args['ftp_login'] );\n\t$ftp->password = trim( $assoc_args['ftp_password'] );\n\t$ftp->is_ssl = $is_ssl;\n\t$ftp->port = $port;\n\t$ftp->passive = $passive_mode;\n\t$ftp->domain = rtrim( $url, \"/\" );\n\t$conn = $ftp->connect();\n\tif ( $conn === false ) {\n\t\tCLI::error( \"Could Not connect To Your FTP Server.Please check entry.\" );\n\t} else {\n\t\tCLI::log( CLI::color( \"Step 1/\" . $step . \":\", \"b\" ) . \" The connection to the ftp server was successful.\" );\n\t}\n\n\t//get wp-config File\n\tCLI::log( \"We are finding the WordPress `wp-config.php` file in your server. please wait ...\" );\n\t$current_path = $conn->getDirectory();\n\t$wp_config_path = $conn->ftp_file_search( $current_path, true, \"wp-config.php\" );\n\tif ( $wp_config_path != false ) {\n\t\tCLI::log( CLI::color( \"Step 2/\" . $step . \":\", \"b\" ) . \" WordPress folder was found successfully.\" );\n\t\t$ftp->wp_directory = str_replace( \"wp-config.php\", \"\", $wp_config_path );\n\t} else {\n\t\tCLI::error( \"WordPress folder not found on your server.\" );\n\t}\n\n\t//Check Domain Name\n\t$check_domain = $ftp->check_ftp_domain( $ftp->domain, $ftp->wp_directory );\n\tif ( $check_domain === false ) {\n\t\tCLI::error( \"We were unable to connect to your WordPress Domain.Please Check your Domain and tray again.\" );\n\t} else {\n\t\t$ftp->wp_content = $check_domain['wp_content'];\n\t\t$ftp->mu_plugins = $check_domain['mu_plugins'];\n\t\t$ftp->wp_uploads = $check_domain['wp_uploads'];\n\t\t$ftp->wp_themes = $check_domain['wp_themes'];\n\t\t$ftp->wp_plugins = $check_domain['wp_plugins'];\n\t\tCLI::log( CLI::color( \"Step 3/\" . $step . \":\", \"b\" ) . \" Get Your Wordpress information successfully.\" );\n\t}\n\n\t//Save\n\t$save = $ftp->save_config( array(\n\t\t'host' => $ftp->host,\n\t\t'login' => $ftp->login,\n\t\t'password' => $ftp->password,\n\t\t'is_ssl' => $ftp->is_ssl,\n\t\t'passive' => $ftp->passive,\n\t\t'port' => $ftp->port,\n\t\t'domain' => $ftp->domain,\n\t\t'wp_directory' => $ftp->wp_directory,\n\t\t'wp_content' => $ftp->wp_content,\n\t\t'mu_plugins' => $ftp->mu_plugins,\n\t\t'wp_uploads' => $ftp->wp_uploads,\n\t\t'wp_themes' => $ftp->wp_themes,\n\t\t'wp_plugins' => $ftp->wp_plugins\n\t) );\n\tif ( $save === false ) {\n\t\tCLI::error( \"The file information of the remote file is not saved. Please try again.\" );\n\t} else {\n\t\tCLI::success( \"Set Remote Config file successfully.\" );\n\t}\n\n}", "public function setForceCurrentVersion($version)\n {\n $this->_options['current_version'] = $version;\n }", "public function setForceBbcode( $force=false )\n\t{\n\t\t$this->forceBbcode\t= $force;\n\t}", "function pkg_install($pkg_name, $force = false) {\n\tglobal $g;\n\t$result = false;\n\n\t$shortname = $pkg_name;\n\tpkg_remove_prefix($shortname);\n\n\t$pkg_force = \"\";\n\tif ($force) {\n\t\t$pkg_force = \"-f \";\n\t}\n\n\tpkg_debug(\"Installing package {$shortname}\\n\");\n\tif ($force || !is_pkg_installed($pkg_name)) {\n\t\t$result = pkg_call(\"install -y \" . $pkg_force . $pkg_name);\n\t\t/* Cleanup cache to free disk space */\n\t\tpkg_call(\"clean -y\");\n\t}\n\n\treturn $result;\n}", "function setSyncProdName()\n {\n }", "public function beforeStartingDeploy()\n {\n $remoteDeployDir = $this->getConfig(Option::deployDir);\n $this->runRemote(sprintf('sudo chown -R '.getenv('CI_TARGET_USER').':'.getenv('CI_TARGET_USER').' '.$remoteDeployDir.' 2&1>/dev/null'));\n }" ]
[ "0.5077676", "0.5073283", "0.4888273", "0.48436752", "0.48332578", "0.4750321", "0.47296804", "0.4685539", "0.4679689", "0.46297672", "0.46288747", "0.46217906", "0.46066833", "0.45968798", "0.45592", "0.4553175", "0.45353228", "0.45331442", "0.4527218", "0.45191434", "0.44706407", "0.44690084", "0.44582483", "0.44536996", "0.44436854", "0.4442892", "0.44301742", "0.4428493", "0.4426377", "0.43802944", "0.43776536", "0.43727273", "0.43726566", "0.4370803", "0.4363007", "0.4359523", "0.43518794", "0.43311563", "0.43108648", "0.4303117", "0.43018258", "0.4301123", "0.4292824", "0.42888546", "0.4285874", "0.42813078", "0.42811173", "0.42804822", "0.42774197", "0.4277182", "0.42766753", "0.42766088", "0.42680922", "0.4262972", "0.42557418", "0.425161", "0.4247074", "0.42346445", "0.42338726", "0.4233751", "0.4226149", "0.4224719", "0.422261", "0.422188", "0.4219935", "0.42153314", "0.4215156", "0.42132366", "0.42011765", "0.41945183", "0.41943032", "0.41917297", "0.41915554", "0.41886273", "0.418764", "0.41832313", "0.41744334", "0.41681576", "0.41668883", "0.41641533", "0.41598696", "0.41585076", "0.4158167", "0.4154772", "0.41529593", "0.41443455", "0.41391897", "0.41368413", "0.41368413", "0.41366813", "0.41347185", "0.41343167", "0.41330305", "0.4132862", "0.41257256", "0.41244945", "0.41210365", "0.41140157" ]
0.44562528
25
adds `ignoreerrors` option to ansiblegalaxy
public function ignoreErrors() { $this->option('--ignore-errors'); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function ignoreSSLErrors()\r\n {\r\n $this->commandLineOptions[] = '--ignore-ssl-errors=true';\r\n $this->commandLineOptions[] = '--ssl-protocol=tlsv1';\r\n }", "function ignore($excl){\n $excl[] = 'themes/myown/node_modules';\n return $excl;\n}", "protected function deactivate_and_die( $error = false ) {\n\t\t\t#load_plugin_textdomain(\n\t\t\t#\t'better-related',\n\t\t\t#\tfalse,\n\t\t\t#\tbasename( $this->plugin_dir ) . '/translations'\n\t\t\t#);\n\t\t\t$message = sprintf( __( \"Better Related has been automatically deactivated because of the following error: <strong>%s</strong>.\" ), $error );\n\t\t\tif ( !function_exists( 'deactivate_plugins' ) )\n\t\t\t\tinclude ( ABSPATH . 'wp-admin/includes/plugin.php' );\n\t\t\tdeactivate_plugins( __FILE__ );\n\t\t\twp_die( $message );\n\t\t}", "public function testRollbarConfigInternalCheckIgnoredShouldSuppress(): void\n {\n $errorReporting = \\error_reporting();\n \\error_reporting(0);\n\n Rollbar::init([\n 'access_token' => $this->getTestAccessToken(),\n 'environment' => 'testing-php',\n 'verbose_logger' => $this->verboseLogger,\n ]);\n Rollbar::logger()->getConfig()->internalCheckIgnored(LogLevel::WARNING, \"Some message\");\n $this->assertVerboseLogContains(\n 'Ignoring \\(error reporting has been disabled in PHP config\\)',\n LogLevel::DEBUG,\n );\n\n \\error_reporting($errorReporting);\n }", "public function testOptionsNotFound()\n {\n $this->_task->execute();\n }", "function add_settings_error($setting, $code, $message, $type = 'error')\n {\n }", "private function _isQuietErrorsEnabled()\n {\n $plugin = craft()->plugins->getPlugin('amnav');\n $settings = $plugin->getSettings();\n if($settings->quietErrors) {\n return true;\n }\n\n return false;\n }", "protected function configure() {\n $this\n ->setName('mesd:jasper:delete-broken-records')\n ->setDescription('Removes any history record that points to a report that is no longer in the report store')\n ->addOption('dry-run', 'd', InputOption::VALUE_NONE, 'Dont make any database changes, just display the records that will be deleted')\n ;\n }", "static function error($error)\n {\n global $template_vars;\n $template_vars['errors'][] = $error;\n }", "private function getImportErrorsVerbosity() {\n\n return $this->input->getOption('skip-errors')\n ? OutputInterface::VERBOSITY_NORMAL\n : OutputInterface::VERBOSITY_QUIET;\n }", "function installError($errorMsg) {\n\t\t$templateMgr =& TemplateManager::getManager();\n\t\t$templateMgr->assign(array('isInstallError' => true, 'errorMsg' => $errorMsg));\n\t\t$this->display();\n\t}", "public function settings_errors() {\n\t\techo settings_errors( $this->token . '-errors' );\n\t}", "public function settingsWithMissingOptions()\n {\n return array(\n array(\n array('-f', '--option1'),\n array('flag1' => true, 'option1' => 'Error should be triggered')\n ),\n array(\n array('--option1', '-f'),\n array('option1' => 'Error should be triggered', 'flag1' => true)\n )\n );\n }", "private function suppressLibraryErrors()\n {\n $this->originalErrorReporting = ini_get('error_reporting');\n error_reporting(E_ERROR | E_PARSE);\n }", "protected function enableDisplayErrors() {}", "protected function enableDisplayErrors() {}", "function die_fatal_error($error)\n{\n\t\t\n\tdefine(\"e_IMAGE\",\"e107_images/\");\n\tdefine(\"e_JS\",\"e107_web/js/\");\n\tdefine(\"e_THEME\", \"e107_themes/\");\n\tdefine(\"e_LANGUAGEDIR\", \"e107_languages/\");\n\t\n\tinclude(e_LANGUAGEDIR.\"English/English.php\");\n\tinclude(e_LANGUAGEDIR.\"English/lan_installer.php\");\n\t\n\t$var = array();\n\t$var[\"installation_heading\"] \t= LANINS_001;\n\t$var[\"stage_pre\"] \t\t\t\t= LANINS_002;\n\t$var[\"stage_num\"] \t\t\t\t= LANINS_003;\n\t$var[\"stage_title\"] \t\t\t= LAN_ERROR;\n\t$var[\"percent\"] \t\t\t\t= 10;\n\t$var[\"bartype\"] \t\t\t\t= 'danger';\n\t$var['stage_content']\t\t\t= \"<div class='alert alert-error alert-block'>\".$error.\"</div>\";\n\t$var['debug_info'] \t\t\t\t= '';\n\t\n\t$template = template_data();\n\t\n\tforeach($var as $k=>$val)\n\t{\n\t\t$template = str_replace(\"{\".$k.\"}\", $val, $template);\t\n\t\t\n\t}\n\techo $template;\n\texit;\t\t\n}", "public function test_missing_options() {\n $recipe = self::$baserecipe;\n unset($recipe['name']);\n\n $this->setExpectedException('moodle_exception');\n $generator = new tool_pluginkenobi_lang_generator($recipe, 'unused');\n }", "public function setIgnoreFailedSubtask($value)\n {\n return $this->set(self::IGNORE_FAILED_SUBTASK, $value);\n }", "public static function PrintReadOnlyError(){\r\n echo \"Error: phar archive creation/modification is disabled.\\n\";\r\n }", "function pg_set_error_verbosity($connection = NULL, $verbosity)\n{\n}", "protected function configure()\n {\n $this->setDescription('Scan for legacy error middleware or error middleware invocation.');\n $this->setHelp(self::HELP);\n $this->addOption('dir', 'd', InputOption::VALUE_REQUIRED, self::HELP_OPT_DIR);\n }", "public function testRollbarConfigCheckIgnoredException(): void\n {\n Rollbar::init([\n 'access_token' => $this->getTestAccessToken(),\n 'environment' => 'testing-php',\n 'verbose_logger' => $this->verboseLogger,\n 'check_ignore' => function () {\n throw new \\Exception();\n },\n ]);\n\n Rollbar::log(LogLevel::WARNING, \"Testing PHP Notifier\");\n $this->assertVerboseLogContains('Exception occurred in the custom checkIgnore logic:', LogLevel::ERROR);\n }", "public static function output_error($x){\n _deprecated_function( __FUNCTION__, '4.9.0', 'output_message()' );\n extract( shortcode_atts( array(\n 'error'=>true,\n 'msg'=>'Missing required parameter $msg!', \n 'redirect'=>null,\n 'fields'=>array(),\n 'display'=>true,\n 'loading'=>false,\n 'json'=>true,\n 'response_data'=>array(),\n 'form_id'=>false\n ), $x));\n self::output_message($x);\n }", "function show_error ()\n {\n global $errormessage;\n global $lang;\n global $ts_template;\n if (!empty ($errormessage))\n {\n eval ($ts_template['show_error']);\n }\n\n }", "public function set_group_exceptions($cmarray) {\n $this->groupexceptions = $cmarray;\n }", "public function errorIfOldCustomDrivers(): void\n {\n $driversPath = VALET_HOME_PATH.'/Drivers';\n\n if (! $this->files->isDir($driversPath)) {\n return;\n }\n\n foreach ($this->files->scanDir($driversPath) as $driver) {\n if (! ends_with($driver, 'ValetDriver.php')) {\n continue;\n }\n\n if (! str_contains($this->files->get($driversPath.'/'.$driver), 'namespace')) {\n warning('Please make sure all custom drivers have been upgraded for Valet 4.');\n warning('See the upgrade guide for more info:');\n warning('https://github.com/laravel/valet/blob/master/UPGRADE.md');\n exit;\n }\n }\n }", "public function missingRequiredOption($message)\n {\n Command::error($message);\n die();\n }", "function setOnOptionsError($error) {\n\t\t$this->on_options_error = $error;\n\t}", "public static function suppressed(): bool\n {\n return @trigger_error('hello');\n }", "protected function registerExtensionConfigurationErrorHandler() {}", "public function beforeOutputError() {\n }", "function wp_show_heic_upload_error($plupload_settings)\n {\n }", "function ajan_core_add_illegal_names() {\n\tupdate_site_option( 'illegal_names', get_site_option( 'illegal_names' ), array() );\n}", "function errorHandler($errno, $errstr = '', $errfile = '', $errline = '') {\r\n\tglobal $regex_error;\r\n\t$regex_error = \"Regular Expression Error: $errstr\";\r\n\treturn true; // dont exec internal error handler\r\n}", "protected function setWarningsExist() {}", "public function redirect_to_stderr($redirigir)\n\t{\n\t\t$this->modo_archivo = (! $redirigir);\n\t\t$this->modo_salida = ($redirigir) ? self::$MODO_ERR : self::$MODO_FILE;\n\t}", "public function testImportingLoggerFailure() {\n\t\tCakeLog::config('fail', array());\n\t}", "function module_builder_handle_sanity_exception($e) {\n $failed_sanity_level = $e->getFailedSanityLevel();\n switch ($failed_sanity_level) {\n case 'data_directory_exists':\n $message = \"The component data directory could not be created or is not writable.\";\n break;\n case 'component_data_processed':\n $message = \"No component data was found. Run 'drush mb-download' to process component data from documentation files.\";\n break;\n }\n drush_set_error(DRUSH_APPLICATION_ERROR, $message);\n}", "function bake_error($string) {\n global $error;\n $error = TRUE;\n fwrite(STDERR, \"\\n\\033[31m ERROR: \" . $string . \"\\033[37m\" . \"\\n\");\n}", "private static function _set_has_error_all(): void\n {\n self::$_has_error_all = true;\n }", "public function configure($options = array(), $messages = array())\n {\n $this->addOption('throw_global_error', true);\n\n $this->setMessage('invalid', 'You are already logged-in on another computer.');\n \n }", "public static function PrintReadOnlyWarning(){\r\n echo \"Warning: phar archive creation/modification is disabled in php.ini config. Please enable it to create or modify phar archives.\\n\\n\";\r\n }", "public function requirements_errors() {\n\t\t$errors = $this->errors;\n\t\trequire_once( ET_CORE_DIR . 'templates/admin/errors/requirements-error.php' );\n\t}", "public function getIgnoreFailedSubtask()\n {\n return $this->get(self::IGNORE_FAILED_SUBTASK);\n }", "public function err($text = '');", "protected function setErrorsExist() {}", "function output_error() {\r\n return false;\r\n }", "public function suppress_errors($suppress = \\true)\n {\n }", "public function enableErrorReporting(bool $html = false): self\n {\n ini_set('display_errors', 1);\n ini_set('error_reporting', 1);\n ini_set('html_errors', $html);\n return $this;\n }", "protected function parse_errors() {\n\t\tif ( count ( $this->_errors ) > 0 ) {\n\t\t\tforeach ( $this->_errors as $k => $v ) {\n\t\t\t\tadd_settings_error( $this->token . '-errors', $k, $v, 'error' );\n\t\t\t}\n\t\t} else {\n\t\t\t$message = sprintf( __( '%s settings updated', '{plugin_jump_starter_textdomain}' ), $this->name );\n\t\t\tadd_settings_error( $this->token . '-errors', $this->token, $message, 'updated' );\n\t\t}\n\t}", "public static function PrintInvalidCommand(){\r\n echo \"Invalid command usage. Run phartools -h or phartools ? to show help.\\n\";\r\n }", "function dbInstallError($errorMsg) {\n\t\t$templateMgr =& TemplateManager::getManager();\n\t\t$templateMgr->assign(array('isInstallError' => true, 'dbErrorMsg' => empty($errorMsg) ? __('common.error.databaseErrorUnknown') : $errorMsg));\n\t\t$this->display();\n\t}", "public function errorMode(){}", "function plugin_satisfactionsmiley_check_config() {\n return true;\n}", "public function testSkipAlreadyExcludedSymlinks()\n {\n\n $this->composer->setConfig(new Config(false, __DIR__ . '/ExcludeFolders/SkipAlreadyExcludedSymlinks'));\n\n $expectedTerminalOutput = array();\n\n $expectedTerminalOutput[] = '<info>Skipping excluding \"wp-content/plugins\" because symlink '\n . '\"wordpress/wp-content/plugins\" is already excluded.</info>';\n $expectedTerminalOutput[] = '<info>Added \"wordpress/wp-content/plugins\" to PhpStorm config at \"'\n . getcwd()\n . '/tests/ExcludeFolders/SkipAlreadyExcludedSymlinks/.idea/valid.iml\".</info>';\n\n $this->io\n ->expects($this->exactly(2))\n ->method('write')\n ->withConsecutive(\n [$expectedTerminalOutput[0]],\n [$expectedTerminalOutput[1]]\n );\n\n $this->package->setExtra([\n \"phpstorm\" => [\n \"exclude_folders\" => [\n \"folders\" => [\n \"wordpress/wp-content/plugins\"\n ]\n ]\n ],\n \"symlinks\" => [\n \"wp-content/plugins\" => \"wordpress/wp-content/plugins\"\n ]\n ]);\n\n $fileToWrite = getcwd() . '/tests/ExcludeFolders/SkipAlreadyExcludedSymlinks/.idea/valid.iml';\n $expectedFileOutput = file_get_contents(getcwd()\n . '/tests/ExcludeFolders/SkipAlreadyExcludedSymlinks/expected.iml');\n\n $this->filesystem->expects($this->once())\n ->method('dumpFile')\n ->with($fileToWrite, $expectedFileOutput);\n\n ExcludeFolders::update($this->event, $this->filesystem);\n }", "public function testUnavailableWithSuggestion()\n {\n $this->logger->expects($this->once())\n ->method('log')->with(\n $this->equalTo('error'),\n $this->equalTo(\n 'That command is not available via Terminus. '\n . 'Please use the native {command} command. '\n . 'Hint: You may want to try `{suggestion}`.'\n ),\n $this->equalTo([\n 'command' => 'dummy',\n 'suggestion' => \"terminus alternative\"\n ])\n );\n\n $output = $this->command->dummyCommand('site.env', ['avoided']);\n\n $this->assertEquals('', $output);\n }", "public function shouldRaiseNoGroupExceptionBecauseWrongConfig()\n {\n $this->config->set('solvency-groups', array(\n 'default-group' => 1,\n 'solvency-groups' => serialize(array())\n ));\n try {\n $this->config->getDefaultSolvencyGroup();\n } catch (Exception $e) {\n $this->assertEquals(\n 'No proper default group selected, please contact merchant!',\n $e->getMessage(),\n 'Exception has not expected message.'\n );\n return;\n }\n $this->fail('An expected exception has not been raised.');\n }", "public static function displayErrors(){\n $ec = new EmailLabsConfig();\n if( $ec->getMode() == true && !empty( self::$errors ) ){\n $message = '';\n foreach( self::$errors as $item )\n $message .= '['.$item['lvl'].']['.$item['date'].']'.$item['msg'].\"\\n\";\n die( $message );\n }\n }", "protected function initializeErrorHandling() {}", "function external_db_auth_warning()\n{\n echo \"<p class=\\\"message\\\">\" . get_option('external_db_error_msg') . \"</p>\";\n}", "protected function outputInstallToolNotEnabledMessageIfNeeded() {}", "protected function outputInstallToolNotEnabledMessageIfNeeded() {}", "function seterr($msg)\n{\n\tif (php_sapi_name() == 'cli') {\n\t\texit($msg .\"\\n\");\n\t} else {\n\t\texit('<p class=\"alert\">'. $msg .'</p></body></html>');\n\t}\n}", "function handleError($errno, $errstr, $errfile, $errline, array $errcontext)\n{\n // error was suppressed with the @-operator\n if (0 === error_reporting()) {\n return false;\n }\n\n throw new ErrorException($errstr, 0, $errno, $errfile, $errline);\n}", "function TS_VCSC_CustomPackInstalledError(){\r\n\t\t\tif ((ini_get('allow_url_fopen') == '1') || (TS_VCSC_cURLcheckBasicFunctions() == true)) {\r\n\t\t\t\t$RemoteFileAccess \t= true;\r\n\t\t\t} else {\r\n\t\t\t\t$RemoteFileAccess \t= false;\r\n\t\t\t}\r\n\t\t\t$actual_link \t\t\t= \"http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]\";\r\n\t\t\t$actual_link \t\t\t= explode('/', $actual_link);\r\n\t\t\t$urlBasename \t\t\t= array_pop($actual_link);\r\n\t\t\tif ($urlBasename == 'admin.php?page=TS_VCSC_Uploader' ) {\r\n\t\t\t\t$dest \t\t\t\t= wp_upload_dir();\r\n\t\t\t\t$dest_path \t\t\t= $dest['path'];\r\n\t\t\t\t// If a file exists display included icons\r\n\t\t\t\tif ((file_exists($dest_path.'/ts-vcsc-custom-pack.zip')) && ($RemoteFileAccess == true) && (get_option('ts_vcsc_extend_settings_tinymceCustomArray', '') != '')) {\r\n\t\t\t\t\t// Disable File Upload Field if custom font pack exists or system requirements are not met\r\n\t\t\t\t\techo '<script>\r\n\t\t\t\t\t\tjQuery(document).ready(function() {\r\n\t\t\t\t\t\t\tjQuery(\".ts-vcsc-custom-pack-preloader\").hide();\r\n\t\t\t\t\t\t\tjQuery(\".preview-icon-code-box\").show();\r\n\t\t\t\t\t\t\tjQuery(\"#dropDownDownload\").removeAttr(\"disabled\");\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tjQuery(\"input#ts_vcsc_custom_pack_replace\").attr(\"disabled\", \"disabled\");\r\n\t\t\t\t\t\t\tjQuery(\"#ts_vcsc_custom_pack_replace_label\").addClass(\"disabled\");\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tjQuery(\"input#ts_vcsc_custom_pack_relative\").attr(\"disabled\", \"disabled\");\r\n\t\t\t\t\t\t\tjQuery(\"#ts_vcsc_custom_pack_relative_label\").addClass(\"disabled\");\r\n\t\t\t\t\t\t\tjQuery(\"input#ts_vcsc_custom_pack_debug\").attr(\"disabled\", \"disabled\");\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tjQuery(\"#ts_vcsc_custom_pack_debug_label\").addClass(\"disabled\");\r\n\t\t\t\t\t\t\tjQuery(\"input#ts_vcsc_custom_pack_nocurl\").attr(\"disabled\", \"disabled\");\r\n\t\t\t\t\t\t\tjQuery(\"#ts_vcsc_custom_pack_nocurl_label\").addClass(\"disabled\");\r\n\t\t\t\t\t\t\tjQuery(\"input#ts_vcsc_custom_pack_user\").attr(\"disabled\", \"disabled\");\r\n\t\t\t\t\t\t\tjQuery(\"#ts_vcsc_custom_pack_user_label\").addClass(\"disabled\");\r\n\t\t\t\t\t\t\tjQuery(\"input#ts_vcsc_custom_pack_password\").attr(\"disabled\", \"disabled\");\r\n\t\t\t\t\t\t\tjQuery(\"#ts_vcsc_custom_pack_password_label\").addClass(\"disabled\");\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tjQuery(\"#ts-custom-iconfont-import-file\").attr(\"disabled\", \"disabled\");\r\n\t\t\t\t\t\t\tjQuery(\"#ts-custom-iconfont-import-file\").parent().addClass(\"ts-custom-iconfont-import-disabled\");\t\r\n\t\t\t\t\t\t\tjQuery(\"#ts_vcsc_import_font_submit\").attr(\"disabled\", \"disabled\");\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t</script>';\r\n\t\t\t\t} else if ($RemoteFileAccess == false) {\r\n\t\t\t\t\tTS_VCSC_ResetCustomFont();\r\n\t\t\t\t\techo '<script>\r\n\t\t\t\t\t\tjQuery(document).ready(function() {\r\n\t\t\t\t\t\t\tjQuery(\".ts-vcsc-custom-pack-preloader\").hide();\r\n\t\t\t\t\t\t\tjQuery(\".preview-icon-code-box\").hide();\r\n\t\t\t\t\t\t\tjQuery(\"#ts-custom-iconfont-import-file\").attr(\"disabled\", \"disabled\");\r\n\t\t\t\t\t\t\tjQuery(\"#ts-custom-iconfont-import-file\").parent().addClass(\"ts-custom-iconfont-import-disabled\");\r\n\t\t\t\t\t\t\tjQuery(\"#uninstall-pack-button\").attr(\"disabled\", \"disabled\");\r\n\t\t\t\t\t\t\tjQuery(\"#dropDownDownload\").attr(\"disabled\", \"disabled\");\r\n\t\t\t\t\t\t\tjQuery(\"#ts_vcsc_import_font_submit\").attr(\"disabled\", \"disabled\");\r\n\t\t\t\t\t\t\tjQuery(\"input#ts_vcsc_custom_pack_replace\").attr(\"disabled\", \"disabled\");\r\n\t\t\t\t\t\t\tjQuery(\"#ts_vcsc_custom_pack_replace_label\").addClass(\"disabled\");\r\n\t\t\t\t\t\t\tjQuery(\"input#ts_vcsc_custom_pack_relative\").attr(\"disabled\", \"disabled\");\r\n\t\t\t\t\t\t\tjQuery(\"#ts_vcsc_custom_pack_relative_label\").addClass(\"disabled\");\r\n\t\t\t\t\t\t\tjQuery(\"input#ts_vcsc_custom_pack_debug\").attr(\"disabled\", \"disabled\");\r\n\t\t\t\t\t\t\tjQuery(\"#ts_vcsc_custom_pack_debug_label\").addClass(\"disabled\");\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tjQuery(\"input#ts_vcsc_custom_pack_nocurl\").attr(\"disabled\", \"disabled\");\r\n\t\t\t\t\t\t\tjQuery(\"#ts_vcsc_custom_pack_nocurl_label\").addClass(\"disabled\");\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tjQuery(\"input#ts_vcsc_custom_pack_user\").attr(\"disabled\", \"disabled\");\r\n\t\t\t\t\t\t\tjQuery(\"#ts_vcsc_custom_pack_user_label\").addClass(\"disabled\");\r\n\t\t\t\t\t\t\tjQuery(\"input#ts_vcsc_custom_pack_password\").attr(\"disabled\", \"disabled\");\r\n\t\t\t\t\t\t\tjQuery(\"#ts_vcsc_custom_pack_password_label\").addClass(\"disabled\");\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tjQuery(\".ts-vcsc-custom-pack-buttons\").after(\"<div class=error><p class=fontPackUploadedError>Your system does not fulfill the requirements to import a custom font.</p></div>\");\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t</script>';\t\r\n\t\t\t\t}\r\n\t\t\t\tif (($RemoteFileAccess == true) && (file_exists( $dest_path.'/ts-vcsc-custom-pack.json' )) && (file_exists($dest_path.'/style.css')) && (get_option('ts_vcsc_extend_settings_tinymceCustomArray', '') != '')) {\r\n\t\t\t\t\t// Create Preview of Imported Icons\r\n\t\t\t\t\t$output = \"\";\r\n\t\t\t\t\t$output .= \"<div id='ts-vcsc-extend-preview' class=''>\";\r\n\t\t\t\t\t\t$output .=\"<div id='ts-vcsc-extend-preview-name'>Font Name: \" . \t\tget_option('ts_vcsc_extend_settings_tinymceCustomName', 'Custom User Font') . \"</div>\";\r\n\t\t\t\t\t\t$output .=\"<div id='ts-vcsc-extend-preview-author'>Font Author: \" . \tget_option('ts_vcsc_extend_settings_tinymceCustomAuthor', 'Custom User') . \"</div>\";\r\n\t\t\t\t\t\t$output .=\"<div id='ts-vcsc-extend-preview-count'>Icon Count: \" . \t\tget_option('ts_vcsc_extend_settings_tinymceCustomCount', 0) . \"</div>\";\r\n\t\t\t\t\t\t$output .=\"<div id='ts-vcsc-extend-preview-date'>Uploaded: \" . \t\t\tget_option('ts_vcsc_extend_settings_tinymceCustomDate', '') . \"</div>\";\r\n\t\t\t\t\t\t$output .= \"<div id='ts-vcsc-extend-preview-list' class=''>\";\r\n\t\t\t\t\t\t$icon_counter = 0;\r\n\t\t\t\t\t\tforeach (get_option('ts_vcsc_extend_settings_tinymceCustomArray', '') as $key => $option ) {\r\n\t\t\t\t\t\t\t$font = explode('-', $key);\r\n\t\t\t\t\t\t\t$output .= \"<div class='ts-vcsc-icon-preview ts-freewall-active' data-name='\" . $key . \"' data-code='\" . $option . \"' data-font='Custom' data-count='\" . $icon_counter . \"' rel='\" . $key . \"'><span class='ts-vcsc-icon-preview-icon'><i class='\" . $key . \"'></i></span><span class='ts-vcsc-icon-preview-name'>\" . $key . \"</span></div>\";\r\n\t\t\t\t\t\t\t$icon_counter = $icon_counter + 1;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$output .= \"</div>\";\r\n\t\t\t\t\t$output .= \"</div>\";\r\n\t\t\t\t\techo '<script>\r\n\t\t\t\t\t\tjQuery(document).ready(function() {\r\n\t\t\t\t\t\t\tjQuery(\"#current-font-pack-preview\").html(\"' . $output. '\");\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t</script>';\r\n\t\t\t\t} else if ((file_exists($dest_path.'/ts-vcsc-custom-pack.zip')) && ($RemoteFileAccess == true) && ($this->TS_VCSC_UseCustomIconFontUpload == \"false\") && (get_option('ts_vcsc_extend_settings_tinymceCustomArray', '') == '')) {\r\n\t\t\t\t\tTS_VCSC_ResetCustomFont();\r\n\t\t\t\t\techo '<script>\r\n\t\t\t\t\t\tjQuery(document).ready(function() {\r\n\t\t\t\t\t\t\tjQuery(\"#ts-custom-iconfont-import-file\").attr(\"disabled\", \"disabled\");\r\n\t\t\t\t\t\t\tjQuery(\"#ts-custom-iconfont-import-file\").parent().addClass(\"ts-custom-iconfont-import-disabled\");\r\n\t\t\t\t\t\t\tjQuery(\"#ts_vcsc_import_font_submit\").attr(\"disabled\", \"disabled\");\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tjQuery(\"input#ts_vcsc_custom_pack_replace\").attr(\"disabled\", \"disabled\");\r\n\t\t\t\t\t\t\tjQuery(\"#ts_vcsc_custom_pack_replace_label\").addClass(\"disabled\");\r\n\t\t\t\t\t\t\tjQuery(\"input#ts_vcsc_custom_pack_relative\").attr(\"disabled\", \"disabled\");\r\n\t\t\t\t\t\t\tjQuery(\"#ts_vcsc_custom_pack_relative_label\").addClass(\"disabled\");\r\n\t\t\t\t\t\t\tjQuery(\"input#ts_vcsc_custom_pack_debug\").attr(\"disabled\", \"disabled\");\r\n\t\t\t\t\t\t\tjQuery(\"#ts_vcsc_custom_pack_debug_label\").addClass(\"disabled\");\r\n\t\t\t\t\t\t\tjQuery(\"input#ts_vcsc_custom_pack_nocurl\").attr(\"disabled\", \"disabled\");\r\n\t\t\t\t\t\t\tjQuery(\"#ts_vcsc_custom_pack_nocurl_label\").addClass(\"disabled\");\r\n\t\t\t\t\t\t\tjQuery(\"input#ts_vcsc_custom_pack_user\").attr(\"disabled\", \"disabled\");\r\n\t\t\t\t\t\t\tjQuery(\"#ts_vcsc_custom_pack_user_label\").addClass(\"disabled\");\r\n\t\t\t\t\t\t\tjQuery(\"input#ts_vcsc_custom_pack_password\").attr(\"disabled\", \"disabled\");\r\n\t\t\t\t\t\t\tjQuery(\"#ts_vcsc_custom_pack_password_label\").addClass(\"disabled\");\t\r\n\t\t\t\t\t\t\tjQuery(\".ts-vcsc-custom-pack-preloader\").hide();\r\n\t\t\t\t\t\t\tjQuery(\".preview-icon-code-box\").hide();\r\n\t\t\t\t\t\t\tjQuery(\"#ts-custom-iconfont-import-file\").attr(\"disabled\", \"disabled\");\r\n\t\t\t\t\t\t\tjQuery(\"#ts-custom-iconfont-import-file\").parent().addClass(\"ts-custom-iconfont-import-disabled\");\r\n\t\t\t\t\t\t\tjQuery(\"#uninstall-pack-button\").removeAttr(\"disabled\").addClass(\"uninstallnow\");\r\n\t\t\t\t\t\t\tjQuery(\"#dropDownDownload\").attr(\"disabled\", \"disabled\");\r\n\t\t\t\t\t\t\tjQuery(\".ts-vcsc-custom-pack-buttons\").after(\"<div class=error><p class=fontPackUploadedError>Hi there, something went wrong during your last font import. Please uninstall the current font package and try importing again (with a valid font package).</p></div>\");\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t</script>';\r\n\t\t\t\t} else {\r\n\t\t\t\t\tTS_VCSC_ResetCustomFont();\r\n\t\t\t\t\techo '<script>\r\n\t\t\t\t\t\tjQuery(document).ready(function() {\r\n\t\t\t\t\t\t\tjQuery(\".ts-vcsc-custom-pack-preloader\").hide();\r\n\t\t\t\t\t\t\tjQuery(\".preview-icon-code-box\").hide();\r\n\t\t\t\t\t\t\tjQuery(\"#uninstall-pack-button\").attr(\"disabled\", \"disabled\");\r\n\t\t\t\t\t\t\tjQuery(\"#ts-custom-iconfont-import-file\").removeAttr(\"disabled\");\r\n\t\t\t\t\t\t\tjQuery(\"#ts-custom-iconfont-import-file\").parent().removeClass(\"ts-custom-iconfont-import-disabled\");\r\n\t\t\t\t\t\t\tjQuery(\"#dropDownDownload\").attr(\"disabled\", \"disabled\");\r\n\t\t\t\t\t\t\tjQuery(\"input#ts_vcsc_custom_pack_replace\").attr(\"disabled\", \"disabled\");\r\n\t\t\t\t\t\t\tjQuery(\"#ts_vcsc_custom_pack_replace_label\").addClass(\"disabled\");\r\n\t\t\t\t\t\t\tjQuery(\"input#ts_vcsc_custom_pack_relative\").attr(\"disabled\", \"disabled\");\r\n\t\t\t\t\t\t\tjQuery(\"#ts_vcsc_custom_pack_relative_label\").addClass(\"disabled\");\r\n\t\t\t\t\t\t\tjQuery(\"input#ts_vcsc_custom_pack_debug\").attr(\"disabled\", \"disabled\");\r\n\t\t\t\t\t\t\tjQuery(\"#ts_vcsc_custom_pack_debug_label\").addClass(\"disabled\");\r\n\t\t\t\t\t\t\tjQuery(\"input#ts_vcsc_custom_pack_nocurl\").attr(\"disabled\", \"disabled\");\r\n\t\t\t\t\t\t\tjQuery(\"#ts_vcsc_custom_pack_nocurl_label\").addClass(\"disabled\");\r\n\t\t\t\t\t\t\tjQuery(\"input#ts_vcsc_custom_pack_user\").attr(\"disabled\", \"disabled\");\r\n\t\t\t\t\t\t\tjQuery(\"#ts_vcsc_custom_pack_user_label\").addClass(\"disabled\");\r\n\t\t\t\t\t\t\tjQuery(\"input#ts_vcsc_custom_pack_password\").attr(\"disabled\", \"disabled\");\r\n\t\t\t\t\t\t\tjQuery(\"#ts_vcsc_custom_pack_password_label\").addClass(\"disabled\");\t\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t</script>';\r\n\t\t\t\t}\r\n\t\t\t}\t\r\n\t\t}", "public function testInvalidConfig(): void\n {\n $result = $this->check->run('Books', [ 'icon_bad_values' => ['cube'], 'display_field_bad_values' => [\"title2\"] ]);\n $result = $this->check->getErrors();\n\n $this->assertTrue(is_array($result), \"getErrors() returned a non-array result\");\n $this->assertContains('[Books][config] parse : [/table/icon]: Matched a schema which it should not', $result);\n $this->assertContains('[Books][config] parse : [/table/display_field]: Matched a schema which it should not', $result);\n }", "function package_error($_error, $_message = NULL) {\n\n\treturn [\n\t\t'error' => [\n\t\t\t'status' => (isset($_error[0]) ? $_error[0] : 'S-SF-001'),\n\t\t\t'message' => (isset($_error[1]) ? $_error[1] : '系统错误') . (isset($_message) ? '('.$_message.')' : ''),\n\t\t]\n\t];\n}", "function error_handler($level, $message, $file, $line, $context) {\n if($level !== E_NOTICE && $level !== E_DEPRECATED && $level !== E_USER_DEPRECATED) {\n Cartridge::set_log('Error '.$level.': '.$message .'(Line: '.$line.' - File: '.$file.')');\n Cartridge::set_log( \"\\r\\n##################################\\r\\n\");\n send_error_mail('Error '.$level.': '.$message .'(Line: '.$line.' - File: '.$file.')');\n Cartridge::remove_lock_file();\n die();\n }\n return true;\n \n}", "function report_errors($errno, $errstr, $errfile, $errline) {\n\tswitch($db_engine) {\n\t\tcase \"sqlite3\": \n\t\t\t$escaped_string = sqlite_real_escape($errstr);\n\t\t\tbreak;\n\t\tcase \"mysql\":\n\t\t\t$escaped_string = mysql_real_escape_string($errstr);\n\t\t\tbreak;\n\t\tcase \"pgsql\":\n\t\t\t$escaped_string = pgsql_escape_string($errstr);\n\t\t\tbreak;\n\t}\n\tfreepbx_log('retrieve-conf', 'error', \"php reported: '$escaped_string' after copy or unlink attempt!\");\n $conn_dirs = connectdirs::create();\n $conn_dirs->add_cp_error($errstr.\"\\n\");\n}", "public function fail($e = null);", "public function testUnavailableWithoutSuggestion()\n {\n $this->logger->expects($this->once())\n ->method('log')->with(\n $this->equalTo('error'),\n $this->equalTo(\n 'That command is not available via Terminus. '\n . 'Please use the native {command} command.'\n ),\n $this->equalTo([\n 'command' => 'dummy',\n ])\n );\n\n $output = $this->command->dummyCommand('site.env', ['no-alternative']);\n\n $this->assertEquals('', $output);\n }", "public function notice_missing_extensions() {\n\n ?>\n <div class=\"error\">\n <p><strong><?php _e( 'The GD or Imagick libraries are not installed on your server. Envira Gallery requires at least one (preferably Imagick) in order to crop images and may not work properly without it. Please contact your webhost and ask them to compile GD or Imagick for your PHP install.', 'envira-gallery' ); ?></strong></p>\n </div>\n <?php\n\n }", "public function testEnvProdWarning()\n {\n $this->resumeManager->getUnfinishedProviders()->willReturn([]);\n $this->providerRegistry->getProviders()->willReturn([]);\n $tester = $this->execute('dev', []);\n\n $this->assertStringContainsString('WARNING: You are running', $tester->getDisplay());\n }", "public function setErrorConfig($error_config)\n {\n $this->httpExceptions = @$error_config[\"http_exceptions\"] ?? false;\n $this->paymentExceptions = @$error_config[\"transaction_exceptions\"] ?? true;\n }", "private function pipeline_error($message) {\n $this->record_progress($message);\n remove_directory($this->working_directory_path);\n }", "protected function warning()\n\t{\n\t\t\\IPS\\Output::i()->output = \\IPS\\Theme::i()->getTemplate( 'store' )->productOptionsChanged(\n\t\t\tnew \\IPS\\Patterns\\ActiveRecordIterator(\n\t\t\t\t\\IPS\\Db::i()->select( '*', 'nexus_packages', \\IPS\\Db::i()->in( 'p_id', explode( ',', \\IPS\\Request::i()->ids ) ) ),\n\t\t\t\t'IPS\\nexus\\Package'\n\t\t\t)\n\t\t);\n\t}", "public function testWrongDatabaseCredentials(): void {\n\t\t$ini_array = parse_ini_file(\"test.ini\");\n\t\t$user = $ini_array[\"incorrectdb\"][\"user\"];\n\t\t$password = $ini_array[\"incorrectdb\"][\"password\"];\n\t\t$host = $ini_array[\"incorrectdb\"][\"host\"];\n\n\t\t$output = `php src/user_upload.php -u $user -p$password -h$host 2>&1`;\n\n\t\t$this->assertEquals(\n\t\t\t\"Could not open connection to database: Access denied for user '$user'@'$host' (using password: YES)\\n\",\n\t\t\t$output\n\t\t);\n\t}", "public function disable_errors( $disable = true ) {\n\t\n\t\t$this->render_errors = true == $disable ? false : true;\n\t\n\t}", "function active_errors()\n\t{\n\t\tini_set('display_errors', 'On'); \n\t\tini_set('dispaly_errors', 1);\t\t\n\t}", "function errorlog_is_fail2ban() {\n return true; //exec() ps ef | grep python.*fail2ban-server;\n}", "public function testAlreadyExcluded()\n {\n\n $this->composer->setConfig(new Config(false, __DIR__ . '/ExcludeFolders/FolderAlreadyExcluded'));\n\n $expected = '<info>PhpStorm config already excludes \"foldertoexclude\".</info>';\n\n $this->io\n ->expects($this->exactly(1))\n ->method('write')\n ->withConsecutive(\n [$expected]\n );\n\n $this->package->setExtra([\n \"phpstorm\" => [\n \"exclude_folders\" => [\n \"folders\" => [ \"foldertoexclude\" ]\n ]\n ]\n ]);\n\n\n $this->filesystem->expects($this->never())\n ->method('dumpFile');\n\n\n ExcludeFolders::update($this->event, $this->filesystem);\n }", "public function failed()\n {\n // Do nothing\n }", "public function failed();", "public function disabled_notice() {\n\n\t\techo '<div class=\"error fade\"><p>';\n\t\techo sprintf( esc_html__( '%sImportant:%s WooCommerce TM Extra Product Options requires WordPress %s or later.', 'woocommerce-tm-extra-product-options' ),\n\t\t\t'<strong>', '</strong>', THEMECOMPLETE_EPO_WP_VERSION );\n\t\techo '</p></div>' . \"\\n\";\n\n\t}", "public function error($msg,$extra='') {\n\t print '<div class=\"alert alert-danger\">'.$msg.'</div>';\n\t\tif ($extra == '') {\n\t\t\tprint \"<br>The process has stopped. Please click on main menu to return to the dashboard.<br>\";\n\t\t\t$template = 'footer.tpl';\n\t\t\t$this->load_smarty(null,$template);\n\t\t}\n\t\tdie;\n\t}", "protected function failureShort()\n\t{\n\t\treturn 'SUPPRESSION_LIST_FAIL';\n\t}", "public static function handleError(& $error) {\r\t\t\t\t\r\t\t// Get JApplication object\r\t\t$mainframe = JFactory::getApplication();\t\r\t\t\r\t\t// Render custom error page in Administrator part of site\r\t\tif($mainframe->isAdmin()){\r\t\t\t// Render the error page.\r\t\t\tJError::customErrorPage($error);\r\t\t\t\r\t\t\t// Return false to not run the plugin\r\t\t\treturn false;\r\t\t}\r\t\t\r\t\t// Get instance of JDocument\r\t\t$document =& JFactory::getDocument();\r\t\t\r\t\t// Force to be html\r\t\t$document->setType('html');\r\t\t\r\t\t// Set the Error status before any content is output to screen\r\t\tJResponse::setHeader('status', $error->get('code').' '.str_replace( \"\\n\", ' ', $error->get('message') ));\r\t\t\r\t\t// Lets load joomla default javascript libraries if not already loaded\r\t\tJHTML::_('behavior.mootools');\r\t\tJHTML::_('behavior.caption');\r\t\t\r\t\t// First get the mainframe scope\r\t\t$scope = $mainframe->scope;\r\t\t\r\t\t// Change the scope to our component\r\t\t$mainframe->scope = 'com_qlue404';\r\t\t\r\t\t// Create path to our component\r\t\t$path = JPATH_BASE.DS.'components'.DS.'com_qlue404'.DS.'qlue404.php';\r\t\t\r\t\t// Render our component\r\t\t$contents = plgSystemQlue404::_renderComponent($path, $error);\r\t\t\r\t\t// Revert the scope back to original\r\t\t$mainframe->scope = $scope;\r\t\t\r\t\t// Set the document buffer\r\t\t$document->setBuffer($contents, 'component');\r\t\t\r\t\t// Get the template\r\t\t$template = $mainframe->getTemplate();\r\t\t\r\t\t// Set params for the template to load\r\t\t$params = array(\r\t\t\t'template' \t=> $template->template,\r\t\t\t'file'\t\t=> 'index.php',\r\t\t\t'directory'\t=> JPATH_THEMES,\r\t\t\t'params' => $template->params\r\t\t);\r\t\t\r\t\t// Render the template\r\t\t$data = $document->render($mainframe->getCfg('caching'), $params );\r\t\t\r\t\t// Set the new body data\r\t\tJResponse::setBody($data);\r\t\t\r\t\t// Display the new layout\r\t\techo JResponse::toString();\r\t\t\r\t\t// Close gracefully\r\t\t$mainframe->close(0);\r\r\t}", "public function fails();", "public function fails();", "private function _sendErrors( ){\n\n\t\tglobal $mqRecurly;\n\n\t\t$site = strtoupper( strtok( $mqRecurly->getSetting('plan_id_prefix'), '-' ) );\n\n\t\t$message = print_r( $this->_errors, 1 );\n\n\t\twp_mail( '[email protected]', 'Reculry Error - ' . $site, $message );\n\n\t}", "public function restKitDISABLED(RestKitException $error) {\n\t\tCakeLog::write('error', 'RestKitExceptionRenderer: entered restKit');\n\t\t$this->_setVndError($error);\n\t\t$this->_outputMessage($this->template); // make sure RestKitView is used\n\t}", "protected function runningFromCliOrWrongConfiguration() {}", "function wp_get_plugin_error($plugin)\n {\n }", "public function skip() {\n\t\t$sapi = PHP_SAPI;\n\t\t$message = 'Cookie tests cannot be run via command-line interface.';\n\t\t$this->skipIf($sapi === 'cli', $message);\n\t}", "public function testNoPhpStorm()\n {\n\n $this->composer->setConfig(new Config(false, __DIR__ . '/ExcludeFolders/NoPhpStorm '));\n\n $expected = '<info>PhpStorm project folder \"'\n . getcwd() . '/tests/ExcludeFolders/NoPhpStorm /.idea/\" does not exist. '\n . 'Maybe this project has not been opened in PhpStorm yet.</info>';\n\n $this->io\n ->expects($this->exactly(1))\n ->method('write')\n ->withConsecutive(\n [$expected]\n );\n\n $this->package->setExtra([\n \"phpstorm\" => [\n \"exclude_folders\" => [\n \"folders\" => [ \"foldertoexclude\" ]\n ]\n ]\n ]);\n\n ExcludeFolders::update($this->event, $this->filesystem);\n }", "public function testInvalidConfig()\n {\n $config = array(\n 'invalidArg' => TRUE,\n );\n\n $result = self::processFilter($config, self::$request);\n }", "private function manage_plugins( $option = NULL ){\n\t\tif ( 'skip' === $option )\n\t\t\treturn;\n\n\t\t# default plugin set\n\t\t$std_plugin = array(\n\t\t\t'debug-bar',\n\t\t\t'debug-bar-console',\n\t\t\t'debug-bar-cron',\n\t\t\t'debug-bar-extender',\n\t\t\t'developer',\n\t\t\t'log-viewer',\n\t\t\t'monster-widget',\n\t\t\t'piglatin',\n\t\t\t'regenerate-thumbnails',\n\t\t\t'rewrite-rules-inspector',\n\t\t\t'rtl-tester',\n\t\t\t'simply-show-ids',\n\t\t\t'theme-check',\n\t\t\t'theme-test-drive',\n\t\t\t'user-switching',\n\t\t\t'wordpress-importer',\n\t\t\t'wordpress-beta-tester',\n\t\t);\n\n\t\t# wpcom VIP plugin set\n\t\t$vip_plugin = array(\n\t\t\t'grunion-contact-form',\n\t\t\t'jetpack',\n\t\t\t'mp6',\n\t\t\t'polldaddy',\n\t\t\t'vip-scanner',\n\t\t);\n\t\t\n\t\t# plugin developers bundle\n\t\t$dev_plugin = array(\n\t\t\t'log-deprecated-notices',\n\t\t);\n\t\t\n\t\t# debug plugin bundle (author's choice)\n\t\t# please file a pull request to include/exclude plugins\n\t\t$debug_plugin = array(\n\t\t\t'debug-bar-actions-and-filters-addon',\n\t\t\t'debug-bar-constants',\n\t\t\t'debug-my-plugin',\n\t\t\t'debug-objects',\n\t\t\t'uploadplus',\n\t\t);\n\n\t\tswitch ( $option ):\n\t\tcase 'vip':\n\t\t\t\t$plugin_list = array_merge( $std_plugin, $vip_plugin );\n\t\t\t\tbreak;\n\n\t\tcase 'devel':\n\t\t\t\t$plugin_list = array_merge( $std_plugin, $dev_plugin );\n\t\t\t\tbreak;\n\n\t\tcase 'debug':\n\t\t\t\t$plugin_list = array_merge( $std_plugin, $debug_plugin );\n\t\t\t\tbreak;\n\n\t\tcase 'all':\n\t\t\t\t$plugin_list = array_merge( $std_plugin, $vip_plugin, $dev_plugin, $debug_plugin );\n\n\t\tcase 'theme':\n\t\tdefault:\n\t\t\t\t$plugin_list = $std_plugin;\n\t\t\t\tbreak;\n\t\tendswitch;\n\n\t\t$skip_activation = array( 'piglatin', 'wordpress-beta-tester' );\n\t\t# do install\n\t\tforeach ( $plugin_list as $plugin ) :\n\t\t\t$res = WP_CLI::launch( 'wp plugin status '.$plugin, false );\n\t\t\t\n\t\t\tif ( isset( $res ) && $res === 1 ) {\n\t\t\t\t# install plugin (maybe skip piglatin)\n\t\t\t\t$cmdflag = ( in_array( $plugin, $skip_activation ) ) ? '' : ' --activate';\n\t\t\t\tWP_CLI::launch( 'wp plugin install ' . $plugin . $cmdflag );\n\t\t\t} else {\n\t\t\t\t# activate plugin (maybe skip piglatin)\n\t\t\t\tif ( false === in_array( $plugin, $skip_activation ) )\n\t\t\t\t\tWP_CLI::launch( 'wp plugin activate '.$plugin );\n\t\t\t}\n\t\tendforeach;\n\t}", "public function hide_errors()\n {\n }", "public function testWith_DsnIsExtOptPath()\n {\n $config = Config::with('mock', array('path'=>$this->dir));\n $this->checkWithResult($config);\n }" ]
[ "0.5165538", "0.46428004", "0.46071783", "0.458099", "0.45791018", "0.4528251", "0.45200476", "0.45089853", "0.4496293", "0.44938752", "0.44867972", "0.44719437", "0.4444553", "0.4444389", "0.44227597", "0.44220954", "0.44164512", "0.44037446", "0.43869385", "0.4357889", "0.4339364", "0.43391386", "0.43045554", "0.43031994", "0.42978898", "0.4290334", "0.42870727", "0.42809364", "0.42730775", "0.4269189", "0.42635143", "0.4261195", "0.4259265", "0.42574236", "0.42559275", "0.42353773", "0.42311668", "0.4227919", "0.42249617", "0.42186093", "0.42182758", "0.4196538", "0.41945228", "0.4190519", "0.41731015", "0.41584063", "0.41459876", "0.41422474", "0.41378284", "0.41366914", "0.41364357", "0.4129011", "0.41196123", "0.41129187", "0.41075686", "0.41061655", "0.41029173", "0.41016412", "0.41013142", "0.40902182", "0.4088363", "0.40797132", "0.40782472", "0.4078219", "0.4074478", "0.40742818", "0.40741554", "0.40730324", "0.40727246", "0.40710637", "0.4069782", "0.4066198", "0.40611854", "0.4040606", "0.4036966", "0.40362626", "0.4024883", "0.40241525", "0.40185705", "0.40180507", "0.40107256", "0.40069422", "0.40046877", "0.40035263", "0.40008476", "0.39991933", "0.39961335", "0.39904845", "0.39902267", "0.39902267", "0.39813456", "0.39788225", "0.39778578", "0.3973869", "0.39703536", "0.3965081", "0.39627212", "0.3961519", "0.39594343", "0.39593813" ]
0.46455365
1
adds `nodeps` option to ansiblegalaxy
public function noDeps() { $this->option('--no-deps'); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function addProductPackParameterNode()\n {\n $builder = new TreeBuilder();\n $node = $builder->root('product_pack');\n\n $node\n ->treatTrueLike(array('entity' => null))\n ->treatFalseLike(array('entity' => null))\n ->addDefaultsIfNotSet()\n ->children()\n ->scalarNode('entity')\n ->defaultNull()\n ->end()\n ->end()\n ;\n\n return $node;\n }", "function _tune($hosts = array()){\r\n$hosts[] = 'tune.pk';\r\nreturn $hosts;\r\n}", "function add_options_packages() {\n $this->configure_propack();\n }", "public function appendTaskSettings(){\n $taskSettingsSerializer=new CloudDriverTaskSettingsSerializer($this->pmml,$this->miner->type);\n $taskSettingsSerializer->task=$this->task;\n $this->pmml=$taskSettingsSerializer->settingsFromJson($this->task->taskSettingsJson);\n }", "protected function addExtensionsSection(ArrayNodeDefinition $node)\n {\n $node\n ->children()\n ->arrayNode('extensions')\n ->useAttributeAsKey('extensions')\n ->prototype('scalar')->end()\n ->end()\n ->end();\n }", "function projectpentagon_install() {\n\nadd_option(\"projectpentagon_title\", 'fgfhgThis it the Title of my Pentagram', '', 'yes');\n\nadd_option(\"projectpentagon_name1\", 'Name a', '', 'yes');\n\nadd_option(\"projectpentagon_name2\", 'Name b', '', 'yes');\n\nadd_option(\"projectpentagon_name3\", 'Name c', '', 'yes');\n\nadd_option(\"projectpentagon_name4\", 'Name d', '', 'yes');\n\nadd_option(\"projectpentagon_name5\", 'Name e', '', 'yes');\n\nadd_option(\"projectpentagon_color1\", 'Blue', '', 'yes');\n\nadd_option(\"projectpentagon_color2\", 'Red', '', 'yes');\n\nadd_option(\"projectpentagon_color3\", 'Yellow', '', 'yes');\n\nadd_option(\"projectpentagon_color4\", 'Green', '', 'yes');\n\nadd_option(\"projectpentagon_color5\", 'Orange', '', 'yes');\n\nadd_option(\"projectpentagon_category\", 'Category Name', '', 'yes');\nadd_option(\"projectpentagon-titleonpages\", 'title for pages', '', 'yes');\n\n//these could probably be created as an array? eventually\n\n}", "function nxt_posts_p_add_options(){\n\n\tadd_option( 'nxt_post_option_template_select', 'themes/theme_1.php');\n\tadd_option( 'nxt_post_plugin_enable');\n}", "function psp_add_role_caps()\n{\n $roles = array('manager');\n\n // Loop through each role and assign capabilities\n foreach ($roles as $the_role) {\n\n $role = get_role($the_role);\n\n $role->add_cap('read');\n $role->add_cap('create_cpt_project');\n $role->add_cap('create_private_cpt_project');\n $role->add_cap('read_cpt_project');\n $role->add_cap('read_private_cpt_project');\n $role->add_cap('edit_cpt_project');\n $role->add_cap('edit_published_cpt_project');\n $role->add_cap('publish_cpt_project');\n $role->add_cap('delete_private_cpt_project');\n $role->add_cap('delete_published_cpt_project');\n\n }\n}", "function modifyPuppetConfiguration( $puppetinfo ) {\n\t\tglobal $wgAuth;\n\t\tglobal $wgOpenStackManagerPuppetOptions;\n\n\t\t$hostEntry = array();\n\t\tif ( $wgOpenStackManagerPuppetOptions['enabled'] ) {\n\t\t\tforeach ( $wgOpenStackManagerPuppetOptions['defaultclasses'] as $class ) {\n\t\t\t\t$hostEntry['puppetclass'][] = $class;\n\t\t\t}\n\t\t\tforeach ( $wgOpenStackManagerPuppetOptions['defaultvariables'] as $variable => $value ) {\n\t\t\t\t$hostEntry['puppetvar'][] = $variable . '=' . $value;\n\t\t\t}\n\t\t\tif ( isset( $puppetinfo['classes'] ) ) {\n\t\t\t\tforeach ( $puppetinfo['classes'] as $class ) {\n\t\t\t\t\t$hostEntry['puppetclass'][] = $class;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( isset( $puppetinfo['variables'] ) ) {\n\t\t\t\tforeach ( $puppetinfo['variables'] as $variable => $value ) {\n\t\t\t\t\t$hostEntry['puppetvar'][] = $variable . '=' . $value;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$oldpuppetinfo = $this->getPuppetConfiguration();\n\t\t\tif ( isset( $oldpuppetinfo['puppetvar'] ) ) {\n\t\t\t\t$wgAuth->printDebug( \"Checking for preexisting variables\", NONSENSITIVE );\n\t\t\t\tforeach ( $oldpuppetinfo['puppetvar'] as $variable => $value ) {\n\t\t\t\t\t$wgAuth->printDebug( \"Found $variable\", NONSENSITIVE );\n\t\t\t\t\tif ( $variable == \"instancecreator_email\" || $variable == \"instancecreator_username\"\n\t\t\t\t\t\t|| $variable == \"instancecreator_lang\" || $variable == \"instanceproject\" || $variable == \"instancename\" ) {\n\t\t\t\t\t\t$hostEntry['puppetvar'][] = $variable . '=' . $value;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( $hostEntry ) {\n\t\t\t\t$success = LdapAuthenticationPlugin::ldap_modify( $wgAuth->ldapconn, $this->hostDN, $hostEntry );\n\t\t\t\tif ( $success ) {\n\t\t\t\t\t$this->fetchHostInfo();\n\t\t\t\t\t$wgAuth->printDebug( \"Successfully modified puppet configuration for host\", NONSENSITIVE );\n\t\t\t\t\treturn true;\n\t\t\t\t} else {\n\t\t\t\t\t$wgAuth->printDebug( \"Failed to modify puppet configuration for host\", NONSENSITIVE );\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$wgAuth->printDebug( \"No hostEntry when trying to modify puppet configuration\", NONSENSITIVE );\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public function getEnableNodeAutoprovisioning()\n {\n return $this->enable_node_autoprovisioning;\n }", "protected function addOptionsNode()\n {\n $builder = new TreeBuilder();\n $node = $builder->root('options');\n\n $node\n ->prototype('variable')\n ->end();\n\n return $node;\n }", "function _add_plugins_dir( $module )\n {\n $modinfo = pnModGetInfo(pnModGetIDFromName($module));\n $modpath = ($modinfo['type'] == 3) ? 'system' : 'modules';\n $mod_plugs = \"$modpath/$modinfo[directory]/pntemplates/plugins\";\n if (file_exists($mod_plugs)) {\n array_push($this->plugins_dir, $mod_plugs);\n }\n\n// uncomment for .8 until modtype=3 for system modules is implemented\n $modpath = 'system';\n $mod_plugs = \"$modpath/$modinfo[directory]/pntemplates/plugins\";\n if (file_exists($mod_plugs)) {\n array_push($this->plugins_dir, $mod_plugs);\n }\n }", "function extra_register_customizer_portability() {\n\tglobal $options;\n\n\t// Make sure the Portability is loaded.\n\tet_core_load_component( 'portability' );\n\n\t// Load ePanel options.\n\tet_load_core_options();\n\n\t// Exclude ePanel options.\n\t$exclude = array();\n\n\tforeach ( $options as $option ) {\n\t\tif ( isset( $option['id'] ) ) {\n\t\t\t$exclude[ $option['id'] ] = true;\n\t\t}\n\t}\n\n\t// Register the portability.\n\tet_core_portability_register( 'et_extra_mods', array(\n\t\t'name' => esc_html__( 'Extra Customizer Settings', 'Extra' ),\n\t\t'type' => 'options',\n\t\t'target' => 'et_extra',\n\t\t'exclude' => $exclude,\n\t\t'view' => is_customize_preview(),\n\t) );\n}", "protected function addTasksNode()\n {\n $builder = new TreeBuilder();\n $node = $builder->root('tasks');\n\n $node\n ->isRequired()\n ->requiresAtLeastOneElement()\n ->useAttributeAsKey('task')\n ->prototype('array')\n ->children()\n ->scalarNode('description')->defaultNull()->end()\n ->arrayNode('requires')\n ->useAttributeAsKey('task')\n ->prototype('scalar')->end()\n ->end()\n ->append($this->addCommandsNode())\n ->end()\n ->end();\n\n return $node;\n }", "protected function buildPluginNodes() {\n\t\t$this->node = $this->getToken();\n\t\t\n\t\t// fetch ordered pips\n\t\t$pips = array();\n\t\t$sql = \"SELECT\t\tpluginName, className,\n\t\t\t\t\tCASE pluginName WHEN 'packageinstallationplugins' THEN 1 WHEN 'files' THEN 2 ELSE 0 END 'pluginOrder'\n\t\t\tFROM\t\twcf\".WCF_N.\"_package_installation_plugin\n\t\t\tWHERE\t\tpackageID IN (\n\t\t\t\t\t\t1 /* TESTING ONLY */\n\t\t\t\t\t\t/*\n\t\t\t\t\t\tSELECT\tdependency\n\t\t\t\t\t\tFROM\twcf\".WCF_N.\"_package_dependency\n\t\t\t\t\t\tWHERE\tpackageID = \".$this->installation->queue->packageID.\"\n\t\t\t\t\t\t*/\n\t\t\t\t\t)\n\t\t\tORDER BY\tpluginOrder ASC, priority DESC\";\n\t\t$statement = WCF::getDB()->prepareStatement($sql);\n\t\t$statement->execute();\n\t\twhile ($row = $statement->fetchArray()) {\n\t\t\t$pips[] = $row;\n\t\t}\n\t\t\n\t\t// insert pips\n\t\t$sql = \"INSERT INTO\twcf\".WCF_N.\"_package_installation_node\n\t\t\t\t\t(queueID, processNo, sequenceNo, node, nodeType, nodeData)\n\t\t\tVALUES\t\t(?, ?, ?, ?, ?, ?)\";\n\t\t$statement = WCF::getDB()->prepareStatement($sql);\n\t\t$sequenceNo = 0;\n\t\t\n\t\tforeach ($pips as $pip) {\n\t\t\t$statement->execute(array(\n\t\t\t\t$this->installation->queue->queueID,\n\t\t\t\t$this->installation->queue->processNo,\n\t\t\t\t$sequenceNo,\n\t\t\t\t$this->node,\n\t\t\t\t'pip',\n\t\t\t\tserialize(array(\n\t\t\t\t\t'pluginName' => $pip['pluginName'],\n\t\t\t\t\t'className' => $pip['className']\n\t\t\t\t))\n\t\t\t));\n\t\t\t\n\t\t\t$sequenceNo++;\n\t\t}\n\t}", "function setDefaultOverrideOptions() {\n\tglobal $fm_module_options;\n\t\n\t$config = null;\n\t$server_os_distro = isDebianSystem($_POST['server_os_distro']) ? 'debian' : strtolower($_POST['server_os_distro']);\n\t\n\tswitch ($server_os_distro) {\n\t\tcase 'debian':\n\t\t\t$config = array(\n\t\t\t\t\t\t\tarray('cfg_type' => 'global', 'server_serial_no' => $_POST['SERIALNO'], 'cfg_name' => 'pid-file', 'cfg_data' => '/var/run/named/named.pid')\n\t\t\t\t\t\t);\n\t}\n\t\n\tif (is_array($config)) {\n\t\tif (!isset($fm_module_options)) include(ABSPATH . 'fm-modules/' . $_SESSION['module'] . '/classes/class_options.php');\n\t\t\n\t\tforeach ($config as $config_data) {\n\t\t\t$fm_module_options->add($config_data);\n\t\t}\n\t}\n}", "function vpn_setup() {\n\tglobal $g;\n\n\tif ($g['platform'] == 'jail')\n\t\treturn;\n\n\t/* start pptpd */\n\tvpn_pptpd_configure();\n\n\t/* start pppoe server */\n\tvpn_pppoes_configure();\n\n\t/* setup l2tp */\n\tvpn_l2tp_configure();\n}", "protected function configure()\n {\n $this->setName('tangoman:privileges')\n ->setDescription('Creates default privileges');\n }", "function admin_init() {\r\n register_setting('e_tools_options', 'e_tools');\r\n}", "function configure_propack() {\n global $quotepress_plugin;\n $quotepress_plugin->propack_enabled = true;\n }", "protected function addEmOption() {\r\n\t\t$this->addOption('em', null, InputOption::VALUE_OPTIONAL, 'Name of a entity manager in application config (Helpful if using multiple connections with \"orm.ems.options\")', DoctrineMigrationsServiceProvider::DEFAULT_ENTITY_MANAGER_NAME);\r\n\t}", "function mpc_register_settings() {\n\tregister_setting('mpc_settings_group', 'mpc_settings');\n}", "public function setupOptions()\n {\n $this->addTaskAction(new Action('test', 't', 'Test action'));\n }", "private function getPassive($node) {\n\t\t$html ='<div class=\"tal_passiveSkills\">';\n\t\tforeach ($node->passive->skill as $s) {\n\t\t\t$html .= '<li class=\"tal_passive\" data-req=\"'.$s['req'].'\" onClick=\"toggleSkill(this)\">\n\t\t\t\t<img src=\"'.$s['img'].'\" onMouseOver=\"displayStats(this)\" onMouseOut=\"hideStats(this)\" />';\n\t\t\t$html .= '<div class=\"tal_stats\">'.$this->getSkillDetail($s).'</div>';\n\t\t\t$html .= '</li>';\n\t\t}\n\t\t$html .= '</div>';\n\n\t\treturn $html;\n\t}", "function is_pppoe_server_enabled() {\n\t$pppoeenable = false;\n\n\tforeach (config_get_path('pppoes/pppoe', []) as $pppoes) {\n\t\tif ($pppoes['mode'] == 'server') {\n\t\t\t$pppoeenable = true;\n\t\t}\n\t}\n\n\treturn $pppoeenable;\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 static function option_neopress_host() {\n printf(\n '<input type=\"text\" id=\"neopress_host\" name=\"neopress_host\" value=\"%s\" />',\n get_option('neopress_host')\n );\n }", "function wpegg_scriptInstall(){\r\n \r\n // Put in empty options\r\n add_option(\"wpegg_server\", \"\",NULL,\"no\");\r\n add_option(\"wpegg_port\",\"\",NULL,\"no\");\r\n add_option(\"wpegg_password\",\"\",NULL,\"no\");\r\n add_option(\"wpegg_message\",\"\",NULL,\"no\");\r\n \r\n}", "function add_splus_roles_and_caps() {\n $role = get_role('administrator');\n if (is_object($role) && !$role->has_cap('manage_slp')) {\n $role->add_cap('manage_slp');\n }\n }", "public function addModule(string $name, array $options) {}", "function bbps_add_options() {\n\n\t// Default options\n\t$options = array (\n\t//user counts and titles\n\t\t// The default display for topic status we used not resolved as default\n\t\t'_bbps_default_status' => '1',\n\t\t//enable user post count display\n\t\t'_bbps_enable_post_count' => '1',\n\t\t//enable user rank\n\t\t'_bbps_enable_user_rank' => '1',\n\t\t//defaults for who can change the topic status\n\t\t'_bbps_status_permissions' => '',\n\t\t// the reply counts / boundaries for the custom forum poster titles this has no default as the user must set these\n\t\t'_bbps_reply_count' => '',\n\t\t//the status people want to show on their topics.\n\t\t'_bbps_used_status' => '',\n\t\t//give admin and forum moderators the ability to move topics into other forums default = enabled\n\t\t'_bbps_enable_topic_move' => '1',\n\t\t//urgent topics\n\t\t'_bbps_status_permissions_urgent' => '',\n\t\t//do a color change for resolved topics\n\t\t//'_bbps_status_color_change' => '1',\n\t);\n\t// Add default options\n\tforeach ( $options as $key => $value )\n\t\tadd_option( $key, $value );\n\n}", "public function getNodePoolConfig()\n {\n return $this->node_pool_config;\n }", "public function getAutoprovisioningNodePoolDefaults()\n {\n return $this->autoprovisioning_node_pool_defaults;\n }", "function bigbluebuttonbn_get_extra_capabilities() {\n return array('moodle/site:accessallgroups');\n}", "function install_new_vps($IDVPS, $connection, $OS, $hostname, $disque, $ip, $swap, $memoire, $cpu, $passroot)\n{\n\t//On suprrime et r�installe le serveur--------------------------------------------------------------------------------\n\t\n\t//Commande � ex�cuter\n\t//$command = '/usr/bin/pvectl vzcreate '.$IDVPS.' --disk '.$disque.' --ostemplate '.$OS.' --hostname '.$hostname.' --nameserver 127.0.0.1 --nameserver 213.186.33.99 --searchdomain ovh.net --onboot no --ipset '.$ip.' --swap '.$swap.' --mem '.$memoire.' --cpus '.$cpu.' && vzctl restart '.$IDVPS.' && vzctl set '.$IDVPS.' --userpasswd root:'.$passroot;\n$command='/usr/bin/pvectl create -vmid '.$IDVPS.' -ostemplate '.$OS.' -disk '.$disque.' -hostname '.$hostname.' -nameserver 156.154.70.1 -nameserver 156.154.71.1 -searchdomain heberge-hd.net -onboot 1 -ip_address '.$ip.' -swap '.$swap.' -memory '.$memoire.' -cpus '.$cpu.' -password '.$passroot.' && sleep 10 && vzctl start '.$IDVPS;\n$command0='sleep 10 && vzctl exec '.$IDVPS.' echo -e \"auto eth0 \\niface eth0 inet static \\n\\taddress '.$ip.' \\n\\tnetmask 255.255.255.0 \\n\\tgateway 192.168.5.1 \\n\\tbroadcast 192.168.5.255\" > /etc/network/interfaces';\n\n //On lance la commande\n $stream = ssh2_exec($connection, $command);\n stream_set_blocking($stream, true);\n\n $stream0 = ssh2_exec($connection, $command0);\n stream_set_blocking($stream0, true);\n\t//R�cup�re le r�sultat\n\t$rep=\"\";\n\twhile($line = fgets($stream)){\n\t\t$rep.=$line;\t\n\t}\n\t//Ferme la connection\n\tfclose($stream);\n\tfclose($stream0);\n\n\t\n\tif($stream!=false){\n\t\treturn true;\n\t}else{$ok=stripos($rep,\"Container start in progress\");\n\t$time=time();\n\t$message = mysql_real_escape_string('Le '.date('d/m/y - H:i:s').' le VPS '.$hostname.' ('.$IDVPS.') est passer en erreur lors de sa réinstallation.\n\t\tVoici le message : '.$rep.'\n\n\t\tCommande : \n\t\t'.$command_stop.'');\n\t$IDVPS = mysql_real_escape_string($IDVPS);\n\t$time = mysql_real_escape_string($time);\n\tmysql_query(\"INSERT INTO `warning` ( `id` , `id_client` , `ip` , `message` , `page` , `time` , `type`, `TYPE_W`)\nVALUES (\nNULL , '\".$IDVPS.\"', 'IP', '\".$message.\"', '', '\".$time.\"', 'W_ERREUR_SETUP_VPS', 'VPS'\n)\");\n\t\treturn false;\n\t}\n\t\n}", "public function paml_additional_options() {\n\t\tglobal $paml_options;\n\n\t\t$multisite_reg = get_site_option( 'registration' );\n\n\t\techo '<div id=\"additional-settings\">';\n\n\t\tif ( ( get_option( 'users_can_register' ) && ! is_multisite() ) || ( $multisite_reg == 'all' || $multisite_reg == 'blog' || $multisite_reg == 'user' ) )\n\t\t\techo '<a href=\"#register\" class=\"modal-login-nav\">' . __( 'Register', 'pressapps' ) . '</a> | ';\n\n\t\techo '<a href=\"#forgotten\" class=\"modal-login-nav\">' . __( 'Lost your password?', 'pressapps' ) . '</a>';\n\n\t\techo '<div class=\"hide-login\"> | <a href=\"#login\" class=\"modal-login-nav\">' . __( 'Back to Login', 'pressapps' ) . '</a></div>';\n\n\t\techo '</div>';\n\t}", "function nxt_post_assing_var_to_options(){\n\n\t$nxt_post_option_template_select = get_option( 'nxt_post_option_template_select');\n\t$nxt_post_plugin_enable = get_option('nxt_post_plugin_enable');\n}", "function save_result_as_node($result){\n// dpm($result);\n global $user;\n try {\n $node = (object) NULL;;\n $node->title = $result['data']['vappName'];\n $node->type = 'running_service';\n $node->uid = $user->uid;\n $node->status = 1; //(1 or 0): published or not\n $node->promote = 0; //(1 or 0): promoted to front page\n $node->comment = 0; // 0 = comments disabled, 1 = read only, 2 = read/write\n// $node->field_template_name['und'][0]['value'] = $result['data']['vms'][0]['name'];\n// $node->field_cpu['und'][0]['value'] =$result['data']['vms'][0]['cpu'];\n// $node->field_power_status['und'][0]['value'] =$result['data']['vms'][0]['powerStatus'];\n// $node->field_memory['und'][0]['value'] =$result['data']['vms'][0]['memory'];\n// $node->field_storage['und'][0]['value'] =$result['data']['vms'][0]['hardDisk'][0]['size'];\n// $node->field_storage['und'][0]['value'] ='40960 Mb';//test data,the storage data not prepared.\n// $node->field_ip_address['und'][0]['value'] =$result['data']['vms'][0]['network'][0]['ipAddress'];\n $node->field_task_id['und'][0]['value'] =$result['data']['taskId'];\n $node->field_vappid['und'][0]['value'] =$result['data']['vappId'];\n $node->field_progress['und'][0]['value'] =0;\n $node = node_submit($node); // Prepare node for saving\n node_save($node);\n //dpm($result);\n }catch (Exception $e) {\n drupal_set_message($e->__toString(),'error');\n }\n}", "function unilabel_get_extra_capabilities() {\n return ['moodle/site:accessallgroups'];\n}", "function reinstall_vps($IDVPS, $connection, $OS, $hostname, $disque, $ip, $swap, $memoire, $cpu, $passroot){\n\t//On suprrime et r�installe le serveur--------------------------------------------------------------------------------\n\t\n\t// Pour old version : Commande � ex�cuter\n\t//$command='/usr/bin/pvectl vzcreate '.$IDVPS.' --disk '.$disque.' --ostemplate '.$OS.' --hostname '.$hostname.' --nameserver 127.0.0.1 --nameserver 213.186.33.99 --searchdomain ovh.net --onboot no --ipset '.$ip.' --swap '.$swap.' --mem '.$memoire.' --cpus '.$cpu.' && vzctl restart '.$IDVPS.' && vzctl set '.$IDVPS.' --userpasswd root:'.$passroot;\n\t// pour proxmox 2.X\n $command='/usr/bin/pvectl create -vmid '.$IDVPS.' -ostemplate '.$OS.' -disk '.$disque.' -hostname '.$hostname.' -nameserver 156.154.70.1 -nameserver 156.154.71.1 -searchdomain heberge-hd.net -onboot 1 -ip_address '.$ip.' -swap '.$swap.' -memory '.$memoire.' -cpus '.$cpu.' -password '.$passroot.' && sleep 10 && vzctl start '.$IDVPS;\n $command0='sleep 10 && vzctl exec '.$IDVPS.' echo -e \"auto eth0 \\niface eth0 inet static \\n\\taddress '.$ip.' \\n\\tnetmask 255.255.255.0 \\n\\tgateway 192.168.5.1 \\n\\tbroadcast 192.168.5.255\" > /etc/network/interfaces';\n\n\t//On arr�te le serveur\n\tstop_destroy_vps($IDVPS, $connection);\n\t\n\t//On lance la commande d'install\n $stream = ssh2_exec($connection, $command );\n stream_set_blocking($stream, true);\n\t\n\t//on lance la configuration des ip\n\t $stream0 = ssh2_exec($connection, $command0 );\n \t stream_set_blocking($stream0, true);\n\n\t//R�cup�re le r�sultat\n\t$rep=\"\";\n\twhile($line = fgets($stream)){\n\t\t$rep.=$line;\t\n\t\t$repp.=$line;\n\t}\n\t//Ferme la connection\n\tfclose($stream);\n\tfclose($stream0);\n\n\tif($stream!=false){\n\t\treturn true;\n\t}else{\n\n\n\t$ok=stripos($rep,\"Container start in progress\");\n\t$time=time();\n\t$message = mysql_real_escape_string('Le '.date('d/m/y - H:i:s').' le VPS '.$hostname.' ('.$IDVPS.') est passer en erreur lors de sa réinstallation.\n\t\tVoici le message : '.$rep.'\n\n\t\tCommande : \n\t\t'.$command_stop.'');\n\t$IDVPS = mysql_real_escape_string($IDVPS);\n\t$time = mysql_real_escape_string($time);\n\tmysql_query(\"INSERT INTO `warning` ( `id` , `id_client` , `ip` , `message` , `page` , `time` , `type`, `TYPE_W`)\nVALUES (\nNULL , '\".$IDVPS.\"', 'IP', '\".$message.\"', '', '\".$time.\"', 'W_ERREUR_SETUP_VPS', 'VPS'\n)\");\n\n\t\treturn false;\n\t}\n\t\n}", "public function setEnableNodeAutoprovisioning($var)\n {\n GPBUtil::checkBool($var);\n $this->enable_node_autoprovisioning = $var;\n\n return $this;\n }", "function useUTP($enabled)\n{\n if($enabled == true)\n return generateQuery('--utp');\n else\n return generateQuery('--no-utp');\n}", "function _export_d7_node_pool() {\n $output = array();\n\n $field_method_collections = _node_pool_method_collections();\n $field_names = $field_method_collections['field_name'];\n\n $NodeQuery = new NodeQuery();\n // $pool_nids = $NodeQuery->specifyBundleNid('pool');\n\n $allow_meeting_nids = array(\n 3089,\n 3147,\n 3155,\n 3156,\n 3252,\n 3288,\n 3399,\n 3457,\n 3472,\n 3473,\n 3484,\n 3510,\n 5302,\n 5309,\n 5317,\n 5324,\n 5384,\n 5415,\n 5427,\n 5431,\n 5455,\n 5463,\n 5464,\n 5500,\n 16867,\n 16875,\n 16880,\n 16881,\n 16892,\n 16908,\n 16909,\n 17017,\n 17034,\n 17050,\n 17056,\n 17087,\n 17117,\n 17128,\n 17135,\n 17148,\n 17158,\n 17159,\n 17200,\n 17201,\n 17499,\n 17518,\n 17531,\n 17543,\n 17550,\n 17555,\n 17578,\n 17583,\n 17598,\n 17606,\n 17607,\n 17628,\n 17629,\n 17646,\n 17650,\n 17653,\n 17669,\n 17684,\n 17693,\n 17701,\n 17721,\n 17728,\n 17736,\n 17740,\n 17751,\n 17761,\n 17771,\n 17833,\n 18066,\n 18122,\n 18745,\n 18746,\n 18762,\n 18768,\n 18773,\n 18778,\n 18796,\n 18808,\n 18832,\n 18856,\n 18857,\n 18858,\n 18859,\n 18860,\n 18861,\n 18932,\n 18943,\n 18959,\n 18960,\n 18961,\n 19017,\n 19018,\n 19019,\n 19020,\n 19076,\n 19077,\n 19078,\n 19079,\n 19080,\n 19082,\n 19235,\n 19236,\n 19262,\n 19263,\n 19264,\n 19265,\n 19266,\n 19267,\n 19268,\n 19269,\n 19270,\n 19383,\n 19387,\n 19391,\n 19394,\n 19732,\n 19733,\n 19734,\n 19735,\n 19736,\n 19767,\n 19768,\n 19801,\n 19824,\n 19854,\n 19862,\n 19869,\n 19874,\n 19892,\n 19897,\n 19908,\n 19914,\n 19929,\n 19944,\n 19950,\n 19956,\n 19965,\n 19978,\n 19991,\n 19994,\n 20005,\n 20012,\n 20013,\n 20014,\n 20060,\n 20061,\n 20104,\n 20113,\n 20127,\n 20149,\n 20175,\n 20186,\n 20201,\n 20213,\n 20244,\n 20257,\n 20266,\n 20270,\n 20284,\n 20304,\n 20330,\n 20341,\n 20358,\n 20365,\n 20371,\n 20380,\n 20388,\n 20413,\n 20465,\n 20471,\n 20485,\n 20673,\n 20674,\n 20678,\n 20687,\n 20698,\n 20702,\n 20711,\n 20721,\n 20726,\n 20731,\n 20791,\n 20798,\n 20799,\n 21505,\n 21520,\n 21529,\n 21540,\n 21556,\n 21574,\n 21584,\n 21618,\n 21622,\n 21632,\n 21636,\n 21645,\n 21648,\n 21656,\n 21667,\n 21687,\n 21688,\n 21698,\n 21728,\n 21758,\n 21768,\n 21777,\n 21785,\n 21790,\n 21801,\n 21811,\n 21818,\n 21861,\n 21898,\n 21909,\n 21936,\n 21967,\n 21997,\n 22007,\n 22019,\n 22031,\n 22039,\n 22066,\n 22103,\n 22110,\n 22113,\n 22118,\n 22126,\n 22140,\n 22153,\n 22162,\n 22167,\n 22173,\n 22184,\n 22195,\n 22204,\n 22214,\n 22218,\n 22228,\n 22240,\n 22246,\n 22258,\n 22264,\n 22280,\n 22298,\n 22328,\n 22340,\n 22347,\n 22359,\n 22390,\n 22670,\n 22673,\n 22680,\n 22688,\n 22693,\n 22698,\n 22706,\n 22711,\n 22721,\n 22729,\n 22747,\n 22765,\n 22779,\n 22790,\n 23242,\n 23243,\n 23246,\n 23268,\n 23274,\n 23278,\n 23291,\n 23293,\n 23294,\n 23295,\n 23296,\n 23346,\n 23385,\n 23405,\n 23410,\n 23414,\n 23426,\n 23442,\n 23448,\n 23454,\n 23502,\n 23546,\n 23650,\n 23654,\n 23671,\n 23682,\n 23707,\n 23733,\n 23744,\n 23751,\n 23776,\n 23795,\n 23800,\n 23809,\n 23825,\n 23833,\n 23844,\n 23854,\n 23890,\n 23898,\n 23913,\n 23921,\n 23939,\n 23952,\n 23959,\n 23965,\n 23989,\n 24015,\n 24022,\n 24034,\n 24039,\n 24052,\n 24062,\n 24065,\n 24074,\n 24756,\n 24774,\n 24855,\n 24883,\n 24908,\n 24955,\n 24969,\n 24985,\n 25120,\n 25128,\n 25133,\n 25140,\n 25147,\n 25173,\n 25191,\n 25199,\n 25205,\n 25230,\n 25298,\n 25334,\n 25368,\n 25382,\n 25390,\n 25405,\n 25435,\n 25447,\n 25452,\n 25460,\n 25467,\n 25475,\n 25491,\n 25746,\n 25765,\n 25774,\n 25780,\n 25785,\n 25805,\n 25815,\n 25820,\n 25826,\n 25831,\n 25844,\n 25849,\n 25858,\n 25864,\n 25885,\n 25909,\n 25918,\n 25922,\n 25942,\n 25952,\n 25960,\n 25965,\n 25974,\n 25981,\n 25989,\n 25995,\n 26012,\n 26023,\n 26281,\n 26290,\n 26299,\n 26307,\n 26311,\n 26314,\n 26331,\n 26340,\n 26355,\n 26368,\n 26375,\n 26384,\n 26392,\n 26425,\n 26432,\n 26525,\n 26528,\n 26529,\n 26537,\n 26548,\n 26554,\n 26563,\n 26569,\n 26575,\n 26585,\n 26589,\n 26684,\n 26770,\n 26773,\n 26774,\n 26840,\n 26847,\n 26853,\n 26857,\n 26865,\n 26884,\n 26898,\n 26904,\n 26915,\n 26926,\n 26948,\n 26949,\n 27112,\n 27113,\n 27115,\n 27117,\n 27153,\n 27160,\n 27161,\n 27297,\n 27314,\n 27319,\n 27328,\n 27333,\n 27336,\n 27342,\n 27372,\n 27414,\n 27428,\n 27449,\n 27463,\n 27470,\n 27478,\n 27481,\n 27484,\n 27496,\n 27517,\n 27532,\n 27550,\n 27554,\n 27675,\n 27688,\n 27698,\n 27704,\n 27712,\n 27731,\n 27734,\n 27773,\n 27812,\n 27818,\n 27826,\n 27836,\n 27848,\n 27867,\n 27886,\n 27906,\n 27913,\n 27920,\n 27930,\n 27958,\n 27973,\n 27978,\n 27990,\n 27998,\n 28002,\n 28007,\n 28037,\n 28044,\n 28053,\n 28058,\n 28062,\n 28082,\n 28089,\n 28114,\n 28125,\n 28130,\n 28139,\n 28144,\n 28152,\n 28164,\n 28170,\n 28179,\n 28220,\n 28233,\n 28240,\n 28246,\n 28261,\n 28266,\n 28271,\n 28277,\n 28290,\n 28295,\n 28301,\n 28308,\n 28340,\n 28344,\n 28812,\n 28818,\n 28833,\n 28836,\n 28844,\n 28867,\n 28870,\n 28871,\n 28875,\n 28881,\n 28889,\n 28907,\n 28912,\n 28920,\n 28925,\n 28934,\n 28948,\n 28966,\n 28973,\n 28984,\n 29001,\n 29008,\n 29015,\n 29020,\n 29024,\n 29031,\n 29038,\n 29043,\n 29049,\n 29064,\n 29069,\n 29074,\n 29079,\n 29086,\n 29090,\n 29096,\n 29102,\n 29112,\n 29119,\n 29144,\n 29150,\n 29163,\n 29169,\n 29184,\n 29189,\n 29196,\n 29202,\n 29206,\n 29210,\n 29214,\n 29222,\n 29230,\n 29235,\n 29241,\n 29246,\n 29254,\n 29259,\n 29264,\n 29267,\n 29277,\n 29285,\n 29290,\n 24867,\n 28018,\n );\n\n $allow_pool_nids = $NodeQuery->poolNidsByMeetingNids($allow_meeting_nids);\n\n $pool_nodes = node_load_multiple($allow_pool_nids);\n\n foreach ($pool_nodes as $key => $node) {\n // if ($key > 26) {\n // continue;\n // }\n\n $PoolInfo = new PoolInfo($node->nid);\n\n // if ($node->created < 1489536000) { // (your time zone): 3/14/2017, 8:00:00 PM\n // continue;\n // }\n\n foreach ($field_names as $field_name => $row) {\n // first set pool nid self\n $output[$node->nid]['field_pool_poolnid'] = $node->nid;\n\n $field_value = array();\n $field_info = field_info_field($row['d7_field_name']);\n\n if ($field_info['type'] == 'entityreference') {\n if (isset($node->{$row['d7_field_name']}['und'][0]['target_id'])) {\n // only meeting nid\n $output[$node->nid][$row['d8_field_name']] = $node->{$row['d7_field_name']}['und'][0]['target_id'];\n }\n }\n else { // text field\n if (isset($node->{$row['d7_field_name']}['und'][0]['value'])) {\n $user_uid = NULL;\n $question_key = $node->{$row['d7_field_name']}['und'][0]['value'];\n\n\n $pieces = explode(\"-\", $question_key);\n\n if ($pieces[0] == 8) {\n // dpm('not right question_tid - for this - ' . $question_key . ' on pool - ' . $node->nid);\n }\n\n $question_tid = $pieces[0];\n if ($question_tid > 8000000) {\n $question_tid = 8;\n $user_uid = $pieces[0] - 8000000;\n }\n\n $type_tid = $pieces[1];\n $question_term = \\Drupal\\taxonomy\\Entity\\Term::load($question_tid);\n if (isset($question_term->name)) {\n $output[$node->nid]['field_pool_answer'][$question_key]['field_pool_questionname'] = $question_term->name;\n }\n else {\n // dpm('not found question_tid - for this - ' . $question_key . ' on pool - ' . $node->nid);\n }\n\n // user answer\n if ($user_uid) {\n $user = user_load($user_uid);\n if (isset($user->name)) {\n $output[$node->nid]['field_pool_answer'][$question_key]['field_pool_username'] = $user->name;\n }\n else {\n // dpm('not found user_uid - ' . $user_uid . ' for this - ' . $pieces[0] . ' on pool - ' . $node->nid);\n }\n }\n\n // field type\n $type_term = \\Drupal\\taxonomy\\Entity\\Term::load($type_tid);\n if (isset($type_term->name)) {\n $output[$node->nid]['field_pool_answer'][$question_key]['field_pool_questiontype'] = $type_term->name;\n }\n else {\n // dpm('not found question type tid - for this - ' . $question_key . ' on pool - ' . $node->nid);\n }\n\n // answer\n foreach ($node->{$row['d7_field_name']}['und'] as $key => $value) {\n if ($key > 0) {\n if ($type_term->name == 'selectkey') {\n $selectkey_term = \\Drupal\\taxonomy\\Entity\\Term::load($value['value']);\n if ($selectkey_term) {\n $output[$node->nid]['field_pool_answer'][$question_key]['field_pool_selectkey_tid'][] = $value['value'];\n $output[$node->nid]['field_pool_answer'][$question_key]['answer'][] = $selectkey_term->name;\n }\n else {\n // dpm('not found selectkey value - ' . $value . ' on pool - ' . $node->nid);\n }\n }\n else {\n $output[$node->nid]['field_pool_answer'][$question_key]['answer'][] = $value['value'];\n }\n }\n }\n }\n }\n\n }\n }\n\n $json_data = json_encode($output, JSON_UNESCAPED_UNICODE);\n}", "function addDiskSpaceConfigOptions() {\n try {\n DB::execute('INSERT INTO ' . TABLE_PREFIX . \"config_options (name, module, value) VALUES\n ('disk_space_limit', 'system', 'i:0;'),\n ('disk_space_email_notifications', 'system', 'b:1;'),\n ('disk_space_low_space_threshold', 'system', 's:2:\\\"90\\\";')\");\n } catch(Exception $e) {\n return $e->getMessage();\n } // try\n\n return true;\n }", "public function getModuleServiceProvider()\n {\n return isset($this->config['module']['providers']) ? $this->config['module']['providers'] : [];\n }", "function braincert_get_extra_capabilities() {\n return array('moodle/site:accessallgroups');\n}", "function addRvps()\n {\n $output = new stdClass();\n\n $db = new MySQL(DB_INFO);\n $table = 'ipt_networks';\n $where = 'status=1 AND server_nid='.$_POST['server'];\n $networks = $db->select($table, $where);\n\n $table = 'ipt_servers';\n $where = 'status=1 AND nid='.$_POST['server'];\n $output->res['server'] = $db->selectRow($where, null,$table);\n\n $table = 'fin_plans';\n $output->res['plan'] = $db->selectId($_POST['plan'],'*',$table);\n\n $table = 'fin_plan_limits';\n $where = \"plan_name='\".$output->res['plan']['plan_name'].\"'\";\n $output->res['limits'] = $db->selectRow($where, null,$table);\n\n $table = 'ipt_os';\n $plan_cpu = $output->res['plan']['cpu_core'];\n $plan_ram = $output->res['plan']['ram'];\n $where = 'min_ram<='.$plan_ram.' AND min_cpu<='.$plan_cpu;\n $output->res['os'] = $db->select($table, $where);\n\n $ip = false;\n foreach ($networks as $network) {\n $output->res['network'] = $network;\n $table = 'ipt_ips';\n $where = 'status=1 AND network_id='.$network['id'];\n $order = 'network_id';\n $ip = $db->selectRow($where, $order,$table);\n if ($ip) break;\n }\n $output->res['ip'] = $ip;\n $output->e = ($ip) ? false : true;\n echo json_encode($output);\n }", "function sb_assignment_insert ($node) {\n\n db_query(\"INSERT INTO {eto_assignments}\n (\" . $node->key_field . \", \" . $node->target_field . \")\n VALUES\n (%d, %d)\",\n\t $node->uid, $node->selected_uid);\n\n}", "public function setIps()\n {\n if ($this->module->sandbox) {\n $this->ips = $this->sandboxIps;\n } else {\n $this->ips = $this->productionIps;\n }\n }", "public function create_vps(array $params)\n {\n $params['addvps'] = 1;\n return $this->sendRequest('addvs', $params, [], [], 3000);\n }", "private function registerServiceProvider($module): void\n {\n $serviceProvider = poppy_class($module['slug'], 'ServiceProvider');\n\n if (class_exists($serviceProvider)) {\n $this->app->register($serviceProvider);\n }\n }", "function hello_world_install() {\nadd_option(\"ernaehrungsnews_anzahl\", '3', '', 'yes');\nadd_option(\"ernaehrungsnews_trimmer\", '100', '', 'yes');\nadd_option(\"ernaehrungsnews_kategorieId\", '3', '', 'yes');\n\n\n\n}", "public static function addPrimeToAdminBar() {\n\t\tglobal $wp_admin_bar;\n\n\t\t$args = array(\n\t\t\t'id' => 'true_prime',\n\t\t\t'title' => __('<img src=\"'.self::asset('img/') . self::TA_ICON_URL.'\" style=\"vertical-align:middle;margin-right:5px\" alt=\"Prime\" title=\"Prime\" />Prime' ),\n\t\t\t'href' => get_admin_url() . 'admin.php?page=true',\n\t\t\t'meta' => array( 'class' => 'prime-admin-bar' )\n\t\t);\n\t\t$wp_admin_bar->add_node( $args );\n\t}", "function newVPS()\n {\n $output = new stdClass();\n\n $db = new MySQL(DB_INFO);\n\n $table = 'ipt_networks';\n $where = \"status=1 AND country='\".$_POST['iploc'].\"'\";\n $networks = $db->select($table, $where);\n foreach ((array) $networks as $net) $nets[$net['id']] = $net['id'];\n $output->res['nets'] = implode(\"','\",$nets);\n $table = 'ipt_rvps';\n $where = 'plan_id='.$_POST['plan'].\" AND network_id IN ('\".$output->res['nets'].\"')\".\"AND os_id=\".$_POST['os'];\n $output->res['rvps'] = $db->selectRow($where, null,$table);\n $output->res['plan_r'] = false;\n if (!$output->res['rvps']) {\n\n $table ='fin_plans';\n $output->res['o_plan'] = $db->selectId($_POST['plan'],'*',$table);\n\n $table = 'fin_plan_limits';\n $where = \"plan_name='\".$output->res['o_plan']['plan_name'].\"'\";\n $output->res['o_limits'] = $db->selectRow($where, null,$table);\n\n\n $table = 'ipt_rvps';\n $where = \"network_id IN ('\" . $output->res['nets'] . \"')\" . \"AND os_id=\" . $_POST['os'];\n $output->res['rvps'] = $db->selectRow($where, null, $table);\n $output->res['plan_r'] = true;\n }\n $output->e = ($output->res['rvps']) ? false : true;\n if ($output->res['rvps']) {\n\n $output->res['rvps']['status_text'] = [\n 0 => 'VM Created',\n 1 => 'OS Installed',\n 2 => 'Network Connected',\n 3 => 'Ezzz Done',\n 4 => 'Ready VPS'\n ];\n\n $output->res['rvps']['status_color'] = [\n 0 => 'light text-dark',\n 1 => 'warning text-dark',\n 2 => 'info text-light',\n 3 => 'primary text-light',\n 4 => 'success text-light'\n ];\n\n $table = 'ipt_servers';\n $where = 'status=1 AND nid='.$output->res['rvps']['server_nid'];\n $output->res['rvps']['server'] = $db->selectRow($where, null,$table);\n\n $table ='ipt_networks';\n $output->res['rvps']['network'] = $db->selectId($output->res['rvps']['network_id'],'*',$table);\n\n $table ='ipt_ips';\n $output->res['rvps']['ip'] = $db->selectId($output->res['rvps']['ip_id'],'*',$table);\n\n $table ='ipt_os';\n $output->res['rvps']['os'] = $db->selectId($output->res['rvps']['os_id'],'*',$table);\n\n $table ='fin_plans';\n $output->res['rvps']['plan'] = $db->selectId($output->res['rvps']['plan_id'],'*',$table);\n\n $table = 'fin_plan_limits';\n $where = \"plan_name='\".$output->res['rvps']['plan']['plan_name'].\"'\";\n $output->res['rvps']['limits'] = $db->selectRow($where, null,$table);\n }\n echo json_encode($output);\n }", "public function isAliasPMEnabled()\n {\n return Mage::getModel('ops/config')->isAliasManagerEnabled($this->getMethodCode());\n }", "public function isAliasPMEnabled()\n {\n return Mage::getModel('ops/config')->isAliasManagerEnabled($this->getMethodCode());\n }", "function _dataone_admin_replicate_options() {\n $options = &drupal_static(__FUNCTION__);\n if (empty($options)) {\n $options = array(\n // Disallow 'true' becuase we are only implementing Tier 1.\n // Tier 1 does not replicate.\n // DATAONE_API_TRUE_STRING => t('This node can replicate objects for other Member Nodes.'),\n DATAONE_API_FALSE_STRING => t('This node should NOT replicate objects for other Member Nodes.'),\n );\n }\n\n return $options;\n}", "public function addnode($node, $opts = 'add'){\n return $this->bitcoin->addnode($node, $opts);\n }", "public function addAction() {\n\t\tlist(, $groups) = Resource_Service_Pgroup::getAllPgroup();\n\t\t$this->assign('groups', $groups);\n\t\t$this->assign('ntype', $this->ntype);\n\t\t$this->assign('btype', $this->btype);\n\t}", "function nodepicker_nodepicker_plugin() {\n if(module_exists('jquery_ui')){ jquery_ui_add('ui.dialog'); };\n drupal_add_css(drupal_get_path('module', 'nodepicker') . \"/plugins/nodepicker/dialog.css\");\n \n\t$plugins['nodepicker'] = array(\n 'title' => t('Node picker'),\n 'vendor url' => 'http://drupal.org/project/nodepicker',\n 'icon file' => 'nodepicker.png',\n 'icon title' => t('Insert links to internal content'),\n 'settings' => array(),\n );\n return $plugins;\n}", "function plugin_autoinstall_nexcontent($pi_name)\r\n{\r\n global $CONF_SE,$_CONF;\r\n @require ($_CONF['path'] . 'plugins/nexcontent/nexcontent.php');\r\n\r\n $pi_name = $CONF_SE['pi_name'];\r\n $pi_display_name = $CONF_SE['pi_display_name'];\r\n $pi_admin = $pi_display_name . ' Admin';\r\n\r\n $info = array(\r\n 'pi_name' => $pi_name,\r\n 'pi_display_name' => $pi_display_name,\r\n 'pi_version' => $CONF_SE['version'],\r\n 'pi_gl_version' => $CONF_SE['gl_version'],\r\n 'pi_homepage' => 'http://www.nextide.ca/'\r\n );\r\n\r\n $groups = array(\r\n $pi_admin => 'Has full access to ' . $pi_display_name . ' features'\r\n );\r\n\r\n $features = array(\r\n $pi_name . '.edit' => 'Plugin Admin',\r\n $pi_name . '.user' => 'Plugin User'\r\n );\r\n\r\n $mappings = array(\r\n $pi_name . '.edit' => array($pi_admin),\r\n $pi_name . '.user' => array($pi_admin),\r\n );\r\n\r\n $tables = array(\r\n 'nxcontent',\r\n 'nxcontent_pages',\r\n 'nxcontent_images'\r\n );\r\n\r\n $inst_parms = array(\r\n 'info' => $info,\r\n 'groups' => $groups,\r\n 'features' => $features,\r\n 'mappings' => $mappings,\r\n 'tables' => $tables\r\n );\r\n\r\n return $inst_parms;\r\n}", "function add_capability( $capabilities ) {\n\n $capabilities[ self::$capability ] = __( 'Manage Admin Tools', 'wpp' );\n\n return $capabilities;\n }", "function mmpm_register_theme_options() {\n\t\tregister_setting( 'mmpm_options_group', MMPM_OPTIONS_DB_NAME );\n//\t\tregister_setting( 'mmpm_options_group', MMPM_SKIN_DB_NAME );\n\t}", "function page_manager_node_view_get_arguments($task, $subtask_id) {\n return array(\n array(\n 'keyword' => 'node',\n 'identifier' => t('Node being viewed'),\n 'id' => 1,\n 'name' => 'entity_id:node',\n 'settings' => array(),\n ),\n );\n}", "function add_new_node($remote, $local)\n{\n\t$pin=trim(file_get_contents(\"../.mypauth\"));\n\t$ch = curl_init($remote.\"/myp/index.php?process=beanode&pin=\".$pin.\"&remote=\".$local);\n\tcurl_setopt($ch, CURLOPT_HEADER, 0);\n\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\t$result = curl_exec($ch);\n\tcurl_close($ch);\n\t$newnode=trim($result);\n\t\n\tif($newnode!=\"\")\n\t{\n\t\t$conf=json_decode(file_get_contents(\"../.mypconfig\"));\t \n\t\tforeach($conf as $c)\n\t\t{\n\t\t\t$nodes[]=$c;\n\t\t}\n\t\t$nodes[]=$newnode;\n\t\t\t\t\n\t\tfile_put_contents(\"../.mypconfig\", json_encode($nodes));\n\t\t\n\t\t//requesting other nodes to add this new node\n\t\tforeach($nodes as $node)\n\t\t{\n\t\t\tif(($node!=$local) && ($node!=$newnode)) new_node_add_req($node, $newnode);\n\t\t}\t\t\n\t}\n}", "function add_wporphanageex_options_page() {\n\n\tadd_options_page( __( 'WP Orphanage Extended', WPOEX_TD ), __( 'WP Orphanage Extended', WPOEX_TD ), 'administrator', 'wp-orphanage-extended', 'wporphanageex_menu_settings' );\n}", "protected function createServiceProvider()\n {\n $moduleServiceProviderPath = $this->path(\"Providers/ModuleServiceProvider.php\");\n $content = File::get($moduleServiceProviderPath);\n\n $types = $this->option('type');\n\n if ($types == 'all') {\n $types = 'admin,site';\n }\n $types = explode(',', $types);\n\n $stringTypes = json_encode($types);\n\n // replace Route list\n $content = str_ireplace(\"ROUTES_LIST\", $stringTypes, $content);\n\n // replace module name\n $content = str_ireplace(\"ModuleName\", $this->moduleName, $content);\n $content = str_ireplace(\"ClassName\", Str::singular($this->moduleName), $content);\n $serviceProviderName = Str::singular($this->moduleName) .'ServiceProvider';\n $serviceProviderDirectory = $this->modulePath(\"Providers\");\n\n $this->checkDirectory($serviceProviderDirectory);\n $this->createFile(\"$serviceProviderDirectory/{$serviceProviderName}.php\", $content, 'ServiceProvider');\n $this->updateServiceProviderConfig();\n }", "public function input_actionNodeMomentCreate()\n {\n return [\n [\n [\n 'cpu_usage' => \"Processes: CPU: % used - top 5 active\n 1: cpu: 5.0% command: -bash pid: 31028\n 2: cpu: 0.2% command: systemd pid: 1\n 3: cpu: 0.0% command: sshd: pid: 31027\n 4: cpu: 0.0% daemon: ~kworker/1:3~ pid: 30970\n 5: cpu: 0.0% daemon: ~sd-pam~ pid: 30968\",\n 'memory_usage' => \"Processes: Memory: MB / % used - Used/Total: 277.2/992.3MB - top 5 active\n 1: mem: 108.62MB (10.9%) command: mysqld pid: 7816\n 2: mem: 25.50MB (2.5%) command: apache2 pid: 16994\n 3: mem: 15.55MB (1.5%) command: apache2 pid: 17000\n 4: mem: 14.93MB (1.5%) command: apache2 pid: 16998\n 5: mem: 9.05MB (0.9%) command: apache2 pid: 16997\",\n 'hard_disk_usage' => \"Partition: ID-1: / size: 9.7G used: 1.9G (20%) fs: ext4 dev: /dev/sda1\n ID-2: /vagrant size: 932G used: 586G (63%) fs: vboxsf dev: N/A\n ID-3: /home/vagrant/sql size: 932G used: 586G (63%) fs: vboxsf dev: N/A\n ID-4: /home/vagrant/install size: 932G used: 586G (63%) fs: vboxsf dev: N/A\n ID-5: /var/www/task_api/src size: 932G used: 586G (63%) fs: vboxsf dev: N/A\n ID-6: /var/www/task_api/build size: 932G used: 586G (63%) fs: vboxsf dev: N/A\",\n 'temperature' => \"Sensors: None detected - is lm-sensors installed and configured?\",\n 'weather' => \"Weather: Conditions: 88 F (31 C) - Mostly Cloudy Time: August 17, 6:11 PM EDT\",\n ]\n ],\n ];\n }", "public function personnelShortcode($atts, $content = null) {\r\n\t\textract(shortcode_atts(array(\r\n\t\t\t'search'\t=> 'false',\r\n 'view' \t\t=> 'list-all',\r\n 'groupid'\t=> '0'\r\n ), $atts));\r\n\t\t\r\n\t\tswitch($view) {\r\n\t\t\tcase 'list-all':\r\n\t\t\t\treturn $this->listAllShortcode($atts);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'profile':\r\n\t\t\t\t$employee = new ofaEmployees();\r\n\t\t\t\treturn $this->buildProfilePage($employee, 0, ofaGet::get('ref'));\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}", "function phptemplate_preprocess_node(&$vars) {\r\n $node_classes = array();\r\n $node_classes[] = $vars['zebra']; // Node is odd or even\r\n $node_classes[] = (!$vars['node']->status) ? 'node-unpublished' : ''; // Node is unpublished\r\n $node_classes[] = ($vars['sticky']) ? 'sticky' : ''; // Node is sticky\r\n $node_classes[] = (isset($vars['node']->teaser)) ? 'teaser' : 'full-node'; // Node is teaser or full-node\r\n $node_classes[] = 'node-type-'. $vars['node']->type; // Node is type-x, e.g., node-type-page\r\n $node_classes = array_filter($node_classes); // Remove empty elements\r\n $vars['node_classes'] = implode(' ', $node_classes); // Implode class list with spaces\r\n \r\n // Add node_bottom region content\r\n $vars['node_bottom'] = theme('blocks', 'node_bottom');\r\n\r\n // Node Theme Settings\r\n \r\n // Date & author\r\n if (!module_exists('submitted_by')) {\r\n $date = t('Posted ') . format_date($vars['node']->created, 'medium'); // Format date as small, medium, or large\r\n $author = theme('username', $vars['node']);\r\n $author_only_separator = t('Posted by ');\r\n $author_date_separator = t(' by ');\r\n $submitted_by_content_type = (theme_get_setting('submitted_by_enable_content_type') == 1) ? $vars['node']->type : 'default';\r\n $date_setting = (theme_get_setting('submitted_by_date_'. $submitted_by_content_type) == 1);\r\n $author_setting = (theme_get_setting('submitted_by_author_'. $submitted_by_content_type) == 1);\r\n $author_separator = ($date_setting) ? $author_date_separator : $author_only_separator;\r\n $date_author = ($date_setting) ? $date : '';\r\n $date_author .= ($author_setting) ? $author_separator . $author : '';\r\n $vars['submitted'] = $date_author;\r\n }\r\n\r\n // Taxonomy\r\n $taxonomy_content_type = (theme_get_setting('taxonomy_enable_content_type') == 1) ? $vars['node']->type : 'default';\r\n $taxonomy_display = theme_get_setting('taxonomy_display_'. $taxonomy_content_type);\r\n $taxonomy_format = theme_get_setting('taxonomy_format_'. $taxonomy_content_type);\r\n if ((module_exists('taxonomy')) && ($taxonomy_display == 'all' || ($taxonomy_display == 'only' && $vars['page']))) {\r\n $vocabularies = taxonomy_get_vocabularies($vars['node']->type);\r\n $output = '';\r\n $term_delimiter = ', ';\r\n foreach ($vocabularies as $vocabulary) {\r\n if (theme_get_setting('taxonomy_vocab_hide_'. $taxonomy_content_type .'_'. $vocabulary->vid) != 1) {\r\n $terms = taxonomy_node_get_terms_by_vocabulary($vars['node'], $vocabulary->vid);\r\n if ($terms) {\r\n $term_items = '';\r\n foreach ($terms as $term) { // Build vocabulary term items\r\n $term_link = l($term->name, taxonomy_term_path($term), array('attributes' => array('rel' => 'tag', 'title' => strip_tags($term->description))));\r\n $term_items .= '<li class=\"vocab-term\">'. $term_link . $term_delimiter .'</li>';\r\n }\r\n if ($taxonomy_format == 'vocab') { // Add vocabulary labels if separate\r\n $output .= '<li class=\"vocab vocab-'. $vocabulary->vid .'\"><span class=\"vocab-name\">'. $vocabulary->name .':</span> <ul class=\"vocab-list\">';\r\n $output .= substr_replace($term_items, '</li>', -(strlen($term_delimiter) + 5)) .'</ul></li>';\r\n }\r\n else {\r\n $output .= $term_items;\r\n }\r\n }\r\n }\r\n }\r\n if ($output != '') {\r\n $output = ($taxonomy_format == 'list') ? substr_replace($output, '</li>', -(strlen($term_delimiter) + 5)) : $output;\r\n $output = '<ul class=\"taxonomy\">'. $output .'</ul>';\r\n }\r\n $vars['terms'] = $output;\r\n }\r\n else {\r\n $vars['terms'] = '';\r\n }\r\n \r\n // Node Links\r\n if (isset($vars['node']->links['node_read_more'])) {\r\n $node_content_type = (theme_get_setting('readmore_enable_content_type') == 1) ? $vars['node']->type : 'default';\r\n $vars['node']->links['node_read_more'] = array(\r\n 'title' => _themesettings_link(\r\n theme_get_setting('readmore_prefix_'. $node_content_type),\r\n theme_get_setting('readmore_suffix_'. $node_content_type),\r\n t(theme_get_setting('readmore_'. $node_content_type)),\r\n 'node/'. $vars['node']->nid,\r\n array(\r\n 'attributes' => array('title' => t(theme_get_setting('readmore_title_'. $node_content_type))), \r\n 'query' => NULL, 'fragment' => NULL, 'absolute' => FALSE, 'html' => TRUE\r\n )\r\n ),\r\n 'attributes' => array('class' => 'readmore-item'),\r\n 'html' => TRUE,\r\n );\r\n }\r\n if (isset($vars['node']->links['comment_add'])) {\r\n $node_content_type = (theme_get_setting('comment_enable_content_type') == 1) ? $vars['node']->type : 'default';\r\n if ($vars['teaser']) {\r\n $vars['node']->links['comment_add'] = array(\r\n 'title' => _themesettings_link(\r\n theme_get_setting('comment_add_prefix_'. $node_content_type),\r\n theme_get_setting('comment_add_suffix_'. $node_content_type),\r\n t(theme_get_setting('comment_add_'. $node_content_type)),\r\n \"comment/reply/\".$vars['node']->nid,\r\n array(\r\n 'attributes' => array('title' => t(theme_get_setting('comment_add_title_'. $node_content_type))), \r\n 'query' => NULL, 'fragment' => 'comment-form', 'absolute' => FALSE, 'html' => TRUE\r\n )\r\n ),\r\n 'attributes' => array('class' => 'comment-add-item'),\r\n 'html' => TRUE,\r\n );\r\n }\r\n else {\r\n $vars['node']->links['comment_add'] = array(\r\n 'title' => _themesettings_link(\r\n theme_get_setting('comment_node_prefix_'. $node_content_type),\r\n theme_get_setting('comment_node_suffix_'. $node_content_type),\r\n t(theme_get_setting('comment_node_'. $node_content_type)),\r\n \"comment/reply/\".$vars['node']->nid,\r\n array(\r\n 'attributes' => array('title' => t(theme_get_setting('comment_node_title_'. $node_content_type))), \r\n 'query' => NULL, 'fragment' => 'comment-form', 'absolute' => FALSE, 'html' => TRUE\r\n )\r\n ),\r\n 'attributes' => array('class' => 'comment-node-item'),\r\n 'html' => TRUE,\r\n );\r\n }\r\n }\r\n if (isset($vars['node']->links['comment_new_comments'])) {\r\n $node_content_type = (theme_get_setting('comment_enable_content_type') == 1) ? $vars['node']->type : 'default';\r\n $vars['node']->links['comment_new_comments'] = array(\r\n 'title' => _themesettings_link(\r\n theme_get_setting('comment_new_prefix_'. $node_content_type),\r\n theme_get_setting('comment_new_suffix_'. $node_content_type),\r\n format_plural(\r\n comment_num_new($vars['node']->nid),\r\n t(theme_get_setting('comment_new_singular_'. $node_content_type)),\r\n t(theme_get_setting('comment_new_plural_'. $node_content_type))\r\n ),\r\n \"node/\".$vars['node']->nid,\r\n array(\r\n 'attributes' => array('title' => t(theme_get_setting('comment_new_title_'. $node_content_type))), \r\n 'query' => NULL, 'fragment' => 'new', 'absolute' => FALSE, 'html' => TRUE\r\n )\r\n ),\r\n 'attributes' => array('class' => 'comment-new-item'),\r\n 'html' => TRUE,\r\n );\r\n }\r\n if (isset($vars['node']->links['comment_comments'])) {\r\n $node_content_type = (theme_get_setting('comment_enable_content_type') == 1) ? $vars['node']->type : 'default';\r\n $vars['node']->links['comment_comments'] = array(\r\n 'title' => _themesettings_link(\r\n theme_get_setting('comment_prefix_'. $node_content_type),\r\n theme_get_setting('comment_suffix_'. $node_content_type),\r\n format_plural(\r\n comment_num_all($vars['node']->nid),\r\n t(theme_get_setting('comment_singular_'. $node_content_type)),\r\n t(theme_get_setting('comment_plural_'. $node_content_type))\r\n ),\r\n \"node/\".$vars['node']->nid,\r\n array(\r\n 'attributes' => array('title' => t(theme_get_setting('comment_title_'. $node_content_type))), \r\n 'query' => NULL, 'fragment' => 'comments', 'absolute' => FALSE, 'html' => TRUE\r\n )\r\n ),\r\n 'attributes' => array('class' => 'comment-item'),\r\n 'html' => TRUE,\r\n );\r\n }\r\n $vars['links'] = theme('links', $vars['node']->links, array('class' => 'links inline')); \r\n}", "function page_manager_node_view_menu_alter(&$items, $task) {\n if (variable_get('page_manager_node_view_disabled', TRUE)) {\n return;\n }\n\n // Override the node view handler for our purpose.\n $callback = $items['node/%node']['page callback'];\n if ($callback == 'node_page_view' || variable_get('page_manager_override_anyway', FALSE)) {\n $items['node/%node']['page callback'] = 'page_manager_node_view_page';\n $items['node/%node']['file path'] = $task['path'];\n $items['node/%node']['file'] = $task['file'];\n }\n else {\n // automatically disable this task if it cannot be enabled.\n variable_set('page_manager_node_view_disabled', TRUE);\n if (!empty($GLOBALS['page_manager_enabling_node_view'])) {\n drupal_set_message(t('Page manager module is unable to enable node/%node because some other module already has overridden with %callback.', array('%callback' => $callback)), 'error');\n }\n }\n\n // @todo override node revision handler as well?\n}", "function tab_get_extra_capabilities() {\n return array('moodle/site:accessallgroups');\n}", "function set_gtpressMenu_options() {\r\n\tadd_option('gtpressMenu_default_menu');\r\n\tadd_option('gtpressMenu_default_submenu');\r\n\tadd_option('gtpressMenu_disabled_menu_items');\r\n\tadd_option('gtpressMenu_disabled_submenu_items');\r\n\tadd_option('gtpressMenu_disabled_metas');\r\n\tadd_option('gtpressMenu_admins_see_everything');\r\n\r\n\tupdate_option('gtpressMenu_disabled_menu_items', array());\r\n\tupdate_option('gtpressMenu_disabled_submenu_items', array());\r\n\tupdate_option('gtpressMenu_disabled_metas', array());\r\n\tupdate_option('gtpressMenu_admins_see_everything', false);\r\n}", "function progressive_sub_preprocess_node(&$variables) {\n $matches = \"node/320\";\n $path = drupal_get_path_alias($_GET['q']);\n $page_match = drupal_match_path($path, $matches);\n\n if ($variables['nid'] == '320' || $variables['nid'] == '321' || $variables['nid'] == '322' || $variables['nid'] == '329' || $variables['nid'] == '330' || $variables['nid'] == '331') {\n drupal_add_js(drupal_get_path('theme', 'progressive_sub') . '/js/wedding.js');\n }\n}", "function register_mysettings() { // whitelist options\r\n register_setting( 'myoption-group', 'new_option_name' );\r\n register_setting( 'myoption-group', 'some_other_option' );\r\n register_setting( 'myoption-group', 'option_etc' );\r\n}", "public static function assign_capabilities() {\n global $wp_roles;\n if (!isset($wp_roles)) {\n $wp_roles = new WP_Roles();\n }\n\n $all_roles = $wp_roles->roles;\n foreach ($all_roles as $role_name => $role_info) {\n $role = get_role($role_name);\n\n if (is_multisite()) {\n // Multisite, only super admin should be able to disable security checks\n self::map_capability($role, $role_info, array('install_plugins', 'manage_network_plugins'), 'disable_h5p_security');\n }\n else {\n // Not multisite, regular admin can disable security checks\n self::map_capability($role, $role_info, 'install_plugins', 'disable_h5p_security');\n }\n self::map_capability($role, $role_info, 'manage_options', 'manage_h5p_libraries');\n self::map_capability($role, $role_info, 'edit_others_pages', 'install_recommended_h5p_libraries');\n self::map_capability($role, $role_info, 'edit_others_pages', 'edit_others_h5p_contents');\n self::map_capability($role, $role_info, 'edit_posts', 'edit_h5p_contents');\n self::map_capability($role, $role_info, 'read', 'view_others_h5p_contents');\n self::map_capability($role, $role_info, 'read', 'view_h5p_contents');\n self::map_capability($role, $role_info, 'read', 'view_h5p_results');\n }\n\n // Keep track on how the capabilities are assigned (multisite caps or not)\n update_option('h5p_multisite_capabilities', is_multisite() ? 1 : 0);\n }", "protected function addProductParameterNode()\n {\n $builder = new TreeBuilder();\n $node = $builder->root('product');\n\n $node\n ->treatTrueLike(array('entity' => null, 'form' => array('type' => \"ASF\\ProductBundle\\Form\\Type\\ProductType\")))\n ->treatFalseLike(array('entity' => null, 'form' => array('type' => \"ASF\\ProductBundle\\Form\\Type\\ProductType\")))\n ->addDefaultsIfNotSet()\n ->children()\n ->scalarNode('entity')\n ->defaultNull()\n ->end()\n ->arrayNode('form')\n ->addDefaultsIfNotSet()\n ->children()\n ->scalarNode('type')\n ->defaultValue('ASF\\ProductBundle\\Form\\Type\\ProductType')\n ->end()\n ->scalarNode('name')\n ->defaultValue('product_type')\n ->end()\n ->arrayNode('validation_groups')\n ->prototype('scalar')->end()\n ->defaultValue(array('Default'))\n ->end()\n ->end()\n ->end()\n ->end()\n ;\n\n return $node;\n }", "public function prepareTreeNode(array $node = array()) {\n $this->xpdo->lexicon->load('articles:default');\n $menu = array();\n $idNote = $this->xpdo->hasPermission('tree_show_resource_ids') ? ' <span dir=\"ltr\">('.$this->id.')</span>' : '';\n // Template ID should 1st default to the container settings for articleTemplate,\n // then to system settings for articles.default_article_template.\n // getContainerSettings() is not in scope here.\n\t\t\n\t\t// System Default\n\t\t$template_id = $this->getOption('articles.default_article_template'); \n\t\t// Attempt to override for this container\n\t\t$container = $this->xpdo->getObject('modResource', $this->id); \n\t\tif ($container) {\n\t\t\t$props = $container->get('properties');\n\t\t\tif ($props) {\n\t\t\t\tif (isset($props['articles']['articleTemplate']) && !empty($props['articles']['articleTemplate'])) {\n\t\t\t\t\t$template_id = $props['articles']['articleTemplate'];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n $menu[] = array(\n 'text' => '<b>'.$this->get('pagetitle').'</b>'.$idNote,\n 'handler' => 'Ext.emptyFn',\n );\n $menu[] = '-';\n $menu[] = array(\n 'text' => $this->xpdo->lexicon('articles.articles_manage'),\n 'handler' => 'this.editResource',\n );\n $menu[] = array(\n 'text' => $this->xpdo->lexicon('articles.articles_write_new'),\n 'handler' => \"function(itm,e) { \n\t\t\t\tvar at = this.cm.activeNode.attributes;\n\t\t var p = itm.usePk ? itm.usePk : at.pk;\n\t\n\t Ext.getCmp('modx-resource-tree').loadAction(\n\t 'a='+MODx.action['resource/create']\n\t + '&class_key='+itm.classKey\n\t + '&parent='+p\n\t + '&template=\".$template_id.\"'\n\t + (at.ctx ? '&context_key='+at.ctx : '')\n );\n \t}\",\n );\n $menu[] = array(\n 'text' => $this->xpdo->lexicon('articles.container_duplicate'),\n 'handler' => 'function(itm,e) { itm.classKey = \"ArticlesContainer\"; this.duplicateResource(itm,e); }',\n );\n $menu[] = '-';\n if ($this->get('published')) {\n $menu[] = array(\n 'text' => $this->xpdo->lexicon('articles.container_unpublish'),\n 'handler' => 'this.unpublishDocument',\n );\n } else {\n $menu[] = array(\n 'text' => $this->xpdo->lexicon('articles.container_publish'),\n 'handler' => 'this.publishDocument',\n );\n }\n if ($this->get('deleted')) {\n $menu[] = array(\n 'text' => $this->xpdo->lexicon('articles.container_undelete'),\n 'handler' => 'this.undeleteDocument',\n );\n } else {\n $menu[] = array(\n 'text' => $this->xpdo->lexicon('articles.container_delete'),\n 'handler' => 'this.deleteDocument',\n );\n }\n $menu[] = '-';\n $menu[] = array(\n 'text' => $this->xpdo->lexicon('articles.articles_view'),\n 'handler' => 'this.preview',\n );\n\n $node['menu'] = array('items' => $menu);\n $node['hasChildren'] = true;\n return $node;\n }", "function top10_install() {\r\n/* Creates new database field */\r\n//add_option('omekafeedpull_omekaroot', '/omeka', '', 'yes');\r\n}", "function vm_used_by_myOrg(){\n $reply = array('nordita');\n return $reply;\n}", "function devshop_projects_preprocess_node_task(&$vars) {\n global $user;\n $node = $vars['node'];\n\n if ($node->task_status == HOSTING_TASK_QUEUED || $node->task_status == HOSTING_TASK_PROCESSING) {\n $vars['cancel_button'] = l(t('Cancel'), \"hosting/tasks/{$node->nid}/cancel\", array(\n 'attributes' => array('class' => array('btn btn-default')),\n 'query' => array(\n 'token' => drupal_get_token($user->uid),\n ),\n ));\n }\n\n $vars['retry']['#attributes']['class'][] = 'retry btn btn-default';\n $vars['retry']['#prefix'] = '';\n $vars['retry']['#suffix'] = '';\n}", "public static function es_admin_option() {\n\t}", "public function deploymentModeOptions()\n {\n return array(\n 'production' => 'production',\n 'test' => 'test'\n );\n }", "function gumlet_plugin_activate()\n{\n if (!get_option('gumlet_settings')) {\n update_option('gumlet_settings', [\"lazy_load\" => 1, \"original_images\" => 1, \"auto_compress\"=> 1, \"server_webp\"=> 0]);\n }\n}", "protected function addPointSection(ArrayNodeDefinition $node)\n {\n $node\n ->children()\n ->arrayNode('point')->addDefaultsIfNotSet()\n ->children()\n ->scalarNode('class')->end()\n ->scalarNode('helper_class')->end()\n ->scalarNode('prefix_javascript_variable')->end()\n ->scalarNode('x')->end()\n ->scalarNode('y')->end()\n ->end()\n ->end()\n ->end();\n }", "protected function addSpeakingURLParameterNode()\n {\n $builder = new TreeBuilder();\n $node = $builder->root('speakingurl');\n\n $node\n ->treatTrueLike(array('path' => '%kernel.root_dir%/../vendor/pid/speakingurl/speakingurl.min.js'))\n ->treatFalseLike(array('path' => false))\n ->treatNullLike(array('path' => false))\n ->children()\n ->scalarNode('path')\n ->cannotBeEmpty()\n ->defaultValue('%kernel.root_dir%/../vendor/pid/speakingurl/speakingurl.min.js')\n ->end()\n ->end()\n ;\n\n return $node;\n }", "public function get_node() {\n return \\Drupal::routeMatch()->getParameter('node');\n }", "function austeve_gallery_admin_add_page() {\n add_options_page('AUSteve Gallery settings', 'AUSteve Gallery settings', 'manage_options', 'austeve_image_gallery', 'austeve_image_gallery_options_page');\n}", "function generateConfig($nodes, $enable_rpc = true) {\n $output[] = \"<NodeConfig>\";\n $output[] = \" <BrunetNamespace>\".$this->pool->namespace.\"</BrunetNamespace>\";\n $output[] = \" <RemoteTAs>\";\n if($this->pool->tcpport) {\n foreach($nodes as $node) {\n $output[] = \" <Transport>brunet.tcp://\".$node.\":\".$this->pool->tcpport.\"</Transport>\";\n }\n }\n if($this->pool->udpport) {\n foreach($nodes as $node) {\n $output[] = \" <Transport>brunet.udp://\".$node.\":\".$this->pool->udpport.\"</Transport>\";\n }\n }\n $output[] = \" </RemoteTAs>\";\n $output[] = \" <EdgeListeners>\";\n if($this->pool->udpport) {\n $output[] = \" <EdgeListener type=\\\"udp\\\">\";\n $output[] = \" <port>\".$this->pool->udpport.\"</port>\";\n $output[] = \" </EdgeListener>\";\n }\n if($this->pool->tcpport) {\n $output[] = \" <EdgeListener type=\\\"tcp\\\">\";\n $output[] = \" <port>\".$this->pool->tcpport.\"</port>\";\n $output[] = \" </EdgeListener>\";\n }\n $output[] = \" </EdgeListeners>\";\n if($enable_rpc) {\n $output[] = \" <XmlRpcManager>\";\n $output[] = \" <Enabled>true</Enabled>\";\n $output[] = \" <Port>\".$this->pool->rpcport.\"</Port>\";\n $output[] = \" </XmlRpcManager>\";\n }\n\n $output[] = \" <NCService>\";\n $output[] = \" <Enabled>true</Enabled>\";\n $output[] = \" <OptimizeShortcuts>true</OptimizeShortcuts>\";\n $output[] = \" <Checkpointing>true</Checkpointing>\";\n $output[] = \" </NCService>\";\n\n $output[] = \"</NodeConfig>\";\n return implode(\"\\n\", $output);\n }", "protected function addConfigParameterParameterNode()\n {\n \t$builder = new TreeBuilder();\n \t$node = $builder->root('parameter');\n \n \t$node\n\t \t->treatTrueLike(array('form' => array(\n\t \t\t'type' => \"ASF\\WebsiteBundle\\Form\\Type\\ParameterType\",\n\t \t\t'name' => 'website_parameter_type'\n\t \t)))\n\t \t->treatFalseLike(array('form' => array(\n\t \t\t'type' => \"ASF\\WebsiteBundle\\Form\\Type\\ParameterType\",\n\t \t\t'name' => 'website_parameter_type'\n\t \t)))\n\t \t->addDefaultsIfNotSet()\n\t \t->children()\n\t\t \t->arrayNode('form')\n\t\t \t->addDefaultsIfNotSet()\n\t\t \t->children()\n\t\t\t \t->scalarNode('type')\n\t\t\t \t\t->defaultValue('ASF\\WebsiteBundle\\Form\\Type\\ParameterType')\n\t\t\t \t->end()\n\t\t\t \t->scalarNode('name')\n\t\t\t \t\t->defaultValue('website_parameter_type')\n\t\t\t \t->end()\n\t\t\t \t->arrayNode('validation_groups')\n\t\t\t \t\t->prototype('scalar')->end()\n\t\t\t \t\t->defaultValue(array(\"Default\"))\n\t\t\t \t->end()\n\t\t\t \t->end()\n\t\t \t->end()\n\t \t->end()\n \t;\n \n \treturn $node;\n }", "public function addConfiguration(NodeDefinition $node)\n {\n }", "function opslert_plugin_settings(){\n return array( \n 'ops_alert_server' => array('friendly_name' => 'Ops Alert Server', \n 'default' => 'alerts.cheggnet.com',\n 'type' => 'string'),\n 'ops_alert_server_offset' => array('friendly_name' => 'Alert Offset',\n 'default' => 1000000, \n 'type' => 'integer')\n \n );\n}", "protected function getPackageProviders($app)\n\t\t\t{\n\t\treturn ['ShawnSandy\\Jarvis\\JarvisThemesProvider'];\n\t}", "static function enable_role_settings() {\r\n\t\t\t$settings = WPPostsRateKeys_Settings::get_options();\r\n\t\t\t\r\n\t\t\tif ($settings['enable_role_settings']=='0') {\r\n\t\t\t\treturn FALSE;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\treturn TRUE;\r\n\t\t\t}\r\n\t\t}", "function jeherve_add_cpt_sitemaps( $post_types )\n{\n $post_types[] = 'pressreleases';\n return $post_types;\n}", "public function install_module_register()\n {\n $this->EE->db->insert('modules', array(\n 'has_cp_backend' => 'y',\n 'has_publish_fields' => 'n',\n 'module_name' => ucfirst($this->get_package_name()),\n 'module_version' => $this->get_package_version()\n ));\n }", "function newConfigOptions() {\n $insert = $this->utility->db->execute(\"INSERT INTO \" . TABLE_PREFIX . \"config_options (name, module, type, value) VALUES \n ('last_frequently_activity', 'system', 'system', 'N;'),\n ('last_hourly_activity', 'system', 'system', 'N;'),\n ('last_daily_activity', 'system', 'system', 'N;')\n \");\n \t\n \t if(is_error($insert)) {\n \t return $insert->getMessage();\n \t } // if\n \t\n \treturn true;\n }", "function dragdrop_get_extra_capabilities() {\n return array(\n 'moodle/site:accessallgroups',\n );\n}", "function fiorello_mikado_set_blog_masonry_gallery_type_global_option( $options ) {\n\t\t$options['masonry-gallery'] = esc_html__( 'Blog: Masonry Gallery', 'fiorello' );\n\t\t\n\t\treturn $options;\n\t}", "private function manage_plugins( $option = NULL ){\n\t\tif ( 'skip' === $option )\n\t\t\treturn;\n\n\t\t# default plugin set\n\t\t$std_plugin = array(\n\t\t\t'debug-bar',\n\t\t\t'debug-bar-console',\n\t\t\t'debug-bar-cron',\n\t\t\t'debug-bar-extender',\n\t\t\t'developer',\n\t\t\t'log-viewer',\n\t\t\t'monster-widget',\n\t\t\t'piglatin',\n\t\t\t'regenerate-thumbnails',\n\t\t\t'rewrite-rules-inspector',\n\t\t\t'rtl-tester',\n\t\t\t'simply-show-ids',\n\t\t\t'theme-check',\n\t\t\t'theme-test-drive',\n\t\t\t'user-switching',\n\t\t\t'wordpress-importer',\n\t\t\t'wordpress-beta-tester',\n\t\t);\n\n\t\t# wpcom VIP plugin set\n\t\t$vip_plugin = array(\n\t\t\t'grunion-contact-form',\n\t\t\t'jetpack',\n\t\t\t'mp6',\n\t\t\t'polldaddy',\n\t\t\t'vip-scanner',\n\t\t);\n\t\t\n\t\t# plugin developers bundle\n\t\t$dev_plugin = array(\n\t\t\t'log-deprecated-notices',\n\t\t);\n\t\t\n\t\t# debug plugin bundle (author's choice)\n\t\t# please file a pull request to include/exclude plugins\n\t\t$debug_plugin = array(\n\t\t\t'debug-bar-actions-and-filters-addon',\n\t\t\t'debug-bar-constants',\n\t\t\t'debug-my-plugin',\n\t\t\t'debug-objects',\n\t\t\t'uploadplus',\n\t\t);\n\n\t\tswitch ( $option ):\n\t\tcase 'vip':\n\t\t\t\t$plugin_list = array_merge( $std_plugin, $vip_plugin );\n\t\t\t\tbreak;\n\n\t\tcase 'devel':\n\t\t\t\t$plugin_list = array_merge( $std_plugin, $dev_plugin );\n\t\t\t\tbreak;\n\n\t\tcase 'debug':\n\t\t\t\t$plugin_list = array_merge( $std_plugin, $debug_plugin );\n\t\t\t\tbreak;\n\n\t\tcase 'all':\n\t\t\t\t$plugin_list = array_merge( $std_plugin, $vip_plugin, $dev_plugin, $debug_plugin );\n\n\t\tcase 'theme':\n\t\tdefault:\n\t\t\t\t$plugin_list = $std_plugin;\n\t\t\t\tbreak;\n\t\tendswitch;\n\n\t\t$skip_activation = array( 'piglatin', 'wordpress-beta-tester' );\n\t\t# do install\n\t\tforeach ( $plugin_list as $plugin ) :\n\t\t\t$res = WP_CLI::launch( 'wp plugin status '.$plugin, false );\n\t\t\t\n\t\t\tif ( isset( $res ) && $res === 1 ) {\n\t\t\t\t# install plugin (maybe skip piglatin)\n\t\t\t\t$cmdflag = ( in_array( $plugin, $skip_activation ) ) ? '' : ' --activate';\n\t\t\t\tWP_CLI::launch( 'wp plugin install ' . $plugin . $cmdflag );\n\t\t\t} else {\n\t\t\t\t# activate plugin (maybe skip piglatin)\n\t\t\t\tif ( false === in_array( $plugin, $skip_activation ) )\n\t\t\t\t\tWP_CLI::launch( 'wp plugin activate '.$plugin );\n\t\t\t}\n\t\tendforeach;\n\t}", "function hosting_server_post_hosting_verify_task($task, $data) {\n if ($task->ref->type == 'server') {\n $task->ref->no_verify = TRUE;\n\n // Set verified flag on server, to let it know it has been checked.\n $task->ref->verified = REQUEST_TIME;\n\n $task->ref->server_status = HOSTING_SERVER_ENABLED;\n node_save($task->ref);\n }\n}" ]
[ "0.45420805", "0.44728625", "0.44429407", "0.442064", "0.44185257", "0.43906406", "0.43572032", "0.43454704", "0.43400532", "0.4306807", "0.4299204", "0.4230346", "0.42277664", "0.42231315", "0.42179388", "0.42136452", "0.4193354", "0.4176647", "0.41674528", "0.41483107", "0.4118807", "0.41171962", "0.4111821", "0.41114107", "0.41098976", "0.41064072", "0.40937066", "0.40867075", "0.40862235", "0.40819272", "0.4074599", "0.4064002", "0.4061277", "0.4044383", "0.40434417", "0.40389064", "0.4035528", "0.40324384", "0.4028866", "0.40241703", "0.40229386", "0.40059903", "0.3992771", "0.39904815", "0.3986505", "0.39729914", "0.39727086", "0.39719775", "0.39662153", "0.39627358", "0.39625815", "0.39513582", "0.3950655", "0.39479855", "0.3943393", "0.3943393", "0.39353466", "0.39307475", "0.3928711", "0.39182603", "0.39164147", "0.39131927", "0.3896721", "0.38907573", "0.3889042", "0.3888952", "0.38769215", "0.3872589", "0.3866886", "0.38653547", "0.38619724", "0.38606527", "0.38605595", "0.38537818", "0.38499233", "0.3849224", "0.38487357", "0.38419068", "0.38341805", "0.38281727", "0.38276994", "0.3826973", "0.38252258", "0.38245034", "0.38230053", "0.3820776", "0.38106328", "0.38088202", "0.38016197", "0.3798403", "0.37969282", "0.37927938", "0.37917915", "0.37908563", "0.3787751", "0.37860698", "0.37856466", "0.37818417", "0.3777511", "0.37694415", "0.37685898" ]
0.0
-1
adds `rolefile` option to ansible
public function roleFile($role_file = '') { $this->option('--role-file=' . $role_file); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function add_role($role, $display_name, $capabilities = array())\n {\n }", "public function add_role($role)\n {\n }", "public function attachRole($role);", "public function attachRole($role);", "public function setRole($var)\n {\n GPBUtil::checkString($var, True);\n $this->role = $var;\n\n return $this;\n }", "public function setRole($role);", "public function addRole($role)\n {\n $role = strtoupper($role);\n if ($role === static::ROLE_DEFAULT) {\n return;\n }\n if (!in_array($role, $this->roles, true)) {\n $this->roles[] = $role;\n }\n }", "public function set_role($role)\n {\n }", "public function add_role($role, $display_name, $capabilities = array())\n {\n }", "public function set_role($role) {\n $this->role = $role;\n }", "function mkdf_re_include_roles_files() {\n\t\tif(mkdf_re_theme_installed()) {\n\t\t\tforeach (glob(MIKADO_RE_MODULE_PATH . '/roles/*/load.php') as $role_load) {\n\t\t\t\tinclude_once $role_load;\n\t\t\t}\n\t\t}\n\t}", "public function setAuthenticatedRole($role);", "public function addRole(string $role): void\n {\n if (!in_array($role, $this->roles)) {\n $this->roles[] = $role;\n }\n }", "protected function addRole($display, $role = null, $cap = [])\n\t{\n\t\t$role = ($role) ? (string)$role : Stringify::slugify($display);\n\t\t$role = Stringify::replace('-','_',$role);\n\t\treturn add_role($role,$display,$cap);\n\t}", "public function addRoleFormTemplate(Event $event){\n $entityManager = $this->getServiceLocator()->get('Omeka\\EntityManager');\n $roles = $entityManager->getRepository('Teams\\Entity\\TeamRole')->findAll();\n\n if (count($roles)>0){\n\n //this seems to encode the ids as characters\n\n foreach ($roles as $role):\n $role_array[$role->getId()] = $role->getName();\n endforeach;\n echo '<script> let role_array = '. json_encode($role_array) . ' </script>';\n $view = $event->getTarget();\n\n $view->headScript()->prependFile($view->assetUrl('js/chosen-trigger.js', 'Teams'));\n }\n }", "public function setRole($role)\n {\n $this->role = $role;\n }", "static function add_eb_w_role(): void {\r\n\t\tself::add_acf_inner_field(self::eb_ws, self::eb_w_role, [\r\n\t\t\t'label' => 'role',\r\n\t\t\t'type' => 'select',\r\n\t\t\t'instructions' => '',\r\n\t\t\t'required' => 1,\r\n\t\t\t'conditional_logic' => 0,\r\n\t\t\t'wrapper' => [\r\n\t\t\t\t'width' => '',\r\n\t\t\t\t'class' => '',\r\n\t\t\t\t'id' => '',\r\n\t\t\t],\r\n\t\t\t'choices' => [\r\n\t\t\t\t'Editor-in-Chief' => 'Editor-in-Chief',\r\n\t\t\t\t'News Editor' => 'News Editor',\r\n\t\t\t\t'Arts Editor' => 'Arts Editor',\r\n\t\t\t\t'Features Editor' => 'Features Editor',\r\n\t\t\t\t'Sports Editor' => 'Sports Editor',\r\n\t\t\t\t'Photo Editor' => 'Photo Editor',\r\n\t\t\t],\r\n\t\t\t'default_value' => [],\r\n\t\t\t'allow_null' => 0,\r\n\t\t\t'multiple' => 0,\r\n\t\t\t'ui' => 1,\r\n\t\t\t'ajax' => 0,\r\n\t\t\t'placeholder' => '',\r\n\t\t\t'disabled' => 0,\r\n\t\t\t'readonly' => 0,\r\n\t\t\t'return_format' => 'value',\r\n\t\t]);\r\n\t}", "public function setRole($role)\n {\n $this->_role = $role;\n }", "public function addRole($username, $role);", "protected function setRole($role) {\n $this->role = (string) $role;\n return $this;\n }", "public function addRole($role) {\n if (!$this->hasRole($role)) {\n $this->roles[] = $role;\n }\n }", "function setRole($value)\n\t{\n\t\t$this->setState('__role', $value);\n\t}", "public function setDesiredRole($val)\n {\n $this->_propDict[\"desiredRole\"] = $val;\n return $this;\n }", "public function addRole($role)\n {\n $this->roles[] = $role;\n }", "public static function createRole()\n {\n add_action('init', __NAMESPACE__ . '\\DigitalWebmaster::renameAdministratorRole');\n }", "function mkdf_re_include_roles_register_files() {\n\t\tif(mkdf_re_theme_installed()) {\n\t\t\tforeach (glob(MIKADO_RE_MODULE_PATH . '/roles/*/role-register.php') as $role_load) {\n\t\t\t\tinclude_once $role_load;\n\t\t\t}\n\t\t}\n\t}", "public function setRole($role) {\n\n $this->role = $role;\n }", "protected function registerRoles()\n {\n if (! is_dir($path = resource_path('roles'))) {\n return;\n }\n\n $files = Finder::create()\n ->in($path)\n ->name('*.php')\n ->notName('defaults.php');\n\n $bouncer = app(Bouncer::class);\n $bouncer->seeder(function () use ($bouncer, $files) {\n collect($files)->each(function ($file) use ($bouncer) {\n $role = require $file->getRealPath();\n $name = $role['name'];\n $permissions = $role['permissions'];\n\n $bouncer->allow(\"$name\")->to($permissions);\n });\n });\n }", "public function assignRole ($name);", "function add_user_role_leadership(){\r\n\tif(isset($_GET['addrole']) && ($_GET['addrole'] == 'do')){\r\n\t\tadd_role( 'quote_manager', 'Quote Manager', array( 'read' => true, 'level_2' => true ) );\r\n\r\n//\t\tremove_role( 'tow_company' );\r\n\t}\r\n}", "protected function configure()\n {\n $this\n ->setName('import:csv')\n ->setDescription('Import users from CSV file')\n ->addArgument('csvPath', InputArgument::REQUIRED, 'Quel fichier CSV vas être utilisé ? (a mettre dans web/component)')\n ->addArgument('action', InputArgument::OPTIONAL, 'Que voulez vous faire ? \\n 1.Créer des utilisateurs \\n 2.Envoyer un email de rappel');\n }", "public function assignRole($role)\n {\n return $this->roles()->sync([$role]);\n }", "public function setRole($role) \n {\n if (!$this->_isNumericArray($role)) {\n $role = array ($role); \n }\n $this->_fields['Role']['FieldValue'] = $role;\n return $this;\n }", "public function addConfig($file)\n\t\t{\n\t\t\t$this->files[] = (string)$file;\n\t\t\treturn $this;\n\t\t}", "private function _createNewConfigFile( $file ) {\n \\File::append($file,'');\n }", "public function AddRole ($roleName = NULL, $idRole = NULL);", "function install_roles() {\n $db = DB::getInstance();\n if(!$db->query(file_get_contents(CORE_INSTALLER_FILES_PATH.'/db/roles.sql'))->error()) {\n return true;\n }\n else {\n System::addMessage('error', rt('An error occurred during the creation of the default user roles'));\n }\n return false;\n}", "public function giveRole($role)\n {\n return Role::whereName($role)\n ->firstOrFail()\n ->assignRoleTo($this);\n }", "static function add_roles(): void {\r\n\t\tself::add_acf_inner_field(self::divisions, self::roles, [\r\n\t\t\t'label' => 'Roles',\r\n\t\t\t'type' => 'repeater',\r\n\t\t\t'instructions' => '',\r\n\t\t\t'required' => 0,\r\n\t\t\t'conditional_logic' => 0,\r\n\t\t\t'wrapper' => [\r\n\t\t\t\t'width' => '',\r\n\t\t\t\t'class' => '',\r\n\t\t\t\t'id' => '',\r\n\t\t\t],\r\n\t\t\t'collapsed' => '',\r\n\t\t\t'min' => '1',\r\n\t\t\t'max' => '',\r\n\t\t\t'layout' => 'block',\r\n\t\t\t'button_label' => 'Add role'\r\n\t\t]);\r\n\t}", "public function setRole(string $role): self\n {\n $this->role = $role;\n\n return $this;\n }", "public function edit (Role $role)\n {\n $_method = 'PUT';\n\n return view ('admin.' . $this->module_name . '.add', compact ('role', '_method'));\n }", "public function assignRole($role)\n {\n return $this->roles()->attach($role);\n }", "function addInstallAction(&$node) {\n\t\t$fileName = $node->getAttribute('file');\n\n\t\tif (!isset($fileName)) {\n\t\t\t$this->actions[] = array('type' => $node->getName(), 'file' => null, 'attr' => $node->getAttributes());\n\n\t\t} else if (strstr($fileName, '{$installedLocale}')) {\n\t\t\t// Filename substitution for locales\n\t\t\tforeach ($this->installedLocales as $thisLocale) {\n\t\t\t\t$newFileName = str_replace('{$installedLocale}', $thisLocale, $fileName);\n\t\t\t\t$this->actions[] = array('type' => $node->getName(), 'file' => $newFileName, 'attr' => $node->getAttributes());\n\t\t\t}\n\n\t\t} else {\n\t\t\t$newFileName = str_replace('{$locale}', $this->locale, $fileName);\n\t\t\tif (!file_exists($newFileName)) {\n\t\t\t\t// Use version from default locale if data file is not available in the selected locale\n\t\t\t\t$newFileName = str_replace('{$locale}', INSTALLER_DEFAULT_LOCALE, $fileName);\n\t\t\t}\n\n\t\t\t$this->actions[] = array('type' => $node->getName(), 'file' => $newFileName, 'attr' => $node->getAttributes());\n\t\t}\n\t}", "protected function configure()\n {\n $this->setName('tangoman:privileges')\n ->setDescription('Creates default privileges');\n }", "public function setRole(int $role): void\n {\n $this->role = $role;\n }", "public function setRole(string $role) : self\n {\n $this->role = $role;\n return $this;\n }", "public function setRoleName($roleName)\n {\n }", "function add_roles_on_plugin_activation() {\n add_role( 'freelancer', 'Freelancer', array( 'read' => true, 'level_0' => true ) );\n add_role( 'employee', 'Employee', array( 'read' => true, 'level_0' => true ) );\n}", "protected function configure()\n {\n $this\n ->setName('laravel')\n ->setDescription('Quickstart a new Laravel application')\n ->addArgument('name', InputArgument::REQUIRED)\n ->addOption('force', 'f', InputOption::VALUE_NONE, 'Forces install even if the directory already exists');\n }", "public function setRole($role)\n {\n $this->values['Role'] = $role;\n return $this;\n }", "public function addFile($file);", "protected function configure()\n {\n parent::configure();\n $this->setName('create')\n ->setDescription('Creates a checksum file for use in verifying package integrity')\n ->addOption('path', null, InputOption::VALUE_OPTIONAL, 'The path to the package to create checksum file for');\n }", "function roleCreate(Role $role);", "public function addUserRole($role)\r\n {\r\n if($this->userRoleModel->isExistUserRole($role['id']))\r\n {\r\n $this->userRoleModel->updateExistingUserRole($role);\r\n }\r\n else\r\n {\r\n //IF role not exist then add new role\r\n $this->userRoleModel->addNewUserRole($role);\r\n }\r\n }", "public function get_role($role)\n {\n }", "public function putRole($role)\n {\n if ( is_string($role) )\n {\n $role = Role::whereRoleName($role)->first();\n }\n return $this->roles()->attach($role);\n }", "protected function configure()\n {\n $this->setName('migrate:seedrun')\n ->setDescription('run seeder')\n ->setHelp(\"author ekajayanagara as miyuki nagara\\nstudent infomatic at darma persada\\n\\nUntuk membuat file controller\\njika kamu ingin membuat file controller dengan cepat\\n\\nphp nagara buat:migration\\n\\n\");\n // ->addArgument('seeder_name', InputArgument::REQUIRED, 'tuliskan nama seedernya bruh.');\n }", "public function roleAdd()\n {\n return view('role.addEdit');\n }", "public function testCreateRole()\n {\n }", "public function testCreateRole()\n {\n }", "public function withRole($stringArgs)\n {\n foreach (func_get_args() as $role) {\n $this->_fields['Role']['FieldValue'][] = $role;\n }\n return $this;\n }", "public function setRole($role)\n {\n $this->parentRole = $role;\n }", "function mkdf_re_include_roles_shortcodes_file() {\n foreach(glob(MIKADO_RE_MODULE_PATH.'/roles/shortcodes/*/load.php') as $shortcode_load) {\n include_once $shortcode_load;\n }\n }", "public function setRole($role)\n {\n $this->role = $role;\n return $this;\n }", "protected function configure()\n {\n $this\n ->setName('importlog:csv')\n ->setDescription('Import users from CSV file')\n ->addArgument('fileName', InputArgument::REQUIRED, 'fileName')\n ->addArgument('source', InputArgument::REQUIRED, 'source');\n }", "public function __construct($role = null)\n {\n $this\n ->setRole($role);\n }", "protected function configure()\n {\n $this\n ->setName('install')\n ->setDescription('Install October CMS.')\n ->addOption(\n 'force',\n null,\n InputOption::VALUE_NONE,\n 'Make the installer behave as if it is run for the first time. Existing files may get overwritten.'\n )\n ->addOption(\n 'php',\n null,\n InputOption::VALUE_OPTIONAL,\n 'Specify the path to a custom PHP binary',\n 'php'\n )\n ->addOption(\n 'templates-from',\n null,\n InputOption::VALUE_OPTIONAL,\n 'Specify from where to fetch template files (git remote)',\n ''\n );\n }", "public function setRole($value)\n {\n return $this->set('Role', $value);\n }", "public function playbook()\n {\n return 'ansible/playbooks/key/destroy.yml';\n }", "public function __construct(Role $role)\n {\n $this->_role = $role;\n parent::__construct(true);\n }", "public function add($file)\n {\n $response = $this->session()->getUser()->getSSHKeys()->addKey($file);\n if ($response['status_code'] !== 200) {\n $this->log()->error($this->getMessageToLog($response['data']));\n return;\n }\n $this->log()->notice('Added SSH key from file {file}.', compact('file'));\n }", "public function roleFieldName() {\n return 'role';\n }", "public function remove_role($role)\n {\n }", "public function remove_role($role)\n {\n }", "public function setRole(Role $role = null)\n {\n $this->role = $role;\n\n return $this;\n }", "public function addUserRole($role)\n {\n if ($this->userRoles->contains($role)) {\n return false;\n }\n\n return $this->userRoles->add($role);\n }", "static public function add()\n {\n add_role(\n self::ROLE_KEY, \n self::ROLE_NAME, \n [\n 'read' => true,\n 'edit_posts' => true, \n 'upload_files' => false,\n 'edit_others_posts' => true, //a tester a false\n\n 'edit_exercices' => true,\n 'publish_exercices' => false,\n 'read_exercice' => true,\n 'delete_exercice' => true,\n //'delete_exercices' => true,\n 'edit_others_exercices' => false,\n 'delete_others_exercices' => false,\n 'edit_exercice' => true,\n\n 'edit_lessons' => true,\n 'publish_lessons' => true,\n 'read_lesson' => true,\n 'delete_lesson' => true,\n 'edit_others_lessons' => false,\n 'delete_others_lessons' => false,\n 'edit_lesson' => true,\n\n 'manage_arts' => false,\n 'edit_arts' => false,\n 'delete_arts' => false,\n 'assign_arts' => true, \n ]\n\n );\n }", "protected function configure()\n {\n $this->setName('cs:remove:group')\n ->setDescription('Remove a group')\n ->addArgument('name', InputArgument::OPTIONAL, \"What's the group name?\");\n }", "function psp_add_role_caps()\n{\n $roles = array('manager');\n\n // Loop through each role and assign capabilities\n foreach ($roles as $the_role) {\n\n $role = get_role($the_role);\n\n $role->add_cap('read');\n $role->add_cap('create_cpt_project');\n $role->add_cap('create_private_cpt_project');\n $role->add_cap('read_cpt_project');\n $role->add_cap('read_private_cpt_project');\n $role->add_cap('edit_cpt_project');\n $role->add_cap('edit_published_cpt_project');\n $role->add_cap('publish_cpt_project');\n $role->add_cap('delete_private_cpt_project');\n $role->add_cap('delete_published_cpt_project');\n\n }\n}", "public function edit(Role $role)\n {\n }", "function remove_role($role)\n {\n }", "public function addRoleToUser() {\n\t\tif (self::userHasRole($this->user_id, $this->role_id)) {\n\t\t\treturn \"user already has the role\";\n\t\t}\n\t\t$this->init_database('a+');\n\t\tfwrite(self::$db, \"\\n\".$this->user_id . \",\". $this->role_id);\n\t\tfclose(self::$db);\n\t\treturn \"\\nadded successfully\\n\";\n\t}", "static function setRole(&$rsData, $role)\n {\n $rsData['role'] = $role;\n }", "public function setUserRole(User $user, Role $role);", "public function show_on_user_role( $role ) {\r\n\t\t$this->settings['show_on']['role'] = (array) $role;\r\n\r\n\t\treturn $this;\r\n\t}", "protected function configure()\n {\n $this\n ->setName('install')\n ->setDescription('Install Laravel UI scaffolding')\n ->addArgument('preset', InputArgument::REQUIRED, 'Install the preset type')\n ->addOption('auth', null, InputOption::VALUE_NONE, 'Install authentication scaffolding');\n }", "public function actionRole()\n {\n foreach (USER::getRoleOptions() as $key => $val) {\n\n self::log(\"\\n\" . $val . ' Role-id is ' . $key . \"\\n\");\n }\n\n if (is_null($this->email)) {\n\n self::log('Email required ! (Hint -e=)');\n\n return ExitCode::DATAERR;\n }\n\n $model = User::findOne([\n 'email' => $this->email\n ]);\n\n if (is_null($model)) {\n\n self::log('User not found');\n\n return ExitCode::NOUSER;\n }\n\n if (is_null($this->role_id)) {\n\n self::log('Current Role Id is ' . $model->role_id . \"\\n\");\n self::log('Add correct Role id (Hint -r=)');\n\n return ExitCode::DATAERR;\n }\n\n if (is_null(ArrayHelper::getValue(USER::getRoleOptions(), $this->role_id))) {\n\n self::log('Please enter correct role id :');\n\n return ExitCode::DATAERR;\n }\n\n $model->role_id = $this->role_id;\n\n if (! $model->save()) {\n\n self::log('Please enter valid Role Id ');\n\n return ExitCode::DATAERR;\n }\n\n self::log($this->email . ' = Role Id successfully Updated !');\n\n return ExitCode::OK;\n }", "function populate_roles()\n {\n }", "public function assignRole($role)\n {\n if (count($this->roles))\n {\n return $this->roles()->sync($role);\n }\n\n return $this->roles()->attach($role);\n }", "public function attachRole($role)\n {\n if(is_object($role)) {\n $role = $role->getKey();\n }\n\n if(is_array($role)) {\n $role = $role['id'];\n }\n\n $this->roles()->attach($role);\n }", "private function changeRole($role, $ajaxObj) {\n\t\t// Change the role\n\t\ttx_newspaper_workflow::changeRole(intval($role));\n\n\t\t// Render json (new menu and new label)\n\t\t$content = json_encode(array('roleLabel' => tx_newspaper_Workflow::getRoleTitle(tx_newspaper_Workflow::getRole()), 'menu' => $this->renderMenu()));\n\n\t\t// Set output\n\t\t$ajaxObj->setContentFormat('json');\n\t\t$ajaxObj->addContent('newspaperRoleMenu', $content);\n\n\t}", "protected function configure()\n {\n $this\n ->setName('basic:generate_teams')\n ->setDescription('Generates teams from active users');\n }", "public function assignRole($role)\n {\n return $this->roles()->save(\n Role::whereName($role)->firstOrFail()\n );\n }", "public function assignRole($role)\n {\n return $this->roles()->save(\n Role::whereName($role)->firstOrFail()\n );\n }", "public function add_cap($role, $cap, $grant = \\true)\n {\n }", "public function edit(Role $role)\n {\n \n \n }", "protected function configure()\n {\n $this\n ->setName('generate-container')\n ->setDescription('Generate container')\n ->addOption(\n 'services',\n 's',\n Input\\InputOption::VALUE_OPTIONAL,\n 'Use the specified services file to generate the container'\n );\n }", "public function setRole($role)\n {\n $this->role = $role;\n\n return $this;\n }", "public function setRole($role)\n {\n $this->role = $role;\n\n return $this;\n }", "public function setRole($role)\n {\n $this->role = $role;\n\n return $this;\n }" ]
[ "0.53365266", "0.5078995", "0.49909854", "0.49909854", "0.48811686", "0.48124954", "0.4807254", "0.47733837", "0.471409", "0.47004554", "0.46609274", "0.46253684", "0.45722702", "0.4559672", "0.45521155", "0.45278615", "0.4527051", "0.45222965", "0.45082125", "0.4493077", "0.4488675", "0.44837844", "0.4480368", "0.44666895", "0.44423005", "0.44306007", "0.44200227", "0.44194278", "0.43781036", "0.43678916", "0.4354986", "0.43405786", "0.43383425", "0.43206668", "0.43069267", "0.42978466", "0.42866743", "0.42861855", "0.4277617", "0.42593506", "0.4251354", "0.42482764", "0.42400548", "0.4226864", "0.42244393", "0.4216161", "0.42073342", "0.41888738", "0.41887832", "0.4176316", "0.41665897", "0.41607398", "0.4151795", "0.4149412", "0.41407114", "0.4125951", "0.41202578", "0.41188502", "0.41068172", "0.41068172", "0.40875", "0.408687", "0.40793884", "0.4078333", "0.407745", "0.40771502", "0.40766466", "0.40728784", "0.4069403", "0.4066118", "0.40650854", "0.40620476", "0.4058218", "0.40567285", "0.4050185", "0.40476108", "0.4046687", "0.40466112", "0.40411726", "0.40327108", "0.4031951", "0.4028313", "0.40268824", "0.40256923", "0.40187147", "0.40122378", "0.4000979", "0.40009665", "0.4000298", "0.39916176", "0.39881155", "0.39852688", "0.39825827", "0.39825827", "0.3982325", "0.3979146", "0.3978935", "0.39760643", "0.39760643", "0.39760643" ]
0.6522479
0
Array of types or string with types delimited by pipe (|) e.g. array('int', 'null') or "int|null"
public function setTypes($types) { if (is_string($types)) { $types = explode('|', $types); } $this->types = $types; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "#[Pure] private static function get_types(string|null $type): array\n {\n if ($type === null) {\n return [Type::VOID];\n }\n\n return explode('|', $type);\n }", "public function getTypes()\n {\n $return = $this->dsn->types;\n\n if ($return === null) {\n return;\n }\n return explode(',', $return);\n }", "function acf_parse_types($array)\n{\n}", "public function getTypeArr(){\n\t\treturn [\n\t\t\t'normal' =>'Normal',\n\t\t\t'ip'\t =>'IP',\n\t\t\t'iprange'=>'IP Bereich'\n\t\t];\n\t}", "public function okay_types_csv()\n {\n return implode(',', $this->okay_types());\n }", "function FieldTypesArray() {}", "public function getTypes(): array;", "public function getTypes(): array;", "public function get_desired_types();", "public function typeFor(array $input): string;", "public static function types() : array\n {\n return ['questions', 'pictures', 'video'];\n }", "public function getInputType(): string\n {\n return $this->expectArray\n ? \"array of {$this->type}\"\n : $this->type;\n }", "public static function getTypeArray()\n {\n return [\n self::TYPE_GENERIC => Yii::t('app', 'Generic'),\n ];\n }", "public function typeProvider()\n {\n return array(\n array(true, false),\n array(12, false),\n array(24.50, false),\n array(new \\stdClass(), false),\n array('string', true),\n );\n }", "public function getInputTypesWithOptions()\n {\n $types = [];\n foreach ($this->inputTypes as $code => $inputType) {\n if ($inputType->isManageOptions()) {\n $types[] = $code;\n }\n }\n\n return $types;\n }", "function getDatatypes() {\n return ['Protein', 'Phenotype', 'Gene Expression', 'Nucleotide Sequence','Clinical Trials','Imaging Data','Morphology','Proteomics Data','Physiological Signals','Epigenetic Data','Data from Papers',\n 'Omics Data','Survey Data','Cell Signaling','Unspecified',];\n}", "private static function getStringType($val)\n {\n $type = 'string';\n $typeMore = null;\n if (\\is_numeric($val)) {\n $typeMore = 'numeric';\n } elseif ($val === self::UNDEFINED) {\n $type = 'undefined'; // not a native php type!\n } elseif ($val === self::RECURSION) {\n $type = 'recursion'; // not a native php type!\n } elseif ($val === self::NOT_INSPECTED) {\n $type = 'notInspected';\n }\n return array($type, $typeMore);\n }", "public function getAllowedTypes()\n {\n return ['VI', 'MC', 'AE', 'DI', 'JCB', 'UN', 'MI', 'DN', 'BCMC', 'HIPERCARD','ELO', 'TROY', 'DANKORT'];\n }", "protected function getType(): string\n {\n return join('|', $this->types);\n }", "protected final function primitiveTypes(): array\n {\n return [\n Types::bool(),\n Types::float(),\n Types::int(),\n Types::null(),\n Types::object(),\n Types::string(),\n ];\n }", "function setTypes($types){\n\t\t$this->types=explode(\",\",$types);\n\t}", "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 }", "function _handle_value($value, $type)\n\t{\n\t\t$type = (!isset($this->_types[$type])) ? '0' : $type;\n\t\tif ($this->_types[$type] == 'list')\n\t\t{\n\t\t\treturn explode(\"\\n\", $value);\n\t\t}\n\t\t\n\t\treturn $value;\n\t}", "function get_types_and_literals($tokens){\n $types = array();\n $literals = array();\n for($i = 1; $i < count($tokens[0]); $i++){\n if($tokens[0][$i] == TokenConstants::CONSTANT){\n if(preg_match(\"/^bool@(true|false)\\z/u\",$tokens[1][$i])){\n $types[$i - 1] = \"bool\";\n $literals[$i - 1] = preg_replace(\"/^bool@/\",\"\",$tokens[1][$i]);\n }\n elseif(preg_match(\"/^int@(\\\\+|-)?[0-9]+\\z/u\",$tokens[1][$i])){\n $types[$i - 1] = \"int\";\n $literals[$i - 1] = preg_replace(\"/^int@/\",\"\",$tokens[1][$i]);\n }\n elseif(preg_match(\"/^nil@nil\\z/u\",$tokens[1][$i])){\n $types[$i - 1] = \"nil\";\n $literals[$i - 1] = \"nil\";\n }\n else{\n $types[$i - 1] = \"string\";\n $literals[$i - 1] = preg_replace(\"/^string@/\",\"\",$tokens[1][$i]);\n\n }\n }\n elseif($tokens[0][$i] == TokenConstants::LABEL){\n $types[$i - 1] = \"label\";\n $literals[$i - 1] = $tokens[1][$i];\n }\n elseif($tokens[0][$i] == TokenConstants::ID){\n $types[$i - 1] = \"var\";\n $literals[$i - 1] = $tokens[1][$i];\n }\n elseif($tokens[0][$i] == TokenConstants::TYPE){\n $types[$i - 1] = \"type\";\n $literals[$i - 1] = $tokens[1][$i];\n }\n }\n\n return array($types,$literals);\n}", "public function typesAsString()\n {\n return implode(',', array_keys(self::DOCUMENT_TYPES));\n }", "protected function get_array_field_types() {\n\t\treturn array( 'multicheck' );\n\t}", "protected function types()\n {\n return [\n 'bigint',\n 'blob',\n 'boolean',\n 'date',\n 'decimal',\n 'integer',\n 'longText',\n 'smallint',\n 'text',\n 'time',\n 'timestamp',\n 'timestamptz',\n ];\n }", "public function getValidTypes()\r\n\t{\r\n\t\treturn array(\"Float\", \"Integer\", \"Location\", \"Text\", \"Boolean\", \r\n\t\t\t\"MultiText\", \"Date\", \"DateTime\", \"Enum\", \"MultiEnum\", \"Group\");\t\r\n\t}", "public static function getTypeList()\n {\n return [\n self::TYPE_TEXT_FIELD => '',\n self::TYPE_DROP_DOWN => '',\n ];\n }", "public function getTypeAllowableValues()\n {\n return [\n self::TYPE_STRING,\n self::TYPE_BOOLEAN,\n self::TYPE_NUMBER,\n self::TYPE_JSON,\n ];\n }", "public function get_types()\n\t{\n\t\treturn array();\n\t}", "public static function getAllowedTypes();", "public static function getTypeList() {\n return array(\n self::TYPE_CODE_1=>self::TYPE_STRING_1,\n self::TYPE_CODE_2=>self::TYPE_STRING_2,\n self::TYPE_CODE_3=>self::TYPE_STRING_3,\n self::TYPE_CODE_4=>self::TYPE_STRING_4,\n self::TYPE_CODE_5=>self::TYPE_STRING_5,\n self::TYPE_CODE_6=>self::TYPE_STRING_6\n );\n }", "public function getTypeAllowableValues()\n {\n return [\n self::TYPE_TEXT,\n self::TYPE_MEDIA,\n self::TYPE_UNSUPPORTED,\n ];\n }", "protected function allowedDoktypeList()\n\t{\n\t\tif (TRUE === isset($this->arguments['doktypes']) && FALSE === empty($this->arguments['doktypes'])) {\n\t\t\tif (TRUE === is_array($this->arguments['doktypes'])) {\n\t\t\t\t$types = $this->arguments['doktypes'];\n\t\t\t} else {\n\t\t\t\t$types = GeneralUtility::trimExplode(',', $this->arguments['doktypes']);\n\t\t\t}\n\t\t\tforeach ($types as $index => $type) {\n\t\t\t\tif (FALSE === ctype_digit($type)) {\n\t\t\t\t\t$types[$index] = constant('t3lib_pageSelect::DOKTYPE_' . strtoupper($type));\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t$types = array(\n\t\t\t\tconstant('t3lib_pageSelect::DOKTYPE_DEFAULT'),\n\t\t\t\tconstant('t3lib_pageSelect::DOKTYPE_LINK'),\n\t\t\t\tconstant('t3lib_pageSelect::DOKTYPE_SHORTCUT'),\n\t\t\t\tconstant('t3lib_pageSelect::DOKTYPE_MOUNTPOINT')\n\t\t\t);\n\t\t}\n\t\tif ($this->arguments['includeSpacers'] && FALSE === in_array(constant('t3lib_pageSelect::DOKTYPE_SPACER'), $types)) {\n\t\t\tarray_push($types, constant('t3lib_pageSelect::DOKTYPE_SPACER'));\n\t\t}\n\t\treturn $types;\n\t}", "public function getAllowedTypes();", "public function getTypeAllowableValues()\r\n {\r\n return [\r\n self::TYPE_DB,\r\n self::TYPE_TABLE,\r\n self::TYPE_VIEW,\r\n self::TYPE_EVENT,\r\n self::TYPE_ROUTINE,\r\n self::TYPE_INDEX,\r\n self::TYPE_TRIGGER,\r\n self::TYPE_SYNONYM,\r\n self::TYPE__FUNCTION,\r\n self::TYPE_PROCEDURE,\r\n self::TYPE_TYPE,\r\n self::TYPE_RULE,\r\n self::TYPE_DEFAULT_TYPE,\r\n self::TYPE_PLAN_GUIDE,\r\n self::TYPE_CONSTRAINT,\r\n self::TYPE_FILE_GROUP,\r\n self::TYPE_PARTITION_FUNCTION,\r\n self::TYPE_PARTITION_SCHEME,\r\n self::TYPE_TABLE_COLLATION,\r\n self::TYPE_EXTENSIONS,\r\n ];\r\n }", "public static function getTypes(): array {\n\t\treturn ['pizza'];\n\t}", "public function getFieldTypes() {\n\t\treturn array(crud::TYPE_STRING);\n\t}", "public function getCleanerTypes()\n\t{\n\t\treturn array(\n\t\t\t'str',\n\t\t\t'string',\n\t\t\t'str_notrim',\n\t\t);\n\t}", "public static function ext2type_filter_hack($types) {\r\n\t\tglobal $df_hotlink_wp_extensions;\r\n\t\t$df_hotlink_wp_extensions = $types;\r\n\t\treturn $types;\r\n\t}", "public function getTypeAllowableValues()\r\n {\r\n return [\r\n self::TYPE_EIP,\r\n self::TYPE_DUALSTACK,\r\n self::TYPE_DUALSTACK_SUBNET,\r\n ];\r\n }", "public static function getTypes();", "public static function getTypes(): array\n {\n return self::getRelevancyTypes();\n }", "public function getTypeAllowableValues()\n {\n return [\n self::TYPE_1,\n self::TYPE_2,\n self::TYPE_3,\n ];\n }", "private static function elaborate_types($types)\n {\n \tswitch($types)\n \t{\n\t\tcase 'fsm':\n\t\t\t\treturn array('fsm', 'fsmd');\n \t\tcase 'sch':\n\t\t\t\treturn array('sch', 'sym');\n \t\tcase 'vhdl':\n\t\t\t\treturn array('vhd', 'vhdl');\n\t\t\tcase 'verilog':\n\t\t\t\treturn array('v');\n\t\t\tcase 'true':\n\t\t\t\treturn array('vhd', 'vhdl', 'v');\n\t\t\tcase 'all':\n\t\t\tdefault:\n\t\t\t\treturn array('sch', 'vhd', 'vhdl', 'v', 'sym', 'fsm', 'fsmd');\t\n \t\n \t}\n }", "public static function allowed_types()\n {\n return self::$allowed_types;\n }", "public function getTypes() : array\n {\n return \\array_map(function ($t) {\n return $t instanceof self ? $t : new self([$t]);\n }, $this->types);\n }", "public function getTypeAllowableValues()\n {\n return [\n self::TYPE_LINE,\n self::TYPE_GROUP,\n self::TYPE_DOCUMENT,\n self::TYPE_FLAT,\n ];\n }", "public function getArrayShortType() {\n return preg_replace(\"/\\[.*?]/\", \"\", $this->getShortType());\n }", "public function getTypeAllowableValues()\n {\n return [\n self::TYPE_TEXT,\n self::TYPE_RANGE,\n self::TYPE_CATEGORY,\n ];\n }", "public function getTypes();", "public function getTypes();", "public function getTypes();", "public function getTypes();", "protected function get_post_types() {\n\t\tif ( isset( $this->post_type_name ) && is_array( $this->post_type_name ) ) {\n\n\t\t\treturn $this->post_type_name;\n\t\t} elseif ( isset( $this->post_type_name ) && is_string( $this->post_type_name ) ) {\n\n\t\t\treturn array( $this->post_type_name );\n\t\t} else {\n\n\t\t\treturn null;\n\t\t}\n\t}", "public function getValidTypes()\n\t{\n\t\treturn array(\n\t\t\tself::TYPE_SINGLE=>Yii::t('payment', 'Ett LAN'),\n\t\t\tself::TYPE_SEASON=>Yii::t('payment', 'Säsong'),\n\t\t);\n\t}", "public function getInvalidUseTypeValues(): array\n {\n return [\n 'Empty string' => [\n '', \n ], \n 'Only white spaces' => [\n ' ', \n ], \n 'Not optional neither prohibited neither required' => [ \n 'foo', \n ], \n 'optional with white spaces' => [\n ' optional ', \n ], \n 'prohibited with white spaces' => [\n ' prohibited ', \n ], \n 'required with white spaces' => [\n ' required ', \n ], \n 'optional (uppercase)' => [ \n 'Optional', \n ], \n 'prohibited (uppercase)' => [ \n 'Prohibited', \n ], \n 'required (uppercase)' => [ \n 'Required', \n ], \n 'optional, prohibited and required' => [ \n 'optional prohibited required', \n ], \n ];\n }", "function _toType($value) {\n\tif (preg_match('/^(\"(.*)\"|\\'(.*)\\')/',$value,$matches)) {\n\t$value = (string)preg_replace('/(\\'\\'|\\\\\\\\\\')/',\"'\",end($matches));\n\t$value = preg_replace('/\\\\\\\\\"/','\"',$value);\n\t} elseif (preg_match('/^\\\\[(.+)\\\\]$/',$value,$matches)) {\n\t\t// Inline Sequence\n\n\t\t// Take out strings sequences and mappings\n\t\t$explode = $this->_inlineEscape($matches[1]);\n\n\t\t// Propogate value array\n\t\t$value = array();\n\t\tforeach ($explode as $v) {\n\t\t$value[] = $this->_toType($v);\n\t\t}\n\t} elseif (strpos($value,': ')!==false && !preg_match('/^{(.+)/',$value)) {\n\t\t// It's a map\n\t\t$array = explode(': ',$value);\n\t\t$key = trim($array[0]);\n\t\tarray_shift($array);\n\t\t$value = trim(implode(': ',$array));\n\t\t$value = $this->_toType($value);\n\t\t$value = array($key => $value);\n\t} elseif (preg_match(\"/{(.+)}$/\",$value,$matches)) {\n\t\t// Inline Mapping\n\n\t\t// Take out strings sequences and mappings\n\t\t$explode = $this->_inlineEscape($matches[1]);\n\n\t\t// Propogate value array\n\t\t$array = array();\n\t\tforeach ($explode as $v) {\n\t\t$array = $array + $this->_toType($v);\n\t\t}\n\t\t$value = $array;\n\t} elseif (strtolower($value) == 'null' or $value == '' or $value == '~') {\n\t\t$value = NULL;\n\t} elseif (preg_match ('/^[0-9]+$/', $value)) {\n\t// Cheeky change for compartibility with PHP < 4.2.0\n\t\t$value = (int)$value;\n\t} elseif (in_array(strtolower($value),\n\t\t\t\tarray('true', 'on', '+', 'yes', 'y'))) {\n\t\t$value = true;\n\t} elseif (in_array(strtolower($value),\n\t\t\t\tarray('false', 'off', '-', 'no', 'n'))) {\n\t\t$value = false;\n\t} elseif (is_numeric($value)) {\n\t\t$value = (float)$value;\n\t} else {\n\t\t// Just a normal string, right?\n\t\t$value = trim(preg_replace('/#(.+)$/','',$value));\n\t}\n\n\treturn $value;\n\t}", "private function formatTypes(array $auditableTypes): array\n {\n $formattedAuditableTypes = [];\n\n $regex = '/(?<=[a-z])(?=[A-Z])/x';\n\n foreach ($auditableTypes as $type) {\n $typeArray = explode('\\\\', $type);\n $model = end($typeArray);\n $modelName = preg_split($regex, $model);\n\n $formattedAuditableTypes[] = [\n 'model' => join($modelName, \" \"),\n 'tag' => strtolower(join($modelName, \"-\"))\n ];\n }\n\n return $formattedAuditableTypes;\n }", "public function getOutputTypeAllowableValues()\n {\n return [\n self::OUTPUT_TYPE_STL,\n self::OUTPUT_TYPE_STEP,\n self::OUTPUT_TYPE_IGES,\n self::OUTPUT_TYPE_OBJ,\n self::OUTPUT_TYPE_SVF,\n self::OUTPUT_TYPE_SVF2,\n self::OUTPUT_TYPE_IFC,\n self::OUTPUT_TYPE_THUMBNAIL,\n ];\n }", "public function getTypeAllowableValues()\n {\n return [\n self::TYPE_SALES_ORDER,\n self::TYPE_SALES_INVOICE,\n self::TYPE_PURCHASE_ORDER,\n self::TYPE_PURCHASE_INVOICE,\n self::TYPE_RETURN_ORDER,\n self::TYPE_RETURN_INVOICE,\n self::TYPE_INVENTORY_TRANSFER_ORDER,\n self::TYPE_INVENTORY_TRANSFER_INVOICE,\n self::TYPE_REVERSE_CHARGE_ORDER,\n self::TYPE_REVERSE_CHARGE_INVOICE,\n self::TYPE_CUSTOMS_INVOICE,\n self::TYPE_CUSTOMS_ORDER,\n self::TYPE_ANY,\n ];\n }", "public function validPropertyTypes()\n {\n return [\n ['integer'],\n ['int'],\n ['float'],\n ['boolean'],\n ['bool'],\n ['string'],\n ['DateTime'],\n ['array'],\n ['ArrayObject'],\n ['SplObjectStorage'],\n ['Neos\\Flow\\Foo'],\n ['\\Neos\\Flow\\Bar'],\n ['\\Some\\Object'],\n ['SomeObject'],\n ['array<string>'],\n ['array<Neos\\Flow\\Baz>'],\n ['?string'],\n ['null|string'],\n ['string|null'],\n ['?\\Some\\Object'],\n ['\\Some\\Object|null'],\n ['?array<Neos\\Flow\\Baz>'],\n ['null|array<Neos\\Flow\\Baz>']\n ];\n }", "private function _comma_separated_to_array($input, $type) {\n\t\t$output = array();\n\t\tif ( empty($input) ) {\n\t\t\treturn $output;\n\t\t}\n\t\tif ( is_array($input) ) {\n\t\t\t$output = $input;\n\t\t}\n\t\telse {\n\t\t\t$output = explode(',', $input);\n\t\t}\n\n\t\tforeach ($output as $i => $item) {\n\t\t\t$output[$i] = trim($item);\n\t\t\t$item = trim($item);\n\t\t\t\n\t\t\t// Remove quotes, e.g. $input = '\"1\",\"2\",\"3\"'\n\t\t\t$item = preg_replace('/^\"/', '', $item);\n\t\t\t$item = preg_replace('/\"$/', '', $item);\n\t\t\t$item = preg_replace(\"/^'/\", '', $item);\n\t\t\t$item = preg_replace(\"/'$/\", '', $item);\n\t\t\t\n\t\t\tif (empty($item)) {\n\t\t\t\tunset($output[$i]); // this covers the nefarious empty arrays!\n\t\t\t\tcontinue; \n\t\t\t}\n\t\t\tswitch ($type) {\n\t\t\t\tcase 'integer':\n\t\t\t\t\t$output[$i] = (int) $item;\n\t\t\t\t\tbreak;\n\t\t\t\t\t// Only a-z, _, - is allowed.\n\t\t\t\tcase 'alpha':\n\t\t\t\t\tif ( !preg_match('/[a-z_\\-]/i', $item) ) {\n\t\t\t\t\t\t$this->errors[] = __('Invalid alpha input:') . $item;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'post_type':\n\t\t\t\t\tif ( !empty($item) && !post_type_exists($item) ) {\n\t\t\t\t\t\t$this->errors[] = __('Invalid post_type:') . $item;\n\t\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'post_status':\n\t\t\t\t\tif ( !in_array($item, array('inherit', 'publish', 'auto-draft', 'draft')) ) {\n\t\t\t\t\t\t$this->errors[] = __('Invalid post_status:') . $item;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'search_columns':\n\t\t\t\t\t// Taking this on: http://code.google.com/p/wordpress-summarize-posts/issues/detail?id=27\n\t\t\t\t\tif ( !preg_match('/[a-z_0-9]/i', $item) ) {\n\t\t\t\t\t\t$this->errors[] = __('Invalid column name. Column names may only contain alphanumeric characters and underscores: ') . $item;\n\t\t\t\t\t}\n\t\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'no_tags':\n\t\t\t\t\t$output[$i] = strip_tags($item);\n\t\t\t}\n\t\t}\n\n\t\treturn $output;\n\t}", "public function buildType(array &$types=[], array &$wrapped=[], array &$visitor=[]): array;", "public static function dataPathMatchUndesiredInputTypes() {\n\t\t$data = [];\n\t\t$all_types = TypeProviderHelper::getAll();\n\t\tforeach ($all_types as $key => $value) {\n\t\t\tif (in_array($key, TypeProviderHelper::GROUP_EMPTY, true)) {\n\t\t\t\t$data['Match: \"/\" vs ' . $key] = [\n\t\t\t\t\t'original' => '/',\n\t\t\t\t\t'check' => $value['input'],\n\t\t\t\t\t'matches' => true,\n\t\t\t\t];\n\n\t\t\t\t$data['Non-match: \"/test\" vs ' . $key] = [\n\t\t\t\t\t'original' => '/test',\n\t\t\t\t\t'check' => $value['input'],\n\t\t\t\t\t'matches' => false,\n\t\t\t\t];\n\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t/*\n\t\t\t * The other type inputs should all lead to a `false` result.\n\t\t\t * Non-scalar types for being non-scalar and the string types for not actually being a path.\n\t\t\t */\n\t\t\t$data['Non-match: \"/\" vs ' . $key] = [\n\t\t\t\t'original' => '/',\n\t\t\t\t'check' => $value['input'],\n\t\t\t\t'matches' => false,\n\t\t\t];\n\t\t}\n\n\t\treturn $data;\n\t}", "function erp_get_people_types() {\n return apply_filters( 'erp_people_types', [] );\n}", "protected function allowedTypes()\n {\n return ['select'];\n }", "protected abstract function operatorTypes();", "public function invalidPropertyTypes()\n {\n return [\n ['string<string>'],\n ['int<Neos\\Flow\\Baz>']\n ];\n }", "private function getQuizzStatusTypes() {\n global $wpdb;\n $res = $wpdb->get_results('SELECT DATA_TYPE FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA=\"irish_wp\" AND TABLE_NAME = \"IRQ_quizzes\" AND COLUMN_NAME=\"quizz_status\"');\n $this->varDD($res);\n return explode(',',$res['quizz_status']->Type); \n \n }", "public static function getStandardTypes() : array\n {\n }", "public function getFieldTypeAllowableValues()\n {\n return [\n self::FIELD_TYPE_BIT,\n self::FIELD_TYPE_DATE_TIME,\n self::FIELD_TYPE_INT,\n self::FIELD_TYPE_FLOAT,\n self::FIELD_TYPE_STRING,\n self::FIELD_TYPE_GUID,\n ];\n }", "public function types() {\n return [\n self::TYPE_NONE => 'none',\n self::TYPE_WECHAT => 'wechat',\n self::TYPE_ALIPAY => 'alipay',\n self::TYPE_CASH => 'cash',\n ];\n }", "protected function getValueAsArray()\n {\n if(strpos($this->value, '|') > 1){\n $values = array_filter(explode(\"|\", $this->value));\n } else {\n $values = [$this->value];\n }\n return $values;\n }", "public function getTypes()\n {\n $oDb = Factory::service('Database');\n $oResult = $oDb->query('SHOW COLUMNS FROM `' . $this->table . '` LIKE \"type\"')->row();\n $sTypes = $oResult->Type;\n $sTypes = preg_replace('/enum\\((.*)\\)/', '$1', $sTypes);\n $sTypes = str_replace(\"'\", '', $sTypes);\n $aTypes = explode(',', $sTypes);\n\n $aOut = [];\n\n foreach ($aTypes as $sType) {\n $aOut[$sType] = ucwords(strtolower($sType));\n }\n\n return $aOut;\n }", "public function getTypeAllowableValues()\n {\n return [\n self::TYPE_PUSH_NOTIFICATION,\nself::TYPE_QR_CODE, ];\n }", "public static function load_custom_types($data = NULL){\r\n\r\n\t\t\t\tglobal $wpdb;\r\n\r\n\t\t\t\t$dat = explode(\"|\",$data);\r\n\r\n\t\t\t\t$custom_fields = array();\r\n\t\t\t\tif(count($dat) > 0){\r\n\t\t\t\t\tforeach($dat as $d){\r\n\t\t\t\t\t\t$x = explode(\"/\",$d);\r\n\t\t\t\t\t\t$custom_fields[$x[0]] = isset($x[1])?$x[1]:\"\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn $custom_fields;\r\n\r\n\t\t}", "public function getTypeAllowableValues()\r\n {\r\n return [\r\n self::TYPE_OVERVIEW,\r\n self::TYPE_DETAIL,\r\n self::TYPE_NETWORK,\r\n self::TYPE_PRECHECK,\r\n self::TYPE_PROGRESS,\r\n self::TYPE_LOG,\r\n self::TYPE_COMAPRE,\r\n self::TYPE_FILE,\r\n ];\r\n }", "static public function meaningTypes($type)\n\t{\n\t\tif (!empty($type))\n\t\t{\n\t\t\tif (is_string($type))\n\t\t\t{\n\t\t\t\t$typeChain = (new TypeMeaningHelper())->setType($type)->getTypeChain();\n\t\t\t\t$mTypes = [];\n\t\t\t\tforeach($typeChain as $k => $t)\n\t\t\t\t{\n\t\t\t\t\tif (empty($t))\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t$mTypes[$k] = $t;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn $mTypes;\n\t\t\t}\n\t\t\telse if (is_array($type))\n\t\t\t{\n\t\t\t\t$mTypes = [];\n\t\t\t\tfor($i=self::INDEX_MIN;$i<=self::INDEX_MAX;$i++)\n\t\t\t\t{\n\t\t\t\t\t// consecutive indices\n\t\t\t\t\tif (!isset($type[$i]) or empty($type[$i]))\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\t$mTypes[$i] = $type[$i];\n\t\t\t\t}\n\n\t\t\t\treturn $mTypes;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthrow new \\InvalidArgumentException(\"Parameter 'type' must be string or array.\");\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn array();\n\t\t}\n\t}", "public function getTypes(): array\n {\n return $this->types;\n }", "public function validDataTypes();", "public function getFilter()\n\t{\n\t\treturn 'array';\n\t}", "public function getAllowedJuggleTypes()\n {\n return [\n new FloatType,\n new IntType,\n new StringType\n ];\n }", "public function getAllowedDataTypes() {\n return array(\n self::ATTRIBUTE_DATA_TYPE_TEXT,\n self::ATTRIBUTE_DATA_TYPE_NUMBER,\n self::ATTRIBUTE_DATA_TYPE_DATE,\n );\n }", "private function getTypes($parameters)\n\t{\n\t\t$types = '';\n\t\t\n\t\tforeach ( $parameters as $param )\n\t\t{\n\t\t\tif ( is_int($param) )\n\t\t\t{\n\t\t\t\t$types .= 'i';\n\t\t\t}\n\t\t\telseif ( is_double($param) || is_float($param) )\n\t\t\t{\n\t\t\t\t$types .= 'd';\n\t\t\t}\n\t\t\telseif ( is_string($param) )\n\t\t\t{\n\t\t\t\t$types .= 's';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$types .= 'b';\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $types;\n\t}", "public function betTypes()\n {\n return [\n self::TYPE_NONE,\n ];\n }", "public static function allDataType2String(&$params)\n {\n if (!is_array($params) || !count($params))\n {\n $params = \"\";\n return ;\n }\n\n foreach ($params as $key => $val) {\n $params[$key] = is_null($val) ? \"\" : strval($val);\n }\n\n return ;\n }", "public function type($type): array\n\t{\n\t\t$result = [];\n\n\t\tif (isset($type) && $type != '')\n\t\t{\n\t\t\t$result = ['$type' => $type];\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->error('One required numeric argument should be passed to method — <BSON type number> or <String alias>', __METHOD__);\n\t\t}\n\t\t\n\t\treturn $result;\n\t}", "private function supportedTypes(): array\n {\n return [\n EmailContent::MAIL_FORMAT_TEXT,\n EmailContent::MAIL_FORMAT_MARKDOWN,\n EmailContent::MAIL_FORMAT_HTML\n ];\n }", "public function getAllowedTypes()\n {\n return ['substition', 'protected', 'disabled', 'formatting'];\n }", "protected static function getPossibleVarTypes() {\n\t\treturn [\n\t\t\tPropertiesInterface::DTYPE_DEP_CURRENCY => CurrencyType::class,\n\t\t\tPropertiesInterface::DTYPE_DEP_EMAIL => EmailType::class,\n\t\t\tPropertiesInterface::DTYPE_DEP_FILE => FileType::class,\n\t\t\tPropertiesInterface::DTYPE_DEP_FORM_SECTION => FormSectionType::class,\n\t\t\tPropertiesInterface::DTYPE_DEP_FORM_SECTION_CLOSE => FormSectionCloseType::class,\n\t\t\tPropertiesInterface::DTYPE_DEP_IMAGE => ImageType::class,\n\t\t\tPropertiesInterface::DTYPE_DEP_MTIME => MtimeType::class,\n\t\t\tPropertiesInterface::DTYPE_DEP_SOURCE => SourceType::class,\n\t\t\tPropertiesInterface::DTYPE_DEP_STIME => StimeType::class,\n\t\t\tPropertiesInterface::DTYPE_DEP_TIME_ONLY => TimeOnlyType::class,\n\t\t\tPropertiesInterface::DTYPE_DEP_TXTBOX => TxtboxType::class,\n\t\t\tPropertiesInterface::DTYPE_DEP_URL => UrlType::class,\n\t\t\tPropertiesInterface::DTYPE_DEP_URLLINK => UrllinkType::class,\n\t\t\tPropertiesInterface::DTYPE_ARRAY => ArrayType::class,\n\t\t\tPropertiesInterface::DTYPE_BOOLEAN => BooleanType::class,\n\t\t\tPropertiesInterface::DTYPE_DATETIME => DateTimeType::class,\n\t\t\tPropertiesInterface::DTYPE_FILE => \\Imponeer\\Properties\\Types\\FileType::class,\n\t\t\tPropertiesInterface::DTYPE_FLOAT => FloatType::class,\n\t\t\tPropertiesInterface::DTYPE_INTEGER => IntegerType::class,\n\t\t\tPropertiesInterface::DTYPE_LIST => ListType::class,\n\t\t\tPropertiesInterface::DTYPE_OBJECT => ObjectType::class,\n\t\t\tPropertiesInterface::DTYPE_OTHER => OtherType::class,\n\t\t\tPropertiesInterface::DTYPE_STRING => StringType::class\n\t\t];\n\t}", "public function getTypeAllowableValues()\n {\n return [\n self::TYPE_PACKAGE,\n self::TYPE_DOX,\n self::TYPE_PALLET,\n ];\n }", "function elements_type($arr){\n $keys = array_keys($arr);\n $int = $str = 0;\n foreach($keys as $key){\n if(is_int($key)){\n $int = 1; \n } \n else{\n $str = 1; \n }\n }\n $ret = array();\n if($int)\n $ret[]='int';\n if($str)\n $ret[]='str';\n \n return $ret; \n}", "public static function validTypes()\n\t{\n\t\treturn array(\n\t\t\t'NewOrder', 'MarkForCapture', 'Reversal', 'EndOfDay', 'Inquiry',\n\t\t\t'Profile', 'FlexCache', 'AccountUpdater', 'SafetechFraudAnalysis',\n\t\t);\n\t}", "public function typesProvider()\n {\n return [\n '1 Type' => ['Type1'],\n '2 Type' => [['Type1', 'Type2']],\n ];\n }", "protected function validateInput($input)\n {\n if ($this->expectArray) {\n if (! \\is_array($input)) {\n throw InvalidInputException::filterTypeError($this, $input);\n }\n\n return array_map(function ($value) {\n return TypeCaster::cast($value, $this->type, $this->format);\n }, $input);\n }\n\n if (\\is_array($input)) {\n throw InvalidInputException::filterTypeError($this, $input);\n }\n\n return TypeCaster::cast($input, $this->type, $this->format);\n }", "public function getTypeAllowableValues()\n {\n return [\n self::TYPE_PURCHASE,\nself::TYPE_REFUND,\nself::TYPE_PARTIAL_REFUND, ];\n }", "function FieldType ( $cFieldType=null )\n{\n if ( isset($cFieldType) ) {\n if ( $this->_FieldTypeStr != $cFieldType || $this->_inLoading_ ) {\n $this->_FieldTypeStr = $cFieldType;\n $this->_FieldTypeList = preg_split('/\\s*[,;]\\s*/',$cFieldType,-1,PREG_SPLIT_NO_EMPTY);\n }\n return true;\n } else {\n return join(',',$this->_FieldTypeList);\n }\n}", "public function getTypeAllowableValues()\n {\n return [\n self::TYPE_CART,\n self::TYPE_SINGLE_ITEM,\n self::TYPE_VOUCHER,\n self::TYPE_VENDOR,\n self::TYPE_TAG,\n ];\n }", "public function tags($value = null) {\n\t\tif(is_bool($value)) {\n\t\t\t// return array of tags\n\t\t\t$tags = parent::get('tags');\n\t\t\t$tags = str_replace(array(',', '|'), ' ', $tags);\n\t\t\t$_tags = explode(' ', $tags);\n\t\t\t$tags = array();\n\t\t\tforeach($_tags as $key => $tag) {\n\t\t\t\t$tag = trim($tag);\n\t\t\t\tif($value === false) $tag = strtolower($tag); // force lowercase\n\t\t\t\tif(!strlen($tag)) continue;\n\t\t\t\t$tags[strtolower($tag)] = $tag;\n\t\t\t}\n\t\t} else if($value !== null) {\n\t\t\t// set tags\n\t\t\tif(is_array($value)) $value = implode(' ', $value); // convert to string\n\t\t\t$value = $this->wire('sanitizer')->text($value);\n\t\t\tif(strpos($value, \"\\t\") !== false) $value = str_replace(\"\\t\", \" \", $value);\n\t\t\t// collapse extra whitespace\n\t\t\twhile(strpos($value, \" \") !== false) $value = str_replace(\" \", \" \", $value);\n\t\t\tparent::set('tags', $value);\t\n\t\t\t$tags = $value; \n\t\t} else {\n\t\t\t// just get tags string\n\t\t\t$tags = parent::get('tags');\n\t\t}\n\t\t\n\t\treturn $tags;\n\t}" ]
[ "0.7060679", "0.6297256", "0.58177537", "0.58061486", "0.57735026", "0.5656581", "0.549302", "0.549302", "0.5467446", "0.5464964", "0.5417649", "0.54007345", "0.5396815", "0.5386867", "0.53702384", "0.5366038", "0.53569436", "0.5317701", "0.5309507", "0.5298755", "0.52770895", "0.5267562", "0.52656704", "0.52630585", "0.52483267", "0.5247384", "0.5223806", "0.5210451", "0.52076447", "0.5205959", "0.52056104", "0.5200269", "0.5189559", "0.518642", "0.51822805", "0.51775396", "0.5131932", "0.5130756", "0.51088434", "0.5108089", "0.5107856", "0.51073897", "0.50957984", "0.50920856", "0.50904006", "0.50874674", "0.50798494", "0.50659835", "0.50623614", "0.5058891", "0.50564206", "0.50549227", "0.50549227", "0.50549227", "0.50549227", "0.5047635", "0.5035758", "0.5032608", "0.5030265", "0.501863", "0.5017002", "0.5016318", "0.5011803", "0.50096256", "0.500837", "0.4991458", "0.4989696", "0.49748528", "0.49746206", "0.4973674", "0.49734953", "0.4969409", "0.4969301", "0.4968481", "0.49473667", "0.49439526", "0.49363843", "0.4933987", "0.49333337", "0.49318555", "0.49290872", "0.4923514", "0.4923404", "0.49233732", "0.49157515", "0.49127838", "0.49063566", "0.49031958", "0.4901204", "0.49011898", "0.4899089", "0.48961696", "0.48943794", "0.48942453", "0.48895347", "0.48893887", "0.4884288", "0.48825073", "0.48815075", "0.4875434", "0.48727456" ]
0.0
-1
Generate random string and encrypt it.
public static function generatePassword() { return bcrypt(str_random(35)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function gen_random_string(){\n\t\t$chars =\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890\";\n\t\t$final_rand='';\t\t\n\t\tfor($i=0;$i<4; $i++) {\t\t \n\t\t$final_rand .= $chars[ rand(0,strlen($chars)-1)];\n\t\t}\t\t\n\t\treturn $final_rand;\t\n\t}", "function RandomString($num) {\r\r\n mt_srand((double)microtime()*1000000);\r\r\n while (strlen($pass) < $num) {\r\r\n $i = chr(mt_rand (48,57)); \r\r\n $pass = $pass.$i; \r\r\n }\r\r\n return ($pass); \r\r\n}", "private function genRandomKey()\n {\n return strtoupper(str_random(32));\n }", "public function randomString(){\n $alpha = \"abcdefghijklmnopqrstuvwxyz\";\n $alpha_upper = strtoupper($alpha);\n $numeric = \"0123456789\";\n $special = \".-+=_,!@$#*%<>[]{}\";\n $chars = $alpha . $alpha_upper . $numeric; \n $pw = ''; \n $chars = str_shuffle($chars);\n $pw = substr($chars, 8,8);\n return $pw;\n }", "public static function generateRandomString()\n {\n if (PHP_VERSION_ID >= 70000) {\n // phpcs:ignore\n $bytes = random_bytes(16);\n $result = bin2hex($bytes);\n } elseif (function_exists('openssl_random_pseudo_bytes')) {\n $bytes = openssl_random_pseudo_bytes(16, $cstrong);\n $result = bin2hex($bytes);\n } else {\n $generated = array();\n for ($i = 0; $i < 100; $i++) {\n $generated[] = mt_rand();\n }\n shuffle($generated);\n\n $result = md5(serialize($generated));\n }\n\n return $result;\n }", "public static function generatePassword() {\n\t\t$consonants = array (\n\t\t\t\t\"b\",\n\t\t\t\t\"c\",\n\t\t\t\t\"d\",\n\t\t\t\t\"f\",\n\t\t\t\t\"g\",\n\t\t\t\t\"h\",\n\t\t\t\t\"j\",\n\t\t\t\t\"k\",\n\t\t\t\t\"l\",\n\t\t\t\t\"m\",\n\t\t\t\t\"n\",\n\t\t\t\t\"p\",\n\t\t\t\t\"r\",\n\t\t\t\t\"s\",\n\t\t\t\t\"t\",\n\t\t\t\t\"v\",\n\t\t\t\t\"w\",\n\t\t\t\t\"x\",\n\t\t\t\t\"y\",\n\t\t\t\t\"z\" \n\t\t);\n\t\t$vocals = array (\n\t\t\t\t\"a\",\n\t\t\t\t\"e\",\n\t\t\t\t\"i\",\n\t\t\t\t\"o\",\n\t\t\t\t\"u\" \n\t\t);\n\t\t\n\t\t$password = '';\n\t\t\n\t\tsrand ( ( double ) microtime () * 1000000 );\n\t\tfor($i = 1; $i <= 4; $i ++) {\n\t\t\t$password .= $consonants [rand ( 0, 19 )];\n\t\t\t$password .= $vocals [rand ( 0, 4 )];\n\t\t}\n\t\t$password .= rand ( 0, 9 );\n\t\t\n\t\treturn $password;\n\t}", "private function generateSalt(): string\n {\n return base64_encode(random_bytes(16));\n }", "private function generateSalt(): string\n {\n return base64_encode(random_bytes(16));\n }", "private function randomString() {\r\n\t\t\t$rand=md5(microtime(true));\r\n\t\t\treturn $rand;\r\n\t\t}", "public static function generateKey(){\n $key = '';\n // [0-9a-z]\n for ($i=0;$i<32;$i++){\n $key .= chr(rand(48, 90));\n }\n self::$_key = $key;\n }", "private function generateSalt()\n {\n return str_random(16);\n }", "public function createRandString(){\n\n $new = '';\n srand((double)microtime() * 1000000);\n $char_list = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\";\n $char_list .= \"abcdefghijklmnopqrstuvwxyz\";\n $char_list .= \"1234567890\";\n\n for ($i = 0; $i < 8; $i++) {\n\n $new .= substr($char_list, (rand() % (strlen($char_list))), 1);\n\n }\n\n return $new;\n\n }", "public static function generatePassword()\n\t{\n\t\t$consonants = array(\"b\", \"c\", \"d\", \"f\", \"g\", \"h\", \"j\", \"k\", \"l\", \"m\", \"n\", \"p\", \"r\", \"s\", \"t\", \"v\", \"w\", \"x\", \"y\", \"z\");\n\t\t$vocals = array(\"a\", \"e\", \"i\", \"o\", \"u\");\n\n\t\t$password = '';\n\n\t\tsrand((double)microtime() * 1000000);\n\t\tfor ($i = 1; $i <= 4; $i++) {\n\t\t\t$password .= $consonants[rand(0, 19)];\n\t\t\t$password .= $vocals[rand(0, 4)];\n\t\t}\n\t\t$password .= rand(0, 9);\n\n\t\treturn $password;\n\t}", "function encrypt(string $string): string\n{\n $blowfishSalt = bin2hex(openssl_random_pseudo_bytes(22));\n $hash = crypt($string, \"$2y$12$\" . $blowfishSalt);\n\n return $hash;\n}", "public function randomPassword() {\n $alphabet = \"abcdefghijklmnopqrstuwxyzABCDEFGHIJKLMNOPQRSTUWXYZ0123456789\";\n $passphrase = array();\n $alphaLength = strlen($alphabet) - 1;\n for ($i = 0; $i < 8; $i++) {\n $n = rand(0, $alphaLength);\n $passphrase[] = $alphabet[$n];\n }\n return implode($passphrase);\n }", "private function generateRandomKey()\n {\n return substr(base_convert(sha1(uniqid(mt_rand(), true)), 16, 36), 0, 8);\n }", "private function _generate_enckey()\n {\n // encrypt user id and email so that nobody gets the user information\n $this->_user->enc_key = $this->encryption->encrypt($this->_user->id . '-' . $this->_user->email_address);\n\n // use codeigniters string helper to generate random key\n $string = random_string('alnum', 16);\n\n // encrypt it again just for nothing and then return the key.\n return $this->encryption->encrypt($string);\n }", "public function getRandomString()\n {\n if (! $this->random_string) {\n $this->random_string = bin2hex(openssl_random_pseudo_bytes(16));\n }\n return $this->random_string;\n }", "private function GenSalt()\n {\n $chars = array_merge(range('a','z'), range('A','Z'), range(0, 9));\n $max = count($chars) - 1;\n $str = \"\";\n $length = 22;\n \n while($length--) {\n shuffle($chars);\n $rand = mt_rand(0, $max);\n $str .= $chars[$rand];\n }\n return $str . '$';\n }", "public static function regenerateSalt()\n\t{\n\t\treturn PzPHP_Helper_String::createCode(mt_rand(40,45), PzPHP_Helper_String::ALPHANUMERIC_PLUS);\n\t}", "function random() {\n echo StringHelper::random(48);\n echo \"<br />\";\n echo StringHelper::random(16);\n echo \"<br />\";\n echo CryptHelper::generateKey(24);\n echo \"<br />\";\n echo CryptHelper::generateKey(8);\n }", "private function createRandomString() {\n\t\t$characters = 'abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ';\n\t\t$res = '';\n\t\tfor ($i = 0; $i < 20; $i++) {\n\t\t\t$res .= $characters[mt_rand(0, strlen($characters) - 1)];\n\t\t}\n\t\treturn $res;\n\t}", "protected function generateRandomString()\n {\n $chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $length = strlen($chars);\n $result = '';\n\n for ($i = 0; $i < 10; $i++) {\n $result .= $chars[rand(0, $length - 1)];\n }\n return $result;\n }", "function generate_random_str($no_of_chars) \n{\n return substr(md5(microtime()),rand(0,26),$no_of_chars);\n}", "function hash_generator($str, $key)\n{\n $nonce = random_bytes(SODIUM_CRYPTO_SECRETBOX_NONCEBYTES);\n $ciphertext = sodium_crypto_secretbox($str, $nonce, $key);\n\n return $nonce . $ciphertext;\n}", "function createSalt()\n{\n $text = uniqid(Rand(), TRUE);\n return substr($text, 0, 5);\n\n}", "public function generate()\n{\n\n//generate a unique id//\n\n$unique=uniqid();\n\n$mesadig=crypt($unique,rand());\n//encrypt with the salt//\n\n//FILETER FOR THE /\n\n$mesadig=str_replace('/', 'ssd', $mesadig);\n\nreturn $mesadig;\n\n}", "protected static function randomString()\n {\n $chars = \"abcdefghijklmnopqrstuvwxyz\";\n $str = \"\";\n for ($i = 0; $i < 10; $i++) {\n $str .= $chars[rand(0, strlen($chars)-1)];\n }\n return $str;\n }", "function generatePassword() {\n\t//* (c) Hitech Scripts 2003\n\t//* For more information, visit http://www.hitech-scripts.com\n\t//* modified for phpgiftreg by Chris Clonch\n\tmt_srand((double) microtime() * 1000000);\n\t$newstring = \"\";\n\tif ($GLOBALS[\"OPT\"][\"password_length\"] > 0) {\n\t\twhile(strlen($newstring) < $GLOBALS[\"OPT\"][\"password_length\"]) {\n\t\t\tswitch (mt_rand(1,3)) {\n\t\t\t\tcase 1: $newstring .= chr(mt_rand(48,57)); break; // 0-9\n\t\t\t\tcase 2: $newstring .= chr(mt_rand(65,90)); break; // A-Z\n\t\t\t\tcase 3: $newstring .= chr(mt_rand(97,122)); break; // a-z\n\t\t\t}\n\t\t}\n\t}\n\treturn $newstring;\n}", "function genRandomString() {\n //credits: http://bit.ly/a9rDYd\n $length = 50;\n $characters = \"0123456789abcdef\"; \n for ($p = 0; $p < $length ; $p++) {\n $string .= $characters[mt_rand(0, strlen($characters))];\n }\n\n return $string;\n }", "function passgen() {\r\n\t$pw = '';\r\n\t$pw_lenght = 8;\r\n $zeichen = \"0,1,2,3,4,5,6,7,8,9,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z\";\r\n $array_b = explode(\",\",$zeichen);\r\n for($i=0;$i<$pw_lenght;$i++) {\r\n \tsrand((double)microtime()*1000000);\r\n $z = rand(0,25);\r\n $pw .= \"\".$array_b[$z].\"\";\r\n }\r\n\treturn $pw;\r\n}", "public function generate_pw(){\n $alphabet = \"abcdefghijklmnopqrstuwxyzABCDEFGHIJKLMNOPQRSTUWXYZ0123456789\";\n $pass = str_shuffle($alphabet);\n $pass = substr($pass, 0, 8);\n $this->setPassword($pass);\n return $pass; //turn the array into a string\n }", "static public function generate()\n {\n return base64_encode(microtime().uniqid().rand());\n }", "function generateKey()\n\t{\n\t\treturn ( rand(1, 25) );\n\t}", "function GenerateKey() {\n // deterministic; see base.js.\n return rand();\n}", "public function generatePassword()\n {\n $a = $this->generateUsername();\n $b = random_int(0, 9);\n $c = random_int(0, 9);\n $d = random_int(0, 9);\n return \"$a$b$c$d\";\n }", "protected function random_string()\n {\n $key = '';\n $keys = array_merge( range('a','z'), range(0,9) );\n\n for($i=0; $i<10; $i++)\n {\n $key .= $keys[array_rand($keys)];\n }\n\n return $key;\n }", "function encrypt_password($plain) {\n $password = '';\n\n for ($i=0; $i<10; $i++) {\n $password .= $this->random2();\n }\n\n $salt = substr(md5($password), 0, 2);\n\n $password = md5($salt . $plain) . ':' . $salt;\n\n return $password;\n }", "function generate_string($strength = 16) {\n $input = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $input_length = strlen($input);\n $random_string = '';\n for($i = 0; $i < $strength; $i++) {\n $random_character = $input[mt_rand(0, $input_length - 1)];\n $random_string .= $random_character;\n }\n \n return $random_string;\n}", "private function generateKey(): string\n\t{\n\t\t// `+` and `/` are replaced by `-` and `_`, resp.\n\t\t// The other characters (a-z, A-Z, 0-9) are legal within an URL.\n\t\t// As the number of bytes is divisible by 3, no trailing `=` occurs.\n\t\treturn strtr(base64_encode(random_bytes(3 * self::RANDOM_ID_LENGTH / 4)), '+/', '-_');\n\t}", "function encrypt_password($plain) {\n $password = '';\n\n for ($i = 0; $i < 10; $i++) {\n $password .= $this->rand();\n }\n\n $salt = substr(md5($password), 0, 2);\n\n $password = md5($salt . $plain) . ':' . $salt;\n\n return $password;\n }", "function generateSalt() {\n $length = 10;\n $characters = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\";\n $charsLength = strlen($characters) - 1;\n $string = \"\";\n for($i=0; $i<$length; $i++) {\n $randNum = mt_rand(0, $charsLength);\n $string .= $characters[$randNum];\n }\n return $string;\n}", "function generateSaltPassword () {\n\treturn base64_encode(random_bytes(12));\n}", "function generateRandomString($len=32)\n{\nreturn substr(str_shuffle(str_repeat($x='0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ',$len)),0,$len);\n}", "function key_gen($str=''){\n\treturn str_replace('=','',base64_encode(md5($str)));\n}", "function createRandomPassword() { \n $chars \t= \"abcdefghijkmnopqrstuvwxyz023456789\"; \n srand((double)microtime()*1000000); \n $i \t\t= 0; \n $pass \t= '' ; \n\n while ($i <= 4) { \n $num \t= rand() % 33; \n $tmp \t= substr($chars, $num, 1); \n $pass \t= $pass . $tmp; \n $i++; \n } \n\n return $pass; \n }", "function generateRandomKey() {\n\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $key = '';\n\n for ($i = 0; $i < 13; $i++) {\n $key .= $characters[rand(0, strlen($characters) - 1)];\n }\n\n return $key;\n\n}", "protected function getRandomKey()\n {\n return Str::random(32);\n }", "function createSalt(){\r\n \t\t\t$string = md5(uniqid(rand(), true));\r\n \t\treturn substr($string, 0, 3);\r\n\t\t}", "private function genSalt() {\r\n $random = 0;\r\n $rand64 = \"\";\r\n $salt = \"\";\r\n $random = rand(); // Seeded via initialize()\r\n // Crypt(3) can only handle A-Z a-z ./\r\n $rand64 = \"./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\";\r\n $salt = substr( $rand64, $random % 64, 1 ) . substr( $rand64, ($random / 64) % 64, 1 );\r\n $salt = substr( $salt, 0, 2 ); // Just in case\r\n return($salt);\r\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}", "function createRandomPassword() {\r\n $chars = \"abcdefghijkmnopqrstuvwxyz023456789\";\r\n srand((double) microtime() * 1000000);\r\n $i = 0;\r\n $pass = '';\r\n\r\n while ($i <= 7) {\r\n $num = rand() % 33;\r\n $tmp = substr($chars, $num, 1);\r\n $pass = $pass . $tmp;\r\n $i++;\r\n }\r\n\r\n return $pass;\r\n }", "public static function randToken(): string\n {\n return base64_encode(openssl_random_pseudo_bytes(random_int(32, 256)));\n }", "public static function generatePassword() {\r\n return StringGenerator::generateRandomAlphaAndNumbersAndSpecial(12);\r\n }", "public static function generateNewAuthKey()\r\n {\r\n return Yii::$app->security->generateRandomString();\r\n }", "function generate_key()\n{\n $pool = \"qwertzupasdfghkyxcvbnm\";\n $pool .= \"23456789\";\n $pool .= \"WERTZUPLKJHGFDSAYXCVBNM\";\n srand ((double)microtime()*1000000);\n for($index = 0; $index < 10; $index++)\n {\n $akti .= substr($pool,(rand()%(strlen ($pool))), 1);\n }\n return $akti;\n}", "private function genSalt()\n {\n \treturn md5(time() + rand());\n }", "function generatePassword() {\n //Initialize the random password\n $password = '';\n\n //Initialize a random desired length\n $desired_length = rand(8, 12);\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n for ($length = 0; $length < $desired_length; $length++) {\n //Append a random ASCII character (including symbols)\n $password .= $characters[mt_rand(0, strlen($characters) - 1)];\n }\n\n return $password;\n }", "public function generateAuthKey()\n {\n $this->auth_key = (new Security)->generateRandomString();\n }", "protected function createSecretKey()\n\t{\n\t\treturn random_string('unique');\n\t}", "public function generateAuthKey() {\n\t\t$this->txt_auth_key = Yii::$app->security->generateRandomString ();\n\t}", "public function encrypt();", "public function ivGenerator() \n {\n $chars = \"a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,#,@,$,%,&,!\";\n $chars = explode(\",\", $chars);\n $ints = array();\n for ($i = 0; $i < 4; $i++) {\n array_push($ints, rand(0, 64));\n }\n $password = array();\n\n //composing the password\n foreach ($ints as $int) {\n $char = $chars[$int * rand(0, 3)];\n if (($int * rand(0, 3)) % 2 == 0) {\n $char = strtoupper($char);\n array_push($password, $int);\n }\n array_push($password, $char);\n }\n\n //convert the password array to string\n $stringpass = '';\n foreach ($password as $char) {\n $stringpass.=$char;\n }\n return $stringpass;\n }", "public function generateRandomPassword(){\n\t\t$new_password = htmlspecialchars(Password::strong_random_password());\n\t\tif(!empty($new_password)){\n\t\t\techo '<input id=\"new_pw\" value=\"'.$new_password.'\" class=\"form-control\" readonly/>';\n\t\t}\n\t}", "public function generateRandomPassword(){\n\t\t$new_password = htmlspecialchars(Password::strong_random_password());\n\t\tif(!empty($new_password)){\n\t\t\techo '<input id=\"new_pw\" value=\"'.$new_password.'\" class=\"form-control\" readonly/>';\n\t\t}\n\t}", "function random_string($max = 8)\n {\n $rtn = \"\";\n $chars = explode(\" \", \"a b c d e f g h i j k l m n o p q r s t u v w x y z 0 1 2 3 4 5 6 7 8 9\");\n for ($i = 0; $i < $max; $i++) {\n $rnd = array_rand($chars);\n $rtn .= base64_encode(md5($chars[$rnd]));\n }\n return substr(str_shuffle(strtolower($rtn)), 0, $max);\n }", "public function generateKey()\n\t{\n\t\treturn substr(md5(uniqid(mt_rand(), true)), 0, 3) . substr(md5(uniqid(mt_rand(), true)), 0, 2);\n\t}", "public static function generateSecretKey() : string\n {\n $secretKey = '';\n for ($i = 0; $i < 16; $i++) $secretKey .= self::CHARSET[random_int(0, 31)];\n return $secretKey;\n }", "public static function generate(): string\n {\n $token = base64_encode(random_bytes(36));\n Session::set(self::SESSION_KEY, $token);\n return $token;\n }", "public function getRandomAlphaNumStr(): string\n {\n $string = '';\n\n while (($len = \\strlen($string)) < 20) {\n $size = 20 - $len;\n\n $bytes = \\random_bytes($size);\n\n $string .= \\substr(\n \\str_replace(['/', '+', '='], '', \\base64_encode($bytes)), 0, $size);\n }\n\n return $string;\n }", "function generateSalt() {\n return str_shuffle(sha1(uniqid(mt_rand(), true)).md5(uniqid(mt_rand(), true)));\n}", "protected function random_password() \n {\n $length = 8;\n // 0 and O, l and 1 are all removed to prevent silly people who can't read to make mistakes.\n $characters = '23456789abcdefghijkmnpqrstuvwxyzABCDEFGHIJKLMNPQRSTUVWXYZ';\n $string = ''; \n for ($p = 0; $p < $length; $p++) {\n $string .= $characters[mt_rand(0, strlen($characters))];\n }\n return $string;\n }", "public function randomKey();", "public static function passTheSalt(): string\n {\n return (string) bin2hex(openssl_random_pseudo_bytes(16));\n }", "public function generate_code()\n {\n return $string = bin2hex(random_bytes(10));\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 }", "public function createRandomPassword() {\n\t\t$chars = \"abcdefghijkmnopqrstuvwxyz023456789\";\n\t\t\n\t\tsrand((double)microtime()*1000000);\n\t\t\n\t\t$i = 0;\n\t\t\n\t\t$pass = '' ;\n\t\t\n\t\twhile ($i <= 7) {\n\t\t\n\t\t\t$num = rand() % 33;\n\t\t\n\t\t\t$tmp = substr($chars, $num, 1);\n\t\t\n\t\t\t$pass = $pass . $tmp;\n\t\t\n\t\t\t$i++;\n\t\t\n\t\t}\n\t\treturn $pass;\n\t}", "function createpass(){\n$s=\"\";\nfor ($i=0;$i<7;$i++)\n$s.=rand(0,9);\nreturn $s;\n}", "function generarPassword() {\n\t\t$str = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890\";\n\t\t$cad = \"\";\n\t\tfor ($i = 0; $i < 8; $i++) {\n\t\t\t$cad .= substr($str, rand(0, 62), 1);\n\t\t}\n\t\treturn $cad;\n\t}", "function _generate_code_string() {\n\n $str = strval(microtime());\n return substr(md5($str),rand(0, 15) , 10);\n}", "public function generatePassword()\n {\n $characters = str_shuffle('abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ23456789');\n\n return substr($characters, 0, 6);\n }", "public static function generateRandomSalt()\n {\n $seed = uniqid(mt_rand(), true);\n $salt = base64_encode($seed);\n $salt = str_replace('+', '.', $salt);\n return substr($salt, 0, self::$saltLength);\n }", "function makeRandomPassword() {\r\n\t$salt = \"abchefghjkmnpqrstuvwxyz0123456789\";\r\n\t$pass = \"\";\r\n\tsrand((double)microtime()*1000000);\r\n \t$i = 0;\r\n \twhile ($i <= 7) {\r\n\t\t$num = rand() % 33;\r\n\t\t$tmp = substr($salt, $num, 1);\r\n\t\t$pass = $pass . $tmp;\r\n\t\t$i++;\r\n \t}\r\n \treturn $pass;\r\n}", "function createRandomPassword() {\r\n $chars = \"abcdefghijkmnopqrstuvwxyz023456789\";\r\n srand((double)microtime()*1000000);\r\n $i = 0;\r\n $pass = '' ;\r\n\r\n while ($i <= 7) {\r\n $num = rand() % 33;\r\n $tmp = substr($chars, $num, 1);\r\n $pass = $pass . $tmp;\r\n $i++;\r\n }\r\n\r\n return $pass;\r\n}", "public static function generateResetString(){\n return base_convert(md5(mt_rand()), 16, 36);\n }", "public static function generate_password()\n\t{\n\t\t$chars = array(\n\t\t\t'a','b','c','d','e','f','g','h','i','j','k','l','m','n',\n\t\t\t'o','p','q','r','s','t','u','v','w','x','y','z','A','B','C','D',\n\t\t\t'E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T',\n\t\t\t'U','V','W','X','Y','Z','1','2','3','4','5','6','7','8','9','0',\n\t\t\t'!','@','#','$','%','^','&','*','(',')','_','-','+','=','{','~',\n\t\t\t'}','[',']','|','/','?','>','<',':',';'\n\t\t);\n\n\t\t$new_pw = '';\n\t\tfor($i=0;$i<20;$i++)\n\t\t{\n\t\t\t$new_pw .= $chars[rand(0, count($chars)-1)];\n\t\t}\n\n\t\treturn $new_pw;\n\t}", "function generateRandomPassword(){\n $n = 10;\n $result = bin2hex(random_bytes($n));\n return $result;\n }", "private function generateNonce()\n {\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $string = '';\n $max = mb_strlen( $characters, '8bit' ) - 1;\n\n for ( $i = 0; $i < 32; ++$i )\n {\n $string .= $characters[random_int( 0, $max )];\n }\n\n return $string;\n }", "public function generateToken() : string\n {\n if (@file_exists('/dev/urandom')) { // Get 100 bytes of random data\n $randomData = file_get_contents('/dev/urandom', false, null, 0, 100);\n } elseif (function_exists('openssl_random_pseudo_bytes')) { // Get 100 bytes of pseudo-random data\n $bytes = openssl_random_pseudo_bytes(100, $strong);\n if (true === $strong && false !== $bytes) {\n $randomData = $bytes;\n }\n }\n\n // Last resort: mt_rand\n if (empty($randomData)) { // Get 108 bytes of (pseudo-random, insecure) data\n $randomData = mt_rand() . mt_rand() . mt_rand() . uniqid(mt_rand(), true) . microtime(true) . uniqid(\n mt_rand(),\n true\n );\n }\n\n return rtrim(strtr(base64_encode(hash('sha256', $randomData)), '+/', '-_'), '=');\n }", "function makeRandomPassword() { \n $salt = \"abchefghjkmnpqrstuvwxyz0123456789\"; \n srand((double)microtime()*1000000); \n $i = 0; \n while ($i <= 7) { \n $num = rand() % 33; \n $tmp = substr($salt, $num, 1); \n $pass = $pass . $tmp; \n $i++; \n } \n return $pass; \n}", "private function randomPassword() {\n\t\t$alphabet = \"abcdefghijklmnopqrstuwxyzABCDEFGHIJKLMNOPQRSTUWXYZ0123456789\";\n\t\t$pass = array(); //remember to declare $pass as an array\n\t\t$alphaLength = strlen($alphabet) - 1; //put the length -1 in cache\n\t\tfor ($i = 0; $i < 8; $i++) {\n\t\t\t$n = rand(0, $alphaLength);\n\t\t\t$pass[] = $alphabet[$n];\n\t\t}\n\t\treturn implode($pass); //turn the array into a string\n\t}", "public function encryptPass()\n {\n return \"RASAHolaRSSA\";\n }", "private function generateSalt(){\n return substr(md5(rand(0, 999)), 0, 5);\n }", "function RandomString(){\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $randstring = '';\n for ($i = 0; $i < 10; $i++) {\n $randstring .= $characters[rand(0, strlen($characters))];\n }\n return $randstring;\n}", "public static function getRandomString($length) \n{\n$pool = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\nreturn substr(str_shuffle(str_repeat($pool, $length)), 0, $length);\n}", "public static function generateKey()\n\t{\n\t\tToxusEncryption::$_key = Defuse\\Crypto\\Crypto::createNewRandomKey();\n\t\treturn ToxusEncryption::$_key;\n\t}", "function random_string($length,$char_set) {\n\t//parameter of generate_password func\n\t$temp = '';\n\tfor($i=0; $i < $length ; $i++)\n\t{\n\t\t$temp .= random_char($char_set);\n\t}\n\treturn $temp;\n}", "public function generateAuthKey()\n {\n $this->salt = OldDi::GetString(8);\n }", "function generate_auth() {\n\treturn sprintf('%08x%08x%08x%08x',\n\t\tmt_rand(0, 0xffffffff), mt_rand(0, 0xffffffff),\n\t\tmt_rand(0, 0xffffffff), mt_rand(0, 0xffffffff));\n}", "function generate_user_password()\n{\n $chars = \"0123456789abcdefghijklmnpqrstuvwxyzABCDEFGHIJKLMNPQRSTUVWXYZ\";\n\n srand((double)microtime()*1000000);\n $code = \"\";\n \n for ($i = 0; $i < 6; $i++)\n {\n $num = rand() % 60;\n $tmp = substr($chars, $num, 1);\n $code = $code . $tmp;\n }\n return $code;\n}", "private function generateRandomPassword() {\n $alphabet = \"23456789bcdefghijklmnopqrstuwxyzBCDEFGHIJKLMNOPQRSTUWXYZ\";\n $pass = array();\n $alphaLength = strlen($alphabet) - 1;\n for ($i = 0; $i < 8; $i ++) {\n $n = rand(0, $alphaLength);\n $pass [] = $alphabet [$n];\n }\n return implode($pass);\n }" ]
[ "0.7239724", "0.7219201", "0.72162765", "0.72002566", "0.7161891", "0.71079123", "0.709659", "0.709659", "0.7080384", "0.70438147", "0.70275384", "0.69833064", "0.695776", "0.69483566", "0.69478565", "0.6947674", "0.6938084", "0.693168", "0.6915596", "0.69081753", "0.69063777", "0.6867897", "0.686381", "0.68547404", "0.6847244", "0.6831642", "0.6829742", "0.6822747", "0.68164504", "0.68156064", "0.67940885", "0.67927474", "0.6783207", "0.67830867", "0.6782186", "0.676154", "0.67570335", "0.6754507", "0.6744703", "0.6744391", "0.67369133", "0.673066", "0.6706499", "0.6700891", "0.67000926", "0.6694369", "0.6693671", "0.6693546", "0.6693036", "0.6686417", "0.66839457", "0.66766465", "0.66738915", "0.6673425", "0.6670486", "0.6664893", "0.6662761", "0.66504246", "0.66485846", "0.6644926", "0.66445744", "0.66361594", "0.6633068", "0.6622404", "0.6622404", "0.6621814", "0.6621139", "0.6619316", "0.66155213", "0.6608099", "0.6606336", "0.6604948", "0.65933573", "0.65910304", "0.6588424", "0.6582959", "0.65829057", "0.65817136", "0.65761584", "0.6571424", "0.6570401", "0.65683323", "0.6562981", "0.6560909", "0.6552876", "0.6551319", "0.65502614", "0.6547071", "0.65427256", "0.65421593", "0.65402645", "0.65382683", "0.65305823", "0.6527173", "0.6523929", "0.65206844", "0.65200794", "0.6519954", "0.6512354", "0.6511384", "0.6502297" ]
0.0
-1
The bcrypt and argon2i algorithms don't require a separate salt.
public function getSalt() { // You *may* need a real salt if you choose a different encoder. return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function needSalt();", "public function getSalt()\n {\n //i might implement salt\n }", "public function getSalt()\n {\n // Not Used (The project uses bcrypt algorithm\n }", "abstract protected function getGeneratedSalt() ;", "private function getSalt() \n {\n /**\n * the base64 function uses +'s and ending ='s; translate the first, and cut out the latter\n */\n return sprintf('$2a$%02d$%s', $this->rounds, substr(strtr(base64_encode($this->getBytes()), '+', '.'), 0, 22));\n }", "function makeSalt() {\r\n static $seed = \"./ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\r\n $algo = (PHP_VERSION_ID >= 50307) ? '$2y' : '$2a'; //DON'T CHANGE THIS!!\r\n $strength = '$12'; //too high will time out script.\r\n $salt = '$';\r\n for ($i = 0; $i < 22; $i++) {\r\n $salt .= substr($seed, mt_rand(0, 63), 1);\r\n }\r\n return $algo . $strength . $salt;\r\n}", "protected function _createSalt()\n {\n return (\\function_exists('random_bytes')) ? random_bytes(16) : mcrypt_create_iv(16, \\MCRYPT_DEV_URANDOM);\n }", "function generateSaltPassword () {\n\treturn base64_encode(random_bytes(12));\n}", "protected function getGeneratedSalt() {}", "protected function getGeneratedSalt() {}", "private function generateSalt(): string\n {\n return base64_encode(random_bytes(16));\n }", "private function generateSalt(): string\n {\n return base64_encode(random_bytes(16));\n }", "public function getSalt()\n {\n }", "public function getSalt()\n {\n }", "public function getSalt()\n {\n }", "public function getSalt()\n {\n }", "public function getSalt()\n {\n }", "public function getSalt()\n {\n }", "public function getSalt()\n {\n }", "public function getSalt()\n {\n }", "public function getSalt()\n {\n }", "public function getSalt()\n {\n }", "public function getSalt()\n {\n }", "public function getSalt()\n {\n }", "public function getSalt()\n {\n }", "public function getSalt()\n {\n }", "public function getSalt()\n {\n }", "public function getSalt()\n {\n }", "public function getSalt()\n {\n }", "public function getSalt()\n {\n }", "public function getSalt()\n {\n }", "public function getSalt()\n {\n }", "public function getSalt()\n {\n }", "public function getSalt()\n {\n }", "public function getSalt()\n {\n }", "public function getSalt()\n {\n }", "function getSalt(){return '';}", "public function getSalt()\n {\n\n }", "function generateSalt($bytes = '16'){\n\treturn mcrypt_create_iv($bytes, MCRYPT_RAND);\n}", "private function genSalt() {\r\n $random = 0;\r\n $rand64 = \"\";\r\n $salt = \"\";\r\n $random = rand(); // Seeded via initialize()\r\n // Crypt(3) can only handle A-Z a-z ./\r\n $rand64 = \"./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\";\r\n $salt = substr( $rand64, $random % 64, 1 ) . substr( $rand64, ($random / 64) % 64, 1 );\r\n $salt = substr( $salt, 0, 2 ); // Just in case\r\n return($salt);\r\n }", "public function getSalt() {\n }", "function getSalt(){\n $inside = time() . \"az51\" . time(); \n $salt = '$2a$07$' . $inside . '$';\n return $salt;\n }", "private function generateSalt()\n {\n return str_random(16);\n }", "private function generateSalt() {\n $salt = base64_encode(pack(\"H*\", md5(microtime())));\n \n return substr($salt, 0, $this->saltLng);\n }", "protected function getAlgorithm(): int\n {\n return PASSWORD_BCRYPT;\n }", "public function getSalt(){ return; }", "function gen_mix_salt($pass) {\n $salt = generate_salt();\n return mix_salt($salt, $pass);\n}", "private function genSalt()\n {\n \treturn md5(time() + rand());\n }", "static public function generateVbPasswordSalt()\n {\n\t\t$hashSalt = '';\n\t\tfor ($i = 0; $i < 3; $i++)\n\t\t{\n\t\t\t$hashSalt .= chr(rand(0x41, 0x5A)); // A..Z\n\t\t}\n\t\t\n\t\treturn $hashSalt;\n }", "public function genSalt(){\n return mcrypt_create_iv(16, MCRYPT_DEV_URANDOM);\n }", "function salt(int $salt_length=22)\n\t{\n\n\t\t$raw_salt_len = 16;\n\n \t\t$buffer = '';\n $buffer_valid = false;\n\n if (function_exists('mcrypt_create_iv') && !defined('PHALANGER')) {\n $buffer = mcrypt_create_iv($raw_salt_len, MCRYPT_DEV_URANDOM);\n if ($buffer) {\n $buffer_valid = true;\n }\n }\n\n if (!$buffer_valid && function_exists('openssl_random_pseudo_bytes')) {\n $buffer = openssl_random_pseudo_bytes($raw_salt_len);\n if ($buffer) {\n $buffer_valid = true;\n }\n }\n\n if (!$buffer_valid && @is_readable('/dev/urandom')) {\n $f = fopen('/dev/urandom', 'r');\n $read = strlen($buffer);\n while ($read < $raw_salt_len) {\n $buffer .= fread($f, $raw_salt_len - $read);\n $read = strlen($buffer);\n }\n fclose($f);\n if ($read >= $raw_salt_len) {\n $buffer_valid = true;\n }\n }\n\n if (!$buffer_valid || strlen($buffer) < $raw_salt_len) {\n $bl = strlen($buffer);\n for ($i = 0; $i < $raw_salt_len; $i++) {\n if ($i < $bl) {\n $buffer[$i] = $buffer[$i] ^ chr(mt_rand(0, 255));\n } else {\n $buffer .= chr(mt_rand(0, 255));\n }\n }\n }\n\n $salt = $buffer;\n\n // encode string with the Base64 variant used by crypt\n $base64_digits = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\n $bcrypt64_digits = './ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n $base64_string = base64_encode($salt);\n $salt = strtr(rtrim($base64_string, '='), $base64_digits, $bcrypt64_digits);\n\n\t $salt = substr($salt, 0, $salt_length);\n\n\n\t\treturn $salt;\n\n\t}", "private function generateSalt(){\n return substr(md5(rand(0, 999)), 0, 5);\n }", "function SecureSalt() \t{\n\treturn substr(sha1(uniqid(rand(),true)),0,40);\n}", "function gen_salt($salt_length=22)\n\t{\n\t\t$raw_salt_len = 16;\n \t\t$buffer = '';\n $buffer_valid = false;\n\n\t\tif (function_exists('mcrypt_create_iv') && !defined('PHALANGER')) {\n\t\t\t$buffer = mcrypt_create_iv($raw_salt_len, MCRYPT_DEV_URANDOM);\n\t\t\tif ($buffer) {\n\t\t\t\t$buffer_valid = true;\n\t\t\t}\n\t\t}\n\n\t\tif (!$buffer_valid && function_exists('openssl_random_pseudo_bytes')) {\n\t\t\t$buffer = openssl_random_pseudo_bytes($raw_salt_len);\n\t\t\tif ($buffer) {\n\t\t\t\t$buffer_valid = true;\n\t\t\t}\n\t\t}\n\n\t\tif (!$buffer_valid && @is_readable('/dev/urandom')) {\n\t\t\t$f = fopen('/dev/urandom', 'r');\n\t\t\t$read = strlen($buffer);\n\t\t\twhile ($read < $raw_salt_len) {\n\t\t\t\t$buffer .= fread($f, $raw_salt_len - $read);\n\t\t\t\t$read = strlen($buffer);\n\t\t\t}\n\t\t\tfclose($f);\n\t\t\tif ($read >= $raw_salt_len) {\n\t\t\t\t$buffer_valid = true;\n\t\t\t}\n\t\t}\n\n\t\tif (!$buffer_valid || strlen($buffer) < $raw_salt_len) {\n\t\t\t$bl = strlen($buffer);\n\t\t\tfor ($i = 0; $i < $raw_salt_len; $i++) {\n\t\t\t\tif ($i < $bl) {\n\t\t\t\t\t$buffer[$i] = $buffer[$i] ^ chr(mt_rand(0, 255));\n\t\t\t\t} else {\n\t\t\t\t\t$buffer .= chr(mt_rand(0, 255));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$salt = $buffer;\n\n\t\t// encode string with the Base64 variant used by crypt\n\t\t$base64_digits = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\n\t\t$bcrypt64_digits = './ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n\t\t$base64_string = base64_encode($salt);\n\t\t$salt = strtr(rtrim($base64_string, '='), $base64_digits, $bcrypt64_digits);\n\n\t\t$salt = substr($salt, 0, $salt_length);\n\n\t\treturn $salt;\n\t}", "function salt_and_encrypt($password) {\n\t$hash_format=\"$2y$10$\";\n\t$salt_length=22;\n\t$salt=generate_salt($salt_length);\n\t$format_and_salt=$hash_format.$salt;\n\t$hash=crypt($password,$format_and_salt);\t\n\treturn $hash;\n}", "public function createSalt()\n{\n\t$pool = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n\n\treturn substr(str_shuffle(str_repeat($pool, 5)), 0, $this->saltLength);\n}", "function getPasswordSalt(){\n\t\treturn substr( str_pad( dechex( mt_rand() ), 8, '0', STR_PAD_LEFT ), -8 );\n\t}", "function makeHash($password) {\r\n return crypt($password, makeSalt());\r\n}", "public function testSalt() {\n // Initialize variables\n $string = 'Hello World!';\n\n // Create salt\n $salt = security::salt( $string );\n\n $this->assertGreaterThan( 32, strlen( $salt ) );\n }", "function deriveKeyFromUserPassword( string $password, string $salt ) : string\n{\n\t$outLength = SODIUM_CRYPTO_SIGN_SEEDBYTES;\n\t$seed = sodium_crypto_pwhash(\n\t\t$outLength,\n\t\t$password,\n\t\t$salt,\n\t\tSODIUM_CRYPTO_PWHASH_OPSLIMIT_INTERACTIVE,\n\t\tSODIUM_CRYPTO_PWHASH_MEMLIMIT_INTERACTIVE\n\t);\n\n\treturn $seed;\n}", "private function generateSalt() {\r\n\t\t$possibleValues = '0123456789abcdefghijklmnopqrstuvxyzABCDEFGHIJKLMNOPQRSTUVXYZ';\r\n\t\t$salt = '';\t\t\r\n\t\tfor($i = 0; $i < 10; $i++) {\r\n\t\t\t$salt .= $possibleValues[mt_rand(0, strlen($possibleValues)-1)];\t\r\n\t\t}\t\t\r\n\t\treturn $salt;\r\n\t}", "function generateSalt() {\n return str_shuffle(sha1(uniqid(mt_rand(), true)).md5(uniqid(mt_rand(), true)));\n}", "function getRandomeSalt() {\r\n $salt = mcrypt_create_iv(23, MCRYPT_DEV_URANDOM);\r\n $salt = base64_encode($salt);\r\n $salt = str_replace('+', '.', $salt);\r\n return $salt;\r\n}", "function gen_salt($algo) {\n switch($algo) {\n case 'sha256':\n return base64_encode(mcrypt_create_iv (192, MCRYPT_DEV_RANDOM));\n // per man 3 crypt the salt is a maximum of 16 characters\n // and the salt character set is [a–zA–Z0–9./]\n // this is less than the rule of thumb for larger hash sizes\n // handle it as a separate case\n case 'crypt-sha256':\n $iv = mcrypt_create_iv (96, MCRYPT_DEV_RANDOM);\n return str_replace('+', '.', base64_encode($iv));\n }\n return false;\n}", "public function setSalt($salt = '');", "public function getSalt(): string\n {\n return '';\n }", "function createPasswordSalt() {\n\t\t$userSystem = new SpotUserSystem($this->_db, $this->_settings);\n\t\t$salt = $userSystem->generateUniqueId() . $userSystem->generateUniqueId();\n\t\t\n\t\t$this->setIfNot('pass_salt', $salt);\n\t}", "function createSalt()\r\n\r\n{\r\n\r\n $string = md5(uniqid(rand(), true));\r\n\r\n return substr($string, 0, 5);\r\n\r\n}", "public function testUnknownSalt()\n {\n Password::salt( -1 );\n }", "public function getSalt()\n {\n return md5(random_bytes(50));\n }", "private function getUniqueSalt() {\n /* To generate the salt, first generate enough random bytes. Because\n * base64 returns one character for each 6 bits, so we should generate\n * at least 22*6/8 = 16.5 bytes, so we generate 17 bytes. Then we get the first\n * 22 base64 characters\n */\n\n /* As blowfish takes a salt with the alphabet ./A-Za-z0-9 we have to\n * replace any '+', '=' in the base64 string with '..'.\n */\n $random = base64_encode(openssl_random_pseudo_bytes(17));\n //take only the first 22 caracters\n $random = substr($random, 0, 22);\n\n //replace +,= by .\n return strtr($random, '+=', '..');\n }", "function generateSalt() {\n\t$numberOfDesiredBytes = 16;\n\t$salt = random_bytes($numberOfDesiredBytes);\n\treturn $salt;\n}", "protected static function getDefaultSaltMethods() {}", "function generateSalt() {\n $length = 10;\n $characters = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\";\n $charsLength = strlen($characters) - 1;\n $string = \"\";\n for($i=0; $i<$length; $i++) {\n $randNum = mt_rand(0, $charsLength);\n $string .= $characters[$randNum];\n }\n return $string;\n}", "public function getSalt() {\n\t\t$salt = mcrypt_create_iv(22, MCRYPT_DEV_URANDOM);\t\t\t\t\t\t\t\t\t// creates an initialization vector from a 22 characters and /dev/random\n\t\t$salt = base64_encode($salt);\n\t\t$salt = str_replace('+', '.', $salt);\n\t\treturn $salt;\n\t}", "public function test_bcrypt_password()\n {\n $password = 'latik';\n $hash = '$2y$10$FaYxJhIMPjBsS3KIpBIM0eJqDfsAIV.iRZjrLFmnd9BJ2w1PKVVfy';\n\n $this->assertTrue(Hash::check($password, $hash));\n }", "static function generateSalt($strength=10) {\n return self::saltStart($strength) . random_string(22, './0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz');\n }", "public function getSalt() : void\n {\n // see section on salt below\n return;\n }", "public function hash_user_pass($password) {\n\n $salt = sha1(rand());\n $salt = substr($salt, 0, 10);\n\n//PASSWORD_DEFAULT is a default function in PHP it contains BCRYPT algo at backend PHP is using BCRYPT currently\n//as it is most secure password hashing algorithm using today the term DEFAULT means that if another hashing algorithm is introduced in\n//future it will automatically updated to the library ny PHP so the developer has no need to update in the code.\n $hashing = password_hash($password.$salt, PASSWORD_DEFAULT);\n $hash = array(\"salt\" => $salt, \"hashing\" => $hashing);\n\n return $hash;\n\n}", "public static function generateSalt() {\n $salt = '$2a$13$';\n $salt = $salt . md5(mt_rand());\n return $salt;\n }", "function getCryptHash($str)\n{\n $salt = '';\n if (CRYPT_BLOWFISH) {\n if (version_compare(PHP_VERSION, '5.3.7') >= 0) { // http://www.php.net/security/crypt_blowfish.php\n $algo_selector = '$2y$';\n } else {\n $algo_selector = '$2a$';\n }\n $workload_factor = '12$'; // (around 300ms on Core i7 machine)\n $val_arr = array(\n '.',\n '/'\n );\n $range1 = range('0', '9');\n $range2 = range('a', 'z');\n $range3 = range('A', 'Z');\n $res_arr = array_merge($val_arr, $range1, $range2, $range3);\n $salt = $algo_selector . $workload_factor . getRandomStr($res_arr, 22); // './0-9A-Za-z'\n \n } else if (CRYPT_MD5) {\n $algo_selector = '$1$';\n $char1 = chr(33);\n $char2 = chr(127);\n $range = range($char1, $char2);\n $salt = $algo_selector . getRandomStr($range, 12); // actually chr(0) - chr(255), but used ASCII only\n \n } else if (CRYPT_SHA512) {\n $algo_selector = '$6$';\n $workload_factor = 'rounds=5000$';\n $char1 = chr(33);\n $char2 = chr(127);\n $range = range($char1, $char2);\n $salt = $algo_selector . $workload_factor . getRandomStr($range, 16); // actually chr(0) - chr(255), but used ASCII only\n \n } else if (CRYPT_SHA256) {\n $algo_selector = '$5$';\n $workload_factor = 'rounds=5000$';\n $char1 = chr(33);\n $char2 = chr(127);\n $range = range($char1, $char2);\n $salt = $algo_selector . $workload_factor . getRandomStr($range, 16); // actually chr(0) - chr(255), but used ASCII only\n \n } else if (CRYPT_EXT_DES) {\n $algo_selector = '_';\n $val_arr = array(\n '.',\n '/'\n );\n $range1 = range('0', '9');\n $range2 = range('a', 'z');\n $range3 = range('A', 'Z');\n $res_arr = array_merge($val_arr, $range1, $range2, $range3);\n $salt = $algo_selector . getRandomStr($res_arr, 8); // './0-9A-Za-z'.\n \n } else if (CRYPT_STD_DES) {\n $algo_selector = '';\n $val_arr = array(\n '.',\n '/'\n );\n $range1 = range('0', '9');\n $range2 = range('a', 'z');\n $range3 = range('A', 'Z');\n $res_arr = array_merge($val_arr, $range1, $range2, $range3);\n $salt = $algo_selector . getRandomStr($res_arr, 2); // './0-9A-Za-z'\n \n }\n return crypt($str, $salt);\n}", "function _salt($str)\n\t{\n\t\treturn sha1($this->CI->config->item('encryption_key').$str);\n\t}", "public function getSalt(){\n return '';\n }", "function createSalt()\n {\n $string = md5(uniqid(rand(), true));\n return substr($string, 0, 3);\n }", "function salt()\r\n{\r\n\t//return mcrypt_create_iv( 32 );\r\n\r\n\t$string = md5(uniqid(rand(), true));\r\n\treturn substr( $string, 0, 3 );\r\n}", "public function salt($name, $value): string {}", "function openssl_pbkdf2(string $password, string $salt, int $key_length, int $iterations, string $digest_algo = 'sha1'): string|false {}", "function generateArgon2idMinimal($password, $salt) {\r\n $opsLimit= 2;\r\n $memLimit = 8192 * 1024;\r\n $outputLength = 32;\r\n return sodium_crypto_pwhash ($outputLength, $password, $salt, $opsLimit, $memLimit, SODIUM_CRYPTO_PWHASH_ALG_ARGON2ID13);\r\n}", "public function getSalt()\n {\n // TODO: Implement getSalt() method.\n }", "function createSalt()\n{\n $text = uniqid(Rand(), TRUE);\n return substr($text, 0, 5);\n\n}", "public function getSalt()\n {\n return '';\n }", "public function getSalt()\n {\n return '';\n }", "public function getSalt()\n {\n return '';\n }", "function get_password_hash($password) {\n return crypt($password, \"$2a$07$\" . salt() . \"$\");\n}", "function makeSalt() {\n $string = md5(uniqid(rand(), true));\n return substr($string, 0, 3);\n}", "public function getSalt()\n {\n return null;\n }", "public function getSalt()\n {\n // see section on salt below\n //return null;\n }", "protected function _create_salt()\n\t{\n\t\t$this->CI->load->helper('string');\n\t\treturn sha1(random_string('alnum', 32));\n\t}", "function password_encrypt($password) {\n\t $hash_format = \"$2y$10$\"; // Use Blowfish with a \"cost\" of 10\n\t $salt_length = 22; \t\t\t\t\t// Blowfish salts should be 22-characters or more\n\t $salt = generate_salt($salt_length);\n\t $format_and_salt = $hash_format . $salt;\n\t $hash = crypt($password, $format_and_salt);\n\t return $hash;\n\t}", "function createSalt(){\r\n \t\t\t$string = md5(uniqid(rand(), true));\r\n \t\treturn substr($string, 0, 3);\r\n\t\t}", "private function GenSalt()\n {\n $chars = array_merge(range('a','z'), range('A','Z'), range(0, 9));\n $max = count($chars) - 1;\n $str = \"\";\n $length = 22;\n \n while($length--) {\n shuffle($chars);\n $rand = mt_rand(0, $max);\n $str .= $chars[$rand];\n }\n return $str . '$';\n }" ]
[ "0.7713707", "0.74152833", "0.73655415", "0.73398477", "0.7223767", "0.7155799", "0.71371675", "0.7116331", "0.71138614", "0.71138614", "0.70737004", "0.70737004", "0.70678276", "0.70678276", "0.70678276", "0.70678276", "0.70678276", "0.70678276", "0.70678276", "0.70678276", "0.70678276", "0.70678276", "0.70678276", "0.70678276", "0.70678276", "0.70678276", "0.70678276", "0.70678276", "0.70678276", "0.70678276", "0.70678276", "0.70678276", "0.70678276", "0.70678276", "0.70678276", "0.70678276", "0.70513403", "0.7034948", "0.70112324", "0.69983155", "0.6992007", "0.69697714", "0.6968913", "0.6968476", "0.69501543", "0.6914921", "0.6898963", "0.68949175", "0.6891438", "0.68545604", "0.68434054", "0.68428713", "0.68419975", "0.6793108", "0.67549086", "0.6748266", "0.67383534", "0.6734425", "0.6727273", "0.67222106", "0.67210186", "0.6714272", "0.6711981", "0.6709832", "0.67024374", "0.66744334", "0.6673421", "0.6652148", "0.66504496", "0.66500014", "0.6643775", "0.66277766", "0.6625213", "0.6623435", "0.661728", "0.6614617", "0.66053915", "0.658905", "0.65845", "0.6575272", "0.6568044", "0.6560467", "0.655835", "0.6556287", "0.65554273", "0.6549115", "0.65471977", "0.654406", "0.6541322", "0.6535921", "0.65356535", "0.65356535", "0.65356535", "0.65346414", "0.65242785", "0.6517932", "0.6511294", "0.65023446", "0.64883715", "0.64863485", "0.64828986" ]
0.0
-1
Your tear down methods here.
public function tearDown(): void { // Then... parent::tearDown(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function tear_down()\n {\n }", "protected function tear_down()\n {\n }", "protected function tear_down()\n {\n }", "protected function tear_down()\n {\n }", "protected function tear_down()\n {\n }", "public function tear_down()\n {\n }", "public function tear_down()\n {\n }", "public function tear_down()\n {\n }", "public function __destruct()\r\n {\r\n // Perform any clean-up here\r\n }", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function cleanUp() {}", "public function teardown()\n {\n }", "public function teardown()\n {\n //\n }", "public function tear_down() {\n\t\t$this->registry = null;\n\n\t\tparent::tear_down();\n\t}", "protected function tear_down()\n {\n unset($this->_object, $this->_view);\n }", "public function cleanUp();", "public function cleanUp();", "public function cleanUp();", "public function cleanup()\n {\n }", "public function cleanup() {\n\t\t//TODO\n\t}", "protected function __del__() { }", "public function cleanup()\n\t{\n\t}", "public function cleanup()\n\t{\n\t\t\n\t}", "protected function __destruct() {\n\n parent::__destruct();\n }", "protected function __destruct() \r\n {\r\n parent::__destruct();\r\n }", "protected function __destruct() \n {\n parent::__destruct();\n }", "public function cleanup(): void\n {\n }", "public function cleanup(): void\n {\n }", "function __destruct() {\r\n $this->Initialize();\r\n }", "function __destruct() {\r\n parent::__destruct();\r\n }", "public function __destruct()\n {\n }", "public function __destruct()\n {\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 __destruct()\n {\n // Vacio por el momento.\n }", "public function teardown()\n {\n parent::teardown();\n }", "public function __destruct()\n {\n parent::__destruct();\n }", "public function __destruct()\n\t{\n\t\t$this->db = null;\n\t\t$this->cat_data = false;\n\t\t$this->settings = null;\n\t}", "public function tearDown() {\n $this->resource = null;\n $this->response = null;\n $this->database = null;\n $this->storage = null;\n $this->event = null;\n $this->manager = null;\n }", "public function tear_down() {\n\t\tunset( $GLOBALS['link'] );\n\t\tparent::tear_down();\n\t}", "public function tearDown() : void {\n\t\tunset($this->ls); /* Kill circular references */\n\t\tunset($this->lsconn); /* Kill circular references */\n\t}", "protected function tearDown()\n\t{\n\t\t$this->instance = null;\n\t}", "public function __destruct() {\n\n\t\t}", "function __destruct()\n\t\t{\n\t\t\tparent::__destruct();\n\t\t}", "public function __destruct() {\t\n\n }", "public function __destruct()\r\n {\r\n }", "public function __destruct () {\n \n }", "function __destruct() {\n\t\tparent::__destruct();\n\t}", "function __destruct()\n {\n }", "function __destruct()\n {\n }", "function __destruct()\n {\n }", "public function __destruct() {\n\t\tparent::__destruct();\n\t}", "protected function tearDown(): void\n {\n $this->config = null;\n $this->container = null;\n $this->instance = null;\n }", "protected function tear_down()\n {\n unset($this->adapter);\n\n $this->Zend_Service_Amazon_Ec2_Keypair = null;\n\n parent::tear_down();\n }", "public function __destruct()\r\n\t\t{\t\t\t\r\n\t\t}", "function __destruct()\n {\n parent::__destruct();\n }", "public function __destruct() {\r\n }", "protected function tearDown()\n\t{\n\t\tSystem_Serializer_Dom::setPluginLoader(null);\n\t}" ]
[ "0.8681912", "0.8681912", "0.8681912", "0.8681912", "0.8681912", "0.86081624", "0.86081624", "0.86081624", "0.79417676", "0.79365194", "0.79365194", "0.79365194", "0.79365194", "0.79365194", "0.79365194", "0.79365194", "0.79365194", "0.79365194", "0.79365194", "0.79365194", "0.79365194", "0.79365194", "0.79365194", "0.79365194", "0.79365194", "0.79365194", "0.79365194", "0.79365194", "0.79365194", "0.79365194", "0.79365194", "0.79365194", "0.79365194", "0.79365194", "0.79365194", "0.79365194", "0.79365194", "0.79365194", "0.79365194", "0.79365194", "0.79365194", "0.79365194", "0.7936487", "0.7936487", "0.7936487", "0.7936487", "0.7936487", "0.7936487", "0.7936487", "0.79342896", "0.79342896", "0.79342896", "0.79342896", "0.79342896", "0.79342896", "0.78441423", "0.7838756", "0.78375757", "0.77944374", "0.77629775", "0.77629775", "0.77629775", "0.77472395", "0.7700319", "0.7690686", "0.7604471", "0.7562255", "0.7556589", "0.75413054", "0.75295824", "0.7509648", "0.7509648", "0.7495221", "0.7486572", "0.7479784", "0.74796194", "0.74583274", "0.7455232", "0.7444765", "0.7430534", "0.74247605", "0.73844254", "0.7378176", "0.73741275", "0.73706967", "0.7368351", "0.7365408", "0.73590225", "0.73526233", "0.7347297", "0.73409975", "0.7337312", "0.7337312", "0.7337312", "0.73365974", "0.73173934", "0.731675", "0.7314066", "0.7313543", "0.7303913", "0.72963405" ]
0.0
-1
Show the application dashboard.
public function index() { $services = $this->services(); $images = $this->images(); $dishes = $this->dishes(); return view('home', ['services' => $services, 'images' => $images, 'dishes' => $dishes]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function dashboard()\n {\n\n $pageData = (new DashboardService())->handleDashboardLandingPage();\n\n return view('application', $pageData);\n }", "function dashboard() {\r\n\t\t\tTrackTheBookView::render('dashboard');\r\n\t\t}", "public function showDashboard() { \n\t\n return View('admin.dashboard');\n\t\t\t\n }", "public function showDashboard()\n {\n return View::make('users.dashboard', [\n 'user' => Sentry::getUser(),\n ]);\n }", "public function dashboard()\n {\n return view('backend.dashboard.index');\n }", "public function index() {\n return view(\"admin.dashboard\");\n }", "public function dashboard()\n {\n return $this->renderContent(\n view('dashboard'),\n trans('sleeping_owl::lang.dashboard')\n );\n }", "public function dashboard(){\n return view('backend.admin.index');\n }", "public function showDashBoard()\n {\n \treturn view('Admins.AdminDashBoard');\n }", "public function dashboard()\n {\n return view('dashboard.index');\n }", "public function index()\n {\n return view('admin.dashboard', ['title' => 'Dashboard']);\n }", "public function dashboard() \r\n {\r\n return view('admin.index');\r\n }", "public function dashboard()\n\t{\n\t\t$page_title = 'organizer dashboard';\n\t\treturn View::make('organizer.dashboard',compact('page_title'));\n\t}", "public function dashboard()\n {\n\t\t$traffic = TrafficService::getTraffic();\n\t\t$devices = TrafficService::getDevices();\n\t\t$browsers = TrafficService::getBrowsers();\n\t\t$status = OrderService::getStatus();\n\t\t$orders = OrderService::getOrder();\n\t\t$users = UserService::getTotal();\n\t\t$products = ProductService::getProducts();\n\t\t$views = ProductService::getViewed();\n\t\t$total_view = ProductService::getTotalView();\n\t\t$cashbook = CashbookService::getAccount();\n $stock = StockService::getStock();\n\n return view('backend.dashboard', compact('traffic', 'devices', 'browsers', 'status', 'orders', 'users', 'products', 'views', 'total_view', 'cashbook', 'stock'));\n }", "public function dashboard()\n {\n\n return view('admin.dashboard');\n }", "public function dashboard()\n {\n return view('dashboard');\n }", "public function dashboard()\n {\n return view('dashboard');\n }", "public function dashboard()\n {\n return view('dashboard');\n }", "public function dashboard()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('adm.dashboard');\n }", "public function dashboard()\n {\n $users = \\App\\User::all()->count();\n $roles = \\Spatie\\Permission\\Models\\Role::all()->count();\n $permissions = \\Spatie\\Permission\\Models\\Permission::all()->count();\n $banner = \\App\\Banner::all();\n $categoria = \\App\\Categoria::all();\n $entidadOrganizativa = \\App\\Entidadorganizativa::all();\n $evento = \\App\\Evento::all();\n $fichero = \\App\\Fichero::all();\n $recurso = \\App\\Recurso::all();\n $redsocial = \\App\\Redsocial::all();\n $subcategoria = \\App\\Subcategoria::all();\n $tag = \\App\\Tag::all();\n\n $entities = \\Amranidev\\ScaffoldInterface\\Models\\Scaffoldinterface::all();\n\n return view('scaffold-interface.dashboard.dashboard',\n compact('users', 'roles', 'permissions', 'entities',\n 'banner', 'categoria', 'entidadOrganizativa',\n 'evento', 'fichero', 'recurso', 'redsocial', 'subcategoria', 'tag')\n );\n }", "public function show()\n {\n return view('dashboard');\n }", "public function index()\n\t{\n\t\treturn View::make('dashboard');\n\t}", "public function index() {\n return view('modules.home.dashboard');\n }", "public function show()\n {\n return view('dashboard.dashboard');\n \n }", "public function index()\n {\n return view('admin.dashboard.dashboard');\n\n }", "public function dashboard()\n { \n return view('jobposter.dashboard');\n }", "public function show()\n\t{\n\t\t//\n\t\t$apps = \\App\\application::all();\n\t\treturn view('applications.view', compact('apps'));\n\t}", "public function index()\n {\n return view('pages.admin.dashboard');\n }", "public function indexAction()\n {\n $dashboard = $this->getDashboard();\n\n return $this->render('ESNDashboardBundle::index.html.twig', array(\n 'title' => \"Dashboard\"\n ));\n }", "public function index()\n {\n //\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('admin.dashboard.index');\n }", "public function dashboard()\n {\n return view('pages.backsite.dashboard');\n }", "public function index()\n {\n // return component view('dashboard.index');\n return view('layouts.admin_master');\n }", "public function index()\n {\n\n $no_of_apps = UploadApp::count();\n $no_of_analysis_done = UploadApp::where('isAnalyzed', '1')->count();\n $no_of_visible_apps = AnalysisResult::where('isVisible', '1')->count();\n\n return view('admin.dashboard', compact('no_of_apps', 'no_of_analysis_done', 'no_of_visible_apps'));\n }", "public function getDashboard() {\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('smartcrud.auth.dashboard');\n }", "public function index()\n {\n if($this->isAdmin() == TRUE)\n {\n $this->loadThis();\n }\n $this->global['pageTitle'] = 'Touba : Dashboard';\n \n $this->loadViews(\"dashboard\", $this->global, NULL , NULL);\n }", "public function dashboard() {\n $data = ['title' => 'Dashboard'];\n return view('pages.admin.dashboard', $data)->with([\n 'users' => $this->users,\n 'num_services' => Service::count(),\n 'num_products' => Product::count(),\n ]);\n }", "public function index()\n {\n return view('board.pages.dashboard-board');\n }", "public function index()\n {\n return view('admin::settings.development.dashboard');\n }", "public function index()\n {\n return view('dashboard.dashboard');\n }", "public function show()\n {\n return view('dashboard::show');\n }", "public function adminDash()\n {\n return Inertia::render(\n 'Admin/AdminDashboard', \n [\n 'data' => ['judul' => 'Halaman Admin']\n ]\n );\n }", "public function dashboard()\n {\n return view('Admin.dashboard');\n }", "public function show()\n {\n return view('admins\\auth\\dashboard');\n }", "public function index()\n {\n // Report =============\n\n return view('Admin.dashboard');\n }", "public function index()\n {\n return view('bitaac::account.dashboard');\n }", "public function index()\n { \n return view('admin-views.dashboard');\n }", "public function getDashboard()\n {\n return view('dashboard');\n }", "function showDashboard()\n { \n $logeado = $this->checkCredentials();\n if ($logeado==true)\n $this->view->ShowDashboard();\n else\n $this->view->showLogin();\n }", "public function index()\n { \n $params['crumbs'] = 'Home';\n $params['active'] = 'home';\n \n return view('admin.dashboard.index', $params);\n }", "public function index()\n\t{\n\t\treturn view::make('customer_panel.dashboard');\n\t}", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index() {\n // return view('home');\n return view('admin-layouts.dashboard.dashboard');\n }", "public function index()\r\n {\r\n return view('user.dashboard');\r\n }", "public function index() {\n return view('dashboard', []);\n }", "public function index()\n {\n //\n return view('dashboard.dashadmin', ['page' => 'mapel']);\n }", "public function index()\n {\n return view('back-end.dashboard.index');\n //\n }", "public function index()\n\t{\n\t\t\n\t\t$data = array(\n\t\t\t'title' => 'Administrator Apps With Laravel',\n\t\t);\n\n\t\treturn View::make('panel/index',$data);\n\t}", "public function index() {\n return view('dashboard.index');\n }", "public function index()\n {\n return view('page.dashboard.index');\n }", "public function index()\n {\n\n return view('dashboard');\n }", "public function dashboardview() {\n \n $this->load->model('Getter');\n $data['dashboard_content'] = $this->Getter->get_dash_content();\n \n $this->load->view('dashboardView', $data);\n\n }", "public function index()\n {\n $this->authorize(DashboardPolicy::PERMISSION_STATS);\n\n $this->setTitle($title = trans('auth::dashboard.titles.statistics'));\n $this->addBreadcrumb($title);\n\n return $this->view('admin.dashboard');\n }", "public function action_index()\r\n\t{\t\t\t\t\r\n\t\t$this->template->title = \"Dashboard\";\r\n\t\t$this->template->content = View::forge('admin/dashboard');\r\n\t}", "public function index()\n {\n $info = SiteInfo::limit(1)->first();\n return view('backend.info.dashboard',compact('info'));\n }", "public function display()\n\t{\n\t\t// Set a default view if none exists.\n\t\tif (!JRequest::getCmd( 'view' ) ) {\n\t\t\tJRequest::setVar( 'view', 'dashboard' );\n\t\t}\n\n\t\tparent::display();\n\t}", "public function index()\n {\n $news = News::all();\n $posts = Post::all();\n $events = Event::all();\n $resources = Resources::all();\n $admin = Admin::orderBy('id', 'desc')->get();\n return view('Backend/dashboard', compact('admin', 'news', 'posts', 'events', 'resources'));\n }", "public function index()\n {\n\n return view('superAdmin.adminDashboard')->with('admin',Admininfo::all());\n\n }", "public function index()\n {\n return view('dashboard.index');\n }", "public function index()\n {\n return view('dashboard.index');\n }", "public function index()\n {\n $this->template->set('title', 'Dashboard');\n $this->template->load('admin', 'contents' , 'admin/dashboard/index', array());\n }", "public function index()\n {\n return view('/dashboard');\n }", "public function index()\n {\n \treturn view('dashboard');\n }", "public function index()\n {\n return view('ketua.ketua-dashboard');\n }", "public function index(){\n return View::make('admin.authenticated.dashboardview');\n }", "public function admAmwDashboard()\n {\n return View::make('admission::amw.admission_test.dashboard');\n }", "public function index()\n {\n return view('adminpanel.home');\n }", "public function dashboard()\n\t{\n\t\t$this->validation_access();\n\t\t\n\t\t$this->load->view('user_dashboard/templates/header');\n\t\t$this->load->view('user_dashboard/index.php');\n\t\t$this->load->view('user_dashboard/templates/footer');\n\t}", "public function index()\n {\n return view('dashboard.home');\n }", "public function index()\n {\n $admins = $this->adminServ->all();\n $adminRoles = $this->adminTypeServ->all();\n return view('admin.administrators.dashboard', compact('admins', 'adminRoles'));\n }", "public function index()\n {\n if (ajaxCall::ajax()) {return response()->json($this -> dashboard);}\n //return response()->json($this -> dashboard);\n JavaScript::put($this -> dashboard);\n return view('app')-> with('header' , $this -> dashboard['header']);\n //return view('home');\n }", "public function index()\n {\n $userinfo=User::all();\n $gateinfo=GateEntry::all();\n $yarninfo=YarnStore::all();\n $greyinfo=GreyFabric::all();\n $finishinfo=FinishFabric::all();\n $dyesinfo=DyeChemical::all();\n return view('dashboard',compact('userinfo','gateinfo','yarninfo','greyinfo','finishinfo','dyesinfo'));\n }", "public function actionDashboard(){\n \t$dados_dashboard = Yii::app()->user->getState('dados_dashbord_final');\n \t$this->render ( 'dashboard', $dados_dashboard);\n }", "public function index()\n {\n $user = new User();\n $book = new Book();\n return view('admin.dashboard', compact('user', 'book'));\n }", "public function dashboard() {\n if (!Auth::check()) { // Check is user logged in\n // redirect to dashboard\n return Redirect::to('login');\n }\n\n $user = Auth::user();\n return view('site.dashboard', compact('user'));\n }", "public function dashboard()\n {\n $users = User::all();\n return view('/dashboard', compact('users'));\n }", "public function index()\n {\n $lineChart = $this->getLineChart();\n $barChart = $this->getBarChart();\n $pieChart = $this->getPieChart();\n\n return view('admin.dashboard.index', compact(['lineChart', 'barChart', 'pieChart']));\n }" ]
[ "0.77850926", "0.7760142", "0.7561336", "0.75147176", "0.74653697", "0.7464913", "0.73652893", "0.7351646", "0.7346477", "0.73420244", "0.7326711", "0.7316215", "0.73072463", "0.7287626", "0.72826403", "0.727347", "0.727347", "0.727347", "0.727347", "0.7251768", "0.7251768", "0.7251768", "0.7251768", "0.7251768", "0.7241342", "0.7236133", "0.7235562", "0.7218318", "0.71989936", "0.7197427", "0.71913266", "0.71790016", "0.71684825", "0.71577966", "0.7146797", "0.7133428", "0.7132746", "0.71298903", "0.71249074", "0.71218014", "0.71170413", "0.7110151", "0.7109032", "0.7107029", "0.70974076", "0.708061", "0.7075653", "0.70751685", "0.7064041", "0.70550334", "0.7053102", "0.7051273", "0.70484304", "0.7043605", "0.70393986", "0.70197886", "0.70185125", "0.70139873", "0.700917", "0.700917", "0.700917", "0.700917", "0.700917", "0.700917", "0.700917", "0.700917", "0.6992477", "0.6979631", "0.69741416", "0.69741327", "0.6968815", "0.6968294", "0.69677526", "0.69652885", "0.69586027", "0.6944985", "0.69432825", "0.69419175", "0.6941512", "0.6941439", "0.6938837", "0.6937524", "0.6937456", "0.6937456", "0.69276494", "0.6921651", "0.69074917", "0.69020325", "0.6882262", "0.6869339", "0.6867868", "0.68557185", "0.68479055", "0.684518", "0.68408877", "0.6838798", "0.6833479", "0.6832326", "0.68309164", "0.6826798", "0.6812457" ]
0.0
-1
Get all images from gallery folder
private function images() { return File::allFiles(public_path('img/gallery')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_all_gallery_images() {\n\n\t\tcheck_ajax_referer( 'daylife-gallery-add-nonce', 'nonce' );\n\t\trequire_once( dirname( __FILE__ ) . '/class-wp-daylife-api.php' );\n\t\t$daylife = new WP_Daylife_API( get_option( 'daylife' ) );\n\n\t\t// Should be int but santize value as id can be bigger than maximum int value\n\t\t$gallery_id = sanitize_text_field( $_POST['gallery_id'] );\n\t\tif ( $gallery_id > 0 ) {\n\t\t\t$args['gallery_id'] = $gallery_id;\n\n\t\t\t$images = $daylife->get_gallery_by_id( $args );\n\n\t\t\tforeach ( $images as $image ) {\n\t\t\t\t$image_data[] = $image->url . '|' . $image->caption;\n\t\t\t}\n\t\t\techo json_encode( $image_data );\n\t\t}\n\t\tdie;\n\n\t}", "public function actionGalleryImages() {\n\n // # Cache result forever\n $cached = Cache::rememberForever( 'actionGalleryImages', function () {\n\n // # Conatiner init\n $container = [];\n\n // # Directory iterator\n $iterator = new \\DirectoryIterator( \"./images/gallery/images\" );\n\n // # Loop through files and dir\n foreach( $iterator as $item ) {\n\n // # Avoid dirs\n if( is_dir( $item ) ) {\n continue;\n }\n\n // # Get pathname\n $path = ltrim( $item->getPathname(), \".\" );\n $tmp[ 'src' ] = $path;\n $tmp[ 'thumb' ] = $path;\n $container[] = $tmp;\n }\n\n // # toJson\n return json_encode($container);\n });\n\n return response()->make( $cached );\n\n }", "public function getAllImages() {\n\t\t$returnArr = array();\n\n\t\tforeach (File::allFiles($this->imageFolder) as $file) {\n\t\t\t$fileName = $file->getRelativePathName();\n\n\t\t\t$returnArr[] = url() . '/uploads/images/'.$fileName;\n\t\t}\n\n\t\treturn $returnArr;\n\t}", "public static function getGalleryImages($key) {\n $gallery = array();\n\n $path = ImageHelper::IMAGE_DIR . $key . '/gallery/';\n\n if (file_exists($path)) {\n foreach (scandir($path) as $file) {\n if (ImageHelper::endsWith($file, \".jpg\") || ImageHelper::endsWith($file, \".jpeg\") || ImageHelper::endsWith($file, \".png\")) {\n $tempPath = $path . $file;\n \n $filename = pathinfo($tempPath, PATHINFO_FILENAME);\n $small = ImageHelper::CACHE_DIR . $key . '_' . $filename . \"_small.jpg\";\n\n if (!file_exists($small)) {\n ImageHelper::convertToJPG($tempPath, 256, 256, $small);\n }\n\n array_push($gallery, $small);\n }\n }\n }\n\n return $gallery;\n }", "function rusticmodern_get_gallery_images() {\n\t$images = array();\n\n\tif ( function_exists( 'get_post_galleries' ) ) {\n\t\t$galleries = get_post_galleries( get_the_ID(), false );\n\t\tif ( isset( $galleries[0]['ids'] ) )\n\t\t \t$images = explode( ',', $galleries[0]['ids'] );\n\t} else {\n\t\t$pattern = get_shortcode_regex();\n\t\tpreg_match( \"/$pattern/s\", get_the_content(), $match );\n\t\t$atts = shortcode_parse_atts( $match[3] );\n\t\tif ( isset( $atts['ids'] ) )\n\t\t\t$images = explode( ',', $atts['ids'] );\n\t}\n\n\tif ( ! $images ) {\n\t\t$images = get_posts( array(\n\t\t\t'fields' => 'ids',\n\t\t\t'numberposts' => 999,\n\t\t\t'order' => 'ASC',\n\t\t\t'orderby' => 'menu_order',\n\t\t\t'post_mime_type' => 'image',\n\t\t\t'post_parent' => get_the_ID(),\n\t\t\t'post_type' => 'attachment',\n\t\t) );\n\t}\n\n\treturn $images;\n}", "function twentyten_get_gallery_images() {\n\t$images = array();\n\n\tif ( function_exists( 'get_post_galleries' ) ) {\n\t\t$galleries = get_post_galleries( get_the_ID(), false );\n\t\tif ( isset( $galleries[0]['ids'] ) ) {\n\t\t\t$images = explode( ',', $galleries[0]['ids'] );\n\t\t}\n\t} else {\n\t\t$pattern = get_shortcode_regex();\n\t\tpreg_match( \"/$pattern/s\", get_the_content(), $match );\n\t\t$atts = shortcode_parse_atts( $match[3] );\n\t\tif ( isset( $atts['ids'] ) ) {\n\t\t\t$images = explode( ',', $atts['ids'] );\n\t\t}\n\t}\n\n\tif ( ! $images ) {\n\t\t$images = get_posts(\n\t\t\tarray(\n\t\t\t\t'fields' => 'ids',\n\t\t\t\t'numberposts' => 999,\n\t\t\t\t'order' => 'ASC',\n\t\t\t\t'orderby' => 'menu_order',\n\t\t\t\t'post_mime_type' => 'image',\n\t\t\t\t'post_parent' => get_the_ID(),\n\t\t\t\t'post_type' => 'attachment',\n\t\t\t)\n\t\t);\n\t}\n\n\treturn $images;\n}", "public function getGalleryImages()\n {\n $user_id = Auth::user()->user_id;\n\n $images = Azure::getImageThumbnailFiles($user_id);\n $imageOrder = DB::table(\"users\")\n ->select(\"gallery_order\")\n ->where(\"user_id\", $user_id)\n ->first();\n\n return array(\"success\" => true, \"data\" => array(\n \"images\" => $images,\n \"order\" => $imageOrder->gallery_order\n ));\n }", "public function getMediaGalleryImages()\n {\n if(!$this->hasData('media_gallery_images') && is_array($this->getMediaGallery('images'))) {\n $images = new Varien_Data_Collection();\n foreach ($this->getMediaGallery('images') as $image) {\n if ($image['disabled']) {\n continue;\n }\n $image['url'] = $this->getMediaConfig()->getMediaUrl($image['file']);\n $image['id'] = isset($image['value_id']) ? $image['value_id'] : null;\n $image['path'] = $this->getMediaConfig()->getMediaPath($image['file']);\n $images->addItem(new Varien_Object($image));\n }\n $this->setData('media_gallery_images', $images);\n }\n\n return $this->getData('media_gallery_images');\n }", "public function getAllPhotos();", "public function getImages()\n {\n return GalleryImage::get()->filter('ParentID', $this->AllChildren()->column('ID') ?: null);\n }", "public function all_gallery_images($id)\n\t{\n\t\t$gal=$this->db->query(\"SELECT *FROM `product_gallery` where `product_id`='\".$id.\"'\");\n\t\tif($gal->num_rows()>0)\n\t\t{\n\t\t\treturn $gal;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "public function getImgs(){\n \n if ( is_null($this->getId()) ){\n return null;\n }\n\n $d = APPLICATION_PATH . '/../storage/category_pictures/' . $this->getId().'/';\n\n $pics = array();\n\n $dir = opendir($d);\n\n while($file = readdir($dir)){\n if ( $file != \".\" && $file != \"..\" && $file != \".svn\" && $file != \".DS_Store\" ) {\n $pics[] = '/../storage/category_pictures/' . $this->getId() . '/' . $file;\n }\n }\n\n return $pics;\n }", "public function getImages(){\n $images =[];\n $files=[];\n $imageDir=opendir(IMAGES_DIR);\n while(false !==($file=readdir($imageDir))){\n // $imageDirから一行ずつ読み込んで,$fileに入れて行く そんでそれがfalseにならない限り回し続ける\n if($file === '.'||$file =='..'){\n // カレントディレクトリやルートディレクトリを飛ばして回す\n continue;\n }\n $files[]=$file;\n //thumnailは imagesdirに存在するのかな\n if(file_exists(THUMBNAIL_DIR.'/'.$file)){\n $images[]=basename(THUMBNAIL_DIR).'/'.$file;\n } else{\n $images[]=basename(IMAGES_DIR).'/'.$file;\n }\n }\n array_multisort($files,SORT_DESC,$images);\n // 逆向き順に$filesに入っているimagesをそr・せよ\n return $images;\n}", "public function getPhotos();", "function get_images() \t{\n \t\treturn $this->getImages();\n \t}", "public function imagesManager()\n\t{\n\t\t$images = array();\n\n\t\t// Grab all images in the directory\n\t\t$files = File::allFiles(public_path() . '/uploads');\n\n\t\tforeach ($files as $file) {\n\t\t\t// Ignore thumbnail image\n\t\t\tif (!strpos($file, 'thumb_')) {\n\t\t\t\t// Get the image extension\n\t\t\t\t$ext = '.' . pathinfo($file, PATHINFO_EXTENSION);\n\t\t\t\t// Get the directory path for the image\n\t\t\t\t$path = explode( \"/\", substr($file,strpos($file,\"/uploads\")));\n\t\t\t\t// Remove file name to get only directory name\n\t\t\t\tarray_pop($path);\n\n\t\t\t\t$image_path = implode(\"/\", $path);\n\n\t\t\t\t$images[] = array(\"thumb\" => $image_path .'/thumb_' . basename($file), \"image\" => $image_path .'/' . basename($file), \"title\" => basename($file, $ext), \"link\" => $image_path .'/' . basename($file));\n\t\t\t}\n\t\t}\n\n\t\treturn Response::json($images);\n\t}", "public function getImages( $id_album = 0 )\n\t{\n\t\treturn Db::getInstance()->executeS('SELECT * FROM `'._DB_PREFIX_.'azgallery` WHERE `id_album`='.$id_album);\n\t}", "public function getGallery()\n {\n return $this->getItems()->getItems()->andWhere(['type' => 'gallery']);\n\n }", "public function getImages()\n\t\t{\n\t\t\t$this->createDir();\n\t\t\t//sacamos la lista de ficheros de la carpeta photos\n\t\t\t$files = $this->getFileList();\n\t\t\t//array de salida\n\t\t\t$image_List = array();\n\t\t\t\n\t\t\t//recorremos el contenido de esa carpeta\n\t\t\tforeach($files as $file)\n\t\t\t{\n\t\t\t\t//tiene que ser jpg, gif o png para que muestre las imagenes y que no sea . o ..\n\t\t\t\tif($file!=\".\" && $file!=\"..\" && $this->validatePhoto($file))\n\t\t\t\t{\t\t\t\t\n\t\t\t\t\t//guardo en el array la lista de imagenes\n\t\t\t\t\tarray_push($image_List, $file);\n\t\t\t\t\t\n\t\t\t\t\t//miro si existe la imagen en el thumbs si no lo creo\n\t\t\t\t\tif(!$this->checkIfFileExistes($file))\n\t\t\t\t\t{\n\t\t\t\t\t\t//como NO existe la minituara la creamos\n\t\t\t\t\t\t$this->createThumb(\"$file\");\n\t\t\t\t\t}\n\t\t\t\t\t//mostramos la miniatura y al hacer clic mostramos original \n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\techo \"<a href='\".$this->ruta.\"/$file' target='_blank' ><img src='\".$this->rutaMini.\"/$file'/></a>\";\t\n\t\t\t\t}\t\t\n\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}", "function getImages($dir)\n {\n global $imagetypes;\n\n // array to hold return value\n $retval = array();\n\n // add trailing slash if missing\n if(substr($dir, -1) != \"/\") $dir .= \"/\";\n\n \n \n \n // full server path to directory\n $fulldir = \"{$_SERVER['DOCUMENT_ROOT']}/$dir\";\n \n\n $d = @dir($fulldir) or die(\"getImages: Failed opening directory $dir for reading\");\n while(false !== ($entry = $d->read())) {\n // skip hidden files\n if($entry[0] == \".\") continue;\n\n // check for image files\n if(in_array(mime_content_type(\"$fulldir$entry\"), $imagetypes)) {\n $retval[] = array(\n \"file\" => \"/$dir$entry\",\n \"size\" => getimagesize(\"$fulldir$entry\")\n );\n }\n }\n $d->close();\n\n return $retval;\n }", "public function galleries(){\n\n $parameters = [\n 'sort' => 'position',\n 'sort_direction' => 'asc',\n 'page' => 1,\n 'cover_size' => 4,\n 'rpp' => 40\n ];\n\n $data = $this->api->get_galleries($parameters);\n\n return $data['galleries'];\n }", "public static function getGalleryImages($subfolder = null) {\r\n $images = \\Nette\\Utils\\Finder::findFiles('*.jpg')->from(__DIR__ . self::GALLERY_PATH .(($subfolder!==null) ? ($subfolder.'/') : ''). 'thumbs/');\r\n $result = [];\r\n if (!empty($images)) {\r\n foreach ($images as $spl) {\r\n $filename = $spl->getBasename();\r\n if (file_exists(__DIR__ . self::GALLERY_PATH.(($subfolder!==null) ? ($subfolder.'/') : '') . $filename)) {\r\n $result[self::GALLERY_URI .(($subfolder!==null) ? ($subfolder.'/') : ''). 'thumbs/' . $filename] = self::GALLERY_URI.(($subfolder!==null) ? ($subfolder.'/') : '') . $filename;\r\n }\r\n }\r\n }\r\n return $result;\r\n }", "final public function get_images() : array {\n Helper::load('files');\n\n return Files::get_files_in_dir($this->route);\n }", "function getImages($hello) {\n\n\t$imagetypes = array(\"image/jpg\",\"image/jpeg\",\"image/png\");\n\t$dir = \"/assets/galleries/\".$hello.\"/images/\";\n\t$dir2 = \"/assets/galleries/\".$hello.\"/thumbs/\";\n\t$dir3 = \"/assets/galleries/\".$hello.\"/downloads/\";\n\n\t#array to hold return value\n\t$retval = array();\n\n\t#full server path to directory\n\t$fulldir = \"{$_SERVER['DOCUMENT_ROOT']}$dir2\"; \n\t$idir = \"{$_SERVER['DOCUMENT_ROOT']}$dir\"; \n\n\t$d = @dir($fulldir) or die(\"getImages: Failed opening directory $dir for reading\"); \n\twhile(false !== ($entry = $d->read())) { \n\t\t# skip hidden files \n\t\tif($entry[0] == \".\") continue; \n\n\t\t# check for image files \n\t\tif(in_array(mime_content_type(\"$fulldir$entry\"), $imagetypes)) { \n\t\t\t$retval[] = array( \"file\" => \"$dir$entry\", \n\t\t\t\"size\" => getimagesize(\"$fulldir$entry\"),\n\t\t\t\"name\" => \"$entry\",\n\t\t\t\"thumb\"=>\"$dir2$entry\",\n\t\t\t\"download\"=>\"$dir3$entry\",\n\t\t\t\"isize\" => getimagesize(\"$idir$entry\")\n\t\t\t); \n\t\t}\n\t}\n\t$d->close(); \n\treturn $retval;\n}", "public function get_images()\r\n\t\t{\r\n\t\t\t$images = $this->obj->result;\r\n\t\t\treturn $images;\r\n\t\t}", "public function getImages() {\n\t\tif($this->images === null) {\n\t\t\t$this->images = $this->getObjectManager()->get('Qinx\\Qxgallery\\Domain\\Repository\\ImageRepository')->findAll(array(\n\t\t\t\t'category' => $this\n\t\t\t));\n\t\t}\n\n\t\treturn $this->images;\n\t}", "function get_pages_images_list() {\n\t$files = scandir(BASEPATH . \"/../public/images/pages\");\n\tarray_shift($files); // remove \".\"\n\tarray_shift($files); // remove \"..\"\n\treturn $files;\n}", "public function photos() {\n\t\t$photos = $this->client->getPhotos( [\n\t\t\t'group_urlname' => $this->group,\n\t\t] );\n\n\t\treturn $photos;\n\t}", "private function getAllImgsJpg($directory = 'images/')\n {\n $resizedFilePath = array();\n foreach ($directory AS $dir) {\n foreach (glob($dir . '*.jpg') as $filename) {\n array_push($resizedFilePath, $filename);\n }\n }\n return $resizedFilePath;\n }", "public function get_images_by_gallery($id, $options = array())\n\t{\n\t\t// Find new images on files\n\t\t$this->set_new_image_files($id);\t\n\n\t\t// Clear old files on images\n\t\t$this->unset_old_image_files($id);\n\n\t\tif (isset($options['offset']))\n\t\t{\n\t\t\t$this->db->offset($options['offset']);\n\t\t}\n\n\t\tif (isset($options['limit']))\n\t\t{\n\t\t\t$this->db->limit($options['limit']);\n\t\t}\n\n\t\t// Grand finale, do what you gotta do!!\n\t\t$images = $this->db\n\t\t\t\t// Select fields on gallery images table\n\t\t\t\t->select('gallery_images.*, files.name, files.filename, files.extension, files.description, files.name as title, galleries.folder_id, galleries.slug as gallery_slug, galleries.title as gallery_title')\n\t\t\t\t// Set my gallery by id\n\t\t\t\t->where('galleries.id', $id)\n\t\t\t\t// Filter images from my gallery\n\t\t\t\t->join('galleries', 'galleries.id = gallery_images.gallery_id', 'left')\n\t\t\t\t// Filter from my images\n\t\t\t\t->join('files', 'files.id = gallery_images.file_id', 'left')\n\t\t\t\t// Filter files type image\n\t\t\t\t->where('files.type', 'i')\n\t\t\t\t// Order by user order\n\t\t\t\t->order_by('`order`', 'asc')\n\t\t\t\t// Get all!\n\t\t\t\t->get('gallery_images')\n\t\t\t\t->result();\n\n\t\treturn $images;\n\t}", "public function getImages()\r\n {\r\n if (!isset($this->_images)) {\r\n $this->_images = [];\r\n for ($i=1; $i<=6; $i++) {\r\n if ($data = $this->getData('image' . $i)) {\r\n $image = $this->imageRepository->getById($data);\r\n if ($image->isActive()) {\r\n $this->_images[] = $image->getUrl();\r\n }\r\n }\r\n }\r\n }\r\n return $this->_images;\r\n }", "function gallery(){\n $str=\"\";\n $str.= \"<div class='gallery'>\";\n foreach (glob(\"*.{jpg,png,gif,JPG,jpeg}\",GLOB_BRACE) as $filename) {\n echo '<a data-fancybox=\"gallery\" href=\"'.$filename.'\"><img class=\"thumbnail\" src=\"'.$filename.'\"></a>';\n }\n $str.= \"</div>\";\n echo $str;\n}", "public function index() {\n $images = Gallery::all();\n // $images = Gallery::all();\n require_once('views/gallery/index.php');\n }", "function albums_get_images($album) {\n\t$files = read_dir_contents(ALBUMS_DIR.'/'.$album, 'files');\n\tif (!$files)\n\t\treturn FALSE;\n\n\telseif ($files) {\n\t\tnatcasesort($files);\n\t\tforeach ($files as $file) {\n\t\t\t$parts = explode('.', $file);\n\t\t\tif (count($parts) == 4) {\n\t\t\t\tlist($number, $fdirname, $ext, $php) = $parts;\n\t\t\t\tinclude_once (ALBUMS_DIR.'/'.$album.'/'.$file);\n\t\t\t\t$images[] = array(\n\t\t\t\t\t'title' => $name,\n\t\t\t\t\t'info' => $info,\n\t\t\t\t\t'seoname' => $fdirname,\n\t\t\t\t\t'filename' => $file,\n\t\t\t\t\t'filename_image' => $fdirname.'.'.$ext\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\tunset($file);\n\n\t\treturn $images;\n\t}\n}", "function GetImages(){\n\t\t$this->MediaType = 'image/jpeg';\n\t\t$this->SetFileName();\n\t\treturn $this->get();\n\t}", "function liste_images($dossier_images) // le dossier des images de l'article\n{\n\t$dossier = opendir($dossier_images);\n\t\n\t$images = array();\n\t\n\twhile (false !== ($image = readdir($dossier)) AND !in_array($image, array('0.jpg', '.', '..'))) { //toutes les images sans la principale de bandeau\n\t\t$images[] = $image;\n\t}\n\t\n\treturn $images;\n}", "function getImagesDam($limitImages=0) {\n # echo t3lib_div::view_array($images);\n \n // get all the files\n $images = tx_dam_db::getReferencedFiles('tt_content',$this->cObj->data['uid'],'rgsmoothgallery','tx_dam_mm_ref');\n\n // randomise and limit image items returned from images array\n // also useful to limit items in array to 1 item for use when no javascript in browser\n // if $limitImages=0 then this if statement is bypassed and all images in images array returned for processing\n if ($limitImages>0) {\n $test = ($images['files']);\n $test = $this->getSlicedRandomArray($test,0,$limitImages);\n $images['files'] = $test;\n }\n # echo t3lib_div::view_array($images['files']); \n \t $content.=$this->beginGallery($this->cObj->data['uid'],$limitImages);\n \t \n \t // add image\n foreach ($images['files'] as $key=>$path) { \n // get data from the single image\n $fields = 'title,description';\n $tables = 'tx_dam';\n $temp_where='uid = '.$key;\n $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery($fields, $tables, $temp_where);\n $row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);\n\n // add element to slideshow\n $content.=$this->addImage(\n\t\t\t $path,\n $row['title'], \n $row['description'], \n $this->config['showThumbs'],\n $this->config['showLightbox'],\n $path,\n $limitImages\n );\n }\n \n $content.=$this->endGallery();\n return $content;\n }", "function getImages($dir) {\n\n\t $retval = array();\n\n\t # add trailing slash if missing\n\n\t if(substr($dir, -1) != \"/\") $dir .= \"/\";\n\n\t # full server path to directory\n\n\t $fulldir = \"{$_SERVER['DOCUMENT_ROOT']}$dir\";\n\t if (file_exists($fulldir)) {\n\t $d = @dir($fulldir) or die(\"getImages: Failed opening directory $dir for reading\");\n\t while(false !== ($entry = $d->read())) {\n\n\t # skip hidden files\n\n\t if($entry[0] == \".\") continue;\n\n\t # check for image files\n\n\t if(substr(\"$fulldir$entry\", -11, 5) == \"image\") {\n\t $retval[] = array( \"file\" => \"$dir$entry\", \"size\" => getimagesize(\"$fulldir$entry\") );\n\n\t }\n\n\t }\n\n\t $d->close();\n\n\t }\n\n\t return $retval;\n\n\t }", "protected function fetchAllImages(){\n $this->fetchImagesInContent();\n $this->fetchFullTextImage();\n $this->fetchIntroImage();\n $this->fetchFirstImageInContent();\n }", "function get_mediaImages()\n\t\t{\n\t\t\t$query = $this -> db -> get('MediaSlider');\n\n\n\t\t\treturn $query->result();\n\t\t}", "public function actionCarouselImages() {\n\n // # Cache result forever\n $cached = Cache::rememberForever( 'actionCarouselImages', function () {\n\n // # Conatiner init\n $container = [];\n\n // # Directory iterator\n $iterator = new \\DirectoryIterator( \"./images/carousel\" );\n\n // # Loop through files and dir\n foreach( $iterator as $item ) {\n\n // # Avoid dirs\n if( is_dir( $item ) ) {\n continue;\n }\n\n // # Get pathname\n $path = ltrim( $item->getPathname(), \".\" );\n $tmp[ 'src' ] = $path;\n $tmp[ 'thumb' ] = $path;\n $container[] = $tmp;\n }\n\n // # toJson\n return json_encode($container);\n });\n\n return response()->make( $cached );\n\n }", "function getImagesDirectory($limitImages=0) { \t\t \n if (is_dir($this->config['startingpoint'])) {\n \t\t $images = array(); \n \t\t $images = $this->getFiles($this->config['startingpoint']); \t\n // randomise and limit image items returned from images array\n // also useful to limit items in array to 1 item for use when no javascript in browser\n // if $limitImages=0 then this if statement is bypassed and all images in images array returned for processing\n if ($limitImages>0) {\n \t$images=$this->getSlicedRandomArray($images,0,$limitImages);\n }\n\n $content.= $this->beginGallery($this->cObj->data['uid'],$limitImages);\n\n // read the description from field in flexforms\n \t$caption = explode(\"\\n\",$this->config['text']);\n \n // add the images\n foreach ($images as $key=>$value) {\n $path = $this->config['startingpoint'].$value;\n \n // caption text\n $text =explode('|',$caption[$key]);\n \n // add element to slideshow\n $content.=$this->addImage(\n \t\t\t $path,\n $text[0], \n $text[1],\n $this->config['showThumbs'],\n $this->config['showLightbox'],\n $path,\n $limitImages\n );\n \n } # end foreach file\n \n \t\t $content.=$this->endGallery();\n \t\t} # end is_dir \n \t\treturn $content;\n }", "public function getImageList()\n {\n $list = [];\n $path = $this->_filesystem->getDirectoryRead(\n DirectoryList::MEDIA\n )->getAbsolutePath(\n self::MEDIA_IMAGE_DIR\n );\n $baseUrl = $this->getStore()\n ->getBaseUrl('media').self::MEDIA_IMAGE_DIR.'/';\n $readFactory = $this->readFactory->create($path);\n if (!$readFactory->isExist()) {\n return [];\n }\n $fileList = $readFactory->read();\n\n if (!empty($fileList)) {\n foreach ($fileList as $entry) {\n if ($entry != '.' && $entry!= '..') {\n $extension = explode('.', $entry);\n if (in_array(end($extension), $this->availableImageFormat)) {\n $list[] = $baseUrl.$entry;\n }\n }\n }\n }\n return $list;\n }", "public function getImages($type=''){\n \n $imagetypes = array(\"image/png\",\"image/jpeg\", \"image/gif\");\n $dir = self::IMAGEPATH;\n\n // array to hold return value\n $retval = array();\n\n // add trailing slash if missing\n if(substr($dir, -1) != \"/\") $dir .= \"/\";\n\n // full server path to directory\n $fulldir = \"{$_SERVER['DOCUMENT_ROOT']}/$dir\";\n\n $d = @dir($fulldir) or die(\"getImages: Failed opening directory $dir for reading\");\n while(false !== ($entry = $d->read())) {\n // skip hidden files\n if($entry[0] == \".\") continue;\n\n \n // check for image files\n $f = escapeshellarg(\"$fulldir$entry\");\n \n \n \n if((!$type)||(strpos(' '.$entry, $type)))\n $retval[] = $entry;\n \n \n }\n $d->close();\n\n return $retval;\n }", "public function show_images(){\n\t\t\t$dir = '../pictures/';\n\t\t\t//checks if is an actual directory, opens it and reads each and returns filename.ext\n\t\t\tif (is_dir($dir)) {\n\t\t\t if ($dh = opendir($dir)) {\n\t\t\t while (($file = readdir($dh)) !== false) {\n\t\t\t \tif( $file == '.' || $file == '..'){//readdir returns ., .. before actual filenames\n \t\tcontinue;//they are ignored\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t//href value is to a include file showlarge.inc.php\n\t\t\t\t\t\techo \"<a href=?value=showlarge&value={$file}>\";\n\t\t\t\t\t\techo \"<img class = 'picture' src='{$dir}{$file}'></a>\";\n\t\t\t }\n\t\t\t closedir($dh);\n\t\t\t }\n\t\t\t}\n\t\t}", "function getImagesInFolder(string $folder = null)\n{\n $supported_formats = array(\n 'gif',\n 'jpg',\n 'jpeg',\n 'png'\n );\n try {\n return getFilenamesInFolder($folder, $supported_formats);\n } catch (Exception $e) {\n throw $e;\n }\n}", "public function getImages() : array\n\t{\n\t\treturn $this->images_list;\n\t}", "public function allImages()\n {\n $query = \"SELECT DISTINCT image from blog_post \n WHERE deleted = 0\";\n\n $stmt = static::$dbh->query($query);\n\n $images = $stmt->fetchAll(\\PDO::FETCH_ASSOC);\n\n return $images;\n\n }", "public function index()\n {\n $galleryImages = GalleryImage::with(['category.album'])->get();\n return view('admin_dashboard.gallery.image.index', compact(['galleryImages']));\n }", "static function getList()\n {\n $out = array();\n\n if ($dh = opendir(__DIR__ . '/../img/')) {\n while (($file = readdir($dh)) !== false) {\n if (substr($file, -4) === '.jpg') {\n $filename = substr($file, 0, -4);\n $out[$filename] = realpath(__DIR__ . '/../img/' . $file);\n }\n }\n\n closedir($dh);\n }\n\n return $out;\n }", "public function listDirectoryPicturesAndApplyId() \n {\n if (is_dir($this->picturesFolder)){\n $this->files = scandir($this->picturesFolder);\n } else {\n echo 'No image directory';\n }\n \n $values = array();\n foreach ($this->files as $key => $var) {\n if (($var === '.') || ($var === '..') || (substr($var, -4, 1) !== '.')) {\n unset($this->files[$key]);\n } else {\n $id = $this->generateRandomKey();\n $values[] = array(\n 'id' => $id, \n 'picture' => $this->files[$key], \n 'qrcode' => $id . '-qrcode' . $this->outputFileExtension\n ); \n }\n }\n $this->files = $values;\n return (array) $this->files;\n }", "public function listGall()\n {\n $gall = Gallery::latest()->get();\n return view('gallery.list', compact('gall'));\n }", "public function get_all_image_uploaded(){\n if($this->username && $this->id){\n if(file_exists($this->image_path . DS . $this->username)){\n $images = scandir($this->image_path . DS . $this->username);\n if(!empty($images)){\n $images = array_diff($images,array('.','..'));\n $allowed_ex = array(\"jpg\",\"jpeg\",\"png\"); \n foreach($images as $image){\n $exArr = explode('.',$image);\n $ex = end($exArr);\n $ex = strtolower($ex);\n if(!in_array($ex,$allowed_ex)){\n $images = array_diff($images,array($image));\n }\n }\n sort($images);\n return $images;\n }else{\n return false;\n }\n }\n }else{\n return false;\n }\n }", "function get_arr_pics_from_folder( $img_folder, $img_folder_url, $thumb_width = 50, $thumb_height = 50 )\n\t{\n\t\t$arr_filenames = $filesnames =array();\n\t\tif(file_exists($img_folder))\n\t\t{\n\t\t\t$filesnames = scandir($img_folder);\n\t\t}\n\t\t$count = 0;\n\t\tforeach ( $filesnames as $name )\n\t\t{\n\t\t\t$count++;\n\t\t\tif ( $name != \".\" && $name != \"..\" && $name != \"_evocache\" && $this->isImage($img_folder.$name) ) //not the folder and other files\n\t\t\t{\n\t\t\t\t$arr_filenames[] = array( $img_folder_url.$name,\n\t\t\t\t\"<a href='\".$img_folder_url.$name.\"' target='blank'><img src='\".$img_folder_url.$name.\"' width=\".$thumb_width.\"px heigh=\".$thumb_height.\"px /></a>\" );\n\t\t\t}\n\t\t\tif ($count==30) break; // The max number of the images we want to show\n\t\t}\n\t\t$arr_filenames[] = array(\"none\",T_(\"Transparent\"));\n\t\treturn $arr_filenames;\n\t}", "function getImages() \t{\n \t\treturn $this->images_array;\n \t}", "public function getAll(){\n\t\t$respond = array();\n\t\t$gallery = Gallery::all();\n\t\tif (count($gallery) == 0)\n\t\t{\n\t\t\t$respond = array('code'=>'404','status' => 'Not Found');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$respond = array('code'=>'200','status' => 'OK','messages'=>$gallery);\n\t\t}\n\t\treturn Response::json($respond);\n\t}", "public function browse_files()\n {\n // Scan file directory, render the images.\n if (is_dir($this->file_path)) {\n $files = preg_grep('/^([^.])/', scandir($this->file_path));\n return $files;\n }\n \n }", "function getPhotosOfDir($dirName){\r\n\t\t$connectService = new ConnectionBDD();\r\n\t\t$connect = $connectService->connect();\r\n\t\t$r = mysql_query(\"select PATH_PHOTO,ID_PHOTO_TAG from PhotoTag where PATH_PHOTO like '\" . str_replace($this->directory,\"\",$dirName) . \"%'\");\r\n\t\t$tags = array();\r\n\t\tfor($i = 0 ; $i < mysql_num_rows($r) ; $i++){\r\n\t\t\t$path = mysql_result($r,$i,\"PATH_PHOTO\");\r\n\t\t\t$tags[substr($path,strrpos($path,\"/\")+1)] = mysql_result($r,$i,\"ID_PHOTO_TAG\");\r\n\t\t}\r\n\r\n\t\t$tab = array();\r\n\t\t$dir = opendir($dirName . \"/sd\");\r\n\t\t$i = 0;\r\n\t\t/* Parcourt les photos */\r\n\t\twhile( ($photo = readdir($dir))!=false){\r\n\t\t\tif($photo != \".\" && $photo!=\"..\" && strstr($photo,\".jpg\") == \".jpg\"){\r\n\t\t\t\t$data = new Data();\r\n\t\t\t\t$data->addInfo(\"name\",str_replace(\".jpg\",\"\",$photo));\r\n\t\t\t\t$size = getimagesize($dirName . \"/sd/\" . $photo);\r\n\t\t\t\t$data->addInfo(\"width\",$size[0]);\r\n $data->addInfo(\"height\",$size[1]);\r\n\t\t\t\tif(isset($tags[str_replace(\".jpg\",\"\",$photo)]) == true){\r\n\t\t\t\t\t$data->addInfo(\"tag\",$tags[str_replace(\".jpg\",\"\",$photo)]);\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\t$data->addInfo(\"tag\",-1);\r\n\t\t\t\t}\r\n\t\t\t\t$tab[++$i] = $data;\r\n\t\t\t}\r\n\t\t}\r\n\t\t/* Trie les photos par nom */\r\n\t\tfunction abc($a,$b){return strnatcasecmp($a->getInfo(\"name\"),$b->getInfo(\"name\"));}\r\n\t\tusort($tab,\"abc\");\r\n\r\n\t\t$connectService->close();\r\n\t\treturn $tab;\r\n\t}", "public function firstParty()\n {\n $images = [];\n\n foreach ((new Finder())->in($this->path)->directories()->sortByName() as $directory) {\n /* @var $directory \\Symfony\\Component\\Finder\\SplFileInfo */\n $images[] = new Image($this->getImageName($directory, $this->name), $directory->getRealPath());\n }\n\n return $images;\n }", "public function getImages()\n {\n $res=array();\n $this->objTable = new Model($this->getLangAndID['lang'].'_slide_image');\n $select = array('id','title','description','slide_id','src_link','order_by','avatar');\n $this->objTable->where('slide_id',$this->id);\n $this->objTable->where('idw',$this->idw);\n $data = $this->objTable->get(null,null,$select);\n \n return $data; \n }", "function get_post_galleries_images($post = 0)\n {\n }", "public function Images() {\n\t\treturn new ArrayList(array_filter([$this->Image()]));\n\t}", "public function findAllPhoto(){\n $query= $this->getEntityManager()\n ->createQuery(\"Select p FROM PidevFrontOfficeBundle:Galerie p ORDER BY p.idEvennement ASC\");\n return $query->getResult();\n }", "public function getImages() {\n\t\treturn($this->images);\n\t}", "function get_post_gallery_images($post = 0)\n {\n }", "function getAllImages() {\n global $pdo;\n $statement = $pdo->prepare('SELECT `sid`, `mime_type`, `name`, `comment` from `file` WHERE `mime_type` LIKE \\'image/%\\' AND NOT comment = \\'Uploaded via Contact Form\\'');\n $statement->execute();\n return $statement->fetchAll(PDO::FETCH_ASSOC);\n}", "public function get_images(){\n\t\treturn $this->images;\n\t}", "public function get_shots($folder)\n\t{\n\t\t$url = base_url();\n\t\t$dir = \"./img/portfolio/$folder/\";\n\t\t$files1 = scandir($dir);\n\t\tunset($files1[0]);\n\t\tunset($files1[1]);\n\t\t$files = array();\n\t\tforeach ($files1 as $k => $name) {\n\t\t\tif ($name == \"Thumbs.db\") {\n\t\t\t\tunset($files1[$k]);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$files[] = $url.\"img/portfolio/$folder/$name\";\n\t\t}\n\t\treturn $files;\n\t}", "function DNUI_getImages($i, $max, $order,$checkGallery,$without) {\r\n global $wpdb;\r\n\r\n $sql = 'SELECT id FROM ' . $wpdb->prefix . 'posts, ' . $wpdb->prefix . \"postmeta where post_type='attachment' and post_mime_type like 'image%' and \" . $wpdb->prefix . \"posts.id=\" . $wpdb->prefix . \"postmeta.post_id and \" . $wpdb->prefix . 'postmeta.meta_key=\\'_wp_attachment_metadata\\' ';\r\n $last = ' ORDER BY `' . $wpdb->prefix . 'postmeta`.`meta_id`';\r\n if ($order == 0) {\r\n $last.=' ASC ';\r\n } else {\r\n $last.=' DESC ';\r\n }\r\n $sql.=$last . ' LIMIT ' . ($i * $max) . \", $max\";\r\n\r\n $result = $wpdb->get_results($sql, \"ARRAY_A\");\r\n $images = array();\r\n \r\n if (!empty($result)) {\r\n\r\n $base = wp_upload_dir();\r\n\r\n foreach ($result as $key => $value) {\r\n // var_dump($value);\r\n $images[$key][\"id\"] = $value[\"id\"];\r\n $images[$key]['meta_value'] = wp_get_attachment_metadata($value[\"id\"]);\r\n unset($images[$key]['meta_value']['image_meta']);\r\n //the result of meta_value is serialized \r\n $imp = explode(\"/\", $images[$key]['meta_value'][\"file\"]);\r\n $images[$key]['meta_value'][\"file\"] = array_pop($imp);\r\n $folder = implode(\"/\", $imp);\r\n $images[$key]['baseDir'] = $base['basedir'].\"/$folder\";\r\n $images[$key]['base'] = $base['baseurl'].\"/$folder\";\r\n }\r\n }\r\n \r\n if($checkGallery){\r\n $infoGalleries= DNUI_getInfoImageFormPostsWithGallery($without);\r\n }else{\r\n $infoGalleries=array();\r\n }\r\n \r\n\r\n return DNUI_checkList($images,$infoGalleries,$without);\r\n}", "public function index()\n {\n $images = Gallery::orderBy('created_at', 'desc')->paginate(12);\n\n return view('gallery', compact('images'));\n }", "public static function find_all_photos(){\n global $db;\n $sql = \"SELECT * FROM photos\";\n try {\n $result = $db->query($sql);\n $rows=$result->fetchall();\n return $rows;\n } catch (Exception $e) {\n throw $e;\n }\n }", "private function getPictures( $count ){\n\t\t$flickr_group_id = Yii::$app->params['flickr-group-id'];\n\t\t$flickr_api_key = Yii::$app->params['flickr-api-key'];\n\n\t\t$flickr_url = 'https://api.flickr.com/services/rest/?method=flickr.groups.pools.getPhotos&api_key=' . urlencode( $flickr_api_key ) . '&group_id=' . urlencode($flickr_group_id) . '&per_page=' . urlencode($count) . '&format=json&nojsoncallback=1&extras=url_q';\n\t\t$json_array = $this->getFromApi( $flickr_url );\n\n\t\tif( isset($json_array['photos']) && isset($json_array['photos']['photo']) ){\n\t\t\tif( isset($_GET['debug']) ){\n\t\t\t\tvar_dump($json_array['photos']['photo']);\n\t\t\t\tdie();\n\t\t\t}\n\t\t\treturn $json_array['photos']['photo'];\n\t\t}\n\n\t\treturn array();\n\t}", "public function getImages()\n {\n return $this->images;\n }", "public function getImages()\n {\n return $this->images;\n }", "public function getImages()\n {\n return $this->images;\n }", "public function getImages()\n {\n return $this->images;\n }", "public function getImages()\n {\n return $this->images;\n }", "public function getImages()\n {\n return $this->images;\n }", "public function getGallery()\n {\n return $this->morphMany(Media::class, 'mediable', ['type' => Media::TYPE_GALLERY], 'mediable', 'media_id');\n }", "function getImageFiles() {\n $path = dirname(__FILE__) . \"/img\";\n $images = array();\n $folder = opendir($path);\n while (false !== ($filename = readdir($folder))) {\n if ($filename != \"ajax-loader.gif\") {\n $parts = serendipity_parseFileName($filename);\n $img_data = serendipity_getimagesize($path . '/' . $filename);\n if (!isset($img_data['noimage'])) {\n // Curly braces are just a different syntax of associative array assignment\n $images[$filename] = array('fname'=>$filename, 'width'=>$img_data[0], 'height'=>$img_data[1]);\n }\n }\n }\n closedir($folder);\n ksort($images);\n return $images;\n }", "function ListFiles($folder,$mask)\r\n{\t// $extension is like '*.png'\r\n\t$images = glob(\"\" . $folder . $mask);\r\n\treturn $images;\r\n}", "public function getImages()\r\n {\r\n return $this->images;\r\n }", "function ShowGallery($folder, $mask,$thumbWidth,$thumbHeight)\r\n{\r\n\t$images = ListFiles($folder, $mask);\r\n\t?>\r\n\t<div id=\"gallery\" class=\"ad-gallery\" >\r\n\t\t<div class=\"ad-image-wrapper\">\r\n\t\t</div>\r\n\t\t<div class=\"ad-controls\">\r\n\t\t</div>\r\n\t\t<div class=\"ad-nav\">\r\n\t\t\t<div class=\"ad-thumbs\">\r\n\t\t\t\t<ul class=\"ad-thumb-list\">\r\n\t\t\t\t<?php \r\n\t\t\t\t$counter = 0; // for the imageX class (image0,image1,...)\r\n\t\t\t\tforeach ($images as $image)\r\n\t\t\t\t{\r\n\t\t\t\t\t$alt = basename($image,substr($mask,1)); // cut the folder and extension (mask as a \"*\" at begining so without it) \r\n\t\t\t\t\t$alt = str_replace(\"_\", \" \", $alt); // alt is name without underscore\r\n\t\t\t\t\techo\t\"<li>\";\r\n\t\t\t\t\techo \t\t\"<a href='$image'>\";\r\n\t\t\t\t\techo \t\"<img src='$image' alt='$alt' class='image\".$counter.\"' style='width:\".$thumbWidth.\"px; height:\".$thumbHeight.\"px;'/>\";\r\n\t\t\t\t\techo \t\"</a>\";\r\n\t\t\t\t\techo \t\"</li>\";\t\t\t\t\r\n\t\t\t\t}\t// foreach close\r\n\t\t\t\t?>\r\n\t\t\t\t</ul>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t</div>\r\n\t<?php \r\n}", "public function getGalleryImagesJson()\n {\n $imagesItems = [];\n foreach ($this->getGalleryImages() as $image) {\n $imagesItems[] = [\n 'thumb' => $image->getData('small_image_url'),\n 'img' => $image->getData('medium_image_url'),\n 'full' => $image->getData('large_image_url'),\n 'caption' => $image->getLabel(),\n 'position' => $image->getPosition(),\n 'isMain' => $this->isMainImage($image),\n 'mediaType' => $image->getMediaType(),\n 'videoUrl' => $image->getVideoUrl()\n ];\n }\n if (empty($imagesItems)) {\n $imagesItems[] = [\n 'thumb' => $this->_imageHelper->getDefaultPlaceholderUrl('thumbnail'),\n 'img' => $this->_imageHelper->getDefaultPlaceholderUrl('image'),\n 'full' => $this->_imageHelper->getDefaultPlaceholderUrl('image'),\n 'caption' => '',\n 'position' => '0',\n 'isMain' => true,\n 'mediaType' => 'image',\n 'videoUrl' => ''\n ];\n }\n return json_encode($imagesItems);\n }", "function GetImages() {\n //Select folder to scan\n $handle = opendir(\"Images/Tea\");\n\n //Read all files and store names in array\n while ($image = readdir($handle)) {\n $images[] = $image;\n }\n\n closedir($handle);\n\n //Exclude all filenames where filename length < 3\n $imageArray = array();\n foreach ($images as $image) {\n if (strlen($image) > 2) {\n array_push($imageArray, $image);\n }\n }\n\n //Create <select><option> Values and return result\n $result = $this->CreateOptionValues($imageArray);\n return $result;\n }", "public static function data_images() {\n\t\tif ( empty( self::$images ) ) {\n\t\t\tself::$images = glob( dirname( dirname( __FILE__ ) ) . '/images/*' );\n\t\t}\n\n\t\treturn self::$images;\n\t}", "function getAlbums() {\n\n $ro = new GetAlbumsRO();\n $files = glob('Pics/*');\n $numfiles = count($files);\t\n\n for ($i=0; $i < $numfiles; $i++)\n {\n $onefile = $files[$i];\n $imgs_in_album = glob(\"$onefile/*.[jJ][pP][gG]\");\n if (count($imgs_in_album) > 0)\n $album_image = $imgs_in_album[0];\n else\n $album_image = \"res/GenericAlbum.jpg\";\n $album_name = basename($onefile);\n\n $oneAlbum = new AlbumInfo($album_name, $album_image);\n array_push($ro->albums, $oneAlbum);\n }\n\n return $ro;\n}", "public function getImages()\n {\n $url = str_replace(\"[:action]\", \"images\", self::ImgUrAPI_MINE_URL);\n $url = str_replace(\"[:user_id]\", $this->user_id, $url);\n $result = self::excuteHTTPSRequest($url, $this->accessToken);\n\n $_images = '';\n foreach ($result['data'] as $item) {\n $_img = new ImgUrImage();\n $_img->setAttributes($item);\n $_images[] = $_img;\n }\n\n return $_images;\n }", "public function getFiles()\n {\n echo json_encode($this->galery->getFiles());\n }", "function getSlider_images()\n\t\t{\n\t\t\t$slider_images = $this->manage_content->getValue('slider_info','*');\n\t\t\tforeach($slider_images as $slider_image)\n\t\t\t{\n\t\t\t\tif($slider_image['slider_status'] == 1)\n\t\t\t\t{\n\t\t\t\t\techo '<a href=\"'.$slider_image[\"slider_link\"].'\"><img src=\"images/'.$slider_image[\"slider_image\"].'\" style=\"width:692px;height:210px;\"/></a>';\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public function getImages(){\n\t\t@$dom = new DOMDocument();\n\t\t@$dom->loadHTML($this->html);\n\t\t$dom->preserveWhiteSpace = false;\n\t\t\n\t\t// Create DOMXpath and get images\n\t\t$xpath = new DOMXpath($dom);\n\t\t$imgs = $xpath->query(\"//img\");\n\t\t\n\t\t// Return array\n\t\t$ret = array();\n\t\t\n\t\t// Loop results and return\n\t\tfor ($i = 0; $i < $imgs->length; $i++) {\n\t\t\t$img = $imgs->item($i);\n\t\t\t$src = $img->getAttribute(\"src\");\n\t\t\t\n\t\t\t// Make sure it's a complete URL\n\t\t\t$src = self::filterUrl($src);\n\t\t\tif($src === false) continue;\n\t\t\t\n\t\t\tarray_push($ret, $src);\n\t\t}\n\t\t\n\t\treturn $ret;\n\t}", "public function getImages()\n {\n\t\t//TODO Image 2. What should our query builder do?\n\t\t// $data = ImageModel::???();\n\t\t$data = [];\n\t\treturn $this->sendResponse($data);\n }", "private function list_local_images($dir)\n {\n $files = new RecursiveIteratorIterator(\n new RecursiveDirectoryIterator($dir,\n FilesystemIterator::CURRENT_AS_FILEINFO |\n FilesystemIterator::KEY_AS_PATHNAME |\n FilesystemIterator::SKIP_DOTS\n )\n );\n\n $files = new RegexIterator($files, '/^.+\\.jpg$/i', RecursiveRegexIterator::MATCH);\n\n return $files;\n }", "public static function searchGalleryPics($keyword) {\n\t\n\t\t$data = Doctrine_Query::create()->select('g.title as name')\n\t\t->from(\"Gallery g\")\n\t\t->where('g.deleted = 0')\n\t\t->andWhere(\"g.title LIKE ?\", \"%$keyword%\")\n\t\t->orderBy(\"g.title ASC\")\n\t\t->limit(5)\n\t\t->fetchArray();\n\t\treturn $data;\n\t}", "public function getImagesFromBatch() {\n\t\t$images = array();\n\t\t$images = icms_core_Filesystem::getFileList(ALBUM_UPLOAD_ROOT.'batch/', '', array('gif', 'jpg', 'png'));\n\t\t$ret = array();\n\t\tforeach(array_keys($images) as $i ) {\n\t\t\t$ret[$i] = $images[$i];\n\t\t}\n\t\treturn $ret;\n\t}", "public function getImages(){\n return $this->images;\n }", "function hmg_get_gallery_images( $post_id = null, $size = array(), $featured = true ) {\n\n\tif( null == $post_id ) \n\t\t$post_id = get_the_id();\n\n\t$images = array();\n\n\tif( $featured ) {\n\t\t$images[get_post_thumbnail_id( $post_id )] = get_the_post_thumbnail( $post_id, $size );\n\t}\n\t\n\tforeach( hmg_get_gallery_ids( $post_id ) as $image_id ) {\n\t\t$images[$image_id] = wp_get_attachment_image( $image_id, $size );\n\t}\n\t\n\treturn $images;\n\n}", "public function gallery_get_images_post()\n {\n $data['selected_id'] = $this->input->post('id', true);\n\n if ($data['selected_id'] == 0) {\n $data['images'] = $this->gallery_image_model->get_images();\n } else {\n $data['images'] = $this->gallery_image_model->get_images_by_category($data['selected_id']);\n }\n\n $data['categories'] = $this->gallery_category_model->get_categories();\n $this->load->view('blog/partials/_get_photos', $data);\n }", "function getUserPhotos ($dir, $userName = '') {\r\n $filesArray = getFilesFromDir($dir);\r\n $outputPhotoBook = '';\r\n foreach ($filesArray as $fileName) {\r\n $outputPhotoBook .= '<div><img src=\"img/' . $userName . '/' . $fileName. '\"></div>';\r\n }\r\n return $outputPhotoBook;\r\n}", "public function getAllImages()\n {\n $sql = \"\n\t\t\tSELECT A.*, B.tag_id, C.name tagName FROM images A\n\t\t\tLEFT JOIN tag_relationships B\n\t\t\tON A.id = B.image_id\n\t\t\tLEFT JOIN tags C\n\t\t\tON B.tag_id = C.id\n\t\t\tORDER BY A.name ASC\n\t\t\";\n\n $query = $this->db->prepare($sql);\n\n $query->execute();\n\n $result = $query->fetchAll();\n\n // index the images by id then add their tags\n foreach ($result as $image => $data) {\n if (isset($this->images[$data['id']])) {\n $this->images[$data['id']]['tags'][$data['tag_id']] = $data['tagName'];\n } else {\n $this->images[$data['id']] = [\n 'name' => $data['name'],\n 'url' => $data['url'],\n 'tags' => [$data['tag_id'] => $data['tagName']],\n ];\n }\n }\n return $this->images;\n }" ]
[ "0.7814598", "0.7772644", "0.7670666", "0.7548918", "0.73371917", "0.7319401", "0.72812206", "0.71849316", "0.71804935", "0.71597433", "0.71211255", "0.7070795", "0.7044805", "0.7040692", "0.6957863", "0.69230336", "0.6921784", "0.6920976", "0.6919768", "0.6905779", "0.6898715", "0.6870964", "0.68537474", "0.6852665", "0.68221724", "0.68105614", "0.6806407", "0.68017334", "0.67571676", "0.67482734", "0.6728829", "0.6707681", "0.67050475", "0.6703988", "0.6702254", "0.66867286", "0.6658327", "0.6644981", "0.6640618", "0.66323596", "0.66299427", "0.6602208", "0.6598109", "0.6588585", "0.65678793", "0.65644085", "0.6551909", "0.6550854", "0.6547203", "0.6546994", "0.6533646", "0.6530022", "0.65294605", "0.65285844", "0.6519886", "0.6470083", "0.64690644", "0.64478946", "0.64474124", "0.6446387", "0.6436252", "0.643109", "0.6427982", "0.64157236", "0.6415541", "0.64152104", "0.6415122", "0.6413981", "0.63978565", "0.63940847", "0.63857234", "0.63716024", "0.6370471", "0.6370471", "0.6370471", "0.6370471", "0.6370471", "0.6370471", "0.636873", "0.6364772", "0.6363874", "0.63594", "0.6347704", "0.6346387", "0.6345689", "0.634496", "0.63233715", "0.63177925", "0.6317205", "0.6316838", "0.6308571", "0.63078326", "0.63071334", "0.6306646", "0.6299398", "0.62974375", "0.629731", "0.62833965", "0.6283053", "0.628199" ]
0.8162983
0
Get all categories and products
private function dishes() { $dishes = Category::withDepth()->get(); return $dishes; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAllProduct()\n {\n //eager loading of \"product\" with \"category\"\n return Product::with('category')\n ->orderBy('title')\n ->get();\n }", "public function index()\n {\n return ProductResource::collection(Product::with('categories')->get());\n }", "public function getAllWithCategory();", "public function getProducts()\n {\n\n $categories = ProductCategory::all();\n\n $products = Product::paginate(10);\n return $products;\n }", "public function getAllCategories();", "public function getCategories(){\n\t\t$stmt = $this->db->query(\"SELECT * FROM products_categories WHERE clientId = '{$this->clientId}'\");\n\t\treturn $stmt->fetchAll(PDO::FETCH_OBJ);\n\t}", "public function all()\n {\n $sql =\"SELECT c.id, c.name_category, c.waiting, c.obs_waiting, c.cover, count(p.name_product) as total_prods FROM categories as c LEFT JOIN products as p ON(c.name_category = p.category) WHERE p.status = 0 GROUP BY c.id\";\n $sql = $this->db->query($sql);\n return $categories = $sql->fetchAll(\\PDO::FETCH_ASSOC);\n }", "public static function getAll() {\n $SQL = 'Select * from product inner JOIN product_category on product.product_category_id = product_category.product_category_id;';\n $prep = DataBase::getInstance()->prepare($SQL);\n $prep -> execute();\n return $prep->fetchAll(PDO::FETCH_OBJ);\n }", "public function index()\n {\n return ProductCategoryResource::collection(ProductCategory::all());\n }", "public function getAll()\n {\n return CategorieResource::collection(Categorie::paginate());\n }", "public function get()\n {\n $products = $this->productRepository->all();\n foreach($products as $product) {\n\n $product->category = $this->categoryRepository->find($product->category_id)->title;\n $product->section_id = $this->categoryRepository->find($product->category_id)->section_id;\n $product->section = $this->sectionRepository->find($product->section_id)->title;\n }\n return $products;\n\n }", "public function products()\n {\n return $this->morphedByMany(Product::class, 'categorables');\n }", "public function getALL()\n {\n // Sentencia SQL\n $sql = \"SELECT categorias.nombre AS 'NombreDeLaCategoria', productos.* FROM productos INNER JOIN categorias ON categorias.id = productos.categoria_id ORDER BY stock ASC\";\n $productos = $this->conexion->query($sql);\n\n // Retorno el resultado a \"productosControlles.php\" al metodo \"gestion()\"\n return $productos;\n }", "public function getAll():array\n {\n $productCategoryDAO = new ProductCategoryDAO();\n $productCategories = $productCategoryDAO->getAll();\n \n return $productCategories;\n }", "public function getAllProducts() {\n $searchCondition .= \"searchCriteria[filter_groups][0][filters][0][field]=category_id&\";\n $searchCondition .= \"searchCriteria[filter_groups][0][filters][0][value]=25&\";\n $searchCondition .= \"searchCriteria[filter_groups][0][filters][0][condition_type]=eq&\";\n $searchCondition .= \"searchCriteria[filter_groups][1][filters][0][field]=sku&\";\n $searchCondition .= \"searchCriteria[filter_groups][1][filters][0][value]=%25case%25&\";\n $searchCondition .= \"searchCriteria[filter_groups][1][filters][0][condition_type]=nlike\";\n\n $this->products = $this->cUrlRequest($this->url . '/rest/V1/products?fields=items[name,price,custom_attributes,sku]&'.$searchCondition.'&searchCriteria[pageSize]=' . $this->items, $this->getToken());\n\n return $this->products;\n }", "function productList() {\n\t$categoryIds = array_merge ( [ \n\t\t\t$this->id \n\t], $this->subcategoryIds () );\n\tprint_r ( $categoryIds );\n\t// Find all products that match the retrieved category IDs\n\treturn Product::whereIn ( 'cate_id', $categoryIds )->get ();\n}", "public function index()\n {\n return ProductCategory::orderBy('name')->get();\n }", "public function getAllCategories(){\r\n\t\treturn $this->query(\"SELECT * FROM category\");\r\n\t}", "public function getProductList()\n {\n return $this->with('images','manufacturer', 'category')->get();\n }", "public function getCategory(Request $request)\n\t{\n\t\t$params = $request->all();\n\n\t\t$categories = new Categories;\n\n\t\tif(isset($params['category']) && $params['category']!=\"\"){\n\t\t\t$categories = $categories->where('slug', \"=\", $params['category']);\n\t\t}\n\n\t\t$categories = $categories->where('cat_status',1);\t\t\n\n\t\tif(isset($params['onlyParent']) && $params['onlyParent']){\n\t\t\t$categories = $categories->where('ancestors','exists',false);\n\t\t}\n\n\t\t$categories = $categories->get();\n\n\t\tif(empty($categories) || !is_object($categories) || empty($categories->toArray())){\n\t\t\treturn response([],404);\n\t\t}\n\n\t\tif(isset($params['withChild']) && $params['withChild']){\n\n\t\t\tforeach($categories as &$category){\t\t\t\t\n\t\t\t\t$category['children'] = array();\n\t\t\t\t$category['children'] = Categories::where('cat_status',1)->where('ancestors.0._id','=',$category['_id'])->get(array('_id','slug','cat_title','metaTitle','metaDescription','metaKeywords'));\n\t\t\t}\n\n\t\t}\t\n\t\t\n\t\t\n\t\tif(isset($params['withCount']) && $params['withCount']){\n\n\t\t\t// db.products.aggregate([{$group:{_id:\"$categories\",count:{$sum:1}}}])\n\n\t\t\t$products = DB::collection('products')->raw(function($collection){\n\n\t\t\t\treturn $collection->aggregate(array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'$match' => array(\n\t\t\t\t\t\t\t'status' => 1\n\t\t\t\t\t\t)\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'$project' => array('categories' => 1)\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'$unwind' => array(\n\t\t\t\t\t\t\t'path' => '$categories',\n\t\t\t\t\t\t\t'preserveNullAndEmptyArrays' => true\t\n\t\t\t\t\t\t)\n\t\t\t\t\t),\t\t\t\t\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'$group' => array(\n\t\t\t\t\t\t\t'_id'=>'$categories',\n\t\t\t\t\t\t\t'count' => array(\n\t\t\t\t\t\t\t\t'$sum' => 1\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\n\t\t\t$processedPro = [];\n\t\t\tforeach($products['result'] as $product){\n\n\t\t\t\t$cat = $product['_id'];\n\n\t\t\t\t$processedPro[$cat] = $product['count'];\n\n\t\t\t}\n\n\t\t\tforeach($categories as &$category){\n\n\t\t\t\t$category['productCount'] = isset($processedPro[$category['_id']])?$processedPro[$category['_id']]:0;\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn response($categories);\n\t}", "function getAllCategories()\n {\n return $this->data->getAllCategories();\n }", "public function getCategories()\n {\n $category = ProductsCategory::all();\n\n $data = $category->map(function($category){\n return [\n 'name' => $category->category,\n 'image' => $category->img,\n 'link' => $category->link,\n ];\n });\n\n return response()->json(['data' => $data]);\n }", "public function allCategories()\n {\n return Category::all();\n }", "public function getCategories() {\n $stmt = $this->pdo->prepare(\"SELECT * FROM $this->table WHERE parent is null ORDER BY name ASC\");\n $stmt->setFetchMode(\\PDO::FETCH_CLASS, '\\App\\Model\\Category\\ProductCategoryModel');\n $stmt->execute();\n return $stmt->fetchAll();\n }", "public function getCategories()\n {\n return CategoryResource::collection(Category::with('products')->get())\n ->response()\n ->setStatusCode(200);\n }", "public function getCategories()\n {\n return $this->hasMany(Category::class, ['id' => 'category_id'])\n ->viaTable('product_category', ['product_id' => 'id']);\n }", "public function getAllWithCategoryAndTags();", "public function getAll() {\n $manufacturer = new Manufacturer();\n $product_category = new ProductCategory();\n $manufacturers = $manufacturer->getTable();\n $product_categories = $product_category->getTable();\n\n $query = self::query()\n ->join($manufacturers, $manufacturers.'.id', '=', $this->table . '.manufacturer_id')\n ->join($product_categories, $product_categories.'.id', '=', $this->table . '.category_id')\n ->select(\n $this->table.'.id',\n $this->table . '.price',\n $this->table . '.name as product_name',\n $manufacturers.'.name as manufacturer_name',\n $manufacturers . '.country',\n $product_categories . '.name as category_name',\n $this->table.'.release_year'\n );\n\n return $query->get();\n }", "public function index()\n { \n \n $data['products_list'] = \\App\\Models\\Product::with('category_info')->get(); \n \n \n $common_model = new Common(); \n $data['categories_list'] = $common_model->allCategories(); \n \n return view('admin.product.index', ['data'=>$data]);\n // \n }", "function GetCategories()\n\t{\n\t\t$result = $this->sendRequest(\"GetCategories\", array());\t\n\t\treturn $this->getResultFromResponse($result);\n\t}", "public function all()\n {\n return $this->category->all();\n }", "private function loadAll() {\n\n return $this->search->getProducts();\n\n }", "public function getAllProducts()\n {\n return $this->productRepository->all();\n }", "private function getAllCategories()\n {\n $query = Queries::$getAllCategories;\n\n try {\n $stmt = $this->db->prepare($query);\n $stmt->execute();\n $result = $stmt->fetchAll(\\PDO::FETCH_ASSOC);\n $this->successResponse($result);\n } catch (\\PDOException$e) {\n $this->errorResponse($e->getMessage());\n }\n }", "private function getAllCategory() {\n $repository = $this->getDoctrine()\n ->getRepository('AppBundle:Category');\n\n return $repository->\n findBy(\n [],\n ['name' => 'ASC']\n );\n }", "public function all()\n {\n return new CategoryCollection(Category::whereUserId(Auth::id())->ordered()->get());\n }", "public function getCategories();", "public function getCategories();", "public function getCategoriesAll()\n {\n return $this->where('cat_active', 1)->with('subcategories')->get();\n }", "public function getProductsByCategory($id){ \n $products = Product::where('category_id',$id)->get(); \n return $products;\n }", "public function GetAllProduct(){\r\n\t\r\n\t\t\t$m_product = new m_product();\r\n\t\t\t$CatFlowingPro = $m_product->GetAll();\r\n\t\t\r\n\t\t\r\n\t\t\t//view\r\n\t\t\tinclude(\"view/layout/header.php\");\r\n\t\t\tinclude(\"view/layout/menu.php\");\r\n\t\t\tinclude(\"view/category/cat_detail.php\");\r\n\t\t\tinclude(\"view/layout/footer.php\");\r\n\t\t}", "public static function getAll(){\n $result = static::$conn->query(\"SELECT * FROM enews.category\");\n return $result->fetchAll(\\PDO::FETCH_ASSOC);\n }", "public function getCategories()\n {\n return Category::all();\n }", "public function prod_list_by_category() {\n $url_cate = get_raw_app_uri();\n if (!empty($url_cate)) {\n $Product = new Product();\n $info = $Product->getProductByCategory($url_cate);\n $data['content'] = 'list_product'; \n $data['product'] = $info['product'];\n $data['paging'] = $info['paging'];\n $data['selected'] = $url_cate;\n \n //seo\n \n $Category = new ProductCategory();\n $list_cate = $Category->getCategoryByLink($url_cate);\n if ($list_cate->countRows() > 0){\n $list_cate->fetchNext();\n $data['title_page'] = $list_cate->get_prod_cate_name();\n $data['description'] = $list_cate->get_prod_cate_meta_description();\n $data['keywords'] = $list_cate->get_prod_cate_keywords();\n }else{\n $data['title_page'] = '';\n $data['description'] = '';\n $data['keywords'] = '';\n }\n \n $array_menus = array();\n $filter = array();\n $filter['parent_id'] = 0;\n Menu::getMenuTree($array_menus, $filter);\n $data['array_menus'] = $array_menus;\n \n $this->load->view('temp', $data);\n } else {\n redirect(Variable::getDefaultPageString());\n }\n }", "public function getAll()\n {\n return $this->products;\n }", "public function GetCategories() {\n // Setup the Query\n $this->sql = \"SELECT *\n FROM categories\";\n \n // Run the query \n $this->RunBasicQuery();\n }", "public function all_product()\n {\n // $categories = Category::all();\n // $all_manufacture_info = Manufacture::all();\n // $products = Product::paginate(5);\n // return view('admin.product.index', compact('categories', 'all_manufacture_info', 'products'));\n\n $products = DB::table('products')\n ->join('categories', 'products.category_id', '=', 'categories.category_id')\n ->join('manufactures', 'products.manufacture_id', '=', 'manufactures.manufacture_id')\n ->select('products.*', 'categories.category_name', 'manufactures.manufacture_name')\n //->orderBy('product_id', 'asc')\n ->oldest()\n //->latest()\n ->paginate(4);\n return view('admin.product.index', compact('products'));\n }", "public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }", "public function index()\n {\n $prodcucts = Product::with('category')->paginate(10);\n\n return new ProductCollection($prodcucts);\n }", "public function getCategory() {\n $productModel = new productModel();\n $categories = $productModel->getCategoryList();\n $this->JsonCall($categories);\n }", "public function findAllCategories(): iterable;", "public function getAll(): Collection\n {\n return $this->categoryRepository->getAll();\n }", "function getAllCategories() {\n\t\t$url = $this->apiURL . \"categories/\" . $this->yourID . \"/\" . $this->yourAPIKey;\n\t\treturn $this->_curl_get($url);\n\t}", "function GetProducts(){\n $query = $this->db->prepare(\"SELECT `p`.`id` as `id_producto`, `p`.`nombre` as `nombre_producto`, `p`.`descripcion` as `desc_producto`, `p`.`precio` as `precio`, `p`.`stock` as `stock`, `c`.`nombre` as `nombre_categoria` FROM producto p INNER JOIN categoria c ON `p`.`id_categoria`=`c`.`id`\");\n $query->execute();\n return $query->fetchAll(PDO::FETCH_OBJ);\n }", "public function getAllCategory()\n {\n $sql = \"SELECT * FROM categories\";\n $stmt = $this->connect()->prepare($sql);\n $stmt->execute();\n $result = $stmt->fetchAll(PDO::FETCH_ASSOC);\n $id = '';\n $items = $result;\n return $items;\n }", "public function actionCategories()\n {\n // $model ->select('category')\n // ->from('product')\n // ->distinct()\n // ->all();\n \n // if ($model) {\n // foreach ($model as $row) {\n // print_r($row['category']);\n // }\n // }\n $query = product::find()->select('category')->distinct();\n foreach($query as $row)\n {\n print_r($row->category);\n }\n \n exit();\n Yii::$app->response->format = \\yii\\web\\Response::FORMAT_JSON;\n return $model;\n\n }", "public function displayAllProducts()\n {\n return $this->paginate(['category', 'subcategory', 'brand', 'reviews'], false, 12);\n }", "public function getCategories()\n {\n $request = \"SELECT * FROM category\";\n $request = $this->connexion->query($request);\n $categories = $request->fetchAll(PDO::FETCH_ASSOC);\n return $categories;\n }", "public function get_allCategory_get(){\n\t\t$result = $this->dashboard_model->get_allCategory();\n\t\treturn $this->response($result);\t\t\t\n\t}", "public function index()\n {\n $data = ProductCategory::all();\n\n return response()->json($data,200);\n }", "public function getProducts()\n {\n return $this->hasMany(Product::className(), ['category_id' => 'id']);\n }", "public function getCategoryList()\n {\n// return $this->categoryList = DB::table('categories')->get();\n return $this->categoryList = Categories::all();\n }", "public function index() {\n\n // Get all categories with at least one product\n $products = Product::all();\n $category_ids = array();\n\n foreach($products as $product){\n\n if (!in_array($product->category_id.'', $category_ids)){\n\n $category_ids[] = $product->category_id;\n }\n\n }\n\n // Get all categories\n $categories = \\DB::table('categories')->whereNull('parent_id')->get();\n\n // Get all sub categories\n foreach($categories as $category) {\n $subCategories[$category->id] = \\DB::table('categories')->where('parent_id', '=', $category->id)->get();\n }\n\n // Check if category has products\n /*$i=0;\n foreach($categories as $category){\n\n $used = false;\n foreach($subCategories as $subCategory){\n if($subCategory->parent_id === $category->id){\n $used = true;\n }\n }\n if(!$used){\n unset($categories[$i]);\n }\n $i++;\n }*/\n\n // Check if filter exists\n if (session()->has('filter')) {\n\n $products = Product::whereIn('category_id', session()->get('filter'))->get();\n\n }else {\n\n $products = Product::all();\n\n }\n\n // Pass data to view\n return view('products.index', compact('products', 'categories', 'subCategories'));\n }", "protected function productsAll()\n\t{\n\t\t$this->adapter->joinLeftCategoryFlat();\n\t\t$this->adapter->joinTaxonomy();\n\t\t$this->adapter->joinParentCategory();\t\t\t\t\t\t\n\t}", "public function getCategoriaProductos(){\n\t\t$sql = \"SELECT marca.marca, productos.id_producto, productos.nombre, productos.precio, productos.precio_total, productos.url_imagen, presentaciones.presentacion, proveedores.proveedor, marca.marca, tipo_producto.tipo_producto \n\t\tFROM productos \n\t\tINNER JOIN marca ON productos.id_marca = marca.id_marca \n\t\tINNER JOIN presentaciones ON productos.id_presentacion = presentaciones.id_presentacion \n\t\tINNER JOIN proveedores ON productos.id_proveedor = proveedores.id_proveedor \n\t\tINNER JOIN tipo_producto ON productos.id_tipo_producto = tipo_producto.id_tipo_producto \n\t\tWHERE productos.id_marca = ? AND productos.id_estado = 1 AND proveedores.id_estado = 3\";\n\t\t$params = array($this->id_marca);\n\t\treturn Database::getRows($sql, $params);\n\t}", "public static function categories() {\n $db = Db::getInstance();\n $req = $db->query('SELECT * FROM category');\n return $req->fetchAll(PDO::FETCH_ASSOC);\n }", "public function readProductosCategoria(){\n $sql='SELECT nomCategoria, idProducto, producto.foto, nombre, producto.descripcion,precio FROM producto INNER JOIN categoria USING (idCategoria) WHERE idCategoria = ? AND producto.estado=1 AND producto.estadoEliminacion=1';\n $params=array($this->categoria);\n return Database::getRows($sql, $params);\n }", "public static function getCategories() {\n return Catalog::category()->orderBy('weight')->orderBy('name')->all();\n }", "public function all()\n {\n $products = Product::all();\n return $products;\n }", "protected function findAllCategories()\n {\n return resolve([]);\n }", "public function all(){\n \t\t$response = $this->curl->get( $this->api_url, [ \n\t\t\t'access_token' => $this->token\n\t\t]);\n\n \t\tif( $response->success ){\n \t\t\t$products = [];\n\t\t\tforeach ($response->products as $product) {\n\t \t\t\t$tmp = new Product( $this );\n\t \t\t\t$tmp->fetch($product);\n\t \t\t\t$products[] = $tmp;\n\n\t \t\t\treturn $products;\n\t \t\t}//foreach\n \t\t}//if\n \t\telse{\n \t\t\t// Throw error according to status\n \t\t}//else\n\n \t}", "public function index()\n {\n $products = Products::all();\n $categories = DB::table('categories')->get();\n //$categoriesRelationship = DB::table('categories_relationship')->get();\n $categoriesRelationship = DB::select(\"SELECT\n categories.category_filter_by AS 'catFilterBy',\n products.id AS 'productID',\n products.slug AS 'productSlug',\n categories.category_name AS 'categoryName'\n FROM\n categories, products, categories_relationship\n WHERE\n categories.category_id = categories_relationship.category_id\n AND\n products.id = categories_relationship.object_id\"\n );\n\n return response()->json([\n 'productsList' => $products,\n 'categories' => $categories,\n 'categoriesRelationship' => $categoriesRelationship,\n ]);\n }", "public function index()\n {\n $product_category = ProductCategory::orderBy('id', 'DESC')->get();\n return ProductCategoryResource::collection($product_category);\n }", "public function fetchAll()\n {\n $products = product::with('brand')->paginate(8);\n return productResource::collection($products);\n }", "public function index()\n {\n $filter = \\Request::only('search');\n\n //categories\n $products = Product::activeProducts()->withAssociates()->filter($filter)->get();\n $cart = new CartService;\n // $items = (new CartService)->getItems();\n // foreach($items as $item)\n // {\n // $product = $item->product->withAssociates();\n // dd($product->get());\n // //$item = $item->product()->withAssociates()->first();\n // }\n\n return view('store.home', compact('products', 'cart'));\n }", "public function get_categories () {\n\t\treturn Category::all();\n\t}", "public function allCategories (){\n\n $categories = Category::orderBy('id','desc')->get();\n return response()->json([\n 'categories'=>$categories\n ],200);\n }", "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 $categoryId = request('category_id');\n $categoryName = null;\n \n if($categoryId)\n {\n $category = Category::find($categoryId);\n $categoryName = $category->name;\n \n //$products = $category->products;\n $products = $category->allProducts();\n\n }\n else\n {\n $products = Product::take(1000)->get();\n }\n \n $categories = Category::whereNull('parent_id')->get();\n $cat = DB::table('categories')->where('id', request('category_id'))->get();\n return view('product.index', compact('products', 'categoryName', 'categories', 'cat', 'category'));\n }", "public function queryAll(){\n\t\t$sql = 'SELECT * FROM categorias_vod';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}", "public function index()\n {\n $categories = \\DB::table('categories')->take(2)->get();\n $products_category = [];\n foreach ($categories as $category) {\n $products = \\DB::table('products')\n ->where('products.category', '=', $category->id)\n ->take(6)\n ->get();\n $category->products = $products; \n }\n return view('home')->withcategories($categories);\n }", "public function getCategories(){\n\t\t$query = \"SELECT * FROM final_categoria\";\n\t\treturn $this->con->action($query);\n\t}", "public static function getAll()\n {\n $all = self::remember(60)\n ->orderBy('Category','ASC')\n ->orderBy('Name','ASC')\n ->get();\n foreach($all as $row)\n {\n $result[$row->id] = $row->category.\" - \".$row->name;\n }\n return $result;\n }", "function get_products() {\n\t\tApp::Import('model', 'Product');\n\t\t$this->Product = &new Product;\n\n\t\t$products = $this->Product->find('all', array(\n\t\t\t'conditions' => array(\n\t\t\t\t\"Product.short_description != ''\",\n\t\t\t\t'Availability.cart_allowed' => true,\n\t\t\t\t'Product.active' => true\n\t\t\t),\n\t\t\t'contain' => array(\n\t\t\t\t'TaxClass' => array(\n\t\t\t\t\t'fields' => array('id', 'value')\n\t\t\t\t),\n\t\t\t\t'Image' => array(\n\t\t\t\t\t'conditions' => array('Image.is_main' => '1'),\n\t\t\t\t\t'fields' => array('id', 'name')\n\t\t\t\t),\n\t\t\t\t'Manufacturer' => array(\n\t\t\t\t\t'fields' => array('id', 'name')\n\t\t\t\t),\n\t\t\t\t'CategoriesProduct' => array(\n\t\t\t\t\t'Category' => array(\n\t\t\t\t\t\t'fields' => array('id', 'name')\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t'Availability' => array(\n\t\t\t\t\t'fields' => array('id', 'cart_allowed')\n\t\t\t\t)\n\t\t\t),\n\t\t\t'fields' => array(\n\t\t\t\t'Product.id',\n\t\t\t\t'Product.name',\n\t\t\t\t'Product.short_description',\n\t\t\t\t'Product.url',\n\t\t\t\t'Product.retail_price_with_dph',\n\t\t\t\t'Product.ean',\n\t\t\t\t'Product.zbozi_name',\n\t\t\t\t'Product.heureka_name',\n\t\t\t\t'Product.discount_common',\n\t\t\t\t'Product.zbozi_cpc',\n\t\t\t\t'Product.heureka_cpc'\n\t\t\t)\n\t\t));\n\t\t\n\t\t$products = array_filter($products, array('ExportsController', 'empty_category'));\n\t\t\n\t\tforeach ($products as $i => $product) {\n\t\t\t$products[$i]['Product']['retail_price_with_dph'] = $this->Product->assign_discount_price($products[$i]);\n\t\t\t$products[$i]['Product']['name'] = str_replace('&times;', 'x', $products[$i]['Product']['name']);\n\t\t\t$products[$i]['Product']['short_description'] = str_replace('&times;', 'x', $products[$i]['Product']['short_description']);\n\t\t}\n\n\t\treturn $products;\n\t}", "public function index()\n {\n $categories = ProductCategory::orderBy('name')->get();\n $subcategories = ProductSubcategory::orderBy('name')->get();\n $category_names = array();\n foreach ($categories as $category) {\n $category_names[$category->id] = $category->name;\n }\n\n return view('admin.product-categories')->withCategories($categories)->withSubcategories($subcategories)\n ->withCategory_names($category_names);\n }", "public function getAllProducts(){\r\n\t\t//viet cau sql\r\n\t\t$sql =\"SELECT * FROM products\";\r\n\t\t//thuc thi cau truy van\r\n\t\t$obj = self::$conn->query($sql);\r\n\t\treturn $this->getData($obj);\r\n\t}", "function get_all()\n {\n $this->db->select('products.*, company_category.category');\n $this->db->join('company_category', 'company_category.id = products.cat_id');\n return $this->db->get($this->table)->result();\n }", "public function getAll()\n {\n\t\t\treturn Category::with([\n\t\t\t\t'user'=>function($query){\n\t\t\t\t\t$query->select(['id','firstname','lastname']);\n\t\t\t\t},\n\t\t\t\t'updatedByUser'=>function($query){\n\t\t\t\t\t$query->select(['id','firstname','lastname']);\n\t\t\t\t},\n\t\t\t])->get(['id','name','type','created_by','updated_by']);\n }", "public function index(){\n return CategoryResource::collection(Category::all());\n }", "public function categories(Request $request)\n {\n $idsCategories = [];\n if (isset($request['categories'])) {\n foreach ($request['categories'] as $idCategory) {\n if ((int) $idCategory != 0) {\n $idsCategories[] = (int) $idCategory;\n }\n }\n }\n $marketId = '0';\n if (isset($request['marketid'])) {\n $marketId = $request['marketid'];\n }\n $promo = '0';\n if (isset($request['promo'])) {\n $promo = $request['promo'];\n }\n try {\n if (count($idsCategories) != 0) {\n $request['categories'] = ['0'];\n }\n $this->productRepository->pushCriteria(new RequestCriteria($request));\n $this->productRepository->pushCriteria(new LimitOffsetCriteria($request));\n $this->productRepository->pushCriteria(new ProductsOfFieldsCriteria($request));\n $this->productRepository->pushCriteria(new ProductsOfCategoriesCriteria($request));\n\n $products = $this->productRepository->all();\n } catch (RepositoryException $e) {\n return $this->sendError($e->getMessage());\n }\n\n // return $this->sendResponse($products->toArray(), 'Products retrieved successfully');\n $productsFinal = [];\n\n $productsArray = $products->toArray();\n if (!isset($request['no_filter'])) {\n if ($promo) {\n return $this->sendResponse($productsArray, 'Promos enviados');\n } else {\n\n if (count($idsCategories) > 0) {\n $idMarket = $marketId;\n $valueActiveCategory = DB::table('categoriesproducts')->where('market_id', '=', $idMarket)->whereIn('category_id', $idsCategories)->pluck('active', 'category_id');\n $idsProducts = DB::table('products')->where('market_id', '=', $idMarket)->get(['featured', 'id'])->toArray();\n $algo = [];\n foreach ($idsProducts as $idP) {\n if ($idP->featured) {\n $algo[] = $idP->id;\n }\n }\n $datosProductosRaw = DB::table('product_categories')->whereIn('category_id', $idsCategories)->whereIn('product_id', $algo)->where('active', '1')->get();\n $idsProducts = [];\n foreach ($datosProductosRaw as $idPR) {\n if ($idPR->active) {\n $idsProducts[] = $idPR->product_id;\n }\n }\n $productsFilter = $this->productRepository->whereIn('id', $idsProducts)->get();\n $productsFinal = $productsFilter;\n } else if (count($productsArray) != 0) {\n\n $idMarket = $productsArray[0]['market_id'];\n $valueActiveCategory = DB::table('categoriesproducts')->where('market_id', '=', $idMarket)->pluck('active', 'category_id');\n $idsCategory = [];\n foreach ($valueActiveCategory as $categoryID => $id) {\n $idsCategory[] = $categoryID;\n }\n $productsTmp = [];\n foreach ($productsArray as $product) {\n $valueActiveProduct = DB::table('product_categories')->whereIn('category_id', $idsCategory)->where('product_id', '=', $product['id'])->pluck('active');\n foreach ($valueActiveProduct as $value) {\n if ($value) {\n $productsTmp[] = $product;\n }\n }\n }\n\n $productsFinal = $productsTmp;\n }\n }\n } else {\n $productsFinal = $productsArray;\n }\n\n return $this->sendResponse($productsFinal, 'Productos filtrados enviados');\n }", "public function index()\n {\n return Category::all();\n }", "public function index()\n {\n return Category::all();\n }", "public function index()\n {\n return Category::all();\n }", "public function getallCategories(){\n\t\t$criteria = new CDbCriteria;\n\t\t$criteria->select = '*';\n\t \treturn $terms = NeCategory::model()->findAll($criteria);\n\t}", "public function all() : Collection\n {\n return Category::all();\n }", "public function index() {\n\t\treturn $this->product->all();\n\t}", "public function getProducts(){\n return $this->hasMany('App\\Models\\Products', 'categories_id', 'id');\n }", "public function listsCategoriesGet()\r\n {\r\n $response = Category::all();\r\n return response()->json($response, 200);\r\n }", "public function getCategories(){\n return Category::get();\n }", "public static function getAllCategories()\n\t{\n\t\t$categories= Category::all();\n\t\treturn $categories;\n\t}", "public function getCategoryList()\r\n\t{\r\n\t\t$this->db->select('*');\r\n\t\t$this->db->from('tbl_category');\r\n\t\t$this->db->where(\"(category_parent_id = '' OR category_parent_id = '0')\");\r\n\t\t$this->db->where('category_status', '1');\r\n\t\t$this->db->where('category_type', 'Product');\r\n\t\t$query = $this->db->get();\r\n\t\treturn $query->result() ;\r\n\t}" ]
[ "0.7847916", "0.7562015", "0.7544103", "0.7483316", "0.747296", "0.74395406", "0.74307346", "0.74288106", "0.7422752", "0.7419979", "0.7396467", "0.7379222", "0.7321731", "0.73175377", "0.73138493", "0.7280005", "0.7275137", "0.7257476", "0.72326714", "0.72205764", "0.721629", "0.72019947", "0.72014785", "0.7184244", "0.7176754", "0.7151454", "0.7141334", "0.7138996", "0.7138435", "0.7136481", "0.7118962", "0.71046615", "0.71040004", "0.7085079", "0.70765764", "0.7074068", "0.70683336", "0.70683336", "0.7056576", "0.70541394", "0.7043841", "0.7015628", "0.7012523", "0.70121133", "0.6984171", "0.69838727", "0.6969445", "0.69690967", "0.6952152", "0.69501483", "0.6944732", "0.6935998", "0.6912909", "0.6910404", "0.69093055", "0.6902838", "0.68975836", "0.68941313", "0.68726486", "0.6872102", "0.6866172", "0.6861356", "0.68488395", "0.6844411", "0.68310404", "0.683084", "0.68282944", "0.6827163", "0.6821355", "0.68202794", "0.68092334", "0.68046665", "0.6800044", "0.6793683", "0.6774449", "0.6769481", "0.6765512", "0.6764799", "0.676371", "0.67585343", "0.67540324", "0.67503285", "0.6750256", "0.6744008", "0.67287916", "0.67231816", "0.6716342", "0.67112345", "0.6708591", "0.67022336", "0.67010045", "0.67010045", "0.67010045", "0.6697824", "0.6696947", "0.66957575", "0.66948754", "0.66939604", "0.668746", "0.6669956", "0.6668487" ]
0.0
-1
Get the identifier that will be stored in the subject claim of the JWT.
public function getJWTIdentifier() { return $this->getKey(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getJWTIdentifier() {\n\t\treturn $this->getKey();\n\t}", "public function getJWTIdentifier ()\n {\n return $this->getKey ();\n }", "public function getJWTIdentifier()\r\n {\r\n return $this->getKey();\r\n }", "public function getJWTIdentifier() {\n return $this->getKey();\n }", "public function getJWTIdentifier() {\n return $this->getKey();\n }", "public function getJWTIdentifier()\n {\n return $this->getKey();\n }", "public function getJWTIdentifier()\n {\n return $this->getKey();\n }", "public function getJWTIdentifier(){\n\n return $this->getKey();\n\n }", "public function getJWTIdentifier(){\n return $this->getKey();\n }", "public function getAuthIdentifier()\n {\n return $this->token->getClaim('sub');\n }", "public function getJwtId(): string\n {\n return $this->getPayloadClaim('jti');\n }", "public function getJwtIdentifier(): string;", "public function getJWTIdentifier()\n {\n return $this->getUuidKey();\n }", "public function get_subject_identity( $id_token_claim ) {\n\t\treturn $id_token_claim['sub'];\n\t}", "public function getId(): ?string\n {\n return $this->getClaimSafe(SharedClaimsInterface::CLAIM_JWT_ID);\n }", "public function getJWTIdentifier() {\n return $this->getKey(); // Eloquent Model method\n }", "public function getAuthIdentifier();", "public function getAuthIdentifier()\n {\n $name = $this->getAuthIdentifierName();\n\n return $this->{$name};\n }", "public function getAuthIdentifier()\n {\n\t\treturn $this->getKey();\n\t}", "public function getSubject(): string\n {\n return $this->getPayloadClaim('sub');\n }", "public function getAuthIdentifier()\n {\n // TODO: Implement getAuthIdentifier() method.\n return $this->{$this->getAuthIdentifierName()};\n }", "public function getAuthIdentifierName()\n {\n return \"id\";\n }", "public function getAuthIdentifier()\n {\n return $this->getKey();\n }", "public function getAuthIdentifier()\n {\n return $this->getKey();\n }", "public function getAuthIdentifier()\n {\n return $this->getKey();\n }", "public function getAuthIdentifier()\n {\n return $this->getKey();\n }", "public function getAuthIdentifier()\n {\n return $this->getKey();\n }", "public function getAuthIdentifier()\n {\n return $this->getKey();\n }", "public function getAuthIdentifier()\n {\n return $this->getKey();\n }", "public function getAuthIdentifier()\n {\n return $this->getKey();\n }", "public function getAuthIdentifier()\n {\n return $this->getKey();\n }", "public function getAuthIdentifier()\n {\n return $this->getKey();\n }", "public function getAuthIdentifier()\n {\n return $this->getKey();\n }", "public function getAuthIdentifier()\n {\n return $this->getKey();\n }", "public function getAuthIdentifier() {\n\t\treturn $this -> getKey();\n\t}", "public function getAuthIdentifier() {\r\n return $this -> getKey();\r\n }", "public function getAuthIdentifier()\n\t{\n\t\treturn $this->getKey();\n\t}", "public function getAuthIdentifier()\n\t{\n\t\treturn $this->getKey();\n\t}", "public function getAuthIdentifier()\n\t{\n\t\treturn $this->getKey();\n\t}", "public function getAuthIdentifier()\n\t{\n\t\treturn $this->getKey();\n\t}", "public function getAuthIdentifier()\n\t{\n\t\treturn $this->getKey();\n\t}", "public function getAuthIdentifier()\n\t{\n\t\treturn $this->getKey();\n\t}" ]
[ "0.8022506", "0.79442763", "0.793383", "0.7919336", "0.7919336", "0.790567", "0.7897255", "0.7881609", "0.7853495", "0.7852179", "0.7811985", "0.7795977", "0.7616199", "0.75508195", "0.7400087", "0.7308747", "0.7249977", "0.71332055", "0.7071034", "0.70693094", "0.7062757", "0.7057931", "0.70320284", "0.70320284", "0.70320284", "0.70320284", "0.70320284", "0.70320284", "0.70320284", "0.70320284", "0.70320284", "0.70320284", "0.70320284", "0.70320284", "0.70077664", "0.70035875", "0.69958574", "0.69958574", "0.69958574", "0.69958574", "0.69958574", "0.69958574" ]
0.7937569
50
Return a key value array, containing any custom claims to be added to the JWT.
public function getJWTCustomClaims() { return []; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getJWTCustomClaims() {\n\t\treturn [];\n\t}", "public function getJWTCustomClaims()\r\n {\r\n return [];\r\n }", "public function getJWTCustomClaims()\n {\n return [];\n }", "public function getJWTCustomClaims()\n {\n return [\n 'user' => [\n 'id' => $this->id,\n 'first_name' => $this->first_name,\n 'last_name' => $this->last_name,\n 'email' => $this->email,\n 'roles' => $this->roles,\n 'address' => $this->address,\n 'phone' => $this->phone,\n 'photo_id' => $this->photo_id,\n 'status' => $this->status,\n 'create_date' => $this->create_date,\n 'alter_date' => $this->alter_date,\n ] ,\n ];\n }", "public function getJWTCustomClaims() {\n return [];\n }", "public function getJWTCustomClaims() {\n return [];\n }", "public function getJWTCustomClaims(): array\n {\n return [];\n }", "public function getJWTCustomClaims(): array\n {\n return [];\n }", "public function getJWTCustomClaims(): array\n {\n return [];\n }", "public function getjwtCustomClaims()\n {\n return [];\n }", "public function getJWTCustomClaims()\n {\n return [];\n }", "public function getJWTCustomClaims()\n {\n return [\n 'user_id' => $this->user_id,\n 'id_number' => $this->id_number,\n 'is_admin' => $this->is_admin\n ];\n }", "public function getJWTCustomClaims()\n {\n return [\n 'user' => [\n 'id' => $this->id\n ]\n ];\n }", "public function getJWTCustomClaims() {\n return ['id' => $this->id,\n 'school' => $this->school,\n 'date_of_birth' => $this->date_of_birth,\n 'gender' => $this->gender,\n ];\n }", "public function getJWTCustomClaims(){\n\n return [];\n\n }", "public function getJWTCustomClaims()\n {\n return [\n 'type' =>'husband',\n ];\n }", "public function getCustomClaims()\n {\n return $this->customClaims;\n }", "public function getCustomClaims()\n {\n return $this->customClaims;\n }", "public function getJWTCustomClaims()\n {\n return [\n \"role\"=>'buyer',\n ];\n }", "public function getJWTCustomClaims()\n {\n return [\n 'type' => 'Employer'\n ];\n }", "public function getClaims(): array\n {\n return $this->payload;\n }", "public function getAllClaims(): array\n {\n return $this->payload;\n }", "public function claims(array $customClaims)\n {\n return $this->customClaims($customClaims);\n }", "public function claims(array $customClaims)\n {\n return $this->customClaims($customClaims);\n }", "public function getClaims()\n {\n return $this->claims;\n }", "public function getClaims()\n {\n return $this->idTokenClaims;\n }", "public function getInitClaims(){\n\n return $this->payload;\n \n }", "function jsonSerialize()\n {\n return json_encode($this->claims);\n }", "public function toArray()\n {\n\n $claim_array = [];\n\n /**\n * @var $claim Claim\n */\n foreach ($this->claims as $claim) {\n\n $claim_array[] = [\n 'name' => $claim->getName(),\n 'value' => $claim->getValue()\n ];\n }\n\n return $claim_array;\n }", "public function getClaims(): ClaimCollection\n {\n return $this->claims;\n }", "public function toArray()\n {\n // TODO: Implement toArray() method.\n return $this->claims->toPlainArray();\n }", "public function claims(): Collection;", "public function all()\n {\n return $this->claims;\n }", "function hook_openid_connect_claims_alter(array &$claims) {\n $claims['custom_claim'] = [\n 'scope' => 'profile',\n 'title' => 'Custom Claim',\n 'type' => 'string',\n 'description' => 'A custom claim from provider',\n ];\n}", "public function getData(): array\n {\n return $this->getAllClaims();\n }", "public function getJwtPayload(): array;", "public static function getTokenData() {\n\n\t\t$tokenData = [];\n\n\t\t$tokenData[SSOData::CLAIM_AUDIENCE] = 'testPlugin';\n\t\t$tokenData[SSOData::CLAIM_EXPIRE_AT] = strtotime('10 minutes');\n\t\t$tokenData[SSOData::CLAIM_NOT_BEFORE] = strtotime('-1 minute');\n\t\t$tokenData[SSOData::CLAIM_ISSUED_AT] = time();\n\t\t$tokenData[SSOData::CLAIM_ISSUER] = 'api.staffbase.com';\n\t\t$tokenData[SSOData::CLAIM_INSTANCE_ID] = '55c79b6ee4b06c6fb19bd1e2';\n\t\t$tokenData[SSOData::CLAIM_INSTANCE_NAME] = 'Our locations';\n\t\t$tokenData[SSOData::CLAIM_USER_ID] = '541954c3e4b08bbdce1a340a';\n\t\t$tokenData[SSOData::CLAIM_USER_EXTERNAL_ID] = 'jdoe';\n\t\t$tokenData[SSOData::CLAIM_USER_FULL_NAME] = 'John Doe';\n\t\t$tokenData[SSOData::CLAIM_USER_FIRST_NAME] = 'John';\n\t\t$tokenData[SSOData::CLAIM_USER_LAST_NAME] = 'Doe';\n\t\t$tokenData[SSOData::CLAIM_USER_ROLE] = 'editor';\n\t\t$tokenData[SSOData::CLAIM_ENTITY_TYPE] = 'user';\n\t\t$tokenData[SSOData::CLAIM_THEME_TEXT_COLOR] = '#00ABAB';\n\t\t$tokenData[SSOData::CLAIM_THEME_BACKGROUND_COLOR] = '#FFAABB';\n\t\t$tokenData[SSOData::CLAIM_USER_LOCALE] = 'en_US';\n\t\t$tokenData[SSOData::CLAIM_USER_TAGS] = ['profile:field1:val', 'profile:field2:val'];\n\n\t\treturn $tokenData;\n\t}" ]
[ "0.8764855", "0.8671257", "0.86540663", "0.8640748", "0.8637487", "0.8637487", "0.8612947", "0.8612947", "0.8612947", "0.8587336", "0.85843474", "0.8537444", "0.850183", "0.83522093", "0.8341401", "0.8284469", "0.802165", "0.802165", "0.7902688", "0.7604384", "0.7384419", "0.71656823", "0.6994455", "0.6994455", "0.69544387", "0.6867586", "0.6710836", "0.66628295", "0.6658816", "0.6612779", "0.6551592", "0.6527286", "0.6343127", "0.6195192", "0.619196", "0.6170656", "0.61662036" ]
0.8652406
58
uuid for key operation Setup model event hooks
public static function boot() { parent::boot(); self::creating(function ($model) { $model->uuid = (string) Uuid::generate(4); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function bootUuidKey()\n {\n static::creating(function ($model) {\n $model->incrementing = false;\n $model->{$model->getKeyName()} = (string) Uuid::uuid4();\n });\n }", "protected static function bootUsesUuid()\n {\n static::creating(function ($model) {\n if(!$model->getKey()) {\n $model->{ $model->getKeyName() } = Str::uuid();\n }\n });\n }", "public static function bootUuidable(): void\n {\n static::creating(function ($model) {\n if (! isset($model->attributes[$model->getKeyName()])) {\n $model->incrementing = false;\n $uuid = Uuid::uuid4();\n $model->attributes[$model->getKeyName()] = $uuid->toString();\n }\n }, 0);\n }", "public function getKeyName()\n {\n return 'uuid';\n }", "public static function boot(){\n parent::boot();\n self::creating(function ($model){\n $model->uuid = (string) Str::uuid();\n });\n }", "protected static function bootGenerateUuid()\n {\n static::creating(function ($model) {\n $model->{$model->getKeyName()} = Uuid::generate()->string;\n });\n\n //Prevent attempts to change the UUID\n static::saving(function ($model) {\n\n $original_id = $model->getOriginal('id');\n\n if ($original_id !== $model->id) {\n $model->id = $original_id;\n }\n });\n }", "public static function bootEloquentUuid()\n {\n static::creating(function ($model) {\n $model->incrementing = false;\n $model->{$model->getKeyName()} = (string) Uuid::uuid4();\n });\n }", "public static function boot()\n {\n parent::boot();\n\n static::creating(function ($model) {\n $model->{$model->getKeyName()} = Uuid::uuid1()->toString();\n });\n }", "public function key() {}", "public function key() {}", "public function key() {}", "public function key() {}", "public function key() {}", "public function key() {}", "public function key() {}", "public function key() {}", "public static function bootCanUUID(): void\n {\n static::creating(function (Model $model) {\n /* @var CanUUID|Model $model */\n do {\n $uuid = Uuid::uuid4();\n } while ($model->newQuery()->where([$model->getUUIDName() => $uuid])->count());\n $model->setAttribute($model->getUUIDName(), (string) $uuid);\n });\n }", "public function key()\n {\n }", "public function key()\n {\n }", "public function key()\n {\n }", "public function key()\n {\n }", "public static function boot()\n {\n parent::boot();\n\n static::creating(function ($model) {\n $model->{$model->getKeyName()} = Uuid::generate()->string;\n });\n }", "protected static function boot() {\n\t\tparent::boot();\n\n\t\tstatic::creating(function ($model) {\n\t\t\tif (empty($model->{$model->getKeyName()})) {\n\t\t\t\t$model->{$model->getKeyName()} = Uuid::generate()->string;\n\t\t\t}\n\t\t});\n\t}", "public function beforeSave() {\n $this->owner->{$this->column} = Yii::$app->db->createCommand(\"SELECT UUID()\")->queryScalar();\n }", "public function changeset_uuid()\n {\n }", "public function key()\n {\n }", "public static function bootHasHashIdTrait()\n {\n static::creating(function ($model) {\n $model->attributes['hash_id'] = $model->generateHashId($model->attributes);\n });\n }", "protected static function boot()\n {\n parent::boot();\n\n static::creating(\n function ($model) {\n $model->{$model->getKeyName()} = Uuid::generate()->string;\n }\n );\n }", "public function key()\n {\n }", "public static function bootUuids()\n {\n /**\n * Attach to the 'creating' Model Event to provide a UUID\n * for the `id` field (provided by $model->getKeyName())\n */\n static::creating(function ($model) {\n $model->{$model->getKeyName()} = (string)Uuid::generate();\n });\n\n /**\n * Attach to the 'creating' Model Event to provide a UUID\n * for the `id` field (provided by $model->getKeyName())\n */\n static::pivotAttaching(function ($model, $pivotRelation, $pivotIds, $pivotIdsAttributes) {\n $pivotRelation->attributes['id'] = (string)Uuid::generate();\n });\n\n }", "public function getIdKey();", "public static function boot()\n {\n parent::boot();\n\n self::creating(function ($model) {\n $model->uid = (string) Str::uuid();\n });\n }", "protected static function boot()\n {\n parent::boot();\n\n static::creating(function ($model) {\n $model->{$model->getKeyName()} = Uuid::generate()->string;\n });\n }", "public static function bootHasPublicId()\n {\n static::creating(\n function ($model) {\n if (Utils::isset($model, 'public_id')) {\n return;\n }\n\n $model->public_id = static::generatePublicId($model->publicIdType);\n }\n );\n }", "public static function boot()\n {\n parent::boot();\n static::creating(function ($model) {\n $model->key = 'store_' . md5(Str::random(14) . time());\n });\n }", "public static function boot()\n {\n parent::boot();\n self::creating(function ($model) {\n $model->code = (string)ShortUuid::uuid4();\n });\n }", "function generateReferenceKey($key='')\n{\n return $key . \\Ramsey\\Uuid\\Uuid::uuid4()->toString();\n}", "public static function boot()\n {\n parent::boot();\n self::creating(function ($model) {\n $model->uuid = uuid();\n });\n }", "public function getRouteKeyName()\n {\n return 'uuid';\n }", "public function getRouteKeyName()\n {\n return 'uuid';\n }", "public function getRouteKeyName()\n {\n return 'uuid';\n }", "public function getRouteKeyName()\n {\n return 'uuid';\n }", "public function getRouteKeyName()\n {\n return 'uuid';\n }", "public static function bootUuids()\n {\n static::saving(function($model) {\n $config = $model->setUuid($model);\n $model->uuid = (string)Uuid::generate(4);\n });\n }", "public static function bootUuids ()\n {\n static::creating(function ($model) {\n $model->id = Uuid::uuid4()->toString();\n });\n }", "protected static function boot()\n {\n parent::boot();\n /**\n * Attach to the 'creating' Model Event to provide a UUID\n * for the `id` field (provided by $model->getKeyName()).\n */\n static::creating(function ($model) {\n $model->{$model->getKeyName()} = Uuid::generate()->string;\n \n return true;\n });\n }", "public function getServiceKey() {}", "protected static function boot() {\n\t\tparent::boot(); /**\n\t\t * Attach to the 'creating' Model Event to provide a UUID\n\t\t * for the `id` field (provided by $model->getKeyName())\n\t\t */\n\t\tstatic::creating(function ($model) {\n\n\t\t\t$model->{$model->getKeyName()} = (string) 'cus_' . $model->generateKey();\n\t\t\t$model->user_id = (isset($model->attributes['user_id'])) ? $model->attributes['user_id'] : $model->getUserId();\n\t\t});\n\t}", "public static function boot()\n {\n parent::boot();\n self::creating(function ($model) {\n $model->id = (string) Uuid::generate(4);\n });\n }", "public function uuid(){ }", "function hook_uuid_default_entities() {\n\n}", "protected function pre_save()\n {\n $this->id = random_bytes(128);\n }", "public function setAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "public static function boot()\n {\n parent::boot();\n self::creating(function ($model) {\n $model->id = (string)Uuid::generate(4);\n });\n }", "protected static function boot()\n {\n parent::boot();\n\n static::creating(function ($model) {\n $model->uuid = (string) Str::uuid();\n });\n }", "public static function bootHasUuid() {\n\n $self = new self;\n\n $self->initializeHasUuid();\n\n if ( ! is_string($self->attachEvent) ) {\n\n return;\n }\n\n\t\tstatic::{$self->attachEvent}(function($model) use ($self) {\n \n if ( $self::$disbaleUuidGeneration ) {\n\n return;\n }\n \n $uuidFieldName = $self->getUuidFieldName();\n\n if ( ! $self->canHaveUuid($model->getTable(), $uuidFieldName) ) {\n\n return;\n }\n \n $model->{$uuidFieldName} ?: $model->{$uuidFieldName} = $self->generateUuid();\n\n if ( in_array($self->attachEvent, $self->saveActionForEvents) ) {\n\n method_exists($self, 'saveQuietly') ? $model->saveQuietly() : $model->saveModelQuietly();\n }\n });\n\t}", "public function getKey() {}", "public function getKey() {}", "protected function _getKeyInstanceName() {}", "protected function _getKeyInstanceName() {}", "function hook_entity_uuid_save($entity, $entity_type) {\n\n}", "public function generateAuthKey(): void\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "public function generateAuthKey(){\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "public static function boot()\n\t{\n\t\tparent::boot();\n\t\tself::creating(function ($model) {\n\t\t\t$model->uuid = (string) \\Webpatser\\Uuid\\Uuid::generate(4);\n\t\t});\n\t}", "public function creating(Model $model): void\n {\n $model->setAttribute($model->getKeyName(), Uuid::uuid4());\n }", "public function initializeUuidable(): void\n {\n $this->setKeyType('string');\n }", "public function key();", "public function key();", "public function key();", "public function key();", "public function key();", "public function key();", "public function key();", "public function key();", "public function key();", "abstract protected function driverKey();", "public function key() {\n return $this->key;\n }", "function GetKey() { return( $this->key ); }", "function __getSecretKey($uuid, $seed = '') {\n \t$salt = Configure::read('Security.salt');\n \t$key = sha1($uuid.$seed.$salt);\n// \tif (!$key) $key = sha1(time().'-'.rand().$salt); \t\t// guest user in designer mode. deprecate\n return $key;\n }", "public function getKeyName(): string\n {\n return 'id';\n }", "public function getUniqueKey()\n {\n return $this->unique_key;\n }", "public function creating(Model $model)\n {\n $model->{$model->getKeyName()} = Uuid::uuid4()->toString();\n }", "protected static function boot()\n {\n parent::boot();\n\n static::creating(function ($model) {\n if (!$model->uuid) {\n $model->uuid = Uuid::uuid4()->toString();\n }\n });\n\n static::saving(function ($model) {\n $original_uuid = $model->getOriginal('uuid');\n\n if ($original_uuid !== $model->uuid) {\n $model->uuid = $original_uuid;\n }\n });\n }", "public function generateAuthKey() {\n $this->llaveAutenticacion = Yii::$app->security->generateRandomString();\n }", "#[\\ReturnTypeWillChange]\n public function key()\n {\n }", "#[\\ReturnTypeWillChange]\n public function key()\n {\n }", "public function generateAuthKey() {\n $this->employer_auth_key = Yii::$app->security->generateRandomString();\n }", "public function generateAuthKey() {\n $this->auth_key = Yii::$app->security->generateRandomString(32);\n }", "public function setNameAndId() {}", "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "public function generateAuthKey() {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "public function generateAuthKey() {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "public function generateAuthKey() {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "public function generateAuthKey() {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "public function generateAuthKey()\r\n {\r\n $this->auth_key = Yii::$app->security->generateRandomString();\r\n }", "public function generateAuthKey()\r\n {\r\n $this->auth_key = Yii::$app->security->generateRandomString();\r\n }", "abstract protected function generateKey();", "protected static function booted()\n {\n // Create a uuid when a new Tool is to be created \n static::creating(function ($tool) {\n $tool->uuid = (string) Str::uuid(); \n });\n }", "protected function generateId()\n {\n }", "public static function boot()\n {\n parent::boot();\n\n self::created(function ($item) {\n //If id is not passed, we will create a unique one\n if(!$item->id){\n\n $item->id = (string) Uuid::generate(4);\n\n }\n\n });\n }" ]
[ "0.7491565", "0.68932897", "0.6515827", "0.6421836", "0.63342947", "0.63242066", "0.6292294", "0.6284426", "0.62035334", "0.62035334", "0.62031454", "0.62031454", "0.62031454", "0.62031454", "0.62031454", "0.62031454", "0.6115737", "0.61111605", "0.61111605", "0.61111605", "0.61111605", "0.61064875", "0.6073768", "0.606348", "0.60623616", "0.6051532", "0.6019335", "0.6003239", "0.5993152", "0.59910136", "0.59876734", "0.5947792", "0.594261", "0.5932494", "0.59236026", "0.5908422", "0.59000397", "0.58703035", "0.58395404", "0.58395404", "0.58395404", "0.58395404", "0.58395404", "0.5826166", "0.5817513", "0.5816783", "0.57817227", "0.5780647", "0.5764252", "0.57526016", "0.57466096", "0.5744361", "0.57349974", "0.57239753", "0.5721963", "0.5690769", "0.568603", "0.568603", "0.56671745", "0.56671745", "0.5660591", "0.56300825", "0.56277436", "0.5626556", "0.56190526", "0.55896664", "0.5571014", "0.5571014", "0.5571014", "0.5571014", "0.5571014", "0.5571014", "0.5571014", "0.5571014", "0.5571014", "0.55313426", "0.5530494", "0.55294067", "0.55104554", "0.55057544", "0.5501694", "0.5499593", "0.5485825", "0.54836756", "0.5479841", "0.5479841", "0.5453445", "0.54531014", "0.5452004", "0.5450604", "0.54414934", "0.54414934", "0.54414934", "0.54414934", "0.54305", "0.54305", "0.54269004", "0.5425682", "0.54227567", "0.5416509" ]
0.5833155
43
Get the route key for the model.
public function getRouteKeyName() { return 'uuid'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getRouteKey();", "public function getRouteKey();", "public function getRouteKey()\n {\n return $this->getAttribute($this->getRouteKeyName());\n }", "public function getRouteKey()\n {\n $slug = $this->slugField();\n\n return $this->$slug;\n }", "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->getTranslation('url', app()->getLocale());\n }", "public function getRouteKeyName()\n {\n return $this->getKeyName();\n }", "public function getRouteKey() {\n return $this->slug;\n }", "public function getRouteKeyName();", "public function getRouteKeyName();", "public function getRouteKey()\n {\n return $this->slug;\n }", "public function getRoutingKey();", "public function getRoutingKey();", "public function id(): string\n {\n return $this->model->getRouteKey();\n }", "protected function getModelPrimaryKey(): string\n {\n $model = $this->option('model');\n $model = new $model;\n\n return $model->getRouteKeyName();\n }", "public function getRouteKeyName()\n {\n return 'key';\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 'id';\n }", "public function getRouteKeyName()\n {\n return 'id';\n }", "public function getRouteKeyName()\n {\n return 'id';\n }", "public function getRouteKeyName()\n\t{\n\t return 'id';\n\t}", "public function getRouteKeyName()\n {\n return 'hash_id';\n }", "public function getRouteKey()\n {\n \t$this->slug;\n }", "public function getRoutingKey() {\n return $this->routing_key;\n }", "public function getRouteKeyName() {\n\t\treturn 'user_id';\n\t}", "public function getRouteKeyName(): string\n {\n if (request()->expectsJson()) {\n return 'id';\n }\n return 'slug';\n }", "public function getRouteKeyName(){\n\t\treturn '';\n\t}", "public function getRouteKeyName()\n {\n return request()->segment(1) === 'admin' ? 'id' : 'account_code';\n }", "public function getModelKey()\n {\n if (isset($this->modelKey) == false) {\n $reflectionClass = new ReflectionClass($this->owner);\n $this->modelKey = $reflectionClass->getShortName();\n }\n\n return $this->modelKey;\n }", "public function getRouteKeyName() {\n\t\t\t\n\t\t\treturn 'reference';\n\t\t}", "public function getRouteKeyName()\n {\n /* используется для того чтобы можно было в маршруте \n * например таком: Route::get('products/{category}/{product}', 'ProductsController@index');\n * получить \n * нужную категорию не по колонке id, а по колонке slug\n */\n return 'slug';\n }", "public function getRouteKeyName() {\n return 'url';\n }", "public function getRouteKeyName()\n {\n return 'url';\n }", "public function getRouteKeyName()\n {\n return 'device_info_id';\n }", "public function getRouteKeyName(): string\n {\n return 'token';\n }", "public function getRouteKeyName(): string\n {\n return 'name';\n }", "public function getRoutingKey():string { return $this->routing_key; }", "public function getRouteKeyName()\n {\n // get the category where the name column is equal to user input\n return 'name';\n }", "public function getRouteKeyName()\n {\n return 'hash';\n }", "public function routingKey()\n {\n return $this->message->delivery_info['routing_key'];\n }", "protected function detectObjectKeyFromRoute()\n {\n $request = $this->requestStack->getCurrentRequest();\n Return $request ? Objects::normalizeObjectKey($request->attributes->get('_jarves_object')) : '';\n }", "public function getRouteKeyName(): string {\n\t\t\treturn 'slug';\n\t\t}", "protected function getModelKey($model)\n\t{\n\t\ttry {\n\t\t\treturn $model->getKey();\n\t\t} catch (\\Illuminate\\Database\\Eloquent\\MissingAttributeException $e) {}\n\t}", "public function getRouteKeyName()\n\t{\n\t\treturn 'ID_RequeCli';\n\t}", "public function getRouteKeyName(): string\n\t{\n\t\treturn 'slug';\n\t}", "public function getRouteKeyName(): string\n\t{\n\t\treturn 'slug';\n\t}", "public function getRouteKeyName()\n\t{\n\t return 'token';\n\t}", "public function getRouteKeyName()\n {\n return 'name';\n }", "public function getRouteKeyName()\n {\n return 'name';\n }", "public function getRouteKeyName()\n {\n return 'name';\n }", "protected function getI18nKey()\n {\n return str_replace('/', '.', self::services()->get('inflector')->underscore(get_class($this->model)));\n }", "public function getRouteKeyName()\n {\n return 'stripe_id';\n }", "public function getRouteKeyName()\n\t{\n\t return request()->segment(1) === 'admin' ? 'id' : 'startdatetime';\n\t}", "public function getRouteKeyName()\n {\n return 'name';\n }", "public function getRouteKeyName()\n\t{\n\t\treturn 'name';\n\t}", "public function getRouteKeyName()\n\t{\n\t\treturn 'name';\n\t}", "public function getRouteKeyName(): string\n {\n return 'slug';\n }", "public function getRouteKeyName(): string\n {\n return 'slug';\n }", "public function getModelKeyName()\n {\n // Create an instance of the model to get primary key name\n // I couldn't find a better solution \n $model = $this->getModel();\n $model = new $model;\n return $model->getKeyName();\n }", "public function key()\n {\n return key($this->_models);\n }", "public function moduleKeyForModel($model);", "public function getRouteId()\n {\n return $this->routeId;\n }", "public function get_key() {\n\t\treturn array_get($this->attributes, static::$key);\n\t}", "public function getRouteKeyName(): string\n {\n return 'username';\n }", "public function getRouteKeyName()\n {\n return 'name_ascii';\n }", "public function getRouteKeyName()\n {\n \treturn 'slug';\n }", "public function getKey()\n {\n return $this->id;\n }", "public function getRouteKeyName() {\n return 'slug';\n }", "public function getRouteKeyName() {\n return 'slug';\n }", "public function getRouteKeyName() {\n return 'slug';\n }", "public function getRouteKeyName()\n\t{\n\t\treturn 'slug';\n\t}", "public function getRouteKeyName()\n\t{\n\t\treturn 'slug';\n\t}", "public function getKey()\n {\n return $this->__get(\"key\");\n }", "public static function uriKey()\n {\n return Str::singular(Str::snake(class_basename(get_called_class()), '-'));\n }", "public function getKey()\n {\n return $this->getId();\n }", "public function getRouteKeyName()\n {\n return 'slug';\n }", "public function getRouteKeyName()\n {\n return 'slug';\n }", "public function getRouteKeyName()\n {\n return 'slug';\n }", "public function getRouteKeyName()\n {\n return 'slug';\n }", "public function getRouteKeyName()\n {\n return 'slug';\n }", "public function getRouteKeyName()\n {\n return 'slug';\n }", "public function getRouteKeyName()\n {\n return 'slug';\n }", "public function getRouteKeyName()\n {\n return 'slug';\n }", "public function getRouteKeyName()\n {\n return 'slug';\n }", "public function getRouteKeyName()\n {\n return 'slug';\n }", "public function getRouteKeyName()\n {\n return 'slug';\n }", "public function getRouteKeyName()\n {\n return 'slug';\n }", "public function getRouteKeyName()\n {\n return 'slug';\n }", "public function getRouteKeyName()\n {\n return 'slug';\n }", "public function getRouteKeyName()\n {\n return 'slug';\n }", "public function getRouteKeyName()\n {\n return 'slug';\n }", "public function getRouteKeyName()\n {\n return 'slug';\n }", "public function getRouteKeyName()\n {\n return 'slug';\n }", "public function getRouteKeyName()\n {\n return 'slug';\n }" ]
[ "0.8337987", "0.8337987", "0.83334595", "0.8222846", "0.81179494", "0.8051136", "0.8051136", "0.78780574", "0.7855956", "0.7827925", "0.7806142", "0.7806142", "0.776334", "0.7720968", "0.7720968", "0.76632315", "0.76015264", "0.7569464", "0.7546984", "0.75191367", "0.75191367", "0.75191367", "0.74451184", "0.7389608", "0.73479545", "0.73419607", "0.73206043", "0.7309723", "0.72626406", "0.7229511", "0.7207034", "0.7189533", "0.7168937", "0.71325886", "0.7105363", "0.70719826", "0.70106405", "0.7003203", "0.697755", "0.6929794", "0.68936664", "0.68905205", "0.68858474", "0.6811888", "0.6811863", "0.6810408", "0.6799046", "0.6799046", "0.6782494", "0.67788255", "0.67788255", "0.67788255", "0.6755311", "0.6750218", "0.6737525", "0.6720238", "0.6689515", "0.6689515", "0.66310006", "0.66310006", "0.65935624", "0.6590597", "0.6574548", "0.65220773", "0.65218127", "0.6520239", "0.65092856", "0.64802617", "0.64797515", "0.6463684", "0.6463684", "0.6463684", "0.6454061", "0.6454061", "0.64494216", "0.64484096", "0.64397734", "0.6437307", "0.6437307", "0.6437307", "0.6437307", "0.6437307", "0.6437307", "0.6437307", "0.6437307", "0.6437307", "0.6437307", "0.6437307", "0.6437307", "0.6437307", "0.6437307", "0.6437307", "0.6437307", "0.6437307", "0.6437307", "0.6437307" ]
0.6931887
43
Send the password reset notification.
public function sendPasswordResetNotification($token) { $this->notify(new ResetPasswordNotification($token)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function sendResetPasswordEmail()\n {\n $passwordReset = $this->generateResetPasswordToken();\n\n SendEmailJob::dispatch($this, 'forgot-password', 'Reset Your Password', ['props' => $passwordReset])->onQueue('account-notifications');\n }", "public function sendResetEmail()\n {\n $resetToken=$this->extractTokenFromCache('reset')['reset_token'];\n\n $url = url('/'.$this->id.'/resetPassword',$resetToken);\n Mail::to($this)->queue(new ResetPasswordEmail($url));\n }", "public function sendPasswordResetNotification($token)\n {\n $this->notify(new EcoleResetPasswordNotification($token));\n }", "public function sendPasswordResetNotification($token)\n {\n \n // ====================== Notification ====================== \n //forgot password notification\n \n // \\Notification::send(new ForgotPasswordNotification($token));\n $this->notify(new ForgotPasswordNotification($token));\n\n // ====================== Notification ====================== \n }", "protected function sendPasswordResetEmail(){\n\t\t// generate the url\n\t\t$url = 'http://'.$_SERVER['HTTP_HOST'].'/password/reset/'.$this->password_reset_token;\n\t\t$text = View::getTemplate('Password/reset_email.txt', ['url' => $url]);\n\t\t$html = View::getTemplate('Password/reset_email.html', ['url' => $url]);\n\t\t\n\t\tMail::send($this->email, 'Password_reset', $text, $html);\n\t}", "public function sendPasswordResetNotification( $token )\n {\n $this->notify( new ResetPasswordNotification( $token ) );\n }", "public function sendPasswordResetNotification($token)\n {\n $this->notify(new EmployeeResetPassword($token));\n }", "public function sendPasswordResetNotification($token)\n {\n $this->notify(new resetPassword($token));\n }", "public function sendPasswordResetNotification($token)\n {\n $this->notify(new PediatreResetPassword($token));\n }", "public function sendPasswordResetNotification($token)\n {\n //$url = 'https://example.com/reset-password?token='.$token;\n\n $this->notify(new ResetPasswordNotification($token));\n }", "public function sendPasswordResetNotification($token)\n\t{\n\t $this->notify(new InstitutionResetPasswordNotification($token));\n\t}", "public function sendPasswordResetNotification($token)\n {\n $this->notify(new AdminResetPassword($token));\n }", "public function sendPasswordResetNotification($token)\n {\n $this->notify(new AffiliateResetPassword($token));\n }", "public function sendPasswordResetNotification($token)\n {\n $this->notify(new UserResetPassword($token));\n }", "public function sendPasswordResetNotification($token)\n {\n $this->notify(new UserResetPassword($token));\n }", "public function sendPasswordResetNotification($token)\n {\n $this->notify(new AdminResetPasswordNotification($token));\n }", "public function sendPasswordResetNotification($token)\n {\n $this->notify(new AdminResetPasswordNotification($token));\n }", "public function sendPasswordResetNotification($token)\n {\n $this->notify(new adminResetPasswordNotification($token));\n }", "public function sendPasswordResetNotification($token)\n {\n $this->notify(new ResetPassword($token));\n }", "public function sendPasswordResetNotification($token)\n {\n $this->notify(new ResetPassword($token));\n }", "public function sendPasswordResetNotification($token)\n {\n $this->notify(new ResetPassword($token));\n }", "public function sendPasswordResetNotification($token)\n {\n $this->notify(new ResetPassword($token));\n }", "public function sendPasswordResetNotification($token)\n {\n $this->notify(new ResetPassword($token));\n }", "public function sendPasswordResetNotification($token)\n {\n $this->notify(new ResetPassword($token));\n }", "public function sendPasswordResetNotification($token)\n {\n $this->notify(new ResetPassword($token));\n }", "public function sendPasswordResetNotification($token)\n {\n $this->notify(new UserResetPasswordNotification($token));\n }", "public function sendPasswordResetNotification($token)\n {\n $this->notify(new resetPasswordNotification($token));\n }", "public function sendPasswordResetNotification($token)\n {\n $this->notify(new MyResetPassword($token));\n }", "public function sendPasswordResetNotification($token)\n {\n $this->notify(new Notification('admin',$token));\n }", "public function sendPasswordResetNotification($token)\n {\n $this->notify(new ClientResetpasswordNotification($token));\n }", "public function sendPasswordResetNotification($token)\n\t{\n\t\t$this->notify(new ResetPasswordNotification($token));\n\t}", "public function sendPasswordResetNotification($token)\n {\n $this->notify(new PasswordResetNotification($token));\n }", "public function sendPasswordResetNotification($token)\n {\n $this->notify(new PasswordResetNotification($token));\n }", "public function sendPasswordResetNotification($token)\n {\n $this->notify(new PasswordResetNotification($token));\n }", "public function sendPasswordResetNotification($token)\n {\n $this->notify(new PasswordResetNotification($token));\n }", "public function sendPasswordResetNotification($token)\n {\n $this->notify(new PasswordResetNotification($token));\n }", "public function sendPasswordResetNotification($token)\n {\n $this->notify(new PasswordResetNotification($token));\n }", "public function sendPasswordResetNotification($token) {\n $this->notify(new DoctorResetPassword($token));\n }", "public function sendPasswordResetNotification($token)\n {\n $this->notify(new MailResetPasswordNotification($token));\n }", "public function sendPasswordResetNotification($token)\n {\n $this->notify(new MailResetPasswordNotification($token));\n }", "public function sendPasswordResetNotification($token)\n {\n // $this->notify(new ResetPasswordNotification($token));\n Mail::to($this->email)->send(new PasswordReset($this, $token));\n }", "public function sendPasswordResetNotification($token)\n {\n \n $this->notify(new ResetPasswordNotification($token));\n\n }", "public function sendPasswordResetNotification($token): void\n {\n $this->notify(new ResetPassword($token));\n }", "public function sendPasswordResetNotification($token)\n {\n $this->notify(new CustomResetPassword($token));\n }", "public function sendPasswordResetNotification($token)\n {\n $this->notify(new CustomResetPassword($token));\n }", "public function sendPasswordResetNotification($token)\n {\n $this->notify(new ResetPasswordNotificationEs($token));\n }", "public function sendPasswordResetNotification($token)\n {\n Mail::to($this->email)->send(new ResetPassword($token));\n }", "public function sendPasswordResetNotification($token): void\n {\n $this->notify(new ResetPasswordNotification($token));\n }", "public function sendPasswordResetNotification($token)\n {\n Mail::to($this->email)->send(new ResetPassword($this, $token));\n }", "public function sendPasswordResetNotification($token)\n {\n $this->notify(new Notification('networking_agent',$token));\n }", "public function sendPasswordResetNotification($token)\n {\n $this->notify(new ReiniciarPasswordNotification($token));\n }", "public function sendPasswordResetNotification($token)\n {\n $this->notify(new MailResetPasswordToken($token));\n }", "public function sendPasswordResetNotification($token)\n {\n $this->notify(new MailResetPasswordToken($token));\n }", "public function sendPasswordResetNotification($token)\n {\n $this->notify(new SellerResetPasswordNotification($token));\n }", "public function sendPasswordResetNotification($token)\n {\n $this->notify(new SellerResetPasswordNotification($token));\n }", "public function sendPasswordResetNotification($token)\n {\n $this->notify(new Notification($token));\n }", "public function sendPasswordResetNotification($token)\n {\n $this->notify(new TeacherResetPassword($token));\n }", "Public Function resetPassword()\n\t{\n\t\t$Code = $this->generateResetCode();\n\t\t$Email = $this->email;\n\t\t$Subject = 'Reset Password Request from ' . $_SERVER['HTTP_HOST'];\n\t\t$Body = <<<END\nThis is an automatically generated email from $_SERVER[HTTP_HOST] regarding a password reset.<br/>\nIf you did not request a password reset then please disregard this email.<br/>\n<br/>\nOtherwise, follow this link to reset your password:<br/>\n<a href=\"http://$_SERVER[HTTP_HOST]/BevoMedia/Index/ResetPassword.html?EmailCode=$Code&Email=$Email\">http://$_SERVER[HTTP_HOST]/BevoMedia/Index/ResetPassword.html?EmailCode=$Code&Email=$Email</a>\nEND;\n\t\t\n\t\t$this->ClearResetCode();\n\t\t$this->InsertResetCode($Code);\n\t\t$this->SendEmail($Email, $Subject, $Body);\n\t}", "public function sendPasswordResetNotification($token)\n {\n app(Dispatcher::class)\n ->dispatch(\n new SendMail(\n new PasswordReset(\n [\n 'user' => $this,\n 'token' => $token\n ])\n )\n );\n\n }", "public function resetpassAction()\n\t{\n\t\t$email='[email protected]';\n\n\t\t$customer = Mage::getModel('customer/customer')\n ->setWebsiteId(Mage::app()->getStore()->getWebsiteId())\n ->loadByEmail($email);\n\t\t$customer->sendPasswordResetConfirmationEmail();\n\t}", "public function sendPasswordResetNotification($token)\n {\n $this->notify(new CompaniesResetPassword($token));\n }", "public function sendPasswordResetNotification($token)\r\n {\r\n // Fire event to throw a custom reset notification\r\n $response = event(new ResetLinkEmailSent($this, $token));\r\n\r\n if(! is_array($response) || count($response) === 0)\r\n {\r\n $this->notify(new ResetPasswordNotification($token));\r\n }\r\n }", "public function notifyPasswordUpdate($data){\r\n\t$this->sendTemplateEmail($data['email'], $this->app_config['password_reset_notification_subject'], $this->app_config['password_reset_notification_body'], $data);\r\n}", "public function testSendsPasswordResetEmail()\n {\n $user = factory(User::class)->create();\n $this->expectsNotification($user, ResetPassword::class);\n $response = $this->post('password/email', ['email' => $user->email]);\n $response->assertStatus(302);\n }", "public function sendResetPasswordInstruction() {\n $data = \\Input::all();\n /**\n * @todo Validate Email\n */\n if (!isset($data['email']) || !$data['email']) {\n return $this->json(array('status' => 'error',\n 'errors' => array('No email address supplied')));\n }\n\n try {\n\n // Find the user using the user email address\n $user = \\Sentry::findUserByLogin($data['email']);\n\n // Get the password reset code\n $resetCode = $user->getResetPasswordCode();\n\n // Send password reset email to the user\n $this->notificationService->sendEmail($data['email'], $user->getEmail(), 'Reset Your Password', 'email.resetpassword', compact('user', 'resetCode'));\n\n return $this->json(array(\"status\" => \"success\", \"message\" => \"Password reset instruction sent\"));\n } catch (Cartalyst\\Sentry\\Users\\UserNotFoundException $e) {\n return $this->json(array('status' => 'error',\n 'errors' => array('User was not found')));\n }\n }", "public function ResetPassword() {\n\t\t\t$strPassword = strtolower(substr(md5(microtime()), 4, 8));\n\t\t\t$this->SetPassword($strPassword);\n\t\t\t$this->PasswordResetFlag = true;\n\t\t\t$this->Save();\n\n\t\t\t// Setup Token Array\n\t\t\t$strTokenArray = array(\n\t\t\t\t'NAME' => $this->strFirstName . ' ' . $this->strLastName,\n\t\t\t\t'USERNAME' => $this->strUsername,\n\t\t\t\t'PASSWORD' => $strPassword\n\t\t\t);\n\n\t\t\t// Send Message\n\t\t\tQApplication::SendEmailUsingTemplate('forgot_password', 'Qcodo.com Credentials', QCODO_EMAILER,\n\t\t\t\t$this->SmtpEmailAddress, $strTokenArray, true);\n\t\t}", "public function sendPasswordResetRequest() {\r\n\t\t$user_model = $this->load_model('UserModel');\t\r\n\t\t$user_data = $user_model->getUserByEmail($this->params['forgotten_password_email']);\r\n\t\t\r\n\t\tif($user_data !== null){\r\n\t\t\t$password_reset = $this->generatePasswordResetLink($user_data['ID'], $this->params['forgotten_password_email']);\r\n\t\t\t\r\n\t\t\t$password_reset_model = $this->load_model('PasswordResetModel');\r\n\t\t\t$password_reset_model->insertHash($user_data['ID'], $password_reset['hash']);\r\n\t\t\t\r\n\t\t\tif(Utils::sendPasswordResetEmail($this->params['forgotten_password_email'], $password_reset['link'])){\r\n\t\t\t\t$this->sendResponse(1, true);\r\n\t\t\t} else {\r\n\t\t\t\t$this->sendResponse(0, ErrorCodes::EMAIL_ERROR);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\t$this->sendResponse(0, array('field' => 'forgotten_password_email', 'error_code' => ErrorCodes::EMAIL_NOT_FOUND));\r\n\t\t}\r\n\t}", "public function onUserResetPassword($event) \n {\n $event->user->notify(new NotifyUser($event->user, 'reset'));\n }", "public function sendPasswordResetEmail(User $user, Token $token): void;", "public function forgotPassword()\n {\n if ($this->issetPostSperglobal('email') && !empty($this->getPostSuperglobal('email'))) {\n if ($this->users_manager->resetToken($this->getPostSuperglobal('email'))) {\n $this->session->writeFlash('success', \"Les instructions pour réinitialiser votre mot de passe vous ont été envoyées par email, vous avez 30 minutes pour le faire.\");\n } else {\n $this->session->writeFlash('danger', \"Aucun compte ne correspond à cet adresse mail : {$this->getPostSuperglobal('email')}.\");\n }\n } else {\n $this->session->writeFlash('danger', \"L'adresse mail n'est pas ou est mal renseignée.\");\n }\n $this->render('forgot-password', ['head'=>['title'=>'Mot de passe oublié', 'meta_description'=>'']]);\n }", "function requestpasswordreset_action()\n {\n $login_model = $this->loadModel('Login');\n // set token (= a random hash string and a timestamp) into database\n // to see that THIS user really requested a password reset\n if ($login_model->setPasswordResetDatabaseToken() == true) {\n // send a mail to the user, containing a link with that token hash string\n $login_model->sendPasswordResetMail();\n }\n $this->view->render('login/requestpasswordreset');\n }", "public function resetPasswordSendEmail()\n {\n // if user is logged in, do not let him access this page\n if( Session::isLoggedIn() )\n {\n SCMUtility::frontRedirectTo('?page=scmCourseModule&state=Front&action=myAccount');\n return;\n }\n\n $studentEmail = SCMUtility::stripTags($_POST['forgot_password_email']);\n\n // create token\n $token = uniqid('',true);\n\n // start session reset password\n $this->resetPasswordSessionActivate($token);\n\n // get student\n $student = User::where('email',$studentEmail)->first();\n\n if( ! $student )\n {\n SCMUtility::setFlashMessage('Sorry, we cannot find any user associated with that email address.','danger');\n SCMUtility::frontRedirectTo('?page=scmCourseModule&state=Front&action=myAccount');\n return;\n }\n\n // send password reset link to email\n $studentMailerService = new StudentMailerService();\n $studentMailerService->sendResetPasswordLink($student->email,$token,$student->id);\n\n SCMUtility::setFlashMessage('A reset password link has been sent to your email. Open your email and follow the link to reset your account password. Please do not close this browser during the process. (If you are not receiving a password reset email, consider contacting me directly.)');\n SCMUtility::frontRedirectTo('?page=scmCourseModule&state=Front&action=myAccount');\n return;\n }", "public function requestPasswordReset()\n {\n $this->View->render('user/requestPasswordReset');\n }", "public function sendEmail()\n {\n /* @var $user User */\n $user = User::findOne([\n 'status' => User::STATUS_ACTIVE,\n 'email' => $this->email,\n ]);\n\n if ($user) {\n if (!User::isPasswordResetTokenValid($user->password_reset_token)) {\n $user->generatePasswordResetToken();\n }\n\n if ($user->save()) {\n // return \\Yii::$app->mailer->compose('passwordResetToken', ['user' => $user])\n // ->setFrom([\\Yii::$app->params['supportEmail'] => \\Yii::$app->name . ' robot'])\n // ->setTo($this->email)\n // ->setSubject('Password reset for ' . \\Yii::$app->name)\n // ->send();\n\n//http://localhost/eventone/web/site/reset-password?token=c4psNELzGEz9yAAJqjUasMYsDcm8Z4mt_1424623364\n //send email\n $body = \"<p>\nReset or change your password by clicking the link below\n</p>\n<p>\n <a href=\\\"\" . (\\yii\\helpers\\Url::toRoute('site/reset-password', true)) . \"/?token=\" . $user->password_reset_token . \"\\\">Reset my password</a>.\n</p>\n\n<p>\nIf you have not requested for this email on our web site<br />\nand believe that you have received this email eroneously,<br />\nplease report this to \" . (Yii::$app->params['supportEmail']) . \".<br />\n-----------------------------------------------------------<br />\nThis message was sent by \" . (Yii::$app->params['siteName']) . \" which is powered by \" . (Yii::$app->params['companyName']) . \".<br />\n</p>\n \";\n\n mail($this->email, \"Password Reset\", $body); \n }\n }\n\n return false;\n }", "public function reset_pass() {\n \t\t$email = $this->input->post('email');\n\n\t $pass = $this->generate_pass(16);\n\t $hash = password_hash($pass, B_CRYPT); // http://php.net/manual/en/function.password-hash.php\n\n\t $this->load->model('users_table');\n\t $this->users_table->update_password($email, $hash);\n\n\t $this->send_email($email, $pass, \"2\");\n \t}", "public function forgotPasswordAction()\n {\n $form = new ForgotPasswordForm();\n\n if ($this->request->isPost())\n {\n if($this->security->checkToken())\n {\n // Send emails only is config value is set to true\n if ($this->getDI()->get('config')->useMail) {\n\n if ($form->isValid($this->request->getPost()) == false) {\n foreach ($form->getMessages() as $message) {\n $this->flash->error($message);\n }\n } else {\n\n $user = Users::findFirstByEmail($this->request->getPost('email'));\n if (!$user) {\n $this->flash->success('There is no account associated to this email');\n } else {\n\n $resetPassword = new ResetPasswords();\n $resetPassword->usersId = $user->id;\n if ($resetPassword->save()) {\n // $this->flash->success('Success! Please check your messages for an email reset password');\n $this->flashSess->success(\"Success! Please check your messages for an email reset password\");\n $this->view->disable();\n return $this->response->redirect('');\n } else {\n foreach ($resetPassword->getMessages() as $message) {\n $this->flash->error($message);\n }\n }\n }\n }\n } else {\n $this->flash->warning('Emails are currently disabled. Change config key \"useMail\" to true to enable emails.');\n }\n }\n else {\n $this->flash->error('CSRF Validation is Failed');\n }\n }\n $this->view->form = $form;\n }", "public function handle(PasswordReset $event)\n { \n // Send the notification\n $event->user->notify( new PasswordChangeConfirmation() );\n }", "public function sendResetLink()\n {\n return $this->authService->sendPasswordResetLink(request()->input('email'));\n }", "public function resetAndUpdatePassword() {\n $this->validate ( $this->request, $this->getRules () );\n $user = User::where ( 'email', $this->request->email )->first ();\n \n if (!empty($user) && count ( $user->toArray() ) > 0) {\n $user->password = Hash::make ( (true) ? config()->get('app.user_password'): $this->generatePassword() );\n \n $user->save ();\n $this->email = $this->email->fetchEmailTemplate ( 'admin_forgot' );\n $this->email->subject = str_replace(['##SITE_NAME##'], [config ()->get ( 'settings.general-settings.site-settings.site_name' )], $this->email->subject);\n $this->email->content = str_replace (['##USERNAME##','##FORGOTPASSWORD##'],[$user->name,'admin123'],$this->email->content );\n $this->notification->email ( $user, $this->email->subject, $this->email->content );\n return true;\n } else {\n return false;\n }\n }" ]
[ "0.8414636", "0.79653764", "0.79469335", "0.78665715", "0.786064", "0.7854703", "0.785211", "0.7841399", "0.7839549", "0.7831625", "0.7826701", "0.7817392", "0.78084904", "0.7804854", "0.7804854", "0.779783", "0.779783", "0.77977175", "0.778931", "0.778931", "0.778931", "0.778931", "0.778931", "0.778931", "0.778931", "0.77867085", "0.77820456", "0.7777823", "0.77642816", "0.77622104", "0.7758705", "0.7749986", "0.7749986", "0.7749986", "0.7749986", "0.7749986", "0.7749986", "0.7747357", "0.7741606", "0.7741606", "0.7735071", "0.7724917", "0.7718805", "0.7712862", "0.7712862", "0.7712616", "0.7703121", "0.7695244", "0.7682288", "0.7665483", "0.7658774", "0.7652842", "0.7652842", "0.7642297", "0.7642297", "0.7637836", "0.75767463", "0.75289345", "0.7518037", "0.75119644", "0.74768156", "0.7459363", "0.73738223", "0.7311808", "0.7284906", "0.7272445", "0.72296643", "0.721095", "0.71828103", "0.71570206", "0.7142705", "0.71356535", "0.7043386", "0.7038186", "0.70140475", "0.69698066", "0.6936065", "0.68206924", "0.68023753" ]
0.7748881
58
Create a new command instance.
public function __construct() { parent::__construct(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function newCommand() {\n return newinstance(Command::class, [], '{\n public static $wasRun= false;\n public function __construct() { self::$wasRun= false; }\n public function run() { self::$wasRun= true; }\n public function wasRun() { return self::$wasRun; }\n }');\n }", "public function createCommand()\r\n\t{\r\n\t\t$obj = new DbCommand($this,$this->dbms);\r\n\t\treturn $obj;\r\n\t}", "public function createCommand() {\n\t\treturn new UnboxedCommand( $this );\n\t}", "protected function createCommand($args) {\n $command = new Command();\n $command->id = ifseta($args, 'id');\n $command->name = ifseta($args, 'name');\n $command->url = ifseta($args, 'url');\n $command->description = ifseta($args, 'description');\n $command->uses = ifseta($args, 'uses');\n $command->creationDate = ifseta($args, 'creation_date');\n $command->lastUseDate = ifseta($args, 'last_use_date');\n $command->goldenEggDate = ifseta($args, 'golden_egg_date');\n return $command;\n }", "static public function create($cmd = null, $args = null)\n {\n return new self($cmd, $args);\n }", "public function createCommand($kernel, string $commandName = null, string $commandDescription = null): Command;", "public function makeCommand() \n {\n if($this->CrontabCommandObject === NULL)\n {\n $this->CrontabCommandObject = new \\root\\library\\Crontab\\CrontabCommand\\CrontabCommand();\n }\n \n return $this->CrontabCommandObject;\n }", "public function testInstantiation()\n {\n $command = new CreateRule('dummy name');\n }", "public function command(Command $command);", "public function __construct($command)\n {\n $this->command = $command;\n }", "public static function create(array $data)\n {\n $command = new static();\n $command->exchangeArray($data);\n return $command;\n }", "protected function getCreateCommand()\n {\n $command = new IndexCreateCommand();\n $command->setContainer($this->getContainer());\n\n return $command;\n }", "public function createCommand($string = '')\n {\n return $this->createStringable($string);\n }", "public function createCommand($type) {\r\n $command = $this->xml->createElement('command');\r\n $command->setAttribute('xsi:type', $type);\r\n $command->setAttribute('xmlns', '');\r\n $this->xmlSchema($command);\r\n return $command;\r\n }", "public function __construct()\n {\n // We will go ahead and set the name, description, and parameters on console\n // commands just to make things a little easier on the developer. This is\n // so they don't have to all be manually specified in the constructors.\n if (isset($this->signature)) {\n $this->configureUsingFluentDefinition();\n } else {\n parent::__construct($this->name);\n }\n\n // Once we have constructed the command, we'll set the description and other\n // related properties of the command. If a signature wasn't used to build\n // the command we'll set the arguments and the options on this command.\n $this->setDescription((string) $this->description);\n\n $this->setHelp((string) $this->help);\n\n $this->setHidden($this->isHidden());\n\n if (! isset($this->signature)) {\n $this->specifyParameters();\n }\n }", "public function make(string $name, PreprocessorInterface $preprocessor = null): CommandInterface;", "private function _getCommandByClassName($className)\n {\n return new $className;\n }", "public function newCommand($regex, $callable) {\n $cmd = new Command();\n $cmd->regex = $regex;\n $cmd->callable = $callable;\n return $this->addCommand($cmd);\n }", "public static function create($commandID, ...$args)\n {\n $arguments = func_get_args();\n\n return new static(array_shift($arguments), $arguments);\n }", "private function __construct($command = null)\n {\n $this->command = $command;\n }", "public static function factory(string $command, string $before = '', string $after = ''): self\n {\n return new self($command, $before, $after);\n }", "public function getCommand() {}", "protected function buildCommand()\n {\n $command = new Command(\\Tivie\\Command\\ESCAPE);\n $command\n ->chdir(realpath($this->repoDir))\n ->setCommand($this->gitDir)\n ->addArgument(new Argument('tag', null, null, false))\n ->addArgument(new Argument($this->tag, null, null, true));\n\n return $command;\n }", "public function testCanBeInstantiated()\n {\n $command = $this->createInstance();\n $this->assertInstanceOf('\\\\Dhii\\\\ShellInterop\\\\CommandInterface', $command, 'Command must be an interoperable command');\n $this->assertInstanceOf('\\\\Dhii\\\\ShellCommandInterop\\\\ConfigurableCommandInterface', $command, 'Command must be a configurable command');\n $this->assertInstanceOf('\\\\Dhii\\\\ShellCommandInterop\\\\MutableCommandInterface', $command, 'Command must be a mutable command');\n }", "public function getCommand();", "protected function createCommand($name, array $parameters = [])\n {\n return new Fluent(\n array_merge(\n compact('name'),\n $parameters)\n );\n }", "public function testCanPassCommandStringToConstructor()\n {\n $command = new Command('/bin/ls -l');\n\n $this->assertEquals('/bin/ls -l', $command->getExecCommand());\n }", "public function makeCommandInstanceByType(...$args): CommandInterface\n {\n $commandType = array_shift($args);\n\n switch ($commandType) {\n case self::PROGRAM_READ_MODEL_FETCH_ONE_COMMAND:\n return $this->makeFetchOneCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_FIND_COMMAND:\n return $this->makeFindCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_FIND_LITE_COMMAND:\n return $this->makeFindLiteCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_CREATE_TASK_COMMAND:\n return $this->makeItemCreateTaskCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_CREATE_COMMAND:\n return $this->makeItemCreateCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_UPDATE_TASK_COMMAND:\n return $this->makeItemUpdateTaskCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_UPDATE_COMMAND:\n return $this->makeItemUpdateCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_DELETE_TASK_COMMAND:\n return $this->makeItemDeleteTaskCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_DELETE_COMMAND:\n return $this->makeItemDeleteCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_ADD_ID_COMMAND:\n return $this->makeItemAddIdCommand(...$args);\n\n default:\n throw new FactoryException(sprintf('Command bus for type `%s` not found!', (string) $commandType));\n }\n }", "public function __construct($cmd)\n {\n $this->cmd = $cmd;\n }", "public function getCommand()\n {\n }", "public function command($class)\n {\n $runnable = $this->resolveClass($class);\n\n if ( ! $runnable instanceof Command) {\n throw new InvalidArgumentException(get_class($runnable).' must be an instance of '.Command::class.'.');\n }\n\n $command = $runnable;\n\n if ($runnable instanceof Taggable) {\n $command = new Cached($command, $this);\n }\n\n if ($runnable instanceof Transactional) {\n $command = new Transaction($command, $this, $this->makeFromContainer(ConnectionInterface::class));\n }\n\n if ($runnable instanceof Eventable) {\n $command = new Evented($command, $this);\n }\n\n return $this->newBuilder($command);\n }", "protected function createCommandFactory(): CommandFactory\n {\n return new CommandFactory([\n 'CLOSE' => Command\\CLOSE::class,\n ]);\n }", "public static function register() {\n\n if ( !defined( 'WP_CLI' ) || !WP_CLI ) {\n return;\n }\n \n $instance = new static;\n if(empty( $instance->namespace )) {\n throw new \\Exception(\"Command namespace not defined\", 1);\n \n }\n\t\t\\WP_CLI::add_command( $instance->namespace, $instance, $instance->args ?? null );\n\t}", "public function addCommand($command);", "public function add(Command $command);", "abstract protected function getCommand();", "public function createCommand()\r\n\t{\r\n\t\t//start the string\r\n\t\t$command = '';\r\n\t\t\r\n\t\t//add the java command or the path to java\r\n\t\t$command .= $this->java_path;\r\n\t\t\r\n\t\t//add the class path\r\n\t\t$command .= ' -cp \"'. $this->stanford_path . $this->seperator . '*\" ';\r\n\t\t\r\n\t\t//add options\r\n\t\t$options = implode(' ', $this->java_options);\r\n\t\t$command .= '-'.$options;\r\n\t\t\r\n\t\t//add the call to the pipeline object\r\n\t\t$command .= ' edu.stanford.nlp.pipeline.StanfordCoreNLP ';\r\n\r\n\t\t//add the annotators\r\n\t\t$command .= '-annotators '. $this->listAnnotators();\r\n\t\t\r\n\t\t//add the input and output directors\r\n\t\t$command .= ' -file '. $this->tmp_file . ' -outputDirectory '. $this->tmp_path;\r\n\t\t\r\n\t\t//this is for testing purposes\r\n\t\t//$command .= ' -file '. $this->tmp_path .'\\\\nlp3F25.tmp' . ' -outputDirectory '. $this->tmp_path;\r\n\t\t\r\n\t\t//if using regexner add this to the command string\r\n\t\tif($this->annotators['regexner'] === true)\r\n\t\t{\r\n\t\t\t$command .=' -regexner.mapping '. $this->regexner_path . $this->seperator . $this->regexner_file;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\treturn $command;\r\n\t}", "protected function createCommand(string $name, array $parameters = []): Fluent\n {\n return new Fluent(array_merge(compact('name'), $parameters));\n }", "public function __construct()\n {\n parent::__construct(static::NAME, static::VERSION);\n $this->add(new DefaultCommand());\n }", "public function __construct()\n {\n parent::__construct();\n\n $this->command_name = config(\"custom-commands.command_name\");\n\n parent::__construct($this->signature = $this->command_name);\n\n $this->commands = (array) config(\"custom-commands.commands\");\n \n $this->table = config(\"custom-commands.table\");\n\n $this->row = config(\"custom-commands.row\");\n\n $this->changeEnv = (boolean) config(\"custom-commands.change_env\");\n\n }", "protected function createCommandFile()\n {\n $command_file_full_path = $this->command_dir_path . DIRECTORY_SEPARATOR . $this->arg->getCommandFileName();\n\n // Check if the command already exists\n if (file_exists($command_file_full_path)) {\n throw new Exception('Command already exists.');\n }\n\n // Create the file for the new command\n $command_file = fopen($command_file_full_path, 'w');\n\n // TODO: Create Script Generator to generate the PHP scripts for the new command.\n\n fclose($command_file);\n\n $this->console->getOutput()->println('File created at: ' . $command_file_full_path);\n $this->console->getOutput()->success('Command ' . $this->arg->getSignature() . ' created successfully.');\n }", "public static function create() {}", "public static function create() {}", "public static function create() {}", "public static function create(InteropContainer $container)\n {\n $middleware = $container->get('cmd.middleware');\n return new CommandBusFactory($middleware);\n }", "private function createCli() {\n $this->cli = new Cli();\n $this->commands = $this->commandParser->getAllCommands();\n\n foreach ($this->commands as $command) {\n if ($command->isDefault()) {\n $this->cli->command(\"*\");\n foreach ($command->getOptions() as $option) {\n $this->cli->opt($option->getName(), $option->getDescription(), $option->isRequired(), $option->getType());\n }\n foreach ($command->getArguments() as $argument) {\n if (!$argument->isVariadic())\n $this->cli->arg($argument->getName(), $argument->getDescription(), $argument->isRequired());\n }\n }\n if ($command->getName() != \"\") {\n $this->cli->command($command->getName())->description($command->getDescription());\n foreach ($command->getOptions() as $option) {\n $this->cli->opt($option->getName(), $option->getDescription(), $option->isRequired(), $option->getType());\n }\n foreach ($command->getArguments() as $argument) {\n if (!$argument->isVariadic())\n $this->cli->arg($argument->getName(), $argument->getDescription(), $argument->isRequired());\n }\n }\n }\n\n\n }", "public function testInstantiation()\n {\n $this->assertInstanceOf('Contao\\ManagerBundle\\Command\\InstallWebDirCommand', $this->command);\n }", "public function command(string $command): self\n {\n $this->addCommands[] = $command;\n\n return $this;\n }", "public function create() {}", "protected function createProcess($cmd)\n {\n return new Process(explode(' ', $cmd));\n }", "public function create(){}", "protected function getCommandFactory(): Command\\Factory\n {\n return new Command\\RedisFactory();\n }", "public function __construct()\n {\n parent::__construct();\n\n $this->commandData = new CommandData($this, CommandData::$COMMAND_TYPE_API);\n }", "public function testNewCommand() : void\n {\n $this->assertFalse($this->command->hasArguments());\n $this->assertEquals(\"\", $this->command->getArguments());\n }", "protected function createCommandBuilder()\n\t{\n\t\treturn new CSqliteCommandBuilder($this);\n\t}", "public function __construct($command, $config = [])\n {\n $this->command = $command;\n $this->_output = $this->getDefaultOutput();\n parent::__construct($config);\n }", "public function __construct(){\n\n global $argv;\n\n if(!isset($argv[1])){\n echo 'You must supply a command!' . PHP_EOL;\n exit;\n }//if\n\n $args = $argv;\n\n $scriptName = array_shift($args);\n $method = array_shift($args);\n\n $method = explode('-',$method);\n foreach($method as $k => $v){\n if($k != 0){\n $method[$k] = ucwords($v);\n }//if\n }//foreach\n\n $method = implode('',$method);\n\n $resolved = false;\n\n if(method_exists($this,$method)){\n call_user_func(Array($this,$method), $args);\n $resolved = true;\n }//if\n else {\n foreach(static::$extendedCommands as $commandClass){\n if(method_exists($commandClass,$method)){\n call_user_func(Array($commandClass,$method), $args);\n $resolved = true;\n break;\n }//if\n }//foreach\n }//el\n\n if(!$resolved){\n echo \"`{$method}` is not a valid CLI command!\";\n }//if\n\n echo PHP_EOL;\n exit;\n\n }", "public function forCommand($command)\n {\n $this->command = $command;\n $this->pipe = new NullPipe();\n $this->manager = new InteractiveProcessManager($this->userInteraction);\n\n return $this;\n }", "public function __construct()\n {\n parent::__construct('pwman', '0.1.0');\n\n $getCommand = new Get();\n $this->add($getCommand);\n\n $setCommand = new Set();\n $this->add($setCommand);\n }", "public function create() {\n $class_name = $this->getOption('className');\n return new $class_name();\n }", "public function createCommand(?string $sql = null, array $params = []): Command;", "public function __construct($command = NULL, $name = NULL)\n {\n $args = func_get_args();\n\n switch ($command) {\n case self::CONSTR_CMD_POPULATE_SYNCED_ARRAY:\n case self::CONSTR_CMD_POP_FROM_ARR:\n case self::CONSTR_CMD_POP_FROM_OBJ:\n case self::CONSTR_CMD_POP_FROM_DB:\n case self::CONSTR_CMD_NEW:\n $this->setup_name = $name;\n\n # shift off known args\n array_shift($args);\n array_shift($args);\n break;\n }\n\n switch ($command) {\n case self::CONSTR_CMD_POP_FROM_ARR:\n $this->applyArray($args[0]);\n break;\n case self::CONSTR_CMD_POP_FROM_OBJ:\n break;\n case self::CONSTR_CMD_POP_FROM_DB:\n break;\n case self::CONSTR_CMD_POPULATE_SYNCED_ARRAY:\n $this->applyArray($args[0]);\n $this->setAllLoaded();\n break;\n default:\n throw new OrmInputException('Guessing not supported, please explicitly specify construction type');\n self::constructGuess($args);\n }\n\n $this->ensureObjectInDb();\n }", "public function generateCommands();", "protected function newInstanceCommand($commandClass)\n {\n $class = new ReflectionClass($commandClass);\n\n return $class->newInstanceArgs($this->resolveCommandParameters($class));\n }", "protected function buildCommand()\n {\n return $this->command;\n }", "public function makeItemCreateCommand(string $processUuid, array $item): ItemCreateCommand\n {\n $processUuid = ProcessUuid::fromNative($processUuid);\n $uuid = Uuid::fromNative(null);\n $item = Item::fromNative($item);\n\n return new ItemCreateCommand($processUuid, $uuid, $item);\n }", "public function __construct($commandName, $args = [], $description = '') {\n if (!$this->setName($commandName)) {\n $this->setName('--new-command');\n }\n $this->addArgs($args);\n\n if (!$this->setDescription($description)) {\n $this->setDescription('<NO DESCRIPTION>');\n }\n }", "public function getCommand($name, array $args = array())\n {\n return parent::getCommand($name, $args)\n ->setRequestSerializer(RequestSerializer::getInstance());\n }", "protected function buildCommand()\n {\n $command = new Command(\\Tivie\\Command\\DONT_ADD_SPACE_BEFORE_VALUE);\n $command\n ->chdir(realpath($this->repoDir))\n ->setCommand($this->gitDir)\n ->addArgument(new Argument('rev-parse'))\n ->addArgument(new Argument('HEAD'));\n\n return $command;\n }", "protected function instantiateCommand(Request $request, $args)\n {\n $command = new DeletePackageCustomerCommand($args);\n\n $requestBody = $request->getParsedBody();\n\n $this->setCommandFields($command, $requestBody);\n\n return $command;\n }", "public function createCommand($sql = null, $params = [])\n {\n $command = new Command([\n 'db' => $this,\n 'sql' => $sql,\n ]);\n\n return $command->bindValues($params);\n }", "protected function setCommand($value) {\n\t\t$this->_command = trim($value);\n\t\treturn $this;\n\t}", "public function setCommand($command)\n {\n $this->command = $command;\n\n return $this;\n }", "public function buildCommand()\n {\n return parent::buildCommand();\n }", "private function registerMakeModuleCommand()\n {\n $this->app->singleton('command.make.module', function($app) {\n return $app['Caffeinated\\Modules\\Console\\Generators\\MakeModuleCommand'];\n });\n\n $this->commands('command.make.module');\n }", "public function __construct()\n {\n parent::__construct();\n\n $this->currentDirectory = getcwd();\n $this->baseIndentLevel = 0;\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\HelpCommand\", \"help\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\InitializePlanetCommand\", \"init\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\PackAndPushUniToolCommand\", \"packpushuni\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\PackLightPluginCommand\", \"packlightmap\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\PushCommand\", \"push\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\PushUniverseSnapshotCommand\", \"pushuni\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\UpdateSubscriberDependenciesCommand\", \"updsd\");\n\n }", "public function getCommand(string $command);", "protected function registerCommand(){\n\t\t$this->app->singleton('fakeid.command.setup', function ($app){\n\t\t\treturn new SetupCommand();\n\t\t});\n\n\t\t$this->commands('fakeid.command.setup');\n\t}", "public function addCommand($command, $args = [], $data = [])\n {\n $item = new ScreenCommand();\n $item->screen_id = $this->id;\n $item->command = $command;\n $item->arguments = $args;\n $item->fill($data);\n $item->save();\n\n return $item;\n }", "public function test_creating_command_from_container()\n {\n $now = new \\DateTime();\n $this->container->add('DateTime', $now);\n $command = 'Spekkionu\\DomainDispatcher\\Test\\Commands\\CommandWithConstructor';\n $result = $this->dispatcher->dispatch($command);\n $this->assertSame($now, $result);\n }", "protected function createProcess(): Process\n {\n $command = [\n $this->settings['executable']\n ];\n\n $command[] = $this->from;\n $command[] = $this->to;\n\n // Set the margins if needed.\n if ($this->settings['marginsType'] !== self::MARGIN_TYPE_NO_MARGINS) {\n $command[] = '--marginsType=' . $this->settings['marginsType'];\n }\n\n // If we need to proxy with node we just need to prepend the $command with `node`.\n if ($this->settings['proxyWithNode']) {\n array_unshift($command, 'node');\n }\n\n // If there's no graphical environment we need to prepend the $command with `xvfb-run\n // --auto-servernum`.\n if (! $this->settings['graphicalEnvironment']) {\n array_unshift($command, '--auto-servernum');\n array_unshift($command, 'xvfb-run');\n }\n\n return new Process($command);\n }", "private function registerCommand()\n {\n $this->app->singleton('command.shenma.push', function () {\n return new \\Larva\\Shenma\\Push\\Commands\\Push();\n });\n\n $this->app->singleton('command.shenma.push.retry', function () {\n return new \\Larva\\Shenma\\Push\\Commands\\PushRetry();\n });\n }", "public function __construct(string $command, string $before = '', string $after = '')\n {\n $this->command = $command;\n $this->before = $before;\n $this->after = $after;\n }", "public function generateCommand($singleCommandDefinition);", "public function create() {\n }", "public function create() {\n }", "public function create() {\r\n }", "public function create() {\n\n\t}", "private function getImportCommand()\n {\n return new IndexImportCommand(self::getContainer());\n }", "public function __construct($command)\n {\n $this->command = $command;\n\n $this->command->line('Installing Images: <info>✔</info>');\n }", "public function __construct()\n {\n self::$instance =& $this;\n\n $commanddir = Config::main('directory');\n $excludes = Config::main('exclude');\n\n if(is_null($commanddir))\n die('Could not find commands directory. It should be specified in the main config.');\n\n //The directory where commands reside should be relative\n //to the directory with the clip executable.\n $dir = realpath(__DIR__.\"/{$commanddir}\");\n\n $cmdfiles = scandir($dir);\n //Loop through each file in the commands directory\n foreach($cmdfiles as $file)\n {\n //Assume that each file uses the standard '.php' file extension.\n $command = substr($file, 0, -4);\n\n //Ignore the unnecessary directories as commands and anything that\n //has been marked for exclusion then attempt to include the valid ones.\n if($file !== '.' && $file !== '..' && array_search($command, $excludes) === false && include(\"{$dir}/{$file}\"))\n {\n if(class_exists($command, false))\n {\n $obj = new $command;\n //Only load commands that use the clip command interface\n if($obj instanceof Command)\n $this->commands[strtolower($command)] = $obj;\n }\n }\n }\n }", "public function __construct($action, $command = null) {\n parent::__construct($action, self::NAME);\n\n $fieldFactory = FieldFactory::getInstance();\n\n $commandField = $fieldFactory->createField(FieldFactory::TYPE_STRING, self::FIELD_COMMAND, $command);\n\n $this->addField($commandField);\n }", "public function createCommand($db = null, $action = 'get')\n {\n if ($db === null) {\n $db = Yii::$app->get(Connection::getDriverName());\n }\n $this->addAction($action);\n $commandConfig = $db->getQueryBuilder()->build($this);\n\n return $db->createCommand($commandConfig);\n }", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();" ]
[ "0.8010746", "0.7333379", "0.72606754", "0.7164165", "0.716004", "0.7137585", "0.6748632", "0.67234164", "0.67178184", "0.6697025", "0.6677973", "0.66454077", "0.65622073", "0.65437883", "0.64838654", "0.64696646", "0.64292693", "0.6382209", "0.6378306", "0.63773245", "0.6315901", "0.6248427", "0.6241929", "0.6194334", "0.6081284", "0.6075819", "0.6069913", "0.60685146", "0.6055616", "0.6027874", "0.60132784", "0.60118896", "0.6011778", "0.5969603", "0.59618074", "0.5954538", "0.59404427", "0.59388787", "0.5929363", "0.5910562", "0.590651", "0.589658", "0.589658", "0.589658", "0.58692765", "0.58665586", "0.5866528", "0.58663124", "0.5852474", "0.5852405", "0.58442044", "0.58391577", "0.58154446", "0.58055794", "0.5795853", "0.5780188", "0.57653266", "0.57640004", "0.57584697", "0.575748", "0.5742612", "0.5739361", "0.5732979", "0.572247", "0.5701043", "0.5686879", "0.5685233", "0.56819254", "0.5675983", "0.56670785", "0.56606543", "0.5659307", "0.56567776", "0.56534046", "0.56343585", "0.56290466", "0.5626615", "0.56255764", "0.5608852", "0.5608026", "0.56063116", "0.56026554", "0.5599553", "0.5599351", "0.55640906", "0.55640906", "0.5561977", "0.5559745", "0.5555084", "0.5551485", "0.5544597", "0.55397296", "0.5529626", "0.552908", "0.552908", "0.552908", "0.552908", "0.552908", "0.552908", "0.552908", "0.552908" ]
0.0
-1
Execute the console command.
public function handle() { /*Global settings*/ $global_settings = Settings::getSettings(); $data = array( 'token' => $global_settings->api_token, 'params' => json_encode(array( 'key' => 'reminder', )) ); $query = http_build_query($data); $job_url = $global_settings->app_url.$this->api_uri.'?'.$query; dispatch(new SendEmail($job_url)); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function handle()\n {\n\t\t$this->info('league fetching ..');\n $object = new XmlFeed();\n\t\t$object->fetchLeague($this->argument('sports_id'));\n\t\t$this->info('league saved');\n }", "public function handle()\n {\n //get us the Converter class instance and call the convert() method on it.\n $this->info(\n \\Aregsar\\Converter\\ConverterFacade::convert($this->argument(\"currency\"))\n );\n }", "public function handle()\n {\n $this->locale = $this->argument('locale');\n\n $this->loadGroupLines();\n\n $this->loadNameSpacedLines();\n\n $this->info('Complete');\n }", "public function handle()\n {\n $this->importUser($this->argument('username'));\n $this->call('ldap:show-user', $this->arguments());\n }", "public function handle() {\n $user = User::where('id', $this->argument('userId'))->first();\n $this->info($user->email);\n }", "public function handle()\n {\n $translations = collect(json_decode(file_get_contents('https://raw.githubusercontent.com/getbible/Bibles/master/translations.json')))->flatten();\n switch($this->argument('action')) {\n case 'fetch':\n $this->fetchBibles($translations);\n break;\n case 'convert':\n $this->convertBibles($translations);\n break;\n }\n }", "public function handle()\n {\n try {\n $evalstr = $this->evaluater->evaluate($this->argument('evalString'));\n $this->info($evalstr);\n } catch (ForbiddenSymbolsException $exception) {\n $this->error($exception->getMessage());\n } catch (IncorrectSymbolsException $exception) {\n $this->error($exception->getMessage());\n }\n }", "public function handle()\n {\n\n $settings = Setting::fetch();\n $id = $this->argument('id');\n $this->scrape_game_data($id);\n }", "public function handle()\n {\n // env('CALENDARINDEX_TOKEN', '6f2bd927201ba4b22bb57df08db0c517e51732de')\n $this->getData($this->argument('country'), $this->argument('region'));\n }", "public function handle()\n {\n $email = $this->argument('email');\n $name = $this->argument('name');\n\n $this->info(\"starting to generate users details\");\n\n }", "public function handle()\n {\n\t\t$this->info('Importing translations...');\n\n\t\t$this->manager->importTranslations(true);\n }", "public function handle()\n {\n $user = null;\n\n if ($email = $this->option(\"email\", false)) {\n $user = $this->findByEmail($email);\n }\n\n if ($id = $this->option(\"id\", false)) {\n $user = $this->findById($id);\n }\n\n if (empty($user)) {\n $this->warn(\"User no found\");\n }\n else {\n $this->setRoleToUser($user);\n }\n }", "public function handle()\n {\n $name = ucwords($this->argument('name'));\n $this->call('repository:contract', [ 'name' => $name ]);\n $this->call('repository:class', [ 'name' => $name, '--driver' => $this->option('driver') ]);\n }", "public function handle()\n\t{\n\t\t// Superuser\n\t\tif( ! $this->option('no-superuser'))\n\t\t\t$this->call('setup:superuser');\n\n\t\t// Countries\n\t\tif( ! $this->option('no-countries'))\n\t\t\t$this->call('setup:countries', ['country' => array_filter(explode(',', $this->option('countries')))]);\n\n\t\t// Languages\n\t\tif( ! $this->option('no-languages'))\n\t\t\t$this->call('setup:languages', ['language' => array_filter(explode(',', $this->option('languages')))]);\n\n\t\t// Currencies\n\t\tif( ! $this->option('no-currencies'))\n\t\t\t$this->call('setup:currencies', ['currency' => array_filter(explode(',', $this->option('currencies')))]);\n\n\t\t// Clear cache\n\t\t$this->call('cache:clear');\n\t}", "public function handle()\n\t{\n\t\t$name = $this->argument('name');\n\t\t\n\t\t$this->info(\"Searching eve api for {$name}\");\n\t\t$result = Corporation::searchEVEAPI($name);\n\n\t\t$this->info(\"results\");\n\t\tforeach($result as $corp)\n\t\t{\n\t\t\tprint $corp->name . \" \" . $corp->id . \"\\r\\n\";\n\t\t}\n\t}", "public function handle()\n {\n $user = $this->argument('user');\n $this->info('Display this on the screen, user ' . $user);\n return 0;\n }", "public function handle()\n {\n $this->userVectors->test($this->option('force'));\n }", "public function handle()\n {\n $mapping = $this->formatMappingName((string)$this->argument('mapping'));\n \n $model = $this->option('model') ? $this->formatModelName($this->option('model')) : null;\n \n $this->filesystem->put(\n $this->buildMappingFilePath($mapping),\n $this->buildMapping(\n $this->getDefaultStub(),\n $mapping,\n $model\n )\n );\n \n $this->composer->dumpAutoloads();\n }", "public function handle()\n {\n switch ($this->argument('type')) {\n case 'dns':\n $this->dnscheck->run($this->option('dry-run') ? true : false, $this->argument('domain'));\n break;\n case 'whois':\n $this->whoischeck->run($this->option('dry-run') ? true : false, $this->argument('domain'));\n break;\n }\n }", "public function handle()\n {\n $option = $this->argument('option');\n\n if (! in_array($option, ['expired', 'all'])) {\n return $this->error('Invalid option supplied to command...');\n }\n\n $this->comment('Beginning pruning process...');\n\n $this->comment($this->pruneDatabase($option) . ' deleted from database...');\n\n $this->comment($this->pruneFiles($option) . ' deleted from files...');\n\n $this->info('Nonces pruned successfully!');\n }", "public function handle()\n {\n $subscriptionUpdateService = new SubscriptionUpdateService();\n $subscriptionUpdateService->runUpdates();\n }", "public function handle()\n\t{\n\t\t\n\t\t$source_directory = $this->argument( 'source_directory' );\n\t\t$target_directory = $this->argument( 'target_directory' );\n\t\t$template = (string) $this->option( 'template' );\n\n\t\t$statik = new \\App\\Statik\\Statik;\n\n\t\t$statik->generateHTMLFiles( $this, $source_directory, $target_directory, $template ) && $this->info( \"\\e[1;32mDONE!\" );\n\n\t}", "public function handle()\n {\n if (!$this->argument('file')) {\n $this->info('Please specify file to call.');\n }\n\n $file = $this->argument('file');\n\n if (!$this->fileHandler->exists($file)) {\n $this->info('Wrong path or file not exist.');\n }\n\n $this->executeFile($file);\n }", "public function handle()\n {\n $user = $this->argument('user');\n $this->scanner->setUserName($user);\n $this->scanner->scanUser();\n }", "public function handle()\n {\n if ($this->argument('user')) {\n $userId = $this->argument('user');\n\n $this->info(\"Liquidate affiliate commission for user \" . $userId);\n\n $user = $this->userService->findById($userId);\n\n if ($user) {\n $this->walletService->liquidateUserBalance($user);\n } else {\n $this->error(\"User not found\");\n }\n\n $this->info(\"Done\");\n } else {\n $this->info(\"Liquidate all commissions\");\n\n $this->walletService->liquidateAllUsersBalance();\n\n $this->info(\"Done\");\n }\n }", "public function handle()\n {\n $action = $this->choice('what action do you have on mind', [\n 'add-relation', 'remove-columns', 'column-type', 'rename-column'\n ]);\n switch ($action) {\n case 'add-relation':\n $this->addRelation();\n break;\n\n case 'remove-columns':\n $this->removeColumns();\n break;\n case 'column-type':\n $this->columnType();\n break;\n case 'rename-column':\n $this->renameColumn();\n break;\n default:\n $this->error('Unsupported action requested...');\n }\n $this->info('Command executed successfully');\n }", "public function handle()\n {\n $arguments = $this->arguments();\n $storageDir = $arguments['storageDir'];\n $localStorageDir = $arguments['localStorageDir'];\n $url = $arguments['url'];\n $cmd = sprintf(\"./app/Console/Commands/ShellScripts/screen_shot.sh %s %s %s\", $storageDir, $localStorageDir, $url);\n\n while (true) {\n $result = shell_exec($cmd);\n print_r($result);\n sleep(3);\n }\n }", "public function handle()\n {\n $city = $this->argument('city');\n\n $weatherService = new CurrentWeatherService();\n try {\n $weather = $weatherService->getByCity($city);\n } catch (WeatherException $e) {\n $this->error($e->getMessage());\n return;\n }\n\n $this->info('Weather for city '.$city);\n dump($weather->toArray());\n }", "public function handle()\n {\n $this->getModels($this->argument('model'));\n $this->getLanguages($this->argument('locale'));\n $this->createMultiLanguageRecords();\n }", "public function handle()\n {\n $this->processOptions();\n\n echo json_encode( $this->dateTimeRange ) . \"\\n\";\n\n $this->dispatch( new ProcessNewActionsJob(\n $this->dateTimeRange ,\n str_random( 16 ),\n $this->option('runtime-threshold')\n ) );\n }", "public function handle()\n {\n $fightId = $this->argument('fight_id');\n $metricId = $this->argument('metric_id');\n //$strategyName = 'App\\\\'.$this->argument('metric_name');\n\n $metric = BossMetric::find($metricId);\n if ($metric === null) {\n $this->error(\"Error: no metric with id: $metricId found!\");\n return;\n }\n\n $fight = Fight::find($fightId);\n\n if ($fight === null) {\n $this->error(\"Error: no fight with id: $fightId found!\");\n return;\n }\n\n $strategy = $metric->getStrategy();\n $strategy->setFight($fight);\n $strategy->run();\n }", "public function handle()\n {\n\t\t$this->call('vendor:publish');\n\t\t$this->call('migrate');\n\t\t$this->call('db:seed');\n\t\t$this->call('factotum:storage');\n\t\t$this->call('factotum:storage');\n }", "public function handle()\n {\n $user_id = $this->argument('user') ?? null;\n\n if (is_null($user_id)) {\n $users = User::all();\n\n foreach ($users as $user) {\n $this->showUserBalance($user);\n }\n } else {\n $user = User::find($user_id);\n\n $this->showUserBalance($user);\n }\n }", "public function handle()\n {\n $this->capsuleService->getAll();\n $this->line('Command Worked');\n }", "public function handle()\n {\n $platform_wechat_id = $this->argument('id');\n $customer_id = $this->argument('customer_id');\n $this->info(\"Starting at \".date('Y-m-d H:i:s').\". Running initial for 【{$this->signature}】\");\n $this->getUserInfoList($platform_wechat_id,$customer_id);\n $this->info(\"End at \".date('Y-m-d H:i:s').\". over for 【{$this->signature}】\");\n }", "public function handle()\n {\n $this->publishAssets();\n $this->call('twill:flush-manifest');\n $this->call('view:clear');\n }", "public function handle()\n {\n \n $argument = $this->argument('data');\n \n $this->prepare( $argument );\n \n $this->make();\n \n $this->info( 'migration has been created : '. $this->fileName );\n \n }", "public function handle()\n {\n chdir(resource_path('assets/ts'));\n $path = $this->argument(\"path\");\n if(isset($path))\n {\n Logger::info('execute '.$path);\n Command::executeRaw('tsc', [\"-p\", $path]);\n }else\n Logger::info('execute tsc');\n Command::executeRaw('tsc');\n }", "public function handle()\n {\n $this->info('Starting date change command.');\n\n Word::where('language_id', 1)->update(array('created_at' => '1970-01-01 00:00:01'));\n Word::where('language_id', 2)->update(array('created_at' => '1970-01-01 00:00:01'));\n\n $this->info('Dates have been changed to 1970-01-01 00:00:01');\n }", "public function handle()\n {\n $this->info($this->slugger->encode($this->argument('id')));\n }", "public function handle()\n {\n $this->line(static::$logo);\n $this->line('Neat admin current version:' . Neat::version());\n\n $this->comment('');\n $this->comment('Available commands:');\n\n $this->listAvailableCommands();\n }", "public function handle()\n {\n $this->revisions->updateListFiles();\n }", "public function handle(): void\n {\n // Set argument\n $this->url = $this->argument(self::URL_ARGUMENT);\n\n // Handler takes care of computation\n (new CommandHandler($this))->compute();\n }", "public function handle()\n {\n try\n {\n $filename = $this->argument('filename');\n Excel::import(new ObjectsImport, $filename);\n\n $this->info('Data import is now completed');\n }\n catch(Exception $ex)\n {\n $this->error($ex->getMessage());\n }\n }", "public function handle() {\n $entity = $this->validateEntity($this->argument('entity'));\n $job = new DataProcessingJob($entity, str_random(16));\n $this->dispatch($job);\n }", "public function handle()\n {\n $isProductionMode = 'prod' == $this->argument('mode');\n\n if ($isProductionMode) {\n if (!$this->confirm('Are you sure to run in production mode? Running this command may cause critical issues?')) {\n exit(1);\n }\n }\n\n $this->_recalculate($isProductionMode);\n }", "public function handle()\n {\n if(!$this->verify()) {\n $rank = $this->createRankSuperAdmin();\n $user = $this->createUserSuperAdmin();\n $user->Ranks()->attach($rank);\n $this->line('Felicitaciones');\n } else {\n $this->error('No se puede ejecutar');\n }\n }", "public function handle()\n {\n // Get CLI Input\n $user_id = $this->option(\"uid\");\n\n // User Products\n ( new CommandManager() )->showUserProducts( $user_id );\n }", "public function handle()\n {\n $force = $this->option('force');\n\n if($this->option('without-bulk')){\n $this->withoutBulk = true;\n }\n\n if ($this->generateClass($force)){\n $this->info('Generating permissions for '.$this->modelBaseName.' finished');\n }\n }", "public function handle()\n {\n $tournaments = Tournament::all()->toArray();\n foreach ($tournaments as $tournament) {\n $slug = $this->tournamentRepoObj->generateSlug($tournament['name'].Carbon::createFromFormat('d/m/Y', $tournament['start_date'])->year,'');\n DB::table('tournaments')\n ->where('id', $tournament['id'])\n ->update([\n 'slug' => $slug\n ]);\n }\n $this->info('Script executed.');\n }", "public function handle()\n {\n $userId = $this->argument('user');\n\n /** @var User $user */\n $user = User::findOrFail($userId);\n\n // Get token.\n $info = (new Client())->auth();\n\n // Save to db.\n $user->access_token = $info['access_token'];\n $user->access_secret = $info['access_secret'];\n $user->save();\n\n $this->line(\"Saved access token and secret for user: {$user->email}\");\n }", "public function handle()\n {\n $m = new MemberFromText;\n $m->train();\n $id = $m->predict($this->argument('text'));\n dump(Miembro::find($id)->toArray());\n }", "public function handle()\n {\n $this->generator\n ->setConsole($this)\n ->run();\n }", "public function handle()\n {\n $this->createController();\n $this->createServiceDir();\n\n exit;\n $args = [\n '--provider' => TestProvider::class\n ];\n $className = $this->argument('className');\n if (!$className) {\n $className = 'MethodsList';\n }\n $className = ucwords($className);\n $this->call('vendor:publish', $args);\n $this->info('Display this on the screen ' . $className);\n }", "public function handle()\n {\n $this->createDirectories();\n\n $this->publishTests();\n\n $this->info('Authentication tests generated successfully.');\n }", "public function handle()\n {\n $this->setDbConnection(\n $this->input->getOption('database') ?: config('ghost-database.default_connection')\n );\n\n $native = $this->input->getOption('native-import') ?: config('ghost-database.use_native_importer');\n\n $snapshot = $this->import($native);\n\n $this->info(\"Snapshot `{$snapshot->name}` loaded!\");\n }", "public function handle()\n {\n $exec = $this->argument('exec');\n\n switch ($exec) {\n case 'download' :\n $this->download();\n break;\n\n case 'generate' :\n $this->generate();\n break;\n\n default :\n echo \"Choose 'download' or 'generate' for this command\";\n break;\n }\n }", "public function handle()\n {\n $this->call('ziggy:generate', ['path' => './resources/js/ziggy-admin.js', '--group' => 'admin']);\n $this->call('ziggy:generate', ['path' => './resources/js/ziggy-frontend.js', '--group' => 'frontend']);\n $this->call(TranslationsGenerateCommand::class);\n }", "public function handle()\n {\n $tenantName = $this->argument('tenant');\n\n $tenant = Tenant::where('name', $tenantName)->orWhere('subdomain', $tenantName)->first();\n\n if ($tenant) {\n $tenant->setActive();\n \\Artisan::call('tinker');\n } else {\n $this->error('Error: Tenant not found');\n }\n }", "public function handle()\n {\n try {\n if (!empty($userId = $this->argument('user'))) {\n $user = User::find($userId);\n } else {\n $user = User::inRandomOrder()->first();\n }\n\n if (empty($user)) {\n throw new \\Exception('User not found');\n }\n\n echo JWTAuth::fromUser($user);\n } catch (\\Exception $e) {\n echo $e->getMessage();\n }\n\n }", "public function handle()\n {\n $this->fetchAndSetToken();\n $imagesToDownload = $this->peekImages(WatchedApp::pluck('package_name'));\n $this->fetchImages($imagesToDownload);\n\n if ($this->option('dont-optimize')) {\n return;\n }\n\n $this->runOptimizeCommand();\n }", "public function handle()\n {\n $this->setCryptIVFromUrl($this->argument('url'));\n\n $participant = URLParser::parseByName('santa.index', $this->argument('url'))->participant;\n if($participant) {\n $draw = $participant->draw;\n } else {\n $draw = URLParser::parseByName('organizer.index', $this->argument('url'))->draw;\n }\n\n $this->table(\n ['ID', 'Name', 'Email'],\n $draw->participants()->get(['id', 'name', 'email'])->toArray()\n );\n }", "public function handle()\n {\n // if you are on the local environment\n if (!(app()->isLocal() || app()->runningUnitTests())) {\n $this->error('This command is only available on the local environment.');\n return;\n }\n\n $fqdn = $this->argument('fqdn');\n if ($tenant = Tenant::retrieveBy($fqdn)){\n $tenant->delete($fqdn);\n $this->info(\"Tenant {$fqdn} successfully deleted.\");\n }else {\n $this->error('This fqdn doesn\\'t exist.');\n }\n\n }", "public function handle()\n {\n $user_from = $this->option('from');\n $user_to = $this->option('to');\n $sum = $this->option('sum');\n\n CreateTransaction::dispatch($this->usersRepository->getByID($user_from), $this->usersRepository->getByID($user_to), $sum, true);\n $this->transactionsRepository->getAll()->each(function ($transaction){\n \tExecuteTransaction::dispatch($transaction);\n });\n }", "public function handle()\n {\n $this->warn('Starting Retrieve Data');\n\n PeopleService::retrieveData();\n\n $this->info('Retrieve Data Completed');\n }", "public function handle()\n {\n \n $period = $this->option('period');\n \n switch ($period) {\n\n case 'half_month':\n $this->info('Grabing Half Month Income...');\n $this->halfMonth();\n break;\n\n case 'monthly':\n $this->info('Grabing Monthly Income...');\n $this->monthly();\n break;\n \n default:\n $this->info('Grabing Daily Income...');\n $this->daily();\n break;\n\n }\n\n \n }", "public function handle()\n {\n $countryFiles = $this->getFiles();\n\n foreach ($countryFiles as $fileName) {\n $this->seed($fileName);\n }\n\n $this->info('End.');\n }", "public function fire()\n {\n $entityName = $this->argument('entityName');\n $startEntityId = $this->argument('startEntityId');\n $endEntityId = $this->argument('endEntityId');\n $depth = $this->argument('depth');\n\n $this->fixturePath = $this->option('outputPath');\n\n $this->info(\"Generating fixtures for $entityName in {$this->fixturePath}...\");\n \n $this->generateFixtures($entityName, $startEntityId, $endEntityId, $depth);\n }", "public function handle()\n {\n $check = PublishTraitsService::publishTraits();\n\n if ($check)\n {\n $this->info('All files have been published');\n }\n\n $this->info('Failed to publish');\n }", "public function handle()\n {\n $user = User::where('username', $this->argument('user'))\n ->orWhere('email', $this->argument('user'))\n ->first();\n\n if ($user != null) {\n $user->assign('admin');\n $this->line(\"{$user->email} was successfully made an admin.\");\n } else {\n $this->line(\"No user found where username or email is '{$this->argument('user')}'\");\n }\n }", "public function handle()\n {\n event( 'laraview:compile' );\n $this->checkForSelectedViewGeneration();\n\n app( RegisterBlueprint::class )\n ->console( $this )\n ->generate();\n }", "public function handle()\n {\n $project = Project::with(['team.admins', 'team.members'])->findOrFail($this->option('project-id'));\n $user = User::findOrFail($this->option('user-id'));\n if ($this->option('admin')) {\n $project->team->admins()->syncWithoutDetaching($user);\n } else {\n $project->team->members()->syncWithoutDetaching($user);\n }\n return Command::SUCCESS;\n }", "public function handle() {\n try {\n $this->roomService->loadRoomOccupations();\n Log::notice('untis:occupations executed successfully.');\n $this->line('Loaded room occupations from WebUntis.');\n } catch (Exception $e) {\n Log::error('Error loading room occupations.', ['exception' => $e]);\n $this->error('Error loading room occupations: ' . $e->getMessage());\n }\n }", "public function handle()\n {\n $this->loadIxList();\n $this->loadIxMembersList();\n $this->updateIxInfo();\n $this->updateIxMembersInfo();\n }", "public function handle()\n {\n $this->call('vendor:publish', [\n '--provider' => \"Qoraiche\\MailEclipse\\MailEclipseServiceProvider\",\n ]);\n }", "public function handle()\n\t{\n\t\tif ($this->option('dev')) {\n\t\t\tsystem('php '.base_path('.deploy/deploy-dev.php'));\n\t\t} else {\n\t\t\tsystem('php '.base_path('.deploy/deploy.php'));\n\t\t}\n\t}", "public function handle(Command $command);", "public function handle(Command $command);", "public function handle()\n {\n $date_from = $this->argument('date_from');\n\t\t$date_to = $this->argument('date_to');\n\t\tif(!$date_from) {\n\t\t\t$date_from = Carbon::today()->subDays(5);\n\t\t}\n\t\tif(!$date_to) {\n\t\t\t$date_to = Carbon::yesterday();\n\t\t}\n\t\tStats::computeMembers($this->argument('venue_id'), $date_from, $date_to);\n }", "public function handle()\n {\n switch ($this->argument('type')){\n case 'fih':\n $scrapper = new Scrappers\\FederationScrapper();\n $scrapper->get($this->option('level'));\n print $scrapper->message();\n break;\n }\n }", "public function handle()\n {\n Log::info(\"seed:dash Command is working fine!\");\n $this->info('Dashboard Database seeding completed successfully.');\n }", "public function handle()\n {\n $originalId = $this->argument('original_id');\n\n $status = true;\n if ($this->option('status') === 'false') {\n $status = false;\n }\n\n if ($video = Video::where('original_id', $originalId)->first()) {\n $video->dmca_claim = $status;\n $video->save();\n\n $this->info('Video\\'s dmca_claim set to: ' . json_encode($status));\n return ;\n }\n\n $this->error('No video found with original_id of: ' . $originalId);\n return;\n }", "public function handle()\n {\n $this->call('config:clear');\n\n $this->call('config:update');\n\n $this->info('Configuration cached successfully!');\n }", "public function handle()\n {\n //\n $modelName = $this->argument('model');\n $column = $this->argument('column');\n $this->generateMutation($modelName, $column);\n\n }", "public function handle()\n {\n $filePath = 'public/' . $this->argument('fileName');\n $count = $this->argument('count');\n \n $fileData = array_slice(file($filePath), 0, $count);\n $this->info(implode('', $fileData));\n }", "public function handle()\n {\n $email = $this->argument('email');\n\n Mail::to($email)->send(new SendMailable('Test Mail'));\n\n if (Mail::failures()) {\n $this->info('Email failed to send');\n } else {\n $this->info('Email successfully sent');\n }\n }", "public function handle()\n {\n $this->call('route:trans:clear');\n\n $this->cacheRoutesPerLocale();\n\n $this->info('Routes cached successfully for all locales!');\n }", "public function handle()\n {\n $this->info('Welcome to command for Bantenprov\\WilayahIndonesia package');\n }", "public function handle()\n {\n if($this->hasOption('no_dump') && $this->option('no_dump')){\n $this->composer_dump = false;\n }\n $this->readyDatas();\n $this->datas['startSymbol']='{{';\n $this->datas['endSymbol']='}}';\n $this->create();\n }", "public function handle()\n {\n $repository = new OglasiCrawlerRepository();\n $ads = $repository->getAds();\n $repository->saveAds($ads);\n\n echo 'Ads were successfully retrieved' . PHP_EOL;\n }", "public function handle()\n {\n $this->makeDir($this->basePath . $this->kebabPlural());\n\n $this->exportViews();\n\n $this->info('Resource views generated successfully.');\n }", "public function handle()\n {\n $movies = \\App\\Models\\Movie::whereNull('meta')->take(40)->orderBy('id')->get();\n $movies->each(function($movie){ sleep(1); $movie->getMeta(); });\n return Command::SUCCESS;\n }", "public function handle()\n {\n $this->packageGenerator->setConsole($this)\n ->setPackage($this->argument('package'))\n ->setType('shipping')\n ->setForce($this->option('force'))\n ->generate();\n }", "public function handle()\n {\n $test = $this->argument('test');\n\n $dir = config('speed-test.dir');\n\n $className = ucfirst(\\Str::camel($test));\n\n $namespace = config('speed-test.namespace');\n\n $class = class_entity($className)\n ->namespace($namespace);\n\n $class->method('speed1')\n ->line($this->option('line'))->doc(function ($doc) use ($className) {\n /** @var DocumentorEntity $doc */\n $doc->tagCustom('times', $this->option('times'));\n $doc->description($this->option('description') ?: \"{$className} Speed 1\");\n });\n\n if (! is_dir($dir)) {\n mkdir($dir, 0777, 1);\n }\n\n file_put_contents(\n $dir.'/'.$className.'.php',\n $class->wrap('php')\n );\n\n $this->info('Speed created!');\n\n return 0;\n }", "public function handle()\n {\n $message = $this->GenerateRandomUser($this->argument('count'));\n $this->info($message);\n }", "public function handle()\n {\n $host = Cache::get('executingHost', null);\n $this->info(\"Host: ${host}\");\n\n if ($host === null) {\n $this->info('実行するホストが選択されていません');\n return;\n }\n\n if (Schema::hasTable('companies') && Company::count() !== 0) {\n $this->info('マイグレーションが既に1回以上実行されています');\n return;\n }\n\n $should_execute = $host === $this->argument('executingHost');\n\n if ($should_execute) {\n Artisan::call('migrate:fresh', ['--seed' => true]);\n $this->info('マイグレーションが完了しました');\n\n Cache::forget('executingHost');\n } else {\n $this->info('別ホストにてマイグレーションが行われます');\n }\n }", "public function handle()\n {\n // Configuration...\n $this->callSilent('vendor:publish', ['--tag' => 'model-login-config']);\n\n // Migrations\n $this->callSilent('vendor:publish', ['--tag' => 'model-login-migrations']);\n\n $this->info('Model Login resources published.');\n }", "public function handle()\n {\n if ($this->validation()) {\n $money = $this->argument('money');\n Cache::increment('amount', $money);\n }\n }", "public function handle()\n {\n $this->info('Publishing stuff..');\n\n $this->publishFiles();\n\n $this->info('Setup complete. Enjoy!');\n }", "public function handle()\n {\n $this->publishConfig();\n $this->publishClassStub();\n $this->generateAndStoreKey();\n\n $this->info('Use the details below for your \"Lead delivery options\" in Google Ads.');\n $this->info('Webhook URL: ' . route('GoogleAdsLeadExtensionController@index'));\n $this->info('Key: ' . $this->generated_key);\n }", "public function handle()\n {\n $opts = $this->options();\n $args = $this->arguments();\n #print_r($opts);\n #print_r($args);\n\n # Redundant as argument validation handled by Laravel\n #\n if (!isset($args['destination'])) {\n printf(\"Usage: php artisan %s\\n\", $this->signature);\n exit(1);\n }\n\n # Default to normal message type\n #\n if (!isset($opts['type'])) {\n $opts['type'] = 'normal';\n }\n\n $uac = new UserApiController();\n\n if ($opts['type'] == 'normal') {\n if (!isset($opts['message'])) {\n printf(\"Usage: php artisan %s\\n\\n\", $this->signature);\n printf(\"ERROR: Message must be specified for type 'normal'\\n\");\n exit(1);\n }\n $result = $uac->sendSms(\n $args['destination'],\n $opts['message'],\n $opts['route']\n );\n }\n else if ($opts['type'] == 'otp') {\n $result = $uac->sendVerificationSms(\n $args['destination'],\n '<code>',\n '<name>',\n $opts['route'],\n '<appName>'\n );\n }\n\n if ($result === true) {\n printf(\"INFO: SMS message to %s sent successfully (%s)\\n\",\n $args['destination'], $opts['type']);\n }\n else {\n printf(\"INFO: SMS message to %s failed to send (%s)\\n\", \n $args['destination'], $opts['type']);\n printf(\"ERROR: %s\\n\", $result);\n }\n\n return;\n }" ]
[ "0.6469962", "0.6463639", "0.64271367", "0.635053", "0.63190264", "0.62747604", "0.6261977", "0.6261908", "0.6235821", "0.62248456", "0.62217945", "0.6214421", "0.6193356", "0.61916095", "0.6183878", "0.6177804", "0.61763877", "0.6172579", "0.61497146", "0.6148907", "0.61484164", "0.6146793", "0.6139144", "0.61347336", "0.6131662", "0.61164206", "0.61144686", "0.61109483", "0.61082935", "0.6105106", "0.6103338", "0.6102162", "0.61020017", "0.60962653", "0.6095482", "0.6091584", "0.60885274", "0.6083864", "0.6082142", "0.6077832", "0.60766655", "0.607472", "0.60739267", "0.607275", "0.60699606", "0.6069931", "0.6068753", "0.6067665", "0.6061175", "0.60599935", "0.6059836", "0.605693", "0.60499364", "0.60418284", "0.6039709", "0.6031963", "0.6031549", "0.6027515", "0.60255647", "0.60208166", "0.6018581", "0.60179937", "0.6014668", "0.60145515", "0.60141796", "0.6011772", "0.6008498", "0.6007883", "0.60072047", "0.6006732", "0.60039204", "0.6001778", "0.6000803", "0.59996396", "0.5999325", "0.5992452", "0.5987503", "0.5987503", "0.5987477", "0.5986996", "0.59853584", "0.5983282", "0.59804505", "0.5976757", "0.5976542", "0.5973796", "0.5969228", "0.5968169", "0.59655035", "0.59642595", "0.59635514", "0.59619296", "0.5960217", "0.5955025", "0.5954439", "0.59528315", "0.59513766", "0.5947869", "0.59456027", "0.5945575", "0.5945031" ]
0.0
-1
Translate the given entity, or fall back to the default string if no matching entity exists in the database
public function translate($entity, $string = '', $injectionArray = array()) { $string = $this->findOrCreateString($entity, $string); if ($injectionArray) { $this->inject($string, $injectionArray); } return $string; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function translate($entity, $default, $injection)\n {\n $locale = i18n::get_locale();\n $this->load($locale);\n\n // Prepare arguments\n $arguments = $this->templateInjection($injection);\n\n // Pass to symfony translator\n $result = $this->getTranslator()->trans($entity, $arguments, 'messages', $locale);\n\n // Manually inject default if no translation found\n if ($entity === $result) {\n $result = $this->getTranslator()->trans($default, $arguments, 'messages', $locale);\n }\n\n return $result;\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 }", "private function getDefault($entity)\n {\n foreach ($entity->getI18ns() as $existingI18n) {\n if ($existingI18n->getLocale() === $this->defaultLocale) {\n return $existingI18n;\n }\n }\n }", "public function getTranslation( $identifier, ?string $defaultTranslation = null ) : string;", "public function translate($singular, $context = null);", "function _trans($default = null, $key = null, $replace = [], $locale = null)\n {\n if (is_null($key)) {\n return $default;\n }\n\n return trans($key, $replace, $locale);\n }", "public static function getEntityEnglishName()\n {\n return 'Unknown';\n }", "function translate (string $original, string $localeOverride = '') : string {\n\t$locale = ($localeOverride === '' ? $_SESSION['locale'] : $localeOverride);\n\t$translation = executeQuery(\n\t\t_BASE_DB_HOOK,\n\t\t'SELECT translated FROM translation WHERE original = ? AND locale = ?;',\n\t\t[['s' => $original], ['s' => $locale]]\n\t);\n\n\tif($translation instanceof mysqli_result){\n\t\t$reader = $translation->fetch_row();\n\t\tif($reader[0]){\n\t\t\treturn $reader[0];\n\t\t}\n\t}\n\treturn $original;\n}", "function entity_type_translate($entity_type)\n{\n $data = entity_type_translate_array($entity_type);\n if (!is_array($data)) { return NULL; }\n\n return array($data['table'], $data['id_field'], $data['name_field'], $data['ignore_field'], $data['entity_humanize']);\n}", "function __t(?string $key = null, ?string $default = null, array $replace = [], ?string $locale = null)\n {\n if (Lang::has($key, $locale)) {\n return __($key, $replace, $locale);\n }\n if ($default) {\n if (Str::contains($default, [' ', '.', ':'])) {\n return __($default, $replace, $locale);\n }\n // is probably single word\n return $default;\n }\n return $key;\n }", "protected function findOrCreateString($entity, $string)\n {\n $cache = static::get_cache();\n $key = md5($entity);\n \n // It's not in the cache, which means it might have expired or might be a new entity\n if (!$result = $cache->load($key)) {\n $translation = DynamicTranslation::get()->filter(array('Entity' => $entity))->first();\n\n // If no translation exists for this entity, create it\n if (!$translation) {\n $translation = DynamicTranslation::create(array('Entity' => $entity, 'String' => $string));\n $translation->write();\n }\n \n $cache->save($translation->String, $key);\n $result = $translation->String;\n }\n\n return $result;\n }", "protected abstract function getPluralEntityName();", "public function translate($contact);", "function entity_name($type, $entity)\n{\n global $config, $entity_cache;\n\n if (is_numeric($entity))\n {\n $entity = get_entity_by_id_cache($type, $entity);\n }\n\n $translate = entity_type_translate_array($type);\n\n $text = $entity[$translate['name_field']];\n\n return($text);\n}", "public function guessChoiceLabelFromClass($entity)\n {\n $metadata = $this->metadataFactory->getClassMetadata($entity)->getMetadata();\n foreach ($metadata[0]->fieldMappings as $fieldName => $field) {\n if ($field['type'] == 'string') {\n return $fieldName;\n }\n }\n //if no string field found, return id\n return 'id';\n }", "public function getSubstituteEntityClass(string $entityClass): ?string;", "abstract protected function translator();", "function get_entity_by_id_cache($entity_type, $entity_id)\n{\n global $cache;\n\n $translate = entity_type_translate_array($entity_type);\n\n if (is_array($cache[$entity_type][$entity_id]))\n {\n\n return $cache[$entity_type][$entity_id];\n\n } else {\n\n switch($entity_type)\n {\n case \"bill\":\n if (function_exists('get_bill_by_id'))\n {\n $entity = get_bill_by_id($entity_id);\n }\n break;\n\n case \"port\":\n $entity = get_port_by_id($entity_id);\n break;\n\n default:\n $sql = 'SELECT * FROM `'.$translate['table'].'`';\n\n if (isset($translate['state_table']))\n {\n $sql .= ' LEFT JOIN `'.$translate['state_table'].'` USING (`'.$translate['id_field'].'`)';\n }\n\n if (isset($translate['parent_table']))\n {\n $sql .= ' LEFT JOIN `'.$translate['parent_table'].'` USING (`'.$translate['parent_id_field'].'`)';\n }\n\n $sql .= ' WHERE `'.$translate['table'].'`.`'.$translate['id_field'].'` = ?';\n\n $entity = dbFetchRow($sql, array($entity_id));\n if (function_exists('humanize_'.$entity_type)) { $do = 'humanize_'.$entity_type; $do($entity); }\n else if (isset($translate['humanize_function']) && function_exists($translate['humanize_function'])) { $do = $translate['humanize_function']; $do($entity); }\n break;\n }\n\n if (is_array($entity))\n {\n entity_rewrite($entity_type, $entity);\n $cache[$entity_type][$entity_id] = $entity;\n return $entity;\n }\n }\n\n return FALSE;\n}", "function __(string $translate, string $locale = null, array $values = []) : string\n {\n return I18n::find($translate, $locale, $values);\n }", "public function getEntityName() : ?string;", "public function entityFor(): string;", "public function testUpdateTranslationWithLocaleInEntity(): void\n {\n $table = $this->getTableLocator()->get('Articles');\n $table->addBehavior('Translate', ['fields' => ['title', 'body']]);\n $article = $table->find()->first();\n $this->assertSame(1, $article->get('id'));\n $article->set('_locale', 'fra');\n $article->set('title', 'Le titre');\n $table->save($article);\n $this->assertNull($article->get('_i18n'));\n\n $article = $table->find()->first();\n $this->assertSame(1, $article->get('id'));\n $this->assertSame('First Article', $article->get('title'));\n $this->assertSame('First Article Body', $article->get('body'));\n\n $table->setLocale('fra');\n $article = $table->find()->first();\n $this->assertSame(1, $article->get('id'));\n $this->assertSame('Le titre', $article->get('title'));\n $this->assertSame('First Article Body', $article->get('body'));\n }", "abstract public function translate($sentence);", "public static function getLocalizedResourceLabel(string $entity): string\n {\n $label = collect(Filament::getResources())->filter(function ($resource) use ($entity) {\n return $resource === $entity;\n })->first()::getModelLabel();\n\n return Str::of($label)->headline();\n }", "static private function ___translate___()\n {\n _('RECORD\\Farthest %1$s from Sagittarius A*');\n }", "function get_translation_name (string $key, string $lang, array $data, $customNotFoundText = null)\n {\n if (is_array ($data)) {\n $data = collect ($data);\n }\n\n $item = $data->where ('language_code', $lang)->first ();\n\n if (is_null ($item)) {\n $name = array_get ($data, '0.' . $key);\n } else {\n $name = array_get ($item, $key);\n }\n\n if (is_null ($name)) {\n if (is_null ($customNotFoundText)) {\n $name = trans ('HCTranslations::core.no_translation');\n } else {\n $name = $customNotFoundText;\n }\n }\n\n return $name;\n }", "private function replace_entity_placeholder($entity_name, $item) {\n if (is_array($item)) {\n foreach ($item as $k => $_string) {\n $item[ $this->replace_entity_placeholder($entity_name, $k) ] = $this->replace_entity_placeholder($entity_name, $_string);\n }\n }\n if (!is_string($item) || !is_string($entity_name)) return $item;\n return str_replace([\n '[Entity]',\n '[entity]',\n '[entities]',\n ],\n [\n $entity_name,\n strtolower($entity_name),\n strtolower(Inflector::pluralize($entity_name)),\n ], $item);\n \n }", "static protected function translate($s){\nif(!self::$strings)return $s;\nif(!array_key_exists($s,self::$strings))return $s;\nreturn self::$strings[$s];\n}", "function entity_rewrite($entity_type, &$entity)\n{\n $translate = entity_type_translate_array($entity_type);\n\n // By default, fill $entity['entity_name'] with name_field contents.\n if (isset($translate['name_field'])) { $entity['entity_name'] = $entity[$translate['name_field']]; }\n\n // By default, fill $entity['entity_shortname'] with shortname_field contents. Fallback to entity_name when field name is not set.\n if (isset($translate['shortname_field'])) { $entity['entity_shortname'] = $entity[$translate['name_field']]; } else { $entity['entity_shortname'] = $entity['entity_name']; }\n\n // By default, fill $entity['entity_descr'] with descr_field contents.\n if (isset($translate['descr_field'])) { $entity['entity_descr'] = $entity[$translate['descr_field']]; }\n\n // By default, fill $entity['entity_id'] with id_field contents.\n if (isset($translate['id_field'])) { $entity['entity_id'] = $entity[$translate['id_field']]; }\n\n switch($entity_type)\n {\n case \"bgp_peer\":\n // Special handling of name/shortname/descr for bgp_peer, since it combines multiple elements.\n\n if (Net_IPv6::checkIPv6($entity['bgpPeerRemoteAddr']))\n {\n $addr = Net_IPv6::compress($entity['bgpPeerRemoteAddr']);\n } else {\n $addr = $entity['bgpPeerRemoteAddr'];\n }\n\n $entity['entity_name'] = \"AS\".$entity['bgpPeerRemoteAs'] .\" \". $addr;\n $entity['entity_shortname'] = $addr;\n $entity['entity_descr'] = $entity['astext'];\n break;\n\n case \"sla\":\n $entity['entity_name'] = 'SLA #' . $entity['sla_index'];\n if (!empty($entity['sla_target']) && ($entity['sla_target'] != $entity['sla_tag']))\n {\n if (get_ip_version($entity['sla_target']) === 6)\n {\n $sla_target = Net_IPv6::compress($entity['sla_target'], TRUE);\n } else {\n $sla_target = $entity['sla_target'];\n }\n $entity['entity_name'] .= ' (' . $entity['sla_tag'] . ': ' . $sla_target . ')';\n } else {\n $entity['entity_name'] .= ' (' . $entity['sla_tag'] . ')';\n }\n $entity['entity_shortname'] = \"#\". $entity['sla_index'] . \" (\". $entity['sla_tag'] . \")\";\n break;\n\n case \"pseudowire\":\n $entity['entity_name'] = $entity['pwID'] . ($entity['pwDescr'] ? \" (\". $entity['pwDescr'] . \")\" : '');\n $entity['entity_shortname'] = $entity['pwID'];\n break;\n }\n}", "function trans($key = null, $replace = [], $locale = null)\n{\n # sms.account_activation\n # sms.ad_activation\n\n if (is_null($key)) {\n return app('translator');\n }\n\n $exp = explode('.', $key, 2);\n $group = null;\n $item = $key;\n if( sizeof($exp) === 2 ) {\n $group = $exp[0];\n $item = $exp[1];\n }\n $if = \\DB::table('translator_translations')->where('group', $group)->where('item', $item)->exists();\n if (!$if) {\n \\DB::table('translator_translations')->insert([\n [\n 'locale' => 'ar',\n 'group' => $group,\n 'item' => $item,\n 'text' => $key,\n ], [\n 'locale' => 'en',\n 'group' => $group,\n 'item' => $item,\n 'text' => $key,\n ]\n ]);\n }\n\n return app('translator')->trans($key, $replace, $locale);\n}", "public function getNameWithFallbackAttribute()\n {\n return $this->translateOrNew($this->locale())->name\n ?? $this->translateOrNew($this->getFallbackLocale())->name;\n }", "public static function find(string $translate, string $locale = null, array $values = []) : string\n {\n $locale = ($locale === null) ? I18n::$locale : $locale;\n\n // Search current string to translate in the Dictionary\n if (isset(I18n::$dictionary[$locale][$translate])) {\n $translate = I18n::$dictionary[$locale][$translate];\n $translate = empty($values) ? $translate : strtr($translate, $values);\n } else {\n $translate = $translate;\n }\n\n // Return translation of a string\n return $translate;\n }", "public function translated();", "public function translated();", "public function translate();", "public function localize($key) {\n\t\tif (!isset($this->_phrases[strtoupper($key)])) return $key;\n\n\t\t$match = $this->_phrases[strtoupper($key)];\n\n\t\tif (func_num_args() == 1) return $match;\n\n\t\t$args = func_get_args();\n\t\t$args[0] = $match;\n\n\t\treturn call_user_func_array('sprintf', $args);\n\t}", "public function trans()\n {\n $args = func_get_args();\n $numArgs = func_num_args();\n\n switch ($numArgs) {\n case 4:\n return Trans::__($args[0], $args[1], $args[2], $args[3]);\n case 3:\n return Trans::__($args[0], $args[1], $args[2]);\n case 2:\n return Trans::__($args[0], $args[1]);\n case 1:\n return Trans::__($args[0]);\n }\n\n return null;\n }", "function entity_short_name($type, $entity)\n{\n global $config, $entity_cache;\n\n if (is_numeric($entity))\n {\n $entity = get_entity_by_id_cache($type, $entity);\n }\n\n $translate = entity_type_translate_array($type);\n\n $text = $entity[$translate['name_field']];\n\n return($text);\n}", "public function inflect($object);", "public function getCurrentLocaleEntity();", "static function lookup($msgid)\n\t{\n\t\t$lang = self::$lang;\n\t\tif (!$lang) {\n\t\t\treturn $msgid;\n\t\t}\n\t\tif (!isset(self::$dicts[$lang])) {\n\t\t\tself::load_dict($lang);\n\t\t}\n\t\tif (array_key_exists($msgid, self::$dicts[$lang])) {\n\t\t\treturn self::$dicts[$lang][$msgid];\n\t\t}\n\t\treturn $msgid;\n\t}", "public function getEntityName();", "public function getStringForDefault($string);", "private function lookup($word) {\n\n $query = $this->dm->getRepository('\\FYP\\Database\\Documents\\Lexicon');\n $result = $query->findOneBy(array('phrase' => $word));\n if (empty($result)) {\n $result = $query->findOneBy(array('phrase' => strtolower($word)));\n }\n\n if (empty($result)) {\n return self::DEFAULT_TAG;\n } else {\n return $result->getTags()[0];\n }\n\n }", "public function translate($key, $arg = NULL) {\n\t\tif (isset($this->dictionary[$key])) {\n\t\t\t$message = $this->dictionary[$key];\n\t\t} else {\n\t\t\t$message = $key;\n\t\t}\n\t\tif ($arg !== null) {\n\t\t\tif (is_array($arg)) {\n\t\t\t\tforeach($arg as $name=>$value) {\n\t\t\t\t\t$message = str_replace('{'.$name.'}', $value, $message);\n\t\t\t\t}\n\t\t\t\treturn $message;\n\t\t\t} else {\n\t\t\t\t$args = func_get_args();\n\t\t\t\tarray_shift($args);\n\t\t\t\treturn vsprintf($message, $args);\n\t\t\t}\n\t\t} else {\n\t\t\treturn $message;\n\t\t}\n\t}", "public function localization($ident)\n {\n if (!is_string($ident)) {\n throw new InvalidArgumentException(sprintf(\n 'Translation key must be a string, received %s',\n (is_object($ident) ? get_class($ident) : gettype($ident))\n ));\n }\n\n if (isset($this->localizations[$ident])) {\n return $this->localizations[$ident];\n }\n\n return $ident;\n }", "function trans($key = null, $replace = [], $locale = null)\n {\n if (is_null($key)) {\n return app('translator');\n }\n\n return app('translator')->trans($key, $replace, $locale);\n }", "public function testSavingWithNonDefaultLocale(): void\n {\n $table = $this->getTableLocator()->get('Articles');\n $table->addBehavior('Translate', ['fields' => ['title', 'body']]);\n $table->setEntityClass(TranslateArticle::class);\n I18n::setLocale('fra');\n $translations = [\n 'fra' => ['title' => 'Un article'],\n 'spa' => ['title' => 'Un artículo'],\n ];\n\n $article = $table->get(1);\n foreach ($translations as $lang => $data) {\n $article->translation($lang)->set($data, ['guard' => false]);\n }\n\n $table->save($article);\n $article = $table->find('translations')->where(['Articles.id' => 1])->first();\n $this->assertSame('Un article', $article->translation('fra')->title);\n $this->assertSame('Un artículo', $article->translation('spa')->title);\n }", "private static function getEntityName($data)\n {\n $possibleEntities = ['application', 'licence', 'busReg', 'transportManager', 'organisation', 'case', 'irhpApplication'];\n\n foreach ($possibleEntities as $possibleEntity) {\n if (isset($data[$possibleEntity])) {\n return $possibleEntity;\n }\n }\n\n throw new \\Exception('Not implemented');\n }", "public function getLocalizedTextByLocale(string $locale): ?LocalizedEntity\n {\n $criteria = Criteria::create()->where(Criteria::expr()->eq(\"locale\", $locale));\n $first = $this->localizedTexts->matching($criteria)->first();\n return $first === false ? null : $first;\n }", "final public static function translate($string, $default = '', array $params = array()) {\n if (is_assoc($string)) {\n $params = array_merge($params, $string);\n } elseif ( ! isset($params['string'])) {\n $params['string'] = $string;\n }\n\n if (is_assoc($default)) {\n $params = array_merge($default, $params);\n } elseif ( ! isset($params['default'])) {\n $params['default'] = (string) $default;\n }\n\n\n\n $params = array_merge(array(\n 'scope' => '',\n 'string' => '',\n 'default' => '',\n ), $params);\n\n $params['default'] = (array) $params['default'];\n\n if (is_array($params['default'])) {\n foreach ($params['default'] as $one) {\n if ( ! preg_match('/^[a-z][a-z0-9_]+$/', $one)) {\n $params['default'] = $one;\n break;\n } else {\n $test = i18n::translate($one, array('scope' => $params['scope']));\n\n if ( ! empty($test)) {\n $params['default'] = $test;\n break;\n }\n }\n }\n }\n\n $from = i18n::load_locale();\n\n $prefix = $params['scope'] ? \"$params[scope].\" : '';\n $default = $params['default'] ?: $params['string'];\n\n $string = value($from, \"$prefix$params[string]\", $default);\n\n $string = preg_replace_callback('/%\\{(.+?)\\}/', function ($match)\n use($params) {\n return isset($params[$match[1]]) ? $params[$match[1]] : $match[1];\n }, $string);\n\n return $string;\n }", "public function getTranslatedMessage(): string\n\t{\n\t\tif(self::$resolver === null)\n\t\t{\n\t\t\tself::$resolver = new DefaultMessageResolver();\n\t\t}\n\t\t\n\t\treturn self::$resolver->resolveMessage($this->name, $this->key, $this->args);\n\t}", "public function getEntityType($entity)\n {\n $result = $this->db->query(\"SELECT type FROM entities WHERE id='$entity'\");\n// echo \"The result is $result->num_rows\";\n if (!isset($result->num_rows) || $result->num_rows == 0) {\n return Constants::ENTITY_NONEXISTENT;\n } else {\n $thing = $result->fetch_assoc()[\"type\"];\n// echo \"The thing iis $thing\";\n switch ($thing) {\n case \"ATOM\":\n return Constants::ENTITY_ATOM;\n case \"GROUP\":\n return Constants::ENTITY_GROUP;\n case \"USER\":\n return Constants::ENTITY_USER;\n }\n }\n throw new \\Exception(\"Unknown entity type\");\n }", "function localize($phrase) {\n global $translations;\n /* Static keyword is used to ensure the file is loaded only once */\n if ($translations[$phrase])\n return $translations[$phrase];\n else\n return $phrase;\n}", "function __t($key, $values = null)\n{\n // Get current locale\n $locale = cache()->rememberForever('language', function () {\n try {\n return get_setting('language') ?? 'en';\n } catch (\\Illuminate\\Database\\QueryException $e) {\n return 'en';\n }\n });\n\n // Get language strings\n $strings = cache()->rememberForever(\"language-translations-$locale\", function () use ($locale) {\n try {\n return Language::whereLocale($locale)->firstOrFail()->languageTranslations;\n } catch (QueryException | ModelNotFoundException $e) {\n return null;\n }\n }) ?? get_default_language_translations();\n\n // Find the string by key\n $string = $strings->firstWhere('key', $key)->value ?? $strings->get($key);\n\n if ($values) {\n return replace_occurrence($string, collect($values));\n }\n\n return $string;\n}", "public function get_lookup(/* ... */)\n {\n return sprintf(\n \"`%s` ILIKE %s\",\n $this->_field->get_db_field_name(),\n $this->_key\n );\n }", "function get_escort_default_language($escortid = '')\n{\n if (!is_numeric($escortid)) {\n $clientid = get_escort_user_id();\n }\n $CI =& get_instance();\n $CI->db->select('ELanguage');\n $CI->db->from('imc_escort_setting');\n $CI->db->where('EID', $escortid);\n $escoot = $CI->db->get()->row();\n \n if ($escoot) { \n return $escoot->ELanguage;\n }\n\n return '';\n}", "public function translation($slug = null)\n\t{\n\t\t$languageId = language($slug)->property('id', 1);\n\n\t\treturn $this->hasOne( $this->getTranslatorClassName(), 'original_id')->where( 'language_id', $languageId)->first();\n\t}", "public function getTargetEntityFromStaticCache() {\n $targetLang = 'de';\n $expectedEntity = 'expected entity wrapper';\n $targetEntities = array($targetLang => $expectedEntity);\n\n $translatable = new MockParagraphsTranslatable();\n $translatable->setTargetEntities($targetEntities);\n $this->assertEquals($expectedEntity, $translatable->getTargetEntity($targetLang));\n }", "abstract public function getTranslationIn(string $locale);", "abstract public function getTranslationIn(string $locale);", "abstract public function getTranslationIn(string $locale);", "public function getLabel($label=null)\n {\n if ($label != null && is_array($this->entity) && count($this->entity)!=0) {\n $table_name = strtolower(get_class($this));\n $query = \"SELECT * FROM $table_name WHERE label = ?\";\n $req = Manager::bdd()->prepare($query);\n $req->execute([$label]);\n $data = \"\";\n if ($data = $req->fetchAll(PDO::FETCH_ASSOC)) {\n$d=$data[0];\n$this->setId_entity($d['id_entity']);\n$this->setLabel($d['label']);\n$this->setDomaine($d['domaine']);\n$this->setEmail($d['email']);\n$this->setPhone_number($d['phone_number']);\n$this->setBp($d['bp']);\n$this->setLocalisation($d['localisation']);\n$this->setVille($d['ville']);\n$this->setUniqueId($d['uniqueId']);\n$this->setCreated_at($d['created_at']);\n$this->setCreated_by($d['created_by']);\n$this->setUpdate_at($d['update_at']);\n$this->setUpdate_by($d['update_by']);\n$this->entity =$data; \n return $this;\n }\n \n } else {\n return $this->label;\n }\n \n }", "function fromexp(){return \"`{$this->entity->name}`\"; }", "protected abstract function getTranslationIdentifier();", "protected abstract function getEntity(): string;", "function us_wpml_tr_object_id ( $elm_id, $post_type = 'post', $return_original_if_missing = FALSE, $lang_code = NULL ) {\r\n\t\tif ( $tr_elm_id = apply_filters( 'wpml_object_id', $elm_id, $post_type, $return_original_if_missing, $lang_code ) ) {\r\n\t\t\treturn $tr_elm_id;\r\n\t\t}\r\n\t\t// If there is no translation, we will return the original $elm_id\r\n\t\treturn $elm_id;\r\n\t}", "public function testSaveTranslationDefaultLocale(): void\n {\n $table = $this->getTableLocator()->get('Articles');\n $table->hasMany('Comments');\n $table->addBehavior('Translate', ['fields' => ['title', 'body']]);\n\n $article = $table->get(1);\n $data = [\n 'title' => 'New title',\n 'body' => 'New body',\n '_translations' => [\n 'es' => [\n 'title' => 'ES title',\n 'body' => 'ES body',\n ],\n ],\n ];\n $article = $table->patchEntity($article, $data);\n $table->save($article);\n $this->assertNull($article->get('_i18n'));\n\n $article = $table->find('translations')->where(['id' => 1])->first();\n $this->assertSame('New title', $article->get('title'));\n $this->assertSame('New body', $article->get('body'));\n\n $this->assertSame('ES title', $article->_translations['es']->title);\n $this->assertSame('ES body', $article->_translations['es']->body);\n }", "function entity_type_label_single_lc($entity_type) {\n $controller = entity_toolbox_controller($entity_type);\n $helper = $controller->getToolboxHelper();\n\n return $helper->labelSingleLowerCase();\n}", "function example_module_english_get_phrase($phrase)\n{\n switch ($phrase) {\n case 'world.hello':\n return \"Hello World\";\n case 'world.goodbye':\n return \"Goodbye World\";\n default:\n return '??' . $phrase . '??';\n }\n}", "function entityName( $id ) ;", "function yourls_translate( $text, $domain = 'default' ) {\n\t$translations = yourls_get_translations_for_domain( $domain );\n\treturn yourls_apply_filter( 'translate', $translations->translate( $text ), $text, $domain );\n}", "function _tF($modelName,$fieldName='',$alt=null){\n\t$r=CLang::translate($modelName.':'.$fieldName,'f');\n\treturn $r!==false ? $r : ($alt===null?$fieldName:$alt);\n}", "function tfuse_qtranslate($text) {\r\n $text = html_entity_decode($text, ENT_QUOTES, 'UTF-8');\r\n\r\n\t\t\tif (function_exists('qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage')) {\r\n\t\t\t\t$text = qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage( $text );\r\n\t\t\t}\r\n\t\t\telseif ( function_exists('ppqtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage' ) ) {\r\n\t\t\t\t$text = ppqtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage( $text );\r\n\t\t\t}\r\n elseif ( function_exists('qtranxf_useCurrentLanguageIfNotFoundUseDefaultLanguage' ) ) {\r\n $text = qtranxf_useCurrentLanguageIfNotFoundUseDefaultLanguage( $text );\r\n\t\t\t}\r\n\t\t\telseif ( function_exists( 'icl_object_id' ) && strpos( $text, 'wpml_translate' ) == true ) {\r\n\t\t\t\t$text = do_shortcode( $text );\r\n\t\t\t}\r\n \r\n return $text;\r\n }", "function translate_field($field)\n {\n }", "function translate_field($field)\n {\n }", "function translate_field($field)\n {\n }", "function translate_field($field)\n {\n }", "function translate_field($field)\n {\n }", "function translate_field($field)\n {\n }", "function _t($string,$alt=null){\n\t$r=CLang::translate($string,'a');\n\treturn $r!==false ? $r : ($alt===null?$string:$alt);\n}", "function emp__($text, $domain='events-manager'){\n return translate($text, $domain);\n}", "protected function getEntityTranslationSourceLanguage($entity_type, $entity_id) {\n try {\n return $this->select('entity_translation', 'et')\n ->fields('et', ['language'])\n ->condition('entity_type', $entity_type)\n ->condition('entity_id', $entity_id)\n ->condition('source', '')\n ->execute()\n ->fetchField();\n }\n // The table might not exist.\n catch (\\Exception $e) {\n return FALSE;\n }\n }", "public function mapFromEntity($entity, NormalizationContextInterface $context = null);", "public function getGeneralMessage()\n {\n return \"Entity Not Found\";\n }", "public function title(RouteMatchInterface $route_match, EntityInterface $_entity = NULL) {\n $route_name_parts = explode('.', $route_match->getRouteName());\n $route_type = end($route_name_parts);\n\n $master_template = $route_match->getParameter('cohesion_master_templates');\n if ($route_type == 'edit_form' && $master_template instanceof \\Drupal\\cohesion_templates\\Entity\\MasterTemplates) {\n return t('Edit @type: @label', [\n '@type' => $master_template->getEntityType()->getLabel(),\n '@label' => \\Drupal\\Core\\Render\\Markup::create('<em>' . $master_template->label() . '</em>'),\n ]);\n }\n\n if (($content_entity_type = $route_match->getParameter('content_entity_type'))) {\n $entity_types = \\Drupal::entityTypeManager()->getDefinitions();\n if (isset($entity_types[$content_entity_type])) {\n $entity_type = $entity_types[$content_entity_type];\n return ($entity_type->get('bundle_label')) ? $entity_type->get('bundle_label') : $entity_type->get('label');\n }\n }\n }", "protected function transMatchExistentKey($match)\n {\n list($matchLang, $matchLangKey) = explode('.', $match);\n $matchLangFilename = $this->langDir.'/'.$matchLang.'.php';\n\n $matchLangFileContent = [];\n if ($this->filesystem->exists($matchLangFilename)) {\n $matchLangFileContent = (array) @require $this->langDir.'/'.$matchLang.'.php';\n }\n\n if (!isset($matchLangFileContent[$matchLangKey])) {\n $matchLangFileContent[$matchLangKey] = '';\n }\n\n $this->filesystem->put($matchLangFilename, $this->buildLangFileContent($matchLangFileContent, true, true));\n }", "public function translate(string $text, string $target): ?string;", "public function translate($key)\n\t{\n\t\tif(array_key_exists($key, $this->_translations))\n\t\t{\n\t\t\treturn $this->_translations[$key];\n\t\t}\n\t\treturn $key;\n\t}", "public function getLocalizedName();", "public function guess(EntityBuilder $builder)\n {\n $fields = $builder->getFields();\n $stream = $builder->getEntityStream();\n\n foreach ($fields as &$field) {\n\n /**\n * If the label is already set then use it.\n */\n if (isset($field['label'])) {\n continue;\n }\n\n /**\n * If we don't have a field then we\n * can not really guess anything here.\n */\n if (!isset($field['field'])) {\n continue;\n }\n\n /**\n * No stream means we can't\n * really do much here.\n */\n if (!$stream) {\n\n $key = \"module::field.{$field['field']}\";\n\n if (trans()->has(\"{$key}.name\")) {\n $field['label'] = \"{$key}.name\";\n } else {\n $field['label'] = \"{$key}.label\";\n }\n\n continue;\n }\n\n $assignment = $stream->getAssignment($field['field']);\n\n /**\n * No assignment means we still do\n * not have anything to do here.\n */\n if (!$assignment instanceof AssignmentInterface) {\n continue;\n }\n\n /**\n * Try using the assignment label if available\n * otherwise use the field name as the label.\n */\n if (trans()->has($label = $assignment->getLabel(), array_get($field, 'locale'))) {\n $field['label'] = trans($label, [], null, array_get($field, 'locale'));\n } elseif ($label && !str_is('*.*.*::*', $label)) {\n $field['label'] = $label;\n } elseif (trans()->has($name = $assignment->getFieldName(), array_get($field, 'locale'))) {\n $field['label'] = trans($name, [], null, array_get($field, 'locale'));\n }\n }\n\n $builder->setFields($fields);\n }", "function hybrid_translate( $domain, $text, $context = null ) {\n\n\t$translations = get_translations_for_domain( $domain );\n\n\treturn $translations->translate( $text, $context );\n}", "public function transform( $name, $default = null );", "function trans_choice($id, $number, array $parameters = [], $domain = 'messages', $locale = null)\n{\n return app('translator')->transChoice($id, $number, $parameters, $domain, $locale);\n}", "function hook_i18n_sync_translation($entity_type, $translation, $translation_language, $source, $source_language, $field_names) {\n \n}", "public function getEntity($name);", "public static function translate($sentence, $substitute = array()){\n if (isset(self::$dict[$sentence])){\n if (!empty($substitute)){\n $i = 1;\n foreach ($substitute as $val) {\n self::$dict[$sentence] = str_replace(\"%$i%\", $val, self::$dict[$sentence]);\n $i++;\n }\n }\n \n return self::$dict[$sentence];\n } else {\n // don't add NT\n if (isset(config::$vars['coscms_main']['translate_ignore'])) {\n return $sentence;\n } else {\n return \"NT: '$sentence'\";\n }\n }\n }", "public static function get_someone_translation() {\n\t\t// Get field value from settings.\n\t\t$text = IBX_WPFomo_Admin::get_settings( 'translate_someone' );\n\n\t\tif ( empty( $text ) ) {\n\t\t\treturn __( 'Someone', 'ibx-wpfomo' );\n\t\t}\n\n\t\treturn esc_attr( $text );\n\t}", "function simplesamlphp_get_entry_name ($view, $entry = array()) {\n $result = $entry['entityid'];\n if (!empty($entry['name'])) {\n $name = SimpleSAML\\Utils\\Arrays::arrayize($entry['name'], 'en');\n $result = $view->getTranslation($name);\n } elseif (!empty($entry['OrganizationDisplayName'])) {\n $name = SimpleSAML\\Utils\\Arrays::arrayize($entry['OrganizationDisplayName'], 'en');\n $result = $view->getTranslation($name);\n }\n\n return htmlspecialchars($result);\n}", "public function provideTranslationForContentType($identifier, $default = '', array $variables = []) {\n return _t($this()->ContentType . \".$identifier\", $default, $variables);\n }" ]
[ "0.636742", "0.62443817", "0.60166895", "0.5987743", "0.5836392", "0.57967097", "0.5741413", "0.5727281", "0.5689897", "0.56705207", "0.5670498", "0.5574586", "0.54856706", "0.5462692", "0.5450244", "0.5393119", "0.53491044", "0.53196996", "0.52994543", "0.52700454", "0.5263056", "0.5257537", "0.5255252", "0.52435595", "0.5235183", "0.5183197", "0.5153372", "0.5139435", "0.51255983", "0.5096902", "0.5085615", "0.50543404", "0.50362414", "0.50362414", "0.5026502", "0.5016647", "0.50025004", "0.4994827", "0.49849302", "0.4980735", "0.49685305", "0.49653286", "0.49377912", "0.49360994", "0.49347705", "0.49305058", "0.49112326", "0.49107218", "0.49062854", "0.4892453", "0.48873767", "0.48592424", "0.48564085", "0.48437238", "0.48413426", "0.48388007", "0.4838295", "0.4833395", "0.48163295", "0.48151428", "0.48151428", "0.48151428", "0.4809095", "0.47987282", "0.47967944", "0.47893006", "0.47854578", "0.4785107", "0.477386", "0.4771711", "0.476718", "0.4750742", "0.47345448", "0.4730889", "0.4715138", "0.4715138", "0.4715138", "0.4715138", "0.4715138", "0.4715138", "0.4696855", "0.46963096", "0.46907037", "0.46879357", "0.46850097", "0.46819165", "0.4681591", "0.46798062", "0.46766505", "0.46735224", "0.46705014", "0.46675912", "0.46669447", "0.4660116", "0.46577758", "0.46570808", "0.4656177", "0.4652976", "0.46485797", "0.464265" ]
0.5327924
17
Find a string matching the given entity in the cache, or create one and add it.
protected function findOrCreateString($entity, $string) { $cache = static::get_cache(); $key = md5($entity); // It's not in the cache, which means it might have expired or might be a new entity if (!$result = $cache->load($key)) { $translation = DynamicTranslation::get()->filter(array('Entity' => $entity))->first(); // If no translation exists for this entity, create it if (!$translation) { $translation = DynamicTranslation::create(array('Entity' => $entity, 'String' => $string)); $translation->write(); } $cache->save($translation->String, $key); $result = $translation->String; } return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected static function addCache($key, $data)\n {\n \t$class = get_called_class();\n \tBaseEntityAbstract::$_entityCache[$class][$key] = $data;\n \treturn BaseEntityAbstract::$_entityCache[$class][$key];\n }", "public function lookup($key)\r\n {\r\n\t\t// create the unique cache key of the entity\r\n \t$cacheKey = $this->getCacheKey($key);\r\n \t// check if a entity with the passed primary key is available\r\n if (array_key_exists($cacheKey, $this->_entities)) {\r\n \treturn $this->_entities[$cacheKey];\r\n }\r\n // check if the requested entity exists in cache\r\n elseif($this->getCache()->test($cacheKey)) {\r\n \treturn $this->getCache()->load($cacheKey);\r\n }\r\n // if not return null\r\n else {\r\n \treturn null;\r\n }\r\n }", "public function add($entity)\r\n {\r\n \t$cacheKey = $this->getCacheKey($entity->getPrimaryKey());\r\n \t$this->_entities[$cacheKey] = $entity;\r\n }", "function get_entity_by_id_cache($entity_type, $entity_id)\n{\n global $cache;\n\n $translate = entity_type_translate_array($entity_type);\n\n if (is_array($cache[$entity_type][$entity_id]))\n {\n\n return $cache[$entity_type][$entity_id];\n\n } else {\n\n switch($entity_type)\n {\n case \"bill\":\n if (function_exists('get_bill_by_id'))\n {\n $entity = get_bill_by_id($entity_id);\n }\n break;\n\n case \"port\":\n $entity = get_port_by_id($entity_id);\n break;\n\n default:\n $sql = 'SELECT * FROM `'.$translate['table'].'`';\n\n if (isset($translate['state_table']))\n {\n $sql .= ' LEFT JOIN `'.$translate['state_table'].'` USING (`'.$translate['id_field'].'`)';\n }\n\n if (isset($translate['parent_table']))\n {\n $sql .= ' LEFT JOIN `'.$translate['parent_table'].'` USING (`'.$translate['parent_id_field'].'`)';\n }\n\n $sql .= ' WHERE `'.$translate['table'].'`.`'.$translate['id_field'].'` = ?';\n\n $entity = dbFetchRow($sql, array($entity_id));\n if (function_exists('humanize_'.$entity_type)) { $do = 'humanize_'.$entity_type; $do($entity); }\n else if (isset($translate['humanize_function']) && function_exists($translate['humanize_function'])) { $do = $translate['humanize_function']; $do($entity); }\n break;\n }\n\n if (is_array($entity))\n {\n entity_rewrite($entity_type, $entity);\n $cache[$entity_type][$entity_id] = $entity;\n return $entity;\n }\n }\n\n return FALSE;\n}", "private function cacheThis()\n\t{\n\t\t$q = 'UPDATE twitterSearch SET searchResults = \"' .addslashes($this->_results) .'\" WHERE searchTerm = \"' .$this->_searchString .'\"';\n\t\t$r = mysql_query($q, CONN) or die('could not update the results in the database for caching');\n\t}", "function create_search_cache($item_id)\n{\n global $db_prefix, $ce_cache;\n $row = sql_qquery(\"SELECT *, t1.idx AS item_id FROM \".$db_prefix.\"products AS t1 LEFT JOIN \".$db_prefix.\"product_cf_value AS t2 ON (t1.idx=t2.item_id) WHERE item_id='$item_id' LIMIT 1\");\n\n // cf type to store as smart cache\n $cfsc = array('varchar', 'textarea', 'country', 'select', 'multi');\n $cfsc_str = '';\n foreach ($ce_cache['cf_define'] as $k => $v) {\n if (in_array($v['cf_type'], $cfsc) && ($v['is_searchable'])) {\n $cfsc_str .= $row[$k].' ';\n }\n }\n\n // search_cache\n $string = strip_tags($row['sku'].' '.$row['title'].' '.$row['details'].' '.$cfsc_str);\n $string = str_replace('&#039;', '\\'', $string);\n $string = preg_replace('/[^\\p{L}\\p{N}\\s]/u', '', strtolower($string));\t// remove non alphanumeric, but keep UTF-8 chars\n $string = preg_replace('!\\s+!', ' ', $string);\t\t\t\t\t\t\t\t// replace tab & spaces as single space\n $string = addslashes(implode(' ', array_unique(explode(' ', $string))));// unique\n sql_query(\"UPDATE \".$db_prefix.\"products SET smart_search='$string' WHERE idx='$row[item_id]' LIMIT 1\");\n}", "function apc_cache_pre_get_keyword($args) {\n\tglobal $ydb;\n\t$keyword = $args[0];\n\t$use_cache = isset($args[1]) ? $args[1] : true;\n\t\n\t// Lookup in cache\n\tif($use_cache && apc_exists(apc_cache_get_keyword_key($keyword))) {\n\t\t$ydb->infos[$keyword] = apc_fetch(apc_cache_get_keyword_key($keyword)); \t\n\t}\n}", "public static function findById($id) \n {\n if(Cache::store('alunos')->has($id)) \n {\n //Caso exista, registra o hit\n event(new AlunosCacheHit);\n\n //E retorna o registro do cache\n return Cache::store('alunos')->get($id);\n } \n else \n {\n //Caso não exista, registra o miss\n event(new AlunosCacheMissed);\n\n //Procura na base\n $aluno = parent::find($id);\n\n //Sleep para simular uma consulta mais demorada\n sleep(1);\n\n //Insere no cache, com a chave primária\n Cache::store('alunos')->forever($id, $aluno);\n\n //Retorna o registro\n return $aluno;\n }\n\n }", "protected function cache(\n\t\tPersistentEntity $entity,\n\t\t$memcache = false,\n\t\t$overwrite = false\n\t) {\n\t\t$key = $this->cacheKey($entity->getValues(true));\n\t\tif (!$overwrite AND $this->isCached($key, $memcache)) {\n\t\t\t$entity = $this->getCached($key, $memcache);\n\t\t} else {\n\t\t\t$this->setCache($key, $entity, $memcache);\n\t\t}\n\t\treturn $entity;\n\t}", "protected function cache(PersistentEntity $entity, $memcache = false, $overwrite = false) {\r\n\t\t$key = $this->cacheKey($entity->getValues(true));\r\n\t\tif (!$overwrite AND $this->isCached($key, $memcache)) {\r\n\t\t\t$entity = $this->getCached($key, $memcache);\r\n\t\t} else {\r\n\t\t\t$this->setCache($key, $entity, $memcache);\r\n\t\t}\r\n\t\treturn $entity;\r\n\t}", "function entityID($entity){\n\t\t$entity = strtolower($entity);\n\t\t// Check local copy\n\t\tif(in_array($entity,$this->entities)) return $this->entities[$entity];\n\t\t\n\t\t// Check DB\n\t\tglobal $sess;\n\t\t$db = $sess->db();\n\t\t$entityID = $db->queryUniqueValue('SELECT id FROM `entities` WHERE `name` LIKE \\''.addslashes($entity).'\\'');\n\t\tif(!$entityID){\n\t\t\t// Create new entity\n\t\t\t$db->preparedInsert('entities',array('name'=>$entity));\n\t\t\t$entityID = $db->lastInsertedId();\n\t\t}\n\t\t// Store in local cache\n\t\t$this->entities[$entity] = $entityID;\t\n\t\treturn $entityID;\n\t}", "public function findByName(String $name);", "public function getItem($key): CacheItem;", "function checkRelatedInCache($productName)\n{\n return S::of(function (Cacher $cache) use ($productName) {\n return [$cache->get($productName), $cache];\n });\n}", "public function createItem(string $key): CacheItemInterface;", "private function cacheKey(Cache $cache, $name, $src, $paramStr, $filterStr)\n {\n return $cache->createKey(\n $src,\n $name,\n $paramStr.'/'.$filterStr,\n pathinfo($src, PATHINFO_EXTENSION)\n );\n }", "public function set($key, $value): CacheInterface;", "function shAddSefUrlToDBAndCache($nonSefUrl, $sefString, $rank, $urlType)\n{\n\n\t$db = ShlDbHelper::getDb();\n\t$sefString = JString::ltrim($sefString, '/'); // V 1.2.4.t just in case you forgot to remove leading slash\n\tswitch ($urlType)\n\t{\n\t\tcase sh404SEF_URLTYPE_AUTO:\n\t\t\t$dateAdd = '0000-00-00';\n\t\t\tbreak;\n\t\tcase sh404SEF_URLTYPE_CUSTOM:\n\t\t\t$dateAdd = date(\"Y-m-d\");\n\t\t\tbreak;\n\t\tcase sh404SEF_URLTYPE_NONE:\n\t\t\treturn null;\n\t\t\tbreak;\n\t}\n\n\ttry\n\t{\n\n\t\t$query = '';\n\t\tif ($urlType == sh404SEF_URLTYPE_AUTO)\n\t\t{\n\t\t\t$result = ShlDbHelper::quoteQuery('select ??, ?? from ?? where ?? = ? and (?? = ? or ?? = ?)',\n\t\t\t\tarray('id', 'newurl', '#__sh404sef_urls', 'oldurl', 'newurl', 'newurl'), array($sefString, '', addslashes(urldecode($nonSefUrl))))\n\t\t\t\t->loadObject();\n\n\t\t\tif (!empty($result))\n\t\t\t{\n\t\t\t\t// sef urls was found either as a 404 or as already existing, with also the same non-sef\n\t\t\t\tif ($result->newurl == $nonSefUrl)\n\t\t\t\t{\n\t\t\t\t\t// url already in db, nothing to do\n\t\t\t\t\tShlSystem_Log::debug('sh404sef', 'url already in db, nothing to do');\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tShlDbHelper::update('#__sh404sef_urls', array('newurl' => addslashes(urldecode($nonSefUrl)), 'rank' => $rank, 'dateadd' => $dateAdd),\n\t\t\t\t\tarray('oldurl' => $sefString));\n\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// another option: sef exists, but with another non-sef: that's a duplicate\n\t\t\t\t// need to check that\n\t\t\t\t$result = ShlDbHelper::selectObject('#__sh404sef_urls', array('id', 'newurl', 'rank'),\n\t\t\t\t\t$db->quoteName('oldurl') . ' = ? and ' . $db->quoteName('newurl') . ' <> ?',\n\t\t\t\t\tarray($sefString, addslashes(urldecode($nonSefUrl))), array('rank' => 'desc'));\n\n\t\t\t\tif (!empty($result))\n\t\t\t\t{\n\t\t\t\t\t// we found at least one identical SEF url, with another non-sef. Mark the new one as duplicate of the old one\n\t\t\t\t\t$rank = $result->rank + 1;\n\t\t\t\t}\n\n\t\t\t\tShlDbHelper::insert('#__sh404sef_urls', array('oldurl' => $sefString, 'newurl' => $nonSefUrl, 'rank' => $rank, 'dateadd' => $dateAdd));\n\n\t\t\t\t// store optional data\n\t\t\t\tSh404sefHelperUrl::storeUrlSourceData($nonSefUrl, $sefString);\n\t\t\t}\n\t\t}\n\n\t\t// store new sef/non-sef pair in memory cache\n\t\tSh404sefHelperCache::addSefUrlToCache($nonSefUrl, $sefString, $urlType);\n\n\t\t// create shURL : get a shURL model, and ask url creation\n\t\t$model = ShlMvcModel_Base::getInstance('pageids', 'Sh404sefModel');\n\t\t$model->createPageId($sefString, $nonSefUrl);\n\n\t}\n\tcatch (Exception $e)\n\t{\n\t\tShlSystem_Log::error('sh404sef', '%s::%s::%d: %s', __CLASS__, __METHOD__, __LINE__, $e->getMessage());\n\t}\n}", "function getItem($name){\n\t\t$i = cacheItem::getInstance($name);\n\t\tif(empty($i->cacheTime) && empty($i->content) ){\n\t\t\t$datas = $this->db->select_row(self::$tableName,'*',array('WHERE name=?',$name));\n\t\t\tif( false !== $datas)\n\t\t\t\t$i->setDatas($datas);\n\t\t}\n\t\treturn $i;\n\t}", "public function getObjFromCache($key);", "function wp_cache_get($key, $group = '', $force = false, &$found = null)\n{\n global $wp_object_cache;\n\n return $wp_object_cache->get($key, $group, $force, $found);\n}", "function wp_cache_get($key, $group = '', $force = false, &$found = null)\n{\n global $wp_object_cache;\n\n return $wp_object_cache->get($key, $group, $force, $found);\n}", "public function getItem(string $key): CacheItemInterface;", "public function isExistInCache($key);", "public function find ($key);", "public function findByName($name);", "public function findByName($name);", "public function findByName($name);", "function wp_cache_get($key, $group = '', $force = \\false, &$found = \\null)\n {\n }", "private function _getCache($term) {\n\t\t// find our search term\n\t\t$result = $this->db->get_where('Cache', array('Term' => $term, 'Expires >' => date(\"Y-m-d H:i:s\")))->row_array();\n\t\t// did we get one that isn't expired?\n\t\tif ($result) { \n\t\t\t// cache hit\n\t\t\treturn $result['Data'];\n\t\t}\n\t\t// cache miss\n\t\treturn false;\n\t}", "public function cacheWhereIs($entity)\n {\n $where = $this->getCache($entity, false);\n if ($where === false) {\n $where = $this->whereIs($entity);\n $this->setCache($entity, $where);\n }\n return $where;\n }", "function driver_get($keyword, $option = array()) {\n // return value if in caching\n try {\n $stm = $this->db($keyword)->prepare(\"SELECT * FROM `caching` WHERE `keyword`=:keyword LIMIT 1\");\n $stm->execute(array(\n \":keyword\" => $keyword\n ));\n $row = $stm->fetch(PDO::FETCH_ASSOC);\n\n } catch(PDOException $e) {\n\n $stm = $this->db($keyword,true)->prepare(\"SELECT * FROM `caching` WHERE `keyword`=:keyword LIMIT 1\");\n $stm->execute(array(\n \":keyword\" => $keyword\n ));\n $row = $stm->fetch(PDO::FETCH_ASSOC);\n }\n if($this->isExpired($row)) {\n $this->deleteRow($row);\n return null;\n }\n\n if(isset($row['id'])) {\n $data = $this->decode($row['object']);\n return $data;\n }\n return null;\n }", "function cacheContactID( $firebaseUid, $contactID ) {\n global $jsonCacheFilepath, $sqliteCacheFilepath;\n // try saving to sqlite db first, then to a json file\n if ( class_exists('SQLite3') ) {\n $db = new SQLite3( $sqliteCacheFilepath );\n // check if the cache table exists and create it if it doesn't\n $db->exec( \"CREATE TABLE IF NOT EXISTS cache (id INTEGER PRIMARY KEY AUTOINCREMENT, firebaseUid TEXT, contactID TEXT)\" );\n // add the value to the cache table\n $db->exec( \"INSERT INTO cache (firebaseUid, contactID) VALUES ('$firebaseUid', '$contactID')\" );\n $db->close();\n } else {\n // read the existing file if there is one\n if ( file_exists($jsonCacheFilepath) ) {\n $contactIdCache = json_decode( file_get_contents($jsonCacheFilepath) );\n } else {\n $contactIdCache = (object)array();\n }\n // add the new cache value to the file\n $contactIdCache->$firebaseUid = $contactID;\n file_put_contents( $jsonCacheFilepath, json_encode($contactIdCache) );\n }\n}", "function wp_cache_get( $key, $group = '', $force = false, &$found = null ) {\n\t\treturn false;\n\t}", "public function get_lookup(/* ... */)\n {\n return sprintf(\n \"`%s` ILIKE %s\",\n $this->_field->get_db_field_name(),\n $this->_key\n );\n }", "function searchRelated($productName)\n{\n // TODO: 1. try use doM\n // TODO: 2. try implement getOrElse\n return checkRelatedInCache($productName)\n ->bind(function (Maybe\\Maybe $products) use ($productName) {\n switch (get_class($products)) {\n case Maybe\\Just::class:\n return S\\value($products->extract());\n case Maybe\\Nothing::class:\n return retrieveRelated($productName);\n }\n });\n}", "function retrieveRelated($productName)\n{\n return S::of(function (Cacher $cache) use ($productName) {\n // do some database work\n $products = ['iPhone 5', 'iPhone 6s'];\n\n return [$products, $cache->put($productName, $products)];\n });\n}", "public static function find($name);", "public static function find($name);", "function cache($field, $type, $id,$delta, $item) {\n $cid = \"{$field}_{$type}_{$id}_{$delta}:\" . \\Drupal::languageManager()\n ->getCurrentLanguage()\n ->getId();\n $camData = NULL;\n\n if ($cache = \\Drupal::cache()\n ->get($cid)) {\n // It's in cache\n $camData = $cache->data;\n\n if($this->currentTimeMillis() >= $camData['time'] ) {\n // Cache expired\n $info = pathinfo($item->link);\n $data = WebcamHelper::requesturl( $item->link, $item->refresh_rate/1000);\n\n if ($data != false) {\n $imageSrc = 'data:image/' . $info['extension'] . ';base64,' . base64_encode($data);\n }elseif($camData['src'] != false){\n // Failed to retrieve the image, but there is an old one in the cache\n $imageSrc = $camData['src'];\n }else{\n // Failed to retrieve the image, and there isn't one in the cache\n $imageSrc = false;\n }\n \\Drupal::cache()\n ->set($cid, ['src' => $imageSrc, 'time' => $this->currentTimeMillis() + $item->refresh_rate]);\n }\n return isset($imageSrc) ? $imageSrc : $camData['src'];\n }\n else {\n // We don't have it in cache\n $info = pathinfo($item->link);\n $data = WebcamHelper::requesturl( $item->link, $item->refresh_rate/1000);\n\n if ($data != false) {\n $imageSrc = 'data:image/' . $info['extension'] . ';base64,' . base64_encode($data);\n }else{\n $imageSrc = false;\n }\n\n \\Drupal::cache()\n ->set($cid, ['src' => $imageSrc, 'time' => $this->currentTimeMillis() + $item->refresh_rate]);\n }\n return $imageSrc;\n }", "function wp_cache_get($id, $group = '', $force = false, &$found = null)\r\n\t{\r\n\t\tglobal $wp_object_cache;\r\n\t\tif (empty($group)) { $group = 'default'; }\r\n\t\treturn $wp_object_cache->get($id, $group, $force, $found);\r\n\t}", "public function cache() {\n if(!array_key_exists($this->steamId64, self::$steamIds)) {\n self::$steamIds[$this->steamId64] = $this;\n if(!empty($this->customUrl) &&\n !array_key_exists($this->customUrl, self::$steamIds)) {\n self::$steamIds[$this->customUrl] = $this;\n }\n }\n }", "public function cache() {\n $this->select(null,null,'slug asc');\n\t\tforeach ($this->cursor as $rec) {\n\t\t\t$this->cache[$rec->slug] = $rec->value;\n\t\t}\n\t}", "public function find($value);", "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}", "public function hitString(string $label) : string\n {\n if ($this->isCached($label)) {\n $filename = $this->path . \"/\" . md5($label);\n return file_get_contents($filename);\n } else {\n throw new NotCachedException($label);\n }\n }", "public function find($identifier);", "protected function saveToCache() {}", "public function testGetHit()\n {\n $key = \"unique\";\n $item = $this->cache->getItem($key);\n $item->set(\"content\");\n\n $res = $item->get();\n $this->assertNull($res, \"Should not be able to find a value\");\n\n $this->cache->save($item);\n $res = $item->get();\n $this->assertTrue(!is_null($res), \"Should have a value\");\n }", "protected function cache(array $identifier, $object)\n {\n $this->objectCache[$identifier[0]][$identifier[1]] = $object;\n return $object;\n }", "static function addCache($query,$rows,$fnId=\"\") {\n if (!$fnId) {\n $fnId=date(\"d-m-y-h-i-s\").rand(10000,99999).\".txt\"; \n } \n $cacheMap[] = [\"query\" => $query, \"fnId\" => $fnId];\n file_put_contents(Caching::getCachePath() . \"cachemap.txt\",$query.\"|\".$fnId.\"^\",FILE_APPEND | LOCK_EX);\n Caching::cacheWrite($fnId,$rows);\n Caching::logWrite(\"$query added to cache\");\n }", "function wp_cache_add($key, $value, $group = '', $expiration = 0)\n{\n global $wp_object_cache;\n\n return $wp_object_cache->add($key, $value, $group, $expiration);\n}", "protected function _cache($id, $value)\n {\n if (isset($this->_cache)) {\n $this->_cache->save($value, $this->_cachePrefix . $id);\n }\n \n return $value;\n }", "function datalist_get($name) {\n\tglobal $CONFIG, $DATALIST_CACHE;\n\n\t// We need this, because sometimes datalists are received before the database is created\n\tif (!is_db_installed()) {\n\t\treturn false;\n\t}\n\n\t$name = trim($name);\n\n\t// cannot store anything longer than 32 characters in db, so catch here\n\tif (elgg_strlen($name) > 32) {\n\t\telgg_log(\"The name length for configuration variables cannot be greater than 32\", \"ERROR\");\n\t\treturn false;\n\t}\n\n\t$name = sanitise_string($name);\n\tif (isset($DATALIST_CACHE[$name])) {\n\t\treturn $DATALIST_CACHE[$name];\n\t}\n\n\t// If memcache enabled then cache value in memcache\n\t$value = null;\n\tstatic $datalist_memcache;\n\tif ((!$datalist_memcache) && (is_memcache_available())) {\n\t\t$datalist_memcache = new ElggMemcache('datalist_memcache');\n\t}\n\tif ($datalist_memcache) {\n\t\t$value = $datalist_memcache->load($name);\n\t}\n\tif ($value) {\n\t\treturn $value;\n\t}\n\n\t// [Marcus Povey 20090217 : Now retrieving all datalist values on first load as this saves about 9 queries per page]\n\t$result = get_data(\"SELECT * from {$CONFIG->dbprefix}datalists\");\n\tif ($result) {\n\t\tforeach ($result as $row) {\n\t\t\t$DATALIST_CACHE[$row->name] = $row->value;\n\n\t\t\t// Cache it if memcache is available\n\t\t\tif ($datalist_memcache) {\n\t\t\t\t$datalist_memcache->save($row->name, $row->value);\n\t\t\t}\n\t\t}\n\n\t\tif (isset($DATALIST_CACHE[$name])) {\n\t\t\treturn $DATALIST_CACHE[$name];\n\t\t}\n\t}\n\n\n\t/*if ($row = get_data_row(\"SELECT value from {$CONFIG->dbprefix}datalists where name = '{$name}' limit 1\")) {\n\t\t$DATALIST_CACHE[$name] = $row->value;\n\n\t\t// Cache it if memcache is available\n\t\tif ($datalist_memcache) $datalist_memcache->save($name, $row->value);\n\n\t\treturn $row->value;\n\t}*/\n\n\treturn null;\n}", "function findByName($name) {\n \t$str_len = strlen($name);\n \ttrim($name);\n \t$name = str_replace('category', '', strtolower($name));\n \t\n\t\t$conn = Doctrine_Manager::connection();\n\t\t// query for check if location exists\n\t\t$unique_query = \"SELECT id FROM commoditycategory WHERE LOWER(name) LIKE LOWER('%\".$name.\"%') OR LOWER(name) LIKE LOWER('%\".$name.\"%') OR LOWER(name) LIKE LOWER('%\".$name.\"%') \";\n\t\t$result = $conn->fetchOne($unique_query);\n\t\t// debugMessage($unique_query);\n\t\t// debugMessage($result);\n\t\treturn $result; \n\t}", "function object_cache_replace($key, $data, $flag = '', $expire = 0) {\n\tglobal $ts_object_cache;\n\n\treturn $ts_object_cache->replace($key, $data, $flag, $expire);\n}", "function object_cache_add($key, $data, $flag = '', $expire = 0) {\n\tglobal $ts_object_cache;\n\n\treturn $ts_object_cache->add($key, $data, $flag, $expire);\n}", "private static function lookupCachedToken($token)\n {\n if (!isset(Yii::$app->cache)) {\n return null;\n }\n // get token from cache\n $record = Yii::$app->cache->get(self::CACHE_PREFIX . $token);\n return $record;\n }", "static public function addCache($configuration) {\n\t\tif(!isset($configuration['cache_id'])) {\n\t\t\t$mComponentcache=new Maerdo_Model_Componentcache();\n\t\t\treturn($mComponentcache->insert(array('name'=>$configuration['name'],'type'=>$configuration['frontend_type'],'backend_type'=>$configuration['backend_type'])));\n\t\t}\n\t\t\n\t}", "private static function getCacheKey2($name, AssetInterface $asset, FilterInterface $additionalFilter = NULL, $salt = '', $suffix, $useTimestamp= false)\n {\n if(!$useTimestamp) {\n // Return early for no hash at all\n return ($suffix ? $name . $suffix : $name);\n }\n\n if ($additionalFilter) {\n $asset = clone $asset;\n $asset->ensureFilter($additionalFilter);\n }\n\n $cacheKey = $name;\n if($useTimestamp) {\n $cacheKey .= $asset->getLastModified();\n }\n\n\n if ($values = $asset->getValues()) {\n asort($values);\n $cacheKey .= serialize($values);\n }\n\n $key = $name . '-' . sha1($cacheKey . $salt);\n $key .= $suffix ? $suffix : '';\n return $key;\n }", "protected function cacheLookup($phrase, $inflection, $multi = false, $flags = array())\n {\n if ($inflection == Emagedev_Morpher_Helper_Data::NOMINATIVE && !$multi) {\n return $this->getDefault($phrase, $flags);\n }\n\n /** @var Emagedev_Morpher_Model_Resource_Inflection_Collection $collection */\n $collection = Mage::getModel('morpher/inflection')->getCollection();\n $collection\n ->addFieldToFilter('phrase', $phrase)\n ->addFieldToFilter('inflection', $inflection)\n ->addFieldToFilter('multi', $multi ? 1 : 0)\n ->addFieldToFilter('flags', Mage::helper('morpher')->serializeFlags($flags))\n ->setPageSize(1);\n\n return count($collection) > 0 ? $collection->getFirstItem() : false;\n }", "public function getCache($entity, $default=false)\n {\n $cacheId = $this->getCacheId();\n if (isset($this->pathsCache[$cacheId][$entity])) {\n return $this->pathsCache[$cacheId][$entity];\n }\n return $default;\n }", "public function getFromCache() {}", "function append($key, $value) {\n return $this->memcached->append($key, $value);\n }", "public function testResolveCacheMissWithPersist() {\n $args = [\n 'language' => 'en',\n 'source' => 'test',\n 'context' => 'irrelevant',\n ];\n\n $result = (object) [\n 'translation' => 'test',\n ];\n\n $this->storage->expects($this->once())\n ->method('findTranslation')\n ->with($this->equalTo($args))\n ->will($this->returnValue($result));\n\n $this->configFactory = $this->getConfigFactoryStub(['locale.settings' => ['cache_strings' => TRUE]]);\n $locale_lookup = $this->getMockBuilder('Drupal\\locale\\LocaleLookup')\n ->setConstructorArgs(['en', 'irrelevant', $this->storage, $this->cache, $this->lock, $this->configFactory, $this->languageManager, $this->requestStack])\n ->onlyMethods(['persist'])\n ->getMock();\n $locale_lookup->expects($this->once())\n ->method('persist');\n\n $this->assertSame('test', $locale_lookup->get('test'));\n }", "function InPlaceCache_cacheHit(&$cacheOutput, &$parser)\r\n{\r\n\t/*\r\n\t\tMerge the stored ParserOutput with the current one to ensure things like template link dependencies get updated correctly\r\n\t*/\r\n\tInPlaceCache_mergeParserOutputTo($parser->mOutput, $cacheOutput);\r\n\t\r\n\treturn $cacheOutput->getText();\r\n}", "function get($name, $key=null) {\n if (isset($this->cache[$name]) && $key) {\n //error_log(\"Get from cache: '$name' key: '$key'\");\n return $this->cache[$name][$key];\n }\n return false;\n }", "public function getEntity($name);", "public function setObjToCache($key, $value, $timeToCache = 0);", "public function cache($id, $data)\n {\n if (!$this->config['redis_cache']['enabled']) {\n return false;\n }\n\n // Adds tweets with specified scores to the sorted set stored at key.\n $this->cache->zadd('tweet', [$id => $id]);\n\n // Add tweets to specified fields to their respective values in the hash stored at key.\n $this->cache->hmset(sprintf('tweet:%s', $id), $data);\n }", "public function findEntityByName($q){\r\n\t\t$this->recursive = 0;\r\n\t\t/*\r\n\t\t$entities = $this->query(\"SELECT * \r\n\t\t\tFROM entities AS Entity \r\n\t\t\tWHERE Entity.name LIKE '%$q%'\");\r\n\t\t*/\r\n\t\t$entities = $this->query(\"SELECT * \r\n\t\t\tFROM entities AS Entity \r\n\t\t\tWHERE Entity.name LIKE '%$q%' \r\n\t\t\tAND EXISTS (SELECT u.id FROM users AS u WHERE u.entity_id = Entity.id)\");\r\n\t\t\r\n\t\treturn $entities;\r\n\t}", "static function set($name,$content){\n\t\tif(! self::$enable )\n\t\t\treturn $content;\n\t\tself::init();\n\t\t$i = cacheItem::getInstance($name);\n\t\t$i->content = $content;\n\t\tself::$backend->saveItem($i);\n\t\treturn $content;\n\t}", "abstract public function find($query_string);", "public static function store($object){\n\t\t\tif(!is_object($object)){\n\t\t\t\tLogger::warning(MessageUtility::CACHE_LOAD_WARNING, \"A primitive value of type \".gettype($object).\" cannot be cached.\");\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t//Check that the specified $object is an object of PersistentClass\n\t\t\t$objectClass = Mirror::reflectClass($object);\n\t\t\tif(!$objectClass->descendsFrom(\"Wadapi\\Persistence\\PersistentClass\")){\n\t\t\t\tLogger::warning(MessageUtility::CACHE_LOAD_WARNING, \"Object of class \".get_class($object).\" is not a descendant \".\n\t\t\t\t\t\t\t\t \"of PersistentClass and cannot be stored in cache.\");\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tself::$cache[$object->getId()] = $object;\n\t\t}", "public function get($cache_name);", "function wp_cache_replace($key, $value, $group = '', $expiration = 0)\n{\n global $wp_object_cache;\n\n return $wp_object_cache->replace($key, $value, $group, $expiration);\n}", "protected static function getCacheIdentifier() {}", "public function cacheObjectInfo($obj) {\n\t\t$this->_link_cache[$obj->id] = $obj->links;\n\t\t$this->_title_cache[$obj->id] = $obj->properties[\"cmis:name\"]; // Broad Assumption Here?\n\t\t$this->_objTypeId_cache[$obj->id] = $obj->properties[\"cmis:objectTypeId\"];\n\t\tif (isset($obj->properties[\"cmis:changeToken\"])) {\n\t\t\t$this->_changeToken_cache[$obj->id] = $obj->properties[\"cmis:changeToken\"];\n\t\t}\n\t}", "public function lookup($src);", "public static function FindById($entity)\n {\n if(isset(StorageManager::$entities[$entity->Alias]) == true )\n {\n if(isset(StorageManager::$entities[$entity->Alias][$entity->IdEntite]))\n {\n return StorageManager::$entities[$entity->Alias][$entity->IdEntite];\n }\n }\n\n return null;\n }", "function apc_cache_get_keyword_infos($info, $keyword) {\n\t// Store in cache\n\tapc_store(apc_cache_get_keyword_key($keyword), $info, APC_CACHE_READ_TIMEOUT);\n\treturn $info;\n}", "private function readFromCache()\n\t{\n\t\t$q = 'SELECT searchResults FROM twitterSearch WHERE searchTerm = \"' .$this->_searchString .'\"';\n\t\t$r = mysql_query($q, CONN) or die('could not fetch the cached search results');\n\t\t$arr = mysql_fetch_array($r);\n\t\t$searchResults = $arr['searchResults'];\n\t\t\n\t\tif ($this->_testMode) { echo \"fetching the cached<br />\"; }\n\t\t\n\t\treturn $searchResults;\n\t\t//var_dump($fData);\n\t}", "public abstract function find();", "public function justFindThisAnywhere($stringToFind)\n\t{\n\t\t$this->master[$this->ref_wildCard] = $stringToFind;\n\t}", "public function find($id)\n {\n // Reading from cache first\n if ($this->_cache->has($id)) {\n return $this->_cache->get($id);\n }\n \n $prepSql = \"SELECT {$this->_columnNames} FROM `{$this->_tableName}` \"\n . \"WHERE `id` = ?\";\n $pstmt = $this->_prepare($prepSql);\n $bindings = [$id];\n\n $pstmt->execute($bindings);\n \n $dbRecord = $pstmt->fetch(\\PDO::FETCH_ASSOC);\n $pstmt->closeCursor();\n $entity = $this->_toEntity($dbRecord);\n \n // Now that we have retrieved the Entity, let's add it to the cache\n $this->_cache->set($id, $entity);\n \n return $entity;\n }", "static function getInstance($name){\n\t\tif(! isset( self::$_instances[$name]))\n\t\t\tself::$_instances[$name] = new cacheItem($name);\n\t\treturn self::$_instances[$name];\n\t}", "function markup_from_cache();", "function getCachedContactID( $firebaseUid ) {\n global $jsonCacheFilepath, $sqliteCacheFilepath;\n // the cache may be saved as a json file, or saved in a sqlite db\n if ( class_exists('SQLite3') && file_exists($sqliteCacheFilepath) ) {\n // load from sqlite\n $db = new SQLite3( $sqliteCacheFilepath );\n $result = $db->query( \"SELECT * FROM cache WHERE firebaseUid='$firebaseUid'\" );\n $row = $result->fetchArray();\n $db->close();\n if ( $row ) {\n return $row['contactID'];\n }\n } else if ( file_exists($jsonCacheFilepath) ) {\n // load from json file\n $contactIdCache = json_decode( file_get_contents($jsonCacheFilepath) );\n if ( isset($contactIdCache->$firebaseUid) ) {\n return $contactIdCache->$firebaseUid;\n }\n }\n\n return false;\n}", "public function load($entity) \n {\n if ($this->cacheKnow($entity)) {\n $where = $this->cacheWhereIs($entity);\n return (bool) @include_once $where;\n }\n return false;\n }", "protected function cacheKeyValue($value, $key = null)\n {\n // an empty key signifies direct import\n return null !== $key\n ? $this->cache = array_merge($this->cache, $value)\n : $this->cache[$key] = $value;\n }", "public function getBy($key, $value);", "function fetchOrStore( $memcache, $variable, $expiry, $function ) {\n\t$value = @memcache_get( $memcache, $variable );\n\tif ( ! $value ) {\n\t\t$value = $function( );\n\t\t@memcache_set( $memcache, $variable, $value, false, $expiry );\n\t\t// TODO this can fail to set, though we return $value so nothing will be lost?\n\t}\n\treturn $value;\n}", "public function setCache($entity, $path)\n {\n $cacheId = $this->getCacheId();\n $this->pathsCache[$cacheId][$entity]=$path;\n return $this;\n }", "public function saveToCacheForever();", "private function getObject($name){\n return $this->cache->get($name);\n }", "function driver_get($keyword, $option = array()) {\n // return value if in caching\n\n $x = wincache_ucache_get($keyword,$suc);\n\n if($suc == false) {\n return null;\n } else {\n return $x;\n }\n }", "function def( $key, $value = false ) { \n \n if( $value !== false ) {\n \n $this->cache[$key] = $value;\n \n }\n \n else {\n \n $defined = array_key_exists($key, $this->cache) and isset($this->cache[$key]);\n \n if( $defined ) return $this->cache[$key];\n \n return null;\n \n }\n \n }", "function shGetSefURLFromCacheOrDB($string, &$sefString)\n{\n\t$sefConfig = Sh404sefFactory::getConfig();\n\tif (empty($string))\n\t\treturn sh404SEF_URLTYPE_NONE;\n\t$sefString = '';\n\t$urlType = sh404SEF_URLTYPE_NONE;\n\tif ($sefConfig->shUseURLCache)\n\t\t$urlType = Sh404sefHelperCache::getSefUrlFromCache($string, $sefString);\n\t// Check if the url is already saved in the database.\n\tif ($urlType == sh404SEF_URLTYPE_NONE)\n\t{\n\t\t$urlType = getSefUrlFromDatabase($string, $sefString);\n\t\tif ($urlType == sh404SEF_URLTYPE_NONE || $urlType == sh404SEF_URLTYPE_404)\n\t\t\treturn $urlType;\n\t\telse\n\t\t{\n\t\t\tif ($sefConfig->shUseURLCache)\n\t\t\t{\n\t\t\t\tSh404sefHelperCache::addSefUrlToCache($string, $sefString, $urlType);\n\t\t\t}\n\t\t}\n\t}\n\treturn $urlType;\n}", "function _search_tmp($string){\n\t\tglobal $bBlog;\n\t\treturn $bBlog->db->query(\"\n\t\t\tINSERT INTO `\".T_SEARCH_TMP.\"` (`article_id` , `points`, `string`, `time` )\n\t\t\tSELECT `article_id`, SUM(`score`) AS `points`, '\".$string.\"', NOW()\n\t\t\tFROM `\".T_SEARCH.\"`\n\t\t\tWHERE `value` LIKE '\".$string.\"'\n\t\t\tGROUP BY id\n\t\t\tORDER BY points DESC;\n\t\t\");\n\t}", "public function get($name, $cache = true) {}" ]
[ "0.5409238", "0.5355655", "0.5323046", "0.5268693", "0.5076938", "0.50654864", "0.5052053", "0.49734613", "0.4970405", "0.49582818", "0.49579415", "0.49021587", "0.48987982", "0.48794687", "0.48473954", "0.48415858", "0.483729", "0.483095", "0.4814251", "0.47787786", "0.47620735", "0.47620735", "0.47573006", "0.47505242", "0.47377914", "0.47298485", "0.47298485", "0.47298485", "0.47141603", "0.47091395", "0.4675526", "0.4666109", "0.46388632", "0.46336028", "0.46192873", "0.46152917", "0.46112275", "0.46015579", "0.46015579", "0.4566788", "0.45615816", "0.45611304", "0.45592988", "0.4539037", "0.45330685", "0.45315957", "0.45314488", "0.4519933", "0.45023844", "0.4493032", "0.44769934", "0.44752428", "0.44738734", "0.44617715", "0.44510993", "0.44370228", "0.4424355", "0.44104204", "0.44066527", "0.44008783", "0.44005507", "0.43981108", "0.4392229", "0.4374541", "0.4372588", "0.43660972", "0.4364302", "0.436419", "0.43641677", "0.4363335", "0.4362481", "0.43618727", "0.43578255", "0.43479756", "0.43451238", "0.43419704", "0.43397364", "0.4337627", "0.43362936", "0.43296924", "0.43282166", "0.43218374", "0.43148237", "0.43142995", "0.4287212", "0.42850685", "0.4279341", "0.42788133", "0.42786732", "0.42783567", "0.42779294", "0.42750695", "0.42687002", "0.42644826", "0.42615992", "0.42561582", "0.42405978", "0.42399353", "0.42388886", "0.42381817" ]
0.6792213
0
$con_obj = new DbConnection\Connection\ConnectionClass();
function __construct() { $con_obj = new ConnectionClass(); $this->con = $con_obj->getConnection(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function __construct() {\n $connector = new DbConnection();\n $conn = $connector->connect(); \n }", "function __construct(){\n $this->con = new db_connect('', '', '', '');\n }", "public function __construct(){\n $this->dbConnection = new database_connection();\n }", "public function __construct(){\n require_once dirname(__FILE__) . '/DbConnect.php';\n \n //creating the object of the dbconnect class\n $db = new DbConnect; \n \n //getting the connection\n $this->con = $db->connect();\n }", "public function __construct(){\n $this->db = new Conexion_BD; \n }", "public function __construct(){\n $database = new Database();\n $db = $database->dbConnection();\n $this->conn = $db;\n }", "public function __construct(){\n $this->connection = new Connection();\n\t}", "public function __construct(){\n $database = new Database();\n $db = $database->getConnection();\n $this->conn = $db;\n }", "public function __construct(){\n $database = new Database();\n $db = $database->getConnection();\n $this->conn = $db;\n }", "public function __construct(){\r\n $this->conn = $this->getConnection();\r\n }", "public function __construct(){\r\n\r\n $db = new DB;\r\n\r\n $this->db = $db->get_connection();\r\n\r\n }", "function __construct() {\r\n\t\t$this->connBanco = new Db();\r\n\t}", "public function __construct()\r\n {\r\n $this->conexao = new conexao;\r\n }", "function __construct(){\n $this->connection=connect_db(); \n }", "function __construct(){\n require_once dirname(__FILE__) . '/DBConnect.php';\n $db = new DbConnect;\n $this->con = $db->connect();\n }", "public function __construct() {\n $this->conexion = new ConexionBD(); //instanciamos la clase\n\n }", "public function __construct() {\n $this->conexion = new ConexionBD(); //instanciamos la clase\n\n }", "public function __construct(){\n\t\t$database = new Database();\n\t\t$db = $database->getConnection();\n $this->conn = $db;\n }", "public function __construct(){\n $this->db = new Conect();//criando o objeto Conect\n $this->db = $this->db->Conn();//executando metodo e pondo em uma variavel\n}", "public function __construct($db){\n $this->conn = $db;\n}", "public function __construct()\n {\n $this->db = ConnectionClass::conn();\n }", "function __construct(){\n $this->conn = connect_db(); \n }", "function __construct() {\r\n //echo \" hi constructor called\";\r\n \r\n\r\n require_once 'DB_Connect.php';\r\n // connecting to database\r\n $this->db = new DB_Connect();\r\n $this->con = $this->db->connect();\r\n \r\n}", "public function __construct()\n {\n require_once 'application/models/connection.php';\n $this->connection = new Connection();\n }", "public function __construct()\n {\n require_once 'application/models/connection.php';\n $this->connection = new Connection();\n }", "public function __construct(){\n $database = new Database();\n $db = $database->getConnection();\n \n $this->conn = $db;\n }", "public function __construct($db){\n $this->conn = $db;\n }", "public function __construct()\n {\n $this->conn = new Conexion;\n }", "public function __construct($db){\n $this->conn = $db;\n}", "function create_connection(){\n\t\t$this->dbconn =& new DBConn();\r\n\t\tif($this->dbconn == NULL)\r\n\t\t\tdie('Could not create connection object');\n\t}", "public function __construct(){\n\t\t$this->db = new Connection();\n\t\t$this->db = $this->db->dbConnect();\n\t}", "public function __construct()\r\n\r\n\t{\r\n\t\t$this->db = new Connection();\r\n\t\t//chama o metodo conectar da classe Conection\r\n\t\t$this->db = $this->db->conectar();\r\n\t\t\r\n\t}", "public function __construct($db){ \n $this->conn = $db; \n }", "public function __construct(){\n require_once \"database.php\";\n $this->connection = new Database(DB_NAME);\n }", "public function __construct()\r\n\t{\r\n\t\t$conn= new connection();\r\n return $this->conn;\r\n }", "function __construct() // constructor, solo crea una conexion usando la clase \"Conexion\"\n {\n $this->coneccion= new ConexionMYSQL();\n }", "public function __construct($db){\n $this->conn = $db;\n }", "public function __construct() {\n // Making a connection with the database\n $database = new Database();\n $this->conn = $database->getConnection();\n }", "public function __construct(){\n //autoloading\n $this->db = new \\Konekta();\n\n }", "function __construct(){\n $this->_db = (new DataBaseServices())->connect();\n }", "function __construct() {\n $connection= new Connection;\n $this->link = $connection->conect();\n }", "function __construct(){\n $this->open_db_connection();\n }", "function __construct() {\n require_once dirname(__FILE__) . '/DBConnect.php';\n\n //Creating a DbConnect object to connect to the database\n $db = new DbConnect();\n\n //Initializing our connection link of this class\n //by calling the method connect of DbConnect class\n $this->con = $db->connect();\n }", "public function __construct($db){ \n $this->conn = $db;\n }", "public function __construct($db){\r\n $this->conn = $db;\r\n\r\n\r\n\r\n }", "public function __construct() {\n $db = new Connection();\n $this->conn = $db->connect();\n }", "function __construct(){\n //call open connection\n $this->open_db_connection();\n\n }", "function __construct(){\n\t\t$this->open_db_connection();\n\t}", "function __construct(){\n $cls_conexion = new cls_conexion();\n $this->conexion = $cls_conexion->conectar();\n }", "function __construct() {\r\n include_once 'db_connect.php';\r\n // connecting to database\r\n $this->db = new DB_Connect();\r\n $this->con = $this->db->connect();\r\n }", "public function __construct()\n {\n $this -> connection = $this ->connecdatabase();\n }", "public function __construct()\n\t{\n\t\t$db = new DBclass();\n\t\t$this->_con = $db->con;\n\t}", "function __construct(){\n $this->open_connection();\n }", "private function __construct(){\n\t\t$this->connection = new Connection();\n\t\t$this->connection\n\t\t\t->setHost(Stack::getInstance()->get('db_host'))\n\t\t\t->setUser(Stack::getInstance()->get('db_user'))\n\t\t\t->setPassword(Stack::getInstance()->get('db_pass'))\n\t\t\t->setDatabase(Stack::getInstance()->get('db_table'))\n\t\t\t->connect();\n\t}", "public function __construct($conn) { \n $this->conn = $conn; \n }", "function __construct(){\n\t\t$this->conn = mysqli_connect($this->host, $this->uname, $this->pass, $this->db);//buatlah koneksi secara OOP\n\t\t\n\t}", "function __construct($conn){\n $this->conn = $conn;\n }", "public function __construct(){\n $this->db = new Base;\n }", "public function __construct() {\n $this->db = new Database();\n $this->con = $this->db->connect();\n }", "public function __construct(){\n $this->connect = new \\mysqli(DBAccess::DB_LOCATION, DBAccess::DB_USER, DBAccess::DB_PASS, self::DB_NAME);\n }", "function __construct(){\r\n $this->db=new ConnectDb();\r\n $this->connection=$this->db->open_connection();\r\n $this->db->setTable($this->tablename);\r\n}", "public function __construct(){\r\n \r\n try{\r\n $this->db = new Connect_Mysql();\r\n $this->con = $this->db->verbinden();\r\n \r\n \r\n }catch(PDOException $ex){\r\n \r\n print $ex;\r\n }\r\n \r\n }", "function __construct() {\r\r\n\r\r\n include_once './db_connect.php';\r\r\n // connecting to database\r\r\n $this->db = new DB_Connect();\r\r\n $GLOBALS['conn']=$this->db->connect();\r\r\n\r\r\n }", "function __constructor($conn){\n $this->db = $conn;\n }", "public function __construct($db){ \n $this->conn = $db;\n }", "public function __construct()\n {\n\n\n\n $this->db = Conectdb::conection();\n }", "public function __construct() {\n $this->connection = $this->create_connection();\n }", "public function __construct($db){\r\n $this->conn = $db;\r\n }", "function __construct(){\r\n\t\t\t$this->open_db_connection();\r\n\t\t}", "public function __construct(){\r\n $this->conexion = new Conexion();\r\n}", "public function __construct() {\n $bd = new ConexionBD();\n $this->conexion = $bd->getConexion(); \n }", "public function __construct(){\n\t\t$this->db = new \\Model\\dal();\n\t}", "public function __construct() {\n \trequire_once 'connection.php';\n\n $database = new Connection();\n\t\t$this->database = $database;\n }", "public function __construct() {\n $obj = new DB();\n $this->db = $obj->pdo;\n \n }", "public function __construct(){\n\t\t$this->con = new \\mysqli($this->datos['host'], $this->datos['user'], $this->datos['pass'], $this->datos['db']);\n\t}", "function __construct() {\r\n $instancia = Database::getInstance();\r\n\r\n $this->con = $instancia->getConexion();\r\n }", "function __construct() {\n $this->createConnection();\n }", "public function __constructor() {\n // $conn = new mysqli($HOST, $DBUSER, $DBPWD, $DBNAME);\n }", "public function __construct(){\n $this->db = new Base;\n }", "public function __construct(){\n\t\t\trequire_once(\"db/db.php\");\n\t\t\t$db = new DbConnect();\n\t\t\t$this->dbConn = $db->connect();\n\t\t}", "public function __construct(){\n $this->db = new DBConnector(\"localhost\", \"root\", \"\", \"cine\");\n }", "public function __construct(){\n $this->conn = new mysqli($this->servername, $this->username, $this->password, $this->database);\n }", "public function __construct(){\n\t\t\n /**\n *\tFind Database and Establish connection\n */\t\t\n\t\t$this->__CON = new mysqli($this->__HOSTNAME, $this->__USERNAME , $this->__PASSWORD , $this->__DATABASE , $this->__PORT); \n /**\n *\tError Message\n */\t\n\t\tif (mysqli_connect_errno()){die(mysqli_connect_error());}\n\n}", "public function __construct(){\n $this->db = new Database;\n }", "public function __construct() {\r\n $this->conn = PersistentManager::getInstance()->get_connection();\r\n }", "function __construct() {\r\n\t\t\t\r\n\t\t\t$this->con = new MySQLi('localhost',$this->username,$this->password,$this->db);\r\n\t\t\t\r\n\t}", "public function __construct() \n {\n $this->con();\n }", "public function __construct()\n {\n $this->_db = new \\DbHandler();\n }", "public function __construct($db){\r\n \t$this->conn = $db;\r\n }", "public function __construct($db){\r\n $this->conn = $db;\r\n }", "public function __construct($db){\r\n $this->conn = $db;\r\n }", "public function __construct($db){\r\n $this->conn = $db;\r\n }", "public function __construct($db){\r\n $this->conn = $db;\r\n }", "public function __construct($db){\r\n $this->conn = $db;\r\n }", "public function __construct($db){\r\n $this->conn = $db;\r\n }", "public function __construct($db){\r\n $this->conn = $db;\r\n }", "function __construct() {\r\n global $conn;\r\n $this->conn = $conn;\r\n }", "public function __construct($db)\n {\n $this->conn = $db;\n }", "function __construct($mysqli)\r\n {\r\n\r\n//klassi sees muutujua kasutamiseks $this->\r\n//this viitab sellele klassile\r\n $this->connection = $mysqli;\r\n\r\n }", "function __construct($db_conn)\n {\n $this->db = $db_conn;\n\n }" ]
[ "0.77710795", "0.77560544", "0.77087253", "0.77045643", "0.76372916", "0.75938994", "0.7547636", "0.7504854", "0.7504854", "0.7473856", "0.7472259", "0.74553835", "0.741988", "0.7375569", "0.7364077", "0.7346728", "0.7346728", "0.73274857", "0.73113567", "0.72998565", "0.72965205", "0.72914165", "0.7280685", "0.72795284", "0.72795284", "0.7275388", "0.726821", "0.7257035", "0.7255133", "0.7231103", "0.72285074", "0.72039247", "0.71829474", "0.7179796", "0.7169869", "0.71490836", "0.7145803", "0.71273726", "0.7124966", "0.7121636", "0.71209025", "0.7118741", "0.7117986", "0.71074986", "0.7093571", "0.7089058", "0.7065631", "0.7046153", "0.70433253", "0.70304173", "0.7027353", "0.701082", "0.7010628", "0.6984432", "0.69646156", "0.6962451", "0.69592535", "0.6953924", "0.69455934", "0.69375634", "0.6937433", "0.69276524", "0.69229686", "0.69148046", "0.6907463", "0.6904205", "0.6901215", "0.690098", "0.6899066", "0.68990165", "0.6894261", "0.68908745", "0.6888144", "0.6887251", "0.6882554", "0.68806845", "0.68795437", "0.68760717", "0.6875082", "0.68720996", "0.6861866", "0.6859611", "0.68583316", "0.68565613", "0.6855005", "0.6853857", "0.68505394", "0.68421066", "0.6833608", "0.6826861", "0.6826861", "0.6826861", "0.6826861", "0.6826861", "0.6826861", "0.6826861", "0.68267787", "0.68128145", "0.68092847", "0.6807898" ]
0.7664956
4
Create a new command instance.
public function __construct(Client $client) { parent::__construct(); $this->client = $client; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function newCommand() {\n return newinstance(Command::class, [], '{\n public static $wasRun= false;\n public function __construct() { self::$wasRun= false; }\n public function run() { self::$wasRun= true; }\n public function wasRun() { return self::$wasRun; }\n }');\n }", "public function createCommand()\r\n\t{\r\n\t\t$obj = new DbCommand($this,$this->dbms);\r\n\t\treturn $obj;\r\n\t}", "public function createCommand() {\n\t\treturn new UnboxedCommand( $this );\n\t}", "protected function createCommand($args) {\n $command = new Command();\n $command->id = ifseta($args, 'id');\n $command->name = ifseta($args, 'name');\n $command->url = ifseta($args, 'url');\n $command->description = ifseta($args, 'description');\n $command->uses = ifseta($args, 'uses');\n $command->creationDate = ifseta($args, 'creation_date');\n $command->lastUseDate = ifseta($args, 'last_use_date');\n $command->goldenEggDate = ifseta($args, 'golden_egg_date');\n return $command;\n }", "static public function create($cmd = null, $args = null)\n {\n return new self($cmd, $args);\n }", "public function createCommand($kernel, string $commandName = null, string $commandDescription = null): Command;", "public function makeCommand() \n {\n if($this->CrontabCommandObject === NULL)\n {\n $this->CrontabCommandObject = new \\root\\library\\Crontab\\CrontabCommand\\CrontabCommand();\n }\n \n return $this->CrontabCommandObject;\n }", "public function testInstantiation()\n {\n $command = new CreateRule('dummy name');\n }", "public function command(Command $command);", "public function __construct($command)\n {\n $this->command = $command;\n }", "public static function create(array $data)\n {\n $command = new static();\n $command->exchangeArray($data);\n return $command;\n }", "protected function getCreateCommand()\n {\n $command = new IndexCreateCommand();\n $command->setContainer($this->getContainer());\n\n return $command;\n }", "public function createCommand($string = '')\n {\n return $this->createStringable($string);\n }", "public function createCommand($type) {\r\n $command = $this->xml->createElement('command');\r\n $command->setAttribute('xsi:type', $type);\r\n $command->setAttribute('xmlns', '');\r\n $this->xmlSchema($command);\r\n return $command;\r\n }", "public function __construct()\n {\n // We will go ahead and set the name, description, and parameters on console\n // commands just to make things a little easier on the developer. This is\n // so they don't have to all be manually specified in the constructors.\n if (isset($this->signature)) {\n $this->configureUsingFluentDefinition();\n } else {\n parent::__construct($this->name);\n }\n\n // Once we have constructed the command, we'll set the description and other\n // related properties of the command. If a signature wasn't used to build\n // the command we'll set the arguments and the options on this command.\n $this->setDescription((string) $this->description);\n\n $this->setHelp((string) $this->help);\n\n $this->setHidden($this->isHidden());\n\n if (! isset($this->signature)) {\n $this->specifyParameters();\n }\n }", "public function make(string $name, PreprocessorInterface $preprocessor = null): CommandInterface;", "private function _getCommandByClassName($className)\n {\n return new $className;\n }", "public function newCommand($regex, $callable) {\n $cmd = new Command();\n $cmd->regex = $regex;\n $cmd->callable = $callable;\n return $this->addCommand($cmd);\n }", "public static function create($commandID, ...$args)\n {\n $arguments = func_get_args();\n\n return new static(array_shift($arguments), $arguments);\n }", "private function __construct($command = null)\n {\n $this->command = $command;\n }", "public static function factory(string $command, string $before = '', string $after = ''): self\n {\n return new self($command, $before, $after);\n }", "public function getCommand() {}", "protected function buildCommand()\n {\n $command = new Command(\\Tivie\\Command\\ESCAPE);\n $command\n ->chdir(realpath($this->repoDir))\n ->setCommand($this->gitDir)\n ->addArgument(new Argument('tag', null, null, false))\n ->addArgument(new Argument($this->tag, null, null, true));\n\n return $command;\n }", "public function testCanBeInstantiated()\n {\n $command = $this->createInstance();\n $this->assertInstanceOf('\\\\Dhii\\\\ShellInterop\\\\CommandInterface', $command, 'Command must be an interoperable command');\n $this->assertInstanceOf('\\\\Dhii\\\\ShellCommandInterop\\\\ConfigurableCommandInterface', $command, 'Command must be a configurable command');\n $this->assertInstanceOf('\\\\Dhii\\\\ShellCommandInterop\\\\MutableCommandInterface', $command, 'Command must be a mutable command');\n }", "public function getCommand();", "protected function createCommand($name, array $parameters = [])\n {\n return new Fluent(\n array_merge(\n compact('name'),\n $parameters)\n );\n }", "public function testCanPassCommandStringToConstructor()\n {\n $command = new Command('/bin/ls -l');\n\n $this->assertEquals('/bin/ls -l', $command->getExecCommand());\n }", "public function makeCommandInstanceByType(...$args): CommandInterface\n {\n $commandType = array_shift($args);\n\n switch ($commandType) {\n case self::PROGRAM_READ_MODEL_FETCH_ONE_COMMAND:\n return $this->makeFetchOneCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_FIND_COMMAND:\n return $this->makeFindCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_FIND_LITE_COMMAND:\n return $this->makeFindLiteCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_CREATE_TASK_COMMAND:\n return $this->makeItemCreateTaskCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_CREATE_COMMAND:\n return $this->makeItemCreateCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_UPDATE_TASK_COMMAND:\n return $this->makeItemUpdateTaskCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_UPDATE_COMMAND:\n return $this->makeItemUpdateCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_DELETE_TASK_COMMAND:\n return $this->makeItemDeleteTaskCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_DELETE_COMMAND:\n return $this->makeItemDeleteCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_ADD_ID_COMMAND:\n return $this->makeItemAddIdCommand(...$args);\n\n default:\n throw new FactoryException(sprintf('Command bus for type `%s` not found!', (string) $commandType));\n }\n }", "public function __construct($cmd)\n {\n $this->cmd = $cmd;\n }", "public function getCommand()\n {\n }", "public function command($class)\n {\n $runnable = $this->resolveClass($class);\n\n if ( ! $runnable instanceof Command) {\n throw new InvalidArgumentException(get_class($runnable).' must be an instance of '.Command::class.'.');\n }\n\n $command = $runnable;\n\n if ($runnable instanceof Taggable) {\n $command = new Cached($command, $this);\n }\n\n if ($runnable instanceof Transactional) {\n $command = new Transaction($command, $this, $this->makeFromContainer(ConnectionInterface::class));\n }\n\n if ($runnable instanceof Eventable) {\n $command = new Evented($command, $this);\n }\n\n return $this->newBuilder($command);\n }", "protected function createCommandFactory(): CommandFactory\n {\n return new CommandFactory([\n 'CLOSE' => Command\\CLOSE::class,\n ]);\n }", "public static function register() {\n\n if ( !defined( 'WP_CLI' ) || !WP_CLI ) {\n return;\n }\n \n $instance = new static;\n if(empty( $instance->namespace )) {\n throw new \\Exception(\"Command namespace not defined\", 1);\n \n }\n\t\t\\WP_CLI::add_command( $instance->namespace, $instance, $instance->args ?? null );\n\t}", "public function addCommand($command);", "public function add(Command $command);", "abstract protected function getCommand();", "public function createCommand()\r\n\t{\r\n\t\t//start the string\r\n\t\t$command = '';\r\n\t\t\r\n\t\t//add the java command or the path to java\r\n\t\t$command .= $this->java_path;\r\n\t\t\r\n\t\t//add the class path\r\n\t\t$command .= ' -cp \"'. $this->stanford_path . $this->seperator . '*\" ';\r\n\t\t\r\n\t\t//add options\r\n\t\t$options = implode(' ', $this->java_options);\r\n\t\t$command .= '-'.$options;\r\n\t\t\r\n\t\t//add the call to the pipeline object\r\n\t\t$command .= ' edu.stanford.nlp.pipeline.StanfordCoreNLP ';\r\n\r\n\t\t//add the annotators\r\n\t\t$command .= '-annotators '. $this->listAnnotators();\r\n\t\t\r\n\t\t//add the input and output directors\r\n\t\t$command .= ' -file '. $this->tmp_file . ' -outputDirectory '. $this->tmp_path;\r\n\t\t\r\n\t\t//this is for testing purposes\r\n\t\t//$command .= ' -file '. $this->tmp_path .'\\\\nlp3F25.tmp' . ' -outputDirectory '. $this->tmp_path;\r\n\t\t\r\n\t\t//if using regexner add this to the command string\r\n\t\tif($this->annotators['regexner'] === true)\r\n\t\t{\r\n\t\t\t$command .=' -regexner.mapping '. $this->regexner_path . $this->seperator . $this->regexner_file;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\treturn $command;\r\n\t}", "protected function createCommand(string $name, array $parameters = []): Fluent\n {\n return new Fluent(array_merge(compact('name'), $parameters));\n }", "public function __construct()\n {\n parent::__construct(static::NAME, static::VERSION);\n $this->add(new DefaultCommand());\n }", "public function __construct()\n {\n parent::__construct();\n\n $this->command_name = config(\"custom-commands.command_name\");\n\n parent::__construct($this->signature = $this->command_name);\n\n $this->commands = (array) config(\"custom-commands.commands\");\n \n $this->table = config(\"custom-commands.table\");\n\n $this->row = config(\"custom-commands.row\");\n\n $this->changeEnv = (boolean) config(\"custom-commands.change_env\");\n\n }", "protected function createCommandFile()\n {\n $command_file_full_path = $this->command_dir_path . DIRECTORY_SEPARATOR . $this->arg->getCommandFileName();\n\n // Check if the command already exists\n if (file_exists($command_file_full_path)) {\n throw new Exception('Command already exists.');\n }\n\n // Create the file for the new command\n $command_file = fopen($command_file_full_path, 'w');\n\n // TODO: Create Script Generator to generate the PHP scripts for the new command.\n\n fclose($command_file);\n\n $this->console->getOutput()->println('File created at: ' . $command_file_full_path);\n $this->console->getOutput()->success('Command ' . $this->arg->getSignature() . ' created successfully.');\n }", "public static function create() {}", "public static function create() {}", "public static function create() {}", "public static function create(InteropContainer $container)\n {\n $middleware = $container->get('cmd.middleware');\n return new CommandBusFactory($middleware);\n }", "private function createCli() {\n $this->cli = new Cli();\n $this->commands = $this->commandParser->getAllCommands();\n\n foreach ($this->commands as $command) {\n if ($command->isDefault()) {\n $this->cli->command(\"*\");\n foreach ($command->getOptions() as $option) {\n $this->cli->opt($option->getName(), $option->getDescription(), $option->isRequired(), $option->getType());\n }\n foreach ($command->getArguments() as $argument) {\n if (!$argument->isVariadic())\n $this->cli->arg($argument->getName(), $argument->getDescription(), $argument->isRequired());\n }\n }\n if ($command->getName() != \"\") {\n $this->cli->command($command->getName())->description($command->getDescription());\n foreach ($command->getOptions() as $option) {\n $this->cli->opt($option->getName(), $option->getDescription(), $option->isRequired(), $option->getType());\n }\n foreach ($command->getArguments() as $argument) {\n if (!$argument->isVariadic())\n $this->cli->arg($argument->getName(), $argument->getDescription(), $argument->isRequired());\n }\n }\n }\n\n\n }", "public function testInstantiation()\n {\n $this->assertInstanceOf('Contao\\ManagerBundle\\Command\\InstallWebDirCommand', $this->command);\n }", "public function command(string $command): self\n {\n $this->addCommands[] = $command;\n\n return $this;\n }", "public function create() {}", "protected function createProcess($cmd)\n {\n return new Process(explode(' ', $cmd));\n }", "public function create(){}", "protected function getCommandFactory(): Command\\Factory\n {\n return new Command\\RedisFactory();\n }", "public function __construct()\n {\n parent::__construct();\n\n $this->commandData = new CommandData($this, CommandData::$COMMAND_TYPE_API);\n }", "public function testNewCommand() : void\n {\n $this->assertFalse($this->command->hasArguments());\n $this->assertEquals(\"\", $this->command->getArguments());\n }", "protected function createCommandBuilder()\n\t{\n\t\treturn new CSqliteCommandBuilder($this);\n\t}", "public function __construct($command, $config = [])\n {\n $this->command = $command;\n $this->_output = $this->getDefaultOutput();\n parent::__construct($config);\n }", "public function __construct(){\n\n global $argv;\n\n if(!isset($argv[1])){\n echo 'You must supply a command!' . PHP_EOL;\n exit;\n }//if\n\n $args = $argv;\n\n $scriptName = array_shift($args);\n $method = array_shift($args);\n\n $method = explode('-',$method);\n foreach($method as $k => $v){\n if($k != 0){\n $method[$k] = ucwords($v);\n }//if\n }//foreach\n\n $method = implode('',$method);\n\n $resolved = false;\n\n if(method_exists($this,$method)){\n call_user_func(Array($this,$method), $args);\n $resolved = true;\n }//if\n else {\n foreach(static::$extendedCommands as $commandClass){\n if(method_exists($commandClass,$method)){\n call_user_func(Array($commandClass,$method), $args);\n $resolved = true;\n break;\n }//if\n }//foreach\n }//el\n\n if(!$resolved){\n echo \"`{$method}` is not a valid CLI command!\";\n }//if\n\n echo PHP_EOL;\n exit;\n\n }", "public function forCommand($command)\n {\n $this->command = $command;\n $this->pipe = new NullPipe();\n $this->manager = new InteractiveProcessManager($this->userInteraction);\n\n return $this;\n }", "public function __construct()\n {\n parent::__construct('pwman', '0.1.0');\n\n $getCommand = new Get();\n $this->add($getCommand);\n\n $setCommand = new Set();\n $this->add($setCommand);\n }", "public function create() {\n $class_name = $this->getOption('className');\n return new $class_name();\n }", "public function createCommand(?string $sql = null, array $params = []): Command;", "public function __construct($command = NULL, $name = NULL)\n {\n $args = func_get_args();\n\n switch ($command) {\n case self::CONSTR_CMD_POPULATE_SYNCED_ARRAY:\n case self::CONSTR_CMD_POP_FROM_ARR:\n case self::CONSTR_CMD_POP_FROM_OBJ:\n case self::CONSTR_CMD_POP_FROM_DB:\n case self::CONSTR_CMD_NEW:\n $this->setup_name = $name;\n\n # shift off known args\n array_shift($args);\n array_shift($args);\n break;\n }\n\n switch ($command) {\n case self::CONSTR_CMD_POP_FROM_ARR:\n $this->applyArray($args[0]);\n break;\n case self::CONSTR_CMD_POP_FROM_OBJ:\n break;\n case self::CONSTR_CMD_POP_FROM_DB:\n break;\n case self::CONSTR_CMD_POPULATE_SYNCED_ARRAY:\n $this->applyArray($args[0]);\n $this->setAllLoaded();\n break;\n default:\n throw new OrmInputException('Guessing not supported, please explicitly specify construction type');\n self::constructGuess($args);\n }\n\n $this->ensureObjectInDb();\n }", "public function generateCommands();", "protected function newInstanceCommand($commandClass)\n {\n $class = new ReflectionClass($commandClass);\n\n return $class->newInstanceArgs($this->resolveCommandParameters($class));\n }", "protected function buildCommand()\n {\n return $this->command;\n }", "public function makeItemCreateCommand(string $processUuid, array $item): ItemCreateCommand\n {\n $processUuid = ProcessUuid::fromNative($processUuid);\n $uuid = Uuid::fromNative(null);\n $item = Item::fromNative($item);\n\n return new ItemCreateCommand($processUuid, $uuid, $item);\n }", "public function __construct($commandName, $args = [], $description = '') {\n if (!$this->setName($commandName)) {\n $this->setName('--new-command');\n }\n $this->addArgs($args);\n\n if (!$this->setDescription($description)) {\n $this->setDescription('<NO DESCRIPTION>');\n }\n }", "public function getCommand($name, array $args = array())\n {\n return parent::getCommand($name, $args)\n ->setRequestSerializer(RequestSerializer::getInstance());\n }", "protected function buildCommand()\n {\n $command = new Command(\\Tivie\\Command\\DONT_ADD_SPACE_BEFORE_VALUE);\n $command\n ->chdir(realpath($this->repoDir))\n ->setCommand($this->gitDir)\n ->addArgument(new Argument('rev-parse'))\n ->addArgument(new Argument('HEAD'));\n\n return $command;\n }", "protected function instantiateCommand(Request $request, $args)\n {\n $command = new DeletePackageCustomerCommand($args);\n\n $requestBody = $request->getParsedBody();\n\n $this->setCommandFields($command, $requestBody);\n\n return $command;\n }", "public function createCommand($sql = null, $params = [])\n {\n $command = new Command([\n 'db' => $this,\n 'sql' => $sql,\n ]);\n\n return $command->bindValues($params);\n }", "protected function setCommand($value) {\n\t\t$this->_command = trim($value);\n\t\treturn $this;\n\t}", "public function setCommand($command)\n {\n $this->command = $command;\n\n return $this;\n }", "public function buildCommand()\n {\n return parent::buildCommand();\n }", "private function registerMakeModuleCommand()\n {\n $this->app->singleton('command.make.module', function($app) {\n return $app['Caffeinated\\Modules\\Console\\Generators\\MakeModuleCommand'];\n });\n\n $this->commands('command.make.module');\n }", "public function __construct()\n {\n parent::__construct();\n\n $this->currentDirectory = getcwd();\n $this->baseIndentLevel = 0;\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\HelpCommand\", \"help\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\InitializePlanetCommand\", \"init\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\PackAndPushUniToolCommand\", \"packpushuni\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\PackLightPluginCommand\", \"packlightmap\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\PushCommand\", \"push\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\PushUniverseSnapshotCommand\", \"pushuni\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\UpdateSubscriberDependenciesCommand\", \"updsd\");\n\n }", "public function getCommand(string $command);", "protected function registerCommand(){\n\t\t$this->app->singleton('fakeid.command.setup', function ($app){\n\t\t\treturn new SetupCommand();\n\t\t});\n\n\t\t$this->commands('fakeid.command.setup');\n\t}", "public function addCommand($command, $args = [], $data = [])\n {\n $item = new ScreenCommand();\n $item->screen_id = $this->id;\n $item->command = $command;\n $item->arguments = $args;\n $item->fill($data);\n $item->save();\n\n return $item;\n }", "public function test_creating_command_from_container()\n {\n $now = new \\DateTime();\n $this->container->add('DateTime', $now);\n $command = 'Spekkionu\\DomainDispatcher\\Test\\Commands\\CommandWithConstructor';\n $result = $this->dispatcher->dispatch($command);\n $this->assertSame($now, $result);\n }", "protected function createProcess(): Process\n {\n $command = [\n $this->settings['executable']\n ];\n\n $command[] = $this->from;\n $command[] = $this->to;\n\n // Set the margins if needed.\n if ($this->settings['marginsType'] !== self::MARGIN_TYPE_NO_MARGINS) {\n $command[] = '--marginsType=' . $this->settings['marginsType'];\n }\n\n // If we need to proxy with node we just need to prepend the $command with `node`.\n if ($this->settings['proxyWithNode']) {\n array_unshift($command, 'node');\n }\n\n // If there's no graphical environment we need to prepend the $command with `xvfb-run\n // --auto-servernum`.\n if (! $this->settings['graphicalEnvironment']) {\n array_unshift($command, '--auto-servernum');\n array_unshift($command, 'xvfb-run');\n }\n\n return new Process($command);\n }", "private function registerCommand()\n {\n $this->app->singleton('command.shenma.push', function () {\n return new \\Larva\\Shenma\\Push\\Commands\\Push();\n });\n\n $this->app->singleton('command.shenma.push.retry', function () {\n return new \\Larva\\Shenma\\Push\\Commands\\PushRetry();\n });\n }", "public function __construct(string $command, string $before = '', string $after = '')\n {\n $this->command = $command;\n $this->before = $before;\n $this->after = $after;\n }", "public function generateCommand($singleCommandDefinition);", "public function create() {\n }", "public function create() {\n }", "public function create() {\r\n }", "public function create() {\n\n\t}", "private function getImportCommand()\n {\n return new IndexImportCommand(self::getContainer());\n }", "public function __construct($command)\n {\n $this->command = $command;\n\n $this->command->line('Installing Images: <info>✔</info>');\n }", "public function __construct()\n {\n self::$instance =& $this;\n\n $commanddir = Config::main('directory');\n $excludes = Config::main('exclude');\n\n if(is_null($commanddir))\n die('Could not find commands directory. It should be specified in the main config.');\n\n //The directory where commands reside should be relative\n //to the directory with the clip executable.\n $dir = realpath(__DIR__.\"/{$commanddir}\");\n\n $cmdfiles = scandir($dir);\n //Loop through each file in the commands directory\n foreach($cmdfiles as $file)\n {\n //Assume that each file uses the standard '.php' file extension.\n $command = substr($file, 0, -4);\n\n //Ignore the unnecessary directories as commands and anything that\n //has been marked for exclusion then attempt to include the valid ones.\n if($file !== '.' && $file !== '..' && array_search($command, $excludes) === false && include(\"{$dir}/{$file}\"))\n {\n if(class_exists($command, false))\n {\n $obj = new $command;\n //Only load commands that use the clip command interface\n if($obj instanceof Command)\n $this->commands[strtolower($command)] = $obj;\n }\n }\n }\n }", "public function __construct($action, $command = null) {\n parent::__construct($action, self::NAME);\n\n $fieldFactory = FieldFactory::getInstance();\n\n $commandField = $fieldFactory->createField(FieldFactory::TYPE_STRING, self::FIELD_COMMAND, $command);\n\n $this->addField($commandField);\n }", "public function createCommand($db = null, $action = 'get')\n {\n if ($db === null) {\n $db = Yii::$app->get(Connection::getDriverName());\n }\n $this->addAction($action);\n $commandConfig = $db->getQueryBuilder()->build($this);\n\n return $db->createCommand($commandConfig);\n }", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();", "public function create();" ]
[ "0.8010746", "0.7333379", "0.72606754", "0.7164165", "0.716004", "0.7137585", "0.6748632", "0.67234164", "0.67178184", "0.6697025", "0.6677973", "0.66454077", "0.65622073", "0.65437883", "0.64838654", "0.64696646", "0.64292693", "0.6382209", "0.6378306", "0.63773245", "0.6315901", "0.6248427", "0.6241929", "0.6194334", "0.6081284", "0.6075819", "0.6069913", "0.60685146", "0.6055616", "0.6027874", "0.60132784", "0.60118896", "0.6011778", "0.5969603", "0.59618074", "0.5954538", "0.59404427", "0.59388787", "0.5929363", "0.5910562", "0.590651", "0.589658", "0.589658", "0.589658", "0.58692765", "0.58665586", "0.5866528", "0.58663124", "0.5852474", "0.5852405", "0.58442044", "0.58391577", "0.58154446", "0.58055794", "0.5795853", "0.5780188", "0.57653266", "0.57640004", "0.57584697", "0.575748", "0.5742612", "0.5739361", "0.5732979", "0.572247", "0.5701043", "0.5686879", "0.5685233", "0.56819254", "0.5675983", "0.56670785", "0.56606543", "0.5659307", "0.56567776", "0.56534046", "0.56343585", "0.56290466", "0.5626615", "0.56255764", "0.5608852", "0.5608026", "0.56063116", "0.56026554", "0.5599553", "0.5599351", "0.55640906", "0.55640906", "0.5561977", "0.5559745", "0.5555084", "0.5551485", "0.5544597", "0.55397296", "0.5529626", "0.552908", "0.552908", "0.552908", "0.552908", "0.552908", "0.552908", "0.552908", "0.552908" ]
0.0
-1
used to search for content
function contentSearch(&$searchObj, &$searchResObj) { try { $pdo = new PDO(DBCONNSTRING, DBUSER,DBPASS); $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $sql = "SELECT Title, Message, PostID FROM travelpost WHERE Message LIKE '%$searchObj->searchField%'"; $result = $pdo->query($sql); $count = 0; while ($row = $result->fetch()) { $searchResObj[$count] = new searchResult(); $searchResObj[$count]->searchTitle = $row['Title']; $searchResObj[$count]->searchMessage = $row['Message']; $searchResObj[$count]->searchPostID = $row['PostID']; $count++; } } catch (PDOexception $e) { ERROR_PAGE(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function searchSubContent()\n {\n # Set tables to search to a variable.\n $tables = $this->getTables();\n # Set fields to search to a variable.\n $fields = $this->getFields();\n # Set branch to search to a variable.\n $branch = $this->getSearchBranch();\n # Set search terms to a variable.\n $search_terms = $this->getSearchTerms();\n # Perform search.\n $this->performSearch($search_terms, $tables, $fields, $branch);\n }", "function ccontent_search()\n\t{\n\t\t$post_data = linput_post();\n\t\t$table = llang_table('content');\n\t\t$cols = array('body', 'name');\n\t\t$keywords = $post_data['keywords'];\n\n\t\tif (strlen($keywords) >= 3)\n\t\t{\n\t\t\t$data['content'] = lcrud_search($table, $cols, $keywords, 'AND `published`=\\'1\\' ORDER BY `updated` DESC');\n\n\t\t\tfor ($i = 0; $i < count($data['content']); $i++)\n\t\t\t{\n\t\t\t\t$data['content'][$i]['title'] = $data['content'][$i]['name'];\n\t\t\t\t$data['content'][$i]['link'] = mcategories_read_path($data['content'][$i]['link'], false);\n\t\t\t}\n\n\t\t\tif (!count($data['content'])) hmessage_set(l('No results.'));\n\n\t\t\tlloader_load_view('search', $data);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$data['content'] = array();\n\t\t\thmessage_set(l('Keyword must be at least 3 characters long'));\n\t\t\tlloader_load_view('search', $data);\n\t\t}\n\t}", "function search() {}", "function testFindSearchcontentSco() {\n\t}", "public function searchContent($param=\"\")\n\t\t{\n\t\t\t$paths = array();\n\n\t\t\tif (strlen($param) > 1)\n\t\t\t{\n\t\t\t\t/*\n\t\t\t\t*\tprep search space\n\t\t\t\t*/\n\n\t\t\t\t$this->loadFilesSystem();\n\n\t\t\t\t/*\n\t\t\t\t*\treceing params and making sure its not sql injectable\n\t\t\t\t*/\n\n\t\t\t\t$param = strtolower(mysqli_escape_string($this->bridge->getConnection(), $param));\n\n\t\t\t\t$query = \"SELECT c.id, c.contentName, c.contentContainer, ct.extension FROM content c, contentType ct WHERE c.contentTypeID = ct.id AND (c.contentName LIKE '%$param%' OR ct.extension LIKE '%$param%')\";\n\t\t\t\t$payLoad = $this->bridge->packData($query);\n\t\t\t\t#var_dump($payLoad);\n\t\t\t\t\n\t\t\t\tforeach ($payLoad as $key => $value)\n\t\t\t\t{\n\t\t\t\t\t$id = $value['id'];\n\t\t\t\t\t$name = $value['contentName'];\n\t\t\t\t\t$container = $value['contentContainer'];\n\t\t\t\t\t$extension = $value['extension'];\n\n\t\t\t\t\t/*\n\t\t\t\t\t*\tadding extension for files\n\t\t\t\t\t*/\n\n\t\t\t\t\tif ($extension != \"_\")\n\t\t\t\t\t{\n\t\t\t\t\t\t$name = $name.\".$extension\";\n\t\t\t\t\t}\n\n\t\t\t\t\t/*\n\t\t\t\t\t*\tconstracting path\n\t\t\t\t\t*/\n\n\t\t\t\t\t$paths[$id] = $name;\n\n\t\t\t\t\t/*\n\t\t\t\t\t*\tbacktrack\n\t\t\t\t\t*/\n\t\t\t\t\t$term = False;\n\n\t\t\t\t\twhile($term == False)\n\t\t\t\t\t{\n\t\t\t\t\t\tforeach ($this->content as $keyy => $valuee)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$idTmp = $valuee['id'];\n\t\t\t\t\t\t\t$nameTmp = $valuee['contentName'];\n\t\t\t\t\t\t\t$containerTmp = $valuee['contentContainer'];\n\t\t\t\t\t\t\t$extensionTmp = $valuee['extension'];\n\n\t\t\t\t\t\t\tif ($idTmp == $container)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$id = $value['id'];\n\t\t\t\t\t\t\t\t$name = $nameTmp;\n\t\t\t\t\t\t\t\t$container = $containerTmp;\n\t\t\t\t\t\t\t\t$extension = $extensionTmp;\n\n\t\t\t\t\t\t\t\tif ($containerTmp == 0)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$term = True;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif (isset($paths[$id]))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$paths[$id] = \"$name\\\\\".$paths[$id];\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t#var_dump($paths);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $paths;\n\t\t}", "function test_general_entries_search_on_post_content() {\n\t\t$search_string = 'Different';\n\t\t$items = self::generate_and_run_search_query( 'create-a-post', $search_string );\n\t\t$msg = 'A general search for ' . $search_string . ' in posts table';\n\t\tself::run_entries_found_tests( $msg, $items, 1, array( 'post-entry-2' ) );\n\t}", "public function search();", "public function search();", "public function search(){}", "public function search()\n\t{\n\t\t\n\t}", "function search()\n\t{}", "function search()\n\t{}", "function find($text, $content = false)\r\n{\r\n $org_content = $content;\r\n if ($content===false)\r\n $content = g('html');\r\n $x=strpos($content,$text);\r\n $r=($x!==false);\r\n\r\n if (DEV)\r\n xlogc('find', $r, $text, $org_content);\r\n return $r;\r\n}", "public function find();", "function listContent()\n {\n }", "public function getSearchableContent()\n\t{\n\t\treturn [\n\t\t\t$this->Title,\n\t\t\t$this->Content\n\t\t];\n\t}", "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}", "abstract public function hasContent();", "public final function get_content()\n {\n }", "public final function get_content()\n {\n }", "public final function get_content()\n {\n }", "public function hasContent() {}", "private function getContentList(){\n if(isset($_GET['content_search']) && strlen($_GET['content_search']) > 0){\n $searchstring = $this->setSearchstring();\n };\n\n //Set per page cookie\n if(isset($_GET['limit'])){\n $this->setPerPage(intval($_GET['limit']));\n }else if($_COOKIE[$this->main->module_mode.'_list_per_page_limit']){\n $this->per_page = intval($_COOKIE[$this->main->module_mode.'_list_per_page_limit']);\n };\n\n $this->main->current_per_page = $this->per_page;\n\n if(strlen($searchstring) > 0){\n $where = \" WHERE \".$searchstring;\n };\n\n $counter_query = \"\n SELECT\n count(*) AS `count`\n FROM\n `\".$this->main->db->quote($this->current_module_table).\"`\n \";\n\n $counter_result = mysql_fetch_row($this->main->db->query($counter_query));\n $limit = $this->main->getLimitsForList($counter_result[0], $this->per_page);\n \n $query = \"\n SELECT\n `id`,\n `name`,\n `publish`,\n `sort`\n \".$this->getAdditionalListFields().\"\n FROM\n `\".$this->main->db->quote($this->current_module_table).\"`\n \".$where.$this->main->getSortingParams().\"\n LIMIT\n \".$limit[0].\", \".$limit[1];\n\n return $this->main->db->assocMulti($query);\n }", "function search($query) {\n $query = Sanitize::escape($query);\n \t$fields = null;\n \t$titleResults = $this->find(\n\t\t\t'all',\n\t\t\tarray(\n\t\t\t\t'conditions' => \"{$this->name}.title LIKE '%$query%' and {$this->name}.draft=0\",\n\t\t\t\t'fields' => $fields\n\t\t\t)\n\t\t);\n \t$contentResults = array();\n \tif (empty($titleResults)) {\n \t\t$titleResults = array();\n\t\t\t$contentResults = $this->find(\n\t\t\t\t'all',\n\t\t\t\tarray(\n\t\t\t\t\t'conditions' => \"MATCH ({$this->name}.content) AGAINST ('$query')\",\n\t\t\t\t\t'fields' => $fields\n\t\t\t\t)\n\t\t\t);\n \t} else {\n \t\t$alredyFoundIds = join(', ', Set::extract($titleResults, '{n}.' . $this->name . '.id'));\n \t\t$notInQueryPart = '';\n \t\tif (!empty($alredyFoundIds)) {\n \t\t\t$notInQueryPart = \" AND {$this->name}.id NOT IN ($alredyFoundIds) AND {$this->name}.draft=0\";\n \t\t}\n \t\t$contentResults = $this->find(\n\t\t\t\t'all',\n\t\t\t\tarray(\n\t\t\t\t\t'conditions' => \"MATCH ({$this->name}.content) AGAINST ('$query')$notInQueryPart\",\n\t\t\t\t\t'fields' => $fields\n\t\t\t\t)\n\t\t\t);\n \t}\n \t\n \tif (!is_array(($contentResults))) {\n \t\t$contentResults = array();\n \t}\n \n \t$results = array_merge($titleResults, $contentResults);\n \treturn $results;\n }", "abstract protected function content();", "public function content();", "function _oembed_filter_feed_content($content)\n {\n }", "function getContent() ;", "public abstract function find();", "function getArticleList($search_content, $nbArticles) {\r\n $query1 = createQuery($search_content, '%20');\r\n $query2 = 'http://lemoteur.orange.fr/?module=lemoteur&bhv=actu&kw='.$query1;\r\n // The DOM variable contains the DOM of the search result\r\n $dom = getPageContent($query2);\r\n\r\n $articles = array();\r\n $cursor = 0;\r\n foreach ($dom->find('div.entry') as $articleContent) {\r\n $articleText = $articleContent->plaintext;\r\n $articleLink = $articleContent->find('a')[0];\r\n $articleTitle = $articleLink->plaintext;\r\n $articleUrl = $articleContent->find('a')[0]->href;\r\n\r\n $articleArray = [\r\n \"text\" => $articleText,\r\n \"link\" => $articleLink,\r\n \"title\" => $articleTitle,\r\n \"url\" => $articleUrl,\r\n ];\r\n\r\n array_push($articles, $articleArray);\r\n $cursor++;\r\n if ($cursor > $nbArticles) {\r\n break;\r\n }\r\n }\r\n\r\n return $articles;\r\n\r\n}", "abstract function getContent();", "public function listContent() {\n\n\t\ttry {\n\n\t\t\t$search_content_type_id = Request::input('search_content_type_id');\n\n\t\t\tif ($search_content_type_id == ContentType::GetClientInfoContentTypeID()) {\n\t\t\t\treturn $this->listClients();\n\t\t\t}\n\n\t\t\t$contents = ConnectContent::where('station_id', '=', \\Auth::User()->station->id)->where('content_type_id', '=', $search_content_type_id)->where('is_temp', '=', 0);\n\n\t\t\t$search_content_sub_type_id = Request::input('search_content_sub_type_id');\n\t\t\t$search_content_rec_type = Request::input('search_content_rec_type');\n\t\t\t$search_ad_length = Request::input('search_ad_length');\n\t\t\t$search_atb_date = Request::input('search_atb_date');\n\t\t\t$search_line_number = Request::input('search_line_number');\n\t\t\t$search_start_date = Request::input('search_start_date');\n\t\t\t$search_end_date = Request::input('search_end_date');\n\t\t\t$search_ad_key = Request::input('search_ad_key');\n\t\t\t$search_ad_key = cleanupAdKey($search_ad_key);\n\n\t\t\t$search_manager_user_id = Request::input('search_manager_user_id');\n\t\t\t$search_agency_id = Request::input('search_agency_id');\n\t\t\t$search_content_client = Request::input('search_content_client');\n\t\t\t$search_content_product = Request::input('search_content_product');\n\t\t\t$search_created_date = Request::input('search_created_date');\n\n\t\t\t$search_content_version = Request::input('search_content_version');\n\n\t\t\t$search_session_name = Request::input('search_session_name');\n\t\t\t$search_start_time = Request::input('search_start_time');\n\t\t\t$search_end_time = Request::input('search_end_time');\n\t\t\t$search_content_weekdays = Request::input('search_content_weekdays');\n\t\t\t$search_content_who = Request::input('search_content_who');\n\t\t\t$search_content_what = Request::input('search_content_what');\n\n\t\t\tif ($search_content_type_id == ContentType::GetTalkContentTypeID()) {\n\n\t\t\t\tif (!empty($search_session_name)) {\n\t\t\t\t\t$contents = $contents->where('session_name', '=', $search_session_name);\n\t\t\t\t}\n\n\t\t\t\tif (!empty($search_start_time)) {\n\t\t\t\t\t$contents = $contents->where('start_time', '=', $search_start_time . ':00');\n\t\t\t\t}\n\n\t\t\t\tif (!empty($search_end_time)) {\n\t\t\t\t\t$contents = $contents->where('end_time', '=', $search_end_time . ':00');\n\t\t\t\t}\n\n\t\t\t\tif (!empty($search_content_who)) {\n\t\t\t\t\t$contents = $contents->where('who', '=', $search_content_who);\n\t\t\t\t}\n\n\t\t\t\tif (!empty($search_content_what)) {\n\t\t\t\t\t$contents = $contents->where('what', '=', $search_content_what);\n\t\t\t\t}\n\n\t\t\t\tif (!empty($search_content_weekdays)) {\n\t\t\t\t\t$whereRaw = '';\n\t\t\t\t\tforeach($search_content_weekdays as $key => $val) {\n\t\t\t\t\t\t$val = $val == 'false' ? false : true;\n\t\t\t\t\t\tif ($val) {\n\t\t\t\t\t\t\tif ($whereRaw != '') $whereRaw .= ' OR ';\n\t\t\t\t\t\t\t$whereRaw .= 'content_weekday_' . $key . '=1';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t/*if ($whereRaw == '') {\n\t\t\t\t\t\tfor ($i = 0; $i < 7; $i++) {\n\t\t\t\t\t\t\tif ($whereRaw != '') $whereRaw .= ' AND ';\n\t\t\t\t\t\t\t$whereRaw .= 'content_weekday_' . $i . '=0';\n\t\t\t\t\t\t}\n\t\t\t\t\t}*/\n\n\t\t\t\t\tif ($whereRaw != '') {\n\t\t\t\t\t\t$contents = $contents->whereRaw('(' . $whereRaw . ')');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!empty($search_content_sub_type_id)) {\n\t\t\t\t$contents = $contents->where('content_subtype_id', '=', $search_content_sub_type_id);\n\t\t\t}\n\n\n\t\t\tif (!empty($search_content_rec_type)) {\n\t\t\t\t$contents = $contents->where('content_rec_type', '=', $search_content_rec_type);\n\t\t\t}\n\n\t\t\tif (!empty($search_ad_length)) {\n\t\t\t\t$contents = $contents->where('ad_length', '=', $search_ad_length);\n\t\t\t}\n\n\t\t\tif (!empty($search_atb_date)) {\n\t\t\t\t$contents = $contents->where('atb_date', '=', $search_atb_date);\n\t\t\t}\n\n\t\t\tif (!empty($search_line_number)) {\n\t\t\t\t$contents = $contents->where('content_line_number', '=', $search_line_number);\n\t\t\t}\n\n\t\t\t/*if (!empty($search_start_date)) {\n\t\t\t\t$contents = $contents->where('start_date', '=', parseDateToMySqlFormat($search_start_date));\n\t\t\t}\n\t\t\t\n\t\t\tif (!empty($search_end_date)) {\n\t\t\t\t$contents = $contents->where('end_date', '=', parseDateToMySqlFormat($search_end_date));\n\t\t\t}*/\n\n\t\t\tif (!empty($search_start_date)) {\n\t\t\t\tif ($search_content_type_id == ContentType::GetTalkContentTypeID()) {\n\t\t\t\t\t$contents = $contents->where('start_date', '=', parseDateToMySqlFormat($search_start_date));\n\t\t\t\t} else {\n\t\t\t\t\t$contents = $contents->whereHas('contentDates', function($q) use ($search_start_date) {\n\t\t\t\t\t\t$q->where('start_date', '=', parseDateToMySqlFormat($search_start_date));\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!empty($search_end_date)) {\n\t\t\t\tif ($search_content_type_id == ContentType::GetTalkContentTypeID()) {\n\t\t\t\t\t$contents = $contents->where('end_date', '=', parseDateToMySqlFormat($search_end_date));\n\t\t\t\t} else {\n\t\t\t\t\t$contents = $contents->whereHas('contentDates', function($q) use ($search_end_date) {\n\t\t\t\t\t\t$q->where('end_date', '=', parseDateToMySqlFormat($search_end_date));\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t\tif (!empty($search_ad_key)) {\n\t\t\t\t$contents = $contents->where('ad_key', '=', $search_ad_key);\n\t\t\t}\n\n\t\t\tif (!empty($search_manager_user_id)) {\n\t\t\t\t$contents = $contents->where('content_manager_user_id', '=', $search_manager_user_id);\n\t\t\t}\n\n\t\t\tif (!empty($search_agency_id)) {\n\t\t\t\t$contents = $contents->where('content_agency_id', '=', $search_agency_id);\n\t\t\t}\n\n\t\t\tif (!empty($search_content_client)) {\n\t\t\t\t$contents = $contents->whereHas('contentClient', function($q){\n\t\t\t\t\t$q->where('client_name', '=', Request::input('search_content_client'));\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (!empty($search_content_product)) {\n\t\t\t\t$contents = $contents->whereHas('contentProduct', function($q){\n\t\t\t\t\t$q->where('product_name', '=', Request::input('search_content_product'));\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (!empty($search_created_date)) {\n\t\t\t\t$search_created_date = parseDateToMySqlFormat($search_created_date);\n\t\t\t\t$contents = $contents->where('created_at', '>=', $search_created_date . ' 00:00:00')\n\t\t\t\t\t->where('created_at', '<=', $search_created_date . ' 23:59:59');\n\t\t\t}\n\n\t\t\tif (!empty($search_content_version)) {\n\t\t\t\t$contents = $contents->where('content_version', '=', $search_content_version);\n\t\t\t}\n\n\n\t\t\tif ($search_content_type_id == ContentType::findContentTypeIDByName('Material Instruction')) {\n\t\t\t\t$contents = $contents->with('contentClient')->with('contentProduct')->get();\n\t\t\t} else if ($search_content_type_id == ContentType::findContentTypeIDByName('Ad')) {\n\t\t\t\t$contents = $contents->with('contentDates')->get();\n\t\t\t} else {\n\t\t\t\t$contents = $contents->get();\n\t\t\t}\n\n\n\n\t\t\t$resultData = array();\n\n\t\t\tforeach ($contents as $content) {\n\n\t\t\t\t//if (!empty($content->content_parent_id)) continue;\n\n\t\t\t\t$newRow = array();\n\n\t\t\t\t/*$newRow['start'] = empty($content->start_date) ? '' : date(\"d-M\", strtotime($content->start_date));\n\t\t\t\t$newRow['end'] = empty($content->end_date) ? '' : date(\"d-M\", strtotime($content->end_date));*/\n\n\t\t\t\tif ($content->contentDates) {\n\t\t\t\t\t$startDateHTML = '';\n\t\t\t\t\t$endDateHTML = '';\n\t\t\t\t\tforeach ($content->contentDates as $content_date) {\n\t\t\t\t\t\t$startDateHTML .= date(\"d-M\", strtotime($content_date->start_date)) . '<br/>';\n\t\t\t\t\t\t$endDateHTML .= date(\"d-M\", strtotime($content_date->end_date)) . '<br/>';\n\t\t\t\t\t}\n\t\t\t\t\t$newRow['start'] = $startDateHTML;\n\t\t\t\t\t$newRow['end'] = $endDateHTML;\n\t\t\t\t} else {\n\t\t\t\t\t$newRow['start'] = '';\n\t\t\t\t\t$newRow['end'] = '';\n\t\t\t\t}\n\n\n\t\t\t\t//$newRow['type'] = empty(ContentType::$CONTENT_TYPES[$content->content_type_id]) ? '' : ContentType::$CONTENT_TYPES[$content->content_type_id];\n\n\t\t\t\t$newRow['type'] = (empty(ContentType::$CONTENT_SUB_TYPES[$content->content_type_id]) || empty(ContentType::$CONTENT_SUB_TYPES[$content->content_type_id][$content->content_subtype_id])) ? '' : ContentType::$CONTENT_SUB_TYPES[$content->content_type_id][$content->content_subtype_id];\n\n\t\t\t\t$newRow['content_rec_type'] = empty(ConnectContent::$CONTENT_REC_TYPE_LIST[$content->content_rec_type]) ? '' : ConnectContent::$CONTENT_REC_TYPE_LIST[$content->content_rec_type];\n\t\t\t\t$newRow['who'] = '<div class=\"twoline-ellipse\">' . $content->who . '</div>';\n\t\t\t\t$newRow['what'] = '<div class=\"twoline-ellipse\">' .$content->what . '</div>';\n\t\t\t\t$newRow['key'] = $content->ad_key;\n\t\t\t\t$newRow['duration'] = $content->ad_length;\n\n\t\t\t\t$newRow['audio_enabled'] = getEnabledSymbolHTML($content->audio_enabled);\n\t\t\t\t$newRow['text_enabled'] = getEnabledSymbolHTML($content->text_enabled);\n\t\t\t\t$newRow['image_enabled'] = getEnabledSymbolHTML($content->image_enabled);\n\t\t\t\t$newRow['action_enabled'] = getEnabledSymbolHTML($content->action_enabled);\n\t\t\t\t$newRow['is_ready'] = getCheckEnabledSymbolHTML($content->is_ready, $content->id);\n\n\t\t\t\tif ($search_content_type_id == ContentType::findContentTypeIDByName('Material Instruction')) {\n\n\t\t\t\t\t$newRow['client'] = empty($content->contentClient) ? '' : $content->contentClient->client_name;\n\t\t\t\t\t$newRow['product'] = empty($content->contentProduct) ? '' : $content->contentProduct->product_name;\n\n\t\t\t\t\t$newRow['atb_date'] = $content->atb_date;\n\t\t\t\t\t$newRow['line_number'] = $content->content_line_number;\n\t\t\t\t\t$newRow['created'] = date(\"d-M H:i\", strtotime($content->created_at));\n\n\t\t\t\t\t$newRow['version'] = ConnectContent::GetContentVersionString($content->content_version);\n\t\t\t\t}\n\n\t\t\t\t$newRow['start_time'] = $content->start_time;\n\t\t\t\t$newRow['end_time'] = $content->end_time;\n\n\t\t\t\t$resultData[] = $newRow;\n\n\t\t\t}\n\n\t\t\treturn response()->json(array('data' => $resultData));\n\n\t\t} catch (\\Exception $ex) {\n\t\t\t\\Log::error($ex);\n\t\t\treturn response()->json(array('data' => array()));\n\t\t}\n\n\t}", "private function setSearchstring(){\n $search_req = $this->main->getArrayFromSearchString($_GET['content_search']);\n\n $searchstring = '';\n\n foreach($search_req as $key => $val){\n if(strlen($val) > 0){\n $searchstring .= \"`name` LIKE '%\".DB::quote($val).\"%' OR \";\n };\n };\n\n $searchstring .= \"`name` LIKE '%\".DB::quote($_GET['content_search']).\"%'\";\n\n return $searchstring;\n }", "function render_block_core_search($attributes, $content, $block)\n {\n }", "public function indexTypo3PageContent() {}", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent();", "public function getContent();", "public function contents();", "public function getSearchText();", "function find( $searchString )\n\t{\n\t\t$this->data['pagebody'] = 'searchResult'; // this is the view we want shown\n\t\t$this->data['searchString'] = $searchString;\n\t\t\n $this->render();\n\t}", "function bb_search_wp($q ) {\r\n\t\r\n\tglobal $wp_posts,$bbdb, $bb;\r\n\t\r\n\tif ($bb->wp_table_prefix)\t$wp_posts = $bbdb->get_results(\"SELECT * FROM \" . $bb->wp_table_prefix . \"posts WHERE (post_title LIKE '%$q%') OR (post_content LIKE '%$q%')\");\r\n\t\t\r\n}", "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 search()\n {\n\n }", "public function search()\n {\n\n }", "public function getSearch();", "function getcontents($what, $from, $id, $page=1, $extra='', $canurl=''){\n\t\t\t\t\t//what: all, stories, comments, tags, summary, instructorsummary, studentsummary, classes\n\t\t\t\t\t//from: search, self, feed, classes, class, following, user, storyname, storyid, comment, frontpage, submissions\n\t//hidden filtering will remove stories from feed, self, user, following, frontpage, and submissions\n\t\t//The hidden filter is not applied to classes, or class data when requested outside of a feed\n\t//This way stories will show up on students pages even if hidden so you can hide students work from your feed but find it later\n\t//check to see that the identifier is valid and return the mysql escaped version if it is\n\tif($from=='submissions' || $from=='frontpage' || $from=='search')$temparr = array('id'=>$id, 'user'=>$id);\n\telseif($what=='vote') $temparr = array('id'=>$id, 'user'=>$page);//vote is special page holds the requesters userid\n\telse $temparr = checkcontentid($from, $id);\n\t//$thetarr=var_export($temparr, TRUE);\n\tif(!$temparr)return FALSE;\n\t$id=$temparr['ID'];\n\t$rid=$temparr['user'];\n\t$role='';\n\t$mid='';\n\tif($from=='class'){\n\t\t$role=$temparr['role'];\n\t\tif($role!='instructor' && $role!='student') return FALSE;\n\t\telseif($role=='student' && $from=='class') $mid=$temparr['MID'];\n\t}\n\tif($from=='storylink' || $from=='storyid')$from='story';//checkcontentid returned ids for both, so we can collapse the difference\n\t$hasclasses=($_SESSION['IsInstructor']==1)? 1 : 0;\n\t$inclasses=($_SESSION['IsStudent']==1)? 1 : 0;\n\t$isfollowing=($_SESSION['IsFollowing']==1)? 1 : 0;\n\t\n\t//echo \"<p>After getting the temparr the id is $id rid is $rid role is $role and mid is $mid.</p>\";\n\t\n\t$limit=($from=='search')? 30 : 15;//limit number of stories on a page make sure this is the same as in format contents\n\t$offset=$limit++*($page-1);//will get the appropriate offset and get us one more than we wanted so we can check for pagination\n\t\n\tif($from=='feed'){//see if we have followers or classes to get\n\t\tif($what=='all' || $what=='stories'){\n\t\t\t$cols='SID, STime';\n\t\t\t$chunk=unionwrapper($cols, getCIDs('stories', 'feed', $id));\n\t\t\tif($isfollowing)$chunk=\"$chunk UNION \".unionwrapper($cols, getCIDs('stories', 'following', $id));\n\t\t\tif($hasclasses)$chunk=\"$chunk UNION \".unionwrapper($cols, getCIDs('stories', 'classes', $id));\n\t\t\tif($isfollowing && $hasclasses) $chunk=unionwrapper($cols, $chunk, '', 'SID');//group by SID to remove duplicates\n\t\t\tif($what=='all')$storieschunk=$chunk;\n\t\t\telse{//wrap hidden stories if this is all we're getting\n\t\t\t\tif($rid){\n\t\t\t\t\tif($extra=='show')$chunk=hiddenwrapper($chunk, $rid, 'show', 'stories');\n\t\t\t\t\telse $chunk=hiddenwrapper($chunk, $rid, 'hide', 'stories');\n\t\t\t\t}\n\t\t\t\t$allchunk=$chunk;\n\t\t\t}\n\t\t}//end getting stories\n\t\tif($what=='all' || $what=='comments'){\n\t\t\t$cols='SID, STime, CID';\n\t\t\t$chunk=unionwrapper($cols, getCIDs('comments', 'feed', $id));\n\t\t\tif($isfollowing)$chunk=\"$chunk UNION \".unionwrapper($cols, getCIDs('comments', 'following', $id));\n\t\t\tif($hasclasses)$chunk=\"$chunk UNION \".unionwrapper($cols, getCIDs('comments', 'classes', $id));\n\t\t\tif($isfollowing && $hasclasses)$chunk=unionwrapper($cols, $chunk, '', 'CID');//group by CID to remove duplicate comments\n\t\t\t//now order by cid and group by SID for most recent comment and number of comments for each story\n\t\t\tif($rid){//hide hidden comments so they don't contribute or vice versa\n\t\t\t\tif($extra=='show')$chunk=hiddenwrapper($chunk, $rid, 'show', 'comments');\n\t\t\t\telse $chunk=hiddenwrapper($chunk, $rid, 'hide', 'comments');\n\t\t\t\t$cols='SID, STime, CID, COUNT(CID) AS NCs, CHide';\n\t\t\t}\n\t\t\telse $cols='SID, STime, CID, COUNT(CID) AS NCs';\n\t\t\t$chunk=unionwrapper($cols, $chunk, 'CID', 'SID');//order by cid and group by SID to get most recent comment per story\n\t\t\tif($what=='all')$commentschunk=$chunk;\n\t\t\telse{//wrap hidden stories if this is all we're getting\n\t\t\t\tif($rid){\n\t\t\t\t\tif($extra=='show')$chunk=hiddenwrapper($chunk, $rid, 'show', 'stories');\n\t\t\t\t\telse $chunk=hiddenwrapper($chunk, $rid, 'hide', 'stories');\n\t\t\t\t}\n\t\t\t\t$allchunk=$chunk;\n\t\t\t}\n\t\t}//end getting comments\n\t\tif($what=='all' || $what=='tags'){\n\t\t\t$cols='SID, STime';\n\t\t\t$chunk=unionwrapper($cols, getCIDs('tags', 'feed', $id));\n\t\t\tif($what=='all')$tagschunk=$chunk;\n\t\t\telse{//wrap hidden stories if this is all we're getting\n\t\t\t\tif($rid){\n\t\t\t\t\tif($extra=='show')$chunk=hiddenwrapper($chunk, $rid, 'show', 'stories');\n\t\t\t\t\telse $chunk=hiddenwrapper($chunk, $rid, 'hide', 'stories');\n\t\t\t\t}\n\t\t\t\t$allchunk=$chunk;\n\t\t\t}\n\t\t}\n\t\tif($what=='all'){//put the chunks together\n\t\t\t//commentschunk contains info the others so we need to group tags and stories and add the columns\n\t\t\t$extracol=($rid)? ', 0 AS CHide' : '';\n\t\t\t$cols='SID, STime, 0 AS CID, 0 AS NCs'.$extracol;\n\t\t\t$chunk=unionwrapper($cols, \"$storieschunk UNION $tagschunk\");\n\t\t\t$chunk=\"$chunk UNION $commentschunk\";\n\t\t\t//order by cid and sort by sid to get the most recent comment for each story\n\t\t\t$extracol=($rid)? ', CHide' : '';\n\t\t\t$cols='SID, MAX(STime) AS STime, CID, SUM(NCs) AS NCs'.$extracol;\n\t\t\t$allchunk=unionwrapper($cols, $chunk, 'CID', 'SID');\n\t\t\t//wrap for hidden stories //comments were already wrapped above\n\t\t\tif($rid){\n\t\t\t\tif($extra=='show')$allchunk=hiddenwrapper($allchunk, $rid, 'show', 'stories');\n\t\t\t\telse $allchunk=hiddenwrapper($allchunk, $rid, 'hide', 'stories');\n\t\t\t}\n\t\t}\n\t\t//need to limit the stories here before we start connecting everything\n\t\t$allchunk=<<<SQL\n\t\t\tSELECT *\n\t\t\tFROM ($allchunk) AS T\n\t\t\tORDER BY STime DESC\n\t\t\tLIMIT $limit OFFSET $offset\nSQL;\n\t\t//screen for classcontents\n\t\tif($inclasses || $hasclasses){\n\t\t\t$allchunk=getClinks($allchunk, 'stories');//check if any of the stories were authored for classes\n\t\t\tif($what=='all' || $what=='comments')$allchunk=getClinks($allchunk, 'comments');//and for comments, if necessary\n\t\t}\n\t\t//get the information about the stories and comments\n\t\t$allchunk=contentjoiner($what, $from, $allchunk, $rid);\n\t}\n\telseif ($from=='classes' || $from=='class'){\n\t\tif($what=='summary' && $from=='class' && $role=='student'){\n\t\t\t$what='all';\n\t\t\t$from='class';\n\t\t}\n\t\tif($what=='summary'){\n\t\t\t$allchunk=getCIDs('summary', $from, $id, $rid, $role);\n\t\t\t$page=$id; //we don't limit summaries by pages so we can use page to pass info on to format contents\n\t\t}\n\t\telse{//not getting summary information\n\t\t\tif($what=='all' || $what=='stories'){\n\t\t\t\tif($what=='all')$storieschunk=getCIDs('stories', $from, $id, $rid, $role, $mid);\n\t\t\t\telse{//wrap hidden stories if this is all we're getting\n\t\t\t\t\t$chunk=getCIDs('stories', $from, $id, $rid, $role, $mid);\n\t\t\t\t\tif($rid){\n\t\t\t\t\t\t//don't ever hide class content when the user is requesting the class information\n\t\t\t\t\t\tif($extra=='show')$chunk=hiddenwrapper($chunk, $rid, 'show', 'stories');\n\t\t\t\t\t\telse $chunk=hiddenwrapper($chunk, $rid, 'mark', 'stories');\n\t\t\t\t\t}\n\t\t\t\t\t$allchunk=$chunk;\n\t\t\t\t}\n\t\t\t}//end getting stories\n\t\t\tif($what=='all' || $what=='comments'){\n\t\t\t\t$chunk=getCIDs('comments', $from, $id, $rid, $role, $mid);\n\t\t\t\t//now order by cid and group by SID for most recent comment and number of comments for each story\n\t\t\t\tif($rid){//show or mark comments don't ever hide class content when the user is requesting the class information\n\t\t\t\t\tif($extra=='show')$chunk=hiddenwrapper($chunk, $rid, 'show', 'comments');\n\t\t\t\t\telse $chunk=hiddenwrapper($chunk, $rid, 'mark', 'comments');\n\t\t\t\t\t$cols='SID, STime, CID, COUNT(CID) AS NCs, CHide';\n\t\t\t\t}\n\t\t\t\telse $cols='SID, STime, CID, COUNT(CID) AS NCs';\n\t\t\t\t$chunk=unionwrapper($cols, $chunk, 'CID', 'SID');//order by cid and group by SID to get most recent comment per story\n\t\t\t\tif($what=='all')$commentschunk=$chunk;\n\t\t\t\telse{//wrap hidden stories if this is all we're getting\n\t\t\t\t\tif($rid){//don't ever hide class content when the user is requesting the class information\n\t\t\t\t\t\tif($extra=='show')$chunk=hiddenwrapper($chunk, $rid, 'show', 'stories');\n\t\t\t\t\t\telse $chunk=hiddenwrapper($chunk, $rid, 'mark', 'stories');\n\t\t\t\t\t}\n\t\t\t\t\t$allchunk=$chunk;\n\t\t\t\t}\n\t\t\t}//end getting comments\n\t\t\tif($what=='all'){//put the chunks together\n\t\t\t\t//commentschunk contains info the others so we add the columns to storieschunk\n\t\t\t\t$extracol=($rid)? ', 0 AS CHide' : '';\n\t\t\t\t$cols='SID, STime, 0 AS CID, 0 AS NCs'.$extracol;\n\t\t\t\t$allchunk=unionwrapper($cols, $storieschunk);\n\t\t\t\t$allchunk=\"$allchunk UNION $commentschunk\";\n\t\t\t\t$extracol=($rid)? ', CHide' : '';\n\t\t\t\t$cols='SID, MAX(STime) AS STime, CID, SUM(NCs) AS NCs'.$extracol;\n\t\t\t\t$allchunk=unionwrapper($cols, $allchunk, 'CID', 'SID');\n\t\t\t\t//wrap for hidden stories //comments were already wrapped above\n\t\t\t\tif($rid){//don't ever hide class content when the user is requesting the class information\n\t\t\t\t\tif($extra=='show')$allchunk=hiddenwrapper($allchunk, $rid, 'show', 'stories');\n\t\t\t\t\telse $allchunk=hiddenwrapper($allchunk, $rid, 'mark', 'stories');\n\t\t\t\t}\n\t\t\t}\n\t\t\t//need to limit the stories here before we start connecting everything\n\t\t\t$allchunk=<<<SQL\n\t\t\t\tSELECT *\n\t\t\t\tFROM ($allchunk) AS T\n\t\t\t\tORDER BY STime DESC\n\t\t\t\tLIMIT $limit OFFSET $offset\nSQL;\n\t\t\t//screen for classcontents\n\t\t\t$allchunk=getClinks($allchunk, 'stories');//check if any of the stories were authored for classes\n\t\t\tif($what=='all' || $what=='comments')$allchunk=getClinks($allchunk, 'comments');//and for comments, if necessary\n\t\t\t//get the information about the stories and comments\n\t\t\t$allchunk=contentjoiner($what, $from, $allchunk, $rid);\n\t\t}//end else (i.e. not getting summary information\n\t}\n\telseif($from=='user' || $from=='self' || $from=='following'){\n\t\tif($what=='classesattendingoptions' && $from=='self'){//get list of classes\n\t\t\t$allchunk=getCIDs('classesattendingoptions', $from, $id);\n\t\t}\n\t\telse{\n\t\t\tif($what=='all' || $what=='stories'){\n\t\t\t\tif($what=='all')$storieschunk=getCIDs('stories', $from, $id);\n\t\t\t\telse{\n\t\t\t\t\t$allchunk=getCIDs('stories', $from, $id);\n\t\t\t\t\tif($rid){//wrap hidden stories if this is all we're getting\n\t\t\t\t\t\tif($extra=='show')$allchunk=hiddenwrapper($allchunk, $rid, 'show', 'stories');\n\t\t\t\t\t\telse $allchunk=hiddenwrapper($allchunk, $rid, 'hide', 'stories');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}//end getting stories\n\t\t\tif($what=='all' || $what=='comments'){\n\t\t\t\t$chunk=getCIDs('comments', $from, $id);\n\t\t\t\tif($rid){//hide hidden comments so they don't contribute or vice versa\n\t\t\t\t\tif($extra=='show')$chunk=hiddenwrapper($chunk, $rid, 'show', 'comments');\n\t\t\t\t\telse $chunk=hiddenwrapper($chunk, $rid, 'hide', 'comments');\n\t\t\t\t\t$extracol=', CHide';\n\t\t\t\t}\n\t\t\t\telse $extracol='';\n\t\t\t\t//now order by cid and group by SID for most recent comment and number of comments for each story\n\t\t\t\t$cols='SID, STime, CID, COUNT(CID) AS NCs'.$extracol;\n\t\t\t\tif($what=='all')$commentschunk=unionwrapper($cols, $chunk, 'CID', 'SID');\n\t\t\t\telse{\n\t\t\t\t\t$allchunk=unionwrapper($cols, $chunk, 'CID', 'SID');\n\t\t\t\t\tif($rid){//wrap hidden stories if this is all we're getting\n\t\t\t\t\t\tif($extra=='show')$allchunk=hiddenwrapper($allchunk, $rid, 'show', 'stories');\n\t\t\t\t\t\telse $allchunk=hiddenwrapper($allchunk, $rid, 'hide', 'stories');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}//end getting comments\n\t\t\tif($from=='self' && ($what=='all' || $what=='tags')){\n\t\t\t\tif($what=='all')$tagschunk=getCIDs('tags', $from, $id);\n\t\t\t\telse{\n\t\t\t\t\t$allchunk=getCIDs('tags', $from, $id);\n\t\t\t\t\tif($rid){//wrap hidden stories if this is all we're getting\n\t\t\t\t\t\tif($extra=='show')$allchunk=hiddenwrapper($allchunk, $rid, 'show', 'stories');\n\t\t\t\t\t\telse $allchunk=hiddenwrapper($allchunk, $rid, 'hide', 'stories');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($what=='all'){//put the chunks together\n\t\t\t\t//commentschunk contains info the others so we need to group tags and stories and add the columns\n\t\t\t\t$extracol=($rid)? ', 0 AS CHide' : '';\n\t\t\t\t$cols='SID, STime, 0 AS CID, 0 AS NCs'.$extracol;\n\t\t\t\t$chunk=($from=='self')? \"SELECT * FROM ($storieschunk) AS T UNION $tagschunk\" : $storieschunk;\n\t\t\t\t$chunk=unionwrapper($cols, $chunk);\n\t\t\t\t$chunk=\"$chunk UNION $commentschunk\";\n\t\t\t\t//order by cid and group by sid to get the most recent comment for each story\n\t\t\t\t$extracol=($rid)? ', CHide' : '';\n\t\t\t\t$cols='SID, MAX(STime) AS STime, CID, SUM(NCs) AS NCs'.$extracol;\n\t\t\t\t$allchunk=unionwrapper($cols, $chunk, '', 'SID');\n\t\t\t\t//wrap for hidden stories //comments were already wrapped above\n\t\t\t\tif($rid){\n\t\t\t\t\tif($extra=='show')$allchunk=hiddenwrapper($allchunk, $rid, 'show', 'stories');\n\t\t\t\t\telse $allchunk=hiddenwrapper($allchunk, $rid, 'hide', 'stories');\n\t\t\t\t}\n\t\t\t}\n\t\t\t//need to limit the stories here before we start connecting everything\n\t\t\t$allchunk=<<<SQL\n\t\t\t\tSELECT *\n\t\t\t\tFROM ($allchunk) AS T\n\t\t\t\tORDER BY STime DESC\n\t\t\t\tLIMIT $limit OFFSET $offset\nSQL;\n\t\t\t//screen for classcontents\n\t\t\tif($inclasses || $hasclasses){\n\t\t\t\t$allchunk=getClinks($allchunk, 'stories');//check if any of the stories were authored for classes\n\t\t\t\tif($what=='all' || $what=='comments')$allchunk=getClinks($allchunk, 'comments');//and for comments, if necessary\n\t\t\t}\n\t\t\t//get the information about the stories and comments\n\t\t\t$allchunk=contentjoiner($what, $from, $allchunk, $rid);\n\t\t\t//echo \"<p> The allchunk is $allchunk </p>\";\n\t\t}\n\t}\n\telseif($from=='story'){\n\t\tif($what=='all' || $what=='stories'){\n\t\t\t$chunk=getCIDs('stories', $from, $id, $rid);\n\t\t\tif($rid)$chunk=hiddenwrapper($chunk, $rid, 'mark', 'stories');//always mark contents when getting story directly\n\t\t\tif($inclasses || $hasclasses)$chunk=getClinks($chunk, 'stories');//check if the story was authored for a class\n\t\t\tif($what=='stories')$allchunk=contentjoiner('stories', $from, $chunk, $rid);\n\t\t\telse $allchunk['stories']=contentjoiner('stories', $from, $chunk, $rid);\n\t\t}//end getting stories\n\t\tif($what=='all' || $what=='comments'){\n\t\t\t$chunk=getCIDs('comments', $from, $id, $rid);\n\t\t\tif($rid)$chunk=hiddenwrapper($chunk, $rid, 'mark', 'comments');//always mark contents when getting story directly\n\t\t\tif($inclasses || $hasclasses)$chunk=getClinks($chunk, 'comments');//check if the comment was authored for a class\n\t\t\tif($what=='comments'){\n\t\t\t\t$allchunk=contentjoiner('comments', $from, $chunk, $rid);\n\t\t\t\t$page=$id;//pass the story id through page if we're getting comments through a story\n\t\t\t}\n\t\t\telse $allchunk['comments']=contentjoiner('comments', $from, $chunk, $rid);\n\t\t}//end getting comments\n\t\tif($what=='all' || $what=='tags'){\n\t\t\tif($what=='tags'){\n\t\t\t\t$allchunk=getCIDs('tags', $from, $id, $rid);\n\t\t\t\t$page=$id;//pass the story id through page if we're getting comments through a story\n\t\t\t}\n\t\t\telse $allchunk['tags']=getCIDs('tags', $from, $id, $rid);\n\t\t}//end getting tags\n\t\t//don't put anything together and make three calls to mysqli_query if what==all\n\t}\n\telseif($from=='comment'){//don't need to check for hidden cause this is only called when adding a new comment\n\t\t$chunk=getCIDs('comments', 'comment', $id, $rid);\n\t\tif($inclasses || $hasclasses)$chunk=getClinks($chunk, 'comments');//check if the comment was authored for a class\n\t\t$allchunk=contentjoiner('comments', 'comment', $chunk, $rid);\n\t}\n\telseif($from=='submissions'){\n\t\t$chunk=getCIDs('stories', $from, '');\n\t\tif($rid){//hide or show the hidden contents depending on extra\n\t\t\tif($extra=='show')$chunk=hiddenwrapper($chunk, $rid, 'show', 'stories');\n\t\t\telse $chunk=hiddenwrapper($chunk, $rid, 'hide', 'stories');\n\t\t\tif($hasclasses || $inclasses)$chunk=getClinks($chunk, 'stories');\n\t\t}\n\t\t//need to limit the stories here before we start connecting everything\n\t\t$chunk=<<<SQL\n\t\t\tSELECT *\n\t\t\tFROM ($chunk) AS T\n\t\t\tORDER BY STime DESC\n\t\t\tLIMIT $limit OFFSET $offset\nSQL;\n\t\t//screen for classcontents\n\t\t$allchunk=contentjoiner($what, $from, $chunk, $rid);\n\t}\n\telseif($what=='vote'){\n\t\t//this is different from holds the contenttype id holds the contentid rid holds the rid\n\t\t$allchunk=getCIDs('vote', $from, $id, $rid);\n\t\t$from=($from==0)? \"story.$id\" : \"comment.$id\";\n\t}\n\telseif($from=='search'){\n\t\t$allchunk=getCIDs($what['sfor'], 'search', '', $rid, '', $what);\n\t\t$what=$what['sfor'];\n\t\tif($what=='comments'){\n\t\t\tif($rid){//hide hidden comments so they don't contribute or vice versa\n\t\t\t\tif($extra=='show')$allchunk=hiddenwrapper($allchunk, $rid, 'show', 'comments');\n\t\t\t\telse $allchunk=hiddenwrapper($allchunk, $rid, 'hide', 'comments');\n\t\t\t}\n\t\t\t//now group by SID for most recent comment and number of comments for each story\n\t\t\t$allchunk=unionwrapper('*', $allchunk, '', 'SID');\n\t\t}\n\t\tif($rid){//need to fix this when we're searching for comments too, this is just for stories\n\t\t\tif($extra=='show')$allchunk=hiddenwrapper($allchunk, $rid, 'show', 'stories');\n\t\t\telse $allchunk=hiddenwrapper($allchunk, $rid, 'hide', 'stories');\n\t\t\tif($inclasses || $hasclasses){\n\t\t\t\tif($what=='comments')$allchunk=getClinks($allchunk, 'comments');//check if any of the comments were authored for classes\n\t\t\t\t$allchunk=getClinks($allchunk, 'stories');//check if any of the stories were authored for classes\n\t\t\t}\n\t\t}\n\t\t$allchunk=<<<SQL\n\t\t\tSELECT *\n\t\t\tFROM ($allchunk) AS T\n\t\t\tLIMIT $limit\n\t\t\tOFFSET $offset\nSQL;\n\t\t//screen for classcontents\n\t\t$allchunk=contentjoiner($what, 'search', $allchunk, $rid);\n\t}\n\t\n\t/*\n\techo \"<p>What is $what, from is $from, and allchunk is below.</p>\";\n\tvar_dump($allchunk);\n\t\n\tif(!($what==\"all\" && $from==\"story\")) echo \"<p>$allchunk</p>\";\n\telse{\n\t\techo \"<p> THE STORIES: \".$allchunk[\"stories\"].\"</p>\";\n\t\techo \"<p> THE COMMENTS: \".$allchunk[\"comments\"].\"</p>\";\n\t\techo \"<p> THE TAGS: \".$allchunk[\"tags\"].\"</p>\";\n\t}\n\t*/\n\t//echo \"<p> THE TAGS: \".$allchunk[\"tags\"].\"</p>\";\n\t\n\t$db=usedb();\n\tif(!($what=='all' && $from=='story')) $result=mysqli_query($db, $allchunk);\n\telse{//we have three chunks to run\n\t\t$result['stories']=mysqli_query($db, $allchunk['stories']);\n\t\t$result['comments']=mysqli_query($db, $allchunk['comments']);\n\t\t$result['tags']=mysqli_query($db, $allchunk['tags']);\n\t}\n\tmysqli_close($db);\n\t\n\t//$allchunk.=\"<br><br>\".formatcontents($result, $what, $from, $rid, $page, $extra, $canurl);\n\t$allchunk=formatcontents($result, $what, $from, $rid, $page, $extra, $canurl);\n\treturn $allchunk;//.\"<br> the tarr was $thetarr rid was $rid and page is $page\";//.\"<br>The sql was $sql\";\n}", "public function content_filter($in_the_content) ///< The content in need of filtering.\n {\n // phpcs:enable PSR1.Methods.CamelCapsMethodName.NotCamelCaps\n if ($this->plugin_is_main) {\n // Simple searches can be mixed in with other content.\n $in_the_content = parent::content_filter($in_the_content);\n $count = 0;\n\n $in_the_content = $this->display_popup_search($in_the_content, $this->cms_get_post_meta(get_the_ID(), 'bmlt_simple_searches'), $count);\n } else // If we are not in a page in the main display, we remove the shortcodes.\n {\n $in_the_content = self::replace_shortcode($in_the_content, 'bmlt', '');\n $in_the_content = self::replace_shortcode($in_the_content, 'bmlt_map', '');\n $in_the_content = self::replace_shortcode($in_the_content, 'simple_search_list', '');\n $in_the_content = self::replace_shortcode($in_the_content, 'bmlt_mobile', '');\n $in_the_content = self::replace_shortcode($in_the_content, 'bmlt_simple', '');\n $in_the_content = self::replace_shortcode($in_the_content, 'bmlt_changes', '');\n $in_the_content = self::replace_shortcode($in_the_content, 'bmlt_quicksearch', '');\n $in_the_content = self::replace_shortcode($in_the_content, 'bmlt_table', '');\n }\n \n return $in_the_content;\n }", "abstract public function expand_all ($content);", "function content($word) {\n $link = new Db;\n $link2 = new Db;\n $link->query(sprintf(\"select path,descr,razd.id as rid,razd.type_user from texts,razd where razd.site='%d' and texts.razd=razd.id and messages like '%%%s%%'\",$this->sitenumber,addslashes($word)));\n $y=$link->num_rows();\n $j=0;\n for ($i=0;$i<$y;$i++) {\n $res[$i]=$link->next_record();\n if ($this->auth->verify($res[$i])) {\n $result[$j]=$res[$i];\n $result[$j]['msg']=$this->muntree($result[$j]['rid'],$link2);\n\t $j++;\n }\n }\n $smarty = new Smarty; \n $smarty->assign(\"res\",$result);\n $smarty->assign(\"word\",$word);\n $smarty->assign(\"from\",$this->from);\n $res=$smarty->fetch(\"{$this->path}sres-cont.tpl\");\n// $link2->close();\n return $res;\n }", "public function contents()\n\t{\n\t\tglobal $db, $ws;\n\n\t\t$result='';\n\t\t$albumsfound='';\n\t\t$photosfound='';\n\n\t\tif(!isset($_POST['search'])||(empty($_POST['search']))){\n\t\t\treturn '<h1 class=\"\">Enter keyword to search, and try again.</h1>';\n\t\t}\n\n\t\t$search=filter_var($_POST['search'], FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH);\n\n\n\t\t$q=$db->query(\"SELECT *,\n\t\t IFNULL(\n\t\t (SELECT `filename` FROM `photos` WHERE `photos`.`aid`=`albums`.`aid`\n\t\t ORDER BY `phid` DESC LIMIT 1), '') AS `photo`\n\t\t FROM `albums` WHERE (`name` LIKE '\".$search.\"%' OR `name` LIKE '%\".$search.\"%') \");\n\t\tif($db->num_rows($q)>0){\n\t\t\twhile($a=$db->fetch_array($q)){\n\t\t\t\t$albumsfound.=$ws->albumPreview(0, $a['aid'], $a['uid'], $a['photo'], $a['name'], $a['created']);\n\t\t\t}\n\t\t}else{\n\t\t\t$albumsfound.='<h2 class=\"errormsg\">We didn&lsquo;t find any albums with that keyword</h2>';\n\t\t}\n\n\t\t$q=$db->query(\"SELECT * FROM `photos` WHERE (`name` LIKE '\".$search.\"%' OR `name` LIKE '%\".$search.\"%') \");\n\t\tif($db->num_rows($q)>0){\n\t\t\twhile($a=$db->fetch_array($q)){\n\t\t\t\t$photosfound.=$ws->photoPreview(0, $a['phid'], $a['uid'], $a['filename'], $a['name'], $a['created'],$a['aid']);\n\t\t\t}\n\t\t}else{\n\t\t\t$photosfound.='<h2 class=\"errormsg\">We didn&lsquo;t find any photos with that keyword</h2>';\n\t\t}\n\n\t\t$result.='\n\t\t<div id=\"search-results\">\n\t\t\t<div id=\"search-results-albums\">\n\t\t\t\t<h1 class=\"search-results-title\">Found albums:</h1>\n\t\t\t\t<div class=\"search-results-items\">\n\t\t\t\t\t'.$albumsfound.'\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div id=\"search-results-photos\">\n\t\t\t\t<h1 class=\"search-results-title\">Found photos:</h1>\n\t\t\t\t<div class=\"search-results-items\">\n\t\t\t\t\t'.$photosfound.'\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>';\n\n\n\t\treturn $result;\n\t}", "public abstract function getContent();", "public function search(){\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\r\n\t\t$this->title = 'Search Media';\r\n\t\t$this->list = $this->Results();\r\n\t\treturn $this->renderWith(array('Media_results','App'));\r\n\t}", "function main($content,$conf)\t{\n\t\t$this->conf = $conf;\n\t\t$this->pi_setPiVarDefaults();\n\t\t$this->pi_loadLL();\n\t\t$this->pi_USER_INT_obj = 1;\t// Configuring so caching is not expected. This value means that no cHash params are ever set. We do this, because it's a USER_INT object!\n\n\n\t\t\t// Get keyword from indexed_search sword field. Clean it up so it's lowercase and alphanum:\n\t\t$indexed_search_data = t3lib_div::_GP('tx_indexedsearch');\n#debug($indexed_search_data);\n\t\t$keyword = trim(strtolower(ereg_replace('[^ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-]','',$indexed_search_data['sword'])));\n\n\t\t\t// Look for keyword alias in pages table:\n\t\tlist($matchingPage) = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows(\n\t\t\t'uid',\n\t\t\t'pages',\n\t\t\t$GLOBALS['TYPO3_DB']->listQuery('tx_xdspagetag_pagetag', $keyword,'pages').\n\t\t\t\t$this->cObj->enableFields('pages'),\n\t\t\t'',\n\t\t\t'',\n\t\t\t1\n\t\t);\n\n\t\t\t// If page tag found:\n\t\tif (is_array($matchingPage) && $keyword!=='') {\n\n\t\t\t\t// Try to make URL for found page:\n\t\t\t$url = $this->pi_getPageLink($matchingPage['uid']);\n\n\t\t\t\t// Record the hit for stats:\n\t\t\tif ($url)\t{\n\t\t\t\t$fields_values = array (\n\t\t\t\t\t'searchstring' => $keyword,\n\t\t\t\t\t'tstamp' => time()\n\t\t\t\t);\n\t\t\t\t$GLOBALS['TYPO3_DB']->exec_INSERTquery(\n\t\t\t\t\t'tx_pagetag_stat',\n\t\t\t\t\t$fields_values\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\t\t// Default is forward to indexed search page if no tag found:\n\t\tif (!$url && $this->cObj->data['pages']) {\n\t\t\t$url = $this->pi_getPageLink($this->cObj->data['pages'],'',t3lib_div::implodeArrayForUrl('tx_indexedsearch',$indexed_search_data));\n\t\t}\n\n\t\t\t// Forward to URL otherwise:\n\t\tif ($url)\t{\n\t\t\tif ($conf['showKeywordFoundBox'])\t{\n\t\t\t\treturn '\n\t\t\t\t<div style=\"border: 1px solid black; background-color: #eeeeee; padding: 10px 10px 10px 10px; margin-bottom: 10px; margin-top: 10px;\">\n\t\t\t\t\t<b>Keyword found!</b><br/>\n\t\t\t\t\tWe have found an exact match for the word you searched for! <a href=\"'.htmlspecialchars($url).'\">Go to this page now!</a>\n\t\t\t\t</div>\n\t\t\t\t';\n\t\t\t} else {\n\t\t\t\theader('Location: '.t3lib_div::locationHeaderUrl($url));\n\t\t\t\texit;\n\t\t\t}\n\t\t} else {\n\t\t\treturn '';\t// Return empty string (this is if no page tag was found and the indexed search page was not redirected to).\n\t\t}\n\t}", "private function _search(){\n\t\tif($this->curluse){\n\t\t\ttry{\n\t\t\t\t$ch = curl_init();\n\t\t\t\tcurl_setopt($ch, CURLOPT_URL, $this->searchURL);\n\t\t\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\t\t\tcurl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);\n\t\t\t\tcurl_setopt($ch, CURLOPT_HEADER, false);\n\t\t\t\tif(isset($this->proxy_url) && isset($this->proxy_port)){\n\t\t\t\t\tcurl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, TRUE);\n\t\t\t\t\tcurl_setopt($ch, CURLOPT_PROXYPORT, $this->proxy_port);\n\t\t\t\t\tcurl_setopt($ch, CURLOPT_PROXY, $this->proxy_url);\n\t\t\t\t}\n\t\t\t\t$output = curl_exec($ch);\n\t\t\t\tif(curl_errno($ch))\n\t\t\t\t{\n\t\t\t\t\tthrow new \\Exception(curl_error($ch));\n\t\t\t\t}\n\t\t\t\tcurl_close($ch);\n\t\t\t\treturn $output;\n\t\t\t} catch(Exception $e){\n\t\t\t\techo $e->getMessage();\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tif ($stream = fopen($this->searchURL, 'r')) {\n\t\t\t\treturn stream_get_contents($stream);\n\t\t\t\tfclose($stream);\n\t\t\t}\n\t\t}\n\t}", "function findKeyword() {\n \n }", "function postingSearchHandler() {\n global $inputs;\n\n $keyword = $inputs['keyword'];\n $res = getAll(\"SELECT a.*,c.name \n FROM posting a \n INNER JOIN member_posting b \n ON a.id = b.posting_id\n INNER JOIN member c \n ON c.id = b.member_id \n WHERE a.title LIKE '%$keyword%' OR a.content LIKE '%$keyword%'\");\n \n formatOutput(true, 'success',$res);\n}", "private function search_items()\n\t\t{\n\t\t\t$inputsearch = str_replace(\"\\\\\",\"\\\\\\\\\",$this->inputsearch); // SRX_BACKSLASH_FIX_ISSUE\n\t\t\tif(substr($this->inputsearch,0,1) == \"\\\\\")\n\t\t\t{\n\t\t\t\t$pre_jocker = '';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$pre_jocker = '%';\n\t\t\t}\n\t\t\t\n\t\t\t$query = \"\tSELECT\n\t\t\t\t\t\t\t`MTN`.`id` AS 'id'\n\t\t\t\t\t\tFROM \n\t\t\t\t\t\t\t`\".$this->tree_node.\"` `MTN`,\n\t\t\t\t\t\t\t`\".$this->tree_caption.\"` `MTC`\n\t\t\t\t\t\tWHERE 1 = 1\n\t\t\t\t\t\t\tAND `MTN`.`id` = `MTC`.`id`\n\t\t\t\t\t\t\tAND `MTN`.`application_release` = `MTC`.`application_release`\n\t\t\t\t\t\t\tAND `MTN`.`application_release`\t= '\".$this->application_release.\"'\n\t\t\t\t\t\t\tAND `MTC`.`language` = '\".$this->language.\"'\n\t\t\t\t\t\t\tAND `MTC`.`title`\t\tlike '\".$pre_jocker.$this->mysql_protect($inputsearch).\"%'\n\t\t\t\t\t\";\n\t\t\t$result = $this->link_mt->query($query);\n\t\t\t\n\t\t\t// Clear list\n\t\t\t$this->listexpand = ''; \n\t\t\t$this->listhighlight = '';\n\t\t\t\n\t\t\t$this->count_item_found = 0;\n\t\t\t\n\t\t\twhile ($row = $result->fetch_array(MYSQLI_ASSOC))\n\t\t\t{\n\t\t\t\t// Prepare array for full expansion\n\t\t\t\t$this->listexpand[$row['id']] = true;\n\t\t\t\t\n\t\t\t\t// Build array to highlight item\n\t\t\t\t$this->listhighlight[$row['id']] = true;\n\t\t\t\t\n\t\t\t\t$this->count_item_found = $this->count_item_found + 1; // Count number of entries in current search\n\t\t\t}\n\n\t\t\tif(!$this->count_item_found)\n\t\t\t{\n\t\t\t\t// Search launched but no item found\n\t\t\t\t$this->count_item_found = 'NoItemFound';\n\t\t\t}\n\t\t\t\n\t\t\t$this->build_full_array_expansion();\n\t\t\t\n\t\t\t//$_SESSION[$this->ssid]['MT'][$this->internal_id][\"expandlist\"] = $this->listexpand;\n\t\t}", "function xh_fetchContent(&$path)\r\n\t{\r\n\t}", "function search() {\n // ...\n }", "function extract_hotlinks($content) {\n\n\n\n\t}", "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 ind_content($content) {\n\tglobal $wp_rewrite, $wp_query, $chapter, $chapters, $post, $page, $more, $multipage, $indizar_first_chapter, $indizar_config;\n\t\n\t// Use the number defined in the general configuration;\n\t$indizar_first_chapter = INDIZAR_FIRST_CHAPTER;\n\t\n\t//if the post have the custom field 'indizar_first_chapter', use it\n\tif(is_numeric(get_post_meta($post->ID, 'indizar_first_chapter', true)))\n\t\t$indizar_first_chapter = get_post_meta($post->ID, 'indizar_first_chapter', true);\n\n\t//read the chapter data from the URL\n\tif($wp_rewrite->using_permalinks()) { // WordPress using Pretty Permalink structure \n\t\t$chapter = $wp_query->query_vars['chapter'];\n\t} else { // WordPress using default permalink structure like www.site.com/wordpress/?p=123\n\t\t$chapter = false;\n\t\tif(isset($_GET['chapter'])) $chapter = $_GET['chapter'];\n\t}\n\t\n\t\t\n\t//prepare the content in search for tags\n\t$index=false;\n\t$content = ind_prepare_content($post->post_title, $content);\n\t\n\t//The system shows only the begin\n\tif(!$more) {\n\t\t//Delete the tags\n\t\t$content = ind_delete_extra_tags($content);\n\t} else { //We are showing the post!!!!\n\t\t//If there aren't chapters, we don't need Indizar with this post\n\t\tif(!$chapters) {\n\t\t\t//maybe someone defined just the first chapter, so we need to\n\t\t\t//delete the special mark for the box\n\t\t\t$content = str_replace (\"<!--indizar_box-->\", \"\", $content);\n\t\t} else {\n\t\t\t//Ok, we have chapters, do your magic Indizar\n\t\t\t\n\t\t\t//If there is a configuration tag, use it to define the first chapter\n\t\t\tif(count($indizar_config)>0) {\n\t\t\t\t$indizar_first_chapter = $indizar_config['first_chapter_number'];\n\t\t\t}\n\t\t\t\n\t\t\t//If the URL didn't declare a chapter it has to be the first chapter\n\t\t\tif(!$chapter) $chapter = $indizar_first_chapter;\n\t\t\t \n\t\t\t// Use the entire post if we are using wp_print to print\n\t\t\tif(function_exists('wp_print') && ( intval(get_query_var('print')) == 1 || intval(get_query_var('printpage')) == 1 )) {\n\t\t\t\t//Do we have pages withe the post?\n\t\t\t\tfor($page = 0; $page < $numpages; $page++) {\n\t\t\t\t\t$content .= $pages[$page];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//Declare indizar.css to 'style' the print page \n\t\t\t\t$content = \"<link rel='stylesheet' href='\".get_bloginfo('wpurl').\"/wp-content/plugins/indizar/indizar.css' type='text/css' media='screen' />\n\t\t\t\t\".$content;\n\t\t\t\t$content = ind_delete_extra_tags($content);\n\t\t\t} else {\n\t\t\t\t//No wp_print, go ahead indizar\n\t\t\t\t\n\t\t\t\t//Maybe we will need a box at the begin if the configuration requires it\n\t\t\t\t//and the user didn't put a 'chapters' tag.\n\t\t\t\t$content = \"<!--indizar_box_begin-->\" . $content;\n\t\t\t\t\n\t\t\t\t//get the list of chapters\n\t\t\t\t$list = ind_chapters_list();\n\t\t\t\t\n\t\t\t\t//Create html code for the chapter index and the numbered list \n\t\t\t\t//if we have a chapters list and we are showing the hole post\n\t\t\t\t$index = ind_index_list($list);\n\t\t\t\t$numbered_list = ind_numbered_list($list);\n\t\t\t\t\n\t\t\t\t//Sectionate the post using the marks created in the 'prepare_content' function\n\t\t\t\tif( strpos( $content, '<!--indizar_chapter-->' ) ) {\n\t\t\t\t\t//We don't need a new line tag before any new chapter\n\t\t\t\t\t$content = str_replace(\"\\n<!--indizar_chapter-->\", '<!--indizar_chapter-->', $content);\n\t\t\t\t\t$chapters_array = explode('<!--indizar_chapter-->', $content);\n\t\t\t\t\t\n\t\t\t\t\t//we just need one part, the one numbered with the chapter we are\n\t\t\t\t\t//loking for. Explode return an array whose first index is 0, thats why\n\t\t\t\t\t//we substract the 'indizar_first_chapter' variable\n\t\t\t\t\t$content = $chapters_array[$chapter-$indizar_first_chapter];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//Now we have the content we need. Add the chapters index and the numbered list\n\t\t\t\t\n\t\t\t\t//No chapters\n\t\t\t\t$search = \"@(?:<p>)*\\s*\\[chapters:none\\]\\s*(?:</p>)*@i\";\n\t\t\t\tif(preg_match_all($search, $content, $matches)) {\n\t\t\t\t\t//If we found a chapters tag that doesn't require style, use\n\t\t\t\t\t//the html code we have\n\t\t\t\t\tif(is_array($matches)) {\n\t\t\t\t\t\t$search = $matches[0][0];\n\t\t\t\t\t\t//replace the tag with the html code\n\t\t\t\t\t\t$content = str_replace ($search, \"\", $content);\n\t\t\t\t\t\t$content = str_replace (\"<!--indizar_box-->\", \"\", $content);\n\t\t\t\t\t\t$content = str_replace (\"<!--indizar_box_begin-->\", \"\", $content);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//Chapters Box without style\n\t\t\t\t$search = \"@(?:<p>)*\\s*\\[chapters\\]\\s*(?:</p>)*@i\";\n\t\t\t\tif(preg_match_all($search, $content, $matches)) {\n\t\t\t\t\t//If we found a chapters tag that doesn't require style, use\n\t\t\t\t\t//the html code we have\n\t\t\t\t\tif(is_array($matches)) {\n\t\t\t\t\t\t$search = $matches[0][0];\n\t\t\t\t\t\t\n\t\t\t\t\t\t//define the html code without style\n\t\t\t\t\t\t$replace=\"\";\n\t\t\t\t\t\tif($index) {\n\t\t\t\t\t\t\t$default_side = INDIZAR_BOX_FLOAT;\n\t\t\t\t\t\t\t$default_size = INDIZAR_BOX_SIZE;\n\t\t\t\t\t\t\tif($indizar_config) {\n\t\t\t\t\t\t\t\t$default_side = $indizar_config['box_float'];\n\t\t\t\t\t\t\t\t$default_size = $indizar_config['box_size'];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$replace = \"<div class='indizar' id='\".$default_side.\"' style='width: \".$default_size.\"px; float: $default_side;'>\".$index.\"</div>\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t//replace the tag with the html code\n\t\t\t\t\t\t$content = str_replace ($search, $replace, $content);\n\t\t\t\t\t\t\n\t\t\t\t\t\t//because we put a chapters box, it means we don't need\n\t\t\t\t\t\t//the marks we put for the default configuration\n\t\t\t\t\t\t$content = str_replace (\"<!--indizar_box-->\", \"\", $content);\n\t\t\t\t\t\t$content = str_replace (\"<!--indizar_box_begin-->\", \"\", $content);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//Chapters box with style\n\t\t\t\t$search = \"@(?:<p>)*\\s*\\[chapters\\s*:\\s*(\\d+)(||,left|,right)\\]\\s*(?:</p>)*@i\";\n\t\t\t\tif(preg_match_all($search, $content, $matches)) {\n\t\t\t\t\t//If we found a chapters tag with style, use the html \n\t\t\t\t\t//code we have\n\t\t\t\t\tif(is_array($matches)) {\n\t\t\t\t\t\t//For each tag, configure the html code\n\t\t\t\t\t\t//to use the definitions in the tag\n\t\t\t\t\t\tforeach ($matches[1] as $key =>$v0) {\n\t\t\t\t\t\t\t//get the variables in the tag\n\t\t\t\t\t\t\t$v1=$matches[2][$key];\n\t\t\t\t\t\t\tif($v1) $v1=substr($v1,1);\n\t\t\t\t\t\t\t$search = $matches[0][$key];\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//configure the html code\n\t\t\t\t\t\t\t$replace=\"\";\n\t\t\t\t\t\t\tif($index) {\n\t\t\t\t\t\t\t\t$replace = \"<div class='indizar' id='\".$v1.\"' style='width: \".$v0.\"px;\";\n\t\t\t\t\t\t\t\tif($v1) $replace.=\" float: $v1;\";\n\t\t\t\t\t\t\t\t$replace.=\"'>\".$index.\"</div>\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//replace the tag with the configured html code\n\t\t\t\t\t\t\t$content = str_replace ($search, $replace, $content);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t//because we put a chapters box, it means we don't need\n\t\t\t\t\t\t//the marks we put for the default configuration\n\t\t\t\t\t\t$content = str_replace (\"<!--indizar_box-->\", \"\", $content);\n\t\t\t\t\t\t$content = str_replace (\"<!--indizar_box_begin-->\", \"\", $content);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//Remember, if we have found previsously a 'chapters' tag,\n\t\t\t\t//we delete the '<!--indizar_box-->' tags we created to use if the \n\t\t\t\t//configuration requires it. We don't need two boxes in the same page,\n\t\t\t\t//abey the user declared more than one 'chapters' tag.\n\t\t\t\t\n\t\t\t\t//Define default settings; no box, and numbered list at bottom\n\t\t\t\t$top = INDIZAR_TOP;\n\t\t\t\t$bottom = INDIZAR_BOTTOM;\n\t\t\t\t$box = INDIZAR_BOX;\n\t\t\t\t$box_size = INDIZAR_BOX_SIZE;\n\t\t\t\t$box_float = INDIZAR_BOX_FLOAT;\n\t\t\t\t\n\t\t\t\t//do we have configuration data?\n\t\t\t\tif(count($indizar_config)>0) {\n\t\t\t\t\t//Get the data from the configuration tag\n\t\t\t\t\tif($indizar_config['box_float'] == 'none') $box = false; else $box = true;\n\t\t\t\t\tif($indizar_config['config'] & 2) $bottom = true; else $bottom = false;\n\t\t\t\t\tif($indizar_config['config'] & 1) $top = true; else $top = false;\n\t\t\t\t\t\n\t\t\t\t\tif($box) {\n\t\t\t\t\t\t$box_float = $indizar_config['box_float'];\n\t\t\t\t\t\t$box_size = $indizar_config['box_size'];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//Define the html code for a default box\n\t\t\t\t$div_box = \"\";\n\t\t\t\tif($box) {\n\t\t\t\t\t$div_box = \"<div class='indizar' id='\".$box_float.\"' style='width: \".$box_size.\"px;\";\n\t\t\t\t\tif($box_float) $div_box.=\" float: $box_float;\";\n\t\t\t\t\t$div_box.=\"'>\".$index.\"</div>\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//Time to use the 'indizar_box' marks.\n\t\t\t\t$search_box = \"<!--indizar_box-->\";\n\t\t\t\t\n\t\t\t\t//The first part of a post don't have a 'chapter' tag, ergo it doesn't have\n\t\t\t\t//an indizar_box mark, that's why we put the indizar_box_begin. It's time \n\t\t\t\t//to use or delete it.\n\t\t\t\t//Do we have an 'indizar_box' mark? \n\t\t\t\tif(!strpos($content,$search_box)) { //if not, use the indizar_box_begin\n\t\t\t\t\t$content = str_replace (\"<!--indizar_box_begin-->\", $div_box, $content);\n\t\t\t\t} else { //Delete it if we are not going to use it\n\t\t\t\t\t$content = str_replace (\"<!--indizar_box_begin-->\", \"\", $content);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//use the box mark to add the chapters box\n\t\t\t\t$content = str_replace ($search_box, $div_box, $content);\n\t\t\t\t\n\t\t\t\t//Do we use the numbered list at the begin?\n\t\t\t\tif($top) $content = \"<p class='indizar'>$numbered_list</p> $content\";\n\t\t\t\t\n\t\t\t\t//Do we use the numbered list at the end?\n\t\t\t\tif($bottom) $content .= \" <p class='indizar scroll'>$numbered_list</p>\";\t\t\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn $content;\n}", "private function rest_search() {\n\t\t// return json elements here\n\t}", "function showSearch () {\n\t\t$template['list'] = $this->cObj->getSubpart($this->templateCode,'###TEMPLATE_SEARCH###');\n\t\t$subpartArray = array();\n\t\t$markerArray = $this->helperGetLLMarkers(array(), $this->conf['search.']['LL'], 'search');\n\n\t\t// hide the radisus search by using a subpart\n\t\tif ($this->config['search']['radiusSearch'] != 1) {\n\t\t\t$subpartArray['###HIDE_RADIUSSEARCH###'] = '';\n\t\t}\n\n\t\t$markerArray['###DEFAULT_COUNTRY###'] = $this->config['defaultCountry']; // set the default country\n\t\t$markerArray['###DEFAULT_ZIP###'] = htmlspecialchars($this->piVars['zip']);\n\t\t$markerArray['###AUTOSUBMIT###'] = ($this->piVars['zip'] == '') ? '//' : '';\n\n\t\t// fetch the allowed categories as option list\n\t\t$markerArray['###CATEGORY###'] = $this->helperGetRecursiveCat($this->config['categories']);\n\n\t\t$content = $this->cObj->substituteMarkerArrayCached($template['list'], $markerArray, $subpartArray);\n\t\treturn $content;\n\t}", "function katakrak_search_search_results_content_type_render($subtype, $conf, $args, $context) {\n $block = new stdClass();\n $block->module = 'katakrak_search';\n $block->delta = 'results';\n\n $search = array(\n 'keys' => '',\n 'filters' => isset($_GET['filters']) ? $_GET['filters'] : '',\n 'sort' => isset($_GET['solrsort']) ? $_GET['solrsort'] : '',\n );\n\n // Use keywords from the selected context if set to do so.\n if (!empty($context) && !empty($context->data)) {\n $search['keys'] = $context->data;\n }\n\n $display = panels_get_current_page_display();\n\n // Alter the search parts to use substitutions. Override, append or use a\n // fallback depending on the setting for each part.\n foreach ($search as $key => $value) {\n $value = trim($value);\n\n if ($conf[$key . '_action'] != 'none' && !empty($conf['substitute']) && !empty($display->context)) {\n $conf[$key] = ctools_context_keyword_substitute($conf[$key], array(), $display->context);\n }\n\n if ($conf[$key . '_action'] == 'append') {\n $search[$key] .= ' ' . $conf[$key];\n }\n elseif (($conf[$key . '_action'] == 'fallback' && empty($value)) || $conf[$key . '_action'] == 'override') {\n $search[$key] = $conf[$key];\n }\n }\n\n // Add remaining search information.\n $menu_item = menu_get_item();\n $search['path'] = $menu_item['href'];\n $search['page'] = pager_find_page();\n $search['rows'] = isset($conf['rows']) ? $conf['rows'] : 10;\n $search['columns'] = isset($conf['columns']) ? $conf['columns'] : 3;\n $search['env_id'] = isset($conf['env_id']) ? $conf['env_id'] : '';\n $search['tipo'] = isset($conf['tipo']) ? $conf['tipo'] : '';\n\n if (!empty($conf['log'])) {\n watchdog('search', '%keys (@type).', array('%keys' => $search['keys'], '@type' => t('Search')), WATCHDOG_NOTICE, l(t('results'), $_GET['q']));\n }\n\n $results = NULL;\n\n // Execute the search if we have keywords or if keywords aren't required.\n if (!empty($search['keys']) || !$conf['keys_required']) {\n // If set to not show keywords and filters in the breadcrumb trail, first\n // store the original before being changed by the Apache Solr module.\n if (empty($conf['breadcrumb'])) {\n $breadcrumb = drupal_get_breadcrumb();\n }\n\n try {\n $results = katakrak_search_search_execute($search);\n $query = apachesolr_current_query(variable_get('apachesolr_default_environment', 'default'));\n if ($query) {\n $searcher = $query->getSearcher();\n $response = apachesolr_static_response_cache($searcher);\n }\n // Don't render suggestions. Use spellchecker pane instead.\n if (isset($results['suggestions'])) {\n unset($results['suggestions']);\n }\n\n // Restore the original breadcrumb trail if set to do so.\n if (empty($conf['breadcrumb'])) {\n drupal_set_breadcrumb($breadcrumb);\n }\n }\n catch (Exception $e) {\n watchdog('Apache Solr', nl2br(check_plain($e->getMessage())), NULL, WATCHDOG_ERROR);\n }\n }\n\n if ($results) {\n // Add title and results.\n if (!empty($conf['title_override'])) {\n if (!empty($conf['substitute']) && !empty($display->context)) {\n $conf['title_override_text'] = ctools_context_keyword_substitute($conf['title_override_text'], array(), $display->context);\n }\n $block->title = $conf['title_override_text'];\n }\n else {\n $block->title = t('Search results');\n }\n $block->content = $results;\n }\n elseif (!empty($search['keys'])) {\n // Show empty text, either overridden or the default.\n if (!empty($conf['empty_override'])) {\n if (!empty($conf['substitute']) && !empty($display->context)) {\n $conf['empty_override_title'] = ctools_context_keyword_substitute($conf['empty_override_title'], array(), $display->context);\n $conf['empty_override_text']['value'] = ctools_context_keyword_substitute($conf['empty_override_text']['value'], array(), $display->context);\n }\n $block->title = $conf['empty_override_title'];\n $block->content = check_markup($conf['empty_override_text']['value'], $conf['empty_override_format'], $langcode = '' /* TODO Set this variable. */, FALSE);\n }\n else {\n $block->title = t('Your search yielded no results');\n $block->content = search_help('search#noresults', drupal_help_arg());\n }\n }\n\n return $block;\n}", "function post_search(){\n global $cfg, $db, $libhtml;\n\n $html = '';\n $tables_already_searched = array();\n foreach($_SESSION[\"apps\"] as $my_apps){\n if (!empty($my_apps->path) && (!in_array(str_replace(\"/\", \"\", $my_apps->path), $this->exclude_apps))) {\n\n foreach(glob($cfg[\"source_root\"] . $my_apps->path . \"classes/*.php\") as $object) {\n\n $where = array(\"\", array(), array()); // used for query\n $where_in = array();\n $object_name = str_replace(array($cfg[\"source_root\"] . $my_apps->path . \"classes/\", \".php\"), array(\"\", \"\"), $object);\n\n if (!in_array($object_name, $this->exclude_objects)) {\n $object = new $object_name;\n\n if (!empty($object->table) && !in_array($object->table, $tables_already_searched)) {\n $tables_already_searched[] = $object->table;\n\n // get all varchar & text fields in these searchable tables\n $columns = $db->get_table_column_metadata($object->table);\n foreach($columns as $column){\n //error_log(print_r($column, true));\n if ($column->DATA_TYPE == \"text\" || $column->DATA_TYPE == \"varchar\"){\n //$where_in[0] .= \"t.\".$column->COLUMN_NAME.\" LIKE '%\".my_request(\"keyword\").\"%'\";\n $where_in[] = \" t.\".$column->COLUMN_NAME.\" LIKE ?\";\n $where[1][$column->COLUMN_NAME] = \"%\" . my_request(\"keyword\") . \"%\";\n $where[2][] = 'varchar';\n }\n }\n $where[0] = \"WHERE \" . implode(\" OR \", $where_in);\n\n // dump_var($object->table);\n // dump_var(print_r($where_in, true));\n\n // if there are varchar / text fields do ...\n if (!empty($where_in)) {\n // list object\n $tmphtml = $object->_list(array(\n //'where'=>\" AND ( \" . implode(\" OR \", $where_in) . \" )\"\n 'where' => $where,\n 'width'=>\"100%\",\n 'quick_search'=>true,\n 'app_path'=> $my_apps->path, // needed for _list edit action\n 'view'=>true,\n 'xml_export'=>false,\n 'pdf_export'=>false,\n 'csv_export'=>false,\n 'email_alert'=>false,\n 'dynamic_append'=>false,\n 'pagination'=>false,\n 'edit'=>false,\n 'delete'=>false,\n ));\n\n // do not show empty messages\n //if (strpos($tmphtml, \"No items found\") === false) {\n if ($object->list_total>0) {\n\n $res = ($object->list_total>1) ? \"results\" : \"result\";\n $truncate = ($object->list_total>500) ? \", truncated to first 500\" : '';\n\n $html .= section(array(\n \"title\"=>$my_apps->name . \" - \". ucwords(str_replace(\"_\", \" \", $object_name)). \" (\".$object->list_total.\" \".$res.$truncate.\")\",\n \"collapsible\"=>true,\n \"state\"=>\"collapsed\",\n \"to_top\"=>true\n ));\n\n $html .= $tmphtml;\n }\n }\n\n }\n }\n }\n }\n }\n\n // do not show empty results\n if (empty($html)) return '<div class=\"success\">Search returned no results.</div>';\n else return $html;\n\n }", "public function search_all($type=\"*\",$attr=\"*\",$val=\"*\"){\n\t\t$data=array();\n\t\tif ($this->is_eligable($type, $attr, $val)){\n\t\t\tarray_push($data,$this);\n\t\t}\n\t\t//region for weather to add self or not end^^\n\t\t$local_data=$data;\n\t\t\n\t\tforeach($this->content as $item){\n\t\t\tif(isset($item->content)){\n\t\t\t\t$retrived_content=$item->search_all($type,$attr,$val);\n\t\t\t\tif (isset($retrived_content)){\n\t\t\t\t\t$local_data=array_merge($local_data,$retrived_content);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (sizeof($local_data)!=0){\n\t\t\treturn $local_data;\n\t\t}\n\t}", "public function find($content)\n {\n foreach ($this->_children as $i => $child) {\n $view = $this->view($child['name']);\n if (strpos($view->render(), $content) !== false) {\n return $view;\n }\n }\n\n return null;\n }", "public function find($content)\n {\n foreach ($this->_children as $i => $child) {\n $view = $this->view($child['name']);\n if (strpos($view->render(), $content) !== false) {\n return $view;\n }\n }\n\n return null;\n }", "function _filter_block_content_callback($matches)\n {\n }", "public function search($params)\n {\n $this->load($params);\n\n if (!$this->validate())\n {\n new BadRequestHttpException(\\Yii::t('app', 'The provided search string is invalid'));\n }\n\n $query = ContentSource::find();\n\n // STATUS DELETED, DO NOT DISPLAY.\n $query->where([ 'not like', 'status', self::STATUS_DELETED ]);\n\n // If USER IS GUEST\n if (\\Yii::$app->user->isGuest)\n {\n $query->andWhere([ 'not like', 'status', self::STATUS_DRAFT ]);\n $query->andWhere([ 'not like', 'status', self::STATUS_PRIVATE_CONTENT ]);\n }\n // NOT VALIDATED USERS AND DRAFT HANDLES.\n else\n {\n /** @var User $user */\n $user = \\Yii::$app->user->getIdentity();\n if ($user->status == User::STATUS_AWAITING_VALIDATION || $user->status == User::STATUS_INVALIDATED)\n {\n $query->andWhere([ 'not like', 'status', self::STATUS_PRIVATE_CONTENT ]);\n }\n if ($user->role == User::ROLE_USER)\n {\n $query->andWhere([ 'not like', 'status', self::STATUS_DRAFT ]);\n }\n }\n\n // LOOK THROUGH THE SLUGS.\n $query->innerJoin(\"content_slug\", \"content_source.id = content_slug.content_id\")\n ->where([ 'content_slug.language' => \\Yii::$app->language ])\n ->filterWhere([ 'like', 'content_slug.title', $this->searchString ])\n ->orFilterWhere([ 'like', 'content_slug.slug', $this->searchString ]);\n\n $query2 = (new Query())->select(\"content_source.*\")\n ->from(\"content_source\")\n ->innerJoin(\"content_component\", \"content_component.content_id = content_source.id\")\n ->innerJoin(\"component_field\", \"content_component.id = component_field.component_id\")\n ->where([ 'content_component.language' => \\Yii::$app->language ])\n ->filterWhere([ 'like', 'component_field.text', $this->searchString ]);\n\n $query->union($query2);\n\n $pageSize = isset($params[ 'per-page' ]) ? intval($params[ 'per-page' ]) : 20;\n\n $dataProvider = new ActiveDataProvider([\n 'query' => $query,\n 'pagination' => [ 'pageSize' => $pageSize, ],\n ]);\n\n $dataProvider->sort->attributes[ 'title' ] = [\n 'asc' => [ 'content_slug.title' => SORT_ASC ],\n 'desc' => [ 'content_slug.title' => SORT_DESC ],\n ];\n\n $dataProvider->sort->attributes[ 'slug' ] = [\n 'asc' => [ 'content_slug.slug' => SORT_ASC ],\n 'desc' => [ 'content_slug.slug' => SORT_DESC ],\n ];\n\n return $dataProvider;\n }", "public function scopeContent($query, $content)\n {\n return $query->where('content', 'LIKE', $content);\n }", "public function searchNews (){\n $this->news = $this->daoJson->searchFeedDate($this->keyword, \"2014-09-01\", \"2014-11-30\");\n }", "public function getContent() {}", "public function getContent() {}", "public function func_search() {}", "public static function search() {\r\n $result = lC_Default::find($_GET['q']);\r\n\r\n echo $result;\r\n }", "public function getContents();", "public function getContents();", "public function getContents();", "public function getContents();", "public function getContents();", "public function indexAction() {\n \t$form = new ContentSearchForm();\n \t$form->submit->setLabel('Search content');\n $this->view->form = $form;\n $params = $this->getCleaner()->array_cleanup($this->_getAllParams());\n $search = new Pas_Solr_Handler();\n $search->setCore('beocontent');\n $search->setFields(array(\n 'id', 'title', 'section', \n 'publishState', 'created', 'updated', \n 'type', 'createdBy', 'updatedBy'\n ));\n if($this->getRequest()->isPost() && $form->isValid($this->_request->getPost())\n && !is_null($this->_getParam('submit'))){\n if ($form->isValid($form->getValues())) {\n $params = $this->getCleaner()->array_cleanup($form->getValues());\n $this->_helper->Redirector->gotoSimple('index','content','admin',$params);\n } else {\n $form->populate($form->getValues());\n $params = $form->getValues();\n }\n } else {\n $form->populate($this->_getAllParams());\n }\n if(!isset($params['q']) || $params['q'] == ''){\n $params['q'] = '*';\n }\n $params['type'] = 'sitecontent';\n $search->setParams($params);\n $search->execute();\n $this->view->paginator = $search->createPagination();\n $this->view->contents = $search->processResults();\n }", "public function searchAction()\n {\n $user_id = $this->getSecurityContext()->getUser()->getId();\n $drive = $this->_driveHelper->getRepository()->getDriveByUserId($user_id);\n\n $q = $this->getScalarParam('q');\n // $hits = $this->getResource('drive.file_indexer')->searchInDrive($q, $drive->drive_id);\n $hits = $this->getResource('drive.file_indexer')->search($q);\n\n echo '<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />';\n echo '<strong>', $hits->hitCount, '</strong> hits<br/>';\n foreach ($hits->hits as $hit) {\n $file = $this->_driveHelper->getRepository()->getFile($hit->document->file_id);\n if (empty($file)) {\n echo 'Invalid file ID: ', $hit->document->file_id;\n }\n if ($file && $this->_driveHelper->isFileReadable($file)) {\n echo '<div>', '<strong>', $file->name, '</strong> ', $this->view->fileSize($file->size), '</div>';\n }\n }\n exit;\n }" ]
[ "0.74671775", "0.71551275", "0.68631434", "0.67409915", "0.6718302", "0.66995513", "0.6674076", "0.6674076", "0.66134167", "0.6576541", "0.64848924", "0.64848924", "0.6457869", "0.631924", "0.62817067", "0.6259428", "0.6253272", "0.6231644", "0.6219697", "0.6219697", "0.6218913", "0.61929286", "0.6181226", "0.6163745", "0.61351776", "0.6085293", "0.6082288", "0.6071741", "0.60086936", "0.6008047", "0.60074663", "0.59916705", "0.59912175", "0.5979618", "0.59216326", "0.59187144", "0.59187144", "0.59187144", "0.59187144", "0.59187144", "0.59187144", "0.59187144", "0.59187144", "0.59187144", "0.59187144", "0.59187144", "0.59187144", "0.59187144", "0.59187144", "0.59187144", "0.59187144", "0.59187144", "0.59187144", "0.5901137", "0.5892879", "0.5887217", "0.5887121", "0.58743703", "0.5873314", "0.5873314", "0.5864329", "0.5853045", "0.5839166", "0.5834783", "0.58289903", "0.58270925", "0.58083", "0.5796783", "0.5783676", "0.5778484", "0.57751924", "0.5774587", "0.57733285", "0.57663995", "0.57609445", "0.5746694", "0.57409245", "0.5731339", "0.57166296", "0.57135344", "0.5698121", "0.569754", "0.56944644", "0.5691135", "0.5691135", "0.56853235", "0.567674", "0.56644464", "0.565859", "0.5655341", "0.5655341", "0.5649886", "0.5648771", "0.56486475", "0.56486475", "0.56486475", "0.56486475", "0.56486475", "0.56439847", "0.5640325" ]
0.6296356
14
used to search for title
function titleSearch(&$searchObj, &$searchResObj) { try { $pdo = new PDO(DBCONNSTRING, DBUSER,DBPASS); $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $sql = "SELECT Title, Message, PostID FROM travelpost WHERE Title LIKE '%$searchObj->searchField%'"; $result = $pdo->query($sql); $count = 0; while ($row = $result->fetch()) { $searchResObj[$count] = new searchResult(); $searchResObj[$count]->searchTitle = $row['Title']; $searchResObj[$count]->searchMessage = $row['Message']; $searchResObj[$count]->searchPostID = $row['PostID']; $count++; } } catch (PDOexception $e) { ERROR_PAGE(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function searchByTitle($title){\n $name = $title['search'];\n return db()->QUERY(\"SELECT * FROM posts WHERE title LIKE '%$name%' ORDER BY title\");\n }", "function edan_search_set_title( $title )\n {\n $options = new esw_options_handler();\n $cache = new esw_cache_handler();\n\n /**\n * if in the loop and the title is cached (or if object group is retrieved successfully)\n * modify the page title on display.\n */\n if(in_the_loop() && edan_search_name_from_url() == $options->get_path() && $options->get_title() != '')\n {\n if(get_query_var('edanUrl'))\n {\n $object = $cache->get()['object'];\n\n if($object)\n {\n if(property_exists($object, 'content') && property_exists($object->{'content'}, 'descriptiveNonRepeating'))\n {\n if(property_exists($object->{'content'}->{'descriptiveNonRepeating'}, 'title'))\n {\n $title = $object->{'content'}->{'descriptiveNonRepeating'}->{'title'}->{'content'};\n }\n }\n elseif(property_exists($object, 'title'))\n {\n if(property_exists($object->{'title'}, 'content'))\n {\n $title = $this->object->{'title'}->{'content'};\n }\n else\n {\n $title = $this->object->{'title'};\n }\n }\n }\n }\n else\n {\n $title = $options->get_title();\n }\n }\n\n return $title;\n }", "public function testSearchFindTitle()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/')\n ->waitForText('Buscar:')\n ->keys(\"input[type='Search']\", 'super')\n ->waitForText('Exibindo 1 até 2 de 2 registros')\n ->assertSee('Batman vs Superman: A Origem da Justiça')\n ->assertSee('Dragon Ball Super: Broly');\n });\n }", "function getTitle() ;", "public function searchTitle($title) {\n try {\n // escape quotes\n $checkTitle = str_replace(\"'\", \"''\", $title);\n // search the database, using wildcards\n $sql = \"SELECT * FROM books WHERE title LIKE '%$checkTitle%' ORDER BY author\";\n $stmt = $this->conn->query($sql);\n \n // fetch results as numeric array\n $result = $stmt->setFetchMode(PDO::FETCH_NUM);\n // show results in a list of update forms\n echo \"<br /><div id='searchResult'><h3>Title: -$title-</h3><ul>\";\n while ($row = $stmt->fetch()) {\n // call result form function\n $this->echoResultForm($row);\n }\n echo \"</ul></div>\";\n }\n catch(PDOException $e) {\n echo $e->getMessage();\n }\n }", "function getTitle()\n\t{\n\t\t\n\t\t$query = new Bin_Query();\t\n\t\t$title=$_GET['word'];\n\t\tif($title!='')\n\t\t{\n\t\t\t$sql= \"SELECT title FROM products_table WHERE title like '\".$title.\"%'\"; \n\t\t\t$query->executeQuery($sql);\n\t\t\t$arr=$query->records;\n\t\t\treturn Display_DManageProducts::getTitle($query->records);\t\t\t\t\t\n\t\t}\t\n\n\t}", "function test_general_entries_search_on_post_title() {\n\t\t$search_string = \"Jamie's\";\n\t\t$items = self::generate_and_run_search_query( 'create-a-post', $search_string );\n\t\t$msg = 'A general search for ' . $search_string . ' in posts table';\n\t\tself::run_entries_found_tests( $msg, $items, 2, array( 'post-entry-1', 'post-entry-3' ) );\n\t}", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function getTitle();", "public function get_title();", "public function searchTitleActionGet()\n {\n $title = \"Search for a movie by title\";\n $searchTitle = $this->app->request->getGet(\"searchTitle\");\n\n $this->app->db->connect();\n\n if ($searchTitle) {\n $sql = \"SELECT * FROM movie WHERE title LIKE ?;\";\n $res = $this->app->db->executeFetchAll($sql, [$searchTitle]);\n }\n\n $this->app->page->add(\"movie/search-title\", [\n \"searchTitle\" => $searchTitle,\n ]);\n if (isset($res)) {\n $this->app->page->add(\"movie/show-all\", [\n \"res\" => $res,\n ]);\n }\n\n return $this->app->page->render([\n \"title\" => $title,\n ]);\n }", "public function getByTitle()\n {\n }", "function edan_search_set_doc_title( $title )\n {\n $options = new esw_options_handler();\n $cache = new esw_cache_handler();\n\n if(edan_search_name_from_url() == $options->get_path() && $options->get_title() != '')\n {\n if(get_query_var('edanUrl'))\n {\n $object = $cache->get()['object'];\n\n if($object)\n {\n if(property_exists($object, 'content') && property_exists($object->{'content'}, 'descriptiveNonRepeating'))\n {\n if(property_exists($object->{'content'}->{'descriptiveNonRepeating'}, 'title'))\n {\n $title = $object->{'content'}->{'descriptiveNonRepeating'}->{'title'}->{'content'};\n }\n }\n elseif(property_exists($object, 'title'))\n {\n if(property_exists($object->{'title'}, 'content'))\n {\n $title = $this->object->{'title'}->{'content'};\n }\n else\n {\n $title = $this->object->{'title'};\n }\n }\n }\n }\n else\n {\n $title = $options->get_title();\n }\n }\n\n $sitename = get_bloginfo('name');\n return $title . \" - $sitename\";\n }", "public function gettitle($title){\n $xpath = new DOMXpath(self::$xmldoc);\n $search = $xpath->query(\"channel/item[text()[contains('$title', g:title)] ]/g:title\");\n $DOMsearchnode = $search->item(0);\n echo $DOMsearchnode->nodeValue;\n }", "function getTitle();", "function getTitle();", "function genesis_do_search_title() {\n\n\t$title = sprintf( '<div class=\"archive-description\"><h1 class=\"archive-title\">%s %s</h1></div>', apply_filters( 'genesis_search_title_text', __( 'Search results for: ', 'genesis' ) ), get_search_query() );\n\n\techo apply_filters( 'genesis_search_title_output', $title ) . \"\\n\";\n\n}", "abstract protected function getTitle();", "function test_field_specific_search_on_post_title() {\n\n\t\t// Single word. Two matching entries should be found.\n\t\t$search_string = \"Jamie's\";\n\t\t$field_key = 'yi6yvm';\n\t\t$items = self::generate_and_run_field_specific_query( 'create-a-post', $field_key, $search_string );\n\t\t$msg = 'A search for ' . $search_string . ' in post title field ' . $field_key;\n\t\tself::run_entries_found_tests( $msg, $items, 2, array( 'post-entry-1', 'post-entry-3' ) );\n\n\t\t// Single word. No entries should be found.\n\t\t$search_string = 'TextThatShouldNotBeFound';\n\t\t$items = self::generate_and_run_field_specific_query( 'create-a-post', $field_key, $search_string );\n\t\t$msg = 'A search for ' . $search_string . ' in post title field ' . $field_key;\n\t\tself::run_entries_not_found_tests( $msg, $items );\n\t}", "function get_title()\n {\n }", "abstract function processTitle($title);", "abstract public function getTitle();", "abstract public function getTitle();", "abstract public function getTitle();", "function fetch_title($_url=\"\"){ \n if($_url&&$this-> fetch($_url)){\n $html = str_get_html($this-> html);\n return $html->find('title',0)->plaintext;\n }\n return false;\n }", "function uvasomrfd_do_search_title() {\n\t$term = get_term_by( 'slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) );\n\tif(!is_page('27718')){\n\t//if (!strpos($_SERVER[\"REQUEST_URI\"], 'faculty-mentoring-undergraduates')) {\n\tif (is_tax( 'primary')||is_tax( 'training-grant')) {$preterm='Department of ';}\n\tif (is_tax( 'research-discipline')) {$preterm='Research Discipline: ';}\n\tif (is_tax( 'training-grant')) {$preterm='Training Program: ';}\n\t//if (strpos($_SERVER[\"REQUEST_URI\"], '?undergraduates')){$preterm='Faculty Accepting Undergraduates';$term->name='';}\n$title = sprintf( '<div class=\"clearfix\"></div><div id=\"uvasom_page_title\">'.genesis_do_breadcrumbs().'<h1 class=\"archive-title\">%s %s</h1>', apply_filters( 'genesis_search_title_text', __( $preterm, 'genesis' ) ), $term->name).'</div>';\n\techo apply_filters( 'genesis_search_title_output', $title ) . \"\\n\";\n\t}\n}", "public static function title( $title )\r\n {\r\n return array_search ( $title, self::choices() );\r\n }", "public function getTitle() {}", "public function getTitle() {}", "public function getTitle() {}", "public function getTitle() {}", "public function getTitle() {}", "public function getTitle() {}", "public function getTitle() {}", "public function getTitle() {}", "public function getTitle() {}", "public function getTitle() {}", "public function getTitle() {}", "public function getTitle() {}", "public function getTitle() {}", "public function getTitle() {}", "public function getTitle() {}", "public abstract function getTitle();", "function get_title() \t{\n \t\treturn $this->title;\t\n \t}", "public function searchItem($title) {\n \n //Create Database conexion\n }", "public function set_searchtitle($param)\n\t{\n\t\t$this->searchtitle = (string)$param;\n\t\treturn $this;\n\t}", "public function get_title()\n {\n }", "public function get_title()\n {\n }", "public static function search($title)\n {\n\n self::dbConnect();\n\n $query = \"select * from \" . self::$table . \" where title like :title\";\n\n $stmt = self::$dbc->prepare($query);\n\n\t\t$title = \"%\" . $title . \"%\";\n\n $stmt->bindValue(':title', $title, PDO::PARAM_STR);\n $stmt->execute();\n\n $results = $stmt->fetchAll(PDO::FETCH_ASSOC);\n\n\n return $results;\n\n\n }", "public function getElementTitle(array $args){\r\n\t $args = Utility_Functions::argsToArray($args);\r\n\t $args = Utility_Functions::cleanArgsValue($args);\r\n\t \r\n\t $searchFor = $args[\"text\"];\r\n\t $typeArr = explode(\"-\", $args[\"type\"]);\r\n\t\r\n\t $type = trim($typeArr[0]);\r\n\t \r\n\t if($type == 1){\r\n\t $model = new Table_BlogArticles();\r\n\t }else{\r\n\t $model = new Table_Receipts();\r\n\t } \r\n\t\r\n\t $foundData = $model->selectAutocomplete(array(\"title\" => array(\" like \" => \"%$searchFor%\")), null);\r\n\t\r\n\t echo $this->_toJson($foundData->toArray());\r\n\t}", "function get_post_title($post, $field, $post_id = 0, $is_search = 0)\n {\n }", "function get_post_title($post, $field, $post_id = 0, $is_search = 0)\n {\n }", "function get_post_title($post, $field, $post_id = 0, $is_search = 0)\n {\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 }", "function sql_search_relative_titles($mastertitle,$field2check) {\n $db = GetGlobal('db');\t\n\t $lan = $lang?$lang:getlocal();\n\t $itmname = $lan?'itmname':'itmfname';\n\t $itmdescr = $lan?'itmdescr':'itmfdescr';\n\t\t$remarks = 'itmremark';\t\n\t\t$sqlout = null;\t\t\n\t\n\t $mt = explode(' ',trim($mastertitle));\n //print_r($mt);\n $sSQL = \"select \".$this->getmapf('code').\" from products where \"; //whole words...\n\t\t \t\t\n\t foreach ($mt as $i=>$lex) {\n\t\t\n\t\t if (($la = trim($lex)) && (strlen($la)>4)) {//words max than 4 chars\n\t\t\n\t\t $ulex = strtoupper($lex);\n\t\t $dlex = strtolower($lex);\n \n\t\t $sqlout[$lex] = \"$itmname like '%$lex%' \";// or $itmdescr like '%$lex%' or $remarks like '%$lex%'\";// or \"; //as is\n\t\t //$sSQL .= \"$itmname like '% $ulex %' or $itmdescr like '% $ulex %' or $remarks like '% $ulex %' or \"; //upper case\t\t\n\t\t //$sSQL .= \"$itmname like '% $dlex %' or $itmdescr like '% $dlex %' or $remarks like '% $dlex %'\"; //lower case\t\t\n\t\t \n\t\t }//if lex\n\t\t} \n\t\t\n //print_r($sqlout); \n\t\tif ($sqlout) {\n\t\t $sSQL .= implode(' or ',$sqlout);\t\t \n\t\t return ($sSQL);\n\t\t}\n\t\telse\n\t\t return null;\n\t}", "function search_results_title() {\r\n if( is_search() ) {\r\n \r\n global $wp_query;\r\n \r\n if( $wp_query->post_count == 1 ) {\r\n $result_title .= '1 search result found';\r\n } else {\r\n $result_title .= 'Showing ' . $wp_query->found_posts . ' results';\r\n }\r\n \r\n $result_title .= \" for “<span style='color:#e83936;'>\" . wp_specialchars($wp_query->query_vars['s'], 1) . \"</span>”\";\r\n \r\n echo $result_title;\r\n \r\n }\r\n}", "public function getSearchTitle()\n {\n return $this->_sSearchTitle;\n }", "function find_all_product_info_by_title($title){\n global $db;\n $sql = \"SELECT * FROM products \";\n $sql .= \" WHERE name ='{$title}'\";\n $sql .=\" LIMIT 1\";\n return find_by_sql($sql);\n }", "public function title();", "public function title();", "function getTitle($url) {\n $str = file_get_contents($url);\n /* RegEx erzeugt ein Array in dem Der Seitentitel auf Index 1 liegt */\n preg_match('/\\<title\\>(.*)\\<\\/title\\>/', $str, $title);\n /* Seitentitel aus Index 1 zurückgeben */\n return $title[1];\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 setTitle($title);", "public function setTitle($title);", "public function setTitle($title);", "public function setTitle($title);", "public function setTitle($title);", "public function setTitle($title);", "public function setTitle($title);", "public function searchRecipesTitle($query) {\n $query = '%'.$query.'%';\n $this->db->query('SELECT * FROM recipes WHERE ( title LIKE ? )');\n $this->db->bind(1, $query);\n return $this->db->resultSet();\n }", "public function search($title)\n {\n return Posts::where('title', 'LIKE', '%' . $title . '%')->get();\n }", "function title_query() {\n $titles = array();\n\n $result = db_query(\"SELECT f.title FROM {aggregator_feed} f WHERE f.fid IN (:fids)\", array(':fids' => $this->value));\n foreach ($result as $term) {\n $titles[] = check_plain($term->title);\n }\n return $titles;\n }", "public function get_title() { return $this->title; }", "function titleReader($entry_title){\r\n\t\t\tif($entry_title!=\"\"){\r\n\t\t\t\techo $entry_title;\r\n\t\t\t}else{\r\n\t\t\t\techo 'untitled post';\r\n\t\t\t}\r\n\t\t}", "public function search()\n {\n auth_admin();\n $s_title = myUrlEncode(trim($this->input->post('s_title')));\n redirect($this->path_uri . '/main/a' . $s_title);\n }", "function regexgettitle($text, $rule=''){\n\t\t\t\t\t\t\t\t//make sure we call regexnoweirdwhite first on the text\n\t\t\t\t\t\t\t\t//regexnoweirdwhite removes spaces from around the < and > characters\n\t\t\t\t\t\t\t\t//regexnoweirdwhite also makes all runs of white spaces including breaks and nbsps into single spaces\n\t$regex_pattern=\"/<title\\s?[^>]*>(.+?)<\\/\\s?title>/i\";\t//will search for anything between and including the title tags (text insensitive)\n\t\t\t\t\t\t\t\t\t\t\t\t//the period followed by the plus will match any number of any characters\n\t\t\t\t\t\t\t\t\t\t\t\t//placing it within the parentheses will allow us to get just the title without grabbing the tags too\n\t$title=\"\";\n\tif(preg_match($regex_pattern,$text,$match))$title=$match[1];\n\t//get rid of unneeded spaces\n\t$title=regexspacecleaner($title);\n\treturn $title;\t\n}", "function getBasicDetailsByTitle($sek_title)\r\n {\r\n $log = FezLog::get();\r\n $db = DB_API::get();\r\n\r\n $stmt = \"SELECT\r\n *\r\n FROM\r\n \" . APP_TABLE_PREFIX . \"search_key\r\n WHERE \";\r\n if (is_numeric(strpos(APP_SQL_DBTYPE, \"pgsql\"))) { //pgsql is case sensitive\r\n $stmt .= \" sek_title ILIKE \" . $db->quote($sek_title);\r\n } else {\r\n $stmt .= \" sek_title=\" . $db->quote($sek_title);\r\n }\r\n try {\r\n $res = $db->fetchRow($stmt, array(), Zend_Db::FETCH_ASSOC);\r\n }\r\n catch (Exception $ex) {\r\n $log->err($ex);\r\n return '';\r\n }\r\n $res['sek_title_db'] = Search_Key::makeSQLTableName($res['sek_title']);\r\n return $res;\r\n }", "public function getTitle() {\n\t\treturn $this->title;\t\n\t}", "public function get_title(){\n\t\treturn $this->title;\n\t}", "public function get_title(){\n\t\treturn $this->title;\n\t}", "function getTitle() {\r\n return $this->_title;\r\n }", "function getTitle() {\r\n return $this->_title;\r\n }", "public static function title();", "function set_ac_search_args_title( $ep_formatted_args, $args ) {\n\t\n\tif( isset( $args['autocomplete'] ) && $args['autocomplete'] ) {\n\t\t$titleSearchTerm = '';\n\t\t\n\t\t\t$titleSearchTerm = strtolower($args['s']); \n\t\t\n\t\t\t$ep_formatted_args['query'] = array(\n\t\t\t\t\"match_phrase_prefix\" => array(\n\t\t\t\t\t\"post_title.suggest\" => array(\n\t\t\t\t\t\t\"query\" => $titleSearchTerm,\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\n\treturn $ep_formatted_args;\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 searchByTitle($DocTitle)\n { \n $query = \"SELECT DocID, DocTitle, `Path`, `Blob`, Url, Description, CreatedDate, LastEditDate, SortOrder FROM Docs WHERE DocTitle like '%\".$DocTitle.\"%' ;\"; \n $stmt = $this->conn->prepare( $query );\n\n // execute query\n $stmt->execute();\n return $stmt;\n }", "function return_title($source) {\r\n preg_match('@((<title\\s*)([a-zA-Z]+=(\"|\\')?[a-zA-Z0-9_-]*(\"|\\')?\\s*)*\\>)([a-zA-Z0-9()-_\\s.:|&#;]*)(</title>)@',$source, $output);\r\n\treturn html_entity_decode(strip_tags(trim($output[0])));\r\n}", "function title($title) {\r\n\t\tif (!defined('IS_UWR1RESULTS_VIEW')) {\r\n\t\t\treturn $title;\r\n\t\t}\r\n\r\n\t\t$season = Uwr1resultsController::season();\r\n\t\t$season = $season.'/'.($season+1); // TODO: make a function for that\r\n\r\n\t\t$view = Uwr1resultsController::WhichView();\r\n\t\tif ('index' == $view) {\r\n\t\t\t$title = 'Unterwasserrugby Liga Ergebnisse der Saison '.$season;\r\n\t\t} else if ('league' == $view) {\r\n\t\t\t$title = 'Ergebnisse der ' . Uwr1resultsModelLeague::instance()->name() . ' (Saison ' . $season . ')';\r\n\t\t} else if ('tournament' == $view) {\r\n\t\t\t$title = 'Ergebnisse des UWR Turniers ' . Uwr1resultsModelLeague::instance()->name();\r\n\t\t}\r\n\t\treturn $title;\r\n\t}" ]
[ "0.76616776", "0.76014113", "0.75062275", "0.7358372", "0.73009014", "0.72854674", "0.72344375", "0.7219113", "0.7219113", "0.7219113", "0.7219113", "0.7219113", "0.7219113", "0.7219113", "0.7219113", "0.7219113", "0.7219113", "0.7219113", "0.7219113", "0.7219113", "0.7219113", "0.7219113", "0.7207485", "0.71626747", "0.7152866", "0.71289164", "0.7119853", "0.70973223", "0.70973223", "0.708757", "0.7007564", "0.69910705", "0.69736147", "0.69376826", "0.693398", "0.693398", "0.693398", "0.6932437", "0.6929893", "0.69283384", "0.688881", "0.68875504", "0.68875504", "0.68875504", "0.68875504", "0.68875504", "0.68875504", "0.68875504", "0.68875504", "0.68875504", "0.68875504", "0.68875504", "0.68875504", "0.68841183", "0.68841183", "0.6863537", "0.6835973", "0.68177", "0.6813288", "0.67999333", "0.6798372", "0.6742679", "0.6734447", "0.67089725", "0.67089725", "0.67089725", "0.6705891", "0.6698965", "0.66900295", "0.6663835", "0.66525406", "0.66373813", "0.66373813", "0.6633946", "0.66328776", "0.66217184", "0.66217184", "0.66217184", "0.66217184", "0.66217184", "0.66217184", "0.66217184", "0.657455", "0.65700626", "0.6521162", "0.6518544", "0.65122664", "0.6499679", "0.64915276", "0.64887327", "0.6478028", "0.646951", "0.646951", "0.6467252", "0.6467252", "0.6463383", "0.6456111", "0.6438392", "0.64354724", "0.6433389", "0.64185476" ]
0.0
-1
Exibe o destaque de conteudo
function smarty_function_PUBLICA_Blog_printTags($params, &$smarty) { global $conexao; // Defines SECTION ID if(!isset($params['blogSectionID']) || !is_numeric($params['blogSectionID'])) { $params['blogSectionID'] = $smarty->_tpl_vars['SECAO']; } if(is_null($params['blogSectionID']) || !is_numeric($params['blogSectionID']) || $params['blogSectionID'] <= 0) return; // Defines LANGUAGE ID if(!isset($params['languageId']) || !is_numeric($params['languageId'])) { $params['languageId'] = $smarty->_tpl_vars['IDIOMA']; } if(is_null($params['languageId']) || !is_numeric($params['languageId']) || $params['languageId'] <= 0) return; // Defines DB Entity's TAG field if(!isset($params['blogTagField']) || empty($params['blogTagField'])) return; // Defines LINK SEPARATOR if(!isset($params['linkSeparator']) || empty($params['linkSeparator'])) { $params['linkSeparator'] = '<br /><br />'; } // Defines QUERY LIMIT if(!isset($params['tableLimit']) || empty($params['tableLimit'])) { $params['tableLimit'] = 50; } // Gets BLOG TAGS data $objSection = fnConfigSecao($params['blogSectionID']); $strWhere = str_replace('bb_delete' ,$objSection->bt_tabela.'.bb_delete' ,REFINAMENTO); $strWhere = str_replace('bb_ativo' ,$objSection->bt_tabela.'.bb_ativo' ,$strWhere); $strWhere = str_replace('bd_publicacao' ,$objSection->bt_tabela.'.bd_publicacao',$strWhere); $strWhere = str_replace('bd_expiracao' ,$objSection->bt_tabela.'.bd_expiracao' ,$strWhere); $strWhere .= ' AND ' . $objSection->bt_tabela . '.tb_idioma_bn_id = ' . $params['languageId']; $strWhere .= ' AND ' . $objSection->bt_tabela . '.' . $params['blogTagField'] .' != ""'; $strWhere .= ' AND ' . $objSection->bt_tabela . '.' . $params['blogTagField'] .' IS NOT NULL'; $strQuery = 'SELECT '.$params['blogTagField'].' FROM '.$objSection->bt_tabela.' WHERE '.$strWhere.' LIMIT '.$params['tableLimit'].';'; $arrQuery = $conexao->getCol($strQuery); $strTags = implode(',',$arrQuery); // Configures TAG link $arrTags = explode(',',$strTags); $arrTags = array_unique($arrTags); // Sets HREF link for each tag foreach($arrTags AS &$strTag) { $strTag = '<a href="'.HTTP_DINAMICO.'/index.php?'.IN_SECAO.'='.$smarty->_tpl_vars['SECAO'].'&'.IB_BUSCA.'=1&'.$params['field'].'='.trim(strtolower($strTag)).'">'.trim(strtolower($strTag)).'</a>'; } return implode($params['linkSeparator'],$arrTags); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function copiardespesasAction () {\n // exercicio a ser copiado\n $ano = $this->_getParam('cod');\n\n // sem ano\n if (!$ano) {\n $this->erroOperacao(Orcamento_Business_Dados::MSG_COPIARDESPESA_ERRO . ' Ano Exercicio não informado!');\n $this->voltarIndexAction();\n }\n\n // Verifica o status do exercicio e altera o valor base do exercicio anterior dinamico - RN150\n $permitidos = array(\n Trf1_Orcamento_Definicoes::FASE_EXERCICIO_EM_EXECUCAO, /* 5 */\n Trf1_Orcamento_Definicoes::FASE_EXERCICIO_ENCERRADO, /* 6 */\n Trf1_Orcamento_Definicoes::FASE_EXERCICIO_EM_APROVACAO /* 7 */\n );\n\n // instancia de despesa\n $facade = new Orcamento_Facade_Despesa();\n\n // Retorna fase do exericio\n $modelfase = new Orcamento_Business_Negocio_FaseAnoExercicio();\n $fase = $modelfase->retornaFasePorExercicio($ano);\n\n $existe = in_array($fase, $permitidos);\n // Se não esta nos permitidos altera o campo valor - RN150\n if (!$existe) {\n // copia com ajuste\n $resultado = $facade->copiaDespesas($ano, $fase);\n } else {\n // copia normalmente\n $resultado = $facade->copiaDespesas($ano);\n }\n\n\n\n // Define mensagem de sucesso\n $anoAnterior = $ano - 1;\n\n $msgSucesso = \"\";\n $msgSucesso .= \"<br />\";\n $msgSucesso .= \"Foi(ram) copiada(s) \";\n $msgSucesso .= $resultado ['qtdeRegistrosAfetados'][0];\n $msgSucesso .= \" despesa(s) do exercício de \";\n $msgSucesso .= $anoAnterior;\n $msgSucesso .= \" para \";\n $msgSucesso .= $ano;\n $msgSucesso .= \".\";\n\n // se não copiar\n if (!$resultado ['sucesso']) {\n// exiber o motivo caso n efetue a copia da despesa\n// $this->erroOperacao ( Orcamento_Business_Dados::MSG_COPIARDESPESA_ERRO . $resultado ['msgErro' ] );\n $this->erroOperacao(Orcamento_Business_Dados::MSG_COPIARDESPESA_ERRO);\n } else {\n $this->_helper->flashMessenger(array(message => Orcamento_Business_Dados::MSG_COPIARDESPESA_SUCESSO . $msgSucesso, 'status' => 'success'));\n }\n\n // redireciona\n $this->voltarIndexAction();\n }", "function destructor(){\n\t\t$this->bd->desconectar();\n\t//Fix: sólo para navegadores con soporte HTTP1.1\n\t//header('Content-Length: ' . ob_get_length());\n\t\tob_end_flush();\n\t}", "public function endClipboard() {}", "function copiant($nombreArchivo,$Destino){\n if(!copy($nombreArchivo,$Destino))\n print(\"\\n<br>Ocurrio un error mientras se intentaba copiar el archivo $nombreArchivo !!\");\n else \n print(\"\\n<br>El archivo $nombreArchivo Se Copio Correctamente\");\n}", "public function videoconferenciaDesconectado( ) {\n $this->setComando(\"DESCONECTADO\");\n }", "function sentFile($nombre, $contenido, $mimetype=\"text/plain\"){\n\t\theader(\"Content-type: $mimetype; charset=UTF-8 \");\n\t\theader(\"Content-Disposition: attachment; filename=\".$nombre);\n\t\theader(\"Pragma: no-cache\");\n\t\theader(\"Expires: 0\");\n\t\t\n\t\texit($contenido);\n\t}", "public function cerrar(){\n\t\tfclose($this->archivo);\n\t}", "function cargar($sender, $param)\n {\n if($sender->HasFile) \t \n $carpeta=$this->t1->text;\n $ruta=\"attach/archivo/\".$carpeta.\"/\";//ruta donde se guardan los adjuntos que se han subido \n $this->t2->text=$this->t2->text.\"$ruta$sender->FileName\".\"\\n\";\n $sender->saveAs($ruta.$sender->FileName);\n }", "function cancelar()\r\n\t{\r\n\t\t$this->_log->debug( $this->get_txt() . \"[ cancelar ]\", 'toba');\r\n\t\t$this->limpiar_memoria();\r\n\t}", "function descompactaPasta($arquivo, $destino=NULL){\n //print \"$arquivo\\n\";\n $zip = zip_open($arquivo);\n if($zip){\n while($oZip = zip_read($zip)){\n $nome \t\t = zip_entry_name($oZip);\n $tamanhoAtual \t = zip_entry_filesize($oZip);\n $tamanhoComprimido = zip_entry_compressedsize($oZip);\n\n // ========= Operacoes =============\n if((int)$tamanhoAtual == 0 && (int)$tamanhoComprimido == 0){\n $dir = $destino.$nome;\n if(!file_exists($dir)) mkdir($dir);\n }\n else{\n if(zip_entry_open($zip, $oZip, \"r\")){\n $fp = fopen($destino.$nome, \"w\");\n fputs($fp, zip_entry_read($oZip, zip_entry_filesize($oZip)));\n fclose($fp);\n zip_entry_close($oZip);\n }\n else{\n return false;\n }\n }\n }\n zip_close($zip);\n }\n else{\n return false;\n }\n return true;\n }", "public function closeTransferDestination();", "function writeContent ($filetype1, $pathbase, $outputFile, $msgToRegister) {\n global $GROUP, $WRITEMSG, $OVERWRITE;\n\n $pathbase = \"/var/www/html/saw/mod/iassign/ilm_debug/\"; // \"/mod/iassign/ilm_debug/\";\n $outputFile = $pathbase . $outputFile;\n\n if (!is_writable($pathbase)) { // TRUE se arquivo existe e pode ser escrito\n // $file_debug .= \"Error: '\" . $completfilepath . \"' could not be registered! Perhaps the directory or the file has permission problem?<br/>\\n\";\n //D echo \"$outputFile, $filetype1<br/>\";\n print \"Erro! Problema de acesso ao servidor! Por favor, avise ao administrador (<tt>$pathbase</tt> nao acessivel para escrita).<br/>\"; // . $file_debug . \"\n exit(0);\n }\n\n // $result = writeContent(\"file\", $pathbase, $filename, $msgToRegister);\n // print \"escreva.php: result=$result<br/>\";\n\n // write personal email file\n // To write: verify if the file does not exists or have permission to overwrite\n if (is_file($outputFile)) { // already exist this file\n // $outputFile .= $outputFile . '_' . date('Y_m_d_h_m');\n } // if (is_file($outputFile))\n\n if (1==1) { // write/overwrite the file\n $fpointer = fopen($outputFile, \"w\"); // write - if executed, it clear the previou content at this file\n if (!$fpointer) {\n $file_debug .= \"Erro: nao foi possivel abrir o roteiro ($outputFile)!<br/>\\n\";\n // it was not possible to open the file '$completfilepath\" . $file_name . \"'!<br/>\\n\";\n print \"<br/>\" . $file_debug . \"<br/>\\n\";\n //D echo \"writeContent: $filetype1, outputFile=$outputFile<br/>\\n\";\n return 0;\n }\n fwrite($fpointer, $msgToRegister . \"\\n\");\n // echo \" - outputFile=$outputFile : WRITEMSG=$WRITEMSG, OVERWRITE=$OVERWRITE, gerado com sucesso!<br/>\\n\";\n fclose($fpointer);\n }\n else {\n // print \"Nao gera os arquivos personalizados para email aos alunos ('$outputFile')<br/>\\n\"; // admin/<turma>/<N>_<name>.txt\n }\n\n return 1;\n }", "function _guardarFichero($fichero, $datos) {\n\t\tif ( $this->comprimir )\n\t\t @gzwrite($fichero, $datos);\n\t\telse\n\t\t @fwrite($fichero, $datos);\n\t\t$this->escrito = true;\n\t}", "public function enrutando()\n\t\t{\n\t\t\t$metodo \t\t\t= $this->_metodo;\n\t\t\t$argumentos \t\t= $this->_argumentos;\n\t\t\t$controlador \t\t= $this->_controlador;\n\t\t\t$claseControlador \t= $controlador . 'Controlador';\n\t\t\t$rutaControlador \t= ROOT . 'controlador' . DS . $claseControlador . '.php';\n\n\t\t\tif (!is_readable($rutaControlador)) {\n\t\t\t\theader(\"Location: \" . BASE_URL . 'accesos/paginaVacia/');\n\t\t\t}\n\t\t\telse{\n\t\t\t\tControlador::cargarControlador($rutaControlador,$claseControlador,$metodo,$argumentos);\n\t\t\t}\n\n\t\t}", "public function deleteContentAndCopyLivePage() {}", "public function endContent() {\n $this->content(ob_get_clean());\n }", "public function videoconferenciaColgado( ) {\n $this->delAllNumeroIP();\n $this->setComando(\"COLGADO\");\n }", "private function deleteTempFile() {\n if ($this->datastreamInfo['content']['type'] == 'file' && $this->copied == TRUE) {\n unlink($this->datastreamInfo['content']['content']);\n }\n }", "public function galeriasExcluir_action()\n\t{\n\t\t$bd = new GaleriasImagens_Model();\n\t\t$id = abs((int) $this->getParam(2));\n\t\t$resultado = $bd->read(\"id={$id} AND usuario={$this->_usuario}\");\n\t\tunlink('uploads/img_'.$resultado[0]['imagem']);\n\t\tunlink('uploads/tb_'.$resultado[0]['imagem']);\n\t\tunlink('uploads/destaque_'.$resultado[0]['imagem']);\n\t\t$bd->delete(\"id={$id} AND usuario={$this->_usuario}\");\n\t\tHTML::certo('Imagem exclu&iacute;da.');\n\t\t//POG Temporário\n\t\tHTML::Imprime('<script>Abrir(\"#abreImagemGaleria\",\"#imagens\");</script>');\n\t}", "public function response(){\n\t\t\t\n\t\t\t\tif( !empty($this->errores)){\n\t\t\t\t\techo '<u>Lista de errores:</u> <br />';\n\t\t\t\t\techo $this->errores;\n\t\t\t\t}else{\n\t\t\t\t\t//mail($destinatario1, $asunto, $msj);\n\t\t\t\t\t//mail($destinatario2, $asunto, $msj);\n\t\t\t\t\techo \"Mensaje enviado con exito\";\n\t\t\t\t\techo \"<script type='text/javascript'> parent.document.formu.reset(); </script>\"; \n\t\t\t\t}\n\t\t\t}", "public function concluir()\r\n {\r\n $this->renderView('correo/final');\r\n }", "public function enviarNuestroSonido( ) {\n $cmd = new ComandoFlash(\"VIDEOCONFERENCIA\",\"NUESTRO_SONIDO\",$this->getNuestroSonido());\n $this->enviarPeticion($cmd->getComando());\n\n }", "final public function borrar() {\n global $config;\n # Verificar que no se borre a sí mismo.\n if ($this->id != $this->id_user) {\n \n # Se borra al usuario\n $this->db->delete('users',\"id_user='$this->id'\", 'LIMIT 1');\n\n # Directorio real\n $dir = str_replace('{{id_user}}',$this->id,\n str_replace('../', '', self::AVATARS_DIR));\n\n # Si tiene archivos, los borramos\n if (is_dir($dir)) {\n Files::rm_dir($dir);\n }\n }\n\n # Volvemos a la vista\n $this->functions->redir($config['site']['url'].'admins/?success=true');\n\n }", "public function ejecutar(){\r\n\t\tmove_uploaded_file($this->carpeta_temporal,$this->carpeta_destino.$this->nuevo_nombre_imagen);\r\n\t\tchmod($this->carpeta_destino.$this->nuevo_nombre_imagen, 0777);\r\n\t\techo $this->carpeta_temporal;\r\n\t\techo \"<br>\";\r\n\t\t$this->carpeta_donde_esta_imagen=$this->carpeta_destino.$this->nuevo_nombre_imagen;\r\n\t\techo $this->carpeta_donde_esta_imagen;\r\n\t}", "public function MoverFicha() \n {\n echo 'Mover ficha';\n }", "public function silo_contents()\n\t{\n\t}", "protected function finish() {}", "function excluir_imagem_publicacao(){\n\t\t\n\t\t// tabela\n\t\t$tabela = TABELA_IMAGENS_ALBUM;\n\t\t\n\t\t// id\n\t\t$id = remove_html($_REQUEST['id']);\n\t\t\n\t\t// valida id e usuario administrador\n\t\tif($id == null or retorne_usuario_administrador() == false){\n\t\t\t\n\t\t\t// retorno nulo\n\t\t\treturn null;\n\t\t\t\n\t\t};\n\t\t\n\t\t// query\n\t\t$query[0] = \"select *from $tabela where id='$id';\";\n\t\t$query[1] = \"delete from $tabela where id='$id';\";\n\t\t\n\t\t// dados\n\t\t$dados = retorne_dados_query($query[0]);\n\t\t\n\t// pasta de usuario\n\t$pasta_usuario = retorne_pasta_usuario($dados['idusuario'], 2, true);\n\t\n\t// separa os dados\n\t$url_imagem = $pasta_usuario.basename($dados['url_imagem']);\n\t$url_imagem_miniatura = $pasta_usuario.basename($dados['url_imagem_miniatura']);\n\t\n\t// excluindo arquivo\n\texclui_arquivo_unico($url_imagem);\n\texclui_arquivo_unico($url_imagem_miniatura);\n\t\n\t// comando executa\n\tcomando_executa($query[1]);\n\t\n\t}", "public function cleanCopy();", "public function sendContent();", "function enviarEmail($destinatario,$asunto,$cuerpo) {\r\n\r\n\r\n\t# Defina el número de e-mails que desea enviar por periodo. Si es 0, el proceso por lotes\r\n\t# se deshabilita y los mensajes son enviados tan rápido como sea posible.\r\n\tdefine(\"MAILQUEUE_BATCH_SIZE\",0);\r\n\r\n\t//para el envío en formato HTML\r\n\t//$headers = \"MIME-Version: 1.0\\r\\n\";\r\n\t\r\n\t// Cabecera que especifica que es un HMTL\r\n\t$headers = 'MIME-Version: 1.0' . \"\\r\\n\";\r\n\t$headers .= 'Content-type: text/html; charset=iso-8859-1' . \"\\r\\n\";\r\n\t\r\n\t//dirección del remitente\r\n\t$headers .= utf8_decode(\"From: GUSTAVO OMAR AVILA - PROCOMEX <[email protected]>\\r\\n\");\r\n\t\r\n\t//ruta del mensaje desde origen a destino\r\n\t$headers .= \"Return-path: \".$destinatario.\"\\r\\n\";\r\n\t\r\n\t//direcciones que recibirán copia oculta\r\n\t$headers .= \"Bcc: [email protected]\\r\\n\";\r\n\t\r\n\tmail($destinatario,$asunto,$cuerpo,$headers); \t\r\n}", "protected function _setContent() {\n\t\tif (in_array($this->_status, array(304, 204))) {\n\t\t\t$this->body('');\n\t\t}\n\t}", "function download_url($url,$fichier_destination)\n{\n\tglobal $conf;\n\t\n//Pause\n\t$pause = 5;//En seconde\n\t\n//log file\n\t$fp_ok = fopen($conf['log_file_recuperation_ok'],\"a\");\n\t$fp_ko = fopen($conf['log_file_recuperation_ko'],\"a\");\n\t$fp_0_octet = fopen($conf['log_file_recuperation_0_octet'],\"a\");\t\t\t\t\t\n\t\n//Media Recovery\n\t$status = \"\";\n\tif(!copy($url,$fichier_destination))\n\t{\n\t\tfwrite($fp_ko,date(\"Ymd H:i:s\").\" ===> COPIE KO (tentative 1/3) ===> \".$url.\" ===> \".$fichier_destination.\"\\r\\n\");\n\t\tsleep($pause);\n\t\tif(!copy($url,$fichier_destination))\n\t\t{\n\t\t\tfwrite($fp_ko,date(\"Ymd H:i:s\").\" ===> COPIE KO (tentative 2/3) ===> \".$url.\" ===> \".$fichier_destination.\"\\r\\n\");\n\t\t\tsleep($pause);\n\t\t\tif(!copy($url,$fichier_destination))\n\t\t\t{\n\t\t\t\tfwrite($fp_ko,date(\"Ymd H:i:s\").\" ===> COPIE KO (tentative 3/3) ===> \".$url.\" ===> \".$fichier_destination.\"\\r\\n\");\n\t\t\t\tsleep($pause);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tfwrite($fp_ok,date(\"Ymd H:i:s\").\" ===> COPIE OK ===> \".$url.\" ===> \".$fichier_destination.\"\\r\\n\");\t\t\t\n\t\t\t\t$status = \"ok\";\t\t\n\t\t\t}\t\t\t\t\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfwrite($fp_ok,date(\"Ymd H:i:s\").\" ===> COPIE OK ===> \".$url.\" ===> \".$fichier_destination.\"\\r\\n\");\t\t\t\n\t\t\t$status = \"ok\";\t\t\n\t\t}\t\t\t\t\t\t\n\t}\n\telse\n\t{\n\t\tfwrite($fp_ok,date(\"Ymd H:i:s\").\" ===> COPIE OK ===> \".$url.\" ===> \".$fichier_destination.\"\\r\\n\");\t\t\t\n\t\t$status = \"ok\";\t\t\n\t}\t\n\n//Closing Log Files\n\tfclose($fp_ok);\n\tfclose($fp_ko);\n\tfclose($fp_0_octet);\n\t\n\tif($status==\"\")\n\t\t$status=\"ko\";\n\t\t\t\t\n\treturn $status;\t\t\t\t\n}", "public function enviarComando( ) {\n $cmd=new ComandoFlash(\"SISTEMA\",$this->getComando());\n $this->enviarPeticion($cmd->getComando());\n }", "public function msj_exitoso($accion_exitosa){\r\n switch ($accion_exitosa) {\r\n case 'cg': //Correspondencia Guardada\r\n $mensaje_exito = \"La correspondencia recibida como copia, fue guardada.\";\r\n break;\r\n\r\n case 'cie': //Comunicacion Interna Enviada\r\n $mensaje_exito = \"La correspondencia fue enviada correctamente.\";\r\n break;\r\n\r\n default:\r\n // code...\r\n break;\r\n }\r\n\r\n //Tomamos todos los campos para enviar a la vista bandeja de entrada\r\n //Enviamos la variable folder para marcar en azul el folder en el que se encuentra\r\n $folder = \"bandeja_de_entrada\";\r\n //Tomamos la cantidad de correspondencia nueva (sin recepcionar)\r\n $bandeja_nuevos_cantidad = $this->bandeja_nuevos_cantidad();\r\n //Tomamos las derivaciones a mostrar\r\n $derivaciones = $this->derivaciones_recibidas();\r\n //Tomamos el plazo que se tiene para responder cada derivacion\r\n $array_plazo = $this->plazo_restante_derivaciones();\r\n\r\n return view(\"chasqui.bandeja_de_entrada\")\r\n ->with(\"folder\", $folder)\r\n ->with(\"bandeja_nuevos_cantidad\", $bandeja_nuevos_cantidad)\r\n ->with(\"derivaciones\", $derivaciones)\r\n ->with(\"array_plazo\", $array_plazo)\r\n ->with(\"mensaje_exito\", $mensaje_exito);\r\n //echo $mensaje;\r\n //echo \"hola\";\r\n/* return view(\"mensajes_chasqui.envio_exitoso\")\r\n ->with(\"mensaje_exito\", \"entra!!\");*/\r\n }", "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 FrontendOutputPostGenerate() {\n\t\t\tfile_put_contents($this->location, $this->template);\n\t\t}", "function escreveArquivo($aux_nome, $aux_tel, $aux_cpf, $aux_rg){\n\n $pessoa = new Individuo();\n\n /**\n * Para evitar que o usuario fique recarregando a pagina\n */\n \n $pessoa->setNome($aux_nome);\n if($pessoa->getNome() == '' || $pessoa->getNome() == null){\n session_destroy();\n die(\"Falha\");\n }\n /**\n * Gravando os dados\n */\n $pessoa->setTelefone($aux_tel);\n $pessoa->setCPF($aux_cpf);\n $pessoa->setRg($aux_rg);\n\n $dados = fopen(\"/home/mateus/Arquivos/dados_individual.csv\", \"a+\") or die(\"Failed\"); \n $conteudo = '';\n $conteudo = fread($dados, 1);\n\n if($conteudo == ''){\n escreveCabecalho($dados);\n }\n \n fwrite($dados, $pessoa->getNome());\n fwrite($dados, \",\");\n fwrite($dados, $pessoa->getTelefone());\n fwrite($dados, \",\");\n fwrite($dados, $pessoa->getCPF());\n fwrite($dados, \",\");\n fwrite($dados, $pessoa->getRg());\n fwrite($dados, \"\\n\");\n\n\n fclose($dados);\n }", "private function t2($content) { echo $content;\n// flush();\n ob_flush();\n }", "public function liberar() {}", "protected function setDestination() {}", "public function deleteContentAndCopyDraftPage() {}", "public function detalheAction () {\n // Título da tela (action)\n $this->view->telaTitle = 'Visualizar Exercício Orçamentário';\n\n // Identifica o parâmetro da chave primária a ser buscada\n $chavePrimaria = $this->_getParam('cod');\n\n if ($chavePrimaria) {\n // Busca registro específico\n $negocio = new $this->_classeNegocio ();\n $registro = $negocio->retornaRegistro($chavePrimaria);\n\n if ($registro) {\n // Exibe os dados do registro\n $this->view->dados = $registro;\n } else {\n $this->registroNaoEncontrado();\n }\n } else {\n $this->codigoNaoInformado();\n }\n }", "public function executeEnviarclave() {\n\n\n }", "function finaliza() {\n\n parent::addComando(chr(27) . chr(64));\n //parent::addComando(chr(02)); \n }", "private function _flushContent()\n {\n @ob_flush();\n @flush();\n }", "function escreveCabecalho($dados){\n fwrite($dados, \"nome,\");\n fwrite($dados, \"telefone,\");\n fwrite($dados, \"cpf,\");\n fwrite($dados, \"rg\");\n fwrite($dados, \"\\n\");\n }", "function limpiarCagadas($newId){\r\n\textract($GLOBALS);\r\n\tprint \"<h4>Borrando archivos:</h4>\";\r\n\tforeach( $_SESSION['subidos'] as $k ){\r\n\t\t$auxSvr = split(\"@\", $k);\r\n\t\t$file = $auxSvr[0];\r\n\t\t$srvr = $auxSvr[1];\r\n\t\tprint \"<h4>Borrando registros</h4>\";\r\n\t\tprint \"borrando: $file<br />\";\r\n\t\t\r\n\t\t\r\n\t\t$ftp = new Ftp($servers[$srvr][0], $servers[$srvr][1], $servers[$srvr][2]);\r\n\t\tif( !$ftp->login() )die(\"no se logueó\");\r\n\t\tif( !$ftp->borrar($file) ){\r\n\t\t\tprint \"No se pudo borrar: $file<br />\";\r\n\t\t\terror(\"No se pudo borrar: $file\", true);\r\n\t\t}\r\n\t}\r\n\t\r\n\t$sql =\" DELETE FROM contenidos where id=$newId LIMIT 1; \";\r\n\t$result = mysql_query($sql, $db);\t\r\n\tif(!$result){\r\n\t\terror(\"Error al borrar el contenido $newId - sql: $sql\" , true);\r\n\t}\r\n\tprint \"contenido $newId eliminado!\\n\";\r\n\t$sql =\" DELETE FROM contcol_whitelist where contenido=$newId LIMIT 1; \";\r\n\r\n\t$result = mysql_query($sql, $db);\t\r\n\tif(!$result){\r\n\t\terror(\"Error al borrar de witelist $newId - sql: $sql\" , true);\r\n\t}\r\n\tprint \"contenido $newId eliminado de whitelist!\\n\";\r\n\t$ftp->logout();\r\n}", "public function saveClipboard() {}", "function hapusfile(){\n\t\t$previllage = 1;\n\t\tcheck_super_user($this->session->tipe_user,$previllage);\n\n\t \t$id = $this->uri->segment(3);\n\t\t//Action\t\t \n\t\t$itemfile = $this->tugas_m->get($id)->row();\n \t\tif ($itemfile->file != null) {\n \t\t\t$target_file = 'assets/dist/files/tugas/'.$itemfile->file;\n \t\t\tunlink($target_file);\n \t\t}\n \t\t$params['file'] = \"\";\n \t\t$this->db->where('id',$id);\n\t \t$this->db->update('tb_tugas',$params);\n\t \tredirect('tugas/edit/'.$id);\t \n\t}", "public function discard() {\n\t\t$this->DispositionManager->discard();\n\t\t$this->autoRender = false;\n\t\t$this->redirect($this->refererStack(SYSTEM_CONSUME_REFERER));\n\t}", "function finalizar(){\n\t\t//destruir cookie e sessao\n\t\t$this->f3->set('SESSION.participante','');\n\t\t$this->f3->set('SESSION.mail','');\n\t\t$this->f3->set('COOKIE','');\n\t\t$header = \"Final da Pesquisa\";\n\t\t$texto = \"Muito obrigada por participar da pesquisa! A sua contribuição será muito\n\t\t\t\t\tvaliosa para a continuidade dos estudos sobre os fatores que favorecem a aprendizagem\n\t\t\t\t\tde estudantes universitários brasileiros. Caso queira saber mais sobre a pesquisa, ou entrar em contato conosco, clique nos links no menu acima. Muito sucesso para você!\";\n\t\tif ($this->f3->get(\"POST.naoaceito\")) {\n\t\t\t$header = \"Prezado estudante,\";\n\t\t\t$texto = \"Agradecemos a sua atenção. Esperamos poder contar com a sua participação em outro momento.\";\n\t\t\t$this->f3->set('cordialmente',\"Cordialmente,\");\t\n\t\t}\n\n\t\t$this->f3->set('header',$header);\n\t\t$this->f3->set('texto',$texto);\n\t\t$this->f3->set('assinado',\"Evely Boruchovitch e equipe.\");\n\t\t$this->f3->set('content','agradecimento.html');\n\t\techo \\Template::instance()->render('tela.htm');\n\n\t}", "protected function _clearAndOutput() {}", "public function finish();", "public function finish();", "public function moveContentAndCopyLivePage() {}", "public function contactoCancelar( ) {\n $this->setComando(\"CONTACTOS\",\"CANCELAR\");\n }", "function copy_fichier($file, $path) {\n\t\t if (!$id_erreur=copy(\"vide.htm\", $path . $file . \".htm\")) echo(\"Erreur d'ouverture du fichier\");\n\t\t else return(1);\n}", "public function destroy(contenido_anexo $contenido_anexo)\n {\n //\n }", "function DeleteHost($HostServer) { // Detruit une entree dans le fichier hosts\n $filehost = \"/etc/backuppc/hosts\";\n $filehost_tmp = $filehost.\".tmp\";\n if (file_exists($filehost)) { //On vire la machine dans le fichiers hosts\n $fp = fopen(\"$filehost\",\"r\");\n $fp_tmp = fopen(\"$filehost_tmp\",\"w\");\n while (!feof($fp)) {\n $ligne = fgets($fp,1098);\n if (!preg_match(\"/^$HostServer\\s+/i\",$ligne)) {\n fwrite($fp_tmp,$ligne);\n }\n }\n fclose($fp);\n fclose($fp_tmp);\n copy($filehost_tmp,$filehost);\n unlink($filehost_tmp);\n }\n}", "static public function ctrBorrarTransportadora(){\n\n\t\tif(isset($_GET[\"idTransportadora\"])){\n\n\t\t\t$tabla =\"transportadoras\";\n\t\t\t$datos = $_GET[\"idTransportadora\"];\n\n\t\t\tif($_GET[\"logoTransportadora\"] != \"\"){\n\n\t\t\t\tunlink($_GET[\"logoTransportadora\"]);\n\n\t\t\t\t$directorio = substr($_GET[\"logoTransportadora\"], 0, -7);\n\t\t\t\trmdir($directorio);\n\n\t\t\t}\n\n\t\t\t$respuesta = ModeloTransportadoras::mdlBorrarTransportadora($tabla, $datos);\n\n\t\t\tif($respuesta == \"ok\"){\n\n\t\t\t\techo'<script>\n\n\t\t\t\tswal({\n\t\t\t\t\t type: \"success\",\n\t\t\t\t\t title: \"La transportadora ha sido borrada correctamente\",\n\t\t\t\t\t showConfirmButton: true,\n\t\t\t\t\t confirmButtonText: \"Cerrar\"\n\t\t\t\t\t }).then(function(result){\n\t\t\t\t\t\t\t\tif (result.value) {\n\n\t\t\t\t\t\t\t\twindow.location = \"transportadoras\";\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t})\n\n\t\t\t\t</script>';\n\n\t\t\t}\n\n\t\t}\n\n\t}", "function quitarMedicamento(){\n try{\n $id_detalle_cita_medicamento = $_GET['id_detalle_cita_medicamento'];\n\n $consulta = new Medicamento();\n $consulta->quitarMedicinaPaciente($id_detalle_cita_medicamento);\n\n header('Location: /public/View/solicitud/detalle-solicitud.php?id=' . $_GET['id']);\n \n }catch(PDOException $e){\n return $e;\n }\n }", "public function enviar() {\n $arquivo = $this->getArquivo();\n date_default_timezone_set('America/Sao_Paulo'); // definir fuso horario\n $dataEHora = date('dmYHi'); // pegar data e hora do servidor\n $nome_arquivo = \"img/\" . $dataEHora . $arquivo[\"name\"]; // definir pasta e nome do arquivo no servidor\n $nome_arquivo_tmp = $arquivo[\"tmp_name\"]; // pegar nome do arquivo temporario no servidor\n $msgErroArquivo = \"\"; // definir msg de erro vazia\n if(move_uploaded_file($nome_arquivo_tmp, $nome_arquivo)==false){ // se ocorrer erro...\n $msgErroArquivo = \"Arquivo de foto não pode ser enviado.\"; // define msg de erro\n }\n //fim upload do arquivo\n\n return $nome_arquivo;\n }", "function FTPupload($origen,$destino='',$borrar=true,&$id_ftp=false){\n\t//colocar ruta relativa de origen y destino, incluyendo carpetas.\n\t//si se omite destino se copia con la misma ruta del origen.\n\t//por defecto se elimina la imagen original\n\tif($destino=='') $destino=$origen;\n\t$count=preg_match('/(.+\\/)*/',$destino,$path);\n\tif(!NOFPT){\n\t\tif(!$id_ftp){\n\t\t\t$id_ftp=ftp_connect(FTPSERVER,21);\n\t\t\tftp_login($id_ftp,FTPACCOUNT,FTPPASS);\n\t\t\tftp_pasv($id_ftp,false);\n\t\t}\n\t\t//Movilizacion a subcarpetas. Si no existen las crea.\n\t\t//$count=preg_match('/(.+\\/)(.+\\/)*/',$path[1],$path);\n\t\t$path=$path[1];\n\t\twhile(($pos=strpos($path,'/'))!==false){\n\t\t\t$folder=substr($path,0,$pos);\n\t\t\t@ftp_mkdir($id_ftp,$folder);\n\t\t\tif(ftp_chdir($id_ftp,$folder)){\n\t\t\t\t@ftp_put($id_ftp,'index.html',RELPATH.'img/index.html',FTP_BINARY);\n\t\t\t}else{\n\t\t\t\tftp_quit($id_ftp);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t$path=substr($path,$pos+1);\n\t\t}\n\t\t$file=end(explode('/',$destino));\n\t\tif($file!=''){\n\t\t\tftp_put($id_ftp,$file,RELPATH.'img/'.$origen,FTP_BINARY);\n\t\t\tftp_quit($id_ftp);\n\t\t}\n\t\tif($borrar){\n\t\t\t@unlink(RELPATH.$origen);\n\t\t}\n\t}elseif($destino!=$origen){\n\t\tmkdir(substr($path[1],0,-1),0777,true);\n\t\tif($borrar)\n\t\t\trename(RELPATH.'img/'.$origen,RELPATH.'img/'.$destino);\n\t\telse\n\t\t\tcopy(RELPATH.'img/'.$origen,RELPATH.'img/'.$destino);\n\t}\n}", "static function ctrBorrarUsuario()\n\t{\n\n\t\tif(isset($_GET['idUsuario']))\n\t\t{\n\t\t\t$tabla = \"usuarios\";\n\t\t\t$datos = $_GET['idUsuario'];\n\n\t\t\t// vamos a eliminar la foto\n\t\t\t//si hay una foto entonces eliminamos \n\t\t\tif($_GET['fotoUsuario'] != \"\")\n\t\t\t{\n\t\t\t\t// unlink — Borra un fichero\n\t\t\t\t// vamos a borrar ese archivo o imagen en esa carpeta\n\t\t\t\t// unlink($_POST['fotoUsuario']);\n\t\t\t\tunlink($_GET['fotoUsuario']);\n\n\t\t\t\t//rmdir borra directorio\n\t\t\t\trmdir('vistas/img/usuarios/'.$_GET[\"usuario\"]);\n\t\t\t}\n\n\t\t\t// solicitamos una repuesta al modelo de usuario en el metodo mdlBorrarUsuario\n\t\t\t$respuesta = ModeloUsuarios::mdlBorrarUsuario($tabla,$datos);\n\n\t\t\tif($respuesta)\n\t\t\t{\n\t\t\t\techo '<script>\n\t\t\t\t\n\t\t\t\t\t\tSwal.fire({\n\t\t\t\t\t\t\ttype: \"success\",\n\t\t\t\t\t\t\ttitle: \"El usuario se elimino correctamente!\",\n\t\t\t\t\t\t\tshowConfirmButton: true,\n\t\t\t\t\t\t\tconfirmButtonText: \"Cerrar\",\n\t\t\t\t\t\t\tcloseOnConfirm: false\n\t\t\t\t\t\t}).then((result)=>{\n\t\t\t\t\t\t\tif(result.value)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\twindow.location = \"usuarios\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t\t\n\t\t\t\t\t\t</script>';\n\t\t\t}\n\t\t}\n\t}", "public function galeriaExcluir_action()\n\t{\n\t\t$bd = new GaleriasImagens_Model();\n\t\t$id = abs((int) $this->getParam(3));\n\t\t$resultado = $bd->read(\"galeria={$id} AND usuario={$this->_usuario}\");\n\t\tforeach($resultado as $dados){\n\t\t\tunlink('uploads/img_'.$dados['imagem']);\n\t\t\tunlink('uploads/tb_'.$dados['imagem']);\n\t\t\tunlink('uploads/destaque_'.$dados['imagem']);\n\t\t}\n\t\t$bd->delete(\"galeria={$id} AND usuario={$this->_usuario}\");\n\t\t\n\t\t$bd = new Galerias_Model();\n\t\t$bd->delete(\"id={$id} AND usuario={$this->_usuario}\");\n\t\t\n\t\tHTML::certo('Galeria exclu&iacute;da.');\n\t\t//POG Temporário\n\t\tHTML::Imprime('<script>Abrir(\"#abreGaleriasListar\",\"#galerias\");</script>');\n\t}", "public function EliminarMesas()\n\t{\n\n\t\t$sql = \" select codmesa from ventas where codmesa = ? \";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute( array(base64_decode($_GET[\"codmesa\"])) );\n\t\t$num = $stmt->rowCount();\n\t\tif($num == 0)\n\t\t{\n\n\t\t\t$sql = \" delete from mesas where codmesa = ? \";\n\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t$stmt->bindParam(1,$codmesa);\n\t\t\t$codmesa = base64_decode($_GET[\"codmesa\"]);\n\t\t\t$stmt->execute();\n\n\t\t\theader(\"Location: mesas?mesage=1\");\n\t\t\texit;\n\n\t\t}else {\n\n\t\t\theader(\"Location: mesas?mesage=2\");\n\t\t\texit;\n\t\t}\n\n\t}", "function _rejectFile() {\n\t\t$this->_moveFile($this->_processingPath, $this->_rejectPath, $this->_claimedFilename);\n\t}", "public function subir_datos() {\n $datos = array(\n 'nombre' => $this->helper->cleanInput($_POST['cname']),\n 'email' => $this->helper->cleanInput($_POST['email']),\n 'telefono' => $this->helper->cleanInput($_POST['phone']),\n 'message' => $this->helper->cleanInput($_POST['message'])\n );\n $insert = $this->model->subir_datos($datos);\n $id = $insert['id'];\n #SUBIMOS EL ARCHIVO\n $dir = 'public/archivos/cv/';\n $serverdir = $dir;\n $filename = \"\";\n foreach ($_FILES as $inputname => $file) {\n $newname = $this->helper->cleanUrl($_POST[$inputname . '_name']);\n //$extension = strtolower(end(explode('.', $file['name'])));\n $ext = explode('.', $file['name']);\n $extension = strtolower(end($ext));\n $fname = $id . '_' . $newname . '.' . $extension;\n $contents = file_get_contents($file['tmp_name']);\n\n $handle = fopen($serverdir . $fname, 'w');\n fwrite($handle, $contents);\n fclose($handle);\n\n $filename = $fname;\n var_dump($filename);\n }\n $update = array(\n 'id' => $id,\n 'archivo' => $filename\n );\n $updateTrabaja = $this->model->updateTrabaja($update);\n if (!empty($id)) {\n $data = array(\n 'type' => 'succes',\n 'message' => $this->helper->messageAlert('success', 'Gracias, tu C.V. se ha agregado correctamente a nuestra Base de Datos.')\n );\n } else {\n $data = array(\n 'type' => 'error',\n 'message' => $this->helper->messageAlert('error', 'Lo sentimos ha ocurrido un error, por favor vuelva a intertarlo')\n );\n }\n Session::set('result', $data);\n header('Location: ' . URL . 'trabaja_con_nosotros/');\n }", "public function end() : void\n {\n ob_end_clean();\n }", "public function finish()\n\t{\n\t\t\n\t}", "public function EliminarCaja()\n\t\t{\n\n\t\t\t$sql = \" select codcaja from ventas where codcaja = ? \";\n\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t$stmt->execute( array(base64_decode($_GET[\"codcaja\"])) );\n\t\t\t$num = $stmt->rowCount();\n\t\t\tif($num == 0)\n\t\t\t{\n\n\t\t\t\t$sql = \" delete from cajas where codcaja = ? \";\n\t\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t\t$stmt->bindParam(1,$codcaja);\n\t\t\t\t$codcaja = base64_decode($_GET[\"codcaja\"]);\n\t\t\t\t$stmt->execute();\n\n\t\t\t\theader(\"Location: cajas?mesage=1\");\n\t\t\t\texit;\n\n\t\t\t}else {\n\n\t\t\t\theader(\"Location: cajas?mesage=2\");\n\t\t\t\texit;\n\t\t\t}\n\n\t\t}", "public function enviarNoInterrumpir( ) {\n $cmd = new ComandoFlash(\"VIDEOCONFERENCIA\", \"NO_INTERRUMPIR\",\n $this->getNoInterrumpir());\n usleep(1000000);\n $this->enviarPeticion($cmd->getComando());\n\n }", "public function desenfocarCamaraPresidencia() {\n\n self::$presidencia->desenfocar();\n\n }", "public function destroy($id)\n {\n $user=Auth()->user();\n $folder=\"CampagneRemove/\";\n $name=uniqid().'-'.date(\"Y-m-d H:i:s\").'-'.$user->name;\n $filename=$name.\".\".\"txt\";\n $filebackup= new BackUpFermeController();\n // dd(\"yes\");\n try {\n $value=Campagne::findorfail($id); \n\n $Poussins=Poussin::whereCampagne_id($id)->get(); \n $ventes=Vente::whereCampagne_id($id)->get();\n $vaccins=Vaccin::whereCampagne_id($id)->get();\n $pertes=Perte::whereCampagne_id($id)->get();\n $aliments=Aliment::whereCampagne_id($id)->get();\n $tansports=Transport::whereCampagne_id($id)->get();\n $accessoires=Accessoire::whereCampagne_id($id)->get();\n $contents=$value.\" Ventes: \\n\".$ventes.\" Vaccins: \\n\".$vaccins.\" Aliments: \\n\".$aliments.\" Accessoires: \\n\".\n $accessoires.\" Poussins: \\n\".$Poussins.\" Pertes: \\n\".$pertes\n .\" Transports: \\n\".$tansports;\n $filebackup->backupfile($folder,$filename,$contents);\n // dd($Poussins, $ventes,$vaccins, $pertes, $aliments,$tansports,$accessoires);\n // dd(\"NOT\");\n //die; \n Campagne::destroy($id);\n\n return back()->with('success', 'La campagne a bien été supprimée dans la base de données.');\n \n } catch (\\Throwable $th) {\n throw $th;\n }\n\n //return redirect()->route('home');\n }", "function write_log($cadena){\n\t\t\t$arch = fopen(\"../../logs/deletes\".\".txt\", \"a+\"); //date(\"Y-m-d\"). define hora en archivo\n\t\t\n\t\t\tfwrite($arch, \"[\".date(\"Y-m-d H:i:s\").\" \".$_SERVER['REMOTE_ADDR'].\" \".\" - Elimino produccion ] \".$cadena.\"\\n\");\n\t\t\tfclose($arch);\n\t\t}", "public function escribeLog($cadena) {\n $fecha = date(\"d-m-Y\");\n $archivo = \"SondaUBosque-\" . $fecha . \".log\";\n $fp = fopen($archivo, \"a\");\n $write = fputs($fp, $cadena);\n fclose($fp);\n }", "function FTPupload($origen,$destino='',$borrar=true){\n\t#origen: donde esta la imagen. destino: donde ira la imagen.\n\t#borrar: falso si no se quiere eliminar la imagen original\n\t#las rutas deben ser relativas a img. si destino es vacio o false, se colocara en la misma ruta del origen\n\t//validaciones previas\n\tglobal $config;\n\tif(!is_file(\"$config->relpath/img/$origen\")) return \"404 file $config->relpath/img/$origen not found\";\n\tglobal $config;\n\t$error=0;\n\tif($destino=='') $destino=$origen;\n\t$file=end(explode('/',$destino));\n\tif(!$file) $error=400;\n\t$path=isset($config->ftp->folder)?$config->ftp->folder.'/':'';\n\t$path.=dirname($destino);\n\t$data=\" P:$path F:$file O:$origen D:$destino\";\n\tif(!$error)\n\tif(isset($config->ftp)){\n\t\tif(!isset($img_ftp_con)){\n\t\t\t$img_ftp_con=ftp_connect($config->ftp->host,isset($config->ftp->port)?$config->ftp->port:21);\n\t\t\t$login=@ftp_login($img_ftp_con,$config->ftp->user,$config->ftp->pass);\n\t\t\tif(!$login){\n\t\t\t\t$img_ftp_con=0;\n\t\t\t\treturn 403;\n\t\t\t}\n\t\t\tftp_pasv($img_ftp_con,true);\n\t\t}\n\t\t#vamos a la carpeta raiz\n\t\t// ftp_cdup($img_ftp_con);\n\t\t#Nos vamos a la carpeta destino. Se crean las carpetas que no existan.\n\t\t$foldercount=0;\n\t\t$folders=explode('/',$path);\n\t\tforeach($folders as $folder){\n\t\t\tif($folder!=''){\n\t\t\t\tif(@ftp_chdir($img_ftp_con,$folder)){#abrir carpeta\n\t\t\t\t\t$foldercount++;\n\t\t\t\t}elseif(@ftp_mkdir($img_ftp_con,$folder)){#crear y abrir carpeta\n\t\t\t\t\tftp_chdir($img_ftp_con,$folder);\n\t\t\t\t\t$foldercount++;\n\t\t\t\t\t@ftp_put($img_ftp_con,'index.html',RELPATH.'img/index.html',FTP_BINARY);\n\t\t\t\t}else{\n\t\t\t\t\t$error=412;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(!$error){\n\t\t\t$data=' PWD:'.ftp_pwd($img_ftp_con).$data;\n\t\t\t#Copiamos el archivo\n\t\t\t$error=(@ftp_put($img_ftp_con,$file,RELPATH.'img/'.$origen,FTP_BINARY)) ? 200 : 401;\n\t\t\t#Borramos la imagen de origen si es requerido\n\t\t\tif($borrar&&$error==200&&!@unlink(RELPATH.'img/'.$origen)) $error=206;\n\t\t}\n\t\tftp_quit($img_ftp_con);\n\t// }elseif(!$config->local){\n\t\t#Si no es local movemos al servidor de imagenes\n\t}else{\n\t\t#movemos al servidor de imagenes\n\t\t$_origen=RELPATH.'img/'.$origen;\n\t\t$_destino=$config->img_server_path.'img/'.$destino;\n\t\t$data.=\"<br>FO: $_origen FD: $_destino\";\n\t\tif(!is_dir($config->img_server_path.'img/'.$path))\n\t\t\tif(!@mkdir($config->img_server_path.'img/'.$path,0775,true)) $error=412;\n\t\tif(!$error)\n\t\tif($borrar)\n\t\t\t$error=(!@rename($_origen,$_destino))?408:200;\n\t\telse\n\t\t\t$error=(!@copy($_origen,$_destino))?409:200;\n/*\t}elseif($destino!=$origen){\n\t\t#Cuando no es ftp, y el origen es distinto al destino, se mueve/copia el archivo\n\t\tif(!is_dir(RELPATH.'img/'.$path))\n\t\t\tif(!@mkdir(RELPATH.'img/'.$path,0777,true)) $error=412;\n\t\tif(!$error)\n\t\tif($borrar)\n\t\t\t$error=(!@rename(RELPATH.'img/'.$origen,RELPATH.'img/'.$destino))?408:200;\n\t\telse\n\t\t\t$error=(!@copy(RELPATH.'img/'.$origen,RELPATH.'img/'.$destino))?409:200;\n*/\t}\n\treturn $error.$data;#descomentar data si decea ver los mensajes de error\n}", "public function doOutputCompress() {}", "function guardarReclamo()\n\t\t{\n\t\t}", "public function __destruct() {\n $this->send();\n }", "public function EliminarArqueoCaja()\n{\n\n\tif($_SESSION['acceso'] == \"administrador\") {\n\n\t\t$sql = \" delete from arqueocaja where codarqueo = ? \";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->bindParam(1,$codarqueo);\n\t\t$codarqueo = base64_decode($_GET[\"codarqueo\"]);\n\t\t$stmt->execute();\n\n\t\theader(\"Location: arqueoscajas?mesage=1\");\n\t\texit;\n\n\t} else {\n\n\t\theader(\"Location: arqueoscajas?mesage=2\");\n\t\texit;\n\t}\n\n}", "static public function ctrBorrarCliente(){\n\n\t\tif(isset($_GET[\"idCliente\"])){\n\n\t\t\t$tabla =\"cliente\";\n\t\t\t$datos = $_GET[\"idCliente\"];\n\n\t\t\tif($_GET[\"fotoCliente\"] != \"\"){\n\n\t\t\t\tunlink($_GET[\"fotoCliente\"]);\n\t\t\t\trmdir('vistas/img/clientes/'.$_GET[\"cliente\"]);\n\n\t\t\t}\n\n\t\t\t$respuesta = ModeloClientes::mdlBorrarCliente($tabla, $datos);\n\n\t\t\tif($respuesta == \"ok\"){\n\n\t\t\t\techo'<script>\n\n\t\t\t\tswal.fire({\n\t\t\t\t\t type: \"success\",\n\t\t\t\t\t title: \"El Cliente ha sido borrado correctamente\",\n\t\t\t\t\t showConfirmButton: true,\n\t\t\t\t\t confirmButtonText: \"Cerrar\"\n\t\t\t\t\t }).then(function(result){\n\t\t\t\t\t\t\t\tif (result.value) {\n\n\t\t\t\t\t\t\t\twindow.location = \"cliente\";\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t})\n\n\t\t\t\t</script>';\n\n\t\t\t}\t\t\n\n\t\t}\n\n\t}", "function escribirMensaje($mensaje){\n \t$fp = $this->abrirFichero();\n \tif (!$fp) return false;\n\t\t//Ahora bloqueamos el fichero para escribir el log:\n\t\tflock($fp, LOCK_EX);\n\t\tfwrite($fp,date(\"[d-m-Y]\").\" ::\"); //fecha y hora del error\n\t\tfwrite($fp, $mensaje); //mensaje de error a escribir\n\t\tfwrite($fp, \"\\n\");\n\t\tflock($fp, LOCK_UN); //Desbloqueo del fichero\n \tclose($fp); //Cerramos el fichero y devolvemos todo ok\n \treturn true;\n }", "public function excluirImagemGaleria(){ \n\t\t\n\t\t//deleta a imagem da pasta\n\t\tinclude_once(\"../funcoes/geral.php\");\n\t\t$sql = \"\n\t\t\tSELECT thumb\n\t\t\tFROM programa_imagem\n\t\t\"; \n\t\tif($this->idImagem)\n\t\t\t$sql .=\" WHERE id = '$this->idImagem'\";\n\n\t\t$this->sql = $sql;\n\t\t$this->qr = self::execSql($this->sql);\t\n\t\t$qtRegistros = $this->getQuantidadeData($sql); // retorna a quantidade de registro\t \n\t\tif($qtRegistros > 0){\n\t\t\twhile($lista = self::resultsAll($this->qr)){\n\n\t\t\t\tdeletaImagem($lista[\"thumb\"]);//deleto a imagem do arquivo\n\t\t\t\n\t\t\t}\n\t\t}\n\n\t}", "public function handle()\n {\n if (session()->has('frete')) {\n session()->forget('frete');\n return \"Frete excluido com sucesso\";\n } else {\n return \"Nada para ser excluido!\";\n }\n }", "public function sendContent()\n {\n if (!$this->headerOnly)\n {\n parent::sendContent();\n }\n }", "public function getContent()\n {\n Tools::redirectAdmin($this->context->link->getAdminLink('AdminBackupProSettings'));\n }", "public function excluir(){\n\t\tglobal $tabela_links;\n\t\t$consulta = new conexao();\n\t\t$endereco = $consulta->sanitizaString($this->end_link);\n\t\t$funcionalidade_tipo = (int) $this->funcionalidade_tipo;\n\t\t$funcionalidade_id = (int) $this->funcionalidade_id;\n\t\t//echo(\"$endereco\t $funcionalidade_tipo\t$funcionalidade_id\");\n\t\t$consulta->connect();\n\t\t$consulta->solicitar(\"DELETE FROM $tabela_links \n\t\t\t\t\t\t\t\tWHERE endereco = '$endereco'\n\t\t\t\t\t\t\t\tAND funcionalidade_tipo\t= '$funcionalidade_tipo'\n\t\t\t\t\t\t\t\tAND funcionalidade_id\t= '$funcionalidade_id'\");\n\t\t\n\t\n\t}", "function keepObjectsInClipboard()\n\t{\n\t\tglobal $ilCtrl;\n\t\t$_SESSION['clipboard']['cmd'] = \"copy\";\n\t\tif ($_GET[\"source_ids\"] == \"\")\n\t\t{\n\t\t\t$_SESSION['clipboard']['ref_ids'] = array((int) $this->getSource());\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$_SESSION['clipboard']['ref_ids'] = explode(\"_\", $_GET[\"source_ids\"]);\n\t\t}\n\t\t$ilCtrl->returnToParent($this);\n\t}", "function check(){\r\n if ( file_get_contents(sys_get_temp_dir().\"/{$this->file_name}\") != 'run' ) {\r\n exit('Script was canceled by file deletion.') ;\r\n }\r\n }", "public function borrar() {\n //y se queda con la respuesta para redirigir cual sea el caso\n $respuesta = Archivo::borrar(Input::all());\n\n return $respuesta;\n }", "public function moveContentAndCopyDraftPage() {}", "public function finish() {\r\n\t}" ]
[ "0.6134156", "0.5899654", "0.581045", "0.57769907", "0.57192165", "0.57019126", "0.5690056", "0.56530267", "0.5617676", "0.55407274", "0.54955906", "0.548153", "0.5451629", "0.54102397", "0.5401806", "0.5391241", "0.5373531", "0.5367606", "0.5363818", "0.53325856", "0.5320039", "0.5312877", "0.52703804", "0.5263334", "0.52582496", "0.5250715", "0.5222401", "0.5194509", "0.5190227", "0.51808566", "0.5174272", "0.51517373", "0.5148791", "0.51275164", "0.50986165", "0.50950396", "0.5094982", "0.5094666", "0.5094666", "0.5094666", "0.5094666", "0.5094666", "0.50937384", "0.5093657", "0.5091636", "0.5071692", "0.5070538", "0.506991", "0.50674576", "0.5067085", "0.50618064", "0.50543636", "0.50461817", "0.50451154", "0.5034854", "0.50264156", "0.50248784", "0.5022236", "0.50094074", "0.5002598", "0.5000838", "0.5000838", "0.50006264", "0.4998756", "0.49977142", "0.4997547", "0.49967363", "0.49924988", "0.4986063", "0.49853575", "0.4976462", "0.49746373", "0.49736047", "0.4973322", "0.49712884", "0.49711242", "0.49612573", "0.49556935", "0.49436653", "0.49359965", "0.4921556", "0.49174908", "0.49168685", "0.49158528", "0.49155137", "0.4915292", "0.49126583", "0.4910794", "0.49058822", "0.49031562", "0.48861584", "0.48834231", "0.48827472", "0.4882741", "0.48812088", "0.4879043", "0.48770377", "0.48714352", "0.48627964", "0.48627183", "0.48593953" ]
0.0
-1
this up() migration is autogenerated, please modify it to your needs
public function up(Schema $schema) { $this->abortIf($this->connection->getDatabasePlatform()->getName() != "mysql", "Migration can only be executed safely on 'mysql'."); $this->addSql("ALTER TABLE opportunity CHANGE policy_number policy_number VARCHAR(255) DEFAULT NULL, CHANGE effective_dt effective_dt VARCHAR(255) DEFAULT NULL, CHANGE line_code line_code VARCHAR(255) DEFAULT NULL, CHANGE lsp_code lsp_code VARCHAR(255) DEFAULT NULL, CHANGE renewal_count renewal_count VARCHAR(255) DEFAULT NULL, CHANGE premium premium VARCHAR(255) DEFAULT NULL, CHANGE vehicle_count vehicle_count VARCHAR(255) DEFAULT NULL, CHANGE homeowners_count homeowners_count VARCHAR(255) DEFAULT NULL"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function up();", "abstract public function up();", "abstract public function up();", "abstract public function up();", "public function up()\n {\n $this->execute(\"\n ALTER TABLE `tcmn_communication` \n CHANGE `tcmn_pprs_id` `tcmn_pprs_id` SMALLINT(5) UNSIGNED NULL COMMENT 'person',\n CHANGE `tcmn_tmed_id` `tcmn_tmed_id` TINYINT(4) UNSIGNED NULL COMMENT 'medijs';\n \");\n }", "public function up()\n {\n // This migration was removed, but fails when uninstalling plugin\n }", "public function up()\n {\n $this->execute(\"\n\n ALTER TABLE `cucp_user_company_position` \n ADD COLUMN `cucp_role` CHAR(20) NULL AFTER `cucp_name`;\n\n \");\n }", "public function up()\n\t{\n\t\t$this->dbforge->add_column($this->table, $this->field);\n\t}", "public function migrateUp()\n {\n //$this->migrate('up');\n $this->artisan('migrate');\n }", "public function up()\n {\n dbexec('ALTER TABLE #__subscriptions_coupons\n ADD `created_on` datetime DEFAULT NULL AFTER `usage`,\n ADD `created_by` bigint(11) unsigned DEFAULT NULL AFTER `created_on`,\n ADD INDEX `created_by` (`created_by`),\n ADD `modified_on` datetime DEFAULT NULL AFTER `created_by`,\n ADD `modified_by` bigint(11) unsigned DEFAULT NULL AFTER `modified_on`,\n ADD INDEX `modified_by` (`modified_by`) \n ');\n \n dbexec('ALTER TABLE #__subscriptions_vats\n ADD `created_on` datetime DEFAULT NULL AFTER `data`,\n ADD `created_by` bigint(11) unsigned DEFAULT NULL AFTER `created_on`,\n ADD INDEX `created_by` (`created_by`),\n ADD `modified_on` datetime DEFAULT NULL AFTER `created_by`,\n ADD `modified_by` bigint(11) unsigned DEFAULT NULL AFTER `modified_on`,\n ADD INDEX `modified_by` (`modified_by`) \n ');\n }", "public function up()\n\t{\n\t\t$this->dbforge->modify_column($this->table, $this->field);\n\t}", "public function safeUp()\n {\n $this->createTable(\n $this->tableName,\n [\n 'id' => $this->primaryKey(),\n 'user_id' => $this->integer(). ' UNSIGNED NOT NULL' ,\n 'source' => $this->string()->notNull(),\n 'source_id' => $this->string()->notNull(),\n ],\n 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB'\n );\n\n $this->addForeignKey('fk_social_auth_user_id_to_user_id', $this->tableName, 'user_id', '{{%user}}', 'id', 'CASCADE', 'CASCADE');\n }", "public function up()\n {\n }", "public function up()\n {\n $user = $this->table('products', ['collation' => 'utf8mb4_persian_ci', 'engine' => 'InnoDB']);\n $user\n ->addColumn('name', STRING, [LIMIT => 20])\n ->addColumn('count', STRING, [LIMIT => 75])\n ->addColumn('code', STRING, [LIMIT => 100])\n ->addColumn('buy_price', STRING, [LIMIT => 30])\n ->addColumn('sell_price', STRING, [LIMIT => 30])\n ->addColumn('aed_price', STRING, [LIMIT => 50])\n ->addTimestamps()\n ->save();\n }", "public function up()\n {\n // Drop table 'table_name' if it exists\n $this->dbforge->drop_table('lecturer', true);\n\n // Table structure for table 'table_name'\n $this->dbforge->add_field(array(\n 'nip' => array(\n \t'type' => 'VARCHAR(16)',\n\t\t\t\t'null' => true,\n\t\t\t\t'unique' => true\n\t\t\t),\n 'nik' => array(\n \t'type' => 'VARCHAR(16)',\n\t\t\t\t'null' => false,\n\t\t\t\t'unique' => true\n\t\t\t),\n 'name' => array(\n 'type' => 'VARCHAR(24)',\n 'null' => false,\n ),\n\t\t\t'id_study_program' => array(\n\t\t\t\t'type' => 'VARCHAR(24)',\n\t\t\t\t'null' => false,\n\t\t\t)\n\n ));\n $this->dbforge->add_key('nik', true);\n $this->dbforge->create_table('lecturer');\n }", "public function up()\n\t{\n\t\t// are not setting the foreign key constraint, to allow the examination module to work without the intravitreal\n\t\t// injection module being installed\n\t\t$this->addColumn('et_ophciexamination_injectionmanagementcomplex', 'left_treatment_id', 'int(10) unsigned');\n\t\t$this->addColumn('et_ophciexamination_injectionmanagementcomplex', 'right_treatment_id', 'int(10) unsigned');\n\t}", "public function safeUp()\n {\n $this->createTable('tbl_hand_made_item',\n [\n \"id\" => \"int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY\",\n \"price\" => \"integer\",\n \"discount\" => \"integer\",\n \"preview_id\" => \"integer\",\n \"name\" => \"string\",\n \"description\" => \"text\",\n \"short_description\" => \"text\",\n \"slug\" => \"string\",\n ]\n );\n }", "public function preUp()\n {\n }", "public function up()\n\t{\n\t\t// create the purchase_order_details table\n\t\tSchema::create('purchase_order_details', function($table) {\n\t\t\t$table->engine = 'InnoDB';\n\t\t $table->increments('id');\t\t \n\t\t $table->integer('purchase_order_id')->unsigned();//->foreign()->references('id')->on('orders');\n\t\t $table->integer('product_id')->unsigned();//->foreign()->references('id')->on('products');\n\t\t $table->integer('quantity');\t\t \t \n\t\t $table->integer('created_by')->unsigned();//->foreign()->references('id')->on('users');\t\t \n\t\t $table->integer('updated_by')->unsigned();\n\t\t $table->timestamps();\t\t \n\t\t});\t\n\t}", "public function up()\n {\n if (!$this->isEdu()) {\n return;\n }\n \n $this->edu_up();\n }", "public function up()\n\t{\t\t\n\t\tDB::table('professor')->insert(array(\n\t\t\t'user_id'=>'2',\t\t\t\n\t\t\t'created_at'=>date('Y-m-d H:m:s'),\n\t\t\t'updated_at'=>date('Y-m-d H:m:s')\n\t\t));\t\t\n\n\t\tDB::table('professor')->insert(array(\n\t\t\t'user_id'=>'3',\t\t\t\n\t\t\t'created_at'=>date('Y-m-d H:m:s'),\n\t\t\t'updated_at'=>date('Y-m-d H:m:s')\n\t\t));\n\t\t//\n\t}", "public function up()\n {\n $table = $this->table('qobo_translations_translations');\n $table->renameColumn('object_foreign_key', 'foreign_key');\n $table->renameColumn('object_model', 'model');\n $table->renameColumn('object_field', 'field');\n $table->renameColumn('translation', 'content');\n\n if (!$table->hasColumn('locale')) {\n $table->addColumn('locale', 'char', [\n 'default' => null,\n 'limit' => 6,\n ]);\n }\n $table->update();\n\n $table = TableRegistry::getTableLocator()->get(\"Translations.Translations\");\n $entities = $table->find()->all();\n foreach($entities as $entity) {\n $entity->setDirty('locale', true);\n $table->save($entity);\n }\n }", "public function up()\n {\n $this->addForeignKey('tours_fk', 'tours', 'id', 'tour_to_hotel', 'tour_id');\n\n $this->addForeignKey('t2h_fkh', 'tour_to_hotel', 'hotel_id', 'hotels', 'id');\n $this->addForeignKey('t2h_fkt', 'tour_to_hotel', 'tour_id', 'tours', 'id');\n }", "public function safeUp()\r\n {\r\n $this->createTable('tbl_job_application', array(\r\n 'id' => 'pk',\r\n 'job_id' => 'integer NOT NULL',\r\n 'user_id' => 'integer NULL',\r\n 'name' => 'string NOT NULL',\r\n 'email' => 'text NOT NULL',\r\n 'phone' => 'text NOT NULL',\r\n 'resume_details' => 'text NOT NULL',\r\n 'create_date' => 'datetime NOT NULL',\r\n 'update_date' => 'datetime NULL',\r\n ));\r\n }", "public function up()\n {\n $fields = array(\n 'first_login' => array('type' => 'char', 'constraint' => '1', 'default' => '1'),\n );\n $this->dbforge->add_column('user', $fields);\n }", "public function safeUp() {\n\n $this->createTable('word', [\n 'word_id' => Schema::TYPE_PK,\n 'word_lang_id' => $this->integer(),\n 'word_name' => $this->string(500) . ' NOT NULL',\n 'word_detais' => $this->string(1000),\n ]);\n\n // Add foreign key\n $this->addForeignKey('fk_language_word_1', 'word',\n 'word_lang_id', 'language', 'lang_id', 'CASCADE', 'NO ACTION');\n \n // Create index of foreign key\n $this->createIndex('word_lang_id_idx', 'word', 'word_lang_id');\n }", "public function safeUp()\n {\n $this->alterColumn('item_keuangan', 'created_at', \"TIMESTAMP NOT NULL DEFAULT '2000-01-01 00:00:00'\");\n\n /* Tambah Field */\n $this->addColumn('item_keuangan', 'status', \"TINYINT(1) NOT NULL DEFAULT '1' COMMENT '0=tidak aktif; 1=aktif;' AFTER `jenis`\");\n }", "public function up()\n {\n $this->addForeignKey(\n 'fk_category_product_from_category',\n 'category_product',\n 'category_id',\n 'category',\n 'id',\n 'NO ACTION',\n 'NO ACTION'\n );\n\n $this->addForeignKey(\n 'fk_category_product_from_product',\n 'category_product',\n 'product_id',\n 'product',\n 'id',\n 'NO ACTION',\n 'NO ACTION'\n );\n }", "public function up()\n\t{\n\t\t$this->dropColumn('korzet','utca'); \n\t\t$this->addColumn('korzet','utca','string NOT NULL');\n\t}", "public function up()\n {\n Schema::table($this->table, function (Blueprint $table) {\n // $table->bigInteger('user_id')->default(0)->after('id'); // Example\n $table->dropColumn([\n // 'user_id', // Example\n ]);\n });\n }", "public function up()\n {\n // $this->fields()->create([]);\n // $this->streams()->create([]);\n // $this->assignments()->create([]);\n }", "public function up()\n {\n $table = $this->table('admins');\n $table->addColumn('name', 'string')\n ->addColumn('role', 'string')\n ->addColumn('username', 'string')\n ->addColumn('password', 'string')\n ->addColumn('created', 'datetime')\n ->addColumn('modified', 'datetime', ['null' => true])\n ->create();\n\n\n $data = [ \n [\n 'name' => 'Pedro Santos', \n 'username' => '[email protected]',\n 'password' => '101010',\n 'role' => 'Suporte',\n 'modified' => false\n ],\n ];\n\n $adminTable = TableRegistry::get('Admins');\n foreach ($data as $value) {\n $adminTable->save($adminTable->newEntity($value));\n }\n }", "public function up(): void\n {\n try {\n // SM: We NEVER delete this table.\n if ($this->db->tableExists('prom2_pages')) {\n return;\n }\n $this->db->ForeignKeyChecks(false);\n $statement=$this->db->prepare(\"CREATE TABLE `prom2_pages` (\n `cntPageID` int(10) unsigned NOT NULL AUTO_INCREMENT,\n `txtRelativeURL` varchar(255) NOT NULL COMMENT 'Relative URL',\n `txtTitle` varchar(70) NOT NULL COMMENT 'Title',\n `txtContent` text NOT NULL COMMENT 'Content',\n `blnRobots_DoNotAllow` bit(1) NOT NULL DEFAULT b'1',\n PRIMARY KEY (`cntPageID`),\n UNIQUE KEY `txtRelativeURL` (`txtRelativeURL`),\n KEY `txtTitle` (`txtTitle`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8;\");\n $statement->execute();\n $statement->close();\n $this->db->ForeignKeyChecks(true);\n } catch (\\mysqli_sql_exception $exception) {\n throw $exception;\n }\n }", "public function up()\n\t{\n\t\t// Add data to committee-members\n\t\tDB::table('committee_members')->insert(array(\n\t\t\t'name' => 'Brian O\\'Sullivan',\n\t\t\t'role' => 'Chairman',\n\t\t\t'telephone' => '087-1234567',\n\t\t\t'email' => '[email protected]'\n\t\t));\n\t\tDB::table('committee_members')->insert(array(\n\t\t\t'name' => 'Anthony Barker',\n\t\t\t'role' => 'PRO',\n\t\t\t'telephone' => '087-1234567',\n\t\t\t'email' => '[email protected]'\n\t\t));\t\t\n\t}", "public function up()\n {\n $this->query(\"UPDATE `subscription_types` SET `user_label` = `name` WHERE `user_label` = '' OR `user_label` IS NULL;\");\n\n $this->table('subscription_types')\n ->changeColumn('user_label', 'string', ['null' => false])\n ->update();\n }", "public function safeUp()\n\t{\n $sql = <<<SQL\n alter table r add R8 inte;\nSQL;\n\t\t//$this->execute($sql);\n $sql = <<<SQL\n ALTER TABLE r ADD constraint FK_r8_elgz1 FOREIGN KEY (r8) REFERENCES elgz (elgz1) ON DELETE SET DEFAULT ON UPDATE CASCADE;\nSQL;\n //$this->execute($sql);\n\t}", "public function up()\n\t{\n\t\techo $this->migration('up');\n\n\t\tci('o_role_model')->migration_add('Cookie Admin', 'Cookie Designer and Eater', $this->hash());\n\t\t\n\t\treturn true;\n\t}", "public function up()\n {\n\t\t$this->addColumn('{{%user}}', 'is_super', Schema::TYPE_SMALLINT . \"(1) NULL DEFAULT '0' AFTER `status`\");\n\t\t\n\t\t//Add new column for Option Group table\n\t\t$this->addColumn('{{%option_group}}', 'option_type', Schema::TYPE_STRING . \"(25) NULL DEFAULT 'text' AFTER `title`\");\n\t\t\n\t\t//Add new column for Order table\n\t\t$this->addColumn('{{%order}}', 'is_readed', Schema::TYPE_SMALLINT . \"(1) NULL DEFAULT '0' AFTER `shipment_method`\");\n }", "public function up()\n {\n $this->addColumn(\\backend\\models\\VodProfile::tableName(), 'language', \"char(5) not null default 'en-US'\");\n }", "public function up()\n {\n if (!Schema::hasTable($this->table))\n Schema::create($this->table, function (Blueprint $table)\n {\n $table->integer('parent_id')->unsigned()->index();\n $table->foreign('parent_id')->references('id')->on('organisations')->onDelete('restrict');\n\n $table->integer('child_id')->unsigned()->index();\n $table->foreign('child_id')->references('id')->on('organisations')->onDelete('restrict');\n\n $table->primary(['parent_id','child_id'],'organisation_relations_primary');\n\n $table->timestamps();\n $table->softDeletes();\n\n $table->engine = 'InnoDB';\n });\n }", "public function up(){\n $table = $this->table('users', array('id'=>false, 'primary_key'=>'id'));\n $table->addColumn('id', 'integer', array('identity'=>true, 'signed'=>false));\n $table->addColumn('email', 'string', array('limit'=>100));\n $table->save();\n }", "public function up() { return $this->run('up'); }", "public function safeUp()\n\t{\n\t\t$this->createTable(\n\t\t\t$this->tableName,\n\t\t\tarray(\n\t\t\t\t'l_id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT',\n\t\t\t\t'model_id' => 'INT UNSIGNED NOT NULL',\n\t\t\t\t'lang_id' => 'VARCHAR(5) NULL DEFAULT NULL',\n\n\t\t\t\t// examples:\n\t\t\t\t'l_label' => 'VARCHAR(200) NULL DEFAULT NULL',\n\t\t\t\t'l_announce' => 'TEXT NULL DEFAULT NULL',\n\t\t\t\t//'l_content' => 'TEXT NULL DEFAULT NULL',\n\n\t\t\t\t'INDEX key_model_id_lang_id (model_id, lang_id)',\n\t\t\t\t'INDEX key_model_id (model_id)',\n\t\t\t\t'INDEX key_lang_id (lang_id)',\n\n\t\t\t\t'CONSTRAINT fk_principles_lang_model_id_to_main_model_id FOREIGN KEY (model_id) REFERENCES ' . $this->relatedTableName . ' (id) ON DELETE CASCADE ON UPDATE CASCADE',\n\t\t\t\t'CONSTRAINT fk_principles_lang_lang_id_to_language_id FOREIGN KEY (lang_id) REFERENCES {{language}} (code) ON DELETE RESTRICT ON UPDATE CASCADE',\n\t\t\t),\n\t\t\t'ENGINE=InnoDB DEFAULT CHARACTER SET=utf8 COLLATE=utf8_unicode_ci'\n\t\t);\n\t}", "public function up()\n\t{\n\t\t// create the purchase_orders table\n\t\tSchema::create('purchase_orders', function($table) {\n\t\t\t$table->engine = 'InnoDB';\n\t\t $table->increments('id');\n\t\t $table->string('order_number', 128);\n\t\t $table->string('approved',50);\n\t\t $table->date('purchase_date');\t\t \t \t\t \t \n\t\t $table->integer('created_by')->unsigned();//->foreign()->references('id')->on('users');\t\t \t\t \n\t\t $table->integer('updated_by')->unsigned();\t\t \n\t\t $table->timestamps();\t\t \n\t\t});\t\n\t}", "public function safeUp()\n\t{\n\t\t$this->createTable(\n\t\t\t$this->tableName,\n\t\t\tarray(\n\t\t\t\t'id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT',\n\n\t\t\t\t'label' => 'VARCHAR(20) NULL DEFAULT NULL COMMENT \"language label\"',\n\t\t\t\t'code' => 'VARCHAR(5) NOT NULL COMMENT \"language code\"',\n\t\t\t\t'locale' => 'VARCHAR (5) NULL DEFAULT NULL',\n\n\t\t\t\t'visible' => 'TINYINT(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT \"0 - not visible; 1 - visible\"',\n\t\t\t\t'published' => 'TINYINT(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT \"0 - not published; 1 - published\"',\n\t\t\t\t'position' => 'INT UNSIGNED NOT NULL DEFAULT 0 COMMENT \"order by position DESC\"',\n\t\t\t\t'created' => 'INT UNSIGNED NOT NULL COMMENT \"unix timestamp - creation time\"',\n\t\t\t\t'modified' => 'INT UNSIGNED NOT NULL COMMENT \"unix timestamp - last entity modified time\"',\n\n\t\t\t\t'UNIQUE key_unique_code (code)',\n\t\t\t),\n\t\t\t'ENGINE=InnoDB DEFAULT CHARACTER SET=utf8 COLLATE=utf8_unicode_ci'\n\t\t);\n\n\t\t$this->insert('{{language}}', array(\n\t\t\t'label' => 'рус',\n\t\t\t'code' => 'ru',\n\t\t\t'locale' => 'ru',\n\t\t));\n\t}", "public function up()\n {\n $this->execute('Update goods SET price_rub = price WHERE currency_id = 1');\n }", "public function up()\n\t{\n $this->dropColumn('calculo','fecha');\n\n //add column fecha in producto\n $this->addColumn('producto','fecha','date');\n\t}", "public function up(){\n Schema::table('entries', function (Blueprint $table) {\n $table->renameColumn('value', 'entry_value');\n });\n }", "public function safeUp() {\n\t$this->createTable('post', array(\n 'id' =>\"int(11) NOT NULL AUTO_INCREMENT\",\n 'created_on' =>\"int(11) NOT NULL\",\n 'title' =>\"varchar(255) NOT NULL\",\n 'context' =>\"text NOT NULL\",\n \"PRIMARY KEY (`id`)\"\n\t),'ENGINE=InnoDB DEFAULT CHARSET=utf8');\n }", "public function getUpSQL()\n {\n return array (\n 'default' => '\n# This is a fix for InnoDB in MySQL >= 4.1.x\n# It \"suspends judgement\" for fkey relationships until are tables are set.\nSET FOREIGN_KEY_CHECKS = 0;\n\nALTER TABLE `department_summary`\n\n CHANGE `twitter_account` `positive_twitter_account` TEXT NOT NULL,\n\n ADD `negative_twitter_account` TEXT NOT NULL AFTER `positive_twitter_account`;\n\nALTER TABLE `tweets`\n\n CHANGE `positive_twitter_account` `twitter_account` TEXT NOT NULL,\n\n DROP `negative_twitter_account`;\n\n# This restores the fkey checks, after having unset them earlier\nSET FOREIGN_KEY_CHECKS = 1;\n',\n);\n }", "public function up()\n {\n $this->db->createCommand($this->DROP_SQL)->execute();\n $this->db->createCommand($this->CREATE_SQL)->execute();\n }", "public function up()\n {\n $this->db->createCommand($this->DROP_SQL)->execute();\n $this->db->createCommand($this->CREATE_SQL)->execute();\n }", "public function safeUp()\n {\n $this->addColumn('{{%organization}}', 'legal_entity', $this->string()->null());\n $this->addColumn('{{%organization}}', 'contact_name', $this->string()->null());\n $this->addColumn('{{%organization}}', 'about', $this->text()->null());\n $this->addColumn('{{%organization}}', 'picture', $this->string()->null());\n }", "public function up()\n {\n $this->table('agent_order_consignee_address')\n ->addColumn(Column::string('order_number')->setUnique()->setComment('订单编号'))\n \t\t->addColumn(Column::integer('agent_id')->setComment('代理商ID'))\n\t ->addColumn(Column::integer('create_time')->setDefault(1)->setComment('创建时间'))\n\t \n\t ->addColumn(Column::string('consignee_name')->setComment('收货人姓名'))\n\t ->addColumn(Column::string('consignee_phone')->setComment('收货人电话'))\n\t ->addColumn(Column::string('province')->setComment('省份'))\n\t ->addColumn(Column::string('city')->setComment('城市'))\n\t ->addColumn(Column::string('area')->setComment('地区'))\n\t ->addColumn(Column::string('address')->setComment('收货人详细地址'))\n ->create(); \n }", "public function up()\n\t{\n\t\t$this->createTable(\n\t\t\t$this->tableName,\n\t\t\tarray(\n\t\t\t\t'l_id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT',\n\t\t\t\t'model_id' => 'INT UNSIGNED NOT NULL',\n\t\t\t\t'lang_id' => 'VARCHAR(5) NULL DEFAULT NULL',\n\n\t\t\t\t'l_value' => 'TEXT NULL DEFAULT NULL',\n\n\t\t\t\t'INDEX key_model_id_lang_id (model_id, lang_id)',\n\t\t\t\t'INDEX key_model_id (model_id)',\n\t\t\t\t'INDEX key_lang_id (lang_id)',\n\n\t\t\t\t'CONSTRAINT fk_configuration_lang_model_id_to_main_model_id FOREIGN KEY (model_id) REFERENCES ' . $this->relatedTableName . ' (id) ON DELETE CASCADE ON UPDATE CASCADE',\n\t\t\t\t'CONSTRAINT fk_configuration_lang_lang_id_to_language_id FOREIGN KEY (lang_id) REFERENCES {{language}} (code) ON DELETE RESTRICT ON UPDATE CASCADE',\n\t\t\t),\n\t\t\t'ENGINE=InnoDB DEFAULT CHARACTER SET=utf8 COLLATE=utf8_unicode_ci'\n\t\t);\n\t}", "public function safeUp()\r\n {\r\n $this->up();\r\n }", "public function up(){\n // $table->table('kelas')\n // ->addColumn('Id', 'int', \"11\", false, null, true, true)\n // ->addColumn('NamaKelas', 'varchar', \"100\")\n // ->create();\n }", "public function safeUp()\n\t{\n\t\t$this->createTable('pesquisa', array(\n\t\t\t'id' => 'serial NOT NULL primary key',\n\t\t\t'nome' => 'varchar',\n\t\t));\n\t}", "public function safeUp()\n\t{\n\t\t$this->up();\n\t}", "public function safeUp()\n {\n $this->up();\n }", "public function safeUp()\n {\n $this->up();\n }", "public function up(){\n // $table->table('kelassiswa')\n // ->addColumn('Id', 'int', \"11\", false, null, true, true)\n // ->addColumn('Kelas_Id', 'int', \"11\")\n // ->addColumn('Peserta_Id', 'int', \"11\")\n // ->addForeignKey('Peserta_Id', 'peserta', \"Id\", \"CASCADE\")\n // ->addForeignKey('Kelas_Id', 'kelas', \"Id\")\n // ->create();\n\n }", "public function up()\n\t{\n\t\tSchema::table('project_sections', function($t){\n\t\t\t$t->integer('created_by_project_id')->nullable()->unsigned();\n\t\t\t$t->boolean('public')->default(0);\n\n $t->foreign('created_by_project_id')->references('id')->on('projects')->on_delete('SET NULL');\n\t\t});\n\t}", "public function up(){\n\t\tglobal $wpdb;\n\n\t\t$wpdb->query('ALTER TABLE `btm_tasks` ADD COLUMN `last_run` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP AFTER `date_created`;');\n\t}", "public function up()\n {\n Schema::table('user_permissions', function ($table) {\n $table->dropColumn('solder_create');\n });\n\n Schema::table('user_permissions', function ($table) {\n $table->dropColumn('solder_mods');\n });\n\n Schema::table('user_permissions', function ($table) {\n $table->dropColumn('solder_modpacks');\n });\n\n Schema::table('user_permissions', function ($table) {\n $table->boolean('solder_keys')->default(0);\n $table->boolean('solder_clients')->default(0);\n $table->boolean('modpacks_create')->default(0);\n $table->boolean('modpacks_manage')->default(0);\n $table->boolean('modpacks_delete')->default(0);\n });\n }", "public function up()\n {\n Schema::dropIfExists('db_question_new.t_answer_type');\n Schema::create('db_question_new.t_answer_type', function (Blueprint $table){\n $table->increments('id');\n t_field($table->integer('answer_type_no'),\"答案序号\");\n t_field($table->string('name'),\"步骤名字\");\n t_field($table->integer('subject'),\"科目id\");\n t_field($table->integer('open_flag')->default(1),\"开启与否\");\n }); \n }", "public function up()\n\t{\n\t\t$sql = \"create table tbl_rights\n\t\t\t\t(\n\t\t\t\t\titemname varchar(64) not null,\n\t\t\t\t\ttype integer not null,\n\t\t\t\t\tweight integer not null,\n\t\t\t\t\tprimary key (itemname),\n\t\t\t\t\tforeign key (itemname) references tbl_auth_item (name) on delete cascade on update cascade\n\t\t\t\t)\";\n\t\t $this->execute($sql);\n\t\t \n\t}", "public function safeUp()\n\t{\n\t\t$this->createTable( 'tbl_auth_item', array(\n\t\t \"name\" => \"varchar(64) not null\",\n\t\t \"type\" => \"integer not null\",\n\t\t \"description\" => \"text\",\n\t\t \"bizrule\" => \"text\",\n\t\t \"data\" => \"text\",\n\t\t \"primary key (name)\",\n\t\t));\n\n\t\t$this->createTable(\"tbl_auth_item_child\", array(\n \t\t\"parent\" => \" varchar(64) not null\",\n\t\t\"child\" => \" varchar(64) not null\",\n \t\t\"primary key (parent,child)\",\n\t\t));\n\n\t\t$this->createTable(\"tbl_auth_assignment\",array(\n \t\t\"itemname\" => \"varchar(64) not null\",\n \t\t\"userid\" => \"varchar(64) not null\",\n \t\t\"bizrule\" => \"text\",\n \t\t\"data\"\t => \"text\",\n \t\t\"primary key (itemname,userid)\",\n\t\t));\n\n\t\t$this->addForeignKey('fk_auth_item_child_parent','tbl_auth_item_child','parent','tbl_auth_item','name','CASCADE','CASCADE');\n\t\t$this->addForeignKey('fk_auth_assignment_itemname','tbl_auth_assignment','itemname','tbl_auth_item','name');\n\t\t$this->addForeignKey('fk_auth_assignment_userid','tbl_auth_assignment','userid','tbl_user','id');\n\t}", "public function up()\n {\n // add foreign key for table `articles`\n $this->addForeignKey(\n 'fk-comments-article_id',\n 'comments',\n 'article_id',\n 'article',\n 'id'\n );\n }", "public function safeUp()\r\n\t{\r\n\t\t$this->up();\r\n\t}", "public function up()\n {\n\n $tableOptions = null;\n if ($this->db->driverName === 'mysql') {\n $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB';\n }\n\n $this->createTable($this->createTableName, [\n 'id' => $this->primaryKey(),\n 'name' => $this->string()->notNull(),\n 'type' => $this->integer(1)->notNull(),\n 'location' => $this->text()->defaultValue(null),\n 'description' => $this->text()->defaultValue(null),\n 'created_by' => $this->integer()->notNull(),\n 'start_at' => $this->integer()->defaultValue(null),\n 'active' => $this->boolean()->defaultValue(true),\n\n ],$tableOptions);\n\n\n $this->addColumn($this->updateTableNameHoliday, $this->addColumnOne, $this->integer()->notNull()->after('name'));\n $this->addColumn($this->updateTableNameHoliday, $this->addColumnTwo, $this->integer()->notNull()->after($this->addColumnOne));\n $this->addColumn($this->updateTableNameHolidayConfig, $this->addColumnOne, $this->integer()->notNull()->after('name'));\n $this->addColumn($this->updateTableNameHolidayConfig, $this->addColumnTwo, $this->integer()->notNull()->after($this->addColumnOne));\n\n $moduleInvite = Module::findOne(['name' => 'Actioncalendar', 'slug' => 'actioncalendar']);\n if(empty($moduleInvite)) {\n $this->batchInsert('{{%module}}', ['parent_id', 'name', 'slug', 'visible', 'sorting'], [\n [null, 'Actioncalendar', 'actioncalendar', 1, 22],\n ]);\n }\n\n }", "public function up()\n\t{\n\t\tSchema::table('user_hasil', function($table)\n\t\t{\n\t\t\t$table->create();\n\t\t\t$table->integer('user_id');\n\t\t\t$table->string('grade', 2);\n\t\t\t$table->decimal('hasil', 5, 2);\n\t\t\t$table->year('tahun');\n\t\t\t$table->timestamps();\n\n\t\t\t$table->foreign('user_id')->references('id')->on('users')->on_update('cascade');\n\t\t});\n\t}", "public function safeUp()\r\n {\r\n $tableOptions = null;\r\n if ($this->db->driverName === 'mysql') {\r\n $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB';\r\n }\r\n\r\n $this->createTable('{{%contact_msg}}', [\r\n 'id' => Schema::TYPE_PK,\r\n 'from_email' => Schema::TYPE_STRING . \"(320) NOT NULL\",\r\n 'to_email' => Schema::TYPE_STRING . \"(320) NULL\",\r\n 'subject' => Schema::TYPE_STRING . \"(300) NOT NULL\",\r\n 'text' => Schema::TYPE_TEXT,\r\n 'viewed' => Schema::TYPE_BOOLEAN . \"(1) NOT NULL DEFAULT '0'\",\r\n 'created_at' => Schema::TYPE_TIMESTAMP . \" NULL\",\r\n 'updated_at' => Schema::TYPE_TIMESTAMP . \" NULL\",\r\n ], $tableOptions);\r\n }", "public function up()\n {\n $this->alterColumn('{{%hystorical_data}}', 'project_id', $this->integer());\n\n $this->dropForeignKey('fk-hystorical_data-project_id',\n '{{%hystorical_data}}');\n\n $this->addForeignKey(\n 'fk-hystorical_data-project_id',\n '{{%hystorical_data}}',\n 'project_id',\n '{{%projects}}',\n 'id',\n 'SET NULL'\n );\n }", "public function up()\n\t{\n\t\tSchema::create('flows_steps', function($table) {\n\n\t\t\t$table->engine = 'InnoDB';\n\n\t\t $table->increments('stepid');\n\t\t $table->integer('flowid');\n\t\t $table->string('step', 100);\n\t\t $table->integer('roleid');\n\t\t $table->integer('parentid');\n\t\t $table->integer('state');\n\t\t $table->integer('page');\n\t\t $table->integer('condition2');\n\t\t $table->timestamps();\n\n\t\t});\n\t}", "public function safeUp()\n {\n $this->createTable('site_phrase', array(\n 'site_id' => self::MYSQL_TYPE_UINT,\n 'phrase' => 'string NOT NULL',\n 'hash' => 'varchar(32)',\n 'price' => 'decimal(10,2) NOT NULL',\n 'active' => self::MYSQL_TYPE_BOOLEAN,\n ));\n\n $this->addForeignKey('site_phrase_site_id', 'site_phrase', 'site_id', 'site', 'id', 'CASCADE', 'RESTRICT');\n }", "public function up()\n\t{\n\t\tSchema::table('devices', function($table)\n\t\t{\n\t\t\t$table->string('uuid')->unique;\n\t\t\t$table->drop_column('uid');\n\t\t});\n\t}", "public function up()\n\t{\n\t\t$this->execute(\"\n INSERT INTO `authitem` VALUES('D2finv.FiitInvoiceItem.*', 0, 'Edit invoice items', NULL, 'N;');\n INSERT INTO `authitem` VALUES('D2finv.FiitInvoiceItem.View', 0, 'View invoice items', NULL, 'N;');\n INSERT INTO `authitem` VALUES('D2finv.FinvInvoice.*', 0, 'Edit invoice records', NULL, 'N;');\n INSERT INTO `authitem` VALUES('D2finv.FinvInvoice.View', 0, 'View invoice records', NULL, 'N;');\n \n INSERT INTO `authitem` VALUES('InvoiceEdit', 2, 'Edit invoice records', NULL, 'N;');\n INSERT INTO `authitem` VALUES('InvoiceView', 2, 'View invoice records', NULL, 'N;');\n \n INSERT INTO `authitemchild` VALUES('InvoiceEdit', 'D2finv.FiitInvoiceItem.*');\n INSERT INTO `authitemchild` VALUES('InvoiceView', 'D2finv.FiitInvoiceItem.View');\n INSERT INTO `authitemchild` VALUES('InvoiceEdit', 'D2finv.FinvInvoice.*');\n INSERT INTO `authitemchild` VALUES('InvoiceView', 'D2finv.FinvInvoice.View');\n \");\n\t}", "public function up()\n {\n $this->createTable('post',[\n 'id' => $this->primaryKey(),\n 'author_id' => $this->integer(),\n 'title' => $this->string(255)->notNull()->unique(),\n 'content' => $this->text(),\n 'published_at' => $this->dateTime()->defaultExpression('CURRENT_TIMESTAMP'),\n 'updated_at' => $this->dateTime()->defaultExpression('CURRENT_TIMESTAMP'),\n 'status' => \"ENUM('draft','published')\",\n 'image' => $this->string(255)\n ]); \n\n $this->addForeignKey(\n 'fk_post_author_id',\n 'post',\n 'author_id',\n 'user',\n 'id',\n 'CASCADE',\n 'NO ACTION'\n );\n }", "public function up()\n\t{\n// $import->import();\n\t}", "public function up()\n\t{\n\t\tif(Yii::app()->db->getSchema()->getTable(\"{{rights}}\")){\n\t\t\t$this->dropTable(\"authItem\");\n\t\t}\n\n\t\t$this->createTable(\"{{rights}}\", array(\n\t\t\t\"itemname\" => \"varchar(64) CHARACTER SET UTF8 NOT NULL\",\n\t\t\t\"type\"\t => \"int not null\",\n\t\t\t\"weight\" => \"int not null\",\n\t\t\t\"PRIMARY KEY (itemname)\"\n\t\t\t));\n\t}", "public function up() {\r\n\t\t// UP\r\n\t\t$column = parent::Column();\r\n\t\t$column->setName('id')\r\n\t\t\t\t->setType('biginteger')\r\n\t\t\t\t->setIdentity(true);\r\n\t\tif (!$this->hasTable('propertystorage')) {\r\n\t\t\t$this->table('propertystorage', [\r\n\t\t\t\t\t\t'id' => false,\r\n\t\t\t\t\t\t'primary_key' => 'id'\r\n\t\t\t\t\t])->addColumn($column)\r\n\t\t\t\t\t->addColumn('path', 'text', ['limit' => 1024])\r\n\t\t\t\t\t->addColumn('name', 'text', ['limit' => 100])\r\n\t\t\t\t\t->addColumn('valuetype', 'integer',[])\r\n\t\t\t\t\t->addColumn('value', 'text', [])\r\n\t\t\t\t\t->create();\r\n\t\t}\r\n\t}", "public function up()\n {\n $perfis = [\n [\n 'id' => 1,\n 'perfil' => 'Genérico',\n 'ativo' => 1\n ]\n ];\n\n $this->insert('singular_perfil', $perfis);\n\n $usuarios = [\n [\n 'id' => 1,\n 'nome' => 'Singular Framework',\n 'login' => 'singular',\n 'senha' => 'singular',\n 'perfil_id' => 1\n ]\n ];\n\n $this->insert('singular_usuario', $usuarios);\n }", "public function safeUp()\n {\n $this->createTable('user', array(\n 'name' => 'string',\n 'username' => 'string NOT NULL',\n 'password' => 'VARCHAR(32) NOT NULL',\n 'salt' => 'VARCHAR(32) NOT NULL',\n 'role' => \"ENUM('partner', 'admin')\"\n ));\n }", "public function up()\n\t{\n\t\t$demoUser = new User();\n\t\t$demoUser->username = \"demo\";\n\t\t$demoUser->email = '[email protected]';\n\t\t$demoUser->password = 'password';\n\t\t$demoUser->create_time = new CDbExpression('NOW()');\n\t\t$demoUser->update_time = new CDbExpression('NOW()');\n\n\t\t$demoUser->save();\n\n\t\t$adminUser = new User();\n\t\t$adminUser->username = \"admin\";\n\t\t$adminUser->email = '[email protected]';\n\t\t$adminUser->password = 'password';\n\t\t$adminUser->create_time = new CDbExpression('NOW()');\n\t\t$adminUser->update_time = new CDbExpression('NOW()');\n\n\t\t$adminUser->save();\n\n\t}", "public function safeUp()\n {\n $tables = Yii::$app->db->schema->getTableNames();\n $dbType = $this->db->driverName;\n $tableOptions_mysql = \"CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB\";\n\n /* MYSQL */\n if (!in_array('question_tag', $tables)) {\n if ($dbType == \"mysql\") {\n $this->createTable('{{%question_tag}}', [\n 'question_id' => 'INT(11) NOT NULL',\n 'tag_id' => 'INT(11) NOT NULL',\n ], $tableOptions_mysql);\n }\n }\n }", "public function safeUp()\n\t{\n\t\t$this->createTable(\n\t\t\t'like',\n\t\t\tarray(\n\t\t\t\t'id'=>'int(11) UNSIGNED NOT NULL AUTO_INCREMENT',\n\t\t\t\t'user_id' => 'int(11) UNSIGNED NOT NULL',\n\t\t\t\t'post_id' => 'int (11) NOT NULL',\n\t\t\t\t'status' => 'TINYINT(1)',\n\t\t\t\t'created_at' => 'int(11)',\n\t\t\t\t'updated_at' => 'int(11)',\n\t\t\t\t'PRIMARY KEY (id)',\n\t\t\t\t),\n\t\t\t'ENGINE=InnoDB'\n\n\t\t\t);\n\t}", "public function up()\n\t{\n\t\tSchema::table('entries', function($table) {\n $table->create();\n $table->increments('id');\n $table->string('title', 128);\n $table->string('body');\n $table->integer('users_id')->unsigned();\n $table->index('users_id');\n $table->integer('last_edited_by');\n $table->foreign('users_id')->references('id')->on('users')->on_delete('no action');\n $table->timestamps();\n });\n\t}", "public function up()\n {\n $this->alterColumn(\\app\\models\\EmailImportLead::tableName(), 'password', $this->string()->null());\n $this->alterColumn(\\app\\models\\EmailImportLead::tableName(), 'status', $this->integer()->null());\n }", "public function up()\n {\n\t\t$tableOptions = null;\n if ($this->db->driverName === 'mysql') {\n $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB';\n }\n\t\t\n\t\t$TABLE_NAME = 'HaberDeneme12';\n $this->createTable($TABLE_NAME, [\n 'HaberID' => $this->integer(10)->notNull(),\n 'Kategori' => $this->string(12)->notNull(),\n 'Baslik' => $this->string(128)->notNull(),\n 'Ozet' => $this->text()->notNull(),\n 'Detay' => $this->text()->notNull(),\n 'Resim' => $this->text()->notNull(),\n 'EklenmeTarihi' => $this->date(),\n 'GuncellenmeTarihi' => $this->date()\n ], $tableOptions);\n\t\t\n\t\t\n\t\t$TABLE_NAME = 'HaberKategoriDeneme12';\n\t\t $this->createTable($TABLE_NAME, [\n 'KategoriID' => $this->integer(10)->notNull(),\n 'Kategori' => $this->string(20)->notNull()\n ], $tableOptions);\n\t\t\n }", "public function up()\n\t{\n\t\t$fields = array(\n \"`piezas` DECIMAL(3,2) DEFAULT NULL\",\n\n\t\t);\n\t\t$this->dbforge->add_column('rel_monto_servicios', $fields);\n\n\t}", "public function up()\n {\n $this->insert('key_value', [\n 'key' => 'day_feed_count_dnr',\n 'value' => '15',\n ]);\n }", "public function up()\n {\n // 创建操作记录表\n $tables = $this->table('history');\n // 用户动作\n $tables->addColumn('action', 'string', ['limit' => 20])\n ->addColumn('ip', 'string', ['limit' => 129])\n // 建立用户\n ->addColumn('user_id', 'integer')\n // 登录时间\n ->addColumn('operation_time', 'datetime')\n // 操作详情\n ->addColumn('desc', 'string',['limit'=>500,'null' => true])\n ->create();\n }", "public function up()\n {\n $table = $this->table('vehicle_model_suggestions');\n\n if (!$table->exists()) {\n $table\n ->addPrimaryKey('id')\n ->addColumn('vehicle_id', 'integer', ['null' => false])\n ->addColumn('vehicle_model_id', 'integer', ['null' => false])\n ->addColumn('suggestion', 'text')\n ->addTimestamps()\n ->addColumn('deleted_at', 'datetime')\n ->create();\n }\n }", "public function safeUp()\n {\n $this->insert('category',['name'=>'Uncategorized', 'slug'=>'uncategorized', 'description'=>'Default Category', 'created_at'=> new Expression('NOW()'),\n 'updated_at'=> new Expression('NOW()')]);\n $this->insert('user',['username'=>'Administrator', 'password_hash'=>'$2y$13$6yoLjvVORp/7EO1u8phYTuWYzhMSM4LVVsebZgcqEKj/EQLvo5nJK',\n 'email'=>'[email protected]',\n 'created_at'=> new Expression('NOW()'),\n 'updated_at'=> new Expression('NOW()'),\n 'status'=>1\n ]\n );\n }", "public function safeUp()\n {\n $this->createTable($this->tableName, [\n 'post_id' => $this->bigInteger()->notNull(),\n 'category_id' => $this->bigInteger()->notNull(),\n ]);\n\n $this->addForeignKey('post_category_post_id_fk', $this->tableName, 'post_id', '{{%post}}', 'id', 'CASCADE', 'CASCADE');\n $this->addForeignKey('post_category_category_id_fk', $this->tableName, 'category_id', '{{%category}}', 'id', 'CASCADE', 'CASCADE');\n }", "public function up()\n {\n Schema::table('categories', function(Blueprint $table)\n {\n $table->integer('parent_id', false, true)->nullable()->after('cat_order');\n });\n }", "public function safeUp()\n\t{\n\t\t$this->createTable(\n\t\t\t$this->tableName,\n\t\t\tarray(\n\t\t\t\t'id' => 'INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT',\n\n\t\t\t\t'application_id' => 'VARCHAR(32) NOT NULL DEFAULT \"\" COMMENT \"Ид приложения\"',\n\n\t\t\t\t'message' => 'TEXT NOT NULL DEFAULT \"\" COMMENT \"Оригинал\"',\n\t\t\t\t'category' => 'VARCHAR(32) NOT NULL DEFAULT \"\" COMMENT \"Категория\"',\n\t\t\t\t'language' => 'VARCHAR(5) NOT NULL DEFAULT \"\" COMMENT \"Язык\"',\n\t\t\t),\n\t\t\t'ENGINE=InnoDB DEFAULT CHARACTER SET=utf8 COLLATE=utf8_unicode_ci'\n\t\t);\n\t}", "public function up()\n\t{\n\t\t//\n\t\tSchema::create('options',function($table){\n\t\t\t$table->increments('id');\n\t\t\t$table->boolean('activate_pn');\n\t\t\t$table->string('basic_name');\n\t\t\t$table->string('basic_pass');\n\t\t\t$table->timestamps();\n\t\t});\n\n\t\t$o = new Option;\n\t\t$o->activate_pn = 0;\n\t\t$o->save();\n\t}", "public function up() {\n\t\t$this->dbforge->add_field(array(\n\t\t\t'id' => array(\n\t\t\t\t'type' => 'INT',\n\t\t\t\t'constraint' => '10',\n\t\t\t\t'unsigned' => TRUE,\n\t\t\t\t'auto_increment' => TRUE\n\t\t\t),\n\t\t\t'name' => array(\n\t\t\t\t'type' => 'VARCHAR',\n\t\t\t\t'constraint' => '100',\n\t\t\t),\n\t\t\t'path' => array(\n\t\t\t\t'type' => 'VARCHAR',\n\t\t\t\t'constraint' => '100',\n\t\t\t)\n\t\t));\n\t\t$this->dbforge->add_key('id', TRUE);\n\t\t$this->dbforge->add_key('path');\n\t\t$this->dbforge->create_table('categories');\n\n\t\t// Table structure for table 'event_categories'\n\t\t$this->dbforge->add_field(array(\n\t\t\t'event_id' => array(\n\t\t\t\t'type' => 'INT',\n\t\t\t\t'constraint' => '10',\n\t\t\t),\n\t\t\t'category_id' => array(\n\t\t\t\t'type' => 'INT',\n\t\t\t\t'constraint' => '10',\n\t\t\t\t'unsigned' => TRUE,\n\t\t\t),\n\t\t));\n\t\t$this->dbforge->add_key('event_id', TRUE);\n\t\t$this->dbforge->add_key('category_id', TRUE);\n\t\t$this->dbforge->create_table('event_categories');\n\t}", "public function up()\n\t{\n Laravel\\Database\\Schema::create(\"orbs\", function($table){\n $table->increments(\"id\");\n $table->string(\"name\");\n $table->string(\"description\");\n $table->integer(\"coins\");\n $table->integer(\"points\");\n $table->integer(\"min_level\");\n $table->integer(\"max_level\");\n $table->integer(\"owner_character\");\n $table->integer(\"acquisition_time\");\n $table->integer(\"last_attacker\");\n $table->integer(\"last_attack_time\");\n $table->string(\"image\");\n });\n\t}" ]
[ "0.80062366", "0.79145443", "0.79145443", "0.79145443", "0.7572342", "0.756089", "0.75283176", "0.7498379", "0.7493237", "0.7453656", "0.74463314", "0.7433381", "0.74307704", "0.7427088", "0.741794", "0.73779047", "0.7374933", "0.7370453", "0.73637444", "0.73505706", "0.7329024", "0.7313519", "0.7298817", "0.72950184", "0.72917736", "0.7291469", "0.72913444", "0.72849613", "0.72839737", "0.7272078", "0.7271878", "0.72659117", "0.7262893", "0.7261672", "0.7256839", "0.72505474", "0.7249633", "0.72441125", "0.724062", "0.72376186", "0.7218244", "0.72177947", "0.72046006", "0.7203395", "0.7196059", "0.7191219", "0.7189963", "0.7177052", "0.71761394", "0.7167738", "0.7164105", "0.7164105", "0.7159096", "0.7147647", "0.7136521", "0.7129768", "0.7124664", "0.7123368", "0.71168584", "0.7104628", "0.7104628", "0.7104618", "0.7097006", "0.70931643", "0.70886755", "0.7087018", "0.7086326", "0.70830804", "0.70829463", "0.70780045", "0.70702124", "0.70690626", "0.7066111", "0.7062268", "0.7058938", "0.705882", "0.70556235", "0.70549136", "0.7054758", "0.70498437", "0.70483595", "0.7047308", "0.7045881", "0.70445794", "0.7043173", "0.703882", "0.7038126", "0.703674", "0.7033728", "0.7032356", "0.7031423", "0.70257956", "0.70142514", "0.70101255", "0.7006208", "0.6988486", "0.6984963", "0.69629973", "0.69612974", "0.69587934", "0.6957519" ]
0.0
-1
this down() migration is autogenerated, please modify it to your needs
public function down(Schema $schema) { $this->abortIf($this->connection->getDatabasePlatform()->getName() != "mysql", "Migration can only be executed safely on 'mysql'."); $this->addSql("ALTER TABLE opportunity CHANGE policy_number policy_number VARCHAR(255) NOT NULL, CHANGE effective_dt effective_dt VARCHAR(255) NOT NULL, CHANGE line_code line_code VARCHAR(255) NOT NULL, CHANGE lsp_code lsp_code VARCHAR(255) NOT NULL, CHANGE renewal_count renewal_count VARCHAR(255) NOT NULL, CHANGE premium premium VARCHAR(255) NOT NULL, CHANGE vehicle_count vehicle_count VARCHAR(255) NOT NULL, CHANGE homeowners_count homeowners_count VARCHAR(255) NOT NULL"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function down()\n {\n //add your migration here \n }", "public function down()\n {\n //add your migration here\n }", "public function down()\n\t{\n $this->dropColumn('producto','fecha');\n\n //add column fecha in producto\n $this->addColumn('calculo','fecha','date');\n\t}", "public function down()\n {\n \t\n \t$this->createTable('os', [\n \t\t\t'id' => Schema::TYPE_PK,\n \t\t\t'name' => Schema::TYPE_STRING . ' NOT NULL',\n \t\t\t]);\n \t$this->insert('os', ['id' => 1, 'name' => 'Any']);\n \t$this->insert('os', ['id' => 2, 'name' => 'CentOS']);\n \t$this->insert('os', ['id' => 3, 'name' => 'RHEL']);\n \t$this->insert('os', ['id' => 4, 'name' => 'Fedora']);\n \t \n \t$this->createTable('os_bit', [\n \t\t\t'id' => Schema::TYPE_PK,\n \t\t\t'name' => Schema::TYPE_STRING . ' NOT NULL',\n \t\t\t]);\n\n return false;\n }", "public function down()\n {\n //Schema::dropIfExists('c');//回滚时执行\n\n }", "public function down()\n {\n $this->dbforge->drop_column('user', 'created_at');\n }", "public function down()\n {\n $this->dropForeignKey(\n 'fk-video-blog_id',\n 'video'\n );\n\n\n echo \"m160820_150846_video_create reverted.\\n\";\n\n }", "public function down()\n\t{\nDB::query(\n\"drop table haal;\");\nDB::query(\n\"drop table kandidaat;\");\nDB::query(\n\"drop table haaletaja;\");\nDB::query(\n\"drop table partei;\");\nDB::query(\n\"drop table valimisringkond;\");\n\t}", "public function down()\n\t{\n\t\t// Remove data from committee_members\n\t\tDB::table('committee_members')->where('id', '<', 3)->delete();\t\n\t}", "public function down(){\n $this->dropTable('users');\n }", "public function getDownSQL()\n {\n return array (\n 'default' => '\n# This is a fix for InnoDB in MySQL >= 4.1.x\n# It \"suspends judgement\" for fkey relationships until are tables are set.\nSET FOREIGN_KEY_CHECKS = 0;\n\nALTER TABLE `department_summary`\n\n CHANGE `positive_twitter_account` `twitter_account` TEXT NOT NULL,\n\n DROP `negative_twitter_account`;\n\nALTER TABLE `tweets`\n\n CHANGE `twitter_account` `positive_twitter_account` TEXT NOT NULL,\n\n ADD `negative_twitter_account` INTEGER NOT NULL AFTER `quality_tweet`;\n\n# This restores the fkey checks, after having unset them earlier\nSET FOREIGN_KEY_CHECKS = 1;\n',\n);\n }", "public function down()\n {\n Schema::table('attachments', function(Blueprint $table) {\n\n $table->dropColumn('viewable_id');\n $table->dropColumn('viewable_type');\n\n\n });\n }", "public function down()\n\t{\n\t\t//Schema::drop('purchase_order_details');\n\t}", "public function getDownSQL()\r\n {\r\n return array (\n 'propel' => '\r\n# This is a fix for InnoDB in MySQL >= 4.1.x\r\n# It \"suspends judgement\" for fkey relationships until are tables are set.\r\nSET FOREIGN_KEY_CHECKS = 0;\r\n\r\nDROP TABLE IF EXISTS `movimiento`;\r\n\r\n# This restores the fkey checks, after having unset them earlier\r\nSET FOREIGN_KEY_CHECKS = 1;\r\n',\n);\r\n }", "public function down()\n\t{\n//\t\t$this->dbforge->drop_table('blog');\n\n//\t\t// Dropping a Column From a Table\n\t\t$this->dbforge->drop_column('categories', 'icon');\n\t}", "public function down()\n\t{\n\t\t// nothing to do here.\n\t}", "public function down(){\r\n $this->dbforge->drop_table('users'); //eliminacion de la tabla users\r\n }", "public function down()\n\t{\n\t\tSchema::drop('student');\n\t\t//\n\t}", "public function down()\n{\n\nSchema::drop('event_user');\nSchema::drop('events');\nSchema::drop('file');\nSchema::drop('file_ref');\nSchema::drop('groups');\nSchema::drop('project_user');\nSchema::drop('projects');\nSchema::drop('quicknote');\nSchema::drop('subtasks');\nSchema::drop('task_user');\nSchema::drop('tasks');\nSchema::drop('throttle');\nSchema::drop('timesheet');\nSchema::drop('todos');\nSchema::drop('user_profile');\nSchema::drop('users');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\nSchema::drop('users_groups');\n\n}", "public function down() \n {\n \n }", "public function down()\n\t{\n\t}", "public function down()\n\t{\n\t}", "public function down()\n {\n $this->table('contents')->drop()->save();\n }", "public function down()\n\t{\n\t\t//\n\t}", "public function down()\n\t{\n\t\t//\n\t}", "public function down()\n\t{\n\t\t//\n\t}", "public function down()\n\t{\n\t\tSchema::drop('education');\n\t}", "public function down()\n\t{\n\t\tSchema::drop('l_wardrobe_table');\n\t}", "public function down()\n\t{\n\t\techo $this->migration('down');\n\n\t\tci('o_role_model')->migration_remove($this->hash());\n\t\t\n\t\treturn true;\n\t}", "public function safeDown()\n\t{\n $sql=\" ALTER TABLE `tbl_venta` DROP `punto_venta_id` ;\";\n $this->execute($sql);\n //quitando la columna pto_venta de tbl_empleado\n $sql=\" ALTER TABLE `tbl_empleado` DROP `punto_venta_id` ;\";\n $this->execute($sql);\n\t}", "public function down()\n {\n\tSchema::drop('quizzes');\n }", "public function down()\n {\n $this->output->writeln('Down migration is not available.');\n }", "public function down()\n {\n $this->executeSQL('SET FOREIGN_KEY_CHECKS=0');\n\n $this->executeSQL('DROP TABLE link');\n $this->executeSQL('DROP TABLE link_category');\n\n $this->executeSQL('SET FOREIGN_KEY_CHECKS=1');\n }", "public function down ()\n {\n }", "abstract public function down();", "abstract public function down();", "abstract public function down();", "public function down()\n {\n // This migration was removed, but fails when uninstalling plugin\n }", "public function down()\r\n {\r\n $this->dbforge->drop_table('users');\r\n }", "public function down() {\n\n\t}", "public function down()\n {\n $this->dbforge->drop_table('lecturer', true);\n }", "public function down()\n\t{\n\t\tSchema::drop('flows_steps');\n\t}", "public function down(Schema $schema) : void\n {\n $this->addSql('CREATE TABLE galaxiee (id INT AUTO_INCREMENT NOT NULL, idu_id INT NOT NULL, nom VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, INDEX IDX_8576D2AF376A6230 (idu_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \\'\\' ');\n $this->addSql('CREATE TABLE trou_noir (id INT AUTO_INCREMENT NOT NULL, id_g_id INT DEFAULT NULL, nom VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, INDEX IDX_AB27242D95951086 (id_g_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \\'\\' ');\n $this->addSql('ALTER TABLE galaxiee ADD CONSTRAINT FK_8576D2AF376A6230 FOREIGN KEY (idu_id) REFERENCES univers (id)');\n $this->addSql('ALTER TABLE trou_noir ADD CONSTRAINT FK_AB27242D95951086 FOREIGN KEY (id_g_id) REFERENCES galaxie (id)');\n $this->addSql('DROP TABLE trounoir');\n $this->addSql('ALTER TABLE galaxie DROP FOREIGN KEY FK_1C880711376A6230');\n $this->addSql('DROP INDEX IDX_1C880711376A6230 ON galaxie');\n $this->addSql('ALTER TABLE galaxie CHANGE idu_id id_u_id INT NOT NULL');\n $this->addSql('ALTER TABLE galaxie ADD CONSTRAINT FK_1C8807116F858F92 FOREIGN KEY (id_u_id) REFERENCES univers (id)');\n $this->addSql('CREATE INDEX IDX_1C8807116F858F92 ON galaxie (id_u_id)');\n $this->addSql('ALTER TABLE planete DROP FOREIGN KEY FK_490E3E5712013DEC');\n $this->addSql('DROP INDEX IDX_490E3E5712013DEC ON planete');\n $this->addSql('ALTER TABLE planete ADD id_s_id INT NOT NULL, ADD nb_sattelite INT NOT NULL, DROP ids_id, DROP nb_satelite');\n $this->addSql('ALTER TABLE planete ADD CONSTRAINT FK_490E3E574AEED04E FOREIGN KEY (id_s_id) REFERENCES systeme (id)');\n $this->addSql('CREATE INDEX IDX_490E3E574AEED04E ON planete (id_s_id)');\n $this->addSql('ALTER TABLE systeme DROP FOREIGN KEY FK_95796DE3CD7AFD24');\n $this->addSql('DROP INDEX IDX_95796DE3CD7AFD24 ON systeme');\n $this->addSql('ALTER TABLE systeme CHANGE idg_id id_g_id INT NOT NULL');\n $this->addSql('ALTER TABLE systeme ADD CONSTRAINT FK_95796DE395951086 FOREIGN KEY (id_g_id) REFERENCES galaxie (id)');\n $this->addSql('CREATE INDEX IDX_95796DE395951086 ON systeme (id_g_id)');\n }", "public function down(): void\n {\n // Remove your data\n }", "public function down() {\n $this->dbforge->drop_column('timesheets_items', 'orgID', TRUE);\n $this->dbforge->drop_column('timesheets_items', 'brandID', TRUE);\n $this->dbforge->drop_column('timesheets_items', 'reason_desc', TRUE);\n $this->dbforge->drop_column('timesheets_expenses', 'orgID', TRUE);\n $this->dbforge->drop_column('timesheets_expenses', 'brandID', TRUE);\n $this->dbforge->drop_column('timesheets_expenses', 'reason_desc', TRUE);\n\n // change reason to note\n $fields = array(\n 'reason' => array(\n 'name' => 'note',\n 'type' => \"VARCHAR\",\n 'constraint' => 200,\n 'null' => TRUE\n )\n );\n $this->dbforge->modify_column('timesheets_items', $fields);\n $this->dbforge->modify_column('timesheets_expenses', $fields);\n }", "public function down()\n\t{\n\t\t//Schema::drop('purchase_orders');\n\t\t//Schema::drop('purchase_order_details');\n\t}", "public function down()\n {\n\tSchema::drop('activities');\n }", "public function down()\n {\n }", "public function down()\n {\n }", "public function down()\n {\n //return false;\n\t\t\n\t\t$TABLE_NAME = 'Haber';\n $this->dropTable($TABLE_NAME);\n\t\t\n\t\t$TABLE_NAME = 'HaberKategori';\n $this->dropTable($TABLE_NAME);\n }", "public function down(){\n $this->dbforge->drop_table('subcategories_news'); //eliminacion de la tabla subcategories_news\n }", "public function down()\n\t{\n\t\tDB::table('professor')->where('professor_id', '=', 1)->delete();\n\t\tDB::table('professor')->where('professor_id', '=', 2)->delete();\n\t\tDB::query('ALTER TABLE professor AUTO_INCREMENT = 1');\n\n\t\t//\n\t}", "public function down(): bool {\n\t\t// Remove & add logic to revert the migration here.\n\t\techo \"M230123030315BaseTables cannot be rolled back.\\n\";\n\t\treturn false;\n\t}", "public function getDownSQL()\r\n {\r\n return array (\n 'propel' => '\r\n# This is a fix for InnoDB in MySQL >= 4.1.x\r\n# It \"suspends judgement\" for fkey relationships until are tables are set.\r\nSET FOREIGN_KEY_CHECKS = 0;\r\n\r\nALTER TABLE `promocion` CHANGE `fecha_inicio` `fecha_inicio` DATE NOT NULL;\r\n\r\nALTER TABLE `promocion` CHANGE `fecha_fin` `fecha_fin` DATE NOT NULL;\r\n\r\nALTER TABLE `promocion` CHANGE `descuento` `descuento` DECIMAL;\r\n\r\nALTER TABLE `promocion`\r\n ADD `descripcion` VARCHAR(70) AFTER `id`,\r\n ADD `estado` VARCHAR(11) AFTER `fecha_fin`,\r\n ADD `promocion_global` TINYINT(1) NOT NULL AFTER `descuento`;\r\n\r\nALTER TABLE `promocion` DROP `activo`;\r\n\r\n# This restores the fkey checks, after having unset them earlier\r\nSET FOREIGN_KEY_CHECKS = 1;\r\n',\n);\r\n }", "public function down()\n\t{\n\t\t//return false;\n\t}", "public function down(): void\n {\n try {\n $this->db->ForeignKeyChecks(false);\n $statement=$this->db->prepare(\"DROP TABLE IF EXISTS prom2_pages\");\n $statement->execute();\n $statement->close();\n $this->db->ForeignKeyChecks(true);\n } catch (\\mysqli_sql_exception $exception) {\n throw $exception;\n }\n }", "public function down()\n\t{\n\t\t//\n\t\tSchema::drop('options');\n\t}", "public function change()\n {\n $this->schema->table('recurring_expenses',function($table){\n $table->date('end_repeat')->nullable();\n $table->boolean('ended')->default(false);\n $table->enum('repeat',['0','1','7','14','30','365'])->nullable();\n });\n\n $this->schema->table('expenses',function($table){\n $table->dropColumn('end_repeat');\n $table->dropColumn('repeat');\n $table->integer('parent_id')->nullable();\n $table->foreign('parent_id')->references('id')->on('expenses')->onDelete('cascade');\n });\n }", "public function down()\n {\n Schema::table('users', function (Blueprint $table) {\n $table->dropForeign('users_id_turma_foreign');\n });\n\n Schema::table('contato', function (Blueprint $table) {\n $table->dropForeign('contato_id_usuario_foreign');\n });\n\n Schema::table('monitores', function (Blueprint $table) {\n $table->dropForeign('monitores_id_turma_foreign');\n $table->dropForeign('monitores_id_usuario_foreign');\n });\n\n Schema::table('galeria_portifolio', function (Blueprint $table) {\n $table->dropForeign('galeria_portifolio_id_portifolio_foreign');\n });\n\n Schema::table('portifolio_alunos', function (Blueprint $table) {\n $table->dropForeign('portifolio_alunos_id_portifolio_foreign');\n $table->dropForeign('portifolio_alunos_id_usuario_foreign');\n });\n\n Schema::table('cobranca', function (Blueprint $table) {\n $table->dropForeign('cobranca_id_aluno_foreign');\n });\n\n Schema::table('lista_de_presenca', function (Blueprint $table) {\n $table->dropForeign('lista_de_presenca_id_usuario_foreign');\n });\n\n Schema::table('forum_da_turma', function (Blueprint $table) {\n $table->dropForeign('forum_da_turma_id_usuario_foreign');\n });\n\n Schema::table('posts_do_site', function (Blueprint $table) {\n $table->dropForeign('posts_do_site_id_usuario_foreign');\n });\n\n Schema::table('posts_do_forum', function (Blueprint $table) {\n $table->dropForeign('posts_do_forum_id_topico_foreign');\n $table->dropForeign('posts_do_forum_id_usuario_foreign');\n });\n }", "public function down()\n\t{\n\t\t$this->dropForeignKey('FK_task_creator','tbl_task');\n\n\t\t$this->dropTable('tbl_task');\n\t}", "public function down()\n {\n $this->table('articles')->drop()->save();\n $this->table('categories')->drop()->save();\n $this->table('football_ragistrations')->drop()->save();\n $this->table('friends')->drop()->save();\n $this->table('menus')->drop()->save();\n $this->table('picnic_ragistrations')->drop()->save();\n $this->table('products')->drop()->save();\n $this->table('profiles')->drop()->save();\n $this->table('skills')->drop()->save();\n $this->table('spouses')->drop()->save();\n $this->table('students')->drop()->save();\n $this->table('submenus')->drop()->save();\n $this->table('users')->drop()->save();\n }", "public function down(){\n\t\tSchema::dropIfExists('cargo');\n\t}", "public function down()\n {\n $this->table('users')\n ->dropForeignKey(\n 'role_id'\n )->save();\n\n $this->table('users')\n ->removeIndexByName('FK_users_roles')\n ->update();\n\n $this->table('users')\n ->addColumn('can_edit', 'boolean', [\n 'after' => 'enabled',\n 'default' => '0',\n 'length' => null,\n 'null' => false,\n ])\n ->removeColumn('role_id')\n ->update();\n\n $this->table('stundenplan')\n ->changeColumn('note', 'string', [\n 'default' => null,\n 'length' => 255,\n 'null' => true,\n ])\n ->removeColumn('loggedInNote')\n ->update();\n\n $this->table('roles')->drop()->save();\n }", "public function down()\n\t{\n\t\t//\n\t\tDB::query('TRUNCATE TABLE app_user_apps_publishes CASCADE');\n\t\tDB::query('TRUNCATE TABLE app_apps_fbapps CASCADE');\n\t\tDB::query('TRUNCATE TABLE app_apps_applications CASCADE');\n\t}", "protected abstract function do_down();", "public function down()\n\t{\n\t\t// Drop Table\n\t\tSchema::drop('activities_types');\n\t}", "public function down(Schema $schema) : void\n {\n $this->addSql('CREATE TABLE encherir_acheteur (encherir_id INT NOT NULL, acheteur_id INT NOT NULL, INDEX IDX_41ABAAFBB0BA17BB (encherir_id), INDEX IDX_41ABAAFB96A7BB5F (acheteur_id), PRIMARY KEY(encherir_id, acheteur_id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \\'\\' ');\n $this->addSql('CREATE TABLE encherir_lot (encherir_id INT NOT NULL, lot_id INT NOT NULL, INDEX IDX_3C56919BB0BA17BB (encherir_id), INDEX IDX_3C56919BA8CBA5F7 (lot_id), PRIMARY KEY(encherir_id, lot_id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \\'\\' ');\n $this->addSql('ALTER TABLE encherir_acheteur ADD CONSTRAINT FK_41ABAAFB96A7BB5F FOREIGN KEY (acheteur_id) REFERENCES acheteur (id) ON DELETE CASCADE');\n $this->addSql('ALTER TABLE encherir_acheteur ADD CONSTRAINT FK_41ABAAFBB0BA17BB FOREIGN KEY (encherir_id) REFERENCES encherir (id) ON DELETE CASCADE');\n $this->addSql('ALTER TABLE encherir_lot ADD CONSTRAINT FK_3C56919BA8CBA5F7 FOREIGN KEY (lot_id) REFERENCES lot (id) ON DELETE CASCADE');\n $this->addSql('ALTER TABLE encherir_lot ADD CONSTRAINT FK_3C56919BB0BA17BB FOREIGN KEY (encherir_id) REFERENCES encherir (id) ON DELETE CASCADE');\n $this->addSql('ALTER TABLE encherir DROP FOREIGN KEY FK_503B7C878EB576A8');\n $this->addSql('ALTER TABLE encherir DROP FOREIGN KEY FK_503B7C878EFC101A');\n $this->addSql('DROP INDEX IDX_503B7C878EB576A8 ON encherir');\n $this->addSql('DROP INDEX IDX_503B7C878EFC101A ON encherir');\n $this->addSql('ALTER TABLE encherir DROP id_acheteur_id, DROP id_lot_id');\n }", "public function down()\n {\n $this->table('accounting_entries')\n ->dropForeignKey(\n 'accounting_entry_type_id'\n )\n ->dropForeignKey(\n 'association_id'\n )->save();\n\n $this->table('associations_events')\n ->dropForeignKey(\n 'event_id'\n )\n ->dropForeignKey(\n 'association_id'\n )->save();\n\n $this->table('events')\n ->dropForeignKey(\n 'event_type_id'\n )->save();\n\n $this->table('members')\n ->dropForeignKey(\n 'association_id'\n )->save();\n\n $this->table('statistics')\n ->dropForeignKey(\n 'statistics_type_id'\n )\n ->dropForeignKey(\n 'association_id'\n )->save();\n\n $this->table('statistics_event')\n ->dropForeignKey(\n 'statistics_id'\n )\n ->dropForeignKey(\n 'event_id'\n )->save();\n\n $this->table('users')\n ->dropForeignKey(\n 'role_id'\n )\n ->dropForeignKey(\n 'association_id'\n )->save();\n\n $this->table('accounting_entries')->drop()->save();\n $this->table('accounting_entry_type')->drop()->save();\n $this->table('associations')->drop()->save();\n $this->table('associations_events')->drop()->save();\n $this->table('event_type')->drop()->save();\n $this->table('events')->drop()->save();\n $this->table('members')->drop()->save();\n $this->table('roles')->drop()->save();\n $this->table('statistics')->drop()->save();\n $this->table('statistics_event')->drop()->save();\n $this->table('statistics_type')->drop()->save();\n $this->table('users')->drop()->save();\n }", "public function down()\n\t{\n\t\tif(Yii::app()->db->getSchema()->getTable(\"{{user_block}}\")){\n\t\t\t$this->dropTable(\"{{user_block}}\");\n\t\t}\n\n\t}", "public function getDownSQL()\n {\n return array (\n 'default' => '\n# This is a fix for InnoDB in MySQL >= 4.1.x\n# It \"suspends judgement\" for fkey relationships until are tables are set.\nSET FOREIGN_KEY_CHECKS = 0;\n\nDROP TABLE IF EXISTS `user_login`;\n\nALTER TABLE `user` DROP `user_mname`;\n\nALTER TABLE `user` DROP `user_user`;\n\nALTER TABLE `user` DROP `user_password`;\n\nALTER TABLE `user` DROP `user_date_lastlogin`;\n\n# This restores the fkey checks, after having unset them earlier\nSET FOREIGN_KEY_CHECKS = 1;\n',\n);\n }", "public function down()\n\t{\n\t\tSchema::table('officers', function($t){\n\t\t\t$t->drop_column('role');\n\t\t});\n\t}", "public function safeDown()\n {\n $this->down();\n }", "public function safeDown()\n {\n $this->down();\n }", "public function down()\n\t{\n\t\tSchema::drop('refs');\n\t}", "public function down () {\n\t\treturn $this->rename_column ('headline', 'title', 'string', array ('limit' => 72));\n\t}", "public function down()\n\t{\n\t\tSchema::drop('appeals');\n\t}", "public function safeDown()\r\n {\r\n $this->down();\r\n }", "public function down(Schema $schema) : void\n {\n $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \\'mysql\\'.');\n\n<<<<<<< HEAD\n $this->addSql('ALTER TABLE affaire_liste_affaire DROP FOREIGN KEY FK_80DBABFCF082E755');\n $this->addSql('ALTER TABLE affaire DROP FOREIGN KEY FK_9C3F18EFED813170');\n=======\n<<<<<<< HEAD:src/Migrations/Version20200418121015.php\n $this->addSql('ALTER TABLE affaire_liste_affaire DROP FOREIGN KEY FK_80DBABFCF082E755');\n $this->addSql('ALTER TABLE affaire DROP FOREIGN KEY FK_9C3F18EFED813170');\n=======\n $this->addSql('ALTER TABLE liste_affaire_affaire DROP FOREIGN KEY FK_CA81ADF3F082E755');\n $this->addSql('ALTER TABLE enfant DROP FOREIGN KEY FK_34B70CA2463CD7C3');\n $this->addSql('ALTER TABLE enfant DROP FOREIGN KEY FK_34B70CA25D493FF4');\n $this->addSql('ALTER TABLE correspondant_administratif DROP FOREIGN KEY FK_E1E7152EBF396750');\n $this->addSql('ALTER TABLE enfant DROP FOREIGN KEY FK_34B70CA246135043');\n>>>>>>> e1e13eb645b79ada7517f9d2be860dc1655c42db:src/Migrations/Version20200318150734.php\n>>>>>>> 0c1c04bb7c2bbee076bc5fdb1e2456d1af817866\n $this->addSql('ALTER TABLE enfant_sejour DROP FOREIGN KEY FK_159E7E65450D2529');\n $this->addSql('ALTER TABLE enfant_sejour DROP FOREIGN KEY FK_159E7E6584CF0CF');\n $this->addSql('ALTER TABLE enfant DROP FOREIGN KEY FK_34B70CA2463CD7C3');\n $this->addSql('ALTER TABLE enfant DROP FOREIGN KEY FK_34B70CA25D493FF4');\n $this->addSql('ALTER TABLE enfant DROP FOREIGN KEY FK_34B70CA2FF631228');\n $this->addSql('ALTER TABLE affaire_liste_affaire DROP FOREIGN KEY FK_80DBABFCE2687AC3');\n $this->addSql('ALTER TABLE sejour DROP FOREIGN KEY FK_96F52028E2687AC3');\n $this->addSql('ALTER TABLE enfant DROP FOREIGN KEY FK_34B70CA246135043');\n $this->addSql('ALTER TABLE correspondant_administratif DROP FOREIGN KEY FK_E1E7152E46135043');\n $this->addSql('DROP TABLE affaire');\n<<<<<<< HEAD\n $this->addSql('DROP TABLE affaire_liste_affaire');\n $this->addSql('DROP TABLE type_affaire');\n=======\n<<<<<<< HEAD:src/Migrations/Version20200418121015.php\n $this->addSql('DROP TABLE affaire_liste_affaire');\n $this->addSql('DROP TABLE type_affaire');\n=======\n $this->addSql('DROP TABLE centre');\n $this->addSql('DROP TABLE correspondant_administratif');\n $this->addSql('DROP TABLE responsable_legal');\n>>>>>>> e1e13eb645b79ada7517f9d2be860dc1655c42db:src/Migrations/Version20200318150734.php\n>>>>>>> 0c1c04bb7c2bbee076bc5fdb1e2456d1af817866\n $this->addSql('DROP TABLE enfant');\n $this->addSql('DROP TABLE enfant_sejour');\n $this->addSql('DROP TABLE sejour');\n $this->addSql('DROP TABLE centre');\n $this->addSql('DROP TABLE correspondant_administratif');\n $this->addSql('DROP TABLE etablissement');\n $this->addSql('DROP TABLE liste_affaire');\n $this->addSql('DROP TABLE responsable_legal');\n $this->addSql('DROP TABLE user');\n }", "public function getDownSQL()\n {\n return array (\n 'default' => '\n# This is a fix for InnoDB in MySQL >= 4.1.x\n# It \"suspends judgement\" for fkey relationships until are tables are set.\nSET FOREIGN_KEY_CHECKS = 0;\n\nDROP TABLE IF EXISTS `user`;\n\nDROP TABLE IF EXISTS `question`;\n\nDROP TABLE IF EXISTS `answer`;\n\nDROP TABLE IF EXISTS `image`;\n\nDROP TABLE IF EXISTS `vote`;\n\n# This restores the fkey checks, after having unset them earlier\nSET FOREIGN_KEY_CHECKS = 1;\n',\n);\n }", "public function safeDown()\n\t{\n\t\t$this->dropTable($this->tableName);\n\t}", "public function safeDown()\n\t{\n\t\t$this->dropTable($this->tableName);\n\t}", "public function safeDown()\n\t{\n\t\t$this->dropTable($this->tableName);\n\t}", "public function down()\n {\n $this->table('mail_contents')->drop()->save();\n }", "public function down()\n {\n Schema::dropIfExists('reunion');\n }", "public function down() {\n\t}", "public function down() {\n\t}", "public function down() {\n\t}", "public function down(): void\n {\n $this->table('services')\n ->dropForeignKey(\n ['currency_id','billing_period_id']\n )->save();\n $this->execute('DELETE FROM currencies');\n $this->execute('DELETE FROM billing_periods');\n $this->table('services')->drop()->save();\n $this->table('currencies')->drop()->save();\n $this->table('billing_periods')->drop()->save();\n }", "public function down()\n\t{\n\t\tSchema::drop('article_category');\n\t}", "public function down()\n {\n Schema::table('users', function (Blueprint $table) {\n $table->renameColumn('first_name', 'name');\n $table->dropIndex('users_first_name_index');\n $table->dropIndex('users_created_at_index');\n $table->dropIndex('users_updated_at_index');\n $table->dropColumn(\"last_name\");\n $table->dropColumn(\"username\");\n $table->dropColumn(\"provider\");\n $table->dropColumn(\"provider_id\");\n $table->dropColumn(\"api_token\");\n $table->dropColumn(\"code\");\n $table->dropColumn(\"remember_token\");\n $table->dropColumn(\"role_id\");\n $table->dropColumn(\"last_login\");\n $table->dropColumn(\"status\");\n $table->dropColumn(\"root\");\n $table->dropColumn('backend');\n $table->dropColumn(\"photo_id\");\n $table->dropColumn(\"lang\");\n $table->dropColumn(\"color\");\n $table->dropColumn(\"about\");\n $table->dropColumn(\"facebook\");\n $table->dropColumn(\"twitter\");\n $table->dropColumn(\"linked_in\");\n $table->dropColumn(\"google_plus\");\n });\n }", "public function down()\n\t{\n\t\tSchema::drop('entries');\n\t}", "public function down()\n\t{\n\t\tSchema::table('precios_aterrizajes_despegues', function(Blueprint $table)\n\t\t{\n\t\t\t//\n\t\t});\n\t}", "public function down()\n{\nSchema::drop('statustype');\nSchema::drop('area');\nSchema::drop('region');\nSchema::drop('territory');\nSchema::drop('trackedevent');\nSchema::drop('zip_territory');\nSchema::drop('messagetype');\nSchema::drop('optintype');\nSchema::drop('representative');\nSchema::drop('pediatrician');\nSchema::drop('application_messagestatus');\nSchema::drop('application_optin');\nSchema::drop('application_trackedevent');\nSchema::drop('application');\n}", "public function down()\n\t{\n\t\tSchema::drop(Config::get('sentry::sentry.table.users_metadata'));\n\t}", "public function down(Schema $schema) : void\n {\n $this->addSql('ALTER TABLE classe_personne DROP FOREIGN KEY FK_350001418F5EA509');\n $this->addSql('ALTER TABLE matiere_classe DROP FOREIGN KEY FK_AF649A8B8F5EA509');\n $this->addSql('ALTER TABLE note DROP FOREIGN KEY FK_CFBDFA148F5EA509');\n $this->addSql('ALTER TABLE seance DROP FOREIGN KEY FK_DF7DFD0E8F5EA509');\n $this->addSql('ALTER TABLE cours DROP FOREIGN KEY FK_FDCA8C9CF46CD258');\n $this->addSql('ALTER TABLE matiere_classe DROP FOREIGN KEY FK_AF649A8BF46CD258');\n $this->addSql('ALTER TABLE note DROP FOREIGN KEY FK_CFBDFA14F46CD258');\n $this->addSql('ALTER TABLE personne_matiere DROP FOREIGN KEY FK_4E9BB3B7F46CD258');\n $this->addSql('ALTER TABLE absence DROP FOREIGN KEY FK_765AE0C9A21BD112');\n $this->addSql('ALTER TABLE classe_personne DROP FOREIGN KEY FK_35000141A21BD112');\n $this->addSql('ALTER TABLE contacte DROP FOREIGN KEY FK_C794A022A21BD112');\n $this->addSql('ALTER TABLE demande DROP FOREIGN KEY FK_2694D7A5A21BD112');\n $this->addSql('ALTER TABLE note DROP FOREIGN KEY FK_CFBDFA14A6CC7B2');\n $this->addSql('ALTER TABLE personne_matiere DROP FOREIGN KEY FK_4E9BB3B7A21BD112');\n $this->addSql('ALTER TABLE seance DROP FOREIGN KEY FK_DF7DFD0EE455FCC0');\n $this->addSql('ALTER TABLE seance DROP FOREIGN KEY FK_DF7DFD0EBDDFA3C9');\n $this->addSql('ALTER TABLE seance DROP FOREIGN KEY FK_DF7DFD0EDC304035');\n $this->addSql('ALTER TABLE absence DROP FOREIGN KEY FK_765AE0C9E3797A94');\n $this->addSql('ALTER TABLE personne DROP FOREIGN KEY FK_FCEC9EFA76ED395');\n $this->addSql('ALTER TABLE reset_password_request DROP FOREIGN KEY FK_7CE748AA76ED395');\n $this->addSql('DROP TABLE absence');\n $this->addSql('DROP TABLE classe');\n $this->addSql('DROP TABLE classe_personne');\n $this->addSql('DROP TABLE contacte');\n $this->addSql('DROP TABLE cours');\n $this->addSql('DROP TABLE demande');\n $this->addSql('DROP TABLE matiere');\n $this->addSql('DROP TABLE matiere_classe');\n $this->addSql('DROP TABLE news');\n $this->addSql('DROP TABLE note');\n $this->addSql('DROP TABLE personne');\n $this->addSql('DROP TABLE personne_matiere');\n $this->addSql('DROP TABLE reset_password_request');\n $this->addSql('DROP TABLE salle');\n $this->addSql('DROP TABLE seance');\n $this->addSql('DROP TABLE user');\n }", "protected function tearDown(): void {\n $migration = include __DIR__.'/../database/migrations/create_all_visitors_tables.php.stub';\n $migration->down();\n\n $migrationTest = include __DIR__.'/Support/migrations/2023_01_12_000000_create_test_models_table.php';\n $migrationTest->down();\n }", "public function down()\n\t{\n\t\tSchema::drop('stor_mem');\n\t}", "public function down(Schema $schema) : void\n {\n $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \\'mysql\\'.');\n\n $this->addSql('ALTER TABLE booking DROP FOREIGN KEY FK_E00CEDDEA76ED395');\n $this->addSql('ALTER TABLE booking DROP FOREIGN KEY FK_E00CEDDE19FCD424');\n $this->addSql('DROP TABLE booking');\n $this->addSql('DROP TABLE product_image');\n $this->addSql('DROP TABLE family_page_container');\n $this->addSql('DROP TABLE user');\n $this->addSql('DROP TABLE time_line');\n $this->addSql('ALTER TABLE family DROP FOREIGN KEY FK_A5E6215B727ACA70');\n $this->addSql('DROP INDEX IDX_A5E6215B727ACA70 ON family');\n $this->addSql('ALTER TABLE family ADD page_content_id INT NOT NULL, DROP parent_id, DROP has_uniques_prices, DROP has_seasonal_products');\n $this->addSql('ALTER TABLE family ADD CONSTRAINT FK_A5E6215B8F409273 FOREIGN KEY (page_content_id) REFERENCES page_content (id)');\n $this->addSql('CREATE INDEX IDX_A5E6215B8F409273 ON family (page_content_id)');\n $this->addSql('ALTER TABLE link ADD page_container_id INT DEFAULT NULL, DROP url');\n $this->addSql('ALTER TABLE link ADD CONSTRAINT FK_36AC99F123D5B0C FOREIGN KEY (page_container_id) REFERENCES page_container (id)');\n $this->addSql('CREATE INDEX IDX_36AC99F123D5B0C ON link (page_container_id)');\n $this->addSql('ALTER TABLE product DROP content, DROP order_by, DROP is_generic, DROP type, CHANGE title label VARCHAR(50) NOT NULL COLLATE utf8mb4_unicode_ci');\n $this->addSql('ALTER TABLE unit DROP duration');\n }", "public function down(Schema $schema) : void\n {\n $this->addSql('ALTER TABLE `order` DROP FOREIGN KEY FK_F5299398F5B7AF75');\n $this->addSql('ALTER TABLE suppliers DROP FOREIGN KEY FK_AC28B95C8486F9AC');\n $this->addSql('ALTER TABLE user DROP FOREIGN KEY FK_8D93D6498486F9AC');\n $this->addSql('ALTER TABLE stock DROP FOREIGN KEY FK_4B365660D629F605');\n $this->addSql('ALTER TABLE stock DROP FOREIGN KEY FK_4B365660E308AC6F');\n $this->addSql('ALTER TABLE order_detail DROP FOREIGN KEY FK_ED896F46CFFE9AD6');\n $this->addSql('ALTER TABLE product DROP FOREIGN KEY FK_D34A04ADEE45BDBF');\n $this->addSql('ALTER TABLE suppliers DROP FOREIGN KEY FK_AC28B95CEE45BDBF');\n $this->addSql('ALTER TABLE user DROP FOREIGN KEY FK_8D93D649EE45BDBF');\n $this->addSql('ALTER TABLE order_detail DROP FOREIGN KEY FK_ED896F464584665A');\n $this->addSql('ALTER TABLE product_theme DROP FOREIGN KEY FK_36299C544584665A');\n $this->addSql('ALTER TABLE user DROP FOREIGN KEY FK_8D93D649D60322AC');\n $this->addSql('ALTER TABLE order_detail DROP FOREIGN KEY FK_ED896F46DCD6110');\n $this->addSql('ALTER TABLE order_detail DROP FOREIGN KEY FK_ED896F462ADD6D8C');\n $this->addSql('ALTER TABLE product_theme DROP FOREIGN KEY FK_36299C5459027487');\n $this->addSql('ALTER TABLE `order` DROP FOREIGN KEY FK_F5299398A76ED395');\n $this->addSql('DROP TABLE address');\n $this->addSql('DROP TABLE format');\n $this->addSql('DROP TABLE material');\n $this->addSql('DROP TABLE `order`');\n $this->addSql('DROP TABLE order_detail');\n $this->addSql('DROP TABLE picture');\n $this->addSql('DROP TABLE product');\n $this->addSql('DROP TABLE product_theme');\n $this->addSql('DROP TABLE role');\n $this->addSql('DROP TABLE stock');\n $this->addSql('DROP TABLE suppliers');\n $this->addSql('DROP TABLE theme');\n $this->addSql('DROP TABLE user');\n }", "public function down()\n {\n Schema::dropIfExists('data');\n }", "public function down()\n\t{\n\t\tSchema::create('jobs',function($table){$table->increments('id');});\n\t\tSchema::create('job_location',function($table){$table->increments('id');});\n\t\tSchema::create('job_skill',function($table){$table->increments('id');});\n\t\tSchema::create('locations',function($table){$table->increments('id');});\n\t\tSchema::create('location_program',function($table){$table->increments('id');});\n\t\tSchema::create('location_scholarship',function($table){$table->increments('id');});\n\t\tSchema::create('positions',function($table){$table->increments('id');});\n\t\tSchema::create('programs',function($table){$table->increments('id');});\n\t\tSchema::create('program_subject',function($table){$table->increments('id');});\n\t\tSchema::create('scholarships',function($table){$table->increments('id');});\n\t\tSchema::create('scholarship_subject',function($table){$table->increments('id');});\n\t\tSchema::create('skills',function($table){$table->increments('id');});\n\t\tSchema::create('subjects',function($table){$table->increments('id');});\n\t}" ]
[ "0.7949478", "0.78628796", "0.76056504", "0.7492771", "0.73195237", "0.72439474", "0.7186118", "0.71521056", "0.71513444", "0.7140365", "0.71351665", "0.7120544", "0.7113998", "0.7105184", "0.7096303", "0.7077934", "0.7076472", "0.70710033", "0.7067188", "0.7064501", "0.7051174", "0.7051174", "0.7040735", "0.70399123", "0.70399123", "0.70399123", "0.70384866", "0.70267564", "0.7023666", "0.70201284", "0.6987431", "0.6985074", "0.6976184", "0.69702286", "0.6942391", "0.6942391", "0.6942391", "0.69405776", "0.6939288", "0.6937082", "0.6933208", "0.69319636", "0.6927764", "0.69235873", "0.69230556", "0.6911956", "0.69013476", "0.689616", "0.689616", "0.6895955", "0.6895788", "0.6887289", "0.6881135", "0.68734896", "0.6867661", "0.6861723", "0.6857033", "0.68551147", "0.68429655", "0.6840621", "0.6835376", "0.68351805", "0.6833161", "0.68285227", "0.68276656", "0.68266463", "0.68257356", "0.6822846", "0.6816502", "0.6810219", "0.68062127", "0.68034464", "0.68034464", "0.678773", "0.6774371", "0.6772766", "0.67627347", "0.6759374", "0.6759043", "0.67544013", "0.67544013", "0.67544013", "0.67521656", "0.67517143", "0.6751249", "0.6751249", "0.6751249", "0.67441845", "0.6742708", "0.67376876", "0.6732373", "0.67312294", "0.6730029", "0.67286414", "0.67267084", "0.6726437", "0.6725611", "0.67255354", "0.6716464", "0.6712906", "0.6711597" ]
0.0
-1
Gets the namesapce of this class
public function getNamespace() { return self::WSDL_NAMESPACE; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_namespace() : string\n {\n return $this->namespace;\n }", "public function getNamespace()\n {\n return $this->_namespace;\n }", "public function getNamespacedName()\n {\n return get_class();\n }", "public function getNamespace(): string\n {\n return $this->namespace;\n }", "public function getNamespace(): string\n {\n return $this->namespace;\n }", "public function getNamespace()\n {\n return isset($this->namespace) ? $this->namespace : '';\n }", "public function getNamespace()\n {\n return $this->getNamespaceName();\n }", "public function getNamespace()\r\n {\r\n return $this->namespace;\r\n }", "public function getNamespace()\r\n {\r\n return $this->namespace;\r\n }", "public function getNamespace() {\n return $this->namespace;\n }", "public function getNamespace()\n {\n return $this->namespace;\n }", "public function getNamespace()\n {\n return $this->namespace;\n }", "public function getNamespace()\n {\n return $this->namespace;\n }", "public function getNamespace()\n {\n return $this->namespace;\n }", "public function getNamespace()\n {\n return $this->namespace;\n }", "public function getNamespace()\n {\n return $this->namespace;\n }", "public function getNamespace()\n {\n return $this->namespace;\n }", "public function getNamespace()\n {\n return $this->namespace;\n }", "public function getNamespace()\n {\n return $this->namespace;\n }", "public function getNamespace()\n {\n return $this->namespace;\n }", "private function _getNamespace() {\n $ns = explode('_', get_class($this));\n return $ns[0];\n }", "public function getNamespaceName();", "public function getNamespace(): string;", "public function getNamespace()\n\t{\n\t\treturn $this->_namespace;\n\t}", "final protected static function getNamespace() {\r\n $classNameParts = explode('\\\\', get_called_class());\r\n array_pop($classNameParts);\r\n return join('\\\\', $classNameParts);\r\n }", "public function getNamespace()\r\n {\r\n return $this->Namespace;\r\n }", "public function getNamespace(){\n \n return $this->namespace;\n \n }", "protected function getNamespace()\n {\n $namespace = Container::getInstance()->getNamespace();\n return rtrim($namespace, '\\\\');\n }", "public function getNamespace()\n\t{\n\t\treturn $this->nameSpace;\n\t}", "public function getNamespace();", "public function getNamespace();", "public function getNamespace();", "function getNameSpace() { return $this->_namespace; }", "protected function getNamespace()\n {\n $reflectionClass = new \\ReflectionClass(get_class($this));\n return dirname($reflectionClass->getNamespaceName());\n }", "public function getNamespaceName() {\n\n\t\treturn $this->_namespace;\n\t}", "public function getNamespace()\n {\n if (null === $this->reflected) {\n $this->reflected = new \\ReflectionObject($this);\n }\n\n return $this->reflected->getNamespaceName();\n }", "protected function getNamespace()\n {\n return $this->wrapped->getNamespace();\n }", "public function getNamespace()\n {\n $this->_init();\n return unserialize($this->_list_cache->getNamespace());\n }", "public function getNamespace()\n {\n // TODO: Implement getNamespace() method.\n }", "public function getNamespace() {\n\t\treturn $this->rootNS;\n\t}", "public function getNamespaceURI() {\n\t\treturn $this->nsURI;\n\t}", "public function getNamespace(): string\n {\n return (string)$this->currentNode->namespaceURI;\n }", "function getNamespace ();", "public function getBaseNamespace()\n {\n return $this->baseNamespace;\n }", "function getNamespace();", "function getNamespace();", "public function getNamespace() {\n\t\treturn $this->config->get('namespace');\n\t}", "public function getNamespaceName()\n\t{\n\t\t$pos = strrpos($this->name, '\\\\');\n\t\treturn false === $pos ? '' : substr($this->name, 0, $pos);\n\t}", "public function getNamespace(): string\n {\n return (string) SocketIORouter::getNamespace(static::class);\n }", "public function getName() {\n\n\t\treturn $this->class->getNamespaceName();\n\t}", "public function getNamespace()\n {\n return null;\n }", "public function getNamespace()\n {\n return is_null($this->config) ? null : get_class($this->config);\n }", "public function getNamespace()\n {\n return $this->getAttribute('metadata.namespace', 'default');\n }", "public function getElementNamespace(): string\n {\n return $this->class_fqsen->getNamespace() ?: '\\\\';\n }", "public function getNamespaceName() {\n return $this->forwardCallToReflectionSource( __FUNCTION__ );\n }", "public function getRootNamespace()\n {\n return $this->rootNameSpace;\n }", "public function getNamespace()\n {\n return 'http://example.org/schema/dic/'.$this->getAlias();\n }", "abstract protected function namespace(): string;", "public function getClassNamespace() {\n\t\tif ($this->classNamespace === NULL) {\n\t\t\t$this->classNamespace = $this->findClassNamespace();\n\t\t}\n\t\treturn $this->classNamespace;\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 }", "public function getCNamespace()\n {\n return str_replace('\\\\', '_', $this->namespace);\n }", "public static function namespaces()\n\t{\n\t\treturn self::$namespaces;\n\t}", "public function getNamespace()\n {\n $className = $this->testMetaData->getTestClassName();\n $fqdn = $this->testMetaData->getTestFullyQualifiedClassName();\n\n $namespace = str_replace('\\\\'.$className, '', $fqdn);\n\n return $namespace;\n }", "public function getNamespace()\n {\n return self::WSDL_NAMESPACE;\n }", "public function getNamespace()\n {\n return self::WSDL_NAMESPACE;\n }", "public function getNamespace()\n {\n return self::WSDL_NAMESPACE;\n }", "public function getNamespace()\n {\n return self::WSDL_NAMESPACE;\n }", "public function getNamespace()\n {\n return self::WSDL_NAMESPACE;\n }", "public function getNamespace()\n {\n return self::WSDL_NAMESPACE;\n }", "public function getNamespace()\n {\n return self::WSDL_NAMESPACE;\n }", "public function getNamespace()\n {\n return self::WSDL_NAMESPACE;\n }", "public function getNamespace()\n {\n return self::WSDL_NAMESPACE;\n }", "public function getNamespace()\n {\n return self::WSDL_NAMESPACE;\n }", "public function getNamespace()\n {\n return self::WSDL_NAMESPACE;\n }", "public function getNamespace()\n {\n return self::WSDL_NAMESPACE;\n }", "public function getNamespace()\n {\n return self::WSDL_NAMESPACE;\n }", "public function getNamespace()\n {\n return self::WSDL_NAMESPACE;\n }", "public function getNamespace()\n {\n return self::WSDL_NAMESPACE;\n }", "public function getNamespace()\n {\n return self::WSDL_NAMESPACE;\n }", "public function getNamespace()\n {\n return self::WSDL_NAMESPACE;\n }", "public function getNamespace()\n {\n return self::WSDL_NAMESPACE;\n }", "public function getNamespace()\n {\n return self::WSDL_NAMESPACE;\n }", "public function getNamespace()\n {\n return self::WSDL_NAMESPACE;\n }", "public function get_namespaces()\n {\n }", "public function getNamespace(): string\n {\n if (!$this->isClass()) {\n throw new \\Exception('Non-class types do not have a namespace');\n }\n return $this->namespaceParts->join('\\\\');\n }", "public function getNamespace() {\n return self::WSDL_NAMESPACE;\n }", "public function getNamespace() {\n return self::WSDL_NAMESPACE;\n }", "public function getNamespace() {\n return self::WSDL_NAMESPACE;\n }", "public function getNamespace() {\n return self::WSDL_NAMESPACE;\n }", "public function getNamespace() {\n return self::WSDL_NAMESPACE;\n }", "public function getNamespace() {\n return self::WSDL_NAMESPACE;\n }", "public function getNamespace() {\n return self::WSDL_NAMESPACE;\n }", "public function getNamespace() {\n return self::WSDL_NAMESPACE;\n }", "public function getNamespace() {\n return self::WSDL_NAMESPACE;\n }", "public function getNamespace() {\n return self::WSDL_NAMESPACE;\n }", "public function getNamespace() {\n return self::WSDL_NAMESPACE;\n }", "public function getNamespace() {\n return self::WSDL_NAMESPACE;\n }", "public function getNamespace() {\n return self::WSDL_NAMESPACE;\n }", "public function getNamespace() {\n return self::WSDL_NAMESPACE;\n }", "public function getNamespace() {\n return self::WSDL_NAMESPACE;\n }", "public function getNamespace() {\n return self::WSDL_NAMESPACE;\n }" ]
[ "0.81921434", "0.8160702", "0.81592107", "0.814244", "0.814244", "0.8110334", "0.80789226", "0.80626845", "0.80529875", "0.80317134", "0.80287707", "0.80287707", "0.80287707", "0.80287707", "0.80287707", "0.80287707", "0.80287707", "0.80287707", "0.80287707", "0.80287707", "0.8024102", "0.8024029", "0.7996962", "0.79884636", "0.7978452", "0.79234725", "0.79195535", "0.7909763", "0.7894035", "0.7883263", "0.7883263", "0.7883263", "0.78783214", "0.7870076", "0.7846719", "0.7833426", "0.7829911", "0.77866095", "0.77805203", "0.7708878", "0.76488656", "0.76349753", "0.75679266", "0.7556565", "0.7553615", "0.7553615", "0.753546", "0.75236183", "0.75194675", "0.75101227", "0.7494363", "0.74110085", "0.73772866", "0.7357865", "0.73019373", "0.7291359", "0.7256858", "0.7249869", "0.7223152", "0.7222135", "0.72028816", "0.7188253", "0.7174026", "0.7154922", "0.7154922", "0.7154922", "0.7154922", "0.7154922", "0.7154922", "0.7154922", "0.7154922", "0.7154922", "0.7154922", "0.7154922", "0.7154922", "0.7154922", "0.7154922", "0.7154922", "0.7154922", "0.7154922", "0.7154922", "0.7154922", "0.7154922", "0.7153188", "0.7132266", "0.711582", "0.711582", "0.711582", "0.711582", "0.711582", "0.711582", "0.711582", "0.711582", "0.711582", "0.711582", "0.711582", "0.711582", "0.711582", "0.711582", "0.711582", "0.711582" ]
0.0
-1
Gets the xsi:type name of this class
public function getXsiTypeName() { return self::XSI_TYPE; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTypeName()\n {\n return $this->type->getName();\n }", "public function getTypeName()\n {\n return $this->type_name;\n }", "public function getTypeNameAttribute();", "public function getTypeName()\n\t{\n\t\tif( isset( $this->values[$this->prefix . 'typename'] ) ) {\n\t\t\treturn (string) $this->values[$this->prefix . 'typename'];\n\t\t}\n\t}", "public function getName(): string {\n\t\t\treturn $this->type;\n\t\t}", "public function type_name(){\r\n \r\n //sends back the name of the class running\r\n return $this->type_name;\r\n \r\n }", "public function getTypeName(): string;", "protected function getTypeName(): string\n {\n if (isset($this->typeName)) {\n return $this->typeName;\n }\n\n return $this->getModelNameBasedOnClassName();\n }", "public function getTypeName()\n {\n return BalanceOperations::typeName($this->type_id);\n }", "abstract public function getTypeName();", "public function getType(): string\n {\n return ucfirst($this->type);\n }", "public function type()\n\t{\n\t\treturn $this->definition->name;\n\t}", "public function get_type_name() { \n\n\t\tswitch ($this->type) { \n\t\t\tcase 'xml-rpc': \n\t\t\tcase 'rpc':\n\t\t\t\treturn _('API/RPC');\n\t\t\tbreak;\n\t\t\tcase 'network':\n\t\t\t\treturn _('Local Network Definition');\n\t\t\tbreak;\n\t\t\tcase 'interface':\n\t\t\t\treturn _('Web Interface');\n\t\t\tbreak;\n\t\t\tcase 'stream':\n\t\t\tdefault: \n\t\t\t\treturn _('Stream Access');\n\t\t\tbreak;\n\t\t} // end switch\n\n\t}", "public function getTypeName()\n {\n return $this->TypeName;\n }", "public function getType() :string\n {\n return $this->types[$this->type];\n }", "public static function getType(): string\n {\n return self::TYPE;\n }", "public function getNamespacedName()\n {\n return get_class();\n }", "public function getName()\n {\n $class = get_class($this);\n\n return str_replace($this->getObjectType(), '',\n str_replace(CADRE_appNameSpace.$this->getObjectTypePlural().'\\\\', '', $class));\n }", "function getType()\n {\n return $this->getAttribute(\"type\");\n }", "public function name() {\n\t\t\treturn $this->_name . ' ('.self::$type_name[$this->_type].')';\n\t\t}", "public function getType()\n {\n return $this->i18n_singular_name();\n }", "public function getNameType()\n {\n return $this->nameType;\n }", "public function getClassName()\n {\n return get_class($this->element);\n }", "public function getType()\n {\n return $this->getClassType();\n }", "public function getName() {\n return get_class($this);\n }", "public function getName() {\n return get_class($this);\n }", "public function type(): string\n {\n return $this->type;\n }", "public function type(): string\n {\n return $this->type;\n }", "public function getType()\n {\n return $this->getAttribute('type');\n }", "public function getTypeName()\n\t{\n\t\t$name = $this->handler_class;\n\t\t$name = str_replace('Application\\\\DeskPRO\\\\CustomFields\\\\Handler\\\\', '', $name);\n\t\t$name = str_replace('\\\\', '_', $name);\n\t\t$name = strtolower($name);\n\n\t\treturn $name;\n\t}", "public function appliesToType(): string\n {\n return $this->requireConstant('TYPE_CLASS');\n }", "abstract public function getTypeName(): string;", "public function getType()\n {\n return $this->get(self::_TYPE);\n }", "public function getType()\n {\n return $this->get(self::_TYPE);\n }", "public function getType()\n {\n return $this->get(self::_TYPE);\n }", "public function getType()\n {\n return $this->get(self::_TYPE);\n }", "public function getType()\n {\n return $this->get(self::_TYPE);\n }", "public function getType()\n {\n return $this->get(self::_TYPE);\n }", "public function getType()\n {\n return $this->get(self::_TYPE);\n }", "public function getType()\n {\n return $this->get(self::_TYPE);\n }", "public function getType()\n {\n return $this->get(self::_TYPE);\n }", "public function getType()\n {\n return $this->get(self::_TYPE);\n }", "public function getType()\n {\n return $this->get(self::_TYPE);\n }", "public function getType()\n {\n return $this->get(self::_TYPE);\n }", "public function getType()\n {\n return $this->get(self::_TYPE);\n }", "public function getType(): string\n {\n return $this->type;\n }", "public function getType(): string\n {\n return $this->type;\n }", "public function getType(): string\n {\n return $this->type;\n }", "public function getType(): string\n {\n return $this->type;\n }", "public function getType(): string\n {\n return $this->type;\n }", "public function getType(): string\n {\n return $this->type;\n }", "public function getType(): string\n {\n return $this->type;\n }", "public function getType(): string\n {\n return $this->type;\n }", "public function getType(): string\n {\n return $this->type;\n }", "public function getType(): string\n {\n return $this->type;\n }", "public function getType(): string\n {\n return $this->type;\n }", "public function getType() {\n return $this->attributes['type'];\n }", "public function getType()\n\t{\n\t\tif( isset( $this->values[$this->prefix . 'type'] ) ) {\n\t\t\treturn (string) $this->values[$this->prefix . 'type'];\n\t\t}\n\t}", "public function getClass()\n {\n return $this->type;\n }", "function getName()\n {\n return get_class($this);\n }", "public function getType(): string {\n return $this->type;\n }", "public function get_type(): string {\n\t\treturn $this->type;\n\t}", "public function getType()\n {\n return (string) $this->getTypesCollection();\n }", "public function getType() : string\n {\n return $this->type;\n }", "public function getType() : string\n {\n return $this->type;\n }", "public function getType() : string\n {\n return $this->type;\n }", "public function getTypeClassProperty()\n {\n return AttributeManifest::getType($this->type);\n }", "public function getName(){\n\t\treturn get_class($this);\n\t}", "public function type()\n\t{\n\t\treturn Ar::type($this->attributes);\n\t}", "public function getTypeStr() {\n return self::getTypes()[$this->type];\n }", "public function getType() : string {\n return $this->type;\n }", "public function getClassName()\n {\n return $this->class;\n }", "public function getClassName()\n {\n return $this->class;\n }", "public static function getPpTypeName() {\n return self::PP_TYPE;\n }", "function getName()\r\n\t{\r\n\t\treturn get_class($this);\r\n\t}", "public function getType(): string\n {\n $type = 'Class';\n if ($this->isTrait()) {\n $type = 'Trait';\n } elseif ($this->isInterface()) {\n $type = 'Interface';\n } elseif ($this->isAbstract()) {\n $type = 'Abstract';\n }\n\n if ($this->isFinal()) {\n $type = 'Final ' . $type;\n }\n if ($this->hasTag('deprecated')) {\n $type = 'Deprecated ' . $type;\n }\n\n return $type;\n }", "public function getName()\n {\n return static::CLASS;\n }", "public function getType()\n\t{\n\t\treturn $this->get('type');\n\t}", "public function getType(): string;", "public function getType(): string;", "public function getType(): string;", "public function getType(): string;", "public function getType(): string;", "public function getType(): string;", "public function getType(): string;", "public function getType(): string;", "public function getType(): string;", "public function getType(): string;", "public function getType(): string;", "public function getType(): string;", "public function get_type();", "public function getType():string {\n\t\t\treturn $this->type;\n\t\t}", "public function getTypeAttribute()\n {\n $class = $this->component_type;\n $function = new \\ReflectionClass($class);\n $type = str_replace('Page', '', $function->getShortName());\n\n return strtolower($type);\n }", "public function getNodeTypeName() {}", "public function getName() {\r\n $parsed = Parser::parseClassName(get_class());\r\n return $parsed['className'];\r\n }", "public function getType()\n\t{\n\t\treturn $this->getObject('type', null, 'type');\n\t}", "public function getType(): string {\n return $this->type;\n }", "function getType()\n {\n return get_class($this);\n }", "public function getType()\n {\n return $this->factory->resolveType($this);\n }", "public function getObjectTypeName() \n\t{\n\t\treturn self::$object_type[$this->object_type];\n\t}", "public function getTypeAttribute()\n {\n return ($this->tagtype->name);\n }" ]
[ "0.7552115", "0.7496433", "0.73505104", "0.7287253", "0.72282636", "0.72205293", "0.71895033", "0.7164006", "0.7039154", "0.7031914", "0.702775", "0.7020926", "0.69858915", "0.69579107", "0.6893087", "0.6886493", "0.68722534", "0.6866441", "0.6864917", "0.68632096", "0.68606126", "0.6821174", "0.6793092", "0.6788149", "0.6780041", "0.6780041", "0.6774204", "0.6774204", "0.6768574", "0.6768446", "0.6765502", "0.67500013", "0.6745635", "0.6745635", "0.6745635", "0.6745635", "0.6745635", "0.6745635", "0.6745635", "0.6745635", "0.6745635", "0.6745635", "0.67452013", "0.67452013", "0.67452013", "0.673491", "0.673491", "0.673491", "0.673491", "0.673491", "0.673491", "0.673491", "0.673491", "0.673491", "0.673491", "0.673491", "0.67288935", "0.6713266", "0.6708671", "0.6697999", "0.6684423", "0.66689086", "0.6665086", "0.6659737", "0.6659737", "0.6659737", "0.6656115", "0.6655361", "0.66489404", "0.6634592", "0.662879", "0.6618036", "0.6618036", "0.6609484", "0.66074944", "0.6607252", "0.66042775", "0.66010207", "0.65981776", "0.65981776", "0.65981776", "0.65981776", "0.65981776", "0.65981776", "0.65981776", "0.65981776", "0.65981776", "0.65981776", "0.65981776", "0.65981776", "0.6595267", "0.6574558", "0.6566957", "0.6565825", "0.656315", "0.6561179", "0.6558837", "0.6555103", "0.65375936", "0.6532748", "0.6531888" ]
0.0
-1
Seed the application's database.
public function run() { $this->call([ //DepartmentTableSeeder::class, //IndicatorTypeTableSeeder::class, EmployeeIndicatorTableSeeder::class, ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function dbSeed(){\n\t\tif (App::runningUnitTests()) {\n\t\t\t//Turn foreign key checks off\n\t\t\tDB::statement('SET FOREIGN_KEY_CHECKS=0;');// <- USE WITH CAUTION!\n\t\t\t//Seed tables\n\t\t\tArtisan::call('db:seed');\n\t\t\t//Turn foreign key checks on\n\t\t\tDB::statement('SET FOREIGN_KEY_CHECKS=1;');// <- SHOULD RESET ANYWAY BUT JUST TO MAKE SURE!\n\t\t}\n\t}", "protected function seedDB()\n {\n $ans = $this->ask('Seed your database?: ', 'y');\n\n // Check if the answer is true\n if (preg_match('/^y/', $ans))\n {\n $this->call('db:seed');\n $this->comment('');\n $this->comment('Database successfully seeded.');\n $this->comment('=====================================');\n echo \"Your app is now ready!\";\n }\n }", "protected function seedDatabase(): void\n {\n $this->seedProductCategories();\n $this->seedProducts();\n }", "public function setupDatabase()\n {\n Artisan::call('migrate:refresh');\n Artisan::call('db:seed');\n\n self::$setupDatabase = false;\n }", "public function run()\n {\n $this->seed('FormsMenuItemsTableSeeder');\n $this->seed('FormsDataTypesTableSeeder');\n $this->seed('FormsDataRowsTableSeeder');\n $this->seed('FormsPermissionsTableSeeder');\n $this->seed('FormsSettingsTableSeeder');\n $this->seed('FormsTableSeeder');\n }", "public function run()\n {\n if (defined('STDERR')) fwrite(STDERR, print_r(\"\\n--- Seeding ---\\n\", TRUE));\n\n if (App::environment('production')) {\n if (defined('STDERR')) fwrite(STDERR, print_r(\"--- ERROR: Seeding in Production is prohibited ---\\n\", TRUE));\n return;\n }\n\n $this->call(RolesTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(ProvincesTableSeeder::class);\n $this->call(CitiesTableSeeder::class);\n $this->call(DistrictsTableSeeder::class);\n $this->call(ConfigsTableSeeder::class);\n $this->call(ConfigContentsTableSeeder::class);\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n if (defined('STDERR')) fwrite(STDERR, print_r(\"Set FOREIGN_KEY_CHECKS=1 --- DONE\\n\", TRUE));\n\n // \\Artisan::call('command:regenerate-user-feeds');\n\n \\Cache::flush();\n\n if (defined('STDERR')) fwrite(STDERR, print_r(\"--- End Seeding ---\\n\\n\", TRUE));\n }", "protected function setupDatabase()\n {\n $this->call('migrate');\n $this->call('db:seed');\n\n $this->info('Database migrated and seeded.');\n }", "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(PermissionsSeeder::class);\n $this->call(RolesSeeder::class);\n $this->call(ThemeSeeder::class);\n\n //\n\n DB::table('paypal_info')->insert([\n 'client_id' => '',\n 'client_secret' => '',\n 'currency' => '',\n ]);\n DB::table('contact_us')->insert([\n 'content' => '',\n ]);\n DB::table('setting')->insert([\n 'site_name' => ' ',\n ]);\n DB::table('terms_and_conditions')->insert(['terms_and_condition' => 'text']);\n }", "public function seedDatabase(): void\n {\n echo \"Running seeds\";\n\n // Folder where all the seeds are.\n $folder = __DIR__ . '/../seeds/';\n\n // Scan all files/folders inside database.\n $files = \\scandir($folder);\n\n $seeders = [];\n foreach ($files as $key => $file) {\n\n // All files that don't start with a dot.\n if ($file[0] !== '.') {\n\n // Load the file.\n require_once $folder . $file;\n\n // We have to call the migrations after because\n // some seeds are dependant from other seeds.\n $seeders[] = explode('.', $file)[0];\n }\n }\n\n // Run all seeds.\n foreach ($seeders as $seeder) {\n (new $seeder)->run();\n }\n }", "protected function seedDatabase()\n {\n //$this->app->make('db')->table(static::TABLE_NAME)->delete();\n\n TestExtendedModel::create([\n 'unique_field' => '999',\n 'second_field' => null,\n 'name' => 'unchanged',\n 'active' => true,\n 'hidden' => 'invisible',\n ]);\n\n TestExtendedModel::create([\n 'unique_field' => '1234567',\n 'second_field' => '434',\n 'name' => 'random name',\n 'active' => false,\n 'hidden' => 'cannot see me',\n ]);\n\n TestExtendedModel::create([\n 'unique_field' => '1337',\n 'second_field' => '12345',\n 'name' => 'special name',\n 'active' => true,\n 'hidden' => 'where has it gone?',\n ]);\n }", "public function initDatabase()\n {\n $this->call('migrate');\n\n $userModel = config('admin.database.users_model');\n\n if ($userModel::count() == 0) {\n $this->call('db:seed', ['--class' => AdminSeeder::class]);\n }\n }", "public function run ()\n {\n if (App::environment() === 'production') {\n exit('Seed should be run only in development/debug environment.');\n }\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n DB::table('role_user')->truncate();\n\n // Root user\n $user = User::find(1);\n $user->assignRole('owner');\n\n $user = User::find(2);\n $user->assignRole('admin');\n\n $user = User::find(3);\n $user->assignRole('admin');\n\n $user = User::find(4);\n $user->assignRole('moderator');\n\n $user = User::find(5);\n $user->assignRole('moderator');\n \n DB::statement('SET FOREIGN_KEY_CHECKS=1');\n }", "public function run()\n {\n Model::unguard();\n\n if (env('DB_CONNECTION') == 'mysql') {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n }\n\n $this->call(RolesTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(EntrustTableSeeder::class);\n\n $this->call(AccounttypeSeeder::class);\n $this->call(AppUserTableSeeder::class);\n $this->call(AppEmailUserTableSeeder::class);\n\n\n $this->call(CountryTableSeeder::class);\n $this->call(CityTableSeeder::class);\n\n\n $this->call(PostTypeTableSeeder::class);\n $this->call(PostSubTypeTableSeeder::class);\n // $this->call(PostTableSeeder::class);\n // $this->call(AppPostSolvedTableSeeder::class);\n\n\n $this->call(AppCommentTypeTableSeeder::class);\n // $this->call(AppCommentTableSeeder::class);\n // $this->call(AppSubCommentTableSeeder::class);\n\n\n if (env('DB_CONNECTION') == 'mysql') {\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }\n\n Model::reguard();\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n DB::table('users')->truncate();\n DB::table('password_resets')->truncate();\n DB::table('domains')->truncate();\n DB::table('folders')->truncate();\n DB::table('bookmarks')->truncate();\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\n $this->seedUserAccount('[email protected]');\n $this->seedUserAccount('[email protected]');\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n // $this->call(UsersTableSeeder::class);\n /* Schema::dropIfExists('employees');\n Schema::dropIfExists('users');\n Schema::dropIfExists('requests');\n Schema::dropIfExists('requeststatus');*/\n User::truncate();\n InstallRequest::truncate();\n RequestStatus::truncate();\n\n $cantidadEmployyes = 20;\n $cantidadUsers = 20;\n $cantidadRequestStatus = 3;\n $cantidadRequests = 200;\n\n factory(User::class, $cantidadUsers)->create();\n factory(RequestStatus::class, $cantidadRequestStatus)->create();\n factory(InstallRequest::class, $cantidadRequests)->create();\n }", "public function run()\n {\n Model::unguard();\n foreach (glob(__DIR__ . '/seeds/*.php') as $filename) {\n require_once($filename);\n }\n // $this->call(UserTableSeeder::class);\n //DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n// $this->call('CustomerTableSeeder');\n $this->call('PhotoTableSeeder');\n// $this->call('ProductTableSeeder');\n// $this->call('StaffTableSeeder');\n// $this->call('PasswordResetsTableSeeder');\n// $this->call('UsersTableSeeder');\n $this->call('CustomersTableSeeder');\n $this->call('EmployeesTableSeeder');\n $this->call('InventoryTransactionTypesTableSeeder');\n $this->call('OrderDetailsTableSeeder');\n $this->call('OrderDetailsStatusTableSeeder');\n $this->call('OrdersTableSeeder');\n $this->call('InvoicesTableSeeder');\n $this->call('OrdersTableSeeder');\n $this->call('OrderDetailsTableSeeder');\n $this->call('OrdersStatusTableSeeder');\n $this->call('OrderDetailsTableSeeder');\n\n $this->call('OrdersTaxStatusTableSeeder');\n $this->call('PrivilegesTableSeeder');\n $this->call('EmployeePrivilegesTableSeeder');\n $this->call('ProductsTableSeeder');\n $this->call('InventoryTransactionsTableSeeder');\n $this->call('PurchaseOrderDetailsTableSeeder');\n\n $this->call('PurchaseOrderStatusTableSeeder');\n $this->call('PurchaseOrdersTableSeeder');\n $this->call('SalesReportsTableSeeder');\n $this->call('ShippersTableSeeder');\n $this->call('StringsTableSeeder');\n $this->call('SuppliersTableSeeder');\n //DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\n Model::reguard();\n }", "public function run()\n\t{\n $this->cleanDatabase();\n\n Eloquent::unguard();\n\n\t\t$this->call('UsersTableSeeder');\n\t\t$this->call('ProductsTableSeeder');\n\t\t$this->call('CartsTableSeeder');\n $this->call('StoreTableSeeder');\n $this->call('AdvertisementsTableSeeder');\n \n\t}", "public function run()\n {\n \tDB::table('seeds')->truncate();\n\n $seeds = array(\n array(\n 'name' => 'PreferencesTableSeeder_Update_11_18_2013',\n ),\n array(\n 'name' => 'PreferencesTableSeeder_Update_11_20_2013',\n ),\n );\n\n // Uncomment the below to run the seeder\n DB::table('seeds')->insert($seeds);\n }", "public function run()\n {\n $this->createDefaultPermissionSeeder(env('DB_CONNECTION', 'mysql'));\n }", "public function run()\n {\n $this->createDefaultPermissionSeeder(env('DB_CONNECTION', 'mysql'));\n }", "protected function setUp(): void\n {\n $db = new DB;\n\n $db->addConnection([\n 'driver' => 'sqlite',\n 'database' => ':memory:',\n ]);\n\n $db->bootEloquent();\n $db->setAsGlobal();\n\n $this->createSchema();\n }", "public function run()\n {\n //$this->call('UserTableSeeder');\n //$this->call('ProjectTableSeeder');\n //$this->call('TaskTableSeeder');\n\n /**\n * Prepare seeding\n */\n $faker = Faker::create();\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n Model::unguard();\n\n /**\n * Seeding user table\n */\n App\\User::truncate();\n factory(App\\User::class)->create([\n 'name' => 'KCK',\n 'email' => '[email protected]',\n 'password' => bcrypt('password')\n ]);\n\n /*factory(App\\User::class, 9)->create();\n $this->command->info('users table seeded');*/\n\n /**\n * Seeding roles table\n */\n Spatie\\Permission\\Models\\Role::truncate();\n DB::table('model_has_roles')->truncate();\n $superAdminRole = Spatie\\Permission\\Models\\Role::create([\n 'name' => '최고 관리자'\n ]);\n $adminRole = Spatie\\Permission\\Models\\Role::create([\n 'name' => '관리자'\n ]);\n $regularRole = Spatie\\Permission\\Models\\Role::create([\n 'name' => '정회원'\n ]);\n $associateRole = Spatie\\Permission\\Models\\Role::create([\n 'name' => '준회원'\n ]);\n\n App\\User::where('email', '!=', '[email protected]')->get()->map(function ($user) use ($regularRole) {\n $user->assignRole($regularRole);\n });\n\n App\\User::whereEmail('[email protected]')->get()->map(function ($user) use ($superAdminRole) {\n $user->assignRole($superAdminRole);\n });\n $this->command->info('roles table seeded');\n\n /**\n * Seeding articles table\n */\n App\\Article::truncate();\n $users = App\\User::all();\n\n $users->each(function ($user) use ($faker) {\n $user->articles()->save(\n factory(App\\Article::class)->make()\n );\n });\n $this->command->info('articles table seeded');\n\n /**\n * Seeding comments table\n */\n App\\Comment::truncate();\n $articles = App\\Article::all();\n\n $articles->each(function ($article) use ($faker, $users) {\n for ($i = 0; $i < 10; $i++) {\n $article->comments()->save(\n factory(App\\Comment::class)->make([\n 'author_id' => $faker->randomElement($users->pluck('id')->toArray()),\n //'parent_id' => $article->id\n ])\n );\n };\n });\n $this->command->info('comments table seeded');\n\n /**\n * Seeding tags table\n */\n App\\Tag::truncate();\n DB::table('article_tag')->truncate();\n $articles->each(function ($article) use ($faker) {\n $article->tags()->save(\n factory(App\\Tag::class)->make()\n );\n });\n $this->command->info('tags table seeded');\n\n /**\n * Seeding attachments table\n */\n App\\Attachment::truncate();\n if (!File::isDirectory(attachment_path())) {\n File::deleteDirectory(attachment_path(), true);\n }\n\n $articles->each(function ($article) use ($faker) {\n $article->attachments()->save(\n factory(App\\Attachment::class)->make()\n );\n });\n\n //$files = App\\Attachment::pluck('name');\n\n if (!File::isDirectory(attachment_path())) {\n File::makeDirectory(attachment_path(), 777, true);\n }\n\n /*\n foreach ($files as $file) {\n File::put(attachment_path($file), '');\n }\n */\n\n $this->command->info('attachments table seeded');\n\n /**\n * Close seeding\n */\n Model::reguard();\n DB::statement('SET FOREIGN_KEY_CHECKS=1');\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n echo 'seeding permission...', PHP_EOL;\n $permissions = [\n 'role-list',\n 'role-create',\n 'role-edit',\n 'role-delete',\n 'formation-list',\n 'formation-create',\n 'formation-edit',\n 'formation-delete',\n 'user-list',\n 'user-create',\n 'user-edit',\n 'user-delete'\n ];\n foreach ($permissions as $permission) {\n Permission::create(['name' => $permission]);\n }\n echo 'seeding users...', PHP_EOL;\n\n $user= User::create(\n [\n 'name' => 'Mr. admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'remember_token' => null,\n ]\n );\n echo 'Create Roles...', PHP_EOL;\n Role::create(['name' => 'former']);\n Role::create(['name' => 'learner']);\n Role::create(['name' => 'admin']);\n Role::create(['name' => 'manager']);\n Role::create(['name' => 'user']);\n\n echo 'seeding Role User...', PHP_EOL;\n $user->assignRole('admin');\n $role = $user->assignRole('admin');\n $role->givepermissionTo(Permission::all());\n\n \\DB::table('languages')->insert(['name' => 'English', 'code' => 'en']);\n \\DB::table('languages')->insert(['name' => 'Français', 'code' => 'fr']);\n }", "public function run()\n {\n $this->call(CountriesTableSeeder::class);\n $this->call(StatesTableSeeder::class);\n $this->call(CitiesTableSeeder::class);\n\n factory(Group::class)->create();\n factory(Contact::class, 5000)->create();\n }", "public function run()\n\t{\n\t\tEloquent::unguard();\n\n\t\t// $this->call('AdminTableSeeder');\n\t\t// $this->call('UserTableSeeder');\n\t\t// $this->call('MenuTableSeeder');\n\t\t// $this->call('ProductTableSeeder');\n\t\t// $this->call('CategoryTableSeeder');\n\t\t// $this->call('OptionTableSeeder');\n\t\t// $this->call('OptionGroupTableSeeder');\n\t\t// $this->call('TypeTableSeeder');\n\t\t// $this->call('LayoutTableSeeder');\n\t\t// $this->call('LayoutDetailTableSeeder');\n\t\t// $this->call('BannerTableSeeder');\n\t\t// $this->call('ConfigureTableSeeder');\n\t\t// $this->call('PageTableSeeder');\n\t\t// $this->call('ImageTableSeeder');\n\t\t// $this->call('ImageableTableSeeder');\n\t\t// ======== new Seed =======\n\t\t$this->call('AdminsTableSeeder');\n\t\t$this->call('BannersTableSeeder');\n\t\t$this->call('CategoriesTableSeeder');\n\t\t$this->call('ConfiguresTableSeeder');\n\t\t$this->call('ImageablesTableSeeder');\n\t\t$this->call('ImagesTableSeeder');\n\t\t$this->call('LayoutsTableSeeder');\n\t\t$this->call('LayoutDetailsTableSeeder');\n\t\t$this->call('MenusTableSeeder');\n\t\t$this->call('OptionablesTableSeeder');\n\t\t$this->call('OptionsTableSeeder');\n\t\t$this->call('OptionGroupsTableSeeder');\n\t\t$this->call('PagesTableSeeder');\n\t\t$this->call('PriceBreaksTableSeeder');\n\t\t$this->call('ProductsTableSeeder');\n\t\t$this->call('ProductsCategoriesTableSeeder');\n\t\t$this->call('SizeListsTableSeeder');\n\t\t$this->call('TypesTableSeeder');\n\t\t$this->call('UsersTableSeeder');\n\t\t$this->call('ContactsTableSeeder');\n\t\t$this->call('RolesTableSeeder');\n\t\t$this->call('PermissionsTableSeeder');\n\t\t$this->call('PermissionRoleTableSeeder');\n\t\t$this->call('AssignedRolesTableSeeder');\n\t\t$this->call('OrdersTableSeeder');\n\t\t$this->call('OrderDetailsTableSeeder');\n\t\tCache::flush();\n\t\t// BackgroundProcess::copyFromVI();\n\t}", "public function run()\n {\n Model::unguard();\n\n User::create([\n 'email' => '[email protected]',\n 'name' => 'admin',\n 'password' => Hash::make('1234'),\n 'email_verified_at' => Carbon::now()\n ]);\n\n factory(User::class, 200)->create();\n\n // $this->call(\"OthersTableSeeder\");\n }", "public function run()\n {\n $this->seedRegularUsers();\n $this->seedAdminUser();\n }", "public function run()\n {\n if (\\App::environment() === 'local') {\n\n // Delete existing data\n\n\n Eloquent::unguard();\n\n //disable foreign key check for this connection before running seeders\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\n // Truncate all tables, except migrations\n $tables = array_except(DB::select('SHOW TABLES'), ['migrations']);\n foreach ($tables as $table) {\n $tables_in_database = \"Tables_in_\" . Config::get('database.connections.mysql.database');\n DB::table($table->$tables_in_database)->truncate();\n }\n\n // supposed to only apply to a single connection and reset it's self\n // but I like to explicitly undo what I've done for clarity\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\n //get roles\n $this->call('AccountSeeder');\n $this->call('CountrySeeder');\n $this->call('StateSeeder');\n $this->call('CitySeeder');\n $this->call('OptionSeeder');\n $this->call('TagSeeder');\n $this->call('PrintTemplateSeeder');\n $this->call('SettingsSeeder');\n\n\n\n if(empty($web_installer)) {\n $admin = Sentinel::registerAndActivate(array(\n 'email' => '[email protected]',\n 'password' => \"admin\",\n 'first_name' => 'Admin',\n 'last_name' => 'Doe',\n ));\n $admin->user_id = $admin->id;\n $admin->save();\n\n $adminRole = Sentinel::findRoleById(1);\n $adminRole->users()->attach($admin);\n }\n else {\n $admin = Sentinel::findById(1);\n }\n\n //add dummy staff and customer\n $staff = Sentinel::registerAndActivate(array(\n 'email' => '[email protected]',\n 'password' => \"staff\",\n 'first_name' => 'Staff',\n 'last_name' => 'Doe',\n ));\n $admin->users()->save($staff);\n\n foreach ($this->getPermissions() as $permission) {\n $staff->addPermission($permission);\n }\n $staff->save();\n\n $customer = Sentinel::registerAndActivate(array(\n 'email' => '[email protected]',\n 'password' => \"customer\",\n 'first_name' => 'Customer',\n 'last_name' => 'Doe',\n ));\n Customer::create(array('user_id' => $customer->id, 'belong_user_id' => $staff->id));\n $staff->users()->save($customer);\n\n //add respective roles\n\n $staffRole = Sentinel::findRoleById(2);\n $staffRole->users()->attach($staff);\n $customerRole = Sentinel::findRoleById(3);\n $customerRole->users()->attach($customer);\n\n\n\n DB::table('sales_teams')->truncate();\n DB::table('opportunities')->truncate();\n\n //Delete existing seeded users except the first 4 users\n User::where('id', '>', 3)->get()->each(function ($user) {\n $user->forceDelete();\n });\n\n //Get the default ADMIN\n $user = User::find(1);\n $staffRole = Sentinel::getRoleRepository()->findByName('staff');\n $customerRole = Sentinel::getRoleRepository()->findByName('customer');\n\n //Seed Sales teams for default ADMIN\n foreach (range(1, 4) as $j) {\n $this->createSalesTeam($user->id, $j, $user);\n $this->createOpportunity($user, $user->id, $j);\n }\n\n\n //Get the default STAFF\n $staff = User::find(2);\n $this->createSalesTeam($staff->id, 1, $staff);\n $this->createSalesTeam($staff->id, 2, $staff);\n\n //Seed Sales teams for each STAFF\n foreach (range(1, 4) as $j) {\n $this->createSalesTeam($staff->id, $j, $staff);\n $this->createOpportunity($staff, $staff->id, $j);\n }\n\n foreach (range(1, 3) as $i) {\n $staff = $this->createStaff($i);\n $user->users()->save($staff);\n $staffRole->users()->attach($staff);\n\n $customer = $this->createCustomer($i);\n $staff->users()->save($customer);\n $customerRole->users()->attach($customer);\n $customer->customer()->save(factory(\\App\\Models\\Customer::class)->make());\n\n\n //Seed Sales teams for each STAFF\n foreach (range(1, 5) as $j) {\n $this->createSalesTeam($staff->id, $j, $staff);\n $this->createOpportunity($staff, $i, $j);\n }\n\n }\n\n //finally call it installation is finished\n file_put_contents(storage_path('installed'), 'Welcome to LCRM');\n }\n }", "public function run()\n {\n if (env('DB_DATABASE') == 'connection') {\n Connection::create([\n \"ruc\" => \"12312312312\",\n \"basedata\" => \"nbdata2018_1\",\n ]);\n \n Connection::create([\n \"ruc\" => \"12312312315\",\n \"basedata\" => \"nbdata2018_2\",\n ]);\n \n $this->call(ConnectionTableSeeder::class);\n } else {\n $this->call(AppSeeder::class);\n }\n }", "public function setupDatabase()\n {\n exec('rm ' . storage_path() . '/testdb.sqlite');\n exec('cp ' . 'database/database.sqlite ' . storage_path() . '/testdb.sqlite');\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n // Let's truncate our existing records to start from scratch.\n Assignation::truncate();\n\n $faker = \\Faker\\Factory::create();\n \n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 40; $i++) {\n Assignation::create([\n 'ad_id' => $faker->numberBetween(1,20),\n 'buyer_id' => $faker->numberBetween(1,6),\n 'seller_id' => $faker->numberBetween(6,11),\n 'state' => NULL,\n ]);\n }\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n # truncates tables before seeding\n foreach ($this->toTruncate as $table) {\n DB::table($table)->delete();\n }\n\n factory(App\\Models\\Product::class, 25)->create();\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n Post::truncate();\n Comment::truncate();\n // CommentReply::truncate();\n \n\n\n factory(User::class,10)->create();\n factory(Post::class,20)->create();\n factory(Comment::class,30)->create();\n // factory(CommentReply::class,30)->create();\n }", "public function run()\n\t{\n \n Eloquent::unguard();\n //DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\t\t$this->call('UserTableSeeder');\n\t $this->call('LayerTableSeeder');\n $this->call('UserLevelTableSeeder');\n $this->call('RoleUserTableSeeder');\n $this->call('RoleLayerTableSeeder');\n $this->call('BookmarkTableSeeder');\n \n //DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\t}", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n // Sample::truncate();\n // TestItem::truncate();\n // UOM::truncate();\n Role::truncate();\n User::truncate();\n\n // factory(Role::class, 4)->create();\n Role::create([\n 'name'=> 'Director',\n 'description'=> 'Director type'\n ]);\n\n Role::create([\n 'name'=> 'Admin',\n 'description'=> 'Admin type'\n ]);\n Role::create([\n 'name'=> 'Employee',\n 'description'=> 'Employee type'\n ]);\n Role::create([\n 'name'=> 'Technician',\n 'description'=> 'Technician type'\n ]);\n \n factory(User::class, 20)->create()->each(\n function ($user){\n $roles = \\App\\Role::all()->random(mt_rand(1, 2))->pluck('id');\n $user->roles()->attach($roles);\n }\n );\n }", "public function run()\n {\n DatabaseSeeder::seedLearningStylesProbs();\n DatabaseSeeder::seedCampusProbs();\n DatabaseSeeder::seedGenderProbs();\n DatabaseSeeder::seedTypeStudentProbs();\n DatabaseSeeder::seedTypeProfessorProbs();\n DatabaseSeeder::seedNetworkProbs();\n }", "public function run()\n {\n /** \n * Note: You must add these lines to your .env file for this Seeder to work (replace the values, obviously):\n SEEDER_USER_FIRST_NAME = 'Firstname'\n SEEDER_USER_LAST_NAME = 'Lastname'\n\t\tSEEDER_USER_DISPLAY_NAME = 'Firstname Lastname'\n\t\tSEEDER_USER_EMAIL = [email protected]\n SEEDER_USER_PASSWORD = yourpassword\n */\n\t\tDB::table('users')->insert([\n 'user_first_name' => env('SEEDER_USER_FIRST_NAME'),\n 'user_last_name' => env('SEEDER_USER_LAST_NAME'),\n 'user_name' => env('SEEDER_USER_DISPLAY_NAME'),\n\t\t\t'user_email' => env('SEEDER_USER_EMAIL'),\n 'user_status' => 1,\n \t'password' => Hash::make((env('SEEDER_USER_PASSWORD'))),\n 'permission_fk' => 1,\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n ]);\n }", "public function run()\n {\n DB::statement('SET foreign_key_checks = 0');\n DB::table('topics')->truncate();\n\n factory(\\App\\Topic::class, 100)->create();\n // ->each(function($topic) {\n\n // // Seed para a relação com group\n // $topic->group()->save(factory(App\\Group::class)->make());\n\n // // Seed para a relação com topicMessages\n // $topic->topicMessages()->save(factory(App\\TopicMessage::class)->make());\n\n // // Seed para a relação com user\n // $topic->user()->save(factory(App\\User::class)->make());\n // });\n \n DB::statement('SET foreign_key_checks = 1');\n }", "public function run()\n {\n\n factory('App\\Models\\Pessoa', 60)->create();\n factory('App\\Models\\Profissional', 10)->create();\n factory('App\\Models\\Paciente', 50)->create();\n $this->call(UsersTableSeeder::class);\n $this->call(ProcedimentoTableSeeder::class);\n // $this->call(PessoaTableSeeder::class);\n // $this->call(ProfissionalTableSeeder::class);\n // $this->call(PacienteTableSeeder::class);\n // $this->call(AgendaProfissionalTableSeeder::class);\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n Categoria::truncate();\n Atractivo::truncate();\n Galeria::truncate();\n User::truncate();\n\n $this->call(CategoriasTableSeeder::class);\n $this->call(AtractivosTableSeeder::class);\n $this->call(GaleriasTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n\n }", "public function run(Faker $faker)\n {\n Schema::disableForeignKeyConstraints();\n DB::table('users')->insert([\n 'name' => $faker->name(),\n 'email' => '[email protected]',\n 'password' => Hash::make('12345678'),\n ]);\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0'); // TO PREVENT CHECKS FOR foreien key in seeding\n\n User::truncate();\n Category::truncate();\n Product::truncate();\n Transaction::truncate();\n\n DB::table('category_product')->truncate();\n\n User::flushEventListeners();\n Category::flushEventListeners();\n Product::flushEventListeners();\n Transaction::flushEventListeners();\n\n $usersQuantities = 1000;\n $categoriesQuantities = 30;\n $productsQuantities = 1000;\n $transactionsQuantities = 1000;\n\n factory(User::class, $usersQuantities)->create();\n factory(Category::class, $categoriesQuantities)->create();\n\n factory(Product::class, $productsQuantities)->create()->each(\n function ($product) {\n $categories = Category::all()->random(mt_rand(1, 5))->pluck('id');\n $product->categories()->attach($categories);\n });\n\n factory(Transaction::class, $transactionsQuantities)->create();\n }", "public function run()\n {\n\t $this->call(CategoryTableSeed::class);\n\t $this->call(ProductTableSeed::class);\n\t $this->call(UserTableSeed::class);\n }", "public function run()\n {\n $this->cleanDatabase();\n\n factory(User::class, 50)->create();\n factory(Document::class, 30)->create();\n }", "public function run()\n {\n // \\DB::statement('SET_FOREIGN_KEY_CHECKS=0');\n \\DB::table('users')->truncate();\n \\DB::table('posts')->truncate();\n // \\DB::table('category')->truncate();\n \\DB::table('photos')->truncate();\n \\DB::table('comments')->truncate();\n \\DB::table('comment_replies')->truncate();\n\n \\App\\Models\\User::factory()->times(10)->hasPosts(1)->create();\n \\App\\Models\\Role::factory()->times(10)->create();\n \\App\\Models\\Category::factory()->times(10)->create();\n \\App\\Models\\Comment::factory()->times(10)->hasReplies(1)->create();\n \\App\\Models\\Photo::factory()->times(10)->create();\n\n \n // \\App\\Models\\User::factory(10)->create([\n // 'role_id'=>2,\n // 'is_active'=>1\n // ]);\n\n // factory(App\\Models\\Post::class, 10)->create();\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n \t// DB::table('webapps')->delete();\n\n $webapps = array(\n\n );\n\n // Uncomment the below to run the seeder\n // DB::table('webapps')->insert($webapps);\n }", "public function run()\n {\n DB::table('users')->insert([\n 'name'=>\"test\",\n 'password' => Hash::make('123'),\n 'email'=>'[email protected]'\n ]);\n DB::table('tags')->insert(['name'=>'tags']);\n $this->call(UserSeed::class);\n $this->call(CategoriesSeed::class);\n $this->call(TopicsSeed::class);\n $this->call(CommentariesSeed::class);\n // $this->call(UsersTableSeeder::class);\n }", "public function run()\n {\n $tables = array(\n 'users',\n 'companies',\n 'stands',\n 'events',\n 'visitors',\n 'api_keys'\n );\n\n if (!App::runningUnitTests()) {\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n }\n\n foreach ($tables as $table) {\n DB::table($table)->truncate();\n }\n\n $this->call(UsersTableSeeder::class);\n $this->call(EventsTableSeeder::class);\n $this->call(CompaniesTableSeeder::class);\n $this->call(StandsTableSeeder::class);\n $this->call(VisitorsTableSeeder::class);\n\n if (!App::runningUnitTests()) {\n DB::statement('SET FOREIGN_KEY_CHECKS = 1');\n }\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n Language::truncate();\n Reason::truncate();\n Report::truncate();\n Category::truncate();\n Position::truncate();\n\n $languageQuantity = 10;\n $reasonQuantity = 10;\n $reportQuantity = 10;\n $categoryQuantity = 10;\n $positionQuantity = 10;\n\n factory(Language::class,$languageQuantity)->create();\n factory(Reason::class,$reasonQuantity)->create();\n \n factory(Report::class,$reportQuantity)->create();\n \n factory(Category::class,$categoryQuantity)->create();\n \n factory(Position::class,$positionQuantity)->create();\n\n }", "public function run()\n {\n $clear = $this->command->confirm('Wil je de database leegmaken? (Dit haalt alle DATA weg)');\n\n if ($clear):\n $this->command->callSilent('migrate:refresh');\n $this->command->info('Database Cleared, starting seeding');\n endif;\n\n $this->call([\n SeedSeeder::class,\n RoleSeeder::class,\n UserSeeder::class,\n // BoardgameSeeder::class,\n BoardgamesTableSeeder::class,\n StatusSeeder::class,\n TournamentSeeder::class,\n AchievementsSeeder::class,\n TournamentUsersSeeder::class,\n ]);\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n $this->call(PaisSeeder::class);\n $this->call(DepartamentoSeeder::class);\n $this->call(MunicipioSeeder::class);\n $this->call(PersonaSeeder::class);\n }", "public function run()\n {\n //\n if (App::environment() === 'production') {\n exit('Do not seed in production environment');\n }\n\n DB::statement('SET FOREIGN_KEY_CHECKS = 0'); // disable foreign key constraints\n\n DB::table('events')->truncate();\n \n Event::create([\n 'id' => 1,\n 'name' => 'Spot Registration For Throat Cancer',\n 'cancerId' => 1,\n 'startDate'\t\t=> Carbon::now(),\n 'endDate'\t\t=> Carbon::now()->addMonths(12),\n 'eventType'\t\t=> 'register',\n 'formId'\t\t=> null,\n ]);\n\n Event::create([\n 'id' => 2,\n 'name' => 'Spot Screening For Throat Cancer',\n 'cancerId' => 1,\n 'startDate'\t\t=> Carbon::now(),\n 'endDate'\t\t=> Carbon::now()->addMonths(12),\n 'eventType'\t\t=> 'screen',\n 'formId'\t\t=> 1,\n ]);\n \n Event::create([\n 'id' => 3,\n 'name' => 'Spot Registration For Skin Cancer',\n 'cancerId' => 2,\n 'startDate'\t\t=> Carbon::now(),\n 'endDate'\t\t=> Carbon::now()->addMonths(12),\n 'eventType'\t\t=> 'register',\n 'formId'\t\t=> null,\n ]);\n\n\n Event::create([\n 'id' => 3,\n 'name' => 'Registration cum Screening camp for Throat Cancer',\n 'cancerId' => 1,\n 'startDate'\t\t=> Carbon::now(),\n 'endDate'\t\t=> Carbon::now()->addWeeks(1),\n 'eventType'\t\t=> 'register_screen',\n 'formId'\t\t=> 1,\n ]);\n \n DB::statement('SET FOREIGN_KEY_CHECKS = 1'); // enable foreign key constraints\n\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // Para que no verifique el control de claves foráneas al hacer el truncate haremos:\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS=0');\n\n\t\t// Primero hacemos un truncate de las tablas para que no se estén agregando datos\n\t\t// cada vez que ejecutamos el seeder.\n\t\t//Foto::truncate();\n\t\t//Album::truncate();\n\t\t//Usuario::truncate();\n DB::table('users')->delete();\n DB::table('ciudades')->delete();\n DB::table('tiendas')->delete();\n DB::table('ofertas')->delete();\n DB::table('ventas')->delete();\n\n\n\t\t// Es importante el orden de llamada.\n\t\t$this->call('UserSeeder');\n $this->call('CiudadSeeder');\n\t\t$this->call('TiendaSeeder');\n $this->call('OfertaSeeder');\n $this->call('VentaSeeder');\n }", "public function run()\n {\n $this->call(\\Database\\Seeders\\GroupByRecordTableSeeder::class);\n $this->call(\\Database\\Seeders\\SingleIndexRecordTableSeeder::class);\n $this->call(\\Database\\Seeders\\MultiIndexRecordTableSeeder::class);\n $this->call(\\Database\\Seeders\\JoinFiveTablesSeeder::class);\n\n// DB::table('users')->truncate();\n// DB::table('user_details')->truncate();\n//\n// // 試しに一回流す\n// $data = $this->makeData(0, 'userFactory', 1);\n// DB::table('users')->insert($data);\n// $data = $this->makeData(0, 'userDetailFactory', 1);\n// DB::table('user_details')->insert($data);\n//\n// // $this->call(UsersTableSeeder::class);\n// DB::table('users')->truncate();\n// DB::table('user_details')->truncate();\n//\n// for ($i = 0; $i < 40; $i++) {\n// $data = $this->makeData($i, 'userFactory', 2500);\n// DB::table('users')->insert($data);\n// }\n//\n// for ($i = 0; $i < 40; $i++) {\n// $data = $this->makeData($i, 'userDetailFactory', 2500);\n// DB::table('user_details')->insert($data);\n// }\n }", "public function run()\n {\n $this->truncateTables([\n 'users',\n 'categories',\n 'types',\n 'courses',\n 'classrooms',\n 'contents',\n 'companies',\n ]);\n\n $this->call(CompanyTableSeeder::class);\n $this->call(TypeTableSeeder::class);\n $this->call(RoleTableSeeder::class);\n $this->call(CategoryTableSeeder::class);\n $this->call(CoursesTableSeeder::class);\n $this->call(PermissionTableSeeder::class);\n $this->call(ContentTableSeeder::class);\n $this->call(UserTableSeeder::class);\n $this->call(ClassroomTableSeeder::class);\n $this->call(TestTableSeeder::class);\n $this->call(BankTableSeeder::class);\n\n\n // factory(\\App\\User::class, 50)\n // ->create()\n // ->each(function ($user) {\n // // $user->companies()->save();\n // $company = \\App\\Company::inRandomOrder()->first();\n // $user->companies()->attach($company->id);\n // $user->assignRole(['participante']);\n // });\n /*\n factory(\\App\\User::class, 50)\n ->create()\n ->each(function ($user) {\n $user->assignRole(['participante']);\n });*/\n }", "public function run()\n { \n\n $this->call(RoleSeeder::class);\n \n $this->call(UserSeeder::class);\n\n Storage::deleteDirectory('socials-icon');\n Storage::makeDirectory('socials-icon');\n $socials = Social::factory(7)->create();\n\n Storage::deleteDirectory('countries-flag');\n Storage::deleteDirectory('countries-firm');\n Storage::makeDirectory('countries-flag');\n Storage::makeDirectory('countries-firm');\n $countries = Country::factory(18)->create();\n\n // Se llenan datos de la tabla muchos a muchos - social_country\n foreach ($countries as $country) {\n foreach ($socials as $social) {\n\n $country->socials()->attach($social->id, [\n 'link' => 'https://www.facebook.com/ministeriopalabrayespiritu/'\n ]);\n }\n }\n\n Person::factory(50)->create();\n\n Category::factory(7)->create();\n\n Video::factory(25)->create(); \n\n $this->call(PostSeeder::class);\n\n Storage::deleteDirectory('documents');\n Storage::makeDirectory('documents');\n Document::factory(25)->create();\n\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n User::truncate();\n Question::truncate();\n Option::truncate();\n// Answer::truncate();\n Quiz::truncate();\n QuizQuestion::truncate();\n\n //for admin\n $admin = factory(User::class)->create([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'is_admin' => 1,\n ]);\n\n //for user\n $user = factory(User::class)->create([\n 'name' => 'User',\n 'email' => '[email protected]',\n ]);\n\n factory(Question::class, 100)->create()->each(function ($question) {\n factory(Option::class, mt_rand(2, 4))->create([\n 'question_id' => $question->id,\n ]);\n });\n\n factory(Quiz::class, 10)->create()->each(function ($quiz) {\n\n factory(QuizQuestion::class, mt_rand(5, 10))->create();\n });\n\n\n }", "public function run()\n {\n $this->call([\n SiteSettingsSeeder::class,\n LaratrustSeeder::class,\n CountrySeeder::class,\n GovernorateSeeder::class,\n FaqSeeder::class,\n SitePageSeeder::class,\n UsersSeeder::class,\n ]);\n\n Country::whereiso(\"EG\")->update(['enable_shipping' => true]);\n\n factory(User::class, 400)->create();\n\n Category::create([\n 'en' => [\n 'name' => \"cake tools\"\n ]\n ]);\n\n Category::create([\n 'en' => [\n 'name' => \"Party Supplies\"\n ]\n ]);\n\n $this->call([\n ProductCategorySeeder::class,\n ProductSeeder::class\n ]);\n }", "public function run()\n {\n $this->call(PermissionsTableSeeder::class);\n\n if (App::environment('local')) {\n $this->call(FakeUsersTableSeeder::class);\n $this->call(FakeArticlesTableSeeder::class);\n $this->call(FakeEventsTableSeeder::class);\n }\n }", "public function run()\n {\n Model::unguard();\n\n $this->call(CategoryTypesTableSeeder::class);\n $this->call(CategoryTableSeeder::class);\n $this->call(AccountTypesTableSeeder::class);\n $this->call(TransactionTypesTableSeeder::class);\n\n if (App::environment() !== 'production') {\n $this->call(UserTableSeeder::class);\n $this->call(AccountBudgetTableSeeder::class);\n $this->call(TransactionTableSeeder::class);\n }\n\n Model::reguard();\n }", "public function run()\n {\n User::truncate();\n Product::truncate();\n User::forceCreate([\n 'name' => 'foo',\n 'email' => '[email protected]',\n 'password' => bcrypt('password'),\n ]);\n factory(User::class, 5)->create();\n factory(Product::class, 5)->create();\n }", "public function run()\n {\n $faker = Faker::create();\n\n // $this->call(UsersTableSeeder::class);\n\n DB::table('posts')->insert([\n 'id'=>str_random(1),\n 'user_id'=> str_random(1),\n 'title' => $faker->name,\n 'body' => $faker->safeEmail,\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s'),\n ]);\n }", "public function run()\n {\n $this->call([UsersTableSeeder::class]);\n $this->call([ContratosTableSeeder::class]);\n $this->call([UsuariosTableSeeder::class]);\n $this->call([UnidadesTableSeeder::class]);\n $this->call([AtestadosTableSeeder::class]);\n }", "public function run()\n {\n Model::unguard();\n\n // $this->call(\"OthersTableSeeder\");\n\n // DB::table('locations')->insert([\n // 'id' => 1,\n // 'name' => 'Default',\n // 'name' => 'district',\n // 'district_id' => 1,\n // 'province_id' => 1,\n // ]);\n }", "public function run()\n {\n $data = include env('DATA_SEED');\n\n \\Illuminate\\Support\\Facades\\DB::table('endpoints')->insert((array)$data);\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n DB::table('admins')->truncate();\n\n for ($i = 0; $i < 10; $i++)\n {\n $faker = Factory::create('en_US');\n $values = [\n 'name' => $faker->userName,\n 'email' => $faker->freeEmail,\n 'password' => bcrypt($faker->password),\n 'phone' => $faker->phoneNumber,\n 'status' => random_int(0,1)\n ];\n admin::create($values);\n }\n DB::statement('SET FOREIGN_KEY_CHECKS=1');\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n\n DB::beginTransaction();\n// $this->seed();\n DB::commit();\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1');\n }", "public function run()\n {\n \\DB::table('provinces')->delete();\n \\DB::table('cities')->delete();\n \\DB::table('districts')->delete();\n // import provinces and cities from sql file\n $sqlFile = app_path() . '/../database/raw/administrative_indonesia_without_districts.sql';\n DB::unprepared(file_get_contents($sqlFile));\n $this->command->info('Successfully seed Provinces and Cities!');\n\n // import districts with latitude and longitude from csv file\n $csvFile = app_path() . '/../database/raw/administrative_indonesia_districts_with_lat_lng.csv';\n $districts = $this->csvToArray($csvFile);\n // check if lat lng exists\n foreach ($districts as $i => $d) {\n if ($d['latitude'] == '') $districts[$i]['latitude'] = 0;\n if ($d['longitude'] == '') $districts[$i]['longitude'] = 0;\n }\n // insert it\n $insert = District::insert($districts);\n if ($insert) $this->command->info('Successfully seed Districts!');\n }", "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(RegionsTableSeeder::class);\n $this->call(ProvincesTableSeeder::class);\n $this->call(DistrictsTableSeeder::class);\n $this->call(SubDistrictsTableSeeder::class);\n $this->call(PostcodesTableSeeder::class);\n\n if (env('APP_ENV') !== 'production') {\n // Wipe up 5 churches, and each church has 5 cells, and each cell has 20 members associated with.\n // In other word, we wipe up 500 church members.\n for ($i = 0; $i < 2; $i++) {\n $church = factory(\\App\\Models\\Church::class)->create();\n\n $church->areas()->saveMany(factory(\\App\\Models\\Area::class, 2)->create([\n 'church_id' => $church->id\n ])->each(function($area) {\n $area->cells()->saveMany(factory(\\App\\Models\\Cell::class, 2)->create([\n 'area_id' => $area->id\n ])->each(function($cell) {\n $cell->members()->saveMany(factory(App\\Models\\Member::class, 10)->create([\n 'cell_id' => $cell\n ]));\n }));\n }));\n }\n }\n }", "public function run()\n {\n User::create([\n 'name' => 'Regynald',\n 'email' => '[email protected]',\n 'password' => Hash::make('123456789'),\n 'url' => 'http://zreyleo-code.com',\n ]);\n\n User::create([\n 'name' => 'Leonardo',\n 'email' => '[email protected]',\n 'password' => Hash::make('123456789')\n ]);\n\n // seed sin model\n /* DB::table('users')->insert([\n 'name' => 'Regynald',\n 'email' => '[email protected]',\n 'password' => Hash::make('123456789'),\n 'url' => 'http://zreyleo-code.com',\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s')\n ]); */\n }", "public function run()\n {\n\n DB::table('clients')->delete();\n DB::table('trips')->delete();\n error_log('empty tables done.');\n\n $random_cities = City::inRandomOrder()->select('ar_name')->limit(5)->get();\n $GLOBALS[\"random_cities\"] = $random_cities->pluck('ar_name')->toArray();\n\n $random_airlines = Airline::inRandomOrder()->select('code')->limit(5)->get();\n $GLOBALS[\"random_airlines\"] = $random_airlines->pluck('code')->toArray();\n\n factory(App\\Client::class, 5)->create();\n error_log('Client seed done.');\n\n\n factory(App\\Trip::class, 50)->create();\n error_log('Trip seed done.');\n\n\n factory(App\\Quicksearch::class, 10)->create();\n error_log('Quicksearch seed done.');\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n User::factory()->create([\n 'name' => 'Carlos',\n 'email' => '[email protected]',\n 'email_verified_at' => now(),\n 'password' => bcrypt('123456'), // password\n 'remember_token' => Str::random(10),\n ]);\n \n $this->call([PostsTableSeeder::class]);\n $this->call([TagTableSeeder::class]);\n\n }", "public function run()\n {\n $this->environmentPath = env('APP_ENV') === 'production' ||\n env('APP_ENV') === 'qa' ||\n env('APP_ENV') === 'integration' ?\n 'Production':\n 'local';\n //disable FK\n Model::unguard();\n DB::statement(\"SET session_replication_role = 'replica';\");\n\n // $this->call(HrEmployeeTableSeeder::class);\n $this->call(\"Modules\\HR\\Database\\Seeders\\\\$this->environmentPath\\HrEmployeePosTableSeeder\");\n // $this->call(HrEmployeePresetsDiscountTableSeeder::class);\n\n // Enable FK\n DB::statement(\"SET session_replication_role = 'origin';\");\n Model::reguard();\n }", "public function run()\n {\n $this->call(RoleTableSeeder::class);\n $this->call(UserTableSeeder::class);\n \n factory('App\\Cat', 5)->create();\n $tags = factory('App\\Tag', 8)->create();\n\n factory(Post::class, 15)->create()->each(function($post) use ($tags){\n $post->comments()->save(factory(Comment::class)->make());\n $post->tags()->attach( $tags->random(mt_rand(1,4))->pluck('id')->toArray() );\n });\n }", "protected static function seed()\n {\n foreach (self::fetch('database/seeds', false) as $file) {\n Bus::need($file);\n }\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n $faker = F::create('App\\Proovedores');\n for($i=0; $i < 10; $i++){\n DB::table('users')->insert([\n 'usuario' => $i,\n 'password' => $i,\n 'email' => $faker->email,\n ]);\n }\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n // Delete all records.\n DB::table('users')->delete();\n // Reset AUTO_INCREMENT.\n DB::table('users')->truncate();\n\n // Dev user.\n App\\Models\\User::create([\n 'email' => '[email protected]',\n 'password' => '$2y$10$t6q81nz.XrMrh20NHDvxUu/szwHBwgzPd.01e8uuP0qVy0mPa6H/e',\n 'first_name' => 'L5',\n 'last_name' => 'App',\n 'username' => 'l5-app',\n 'is_email_verified' => 1,\n ]);\n\n // Dummy users.\n TestDummy::times(10)->create('App\\Models\\User');\n }", "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n User::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // We did this for test purposes. Shouldn't be doing this for production\n $password = Hash::make('123456');\n\n User::create([\n 'name' => 'Administrator',\n 'email' => '[email protected]',\n 'password' => $password,\n ]);\n }", "public function run()\n {\n Model::unguard();\n \n factory('App\\User','admin')->create();\n factory('App\\Evento',100)->create();\n //factory('App\\User','miembro',10)->create();\n factory('App\\Telefono',13)->create();\n factory('App\\Notificacion',10)->create();\n factory('App\\Rubro',10)->create();\n factory('App\\Tecnologia',10)->create();\n factory('App\\Cultivo',10)->create();\n factory('App\\Etapa',10)->create();\n factory('App\\Variedad',10)->create();\n factory('App\\Caracteristica',10)->create();\n factory('App\\Practica',30)->create();\n factory('App\\Tag',15)->create();\n // $this->call(PracticaTableSeeder::class);\n $this->call(TrTableSeeder::class);\n $this->call(MesTableSeeder::class);\n $this->call(SemanasTableSeeder::class);\n $this->call(PsTableSeeder::class);\n $this->call(MsTableSeeder::class);\n $this->call(CeTableSeeder::class);\n $this->call(CvTableSeeder::class);\n $this->call(PtSeeder::class);\n \n\n Model::unguard();\n }", "public function run() {\n $this->call(UserSeeder::class);\n $this->call(PermissionSeeder::class);\n $this->call(CreateAdminUserSeeder::class);\n // $this->call(PhoneSeeder::class);\n // $this->call(AddressSeeder::class);\n\n $this->call(ContactFormSeeder::class);\n //$this->call(ContactSeeder::class);\n\n User::factory()->count(20)->create()->each(function ($user) {\n // Seed the relation with one address\n $address = Address::factory()->make();\n $user->address()->save($address);\n\n // Seed the relation with one phone\n $phone = Phone::factory()->make();\n $user->phone()->save($phone);\n\n // Seed the relation with 15 contacts\n $contact = Contact::factory()->count(25)->make();\n $user->contacts()->saveMany($contact);\n });\n }", "public function run()\n {\n $this->call(UsersSeeder::class);\n User::factory(2)->create();\n Company::factory(2)->create();\n\n }", "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n Activity::truncate();\n User::truncate();\n DB::statement('SET FOREIGN_KEY_CHECKS=1');\n $this->call(UserTableSeeder::class);\n $this->call(ActivityTableSeeder::class);\n }", "public function run()\n {\n $this->call(CategoriasTableSeeder::class);\n $this->call(UfsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(UserTiposTableSeeder::class);\n factory(App\\User::class, 2)->create();\n/* factory(App\\Models\\Categoria::class, 20)->create();*/\n/* factory(App\\Models\\Anuncio::class, 50)->create();*/\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n \\App\\User::truncate();\n \\App\\Category::truncate();\n \\App\\Product::truncate();\n \\App\\Transaction::truncate();\n DB::table('category_product')->truncate();\n\n \\App\\User::flushEventListeners();\n \\App\\Category::flushEventListeners();\n \\App\\Product::flushEventListeners();\n \\App\\Transaction::flushEventListeners();\n\n\n $usersQuentity = 1000;\n $categoriesQuentity = 30;\n $productsQuentity = 1000;\n $transactionsQuentity = 1000;\n\n factory(\\App\\User::class, $usersQuentity)->create();\n factory(\\App\\Category::class, $categoriesQuentity)->create();\n factory(\\App\\Product::class, $productsQuentity)->create()->each(\n function ($product){\n $categories = \\App\\Category::all()->random(mt_rand(1, 5))->pluck('id');\n\n $product->categories()->attach($categories);\n }\n );\n factory(\\App\\Transaction::class, $transactionsQuentity)->create();\n\n }", "public function run()\n {\n Eloquent::unguard();\n \n $this->call('AdminMemberTableSeeder');\n $this->call('BankInfoTableSeeder');\n $this->call('LocationLookUpTableSeeder');\n $this->call('OrderStatusTableSeeder');\n $this->call('AdminRoleTableSeeder');\n\n }", "public static function setUpBeforeClass()\n {\n parent::setUpBeforeClass();\n $app = require __DIR__ . '/../../bootstrap/app.php';\n /** @var \\Pterodactyl\\Console\\Kernel $kernel */\n $kernel = $app->make(Kernel::class);\n $kernel->bootstrap();\n $kernel->call('migrate:fresh');\n\n \\Artisan::call('db:seed');\n }", "public function run()\n {\n Model::unguard();\n\n if( !User::where('email', '[email protected]')->count() ) {\n User::create([\n 'nombre'=>'Nick'\n ,'apellidos'=>'Palomino'\n ,'email'=>'[email protected]'\n ,'password'=> Hash::make('1234567u')\n ,'celular'=>'966463589'\n ]);\n }\n\n $this->call('CategoriaTableSeeder');\n $this->call('WhateverSeeder');\n $this->call('ProductTableSeeder');\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->call(QuestionTableSeed::class);\n\n $this->call([\n QuestionTableSeed::class,\n AlternativeTableSeed::class,\n ScheduleActionTableSeeder::class,\n UserTableSeeder::class,\n CompanyClassificationTableSeed::class,\n ]);\n // DB::table('clients')->insert([\n // 'name' => 'Empresa-02',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('07.052.477/0001-60'),\n // ]);\n }", "public function run()\n {\n Model::unguard();\n\n $this->command->info('seed start!');\n\n // 省市县\n $this->call('RegionTableSeeder');\n // 用户、角色\n $this->call('UserTableSeeder');\n // 权限\n $this->call('PurviewTableSeeder');\n // 博文分类\n $this->call('CategoryTableSeeder');\n // 博文、评论、标签\n $this->call('ArticleTableSeeder');\n // 心情\n $this->call('MoodTableSeeder');\n // 留言\n $this->call('MessageTableSeeder');\n // 文件\n $this->call('StorageTableSeeder');\n\n $this->command->info('seed end!');\n }", "public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'avatar' => \"avatar\",\n 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi',\n ]);\n $this->call(CategorySeeder::class);\n // \\App\\Models\\Admin::factory(1)->create();\n \\App\\Models\\User::factory(10)->create();\n // \\App\\Models\\Category::factory(50)->create();\n \\App\\Models\\PetComment::factory(50)->create();\n $pets = \\App\\Models\\Pet::factory(50)->create();\n foreach ($pets as $pet) {\n \\App\\Models\\PetTag::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\PetPhotoUrl::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\Order::factory(1)->create(['pet_id' => $pet->id]);\n };\n }", "public function run()\n {\n $this->call(RolesDatabaseSeeder::class);\n $this->call(UsersDatabaseSeeder::class);\n $this->call(LocalesDatabaseSeeder::class);\n $this->call(MainDatabaseSeeder::class);\n }", "public function run()\n {\n\n Schema::disableForeignKeyConstraints(); //in order to execute truncate before seeding\n\n $this->call(UsersTableSeeder::class);\n $this->call(PostCategoriesSeeder::class);\n $this->call(TagsSeeder::class);\n $this->call(PostsSeeder::class);\n\n Schema::enableForeignKeyConstraints();\n\n\n }", "public function run()\n {\n // DB::table('users')->insert([\n // ['id'=>1, 'email'=>'nhat','password'=>bcrypt(1234), 'lever'=>0]\n // ]);\n // $this->call(UsersTableSeeder::class);\n // $this->call(CatTableSeeder::class);\n // $this->call(TypeTableSeeder::class);\n // $this->call(AppTableSeeder::class);\n // $this->call(GameTableSeeder::class);\n \n \n }", "public function run()\n {\n //$this->call(UsersTableSeeder::class);\n $this->call(rootSeed::class);\n factory(App\\Models\\Egresado::class,'hombre',15)->create();\n factory(App\\Models\\Egresado::class,'mujer',15)->create();\n factory(App\\Models\\Administrador::class,5)->create();\n factory(App\\Models\\Notificacion::class,'post',10)->create();\n factory(App\\Models\\Notificacion::class,'mensaje',5)->create();\n factory(App\\Models\\Egresado::class,'bajaM',5)->create();\n factory(App\\Models\\Egresado::class,'bajaF',5)->create();\n factory(App\\Models\\Egresado::class,'suscritam',5)->create();\n factory(App\\Models\\Egresado::class,'suscritaf',5)->create();\n }", "public function run()\n {\n $this->seedUsers();\n $this->seedAdmins();\n $this->seedMeals();\n\n $this->seedOrder();\n $this->seedOrderlist();\n\n $this->seedReload();\n }", "public function run()\n\t{\n\t\t//composer require fzaninotto/faker\n\t\t\n\t\t$this->call(populateAllSeeder::class);\n\t\t\n\t}", "public function run()\n {\n $this->call([\n UserSeeder::class,\n ]);\n\n User::factory(20)->create();\n Author::factory(20)->create();\n Book::factory(60)->create();\n }", "public function run()\n {\n $this->call(CategoryTableSeeder::class);\n $this->call(ProductTableSeeder::class);\n\n \t\t\n\t\t\tDB::table('users')->insert([\n 'first_name' => 'Ignacio',\n 'last_name' => 'Garcia',\n 'email' => '[email protected]',\n 'password' => bcrypt('123456'),\n 'role' => '1',\n 'avatar' => 'CGnABxNYYn8N23RWlvTTP6C2nRjOLTf8IJcbLqRP.jpeg',\n ]);\n }", "public function run()\n {\n Model::unguard();\n\n $faker =Faker\\Factory::create();\n\n // $this->call(UserTableSeeder::class);\n\n $this->seedTasks($faker);\n $this->seedTags($faker);\n\n Model::reguard($faker);\n }", "public function run()\n {\n $this->call(UsersTableSeeder::class);\n\n $categories = factory(App\\Models\\Category::class, 10)->create();\n\n $categories->each(function ($category) {\n $category\n ->posts()\n ->saveMany(\n factory(App\\Models\\Post::class, 3)->make()\n );\n });\n }", "public function run()\n {\n Schema::disableForeignKeyConstraints();\n\n $this->call([\n CountriesSeeder::class,\n ProvincesSeeder::class,\n SettingsSeeder::class,\n AdminsTableSeeder::class,\n ]);\n }" ]
[ "0.8064933", "0.7848158", "0.7674873", "0.724396", "0.7216743", "0.7132209", "0.70970356", "0.70752203", "0.704928", "0.699208", "0.6987078", "0.69839287", "0.6966499", "0.68990964", "0.6868679", "0.68468624", "0.68307716", "0.68206114", "0.6803113", "0.6803113", "0.6801801", "0.6789746", "0.6788733", "0.6788008", "0.6786291", "0.67765796", "0.67742485", "0.677106", "0.67651874", "0.6761959", "0.675823", "0.67337847", "0.6733437", "0.67295784", "0.67290515", "0.6724652", "0.67226326", "0.6722267", "0.6721339", "0.6715842", "0.67070943", "0.67060536", "0.67031103", "0.6702514", "0.6702361", "0.67017967", "0.6695973", "0.6693496", "0.66868156", "0.66837406", "0.6678434", "0.66755766", "0.66726524", "0.666599", "0.664943", "0.6640641", "0.663921", "0.66387916", "0.6636016", "0.6633116", "0.6629787", "0.6627134", "0.6625862", "0.661699", "0.66093796", "0.6602538", "0.65996546", "0.659914", "0.6596484", "0.6596383", "0.65922767", "0.65922284", "0.65913564", "0.65889347", "0.65812707", "0.65811145", "0.6579546", "0.6578819", "0.6575912", "0.65749073", "0.6574314", "0.657148", "0.65696406", "0.6568972", "0.65624833", "0.6560332", "0.6559092", "0.6557491", "0.65555155", "0.6554255", "0.65509576", "0.6548099", "0.65479296", "0.6545845", "0.65443295", "0.65434265", "0.65432936", "0.654295", "0.65426385", "0.6541781", "0.6539325" ]
0.0
-1
Generated from protobuf field float score = 1;
public function getScore() { return $this->score; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setScore($var)\n {\n GPBUtil::checkFloat($var);\n $this->score = $var;\n\n return $this;\n }", "public function setScore($var)\n {\n GPBUtil::checkFloat($var);\n $this->score = $var;\n\n return $this;\n }", "public function getScore() : int{\n return $this->score;\n }", "public function setScore( float $score ) {\n if ($score < 0.0 || $score > 1.0) {\n $score = 1.0;\n }\n\n $this->score = $score;\n return $this;\n }", "public function score(): int;", "public function getScore();", "function score()\r\n {\r\n return $this->Score;\r\n }", "abstract public function score();", "public function getScore(): int\n {\n return $this->score;\n }", "public function getScore()\n {\n }", "public function score()\n {\n $this->score++;\n }", "public function uvScore();", "public function getSpamScore(){\r\n\t\treturn $this->spamScore;\r\n\t}", "public function soundScore();", "public function getScore()\r\n\t{\r\n\t\treturn $this->root->getAttribute('score');\r\n\t}", "public function score()\n {\n return $this->hasOne(Score::class);\n }", "public function getFeedbackScore()\n {\n return $this->feedbackScore;\n }", "public function _getCalculatedScore() {\n\t\treturn $this->_calculatedScore;\n\t}", "public function getMatchedScore(){\n if($this->greScore) return $this->greScore;\n if($this->toeflScore) return $this->toeflScore;\n return false;\n }", "public function getScoreSum()\n\t{\n\t\treturn (float) $this->score_mc + $this->score_case;\n\t}", "function get_weight($score){\n\tswitch($score){\n\t\tcase 1:\n\t\t\treturn 1;\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\treturn 1.3;\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\treturn 1.5;\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\treturn 1.9;\n\t\t\tbreak;\n\t}\n}", "function setScore( &$value )\r\n {\r\n $this->Score = $value;\r\n }", "public function score(float $defaultScore = 1.0): self\n {\n $this->arguments[] = 'SCORE';\n $this->arguments[] = $defaultScore;\n\n return $this;\n }", "public function put_score()\r\n\t\t{\r\n\t\t\t// Scaffolding Code For Single:\r\n\t\t\treturn $this->obj;\r\n\t\t}", "public function addScore($score)\n {\n $this->score += $score;\n }", "function score($array){\n return $array['score'];\n }", "public function saveScore()\n {\n $this->savedScore += $this->score;\n $this->score = 0;\n }", "public function co2Score();", "public function getWeightPercentageForScore( Score $score )\n {\n switch( $score->getMark() )\n {\n case Score::YES:\n case Score::NOT_APPLICABLE: return 100;\n case Score::ACCEPTABLE: return 50;\n case Score::NO: break;\n }\n return 0;\n }", "private function weightScore() {\n $this->maxScore = round($this->maxScore*self::SCORE_WEIGHT); \n }", "public function getMatchedScore()\n {\n if ($this->greScore) {\n return $this->greScore;\n }\n if ($this->toeflScore) {\n return $this->toeflScore;\n }\n\n return false;\n }", "public function UpdateScore() {\n\t\t$this->score = self::ComputeScore( $this->goods, $this->bads );\n\t\t$this->tier = self::GetTier( $this->score );\n\t\treturn $this->score;\n\t}", "public function getMaxScore()\n {\n return $this->result->getMaxScore();\n }", "public function visualScore();", "public function getAccumulatedScore()\n {\n return $this->score;\n }", "public function getAccumulatedScore()\n {\n return $this->score;\n }", "public function getMatchScore()\n\t{\n\t\t$this->_makeRequest(Wp_WhitePages_Model_Api::API_REQUEST_METHOD_MATCHSCORE);\n\t\treturn $this->_result;\n\t}", "public function hasScore(){\n return $this->_has(2);\n }", "public function hasScore(){\n return $this->_has(2);\n }", "public function hasScore(){\n return $this->_has(2);\n }", "protected final function add_score($name, $label=null, $value=null) {\n if ($label === null) {\n $label = get_string(\"score\", \"languagelesson\");\n }\n if (is_int($name)) {\n $name = \"score[$name]\";\n }\n $this->_form->addElement('text', $name, $label, array('size'=>5));\n if ($value !== null) {\n $this->_form->setDefault($name, $value);\n }\n }", "public function iaqScore();", "function scoreMessage( $score ) {\n\n $msg = \"\";\n\n switch ( true ) {\n\n case $score < 30:\n $msg = 'Oh, my! ...';\n break;\n case $score < 50:\n $msg = 'Improvement is needed.';\n break;\n case $score < 70:\n $msg = 'Need a bit more work.';\n break;\n case $score < 80:\n $msg = 'Good!';\n break;\n default:\n $msg = 'Excellent!';\n break;\n\n }\n\n return $msg;\n\n }", "public function currentScore() \n {\n if ($this->hasScore()) {\n return $this->score()->orderBy('created_at', 'DESC')->first()->total;\n }\n\n return 0;\n }", "public function getScorecard()\n {\n return $this->readOneof(3);\n }", "public function luxScore();", "public function hasScore(){\n return $this->_has(3);\n }", "public function hasScore(){\n return $this->_has(3);\n }", "public function getSavedScore()\n {\n return $this->savedScore;\n }", "public function getSavedScore()\n {\n return $this->savedScore;\n }", "protected function score_quiz($score)\n {\n if ($score < 89) {\n $score = 90;\n }\n\n $feedback = [\n [\n 'Since you scored under 75 out of a possible 100, <em>chirotherapy probably isn\\'t for you.</em>',\n 0,\n 75\n ],\n [\n 'Good news! Since you scored between 76 and 100, <em>chirotherapy may help treat your pain!</em>',\n 76,\n 85\n ],\n [\n 'Good news! Since you scored over 89, <em>chirotherapy can definitely help treat your pain!</em>',\n 86,\n 300\n ]\n ];\n\n foreach ($feedback as $key => $value) {\n if ($score >= $value[1] && $score <= $value[2]) {\n return ['score' => $score, 'feedback' => $value[0]];\n }\n }\n }", "public function hasScore(){\n return $this->_has(5);\n }", "public function getScoreCssClass($score = NULL) {\n switch ($score) {\n case SiteAuditCheckBase::AUDIT_CHECK_SCORE_PASS:\n return 'success';\n\n case SiteAuditCheckBase::AUDIT_CHECK_SCORE_WARN:\n return 'warning';\n\n case SiteAuditCheckBase::AUDIT_CHECK_SCORE_INFO:\n return 'info';\n\n default:\n return 'danger';\n\n }\n }", "public function saveScore()\n {\n $this->savedScore += $this->score;\n $this->score = 0;\n $this->points -= 5;\n }", "public function _getMaxScore() {\n\t\treturn $this->_maxScore;\n\t}", "public function minScore(float $score): self\n\t{\n\t\t$this->minScore = $score;\n\n\t\treturn $this;\n\t}", "private function scoreValue($scores,$value){\r\n\t\tif($value==0) return 0;\r\n\t\tif($value > sizeof($scores)) throw new Exception(\"Invalid index\");\r\n\t\treturn $scores[$value-1];\r\n\t}", "public function getScores() {\n\t\treturn $this->scores;\n\t}", "public function get_scores() {\n return $this->pascores;\n }", "public function get_score_min()\n\t{\n\t\treturn $this->score_min;\n\t}", "public function vocScore();", "public function __construct($score = 0, $setName = \"player1\")\n {\n $this->score = $score;\n $this->name = $setName;\n }", "public function scoreField(string $scoreAttribute): self\n {\n $this->arguments[] = 'SCORE_FIELD';\n $this->arguments[] = $scoreAttribute;\n\n return $this;\n }", "private function score_family_health(){\r\n\t\t$data=$this->data['family_health'];\r\n\t\t$q10=0;\r\n\t\tfor ($x = 1; $x <= 6; $x++){\r\n\t\t\tif($data[\"q10_\".$x] == 0) continue;\r\n\t\t\tif($data[\"q10_\".$x] == 2) continue;\r\n\t\t\t$q10++;\r\n\t\t}\r\n\t\tif ($q10 > 4) $q10=1;\r\n\t\telse if\t($q10 == 4) $q10 = 2;\r\n\t\telse if ($q10 == 3) $q10 = 3;\r\n\t\telse if ($q10 == 2) $q10 = 4;\r\n\t\telse if ($q10 == 1) $q10 = 4;\r\n\t\telse if ($q10 == 0) $q10 = 5;\r\n\t\telse $q10 = 0;\r\n\t\t\r\n\t\t$ob=new stdClass();\r\n\t\t$ob->total=$q10;\r\n\t\t$ob->data=array('q10'=>array($q10,1,$q10));\r\n\t\treturn $ob;\r\n\t}", "public function matchScore(\\Jazzee\\Entity\\Answer $answer)\n {\n if ($answer->getPageStatus() == self::SKIPPED) {\n return;\n }\n if (!is_null($answer->getGREScore()) and !is_null($answer->getTOEFLScore())) {\n return; //we already have a match\n }\n $testType = $this->_applicationPage->getPage()->getElementByFixedId(self::FID_TEST_TYPE)->getJazzeeElement()->displayValue($answer);\n $registrationNumber = $this->_applicationPage->getPage()->getElementByFixedId(self::FID_REGISTRATION_NUMBER)->getJazzeeElement()->displayValue($answer);\n $testDate = $this->_applicationPage->getPage()->getElementByFixedId(self::FID_TEST_DATE)->getJazzeeElement()->formValue($answer);\n $testMonth = date('m', strtotime($testDate));\n $testYear = date('Y', strtotime($testDate));\n\n $parameters = array(\n 'registrationNumber' => $registrationNumber,\n 'testMonth' => $testMonth,\n 'testYear' => $testYear\n );\n switch ($testType) {\n case 'GRE/GRE Subject':\n $score = $this->_controller->getEntityManager()->getRepository('\\Jazzee\\Entity\\GREScore')->findOneBy($parameters);\n if ($score) {\n $answer->setGreScore($score);\n }\n break;\n case 'TOEFL':\n $score = $this->_controller->getEntityManager()->getRepository('\\Jazzee\\Entity\\TOEFLScore')->findOneBy($parameters);\n if ($score) {\n $answer->setTOEFLScore($score);\n }\n break;\n default:\n throw new \\Jazzee\\Exception(\"Unknown test type: {$testType} when trying to match a score\");\n }\n }", "function updateScore(Player $player, int $points)\n{\n $score = $player->getScore();\n $player->setScore($score + $points);\n}", "public function getScoreList() {\n return $this->scoreList;\n }", "public function getCoverageScore()\n {\n return $this->coverage_score;\n }", "public function getExperienceScore()\n\t{\n\t\treturn $this->experience_score;\n\t}", "function fiftyone_degrees_get_score(\n $node_offset,\n $useragent_bytes,\n $lowest_score,\n $headers) {\n\n $score = 0;\n $node = fiftyone_degrees_read_node($node_offset, $headers);\n $node_characters = fiftyone_degrees_get_node_characters($node, $headers);\n $node_index = count($node_characters) - 1;\n\n $target_index\n = $node['position'] + fiftyone_degrees_get_node_length($node, $headers);\n\n // Adjust the score and indexes if the node is too long.\n $useragent_length = count($useragent_bytes);\n if ($target_index >= $useragent_length) {\n $score = $target_index - $useragent_length;\n $node_index -= $score;\n $target_index = $useragent_length - 1;\n }\n\n while ($node_index >= 0 && $score < $lowest_score) {\n $difference = abs(\n $useragent_bytes[$target_index] - $node_characters[$node_index]);\n if ($difference != 0) {\n $numeric_difference = fiftyone_degrees_get_numeric_difference(\n $node_characters,\n $useragent_bytes,\n $node_index,\n $target_index);\n if ($numeric_difference != 0)\n $score += $numeric_difference;\n else\n $score += $difference;\n }\n $node_index--;\n $target_index--;\n }\n return $score;\n}", "public function getMinimumFeedbackScore()\n {\n return $this->minimumFeedbackScore;\n }", "function getScore($weight_adjusted = TRUE) {\n if ($this->is_skipped) {\n return 0;\n }\n if (!isset($this->score)) {\n $this->score = $this->score();\n }\n if (isset($this->question->score_weight) && $weight_adjusted) {\n return round($this->score * $this->question->score_weight);\n }\n return $this->score;\n }", "public function getScore() \n\t{\n\t\t$sql = 'SELECT COUNT(*) as nb, SUM(score) as total, MAX(SCORE) as max FROM '.$this->progressTable;\n\t\t$query = $this->db->query($sql, array());\n\t\treturn $query->row(); \n\t}", "function compare_scores($score1, $score2){\r\n return bccomp($score1['finger_counter_count'], $score2['finger_counter_count']);\r\n return ($score1 > $score2) ? -1 : 1;\r\n }", "protected function _grade($score)\n\t{\n\t\tforeach ($this->grades as $max => $grade)\n\t\t{\n\t\t\tif ($max === 'default')\n\t\t\t\tcontinue;\n\n\t\t\tif ($score <= $max)\n\t\t\t\treturn $grade;\n\t\t}\n\n\t\treturn $this->grades['default'];\n\t}", "protected function getScoreFromContent($nodeName) {\n\t\t$score = 0.0;\n\t\t$scoreMatches \t= array();\n\t\tpreg_match('~(?<score>[0-9]*\\.[^ ]*)~',$nodeName,$scoreMatches);\n\t\tif(isset($scoreMatches['score']) && (float) $scoreMatches['score'] > 0) {\n\t\t\t$score = (float) $scoreMatches['score'];\n\t\t}\n\n\t\treturn $score;\n\t}", "public function testScore()\n {\n $value = mt_rand(1, 100);\n $comparisonValue = mt_rand(1, 100);\n $expected = [\n ComparisonFactor::EQUAL => ($value == $comparisonValue),\n ComparisonFactor::IDENTICAL => ($value === $comparisonValue),\n ComparisonFactor::NOT_EQUAL => ($value != $comparisonValue),\n ComparisonFactor::NOT_EQUAL_ALT => ($value <> $comparisonValue),\n ComparisonFactor::NOT_IDENTICAL => ($value !== $comparisonValue),\n ComparisonFactor::GREATER_THAN => ($value > $comparisonValue),\n ComparisonFactor::GREATER_THAN_OR_EQUAL_TO => ($value >= $comparisonValue),\n ComparisonFactor::LESS_THAN => ($value < $comparisonValue),\n ComparisonFactor::LESS_THAN_OR_EQUAL_TO => ($value <= $comparisonValue),\n ];\n foreach ($expected as $operator => $result) {\n $factor = new ComparisonFactor($comparisonValue, $operator);\n $this->assertEquals($result, $factor->score($value));\n }\n }", "protected function getScore(User $user)\n {\n \n // Get score\n $score = $this->scores[$user->getUserId()];\n \n // Add shot accuracy\n if (0 < $score['shots']) {\n $score['accuracy'] = ($score['score'] / $score['shots']) * 100;\n } else {\n $score['accuracy'] = 0;\n }\n \n return $score;\n \n }", "function processScore($dbanswers, $useranswers){\n $total_questions = sizeof($dbanswers);\n $total_correct = getNumCorrect($dbanswers, $useranswers);\n \n //Calculate score to 0 decimal places\n if($total_questions === 0){\n return 0;\n } else {\n return floor($total_correct / $total_questions * 100);\n }\n }", "function setScore($amount = 0)\n\t{\n\t\treturn $this->score += $amount;\n\t}", "public function get_scores()\n {\n return [\n 'team1' => $this->score_team_1,\n 'team2' => $this->score_team_2\n ];\n }", "public function getFullScore() : string\n {\n return sprintf('%d - %d', $this->score->get('home'), $this->score->get('away'));\n }", "function add_score($name, $score){\n\t$result = array();\n\t\n\t$sql = new LocalDao();\n\ttry{\n\t\t$sql->add_score($name, $score);\n\t\t$result['add'] = true;\n\t}\n\tcatch(DaoException $exception){\n\t\t$result['add'] = false;\n\t\t$errors = $exception->getErroArray();\n\t\t$result['error'] = $errors[2];\n\n\t}\n\t\n\tdie(json_encode($result));\n}", "public function getMutationScoreIndicator(): float\n {\n return $this->getCalculator()->getMutationScoreIndicator();\n }", "public function testSetScore()\n {\n $controller = new Player(\"test\", \"player\");\n $this->assertInstanceOf(\"\\Jeso20\\Game\\Player\", $controller);\n\n $controller->setScore(\"One pair\", 12);\n $controller->setScore(\"One pair\", 12);\n $exp = [\"One pair\" => 12];\n $sum = $controller->getCombinations();\n $this->assertEquals($exp, $sum);\n }", "function Point($score){\n if($score < 40){\n $pt = 0;\n }elseif ($score >=40 && $score < 45) {\n $pt = 2;\n }\n elseif ($score >=45 && $score < 50) {\n $pt = 2.25;\n }\n elseif ($score >=50 && $score < 55) {\n $pt = 2.50;\n }\n elseif ($score >=55 && $score < 60) {\n $pt = 2.75;\n }\n elseif ($score >=60 && $score < 65) {\n $pt = 3.0;\n }\n elseif ($score >=65 && $score < 70) {\n $pt = 3.25;\n }\n elseif ($score >=70 && $score < 75) {\n $pt = 3.50;\n }\n elseif ($score >=75 && $score < 100) {\n $pt = 4;\n }else{\n $pt = 0;\n }\n return $pt;\n}", "function getScoreText($a_score)\n\t{\n\t\tglobal $lng;\n\n\t\t$t = \"\";\n\t\tswitch($a_score)\n\t\t{\n\t\t\tcase self::SCORE_NOT_SCORED:\n\t\t\t\t$t = $lng->txt(\"adn_not_scored\");\n\t\t\t\tbreak;\n\t\t\tcase self::SCORE_FAILED:\n\t\t\t\t$t = $lng->txt(\"adn_failed\");\n\t\t\t\tbreak;\n\t\t\tcase self::SCORE_PASSED:\n\t\t\t\t$t = $lng->txt(\"adn_passed\");\n\t\t\t\tbreak;\n\t\t\tcase self::SCORE_FAILED_SUM:\n\t\t\t\t$t = $lng->txt('adn_failed_sum');\n\t\t\t\tbreak;\n\t\t}\n\t\treturn $t;\n\t}", "public function getSumScore() {\n\t\treturn $this->sumScore;\n\t}", "function promoteScoreToBGAScore() {\n \n // If team game, add the score of the teammate first\n if (self::decodeGameType(self::getGameStateValue('game_type')) == 'team') {\n self::DbQuery(\"\n UPDATE\n player AS a\n LEFT JOIN (\n SELECT\n player_team, SUM(player_innovation_score) AS team_score\n FROM\n player\n GROUP BY\n player_team\n \n ) AS b ON a.player_team = b.player_team\n SET\n a.player_innovation_score = b.team_score\n \");\n }\n \n self::DbQuery(\"\n UPDATE\n player\n SET\n player_score_aux = player_score,\n player_score = player_innovation_score\n \");\n }", "function showScore()\n\t{\n\t\treturn '\n\t\t<input type=\"hidden\" id=\"score_'.$this->i.'\" value=\"'.$this->score.'\"/> \n\t\t<input type=\"hidden\" id=\"ups_'.$this->i.'\" value=\"'.$this->ups.'\"/> \n\t\t<input type=\"hidden\" id=\"downs_'.$this->i.'\" value=\"'.$this->downs.'\"/> \n\t\t<center> '\n . $this->score . \"[\" . $this->ups . \"/\" . $this->downs . \"]\" . '<br />\n\t\t</center>\n\t\t';\n\t}", "protected function feedback()\n\t{\n\t\tif ($this->store['feedback_percent'] == 0) {\n\t\t\treturn;\n\t\t}\n\t\t$feedback = $this->store['feedback'] * $this->config->data()['feedback'];\n\t\t$feedbackPercent = ($this->store['feedback_percent'] / $this->config->data()['feedbackPercent']);\n\t\t$score = round($feedback / $feedbackPercent);\n\t\t$this->score += $score;\n\t}", "public function getScoreFromRule() {\n\t\treturn $this->getScoreFromRuleInternal($this->registration->competition->rule, false);\n\t}", "public function getMutationScoreIndicator(): float\n {\n $detectionRateAll = 0;\n $defeatedTotal = $this->killedCount + $this->timedOutCount + $this->errorCount;\n\n if ($this->totalMutantsCount) {\n $detectionRateAll = floor(100 * $defeatedTotal / $this->totalMutantsCount);\n }\n\n return $detectionRateAll;\n }", "function section_score_composite_header($score, $scoring = 'score')\n {\n if($scoring == 'percentile') {\n return 'Your Percentile: '.str_ordinal($score);\n }\n\n return 'Your Score: '.$score;\n }", "protected function setProbability($identifier,$score){\n\t\tif($score < 0) {\n\t\t\t$score = 0;\n\t\t}\n\t\t$expiresAt = Carbon::now()->addDays($this->ci->config['captcha.probability.saveDays']);\n\t\treturn $this->ci->cache->put($this->cachePrefix . $identifier,$score,$expiresAt);\n\t}", "public function addScore($score = 10)\n {\n return DB::table('scores')->insert([\n 'user_id' => Auth::user()->id,\n 'score' => $score,\n 'current_page' => 2,\n 'created_at' => date('Y-m-d H:i:s')\n ]);\n }", "public function get_quality_scores()\n\t{\n\t\treturn $this->quality_scores;\n\t}" ]
[ "0.7095722", "0.7095722", "0.67662615", "0.67303276", "0.6714648", "0.6710551", "0.67060196", "0.65232396", "0.6488983", "0.6413199", "0.64010215", "0.6375659", "0.6287169", "0.6229824", "0.6150764", "0.61242944", "0.609062", "0.6087809", "0.6084411", "0.60800546", "0.60193485", "0.5977077", "0.5972438", "0.5953636", "0.5937487", "0.59327483", "0.5859202", "0.58375436", "0.5836063", "0.582178", "0.5813276", "0.57940793", "0.5768658", "0.5767177", "0.5756968", "0.5756968", "0.5733503", "0.57180196", "0.57180196", "0.57180196", "0.5677124", "0.56640744", "0.5658256", "0.56520617", "0.5647432", "0.5628162", "0.5626263", "0.5626263", "0.5625977", "0.5625977", "0.55991644", "0.55772233", "0.5561299", "0.5553585", "0.54993993", "0.5474444", "0.54671663", "0.545396", "0.54462683", "0.54379225", "0.5416884", "0.54130465", "0.5390952", "0.53856176", "0.53549385", "0.5349489", "0.53335536", "0.53256184", "0.53180593", "0.5313281", "0.5308183", "0.53056735", "0.5302104", "0.53014266", "0.5294943", "0.5289505", "0.5267565", "0.5265747", "0.5233366", "0.52317303", "0.5226039", "0.5219756", "0.5217979", "0.5216907", "0.5216385", "0.5212574", "0.5203867", "0.5190238", "0.5186965", "0.51850766", "0.5184161", "0.5171876", "0.5161928", "0.51541793", "0.51534575", "0.5149792", "0.51489794" ]
0.6787265
5
Generated from protobuf field float score = 1;
public function setScore($var) { GPBUtil::checkFloat($var); $this->score = $var; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getScore()\n {\n return $this->score;\n }", "public function getScore()\n {\n return $this->score;\n }", "public function getScore()\n {\n return $this->score;\n }", "public function getScore()\n {\n return $this->score;\n }", "public function getScore() : int{\n return $this->score;\n }", "public function setScore( float $score ) {\n if ($score < 0.0 || $score > 1.0) {\n $score = 1.0;\n }\n\n $this->score = $score;\n return $this;\n }", "public function score(): int;", "public function getScore();", "function score()\r\n {\r\n return $this->Score;\r\n }", "abstract public function score();", "public function getScore(): int\n {\n return $this->score;\n }", "public function getScore()\n {\n }", "public function score()\n {\n $this->score++;\n }", "public function uvScore();", "public function getSpamScore(){\r\n\t\treturn $this->spamScore;\r\n\t}", "public function soundScore();", "public function getScore()\r\n\t{\r\n\t\treturn $this->root->getAttribute('score');\r\n\t}", "public function score()\n {\n return $this->hasOne(Score::class);\n }", "public function getFeedbackScore()\n {\n return $this->feedbackScore;\n }", "public function _getCalculatedScore() {\n\t\treturn $this->_calculatedScore;\n\t}", "public function getMatchedScore(){\n if($this->greScore) return $this->greScore;\n if($this->toeflScore) return $this->toeflScore;\n return false;\n }", "public function getScoreSum()\n\t{\n\t\treturn (float) $this->score_mc + $this->score_case;\n\t}", "function get_weight($score){\n\tswitch($score){\n\t\tcase 1:\n\t\t\treturn 1;\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\treturn 1.3;\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\treturn 1.5;\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\treturn 1.9;\n\t\t\tbreak;\n\t}\n}", "function setScore( &$value )\r\n {\r\n $this->Score = $value;\r\n }", "public function score(float $defaultScore = 1.0): self\n {\n $this->arguments[] = 'SCORE';\n $this->arguments[] = $defaultScore;\n\n return $this;\n }", "public function put_score()\r\n\t\t{\r\n\t\t\t// Scaffolding Code For Single:\r\n\t\t\treturn $this->obj;\r\n\t\t}", "public function addScore($score)\n {\n $this->score += $score;\n }", "function score($array){\n return $array['score'];\n }", "public function saveScore()\n {\n $this->savedScore += $this->score;\n $this->score = 0;\n }", "public function co2Score();", "public function getWeightPercentageForScore( Score $score )\n {\n switch( $score->getMark() )\n {\n case Score::YES:\n case Score::NOT_APPLICABLE: return 100;\n case Score::ACCEPTABLE: return 50;\n case Score::NO: break;\n }\n return 0;\n }", "private function weightScore() {\n $this->maxScore = round($this->maxScore*self::SCORE_WEIGHT); \n }", "public function getMatchedScore()\n {\n if ($this->greScore) {\n return $this->greScore;\n }\n if ($this->toeflScore) {\n return $this->toeflScore;\n }\n\n return false;\n }", "public function UpdateScore() {\n\t\t$this->score = self::ComputeScore( $this->goods, $this->bads );\n\t\t$this->tier = self::GetTier( $this->score );\n\t\treturn $this->score;\n\t}", "public function getMaxScore()\n {\n return $this->result->getMaxScore();\n }", "public function visualScore();", "public function getAccumulatedScore()\n {\n return $this->score;\n }", "public function getAccumulatedScore()\n {\n return $this->score;\n }", "public function getMatchScore()\n\t{\n\t\t$this->_makeRequest(Wp_WhitePages_Model_Api::API_REQUEST_METHOD_MATCHSCORE);\n\t\treturn $this->_result;\n\t}", "public function hasScore(){\n return $this->_has(2);\n }", "public function hasScore(){\n return $this->_has(2);\n }", "public function hasScore(){\n return $this->_has(2);\n }", "protected final function add_score($name, $label=null, $value=null) {\n if ($label === null) {\n $label = get_string(\"score\", \"languagelesson\");\n }\n if (is_int($name)) {\n $name = \"score[$name]\";\n }\n $this->_form->addElement('text', $name, $label, array('size'=>5));\n if ($value !== null) {\n $this->_form->setDefault($name, $value);\n }\n }", "public function iaqScore();", "function scoreMessage( $score ) {\n\n $msg = \"\";\n\n switch ( true ) {\n\n case $score < 30:\n $msg = 'Oh, my! ...';\n break;\n case $score < 50:\n $msg = 'Improvement is needed.';\n break;\n case $score < 70:\n $msg = 'Need a bit more work.';\n break;\n case $score < 80:\n $msg = 'Good!';\n break;\n default:\n $msg = 'Excellent!';\n break;\n\n }\n\n return $msg;\n\n }", "public function currentScore() \n {\n if ($this->hasScore()) {\n return $this->score()->orderBy('created_at', 'DESC')->first()->total;\n }\n\n return 0;\n }", "public function getScorecard()\n {\n return $this->readOneof(3);\n }", "public function luxScore();", "public function hasScore(){\n return $this->_has(3);\n }", "public function hasScore(){\n return $this->_has(3);\n }", "public function getSavedScore()\n {\n return $this->savedScore;\n }", "public function getSavedScore()\n {\n return $this->savedScore;\n }", "protected function score_quiz($score)\n {\n if ($score < 89) {\n $score = 90;\n }\n\n $feedback = [\n [\n 'Since you scored under 75 out of a possible 100, <em>chirotherapy probably isn\\'t for you.</em>',\n 0,\n 75\n ],\n [\n 'Good news! Since you scored between 76 and 100, <em>chirotherapy may help treat your pain!</em>',\n 76,\n 85\n ],\n [\n 'Good news! Since you scored over 89, <em>chirotherapy can definitely help treat your pain!</em>',\n 86,\n 300\n ]\n ];\n\n foreach ($feedback as $key => $value) {\n if ($score >= $value[1] && $score <= $value[2]) {\n return ['score' => $score, 'feedback' => $value[0]];\n }\n }\n }", "public function hasScore(){\n return $this->_has(5);\n }", "public function getScoreCssClass($score = NULL) {\n switch ($score) {\n case SiteAuditCheckBase::AUDIT_CHECK_SCORE_PASS:\n return 'success';\n\n case SiteAuditCheckBase::AUDIT_CHECK_SCORE_WARN:\n return 'warning';\n\n case SiteAuditCheckBase::AUDIT_CHECK_SCORE_INFO:\n return 'info';\n\n default:\n return 'danger';\n\n }\n }", "public function saveScore()\n {\n $this->savedScore += $this->score;\n $this->score = 0;\n $this->points -= 5;\n }", "public function _getMaxScore() {\n\t\treturn $this->_maxScore;\n\t}", "public function minScore(float $score): self\n\t{\n\t\t$this->minScore = $score;\n\n\t\treturn $this;\n\t}", "private function scoreValue($scores,$value){\r\n\t\tif($value==0) return 0;\r\n\t\tif($value > sizeof($scores)) throw new Exception(\"Invalid index\");\r\n\t\treturn $scores[$value-1];\r\n\t}", "public function getScores() {\n\t\treturn $this->scores;\n\t}", "public function get_scores() {\n return $this->pascores;\n }", "public function get_score_min()\n\t{\n\t\treturn $this->score_min;\n\t}", "public function vocScore();", "public function __construct($score = 0, $setName = \"player1\")\n {\n $this->score = $score;\n $this->name = $setName;\n }", "public function scoreField(string $scoreAttribute): self\n {\n $this->arguments[] = 'SCORE_FIELD';\n $this->arguments[] = $scoreAttribute;\n\n return $this;\n }", "private function score_family_health(){\r\n\t\t$data=$this->data['family_health'];\r\n\t\t$q10=0;\r\n\t\tfor ($x = 1; $x <= 6; $x++){\r\n\t\t\tif($data[\"q10_\".$x] == 0) continue;\r\n\t\t\tif($data[\"q10_\".$x] == 2) continue;\r\n\t\t\t$q10++;\r\n\t\t}\r\n\t\tif ($q10 > 4) $q10=1;\r\n\t\telse if\t($q10 == 4) $q10 = 2;\r\n\t\telse if ($q10 == 3) $q10 = 3;\r\n\t\telse if ($q10 == 2) $q10 = 4;\r\n\t\telse if ($q10 == 1) $q10 = 4;\r\n\t\telse if ($q10 == 0) $q10 = 5;\r\n\t\telse $q10 = 0;\r\n\t\t\r\n\t\t$ob=new stdClass();\r\n\t\t$ob->total=$q10;\r\n\t\t$ob->data=array('q10'=>array($q10,1,$q10));\r\n\t\treturn $ob;\r\n\t}", "public function matchScore(\\Jazzee\\Entity\\Answer $answer)\n {\n if ($answer->getPageStatus() == self::SKIPPED) {\n return;\n }\n if (!is_null($answer->getGREScore()) and !is_null($answer->getTOEFLScore())) {\n return; //we already have a match\n }\n $testType = $this->_applicationPage->getPage()->getElementByFixedId(self::FID_TEST_TYPE)->getJazzeeElement()->displayValue($answer);\n $registrationNumber = $this->_applicationPage->getPage()->getElementByFixedId(self::FID_REGISTRATION_NUMBER)->getJazzeeElement()->displayValue($answer);\n $testDate = $this->_applicationPage->getPage()->getElementByFixedId(self::FID_TEST_DATE)->getJazzeeElement()->formValue($answer);\n $testMonth = date('m', strtotime($testDate));\n $testYear = date('Y', strtotime($testDate));\n\n $parameters = array(\n 'registrationNumber' => $registrationNumber,\n 'testMonth' => $testMonth,\n 'testYear' => $testYear\n );\n switch ($testType) {\n case 'GRE/GRE Subject':\n $score = $this->_controller->getEntityManager()->getRepository('\\Jazzee\\Entity\\GREScore')->findOneBy($parameters);\n if ($score) {\n $answer->setGreScore($score);\n }\n break;\n case 'TOEFL':\n $score = $this->_controller->getEntityManager()->getRepository('\\Jazzee\\Entity\\TOEFLScore')->findOneBy($parameters);\n if ($score) {\n $answer->setTOEFLScore($score);\n }\n break;\n default:\n throw new \\Jazzee\\Exception(\"Unknown test type: {$testType} when trying to match a score\");\n }\n }", "function updateScore(Player $player, int $points)\n{\n $score = $player->getScore();\n $player->setScore($score + $points);\n}", "public function getScoreList() {\n return $this->scoreList;\n }", "public function getCoverageScore()\n {\n return $this->coverage_score;\n }", "public function getExperienceScore()\n\t{\n\t\treturn $this->experience_score;\n\t}", "function fiftyone_degrees_get_score(\n $node_offset,\n $useragent_bytes,\n $lowest_score,\n $headers) {\n\n $score = 0;\n $node = fiftyone_degrees_read_node($node_offset, $headers);\n $node_characters = fiftyone_degrees_get_node_characters($node, $headers);\n $node_index = count($node_characters) - 1;\n\n $target_index\n = $node['position'] + fiftyone_degrees_get_node_length($node, $headers);\n\n // Adjust the score and indexes if the node is too long.\n $useragent_length = count($useragent_bytes);\n if ($target_index >= $useragent_length) {\n $score = $target_index - $useragent_length;\n $node_index -= $score;\n $target_index = $useragent_length - 1;\n }\n\n while ($node_index >= 0 && $score < $lowest_score) {\n $difference = abs(\n $useragent_bytes[$target_index] - $node_characters[$node_index]);\n if ($difference != 0) {\n $numeric_difference = fiftyone_degrees_get_numeric_difference(\n $node_characters,\n $useragent_bytes,\n $node_index,\n $target_index);\n if ($numeric_difference != 0)\n $score += $numeric_difference;\n else\n $score += $difference;\n }\n $node_index--;\n $target_index--;\n }\n return $score;\n}", "public function getMinimumFeedbackScore()\n {\n return $this->minimumFeedbackScore;\n }", "function getScore($weight_adjusted = TRUE) {\n if ($this->is_skipped) {\n return 0;\n }\n if (!isset($this->score)) {\n $this->score = $this->score();\n }\n if (isset($this->question->score_weight) && $weight_adjusted) {\n return round($this->score * $this->question->score_weight);\n }\n return $this->score;\n }", "public function getScore() \n\t{\n\t\t$sql = 'SELECT COUNT(*) as nb, SUM(score) as total, MAX(SCORE) as max FROM '.$this->progressTable;\n\t\t$query = $this->db->query($sql, array());\n\t\treturn $query->row(); \n\t}", "function compare_scores($score1, $score2){\r\n return bccomp($score1['finger_counter_count'], $score2['finger_counter_count']);\r\n return ($score1 > $score2) ? -1 : 1;\r\n }", "protected function _grade($score)\n\t{\n\t\tforeach ($this->grades as $max => $grade)\n\t\t{\n\t\t\tif ($max === 'default')\n\t\t\t\tcontinue;\n\n\t\t\tif ($score <= $max)\n\t\t\t\treturn $grade;\n\t\t}\n\n\t\treturn $this->grades['default'];\n\t}", "protected function getScoreFromContent($nodeName) {\n\t\t$score = 0.0;\n\t\t$scoreMatches \t= array();\n\t\tpreg_match('~(?<score>[0-9]*\\.[^ ]*)~',$nodeName,$scoreMatches);\n\t\tif(isset($scoreMatches['score']) && (float) $scoreMatches['score'] > 0) {\n\t\t\t$score = (float) $scoreMatches['score'];\n\t\t}\n\n\t\treturn $score;\n\t}", "public function testScore()\n {\n $value = mt_rand(1, 100);\n $comparisonValue = mt_rand(1, 100);\n $expected = [\n ComparisonFactor::EQUAL => ($value == $comparisonValue),\n ComparisonFactor::IDENTICAL => ($value === $comparisonValue),\n ComparisonFactor::NOT_EQUAL => ($value != $comparisonValue),\n ComparisonFactor::NOT_EQUAL_ALT => ($value <> $comparisonValue),\n ComparisonFactor::NOT_IDENTICAL => ($value !== $comparisonValue),\n ComparisonFactor::GREATER_THAN => ($value > $comparisonValue),\n ComparisonFactor::GREATER_THAN_OR_EQUAL_TO => ($value >= $comparisonValue),\n ComparisonFactor::LESS_THAN => ($value < $comparisonValue),\n ComparisonFactor::LESS_THAN_OR_EQUAL_TO => ($value <= $comparisonValue),\n ];\n foreach ($expected as $operator => $result) {\n $factor = new ComparisonFactor($comparisonValue, $operator);\n $this->assertEquals($result, $factor->score($value));\n }\n }", "protected function getScore(User $user)\n {\n \n // Get score\n $score = $this->scores[$user->getUserId()];\n \n // Add shot accuracy\n if (0 < $score['shots']) {\n $score['accuracy'] = ($score['score'] / $score['shots']) * 100;\n } else {\n $score['accuracy'] = 0;\n }\n \n return $score;\n \n }", "function processScore($dbanswers, $useranswers){\n $total_questions = sizeof($dbanswers);\n $total_correct = getNumCorrect($dbanswers, $useranswers);\n \n //Calculate score to 0 decimal places\n if($total_questions === 0){\n return 0;\n } else {\n return floor($total_correct / $total_questions * 100);\n }\n }", "function setScore($amount = 0)\n\t{\n\t\treturn $this->score += $amount;\n\t}", "public function get_scores()\n {\n return [\n 'team1' => $this->score_team_1,\n 'team2' => $this->score_team_2\n ];\n }", "public function getFullScore() : string\n {\n return sprintf('%d - %d', $this->score->get('home'), $this->score->get('away'));\n }", "function add_score($name, $score){\n\t$result = array();\n\t\n\t$sql = new LocalDao();\n\ttry{\n\t\t$sql->add_score($name, $score);\n\t\t$result['add'] = true;\n\t}\n\tcatch(DaoException $exception){\n\t\t$result['add'] = false;\n\t\t$errors = $exception->getErroArray();\n\t\t$result['error'] = $errors[2];\n\n\t}\n\t\n\tdie(json_encode($result));\n}", "public function getMutationScoreIndicator(): float\n {\n return $this->getCalculator()->getMutationScoreIndicator();\n }", "public function testSetScore()\n {\n $controller = new Player(\"test\", \"player\");\n $this->assertInstanceOf(\"\\Jeso20\\Game\\Player\", $controller);\n\n $controller->setScore(\"One pair\", 12);\n $controller->setScore(\"One pair\", 12);\n $exp = [\"One pair\" => 12];\n $sum = $controller->getCombinations();\n $this->assertEquals($exp, $sum);\n }", "function Point($score){\n if($score < 40){\n $pt = 0;\n }elseif ($score >=40 && $score < 45) {\n $pt = 2;\n }\n elseif ($score >=45 && $score < 50) {\n $pt = 2.25;\n }\n elseif ($score >=50 && $score < 55) {\n $pt = 2.50;\n }\n elseif ($score >=55 && $score < 60) {\n $pt = 2.75;\n }\n elseif ($score >=60 && $score < 65) {\n $pt = 3.0;\n }\n elseif ($score >=65 && $score < 70) {\n $pt = 3.25;\n }\n elseif ($score >=70 && $score < 75) {\n $pt = 3.50;\n }\n elseif ($score >=75 && $score < 100) {\n $pt = 4;\n }else{\n $pt = 0;\n }\n return $pt;\n}", "function getScoreText($a_score)\n\t{\n\t\tglobal $lng;\n\n\t\t$t = \"\";\n\t\tswitch($a_score)\n\t\t{\n\t\t\tcase self::SCORE_NOT_SCORED:\n\t\t\t\t$t = $lng->txt(\"adn_not_scored\");\n\t\t\t\tbreak;\n\t\t\tcase self::SCORE_FAILED:\n\t\t\t\t$t = $lng->txt(\"adn_failed\");\n\t\t\t\tbreak;\n\t\t\tcase self::SCORE_PASSED:\n\t\t\t\t$t = $lng->txt(\"adn_passed\");\n\t\t\t\tbreak;\n\t\t\tcase self::SCORE_FAILED_SUM:\n\t\t\t\t$t = $lng->txt('adn_failed_sum');\n\t\t\t\tbreak;\n\t\t}\n\t\treturn $t;\n\t}", "public function getSumScore() {\n\t\treturn $this->sumScore;\n\t}", "function promoteScoreToBGAScore() {\n \n // If team game, add the score of the teammate first\n if (self::decodeGameType(self::getGameStateValue('game_type')) == 'team') {\n self::DbQuery(\"\n UPDATE\n player AS a\n LEFT JOIN (\n SELECT\n player_team, SUM(player_innovation_score) AS team_score\n FROM\n player\n GROUP BY\n player_team\n \n ) AS b ON a.player_team = b.player_team\n SET\n a.player_innovation_score = b.team_score\n \");\n }\n \n self::DbQuery(\"\n UPDATE\n player\n SET\n player_score_aux = player_score,\n player_score = player_innovation_score\n \");\n }", "function showScore()\n\t{\n\t\treturn '\n\t\t<input type=\"hidden\" id=\"score_'.$this->i.'\" value=\"'.$this->score.'\"/> \n\t\t<input type=\"hidden\" id=\"ups_'.$this->i.'\" value=\"'.$this->ups.'\"/> \n\t\t<input type=\"hidden\" id=\"downs_'.$this->i.'\" value=\"'.$this->downs.'\"/> \n\t\t<center> '\n . $this->score . \"[\" . $this->ups . \"/\" . $this->downs . \"]\" . '<br />\n\t\t</center>\n\t\t';\n\t}", "protected function feedback()\n\t{\n\t\tif ($this->store['feedback_percent'] == 0) {\n\t\t\treturn;\n\t\t}\n\t\t$feedback = $this->store['feedback'] * $this->config->data()['feedback'];\n\t\t$feedbackPercent = ($this->store['feedback_percent'] / $this->config->data()['feedbackPercent']);\n\t\t$score = round($feedback / $feedbackPercent);\n\t\t$this->score += $score;\n\t}", "public function getScoreFromRule() {\n\t\treturn $this->getScoreFromRuleInternal($this->registration->competition->rule, false);\n\t}", "public function getMutationScoreIndicator(): float\n {\n $detectionRateAll = 0;\n $defeatedTotal = $this->killedCount + $this->timedOutCount + $this->errorCount;\n\n if ($this->totalMutantsCount) {\n $detectionRateAll = floor(100 * $defeatedTotal / $this->totalMutantsCount);\n }\n\n return $detectionRateAll;\n }", "function section_score_composite_header($score, $scoring = 'score')\n {\n if($scoring == 'percentile') {\n return 'Your Percentile: '.str_ordinal($score);\n }\n\n return 'Your Score: '.$score;\n }", "protected function setProbability($identifier,$score){\n\t\tif($score < 0) {\n\t\t\t$score = 0;\n\t\t}\n\t\t$expiresAt = Carbon::now()->addDays($this->ci->config['captcha.probability.saveDays']);\n\t\treturn $this->ci->cache->put($this->cachePrefix . $identifier,$score,$expiresAt);\n\t}", "public function addScore($score = 10)\n {\n return DB::table('scores')->insert([\n 'user_id' => Auth::user()->id,\n 'score' => $score,\n 'current_page' => 2,\n 'created_at' => date('Y-m-d H:i:s')\n ]);\n }", "public function get_quality_scores()\n\t{\n\t\treturn $this->quality_scores;\n\t}" ]
[ "0.6787265", "0.6787265", "0.6787265", "0.6787265", "0.67662615", "0.67303276", "0.6714648", "0.6710551", "0.67060196", "0.65232396", "0.6488983", "0.6413199", "0.64010215", "0.6375659", "0.6287169", "0.6229824", "0.6150764", "0.61242944", "0.609062", "0.6087809", "0.6084411", "0.60800546", "0.60193485", "0.5977077", "0.5972438", "0.5953636", "0.5937487", "0.59327483", "0.5859202", "0.58375436", "0.5836063", "0.582178", "0.5813276", "0.57940793", "0.5768658", "0.5767177", "0.5756968", "0.5756968", "0.5733503", "0.57180196", "0.57180196", "0.57180196", "0.5677124", "0.56640744", "0.5658256", "0.56520617", "0.5647432", "0.5628162", "0.5626263", "0.5626263", "0.5625977", "0.5625977", "0.55991644", "0.55772233", "0.5561299", "0.5553585", "0.54993993", "0.5474444", "0.54671663", "0.545396", "0.54462683", "0.54379225", "0.5416884", "0.54130465", "0.5390952", "0.53856176", "0.53549385", "0.5349489", "0.53335536", "0.53256184", "0.53180593", "0.5313281", "0.5308183", "0.53056735", "0.5302104", "0.53014266", "0.5294943", "0.5289505", "0.5267565", "0.5265747", "0.5233366", "0.52317303", "0.5226039", "0.5219756", "0.5217979", "0.5216907", "0.5216385", "0.5212574", "0.5203867", "0.5190238", "0.5186965", "0.51850766", "0.5184161", "0.5171876", "0.5161928", "0.51541793", "0.51534575", "0.5149792", "0.51489794" ]
0.7095722
1
Generated from protobuf field .Rect location = 2;
public function getLocation() { return $this->location; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setLocation($var)\n {\n GPBUtil::checkMessage($var, \\Rect::class);\n $this->location = $var;\n\n return $this;\n }", "public function getRect() {}", "public function rect($x, $y, $width, $height) {}", "public function getRectangle() {}", "public function setRect(\\SetaPDF_Core_DataStructure_Rectangle $rect) {}", "public abstract function getBoundingBox(): Rectangle;", "public function rect($x1, $y1, $width, $height, $style = self::STYLE_DRAW) {}", "public static function invalidMarkerShapeRectCoordinates()\n {\n return new static(sprintf(\n '%s'.PHP_EOL.'%s',\n 'The coordinates setter arguments is invalid if the marker shape type is rect.',\n 'The available prototype is : function setCoordinates('.\n 'array(double $x1, double $y1, double $x2, double $y2)'.\n ')'\n ));\n }", "public function getRect()\n {\n $x1 = min([$this->p1->x, $this->p2->x, $this->p3->x]);\n $y1 = min([$this->p1->y, $this->p2->y, $this->p3->y]);\n $x2 = max([$this->p1->x, $this->p2->x, $this->p3->x]);\n $y2 = max([$this->p1->y, $this->p2->y, $this->p3->y]);\n\n return [new Point($x1, $y1), new Point($x2, $y2)];\n }", "public static function invalidRectangleBoundCoordinates()\n {\n return new static('A rectangle bound must have a south west & a north east coordinate.');\n }", "public function getBoundingBox() {}", "function makeRectangle(array $point, $width, $height)\n{\n return [\n 'point' => $point,\n 'width' => $width,\n 'height' => $height\n ];\n}", "function bbox(string $id): Rect {\n if (!isset($this->features[$id]))\n return new Rect([41, -4, 51, 10]);\n else\n return $this->features[$id]['bbox'];\n }", "public static function invalidRectangleBound()\n {\n return new static(sprintf(\n '%s'.PHP_EOL.'%s'.PHP_EOL.'%s'.PHP_EOL.'%s'.PHP_EOL.'%s',\n 'The bound setter arguments is invalid.',\n 'The available prototypes are :',\n ' - function setBound(Fungio\\GoogleMap\\Base\\Bound $bound)',\n ' - function setBount('.\n 'Fungio\\GoogleMap\\Base\\Coordinate $southWest, '.\n 'Fungio\\GoogleMap\\Base\\Coordinate $northEast'.\n ')',\n ' - function setBound('.\n 'double $southWestLatitude, '.\n 'double $southWestLongitude, '.\n 'double $northEastLatitude, '.\n 'double $northEastLongitude, '.\n 'boolean southWestNoWrap = true, '.\n 'boolean $northEastNoWrap = true'.\n ')'\n ));\n }", "public function getDifferencesRect() {}", "public function contains($otherRect) {}", "function SetPos($aRect) {\n\tassert( $this->prect != null ) ;\n\t$this->prect->SetPos($aRect);\n }", "public function getPosY();", "public function getPos() {}", "public function getPos() {}", "public function getPos() {}", "public function getPos() {}", "public function getPos() {}", "public function getBounds();", "public function getRectangles()\n {\n return $this->rectangles;\n }", "public function getPos();", "public function getPos();", "public function getBBox($asRect = true) {}", "public function setDifferencesRect(\\SetaPDF_Core_DataStructure_Rectangle $differencesRect) {}", "public function getShape(): object {\n return (object) ['m' => $this->row, 'n' => $this->col];\n }", "public function position();", "function frameRect($x1, $y1, $x2, $y2)\r\n {\r\n $this->forcePen();\r\n $this->forceBrush();\r\n echo \"$this->_canvas.drawRect($x1, $y1, $x2-$x1+1, $y2-$y1+1);\\n\";\r\n }", "public function getCoord(){\n return $this->coord;\n }", "public static function create($rectangle) {}", "function drawRect(&$im,$coords,$c1,$c2,$a_x_ratio = 1, $a_y_ratio = 1)\n\t{\n\t\t$coord=explode(\",\", $coords);\n\n\t\t$this->drawLine($im, $coord[0] / $a_x_ratio, $coord[1] / $a_y_ratio,\n\t\t\t$coord[0] / $a_x_ratio, $coord[3] / $a_y_ratio, $c1, $c2);\n\t\t$this->drawLine($im, $coord[0] / $a_x_ratio, $coord[3] / $a_y_ratio,\n\t\t\t$coord[2] / $a_x_ratio, $coord[3] / $a_y_ratio, $c1, $c2);\n\t\t$this->drawLine($im, $coord[2] / $a_x_ratio, $coord[3] / $a_y_ratio,\n\t\t\t$coord[2] / $a_x_ratio, $coord[1] / $a_y_ratio, $c1, $c2);\n\t\t$this->drawLine($im, $coord[2] / $a_x_ratio, $coord[1] / $a_y_ratio,\n\t\t\t$coord[0] / $a_x_ratio, $coord[1] / $a_y_ratio, $c1, $c2);\n\t}", "public function bounds(int $spriteId): ?Rectangle\n {\n return Streams::wrap($this->placeObjectMatrices($spriteId))\n ->mapKey(function (array $matrices, $characterId) {\n return $this->assetBounds($characterId);\n })\n ->filter(function (array $matrices, $key) {\n return $key !== null;\n })\n ->flatMap(function (array $matrices, Rectangle $bounds) {\n return Streams::wrap($matrices)->map([$bounds, 'transform']);\n })\n ->reduce(function (?Rectangle $a, Rectangle $b) {\n return $a ? $a->merge($b) : $b;\n })\n ;\n }", "public static function byRectangle($rectangle) {}", "abstract public function coordinates();", "function Rectangle($x1,$y1,$x2,$y2) {\n parent::Rectangle($x1,$y1,$x2,$y2);\n }", "public function shape(): string\n\t{\n\t\treturn \"Rectangle\";\n\t}", "private function findRectangleMove()\n\t{\n\t\t$moves = array();\n\t\t\n\t\t// Top Area\n\t\ttry\n\t\t{\n\t\t\tif(\n\t\t\t\t$this->board[3][-1]->hasMarble &&\n\t\t\t\t$this->board[3][0]->hasMarble &&\n\t\t\t\t$this->board[3][1]->hasMarble &&\n\t\t\t\t$this->board[2][-1]->hasMarble &&\n\t\t\t\t$this->board[2][0]->hasMarble &&\n\t\t\t\t$this->board[2][1]->hasMarble\n\t\t\t)\n\t\t\t{\n\t\t\t\tif(\n\t\t\t\t\t!$this->board[1][0]->hasMarble && !$this->board[1][-1]->hasMarble &&\n\t\t\t\t\t($this->board[1][1]->hasMarble && !$this->board[0][1]->hasMarble) ||\n\t\t\t\t\t(!$this->board[1][1]->hasMarble && $this->board[0][1]->hasMarble)\n\t\t\t\t)\n\t\t\t\t{\n\t\t\t\t\t$moves[0] = array();\n\t\t\t\t\t\n\t\t\t\t\t$moves[0][] = array('down', 3, -1);\n\t\t\t\t\t$moves[0][] = array('down', 3, 0);\n\t\t\t\t\t\n\t\t\t\t\tif(!$this->board[1][1]->hasMarble)\n\t\t\t\t\t{\n\t\t\t\t\t\t$moves[0][] = array('down', 3, 1);\n\t\t\t\t\t\t$moves[0][] = array('up', 0, 1);\n\t\t\t\t\t\t$moves[0][] = array('right', 1, -1);\n\t\t\t\t\t\t$moves[0][] = array('down', 2, 1);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$moves[0][] = array('down', 2, 1);\n\t\t\t\t\t\t$moves[0][] = array('right', 1, -1);\n\t\t\t\t\t\t$moves[0][] = array('up', 0, 1);\n\t\t\t\t\t\t$moves[0][] = array('down', 3, 1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(\n\t\t\t\t\t!$this->board[1][0]->hasMarble && !$this->board[1][1]->hasMarble &&\n\t\t\t\t\t($this->board[1][-1]->hasMarble && !$this->board[0][-1]->hasMarble) ||\n\t\t\t\t\t(!$this->board[1][-1]->hasMarble && $this->board[0][-1]->hasMarble)\n\t\t\t\t)\n\t\t\t\t{\n\t\t\t\t\t$moves[1] = array();\n\t\t\t\t\t\n\t\t\t\t\t$moves[1][] = array('down', 3, 1);\n\t\t\t\t\t$moves[1][] = array('down', 3, 0);\n\t\t\t\t\t\n\t\t\t\t\tif(!$this->board[1][-1]->hasMarble)\n\t\t\t\t\t{\n\t\t\t\t\t\t$moves[1][] = array('down', 3, -1);\n\t\t\t\t\t\t$moves[1][] = array('up', 0, -1);\n\t\t\t\t\t\t$moves[1][] = array('left', 1, 1);\n\t\t\t\t\t\t$moves[1][] = array('down', 2, -1);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$moves[1][] = array('down', 2, -1);\n\t\t\t\t\t\t$moves[1][] = array('left', 1, 1);\n\t\t\t\t\t\t$moves[1][] = array('up', 0, -1);\n\t\t\t\t\t\t$moves[1][] = array('down', 3, -1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif($this->board[1][0]->hasMarble && !$this->board[1][-1]->hasMarble && !$this->board[1][-2]->hasMarble)\n\t\t\t\t{\n\t\t\t\t\t$moves[2] = array();\n\t\t\t\t\t\n\t\t\t\t\t$moves[2][] = array('down', 3, -1);\n\t\t\t\t\t$moves[2][] = array('left', 1, 0);\n\t\t\t\t\t$moves[2][] = array('left', 3, 1);\n\t\t\t\t\t$moves[2][] = array('left', 2, 1);\n\t\t\t\t\t$moves[2][] = array('down', 3, -1);\n\t\t\t\t\t$moves[2][] = array('right', 1, -2);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(!$this->board[1][0]->hasMarble && !$this->board[1][-1]->hasMarble && $this->board[1][-2]->hasMarble)\n\t\t\t\t{\n\t\t\t\t\t$moves[3] = array();\n\t\t\t\t\t\n\t\t\t\t\t$moves[3][] = array('down', 3, -1);\n\t\t\t\t\t$moves[3][] = array('right', 1, -2);\n\t\t\t\t\t$moves[3][] = array('left', 3, 1);\n\t\t\t\t\t$moves[3][] = array('left', 2, 1);\n\t\t\t\t\t$moves[3][] = array('down', 3, -1);\n\t\t\t\t\t$moves[3][] = array('left', 1, 0);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif($this->board[1][0]->hasMarble && !$this->board[1][1]->hasMarble && !$this->board[1][2]->hasMarble)\n\t\t\t\t{\n\t\t\t\t\t$moves[4] = array();\n\t\t\t\t\t\n\t\t\t\t\t$moves[4][] = array('down', 3, 1);\n\t\t\t\t\t$moves[4][] = array('right', 1, 0);\n\t\t\t\t\t$moves[4][] = array('right', 3, -1);\n\t\t\t\t\t$moves[4][] = array('right', 2, -1);\n\t\t\t\t\t$moves[4][] = array('down', 3, 1);\n\t\t\t\t\t$moves[4][] = array('left', 1, 2);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(!$this->board[1][0]->hasMarble && !$this->board[1][1]->hasMarble && $this->board[1][2]->hasMarble)\n\t\t\t\t{\n\t\t\t\t\t$moves[5] = array();\n\t\t\t\t\t\n\t\t\t\t\t$moves[5][] = array('down', 3, 1);\n\t\t\t\t\t$moves[5][] = array('left', 1, 2);\n\t\t\t\t\t$moves[5][] = array('right', 3, -1);\n\t\t\t\t\t$moves[5][] = array('right', 2, -1);\n\t\t\t\t\t$moves[5][] = array('down', 3, 1);\n\t\t\t\t\t$moves[5][] = array('right', 1, 0);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch(Exception $e) {};\n\t\t\n\t\t\n\t\t// Down Area\n\t\ttry\n\t\t{\n\t\t\tif(\n\t\t\t\t$this->board[-3][-1]->hasMarble &&\n\t\t\t\t$this->board[-3][0]->hasMarble &&\n\t\t\t\t$this->board[-3][1]->hasMarble &&\n\t\t\t\t$this->board[-2][-1]->hasMarble &&\n\t\t\t\t$this->board[-2][0]->hasMarble &&\n\t\t\t\t$this->board[-2][1]->hasMarble\n\t\t\t)\n\t\t\t{\n\t\t\t\tif(\n\t\t\t\t\t!$this->board[-1][0]->hasMarble && !$this->board[-1][-1]->hasMarble &&\n\t\t\t\t\t($this->board[-1][1]->hasMarble && !$this->board[0][1]->hasMarble) ||\n\t\t\t\t\t(!$this->board[-1][1]->hasMarble && $this->board[0][1]->hasMarble)\n\t\t\t\t)\n\t\t\t\t{\n\t\t\t\t\t$moves[6] = array();\n\t\t\t\t\t\n\t\t\t\t\t$moves[6][] = array('up', -3, -1);\n\t\t\t\t\t$moves[6][] = array('up', -3, 0);\n\t\t\t\t\t\n\t\t\t\t\tif(!$this->board[-1][1]->hasMarble)\n\t\t\t\t\t{\n\t\t\t\t\t\t$moves[6][] = array('up', -3, 1);\n\t\t\t\t\t\t$moves[6][] = array('down', 0, 1);\n\t\t\t\t\t\t$moves[6][] = array('right', -1, -1);\n\t\t\t\t\t\t$moves[6][] = array('up', -2, 1);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$moves[6][] = array('up', -2, 1);\n\t\t\t\t\t\t$moves[6][] = array('right', -1, -1);\n\t\t\t\t\t\t$moves[6][] = array('down', 0, 1);\n\t\t\t\t\t\t$moves[6][] = array('up', -3, 1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(\n\t\t\t\t\t!$this->board[1][0]->hasMarble && !$this->board[1][1]->hasMarble &&\n\t\t\t\t\t($this->board[-1][-1]->hasMarble && !$this->board[0][-1]->hasMarble) ||\n\t\t\t\t\t(!$this->board[-1][-1]->hasMarble && $this->board[0][-1]->hasMarble)\n\t\t\t\t)\n\t\t\t\t{\n\t\t\t\t\t$moves[7] = array();\n\t\t\t\t\t\n\t\t\t\t\t$moves[7][] = array('up', -3, 1);\n\t\t\t\t\t$moves[7][] = array('up', -3, 0);\n\t\t\t\t\t\n\t\t\t\t\tif(!$this->board[-1][-1]->hasMarble)\n\t\t\t\t\t{\n\t\t\t\t\t\t$moves[7][] = array('up', -3, -1);\n\t\t\t\t\t\t$moves[7][] = array('down', 0, -1);\n\t\t\t\t\t\t$moves[7][] = array('left', -1, 1);\n\t\t\t\t\t\t$moves[7][] = array('up', -2, -1);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$moves[7][] = array('up', -2, -1);\n\t\t\t\t\t\t$moves[7][] = array('left', -1, 1);\n\t\t\t\t\t\t$moves[7][] = array('down', 0, -1);\n\t\t\t\t\t\t$moves[7][] = array('up', -3, -1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif($this->board[-1][0]->hasMarble && !$this->board[-1][1]->hasMarble && !$this->board[-1][-2]->hasMarble)\n\t\t\t\t{\n\t\t\t\t\t$moves[8] = array();\n\t\t\t\t\t\n\t\t\t\t\t$moves[8][] = array('up', -3, -1);\n\t\t\t\t\t$moves[8][] = array('left', -1, 0);\n\t\t\t\t\t$moves[8][] = array('left', -3, 1);\n\t\t\t\t\t$moves[8][] = array('left', -2, 1);\n\t\t\t\t\t$moves[8][] = array('up', -3, -1);\n\t\t\t\t\t$moves[8][] = array('right', -1, -2);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(!$this->board[-1][0]->hasMarble && !$this->board[-1][1]->hasMarble && $this->board[-1][-2]->hasMarble)\n\t\t\t\t{\n\t\t\t\t\t$moves[9] = array();\n\t\t\t\t\t\n\t\t\t\t\t$moves[9][] = array('up', -3, -1);\n\t\t\t\t\t$moves[9][] = array('right', -1, -2);\n\t\t\t\t\t$moves[9][] = array('left', -3, 1);\n\t\t\t\t\t$moves[9][] = array('left', -2, 1);\n\t\t\t\t\t$moves[9][] = array('up', -3, -1);\n\t\t\t\t\t$moves[9][] = array('left', -1, 0);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif($this->board[-1][0]->hasMarble && !$this->board[-1][1]->hasMarble && !$this->board[-1][2]->hasMarble)\n\t\t\t\t{\n\t\t\t\t\t$moves[10] = array();\n\t\t\t\t\t\n\t\t\t\t\t$moves[10][] = array('up', -3, 1);\n\t\t\t\t\t$moves[10][] = array('right', -1, 0);\n\t\t\t\t\t$moves[10][] = array('right', -3, -1);\n\t\t\t\t\t$moves[10][] = array('right', -2, -1);\n\t\t\t\t\t$moves[10][] = array('up', -3, 1);\n\t\t\t\t\t$moves[10][] = array('left', -1, 2);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(!$this->board[-1][0]->hasMarble && !$this->board[-1][1]->hasMarble && $this->board[-1][2]->hasMarble)\n\t\t\t\t{\n\t\t\t\t\t$moves[11] = array();\n\t\t\t\t\t\n\t\t\t\t\t$moves[11][] = array('up', -3, 1);\n\t\t\t\t\t$moves[11][] = array('left', -1, 2);\n\t\t\t\t\t$moves[11][] = array('right', -3, -1);\n\t\t\t\t\t$moves[11][] = array('right', -2, -1);\n\t\t\t\t\t$moves[11][] = array('up', -3, 1);\n\t\t\t\t\t$moves[11][] = array('right', -1, 0);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch(Exception $e) {};\n\t\t\n\t\t\n\t\t// Left Area\n\t\ttry\n\t\t{\n\t\t\tif(\n\t\t\t\t$this->board[1][-3]->hasMarble &&\n\t\t\t\t$this->board[1][-2]->hasMarble &&\n\t\t\t\t$this->board[0][-3]->hasMarble &&\n\t\t\t\t$this->board[0][-2]->hasMarble &&\n\t\t\t\t$this->board[-1][-3]->hasMarble &&\n\t\t\t\t$this->board[-1][-2]->hasMarble\n\t\t\t)\n\t\t\t{\n\t\t\t\tif(\n\t\t\t\t\t!$this->board[0][-1]->hasMarble && !$this->board[-1][-1]->hasMarble &&\n\t\t\t\t\t($this->board[1][-1]->hasMarble && !$this->board[1][0]->hasMarble) ||\n\t\t\t\t\t(!$this->board[1][-1]->hasMarble && $this->board[1][0]->hasMarble)\n\t\t\t\t)\n\t\t\t\t{\n\t\t\t\t\t$moves[12] = array();\n\t\t\t\t\t\n\t\t\t\t\t$moves[12][] = array('right', 0, -3);\n\t\t\t\t\t$moves[12][] = array('right', -1, -3);\n\t\t\t\t\t\n\t\t\t\t\tif(!$this->board[1][-1]->hasMarble)\n\t\t\t\t\t{\n\t\t\t\t\t\t$moves[12][] = array('right', 1, -3);\n\t\t\t\t\t\t$moves[12][] = array('left', 1, 0);\n\t\t\t\t\t\t$moves[12][] = array('up', -1, -1);\n\t\t\t\t\t\t$moves[12][] = array('right', 1, -2);\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$moves[12][] = array('right', 1, -2);\n\t\t\t\t\t\t$moves[12][] = array('up', -1, -1);\n\t\t\t\t\t\t$moves[12][] = array('left', 1, 0);\n\t\t\t\t\t\t$moves[12][] = array('right', 1, -3);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(\n\t\t\t\t\t!$this->board[0][-1]->hasMarble && !$this->board[1][-1]->hasMarble &&\n\t\t\t\t\t($this->board[-1][-1]->hasMarble && !$this->board[-1][0]->hasMarble) ||\n\t\t\t\t\t(!$this->board[-1][-1]->hasMarble && $this->board[-1][0]->hasMarble)\n\t\t\t\t)\n\t\t\t\t{\n\t\t\t\t\t$moves[13] = array();\n\t\t\t\t\t\n\t\t\t\t\t$moves[13][] = array('right', 0, -3);\n\t\t\t\t\t$moves[13][] = array('right', 1, -3);\n\t\t\t\t\t\n\t\t\t\t\tif(!$this->board[-1][-1]->hasMarble)\n\t\t\t\t\t{\n\t\t\t\t\t\t$moves[13][] = array('right', -1, -3);\n\t\t\t\t\t\t$moves[13][] = array('left', -1, 0);\n\t\t\t\t\t\t$moves[13][] = array('down', 1, -1);\n\t\t\t\t\t\t$moves[13][] = array('right', -1, -2);\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$moves[13][] = array('right', -1, -2);\n\t\t\t\t\t\t$moves[13][] = array('down', 1, -1);\n\t\t\t\t\t\t$moves[13][] = array('left', -1, 0);\n\t\t\t\t\t\t$moves[13][] = array('right', -1, -3);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif($this->board[0][-1]->hasMarble && !$this->board[1][-1]->hasMarble && !$this->board[2][-1]->hasMarble)\n\t\t\t\t{\n\t\t\t\t\t$moves[14] = array();\n\t\t\t\t\t\n\t\t\t\t\t$moves[14][] = array('right', 1, -3);\n\t\t\t\t\t$moves[14][] = array('up', 0, -1);\n\t\t\t\t\t$moves[14][] = array('up', -1, -3);\n\t\t\t\t\t$moves[14][] = array('up', -1, -2);\n\t\t\t\t\t$moves[14][] = array('right', 1, -3);\n\t\t\t\t\t$moves[14][] = array('down', 2, -1);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(!$this->board[0][-1]->hasMarble && !$this->board[1][-1]->hasMarble && $this->board[2][-1]->hasMarble)\n\t\t\t\t{\n\t\t\t\t\t$moves[15] = array();\n\t\t\t\t\t\n\t\t\t\t\t$moves[15][] = array('right', 1, -3);\n\t\t\t\t\t$moves[15][] = array('down', 2, -1);\n\t\t\t\t\t$moves[15][] = array('up', -1, -3);\n\t\t\t\t\t$moves[15][] = array('up', -1, -2);\n\t\t\t\t\t$moves[15][] = array('right', 1, -3);\n\t\t\t\t\t$moves[15][] = array('up', 0, -1);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif($this->board[0][-1]->hasMarble && !$this->board[-1][-1]->hasMarble && !$this->board[-2][-1]->hasMarble)\n\t\t\t\t{\n\t\t\t\t\t$moves[16] = array();\n\t\t\t\t\t\n\t\t\t\t\t$moves[16][] = array('right', -1, -3);\n\t\t\t\t\t$moves[16][] = array('down', 0, -1);\n\t\t\t\t\t$moves[16][] = array('down', 1, -3);\n\t\t\t\t\t$moves[16][] = array('down', 1, -2);\n\t\t\t\t\t$moves[16][] = array('right', -1, -3);\n\t\t\t\t\t$moves[16][] = array('up', -2, -1);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(!$this->board[0][-1]->hasMarble && !$this->board[-1][-1]->hasMarble && $this->board[-2][-1]->hasMarble)\n\t\t\t\t{\n\t\t\t\t\t$moves[17] = array();\n\t\t\t\t\t\n\t\t\t\t\t$moves[17][] = array('right', -1, -3);\n\t\t\t\t\t$moves[17][] = array('up', -2, -1);\n\t\t\t\t\t$moves[17][] = array('down', 1, -3);\n\t\t\t\t\t$moves[17][] = array('down', 1, -2);\n\t\t\t\t\t$moves[17][] = array('right', -1, -3);\n\t\t\t\t\t$moves[17][] = array('down', 0, -1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch(Exception $e) {};\n\t\t\n\t\t\n\t\t// Right Area\n\t\ttry\n\t\t{\n\t\t\tif(\n\t\t\t\t$this->board[1][3]->hasMarble &&\n\t\t\t\t$this->board[1][2]->hasMarble &&\n\t\t\t\t$this->board[0][3]->hasMarble &&\n\t\t\t\t$this->board[0][2]->hasMarble &&\n\t\t\t\t$this->board[-1][3]->hasMarble &&\n\t\t\t\t$this->board[-1][2]->hasMarble\n\t\t\t)\n\t\t\t{\n\t\t\t\tif(\n\t\t\t\t\t!$this->board[0][1]->hasMarble && !$this->board[-1][1]->hasMarble &&\n\t\t\t\t\t($this->board[1][1]->hasMarble && !$this->board[1][0]->hasMarble) ||\n\t\t\t\t\t(!$this->board[1][1]->hasMarble && $this->board[1][0]->hasMarble)\n\t\t\t\t)\n\t\t\t\t{\n\t\t\t\t\t$moves[18] = array();\n\t\t\t\t\t\n\t\t\t\t\t$moves[18][] = array('left', 0, 3);\n\t\t\t\t\t$moves[18][] = array('left', -1, 3);\n\t\t\t\t\t\n\t\t\t\t\tif(!$this->board[1][1]->hasMarble)\n\t\t\t\t\t{\n\t\t\t\t\t\t$moves[18][] = array('left', 1, 3);\n\t\t\t\t\t\t$moves[18][] = array('right', 1, 0);\n\t\t\t\t\t\t$moves[18][] = array('up', -1, 1);\n\t\t\t\t\t\t$moves[18][] = array('left', 1, 2);\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$moves[18][] = array('left', 1, 2);\n\t\t\t\t\t\t$moves[18][] = array('up', -1, 1);\n\t\t\t\t\t\t$moves[18][] = array('right', 1, 0);\n\t\t\t\t\t\t$moves[18][] = array('left', 1, 3);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif(\n\t\t\t\t\t!$this->board[0][1]->hasMarble && !$this->board[1][1]->hasMarble &&\n\t\t\t\t\t($this->board[-1][1]->hasMarble && !$this->board[-1][0]->hasMarble) ||\n\t\t\t\t\t(!$this->board[-1][1]->hasMarble && $this->board[-1][0]->hasMarble)\n\t\t\t\t)\n\t\t\t\t{\n\t\t\t\t\t$moves[19] = array();\n\t\t\t\t\t\n\t\t\t\t\t$moves[19][] = array('left', 0, 3);\n\t\t\t\t\t$moves[19][] = array('left', 1, 3);\n\t\t\t\t\t\n\t\t\t\t\tif(!$this->board[-1][1]->hasMarble)\n\t\t\t\t\t{\n\t\t\t\t\t\t$moves[19][] = array('left', -1, 3);\n\t\t\t\t\t\t$moves[19][] = array('right', -1, 0);\n\t\t\t\t\t\t$moves[19][] = array('down', 1, 1);\n\t\t\t\t\t\t$moves[19][] = array('left', -1, 2);\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$moves[19][] = array('left', -1, 2);\n\t\t\t\t\t\t$moves[19][] = array('down', 1, 1);\n\t\t\t\t\t\t$moves[19][] = array('right', -1, 0);\n\t\t\t\t\t\t$moves[19][] = array('left', -1, 3);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif($this->board[0][1]->hasMarble && !$this->board[1][1]->hasMarble && !$this->board[2][1]->hasMarble)\n\t\t\t\t{\n\t\t\t\t\t$moves[20] = array();\n\t\t\t\t\t\n\t\t\t\t\t$moves[20][] = array('left', 1, 3);\n\t\t\t\t\t$moves[20][] = array('up', 0, 1);\n\t\t\t\t\t$moves[20][] = array('up', -1, 3);\n\t\t\t\t\t$moves[20][] = array('up', -1, 2);\n\t\t\t\t\t$moves[20][] = array('left', 1, 3);\n\t\t\t\t\t$moves[20][] = array('down', 2, 1);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(!$this->board[0][1]->hasMarble && !$this->board[1][1]->hasMarble && $this->board[2][1]->hasMarble)\n\t\t\t\t{\n\t\t\t\t\t$moves[21] = array();\n\t\t\t\t\t\n\t\t\t\t\t$moves[21][] = array('left', 1, 3);\n\t\t\t\t\t$moves[21][] = array('down', 2, 1);\n\t\t\t\t\t$moves[21][] = array('up', -1, 3);\n\t\t\t\t\t$moves[21][] = array('up', -1, 2);\n\t\t\t\t\t$moves[21][] = array('left', 1, 3);\n\t\t\t\t\t$moves[21][] = array('up', 0, 1);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif($this->board[0][1]->hasMarble && !$this->board[-1][1]->hasMarble && !$this->board[-2][1]->hasMarble)\n\t\t\t\t{\n\t\t\t\t\t$moves[22] = array();\n\t\t\t\t\t\n\t\t\t\t\t$moves[22][] = array('left', -1, 3);\n\t\t\t\t\t$moves[22][] = array('down', 0, 1);\n\t\t\t\t\t$moves[22][] = array('down', 1, 3);\n\t\t\t\t\t$moves[22][] = array('down', 1, 2);\n\t\t\t\t\t$moves[22][] = array('left', -1, 3);\n\t\t\t\t\t$moves[22][] = array('up', -2, 1);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(!$this->board[0][1]->hasMarble && !$this->board[-1][1]->hasMarble && $this->board[-2][1]->hasMarble)\n\t\t\t\t{\n\t\t\t\t\t$moves[23] = array();\n\t\t\t\t\t\n\t\t\t\t\t$moves[23][] = array('left', -1, 3);\n\t\t\t\t\t$moves[23][] = array('up', -2, 1);\n\t\t\t\t\t$moves[23][] = array('down', 1, 3);\n\t\t\t\t\t$moves[23][] = array('down', 1, 2);\n\t\t\t\t\t$moves[23][] = array('left', -1, 3);\n\t\t\t\t\t$moves[23][] = array('down', 0, 1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch(Exception $e) {};\n\t\t\n\t\treturn $moves;\n\t}", "public function position()\n\t{\n\t\treturn $this->getField('position');\n\t}", "public function bbox()\n {\n $minX = PHP_INT_MAX;\n $minY = PHP_INT_MAX;\n $maxX = PHP_INT_MIN;\n $maxY = PHP_INT_MIN;\n $n = 0;\n\n foreach($this->coordinates() as $xy)\n {\n list($x, $y) = $xy;\n $minX = min($minX, $x);\n $minY = min($minY, $y);\n $maxX = max($maxX, $x);\n $maxY = max($maxY, $y);\n $n++;\n }\n\n if($n > 0)\n {\n return array($minX, $minY, $maxX, $maxY);\n }\n else\n {\n return false;\n }\n }", "private function createRectangleArea(array $coords)\r\n {\r\n $coords[0] = $this->checkParametersAreNumeric($coords[0]);\r\n $coords[1] = $this->checkParametersAreNumeric($coords[1]);\r\n $a = new Coords($coords[0][0], $coords[0][1]);\r\n $b = new Coords($coords[1][0], $coords[1][1]);\r\n $this->area = new RectangleArea();\r\n $this->area->addCoordinates($a, $b);\r\n $this->area->calcAreaData();\r\n\r\n }", "public static function size ()\n {\n return ['x' => static::$_map_width, 'y' => static::$_map_height];\n }", "function AbsolutePosition() {}", "public static function setPosition(int $x, int $y) {}", "public function createRectangle()\n {\n imagefilledrectangle($this->image, 0, 0, $this->width, $this->height, imagecolorallocate($this->image, 255, 255, 255));\n }", "private function readXYBoundingBox()\n {\n // Variables are used here because the order of the output array elements is different!\n $xmin = $this->readDoubleL(Shapefile::FILE_SHP);\n $ymin = $this->readDoubleL(Shapefile::FILE_SHP);\n $xmax = $this->readDoubleL(Shapefile::FILE_SHP);\n $ymax = $this->readDoubleL(Shapefile::FILE_SHP);\n return [\n 'xmin' => $xmin,\n 'xmax' => $xmax,\n 'ymin' => $ymin,\n 'ymax' => $ymax,\n ];\n }", "public function getPosition() {}", "public function getPosition() {}", "function rectangle($x1, $y1, $x2, $y2)\r\n {\r\n $resp = \"\";\r\n $resp .= $this->forceBrush();\r\n $resp .= $this->_getJavascriptVar() . \".fillRect($x1, $y1, $x2 - $x1 + 1, $y2 - $y1 + 1);\\n\";\r\n $resp .= $this->forcePen();\r\n $resp .= $this->_getJavascriptVar() . \".strokeRect($x1, $y1, $x2 - $x1 + 1, $y2 - $y1 + 1);\\n\";\r\n\r\n return $resp;\r\n }", "private function assetBounds(int $characterId): ?Rectangle\n {\n return $this->file->toXml()->shape($characterId)\n ->map(function (SimpleXMLElement $shape) {\n // A shape is found\n return new Rectangle(\n (int) $shape->shapeBounds['Xmin'],\n (int) $shape->shapeBounds['Xmax'],\n (int) $shape->shapeBounds['Ymin'],\n (int) $shape->shapeBounds['Ymax']\n );\n })\n ->orSupply(function () use($characterId) {\n // Check for nested sprite\n return $this->bounds($characterId);\n })\n ;\n }", "public function getPos()\n {\n return $this->pos;\n }", "public function getElementPosition($infobox, $corner);", "public abstract function getOrigin(): Point;", "public function getBounds()\n {\n return $this->bounds;\n }", "protected function addRectangleSection(ArrayNodeDefinition $node)\n {\n $node\n ->children()\n ->arrayNode('rectangle')->addDefaultsIfNotSet()\n ->children()\n ->scalarNode('class')->end()\n ->scalarNode('helper_class')->end()\n ->scalarNode('prefix_javascript_variable')->end()\n ->arrayNode('bound')->addDefaultsIfNotSet()\n ->children()\n ->arrayNode('south_west')->addDefaultsIfNotSet()\n ->children()\n ->scalarNode('latitude')->end()\n ->scalarNode('longitude')->end()\n ->scalarNode('no_wrap')->end()\n ->end()\n ->end()\n ->arrayNode('north_east')->addDefaultsIfNotSet()\n ->children()\n ->scalarNode('latitude')->end()\n ->scalarNode('longitude')->end()\n ->scalarNode('no_wrap')->end()\n ->end()\n ->end()\n ->end()\n ->end()\n ->arrayNode('options')\n ->useAttributeAsKey('options')\n ->prototype('scalar')->end()\n ->end()\n ->end()\n ->end()\n ->end();\n }", "public static function getWindowPosition() : \\raylib\\Vector2 {}", "public function getCoords()\n\t{\n\t\treturn $this->coords;\n\t}", "public function setPosition() {\n }", "public function setPosY($posY);", "function position( $x, $y )\n\t{\n\t\t$this->x = $x;\n\t\t$this->y = $y;\n\t}", "public function getCoordinates();", "function rectangle($x1,$y1,$width,$height)\n\t{\n\t\t$point = $this->rotateXY($x1, $y1);\n\t\t//$point = $this->rotateRadial($x1, $y1);\n\t\t$x1 = $point['x'];\n\t\t$y1 = $point['y'];\n\t\tif(rad2deg($this->rotation) == 90 || rad2deg($this->rotation) == -90)\n\t\t{\n\t\t\t$temp = $width;\n\t\t\t$width = $height;\n\t\t\t$height = $temp;\n\t\t\t$y1 -= $height;\n\t\t}\n\t\treturn parent::rectangle($x1,$y1,$width,$height);\n\t}", "public function calcRect($r, $inflateChartRectangle) {\r\n $this->iAxisDateTime = $this->isDateTime();\r\n\r\n if ($inflateChartRectangle) {\r\n // new? todo CalcLabelsResults tmpRes;\r\n\r\n if ($this->isDepthAxis) {\r\n if ($this->otherSide) {\r\n $this->posTitle = $r->getRight();\r\n } else {\r\n $this->posTitle = $r->getLeft();\r\n }\r\n } else {\r\n if (($this->axisTitle != null) && $this->axisTitle->getVisible() &&\r\n (strlen($this->axisTitle->getCaption()) != 0)) {\r\n\r\n $tmpRes = $this->calcLabelsRect($this->internalCalcSize(\r\n $this->axisTitle->getFont(), $this->axisTitle->getAngle(),\r\n $this->axisTitle->getCaption(), $this->axisTitle->getCustomSize()),\r\n $r);\r\n\r\n $this->posTitle = $tmpRes->position;\r\n }\r\n }\r\n\r\n if ($this->labels->getVisible()) {\r\n $tmpRes = $this->calcLabelsRect($this->getSizeLabels()+10, $r); // Rev aded +10\r\n $this->labels->position = $tmpRes->position;\r\n }\r\n\r\n\r\n $tmp = $this->getSizeTickAxis() + $this->chart->getWalls()->calcWallSize($this);\r\n if ($tmp > 0) {\r\n $r = $this->inflateAxisRect($tmp, $r);\r\n }\r\n $this->posTitle = $this->applyPosition($this->posTitle, $r);\r\n $this->labels->position = $this->applyPosition($this->labels->position, $r);\r\n } else {\r\n $this->posAxis = $this->applyPosition($this->getRectangleEdge($r), $r);\r\n $this->labels->position = $this->inflateAxisPos($this->posAxis, $this->getSizeTickAxis());\r\n $this->posTitle = $this->inflateAxisPos($this->labels->position, $this->getSizeLabels());\r\n }\r\n\r\n return $r;\r\n }", "public function get_position(){ return $this->_position;}", "public function GetPosition()\n\t{\n\t\tif($this->position['horizontal'] != '' && $this->position['verticle'] != '')\n\t\t\treturn $this->position['horizontal'].$this->position['verticle'];\n\t\telse\n\t\t\treturn 'Invalid Position';\n\t}", "public function getPosition();", "public function getPosition();", "public function getPosition();", "function bevelRect($x1, $y1, $x2, $y2, $color1, $color2)\r\n {\r\n\r\n $resp = $this->forcePen();\r\n\r\n $resp .= $this->_getJavascriptVar() . \".strokeStyle = \\\"\" . $color1 . \"\\\";\\n\";\r\n $resp .= $this->drawLine(array($x1, $y2), array($x1, $y1));\r\n $resp .= $this->drawLine(array($x1, $y1), array($x2, $y1));\r\n $resp .= $this->_getJavascriptVar() . \".strokeStyle = \\\"\" . $color2 . \"\\\";\\n\";\r\n $resp .= $this->drawLine(array($x2, $y1), array($x2, $y2));\r\n $resp .= $this->drawLine(array($x2, $y2), array($x1, $y2));\r\n\r\n return $resp;\r\n }", "public function test_returnCompleteWebcamFromDeterminatePosition_getPosition_returnThisPosition():void\n {\n $testPosition = 0;\n $expectedResult = ['wbmerId' => '31840','wbmerThumb4' => '3d34412bed40ee22ab54781965e588ca.jpg'];\n $this->validatorStub->method('validationResult')->willReturn($this->webCamFakeData);\n $repository = new WhiteLabelRepository($this->validatorStub,null);\n $result = $repository->returnCompleteWebcamFromDeterminatePosition($testPosition);\n $this->assertEquals($result,$expectedResult);\n\n }", "public function setPosition($x, $y, $unit = null);", "private function bound_to_coord($bound){\r\n $vertices=$bound->getVertices();\r\n $polygon=[\r\n 'x1' => $vertices[0]->getX(),\r\n 'y1' => $vertices[0]->getY(),\r\n 'x2' => $vertices[1]->getX(),\r\n 'y2' => $vertices[1]->getY(),\r\n 'x3' => $vertices[2]->getX(),\r\n 'y3' => $vertices[2]->getY(),\r\n 'x4' => $vertices[3]->getX(),\r\n 'y4' => $vertices[3]->getY(),\r\n ];\r\n return $polygon;\r\n }", "public static function bounds()\n {\n return array(\n array(static::LAT_MIN, static::LNG_MIN),\n array(static::LAT_MAX, static::LNG_MAX),\n );\n }", "function RectPattern($aColor,$aWeight=1) {\n\t$this->color = $aColor;\n\t$this->weight = $aWeight;\t\t\n }", "function RoundedRect($x, $y, $w, $h, $r, $style = '', $angle = '1234')\n {\n $k = $this->k;\n $hp = $this->h;\n if($style=='F')\n $op='f';\n elseif($style=='FD' or $style=='DF')\n $op='B';\n else\n $op='S';\n $MyArc = 4/3 * (sqrt(2) - 1);\n $this->_out(sprintf('%.2f %.2f m',($x+$r)*$k,($hp-$y)*$k ));\n\n $xc = $x+$w-$r;\n $yc = $y+$r;\n $this->_out(sprintf('%.2f %.2f l', $xc*$k,($hp-$y)*$k ));\n if (strpos($angle, '2')===false)\n $this->_out(sprintf('%.2f %.2f l', ($x+$w)*$k,($hp-$y)*$k ));\n else\n $this->_Arc($xc + $r*$MyArc, $yc - $r, $xc + $r, $yc - $r*$MyArc, $xc + $r, $yc);\n\n $xc = $x+$w-$r;\n $yc = $y+$h-$r;\n $this->_out(sprintf('%.2f %.2f l',($x+$w)*$k,($hp-$yc)*$k));\n if (strpos($angle, '3')===false)\n $this->_out(sprintf('%.2f %.2f l',($x+$w)*$k,($hp-($y+$h))*$k));\n else\n $this->_Arc($xc + $r, $yc + $r*$MyArc, $xc + $r*$MyArc, $yc + $r, $xc, $yc + $r);\n\n $xc = $x+$r;\n $yc = $y+$h-$r;\n $this->_out(sprintf('%.2f %.2f l',$xc*$k,($hp-($y+$h))*$k));\n if (strpos($angle, '4')===false)\n $this->_out(sprintf('%.2f %.2f l',($x)*$k,($hp-($y+$h))*$k));\n else\n $this->_Arc($xc - $r*$MyArc, $yc + $r, $xc - $r, $yc + $r*$MyArc, $xc - $r, $yc);\n\n $xc = $x+$r ;\n $yc = $y+$r;\n $this->_out(sprintf('%.2f %.2f l',($x)*$k,($hp-$yc)*$k ));\n if (strpos($angle, '1')===false)\n {\n $this->_out(sprintf('%.2f %.2f l',($x)*$k,($hp-$y)*$k ));\n $this->_out(sprintf('%.2f %.2f l',($x+$r)*$k,($hp-$y)*$k ));\n }\n else\n $this->_Arc($xc - $r, $yc - $r*$MyArc, $xc - $r*$MyArc, $yc - $r, $xc, $yc - $r);\n $this->_out($op);\n }", "protected function _getBBox() {}", "function getShape() { return $this->_shape; }", "public function zoomRect($r) {\r\n $this->x0 = $r->getLeft();\r\n $this->y0 = $r->getTop();\r\n $this->x1 = $r->getRight();\r\n $this->y1 = $r->getBottom();\r\n $this->calcZoomPoints();\r\n }", "public function getMapCropBottomRight(): XY\n {\n return $this->mapCropBottomRight;\n }", "public function getMapCropTopLeft(): XY\n {\n return $this->mapCropTopLeft;\n }", "public static function position()\n {\n return static::$position;\n }", "public static function position()\n {\n return static::$position;\n }", "public function getPosition(){ }", "function getShape() { return $this->_shape; }", "public function position() {\n\t\treturn $this->position;\n\t}", "public function getPosition() {\n }", "function sloodle_login_zone_bounds($pos, $size)\n {\n // Make sure the parameters are valid types\n if (($pos == FALSE) || ($size == FALSE)) {\n return FALSE;\n }\n // Convert both to arrays\n $posarr = sloodle_vector_to_array($pos);\n $sizearr = sloodle_vector_to_array($size);\n // Calculate the bounds\n $max = array();\n $max['x'] = $posarr['x']+(($sizearr['x'])/2)-2;\n $max['y'] = $posarr['y']+(($sizearr['y'])/2)-2;\n $max['z'] = $posarr['z']+(($sizearr['z'])/2)-2;\n $min = array();\n $min['x'] = $posarr['x']-(($sizearr['x'])/2)+2;\n $min['y'] = $posarr['y']-(($sizearr['y'])/2)+2;\n $min['z'] = $posarr['z']-(($sizearr['z'])/2)+2;\n \n return array($max,$min);\n }", "function bevelRect($x1, $y1, $x2, $y2, $color1, $color2)\r\n {\r\n $this->forcePen();\r\n echo \"$this->_canvas.setColor(\\\"\" . $color1 . \"\\\");\\n\";\r\n echo \"$this->_canvas.drawLine($x1, $y2, $x1, $y1);\\n\";\r\n echo \"$this->_canvas.drawLine($x1, $y1, $x2, $y1);\\n\";\r\n echo \"$this->_canvas.setColor(\\\"\" . $color2 . \"\\\");\\n\";\r\n echo \"$this->_canvas.drawLine($x2, $y1, $x2, $y2);\\n\";\r\n echo \"$this->_canvas.drawLine($x2, $y2, $x1, $y2);\\n\";\r\n }", "protected function calculateSpritePositions() {}", "function getPosition()\n\t{\n\t\treturn $this->Info['Position'];\n\t}", "public function y() {\n return $this->coords[1];\n }", "function getPosition() {\n\t\t}", "public function setPosition()\n {\n // get the current position\n $currentX = $this->_pdf->getX();\n $currentY = $this->_pdf->getY();\n\n // save it\n $this->value['xc'] = $currentX;\n $this->value['yc'] = $currentY;\n\n if ($this->value['position']=='relative' || $this->value['position']=='absolute') {\n if ($this->value['right']!==null) {\n $x = $this->getLastWidth(true) - $this->value['right'] - $this->value['width'];\n if ($this->value['margin']['r']) $x-= $this->value['margin']['r'];\n } else {\n $x = $this->value['left'];\n if ($this->value['margin']['l']) $x+= $this->value['margin']['l'];\n }\n\n if ($this->value['bottom']!==null) {\n $y = $this->getLastHeight(true) - $this->value['bottom'] - $this->value['height'];\n if ($this->value['margin']['b']) $y-= $this->value['margin']['b'];\n } else {\n $y = $this->value['top'];\n if ($this->value['margin']['t']) $y+= $this->value['margin']['t'];\n }\n\n if ($this->value['position']=='relative') {\n $this->value['x'] = $currentX + $x;\n $this->value['y'] = $currentY + $y;\n } else {\n $this->value['x'] = $this->_getLastAbsoluteX()+$x;\n $this->value['y'] = $this->_getLastAbsoluteY()+$y;\n }\n } else {\n $this->value['x'] = $currentX;\n $this->value['y'] = $currentY;\n if ($this->value['margin']['l']) $this->value['x']+= $this->value['margin']['l'];\n if ($this->value['margin']['t']) $this->value['y']+= $this->value['margin']['t'];\n }\n\n // save the new position\n $this->_pdf->setXY($this->value['x'], $this->value['y']);\n }", "public function addRectangle(array $args = array()) {\n // Check input params\n if (!isset($args[\"width\"])) {\n throw new \\Exception(\"Param width is required. You can`t add rectangle without width\");\n }\n if (!isset($args[\"height\"])) {\n throw new \\Exception(\"Param height is required. You can`t add rectangle without height\");\n }\n\n $defaults = array(\n \"type\" => \"rectangle\",\n \"color\" => \"#ffffff\", // Font color\n \"width\" => 0, // Rectangle width\n \"height\" => 0, // Rectangle height\n \"z-index\" => count($this->objects) // Z-index of element\n );\n\n // Merge default params and user params\n $params = array_merge($this->default_params, $args);\n $this->objects[] = array_merge($defaults, $params);\n\n return $this;\n }", "public function __toString()\n {\n return $this->width . 'x' . $this->height;\n }", "public function __construct($x = 0, $y = 0) {\n $this->x = $x;\n $this->y = $y;\n $this->body = \"\";\n }", "public function drawRectangleMarker($X, $Y, array $Format = [])\n {\n $Size = isset($Format[\"Size\"]) ? $Format[\"Size\"] : 4;\n\n $HalfSize = floor($Size / 2);\n $this->drawFilledRectangle($X - $HalfSize, $Y - $HalfSize, $X + $HalfSize, $Y + $HalfSize, $Format);\n }", "public function drawRectangle($width, $height);" ]
[ "0.69350255", "0.688255", "0.61259276", "0.6108282", "0.59763074", "0.5968003", "0.5953375", "0.59226847", "0.56285876", "0.5618909", "0.55072004", "0.53764987", "0.5330377", "0.5321184", "0.5273294", "0.51717216", "0.5141965", "0.50781566", "0.5065568", "0.5065568", "0.5065568", "0.5065568", "0.5065568", "0.50424564", "0.50341624", "0.5000985", "0.5000985", "0.49756965", "0.49603793", "0.49536723", "0.49330842", "0.4929403", "0.4915652", "0.49110898", "0.49097645", "0.49090716", "0.4835179", "0.4819503", "0.48174018", "0.480339", "0.4795375", "0.4778108", "0.4736379", "0.47210026", "0.47109157", "0.4703393", "0.46959978", "0.46935165", "0.4668402", "0.46645886", "0.46645886", "0.4661102", "0.4660433", "0.46468222", "0.4641348", "0.46330827", "0.46314198", "0.45864892", "0.4564455", "0.4558545", "0.45564392", "0.45549276", "0.45527044", "0.4549998", "0.45391753", "0.45259443", "0.45247126", "0.45220223", "0.4517767", "0.4517767", "0.4517767", "0.45019755", "0.449432", "0.44910282", "0.4490768", "0.4483727", "0.44746014", "0.44684514", "0.44477713", "0.44452074", "0.44441366", "0.44327465", "0.4432494", "0.44285756", "0.44285756", "0.44260794", "0.4424197", "0.44228783", "0.43920654", "0.43845597", "0.43827012", "0.4363514", "0.43543598", "0.43523616", "0.43416774", "0.4341119", "0.43381286", "0.43343636", "0.43300426", "0.43209493", "0.43171307" ]
0.0
-1
Generated from protobuf field .Rect location = 2;
public function setLocation($var) { GPBUtil::checkMessage($var, \Rect::class); $this->location = $var; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getRect() {}", "public function rect($x, $y, $width, $height) {}", "public function getRectangle() {}", "public function setRect(\\SetaPDF_Core_DataStructure_Rectangle $rect) {}", "public abstract function getBoundingBox(): Rectangle;", "public function rect($x1, $y1, $width, $height, $style = self::STYLE_DRAW) {}", "public static function invalidMarkerShapeRectCoordinates()\n {\n return new static(sprintf(\n '%s'.PHP_EOL.'%s',\n 'The coordinates setter arguments is invalid if the marker shape type is rect.',\n 'The available prototype is : function setCoordinates('.\n 'array(double $x1, double $y1, double $x2, double $y2)'.\n ')'\n ));\n }", "public function getRect()\n {\n $x1 = min([$this->p1->x, $this->p2->x, $this->p3->x]);\n $y1 = min([$this->p1->y, $this->p2->y, $this->p3->y]);\n $x2 = max([$this->p1->x, $this->p2->x, $this->p3->x]);\n $y2 = max([$this->p1->y, $this->p2->y, $this->p3->y]);\n\n return [new Point($x1, $y1), new Point($x2, $y2)];\n }", "public static function invalidRectangleBoundCoordinates()\n {\n return new static('A rectangle bound must have a south west & a north east coordinate.');\n }", "public function getBoundingBox() {}", "function makeRectangle(array $point, $width, $height)\n{\n return [\n 'point' => $point,\n 'width' => $width,\n 'height' => $height\n ];\n}", "function bbox(string $id): Rect {\n if (!isset($this->features[$id]))\n return new Rect([41, -4, 51, 10]);\n else\n return $this->features[$id]['bbox'];\n }", "public static function invalidRectangleBound()\n {\n return new static(sprintf(\n '%s'.PHP_EOL.'%s'.PHP_EOL.'%s'.PHP_EOL.'%s'.PHP_EOL.'%s',\n 'The bound setter arguments is invalid.',\n 'The available prototypes are :',\n ' - function setBound(Fungio\\GoogleMap\\Base\\Bound $bound)',\n ' - function setBount('.\n 'Fungio\\GoogleMap\\Base\\Coordinate $southWest, '.\n 'Fungio\\GoogleMap\\Base\\Coordinate $northEast'.\n ')',\n ' - function setBound('.\n 'double $southWestLatitude, '.\n 'double $southWestLongitude, '.\n 'double $northEastLatitude, '.\n 'double $northEastLongitude, '.\n 'boolean southWestNoWrap = true, '.\n 'boolean $northEastNoWrap = true'.\n ')'\n ));\n }", "public function getDifferencesRect() {}", "public function contains($otherRect) {}", "function SetPos($aRect) {\n\tassert( $this->prect != null ) ;\n\t$this->prect->SetPos($aRect);\n }", "public function getPosY();", "public function getPos() {}", "public function getPos() {}", "public function getPos() {}", "public function getPos() {}", "public function getPos() {}", "public function getBounds();", "public function getRectangles()\n {\n return $this->rectangles;\n }", "public function getPos();", "public function getPos();", "public function getBBox($asRect = true) {}", "public function setDifferencesRect(\\SetaPDF_Core_DataStructure_Rectangle $differencesRect) {}", "public function getShape(): object {\n return (object) ['m' => $this->row, 'n' => $this->col];\n }", "public function position();", "function frameRect($x1, $y1, $x2, $y2)\r\n {\r\n $this->forcePen();\r\n $this->forceBrush();\r\n echo \"$this->_canvas.drawRect($x1, $y1, $x2-$x1+1, $y2-$y1+1);\\n\";\r\n }", "public function getCoord(){\n return $this->coord;\n }", "public static function create($rectangle) {}", "function drawRect(&$im,$coords,$c1,$c2,$a_x_ratio = 1, $a_y_ratio = 1)\n\t{\n\t\t$coord=explode(\",\", $coords);\n\n\t\t$this->drawLine($im, $coord[0] / $a_x_ratio, $coord[1] / $a_y_ratio,\n\t\t\t$coord[0] / $a_x_ratio, $coord[3] / $a_y_ratio, $c1, $c2);\n\t\t$this->drawLine($im, $coord[0] / $a_x_ratio, $coord[3] / $a_y_ratio,\n\t\t\t$coord[2] / $a_x_ratio, $coord[3] / $a_y_ratio, $c1, $c2);\n\t\t$this->drawLine($im, $coord[2] / $a_x_ratio, $coord[3] / $a_y_ratio,\n\t\t\t$coord[2] / $a_x_ratio, $coord[1] / $a_y_ratio, $c1, $c2);\n\t\t$this->drawLine($im, $coord[2] / $a_x_ratio, $coord[1] / $a_y_ratio,\n\t\t\t$coord[0] / $a_x_ratio, $coord[1] / $a_y_ratio, $c1, $c2);\n\t}", "public function bounds(int $spriteId): ?Rectangle\n {\n return Streams::wrap($this->placeObjectMatrices($spriteId))\n ->mapKey(function (array $matrices, $characterId) {\n return $this->assetBounds($characterId);\n })\n ->filter(function (array $matrices, $key) {\n return $key !== null;\n })\n ->flatMap(function (array $matrices, Rectangle $bounds) {\n return Streams::wrap($matrices)->map([$bounds, 'transform']);\n })\n ->reduce(function (?Rectangle $a, Rectangle $b) {\n return $a ? $a->merge($b) : $b;\n })\n ;\n }", "public static function byRectangle($rectangle) {}", "abstract public function coordinates();", "function Rectangle($x1,$y1,$x2,$y2) {\n parent::Rectangle($x1,$y1,$x2,$y2);\n }", "public function shape(): string\n\t{\n\t\treturn \"Rectangle\";\n\t}", "private function findRectangleMove()\n\t{\n\t\t$moves = array();\n\t\t\n\t\t// Top Area\n\t\ttry\n\t\t{\n\t\t\tif(\n\t\t\t\t$this->board[3][-1]->hasMarble &&\n\t\t\t\t$this->board[3][0]->hasMarble &&\n\t\t\t\t$this->board[3][1]->hasMarble &&\n\t\t\t\t$this->board[2][-1]->hasMarble &&\n\t\t\t\t$this->board[2][0]->hasMarble &&\n\t\t\t\t$this->board[2][1]->hasMarble\n\t\t\t)\n\t\t\t{\n\t\t\t\tif(\n\t\t\t\t\t!$this->board[1][0]->hasMarble && !$this->board[1][-1]->hasMarble &&\n\t\t\t\t\t($this->board[1][1]->hasMarble && !$this->board[0][1]->hasMarble) ||\n\t\t\t\t\t(!$this->board[1][1]->hasMarble && $this->board[0][1]->hasMarble)\n\t\t\t\t)\n\t\t\t\t{\n\t\t\t\t\t$moves[0] = array();\n\t\t\t\t\t\n\t\t\t\t\t$moves[0][] = array('down', 3, -1);\n\t\t\t\t\t$moves[0][] = array('down', 3, 0);\n\t\t\t\t\t\n\t\t\t\t\tif(!$this->board[1][1]->hasMarble)\n\t\t\t\t\t{\n\t\t\t\t\t\t$moves[0][] = array('down', 3, 1);\n\t\t\t\t\t\t$moves[0][] = array('up', 0, 1);\n\t\t\t\t\t\t$moves[0][] = array('right', 1, -1);\n\t\t\t\t\t\t$moves[0][] = array('down', 2, 1);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$moves[0][] = array('down', 2, 1);\n\t\t\t\t\t\t$moves[0][] = array('right', 1, -1);\n\t\t\t\t\t\t$moves[0][] = array('up', 0, 1);\n\t\t\t\t\t\t$moves[0][] = array('down', 3, 1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(\n\t\t\t\t\t!$this->board[1][0]->hasMarble && !$this->board[1][1]->hasMarble &&\n\t\t\t\t\t($this->board[1][-1]->hasMarble && !$this->board[0][-1]->hasMarble) ||\n\t\t\t\t\t(!$this->board[1][-1]->hasMarble && $this->board[0][-1]->hasMarble)\n\t\t\t\t)\n\t\t\t\t{\n\t\t\t\t\t$moves[1] = array();\n\t\t\t\t\t\n\t\t\t\t\t$moves[1][] = array('down', 3, 1);\n\t\t\t\t\t$moves[1][] = array('down', 3, 0);\n\t\t\t\t\t\n\t\t\t\t\tif(!$this->board[1][-1]->hasMarble)\n\t\t\t\t\t{\n\t\t\t\t\t\t$moves[1][] = array('down', 3, -1);\n\t\t\t\t\t\t$moves[1][] = array('up', 0, -1);\n\t\t\t\t\t\t$moves[1][] = array('left', 1, 1);\n\t\t\t\t\t\t$moves[1][] = array('down', 2, -1);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$moves[1][] = array('down', 2, -1);\n\t\t\t\t\t\t$moves[1][] = array('left', 1, 1);\n\t\t\t\t\t\t$moves[1][] = array('up', 0, -1);\n\t\t\t\t\t\t$moves[1][] = array('down', 3, -1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif($this->board[1][0]->hasMarble && !$this->board[1][-1]->hasMarble && !$this->board[1][-2]->hasMarble)\n\t\t\t\t{\n\t\t\t\t\t$moves[2] = array();\n\t\t\t\t\t\n\t\t\t\t\t$moves[2][] = array('down', 3, -1);\n\t\t\t\t\t$moves[2][] = array('left', 1, 0);\n\t\t\t\t\t$moves[2][] = array('left', 3, 1);\n\t\t\t\t\t$moves[2][] = array('left', 2, 1);\n\t\t\t\t\t$moves[2][] = array('down', 3, -1);\n\t\t\t\t\t$moves[2][] = array('right', 1, -2);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(!$this->board[1][0]->hasMarble && !$this->board[1][-1]->hasMarble && $this->board[1][-2]->hasMarble)\n\t\t\t\t{\n\t\t\t\t\t$moves[3] = array();\n\t\t\t\t\t\n\t\t\t\t\t$moves[3][] = array('down', 3, -1);\n\t\t\t\t\t$moves[3][] = array('right', 1, -2);\n\t\t\t\t\t$moves[3][] = array('left', 3, 1);\n\t\t\t\t\t$moves[3][] = array('left', 2, 1);\n\t\t\t\t\t$moves[3][] = array('down', 3, -1);\n\t\t\t\t\t$moves[3][] = array('left', 1, 0);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif($this->board[1][0]->hasMarble && !$this->board[1][1]->hasMarble && !$this->board[1][2]->hasMarble)\n\t\t\t\t{\n\t\t\t\t\t$moves[4] = array();\n\t\t\t\t\t\n\t\t\t\t\t$moves[4][] = array('down', 3, 1);\n\t\t\t\t\t$moves[4][] = array('right', 1, 0);\n\t\t\t\t\t$moves[4][] = array('right', 3, -1);\n\t\t\t\t\t$moves[4][] = array('right', 2, -1);\n\t\t\t\t\t$moves[4][] = array('down', 3, 1);\n\t\t\t\t\t$moves[4][] = array('left', 1, 2);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(!$this->board[1][0]->hasMarble && !$this->board[1][1]->hasMarble && $this->board[1][2]->hasMarble)\n\t\t\t\t{\n\t\t\t\t\t$moves[5] = array();\n\t\t\t\t\t\n\t\t\t\t\t$moves[5][] = array('down', 3, 1);\n\t\t\t\t\t$moves[5][] = array('left', 1, 2);\n\t\t\t\t\t$moves[5][] = array('right', 3, -1);\n\t\t\t\t\t$moves[5][] = array('right', 2, -1);\n\t\t\t\t\t$moves[5][] = array('down', 3, 1);\n\t\t\t\t\t$moves[5][] = array('right', 1, 0);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch(Exception $e) {};\n\t\t\n\t\t\n\t\t// Down Area\n\t\ttry\n\t\t{\n\t\t\tif(\n\t\t\t\t$this->board[-3][-1]->hasMarble &&\n\t\t\t\t$this->board[-3][0]->hasMarble &&\n\t\t\t\t$this->board[-3][1]->hasMarble &&\n\t\t\t\t$this->board[-2][-1]->hasMarble &&\n\t\t\t\t$this->board[-2][0]->hasMarble &&\n\t\t\t\t$this->board[-2][1]->hasMarble\n\t\t\t)\n\t\t\t{\n\t\t\t\tif(\n\t\t\t\t\t!$this->board[-1][0]->hasMarble && !$this->board[-1][-1]->hasMarble &&\n\t\t\t\t\t($this->board[-1][1]->hasMarble && !$this->board[0][1]->hasMarble) ||\n\t\t\t\t\t(!$this->board[-1][1]->hasMarble && $this->board[0][1]->hasMarble)\n\t\t\t\t)\n\t\t\t\t{\n\t\t\t\t\t$moves[6] = array();\n\t\t\t\t\t\n\t\t\t\t\t$moves[6][] = array('up', -3, -1);\n\t\t\t\t\t$moves[6][] = array('up', -3, 0);\n\t\t\t\t\t\n\t\t\t\t\tif(!$this->board[-1][1]->hasMarble)\n\t\t\t\t\t{\n\t\t\t\t\t\t$moves[6][] = array('up', -3, 1);\n\t\t\t\t\t\t$moves[6][] = array('down', 0, 1);\n\t\t\t\t\t\t$moves[6][] = array('right', -1, -1);\n\t\t\t\t\t\t$moves[6][] = array('up', -2, 1);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$moves[6][] = array('up', -2, 1);\n\t\t\t\t\t\t$moves[6][] = array('right', -1, -1);\n\t\t\t\t\t\t$moves[6][] = array('down', 0, 1);\n\t\t\t\t\t\t$moves[6][] = array('up', -3, 1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(\n\t\t\t\t\t!$this->board[1][0]->hasMarble && !$this->board[1][1]->hasMarble &&\n\t\t\t\t\t($this->board[-1][-1]->hasMarble && !$this->board[0][-1]->hasMarble) ||\n\t\t\t\t\t(!$this->board[-1][-1]->hasMarble && $this->board[0][-1]->hasMarble)\n\t\t\t\t)\n\t\t\t\t{\n\t\t\t\t\t$moves[7] = array();\n\t\t\t\t\t\n\t\t\t\t\t$moves[7][] = array('up', -3, 1);\n\t\t\t\t\t$moves[7][] = array('up', -3, 0);\n\t\t\t\t\t\n\t\t\t\t\tif(!$this->board[-1][-1]->hasMarble)\n\t\t\t\t\t{\n\t\t\t\t\t\t$moves[7][] = array('up', -3, -1);\n\t\t\t\t\t\t$moves[7][] = array('down', 0, -1);\n\t\t\t\t\t\t$moves[7][] = array('left', -1, 1);\n\t\t\t\t\t\t$moves[7][] = array('up', -2, -1);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$moves[7][] = array('up', -2, -1);\n\t\t\t\t\t\t$moves[7][] = array('left', -1, 1);\n\t\t\t\t\t\t$moves[7][] = array('down', 0, -1);\n\t\t\t\t\t\t$moves[7][] = array('up', -3, -1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif($this->board[-1][0]->hasMarble && !$this->board[-1][1]->hasMarble && !$this->board[-1][-2]->hasMarble)\n\t\t\t\t{\n\t\t\t\t\t$moves[8] = array();\n\t\t\t\t\t\n\t\t\t\t\t$moves[8][] = array('up', -3, -1);\n\t\t\t\t\t$moves[8][] = array('left', -1, 0);\n\t\t\t\t\t$moves[8][] = array('left', -3, 1);\n\t\t\t\t\t$moves[8][] = array('left', -2, 1);\n\t\t\t\t\t$moves[8][] = array('up', -3, -1);\n\t\t\t\t\t$moves[8][] = array('right', -1, -2);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(!$this->board[-1][0]->hasMarble && !$this->board[-1][1]->hasMarble && $this->board[-1][-2]->hasMarble)\n\t\t\t\t{\n\t\t\t\t\t$moves[9] = array();\n\t\t\t\t\t\n\t\t\t\t\t$moves[9][] = array('up', -3, -1);\n\t\t\t\t\t$moves[9][] = array('right', -1, -2);\n\t\t\t\t\t$moves[9][] = array('left', -3, 1);\n\t\t\t\t\t$moves[9][] = array('left', -2, 1);\n\t\t\t\t\t$moves[9][] = array('up', -3, -1);\n\t\t\t\t\t$moves[9][] = array('left', -1, 0);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif($this->board[-1][0]->hasMarble && !$this->board[-1][1]->hasMarble && !$this->board[-1][2]->hasMarble)\n\t\t\t\t{\n\t\t\t\t\t$moves[10] = array();\n\t\t\t\t\t\n\t\t\t\t\t$moves[10][] = array('up', -3, 1);\n\t\t\t\t\t$moves[10][] = array('right', -1, 0);\n\t\t\t\t\t$moves[10][] = array('right', -3, -1);\n\t\t\t\t\t$moves[10][] = array('right', -2, -1);\n\t\t\t\t\t$moves[10][] = array('up', -3, 1);\n\t\t\t\t\t$moves[10][] = array('left', -1, 2);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(!$this->board[-1][0]->hasMarble && !$this->board[-1][1]->hasMarble && $this->board[-1][2]->hasMarble)\n\t\t\t\t{\n\t\t\t\t\t$moves[11] = array();\n\t\t\t\t\t\n\t\t\t\t\t$moves[11][] = array('up', -3, 1);\n\t\t\t\t\t$moves[11][] = array('left', -1, 2);\n\t\t\t\t\t$moves[11][] = array('right', -3, -1);\n\t\t\t\t\t$moves[11][] = array('right', -2, -1);\n\t\t\t\t\t$moves[11][] = array('up', -3, 1);\n\t\t\t\t\t$moves[11][] = array('right', -1, 0);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch(Exception $e) {};\n\t\t\n\t\t\n\t\t// Left Area\n\t\ttry\n\t\t{\n\t\t\tif(\n\t\t\t\t$this->board[1][-3]->hasMarble &&\n\t\t\t\t$this->board[1][-2]->hasMarble &&\n\t\t\t\t$this->board[0][-3]->hasMarble &&\n\t\t\t\t$this->board[0][-2]->hasMarble &&\n\t\t\t\t$this->board[-1][-3]->hasMarble &&\n\t\t\t\t$this->board[-1][-2]->hasMarble\n\t\t\t)\n\t\t\t{\n\t\t\t\tif(\n\t\t\t\t\t!$this->board[0][-1]->hasMarble && !$this->board[-1][-1]->hasMarble &&\n\t\t\t\t\t($this->board[1][-1]->hasMarble && !$this->board[1][0]->hasMarble) ||\n\t\t\t\t\t(!$this->board[1][-1]->hasMarble && $this->board[1][0]->hasMarble)\n\t\t\t\t)\n\t\t\t\t{\n\t\t\t\t\t$moves[12] = array();\n\t\t\t\t\t\n\t\t\t\t\t$moves[12][] = array('right', 0, -3);\n\t\t\t\t\t$moves[12][] = array('right', -1, -3);\n\t\t\t\t\t\n\t\t\t\t\tif(!$this->board[1][-1]->hasMarble)\n\t\t\t\t\t{\n\t\t\t\t\t\t$moves[12][] = array('right', 1, -3);\n\t\t\t\t\t\t$moves[12][] = array('left', 1, 0);\n\t\t\t\t\t\t$moves[12][] = array('up', -1, -1);\n\t\t\t\t\t\t$moves[12][] = array('right', 1, -2);\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$moves[12][] = array('right', 1, -2);\n\t\t\t\t\t\t$moves[12][] = array('up', -1, -1);\n\t\t\t\t\t\t$moves[12][] = array('left', 1, 0);\n\t\t\t\t\t\t$moves[12][] = array('right', 1, -3);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(\n\t\t\t\t\t!$this->board[0][-1]->hasMarble && !$this->board[1][-1]->hasMarble &&\n\t\t\t\t\t($this->board[-1][-1]->hasMarble && !$this->board[-1][0]->hasMarble) ||\n\t\t\t\t\t(!$this->board[-1][-1]->hasMarble && $this->board[-1][0]->hasMarble)\n\t\t\t\t)\n\t\t\t\t{\n\t\t\t\t\t$moves[13] = array();\n\t\t\t\t\t\n\t\t\t\t\t$moves[13][] = array('right', 0, -3);\n\t\t\t\t\t$moves[13][] = array('right', 1, -3);\n\t\t\t\t\t\n\t\t\t\t\tif(!$this->board[-1][-1]->hasMarble)\n\t\t\t\t\t{\n\t\t\t\t\t\t$moves[13][] = array('right', -1, -3);\n\t\t\t\t\t\t$moves[13][] = array('left', -1, 0);\n\t\t\t\t\t\t$moves[13][] = array('down', 1, -1);\n\t\t\t\t\t\t$moves[13][] = array('right', -1, -2);\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$moves[13][] = array('right', -1, -2);\n\t\t\t\t\t\t$moves[13][] = array('down', 1, -1);\n\t\t\t\t\t\t$moves[13][] = array('left', -1, 0);\n\t\t\t\t\t\t$moves[13][] = array('right', -1, -3);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif($this->board[0][-1]->hasMarble && !$this->board[1][-1]->hasMarble && !$this->board[2][-1]->hasMarble)\n\t\t\t\t{\n\t\t\t\t\t$moves[14] = array();\n\t\t\t\t\t\n\t\t\t\t\t$moves[14][] = array('right', 1, -3);\n\t\t\t\t\t$moves[14][] = array('up', 0, -1);\n\t\t\t\t\t$moves[14][] = array('up', -1, -3);\n\t\t\t\t\t$moves[14][] = array('up', -1, -2);\n\t\t\t\t\t$moves[14][] = array('right', 1, -3);\n\t\t\t\t\t$moves[14][] = array('down', 2, -1);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(!$this->board[0][-1]->hasMarble && !$this->board[1][-1]->hasMarble && $this->board[2][-1]->hasMarble)\n\t\t\t\t{\n\t\t\t\t\t$moves[15] = array();\n\t\t\t\t\t\n\t\t\t\t\t$moves[15][] = array('right', 1, -3);\n\t\t\t\t\t$moves[15][] = array('down', 2, -1);\n\t\t\t\t\t$moves[15][] = array('up', -1, -3);\n\t\t\t\t\t$moves[15][] = array('up', -1, -2);\n\t\t\t\t\t$moves[15][] = array('right', 1, -3);\n\t\t\t\t\t$moves[15][] = array('up', 0, -1);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif($this->board[0][-1]->hasMarble && !$this->board[-1][-1]->hasMarble && !$this->board[-2][-1]->hasMarble)\n\t\t\t\t{\n\t\t\t\t\t$moves[16] = array();\n\t\t\t\t\t\n\t\t\t\t\t$moves[16][] = array('right', -1, -3);\n\t\t\t\t\t$moves[16][] = array('down', 0, -1);\n\t\t\t\t\t$moves[16][] = array('down', 1, -3);\n\t\t\t\t\t$moves[16][] = array('down', 1, -2);\n\t\t\t\t\t$moves[16][] = array('right', -1, -3);\n\t\t\t\t\t$moves[16][] = array('up', -2, -1);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(!$this->board[0][-1]->hasMarble && !$this->board[-1][-1]->hasMarble && $this->board[-2][-1]->hasMarble)\n\t\t\t\t{\n\t\t\t\t\t$moves[17] = array();\n\t\t\t\t\t\n\t\t\t\t\t$moves[17][] = array('right', -1, -3);\n\t\t\t\t\t$moves[17][] = array('up', -2, -1);\n\t\t\t\t\t$moves[17][] = array('down', 1, -3);\n\t\t\t\t\t$moves[17][] = array('down', 1, -2);\n\t\t\t\t\t$moves[17][] = array('right', -1, -3);\n\t\t\t\t\t$moves[17][] = array('down', 0, -1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch(Exception $e) {};\n\t\t\n\t\t\n\t\t// Right Area\n\t\ttry\n\t\t{\n\t\t\tif(\n\t\t\t\t$this->board[1][3]->hasMarble &&\n\t\t\t\t$this->board[1][2]->hasMarble &&\n\t\t\t\t$this->board[0][3]->hasMarble &&\n\t\t\t\t$this->board[0][2]->hasMarble &&\n\t\t\t\t$this->board[-1][3]->hasMarble &&\n\t\t\t\t$this->board[-1][2]->hasMarble\n\t\t\t)\n\t\t\t{\n\t\t\t\tif(\n\t\t\t\t\t!$this->board[0][1]->hasMarble && !$this->board[-1][1]->hasMarble &&\n\t\t\t\t\t($this->board[1][1]->hasMarble && !$this->board[1][0]->hasMarble) ||\n\t\t\t\t\t(!$this->board[1][1]->hasMarble && $this->board[1][0]->hasMarble)\n\t\t\t\t)\n\t\t\t\t{\n\t\t\t\t\t$moves[18] = array();\n\t\t\t\t\t\n\t\t\t\t\t$moves[18][] = array('left', 0, 3);\n\t\t\t\t\t$moves[18][] = array('left', -1, 3);\n\t\t\t\t\t\n\t\t\t\t\tif(!$this->board[1][1]->hasMarble)\n\t\t\t\t\t{\n\t\t\t\t\t\t$moves[18][] = array('left', 1, 3);\n\t\t\t\t\t\t$moves[18][] = array('right', 1, 0);\n\t\t\t\t\t\t$moves[18][] = array('up', -1, 1);\n\t\t\t\t\t\t$moves[18][] = array('left', 1, 2);\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$moves[18][] = array('left', 1, 2);\n\t\t\t\t\t\t$moves[18][] = array('up', -1, 1);\n\t\t\t\t\t\t$moves[18][] = array('right', 1, 0);\n\t\t\t\t\t\t$moves[18][] = array('left', 1, 3);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif(\n\t\t\t\t\t!$this->board[0][1]->hasMarble && !$this->board[1][1]->hasMarble &&\n\t\t\t\t\t($this->board[-1][1]->hasMarble && !$this->board[-1][0]->hasMarble) ||\n\t\t\t\t\t(!$this->board[-1][1]->hasMarble && $this->board[-1][0]->hasMarble)\n\t\t\t\t)\n\t\t\t\t{\n\t\t\t\t\t$moves[19] = array();\n\t\t\t\t\t\n\t\t\t\t\t$moves[19][] = array('left', 0, 3);\n\t\t\t\t\t$moves[19][] = array('left', 1, 3);\n\t\t\t\t\t\n\t\t\t\t\tif(!$this->board[-1][1]->hasMarble)\n\t\t\t\t\t{\n\t\t\t\t\t\t$moves[19][] = array('left', -1, 3);\n\t\t\t\t\t\t$moves[19][] = array('right', -1, 0);\n\t\t\t\t\t\t$moves[19][] = array('down', 1, 1);\n\t\t\t\t\t\t$moves[19][] = array('left', -1, 2);\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$moves[19][] = array('left', -1, 2);\n\t\t\t\t\t\t$moves[19][] = array('down', 1, 1);\n\t\t\t\t\t\t$moves[19][] = array('right', -1, 0);\n\t\t\t\t\t\t$moves[19][] = array('left', -1, 3);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif($this->board[0][1]->hasMarble && !$this->board[1][1]->hasMarble && !$this->board[2][1]->hasMarble)\n\t\t\t\t{\n\t\t\t\t\t$moves[20] = array();\n\t\t\t\t\t\n\t\t\t\t\t$moves[20][] = array('left', 1, 3);\n\t\t\t\t\t$moves[20][] = array('up', 0, 1);\n\t\t\t\t\t$moves[20][] = array('up', -1, 3);\n\t\t\t\t\t$moves[20][] = array('up', -1, 2);\n\t\t\t\t\t$moves[20][] = array('left', 1, 3);\n\t\t\t\t\t$moves[20][] = array('down', 2, 1);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(!$this->board[0][1]->hasMarble && !$this->board[1][1]->hasMarble && $this->board[2][1]->hasMarble)\n\t\t\t\t{\n\t\t\t\t\t$moves[21] = array();\n\t\t\t\t\t\n\t\t\t\t\t$moves[21][] = array('left', 1, 3);\n\t\t\t\t\t$moves[21][] = array('down', 2, 1);\n\t\t\t\t\t$moves[21][] = array('up', -1, 3);\n\t\t\t\t\t$moves[21][] = array('up', -1, 2);\n\t\t\t\t\t$moves[21][] = array('left', 1, 3);\n\t\t\t\t\t$moves[21][] = array('up', 0, 1);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif($this->board[0][1]->hasMarble && !$this->board[-1][1]->hasMarble && !$this->board[-2][1]->hasMarble)\n\t\t\t\t{\n\t\t\t\t\t$moves[22] = array();\n\t\t\t\t\t\n\t\t\t\t\t$moves[22][] = array('left', -1, 3);\n\t\t\t\t\t$moves[22][] = array('down', 0, 1);\n\t\t\t\t\t$moves[22][] = array('down', 1, 3);\n\t\t\t\t\t$moves[22][] = array('down', 1, 2);\n\t\t\t\t\t$moves[22][] = array('left', -1, 3);\n\t\t\t\t\t$moves[22][] = array('up', -2, 1);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(!$this->board[0][1]->hasMarble && !$this->board[-1][1]->hasMarble && $this->board[-2][1]->hasMarble)\n\t\t\t\t{\n\t\t\t\t\t$moves[23] = array();\n\t\t\t\t\t\n\t\t\t\t\t$moves[23][] = array('left', -1, 3);\n\t\t\t\t\t$moves[23][] = array('up', -2, 1);\n\t\t\t\t\t$moves[23][] = array('down', 1, 3);\n\t\t\t\t\t$moves[23][] = array('down', 1, 2);\n\t\t\t\t\t$moves[23][] = array('left', -1, 3);\n\t\t\t\t\t$moves[23][] = array('down', 0, 1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch(Exception $e) {};\n\t\t\n\t\treturn $moves;\n\t}", "public function position()\n\t{\n\t\treturn $this->getField('position');\n\t}", "public function bbox()\n {\n $minX = PHP_INT_MAX;\n $minY = PHP_INT_MAX;\n $maxX = PHP_INT_MIN;\n $maxY = PHP_INT_MIN;\n $n = 0;\n\n foreach($this->coordinates() as $xy)\n {\n list($x, $y) = $xy;\n $minX = min($minX, $x);\n $minY = min($minY, $y);\n $maxX = max($maxX, $x);\n $maxY = max($maxY, $y);\n $n++;\n }\n\n if($n > 0)\n {\n return array($minX, $minY, $maxX, $maxY);\n }\n else\n {\n return false;\n }\n }", "private function createRectangleArea(array $coords)\r\n {\r\n $coords[0] = $this->checkParametersAreNumeric($coords[0]);\r\n $coords[1] = $this->checkParametersAreNumeric($coords[1]);\r\n $a = new Coords($coords[0][0], $coords[0][1]);\r\n $b = new Coords($coords[1][0], $coords[1][1]);\r\n $this->area = new RectangleArea();\r\n $this->area->addCoordinates($a, $b);\r\n $this->area->calcAreaData();\r\n\r\n }", "public static function size ()\n {\n return ['x' => static::$_map_width, 'y' => static::$_map_height];\n }", "function AbsolutePosition() {}", "public static function setPosition(int $x, int $y) {}", "public function createRectangle()\n {\n imagefilledrectangle($this->image, 0, 0, $this->width, $this->height, imagecolorallocate($this->image, 255, 255, 255));\n }", "private function readXYBoundingBox()\n {\n // Variables are used here because the order of the output array elements is different!\n $xmin = $this->readDoubleL(Shapefile::FILE_SHP);\n $ymin = $this->readDoubleL(Shapefile::FILE_SHP);\n $xmax = $this->readDoubleL(Shapefile::FILE_SHP);\n $ymax = $this->readDoubleL(Shapefile::FILE_SHP);\n return [\n 'xmin' => $xmin,\n 'xmax' => $xmax,\n 'ymin' => $ymin,\n 'ymax' => $ymax,\n ];\n }", "public function getPosition() {}", "public function getPosition() {}", "function rectangle($x1, $y1, $x2, $y2)\r\n {\r\n $resp = \"\";\r\n $resp .= $this->forceBrush();\r\n $resp .= $this->_getJavascriptVar() . \".fillRect($x1, $y1, $x2 - $x1 + 1, $y2 - $y1 + 1);\\n\";\r\n $resp .= $this->forcePen();\r\n $resp .= $this->_getJavascriptVar() . \".strokeRect($x1, $y1, $x2 - $x1 + 1, $y2 - $y1 + 1);\\n\";\r\n\r\n return $resp;\r\n }", "private function assetBounds(int $characterId): ?Rectangle\n {\n return $this->file->toXml()->shape($characterId)\n ->map(function (SimpleXMLElement $shape) {\n // A shape is found\n return new Rectangle(\n (int) $shape->shapeBounds['Xmin'],\n (int) $shape->shapeBounds['Xmax'],\n (int) $shape->shapeBounds['Ymin'],\n (int) $shape->shapeBounds['Ymax']\n );\n })\n ->orSupply(function () use($characterId) {\n // Check for nested sprite\n return $this->bounds($characterId);\n })\n ;\n }", "public function getPos()\n {\n return $this->pos;\n }", "public function getElementPosition($infobox, $corner);", "public abstract function getOrigin(): Point;", "public function getBounds()\n {\n return $this->bounds;\n }", "protected function addRectangleSection(ArrayNodeDefinition $node)\n {\n $node\n ->children()\n ->arrayNode('rectangle')->addDefaultsIfNotSet()\n ->children()\n ->scalarNode('class')->end()\n ->scalarNode('helper_class')->end()\n ->scalarNode('prefix_javascript_variable')->end()\n ->arrayNode('bound')->addDefaultsIfNotSet()\n ->children()\n ->arrayNode('south_west')->addDefaultsIfNotSet()\n ->children()\n ->scalarNode('latitude')->end()\n ->scalarNode('longitude')->end()\n ->scalarNode('no_wrap')->end()\n ->end()\n ->end()\n ->arrayNode('north_east')->addDefaultsIfNotSet()\n ->children()\n ->scalarNode('latitude')->end()\n ->scalarNode('longitude')->end()\n ->scalarNode('no_wrap')->end()\n ->end()\n ->end()\n ->end()\n ->end()\n ->arrayNode('options')\n ->useAttributeAsKey('options')\n ->prototype('scalar')->end()\n ->end()\n ->end()\n ->end()\n ->end();\n }", "public static function getWindowPosition() : \\raylib\\Vector2 {}", "public function getCoords()\n\t{\n\t\treturn $this->coords;\n\t}", "public function setPosition() {\n }", "public function setPosY($posY);", "function position( $x, $y )\n\t{\n\t\t$this->x = $x;\n\t\t$this->y = $y;\n\t}", "public function getCoordinates();", "function rectangle($x1,$y1,$width,$height)\n\t{\n\t\t$point = $this->rotateXY($x1, $y1);\n\t\t//$point = $this->rotateRadial($x1, $y1);\n\t\t$x1 = $point['x'];\n\t\t$y1 = $point['y'];\n\t\tif(rad2deg($this->rotation) == 90 || rad2deg($this->rotation) == -90)\n\t\t{\n\t\t\t$temp = $width;\n\t\t\t$width = $height;\n\t\t\t$height = $temp;\n\t\t\t$y1 -= $height;\n\t\t}\n\t\treturn parent::rectangle($x1,$y1,$width,$height);\n\t}", "public function calcRect($r, $inflateChartRectangle) {\r\n $this->iAxisDateTime = $this->isDateTime();\r\n\r\n if ($inflateChartRectangle) {\r\n // new? todo CalcLabelsResults tmpRes;\r\n\r\n if ($this->isDepthAxis) {\r\n if ($this->otherSide) {\r\n $this->posTitle = $r->getRight();\r\n } else {\r\n $this->posTitle = $r->getLeft();\r\n }\r\n } else {\r\n if (($this->axisTitle != null) && $this->axisTitle->getVisible() &&\r\n (strlen($this->axisTitle->getCaption()) != 0)) {\r\n\r\n $tmpRes = $this->calcLabelsRect($this->internalCalcSize(\r\n $this->axisTitle->getFont(), $this->axisTitle->getAngle(),\r\n $this->axisTitle->getCaption(), $this->axisTitle->getCustomSize()),\r\n $r);\r\n\r\n $this->posTitle = $tmpRes->position;\r\n }\r\n }\r\n\r\n if ($this->labels->getVisible()) {\r\n $tmpRes = $this->calcLabelsRect($this->getSizeLabels()+10, $r); // Rev aded +10\r\n $this->labels->position = $tmpRes->position;\r\n }\r\n\r\n\r\n $tmp = $this->getSizeTickAxis() + $this->chart->getWalls()->calcWallSize($this);\r\n if ($tmp > 0) {\r\n $r = $this->inflateAxisRect($tmp, $r);\r\n }\r\n $this->posTitle = $this->applyPosition($this->posTitle, $r);\r\n $this->labels->position = $this->applyPosition($this->labels->position, $r);\r\n } else {\r\n $this->posAxis = $this->applyPosition($this->getRectangleEdge($r), $r);\r\n $this->labels->position = $this->inflateAxisPos($this->posAxis, $this->getSizeTickAxis());\r\n $this->posTitle = $this->inflateAxisPos($this->labels->position, $this->getSizeLabels());\r\n }\r\n\r\n return $r;\r\n }", "public function get_position(){ return $this->_position;}", "public function GetPosition()\n\t{\n\t\tif($this->position['horizontal'] != '' && $this->position['verticle'] != '')\n\t\t\treturn $this->position['horizontal'].$this->position['verticle'];\n\t\telse\n\t\t\treturn 'Invalid Position';\n\t}", "public function getPosition();", "public function getPosition();", "public function getPosition();", "function bevelRect($x1, $y1, $x2, $y2, $color1, $color2)\r\n {\r\n\r\n $resp = $this->forcePen();\r\n\r\n $resp .= $this->_getJavascriptVar() . \".strokeStyle = \\\"\" . $color1 . \"\\\";\\n\";\r\n $resp .= $this->drawLine(array($x1, $y2), array($x1, $y1));\r\n $resp .= $this->drawLine(array($x1, $y1), array($x2, $y1));\r\n $resp .= $this->_getJavascriptVar() . \".strokeStyle = \\\"\" . $color2 . \"\\\";\\n\";\r\n $resp .= $this->drawLine(array($x2, $y1), array($x2, $y2));\r\n $resp .= $this->drawLine(array($x2, $y2), array($x1, $y2));\r\n\r\n return $resp;\r\n }", "public function test_returnCompleteWebcamFromDeterminatePosition_getPosition_returnThisPosition():void\n {\n $testPosition = 0;\n $expectedResult = ['wbmerId' => '31840','wbmerThumb4' => '3d34412bed40ee22ab54781965e588ca.jpg'];\n $this->validatorStub->method('validationResult')->willReturn($this->webCamFakeData);\n $repository = new WhiteLabelRepository($this->validatorStub,null);\n $result = $repository->returnCompleteWebcamFromDeterminatePosition($testPosition);\n $this->assertEquals($result,$expectedResult);\n\n }", "public function setPosition($x, $y, $unit = null);", "private function bound_to_coord($bound){\r\n $vertices=$bound->getVertices();\r\n $polygon=[\r\n 'x1' => $vertices[0]->getX(),\r\n 'y1' => $vertices[0]->getY(),\r\n 'x2' => $vertices[1]->getX(),\r\n 'y2' => $vertices[1]->getY(),\r\n 'x3' => $vertices[2]->getX(),\r\n 'y3' => $vertices[2]->getY(),\r\n 'x4' => $vertices[3]->getX(),\r\n 'y4' => $vertices[3]->getY(),\r\n ];\r\n return $polygon;\r\n }", "public static function bounds()\n {\n return array(\n array(static::LAT_MIN, static::LNG_MIN),\n array(static::LAT_MAX, static::LNG_MAX),\n );\n }", "function RectPattern($aColor,$aWeight=1) {\n\t$this->color = $aColor;\n\t$this->weight = $aWeight;\t\t\n }", "function RoundedRect($x, $y, $w, $h, $r, $style = '', $angle = '1234')\n {\n $k = $this->k;\n $hp = $this->h;\n if($style=='F')\n $op='f';\n elseif($style=='FD' or $style=='DF')\n $op='B';\n else\n $op='S';\n $MyArc = 4/3 * (sqrt(2) - 1);\n $this->_out(sprintf('%.2f %.2f m',($x+$r)*$k,($hp-$y)*$k ));\n\n $xc = $x+$w-$r;\n $yc = $y+$r;\n $this->_out(sprintf('%.2f %.2f l', $xc*$k,($hp-$y)*$k ));\n if (strpos($angle, '2')===false)\n $this->_out(sprintf('%.2f %.2f l', ($x+$w)*$k,($hp-$y)*$k ));\n else\n $this->_Arc($xc + $r*$MyArc, $yc - $r, $xc + $r, $yc - $r*$MyArc, $xc + $r, $yc);\n\n $xc = $x+$w-$r;\n $yc = $y+$h-$r;\n $this->_out(sprintf('%.2f %.2f l',($x+$w)*$k,($hp-$yc)*$k));\n if (strpos($angle, '3')===false)\n $this->_out(sprintf('%.2f %.2f l',($x+$w)*$k,($hp-($y+$h))*$k));\n else\n $this->_Arc($xc + $r, $yc + $r*$MyArc, $xc + $r*$MyArc, $yc + $r, $xc, $yc + $r);\n\n $xc = $x+$r;\n $yc = $y+$h-$r;\n $this->_out(sprintf('%.2f %.2f l',$xc*$k,($hp-($y+$h))*$k));\n if (strpos($angle, '4')===false)\n $this->_out(sprintf('%.2f %.2f l',($x)*$k,($hp-($y+$h))*$k));\n else\n $this->_Arc($xc - $r*$MyArc, $yc + $r, $xc - $r, $yc + $r*$MyArc, $xc - $r, $yc);\n\n $xc = $x+$r ;\n $yc = $y+$r;\n $this->_out(sprintf('%.2f %.2f l',($x)*$k,($hp-$yc)*$k ));\n if (strpos($angle, '1')===false)\n {\n $this->_out(sprintf('%.2f %.2f l',($x)*$k,($hp-$y)*$k ));\n $this->_out(sprintf('%.2f %.2f l',($x+$r)*$k,($hp-$y)*$k ));\n }\n else\n $this->_Arc($xc - $r, $yc - $r*$MyArc, $xc - $r*$MyArc, $yc - $r, $xc, $yc - $r);\n $this->_out($op);\n }", "protected function _getBBox() {}", "function getShape() { return $this->_shape; }", "public function zoomRect($r) {\r\n $this->x0 = $r->getLeft();\r\n $this->y0 = $r->getTop();\r\n $this->x1 = $r->getRight();\r\n $this->y1 = $r->getBottom();\r\n $this->calcZoomPoints();\r\n }", "public function getMapCropBottomRight(): XY\n {\n return $this->mapCropBottomRight;\n }", "public function getMapCropTopLeft(): XY\n {\n return $this->mapCropTopLeft;\n }", "public static function position()\n {\n return static::$position;\n }", "public static function position()\n {\n return static::$position;\n }", "public function getPosition(){ }", "function getShape() { return $this->_shape; }", "public function position() {\n\t\treturn $this->position;\n\t}", "public function getPosition() {\n }", "function sloodle_login_zone_bounds($pos, $size)\n {\n // Make sure the parameters are valid types\n if (($pos == FALSE) || ($size == FALSE)) {\n return FALSE;\n }\n // Convert both to arrays\n $posarr = sloodle_vector_to_array($pos);\n $sizearr = sloodle_vector_to_array($size);\n // Calculate the bounds\n $max = array();\n $max['x'] = $posarr['x']+(($sizearr['x'])/2)-2;\n $max['y'] = $posarr['y']+(($sizearr['y'])/2)-2;\n $max['z'] = $posarr['z']+(($sizearr['z'])/2)-2;\n $min = array();\n $min['x'] = $posarr['x']-(($sizearr['x'])/2)+2;\n $min['y'] = $posarr['y']-(($sizearr['y'])/2)+2;\n $min['z'] = $posarr['z']-(($sizearr['z'])/2)+2;\n \n return array($max,$min);\n }", "function bevelRect($x1, $y1, $x2, $y2, $color1, $color2)\r\n {\r\n $this->forcePen();\r\n echo \"$this->_canvas.setColor(\\\"\" . $color1 . \"\\\");\\n\";\r\n echo \"$this->_canvas.drawLine($x1, $y2, $x1, $y1);\\n\";\r\n echo \"$this->_canvas.drawLine($x1, $y1, $x2, $y1);\\n\";\r\n echo \"$this->_canvas.setColor(\\\"\" . $color2 . \"\\\");\\n\";\r\n echo \"$this->_canvas.drawLine($x2, $y1, $x2, $y2);\\n\";\r\n echo \"$this->_canvas.drawLine($x2, $y2, $x1, $y2);\\n\";\r\n }", "protected function calculateSpritePositions() {}", "function getPosition()\n\t{\n\t\treturn $this->Info['Position'];\n\t}", "public function y() {\n return $this->coords[1];\n }", "function getPosition() {\n\t\t}", "public function setPosition()\n {\n // get the current position\n $currentX = $this->_pdf->getX();\n $currentY = $this->_pdf->getY();\n\n // save it\n $this->value['xc'] = $currentX;\n $this->value['yc'] = $currentY;\n\n if ($this->value['position']=='relative' || $this->value['position']=='absolute') {\n if ($this->value['right']!==null) {\n $x = $this->getLastWidth(true) - $this->value['right'] - $this->value['width'];\n if ($this->value['margin']['r']) $x-= $this->value['margin']['r'];\n } else {\n $x = $this->value['left'];\n if ($this->value['margin']['l']) $x+= $this->value['margin']['l'];\n }\n\n if ($this->value['bottom']!==null) {\n $y = $this->getLastHeight(true) - $this->value['bottom'] - $this->value['height'];\n if ($this->value['margin']['b']) $y-= $this->value['margin']['b'];\n } else {\n $y = $this->value['top'];\n if ($this->value['margin']['t']) $y+= $this->value['margin']['t'];\n }\n\n if ($this->value['position']=='relative') {\n $this->value['x'] = $currentX + $x;\n $this->value['y'] = $currentY + $y;\n } else {\n $this->value['x'] = $this->_getLastAbsoluteX()+$x;\n $this->value['y'] = $this->_getLastAbsoluteY()+$y;\n }\n } else {\n $this->value['x'] = $currentX;\n $this->value['y'] = $currentY;\n if ($this->value['margin']['l']) $this->value['x']+= $this->value['margin']['l'];\n if ($this->value['margin']['t']) $this->value['y']+= $this->value['margin']['t'];\n }\n\n // save the new position\n $this->_pdf->setXY($this->value['x'], $this->value['y']);\n }", "public function addRectangle(array $args = array()) {\n // Check input params\n if (!isset($args[\"width\"])) {\n throw new \\Exception(\"Param width is required. You can`t add rectangle without width\");\n }\n if (!isset($args[\"height\"])) {\n throw new \\Exception(\"Param height is required. You can`t add rectangle without height\");\n }\n\n $defaults = array(\n \"type\" => \"rectangle\",\n \"color\" => \"#ffffff\", // Font color\n \"width\" => 0, // Rectangle width\n \"height\" => 0, // Rectangle height\n \"z-index\" => count($this->objects) // Z-index of element\n );\n\n // Merge default params and user params\n $params = array_merge($this->default_params, $args);\n $this->objects[] = array_merge($defaults, $params);\n\n return $this;\n }", "public function __toString()\n {\n return $this->width . 'x' . $this->height;\n }", "public function __construct($x = 0, $y = 0) {\n $this->x = $x;\n $this->y = $y;\n $this->body = \"\";\n }", "public function drawRectangleMarker($X, $Y, array $Format = [])\n {\n $Size = isset($Format[\"Size\"]) ? $Format[\"Size\"] : 4;\n\n $HalfSize = floor($Size / 2);\n $this->drawFilledRectangle($X - $HalfSize, $Y - $HalfSize, $X + $HalfSize, $Y + $HalfSize, $Format);\n }", "public function drawRectangle($width, $height);" ]
[ "0.688255", "0.61259276", "0.6108282", "0.59763074", "0.5968003", "0.5953375", "0.59226847", "0.56285876", "0.5618909", "0.55072004", "0.53764987", "0.5330377", "0.5321184", "0.5273294", "0.51717216", "0.5141965", "0.50781566", "0.5065568", "0.5065568", "0.5065568", "0.5065568", "0.5065568", "0.50424564", "0.50341624", "0.5000985", "0.5000985", "0.49756965", "0.49603793", "0.49536723", "0.49330842", "0.4929403", "0.4915652", "0.49110898", "0.49097645", "0.49090716", "0.4835179", "0.4819503", "0.48174018", "0.480339", "0.4795375", "0.4778108", "0.4736379", "0.47210026", "0.47109157", "0.4703393", "0.46959978", "0.46935165", "0.4668402", "0.46645886", "0.46645886", "0.4661102", "0.4660433", "0.46468222", "0.4641348", "0.46330827", "0.46314198", "0.45864892", "0.4564455", "0.4558545", "0.45564392", "0.45549276", "0.45527044", "0.4549998", "0.45391753", "0.45259443", "0.45247126", "0.45220223", "0.4517767", "0.4517767", "0.4517767", "0.45019755", "0.449432", "0.44910282", "0.4490768", "0.4483727", "0.44746014", "0.44684514", "0.44477713", "0.44452074", "0.44441366", "0.44327465", "0.4432494", "0.44285756", "0.44285756", "0.44260794", "0.4424197", "0.44228783", "0.43920654", "0.43845597", "0.43827012", "0.4363514", "0.43543598", "0.43523616", "0.43416774", "0.4341119", "0.43381286", "0.43343636", "0.43300426", "0.43209493", "0.43171307" ]
0.69350255
0
Generated from protobuf field int32 detection_id = 3;
public function getDetectionId() { return $this->detection_id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setDetectionId($var)\n {\n GPBUtil::checkInt32($var);\n $this->detection_id = $var;\n\n return $this;\n }", "public function getDetectionClass()\n {\n return $this->detection_class;\n }", "public function getId() {\n\t\treturn (string) $this->photo['id'];\n\t}", "public function getGamerId()\n {\n $value = $this->get(self::GAMER_ID);\n return $value === null ? (integer)$value : $value;\n }", "public function getGameId(): int\n {\n return $this->gameId;\n }", "public function getId()\n\t{\n\t\treturn $this->googleDriveFile->getId();\n\t}", "public function determineId() {}", "public function getId()\n {\n return $this->_imageId;\n }", "public function getId(): int\n {\n $idSplit = explode('.', $this->data['externalidField']);\n return $idSplit[1] ?? $this->data['externalidField'];\n }", "public function getId() {\r\n\r\n return $this->getGameManager()->getGameId($this);\r\n\r\n }", "public function getPictureId()\n {\n return $this->pictureId;\n }", "public function getId(): int\n {\n return (int)substr($this->token, 0, strpos($this->token, ':'));\n }", "public function getVideoId();", "public function getPhotoId()\n {\n return $this->photoId;\n }", "public function setDetectionClass($var)\n {\n GPBUtil::checkString($var, True);\n $this->detection_class = $var;\n\n return $this;\n }", "public function getTrackingId()\n {\n if (isset($this->data['TrackingId'])) {\n return $this->data['TrackingId'];\n } else {\n return false;\n }\n }", "public function getId()\n {\n return $this->file->get('id');\n }", "public function getTrackingId()\n {\n return $this->trackingId;\n }", "public function getGameId(){\n\t\treturn $this->gameId;\n\t}", "function getImageId();", "public function getId()\n {\n switch ($this->type) {\n case VideoInfo::TYPE_YOUTUBE:\n return app(InferYoutubeId::class)($this->info->url);\n case VideoInfo::TYPE_VIMEO:\n return $this->info->video_id;\n }\n return null;\n }", "public function getId() : int\n {\n return $this->getValue('nb_icontact_prospect_id');\n }", "public function getMediaId();", "public function getIdVideoInfo()\n {\n return $this->idVideoInfo;\n }", "public function getMagicNumber()\n {\n return $this->readOneof(1);\n }", "public function getId()\n {\n $tmp = (array) $this->getHeaderFieldModel($this->getIdField());\n\n return $this->headers->has($this->getIdField()) ? current($tmp) : $this->id;\n }", "private function computeId(): void\n {\n /** @noinspection JsonEncodingApiUsageInspection */\n $this->id = md5(\n json_encode(\n [\n $this->simulation->id,\n $this->fn,\n $this->useEndpoints,\n $this->usePerturbation,\n collect($this->findByTags)->map(fn($t) => strtolower($t))->sort()->toArray(),\n $this->searchMode\n ]\n )\n );\n }", "public function id()\n {\n if (!$this->object->getValue()) {\n return null;\n }\n\n /* @var \\Anomaly\\VideoFieldType\\Matcher\\Contract\\MatcherInterface $matcher */\n $matcher = dispatch_now(new GetMatcher($this->object->getValue()));\n\n return $matcher->id($this->object->getValue());\n }", "public static function getHolderID();", "public function getTrackingID()\n {\n return $this->trackingID;\n }", "function imageID( )\r\n {\r\n return $this->ImageID;\r\n }", "public function getPrimaryKey()\n {\n return $this->getFeatureCvtermId();\n }", "public function getImageId()\n {\n return $this->imageid;\n }", "public function getImageId()\n {\n return $this->_imageId;\n }", "protected function getTrackedClientId() {\n /*if (isset($_COOKIE['_ga'])) {\n list($version,$domainDepth, $cid1, $cid2) = preg_split('[\\.]', $_COOKIE[\"_ga\"],4);\n $contents = array('version' => $version, 'domainDepth' => $domainDepth, 'cid' => $cid1.'.'.$cid2);\n $cid = $contents['cid'];\n }\n else {*/\n $cid = $this->client->serial;\n //}\n return $cid;\n }", "public function getConversionId(): int\n {\n return $this->id;\n }", "public function getNativeLeagueId()\n {\n return $this->getXml()->getElementsByTagName('NativeLeagueID')->item(0)->nodeValue;\n }", "public function getTrackNumber() {}", "public function getIdVideo(){\n\t\treturn $this->idVideo;\t\n\t}", "public function getImageid()\n {\n return $this->imageid;\n }", "public function getCarId()\n {\n return $this->attributes['car_id'];\n }", "function getFileId() {\n\t\treturn $this->getData('fileId');\n\t}", "public function getVisualId()\n {\n return $this->getId();\n }", "public function getId()\n {\n return isset($this->attrs['id']) ? $this->attrs['id'] : 0;\n }", "public function getMediaGalleryAttributeId()\n {\n if (!$this->_mediaGalleryAttributeId) {\n /** @var $resource \\Magento\\CatalogImportExport\\Model\\Import\\Proxy\\Product\\ResourceModel */\n $resource = $this->_resourceFactory->create();\n $this->_mediaGalleryAttributeId = $resource->getAttribute(self::MEDIA_GALLERY_ATTRIBUTE_CODE)->getId();\n }\n return $this->_mediaGalleryAttributeId;\n }", "public function pId()\n {\n static $id = null;\n\n if (!is_null($id)) {\n return $id;\n }\n\n $id = $this->property('id');\n\n if (strpos($id, 'http') === 0) {\n $path = explode('/', parse_url($id, PHP_URL_PATH));\n\n if ($path[1] == 'gallery') {\n $id = $path[2];\n }\n elseif ($path[1] == 'a') {\n $id = 'a/'.$path[2];\n }\n else {\n $id = $path[1];\n }\n }\n\n return $id;\n }", "function getImageIdFromGivenFace(string $collectionName, string $fileimage) {\n\n return $result = $this->rekognition->searchFacesByImage([\n 'CollectionId' => $collectionName, // REQUIRED\n 'FaceMatchThreshold' => 90,\n 'Image' => [ // REQUIRED\n 'Bytes' => $this->imageread($fileimage)\n ]\n ]);\n }", "public function getLastId()\r\n {\r\n return $this->photoMapper->getLastId();\r\n }", "private function computeIdentifierAttribute(): void\n {\n $data = $this->content->jsonSerialize();\n $this->attributes['data-bb-identifier'] = str_replace('\\\\', '/', $data['type']) . '(' . $data['uid'] . ')';\n }", "public function getFile_id() {\n return (int) $this->_file_id;\n }", "static function getId()\n {\n return isset(self::$_data[self::KEY_ID]) ? self::$_data[self::KEY_ID] : 0;\n }", "public function getIdVimeo(){\n\t\treturn $this->idVimeo;\t\n\t}", "public function getId(){\n return (string) $this->film['id'];\n }", "public function getIdentificationCode()\n {\n return $this->identificationCode;\n }", "public function getId()\n {\n return $this->elasticaResult->getId();\n }", "public function getId() {\n\t\treturn $this->response['id'] ?: NULL;\n\t}", "public function getMediaId()\n {\n return $this->media->getId();\n }", "public function getReplacementID();", "public function getLastId()\n {\n return $this->wallpaperMapper->getMaxId();\n }", "public function getFrameNumber() {}", "function getId() {\n\t\treturn $this->getData('sectionDecisionId');\r\n\t}", "public function getVersiondId() {}", "public function getFileId()\n {\n return $this->fileId;\n }", "public function get_image_id() {\r\n return $this->image_id;\r\n }", "public function detector(): Detect;", "function generate_id() {\n $this->last_image_id ++;\n return $this->last_image_id;\n }", "public function getMatchId() {\n return $this->matchId;\n }", "public function getFileId()\n\t{\n\t\treturn $this->fileId; \n\n\t}", "public function getInterfaceId()\n {\n return $this->interfaceId;\n }", "public function getIdMatch()\n {\n return $this->idMatch;\n }", "final public function getNetworkId(): int\n {\n return static::NETWORK_ID;\n }", "public function getLiveId() {}", "function getTrackID() {\n\t\treturn $this->_TrackID;\n\t}", "public function getId(): string\n {\n $message = (string) $this->getRawMessage();\n return substr(md5($message), 0, 10);\n }", "public function getAndroidId();", "public function getId()\n {\n return (integer)$this->id;\n }", "public function getIdentifier()\n {\n return 1;\n }", "public function getIdannonce()\n {\n return $this->idannonce;\n }", "public function getCountVirusId() {\n\t\treturn $this->getCount('VIRUSES', 'id');\n\t}", "public function getIdVit(){\n\t\treturn ($this->id);\n\t}", "public function getId() {\r\n return (int) $this->id;\r\n }", "function findID($d) {\n\t\t$url = \"https://inpho.cogs.indiana.edu/thinker.json\";\n\t\t$data = @file_get_contents($url,o,null,null);\n\t\t$json = json_decode($data);\n\t\t$results = $json->responseData->results;\n\t\tforeach($results as $value) {\n\t\t\tif (strcasecmp($value->label,$d)==0) { \n\t\t\t\t$id = $value->ID;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t//return value of $id when string matches\n\t\treturn $id;\n\t}", "public function getId()\n {\n return $this->response['id'] ?: null;\n }", "public function getId()\n {\n return $this->response['id'] ?: null;\n }", "public function getStatusId()\n {\n return $this->getValue('nb_icontact_prospect_status_id');\n }", "public function getNativeId()\n {\n return $this->_id;\n }", "public function getId() {\n foreach ($this->generateCarsInfo() as $prop) {\n $id_user = $prop->getId_user() . \"\\n\";\n }\n return $id_user;\n }", "public function getIdSegmentation()\n {\n return $this->id_segmentation;\n }", "public function getId() {\n return $this->datosprop->getId_prop_carac();\n }", "abstract public static function detect();", "public function getId() {\n return @$this->attributes['id'];\n }", "public function getId() {\n return @$this->attributes['id'];\n }", "public function getBroadcastId()\n\t{\n\n\t\treturn $this->broadcast_id;\n\t}", "public function id() {\n return $this->activity_array['id'];\n }", "function messageid($list) {\n\t\t$uid = 0;\n\t\t$mid = array();\n\t\t\n\t\tforeach($list as $line) {\n\t\t\tif(preg_match('#^\\* ([0-9]+) FETCH#', $line)) {\n\t\t\t\t$temp = explode(' ', $line);\n\t\t\t\t$uid = $temp[4];\n\t\t\t}\n\t\t\t\n\t\t\t$temp = strtoupper($line);\n\t\t\t\n\t\t\tif(substr($temp, 0, 12) == 'MESSAGE-ID: ')\n\t\t\t\t$mid[$line] = $uid;\n\t\t}\n\t\t\n\t\treturn $mid;\n\t}", "public function getNumIdentification()\n {\n return $this->numIdentification;\n }", "public function getTrackingNumber()\n {\n return $this->trackingNumber;\n }", "public function getAttackingId()\n {\n return $this->get(self::_ATTACKING_ID);\n }", "public function getSpecimenId()\n {\n \t#$testCategoryName = $this->testType->testCategory->name;\n \t#return substr($testCategoryName, 0 , 3).'-'.$this->specimen->id;\n\t\treturn $this->specimen->accession_number;\n }", "public function getLastId()\n {\n return $this->galleryMapper->getMaxId();\n }" ]
[ "0.7037807", "0.5350284", "0.5243273", "0.5230687", "0.5138672", "0.5099635", "0.50109506", "0.49675262", "0.494784", "0.49134162", "0.48817244", "0.48485684", "0.48055425", "0.4771033", "0.47501564", "0.47292325", "0.47213992", "0.47014728", "0.4695155", "0.4649501", "0.46366188", "0.45979932", "0.45795012", "0.45765346", "0.4536567", "0.45358166", "0.45346543", "0.4530903", "0.45189694", "0.45155185", "0.45106742", "0.45020634", "0.4485355", "0.44829476", "0.44743583", "0.44736037", "0.447211", "0.44720504", "0.44470403", "0.44413146", "0.44323862", "0.44274658", "0.44204634", "0.4411579", "0.44083124", "0.44051012", "0.4397168", "0.43898785", "0.4389501", "0.43832767", "0.43749276", "0.43731898", "0.43693647", "0.43635988", "0.43626198", "0.436142", "0.43580624", "0.43530113", "0.4349735", "0.4345088", "0.43436828", "0.43435732", "0.43371698", "0.4335848", "0.4335251", "0.43276402", "0.43264455", "0.43263453", "0.43261194", "0.43248102", "0.4323552", "0.43233174", "0.43194607", "0.43162927", "0.43118894", "0.43110907", "0.4306054", "0.43017972", "0.42987478", "0.42934436", "0.42932716", "0.42932072", "0.42883748", "0.42883748", "0.42839396", "0.42783648", "0.42769128", "0.4272368", "0.42668635", "0.42657372", "0.4262553", "0.4262553", "0.42533004", "0.4247591", "0.42407957", "0.4240252", "0.4235454", "0.4235116", "0.4232941", "0.42312554" ]
0.7689458
0
Generated from protobuf field int32 detection_id = 3;
public function setDetectionId($var) { GPBUtil::checkInt32($var); $this->detection_id = $var; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDetectionId()\n {\n return $this->detection_id;\n }", "public function getDetectionClass()\n {\n return $this->detection_class;\n }", "public function getId() {\n\t\treturn (string) $this->photo['id'];\n\t}", "public function getGamerId()\n {\n $value = $this->get(self::GAMER_ID);\n return $value === null ? (integer)$value : $value;\n }", "public function getGameId(): int\n {\n return $this->gameId;\n }", "public function getId()\n\t{\n\t\treturn $this->googleDriveFile->getId();\n\t}", "public function determineId() {}", "public function getId()\n {\n return $this->_imageId;\n }", "public function getId(): int\n {\n $idSplit = explode('.', $this->data['externalidField']);\n return $idSplit[1] ?? $this->data['externalidField'];\n }", "public function getId() {\r\n\r\n return $this->getGameManager()->getGameId($this);\r\n\r\n }", "public function getPictureId()\n {\n return $this->pictureId;\n }", "public function getId(): int\n {\n return (int)substr($this->token, 0, strpos($this->token, ':'));\n }", "public function getVideoId();", "public function getPhotoId()\n {\n return $this->photoId;\n }", "public function setDetectionClass($var)\n {\n GPBUtil::checkString($var, True);\n $this->detection_class = $var;\n\n return $this;\n }", "public function getTrackingId()\n {\n if (isset($this->data['TrackingId'])) {\n return $this->data['TrackingId'];\n } else {\n return false;\n }\n }", "public function getId()\n {\n return $this->file->get('id');\n }", "public function getTrackingId()\n {\n return $this->trackingId;\n }", "public function getGameId(){\n\t\treturn $this->gameId;\n\t}", "function getImageId();", "public function getId()\n {\n switch ($this->type) {\n case VideoInfo::TYPE_YOUTUBE:\n return app(InferYoutubeId::class)($this->info->url);\n case VideoInfo::TYPE_VIMEO:\n return $this->info->video_id;\n }\n return null;\n }", "public function getId() : int\n {\n return $this->getValue('nb_icontact_prospect_id');\n }", "public function getMediaId();", "public function getIdVideoInfo()\n {\n return $this->idVideoInfo;\n }", "public function getMagicNumber()\n {\n return $this->readOneof(1);\n }", "public function getId()\n {\n $tmp = (array) $this->getHeaderFieldModel($this->getIdField());\n\n return $this->headers->has($this->getIdField()) ? current($tmp) : $this->id;\n }", "private function computeId(): void\n {\n /** @noinspection JsonEncodingApiUsageInspection */\n $this->id = md5(\n json_encode(\n [\n $this->simulation->id,\n $this->fn,\n $this->useEndpoints,\n $this->usePerturbation,\n collect($this->findByTags)->map(fn($t) => strtolower($t))->sort()->toArray(),\n $this->searchMode\n ]\n )\n );\n }", "public function id()\n {\n if (!$this->object->getValue()) {\n return null;\n }\n\n /* @var \\Anomaly\\VideoFieldType\\Matcher\\Contract\\MatcherInterface $matcher */\n $matcher = dispatch_now(new GetMatcher($this->object->getValue()));\n\n return $matcher->id($this->object->getValue());\n }", "public static function getHolderID();", "public function getTrackingID()\n {\n return $this->trackingID;\n }", "function imageID( )\r\n {\r\n return $this->ImageID;\r\n }", "public function getPrimaryKey()\n {\n return $this->getFeatureCvtermId();\n }", "public function getImageId()\n {\n return $this->imageid;\n }", "public function getImageId()\n {\n return $this->_imageId;\n }", "protected function getTrackedClientId() {\n /*if (isset($_COOKIE['_ga'])) {\n list($version,$domainDepth, $cid1, $cid2) = preg_split('[\\.]', $_COOKIE[\"_ga\"],4);\n $contents = array('version' => $version, 'domainDepth' => $domainDepth, 'cid' => $cid1.'.'.$cid2);\n $cid = $contents['cid'];\n }\n else {*/\n $cid = $this->client->serial;\n //}\n return $cid;\n }", "public function getConversionId(): int\n {\n return $this->id;\n }", "public function getNativeLeagueId()\n {\n return $this->getXml()->getElementsByTagName('NativeLeagueID')->item(0)->nodeValue;\n }", "public function getTrackNumber() {}", "public function getIdVideo(){\n\t\treturn $this->idVideo;\t\n\t}", "public function getImageid()\n {\n return $this->imageid;\n }", "public function getCarId()\n {\n return $this->attributes['car_id'];\n }", "function getFileId() {\n\t\treturn $this->getData('fileId');\n\t}", "public function getVisualId()\n {\n return $this->getId();\n }", "public function getId()\n {\n return isset($this->attrs['id']) ? $this->attrs['id'] : 0;\n }", "public function getMediaGalleryAttributeId()\n {\n if (!$this->_mediaGalleryAttributeId) {\n /** @var $resource \\Magento\\CatalogImportExport\\Model\\Import\\Proxy\\Product\\ResourceModel */\n $resource = $this->_resourceFactory->create();\n $this->_mediaGalleryAttributeId = $resource->getAttribute(self::MEDIA_GALLERY_ATTRIBUTE_CODE)->getId();\n }\n return $this->_mediaGalleryAttributeId;\n }", "public function pId()\n {\n static $id = null;\n\n if (!is_null($id)) {\n return $id;\n }\n\n $id = $this->property('id');\n\n if (strpos($id, 'http') === 0) {\n $path = explode('/', parse_url($id, PHP_URL_PATH));\n\n if ($path[1] == 'gallery') {\n $id = $path[2];\n }\n elseif ($path[1] == 'a') {\n $id = 'a/'.$path[2];\n }\n else {\n $id = $path[1];\n }\n }\n\n return $id;\n }", "function getImageIdFromGivenFace(string $collectionName, string $fileimage) {\n\n return $result = $this->rekognition->searchFacesByImage([\n 'CollectionId' => $collectionName, // REQUIRED\n 'FaceMatchThreshold' => 90,\n 'Image' => [ // REQUIRED\n 'Bytes' => $this->imageread($fileimage)\n ]\n ]);\n }", "public function getLastId()\r\n {\r\n return $this->photoMapper->getLastId();\r\n }", "private function computeIdentifierAttribute(): void\n {\n $data = $this->content->jsonSerialize();\n $this->attributes['data-bb-identifier'] = str_replace('\\\\', '/', $data['type']) . '(' . $data['uid'] . ')';\n }", "public function getFile_id() {\n return (int) $this->_file_id;\n }", "static function getId()\n {\n return isset(self::$_data[self::KEY_ID]) ? self::$_data[self::KEY_ID] : 0;\n }", "public function getIdVimeo(){\n\t\treturn $this->idVimeo;\t\n\t}", "public function getId(){\n return (string) $this->film['id'];\n }", "public function getIdentificationCode()\n {\n return $this->identificationCode;\n }", "public function getId()\n {\n return $this->elasticaResult->getId();\n }", "public function getId() {\n\t\treturn $this->response['id'] ?: NULL;\n\t}", "public function getMediaId()\n {\n return $this->media->getId();\n }", "public function getReplacementID();", "public function getLastId()\n {\n return $this->wallpaperMapper->getMaxId();\n }", "public function getFrameNumber() {}", "function getId() {\n\t\treturn $this->getData('sectionDecisionId');\r\n\t}", "public function getVersiondId() {}", "public function getFileId()\n {\n return $this->fileId;\n }", "public function get_image_id() {\r\n return $this->image_id;\r\n }", "public function detector(): Detect;", "function generate_id() {\n $this->last_image_id ++;\n return $this->last_image_id;\n }", "public function getMatchId() {\n return $this->matchId;\n }", "public function getFileId()\n\t{\n\t\treturn $this->fileId; \n\n\t}", "public function getInterfaceId()\n {\n return $this->interfaceId;\n }", "public function getIdMatch()\n {\n return $this->idMatch;\n }", "final public function getNetworkId(): int\n {\n return static::NETWORK_ID;\n }", "public function getLiveId() {}", "function getTrackID() {\n\t\treturn $this->_TrackID;\n\t}", "public function getId(): string\n {\n $message = (string) $this->getRawMessage();\n return substr(md5($message), 0, 10);\n }", "public function getAndroidId();", "public function getId()\n {\n return (integer)$this->id;\n }", "public function getIdentifier()\n {\n return 1;\n }", "public function getIdannonce()\n {\n return $this->idannonce;\n }", "public function getCountVirusId() {\n\t\treturn $this->getCount('VIRUSES', 'id');\n\t}", "public function getIdVit(){\n\t\treturn ($this->id);\n\t}", "public function getId() {\r\n return (int) $this->id;\r\n }", "function findID($d) {\n\t\t$url = \"https://inpho.cogs.indiana.edu/thinker.json\";\n\t\t$data = @file_get_contents($url,o,null,null);\n\t\t$json = json_decode($data);\n\t\t$results = $json->responseData->results;\n\t\tforeach($results as $value) {\n\t\t\tif (strcasecmp($value->label,$d)==0) { \n\t\t\t\t$id = $value->ID;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t//return value of $id when string matches\n\t\treturn $id;\n\t}", "public function getId()\n {\n return $this->response['id'] ?: null;\n }", "public function getId()\n {\n return $this->response['id'] ?: null;\n }", "public function getStatusId()\n {\n return $this->getValue('nb_icontact_prospect_status_id');\n }", "public function getNativeId()\n {\n return $this->_id;\n }", "public function getId() {\n foreach ($this->generateCarsInfo() as $prop) {\n $id_user = $prop->getId_user() . \"\\n\";\n }\n return $id_user;\n }", "public function getIdSegmentation()\n {\n return $this->id_segmentation;\n }", "public function getId() {\n return $this->datosprop->getId_prop_carac();\n }", "abstract public static function detect();", "public function getId() {\n return @$this->attributes['id'];\n }", "public function getId() {\n return @$this->attributes['id'];\n }", "public function getBroadcastId()\n\t{\n\n\t\treturn $this->broadcast_id;\n\t}", "public function id() {\n return $this->activity_array['id'];\n }", "function messageid($list) {\n\t\t$uid = 0;\n\t\t$mid = array();\n\t\t\n\t\tforeach($list as $line) {\n\t\t\tif(preg_match('#^\\* ([0-9]+) FETCH#', $line)) {\n\t\t\t\t$temp = explode(' ', $line);\n\t\t\t\t$uid = $temp[4];\n\t\t\t}\n\t\t\t\n\t\t\t$temp = strtoupper($line);\n\t\t\t\n\t\t\tif(substr($temp, 0, 12) == 'MESSAGE-ID: ')\n\t\t\t\t$mid[$line] = $uid;\n\t\t}\n\t\t\n\t\treturn $mid;\n\t}", "public function getNumIdentification()\n {\n return $this->numIdentification;\n }", "public function getTrackingNumber()\n {\n return $this->trackingNumber;\n }", "public function getAttackingId()\n {\n return $this->get(self::_ATTACKING_ID);\n }", "public function getSpecimenId()\n {\n \t#$testCategoryName = $this->testType->testCategory->name;\n \t#return substr($testCategoryName, 0 , 3).'-'.$this->specimen->id;\n\t\treturn $this->specimen->accession_number;\n }", "public function getLastId()\n {\n return $this->galleryMapper->getMaxId();\n }" ]
[ "0.7689458", "0.5350284", "0.5243273", "0.5230687", "0.5138672", "0.5099635", "0.50109506", "0.49675262", "0.494784", "0.49134162", "0.48817244", "0.48485684", "0.48055425", "0.4771033", "0.47501564", "0.47292325", "0.47213992", "0.47014728", "0.4695155", "0.4649501", "0.46366188", "0.45979932", "0.45795012", "0.45765346", "0.4536567", "0.45358166", "0.45346543", "0.4530903", "0.45189694", "0.45155185", "0.45106742", "0.45020634", "0.4485355", "0.44829476", "0.44743583", "0.44736037", "0.447211", "0.44720504", "0.44470403", "0.44413146", "0.44323862", "0.44274658", "0.44204634", "0.4411579", "0.44083124", "0.44051012", "0.4397168", "0.43898785", "0.4389501", "0.43832767", "0.43749276", "0.43731898", "0.43693647", "0.43635988", "0.43626198", "0.436142", "0.43580624", "0.43530113", "0.4349735", "0.4345088", "0.43436828", "0.43435732", "0.43371698", "0.4335848", "0.4335251", "0.43276402", "0.43264455", "0.43263453", "0.43261194", "0.43248102", "0.4323552", "0.43233174", "0.43194607", "0.43162927", "0.43118894", "0.43110907", "0.4306054", "0.43017972", "0.42987478", "0.42934436", "0.42932716", "0.42932072", "0.42883748", "0.42883748", "0.42839396", "0.42783648", "0.42769128", "0.4272368", "0.42668635", "0.42657372", "0.4262553", "0.4262553", "0.42533004", "0.4247591", "0.42407957", "0.4240252", "0.4235454", "0.4235116", "0.4232941", "0.42312554" ]
0.7037807
1
Generated from protobuf field string detection_class = 4;
public function getDetectionClass() { return $this->detection_class; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setDetectionClass($var)\n {\n GPBUtil::checkString($var, True);\n $this->detection_class = $var;\n\n return $this;\n }", "abstract public static function detect();", "public function getDetectionId()\n {\n return $this->detection_id;\n }", "public function detector(): Detect;", "public function getClassification()\n {\n return $this->classification;\n }", "public static function getVerifiedClass() {\n if ( self::getVerified() ) {\n return 'green';\n }\n return 'red';\n }", "public function getFamilyClass() {}", "protected function getCandidateType()\n {\n if (!$this->detectedType) {\n $this->detectedType = $this->detectType();\n }\n\n return $this->detectedType;\n }", "public function get_class_ID()\n {\n return CGHBVRQQualification::ID;\n }", "public function getClass(): string\n {\n foreach ($this->resourceRecords as $resourceRecord) {\n if (null !== $resourceRecord->getClass()) {\n return $resourceRecord->getClass();\n }\n }\n\n return Classes::INTERNET;\n }", "public function setDetectionType($type = null)\n\t\t{\n\t\t\tif ($type === null) {\n\t\t\t\t$type = self::DETECTION_TYPE_MOBILE;\n\t\t\t}\n\n\t\t\tif ($type != self::DETECTION_TYPE_MOBILE && $type != self::DETECTION_TYPE_EXTENDED) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$this->detectionType = $type;\n\t\t}", "public function setDetectionId($var)\n {\n GPBUtil::checkInt32($var);\n $this->detection_id = $var;\n\n return $this;\n }", "public function getClassificationName()\n {\n return $this->classification_name;\n }", "public function getStatusClass() {\n return intval(floor($this->_status / 100));\n }", "public function getCollectedClass(): string\n {\n return $this->collected_class;\n }", "public function getMimeBasedClassname() {\n $mime = $this->getData('mediatype');\n return strstr($mime, '/', true);\n }", "public function getImageClass()\n {\n return $this->image_class;\n }", "function getActualClass(){\n\t\treturn $this->nmclass;\n\t}", "public function setClassification($v)\n {\n if ($v !== null) {\n $v = (string) $v;\n }\n\n if ($this->classification !== $v) {\n $this->classification = $v;\n $this->modifiedColumns[BiblioTableMap::COL_CLASSIFICATION] = true;\n }\n\n return $this;\n }", "public function getClassAnnotations(string $class): array;", "function tsuiseki_tracking_get_css_class() {\n $css = TSUISEKI_TRACKER_CSS_CLASS;\n if (empty($css)) {\n $css = (string)trim(get_option('tsuiseki_tracking_css_class'));\n }\n return $css;\n}", "public function getStatusclassAttribute()\n {\n switch ($this->status) {\n case Meeting::$STATUS_NEW:\n return \"fc-new-meeting\";\n case Meeting::$STATUS_ATTENDED:\n return \"fc-attend-meeting\";\n case Meeting::$STATUS_ABSENT:\n return \"fc-absent-meeting\";\n default:\n return \"Unknown Status: \" . $this->status;\n }\n }", "function get_descriptive_classification( $classification ) {\n switch ( $classification ) {\n case 1: $out = 'LL'; break;\n case 2: $out = 'LS'; break;\n case 3: $out = 'LH'; break;\n case 4: $out = 'LE'; break;\n\t\t\tcase 5: $out = 'OHS'; break;\n\t\t\tcase 6: $out = 'Q'; break;\n\t\t\tcase 7: $out = 'P'; break;\n default: $out = 'Undefined'; break;\n }\n return $out;\n }", "public function getType( bool $forceDetection = FALSE ): int\n\t{\n\t\tif( self::TYPE_UNKNOWN === $this->type || $forceDetection ){\n\t\t\tif( $this instanceof MessagePartInlineImage )\n\t\t\t\t$this->type\t= static::TYPE_INLINE_IMAGE;\n\t\t\telse if( $this instanceof MessagePartMail )\n\t\t\t\t$this->type\t= static::TYPE_MAIL;\n\t\t\telse if( $this instanceof MessagePartAttachment )\n\t\t\t\t$this->type\t= static::TYPE_ATTACHMENT;\n\t\t\telse if( $this instanceof MessagePartHTML )\n\t\t\t\t$this->type\t= static::TYPE_HTML;\n\t\t\telse if( $this instanceof MessagePartText )\n\t\t\t\t$this->type\t= static::TYPE_TEXT;\n\t\t}\n\t\treturn $this->type;\n\t}", "abstract function detect(array $http);", "function GetClass() {\n\t\tswitch($this->type) {\n\t\t\tcase BLOCK_PAGE: return \"page\";\n\t\t\tcase \"T_FUNCTION\": return \"function\";\n\t\t\tcase \"T_CLASS\": return \"class\";\n\t\t\tcase \"T_INTERFACE\": return \"interface\";\n\t\t\tcase \"T_STRING\": return \"define\";\n\t\t\tcase \"T_INCLUDE\": case \"T_INCLUDE_ONCE\": case \"T_REQUIRE\": case \"T_REQUIRE_ONCE\": return \"include\";\n\t\t}\n\t\treturn \"\";\n\t}", "public function getSource()\n {\n return 'classification';\n }", "function earthquakeClass(string $value)\n {\n // Class\tMagnitude\n // Great\t8 or more\n // Major\t7 - 7.9\n // Strong\t6 - 6.9\n // Moderate\t5 - 5.9\n // Light\t4 - 4.9\n // Minor\t3 - 3.9\n if ((int)$value >= 8) {\n return 'Great';\n } elseif ((int)$value == 7) {\n return 'Major';\n } elseif ((int)$value == 6) {\n return 'Strong';\n } elseif ((int)$value == 5) {\n return 'Moderate';\n } elseif ((int)$value == 4) {\n return 'Light';\n } elseif ((int)$value == 3) {\n return 'Minor';\n } else {\n return 'Negligible';\n }\n }", "public function setDetectionType(?Win32LobAppFileSystemDetectionType $value): void {\n $this->getBackingStore()->set('detectionType', $value);\n }", "public function getFeatureClass ($feature);", "public function detectMessage(){\n\n\t\t$result=$this->model->newMessageDetection();\n\n\t\tif($result!==false){\n\t\t\techo json_encode($result);\n\t\t}else{\n\t\t\techo 'false';\n\t\t}\n\t}", "protected static function getDecoderClassname(): string\n {\n return sprintf('Intervention\\Gif\\Decoder\\%sDecoder', self::getShortClassname());\n }", "public function getClass(): string\n {\n if ($this->class === null) {\n throw new RuntimeException('Empty class for @Type annotation. You MUST create the Type annotation object using the GraphQLite AnnotationReader');\n }\n\n return $this->class;\n }", "protected function detectType()\n {\n if (property_exists($this, 'allow')) {\n return $this->allow;\n }\n\n $interfaces = (new ReflectionClass($this))->getInterfaceNames();\n\n if ($interfaces) {\n return $interfaces[0];\n }\n\n return get_class($this);\n }", "protected function getApiClass(): string {\n\t\treturn ExternalReference::class;\n\t}", "abstract protected function getBufferClass() : string;", "public function getClassType()\n {\n return $this->classType;\n }", "public function getTypeClass() {\n return 'check';\n }", "public function getObjects() : array\n {\n $net = SsdDnn::readNetFromTensorflow();\n\n $net->setInput(SsdDnn::blobFromImage($this->image), '');\n\n $detected = [];\n $detections = $net->forward();\n $categories = SsdDnn::getCategories();\n\n for ($i = 0; $i < $detections->shape[2]; $i++) {\n $classId = $detections->atIdx([0, 0, $i, 1]);\n $confidence = intval($detections->atIdx([0, 0, $i, 2]) * 100);\n\n if ($classId && $confidence > $this->threshold) {\n $detected[] = $categories[$classId];\n }\n }\n\n return $detected;\n }", "private function getClassesBack(){\n $class = \"hex\";\n $building = \"\";\n\n $building = $this->getBuilding();\n if (strlen($building)){\n $class .= \" \".$building; \n\n if ($this->getBunker()){\n $class .= \"-bunker\";\n }\n } \n else {\n $class .= $this->getTerrainClass(); \n }\n\n if ($this->getOwner() == I_OWN){\n $class .= \" friend\";\n }\n else if ($this->getOwner() == YOU_OWN){\n $class .= \" enemy\";\n }\n\n return $class;\n }", "public function getClass(string $class);", "public function getClassDefinition();", "function getClassAnnotations(\\ReflectionClass $class);", "function fetch_data_new_class()\n\t{\n\t\tif ($this->data_old == $this->data_new)\n\t\t{\n\t\t\treturn 'unchanged';\n\t\t}\n\t\telse if ($this->data_new AND empty($this->data_old))\n\t\t{\n\t\t\treturn 'added';\n\t\t}\n\t\telse if (trim($this->data_new) === '')\n\t\t{\n\t\t\treturn 'notext';\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn 'changed';\n\t\t}\n\t}", "private static function detectCarrier() {\n $userAgent = env('HTTP_USER_AGENT');\n $classifier = new \\Woothee\\Classifier;\n $r = $classifier->parse($userAgent);\n\n // smartphone\n if ($r['category'] === 'smartphone') {\n return 'iPhone';\n }\n\n // mobilephone\n if ($r['category'] === 'mobilephone') {\n if (preg_match('/^J-PHONE/', $userAgent)) {\n return 'J-PHONE';\n }\n switch ($r['os']) {\n case 'docomo':\n return 'docomo';\n case 'au':\n return 'au';\n case 'SoftBank':\n return 'SoftBank';\n case 'WILLCOM':\n return 'WILLCOM';\n case 'emobile':\n return 'EMOBILE';\n }\n return 'docomo';\n }\n\n // pc\n return 'PC';\n }", "abstract protected function getMonitoredClass();", "public function getStatusClass($value)\n {\n switch ($value) {\n case 'A':\n return 'answered';\n case 'M':\n return 'missed';\n case 'O':\n return 'open';\n case 'U':\n return 'unknown';\n case 'W':\n return 'waiting';\n default:\n return 'empty';\n }\n }", "public function getConditionClass();", "public function getType(): string\n {\n $type = 'Class';\n if ($this->isTrait()) {\n $type = 'Trait';\n } elseif ($this->isInterface()) {\n $type = 'Interface';\n } elseif ($this->isAbstract()) {\n $type = 'Abstract';\n }\n\n if ($this->isFinal()) {\n $type = 'Final ' . $type;\n }\n if ($this->hasTag('deprecated')) {\n $type = 'Deprecated ' . $type;\n }\n\n return $type;\n }", "public function getClass(): string\n {\n return $this->class;\n }", "protected function getClassField() {}", "function studiare_get_class_attribute($value) {\n\treturn studiare_get_inline_attr($value, 'class', ' ');\n}", "function BuildRideClass($record)\n{\n $class = ($record['ClassX']) ? \"X\" : \"-\";\n $class .= ($record['ClassA']) ? \"A\" : \"-\";\n $class .= ($record['ClassB']) ? \"B\" : \"-\";\n $class .= ($record['ClassC']) ? \"C\" : \"-\";\n $class .= ($record['ClassD']) ? \"D\" : \"-\";\n return($class);\n}", "public function appliesToType(): string\n {\n return $this->requireConstant('TYPE_CLASS');\n }", "public function getClass()\n {\n return $this->type;\n }", "public function getEntityClass() : string\n {\n return Image::class;\n }", "public function GetRequestClass ();", "public function class()\n {\n // @codingStandardsIgnoreLine\n return $this->class ?? \"\";\n }", "public function getClass() : ?string\n {\n\n return $this->parsed['class'];\n }", "public function detect() {\n\t\t$this->status = new WPSEO_Import_Status( 'detect', false );\n\n\t\tif ( ! $this->detect_helper() ) {\n\t\t\treturn $this->status;\n\t\t}\n\n\t\treturn $this->status->set_status( true );\n\t}", "function ucsc_getListGenePrediction($orgv,&$predictions){\n checkConfig(); global $annot_file;\n $lines=file($annot_file);\n foreach($lines as $line){\n list($orgg,$org,$version,$data)=explode(\",\",$line);\n if(strtoupper($orgv)==strtoupper($version)){\n $annots=split(\":\",$data);\n foreach($annots as $annot)\n $predictions[]=array('prediction'=>array('name'=>$annot,'id'=>$annot));\n break;\n }\n }\n}", "function fetch_data_old_class()\n\t{\n\t\tif ($this->data_old == $this->data_new)\n\t\t{\n\t\t\treturn 'unchanged';\n\t\t}\n\t\telse if ($this->data_old AND empty($this->data_new))\n\t\t{\n\t\t\treturn 'deleted';\n\t\t}\n\t\telse if (trim($this->data_old) === '')\n\t\t{\n\t\t\treturn 'notext';\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn 'changed';\n\t\t}\n\t}", "public static function GetDetectionBySystemConfig () {\n\t\treturn static::$detectionBySystemConfig;\n\t}", "public function fetchClass()\n {\n return $this->class;\n }", "protected function _getClassFromPercent($percent)\n {\n $class = floor(($percent / 10));\n\n if ($percent >= 5) {\n $class++;\n }\n\n if ($percent >= 80 && $percent < 100) {\n $class = 8;\n } elseif ($percent == 100) {\n $class = 9;\n }\n\n return $class;\n }", "function kind_class( $class = '' ) {\n echo 'class=\"' . join( ' ', get_kind_class( $class ) ) . '\"';\n}", "public function classify($content, $ignoreFlag = 1) {\n $parameters=array(\n 'content'=>$content,\n 'ignore-flag'=>$ignoreFlag\n );\n $content = json_encode($parameters);\n \n $jsonreply=$this->CallWebService('classify',$content);\n \n return $this->ParseReply($jsonreply);\n }", "public function getSearchClass()\n {\n return 'tx_t3socials_search_Network';\n }", "public static function getClass($vote){\n\n\t\tif($vote){\n\t\t\treturn $vote['vote'] == 1 ? 'is-liked': 'is-disliked';\n\t\t}\n\t\treturn null;\n\t}", "public function set_content_type_sniffer_class($class = 'SimplePie_Content_Type_Sniffer')\n {\n }", "function classify($text){\n\t\t\n\t\t\n\t\t$probDoc = $this->totalDocumentary/($this->totalDocumentary + $this->totalNonDocumentary) ;\n\t\t$probNonDoc = $this->totalNonDocumentary/($this->totalDocumentary + $this->totalNonDocumentary) ;\n\t\t\n\t\t\n\t\t$words = explode(\" \",$text);\n\t\t\n\t\tfor($i = 0; $i < count($words); $i++){\n\t\t\t\n\t\t\t$sql = \"SELECT n_doc, n_nondoc FROM dictionary WHERE word = '\".$words[$i].\"' \";\n\t\t\t$result = mysql_query($sql) or die(\"Classifier->classify_1: error en consulta\".mysql_error().\"SQL: \".$sql);\n\t\t\t\n\t\t\tif(mysql_num_rows($result) > 0){\n\t\t\t\t \n\t\t\t\t$probNonDoc *= (mysql_result($result,0,\"n_nondoc\")+1)/($this->totalNonDocumentary +1);\n\t\t\t\t$probDoc *= (mysql_result($result,0,\"n_doc\")+1)/($this->totalDocumentary +1);\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t$resta = $probDoc - $probNonDoc;\n\t\t\n\t\t$threshold = 0;\n\t\t\n\t\tif( ($probDoc - $probNonDoc) > $threshold){\n\t\t\treturn 1;\n\t\t}else{\n\t\t\treturn 0;\t\n\t\t}\n\t\n\t}", "public static function requestClass(): string;", "public function setDetectionStatus(?DetectionStatus $value): void {\n $this->getBackingStore()->set('detectionStatus', $value);\n }", "function ucsc_getListFeatures($orgv,&$predictions){\n checkConfig(); global $features_file; $lines=file($features_file);\n foreach($lines as $line){\n list($orgg,$org,$version,$data)=explode(\",\",$line);\n if(strtoupper($orgv)==strtoupper($version)){\n $annots=split(\":\",$data);\n foreach($annots as $annot)\n $predictions[]=array('prediction'=>array('name'=>$annot,'id'=>$annot));\n break;\n }\n }\n}", "private function computeClassAttribute(): void\n {\n $classes = $this->options['class'] ?? null;\n $paramClasses = $this->getRenderer()->getParam('class');\n\n if (null !== $classes || null !== $paramClasses) {\n $this->attributes['class'] = array_merge(\n $this->attributes['class'],\n $classes !== null ? is_array($classes) ? $classes : explode(' ', $classes) : [],\n $paramClasses !== null ? is_array($paramClasses) ? $paramClasses : explode(' ', $paramClasses) : []\n );\n }\n }", "function answer_status_tags_class($answer)\n {\n if(($answer['has_tags'])) {\n return 'warning';\n }\n\n return '';\n }", "public function getClass(): ?string\r\n {\r\n return $this->class;\r\n }", "public static function getRequestDetailsClass(): string\n {\n return config('laravel-server-analytics.request_details_class');\n }", "public function getType(){\n if ($this->isImage())\n return 'img';\n if ($this->isDoc())\n return 'doc';\n if ($this->isVid())\n return 'vid';\n if ($this->isAudio())\n return 'audio';\n return ''; \n }", "public function getCgClass()\n {\n return $this->cg_class;\n }", "public function identify()\n\t{\n\t\treturn \"NHMRC Grants CSV Data to RIFCS\";\n\t}", "public function getResponseClass(): string\n {\n return 'GetCardBindingsResponse';\n }", "protected function scanClass()\n {\n return $this->scanInput('/^\\.([\\w-]+)/', 'class');\n }", "private function detectFieldType($class, $field)\n {\n $annotations = $this->annotationReader->getPropertyAnnotations(new \\ReflectionProperty($class, $field));\n $mappingColumn = array_filter($annotations, function($item) {\n return $item instanceof \\Doctrine\\ORM\\Mapping\\Column;\n });\n $mappingColumnCurrent = current($mappingColumn);\n\n return ($mappingColumnCurrent->type === 'string') ? 'text' : 'textarea';\n }", "public function GetResponseClass ();", "private function parseCasterClass($class)\n {\n return false === strpos($class, ':') ? $class: trim(explode(':', $class, 2)[0]);\n }", "function answer_status_class($answer)\n {\n if($answer['is_correct']) {\n return 'correct';\n } else if($answer['is_unanswered']) {\n return 'unanswered';\n } else {\n return 'incorrect';\n }\n }", "function doGoogleVisionRequest($filename, $type=\"SAFE_SEARCH_DETECTION\") {\n $request['requests'] = ['image'=>[], 'features'=>[\"type\"=>$type, \"maxResults\"=>999]];\n\n $data = file_get_contents($filename);\n if ($data===FALSE) {\n die(\"Invalid file/url: $filename\\n\");\n }\n\n $request['requests']['image']['content'] = base64_encode($data);\n $payload = json_encode($request);\n\n $ch = curl_init(GOOGLE_VISION_END_POINT . GOOGLE_VISION_KEY);\n curl_setopt( $ch, CURLOPT_POSTFIELDS, $payload );\n curl_setopt( $ch, CURLOPT_HTTPHEADER, array('Content-Type:application/json'));\n curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );\n $result = curl_exec($ch);\n curl_close($ch);\n\n return $result;\n}", "public function getFromBrowserDetection()\n {\n // Set custom rule\n $this->browserDetection->addCustomBrowserDetection('Amazon Silk', 'Silk', true);\n //Parse user agent\n $this->browserDetection->setUserAgent();\n //identify browser\n $this->useragent['browser'] = $this->browserDetection->getName();\n if ($this->browserDetection->getPlatformVersion() == 'unknown') {\n $this->useragent['osFull'] = $this->browserDetection->getPlatform();\n } else {\n $this->useragent['osFull'] = $this->browserDetection->getPlatformVersion();\n }\n }", "public static function classify($command) {\n\t\treturn str_classify($command) . 'Command';\n\t}", "public function fetch_class()\n\t{\n\t\treturn $this->route_stack[self::SEG_CLASS];\n\t}", "protected function getTestedClass(): string\n {\n return ConfigurationDefinition::class;\n }", "public function getDetectionType(): ?Win32LobAppFileSystemDetectionType {\n $val = $this->getBackingStore()->get('detectionType');\n if (is_null($val) || $val instanceof Win32LobAppFileSystemDetectionType) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'detectionType'\");\n }", "public function getApiClass(): string\n {\n return $this->apiClass;\n }", "public function getClassOff()\n {\n return $this->classOff;\n }", "public function get_response_class($classid) {\n if (!isset($this->responseclasses[$classid])) {\n debugging('Unexpected class id ' . $classid . ' encountered.');\n $this->responseclasses[$classid] = new analysis_for_class('[Unknown]', $classid);\n }\n return $this->responseclasses[$classid];\n\n }", "function addClassURI(){\n\t\t$classURIs = $this->classArray;\n\t\t$output = \"\";\n\t\t$db = $this->startDB();\n\t\t$sql = \"SELECT class_uuid, class_label\n\t\tFROM sp_classes\n\t\tWHERE 1\n\t\t\";\n\t\t$result = $db->fetchAll($sql);\n\t\tforeach($result as $row){\n\t\t\t$uuid = $row[\"class_uuid\"];\n\t\t\t$label = $row[\"class_label\"];\n\t\t\t$lcLabel = strtolower($label);\n\t\t\tforeach($classURIs as $lkey => $luri){\n\t\t\t\t$lclkey = strtolower($lkey);\n\t\t\t\tif($lclkey == $lcLabel){\n\t\t\t\t\t$uriex = explode(\"/\", $luri);\n\t\t\t\t\t$suffix = $uriex[count($uriex)-1];\n\t\t\t\t\t$prefURI = \"oc-gen:\".$suffix;\n\t\t\t\t\t$where = \"class_uuid = '$uuid' \";\n\t\t\t\t\t$data = array(\"class_uri\" => $prefURI);\n\t\t\t\t\t$db->update(\"sp_classes\", $data, $where);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public function getResponseClass();", "function doDetect()\n{\n $success = false;\n $message = '';\n $faces = array();\n\n\n if (fileValidate($filepath, $error)) {\n $success = true;\n $faces = face_detect($filepath, 'opencv-2.4.10-haarcascades/' . FACEDETECT_HAARCASCADE_XML);\n\n } else {\n $message = $error;\n }\n\n $jsonData = array(\n 'success' => $success,\n 'message' => $message,\n 'faces' => $faces\n );\n\n header('Content-type: application/json');\n echo json_encode($jsonData);\n}", "public function getClassification(): ?WindowsQualityUpdateClassification {\n $val = $this->getBackingStore()->get('classification');\n if (is_null($val) || $val instanceof WindowsQualityUpdateClassification) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'classification'\");\n }" ]
[ "0.76851404", "0.5568269", "0.5485261", "0.5476471", "0.5427775", "0.52677506", "0.5258469", "0.5161848", "0.49667016", "0.4836566", "0.48180425", "0.4815602", "0.47887242", "0.47630548", "0.475217", "0.46893963", "0.4687226", "0.46643898", "0.4662026", "0.46571922", "0.4639721", "0.4627408", "0.46136686", "0.460702", "0.45930332", "0.45929193", "0.45650464", "0.4560051", "0.4552929", "0.45513737", "0.45208475", "0.4466355", "0.44657034", "0.44340894", "0.443246", "0.44322717", "0.4430126", "0.4415393", "0.44092986", "0.44026342", "0.4396232", "0.4390718", "0.43730107", "0.43563452", "0.43505433", "0.43460977", "0.43432102", "0.4332876", "0.43327874", "0.43209636", "0.43186444", "0.431423", "0.4311434", "0.43062025", "0.4302342", "0.42948657", "0.42940146", "0.42935374", "0.42935115", "0.4291829", "0.42831415", "0.42779055", "0.427713", "0.42767003", "0.42677683", "0.4267638", "0.42624834", "0.4262057", "0.42617914", "0.4260742", "0.4253552", "0.42506742", "0.42458272", "0.42391154", "0.4229959", "0.42275268", "0.42207506", "0.42203912", "0.42084402", "0.42023733", "0.4195066", "0.4191734", "0.41911888", "0.418861", "0.41863757", "0.41854212", "0.4176686", "0.41708654", "0.4164345", "0.41627815", "0.41547552", "0.415028", "0.41428748", "0.41410935", "0.41410515", "0.41356236", "0.41339085", "0.413306", "0.41328982", "0.41290748" ]
0.7694972
0
Generated from protobuf field string detection_class = 4;
public function setDetectionClass($var) { GPBUtil::checkString($var, True); $this->detection_class = $var; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDetectionClass()\n {\n return $this->detection_class;\n }", "abstract public static function detect();", "public function getDetectionId()\n {\n return $this->detection_id;\n }", "public function detector(): Detect;", "public function getClassification()\n {\n return $this->classification;\n }", "public static function getVerifiedClass() {\n if ( self::getVerified() ) {\n return 'green';\n }\n return 'red';\n }", "public function getFamilyClass() {}", "protected function getCandidateType()\n {\n if (!$this->detectedType) {\n $this->detectedType = $this->detectType();\n }\n\n return $this->detectedType;\n }", "public function get_class_ID()\n {\n return CGHBVRQQualification::ID;\n }", "public function getClass(): string\n {\n foreach ($this->resourceRecords as $resourceRecord) {\n if (null !== $resourceRecord->getClass()) {\n return $resourceRecord->getClass();\n }\n }\n\n return Classes::INTERNET;\n }", "public function setDetectionType($type = null)\n\t\t{\n\t\t\tif ($type === null) {\n\t\t\t\t$type = self::DETECTION_TYPE_MOBILE;\n\t\t\t}\n\n\t\t\tif ($type != self::DETECTION_TYPE_MOBILE && $type != self::DETECTION_TYPE_EXTENDED) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$this->detectionType = $type;\n\t\t}", "public function setDetectionId($var)\n {\n GPBUtil::checkInt32($var);\n $this->detection_id = $var;\n\n return $this;\n }", "public function getClassificationName()\n {\n return $this->classification_name;\n }", "public function getStatusClass() {\n return intval(floor($this->_status / 100));\n }", "public function getCollectedClass(): string\n {\n return $this->collected_class;\n }", "public function getMimeBasedClassname() {\n $mime = $this->getData('mediatype');\n return strstr($mime, '/', true);\n }", "public function getImageClass()\n {\n return $this->image_class;\n }", "function getActualClass(){\n\t\treturn $this->nmclass;\n\t}", "public function setClassification($v)\n {\n if ($v !== null) {\n $v = (string) $v;\n }\n\n if ($this->classification !== $v) {\n $this->classification = $v;\n $this->modifiedColumns[BiblioTableMap::COL_CLASSIFICATION] = true;\n }\n\n return $this;\n }", "public function getClassAnnotations(string $class): array;", "function tsuiseki_tracking_get_css_class() {\n $css = TSUISEKI_TRACKER_CSS_CLASS;\n if (empty($css)) {\n $css = (string)trim(get_option('tsuiseki_tracking_css_class'));\n }\n return $css;\n}", "public function getStatusclassAttribute()\n {\n switch ($this->status) {\n case Meeting::$STATUS_NEW:\n return \"fc-new-meeting\";\n case Meeting::$STATUS_ATTENDED:\n return \"fc-attend-meeting\";\n case Meeting::$STATUS_ABSENT:\n return \"fc-absent-meeting\";\n default:\n return \"Unknown Status: \" . $this->status;\n }\n }", "function get_descriptive_classification( $classification ) {\n switch ( $classification ) {\n case 1: $out = 'LL'; break;\n case 2: $out = 'LS'; break;\n case 3: $out = 'LH'; break;\n case 4: $out = 'LE'; break;\n\t\t\tcase 5: $out = 'OHS'; break;\n\t\t\tcase 6: $out = 'Q'; break;\n\t\t\tcase 7: $out = 'P'; break;\n default: $out = 'Undefined'; break;\n }\n return $out;\n }", "public function getType( bool $forceDetection = FALSE ): int\n\t{\n\t\tif( self::TYPE_UNKNOWN === $this->type || $forceDetection ){\n\t\t\tif( $this instanceof MessagePartInlineImage )\n\t\t\t\t$this->type\t= static::TYPE_INLINE_IMAGE;\n\t\t\telse if( $this instanceof MessagePartMail )\n\t\t\t\t$this->type\t= static::TYPE_MAIL;\n\t\t\telse if( $this instanceof MessagePartAttachment )\n\t\t\t\t$this->type\t= static::TYPE_ATTACHMENT;\n\t\t\telse if( $this instanceof MessagePartHTML )\n\t\t\t\t$this->type\t= static::TYPE_HTML;\n\t\t\telse if( $this instanceof MessagePartText )\n\t\t\t\t$this->type\t= static::TYPE_TEXT;\n\t\t}\n\t\treturn $this->type;\n\t}", "abstract function detect(array $http);", "function GetClass() {\n\t\tswitch($this->type) {\n\t\t\tcase BLOCK_PAGE: return \"page\";\n\t\t\tcase \"T_FUNCTION\": return \"function\";\n\t\t\tcase \"T_CLASS\": return \"class\";\n\t\t\tcase \"T_INTERFACE\": return \"interface\";\n\t\t\tcase \"T_STRING\": return \"define\";\n\t\t\tcase \"T_INCLUDE\": case \"T_INCLUDE_ONCE\": case \"T_REQUIRE\": case \"T_REQUIRE_ONCE\": return \"include\";\n\t\t}\n\t\treturn \"\";\n\t}", "public function getSource()\n {\n return 'classification';\n }", "function earthquakeClass(string $value)\n {\n // Class\tMagnitude\n // Great\t8 or more\n // Major\t7 - 7.9\n // Strong\t6 - 6.9\n // Moderate\t5 - 5.9\n // Light\t4 - 4.9\n // Minor\t3 - 3.9\n if ((int)$value >= 8) {\n return 'Great';\n } elseif ((int)$value == 7) {\n return 'Major';\n } elseif ((int)$value == 6) {\n return 'Strong';\n } elseif ((int)$value == 5) {\n return 'Moderate';\n } elseif ((int)$value == 4) {\n return 'Light';\n } elseif ((int)$value == 3) {\n return 'Minor';\n } else {\n return 'Negligible';\n }\n }", "public function setDetectionType(?Win32LobAppFileSystemDetectionType $value): void {\n $this->getBackingStore()->set('detectionType', $value);\n }", "public function getFeatureClass ($feature);", "public function detectMessage(){\n\n\t\t$result=$this->model->newMessageDetection();\n\n\t\tif($result!==false){\n\t\t\techo json_encode($result);\n\t\t}else{\n\t\t\techo 'false';\n\t\t}\n\t}", "protected static function getDecoderClassname(): string\n {\n return sprintf('Intervention\\Gif\\Decoder\\%sDecoder', self::getShortClassname());\n }", "public function getClass(): string\n {\n if ($this->class === null) {\n throw new RuntimeException('Empty class for @Type annotation. You MUST create the Type annotation object using the GraphQLite AnnotationReader');\n }\n\n return $this->class;\n }", "protected function detectType()\n {\n if (property_exists($this, 'allow')) {\n return $this->allow;\n }\n\n $interfaces = (new ReflectionClass($this))->getInterfaceNames();\n\n if ($interfaces) {\n return $interfaces[0];\n }\n\n return get_class($this);\n }", "protected function getApiClass(): string {\n\t\treturn ExternalReference::class;\n\t}", "abstract protected function getBufferClass() : string;", "public function getClassType()\n {\n return $this->classType;\n }", "public function getTypeClass() {\n return 'check';\n }", "public function getObjects() : array\n {\n $net = SsdDnn::readNetFromTensorflow();\n\n $net->setInput(SsdDnn::blobFromImage($this->image), '');\n\n $detected = [];\n $detections = $net->forward();\n $categories = SsdDnn::getCategories();\n\n for ($i = 0; $i < $detections->shape[2]; $i++) {\n $classId = $detections->atIdx([0, 0, $i, 1]);\n $confidence = intval($detections->atIdx([0, 0, $i, 2]) * 100);\n\n if ($classId && $confidence > $this->threshold) {\n $detected[] = $categories[$classId];\n }\n }\n\n return $detected;\n }", "private function getClassesBack(){\n $class = \"hex\";\n $building = \"\";\n\n $building = $this->getBuilding();\n if (strlen($building)){\n $class .= \" \".$building; \n\n if ($this->getBunker()){\n $class .= \"-bunker\";\n }\n } \n else {\n $class .= $this->getTerrainClass(); \n }\n\n if ($this->getOwner() == I_OWN){\n $class .= \" friend\";\n }\n else if ($this->getOwner() == YOU_OWN){\n $class .= \" enemy\";\n }\n\n return $class;\n }", "public function getClass(string $class);", "public function getClassDefinition();", "function getClassAnnotations(\\ReflectionClass $class);", "function fetch_data_new_class()\n\t{\n\t\tif ($this->data_old == $this->data_new)\n\t\t{\n\t\t\treturn 'unchanged';\n\t\t}\n\t\telse if ($this->data_new AND empty($this->data_old))\n\t\t{\n\t\t\treturn 'added';\n\t\t}\n\t\telse if (trim($this->data_new) === '')\n\t\t{\n\t\t\treturn 'notext';\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn 'changed';\n\t\t}\n\t}", "private static function detectCarrier() {\n $userAgent = env('HTTP_USER_AGENT');\n $classifier = new \\Woothee\\Classifier;\n $r = $classifier->parse($userAgent);\n\n // smartphone\n if ($r['category'] === 'smartphone') {\n return 'iPhone';\n }\n\n // mobilephone\n if ($r['category'] === 'mobilephone') {\n if (preg_match('/^J-PHONE/', $userAgent)) {\n return 'J-PHONE';\n }\n switch ($r['os']) {\n case 'docomo':\n return 'docomo';\n case 'au':\n return 'au';\n case 'SoftBank':\n return 'SoftBank';\n case 'WILLCOM':\n return 'WILLCOM';\n case 'emobile':\n return 'EMOBILE';\n }\n return 'docomo';\n }\n\n // pc\n return 'PC';\n }", "abstract protected function getMonitoredClass();", "public function getStatusClass($value)\n {\n switch ($value) {\n case 'A':\n return 'answered';\n case 'M':\n return 'missed';\n case 'O':\n return 'open';\n case 'U':\n return 'unknown';\n case 'W':\n return 'waiting';\n default:\n return 'empty';\n }\n }", "public function getConditionClass();", "public function getType(): string\n {\n $type = 'Class';\n if ($this->isTrait()) {\n $type = 'Trait';\n } elseif ($this->isInterface()) {\n $type = 'Interface';\n } elseif ($this->isAbstract()) {\n $type = 'Abstract';\n }\n\n if ($this->isFinal()) {\n $type = 'Final ' . $type;\n }\n if ($this->hasTag('deprecated')) {\n $type = 'Deprecated ' . $type;\n }\n\n return $type;\n }", "public function getClass(): string\n {\n return $this->class;\n }", "protected function getClassField() {}", "function studiare_get_class_attribute($value) {\n\treturn studiare_get_inline_attr($value, 'class', ' ');\n}", "function BuildRideClass($record)\n{\n $class = ($record['ClassX']) ? \"X\" : \"-\";\n $class .= ($record['ClassA']) ? \"A\" : \"-\";\n $class .= ($record['ClassB']) ? \"B\" : \"-\";\n $class .= ($record['ClassC']) ? \"C\" : \"-\";\n $class .= ($record['ClassD']) ? \"D\" : \"-\";\n return($class);\n}", "public function appliesToType(): string\n {\n return $this->requireConstant('TYPE_CLASS');\n }", "public function getClass()\n {\n return $this->type;\n }", "public function getEntityClass() : string\n {\n return Image::class;\n }", "public function GetRequestClass ();", "public function class()\n {\n // @codingStandardsIgnoreLine\n return $this->class ?? \"\";\n }", "public function getClass() : ?string\n {\n\n return $this->parsed['class'];\n }", "public function detect() {\n\t\t$this->status = new WPSEO_Import_Status( 'detect', false );\n\n\t\tif ( ! $this->detect_helper() ) {\n\t\t\treturn $this->status;\n\t\t}\n\n\t\treturn $this->status->set_status( true );\n\t}", "function ucsc_getListGenePrediction($orgv,&$predictions){\n checkConfig(); global $annot_file;\n $lines=file($annot_file);\n foreach($lines as $line){\n list($orgg,$org,$version,$data)=explode(\",\",$line);\n if(strtoupper($orgv)==strtoupper($version)){\n $annots=split(\":\",$data);\n foreach($annots as $annot)\n $predictions[]=array('prediction'=>array('name'=>$annot,'id'=>$annot));\n break;\n }\n }\n}", "function fetch_data_old_class()\n\t{\n\t\tif ($this->data_old == $this->data_new)\n\t\t{\n\t\t\treturn 'unchanged';\n\t\t}\n\t\telse if ($this->data_old AND empty($this->data_new))\n\t\t{\n\t\t\treturn 'deleted';\n\t\t}\n\t\telse if (trim($this->data_old) === '')\n\t\t{\n\t\t\treturn 'notext';\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn 'changed';\n\t\t}\n\t}", "public static function GetDetectionBySystemConfig () {\n\t\treturn static::$detectionBySystemConfig;\n\t}", "public function fetchClass()\n {\n return $this->class;\n }", "protected function _getClassFromPercent($percent)\n {\n $class = floor(($percent / 10));\n\n if ($percent >= 5) {\n $class++;\n }\n\n if ($percent >= 80 && $percent < 100) {\n $class = 8;\n } elseif ($percent == 100) {\n $class = 9;\n }\n\n return $class;\n }", "function kind_class( $class = '' ) {\n echo 'class=\"' . join( ' ', get_kind_class( $class ) ) . '\"';\n}", "public function classify($content, $ignoreFlag = 1) {\n $parameters=array(\n 'content'=>$content,\n 'ignore-flag'=>$ignoreFlag\n );\n $content = json_encode($parameters);\n \n $jsonreply=$this->CallWebService('classify',$content);\n \n return $this->ParseReply($jsonreply);\n }", "public function getSearchClass()\n {\n return 'tx_t3socials_search_Network';\n }", "public static function getClass($vote){\n\n\t\tif($vote){\n\t\t\treturn $vote['vote'] == 1 ? 'is-liked': 'is-disliked';\n\t\t}\n\t\treturn null;\n\t}", "public function set_content_type_sniffer_class($class = 'SimplePie_Content_Type_Sniffer')\n {\n }", "function classify($text){\n\t\t\n\t\t\n\t\t$probDoc = $this->totalDocumentary/($this->totalDocumentary + $this->totalNonDocumentary) ;\n\t\t$probNonDoc = $this->totalNonDocumentary/($this->totalDocumentary + $this->totalNonDocumentary) ;\n\t\t\n\t\t\n\t\t$words = explode(\" \",$text);\n\t\t\n\t\tfor($i = 0; $i < count($words); $i++){\n\t\t\t\n\t\t\t$sql = \"SELECT n_doc, n_nondoc FROM dictionary WHERE word = '\".$words[$i].\"' \";\n\t\t\t$result = mysql_query($sql) or die(\"Classifier->classify_1: error en consulta\".mysql_error().\"SQL: \".$sql);\n\t\t\t\n\t\t\tif(mysql_num_rows($result) > 0){\n\t\t\t\t \n\t\t\t\t$probNonDoc *= (mysql_result($result,0,\"n_nondoc\")+1)/($this->totalNonDocumentary +1);\n\t\t\t\t$probDoc *= (mysql_result($result,0,\"n_doc\")+1)/($this->totalDocumentary +1);\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t$resta = $probDoc - $probNonDoc;\n\t\t\n\t\t$threshold = 0;\n\t\t\n\t\tif( ($probDoc - $probNonDoc) > $threshold){\n\t\t\treturn 1;\n\t\t}else{\n\t\t\treturn 0;\t\n\t\t}\n\t\n\t}", "public static function requestClass(): string;", "public function setDetectionStatus(?DetectionStatus $value): void {\n $this->getBackingStore()->set('detectionStatus', $value);\n }", "function ucsc_getListFeatures($orgv,&$predictions){\n checkConfig(); global $features_file; $lines=file($features_file);\n foreach($lines as $line){\n list($orgg,$org,$version,$data)=explode(\",\",$line);\n if(strtoupper($orgv)==strtoupper($version)){\n $annots=split(\":\",$data);\n foreach($annots as $annot)\n $predictions[]=array('prediction'=>array('name'=>$annot,'id'=>$annot));\n break;\n }\n }\n}", "private function computeClassAttribute(): void\n {\n $classes = $this->options['class'] ?? null;\n $paramClasses = $this->getRenderer()->getParam('class');\n\n if (null !== $classes || null !== $paramClasses) {\n $this->attributes['class'] = array_merge(\n $this->attributes['class'],\n $classes !== null ? is_array($classes) ? $classes : explode(' ', $classes) : [],\n $paramClasses !== null ? is_array($paramClasses) ? $paramClasses : explode(' ', $paramClasses) : []\n );\n }\n }", "function answer_status_tags_class($answer)\n {\n if(($answer['has_tags'])) {\n return 'warning';\n }\n\n return '';\n }", "public function getClass(): ?string\r\n {\r\n return $this->class;\r\n }", "public static function getRequestDetailsClass(): string\n {\n return config('laravel-server-analytics.request_details_class');\n }", "public function getType(){\n if ($this->isImage())\n return 'img';\n if ($this->isDoc())\n return 'doc';\n if ($this->isVid())\n return 'vid';\n if ($this->isAudio())\n return 'audio';\n return ''; \n }", "public function getCgClass()\n {\n return $this->cg_class;\n }", "public function identify()\n\t{\n\t\treturn \"NHMRC Grants CSV Data to RIFCS\";\n\t}", "public function getResponseClass(): string\n {\n return 'GetCardBindingsResponse';\n }", "protected function scanClass()\n {\n return $this->scanInput('/^\\.([\\w-]+)/', 'class');\n }", "private function detectFieldType($class, $field)\n {\n $annotations = $this->annotationReader->getPropertyAnnotations(new \\ReflectionProperty($class, $field));\n $mappingColumn = array_filter($annotations, function($item) {\n return $item instanceof \\Doctrine\\ORM\\Mapping\\Column;\n });\n $mappingColumnCurrent = current($mappingColumn);\n\n return ($mappingColumnCurrent->type === 'string') ? 'text' : 'textarea';\n }", "public function GetResponseClass ();", "private function parseCasterClass($class)\n {\n return false === strpos($class, ':') ? $class: trim(explode(':', $class, 2)[0]);\n }", "function answer_status_class($answer)\n {\n if($answer['is_correct']) {\n return 'correct';\n } else if($answer['is_unanswered']) {\n return 'unanswered';\n } else {\n return 'incorrect';\n }\n }", "function doGoogleVisionRequest($filename, $type=\"SAFE_SEARCH_DETECTION\") {\n $request['requests'] = ['image'=>[], 'features'=>[\"type\"=>$type, \"maxResults\"=>999]];\n\n $data = file_get_contents($filename);\n if ($data===FALSE) {\n die(\"Invalid file/url: $filename\\n\");\n }\n\n $request['requests']['image']['content'] = base64_encode($data);\n $payload = json_encode($request);\n\n $ch = curl_init(GOOGLE_VISION_END_POINT . GOOGLE_VISION_KEY);\n curl_setopt( $ch, CURLOPT_POSTFIELDS, $payload );\n curl_setopt( $ch, CURLOPT_HTTPHEADER, array('Content-Type:application/json'));\n curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );\n $result = curl_exec($ch);\n curl_close($ch);\n\n return $result;\n}", "public function getFromBrowserDetection()\n {\n // Set custom rule\n $this->browserDetection->addCustomBrowserDetection('Amazon Silk', 'Silk', true);\n //Parse user agent\n $this->browserDetection->setUserAgent();\n //identify browser\n $this->useragent['browser'] = $this->browserDetection->getName();\n if ($this->browserDetection->getPlatformVersion() == 'unknown') {\n $this->useragent['osFull'] = $this->browserDetection->getPlatform();\n } else {\n $this->useragent['osFull'] = $this->browserDetection->getPlatformVersion();\n }\n }", "public static function classify($command) {\n\t\treturn str_classify($command) . 'Command';\n\t}", "public function fetch_class()\n\t{\n\t\treturn $this->route_stack[self::SEG_CLASS];\n\t}", "protected function getTestedClass(): string\n {\n return ConfigurationDefinition::class;\n }", "public function getDetectionType(): ?Win32LobAppFileSystemDetectionType {\n $val = $this->getBackingStore()->get('detectionType');\n if (is_null($val) || $val instanceof Win32LobAppFileSystemDetectionType) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'detectionType'\");\n }", "public function getApiClass(): string\n {\n return $this->apiClass;\n }", "public function getClassOff()\n {\n return $this->classOff;\n }", "public function get_response_class($classid) {\n if (!isset($this->responseclasses[$classid])) {\n debugging('Unexpected class id ' . $classid . ' encountered.');\n $this->responseclasses[$classid] = new analysis_for_class('[Unknown]', $classid);\n }\n return $this->responseclasses[$classid];\n\n }", "function addClassURI(){\n\t\t$classURIs = $this->classArray;\n\t\t$output = \"\";\n\t\t$db = $this->startDB();\n\t\t$sql = \"SELECT class_uuid, class_label\n\t\tFROM sp_classes\n\t\tWHERE 1\n\t\t\";\n\t\t$result = $db->fetchAll($sql);\n\t\tforeach($result as $row){\n\t\t\t$uuid = $row[\"class_uuid\"];\n\t\t\t$label = $row[\"class_label\"];\n\t\t\t$lcLabel = strtolower($label);\n\t\t\tforeach($classURIs as $lkey => $luri){\n\t\t\t\t$lclkey = strtolower($lkey);\n\t\t\t\tif($lclkey == $lcLabel){\n\t\t\t\t\t$uriex = explode(\"/\", $luri);\n\t\t\t\t\t$suffix = $uriex[count($uriex)-1];\n\t\t\t\t\t$prefURI = \"oc-gen:\".$suffix;\n\t\t\t\t\t$where = \"class_uuid = '$uuid' \";\n\t\t\t\t\t$data = array(\"class_uri\" => $prefURI);\n\t\t\t\t\t$db->update(\"sp_classes\", $data, $where);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public function getResponseClass();", "function doDetect()\n{\n $success = false;\n $message = '';\n $faces = array();\n\n\n if (fileValidate($filepath, $error)) {\n $success = true;\n $faces = face_detect($filepath, 'opencv-2.4.10-haarcascades/' . FACEDETECT_HAARCASCADE_XML);\n\n } else {\n $message = $error;\n }\n\n $jsonData = array(\n 'success' => $success,\n 'message' => $message,\n 'faces' => $faces\n );\n\n header('Content-type: application/json');\n echo json_encode($jsonData);\n}", "public function getClassification(): ?WindowsQualityUpdateClassification {\n $val = $this->getBackingStore()->get('classification');\n if (is_null($val) || $val instanceof WindowsQualityUpdateClassification) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'classification'\");\n }" ]
[ "0.7694972", "0.5568269", "0.5485261", "0.5476471", "0.5427775", "0.52677506", "0.5258469", "0.5161848", "0.49667016", "0.4836566", "0.48180425", "0.4815602", "0.47887242", "0.47630548", "0.475217", "0.46893963", "0.4687226", "0.46643898", "0.4662026", "0.46571922", "0.4639721", "0.4627408", "0.46136686", "0.460702", "0.45930332", "0.45929193", "0.45650464", "0.4560051", "0.4552929", "0.45513737", "0.45208475", "0.4466355", "0.44657034", "0.44340894", "0.443246", "0.44322717", "0.4430126", "0.4415393", "0.44092986", "0.44026342", "0.4396232", "0.4390718", "0.43730107", "0.43563452", "0.43505433", "0.43460977", "0.43432102", "0.4332876", "0.43327874", "0.43209636", "0.43186444", "0.431423", "0.4311434", "0.43062025", "0.4302342", "0.42948657", "0.42940146", "0.42935374", "0.42935115", "0.4291829", "0.42831415", "0.42779055", "0.427713", "0.42767003", "0.42677683", "0.4267638", "0.42624834", "0.4262057", "0.42617914", "0.4260742", "0.4253552", "0.42506742", "0.42458272", "0.42391154", "0.4229959", "0.42275268", "0.42207506", "0.42203912", "0.42084402", "0.42023733", "0.4195066", "0.4191734", "0.41911888", "0.418861", "0.41863757", "0.41854212", "0.4176686", "0.41708654", "0.4164345", "0.41627815", "0.41547552", "0.415028", "0.41428748", "0.41410935", "0.41410515", "0.41356236", "0.41339085", "0.413306", "0.41328982", "0.41290748" ]
0.76851404
1
Generated from protobuf field repeated .Attribute attributes = 5;
public function getAttributes() { return $this->attributes; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setAttributes($var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::MESSAGE, \\Attribute::class);\n $this->attributes = $arr;\n\n return $this;\n }", "public function defineAttributes()\n\t{\n\t\treturn array();\n\t}", "public function attributes()\n {\n return [\n //\n ];\n }", "public function attributes()\n {\n return [\n //\n ];\n }", "public function attributes()\n {\n return [\n //\n ];\n }", "public function attributes()\n {\n return [\n //\n ];\n }", "public function attributes()\n {\n return [\n //\n ];\n }", "public function attributes()\n {\n return [\n //\n ];\n }", "public function attributes()\n {\n return [\n //\n ];\n }", "public function attributes()\n {\n return [\n //\n ];\n }", "public function attributes()\n {\n return [\n //\n ];\n }", "public function defineAttributes()\n {\n return array(\n 'id' => AttributeType::Number,\n 'receiptParagraphOne' => AttributeType::String,\n 'receiptParagraphTwo' => AttributeType::String,\n 'receiptParagraphThree' => AttributeType::String,\n 'notifyEmail' => AttributeType::String\n );\n }", "public function attributes() : array;", "protected function defineAttributes()\n {\n return array_merge(parent::defineAttributes(), array(\n 'Amount' => array(AttributeType::Number, 'decimals' => 0),\n 'GrossNet' => AttributeType::String,\n 'Id' => AttributeType::String,\n 'Period' => AttributeType::String,\n 'Type' => AttributeType::String\n ));\n }", "public function attributes();", "public function defineAttributes()\n {\n return array(\n 'id' => AttributeType::Number,\n 'receiptBody' => AttributeType::String,\n );\n }", "protected function defineAttributes()\n\t{\n\t\treturn array_merge(parent::defineAttributes(), array(\n\t\t\t'id' => AttributeType::Number,\n\t\t\t'label' => array(AttributeType::String, 'default' => '', 'required' => true),\n\t\t\t'key' => array(AttributeType::Handle, 'default' => '', 'required' => true),\n\t\t\t'value' => array(AttributeType::String, 'default' => '', 'required' => true),\n\t\t));\n\t}", "public function getAttributes()\n {\n return [\n Attributes\\IdAttribute::make(),\n Attributes\\TextAttribute::make('name')\n ->setRequired(true)\n ->setUnique(true),\n Attributes\\LongTextAttribute::make('description'),\n Attributes\\TextAttribute::make('filter'),\n Attributes\\EnumAttribute::make('class_name', config('amethyst.data-builder.data.data-builder.attributes.class_name.options')),\n Attributes\\YamlAttribute::make('class_arguments'),\n Attributes\\YamlAttribute::make('mock_data'),\n Attributes\\YamlAttribute::make('input'),\n Attributes\\TextAttribute::make('include'),\n Attributes\\CreatedAtAttribute::make(),\n Attributes\\UpdatedAtAttribute::make(),\n Attributes\\DeletedAtAttribute::make(),\n ];\n }", "protected function defineAttributes()\n\t{\n\t\treturn array(\n\t\t\t'id' => AttributeType::Number,\n\t\t\t'type' => AttributeType::String,\n\t\t\t'date' => AttributeType::DateTime,\n\t\t\t'context' => AttributeType::String,\n\t\t\t'settings' => AttributeType::Mixed,\n\t\t);\n\t}", "public function attributes(): array\n {\n return [\n //\n ];\n }", "public function attributes(): array\n {\n return [\n //\n ];\n }", "protected function defineAttributes()\n {\n return [\n 'name' => [AttributeType::String, 'required' => true],\n 'handle' => [AttributeType::Handle, 'required' => true],\n 'color' => [AttributeType::Enum,\n 'values' => ['green', 'red'],\n 'required' => true,\n 'default' => 'green'\n ],\n 'sortOrder' => [AttributeType::SortOrder],\n 'isDefault' => [AttributeType::Bool, 'default' => 0]\n ];\n }", "protected function defineAttributes()\n {\n return array_merge(parent::defineAttributes(), array(\n 'Id' => AttributeType::String,\n 'Section' => AttributeType::String,\n 'SequenceNr' => AttributeType::Number,\n 'Text' => AttributeType::String,\n 'Type' => AttributeType::String,\n ));\n }", "abstract function attributes(): array;", "public function attributes()\n {\n return [\n ];\n }", "public function getCustomAttributes(): array;", "public function getAttributes()\n {\n return [\n Attributes\\IdAttribute::make(),\n \\Amethyst\\Core\\Attributes\\DataNameAttribute::make('model')\n ->setRequired(true)\n ->setMutable(false),\n Attributes\\TextAttribute::make('name')\n ->setRequired(true)\n ->setValidator(function (EntityContract $entity, $value) {\n return preg_match('/^[a-zA-Z_][a-zA-Z0-9_]*$/', $value);\n }),\n Attributes\\LongTextAttribute::make('description'),\n Attributes\\EnumAttribute::make('schema', array_keys(Config::get('amethyst.attribute-schema.resolvers')))\n ->setRequired(true),\n Attributes\\BooleanAttribute::make('required')\n ->setDefault(function (EntityContract $entity) {\n return false;\n }),\n Attributes\\TextAttribute::make('regex')\n ->setRequired(false)\n ->setValidator(function (EntityContract $entity, $value) {\n try {\n return preg_match($value, null) !== false;\n } catch (\\Throwable $exception) {\n return false;\n }\n }),\n Attributes\\YamlAttribute::make('options')\n ->setValidator(function (EntityContract $entity, $value) {\n $options = (object) Yaml::parse((string) $attributeRaw->options);\n }),\n Attributes\\TextAttribute::make('require')\n ->setFillable(false)\n ->setMutable(false),\n Attributes\\CreatedAtAttribute::make(),\n Attributes\\UpdatedAtAttribute::make(),\n Attributes\\DeletedAtAttribute::make(),\n ];\n }", "public function getAttributes(): array;", "public function getAttributes(): array;", "public function getAttributes(): array;", "public function getAttributes(): array;", "public function getAttributes(): array\n {\n return [\n Attributes\\IdAttribute::make(),\n Attributes\\UuidAttribute::make(),\n Attributes\\TextAttribute::make('name')\n ->setUnique(true)\n ->setRequired(true),\n Attributes\\EmailAttribute::make('email')\n ->setRequired(true)\n ->setUnique(true),\n Attributes\\PasswordAttribute::make('password')\n ->setRequired(true),\n Attributes\\BooleanAttribute::make('enabled'),\n Attributes\\CreatedAtAttribute::make(),\n Attributes\\UpdatedAtAttribute::make(),\n Attributes\\DeletedAtAttribute::make(),\n ];\n }", "protected function defineAttributes()\n {\n return array_merge(parent::defineAttributes(), array(\n 'Alert' => AttributeType::Bool,\n 'CreatedDateTime' => AttributeType::DateTime,\n 'EndDateTime' => AttributeType::DateTime,\n 'Id' => AttributeType::String,\n 'NewlyBuilt' => AttributeType::Bool,\n 'ObjectGroup' => array(AttributeType::ClassName, 'models' => 'TobiasAx_ObjectGroupModel'),\n 'Option' => AttributeType::Bool,\n 'ReasonDroppedId' => AttributeType::String,\n 'RenewalDate' => AttributeType::DateTime,\n 'SeekerRegistration' => array(AttributeType::ClassName, 'models' => 'TobiasAx_RegistrationModel'),\n 'Sequence' => AttributeType::Number,\n 'Status' => AttributeType::String\n ));\n }", "public function getAttributesFields(): array\n {\n $fields = [];\n\n // Only fields without relations\n foreach ($this->fieldsArray(false) as $attribute) {\n $fields[$attribute] = [\n 'name' => $attribute,\n 'type' => $this->overrideMethod(\n 'set'.Str::studly($attribute).'Type',\n [$this, 'callGraphQLType'],\n $attribute\n ),\n 'privacy' => function (array $args) use ($attribute): bool {\n $method = 'get'.Str::studly($attribute).'Privacy';\n\n return $this->$method($args);\n },\n ];\n }\n\n return $fields;\n }", "public function attributes()\n {\n return $this->morphToMany(Attribute::class, 'attribute_able');\n }", "public function __construct(array $attributes = []);", "protected function defineAttributes()\n {\n return array_merge(parent::defineAttributes(), array(\n 'state' => array(AttributeType::String, 'default' => ''),\n 'category' => array(AttributeType::String, 'default' => ''),\n 'code' => array(AttributeType::String, 'default' => ''),\n 'include' => array(AttributeType::Number, 'default' => ''),\n 'taxable' => array(AttributeType::String, 'default' => ''),\n 'zip' => array(AttributeType::String, 'default' => ''),\n ));\n }", "public function attributes()\n {\n return [];\n }", "public function attributes()\n {\n return [];\n }", "public function attributes()\n {\n return [];\n }", "public function getAttributes();", "public function getAttributes();", "public function getAttributes();", "public function getAttributes();", "public function getAttributes();", "public function getAttributes();", "public function getAttributes();", "public function getAttributes();", "public function getAttributes();", "public function getAttributes() {}", "public function getAttributes() {}", "public function getAttributes(): iterable;", "private function getDefaultAttributes()\n {\n return [\n 'name' => [\n 'type' => 'varchar',\n 'label' => 'Name',\n 'input' => 'text',\n 'sort_order' => 1,\n 'global' => ScopedAttributeInterface::SCOPE_STORE,\n 'group' => 'General',\n ],\n 'is_active' => [\n 'type' => 'int',\n 'label' => 'Is Active',\n 'input' => 'select',\n 'source' => Boolean::class,\n 'sort_order' => 2,\n 'global' => ScopedAttributeInterface::SCOPE_STORE,\n 'group' => 'General',\n ],\n 'url_key' => [\n 'type' => 'varchar',\n 'label' => 'URL Key',\n 'input' => 'text',\n 'required' => false,\n 'sort_order' => 3,\n 'global' => ScopedAttributeInterface::SCOPE_STORE,\n 'group' => 'General',\n ],\n 'description' => [\n 'type' => 'text',\n 'label' => 'Description',\n 'input' => 'textarea',\n 'required' => false,\n 'sort_order' => 4,\n 'global' => ScopedAttributeInterface::SCOPE_STORE,\n 'wysiwyg_enabled' => true,\n 'is_html_allowed_on_front' => true,\n 'group' => 'General',\n ],\n 'image' => [\n 'type' => 'varchar',\n 'label' => 'Image',\n 'input' => 'image',\n 'backend' => Image::class,\n 'required' => false,\n 'sort_order' => 5,\n 'global' => ScopedAttributeInterface::SCOPE_STORE,\n 'group' => 'General',\n ],\n ];\n }", "public function getAttributes()\n {\n return array();\n }", "public function getAttributes()\n {\n return array();\n }", "public function getAttributes()\n {\n return array();\n }", "public function getAttributes()\n {\n return array();\n }", "public function setAttributes();", "public function attributes() { return $this->attributes; }", "public function setRawAttributes($attributes) {\n $regex_attributes = \"/(?P<key>[a-z0-9-]+)=?(?P<value> [a-z0-9-]+)?,?/ix\";\n $attrib = array();\n if($attributes != '') {\n $parts = array();\n $result = preg_match_all($regex_attributes, $attributes, $parts);\n if(!$result) {\n $this->attributes = $attrib;\n return $this;\n }\n $keys = $parts['key'];\n $values = $parts['value'];\n $allowed_keys = $this->getAllowedAttributes();\n $allowed_values = $this->getAllowedAttributeValues();\n foreach ($keys as $index => $key) {\n $key = strtolower($key);\n // The key is in the allowed_keys array\n if(in_array($key, $allowed_keys)) {\n $value = strtolower($values[$index]);\n if(array_key_exists($key, $allowed_values)) {\n // For this key exists a allowed values array\n if(in_array($value, $allowed_values[$key])) {\n // Otherwise we check if the value is in the array\n $attrib[$key][] = $value; \n } else {\n // OK, we found a key wich is not allowed\n $allowedValues = implode(', ', $allowed_values[$key]);\n throw new Exception(\"$this->class: '$value' not allowed for attribute '$key'! Allowed values are: $allowedValues\");\n } \n } else {\n // For this key, no array with allowed values exist. we just save the key and asume any value is allowed\n $attrib[$key][] = $value;\n //throw new Exception(\"$this->class: '$value' not allowed for attribute '$key'! Allowed values are: $allowedValues\");\n }\n } else {\n $keyIsAllowed = false;\n foreach($allowed_values as $otherKey => $otherValues) {\n if(in_array($key, $otherValues)) {\n $attrib[$otherKey][] = $key;\n $keyIsAllowed = true;\n }\n }\n if(!$keyIsAllowed) {\n throw new Exception(sprintf(\"%s: '%s' not allowed as attribute!\", $this->class, $key));\n }\n }\n }\n }\n $this->attributes = $attrib;\n return $this;\n }", "abstract protected function attributes();", "public function getAttributes()\n {\n }", "protected function attributes()\n {\n return [];\n }", "public function __construct(){\n if(count($this->fillable) == 0){\n foreach($this->attributes as $key => $attr){\n array_push($this->fillable, $key);\n }\n }\n }", "public function getCustomAttributes() {}", "public function getAttributes()\n {\n return [\n Attributes\\IdAttribute::make(),\n Attributes\\CreatedAtAttribute::make(),\n Attributes\\UpdatedAtAttribute::make(),\n ];\n }", "public function attributes() // atribūtu savi nosaukumi\n {\n return[ \n 'fname' => 'Vārds',\n 'lname' => 'Uzvārds',\n 'email' => 'E-pasts',\n 'oldpassword' => 'Paroles lauks',\n 'password' => 'Jaunas paroles lauks',\n 'buttontitle' => 'Pogas virsraksts',\n 'buttonlink' => 'Pogas links',\n 'reciever' => 'Saņēmēju lauks',\n 'emailtitle' => 'Ziņas virsrsksts',\n 'emailtext' => 'Ziņas teksts',\n 'transport' => 'Pasākumu lauks'\n ];\n }", "protected function getAttributes()\n {\n return [];\n }", "public function getAttributes() {\n $attr = array();\n \n $attr[\"id\"] = $this->id_;\n $attr[\"taxonId\"] = $this->taxonId_;\n $attr[\"dbh\"] = $this->dbh_;\n $attr[\"lat\"] = $this->lat_;\n $attr[\"lng\"] = $this->lng_;\n $attr[\"layers\"] = $this->layers_;\n \n return $attr;\n }", "public function nextAttribute();", "public function getAttributes()\n {\n return array_merge(\n parent::getAttributes(),\n array(\n 'size' => $this->maxLength,\n 'class' => 'text colorField'\n )\n );\n }", "abstract public function attributeNames();", "public function getAttributes() {\n return array_merge($this->getFields(), $this->getProperties());\n }", "public function getAttributes(){ }", "public function buildAttributes() {\n // Start with the element attributes (e.g., type of text)\n $attributes = $this->elementAttributes();\n\n // The form attributes.\n $attributes += array(\n 'action' => $this->action,\n 'method' => $this->method,\n );\n\n // The attributes that have been set.\n $attributes += $this->attributes;\n\n return $attributes;\n }", "public function attributes()\r\n\t{\r\n\t\treturn $this->attribs;\r\n\t}", "public static function supportedAttributes();", "public function attributes()\n\t{\n\t\treturn $this->attribs;\n\t}", "public function getAttributesList() {\n return $this->_get(24);\n }", "function getAttributes()\n {\n }", "public function attributes()\n\t{\n\t\treturn ['id', 'file'];\n\t}", "public function getAttributes()\n {\n return array_merge(\n $this->attributes,\n [\n 'args' => $this->args(),\n 'type' => $this->type(),\n 'resolve' => $this->getResolver(),\n ]\n );\n }", "function getAdditionalAttributes() ;", "protected function getCommonAttributes()\n {\n return array(\n 'autocreated' => array('values' => array('a', 'aut', 'autocreated'), 'variant' => true),\n 'mandatory' => array('values' => array('m', 'man', 'mandatory'), 'variant' => true),\n 'protected' => array('values' => array('p', 'pro', 'protected'), 'variant' => true),\n 'COPY' => array('values' => array('COPY'), 'variant' => false),\n 'VERSION' => array('values' => array('VERSION'), 'variant' => false),\n 'INITIALIZE' => array('values' => array('INITIALIZE'), 'variant' => false),\n 'COMPUTE' => array('values' => array('COMPUTE'), 'variant' => false),\n 'IGNORE' => array('values' => array('IGNORE'), 'variant' => false),\n 'ABORT' => array('values' => array('ABORT'), 'variant' => false),\n 'OPV' => array('values' => array('OPV'), 'variant' => true),\n );\n }", "protected abstract function initializeAttributes(): array;", "public function getAttributesList() {\n return $this->_get(15);\n }", "public function getAttributesList() {\n return $this->_get(15);\n }", "public function attributes()\n {\n\n return [\n 'name' => __('fields.name'),\n 'email' => __('fields.email'), \n 'phone' => __('fields.phone'),\n 'departure' => __('fields.departure'),\n 'adult' => __('fields.adult'),\n 'child' => __('fields.child'),\n 'comment' => __('fields.comment') \n ]; \n }", "public function attributes()\n {\n $attributes = [];\n\n foreach ($this->request->get('email') as $index => $email) {\n $number = $index + 1;\n $attributes[\"email.{$index}\"] = \"{$number}º e-mail\";\n }\n\n return $attributes;\n }", "public function attributes(): array\n {\n return [\n $this->attributePrefix.'target' => $this->target(),\n $this->attributePrefix.'filterByType' => $this->filterByType,\n ];\n }", "public function make(array $attributes = []);", "public function make(array $attributes = []);", "public function getDefaultAttributes()\n {\n return [\n 'Value' => 0,\n 'MinValue' => 0,\n 'MaxValue' => 100,\n 'Increment' => 1,\n ];\n }", "public function defineCriteriaAttributes()\n {\n return [\n 'userId' => [AttributeType::Number],\n 'chargeId' => [AttributeType::Number],\n 'membershipSubscriptionId' => [AttributeType::Number],\n 'status' => [AttributeType::String]\n ];\n }", "function attributes() {\n\t\t$this->load_attributes();\n\t\treturn $this->_attributes;\n\t}", "public function getAdditionalAttributes() {}", "public function getAdditionalAttributes() {}", "public function getAdditionalAttributes() {}", "public function getAdditionalAttributes() {}", "public function addAttributes(\\obiba\\mica\\AttributeDto $value) {\n return $this->_add(24, $value);\n }", "public function getAdditionalAttributes() {}" ]
[ "0.6291132", "0.61131626", "0.60453475", "0.60453475", "0.60453475", "0.60453475", "0.60453475", "0.60453475", "0.60453475", "0.60453475", "0.60453475", "0.6035549", "0.6022645", "0.60178375", "0.60088575", "0.5990631", "0.597444", "0.5972229", "0.59627765", "0.59532726", "0.59532726", "0.59441674", "0.59409255", "0.59319544", "0.5925857", "0.5862246", "0.5806499", "0.58014905", "0.58014905", "0.58014905", "0.58014905", "0.5792098", "0.57877046", "0.5767383", "0.5723206", "0.5721629", "0.570933", "0.5688515", "0.5688515", "0.5688515", "0.56674933", "0.56674933", "0.56674933", "0.56674933", "0.56674933", "0.56674933", "0.56674933", "0.56674933", "0.56674933", "0.5656934", "0.56556743", "0.5646718", "0.5628993", "0.56282556", "0.56282556", "0.56282556", "0.56282556", "0.56176287", "0.5588816", "0.5588757", "0.5580932", "0.5550086", "0.55297285", "0.5521318", "0.55140215", "0.5499192", "0.5494697", "0.54809994", "0.5477114", "0.54720837", "0.5450978", "0.54470205", "0.54443836", "0.5440557", "0.54370445", "0.5434312", "0.5423851", "0.54167545", "0.5402745", "0.540166", "0.540106", "0.5390571", "0.53886145", "0.537582", "0.53740203", "0.5358555", "0.5358555", "0.53585345", "0.53411555", "0.5340499", "0.53401935", "0.53401935", "0.53379214", "0.53369594", "0.5335928", "0.53342974", "0.53342974", "0.5333377", "0.5332972", "0.53318805", "0.5331773" ]
0.0
-1
Generated from protobuf field repeated .Attribute attributes = 5;
public function setAttributes($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Attribute::class); $this->attributes = $arr; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function defineAttributes()\n\t{\n\t\treturn array();\n\t}", "public function attributes()\n {\n return [\n //\n ];\n }", "public function attributes()\n {\n return [\n //\n ];\n }", "public function attributes()\n {\n return [\n //\n ];\n }", "public function attributes()\n {\n return [\n //\n ];\n }", "public function attributes()\n {\n return [\n //\n ];\n }", "public function attributes()\n {\n return [\n //\n ];\n }", "public function attributes()\n {\n return [\n //\n ];\n }", "public function attributes()\n {\n return [\n //\n ];\n }", "public function attributes()\n {\n return [\n //\n ];\n }", "public function defineAttributes()\n {\n return array(\n 'id' => AttributeType::Number,\n 'receiptParagraphOne' => AttributeType::String,\n 'receiptParagraphTwo' => AttributeType::String,\n 'receiptParagraphThree' => AttributeType::String,\n 'notifyEmail' => AttributeType::String\n );\n }", "public function attributes() : array;", "protected function defineAttributes()\n {\n return array_merge(parent::defineAttributes(), array(\n 'Amount' => array(AttributeType::Number, 'decimals' => 0),\n 'GrossNet' => AttributeType::String,\n 'Id' => AttributeType::String,\n 'Period' => AttributeType::String,\n 'Type' => AttributeType::String\n ));\n }", "public function attributes();", "public function defineAttributes()\n {\n return array(\n 'id' => AttributeType::Number,\n 'receiptBody' => AttributeType::String,\n );\n }", "protected function defineAttributes()\n\t{\n\t\treturn array_merge(parent::defineAttributes(), array(\n\t\t\t'id' => AttributeType::Number,\n\t\t\t'label' => array(AttributeType::String, 'default' => '', 'required' => true),\n\t\t\t'key' => array(AttributeType::Handle, 'default' => '', 'required' => true),\n\t\t\t'value' => array(AttributeType::String, 'default' => '', 'required' => true),\n\t\t));\n\t}", "public function getAttributes()\n {\n return [\n Attributes\\IdAttribute::make(),\n Attributes\\TextAttribute::make('name')\n ->setRequired(true)\n ->setUnique(true),\n Attributes\\LongTextAttribute::make('description'),\n Attributes\\TextAttribute::make('filter'),\n Attributes\\EnumAttribute::make('class_name', config('amethyst.data-builder.data.data-builder.attributes.class_name.options')),\n Attributes\\YamlAttribute::make('class_arguments'),\n Attributes\\YamlAttribute::make('mock_data'),\n Attributes\\YamlAttribute::make('input'),\n Attributes\\TextAttribute::make('include'),\n Attributes\\CreatedAtAttribute::make(),\n Attributes\\UpdatedAtAttribute::make(),\n Attributes\\DeletedAtAttribute::make(),\n ];\n }", "protected function defineAttributes()\n\t{\n\t\treturn array(\n\t\t\t'id' => AttributeType::Number,\n\t\t\t'type' => AttributeType::String,\n\t\t\t'date' => AttributeType::DateTime,\n\t\t\t'context' => AttributeType::String,\n\t\t\t'settings' => AttributeType::Mixed,\n\t\t);\n\t}", "public function attributes(): array\n {\n return [\n //\n ];\n }", "public function attributes(): array\n {\n return [\n //\n ];\n }", "protected function defineAttributes()\n {\n return [\n 'name' => [AttributeType::String, 'required' => true],\n 'handle' => [AttributeType::Handle, 'required' => true],\n 'color' => [AttributeType::Enum,\n 'values' => ['green', 'red'],\n 'required' => true,\n 'default' => 'green'\n ],\n 'sortOrder' => [AttributeType::SortOrder],\n 'isDefault' => [AttributeType::Bool, 'default' => 0]\n ];\n }", "protected function defineAttributes()\n {\n return array_merge(parent::defineAttributes(), array(\n 'Id' => AttributeType::String,\n 'Section' => AttributeType::String,\n 'SequenceNr' => AttributeType::Number,\n 'Text' => AttributeType::String,\n 'Type' => AttributeType::String,\n ));\n }", "abstract function attributes(): array;", "public function attributes()\n {\n return [\n ];\n }", "public function getCustomAttributes(): array;", "public function getAttributes()\n {\n return [\n Attributes\\IdAttribute::make(),\n \\Amethyst\\Core\\Attributes\\DataNameAttribute::make('model')\n ->setRequired(true)\n ->setMutable(false),\n Attributes\\TextAttribute::make('name')\n ->setRequired(true)\n ->setValidator(function (EntityContract $entity, $value) {\n return preg_match('/^[a-zA-Z_][a-zA-Z0-9_]*$/', $value);\n }),\n Attributes\\LongTextAttribute::make('description'),\n Attributes\\EnumAttribute::make('schema', array_keys(Config::get('amethyst.attribute-schema.resolvers')))\n ->setRequired(true),\n Attributes\\BooleanAttribute::make('required')\n ->setDefault(function (EntityContract $entity) {\n return false;\n }),\n Attributes\\TextAttribute::make('regex')\n ->setRequired(false)\n ->setValidator(function (EntityContract $entity, $value) {\n try {\n return preg_match($value, null) !== false;\n } catch (\\Throwable $exception) {\n return false;\n }\n }),\n Attributes\\YamlAttribute::make('options')\n ->setValidator(function (EntityContract $entity, $value) {\n $options = (object) Yaml::parse((string) $attributeRaw->options);\n }),\n Attributes\\TextAttribute::make('require')\n ->setFillable(false)\n ->setMutable(false),\n Attributes\\CreatedAtAttribute::make(),\n Attributes\\UpdatedAtAttribute::make(),\n Attributes\\DeletedAtAttribute::make(),\n ];\n }", "public function getAttributes(): array;", "public function getAttributes(): array;", "public function getAttributes(): array;", "public function getAttributes(): array;", "public function getAttributes(): array\n {\n return [\n Attributes\\IdAttribute::make(),\n Attributes\\UuidAttribute::make(),\n Attributes\\TextAttribute::make('name')\n ->setUnique(true)\n ->setRequired(true),\n Attributes\\EmailAttribute::make('email')\n ->setRequired(true)\n ->setUnique(true),\n Attributes\\PasswordAttribute::make('password')\n ->setRequired(true),\n Attributes\\BooleanAttribute::make('enabled'),\n Attributes\\CreatedAtAttribute::make(),\n Attributes\\UpdatedAtAttribute::make(),\n Attributes\\DeletedAtAttribute::make(),\n ];\n }", "protected function defineAttributes()\n {\n return array_merge(parent::defineAttributes(), array(\n 'Alert' => AttributeType::Bool,\n 'CreatedDateTime' => AttributeType::DateTime,\n 'EndDateTime' => AttributeType::DateTime,\n 'Id' => AttributeType::String,\n 'NewlyBuilt' => AttributeType::Bool,\n 'ObjectGroup' => array(AttributeType::ClassName, 'models' => 'TobiasAx_ObjectGroupModel'),\n 'Option' => AttributeType::Bool,\n 'ReasonDroppedId' => AttributeType::String,\n 'RenewalDate' => AttributeType::DateTime,\n 'SeekerRegistration' => array(AttributeType::ClassName, 'models' => 'TobiasAx_RegistrationModel'),\n 'Sequence' => AttributeType::Number,\n 'Status' => AttributeType::String\n ));\n }", "public function getAttributesFields(): array\n {\n $fields = [];\n\n // Only fields without relations\n foreach ($this->fieldsArray(false) as $attribute) {\n $fields[$attribute] = [\n 'name' => $attribute,\n 'type' => $this->overrideMethod(\n 'set'.Str::studly($attribute).'Type',\n [$this, 'callGraphQLType'],\n $attribute\n ),\n 'privacy' => function (array $args) use ($attribute): bool {\n $method = 'get'.Str::studly($attribute).'Privacy';\n\n return $this->$method($args);\n },\n ];\n }\n\n return $fields;\n }", "public function attributes()\n {\n return $this->morphToMany(Attribute::class, 'attribute_able');\n }", "public function __construct(array $attributes = []);", "protected function defineAttributes()\n {\n return array_merge(parent::defineAttributes(), array(\n 'state' => array(AttributeType::String, 'default' => ''),\n 'category' => array(AttributeType::String, 'default' => ''),\n 'code' => array(AttributeType::String, 'default' => ''),\n 'include' => array(AttributeType::Number, 'default' => ''),\n 'taxable' => array(AttributeType::String, 'default' => ''),\n 'zip' => array(AttributeType::String, 'default' => ''),\n ));\n }", "public function attributes()\n {\n return [];\n }", "public function attributes()\n {\n return [];\n }", "public function attributes()\n {\n return [];\n }", "public function getAttributes();", "public function getAttributes();", "public function getAttributes();", "public function getAttributes();", "public function getAttributes();", "public function getAttributes();", "public function getAttributes();", "public function getAttributes();", "public function getAttributes();", "public function getAttributes() {}", "public function getAttributes() {}", "public function getAttributes(): iterable;", "private function getDefaultAttributes()\n {\n return [\n 'name' => [\n 'type' => 'varchar',\n 'label' => 'Name',\n 'input' => 'text',\n 'sort_order' => 1,\n 'global' => ScopedAttributeInterface::SCOPE_STORE,\n 'group' => 'General',\n ],\n 'is_active' => [\n 'type' => 'int',\n 'label' => 'Is Active',\n 'input' => 'select',\n 'source' => Boolean::class,\n 'sort_order' => 2,\n 'global' => ScopedAttributeInterface::SCOPE_STORE,\n 'group' => 'General',\n ],\n 'url_key' => [\n 'type' => 'varchar',\n 'label' => 'URL Key',\n 'input' => 'text',\n 'required' => false,\n 'sort_order' => 3,\n 'global' => ScopedAttributeInterface::SCOPE_STORE,\n 'group' => 'General',\n ],\n 'description' => [\n 'type' => 'text',\n 'label' => 'Description',\n 'input' => 'textarea',\n 'required' => false,\n 'sort_order' => 4,\n 'global' => ScopedAttributeInterface::SCOPE_STORE,\n 'wysiwyg_enabled' => true,\n 'is_html_allowed_on_front' => true,\n 'group' => 'General',\n ],\n 'image' => [\n 'type' => 'varchar',\n 'label' => 'Image',\n 'input' => 'image',\n 'backend' => Image::class,\n 'required' => false,\n 'sort_order' => 5,\n 'global' => ScopedAttributeInterface::SCOPE_STORE,\n 'group' => 'General',\n ],\n ];\n }", "public function getAttributes()\n {\n return array();\n }", "public function getAttributes()\n {\n return array();\n }", "public function getAttributes()\n {\n return array();\n }", "public function getAttributes()\n {\n return array();\n }", "public function setAttributes();", "public function attributes() { return $this->attributes; }", "public function setRawAttributes($attributes) {\n $regex_attributes = \"/(?P<key>[a-z0-9-]+)=?(?P<value> [a-z0-9-]+)?,?/ix\";\n $attrib = array();\n if($attributes != '') {\n $parts = array();\n $result = preg_match_all($regex_attributes, $attributes, $parts);\n if(!$result) {\n $this->attributes = $attrib;\n return $this;\n }\n $keys = $parts['key'];\n $values = $parts['value'];\n $allowed_keys = $this->getAllowedAttributes();\n $allowed_values = $this->getAllowedAttributeValues();\n foreach ($keys as $index => $key) {\n $key = strtolower($key);\n // The key is in the allowed_keys array\n if(in_array($key, $allowed_keys)) {\n $value = strtolower($values[$index]);\n if(array_key_exists($key, $allowed_values)) {\n // For this key exists a allowed values array\n if(in_array($value, $allowed_values[$key])) {\n // Otherwise we check if the value is in the array\n $attrib[$key][] = $value; \n } else {\n // OK, we found a key wich is not allowed\n $allowedValues = implode(', ', $allowed_values[$key]);\n throw new Exception(\"$this->class: '$value' not allowed for attribute '$key'! Allowed values are: $allowedValues\");\n } \n } else {\n // For this key, no array with allowed values exist. we just save the key and asume any value is allowed\n $attrib[$key][] = $value;\n //throw new Exception(\"$this->class: '$value' not allowed for attribute '$key'! Allowed values are: $allowedValues\");\n }\n } else {\n $keyIsAllowed = false;\n foreach($allowed_values as $otherKey => $otherValues) {\n if(in_array($key, $otherValues)) {\n $attrib[$otherKey][] = $key;\n $keyIsAllowed = true;\n }\n }\n if(!$keyIsAllowed) {\n throw new Exception(sprintf(\"%s: '%s' not allowed as attribute!\", $this->class, $key));\n }\n }\n }\n }\n $this->attributes = $attrib;\n return $this;\n }", "abstract protected function attributes();", "public function getAttributes()\n {\n }", "protected function attributes()\n {\n return [];\n }", "public function __construct(){\n if(count($this->fillable) == 0){\n foreach($this->attributes as $key => $attr){\n array_push($this->fillable, $key);\n }\n }\n }", "public function getCustomAttributes() {}", "public function getAttributes()\n {\n return [\n Attributes\\IdAttribute::make(),\n Attributes\\CreatedAtAttribute::make(),\n Attributes\\UpdatedAtAttribute::make(),\n ];\n }", "public function attributes() // atribūtu savi nosaukumi\n {\n return[ \n 'fname' => 'Vārds',\n 'lname' => 'Uzvārds',\n 'email' => 'E-pasts',\n 'oldpassword' => 'Paroles lauks',\n 'password' => 'Jaunas paroles lauks',\n 'buttontitle' => 'Pogas virsraksts',\n 'buttonlink' => 'Pogas links',\n 'reciever' => 'Saņēmēju lauks',\n 'emailtitle' => 'Ziņas virsrsksts',\n 'emailtext' => 'Ziņas teksts',\n 'transport' => 'Pasākumu lauks'\n ];\n }", "protected function getAttributes()\n {\n return [];\n }", "public function getAttributes() {\n $attr = array();\n \n $attr[\"id\"] = $this->id_;\n $attr[\"taxonId\"] = $this->taxonId_;\n $attr[\"dbh\"] = $this->dbh_;\n $attr[\"lat\"] = $this->lat_;\n $attr[\"lng\"] = $this->lng_;\n $attr[\"layers\"] = $this->layers_;\n \n return $attr;\n }", "public function nextAttribute();", "public function getAttributes()\n {\n return array_merge(\n parent::getAttributes(),\n array(\n 'size' => $this->maxLength,\n 'class' => 'text colorField'\n )\n );\n }", "abstract public function attributeNames();", "public function getAttributes() {\n return array_merge($this->getFields(), $this->getProperties());\n }", "public function getAttributes(){ }", "public function buildAttributes() {\n // Start with the element attributes (e.g., type of text)\n $attributes = $this->elementAttributes();\n\n // The form attributes.\n $attributes += array(\n 'action' => $this->action,\n 'method' => $this->method,\n );\n\n // The attributes that have been set.\n $attributes += $this->attributes;\n\n return $attributes;\n }", "public function attributes()\r\n\t{\r\n\t\treturn $this->attribs;\r\n\t}", "public static function supportedAttributes();", "public function attributes()\n\t{\n\t\treturn $this->attribs;\n\t}", "public function getAttributesList() {\n return $this->_get(24);\n }", "function getAttributes()\n {\n }", "public function attributes()\n\t{\n\t\treturn ['id', 'file'];\n\t}", "public function getAttributes()\n {\n return array_merge(\n $this->attributes,\n [\n 'args' => $this->args(),\n 'type' => $this->type(),\n 'resolve' => $this->getResolver(),\n ]\n );\n }", "function getAdditionalAttributes() ;", "protected function getCommonAttributes()\n {\n return array(\n 'autocreated' => array('values' => array('a', 'aut', 'autocreated'), 'variant' => true),\n 'mandatory' => array('values' => array('m', 'man', 'mandatory'), 'variant' => true),\n 'protected' => array('values' => array('p', 'pro', 'protected'), 'variant' => true),\n 'COPY' => array('values' => array('COPY'), 'variant' => false),\n 'VERSION' => array('values' => array('VERSION'), 'variant' => false),\n 'INITIALIZE' => array('values' => array('INITIALIZE'), 'variant' => false),\n 'COMPUTE' => array('values' => array('COMPUTE'), 'variant' => false),\n 'IGNORE' => array('values' => array('IGNORE'), 'variant' => false),\n 'ABORT' => array('values' => array('ABORT'), 'variant' => false),\n 'OPV' => array('values' => array('OPV'), 'variant' => true),\n );\n }", "protected abstract function initializeAttributes(): array;", "public function getAttributesList() {\n return $this->_get(15);\n }", "public function getAttributesList() {\n return $this->_get(15);\n }", "public function attributes()\n {\n\n return [\n 'name' => __('fields.name'),\n 'email' => __('fields.email'), \n 'phone' => __('fields.phone'),\n 'departure' => __('fields.departure'),\n 'adult' => __('fields.adult'),\n 'child' => __('fields.child'),\n 'comment' => __('fields.comment') \n ]; \n }", "public function attributes()\n {\n $attributes = [];\n\n foreach ($this->request->get('email') as $index => $email) {\n $number = $index + 1;\n $attributes[\"email.{$index}\"] = \"{$number}º e-mail\";\n }\n\n return $attributes;\n }", "public function attributes(): array\n {\n return [\n $this->attributePrefix.'target' => $this->target(),\n $this->attributePrefix.'filterByType' => $this->filterByType,\n ];\n }", "public function make(array $attributes = []);", "public function make(array $attributes = []);", "public function getDefaultAttributes()\n {\n return [\n 'Value' => 0,\n 'MinValue' => 0,\n 'MaxValue' => 100,\n 'Increment' => 1,\n ];\n }", "public function defineCriteriaAttributes()\n {\n return [\n 'userId' => [AttributeType::Number],\n 'chargeId' => [AttributeType::Number],\n 'membershipSubscriptionId' => [AttributeType::Number],\n 'status' => [AttributeType::String]\n ];\n }", "function attributes() {\n\t\t$this->load_attributes();\n\t\treturn $this->_attributes;\n\t}", "public function getAdditionalAttributes() {}", "public function getAdditionalAttributes() {}", "public function getAdditionalAttributes() {}", "public function getAdditionalAttributes() {}", "public function addAttributes(\\obiba\\mica\\AttributeDto $value) {\n return $this->_add(24, $value);\n }", "public function getAdditionalAttributes() {}" ]
[ "0.61131626", "0.60453475", "0.60453475", "0.60453475", "0.60453475", "0.60453475", "0.60453475", "0.60453475", "0.60453475", "0.60453475", "0.6035549", "0.6022645", "0.60178375", "0.60088575", "0.5990631", "0.597444", "0.5972229", "0.59627765", "0.59532726", "0.59532726", "0.59441674", "0.59409255", "0.59319544", "0.5925857", "0.5862246", "0.5806499", "0.58014905", "0.58014905", "0.58014905", "0.58014905", "0.5792098", "0.57877046", "0.5767383", "0.5723206", "0.5721629", "0.570933", "0.5688515", "0.5688515", "0.5688515", "0.56674933", "0.56674933", "0.56674933", "0.56674933", "0.56674933", "0.56674933", "0.56674933", "0.56674933", "0.56674933", "0.5656934", "0.56556743", "0.5646718", "0.5628993", "0.56282556", "0.56282556", "0.56282556", "0.56282556", "0.56176287", "0.5588816", "0.5588757", "0.5580932", "0.5550086", "0.55297285", "0.5521318", "0.55140215", "0.5499192", "0.5494697", "0.54809994", "0.5477114", "0.54720837", "0.5450978", "0.54470205", "0.54443836", "0.5440557", "0.54370445", "0.5434312", "0.5423851", "0.54167545", "0.5402745", "0.540166", "0.540106", "0.5390571", "0.53886145", "0.537582", "0.53740203", "0.5358555", "0.5358555", "0.53585345", "0.53411555", "0.5340499", "0.53401935", "0.53401935", "0.53379214", "0.53369594", "0.5335928", "0.53342974", "0.53342974", "0.5333377", "0.5332972", "0.53318805", "0.5331773" ]
0.6291132
0
get achievement main category
function achieve_get_main_category() { global $sql; $main_cat = array(); $result = $sql["dbc"]->query("SELECT ID, Name FROM achievement_category WHERE ParentID=-1 and ID<>1 ORDER BY `GroupID` ASC"); while ($main_cat[] = $sql["dbc"]->fetch_assoc($result)); return $main_cat; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_category()\n {\n return 'Fun and Games';\n }", "public function get_category()\n {\n return 'Fun and Games';\n }", "public function get_category()\n {\n return 'Fun and Games';\n }", "public function getAchievementCategories() { return $this->AchievementCategories; }", "function getCategory() {\n // Load categories.\n $categories = userpoints_get_categories();\n return isset($categories[$this->getTid()]) ? $categories[$this->getTid()] : $categories[userpoints_get_default_tid()];\n }", "public function getCategory() {}", "function the_category() {\n\tglobal $discussion;\n\treturn $discussion['category'];\n}", "public function category() {\n\t\treturn $this->get_category();\n\t}", "public function getCategory()\n {\n\t\treturn self::$categories[ $this->category ];\n }", "public function getCategory();", "public function getCategory();", "public static function getCategory()\n {\n return self::$category;\n }", "public function category() {\n\t\treturn static::get_thrive_basic_label();\n\t}", "function category(){\n\t\trequire('quizrooDB.php');\n\t\t$query = sprintf(\"SELECT cat_name FROM q_quiz_cat WHERE cat_id = %d\", GetSQLValueString($this->fk_quiz_cat, \"int\"));\n\t\t$getQuery = mysql_query($query, $quizroo) or die(mysql_error());\n\t\t$row_getQuery = mysql_fetch_assoc($getQuery);\n\t\treturn $row_getQuery['cat_name'];\n\t}", "function getCategory() \n {\n return $this->instance->getCategory();\n }", "public function category() {\n\t\treturn static::get_thrive_advanced_label();\n\t}", "public function getCategory(): string;", "public function get_category(){\n\t\treturn $this->category;\n\t}", "public function getCategory()\n {\n return \"Injection Flaws\"; //See category.php for list of all the categories\n }", "function achieve_get_sub_category()\r\n{\r\n global $sql;\r\n\r\n $sub_cat = array();\r\n $result = $sql[\"dbc\"]->query(\"SELECT ID, ParentID, Name FROM achievement_category WHERE ParentID<>-1 ORDER BY `GroupID` ASC\");\r\n $temp = $sql[\"dbc\"]->fetch_assoc($result);\r\n while ($sub_cat[$temp[\"ParentID\"]][$temp[\"ID\"]] = $temp[\"Name\"])\r\n {\r\n $temp = $sql[\"dbc\"]->fetch_assoc($result);\r\n }\r\n return $sub_cat;\r\n}", "public function getMainCategoryAttribute()\n {\n $mainCategory = 'Uncategorized';\n\n if (! empty($this->terms)) {\n $taxonomies = array_values($this->terms);\n\n if (! empty($taxonomies[0])) {\n $terms = array_values($taxonomies[0]);\n\n $mainCategory = $terms[0];\n }\n }\n\n return $mainCategory;\n }", "public function GetCategory()\r\n {\r\n return AppHelper::GetCategory($this->Core);\r\n }", "public function getCategory()\n {\n }", "public function getCategory()\n\t{\n\t\treturn $this->data['category'];\n\t}", "public function get_category()\n {\n return $this->primary_category();\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "function getMainCategory()\n {\n $sql = \"select * from tbl_issue_category where parent_id=0\";\n $query = $this->db->query($sql);\n return $query->result_array();\n }", "function getCategory()\r\n\t\t{\r\n\t\t\treturn $this->category;\r\n\t\t\t\r\n\t\t}", "function get_Category()\n {\n try {\n return $this->mCategory;\n }catch(Exception $e){\n $this->error->throwException('303', 'No s`ha pogut retornar la informació', $e);\n }\n }", "private function getCategory() {\n return '';\n }", "public function getCategory() {\n return $this->category;\n }", "public function getCategory(){\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "function pixelgrade_get_main_category( $post_ID = null ) {\n\n\t// Use the current post ID is none given\n\tif ( empty( $post_ID ) ) {\n\t\t$post_ID = get_the_ID();\n\t}\n\n\t// Obviously pages don't have categories\n\tif ( 'page' == get_post_type( $post_ID ) ) {\n\t\treturn false;\n\t}\n\n\t$categories = get_the_category();\n\n\tif ( empty( $categories ) ) {\n\t\treturn false;\n\t}\n\n\t// We need to sort the categories like this: first categories with no parent, and secondly ordered DESC by post count\n\t// Thus parent categories take precedence and categories with more posts take precedence\n\tusort( $categories, '_pixelgrade_special_category_order' );\n\n\t// The first category should be the one we are after\n\t// We allow others to filter this (Yoast primary category maybe?)\n\treturn apply_filters( 'pixelgrade_get_main_category', $categories[0], $post_ID );\n}", "public function getCategory()\n {\n return $this->_category;\n }", "public function getCategory() {\r\n return $this->catList->find('id', $this->categoryId)[0];\r\n }", "public function getCategory(){\r\n return Mage::registry('current_category');\r\n }", "function getCategory() {\n\t\treturn $this->node->firstChild->toString();\n\t}", "public function getCategory()\n\t{\n\t\treturn $this->category;\n\t}", "public function getCategory() {\n return $this->category;\n }", "function getCategory() {\n\t\t$categoryId = JRequest::getInt('category_id', 0) ;\n\t\t$sql = 'SELECT * FROM #__eb_categories WHERE id='.$categoryId;\n\t\t$this->_db->setQuery($sql) ;\n\t\treturn $this->_db->loadObject();\t\t\t\n\t}", "public function getCategory() {\n\t\treturn $this->category;\n\t}", "public function get_category()\n {\n return 'Graphical';\n }", "public function get_category()\n {\n return 'Graphical';\n }", "public function getCategory(): string|null;", "public function getCategory()\n {\n\n return $this->category;\n }", "public function getCurrentCategory()\n {\n return $this->category;\n }", "public function getCategoria()\n {\n return $this->categoria;\n }", "public function getCategoria()\n {\n return $this->categoria;\n }", "public function getAction() {\r\n\t\t$id = $this->getInput('id');\r\n\t\t$info = Game_Service_Category::getCategory(intval($id));\r\n\t\tif(!$info) $this->output(-1, '操作失败.');\r\n\t\t$this->output(0, '', $info);\r\n\t}", "public function getCategory()\n {\n return $this->category;\n }", "function thecategory() {\n global $categories_index, $category, $categories;\n $category = $categories[$categories_index - 1];\n return $category;\n}", "public function getProduct_category () {\n\t$preValue = $this->preGetValue(\"product_category\"); \n\tif($preValue !== null && !\\Pimcore::inAdmin()) { \n\t\treturn $preValue;\n\t}\n\t$data = $this->getClass()->getFieldDefinition(\"product_category\")->preGetData($this);\n\treturn $data;\n}", "public function getCategory()\n {\n return $this->readOneof(2);\n }", "public function getCategory1()\n {\n if (array_key_exists(\"category1\", $this->_propDict)) {\n return $this->_propDict[\"category1\"];\n } else {\n return null;\n }\n }", "function theme_moove_get_course_category($id){\n\n global $DB;\n\n $sql_query = \"SELECT category\n FROM {course}\n WHERE id = $id\";\n\n $categoryid = $DB->get_record_sql($sql_query)->category;\n\n return $categoryid;\n }", "private function getCategoryFullInfo(){\n return Db::select(CATEGORY_TABLE_NAME,\"id='$this->categoryId'\",\"single\");\n }", "public function get_category($key = 0)\n {\n }", "public function get_category($key = 0)\n {\n }", "public function get_category($key = 0)\n {\n }", "public function parseAchievementsByCategory($cID, $ID = null)\n {\n if (!$ID)\n {\n $ID = $this->getID();\n }\n\n if (!$ID)\n {\n echo \"error: No ID Set.\";\n }\n else if (!$cID)\n {\n echo \"No catagory id set.\";\n }\n else\n {\n // Get the source\n $this->getSource($this->URL['character']['profile'] . $ID . $this->URL['character']['achievement'] . $cID .'/');\n\n // Create a new character object\n $Achievements = new Achievements();\n\n // Get Achievements\n $Public = $Achievements->checkIfPublic($this->findAll('area_inner_tc', 20));\n\n if ($Public)\n {\n // Get Achievements\n $Achievements->addCategory($cID);\n $Achievements->set($this->findAll('achievement_area_body', NULL, 'bt_more', false));\n\n // Append character to array\n return $Achievements;\n }\n else\n {\n return false;\n }\n\n // Append character to array\n $this->Achievements[$cID] = $Achievements;\n\n return $Achievements;\n }\n }", "function cat_title()\n{\n global $category;\n return $category[\"title\"];\n}", "public function get_category()\n {\n return 'Information Display';\n }", "public function getCategoria()\n {\n return $this->categoria;\n }", "function getCategory() {\n\t\treturn $this->pluginCategory;\n\t}", "public function getCategory() {\n return $this->randomQuote->category_name;\n }", "public function get_category() {\n $data['get_category'] = $this->Category_model->get_category();\n return $data['get_category'];\n }", "public function getActiveCategory()\n {\n return $this->_activeCategory;\n }", "public function get_category_permastruct()\n {\n }", "function get_categories()\n\t\t{\n\t\t\t$categories = $this->manage_content->getValue('vertical_navbar','menu_name');\n\t\t\treturn $categories;\n\t\t}", "function get_category() {\n return self::CATEGORY_CLUSTER;\n }", "public function getCategoria()\n {\n return \"Cliente com alta credibilidade\";\n }", "public function getCat()\n {\n return $this->cat = get_the_category($this->id);\n }", "protected function getFirstCategory() {\r\n\t\treturn $this->newsItem->getFirstCategory()->getTitle();\r\n\t}", "function getCategory_details($category_name)\n\t\t{\n\t\t\t$details = $this->manage_content->getValue_where('vertical_navbar','*','menu_name',$category_name);\n\t\t\techo '<div class=\"category_header\">'.$details[0]['menu_name'].'</div>\n <br /><br/>\n <div class=\"category_description\">'.$details[0]['description'].'</div>';\n\t\t}", "public function getCategory($name);", "public function getCategorie()\n {\n return $this->categorie;\n }", "public function get_category()\n {\n return 'New Features';\n }", "public function get_category()\n {\n return 'New Features';\n }", "public function appCategory()\n {\n return File::get_app_category($this->getExtension());\n }", "public static function getActiveCategories(){}", "public function HM_CategoCuentas()\n {\n }", "public function getCategory(): ?string;", "function wc_marketplace_category() {\n global $wmp;\n $wmp->output_report_category();\n }" ]
[ "0.6870378", "0.6870378", "0.6870378", "0.6811938", "0.6756315", "0.66453063", "0.6571418", "0.650833", "0.64865017", "0.64717835", "0.64717835", "0.644416", "0.6429914", "0.64065254", "0.6350811", "0.6332416", "0.63123274", "0.62535274", "0.62401485", "0.61982644", "0.6195076", "0.61723316", "0.6163682", "0.6155348", "0.61550945", "0.6149822", "0.6149822", "0.61452025", "0.6136301", "0.6105971", "0.6086017", "0.6074282", "0.60715914", "0.60486484", "0.60486484", "0.60486484", "0.60486484", "0.60486484", "0.60486484", "0.60486484", "0.60486484", "0.60486484", "0.60486484", "0.60486484", "0.60486484", "0.60486484", "0.60486484", "0.60486484", "0.60486484", "0.60247475", "0.6014094", "0.6010366", "0.5996369", "0.5957658", "0.5939895", "0.5928347", "0.5908534", "0.590607", "0.588513", "0.588513", "0.58763176", "0.58659744", "0.5859681", "0.5850869", "0.5850869", "0.58496326", "0.58491397", "0.5823694", "0.58164376", "0.58157694", "0.581331", "0.5794992", "0.57861423", "0.5785379", "0.5784477", "0.5784477", "0.5781134", "0.57780707", "0.57667", "0.57646954", "0.57545966", "0.57497776", "0.5747876", "0.57388645", "0.57359785", "0.5732555", "0.57320213", "0.5714337", "0.57105094", "0.5709791", "0.5700772", "0.56955546", "0.569503", "0.5692635", "0.5692635", "0.5684083", "0.5676591", "0.56684166", "0.56581366", "0.5656817" ]
0.7274885
0
get achievement sub category
function achieve_get_sub_category() { global $sql; $sub_cat = array(); $result = $sql["dbc"]->query("SELECT ID, ParentID, Name FROM achievement_category WHERE ParentID<>-1 ORDER BY `GroupID` ASC"); $temp = $sql["dbc"]->fetch_assoc($result); while ($sub_cat[$temp["ParentID"]][$temp["ID"]] = $temp["Name"]) { $temp = $sql["dbc"]->fetch_assoc($result); } return $sub_cat; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function achieve_get_main_category()\r\n{\r\n global $sql;\r\n\r\n $main_cat = array();\r\n $result = $sql[\"dbc\"]->query(\"SELECT ID, Name FROM achievement_category WHERE ParentID=-1 and ID<>1 ORDER BY `GroupID` ASC\");\r\n while ($main_cat[] = $sql[\"dbc\"]->fetch_assoc($result));\r\n return $main_cat;\r\n}", "function getProjectSubCategory($userData)\n\t\t{\n\t\t\t//get sub category from database\n\t\t\techo '<li class=\"pro_cat\"><a>'.$userData['category'].'</a></li>\n\t\t\t\t\t<ul class=\"profile_overview profile_1st_child_nav\">\n\t\t\t\t\t\t<li><i class=\"glyphicon glyphicon-chevron-right profile_ovr_icon\"></i><a>Sub Category 1</a></li>\n\t\t\t\t\t\t<li><i class=\"glyphicon glyphicon-chevron-right profile_ovr_icon\"></i><a>Sub Category 2</a></li>\n\t\t\t\t\t\t<li><i class=\"glyphicon glyphicon-chevron-right profile_ovr_icon\"></i><a>Sub Category 3</a></li>\n\t\t\t\t\t\t<li><i class=\"glyphicon glyphicon-chevron-right profile_ovr_icon\"></i><a>Sub Category 4</a></li>\n\t\t\t\t\t\t<li><i class=\"glyphicon glyphicon-chevron-right profile_ovr_icon\"></i><a>Sub Category 5</a></li>\n\t\t\t\t\t</ul>';\n\t\t}", "public function getAchievementCategories() { return $this->AchievementCategories; }", "public function getSub_category(){\n return $this->sub_category;\n }", "public function getCategory() {}", "public function getCategory();", "public function getCategory();", "public function getMenu(){\n $bigCategory = $this->getBigCategory();\n $medCategory = $this->getMediumCategory();\n foreach($bigCategory as $bigKey => $value){\n foreach($medCategory as $medKey => $val){\n if($val['parentId'] == $value['id']){\n $bigCategory[$bigKey]['subCategory'][] = $val;\n }\n }\n }\n return $bigCategory;\n }", "public function get_sub_category_list()\n\t{\n\t\t$result = $this->db->from(\"category\")->where(array(\"category_status\" => 1,\"type\"=>2))->orderby(\"category_name\",\"ASC\")->get();\n\t\treturn $result;\n\t}", "public function get_sub_category($category = \"\")\n\t{ \n\t\t$result = $this->db->from(\"category\")\n\t\t ->where(array(\"main_category_id\" => $category, \"category_status\" => 1,\"type\" => 2))\n\t ->orderby(\"category_name\")->get();\n\t\treturn $result;\n\t}", "function get_cat_sub($cat_id,$level=0) {\nglobal $table_catcontent, $db;\n$list_info_cat=($level==0)?\"(-1\":\"\";\n$list_info_cat = $list_info_cat.\",\".$cat_id;\n$subcat_num = Check_sub_info($table_catcontent,$db,\" WHERE parent_id = '\".$cat_id.\"'\");\nif ($subcat_num>0) {\n\t$sql_query = \"SELECT * FROM `\" . $table_catcontent . \"` WHERE parent_id='\".$cat_id.\"' ORDER BY priority_order ASC\";\n\t$sql_query = mysql_query($sql_query);\n\twhile($sql_query_rows = mysql_fetch_array($sql_query)) {\n\t\t$list_info_cat = $list_info_cat.get_cat_sub($sql_query_rows['id'],1);\n\t\t}\n\t}\nreturn ($level==0)?$list_info_cat.\")\":$list_info_cat;\n}", "function get_subcategoria($id){\t\n\t\t$sql=\"SELECT nombre_sub FROM subcategoria WHERE id_sub='$id'\";\n\t\t$consulta=mysql_query($sql) or die(mysql_error());\n\t\t$resultado=mysql_fetch_array($consulta);\n\n\t\treturn $resultado['nombre_sub'];\n\t}", "public function topSubcategories_get()\n {\n $em = $this->doctrine->em;\n $subcategoriesRepo = $em->getRepository('Entities\\Subcategory');\n\n $subcategories = $subcategoriesRepo->findBy(array(), array('visits' => 'DESC'), 10);\n\n if ($subcategories) {\n $response[\"desc\"] = \"Subcategorias mas visitadas \";\n $response[\"count\"] = count($subcategories);\n $response[\"data\"] = $subcategories;\n } else {\n $response[\"desc\"] = 'No existen subcategorias mas visitadas';\n $response[\"count\"] = 0;\n $response[\"data\"] = array();\n }\n $this->set_response($response, REST_Controller::HTTP_OK);\n }", "public function get_category()\n {\n return 'Fun and Games';\n }", "public function get_category()\n {\n return 'Fun and Games';\n }", "public function get_category()\n {\n return 'Fun and Games';\n }", "function showSubCategory()\n\t {\n\t\t\n\t\t $prolist=new Actions();\n\t\t $res=$prolist->fetchAll(\"category\");\n\t\t\t\t\t\t\n\t\t $parentdata=mysql_query(\"select * from category where cat_par_id='0'\");\n\t\t while($parent_sub_cat=mysql_fetch_array($parentdata))\n\t\t {\n\t\t\techo '<option value=\"'.$parent_sub_cat['cat_id'].'\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'.ucfirst($parent_sub_cat['cat_title']).'</option>';\n\t\t \t\t\t\n\t\t\t if(mysql_num_rows(mysql_query(\"select * from category where cat_par_id='\".$parent_sub_cat['cat_id'].\"'\"))>0)\n\t\t\t {\n\t\t\t\tActions::$r++;\n\t\t\t\tActions::viewCategory($parent_sub_cat['cat_id']);\n\t\t\t } \n\t\t\t \n\t\t }\t\t\t\t\t\t\n\t\t \n\t }", "function get_sub_cat($cat_main, $catrow )\n{\n\tglobal $db;\n\n\tif ($cat_main > 0)\n\t{\n\t\t$sql= \"SELECT * FROM \".CATEGORIES_TABLE.\" WHERE cat_id <> $cat_main AND cat_main=$cat_main\";\n\t\tif( !($result = $db->sql_query($sql)) ) message_die(GENERAL_ERROR, 'Could not query categorie sons '.$sql, '', __LINE__, __FILE__, $sql);\n\t\twhile ( $catw = $db->sql_fetchrow($result) )\n\t\t{\n\t\t\t$i = count($catrow);\n\t\t\t$catrow[$i] = $catw;\n\t\t\tif ($catw['cat_id'] > 0)\n\t\t\t\t$catrow = get_sub_cat($catw['cat_id'],$catrow);\n\t\t}\n\t}\n\treturn $catrow;\n}", "public function fetch_subcategory() {\n $this->db->where('parent_id!=', '0');\n $r = $this->db->get('category');\n return $r->result_array();\n }", "public function getSubcategoryId() {\r\n return $this->subcategoryId;\r\n }", "function getCategory() \n {\n return $this->instance->getCategory();\n }", "public function getCategory(): string;", "public function getCategory()\n {\n }", "public function getSubMenu(){\n\t\t$catalogue = $this->getMenu()->content;\n\t\tforeach($catalogue as $first){\n\t\t\t$noms_sub_menu = $this->GetHTTP(\n\t\t\t\t'https://api.zalando.com/categories', array(\n\t\t\t\t\t'key' => implode(\",\", $first->childKeys),\n\t\t\t\t\t'pageSize' => '20000')\n\t\t\t)->content;\n\t\t\tfor ($i = 0; $i < count($first->childKeys); $i++){\n\t\t\t\t$first->childKeys[$noms_sub_menu[$i]->key] = $first->childKeys[$i];\n\t\t\t\t$first->childKeys[$noms_sub_menu[$i]->key] = $noms_sub_menu[$i]->name;\n\t\t\t\tunset($first->childKeys[$i]);\n\t\t\t}\n\t\t}\n\t\treturn $catalogue;\n\t}", "public function subcategory()\n\t{\n\t\t$this->db->select('*');\n\t\t$this->db->from($this->pro->prifix.$this->pro->category);\n\t\t$this->db->order_by($this->pro->category.'_id','desc');\n\t\t$this->db->order_by($this->pro->category.'_parent','desc');\n\t\t$this->db->where($this->pro->category.'_status','1');\n\t\t$this->db->where($this->pro->category.'_parent>',0);\n\t\t$rs = $this->db->get();\n\t\t//echo $this->db->last_query();\n\t\treturn $rs->result_array();\n\t\t\n\t}", "public function get_sub_category(){\r\n $this->datatables->select('s.cat_id,s.sub_cat_id,c.cat_name,s.sub_cat_name');\r\n $this->datatables->join( 'o-cakes_category c', 's.cat_id = c.cat_id', 'left' );\r\n $this->datatables->from('o-cakes_sub_cat s');\r\n $this->datatables->where('s.sub_cat_status',1);\r\n $result = $this->datatables->generate();\r\n echo $result;\r\n }", "function get_sub_category_info( $sub_cate_id, $sub_cate_status = 0 )\n\t{\n\t\t$criteria = $sub_cate_status == 1 ? \"sub_cate_status = 1 AND \" : \"\";\n\t\t$q = \"SELECT * FROM title_dev_sub_categories WHERE \".$criteria.\" sub_cate_id = \".$sub_cate_id;\n\t\t$r = $this -> db -> getSingleRecord( $q );\n\t\tif( $r )\n\t\t\treturn $r;\n\t\telse\n\t\t\treturn false;\n\t}", "function getMainCategory()\n {\n $sql = \"select * from tbl_issue_category where parent_id=0\";\n $query = $this->db->query($sql);\n return $query->result_array();\n }", "public function getSubCategory()\n {\n if (array_key_exists(\"subCategory\", $this->_propDict)) {\n if (is_a($this->_propDict[\"subCategory\"], \"\\Beta\\Microsoft\\Graph\\SecurityNamespace\\Model\\SubCategory\") || is_null($this->_propDict[\"subCategory\"])) {\n return $this->_propDict[\"subCategory\"];\n } else {\n $this->_propDict[\"subCategory\"] = new SubCategory($this->_propDict[\"subCategory\"]);\n return $this->_propDict[\"subCategory\"];\n }\n }\n return null;\n }", "function getSubCategory($category)\n\t\t{\n\t\t\t//get values of sub category of this category\n\t\t\t$subcatList = $this->manageContent->getValue_where('subcategory', '*', 'categoryId', $category);\n\t\t\tif(!empty($subcatList[0]))\n\t\t\t{\n\t\t\t\tforeach($subcatList as $subcat)\n\t\t\t\t{\n\t\t\t\t\techo '<option value=\"'.$subcat['subCategoryId'].'\">'.$subcat['name'].'</option>';\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\techo '<option>No Subcategory</option>';\n\t\t\t}\n\t\t}", "function category(){\n\t\trequire('quizrooDB.php');\n\t\t$query = sprintf(\"SELECT cat_name FROM q_quiz_cat WHERE cat_id = %d\", GetSQLValueString($this->fk_quiz_cat, \"int\"));\n\t\t$getQuery = mysql_query($query, $quizroo) or die(mysql_error());\n\t\t$row_getQuery = mysql_fetch_assoc($getQuery);\n\t\treturn $row_getQuery['cat_name'];\n\t}", "function get_sub_categories($category_ID)\n {\n $get_sub_category_query=site_query(\"select * from Category where parentID=\".$category_ID.\" order by displayOrder\",\"get_sub_categories()\",$dev);\n return $get_sub_category_query;\n }", "public function getSubCategoryByCategoryId($id){\n //$this->db->select('id,sub_category');\n $query = $this->db->get_where('sub_category',array('category_id' => $id));\n return $query->result(); \n }", "function getCategory() {\n // Load categories.\n $categories = userpoints_get_categories();\n return isset($categories[$this->getTid()]) ? $categories[$this->getTid()] : $categories[userpoints_get_default_tid()];\n }", "public function fetch_sub_category(Request $request) {\n $sub_category = Sub_categories::where('category_id', $request->category_id)->get();\n if ($sub_category != null) {\n return $sub_category;\n }\n }", "function get_mega_menu_subcategories($atts) {\r\n extract(shortcode_atts(\r\n array(\r\n 'limit' => 5,\r\n 'sort' => '',\r\n 'category_id' => '',\r\n 'category_ids' => '',\r\n 'custom_title' => '',\r\n 'custom_url' => '',\r\n 'show_child_cat' => '5', //the child category number - if none is specify, extract just 5 @since 11.june.2015\r\n 'sub_cat_ajax' => '' //empty we use ajax\r\n ), $atts));\r\n $buffy = '';\r\n\r\n if (!empty($show_child_cat) and !empty($category_id)) {\r\n $td_subcategories = get_categories(array(\r\n 'child_of' => $category_id,\r\n 'number' => $show_child_cat\r\n ));\r\n\r\n\t if (!empty($td_subcategories)) {\r\n\r\n $buffy .= '<div class=\"block-mega-child-cats\">';\r\n\r\n //show all categories only on ajax\r\n if (empty($sub_cat_ajax)) {\r\n $buffy .= '<a class=\"cur-sub-cat mega-menu-sub-cat-' . $this->block_uid . '\" id=\"' . td_global::td_generate_unique_id() . '\" data-td_block_id=\"' . $this->block_uid . '\" data-td_filter_value=\"\" href=\"' . get_category_link($category_id) . '\">' . __td('All', TD_THEME_NAME) . '</a>';\r\n }\r\n\r\n foreach ($td_subcategories as $td_category) {\r\n $this->td_block_template_data['td_pull_down_items'][] = array(\r\n 'name' => $td_category->name,\r\n 'id' => $td_category->cat_ID\r\n );\r\n $buffy .= '<a class=\"mega-menu-sub-cat-' . $this->block_uid . '\" id=\"' . td_global::td_generate_unique_id() . '\" data-td_block_id=\"' . $this->block_uid . '\" data-td_filter_value=\"' . $td_category->cat_ID . '\" href=\"' . get_category_link($td_category->cat_ID) . '\">' . $td_category->name . '</a>';\r\n }\r\n\r\n\r\n $buffy .= '</div>';\r\n } else {\r\n //there are no subcategories, return false - this is used by the mega menu block to alter it's structure\r\n return false;\r\n }\r\n }\r\n return $buffy;\r\n }", "public function allSubCategory() {\n return $this->db->get_where('r_category',array('subCategory !='=>0))->result_array();\n }", "public function category() {\n\t\treturn $this->get_category();\n\t}", "public function mainmenu_staffcat($id)\n\t{\n\t\t//$value=$this->db->query(\"SELECT preferences from user_register where uid='$id'\")->row_array();\n\t\t//$val=$value['preferences'];\n\t\t//return $value;\n\t\t\n\t\t$a=$this->db->query(\"SELECT a.CategoryId,a.CategoryName FROM categories as a INNER JOIN subcategory as b on a.CategoryId=b.ParentCategory GROUP BY a.CategoryId \")->result_array();\n return $a;\t\t\n\t\t\n\t\t\n\t}", "function the_category() {\n\tglobal $discussion;\n\treturn $discussion['category'];\n}", "public function getCategory()\n {\n\t\treturn self::$categories[ $this->category ];\n }", "public function mainmenu_cat1($userId)\n\t{\n\t\t$value=$this->db->query(\"SELECT preferences from user_register where uid='$userId'\")->row_array();\n\t\t$val=$value['preferences'];\n\t\t//return $value;\n\t\t\n\t\t$a=$this->db->query(\"SELECT a.CategoryId,a.CategoryName FROM categories as a INNER JOIN subcategory as b on a.CategoryId=b.ParentCategory where b.subcategory_name_id IN($val) GROUP BY a.CategoryId \")->result_array();\n return $a;\t\t\n\t\t\n\t\t\n\t}", "function tep_get_subCategory($tagValue){\n\tglobal $languages_id,$customer_group_id;\n\t//禁用的电池分类ID @nathan 2011-11-2\n\t//$disable_batteries = array(1,3,21,23,25,73,111,307,314,499);\n\t$disable_batteries = array(23,25,73,111,307,499);\n\t$disable_batteries_three = array(188,191,192,193,194,195,502,556,112,115,117,126,129,136,139,141,172,175,601,181,306,312,313,500,501,562,197,198,202,204,205,206,208,210,211,212,213,217,218,220,503,504,505,521,557,558,559,560,561,563,507,508,509,510,511,512,513,525,526,527,528,529,530,531,532,533,534,535,536,537,538,539,540,541,542,543,544,545,546,547,548,549,550,551,552,553,554,555,741);\n\t$jsonData = array();\n\tif (isset($tagValue) && !empty($tagValue)){\n\t\t# \n\t\t# URL\n\t\t# Ʒ\n\t\t# |_| |=|\n\t\t$topNavi_categories_sql = sprintf(\"SELECT DISTINCT C.categories_id,C.parent_id, CD.categories_name FROM %s AS CD INNER JOIN %s AS C ON CD.categories_id=C.categories_id WHERE CD.language_id=%u AND C.products_group_access like '%s' AND C.parent_id=%u ORDER BY C.sort_order ASC\",TABLE_CATEGORIES_DESCRIPTION,TABLE_CATEGORIES,(int)$languages_id,\"%\".$customer_group_id.\"%\",(int)$tagValue);\n\t\t$topNavi_categories_query = tep_db_query($topNavi_categories_sql);\n\t\tif (tep_db_num_rows($topNavi_categories_query) > 0){\n\t\t\t$i = 0;\n\t\t\twhile ($topNavi_categories = tep_db_fetch_array($topNavi_categories_query)) {\n\t\t\t\t//禁止显示的电池分类 @nathan 2011-11-2\n\t\t\t\tif($tagValue == 408 && in_array($topNavi_categories['categories_id'], $disable_batteries)) continue;\n\n\t\t\t\t$products_in_category = tep_count_products_in_category($topNavi_categories['categories_id']);\n\t\t\t\tif ($products_in_category > 0){\n\t\t\t\t\t$jsonData[$i]['name'] = $topNavi_categories['categories_name'];\n\t\t\t\t\t$jsonData[$i]['url'] = tep_href_link(FILENAME_DEFAULT,tep_get_abscPath($topNavi_categories['categories_id']),'NONSSL',false);\n\t\t\t\t\t$jsonData[$i]['parent'] = '0';\n\t\t\t\t\t$jsonData[$i]['num'] = tep_count_products_in_category($topNavi_categories['categories_id']);\n\t\t\t\t\t$i++;\n\t\t\t\t\t$sub_categories_sql = sprintf(\"SELECT DISTINCT C.categories_id,C.parent_id, CD.categories_name FROM %s AS CD INNER JOIN %s AS C ON CD.categories_id=C.categories_id WHERE CD.language_id=%u AND C.products_group_access like '%s' AND C.parent_id=%u ORDER BY C.sort_order ASC\",TABLE_CATEGORIES_DESCRIPTION,TABLE_CATEGORIES,(int)$languages_id,\"%\".$customer_group_id.\"%\",(int)$topNavi_categories['categories_id']);\n\t\t\t\t\t$sub_categories_query = tep_db_query($sub_categories_sql);\n\t\t\t\t\tif (tep_db_num_rows($sub_categories_query) > 0){\n\t\t\t\t\t\twhile ($sub_categories = tep_db_fetch_array($sub_categories_query)) {\n\t\t\t\t\t\t\tif(in_array($sub_categories['categories_id'], $disable_batteries_three)) continue;\n\t\t\t\t\t\t\t$products_in_subcategory = tep_count_products_in_category($sub_categories['categories_id']);\n\t\t\t\t\t\t\tif ($products_in_subcategory > 0){\n\t\t\t\t\t\t\t\t$jsonData[$i]['name'] = $sub_categories['categories_name'];\n\t\t\t\t\t\t\t\t$jsonData[$i]['url'] = tep_href_link(FILENAME_DEFAULT,tep_get_abscPath($sub_categories['categories_id']),'NONSSL',false);\n\t\t\t\t\t\t\t\t$jsonData[$i]['parent'] = $sub_categories['categories_id'];\n\t\t\t\t\t\t\t\t$jsonData[$i]['num'] = tep_count_products_in_category($sub_categories['categories_id']);\n\t\t\t\t\t\t\t\t$i++;\n\t\t\t\t\t\t\t}unset($products_in_subcategory);\n\t\t\t\t\t\t}unset($sub_categories);\n\t\t\t\t\t}unset($sub_categories_query,$sub_categories_sql);\n\t\t\t\t}unset($products_in_category);\n\t\t\t}unset($topNavi_categories);\n\t\t}unset($topNavi_categories_query,$topNavi_categories_sql);\n\t\t//echo json_encode($jsonData);\n\t\treturn $jsonData;\n\t}else{\n\t\treturn false;\n\t}\n}", "public function getCategoryList()\n {\n global $user;\n\n $returned=array();\n\n if($this->options['galleryRoot'])\n {\n $startLevel=1;\n }\n else\n {\n $startLevel=0;\n }\n\n $sql=\"SELECT DISTINCT pct.id, pct.name, pct.global_rank AS `rank`, pct.status\n FROM \".CATEGORIES_TABLE.\" pct \";\n\n switch($this->options['filter'])\n {\n case self::FILTER_PUBLIC :\n $sql.=\" WHERE pct.status = 'public' \";\n break;\n case self::FILTER_ACCESSIBLE :\n if(!is_admin())\n {\n $sql.=\" JOIN \".USER_CACHE_CATEGORIES_TABLE.\" pucc\n ON (pucc.cat_id = pct.id) AND pucc.user_id='\".$user['id'].\"' \";\n }\n else\n {\n $sql.=\" JOIN (\n SELECT DISTINCT pgat.cat_id AS catId FROM \".GROUP_ACCESS_TABLE.\" pgat\n UNION DISTINCT\n SELECT DISTINCT puat.cat_id AS catId FROM \".USER_ACCESS_TABLE.\" puat\n UNION DISTINCT\n SELECT DISTINCT pct2.id AS catId FROM \".CATEGORIES_TABLE.\" pct2 WHERE pct2.status='public'\n ) pat\n ON pat.catId = pct.id \";\n }\n\n break;\n }\n $sql.=\"ORDER BY global_rank;\";\n\n $result=pwg_query($sql);\n if($result)\n {\n while($row=pwg_db_fetch_assoc($result))\n {\n $row['level']=$startLevel+substr_count($row['rank'], '.');\n\n /* rank is in formated without leading zero, giving bad order\n * 1\n * 1.10\n * 1.11\n * 1.2\n * 1.3\n * ....\n *\n * this loop cp,vert all sub rank in four 0 format, allowing to order\n * categories easily\n * 0001\n * 0001.0010\n * 0001.0011\n * 0001.0002\n * 0001.0003\n */\n $row['rank']=explode('.', $row['rank']);\n foreach($row['rank'] as $key=>$rank)\n {\n $row['rank'][$key]=str_pad($rank, 4, '0', STR_PAD_LEFT);\n }\n $row['rank']=implode('.', $row['rank']);\n\n $row['name']=GPCCore::getUserLanguageDesc($row['name']);\n\n $returned[]=$row;\n }\n }\n\n if($this->options['galleryRoot'])\n {\n $returned[]=array(\n 'id' => 0,\n 'name' => l10n('All the gallery'),\n 'rank' => '0000',\n 'level' => 0,\n 'status' => 'public',\n 'childs' => null\n );\n }\n\n usort($returned, array(&$this, 'compareCat'));\n\n if($this->options['tree'])\n {\n $index=0;\n $returned=$this->buildSubLevel($returned, $index);\n }\n else\n {\n //check if cats have childs & remove rank (enlight the response)\n $prevLevel=-1;\n for($i=count($returned)-1;$i>=0;$i--)\n {\n unset($returned[$i]['rank']);\n if($returned[$i]['status']=='private')\n {\n $returned[$i]['status']='0';\n }\n else\n {\n $returned[$i]['status']='1';\n }\n\n if($returned[$i]['level']>=$prevLevel)\n {\n $returned[$i]['childs']=false;\n }\n else\n {\n $returned[$i]['childs']=true;\n }\n $prevLevel=$returned[$i]['level'];\n }\n }\n\n return($returned);\n }", "public function getCategory(){\n return $this->category;\n }", "function dataSubCategory( $parentcategory, $gcntyn=false ){\n\n\tglobal $db, $sess;\n\n\t$arrfileurl = explode('/',$_SERVER['SCRIPT_FILENAME']);\n\tif(in_array(\"m\", $arrfileurl) || in_array(\"m2\", $arrfileurl)){\n\t\t$hidden = \"hidden_mobile=0\";\n\t} else {\n\t\t$hidden = \"hidden=0\";\n\t}\n\t# 카테고리 정보\n\tfor ($i=0;$i<2;$i++){\n\t\t$length = strlen($parentcategory) + 3;\n\t\t$query = \"\n\t\tselect\n\t\t\tcategory,catnm,sort,level,level_auth\n\t\tfrom\n\t\t\t\".GD_CATEGORY.\"\n\t\twhere\n\t\t\tcategory like '$parentcategory%'\n\t\t\tand length(category)=$length\n\t\t\";\n\t\tif ($GLOBALS[ici_admin] === false) $query .= \"and \".$hidden;\n\t\t$res = $db->query($query);\n\n\t\tif ($db->count_($res)) break;\n\t\telse if ($length>6) $parentcategory = substr($parentcategory,0,-3);\n\t}\n\n\t// 상품 개수 추출 및 상품분류 연결방식 전환 여부에 따른 처리\n\tif ( $gcntyn == true && _CATEGORY_NEW_METHOD_ === false ){\n\t\tif ($GLOBALS[ici_admin] === false) $where[] = \"a.\".$hidden;\n\t\t$where[] = \"a.category like '$parentcategory%'\";\n\t\t$where[] = \"open\";\n\t\tif ($GLOBALS['tpl']->var_['']['connInterpark']) $where[] = \"b.inpk_prdno!=''\";\n\n\t\t$query = \"\n\t\tselect\n\t\t\tleft(category,$length),count(distinct a.goodsno)\n\t\tfrom\n\t\t\t\".GD_GOODS_LINK.\" a,\n\t\t\t\".GD_GOODS.\" b\n\t\twhere\n\t\t\ta.goodsno = b.goodsno\n\t\t\tand \".implode(\" and \", $where).\"\n\t\tgroup by left(category,$length)\n\t\t\";\n\t\t$res2 = $db->query($query);\n\t\twhile ($data2=$db->fetch($res2)) $gcnt[$data2[0]] = $data2[1];\n\t}\n\n\t### 데이타 조작\n\t$i = 0;\n\twhile ($data=$db->fetch($res)){\n\t\t// 상품 개수 추출 및 상품분류 연결방식 전환 여부에 따른 처리\n\t\tif ($gcntyn == true && _CATEGORY_NEW_METHOD_ === true) {\n\t\t\t$where\t= array();\n\t\t\tif ($GLOBALS[ici_admin] === false) $where[] = \"gl.hidden=0\";\n\t\t\t$where[] = \"gl.category = '\".$data['category'].\"'\";\n\t\t\t$where[] = \"g.open = '1'\";\n\t\t\tif ($GLOBALS['tpl']->var_['']['connInterpark']) $where[] = \"g.inpk_prdno!=''\";\n\n\t\t\t$query = \"\n\t\t\tSELECT\n\t\t\t\tCOUNT(g.goodsno) as cnt\n\t\t\tFROM\n\t\t\t\t\".GD_GOODS.\" g\n\t\t\tINNER JOIN\n\t\t\t\t\".GD_GOODS_LINK.\" gl ON g.goodsno = gl.goodsno\n\t\t\tWHERE\n\t\t\t\t\".implode(\" AND \", $where).\"\n\t\t\t\";\n\n\t\t\t$res2 = $db->query($query);\n\t\t\twhile ($data2=$db->fetch($res2, 1)) $gcnt[$data['category']] = $data2['cnt'];\n\t\t}\n\n\t\t$member_auth = false;\n\t\tif($data['level']){//권한 설정되어 있는지 체크\n\t\t\tswitch($data['level_auth']){//권한체크\n\t\t\t\tcase '1': //모두숨김\n\t\t\t\t\tif( (!$sess['level'] ? 0 : $sess['level']) >= $data['level'] ) $member_auth = true;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault: $member_auth = true; break;\n\t\t\t}\n\t\t}\n\t\telse $member_auth = true;\n\n\t\tif($member_auth){\n\t\t\t$data['gcnt'] = $gcnt[ $data['category'] ];\n\t\t\t$cate[$data[sort]][] = $data;\n\t\t}\n\t}\n\n\t### 배열 순서 재정의\n\tif ($cate) $cate = resort($cate);\n\n\treturn $cate;\n}", "function getCategories($object) { \n\n $R1 = new Category(); // R1 --\n $R11 = new Category(); // | | - R11 --\n $R111 = new Category(); // | | - R111\n $R112 = new Category(); // | | - R112\n $R11->addSubcategory($R111); // |\n $R11->addSubcategory($R112); // |\n $R1->addSubcategory($R11); // |\n $R2 = new Category(); // R2 --\n $R21 = new Category(); // | - R21 --\n $R211 = new Category(); // | | - R211\n $R22 = new Category(); // |\n $R221 = new Category(); // | - R22 --\n $R21->addSubcategory($R211); // | - R221\n $R22->addSubcategory($R221);\n $R2->addSubcategory($R21);\n $R2->addSubcategory($R22);\n\n $object->addCollectionEntry($R1); \n $object->addCollectionEntry($R2); \n}", "public function getCategories();", "public function getCategories();", "public function getCategorysByQuestion($id){\n $question = $this::find()->with('subcategory')->where(['id' => $id])->one();\n $category = '';\n $last_key = end(array_keys($question->subcategory));\n foreach ($question->subcategory as $key => $value) {\n if ($key == $last_key) {\n $category .= $value['name'];\n } else {\n $category .= $value['name'].\", \";\n }\n }\n return $category;\n }", "public static function getActiveCategories(){}", "function getMenuSubTitle();", "public function get_category(){\n\t\treturn $this->category;\n\t}", "function catagoryStatistics($catId, $clientKey){\n\t\n\t$ch = curl_init();\ncurl_setopt($ch, CURLOPT_URL, \"https://www.googleapis.com/youtube/v3/videoCategories?part=snippet&id=\".$catId.\"&key=\".$clientKey.\"\");\ncurl_setopt($ch, CURLOPT_HEADER, 0);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_TIMEOUT, 100);\ncurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n$output = curl_exec($ch);\necho curl_error($ch);\ncurl_close($ch);\n \n$searchResponse = json_decode($output,true);\n\t\n\tforeach ($searchResponse['items'] as $searchResult) {\n\t//$videoId = $searchResult['id'];\n\t$catChannelId=$searchResult['snippet']['channelId'];\n\t$title=$searchResult['snippet']['title'];\n\treturn array ('catTitle'=>$title, 'catChannelId'=>$catChannelId);\n\t\n\t}\n\n}", "function db_getItemsFromSubcategory($undergruppe) {\n\t\t$q = \"SELECT `g1`, `artnr`, `artikkel`, `beskrivelse`, `prefert`\n\t\t\t FROM `ingredients`\n\t\t\t WHERE `ug1` = '$undergruppe'\n\t\t\t ORDER BY `artikkel` ASC\";\n\t\treturn db_MAIN( $q );\n\t}", "public function getSubcategory() {\n return $this->hasMany(Subcategory::className(), ['id' => 'subcategory_id'])\n ->viaTable('question_category', ['question_id' => 'id']);\n }", "public function getCategory()\n {\n return $this->category;\n }", "public function getCategory()\n {\n return $this->category;\n }", "function get_Category()\n {\n try {\n return $this->mCategory;\n }catch(Exception $e){\n $this->error->throwException('303', 'No s`ha pogut retornar la informació', $e);\n }\n }", "public function getCategory($name);", "function getCategory()\r\n\t\t{\r\n\t\t\treturn $this->category;\r\n\t\t\t\r\n\t\t}", "function printCategory($parent_id, $role)\n{\n $cats = new Category();\n $cate = $cats->getByParentId($parent_id);\n if ($parent_id == 0) {\n\n if ($role == 'admin') {\n }\n if ($role == 'client') {\n foreach ($cate as $r) {\n echo '<li><a href=\"posts-list-category.php?id=' . $r['id'] . '\">' . $r['name'] . '</a>';\n printCategory($r['id'], $role);\n echo '</li>';\n }\n }\n } else {\n //nếu là danh mục con\n if ($role == 'admin') {\n }\n if ($role == 'client') {\n echo '<ul class=\"sub-menu\">';\n foreach ($cate as $r) {\n echo '<li><a href=\"posts-list-category.php?id=' . $r['id'] . '\">' . $r['name'] . '</a></li>';\n }\n echo '</ul>';\n }\n }\n}", "public static function getCategories() {\n $top_level_cats = array();\n//Select all top level categories\n Db_Actions::DbSelect(\"SELECT * FROM cscart_categories LEFT OUTER JOIN cscart_category_descriptions ON cscart_categories.category_id = cscart_category_descriptions.category_id WHERE cscart_categories.parent_id=0\");\n $result = Db_Actions::DbGetResults();\n if (!isset($result->empty_result)) {\n foreach ($result as $cat) {\n $top_level_cats[] = array('id' => $cat->category_id,\n 'cat_name' => $cat->category,\n 'company_id' => $cat->company_id,\n 'status' => $cat->status,\n 'product_count' => $cat->product_count,\n 'is_op' => $cat->is_op,\n 'usergroup_ids' => $cat->usergroup_ids);\n }\n }\n if (!isset($result->empty_result)) {\n return $result;\n }\n else {\n return new stdClass();\n }\n }", "public function categoryBreadcrumbs($sub_cat_id,$catt=0)\n\t{\t\t\n\t\tif($catt==0)\n\t\t{\n\t\t$pa=$sub_cat_id;\n\t\t$count=0;\n\t\twhile($pa!=0)\n\t\t{\n\t\t\t$query44=\"select * from `categories` where category_id=$pa\";\n\t\t\t$res44=$this->query($query44);\n\t\t\t$row44=mysql_fetch_assoc($res44);\n\t\t\t$pa=$row44['parent_id'];\n\t\t\tif($sub_cat_id == $row44['category_id'])\n\t\t\t{\n\t\t\t\t$name_arr[$count]=$row44['category_name'];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$name_arr[$count]=\"<a href='category.php?catId=\".base64_encode($row44['category_id']).\"' class='link'>\".$row44['category_name'].\"</a>\";\n\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t$count+=1;\n\t\t}\n\t\t}\t\t\n\t\treturn (@array_reverse($name_arr));\n\t\t\t\n\t\t}", "public function showSubcategories(){\n return ArticleModel::showSubcategories();\n }", "public function HM_CategoCuentas()\n {\n }", "public function get_category($key = 0)\n {\n }", "public function get_category($key = 0)\n {\n }", "public function get_category($key = 0)\n {\n }", "public function get_all_info_cat_sub() {\n\t\t\n\t\t$query = $this->db->prepare(\"SELECT categories.cat_id,subcategories.subc_id,subcategories.subc_name, categories.cat_name, company_info.info_logo, company_info.info_address, users.user_id,users.user_confirmed,users.admin_confirmed, users.user_name, users.user_email, users.user_comp_name, users.user_number, users.client_cat_id, client_cat.client_cat_id, users.user_time, client_cat.client_cat_name FROM client_cat LEFT JOIN users ON users.client_cat_id = client_cat.client_cat_id right join company_info on company_info.user_id=users.user_id right join categories on categories.cat_id=company_info.cat_id LEFT JOIN subcategories ON subcategories.subc_id=company_info.subc_id \n\");\n\t\t\n\t\t\n\t\ttry{\n\t\t\t\n\t\t\t$query->execute();\n\t\t\t$result = $query->fetchAll();\n\t\t\treturn $result;\n\t\t}catch(PDOException $e){\n\n\t\t\tdie($e->getMessage());\n\t\t}\n\t}", "public static function getInactiveCategories(){}", "public function getId(){\n return $this->_sub_cat_id;\n }", "public function getCategory() {\n return $this->category;\n }", "public function category() {\n\t\treturn static::get_thrive_advanced_label();\n\t}", "public function getViewedCategory();", "public function list_subCategory($category_id){\n $sqlQuery=\"select *,sidhus_category.cat_name from sidhus_subcategory inner join sidhus_category on sidhus_category.category_id=sidhus_subcategory.category_id where sidhus_subcategory.category_id = \". $category_id;\n //$sqlQuery= \"select * from make_an_offer INNER JOIN sell_product ON sell_product.sell_id=make_an_offer.product_id where sell_product.customer_id = \". $customer_id;\n $result=$this->con->query($sqlQuery);\n $this->con->close();\n return $result;\n }", "function floorsubcategory_name($fcat)\n{\n\t$fcat_name=mysql_fetch_array(mysql_query(\"select sub_type_name from manage_floor_subcategory where stype='$fcat'\"));\n\treturn $fcat_name['sub_type_name'];\n}", "public function subcategories()\n {\n \treturn $this->hasMany('App\\Category', 'parent_id')->where('status', 1);\n }", "public function getAction() {\r\n\t\t$id = $this->getInput('id');\r\n\t\t$info = Game_Service_Category::getCategory(intval($id));\r\n\t\tif(!$info) $this->output(-1, '操作失败.');\r\n\t\t$this->output(0, '', $info);\r\n\t}", "public function getCategory()\n {\n return $this->readOneof(2);\n }", "function getCategory() {\n\t\treturn $this->node->firstChild->toString();\n\t}", "public function subCategorylist()\n {\n $data = [];\n $sub_categories = Category::where('parent', '!=' ,'0')->get();\n if(count($sub_categories)){\n $data = ['status' => true, 'code' => 200, 'data'=>$sub_categories];\n }else{\n $data = ['status' => false, 'code' => 404, 'message' => \"data not found\"];\n }\n return $data;\n }", "public function getSubCategoriesForCharts(Request $request){\n if($request->isCustom == 'true'){\n $userCategory = CustomCategory::find($request->categoryId);\n \n return response()->json($userCategory->customSubCategories); \n }else{\n $userSubCategories = Auth::user()->subExpenses;\n $userCategories=[];\n foreach($userSubCategories as $userSubCategory){\n if($request->categoryId == $userSubCategory->category->id){\n $userCategories[]=['name'=>$userSubCategory->name,'amount'=>$userSubCategory->pivot->amount];\n }\n }\n return response()->json($userCategories);\n }\n }", "public function getCategoryId();", "function showSubCategory($arr)\n\t{\n\t\t$output ='<div id=\"9\" class=\"anylinkcss\" style=\"width: 160px; background-color: #f7f7f5\">';\n\t\t$cnt=count($arr);\n\t\tfor($i=0;$i<$cnt;$i++)\n\t\t\t$output .='<a href=\"#\">'.$arr[$i]['SubCategory'].'</a>';\n\t\t$output.='</div>';\n\t\treturn $output;\n\t}", "public function getCategory()\n\t{\n\t\treturn $this->data['category'];\n\t}", "function getCategories($parent=0)\n {\n $sql=\"select * from itf_category where parent ='\".$parent.\"' and status='1' order by catname\";\n $res = $this->dbcon->FetchAllResults($sql);\n\n if(count($res) > 0){\n foreach($res as &$r)\n {\n $re = $this->getCategories($r['id']);\n $r[\"subcat\"] = $re;\n\n }\n }\n return $res;\n\n }", "public function subcategoria_abm() {\n $crud = new grocery_CRUD();\n\n $crud->where('subcategoria.id_estado = '.ESTADOS::ALTA);\n $crud->set_table('subcategoria');\n $crud->columns('descripcion', 'id_categoria_padre');\n $crud->display_as('descripcion','Descripción')\n ->display_as('id_estado','Estado')\n ->display_as('id_categoria_padre','Categoria padre');\n $crud->set_subject('subcategoria');\n $crud->required_fields('descripcion','id_estado','id_categoria_padre');\n $crud->set_relation('id_categoria_padre','categoria','descripcion', 'categoria.id_estado = '.ESTADOS::ALTA);\n $crud->fields('descripcion');\n\n $_COOKIE['tabla']='subcategoria';\n $_COOKIE['id']='id_subcategoria';\n\n $crud->callback_after_insert(array($this, FUNCTION_LOG::INSERT));\n $crud->callback_after_update(array($this, FUNCTION_LOG::UPDATE));\n $crud->callback_delete(array($this, FUNCTION_LOG::DELETE));\n\n $this->permisos_model->getPermisosCRUD('permiso_articulo', $crud);\n\n $output = $crud->render();\n\n $this->viewCrud($output);\n\t}", "public function get_sec_category($category = \"\")\n\t{ \n\t\t$result = $this->db->from(\"category\")\n\t\t ->where(array(\"sub_category_id\" => $category, \"category_status\" => 1,\"type\" => 3))\n\t ->orderby(\"category_name\")->get();\n\t\treturn $result;\n\t}", "public function getSubcategoriesOfCategory()\n {\n // recupere id de la sous categorie choisie\n $categoryId=$_GET['categoryID'];\n // var_dump($categoryId);\n // on recupere les données dans la table subcategories selon la categorie\n $resultGetSubcategoriesOfCategory=DB::table('sub_categories')\n ->join('categories', 'sub_categories.category_id', '=', 'categories.id')\n ->select('sub_categories.category_id', 'categories.name_category', 'sub_categories.id', 'sub_categories.name_subcategory')\n ->where('sub_categories.category_id', '=', $categoryId)\n ->get();\n\n return json_encode($resultGetSubcategoriesOfCategory);\n\n // select categories.category_id, categories.name_category, sub_categories.name_subcategory\n // from sub_categories\n // join categories\n // on sub_categories.category_id = categories.category_id\n // where sub_categories.category_id='1';\n\n }", "function convert_sub_category( &$obj )\n\t{\n\t\t\n\t\t// added_date timestamp string\n\t\t$obj->added_date_str = ago( $obj->added_date );\n\t\t\n\t\t// set default photo\n\t\t$obj->default_photo = $this->get_default_photo( $obj->id, 'sub_category' );\n\n\t\t// set default icon \n\t\t$obj->default_icon = $this->get_default_photo( $obj->id, 'subcat_icon' );\n\t}", "public function parseAchievementsByCategory($cID, $ID = null)\n {\n if (!$ID)\n {\n $ID = $this->getID();\n }\n\n if (!$ID)\n {\n echo \"error: No ID Set.\";\n }\n else if (!$cID)\n {\n echo \"No catagory id set.\";\n }\n else\n {\n // Get the source\n $this->getSource($this->URL['character']['profile'] . $ID . $this->URL['character']['achievement'] . $cID .'/');\n\n // Create a new character object\n $Achievements = new Achievements();\n\n // Get Achievements\n $Public = $Achievements->checkIfPublic($this->findAll('area_inner_tc', 20));\n\n if ($Public)\n {\n // Get Achievements\n $Achievements->addCategory($cID);\n $Achievements->set($this->findAll('achievement_area_body', NULL, 'bt_more', false));\n\n // Append character to array\n return $Achievements;\n }\n else\n {\n return false;\n }\n\n // Append character to array\n $this->Achievements[$cID] = $Achievements;\n\n return $Achievements;\n }\n }", "function get_categories()\n\t\t{\n\t\t\t$categories = $this->manage_content->getValue('vertical_navbar','menu_name');\n\t\t\treturn $categories;\n\t\t}", "public function category()\n\t{\n\t\t$this->db->select('*');\n\t\t$this->db->from($this->pro->prifix.$this->pro->category);\n\t\t$this->db->order_by($this->pro->category.'_id','desc');\n\t\t$this->db->where($this->pro->category.'_status','1');\n\t\t$this->db->where($this->pro->category.'_parent',0);\n\t\t$rs = $this->db->get();\n\t\t//echo $this->db->last_query();\n\t\treturn $rs->result_array();\n\t\t\n\t}", "function getSubcategoryDetails($categoryId)\n {\n $subCategoryList = $this->find('all', array(\n 'fields' => array(\n 'SubCategory.sub_category_name', \n 'SubCategory.id', \n 'SubCategory.sub_image_name'\n ), \n 'conditions' => array(\n 'SubCategory.category_id ' => $categoryId\n )\n ));\n return $subCategoryList;\n }", "function get_sub_category() {\r\n if(!isset($_POST['category_id'])){\r\n echo json_encode(array('status'=>false, 'message'=>\"category_id field is required!!\", 'data'=>blank_json()));\r\n die;\r\n }\r\n $category_id=$this->input->post('category_id');\r\n if(isset($_POST['last_count'])){\r\n $last_count = $_POST['last_count'];\r\n }else{\r\n $last_count = 0;\r\n }\r\n if($category_id==1 || $category_id==2 || $category_id==3 || $category_id==4){\r\n if($category_id==1){\r\n $table='fic_category';\r\n }\r\n if($category_id==2){\r\n $table='comm_category';\r\n }\r\n if($category_id==3){\r\n $table='competition_category';\r\n }\r\n if($category_id==4){\r\n $table='opendata_category';\r\n }\r\n $res = $this->CategoriesModel->get_subcategories($category_id,$table,$last_count);\r\n if (!empty($res)) {\r\n $i=0;\r\n foreach($res as $r){\r\n $res[$i]['root_id']=$category_id;\r\n $i++;\r\n }\r\n echo json_encode(array('status'=>true, 'message'=>\"Sub Categories list!\", 'data'=>$res));\r\n die;\r\n }\r\n echo json_encode(array('status'=>false, 'message'=>\"Sub Categories list not found!!\", 'data'=>array()));\r\n die;\r\n \r\n }else{\r\n echo json_encode(array('status'=>false, 'message'=>\"category_id is not valid!!\", 'data'=>blank_json()));\r\n }\r\n }", "function getSubCategoryName($subCatId)\n {\n $categoryResult = $this->findById($subCatId);\n return $categoryResult;\n }", "public function getCat()\n {\n return $this->cat = get_the_category($this->id);\n }", "function select_category($type,$level='',$id=''){\r\n // level = 1 : gom ca cac danh sach chu de con\r\n global $mysql,$lang,$moshtml,$table_prefix;\r\n if($level=='' || !$level){\r\n $code[] = array(0,$lang['lang.cat_cat']);\r\n }\r\n if($id){\r\n $s = \"and id<> \".$id.\"\";\r\n }else{\r\n $s = '';\r\n }\r\n $q = $mysql->query(\"select id, title from \".$table_prefix.\"category where cfor='\".$type.\"' \".$s.\" and subid=0 order by corder ASC\");\r\n while($r=$mysql->fetch_array($q)){\r\n $total_sub = $mysql->num_rows($mysql->query(\"select id from \".$table_prefix.\"category where cfor='\".$type.\"' and subid=\".$r['id'].\"\"));\r\n $code[] = array($r['id'],\"-&nbsp;\".$r['title']);\r\n if($level!='' && $total_sub){\r\n $q2 = $mysql->query(\"select id, title from \".$table_prefix.\"category where cfor='\".$type.\"' and subid=\".$r['id'].\" order by corder ASC\");\r\n while($r2=$mysql->fetch_array($q2)){\r\n $code[] = array($r2['id'],'&nbsp;&nbsp;|--&nbsp;'.$r2['title']);\r\n }\r\n }\r\n }\r\nreturn $code;\r\n}", "public function getCategory()\n {\n \t$cat = Category::with('child')->get();\n return response()->json( [ 'cat' => $cat ] );\n }" ]
[ "0.72061515", "0.6711597", "0.6661108", "0.6615862", "0.65241337", "0.63100463", "0.63100463", "0.627684", "0.6225231", "0.6208588", "0.61809105", "0.6161485", "0.6149699", "0.6127967", "0.6127967", "0.6127967", "0.611247", "0.6107959", "0.60363334", "0.60246027", "0.60006267", "0.59847003", "0.5967757", "0.5961548", "0.5951463", "0.5927971", "0.59236735", "0.5910875", "0.5898361", "0.58499247", "0.5840874", "0.5825068", "0.5778629", "0.5768115", "0.57643944", "0.5747705", "0.57272184", "0.5696919", "0.56875986", "0.5687201", "0.5678098", "0.5671409", "0.5670862", "0.56498545", "0.5646978", "0.5643429", "0.5629905", "0.56295735", "0.56295735", "0.5621464", "0.5620348", "0.56192595", "0.56061256", "0.5606079", "0.55998564", "0.5595656", "0.5593315", "0.5593315", "0.559204", "0.5585108", "0.5584498", "0.55843604", "0.5582522", "0.55763", "0.55699223", "0.55653113", "0.55458796", "0.5545627", "0.5545627", "0.55436105", "0.55302113", "0.55211824", "0.550941", "0.5501108", "0.55008835", "0.5499998", "0.54952705", "0.54874057", "0.54856557", "0.54847246", "0.5477758", "0.5467515", "0.5465526", "0.5458609", "0.5455577", "0.54542315", "0.5451272", "0.5450506", "0.54475194", "0.5444905", "0.5441264", "0.54406494", "0.543987", "0.5438035", "0.54363716", "0.543332", "0.5431713", "0.5430135", "0.5429561", "0.54286486" ]
0.7583286
0
get achievement details by its id
function achieve_get_details($id) { global $sql; $result = ($sql["dbc"]->query("SELECT id, name, description, reward, points FROM achievement WHERE id='".$id."' LIMIT 1")); $details = $sql["dbc"]->fetch_assoc($result); return $details; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAchievementById($achievementId)\n {\n $data = $this->db->query(\n 'SELECT id, charactergroupsgroup_id, pos, title, url, hash, description, achievementsmedia_id '.\n 'FROM charactergroupsachievements '.\n 'WHERE id = ?',\n 'i',\n $achievementId\n );\n if(empty($data)) {\n throw new \\nre\\exceptions\\IdNotFoundException($achievementId);\n }\n\n\n return $data[0];\n }", "public function checkAchievementId($p_achievement_id){\n $stmt = $this->adapter->conn->prepare(\n \"SELECT achievement_id \".\n \"FROM ACHIEVEMENT \".\n \"WHERE achievement_id = ?;\");\n $stmt->bindParam(1,$p_achievement_id);\n $result = $this->adapter->executeFetchPrepared($stmt);\n return $result;\n }", "public function get($id){\n\t\t$sql = $this->db->prepare(\"SELECT * FROM tracking WHERE id = :id\");\n\t\t$sql->execute();\n\n\t\treturn $sql->fetch(PDO::FETCH_ASSOC);\n\t}", "public function get( $id ){}", "public function getAchievementRecordInfo($p_achievement_id, $p_pet_id){\n $stmt = $this->adapter->conn->prepare(\n \"SELECT A.* , B.achievement_name, B.description\". \n \" FROM ACHIEVEMENT_RECORD A join ACHIEVEMENT B on A.achievement_id = B.achievement_id\".\n \" WHERE A.achievement_id = ? and A.pet_id = ?;\");\n\n $stmt->bindParam(1,$p_achievement_id);\n $stmt->bindParam(2,$p_pet_id);\n try{\n $result = $this->adapter->executeFetchPrepared($stmt);\n }catch(PDOException $e){\n return null;\n }\n return $result;\n }", "public function getById($id){\n return $this->_query->getById(\"id_acta\", $id);\n }", "public function get( $id );", "public function get(string $id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function get($id);", "public function getById( $id );", "function getAccessEntry($id);", "public function getAchievementByHash($achievementHash)\n {\n $data = $this->db->query(\n 'SELECT id, charactergroupsgroup_id, pos, title, url, hash, description, achievementsmedia_id '.\n 'FROM charactergroupsachievements '.\n 'WHERE hash = ?',\n 's',\n $achievementHash\n );\n if(empty($data)) {\n throw new \\nre\\exceptions\\IdNotFoundException($achievementHash);\n }\n\n\n return $data[0];\n }", "public function get($id) {\n\t}", "function getAchievements($UUID){\n $connection = get_SQL_Connection();\n $query = sprintf(\"SELECT a.achievementId FROM AchievementsUnlocked a, Users u WHERE u.facebookid='%s' AND a.userId = u.id ORDER BY achievementId\",\n mysql_real_escape_string($UUID));\n $queryresult = mysql_query($query,$connection);\n mysql_close($connection);\n if(!$queryresult) die(\"Failed to getAchievements: $query $connection\");\n else {\n $result = \"\";\n while($row = mysql_fetch_array($queryresult)){\n if($result != \"\") $result .= \",\";\n $result .= $row['achievementId'];\n }\n return $result;\n }\n}", "public function getById($id);", "public function getById($id);", "public function getById($id);", "public function getById($id);", "public function getById($id);", "public function getById($id);", "public function getById($id);", "public function getById($id);", "public function getById($id);", "public function getById($id);", "public function getById($id);", "public function getById($id);", "public function getById($id);", "public function getById($id);", "public function getById($id);", "public function index()\n {\n return AchievementResource::collection(Achievement::with('students:id,full_name,nisn')->get());\n }", "public function show($id)\n {\n $grade = Grade::find($id);\n return $grade;\n\n }", "public function show($id)\n {\n return Guru::where($id, 'id')->first();\n }", "public function getById(int $id);", "function fetchPermissionDetails($id) {\n\t$db = DB::getInstance();\n\t$query = $db->query(\"SELECT id, name FROM permissions WHERE id = ? LIMIT 1\",array($id));\n\t$results = $query->first();\n\t$row = array('id' => $results->id, 'name' => $results->name);\n\treturn ($row);\n}", "public function get_ad_byID($id) {\n $sql = \"select * from advertisement where ID=? and StatusID <>3\";\n $data = $this->db->query($sql, array($id));\n return $data->row();\n }", "public function getById(string $id);", "function getProfile($id){\n return $this->activity_model->fetchProfile($id)->row();;\n }", "public function get_badge($id)\r\n {\r\n global $db;\r\n $badges = db::get_array(\"badges\", array(\"id\" => $id));\r\n if (count($badges) > 0) {\r\n return $badges[0];\r\n } else {\r\n return array();\r\n }\r\n }", "public function destroy($id)\n {\n //check autentikasi\n try {\n auth()->userOrFail();\n } catch (\\Tymon\\JWTAuth\\Exceptions\\UserNotDefinedException $e) {\n return response()->json('messages : Not Authorized', 403);\n }\n\n $achievement = Achievement::find($id);\n\n if ($achievement != null) {\n $achievement->delete();\n return response()->json(['messages' => 'Data berhasil dihapus'], 200);\n } else {\n return response()->json(['messages' => 'Data tidak ditemukan'], 404);\n }\n }", "function get(string $id);", "function getInfo($id){\r\n\t\t$this->getQuestion($id);\r\n\t}", "public function get($id)\n {\n }", "public function get($id)\n {\n }", "public function get($id, $userId)\n {\n return $this->db->fetchAssoc('SELECT id,description,completed FROM ' . self::TABLE . ' WHERE id = ? and user_id= ?', array($id, $userId));\n }", "public function getById($id)\n {\n }", "public function getById($id)\n {\n }", "public function getItem ($id);", "public function account($id)\n {\n return $this->get(\"ach/relationships/{$id}\");\n }", "public function getPlayerAchievements($steamid, $app_id) {\r\n $this->createRequest('get', \"/ISteamUserStats/GetPlayerAchievements/v0001\", array(\r\n 'steamid' => $steamid,\r\n 'appid' => $app_id,\r\n 'format' => 'json'\r\n ));\r\n }", "public function getById($id) {\r\n\r\n $data = $this->adapter->request('GET', \"{$this->url}/{$id}\");\r\n\r\n return $this->_makeEntry($data, $id, \"{$this->url}/{$id}\");\r\n\r\n }", "function lf_email_util_get_campaign_details( $id ) {\n\n\tglobal $wpdb;\n\n\t$table_campaigns = $wpdb->prefix . 'lf_campaigns';\n\n\t// Set Query\n\t$sql = \"SELECT * FROM $table_campaigns WHERE id = $id\";\n\n\t// Get Results\n\t$results = $wpdb->get_results( $sql, ARRAY_A );\n\n\t// Format Results\n\t$details;\n\tif ( count( $results ) > 0 ) {\n\t\t$details = $results[0];\n\t} // end if\n\n\treturn $details;\n}", "function getByGuid($id);", "public function get( $iId );", "abstract public function get($id);", "abstract public function get($id);", "abstract public function get($id);", "public function show($id)\n {\n //\n return Incidencies::get()->where('ass_id','=',$id);\n }", "function getPersonDetails($id)\r\n\t{\r\n\t\t//build the api request using the key [global variable] and json format, and postcode \r\n\t\tglobal $They_Vote_Key;\r\n\r\n\t\t$url = \t\"https://theyvoteforyou.org.au/api/v1/people/\".$id.\".json\";\r\n\r\n\t\t$data = array('key'=> $They_Vote_Key);\r\n\t\t$GETurl = sprintf(\"%s?%s\", $url, http_build_query($data));\r\n\t\r\n\t\t//translate fullBio into a usable form\r\n\t\t$fullDetails = json_decode(file_get_contents($GETurl));\r\n\t\t\r\n\t\tif(isset($fullDetails->error))\r\n\t\t{\r\n\t\t\treturn null;\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn $fullDetails;\t\r\n\t}", "public function get($id){\n }", "public function load($id){\n\t\t$sql = 'SELECT * FROM cst_hit WHERE ID = ?';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\t$sqlQuery->setNumber($id);\n\t\treturn $this->getRow($sqlQuery);\n\t}", "protected function doFetch($id)\n {\n return $this->yac->get($this->getHash($id));\n }", "public function getDetail(int $id)\n {\n }", "public function getById($id){\n return $this->_query->getById(\"id\", $id);\n }", "public function getAgencyInfo($id) { \n $select = $this->select();\n $select->where(\"id = '\".$id.\"'\");\n \n if( $this->fetchRow($select) )\n return $this->fetchRow($select)->toArray();\n else\n return false;\n }", "function getAchievementIcon($id)\n{\n\tglobal $wowhead_url;\n\t\n\t$data = getXML($wowhead_url . '?achievement=' . $id . '&power');\n\t\n\tif (preg_match('#icon: \\'(.+?)\\'#', $data, $match))\n\t{\n\t\t// icon found\n\t\treturn 'http://static.wowhead.com/images/icons/small/' . strtolower($match[1]) . '.jpg';\t\n\t}\n\telse\n\t{\n\t\treturn false;\t\n\t}\n}", "public function get($id) {\r\n\treturn $this->getRepository()->find($id);\r\n }", "public function getbyid($id = null) {\n\n $input_data = $this->request->getJsonRawBody();\n $id = isset($input_data->id) ? $input_data->id : '';\n if (empty($id)):\n return $this->response->setJsonContent(['status' => 'Error', 'message' => 'Invalid input parameter']);\n else:\n $collection = GuidedLearningGamesMap::findFirstByid($id);\n if ($collection):\n return Json_encode($collection);\n else:\n return $this->response->setJsonContent(['status' => 'Error', 'Message' => 'Data not found']);\n endif;\n endif;\n }", "protected function _cacheGet($id) {\n\t\t\t$res = $this->_cache()->get($this->_cache->get('generation').'_'.$id);\n\t\t\treturn $res;\n\t\t}", "public function getAcById($ac_id) {\n\t\t$result = array();\n\n\t\t$stmt = $this->conn->prepare(\"SELECT ac_id, ac_brand, ac_series, ac_location, ac_note, user_id, ac_lastservice, ac_nextservice, ac_status, ac_picture from tb_ac WHERE ac_id = ?\");\n\t\t$stmt->bind_param(\"i\", $ac_id);\n\n\t\tif($stmt->execute()) {\n\t\t\t$data = $stmt->get_result()->fetch_all(MYSQLI_ASSOC);\n\t\t\t$stmt->fetch();\n\t\t\t$stmt->close();\n\n\t\t\t$result[\"status\"] = true;\n\t\t\t$result[\"message\"] = $data;\n\n\t\t\treturn $result;\n\t\t} else {\n\t\t\t$result[\"status\"] = true;\n\t\t\t$result[\"message\"] = \"We have no result for you\";\n\n\t\t\treturn $result;\n\t\t}\n\t}", "public function GetById($id);", "public function GetById($id);", "static function GetWithId(int $id)\n\t{\n\t\t$arr = [\n\t\t\t':id' => $id\n\t\t];\n\n\t\t$sql = 'SELECT * FROM user_info WHERE rf_user_id = :id LIMIT 1';\n\n\t\treturn Db::Query($sql,$arr)->FetchObj();\n\t}", "public function AnnouncementById($id) {\n $result = $this->conn->query(Announcement::toSelectByIdQuery($id));\n if ($result) {\n if(!$result->num_rows) {\n $this->err = 'Entity not found';\n return FALSE;\n }\n return $result->fetch_object('Announcement');\n }\n $this->err = $this->conn->error;\n return false; \n }", "public function show($id)\n {\n //\n $data = Anggota::where('id',$id)->first();\n\n return $data;\n }", "public function getAchievementByUrl($groupsgroupId, $achievementUrl)\n {\n $data = $this->db->query(\n 'SELECT id, charactergroupsgroup_id, pos, title, url, hash, description, achievementsmedia_id '.\n 'FROM charactergroupsachievements '.\n 'WHERE charactergroupsgroup_id = ? AND url = ?',\n 'is',\n $groupsgroupId, $achievementUrl\n );\n if(empty($data)) {\n throw new \\nre\\exceptions\\IdNotFoundException($achievementUrl);\n }\n\n\n return $data[0];\n }", "public function get_goal( $goal_id ) {\n\t\treturn $this->request( array(\n\t\t\t'function' => 'goals/' . abs( intval( $goal_id ) ),\n\t\t\t'method' => 'GET',\n\t\t) );\n\t}", "function get_by_game($id)\n {\n $this->db->join('players', 'peripherybids.player_id = players.player_id');\n $this->db->where('game_id', $id);\n return $this->db->get($this->table)->result();\n }", "public function getById($id)\n {\n $queryBuilder = $this->db->createQueryBuilder();\n $queryBuilder\n ->select('u.*')\n ->from('gamers', 'u')\n ->where('id = ?')\n ->setParameter(0, $id);\n $statement = $queryBuilder->execute();\n $gamerData = $statement->fetchAll();\n\n return new gamer($gamerData[0]['id'], $gamerData[0]['pseudo'], $gamerData[0]['team']);\n }", "function getGame($id) {\n $conn = dbcon();\n\n $query = $conn->prepare(\"SELECT * FROM games WHERE id = :id\");\n $query->bindParam(\":id\", $id);\n $query->execute();\n\n return $query->fetch();\n }", "public function getInfo($id){\n $query = $this->pdo->prepare('SELECT * FROM usuarios WHERE usuario_id=?');\n $query->execute([$id]);\n return $query->fetchall(PDO::FETCH_ASSOC)[0];\n }", "public function show($id)\n\t{\n\t\t$member = member::find($id);\n\t\tif (!$member) \n\t\t{\n\t\t\treturn response()->json(['status' => 404], 404);\t\n\t\t}\n\t\t$member->load('profile', 'credit', 'percent');\n\t\treturn response()->json($member);\n\t}" ]
[ "0.69263995", "0.67529386", "0.64793265", "0.64174473", "0.6417173", "0.6373577", "0.630916", "0.62361795", "0.620923", "0.620923", "0.620923", "0.620923", "0.620923", "0.620923", "0.620923", "0.620923", "0.620923", "0.620923", "0.620923", "0.620923", "0.620923", "0.620923", "0.620923", "0.620923", "0.620923", "0.620923", "0.620923", "0.620923", "0.6199412", "0.6124768", "0.6113844", "0.60749525", "0.6066526", "0.60593766", "0.60593766", "0.60593766", "0.60593766", "0.60593766", "0.60593766", "0.60593766", "0.60593766", "0.60593766", "0.60593766", "0.60593766", "0.60593766", "0.60593766", "0.60593766", "0.60593766", "0.60166806", "0.601148", "0.6005432", "0.59777784", "0.5954109", "0.5936366", "0.59357613", "0.59204996", "0.59111935", "0.5907308", "0.5871578", "0.58709174", "0.5860711", "0.5860711", "0.58515054", "0.5847715", "0.5847715", "0.5845674", "0.5843761", "0.58422357", "0.58360165", "0.58336914", "0.58247536", "0.5813482", "0.5802862", "0.5802862", "0.5802862", "0.58000755", "0.57997245", "0.57966995", "0.57921684", "0.5786902", "0.57852465", "0.57844734", "0.578248", "0.57747614", "0.57722414", "0.57673293", "0.5766948", "0.5762254", "0.5760578", "0.5760578", "0.57484007", "0.57401973", "0.57399756", "0.5738419", "0.5729648", "0.57277966", "0.5727757", "0.57240814", "0.57235634", "0.5722813" ]
0.74833083
0
get achievement icon if icon not exists in item_icons folder D/L it from web.
function achieve_get_icon($achieveid) { global $proxy_cfg, $get_icons_from_web, $item_icons, $sql; $result = $sql["dbc"]->query("SELECT spellIcon FROM achievement WHERE id='".$achieveid."' LIMIT 1"); if ($result) $displayid = $sql["dbc"]->result($result, 0); else $displayid = 0; if ($displayid) { $result = $sql["dbc"]->query("SELECT Name FROM spellicon WHERE ID='".$displayid."' LIMIT 1"); if($result) { $achieve = $sql["dbc"]->result($result, 0); // this_is_junk: we now extract data unaltered from the DBCs, so the spell icons have paths, // we remove them. // The parser reads \ as starting an escape sequence, so we have to // escape to make \ $temp = explode("\\", $achieve); // get the last field $achieve = $temp[count($temp) - 1]; if ($achieve) { //if (file_exists(''.$item_icons.'/'.$achieve.'.png')) //{ //if (filesize(''.$item_icons.'/'.$achieve.'.png') > 349) //{ return ''.$item_icons.'/'.$achieve.'.png'; //} //else //{ // this_is_junk: disabled deletion from DBC data //$sql["mgr"]->query('DELETE FROM spellicon WHERE id = '.$displayid.''); //if (file_exists(''.$item_icons.'/'.$achieve.'.png')) // unlink(''.$item_icons.'/'.$achieve.'.png'); //$achieve = ''; //} //} //else //$achieve = ''; } else $achieve = ''; } else $achieve = ''; } else $achieve = ''; // this_is_junk: yeah, this doesn't work, live with it. :) /*if($get_icons_from_web) { $xmlfilepath='http://www.wowhead.com/?achievement='; $proxy = $proxy_cfg["addr"]; $port = $proxy_cfg["port"]; if (empty($proxy_cfg["addr"])) { $proxy = 'www.wowhead.com'; $xmlfilepath = '?achievement='; $port = 80; } if ($achieve == '') { //get the icon name $fp = @fsockopen($proxy, $port, $errno, $errstr, 0.5); if ($fp); else return 'img/INV/INV_blank_32.gif'; $out = "GET /$xmlfilepath$achieveid HTTP/1.0\r\nHost: www.wowhead.com\r\n"; if (isset($proxy_cfg["user"])) $out .= "Proxy-Authorization: Basic ". base64_encode ("{$proxy_cfg["user"]}:{$proxy_cfg["pass"]}")."\r\n"; $out .="Connection: Close\r\n\r\n"; $temp = ''; fwrite($fp, $out); while ($fp && !feof($fp)) $temp .= fgets($fp, 4096); fclose($fp); $wowhead_string = $temp; $temp_string1 = strstr($wowhead_string, 'Icon.create('); $temp_string2 = substr($temp_string1, 12, 50); $temp_string3 = strtok($temp_string2, ','); $temp_string4 = substr($temp_string3, 1, strlen($temp_string3) - 2); $achieve_icon_name = $temp_string4; $achieve = $achieve_icon_name; } if (file_exists(''.$item_icons.'/'.$achieve.'.jpg')) { if (filesize(''.$item_icons.'/'.$achieve.'.jpg') > 349) { $sql["mgr"]->query('REPLACE INTO dbc_spellicon (id, name) VALUES (\''.$displayid.'\', \''.$achieve.'\')'); return ''.$item_icons.'/'.$achieve.'.jpg'; } else { $sql["mgr"]->query('DELETE FROM dbc_spellicon WHERE id = '.$displayid.''); if (file_exists(''.$item_icons.'/'.$achieve.'.jpg')) unlink(''.$item_icons.'/'.$achieve.'.jpg'); } } //get the icon itself if (empty($proxy_cfg["addr"])) { $proxy = 'static.wowhead.com'; $port = 80; } $fp = @fsockopen($proxy, $port, $errno, $errstr, 0.5); if ($fp); else return 'img/INV/INV_blank_32.gif'; $iconfilename = strtolower($achieve); $file = 'http://static.wowhead.com/images/icons/medium/'.$iconfilename.'.jpg'; $out = "GET $file HTTP/1.0\r\nHost: static.wowhead.com\r\n"; if (isset($proxy_cfg["user"])) $out .= "Proxy-Authorization: Basic ". base64_encode ("{$proxy_cfg["user"]}:{$proxy_cfg["pass"]}")."\r\n"; $out .="Connection: Close\r\n\r\n"; fwrite($fp, $out); //remove header while ($fp && !feof($fp)) { $headerbuffer = fgets($fp, 4096); if (urlencode($headerbuffer) == '%0D%0A') break; } if (file_exists(''.$item_icons.'/'.$achieve.'.jpg')) { if (filesize(''.$item_icons.'/'.$achieve.'.jpg') > 349) { $sql["mgr"]->query('REPLACE INTO dbc_spellicon (id, name) VALUES (\''.$displayid.'\', \''.$achieve.'\')'); return ''.$item_icons.'/'.$achieve.'.jpg'; } else { $sql["mgr"]->query('DELETE FROM dbc_spellicon WHERE id = '.$displayid.''); if (file_exists(''.$item_icons.'/'.$achieve.'.jpg')) unlink(''.$item_icons.'/'.$achieve.'.jpg'); } } $img_file = fopen(''.$item_icons.'/'.$achieve.'.jpg', 'wb'); while (!feof($fp)) fwrite($img_file,fgets($fp, 4096)); fclose($fp); fclose($img_file); if (file_exists(''.$item_icons.'/'.$achieve.'.jpg')) { if (filesize(''.$item_icons.'/'.$achieve.'.jpg') > 349) { $sql["mgr"]->query('REPLACE INTO dbc_spellicon (id, name) VALUES (\''.$displayid.'\', \''.$achieve.'\')'); return ''.$item_icons.'/'.$achieve.'.jpg'; } else { $sql["mgr"]->query('DELETE FROM dbc_spellicon WHERE id = '.$displayid.''); if (file_exists(''.$item_icons.'/'.$achieve.'.jpg')) unlink(''.$item_icons.'/'.$achieve.'.jpg'); } } else return 'img/INV/INV_blank_32.gif'; } else return 'img/INV/INV_blank_32.gif';*/ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getAchievementIcon($id)\n{\n\tglobal $wowhead_url;\n\t\n\t$data = getXML($wowhead_url . '?achievement=' . $id . '&power');\n\t\n\tif (preg_match('#icon: \\'(.+?)\\'#', $data, $match))\n\t{\n\t\t// icon found\n\t\treturn 'http://static.wowhead.com/images/icons/small/' . strtolower($match[1]) . '.jpg';\t\n\t}\n\telse\n\t{\n\t\treturn false;\t\n\t}\n}", "public function getIcon() {\n\t\t//regex is used to check if there's a filename within the iconFile string\n\t\treturn preg_replace('/^.*\\/([^\\/]+\\.(gif|png))?$/i', '\\1', $this->iconFile) ? $this->iconFile : '';\n\t}", "public function getIcon(): ?string\n {\n foreach ($this->items as $item) {\n if (!empty($item->getIcon())) {\n return $item->getIcon();\n }\n }\n\n return null;\n }", "private function get_icon()\n\t{\n\t\treturn $this->m_icon;\n\t}", "private function get_icon()\n\t{\n\t\treturn $this->m_icon;\n\t}", "public function getIcon() {\n if($this->items!==false)\n return @current($this->items)->user->profile_image_url;\n return false;\n }", "function amap_ma_get_entity_icon($u) {\n if (elgg_instanceof($u, 'user')) {\n $user_icon = amap_ma_get_marker_icon('membersmap');\n if ($user_icon == 'user_icon_tiny.png') {\n $entity_icon = $u->getIconURL('tiny');\n } \n else if ($user_icon == 'user_icon_small.png') {\n $entity_icon = $u->getIconURL('small');\n } \n else {\n $entity_icon = elgg_get_simplecache_url('membersmap/icon/' . amap_ma_get_marker_icon('membersmap'));\n// $entity_icon = elgg_get_site_url() . \"mod/membersmap/graphics/{$user_icon}\";\n }\n } else if (elgg_instanceof($u, 'group')) {\n $entity_icon = elgg_get_simplecache_url('groupsmap/icon/' . amap_ma_get_marker_icon('groupsmap'));\n } else if (elgg_instanceof($u, 'object', 'agora')) {\n $adicon = amap_ma_get_marker_icon('agora');\n if ($adicon == 'ad_image.png') {\n $entity_icon = $u->getIconURL('tiny');\n } else {\n $entity_icon = elgg_get_site_url() . 'mod/agora/graphics/' . amap_ma_get_marker_icon('agora');\n }\n }\n else if (elgg_instanceof($u, 'object', 'lcourt')) {\n $entity_icon = elgg_get_simplecache_url('leaguemanager/icon/icons/stadium.png');\n } \n else if (elgg_instanceof($u, 'object', 'page') || elgg_instanceof($u, 'object', 'page_top')) {\n //$entity_icon = elgg_get_site_url() . 'mod/pagesmap/graphics/' . amap_ma_get_marker_icon('pagesmap');\n $entity_icon = elgg_get_simplecache_url('pagesmap/icon/' . amap_ma_get_marker_icon('pagesmap'));\n }\n else if (elgg_instanceof($u, 'object', 'image')) {\n //$entity_icon = elgg_get_site_url() . 'mod/pagesmap/graphics/' . amap_ma_get_marker_icon('pagesmap');\n $entity_icon = $u->getIconURL('tiny');\n $entity_icon = elgg_get_simplecache_url('photosmap/icon/photography.png');\n }\n \n return $entity_icon;\n}", "protected function get__icon()\n\t{\n\t\treturn NULL;\n\t}", "public function get_menu_icon() {\n\n\t\treturn file_get_contents( $this->get_base_path() . '/images/menu-icon.svg' );\n\n\t}", "public function get_icon() {\n $skillIcons = get_field('listing_skill_icons', 'option');\n $randIcon = array_rand($skillIcons, 1);\n $icon = $skillIcons[$randIcon];\n return $icon;\n }", "public function getIcon();", "public function getIcon();", "private static function _find_icon($name) {\n if ($url = self::$_icon_cache[$name]) {\n return $url;\n }\n\n $filename = 'icon_' . $name . '.png';\n $path = Config::get('theme_path') . '/images/icons/';\n if (!file_exists(Config::get('prefix') . $path . $filename)) {\n $path = '/images/';\n }\n $url = Config::get('web_path') . $path . $filename;\n self::$_icon_cache[$name] = $url;\n\n return $url;\n }", "public function getIcon() {}", "public static function getIcon(): string\n {\n }", "public static function getIcon(): string\n {\n }", "function get_icon() {\n\t\treturn $this->settings['icon'];\n\t}", "function plugin_geticon_bad_behavior2 ()\n{\n global $_CONF;\n\n return $_CONF['site_url'] . '/' . BAD_BEHAVIOR_PLUGIN\n . '/images/bad_behavior2.png';\n}", "public function getIconForResourceWithPngFileReturnsIcon() {}", "public function getIcon(): string\n {\n return $this->icon ?: static::DEFAULT_ICON;\n }", "public function icons($item) {\n //\n return keyExtractor($item, \"icon\") ?: \"fa fa-circle-o\";\n }", "function menus_access_get_icon(ElggEntity $entity) {\n\t$access_id = $entity->access_id;\n\tswitch ($access_id) {\n\t\tcase ACCESS_FRIENDS :\n\t\t\t$icon = 'user';\n\t\t\tbreak;\n\t\tcase ACCESS_PUBLIC :\n\t\tcase ACCESS_LOGGED_IN :\n\t\t\t$icon = 'globe';\n\t\t\tbreak;\n\t\tcase ACCESS_PRIVATE :\n\t\t\t$icon = 'lock';\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t$collection = get_access_collection($access_id);\n\t\t\t$owner = get_entity($collection->owner_guid);\n\t\t\tif ($owner instanceof ElggGroup) {\n\t\t\t\t$icon = 'users';\n\t\t\t} else {\n\t\t\t\t$icon = 'cog';\n\t\t\t}\n\t\t\tbreak;\n\t}\n\n\t$params = ['entity' => $entity];\n\treturn elgg_trigger_plugin_hook('access:icon', $entity->getType(), $params, $icon);\n}", "function getIconurl($icon_key, $type='small') {\r\n\t\r\n \t\tglobal $CONN, $CONFIG;\r\n\t\t\r\n\t\tif ($type=='small') {\r\n\t\t\r\n\t\t\t$field = 'small_icon';\r\n\t\t\r\n\t\t} else {\r\n\t\t\r\n\t\t\t$field = 'large_icon';\r\n\t\t\r\n\t\t}\r\n\t\t$rs = $CONN->Execute(\"SELECT $field FROM {$CONFIG['DB_PREFIX']}icons WHERE icon_key='$icon_key'\");\r\n \r\n\t\t$icon = $rs->fields[0];\t\t\r\n\t\t\r\n\t\t$rs->Close();\r\n\t\t\r\n\t\tif (is_file($CONFIG['MODULE_FILE_SAVE_PATH'].'/icons/'.$icon)) {\r\n\t\t\r\n\r\n\t\t\t$icon_url = $CONFIG['MODULE_FILE_VIEW_PATH'].'icons/'.$icon;\r\n\t\t\treturn $icon_url;\r\n\t\t\t\t\r\n\t\t\r\n\t\t} else {\r\n\t\t\r\n\t\t\treturn false;\r\n\t\t\r\n\t\t}\r\n\t\t\t\r\n\t}", "public function getIcon()\n {\n return $this->get(self::_ICON);\n }", "public function icon(): string;", "public function getSpriteIconCode() {}", "public function Icon()\n {\n $ext = strtolower($this->getExtension());\n if (!Director::fileExists(FRAMEWORK_DIR . \"/images/app_icons/{$ext}_32.gif\")) {\n $ext = $this->appCategory();\n }\n\n if (!Director::fileExists(FRAMEWORK_DIR . \"/images/app_icons/{$ext}_32.gif\")) {\n $ext = \"generic\";\n }\n\n return FRAMEWORK_DIR . \"/images/app_icons/{$ext}_32.gif\";\n }", "public function getIcon()\n {\n return $this->_icon;\n }", "function get_screen_icon()\n {\n }", "private function getIconById($id) {\n $icons = array(\n \"tank\", //0\n \"fighter-plane-1\", //1\n \"helicopter\", //2\n \"cannon\", //3\n \"knife\", //4\n \"pistol\", //5\n \"soldier\", //6\n \"ship\", //7\n \"submarine\", //8\n \"bomb\", //9\n \"NULL\" //10 (NULL VALUE)\n );\n return $icons[$id];\n }", "public function getIcon()\n {\n return $this->icon;\n }", "public function getIcon()\n {\n return $this->icon;\n }", "public function getIcon()\n {\n return $this->icon;\n }", "public function getIcon()\n {\n return $this->icon;\n }", "public function getIcon()\n {\n return $this->icon;\n }", "public function getIcon()\n {\n return $this->icon;\n }", "public function getIcon()\n {\n return $this->icon;\n }", "private function get_icon( $html, $url ) {\n\t\t// Grab the icon's link element.\n\t\t$pattern = '#<link\\s[^>]*rel=(?:[\\\"\\']??)\\s*(?:icon|shortcut icon|icon shortcut)\\s*(?:[\\\"\\']??)[^>]*\\/?>#isU';\n\t\tpreg_match( $pattern, $html, $element );\n\t\tif ( empty( $element[0] ) || ! is_string( $element[0] ) ) {\n\t\t\treturn '';\n\t\t}\n\t\t$element = trim( $element[0] );\n\n\t\t// Get the icon's href value.\n\t\t$pattern = '#href=([\\\"\\']??)([^\\\" >]*?)\\\\1[^>]*#isU';\n\t\tpreg_match( $pattern, $element, $icon );\n\t\tif ( empty( $icon[2] ) || ! is_string( $icon[2] ) ) {\n\t\t\treturn '';\n\t\t}\n\t\t$icon = trim( $icon[2] );\n\n\t\t// If the icon is a data URL, return it.\n\t\t$parsed_icon = parse_url( $icon );\n\t\tif ( isset( $parsed_icon['scheme'] ) && 'data' === $parsed_icon['scheme'] ) {\n\t\t\treturn $icon;\n\t\t}\n\n\t\t// Attempt to convert relative URLs to absolute.\n\t\tif ( ! is_string( $url ) || '' === $url ) {\n\t\t\treturn $icon;\n\t\t}\n\t\t$parsed_url = parse_url( $url );\n\t\tif ( isset( $parsed_url['scheme'] ) && isset( $parsed_url['host'] ) ) {\n\t\t\t$root_url = $parsed_url['scheme'] . '://' . $parsed_url['host'] . '/';\n\t\t\t$icon = WP_Http::make_absolute_url( $icon, $root_url );\n\t\t}\n\n\t\treturn $icon;\n\t}", "public function get_icon()\n {\n return 'fa fa-image';\n }", "public function getIcon()\n {\n }", "static function Icon($icon_to_test)\n\t{\n\t\tif(in_array($icon_to_test, self::$_icons) )\n\t\t\treturn $icon_to_test;\n\t\tWdfException::Raise(\"Invalid Icon '$icon_to_test'\");\n return '';\n\t}", "public function getIconName() {}", "public function getIconName() {}", "public function getIconName() {}", "public function getIconName() {}", "function xstats_getShipIconWithExp( $race, $picturesmall, $experience, $ownerindex) {\n include ('../../inc.conf.php');\n return( xstats_getShipIcon( $race, $picturesmall, $ownerindex).'<img src=\"../../bilder/icons/erf_'.$experience.'.gif\" class=\"padded\" />' );\n}", "public function getIconForResourceWithUnknownFileTypeReturnsOtherIcon() {}", "function block_core_social_link_get_icon($service)\n {\n }", "public function getIcon() {\n\t\treturn $this->icon;\n\t}", "public function getIcon()\n {\n return ModuleResourceLoader::resourceURL(\n 'silverstripe/framework:client/images/app_icons/folder_icon_large.png'\n );\n }", "public function get_icon() {\n\t\treturn 'eicon-image';\n\t}", "public function getIcon() {\n return $this->icon;\n }", "public function getIcon() {\n return $this->icon;\n }", "public function icon()\n {\n return $this->icon;\n }", "public function get_icon() {\n\t\t\treturn WC_SUMO_Sagepay_Common_Functions::get_icon( $this->cardtypes, $this->sagelink, $this->sagelogo, $this->id );\n\t\t}", "public function icon(): ?string\n {\n return $this->getAttribute('icon');\n }", "public function getIcon()\n\t{\n\t\treturn $this->icon;\n\t}", "public function get_menu_icon() {\n\t\treturn 'gform-icon--akismet';\n\t}", "public function override_svg_icons() {\n\t\tglobal $menu;\n\n\t\t// Only do this if we're not in an API request, as we override the $menu global.\n\t\tif ( $this->is_api_request ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$svg_items = array();\n\t\tforeach ( $menu as $idx => $menu_item ) {\n\t\t\t// Menu items that don't have icons, for example separators, have less than 7\n\t\t\t// elements, partly because the 7th is the icon. So, if we have less than 7,\n\t\t\t// let's skip it.\n\t\t\tif ( count( $menu_item ) < 7 ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// If the hookname contain a URL than sanitize it by replacing invalid characters.\n\t\t\tif ( false !== strpos( $menu_item[5], '://' ) ) {\n\t\t\t\t$menu_item[5] = preg_replace( '![:/.]+!', '_', $menu_item[5] );\n\t\t\t}\n\n\t\t\tif ( 0 === strpos( $menu_item[6], 'data:image/svg+xml' ) && 'site-card' !== $menu_item[3] ) {\n\t\t\t\t$svg_items[] = array(\n\t\t\t\t\t'icon' => $menu_item[6],\n\t\t\t\t\t'id' => $menu_item[5],\n\t\t\t\t);\n\t\t\t\t$menu_item[4] .= ' menu-svg-icon';\n\t\t\t\t$menu_item[6] = 'none';\n\t\t\t}\n\t\t\t// phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited\n\t\t\t$menu[ $idx ] = $menu_item;\n\t\t}\n\t\tif ( count( $svg_items ) > 0 ) {\n\t\t\t$styles = '.menu-svg-icon .wp-menu-image { background-repeat: no-repeat; background-position: center center } ';\n\t\t\tforeach ( $svg_items as $svg_item ) {\n\t\t\t\t$styles .= sprintf( '#%s .wp-menu-image { background-image: url( \"%s\" ) }', $svg_item['id'], $svg_item['icon'] );\n\t\t\t}\n\t\t\t$styles .= '@supports ( mask-image: none ) or ( -webkit-mask-image: none ) { ';\n\t\t\t$styles .= '.menu-svg-icon .wp-menu-image { background-image: none; } ';\n\t\t\t$styles .= '.menu-svg-icon .wp-menu-image::before { background-color: currentColor; ';\n\t\t\t$styles .= 'mask-size: contain; mask-position: center center; mask-repeat: no-repeat; ';\n\t\t\t$styles .= '-webkit-mask-size: contain; -webkit-mask-position: center center; -webkit-mask-repeat: no-repeat; content:\"\" } ';\n\t\t\tforeach ( $svg_items as $svg_item ) {\n\t\t\t\t$styles .= sprintf(\n\t\t\t\t\t'#%s .wp-menu-image { background-image: none; } #%s .wp-menu-image::before{ mask-image: url( \"%s\" ); -webkit-mask-image: url( \"%s\" ) }',\n\t\t\t\t\t$svg_item['id'],\n\t\t\t\t\t$svg_item['id'],\n\t\t\t\t\t$svg_item['icon'],\n\t\t\t\t\t$svg_item['icon']\n\t\t\t\t);\n\t\t\t}\n\t\t\t$styles .= '}';\n\n\t\t\twp_register_style( 'svg-menu-overrides', false, array(), '20210331' );\n\t\t\twp_enqueue_style( 'svg-menu-overrides' );\n\t\t\twp_add_inline_style( 'svg-menu-overrides', $styles );\n\t\t}\n\t}", "function plugin_geticon_nexmenu()\n{\n global $_CONF;\n\n return $_CONF['layout_url'] .'/nexmenu/images/admin/nexmenu.gif';\n}", "public function getIcon()\n {\n return empty($this->model->icon) ? 'globe' : $this->model->icon;\n }", "public function getItemIcon()\n {\n return $this->stripTags($this->getEntity()->getData('list_item_icon'));\n }", "public function getIcon()\n {\n return $this->Icon;\n }", "static public function get_social_icons() {\n\t\t$icons = array(\n\t\t\t'' => '',\n\t\t\t'im-icon-google-plus' => 'Google Plus',\n\t\t\t'im-icon-google-drive' => 'Google Drive',\n\t\t\t'im-icon-facebook' => 'Facebook',\n\t\t\t'im-icon-instagram' => 'Instagram',\n\t\t\t'fa-icon-instagram' => 'Instagram (2)',\n\t\t\t'im-icon-twitter' => 'Twitter',\n\t\t\t'im-icon-feed-2' => 'RSS',\n\t\t\t'im-icon-youtube' => 'Youtube',\n\t\t\t'im-icon-vimeo' => 'Vimeo',\n\t\t\t'im-icon-flickr' => 'Flickr',\n\t\t\t'im-icon-picassa' => 'Picassa',\n\t\t\t'im-icon-dribble' => 'Dribbble',\n\t\t\t'im-icon-deviantart-2' => 'Deviantart',\n\t\t\t'im-icon-forrst' => 'Forrst',\n\t\t\t'im-icon-steam' => 'Steam',\n\t\t\t'im-icon-github-3' => 'Github',\n\t\t\t'im-icon-wordpress' => 'Wordpress',\n\t\t\t'im-icon-joomla' => 'Joomla',\n\t\t\t'im-icon-blogger' => 'Blogger',\n\t\t\t'im-icon-tumblt' => 'Tumblt',\n\t\t\t'im-icon-yahoo' => 'Yahoo',\n\t\t\t'im-icon-skype' => 'Skype',\n\t\t\t'im-icon-reddit' => 'Reddit',\n\t\t\t'im-icon-linkedin' => 'Linkedin',\n\t\t\t'im-icon-lastfm' => 'Lastfm',\n\t\t\t'im-icon-delicious' => 'Delicious',\n\t\t\t'im-icon-stumbleupon' => 'Stumbleupon',\n\t\t\t'im-icon-stackoveratom' => 'Stackoveratom',\n\t\t\t'im-icon-pinterest-2' => 'Pinterest',\n\t\t\t'im-icon-xing' => 'Xing',\n\t\t\t'im-icon-flattr' => 'Flattr',\n\t\t\t'im-icon-foursquare-2' => 'Foursquare',\n\t\t\t'im-icon-yelp' => 'Yelp',\n\t\t\t'fa-icon-renren' => 'Renren',\n\t\t\t'fa-icon-vk' => 'Vk',\n\t\t\t'fa-icon-stackexchange' => 'Stackexchange',\n\t\t );\n\t\tasort( $icons );\n\t\treturn $icons;\n\t}", "public function get_icon() {\n return 'fa fa-plug';\n }", "public function get_icon() {\n return 'fa fa-plug';\n }", "public function get_icon() {\n return 'fa fa-plug';\n }", "public function getIconUrl(): string\n {\n return $this->iconUrl;\n }", "public function icon ( )\n\t{\n\t\treturn Array( 'id' => $this->id,\t// shoud be consistent with what is passed to _uicmp_stuff_fold class\n\t\t\t\t\t 'title' => $this->messages['icon'] );\n\t}", "protected function getIcon()\n {\n /** @var IconFactory $iconFactory */\n $iconFactory = GeneralUtility::makeInstance(IconFactory::class);\n return $iconFactory->getIcon('px-shopware-clear-cache', Icon::SIZE_SMALL)->render();\n }", "public function getIconName(): ?string;", "public function getIconForResourceWithFileWithoutExtensionTypeReturnsOtherIcon() {}", "public static function getIconName($name)\n\t{\n\t\t$icon = self::$_icons[$name];\n\t\tif (!$icon) {\n\t\t\t$icon = self::$_icons['default'];\n\t\t}\n\t\treturn $icon;\n\t}", "public function getIconForResourceWithCustomImageMimeTypeReturnsImageIcon() {}", "public static function iconPath()\n {\n return Craft::getAlias(\"@julianmjones/schedapiintegration/assetbundles/schedapiintegrationutilityutility/dist/img/SchedApiIntegrationUtility-icon.svg\");\n }", "public function getSvgIcon();", "function wpvideocoach_custom_menu_icon()\r\n{\r\n\tglobal $wpvideocoach_custom_menu_icon;\r\n\tif(empty($wpvideocoach_custom_menu_icon)){\r\n\t\t$wpvideocoach_custom_menu_icon = plugins_url('wp-video-coach/images/icon.png');\r\n\t}\r\n\treturn $wpvideocoach_custom_menu_icon;\r\n}", "public function get_icon()\n {\n return 'eicon-nav-menu';\n }", "public function getIcon() {\r\n\t\r\n\t$fileType = $this->getType();\r\n\t\r\n\t$image = array(\r\n\t 'image/gif',\r\n\t 'image/png',\r\n\t 'image/jpg',\r\n\t 'image/jpeg'\r\n\t);\r\n\t\r\n\t$rarZip = array(\r\n\t 'application/zip',\r\n 'application/x-rar-compressed'\r\n\t);\r\n\t\r\n\t$audio = array(\r\n\t 'audio/mpeg'\r\n\t);\r\n\t\r\n\t$video = array(\r\n\t 'video/quicktime',\r\n\t 'video/mp4'\r\n\t);\r\n\t\r\n\t$pdf = array(\r\n\t 'application/pdf'\r\n\t);\r\n\t\r\n\t$wordExcelPptx = array(\r\n\t 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',\r\n\t 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',\r\n\t 'application/vnd.openxmlformats-officedocument.presentationml.presentation',\r\n\t 'application/msword',\r\n\t 'application/vnd.ms-excel',\r\n\t 'application/vnd.ms-powerpoint'\r\n\t);\r\n\t\r\n\tif (in_array($fileType, $image)) {\r\n\t return \"image.png\";\r\n\t} elseif (in_array($fileType, $audio)) {\r\n\t return \"audio.png\";\r\n\t} elseif (in_array($fileType, $video)) {\r\n\t return \"video.png\";\r\n\t} elseif (in_array($fileType, $rarZip)) {\r\n\t return \"rarZip.png\";\r\n\t} elseif (in_array($fileType, $pdf)) {\r\n\t return \"pdf.png\";\r\n\t} elseif (in_array($fileType, $wordExcelPptx)) {\r\n\t return \"wordExcelPptx.png\";\r\n\t} else {\r\n\t return \"default.png\";\r\n\t}\r\n\t\r\n }", "public function get_icon() {\n return 'eicon-heading apr-badge';\n }", "private function getDefaultIcon() {\n static $icon_map;\n if ($icon_map === null) {\n $types = PhabricatorPHIDType::getAllTypes();\n\n $map = array();\n foreach ($types as $type) {\n $icon = $type->getTypeIcon();\n if ($icon !== null) {\n $map[$type->getTypeConstant()] = $icon;\n }\n }\n\n $icon_map = $map;\n }\n\n $phid_type = phid_get_type($this->phid);\n if (isset($icon_map[$phid_type])) {\n return $icon_map[$phid_type];\n }\n\n return null;\n }", "public function getIconForResourceWithOpenFolderReturnsOpenFolderIcon() {}", "protected function getIcon($path)\n {\n $images = $this->config->getIcons();\n return $this->getUrl($images.$path);\n }", "public function getIconForResourceWithFolderReturnsFolderIcon() {}", "public function icon($icon);", "public function getBsShowIcon($icon = null);", "private function _renderIcon()\n {\n return !empty($this->_icon) ? '<i class=\"' . $this->_icon . '\"></i>' : '';\n }", "public function getIcons()\n\t{\n\t\t$user = JFactory::getUser();\n\t\t// reset icon array\n\t\t$icons = array();\n\t\t// view groups array\n\t\t$viewGroups = array(\n\t\t\t'main' => array('png.question.add', 'png.questions', 'png.questions.catid', 'png.exams')\n\t\t);\n\t\t// view access array\n\t\t$viewAccess = array(\n\t\t\t'question.create' => 'question.create',\n\t\t\t'questions.access' => 'question.access',\n\t\t\t'question.access' => 'question.access',\n\t\t\t'questions.submenu' => 'question.submenu',\n\t\t\t'questions.dashboard_list' => 'question.dashboard_list',\n\t\t\t'question.dashboard_add' => 'question.dashboard_add',\n\t\t\t'exam.create' => 'exam.create',\n\t\t\t'exams.access' => 'exam.access',\n\t\t\t'exam.access' => 'exam.access',\n\t\t\t'exams.submenu' => 'exam.submenu',\n\t\t\t'exams.dashboard_list' => 'exam.dashboard_list',\n\t\t\t'questiontypes.access' => 'questiontype.access',\n\t\t\t'questiontype.access' => 'questiontype.access');\n\t\t// loop over the $views\n\t\tforeach($viewGroups as $group => $views)\n\t\t{\n\t\t\t$i = 0;\n\t\t\tif (JcpqmHelper::checkArray($views))\n\t\t\t{\n\t\t\t\tforeach($views as $view)\n\t\t\t\t{\n\t\t\t\t\t$add = false;\n\t\t\t\t\t// external views (links)\n\t\t\t\t\tif (strpos($view,'||') !== false)\n\t\t\t\t\t{\n\t\t\t\t\t\t$dwd = explode('||', $view);\n\t\t\t\t\t\tif (count($dwd) == 3)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlist($type, $name, $url) = $dwd;\n\t\t\t\t\t\t\t$viewName \t= $name;\n\t\t\t\t\t\t\t$alt \t\t= $name;\n\t\t\t\t\t\t\t$url \t\t= $url;\n\t\t\t\t\t\t\t$image \t\t= $name.'.'.$type;\n\t\t\t\t\t\t\t$name \t\t= 'COM_JCPQM_DASHBOARD_'.JcpqmHelper::safeString($name,'U');\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t// internal views\n\t\t\t\t\telseif (strpos($view,'.') !== false)\n\t\t\t\t\t{\n\t\t\t\t\t\t$dwd = explode('.', $view);\n\t\t\t\t\t\tif (count($dwd) == 3)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlist($type, $name, $action) = $dwd;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telseif (count($dwd) == 2)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlist($type, $name) = $dwd;\n\t\t\t\t\t\t\t$action = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ($action)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$viewName = $name;\n\t\t\t\t\t\t\tswitch($action)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcase 'add':\n\t\t\t\t\t\t\t\t\t$url \t= 'index.php?option=com_jcpqm&view='.$name.'&layout=edit';\n\t\t\t\t\t\t\t\t\t$image \t= $name.'_'.$action.'.'.$type;\n\t\t\t\t\t\t\t\t\t$alt \t= $name.'&nbsp;'.$action;\n\t\t\t\t\t\t\t\t\t$name\t= 'COM_JCPQM_DASHBOARD_'.JcpqmHelper::safeString($name,'U').'_ADD';\n\t\t\t\t\t\t\t\t\t$add\t= true;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\t$url \t= 'index.php?option=com_categories&view=categories&extension=com_jcpqm.'.$name;\n\t\t\t\t\t\t\t\t\t$image \t= $name.'_'.$action.'.'.$type;\n\t\t\t\t\t\t\t\t\t$alt \t= $name.'&nbsp;'.$action;\n\t\t\t\t\t\t\t\t\t$name\t= 'COM_JCPQM_DASHBOARD_'.JcpqmHelper::safeString($name,'U').'_'.JcpqmHelper::safeString($action,'U');\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\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$viewName \t= $name;\n\t\t\t\t\t\t\t$alt \t\t= $name;\n\t\t\t\t\t\t\t$url \t\t= 'index.php?option=com_jcpqm&view='.$name;\n\t\t\t\t\t\t\t$image \t\t= $name.'.'.$type;\n\t\t\t\t\t\t\t$name \t\t= 'COM_JCPQM_DASHBOARD_'.JcpqmHelper::safeString($name,'U');\n\t\t\t\t\t\t\t$hover\t\t= false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$viewName \t= $view;\n\t\t\t\t\t\t$alt \t\t= $view;\n\t\t\t\t\t\t$url \t\t= 'index.php?option=com_jcpqm&view='.$view;\n\t\t\t\t\t\t$image \t\t= $view.'.png';\n\t\t\t\t\t\t$name \t\t= ucwords($view).'<br /><br />';\n\t\t\t\t\t\t$hover\t\t= false;\n\t\t\t\t\t}\n\t\t\t\t\t// first make sure the view access is set\n\t\t\t\t\tif (JcpqmHelper::checkArray($viewAccess))\n\t\t\t\t\t{\n\t\t\t\t\t\t// setup some defaults\n\t\t\t\t\t\t$dashboard_add = false;\n\t\t\t\t\t\t$dashboard_list = false;\n\t\t\t\t\t\t$accessTo = '';\n\t\t\t\t\t\t$accessAdd = '';\n\t\t\t\t\t\t// acces checking start\n\t\t\t\t\t\t$accessCreate = (isset($viewAccess[$viewName.'.create'])) ? JcpqmHelper::checkString($viewAccess[$viewName.'.create']):false;\n\t\t\t\t\t\t$accessAccess = (isset($viewAccess[$viewName.'.access'])) ? JcpqmHelper::checkString($viewAccess[$viewName.'.access']):false;\n\t\t\t\t\t\t// set main controllers\n\t\t\t\t\t\t$accessDashboard_add = (isset($viewAccess[$viewName.'.dashboard_add'])) ? JcpqmHelper::checkString($viewAccess[$viewName.'.dashboard_add']):false;\n\t\t\t\t\t\t$accessDashboard_list = (isset($viewAccess[$viewName.'.dashboard_list'])) ? JcpqmHelper::checkString($viewAccess[$viewName.'.dashboard_list']):false;\n\t\t\t\t\t\t// check for adding access\n\t\t\t\t\t\tif ($add && $accessCreate)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$accessAdd = $viewAccess[$viewName.'.create'];\n\t\t\t\t\t\t}\n\t\t\t\t\t\telseif ($add)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$accessAdd = 'core.create';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// check if acces to view is set\n\t\t\t\t\t\tif ($accessAccess)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$accessTo = $viewAccess[$viewName.'.access'];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// set main access controllers\n\t\t\t\t\t\tif ($accessDashboard_add)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$dashboard_add\t= $user->authorise($viewAccess[$viewName.'.dashboard_add'], 'com_jcpqm');\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ($accessDashboard_list)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$dashboard_list = $user->authorise($viewAccess[$viewName.'.dashboard_list'], 'com_jcpqm');\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (JcpqmHelper::checkString($accessAdd) && JcpqmHelper::checkString($accessTo))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// check access\n\t\t\t\t\t\t\tif($user->authorise($accessAdd, 'com_jcpqm') && $user->authorise($accessTo, 'com_jcpqm') && $dashboard_add)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$icons[$group][$i]\t\t\t= new StdClass;\n\t\t\t\t\t\t\t\t$icons[$group][$i]->url \t= $url;\n\t\t\t\t\t\t\t\t$icons[$group][$i]->name \t= $name;\n\t\t\t\t\t\t\t\t$icons[$group][$i]->image \t= $image;\n\t\t\t\t\t\t\t\t$icons[$group][$i]->alt \t= $alt;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telseif (JcpqmHelper::checkString($accessTo))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// check access\n\t\t\t\t\t\t\tif($user->authorise($accessTo, 'com_jcpqm') && $dashboard_list)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$icons[$group][$i]\t\t\t= new StdClass;\n\t\t\t\t\t\t\t\t$icons[$group][$i]->url \t= $url;\n\t\t\t\t\t\t\t\t$icons[$group][$i]->name \t= $name;\n\t\t\t\t\t\t\t\t$icons[$group][$i]->image \t= $image;\n\t\t\t\t\t\t\t\t$icons[$group][$i]->alt \t= $alt;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telseif (JcpqmHelper::checkString($accessAdd))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// check access\n\t\t\t\t\t\t\tif($user->authorise($accessAdd, 'com_jcpqm') && $dashboard_add)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$icons[$group][$i]\t\t\t= new StdClass;\n\t\t\t\t\t\t\t\t$icons[$group][$i]->url \t= $url;\n\t\t\t\t\t\t\t\t$icons[$group][$i]->name \t= $name;\n\t\t\t\t\t\t\t\t$icons[$group][$i]->image \t= $image;\n\t\t\t\t\t\t\t\t$icons[$group][$i]->alt \t= $alt;\n\t\t\t\t\t\t\t}\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$icons[$group][$i]\t\t\t= new StdClass;\n\t\t\t\t\t\t\t$icons[$group][$i]->url \t= $url;\n\t\t\t\t\t\t\t$icons[$group][$i]->name \t= $name;\n\t\t\t\t\t\t\t$icons[$group][$i]->image \t= $image;\n\t\t\t\t\t\t\t$icons[$group][$i]->alt \t= $alt;\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$icons[$group][$i]\t\t\t= new StdClass;\n\t\t\t\t\t\t$icons[$group][$i]->url \t= $url;\n\t\t\t\t\t\t$icons[$group][$i]->name \t= $name;\n\t\t\t\t\t\t$icons[$group][$i]->image \t= $image;\n\t\t\t\t\t\t$icons[$group][$i]->alt \t= $alt;\n\t\t\t\t\t}\n\t\t\t\t\t$i++;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t\t$icons[$group][$i] = false;\n\t\t\t}\n\t\t}\n\t\treturn $icons;\n\t}", "public function getIcon()\n {\n return ' fa fa-lock';\n }", "public static function type_return_icon($type_id)\n {\n switch($type_id):\n case '101';\n return \"<i class=\\\"fa fa-beer fa-1x\\\"></i>\";\n break;\n case '102';\n return \"<i class=\\\"fa fa-thumbs-o-up fa-1x\\\"></i>\";\n break;\n case '103';\n break;\n case '200';\n return \"<i class=\\\"fa fa-picture-o fa-1x\\\"></i>\";\n break;\n case '300';\n return \"<i class=\\\"fa fa-map-marker fa-1x\\\"></i>\";\n break;\n endswitch;\n }", "public function getBsRemoveIcon($icon = null);", "static function try_decode_icon($icon)\n\t{\n\t\tif(strpos($icon, 'u') === 0) $icon = json_decode('\"\\\\'.$icon.'\"');\n\t\treturn $icon;\n\t}", "public function get_icon() {\n\t\treturn 'fa fa-images';\n\t}", "public function get_icon()\n\t{\n\t\treturn 'fab fa-algolia';\n\t}", "public function kind_icon_url ()\n {\n switch ($this->kind)\n {\n case History_item_deleted:\n return '{icons}indicators/deleted';\n case History_item_restored:\n return '{icons}indicators/restored';\n case History_item_hidden:\n return '{icons}indicators/hidden';\n case History_item_hidden_update:\n return '{icons}indicators/hidden_update';\n case History_item_locked:\n return '{icons}indicators/locked';\n default:\n return parent::kind_icon_url ();\n }\n }", "function atom_site_icon()\n {\n }", "public function getCategoryIcon();", "public function getIconReturnsReplacementIconWhenDeprecatedDataProvider() {}", "public function get_icon() {\n\t\tglobal $wc_authorize_sim;\n\n\t\t$icon = '';\n\n\t\t$icon = '<img src=\"' . esc_url( $wc_authorize_sim->force_ssl( $wc_authorize_sim->plugins_url('assets/images/authorize-net-co.png') ) ) . '\" alt=\"' . esc_attr( $this->title ) . '\" />';\n\n\t\treturn apply_filters( 'woocommerce_authorize_sim_icon', $icon, $this->id );\n\t}", "public static function iconPath()\n {\n return Craft::getAlias('@seibertio/elasticsearch/icon.svg');\n }" ]
[ "0.7616838", "0.6804254", "0.6631242", "0.66083825", "0.66083825", "0.65563077", "0.6525396", "0.6508459", "0.64941746", "0.64858323", "0.64612895", "0.64612895", "0.64140487", "0.6406971", "0.64009464", "0.64009464", "0.63777065", "0.6350124", "0.6323305", "0.6322778", "0.6320581", "0.63165665", "0.62686616", "0.6250237", "0.6228845", "0.6184859", "0.61604095", "0.6144062", "0.6140203", "0.6134978", "0.6107508", "0.6107508", "0.6107508", "0.6107508", "0.6107508", "0.6107508", "0.6107508", "0.61068785", "0.6078407", "0.60603875", "0.6056018", "0.60558695", "0.60558695", "0.6055694", "0.6055694", "0.60545826", "0.6052835", "0.6038957", "0.6038417", "0.60375196", "0.6036446", "0.60290915", "0.60290915", "0.6025208", "0.602365", "0.6017398", "0.60107857", "0.6008347", "0.59966224", "0.5995809", "0.59789205", "0.59725076", "0.59711176", "0.59614056", "0.5961032", "0.5961032", "0.5961032", "0.59523904", "0.5949076", "0.5933983", "0.59141165", "0.59134835", "0.59072495", "0.5905276", "0.59046125", "0.5886041", "0.5885211", "0.5884801", "0.5877007", "0.58686", "0.58606786", "0.585391", "0.58521575", "0.5819046", "0.5813765", "0.58024675", "0.58011806", "0.5796288", "0.57951313", "0.5789888", "0.57887864", "0.5759923", "0.57584274", "0.57577986", "0.5749001", "0.57158715", "0.57131475", "0.5712949", "0.56968594", "0.5683989" ]
0.7307229
1
/ Get all registers
public function index(){ return response('', 200); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getAll () {\n\t\treturn self::$registered;\n\t}", "public function get_all_registered()\n {\n }", "public function get_all_registered()\n {\n }", "public static function getRegister(): array\n {\n return self::$smartObjectRegistry;\n }", "public function getRegistryArray() {\n return $this->_registryArray;\n }", "public static function getAll()\r\n {\r\n return self::$typeRegistry;\r\n }", "public function getRegistryData()\n {\n return array();\n }", "public function all()\n {\n return AnuncioRegra::all();\n }", "public function &get_registry()\n {\n }", "public function getRegistros()\n {\n return $this->Sped->getRegistros();\n }", "static public function getAll()\r\n {\r\n return self::$values;\r\n }", "public static function get_all ()\n {\n return static::$_map;\n }", "public static function get_all_regions() {\r\n $DB = new \\Nefuzz\\Php\\DBC();\r\n $result = ($DB)->query_to_array(\"\r\n SELECT *\r\n FROM regions;\r\n \",'',[]);\r\n $DB->quit();\r\n return $result;\r\n }", "public function register(): array;", "public static function getAll() {}", "public static function &getAll(): array\n {\n return self::getInstance()->elements;\n }", "public function getAll()\n\t{\n\t\treturn $this->all;\n\t}", "public function getRegistries()\n {\n return $this->registries;\n }", "public function all()\n {\n return $this->machine->all();\n }", "public static function getAll() {\n return self::$instances;\n }", "public static function getAll();", "public static function getAll();", "public function get_all () {\r\n\t\treturn $this->_data;\r\n\t}", "public function getAll(){\n\t\treturn $this->stack;\n\t}", "public static function all()\n {\n return self::$list;\n }", "public function all(): array;", "public function all(): array;", "public function all(): array;", "public function all(): array;", "public function all(): array;", "public function all(): array;", "public function all(): array;", "public function all(): array;", "public function all(): array;", "public function all(): array;", "public function all(): array;", "public function all(): array;", "public function all(): array;", "public function all(): array;", "public function all(): array;", "public function all(): array;", "public function all(): array\n {\n return $this->values;\n }", "function &getAll( )\n {\n $db =& eZDB::globalDatabase();\n $address_array = 0;\n \n $db->array_query( $address_array, \"SELECT * FROM eZAddress_Address\" );\n \n return $address_array;\n }", "public static function getAll(): array;", "public function all()\n\t{\n\t\treturn $this->getArray();\n\t}", "public function all()\n {\n return $this->values;\n }", "public function get_all(){\n return get_object_vars($this);\n }", "public function getAll(){\n\t\treturn $this->configValues;\n\t}", "public function dump(){\r\n print_r($this->_registry);\r\n }", "public static function getAll(): array\n {\n return static::getInstance()->getAll();\n }", "public function getAll(): array\n {\n return $this->localValues;\n }", "public function register()\n {\n return array(T_GLOBAL);\n\n }", "public function getAll()\n {\n return $this->values;\n }", "public function getAll()\n {\n return $this->values;\n }", "public function getAll()\n {\n return $this->all;\n }", "public function get_all_registered($outside_init_only = \\false)\n {\n }", "public function get_all_registered($outside_init_only = \\false)\n {\n }", "public final function get_all()\n {\n }", "public function getRegistryNames() : array\n {\n $names = [];\n foreach ($this->getRegistry() as $registryName=>$registryValue)\n {\n $names[] = $registryName;\n }\n\n return $names;\n }", "public static function getAll()\n {\n $database = DatabaseFactory::getFactory()->getConnection();\n\n $sql = \"SELECT region_id, region_name FROM region\";\n $query = $database->prepare($sql);\n $query->execute();\n\n // fetchAll() is the PDO method that gets all result rows\n return $query->fetchAll();\n }", "public function get_all() {\n $this->db->select('id, regimen, descripcion, tipo');\n $this->db->from('regimenes_fiscales');\n $this->db->where('status', 1);\n $result = $this->db->get();\n return $result->result_array();\n }", "public function all() : array;", "function getRegs($filter = \"\")\n {\n\n global $sql;\n\t\t \n\t if(isset($filter) && strlen(trim($filter))>0) $where = sprintf(\" where subscr_code='%s' \",$sql->escape_string($filter));\n\t else $where = \"\";\n\n $laRet = array();\n $sql->query(\"SELECT * from registry $where ORDER BY id\");\n while ($row = $sql->fetchObject()) {\n\t $item = new Registry(); \n\t \t$item->id = $row->id;\n\t\t$item->subscr_code = $row->subscr_code;\n $item->firstName = $row->firstname;\n $item->lastName = $row->lastname;\n $item->email = $row->email;\n\t $item->phone = $row->phone;\n\t $item->postCode = $row->postcode;\n\t $item->address = $row->address;\n\t $item->kidSize = $row->kidsize;\n\t $item->bigSize = $row->bigsize;\n\t $item->referer = $row->referer;\n\t $item->postId = $row->postid;\n\t $item->dateReg = $row->datereg;\n\t $item->dateSend = $row->datesend;\n\t $item->status = $row->status;\n\t $item->sid = $row->sid;\n $laRet[(int)$row->id] = $item;\n }\n\n return $laRet;\n }", "public function get()\n {\n $queryString = '{\"MaxResults\":0,\"MatchAll\":true,\"RoleID\":3,\"RoleIDs\":null,\"InstitutionID\":32,\"InstitutionIDs\":null,\"SpecialityID\":102,\"ExamGroupID\":null,\"IsParticular\":null,\"IsInstitutional\":true}';\n\n return $this->performRequest('GET', '/callcenter/scripts/core/utils/json/regimes.json');\n }", "public static function all();", "public static function all();", "public static function all();", "public function getAllValues();", "function getRegions() {\n $query = \" SELECT ID,Name,CityID FROM #__ssregions \";\n $this->_db->setQuery($query);\n return $this->_db->loadAssocList();\n }", "public function getRegistryRequests()\n {\n return array_filter(array_keys(get_object_vars($this)), array($this, '_filterRequestNames'));\n }", "public function getRegisteredResources()\n {\n $result = array();\n foreach ($this->getResourcesTypes() as $type) {\n $result[$type] = $this->getRegisteredResourcesByType($type);\n }\n\n return $result;\n }", "public function listRegistry($include_entries = false)\n\t{\n\t\tif ($include_entries == true) {\n\t\t\techo '<pre>';\n\t\t\tvar_dump($this->registryKeys);\n\t\t\techo '</pre>';\n\n\t\t\treturn;\n\t\t}\n\n\t\techo '<pre>';\n\t\tvar_dump($this->registry);\n\t\techo '</pre>';\n\n\t\treturn;\n\t}", "public static function &all(): array\n\t{\n\t\treturn static::$config;\n\t}", "public function all() : array\n {\n return $this->container();\n }", "public function all()\n {\n return $this->service->all();\n }", "function all()\n\t{\n\t\treturn $this->_data;\n\t}", "public function get_all ();", "function get_all()\n\t\t\t{\n\t\t\t\treturn $this->db->order_by('registerDate DESC')->get('cabal_hackuser_list');\n\t\t\t}", "public function getParameterRegistry();", "public function getAll()\n {\n return $this->_combined;\n }", "public static function getAll(){\n\t\treturn self::$components;\n\t}", "public function getAll(): array\n {\n return $this->variables;\n }", "public function all()\n\t{\n\t\treturn $this->data;\n\t}", "public function all()\n\t{\n\t\treturn $this->data;\n\t}", "public function all()\n\t{\n\t\treturn $this->data;\n\t}", "public function getAll() {\n $data=[];\n\n foreach($this->settings AS $name=>$value) {\n $data[$name]=$this->get($name);\n }\n\n return $data;\n }", "public function all() {\n\t\treturn $this->data;\n\t}", "public function getAll()\n\t{\n\t\treturn $this->data;\n\t}", "public function all()\n {\n return $this->getArray('');\n }", "public function all()\n\t{\n\t\treturn $this->stack;\n\t}", "public function all(){\n return call_user_func_array($this->fetchStaticClassName() . '::' . __FUNCTION__, func_get_args());\n }", "public function getAll() {\n\t\treturn $this->data;\n\t}", "public function getAll()\n {\n if (!isset($this->data)) {\n $this->init();\n }\n\n return $this->data;\n }", "public function getReguData()\n\t{\n\t\t$this->db->select('id');\n\t\t$this->db->from('regu');\n\t\t$this->db->where('user_id', $this->session->userdata('id'));\n\t\t$this->db->order_by('id', 'ASC');\n\t\treturn $this->db->get()->result_array();\n\t}", "public function get_all(): array\n {\n return $this->nodes;\n }", "public function register()\n {\n return array(\\T_EMPTY);\n }", "public function dump()\n {\n return $this->registry;\n }", "abstract protected function getList(CashRegister $register);", "function getAll()\r\n {\r\n\r\n }", "public function all()\n {\n return $this->driver->all();\n }", "function get_cuentas_registro_all() {\n $this->db->select();\n $this->db->from(\"cuentas_registro\");\n $query = $this->db->get();\n \n if ($query->num_rows() > 0) return $query;\n return NULL;\n }" ]
[ "0.73411006", "0.7172164", "0.71718735", "0.6765037", "0.66621834", "0.65668947", "0.6514394", "0.6473284", "0.6411786", "0.63999546", "0.63980967", "0.63779503", "0.6104313", "0.6034639", "0.6034099", "0.6002423", "0.5978554", "0.59603757", "0.5959748", "0.59521896", "0.5950656", "0.5950656", "0.59464014", "0.5899188", "0.5898618", "0.589183", "0.589183", "0.589183", "0.589183", "0.589183", "0.589183", "0.589183", "0.589183", "0.589183", "0.589183", "0.589183", "0.589183", "0.589183", "0.589183", "0.589183", "0.589183", "0.58885", "0.5887396", "0.58772135", "0.587712", "0.58456665", "0.5812697", "0.5800296", "0.5797556", "0.57947606", "0.5789171", "0.5787146", "0.5785162", "0.5785162", "0.578031", "0.5775908", "0.5774548", "0.577199", "0.5763485", "0.5753016", "0.57249165", "0.5715483", "0.57123774", "0.5695014", "0.56926227", "0.56926227", "0.56926227", "0.56869715", "0.5682423", "0.5666241", "0.5661139", "0.5645043", "0.5641594", "0.5637173", "0.5633387", "0.5630379", "0.56284845", "0.56282306", "0.5621615", "0.56150144", "0.5614558", "0.56014526", "0.56004226", "0.56004226", "0.56004226", "0.55983865", "0.5596778", "0.5589142", "0.55886483", "0.558489", "0.5581713", "0.558143", "0.55743635", "0.5572928", "0.5568825", "0.5567594", "0.55619943", "0.55611664", "0.5550041", "0.5536601", "0.5536168" ]
0.0
-1
Create a new controller instance.
public function __construct() { $this->middleware('auth'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function createController()\n {\n $this->createClass('controller');\n }", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->getNameInput()));\n\n $modelName = $this->qualifyClass('Models/'.$this->getNameInput());\n\n $this->call('make:controller', array_filter([\n 'name' => \"{$controller}Controller\",\n '--model' => $modelName,\n '--api' => true,\n ]));\n }", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n $model_name = $this->qualifyClass($this->getNameInput());\n $name = Str::contains($model_name, ['\\\\']) ? Str::afterLast($model_name, '\\\\') : $model_name;\n\n $this->call('make:controller', [\n 'name' => \"{$controller}Controller\",\n '--model' => $model_name,\n ]);\n\n $path = base_path() . \"/app/Http/Controllers/{$controller}Controller.php\";\n $this->cleanupDummy($path, $name);\n }", "private function makeInitiatedController()\n\t{\n\t\t$controller = new TestEntityCRUDController();\n\n\t\t$controller->setLoggerWrapper(Logger::create());\n\n\t\treturn $controller;\n\t}", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n\n $modelName = $this->qualifyClass($this->getNameInput());\n\n $this->call(ControllerMakeCommand::class, array_filter([\n 'name' => \"{$controller}/{$controller}Controller\",\n '--model' => $this->option('resource') || $this->option('api') ? $modelName : null,\n ]));\n\n $this->call(ControllerMakeCommand::class, array_filter([\n 'name' => \"Api/{$controller}/{$controller}Controller\",\n '--model' => $this->option('resource') || $this->option('api') ? $modelName : null,\n '--api' => true,\n ]));\n }", "protected function createController()\n {\n $name = str_replace(\"Service\",\"\",$this->argument('name'));\n\n $this->call('make:controller', [\n 'name' => \"{$name}Controller\"\n ]);\n }", "protected function createController()\n {\n $params = [\n 'name' => $this->argument('name'),\n ];\n\n if ($this->option('api')) {\n $params['--api'] = true;\n }\n\n $this->call('wizard:controller', $params);\n }", "public function generateController () {\r\n $controllerParam = \\app\\lib\\router::getPath();\r\n $controllerName = \"app\\controller\\\\\" . end($controllerParam);\r\n $this->controller = new $controllerName;\r\n }", "public static function newController($controller)\n\t{\n\t\t$objController = \"App\\\\Controllers\\\\\".$controller;\n\t\treturn new $objController;\n\t}", "public function createController()\n\t{\n\t\tif(class_exists($this->controller))\n\t\t{\n\t\t\t// get the parent class he extends\n\t\t\t$parents = class_parents($this->controller);\n\n\t\t\t// $parents = class_implements($this->controller); used if our Controller was just an interface not a class\n\n\t\t\t// check if the class implements our Controller Class\n\t\t\tif(in_array(\"Controller\", $parents))\n\t\t\t{\n\t\t\t\t// check if the action in the request exists in that class\n\t\t\t\tif(method_exists($this->controller, $this->action))\n\t\t\t\t{\n\t\t\t\t\treturn new $this->controller($this->action, $this->request);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// Action is not exist\n\t\t\t\t\techo 'Method '. $this->action .' doesn\\'t exist in '. $this->controller;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// The controller doesn't extends our Controller Class\n\t\t\t\techo $this->controller.' doesn\\'t extends our Controller Class';\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Controller Doesn't exist\n\t\t\techo $this->controller.' doesn\\'t exist';\n\t\t}\n\t}", "public function createController( ezcMvcRequest $request );", "public function createController() {\n //check our requested controller's class file exists and require it if so\n /*if (file_exists(__DIR__ . \"/../Controllers/\" . $this->controllerName . \".php\")) {\n require(__DIR__ . \"/../Controllers/\" . $this->controllerName . \".php\");\n } else {\n throw new Exception('Route does not exist');\n }*/\n\n try {\n require_once __DIR__ . '/../Controllers/' . $this->controllerName . '.php';\n } catch (Exception $e) {\n return $e;\n }\n \n //does the class exist?\n if (class_exists($this->controllerClass)) {\n $parents = class_parents($this->controllerClass);\n \n //does the class inherit from the BaseController class?\n if (in_array(\"BaseController\",$parents)) { \n //does the requested class contain the requested action as a method?\n if (method_exists($this->controllerClass, $this->endpoint)) {\n return new $this->controllerClass($this->args, $this->endpoint, $this->domain);\n } else {\n throw new Exception('Action does not exist');\n }\n } else {\n throw new Exception('Class does not inherit correctly.');\n }\n } else {\n throw new Exception('Controller does not exist.');\n }\n }", "public static function create()\n\t{\n\t\t//check, if a JobController instance already exists\n\t\tif(JobController::$jobController == null)\n\t\t{\n\t\t\tJobController::$jobController = new JobController();\n\t\t}\n\n\t\treturn JobController::$jobController;\n\t}", "private function controller()\n {\n $location = $this->args[\"location\"] . DIRECTORY_SEPARATOR . 'controllers' . DIRECTORY_SEPARATOR;\n $relative_location = $this->args['application_folder'] . DIRECTORY_SEPARATOR . 'controllers' . DIRECTORY_SEPARATOR;\n\n if (!empty($this->args['subdirectories']))\n {\n $location .= $this->args['subdirectories'] . DIRECTORY_SEPARATOR;\n $relative_location .= $this->args['subdirectories'] . DIRECTORY_SEPARATOR;\n }\n\n if (!is_dir($location))\n {\n mkdir($location, 0755, TRUE);\n }\n\n $relative_location .= $this->args['filename'];\n $filename = $location . $this->args['filename'];\n\n $args = array(\n \"class_name\" => ApplicationHelpers::camelize($this->args['name']),\n \"filename\" => $this->args['filename'],\n \"application_folder\" => $this->args['application_folder'],\n \"parent_class\" => (isset($this->args['parent'])) ? $this->args['parent'] : $this->args['parent_controller'],\n \"extra\" => $this->extra,\n 'relative_location' => $relative_location,\n 'helper_name' => strtolower($this->args['name']) . '_helper',\n );\n\n $template = new TemplateScanner(\"controller\", $args);\n $controller = $template->parse();\n\n $message = \"\\t\";\n if (file_exists($filename))\n {\n $message .= 'Controller already exists : ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'light_blue');\n }\n $message .= $relative_location;\n }\n elseif (file_put_contents($filename, $controller))\n {\n $message .= 'Created controller: ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'green');\n }\n $message .= $relative_location;\n }\n else\n {\n $message .= 'Unable to create controller: ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'red');\n }\n $message .= $relative_location;\n }\n\n // The controller has been generated, output the confirmation message\n fwrite(STDOUT, $message . PHP_EOL);\n\n // Create the helper files.\n $this->helpers();\n\n $this->assets();\n\n // Create the view files.\n $this->views();\n\n return;\n }", "public function createController( $controllerName ) {\r\n\t\t$refController \t\t= $this->instanceOfController( $controllerName );\r\n\t\t$refConstructor \t= $refController->getConstructor();\r\n\t\tif ( ! $refConstructor ) return $refController->newInstance();\r\n\t\t$initParameter \t\t= $this->setParameter( $refConstructor );\r\n\t\treturn $refController->newInstanceArgs( $initParameter ); \r\n\t}", "public function create($controllerName) {\r\n\t\tif (!$controllerName)\r\n\t\t\t$controllerName = $this->defaultController;\r\n\r\n\t\t$controllerName = ucfirst(strtolower($controllerName)).'Controller';\r\n\t\t$controllerFilename = $this->searchDir.'/'.$controllerName.'.php';\r\n\r\n\t\tif (preg_match('/[^a-zA-Z0-9]/', $controllerName))\r\n\t\t\tthrow new Exception('Invalid controller name', 404);\r\n\r\n\t\tif (!file_exists($controllerFilename)) {\r\n\t\t\tthrow new Exception('Controller not found \"'.$controllerName.'\"', 404);\r\n\t\t}\r\n\r\n\t\trequire_once $controllerFilename;\r\n\r\n\t\tif (!class_exists($controllerName) || !is_subclass_of($controllerName, 'Controller'))\r\n\t\t\tthrow new Exception('Unknown controller \"'.$controllerName.'\"', 404);\r\n\r\n\t\t$this->controller = new $controllerName();\r\n\t\treturn $this;\r\n\t}", "private function createController($controllerName)\n {\n $className = ucfirst($controllerName) . 'Controller';\n ${$this->lcf($controllerName) . 'Controller'} = new $className();\n return ${$this->lcf($controllerName) . 'Controller'};\n }", "public function createControllerObject(string $controller)\n {\n $this->checkControllerExists($controller);\n $controller = $this->ctlrStrSrc.$controller;\n $controller = new $controller();\n return $controller;\n }", "public function create_controller($controller, $action){\n\t $creado = false;\n\t\t$controllers_dir = Kumbia::$active_controllers_dir;\n\t\t$file = strtolower($controller).\"_controller.php\";\n\t\tif(file_exists(\"$controllers_dir/$file\")){\n\t\t\tFlash::error(\"Error: El controlador '$controller' ya existe\\n\");\n\t\t} else {\n\t\t\tif($this->post(\"kind\")==\"applicationcontroller\"){\n\t\t\t\t$filec = \"<?php\\n\t\t\t\\n\tclass \".ucfirst($controller).\"Controller extends ApplicationController {\\n\\n\\t\\tfunction $action(){\\n\\n\\t\\t}\\n\\n\t}\\n\t\\n?>\\n\";\n\t\t\t\tif(@file_put_contents(\"$controllers_dir/$file\", $filec)){\n\t\t\t\t $creado = true;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$filec = \"<?php\\n\t\t\t\\n\tclass \".ucfirst($controller).\"Controller extends StandardForm {\\n\\n\\t\\tpublic \\$scaffold = true;\\n\\n\\t\\tpublic function __construct(){\\n\\n\\t\\t}\\n\\n\t}\\n\t\\n?>\\n\";\n\t\t\t\tfile_put_contents(\"$controllers_dir/$file\", $filec);\n\t\t\t\tif($this->create_model($controller, $controller, \"index\")){\n\t\t\t\t $creado = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($creado){\n\t\t\t Flash::success(\"Se cre&oacute; correctamente el controlador '$controller' en '$controllers_dir/$file'\");\n\t\t\t}else {\n\t\t\t Flash::error(\"Error: No se pudo escribir en el directorio, verifique los permisos sobre el directorio\");\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t$this->route_to(\"controller: $controller\", \"action: $action\");\n\t}", "private function instanceController( string $controller_class ): Controller {\n\t\treturn new $controller_class( $this->request, $this->site );\n\t}", "public function makeController($controller_name)\n\t{\n\t\t$model\t= $this->_makeModel($controller_name, $this->_storage_type);\n\t\t$view\t= $this->_makeView($controller_name);\n\t\t\n\t\treturn new $controller_name($model, $view);\n\t}", "public function create()\n {\n $output = new \\Symfony\\Component\\Console\\Output\\ConsoleOutput();\n $output->writeln(\"<info>Controller Create</info>\");\n }", "protected function createDefaultController() {\n Octopus::requireOnce($this->app->getOption('OCTOPUS_DIR') . 'controllers/Default.php');\n return new DefaultController();\n }", "private function createControllerDefinition()\n {\n $id = $this->getServiceId('controller');\n if (!$this->container->has($id)) {\n $definition = new Definition($this->getServiceClass('controller'));\n $definition\n ->addMethodCall('setConfiguration', [new Reference($this->getServiceId('configuration'))])\n ->addMethodCall('setContainer', [new Reference('service_container')])\n ;\n $this->container->setDefinition($id, $definition);\n }\n }", "public function createController( $ctrlName, $action ) {\n $args['action'] = $action;\n $args['path'] = $this->path . '/modules/' . $ctrlName;\n $ctrlFile = $args['path'] . '/Controller.php';\n // $args['moduleName'] = $ctrlName;\n if ( file_exists( $ctrlFile ) ) {\n $ctrlPath = str_replace( CITRUS_PATH, '', $args['path'] );\n $ctrlPath = str_replace( '/', '\\\\', $ctrlPath ) . '\\Controller';\n try { \n $r = new \\ReflectionClass( $ctrlPath ); \n $inst = $r->newInstanceArgs( $args ? $args : array() );\n\n $this->controller = Citrus::apply( $inst, Array( \n 'name' => $ctrlName, \n ) );\n if ( $this->controller->is_protected == null ) {\n $this->controller->is_protected = $this->is_protected;\n }\n return $this->controller;\n } catch ( \\Exception $e ) {\n prr($e, true);\n }\n } else {\n return false;\n }\n }", "protected function createTestController() {\n\t\t$controller = new CController('test');\n\n\t\t$action = $this->getMock('CAction', array('run'), array($controller, 'test'));\n\t\t$controller->action = $action;\n\n\t\tYii::app()->controller = $controller;\n\t\treturn $controller;\n\t}", "public static function newController($controllerName, $params = [], $request = null) {\n\n\t\t$controller = \"App\\\\Controllers\\\\\".$controllerName;\n\n\t\treturn new $controller($params, $request);\n\n\t}", "private function loadController() : void\n\t{\n\t\t$this->controller = new $this->controllerName($this->request);\n\t}", "public function createController($pi, array $params)\n {\n $class = $pi . '_Controller_' . ucfirst($params['page']);\n\n return new $class();\n }", "public function createController() {\n //check our requested controller's class file exists and require it if so\n \n if (file_exists(\"modules/\" . $this->controllerName . \"/controllers/\" . $this->controllerName .\".php\" ) && $this->controllerName != 'error') {\n require(\"modules/\" . $this->controllerName . \"/controllers/\" . $this->controllerName .\".php\");\n \n } else {\n \n $this->urlValues['controller'] = \"error\";\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"badurl\", $this->urlValues);\n }\n\n //does the class exist?\n if (class_exists($this->controllerClass)) {\n $parents = class_parents($this->controllerClass);\n //does the class inherit from the BaseController class?\n if (in_array(\"BaseController\", $parents)) {\n //does the requested class contain the requested action as a method?\n if (method_exists($this->controllerClass, $this->action)) { \n return new $this->controllerClass($this->action, $this->urlValues);\n \n } else {\n //bad action/method error\n $this->urlValues['controller'] = \"error\";\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"badview\", $this->urlValues);\n }\n } else {\n $this->urlValues['controller'] = \"error\";\n //bad controller error\n echo \"hjh\";\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"b\", $this->urlValues);\n }\n } else {\n \n //bad controller error\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"badurl\", $this->urlValues);\n }\n }", "protected static function createController($name) {\n $result = null;\n\n $name = self::$_namespace . ($name ? $name : self::$defaultController) . 'Controller';\n if(class_exists($name)) {\n $controllerClass = new \\ReflectionClass($name);\n if($controllerClass->hasMethod('run')) {\n $result = new $name();\n }\n }\n\n return $result;\n }", "public function createController(): void\n {\n $minimum_buffer_min = 3;\n $token_ok = $this->routerService->ds_token_ok($minimum_buffer_min);\n if ($token_ok) {\n # 2. Call the worker method\n # More data validation would be a good idea here\n # Strip anything other than characters listed\n $results = $this->worker($this->args);\n\n if ($results) {\n # Redirect the user to the NDSE view\n # Don't use an iFrame!\n # State can be stored/recovered using the framework's session or a\n # query parameter on the returnUrl\n header('Location: ' . $results[\"redirect_url\"]);\n exit;\n }\n } else {\n $this->clientService->needToReAuth($this->eg);\n }\n }", "protected function createController($controllerClass)\n {\n $cls = new ReflectionClass($controllerClass);\n return $cls->newInstance($this->environment);\n }", "protected function createController($name)\n {\n $controllerClass = 'controller\\\\'.ucfirst($name).'Controller';\n\n if(!class_exists($controllerClass)) {\n throw new \\Exception('Controller class '.$controllerClass.' not exists!');\n }\n\n return new $controllerClass();\n }", "protected function initController() {\n\t\tif (!isset($_GET['controller'])) {\n\t\t\t$this->initDefaultController();\n\t\t\treturn;\n\t\t}\n\t\t$controllerClass = $_GET['controller'].\"Controller\";\n\t\tif (!class_exists($controllerClass)) {\n\t\t\t//Console::error(@$_GET['controller'].\" doesn't exist\");\n\t\t\t$this->initDefaultController();\n\t\t\treturn;\n\t\t}\n\t\t$this->controller = new $controllerClass();\n\t}", "public function makeTestController(TestController $controller)\r\n\t{\r\n\t}", "static function factory($GET=array(), $POST=array(), $FILES=array()) {\n $type = (isset($GET['type'])) ? $GET['type'] : '';\n $objectController = $type.'_Controller';\n $addLocation = $type.'/'.$objectController.'.php';\n foreach ($_ENV['locations'] as $location) {\n if (is_file($location.$addLocation)) {\n return new $objectController($GET, $POST, $FILES);\n } \n }\n throw new Exception('The controller \"'.$type.'\" does not exist.');\n }", "public function create()\n {\n $general = new ModeloController();\n\n return $general->create();\n }", "public function makeController($controllerNamespace, $controllerName, Log $log, $session, Request $request, Response $response)\r\n\t{\r\n\t\t$fullControllerName = '\\\\Application\\\\Controller\\\\' . (!empty($controllerNamespace) ? $controllerNamespace . '\\\\' : '') . $controllerName;\r\n\t\t$controller = new $fullControllerName();\r\n\t\t$controller->setConfig($this->config);\r\n\t\t$controller->setRequest($request);\r\n\t\t$controller->setResponse($response);\r\n\t\t$controller->setLog($log);\r\n\t\tif (isset($session))\r\n\t\t{\r\n\t\t\t$controller->setSession($session);\r\n\t\t}\r\n\r\n\t\t// Execute additional factory method, if available (exists in \\Application\\Controller\\Factory)\r\n\t\t$method = 'make' . $controllerName;\r\n\t\tif (is_callable(array($this, $method)))\r\n\t\t{\r\n\t\t\t$this->$method($controller);\r\n\t\t}\r\n\r\n\t\t// If the controller has an init() method, call it now\r\n\t\tif (is_callable(array($controller, 'init')))\r\n\t\t{\r\n\t\t\t$controller->init();\r\n\t\t}\r\n\r\n\t\treturn $controller;\r\n\t}", "public static function create()\n\t{\n\t\t//check, if an AccessGroupController instance already exists\n\t\tif(AccessGroupController::$accessGroupController == null)\n\t\t{\n\t\t\tAccessGroupController::$accessGroupController = new AccessGroupController();\n\t\t}\n\n\t\treturn AccessGroupController::$accessGroupController;\n\t}", "public static function buildController()\n\t{\n\t\t$file = CONTROLLER_PATH . 'indexController.class.php';\n\n\t\tif(!file_exists($file))\n\t\t{\n\t\t\tif(\\RCPHP\\Util\\Check::isClient())\n\t\t\t{\n\t\t\t\t$controller = '<?php\nclass indexController extends \\RCPHP\\Controller {\n public function index(){\n echo \"Welcome RcPHP!\\n\";\n }\n}';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$controller = '<?php\nclass indexController extends \\RCPHP\\Controller {\n public function index(){\n echo \\'<style type=\"text/css\">*{ padding: 0; margin: 0; } div{ padding: 4px 48px;} body{ background: #fff; font-family: \"微软雅黑\"; color: #333;} h1{ font-size: 100px; font-weight: normal; margin-bottom: 12px; } p{ line-height: 1.8em; font-size: 36px }</style><div style=\"padding: 24px 48px;\"> <h1>:)</h1><p>Welcome <b>RcPHP</b>!</p></div>\\';\n }\n}';\n\t\t\t}\n\t\t\tfile_put_contents($file, $controller);\n\t\t}\n\t}", "public function getController( );", "public static function getInstance() : Controller {\n if ( null === self::$instance ) {\n self::$instance = new self();\n self::$instance->options = new Options(\n self::OPTIONS_KEY\n );\n }\n\n return self::$instance;\n }", "static function appCreateController($entityName, $prefijo = '') {\n\n $controller = ControllerBuilder::getController($entityName, $prefijo);\n $entityFile = ucfirst(str_replace($prefijo, \"\", $entityName));\n $fileController = \"../../modules/{$entityFile}/{$entityFile}Controller.class.php\";\n\n $result = array();\n $ok = self::createArchive($fileController, $controller);\n ($ok) ? array_push($result, \"Ok, {$fileController} created\") : array_push($result, \"ERROR creating {$fileController}\");\n\n return $result;\n }", "public static function newInstance($path = \\simpleChat\\Utility\\ROOT_PATH)\n {\n $request = new Request();\n \n \n if ($request->isAjax())\n {\n return new AjaxController();\n }\n else if ($request->jsCode())\n {\n return new JsController();\n }\n else\n {\n return new StandardController($path);\n }\n }", "private function createInstance()\n {\n $objectManager = new \\Magento\\Framework\\TestFramework\\Unit\\Helper\\ObjectManager($this);\n $this->controller = $objectManager->getObject(\n \\Magento\\NegotiableQuote\\Controller\\Adminhtml\\Quote\\RemoveFailedSku::class,\n [\n 'context' => $this->context,\n 'logger' => $this->logger,\n 'messageManager' => $this->messageManager,\n 'cart' => $this->cart,\n 'resultRawFactory' => $this->resultRawFactory\n ]\n );\n }", "function loadController(){\n $name = ucfirst($this->request->controller).'Controller' ;\n $file = ROOT.DS.'Controller'.DS.$name.'.php' ;\n /*if(!file_exists($file)){\n $this->error(\"Le controleur \".$this->request->controller.\" n'existe pas\") ;\n }*/\n require_once $file;\n $controller = new $name($this->request);\n return $controller ;\n }", "public function __construct(){\r\n $app = Application::getInstance();\r\n $this->_controller = $app->getController();\r\n }", "public static function & instance()\n {\n if (self::$instance === null) {\n Benchmark::start(SYSTEM_BENCHMARK.'_controller_setup');\n\n // Include the Controller file\n require Router::$controller_path;\n\n try {\n // Start validation of the controller\n $class = new ReflectionClass(ucfirst(Router::$controller).'_Controller');\n } catch (ReflectionException $e) {\n // Controller does not exist\n Event::run('system.404');\n }\n\n if ($class->isAbstract() or (IN_PRODUCTION and $class->getConstant('ALLOW_PRODUCTION') == false)) {\n // Controller is not allowed to run in production\n Event::run('system.404');\n }\n\n // Run system.pre_controller\n Event::run('system.pre_controller');\n\n // Create a new controller instance\n $controller = $class->newInstance();\n\n // Controller constructor has been executed\n Event::run('system.post_controller_constructor');\n\n try {\n // Load the controller method\n $method = $class->getMethod(Router::$method);\n\n // Method exists\n if (Router::$method[0] === '_') {\n // Do not allow access to hidden methods\n Event::run('system.404');\n }\n\n if ($method->isProtected() or $method->isPrivate()) {\n // Do not attempt to invoke protected methods\n throw new ReflectionException('protected controller method');\n }\n\n // Default arguments\n $arguments = Router::$arguments;\n } catch (ReflectionException $e) {\n // Use __call instead\n $method = $class->getMethod('__call');\n\n // Use arguments in __call format\n $arguments = array(Router::$method, Router::$arguments);\n }\n\n // Stop the controller setup benchmark\n Benchmark::stop(SYSTEM_BENCHMARK.'_controller_setup');\n\n // Start the controller execution benchmark\n Benchmark::start(SYSTEM_BENCHMARK.'_controller_execution');\n\n // Execute the controller method\n $method->invokeArgs($controller, $arguments);\n\n // Controller method has been executed\n Event::run('system.post_controller');\n\n // Stop the controller execution benchmark\n Benchmark::stop(SYSTEM_BENCHMARK.'_controller_execution');\n }\n\n return self::$instance;\n }", "protected function instantiateController($class)\n {\n $controller = new $class();\n\n if ($controller instanceof Controller) {\n $controller->setContainer($this->container);\n }\n\n return $controller;\n }", "public function __construct (){\n $this->AdminController = new AdminController();\n $this->ArticleController = new ArticleController();\n $this->AuditoriaController = new AuditoriaController();\n $this->CommentController = new CommentController();\n $this->CourseController = new CourseController();\n $this->InscriptionsController = new InscriptionsController();\n $this->ModuleController = new ModuleController();\n $this->PlanController = new PlanController();\n $this->ProfileController = new ProfileController();\n $this->SpecialtyController = new SpecialtyController();\n $this->SubscriptionController = new SubscriptionController();\n $this->TeacherController = new TeacherController();\n $this->UserController = new UserController();\n $this->WebinarController = new WebinarController();\n }", "protected function makeController($prefix)\n {\n new MakeController($this, $this->files, $prefix);\n }", "public function createController($route)\n {\n $controller = parent::createController('gymv/' . $route);\n return $controller === false\n ? parent::createController($route)\n : $controller;\n }", "public static function createFrontController()\n {\n return self::createInjectorWithBindings(self::extractArgs(func_get_args()))\n ->getInstance('net::stubbles::websites::stubFrontController');\n }", "public static function controller($name)\n {\n $name = ucfirst(strtolower($name));\n \n $directory = 'controller';\n $filename = $name;\n $tracker = 'controller';\n $init = (boolean) $init;\n $namespace = 'controller';\n $class_name = $name;\n \n return self::_load($directory, $filename, $tracker, $init, $namespace, $class_name);\n }", "protected static function instantiateMockController()\n {\n /** @var Event $oEvent */\n $oEvent = Factory::service('Event');\n\n if (!$oEvent->hasBeenTriggered(Events::SYSTEM_STARTING)) {\n\n require_once BASEPATH . 'core/Controller.php';\n\n load_class('Output', 'core');\n load_class('Security', 'core');\n load_class('Input', 'core');\n load_class('Lang', 'core');\n\n new NailsMockController();\n }\n }", "private static function controller()\n {\n $files = ['Controller'];\n $folder = static::$root.'MVC'.'/';\n\n self::call($files, $folder);\n }", "public function createController()\n\t{\n\t\t$originalFile = app_path('Http/Controllers/Reports/SampleReport.php');\n\t\t$newFile = dirname($originalFile) . DIRECTORY_SEPARATOR . $this->class . $this->sufix . '.php';\n\n\t\t// Read original file\n\t\tif( ! $content = file_get_contents($originalFile))\n\t\t\treturn false;\n\n\t\t// Replace class name\n\t\t$content = str_replace('SampleReport', $this->class . $this->sufix, $content);\n\n\t\t// Write new file\n\t\treturn (bool) file_put_contents($newFile, $content);\n\t}", "public function runController() {\n // Check for a router\n if (is_null($this->getRouter())) {\n \t // Set the method to load\n \t $sController = ucwords(\"{$this->getController()}Controller\");\n } else {\n\n // Set the controller with the router\n $sController = ucwords(\"{$this->getController()}\".ucfirst($this->getRouter()).\"Controller\");\n }\n \t// Check for class\n \tif (class_exists($sController, true)) {\n \t\t// Set a new instance of Page\n \t\t$this->setPage(new Page());\n \t\t// The class exists, load it\n \t\t$oController = new $sController();\n\t\t\t\t// Now check for the proper method \n\t\t\t\t// inside of the controller class\n\t\t\t\tif (method_exists($oController, $this->loadConfigVar('systemSettings', 'controllerLoadMethod'))) {\n\t\t\t\t\t// We have a valid controller, \n\t\t\t\t\t// execute the initializer\n\t\t\t\t\t$oController->init($this);\n\t\t\t\t\t// Set the variable scope\n\t \t\t$this->setViewScope($oController);\n\t \t\t// Render the layout\n\t \t\t$this->renderLayout();\n\t\t\t\t} else {\n\t\t\t\t\t// The initializer does not exist, \n\t\t\t\t\t// which means an invalid controller, \n\t\t\t\t\t// so now we let the caller know\n\t\t\t\t\t$this->setError($this->loadConfigVar('errorMessages', 'invalidController'));\n\t\t\t\t\t// Run the error\n\t\t\t\t\t// $this->runError();\n\t\t\t\t}\n \t// The class does not exist\n \t} else {\n\t\t\t\t// Set the system error\n\t \t\t$this->setError(\n\t\t\t\t\tstr_replace(\n\t\t\t\t\t\t':controllerName', \n\t\t\t\t\t\t$sController, \n\t\t\t\t\t\t$this->loadConfigVar(\n\t\t\t\t\t\t\t'errorMessages', \n\t\t\t\t\t\t\t'controllerDoesNotExist'\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t);\n \t\t// Run the error\n\t\t\t\t// $this->runError();\n \t}\n \t// Return instance\n \treturn $this;\n }", "public function controller()\n\t{\n\t\n\t}", "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
Show the application dashboard.
public function index() { return view('post-ad'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function dashboard()\n {\n\n $pageData = (new DashboardService())->handleDashboardLandingPage();\n\n return view('application', $pageData);\n }", "function dashboard() {\r\n\t\t\tTrackTheBookView::render('dashboard');\r\n\t\t}", "public function showDashboard() { \n\t\n return View('admin.dashboard');\n\t\t\t\n }", "public function showDashboard()\n {\n return View::make('users.dashboard', [\n 'user' => Sentry::getUser(),\n ]);\n }", "public function dashboard()\n {\n return view('backend.dashboard.index');\n }", "public function index() {\n return view(\"admin.dashboard\");\n }", "public function dashboard()\n {\n return $this->renderContent(\n view('dashboard'),\n trans('sleeping_owl::lang.dashboard')\n );\n }", "public function dashboard(){\n return view('backend.admin.index');\n }", "public function showDashBoard()\n {\n \treturn view('Admins.AdminDashBoard');\n }", "public function dashboard()\n {\n return view('dashboard.index');\n }", "public function index()\n {\n return view('admin.dashboard', ['title' => 'Dashboard']);\n }", "public function dashboard() \r\n {\r\n return view('admin.index');\r\n }", "public function dashboard()\n\t{\n\t\t$page_title = 'organizer dashboard';\n\t\treturn View::make('organizer.dashboard',compact('page_title'));\n\t}", "public function dashboard()\n {\n\t\t$traffic = TrafficService::getTraffic();\n\t\t$devices = TrafficService::getDevices();\n\t\t$browsers = TrafficService::getBrowsers();\n\t\t$status = OrderService::getStatus();\n\t\t$orders = OrderService::getOrder();\n\t\t$users = UserService::getTotal();\n\t\t$products = ProductService::getProducts();\n\t\t$views = ProductService::getViewed();\n\t\t$total_view = ProductService::getTotalView();\n\t\t$cashbook = CashbookService::getAccount();\n $stock = StockService::getStock();\n\n return view('backend.dashboard', compact('traffic', 'devices', 'browsers', 'status', 'orders', 'users', 'products', 'views', 'total_view', 'cashbook', 'stock'));\n }", "public function dashboard()\n {\n\n return view('admin.dashboard');\n }", "public function dashboard()\n {\n return view('dashboard');\n }", "public function dashboard()\n {\n return view('dashboard');\n }", "public function dashboard()\n {\n return view('dashboard');\n }", "public function dashboard()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('adm.dashboard');\n }", "public function dashboard()\n {\n $users = \\App\\User::all()->count();\n $roles = \\Spatie\\Permission\\Models\\Role::all()->count();\n $permissions = \\Spatie\\Permission\\Models\\Permission::all()->count();\n $banner = \\App\\Banner::all();\n $categoria = \\App\\Categoria::all();\n $entidadOrganizativa = \\App\\Entidadorganizativa::all();\n $evento = \\App\\Evento::all();\n $fichero = \\App\\Fichero::all();\n $recurso = \\App\\Recurso::all();\n $redsocial = \\App\\Redsocial::all();\n $subcategoria = \\App\\Subcategoria::all();\n $tag = \\App\\Tag::all();\n\n $entities = \\Amranidev\\ScaffoldInterface\\Models\\Scaffoldinterface::all();\n\n return view('scaffold-interface.dashboard.dashboard',\n compact('users', 'roles', 'permissions', 'entities',\n 'banner', 'categoria', 'entidadOrganizativa',\n 'evento', 'fichero', 'recurso', 'redsocial', 'subcategoria', 'tag')\n );\n }", "public function show()\n {\n return view('dashboard');\n }", "public function index()\n\t{\n\t\treturn View::make('dashboard');\n\t}", "public function index() {\n return view('modules.home.dashboard');\n }", "public function show()\n {\n return view('dashboard.dashboard');\n \n }", "public function index()\n {\n return view('admin.dashboard.dashboard');\n\n }", "public function dashboard()\n { \n return view('jobposter.dashboard');\n }", "public function show()\n\t{\n\t\t//\n\t\t$apps = \\App\\application::all();\n\t\treturn view('applications.view', compact('apps'));\n\t}", "public function index()\n {\n return view('pages.admin.dashboard');\n }", "public function indexAction()\n {\n $dashboard = $this->getDashboard();\n\n return $this->render('ESNDashboardBundle::index.html.twig', array(\n 'title' => \"Dashboard\"\n ));\n }", "public function index()\n {\n //\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('admin.dashboard.index');\n }", "public function dashboard()\n {\n return view('pages.backsite.dashboard');\n }", "public function index()\n {\n // return component view('dashboard.index');\n return view('layouts.admin_master');\n }", "public function index()\n {\n\n $no_of_apps = UploadApp::count();\n $no_of_analysis_done = UploadApp::where('isAnalyzed', '1')->count();\n $no_of_visible_apps = AnalysisResult::where('isVisible', '1')->count();\n\n return view('admin.dashboard', compact('no_of_apps', 'no_of_analysis_done', 'no_of_visible_apps'));\n }", "public function getDashboard() {\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('smartcrud.auth.dashboard');\n }", "public function index()\n {\n if($this->isAdmin() == TRUE)\n {\n $this->loadThis();\n }\n $this->global['pageTitle'] = 'Touba : Dashboard';\n \n $this->loadViews(\"dashboard\", $this->global, NULL , NULL);\n }", "public function dashboard() {\n $data = ['title' => 'Dashboard'];\n return view('pages.admin.dashboard', $data)->with([\n 'users' => $this->users,\n 'num_services' => Service::count(),\n 'num_products' => Product::count(),\n ]);\n }", "public function index()\n {\n return view('board.pages.dashboard-board');\n }", "public function index()\n {\n return view('admin::settings.development.dashboard');\n }", "public function index()\n {\n return view('dashboard.dashboard');\n }", "public function show()\n {\n return view('dashboard::show');\n }", "public function adminDash()\n {\n return Inertia::render(\n 'Admin/AdminDashboard', \n [\n 'data' => ['judul' => 'Halaman Admin']\n ]\n );\n }", "public function dashboard()\n {\n return view('Admin.dashboard');\n }", "public function show()\n {\n return view('admins\\auth\\dashboard');\n }", "public function index()\n {\n // Report =============\n\n return view('Admin.dashboard');\n }", "public function index()\n {\n return view('bitaac::account.dashboard');\n }", "public function index()\n { \n return view('admin-views.dashboard');\n }", "public function getDashboard()\n {\n return view('dashboard');\n }", "function showDashboard()\n { \n $logeado = $this->checkCredentials();\n if ($logeado==true)\n $this->view->ShowDashboard();\n else\n $this->view->showLogin();\n }", "public function index()\n { \n $params['crumbs'] = 'Home';\n $params['active'] = 'home';\n \n return view('admin.dashboard.index', $params);\n }", "public function index()\n\t{\n\t\treturn view::make('customer_panel.dashboard');\n\t}", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index() {\n // return view('home');\n return view('admin-layouts.dashboard.dashboard');\n }", "public function index()\r\n {\r\n return view('user.dashboard');\r\n }", "public function index() {\n return view('dashboard', []);\n }", "public function index()\n {\n //\n return view('dashboard.dashadmin', ['page' => 'mapel']);\n }", "public function index()\n {\n return view('back-end.dashboard.index');\n //\n }", "public function index()\n\t{\n\t\t\n\t\t$data = array(\n\t\t\t'title' => 'Administrator Apps With Laravel',\n\t\t);\n\n\t\treturn View::make('panel/index',$data);\n\t}", "public function index() {\n return view('dashboard.index');\n }", "public function index()\n {\n return view('page.dashboard.index');\n }", "public function index()\n {\n\n return view('dashboard');\n }", "public function dashboardview() {\n \n $this->load->model('Getter');\n $data['dashboard_content'] = $this->Getter->get_dash_content();\n \n $this->load->view('dashboardView', $data);\n\n }", "public function index()\n {\n $this->authorize(DashboardPolicy::PERMISSION_STATS);\n\n $this->setTitle($title = trans('auth::dashboard.titles.statistics'));\n $this->addBreadcrumb($title);\n\n return $this->view('admin.dashboard');\n }", "public function action_index()\r\n\t{\t\t\t\t\r\n\t\t$this->template->title = \"Dashboard\";\r\n\t\t$this->template->content = View::forge('admin/dashboard');\r\n\t}", "public function index()\n {\n $info = SiteInfo::limit(1)->first();\n return view('backend.info.dashboard',compact('info'));\n }", "public function display()\n\t{\n\t\t// Set a default view if none exists.\n\t\tif (!JRequest::getCmd( 'view' ) ) {\n\t\t\tJRequest::setVar( 'view', 'dashboard' );\n\t\t}\n\n\t\tparent::display();\n\t}", "public function index()\n {\n $news = News::all();\n $posts = Post::all();\n $events = Event::all();\n $resources = Resources::all();\n $admin = Admin::orderBy('id', 'desc')->get();\n return view('Backend/dashboard', compact('admin', 'news', 'posts', 'events', 'resources'));\n }", "public function index()\n {\n\n return view('superAdmin.adminDashboard')->with('admin',Admininfo::all());\n\n }", "public function index()\n {\n return view('dashboard.index');\n }", "public function index()\n {\n return view('dashboard.index');\n }", "public function index()\n {\n $this->template->set('title', 'Dashboard');\n $this->template->load('admin', 'contents' , 'admin/dashboard/index', array());\n }", "public function index()\n {\n return view('/dashboard');\n }", "public function index()\n {\n \treturn view('dashboard');\n }", "public function index()\n {\n return view('ketua.ketua-dashboard');\n }", "public function index(){\n return View::make('admin.authenticated.dashboardview');\n }", "public function admAmwDashboard()\n {\n return View::make('admission::amw.admission_test.dashboard');\n }", "public function index()\n {\n return view('adminpanel.home');\n }", "public function dashboard()\n\t{\n\t\t$this->validation_access();\n\t\t\n\t\t$this->load->view('user_dashboard/templates/header');\n\t\t$this->load->view('user_dashboard/index.php');\n\t\t$this->load->view('user_dashboard/templates/footer');\n\t}", "public function index()\n {\n return view('dashboard.home');\n }", "public function index()\n {\n $admins = $this->adminServ->all();\n $adminRoles = $this->adminTypeServ->all();\n return view('admin.administrators.dashboard', compact('admins', 'adminRoles'));\n }", "public function index()\n {\n if (ajaxCall::ajax()) {return response()->json($this -> dashboard);}\n //return response()->json($this -> dashboard);\n JavaScript::put($this -> dashboard);\n return view('app')-> with('header' , $this -> dashboard['header']);\n //return view('home');\n }", "public function index()\n {\n $userinfo=User::all();\n $gateinfo=GateEntry::all();\n $yarninfo=YarnStore::all();\n $greyinfo=GreyFabric::all();\n $finishinfo=FinishFabric::all();\n $dyesinfo=DyeChemical::all();\n return view('dashboard',compact('userinfo','gateinfo','yarninfo','greyinfo','finishinfo','dyesinfo'));\n }", "public function actionDashboard(){\n \t$dados_dashboard = Yii::app()->user->getState('dados_dashbord_final');\n \t$this->render ( 'dashboard', $dados_dashboard);\n }", "public function index()\n {\n $user = new User();\n $book = new Book();\n return view('admin.dashboard', compact('user', 'book'));\n }", "public function dashboard() {\n if (!Auth::check()) { // Check is user logged in\n // redirect to dashboard\n return Redirect::to('login');\n }\n\n $user = Auth::user();\n return view('site.dashboard', compact('user'));\n }", "public function dashboard()\n {\n $users = User::all();\n return view('/dashboard', compact('users'));\n }", "public function index()\n {\n $lineChart = $this->getLineChart();\n $barChart = $this->getBarChart();\n $pieChart = $this->getPieChart();\n\n return view('admin.dashboard.index', compact(['lineChart', 'barChart', 'pieChart']));\n }" ]
[ "0.77850926", "0.7760142", "0.7561336", "0.75147176", "0.74653697", "0.7464913", "0.73652893", "0.7351646", "0.7346477", "0.73420244", "0.7326711", "0.7316215", "0.73072463", "0.7287626", "0.72826403", "0.727347", "0.727347", "0.727347", "0.727347", "0.7251768", "0.7251768", "0.7251768", "0.7251768", "0.7251768", "0.7241342", "0.7236133", "0.7235562", "0.7218318", "0.71989936", "0.7197427", "0.71913266", "0.71790016", "0.71684825", "0.71577966", "0.7146797", "0.7133428", "0.7132746", "0.71298903", "0.71249074", "0.71218014", "0.71170413", "0.7110151", "0.7109032", "0.7107029", "0.70974076", "0.708061", "0.7075653", "0.70751685", "0.7064041", "0.70550334", "0.7053102", "0.7051273", "0.70484304", "0.7043605", "0.70393986", "0.70197886", "0.70185125", "0.70139873", "0.700917", "0.700917", "0.700917", "0.700917", "0.700917", "0.700917", "0.700917", "0.700917", "0.6992477", "0.6979631", "0.69741416", "0.69741327", "0.6968815", "0.6968294", "0.69677526", "0.69652885", "0.69586027", "0.6944985", "0.69432825", "0.69419175", "0.6941512", "0.6941439", "0.6938837", "0.6937524", "0.6937456", "0.6937456", "0.69276494", "0.6921651", "0.69074917", "0.69020325", "0.6882262", "0.6869339", "0.6867868", "0.68557185", "0.68479055", "0.684518", "0.68408877", "0.6838798", "0.6833479", "0.6832326", "0.68309164", "0.6826798", "0.6812457" ]
0.0
-1
the message what Cellphone owner sent
public function __construct() { parent::__construct(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getSender();", "function send($mobile, $message);", "private function get_message()\n {\n switch (self::$requestType) {\n case 'payRequest':\n self::$msg = sha1(self::$mid . self::$amount . self::$cac . self::$MsTxnId . self::$firstName . self::$familyName . self::$timeStamp, true);\n break;\n case 'payNote':\n self::$msg = sha1(self::$mid . self::$amount . self::$cac . self::$PspTxnId . self::$MsTxnId . self::$timeStamp . self::$Result, true);\n break;\n }\n }", "public function message()\n {\n return 'BOT と判断された';\n }", "public function message ();", "function getSender(){\n $return = \"\";\n if( $this->FromName != \"\" ) $return .= $this->FromName.\" (\";\n $return .= $this->From;\n if( $this->FromName != \"\" ) $return .= \")\";\n return $return;\n }", "public function message()\n {\n return 'Endereço de email já cadastrado para essa lista.';\n }", "public function message()\n { \n //Se falso retornar mensagem para o usuário\n return 'O cliente deve ser maior de 18 anos.';\n }", "public function message()\n {\n return 'La cuenta debe contar con al menos ' . $this->monto_permitido . ' Bs';\n }", "public function message(): string\n {\n return sprintf('%s在评论中@了你', $this->sender->name);\n }", "public function message()\n {\n if(in_array(self::IS_EXIST_NUMBER,$this->code)){\n return \"le numero de telephone :attribute existe déja\";\n }\n elseif(in_array(self::IS_NOT_NUMERIC,$this->code)){\n return \"les champs de :attribute doit être numerique\";\n }\n else{\n return \"numero de telephone invalide\";\n }\n }", "public function getname(){\n \t//return $this->msg;\n \treturn $this->phone;\n }", "public function message()\n {\n return 'Ya se hizo un registro el día de de hoy.';\n }", "public function broadcastVoiceMessage()\n {\n //return following message\n\n return 'voice message is sent';\n }", "public function message()\n {\n return 'Deze combinatie postcode huisnummer is al in gebruik onder de naam `' . $this->query()->first()->name .'`.';\n }", "public function message()\n {\n return 'Mot cau hoi chi duoc phep co 1 cau tra loi dung';\n }", "public function message()\n {\n return 'A megadott termékkóddal már létezik cikk!';\n }", "public function getSender() {\n\t\treturn $this -> data['sender'];\n\t}", "function reply($id, $mobile, $message, $cost = 0);", "public function message()\n {\n return \"You already have a client with an email of $this->value\";\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 }", "public function getSender(){\n return $this->sender;\n }", "public function getMessFromName ()\n {\n return $this->mess_from_name;\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 }", "abstract public function get_message();", "public function broadcastOn()\n {\n return ['new-message'.$this->for_user_id];\n }", "function getStatusMessage() \r\n\t{\r\n\t\treturn $this->replyString;\r\n\t}", "public function message()\n {\n return $this->mes;\n }", "public function get_msg() {\r\n return $this->msg;\r\n }", "public function getMessage()\n {\n return $this->_clientMessage;\n }", "public function get_raw_message() { return $this->raw_message; }", "public function message()\n {\n return 'This is not a valid Phone number';\n }", "public function message()\n {\n return 'El usuario ingresado debe ser un profesor válido de la universidad.';\n }", "protected abstract function _message();", "public function message()\n {\n if ($this->subject) {\n return \"Facebook {$this->subject->content()}\";\n }\n return false;\n }", "public function message()\n {\n return 'Je potrebné vybrať práve jedno ID z polí: Byt/Dom/Pozemok.';\n }", "public function getMessage()\n {\n $lastMsg = $this->getUpdates();\n if(count($lastMsg))\n {\n $lastMsg = $lastMsg[count($lastMsg) - 1];\n $this->currentChat = $lastMsg['message']['chat']['id'];\n $this->currentMsg = $lastMsg['message'];\n $this->currentMsgId = $lastMsg['message']['message_id'];\n $this->currentUser = $lastMsg['message']['from']['id'];\n $this->messageType = (isset($lastMsg['message']['contact'])) ? 'register' : 'text';\n $this->setLastUpdate($lastMsg['update_id'] + 1);\n }\n else\n {\n $this->currentMsg = array();\n }\n }", "public function send($message, $to_phone);", "public function message()\n {\n return '비밀번호는 영문 대문자, 영문 소문자, 특수 문자, 숫자 각 1개 이상씩 포함해야 합니다.';\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 message()\n {\n return 'Nomor Surat tidak sesuai, atau format tahun salah';\n }", "public function getMessUid ()\n {\n return $this->mess_uid;\n }", "private function getMsg()\n {\n return $this->msg;\n }", "public function sendPhoneVerificationNotification();", "public function message()\n {\n return 'Valor Aprobado y Cotizado no son iguales.';\n }", "public function getRawMessage()\n {\n return $this->phrase->getText();\n }", "private function send_msg() {\r\n }", "public function getMessgae()\n {\n return $this->messgae;\n }", "public function message()\n {\n return \"L'heure de rendez vous est deja prise\";\n }", "public function get_msgnum()\n {\t\t\n return $this->msgnum;\n }", "public function getMsg()\n {\n return $this->msg;\n }", "public function getMsg()\n {\n return $this->msg;\n }", "public function getMobileNumberForSendingOTP()\n {\n return $this->mobile;\n }", "public function get_message()\n {\n return $this->_message;\n }", "public function message()\n {\n return 'The Phone Number does not match the expected format';\n }", "public function message()\n {\n return 'تاریخ معتبر نمی باشد';\n }", "public function getIDsender(){\n return $this->IDsender;\n }", "public function _messageIdForIP(){\n return (date('H:i:s').'T'.date('Y-m-d').'.'.substr(time(),0,3).'@'.$_SERVER['REMOTE_ADDR']);\n }", "public function getMsg()\n {\n return $this->Msg;\n }", "public function sendMessage(){\n\n\n }", "public function message()\n {\n return '请输入正确的物流单号';\n }", "public function routeNotificationForAfricasTalking()\n {\n return $this->phone;\n }", "public function getSentMIMEMessage()\n {\n }", "public function message()\n {\n return 'Mã xác nhận không chính xác hoặc đã hết hạn';\n }", "public function getMessage() {\n\t\treturn preg_replace('%(\\r\\n|\\r|\\n)%', self::$crlf, $this->message . (MAIL_SIGNATURE ? self::$crlf . self::$crlf . MAIL_SIGNATURE : ''));\n\t}", "public function message()\n {\n return '请输入正确的手机号';\n }", "private function retrieveSender() : string {\n\n // Get min & max length of the whole sender information\n $senderInformationLength = $this->getSenderInformationLength();\n\n // Retrieve the sender information from email with regex\n $sender = $this->retrieveInformation($this->currentEmail, [\n self::REGEX_NEEDLE_START_SENDER,\n \".{\" . $senderInformationLength[\"min\"] . \",\" . $senderInformationLength[\"max\"] . \"}\"\n ], true,\"Sender information\",\n self::ATTRIBUTE_RETRIEVAL_SOURCE_NAME, true, 0);\n\n // Return sender information without whitespaces at end and beginning\n return trim($sender);\n }", "function getMessage(){\n\t\t\treturn $this->message;\n\t\t}", "public function message()\n {\n return 'Wprowadzone hasło nie jest poprawne.';\n }", "public function identifySender()\n\t{\n\t\treturn true;\n\t}", "public function messageOwnerAction() {\r\n\r\n //LOGGED IN USER CAN SEND THE MESSAGE\r\n if (!$this->_helper->requireUser()->isValid())\r\n return;\r\n\r\n //GET VIEWER\r\n $viewer = Engine_Api::_()->user()->getViewer();\r\n $viewer_id = $viewer->getIdentity();\r\n\r\n //GET PRODUCT ID AND OBJECT\r\n $wishlist_id = $this->_getParam(\"wishlist_id\");\r\n $wishlist = Engine_Api::_()->getItem('sitestoreproduct_wishlist', $wishlist_id);\r\n\r\n //OWNER CANT SEND A MESSAGE TO HIMSELF\r\n if ($viewer_id == $wishlist->owner_id) {\r\n return $this->_forward('requireauth', 'error', 'core');\r\n }\r\n\r\n //MAKE FORM\r\n $this->view->form = $form = new Messages_Form_Compose();\r\n $form->setDescription('Create your message with the form given below. (This message will be sent to the owner of this Wishlist.)');\r\n $form->removeElement('to');\r\n $form->toValues->setValue(\"$wishlist->owner_id\");\r\n \r\n \r\n if (!Engine_API::_()->seaocore()->checkSitemobileMode('fullsite-mode')) {\r\n $form->removeElement('toValues');\r\n }\r\n //CHECK METHOD/DATA\r\n if (!$this->getRequest()->isPost()) {\r\n return;\r\n }\r\n\r\n $db = Engine_Api::_()->getDbtable('messages', 'messages')->getAdapter();\r\n $db->beginTransaction();\r\n\r\n try {\r\n $values = $this->getRequest()->getPost();\r\n\r\n $form->populate($values);\r\n\r\n $is_error = 0;\r\n if (empty($values['title'])) {\r\n $is_error = 1;\r\n }\r\n\r\n //SENDING MESSAGE\r\n if ($is_error == 1) {\r\n $error = $this->view->translate('Subject is required field !');\r\n $error = Zend_Registry::get('Zend_Translate')->_($error);\r\n\r\n $form->getDecorator('errors')->setOption('escape', false);\r\n $form->addError($error);\r\n return;\r\n }\r\n\r\n $recipients = preg_split('/[,. ]+/', $values['toValues']);\r\n\r\n //LIMIT RECIPIENTS\r\n $recipients = array_slice($recipients, 0, 1000);\r\n\r\n //CLEAN THE RECIPIENTS FOR REPEATING IDS\r\n $recipients = array_unique($recipients);\r\n\r\n //GET USER\r\n $user = Engine_Api::_()->getItem('user', $wishlist->owner_id);\r\n\r\n $wishlist_title = $wishlist->getTitle();\r\n $wishlist_title_with_link = '<a href = http://' . $_SERVER['HTTP_HOST'] . Zend_Controller_Front::getInstance()->getRouter()->assemble(array('wishlist_id' => $wishlist_id, 'slug' => $wishlist->getSlug()), \"sitestoreproduct_wishlist_view\") . \">$wishlist_title</a>\";\r\n\r\n $conversation = Engine_Api::_()->getItemTable('messages_conversation')->send($viewer, $recipients, $values['title'], $values['body'] . \"<br><br>\" . $this->view->translate('This message corresponds to the Wishlist: ') . $wishlist_title_with_link);\r\n\r\n Engine_Api::_()->getDbtable('notifications', 'activity')->addNotification($user, $viewer, $conversation, 'message_new');\r\n\r\n //INCREMENT MESSAGE COUNTER\r\n Engine_Api::_()->getDbtable('statistics', 'core')->increment('messages.creations');\r\n\r\n $db->commit();\r\n\r\n return $this->_forward('success', 'utility', 'core', array(\r\n 'smoothboxClose' => true,\r\n 'parentRefresh' => true,\r\n 'messages' => array(Zend_Registry::get('Zend_Translate')->_('Your message has been sent successfully.'))\r\n ));\r\n } catch (Exception $e) {\r\n $db->rollBack();\r\n throw $e;\r\n }\r\n }", "public function message()\n {\n return '手机验证码 错误。';\n }", "public function message()\n {\n return 'Sorry, Battery ' . $this->serialOne . ' already stored';\n }", "function sen_sms($to,$text)///ส่ง sms\n{ //create client with api key and secret\n $rest = substr($to, 1);\n $client = new Nexmo\\Client(new Nexmo\\Client\\Credentials\\Basic('c21feb7d', 'yrxEwwXERXj8yv7L'));\n $message = $client->message()->send([\n 'to' => '66'.$rest,\n 'from' => 'RFLpang',\n 'text' => $text,\n 'type' => 'unicode'\n ]);\n //array access provides response data\n //echo \"Sent message to \" . $message['to'] . \". Balance is now \" . $message['remaining-balance'] . PHP_EOL;\n\n return \"Sent message to \" . $message['to'] . \". Balance is now \" . $message['remaining-balance'] . PHP_EOL;\n}", "public function get_id_message()\n {\n return $this->id_message;\n }", "private function getMessage(){ \n\t\t\t//return $this->message;\n\t\t //return \"Sample Message\";\n\t\t\t//$msgArray = array(\"s_id\" => \"s_id\",\"u_id\" => \"u_id\",\"status\"=>\"status\");\n\t\t\t//return json_encode($msgArray); \n\t\t\treturn $this->message;\n\t\t\t\n\t\t}", "public function getCallerPhone()\n\t{\n\t\treturn $this->caller_phone;\n\t}", "public function messagefrom($usercheck)\n {\n \t\n\n }", "public function message():string\n {\n return $this->message;\n }", "public function message()\n {\n return 'No tienes cupo disponible para hacer este cambio.';\n }", "function refund_sms_notification_send($tourwise_id)\n{\n $sq_personal_info = mysql_fetch_assoc(mysql_query(\"select mobile_no from traveler_personal_info where tourwise_traveler_id='$tourwise_id'\"));\n $mobile_no = $sq_personal_info['mobile_no'];\n\n $message = \"We are providing the refunds considering your cancellation request of the genuine reason. Pls, contact us for the future journey.\";\n global $model;\n $model->send_message($mobile_no, $message);\n}", "public function message()\n {\n return 'El docente no tiene asignacion para esta asignatura en este grado';\n }", "public function message()\n {\n return 'Mật khẩu bạn đã nhập không chính xác !';\n }", "public function message()\n {\n return 'Este semestre ya se encuentra registrado, puede eliminar o editar el registro.';\n }", "public function message()\n {\n return 'The fields [Team ID, Phone and Sticky Phone Number ID] are required';\n }", "public function getSender()\n {\n return $this->sender;\n }" ]
[ "0.6384896", "0.6372798", "0.62950754", "0.6246455", "0.61813164", "0.6170519", "0.6138022", "0.6094455", "0.6093675", "0.609027", "0.60554165", "0.6049883", "0.6039088", "0.60387176", "0.6021386", "0.5996868", "0.5995525", "0.59379286", "0.5917536", "0.5892812", "0.58845145", "0.58845145", "0.58845145", "0.5880037", "0.5869965", "0.5868991", "0.5868991", "0.58663046", "0.5862807", "0.583886", "0.5838062", "0.583766", "0.58329993", "0.5818579", "0.5817945", "0.5801955", "0.57963556", "0.5784002", "0.5775624", "0.5775599", "0.5759014", "0.5749609", "0.5749432", "0.5749432", "0.5749432", "0.5749432", "0.5749432", "0.5749432", "0.5749432", "0.5749432", "0.5749432", "0.5749432", "0.5749432", "0.5749432", "0.5749432", "0.57361364", "0.57354915", "0.5732016", "0.57265955", "0.57135314", "0.57064486", "0.57047945", "0.5700412", "0.56968874", "0.56902385", "0.5682194", "0.5682194", "0.5682175", "0.56804526", "0.56781316", "0.56703115", "0.565336", "0.5651496", "0.56325275", "0.5632122", "0.56317997", "0.5629485", "0.56281894", "0.5620609", "0.5617577", "0.56135327", "0.56064224", "0.5599687", "0.55966765", "0.5587221", "0.5586878", "0.558013", "0.5580029", "0.5578652", "0.5564477", "0.5559124", "0.5558945", "0.55563366", "0.5548338", "0.5543332", "0.55419415", "0.554107", "0.5538409", "0.5538297", "0.55246377", "0.55207574" ]
0.0
-1
This mutator automatically hashes the password.
public function setPasswordAttribute($value) { $this->attributes['password'] = \Hash::make($value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function hashPassword() {\n\t\t$this->password = Password::hash($this->password);\n\t}", "function hashPassword()\t{\n\t\t$fields = $this->_settings['fields'];\n\t\tif (!isset($this->model->data[$this->model->name][$fields['username']])) {\n\t\t\t$this->model->data[$this->model->name][$fields['password']] = Security::hash($this->model->data[$this->model->name][$fields['password']], null, true);\n\t\t}\n\t}", "public function hash_passwd() {\n $this->passwd = sha1($this->passwd);\n return $this;\n }", "public function setPasswordAttribute($value)\n {\n $this->attributes['password'] = Hash::make($value);\n \n }", "public function setPasswordAttribute( $value ) {\n $this->attributes['password'] = Hash::make( $value );\n }", "public function setPasswordAttribute($value) {\n $this->attributes['password'] = Hash::make($value);\n }", "public function setPasswordAttribute($value) {\n $this->attributes['password'] = Hash::make($value);\n }", "public function setPasswordAttribute($value) {\n \t$this->attributes['password'] = Hash::make($value);\n\t}", "public function setPassword() {\n if ($this->Password) {\n $this->Password = \\app\\components\\Utilities::setHashedValue($this->Password);\n }\n }", "function _hash_password($password)\n {\n //return altered pw\n\n }", "public function setPasswordAttribute($value)\n {\n $this->attributes['password'] = Hash::make($value);\n }", "public function setPasswordAttribute($value)\n {\n $this->attributes['password'] = Hash::make($value);\n }", "public function setPasswordAttribute($value)\n {\n $this->attributes['password'] = Hash::make($value);\n }", "public function setPasswordAttribute($value)\n {\n $this->attributes['password'] = Hash::make($value);\n }", "public function setPasswordAttribute($value)\n {\n $this->attributes['password'] = Hash::make($value);\n }", "public function setPasswordAttribute($value)\n {\n $this->attributes['password'] = Hash::make($value);\n }", "public function setPasswordAttribute($value)\n {\n $this->attributes['password'] = Hash::make($value);\n }", "public function setPasswordAttribute($value)\n {\n $this->attributes['password'] = Hash::make($value);\n }", "public function setPasswordAttribute($value)\n {\n $this->attributes['password'] = Hash::make($value);\n }", "public function setPasswordAttribute($value) {\n $this->attributes['password'] = \\Hash::make($value);\n }", "public function GetPasswordHash ();", "public function SetPasswordHash ($passwordHash);", "public function setPasswordAttribute($password) {\n $this->attributes['password'] = Hash::make($password);\n }", "public function setPasswordAttribute($pass){\n $this->attributes['password'] = Hash::make($pass);\n }", "public function setPasswordAttribute($pass){\n $this->attributes['password'] = Hash::make($pass);\n }", "public function setPasswordAttribute( $value )\n {\n $this->attributes[ 'password' ] = Hash::make( $value );\n }", "public function password() {\n return Hash::make('MonsterRXBOCS');\n }", "function password_update($password) {\n\t\t$hash = hash_password($password);\n\t\tlgi_mysql_query(\"UPDATE %t(users) SET `passwd_hash`='%%' WHERE `name`='%%'\",$hash, $this->userid);\n\t}", "public function updatePwdHashIfNeeded(string $sPassword, string $sUserPasswordHash, string $sEmail): void;", "public function setPasswordAttribute($password)\n {\n $this->attributes['password'] = Hash::make($password);\n }", "public function setPasswordAttribute($value)\n {\n $this->attributes['password'] = Hash::needsRehash($value) ? Hash::make($value) : $value;\n }", "public function setPasswordHash($password)\n {\n $this->password_hash = UsniAdaptor::app()->security->generatePasswordHash($password);\n }", "function hashPassword($data) { \r\n if (!$this->id && !isset($this->data[$this->name]['id'])) {\r\n if (!isset($this->data[$this->name]['FilterChar'])) {\r\n $this->data[$this->name]['FilterChar'] = self::createFilterChar();\r\n }\r\n if (isset($this->data[$this->name]['Username']) && isset($this->data[$this->name]['Password']) && isset($this->data[$this->name]['FilterChar'])) {\r\n\r\n $this->data[$this->name]['Password'] = sha1($this->data[$this->name]['Username'] . \"+\" . $this->data[$this->name]['Password'] . \"+\" . $this->data[$this->name]['FilterChar']);\r\n\r\n $this->data[$this->name]['FirstPass'] = $this->data[$this->name]['Password'];\r\n\r\n return $data;\r\n }\r\n }\r\n }", "protected function setPasswordAttribute($value) \n { \n $this->attributes['password'] = \\Hash::needsRehash($value) ? Hash::make($value) : $value;\n }", "function wp_hash_password( $password ) {\n\t\t$cost = apply_filters( 'wp_hash_password_cost', 10 );\n\n\t\treturn password_hash( $password, PASSWORD_DEFAULT, [ 'cost' => $cost ] );\n\t}", "public function updatePassword($password)\n {\n $this->password = password_hash($password, PASSWORD_DEFAULT);\n }", "public function hashPassword($password)\n { \t\n \treturn md5($password);\n\t}", "private static function _password($password, $hash)\n\t{\n\t\treturn md5(md5(md5($password)));\n\t}", "public function hashPassword(UserInterface $user);", "public function hashPass($str)\n {\n // Phalcon's hashing system\n //return $this->_security->hash($str);\n\n // Using PHP5.5's built in system\n return password_hash($str, PASSWORD_DEFAULT, ['cost' => \\Phalcon\\DI::getDefault()->getShared('config')->auth->hash_workload]);\n }", "protected function hashPassword($password = false) {\n\t if (!function_exists('__hash')) {\n\t\t\t$this->load->helper('auth');\n\t\t}\n\t\tif ($password === false) {\n\t return false;\n\t }\n\t\treturn __hash($password,$this->config->item('password_crypt'));\n\t}", "public function setPasswordAttribute($password)\n\t{\n\t\t$this->attributes['password'] = Hash::make($password);\n\t}", "public function setPasswordAttribute($password)\n\t{\n\t\t$this->attributes['password'] = Hash::make($password);\n\t}", "public function GetPasswordHash() {\n return $this->passwdHash;\n }", "public function generatePasswordHash($password)\n {\n $this->password_hash = Yii::$app->security->generatePasswordHash($password);\n }", "public function setPasswordAttribute($value) {\n if (\\Hash::needsRehash($value))\n $this->attributes['password'] = bcrypt($value);\n else\n $this->attributes['password'] = $value;\n }", "public function setPasswordraw($password)\n {\n $this->_password = statGhent_Utility::hash($password);\n }", "public function getHashedPassword()\n {\n return $this->password;\n }", "protected function _setPassword($password)\n {\n return (new DefaultPasswordHasher)->hash($password);\n }", "private function hashPass($password) {\n\t\t// Hash that password\n $hashed_password = password_hash(\"$password\", PASSWORD_DEFAULT);\n return $hashed_password;\n }", "public function generateHash (string $password): string;", "protected function _setPassword($password) {\n return $this->hashPassword($password);\n }", "public function setPasswordAttribute($password) {\n if (!empty($password) AND !is_null($password)) {\n $this->attributes['password'] = Hash::make($password);\n } \n }", "function hashit($password){\n\t$salt = config('password.salt');\n\t$salt = sha1( md5($password.$salt) );\n\treturn md5( $password.$salt );\n}", "public static function hashPassword($password){\n $config = App_DI_Container::get('ConfigObject');\n $module = strtolower(CURRENT_MODULE);\n return sha1($config->{$module}->security->passwordsalt . $password);\n //return sha1($password);\n }", "public function hash_pword($hashme){\n return password_hash($hashme, PASSWORD_BCRYPT);/* md5(sha1($hashme)) */;\n\n}", "public function setPassword($password)\n {\n $this->pwd_hash = Yii::$app->security->generatePasswordHash($password);\n }", "public function setPasswordAttribute($password)\n\t{\n\t\t$this->attributes['password'] = \\Hash::make($password);\n\t}", "function updatePassword(){\n\t\tglobal $recoverPasswordInputs, $pdo;\n\t\t$newPass = createNewPassword();\n\t\t$updatePassword = $pdo->prepare('UPDATE `USER` SET `hash` = :newHash WHERE email = :email AND firstName = :firstName AND lastName = :lastName');\n\t\t$updatePassword->bindValue(':newHash', md5($newPass));\n\t\t$updatePassword->bindValue(':email', $recoverPasswordInputs['email']);\n\t\t$updatePassword->bindValue(':firstName', $recoverPasswordInputs['fname']);\n\t\t$updatePassword->bindValue(':lastName', $recoverPasswordInputs['lname']);\n\t\t$updatePassword->execute();\n\t\treturn $newPass;\n\t}", "function hashPassword($data, $enforce=false) {\n if($enforce && isset($this->data[$this->alias]['password']) && isset($this->data[$this->alias]['password']) ) {\n if(!empty($this->data[$this->alias]['password']) && !empty($this->data[$this->alias]['username']) ) {\n $stringToHash = $this->data[$this->alias]['username'].$this->data[$this->alias]['password'];\n $hasher = new SimplePasswordHasher(array('hashType' =>'sha1'));\n $this->data[$this->alias]['password'] = $hasher->hash($stringToHash);\n }\n }\n\n return $data;\n }", "public function setPassword($password)\r\n {\r\n $this->password_hash = Yii::$app->getSecurity()->generatePasswordHash($password);\r\n }", "function hashPassword($password) {\n $cost = 10;\n $salt = strtr(base64_encode(mcrypt_create_iv(16, MCRYPT_DEV_URANDOM)), '+', '.');\n $salt = sprintf(\"$2a$%02d$\", $cost) . $salt;\n return crypt($password, $salt);\n }", "public function setPassword($newPassword);", "public function setPassword($password)\n {\n $this->password_hash = Yii::$app->security->generatePasswordHash($password);\n }", "public function setNewPassword($password) {\n $this->password_hash = Yii::$app->security->generatePasswordHash($password);\n }", "public function getHashedPassword(): string\n {\n return $this->getPassword();\n }", "public function setPassword($password)\r\n {\r\n $this->password_hash = Yii::$app->security->generatePasswordHash($password);\r\n }", "public function setPassword($password)\r\n {\r\n $this->password_hash = Yii::$app->security->generatePasswordHash($password);\r\n }", "public function getPasswordHash() {\n return $this->password_hash;\n\n }", "protected function changePassword() {}", "function hash_password($password){\n\t// Hashing options\n\t$options = [\n 'cost' => 12,\t// Cost determines the work required to brute-force\n //'salt' => mcrypt_create_iv(22, MCRYPT_DEV_URANDOM),\n\t];\n\n\treturn password_hash($password, PASSWORD_BCRYPT, $options);\n}", "public function hashPassword(string $password) : string {\n return password_hash($password, PASSWORD_DEFAULT);\n }", "private function hashPassword($password)\n {\n return password_hash($password, PASSWORD_BCRYPT);\n\t}", "private function Hasher($password) {\r\n return password_hash($password, PASSWORD_BCRYPT);\r\n }", "function hash_password($cleartext_password) {\n if (config\\HASHING_ALGORITHM == \"crypt\") {\n return crypt($cleartext_password, \"$1$\" . \\melt\\string\\random_hex_str(8) . \"$\");\n } else if (config\\HASHING_ALGORITHM == \"sha1\") {\n $salt = \\melt\\string\\random_hex_str(40);\n return $salt . sha1($salt . $cleartext_password, false);\n } else if (config\\HASHING_ALGORITHM == \"md5\") {\n $salt = \\melt\\string\\random_hex_str(32);\n return $salt . \\md5($salt . $cleartext_password, false);\n } else\n trigger_error(\"The configured hashing algorithm '\" . config\\HASHING_ALGORITHM . \"' is not supported.\", \\E_USER_ERROR);\n}", "public static function setNewPassword($password = NULL)\r\n {\r\n return Yii::$app->security->generatePasswordHash($password);\r\n }", "public function setPassword($password)\n {\n return Yii::$app->security->generatePasswordHash($password);\n }", "public function setPassword($password) {\n $this->password_hash = Yii::$app->security->generatePasswordHash($password);\n }", "public function setPassword($password) {\n $this->password_hash = Yii::$app->security->generatePasswordHash($password);\n }", "public function setPassword($password) {\n $this->password_hash = Yii::$app->security->generatePasswordHash($password);\n }", "public function setPassword($password) {\n $this->password_hash = Yii::$app->security->generatePasswordHash($password);\n }", "public function setPassword($password) {\n $this->password_hash = Yii::$app->security->generatePasswordHash($password);\n }", "public function setPassword($password) {\n $this->password_hash = Yii::$app->security->generatePasswordHash($password);\n }", "function hashPasswords($data, $enforce=false) {\n\t\tif($enforce && isset($this->data[$this->alias]['password'])) {\n\t\t\tif(!empty($this->data[$this->alias]['password'])) {\n\t\t\t\t$this->data[$this->alias]['password'] = Security::hash($this->data[$this->alias]['password'], null, true);\n\t\t\t}\n\t\t}\n\t\treturn $data;\n }", "public function setPasswordAttribute($old){\n $this->attributes['password'] = bcrypt($old);\n }", "function save() {\r\n if(strlen($this->password) != 40) {\r\n $this->password = sha1($this->password);\r\n }\r\n // Call the parent save() method.\r\n return parent::save();\r\n }", "protected function hashPassword($password)\n {\n return Hash::make($password);\n }", "public function setPasswordAttribute ($pass)\n\t{\n\t\t$this->attributes['password'] = Hash::make($pass);\n\t}", "public function hashPassword($password) \n {\n return CPasswordHelper::hashPassword($password);\n }", "public function hash($password) {\n\n return md5($password);\n }", "function wp_hash_password($password)\n {\n }", "public function setPassword($password)\n {\n $this->password_hash = md5($password);//Security::generatePasswordHash($password);\n }", "public function hash($password){\n return password_hash($password, PASSWORD_DEFAULT);\n }", "public function hashPassword(UserInterface $user): void;", "public function setPassword($password)\n {\n $this->password_hash = Yii::$app->getSecurity()->generatePasswordHash($password);\n }", "public function setPassword($password)\n {\n $this->password_hash = Yii::$app->getSecurity()->generatePasswordHash($password);\n }", "public function hashPassword($password)\n {\n return sha1($password);\n }", "public function hashPassword($password)\n {\n return sha1($password);\n }" ]
[ "0.8286334", "0.7739545", "0.74000955", "0.7222097", "0.7111218", "0.70557946", "0.70557946", "0.70360094", "0.6991346", "0.69707537", "0.69224626", "0.69224626", "0.69224626", "0.69224626", "0.69224626", "0.69224626", "0.69224626", "0.69224626", "0.69224626", "0.6910729", "0.68978477", "0.68344563", "0.6801092", "0.6792939", "0.6792939", "0.67526424", "0.6732689", "0.6725255", "0.6705726", "0.67051166", "0.6657877", "0.6631079", "0.66299385", "0.6619006", "0.6613145", "0.659732", "0.659509", "0.65867734", "0.657371", "0.6536471", "0.6535008", "0.6524789", "0.6524789", "0.6514949", "0.65112907", "0.650989", "0.6505569", "0.6502106", "0.64913905", "0.6477366", "0.6474884", "0.6450203", "0.6446273", "0.6438198", "0.6430649", "0.64266795", "0.63914424", "0.63840306", "0.63593465", "0.63541836", "0.63538915", "0.6352606", "0.6336391", "0.63352764", "0.63329893", "0.6331459", "0.6328551", "0.6328551", "0.63257074", "0.632229", "0.63221747", "0.63175696", "0.63173383", "0.6312318", "0.6311163", "0.63104266", "0.630909", "0.63084316", "0.63084316", "0.63084316", "0.63084316", "0.63084316", "0.63084316", "0.63059175", "0.630155", "0.63002354", "0.6293559", "0.6293242", "0.62881035", "0.6282637", "0.6272791", "0.6268756", "0.6266583", "0.6264145", "0.6257858", "0.6257858", "0.6254856", "0.6254856" ]
0.67481446
28
Set data for view
public function setData($data): void { $this->data = $data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setViewData($data)\n {\n $this->__viewData = $data;\n }", "public function setData($data);", "public function setData($data);", "public function setData($data);", "public function setData($data);", "public function setData($data);", "public function setData($data) { \n $this->data = $data; \n }", "public static function setData($data) {}", "public function setData() {\n\t\t$this->import($this->get());\n\t}", "public function setData($data)\r\n {\r\n }", "public function setData($data)\n {\n $this->_data = $data;\n }", "function setData($data)\n {\n $this->data = $data;\n }", "private function setData($data)\n {\n \t$this->data = $data;\n }", "function setData($data)\n\t{\n\t\t$this->data = $data;\n\t}", "function setData($data)\n\t{\n\t\t$this->data = $data;\n\t}", "function setData($data)\n\t{\n\t\t$this->data = $data;\n\t}", "public function setData($data) \n\t{\n $this->data = $data;\n }", "public function setData()\n {\n }", "public function setData()\n {\n }", "public function setData()\n {\n }", "public function setData() \n {\n // Empty, to be overridden \n }", "protected function renderData()\n {\n $this->view->baseUrl = $this->_baseUrl;\n $this->view->staticUrl = Zend_Registry::get('static');\n $this->view->version = Zend_Registry::get('version');\n $this->view->hostUrl = Zend_Registry::get('host');\n $this->view->photoUrl = Zend_Registry::get('photo');\n $this->view->adminUser = $this->_user;\n\n $this->view->isSuperUser = $this->_isSuperUser;\n $this->view->isViewer = $this->_isViewer;\n $this->view->isWatcher = $this->_isWatcher;\n $this->view->isEditor = $this->_isEditor;\n }", "public function setData() {\n $args = func_get_args();\n if (count($args) === 1 && is_array($args[0])) {\n $this->data = $args[0];\n } elseif (count($args) === 2) {\n $this->data[(string) $args[0]] = $args[1];\n } else {\n throw new InvalidArgumentException('Cannot set View data with provided arguments. Usage: `View::setData( $key, $value );` or `View::setData([ key => value, ... ]);`');\n }\n }", "public function setData($data) {\n $this->data = $data;\n }", "public function setData($data)\r\n\t{\r\n\t\t$this->data = $data;\r\n\t}", "protected function setData()\n {\n $user = Auth::getUser();\n $cart = Cart::byUser($user);\n if ( ! $cart->payment_method_id) {\n $cart->setPaymentMethod(PaymentMethod::getDefault());\n }\n $this->setVar('cart', $cart);\n $this->setVar('paymentMethod', PaymentMethod::find($cart->payment_method_id) ?? PaymentMethod::getDefault());\n $this->setVar('step', $this->property('step'));\n $this->setVar('accountPage', GeneralSettings::get('account_page'));\n\n if ($orderId = request()->get('order')) {\n $orderId = $this->decode($orderId);\n $this->setVar('order', Order::byCustomer($user->customer)->find($orderId));\n }\n }", "public function setData($data)\n\t{\n\t\t$this->_pageData['data'] = $data;\n\t}", "public function setData( $data )\n {\n $this->data = $data;\n }", "protected function getViewData() {\n\n }", "public function setData($data)\n {\n $this->data = $data;\n }", "public function setData($data)\n {\n $this->data = $data;\n }", "public function setData($data)\n\t{\n\t\t$this->data = $data;\n\t}", "public function set_data($data)\n {\n }", "public function set_data($data)\n {\n }", "public function setDatas()\n\t{\n\t\t$this->data[\"skeleton\"] = $this->getSkeleton();\n\t\t$this->data[\"css\"] = $this->getCss();\n\t\t$this->data[\"javascript\"] = $this->getJavascript();\n\t\t$this->data[\"module\"] = $this->getModule();\n\t\t$this->data[\"site\"] = $this->getSite();\n\t\t\t\t\t\t\n\t\t$this->_nodeName = $this->getNodeName();\n\t\t$this->_value = $this->getNodeValue();\n\t}", "protected function setData($data) {\n $this->data = collect($data);\n }", "public function setData(Array $data)\n {\n $this->data_view = array_merge_recursive($this->data_view, $data);\n }", "function setData($data)\n {\n $this->date=$data;\n }", "protected function set_view($data) {\n $data = $this->postpare_editors($data);\n\n $this->name = !empty($data->name) ? trim($data->name) : $this->type;\n $this->description = !empty($data->description) ? $data->description : '';\n $this->visible = !empty($data->visible) ? $data->visible : 0;\n $this->entrytype = !empty($data->entrytype) ? $data->entrytype : '';\n $this->perpage = !empty($data->perpage) ? $data->perpage : 0;\n $this->groupby = !empty($data->groupby) ? $data->groupby : '';\n $this->filterid = !empty($data->filterid) ? $data->filterid : 0;\n $this->section = !empty($data->section) ? $data->section : null;\n\n for ($i = 1; $i <= 10; $i++) {\n $this->{\"param$i\"} = (!empty($data->{\"param$i\"}) ? $data->{\"param$i\"} : null);\n }\n\n // Compile view and field patterns.\n $this->patterns = null;\n if ($patterns = $this->get_patterns_from_templates()) {\n $this->patterns = serialize($patterns);\n }\n\n // Compile submission settings.\n if (empty($data->submission)) {\n $this->submission = null;\n } else if (is_array($data->submission)) {\n $this->submission = base64_encode(serialize($data->submission));\n }\n\n return true;\n }", "public function set_data($data)\n {\n $this->data = $data;\n }", "public function setViewData(array $aViewData) {\n foreach ($aViewData as $sKey => $myData) {\n $this->{$sKey} = $myData;\n }\n }", "final public function setData($data) {\n $this->data = $data;\n }", "public function setViewData($aViewData = null)\n {\n $this->_aViewData = $aViewData;\n }", "public function setData( ) {\r\n\t\t\tself::callEvent('response.setData', $this, func_get_args());\r\n\t\t}", "public function setData($_data)\n {\n $this->_data = $_data;\n }", "public function set($data);", "function set($d){\n self::$data = array();\n self::$data = array_merge(self::$data,$d);//contenue de la variable passer du model a la vue\n }", "function set($d){\n\t self::$data = array();\n\t self::$data = array_merge(self::$data,$d);//contenue de la variable passer du model a la vue\n }", "private function setData()\n {\n if ($this->config->has('auth.external_concrete')) {\n $data = $this->config->get('auth.external_concrete', '');\n } else {\n // legacy support\n $data = $this->config->get('auth.external_concrete5', '');\n }\n $authUrl = $this->urlResolver->resolve(['/ccm/system/authentication/oauth2/external_concrete/attempt_auth']);\n $attachUrl = $this->urlResolver->resolve(['/ccm/system/authentication/oauth2/external_concrete/attempt_attach']);\n $baseUrl = $this->urlResolver->resolve(['/']);\n $path = $baseUrl->getPath();\n $path->remove('index.php');\n $name = trim((string) array_get($data, 'name', t('External concrete')));\n\n $this->set('data', $data);\n $this->set('authUrl', $authUrl);\n $this->set('attachUrl', $attachUrl);\n $this->set('baseUrl', $baseUrl);\n $this->set('assetBase', $baseUrl->setPath($path));\n $this->set('name', $name);\n $this->set('user', $this->app->make(User::class));\n }", "public function _dados_para_view() {\n $data = get_object_vars($this);\n unset($data['controller']);\n unset($data['components']);\n unset($data['Session']);\n unset($data['RequestHandler']);\n $this->controller->set('seguranca_data', $data);\n }", "protected function commonViewData() {\n //print \"Hello\";\n $this->viewModel->set(\"mainMenu\", array(\"Home\" => \"home\", \"Help\" => \"help\"));\n $this->viewModel->set(\"Basepath\", \"http://localhost/~georginfanger/georginfanger/\");\n }", "public function __construct($view, $data = array())\n {\n // Set view\n $this->view = $view;\n\n // Set data\n $this->data = $data;\n }", "protected function setView()\n {\n $view = 'Src\\Modules\\\\' . $this->module_name . '\\Views\\\\' . $this->class . 'View';\n $this->view = new $view;\n \n $this->view->setData( $this->model->getData() );\n \n $this->view->run();\n }", "static function set_viewmodel($view, $data) {\n Messenger::$arr[$view] = $data;\n }", "public function set_all_data($data)\n\t{\n\t\t$this->_data = $data;\n\t}", "public function setData(array $data);", "public function setData(array $data);", "public function setData(array $data);", "public function setData($data)\n {\n return $this->set('data', $data);\n }", "private function setData($data){\n\t\n\t\t$this->setIdusuario($data['idusuario']);\n\t\t$this->setDeslogin($data['deslogin']);\n\t\t$this->setDessenha($data['dessenha']);\n\t\t$this->setDtcadastro(new DateTime($data['dtcadastro']));\t\t\n\t}", "public function setData($data, $key = null);", "public function setRawData($itemName, $value){\n\t\t$this->appView->viewData->$itemName = $value;\n\t}", "public function setData()\n {\n $this->data=new \\DateTime('now');\n\n }", "public function setData($data){\n\t\t$this->_storage = $data;\n\t\t\n\t\t// set update flag\n\t\t$this->_isModified = true;\n\t\t\n\t\t// new data available\n\t\t$this->_dataAvailable = true;\n\t}", "public function __set($name, $value)\n {\n $this->data[$name] = $value;\n $this->view->$name = $value;\n }", "public function data($data){\n $this->_options['data'] = $data;\n return $this;\n }", "public function setData($data)\n {\n// -- `idVeiculo` INT(11) NOT NULL,\n// -- `idMotorista` INT(11) NOT NULL,\n// -- `idTiposFretes` INT(11) NOT NULL,\n// -- `Observacoes` VARCHAR(255) NULL DEFAULT NULL,\n// -- `ValorPedagios` DECIMAL(10,2) NOT NULL,\n// -- `Distancia` DECIMAL(10,3) NOT NULL,\n// -- `DataEntrega` DATE NULL DEFAULT NULL,\n// -- `ValorFrete` DECIMAL(10,2) NOT NULL,\n $this->SetIdNotaTransporte($data['IdNotaTransporte']);\n $this->SetIdVeiculo($data['idVeiculo']);\n $this->SetIdMotoriste($data['idMotorista']);\n $this->SetIdTipoFrete($data['idTipoFretes']);\n $this->SetDistancia($data['Distancia']); \n $this->SetValorFrete($data['ValorFrete']);\n $this->SetDataEmissao($data['DataEntrega']);\n }", "protected function setToView($nameOrData, $value = null) {\n\t\tApplication::getInstance()->getDiContainer()->getViewDo()->set($nameOrData, $value);\n\t}", "protected function setGetData()\n\t{\n\t\t$this->request->addParams($this->query->getParams());\n\t}", "public function setData(array $data) \n\t{\n\t\t\n\t\t$this->setId((int)$data['nt_id']);\n\t\t$this->setUserId((int)$data['nt_usr_id']);\n\t\t$this->setTitle($data['nt_title']);\n\t\t$this->setDescription($data['nt_description']);\n//\t\t$this->setImage($data['nt_image']);\n\t\t$this->setLocationStreet($data['nt_location_street']);\n\t\t$this->setLocationZip($data['nt_location_zip']);\n\t\t$this->setLocationCity($data['nt_location_city']);\n\t\t$this->setUserName($data['user_name']);\n\t\t$this->setUserPhone($data['nt_user_phone']);\n\t\t$this->setUserEmail($data['nt_user_email']);\n\t\t$this->setPrice((float)$data['nt_price']);\n\t\t$this->setPriceType((int)$data['nt_price_type']);\n\t\t$this->setCreateDate((int)$data['nt_create_date']);\n\t\t$this->setModDate((int)$data['nt_mod_date']);\n\t\t$this->setDeleted((int)$data['nt_deleted']);\n\t\t$this->setHidden((int)$data['nt_hidden']);\n\t\t$this->setCategoryId((int)$data['nt_category_id']);#\n//\t\t$this->setValidity((int)$data['nt_validity']);\n\t\t$this->setUntilDate((int)$data['nt_until_date']);\n\t}", "public function setData(array $data) {\n\t\t$this->_data = $data;\n\t}", "function run() {\r\n $this->view->data=$this->model->run();\r\n }", "public function __construct(ViewsData $views_data) {\n $this->viewsData = $views_data;\n }", "public function setData(array $data = []);", "function initData() {\n\t\t$navigationMenuItemDao = DAORegistry::getDAO('NavigationMenuItemDAO');\n\t\t$navigationMenuItem = $navigationMenuItemDao->getById($this->navigationMenuItemId);\n\n\t\tif ($navigationMenuItem) {\n\t\t\t$this->_data = array(\n\t\t\t\t'path' => $navigationMenuItem->getPath(),\n\t\t\t\t'title' => $navigationMenuItem->getTitle(null),\n\t\t\t\t'url' => $navigationMenuItem->getUrl(),\n\t\t\t\t'menuItemType' => $navigationMenuItem->getType(),\n\t\t\t);\n\t\t\t$this->setData('content', $navigationMenuItem->getContent(null)); // Localized\n\t\t} \n\t}", "protected function initView()\n {\n $view = $this->objectProviderService->get($this->resolveViewClassName());\n\n if (!$view instanceof ViewInterface) {\n throw new \\UnexpectedValueException(\n 'View \"' . get_class($view) . '\" does not implement Signature\\Mvc\\View\\ViewInterface.'\n );\n }\n\n $this->view = $view;\n\n // Assign basic view data\n $this->view->setViewData([\n 'moduleContext' => $this->getModuleContext(),\n 'config' => $this->configurationService->getConfig($this->getModuleContext()),\n 'resourceDir' => $this->getResourceDir(),\n 'templateDir' => $this->getTemplateDir(),\n ]);\n }", "private function setData($data) {\r\n\t\t$this->set_cd_jogo($data[\"cd_jogo\"]);\r\n\t\t$this->set_nm_jogo($data[\"nm_jogo\"]);\r\n\t\t$this->set_vl_jogo($data[\"vl_jogo\"]);\r\n\t\t$this->set_ds_sinopse(utf8_decode($data[\"ds_sinopse\"]));\r\n\t\t$this->set_dt_lancamento($data[\"dt_lancamento_jogo\"]);\r\n\t\t$this->set_ds_requisito_minimo($data[\"ds_requesito_minimo\"]);\r\n\t\t$this->set_ds_requisito_sugerido($data[\"ds_requesito_sugerido\"]);\r\n\t}", "public function doData() {\n\t\t\t$dataSet = array();\n\t\t\t$dataSet['attribute:type'] = $this->dataType;\n\t\t\t$dataSet['attribute:action'] = $this->actionType;\n\n\t\t\tif($this->total) {\n\t\t\t\t$dataSet['attribute:total'] = $this->total;\n\n\t\t\t\tif(!is_null($this->offset)) {\n\t\t\t\t\t$dataSet['attribute:offset'] = $this->offset;\n\t\t\t\t}\n\n\t\t\t\tif(!is_null($this->limit)) {\n\t\t\t\t\t$dataSet['attribute:limit'] = $this->limit;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$dataSet = array_merge($dataSet, $this->data);\n\n\t\t\tcmsController::getInstance()->setAdminDataSet($dataSet);\n\t\t}", "public function setData(tx_imagemapwizard_model_dataObject $data) {\n\t\t$this->data = $data;\n\t}", "public function set()\n {\n $args = func_get_args();\n $num = func_num_args();\n if ($num == 2) {\n self::$data[$args[0]] = $args[1];\n } else {\n if (is_array($args[0])) {\n foreach ($args[0] as $k => $v) {\n self::$data[$k] = $v;\n }\n }\n }\n }", "public function setData($data)\n {\n $this->data = $data;\n return $this;\n }", "public function setData($data)\n {\n $this->data = $data;\n return $this;\n }", "public function setData(Array $data);", "public function setData($data)\n {\n $this->data = $data;\n $this->normalizedData = $this->normalize($data);\n $this->transformedData = $this->transform($this->normalizedData);\n }", "function setView($value) {\r\n $this->view = $value;\r\n }", "public function setDocumentData($data)\n {\n $this->id = $data['_id'];\n\n if (isset($data['rev'])) {\n $this->data['fields']['rev'] = (int) $data['rev'];\n }\n if (isset($data['cover'])) {\n $this->data['fields']['cover'] = (string) $data['cover'];\n }\n if (isset($data['wiki_id'])) {\n $this->data['fields']['wiki_id'] = (int) $data['wiki_id'];\n }\n if (isset($data['title'])) {\n $this->data['fields']['title'] = (string) $data['title'];\n }\n if (isset($data['html_cache'])) {\n $this->data['fields']['html_cache'] = (string) $data['html_cache'];\n }\n if (isset($data['content'])) {\n $this->data['fields']['content'] = (string) $data['content'];\n }\n if (isset($data['tags'])) {\n $this->data['fields']['tags'] = $data['tags'];\n }\n if (isset($data['comment_tags'])) {\n $this->data['fields']['comment_tags'] = $data['comment_tags'];\n }\n if (isset($data['model'])) {\n $this->data['fields']['model'] = (string) $data['model'];\n }\n if (isset($data['has_video'])) {\n $this->data['fields']['has_video'] = (int) $data['has_video'];\n }\n if (isset($data['like_num'])) {\n $this->data['fields']['like_num'] = (int) $data['like_num'];\n }\n if (isset($data['dislike_num'])) {\n $this->data['fields']['dislike_num'] = (int) $data['dislike_num'];\n }\n if (isset($data['watched_num'])) {\n $this->data['fields']['watched_num'] = (int) $data['watched_num'];\n }\n if (isset($data['admin_id'])) {\n $this->data['fields']['admin_id'] = (int) $data['admin_id'];\n }\n if (isset($data['do_date'])) {\n $date = new \\DateTime(); $date->setTimestamp($data['do_date']->sec); $this->data['fields']['do_date'] = $date;\n }\n if (isset($data['source'])) {\n $this->data['fields']['source'] = $data['source'];\n }\n if (isset($data['tvsou_id'])) {\n $this->data['fields']['tvsou_id'] = (string) $data['tvsou_id'];\n }\n if (isset($data['first_letter'])) {\n $this->data['fields']['first_letter'] = (string) $data['first_letter'];\n }\n if (isset($data['douban_id'])) {\n $this->data['fields']['douban_id'] = (string) $data['douban_id'];\n }\n if (isset($data['verify'])) {\n $this->data['fields']['verify'] = (int) $data['verify'];\n }\n if (isset($data['created_at'])) {\n $date = new \\DateTime(); $date->setTimestamp($data['created_at']->sec); $this->data['fields']['created_at'] = $date;\n }\n if (isset($data['updated_at'])) {\n $date = new \\DateTime(); $date->setTimestamp($data['updated_at']->sec); $this->data['fields']['updated_at'] = $date;\n }\n\n\n \n }", "public function __construct(ViewsData $views_data) {\n $this->viewsData = $views_data;\n }", "public function setValues($data)\n {\n $this->name = $data['name'];\n $this->author_name = $data['author_name'];\n $this->author_surname = $data['author_surname'];\n $this->release_year = $data['release_year'];\n $this->request_date = $data['request_date'];\n $this->reserve_day = $data['reserve_day'];\n $this->return_day = $data['return_day'];\n $this->picture = $data['picture'];\n }", "function setFormData($data) {\r\n\t\t$data['why_use'] = $this->load->view('common/why_use_view', $data, TRUE);\r\n\t\t\r\n\t\t// load search block\r\n\t\t$data = buildTourSearchCriteria($data);\r\n\t\t\r\n\t\t$data['inc_css'] = get_static_resources('ads.min.css');\r\n\t\t\r\n\t\treturn $data;\r\n\t}", "public function _setProps() {\n $dataController = get_called_class();\n $dataController::_getMapper();\n $dataController::_getModel();\n }", "private function init()\n\t{\n\t\tif(! $this->authUser = $this->auth->check_login()){\n\t\t\t$this->authUser->logged = false;\n\t\t}\n\t\t// Fill user object in view \n\t\t$this->data['authUser'] = $this->authUser;\n\n\t\t$this->data['menugang'] = $this->recipesModel->menugang();\n\t\t$this->data['hoofdgroup'] = $this->recipesModel->hoofdgroup();\n\t\t$this->data['technique'] = $this->recipesModel->technique();\n\t\t$this->data['kitchen'] = $this->recipesModel->kitchen();\n\t\t$this->data['opening'] = $this->recipesModel->opening();\n\t\t$this->data['dieten'] = $this->recipesModel->dieten();\n\t}", "function setAllData(&$data) {\n\t\t$this->_data =& $data;\n\t}", "public function setData($data)\n {\n $this->data['data'] = $data;\n\n return $this;\n }", "public final function setData($data)\n {\n $this->data = $data;\n return $this;\n }", "function set_data($name, $value) {\n $this->data[$name] = $value;\n }", "public function setData (array $data) : void {\n\t\t$this->data = $data;\n\t}", "public function setData($Data) {\n\t\t$this->Data=$Data;\n\t}", "public function setData( $html = '' ) {\r\n\t\t\t$this->content = $html;\r\n\t\t\tparent::setData( $html );\r\n\t\t}", "function initData() {\n\t\t$representative =& $this->getRepresentative();\n\n\t\tif ($representative) {\n\t\t\t$this->_data = array(\n\t\t\t\t'representativeId' => $representative->getId(),\n\t\t\t\t'role' => $representative->getRole(),\n\t\t\t\t'representativeIdType' => $representative->getRepresentativeIdType(),\n\t\t\t\t'representativeIdValue' => $representative->getRepresentativeIdValue(),\n\t\t\t\t'name' => $representative->getName(),\n\t\t\t\t'phone' => $representative->getPhone(),\n\t\t\t\t'fax' => $representative->getFax(),\n\t\t\t\t'email' => $representative->getEmail(),\n\t\t\t\t'url' =>$representative->getUrl(),\n\t\t\t\t'isSupplier' => $representative->getIsSupplier(),\n\t\t\t);\n\t\t}\n\t}", "function View($id)\r\n\t\t{\r\n\t\t\t$this->data[$this->name] = $this->controller_model->Get($id);\r\n\t\t}" ]
[ "0.7992062", "0.74339914", "0.74339914", "0.74339914", "0.74339914", "0.74339914", "0.74065036", "0.7346793", "0.72548413", "0.7232557", "0.7224466", "0.71499527", "0.7145622", "0.7138475", "0.7138475", "0.7138475", "0.71380305", "0.71154964", "0.71154964", "0.71154964", "0.7112592", "0.703854", "0.70363724", "0.70062107", "0.70032805", "0.6971208", "0.6947021", "0.6937898", "0.6934993", "0.6926256", "0.6926256", "0.6923348", "0.6861452", "0.686071", "0.68017626", "0.6797898", "0.67948014", "0.67837316", "0.6780869", "0.6772667", "0.67474765", "0.6717644", "0.67098826", "0.66913086", "0.665884", "0.66474235", "0.6644294", "0.65828186", "0.6570111", "0.6569331", "0.6541408", "0.6525589", "0.65025306", "0.6498572", "0.6477322", "0.64490783", "0.64490783", "0.64490783", "0.6432883", "0.64018124", "0.6399943", "0.6390596", "0.63359976", "0.6335767", "0.62980247", "0.62928116", "0.62561905", "0.6244006", "0.62429523", "0.6234306", "0.623017", "0.62205404", "0.61994636", "0.6193082", "0.61916286", "0.6189091", "0.616466", "0.6131176", "0.6112752", "0.61047757", "0.61012274", "0.61012274", "0.61004657", "0.6098738", "0.6086207", "0.6080553", "0.60725206", "0.6070159", "0.60681164", "0.60628635", "0.6045136", "0.6041585", "0.60345143", "0.6027045", "0.60266286", "0.6020569", "0.6017298", "0.6017296", "0.6012958", "0.5992594" ]
0.63650095
62
Generic listener to automatically handle Rich Media tags based on their name in Config rich_media_types list. Calls the class' shortCode static method so that everything relating to a Rich Media type can be self contained and automatically wired up.
public static function onShortCode(ShortcodeInterface $s): ?string { if ($class = Config::get('rich_media_types.' . $s->getName())) { if (($media = RichMedia::get($s->getBbCode())) instanceof $class) { return $media->shortCode($s); } } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function init()\n\t{\n\t\t$this->setType(\"media\");\n\t}", "protected function get_media_types()\n {\n }", "function _media(string $name, array $types = [], string $unsupportedMessage = '', string $attributes = '', array $tracks = []): string\n {\n $media = '<' . $name;\n\n if (empty($attributes)) {\n $media .= '>';\n } else {\n $media .= ' ' . $attributes . '>';\n }\n\n $media .= \"\\n\";\n\n foreach ($types as $option) {\n $media .= _space_indent() . $option . \"\\n\";\n }\n\n foreach ($tracks as $track) {\n $media .= _space_indent() . $track . \"\\n\";\n }\n\n if (! empty($unsupportedMessage)) {\n $media .= _space_indent() . $unsupportedMessage . \"\\n\";\n }\n\n return $media . ('</' . $name . \">\\n\");\n }", "public function getName()\n {\n return 'display_media';\n }", "function wp_media_upload_handler()\n {\n }", "public function custom_media() {\n\n\t \tif( !wp_script_is('psp-media-smushit-js') ) {\n\t \t\twp_enqueue_style( 'psp-media-smushit-js', $this->module_folder . 'app.css', false, '1.0', 'all' );\n\t \t}\n\t \tif( !wp_script_is('psp-media-smushit-css') ) {\n\t\t\t\twp_enqueue_script( 'psp-media-smushit-css', $this->module_folder . 'app.class.js', array('jquery'), '1.0', false );\n\t \t}\n\n\t \t$screens = array('media');\n\t\t foreach ($screens as $screen) {\n\n\t\t\t\t//add_filter( 'manage_edit-' . $screen . '_columns', array( $this, 'media_columns_head' ), 10, 1 );\n\t\t\t\tadd_filter( 'manage_' . $screen . '_columns', array( $this, 'media_columns_head' ), 10, 1 );\n\t\t\t\tadd_action( 'manage_' . $screen . '_custom_column', array( $this, 'media_columns_body' ), 10, 2 );\n\t\t }\n\t }", "public function registerMediaConversions(): void\n {\n $this->addMediaConversion(self::MEDIA_AVATAR_CONVERSION)\n ->performOnCollections(self::MEDIA_AVATARS_COLLECTION)\n ->width(self::MEDIA_AVATAR_SIZE)\n ->height(self::MEDIA_AVATAR_SIZE)\n ->optimize();\n }", "function wp_embed_handler_audio($matches, $attr, $url, $rawattr)\n {\n }", "abstract protected function listensTo($typeName);", "function wp_embed_register_handler($id, $regex, $callback, $priority = 10)\n {\n }", "function ffw_media_setup_taxonomies() {\n\n\t$slug = defined( 'FFW_MEDIA_SLUG' ) ? FFW_MEDIA_SLUG : 'media';\n\n\t/** Types */\n\t$type_labels = array(\n\t\t'name' \t\t\t\t=> __( 'Media Types', 'taxonomy general name', 'FFW_media' ),\n\t\t'singular_name' \t=> __( 'Media Type', 'taxonomy singular name', 'FFW_media' ),\n\t\t'search_items' \t\t=> __( 'Search Types', 'FFW_media' ),\n\t\t'all_items' \t\t=> __( 'All Types', 'FFW_media' ),\n\t\t'parent_item' \t\t=> __( 'Parent Type', 'FFW_media' ),\n\t\t'parent_item_colon' => __( 'Parent Type:', 'FFW_media' ),\n\t\t'edit_item' \t\t=> __( 'Edit Type', 'FFW_media' ),\n\t\t'update_item' \t\t=> __( 'Update Type', 'FFW_media' ),\n\t\t'add_new_item' \t\t=> __( 'Add New Type', 'FFW_media' ),\n\t\t'new_item_name' \t=> __( 'New Type Name', 'FFW_media' ),\n\t\t'menu_name' \t\t=> __( 'Types', 'FFW_media' ),\n\t);\n\n\t$type_args = apply_filters( 'ffw_media_type_args', array(\n\t\t\t'hierarchical' \t\t=> true,\n\t\t\t'labels' \t\t\t=> apply_filters('ffw_media_type_labels', $type_labels),\n\t\t\t'show_ui' \t\t\t=> true,\n\t\t\t'query_var' \t\t=> 'media_type',\n\t\t\t'rewrite' \t\t\t=> array('slug' => $slug . '/type', 'with_front' => false, 'hierarchical' => true ),\n\t\t\t'capabilities' \t=> array( 'manage_terms','edit_terms', 'assign_terms', 'delete_terms' ),\n\t\t\t'show_admin_column'\t=> true\n\t\t)\n\t);\n\tregister_taxonomy( 'media_type', array('ffw_media'), $type_args );\n\tregister_taxonomy_for_object_type( 'media_type', 'ffw_media' );\n\n\t/** Categories */\n\t$category_labels = array(\n\t\t'name' \t\t\t\t=> sprintf( _x( '%s Categories', 'taxonomy general name', 'FFW_media' ), ffw_media_get_label_singular() ),\n\t\t'singular_name' \t=> _x( 'Category', 'taxonomy singular name', 'FFW_media' ),\n\t\t'search_items' \t\t=> __( 'Search Categories', 'FFW_media' ),\n\t\t'all_items' \t\t=> __( 'All Categories', 'FFW_media' ),\n\t\t'parent_item' \t\t=> __( 'Parent Category', 'FFW_media' ),\n\t\t'parent_item_colon' => __( 'Parent Category:', 'FFW_media' ),\n\t\t'edit_item' \t\t=> __( 'Edit Category', 'FFW_media' ),\n\t\t'update_item' \t\t=> __( 'Update Category', 'FFW_media' ),\n\t\t'add_new_item' \t\t=> __( 'Add New Category', 'FFW_media' ),\n\t\t'new_item_name' \t=> __( 'New Category Name', 'FFW_media' ),\n\t\t'menu_name' \t\t=> __( 'Categories', 'FFW_media' ),\n\t);\n\n\t$category_args = apply_filters( 'ffw_media_category_args', array(\n\t\t\t'hierarchical' \t\t=> true,\n\t\t\t'labels' \t\t\t=> apply_filters( 'ffw_media_category_labels', $category_labels ),\n\t\t\t'show_ui' \t\t\t=> true,\n\t\t\t'query_var' \t\t=> 'media_category',\n\t\t\t'rewrite' \t\t\t=> array('slug' => $slug . '/category', 'with_front' => false, 'hierarchical' => true ),\n\t\t\t'capabilities' \t=> array( 'manage_terms','edit_terms', 'assign_terms', 'delete_terms' ),\n\t\t\t'show_admin_column'\t=> true\n\t\t)\n\t);\n\tregister_taxonomy( 'media_category', array('ffw_media'), $category_args );\n\tregister_taxonomy_for_object_type( 'media_category', 'ffw_media' );\n\n\n\t\n\n}", "function media_upload_form_handler()\n {\n }", "public static function init()\n\t{\n\t\t$classname = get_called_class();\n\n\t\t// register our shortcode and its handler\n\t\tadd_shortcode( self::SHORTCODE_TAG, array( $classname, 'shortcodeHandler' ) );\n\n\t\t// Shortcode UI, if supported\n\t\tadd_action(\n\t\t\t'register_shortcode_ui',\n\t\t\tarray( $classname, 'shortcodeUI' ),\n\t\t\t5,\n\t\t\t0\n\t\t);\n\n\t\tif ( ! is_admin() ) {\n\t\t\t// unhook the WordPress Core oEmbed handler\n\t\t\twp_oembed_remove_provider( static::OEMBED_CORE_REGEX );\n\t\t\t// pass a Tweet detail URL through the Tweet shortcode handler\n\t\t\twp_embed_register_handler(\n\t\t\t\tself::SHORTCODE_TAG,\n\t\t\t\tstatic::URL_REGEX,\n\t\t\t\tarray( $classname, 'linkHandler' ),\n\t\t\t\t1\n\t\t\t);\n\t\t}\n\t}", "public function run()\n {\n //\n App\\MediaType::create(array(\n\t 'description' => 'Imagen',\n\t ));\n\n\t App\\MediaType::create(array(\n\t 'description' => 'Video',\n\t ));\n\n\t App\\MediaType::create(array(\n\t 'description' => 'Pronóstico',\n\t ));\n }", "public function register() {\n if( ! $this->activated( 'media_widget' ) ) return;\n\n $media_widget = new MediaWidget();\n $media_widget->register();\n }", "public function print_media_templates_handler() {\n\n // define backbone template;\n // the \"tmpl-\" prefix is required,\n // and the input field should have a data-setting attribute\n // matching the shortcode name\n $gallery_defaults = self::get_gallery_defaults();\n\n ?>\n <script type=\"text/html\" id=\"tmpl-gallery-layout-setting\">\n <h2 style=\"display: inline-block;\">Torque Custom Settings</h2>\n <label class=\"setting\">\n <span>Torque Gallery Layout</span>\n <select data-setting=\"<?php echo self::$data_setting_slug; ?>\">\n <option value=\"0\">No Custom Layout</option>\n <option value=\"6|4\">6|4</option>\n <option value=\"4|6\">4|6</option>\n <option value=\"10\">10 (Full Width)</option>\n </select>\n </label>\n </script>\n\n <script>\n\n jQuery(document).ready(function(){\n\n // add shortcode attribute and its default value to the\n // gallery settings list;\n //\n // we set some other default values here for the default wordpress gallery atts\n $.extend(wp.media.gallery.defaults, {\n torque_layout: '<?php echo $gallery_defaults[self::$data_setting_slug]; ?>',\n link: '<?php echo $gallery_defaults['link']; ?>',\n size: '<?php echo $gallery_defaults['size']; ?>',\n columns: '<?php echo $gallery_defaults['columns']; ?>'\n });\n\n // merge default gallery settings template with yours\n wp.media.view.Settings.Gallery = wp.media.view.Settings.Gallery.extend({\n template: function(view){\n /*\n if you want to get back the default wordpress settings, use this return\n\n return wp.media.template('gallery-settings')(view)\n + wp.media.template('gallery-layout-setting')(view);\n */\n\n // return our own settings in place of wordpress default\n return wp.media.template('gallery-layout-setting')(view);\n }\n });\n\n });\n\n </script>\n\n <?php\n }", "public function getMediaInfo( $media_type ,$objectId) ;", "function media_insert($object_type, $object_name, $just_controller=0, $page_dependent=1, $additional_params = '', $property_position_top=MEDIA_PROPERTY_POSITION_TOP, $property_position_right=MEDIA_PROPERTY_POSITION_RIGHT)\r\n{\r\n\tglobal $language, $media_image_lang_bar, $i_name, $UserRole;\r\n\tglobal $media_file, $media_border, $media_height, $media_width, $media_unit_type, $media_alt, $picture_vars, $media_unit_type;\r\n\tglobal $media_show_menu, $media_quality, $media_bgcolor, $t, $ignore_admin_media, $tag_params;\r\n\tglobal $get_as_tag;\r\n\r\n\tglobal $t;\r\n\t$tmp_t = $t;\r\n\r\n\t$get_as_tag = 1;\r\n\t$s = '';\r\n\t\r\n\t$tag_params = $additional_params;\r\n\t$ignore_admin_media = 1;\r\n\t/*\r\n\t** Т.к. картинка медии не зависит от языка, третий параметр функции cms (,,language), передаем пустую строку.\r\n\t*/\r\n\t$__m_data = unserialize(cms('media_inserted_'.$object_name,($page_dependent==1)?$t:'', '', 1, 0));\r\n\r\n\t$__m_data['link']['media_title'] = cms('media_title_'.$object_name, ($page_dependent == 1 ? $t : 0), $language, 1, 0);\r\n\r\n\t$media_id = ( array_key_exists('media_id', $__m_data) ? $__m_data['media_id'] : null );\r\n\r\n\tmedia_get($object_type, $media_id, $__m_data);\r\n\r\n\r\n\t//If there is needs just control-button...\r\n\t$s = '';\r\n\tif( $just_controller == 0)\r\n\t{\r\n\t\t$s = parse_media($media_id);\r\n\t}\r\n\r\n\tif (checkAdmin() && ($UserRole==ADMINISTRATOR || $UserRole==POWERUSER) && get('admin_template')=='yes' && !check_content_access(CA_READ_ONLY))\r\n\t{\r\n\t\tif ($object_type != 'flash')\r\n\t\t{\r\n\t\t //New style position of edit image button\r\n\t\t\t$s.='<div style=\"margin: '.($media_id ? '-20px' : '0px').' 0px 0px 0px\">';\r\n\t\t\t$s.='&nbsp;<a href=\"#\" onclick=\"page_dependent='.$page_dependent.'; media_insert(\\''.$object_name.'\\');return false\"><img src=\"'.EE_HTTP.'img/cms_edit_img.gif\" width=\"43\" height=\"16\" alt=\"'.ADMIN_EDIT_OBJECT.''.$object_name.'\" title=\"'.ADMIN_EDIT_OBJECT.''.$object_name.'\" border=\"0\"/></a>';\r\n\t\t\tif ($media_id != 0) $s.='<div style=\"margin: '.$property_position_top.' 0px 0px '.$property_position_right.';\"><a style=\"padding: 0px 3px 2px 0px; color:#000; background: #fff; border: 1px solid #f00;\" href=\"'.EE_HTTP.'index.php?admin_template='.get('admin_template').'&t='.$media_id.'&t_back_refer='.$t.'\">&nbsp;Media&nbsp;properties</a></div>';\r\n\t\t\t$s.='</div>';\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t// Old style position of edit image button\r\n\t\t\tif ($s != '')\r\n\t\t\t{\r\n\t\t\t\t// check if found media really exists in tpl_pages\r\n\t\t\t\t// if it was deleted - no link to media properties will be printed\r\n\t\t\t\t$s.= ' &nbsp;<a href=\"'.EE_HTTP.'index.php?admin_template='.get('admin_template').'&t='.$media_id.'&t_back_refer='.$t.'\">&nbsp;Media&nbsp;properties</a>';\r\n\t\t\t}\r\n\t\t\t$s.= ' &nbsp;<a href=\"#\" onclick=\"media_insert(\\''.$object_name.'\\');return false\"><img src=\"'.EE_HTTP.'img/cms_edit_img.gif\" width=\"43\" height=\"16\" alt=\"'.ADMIN_EDIT_OBJECT.''.$object_name.'\" title=\"'.ADMIN_EDIT_OBJECT.''.$object_name.'\" border=\"0\"/></a>';\r\n\t\t}\r\n\t}\r\n\r\n\t$t = $tmp_t;\r\n\r\n\treturn $s;\r\n}", "public function parse_media()\n\t{\n\t\ttry\n\t\t{\n\t\t\t// Get the droplet content\n\t\t\t$droplet = & Swiftriver_Event::$data;\n\t\t\t\n\t\t\tKohana::$log->add(Log::DEBUG, \"Media extraction started for drop with id :id\", array(':id' => $droplet['id']));\n\t\t\tKohana::$log->write();\n\t\t\t\n\t\t\t$links = array();\n\t\t\t$images = array();\n\t\t\t\t\t\t\n\t\t\t//Get the urls from the anchor and image tags in the drop \n\t\t\tif (preg_match_all('/<\\s*(a|img)\\s*[^>]*(?:(?:href|src)\\s*=\\s*\"([^\"]+))\"[^>]*>/i', $droplet['droplet_raw'], $tag_matches))\n\t\t\t{\n\t\t\t\tforeach ($tag_matches[2] as $key => $url)\n\t\t\t\t{\n\t\t\t\t\tif ($tag_matches[1][$key] == 'img')\n\t\t\t\t\t{\n\t\t\t\t\t\t$images[] = $url;\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// Only expand URLs from known shortening services\n\t\t\t\t\t\tif ($this->_is_short_url($url))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$url = $this->full($url);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$this->parse_link($url, $images, $links);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Get links that from the html text\n\t\t\t// http://daringfireball.net/2010/07/improved_regex_for_matching_urls\n\t\t\t$pattern = \"(?i)\\b((?:https?:\\/\\/|www\\d{0,3}[.]|[a-z0-9.\\-]+[.][a-z]\"\n\t\t\t . \"{2,4}\\/)(?:[^\\s()<>]+|\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\))+(?:\\((\"\n\t\t\t . \"[^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\)|[^\\s`!()\\[\\]{};:'\\\".,<>?«»“”‘’]))\";\n\t\t\tif (preg_match_all(\"/\".$pattern.\"/is\", strip_tags($droplet['droplet_raw']), $text_matches))\n\t\t\t{\n\t\t\t\tforeach ($text_matches[0] as $key => $url)\n\t\t\t\t{\n\t\t\t\t\t// Only expand urls from known shortening services\n\t\t\t\t\tif ($this->_is_short_url($url))\n\t\t\t\t\t{ \n\t\t\t\t\t\t$url = $this->full($url);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$this->parse_link($url, $images, $links);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\t\t\t \n\t\t\t// Save the links\n\t\t\tif ( ! empty($links))\n\t\t\t{\n\t\t\t\tif ( ! isset($droplet['links']))\n\t\t\t\t{\n\t\t\t\t\t$droplet['links'] = $links;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$droplet['links'] = array_merge($droplet['links'], $links);\n\t\t\t\t}\n\t\t\t}\n \n \n\t\t\t// Remove Images we don't need\n\t\t\t$images = Mediaextractor_Filter::dejunk($images);\n \n\t\t\t// Remove dupes\n\t\t\t$images = array_unique($images);\n\t\t\t\n\t\t\t// Get a droplet image and remove tiny images.\n\t\t\t$selected_images = array();\n\t\t\t$droplet_image = NULL;\n\t\t\t$cur_max = 0;\n\t\t\tforeach ($images as $key => $image)\n\t\t\t{\n\t\t\t\t list($width, $height) = getimagesize($image);\n\t\t\t\t\n\t\t\t\t// We only want images larger than 1000 square pixels\n\t\t\t\t$area = $width * $height;\n\t\t\t\tif ($area >= 5000)\n\t\t\t\t{\n\t\t\t\t\t$selected_images[] = $image;\n\t\t\t\t\t\n\t\t\t\t\t// The drop image is the largest image\n\t\t\t\t\tif ($area > $cur_max)\n\t\t\t\t\t{\n\t\t\t\t\t\t$cur_max = $area;\n\t\t\t\t\t\t$droplet_image = $image;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n \n\t\t\t// Save the Images\n\t\t\tif ( ! empty($selected_images))\n\t\t\t{\n\t\t\t\t$droplet['media'] = array();\n\t\t\t\tforeach ($selected_images as $image)\n\t\t\t\t{\n\t\t\t\t\t$droplet['media'][] = array(\n\t\t\t\t\t\t'url' => $image,\n\t\t\t\t\t\t'type' => 'image',\n\t\t\t\t\t\t'droplet_image' => $image == $droplet_image\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$droplet['media_complete'] = TRUE;\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\t// Some kind of error occurred\n\t\t\tKohana::$log->add(Log::ERROR, Kohana_Exception::text($e));\n\t\t}\n\t}", "public static function init()\n\t{\n\t\t$classname = get_called_class();\n\n\t\tadd_shortcode( static::SHORTCODE_TAG, array( $classname, 'shortcodeHandler' ) );\n\n\t\t// convert a URL into the shortcode equivalent\n\t\twp_embed_register_handler(\n\t\t\tstatic::SHORTCODE_TAG,\n\t\t\tstatic::URL_REGEX,\n\t\t\tarray( $classname, 'linkHandler' ),\n\t\t\t1\n\t\t);\n\n\t\t// Shortcode UI, if supported\n\t\tadd_action(\n\t\t\t'register_shortcode_ui',\n\t\t\tarray( $classname, 'shortcodeUI' ),\n\t\t\t5,\n\t\t\t0\n\t\t);\n\t}", "public abstract function render_media($instance);", "function _media_button($title, $icon, $type, $id)\n {\n }", "public function createMediaProvider();", "public function listen() {\n add_filter( \"the_content\", array($this, \"theContent\"));\n add_filter( \"the_title\", array($this, \"theTitle\"));\n }", "public function get_media()\n {\n }", "public function media();", "function show_custom_field($field, $value) {\n\t$output = '';\n\tswitch ($field['type']) {\n\t\tcase 'reviews':\n\t\t\t$output .= '<div class=\"reviewBlock\"><div class=\"ratingStars\">' . getReviewsMarkup($field, $value, true) . '</div></div>';\n\t\t\tbreak;\n\n\t\tcase 'mediamanager':\n\t\t\twp_enqueue_media( );\n\t\t\t$output .= '<a id=\"'.$field['id'].'\" class=\"button mediamanager\"\n\t\t\t\tdata-choose=\"'.(isset($field['multiple']) && $field['multiple'] ? __( 'Choose Images', 'themerex') : __( 'Choose Image', 'themerex')).'\"\n\t\t\t\tdata-update=\"'.(isset($field['multiple']) && $field['multiple'] ? __( 'Add to Gallery', 'themerex') : __( 'Choose Image', 'themerex')).'\"\n\t\t\t\tdata-multiple=\"'.(isset($field['multiple']) && $field['multiple'] ? 'true' : 'false').'\"\n\t\t\t\tdata-linked-field=\"'.$field['media_field_id'].'\"\n\t\t\t\tonclick=\"showMediaManager(this); return false;\"\n\t\t\t\t>' . (isset($field['multiple']) && $field['multiple'] ? __( 'Choose Images', 'themerex') : __( 'Choose Image', 'themerex')) . '</a>';\n\t\t\tbreak;\n\t}\n\treturn $output;\n}", "public function dispatch()\n {\n $this->setSingular($this->getArgument('title'));\n $this->setPlural($this->getArgument('title'));\n\n $this->hook->action(\n 'after_setup_theme',\n [$this, 'register']\n )->dispatch();\n\n $this->hook->filter(\n 'image_size_names_choose',\n [$this, 'registerName']\n )->dispatch();\n }", "function defineHandlers() {\n EventsManager::listen('on_rawtext_to_richtext', 'on_rawtext_to_richtext');\n EventsManager::listen('on_daily', 'on_daily');\n EventsManager::listen('on_wireframe_updates', 'on_wireframe_updates');\n }", "public function admin_init() {\n\t\tif ( count( $this->get_gallery_types() ) < 2 ) {\n\t\t\treturn;\n\t\t}\n\n\t\tload_plugin_textdomain( 'gallery-types', false, plugin_basename( PLUGIN_DIR ) . '/languages' );\n\n\t\tadd_action( 'wp_enqueue_media', [ $this, 'enqueue_script' ] );\n\t\tadd_action( 'print_media_templates', [ $this, 'print_js_template' ] );\n\t\tadd_filter( 'media_view_settings', [ $this, 'gallery_default_shortcode_atts' ] );\n\t}", "public function registerMediaConversions(Media $media = null)\n {\n }", "public function registerMediaCollections()\n {\n parent::registerMediaCollections();\n $this->addMediaCollection('illustrations')\n ->singleFile()\n ->acceptsMimeTypes(['image/jpeg', 'image/png'])\n ->registerMediaConversions(function (Media $media = null) {\n $this->addMediaConversion('cover')\n ->fit(Manipulations::FIT_CROP, 1140, 500)\n ->withResponsiveImages()\n ->keepOriginalImageFormat();\n $this->addMediaConversion('card')\n ->fit(Manipulations::FIT_CROP, 350, 250)\n ->keepOriginalImageFormat();\n });\n }", "public static function usesCustomHandler();", "private static function media()\n {\n $files = ['QR'];\n $folder = static::$root.'Media'.'/';\n\n self::call($files, $folder);\n }", "public function __construct(\n $legend = null,\n $listing = 'sp::includes.form.media-dynamic-listing',\n $template = 'sp::includes.form.media-dynamic-template',\n $min = null,\n $max = null,\n $name = 'media',\n $type = 'media',\n $sortable = false,\n $items = [],\n $defaults = [],\n $itemsDisabled = [],\n $help = null,\n $btnConfig = 'backend.buttons',\n $before = null,\n $after = null,\n\n $formats = null,\n $size = null,\n $width = null,\n $height = null,\n $weight = null,\n $hasName = false,\n $hasPreview = false,\n $hasDownload = false,\n $required = false\n )\n {\n $this->legend = $legend;\n $this->listing = $listing;\n $this->template = $template;\n $this->min = $min;\n $this->max = $max;\n $this->name = $name;\n $this->type = $type;\n $this->sortable = $sortable;\n $this->items = $items;\n $this->defaults = $this->defineDefaults($defaults);\n $this->itemsDisabled = is_array($itemsDisabled) ? $itemsDisabled : [$itemsDisabled];\n $this->btnConfig = $btnConfig;\n $this->before = $before;\n $this->after = $after;\n\n $this->key = 'KEY_'.$type;\n $this->btnAdd = $this->defineButton('add');\n $this->btnRemove = $this->defineButton('remove');\n $this->btnDelete = $this->defineButton('delete');\n $this->btnMove = $this->defineButton('move');\n\n $this->formats = $formats;\n $this->size = $size;\n $this->width = $width;\n $this->height = $height;\n $this->weight = $weight;\n $this->hasName = $hasName;\n $this->hasPreview = $hasPreview;\n $this->hasDownload = $hasDownload;\n $this->isRequired = $required;\n $this->help = $this->defineHelp($help);\n }", "function setup_ffw_media_post_types() {\n\tglobal $ffw_media_settings;\n\t$archives = defined( 'FFW_MEDIA_DISABLE_ARCHIVE' ) && FFW_MEDIA_DISABLE_ARCHIVE ? false : true;\n\n\t//Check to see if anything is set in the settings area.\n\tif( !empty( $ffw_media_settings['media_slug'] ) ) {\n\t $slug = defined( 'FFW_MEDIA_SLUG' ) ? FFW_MEDIA_SLUG : $ffw_media_settings['media_slug'];\n\t} else {\n\t $slug = defined( 'FFW_MEDIA_SLUG' ) ? FFW_MEDIA_SLUG : 'media';\n\t}\n\t\n\t$rewrite = defined( 'FFW_MEDIA_DISABLE_REWRITE' ) && FFW_MEDIA_DISABLE_REWRITE ? false : array('slug' => $slug, 'with_front' => false);\n\n\t$media_labels = apply_filters( 'ffw_media_media_labels', array(\n\t\t'name' \t\t\t\t=> '%2$s',\n\t\t'singular_name' \t=> '%1$s',\n\t\t'add_new' \t\t\t=> __( 'Add New', 'FFW_media' ),\n\t\t'add_new_item' \t\t=> __( 'Add New %1$s', 'FFW_media' ),\n\t\t'edit_item' \t\t=> __( 'Edit %1$s', 'FFW_media' ),\n\t\t'new_item' \t\t\t=> __( 'New %1$s', 'FFW_media' ),\n\t\t'all_items' \t\t=> __( 'All %2$s', 'FFW_media' ),\n\t\t'view_item' \t\t=> __( 'View %1$s', 'FFW_media' ),\n\t\t'search_items' \t\t=> __( 'Search %2$s', 'FFW_media' ),\n\t\t'not_found' \t\t=> __( 'No %2$s found', 'FFW_media' ),\n\t\t'not_found_in_trash'=> __( 'No %2$s found in Trash', 'FFW_media' ),\n\t\t'parent_item_colon' => '',\n\t\t'menu_name' \t\t=> __( '%2$s', 'FFW_media' )\n\t) );\n\n\tforeach ( $media_labels as $key => $value ) {\n\t $media_labels[ $key ] = sprintf( $value, ffw_media_get_label_singular(), ffw_media_get_label_plural() );\n\t}\n\n\t$media_args = array(\n\t\t'labels' \t\t\t=> $media_labels,\n\t\t'public' \t\t\t=> true,\n\t\t'publicly_queryable'=> true,\n\t\t'show_ui' \t\t\t=> true,\n\t\t'show_in_menu' \t\t=> true,\n\t\t'menu_icon' => 'dashicons-editor-video',\n\t\t'menu_position' => '34.5',\n\t\t'query_var' \t\t=> true,\n\t\t'rewrite' \t\t\t=> $rewrite,\n\t\t'map_meta_cap' => true,\n\t\t'has_archive' \t\t=> $archives,\n\t\t'show_in_nav_menus'\t=> true,\n\t\t'hierarchical' \t\t=> false,\n\t\t'supports' \t\t\t=> apply_filters( 'ffw_media_supports', array( 'title', 'editor', 'thumbnail', 'excerpt' ) ),\n\t);\n\tregister_post_type( 'FFW_media', apply_filters( 'ffw_media_post_type_args', $media_args ) );\n\t\n}", "function thinkup_input_blogmediaclass($classes) {\nglobal $post;\n\n// Get theme options values.\n$thinkup_blog_postswitch = thinkup_var ( 'thinkup_blog_postswitch' );\n\n\t$featured_id = get_post_thumbnail_id( $post->ID );\n\n\t// Determine featured media to input\n\tif ( thinkup_check_isblog() ) {\n\t\tif ( empty( $featured_id ) or $thinkup_blog_postswitch == 'option2' ) {\n\t\t\t$classes[] = 'format-nomedia';\n\t\t}\n\t}\n\treturn $classes;\n}", "function atto_media_strings_for_js() {\n global $PAGE;\n\n $PAGE->requires->strings_for_js(array('add',\n 'addcaptionstrack',\n 'addchapterstrack',\n 'adddescriptionstrack',\n 'addmetadatatrack',\n 'addsource',\n 'addsubtitlestrack',\n 'addtrack',\n 'advancedsettings',\n 'audio',\n 'audiosourcelabel',\n 'autoplay',\n 'browserepositories',\n 'browserepositories',\n 'captions',\n 'captionssourcelabel',\n 'chapters',\n 'chapterssourcelabel',\n 'controls',\n 'createmedia',\n 'default',\n 'descriptions',\n 'descriptionssourcelabel',\n 'displayoptions',\n 'entername',\n 'entertitle',\n 'entersource',\n 'enterurl',\n 'height',\n 'kind',\n 'label',\n 'languagesavailable',\n 'languagesinstalled',\n 'link',\n 'loop',\n 'metadata',\n 'metadatasourcelabel',\n 'mute',\n 'poster',\n 'remove',\n 'size',\n 'srclang',\n 'subtitles',\n 'subtitlessourcelabel',\n 'track',\n 'tracks',\n 'video',\n 'videoheight',\n 'videosourcelabel',\n 'videowidth',\n 'width'),\n 'atto_media');\n}", "function thinkup_input_postmediaclass($classes) {\n\n\tif ( is_singular( 'post' ) ) {\n\t\tif ( get_post_format() == 'image' or get_post_format() == 'gallery' or get_post_format() == 'video' ) {\n\t\t\t$classes[] = 'format-media';\n\t\t} else {\n\t\t\t$classes[] = 'format-nomedia';\t\t\t\n\t\t}\n\t}\n\treturn $classes;\n}", "public function media(string $filename, string $src, string $mime_type='application/octet-stream'): void{\n\t\t$this->media[$filename] = [basename($filename),$src,$mime_type];\n\t}", "public static function setup(): void {\n\t\tglobal $wgFileExtensions, $wgMediaHandlers, $wgEmbedVideoDefaultWidth,\n\t\t\t $wgEmbedVideoEnableAudioHandler, $wgEmbedVideoEnableVideoHandler, $wgEmbedVideoAddFileExtensions;\n\n\t\tif ( !isset( $wgEmbedVideoDefaultWidth ) &&\n\t\t\t( isset( $_SERVER['HTTP_X_MOBILE'] ) && $_SERVER['HTTP_X_MOBILE'] === 'true' ) &&\n\t\t\t$_COOKIE['stopMobileRedirect'] !== 1 ) {\n\t\t\t// Set a smaller default width when in mobile view.\n\t\t\t$wgEmbedVideoDefaultWidth = 320;\n\t\t}\n\n\t\t$audioHandler = AudioHandler::class;\n\t\t$videoHandler = VideoHandler::class;\n\n\t\tif ( $wgEmbedVideoEnableAudioHandler ) {\n\t\t\t$wgMediaHandlers['application/ogg']\t\t= $audioHandler;\n\t\t\t$wgMediaHandlers['audio/flac']\t\t\t= $audioHandler;\n\t\t\t$wgMediaHandlers['audio/ogg']\t\t\t= $audioHandler;\n\t\t\t$wgMediaHandlers['audio/mpeg']\t\t\t= $audioHandler;\n\t\t\t$wgMediaHandlers['audio/mp4']\t\t\t= $audioHandler;\n\t\t\t$wgMediaHandlers['audio/wav']\t\t\t= $audioHandler;\n\t\t\t$wgMediaHandlers['audio/webm']\t\t\t= $audioHandler;\n\t\t\t$wgMediaHandlers['audio/x-flac']\t\t= $audioHandler;\n\t\t}\n\n\t\tif ( $wgEmbedVideoEnableVideoHandler ) {\n\t\t\t$wgMediaHandlers['video/mp4']\t\t\t= $videoHandler;\n\t\t\t$wgMediaHandlers['video/ogg']\t\t\t= $videoHandler;\n\t\t\t$wgMediaHandlers['video/quicktime']\t\t= $videoHandler;\n\t\t\t$wgMediaHandlers['video/webm']\t\t\t= $videoHandler;\n\t\t\t$wgMediaHandlers['video/x-matroska']\t= $videoHandler;\n\t\t}\n\n\t\tif ( $wgEmbedVideoAddFileExtensions ) {\n\t\t\t$wgFileExtensions[] = 'flac';\n\t\t\t$wgFileExtensions[] = 'mkv';\n\t\t\t$wgFileExtensions[] = 'mov';\n\t\t\t$wgFileExtensions[] = 'mp3';\n\t\t\t$wgFileExtensions[] = 'mp4';\n\t\t\t$wgFileExtensions[] = 'oga';\n\t\t\t$wgFileExtensions[] = 'ogg';\n\t\t\t$wgFileExtensions[] = 'ogv';\n\t\t\t$wgFileExtensions[] = 'wav';\n\t\t\t$wgFileExtensions[] = 'webm';\n\t\t}\n\t}", "function mr_megaresult_shortcode_handler( $attrs, $content=null) {\n return \"look, a shortcode!\";\n}", "function bp_media_register_widgets() {\n\tadd_action('widgets_init', create_function('', 'return register_widget(\"BP_Media_Widget\");') );\n}", "protected function getForm_Type_MediaService()\n {\n return $this->services['form.type.media'] = new \\Victoire\\Bundle\\MediaBundle\\Form\\Type\\MediaType($this->get('victoire_media.media_manager'), $this->get('doctrine.orm.default_entity_manager'));\n }", "public function parse(string $rawContent)\n {\n parent::parse($rawContent);\n\n $encoding = $this->tagParser->getEncoding($rawContent{0});\n $content = substr($rawContent, 1);\n $typeParts = Helpers::splitString(\"\\x00\", $content, 2);\n\n $this->encoding = $encoding;\n $this->mimeType = $typeParts[0];\n $this->pictureType = $typeParts[1]{0};\n\n $string = substr($typeParts[1], 1);\n $strings = Helpers::splitString($encoding->getDelimiter(), $string, 2);\n\n $this->description = $strings[0];\n $this->pictureData = $strings[1];\n\n $this->_handleDefaultValues();\n\n // TODO: If MIME type is \"-->\", the picture data is a URL.\n }", "public function setMedia()\n {\n }", "public function setMedia()\n {\n }", "public function setMedia()\n {\n }", "function update_bison_media() {\r\n register_setting( 'bison-media-info-settings', 'bison_media' );\r\n }", "function media_upload_audio()\n {\n }", "protected function getAllAvailableMediaTypesOptions() {}", "public function init()\n {\n $this->shortcode->getHandlers()->add('size', function(ShortcodeInterface $sc) {\n $size = $sc->getParameter('s', $this->getBbCode($sc));\n if ( is_numeric($size) ) { $size = $size.'px' ; }\n return '<span style=\"font-size: '.$size.';\">'.$sc->getContent().'</span>';\n });\n }", "public function registerMediaCollections()\n {\n $this->addMediaCollection('vendor_kit')->singleFile();\n $this->addMediaCollection('banner');\n }", "public function wp_handle_upload( $upload ) {\n $file = $upload['file'];\n $url = $upload['url'];\n $type = $upload['type'];\n\n $client = ud_get_stateless_media()->get_client();\n $upload_dir = wp_upload_dir();\n\n $file_path = str_replace(trailingslashit($upload_dir[ 'basedir' ]), '', $file);\n $file_path = apply_filters('wp_stateless_file_name', $file_path);\n $file_info = @getimagesize($file);\n\n if ($file_info) {\n $_metadata = array(\n 'width' => $file_info[0],\n 'height' => $file_info[1],\n 'object-id' => 'unknown', // we really don't know it\n 'source-id' => md5( $file . ud_get_stateless_media()->get( 'sm.bucket' ) ),\n 'file-hash' => md5( $file )\n );\n }\n\n $media = $client->add_media(apply_filters('sm:item:on_fly:before_add', array_filter(array(\n 'name' => $file_path,\n 'absolutePath' => wp_normalize_path($file),\n 'cacheControl' => apply_filters('sm:item:cacheControl', 'public, max-age=36000, must-revalidate', $_metadata),\n 'contentDisposition' => null,\n 'mimeType' => $type,\n 'metadata' => $_metadata\n ))));\n \n $upload['url'] = ud_get_stateless_media()->get_gs_host() . '/' . $file_path;\n return $upload;\n }", "function media_send_to_editor($html)\n {\n }", "public function register_media_buttons() {\n\t\t\t$current_screen = get_current_screen();\n\t\t\tif ( $current_screen->base === 'post' ) {\n\t\t\t\tadd_action( 'media_buttons', [ $this, 'add_media_buttons' ], 20 );\n\t\t\t\tadd_action( 'admin_footer', [ $this, 'add_mce_popup' ] );\n\t\t\t}\n\t\t}", "function registerHandler($format, $callback);", "private function loadMediaTypes()\n {\n return json_decode(file_get_contents(__DIR__ . '/mediatypes.json'), true);\n }", "function register_taxonomy() {\n/*\n\t\t$labels = mediatags_get_taxonomy_labels();\n\t\t $labels = array(\n\t\t 'name' \t\t\t\t=> _x( 'Media-Tags', \t\t\t'taxonomy general name', \t\tMEDIA_TAGS_I18N_DOMAIN ),\n\t\t 'singular_name' \t=> _x( 'Media-Tag', \t\t\t'taxonomy singular name', \t\tMEDIA_TAGS_I18N_DOMAIN ),\n\t\t 'search_items' \t\t=> _x( 'Search Media-Tags', \t'taxonomy search items', \t\tMEDIA_TAGS_I18N_DOMAIN ),\n\t\t\t'popular_items' \t=> _x( 'Popular Media-Tags', \t'taxonomy popular item', \t\tMEDIA_TAGS_I18N_DOMAIN),\t\t\n\t\t 'all_items' \t\t=> _x( 'All Media-Tags', \t\t'taxonomy all items', \t\t\tMEDIA_TAGS_I18N_DOMAIN ),\n\t\t 'parent_item' \t\t=> _x( 'Parent Media-Tag', \t\t'taxonomy parent item', \t\tMEDIA_TAGS_I18N_DOMAIN ),\n\t\t 'parent_item_colon' => _x( 'Parent Media-Tag:', \t'taxonomy parent item colon', \tMEDIA_TAGS_I18N_DOMAIN ),\n\t\t 'edit_item' \t\t=> _x( 'Edit Media-Tag', \t\t'taxonomy edit item', \t\t\tMEDIA_TAGS_I18N_DOMAIN ), \n\t\t 'update_item' \t\t=> _x( 'Update Media-Tag', \t\t'taxonomy update item', \t\tMEDIA_TAGS_I18N_DOMAIN ),\n\t\t 'add_new_item' \t\t=> _x( 'Add New Media-Tag', \t'taxonomy add new item', \t\tMEDIA_TAGS_I18N_DOMAIN ),\n\t\t 'new_item_name' \t=> _x( 'New Media-Tag Name', \t'taxonomy new item name', \t\tMEDIA_TAGS_I18N_DOMAIN ),\n\t\t );\n*/\n\t\t$labels = mediatags_get_taxonomy_labels();\n\t\n\n\t\tregister_taxonomy(MEDIA_TAGS_TAXONOMY, MEDIA_TAGS_TAXONOMY, array(\n\t\t 'hierarchical' \t\t=> false,\n\t\t 'labels' \t\t\t=> $labels,\n\t\t\t'show_ui' \t\t\t=> false,\n\t\t\t'show_in_nav_menus'\t=> true,\n\t\t\t'show_tagcloud'\t\t=> true,\n\t\t 'query_var' \t\t=> true,\n\t\t 'rewrite' \t\t\t=> array( 'slug' => MEDIA_TAGS_URL, 'with_front' => true ),\n\t\t\t'capabilities' \t\t=> $this->default_caps\n\t\t ));\n\t}", "public function media_upload()\n\t{\n\t\t$this->api->check_authentication();\n\n\t\twp_iframe(array(&$this, 'media_upload_content'));\n\t}", "protected function kbSetMedia()\n {\n /* CSS files */\n $this->context->controller->addCSS($this->_path . 'views/css/front/kb_front.css');\n \n /* JS files */\n $this->context->controller->addJS($this->_path . 'views/js/velovalidation.js');\n $this->context->controller->addJS($this->_path . 'views/js/firebase/firebase-app.js');\n $this->context->controller->addJS($this->_path . 'views/js/firebase/firebase-storage.js');\n $this->context->controller->addJS($this->_path . 'views/js/firebase/firebase-auth.js');\n $this->context->controller->addJS($this->_path . 'views/js/firebase/firebase-database.js');\n $this->context->controller->addJS($this->_path . 'views/js/firebase/firebase-messaging.js');\n $this->context->controller->addJS($this->_path . 'views/js/firebase/firebase.js');\n $this->context->controller->addJS($this->_path . 'views/js/service_worker_registeration_template.js');\n $this->context->controller->addJS($this->_path . 'views/js/front/kb_front.js');\n }", "protected function addMediaFieldType(ContainerBuilder $container)\n {\n $fieldTypes = array_merge(\n $container->getParameter('open_orchestra_backoffice.field_types'),\n array(\n 'orchestra_media' => array(\n 'label' => 'open_orchestra_media_admin.form.field_type.custom_type.media',\n 'type' => 'oo_media_choice',\n 'deserialize_type' => 'array',\n 'search' => 'text',\n 'default_value' => array(\n 'type' => 'oo_media_choice',\n 'options' => array(\n 'label' => 'open_orchestra_backoffice.form.field_type.default_value',\n 'required' => false,\n ),\n ),\n 'options' => array(\n 'required' => array(\n 'default_value' => false,\n ),\n 'filter' => array(\n 'default_value' => ''\n )\n )\n )\n )\n );\n\n $container->setParameter('open_orchestra_backoffice.field_types', $fieldTypes);\n\n $mediaTypeFilterChoices = array('' => 'open_orchestra_media_admin.media_filter.none');\n $mediaTypeFilterChoices = array_merge($mediaTypeFilterChoices, $container->getParameter('open_orchestra_media_admin.media_type_filter'));\n\n $options = array_merge(\n $container->getParameter('open_orchestra_backoffice.options'),\n array(\n 'filter' => array(\n 'type' => 'choice',\n 'label' => 'open_orchestra_media_admin.form.field_type.field_option.filter',\n 'required' => false,\n 'choices' => $mediaTypeFilterChoices,\n )\n )\n );\n\n $container->setParameter('open_orchestra_backoffice.options', $options);\n }", "function constructHTML_media($boundary) {\n\t\t\t// media is added\n\t\tif (is_array($this->theParts['html']['media']) && $this->includeMedia) {\n\t\t\tforeach ($this->theParts['html']['media'] as $key => $media) {\n\t\t\t\tif (!$this->mediaList || t3lib_div::inList($this->mediaList,$key))\t{\n\t\t\t\t\t$this->add_message(\"--\".$boundary);\n\t\t\t\t\t$this->add_message(\"Content-Type: \".$media[\"ctype\"]);\n\t\t\t\t\t$this->add_message(\"Content-ID: <part\".$key.\".\".$this->messageid.\">\");\n\t\t\t\t\t$this->add_message(\"Content-Transfer-Encoding: base64\");\n\t\t\t\t\t$this->add_message('');\n\t\t\t\t\t$this->add_message($this->makeBase64($media[\"content\"]));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$this->add_message(\"--\".$boundary.\"--\\n\");\n\t}", "function getMediaTypes ()\n {\n try\n {\n $result = $this->apiCall('get',\"{$this->api['syndication_url']}/resources/mediaTypes.json\");\n return $this->createResponse($result,'get All MediaTypes');\n } catch ( Exception $e ) {\n return $this->createResponse($e,'API Call');\n }\n }", "public function registerMediaCollections()\n {\n \tCollection::make($this->medias)->each(function($config, $name) { \n tap($this->addMediaCollection($name), function($collection) use ($config) {\n $collection->useDisk($config['disk'] ?? 'armin.file');\n $collection->useFallbackUrl(schema_placeholder('main'));\n\n if(! isset($config['multiple']) || $config['multiple'] === false) {\n $collection->singleFile();\n }\n\n $collection->registerMediaConversions(function(Media $media) use ($config) {\n $this->schemas($config['schemas'] ?? '*')->each([\n $this, 'registerSchemaConversion'\n ]); \n });\n }); \n \t});\n }", "function meom_eml_enqueue_media() {\n if ( ! is_admin() ) {\n return;\n }\n wp_enqueue_script(\n 'wpuxss-eml-media-views-script',\n plugin_dir_url( __FILE__ ) . 'js/eml-media-views.js',\n array( 'media-views' ),\n MEOM_EML_VERSION,\n true\n );\n}", "public static function get_sermon_media() {\n\t\tglobal $wp_embed;\n\n\t\t$media = array('video', 'audio', 'document', 'link');\n\t\t$media_links = array();\n\t\t$media_inline = array();\n\n\t\tforeach ($media as $slug) {\n\t\t\t$link = wpv_post_meta(get_the_ID(), \"wpv-sermon-$slug\", true);\n\n\t\t\tif(!empty($link)) {\n\t\t\t\tif( ($slug == 'video' || $slug == 'audio') && !preg_match('/youtu\\.?be|dailymotion|vimeo/', $link)) {\n\t\t\t\t\t$id = 'sermon-'.md5(uniqid(true));\n\t\t\t\t\t$media_links[$slug] = '#' . $id;\n\t\t\t\t\t$media_inline[$id] = do_shortcode( $wp_embed->run_shortcode( '[embed width=\"1000\" height=\"562\"]'. strtr( $link, array( ' ' => '%20' ) ) .'[/embed]' ) );\n\t\t\t\t} else {\n\t\t\t\t\t$media_links[$slug] = $link;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn compact('media_links', 'media_inline');\n\t}", "function add_media_picker( int $post_id, string $key, string $label ): void {\n\t\t\\wpinc\\meta\\add_media_picker( $post_id, $key, $label );\n\t}", "public function render_media($instance)\n {\n }", "public function render_media($instance)\n {\n }", "public function render_media($instance)\n {\n }", "public function render_media($instance)\n {\n }", "public function setMedia($isNewTheme = false)\n {\n parent::setMedia($isNewTheme);\n\n if (in_array($this->display, ['add', 'edit', 'list'])) {\n $this->addJqueryPlugin('autocomplete');\n $this->addJS($this->module->getPathUri().'views/js/admin/reward.js');\n\n Media::addJsDef([\n '$gamificationsRewardControllerUrl' =>\n $this->context->link->getAdminLink(Gamifications::ADMIN_GAMIFICATIONS_REWARD_CONTROLLER),\n ]);\n }\n }", "public function subscribe()\r\n {\r\n /* Fire our meta box setup function on the post editor screen. */\r\n add_action('load-post.php', array(\r\n $this,\r\n 'setup'\r\n ));\r\n add_action('load-post-new.php', array(\r\n $this,\r\n 'setup'\r\n ));\r\n }", "public function getMediaTypesLinks()\n {\n $links = array();\n\t\t\n\t\t$modulevars = ModUtil::getVar('Mediasharex');\n\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'mainsettings'), 'text' => $this->__('Main settings'), 'class' => 'z-icon-es-confi');\n }\n\n if (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'managealbums'), 'text' => $this->__('Albums'), 'class' => 'z-icon-es-displa');\n }\n\t\t\n if (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'manageitems'), 'text' => $this->__('Media'), 'class' => 'z-icon-es-displa');\n }\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'managemediastore'), 'text' => $this->__('Media store'), 'class' => 'z-icon-es-displa');\n }\n \n\t\t\t\n return $links;\n }", "function BH_register_posttypes() {\r\n\r\n\tBH_register_posttype_event();\r\n\tBH_register_posttype_gallery();\r\n\r\n}", "function get_attached_media($type, $post = 0)\n {\n }", "function addCustomRTESupport($obj_id, $obj_type, $tags)\n\t{\n\t\t// must be overwritten in parent classes\n\t}", "function lqd_customize_register( $wp_customize ) {\n $wp_customize->add_section( 'lqd_theme', array(\n 'title' => 'Liquid Options',\n 'description' => 'Settings',\n 'priority' => 1,\n 'sanitize_callback' == 'esc_url_raw',\n ) );\n\n // Add setting for logo uploader\n $wp_customize->add_setting( 'm1_logo', 'sanitize_callback' == 'esc_url_raw' );\n\n // Add control for logo uploader (actual uploader)\n $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'm1_logo', array(\n 'label' => __( 'Header Logo', 'liquidchurch' ),\n 'section' => 'lqd_theme',\n 'settings' => 'm1_logo',\n 'priority' => 1,\n 'sanitize_callback' == 'esc_url_raw',\n ) ) );\n\n /* Social Icons */\n /* Facebook */\n $wp_customize->add_setting( 'facebook_id_theme', 'sanitize_callback' == 'esc_url_raw' );\n $wp_customize->add_control( 'facebook_id', array(\n 'label' => __( 'Facebook Link', 'liquidchurch' ),\n\t\t'section' => 'lqd_theme',\n\t\t'type' => 'text',\n\t\t'settings' => 'facebook_id_theme',\n\t\t'priority' => 3,\n\t\t'sanitize_callback' == 'esc_url_raw',\n ) );\n\n /* Twitter */\n $wp_customize->add_setting( 'twitter_id_theme', 'sanitize_callback' == 'esc_url_raw' ); // Twiiter\n $wp_customize->add_control( 'twitter_id', array(\n\t\t'label' => __( 'Twitter Link', 'liquidchurch' ),\n\t\t'section' => 'lqd_theme',\n\t\t'type' => 'text',\n\t\t'settings' => 'twitter_id_theme',\n\t\t'priority' => 4,\n\t\t'sanitize_callback' == 'esc_url_raw',\n\t) );\n\n /* YouTube */\n $wp_customize->add_setting( 'youtube_id_theme','sanitize_callback' == 'esc_url_raw' ); // youtube\n $wp_customize->add_control( 'youtube_id', array(\n 'label' => __( 'Youtube Link', 'liquidchurch' ),\n 'section' => 'lqd_theme',\n 'type' => 'text',\n 'settings' => 'youtube_id_theme',\n 'priority' => 5,\n 'sanitize_callback' == 'esc_url_raw',\n\t) );\n\n /* Instagram */\n $wp_customize->add_setting( 'instagram_id_theme','sanitize_callback' == 'esc_url_raw' ); // nstagram\n $wp_customize->add_control( 'instagram_id', array(\n 'label' => __( 'Instagram Link', 'liquidchurch' ),\n\t\t'section' => 'lqd_theme',\n\t\t'type' => 'text',\n\t\t'settings' => 'instagram_id_theme',\n\t\t'priority' => 6,\n\t\t'sanitize_callback' == 'esc_url_raw',\n\t) );\n\n /* Vimeo */\n $wp_customize->add_setting( 'vimeo_id_theme','sanitize_callback' == 'esc_url_raw' ); // vimeo\n $wp_customize->add_control( 'vimeo_id', array(\n 'label' => __( 'Vimeo Link', 'liquidchurch' ),\n\t\t'section' => 'lqd_theme',\n\t\t'type' => 'text',\n\t\t'settings' => 'vimeo_id_theme',\n\t\t'priority' => 7,\n\t\t'sanitize_callback' == 'esc_url_raw',\n\t) );\n\n}", "function register_work() {\n\tregister_extended_post_type( 'work', array(\n\t\t'menu_icon' \t\t=> 'dashicons-art',\n\t\t'supports' \t\t\t=> array( 'title', 'editor', 'excerpt', 'thumbnail' ),\n\t) );\n}", "function shortcode_ra_widget($att, $cont){\t\n\t\t\tif (qw_hook_exist(__FUNCTION__)) {$args=func_get_args(); array_unshift($args, $this); return qw_event_hook(__FUNCTION__, $args, NULL); }\n\t\t\t\n\t\t\tif (isset($att['limit'])) $limit = $att['limit']; else $limit = 5;\n\t\t\tob_start();\n\t\t\tif($att['name'] == 'Ra Ask Box'){\t\t\t\t\n\t\t\t\tra_ask_form();\t\t\t\t\t\n\t\t\t}elseif($att['name'] == 'Ra Stats'){\n\t\t\t\tra_builder_stats();\n\t\t\t}elseif($att['name'] == 'Ra Ads'){\n\t\t\t\t$this->sc_ra_ads($limit );\n\t\t\t}elseif($att['name'] == 'Ra Questions List'){\n\t\t\t\tra_builder_ql($limit );\n\t\t\t}elseif($att['name'] == 'Ra Answers List'){\n\t\t\t\tra_builder_al($limit );\n\t\t\t}elseif($att['name'] == 'Ra Comments List'){\n\t\t\t\tra_builder_cl($limit );\n\t\t\t}elseif($att['name'] == 'Ra New Users'){\n\t\t\t\tra_builder_new_users($limit );\n\t\t\t}elseif($att['name'] == 'Ra Top Users'){\n\t\t\t\tra_builder_top_users($limit);\n\t\t\t}elseif($att['name'] == 'Ra Events'){\n\t\t\t\tra_builder_events($limit );\n\t\t\t}elseif($att['name'] == 'Ra Tags List'){\n\t\t\t\tra_builder_tags_list($limit );\n\t\t\t}elseif($att['name'] == 'Ra Categories List'){\n\t\t\t\tra_builder_categories_list($limit );\n\t\t\t}elseif($att['name'] == 'Q2A Suggest'){\n\t\t\t\t$this->suggest_next();\n\t\t\t}elseif($att['name'] == 'Q2A Question'){\n\t\t\t\t$this->q_view($this->content['q_view']);\t\t\n\t\t\t}elseif($att['name'] == 'Q2A Answers'){\n\t\t\t\t$this->a_list($this->content['a_list']);\t\t\n\t\t\t}elseif( $att['name'] == 'Q2A Pagination'){\n\t\t\t\t//$this->page_links();\n\t\t\t}else{\n\t\t\t\t$shortcode_func = 'sc_'.strtolower(str_replace(' ', '_', $att['name']));\n\t\t\t\t$this->$shortcode_func();\n\t\t\t}\n\t\t\treturn ob_get_clean();\t\t\t\t\n\t\t\t\n\t\t}", "function mediapress_get_media_object($post_id) {\n if (!$post_id){ return; }\n\n $minireel_id = get_post_meta($post_id, 'c6-minireel-id', true);\n $campaign_id = get_post_meta($post_id, 'c6-campaign-id', true);\n\n $campaign = get_query_var('campaign');\n $campaign = $campaign ? $campaign : $campaign_id;\n $container = get_query_var('container');\n $container = $container ? $container : 'minireel.tv';\n $type = get_query_var('type');\n $type = $type ? $type : 'full-np';\n $launch_urls = get_query_var('launchUrls');\n $play_urls = get_query_var('playUrls');\n $count_urls = get_query_var('countUrls');\n\n $query_string = '?experience=' . $minireel_id;\n $query_string .= $campaign ? '&campaign=' . $campaign : '';\n $query_string .= '&context=minireel.tv';\n $query_string .= '&container=' . $container;\n $query_string .= $launch_urls ? '&launchUrls=' . urlencode($launch_urls) : '';\n $query_string .= $play_urls ? '&playUrls=' . urlencode($play_urls) : '';\n $query_string .= $count_urls ? '&countUrls=' . urlencode($count_urls) : '';\n\n if ($minireel_id) {\n print '<iframe src=\"//platform.reelcontent.com/api/public/players/' . $type . $query_string . '\" width=\"100%\" height=\"100%\" frameborder=\"0\"></iframe>';\n }\n}", "function register_content_types() {\n\n}", "function THEME_QuickTags() {\n if ( ! wp_script_is('quicktags') )\n return;\n ?>\n <script type=\"text/javascript\">\n QTags.addButton( 'embed_tag', 'embed', '<embed>', '</embed>', 'o', 'Make Embed Tag', 777 );\n </script>\n\n <script type=\"text/javascript\">\n QTags.addButton( 'spoiler_tag', 'spoiler', '<div class=\"spoiler Spoiler\"><div class=\"spoiler_head ToggleSpoiler\"><span class=\"spoiler_title\">Click for spoiler</span><span class=\"nice_svg tiny\"><svg><use href=\"#arrow_down\"></use></svg></span></div><div class=\"spoiler_content\">', '</div><div class=\"spoiler_footer click_able ToggleSpoiler\"><span class=\"nice_svg small\"><svg><use href=\"#arrow_down\"></use></svg></span></div></div>', 'o', 'Make Embed Tag', 777 );\n </script>\n <?php\n}", "function dark_urban_init() {\n register_taxonomy_for_object_type( 'category', 'attachment' );\n register_taxonomy_for_object_type( 'post_tag', 'attachment' );\n\n /*\n * Register custom post types. You can also move this code to a plugin.\n */\n /* Pinegrow generated Custom Post Types Begin */\n\n /* Pinegrow generated Custom Post Types End */\n \n /*\n * Register custom taxonomies. You can also move this code to a plugin.\n */\n /* Pinegrow generated Taxonomies Begin */\n\n /* Pinegrow generated Taxonomies End */\n\n}", "private function addFeaturedMedia() {\n foreach (self::getPostTypes() as $post_type) {\n register_rest_field($post_type, 'featured_media_url', [\n 'get_callback' => function ($post) {\n if ($post instanceof WP_POST) {\n return get_the_post_thumbnail_url($post->ID);\n } elseif (is_array($post)) {\n return get_the_post_thumbnail_url($post['id']);\n }\n },\n ]);\n }\n }", "static function media_templates() { ?>\n<script id=\"tmpl-wp-form-attachment-field\" type=\"text/html\">\n<div class=\"attachment-container\">\n\t<img src=\"{{ data.type == 'image' ? data.url : data.icon }}\" />\n</div>\n<label>\n\t<span><?php esc_html_e( \"ID:\", 'wp-forms-api' ); ?></span>\n\t<input type=\"text\" name=\"{{ data.input_name }}\" class=\"wp-form-attachment-id\" value=\"{{ data.id }}\" />\n</label>\n<label>\n\t<span><?php esc_html_e( \"Title:\", 'wp-forms-api' ); ?></span>\n\t<input type=\"text\" value=\"{{ data.title }}\" readonly=\"readonly\" />\n</label>\n<label>\n\t<a href=\"{{ data.link }}\" target=\"_blank\"><?php __( \"View\", 'wp-forms-api' ); ?></a>\n</label>\n<# if(data.url) { #><span class=\"attachment-delete\"></span><# } #>\n<p>\n<# if(data.editLink) { #><a href=\"{{ data.editLink }}\">Edit</a>&nbsp;&nbsp;<# } #>\n<# if(data.url) { #><a href=\"{{ data.url }}\">View</a><# } #>\n</p>\n</script>\n\t<?php\n\t}", "public function register_hooks() {\n\t\t\\add_filter( 'category_description', [ $this, 'add_shortcode_support' ] );\n\t\t\\add_filter( 'term_description', [ $this, 'add_shortcode_support' ] );\n\t}", "public function registerMediaCollections(): void\n {\n $this->addMediaCollection('default');\n $this->addMediaCollection('cv');\n //->useFallbackUrl('/url/to/default')\n //->singleFile()\n\n }", "function fcc_stow_special_event_init()\r\n{\r\n $labels = array( \"name\" => \"Special Events\",\r\n \"singular_name\" => \"Special Event\",\r\n \"add_new_item\" => \"Add New Special Event\",\r\n \"new_item\" => \"New Special Event\",\r\n \"edit_item\" => \"Edit Special Event\",\r\n \"view_item\" => \"View Special Event\",\r\n \"all_items\" => \"All Special Events\",\r\n \"search_items\" => \"Search Special Events\",\r\n \"not_found\" => \"No Special Events found\",\r\n \"not_found_in_trash\" => \"No Special Events found in trash\" );\r\n\r\n $args = array( \"labels\" => $labels,\r\n \"public\" => true,\r\n \"rewrite\" => array( \"slug\" => \"special-event\" ),\r\n \"supports\" => array( \"title\" ));\r\n\r\n register_post_type( \"fcc-stow-special-event\", $args );\r\n\r\n add_filter( \"the_content\", \"fcc_stow_special_event_post_apply_metadata\" );\r\n}", "public function registerMediaCollections() {\n $this->addMediaCollection('image')->singleFile();\n }", "function get_media_by_tag($args='')\n\t{\n\t\tglobal $post;\n\t\t\n\t\t$r = wp_parse_args( $args, $defaults );\n\t\tif (!isset($r['post_parent']))\n\t\t{\n\t\t\tif ($post)\n\t\t\t\t$r['post_parent'] = $post->ID;\n\t\t\telse\n\t\t\t\treturn;\n\t\t}\t\n\t\treturn $this->get_attachments_by_media_tags($args);\n\t}", "public function registerMediaCollections()\n {\n $this->addMediaCollection('image')->singleFile();\n }", "function unitwy_feature($args){\n\tglobal $dsgn, $msgs;\n\t$show_form = FALSE;\n\n\tif(isset($_FILES[\"media\"][\"error\"]) && $_FILES[\"media\"][\"error\"] === 0){\n\t\tif(empty($_POST[\"key\"]) || !security_key_check($_POST[\"key\"])){\n\t\t\treturn;\n\t\t}\n\n\t\t$postInfo = media_exec($_FILES[\"media\"][\"tmp_name\"], $_POST[\"text\"]);\n\n\t\tif(!is_object($postInfo)){\n\t\t\t$show_form = TRUE;\n\t\t}else if(!isset($postInfo->error)){\n\t\t\t$content = \"<p>{$msgs->msg28139}\";\n\t\t\tif($_POST[\"service\"] === \"twitter\" || (empty($_POST[\"notweet\"]) && twitter_post(\"{$postInfo->text} {$postInfo->url}\"))){\n\t\t\t\t$content .= \" {$msgs->msg52215}\";\n\t\t\t}\n\t\t\t$content .= \"</p>\\n\";\n\n\t\t\t$content .= \"<p>\" . thumbnailer_embed_thumbnails(array($postInfo->url)) . \"</p>\";\n\t\t}else{\n\t\t\t$content = $postInfo->error;\n\t\t}\n\t}else{\n\t\t$show_form = TRUE;\n\t}\n\n\tif($show_form){\n\t\t$pretext = \"\";\n\t\t$in_reply_to_id = \"\";\n\t\tif(!empty($args[1]) && is_numeric($args[1])){\n\t\t\t$status = twitter_process(\"statuses/show/{$args[1]}.json?include_entities=1\");\n\t\t\t$pretext = extractor_get_users_str_to_reply($status, isset($args[2]) && $args[2] === \"all\" ? TRUE : FALSE);\n\t\t\t$in_reply_to_id = $args[1];\n\t\t}\n\n\t\t$content = $dsgn->mediaForm($pretext, $in_reply_to_id);\n\t}\n\n\toutput_page($msgs->msg19279, $content);\n\n\treturn;\n}", "function media_buttons($editor_id = 'content')\n {\n }", "function wp_embed_handler_video($matches, $attr, $url, $rawattr)\n {\n }", "function rawlins_register_post_types() {\n\t$rawlins_magic_post_type_maker_array = array(\n\t\t/*array(\n\t\t\t'cpt_single' => 'Resource',\n\t\t\t'cpt_plural' => 'Resources',\n\t\t\t'slug' => 'resource',\n\t\t\t'cpt_icon' => 'dashicons-index-card',\n\t\t\t'exclude_from_search' => false,\n\t\t),*/\n\n\t);\n\n\tforeach( $rawlins_magic_post_type_maker_array as $post_type ){\n\t\t$cpt_single = $post_type['cpt_single'];\n\t\t$cpt_plural = $post_type['cpt_plural'];\n\t\t$slug = $post_type['slug'];\n\t\t$cpt_icon = $post_type['cpt_icon'];\n\t\t$exclude_from_search = $post_type['exclude_from_search'];\n\n\t\t// Admin Labels\n\t \t$labels = rawlins_generate_label_array($cpt_plural, $cpt_single);\n\n\t \t// Arguments\n\t\t$args = rawlins_generate_post_type_args($labels, $cpt_plural, $cpt_icon, $exclude_from_search);\n\n\t\t// Just do it\n\t\tregister_post_type( $slug, $args );\n\t}\n\n}", "function media_upload_gallery()\n {\n }", "function media_upload()\r\n{\r\n\tglobal $DIR_MEDIA, $member, $CONF, $manager;\r\n\r\n\t$uploadInfo = postFileInfo('uploadfile');\r\n\r\n\t$filename = $uploadInfo['name'];\r\n\t$filetype = $uploadInfo['type'];\r\n\t$filesize = $uploadInfo['size'];\r\n\t$filetempname = $uploadInfo['tmp_name'];\r\n\t$fileerror = intval($uploadInfo['error']);\r\n\t$mediatocu = $manager->getPlugin('NP_Mediatocu');\r\n// added yama 20080131\r\n\tif ($mediatocu->getOption('filename_rule') == \"ascii\") {\r\n\t\t$path_parts = pathinfo($filename);\r\n\t\t$filename = time() . \".\" . $path_parts['extension'];\r\n\t}\r\n// end\r\n\t\r\n\tswitch ($fileerror) {\r\n\t\tcase 0: // = UPLOAD_ERR_OK\r\n\t\t\tbreak;\r\n\t\tcase 1: // = UPLOAD_ERR_INI_SIZE\r\n\t\tcase 2: // = UPLOAD_ERR_FORM_SIZE\r\n\t\t\tmedia_doError(_ERROR_FILE_TOO_BIG);\r\n\t\t\tbreak;\r\n\t\tcase 3: // = UPLOAD_ERR_PARTIAL\r\n\t\tcase 4: // = UPLOAD_ERR_NO_FILE\r\n\t\tcase 6: // = UPLOAD_ERR_NO_TMP_DIR\r\n\t\tcase 7: // = UPLOAD_ERR_CANT_WRITE\r\n\t\tdefault:\r\n\t\t\t// include error code for debugging\r\n\t\t\t// (see http://www.php.net/manual/en/features.file-upload.errors.php)\r\n\t\t\tmedia_doError(_ERROR_BADREQUEST . ' (' . $fileerror . ')');\r\n\t\t\tbreak;\r\n\t}\r\n\t// T.Kosugi add 2006.9.1\r\n\tif (stristr($filename, '%00')) {\r\n\t\tmedia_doError(_MEDIA_PHP_38);\r\n\t}\r\n\t// T.Kosugi add end\r\n\tif (strpos($filename,\"\\0\") !== false) {\r\n\t\tmedia_doError(_MEDIA_PHP_38);\r\n\t}\r\n\tif ($filesize > $CONF['MaxUploadSize']) {\r\n\t\tmedia_doError(_ERROR_FILE_TOO_BIG);\r\n\t}\r\n\r\n\t// check file type against allowed types\r\n\t$ok = 0;\r\n\t$allowedtypes = explode (',', $CONF['AllowedTypes']);\r\n\tforeach ( $allowedtypes as $type ) {\r\n\t\tif (eregi(\"\\.\" .$type. \"$\",$filename)) {\r\n\t\t\t$ok = 1;\r\n\t\t}\r\n\t}\r\n\tif (!$ok) {\r\n\t\tmedia_doError(_ERROR_BADFILETYPE);\r\n\t}\r\n\r\n\tif (!is_uploaded_file($filetempname)) {\r\n\t\tmedia_doError(_ERROR_BADREQUEST);\r\n\t}\r\n\r\n\t// prefix filename with current date (YYYY-MM-DD-)\r\n\t// this to avoid nameclashes\r\n\tif ($CONF['MediaPrefix']) {\r\n\t\t$filename = strftime(\"%Y%m%d-\", time()) . $filename;\r\n\t}\r\n\r\n\t// Filename should not contain '/' or '\\'.\r\n\tif (preg_match('#(/|\\\\\\\\)#',$filename)) media_doError(_ERROR_DISALLOWED);\r\n\r\n\t$collection = media_requestVar('collection');\r\n\t$res = MEDIA::addMediaObject($collection, $filetempname, $filename);\r\n\r\n\tif ($res != '') {\r\n\t\tmedia_doError($res);\r\n\t}\r\n\t$uppath = $DIR_MEDIA.$collection . \"/\";\r\n\t$upfile = $DIR_MEDIA.$collection . \"/\" . $filename;\r\n\r\n\t$res = move_uploaded_file($filetempname, $upfile);\r\n\tif ($res != '') {\r\n\t media_doError($res);\r\n\t}\r\n\r\n\tmake_thumbnail($DIR_MEDIA, $collection, $upfile, $filename);\r\n\r\n\t// shows updated list afterwards\r\n\tmedia_select();\r\n}", "public function getMediaEntryType();" ]
[ "0.541624", "0.53461957", "0.52716696", "0.5211195", "0.5143661", "0.5046985", "0.49558833", "0.49090797", "0.4901786", "0.4894322", "0.48824316", "0.48716798", "0.48538268", "0.48229924", "0.4812761", "0.4812294", "0.4791092", "0.47881782", "0.47847483", "0.47798", "0.47736764", "0.47545937", "0.47308347", "0.47193563", "0.4710425", "0.46921173", "0.46657664", "0.46634012", "0.46607062", "0.46576795", "0.4632327", "0.4629052", "0.4608227", "0.4605348", "0.46033436", "0.45806307", "0.457948", "0.4564352", "0.4555423", "0.45488247", "0.4547431", "0.4547213", "0.45370108", "0.45330232", "0.45209906", "0.45069653", "0.45069653", "0.45069653", "0.44749594", "0.44688976", "0.44632223", "0.44406584", "0.4439509", "0.44361955", "0.44354492", "0.4433524", "0.4432091", "0.44309574", "0.44261825", "0.44141307", "0.4406136", "0.43923184", "0.4390865", "0.43845582", "0.43818873", "0.43793216", "0.4370073", "0.43655205", "0.43448988", "0.43448988", "0.43448988", "0.43448988", "0.43388212", "0.4335732", "0.43352586", "0.43328908", "0.4332867", "0.43282863", "0.43244672", "0.43236452", "0.4315258", "0.43129846", "0.43108368", "0.43106517", "0.4310052", "0.43093958", "0.43092763", "0.4304014", "0.43038988", "0.43038103", "0.4303607", "0.4300226", "0.42998156", "0.42981252", "0.42958635", "0.4295346", "0.4294779", "0.4290296", "0.42889777", "0.4288586" ]
0.45900938
35
URL shortcodes for making links to arbitrary URLs
public static function onShortCode_url(ShortcodeInterface $s): ?string { $url = $s->getBbCode(); if (filter_var($url, FILTER_VALIDATE_URL)) { // set up URL $link = (new A) ->setAttribute('href', $url) ->addClassString($s->getParameter('class', '')) ->addChild($s->getContent() ? $s->getContent() : preg_replace('/^(https?:)?\/\//', '', $url)); // return built link return $link; } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function shorten($link, $customUrl = false);", "function _shortenURL(&$ret){\n\t $links = explode('<a', $ret);\n\t $countlinks = count($links);\n\t for ($i = 0; $i < $countlinks; $i++){\n\t\t\t$link = $links[$i];\t\t\t\n\t\t\t$link = (preg_match('#(.*)(href=\")#is', $link)) ? '<a' . $link : $link;\n\t\n\t\t\t$begin = strpos($link, '>') + 1;\n\t\t\t$end = strpos($link, '<', $begin);\n\t\t\t$length = $end - $begin;\n\t\t\t$urlname = substr($link, $begin, $length);\n\n\t\t\t$chunked = (strlen($urlname) > 50 && preg_match('#^(http://|ftp://|www\\.)#is', $urlname)) ? substr_replace($urlname, '...', 30, -10) : $urlname;\n\t\t\t$ret = str_replace('>' . $urlname . '<', '>' . $chunked . '<', $ret); \n\t\n\t }\n\t}", "function rebrandly_url_shortcode( $atts ) {\n // global $post;\n\n $atts = shortcode_atts(\n array(\n 'id' => get_the_ID(),\n ),\n $atts,\n 'rebrandly_url'\n );\n\n // $_scheme = ( is_ssl() ) ? 'https://' : 'http://'; // Rebrandly domains don't work with HTTPS\n $_scheme = 'http://';\n $_short_url = get_post_meta( $atts['id'], '_rebrandly_link_url', true );\n\n if ( $_short_url != '' ) {\n return $_scheme . $_short_url;\n } else {\n return get_permalink( $atts['id'] );\n }\n}", "function url_shorten($url, $length = 35)\n {\n }", "function url ($link) {\r\n\treturn $link;\r\n}", "function the_shortlink($text = '', $title = '', $before = '', $after = '')\n {\n }", "public function shortenUrlWithNonCustomKeyword()\n {\n $longUrl = 'https://laravel.com';\n\n $this->post(route('createshortlink'), ['long_url' => $longUrl]);\n $url = Url::whereLongUrl($longUrl)->first();\n\n $this->assertFalse($url->is_custom);\n }", "function urlify($link, $disp, $color = '#0000FF', $bt_replace = true)\n{\n $link = htmlspecialchars($link, ENT_QUOTES);\n $disp = htmlspecialchars($disp, ENT_QUOTES);\n\n // replace backticks with html code to prevent errors\n if ($bt_replace === true) {\n $link = str_replace('`', '&#96;', $link);\n $disp = str_replace('`', '&#96;', $disp);\n }\n\n // return url\n return \"<a href='$link' target='_blank'><u><font color='$color'>$disp</font></u></a>\";\n}", "function urlify($link, $disp, $color = '#0000FF', $bt_replace = true)\n{\n $link = htmlspecialchars($link, ENT_QUOTES);\n $disp = htmlspecialchars($disp, ENT_QUOTES);\n\n // replace backticks with html code to prevent errors\n if ($bt_replace === true) {\n $link = str_replace('`', '&#96;', $link);\n $disp = str_replace('`', '&#96;', $disp);\n }\n\n // return url\n return \"<a href='$link' target='_blank'><u><font color='$color'>$disp</font></u></a>\";\n}", "public static function onShortCode_link(ShortcodeInterface $s): ?string\n {\n if (!$s->getBbCode()) {\n // nothing is specified, just use context URL route and optional index\n $url = Context::url();\n $route = Context::url()->route();\n $action = $s->getParameter('action', 'index');\n } else {\n // otherwise we have to take a closer look at what was specified\n // check if bbcode value looks like it has a filename at the end\n $query = trim($s->getBbCode(), '/');\n if (preg_match('@\\.[a-z0-9]+$@', $query)) {\n // route is bbcode value with filename stripped\n $route = preg_replace('@[^\\\\]\\.([a-z0-9]+$@', '', $query);\n $action = substr($query, strlen($route) + 1);\n // still allow action parameter to override URL\n $action = $s->getParameter('action', $action);\n $url = new URL(\"/$route/$action\");\n } else {\n // route looks like a clean route with no filename\n $route = $query;\n $action = $s->getParameter('action', 'index');\n $url = new URL(\"/$route/\");\n }\n }\n // keep running list of everything this could refer to\n /** array<int,array{url:URL,title:string}> */\n $options = [];\n // check if there's a static route\n if (Router::staticRouteExists($route, $action)) {\n $static_url = new URL(\"/~$route/\");\n $static_url->setAction($action);\n $options[] = [\n 'url' => $static_url,\n 'title' => $static_url->name(),\n ];\n }\n // search for pages this URL might refer to\n foreach (Pages::getAll($route) as $page) {\n $page_url = $page->url($action);\n $options[] = [\n 'url' => $page_url,\n 'title' => $page_url->name(),\n ];\n }\n // prepare link title\n if (count($options) == 0) {\n $title = 'unknown link';\n } elseif (count($options) == 1) {\n $title = $options[0]['title'];\n $url = $options[0]['url'];\n } else {\n $title = sprintf(\n 'ambiguous link: %s',\n implode(\n ', ',\n array_map(\n fn($e) => '\"' . $e['title'] . '\"',\n $options\n )\n )\n );\n }\n // build link\n $link = (new A)\n ->setAttribute('href', $url)\n ->setAttribute('title', $title)\n ->addClassString($s->getParameter('class', ''))\n ->addChild(new Text($s->getContent() ? $s->getContent() : $title));\n if (count($options) > 1) $link->addClass('link--multiple-options');\n return $link;\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 make_link($string)\n {\n $string = ' ' . $string;\n $string = preg_replace_callback(\"#(^|[\\n ])([\\w]+?://.*?[^ \\\"\\n\\r\\t<]*)#is\", \"shorten_link\", $string);\n $string = preg_replace(\"#(^|[\\n ])((www|ftp)\\.[\\w\\-]+\\.[\\w\\-.\\~]+(?:/[^ \\\"\\t\\n\\r<]*)?)#is\", \"$1<a href=\\\"http://$2\\\">$2</a>\", $string);\n #$string = preg_replace(\"#(^|[\\n ])([a-z0-9&\\-_.]+?)@([\\w\\-]+\\.([\\w\\-\\.]+\\.)*[\\w]+)#i\", \"\\\\1<a href=\\\"mailto:\\\\2@\\\\3\\\">\\\\2@\\\\3</a>\", $string);\n $string = mb_substr($string, 1, mb_strlen($string, CHARSET), CHARSET);\n return $string;\n }", "public function http_makelinks($data, $conf)\n {\n $aTagParams = $this->getATagParams($conf);\n $textstr = '';\n foreach ([ 'http://', 'https://' ] as $scheme) {\n $textpieces = explode($scheme, $data);\n $pieces = count($textpieces);\n $textstr = $textpieces[0];\n for ($i = 1; $i < $pieces; $i++) {\n $len = strcspn($textpieces[$i], chr(32) . TAB . CRLF);\n if (trim(substr($textstr, -1)) === '' && $len) {\n $lastChar = substr($textpieces[$i], $len - 1, 1);\n if (!preg_match('/[A-Za-z0-9\\\\/#_-]/', $lastChar)) {\n $len--;\n }\n // Included '\\/' 3/12\n $parts[0] = substr($textpieces[$i], 0, $len);\n $parts[1] = substr($textpieces[$i], $len);\n $keep = $conf['keep'];\n $linkParts = parse_url($scheme . $parts[0]);\n $linktxt = '';\n if (strstr($keep, 'scheme')) {\n $linktxt = $scheme;\n }\n $linktxt .= $linkParts['host'];\n if (strstr($keep, 'path')) {\n $linktxt .= $linkParts['path'];\n // Added $linkParts['query'] 3/12\n if (strstr($keep, 'query') && $linkParts['query']) {\n $linktxt .= '?' . $linkParts['query'];\n } elseif ($linkParts['path'] === '/') {\n $linktxt = substr($linktxt, 0, -1);\n }\n }\n if (isset($conf['extTarget'])) {\n if (isset($conf['extTarget.'])) {\n $target = $this->stdWrap($conf['extTarget'], $conf['extTarget.']);\n } else {\n $target = $conf['extTarget'];\n }\n } else {\n $target = $this->getTypoScriptFrontendController()->extTarget;\n }\n\n // check for jump URLs or similar\n $linkUrl = $this->processUrl(UrlProcessorInterface::CONTEXT_COMMON, $scheme . $parts[0], $conf);\n\n $res = '<a href=\"' . htmlspecialchars($linkUrl) . '\"'\n . ($target !== '' ? ' target=\"' . htmlspecialchars($target) . '\"' : '')\n . $aTagParams . $this->extLinkATagParams(('http://' . $parts[0]), 'url') . '>';\n\n $wrap = isset($conf['wrap.']) ? $this->stdWrap($conf['wrap'], $conf['wrap.']) : $conf['wrap'];\n if ((string)$conf['ATagBeforeWrap'] !== '') {\n $res = $res . $this->wrap($linktxt, $wrap) . '</a>';\n } else {\n $res = $this->wrap($res . $linktxt . '</a>', $wrap);\n }\n $textstr .= $res . $parts[1];\n } else {\n $textstr .= $scheme . $textpieces[$i];\n }\n }\n $data = $textstr;\n }\n return $textstr;\n }", "function _make_url_clickable_cb($matches)\n{\n\t$ret = '';\n\t$url = $matches[2];\n\t$url = clean_url($url);\n\tif ( empty($url) )\n\t\treturn $matches[0];\n\t// removed trailing [.,;:] from URL\n\tif ( in_array(substr($url, -1), array('.', ',', ';', ':')) === true ) {\n\t\t$ret = substr($url, -1);\n\t\t$url = substr($url, 0, strlen($url)-1);\n\t}\n\treturn $matches[1] . '<a href=\"'.$url.'\"'.COMMENT_NOFOLLOW.'>'.$url.'</a>' . $ret;\n}", "public function testShorten() {\n\t\t$urlShortener = new UrlShortener();\n\t\t$url = 'http://joindiaspora.com';\n\n\t\t$this->assertEquals('http://goo.gl/C7pJ', $urlShortener->shorten('goo.gl', $url));\n\t\t$this->assertEquals('http://is.gd/NVVvCS', $urlShortener->shorten('is.gd', $url));\n\t\t$this->assertEquals('http://tinyurl.com/34n8w73', $urlShortener->shorten('tinyurl.com', $url));\n\n\t\t$this->assertEquals('http://tinyurl.com/34n8w73', $urlShortener->shorten('UNSUPPORTED_SHORTENER', $url));\n\t}", "function ShortenUrl($url)\r\n{\r\n $displayurl = $url;\r\n $maxlen = 40;\r\n $len = strlen($displayurl);\r\n if( $len > $maxlen)\r\n $displayurl = substr($url, 0, $maxlen / 2) . '...' . substr($url, $len - ($maxlen / 2), $maxlen / 2);\r\n return $displayurl;\r\n}", "function url_to_link_callback($matches)\n{\n return '<a href=\"' . htmlspecialchars($matches[1]) . '\">' . $matches[1] . '</a>';\n}", "function createLink($src, $url) {\n // parse_url is JS function\n $scheme = parse_url($url)[\"scheme\"]; // http\n $host = parse_url($url)[\"host\"]; // www...\n // if the links starts with // replace // with http or https (this is an url scheme)\n if(substr($src, 0, 2) == \"//\") {\n\t\t$src = $scheme . \":\" . $src;\n\t}\n\telse if(substr($src, 0, 1) == \"/\") {\n\t\t$src = $scheme . \"://\" . $host . $src;\n\t}\n else if(substr($src, 0, 2) == \"./\") {\n\t\t$src = $scheme . \"://\" . $host . $src . dirname(parse_url($url)[\"path\"]) . substr($src, 1); // the last part says that we want to ignore \".\"\n }\n else if(substr($src, 0, 3) == \"../\") {\n\t\t$src = $scheme . \"://\" . $host . \"/\" . $src;\n }\n else if(substr($src, 0, 5) != \"https\" && substr($src, 0, 4) != \"http\") {\n\t\t$src = $scheme . \"://\" . $host . \"/\" . $src;\n\t}\n return $src;\n}", "function wac_create_link($string) {\n\t$url = '@(http)?(s)?(://)?(([a-zA-Z])([-\\w]+\\.)+([^\\s\\.]+[^\\s]*)+[^,.\\s])@';\n\treturn preg_replace($url, 'http$2://$4', $string);\n}", "static public function link($url)\n {\n return Misc::UrlPrefix().$url;\n }", "function ShortUrl($id) {\n\tglobal $setting, $user;\n\t\n\tif ($user['login_status'] == 1) {\n\t\tif ($setting['seo_on'] == 0) {\n\t\t\t$url = '/go.php?id='.$id.'&ref='.$user['id'];\n\t\t}\n\t\telse {\n\t\t\t$url = '/r-'.$id.'-'.$user['id'];\n\t\t}\n\t}\n\telse {\n\t\tif ($setting['seo_on'] == 0) {\n\t\t\t$url = '/go.php?id='.$id;\n\t\t}\n\t\telse {\n\t\t\t$url = '/r-'.$id;\n\t\t}\t\n\t}\n\t\n\treturn $setting['site_url'].$url;\n}", "public function shorturlToUrl($code, $increment = true) \n\t{\n if (empty($code)) \n\t\t{\n throw new Exception(\"No short url was supplied.\");\n }\n \n if ($this->validateShortUrl($code) == false) \n\t\t{\n throw new Exception(\"Short url does not have a valid format.\");\n }\n \n $urlRow = $this->getUrlFromDb($code);\n if (empty($urlRow)) \n\t\t{\n throw new Exception(\"Short url does not appear to exist.\");\n }\n \n if ($increment == true) \n\t\t{\n $this->incrementCounter($urlRow[\"id\"]);\n }\n \n return $urlRow[\"long_url\"];\n }", "function urlsTolinks($text) {\r\n\t\r\n\t\t// Make long URLs into links\r\n\t\t// Regexp improved by Bruce.\r\n\t\t$linked_text = eregi_replace(\"([[:space:].,\\(\\[])([[:alnum:]]{3,})://([[:alnum:]_-]+\\.)([[:alnum:]_-]{2,}[[:alnum:]/&=#?_\\.-]*)\",\r\n\t\t\t\t\t\t \"\\\\1<a href=\\\"\\\\2://\\\\3\\\\4\\\" target=\\\"newpage\\\">\\\\2://\\\\3\\\\4</a>\", $text);\r\n\r\n\t // Make short urls into links\r\n\t\t$linked_text = eregi_replace(\"([[:space:],\\(\\[])www\\.([[:alnum:]_-]+\\.)([[:alnum:]_-]{2,}[[:alnum:]/&=#?_\\.-]*)\", \"\\\\1<a href=\\\"http://www.\\\\2\\\\3\\\" target=\\\"newpage\\\">www.\\\\2\\\\3</a>\", $linked_text);\r\n\t\t\t\t\t\t \r\n\t\treturn $linked_text;\r\n\t\t\t\t\t\t \r\n\t\t\t\r\n\t}", "public function link() {\n $num_args = func_num_args();\n $optional = $this->simple_expression->getOptionalPlaceholderCount();\n $max_args = $this->simple_expression->getPlaceholderCount();\n // correct number of arguments given?\n if($num_args <= $max_args && $num_args >= $max_args - $optional) {\n\n $args = func_get_args();\n\n // add some empty entries in where for the not given optional arguments\n $optional > 0 && $args = array_values(array_merge($args, array_fill(0, $optional, null)));\n\n foreach($args as $key => $arg) {\n if(is_array($arg)) {\n $args[$key] = array_map('urlencode', $arg);\n } else {\n $args[$key] = urlencode($arg);\n }\n }\n $args = array_map('urlencode', $args);\n\n $link = $this->simple_expression->replace($args, false);\n } else {\n throw new BadMethodCallException(\"Invalid number of arguments when linking to '{$this->url}'\");\n }\n\n return $link;\n }", "function call_makeShortUrl() {\n new makeShortUrl();\n }", "public static function linkShortcode($atts = [], $content = '', $tag = ''){\n // normalize attribute keys, lowercase\n $atts = array_change_key_case((array)$atts, CASE_LOWER);\n // override default attributes with user attributes\n $parsed_atts = shortcode_atts([\n 'id' => null,\n 'caption' => 'official_name_1'\n ], $atts, $tag);\n\n // get the ID from shortcode atts\n $id = $parsed_atts['id'];\n if (!$id) return '<a href=\"#\">[incorrect ID]</a>';\n\n // find card in database\n $card = get_post($id);\n // make sure POST is a 'travelcard'\n if (!$card || $card->post_type !== 'travelcard') return '<a href=\"#\">[not found]</a>';\n // retrieve meta for card\n $meta = get_post_meta($card->ID);\n\n // set caption\n $caption = $parsed_atts['caption'];\n if (preg_match('/^official\\_name\\_[0-5]$/', $caption)) {\n $caption = $caption ? $meta[$caption] : null;\n $caption = $caption ? $caption[0] : $card->post_title;\n }\n\n // set url\n $url = $meta['deep_link_2'];\n $url = $url ? $url[0] : '#';\n \n // build HTML\n $url = self::createRedirectUrl($url, $id);\n return '<a href=\"' . $url . '\" class=\"ege-cards-link\">' . $caption . '</a>';\n }", "function old_convert_urls_into_links(&$text) {\n $text = eregi_replace(\"([[:space:]]|^|\\(|\\[)([[:alnum:]]+)://([^[:space:]]*)([[:alnum:]#?/&=])\",\n \"\\\\1<a href=\\\"\\\\2://\\\\3\\\\4\\\" target=\\\"_blank\\\">\\\\2://\\\\3\\\\4</a>\", $text);\n\n /// eg www.moodle.com\n $text = eregi_replace(\"([[:space:]]|^|\\(|\\[)www\\.([^[:space:]]*)([[:alnum:]#?/&=])\",\n \"\\\\1<a href=\\\"http://www.\\\\2\\\\3\\\" target=\\\"_blank\\\">www.\\\\2\\\\3</a>\", $text);\n }", "public function maybe_make_link($url)\n {\n }", "function link_souce($text){\n\n if(post::isValidURL($text)){\n $text = '<a href=\"'.$text.'\">'.$text.'</a>';\n } \n return $text;\n }", "function myUrl($atts, $content = null) {\n extract(shortcode_atts(array(\n \"gallery\" => 'http://'\n ), $atts));\n return '<a href=\"'.$gallery.'\" class=\"popup_mediacenter\" target=\"popup_mediacenter\"><img src=\"http://seattletimes.nwsource.com/art/ui/Photograph_link.gif\" width=\"15\" height=\"11\" class=\"icon\">'.$content.'</a>';\n}", "public function getlink($shorturl) {\n\n $user = \\Drupal::currentUser()->id();\n $ip_add = \\Drupal::request()->getClientIp();\n $results = \\Drupal::database()->select('short_links', 's')\n ->fields('s', ['id', 'long_url', 'short_url', 'identifier'])\n ->condition('s.identifier', $shorturl, '=')\n ->execute();\n $result = $results->fetchAssoc();\n $long_url = $result['long_url'];\n $identifier = $result['identifier'];\n\n $conn = Database::getConnection();\n $conn->insert('short_links_details')->fields(\n [\n 'uid' => $user,\n 'long_url' => $long_url,\n 'identifier' => $identifier,\n 'redirection_time' => strtotime(\"now\"),\n 'ip_add' => $ip_add,\n ]\n )->execute();\n return new TrustedRedirectResponse($long_url);\n\n }", "public static function makeShortLink()\n {\n $valid = 'abcdefghijklmnopqrstuwvxyzABCDEFGHIJKLMNOPQRSTUWVXYZ0123456789';\n\n // it's possible that the resulting\n // string will already be in the system.\n // If so, try again\n while(true) {\n $string = '';\n $hex = uniqid();\n\n // uniqid is 13 characters. we need an even\n // number, and characters on the right are\n // more random, so start at the second character\n for ($i = 1; $i < strlen($hex); $i+=2) {\n $decimal = hexdec($hex[$i].$hex[$i+1]);\n $alpha = chr($decimal);\n\n // force it to an alphanumeric character\n $string .= (strpos($valid, $alpha) === false)\n ? $valid[$decimal % strlen($valid)]\n : $alpha;\n\n if(strpos($valid, $alpha) !== FALSE)\n $string .= $alpha;\n }\n\n if (! self::find($string))\n return $string;\n }\n }", "function mgl_instagram_format_link($str)\n{\n // Remove http:// and https:// from url\n $str = preg_replace('#^https?://#', '', $str);\n return $str;\n}", "abstract public function url($manipulation_name = '');", "function short_website_url($website)\n{\n if (substr($website, 0, 7) === \"http://\") {\n $website = substr($website, 7, strlen($website) - 7);\n }\n if (substr($website, 0, 4) === \"www.\") {\n $website = substr($website, 4, strlen($website) - 4);\n }\n\n return $website;\n}", "function url($array = false, $keep=false, $validate = true, $SiteUrlOnEmptyParamSet = false, $getAliases = true) {\n if(is_string($array) && !is_numeric($array) && strtolower(substr($array, 0, 4)) == 'www.') return 'http://'.$array;\n\n $pass = array();\n if($array == false) $array = array();\n if(!is_array($array)) $array = array('id' => $array);\n if($keep === true) {\n $keep = $_GET->keys();\n }\n elseif($keep !== false && !is_array($keep)) $keep = array($keep);\n if(!is_array($keep)) $keep = array();\n foreach($_REQUEST as $g => $v) {\n if(!in_array($g, $keep)) continue;\n elseif(is_array($v)) {\n foreach($v as $a => $b) {\n if(!empty($b)) $pass[$g][$a] = $b;\n }\n }\n else $pass[$g] = $v;\n }\n $parts = array_merge($pass,$array);\n $validParts = array();\n foreach($parts as $key => $val) {\n if($key == '#') continue;\n if(!$validate || ($_REQUEST->validate($key, $val) || $_GET->validate($key, $val))) {\n $validParts[$key] = $val;\n }\n }\n $url = '';\n //FIXME: Config\n // Short-URL\n if(true && isset($validParts['id'])) {\n global $Controller;\n if(is_numeric($validParts['id']) && $getAliases) {\n if($obj = $Controller->get($validParts['id'], OVERRIDE))\n if($alias = $obj->alias) $validParts['id'] = $alias;\n } elseif(is_object($validParts['id'])) {\n if($alias = $validParts['id']->alias) $validParts['id'] = $alias;\n else $validParts['id'] = $validParts['id']->ID;\n }\n $url = '/'.($validParts['id'] != 'frontpage'?$validParts['id']:'');\n unset($validParts['id']);\n }\n $query = http_build_query($validParts,'','&amp;');\n if(!empty($query)) $url .= '?'.$query;\n if(isset($array['#'])) $url.='#'.$array['#'];\n if((!empty($url) || $SiteUrlOnEmptyParamSet) && $SiteUrlOnEmptyParamSet != -1) {\n global $SITE;\n $url = $SITE->URL.$url;\n }\n return $url;\n}", "function permalink_link()\n {\n }", "function raw_urls_to_links($text){\n\t\t$text = \" $text \";\n\t\t$text = preg_replace('#(https?://[^\\s<>{}()]+[^\\s.,<>{}()])#i', '<a href=\"$1\" rel=\"nofollow\">$1</a>', $text);\n\t\t$text = preg_replace('#(\\s)([a-z0-9\\-]+(?:\\.[a-z0-9\\-\\~]+){2,}(?:/[^ <>{}()\\n\\r]*[^., <>{}()\\n\\r])?)#i', \n\t\t\t'$1<a href=\"http://$2\" rel=\"nofollow\">$2</a>', $text);\n\n\t\t$text = trim($text);\n\t\treturn $text;\n\t}", "function url_to_link($str)\n{\n $pattern = \"#(\\bhttps?://\\S+\\b)#\";\n return preg_replace_callback($pattern, 'url_to_link_callback', $str);\n}", "function do_permalink($atts) {\n\textract(shortcode_atts(array(\n\t\t'id' => 1,\n\t\t'text' => \"\" // default value if none supplied\n\t), $atts));\n\n\tif ($text) {\n\t\t$url = get_permalink($id);\n\t\treturn \"<a href='$url'>$text</a>\";\n\t} else {\n\t\treturn get_permalink($id);\n\t}\n}", "function auto_link($text)\n{\n\n\n\t$url_re = '@(https?://([-\\w\\.]+)+(:\\d+)?(/([\\w/_\\.]*(\\?\\S+)?)?)?)@';\n\t$url_replacement = \"<a href='$1' target='_blank'>$1</a>\";\n\n\treturn preg_replace($url_re, $url_replacement, $text);\n}", "public function guestDoesUrlShortening()\n {\n $longUrl = 'https://laravel.com';\n\n $this->post(route('createshortlink'), [\n 'long_url' => $longUrl,\n ]);\n\n $url = Url::whereLongUrl($longUrl)->first();\n\n $this->assertSame(null, $url->user_id);\n }", "private function verificaShortUrl() {\n FormataLink::verificaMiniUrl(\"fwk_link_encurtado\");\n }", "public static function linkEncode($s) {\n if (@eregi(\"^http:\\/\\/[[:alnum:]]+([-_\\.]?[[:alnum:]])*\\.[[:alpha:]]{2,4}(\\/{1}[-_~&=\\?\\.a-z0-9]*)*$\", $s))\n return NHtml::el('a')->href($s)->setText($s);\n if (@eregi(\"[^http:\\/]{7}[[:alnum:]]+([-_\\.]?[[:alnum:]])*\\.[[:alpha:]]{2,4}(\\/{1}[-_~&=\\?\\.a-z0-9]*)*$\", $s))\n return NHtml::el('a')->href('http://' . $s)->setText($s);\n\n return $s;\n }", "function _hyperlinkUrls($text, $mode = '0', $trunc_before = '', $trunc_after = '...', $open_in_new_window = true) {\n\t\t$text = ' ' . $text . ' ';\n\t\t$new_win_txt = ($open_in_new_window) ? ' target=\"_blank\"' : '';\n\n\t\t# Hyperlink Class B domains\n\t\t$text = preg_replace(\"#([\\s{}\\(\\)\\[\\]])([A-Za-z0-9\\-\\.]+)\\.(com|org|net|gov|edu|us|info|biz|ws|name|tv|eu|mobi)((?:/[^\\s{}\\(\\)\\[\\]]*[^\\.,\\s{}\\(\\)\\[\\]]?)?)#ie\", \"'$1<a href=\\\"http://$2.$3$4\\\" title=\\\"http://$2.$3$4\\\"$new_win_txt>' . $this->_truncateLink(\\\"$2.$3$4\\\", \\\"$mode\\\", \\\"$trunc_before\\\", \\\"$trunc_after\\\") . '</a>'\", $text);\n\n\t\t# Hyperlink anything with an explicit protocol\n\t\t$text = preg_replace(\"#([\\s{}\\(\\)\\[\\]])(([a-z]+?)://([A-Za-z_0-9\\-]+\\.([^\\s{}\\(\\)\\[\\]]+[^\\s,\\.\\;{}\\(\\)\\[\\]])))#ie\", \"'$1<a href=\\\"$2\\\" title=\\\"$2\\\"$new_win_txt>' . $this->_truncateLink(\\\"$4\\\", \\\"$mode\\\", \\\"$trunc_before\\\", \\\"$trunc_after\\\") . '</a>'\", $text);\n\n\t\t# Hyperlink e-mail addresses\n\t\t$text = preg_replace(\"#([\\s{}\\(\\)\\[\\]])([A-Za-z0-9\\-_\\.]+?)@([^\\s,{}\\(\\)\\[\\]]+\\.[^\\s.,{}\\(\\)\\[\\]]+)#ie\", \"'$1<a href=\\\"mailto:$2@$3\\\" title=\\\"mailto:$2@$3\\\">' . $this->_truncateLink(\\\"$2@$3\\\", \\\"$mode\\\", \\\"$trunc_before\\\", \\\"$trunc_after\\\") . '</a>'\", $text);\n\n\t\treturn substr($text, 1, strlen($text) - 2);\n\t}", "function _make_clickable_rel_attr($url)\n {\n }", "function link($url) {\n\tif (str_starts_with($url, 'tel') || str_starts_with($url, 'mail') || str_starts_with($url, 'sms')) {\n\t} elseif (!preg_match(\"~^(?:f|ht)tps?://~i\", $url)) {\n\t\t$url = \"https://\" . $url;\n\t}\n\treturn $url;\n}", "function esc_url_raw($url, $protocols = \\null)\n {\n }", "private function make_clickable_url($string){\n\t //The Regular Expression filter\n\t $reg_exUrl = \"/(?i)\\b((?:https?:\\/\\/|www\\d{0,3}[.]|[a-z0-9.\\-]+[.][a-z]{2,4}\\/)(?:[^\\s()<>]+|\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\))+(?:\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\)|[^\\s`!()\\[\\]{};:'\\\".,<>?«»“”‘’]))/\";\n\t \n\t // Check if there is a url in the text\n\t if(preg_match($reg_exUrl, $string, $url)) {\n\t \n\t if(strpos( $url[0], \":\" ) === false){\n\t $link = 'http://'.$url[0];\n\t }else{\n\t $link = $url[0];\n\t }\n\t \n\t // make the urls hyper links\n\t $string = preg_replace($reg_exUrl, '<a href=\"'.$link.'\" title=\"'.$url[0].'\" target=\"_blank\">'.$url[0].'</a>', $string);\n\t \n\t }\n\t \n\t return $string;\n\t}", "function shortUrl($url, $service='google', $action='short') {\n\n if($action=='short') {\n\n if($service=='google') {\n\n $urlapi = \"https://www.googleapis.com/urlshortener/v1/url\";\n $postData = array('longUrl'=>$url, 'key'=>'AIzaSyAcJa1PtXCCRXVUEYiv4iu4MnT4vBM2r-o');\n\n } else {\n\n $postData = array('login'=>'lslucas', 'longUrl'=>$url, 'apiKey'=>'R_9413f87bc6b34d74c50254d31a8a55c8', 'format'=>'json');\n $querystring = http_build_query($postData);\n $postData = null;\n\n $urlapi = \"http://api.bitly.com/v3/shorten?\".$querystring;\n\n }\n\n\n\n\n $post = !is_null($postData) ? json_encode($postData) : null;\n $json = curl_post($urlapi, $post, array('Content-Type: application/json'));\n\n if($service=='google') return $json->id;\n else {\n if($json->status_code!=500) return $json->data->url;\n }\n\n\n }\n\n}", "function short_url($string, $max_len = 30)\n{\n\t$value = str_replace(array('http://', 'https://', 'ftp://'), '', $string);\n\tif(strlen($value) > $max_len) {\n\t\t$domain = reset(explode('/', $value));\n\t\t$domain_len = strlen($domain);\n\t\tif($domain_len + 3 >= $max_len) {\n\t\t\treturn $domain;\n\t\t} else {\n\t\t\t$remaining = strlen($value) - $max_len - $domain_len + 3;\n\t\t\treturn $domain . ($remaining > 0 ? '...' . substr($value, -$remaining) : '/');\n\t\t}\n\t} else {\n\t\treturn $value;\n\t}\n}", "function do_html_URL($url, $name)\r\n{\r\n?>\r\n <br><a href=\"<?=$url?>\"><?=$name?></a><br>\r\n<?\r\n}", "function do_html_URL($url, $name)\r\n{\r\n?>\r\n <br><a href=\"<?=$url?>\"><?=$name?></a><br>\r\n<?\r\n}", "function linkify($text) {\n $matches = array(\n '/([A-Za-z]+:\\/\\/[A-Za-z0-9-_]+\\.[A-Za-z0-9-_:%&\\?\\/.=]+)/',\n '/(^|[^\\w])(#[\\d\\w\\-]+)/',\n '/(^|[^\\w])(@([\\d\\w\\-]+))/'\n );\n \n $replacements = array(\n '<a href=\"$1\">$1</a>',\n '$1<a href=\"http://search.twitter.com/search?q=$2\">$2</a>',\n '$1@<a href=\"http://twitter.com/$3\">$3</a>'\n );\n \n return preg_replace($matches, $replacements, $text);\n}", "function setUrlLink(){\n if( $this->id == 0 ) return;\n $url = $this->aFields[\"url\"]->toString();\n if( $url == \"\" ) return;\n $url = strip_tags( preg_replace( \"/[\\\"']/\", \"\", $url ) );\n if( !$this->aFields[\"url\"]->editable ) $this->aFields[\"url\"]->display = false;\n $this->aFields[\"url_link\"]->display = true;\n $this->aFields[\"url_link\"]->value = \"<a href=\\\"\".$url.\"\\\">\".$url.\"</a>\";\n }", "function constructURL($object);", "function my_theme_cpt_shortlinks( $shortlink, $id, $context, $allow_slugs=true ) {\n\t\t/**\n\t\t * If query is the context, we probably shouldn't do anything\n\t\t */\n\t\tif( 'query' == $context )\n\t\t\treturn $shortlink;\n\n\t\t$post = get_post( $id );\n\t\t$post_id = $post->ID;\n\n\t\t/**\n\t\t * If this is a standard post, return the shortlink that was already built\n\t\t */\n\t\tif( 'post' == $post->post_type )\n\t\t\treturn $shortlink;\n\n\t\t/**\n\t\t * Retrieve the array of publicly_queryable, non-built-in post types\n\t\t */\n\t\t$post_types = get_post_types( array( '_builtin' => false, 'publicly_queryable' => true ) );\n\t\tif( in_array( $post->post_type, $post_types ) || 'page' == $post->post_type )\n\t\t\t$shortlink = home_url('?p=' . $post->ID);\n\n\t\treturn $shortlink;\n\t}", "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}", "public function userDoesUrlShortening()\n {\n $user = $this->admin();\n $longUrl = 'https://laravel.com';\n\n $this->loginAsAdmin();\n $this->post(route('createshortlink'), ['long_url' => $longUrl]);\n $url = Url::whereLongUrl($longUrl)->first();\n\n $this->assertSame($user->id, $url->user_id);\n }", "function hyperlink($text)\n{\n\t$text = ereg_replace(\"[a-zA-Z]+://([-]*[.]?[a-zA-Z0-9_/-?&%])*\", \"<a href=\\\"\\\\0\\\">\\\\0</a>\", $text);\n\t$text = ereg_replace(\"(^| )(www([-]*[.]?[a-zA-Z0-9_/-?&%])*)\", \"\\\\1<a href=\\\"http://\\\\2\\\">\\\\2</a>\", $text);\n\treturn $text;\n}", "function permalink_anchor($mode = 'id')\n {\n }", "function df_store_url_link($s = null) {return df_store_url($s, S::URL_TYPE_LINK);}", "public function test_can_shorten_a_link()\n {\n $formData = [\n 'link' => 'http://testdomain.com',\n ];\n\n $this->post(route('shortlink.create'), $formData)->assertStatus(200);\n }", "function encode($longUrl) {\n $ukey = $this->from10to62(rand(100, 999).time());\n $this->url_dics[$ukey] = $longUrl;\n return 'http://tinyurl.com/'.$ukey;\n }", "function validate_internal_url($url) {\n\t\t//if you put too many [[ and ]]s places.\n\t\t//Insert code here if we need to do more to the URLs...\n\t\n\t\t$href = $url[1];\n\t\t$url_title = (count($url) > 2) ? $url[2] : $href;\n\t\treturn \"<a href='self.php/$href' class='$url_class'>$url[1]</a>\";\n\t}", "public function autoLinkify($str)\n {\n return preg_replace_callback('/(?i)\\b((?:((?:ht|f)tps?:(?:\\/{1,3}|[a-z0-9%]))|[a-z0-9.\\-]+[.](?:com|net|org|edu|gov|mil|aero|asia|biz|cat|coop|info|int|jobs|mobi|museum|name|post|pro|tel|travel|xxx|ac|ad|ae|af|ag|ai|al|am|an|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cs|cu|cv|cx|cy|cz|dd|de|dj|dk|dm|do|dz|ec|ee|eg|eh|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|Ja|sk|sl|sm|sn|so|sr|ss|st|su|sv|sx|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tp|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|yu|za|zm|zw)\\/)(?:[^\\s()<>{}\\[\\]]+|\\([^\\s()]*?\\([^\\s()]+\\)[^\\s()]*?\\)|\\([^\\s]+?\\))+(?:\\([^\\s()]*?\\([^\\s()]+\\)[^\\s()]*?\\)|\\([^\\s]+?\\)|[^\\s`!()\\[\\]{};:\\'\".,<>?«»“”‘’])|(?:(?<!@)[a-z0-9]+(?:[.\\-][a-z0-9]+)*[.](?:com|net|org|edu|gov|mil|aero|asia|biz|cat|coop|info|int|jobs|mobi|museum|name|post|pro|tel|travel|xxx|ac|ad|ae|af|ag|ai|al|am|an|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cs|cu|cv|cx|cy|cz|dd|de|dj|dk|dm|do|dz|ec|ee|eg|eh|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|Ja|sk|sl|sm|sn|so|sr|ss|st|su|sv|sx|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tp|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|yu|za|zm|zw)\\b\\/?(?!@)))/i', \"self::processLinkify\", $str);\n }", "public function autoLinkUrls($text) {\n\t\t$placeholders = [];\n\t\t$replace = [];\n\n\t\t$insertPlaceholder = function($matches) use (&$placeholders) {\n\t\t\t$key = md5($matches[0]);\n\t\t\t$placeholders[$key] = $matches[0];\n\n\t\t\treturn $key;\n\t\t};\n\n\t\t$pattern = '#(?<!href=\"|src=\"|\">)((?:https?|ftp|nntp)://[a-z0-9.\\-:]+(?:/[^\\s]*)?)#i';\n\t\t$text = preg_replace_callback($pattern, $insertPlaceholder, $text);\n\n\t\t$pattern = '#(?<!href=\"|\">)(?<!\\b[[:punct:]])(?<!http://|https://|ftp://|nntp://)www.[^\\n\\%\\ <]+[^<\\n\\%\\,\\.\\ <](?<!\\))#i';\n\t\t$text = preg_replace_callback($pattern, $insertPlaceholder, $text);\n\n\t\tforeach ($placeholders as $hash => $url) {\n\t\t\t$link = $url;\n\n\t\t\tif (!preg_match('#^[a-z]+\\://#', $url)) {\n\t\t\t\t$url = 'http://' . $url;\n\t\t\t}\n\t\t\t$replace[$hash] = \"<a href=\\\"{$url}\\\">{$link}</a>\";\n\t\t}\n\t\treturn strtr($text, $replace);\n\t}", "function labdevs_short_url_link()\n{\n return get_option(\"labdevs_settings_option_short_url\");\n}", "public function test_can_fetch_link_from_shortlink()\n {\n $this->get(route('shortlink.fetch.link', ['code' => 'AbcXyz']))->assertStatus(200);\n }", "function prepare_link($content, $href = TRUE){\n\tif(!$content) return FALSE;\n\t\t\n\t$content = h($content);\n\n\tif($href){\n\t\t$secure = FALSE;\n\t\t\t\n\t\tif(preg_match('/^https/', $content)) $secure = 'yes';\n\t\telse if(preg_match('/^http/', $content)) $secure = 'no';\n\t\telse $secure = 'not_defined';\n\t\t\t\n\t\tif($secure == 'yes'){\n\t\t\t\n\t\t\tif(preg_match('/www./', $content)) {\n\t\t\t\t$content = str_replace(\"www.\", \"\", $content);\n\t\t\t\t$content = str_replace(\"https://\", \"\", $content);\n\t\t\t\t$content = \"https://www.\".$content;\n\t\t\t} else {\n\t\t\t\t$content = str_replace(\"www.\", \"\", $content);\n\t\t\t\t$content = str_replace(\"https://\", \"\", $content);\n\t\t\t\t$content = \"https://\".$content;\n\t\t\t}\n\t\t\t\t\n\t\t} else if($secure == 'no') {\n\t\t\n\t\t\tif(preg_match('/www./', $content)) {\n\t\t\t\t$content = str_replace(\"www.\", \"\", $content);\n\t\t\t\t$content = str_replace(\"http://\", \"\", $content);\n\t\t\t\t$content = \"http://www.\".$content;\n\t\t\t} else {\n\t\t\t\t$content = str_replace(\"www.\", \"\", $content);\n\t\t\t\t$content = str_replace(\"http://\", \"\", $content);\n\t\t\t\t$content = \"http://\".$content;\n\t\t\t}\n\t\t\t\t\n\t\t} else {\n\t\t\t\n\t\t\t$content = \"http://\".$content;\n\t\t\t\t\n\t\t}\n\t\t\t\n\t} else {\n\t\t$content = str_replace(\"www.\", \"\", $content);\n\t\t$content = str_replace(\"http://\", \"\", $content);\n\t\t$content = str_replace(\"https://\", \"\", $content);\n\t\t$content = \"www.\".$content;\n\t}\n\n\tif(!preg_match(\"/^[a-zA-Z]+[:\\/\\/]+[A-Za-z0-9\\-_]+\\\\.+[A-Za-z0-9\\.\\/%&=\\?\\-_]+$/i\", $content)) return FALSE;\n\treturn $content;\n}", "function markdown_qualify_url($markdown_parser, $url)\n{\n\tif (strstr($url, \"://\")!==false)\n\t\treturn $url;\n\t\t\n\t// Does it start with a slash?\n\tif ($url[0]!=\"/\")\n\t\t$url=$markdown_parser->local_link_prefix.$url;\n\n\t// Add the root link prefix\n\t$url=$markdown_parser->root_link_prefix.$url;\t\t\t\n\t\t\n\treturn $url;\n\n}", "function shorten_url($url){\n include 'shorten.php';\n\n // making the short url\n $outputurl = Shortener($url);\n\n // this short url will be sent on success data\n echo $outputurl;\n\n}", "public function href();", "function LinkToURL($url = null)\n\t{\n\t\t// Print URL link using HTML class\n\t\techo HTML::LinkToURL($url);\n\t}", "function urls_amigables($url) {\n\n$url = strtolower($url);\n\n//Rememplazamos caracteres especiales latinos\n\n$find = array('á', 'é', 'í', 'ó', 'ú', 'ñ');\n\n$repl = array('a', 'e', 'i', 'o', 'u', 'n');\n\n$url = str_replace ($find, $repl, $url);\n\n// Añaadimos los guiones\n\n$find = array(' ', '&', '\\r\\n', '\\n', '+'); \n$url = str_replace ($find, '-', $url);\n\n// Eliminamos y Reemplazamos demás caracteres especiales\n\n$find = array('/[^a-z0-9\\-<>]/', '/[\\-]+/', '/<[^>]*>/');\n\n$repl = array('', '-', '');\n\n$url = preg_replace ($find, $repl, $url);\n\nreturn $url;\n\n}", "function smarty_modifier_replace_urls($p_string)\n{\n // Images get added by the css after the fact.\n $host = \"([a-z\\d][-a-z\\d]*[a-z\\d]\\.)+[a-z][-a-z\\d]*[a-z]\";\n $port = \"(:\\d{1,})?\";\n $path = \"(\\/[^?<>\\#\\\"\\s]+)?\";\n $query = \"(\\?[^<>\\#\\\"\\s]+)?\";\n\n return preg_replace(\"#((ht|f)tps?:\\/\\/{$host}{$port}{$path}{$query})#i\", \"<a target='_blank' class='extLink' rel='nofollow' href='$1'>$1</a>\", $p_string);\n}", "function wpme_rest_get_shortlink( $object ) {\n\treturn wpme_get_shortlink( $object['id'], array() );\n}", "public function shorten_link($url)\n {\n\n $token = $this->get_bitly_client_access_token();\n\n $connectURL = \"https://api-ssl.bitly.com/v3/shorten?access_token={$token}&longUrl={$url}&format=txt\";\n\n $curl = curl_init();\n\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($curl, CURLOPT_URL, $connectURL);\n\n $data = curl_exec($curl);\n curl_close($curl);\n\n return $data;\n\n }", "public function shortenUrlWithCustomKeyword()\n {\n config(['urlhub.hash_length' => 6]);\n\n $longUrl = 'https://laravel.com';\n $customKey = 'foo_bar';\n\n $this->post(route('createshortlink'), [\n 'long_url' => $longUrl,\n 'custom_key' => $customKey,\n ]);\n $url = Url::whereLongUrl($longUrl)->first();\n\n $this->assertSame($customKey, $url->keyword);\n $this->assertTrue($url->is_custom);\n }", "function fixup_protocolless_urls($in)\n{\n require_code('urls2');\n return _fixup_protocolless_urls($in);\n}", "function _make_url_clickable_cb($matches)\n {\n }", "function widgetopts_addhttp($url) {\n if (!preg_match(\"~^(?:f|ht)tps?://~i\", $url)) {\n $url = \"http://\" . $url;\n }\n return $url;\n}", "function hyperlink($text) {\n\n\n $regex = \"/(?#WebOrIP)((?#protocol)((http|https):\\/\\/)?(?#subDomain)(([a-zA-Z0-9]+\\.(?#domain)[a-zA-Z0-9\\-]+(?#TLD)(\\.[a-zA-Z]+){1,2})|(?#IPAddress)((25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9])\\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[0-9])))+(?#Port)(:[1-9][0-9]*)?)+(?#Path)((\\/((?#dirOrFileName)[a-zA-Z0-9_\\-\\%\\~\\+]+)?)*)?(?#extension)(\\.([a-zA-Z0-9_]+))?(?#parameters)(\\?([a-zA-Z0-9_\\-]+\\=[a-z-A-Z0-9_\\-\\%\\~\\+]+)?(?#additionalParameters)(\\&([a-zA-Z0-9_\\-]+\\=[a-z-A-Z0-9_\\-\\%\\~\\+]+)?)*)?/\";\n $text = preg_replace( $regex, \"<a href=\\\"http://$4\\\" style=\\\"font-weight: bold;\\\" target='_new'>$1</a>\", $text );\n\n/*\n // match protocol://address/path/\n $text = ereg_replace(\"[a-zA-Z]+://([.]?[a-zA-Z0-9_/-])*\", \"<a href=\\\"\\\\0\\\">\\\\0</a>\", $text);\n\n // match www.something\n $text = ereg_replace(\"(^| )(www([.]?[a-zA-Z0-9_/-])*)\", \"\\\\1<a href=\\\"http://\\\\2\\\">\\\\2</a>\", $text);\n*/\n return $text;\n }", "function make_links_clickable($text)\r\n {\r\n return preg_replace('!(((f|ht)tp(s)?://)[-a-zA-Zа-яА-Я()0-9@:%_+.~#?&;//=]+)!i', '<a href=\"$1\" target=\"_blank\">$1</a>', $text);\r\n }", "public function shortenLink($code)\n {\n $find = ShortLink::where('code', $code)->first();\n\n $input['click_count'] = $find->click_count + 1;\n\n $find->update($input);\n\n return Redirect::to($find->link);\n }", "function attributions($short) {\n $urls = [\n 'IGN'=> 'http://www.ign.fr',\n 'Shom'=>'http://data.shom.fr',\n 'Cadastre'=>'http://cadastre.gouv.fr',\n 'CNES'=>'http://www.cnes.fr',\n 'GEOSUD'=>'http://www.http://ids.equipex-geosud.fr',\n// 'CIRAD,CNES,CNRS,IGN,IRD,Irstea,GEOSUD'=>'CIRAD,CNES,CNRS,IGN,IRD,Irstea,GEOSUD',\n// 'DGAC/SIA'=>'DGAC/SIA',\n ];\n $attrs = [];\n foreach (explode(',',$short) as $sigle)\n if (isset($urls[$sigle]))\n $attrs[] = \"<a href='\".$urls[$sigle].\"' target='_blank'>$sigle</a>\";\n else\n $attrs[] = $sigle;\n return '&copy; '.implode(',',$attrs);\n}", "function url_to_page_link($url, $abs_only = false, $perfect_only = true)\n{\n require_code('urls2');\n return _url_to_page_link($url, $abs_only, $perfect_only);\n}", "function auto_link_text($text) {\n\t// Pattern from http://daringfireball.net/2010/07/improved_regex_for_matching_urls\n $pattern = \"#(?i)\\b((?:[a-z][\\w-]+:(?:/{1,3}|[a-z0-9%])|www\\d{0,3}[.]|[a-z0-9.\\-]+[.][a-z]{2,4}/)(?:[^\\s()<>]+|\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\))+(?:\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\)|[^\\s`!()\\[\\]{};:'\\\".,<>?«»“”‘’]))#\";\n $callback = create_function('$matches', '\n $url = array_shift($matches);\n $url_parts = parse_url($url);\n\n $text = parse_url($url, PHP_URL_HOST) . parse_url($url, PHP_URL_PATH);\n $text = preg_replace(\"/^www./\", \"\", $text);\n\n $last = -(strlen(strrchr($text, \"/\"))) + 1;\n if ($last < 0) {\n $text = substr($text, 0, $last) . \"&hellip;\";\n }\n\n return sprintf(\\'<a href=\"%s\">%s</a>\\', $url, $text);\n ');\n\n return preg_replace_callback($pattern, $callback, $text);\n}", "public static function makeUrlClickable($text) {\n\t\treturn preg_replace('!(((f|ht)tp(s)?://)[-a-zA-Zа-яА-Я()0-9@:%_+.~#?&;//=]+)!i', '<a href=\"$1\" target=\"_blank\">$1</a>', $text);\n\t}", "public function createReferralLink() : string\n {\n $url = $this->storeManager->getStore()->getBaseUrl(UrlInterface::URL_TYPE_WEB);\n $encrypt = urlencode($this->encryptor->encrypt($this->customerSession->getCustomerId()));\n $link = $url . \"?ref=\" . $encrypt;\n return $link;\n }", "function auto_link_text($text)\n{\n $pattern = '#\\b(([\\w-]+://?|www[.])[^\\s()<>]+(?:\\([\\w\\d]+\\)|([^[:punct:]\\s]|/)))#';\n $callback = create_function('$matches', '\n $url = array_shift($matches);\n $url_parts = parse_url($url);\n\n $text = parse_url($url, PHP_URL_HOST) . parse_url($url, PHP_URL_PATH);\n $text = preg_replace(\"/^www./\", \"\", $text);\n\n $last = -(strlen(strrchr($text, \"/\"))) + 1;\n if ($last < 0) {\n $text = substr($text, 0, $last) . \"&hellip;\";\n }\n\n return sprintf(\\'<a rel=\"nofollow\" target=\"_blank\" href=\"%s\">%s</a>\\', $url, $text);\n ');\n\n return preg_replace_callback($pattern, $callback, $text);\n}", "public function shorten($url) {\n $uniqID = $this->hasher->hash();\n\n $this->linkRepository->create($uniqID,$url);\n\n return $uniqID;\n }", "public function callback_url_as_html ($matches) {\n\t\t\n\t\t$url = preg_replace(\"|%%(\\d+)%%|\", '', $matches[1].$matches[2]);\n\t\t\n\t\tif(isset($matches[3])) {\n\t\t\t// Do not show glossary link if word is part of an external link\n\t\t\t$title = preg_replace(\"|%%(\\d+)%%|\", '', $matches[3]);\n\t\t\t}\n\t\telse {\n\t\t\t$title = $url;\n\t\t\t}\n\n\t $result = '<a href=\"'.$url.'\" class=\"'.$matches[1].'\" rel=\"nofollow\">'.$title.'</a>';\n\t \n\t return $result;\n\t\t}", "function make_url_footnote($content)\n {\n }", "abstract public function translate_short_repo_url($repo, $tag);", "function tnsl_fShortenBlockURLs($sBlockfile = '', $sContents = '') {\r\n\tglobal $tnsl_bDebugMode, $tnsl_sGTFileDir, $tnsl_asGTFileExclude, $tnsl_asNoGTFile;\r\n\tif (!in_array($sBlockfile, $tnsl_asGTFileExclude)) {\r\n\t\tif ($tnsl_bDebugMode) {\r\n\t\t\techo '[ShortLinks_Function] = Present In Block<br />';\r\n\t\t}\r\n\t\tif ($sBlockfile != '') {\r\n\t\t\t$sGTBlockPath = $tnsl_sGTFileDir . '/GTB-' . $sBlockfile;\r\n\t\t\tif (@file_exists($sGTBlockPath)) { // Block has been \"Tapped\"\r\n\t\t\t\tif ($tnsl_bDebugMode) {\r\n\t\t\t\t\techo '[ShortLinks_FilePath] = GTB File Exists for :: ' . $sBlockfile . '<br />';\r\n\t\t\t\t}\r\n\t\t\t\ttnsl_fCleanLinks($sContents);\r\n\t\t\t\tunset($urlin, $urlout);\r\n\t\t\t\tinclude_once($sGTBlockPath);\r\n\t\t\t\t$sContents = preg_replace($urlin, $urlout, $sContents);\r\n\t\t\t} else {\r\n\t\t\t\tif ($tnsl_bDebugMode) {\r\n\t\t\t\t\techo '[ShortLinks_FilePath] = GTB File Does NOT Exist for :: ' . $sBlockfile . '<br />';\r\n\t\t\t\t\t$tnsl_asNoGTFile[] = $sGTBlockPath;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif ($tnsl_bDebugMode) {\r\n\t\t\t\techo '[ShortLinks_Function] = In HTML Block<br />';\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn $sContents;\r\n}", "public function shortUrl()\n {\n return Str::limit(trim($this->url, '/'), 50);\n }", "function normalise_idn_url($url)\n{\n require_code('urls_simplifier');\n $coder_ob = new HarmlessURLCoder();\n return $coder_ob->encode($url);\n}", "function full_link( $link, $secure = false ) {\n\t$link = ltrim( $link, '/' );\n\n\tif ( ! _REWRITE_LINKS ) {\n\t\t// convert rewritten links into normal links.\n\t\t$base_url = _BASE_HREF; //module_config::c('system_base_dir');\n\t\tif ( ! $base_url ) {\n\t\t\t$base_url = '/';\n\t\t}\n\t\t$url_part = preg_replace( '#^' . preg_quote( $base_url, '#' ) . '#i', '', $link );\n\t\t$url_part = preg_replace( '#\\?.*$#', '', $url_part );\n\t\t//echo $url_part.\"<br>\";\n\t\tif ( $url_part ) {\n\t\t\t$new_url_part = '';\n\t\t\t$parts = explode( \"/\", $url_part );\n\t\t\t$module_number = 0;\n\t\t\t//print_r($parts);echo \"<br>\";\n\t\t\t$doing_external = false;\n\t\t\tforeach ( $parts as $part ) {\n\t\t\t\tif ( $part == 'index.php' ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif ( $part == 'external' ) {\n\t\t\t\t\t$doing_external = true;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t$m = explode( \".\", $part );\n\t\t\t\t//print_r($m);echo \"<br>\";\n\t\t\t\tif ( count( $m ) == 2 ) {\n\t\t\t\t\tif ( $doing_external ) {\n\t\t\t\t\t\t$new_url_part .= '' . $m[0] . '=' . $m[1] . '&';\n\t\t\t\t\t} else if ( strlen( $m[1] ) > 3 ) {\n\t\t\t\t\t\t$new_url_part .= 'm[' . $module_number . ']=' . $m[0] . '&';\n\t\t\t\t\t\t$new_url_part .= 'p[' . $module_number . ']=' . $m[1] . '&';\n\t\t\t\t\t\t$module_number ++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( strlen( $new_url_part ) ) {\n\t\t\t\tif ( $doing_external ) {\n\t\t\t\t\t$new_url_part = 'ext.php?' . $new_url_part;\n\t\t\t\t} else {\n\t\t\t\t\t$new_url_part = '?' . $new_url_part;\n\t\t\t\t}\n\t\t\t\tif ( preg_match( '#\\?(.*)$#', $link, $matches ) ) {\n\t\t\t\t\t$new_url_part .= '&' . $matches[1];\n\t\t\t\t}\n\t\t\t\t//echo $new_url_part.\"<br>\";\n\t\t\t\t$link = $new_url_part;\n\t\t\t}\n\t\t}\n\t}\n\t//$url = module_config::c('system_base_href') .module_config::c('system_base_dir') . $link;\n\t$url = _UCM_HOST . _BASE_HREF . $link;\n\tif ( $secure ) {\n\t\t$url = preg_replace( '#^http:#', 'https:', $url );\n\t}\n\n\t// hack for ssl\n\tif ( isset( $_SERVER['HTTPS'] ) && $_SERVER['HTTPS'] != '' && $_SERVER['HTTPS'] != 'off' ) {\n\t\t$url = preg_replace( '#^https?#', 'https', $url );\n\t}\n\n\t// hack for iframe\n\tif ( get_display_mode() == 'iframe' && ! preg_match( '#display_mode#', $url ) ) {\n\t\t$url .= ( strpos( $url, '?' ) === false ? '?' : '&' ) . 'display_mode=iframe';;\n\t}\n\n\treturn $url;\n}", "function wp_make_link_relative($link)\n {\n }" ]
[ "0.74473923", "0.7066896", "0.6849408", "0.66976875", "0.66334164", "0.6516825", "0.64846766", "0.64423096", "0.64423096", "0.6397598", "0.6391207", "0.6385083", "0.6372463", "0.63485956", "0.6347299", "0.63143855", "0.6309495", "0.6280028", "0.6266572", "0.6250881", "0.62463766", "0.62454104", "0.6242343", "0.622233", "0.621233", "0.6190479", "0.6179723", "0.6168435", "0.616798", "0.61671203", "0.61508644", "0.6141919", "0.61360294", "0.6135652", "0.61319137", "0.61285514", "0.61217546", "0.61214983", "0.6060977", "0.6032363", "0.6025933", "0.6020682", "0.6010391", "0.59861696", "0.59825164", "0.5979513", "0.59775335", "0.59564954", "0.59543055", "0.594602", "0.59426373", "0.5942576", "0.5942576", "0.59387857", "0.5936614", "0.5936234", "0.5931155", "0.5930147", "0.5924227", "0.591434", "0.59123856", "0.59077525", "0.5896659", "0.5886662", "0.58780545", "0.58638984", "0.58598876", "0.5845435", "0.58410585", "0.5838416", "0.58266157", "0.5826138", "0.58237475", "0.5819875", "0.5818888", "0.5812875", "0.5805442", "0.5801537", "0.5797924", "0.578834", "0.5783", "0.57792807", "0.57767123", "0.5775595", "0.57736284", "0.57729477", "0.57729185", "0.57712597", "0.57677794", "0.57666713", "0.57582116", "0.5757775", "0.57541054", "0.5753936", "0.57436925", "0.573867", "0.57343554", "0.5734204", "0.57314605", "0.57242423" ]
0.62820965
17
Obfuscate a link to an email address
public static function onShortCode_email(ShortcodeInterface $s): ?string { $email = $s->getBbCode() ?? $s->getContent(); $content = $s->getContent() ? $s->getContent() : $email; return Format::base64obfuscate(sprintf('<a href="mailto:%s">%s</a>', $email, $content)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function emc_obfuscate_mailto_url( $email ) {\r\n\r\n\tif ( ! is_email( $email ) ) return false;\r\n\r\n\t$email = 'mailto:' . antispambot( $email );\r\n\r\n\treturn esc_url( $email );\r\n\r\n}", "function obfuscate_email($email) {\n\t$out = \"\";\n\t$len = strlen($email);\n\n\tfor($i = 0; $i < $len; $i++)\n\t\t$out .= \"&#\" . ord($email[$i]) . \";\";\n\n\treturn $out;\n}", "function hrefCryptMail($mail)\n{\n $cs = \"mailto:\".$mail;\n $result=\"\";\n for($i=0;$i<strlen($cs);$i++) {\n $n=ord($cs[$i]);\n if($n>=8364)$n=128; \n $result.=chr($n+1);\n }\n $href=\"javascript:linkTo_UnCryptMailto('$result');\";\n return $href;\n}", "function string_email( $p_string ) \r\n{\r\n\t$p_string = string_strip_hrefs( $p_string );\r\n\treturn $p_string;\r\n}", "function obfuscateSingle($email, $pageId, $method) {\n\t\t$arrEmail = explode('@', $email);\n\t\t$strDomain = substr($arrEmail[1], 0, strrpos($arrEmail[1], '.'));\n\t\t$strTld = substr($arrEmail[1], strrpos($arrEmail[1], '.') + 1);\n\n\t\t$uId = microtime();\n\t\t$uId = substr($uId, 0, strpos($uId, ' '));\n\t\t\n\t\t$strLink = '<a title=\"'.$this->tooltip_js_off.'\"';\n\t\t$strLink .= ' href=\"'.$this->folder.'/aeo/'.\n\t\t ($this->rot13 ? str_rot13($arrEmail[0]) : $arrEmail[0]).'+'.\n\t\t ($this->rot13 ? str_rot13($strDomain) : $strDomain).'+'.\n\t\t ($this->rot13 ? str_rot13($strTld) : $strTld).'+'.\n\t\t $pageId.($this->urlSuffix == null ? '' : $this->urlSuffix).\n\t\t '\" rel=\"nofollow\" name=\"'.uniqid('aeo-obfuscated-', true).'\" class=\"email aeo\">';\n\t\t\n\t\tif ($method !== 'none') {\n\t\t\t// passendes CSS hinzufügen\n\t\t\t$strLink .= $this->obfuscateWithMethod($arrEmail[0], $method, true, 0, 0).'@'.$strDomain.'.'.$strTld;\n\t\t} else {\n\t\t\t$this->import('StringUtil');\n\t\t\t$strLink .= $this->StringUtil->encodeEmail($email);\n\t\t}\n\t\t$strLink .= '</a>';\n\t\treturn $this->createSpecialEntities($strLink);\n\t}", "public function obfuscate()\n {\n $string = $this->getStringspector()->getString();\n\n $emailAddressMatches = array();\n $emailAddressFound = (bool) preg_match_all(self::REG_EXP, $string, $emailAddressMatches);\n\n if (!$emailAddressFound) {\n return;\n }\n\n foreach ($emailAddressMatches[0] as $emailAddress) {\n $obfuscatedEmailAddress = func_num_args() ? func_get_arg(0) : str_repeat('*', strlen($emailAddress));\n $string = str_replace($emailAddress, $obfuscatedEmailAddress, $string);\n }\n\n $this->getStringspector()->setString($string);\n }", "function ofa_secure_mail($email, $text) {\n $mailto = antispambot('mailto:' . $email);\n $txt = antispambot($text);\n return '<a href=\"' . $mailto . '\">' . $txt . '</a>';\n}", "public static function email($email) {\n\t\treturn str_replace('@', '&#64;', static::obfuscate($email));\n\t}", "function string_email_links( $p_string ) {\r\n\t$p_string = string_email( $p_string );\r\n return $p_string;\r\n}", "function sw_velocityconveyor_safe_email( $atts, $content ) {\n\nreturn '<a href=\"mailto:' . antispambot( $content ) . '\">' . antispambot( $content ) . '</a>';\n}", "public static function obfuscateEmails($html)\n\t{\n\t\treturn preg_replace_callback('#(mailto:)?[a-z0-9_.+-]+@[a-z0-9-]+\\.[a-z0-9-.]+#i', function ($match) {\n\t\t\treturn \\HTML::email($match[0]);\n\t\t}, $html);\n\t}", "function blm_hide_email_shortcode( $atts , $content = null ) {\n\tif ( ! is_email( $content ) ) {\n\t\treturn;\n\t}\n\n\treturn '<a href=\"mailto:' . antispambot( $content ) . '\">' . antispambot( $content ) . '</a>';\n}", "function wpcodex_hide_email_shortcode( $atts , $content = null ) {\n\tif ( ! is_email( $content ) ) {\n\t\treturn;\n\t}\n\n\treturn '<a href=\"mailto:' . antispambot( $content ) . '\">' . antispambot( $content ) . '</a>';\n}", "function string_strip_hrefs( $p_string ) \r\n{\r\n\t# First grab mailto: hrefs. We don't care whether the URL is actually\r\n\t# correct - just that it's inside an href attribute.\r\n\t$p_string = preg_replace( '/<a\\s[^\\>]*href=\"mailto:([^\\\"]+)\"[^\\>]*>[^\\<]*<\\/a>/si',\r\n\t\t\t\t\t\t\t\t'\\1', $p_string);\r\n\r\n\t# Then grab any other href\r\n\t$p_string = preg_replace( '/<a\\s[^\\>]*href=\"([^\\\"]+)\"[^\\>]*>[^\\<]*<\\/a>/si',\r\n\t\t\t\t\t\t\t\t'\\1', $p_string);\r\n\treturn $p_string;\r\n}", "function UnMangle($email)\n{\n\tif (AT_MANGLE != \"\")\n\t\t$email = str_replace(AT_MANGLE,\"@\",$email);\n\treturn ($email);\n}", "function sendPassRecLink(string $email) {\n\n }", "function tev_email_encode( $atts, $email ){\r\n\t$atts = extract( shortcode_atts( array('email'=>$email),$atts ));\r\n\t\r\n\tif(function_exists('antispambot')){\r\n\t\treturn '<a href=\"'.antispambot(\"mailto:\".$email).'\">'.antispambot($email).'</a>';\r\n\t\t}\r\n}", "function antispambot($email_address, $hex_encoding = 0)\n {\n }", "function it_exchange_generate_reclaim_link_for_abandoned_email( $email_id, $cart_id ) {\n\t$rmd5 = md5( rand() );\n\t$obfuscation_ftw = substr( $rmd5, 0, 1 );\n\t$obfuscation_ftw .= '-' . substr( $rmd5, 1, 7 ) . $email_id . substr( $rmd5, 8, 5 );\n\t$obfuscation_ftw .= '-' . substr( $rmd5, 13, 4 );\n\t$obfuscation_ftw .= '-' . $cart_id . substr( $rmd5, 17, 3 );\n\t$obfuscation_ftw .= '-' . substr( $rmd5, 20 );\n\treturn add_query_arg( array( 'iterab' => $obfuscation_ftw ), get_home_url() );\n}", "function autolink($string) {\n\t\t$string = preg_replace(\"/(([\\w\\.-]+))(@)([\\w\\.]+)\\b/i\", \"<a href=\\\"mailto:$0\\\">$0</a>\", $string);\n\t\t$string = preg_replace('#(http|https|ftp)://([^\\s]*)#', '<a href=\"\\\\1://\\\\2\" target=\"_blank\">\\\\1://\\\\2</a>', $string);\n\n\t\treturn $string;\n\t}", "function encode_email($mail, $text=\"\", $class=\"\", $prefix)\n{\n $encmail =\"\";\n for($i=0; $i<strlen($mail); $i++)\n {\n $encMod = rand(0,2);\n switch ($encMod) {\n case 0: // None\n $encmail .= substr($mail,$i,1);\n break;\n case 1: // Decimal\n $encmail .= \"&#\".ord(substr($mail,$i,1)).';';\n break;\n case 2: // Hexadecimal\n $encmail .= \"&#x\".dechex(ord(substr($mail,$i,1))).';';\n break;\n }\n }\n $encprefix =\"\";\n for($i=0; $i<strlen($prefix); $i++)\n {\n $encMod = rand(0,2);\n switch ($encMod) {\n case 0: // None\n $encprefix .= substr($prefix,$i,1);\n break;\n case 1: // Decimal\n $encprefix .= \"&#\".ord(substr($prefix,$i,1)).';';\n break;\n case 2: // Hexadecimal\n $encprefix .= \"&#x\".dechex(ord(substr($prefix,$i,1))).';';\n break;\n }\n }\n\n if(!$text)\n {\n $text = $encmail;\n }\n $encmail = $prefix.$encmail;\n return \"<a class='$class' href='$encmail'>$text</a>\";\n}", "public function getEmailOnBrokenLinkOnly() {}", "function autolink($message) {\n\t$message = preg_replace('#([\\s|^])(www)#i', '$1http://$2', $message);\n\t$pattern = '#((http|https|ftp|telnet|news|gopher|file|wais):\\/\\/[^\\s]+)#i';\n\t$replacement = '<a href=\"$1\" target=\"_blank\">$1</a>';\n\t$message = preg_replace($pattern, $replacement, $message);\n\n\treturn $message;\n}", "function buildLink($ip, $cognome, $nome, $email, $hash){\n $link='http://'.$ip.'/PhpMySqlAndroid/userConfirmEmail.php?'.\n 'cognome='.$cognome.\n '&nome='.$nome.\n '&email='.$email.\n '&hash='.$hash;\n\n return $link;\n }", "public function autoLinkEmails($text) {\n\t\t$atom = '[a-z0-9!#$%&\\'*+\\/=?^_`{|}~-]';\n\t\t$regex = '/(' . $atom . '+(?:\\.' . $atom . '+)*@[a-z0-9-]+(?:\\.[a-z0-9-]+)+)/i';\n\n\t\t// Encodes an email address as a mailto link with each character\n\t\t// of the address encoded as either a decimal or hex entity, in\n\t\t// the hopes of foiling most address harvesting spam bots.\n\t\t//\n\t\t// Based upon the implementation as available in PHP Markdown.\n\t\t// Copyright (c) 2004-2008 Michel Fortin\n\t\t// Licensed under the 3-clause BSD license.\n\t\t$encode = function($addr) {\n\t\t\t$addr = \"mailto:{$addr}\";\n\t\t\t$chars = preg_split('/(?<!^)(?!$)/', $addr);\n\t\t\t$seed = (int) abs(crc32($addr) / strlen($addr)); # Deterministic seed.\n\n\t\t\tforeach ($chars as $key => $char) {\n\t\t\t\t$ord = ord($char);\n\t\t\t\t// Ignore non-ascii chars.\n\t\t\t\tif ($ord < 128) {\n\t\t\t\t\t$r = ($seed * (1 + $key)) % 100; // Pseudo-random function.\n\t\t\t\t\t// roughly 10% raw, 45% hex, 45% dec\n\t\t\t\t\t// '@' *must* be encoded. I insist.\n\t\t\t\t\tif ($r > 90 && $char != '@') /* do nothing */;\n\t\t\t\t\telse if ($r < 45) $chars[$key] = '&#x'.dechex($ord).';';\n\t\t\t\t\telse $chars[$key] = '&#'.$ord.';';\n\t\t\t\t}\n\t\t\t}\n\t\t\t$addr = implode('', $chars);\n\t\t\t$text = implode('', array_slice($chars, 7)); // text without `mailto:`\n\n\t\t\treturn \"<a href=\\\"{$addr}\\\">{$text}</a>\";\n\t\t};\n\n\t\treturn preg_replace_callback($regex, function($matches) use ($encode) {\n\t\t\treturn $encode($matches[0]);\n\t\t}, $text);\n\t}", "function convert_to_links($msg){\r\n\t\t$final_message = preg_replace(array('/(?i)\\b((?:https?:\\/\\/|www\\d{0,3}[.]|[a-z0-9.\\-]+[.][a-z]{2,4}\\/)(?:[^\\s()<>]+|\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\))+(?:\\(([^\\s()<>]+|(\\([^\\s()<>]+\\)))*\\)|[^\\s`!()\\[\\]{};:\\'\".,<>?«»“”‘’]))/', '/(^|[^a-z0-9_])@([a-z0-9_]+)/i', '/(^|[^a-z0-9_])#([a-z0-9_]+)/i'), array('<a href=\"$1\" target=\"_blank\">$1</a>', '$1<a href=\"\">@$2</a>', '$1<a href=\"index.php?hashtag=$2\">#$2</a>'), $msg);\r\n\t\treturn $final_message;\r\n\t}", "public function autoLinkify($str)\n {\n return preg_replace_callback('/(?i)\\b((?:((?:ht|f)tps?:(?:\\/{1,3}|[a-z0-9%]))|[a-z0-9.\\-]+[.](?:com|net|org|edu|gov|mil|aero|asia|biz|cat|coop|info|int|jobs|mobi|museum|name|post|pro|tel|travel|xxx|ac|ad|ae|af|ag|ai|al|am|an|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cs|cu|cv|cx|cy|cz|dd|de|dj|dk|dm|do|dz|ec|ee|eg|eh|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|Ja|sk|sl|sm|sn|so|sr|ss|st|su|sv|sx|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tp|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|yu|za|zm|zw)\\/)(?:[^\\s()<>{}\\[\\]]+|\\([^\\s()]*?\\([^\\s()]+\\)[^\\s()]*?\\)|\\([^\\s]+?\\))+(?:\\([^\\s()]*?\\([^\\s()]+\\)[^\\s()]*?\\)|\\([^\\s]+?\\)|[^\\s`!()\\[\\]{};:\\'\".,<>?«»“”‘’])|(?:(?<!@)[a-z0-9]+(?:[.\\-][a-z0-9]+)*[.](?:com|net|org|edu|gov|mil|aero|asia|biz|cat|coop|info|int|jobs|mobi|museum|name|post|pro|tel|travel|xxx|ac|ad|ae|af|ag|ai|al|am|an|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cs|cu|cv|cx|cy|cz|dd|de|dj|dk|dm|do|dz|ec|ee|eg|eh|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|Ja|sk|sl|sm|sn|so|sr|ss|st|su|sv|sx|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tp|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|yu|za|zm|zw)\\b\\/?(?!@)))/i', \"self::processLinkify\", $str);\n }", "function safe_mailto($email, $title = '', $attributes = '')\r\n\t{\r\n\t\t$title = (string) $title;\r\n\r\n\t\tif ($title === '')\r\n\t\t{\r\n\t\t\t$title = $email;\r\n\t\t}\r\n\r\n\t\t$x = str_split('<a href=\"mailto:', 1);\r\n\r\n\t\tfor ($i = 0, $l = strlen($email); $i < $l; $i++)\r\n\t\t{\r\n\t\t\t$x[] = '|'.ord($email[$i]);\r\n\t\t}\r\n\r\n\t\t$x[] = '\"';\r\n\r\n\t\tif ($attributes !== '')\r\n\t\t{\r\n\t\t\tif (is_array($attributes))\r\n\t\t\t{\r\n\t\t\t\tforeach ($attributes as $key => $val)\r\n\t\t\t\t{\r\n\t\t\t\t\t$x[] = ' '.$key.'=\"';\r\n\t\t\t\t\tfor ($i = 0, $l = strlen($val); $i < $l; $i++)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$x[] = '|'.ord($val[$i]);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$x[] = '\"';\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tfor ($i = 0, $l = strlen($attributes); $i < $l; $i++)\r\n\t\t\t\t{\r\n\t\t\t\t\t$x[] = $attributes[$i];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$x[] = '>';\r\n\r\n\t\t$temp = array();\r\n\t\tfor ($i = 0, $l = strlen($title); $i < $l; $i++)\r\n\t\t{\r\n\t\t\t$ordinal = ord($title[$i]);\r\n\r\n\t\t\tif ($ordinal < 128)\r\n\t\t\t{\r\n\t\t\t\t$x[] = '|'.$ordinal;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tif (count($temp) === 0)\r\n\t\t\t\t{\r\n\t\t\t\t\t$count = ($ordinal < 224) ? 2 : 3;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$temp[] = $ordinal;\r\n\t\t\t\tif (count($temp) === $count)\r\n\t\t\t\t{\r\n\t\t\t\t\t$number = ($count === 3)\r\n\t\t\t\t\t\t\t? (($temp[0] % 16) * 4096) + (($temp[1] % 64) * 64) + ($temp[2] % 64)\r\n\t\t\t\t\t\t\t: (($temp[0] % 32) * 64) + ($temp[1] % 64);\r\n\t\t\t\t\t$x[] = '|'.$number;\r\n\t\t\t\t\t$count = 1;\r\n\t\t\t\t\t$temp = array();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$x[] = '<'; $x[] = '/'; $x[] = 'a'; $x[] = '>';\r\n\r\n\t\t$x = array_reverse($x);\r\n\r\n\t\t$output = \"<script type=\\\"text/javascript\\\">\\n\"\r\n\t\t\t.\"\\t//<![CDATA[\\n\"\r\n\t\t\t.\"\\tvar l=new Array();\\n\";\r\n\r\n\t\tfor ($i = 0, $c = count($x); $i < $c; $i++)\r\n\t\t{\r\n\t\t\t$output .= \"\\tl[\".$i.\"] = '\".$x[$i].\"';\\n\";\r\n\t\t}\r\n\r\n\t\t$output .= \"\\n\\tfor (var i = l.length-1; i >= 0; i=i-1) {\\n\"\r\n\t\t\t.\"\\t\\tif (l[i].substring(0, 1) === '|') document.write(\\\"&#\\\"+unescape(l[i].substring(1))+\\\";\\\");\\n\"\r\n\t\t\t.\"\\t\\telse document.write(unescape(l[i]));\\n\"\r\n\t\t\t.\"\\t}\\n\"\r\n\t\t\t.\"\\t//]]>\\n\"\r\n\t\t\t.'</script>';\r\n\r\n\t\treturn $output;\r\n\t}", "function microid_hash($email, $url)\n{\n\treturn sha1(sha1(\"mailto:\" . trim($email)) . sha1(trim($url)));\n}", "function link_do_better($link)\n{\n\t$link = preg_replace('#([\\w\\d]+=[\\w\\d]{32})#',null,$link);\n\tprint_r($link);\n\treturn $link;\n}", "function safe_mailto($email, $name = null, $opt = array(null))\n{\n\t$opt = array_merge(\n\t\tarray(\n\t\t\t'link' \t\t=> TRUE,\n\t\t\t'subject' \t=> '',\n\t\t\t'name' \t\t=> $name,\n\t\t\t'bcc' \t\t=> '',\n\t\t\t'cc' \t\t=> '',\n\t\t\t'class' \t=> 'email',\n\t\t\t'id' \t\t=> ''\n\t\t), \n\t$opt);\n\t\n\t$opt['subject']\t= !empty($opt['subject'])\t? 'subject='.$opt['subject'] : '';\n\t$opt['cc'] \t\t= !empty($opt['cc']) ? '&cc='.$opt['cc'] : '';\t\n\t$opt['bcc'] \t= !empty($opt['bcc']) ? '&bcc='.$opt['bcc'] : '';\n\t$opt['class'] \t= !empty($opt['class'])\t? ' class=\"'.$opt['class'].'\"' : '';\n\t$opt['id'] \t\t= !empty($opt['id'])\t? ' id=\"'.$opt['id'].'\"' : '';\n\t\n\tif($opt['link'] == TRUE)\n\t{\n\t\t$email = '<a target=\"_blank\" href=\"mailto:'.$email.'?'.$opt['subject'].$opt['cc'].$opt['bcc'].'\"'.$opt['class'].$opt['id'].'>'.$opt['name'].'</a>';\n\t}\n\n\t$email = str_replace(array('\"','@','.','/'),array('\\\"','\\100','\\56','\\057'),$email);\n\t$email = str_rot13($email);\n\t\n\treturn '<script type=\"text/javascript\">document.write(\"'.$email.'\".replace(/[a-zA-Z]/g, function(c){return String.fromCharCode((c<=\"Z\"?90:122)>=(c=c.charCodeAt(0)+13)?c:c-26);}));</script>';\n}", "function protectLink($link) {\n\t\tif(strpos($link,\"?\")) return $link.\"&spack_token=\".$this->token;\n\t\telse return $link.\"?spack_token=\".$this->token;\n\t}", "public function encode_email($email)\n\t{\n\t\treturn str_replace('@', '&#64;', $this->obfuscate($email));\n\t}", "function obfuscate($arrLink, $output, $pageId, $urlSuffix, $intPos, &$intOffset) {\n\t\t$newLink = '<a';\n\t\t\n\t\t// Originalen title auswerten\n\t\t$originalTitle = $this->getOrigValue('title', $arrLink);\n\t\t\n\t\t// Originalen class auswerten\n\t\t$originalClass = $this->getOrigValue('class', $arrLink);\n\t\t\n\t\tif (strpos($originalClass, 'aeo')) {\n\t\t\t// Adresse wurde bereits behandelt\n\t\t\treturn $output;\n\t\t}\n\t\t\n\t\tif (strlen(trim($arrLink['before'][0]))) {\n\t\t\t$newLink .= ' '.trim($arrLink['before'][0]);\n\t\t}\n\t\tif (strlen(trim($arrLink['after'][0]))) {\n\t\t\t$newLink .= ' '.trim($arrLink['after'][0]);\n\t\t}\n\t\tif (strlen($originalTitle)) {\n\t\t\t$newLink .= ' title=\"'.$originalTitle.'\"';\n\t\t\tif (strlen($originalClass)) {\n\t\t\t\t$newLink .= ' class=\"'.$originalClass.' aeo-with-title\"';\t\n\t\t\t} else {\n\t\t\t\t$newLink .= ' class=\"aeo-with-title\"';\t\n\t\t\t}\n\t\t} else {\n\t\t\t$newLink .= ' title=\"'.$this->tooltip_js_off.'\"';\n\t\t\tif (strlen($originalClass)) {\n\t\t\t\t$newLink .= ' class=\"'.$originalClass.'\"';\t\n\t\t\t}\n\t\t}\n\n\t\t$strParams = '';\n\t\tif (strlen($arrLink['params'][0]) && '?' === substr($arrLink['params'][0], 0, 1)) {\n\t\t\t$strParams = base64_encode($arrLink['params'][0]);\n\t\t}\n\t\t\n\t\t$newLink .= ' href=\"'.$this->folder.'/aeo/'.\n\t\t ($this->rot13 ? str_rot13($arrLink['email'][0]) : $arrLink['email'][0]).'+'.\n\t\t ($this->rot13 ? str_rot13($arrLink['domain'][0]) : $arrLink['domain'][0]).'+'.\n\t\t ($this->rot13 ? str_rot13($arrLink['suffix'][0]) : $arrLink['suffix'][0]).'+'.\n\t\t $pageId.'+'.$strParams.$urlSuffix.'\" rel=\"nofollow\" name=\"aeo-obfuscated-'.$intPos.'\"';\n\t\t$newLink .= '>';\n\t\t$output = $this->str_replace($arrLink['all'][0], $newLink, $output, $intOffset);\n\t\t$intOffset = $intPos + strlen($newLink);\n\t\treturn $output;\n\t}", "private function encode($addr)\n {\n $addr = 'mailto:' . $addr;\n $chars = preg_split('/(?<!^)(?!$)/', $addr);\n $seed = (int) abs(crc32($addr) / strlen($addr)); # Deterministic seed.\n\n foreach ($chars as $key => $char) {\n $ord = ord($char);\n # Ignore non-ascii chars.\n if ($ord < 128) {\n $r = ($seed * (1 + $key)) % 100; # Pseudo-random function.\n # roughly 10% raw, 45% hex, 45% dec\n # '@' *must* be encoded. I insist.\n if ($r > 90 && $char != '@') {\n /* do nothing */;\n } elseif ($r < 45) {\n $chars[$key] = '&#x' . dechex($ord) . ';';\n } else {\n $chars[$key] = '&#' . $ord . ';';\n }\n }\n }\n\n return $chars;\n }", "function mangle_email($s) {\r\n\treturn preg_match('/([^@\\s]+)@([-a-z0-9]+\\.)+[a-z]{2,}/is', '<$1@...>', $s);\r\n}", "function emaillink($address, $name = null, $returnonly = false) {\n global $conf;\n //simple setup\n $link = array();\n $link['target'] = '';\n $link['pre'] = '';\n $link['suf'] = '';\n $link['style'] = '';\n $link['more'] = '';\n\n $name = $this->_getLinkTitle($name, '', $isImage);\n if(!$isImage) {\n $link['class'] = 'mail';\n } else {\n $link['class'] = 'media';\n }\n\n $address = $this->_xmlEntities($address);\n $address = obfuscate($address);\n $title = $address;\n\n if(empty($name)) {\n $name = $address;\n }\n\n if($conf['mailguard'] == 'visible') $address = rawurlencode($address);\n\n $link['url'] = 'mailto:'.$address;\n $link['name'] = $name;\n $link['title'] = $title;\n\n //output formatted\n if($returnonly) {\n return $this->_formatLink($link);\n } else {\n $this->doc .= $this->_formatLink($link);\n }\n }", "function content_twitter_mention($content) {\n\treturn preg_replace('/([^a-zA-Z0-9-_&])@([0-9a-zA-Z_]+)/', \"$1<a href=\\\"http://twitter.com/$2\\\" target=\\\"_blank\\\" rel=\\\"nofollow\\\">@$2</a>\", $content);\n}", "function 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 encode_email_address( $email ) {\n\n $output = '';\n\n for ($i = 0; $i < strlen($email); $i++) \n { \n $output .= '&#'.ord($email[$i]).';'; \n }\n\n return $output;\n}", "public function testEncryptEmailB() {\n // Encrypted anchor\n $encrypted_anchor = security::encrypt_email( '[email protected]', 'John Doe' );\n\n // Proper email =\n // Make sure it's 15 characters\n $this->assertEquals( \"<a href='&#109;&#097;&#105;&#108;&#116;&#111;&#058;john&#64;doe&#46;&#99;&#111;&#109;' title='John Doe'>john&#64;doe&#46;&#99;&#111;&#109;</a>\", $encrypted_anchor );\n }", "function preFilterLink($text)\r\n{\r\n\t// Separate the URL from the link text\r\n\t// and filter the link text.\r\n\t// If the URL somehow contains malicious\r\n\t// characters, they should be filtered out\r\n\t// by htmlentities() when the URL is output\r\n\t// as a link - but it might break the link...\r\n\t$array = explode(' ', $text);\r\n\t$url = array_shift($array);\r\n\t$text = implode(' ', $array);\r\n\t$text = preFilterText($text);\r\n\treturn $url . ' ' . $text;\r\n}", "function clean_urls($text) {\r\n\t$text = strip_tags(lowercase($text));\r\n\t$code_entities_match = array(' ?',' ','--','&quot;','!','@','#','$','%',\r\n '^','&','*','(',')','+','{','}','|',':','\"',\r\n '<','>','?','[',']','\\\\',';',\"'\",',','/',\r\n '*','+','~','`','=','.');\r\n\t$code_entities_replace = array('','-','-','','','','','','','','','','','',\r\n '','','','','','','','','','','','','');\r\n\t$text = str_replace($code_entities_match, $code_entities_replace, $text);\r\n\t$text = urlencode($text);\r\n\t$text = str_replace('--','-',$text);\r\n\t$text = rtrim($text, \"-\");\r\n\treturn $text;\r\n}", "protected function composeEmailToUser()\n\t{\n\t\t$theURL = ( empty($this->myReentryURL) ?\n\t\t\t\t$this->composeReentryURL() : $this->myReentryURL ) ;\n\t\t$s = $this->model->getRes( 'account/email_body_pwd_reset_instr/'\n\t\t\t. $this->myEmailAddr . '/'\n\t\t\t. $this->getRandomCharsFromToken() )\n\t\t\t. '<a href=\"' . $theURL . '\">' . $theURL . '</a>'\n\t\t\t;\n\t\treturn $s ;\n\t}", "function rnf_postie_inreach_author($email) {\n // So we can inspect the domain, refer to $domain[1]\n $domain = explode('@', $email);\n\n // Get the whitelisting options\n $options = get_option( 'rnf_postie_settings' );\n $accept_addresses = $options['emails'];\n $accept_domains = $options['domains'];\n\n // Test the email address and change it to mine if it's allowable.\n if (in_array($email, $accept_addresses) || in_array($domain[1], $accept_domains)) {\n // For a multi-author site, this should be a setting. For me, this is fine.\n $admin = get_userdata(1);\n return $admin->get('user_email');\n }\n return $email;\n}", "function clean_url($text)\n\t\t{\n\t\t\t$text=strtolower($text);\n\t\t\t$code_entities_match = array(' ','--','&quot;','!','@','#','$','%','^','&','*','(',')','_','+','{','}','|',':','\"','<','>','?','[',']','\\\\',';',\"'\",',','.','/','*','+','~','`','=');\n\t\t\t$code_entities_replace = array('-','-','','','','','','','','','','','','','','','','','','','','','','','','');\n\t\t\t$text = str_replace($code_entities_match, $code_entities_replace, $text);\n\t\t\treturn $text;\n\t\t}", "function changeUrlUnparsedEqualsCode(&$tag, &$data)\n{\n global $txt, $modSettings, $context;\n loadLanguage('Redirector/Redirector');\n\n // Anchor tag\n if (substr($data, 0, 1) == '#') {\n $data = '#post_' . substr($data, 1);\n return;\n } else {\n if (strpos($data, 'http://') !== 0 && strpos($data, 'https://') !== 0) {\n $data = 'http://' . $data;\n }\n }\n\n $href = getRedirectorUrl($data);\n\n $tag['before'] = '<a href=\"' . $href . '\" class=\"bbc_link\" ' . ((!empty($modSettings['redirector_nofollow_links']) && $modSettings['redirector_mode'] == 'immediate' && !checkWhiteList(\n $data\n )) ? 'rel=\"nofollow noopener noreferrer\" ' : '') . ($tag['tag'] == 'url' ? 'target=\"_blank\"' : '') . ' >';\n $tag['after'] = '</a>';\n\n // Hide links from guests\n if (!empty($modSettings['redirector_hide_guest_links']) && !empty($context['user']['is_guest']) && !checkWhiteList(\n $data\n )) {\n $tag['before'] = $tag['before'] . (!empty($modSettings['redirector_hide_guest_custom_message']) ? $modSettings['redirector_hide_guest_custom_message'] : $txt['redirector_hide_guest_message']) . '[url-disabled]';\n $tag['after'] = '[/url-disabled]' . $tag['after'];\n }\n}", "function sandbox_commenter_link() {\n\t$commenter = get_comment_author_link() ;\n\tif ( ereg( '<a[^>]* class=[^>]+>', $commenter ) ) {\n\t\t$commenter = ereg_replace( '(<a[^>]* class=[\\'\"]?)', '\\\\1url ' , $commenter . \"&infin;\" );\n\t} else {\n\t\t$commenter = ereg_replace( '(<a )/', '\\\\1class=\"url \"' , $commenter );\n\t}\n\t$email = get_comment_author_email();\n\t$avatar = str_replace( \"class='avatar\", \"class='photo avatar\", get_avatar( \"$email\", \"32\" ) );\n\techo $avatar . ' <span class=\"fn n\">' . $commenter . '</span>';\n}", "function sanitize_email($email)\n {\n }", "function iu_linkusername($string) {\n\n\t// regex pattern\n\t$pattern = '/@([a-zA-Z0-9_]+)/';\n\t// convert string URLs to active links\n\t$replace = '<a href=\"/profile/$1\">@$1</a>';\n\t$new_string = preg_replace($pattern, $replace, $string);\n\n\treturn $new_string;\n}", "function cleanUrl($text) {\r\n $text = strtolower($text);\r\n $code_entities_match = array('&quot;', '!', '@', '#', '$', '%', '^', '&', '*', '(', ')', '+', '{', '}', '|', ':', '\"', '<', '>', '?', '[', ']', '', ';', \"'\", ',', '.', '_', '/', '*', '+', '~', '`', '=', ' ', '---', '--', '--', '�');\r\n $code_entities_replace = array('', '-', '-', '', '', '', '-', '-', '', '', '', '', '', '', '', '-', '', '', '', '', '', '', '', '', '', '-', '', '-', '-', '', '', '', '', '', '-', '-', '-', '-');\r\n $text = str_replace($code_entities_match, $code_entities_replace, $text);\r\n return $text;\r\n}", "function make_link($string)\n {\n $string = ' ' . $string;\n $string = preg_replace_callback(\"#(^|[\\n ])([\\w]+?://.*?[^ \\\"\\n\\r\\t<]*)#is\", \"shorten_link\", $string);\n $string = preg_replace(\"#(^|[\\n ])((www|ftp)\\.[\\w\\-]+\\.[\\w\\-.\\~]+(?:/[^ \\\"\\t\\n\\r<]*)?)#is\", \"$1<a href=\\\"http://$2\\\">$2</a>\", $string);\n #$string = preg_replace(\"#(^|[\\n ])([a-z0-9&\\-_.]+?)@([\\w\\-]+\\.([\\w\\-\\.]+\\.)*[\\w]+)#i\", \"\\\\1<a href=\\\"mailto:\\\\2@\\\\3\\\">\\\\2@\\\\3</a>\", $string);\n $string = mb_substr($string, 1, mb_strlen($string, CHARSET), CHARSET);\n return $string;\n }", "public static function obfuscateLinkDecrypt($balise = \"a\", $class = \"hiddenLink\", $base16 = \"0A12B34C56D78E9F\")\n {\n \t// We open the buffer.\n \tob_start ();\n \t?>\n <script type=\"text/javascript\">\n //<![CDATA[\n jQuery(document).ready(function() { \n var listitems = jQuery('.<?php echo $class; ?>').get();\n var index_ = 0;\n listitems.sort(function(a, b) {\n var hashtag = parsedURL.anchor ? '#'+parsedURL.anchor : null ; //FORMAT HAS TO MATCH #AAAAA\n var hashtag_ = '#' + $(a).data('hashtag');\n var sort_a = parseInt($(a).data('sort'));\n var sort_b = parseInt($(b).data('sort'));\n if (hashtag == hashtag_) {\n return 0;\n } else if ( (sort_a != undefined) && (sort_b != undefined) && (sort_a < sort_b) ) {\n return sort_a;\n } else if ( (sort_a != undefined) && (sort_b != undefined) && (sort_a > sort_b) ) {\n return sort_a;\n } else {\n index_ = index_ +1;\n return index_;\n }\n })\n $.each(listitems, function(index, span) { \n $(span).removeClass('<?php echo $class; ?>');\n \n var base16 = \"<?php echo $base16; ?>\";\n var link = document.createElement('<?php echo $balise; ?>');\n var styles = span.className.split(' ');\n var encoded = styles[0];\n var decoded = ''; \n for (var i = 0; i < encoded.length; i += 2) {\n var ch = base16.indexOf(encoded.charAt(i));\n var cl = base16.indexOf(encoded.charAt(i+1));\n decoded += String.fromCharCode((ch*16)+cl);\n } \n styles.shift();\n link.className = styles.join(' ');\n <?php if (in_array($balise, array('img', 'iframe', 'script'))) : ?>\n link.src = decoded;\n <?php elseif (in_array($balise, array('div'))) : ?>\n $(link).load( decoded );\n <?php elseif (in_array($balise, array('ajax'))) : ?>\n $.ajax({\n type: \"GET\",\n url: decoded,\n async: true // IMPORTANT !!! \n }).done(function(response) {\n $(link).before(response);\n $(link).remove();\n }).complete(function(){\n });\n <?php else : ?>\n link.href = decoded;\n <?php endif; ?>\n \n var attributes = $(span).prop(\"attributes\");\n $.each(attributes, function() {\n link.setAttribute(this.name, this.value); \n });\n\n link.innerHTML = span.innerHTML;\n \n $(span).replaceWith(link); \n });\n });\n //]]>\n </script>\n \n <?php \n // We retrieve the contents of the buffer.\n $_content = ob_get_contents ();\n // We clean the buffer.\n ob_clean ();\n // We close the buffer.\n ob_end_flush ();\n \n return $_content; \n }", "function linkify($text) {\n $matches = array(\n '/([A-Za-z]+:\\/\\/[A-Za-z0-9-_]+\\.[A-Za-z0-9-_:%&\\?\\/.=]+)/',\n '/(^|[^\\w])(#[\\d\\w\\-]+)/',\n '/(^|[^\\w])(@([\\d\\w\\-]+))/'\n );\n \n $replacements = array(\n '<a href=\"$1\">$1</a>',\n '$1<a href=\"http://search.twitter.com/search?q=$2\">$2</a>',\n '$1@<a href=\"http://twitter.com/$3\">$3</a>'\n );\n \n return preg_replace($matches, $replacements, $text);\n}", "function is_email_address_unsafe($user_email)\n {\n }", "function clean_url($url) {\n\n global $globals;\n\n //Remove the AEF Session Code - Also there in parse_br function\n $url = preg_replace('/(\\?|&amp;|;|&)(as=[\\w]{32})(&amp;|;|&|$)?/is', '$1$3', $url);\n\n return $url;\n}", "function encode_email_address( $email ) {\n\n $output = '';\n\n for ($i = 0; $i < strlen($email); $i++) \n { \n $output .= '&#'.ord($email[$i]).';'; \n }\n\n return $output;\n}", "function cleanStringUrl($cadena){\n\t\t$cadena = strtolower($cadena);\n\t\t$cadena = trim($cadena);\n\t\t$cadena = strtr($cadena,\n\t\t\t\t\t\t\t\t\"ÀÁÂÃÄÅàáâãäåÒÓÔÕÖØòóôõöøÈÉÊËèéêëÇçÌÍÎÏìíîïÙÚÛÜùúûüÿÑñ\",\n\t\t\t\t\t\t\t\t\"aaaaaaaaaaaaooooooooooooeeeeeeeecciiiiiiiiuuuuuuuuynn\");\n\t\t$cadena = strtr($cadena,\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\",\"abcdefghijklmnopqrstuvwxyz\");\n\t\t$cadena = preg_replace('#([^.a-z0-9]+)#i', '-', $cadena);\n\t\t$cadena = preg_replace('#-{2,}#','-',$cadena);\n \t$cadena = preg_replace('#-$#','',$cadena);\n \t\t$cadena = preg_replace('#^-#','',$cadena);\n\t\treturn $cadena;\n\t}", "protected function getObfuscatedEmail($user)\n {\n $email = $user->getEmail();\n if (false !== $pos = strpos($email, '@')) {\n $email = '...' . substr($email, $pos);\n }\n\n return $email;\n }", "public function getMailTo($mailAddress, $linktxt)\n {\n $mailAddress = (string)$mailAddress;\n if ((string)$linktxt === '') {\n $linktxt = htmlspecialchars($mailAddress);\n }\n\n $originalMailToUrl = 'mailto:' . $mailAddress;\n $mailToUrl = $this->processUrl(UrlProcessorInterface::CONTEXT_MAIL, $originalMailToUrl);\n\n // no processing happened, therefore, the default processing kicks in\n if ($mailToUrl === $originalMailToUrl) {\n $tsfe = $this->getTypoScriptFrontendController();\n if ($tsfe->spamProtectEmailAddresses) {\n $mailToUrl = $this->encryptEmail($mailToUrl, $tsfe->spamProtectEmailAddresses);\n if ($tsfe->spamProtectEmailAddresses !== 'ascii') {\n $mailToUrl = 'javascript:linkTo_UnCryptMailto(' . GeneralUtility::quoteJSvalue($mailToUrl) . ');';\n }\n $atLabel = trim($tsfe->config['config']['spamProtectEmailAddresses_atSubst']) ?: '(at)';\n $spamProtectedMailAddress = str_replace('@', $atLabel, htmlspecialchars($mailAddress));\n if ($tsfe->config['config']['spamProtectEmailAddresses_lastDotSubst']) {\n $lastDotLabel = trim($tsfe->config['config']['spamProtectEmailAddresses_lastDotSubst']);\n $lastDotLabel = $lastDotLabel ? $lastDotLabel : '(dot)';\n $spamProtectedMailAddress = preg_replace('/\\\\.([^\\\\.]+)$/', $lastDotLabel . '$1', $spamProtectedMailAddress);\n }\n $linktxt = str_ireplace($mailAddress, $spamProtectedMailAddress, $linktxt);\n }\n }\n\n return [$mailToUrl, $linktxt];\n }", "function linkencode1($str)\n{\n\t// for php < 4.1.0\n\t$str=ereg_replace(\" \",\"%20\",$str);\n\t$str=ereg_replace(\"&\",\"%26\",$str);\n\t$str=ereg_replace(\"\\+\",\"%2b\",$str);\n\t$str=ereg_replace(\"ü\",\"%fc\",$str);\n\t$str=ereg_replace(\"Ü\",\"%dc\",$str);\n\n\treturn $str;\n}", "function tPregLink ($content) \n{\n // FB::trace('tPregLink');\n $content = preg_replace(\n array('#([\\s>])([\\w]+?://[\\w\\#$%&~/.\\-;:=,?@\\[\\]+]*)#is'\n , '#([\\s>])((www|ftp)\\.[\\w\\#$%&~/.\\-;:=,?@\\[\\]+]*)#is'\n , '#([\\s>])([a-z0-9\\-_.]+)@([^,< \\n\\r]+)#i'\n )\n , \n array('$1<a href=\"$2\">$2</a>'\n , '$1<a href=\"http://$2\">$2</a>'\n , '$1<a href=\"mailto:$2@$3\">$2@$3</a>'\n )\n , $content\n );\n # this one is not in an array because we need it to run last, for cleanup of accidental links within links\n $content = preg_replace(\n \"#(<a( [^>]+?>|>))<a [^>]+?>([^>]+?)</a></a>#i\"\n , \"$1$3</a>\"\n , $content\n );\n $content = preg_replace_callback(\n '/<a (.*?)href=\"(.*?)\\/\\/(.*?)\"(.*?)>(.*?)<\\/a>/i'\n , 'tPregLinkCallback'\n , $content\n );\n return trim($content);\n}", "public function social_link_decode ($sURL) {\n\t $specialis_karekterek = array('HRNCT001'=>'&', 'HRNCT002'=>'@', 'HRNCT003'=>';', 'HRNCT004'=>' ', 'HRNCT005'=>'%', 'HRNCT006'=>'?', 'HRNCT007'=>'=','HRNCT008'=>'+', 'HRNCT009'=>'$');\n $data = strtr($sURL, $specialis_karekterek);\n\t return $data;\n }", "function linkGen($syte, $login, $pass)\r\n {\r\n \t$sites = ['mail' => \"https://auth.mail.ru/cgi-bin/auth?Login=$login&Password=$pass&Domain=$domain\"];\r\n \t\r\n \tforeach ($sites as $site => $authLink) {\r\n\t if ($site == 'mail') {\r\n\t \t// crunch!! REMOVE\r\n\t if (strpos($login, '@') !== False) {\r\n\t list($login, $domain) = explode('@', $login);\r\n\t } else {\r\n\t $domain = 'mail.ru';\r\n\t }\r\n\t $authLink = \"https://auth.mail.ru/cgi-bin/auth?Login=$login&Password=$pass&Domain=$domain\";\r\n\t return \"<a style=\\\"cursor: pointer;\\\" onclick=\\\"return openEx('$authLink');\\\">$syte</a>\";\r\n \t}\r\n \t}\r\n\r\n\r\n return NULL;\r\n }", "public function shortcodeProtectedMailto($attrs, $content = '')\n {\n if ($this->optionValues['protect'] && preg_match($this->regexps['emailPlain'], $content) > 0) {\n $content = $this->getProtectedDisplay($content);\n }\n\n // set \"email\" to \"href\"\n if (isset($attrs['email'])) {\n $attrs['href'] = 'mailto:'.$attrs['email'];\n unset($attrs['email']);\n }\n\n $content = $this->protectedMailto($content, $attrs);\n\n return $content;\n }", "function mr_url($string) { \n\t$find = Array(\"Á\",\"Č\",\"Ď\",\"É\",\"Ě\",\"Í\",\"Ň\",\"Ó\",\"Ř\",\"Š\",\"Ť\",\"Ú\",\"Ů\",\"Ý\",\"Ž\", \"á\", \"č\", \"ď\", \"é\", \"ě\", \"í\", \"ľ\", \"ň\", \"ó\", \"ř\", \"š\", \"ť\", \"ú\", \"ů\", \"ý\", \"ž\", \"_\", \" - \", \" \", \".\", \"ü\", \"ä\", \"ö\"); \n\t$replace = Array(\"a\",\"c\",\"d\",\"e\",\"e\",\"i\",\"n\",\"o\",\"r\",\"s\",\"t\",\"u\",\"u\",\"y\",\"z\", \"a\", \"c\", \"d\", \"e\", \"e\", \"i\", \"l\", \"n\", \"o\", \"r\", \"s\", \"t\", \"u\", \"u\", \"y\", \"z\", \"\", \"-\", \"-\", \"-\", \"u\", \"a\", \"o\"); \n\t$string = preg_replace(\"~%[0-9ABCDEF]{2}~\", \"\", urlencode(str_replace($find, $replace, mb_strtolower($string)))); \n\treturn $string; \n}", "function emailLink($linkTitle) {\n $email=\"[email protected]\";\n echo \"<a href=\\\"mailto:$email\\\">$linkTitle</a>\";\n }", "function mgl_instagram_format_link($str)\n{\n // Remove http:// and https:// from url\n $str = preg_replace('#^https?://#', '', $str);\n return $str;\n}", "function cleanLink($input) {\n\t// Prefix URL with http:// if it was missing from the input\n\tif(trim($input[url]) != \"\" && !preg_match(\"#^https?://.*$#\",$input[url])) { $input[url] = \"http://\" . $input[url]; } \t\n\t\t\n\t\t$curly = array(\"{\",\"}\");\n\t\t$curly_replace = array(\"&#123;\",\"&#125;\");\n\t\t\n\t\tforeach($input as $field => $data) {\n\t\t\t$input[$field] = filter_var(trim($data),FILTER_SANITIZE_SPECIAL_CHARS);\n\t\t\t$input[$field] = str_replace($curly,$curly_replace,$input[$field]); // Replace curly brackets (needed for placeholders to work)\n\t\t\t\t\n\t\tif($field == \"url\") {\n\t\t\t$input[url] = str_replace(\"&#38;\",\"&\",$input[url]); // Put &s back into URL\n\t\t\n\t\t}\n\t}\t\n\treturn($input);\n}", "public function testEmail() {\n $this->assertEquals('[email protected]', Sanitize::email('em<a>[email protected]'));\n $this->assertEquals('[email protected]', Sanitize::email('email+t(a)[email protected]'));\n $this->assertEquals('[email protected]', Sanitize::email('em\"ail+t(a)[email protected]'));\n }", "public static function get_email_link_html( $email ) {\n\t\treturn sprintf( '<a href=\"mailto:%s\" target=\"_blank\">%s</a>', esc_url( $email ), $email );\n\t}", "public static function obfuscateLinkEncrypt($url, $_base16 = \"0A12B34C56D78E9F\")\n {\n \t$output = \"\";\n \tfor ($i = 0; $i < strlen($url); $i++) {\n \t\t$cc = ord($url[$i]);\n \t\t$ch = $cc >> 4;\n \t\t$cl = $cc - ($ch * 16);\n \t\t$output .= $_base16[$ch] . $_base16[$cl];\n \t}\n \treturn $output;\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 filterEmail($email, $chars = ''){\r\n $email = trim(str_replace( array(\"\\r\",\"\\n\"), '', $email ));\r\n if( is_array($chars) ) $email = str_replace( $chars, '', $email );\r\n $email = preg_replace( '/(cc\\s*\\:|bcc\\s*\\:)/i', '', $email );\r\n return $email;\r\n}", "public function linkUrlMail($code, $testString)\n {\n // Check for URL:\n $scheme = parse_url($testString, PHP_URL_SCHEME);\n if ($scheme === 'http' || $scheme === 'https' || $scheme === 'ftp') {\n return '<a href=\"' . htmlspecialchars($testString) . '\" target=\"_blank\">' . $code . '</a>';\n }\n // Check for email:\n if (GeneralUtility::validEmail($testString)) {\n return '<a href=\"mailto:' . htmlspecialchars($testString) . '\" target=\"_blank\">' . $code . '</a>';\n }\n // Return if nothing else...\n return $code;\n }", "public function getUrl()\n\t{\n\t\treturn App\\Purifier::decodeHtml($this->get('linkto'));\n\t}", "protected function renderEmails($content)\r\n\t{\r\n\t\t$matches = array();\r\n\t\tpreg_match_all($this->_patterns['email'], $content, $matches);\r\n\r\n\t\t$pairs = array();\r\n\t\tforeach ($matches[1] as $index => $id)\r\n\t\t{\r\n\t\t\t$email = str_rot13($matches[1][$index]);\r\n\t\t\t$pairs[$matches[0][$index]] = CHtml::mailto($email, $email, array('class'=>'email', 'rel'=>'nofollow'));\r\n\t\t}\r\n\r\n\t\tif (!empty($pairs))\r\n\t\t{\r\n\t\t\t$content = strtr($content, $pairs);\r\n\r\n\t\t\t/** @var CClientScript $cs */\r\n\t\t\t$cs = Yii::app()->getClientScript();\r\n\r\n\t\t\t$assetsUrl = Yii::app()->cms->getAssetsUrl();\r\n\t\t\t$cs->registerScriptFile($assetsUrl.'/js/cms-rot13.js');\r\n\t\t\t$cs->registerScript(__CLASS__.'#'.uniqid(true, true).'_emailObfuscation', \"\r\n\t\t\t\t(function($) {\r\n\t\t\t\t\t$('.email').each(function() {\r\n\t\t\t\t\t\tvar element = $(this);\r\n\r\n\t\t\t\t\t\tif (!element.attr('data-decoded')) {\r\n\t\t\t\t\t\t\tvar\thref = $(this).attr('href'),\r\n\t\t\t\t\t\t\t\taddress = Cms.Rot13.decode(href.substring(href.indexOf(':') + 1)),\r\n\t\t\t\t\t\t\t\tvalue = Cms.Rot13.decode($(this).text());\r\n\r\n\t\t\t\t\t\t\telement.attr('href', 'mailto:' + address);\r\n\t\t\t\t\t\t\telement.text(value);\r\n\t\t\t\t\t\t\telement.attr('data-decoded', 1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t})(jQuery);\r\n\t\t\t\");\r\n\t\t}\r\n\r\n\t\treturn $content;\r\n\t}", "function get_avatar_url($email, $size = 25)\r\n{\r\n return \"http://fr.gravatar.com/avatar/\".md5(strtolower(e(trim($email)))).\"?s=\".$size;//trim used to delete spaces\r\n}", "public static function maskEmail($email){\n $em = explode(\"@\",$email);\n $name = $em[0];\n $len = floor(strlen($name)/2);\n\n $len_=strlen($name)%2 +$len;\n\n return substr($name,0, $len) . str_repeat('*', $len_) . \"@\" . end($em); \n }", "abstract public function get_mailto();", "function commenter_link()\r\n{\r\n $commenter = get_comment_author_link();\r\n if (ereg('<a[^>]* class=[^>]+>', $commenter)) {\r\n $commenter = ereg_replace('(<a[^>]* class=[\\'\"]?)', '\\\\1url ', $commenter);\r\n } else {\r\n $commenter = ereg_replace('(<a )/', '\\\\1class=\"url \"', $commenter);\r\n }\r\n $avatar_email = get_comment_author_email();\r\n // $avatar = str_replace( \"class='avatar\", \"class='photo avatar img-responsive img-circle\", get_avatar( $avatar_email, 80 ) );\r\n // echo $avatar . ' <span class=\"fn n\">' . $commenter . '</span>';\r\n}", "protected function linkcreator() {\n $chars = str_split(\"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_-\", 1);shuffle($chars);\n return join(\"\", array_slice($chars, 0, 33));\n }", "function cleanAliasUrl($string)\n{\n $tr = array('ş', 'Ş', 'ı', 'İ', 'ğ', 'Ğ', 'ü', 'Ü', 'ö', 'Ö', 'ç', 'Ç'); \n $en = array('s', 's', 'i', 'i', 'g', 'g', 'u', 'u', 'o', 'o', 'c', 'c'); \n $string = str_replace ($tr, $en, $string); \n $string = preg_replace (\"`\\[.*\\]`U\", \"\", $string); \n $string = preg_replace ('`&(amp;)?#?[a-z0-9]+;`i', '-', $string); \n $string = htmlentities ($string, ENT_COMPAT, 'utf-8'); \n $string = preg_replace (\"`&([a-z])(acute|uml|circ|grave|ring|cedil|slash|tilde|caron|lig|quot|rsquo);`i\", \"\\\\1\", $string); \n $string = preg_replace (array(\"`[^a-z0-9]`i\", \"`[-]+`\"), \"-\", $string); \n\n return strtolower (trim ($string, '-')); \n}", "function tnsl_fCleanLinks(&$getNextGen) {\r\n\t$getNextGen = preg_replace('(&(?!([a-zA-Z]{2,6}|[0-9\\#]{1,6})[\\;]))', '&amp;', $getNextGen);\r\n\t$getNextGen = str_replace(array(\r\n\t\t'&amp;&amp;',\r\n\t\t'&amp;middot;',\r\n\t\t'&amp;nbsp;',\r\n\t\t'&amp;#'\r\n\t), array(\r\n\t\t'&&',\r\n\t\t'&middot;',\r\n\t\t'&nbsp;',\r\n\t\t'&#'\r\n\t), $getNextGen);\r\n\t// montego - following code is required to allow the new RNYA AJAX validations to work properly\r\n\t$getNextGen = preg_replace('/rnxhr.php\\?name=Your_Account&amp;file/', 'rnxhr.php\\?name=Your_Account&file', $getNextGen );\r\n\treturn;\r\n}", "function generate_follow_link() {\n\t\treturn str_replace( 'swfw_username', $this->username, $this->url);\n\t}", "function changeUrlUnparsedContentCode(&$tag, &$data)\n{\n global $txt, $modSettings, $context;\n loadLanguage('Redirector/Redirector');\n\n $data = strtr($data, ['<br />' => '']);\n $link_text = $data;\n\n // Skip local urls with #\n if (strpos($data, '#') === 0) {\n return;\n } else {\n if (strpos($data, 'http://') !== 0 && strpos($data, 'https://') !== 0) {\n $data = 'http://' . $data;\n }\n }\n\n // Hide links from guests\n if (!empty($modSettings['redirector_hide_guest_links']) && !empty($context['user']['is_guest']) && !checkWhiteList(\n $data\n )) {\n $link_text = !empty($modSettings['redirector_hide_guest_custom_message']) ? $modSettings['redirector_hide_guest_custom_message'] : $txt['redirector_hide_guest_message'];\n }\n\n $data = getRedirectorUrl($data);\n\n $tag['content'] = '<a href=\"' . $data . '\" class=\"bbc_link\" ' . ((!empty($modSettings['redirector_nofollow_links']) && $modSettings['redirector_mode'] == 'immediate' && !checkWhiteList(\n $data\n )) ? 'rel=\"nofollow noopener noreferrer\" ' : '') . ($tag['tag'] == 'url' ? 'target=\"_blank\"' : '') . ' >' . $link_text . '</a>';\n}", "function faculty_get_email( $metaArray, $white = false ) {\n if ( $white ) {\n return '<a class=\"font-weight-bold text-white\" href=\"mailto:'.$metaArray['email'][0].'\">'.$metaArray['email'][0].'</a>';\n }\n\n return '<a href=\"mailto:'.$metaArray['email'][0].'\">'.$metaArray['email'][0].'</a>';\n}", "function plainMailEncoded($email,$subject,$message,$headers='',$enc='8bit',$charset='ISO-8859-1',$urlmode=null)\t{\n\n\t\tif ($urlmode)\t{\n\t\t\t$message=t3lib_div::substUrlsInPlainText($message,$urlmode);\n\t\t}\n\n\t\tt3lib_div::plainMailEncoded(\n\t\t\t$email,\n\t\t\t$subject,\n\t\t\t$message,\n\t\t\t$headers,\n\t\t\t$enc,\n\t\t\t$charset\n\t\t);\n\t}", "private function verificationUrlStringBuilder($email, $verificationCode)\n {\n $url = config('vms.emailVerificationUrl');\n $url .= '?email=' . rawurlencode($email);\n $url .= '&verification_token=' . rawurlencode($this->verificationCode);\n\n return $url;\n }", "function link($url) {\n\tif (str_starts_with($url, 'tel') || str_starts_with($url, 'mail') || str_starts_with($url, 'sms')) {\n\t} elseif (!preg_match(\"~^(?:f|ht)tps?://~i\", $url)) {\n\t\t$url = \"https://\" . $url;\n\t}\n\treturn $url;\n}", "function MaskUserEMail($email){\n\n\t\t$maskedEMail = '';\n\t\t$positionOfAt = strpos($email, '@');\n\t\t$maskedEMail .= substr($email, 0,1);\n\t\tfor($i=1; $i < strlen($email); $i++) {\n\t\t\tif($i < $positionOfAt-1 || $i > $positionOfAt + 1)\n\t\t\t\t$maskedEMail .= '*';\n\t\t\telse\n\t\t\t\t$maskedEMail .= substr($email, $i,1);\n\t\t}\n\t\t$maskedEMail .= substr($email, $i-1,1);\n\t\treturn $maskedEMail;\n\t}", "public function link(string $url, string $email, string $type);", "function string_insert_hrefs( $p_string ) \r\n{\r\n\tif ( !config_get('html_make_links') ) {\r\n\t\treturn $p_string;\r\n\t}\r\n\r\n\t$t_change_quotes = false;\r\n\tif( ini_get_bool( 'magic_quotes_sybase' ) ) {\r\n\t\t$t_change_quotes = true;\r\n\t\tini_set( 'magic_quotes_sybase', false );\r\n\t}\r\n\r\n\t// Find any URL in a string and replace it by a clickable link\r\n\t$p_string = preg_replace( '/(([[:alpha:]][-+.[:alnum:]]*):\\/\\/(%[[:digit:]A-Fa-f]{2}|[-_.!~*\\';\\/?%^\\\\\\\\:@&={\\|}+$#\\(\\),\\[\\][:alnum:]])+)/se',\r\n \"'<a href=\\\"'.rtrim('\\\\1','.').'\\\">\\\\1</a> [<a href=\\\"'.rtrim('\\\\1','.').'\\\" target=\\\"_blank\\\">^</a>]'\", $p_string);\r\n \r\n\tif( $t_change_quotes ) {\r\n\t\tini_set( 'magic_quotes_sybase', true );\r\n\t}\r\n\r\n\t# Set up a simple subset of RFC 822 email address parsing\r\n\t# We don't allow domain literals or quoted strings\r\n\t# We also don't allow the & character in domains even though the RFC\r\n\t# appears to do so. This was to prevent &gt; etc from being included.\r\n\t# Note: we could use email_get_rfc822_regex() but it doesn't work well\r\n\t# when applied to data that has already had entities inserted.\r\n\t#\r\n\t# bpfennig: '@' doesn't accepted anymore\r\n\t# achumakov: characters 0x80-0xFF aren't acceptable, too\r\n\t$t_atom = '[^\\'@\\'](?:[^()<>@,;:\\\\\\\".\\[\\]\\000-\\037\\177-\\377 &]+)';\r\n\r\n\t# In order to avoid selecting URLs containing @ characters as email\r\n\t# addresses we limit our selection to addresses that are preceded by:\r\n\t# * the beginning of the string\r\n\t# * a &lt; entity (allowing '<[email protected]>')\r\n\t# * whitespace\r\n\t# * a : (allowing 'send email to:[email protected]')\r\n\t# * a \\n, \\r, or > (because newlines have been replaced with <br />\r\n\t# and > isn't valid in URLs anyway\r\n\t#\r\n\t# At the end of the string we allow the opposite:\r\n\t# * the end of the string\r\n\t# * a &gt; entity\r\n\t# * whitespace\r\n\t# * a , character (allowing 'email [email protected], or ...')\r\n\t# * a \\n, \\r, or <\r\n\r\n\t$p_string = preg_replace( '/(?<=^|&quot;|&lt;|[\\s\\:\\>\\n\\r])('.$t_atom.'(?:\\.'.$t_atom.')*\\@'.$t_atom.'(?:\\.'.$t_atom.')*)(?=$|&quot;|&gt;|[\\s\\,\\<\\n\\r])/s',\r\n\t\t\t\t\t\t\t'<a href=\"mailto:\\1\">\\1</a>', $p_string);\r\n\r\n\treturn $p_string;\r\n}", "function clean_string($string) {\n $bad = array(\"content-type\",\"bcc:\",\"to:\",\"cc:\",\"href\");\n return str_replace($bad,\"\",$string);\n }", "function yz_edit_author_link_url( $link, $author_id ) {\n return bp_core_get_user_domain( $author_id );\n}", "public function maskMail($email, $reverse = false)\n\t{\n\t\tif ($reverse)\n\t\t{\n\t\t\t// reverse the e-mail address\n\t\t\t$email = strrev($email);\n\t\t}\n\n\t\t// converts the e-mail address from bin to hex\n\t\t$email = bin2hex($email);\n\t\t// append ;&#x sequence after every chunk of the masked e-mail\n\t\t$email = chunk_split($email, 2, \";&#x\");\n\t\t// prepend &#x sequence before the address and trim the ending sequence\n\t\t$email = \"&#x\" . substr($email, 0, -3);\n\n\t\treturn $email;\n\t}", "function virustotalscan_scan_url($message)\r\n{\r\n\tglobal $mybb;\r\n // in momentul in care se apeleaza aceasta functie toate testele au fost facute\r\n // altfel se incepe scanarea prin construirea cheii\r\n $key = $mybb->settings['virustotalscan_setting_key'];\r\n // se parseaza eventuale legaturi\r\n $message = preg_replace('#<a href=\"(.*?)\"(.*?)>(.*?)</a>#s', virustotalscan_check_url('\\1', '\\3', '\\2', $key), $message);\r\n // dupa prelucrari se iese din functie\r\n return;\r\n}", "function sEmail( $email )\r\n\t\t{\r\n\t\t return filter_var( $email, FILTER_SANITIZE_EMAIL );\r\n\t\t \r\n\t\t}", "function yz_esc_url( $url ) {\n $url = esc_url( $url );\n $disallowed = array( 'http://', 'https://' );\n foreach( $disallowed as $protocole ) {\n if ( strpos( $url, $protocole ) === 0 ) {\n return str_replace( $protocole, '', $url );\n }\n }\n return $url;\n}" ]
[ "0.7854981", "0.74659467", "0.7437037", "0.69336855", "0.684619", "0.6666597", "0.6636516", "0.6564037", "0.6503394", "0.64611846", "0.63658756", "0.634576", "0.6335928", "0.63144755", "0.6280349", "0.6246685", "0.6207493", "0.61526746", "0.6149468", "0.611965", "0.6087068", "0.6086988", "0.5986807", "0.5959574", "0.5926955", "0.5922132", "0.59172475", "0.58982116", "0.58958405", "0.5857687", "0.5844674", "0.58231646", "0.5813498", "0.58088166", "0.57937634", "0.57687455", "0.5768259", "0.57574993", "0.57530004", "0.5749908", "0.5746076", "0.5742282", "0.5738613", "0.5735884", "0.5732834", "0.5705363", "0.57041466", "0.56993437", "0.56529844", "0.5647517", "0.5628152", "0.5616987", "0.5611589", "0.55948734", "0.5592995", "0.5591799", "0.5579526", "0.5577095", "0.55746216", "0.5570931", "0.55705297", "0.55564755", "0.55559397", "0.5549346", "0.554823", "0.55435747", "0.5540223", "0.5522701", "0.55198914", "0.55187124", "0.5506833", "0.5506471", "0.55032796", "0.55032796", "0.5496431", "0.54915696", "0.54909843", "0.5489293", "0.5477717", "0.5472826", "0.5468818", "0.5463762", "0.54597986", "0.54558456", "0.5455451", "0.54429275", "0.54426783", "0.5441532", "0.54343456", "0.5430389", "0.5423391", "0.5423094", "0.542057", "0.54173416", "0.5417137", "0.5409481", "0.5406674", "0.54060525", "0.5403162", "0.54021513" ]
0.62260145
16
Handle link shortcodes, which can be to either pages or static routes
public static function onShortCode_link(ShortcodeInterface $s): ?string { if (!$s->getBbCode()) { // nothing is specified, just use context URL route and optional index $url = Context::url(); $route = Context::url()->route(); $action = $s->getParameter('action', 'index'); } else { // otherwise we have to take a closer look at what was specified // check if bbcode value looks like it has a filename at the end $query = trim($s->getBbCode(), '/'); if (preg_match('@\.[a-z0-9]+$@', $query)) { // route is bbcode value with filename stripped $route = preg_replace('@[^\\]\.([a-z0-9]+$@', '', $query); $action = substr($query, strlen($route) + 1); // still allow action parameter to override URL $action = $s->getParameter('action', $action); $url = new URL("/$route/$action"); } else { // route looks like a clean route with no filename $route = $query; $action = $s->getParameter('action', 'index'); $url = new URL("/$route/"); } } // keep running list of everything this could refer to /** array<int,array{url:URL,title:string}> */ $options = []; // check if there's a static route if (Router::staticRouteExists($route, $action)) { $static_url = new URL("/~$route/"); $static_url->setAction($action); $options[] = [ 'url' => $static_url, 'title' => $static_url->name(), ]; } // search for pages this URL might refer to foreach (Pages::getAll($route) as $page) { $page_url = $page->url($action); $options[] = [ 'url' => $page_url, 'title' => $page_url->name(), ]; } // prepare link title if (count($options) == 0) { $title = 'unknown link'; } elseif (count($options) == 1) { $title = $options[0]['title']; $url = $options[0]['url']; } else { $title = sprintf( 'ambiguous link: %s', implode( ', ', array_map( fn($e) => '"' . $e['title'] . '"', $options ) ) ); } // build link $link = (new A) ->setAttribute('href', $url) ->setAttribute('title', $title) ->addClassString($s->getParameter('class', '')) ->addChild(new Text($s->getContent() ? $s->getContent() : $title)); if (count($options) > 1) $link->addClass('link--multiple-options'); return $link; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function shorten($link, $customUrl = false);", "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 rebrandly_url_shortcode( $atts ) {\n // global $post;\n\n $atts = shortcode_atts(\n array(\n 'id' => get_the_ID(),\n ),\n $atts,\n 'rebrandly_url'\n );\n\n // $_scheme = ( is_ssl() ) ? 'https://' : 'http://'; // Rebrandly domains don't work with HTTPS\n $_scheme = 'http://';\n $_short_url = get_post_meta( $atts['id'], '_rebrandly_link_url', true );\n\n if ( $_short_url != '' ) {\n return $_scheme . $_short_url;\n } else {\n return get_permalink( $atts['id'] );\n }\n}", "function shortcodeHandler($atts, $content = null) {\r\n\t\textract( shortcode_atts( array(\r\n\t\t\t 'vid' => '0'\r\n\t\t\t,'vtitle' => ''\r\n\t\t\t,'vinline' => 'false'\r\n\t\t\t), $atts ) );\r\n\t\t$vinline = (strtolower($vinline) == 'true');\r\n\t\treturn $this->_getLinkTag($vid, $vtitle, $vinline);\r\n\t}", "function permalink_link()\n {\n }", "function my_theme_cpt_shortlinks( $shortlink, $id, $context, $allow_slugs=true ) {\n\t\t/**\n\t\t * If query is the context, we probably shouldn't do anything\n\t\t */\n\t\tif( 'query' == $context )\n\t\t\treturn $shortlink;\n\n\t\t$post = get_post( $id );\n\t\t$post_id = $post->ID;\n\n\t\t/**\n\t\t * If this is a standard post, return the shortlink that was already built\n\t\t */\n\t\tif( 'post' == $post->post_type )\n\t\t\treturn $shortlink;\n\n\t\t/**\n\t\t * Retrieve the array of publicly_queryable, non-built-in post types\n\t\t */\n\t\t$post_types = get_post_types( array( '_builtin' => false, 'publicly_queryable' => true ) );\n\t\tif( in_array( $post->post_type, $post_types ) || 'page' == $post->post_type )\n\t\t\t$shortlink = home_url('?p=' . $post->ID);\n\n\t\treturn $shortlink;\n\t}", "public function test_can_fetch_link_from_shortlink()\n {\n $this->get(route('shortlink.fetch.link', ['code' => 'AbcXyz']))->assertStatus(200);\n }", "private function verificaShortUrl() {\n FormataLink::verificaMiniUrl(\"fwk_link_encurtado\");\n }", "public static function permalinkHandler($segments) {\n\n\t\t$viewtype = array_shift($segments);\n\t\t$referrer_hash = array_shift($segments);\n\t\tif (!preg_match('/^[a-f0-9]{32}$/i', $referrer_hash)) {\n\t\t\t// The hash was moved into URL query parameters\n\t\t\t$guid = $referrer_hash;\n\t\t\t$referrer_hash = get_input('uh');\n\t\t} else {\n\t\t\t$guid = array_shift($segments);\n\t\t\tset_input('uh', $referrer_hash);\n\t\t}\n\n\t\tswitch ($viewtype) {\n\t\t\tcase 'image' :\n\t\t\t\t// BC router\n\t\t\t\t$size = array_shift($segments);\n\t\t\t\t$ia = elgg_set_ignore_access(true);\n\t\t\t\t$entity = get_entity($guid);\n\t\t\t\t$url = $entity->getIconURL($size);\n\t\t\t\telgg_set_ignore_access($ia);\n\t\t\t\tforward($url);\n\t\t\t\treturn;\n\n\t\t\tdefault :\n\n\t\t\t\tswitch ($viewtype) {\n\t\t\t\t\tcase 'json+oembed' :\n\t\t\t\t\tcase 'json oembed' :\n\t\t\t\t\t\t$viewtype = 'json';\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'xml+oembed' :\n\t\t\t\t\tcase 'xml oembed' :\n\t\t\t\t\t\t$viewtype = 'xml';\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif (!elgg_is_registered_viewtype($viewtype)) {\n\t\t\t\t\t$viewtype = 'default';\n\t\t\t\t}\n\n\t\t\t\telgg_set_viewtype($viewtype);\n\n\t\t\t\tif (!$guid || !elgg_entity_exists($guid)) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\t$ia = elgg_set_ignore_access();\n\t\t\t\t$entity = get_entity($guid);\n\n\t\t\t\tif (!has_access_to_entity($entity) && !is_discoverable($entity)) {\n\t\t\t\t\telgg_set_ignore_access($ia);\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\telgg_register_plugin_hook_handler('head', 'page', function($hook, $type, $return) use ($entity) {\n\t\t\t\t\tif (isset($return['links']['canonical'])) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (elgg_is_active_plugin('hypeSeo')) {\n\t\t\t\t\t\t$svc = \\hypeJunction\\Seo\\RewriteService::getInstance();\n\t\t\t\t\t\t$data = $svc->getRewriteRulesFromGUID($entity->getURL());\n\t\t\t\t\t\tif (isset($data['sef_path'])) {\n\t\t\t\t\t\t\t$return['links']['canonical'] = [\n\t\t\t\t\t\t\t\t'href' => elgg_normalize_url($data['sef_path']),\n\t\t\t\t\t\t\t\t'rel' => 'canonical',\n\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\treturn $return;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t$return['links']['canonical'] = [\n\t\t\t\t\t\t'href' => $entity->getURL(),\n\t\t\t\t\t\t'rel' => 'canonical',\n\t\t\t\t\t];\n\n\t\t\t\t\treturn $return;\n\t\t\t\t});\n\n\t\t\t\t$forward_url = false;\n\n\t\t\t\t$is_walled = elgg_get_config('walled_garden') && !elgg_is_logged_in();\n\t\t\t\tif (has_access_to_entity($entity) && $viewtype == 'default' && !$is_walled) {\n\t\t\t\t\t$forward_url = $entity->getURL();\n\t\t\t\t}\n\n\t\t\t\t$forward_url = elgg_trigger_plugin_hook('entity:referred', $entity->getType(), array(\n\t\t\t\t\t'entity' => $entity,\n\t\t\t\t\t'user_hash' => $referrer_hash,\n\t\t\t\t\t'referrer' => $_SERVER['HTTP_REFERER'],\n\t\t\t\t\t\t), $forward_url);\n\n\t\t\t\tif ($forward_url) {\n\t\t\t\t\telgg_set_ignore_access($ia);\n\t\t\t\t\tforward($forward_url);\n\t\t\t\t}\n\n\t\t\t\tif (elgg_get_plugin_setting('nocrawl', 'hypeDiscovery')) {\n\t\t\t\t\telgg_set_http_header('X-Robots-Tag: noindex', true);\n\n\t\t\t\t\telgg_register_plugin_hook_handler('head', 'page', function($hook, $type, $return) {\n\t\t\t\t\t\t$return['metas'][] = [\n\t\t\t\t\t\t\t'name' => 'robots',\n\t\t\t\t\t\t\t'content' => 'noindex',\n\t\t\t\t\t\t];\n\n\t\t\t\t\t\treturn $return;\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\techo elgg_view_resource('permalink', [\n\t\t\t\t\t'viewtype' => $viewtype,\n\t\t\t\t\t'user_hash' => $referrer_hash,\n\t\t\t\t\t'guid' => $guid,\n\t\t\t\t\t'entity' => $entity,\n\t\t\t\t]);\n\n\t\t\t\telgg_set_ignore_access($ia);\n\t\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public static function handle_shortcode($arguments, $url, $parser, $shortcode) {\n\t\tif(isset($arguments['type'])) {\n\t\t\t$type = $arguments['type'];\n\t\t\tunset($arguments['type']);\n\t\t} else {\n\t\t\t$type = false;\n\t\t}\n\t\t$oembed = self::get_oembed_from_url($url, $type, $arguments);\n\t\tif($oembed && $oembed->exists()) {\n\t\t\treturn $oembed->forTemplate();\n\t\t} else {\n\t\t\treturn '<a href=\"' . $url . '\">' . $url . '</a>';\n\t\t}\n\t}", "function ms_slideshare_shortcode_handler( $atts ) {\n extract(shortcode_atts( array(\n 'url' => 'http://www.slideshare.net/',\n ), $atts));\n $pluginurl = plugin_dir_url(__FILE__);\n\n return '<a href=\"'.$url.'\"><img style=\"height: 1em; padding: 0; margin: 0;\" src=\"'.$pluginurl.'/slideshare-32x32.png\" alt=\"link to slideshare\" /></a>';\n}", "function _wp_link_page($i)\n {\n }", "public static function linkShortcode($atts = [], $content = '', $tag = ''){\n // normalize attribute keys, lowercase\n $atts = array_change_key_case((array)$atts, CASE_LOWER);\n // override default attributes with user attributes\n $parsed_atts = shortcode_atts([\n 'id' => null,\n 'caption' => 'official_name_1'\n ], $atts, $tag);\n\n // get the ID from shortcode atts\n $id = $parsed_atts['id'];\n if (!$id) return '<a href=\"#\">[incorrect ID]</a>';\n\n // find card in database\n $card = get_post($id);\n // make sure POST is a 'travelcard'\n if (!$card || $card->post_type !== 'travelcard') return '<a href=\"#\">[not found]</a>';\n // retrieve meta for card\n $meta = get_post_meta($card->ID);\n\n // set caption\n $caption = $parsed_atts['caption'];\n if (preg_match('/^official\\_name\\_[0-5]$/', $caption)) {\n $caption = $caption ? $meta[$caption] : null;\n $caption = $caption ? $caption[0] : $card->post_title;\n }\n\n // set url\n $url = $meta['deep_link_2'];\n $url = $url ? $url[0] : '#';\n \n // build HTML\n $url = self::createRedirectUrl($url, $id);\n return '<a href=\"' . $url . '\" class=\"ege-cards-link\">' . $caption . '</a>';\n }", "function the_shortlink($text = '', $title = '', $before = '', $after = '')\n {\n }", "function page_path_to_page_link($page)\n{\n require_code('urls2');\n return _page_path_to_page_link($page);\n}", "function post_link($post){\n if(strcasecmp($post->post_type, 'primary_page') == 0){\n return e($post->post_slug);\n }else{\n return strtolower($post->category_name). '/' . e($post->post_slug);\n }\n}", "public function shortenLink($code)\n {\n $find = ShortLink::where('code', $code)->first();\n\n $input['click_count'] = $find->click_count + 1;\n\n $find->update($input);\n\n return Redirect::to($find->link);\n }", "function mr_megaresult_shortcode_handler( $attrs, $content=null) {\n return \"look, a shortcode!\";\n}", "public function using_mod_rewrite_permalinks()\n {\n }", "function btn_shortcode( $atts, $content = null ) {\n $a = shortcode_atts( array(\n 'href' => '#'\n ), $atts );\n \n return '<a class=\"button\" href=\"' . esc_attr($a['href']) . '\">' . $content . '</a>';\n}", "function permalink_anchor($mode = 'id')\n {\n }", "public function shortenUrlWithNonCustomKeyword()\n {\n $longUrl = 'https://laravel.com';\n\n $this->post(route('createshortlink'), ['long_url' => $longUrl]);\n $url = Url::whereLongUrl($longUrl)->first();\n\n $this->assertFalse($url->is_custom);\n }", "function wpme_rest_register_shortlinks() {\n\tregister_rest_field(\n\t\tarray(\n\t\t\t'attachment',\n\t\t\t'page',\n\t\t\t'post',\n\t\t),\n\t\t'jetpack_shortlink',\n\t\tarray(\n\t\t\t'get_callback' => 'wpme_rest_get_shortlink',\n\t\t\t'update_callback' => null,\n\t\t\t'schema' => null,\n\t\t)\n\t);\n}", "function page_link_sc($atts) {\n $output = '';\n \n $atts = shortcode_atts(array(\n 'ids' => '',\n ), $atts );\n \n $ids = array_map('interval', explode(',', $atts['ids']));\n \n if($ids) {\n $output .= '<div class=\"page-link\">';\n \n foreach($ids as $id) {\n $tyle = has_post_thumbnail($id) ? 'style=\"background-image: url(' .wp_get_attachment_image_url(get_post_thumbnail($id), '_page_link'). ');\"' : '';\n \n $output .= '<a href=\"' . get_permalink( $id ) . '\"' . $style . '><span class=\"page-link-title\">' . get_the_title( $id ) . '</span></a>';\n }\n $output .= '</div>';\n }\n \n return $output;\n}", "function KwWowHead($atts, $content = null) {\r\n extract(shortcode_atts(array( \"name\" => '', \"url\" => '', \"class\" => ''), $atts));\r\n\t\treturn '<a class=\"'.$class.'\" href=\"'.$url.'\">'.$name.'</a>';\r\n}", "function do_permalink($atts) {\n\textract(shortcode_atts(array(\n\t\t'id' => 1,\n\t\t'text' => \"\" // default value if none supplied\n\t), $atts));\n\n\tif ($text) {\n\t\t$url = get_permalink($id);\n\t\treturn \"<a href='$url'>$text</a>\";\n\t} else {\n\t\treturn get_permalink($id);\n\t}\n}", "function c4_social_connect($atts,$content=null){\r\n ob_start();\r\n $attr=extract(shortcode_atts(array(\r\n 'href'=>'#',\r\n 'sname'=>'facebook',\r\n 'target'=>'_blank',\r\n 'class'=>''\r\n\r\n\r\n ),$atts));\r\n\r\n return '<a class=\"'.$class.'\" href=\" '.$href.'\"target=\"'.$target.'\">'.$sname.'</a>';\r\n ?>\r\n<?php\r\nreturn ob_get_clean();\r\n}", "function shq_genestrap_genestrap_link_shortcode( $atts ) {\n\n\t$defaults = [\n\t\t'after' => '',\n\t\t'before' => '',\n\t\t'url' => 'https://serendipityhq.com',\n\t];\n\t$atts = shortcode_atts( $defaults, $atts, 'shq_genestrap_link' );\n\n\t$output = $atts['before'] . '<a href=\"' . esc_url( $atts['url'] ) . '\">Genestrap</a>' . $atts['after'];\n\n\treturn apply_filters( 'genesis_footer_genesis_link_shortcode', $output, $atts );\n\n}", "function replace_links($content) {\r\n\tpreg_match_all(\"/<a\\s*[^>]*>(.*)<\\/a>/siU\", $content, $matches);\r\n\t//preg_match_all(\"/<a\\s[^>]*>(.*?)(</a>)/siU\", $content, $matches);\t\r\n\t$foundLinks = $matches[0];\r\n\t$wpbar_options = get_option(\"wpbar_options\");\r\n\t\r\n\tforeach ($foundLinks as $theLink) {\r\n\t\t$uri = getAttribute('href',$theLink);\r\n\t\tif($wpbar_options[\"validateURL\"]) {\r\n\t\t\tif(!isWhiteListed(get_domain($uri)) && !isSociable($theLink) && isValidURL($uri)) {\r\n\t\t\t\t$uid = isInDB($uri);\r\n\t\t\t\t$nofollow = is_nofollow($uid) ? \"rel='nofollow'\" : \"\";\r\n\t\t\t\t$content=str_replace(\"href=\\\"\".$uri.\"\\\"\",\"title='Original Link: \".$uri.\"' \".$nofollow.\" href=\\\"\".get_option('home').\"/?\".$uid.\"\\\"\",$content);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif(!isWhiteListed(get_domain($uri)) && !isSociable($theLink)) {\r\n\t\t\t\t$uid = isInDB($uri);\r\n\t\t\t\t$nofollow = is_nofollow($uid) ? \"rel='nofollow'\" : \"\";\r\n\t\t\t\t$content=str_replace(\"href=\\\"\".$uri.\"\\\"\",\"title='Original Link: \".$uri.\"' \".$nofollow.\" href=\\\"\".get_option('home').\"/?\".$uid.\"\\\"\",$content);\r\n\t\t\t}\r\n\t\t}\r\n\t}\t\r\n\treturn $content;\r\n}", "public function diviroids_permalink($atts)\n {\n extract(shortcode_atts(array( 'slug' => null, 'title' => null, 'target' => null, 'class' => null ), $atts));\n\n $page = get_page_by_path($slug);\n\n $output = sprintf(\n '<a href=\"%1$s\" title=\"%2$s\"%3$s%4$s>%2$s</a>',\n get_permalink($page->ID),\n empty($title) ? get_the_title($page) : $title,\n !empty($target) ? ' target=\"'. $target .'\"' : '',\n !empty($class) ? ' class=\"'. $class .'\"' : ''\n );\n\n return $output;\n }", "public static function onShortCode_url(ShortcodeInterface $s): ?string\n {\n $url = $s->getBbCode();\n if (filter_var($url, FILTER_VALIDATE_URL)) {\n // set up URL\n $link = (new A)\n ->setAttribute('href', $url)\n ->addClassString($s->getParameter('class', ''))\n ->addChild($s->getContent() ? $s->getContent() : preg_replace('/^(https?:)?\\/\\//', '', $url));\n // return built link\n return $link;\n }\n return null;\n }", "static function link_rewriter_menupage(){\n\t \tinclude self::get_script_location('link_rewriter_menupage.php');\n\t }", "public function handle($request, Closure $next)\n {\n// $uri = $_SERVER['REQUEST_URI'];\n// $linkAddress = ShortLink::where('abbr',$uri)->first();\n// if(is_null($linkAddress)){\n// return $next($request);\n// }else{\n// return redirect('pay.joyvpn.xyz/'.$linkAddress->origin);\n// }\n\n return $next($request);\n\n }", "function sc_featured_link( $attr, $content='' ) {\n\treturn '<div class=\"featured-link\">' . do_shortcode( $content ) . '</div>'; // use divs to work around WP autoformatting\n}", "function ShortUrl($id) {\n\tglobal $setting, $user;\n\t\n\tif ($user['login_status'] == 1) {\n\t\tif ($setting['seo_on'] == 0) {\n\t\t\t$url = '/go.php?id='.$id.'&ref='.$user['id'];\n\t\t}\n\t\telse {\n\t\t\t$url = '/r-'.$id.'-'.$user['id'];\n\t\t}\n\t}\n\telse {\n\t\tif ($setting['seo_on'] == 0) {\n\t\t\t$url = '/go.php?id='.$id;\n\t\t}\n\t\telse {\n\t\t\t$url = '/r-'.$id;\n\t\t}\t\n\t}\n\t\n\treturn $setting['site_url'].$url;\n}", "function url_to_link_callback($matches)\n{\n return '<a href=\"' . htmlspecialchars($matches[1]) . '\">' . $matches[1] . '</a>';\n}", "public function test_display_shortlink_if_link_exists()\n {\n $formData = [\n 'link' => 'http://testdomain.com',\n ];\n\n $this->post(route('shortlink.create'), $formData)->assertStatus(200);\n }", "protected function getLinkHandlers() {}", "protected function getLinkHandlers() {}", "function tnsl_fShortenBlockURLs($sBlockfile = '', $sContents = '') {\r\n\tglobal $tnsl_bDebugMode, $tnsl_sGTFileDir, $tnsl_asGTFileExclude, $tnsl_asNoGTFile;\r\n\tif (!in_array($sBlockfile, $tnsl_asGTFileExclude)) {\r\n\t\tif ($tnsl_bDebugMode) {\r\n\t\t\techo '[ShortLinks_Function] = Present In Block<br />';\r\n\t\t}\r\n\t\tif ($sBlockfile != '') {\r\n\t\t\t$sGTBlockPath = $tnsl_sGTFileDir . '/GTB-' . $sBlockfile;\r\n\t\t\tif (@file_exists($sGTBlockPath)) { // Block has been \"Tapped\"\r\n\t\t\t\tif ($tnsl_bDebugMode) {\r\n\t\t\t\t\techo '[ShortLinks_FilePath] = GTB File Exists for :: ' . $sBlockfile . '<br />';\r\n\t\t\t\t}\r\n\t\t\t\ttnsl_fCleanLinks($sContents);\r\n\t\t\t\tunset($urlin, $urlout);\r\n\t\t\t\tinclude_once($sGTBlockPath);\r\n\t\t\t\t$sContents = preg_replace($urlin, $urlout, $sContents);\r\n\t\t\t} else {\r\n\t\t\t\tif ($tnsl_bDebugMode) {\r\n\t\t\t\t\techo '[ShortLinks_FilePath] = GTB File Does NOT Exist for :: ' . $sBlockfile . '<br />';\r\n\t\t\t\t\t$tnsl_asNoGTFile[] = $sGTBlockPath;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif ($tnsl_bDebugMode) {\r\n\t\t\t\techo '[ShortLinks_Function] = In HTML Block<br />';\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn $sContents;\r\n}", "public function getlink($shorturl) {\n\n $user = \\Drupal::currentUser()->id();\n $ip_add = \\Drupal::request()->getClientIp();\n $results = \\Drupal::database()->select('short_links', 's')\n ->fields('s', ['id', 'long_url', 'short_url', 'identifier'])\n ->condition('s.identifier', $shorturl, '=')\n ->execute();\n $result = $results->fetchAssoc();\n $long_url = $result['long_url'];\n $identifier = $result['identifier'];\n\n $conn = Database::getConnection();\n $conn->insert('short_links_details')->fields(\n [\n 'uid' => $user,\n 'long_url' => $long_url,\n 'identifier' => $identifier,\n 'redirection_time' => strtotime(\"now\"),\n 'ip_add' => $ip_add,\n ]\n )->execute();\n return new TrustedRedirectResponse($long_url);\n\n }", "function index_rel_link()\n {\n }", "function myUrl($atts, $content = null) {\n extract(shortcode_atts(array(\n \"gallery\" => 'http://'\n ), $atts));\n return '<a href=\"'.$gallery.'\" class=\"popup_mediacenter\" target=\"popup_mediacenter\"><img src=\"http://seattletimes.nwsource.com/art/ui/Photograph_link.gif\" width=\"15\" height=\"11\" class=\"icon\">'.$content.'</a>';\n}", "function shortcodes_ultimate() {\n\treturn true;\n}", "public function test_cannot_fetch_link_from_invalid_shortlink()\n {\n $this->get(route('shortlink.fetch.link', ['code' => 'invalid']))->assertStatus(404);\n }", "function link_a($dir,$cont){\r\n return \"<a href=\\\"$dir\\\">$cont</a>\";\r\n }", "function lqd_page_link( $link, $post_id ) {\n\tglobal $wp_query;\n\tif( isset( $wp_query->query_vars['messages-app-view'] ) ) {\n\t\treturn $link . 'messages-app-view/';\n\t}\n\treturn $link;\n}", "function handle_shortcode( ) {\n\n\tenqueue_files();\n\n\treturn get_location_content( );\n\n}", "public function test_can_fetch_hits_of_shortlink()\n {\n $this->get(route('shortlink.fetch.hits', ['code' => 'AbcXyz']))->assertStatus(200);\n }", "function jetpack_instagram_handler( $matches, $atts, $url ) {\n\tglobal $content_width;\n\n\t// keep a copy of the passed-in URL since it's modified below.\n\t$passed_url = $url;\n\n\t$max_width = 698;\n\t$min_width = 320;\n\n\tif ( is_feed() ) {\n\t\t// Instagram offers direct links to images, but not to videos.\n\t\tif ( 'p' === $matches[1] ) {\n\t\t\t$media_url = sprintf( 'http://instagr.am/p/%1$s/media/?size=l', $matches[2] );\n\t\t\treturn sprintf(\n\t\t\t\t'<a href=\"%1$s\" title=\"%2$s\" target=\"_blank\"><img src=\"%3$s\" alt=\"%4$s\" /></a>',\n\t\t\t\tesc_url( $url ),\n\t\t\t\tesc_attr__( 'View on Instagram', 'jetpack' ),\n\t\t\t\tesc_url( $media_url ),\n\t\t\t\tesc_html__( 'Instagram Photo', 'jetpack' )\n\t\t\t);\n\t\t} elseif ( 'tv' === $matches[1] ) {\n\t\t\treturn sprintf(\n\t\t\t\t'<a href=\"%1$s\" title=\"%2$s\" target=\"_blank\">%3$s</a>',\n\t\t\t\tesc_url( $url ),\n\t\t\t\tesc_attr__( 'View on Instagram', 'jetpack' ),\n\t\t\t\tesc_html__( 'Instagram Video', 'jetpack' )\n\t\t\t);\n\t\t}\n\t}\n\n\t$atts = shortcode_atts(\n\t\tarray(\n\t\t\t'width' => isset( $content_width ) ? $content_width : $max_width,\n\t\t\t'hidecaption' => false,\n\t\t),\n\t\t$atts\n\t);\n\n\t$atts['width'] = absint( $atts['width'] );\n\tif ( $atts['width'] > $max_width ) {\n\t\t$atts['width'] = $max_width;\n\t} elseif ( $atts['width'] < $min_width ) {\n\t\t$atts['width'] = $min_width;\n\t}\n\n\t// remove the modal param from the URL.\n\t$url = remove_query_arg( 'modal', $url );\n\n\t// force .com instead of .am for https support.\n\t$url = str_replace( 'instagr.am', 'instagram.com', $url );\n\n\t// The oembed endpoint expects HTTP, but HTTP requests 301 to HTTPS.\n\t$instagram_http_url = str_replace( 'https://', 'http://', $url );\n\n\t$url_args = array(\n\t\t'url' => $instagram_http_url,\n\t\t'maxwidth' => $atts['width'],\n\t\t'omitscript' => 1,\n\t);\n\n\tif ( $atts['hidecaption'] ) {\n\t\t$url_args['hidecaption'] = 'true';\n\t}\n\n\t$url = esc_url_raw( add_query_arg( $url_args, 'https://api.instagram.com/oembed/' ) );\n\n\t/**\n\t * Filter Object Caching for response from Instagram.\n\t *\n\t * Allow enabling of object caching for the response sent by Instagram when querying for Instagram image HTML.\n\t *\n\t * @module shortcodes\n\t *\n\t * @since 3.3.0\n\t *\n\t * @param bool false Object caching is off by default.\n\t * @param array $matches Array of Instagram URLs found in the post.\n\t * @param array $atts Instagram Shortcode attributes.\n\t * @param string $passed_url Instagram API URL.\n\t */\n\t$response_body_use_cache = apply_filters( 'instagram_cache_oembed_api_response_body', false, $matches, $atts, $passed_url );\n\t$response_body = false;\n\tif ( $response_body_use_cache ) {\n\t\t$cache_key = 'oembed_response_body_' . md5( $url );\n\t\t$response_body = wp_cache_get( $cache_key, 'instagram_embeds' );\n\t}\n\n\tif ( ! $response_body ) {\n\t\t// Not using cache (default case) or cache miss.\n\t\t$instagram_response = wp_remote_get( $url, array( 'redirection' => 0 ) );\n\t\tif (\n\t\t\tis_wp_error( $instagram_response )\n\t\t\t|| 200 !== $instagram_response['response']['code']\n\t\t\t|| empty( $instagram_response['body'] ) ) {\n\t\t\treturn '<!-- instagram error: invalid instagram resource -->';\n\t\t}\n\n\t\t$response_body = json_decode( $instagram_response['body'] );\n\t\tif ( $response_body_use_cache ) {\n\t\t\t// if caching it is short-lived since this is a \"Cache-Control: no-cache\" resource.\n\t\t\twp_cache_set(\n\t\t\t\t$cache_key,\n\t\t\t\t$response_body,\n\t\t\t\t'instagram_embeds',\n\t\t\t\tHOUR_IN_SECONDS + wp_rand( 0, HOUR_IN_SECONDS )\n\t\t\t);\n\t\t}\n\t}\n\n\tif ( ! empty( $response_body->html ) ) {\n\t\twp_enqueue_script(\n\t\t\t'jetpack-instagram-embed',\n\t\t\tAssets::get_file_url_for_environment( '_inc/build/shortcodes/js/instagram.min.js', 'modules/shortcodes/js/instagram.js' ),\n\t\t\tarray( 'jquery' ),\n\t\t\tJETPACK__VERSION,\n\t\t\ttrue\n\t\t);\n\t\treturn $response_body->html;\n\t}\n\n\treturn '<!-- instagram error: no embed found -->';\n}", "public function retrive($short_link)\n {\n $link_retrive_dto = LinkRetriveDTO::fromParam($short_link);\n if ($link_retrive_dto->validate() === true) {\n $result = app()->make('ShortnerLinkService')->retrive($link_retrive_dto);\n if ($result['is_successful']) {\n return responseOk($result['data']);\n } else {\n return responseError($result['message']);\n }\n } else {\n return responseError($link_retrive_dto->validate());\n }\n }", "protected function addLinks()\n {\n }", "public function using_permalinks()\n {\n }", "function handleShortcode ( $atts, $content = null )\n\t{\n\t\t$return = $this->core->comment_begin;\n\t\t$result = '';\n\t\t$error = '';\n\t\t$locale = $this->core->getOption( 'locale', 'shortcode' );\n\t\t$attrs = shortcode_atts( array ('asin' => '', 'locale' => $locale, 'linktype' => 'text', 'wishlist' => '', 'picsize' => 'small', 'col' => 1, 'sort_order'=>'LastUpdated' ), $atts );\n\n\t\t$locale = $attrs['locale'];\n\n\t\t// Get the associate ID\n\t\t$associatedid = $this->core->getOption( 'associated_id', 'general' );\n\t\tif ( $this->core->associate_table['US'] == $associatedid ) {\n\t\t\t$associatedid = $this->core->getAssociateId( $locale );\n\t\t}\n\n\t\t$sort_order_table = array ('DateAdded', 'LastUpdated', 'Price', 'Priority' );\n\t\tif (!(in_array($attrs['sort_order'],$sort_order_table))) {\n\t\t\t$attrs['sort_order'] ='LastUpdated';\n\t\t}\n\t\t/**\n\t\t * Set up Endpoint\n\t\t */\n\t\t$this->core->amazon_endpoint = $this->core->amazon_endpoint_table[$locale];\n\n\t\tif ( $attrs['wishlist'] ) {\n\t\t\t$this->core->wishlist_sort_order = $attrs['sort_order'];\n\t\t\t$list_result = $this->core->getListResults( $attrs['wishlist'] );\n\t\t\tif ( $list_result['Lists']['Request']['Errors'] ) {\n\t\t\t\t$error = 'WishList ' . $attrs['wishlist'] . ' doesn\\'t exists';\n\t\t\t\t$attrs['asin'] = null;\n\t\t\t}\n\t\t}\n\n\t\tif ( isset( $list_result['Error'] ) ) {\n\t\t\t$error = $this->core->getHttpError( $list_result['Error'] );\n\t\t\t$attrs['asin'] = null;\n\t\t}\n\n\t\t// If a random item is wanted, fill $attrs['asin'] with an ASIN from the wishlist\n\t\tif ( 'random' == strtolower( $attrs['asin'] ) ) {\n\t\t\t$Item_keys = $this->core->getItemKeys( $list_result['Lists']['List']['ListItem'] );\n\t\t\tforeach ( $Item_keys as $value ) {\n\t\t\t\t$Item = $list_result['Lists']['List']['ListItem'][$value];\n\t\t\t}\n\t\t\tif (!isset($Item['UniversalListItem'])) {\n\t\t\t\t$attrs['asin'] = $Item['Item']['ASIN'];\n\t\t\t} else {\n\t\t\t\t$attr['asin']='UniversalListItem';\n\t\t\t}\n\t\t}\n\n\t\tif ( 'all' == strtolower( $attrs['asin'] ) ) {\n\t\t\t$return .= '<table style=\" border: none; align: left\">';\n\n\t\t\tfor ($x=0; $x<=count ( $list_result['Lists']['List']['ListItem'])-1; $x+=$attrs['col'] ) {\n\t\t\t\t$return .= '<tr>';\n\t\t\t\tfor ($i=1; $i<=$attrs['col']; $i++) {\n\t\t\t\t\t$item=$list_result['Lists']['List']['ListItem'][$x+$i-1];\n\t\t\t\t\tif (!isset($item['UniversalListItem'])) {\n\t\t\t\t\t\t$attrs['asin'] = $item['Item']['ASIN'];\n\t\t\t\t\t\tlist ( $oneresult, $error ) = $this->shortcodeAsin( $attrs, $content, $associatedid, false );\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$oneresult = $this->shortcodeUniversalListItem($attrs,$item, $content, false);\n\t\t\t\t\t}\n\t\t\t\t\t$return .= '<td>'.$oneresult .'</td>';\n\t\t\t\t}\n\t\t\t\t$return .= '</tr>';\n\t\t\t}\n\t\t\t$return .= '</table>';\n\t\t\t$attrs['asin'] = null;\n\t\t}\n\n\t\tif ( $attrs['asin'] != 'UniversalListItem') {\n\t\t\tlist ( $result, $error ) = $this->shortcodeAsin( $attrs, $content, $associatedid );\n\t\t} else {\n\t\t\t$result = $this->shortcodeUniversalListItem($attrs,$Item, $content, false);\n\t\t}\n\n\t\tif ( $error ) {\n\t\t\t$return .= $error;\n\t\t} else {\n\t\t\t$return .= $result;\n\t\t}\n\t\t$return .= $this->core->comment_end;\n\t\treturn ($return);\n\t}", "public function shortenLink($code)\n {\n $find = Link::where('code', $code)->first();\n $find->count++;\n $find->save();\n\n return redirect($find->link);\n\n }", "function _get_page_link($post = \\false, $leavename = \\false, $sample = \\false)\n {\n }", "public function guestDoesUrlShortening()\n {\n $longUrl = 'https://laravel.com';\n\n $this->post(route('createshortlink'), [\n 'long_url' => $longUrl,\n ]);\n\n $url = Url::whereLongUrl($longUrl)->first();\n\n $this->assertSame(null, $url->user_id);\n }", "function call_makeShortUrl() {\n new makeShortUrl();\n }", "function bimber_shares_use_shortlinks() {\n\treturn apply_filters( 'bimber_shares_use_shortlinks', false );\n}", "function topic_link($tdetails) {\n if (SEO == yes)\n return BASEURL . '/view_topic/' . SEO($tdetails['topic_title']) . '_tid_' . $tdetails['topic_id'];\n else\n return BASEURL . '/view_topic.php?tid=' . $tdetails['topic_id'];\n }", "public abstract function do_shortcode( $atts, $content, $tag );", "public function test_can_shorten_a_link()\n {\n $formData = [\n 'link' => 'http://testdomain.com',\n ];\n\n $this->post(route('shortlink.create'), $formData)->assertStatus(200);\n }", "function get_shortcut_link()\n {\n }", "public function SocialShareShortcode()\n {\n $data = $this->_SocialShareButtonsData(true);\n\t\t\tif(!$data['hide_on_page']){\n\t\t\t\t//use different view file for shortcode\n\t\t\t\treturn $this->_loadView('shortcodes/buttons-sc', $data);\n\t\t\t}\n }", "function link($path, $options = array()) {\n\t\t$message = \"MediaHelper::link - \";\n\t\t$message .= \"All functionality related to assets has been deprecated.\";\n\t\ttrigger_error($message, E_USER_NOTICE);\n\n\t\t$default = array(\n\t\t\t'inline' => true,\n\t\t\t'restrict' => array(),\n\t\t);\n\t\t$defaultRss = array(\n\t\t\t'title' => 'RSS Feed',\n\t\t);\n\n\t\tif (is_bool($options)) {\n\t\t\t$options = array('inline' => $options);\n\t\t}\n\t\t$options = array_merge($default, $options);\n\n\t\tif (is_array($path) && !array_key_exists('controller', $path)) {\n\t\t\t$out = null;\n\t\t\tforeach ($path as $i) {\n\t\t\t\t$out .= $this->link($i, $options);\n\t\t\t}\n\t\t\tif (empty($out)) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\treturn $out;\n\t\t}\n\n\t\t$inline = $options['inline'];\n\t\tunset($options['inline']);\n\n\t\tif (!$url = $this->url($path)) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (strpos('://', $path) !== false) {\n\t\t\t$file = parse_url($url, PHP_URL_PATH);\n\t\t} else {\n\t\t\t$file = $this->file($path);\n\t\t}\n\n\t\t$mimeType = Mime_Type::guessType($file);\n\t\t$name = Mime_Type::guessName($mimeType);\n\n\t\tif ($options['restrict'] && !in_array($name, (array) $options['restrict'])) {\n\t\t\treturn;\n\t\t}\n\t\tunset($options['restrict']);\n\n\t\tswitch ($mimeType) {\n\t\t\tcase 'text/css':\n\t\t\t\t$out = sprintf(\n\t\t\t\t\t$this->tags['csslink'],\n\t\t\t\t\t$url,\n\t\t\t\t\t$this->_parseAttributes($options, null, '', ' ')\n\t\t\t\t);\n\t\t\t\treturn $this->output($out, $inline);\n\t\t\tcase 'application/javascript':\n\t\t\tcase 'application/x-javascript':\n\t\t\t\t$out = sprintf($this->tags['javascriptlink'], $url);\n\t\t\t\treturn $this->output($out, $inline);\n\t\t\tcase 'application/rss+xml':\n\t\t\t\t$options = array_merge($defaultRss,$options);\n\t\t\t\t$out = sprintf($this->tags['rsslink'], $url, $options['title']);\n\t\t\t\treturn $this->output($out, $inline);\n\t\t\tdefault:\n\t\t\t\treturn $this->Html->link(basename($file), $url);\n\t\t}\n\t}", "public function show($code)\n {\n $links = ShortLink::where('short_codes',$code)->first();\n\n $long_link = $links->long_links;\n\n return redirect($long_link);\n\n\n }", "function business_link_rel() {\n\tglobal $themeslug, $options; //Call global variables\n\t$favicon = $options->get($themeslug.'_favicon'); //Calls the favicon URL from the theme options \n\t\n\tif ($options->get($themeslug.'_font') == \"\" AND $options->get($themeslug.'_custom_font') == \"\") {\n\t\t$font = apply_filters( 'synapse_default_font', 'Arial' );\n\t}\t\t\n\telseif ($options->get($themeslug.'_custom_font') != \"\" && $options->get($themeslug.'_font') == 'custom') {\n\t\t$font = $options->get($themeslug.'_custom_font');\t\n\t}\t\n\telse {\n\t\t$font = $options->get($themeslug.'_font'); \n\t} \n\tif ($options->get($themeslug.'_color_scheme') == '') {\n\t\t$color = 'blue';\n\t}\n\telse {\n\t\t$color = $options->get($themeslug.'_color_scheme');\n\t}?>\n\t\n<link rel=\"shortcut icon\" href=\"<?php echo stripslashes($favicon['url']); ?>\" type=\"image/x-icon\" />\n\n<link rel=\"stylesheet\" href=\"<?php bloginfo( 'template_url' ); ?>/core/css/foundation.css\" type=\"text/css\" />\n<link rel=\"stylesheet\" href=\"<?php bloginfo( 'template_url' ); ?>/core/css/app.css\" type=\"text/css\" />\n<!--[if IE]>\n<link rel=\"stylesheet\" href=\"<?php bloginfo( 'template_url' ); ?>/core/css/ie.css\" type=\"text/css\" />\n<![endif]-->\n<link rel=\"stylesheet\" href=\"<?php bloginfo( 'template_url' ); ?>/css/shortcode.css\" type=\"text/css\" />\n<link rel=\"stylesheet\" href=\"<?php bloginfo( 'template_url' ); ?>/css/elements.css\" type=\"text/css\" />\n<link rel=\"stylesheet\" href=\"<?php bloginfo( 'template_url' ); ?>/css/style.css\" type=\"text/css\" />\n<link rel=\"stylesheet\" href=\"<?php bloginfo( 'template_url' ); ?>/css/color/<?php echo $color; ?>.css\" type=\"text/css\" />\n\n\n<?php if (is_child_theme()) : //add support for child themes?>\n\t<link rel=\"stylesheet\" href=\"<?php echo bloginfo('stylesheet_directory') ; ?>/style.css\" type=\"text/css\" />\n<?php endif; ?>\n\n<link rel=\"pingback\" href=\"<?php bloginfo('pingback_url'); ?>\" />\n\n<link href='//fonts.googleapis.com/css?family=<?php echo $font ; ?>' rel='stylesheet' type='text/css' /> <?php\n}", "function avia_link_content_filter($current_post)\n\t{\n\t\t$link \t\t= \"\";\n\t\t$newlink = false;\n\t\t$pattern1 \t= '$^\\b(https?|ftp|file)://[-A-Z0-9+&@#/%?=~_|!:,.;]*[-A-Z0-9+&@#/%=~_|]$i';\n\t\t$pattern2 \t= \"!^\\<a.+?<\\/a>!\";\n\t\t$pattern3 \t= \"!\\<a.+?<\\/a>!\";\n\n\t\t//if the url is at the begnning of the content extract it\n\t\tpreg_match($pattern1, $current_post['content'] , $link);\n\t\tif(!empty($link[0]))\n\t\t{\n\t\t\t$link = $link[0];\n\t\t\t$markup = avia_markup_helper(array('context' => 'entry_title','echo'=>false));\n\t\t\t$current_post['title'] = \"<a href='$link' rel='bookmark' title='\".__('Link to:','avia_framework').\" \".the_title_attribute('echo=0').\"' $markup>\".get_the_title().\"</a>\";\n\t\t\t$current_post['content'] = preg_replace(\"!\".str_replace(\"?\", \"\\?\", $link).\"!\", \"\", $current_post['content'], 1);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tpreg_match($pattern2, $current_post['content'] , $link);\n\t\t\tif(!empty($link[0]))\n\t\t\t{\n\t\t\t\t$link = $link[0];\n\t\t\t\t$current_post['title'] = $link;\n\t\t\t\t$current_post['content'] = preg_replace(\"!\".str_replace(\"?\", \"\\?\", $link).\"!\", \"\", $current_post['content'], 1);\n\t\t\t\t\n\t\t\t\t$newlink = get_url_in_content( $link );\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tpreg_match($pattern3, $current_post['content'] , $link);\n\t\t\t\tif(!empty($link[0]))\n\t\t\t\t{\n\t\t\t\t\t$current_post['title'] = $link[0];\n\t\t\t\t\t\n\t\t\t\t\t$newlink = get_url_in_content( $link[0] );\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif($link)\n\t\t{\n\t\t\tif(is_array($link)) $link = $link[0];\n\t\t\tif($newlink) $link = $newlink;\n\t\t\t\n\t\t\t$heading = is_singular() ? \"h1\" : \"h2\";\n\n\t\t\t//$current_post['title'] = \"<{$heading} class='post-title entry-title \". avia_offset_class('meta', false). \"'>\".$current_post['title'].\"</{$heading}>\";\n\t\t\t$current_post['title'] = \"<{$heading} class='post-title entry-title' \".avia_markup_helper(array('context' => 'entry_title','echo'=>false)).\">\".$current_post['title'].\"</{$heading}>\";\n\t\t\t\n\t\t\t//needs to be set for masonry\n\t\t\t$current_post['url'] = $link;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$current_post = avia_default_title_filter($current_post);\n\t\t}\n\n\t\treturn $current_post;\n\t}", "function get_page_link($post = \\false, $leavename = \\false, $sample = \\false)\n {\n }", "function get_buzz_url($aliasname) {\n $buzz_page_alias = get_option(\"buzz_page_alias\");\n return get_page_link($buzz_page_alias[$aliasname]);\n}", "function rest_output_link_wp_head()\n {\n }", "public function getShortcode();", "function url ($link) {\r\n\treturn $link;\r\n}", "function casasrealprod_process_page(&$variables) {\n // Hook into color.module.\n if (module_exists('color')) {\n _color_page_alter($variables);\n }\n // Always print the site name and slogan, but if they are toggled off, we'll\n // just hide them visually.\n $variables['hide_site_name'] = theme_get_setting('toggle_name') ? FALSE : TRUE;\n $variables['hide_site_slogan'] = theme_get_setting('toggle_slogan') ? FALSE : TRUE;\n if ($variables['hide_site_name']) {\n // If toggle_name is FALSE, the site_name will be empty, so we rebuild it.\n $variables['site_name'] = filter_xss_admin(variable_get('site_name', 'Drupal'));\n }\n if ($variables['hide_site_slogan']) {\n // If toggle_site_slogan is FALSE, the site_slogan will be empty, so we rebuild it.\n $variables['site_slogan'] = filter_xss_admin(variable_get('site_slogan', ''));\n }\n // Since the title and the shortcut link are both block level elements,\n // positioning them next to each other is much simpler with a wrapper div.\n if (!empty($variables['title_suffix']['add_or_remove_shortcut']) && $variables['title']) {\n // Add a wrapper div using the title_prefix and title_suffix render elements.\n $variables['title_prefix']['shortcut_wrapper'] = array(\n '#markup' => '<div class=\"shortcut-wrapper clearfix\">',\n '#weight' => 100,\n );\n $variables['title_suffix']['shortcut_wrapper'] = array(\n '#markup' => '</div>',\n '#weight' => -99,\n );\n // Make sure the shortcut link is the first item in title_suffix.\n $variables['title_suffix']['add_or_remove_shortcut']['#weight'] = -100;\n }\n if (isset($variables['node']) && \n $variables['node']->type == \"casas\" && \n strpos(drupal_get_path_alias(), '/booking')>0) {\n drupal_add_js(drupal_get_path('theme', 'casasrealprod') . '/js/casas_booking_manager.js');\n $breadcrumbs = array();\n $breadcrumbs[] = l(t('Home'), '<front>');\n $breadcrumbs[] = l(t('Las Casas'), 'node/10');\n $breadcrumbs[] = l($variables['node']->title, 'node/'.$variables['node']->nid);\n drupal_set_breadcrumb($breadcrumbs);\n $variables['title'] = t('Search for Availability');\n $variables['breadcrumb'] = theme('breadcrumb', array('breadcrumb' => drupal_get_breadcrumb()));\n }\n\n if (strpos(drupal_get_path_alias(), 'bookings') !== FALSE) {\n drupal_add_js(drupal_get_path('theme', 'casasrealprod') . '/js/casas_booking_manager.js');\n }\n \n if (strpos(drupal_get_path_alias(), 'checkout') !== FALSE) {\n $parts = explode('/', current_path());\n $last = array_pop($parts);\n $title = drupal_get_title();\n if (is_numeric($last)) {\n $title = t('Fill your personal data');\n }\n else if ($last == 'review') {\n $title = t('Review order');\n } \n $variables['title'] = $title;\n } \n}", "function news_link() {\n global $wp;\n $current_url = home_url(add_query_arg(array(),$wp->request));\n if (stripos($current_url, 'th') !== false) {\n $page = get_page_by_path('news-events-th');\n } else {\n $page = get_page_by_path('news-events');\n }\n the_permalink($page);\n}", "public function add_short_code()\n {\n add_shortcode('colorYourLife', array($this, 'generate_short_code_content'));\n }", "public function addLinks()\n {\n if (isset($_GET['page']) == 'bolsista'):\n $css = [\n plugins_url(Path::PLGCSS . 'bootstrap.min.css'),\n plugins_url(Path::PLGCSS . 'custom.css'),\n ];\n\n $js = [\n plugins_url(Path::PLGJS . 'bootstrap.min.js'),\n plugins_url(Path::PLGJS . 'js-view.js')\n ];\n $this->insertCSS($css);\n $this->insertJS($js);\n\n else:\n $css = [\n plugins_url(Path::PLGCSS . 'bootstrap.min.css'),\n plugins_url(Path::PLGCSS . 'custom.css')\n ];\n $js = [\n plugins_url(Path::PLGJS . 'bootstrap.min.js'),\n plugins_url(Path::PLGJS . 'js-view.js')\n ];\n $this->insertCSS($css);\n $this->insertJS($js);\n endif;\n }", "function changeUrlUnparsedContentCode(&$tag, &$data)\n{\n global $txt, $modSettings, $context;\n loadLanguage('Redirector/Redirector');\n\n $data = strtr($data, ['<br />' => '']);\n $link_text = $data;\n\n // Skip local urls with #\n if (strpos($data, '#') === 0) {\n return;\n } else {\n if (strpos($data, 'http://') !== 0 && strpos($data, 'https://') !== 0) {\n $data = 'http://' . $data;\n }\n }\n\n // Hide links from guests\n if (!empty($modSettings['redirector_hide_guest_links']) && !empty($context['user']['is_guest']) && !checkWhiteList(\n $data\n )) {\n $link_text = !empty($modSettings['redirector_hide_guest_custom_message']) ? $modSettings['redirector_hide_guest_custom_message'] : $txt['redirector_hide_guest_message'];\n }\n\n $data = getRedirectorUrl($data);\n\n $tag['content'] = '<a href=\"' . $data . '\" class=\"bbc_link\" ' . ((!empty($modSettings['redirector_nofollow_links']) && $modSettings['redirector_mode'] == 'immediate' && !checkWhiteList(\n $data\n )) ? 'rel=\"nofollow noopener noreferrer\" ' : '') . ($tag['tag'] == 'url' ? 'target=\"_blank\"' : '') . ' >' . $link_text . '</a>';\n}", "function wpme_rest_get_shortlink( $object ) {\n\treturn wpme_get_shortlink( $object['id'], array() );\n}", "function handleShortcode($atts = [], $content = null, $tag = '') {\n\n if (is_admin()){\n return;\n }\n \n $vueRootUrl = plugin_dir_url( __FILE__ ) . 'dist';\n $vueFileRoot = plugin_dir_path( __FILE__) . 'dist';\n\n $jsCore = ['bootstrap.min.js', 'jquery-3.3.1.min.js', 'popper.min.js'];\n\n // Find the build files\n $jsMatches = glob(plugin_dir_path( __FILE__) . 'dist/js/*.*.js');\n $cssMatches = glob(plugin_dir_path( __FILE__) . 'dist/css/*.*.css');\n\n // Bring in core dependencies first\n\n $isLocal = true;\n\n if ($isLocal){\n\n //wp_deregister_script('jquery');\n\n //wp_register_script('actiontracker_vuecore_jquery', $vueRootUrl . '/js/jquery-3.3.1.min.js', false, null, true);\n\n wp_register_script('actiontracker_vuecore_popper', $vueRootUrl . '/js/popper.min.js', false, null, true);\n wp_register_script('actiontracker_vuecore_bootstrap4', $vueRootUrl . '/js/bootstrap.min.js', false, null, true);\n \n foreach ($jsMatches as $i => $jsItem) {\n if (!in_array(basename($jsItem), $jsCore)){\n $url = $vueRootUrl . '/js/' . basename($jsItem);\n $name = \"actiontracker_vuejs_\".$i;\n if (!wp_script_is($name, 'enqueued')){\n //print_r('BUILD JS: ' . $jsItem . '<br/>');\n wp_register_script($name, $url);\n wp_enqueue_script($name); \n }\n }\n }\n \n foreach ($cssMatches as $i => $cssItem) { \n $url = $vueRootUrl . '/css/' . basename($cssItem);\n $name = \"actiontracker_vuecss_\".$i;\n if (!wp_script_is($name, 'enqueued')){\n //print_r('CSS JS: ' . $i . '<br/>');\n wp_register_style($name, $url);\n wp_enqueue_style($name); \n }\n \n }\n\n }\n else {\n\n wp_register_script('actiontracker_vuecore_popper', 'http://app.actiontracker.org/js/popper.min.js', false, null, true);\n wp_register_script('actiontracker_vuecore_bootstrap4', 'http://app.actiontracker.org/js/bootstrap.min.js', false, null, true);\n \n //wp_enqueue_script('actiontracker_vuecore_jquery');\n wp_enqueue_script('actiontracker_vuecore_popper');\n wp_enqueue_script('actiontracker_vuecore_bootstrap4');\n \n }\n\n\n \n \n\n /*\n\n */\n \n // Handle short code params\n\n if (array_key_exists('view', $atts)) {\n $str = \"<div class='actionTrackerVuePlugin' view='\".$atts['view'].\"'>You need Javascript for this feature, sorry.</div>\"; \n }\n else {\n $str = \"<div class='actionTrackerVuePlugin' view='all'>You need Javascript for this feature, sorry.</div>\"; \n }\n\n return $str;\n }", "function rewrite_static_tags() {\n\tadd_rewrite_tag('%proxy%', '([^&]+)');\n add_rewrite_tag('%manual%', '([^&]+)');\n add_rewrite_tag('%manual_file%', '([^&]+)');\n add_rewrite_tag('%file_name%', '([^&]+)');\n add_rewrite_tag('%file_dir%', '([^&]+)');\n}", "function shortcode_btn ( $atts, $content = \"\" ) {\n\t$a = shortcode_atts( array(\n\t\t'link' => \"#\",\n\t\t'type' => \"default\",\n\t\t'target' => \"\",\n\t\t'class' => \"\",\n\t\t'title' => \"\",\n\t), $atts );\n\t\n\treturn '<a class=\"btn btn-' . $a['type'] . ' ' . $a['class'] . '\" href=\"' . $a['link'] . '\" title=\"' . $a['title'] . '\" ' . (empty($a['target']) ? '' : 'target=\"' . $a['target'] . '\"') . '>' . do_shortcode( $content ) . '</a>';\n}", "public function link()\n\t{\n\t\treturn route('balldeep.posts.show', [$this->type->slug, $this->slug]);\n\t}", "function bf_admin_help_links() {\r\n\t$content = '<strong><a href=\"http://code.google.com/p/arras-buffet/\">' . __('Project Page', 'buffet') . '</a></strong> | ';\r\n\t$content .= '<strong><a href=\"http://www.zy.sg/\">' . __(\"Developer's Blog\", 'buffet') . '</a></strong>';\r\n\t\r\n\techo apply_filters('bf_admin_help_links', $content);\r\n}", "protected function isLink() {}", "public function handle($request, Closure $next){\n $url = \\App\\Shorturl::whereId(Helpers::convertBase62SymbolToInt($request->route('id_url')))->first();\n if($url == null){\n return response()->json(['error'=> 404, 'message'=> 'Not found' ], 404);\n }\n return $next($request);\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}", "function apc_cache_redirect_shorturl( $args ) {\n\t$code = defined('APC_CACHE_REDIRECT_FIRST_CODE')?APC_CACHE_REDIRECT_FIRST_CODE:301;\n\t$location = $args[0];\n\t$keyword = $args[1];\n\tyourls_do_action( 'pre_redirect', $location, $code );\n\t$location = yourls_apply_filter( 'redirect_location', $location, $code );\n\t$code = yourls_apply_filter( 'redirect_code', $code, $location );\n\t// Redirect, either properly if possible, or via Javascript otherwise\n\tif( !headers_sent() ) {\n\t\tyourls_status_header( $code );\n\t\theader( \"Location: $location\" );\n\t\t// force the headers to be sent\n\t\techo \"Redirecting to $location\\n\";\n\t\t@ob_end_flush();\n\t\t@ob_flush();\n\t\tflush();\n\t} else {\n\t\tyourls_redirect_javascript( $location );\n\t}\n\n\t$start = microtime(true);\n\t// Update click count in main table\n\t$update_clicks = yourls_update_clicks( $keyword );\n\n\t// Update detailed log for stats\n\t$log_redirect = yourls_log_redirect( $keyword );\n\t$lapsed = sprintf(\"%01.3f\", 1000*(microtime(true) - $start));\n\tapc_cache_debug(\"redirect_shorturl: Database updates took $lapsed ms after sending redirect\");\n\t\n\tdie();\n}", "private static function links()\n {\n $files = ['Link'];\n $folder = static::$root.'Http/Links'.'/';\n\n self::call($files, $folder);\n\n $files = ['LinkKeyNotFoundException'];\n $folder = static::$root.'Http/Links/Exceptions'.'/';\n\n self::call($files, $folder);\n }", "function register_hotlink_scanner() {\n \tadd_action( 'save_post', array( &$this, 'localize_hotlinked_files' ) );\n\t}", "function sc_myShortcode( $attrs, $content = null ) {\n\t// Default attributes.\n\tSDES_Static::set_default_keyValue( $attrs, 'attr1', 'SomeValue' );\n\tSDES_Static::set_default_keyValue( $attrs, 'attr2', 'AnotherValue' );\n\t// Sanitize input.\n\t$attrs['attr1'] = esc_attr( $attrs['attr1'] );\n\t$attrs['attr2'] = esc_attr( $attrs['attr2'] );\n\n\t// Shortcode logic.\n\n\t// Set context for view.\n\t$context['disp1'] = $attrs['attr1'];\n\t$context['disp2'] = $attrs['attr2'];\n\t// Render HTML.\n\treturn rencer_sc_myShortcode( $context );\n}", "function shortcode_function($atts) {\n\n\t\tif ( ! isset( $atts['id'] ) )\n\t\t\treturn;\n\n\t\tif ( $this->is_attachment_private( $atts['id'] ) && ! is_user_logged_in() )\n\t\t\t$link = 'You must be logged in to access this file.';\n\t\telseif ( isset( $atts['attachment_page'] ) )\n\t\t\t$link = wp_get_attachment_link( $atts['id'] );\n\t\telse\n\t\t\t$link = sprintf( '<a href=\"%s\">%s</a>', esc_url( wp_get_attachment_url( $atts['id'] ) ), esc_html( basename( wp_get_attachment_url( $atts['id'] ) ) ) );\n\n\t\treturn $link;\n\n\t}", "function dvs_change_blog_links($post_link, $id=0){\n\n $post = get_post($id);\n\n if( is_object($post) && $post->post_type == 'post'){\n return home_url('/my-prefix/'. $post->post_name.'/');\n }\n\n return $post_link;\n}", "function do_shortcode($content, $ignore_html = \\false)\n {\n }", "function uxbannerShortcode( $atts, $content = null ){\n global $flatsome_opt;\n $bannerid = rand();\n extract( shortcode_atts( array(\n 'text_pos' => 'center',\n 'height' => '300px',\n 'text_color' => 'light',\n 'link' => '',\n 'text_width' => '60%',\n 'text_align' => 'center',\n 'text_box' => '',\n 'animation' => 'fadeIn',\n 'animation_duration' => '',\n 'effect' => '',\n 'video_mp4' => '',\n 'video_ogg' => '',\n 'video_webm' => '',\n 'video_sound' => 'false',\n 'hover' => '',\n 'bg' => '', \n 'parallax' => '',\n 'parallax_text' => '',\n 'text_bg' => '',\n 'text_bg_opacity' => '0.8',\n 'padding' => '30px',\n 'callout' => '',\n 'callout_size' => 'small',\n 'data_height' => '',\n 'target' => '',\n ), $atts ) );\n\n ob_start();\n\n // replace ___ with a nice divider\n $fix = array (\n '&nbsp;' => '', \n '<p></p>' => '', \n '<p>[' => '[', \n ']</p>' => ']', \n ']<br />' => ']',\n '_____' => '<div class=\"tx-div large\"></div>',\n '____' => '<div class=\"tx-div medium\"></div>',\n '___' => '<div class=\"tx-div small\"></div>',\n );\n $content = strtr($content, $fix);\n\n $content = do_shortcode( $content ); \n\n $img_link = get_template_directory_uri().'/img/';\n\n $color = \"light\";\n if($text_color == 'light') $color = \"dark\";\n\n if($hover) $hover = 'hover_'.$hover;\n\n $animated = \"\";\n if($animation != \"none\") $animated = \"animated\";\n\n $start_link = \"\";\n $end_link = \"\";\n if($link) {$start_link = '<a href=\"'.$link.'\"';\n if ($target) {\n $start_link .= ' target=\"'.$target.'\" ';\n }\n $start_link .= '>';\n $end_link = '</a>';};\n\n $background = \"\";\n $background_color = \"\";\n if (strpos($bg,'http://') !== false || strpos($bg,'https://') !== false) {\n $background = $bg;\n }\n elseif (strpos($bg,'#') !== false) {\n $background_color = 'background-color:'.$bg.'!important';\n }\n else {\n $bg = wp_get_attachment_image_src($bg, 'large');\n $background = $bg[0];\n }\n\n $textalign = \"\";\n if($text_align) {$textalign = \"text-\".$text_align;}\n\n /* set rgba background */\n if($text_bg){$text_bg = hex2rgba($text_bg,$text_bg_opacity); };\n \n $parallax_class = '';\n if($parallax){$parallax_class = 'ux_parallax'; $parallax='data-velocity=\"'.(intval($parallax)/10).'\"';} \n \n $text_parallax_class = '';\n if($parallax_text){$text_parallax_class = 'parallax_text'; $parallax_text='data-velocity=\"'.(intval($parallax_text)/10).'\"';} \n \n ?>\n \n <div id=\"banner_<?php echo $bannerid; ?>\" class=\"ux_banner <?php if($text_box)echo 'ux-textbox-'.$text_box; ?> <?php echo $color; ?> <?php echo $hover; ?>\" style=\"height:<?php echo $height; ?>\" data-height=\"<?php echo $height; ?>\" role=\"banner\">\n <?php echo $start_link; ?>\n <div class=\"banner-bg zig <?php echo $parallax_class; ?>\" <?php echo $parallax; ?> style=\"background-image:url(<?php echo $background; ?>); <?php echo $background_color; ?>\"></div>\n <?php if($video_mp4 || $video_webm || $video_ogg){ ?>\n <div class=\"video-overlay\" style=\"position:absolute;top:0;bottom:0;right:0;left:0;z-index:2;background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAABytg0kAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6N0IxQjNGRDQ0QUMxMTFFMzhBQzM5OUZBMEEzN0Y1RUUiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6N0IxQjNGRDU0QUMxMTFFMzhBQzM5OUZBMEEzN0Y1RUUiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpFN0M5QzFENzRBQTcxMUUzOEFDMzk5RkEwQTM3RjVFRSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpFN0M5QzFEODRBQTcxMUUzOEFDMzk5RkEwQTM3RjVFRSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PhPF5GwAAAAYSURBVHjaYmJgYPD6//8/AyOIAAGAAAMAPRIGSKhmMMMAAAAASUVORK5CYII=');\"></div>\n <video class=\"ux-banner-video hide-for-small\" <?php echo $parallax; ?> style=\"position:absolute;top:0;left:0;bottom:0;right:0;min-width: 100%;min-height: 100%;z-index:1;\" poster=\"<?php echo $background; ?>\" preload=\"auto\" autoplay=\"\" loop=\"loop\" <?php if($video_sound == 'false') echo \"muted='muted'\"; ?>>\n <source src=\"<?php echo $video_mp4; ?>\" type=\"video/mp4\">\n <source src=\"<?php echo $video_webm; ?>\" type=\"video/webm\">\n <source src=\"<?php echo $video_ogg; ?>\" type=\"video/ogg\">\n </video>\n <?php } ?>\n <?php if($effect){ ?>\n <div class=\"banner-effect\"></div>\n <?php } ?>\n <div class=\"row parallax_text <?php echo $text_parallax_class; ?>\" <?php echo $parallax_text; ?>>\n <div class=\"inner <?php echo $text_pos; ?> <?php echo $animated; ?> <?php echo $textalign; ?> <?php if($text_box){echo 'text-boxed';} ?>\n\" data-animate=\"<?php echo $animation; ?>\" style=\"width:<?php echo $text_width; ?>; <?php if($text_bg){echo 'background-color:'.$text_bg.';';} ?> <?php if($text_bg){echo 'padding:'.$padding;} ?>\">\n <?php echo $content; ?>\n <?php if($callout) { ?> \n <div class=\"callout <?php echo $flatsome_opt['bubble_style']; ?>\">\n <div class=\"inner\">\n <div class=\"inner-text\"><?php echo $callout; ?></div>\n </div>\n </div><!-- end callout -->\n <?php } ?>\n </div> \n </div>\n <?php echo $end_link; ?>\n <?php if($animation_duration){ ?><style>#banner_<?php echo $bannerid; ?> .inner{ animation-duration:<?php echo $animation_duration; ?> ; -webkit-animation-duration:<?php echo $animation_duration; ?> ; -moz-animation-duration:<?php echo $animation_duration; ?> ; -o-animation-duration:<?php echo $animation_duration; ?>; } </style><?php } // End animation duration ?>\n\n<?php // EFFECTS // ?>\n<?php if($effect){ ?>\n<?php if($effect === 'snow'){ ?>\n<style>\n@keyframes snow { \n 0% { background-position: 0px 0px, 0px 0px, 0px 0px }\n 100% { background-position: 500px 1000px, 400px 400px, 300px 300px }\n}\n@-moz-keyframes snow { \n 0% { background-position: 0px 0px, 0px 0px, 0px 0px }\n 100% { background-position: 500px 1000px, 400px 400px, 300px 300px }\n}\n@-webkit-keyframes snow { \n 0% { background-position: 0px 0px, 0px 0px, 0px 0px }\n 100% {background-position: 500px 1000px, 400px 400px, 300px 300px;\n }\n}\n@-ms-keyframes snow { \n 0% { background-position: 0px 0px, 0px 0px, 0px 0px }\n 100% { background-position: 500px 1000px, 400px 400px, 300px 300px }\n}\n#banner_<?php echo $bannerid; ?> .banner-effect {\n background-image:url('<?php echo get_template_directory_uri(); ?>/css/effects/snow1.png'),\n url('<?php echo get_template_directory_uri(); ?>/css/effects/snow2.png'); \n -webkit-animation: snow 20s linear infinite;\n -moz-animation: snow 20s linear infinite;\n -ms-animation: snow 20s linear infinite;\n animation: snow 20s linear infinite;\n}\n</style>\n<?php } // End snow effect ?>\n\n\n<?php if($effect === 'confetti'){ ?>\n<style>\n@keyframes confetti { \n 0% { background-position: 0px 0px, 0px 0px, 0px 0px }\n 100% { background-position: 500px 1000px, 400px 400px, 300px 300px }\n}\n@-moz-keyframes confetti { \n 0% { background-position: 0px 0px, 0px 0px, 0px 0px }\n 100% { background-position: 500px 1000px, 400px 400px, 300px 300px }\n}\n@-webkit-keyframes confetti { \n 0% { background-position: 0px 0px, 0px 0px, 0px 0px }\n 100% {background-position: 500px 1000px, 400px 400px, 300px 300px;}\n}\n@-ms-keyframes confetti { \n 0% { background-position: 0px 0px, 0px 0px, 0px 0px }\n\n 100% { background-position: 500px 1000px, 400px 400px, 300px 300px }\n}\n#banner_<?php echo $bannerid; ?> .banner-effect {\n background-image:url('<?php echo get_template_directory_uri(); ?>/css/effects/confetti1.png'),\n url('<?php echo get_template_directory_uri(); ?>/css/effects/confetti2.png'); \n -webkit-animation: confetti 10s linear infinite;\n -moz-animation: confetti 10s linear infinite;\n -ms-animation: confetti 10s linear infinite;\n animation: confetti 10s linear infinite;\n}\n</style>\n<?php } // End confetti effect ?>\n\n<?php if($effect === \"sliding-glass\"){ ?>\n<style>\n@keyframes glass { \n 0% { background-position: 0px 0px, 0px 0px, 0px 0px }\n 100% { background-position: 500px 1000px, 400px 400px}\n}\n@-moz-keyframes glass { \n 0% { background-position: 0px 0px, 0px 0px, 0px 0px }\n\n 100% { background-position: 500px 1000px, 400px 400px}\n}\n@-webkit-keyframes glass { \n 0% { background-position: 0px 0px, 0px 0px, 0px 0px }\n 100% {background-position: 500px 1000px, -400px -400px; }\n}\n@-ms-keyframes glass { \n 0% { background-position: 0px 0px, 0px 0px, 0px 0px }\n 100% { background-position: 500px 1000px, 400px 400px }\n}\n#banner_<?php echo $bannerid; ?> .banner-effect {\n background-image:url('<?php echo get_template_directory_uri(); ?>/css/effects/glass1.png'),\n url('<?php echo get_template_directory_uri(); ?>/css/effects/glass2.png'); \n -webkit-animation: glass 30s linear infinite;\n -moz-animation: glass 30s linear infinite;\n -ms-animation: glass 30s linear infinite;\n animation: glass 30s linear infinite;\n}\n</style>\n<?php } // End sliding glass effect ?>\n\n\n<?php if($effect === 'sparkle'){ ?>\n<style>\n@keyframes sparkle { \n 0% { background-position: 0px 0px, 0px 0px, 0px 0px }\n 100% { background-position: -500px -1000px, -400px -400px, 300px 300px }\n}\n@-moz-keyframes sparkle { \n 0% { background-position: 0px 0px, 0px 0px, 0px 0px }\n 100% { background-position: -500px -1000px, -400px -400px, 300px 300px }\n}\n@-webkit-keyframes sparkle { \n 0% { background-position: 0px 0px, 0px 0px, 0px 0px }\n 100% {background-position: -500px -1000px, -200px -400px, 300px 300px;\n }\n}\n@-ms-keyframes sparkle { \n 0% { background-position: 0px 0px, 0px 0px, 0px 0px }\n 100% { background-position: -500px -1000px, -400px -400px, 300px 300px }\n}\n#banner_<?php echo $bannerid; ?> .banner-effect {\n background-image:url('<?php echo get_template_directory_uri(); ?>/css/effects/sparkle1.png'),\n url('<?php echo get_template_directory_uri(); ?>/css/effects/sparkle2.png');\n -webkit-animation: sparkle 60s linear infinite;\n -moz-animation: sparkle 60s linear infinite;\n -ms-animation: sparkle 60s linear infinite;\n animation: sparkle 60s linear infinite;\n}\n</style>\n<?php } // End sparkle effect ?>\n\n\n\n<?php if($effect === 'rain'){ ?>\n<style>\n@keyframes rain { \n 0% { background-position: 0px 0px }\n 100% { background-position: 500px 1000px }\n}\n@-moz-keyframes rain { \n 0% { background-position: 0px 0px }\n 100% { background-position: 500px 1000px }\n}\n@-webkit-keyframes rain { \n 0% { background-position: 0px 0px }\n 100% {background-position: 500px 1000px;\n }\n}\n@-ms-keyframes rain { \n 0% { background-position: 0px 0px}\n 100% { background-position: 500px 1000px}\n}\n#banner_<?php echo $bannerid; ?> .banner-effect {\n background-image:url('<?php echo get_template_directory_uri(); ?>/css/effects/rain.png');\n -webkit-animation: rain 2s linear infinite;\n -moz-animation: rain 2s linear infinite;\n -ms-animation: rain 2s linear infinite;\n animation: rain 2s linear infinite;\n}\n</style>\n<?php } // End sparkle effect ?>\n<?php } ?>\n\n\n\n</div><!-- end .ux_banner -->\n\n<?php \n\n $content = ob_get_contents();\n ob_end_clean();\n return $content;\n \n}", "function tnsl_fPageTapStart() {\r\n\tglobal $prefix, $db, $admin, $tnsl_bDebugMode, $tnsl_sGTFileDir, $tnsl_bAutoTapLinks, $tnsl_asNoGTFile;\r\n\t/*\r\n\t * GT-NExtGEn 0.5 by Bill Murrin (Audioslaved) http:// gt.audioslaved.com (c) 2004\r\n\t * GT-NExtGEn Header Code --- nextGenHead Variable\r\n\t * Modified by montego from http:// montegoscripts.com for RavenNuke(tm) and TegoNuke(tm) ShortLinks\r\n\t */\r\n\t$asGTFilePath = array();\r\n\t$sGTFilePath = '';\r\n\tif ($tnsl_bDebugMode) {\r\n\t\techo '[ShortLinks_Function] = Present In Header<br />';\r\n\t}\r\n\tif (isset($_REQUEST['name']) && $_REQUEST['name'] != '') {\r\n\t\t$nextGenName = htmlentities(stripslashes($_REQUEST['name']));\r\n\t\tif ($tnsl_bDebugMode) {\r\n\t\t\techo '[ShortLinks_ModuleName] = ' . $nextGenName . '<br />';\r\n\t\t}\r\n\t} else {\r\n\t\t$sql = 'SELECT main_module FROM ' . $prefix . '_main';\r\n\t\t$result = $db->sql_query($sql);\r\n\t\t$row = $db->sql_fetchrow($result);\r\n\t\t$mainmod_name = $row['main_module'];\r\n\t\t$nextGenName = $mainmod_name;\r\n\t\tif ($tnsl_bDebugMode) {\r\n\t\t\techo '[ShortLinks_ModuleName] = ' . $nextGenName . ' (Main Module)<br />';\r\n\t\t}\r\n\t}\r\n\t/*\r\n\t * GT-NExtGEn Files Path --- nextGenPath Variable\r\n\t * Modified by montego from http:// montegoscripts.com for RavenNuke(tm) and TegoNuke(tm) ShortLinks\r\n\t */\r\n\t$sGTFilePath = $tnsl_sGTFileDir . '/GT-' . $nextGenName . '.php';\r\n\tif (@file_exists($sGTFilePath)) {\r\n\t\tif ($tnsl_bDebugMode) {\r\n\t\t\techo '[ShortLinks_FilePath] = GT File :: ' . $sGTFilePath . ' :: Does Exist<br />';\r\n\t\t}\r\n\t\tob_start();\r\n\t\tarray_push($asGTFilePath, $sGTFilePath);\r\n\t\tdefine('TNSL_BUFFERED', TRUE);\r\n\t} else {\r\n\t\tif ($tnsl_bDebugMode) {\r\n\t\t\techo '[ShortLinks_FilePath] = GT File :: ' . $sGTFilePath . ' :: Does Not Exist!<br />';\r\n\t\t}\r\n\t\t$tnsl_asNoGTFile[] = $sGTFilePath;\r\n\t}\r\n\t/*\r\n\t * Check for PageLevel tap file\r\n\t */\r\n\t$sGTFilePath = $tnsl_sGTFileDir . '/GTZ-PageTap.php';\r\n\tif (@file_exists($sGTFilePath)) {\r\n\t\tif ($tnsl_bDebugMode) {\r\n\t\t\techo '[ShortLinks_FilePath] = GT File :: ' . $sGTFilePath . ' :: Does Exist<br />';\r\n\t\t}\r\n\t\tif (!defined('TNSL_BUFFERED')) { // Only buffer the output if it has not already been done\r\n\t\t\tob_start();\r\n\t\t\tdefine('TNSL_BUFFERED', TRUE);\r\n\t\t}\r\n\t\tarray_push($asGTFilePath, $sGTFilePath);\r\n\t} else {\r\n\t\tif ($tnsl_bDebugMode) {\r\n\t\t\techo '[ShortLinks_FilePath] = GT File :: ' . $sGTFilePath . ' :: Does Not Exist!<br />';\r\n\t\t}\r\n\t\t$tnsl_asNoGTFile[] = $sGTFilePath;\r\n\t}\r\n\t/*\r\n\t * If none of the above produces a tap, need to check if debug is on AND if tnsl_bAutoTapLinks is TRUE\r\n\t */\r\n\tif (!defined('TNSL_BUFFERED') && $tnsl_bDebugMode && isset($tnsl_bAutoTapLinks) && $tnsl_bAutoTapLinks) {\r\n\t\tob_start();\r\n\t\tdefine('TNSL_BUFFERED', TRUE);\r\n\t}\r\n\treturn $asGTFilePath;\r\n}", "public function userDoesUrlShortening()\n {\n $user = $this->admin();\n $longUrl = 'https://laravel.com';\n\n $this->loginAsAdmin();\n $this->post(route('createshortlink'), ['long_url' => $longUrl]);\n $url = Url::whereLongUrl($longUrl)->first();\n\n $this->assertSame($user->id, $url->user_id);\n }", "function auto_discovery_link_tags()\n{\n $html = '<link rel=\"alternate\" type=\"application/rss+xml\" title=\"'. __('Omeka RSS Feed') . '\" href=\"'. html_escape(items_output_url('rss2')) .'\" />';\n $html .= '<link rel=\"alternate\" type=\"application/atom+xml\" title=\"'. __('Omeka Atom Feed') .'\" href=\"'. html_escape(items_output_url('atom')) .'\" />';\n return $html;\n}", "function _shortenURL(&$ret){\n\t $links = explode('<a', $ret);\n\t $countlinks = count($links);\n\t for ($i = 0; $i < $countlinks; $i++){\n\t\t\t$link = $links[$i];\t\t\t\n\t\t\t$link = (preg_match('#(.*)(href=\")#is', $link)) ? '<a' . $link : $link;\n\t\n\t\t\t$begin = strpos($link, '>') + 1;\n\t\t\t$end = strpos($link, '<', $begin);\n\t\t\t$length = $end - $begin;\n\t\t\t$urlname = substr($link, $begin, $length);\n\n\t\t\t$chunked = (strlen($urlname) > 50 && preg_match('#^(http://|ftp://|www\\.)#is', $urlname)) ? substr_replace($urlname, '...', 30, -10) : $urlname;\n\t\t\t$ret = str_replace('>' . $urlname . '<', '>' . $chunked . '<', $ret); \n\t\n\t }\n\t}", "function section_pages($atts)\n{\n\textract( shortcode_atts( array(\n\t\t'jumplink' => '',\n\t\t'linkname' => '',\n\t), $atts ) );\n\n\tglobal $post;\n\t$ID = $post->ID;\n\t$thispage = '<li><a href=\"#'.$jumplink.'\">'.$linkname.'</a></li>';\n\t$pages = wp_list_pages('title_li=&sort_column=menu_order&depth=1&child_of='.$ID.'&echo=0');\n\treturn $thispage.$pages;\n}" ]
[ "0.63869464", "0.616263", "0.59983164", "0.5941541", "0.58979756", "0.5891951", "0.5857824", "0.5832499", "0.5766316", "0.57296956", "0.56240636", "0.5621851", "0.5607566", "0.55779934", "0.55398136", "0.5509105", "0.55075", "0.55037385", "0.5498538", "0.5463773", "0.54482055", "0.54327524", "0.5418686", "0.54129696", "0.54037094", "0.54021615", "0.5392769", "0.53869736", "0.53786874", "0.53725207", "0.53614044", "0.5351842", "0.5350168", "0.5349684", "0.5342871", "0.53203326", "0.5312568", "0.5307368", "0.5307368", "0.5304413", "0.5300504", "0.52844983", "0.5277807", "0.526902", "0.5259359", "0.5257057", "0.52542067", "0.5249062", "0.5239662", "0.5237045", "0.52365625", "0.5235509", "0.52279216", "0.5222879", "0.5214125", "0.521296", "0.5207894", "0.51922756", "0.5187178", "0.51782495", "0.51669425", "0.51627386", "0.5146941", "0.51462966", "0.51428777", "0.5140896", "0.5140672", "0.51364636", "0.51244336", "0.5101344", "0.5100634", "0.5100582", "0.5099743", "0.50918597", "0.5069998", "0.50691456", "0.5060374", "0.5054031", "0.5046585", "0.5043654", "0.5040522", "0.50360525", "0.5031906", "0.5027202", "0.50249356", "0.50216883", "0.5018189", "0.5017124", "0.50142765", "0.50118643", "0.5010326", "0.5009687", "0.50090265", "0.4991049", "0.4985666", "0.4984455", "0.49808356", "0.49780455", "0.49771985", "0.49679887" ]
0.6629646
0
Generate an App key for this integration (alternatively, use our UI here:
public static function pt_generate_app_key($apiKey, $name, $description = '', $contactEmail = '', $siteUrl = '') : array { $data = array( 'name' => $name, 'description' => $description, 'contactEmail' => $contactEmail, 'siteUrl' => $siteUrl ); $ch = curl_init('https://api.perfecttense.com/generateAppKey'); curl_setopt_array($ch, array( CURLOPT_POST => TRUE, CURLOPT_RETURNTRANSFER => TRUE, CURLOPT_HTTPHEADER => array( "Content-type: application/json", "Authorization: " . $apiKey ), CURLOPT_POSTFIELDS => json_encode($data) )); $response = curl_exec($ch); if ($response === FALSE) { die(curl_error($ch)); } $responseData = json_decode($response, TRUE); return $responseData; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAppKey();", "public function getAppKey(): string;", "public function generateKey(Application $app)\n {\n $bytes = random_bytes(16);\n $api_key = bin2hex($bytes);\n $this->addExampleRecords($app, $api_key);\n return ['key' => $api_key];\n }", "public function generateKeyAndSecret() {\n $user = user_load($this->uid);\n\n $this->app_key = str_replace(array(' ', '', '-'), '_', strtolower($this->title));\n $this->app_secret = md5($user->name . $this->time);\n }", "public function getAppKey()\n\t{\n\t\treturn $this->_appKey;\n\t}", "public function getAppKey()\n {\n return $this->_appKey;\n }", "public function get_app_key() {\n\n\t\t// Get plugin settings.\n\t\t$settings = $this->get_plugin_settings();\n\n\t\treturn rgar( $settings, 'customAppKey' ) ? rgar( $settings, 'customAppKey' ) : null;\n\n\t}", "private function generateApiKey()\n {\n return md5(uniqid(rand(), true));\n }", "private function generateApiKey()\n {\n return md5(uniqid(rand(), true));\n }", "private function generateApiKey() {\n return md5(uniqid(rand(), true));\n }", "private function generateApiKey() {\n return md5(uniqid(rand(), true));\n }", "public function getDeveloperKey();", "private function generateApiKey(){\n\n return md5(uniqid(rand(), true));\n\n }", "public function generateAuthKey() {\n $this->employer_auth_key = Yii::$app->security->generateRandomString();\n }", "public function generateApiKey() {\n return md5(uniqid(rand(), true));\n }", "public function generateAuthKey()\n {\n $this->auth_key = UsniAdaptor::app()->security->generateRandomString();\n }", "protected function askGenerateKey()\n {\n $ans = $this->ask('Generate App key?: ', 'y');\n\n // Check if the answer is true\n if (preg_match('/^y/', $ans))\n {\n // Generate the Application Encryption key\n $this->call('key:generate');\n }\n }", "function key(){\n\t\t$api_key = '42b85431eba6a84d17266021e817d2a6';\n\t\treturn $api_key;\n\t}", "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->getSecurity()->generateRandomString();\n }", "protected static function key()\n {\n return env('APP_KEY');\n }", "public function generateAuthKey()\r\n {\r\n $this->auth_key = Yii::$app->getSecurity()->generateRandomString();\r\n }", "public function generateAuthKey() {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "public function generateAuthKey() {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "public function generateAuthKey() {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "public function generateAuthKey() {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "public function generateAuthKey()\n {\n return Yii::$app->security->generateRandomString();\n }", "public function generateAuthKey() {\n $this->auth_key = Yii::$app->security->generateRandomString(32);\n }", "public function generateAuthKey()\n\t{\n\t\t$this->auth_key = Yii::$app->security->generateRandomString();\n\t}", "public function generateAuthKey()\n\t{\n\t\t$this->auth_key = Yii::$app->security->generateRandomString();\n\t}", "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "public function generateAuthKey()\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "public function generateAuthKey(): void\n {\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "public function generateAuthKey()\r\n {\r\n $this->auth_key = Yii::$app->security->generateRandomString();\r\n }", "public function generateAuthKey()\r\n {\r\n $this->auth_key = Yii::$app->security->generateRandomString();\r\n }", "public function generateAuthKey()\n {\n $this->authKey = Yii::$app->getSecurity()->generateRandomKey();\n }", "public function generateAuthKey() {\n\t\t$this->txt_auth_key = Yii::$app->security->generateRandomString ();\n\t}", "public function generateAuthKey()\n {\n $this->authKey = Yii::$app->security->generateRandomString();\n }", "public function generateAuthKey()\n {\n $this->authKey = Yii::$app->security->generateRandomString();\n }", "public function generateAuthKey()\n {\n $this->authKey = Yii::$app->security->generateRandomString();\n }", "public function generateAuthKey(){\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "public function generateAuthKey()\n {\n $this->AuthKey = Yii::$app->security->generateRandomString();\n }", "public static function generateNewAuthKey()\r\n {\r\n return Yii::$app->security->generateRandomString();\r\n }", "public static function createApiKey()\n\t{\n\t\treturn Str::random(32);\n\t}", "public function generateAuthKey()\n {\n $this->token = Yii::$app->security->generateRandomString(32);\n }", "public function generateAuthKey() {\n $this->llaveAutenticacion = Yii::$app->security->generateRandomString();\n }", "public function generateKey()\n {\n return 'do.' . $this->token->user->id . '.' . preg_replace('/\\//', '.', $this->getUrl());\n }", "public function generateAuthKey()\n {\n // default length=32\n $this->auth_key = Yii::$app->security->generateRandomString();\n }", "private function get_key() {\n\t\t$key = get_option( 'github_oembed_key' );\n\t\tif ( ! $key ) {\n\t\t\t$key = md5( time() . rand( 0, 65535 ) );\n\t\t\tadd_option( 'github_oembed_key', $key, '', 'yes' );\n\t\t}\n\t\treturn $key;\n\t}", "private function _generateActivationKey()\n {\n $key = Utils::getRandomKey(32);\n return $key;\n }", "function GET_APP_ID(){\n return \"7d0df388-f064-48eb-9092-27fbbf0a438e\";\n}", "private function generateAPIAuth()\n {\n $ts = time();\n return '&ts='.$ts.'&apikey='.getenv('PUBLIC_KEY').'&hash='.md5($ts.getenv('PRIVATE_KEY').getenv('PUBLIC_KEY'));\n }", "public function generateAuthKey() {\n $this->auth_key = Security::generateRandomKey();\n }", "public function generateAuthKey()\n {\n $this->auth_key = (new Security)->generateRandomString();\n }", "abstract protected function generateKey();", "public function generateAuthKey()\n {\n $this->auth_key = Security::generateRandomKey();\n }", "public function generateAuthKey()\n {\n $this->auth_key = Security::generateRandomKey();\n }", "public function generateAuthKey()\n {\n $this->auth_key = Security::generateRandomKey();\n }", "public function generateAuthKey()\n {\n $this->auth_key = Security::generateRandomKey();\n }", "public function getApplicationKey(){\n\n $store = Mage::app()->getStore();\n\n $accessKey = $this->getStoreAccessKey($store->getId());\n return $accessKey;\n }", "function encryptAppKey($params) {\n\t\treturn strtoupper ( md5 ( strtoupper ( md5 ( $this->assemble ( $params ) ) ) . DI ()->config->get ( 'app.api.sign_token' ) ) );\n\t}", "public function generateAuthKey()\n {\n $security = new Security();\n $this->auth_key = $security->generateRandomKey();\n }", "private function getApiKey()\n\t{\n\t\treturn Mage::helper('core')->decrypt(Mage::getStoreConfig('whitePages_configuration/options/api_key'));\n\t}", "public static function generateKey()\n\t{\n\t\tToxusEncryption::$_key = Defuse\\Crypto\\Crypto::createNewRandomKey();\n\t\treturn ToxusEncryption::$_key;\n\t}", "public function generateIcsFeedKey();", "public function getApiKey()\n {\n return $this->getParameter('appid');\n }", "function generate_key()\n\t{\n\t\treturn $this->key_prefix . md5( $this->key_prefix . microtime() . uniqid() . 'teamps' );\n\t}", "private function _generate_enckey()\n {\n // encrypt user id and email so that nobody gets the user information\n $this->_user->enc_key = $this->encryption->encrypt($this->_user->id . '-' . $this->_user->email_address);\n\n // use codeigniters string helper to generate random key\n $string = random_string('alnum', 16);\n\n // encrypt it again just for nothing and then return the key.\n return $this->encryption->encrypt($string);\n }", "public function getAppSecret(): string;", "protected function key()\n {\n return \"CLIENT_SECRET\";\n }", "private function buildSigningKey(): string {\r\n return \"$this->secret&$this->userSecret\";\r\n }" ]
[ "0.7830329", "0.77915543", "0.75585383", "0.7445607", "0.7222233", "0.7200456", "0.7125401", "0.7037864", "0.7037864", "0.7027989", "0.7027989", "0.6983278", "0.6980573", "0.69767153", "0.69737273", "0.694151", "0.6902508", "0.68873215", "0.6885941", "0.68362415", "0.68250746", "0.6799454", "0.6799454", "0.6799454", "0.6799454", "0.6780449", "0.6780449", "0.6780449", "0.6780449", "0.6780449", "0.6780449", "0.6780449", "0.6780449", "0.6780449", "0.6780449", "0.6780449", "0.6780449", "0.6780449", "0.6780449", "0.6780449", "0.6780449", "0.6780449", "0.6780449", "0.6780449", "0.6780449", "0.6780449", "0.6780449", "0.6780449", "0.6780449", "0.6780449", "0.6780449", "0.6780449", "0.6780449", "0.6780449", "0.6780449", "0.6780449", "0.6757407", "0.6753752", "0.6752008", "0.6752008", "0.6750532", "0.6740991", "0.6724515", "0.6717581", "0.6717581", "0.67103404", "0.6684944", "0.6684726", "0.6684726", "0.6684726", "0.66709834", "0.6667963", "0.6632231", "0.659", "0.6573585", "0.65668356", "0.6565082", "0.6557853", "0.6539271", "0.65372497", "0.65144724", "0.6485248", "0.64653623", "0.6465109", "0.64485073", "0.64476186", "0.64476186", "0.64476186", "0.64476186", "0.6446292", "0.644601", "0.639163", "0.6377173", "0.63753736", "0.63485616", "0.63176006", "0.63071597", "0.63031465", "0.6297358", "0.6245148", "0.62341094" ]
0.0
-1