query
stringlengths 7
5.25k
| document
stringlengths 15
1.06M
| metadata
dict | negatives
listlengths 3
101
| negative_scores
listlengths 3
101
| document_score
stringlengths 3
10
| document_rank
stringclasses 102
values |
---|---|---|---|---|---|---|
A basic test example. | public function testExample()
{
$this->assertTrue(true);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function testExample()\n {\n }",
"public function test() {\n \t\n\t\tprint_r('hello stef');\n \t\n }",
"public function testBasicExample()\n {\n $this->assertTrue(true);\n }",
"public function testBasicExample()\n {\n $this->assertEquals(1, 1);\n }",
"function test_sample() {\n\n\t\t$this->assertTrue( true );\n\n\t}",
"public function testBasicExample()\n {\n $this->visit('/')\n ->see('TROLOLOLO');\n }",
"public function testBasicTest()\n {\n\n }",
"public function testExample()\n {\n dump(\"testExample\");\n $this->assertTrue(true);\n }",
"public function testExample()\n\t{\n\t\t$this->assertTrue(true);\n\t}",
"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 }",
"function testSample() {\n\t\t$this->assertTrue( true );\n\t}",
"public function test() {\n\n\t}",
"public static function test() {\r\n echo 'this is a test';\r\n }",
"public function testExample()\n {\n $this->assertTrue(true);\n \n }",
"public function testExample()\n {\n $this->assertTrue(true);\n }",
"public function testExample()\n {\n // lets make it risky to destroy the green\n }",
"public function testBasicExample()\n\t{\n \t$response = $this->call('GET', '/');\n\t\t$this->assertEquals(200, $response->getStatusCode());\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 }",
"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 testBasicExample()\n {\n $this->visit('/')\n ->see('API tester');\n }",
"public function testExample()\n {\n $response = $this->get('/api/test/');\n\n $response->assertStatus(200);\n }",
"public function testBasicExample()\n\t{\n\t\t$response = $this->call('GET', '/');\n\n\t\t$this->assertEquals(200, $response->getStatusCode());\n\t}",
"public function testBasicExample()\n {\n $this->visit('/')\n ->see('URL Notes');\n }",
"public function testBasicTest()\n {\n $response = $this->get('/test');\n\n $response->assertStatus(200);\n\n $response->assertSeeText('小粽子');\n\n }",
"function test_sampleme() {\n\t\t// Replace this with some actual testing code.\n\t\t$this->assertTrue( true );\n\t}",
"public function testBasic()\n {\n $this->assertEquals(1, 1);\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 testBasicTest()\n {\n $response = $this->get('/dangthi');\n $response->assertStatus(200);\n }",
"public function testBasicExample()\n {\n $this->visit('/')\n ->see('html');\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 testExample(): void\n {\n $this->assertTrue(true);\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 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 testExample()\n {\n $this->browse(function (Browser $browser) {\n $browser->loginAs(\"[email protected]\")\n ->visit(\"/home\");\n });\n }",
"public function testExample()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/')\n ->assertSee('React JS examples');\n });\n }",
"public function testBasicExample()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/')\n ->assertSee('Laravel');\n });\n }",
"public function testBasicExample()\n {\n $response = $this->call('GET', '/');\n\n $this->assertResponseOk();\n }",
"public function test_example()\n {\n $this->assertTrue(true);\n }",
"public function test_example()\n {\n $this->assertTrue(true);\n }",
"public function test_example()\n {\n $this->assertTrue(true);\n }",
"public function test_example()\n {\n $this->assertTrue(true);\n }",
"public function testExample()\n {\n $this->visit('/')\n ->see('WELCOME');\n }"
]
| [
"0.7977854",
"0.77753335",
"0.76435244",
"0.7610687",
"0.754975",
"0.75405073",
"0.75393844",
"0.74867696",
"0.74400353",
"0.7432722",
"0.7412231",
"0.73547494",
"0.73383486",
"0.7337478",
"0.7308627",
"0.7305436",
"0.72681046",
"0.7260569",
"0.72460294",
"0.7215908",
"0.71952444",
"0.7174572",
"0.71719897",
"0.7167066",
"0.715222",
"0.7132968",
"0.7123071",
"0.7119535",
"0.7109628",
"0.70886546",
"0.70870566",
"0.70733815",
"0.7068619",
"0.7050562",
"0.7045842",
"0.7031207",
"0.7030824",
"0.7030337",
"0.70302093",
"0.70302093",
"0.70302093",
"0.70302093",
"0.70291555"
]
| 0.7171955 | 61 |
/ numOfRows() Returns the number of rows in the result set | public function numOfRows(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getNumberOfRows();",
"public function getNumRows();",
"abstract public function getNumRows();",
"abstract public function getNumRows();",
"public abstract function row_count();",
"function RowCount() {}",
"public function numberOfRows();",
"public function numRows() : int\n\t{\n\t\treturn $this->handle->numRows($this->result);\n\t}",
"function NumRows() {\n\t\t\t$result = pg_num_rows($this->result);\n\t\t\treturn $result;\n\t\t}",
"public function nbRows();",
"public function rowCount()\n {\n return sasql_num_rows($this->result);\n }",
"public abstract function GetNumRows();",
"function getNumRows() {\r\n\t\t\tif($this->privateVars['resultset']) {\r\n\t\t\t\tif(@mysql_num_rows($this->privateVars['resultset']))\r\n\t\t\t\t\treturn mysql_num_rows($this->privateVars['resultset']);\r\n\t\t\t}\r\n\t\t\treturn -1;\r\n\t\t}",
"function getNRows() \n { \n if($this->rsQry)\n {\n return true;\n }\n else\n {\n\t\t\t return mysql_num_rows($this->rsQry);\n }\n\t\t}",
"abstract public function NumRows();",
"function nbrRows() {\n return mysqli_num_rows($this->result);\n }",
"function numRows()\n{\n\t$num = mysql_num_rows($this->res);\n\treturn $num;\n}",
"public function getNumberOfRows()\r\n {\r\n return count($this->data);\r\n }",
"public function getNumRows() {\n\t\treturn $this->_num_rows;\n\t}",
"public function numRows() {\n\t\treturn $this->sth->rowCount();\n\t}",
"public function rowCount();",
"public function rowCount();",
"public function getRowCount();",
"public function getNumRows(){\n return $this->numrows;\n }",
"public function get_row_count() {\n return 0;\n }",
"function numRows()\n\t{\n\t\treturn $this->_num_rows;\n\t}",
"public function getNumRows(){\n\t\treturn $this->instance->getNumRows();\n\t}",
"public function num_rows() {\n\t\treturn $this->GetNumRows();\n\t}",
"function numrows() {\r\n\t\treturn $this->numrows;\r\n\t}",
"function numRows() {\n return mysqli_num_rows ( $this->result );\n }",
"function getNumRows() {\r\n return mysql_num_rows($this->m_Result);\r\n }",
"public function rowCount()\n {\n return oci_num_rows($this->sth);\n }",
"public function countRows()\n {\n return count($this->rows);\n }",
"function numRows() {\n return mysqli_num_rows($this->result);\n }",
"public function getNumRows() {\n\t\t$this->_numRows = mysqli_num_rows($this->_result);\n\t\treturn $this->_numRows;\n\t}",
"function NumRows() {}",
"public function getNumberOfRows() {\n return count($this->rows);\n }",
"function num_rows() {\r\n\t\treturn $this->dbh->num_rows();\r\n\t}",
"public function GetNumberOfRows() {\n return $this->num_rows;\n }",
"function numRows()\n {\n $this->getRows();\n return $this->row_counter;\n }",
"public function num_rows() {\n\t\t\treturn $this->count();\n\t\t}",
"public function getRowsSize();",
"public function getNumRows()\n {\n \treturn $this->previouslyExecuted->num_rows;\n }",
"public function countRows(): int\n {\n $result = $this->_getResult()->numRows(); // Returns an integer on success and an \\PEAR_Error object on failure\n return is_int($result) ? $result : 0;\n }",
"public function countRows()\n {\n return $this->_result !== null ? $this->_result->rowCount() : 0;\n }",
"public function rowCount() {}",
"public function numRows() {\n\t\t$val = $this->numResults;\n\t\t$this->numResults = array();\n\t\treturn $val;\n\t}",
"function numRows( $res );",
"function NumRows() {\n\t\t\tif ($this->result) {\n\t\t\t\treturn mysql_num_rows($this->result);\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n \t}",
"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 rows(){\n return $this->rowNum(\"SELECT * FROM Anuncios\");\n }",
"public function num_rows()\r\n {\r\n return $this->num_rows;\r\n }",
"public function get_rows_count()\n\t{\n\t\treturn count($this->get_rows());\n\t}",
"public function numRows(){\n $val = $this->numResults;\n $this->numResults = array();\n return $val;\n }",
"public function getNumRows(): int\n {\n if (is_int($this->numRows)) {\n return $this->numRows;\n }\n if ($this->resultArray !== []) {\n return $this->numRows = count($this->resultArray);\n }\n if ($this->resultObject !== []) {\n return $this->numRows = count($this->resultObject);\n }\n\n return $this->numRows = count($this->getResultArray());\n }",
"function numRows($result)\n\t{\n\t\treturn mysql_num_rows($result);\n\t}",
"function num_rows()\n\t{\n\t\t$num_rows=0;\n\t\treturn !$num_rows = sqlsrv_num_rows($this->result_id) ? 0 : $num_rows;\n\t}",
"function countRows($result)\n{\n $rownum = 0;\n while (OCI_Fetch_Array($result, OCI_BOTH)) {\n $rownum++;\n }\n return $rownum;\n}",
"public function numRows() {\n\t\tif ($this->result) return mysql_num_rows($this->result);\n\t\treturn false;\n\t}",
"public function num_rows($result){\n return count($result); \n }",
"public function rows($resultset = \"NONEE\"){\n\t\tif($resultset === \"NONEE\")\n\t\t\t$resultset = $this->resultset; \n\t\treturn $resultset = $this->showErrors ? mysqli_num_rows($resultset) : @mysqli_num_rows($resultset); \n\t}",
"public function count() {\n return count($this->__rows__);\n }",
"function RecordCount() {\r\n return $this->result->numRows();\r\n }",
"public function count_rows() {\r\n return $this->db->count_all_results($this->table_name);\r\n }",
"function numRows($resource) {\n return mysql_num_rows($resource);\n }",
"function rows($sth){\n try{\n switch(dbconection::$conntype){\n case \"pdo\" : return $sth->rowCount(); break;\n case \"mysql\" : return mysql_num_rows($sth); break;\n case \"postgresql\" : return pg_num_rows ( $sth ); break;\n default : throw new Exception(\"Nenhum tipo de conexão definida.\");\n }\n }catch(Exception $e){\n printr(\"ROWS ERROR : \".$e->getMessage());\n }\n }",
"function get_row_count() {\n return $this->row_count;\n }",
"public function getRowCount() {\n return $this->statement->rowCount();\n }",
"public function numRows();",
"public function getRowsCount()\n {\n if ($this->num_rows === 0 && count($this->resultArray()) > 0) {\n $this->num_rows = count($this->resultArray());\n @oci_execute($this->stmt_id, OCI_DEFAULT);\n\n if ($this->curs_id) {\n @oci_execute($this->curs_id, OCI_DEFAULT);\n }\n }\n\n return $this->num_rows;\n }",
"public function numRows() {\r\n\t\tif ($this->hasError()) {\r\n\t\t\treturn -1;\r\n\t\t}\r\n\r\n\t\treturn mysql_num_rows($this->result);\r\n\t}",
"function Rows()\n\t{\n\t\tif(!$this->Ready(true))\n\t\t\treturn $this->Error('query.exec', __FUNCTION__);\n\t\t\t\n\t\t$q = $this->Run();\n\t\t$r = num_rows($q);\n\t\t\n\t\treturn $r;\n\t}",
"public function RowCount()\r\n\t{\r\n\t\t$this->ResetError();\r\n\t\tif( !$this->IsConnected() )\r\n\t\t{\r\n\t\t\t$this->SetError('No connection', -1);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\telseif( !$this->last_result )\r\n\t\t{\r\n\t\t\t$this->SetError('No query results exist', -1);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$result = @mysql_num_rows( $this->last_result );\r\n\t\t\tif( !$result )\r\n\t\t\t{\r\n\t\t\t\t$this->SetError();\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\treturn $result;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public function testResultNumRows()\n {\n \t$this->assertEquals(3, $this->conn->query('SELECT * FROM test')->numRows());\n \t$this->assertEquals(2, $this->conn->query('SELECT * FROM test WHERE status=\"ACTIVE\"')->numRows(), \"Active rows\");\n }",
"function num_rows() {\n\t\n\t\t$num = @mysql_num_rows($this->rstemp);\n\t\tif ($this->debug) echo \"$num records returneds <br>\\n\\n\";\t\n\t\t\n\t\treturn $num;\t\t\n\t}",
"public function getRowCount() {\n\t\treturn $this->ROW_COUNT;\n\t}",
"function numRows()\n {\n return mysql_num_rows( $this->Query_ID );\n }",
"public function getNumRows()\n\t {\n\t\tif (($this->_result instanceof mysqli_result) === false)\n\t\t {\n\t\t\treturn false;\n\t\t }\n\t\telse\n\t\t {\n\t\t\treturn $this->_result->num_rows;\n\t\t }\n\t }",
"public function total_rows();",
"function numResults() {\n\t\treturn $this->num_rows();\n\t}",
"public function numRows() {\n\t\t$q = \"SELECT COUNT(*) FROM {$this->_name}\";\n\t\t$r = @sqlite_query($q, $this->_connection);\n\t\tlist($numRows) = sqlite_fetch_array($r, SQLITE_NUM);\n\t\treturn $numRows;\n\t}",
"public function getRowCount()\n {\n return $this->statement->rowCount();\n }",
"public function GetRowCount() : INT\r\n {\r\n return($this->preparedStatement->rowCount());\r\n }",
"public function count()\n {\n return count($this->_rows);\n }",
"public function count() {\n return $this->row_count();\n }",
"public function CountRow()\n\t{\n\treturn HDB::hus()->Hcount(\"partdata\");\n\t}",
"function num_rows()\r\n {\r\n return mysql_num_rows($this->res_id);\r\n }",
"public function num_rows()\n {\n if($this->result)\n {\n $num = mysqli_num_rows($this->result);\n }\n else\n {\n $num = 0;\n }\n return $num; \n }",
"function num_rows()\r\n\t{\r\n\t\tif ( ! $this->pdo_results ) {\r\n\t\t\t$this->pdo_results = $this->result_id->fetchAll(PDO::FETCH_ASSOC);\r\n\t\t}\r\n\t\treturn sizeof($this->pdo_results);\r\n\t}",
"public function num_rows() {\n if($this->result) {\n $num = mysqli_num_rows ($this->result);\n }else {\n $num = 0;\n }\n return $num;\n }",
"public function numRows($result = false){\n $this->resCalc($result);\n return (int) mysql_num_rows($result);\n }",
"public function getNumberOfRows() {\n\n $query = $this->db->prepare(\"SELECT COUNT(*) FROM `products`\");\n\n try {\n\n $query->execute();\n $rows = $query->fetchColumn();\n\n return $rows;\n\n } catch (PDOException $e) {\n die($e->getMessage());\n }\n }",
"function numRows() {\r\n return mysql_num_rows( $this->Query_ID );\r\n }",
"public function num_rows()\n\t{\n\t\tif ( ! is_int($this->num_rows))\n\t\t{\n\t\t\tif (count($this->result_array) > 0)\n\t\t\t{\n\t\t\t\treturn $this->num_rows = count($this->result_array);\n\t\t\t}\n\t\t\telseif (count($this->result_object) > 0)\n\t\t\t{\n\t\t\t\treturn $this->num_rows = count($this->result_array);\n\t\t\t}\n\n\t\t\treturn $this->num_rows = count($this->result_array());\n\t\t}\n\n\t\treturn $this->num_rows;\n\t}",
"public function count()\n {\n return $this->rows;\n }",
"public function getRowCount() {\n return $this->Read->rowCount();\n }",
"function num_rows()\n\t{\n\t\treturn @mysqli_num_rows($this->result_id);\n\t}",
"public function getRowCount()\n {\n return $this->rowCount;\n }"
]
| [
"0.8467592",
"0.8438362",
"0.82933563",
"0.82933563",
"0.8287429",
"0.82380205",
"0.81657565",
"0.81405544",
"0.80881983",
"0.8080471",
"0.80640894",
"0.8006932",
"0.8000376",
"0.7993607",
"0.79909974",
"0.7953984",
"0.7951945",
"0.79403627",
"0.7937833",
"0.79354763",
"0.79338825",
"0.79338825",
"0.79263747",
"0.7921329",
"0.7912094",
"0.7899881",
"0.7895393",
"0.7891174",
"0.7881588",
"0.7878475",
"0.7846189",
"0.784031",
"0.7831168",
"0.7830902",
"0.7829026",
"0.7823813",
"0.7791437",
"0.77700835",
"0.77658087",
"0.77590704",
"0.77551717",
"0.7701843",
"0.7696284",
"0.7695441",
"0.7688097",
"0.7654093",
"0.7652652",
"0.7632961",
"0.7631927",
"0.76281834",
"0.76281834",
"0.76281834",
"0.76159555",
"0.76028365",
"0.7602628",
"0.75842226",
"0.7583565",
"0.75671995",
"0.7559755",
"0.7555017",
"0.75518227",
"0.7547604",
"0.75471723",
"0.75390154",
"0.75318795",
"0.7528137",
"0.7514391",
"0.7492299",
"0.74779326",
"0.74730456",
"0.74628186",
"0.7443317",
"0.74398977",
"0.74392694",
"0.74363965",
"0.7409119",
"0.74031514",
"0.7401238",
"0.73938906",
"0.73749983",
"0.73742807",
"0.7373769",
"0.7369856",
"0.7365556",
"0.7361465",
"0.7357149",
"0.73557526",
"0.735493",
"0.7353635",
"0.73526883",
"0.7345873",
"0.73403126",
"0.7335783",
"0.7333231",
"0.73283803",
"0.7320014",
"0.7314821",
"0.73126096",
"0.73077095",
"0.72974986"
]
| 0.86040455 | 0 |
/ numOfFields() Returns the number of fields in the result set | public function numOfFields(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function numFields();",
"public function numberOfFields();",
"function numFields( $res );",
"public function getFieldCount(): int\n {\n return oci_num_fields($this->resultID);\n }",
"function numFields() {\n return mysqli_num_fields($this->result);\n }",
"abstract public function getNumFields();",
"function num_fields()\n\t{\n\t\treturn sqlsrv_num_fields($this->result_id);\n\t}",
"public function num_fields() {\r\n return $this->num_fields;\r\n }",
"function num_fields() {\r\n\t\treturn $this->dbh->num_fields();\r\n\t}",
"function sql_num_fields($res)\n {\n return $res->columnCount();\n }",
"function num_fields()\r\n\t{\r\n\t\tif ( is_array($this->pdo_results) ) {\r\n\t\t\treturn sizeof($this->pdo_results[$this->pdo_index]);\r\n\t\t} else {\r\n\t\t\treturn $this->result_id->columnCount();\r\n\t\t}\r\n\t}",
"public function num_fields($result){\r\n\t\treturn $result->FieldCount();\r\n\t}",
"public function num_fields()\r\n {\r\n return $this->num_fields;\r\n }",
"function num_fields()\n\t{\n\t\treturn @mysqli_num_fields($this->result_id);\n\t}",
"public function fieldCount()\n {\n return sasql_num_fields($this->connection);\n }",
"function numFields(){\r\n return mysql_num_fields($this->Query_ID);\r\n }",
"public function getNumFields()\n {\n return count($this->fields);\n }",
"public function testResultNumFields()\n {\n \t$this->assertEquals(4, $this->conn->query('SELECT * FROM test')->numFields());\n \t$this->assertEquals(2, $this->conn->query('SELECT id, title FROM test')->numFields(), 'SELECT id, title FROM test');\n }",
"public abstract function field_count();",
"function FieldCount()\n\t{\n\t\treturn $this->_numOfFields;\n\t}",
"public abstract function GetFieldCount();",
"function numFields()\n {\n return mysql_num_fields($this->Query_ID);\n }",
"public function _pseudo_numberOfFields() {\n return count($this->data);\n }",
"public function getFieldCount()\n {\n return count($this->_fields);\n }",
"public function getFieldCount() {}",
"function num_fields()\n\t{\n\t\treturn @mysqli_num_fields($this->m_query_idD);\n\t}",
"public function getFieldsCount()\n {\n $count = @oci_num_fields($this->stmt_id);\n\n // if we used a limit we subtract it\n if ($this->limit_used) {\n $count = $count - 1;\n }\n\n return $count;\n }",
"function num_fields($query)\n\t{\n\t\treturn $query->columnCount();\n\t}",
"public function num_fields()\n {\n return @mysql_num_fields( $this->Query_ID );\n }",
"public function count()\n {\n return count($this->fields);\n }",
"public function count()\n {\n return count($this->fields);\n }",
"public function num_fields()\n\t{\n\t\t$count = @oci_num_fields($this->stmt_id);\n\n\t\t// if we used a limit we subtract it\n\t\tif ($this->limit_used)\n\t\t{\n\t\t\treturn $count - 1;\n\t\t}\n\n\t\treturn $count;\n\t}",
"function ifx_num_fields($result_id)\n{\n}",
"function num_fields($sth){\n try{\n switch(dbconection::$conntype){\n case \"pdo\" : return $sth->columnCount(); break;\n case \"mysql\" : return mysqli_num_fields($sth); break;\n case \"postgresql\" : return pg_num_fields($sth); break;\n default : throw new Exception(\"Nenhum tipo de conexão definida.\");\n }\n }catch(Exception $e){\n printr(\"NUM FIELDS ERROR : \".$e->getMessage());\n }\n }",
"public function numFields()\n\t{\n\t\t// verify that a query was run\n\t\tif (is_resource($this->_results) === false)\n\t\t{\n\t\t\tthrow new DatabaseException('',\n\t\t\t\tDatabaseException::QUERY_NOT_RUN);\n\t\t}\n\n\t\t// check connection\n\t\t$this->_checkConnection();\n\n\t\t// get number of fields\n\t\treturn mysql_num_fields($this->_results);\n\t}",
"function getNCols() \n {\n if($this->rsQry)\n {\n return true;\n }\n else\n {\n\t\t\t return mysql_num_fields($this->rsQry);\n }\n\t\t}",
"public function countFields($result = false)\r\n\t{\r\n\t\t$this->resCalc($result);\r\n\t\treturn (int) mysqli_num_fields($result);\r\n\t}",
"public function numFields($result = false){\n $this->resCalc($result);\n return (int) mysql_num_fields($result);\n }",
"function db_num_fields($qid) {\n\n\treturn mysqli_num_fields($qid);\n}",
"public function getFieldsNum($result)\n {\n return mysqli_num_fields($result);\n }",
"abstract public function getFieldCount(): int;",
"public function columnCount() {\n\t\tif( !$this->_result ) return 0;\n\t\treturn mssql_num_fields($this->_result);\n\t}",
"public function getFieldsNum($result)\n {\n return $result->columnCount();\n }",
"public function num_fields( $qHandle )\r\n\t{\r\n\t\treturn $qHandle->Fields->Count;\r\n\t}",
"public function getNumberColumns()\n {\n return mysqli_num_fields($this->resulset);\n }",
"public function columnCount()\n {\n return sasql_num_fields($this->connection);\n }",
"function GetColCount()\n {\n return mysqli_num_fields($this->rs);\n }",
"public function num_fields( $qHandle )\r\n\t{\r\n\t\treturn num_fields($qHandle);\r\n\t}",
"public function columnCount()\n {\n return oci_num_fields($this->sth);\n }",
"public function num_fields( $qHandle )\r\n\t{\r\n\t\treturn @mssql_num_fields( $qHandle );\r\n\t}",
"public function getNumLazyLoadFields()\n {\n $count = 0;\n foreach ($this->fields as $col) {\n if ($col->isLazyLoad()) {\n $count++;\n }\n }\n\n return $count;\n }",
"public function getFieldCount(): int {\n $record = $this->readRecord();\n // ensure that the header can be read again after field count\n $this->headerRead = false;\n $this->rewind();\n\n return null === $record ? 0 : count($record);\n }",
"function pdo_num_fields($stmt) {\r\n return pdo_stmt($stmt)->columnCount();\r\n }",
"public function fetchFields();",
"public function getNumFields($statement)\r\n\t{\r\n\t\tif(!is_resource($statement))\r\n\t\t{\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn mssql_num_fields($statement);\r\n\t\t}\r\n\t}",
"function nf() \n \t{\n \t\treturn @mysql_num_fields($this->queryId);\n \t}",
"public function get_fields($count = false) {\n \n $return = '';\n \n $i = 0;\n foreach($this->get('fields') as $field) \n {\n if($count === true AND $i == 0) \n {\n $return .= 'SQL_CALC_FOUND_ROWS(`' . $field->name . '`), ';\n $i = 1;\n } \n else\n {\n $return .= $field->name . ', ';\n }\n }\n \n return substr($return, 0, -2);\n \n }",
"function RecordCount() {\r\n return $this->result->numRows();\r\n }",
"function odbc_field_len($result_id, $field_number)\n{\n}",
"public function getNumberOfRecords() {}",
"function numCols($result)\n {\n $this->getRows();\n return(count(array_keys($this->_record)));\n }",
"function numFields($query = 0) {\n return intval(@mysql_num_fields($query ? $query : $this->query));\n }",
"public static function getFieldsInRow(): int\n {\n return self::$fieldsInRow;\n }",
"public function NUM_FIELD($SQL_Resource)\n {\n if (extension_loaded(\"sqlsrv\") == false)\n {\n return false;\n }\n return @sqlsrv_num_fields($SQL_Resource);\n }",
"public function fields();",
"public function fields();",
"public function fields();",
"public function fields();",
"public function fields();",
"public function numOfRows();",
"public function getColumnsCount($result_set)\n\t{\n\t\treturn $result_set->field_count;\n\t}",
"public function count(){\n\t\t$this->initRecordSet();\n\t\treturn $this->recordSetSize;\n\t}",
"public function columnCount();",
"public function count()\n\t{\n\t\treturn count($this->columns);\n\t}",
"public function getFields();",
"public function getFields();",
"public function getFields();",
"public function getFields();",
"public function getFields();",
"public function getFields();",
"public abstract function getColumnsCount($result_set);",
"abstract public function fields();",
"public function fetch_fields() {}",
"function getDataCount($table='',$selFields = '*',$where='') \t{\n\t\t$query \t= 'SELECT COUNT('.$selFields.') AS cnt FROM ' . $this->tablePrefix . $table .' ' .$where;\t\t\t\t \n \t\t\n \t\treturn $this->fetchOne($this->execute($query));\n\t}",
"function ae_check_db_fields( ) {\n\n $count = 0;\n $cols = ae_get_db_fields();\n $foo = ae_db_queries();\n if( $cols ){\n foreach($cols as $col) {\n\n if( isset($foo[$col->COLUMN_NAME]) ) {\n\n if(\n $col->DATA_TYPE != $foo[$col->COLUMN_NAME]['type'] ||\n $col->CHARACTER_MAXIMUM_LENGTH < $foo[$col->COLUMN_NAME]['numb']\n ) {\n $count++;\n }\n }\n }\n }\n\n return $count;\n}",
"public function count() {\n return count($this->__rows__);\n }",
"public function count($type = 'row')\n {\n if ($type == 'row') {\n return sasql_num_rows($this->result);\n }\n\n return sasql_num_fields($this->connection);\n }",
"public function getFields() {}",
"public function getFields() {}",
"public function getFields() {}",
"function getFields();",
"public function numberOfRecords(): int\n {\n return $this->number_of_records;\n }",
"abstract public function getColumnsCount();",
"function RecordCount()\n\t{\n\t\treturn $this->_numOfRows;\n\t}",
"function RowCount() {}",
"function CountOptionalFields()\n {\n $count = 0;\n for ($i = 1; $i <= 20; $i++) {\n $field = 'optional_field_' . $i;\n if ($this->fields->$field->is_enabled) {\n $count = $i;\n }\n }\n\n $this->max_optional_fields = $count;\n }",
"public function getAllFields();",
"function countProducts() {\r\n global $tableProducts;\r\n\r\n return countFields($tableProducts);\r\n}",
"public function getCountRowsOfTable ($tableName,$fieldname='*');",
"public function hasFields(){\n return $this->_has(1);\n }"
]
| [
"0.8743242",
"0.85329366",
"0.8400545",
"0.82697624",
"0.826751",
"0.8245084",
"0.8190738",
"0.8164909",
"0.8163658",
"0.81093764",
"0.8102634",
"0.80893534",
"0.80643666",
"0.8063612",
"0.8055661",
"0.79489857",
"0.7933238",
"0.7895036",
"0.7879514",
"0.78679794",
"0.78632665",
"0.7844214",
"0.77854216",
"0.777894",
"0.77408445",
"0.7739102",
"0.7661968",
"0.7637185",
"0.763514",
"0.76031715",
"0.76031715",
"0.7594559",
"0.7589727",
"0.7494704",
"0.7443602",
"0.74256855",
"0.7424581",
"0.7405033",
"0.7278648",
"0.72758883",
"0.7263346",
"0.7252224",
"0.7243103",
"0.71801764",
"0.7134492",
"0.71013725",
"0.7011202",
"0.7009239",
"0.70000935",
"0.69490325",
"0.6931952",
"0.6923812",
"0.69207263",
"0.68762153",
"0.679456",
"0.6766172",
"0.67593044",
"0.6727189",
"0.672182",
"0.6661999",
"0.6650724",
"0.6623873",
"0.6594919",
"0.6545653",
"0.6531825",
"0.6531825",
"0.6531825",
"0.6531825",
"0.6531825",
"0.65181446",
"0.6500642",
"0.6479169",
"0.64661306",
"0.6417172",
"0.64157575",
"0.64157575",
"0.64157575",
"0.64157575",
"0.64157575",
"0.64157575",
"0.6397371",
"0.63800716",
"0.6372691",
"0.6353065",
"0.6340523",
"0.63240325",
"0.6318031",
"0.63173604",
"0.63173604",
"0.63173604",
"0.6313218",
"0.6308736",
"0.62988794",
"0.62882775",
"0.6252904",
"0.6249695",
"0.6246585",
"0.62355477",
"0.61913157",
"0.61900353"
]
| 0.8552307 | 1 |
/ fetchField() Returns the next field from the result set as an object, or NULL if empty. | public function fetchField(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function FetchField($fieldOffset = -1) \n\t{\n\t\tif ($fieldOffset != -1) {\n\t\t\t$this->fieldmeta_offset = $fieldOffset;\n\t\t}\n\t\t$fieldObject = false;\n\t\t$i=0;\n\t\tforeach($this->fieldmeta as $o) {\n\t\t\tif($i==$this->fieldmeta_offset) {\n\t\t\t\t$fieldObject = $o;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t$i++;\n\t\t}\n\t\t$this->fieldmeta_offset++;\n\t\treturn $fieldObject;\n\t}",
"public abstract function FetchField();",
"function FetchField($off = 0)\n\t{\n\n\t\t$o= new ADOFieldObject();\n\t\t$o->name = @pg_field_name($this->_queryID,$off);\n\t\t$o->type = @pg_field_type($this->_queryID,$off);\n\t\t$o->max_length = @pg_fieldsize($this->_queryID,$off);\n\t\treturn $o;\n\t}",
"public function fetchField($result = false, $offset = 0){\n $this->resCalc($result);\n return mysql_fetch_field($result, $offset);\n }",
"function getNextField()\n {\n if ( $this->first_field )\n {\n $this->first_field = false;\n }\n else\n {\n next( $this->mapping ); // nirvana\n }\n\n $this->current_field = current( $this->mapping );\n return $this->current_field;\n }",
"public function fetchRecord()\n {\n $ret = $this->readCurrentRecord();\n if ($ret !== false) {\n $this->next();\n }\n return $ret;\n }",
"function getNextField()\r\n\t{\r\n\t\tif( $this->first_field )\r\n\t\t{\r\n\t\t\t$this->first_field = false;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tnext( $this->mapping ); // nirvana\r\n\t\t}\r\n\t\t\r\n\t\treturn current( $this->mapping );\r\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 static function fetchValue( $rRes, $mField = 0 ) {\n\t\tif ( is_resource( $rRes ) ) {\n\t\t\tmysql_data_seek( $rRes, 0 );\t\t\t// reset pointer\n\t\t\t$aRes = mysql_fetch_array( $rRes );\n\t\t\treturn $aRes[ $mField ];\n\t\t}\n\t\treturn NULL;\n\t}",
"public function fetchField(){\n $this->debugBacktrace();\n $this->fetchType = \"fetch_field\";\n return $this;\n }",
"function _fetch_object()\r\n\t{\r\n\t\tif ( is_array($this->pdo_results) ) {\r\n\t\t\t$i = $this->pdo_index;\r\n\t\t\t$this->pdo_index++;\r\n\t\t\tif ( isset($this->pdo_results[$i])) {\r\n\t\t\t\t$back = '';\r\n\t\t\t\tforeach ( $this->pdo_results[$i] as $key => $val ) {\r\n\t\t\t\t\t$back->$key = $val;\r\n\t\t\t\t}\r\n\t\t\t\treturn $back;\r\n\t\t\t}\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn $this->result_id->fetch(PDO::FETCH_OBJ);\r\n\t}",
"function sql_fetch_field($res,$offset = 0)\n {\n $results = array();\n $obj = NULL;\n $results = $res->getColumnMeta($offset);\n foreach($results as $key=>$value) {\n $obj->$key = $value;\n }\n return $obj;\n }",
"function f($field) {\n\t\treturn($this->fetchfield($field));\n\t}",
"function getNextRecord() { return mysql_fetch_array( $this->recordSet ); }",
"function GetField($field=0){\n\t\t\treturn @mysql_result($this->result,0,$field);\n\t\t}",
"public function fetchOne() {\r\n\t\t$data = $this->fetch();\r\n\r\n\t\t$this->freeResult();\r\n\r\n\t\treturn $data ? current($data) : null;\r\n\t}",
"function FetchNextObj() {}",
"public function field($fieldName = '') {\n if (!empty($fieldName)) {\n $this->currentField = $fieldName;\n }\n\n if (isset($this->fields[$this->currentField])) {\n return $this->fields[$this->currentField];\n } else {\n return null;\n }\n }",
"function fetch() {\n\t\t$this->i++;\n\t\treturn $this->result->fetch_object($this->class_name);\n\t}",
"function db_fetch_next_row( $fetch_mode = DB_FETCHMODE_ASSOC ) {\n\n $this->pm_clear_cols();\n if( ! is_object( $this->dataset_obj )) return NULL;\n\n $this->curr_row_array = $this->dataset_obj->fetchRow( $fetch_mode );\n $this->pm_die_if_error( 'curr_row_array' );\n\n if( is_array( $this->curr_row_array )) { # Some data was retrieved\n $this->curr_rowno++;\n $this->cols_in_curr_row = count( $this->curr_row_array );\n }\n\n return $this->curr_row_array;\n }",
"public function getNextRow() {\n $row = mssql_fetch_object($this->result);\n\n // Might be totally out of data, or just out of this batch - request another\n // batch and see\n if (!is_object($row)) {\n mssql_fetch_batch($this->result);\n $row = mssql_fetch_object($this->result);\n }\n if (is_object($row)) {\n return $row;\n }\n else {\n return NULL;\n }\n }",
"function next_record() {\r\n\t\treturn $this->dbh->next_record();\r\n\t}",
"function field($dsstr)\n{\n\t$args = func_get_args();\n\t$sql = $this->getSelectSql($dsstr, $args);\n\t$this->setLimit(1);\n\t$res = $this->query($sql);\n\t$data = $this->drv->fetch($res, 'r');\n\tif (!$data) return null;\n\treturn $data[0];\n}",
"public function next () {\n next($this->__fields);\n }",
"public function next()\n\t{\n\t\tif (is_a($this->rs,'iterator'))\n\t\t{\n\t\t\treturn $this->rs->next();\n\t\t}\n\t}",
"public function fetch_value($name=null)\n {\n $row = $this->fetch_one();\n\n if (!$row->is_empty())\n {\n if (!is_null($name))\n return $row->$name;\n\n return $row->values()->get(0);\n }\n\n return null;\n }",
"function nextResult()\n {\n return $this->dbh->nextResult($this->result);\n }",
"public function next()\n\t{\n\t\tif ( $this->_result instanceof MySQLi_Result )\n\t\t\treturn $this->_result->fetch_object();\n\t\treturn false;\n\t}",
"function next_record()\n\t{\n\t\t/* goto next record */\n\t\t$this->m_record = @mysqli_fetch_array($this->m_query_id, MYSQLI_ASSOC|atkconfig(\"mysqlfetchmode\"));\n\t\t$this->m_row++;\n\t\t$this->m_errno = mysqli_errno($this->m_link_id);\n\t\t$this->m_error = mysqli_error($this->m_link_id);\n\n\t\t/* are we there? */\n\t\t$result = is_array($this->m_record);\n\t\tif (!$result && $this->m_auto_free)\n\t\t{\n\t\t\t@mysqli_free_result($this->m_query_id);\n\t\t\t$this->m_query_id = 0;\n\t\t}\n\n\t\t/* return result */\n\t\treturn $result;\n\t}",
"#[\\ReturnTypeWillChange]\n public function next()\n {\n $value = $this->_skipNext ? current($this->_data) : next($this->_data);\n $this->_skipNext = false;\n return key($this->_data) !== null ? $value : null;\n }",
"public function Get ($field) {\n if ($this->structuredResult === null) return null;\n foreach ($this->structuredResult as $info) {\n if ($info['field'] == $field) {\n return $info['data'];\n }\n }\n return null;\n }",
"function getValueFromField()\n {\n return $this->current_row[ key( $this->mapping ) ];\n }",
"public function get_field( $query , $i = 0, $j = 0 ) {\n\t\t$result = $this->query( $query );\n\n\t\tif ( empty( $this->_last_result ) )\n\t\t\treturn null;\n\n\t\tif ( ! isset( $this->_last_result[ $i ] ) )\n\t\t\treturn null;\n\n\t\t$fields = array_values( get_object_vars( $this->_last_result[ $i ] ) );\n\n\t\tif ( ! isset( $fields[ $j ] ) )\n\t\t\treturn null;\n\n\t\treturn $fields[ $j ];\n\t}",
"public function fetch_one()\n {\n if (!$this->limit) $this->limit(1);\n $rows = $this->fetch_all();\n return count($rows) ? array_shift($rows): null;\n }",
"function getByField ( $field,$value){\n\t\t $result=$this->fetchRow(\"$field= '$value' \"); //order by id?\n\t\t if($result==null)\n\t\t\t return;\n\t\t if(is_array($result))\n\t\t\t return $result[0];\n\t\t return $result;\n\t}",
"public function fetch_field($name=null)\n {\n $out = array();\n foreach ($this->fetch_all() as $row)\n $out[] = $row[is_null($name) ? $row->keys()->get(0): $name];\n return $out;\n }",
"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 fetchObject()\n {\n return sasql_fetch_object($this->result);\n }",
"function getValueFromField()\r\n\t{\r\n\t\treturn $this->row[ key( $this->mapping ) ];\r\n\t}",
"public function fetch_row(&$result){\r\n\t\t$ADODB_FETCH_MODE = ADODB_FETCH_NUM;\r\n\t\tif(!$result->EOF){\r\n\t\t \t$rs = $result->fields;\r\n\t\t \t$result->MoveNext(); \r\n\t\t \treturn $rs;\r\n\t\t}\r\n\t}",
"public function FetchObject()\n\t{\n\t\tif (!$this->Result){\t//check if we have a valid result set\n\t\t\treturn false;\n\t\t}\n\n\t\t$row = mysqli_fetch_object($this->Result);\n\n\t\tif (!$row){\t//if last row, free the result set\n\t\t\tmysqli_free_result($this->Result);\n\t\t}\n\n\t\treturn $row;\n\t}",
"function getField ( $name )\n\t{\n\t\tif ( ake ( $name , $this->_fields ) )\n\t\t{\n\t\t\treturn $this->_fields[$name] ;\n\t\t}\n\t\treturn null ;\n\t}",
"public function fetchFields();",
"public function fetch()\n {\n return mysql_fetch_object($this->res);\n }",
"public function selectField($a_szQuery, $a_szField) {\n\t\t$oResult = $this->dbquery($a_szQuery);\n\t\tif($this->numRows($oResult) == 0) return null;\n\t\t$aryData = $this->fetchArray($oResult);\n\t\t$this->freeResult($oResult);\n\t\treturn $aryData[$a_szField];\n\t}",
"public function next(){\n\t\tif ($this->_nextFlag)\n\t\t\treturn ($this->next != false);\n\t\t$this->_nextFlag = true;\n\t\tif ($this->type == self::TYPE_ROW)\n\t\t\t$this->next = db::fetch_row($this->resultSet);\n\t\telseif($this->type == self::TYPE_ASSOC)\n\t\t\t$this->next = db::fetch_assoc($this->resultSet);\n\t\telseif($this->type == self::TYPE_ARRAY)\n\t\t\t$this->next = db::fetch_array($this->resultSet);\n\t\t//do not return the actual object, but simply return a boolean\n\t\tif ($this->next){\n\t\t\t$this->counter++;\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}",
"function _fetch_object()\n\t{\n\t\treturn mysqli_fetch_object($this->result_id);\n\t}",
"private function queryFetchAsValue(mysqli_result $result)\n\t{\n\t\t$element = $result->fetch_row();\n\t\treturn $element ? $element[$result->field_count - 1] : null;\n\t}",
"public function fetch_fields() {}",
"public function getOne() {\n $prepareStatement = $this->pdo->prepare($this->sql);\n $prepareStatement->execute($this->param);\n\n Connection::disconnect();\n\n if ($this->fetch !== PDO::FETCH_CLASS) {\n if (1 == $prepareStatement->columnCount())\n return $prepareStatement->fetch(PDO::FETCH_COLUMN);\n return $prepareStatement->fetch($this->fetch);\n }\n\n return $prepareStatement->fetchObject();\n }",
"public function first(){\n $this->execute();\n if(count($this->results) > 0){\n return current($this->results);\n } else {\n return null;\n }\n }",
"function FetchObject() {\n\t\t\treturn pg_fetch_object($this->result);\n\t\t}",
"public function getField($fieldName)\n {\n return isset($this->fields[$fieldName]) ? $this->fields[$fieldName] : null;\n }",
"function next_record($Type = MYSQLI_BOTH, $Escape = true) {\n\t\tif ($this->LinkID) {\n\t\t\t$this->Record = mysqli_fetch_array($this->QueryID, $Type);\n\t\t\t$this->Row++;\n\t\t\tif (!is_array($this->Record)) {\n\t\t\t\t$this->QueryID = false;\n\t\t\t} elseif ($Escape !== false) {\n\t\t\t\t$this->Record = Misc::display_array($this->Record, $Escape);\n\t\t\t}\n\t\t\treturn $this->Record;\n\t\t}\n\t}",
"public function getField($field)\n\t{\n//TODO call query\n//\t\tOLIVDatabase\n\t\tif ($this->sqlResource)\n\t\t{\n\t\t\treturn mysql_fetch_array($this->sqlResource);\n\t\t}\n\t\treturn FALSE;\n\t}",
"function mysqli_result($result, $row, $field = 0) {\r\n $result->data_seek($row);\r\n // Fetch result array\r\n $data = $result->fetch_array();\r\n \r\n return $data[$field];\r\n}",
"public function next() {\n $this->currentRow = $this->result->fetchObject();\n $this->currentKey = array();\n if (!is_object($this->currentRow)) {\n $this->currentRow = NULL;\n }\n else {\n foreach ($this->sourceKeyMap as $map_field) {\n $this->currentKey[$map_field] = $this->currentRow->$map_field;\n // Leave only destination fields\n unset($this->currentRow->$map_field);\n }\n }\n }",
"public function GetNextRecord($get_assoc=false)\n\t{\n\t\tif ($this->dbresult != false) {\n\t\t\treturn db_get_next_record($this->dbresult, $get_assoc);\n\t\t} else {\n\t\t\t$this->error = -1;\n\t\t\treturn false;\n\t\t}\n\t}",
"public function fetch_one($sql) {\n\t\t\tglobal $db;\n\t\t\t$result = mysqli_query($db,$sql);\n\t\t\treturn mysqli_fetch_object($result);\n\t\t}",
"public function current()\n\t{\n\t\tif (is_a($this->rs,'iterator'))\n\t\t{\n\t\t\t$data = $this->rs->current();\n\n\t\t\treturn $this->so_sql->data2db($data);\n\t\t}\n\t\treturn null;\n\t}",
"public function getOne()\n\t{\n\t\tif ($this->count() > 0)\n\t\t{\n\t\t\t$this->seek(0);\n\t\t\treturn $this->current();\n\t\t} else\n\t\t\treturn null;\n\t}",
"function getFirstRecord() {\n mysql_data_seek( $this->recordSet, 0 );\n return mysql_fetch_array( $this->recordSet ); }",
"public function loadNextRow()\n {\n $this->connect();\n\n // Execute the query and get the result set cursor.\n if (!$this->executed) {\n if (!($this->execute())) {\n return $this->errorNum ? null : false;\n }\n }\n\n // Get the next row from the result set as an object of type $class.\n if ($row = $this->fetchArray()) {\n return $row;\n }\n\n // Free up system resources and return.\n $this->freeResult();\n\n return false;\n }",
"function get_field( $field, $query = null ){\r\n\t\tif( $row = $this->get_row( $query ) and isset( $row[$field] ) )\r\n\t\t\treturn $row[$field];\r\n\r\n\t}",
"function moveNext() {\r\n\r\n $row = $this->result->fetchRow( MDB2_FETCHMODE_ASSOC );\r\n $this->EOF = !is_array( $row );\r\n $this->fields = $row;\r\n\r\n }",
"public function fetch_object() {\n $row = $this->fetch_array();\n return $row ? (object) $row : false;\n }",
"function _fetch_object()\n\t{\n\t\treturn sqlsrv_fetch_object($this->result_id);\n\t}",
"function nextRecord()\n {\n @ $this->Record = mysql_fetch_array( $this->Query_ID );\n $this->Row += 1;\n $this->Errno = mysql_errno();\n $this->Error = mysql_error();\n $stat = is_array( $this->Record );\n if( !$stat )\n {\n @ mysql_free_result( $this->Query_ID );\n $this->Query_ID = 0;\n }\n return $stat;\n }",
"function nextRecord(){\r\n @ $this->Record = mysql_fetch_assoc( $this->Query_ID );\r\n $this->Row += 1;\r\n $this->Errno = mysql_errno();\r\n $this->Error = mysql_error();\r\n $stat = is_array( $this->Record );\r\n if( !$stat ) {\r\n @ mysql_free_result( $this->Query_ID );\r\n $this->Query_ID = 0;\r\n }\r\n return $stat;\r\n }",
"function db_get_field($query)\n{\n\t$args = func_get_args();\n\n\tif ($_result = call_user_func_array('db_query', $args)) {\n\t\n\t\t$result = driver_db_fetch_row($_result);\n\n\t\tdriver_db_free_result($_result);\n\n\t}\n\n\treturn (isset($result) && is_array($result)) ? $result[0] : NULL;\n}",
"#[@test]\n public function queryAndNextWithField() {\n $q= $this->db()->query('select 1 as foo');\n $this->assertInstanceOf('rdbms.ResultSet', $q);\n $this->assertEquals(1, $q->next('foo'));\n }",
"protected function getOne()\n {\n $statement = $this->connection->query($this->sqlToString());\n return $this->fetch($statement);\n }",
"public function fetch($fieldName = false) {\r\n\t\tif ($fieldName) {\r\n\t\t\tif (isset($this->_postData[$fieldName]))\r\n\t\t\treturn $this->_postData[$fieldName];\r\n\t\t\t\r\n\t\t\telse\r\n\t\t\treturn false;\r\n\t\t} else {\r\n\t\t\treturn $this->_postData;\r\n\t\t}\r\n\t\t\r\n\t}",
"public function loadNextAssoc()\n {\n $this->connect();\n\n // Execute the query and get the result set cursor.\n if (!$this->executed) {\n if (!($this->execute())) {\n return $this->errorNum ? null : false;\n }\n }\n\n // Get the next row from the result set as an object of type $class.\n if ($row = $this->fetchAssoc()) {\n return $row;\n }\n\n // Free up system resources and return.\n $this->freeResult();\n\n return false;\n }",
"public function fetch( $key ) {\n return isset($this->data[$key]) ? $this->data[$key] : NULL;\n }",
"public function fetchValue($field, $from = null) {\r\n\t\treturn $this->q($from)->fields($field)->get('fetchValue');\r\n\t}",
"function nextRecord() \n \t{\n \t\t$this->record = @mysql_fetch_array($this->queryId);\n\t\t++$this->row;\n\n\t\t$stat = is_array($this->record);\n \t\tif ( !$stat )\n \t\t{\n \t\t\t@mysql_free_result($this->Query_ID);\n \t\t\t$this->queryId = 0;\n \t\t}\n \t\t\n \t\treturn $stat;\n \t}",
"public function _getFieldInData($fieldName)\n {\n if (!isset($this->aData[$fieldName]))\n {\n return null;\n }\n\n return $this->aData[$fieldName];\n }",
"public function get_first_instance($fields, $rows) {\n\n if (empty($rows)) {\n return NULL;\n }\n\n foreach ($rows[0]['#rows'] as $row) {\n $entity = $row['#row']->_entity;\n\n foreach ($fields as $field) {\n if ($entity->hasField($field)) {\n $value = $entity->get($field)->getValue();\n\n if (!empty($value)) {\n return $value;\n }\n }\n }\n }\n return NULL;\n }",
"public function getField($fieldName)\n {\n if (!isset($this->fields[$fieldName])) {\n return null;\n }\n\n return $this->fields[$fieldName];\n }",
"public function nextval() {\n\t\t\tif ($this->database->isConnected()) {\n\t\t\t\t$query = \"SELECT \" . $this->schema . \".\" . $this->name . \".NEXTVAL FROM DUAL\";\n\t\t\t\t$stid = $this->database->executeRead($query);\n\t\t\t\t$results = $this->database->getResults($stid);\n\t\t\t\tforeach ($results as $row) {\n\t\t\t\t\treturn $row['NEXTVAL'];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}",
"protected function fetch() \n {\n $record = $this->statement->fetch(PDO::FETCH_ASSOC);\n\n if($record === false) {\n return false;\n }\n\n foreach($this->mappers as $mapper) {\n $record = $mapper($record);\n }\n\n return $record;\n }",
"function get_val($id, $field){\n if($id){\n $q = sql_query(\"SELECT `$field` FROM `entities` WHERE `ID` = '$id'\");\n $r = mysqli_fetch_row($q);\n mysqli_free_result($q);\n return $r[0];\n }\n else{\n return \"\";\n }\n}",
"function getFieldValue($field);",
"public function fetch() {\n\t\t$this->checkResultSet();\n\t\treturn $this->fetchRowAssoc();\n\t}",
"public function get_field(/* .... */)\n {\n return $this->_field;\n }",
"public function fetchSingle() {\n $this->execute();\n return $this->stmt->fetch(PDO::FETCH_OBJ);\n }",
"function &getField($name){\n\t\t$fields =& $this->fields();\n\t\tif ( !isset($fields[$name]) ){\n\t\t\treturn null;\n\t\t} else {\n\t\t\treturn $fields[$name];\n\t\t}\n\t}",
"function mysqli_result($result, $row, $field = 0) {\n $result->data_seek($row);\n // Fetch result array\n $data = $result->fetch_array();\n \n return $data[$field];\n }",
"function getFieldValue($fieldName){\n\n\t\tif( isset($this->record[$fieldName]) ) return $this->record[$fieldName];\n\t\telse return false;\n\n\t}",
"public function findFirst() {\r\n\t\t$aux = $this->fetchAllPg(1);\r\n\t\tif($aux == null)\r\n\t\t\treturn null;\r\n\t\treturn $aux[0];\r\n\t}",
"public function fetchOrException()\n {\n $record = $this->fetch();\n if ($record === null) {\n throw new NoRecordException;\n }\n return $record;\n }",
"protected function _fetchObject()\n {\n $id = ($this->curs_id) ? $this->curs_id : $this->stmt_id;\n return @oci_fetch_object($id);\n }",
"public function fetch()\n {\n $cur = current($this->__reader->stack[$this->__reader->depth]);\n $nam = key($this->__reader->stack[$this->__reader->depth]);\n if ($cur !== false and isset($nam[0]) and !ord($nam[0])) {\n next($this->__reader->stack[$this->__reader->depth]);\n return $this->fetch();\n }\n\n if ($cur === false and $this->__reader->depth == 0) {\n $this->close();\n return false;\n }\n elseif ($cur === false and $this->__reader->depth > 0) {\n array_pop($this->__reader->stack);\n array_pop($this->__reader->names);\n array_pop($this->__reader->types);\n --$this->__reader->depth;\n return $this->fetch();\n }\n $bu = implode($this->__reader->names, ':');\n $r = self::factory()\n ->set('name', $nam) \n ->set('baseURI', $bu)\n ->set('uri', ltrim(rtrim($bu, ':').':'.$nam, ':'))\n ->set('value', $cur)\n ->set('index', $this->__reader->position++)\n ->set('type', $this->_getcase($cur))\n ->set('depth', $this->__reader->depth);\n\n next($this->__reader->stack[$this->__reader->depth]);\n if ($r->type === $this->__reader->types[$this->__reader->depth] or in_array($r->type, $this->__reader->allowed_types)) {\n ++$this->__reader->depth;\n $this->__reader->stack[$this->__reader->depth] =& $cur;\n reset($this->__reader->stack[$this->__reader->depth]);\n $this->__reader->types[$this->__reader->depth] = $r->type;\n $this->__reader->names[$this->__reader->depth] = $r->name;\n return $this->fetch();\n }\n// return $r;\n return $cur;\n }",
"public function next()\n\t{\n\t\t$this->pointer++;\n\t\t$this->row = $this->result->get($this->pointer);\n\t}",
"function pdo_fetch_field($stmt, $column_id) {\r\n \r\n // map meta types to what mysql_fetch_field returned\r\n $native_map = array(\r\n \"BOOL\"=>\"bool\", \"NULL\"=>\"null\", \"BLOB\"=>\"blob\",\r\n \"LONG\"=>\"int\", \"LONGLONG\"=>\"int\", \"BIT\"=>\"int\", \"ENUM\"=>\"int\", \"DECIMAL\"=>\"int\",\r\n \"VAR_STRING\"=>\"string\", \"STRING\"=>\"string\", \"VARCHAR\"=>\"string\",\r\n \"YEAR\"=>\"string\",\r\n );\r\n $pdo_map = array(\r\n PDO::PARAM_STR => \"string\",\r\n PDO::PARAM_INT => \"int\",\r\n PDO::PARAM_BOOL => \"bool\",\r\n PDO::PARAM_NULL => \"null\",\r\n PDO::PARAM_LOB => \"blob\",\r\n );\r\n\r\n // PDO meta field set (no conflicting locals, so extract() will do)\r\n extract(pdo_stmt($stmt)->getColumnMeta($column_id));\r\n \r\n // convert format\r\n return (object)array(\r\n \"name\" => $name,\r\n \"table\" => $table,\r\n \"def\" => NULL, // undocumented\r\n \"max_length\" => $len, // PDO reads from ->max_len, but doesn't match up with libmysqls results\r\n \"not_null\" => in_array(\"not_null\", $flags),\r\n \"primary_key\" => in_array(\"primary_key\", $flags),\r\n \"unique_key\" => in_array(\"unique_key\", $flags),\r\n \"multiple_key\" => in_array(\"multiple_key\", $flags),\r\n \"numeric\" => $native_type == \"LONG\",\r\n \"blob\" => $native_type == \"BLOB\",\r\n \"type\" => isset($native_type) ? $native_map[$native_type] : $pdo_map[$pdo_type],\r\n \"unsigned\" => in_array(\"unsigned\", $flags),\r\n \"zerofill\" => in_array(\"zerofill\", $flags),\r\n );\r\n }",
"public function next()\r\n\t{\r\n\t\tif(!$this->hasNext()) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t$size = $this->nextRecordLength();\r\n\t\tif($size < 1) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t$raw_content = $this->readBits($size);\r\n\t\tif(is_null($raw_content)) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t$index = $this->applyRules($raw_content, $size);\r\n\t}",
"public function next()\n {\n $this->current = ($result = ldap_next_entry($this->handle, $this->current())) ? $result : null;\n }",
"public function next($asArray = false)\n {\n // Advance pointer\n $this->pointer ++;\n $row = ($asArray ? mysql_fetch_array($this->result) : mysql_fetch_object($this->result));\n \n return $row;\n }",
"public function get_field($row, $col) {\n if ($row >= 0 && $row < $this->data['num_rows'] && $col >= 0 && $col < $this->data['num_fields']) {\n return $this->lines[$row][$col];\n } else {\n return null;\n }\n }"
]
| [
"0.7496154",
"0.675565",
"0.6707491",
"0.6675682",
"0.65372694",
"0.64107037",
"0.63174355",
"0.621415",
"0.61930716",
"0.6185163",
"0.6147772",
"0.6116754",
"0.6105757",
"0.6096552",
"0.60923636",
"0.60837185",
"0.6058451",
"0.59946454",
"0.59524673",
"0.5939563",
"0.592966",
"0.59019506",
"0.5894681",
"0.58775145",
"0.58714324",
"0.58213645",
"0.58029705",
"0.57832056",
"0.57828856",
"0.57717335",
"0.5769664",
"0.57625824",
"0.57415944",
"0.5731747",
"0.5730284",
"0.57085574",
"0.5666413",
"0.5660007",
"0.5647778",
"0.5639602",
"0.55839354",
"0.5581025",
"0.55553854",
"0.5531435",
"0.55266124",
"0.55172116",
"0.55122167",
"0.54899323",
"0.5482894",
"0.5479466",
"0.54730934",
"0.54726756",
"0.5468848",
"0.54665077",
"0.5459634",
"0.54419106",
"0.5441232",
"0.5438581",
"0.54338586",
"0.54295164",
"0.5420793",
"0.54196924",
"0.5416557",
"0.541617",
"0.54161304",
"0.540886",
"0.5383998",
"0.53812015",
"0.5381059",
"0.5377967",
"0.53742963",
"0.5366391",
"0.5361524",
"0.53595674",
"0.5358876",
"0.5347012",
"0.53438306",
"0.534095",
"0.53347087",
"0.5332054",
"0.533019",
"0.53259385",
"0.53256065",
"0.5320572",
"0.53144836",
"0.5311184",
"0.5306016",
"0.53031635",
"0.5301804",
"0.5298192",
"0.52952754",
"0.5291289",
"0.529054",
"0.5285068",
"0.5281194",
"0.5275338",
"0.5274536",
"0.5269451",
"0.52692044",
"0.5268756"
]
| 0.7033241 | 1 |
/ fetchFields() Returns an array with all the fields in the result set as objects. Returns an empty array if no more fields. | public function fetchFields(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function fetchFields(){\n $fields = X3::db()->fetchFields($this->modelName);\n $_res = array();\n foreach($fields as $name=>$field){\n $dataType = X3_MySQL_Command::parseMySQLField($field);\n $_res[$name] = $dataType;\n }\n return $_res;\n }",
"public function fetch_fields() {}",
"public function fetchFields()\n {\n $field_names = array();\n for ($c = 1, $fieldCount = $this->getFieldsCount(); $c <= $fieldCount; $c++) {\n $field_names[] = oci_field_name($this->stmt_id, $c);\n }\n return $field_names;\n }",
"protected function fetch_fields()\n {\n if(empty($this->table_fields))\n {\n $fields = $this->_database->list_fields($this->table);\n foreach ($fields as $field) {\n $this->table_fields[] = $field;\n }\n }\n }",
"public function field_data()\n\t{\n\t\t$retval = array();\n\t\tfor ($c = 1, $fieldCount = $this->num_fields(); $c <= $fieldCount; $c++)\n\t\t{\n\t\t\t$F\t\t\t= new stdClass();\n\t\t\t$F->name\t\t= oci_field_name($this->stmt_id, $c);\n\t\t\t$F->type\t\t= oci_field_type($this->stmt_id, $c);\n\t\t\t$F->max_length\t\t= oci_field_size($this->stmt_id, $c);\n\n\t\t\t$retval[] = $F;\n\t\t}\n\n\t\treturn $retval;\n\t}",
"public function getFields();",
"public function getFields();",
"public function getFields();",
"public function getFields();",
"public function getFields();",
"public function getFields();",
"public function list_fields()\r\n {\r\n $field_names = array();\r\n $this->resultID->field_seek(0);\r\n while ($field = $this->resultID->fetch_field())\r\n {\r\n $field_names[] = $field->name;\r\n }\r\n\r\n return $field_names;\r\n }",
"public function getAllFields();",
"public function fetchFieldDefinitions()\n\t\t{\n\t\t\tif( $this->fieldDefinitions )\n\t\t\t{\n\t\t\t\treturn $this->fieldDefinitions;\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * remember, the model classes return a mysql resource. in this case, it is the datasources\n\t\t\t * responsibility to act upon the resultset\n\t\t\t */\n\t\t\t$fieldDefinitions = $this->getIDatasourceModel()\n\t\t\t\t->getFieldDefinitions(); \n\n\t\t\t$count = 0;\n\n\t\t\t$fieldDefs = null;\n\t\t\twhile( $fd = mysql_fetch_object($fieldDefinitions) )\n\t\t\t{ \n\t\t\t\t$fieldDefs->{$fd->name} = $fd;\n\t\t\t\t//$count++;\n\t\t\t\t//$this->cout( DRED.\" --Now doing field Def number \" . $count .NC.CLEAR.CR );\n\t\t\t} \n\n\t\t\t//echo \"\\n\\n\";\n\t\t\t$this->setFieldDefinitions( $fieldDefs );\n\t\t\treturn $this->fieldDefinitions;\n\t\t}",
"private function _fields() {\n if ($this->_table() && empty($this->fields)) {\n $this->fields = $this->db->list_fields($this->_table());\n }\n return $this->fields;\n }",
"public function getAllFields() {\n\t\t\t// Database Connection\n\t\t\t$db\t\t\t\t= $GLOBALS['db_q'];\n\t\t\t// Initialize variables\n\t\t\t$return\t\t\t= false;\n\t\t\t// Query set up\t\n\t\t\t$table\t\t\t= 'tb_field';\n\t\t\t$select_what\t= 'id, vc_field AS vc_name';\n\t\t\t$conditions\t\t= \"1 ORDER BY vc_field ASC\";\n\t\t\t$return\t\t\t= $db->getAllRows_Arr($table, $select_what, $conditions);\n\t\t\t// Return\n\t\t\treturn $return;\n\t\t}",
"public function fields()\n {\n return array_map(\n function (array $field) {\n return Field::fromArray($field);\n },\n $this->client->get('field')\n );\n }",
"public function getAllFields()\n {\n return $this->fields;\n }",
"public function getFields() {}",
"public function getFields() {}",
"public function getFields() {}",
"public function getFieldData()\n {\n $retval = array();\n for ($c = 1, $fieldCount = $this->getFieldsCount(); $c <= $fieldCount; $c++) {\n $item = array();\n $item['name'] = oci_field_name($this->stmt_id, $c);\n $item['type'] = oci_field_type($this->stmt_id, $c);\n $item['max_length'] = oci_field_size($this->stmt_id, $c);\n $retval[] = $item;\n }\n\n return $retval;\n }",
"public function getFields() {\n $field = $this->get('field');\n return null !== $field ? $field : array();\n }",
"private function fetchFields($selectStmt)\n {\n $metadata = $selectStmt->result_metadata();\n $fields_r = array();\n while ($field = $metadata->fetch_field()) {\n $fields_r[] = $field->name;\n }\n\n return $fields_r;\n }",
"function field_data()\n\t{\n\t\t$retval = array();\n\t\tforeach(sqlsrv_field_metadata($this->result_id) as $offset => $field)\n\t\t{\n\t\t\t$F \t\t\t\t= new stdClass();\n\t\t\t$F->name \t\t= $field['Name'];\n\t\t\t$F->type \t\t= $field['Type'];\n\t\t\t$F->max_length\t= $field['Size'];\n\t\t\t$F->primary_key = 0;\n\t\t\t$F->default\t\t= '';\n\t\t\t\n\t\t\t$retval[] = $F;\n\t\t}\n\t\t\n\t\treturn $retval;\n\t}",
"public function getListFields();",
"function field_data()\n\t{\n\t\t$retval = array();\n\t\twhile ($field = mysqli_fetch_field($this->result_id))\n\t\t{\n\t\t\t$F\t\t\t\t= new stdClass();\n\t\t\t$F->name\t\t= $field->name;\n\t\t\t$F->type\t\t= $field->type;\n\t\t\t$F->default\t\t= $field->def;\n\t\t\t$F->max_length\t= $field->max_length;\n\t\t\t$F->primary_key = ($field->flags & MYSQLI_PRI_KEY_FLAG) ? 1 : 0;\n\n\t\t\t$retval[] = $F;\n\t\t}\n\n\t\treturn $retval;\n\t}",
"public function fields()\n {\n $fullResult = $this->client->call(\n 'crm.invoice.fields'\n );\n return $fullResult;\n }",
"public function getFields(): array;",
"public function getFields(): array;",
"public function getFields(): array;",
"public static function getAllFields(): array\n {\n $className = get_called_class();\n $table = with(new $className)->getTable();\n $cache_key = self::$cache_prefix.'.ALLFIELDS.' . strtoupper($table);\n\n return self::$use_cache ? Cache::remember($cache_key, 5 * 60, function () use ($table) {\n return \\Schema::getColumnListing($table);\n }) : \\Schema::getColumnListing($table);\n }",
"public function loadAllFieldsData()\n {\n // prepare request\n $sth = self::$connection->prepare('SELECT * FROM fields ORDER BY field_order ASC');\n // run it\n $sth->execute();\n\n // check if not empty or error\n if (self::$data = $sth->fetchAll(PDO::FETCH_ASSOC)) {\n // return answer\n return self::$data;\n }\n\n return false;\n }",
"final public function getAllFields()\r\n {\r\n return array($this->_field);\r\n }",
"public function getFields()\n\t{\n\t\treturn [];\n\t}",
"public function list_fields() {\n return $this->db->list_fields($this->_table());\n }",
"abstract public function getFields();",
"abstract public function getFields();",
"public function getFieldData(): array\n {\n return array_map(fn ($fieldIndex) => (object) [\n 'name' => oci_field_name($this->resultID, $fieldIndex),\n 'type' => oci_field_type($this->resultID, $fieldIndex),\n 'max_length' => oci_field_size($this->resultID, $fieldIndex),\n ], range(1, $this->getFieldCount()));\n }",
"function getFields();",
"function field_data()\r\n\t{\r\n\t\t$retval = array();\r\n /*\r\n echo \"<pre>\";\r\n var_dump($this->result_id);\r\n var_dump($this->pdo_results);\r\n echo \"</pre>\";\r\n */\r\n $table_info = $this->pdo_results;\r\n assert(is_array($table_info));\r\n foreach ($table_info as $row_info) {\r\n $F = new stdClass();\r\n $F->name = $row_info['name'];\r\n $F->type = $row_info['type'];\r\n $F->default = $row_info['dflt_value'];\r\n $F->max_length = 0;\r\n $F->primary_key = $row_info['pk'];\r\n \r\n $retval[] = $F;\r\n }\r\n\r\n return $retval;\r\n }",
"abstract protected function getFields();",
"public function getFields() : FieldCollection;",
"public function fetchAll()\n\t{\n\t\t$aReturn = Array();\n\t\twhile( $oRecord = $this->next() )\n\t\t\tarray_push( $aReturn, $oRecord );\n\t\t$this->rewind();\n\t\treturn $aReturn;\n\t}",
"public function getFieldsList(){\n return $this->_get(1);\n }",
"function list_fields()\n\t{\n\t\t$field_names = array();\n\t\twhile ($field = mysqli_fetch_field($this->result_id))\n\t\t{\n\t\t\t$field_names[] = $field->name;\n\t\t}\n\n\t\treturn $field_names;\n\t}",
"public function getFields()\n {\n if (is_null($this->fields)) {\n /** @psalm-var stdClass|array<string, mixed>|null $data */\n $data = $this->raw(self::FIELD_FIELDS);\n if (is_null($data)) {\n return null;\n }\n\n $this->fields = FieldContainerModel::of($data);\n }\n\n return $this->fields;\n }",
"public static function fetch_fields($table){\n $sql = 'SHOW columns FROM '.self::clean($table);\n self::$__querys[] = $sql;\n $result = mysqli_query(self::$__connection, $sql);\n $data = array();\n if ($result) {\n while ($r = $result->fetch_assoc()) {\n $data[] = $r;\n }\n $result->close();\n }\n return $data;\n }",
"public function getFields()\n {\n return $this->_fields;\n }",
"public function getFields()\n {\n return $this->_fields;\n }",
"public function getFields() {\n $fields = $this->_fields;\n\n if ($this->getJoins() && !$fields && $this->getType() === self::SELECT) {\n return array_keys($this->getRepository()->getSchema()->getColumns());\n }\n\n return $fields;\n }",
"public function getFields()\r\n {\r\n return $this->fields;\r\n }",
"public function getFields() : array {\n\t\treturn $this->fields;\n\t}",
"public function fields()\n {\n return [];\n }",
"public function fields()\n {\n return [];\n }",
"public function fields()\n {\n return [];\n }",
"public function fields()\n {\n return [];\n }",
"public function fields()\n {\n return [];\n }",
"protected function getFields()\n {\n return $this->fields;\n }",
"protected function getFields()\n {\n return $this->fields;\n }",
"function get_fields() {\n global $Tainacan_Item_Metadata;\n return $Tainacan_Item_Metadata->fetch($this, 'OBJECT');\n\n }",
"public function getFields()\n {\n return $this->fields;\n }",
"public function getFields()\n {\n return $this->fields;\n }",
"public function getFields()\n {\n return $this->fields;\n }",
"public function getFields()\n {\n return $this->fields;\n }",
"public function getFields()\n {\n return $this->fields;\n }",
"public function getFields()\n {\n return $this->fields;\n }",
"public function getFields()\n {\n return $this->fields;\n }",
"public function getFields()\n {\n return $this->fields;\n }",
"public function getFields()\n {\n return $this->fields;\n }",
"public function getFields()\n {\n return $this->fields;\n }",
"public function getFields()\n {\n return $this->fields;\n }",
"public function getFields() {\n\t\treturn $this->fields;\n\t}",
"public function getFields() {\n\t\treturn $this->fields;\n\t}",
"public function fields()\n {\n $fullResult = $this->client->call(\n 'crm.dealcategory.fields'\n );\n return $fullResult;\n }",
"public function getFields(): array\n {\n return $this->fields;\n }",
"public function getFields(): array\n {\n return $this->fields;\n }",
"public function getFields() {\n\t\treturn array(\n\t\t\tself::FIELD_ID,\n\t\t\tself::FIELD_NAME,\n\t\t\tself::FIELD_CREATED_AT,\n\t\t);\n\t}",
"public function getFields()\n {\n if ($this->fields) {\n return $this->fields;\n }\n\n $this->fields = array(\n 'data_type_id',\n 'name',\n 'aliases',\n 'description',\n 'driver',\n );\n\n return $this->fields;\n }",
"public function getFields() {\n if($this->cachedFields == null) {\n $this->cachedFields = $this->createFields();\n }\n\n return $this->cachedFields;\n }",
"function list_fields()\n\t{\n\t\t$field_names = array();\n\t\tforeach(sqlsrv_field_metadata($this->result_id) as $offset => $field)\n\t\t{\n\t\t\t$field_names[] = $field['Name'];\n\t\t}\n\t\t\n\t\treturn $field_names;\n\t}",
"public function getFields()\n\t{\n\t\treturn $this->_fields;\n\t}",
"public function getFields()\n {\n return isset($this->Fields) ? $this->Fields : null;\n }",
"public function get_fields() {\r\n\t\treturn $this->fields;\r\n\t}",
"public function fields() : DeepList {\n return $this->_fields;\n }",
"public function getFields()\n\t\t{\n\t\t\treturn $this->fields;\n\t\t}",
"public function getFields()\n\t{\n\t\treturn $this->fields;\n\t}",
"public function getFields()\n\t{\n\t\treturn $this->fields;\n\t}",
"public function fields()\r\n {\r\n return $this->fields;\r\n }",
"public function get_fields() {\n\t\treturn $this->fields;\n\t}",
"public function fields() : array\n {\n $fields = [];\n foreach ($this->queries as $class) {\n $fields[$class::$name] = (new $class)->toArray();\n }\n return $fields;\n }",
"public function getFieldsArray() {\n\t\t\treturn $this->fields_array;\n\t\t}",
"public function getFields() : ?array\n {\n return $this->fields;\n }",
"abstract public function getFields(): array;",
"function get_fields( ) {\n\t\treturn $this->fields_list;\n\t\t}",
"private function readFields( )\n {\n global $UNDERQL;\n\n $l_fs = @ mysql_list_fields( $UNDERQL['db']['name'], $this->table_name );\n $l_fq = @ mysql_query( 'SHOW COLUMNS FROM `' . $this->table_name . '`' );\n $l_fc = @ mysql_num_rows( $l_fq );\n @ mysql_free_result( $l_fq );\n $i = 0;\n\n $this->table_fields_names[$this->table_name] = array( );\n $this->string_fields = array( );\n\n while ( $i < $l_fc )\n {\n $l_f = mysql_fetch_field( $l_fs );\n if ( $l_f->numeric != 1 )\n $this->string_fields[@ count( $this->string_fields )] = $l_f->name;\n\n $this->table_fields_names[$this->table_name]\n [@count($this->table_fields_names[$this->table_name])] = $l_f->name;\n $i++;\n }\n }",
"public function fields()\n {\n return $this->fields;\n }",
"public function fields()\n {\n return $this->fields;\n }",
"public function fields()\n {\n $fields = array();\n\n foreach ($this->_data as $field => $row)\n {\n $fields[$field] = $row['value'];\n }\n\n return $fields;\n }",
"function get_fields(){\n\t\t\t \n\t\t\t // IN: database,table\n\t\t\t //OUT: array of fields\n\t\t\t \n\t\t\t$this->db_connect;\n\t\t\t$result = mysql_query(\"SHOW COLUMNS FROM \".$this->db.\".\".$this->table.\"\" );\n\t\t\t//echo(\"SHOW COLUMNS FROM \".$this->db.\".\".$this->table.\"\" );\n\t\t\tif (!$result) {\n\t\t\t echo 'Could not run query: ' . mysql_error();\n\t\t\t exit;\n\t\t\t}\n\t\t\tif (mysql_num_rows($result) > 0) {\n\t\t\t while ($row = mysql_fetch_assoc($result)) {\n\t\t\t $a_fields[]=$row['Field'];\n\t\t\t }\n\t\t\t}\n\t\t\treturn $a_fields;\n\t}"
]
| [
"0.79335904",
"0.7516208",
"0.73847646",
"0.73021424",
"0.6980072",
"0.69657856",
"0.69657856",
"0.69657856",
"0.69657856",
"0.69657856",
"0.69657856",
"0.6932441",
"0.6876998",
"0.6846093",
"0.6842053",
"0.6799855",
"0.6795274",
"0.67724293",
"0.6765644",
"0.6765644",
"0.6765644",
"0.67432064",
"0.6741034",
"0.6732182",
"0.6722662",
"0.668867",
"0.66825366",
"0.66738373",
"0.6671546",
"0.6671546",
"0.6671546",
"0.6660868",
"0.6657347",
"0.6630518",
"0.6627286",
"0.6610051",
"0.66019493",
"0.66019493",
"0.6560003",
"0.65459716",
"0.6541491",
"0.6514899",
"0.64689946",
"0.64558965",
"0.64257073",
"0.642196",
"0.64202404",
"0.6416848",
"0.6404362",
"0.6404362",
"0.6400676",
"0.6397781",
"0.6374791",
"0.6368352",
"0.6368352",
"0.6368352",
"0.6368352",
"0.6368352",
"0.6365903",
"0.6365903",
"0.6363344",
"0.63614947",
"0.63614947",
"0.63614947",
"0.63614947",
"0.63614947",
"0.63614947",
"0.63614947",
"0.63614947",
"0.63614947",
"0.63614947",
"0.63614947",
"0.6359815",
"0.6359815",
"0.6350985",
"0.6347549",
"0.6347549",
"0.63462037",
"0.6337866",
"0.63355577",
"0.6334068",
"0.633236",
"0.6327575",
"0.63107014",
"0.63095343",
"0.63062435",
"0.63001007",
"0.63001007",
"0.6297928",
"0.6288402",
"0.6286271",
"0.6285459",
"0.6279303",
"0.6270082",
"0.62686497",
"0.6255773",
"0.624976",
"0.624976",
"0.623547",
"0.62277734"
]
| 0.8231835 | 0 |
/ fetchRow() Returns the next row from the result set either as an object, an associated array, just its values as an ordered array, or NULL if empty. Default is to return an object. | public function fetchRow( $type = FETCH_OBJ ); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function db_fetch_next_row( $fetch_mode = DB_FETCHMODE_ASSOC ) {\n\n $this->pm_clear_cols();\n if( ! is_object( $this->dataset_obj )) return NULL;\n\n $this->curr_row_array = $this->dataset_obj->fetchRow( $fetch_mode );\n $this->pm_die_if_error( 'curr_row_array' );\n\n if( is_array( $this->curr_row_array )) { # Some data was retrieved\n $this->curr_rowno++;\n $this->cols_in_curr_row = count( $this->curr_row_array );\n }\n\n return $this->curr_row_array;\n }",
"public function getNextRow() {\n $row = mssql_fetch_object($this->result);\n\n // Might be totally out of data, or just out of this batch - request another\n // batch and see\n if (!is_object($row)) {\n mssql_fetch_batch($this->result);\n $row = mssql_fetch_object($this->result);\n }\n if (is_object($row)) {\n return $row;\n }\n else {\n return NULL;\n }\n }",
"public function fetch_row()\n\t{\n\t\t$row = array();\n\t\tif (current($this->result)) {\n\t\t\tforeach (current($this->result) AS $value) {\n\t\t\t\t$row[] = $value;\n\t\t\t}\n\t\t}else {\n\t\t\t$row = FALSE;\n\t\t}\n\t\tnext($this->result);\n\t\treturn $row;\n\t}",
"public function fetchRow()\n {\n if (!$this->_rs) {\n return false;\n }\n\n return new $this->_rowClass($this->_rs->FetchRow());\n }",
"public function fetch_row()\r\n{\r\n\t$tmp2 = $this->_result->fetch_row();\r\n\t$this->type = 1; // MYSQLI_ASSOC = 0, MYSQLI_NUM = 1, or MYSQLI_BOTH (To implement). \r\n\t$this->push_in($tmp2);\r\n\t\r\n\treturn $tmp2;\r\n}",
"function fetchRow ()\n {\n return pg_fetch_array($this->_result);\n }",
"abstract public function FetchRow();",
"public function fetchRow()\n\t{\n\t\t$this->_query();\n\n\t\treturn $this->stmt->fetch(\\PDO::FETCH_ASSOC);\n\t}",
"public function fetch_row() {\n\t\tif ($this->opencursor === null) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$row = $this->opencursor->fetch(PDO::FETCH_ASSOC);\n\t\tif ($row === false) {\n\t\t\t$this->close_open_cursor();\n\t\t\treturn false;\n\t\t}\n\t\treturn $row;\n\t}",
"public function fetchRow();",
"public function fetch_object() {\n $row = $this->fetch_array();\n return $row ? (object) $row : false;\n }",
"function FetchRow() {\n\t\t\treturn pg_fetch_row($this->result);\n\t\t}",
"public function FetchObject()\n\t{\n\t\tif (!$this->Result){\t//check if we have a valid result set\n\t\t\treturn false;\n\t\t}\n\n\t\t$row = mysqli_fetch_object($this->Result);\n\n\t\tif (!$row){\t//if last row, free the result set\n\t\t\tmysqli_free_result($this->Result);\n\t\t}\n\n\t\treturn $row;\n\t}",
"public function loadNextRow()\n {\n $this->connect();\n\n // Execute the query and get the result set cursor.\n if (!$this->executed) {\n if (!($this->execute())) {\n return $this->errorNum ? null : false;\n }\n }\n\n // Get the next row from the result set as an object of type $class.\n if ($row = $this->fetchArray()) {\n return $row;\n }\n\n // Free up system resources and return.\n $this->freeResult();\n\n return false;\n }",
"public abstract function FetchRow();",
"public function fetchRow() : array\n\t{\n\t\treturn $this->handle->fetchRow($this->result);\n\t}",
"public function fetch() {\n\t\t$this->checkResultSet();\n\t\treturn $this->fetchRowAssoc();\n\t}",
"function fetchRow() {\r\n if($this->getNumRows() > 0)\r\n return mysql_fetch_array($this->m_Result);\r\n else\r\n return false;\r\n }",
"public function fetch()\n {\n $row = oci_fetch_row($this->statement);\n return $row;\n }",
"protected function fetch_row()\n\t{\n\t\treturn $this->resResult->fetch(PDO::FETCH_NUM);\n\t}",
"public function next($asArray = false)\n {\n // Advance pointer\n $this->pointer ++;\n $row = ($asArray ? mysql_fetch_array($this->result) : mysql_fetch_object($this->result));\n \n return $row;\n }",
"public function fetch()\n {\n\n if ($this->_result !== null) {\n if (($row = $this->_result->fetch(PDO::FETCH_ASSOC))=== false ) {\n $this->freeResult();\n\n }\n return $row;\n }\n return false;\n }",
"function FetchRow() {}",
"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 }",
"public function fetch_row()\n {\n return $this->fetch_assoc();\n }",
"public function queryRow()\n\t{\n\t\treturn $this->queryInternal('fetch',$this->_fetchMode);\n\t}",
"public function singleRow(){\n $this->execute();\n return $this->statement->fetch(PDO::FETCH_OBJ);\n }",
"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}",
"function _fetch_object()\r\n\t{\r\n\t\tif ( is_array($this->pdo_results) ) {\r\n\t\t\t$i = $this->pdo_index;\r\n\t\t\t$this->pdo_index++;\r\n\t\t\tif ( isset($this->pdo_results[$i])) {\r\n\t\t\t\t$back = '';\r\n\t\t\t\tforeach ( $this->pdo_results[$i] as $key => $val ) {\r\n\t\t\t\t\t$back->$key = $val;\r\n\t\t\t\t}\r\n\t\t\t\treturn $back;\r\n\t\t\t}\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn $this->result_id->fetch(PDO::FETCH_OBJ);\r\n\t}",
"public function loadNextAssoc()\n {\n $this->connect();\n\n // Execute the query and get the result set cursor.\n if (!$this->executed) {\n if (!($this->execute())) {\n return $this->errorNum ? null : false;\n }\n }\n\n // Get the next row from the result set as an object of type $class.\n if ($row = $this->fetchAssoc()) {\n return $row;\n }\n\n // Free up system resources and return.\n $this->freeResult();\n\n return false;\n }",
"protected function _fetch_object()\n\t{\n\t\t$id = ($this->curs_id) ? $this->curs_id : $this->stmt_id;\n\t\treturn oci_fetch_object($id);\n\t}",
"function FetchRow(){\n if ($this->parse){\n $this->data =PHP_MAJOR_VERSION>5?mysqli_fetch_assoc($this->parse):mysql_fetch_assoc($this->parse);\n return $this->data;\n }else{\n return false;\n };\n }",
"function fetch_row( $handle='', $return_as_array = FALSE, $close_on_finish = TRUE, )\n\t{\n\t\t$result = $this->get_handle($handle);\n\t\tif( !$result )\n\t\t\treturn FALSE;\n\t\t\n\t\t//get the row\n\t\t$row = mysql_fetch_assoc( $result );\n\t\t\n\t\t//if loop has finished, close the result\n\t\tif( $row === FALSE )\n\t\t{\n\t\t\tif( $close_on_finish )\n\t\t\t\tmysql_free_result( $result );\n\t\t\t\t\n\t\t\treturn FALSE;\t\n\t\t}\n\t\t\n\t\t//return an object by default, but also allow for arrays\n\t\tif( $return_as_array )\n\t\t\treturn $row;\n\n\t\treturn (object)$row;\n\t}",
"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($type = 'object') {\r\n\t\tif (isset ( $this->result )) {\r\n\t\t\tswitch ($type) {\r\n\t\t\t\tcase 'array' :\r\n\t\t\t\t\t\r\n\t\t\t\t\t// fetch a row as array\r\n\t\t\t\t\t$datarows = array ();\r\n\t\t\t\t\twhile ( $row = mysqli_fetch_array ( $this->result ) ) {\r\n\t\t\t\t\t\t$datarows [] = $row;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\t\tcase 'assoc' :\r\n\t\t\t\t\t$datarows = array ();\r\n\t\t\t\t\twhile ( $row = mysqli_fetch_assoc ( $this->result ) ) {\r\n\t\t\t\t\t\t$datarows [] = $row;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\t\tcase 'object' :\r\n\t\t\t\t\r\n\t\t\t\t// fall through...\r\n\t\t\t\t\r\n\t\t\t\tdefault :\r\n\t\t\t\t\t// fetch a row as object\r\n\t\t\t\t\t$row = mysqli_fetch_object ( $this->result );\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn $datarows;\r\n\t\t}\r\n\t\t\r\n\t\treturn FALSE;\r\n\t}",
"public function result_object()\n\t{\n\t\tif (count($this->result_object) > 0)\n\t\t{\n\t\t\treturn $this->result_object;\n\t\t}\n\t\telseif (count($this->result_array) > 0)\n\t\t{\n\t\t\tfor ($i = 0, $c = count($this->result_array); $i < $c; $i++)\n\t\t\t{\n\t\t\t\t$this->result_object[] = (object) $this->result_array[$i];\n\t\t\t}\n\n\t\t\treturn $this->result_object;\n\t\t}\n\t\telseif (is_array($this->row_data))\n\t\t{\n\t\t\tif (count($this->row_data) === 0)\n\t\t\t{\n\t\t\t\treturn $this->result_object;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$row_index = count($this->row_data);\n\t\t\t\tfor ($i = 0; $i < $row_index; $i++)\n\t\t\t\t{\n\t\t\t\t\t$this->result_object[$i] = (object) $this->row_data[$i];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$row_index = 0;\n\t\t\t$this->row_data = array();\n\t\t}\n\n\t\t$row = NULL;\n\t\twhile ($row = $this->_fetch_object())\n\t\t{\n\t\t\t$this->row_data[$row_index] = (array) $row;\n\t\t\t$this->result_object[$row_index++] = $row;\n\t\t}\n\n\t\t// Un-comment the following line, in case it becomes needed\n\t\t// $this->_data_seek();\n\t\treturn $this->result_object;\n\t}",
"protected function _fetchObject()\n {\n $id = ($this->curs_id) ? $this->curs_id : $this->stmt_id;\n return @oci_fetch_object($id);\n }",
"function fetch_assoc()\n {\n if (!$this->res_result) {\n $this->error = \"No Resultset can be fetched from query\";\n return null;\n } else {\n $_rec = @isis_fetch_flat_array($this->res_result);\n }\n\n return $_rec;\n }",
"public function safe_fetch_row()\n {\n $m_record_set = $this->c_obj_stmt->fetch(PDO::FETCH_NUM);\n return $m_record_set;\n }",
"public function fetchRow(){\n $this->debugBacktrace();\n $this->fetchType = \"fetch_row\";\n return $this;\n }",
"public function fetch_row(&$result){\r\n\t\t$ADODB_FETCH_MODE = ADODB_FETCH_NUM;\r\n\t\tif(!$result->EOF){\r\n\t\t \t$rs = $result->fields;\r\n\t\t \t$result->MoveNext(); \r\n\t\t \treturn $rs;\r\n\t\t}\r\n\t}",
"public function fetchObject()\n {\n return sasql_fetch_object($this->result);\n }",
"function sql_fetch_object($res)\n {\n $results = NULL;\n if ( $res && is_object( $res ) )\n $results = $res->fetchObject(); \n return $results;\n }",
"public function fetchSingleObj($type = 'object') {\r\n\t\tif (isset ( $this->result )) {\r\n\t\t\tswitch ($type) {\r\n\t\t\t\tcase 'array' :\r\n\t\t\t\t\t\r\n\t\t\t\t\t// fetch a row as array\r\n\t\t\t\t\t$row = $this->result->fetch_array ();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\t\tcase 'assoc' :\r\n\t\t\t\t\t$row = mysqli_fetch_assoc ( $this->result );\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\t\tcase 'object' :\r\n\t\t\t\t\r\n\t\t\t\t// fall through...\r\n\t\t\t\t\r\n\t\t\t\tdefault :\r\n\t\t\t\t\t// fetch a row as object\r\n\t\t\t\t\t// $row = $this->result->fetch_object();\r\n\t\t\t\t\t$row = mysqli_fetch_object ( $this->result );\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn $row;\r\n\t\t}\r\n\t\treturn FALSE;\r\n\t}",
"public function testResultFetchRow()\n {\n \t$result = $this->conn->query(\"SELECT * FROM test\");\n \t\n \t$this->assertEquals(array(1, 'one', 'first row', 'ACTIVE'), $result->fetchRow(DB::FETCH_ORDERED));\n \t$this->assertEquals(array('id'=>2, 'key'=>'two', 'title'=>'next row', 'status'=>'ACTIVE'), $result->fetchAssoc(DB::FETCH_ASSOC));\n \t$this->assertEquals(array(3, 'three', 'another row', 'PASSIVE', 'id'=>3, 'key'=>'three', 'title'=>'another row', 'status'=>'PASSIVE'), $result->fetchRow(DB::FETCH_FULLARRAY));\n \t$this->assertNull($result->fetchRow(DB::FETCH_ORDERED));\n \t\n \t$result->resetPointer();\n \t$this->assertEquals(array('id'=>1, 'key'=>'one', 'title'=>'first row', 'status'=>'ACTIVE'), $result->fetchRow(DB::FETCH_ASSOC));\n \t$this->assertEquals(2, $result->fetchRow(DB::FETCH_VALUE), \"Fetch after reset pointer: \");\n }",
"public function fetch()\n {\n $this->execute();\n return $this->dbStmt->fetch(PDO::FETCH_ASSOC);\n }",
"public function fetch()\n {\n return mysql_fetch_object($this->res);\n }",
"function fetch() {\n\t\t$this->i++;\n\t\treturn $this->result->fetch_object($this->class_name);\n\t}",
"public function next_row($type = 'object')\n\t{\n\t\tif (is_array($this->row_data))\n\t\t{\n\t\t\t$count = count($this->row_data);\n\t\t\tif ($this->current_row > $count OR ($this->current_row === 0 && $count === 0))\n\t\t\t{\n\t\t\t\t$n = $count;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$n = $this->current_row + 1;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$n = 0;\n\t\t}\n\n\t\treturn $this->row($n, $type);\n\t}",
"public function loadNextObject($class = 'stdClass')\n {\n $this->connect();\n\n // Execute the query and get the result set cursor.\n if (!$this->executed) {\n if (!($this->execute())) {\n return $this->errorNum ? null : false;\n }\n }\n\n // Get the next row from the result set as an object of type $class.\n if ($row = $this->fetchObject(null, $class)) {\n return $row;\n }\n\n // Free up system resources and return.\n $this->freeResult();\n\n return false;\n }",
"function fetchRow() {\n $result = $this->_conn->fetchRow();\n if ($result == false) {\n return false;\n }\n $dm = $this->_formatTag($result);\n return $dm;\n }",
"function getNextRow()\n {\n $this->current_row_index++;\n if ( $this->current_row_index > ( $this->offset + $this->limit - 1 ) )\n {\n $this->current_row = false;\n $this->current_row_hash = false;\n $this->mapping = false;\n return $this->current_row;\n }\n\n $result = $this->mysqli->query( 'SELECT * FROM ' . $this->table .\n ' LIMIT 1 OFFSET ' . $this->current_row_index );\n if ( $result->num_rows == 1 )\n {\n $this->current_row = $result->fetch_row();\n $this->current_row_hash = array();\n $this->mapping = array();\n foreach ( $result->fetch_fields() as $key => $field )\n {\n $this->current_row_hash[$field->name] = $this->current_row[$key];\n $this->mapping[$key] = $field->name;\n }\n $this->current_field = current( $this->mapping );\n }\n else\n {\n $this->current_row = false;\n $this->current_row_hash = false;\n $this->mapping = false;\n }\n $result->free();\n\n return $this->current_row;\n }",
"public function exec_SELECTgetSingleRow() {}",
"function FetchObject() {\n\t\t\treturn pg_fetch_object($this->result);\n\t\t}",
"public function fetch_one()\n {\n if (!$this->limit) $this->limit(1);\n $rows = $this->fetch_all();\n return count($rows) ? array_shift($rows): null;\n }",
"protected function fetch() \n {\n $record = $this->statement->fetch(PDO::FETCH_ASSOC);\n\n if($record === false) {\n return false;\n }\n\n foreach($this->mappers as $mapper) {\n $record = $mapper($record);\n }\n\n return $record;\n }",
"function fetch_object_row($resource) {\n $result = array();\n if ($this->num_rows($resource) > 0) {\n $result = mysql_fetch_object($resource);\n }\n return $result;\n }",
"abstract public function nextRow($result = false);",
"public function fetch()\n {\n return $this->statement->fetch();\n }",
"public function fetchRow($where = null, $order = null, $offset = null)\n {\n// $row = $this->fetchAll($where, $order, 1, $offset)->toArray();\n//\n// $data = array(\n// 'table' => $this,\n// 'data' => (isset($row[0])) ? $row[0] : null,\n// );\n//\n// return new $this->_rowClass($data);\n return $this->fetchAll($where, $order, 1, $offset)->getRow(0);\n }",
"public function FetchArray()\n\t{\n\t\tif (!$this->Result){\t//check if we have a valid result set\n\t\t\treturn false;\n\t\t}\n\n\t\t$row = mysqli_fetch_array($this->Result);\n\n\t\tif (!$row){\t//if last row, free the result set\n\t\t\tmysqli_free_result($this->Result);\n\t\t}\n\n\t\treturn $row;\n\t}",
"public function getNextRow() {\n $next_call_count = $this->currentPage * $this->pagination;\n if ($this->currentCount == $this->totalCount) {\n return NULL;\n }\n if ($this->currentCount == $next_call_count && $next_call_count < $this->totalCount) {\n $start = $this->currentPage * $this->pagination;\n if ($str = elis_consumer_http_request($this->url_pattern . '&rows=' . $this->pagination . '&start=' . $start, array('Accept' => 'application/json'))) {\n if ($json = json_decode($str)) {\n $this->data = $json->response->docs;\n $this->currentPage++;\n }\n }\n }\n // TODO Messages in case of empty data / failed call etc.\n $item = NULL;\n if (count($this->data)) {\n $item = current($this->data);\n next($this->data);\n $this->currentCount++;\n }\n return $item;\n }",
"public function fetch_row($row=0)\n {\n if(is_resource($this->resource) && is_int($row))\n {\n return pg_fetch_row($this->resource, $row);\n }\n else\n {\n return false;\n }\n }",
"public function fetchSingle() {\n $this->execute();\n return $this->stmt->fetch(PDO::FETCH_OBJ);\n }",
"function _fetch_object()\n\t{\n\t\treturn mysqli_fetch_object($this->result_id);\n\t}",
"public function fetchOne() {\r\n\t\t$data = $this->fetch();\r\n\r\n\t\t$this->freeResult();\r\n\r\n\t\treturn $data ? current($data) : null;\r\n\t}",
"public function row_object($n = 0)\n\t{\n\t\t// Make sure $n is not a string\n\t\tif ( ! is_int($n))\n\t\t{\n\t\t\t$n = (int) $n;\n\t\t}\n\t\t/* Logic here is exactly the same as in row_array,\n\t\t * except we have to cast row_data[$n] to an object.\n\t\t *\n\t\t * If we already have result_object though - we can\n\t\t * directly return from it.\n\t\t */\n\t\tif (isset($this->result_object[$n]))\n\t\t{\n\t\t\t$this->current_row = $n;\n\t\t\t// Set this, if not already done.\n\t\t\tif ( ! is_int($this->num_rows))\n\t\t\t{\n\t\t\t\t$this->num_rows = count($this->result_object);\n\t\t\t}\n\n\t\t\treturn $this->result_object[$n];\n\t\t}\n\n\t\t$row = $this->row_array($n);\n\t\t// Cast only if the row exists\n\t\tif (count($row) > 0)\n\t\t{\n\t\t\t$this->current_row = $n;\n\t\t\treturn (object) $row;\n\t\t}\n\n\t\treturn array();\n\t}",
"public function get_row() {\n\t\tif (!isset($this->rows)) {\n\t\t\t$this->get_rows();\n\t\t}\n\t\t$value = current($this->rows);\n\t\tnext($this->rows);\n\t\treturn $value;\n\t}",
"public function fetch_one($sql){\r\n\t\t\tglobal $link;\r\n\t\t\t$result = mysqli_query($link,$sql);\r\n\t\t\t$arr = mysqli_fetch_object($result);\r\n\t\t\treturn $arr;\r\n\t\t}",
"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 {\r\n $this->query();\r\n return $this->sth->fetch();\r\n }",
"public function fetch_array() {\n if ($this->Currentindex < $this->data['num_rows']) {\n $result = $this->lines[$this->Currentindex];\n $this->Currentindex++;\n\n return $result;\n } else {\n return false;\n }\n }",
"function _fetch_object()\n\t{\n\t\treturn sqlsrv_fetch_object($this->result_id);\n\t}",
"public function asRow() {\n\t\treturn $this->_sth->fetchAll(PDO::FETCH_NUM);\n\t}",
"public abstract function fetchRow($result_set);",
"public function fetchRecord()\n {\n $ret = $this->readCurrentRecord();\n if ($ret !== false) {\n $this->next();\n }\n return $ret;\n }",
"public function fetch($type = SQLAnywhereClient::FETCH_OBJECT)\n {\n $data = null;\n if ($this->result) {\n switch ($type) {\n case 'array':\n $data = sasql_fetch_object($this->result);\n break;\n\n case 'assoc':\n $data = sasql_fetch_object($this->result);\n break;\n\n case 'row':\n $data = sasql_fetch_object($this->result);\n break;\n\n case 'field':\n $data = sasql_fetch_object($this->result);\n break;\n\n case 'object':\n $data = sasql_fetch_object($this->result);\n break;\n\n default:\n $data = sasql_fetch_object($this->result);\n break;\n }\n }\n return $data;\n }",
"public function result_row()\n {\n $output = is_bool($this->result) ? array() : $this->result->fetch_assoc();\n\n $this->free_result();\n\n return $output;\n }",
"public function next()\n\t{\n\t\tif ( $this->_result instanceof MySQLi_Result )\n\t\t\treturn $this->_result->fetch_object();\n\t\treturn false;\n\t}",
"public function fetch(&$statement)\n {\n return $this->db_handler->fetchSingleRow($statement);\n }",
"public function GetSingleRow() : ARRAY\r\n {\r\n return($this->preparedStatement->fetch(\\PDO::FETCH_ASSOC));\r\n }",
"public function fetch()\n {\n return mysqli_fetch_assoc($this->lastResults);\n }",
"public static function row($query = null, $output = OBJECT, $y = 0) {\n self::$func_call = __CLASS__.\"::row(\\\"$query\\\",$output,$y)\";\n $query && self::query($query);\n\n if ( !isset(self::$last_result[$y]) )\n return null;\n\n if ( $output == OBJECT ) {\n return self::$last_result[$y] ? self::$last_result[$y] : null;\n } elseif ( $output == ARRAY_A ) {\n return self::$last_result[$y] ? get_object_vars(self::$last_result[$y]) : null;\n } elseif ( $output == ARRAY_N ) {\n return self::$last_result[$y] ? array_values(get_object_vars(self::$last_result[$y])) : null;\n } else {\n self::print_error(__CLASS__.\"::row(string query, output type, int offset) -- Output type must be one of: OBJECT, ARRAY_A, ARRAY_N\");\n }\n }",
"public function row($query,$params = null,$fetchmode = PDO::FETCH_ASSOC)\n {\n $this->Init($query,$params);\n return $this->sQuery->fetch($fetchmode);\n }",
"function _fetch_assoc()\r\n\t{\r\n\t\tif ( is_array($this->pdo_results) ) {\r\n\t\t\t$i = $this->pdo_index;\r\n\t\t\t$this->pdo_index++;\r\n\t\t\tif ( isset($this->pdo_results[$i]))\r\n\t\t\t\treturn $this->pdo_results[$i];\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn $this->result_id->fetch(PDO::FETCH_ASSOC);\r\n\t}",
"public function get_row($query=null, $output=OBJECT, $y=0) {\n\n\t\t// If there is a query then perform it if not then use cached results..\n\t\tif ($query)\n\t\t\t$this->query($query);\n\n\t\t// If the output is an object then return object using the row offset..\n\t\tif ($output == OBJECT)\n\t\t\treturn $this->last_result[$y] ? $this->last_result[$y] : null;\n\n\t\t// If the output is an associative array then return row as such..\n\t\telseif ($output == ARRAY_A)\n\t\t\treturn $this->last_result[$y] ? get_object_vars($this->last_result[$y]) : null;\n\n\t\t// If the output is an numerical array then return row as such..\n\t\telseif ($output == ARRAY_N)\n\t\t\treturn $this->last_result[$y] ? array_values(get_object_vars($this->last_result[$y])) : null;\n\n\t\t// If invalid output type was specified..\n\t\telse\n\t\t\tthrow new HeliumException(HeliumException::db_error, 'HeliumDB::get_row() – Output type must be one of: OBJECT, ARRAY_A, ARRAY_N');\n\n\t}",
"public function row($query,$fetchMode = PDO::FETCH_BOTH)\n {\n $this->_init( $query );\n return $this->doQuery->fetch( $fetchMode );\n }",
"public function getRow(){\n return oci_fetch_array($this->result);\n\n }",
"public function getUnbufferedRow(string $type = 'object')\n {\n if ($type === 'array') {\n return $this->fetchAssoc();\n }\n\n if ($type === 'object') {\n return $this->fetchObject();\n }\n\n return $this->fetchObject($type);\n }",
"public function fetchRow($result_set)\n\t{\n\t\treturn $result_set->fetch_row();\n\t}",
"function fetchRow($consulta = NULL){\n if(!$consulta) \n $consulta = $this->consulta;\n return pg_fetch_row($consulta);\n }",
"function getRow() {\r\n\t\t\tif($this->privateVars['resultset']) {\r\n\t\t\t\t$resultArray = mysql_fetch_array($this->privateVars['resultset']);\r\n\t\t\t\tif ($resultArray !== false) $this->privateVars['resultpointer']++;\r\n\t\t\t\treturn $resultArray;\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\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 = null, $cursorOrientation = PDO::FETCH_ORI_NEXT, $cursorOffset = 0): mixed\n {\n if ($fetchMode === null) {\n $fetchMode = $this->fetchMode;\n }\n\n $toLowercase = ($this->connection->getAttribute(PDO::ATTR_CASE) === PDO::CASE_LOWER);\n $nullToString = ($this->connection->getAttribute(PDO::ATTR_ORACLE_NULLS) === PDO::NULL_TO_STRING);\n $nullEmptyString = ($this->connection->getAttribute(PDO::ATTR_ORACLE_NULLS) === PDO::NULL_EMPTY_STRING);\n\n switch ($fetchMode) {\n case PDO::FETCH_BOTH:\n case PDO::FETCH_ASSOC:\n $resultSet = @\\odbc_fetch_array($this->statement);\n\n if (\\odbc_error()) {\n $this->throwException();\n }\n\n if ($resultSet === false) {\n return false;\n }\n\n if ($toLowercase) {\n $resultSet = \\array_change_key_case($resultSet);\n }\n\n return $resultSet;\n\n case PDO::FETCH_OBJ:\n $resultSet = @\\odbc_fetch_array($this->statement);\n\n if (\\odbc_error()) {\n $this->throwException();\n }\n\n if ($resultSet === false) {\n return false;\n }\n\n if ($toLowercase) {\n $resultSet = \\array_change_key_case($resultSet);\n }\n\n $object = new stdClass();\n\n foreach ($resultSet as $field => $value) {\n if (\\is_null($value) && $nullToString) {\n $resultSet[$field] = '';\n }\n\n if (empty($resultSet[$field]) && $nullEmptyString) {\n $resultSet[$field] = null;\n }\n\n $object->{$field} = $value;\n }\n\n return $object;\n }\n\n return false;\n }",
"public function next_row()\n\t\t{\tif (isset($this->res))\n\t\t\t\treturn mysql_fetch_row($this->res);\n\n\t\t\techo \"You need to make a query first! <br />\";\n\t\t\treturn false;\n\t\t}",
"function getNextRecord() { return mysql_fetch_array( $this->recordSet ); }",
"function next_record()\n\t{\n\t\t/* goto next record */\n\t\t$this->m_record = @mysqli_fetch_array($this->m_query_id, MYSQLI_ASSOC|atkconfig(\"mysqlfetchmode\"));\n\t\t$this->m_row++;\n\t\t$this->m_errno = mysqli_errno($this->m_link_id);\n\t\t$this->m_error = mysqli_error($this->m_link_id);\n\n\t\t/* are we there? */\n\t\t$result = is_array($this->m_record);\n\t\tif (!$result && $this->m_auto_free)\n\t\t{\n\t\t\t@mysqli_free_result($this->m_query_id);\n\t\t\t$this->m_query_id = 0;\n\t\t}\n\n\t\t/* return result */\n\t\treturn $result;\n\t}",
"public function fetchObj(){\n try{\n $this->obj = $this->resultado->fetch(PDO::FETCH_OBJ);\n } catch (PDOException $e){\n $this->errors[] = 'error: function fetchObj<br/>'.$e->getMessage();\n $this->obj = NULL;\n }\n return $this->obj;\n }",
"public function fetch_array()\n\t{\n\t\tif($this->num_rows() < 1)\n\t\t\treturn false;\n\n\t\t$data = $this->result_metadata();\n\t\t$fields = array();\n\t\t$out = array();\n\n\t\t$fields[0] = &$this;\n\t\t$count = 0;\n\n\t\twhile($field = $data->fetch_field()) {\n\t\t\t$fields[$count] = &$out[$field->name];\n\t\t\t$count++;\n\t\t}\n\n\t\tcall_user_func_array(array($this, 'bind_result'), $fields);\n\n\t\treturn ($this->fetch()) ? $out : false;\n }",
"public function fetchRows( $type = FETCH_OBJ );"
]
| [
"0.7902771",
"0.7656031",
"0.76233363",
"0.75024045",
"0.7461885",
"0.7437089",
"0.7433071",
"0.7432426",
"0.7427103",
"0.74246967",
"0.73919535",
"0.7355801",
"0.7352574",
"0.7344245",
"0.72961205",
"0.7283539",
"0.7261435",
"0.72017676",
"0.7190501",
"0.71544677",
"0.71104133",
"0.7003458",
"0.6983994",
"0.6954764",
"0.6949927",
"0.6946654",
"0.69311154",
"0.69023573",
"0.68684435",
"0.6833199",
"0.6814759",
"0.6812196",
"0.680631",
"0.6791873",
"0.67891467",
"0.6782219",
"0.67708385",
"0.67611367",
"0.6760817",
"0.67435324",
"0.67398316",
"0.6734743",
"0.6719514",
"0.67131054",
"0.67090595",
"0.6661632",
"0.66409004",
"0.6637164",
"0.6605809",
"0.6592418",
"0.6583918",
"0.65815294",
"0.6575988",
"0.6573283",
"0.6570767",
"0.6541979",
"0.64877635",
"0.64800185",
"0.6479946",
"0.64752996",
"0.64686835",
"0.6468543",
"0.64638114",
"0.6460998",
"0.64490324",
"0.64246106",
"0.6422885",
"0.6418958",
"0.6414642",
"0.64101166",
"0.63972646",
"0.63903946",
"0.63685775",
"0.6356356",
"0.63513076",
"0.63474363",
"0.634599",
"0.6344214",
"0.6338672",
"0.6330176",
"0.632583",
"0.6312089",
"0.63066983",
"0.629858",
"0.62848616",
"0.6278845",
"0.627633",
"0.6274643",
"0.6261725",
"0.62597495",
"0.6258581",
"0.6256008",
"0.62556756",
"0.6248302",
"0.6246132",
"0.62396085",
"0.6239194",
"0.6234301",
"0.6232959",
"0.6231259"
]
| 0.7078438 | 21 |
/ fetchRows() Returns an array with all the rows in the result set either as objects, associated arrays, values as ordered arrays. Returns an empty array if no more rows. Default is to return objects. | public function fetchRows( $type = FETCH_OBJ ); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function fetch(){\n\n $rows = [];\n\n while($row = $this->result->fetch(PDO::FETCH_ASSOC)) {\n $rows[]=$row;\n }\n\n $this->result=null;\n\n return $rows;\n\n }",
"public function fetchRow() : array\n\t{\n\t\treturn $this->handle->fetchRow($this->result);\n\t}",
"public function fetch_all(){\n $data = array();\n while( ($obj = oci_fetch_object($this->result)) != false ){\n $data[] = $obj;\n }\n return $data;\n }",
"public function GetAllRows() : ARRAY\r\n {\r\n return($this->preparedStatement->fetchAll(\\PDO::FETCH_ASSOC));\r\n }",
"public function fetchAll()\n {\n $objectArray = [];\n while($fetchedObject = $this->fetch())\n {\n $objectArray[] = $fetchedObject;\n }\n\n return $objectArray;\n }",
"public function fetchAll() {\n\n if (!$this->results) {\n\n $this->results = [];\n while ($row = $this->nextRow()) {\n $this->results[] = $row;\n }\n\n }\n\n return $this->results;\n }",
"public function fetchArray() : array\n\t{\n\t\treturn $this->handle->fetchArray($this->result);\n\t}",
"public function fetchAll() {\r\n\t\t$result = array();\r\n\r\n\t\twhile ($data = $this->fetch()) {\r\n\t\t\t$result[] = $data;\r\n\t\t}\r\n\r\n\t\t$this->freeResult();\r\n\r\n\t\treturn $result;\r\n\t}",
"public function fetchRowset()\n\t{\n\t\t$this->_query();\n\n\t\treturn $this->stmt->fetchAll(\\PDO::FETCH_ASSOC);\n\t}",
"public function fetchAll() {\n $this->execute();\n return $this->stmt->fetchAll(PDO::FETCH_OBJ);\n }",
"public function fetchAll()\n\t{\n\t\t$aReturn = Array();\n\t\twhile( $oRecord = $this->next() )\n\t\t\tarray_push( $aReturn, $oRecord );\n\t\t$this->rewind();\n\t\treturn $aReturn;\n\t}",
"function GetRows()\n {\n $arr = [];\n for ($i = 0, mysqli_data_seek($this->rs, 0); $this->Next(); $i++) $arr[$i] = $this->row;\n return $arr;\n }",
"function fetchAll()\n {\n $rows=array();\n if ($this->consulta)\n {\n //la funcion oci_fetch_array devuelve cada fila de la consulta en forma de array\n while($row = oci_fetch_array($this->consulta, OCI_BOTH))\n { //luego cada fila (como un array) se agrega a otro array... creando un array de 2 dimsnesiones\n $rows[]=$row;\n }\n }\n return $rows;\n }",
"public function fetchAll(): array\n {\n $fetchMode = defined('MDB2_FETCHMODE_ASSOC') ? \\MDB2_FETCHMODE_ASSOC : 2;\n $result = $this->_getResult()->fetchAll($fetchMode); // Returns an array on success and an \\PEAR_Error object on failure\n return is_array($result) ? $result : array();\n }",
"public function fetchAllToArray()\n {\n $resultSet = $this->getDbTable()->fetchAll()->toArray();\n return $resultSet;\n }",
"public function fetch_array()\n\t{\n\t\tif($this->num_rows() < 1)\n\t\t\treturn false;\n\n\t\t$data = $this->result_metadata();\n\t\t$fields = array();\n\t\t$out = array();\n\n\t\t$fields[0] = &$this;\n\t\t$count = 0;\n\n\t\twhile($field = $data->fetch_field()) {\n\t\t\t$fields[$count] = &$out[$field->name];\n\t\t\t$count++;\n\t\t}\n\n\t\tcall_user_func_array(array($this, 'bind_result'), $fields);\n\n\t\treturn ($this->fetch()) ? $out : false;\n }",
"public function getResultObject(): array\n {\n if (! empty($this->resultObject)) {\n return $this->resultObject;\n }\n\n // In the event that query caching is on, the result_id variable\n // will not be a valid resource so we'll simply return an empty\n // array.\n if (! $this->isValidResultId()) {\n return [];\n }\n\n if ($this->resultArray) {\n foreach ($this->resultArray as $row) {\n $this->resultObject[] = (object) $row;\n }\n\n return $this->resultObject;\n }\n\n if ($this->rowData !== null) {\n $this->dataSeek();\n }\n\n while ($row = $this->fetchObject()) {\n if (! is_subclass_of($row, Entity::class) && method_exists($row, 'syncOriginal')) {\n $row->syncOriginal();\n }\n\n $this->resultObject[] = $row;\n }\n\n return $this->resultObject;\n }",
"public function result_array()\n\t{\n\t\tif (count($this->result_array) > 0)\n\t\t{\n\t\t\treturn $this->result_array;\n\t\t}\n\t\telseif (count($this->result_object) > 0)\n\t\t{\n\t\t\tfor ($i = 0, $c = count($this->result_object); $i < $c; $i++)\n\t\t\t{\n\t\t\t\t$this->result_array[$i] = (array) $this->result_object[$i];\n\t\t\t}\n\n\t\t\treturn $this->result_array;\n\t\t}\n\t\telseif (is_array($this->row_data))\n\t\t{\n\t\t\tif (count($this->row_data) === 0)\n\t\t\t{\n\t\t\t\treturn $this->result_array;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$row_index = count($this->row_data);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$row_index = 0;\n\t\t\t$this->row_data = array();\n\t\t}\n\n\t\t$row = NULL;\n\t\twhile ($row = $this->_fetch_assoc())\n\t\t{\n\t\t\t$this->row_data[$row_index++] = $row;\n\t\t}\n\n\t\t// Un-comment the following line, in case it becomes needed\n\t\t// $this->_data_seek();\n\t\treturn $this->result_array = $this->row_data;\n\t}",
"public function fetch_array() {\n\t\treturn $this->FetchArray();\n\t}",
"public function fetchAll()\r\n {\r\n $this->query();\r\n return $this->sth->fetchAll();\r\n }",
"public function fetchArray() {\n return mysqli_fetch_array($this->result);\n }",
"public function fetchAll(): array\n {\n if (!$this->wasExecuted()) {\n $this->exec();\n }\n\n return $this->getAdapter()->getStatement()->fetchAll(\\PDO::FETCH_ASSOC);\n }",
"public function resultSet()\n\t{\n\t\t$this->execute();\n\t\treturn $this->stm->fetchAll(PDO::FETCH_OBJ);\n\t}",
"public function resultSet(){\n $this->execute();\n return $this->statement->fetchAll(PDO::FETCH_OBJ);\n }",
"public function fetchAll()\n {\n $this->execute();\n return $this->dbStmt->fetchAll(PDO::FETCH_ASSOC);\n }",
"function GetAllRows($handle = false)\n {\n if ($handle) $handle = $this->_lastHandle;\n $ret = array();\n switch ($this->_DB) {\n case 'mysql':\n while ($row = mysqli_fetch_assoc($handle)) {\n $ret[] = $row;\n }\n break;\n }\n return $ret;\n }",
"public function getRows()\n {\n return $this->last->fetch_array(MYSQLI_ASSOC);\n \n }",
"public function resultSet(){\n\t\t$this->execute();\n\t\treturn $this->stmt->fetchAll(PDO::FETCH_OBJ);\n\t}",
"public function fetchArray()\n {\n if (!empty($this->prepare)) {\n return $this->prepare->fetch(PDO::FETCH_NUM);\n }\n return array();\n }",
"public function fetch_array()\n\t{\n\t\t$array = array();\n\t\tif (current($this->result)) {\n\t\t\tforeach (current($this->result) AS $value) {\n\t\t\t\t$array[] = $value;\n\t\t\t}\n\t\t\tforeach (current($this->result) AS $key => $value) {\n\t\t\t\t$array[$key] = $value;\n\t\t\t}\n\t\t}else {\n\t\t\t$array = FALSE;\n\t\t}\n\t\tnext($this->result);\n\t\treturn $array;\n\t}",
"public function fetch_all_array(){\n $data = array();\n while( ($r = oci_fetch_assoc($this->result)) != false ){\n $data[] = $r;\n }\n return $data;\n }",
"public function asRow() {\n\t\treturn $this->_sth->fetchAll(PDO::FETCH_NUM);\n\t}",
"public function FetchArray()\n\t{\n\t\tif (!$this->Result){\t//check if we have a valid result set\n\t\t\treturn false;\n\t\t}\n\n\t\t$row = mysqli_fetch_array($this->Result);\n\n\t\tif (!$row){\t//if last row, free the result set\n\t\t\tmysqli_free_result($this->Result);\n\t\t}\n\n\t\treturn $row;\n\t}",
"public function getRows()\n {\n \treturn $this->previouslyExecuted->fetch_array(MYSQLI_ASSOC);\n }",
"public function getRows($q){ // get array of rows objects\r\t\t$this->connect();\t//connect if not connected \r\t\t$query=$this->query($q);\r\t\t$result=array();\r\t\twhile ($data=sqlite_fetch_object($query)){\r\t\t\t$result[]=$data;\r\t\t}\r\t\treturn $result;\r\t}",
"public function getRows();",
"public function getRows();",
"public function safe_fetch_array()\n {\n\n $m_arr_row = $this->c_obj_stmt->fetch(PDO::FETCH_ASSOC);\n return $m_arr_row;\n }",
"function fetchAll() {\r\n if($this->getNumRows() <= 0)\r\n throw new Exception(\"No Recored Found\");\r\n \r\n while ($row = mysql_fetch_array($this->m_Result)) {\r\n $a_rs[] = $row;\r\n }\r\n mysql_free_result($this->m_Result);\r\n return $a_rs;\r\n \r\n }",
"protected function dbFetchAll() {\r\n\r\n //@@TODO RESOURCE CHECK IS_A ?\r\n\r\n $return_array = array();\r\n\r\n while ($row = $this->query_result->fetch_array(MYSQLI_ASSOC)) {\r\n $return_array[] = $this->dbOutArray($row);\r\n }\r\n return $return_array;\r\n }",
"public function fetch_row()\n\t{\n\t\t$row = array();\n\t\tif (current($this->result)) {\n\t\t\tforeach (current($this->result) AS $value) {\n\t\t\t\t$row[] = $value;\n\t\t\t}\n\t\t}else {\n\t\t\t$row = FALSE;\n\t\t}\n\t\tnext($this->result);\n\t\treturn $row;\n\t}",
"public function fetchData()\n\t{\n\t\tif (isset($this->rows))\n\t\t{\n\t\t\treturn $this->rows;\n\t\t}\n\t\t$this->rows = parent::fetchData();\n\t\tif ($this->force_count)\n\t\t{\n\t\t\treturn $this->rows;\n\t\t}\n\n\t\tif (count($this->rows) > $this->pagination->pageSize)\n\t\t{\n\t\t\t$this->hasMore = true;\n\t\t\tarray_pop($this->rows);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->hasMore = false;\n\t\t}\n\t\t$this->totalItemCount = $this->pagination->offset + count($this->rows);\n\t\t$this->pagination->itemCount = $this->totalItemCount + ($this->hasMore ? 1 : 0);\n\t\treturn $this->rows;\n\t}",
"public function asArray() {\n\t\treturn $this->_sth->fetchAll(PDO::FETCH_ASSOC);\n\t}",
"public function fetch()\n {\n return (array)$this->query();\n }",
"public function fetchAll($type = SQLAnywhereClient::FETCH_OBJECT)\n {\n $data = [];\n\n if ($this->result) {\n switch ($type) {\n case 'array':\n while ($row = sasql_fetch_array($this->result))\n array_push($data, $row);\n break;\n\n case 'assoc':\n while ($row = sasql_fetch_assoc($this->result))\n array_push($data, $row);\n break;\n\n case 'row':\n while ($row = sasql_fetch_row($this->result))\n array_push($data, $row);\n break;\n\n case 'field':\n while ($row = sasql_fetch_field($this->result))\n array_push($data, $row);\n break;\n\n case 'object':\n while ($row = sasql_fetch_object($this->result))\n array_push($data, $row);\n break;\n\n default:\n while ($row = sasql_fetch_array($this->result))\n array_push($data, $row);\n break;\n }\n }\n\n return $data;\n }",
"public function getAllRows() {\n\t\t$rows = array();\n\t\t\n\t\tfor($x = 0; $x < $this->getNumRows(); $x++) {\n\t\t\t$rows[] = mysqli_fetch_assoc($this->_result);\n\t\t}\n\t\treturn $rows;\n\t}",
"public function GetSingleRow() : ARRAY\r\n {\r\n return($this->preparedStatement->fetch(\\PDO::FETCH_ASSOC));\r\n }",
"public function fetchArray();",
"public function fetchArray();",
"public function getResultArray(): array\n {\n if (! empty($this->resultArray)) {\n return $this->resultArray;\n }\n\n // In the event that query caching is on, the result_id variable\n // will not be a valid resource so we'll simply return an empty\n // array.\n if (! $this->isValidResultId()) {\n return [];\n }\n\n if ($this->resultObject) {\n foreach ($this->resultObject as $row) {\n $this->resultArray[] = (array) $row;\n }\n\n return $this->resultArray;\n }\n\n if ($this->rowData !== null) {\n $this->dataSeek();\n }\n\n while ($row = $this->fetchAssoc()) {\n $this->resultArray[] = $row;\n }\n\n return $this->resultArray;\n }",
"function fetchRow ()\n {\n return pg_fetch_array($this->_result);\n }",
"function fetch_array()\n {\n return mysql_fetch_array($this->_queryResource, MYSQL_ASSOC);\n }",
"public function getRows() : ?array\n {\n return $this->rows;\n }",
"public function getRows()\n\t{\n\t\treturn $this->driver->getRows();\n\t}",
"function FetchArray() {\n\t\t\t$this->ConnectServer();\n\t\t\t$array = pg_fetch_array($this->result, NULL, PGSQL_ASSOC);\n\t\t\t$this->DisconnectServer();\n\t\t\treturn $array;\n\t\t}",
"public function fetchAll()\r\n {\r\n $sql = new Sql($this->dbAdapter);\r\n $select = $sql->select();\r\n $select\r\n ->from(array('a_s' => $this->table))\r\n ->order('a_s.sector_order ASC');\r\n \r\n $selectString = $sql->getSqlStringForSqlObject($select);\r\n $execute = $this->dbAdapter->query($selectString, Adapter::QUERY_MODE_EXECUTE);\r\n $result = $execute->toArray();\r\n return $result;\r\n }",
"public function getRows()\n {\n $query = $this->getQuery();\n \n if (!empty($this->columns)) {\n $query->select(implode(', ', $this->columns));\n }\n \n foreach ($this->sort as $key => $value) {\n $query->sortBy($key, $value);\n }\n \n if ($this->range) {\n $query->limit($this->start, $this->range);\n }\n \n if (!empty($this->group)) {\n $query->groupBy($this->group);\n }\n \n return $this->database->query($query, $this->database->getBinds());\n }",
"public function result_array()\n {\n $output = array();\n\n if (is_bool($this->result))\n {\n return $output;\n }\n\n while ($row = $this->result->fetch_assoc())\n {\n $output[] = $row;\n }\n\n $this->free_result();\n\n return $output;\n }",
"function obtenerArray(){\r\n\t\treturn mysql_fetch_array( $this->rs() );\r\n\t}",
"public function result_set() {\n $this -> execute();\n return $this -> stmt -> fetchAll();\n }",
"public function asObject() {\n\t\treturn $this->_sth->fetchAll(PDO::FETCH_OBJ);\n\t}",
"function fetch_array()\n {\n return mysqli_fetch_array($this->_queryResource);\n }",
"public function resultset(){\n\t\t$this->execute() ;\n\t\treturn $this->statement->fetchAll(PDO::FETCH_ASSOC) ;\n\t}",
"public function fetchAll($fetchStyle = PDO::FETCH_BOTH)\n {\n switch($fetchStyle) {\n case PDO::FETCH_BOTH:\n $flags = OCI_FETCHSTATEMENT_BY_ROW + OCI_BOTH;\n break;\n case PDO::FETCH_ASSOC:\n $flags = OCI_FETCHSTATEMENT_BY_ROW + OCI_ASSOC;\n default:\n $flags = 0;\n break;\n\n }\n oci_fetch_all($this->statement, $rows, null, null, $flags);\n return $rows;\n }",
"function sthFetchObjects($sth) {\r\n\t$out = array();\r\n\twhile($o = $sth->fetchObject()) {\r\n\t\t$out[] = $o;\r\n\t}\r\n\treturn $out;\r\n}",
"public function resultSet()\n {\n $this->execute();\n return $this->stmt->fetchAll(PDO::FETCH_ASSOC);\n }",
"abstract protected function getRows();",
"public function loadAllRows($option = array()){\n\t\tif(!$option){\n\t\t\tif(!$result = $this->execute())\n\t\t\t\treturn false;\n\t\t}\n\t\telse{\n\t\t\tif(!$result = $this->execute($option))\n\t\t\t\treturn false;\n\t\t}\n\t\treturn $result->fetchAll(PDO::FETCH_OBJ);\n\t}",
"public function fetchAll($type = null) {\n\t\t$data = array();\n\t\twhile($row = $this->fetch($type)) $data[] = $row;\n\t\treturn $data;\n\t}",
"public function get_rows() {\n\t\tif (!isset($this->rows)) {\n\t\t\t$this->rows = $this->get_array();\n\t\t\t// Take out the header\n\t\t\tarray_shift($this->rows);\n\t\t}\n\t\telse {\n\t\t\treset($this->rows);\n\t\t}\n\t\treturn $this->rows;\n\t}",
"public function result_object()\n\t{\n\t\tif (count($this->result_object) > 0)\n\t\t{\n\t\t\treturn $this->result_object;\n\t\t}\n\t\telseif (count($this->result_array) > 0)\n\t\t{\n\t\t\tfor ($i = 0, $c = count($this->result_array); $i < $c; $i++)\n\t\t\t{\n\t\t\t\t$this->result_object[] = (object) $this->result_array[$i];\n\t\t\t}\n\n\t\t\treturn $this->result_object;\n\t\t}\n\t\telseif (is_array($this->row_data))\n\t\t{\n\t\t\tif (count($this->row_data) === 0)\n\t\t\t{\n\t\t\t\treturn $this->result_object;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$row_index = count($this->row_data);\n\t\t\t\tfor ($i = 0; $i < $row_index; $i++)\n\t\t\t\t{\n\t\t\t\t\t$this->result_object[$i] = (object) $this->row_data[$i];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$row_index = 0;\n\t\t\t$this->row_data = array();\n\t\t}\n\n\t\t$row = NULL;\n\t\twhile ($row = $this->_fetch_object())\n\t\t{\n\t\t\t$this->row_data[$row_index] = (array) $row;\n\t\t\t$this->result_object[$row_index++] = $row;\n\t\t}\n\n\t\t// Un-comment the following line, in case it becomes needed\n\t\t// $this->_data_seek();\n\t\treturn $this->result_object;\n\t}",
"public function fetch($sql){\r\n\t\t\tglobal $link;\r\n\t\t\t$result = mysqli_query($link,$sql);\r\n\t\t\t$arr = array();\r\n\t\t\twhile($rows = mysqli_fetch_object($result))\r\n\t\t\t\t$arr[] = $rows;\r\n\t\t\treturn $arr;\r\n\t\t}",
"public function fetchAll() {\n\t\t$rows = array();//Default\n\t\t//SQL\n\t\t$sql = \"SELECT * FROM `$this->table` WHERE 1 ORDER BY sort_order, uuid ASC\";\n\t\t// excecute SQL statement\n\t\t$result = mysqli_query ( $this->adapter, $sql );\n\t\tif (mysqli_num_rows($result) > 0) {\n\t\t\t// output data of each row\n\t\t\twhile($row = mysqli_fetch_assoc($result)){\n\t\t\t\t$row['done'] = $row['done'] == 0 ? false : true;\n\t\t\t\t$rows[] = $row;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $rows;\t\t\n\t}",
"public function getResult() {\n $this->execute();\n return $this->statement->fetchAll(PDO::FETCH_OBJ);\n }",
"public function fetchAll() {\r\n\t\treturn $this->getMapper()->fetchAll();\r\n\t\t\r\n\t}",
"public function fetch($type = 'object') {\r\n\t\tif (isset ( $this->result )) {\r\n\t\t\tswitch ($type) {\r\n\t\t\t\tcase 'array' :\r\n\t\t\t\t\t\r\n\t\t\t\t\t// fetch a row as array\r\n\t\t\t\t\t$datarows = array ();\r\n\t\t\t\t\twhile ( $row = mysqli_fetch_array ( $this->result ) ) {\r\n\t\t\t\t\t\t$datarows [] = $row;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\t\tcase 'assoc' :\r\n\t\t\t\t\t$datarows = array ();\r\n\t\t\t\t\twhile ( $row = mysqli_fetch_assoc ( $this->result ) ) {\r\n\t\t\t\t\t\t$datarows [] = $row;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\t\tcase 'object' :\r\n\t\t\t\t\r\n\t\t\t\t// fall through...\r\n\t\t\t\t\r\n\t\t\t\tdefault :\r\n\t\t\t\t\t// fetch a row as object\r\n\t\t\t\t\t$row = mysqli_fetch_object ( $this->result );\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn $datarows;\r\n\t\t}\r\n\t\t\r\n\t\treturn FALSE;\r\n\t}",
"public function safe_fetch_row()\n {\n $m_record_set = $this->c_obj_stmt->fetch(PDO::FETCH_NUM);\n return $m_record_set;\n }",
"function fetch_object_array($resource) {\n $result = array();\n if ($this->num_rows($resource) > 0) {\n while($row_obj = mysql_fetch_object($resource)) {\n array_push($result, $row_obj);\n }\n }\n\n return $result;\n }",
"function returnArrays()\r\n\t\t{\r\n\t\tif (mysql_num_rows($this->result) > 0)\r\n\t\t\t{\r\n\t\t\twhile($row=mysql_fetch_assoc($this->result))\r\n\t\t\t\t{\r\n\t\t\t\t$arrays[]=$row;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\treturn $arrays;\r\n\t\t}",
"function fetch_array()\r\n\t\t{\r\n\t\t\tif ($this->affected_rows <> 0)\r\n\t\t\t{\r\n\t\t\t\t$this->row_data = mysql_fetch_array($this->result);\t\t\r\n\t\t\t}\r\n\t\t}",
"public function fetchAll(){\n\t\treturn $this->instance->fetchAll();\n\t}",
"public function getArray()\n {\n return mysqli_fetch_array($this->resulset);\n }",
"public function fetchAll() : array\n {\n $sql = \"SELECT * FROM content;\";\n $resultset = $this->db->executeFetchAll($sql);\n\n return $resultset;\n }",
"public function toArray(): array\n {\n $this->initialize();\n return $this->rows;\n }",
"public function GetRowsAsArray($sql, $dbCatalog = null, $args=null)\r\n\t{\r\n\t\t/**\r\n\t\t * @var $rows mysqli_result\r\n\t\t */\r\n\t\t$rowsPointer = $this->GetRows($sql, $dbCatalog);\r\n\t\t$rows\t\t = array();\r\n\t\tif (!is_object($rowsPointer))\r\n\t\t{\r\n\t\t\tthrow new Exception(\"Invalid data returned from MySql server for query: $sql\");\r\n\t\t}\r\n\t\twhile ($row = $rowsPointer->fetch_assoc())\r\n\t\t{\r\n\t\t\tarray_push($rows, $row);\r\n\t\t}\r\n\t\treturn $rows;\r\n\t}",
"abstract public function getRowAsArray();",
"function fetchAll($res = null, $fmt = 'a')\n{\n\t$rows = array();\n\twhile ($row = $this->drv->fetch($res, $fmt)) {\n\t\t$rows[] = $row;\n\t}\n\treturn $rows;\n}",
"public function fetchAll($r, $t = 'object')\r\n {\r\n // Initalize empty rows array\r\n $rows = array();\r\n\r\n // Fetch all rows for this query resource\r\n while ($row = $this->fetch($r, $t)) $rows[] = $row;\r\n\r\n // Return rows array\r\n return $rows;\r\n }",
"public function resultSet(){\r\n $this->execute();\r\n return $this->stmt->fetchAll(PDO::FETCH_OBJ);\r\n /*PDO::FETCH_OBJ\r\n assim podemos imprimir como objeto exemplo\r\n foreach($users as user){\r\n echo $user->name . '<br>';\r\n ao invés de echo $user['name];\r\n */\r\n }",
"public function get_rows()\n\t{\n//\t\t$rows = new object_list($this->connections_from(array(\"type\" => \"RELTYPE_CHILD\", \"to.class_id\" => crm_bill_row_obj::CLID)));\n\t\t$rows = new object_list(array(\n\t\t\t\"class_id\" => crm_bill_row_obj::CLID,\n\t\t\t\"CL_CRM_BILL_ROW.RELTYPE_CHILD(CL_CRM_BILL_ROW_GROUP).oid\" => $this->id(),\n\t\t\tnew obj_predicate_sort(array(\"jrk\" => \"asc\")),\n\t\t));\n\t\treturn $rows;\n\t}",
"function get_all(){\r\n\t\t$rows = array();\r\n\t\twhile($row = $this->get_row()){\r\n\t\t\t$rows[] = $row;\r\n\t\t}\r\n\t\treturn $rows;\r\n\t}",
"public abstract function fetchAllObjects();",
"public function fetch($sql) {\n\t\t\tglobal $db;\n\t\t\t$result = mysqli_query($db,$sql);\n\t\t\t$arr = array();\n\t\t\twhile ($row = mysqli_fetch_object($result)) {\n\t\t\t\t$arr[] = $row;\n\t\t\t}\n\t\t\treturn $arr;\n\t\t}",
"public function fetch()\n\t{\n\t\treturn $this->data = $this->df->fetchAll();\n\t}",
"public function getAllRows()\n\t{\n\t\treturn $this->foundRows;\n\t}",
"public function getRows($sql,$params = null){\n $result = $this->getResult($sql,$params);\n $rows = [];\n while ($row = $result->fetch_assoc()) {\n $rows[] = $row;\n }\n\n $result->close();\n\n return $rows;\n }",
"public function fetchAll(){\n $resultSet = $this->tableGateway->select();\n return $resultSet;\n }",
"public function fetchAll(int $mode = PDO::FETCH_OBJ, mixed ...$args): array\n {\n $this->setFetchMode($mode);\n $this->results = [];\n\n while ($row = $this->fetch()) {\n $mangledObj = \\get_mangled_object_vars($row);\n\n\t\t if ((\\is_array($row) || \\is_object($row)) && \\is_resource(\\reset($mangledObj))) {\n\t\t\t $stmt = new self($this->connection, \\reset($mangledObj), $this->options);\n $stmt->execute();\n $stmt->setFetchMode($mode);\n\n while ($rs = $stmt->fetch()) {\n $this->results[] = $rs;\n }\n } else {\n $this->results[] = $row;\n }\n }\n\n return $this->results;\n }",
"public function fetchAll( $type = null ){\n if( is_null( $type ) ){\n $type = PDO::FETCH_OBJ;\n }\n\n return $this->stmt->fetchAll( $type );\n }",
"public function fetchAll()\n {\n $result = $this->select();\n return $result;\n }"
]
| [
"0.77305275",
"0.75899523",
"0.7485834",
"0.748185",
"0.7417191",
"0.73758376",
"0.73272216",
"0.7320872",
"0.7319848",
"0.7308405",
"0.73002",
"0.7246603",
"0.720106",
"0.7150102",
"0.71399796",
"0.712762",
"0.7113639",
"0.70948863",
"0.70788234",
"0.7058222",
"0.70473886",
"0.7014643",
"0.700262",
"0.6999818",
"0.69970137",
"0.699381",
"0.69857126",
"0.69821393",
"0.69818133",
"0.698166",
"0.6967347",
"0.6959791",
"0.69594175",
"0.69538724",
"0.69389546",
"0.6932947",
"0.6932947",
"0.69280946",
"0.69249254",
"0.69246644",
"0.69227844",
"0.6920783",
"0.6888096",
"0.6854858",
"0.685238",
"0.6792555",
"0.6791092",
"0.6790952",
"0.6790952",
"0.6783693",
"0.67627025",
"0.6754197",
"0.67211473",
"0.671944",
"0.67178684",
"0.67173964",
"0.67106897",
"0.6707303",
"0.66959596",
"0.66939896",
"0.66856825",
"0.668232",
"0.66778296",
"0.66718054",
"0.6670299",
"0.666773",
"0.6654402",
"0.66519684",
"0.6650425",
"0.66481674",
"0.66451675",
"0.66326463",
"0.6629196",
"0.66220236",
"0.66141313",
"0.66098845",
"0.65988356",
"0.65943414",
"0.65910757",
"0.6590117",
"0.65892214",
"0.65759975",
"0.6574346",
"0.6566981",
"0.6560053",
"0.65584534",
"0.6558278",
"0.6552875",
"0.6530304",
"0.65214276",
"0.65191245",
"0.65116006",
"0.6507602",
"0.65071255",
"0.6497076",
"0.64941627",
"0.6493903",
"0.64914006",
"0.6481557",
"0.6470631"
]
| 0.7031814 | 21 |
/ fetch() Returns the default value of fetchRow() for single result sets and fetchRows() for multi result sets. Meant for convinience. | public function fetch(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function fetchRow();",
"abstract public function FetchRow();",
"public abstract function FetchRow();",
"function FetchRow() {}",
"public function fetch() {\n\t\t$this->checkResultSet();\n\t\treturn $this->fetchRowAssoc();\n\t}",
"public abstract function fetchRow($result_set);",
"public function fetch($fetchMode = \\PDO::FETCH_BOTH);",
"public function fetchRow( $type = FETCH_OBJ );",
"abstract public function fetch($fetchType = \\PDO::FETCH_ASSOC);",
"public function fetch()\n {\n return $this->statement->fetch();\n }",
"public function fetch()\r\n {\r\n $this->query();\r\n return $this->sth->fetch();\r\n }",
"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()\n {\n $row = oci_fetch_row($this->statement);\n return $row;\n }",
"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 }",
"public function fetchRows( $type = FETCH_OBJ );",
"function fetchRow() {\r\n if($this->getNumRows() > 0)\r\n return mysql_fetch_array($this->m_Result);\r\n else\r\n return false;\r\n }",
"function db_fetch_next_row( $fetch_mode = DB_FETCHMODE_ASSOC ) {\n\n $this->pm_clear_cols();\n if( ! is_object( $this->dataset_obj )) return NULL;\n\n $this->curr_row_array = $this->dataset_obj->fetchRow( $fetch_mode );\n $this->pm_die_if_error( 'curr_row_array' );\n\n if( is_array( $this->curr_row_array )) { # Some data was retrieved\n $this->curr_rowno++;\n $this->cols_in_curr_row = count( $this->curr_row_array );\n }\n\n return $this->curr_row_array;\n }",
"public function fetchRow($sql);",
"public function fetchRow($sql);",
"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}",
"public function fetch(&$statement)\n {\n return $this->db_handler->fetchSingleRow($statement);\n }",
"public function fetch_row()\r\n{\r\n\t$tmp2 = $this->_result->fetch_row();\r\n\t$this->type = 1; // MYSQLI_ASSOC = 0, MYSQLI_NUM = 1, or MYSQLI_BOTH (To implement). \r\n\t$this->push_in($tmp2);\r\n\t\r\n\treturn $tmp2;\r\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($resultset = \"NONEE\"){\n\t\tif($resultset === \"NONEE\")\n\t\t\t$resultset = $this->resultset;\n\t\treturn $resultset = $this->showErrors ? mysqli_fetch_array($resultset) : @mysqli_fetch_array($resultset); \n\t}",
"public function fetchRow(){\n $this->debugBacktrace();\n $this->fetchType = \"fetch_row\";\n return $this;\n }",
"public function fetch()\n {\n return mysqli_fetch_assoc($this->lastResults);\n }",
"function FetchRow() {\n\t\t\treturn pg_fetch_row($this->result);\n\t\t}",
"public function queryRow()\n\t{\n\t\treturn $this->queryInternal('fetch',$this->_fetchMode);\n\t}",
"public function fetch() {\r\n $this->resource_fetched=true;\r\n return new dbconnect_rowset($this, $this->result);\r\n }",
"function fetchRow ()\n {\n return pg_fetch_array($this->_result);\n }",
"public function fetchResult();",
"public function testFetchReturnsSingleRowFromResultSet() {\n $fixture = array(\n \"col1\" => \"value1\",\n \"col2\" => \"value2\"\n );\n \n $stub = $this->getMockBuilder(\"\\Examples\\ThriftServices\\Hive\\HivePDOStatement\")\n ->disableOriginalConstructor()\n ->setMethods(array(\"hasResultSet\", \"_fetch\"))\n ->getMock();\n \n $stub->expects($this->once())\n ->method(\"hasResultSet\")\n ->will($this->returnValue(false));\n \n $rs = $this->getMockBuilder(\"\\Examples\\ThriftServices\\Hive\\HivePDOResultSet\")\n ->disableOriginalConstructor()\n ->getMock();\n \n $rs->expects($this->once())\n ->method(\"isEmpty\")\n ->will($this->returnValue(false));\n \n $rs->expects($this->once())\n ->method(\"getRow\")\n ->will($this->returnValue($fixture));\n \n $stub->expects($this->once())\n ->method(\"_fetch\")\n ->will($this->returnValue($rs));\n \n $result = $stub->fetch();\n $this->assertEquals(count($fixture), count($result));\n $this->assertInternalType('array', $result);\n $this->assertSame($fixture, $result);\n }",
"public function fetch($type = 'object') {\r\n\t\tif (isset ( $this->result )) {\r\n\t\t\tswitch ($type) {\r\n\t\t\t\tcase 'array' :\r\n\t\t\t\t\t\r\n\t\t\t\t\t// fetch a row as array\r\n\t\t\t\t\t$datarows = array ();\r\n\t\t\t\t\twhile ( $row = mysqli_fetch_array ( $this->result ) ) {\r\n\t\t\t\t\t\t$datarows [] = $row;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\t\tcase 'assoc' :\r\n\t\t\t\t\t$datarows = array ();\r\n\t\t\t\t\twhile ( $row = mysqli_fetch_assoc ( $this->result ) ) {\r\n\t\t\t\t\t\t$datarows [] = $row;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\t\tcase 'object' :\r\n\t\t\t\t\r\n\t\t\t\t// fall through...\r\n\t\t\t\t\r\n\t\t\t\tdefault :\r\n\t\t\t\t\t// fetch a row as object\r\n\t\t\t\t\t$row = mysqli_fetch_object ( $this->result );\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn $datarows;\r\n\t\t}\r\n\t\t\r\n\t\treturn FALSE;\r\n\t}",
"public function fetchRow() : array\n\t{\n\t\treturn $this->handle->fetchRow($this->result);\n\t}",
"abstract public function fetch();",
"abstract public function fetch();",
"public function fetchRow()\n\t{\n\t\t$this->_query();\n\n\t\treturn $this->stmt->fetch(\\PDO::FETCH_ASSOC);\n\t}",
"public function fetch()\n {\n $this->execute();\n return $this->dbStmt->fetch(PDO::FETCH_ASSOC);\n }",
"public function fetchRow($result_set)\n\t{\n\t\treturn $result_set->fetch_row();\n\t}",
"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}",
"function fetch()\n {\n return mysqli_fetch_assoc($this->dboutcomes);\n }",
"public function fetch($fetch_style = \\PDO::FETCH_ASSOC)\n\t{\n\t\treturn $this->getStatement()\n\t\t\t\t\t->fetch($fetch_style);\n\t}",
"protected function fetch_row()\n\t{\n\t\treturn $this->resResult->fetch(PDO::FETCH_NUM);\n\t}",
"abstract protected function fetchRowAssocDb();",
"public function fetch_row()\n\t{\n\t\t$row = array();\n\t\tif (current($this->result)) {\n\t\t\tforeach (current($this->result) AS $value) {\n\t\t\t\t$row[] = $value;\n\t\t\t}\n\t\t}else {\n\t\t\t$row = FALSE;\n\t\t}\n\t\tnext($this->result);\n\t\treturn $row;\n\t}",
"public function fetchRow()\n {\n if (!$this->_rs) {\n return false;\n }\n\n return new $this->_rowClass($this->_rs->FetchRow());\n }",
"public function fetch()\n\t{\n\t\t//$this -> error();\n\t\t$dbName = $this -> databaseName;\n\t\treturn $dbName() -> fetch();\n\t}",
"abstract public function fetchAll($fetchType = \\PDO::FETCH_ASSOC);",
"public function fetch()\n\t{\n\t\treturn $this->data = $this->df->fetchAll();\n\t}",
"function fetch_assoc()\n {\n if (!$this->res_result) {\n $this->error = \"No Resultset can be fetched from query\";\n return null;\n } else {\n $_rec = @isis_fetch_flat_array($this->res_result);\n }\n\n return $_rec;\n }",
"public function safe_fetch_row()\n {\n $m_record_set = $this->c_obj_stmt->fetch(PDO::FETCH_NUM);\n return $m_record_set;\n }",
"function FetchRow(){\n if ($this->parse){\n $this->data =PHP_MAJOR_VERSION>5?mysqli_fetch_assoc($this->parse):mysql_fetch_assoc($this->parse);\n return $this->data;\n }else{\n return false;\n };\n }",
"public function fetchAll($fetchMode = \\PDO::FETCH_BOTH);",
"function fetch() {\n\t\t$this->i++;\n\t\treturn $this->result->fetch_object($this->class_name);\n\t}",
"public abstract function fetch($result_set, $class_name = null);",
"public function fetch()\n {\n return mysql_fetch_object($this->res);\n }",
"public function fetch()\n {\n\n if ($this->_result !== null) {\n if (($row = $this->_result->fetch(PDO::FETCH_ASSOC))=== false ) {\n $this->freeResult();\n\n }\n return $row;\n }\n return false;\n }",
"public function fetch($fetchAs = \"FETCH_ASSOC\")\r\n\t\t{\r\n\t\t\treturn $this->_query->fetch(constant(\"PDO::{$fetchAs}\"));\r\n\t\t}",
"public function fetch($singleResult = false, $type = 'array')\n {\n $result = null;\n\n $this->execute();\n $mysqlResult = $this->preparedQuery->get_result();\n\n if (isset($mysqlResult))\n {\n switch ($type)\n {\n case 'array':\n\n // If our query is aimed at selecting a single result (select by id)\n if ($singleResult)\n {\n $result = $mysqlResult->fetch_assoc();\n }\n else // Fetch a row as an array\n {\n while ($row = $mysqlResult->fetch_assoc())\n {\n $result[] = $row;\n }\n }\n\n break;\n\n case 'object':\n\n if ($singleResult)\n {\n $result = $mysqlResult->fetch_object();\n }\n else // Fetch a row as an array\n {\n while ($row = $mysqlResult->fetch_object())\n {\n $result[] = $row;\n }\n }\n\n break;\n }\n }\n\n return $result;\n }",
"public function testResultFetchRow()\n {\n \t$result = $this->conn->query(\"SELECT * FROM test\");\n \t\n \t$this->assertEquals(array(1, 'one', 'first row', 'ACTIVE'), $result->fetchRow(DB::FETCH_ORDERED));\n \t$this->assertEquals(array('id'=>2, 'key'=>'two', 'title'=>'next row', 'status'=>'ACTIVE'), $result->fetchAssoc(DB::FETCH_ASSOC));\n \t$this->assertEquals(array(3, 'three', 'another row', 'PASSIVE', 'id'=>3, 'key'=>'three', 'title'=>'another row', 'status'=>'PASSIVE'), $result->fetchRow(DB::FETCH_FULLARRAY));\n \t$this->assertNull($result->fetchRow(DB::FETCH_ORDERED));\n \t\n \t$result->resetPointer();\n \t$this->assertEquals(array('id'=>1, 'key'=>'one', 'title'=>'first row', 'status'=>'ACTIVE'), $result->fetchRow(DB::FETCH_ASSOC));\n \t$this->assertEquals(2, $result->fetchRow(DB::FETCH_VALUE), \"Fetch after reset pointer: \");\n }",
"function fetch_row($result)\n{\n\treturn mysqli_fetch_row($result); \n}",
"public function delegateFetch(DbalStatement $dbal_statement, $mode, $fetch_class);",
"function fetch($result, $type = 'array')\n\t{\n\t\tswitch($type)\n\t\t{\n\t\t\tcase \"array\":\n\t\t\t\treturn ($result) ? @mysqli_fetch_array($result) : false;\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase \"row\":\n\t\t\t\treturn ($result) ? @mysqli_fetch_row($result) : false;\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase \"assoc\":\n\t\t\t\treturn ($result) ? @mysqli_fetch_assoc($result) : false;\n\t\t\tbreak;\n\t\t}\n\t}",
"public function fetch($assoc=MYSQLI_ASSOC){\n\t\t$this->assoc=$assoc;\n\t\treturn @$this->qresult->fetch_array($this->assoc);\n\t}",
"protected function fetch() \n {\n $record = $this->statement->fetch(PDO::FETCH_ASSOC);\n\n if($record === false) {\n return false;\n }\n\n foreach($this->mappers as $mapper) {\n $record = $mapper($record);\n }\n\n return $record;\n }",
"public function fetch($id){\n\t\t$row = $this->query(\"SELECT * FROM $this->tabla WHERE id='$id'\");\n\t\t\n\t\t$row = $this->fetchRow();\n\t\t\t\n\t\t//if(!$row=mysql_query(\"SELECT * FROM $this->tabla WHERE id='$id'\")){\n\t\t\t//throw new Exception('Error en el fetch');\n\t\t\n\t\treturn $row;\n\t}",
"function fetch($query, $resultType = MYSQLI_NUM){\r\n\r\n\t\tif($result = $this->query($query)) return $result->fetch_all($resultType);\r\n\t\treturn null;\r\n\t}",
"function fetch($result) {\n\t\n\t$row = mysql_fetch_array($result);\n\t\n\treturn $row;\n}",
"function pdo_fetch(PDOStatement $pdo_statement, $fetch_style = PDO::FETCH_ASSOC)\n {\n return $pdo_statement->fetch($fetch_style);\n }",
"abstract public function fetchData();",
"abstract public function fetchData();",
"function fetchResult() {\n\t\tif ($row = mysql_fetch_row($this->results)) {\n\t\t\t$resultRow = array();\n\t\t\t$i = 0;\n\t\t\tforeach ($row as $index => $field) {\n\t\t\t\tlist($table, $column) = $this->map[$index];\n\t\t\t\t$resultRow[$table][$column] = $row[$index];\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\treturn $resultRow;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"private function pdoFetch ( $SQL, array $arrParams = array(), $fetch_class = null )\n {\n $stmt = $this->_driver->prepare($SQL);\n if ( $fetch_class ) {\n $stmt->setFetchMode(PDO::FETCH_CLASS, get_class($fetch_class));\n $stmt->execute($arrParams);\n $result = $stmt->fetchAll();\n } else {\n $stmt->setFetchMode(PDO::FETCH_ASSOC);\n\n $stmt->execute($arrParams);\n $result = $stmt->fetchAll();\n }\n\n return $result;\n\n }",
"function fetchRow() {\n $result = $this->_conn->fetchRow();\n if ($result == false) {\n return false;\n }\n $dm = $this->_formatTag($result);\n return $dm;\n }",
"public function fetch(int $mode = \\PDO::ATTR_DEFAULT_FETCH_MODE, int $cursorOrientation = PDO::FETCH_ORI_NEXT, int $cursorOffset = 0);",
"public function fetch($data_type = 'array'){\n\t\tswitch ($data_type) {\n\t\tcase 'row_array':\n\t\t\t$this->stmt->setFetchMode(PDO::FETCH_ASSOC);\n\t\t\tbreak;\n\t\tcase 'object':\n\t\t\t$this->stmt->setFetchMode(PDO::FETCH_OBJ);\n\t\t\tbreak;\n\t\t//Grabs all the rows and sticks them into a big array\n\t\tcase 'array':\n\t\t\t$array = array();\n\t\t\t$this->stmt->setFetchMode(PDO::FETCH_ASSOC);\n\t\t\twhile ($row = $this->stmt->fetch()){\n\t\t\t\t$array[] = $row;\n\t\t\t}\n\t\t\tif ($this->stmt->rowCount() == 0) return FALSE;\n\t\t\telse return $array;\n\t\t}\n\n\t\tif ($this->stmt->rowCount() == 0) return FALSE;\n\t\telse return $this->stmt->fetch();\n\t}",
"public function exec_SELECTgetSingleRow() {}",
"public function fetch($fetch_style = NULL, $cursor_orientation = false, $cursor_offset = false)\n {\n }",
"function fetch($result)\n\t{\n\t\treturn mysql_fetch_assoc($result);\n\t}",
"public function fetch($query, Database_Config $databaseConfig = NULL);",
"public function fetch_row()\n {\n return $this->fetch_assoc();\n }",
"public function fetch($fetch_style = PDO::FETCH_BOTH, $cursor_orientation = PDO::FETCH_ORI_NEXT, $cursor_offset = 0) {\n //not sure how to resolve this functionality.\n //This function relies on us having called PDOStatement::execute which has functionality more similar to odbc_execute,\n //but we are interacting with the results from what seems to be odbc_exec. The key thing here being the bound parameters\n //UPDATE::Looks like this has been resolved ^^. Still testing\n if (!isset($fetch_style)) $fetch_style = isset($this->fetch_mode) ? $this->fetch_mode : PDO::FETCH_BOTH;\n $result = false;\n if (!$this->success) return false;\n ob_start();\n switch ($fetch_style) {\n case (PDO::FETCH_NAMED):\n //todo\n //not sure how to emulate 1:1\n case (PDO::FETCH_ASSOC):\n $result = odbc_fetch_array($this->stmt);\n break;\n case (PDO::FETCH_BOTH):\n $result = odbc_fetch_array($this->stmt) ?: [];\n if (is_array($result))\n $result = array_merge($result, array_values($result ?: []));\n break;\n case (PDO::FETCH_BOUND):\n //todo link with the bindColumn function\n return true;\n break;\n case (PDO::FETCH_CLASS):\n //todo use the splat operator to unpack the arguments instead of using a reflection class\n $reflect = new ReflectionClass($this->fetch_receptacle);\n $fetch_receptacle = $reflect->newInstanceArgs($this->ctor_args ?: []);\n case (PDO::FETCH_INTO):\n $fetch_receptacle = isset($fetch_receptacle) ? $fetch_receptacle : $this->fetch_receptacle ?: new stdClass();\n $result = [];\n odbc_fetch_into($this->stmt, $result);\n #Assume that the fetch_receptacle is either an object or an array\n $r_is_array = is_array($fetch_receptacle);\n foreach ($result as $index => $item) {\n if ($r_is_array) $fetch_receptacle[$index] = $item;\n else $fetch_receptacle->{$index} = $item;\n }\n $result = $fetch_receptacle;\n break;\n case (PDO::FETCH_LAZY):\n $obj = new PDORow;\n $result = odbc_fetch_array($this->stmt);\n foreach ($result as $index => $item) {\n $obj->{$index} = $item;\n }\n $result = $obj;\n break;\n case (PDO::FETCH_NUM):\n $result = odbc_fetch_array($this->stmt);\n if ($result)\n $result = array_values($result);\n break;\n case (PDO::FETCH_OBJ):\n #todo, not 1:1\n $result = odbc_fetch_object($this->stmt);\n break;\n }\n $error = ob_get_clean();\n if (!$result) $this->throw_error($error);\n return $result;\n }",
"public function getFetch()\n {\n return $this->get(self::_FETCH);\n }",
"public function fetch_single(): mixed\n {\n $sth = $this->query(func_get_args());\n if(is_object($sth)) {\n return $sth->fetch();\n } else {\n return $sth;\n }\n }",
"public function fetch($fetchStyle= null);",
"public function testFetchReturnsEmptyRowWithResultSet() {\n $stub = $this->getMockBuilder(\"\\Examples\\ThriftServices\\Hive\\HivePDOStatement\")\n ->disableOriginalConstructor()\n ->setMethods(array(\"hasResultSet\", \"getResultSet\", \"_fetch\"))\n ->getMock();\n \n $stub->expects($this->once())\n ->method(\"hasResultSet\")\n ->will($this->returnValue(true));\n \n $rs = $this->getMockBuilder(\"\\Examples\\ThriftServices\\Hive\\HivePDOResultSet\")\n ->disableOriginalConstructor()\n ->getMock();\n \n $rs->expects($this->exactly(2))\n ->method(\"isEmpty\")\n ->will($this->onConsecutiveCalls(false, true));\n \n $rs->expects($this->once())\n ->method(\"key\")\n ->will($this->returnValue(null));\n\n $stub->expects($this->once())\n ->method(\"getResultSet\")\n ->will($this->returnValue($rs));\n \n $stub->expects($this->once())\n ->method(\"_fetch\")\n ->will($this->returnValue($rs));\n \n $result = $stub->fetch();\n $this->assertEmpty($result);\n $this->assertInternalType('array', $result);\n }",
"public function fetch($rs,$fetchMode=self::DB_FETCH_DEFAULT){\n\t\t$fields=mysqli_fetch_fields($rs);\n\t\t$values=mysqli_fetch_array($rs,$fetchMode);\n\t\tif($values){\n\t\t\tforeach ($fields as $field){\n\t\t\t\tswitch ($field->type){\n\t\t\t\t\tcase MYSQLI_TYPE_TINY:\n\t\t\t\t\tcase MYSQLI_TYPE_SHORT:\n\t\t\t\t\tcase MYSQLI_TYPE_INT24:\n\t\t\t\t\tcase MYSQLI_TYPE_LONG:\n\t\t\t\t\t\tif($field->type==MYSQLI_TYPE_TINY&& $field->length==1){\n\t\t\t\t\t\t\t$values[$field->name]=(boolean)$values[$field->name];\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$values[$field->name]=(int)$values[$field->name];\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase MYSQLI_TYPE_DECIMAL:\n\t\t\t\t\tcase MYSQLI_TYPE_FLOAT:\n\t\t\t\t\tcase MYSQLI_TYPE_DOUBLE:\n\t\t\t\t\tcase MYSQLI_TYPE_LONGLONG:\n\t\t\t\t\t\t$values[$field->name]=(float)$values[$field->name];\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $values;\n\t}",
"public static function oneRow( $sql, $params =array(), $fetchStyle = PDO::FETCH_ASSOC ) {\n // public static function oneRow( $sql, $params =array(), $fetchStyle = PDO::FETCH_ASSOC ) {\n $result = null;\n try {\n $stmt = self::getPdoCon()->prepare($sql);\n $stmt->execute($params); // won't allow to pass null value , all value send as a string\n $result = $stmt->fetch($fetchStyle);\n\n\n // result 1.false 2. error occur \n // if($result === false){ $result = null ;} \n $errorInfo = self::getPdoCon()->errorInfo(); \n if($errorInfo[2] !== null ){ var_dump($errorInfo[2]); }\n\n //useful for database drivers that do not support executing a PDOStatement object\n // when a previously executed PDOStatement object still has unfetched rows\n // $stmt->closeCursor();\n }\n catch(PDOException $e) {\n self::catchException($sql, $e);\n }\n return $result;\n }",
"function fetch_array()\r\n\t\t{\r\n\t\t\tif ($this->affected_rows <> 0)\r\n\t\t\t{\r\n\t\t\t\t$this->row_data = mysql_fetch_array($this->result);\t\t\r\n\t\t\t}\r\n\t\t}",
"public function one($fetch_style = \\PDO::FETCH_BOTH, $cursor_orientation = \\PDO::FETCH_ORI_NEXT, $cursor_offset = 0)\n\t{\n\t\t$rc = $this->fetch(...func_get_args());\n\n\t\t$this->closeCursor();\n\n\t\treturn $rc;\n\t}",
"function fetchOne($sql)\n\t{\n\t\t$this->sql =& $sql;\n\t\t$queryresult = $this->execute_query(true, $this->connection_master);\n\t\t$returnresult = $this->result($queryresult);\n\t\t$this->free_result($queryresult);\n\t\treturn $returnresult;\n\t}",
"function FetchRowA(){\n if ($this->parse){\n $this->data = PHP_MAJOR_VERSION>5?mysqli_fetch_array($this->parse):mysql_fetch_array($this->parse);\n return($this->data);\n }else{\n return(false);\n }; \n }"
]
| [
"0.7982333",
"0.79781806",
"0.7792516",
"0.7739868",
"0.7704589",
"0.7408184",
"0.73965937",
"0.7324192",
"0.7283963",
"0.71251744",
"0.71169955",
"0.7110409",
"0.70892346",
"0.70466095",
"0.69929546",
"0.6987008",
"0.69775367",
"0.69722205",
"0.69722205",
"0.6959401",
"0.6957754",
"0.6955995",
"0.69181275",
"0.6906437",
"0.68747354",
"0.6872177",
"0.68644655",
"0.685734",
"0.6808122",
"0.67940307",
"0.6778522",
"0.67625904",
"0.6753199",
"0.6731787",
"0.6730825",
"0.6730825",
"0.6727505",
"0.6723267",
"0.67224115",
"0.6721598",
"0.6720353",
"0.67156935",
"0.6696003",
"0.6669372",
"0.66252613",
"0.662029",
"0.66177607",
"0.659966",
"0.65952516",
"0.656113",
"0.65560216",
"0.6508584",
"0.6504506",
"0.6502515",
"0.6502336",
"0.6500177",
"0.6496899",
"0.64946425",
"0.6482687",
"0.6469383",
"0.6448508",
"0.6438703",
"0.64233834",
"0.64232785",
"0.64038867",
"0.63709533",
"0.6365921",
"0.63634545",
"0.6348969",
"0.6344696",
"0.6344696",
"0.6343634",
"0.633461",
"0.6317026",
"0.6315389",
"0.63052624",
"0.62984496",
"0.6284637",
"0.6274873",
"0.6270959",
"0.6270945",
"0.62604696",
"0.6253136",
"0.62475437",
"0.6247204",
"0.623731",
"0.6225265",
"0.6214276",
"0.62140596",
"0.620354",
"0.6200782",
"0.61975455"
]
| 0.6594668 | 57 |
/ reset() Resets the result set pointer back to the first record | public function reset(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function rewind() {\n\t\tif( $this->isDirty() ) { $this->executeQuery(); }\n\t\t$this->_currentRow = 0;\n\t}",
"public function rewind() {\n\t\t// Init the recordset if needed.\n\t\t$this->initRecordSet();\n\t\t// Move to first element\n\t\t$this->recordSet->MoveFirst();\n\t\t// Current index is the first index\n\t\t$this->currentIndex = 0;\n\t}",
"public function reset()\n {\n // reset properties\n $this->query = '';\n $this->rewind();\n \n // release result resource\n if (!empty($this->db) && !empty($this->result) &&\n is_resource($this->db) && is_resource($this->result)) {\n $this->free_result();\n }\n }",
"public function rewind()\n\t{\n\t\t$this->databaseResult->rewind();\n\t}",
"public function rewind()\n\t{\n\t\t$this->pointer = 0;\n\t\t$this->row = $this->result->get(0);\n\t}",
"public function reset()\n\t{\n\t\t$this->get(1);\n\t}",
"public function rewind() {\n\t\t$this->checkResultSet();\n\t\t$this->rowData = null;\n\t\t$this->index = 0;\n\t\treturn $this;\n\t}",
"public function rewind() {\r\n\t\t$this->_iteratorArray = $this->select();\r\n\t\t$this->_iteratorPos = 0;\r\n\t}",
"public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_RSEED] = null;\n }",
"public function rewind()\n\t{\n\t\t// not supported\n\t\tif ($this->foreach_count) {\n\t\t\tthrow new ORMException('You cannot use the same result set in multiple foreach.');\n\t\t}\n\n\t\t$this->current = $this->runFetch();\n\n\t\t$this->foreach_count++;\n\t}",
"public function reset()\n {\n $this->values[self::_RESULT] = null;\n }",
"public function reset()\n {\n $this->values[self::_RESULT] = null;\n }",
"public function reset()\n {\n $this->values[self::_RESULT] = null;\n }",
"public function reset()\n {\n $this->values[self::_RESULT] = null;\n }",
"public function reset()\n {\n $this->values[self::_RESULT] = null;\n }",
"public function reset()\n {\n $this->values[self::_RESULT] = null;\n }",
"public function reset()\n {\n $this->values[self::_RESULT] = null;\n }",
"public function reset()\n {\n $this->values[self::_RESULT] = null;\n }",
"public function reset()\n {\n $this->values[self::_RESULT] = null;\n }",
"public function reset()\n {\n $this->values[self::_RESULT] = null;\n }",
"public function reset()\n {\n $this->values[self::_RESULT] = null;\n }",
"public function reset()\n {\n $this->values[self::_RESULT] = null;\n }",
"public function reset()\n {\n $this->values[self::_RESULT] = null;\n }",
"public function reset()\n {\n $this->values[self::_RESULT] = null;\n }",
"public function reset()\n {\n $this->values[self::_RESULT] = null;\n }",
"public function reset()\n {\n $this->values[self::_RESULT] = null;\n }",
"public function reset()\n {\n $this->values[self::_RESULT] = null;\n }",
"public function reset()\n {\n $this->values[self::_RESULT] = null;\n }",
"public function reset()\n {\n $this->values[self::_RESULT] = null;\n }",
"public function reset()\n {\n $this->values[self::_RESULT] = null;\n }",
"public function reset()\n {\n $this->values[self::_RESULT] = null;\n }",
"public function reset()\n {\n $this->values[self::_RESULT] = null;\n }",
"public function reset()\n {\n $this->values[self::_RESULT] = null;\n }",
"public function reset()\n {\n $this->values[self::_RESULT] = null;\n }",
"public function reset()\n {\n $this->values[self::_RESULT] = null;\n }",
"public function reset()\n {\n $this->values[self::_RESULT] = null;\n }",
"public function rewind()\n\t{\n\t\tif (is_a($this->rs,'iterator'))\n\t\t{\n\t\t\treturn $this->rs->rewind();\n\t\t}\n\t}",
"public function reset()\n {\n $this->values[self::_RECORD] = null;\n }",
"private function resetResults() {\n $this->results = array();\n }",
"public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_HERO] = null;\n }",
"public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_HERO] = null;\n }",
"public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_HERO] = null;\n }",
"function Reset ( )\n{\n $this->_dataset = array();\n $this->_ReversedRecord = false;\n $this->_CurrPtr = -1;\n $this->_PageCount = 0;\n $this->_RecordCount = 0;\n $this->_new_page_(0);\n $this->_isAscending = true;\n $this->_FilterExp = '';\n}",
"public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_REWARD] = null;\n }",
"protected function reset() {\n //query builder reset\n $this->queryBuilder->reset();\n $this->numRows = 0;\n $this->insertId = null;\n $this->query = null;\n $this->result = array();\n $this->data = array();\n $this->queryCount = 0;\n }",
"public function reset()\n {\n $this->values[self::_RECORDS] = array();\n }",
"public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_BEST_RANK_REWARD] = null;\n $this->values[self::_BEST_RANK] = null;\n $this->values[self::_CUR_RANK] = null;\n }",
"public function rewind()\n {\n $method = $this->getMethodForReset();\n call_user_func([$this->result, $method]);\n }",
"public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_RSEED] = null;\n $this->values[self::_HERO_BASES] = array();\n $this->values[self::_HERO_DYNAS] = array();\n }",
"public function reset()\n {\n // Reset the pointer\n $this->pointer = 0;\n \n // Reset query\n $this->query = '';\n \n // Reset results\n $this->result = null;\n \n // Reset Stats and Counters\n $this->count = 0;\n $this->insertID = 0;\n $this->insertId = 0; // Legacy / X11\n $this->affected = 0;\n \n return $this;\n }",
"public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_FROM] = null;\n $this->values[self::_UID] = null;\n $this->values[self::_HERO] = null;\n }",
"public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_REWARDS] = array();\n }",
"public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_HERO] = null;\n $this->values[self::_ITEMS] = array();\n }",
"public function reset() {\n\t\tif (is_object($this->_result) && method_exists($this->_result, 'rewind')) {\n\t\t\t$this->_closed = false;\n\t\t\t$this->_init = false;\n\t\t\t$this->_started = false;\n\t\t\t$this->_valid = false;\n\t\t\t$this->_data = [];\n\t\t\t$this->_index = [];\n\t\t\t$this->_result->rewind();\n\t\t\t$this->_columns = $this->_columnMap();\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public function reset()\n {\n $this->values[self::_RESULT] = array();\n }",
"public function reset()\n {\n $this->values[self::_RESULT] = array();\n }",
"public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_NEW_MAN] = null;\n }",
"public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_EXCAVATE] = null;\n }",
"public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_LEFT_TIME] = null;\n }",
"public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_EXCAVATE] = null;\n $this->values[self::_REWARD] = null;\n }",
"public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_INFO] = null;\n }",
"public function reset() {\r\n\t\tforeach ($this->_metadata->getNames() as $name){\r\n\t\t\tif($this->isPrimaryKey($name)){\r\n\t\t\t\t$this->_record[$name] = $this->getPrimaryKey() ;\r\n\t\t\t}else{\r\n\t\t\t\t$this->_record[$name] = $this->{$name} ;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $this->_record ;\r\n\t}",
"function FreeResultset()\r\n\t\t{\r\n\t\t\tif( isset($this->row) )\r\n\t\t\t\tunset( $this->row );\r\n\t\t\t\t\r\n\t\t\tif( isset($this->resultset) )\r\n\t\t\t{\r\n\t\t\t\t$this->ReleaseResultset( $this->resultset );\r\n\t\t\t\t\r\n\t\t\t\tunset( $this->resultset );\t\t\t\r\n\t\t\t}\r\n\t\t}",
"public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_ACTIVITY_REWARD] = array();\n }",
"public function rewind(): void\n {\n if ($this->position != 1) {\n $this->position = 1;\n $this->data = [];\n $this->fetchMore();\n }\n }",
"protected function reset()\n {\n $this->iterator->rewind();\n }",
"public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_RAID_ID] = null;\n $this->values[self::_LEFT_TIME] = null;\n }",
"public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_ITEMS] = array();\n $this->values[self::_HERO] = array();\n $this->values[self::_DIAMOND] = null;\n }",
"protected function _reset()\r\n\t\t{\r\n\t\t\t$this->_select = '*';\r\n\t\t\t$this->_where = \"\";\r\n\t\t\t$this->_orderBy = \"\";\r\n\t\t\treturn null;\r\n\t\t}",
"public function rewind()\n {\n $this->current = ldap_first_entry($this->handle, $this->result);\n }",
"public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_HIRE_REWARD] = null;\n $this->values[self::_STAY_REWARD] = null;\n $this->values[self::_HEROID] = null;\n }",
"function reset() {\n\n\t\treturn $this->iterator->reset();\n\n\t}",
"public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_PACK] = null;\n }",
"public function reset()\n {\n $this->_metaData = array();\n $this->_columnMap = array();\n }",
"protected function dbReset() {\r\n $this->query_result = '';\r\n }",
"public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_SHOP] = null;\n }",
"public function reset()\n {\n $this->values[self::_INDEX] = null;\n $this->values[self::_ITEM_ID] = null;\n $this->values[self::_EXP] = null;\n }",
"public function rewind(){\n $this->index = 0;\n }",
"public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_BUY_TIMES] = null;\n }",
"public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_INCOME] = null;\n }",
"public function reset()\n {\n $this->values[self::_SUMMARY] = array();\n $this->values[self::_SELF_RANKING] = null;\n $this->values[self::_SELF_SUMMARY] = null;\n }",
"public function rewind() {\n reset($this->data);\n }",
"public function rewind() {\n reset($this->data);\n }",
"public function reset()\n {\n $this->values[self::_SELF_TEAM] = null;\n $this->values[self::_OPPO_TEAM] = null;\n $this->values[self::_RESULT] = null;\n $this->values[self::_RECORD_ID] = null;\n $this->values[self::_RECORD_SVRID] = null;\n }",
"public function resetQuery(): void\n\t{\n\t\t$this->state = new State();\n\t\t$this->explain = FALSE;\n\t}",
"public function reset()\n {\n $this->hasLimit = false;\n $this->limit = 0;\n $this->offset = 0;\n $this->orderColumns = array();\n parent::reset();\n }",
"public function rewind()\n {\n reset($this->values);\n }",
"function reset() {\n\t\t$this->_SourceID = 0;\n\t\treturn $this->_resetSet();\n\t}",
"public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_USER] = null;\n $this->values[self::_TIME_ZONE] = null;\n }",
"public function clearResult() {\n $this->_dataHandler->clearResult();\n }",
"public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_GS] = null;\n }",
"public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_GS] = null;\n }",
"public function reset()\n {\n $this->values[self::_RET] = null;\n }",
"public function reset()\n {\n $this->values[self::_RET] = null;\n }",
"public function rewind()\n {\n reset($this->data);\n $this->current_index = 0;\n }",
"public function rewind() {\n $this->currentRow = NULL;\n $fields = array();\n foreach ($this->sourceKeyMap as $field) {\n $fields[] = $field;\n }\n foreach ($this->destinationKeyMap as $field) {\n $fields[] = $field;\n }\n\n /* TODO\n if (isset($this->options['itemlimit'])) {\n $query = $query->range(0, $this->options['itemlimit']);\n }\n */\n $this->result = $this->connection->select($this->mapTable, 'map')\n ->fields('map', $fields)\n ->execute();\n $this->next();\n }",
"public function rewind(): void\n {\n reset($this->data);\n }",
"public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_LINEUP] = array();\n $this->values[self::_GS] = null;\n }",
"private function reset()\n\t{\t\t\n\t\t$this->limit = null;\n\t\t\n\t\t$this->table = null;\n\t\t\n\t\t$this->offset = null;\n\t\t\n\t\t$this->data = [];\n\t\t\n\t\t$this->joins = [];\n\t\t\n\t\t$this->wheres = [];\n\t\t\n\t\t$this->orderBy = [];\n\t\t\n\t\t$this->selects = [];\n\t\t\n\t\t$this->bindings = [];\n\t\t\t\n\t}",
"public function rewind()\n {\n reset($this->data);\n }",
"public function rewind()\n {\n reset($this->data);\n }"
]
| [
"0.74470717",
"0.7405898",
"0.7273711",
"0.7256395",
"0.72193915",
"0.7157491",
"0.71262115",
"0.7076672",
"0.7063868",
"0.7058858",
"0.6920476",
"0.6920476",
"0.6920476",
"0.69197536",
"0.69197536",
"0.69197536",
"0.69197536",
"0.69197536",
"0.69197536",
"0.69197536",
"0.69197536",
"0.69197536",
"0.69197536",
"0.69197536",
"0.69197536",
"0.69197536",
"0.69197536",
"0.69197536",
"0.69197536",
"0.69197536",
"0.69197536",
"0.69197536",
"0.69197536",
"0.69197536",
"0.69197536",
"0.69197536",
"0.69083875",
"0.6901755",
"0.6866161",
"0.6864205",
"0.6864205",
"0.6864205",
"0.6859994",
"0.6822576",
"0.68121105",
"0.6808532",
"0.680453",
"0.6802213",
"0.6777286",
"0.6775145",
"0.6764369",
"0.67634034",
"0.67468786",
"0.6732864",
"0.67168725",
"0.6716487",
"0.6711416",
"0.669535",
"0.66914636",
"0.6677121",
"0.6666548",
"0.66542226",
"0.66500866",
"0.66296756",
"0.66220695",
"0.66162",
"0.66131896",
"0.6612108",
"0.6595866",
"0.6587607",
"0.65783215",
"0.65317374",
"0.65307623",
"0.64727503",
"0.640914",
"0.640635",
"0.64061254",
"0.64023656",
"0.6401094",
"0.63962495",
"0.63948184",
"0.639448",
"0.639448",
"0.63738513",
"0.636557",
"0.6365093",
"0.6360355",
"0.63567394",
"0.6349896",
"0.63431454",
"0.63419443",
"0.63419443",
"0.63362986",
"0.63362986",
"0.6331246",
"0.6328456",
"0.6328042",
"0.632734",
"0.6323748",
"0.6314602",
"0.6314602"
]
| 0.0 | -1 |
/ Frees the resources associated with the result set | public function free(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function FreeResultset()\r\n\t\t{\r\n\t\t\tif( isset($this->row) )\r\n\t\t\t\tunset( $this->row );\r\n\t\t\t\t\r\n\t\t\tif( isset($this->resultset) )\r\n\t\t\t{\r\n\t\t\t\t$this->ReleaseResultset( $this->resultset );\r\n\t\t\t\t\r\n\t\t\t\tunset( $this->resultset );\t\t\t\r\n\t\t\t}\r\n\t\t}",
"public abstract function free($result_set);",
"private function FreeResultSet()\n\t{\n\t\tmysqli_free_result($this->DB_RESULT);\n\t}",
"public function free($result_set)\n\t{\n\t\t$result_set->free();\n\t}",
"abstract public function freeResult($rs);",
"function free() { return mysql_free_result( $this->recordSet ); }",
"function free_result()\n {\n if ($this->res_result) {\n @isis_free_result($this->res_result);\n }\n }",
"public function free()\n\t{\n\t\tunset($this->resResult);\n\t}",
"public function freeResults()\n {\n return sasql_free_result($this->result);\n }",
"public function free(): void {\n // Prevent freeing multiple times\n if ($this->closed) {\n return;\n }\n $this->closed = true;\n\n // Free associated resource (if any)\n if ($this->result !== true) {\n $this->result->free();\n }\n }",
"public function freeResult()\n {\n if (is_resource($this->resultID)) {\n oci_free_statement($this->resultID);\n $this->resultID = false;\n }\n }",
"function close() \n {\n if($this->rsQry==false)\n {\n\t\t\t mysql_free_result($this->rsQry);\n\t\t\t unset($this->rsQry);\n }\n\t\t}",
"function free()\n {\n @mysql_free_result( $this->Query_ID );\n $this->Query_ID = 0;\n }",
"public function free( )\n {\n if ( $this->db_query_result )\n @ mysql_free_result( $this->db_query_result );\n }",
"public function __destruct() {\n\t\tif ( $this->documentsDb !== null )\n\t\t\t$this->oDbr->freeResult( $this->documentsDb );\n\t}",
"function close() {\r\n\t\tmysql_free_result($this->result);\r\n\t\tmysql_close($this->link);\r\n\t}",
"protected function free_result()\n {\n if ($this->freed === FALSE)\n {\n $this->result->free();\n $this->freed = TRUE;\n }\n }",
"function freeResult() {\n\t mysqli_free_result($this->result); \n\t }",
"public function close()\n {\n mysqli_free_result($this->resulset);\n mysqli_close($this->databaseLink);\n }",
"public function __destruct() {\n\t oci_free_statement($this->result);\n\t }",
"public function free($resultset = \"NONEE\"){\n\t\tif($resultset === \"NONEE\")\n\t\t\t$resultset = $this->resultset;\n\t\t$resultset = $this->showErrors ? mysqli_free_result($resultset) : @mysqli_free_result($resultset); \n\t}",
"function __destruct()\n {\n if($this->result){\n oci_free_statement($this->result);\n }\n oci_close($this->_conn);\n }",
"public function freeResult() {\r\n\t\tif ((false === $this->hasError()) && ($this->result != -1)) {\r\n\t\t\tmysql_free_result($this->result);\r\n\t\t\t$this->result = -1;\r\n\t\t}\r\n\t}",
"public function free () {\r\n\t\t$this->con = NULL;\r\n\t}",
"public function close() {\n\t\tif ($this->queryresult != \"\")\n\t\t\tmysql_free_result($this->queryresult);\n\t\tmysql_close();\n\t}",
"function freeResult();",
"abstract public function freeResult();",
"public function __destruct()\n\t{\n\t\t$this->handle->free($this->result);\n\t}",
"public function freeResult( $res ) {\n\t}",
"public function __destruct()\n {\n \\pg_free_result($this->handle);\n }",
"function free()\n {\n $this->_recordset = null;\n $this->_record = null;\n ldap_free_result($this->result);\n $this->result = null;\n return true;\n }",
"public function free()\n {\n if ($this->freed) {\n return;\n }\n $this->freed = true;\n\n $this->where = null;\n $this->orderBy = null;\n $this->groupBy = null;\n $this->innerJoins = [];\n $this->data = null;\n $this->joinedData = [];\n $this->vFieldCallbacks = [];\n $this->options = [];\n }",
"public function freeResult($cursor = null)\n\t{\n\t\treturn;\n\t}",
"public function freeRecordSet($result)\n {\n return mysqli_free_result($result);\n }",
"function free() {\r\n\t\t$this->dbh->free() ;\t\t\r\n\t}",
"public function __destruct() {\n\t\tself::$loadByIdStmt->closeCursor();\n\t}",
"public function reset()\n {\n // reset properties\n $this->query = '';\n $this->rewind();\n \n // release result resource\n if (!empty($this->db) && !empty($this->result) &&\n is_resource($this->db) && is_resource($this->result)) {\n $this->free_result();\n }\n }",
"function result_close( $rResource )\n {\n if( ! odbc_free_result ( $rResource) )\n {\n $this->throw_exception( null, __CLASS__.'::'.__FUNCTION__. ' - Impossible alliverar memòria de la connexió' );\n }\n }",
"function pdo_free_result($stmt) {\r\n PDO_HELPFUL and trigger_error(\"pdo_free_result() usage is mostly redundant. PHP cleans up resource handles/objects if you just unset() them, or move out of scope.\", E_USER_DEPRECATED);\r\n\r\n // free up some resources\r\n try {\r\n pdo_stmt($stmt)->fetchAll();\r\n pdo_stmt($stmt)->closeCursor();\r\n }\r\n catch (PDOException $e) {\r\n // yeah, let's ignore that\r\n }\r\n\r\n // unsetting here has no effect on the outer scope\r\n $stmt = NULL;\r\n }",
"function __destruct() {\n if ($this->stid)\n oci_free_statement($this->stid);\n if ($this->conn)\n oci_close($this->conn);\n }",
"function database_free_result($database_result)\n {\n\t return mysql_free_result($database_result);\n\t}",
"public function __destruct()\n {\n if ($this->iterator) {\n librdf_free_iterator($this->iterator);\n }\n }",
"function db_free_result($qid) {\n\n\tmysqli_free_result($qid);\n}",
"public function finish( )\n {\n $this->clearDataBuffer();\n $this->free( );\n if ( underQL::$db_handle )\n @ mysql_close( underQL::$db_handle );\n }",
"public function freeResult( $query_id=null );",
"public function __destruct() {\n // Close all queries\n foreach ($this->queries as $stmt)\n $stmt->close();\n\n // Close database\n $this->db->close();\n }",
"public function free_result(){\n\t\t\n\t\tif($this->query_id !== 0 && !@mysql_free_result($this->query_id)) {\n\t\n\t\t\t$this->errorMessage(\"Not possible to free query id \".$this->query_id .\"\");\n\t\t\texit;\n\t\t\t\t\n\t\t}\n\t}",
"protected function iterationComplete() { if(!$this->resultFreed) {\n try {\n $this->db->free_result($this->result);\n $this->resultFreed = true;\n } catch(Exception $ex) {}\n }\n }",
"function destruct()\n {\n mysql_close($this->link);\n }",
"public function __destruct() {\r\n @mysql_close($this->resource);\r\n }",
"function sql_free_result($res)\n {\n $res = NULL;\n return true;\n }",
"public function clearResults()\n {\n $this->_return = null;\n }",
"private function _destruct()\r\n {\r\n $this->table = null;\r\n $this->select = null;\r\n $this->fields = null;\r\n $this->where = null;\r\n $this->ar_where = null;\r\n }",
"public function cleanup() {\r\n\t\t$this->resource->cleanup();\r\n\t}",
"public function freeRecordSet($result)\n {\n return true;\n }",
"function flush() {\n\n\t\t\t// Get rid of these\n\t\t\t$this->last_result = null;\n\t\t\t$this->col_info = null;\n\n\t\t}",
"function free_result($res){\n\t\t\n\t\t//var_dump($res);\n\t\tif ( $res === true || $res === false ) \treturn;\n\t\tfree_query_result($res); \n\t}",
"public function __destruct() {\n\t\t$this->dbAdapter->dbClose();\n\t}",
"function free($re)\r\n {\r\n return mysql_free_result($re);\r\n }",
"public function __destruct() {\r\n\t\tif (isset($this->sql)) {\r\n\t\t\tmysql_close($this->sql);\r\n\t\t}\r\n\t\tif (isset($this->sql)) {\r\n\t\t\tmysql_close($this->sql2);\r\n\t\t}\r\n\t}",
"public function cleanup()\n\t{\n\t\t$this->getObject()->cleanup();\n\t}",
"protected function freeResult($cursor = null)\n {\n $this->executed = false;\n\n if ($cursor instanceof Statement) {\n $cursor->closeCursor();\n $cursor = null;\n }\n\n if ($this->prepared instanceof Statement) {\n $this->prepared->closeCursor();\n $this->prepared = null;\n }\n }",
"public function closeQuery( $qHanle )\r\n\t{\r\n\t\t@mssql_free_result($qHanle);\r\n\t}",
"public function clearResult() {\n $this->_dataHandler->clearResult();\n }",
"public function __destruct()\n {\n static $depth = 0;\n // destruct can be called several times\n if ($depth < self::$maximumDepthLevelAllowed\n && isset($this->rows)\n ) {\n $depth++;\n foreach ($this->getRows() as $row) {\n destroy($row);\n }\n unset($this->rows);\n Piwik_DataTable_Manager::getInstance()->setTableDeleted($this->getId());\n $depth--;\n }\n }",
"public function closeQuery( $qHanle )\r\n\t{\r\n\t\t@db2_free_result($qHanle);\r\n\t}",
"function flush(){\n\t\t$this->last_result = array();\n\t\t$this->col_info = null;\n\t\t$this->last_query = null;\n\t}",
"public function freeResult()\n {\n if ($this->_result === null) {\n return false;\n }\n //mysqli_free_result($this->_result);\n $this->_result->closeCursor();\n return true;\n }",
"public function close()\n {\n // Free memory\n $this->result = null;\n \n // Close all resources\n mysql_close($this->mysql);\n $this->mysql = null;\n \n return $this;\n }",
"function close(){\n\t\t$this->pdo=null;\n\t\t$this->stmt=null;\n\t}",
"function __destruct()\n {\n if($this->link)\n {\n mysql_close($this->link);\n }\n }",
"function freeResult($query = 0) {\n $this->query = $query ? $query : $this->query;\n @mysql_free_result($this->query) or $this->error(\"Result ID: {$this->query} could not be freed.\");\n }",
"public function free()\n\t{\n\t\t//$fh = fopen(\"x:\\x.log\", \"a\");fwrite($fh, __CLASS__ . \"/\" .__FUNCTION__ . \"\\n\");fclose($fh);\n\n\t\tforeach (array_keys(get_object_vars($this)) as $k => $key) {\n\t\t\t// nejdrive okolni property pak asociace a data\n\t\t\tif (in_array($k, array(\"_associations\", \"_data\"))) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// je to objekt? je typu IObjectContainerToFree? spustime na nej free\n\t\t\tif (is_object($this->$key) && $this->$key instanceof IObjectContainerToFree) {\n\t\t\t\t// nejdrive prepojime\n\t\t\t\t$object = $this->$key;\n\t\t\t\t// pak odpojime\n\t\t\t\t$this->$key = NULL;\n\t\t\t\t// a pak zlikvidujeme, jinak by se to mohlo zacyklit, record vola free kolekce a kolekce patri k rekordu takze zase zavola jeho zniceni a tak dokola\n\t\t\t\t$object->free();\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$this->$key = NULL;\n\t\t\t}\n\t\t}\n\n\t\tif (count($this->_associations)) {\n\t\t\tforeach ($this->_associations as $v) {\n\t\t\t\tif ($v) {\n\t\t\t\t\t$v->free();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$this->_data = array();\n\n\t}",
"public function __destruct() {\r\n \r\n // It looks like the $statement object are destroyed just after leaving foreach().\r\n foreach(SimpleRdf::$statements as $id => $statement) {\r\n $statement->removeOwner($this->getRdfResourceId());\r\n if ($statement->isOrphan()) {\r\n\tunset(SimpleRdf::$statements[$id]);\r\n }\r\n }\r\n }",
"public function __destruct()\n {\n unset($this->index);\n unset($this->objectList);\n unset($this->objectListKeys);\n }",
"public function __destruct()\n\t{\n\t\tunset($this -> arrNewData);\n\t\tunset($this -> arrOldData);\n\t\tunset($this -> isCheckModify);\n\t\tunset($this -> tableName);\n\t\tunset($this -> databaseName);\n\t\t\t\n\t}",
"public function __destruct()\r\n\t{\r\n\t\tis_resource($this->link) and odbc_close($this->link);\r\n\t}",
"function __destruct()\n\t{\n\t\tmysql_close( $this->link );\t\n\t}",
"public function deleteAllResources() {\n\t\t$this->resources = array();\n\t}",
"public function freeResult($result)\n {\n // phpcs:ignore PHPCompatibility.Extensions.RemovedExtensions.mysql_DeprecatedRemoved\n mysql_free_result($result);\n }",
"public function __destruct() {\n $conn = null;\n }",
"function __destruct() {\r\n\t\t\r\n\t\tif( $this->isOK() ) mysql_close();\r\n\t}",
"public function close(){\r\n\t\tself::$dbh = null;\r\n\t\tself::$db = null;\r\n\t}",
"public function flush() {\n\t\t$this->last_result = null;\n\t\t$this->col_info = null;\n\t\t$this->last_query = null;\n\t}",
"public function cleanup()\n {\n }",
"public function __destruct() \n {\n $this->tempMigrationQuery($this->handle());\n }",
"function flush()\n\t\t{\n\t\t\t// Get rid of these\n\t\t\t$this->last_result = null;\n\t\t\t$this->col_info = null;\n\t\t\t$this->last_query = null;\n\t\t\t$this->from_disk_cache = false;\n $this->setParamaters();\n\t\t}",
"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}",
"function Clean() // libera la consulta\n {mysql_free_result($this->consulta);}",
"function __destruct() {\n\t\t\tunset($this->db);\n\t\t}",
"public function free()\n {\n }",
"public function cleanup() {\n\t\t//TODO\n\t}",
"protected function _clear()\n\t{\n\t\t$this->_query = null;\n\t\t$this->_set = null;\n\t\t$this->_where = null;\n\t\t$this->_limit = null;\n\t}",
"public function __destruct(){\n if (!empty($this->_connPool)){\n foreach ($this->_connPool as $conn){\n $this->close($conn);\n }\n }\n }",
"function FreeResult($resource=null)\n\t{\n\t\tif ($resource === null) {\n\t\t\t$this->SetError('Resource is a null object');\n\t\t\treturn false;\n\t\t}\n\t\tif (!is_resource($resource)) {\n\t\t\t$this->SetError('Resource '.$resource.' is not really a resource');\n\t\t\treturn false;\n\t\t}\n\t\t$result = oci_free_statement($resource);\n\t\treturn $result;\n\t}",
"function __destruct()\n\t{\n\t\t$this->dblink->close();\n\t}",
"function flush()\n\t\t{\n\t\t\t// Get rid of these\n\t\t\t$this->last_result = null;\n\t\t\t$this->col_info = null;\n\t\t\t$this->last_query = null;\n\t\t\t$this->from_disk_cache = false;\n\t\t}",
"public static function flush() {\n self::$last_result = array();\n self::$col_info = null;\n self::$last_query = null;\n }"
]
| [
"0.8581742",
"0.81171536",
"0.7925864",
"0.79093164",
"0.77733403",
"0.7717548",
"0.77036065",
"0.7696046",
"0.7438194",
"0.7415634",
"0.7336127",
"0.73318845",
"0.731681",
"0.7304971",
"0.7267807",
"0.72478795",
"0.7206377",
"0.7194994",
"0.7156849",
"0.71483916",
"0.7144148",
"0.70777065",
"0.69859403",
"0.69670355",
"0.6962093",
"0.690136",
"0.68830293",
"0.6882963",
"0.6778622",
"0.67298317",
"0.671504",
"0.67044765",
"0.6680217",
"0.6672853",
"0.66696024",
"0.665682",
"0.66357034",
"0.66104066",
"0.6603844",
"0.65728146",
"0.65516925",
"0.6504719",
"0.64854336",
"0.64377165",
"0.6425473",
"0.63956666",
"0.6387028",
"0.6383359",
"0.63434386",
"0.63183886",
"0.63102186",
"0.63099325",
"0.63058865",
"0.6290836",
"0.62445086",
"0.6216264",
"0.62109804",
"0.620102",
"0.61844724",
"0.61689055",
"0.6117868",
"0.61103904",
"0.6106778",
"0.6103708",
"0.61000973",
"0.6099063",
"0.60796934",
"0.6074624",
"0.60519755",
"0.6051912",
"0.6041036",
"0.6040964",
"0.6037774",
"0.6019824",
"0.5996855",
"0.59961003",
"0.59931606",
"0.598524",
"0.5982952",
"0.59614456",
"0.595198",
"0.5951872",
"0.5951131",
"0.59501415",
"0.59253067",
"0.592252",
"0.5913988",
"0.59122014",
"0.5905081",
"0.59023565",
"0.5898789",
"0.58979917",
"0.5895761",
"0.5893646",
"0.5893224",
"0.58894926",
"0.5886174",
"0.5880924"
]
| 0.6030005 | 75 |
/ bindResults() Binds the input variables to the result set row values | public function bindResults(array $bind_results); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function resultset($bind_array=array());",
"private static function bindResultRow(&$stmt, &$out)\n {\n $result = $stmt->result_metadata();\n $fields = array();\n $out = array();\n \n while($field = $result->fetch_field())\n {\n $out[$field->name] = \"\";\n $fields[] = &$out[$field->name];\n }\n \n $return = call_user_func_array(array($stmt,'bind_result'), $fields);\n }",
"protected function bind_results($stmt) {\n\t\t\t$fields_var = array();\n\t\t\t$results = null;\n\t\t\t\n\t\t\t$meta = $stmt->result_metadata();\n\n\t\t\t//check if it's INSERT, if so return ID;\n\t\t\tif($meta) {\n\t\t\t\twhile ($field = $meta->fetch_field()) {\n\t\t\t\t\t$field_name = $field->name;\n\t\t\t\t\t$$field_name = null;\n\t\t\t\t\t$fields_var[$field_name] = &$$field_name;\n\t\t\t\t}\n\t\t\t\tcall_user_func_array(array($stmt,'bind_result'),$fields_var);\n\t\t\t\t$results = array();\n\t\t\t\t\n\t\t\t\tif($stmt->num_rows == 1) {\n\t\t\t\t\t$stmt->fetch();\n\t\t\t\t\tforeach($fields_var as $k => $v) {\n\t\t\t\t\t\t$results[$k] = $v;\n\t\t\t\t\t\t$this->{$k} = $v;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if($stmt->num_rows > 1) {\n\t\t\t\t\t$i = 0;\n\t\t\t\t\twhile($stmt->fetch()) {\n\t\t\t\t\t\t$results[$i] = array();\n\t\t\t\t\t\tforeach($fields_var as $k => $v) {\n\t\t\t\t\t\t\t$results[$i][$k] = $v;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$i++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn $results;\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn $stmt->insert_id;\n\t\t\t}\n\n\t\t}",
"protected function fetchPreparedResults($stmt, $columns){\n // Array that accepts the data\n $data = array() ;\n // Parameter array passed to 'bind_result()'\n $params = array() ; \n foreach($columns as $col_name){\n // 'fetch()' will assign fetched value to the variable '$data[$col_name]'\n $params[] =& $data[$col_name] ;\n }\n $res = call_user_func_array( array(&$stmt, \"bind_result\"), $params);\n // if success fetch results\n if(!$res){\n $query_result = \"bind_result() failed: \" . $this->con->error . \"\\n\" ;\n $query_status = false;\n } else {\n $i = 0;\n // fetch all rows of result and store in $query_result\n while($stmt->fetch()){\n foreach($data as $key => $value){\n $query_result[$i][$key] = $value;\n }\n $i++;\n }\n $query_status = true;\n }\n // close open connections\n $stmt->close();\n $this->con->close();\n\n // prepare and return results\n $results = array('results' => $query_result, 'status' => $query_status);\n return $results;\n }",
"function bind_array($stmt, &$row) {\n\t$md = $stmt->result_metadata();\n\t$params = array();\n\twhile($field = $md->fetch_field()) {\n\t\t$params[] = &$row[$field->name];\n\t}\n\n\tcall_user_func_array(array($stmt, 'bind_result'), $params);\n}",
"public function processBind()\n {\n $bind = [];\n\n foreach ($this->fields as $field)\n {\n\n if($field == $this->tablePK)\n {\n $bind[\":id\"] = $this->data[$field];\n }\n else\n {\n $bind[\":$field\"] = $this->data[$field];\n }\n }\n $this->bind = $bind;\n }",
"public function bindAndExecute()\n\t{\n\n\t\t//$params = func_get_args();\n\n\t\t// The only way to get the parameters by reference is to use the debug_backtrace functions rather than\n\t\t// func_get_args. I'm not a fan of this but it works.\n\n $params = array();\n\n\t\t$stack = debug_backtrace();\n\t\tif(isset($stack[0][\"args\"]))\n\t\t\tfor($i=0; $i < count($stack[0][\"args\"]); $i++)\n\t\t\t\t$params[$i] = & $stack[0][\"args\"][$i];\n\n\n\n\n\n\n\t\tMysqlBase::$queryCount++;\n\n\t\t$arrayIndex = $this->myQuery . ' ' . implode('::', $params);\n\t\tif(isset(MysqlBase::$queryArray[$arrayIndex]))\n\t\t{\n\t\t\tMysqlBase::$queryArray[$arrayIndex]++;\n\t\t}else{\n\t\t\tMysqlBase::$queryArray[$arrayIndex] = 1;\n\t\t}\n\n\n\t\tif(!call_user_func_array(array($this, 'bind_param'), $params))\n\t\t\t$this->throwError();\n\n\t\tif($this->execute())\n\t\t{\n\t\t\t$this->store_result();\n\t\t\treturn true;\n\t\t}else{\n\t\t\tif($this->errno > 0)\n\t\t\t\t$this->throwError();\n\t\t\treturn false;\n\t\t}\n\n\t}",
"abstract protected function setresults();",
"public function bind()\n {\n foreach ($this->columns as $column) {\n $column->bind();\n }\n }",
"function resultSet($results) {\n $this->map = array();\n $numFields = $results->columnCount();\n $index = 0;\n $j = 0;\n\n while ($j < $numFields) {\n $column = $results->getColumnMeta($index);\n if (!empty($column['table'])) {\n $this->map[$index++] = array($column['table'], $column['name']);\n } else {\n if (strpos($column['name'], '__')) {\n $parts = explode('__', $column['name']);\n $this->map[$index++] = array($parts[0], $parts[1]);\n } else {\n $this->map[$index++] = array(0, $column['name']);\n }\n }\n $j++;\n }\n\n }",
"private function bindValues() {\n\t\tforeach ($this->builder->bindings as $key => $value) {\n\t\t\t$this->statement->bindValue(\n\t\t\t\t(is_string($key) ? $key : $key + 1),\n\t\t\t\t$value,\n\t\t\t\t(is_int($value) || is_float($value) ? PDO::PARAM_INT : PDO::PARAM_STR)\n\t\t\t);\n\t\t}\n\n\t\t// Reset Builder - ready for next statement\n\t\t$this->builder->bindings = [];\n\t\t$this->builder->wheres = [];\n\t}",
"public function bindVariables() {\n foreach($this->response as $key => $val) {\n $this->response_source->bindVariable($key, $val);\n }\n }",
"public function bindValues(array $bind_values);",
"function LoadRowValues(&$rs) {\n\t\tglobal $conn;\n\t\tif (!$rs || $rs->EOF) return;\n\n\t\t// Call Row Selected event\n\t\t$row = &$rs->fields;\n\t\t$this->Row_Selected($row);\n\t\t$this->spec_id->setDbValue($rs->fields('spec_id'));\n\t\t$this->model_id->setDbValue($rs->fields('model_id'));\n\t\t$this->title->setDbValue($rs->fields('title'));\n\t\t$this->description->setDbValue($rs->fields('description'));\n\t\t$this->s_order->setDbValue($rs->fields('s_order'));\n\t\t$this->status->setDbValue($rs->fields('status'));\n\t}",
"function LoadRowValues($rs = NULL) {\n\t\tif ($rs && !$rs->EOF)\n\t\t\t$row = $rs->fields;\n\t\telse\n\t\t\t$row = $this->NewRow(); \n\n\t\t// Call Row Selected event\n\t\t$this->Row_Selected($row);\n\t\tif (!$rs || $rs->EOF)\n\t\t\treturn;\n\t\t$this->row_id->setDbValue($row['row_id']);\n\t\t$this->master_id->setDbValue($row['master_id']);\n\t\t$this->lot_number->setDbValue($row['lot_number']);\n\t\t$this->chop->setDbValue($row['chop']);\n\t\t$this->estate->setDbValue($row['estate']);\n\t\t$this->grade->setDbValue($row['grade']);\n\t\t$this->jenis->setDbValue($row['jenis']);\n\t\t$this->sack->setDbValue($row['sack']);\n\t\t$this->netto->setDbValue($row['netto']);\n\t\t$this->gross->setDbValue($row['gross']);\n\t\t$this->open_bid->setDbValue($row['open_bid']);\n\t\t$this->currency->setDbValue($row['currency']);\n\t\t$this->bid_step->setDbValue($row['bid_step']);\n\t\t$this->rate->setDbValue($row['rate']);\n\t\t$this->winner_id->setDbValue($row['winner_id']);\n\t\t$this->sold_bid->setDbValue($row['sold_bid']);\n\t\t$this->proforma_number->setDbValue($row['proforma_number']);\n\t\t$this->proforma_amount->setDbValue($row['proforma_amount']);\n\t\t$this->proforma_status->setDbValue($row['proforma_status']);\n\t\t$this->auction_status->setDbValue($row['auction_status']);\n\t\t$this->enter_bid->setDbValue($row['enter_bid']);\n\t\t$this->last_bid->setDbValue($row['last_bid']);\n\t\t$this->highest_bid->setDbValue($row['highest_bid']);\n\t}",
"function LoadDbValues(&$rs) {\n\t\tif (!$rs || !is_array($rs) && $rs->EOF)\n\t\t\treturn;\n\t\t$row = is_array($rs) ? $rs : $rs->fields;\n\t\t$this->row_id->DbValue = $row['row_id'];\n\t\t$this->master_id->DbValue = $row['master_id'];\n\t\t$this->lot_number->DbValue = $row['lot_number'];\n\t\t$this->chop->DbValue = $row['chop'];\n\t\t$this->estate->DbValue = $row['estate'];\n\t\t$this->grade->DbValue = $row['grade'];\n\t\t$this->jenis->DbValue = $row['jenis'];\n\t\t$this->sack->DbValue = $row['sack'];\n\t\t$this->netto->DbValue = $row['netto'];\n\t\t$this->gross->DbValue = $row['gross'];\n\t\t$this->open_bid->DbValue = $row['open_bid'];\n\t\t$this->currency->DbValue = $row['currency'];\n\t\t$this->bid_step->DbValue = $row['bid_step'];\n\t\t$this->rate->DbValue = $row['rate'];\n\t\t$this->winner_id->DbValue = $row['winner_id'];\n\t\t$this->sold_bid->DbValue = $row['sold_bid'];\n\t\t$this->proforma_number->DbValue = $row['proforma_number'];\n\t\t$this->proforma_amount->DbValue = $row['proforma_amount'];\n\t\t$this->proforma_status->DbValue = $row['proforma_status'];\n\t\t$this->auction_status->DbValue = $row['auction_status'];\n\t\t$this->enter_bid->DbValue = $row['enter_bid'];\n\t\t$this->last_bid->DbValue = $row['last_bid'];\n\t\t$this->highest_bid->DbValue = $row['highest_bid'];\n\t}",
"public function getBindValues();",
"public static function bindValues($statement, $bindings)\n {\n }",
"function stmt_bind_assoc (&$stmt, &$out) {\n //$resultrow = array();\n //stmt_bind_assoc($stmt, $resultrow);\n\n $data = mysqli_stmt_result_metadata($stmt);\n $fields = array();\n $out = array();\n\n $fields[0] = $stmt;\n $count = 1;\n\n while($field = mysqli_fetch_field($data)) {\n $fields[$count] = &$out[$field->name];\n $count++;\n }\n call_user_func_array(mysqli_stmt_bind_result, $fields);\n}",
"function execute_prepared_query($prep_q, $bound_vars, $bound_var_types, $result_expected = false)\n{\n\tglobal $spebs_db;\n\t$pstmt = $spebs_db -> prepare($prep_q);\t\n\tif($spebs_db->errno != 0)\n\t{\n\t\terror_log(\"PREPARE STATEMENT error \".$spebs_db->errno.\": \".$spebs_db->error.\" (Q = \\\"$prep_q\\\")\");\n\t\treturn false;\n\t}\n\t\n\t$bound_varrefs = array();\n\t$bound_varrefs[0] = $bound_var_types;\n\t$i=1;\n\tforeach($bound_vars AS $thisvar)\n\t{\t\n\t\t${\"x$i\"} = $thisvar;\n\t\t$bound_varrefs[$i] = &${\"x$i\"};\n\t\t$i++;\n\t}\n\t$bind_action = call_user_func_array(array($pstmt, 'bind_param'), $bound_varrefs);\n\tif(!$bind_action)\n\t{\t\n\t\terror_log(\"CALL_USER_FUNC_ARRAY error \");\n\t\treturn false;\n\t}\n\tif($pstmt->errno != 0)\n\t{\n\t\terror_log(\"PREPARED QUERY BIND error \".$pstmt->errno.\": \".$pstmt->error);\n\t\treturn false;\n\t}\t\n\tif($pstmt -> execute())\n\t{\n\t\tif(!$result_expected)\n\t\t{\n\t\t\tif(isset($pstmt -> insert_id) && is_int($pstmt -> insert_id) && $pstmt -> insert_id > 0)\n\t\t\t\t$res = $pstmt -> insert_id;\n\t\t\telse\n\t\t\t\t$res = true;\n\t\t\t\t\n\t\t\t$pstmt -> close();\n\t\t\treturn $res;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$results = array();\n\t\t\t$row = array();\n\t\t\t$metadata = $pstmt -> result_metadata();\n\t\t\tforeach($metadata -> fetch_fields() AS $field)\n\t\t\t{\t\n\t\t\t\t$row[$field -> name] = NULL;\n\t\t\t\t$bound_resrefs[] = &$row[$field -> name];\n\t\t\t}\n\t\t\t$bind_action = call_user_func_array(array($pstmt, 'bind_result'), $bound_resrefs);\n\t\t\t$i = 0;\n\t\t\twhile($pstmt -> fetch())\n\t\t\t{\t\n\t\t\t\tforeach($row AS $k => $v)\n\t\t\t\t$results[$i][$k] = $v;\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\t\n\t\t\t$pstmt -> close();\n\t\t\treturn $results;\n\t\t}\n\t\t\n\t}\n\telse\n\t{\n\t\terror_log($pstmt->errno.\": \".$pstmt->error);\n\t\t$pstmt -> close();\t\n\t\treturn false;\n\t}\n}",
"function LoadDbValues(&$rs) {\n\t\tif (!$rs || !is_array($rs) && $rs->EOF)\n\t\t\treturn;\n\t\t$row = is_array($rs) ? $rs : $rs->fields;\n\t\t$this->row_id->DbValue = $row['row_id'];\n\t\t$this->auc_date->DbValue = $row['auc_date'];\n\t\t$this->auc_number->DbValue = $row['auc_number'];\n\t\t$this->auc_place->DbValue = $row['auc_place'];\n\t\t$this->start_bid->DbValue = $row['start_bid'];\n\t\t$this->close_bid->DbValue = $row['close_bid'];\n\t\t$this->auc_notes->DbValue = $row['auc_notes'];\n\t\t$this->total_sack->DbValue = $row['total_sack'];\n\t\t$this->total_netto->DbValue = $row['total_netto'];\n\t\t$this->total_gross->DbValue = $row['total_gross'];\n\t\t$this->auc_status->DbValue = $row['auc_status'];\n\t\t$this->rate->DbValue = $row['rate'];\n\t}",
"function LoadRowValues(&$rs) {\r\n\t\tglobal $conn;\r\n\t\tif (!$rs || $rs->EOF) return;\r\n\r\n\t\t// Call Row Selected event\r\n\t\t$row = &$rs->fields;\r\n\t\t$this->Row_Selected($row);\r\n\t\t$this->id->setDbValue($rs->fields('id'));\r\n\t\t$this->datetime->setDbValue($rs->fields('datetime'));\r\n\t\t$this->script->setDbValue($rs->fields('script'));\r\n\t\t$this->user->setDbValue($rs->fields('user'));\r\n\t\t$this->action->setDbValue($rs->fields('action'));\r\n\t\t$this->_table->setDbValue($rs->fields('table'));\r\n\t\t$this->_field->setDbValue($rs->fields('field'));\r\n\t\t$this->keyvalue->setDbValue($rs->fields('keyvalue'));\r\n\t\t$this->oldvalue->setDbValue($rs->fields('oldvalue'));\r\n\t\t$this->newvalue->setDbValue($rs->fields('newvalue'));\r\n\t}",
"public function run_sql($bindVars = FALSE, $outvar = NULL);",
"function LoadRowValues(&$rs) {\n\t\tglobal $conn;\n\t\tif (!$rs || $rs->EOF) return;\n\n\t\t// Call Row Selected event\n\t\t$row = &$rs->fields;\n\t\t$this->Row_Selected($row);\n\t\t$this->id->setDbValue($rs->fields('id'));\n\t\t$this->fbid->setDbValue($rs->fields('fbid'));\n\t\t$this->name->setDbValue($rs->fields('name'));\n\t\t$this->_email->setDbValue($rs->fields('email'));\n\t\t$this->password->setDbValue($rs->fields('password'));\n\t\t$this->validated_mobile->setDbValue($rs->fields('validated_mobile'));\n\t\t$this->role_id->setDbValue($rs->fields('role_id'));\n\t\t$this->image->setDbValue($rs->fields('image'));\n\t\t$this->newsletter->setDbValue($rs->fields('newsletter'));\n\t\t$this->points->setDbValue($rs->fields('points'));\n\t\t$this->last_modified->setDbValue($rs->fields('last_modified'));\n\t\t$this->p2->setDbValue($rs->fields('p2'));\n\t}",
"function LoadRowValues($rs = NULL) {\n\t\tif ($rs && !$rs->EOF)\n\t\t\t$row = $rs->fields;\n\t\telse\n\t\t\t$row = $this->NewRow(); \n\n\t\t// Call Row Selected event\n\t\t$this->Row_Selected($row);\n\t\tif (!$rs || $rs->EOF)\n\t\t\treturn;\n\t\t$this->row_id->setDbValue($row['row_id']);\n\t\t$this->auc_date->setDbValue($row['auc_date']);\n\t\t$this->auc_number->setDbValue($row['auc_number']);\n\t\t$this->auc_place->setDbValue($row['auc_place']);\n\t\t$this->start_bid->setDbValue($row['start_bid']);\n\t\t$this->close_bid->setDbValue($row['close_bid']);\n\t\t$this->auc_notes->setDbValue($row['auc_notes']);\n\t\t$this->total_sack->setDbValue($row['total_sack']);\n\t\t$this->total_netto->setDbValue($row['total_netto']);\n\t\t$this->total_gross->setDbValue($row['total_gross']);\n\t\t$this->auc_status->setDbValue($row['auc_status']);\n\t\t$this->rate->setDbValue($row['rate']);\n\t}",
"function LoadRowValues($rs = NULL) {\n\t\tif ($rs && !$rs->EOF)\n\t\t\t$row = $rs->fields;\n\t\telse\n\t\t\t$row = $this->NewRow(); \n\n\t\t// Call Row Selected event\n\t\t$this->Row_Selected($row);\n\t\tif (!$rs || $rs->EOF)\n\t\t\treturn;\n\t\t$this->unid->setDbValue($row['unid']);\n\t\t$this->u_id->setDbValue($row['u_id']);\n\t\t$this->acl_id->setDbValue($row['acl_id']);\n\t\t$this->Title->setDbValue($row['Title']);\n\t\t$this->LV->setDbValue($row['LV']);\n\t\t$this->Type->setDbValue($row['Type']);\n\t\t$this->ResetTime->setDbValue($row['ResetTime']);\n\t\t$this->ResetType->setDbValue($row['ResetType']);\n\t\t$this->CompleteTask->setDbValue($row['CompleteTask']);\n\t\t$this->Occupation->setDbValue($row['Occupation']);\n\t\t$this->Target->setDbValue($row['Target']);\n\t\t$this->Data->setDbValue($row['Data']);\n\t\t$this->Reward_Gold->setDbValue($row['Reward_Gold']);\n\t\t$this->Reward_Diamonds->setDbValue($row['Reward_Diamonds']);\n\t\t$this->Reward_EXP->setDbValue($row['Reward_EXP']);\n\t\t$this->Reward_Goods->setDbValue($row['Reward_Goods']);\n\t\t$this->Info->setDbValue($row['Info']);\n\t\t$this->DATETIME->setDbValue($row['DATETIME']);\n\t}",
"function LoadRowValues(&$rs) {\n\t\tglobal $conn, $scholarship_package;\n\t\t$scholarship_package->scholarship_package_id->setDbValue($rs->fields('scholarship_package_id'));\n\t\t$scholarship_package->start_date->setDbValue($rs->fields('start_date'));\n\t\t$scholarship_package->end_date->setDbValue($rs->fields('end_date'));\n\t\t$scholarship_package->status->setDbValue($rs->fields('status'));\n\t\t$scholarship_package->annual_amount->setDbValue($rs->fields('annual_amount'));\n\t\t$scholarship_package->grant_package_grant_package_id->setDbValue($rs->fields('grant_package_grant_package_id'));\n\t\t$scholarship_package->sponsored_student_sponsored_student_id->setDbValue($rs->fields('sponsored_student_sponsored_student_id'));\n\t\t$scholarship_package->scholarship_type->setDbValue($rs->fields('scholarship_type'));\n\t\t$scholarship_package->scholarship_type_scholarship_type->setDbValue($rs->fields('scholarship_type_scholarship_type'));\n\t\t$scholarship_package->group_id->setDbValue($rs->fields('group_id'));\n\t}",
"function LoadRowValues(&$rs) {\n\t\tglobal $conn, $scholarship_package;\n\t\t$scholarship_package->scholarship_package_id->setDbValue($rs->fields('scholarship_package_id'));\n\t\t$scholarship_package->start_date->setDbValue($rs->fields('start_date'));\n\t\t$scholarship_package->end_date->setDbValue($rs->fields('end_date'));\n\t\t$scholarship_package->status->setDbValue($rs->fields('status'));\n\t\t$scholarship_package->annual_amount->setDbValue($rs->fields('annual_amount'));\n\t\t$scholarship_package->grant_package_grant_package_id->setDbValue($rs->fields('grant_package_grant_package_id'));\n\t\t$scholarship_package->sponsored_student_sponsored_student_id->setDbValue($rs->fields('sponsored_student_sponsored_student_id'));\n\t\t$scholarship_package->scholarship_type->setDbValue($rs->fields('scholarship_type'));\n\t\t$scholarship_package->scholarship_type_scholarship_type->setDbValue($rs->fields('scholarship_type_scholarship_type'));\n\t\t$scholarship_package->group_id->setDbValue($rs->fields('group_id'));\n\t}",
"function LoadRowValues($rs = NULL) {\n\t\tif ($rs && !$rs->EOF)\n\t\t\t$row = $rs->fields;\n\t\telse\n\t\t\t$row = $this->NewRow(); \n\n\t\t// Call Row Selected event\n\t\t$this->Row_Selected($row);\n\t\tif (!$rs || $rs->EOF)\n\t\t\treturn;\n\t\t$this->tanggal->setDbValue($row['tanggal']);\n\t\t$this->auc_number->setDbValue($row['auc_number']);\n\t\t$this->start_bid->setDbValue($row['start_bid']);\n\t\t$this->close_bid->setDbValue($row['close_bid']);\n\t\t$this->lot_number->setDbValue($row['lot_number']);\n\t\t$this->chop->setDbValue($row['chop']);\n\t\t$this->grade->setDbValue($row['grade']);\n\t\t$this->estate->setDbValue($row['estate']);\n\t\t$this->sack->setDbValue($row['sack']);\n\t\t$this->netto->setDbValue($row['netto']);\n\t\t$this->open_bid->setDbValue($row['open_bid']);\n\t\t$this->last_bid->setDbValue($row['last_bid']);\n\t\t$this->highest_bid->setDbValue($row['highest_bid']);\n\t\t$this->enter_bid->setDbValue($row['enter_bid']);\n\t\t$this->auction_status->setDbValue($row['auction_status']);\n\t\t$this->gross->setDbValue($row['gross']);\n\t\t$this->row_id->setDbValue($row['row_id']);\n\t\tif (!isset($GLOBALS[\"v_bid_histories_admin_grid\"])) $GLOBALS[\"v_bid_histories_admin_grid\"] = new cv_bid_histories_admin_grid;\n\t\t$sDetailFilter = $GLOBALS[\"v_bid_histories_admin\"]->SqlDetailFilter_v_auction_list_admin();\n\t\t$sDetailFilter = str_replace(\"@master_id@\", ew_AdjustSql($this->row_id->DbValue, \"DB\"), $sDetailFilter);\n\t\t$GLOBALS[\"v_bid_histories_admin\"]->setCurrentMasterTable(\"v_auction_list_admin\");\n\t\t$sDetailFilter = $GLOBALS[\"v_bid_histories_admin\"]->ApplyUserIDFilters($sDetailFilter);\n\t\t$this->v_bid_histories_admin_Count = $GLOBALS[\"v_bid_histories_admin\"]->LoadRecordCount($sDetailFilter);\n\t}",
"function LoadRowValues(&$rs) {\r\n\t\tglobal $conn;\r\n\t\tif (!$rs || $rs->EOF) return;\r\n\r\n\t\t// Call Row Selected event\r\n\t\t$row = &$rs->fields;\r\n\t\t$this->Row_Selected($row);\r\n\t\t$this->Id_Venta_Eq->setDbValue($rs->fields('Id_Venta_Eq'));\r\n\t\t$this->CLIENTE->setDbValue($rs->fields('CLIENTE'));\r\n\t\t$this->Id_Articulo->setDbValue($rs->fields('Id_Articulo'));\r\n\t\t$this->Acabado_eq->setDbValue($rs->fields('Acabado_eq'));\r\n\t\t$this->Num_IMEI->setDbValue($rs->fields('Num_IMEI'));\r\n\t\t$this->Num_ICCID->setDbValue($rs->fields('Num_ICCID'));\r\n\t\t$this->Num_CEL->setDbValue($rs->fields('Num_CEL'));\r\n\t\t$this->Causa->setDbValue($rs->fields('Causa'));\r\n\t\t$this->Con_SIM->setDbValue($rs->fields('Con_SIM'));\r\n\t\t$this->Observaciones->setDbValue($rs->fields('Observaciones'));\r\n\t\t$this->PrecioUnitario->setDbValue($rs->fields('PrecioUnitario'));\r\n\t\t$this->MontoDescuento->setDbValue($rs->fields('MontoDescuento'));\r\n\t\t$this->Precio_SIM->setDbValue($rs->fields('Precio_SIM'));\r\n\t\t$this->Monto->setDbValue($rs->fields('Monto'));\r\n\t}",
"function LoadRowValues(&$rs) {\n\t\tglobal $conn, $frm_fp_units_accomplishment;\n\t\tif (!$rs || $rs->EOF) return;\n\n\t\t// Call Row Selected event\n\t\t$row =& $rs->fields;\n\t\t$frm_fp_units_accomplishment->Row_Selected($row);\n\t\t$frm_fp_units_accomplishment->units_id->setDbValue($rs->fields('units_id'));\n\t\t$frm_fp_units_accomplishment->focal_person_id->setDbValue($rs->fields('focal_person_id'));\n\t\t$frm_fp_units_accomplishment->unit_id->setDbValue($rs->fields('unit_id'));\n\t\t$frm_fp_units_accomplishment->cu_sequence->setDbValue($rs->fields('cu_sequence'));\n\t\t$frm_fp_units_accomplishment->cu_short_name->setDbValue($rs->fields('cu_short_name'));\n\t\t$frm_fp_units_accomplishment->cu_unit_name->setDbValue($rs->fields('cu_unit_name'));\n\t\t$frm_fp_units_accomplishment->unit_name->setDbValue($rs->fields('unit_name'));\n\t\t$frm_fp_units_accomplishment->unit_name_short->setDbValue($rs->fields('unit_name_short'));\n\t\t$frm_fp_units_accomplishment->personnel_count->setDbValue($rs->fields('personnel_count'));\n\t\t$frm_fp_units_accomplishment->mfo_1->setDbValue($rs->fields('mfo_1'));\n\t\t$frm_fp_units_accomplishment->mfo_2->setDbValue($rs->fields('mfo_2'));\n\t\t$frm_fp_units_accomplishment->mfo_3->setDbValue($rs->fields('mfo_3'));\n\t\t$frm_fp_units_accomplishment->mfo_4->setDbValue($rs->fields('mfo_4'));\n\t\t$frm_fp_units_accomplishment->mfo_5->setDbValue($rs->fields('mfo_5'));\n\t\t$frm_fp_units_accomplishment->sto->setDbValue($rs->fields('sto'));\n\t\t$frm_fp_units_accomplishment->gass->setDbValue($rs->fields('gass'));\n\t\t$frm_fp_units_accomplishment->users_name->setDbValue($rs->fields('users_name'));\n\t\t$frm_fp_units_accomplishment->users_nameLast->setDbValue($rs->fields('users_nameLast'));\n\t\t$frm_fp_units_accomplishment->users_nameFirst->setDbValue($rs->fields('users_nameFirst'));\n\t\t$frm_fp_units_accomplishment->users_nameMiddle->setDbValue($rs->fields('users_nameMiddle'));\n\t\t$frm_fp_units_accomplishment->users_userLoginName->setDbValue($rs->fields('users_userLoginName'));\n\t\t$frm_fp_units_accomplishment->users_password->setDbValue($rs->fields('users_password'));\n\t\t$frm_fp_units_accomplishment->users_email->setDbValue($rs->fields('users_email'));\n\t\t$frm_fp_units_accomplishment->users_contactNo->setDbValue($rs->fields('users_contactNo'));\n\t\t$frm_fp_units_accomplishment->tbl_cutOffDate_id->setDbValue($rs->fields('tbl_cutOffDate_id'));\n\t\t$frm_fp_units_accomplishment->t_cutOffDate->setDbValue($rs->fields('t_cutOffDate'));\n\t\t$frm_fp_units_accomplishment->t_cutOffDate_remarks->setDbValue($rs->fields('t_cutOffDate_remarks'));\n\t}",
"public function execute($bind_array);",
"function LoadRowValues(&$rs) {\r\n\t\tglobal $conn;\r\n\t\tif (!$rs || $rs->EOF) return;\r\n\r\n\t\t// Call Row Selected event\r\n\t\t$row = &$rs->fields;\r\n\t\t$this->Row_Selected($row);\r\n\t\t$this->identries->setDbValue($rs->fields('identries'));\r\n\t\t$this->domain_id->setDbValue($rs->fields('domain_id'));\r\n\t\t$this->hash_content->setDbValue($rs->fields('hash_content'));\r\n\t\t$this->fuente->setDbValue($rs->fields('fuente'));\r\n\t\t$this->published->setDbValue($rs->fields('published'));\r\n\t\t$this->updated->setDbValue($rs->fields('updated'));\r\n\t\t$this->categorias->setDbValue($rs->fields('categorias'));\r\n\t\t$this->titulo->setDbValue($rs->fields('titulo'));\r\n\t\t$this->contenido->setDbValue($rs->fields('contenido'));\r\n\t\t$this->id->setDbValue($rs->fields('id'));\r\n\t\t$this->islive->setDbValue($rs->fields('islive'));\r\n\t\t$this->thumbnail->setDbValue($rs->fields('thumbnail'));\r\n\t\t$this->reqdate->setDbValue($rs->fields('reqdate'));\r\n\t\t$this->author->setDbValue($rs->fields('author'));\r\n\t\t$this->trans_en->setDbValue($rs->fields('trans_en'));\r\n\t\t$this->trans_es->setDbValue($rs->fields('trans_es'));\r\n\t\t$this->trans_fr->setDbValue($rs->fields('trans_fr'));\r\n\t\t$this->trans_it->setDbValue($rs->fields('trans_it'));\r\n\t\t$this->fid->setDbValue($rs->fields('fid'));\r\n\t\t$this->fmd5->setDbValue($rs->fields('fmd5'));\r\n\t\t$this->tool_id->setDbValue($rs->fields('tool_id'));\r\n\t}",
"function LoadRowValues(&$rs) {\r\n\t\tglobal $conn;\r\n\t\tif (!$rs || $rs->EOF) return;\r\n\r\n\t\t// Call Row Selected event\r\n\t\t$row = &$rs->fields;\r\n\t\t$this->Row_Selected($row);\r\n\t\t$this->identries->setDbValue($rs->fields('identries'));\r\n\t\t$this->domain_id->setDbValue($rs->fields('domain_id'));\r\n\t\t$this->hash_content->setDbValue($rs->fields('hash_content'));\r\n\t\t$this->fuente->setDbValue($rs->fields('fuente'));\r\n\t\t$this->published->setDbValue($rs->fields('published'));\r\n\t\t$this->updated->setDbValue($rs->fields('updated'));\r\n\t\t$this->categorias->setDbValue($rs->fields('categorias'));\r\n\t\t$this->titulo->setDbValue($rs->fields('titulo'));\r\n\t\t$this->contenido->setDbValue($rs->fields('contenido'));\r\n\t\t$this->id->setDbValue($rs->fields('id'));\r\n\t\t$this->islive->setDbValue($rs->fields('islive'));\r\n\t\t$this->thumbnail->setDbValue($rs->fields('thumbnail'));\r\n\t\t$this->reqdate->setDbValue($rs->fields('reqdate'));\r\n\t\t$this->author->setDbValue($rs->fields('author'));\r\n\t\t$this->trans_en->setDbValue($rs->fields('trans_en'));\r\n\t\t$this->trans_es->setDbValue($rs->fields('trans_es'));\r\n\t\t$this->trans_fr->setDbValue($rs->fields('trans_fr'));\r\n\t\t$this->trans_it->setDbValue($rs->fields('trans_it'));\r\n\t\t$this->fid->setDbValue($rs->fields('fid'));\r\n\t\t$this->fmd5->setDbValue($rs->fields('fmd5'));\r\n\t\t$this->tool_id->setDbValue($rs->fields('tool_id'));\r\n\t}",
"public function fetchAll($sql, $bind = [], $mode = PDO::FETCH_ASSOC, $useMaster = false);",
"public static function prepareQueryResult($res) {\r\n $keys = call_user_func(array(get_called_class(), 'getKeys'));\r\n //identify all parameters with \"colname\" set\r\n $column_keys = array();\r\n foreach ($keys as $key => $val) {\r\n if (isset($val['colname']) && $val['colname'] != null)\r\n $column_keys[$key] = $val['colname'];\r\n }\r\n\r\n //for all items\r\n $ret = array();\r\n foreach ($res as $row) {\r\n $ret_row = array();\r\n //for the identified parameters\r\n foreach ($column_keys as $key => $val)\r\n //execute $row->get<ParameterColname>\r\n $ret_row[$key] = call_user_func(array($row, \"get\" . $val));\r\n $ret[] = $ret_row;\r\n }\r\n return $ret;\r\n }",
"function LoadListRowValues(&$rs) {\n\t\t$this->rid->setDbValue($rs->fields('rid'));\n\t\t$this->usn->setDbValue($rs->fields('usn'));\n\t\t$this->name->setDbValue($rs->fields('name'));\n\t\t$this->sc1->setDbValue($rs->fields('sc1'));\n\t\t$this->s1->setDbValue($rs->fields('s1'));\n\t\t$this->sc2->setDbValue($rs->fields('sc2'));\n\t\t$this->s2->setDbValue($rs->fields('s2'));\n\t\t$this->sc3->setDbValue($rs->fields('sc3'));\n\t\t$this->s3->setDbValue($rs->fields('s3'));\n\t\t$this->sc4->setDbValue($rs->fields('sc4'));\n\t\t$this->s4->setDbValue($rs->fields('s4'));\n\t\t$this->sc5->setDbValue($rs->fields('sc5'));\n\t\t$this->s5->setDbValue($rs->fields('s5'));\n\t\t$this->sc6->setDbValue($rs->fields('sc6'));\n\t\t$this->s6->setDbValue($rs->fields('s6'));\n\t\t$this->sc7->setDbValue($rs->fields('sc7'));\n\t\t$this->s7->setDbValue($rs->fields('s7'));\n\t\t$this->sc8->setDbValue($rs->fields('sc8'));\n\t\t$this->s8->setDbValue($rs->fields('s8'));\n\t\t$this->total->setDbValue($rs->fields('total'));\n\t}",
"function LoadRowValues(&$rs) {\n\t\tglobal $planilla;\n\t\t$planilla->idPlanilla->setDbValue($rs->fields('idPlanilla'));\n\t\t$planilla->Nombre->setDbValue($rs->fields('Nombre'));\n\t}",
"function LoadDbValues(&$rs) {\n\t\tif (!$rs || !is_array($rs) && $rs->EOF)\n\t\t\treturn;\n\t\t$row = is_array($rs) ? $rs : $rs->fields;\n\t\t$this->tanggal->DbValue = $row['tanggal'];\n\t\t$this->auc_number->DbValue = $row['auc_number'];\n\t\t$this->start_bid->DbValue = $row['start_bid'];\n\t\t$this->close_bid->DbValue = $row['close_bid'];\n\t\t$this->lot_number->DbValue = $row['lot_number'];\n\t\t$this->chop->DbValue = $row['chop'];\n\t\t$this->grade->DbValue = $row['grade'];\n\t\t$this->estate->DbValue = $row['estate'];\n\t\t$this->sack->DbValue = $row['sack'];\n\t\t$this->netto->DbValue = $row['netto'];\n\t\t$this->open_bid->DbValue = $row['open_bid'];\n\t\t$this->last_bid->DbValue = $row['last_bid'];\n\t\t$this->highest_bid->DbValue = $row['highest_bid'];\n\t\t$this->enter_bid->DbValue = $row['enter_bid'];\n\t\t$this->auction_status->DbValue = $row['auction_status'];\n\t\t$this->gross->DbValue = $row['gross'];\n\t\t$this->row_id->DbValue = $row['row_id'];\n\t}",
"public static function bindValues($stmt,$params=array()){\n foreach($params as $placeHolder => $value){\n $stmt->bindValue($placeHolder,$value);\n }\n return $stmt;\n }",
"function LoadRowValues($rs = NULL) {\n\t\tif ($rs && !$rs->EOF)\n\t\t\t$row = $rs->fields;\n\t\telse\n\t\t\t$row = $this->NewRow(); \n\n\t\t// Call Row Selected event\n\t\t$this->Row_Selected($row);\n\t\tif (!$rs || $rs->EOF)\n\t\t\treturn;\n\t\t$this->unid->setDbValue($row['unid']);\n\t\t$this->u_id->setDbValue($row['u_id']);\n\t\t$this->acl_id->setDbValue($row['acl_id']);\n\t\t$this->Name->setDbValue($row['Name']);\n\t\t$this->Basics->setDbValue($row['Basics']);\n\t\t$this->HP->setDbValue($row['HP']);\n\t\t$this->MP->setDbValue($row['MP']);\n\t\t$this->AD->setDbValue($row['AD']);\n\t\t$this->AP->setDbValue($row['AP']);\n\t\t$this->Defense->setDbValue($row['Defense']);\n\t\t$this->Hit->setDbValue($row['Hit']);\n\t\t$this->Dodge->setDbValue($row['Dodge']);\n\t\t$this->Crit->setDbValue($row['Crit']);\n\t\t$this->AbsorbHP->setDbValue($row['AbsorbHP']);\n\t\t$this->ADPTV->setDbValue($row['ADPTV']);\n\t\t$this->ADPTR->setDbValue($row['ADPTR']);\n\t\t$this->APPTR->setDbValue($row['APPTR']);\n\t\t$this->APPTV->setDbValue($row['APPTV']);\n\t\t$this->ImmuneDamage->setDbValue($row['ImmuneDamage']);\n\t\t$this->Intro->setDbValue($row['Intro']);\n\t\t$this->ExclusiveSkills->setDbValue($row['ExclusiveSkills']);\n\t\t$this->TransferDemand->setDbValue($row['TransferDemand']);\n\t\t$this->TransferLevel->setDbValue($row['TransferLevel']);\n\t\t$this->FormerOccupation->setDbValue($row['FormerOccupation']);\n\t\t$this->Belong->setDbValue($row['Belong']);\n\t\t$this->AttackEffect->setDbValue($row['AttackEffect']);\n\t\t$this->AttackTips->setDbValue($row['AttackTips']);\n\t\t$this->MagicResistance->setDbValue($row['MagicResistance']);\n\t\t$this->IgnoreShield->setDbValue($row['IgnoreShield']);\n\t\t$this->DATETIME->setDbValue($row['DATETIME']);\n\t}",
"private function stmt_bind_assoc (&$stmt, &$out) {\n\t $data = mysqli_stmt_result_metadata($stmt);\n\t $fields = array();\n\t $out = array();\n\t\n\t $fields[0] = $stmt;\n\t $count = 1;\n\t\n\t while($field = mysqli_fetch_field($data)) {\n\t $fields[$count] = &$out[$field->name];\n\t $count++;\n\t } \n\t mysqli_free_result($data);\n\t call_user_func_array('mysqli_stmt_bind_result', $fields);\n\t}",
"function GrabMoreData($query, $bind)\r\n{\r\n $pdo = connect();\r\n $sql= $query;\r\n $prepare = oci_parse($pdo,$sql);\r\n foreach ($bind as $attribute)\r\n {\r\n oci_bind_by_name($prepare, $attribute[0], $attribute[1]);\r\n/* echo $attribute[0].\" \".$attribute[1];*/\r\n }\r\n if(oci_execute($prepare))\r\n {\r\n $res = oci_fetch_array($prepare,OCI_ASSOC+OCI_RETURN_NULLS);\r\n if ($res != null)\r\n {\r\n return $res;\r\n }\r\n else\r\n {\r\n return false;\r\n }\r\n }\r\n else\r\n {\r\n $e = oci_error($prepare); \r\n echo $e['message']; \r\n } \r\n}",
"function LoadDbValues(&$rs) {\n\t\tif (!$rs || !is_array($rs) && $rs->EOF)\n\t\t\treturn;\n\t\t$row = is_array($rs) ? $rs : $rs->fields;\n\t\t$this->unid->DbValue = $row['unid'];\n\t\t$this->u_id->DbValue = $row['u_id'];\n\t\t$this->acl_id->DbValue = $row['acl_id'];\n\t\t$this->Title->DbValue = $row['Title'];\n\t\t$this->LV->DbValue = $row['LV'];\n\t\t$this->Type->DbValue = $row['Type'];\n\t\t$this->ResetTime->DbValue = $row['ResetTime'];\n\t\t$this->ResetType->DbValue = $row['ResetType'];\n\t\t$this->CompleteTask->DbValue = $row['CompleteTask'];\n\t\t$this->Occupation->DbValue = $row['Occupation'];\n\t\t$this->Target->DbValue = $row['Target'];\n\t\t$this->Data->DbValue = $row['Data'];\n\t\t$this->Reward_Gold->DbValue = $row['Reward_Gold'];\n\t\t$this->Reward_Diamonds->DbValue = $row['Reward_Diamonds'];\n\t\t$this->Reward_EXP->DbValue = $row['Reward_EXP'];\n\t\t$this->Reward_Goods->DbValue = $row['Reward_Goods'];\n\t\t$this->Info->DbValue = $row['Info'];\n\t\t$this->DATETIME->DbValue = $row['DATETIME'];\n\t}",
"function LoadRowValues(&$rs) {\r\n\t\tglobal $conn, $st_peserta_kelas_kelompok;\r\n\t\tif (!$rs || $rs->EOF) return;\r\n\r\n\t\t// Call Row Selected event\r\n\t\t$row =& $rs->fields;\r\n\t\t$st_peserta_kelas_kelompok->Row_Selected($row);\r\n\t\t$st_peserta_kelas_kelompok->identitas->setDbValue($rs->fields('identitas'));\r\n\t\t$st_peserta_kelas_kelompok->kode_otomatis_kelompok->setDbValue($rs->fields('kode_otomatis_kelompok'));\r\n\t\t$st_peserta_kelas_kelompok->kode_otomatis->setDbValue($rs->fields('kode_otomatis'));\r\n\t}",
"private function bindValues(\\PDOStatement $stmt, array $bindings): \\PDOStatement {\n\t\tfor ($i = 0; $i < count($bindings); $i++) {\n\t\t\t$param = $i + 1;\n\t\t\tif (is_int($bindings[$i])) {\n\t\t\t\t$stmt->bindParam($param, $bindings[$i], \\PDO::PARAM_INT);\n\t\t\t} else {\n\t\t\t\t$stmt->bindParam($param, $bindings[$i], \\PDO::PARAM_STR);\n\t\t\t}\n\t\t}\n\t\treturn $stmt;\n\t}",
"function LoadRowValues(&$rs) {\n\t\tglobal $conn, $selection_grade_point;\n\t\t$selection_grade_point->selection_grade_points_id->setDbValue($rs->fields('selection_grade_points_id'));\n\t\t$selection_grade_point->grade_point->setDbValue($rs->fields('grade_point'));\n\t\t$selection_grade_point->min_grade->setDbValue($rs->fields('min_grade'));\n\t\t$selection_grade_point->max_grade->setDbValue($rs->fields('max_grade'));\n\t}",
"function LoadRowValues(&$rs) {\n\t\tif (!$rs || $rs->EOF) return;\n\n\t\t// Call Row Selected event\n\t\t$row = &$rs->fields;\n\t\t$this->Row_Selected($row);\n\t\t$this->id->setDbValue($rs->fields('id'));\n\t\t$this->name->setDbValue($rs->fields('name'));\n\t\t$this->_email->setDbValue($rs->fields('email'));\n\t\t$this->password->setDbValue($rs->fields('password'));\n\t\t$this->companyname->setDbValue($rs->fields('companyname'));\n\t\t$this->servicetime->setDbValue($rs->fields('servicetime'));\n\t\t$this->country->setDbValue($rs->fields('country'));\n\t\t$this->phone->setDbValue($rs->fields('phone'));\n\t\t$this->skype->setDbValue($rs->fields('skype'));\n\t\t$this->website->setDbValue($rs->fields('website'));\n\t\t$this->linkedin->setDbValue($rs->fields('linkedin'));\n\t\t$this->facebook->setDbValue($rs->fields('facebook'));\n\t\t$this->twitter->setDbValue($rs->fields('twitter'));\n\t\t$this->active_code->setDbValue($rs->fields('active_code'));\n\t\t$this->identification->setDbValue($rs->fields('identification'));\n\t\t$this->link_expired->setDbValue($rs->fields('link_expired'));\n\t\t$this->isactive->setDbValue($rs->fields('isactive'));\n\t\t$this->pio->setDbValue($rs->fields('pio'));\n\t\t$this->google->setDbValue($rs->fields('google'));\n\t\t$this->instagram->setDbValue($rs->fields('instagram'));\n\t\t$this->account_type->setDbValue($rs->fields('account_type'));\n\t\t$this->logo->setDbValue($rs->fields('logo'));\n\t\t$this->profilepic->setDbValue($rs->fields('profilepic'));\n\t\t$this->mailref->setDbValue($rs->fields('mailref'));\n\t\t$this->deleted->setDbValue($rs->fields('deleted'));\n\t\t$this->deletefeedback->setDbValue($rs->fields('deletefeedback'));\n\t\t$this->account_id->setDbValue($rs->fields('account_id'));\n\t\t$this->start_date->setDbValue($rs->fields('start_date'));\n\t\t$this->end_date->setDbValue($rs->fields('end_date'));\n\t\t$this->year_moth->setDbValue($rs->fields('year_moth'));\n\t\t$this->registerdate->setDbValue($rs->fields('registerdate'));\n\t\t$this->login_type->setDbValue($rs->fields('login_type'));\n\t\t$this->accountstatus->setDbValue($rs->fields('accountstatus'));\n\t\t$this->ispay->setDbValue($rs->fields('ispay'));\n\t\t$this->profilelink->setDbValue($rs->fields('profilelink'));\n\t\t$this->source->setDbValue($rs->fields('source'));\n\t\t$this->agree->setDbValue($rs->fields('agree'));\n\t\t$this->balance->setDbValue($rs->fields('balance'));\n\t\t$this->job_title->setDbValue($rs->fields('job_title'));\n\t\t$this->projects->setDbValue($rs->fields('projects'));\n\t\t$this->opportunities->setDbValue($rs->fields('opportunities'));\n\t\t$this->isconsaltant->setDbValue($rs->fields('isconsaltant'));\n\t\t$this->isagent->setDbValue($rs->fields('isagent'));\n\t\t$this->isinvestor->setDbValue($rs->fields('isinvestor'));\n\t\t$this->isbusinessman->setDbValue($rs->fields('isbusinessman'));\n\t\t$this->isprovider->setDbValue($rs->fields('isprovider'));\n\t\t$this->isproductowner->setDbValue($rs->fields('isproductowner'));\n\t\t$this->states->setDbValue($rs->fields('states'));\n\t\t$this->cities->setDbValue($rs->fields('cities'));\n\t\t$this->offers->setDbValue($rs->fields('offers'));\n\t}",
"function LoadRowValues(&$rs) {\n\t\tif (!$rs || $rs->EOF) return;\n\n\t\t// Call Row Selected event\n\t\t$row = &$rs->fields;\n\t\t$this->Row_Selected($row);\n\t\t$this->id->setDbValue($rs->fields('id'));\n\t\t$this->name->setDbValue($rs->fields('name'));\n\t\t$this->_email->setDbValue($rs->fields('email'));\n\t\t$this->password->setDbValue($rs->fields('password'));\n\t\t$this->companyname->setDbValue($rs->fields('companyname'));\n\t\t$this->servicetime->setDbValue($rs->fields('servicetime'));\n\t\t$this->country->setDbValue($rs->fields('country'));\n\t\t$this->phone->setDbValue($rs->fields('phone'));\n\t\t$this->skype->setDbValue($rs->fields('skype'));\n\t\t$this->website->setDbValue($rs->fields('website'));\n\t\t$this->linkedin->setDbValue($rs->fields('linkedin'));\n\t\t$this->facebook->setDbValue($rs->fields('facebook'));\n\t\t$this->twitter->setDbValue($rs->fields('twitter'));\n\t\t$this->active_code->setDbValue($rs->fields('active_code'));\n\t\t$this->identification->setDbValue($rs->fields('identification'));\n\t\t$this->link_expired->setDbValue($rs->fields('link_expired'));\n\t\t$this->isactive->setDbValue($rs->fields('isactive'));\n\t\t$this->pio->setDbValue($rs->fields('pio'));\n\t\t$this->google->setDbValue($rs->fields('google'));\n\t\t$this->instagram->setDbValue($rs->fields('instagram'));\n\t\t$this->account_type->setDbValue($rs->fields('account_type'));\n\t\t$this->logo->setDbValue($rs->fields('logo'));\n\t\t$this->profilepic->setDbValue($rs->fields('profilepic'));\n\t\t$this->mailref->setDbValue($rs->fields('mailref'));\n\t\t$this->deleted->setDbValue($rs->fields('deleted'));\n\t\t$this->deletefeedback->setDbValue($rs->fields('deletefeedback'));\n\t\t$this->account_id->setDbValue($rs->fields('account_id'));\n\t\t$this->start_date->setDbValue($rs->fields('start_date'));\n\t\t$this->end_date->setDbValue($rs->fields('end_date'));\n\t\t$this->year_moth->setDbValue($rs->fields('year_moth'));\n\t\t$this->registerdate->setDbValue($rs->fields('registerdate'));\n\t\t$this->login_type->setDbValue($rs->fields('login_type'));\n\t\t$this->accountstatus->setDbValue($rs->fields('accountstatus'));\n\t\t$this->ispay->setDbValue($rs->fields('ispay'));\n\t\t$this->profilelink->setDbValue($rs->fields('profilelink'));\n\t\t$this->source->setDbValue($rs->fields('source'));\n\t\t$this->agree->setDbValue($rs->fields('agree'));\n\t\t$this->balance->setDbValue($rs->fields('balance'));\n\t\t$this->job_title->setDbValue($rs->fields('job_title'));\n\t\t$this->projects->setDbValue($rs->fields('projects'));\n\t\t$this->opportunities->setDbValue($rs->fields('opportunities'));\n\t\t$this->isconsaltant->setDbValue($rs->fields('isconsaltant'));\n\t\t$this->isagent->setDbValue($rs->fields('isagent'));\n\t\t$this->isinvestor->setDbValue($rs->fields('isinvestor'));\n\t\t$this->isbusinessman->setDbValue($rs->fields('isbusinessman'));\n\t\t$this->isprovider->setDbValue($rs->fields('isprovider'));\n\t\t$this->isproductowner->setDbValue($rs->fields('isproductowner'));\n\t\t$this->states->setDbValue($rs->fields('states'));\n\t\t$this->cities->setDbValue($rs->fields('cities'));\n\t\t$this->offers->setDbValue($rs->fields('offers'));\n\t}",
"function LoadDbValues(&$rs) {\n\t\tif (!$rs || !is_array($rs) && $rs->EOF) return;\n\t\t$row = is_array($rs) ? $rs : $rs->fields;\n\t\t$this->Supplier_ID->DbValue = $row['Supplier_ID'];\n\t\t$this->Supplier_Number->DbValue = $row['Supplier_Number'];\n\t\t$this->Supplier_Name->DbValue = $row['Supplier_Name'];\n\t\t$this->Address->DbValue = $row['Address'];\n\t\t$this->City->DbValue = $row['City'];\n\t\t$this->Country->DbValue = $row['Country'];\n\t\t$this->Contact_Person->DbValue = $row['Contact_Person'];\n\t\t$this->Phone_Number->DbValue = $row['Phone_Number'];\n\t\t$this->_Email->DbValue = $row['Email'];\n\t\t$this->Mobile_Number->DbValue = $row['Mobile_Number'];\n\t\t$this->Notes->DbValue = $row['Notes'];\n\t\t$this->Balance->DbValue = $row['Balance'];\n\t\t$this->Is_Stock_Available->DbValue = $row['Is_Stock_Available'];\n\t\t$this->Date_Added->DbValue = $row['Date_Added'];\n\t\t$this->Added_By->DbValue = $row['Added_By'];\n\t\t$this->Date_Updated->DbValue = $row['Date_Updated'];\n\t\t$this->Updated_By->DbValue = $row['Updated_By'];\n\t}",
"function LoadRowValues(&$rs) {\n\t\tif (!$rs || $rs->EOF) return;\n\n\t\t// Call Row Selected event\n\t\t$row = &$rs->fields;\n\t\t$this->Row_Selected($row);\n\t\t$this->id->setDbValue($rs->fields('id'));\n\t\t$this->id_admission->setDbValue($rs->fields('id_admission'));\n\t\t$this->nomr->setDbValue($rs->fields('nomr'));\n\t\t$this->statusbayar->setDbValue($rs->fields('statusbayar'));\n\t\t$this->kelas->setDbValue($rs->fields('kelas'));\n\t\t$this->tanggal->setDbValue($rs->fields('tanggal'));\n\t\t$this->kode_tindakan->setDbValue($rs->fields('kode_tindakan'));\n\t\t$this->qty->setDbValue($rs->fields('qty'));\n\t\t$this->tarif->setDbValue($rs->fields('tarif'));\n\t\t$this->bhp->setDbValue($rs->fields('bhp'));\n\t\t$this->user->setDbValue($rs->fields('user'));\n\t\t$this->nama_tindakan->setDbValue($rs->fields('nama_tindakan'));\n\t\t$this->kelompok_tindakan->setDbValue($rs->fields('kelompok_tindakan'));\n\t\t$this->kelompok1->setDbValue($rs->fields('kelompok1'));\n\t\t$this->kelompok2->setDbValue($rs->fields('kelompok2'));\n\t\t$this->kode_dokter->setDbValue($rs->fields('kode_dokter'));\n\t\t$this->no_ruang->setDbValue($rs->fields('no_ruang'));\n\t}",
"protected function bindValues(PDOStatement &$stmt) {\n\t\t$stmt->bindValue(1,$this->getId());\n\t\t$stmt->bindValue(2,$this->getGenre());\n\t\t$stmt->bindValue(3,$this->getJaar());\n\t\t$stmt->bindValue(4,$this->getMaand());\n\t\t$stmt->bindValue(5,$this->getNummer());\n\t\t$stmt->bindValue(6,$this->getMutualiteit());\n\t\t$stmt->bindValue(7,$this->getFactuurdatum());\n\t\t$stmt->bindValue(8,$this->getFactuurFile());\n\t\t$stmt->bindValue(9,$this->getCreditActief());\n\t\t$stmt->bindValue(10,$this->getVervangt());\n\t}",
"function LoadRowValues(&$rs) {\r\r\tglobal $ratings;\r\r\t$ratings->id->setDbValue($rs->fields('id'));\r\r\t$ratings->rating->setDbValue($rs->fields('rating'));\r\r\t$ratings->domain->setDbValue($rs->fields('domain'));\r\r\t$ratings->id_2->setDbValue($rs->fields('id_2'));\r\r}",
"function LoadRowValues(&$rs) {\n\t\tif (!$rs || $rs->EOF) return;\n\n\t\t// Call Row Selected event\n\t\t$row = &$rs->fields;\n\t\t$this->Row_Selected($row);\n\t\t$this->Supplier_ID->setDbValue($rs->fields('Supplier_ID'));\n\t\t$this->Supplier_Number->setDbValue($rs->fields('Supplier_Number'));\n\t\t$this->Supplier_Name->setDbValue($rs->fields('Supplier_Name'));\n\t\t$this->Address->setDbValue($rs->fields('Address'));\n\t\t$this->City->setDbValue($rs->fields('City'));\n\t\t$this->Country->setDbValue($rs->fields('Country'));\n\t\t$this->Contact_Person->setDbValue($rs->fields('Contact_Person'));\n\t\t$this->Phone_Number->setDbValue($rs->fields('Phone_Number'));\n\t\t$this->_Email->setDbValue($rs->fields('Email'));\n\t\t$this->Mobile_Number->setDbValue($rs->fields('Mobile_Number'));\n\t\t$this->Notes->setDbValue($rs->fields('Notes'));\n\t\t$this->Balance->setDbValue($rs->fields('Balance'));\n\t\t$this->Is_Stock_Available->setDbValue($rs->fields('Is_Stock_Available'));\n\t\t$this->Date_Added->setDbValue($rs->fields('Date_Added'));\n\t\t$this->Added_By->setDbValue($rs->fields('Added_By'));\n\t\t$this->Date_Updated->setDbValue($rs->fields('Date_Updated'));\n\t\t$this->Updated_By->setDbValue($rs->fields('Updated_By'));\n\t}",
"function getRows() {\n if ($this->_recordset === null) {\n // begin processing result into recordset\n $this->_entries = ldap_get_entries($this->dbh->connection, $this->result);\n $this->row_counter = $this->_entries['count'];\n $i = 1;\n $rs_template = array();\n if (count($this->dbh->attributes) > 0) {\n reset($this->dbh->attributes);\n while (list($a_index, $a_name) = each($this->dbh->attributes)) $rs_template[$a_name] = '';\n }\n while (list($entry_idx, $entry) = each($this->_entries)) {\n // begin first loop, iterate through entries\n if (!empty($this->dbh->limit_from) && ($i < $this->dbh->limit_from)) continue;\n if (!empty($this->dbh->limit_count) && ($i > $this->dbh->limit_count)) break;\n $rs = $rs_template;\n if (!is_array($entry)) continue;\n while (list($attr, $attr_values) = each($entry)) {\n // begin second loop, iterate through attributes\n if (is_int($attr) || $attr == 'count') continue;\n if (is_string($attr_values)) $rs[$attr] = $attr_values;\n else {\n $value = '';\n while (list($value_idx, $attr_value) = each($attr_values)) {\n // begin third loop, iterate through attribute values\n if (!is_int($value_idx)) continue;\n if (empty($value)) $value = $attr_value;\n else {\n if (is_array($value)) $value[] = $attr_value;\n else $value = array($value, $attr_value);\n }\n// else $value .= \"\\n$attr_value\";\n // end third loop\n }\n $rs[$attr] = $value;\n }\n // end second loop\n }\n reset($rs);\n $this->_recordset[$entry_idx] = $rs;\n $i++;\n // end first loop\n }\n $this->_entries = null;\n if (!is_array($this->_recordset))\n $this->_recordset = array();\n if (!empty($this->dbh->sorting)) {\n $sorting_method = (!empty($this->dbh->sorting_method) ? $this->dbh->sorting_method : 'cmp');\n uksort($this->_recordset, array(&$this, $sorting_method));\n }\n reset($this->_recordset);\n // end processing result into recordset\n }\n return DB_OK;\n }",
"protected function loadDbValues(&$rs)\n\t{\n\t\tif (!$rs || !is_array($rs) && $rs->EOF)\n\t\t\treturn;\n\t\t$row = is_array($rs) ? $rs : $rs->fields;\n\t\t$this->IncomeCode->DbValue = $row['IncomeCode'];\n\t\t$this->IncomeName->DbValue = $row['IncomeName'];\n\t\t$this->IncomeDescription->DbValue = $row['IncomeDescription'];\n\t\t$this->Division->DbValue = $row['Division'];\n\t\t$this->IncomeAmount->DbValue = $row['IncomeAmount'];\n\t\t$this->IncomeBasicRate->DbValue = $row['IncomeBasicRate'];\n\t\t$this->BaseIncomeCode->DbValue = $row['BaseIncomeCode'];\n\t\t$this->Taxable->DbValue = $row['Taxable'];\n\t\t$this->AccountNo->DbValue = $row['AccountNo'];\n\t\t$this->JobIncluded->DbValue = $row['JobIncluded'];\n\t\t$this->Application->DbValue = $row['Application'];\n\t\t$this->JobExcluded->DbValue = $row['JobExcluded'];\n\t}",
"function LoadRowValues(&$rs) {\n\t\tif (!$rs || $rs->EOF) return;\n\n\t\t// Call Row Selected event\n\t\t$row = &$rs->fields;\n\t\t$this->Row_Selected($row);\n\t\t$this->id->setDbValue($rs->fields('id'));\n\t\t$this->detail_jenis_spp->setDbValue($rs->fields('detail_jenis_spp'));\n\t\t$this->id_jenis_spp->setDbValue($rs->fields('id_jenis_spp'));\n\t\t$this->status_spp->setDbValue($rs->fields('status_spp'));\n\t\t$this->no_spp->setDbValue($rs->fields('no_spp'));\n\t\t$this->tgl_spp->setDbValue($rs->fields('tgl_spp'));\n\t\t$this->keterangan->setDbValue($rs->fields('keterangan'));\n\t\t$this->jumlah_up->setDbValue($rs->fields('jumlah_up'));\n\t\t$this->bendahara->setDbValue($rs->fields('bendahara'));\n\t\t$this->nama_pptk->setDbValue($rs->fields('nama_pptk'));\n\t\t$this->nip_pptk->setDbValue($rs->fields('nip_pptk'));\n\t\t$this->kode_program->setDbValue($rs->fields('kode_program'));\n\t\t$this->kode_kegiatan->setDbValue($rs->fields('kode_kegiatan'));\n\t\t$this->kode_sub_kegiatan->setDbValue($rs->fields('kode_sub_kegiatan'));\n\t\t$this->tahun_anggaran->setDbValue($rs->fields('tahun_anggaran'));\n\t\t$this->jumlah_spd->setDbValue($rs->fields('jumlah_spd'));\n\t\t$this->nomer_dasar_spd->setDbValue($rs->fields('nomer_dasar_spd'));\n\t\t$this->tanggal_spd->setDbValue($rs->fields('tanggal_spd'));\n\t\t$this->id_spd->setDbValue($rs->fields('id_spd'));\n\t\t$this->kode_rekening->setDbValue($rs->fields('kode_rekening'));\n\t\t$this->nama_bendahara->setDbValue($rs->fields('nama_bendahara'));\n\t\t$this->nip_bendahara->setDbValue($rs->fields('nip_bendahara'));\n\t\t$this->no_spm->setDbValue($rs->fields('no_spm'));\n\t\t$this->tgl_spm->setDbValue($rs->fields('tgl_spm'));\n\t\t$this->status_spm->setDbValue($rs->fields('status_spm'));\n\t\t$this->nama_bank->setDbValue($rs->fields('nama_bank'));\n\t\t$this->nomer_rekening_bank->setDbValue($rs->fields('nomer_rekening_bank'));\n\t\t$this->npwp->setDbValue($rs->fields('npwp'));\n\t\t$this->pimpinan_blud->setDbValue($rs->fields('pimpinan_blud'));\n\t\t$this->nip_pimpinan->setDbValue($rs->fields('nip_pimpinan'));\n\t\t$this->no_sptb->setDbValue($rs->fields('no_sptb'));\n\t\t$this->tgl_sptb->setDbValue($rs->fields('tgl_sptb'));\n\t}",
"function LoadRowValues(&$rs) {\n\t\tglobal $responsable;\n\t\t$responsable->idResponsable->setDbValue($rs->fields('idResponsable'));\n\t\t$responsable->idGerente->setDbValue($rs->fields('idGerente'));\n\t\t$responsable->idMer->setDbValue($rs->fields('idMer'));\n\t\t$responsable->fecha->setDbValue($rs->fields('fecha'));\n\t\t$responsable->habilitado->setDbValue($rs->fields('habilitado'));\n\t}",
"function LoadListRowValues(&$rs) {\n\t\t$this->gjd_id->setDbValue($rs->fields('gjd_id'));\n\t\t$this->gjm_id->setDbValue($rs->fields('gjm_id'));\n\t\t$this->peg_id->setDbValue($rs->fields('peg_id'));\n\t\t$this->b_mn->setDbValue($rs->fields('b_mn'));\n\t\t$this->b_sn->setDbValue($rs->fields('b_sn'));\n\t\t$this->b_sl->setDbValue($rs->fields('b_sl'));\n\t\t$this->b_rb->setDbValue($rs->fields('b_rb'));\n\t\t$this->b_km->setDbValue($rs->fields('b_km'));\n\t\t$this->b_jm->setDbValue($rs->fields('b_jm'));\n\t\t$this->b_sb->setDbValue($rs->fields('b_sb'));\n\t\t$this->l_mn->setDbValue($rs->fields('l_mn'));\n\t\t$this->l_sn->setDbValue($rs->fields('l_sn'));\n\t\t$this->l_sl->setDbValue($rs->fields('l_sl'));\n\t\t$this->l_rb->setDbValue($rs->fields('l_rb'));\n\t\t$this->l_km->setDbValue($rs->fields('l_km'));\n\t\t$this->l_jm->setDbValue($rs->fields('l_jm'));\n\t\t$this->l_sb->setDbValue($rs->fields('l_sb'));\n\t}",
"public function loadListRowValues(&$rs)\n\t{\n\t\t$this->IncomeCode->setDbValue($rs->fields('IncomeCode'));\n\t\t$this->IncomeName->setDbValue($rs->fields('IncomeName'));\n\t\t$this->IncomeDescription->setDbValue($rs->fields('IncomeDescription'));\n\t\t$this->Division->setDbValue($rs->fields('Division'));\n\t\t$this->IncomeAmount->setDbValue($rs->fields('IncomeAmount'));\n\t\t$this->IncomeBasicRate->setDbValue($rs->fields('IncomeBasicRate'));\n\t\t$this->BaseIncomeCode->setDbValue($rs->fields('BaseIncomeCode'));\n\t\t$this->Taxable->setDbValue($rs->fields('Taxable'));\n\t\t$this->AccountNo->setDbValue($rs->fields('AccountNo'));\n\t\t$this->JobIncluded->setDbValue($rs->fields('JobIncluded'));\n\t\t$this->Application->setDbValue($rs->fields('Application'));\n\t\t$this->JobExcluded->setDbValue($rs->fields('JobExcluded'));\n\t}",
"function LoadRowValues(&$rs) {\n\t\tglobal $conn, $t_tinbai_mainsite;\n\t\t$t_tinbai_mainsite->PK_TINBAI_ID->setDbValue($rs->fields('PK_TINBAI_ID'));\n\t\t$t_tinbai_mainsite->FK_CONGTY_ID->setDbValue($rs->fields('FK_CONGTY_ID'));\n\t\t$t_tinbai_mainsite->FK_DMGIOITHIEU_ID->setDbValue($rs->fields('FK_DMGIOITHIEU_ID'));\n\t\t$t_tinbai_mainsite->FK_DMTUYENSINH_ID->setDbValue($rs->fields('FK_DMTUYENSINH_ID'));\n\t\t$t_tinbai_mainsite->FK_DTSVTUONGLAI_ID->setDbValue($rs->fields('FK_DTSVTUONGLAI_ID'));\n\t\t$t_tinbai_mainsite->FK_DTSVDANGHOC_ID->setDbValue($rs->fields('FK_DTSVDANGHOC_ID'));\n\t\t$t_tinbai_mainsite->FK_DTCUUSV_ID->setDbValue($rs->fields('FK_DTCUUSV_ID'));\n\t\t$t_tinbai_mainsite->FK_DTDOANHNGHIEP_ID->setDbValue($rs->fields('FK_DTDOANHNGHIEP_ID'));\n\t\t$t_tinbai_mainsite->C_TITLE->setDbValue($rs->fields('C_TITLE'));\n\t\t$t_tinbai_mainsite->C_SUMARY->setDbValue($rs->fields('C_SUMARY'));\n\t\t$t_tinbai_mainsite->C_CONTENTS->setDbValue($rs->fields('C_CONTENTS'));\n\t\t$t_tinbai_mainsite->C_HIT_MAINSITE->setDbValue($rs->fields('C_HIT_MAINSITE'));\n\t\t$t_tinbai_mainsite->C_PIC_HIT->Upload->DbValue = $rs->fields('C_PIC_HIT');\n\t\t$t_tinbai_mainsite->C_NEW_MYSEFLT->setDbValue($rs->fields('C_NEW_MYSEFLT'));\n\t\t$t_tinbai_mainsite->C_PIC_MYSEFLT->Upload->DbValue = $rs->fields('C_PIC_MYSEFLT');\n\t\t$t_tinbai_mainsite->C_COMMENT_MAINSITE->setDbValue($rs->fields('C_COMMENT_MAINSITE'));\n\t\t$t_tinbai_mainsite->C_ORDER_MAINSITE->setDbValue($rs->fields('C_ORDER_MAINSITE'));\n\t\t$t_tinbai_mainsite->C_STATUS_MAINSITE->setDbValue($rs->fields('C_STATUS_MAINSITE'));\n\t\t$t_tinbai_mainsite->C_VISITOR_MAINSITE->setDbValue($rs->fields('C_VISITOR_MAINSITE'));\n\t\t$t_tinbai_mainsite->C_ACTIVE_MAINSITE->setDbValue($rs->fields('C_ACTIVE_MAINSITE'));\n\t\t$t_tinbai_mainsite->C_TIME_ACTIVE_MAINSITE->setDbValue($rs->fields('C_TIME_ACTIVE_MAINSITE'));\n\t\t$t_tinbai_mainsite->FK_NGUOIDUNGID_MAINSITE->setDbValue($rs->fields('FK_NGUOIDUNGID_MAINSITE'));\n\t\t$t_tinbai_mainsite->C_NOTE->setDbValue($rs->fields('C_NOTE'));\n\t\t$t_tinbai_mainsite->C_USER_ADD->setDbValue($rs->fields('C_USER_ADD'));\n\t\t$t_tinbai_mainsite->C_ADD_TIME->setDbValue($rs->fields('C_ADD_TIME'));\n\t\t$t_tinbai_mainsite->C_USER_EDIT->setDbValue($rs->fields('C_USER_EDIT'));\n\t\t$t_tinbai_mainsite->C_EDIT_TIME->setDbValue($rs->fields('C_EDIT_TIME'));\n\t\t$t_tinbai_mainsite->FK_EDITOR_ID->setDbValue($rs->fields('FK_EDITOR_ID'));\n\t}",
"public function dtgParameter_Bind() {\n\t\t\t$this->dtgParameter->TotalItemCount = Parameter::CountAll();\n\n\t\t\t$objClauses = array();\n\t\t\tif ($objClause = $this->dtgParameter->OrderByClause)\n\t\t\t\tarray_push($objClauses, $objClause);\n\t\t\tif ($objClause = $this->dtgParameter->LimitClause)\n\t\t\t\tarray_push($objClauses, $objClause);\n\t\t\t$this->dtgParameter->DataSource = Parameter::LoadAll($objClauses);\n\t\t}",
"function LoadRowValues(&$rs) {\n\t\tif (!$rs || $rs->EOF) return;\n\n\t\t// Call Row Selected event\n\t\t$row = &$rs->fields;\n\t\t$this->Row_Selected($row);\n\t\t$this->id_admission->setDbValue($rs->fields('id_admission'));\n\t\t$this->nomr->setDbValue($rs->fields('nomr'));\n\t\t$this->ket_nama->setDbValue($rs->fields('ket_nama'));\n\t\t$this->ket_tgllahir->setDbValue($rs->fields('ket_tgllahir'));\n\t\t$this->ket_alamat->setDbValue($rs->fields('ket_alamat'));\n\t\t$this->ket_jeniskelamin->setDbValue($rs->fields('ket_jeniskelamin'));\n\t\t$this->ket_title->setDbValue($rs->fields('ket_title'));\n\t\t$this->dokterpengirim->setDbValue($rs->fields('dokterpengirim'));\n\t\t$this->statusbayar->setDbValue($rs->fields('statusbayar'));\n\t\t$this->kirimdari->setDbValue($rs->fields('kirimdari'));\n\t\t$this->keluargadekat->setDbValue($rs->fields('keluargadekat'));\n\t\t$this->panggungjawab->setDbValue($rs->fields('panggungjawab'));\n\t\t$this->masukrs->setDbValue($rs->fields('masukrs'));\n\t\t$this->noruang->setDbValue($rs->fields('noruang'));\n\t\t$this->tempat_tidur_id->setDbValue($rs->fields('tempat_tidur_id'));\n\t\t$this->nott->setDbValue($rs->fields('nott'));\n\t\t$this->NIP->setDbValue($rs->fields('NIP'));\n\t\t$this->dokter_penanggungjawab->setDbValue($rs->fields('dokter_penanggungjawab'));\n\t\t$this->KELASPERAWATAN_ID->setDbValue($rs->fields('KELASPERAWATAN_ID'));\n\t\t$this->NO_SKP->setDbValue($rs->fields('NO_SKP'));\n\t\t$this->sep_tglsep->setDbValue($rs->fields('sep_tglsep'));\n\t\t$this->sep_tglrujuk->setDbValue($rs->fields('sep_tglrujuk'));\n\t\t$this->sep_kodekelasrawat->setDbValue($rs->fields('sep_kodekelasrawat'));\n\t\t$this->sep_norujukan->setDbValue($rs->fields('sep_norujukan'));\n\t\t$this->sep_kodeppkasal->setDbValue($rs->fields('sep_kodeppkasal'));\n\t\t$this->sep_namappkasal->setDbValue($rs->fields('sep_namappkasal'));\n\t\t$this->sep_kodeppkpelayanan->setDbValue($rs->fields('sep_kodeppkpelayanan'));\n\t\t$this->sep_jenisperawatan->setDbValue($rs->fields('sep_jenisperawatan'));\n\t\t$this->sep_catatan->setDbValue($rs->fields('sep_catatan'));\n\t\t$this->sep_kodediagnosaawal->setDbValue($rs->fields('sep_kodediagnosaawal'));\n\t\t$this->sep_namadiagnosaawal->setDbValue($rs->fields('sep_namadiagnosaawal'));\n\t\t$this->sep_lakalantas->setDbValue($rs->fields('sep_lakalantas'));\n\t\t$this->sep_lokasilaka->setDbValue($rs->fields('sep_lokasilaka'));\n\t\t$this->sep_user->setDbValue($rs->fields('sep_user'));\n\t\t$this->sep_flag_cekpeserta->setDbValue($rs->fields('sep_flag_cekpeserta'));\n\t\t$this->sep_flag_generatesep->setDbValue($rs->fields('sep_flag_generatesep'));\n\t\t$this->sep_nik->setDbValue($rs->fields('sep_nik'));\n\t\t$this->sep_namapeserta->setDbValue($rs->fields('sep_namapeserta'));\n\t\t$this->sep_jeniskelamin->setDbValue($rs->fields('sep_jeniskelamin'));\n\t\t$this->sep_pisat->setDbValue($rs->fields('sep_pisat'));\n\t\t$this->sep_tgllahir->setDbValue($rs->fields('sep_tgllahir'));\n\t\t$this->sep_kodejeniskepesertaan->setDbValue($rs->fields('sep_kodejeniskepesertaan'));\n\t\t$this->sep_namajeniskepesertaan->setDbValue($rs->fields('sep_namajeniskepesertaan'));\n\t\t$this->sep_nokabpjs->setDbValue($rs->fields('sep_nokabpjs'));\n\t\t$this->sep_status_peserta->setDbValue($rs->fields('sep_status_peserta'));\n\t\t$this->sep_umur_pasien_sekarang->setDbValue($rs->fields('sep_umur_pasien_sekarang'));\n\t\t$this->statuskeluarranap_id->setDbValue($rs->fields('statuskeluarranap_id'));\n\t\t$this->keluarrs->setDbValue($rs->fields('keluarrs'));\n\t}",
"function LoadRowValues(&$rs) {\r\n\t\tglobal $conn;\r\n\t\tif (!$rs || $rs->EOF) return;\r\n\r\n\t\t// Call Row Selected event\r\n\t\t$row = &$rs->fields;\r\n\t\t$this->Row_Selected($row);\r\n\t\t$this->idfb_posts->setDbValue($rs->fields('idfb_posts'));\r\n\t\t$this->id->setDbValue($rs->fields('id'));\r\n\t\t$this->created_time->setDbValue($rs->fields('created_time'));\r\n\t\t$this->actions->setDbValue($rs->fields('actions'));\r\n\t\t$this->icon->setDbValue($rs->fields('icon'));\r\n\t\t$this->is_published->setDbValue($rs->fields('is_published'));\r\n\t\t$this->message->setDbValue($rs->fields('message'));\r\n\t\t$this->link->setDbValue($rs->fields('link'));\r\n\t\t$this->object_id->setDbValue($rs->fields('object_id'));\r\n\t\t$this->picture->setDbValue($rs->fields('picture'));\r\n\t\t$this->privacy->setDbValue($rs->fields('privacy'));\r\n\t\t$this->promotion_status->setDbValue($rs->fields('promotion_status'));\r\n\t\t$this->timeline_visibility->setDbValue($rs->fields('timeline_visibility'));\r\n\t\t$this->type->setDbValue($rs->fields('type'));\r\n\t\t$this->updated_time->setDbValue($rs->fields('updated_time'));\r\n\t\t$this->caption->setDbValue($rs->fields('caption'));\r\n\t\t$this->description->setDbValue($rs->fields('description'));\r\n\t\t$this->name->setDbValue($rs->fields('name'));\r\n\t\t$this->source->setDbValue($rs->fields('source'));\r\n\t\t$this->from->setDbValue($rs->fields('from'));\r\n\t\t$this->to->setDbValue($rs->fields('to'));\r\n\t\t$this->comments->setDbValue($rs->fields('comments'));\r\n\t\t$this->id_grupo->setDbValue($rs->fields('id_grupo'));\r\n\t}",
"function tpl_assign_rows(&$res)\n\t{\n\t\treturn true;\n\t}",
"function LoadRowValues(&$rs) {\n\t\tif (!$rs || $rs->EOF) return;\n\n\t\t// Call Row Selected event\n\t\t$row = &$rs->fields;\n\t\t$this->Row_Selected($row);\n\t\t$this->tgl->setDbValue($rs->fields('tgl'));\n\t\t$this->no_spp->setDbValue($rs->fields('no_spp'));\n\t\t$this->jns_spp->setDbValue($rs->fields('jns_spp'));\n\t\t$this->kd_mata->setDbValue($rs->fields('kd_mata'));\n\t\t$this->urai->setDbValue($rs->fields('urai'));\n\t\t$this->jmlh->setDbValue($rs->fields('jmlh'));\n\t\t$this->jmlh1->setDbValue($rs->fields('jmlh1'));\n\t\t$this->jmlh2->setDbValue($rs->fields('jmlh2'));\n\t\t$this->jmlh3->setDbValue($rs->fields('jmlh3'));\n\t\t$this->jmlh4->setDbValue($rs->fields('jmlh4'));\n\t\t$this->nm_perus->setDbValue($rs->fields('nm_perus'));\n\t\t$this->alamat->setDbValue($rs->fields('alamat'));\n\t\t$this->npwp->setDbValue($rs->fields('npwp'));\n\t\t$this->pimpinan->setDbValue($rs->fields('pimpinan'));\n\t\t$this->bank->setDbValue($rs->fields('bank'));\n\t\t$this->rek->setDbValue($rs->fields('rek'));\n\t\t$this->nospm->setDbValue($rs->fields('nospm'));\n\t\t$this->tglspm->setDbValue($rs->fields('tglspm'));\n\t\t$this->ppn->setDbValue($rs->fields('ppn'));\n\t\t$this->ps21->setDbValue($rs->fields('ps21'));\n\t\t$this->ps22->setDbValue($rs->fields('ps22'));\n\t\t$this->ps23->setDbValue($rs->fields('ps23'));\n\t\t$this->ps4->setDbValue($rs->fields('ps4'));\n\t\t$this->kodespm->setDbValue($rs->fields('kodespm'));\n\t\t$this->nambud->setDbValue($rs->fields('nambud'));\n\t\t$this->nppk->setDbValue($rs->fields('nppk'));\n\t\t$this->nipppk->setDbValue($rs->fields('nipppk'));\n\t\t$this->prog->setDbValue($rs->fields('prog'));\n\t\t$this->prog1->setDbValue($rs->fields('prog1'));\n\t\t$this->bayar->setDbValue($rs->fields('bayar'));\n\t}",
"public abstract function fetchRow($result_set);",
"public function preparedSelect($query, $bind_params_r)\n {\n $select = $this->runPreparedQuery($query, $bind_params_r);\n $fields_r = $this->fetchFields($select);\n\n foreach ($fields_r as $field) {\n $bind_result_r[] = &${$field};\n }\n\n $this->bindResult($select, $bind_result_r);\n\n $result_r = array();\n $i = 0;\n while ($select->fetch()) {\n foreach ($fields_r as $field) {\n $result_r[$i][$field] = $$field;\n }\n $i++;\n }\n $select->close();\n return $result_r;\n }",
"public function resultset(){\n\t\t$this->execute() ;\n\t\treturn $this->statement->fetchAll(PDO::FETCH_ASSOC) ;\n\t}",
"public function resultSet(){\n\t\t$this->execute();\n\t\treturn $this->stmt->fetchAll(PDO::FETCH_OBJ);\n\t}",
"private function initializeResult(PDOStatement $statement) {\n $isColumnsSet = false;\n\n while ($row = $statement->fetch(PDO::FETCH_ASSOC)) {\n if (!$isColumnsSet) {\n foreach ($row as $columnName => $value) {\n $this->columns[] = $columnName;\n }\n\n $isColumnsSet = true;\n }\n\n $this->rows[] = $row;\n }\n\n $this->columnCount = count($this->columns);\n $this->rowCount = count($this->rows);\n }",
"function LoadRowValues($rs = NULL) {\n\t\tif ($rs && !$rs->EOF)\n\t\t\t$row = $rs->fields;\n\t\telse\n\t\t\t$row = $this->NewRow(); \n\n\t\t// Call Row Selected event\n\t\t$this->Row_Selected($row);\n\t\tif (!$rs || $rs->EOF)\n\t\t\treturn;\n\t\t$this->replid->setDbValue($row['replid']);\n\t\t$this->nama->setDbValue($row['nama']);\n\t\t$this->besar->setDbValue($row['besar']);\n\t\t$this->idkategori->setDbValue($row['idkategori']);\n\t\t$this->rekkas->setDbValue($row['rekkas']);\n\t\t$this->rekpendapatan->setDbValue($row['rekpendapatan']);\n\t\t$this->rekpiutang->setDbValue($row['rekpiutang']);\n\t\t$this->aktif->setDbValue($row['aktif']);\n\t\t$this->keterangan->setDbValue($row['keterangan']);\n\t\t$this->departemen->setDbValue($row['departemen']);\n\t\t$this->info1->setDbValue($row['info1']);\n\t\t$this->info2->setDbValue($row['info2']);\n\t\t$this->info3->setDbValue($row['info3']);\n\t\t$this->ts->setDbValue($row['ts']);\n\t\t$this->token->setDbValue($row['token']);\n\t\t$this->issync->setDbValue($row['issync']);\n\t}",
"abstract public function freeResult($rs);",
"function LoadDbValues(&$rs) {\n\t\tif (!$rs || !is_array($rs) && $rs->EOF)\n\t\t\treturn;\n\t\t$row = is_array($rs) ? $rs : $rs->fields;\n\t\t$this->unid->DbValue = $row['unid'];\n\t\t$this->u_id->DbValue = $row['u_id'];\n\t\t$this->acl_id->DbValue = $row['acl_id'];\n\t\t$this->Name->DbValue = $row['Name'];\n\t\t$this->Basics->DbValue = $row['Basics'];\n\t\t$this->HP->DbValue = $row['HP'];\n\t\t$this->MP->DbValue = $row['MP'];\n\t\t$this->AD->DbValue = $row['AD'];\n\t\t$this->AP->DbValue = $row['AP'];\n\t\t$this->Defense->DbValue = $row['Defense'];\n\t\t$this->Hit->DbValue = $row['Hit'];\n\t\t$this->Dodge->DbValue = $row['Dodge'];\n\t\t$this->Crit->DbValue = $row['Crit'];\n\t\t$this->AbsorbHP->DbValue = $row['AbsorbHP'];\n\t\t$this->ADPTV->DbValue = $row['ADPTV'];\n\t\t$this->ADPTR->DbValue = $row['ADPTR'];\n\t\t$this->APPTR->DbValue = $row['APPTR'];\n\t\t$this->APPTV->DbValue = $row['APPTV'];\n\t\t$this->ImmuneDamage->DbValue = $row['ImmuneDamage'];\n\t\t$this->Intro->DbValue = $row['Intro'];\n\t\t$this->ExclusiveSkills->DbValue = $row['ExclusiveSkills'];\n\t\t$this->TransferDemand->DbValue = $row['TransferDemand'];\n\t\t$this->TransferLevel->DbValue = $row['TransferLevel'];\n\t\t$this->FormerOccupation->DbValue = $row['FormerOccupation'];\n\t\t$this->Belong->DbValue = $row['Belong'];\n\t\t$this->AttackEffect->DbValue = $row['AttackEffect'];\n\t\t$this->AttackTips->DbValue = $row['AttackTips'];\n\t\t$this->MagicResistance->DbValue = $row['MagicResistance'];\n\t\t$this->IgnoreShield->DbValue = $row['IgnoreShield'];\n\t\t$this->DATETIME->DbValue = $row['DATETIME'];\n\t}",
"function LoadRowValues(&$rs) {\n\t\tif (!$rs || $rs->EOF) return;\n\n\t\t// Call Row Selected event\n\t\t$row = &$rs->fields;\n\t\t$this->Row_Selected($row);\n\t\t$this->IDXDAFTAR->setDbValue($rs->fields('IDXDAFTAR'));\n\t\t$this->NOMR->setDbValue($rs->fields('NOMR'));\n\t\t$this->KDPOLY->setDbValue($rs->fields('KDPOLY'));\n\t\t$this->KDCARABAYAR->setDbValue($rs->fields('KDCARABAYAR'));\n\t\t$this->NIP->setDbValue($rs->fields('NIP'));\n\t\t$this->TGLREG->setDbValue($rs->fields('TGLREG'));\n\t\t$this->JAMREG->setDbValue($rs->fields('JAMREG'));\n\t\t$this->NO_SJP->setDbValue($rs->fields('NO_SJP'));\n\t\t$this->NOKARTU->setDbValue($rs->fields('NOKARTU'));\n\t\t$this->TANGGAL_SEP->setDbValue($rs->fields('TANGGAL_SEP'));\n\t\t$this->TANGGALRUJUK_SEP->setDbValue($rs->fields('TANGGALRUJUK_SEP'));\n\t\t$this->KELASRAWAT_SEP->setDbValue($rs->fields('KELASRAWAT_SEP'));\n\t\t$this->NORUJUKAN_SEP->setDbValue($rs->fields('NORUJUKAN_SEP'));\n\t\t$this->PPKPELAYANAN_SEP->setDbValue($rs->fields('PPKPELAYANAN_SEP'));\n\t\t$this->JENISPERAWATAN_SEP->setDbValue($rs->fields('JENISPERAWATAN_SEP'));\n\t\t$this->CATATAN_SEP->setDbValue($rs->fields('CATATAN_SEP'));\n\t\t$this->DIAGNOSAAWAL_SEP->setDbValue($rs->fields('DIAGNOSAAWAL_SEP'));\n\t\t$this->NAMADIAGNOSA_SEP->setDbValue($rs->fields('NAMADIAGNOSA_SEP'));\n\t\t$this->LAKALANTAS_SEP->setDbValue($rs->fields('LAKALANTAS_SEP'));\n\t\t$this->LOKASILAKALANTAS->setDbValue($rs->fields('LOKASILAKALANTAS'));\n\t\t$this->USER->setDbValue($rs->fields('USER'));\n\t\t$this->generate_sep->setDbValue($rs->fields('generate_sep'));\n\t\t$this->PESERTANIK_SEP->setDbValue($rs->fields('PESERTANIK_SEP'));\n\t\t$this->PESERTANAMA_SEP->setDbValue($rs->fields('PESERTANAMA_SEP'));\n\t\t$this->PESERTAJENISKELAMIN_SEP->setDbValue($rs->fields('PESERTAJENISKELAMIN_SEP'));\n\t\t$this->PESERTANAMAKELAS_SEP->setDbValue($rs->fields('PESERTANAMAKELAS_SEP'));\n\t\t$this->PESERTAPISAT->setDbValue($rs->fields('PESERTAPISAT'));\n\t\t$this->PESERTATGLLAHIR->setDbValue($rs->fields('PESERTATGLLAHIR'));\n\t\t$this->PESERTAJENISPESERTA_SEP->setDbValue($rs->fields('PESERTAJENISPESERTA_SEP'));\n\t\t$this->PESERTANAMAJENISPESERTA_SEP->setDbValue($rs->fields('PESERTANAMAJENISPESERTA_SEP'));\n\t\t$this->POLITUJUAN_SEP->setDbValue($rs->fields('POLITUJUAN_SEP'));\n\t\t$this->NAMAPOLITUJUAN_SEP->setDbValue($rs->fields('NAMAPOLITUJUAN_SEP'));\n\t\t$this->KDPPKRUJUKAN_SEP->setDbValue($rs->fields('KDPPKRUJUKAN_SEP'));\n\t\t$this->NMPPKRUJUKAN_SEP->setDbValue($rs->fields('NMPPKRUJUKAN_SEP'));\n\t\t$this->mapingtransaksi->setDbValue($rs->fields('mapingtransaksi'));\n\t\t$this->bridging_kepesertaan_by_no_ka->setDbValue($rs->fields('bridging_kepesertaan_by_no_ka'));\n\t\t$this->pasien_NOTELP->setDbValue($rs->fields('pasien_NOTELP'));\n\t\t$this->penjamin_kkl_id->setDbValue($rs->fields('penjamin_kkl_id'));\n\t\t$this->asalfaskesrujukan_id->setDbValue($rs->fields('asalfaskesrujukan_id'));\n\t\t$this->peserta_cob->setDbValue($rs->fields('peserta_cob'));\n\t\t$this->poli_eksekutif->setDbValue($rs->fields('poli_eksekutif'));\n\t\t$this->status_kepesertaan_BPJS->setDbValue($rs->fields('status_kepesertaan_BPJS'));\n\t}",
"function LoadRowValues(&$rs) {\n\t\tif (!$rs || $rs->EOF) return;\n\n\t\t// Call Row Selected event\n\t\t$row = &$rs->fields;\n\t\t$this->Row_Selected($row);\n\t\t$this->id->setDbValue($rs->fields('id'));\n\t\t$this->period_id->setDbValue($rs->fields('period_id'));\n\t\t$this->person_id->setDbValue($rs->fields('person_id'));\n\t\t$this->tipejurnal_id->setDbValue($rs->fields('tipejurnal_id'));\n\t\t$this->nomer->setDbValue($rs->fields('nomer'));\n\t\t$this->createon->setDbValue($rs->fields('createon'));\n\t\t$this->keterangan->setDbValue($rs->fields('keterangan'));\n\t}",
"function LoadRowValues(&$rs) {\n\t\tglobal $conn;\n\t\tif (!$rs || $rs->EOF) return;\n\n\t\t// Call Row Selected event\n\t\t$row = &$rs->fields;\n\t\t$this->Row_Selected($row);\n\t\t$this->idservicio_medico_prestado->setDbValue($rs->fields('idservicio_medico_prestado'));\n\t\t$this->idcuenta->setDbValue($rs->fields('idcuenta'));\n\t\t$this->fecha_inicio->setDbValue($rs->fields('fecha_inicio'));\n\t\t$this->fecha_final->setDbValue($rs->fields('fecha_final'));\n\t\t$this->estado->setDbValue($rs->fields('estado'));\n\t}",
"function bindAllValues($statement, $params)\n {\n foreach($params as $param => $value)\n {\n $statement->bindValue(':'.$param, $value);\n }\n return $statement;\n }",
"public function fetchAll($sql, $bind){\n $sth = $this->db->prepare($sql, array(PDO::ATTR_CURSOR => PDO::CURSOR_FWDONLY));\n /* example:\n $bind = array(':calories' => 150, ':colour' => 'red');\n */\n $sth->execute($bind);\n return $sth->fetchAll(PDO::FETCH_ASSOC);\n }",
"function LoadRowValues(&$rs) {\r\n\t\tif (!$rs || $rs->EOF) return;\r\n\r\n\t\t// Call Row Selected event\r\n\t\t$row = &$rs->fields;\r\n\t\t$this->Row_Selected($row);\r\n\t\t$this->Id_Pase->setDbValue($rs->fields('Id_Pase'));\r\n\t\t$this->Serie_Equipo->setDbValue($rs->fields('Serie_Equipo'));\r\n\t\t$this->Id_Hardware->setDbValue($rs->fields('Id_Hardware'));\r\n\t\t$this->SN->setDbValue($rs->fields('SN'));\r\n\t\t$this->Modelo_Net->setDbValue($rs->fields('Modelo_Net'));\r\n\t\t$this->Marca_Arranque->setDbValue($rs->fields('Marca_Arranque'));\r\n\t\t$this->Nombre_Titular->setDbValue($rs->fields('Nombre_Titular'));\r\n\t\t$this->Dni_Titular->setDbValue($rs->fields('Dni_Titular'));\r\n\t\t$this->Cuil_Titular->setDbValue($rs->fields('Cuil_Titular'));\r\n\t\t$this->Nombre_Tutor->setDbValue($rs->fields('Nombre_Tutor'));\r\n\t\t$this->DniTutor->setDbValue($rs->fields('DniTutor'));\r\n\t\t$this->Domicilio->setDbValue($rs->fields('Domicilio'));\r\n\t\t$this->Tel_Tutor->setDbValue($rs->fields('Tel_Tutor'));\r\n\t\t$this->CelTutor->setDbValue($rs->fields('CelTutor'));\r\n\t\t$this->Cue_Establecimiento_Alta->setDbValue($rs->fields('Cue_Establecimiento_Alta'));\r\n\t\t$this->Escuela_Alta->setDbValue($rs->fields('Escuela_Alta'));\r\n\t\t$this->Directivo_Alta->setDbValue($rs->fields('Directivo_Alta'));\r\n\t\t$this->Cuil_Directivo_Alta->setDbValue($rs->fields('Cuil_Directivo_Alta'));\r\n\t\t$this->Dpto_Esc_alta->setDbValue($rs->fields('Dpto_Esc_alta'));\r\n\t\t$this->Localidad_Esc_Alta->setDbValue($rs->fields('Localidad_Esc_Alta'));\r\n\t\t$this->Domicilio_Esc_Alta->setDbValue($rs->fields('Domicilio_Esc_Alta'));\r\n\t\t$this->Rte_Alta->setDbValue($rs->fields('Rte_Alta'));\r\n\t\t$this->Tel_Rte_Alta->setDbValue($rs->fields('Tel_Rte_Alta'));\r\n\t\t$this->Email_Rte_Alta->setDbValue($rs->fields('Email_Rte_Alta'));\r\n\t\t$this->Serie_Server_Alta->setDbValue($rs->fields('Serie_Server_Alta'));\r\n\t\t$this->Cue_Establecimiento_Baja->setDbValue($rs->fields('Cue_Establecimiento_Baja'));\r\n\t\t$this->Escuela_Baja->setDbValue($rs->fields('Escuela_Baja'));\r\n\t\t$this->Directivo_Baja->setDbValue($rs->fields('Directivo_Baja'));\r\n\t\t$this->Cuil_Directivo_Baja->setDbValue($rs->fields('Cuil_Directivo_Baja'));\r\n\t\t$this->Dpto_Esc_Baja->setDbValue($rs->fields('Dpto_Esc_Baja'));\r\n\t\t$this->Localidad_Esc_Baja->setDbValue($rs->fields('Localidad_Esc_Baja'));\r\n\t\t$this->Domicilio_Esc_Baja->setDbValue($rs->fields('Domicilio_Esc_Baja'));\r\n\t\t$this->Rte_Baja->setDbValue($rs->fields('Rte_Baja'));\r\n\t\t$this->Tel_Rte_Baja->setDbValue($rs->fields('Tel_Rte_Baja'));\r\n\t\t$this->Email_Rte_Baja->setDbValue($rs->fields('Email_Rte_Baja'));\r\n\t\t$this->Serie_Server_Baja->setDbValue($rs->fields('Serie_Server_Baja'));\r\n\t\t$this->Fecha_Pase->setDbValue($rs->fields('Fecha_Pase'));\r\n\t\t$this->Id_Estado_Pase->setDbValue($rs->fields('Id_Estado_Pase'));\r\n\t\t$this->Ruta_Archivo->Upload->DbValue = $rs->fields('Ruta_Archivo');\r\n\t\t$this->Ruta_Archivo->CurrentValue = $this->Ruta_Archivo->Upload->DbValue;\r\n\t}",
"function setResultSet(/* SQL ResultSet */$rs){\n\t\t$this->main_rs = $rs;\n\t}",
"function LoadDbValues(&$rs) {\n\t\tif (!$rs || !is_array($rs) && $rs->EOF) return;\n\t\t$row = is_array($rs) ? $rs : $rs->fields;\n\t\t$this->id->DbValue = $row['id'];\n\t\t$this->id_admission->DbValue = $row['id_admission'];\n\t\t$this->nomr->DbValue = $row['nomr'];\n\t\t$this->statusbayar->DbValue = $row['statusbayar'];\n\t\t$this->kelas->DbValue = $row['kelas'];\n\t\t$this->tanggal->DbValue = $row['tanggal'];\n\t\t$this->kode_tindakan->DbValue = $row['kode_tindakan'];\n\t\t$this->qty->DbValue = $row['qty'];\n\t\t$this->tarif->DbValue = $row['tarif'];\n\t\t$this->bhp->DbValue = $row['bhp'];\n\t\t$this->user->DbValue = $row['user'];\n\t\t$this->nama_tindakan->DbValue = $row['nama_tindakan'];\n\t\t$this->kelompok_tindakan->DbValue = $row['kelompok_tindakan'];\n\t\t$this->kelompok1->DbValue = $row['kelompok1'];\n\t\t$this->kelompok2->DbValue = $row['kelompok2'];\n\t\t$this->kode_dokter->DbValue = $row['kode_dokter'];\n\t\t$this->no_ruang->DbValue = $row['no_ruang'];\n\t}",
"function LoadRowValues(&$rs) {\n\t\tif (!$rs || $rs->EOF) return;\n\n\t\t// Call Row Selected event\n\t\t$row = &$rs->fields;\n\t\t$this->Row_Selected($row);\n\t\t$this->pegawai_id->setDbValue($rs->fields('pegawai_id'));\n\t\t$this->tgl_shift->setDbValue($rs->fields('tgl_shift'));\n\t\t$this->khusus_lembur->setDbValue($rs->fields('khusus_lembur'));\n\t\t$this->khusus_extra->setDbValue($rs->fields('khusus_extra'));\n\t\t$this->temp_id_auto->setDbValue($rs->fields('temp_id_auto'));\n\t\t$this->jdw_kerja_m_id->setDbValue($rs->fields('jdw_kerja_m_id'));\n\t\t$this->jk_id->setDbValue($rs->fields('jk_id'));\n\t\t$this->jns_dok->setDbValue($rs->fields('jns_dok'));\n\t\t$this->izin_jenis_id->setDbValue($rs->fields('izin_jenis_id'));\n\t\t$this->cuti_n_id->setDbValue($rs->fields('cuti_n_id'));\n\t\t$this->libur_umum->setDbValue($rs->fields('libur_umum'));\n\t\t$this->libur_rutin->setDbValue($rs->fields('libur_rutin'));\n\t\t$this->jk_ot->setDbValue($rs->fields('jk_ot'));\n\t\t$this->scan_in->setDbValue($rs->fields('scan_in'));\n\t\t$this->att_id_in->setDbValue($rs->fields('att_id_in'));\n\t\t$this->late_permission->setDbValue($rs->fields('late_permission'));\n\t\t$this->late_minute->setDbValue($rs->fields('late_minute'));\n\t\t$this->late->setDbValue($rs->fields('late'));\n\t\t$this->break_out->setDbValue($rs->fields('break_out'));\n\t\t$this->att_id_break1->setDbValue($rs->fields('att_id_break1'));\n\t\t$this->break_in->setDbValue($rs->fields('break_in'));\n\t\t$this->att_id_break2->setDbValue($rs->fields('att_id_break2'));\n\t\t$this->break_minute->setDbValue($rs->fields('break_minute'));\n\t\t$this->break->setDbValue($rs->fields('break'));\n\t\t$this->break_ot_minute->setDbValue($rs->fields('break_ot_minute'));\n\t\t$this->break_ot->setDbValue($rs->fields('break_ot'));\n\t\t$this->early_permission->setDbValue($rs->fields('early_permission'));\n\t\t$this->early_minute->setDbValue($rs->fields('early_minute'));\n\t\t$this->early->setDbValue($rs->fields('early'));\n\t\t$this->scan_out->setDbValue($rs->fields('scan_out'));\n\t\t$this->att_id_out->setDbValue($rs->fields('att_id_out'));\n\t\t$this->durasi_minute->setDbValue($rs->fields('durasi_minute'));\n\t\t$this->durasi->setDbValue($rs->fields('durasi'));\n\t\t$this->durasi_eot_minute->setDbValue($rs->fields('durasi_eot_minute'));\n\t\t$this->jk_count_as->setDbValue($rs->fields('jk_count_as'));\n\t\t$this->status_jk->setDbValue($rs->fields('status_jk'));\n\t\t$this->keterangan->setDbValue($rs->fields('keterangan'));\n\t}",
"function LoadRowValues(&$rs) {\r\n\t\tglobal $conn, $rekeningju;\r\n\t\tif (!$rs || $rs->EOF) return;\r\n\r\n\t\t// Call Row Selected event\r\n\t\t$row =& $rs->fields;\r\n\t\t$rekeningju->Row_Selected($row);\r\n\t\t$rekeningju->NoRek->setDbValue($rs->fields('NoRek'));\r\n\t\t$rekeningju->Keterangan->setDbValue($rs->fields('Keterangan'));\r\n\t\t$rekeningju->debet->setDbValue($rs->fields('debet'));\r\n\t\t$rekeningju->kredit->setDbValue($rs->fields('kredit'));\r\n\t\t$rekeningju->kode_bukti->setDbValue($rs->fields('kode_bukti'));\r\n\t\t$rekeningju->tanggal->setDbValue($rs->fields('tanggal'));\r\n\t\t$rekeningju->kode_otomatis_master->setDbValue($rs->fields('kode_otomatis_master'));\r\n\t\t$rekeningju->tanggal_nota->setDbValue($rs->fields('tanggal_nota'));\r\n\t\t$rekeningju->kode_otomatis->setDbValue($rs->fields('kode_otomatis'));\r\n\t\t$rekeningju->kode_otomatis_tingkat->setDbValue($rs->fields('kode_otomatis_tingkat'));\r\n\t\t$rekeningju->id->setDbValue($rs->fields('id'));\r\n\t\t$rekeningju->apakah_original->setDbValue($rs->fields('apakah_original'));\r\n\t}",
"function LoadRowValues(&$rs) {\r\n\t\tglobal $conn, $fs_multijoin_v;\r\n\t\t$fs_multijoin_v->id->setDbValue($rs->fields('id'));\r\n\t\t$fs_multijoin_v->mount->setDbValue($rs->fields('mount'));\r\n\t\t$fs_multijoin_v->path->setDbValue($rs->fields('path'));\r\n\t\t$fs_multijoin_v->parent->setDbValue($rs->fields('parent'));\r\n\t\t$fs_multijoin_v->deprecated->setDbValue($rs->fields('deprecated'));\r\n\t\t$fs_multijoin_v->name->setDbValue($rs->fields('name'));\r\n\t\t$fs_multijoin_v->snapshot->setDbValue($rs->fields('snapshot'));\r\n\t\t$fs_multijoin_v->tapebackup->setDbValue($rs->fields('tapebackup'));\r\n\t\t$fs_multijoin_v->diskbackup->setDbValue($rs->fields('diskbackup'));\r\n\t\t$fs_multijoin_v->type->setDbValue($rs->fields('type'));\r\n\t\t$fs_multijoin_v->CONTACT->setDbValue($rs->fields('CONTACT'));\r\n\t\t$fs_multijoin_v->CONTACT2->setDbValue($rs->fields('CONTACT2'));\r\n\t\t$fs_multijoin_v->RESCOMP->setDbValue($rs->fields('RESCOMP'));\r\n\t}",
"private function fetch_data($stmt) {\n\t\n\t\t$result = array();\n\t\n\t\tif ($stmt) {\n\t\n\t\t\t$metadata = $stmt->result_metadata();\n\t\t\t$fields = $metadata->fetch_fields();\n\t\n\t\t\tfor (;;) {\n\t\t\t\t$pointers = array();\n\t\t\t\t$row = new stdClass();\n\t\t\t\t$pointers[] = $stmt;\n\t\n\t\t\t\tforeach ($fields as $field) {\n\t\t\t\t\t$fieldname = $field->name;\n\t\t\t\t\t$pointers[] = &$row->$fieldname;\n\t\t\t\t}\n\t\n\t\t\t\tcall_user_func_array('mysqli_stmt_bind_result', $pointers);\n\t\n\t\t\t\tif ( !$stmt->fetch() ) { \n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t$result[] = $row;\n\t\t\t}\n\t\n\t\t\t$metadata->free();\n\t\t\t\n\t\t} else {\n\t\t\t$this->except( MYSQLI_ERR_FETCH_FAIL );\n\t\t}\n\t\n\t\treturn $result;\n\t\n\t}",
"public function result_set() {\n $this -> execute();\n return $this -> stmt -> fetchAll();\n }",
"function LoadDbValues(&$rs) {\n\t\tif (!$rs || !is_array($rs) && $rs->EOF) return;\n\t\t$row = is_array($rs) ? $rs : $rs->fields;\n\t\t$this->id->DbValue = $row['id'];\n\t\t$this->period_id->DbValue = $row['period_id'];\n\t\t$this->person_id->DbValue = $row['person_id'];\n\t\t$this->tipejurnal_id->DbValue = $row['tipejurnal_id'];\n\t\t$this->nomer->DbValue = $row['nomer'];\n\t\t$this->createon->DbValue = $row['createon'];\n\t\t$this->keterangan->DbValue = $row['keterangan'];\n\t}",
"function LoadRowValues(&$rs) {\n\t\tglobal $conn, $financial_year;\n\t\t$financial_year->financial_year_id->setDbValue($rs->fields('financial_year_id'));\n\t\t$financial_year->year_name->setDbValue($rs->fields('year_name'));\n\t\t$financial_year->date_start->setDbValue($rs->fields('date_start'));\n\t\t$financial_year->date_end->setDbValue($rs->fields('date_end'));\n\t}",
"function LoadRowValues(&$rs) {\r\n\t\tglobal $conn;\r\n\t\tif (!$rs || $rs->EOF) return;\r\n\r\n\t\t// Call Row Selected event\r\n\t\t$row = &$rs->fields;\r\n\t\t$this->Row_Selected($row);\r\n\t\t$this->Id_Proveedor->setDbValue($rs->fields('Id_Proveedor'));\r\n\t\t$this->RazonSocial->setDbValue($rs->fields('RazonSocial'));\r\n\t\t$this->RFC->setDbValue($rs->fields('RFC'));\r\n\t\t$this->NombreContacto->setDbValue($rs->fields('NombreContacto'));\r\n\t\t$this->CalleYNumero->setDbValue($rs->fields('CalleYNumero'));\r\n\t\t$this->Colonia->setDbValue($rs->fields('Colonia'));\r\n\t\t$this->Poblacion->setDbValue($rs->fields('Poblacion'));\r\n\t\t$this->Municipio_Delegacion->setDbValue($rs->fields('Municipio_Delegacion'));\r\n\t\t$this->Id_Estado->setDbValue($rs->fields('Id_Estado'));\r\n\t\t$this->CP->setDbValue($rs->fields('CP'));\r\n\t\t$this->_EMail->setDbValue($rs->fields('EMail'));\r\n\t\t$this->Telefonos->setDbValue($rs->fields('Telefonos'));\r\n\t\t$this->Celular->setDbValue($rs->fields('Celular'));\r\n\t\t$this->Fax->setDbValue($rs->fields('Fax'));\r\n\t\t$this->Banco->setDbValue($rs->fields('Banco'));\r\n\t\t$this->NumCuenta->setDbValue($rs->fields('NumCuenta'));\r\n\t\t$this->CLABE->setDbValue($rs->fields('CLABE'));\r\n\t\t$this->Maneja_Papeleta->setDbValue($rs->fields('Maneja_Papeleta'));\r\n\t\t$this->Observaciones->setDbValue($rs->fields('Observaciones'));\r\n\t\t$this->Maneja_Activacion_Movi->setDbValue($rs->fields('Maneja_Activacion_Movi'));\r\n\t}",
"public function exec()\n {\n $result = $this->connection()->prepare($this->assemble());\n\n foreach ($this->valuesToBind as $key => $value) {\n $result->bindValue(\":{$key}\", $value);\n }\n\n return $result->model($this->model)->exec();\n }",
"abstract function res_row($res);",
"function LoadRowValues($rs = NULL) {\n\t\tif ($rs && !$rs->EOF)\n\t\t\t$row = $rs->fields;\n\t\telse\n\t\t\t$row = $this->NewRow(); \n\n\t\t// Call Row Selected event\n\t\t$this->Row_Selected($row);\n\t\tif (!$rs || $rs->EOF)\n\t\t\treturn;\n\t\t$this->product_id->setDbValue($row['product_id']);\n\t\t$this->cat_id->setDbValue($row['cat_id']);\n\t\tif (array_key_exists('EV__cat_id', $rs->fields)) {\n\t\t\t$this->cat_id->VirtualValue = $rs->fields('EV__cat_id'); // Set up virtual field value\n\t\t} else {\n\t\t\t$this->cat_id->VirtualValue = \"\"; // Clear value\n\t\t}\n\t\t$this->company_id->setDbValue($row['company_id']);\n\t\tif (array_key_exists('EV__company_id', $rs->fields)) {\n\t\t\t$this->company_id->VirtualValue = $rs->fields('EV__company_id'); // Set up virtual field value\n\t\t} else {\n\t\t\t$this->company_id->VirtualValue = \"\"; // Clear value\n\t\t}\n\t\t$this->pro_model->setDbValue($row['pro_model']);\n\t\tif (array_key_exists('EV__pro_model', $rs->fields)) {\n\t\t\t$this->pro_model->VirtualValue = $rs->fields('EV__pro_model'); // Set up virtual field value\n\t\t} else {\n\t\t\t$this->pro_model->VirtualValue = \"\"; // Clear value\n\t\t}\n\t\t$this->pro_name->setDbValue($row['pro_name']);\n\t\t$this->pro_description->setDbValue($row['pro_description']);\n\t\t$this->pro_condition->setDbValue($row['pro_condition']);\n\t\t$this->pro_features->setDbValue($row['pro_features']);\n\t\t$this->post_date->setDbValue($row['post_date']);\n\t\t$this->ads_id->setDbValue($row['ads_id']);\n\t\t$this->pro_base_price->setDbValue($row['pro_base_price']);\n\t\t$this->pro_sell_price->setDbValue($row['pro_sell_price']);\n\t\t$this->featured_image->Upload->DbValue = $row['featured_image'];\n\t\t$this->featured_image->setDbValue($this->featured_image->Upload->DbValue);\n\t\t$this->folder_image->setDbValue($row['folder_image']);\n\t\tif (array_key_exists('EV__folder_image', $rs->fields)) {\n\t\t\t$this->folder_image->VirtualValue = $rs->fields('EV__folder_image'); // Set up virtual field value\n\t\t} else {\n\t\t\t$this->folder_image->VirtualValue = \"\"; // Clear value\n\t\t}\n\t\t$this->pro_status->setDbValue($row['pro_status']);\n\t\t$this->branch_id->setDbValue($row['branch_id']);\n\t\t$this->lang->setDbValue($row['lang']);\n\t}",
"private function bindParam()\n\t{\n\t\tif($this->nbParameters == 0)\n\t\t\treturn;\n\t\t$stmt = $this->stmt;\n\t\tcall_user_func_array(array($stmt, \"bind_param\"), $this->refValues(array_merge(array($this->parametersTypes), $this->parametersValues)));\n\t}",
"public function executePreparedSelect(string $queryString, string $types, array $vars, &...$results) {\n\n foreach($vars as $var) {\n $var = $this->dbConnection->real_escape_string($var);\n }\n\n $sqlStatement = $this->dbConnection->prepare($queryString);\n $sqlStatement->bind_param($types, ...$vars);\n\n $sqlStatement->execute();\n $sqlStatement->bind_result(...$results);\n $sqlStatement->store_result();\n return $sqlStatement;\n }",
"function LoadRowValues(&$rs) {\n\t\tglobal $conn, $tbl_slide;\n\t\t$tbl_slide->banner_id->setDbValue($rs->fields('banner_id'));\n\t\t$tbl_slide->title->setDbValue($rs->fields('title'));\n\t\t$tbl_slide->images->Upload->DbValue = $rs->fields('images');\n\t\t$tbl_slide->description->setDbValue($rs->fields('description'));\n\t\t$tbl_slide->order_by->setDbValue($rs->fields('order_by'));\n\t}",
"public function get_results() {\n\t\t//Begin actual functon\n\t\t$arg_check = $this->query_arg_check();\n\t\t\n\t\t//Check for matching number of arguments in query and arg array\n\t\tif (!$arg_check) {\n\t\t\t$this->except( MYSQLI_ERR_ARG_NUM_MISMATCH , $this->QUERY);\n\t\t} else {\n\t\t\t//Begin running the query\n\t\t\tif ($stmt = $this->connection->prepare($this->QUERY)) {\n\t\t\t\t\n\t\t\t\t$bind_values = array();\n\t\t\t\t$bind_types = '';\n\t\t\t\t$i=0;\n\t\t\n\t\t\t\t//NEW::change made to be able to run queries without having to pass arguments\n\t\t\t\tif(is_array($this->QUERY_ARGS))\n\t\t\t\t{\n\t\t\t\t\tforeach ($this->QUERY_ARGS as $id=>$value) \n\t\t\t\t\t{\n\t\t\t\t\t\t//NEW::change made to be able to run queries without having to pass arguments\n\t\t\t\t\t\tif ($value)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$bind_values[$i] = $value['value'];\n\t\t\t\t\t\t\t$i++;\n\t\t\t\t\t\t\t$bind_types .= $value['type'];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\n\t\t\t\t\tcall_user_func_array('mysqli_stmt_bind_param',\n\t\t\t\t\t\t\t\t\t array_merge ( array($stmt,$bind_types),\n\t\t\t\t\t\t\t\t\t $this->ref_values($bind_values)\n\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t\t );\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\t\t \n\t\t\t\t$count = $stmt->execute();\n\t\t\t\t\n\t\t\t\t//Get sql result based on query type\n\t\t\t\tswitch ($this->QUERY_TYPE) {\n\t\t\t\t\tcase 'SELECT';\n\t\t\t\t\t\t$result_class_object = $this->fetch_data($stmt);\n\t\t\t\t\t\t$result = $this->std_class_object_to_array($result_class_object);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'INSERT';\n\t\t\t\t\t\t$result = $stmt->insert_id;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault; // UPDATE and others\n\t\t\t\t\t\t$result = $count;\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$stmt->close();\n\t\t\t\t\n\t\t\t\treturn $result;\n\t\t\t}\n\t\t}\n\t}",
"function LoadRowValues(&$rs) {\n\t\tglobal $conn;\n\t\tif (!$rs || $rs->EOF) return;\n\n\t\t// Call Row Selected event\n\t\t$row = &$rs->fields;\n\t\t$this->Row_Selected($row);\n\t\t$this->userlevelid->setDbValue($rs->fields('userlevelid'));\n\t\tif (is_null($this->userlevelid->CurrentValue)) {\n\t\t\t$this->userlevelid->CurrentValue = 0;\n\t\t} else {\n\t\t\t$this->userlevelid->CurrentValue = intval($this->userlevelid->CurrentValue);\n\t\t}\n\t\t$this->userlevelname->setDbValue($rs->fields('userlevelname'));\n\t}",
"public function getRows($sql, $bind = null)\r\n {\r\n $result = $this->_execute($sql, $bind);\r\n\r\n return $result->fetchAll(SQLITE_ASSOC);\r\n }",
"public function bindValues()\n {\n $ret = [];\n\n if ($this->data)\n {\n $ret = \\array_values($this->data);\n }\n\n if ($this->getWhereValues())\n {\n $ret = \\array_merge($ret, $this->getWhereValues());\n }\n\n return Utils::arrayFlatten($ret);\n }"
]
| [
"0.68196523",
"0.66728026",
"0.64769924",
"0.6208242",
"0.61962444",
"0.5888165",
"0.5857166",
"0.58563656",
"0.58476716",
"0.5818572",
"0.57589954",
"0.5693269",
"0.5661475",
"0.56513906",
"0.563987",
"0.56388116",
"0.5633599",
"0.5631542",
"0.56267804",
"0.56225955",
"0.56097347",
"0.5592321",
"0.55877286",
"0.5544098",
"0.55323935",
"0.55319816",
"0.5527142",
"0.5527142",
"0.55244136",
"0.5519862",
"0.5501918",
"0.5489569",
"0.54894125",
"0.54894125",
"0.54627055",
"0.54387325",
"0.5427637",
"0.5423322",
"0.5402983",
"0.540275",
"0.5395946",
"0.539393",
"0.5390058",
"0.53892857",
"0.53854877",
"0.53737235",
"0.53661275",
"0.5365906",
"0.5365906",
"0.53653866",
"0.53459185",
"0.53456146",
"0.53360325",
"0.5334612",
"0.5318194",
"0.5312167",
"0.52931315",
"0.5292785",
"0.5292124",
"0.5286102",
"0.52833",
"0.5272638",
"0.52617747",
"0.5259402",
"0.5257587",
"0.5242155",
"0.52398306",
"0.52378166",
"0.52341974",
"0.52300495",
"0.52298105",
"0.5221638",
"0.52184504",
"0.5216239",
"0.5215131",
"0.5213707",
"0.5206342",
"0.5196207",
"0.51944274",
"0.5189816",
"0.5182648",
"0.5182539",
"0.517931",
"0.5175228",
"0.5173079",
"0.5171353",
"0.51706064",
"0.51697534",
"0.51657546",
"0.5156859",
"0.5145787",
"0.5143738",
"0.51437324",
"0.51408184",
"0.51401144",
"0.5137244",
"0.5135837",
"0.51211274",
"0.51197344",
"0.51192176"
]
| 0.8244629 | 0 |
Encode the string to or decode from a base64 encoded value. | public function base64(string $mode = Config\Base64::ENCODE) : self
{
Config\Base64::validateOption($mode);
return new static($mode($this->string));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function EncodeBase64( $string )\n\t{\n\t\treturn base64_encode( $string );\n\t}",
"public function safe_b64encode($string) {\n $data = base64_encode($string);\n $data = str_replace(array('+', '/', '='),array('-', '_', ''),$data);\n return $data;\n }",
"private static function encode($string)\n {\n return base64_encode($string);\n }",
"static public function base64Encode($string) {\n // The order is important here!\n return rtrim(str_replace(array('+', '/'), array('-', '_'), base64_encode($string)), '=');\n }",
"public static function safe_b64encode($string)\n {\n\n $data = base64_encode($string);\n $data = str_replace(array('+', '/', '='), array('-', '_', ''), $data);\n return $data;\n }",
"public function encode(string $string): string\n {\n return base64_encode($string);\n }",
"function urlsafe_b64encode($string) {\n $data = base64_encode($string);\n $data = str_replace(array('+','/','='),array('-','_','.'),$data);\n return $data;\n}",
"protected static function filter_base64($value)\n\t{\n\t\treturn base64_encode($value);\n\t}",
"function base64urlEncode($str) {\n return rtrim(strtr(base64_encode($str), '+/', '-_'), '=');\n }",
"function encode(String $data)\n\t{\n\n\t\treturn base64_encode($data) ?? false;\n\n\t}",
"protected function base64Encode(string $data)\n {\n return rtrim(strtr(base64_encode($data), '+/', '-_'), '=');\n }",
"public static function encode($string) {\n\t\treturn '=?utf-8?B?' . base64_encode($string) . '?=';\n\t}",
"function Base64Encode( $str )\n{ \n return substr(chunk_split(base64_encode( $str ),64,\"\\n\"),0,-1).\"\\n\";\n}",
"function DecodeBase64( $string )\n\t{\n\t\treturn base64_decode( $string );\n\t}",
"function base64Encode($plain) {\n\n // Initialise output variable\n\n $output = \"\";\n\n \n\n // Do encoding\n\n $output = base64_encode($plain);\n\n \n\n // Return the result\n\n return $output;\n\n}",
"function encode_base64($sData){\n $sBase64 = base64_encode($sData);\n return strtr($sBase64, '+/', '-_'); \n }",
"function acadp_base64_encode( $string ) {\n\t return str_replace( array( '+', '/', '=' ), array( '-', '_', '.' ), base64_encode( $string ) );\n}",
"function base64_encode($data)\n{\n}",
"public static function decodeValue($value)\n {\n return base64_decode($value);\n }",
"function base64Encode($plain) {\n // Initialise output variable\n $output = \"\";\n \n // Do encoding\n $output = base64_encode($plain);\n \n // Return the result\n return $output;\n}",
"function encodeBase64UrlSafe($value) {\n return str_replace(array('+', '/'), array('-', '_'),\n base64_encode($value));\n}",
"function encodeBase64UrlSafe($value)\n{\n return str_replace(array('+', '/'), array('-', '_'),\n base64_encode($value));\n}",
"function encodeCustomBase64($raw) {\n\t$base64 = base64_encode($raw);\n\t$customBase64 = strtr($base64, DEFAULT_BASE64, CUSTOM_BASE64);\n\treturn $customBase64;\n}",
"public function encode($string, $key = '')\n {\n $key = $this->getKey($key);\n $enc = $this->mcryptEncode($string, $key);\n\n return base64_encode($enc);\n }",
"public static function encode_base64_url_safe($value) {\n return str_replace(array('+', '/'), array('-', '_'), base64_encode($value));\n }",
"private function encode_Base64UrlSafe( $value ) {\n\t\t\treturn str_replace( array( '+', '/' ), array( '-', '_' ), base64_encode( $value ) );\n\t\t}",
"private function encodeBase64UrlSafe($value) {\n\t\treturn str_replace(array('+', '/'), array('-', '_'),base64_encode($value));\n\t}",
"public static function b64uEncode($whatever)\n {\n return sodium_bin2base64($whatever, SODIUM_BASE64_VARIANT_URLSAFE);\n }",
"public static function encBase64($e){\n return strtr(base64_encode($e), '+/=', '-_,');\n }",
"function base64url_encode($data) {\n return rtrim(strtr(base64_encode($data), '+/', '-_'), '=');\n}",
"public function encrypt_encode($string = '', $key = false){\n if($key){\n return base64_encode( $this->encrypt->encode($string, $key) );\n }else{\n return base64_encode( $this->encrypt->encode($string) );\n }\n \n }",
"function nrua_is_base64( $str )\n{\n\tif( $str === base64_encode( base64_decode( $str ) ) )\n\t{\n\t\treturn true;\n\t}\n\t\n\treturn false;\n}",
"function urlsafeB64Encode(string $input)\n\t{\n\t\treturn str_replace('=', '', strtr(base64_encode($input), '+/', '-_'));\n\t}",
"function base64_url_encode($input)\n{\nreturn strtr(base64_encode($input), '+/=', '-_,');\n}",
"public static function base64EncodeStr($str='', $start_add_str='', $end_add_str=''){\n if($str != ''){\n if($start_add_str != ''){\n $str .= $start_add_str;\n }\n if($end_add_str != ''){\n $str .= $end_add_str;\n }\n return base64_encode($str);\n }\n return '';\n }",
"function acoc_encode( $value ) {\n\n $func = 'base64' . '_encode';\n return $func( $value );\n \n}",
"static function base64url_encode($data) {\n\t\treturn rtrim(strtr(base64_encode($data), '+/', '-_'), '=');\n\t}",
"public function isBase64()\n {\n if (\n $this->str !== ''\n &&\n base64_encode(base64_decode($this->str, true)) === $this->str\n ) {\n return true;\n } else {\n return false;\n }\n }",
"function yt_encode( $value ) {\n\n\t$func = 'base64' . '_encode';\n\treturn $func( $value );\n \n}",
"function base64url_encode($data)\n{\n $b64 = base64_encode($data);\n if ($b64 === false) {\n return false;\n }\n $url = strtr($b64, '+/', '-_');\n return rtrim($url, '=');\n}",
"public static function decode_base64_url_safe($value) {\n return base64_decode(str_replace(array('-', '_'), array('+', '/'), $value));\n }",
"public function decode(string $string): string\n {\n return base64_decode($string);\n }",
"function acadp_base64_decode( $string ) {\n\treturn base64_decode( str_replace( array( '-', '_', '.' ), array( '+', '/', '=' ), $string ) );\n}",
"private static function decode($string)\n {\n return base64_decode($string);\n }",
"function decodeBase64UrlSafe($value)\n{\n return base64_decode(str_replace(array('-', '_'), array('+', '/'),\n $value));\n}",
"public function base64url_encode($data) { \n\t return rtrim(strtr(base64_encode($data), '+/', '-_'), '='); \n\t}",
"function decodeBase64UrlSafe($value) {\n return base64_decode(str_replace(array('-', '_'), array('+', '/'),\n $value));\n}",
"public function encode($data) {\n $tmp = base64_encode((string) $data);\n if (empty($tmp)) {\n return false;\n }\n return str_replace('=', '', strtr($tmp, '+/', '-_'));\n }",
"private function isBase64EncodedString($string)\n {\n if ( base64_encode(base64_decode($string, true)) === $string){\n // In this case the input was a valid base-64 encoded string.\n return true;\n }\n return false;\n }",
"private function decode_Base64UrlSafe( $value ) {\n\t\t\treturn base64_decode( str_replace( array( '-', '_' ), array( '+', '/' ), $value ) );\n\t\t}",
"function is_base64($s)\n{\n if (!preg_match('/^[a-zA-Z0-9\\/\\r\\n+]*={0,2}$/', $s)) return false;\n\n // Decode the string in strict mode and check the results\n $decoded = base64_decode($s, true);\n if (false === $decoded) return false;\n\n // Encode the string again\n if (base64_encode($decoded) != $s) return false;\n\n return true;\n}",
"public function base64url_encode($data)\n {\n // First of all you should encode $data to Base64 string\n $b64 = base64_encode($data);\n\n // Make sure you get a valid result, otherwise, return FALSE, as the base64_encode() function do\n if ($b64 === false) {\n return false;\n }\n\n // Convert Base64 to Base64URL by replacing + with - and / with _\n $url = strtr($b64, '+/', '-_');\n\n // Remove padding character from the end of line and return the Base64URL result\n return rtrim($url, '=');\n }",
"function base64_url_encode( $data ) {\n return rtrim(strtr(base64_encode($data), '+/', '-_'), '=');\n}",
"public function getBase64(): string;",
"private function decodeBase64UrlSafe($value) {\n\t\treturn base64_decode(str_replace(array('-', '_'), array('+', '/'),$value));\n\t}",
"protected static function base64EncodeUrlSafe($value)\n\t\t\t{\n\t\t\t\treturn strtr(base64_encode($value), '+/', '-_');\n\t\t\t}",
"function EncodeVal($val) {\n return base64_encode(\"P\" . $val . \"E\");\n }",
"function base64urlDecode($str) {\n return base64_decode(str_pad(strtr($str, '-_', '+/'), strlen($str) % 4, '=', STR_PAD_RIGHT));\n }",
"protected function encodeData($data)\n {\n if ($this->base64encode) {\n $data = base64_encode(serialize($data));\n }\n return $data;\n }",
"function base64urldecode($str)\n {\n return base64_decode(strtr($str, '-_,', '+/='));\n }",
"function base64urlencode($str)\n {\n return strtr(base64_encode($str), '+/=', '-_,');\n }",
"function base64url_encode($plainText) \n{\n $base64 = base64_encode($plainText);\n $base64url = strtr($base64, '+/=', '-_,');\n return $base64url;\n}",
"public static function base64UrlEncode($data)\n {\n return rtrim(strtr(base64_encode($data), '+/', '-_'), '=');\n }",
"protected static function base64DecodeUrlSafe($value)\n\t\t\t{\n\t\t\t\treturn base64_decode(strtr($value, '-_', '+/'));\n\t\t\t}",
"public function setValue($value)\n {\n return $this->value = base64_encode($value);\n }",
"function wv_base64url_encode($data) {\n return rtrim(strtr(base64_encode($data), '$$#', '%%*'), '=');\n }",
"function acoc_decode( $value ) {\n\n $func = 'base64' . '_decode';\n return $func( $value );\n \n}",
"public function encodeString($str, $encoding = self::ENCODING_BASE64)\n {\n }",
"function base64_urlencode($string) {\n return rtrim(strtr(base64_encode($string), '+/', '-_'), '=');\n}",
"abstract public function encode();",
"function decode($input) {\n return base64_decode($input);\n }",
"public static function base64URIDecode($str) {\n return base64_decode(strtr($str, '_-', '+/'), /* strict = */ true);\n }",
"function enc($data)\n {\n return base64_encode($data);\n }",
"function encode_subject($in_str, $charset) { \n $out_str = $in_str; \n if ($out_str && $charset) { \n\n // define start delimimter, end delimiter and spacer \n $end = \"?=\"; \n $start = \"=?\" . $charset . \"?B?\"; \n $spacer = $end . \"\\r\\n \" . $start; \n\n // determine length of encoded text within chunks \n // and ensure length is even \n $length = 75 - strlen($start) - strlen($end); \n\n /* \n [EDIT BY danbrown AT php DOT net: The following \n is a bugfix provided by (gardan AT gmx DOT de) \n on 31-MAR-2005 with the following note: \n \"This means: $length should not be even, \n but divisible by 4. The reason is that in \n base64-encoding 3 8-bit-chars are represented \n by 4 6-bit-chars. These 4 chars must not be \n split between two encoded words, according \n to RFC-2047. \n */ \n $length = $length - ($length % 4); \n\n // encode the string and split it into chunks \n // with spacers after each chunk \n $out_str = base64_encode($out_str); \n $out_str = chunk_split($out_str, $length, $spacer); \n\n // remove trailing spacer and \n // add start and end delimiters \n $spacer = preg_quote($spacer); \n $out_str = preg_replace(\"/\" . $spacer . \"$/\", \"\", $out_str); \n $out_str = $start . $out_str . $end; \n } \n return $out_str; \n}",
"function decode($string, $key = '')\n {\n $key = $this->getKey($key);\n\n if (preg_match('/[^a-zA-Z0-9\\/\\+=]/', $string)) {\n return false;\n }\n\n $dec = base64_decode($string);\n\n if (($dec = $this->mcryptDecode($dec, $key)) === false) {\n return false;\n }\n\n return $dec;\n }",
"function base64Decode($scrambled) {\n\n // Initialise output variable\n\n $output = \"\";\n\n \n\n // Do encoding\n\n $output = base64_decode($scrambled);\n\n \n\n // Return the result\n\n return $output;\n\n}",
"public static function isBase64String($string)\n {\n return (base64_decode($string, true) !== false);\n }",
"public static function base64url2base64($data) {\n return str_pad(strtr($data, '-_', '+/'), strlen($data) % 4, '=', STR_PAD_RIGHT);\n }",
"public function defaultencode($string) {\n $this->ci->load->library('encrypt');\n $data = $this->ci->encrypt->encode($string);\n $data = str_replace(array('+', '/', '='), array('-', '_', '~'), $data);\n return $data;\n }",
"function b64url2b64($base64url)\n{\n // \"Shouldn't\" be necessary, but why not\n $padding = strlen($base64url) % 4;\n if ($padding > 0) {\n $base64url .= str_repeat(\"=\", 4 - $padding);\n }\n return strtr($base64url, '-_', '+/');\n}",
"public static function encode($data)\n {\n return rtrim(strtr(base64_encode($data), '+/', '-_'), '=');\n }",
"abstract function encode($s);",
"function base64_url_decode($input) {\n return base64_decode(strtr($input, '-_', '+/'));\n}",
"abstract function encode($data);",
"abstract public static function encode($data): string;",
"function decode_base64($sData){\n $sBase64 = strtr($sData, '-_', '+/');\n return base64_decode($sBase64);\n }",
"function base64_url_decode($input)\n{\nreturn base64_decode(strtr($input, '-_,', '+/='));\n}",
"function encode_var($var) {\n\tif ($var == '') {\n\t\treturn '';\n\t}\n\n\t$var = json_encode($var);\n\t$var = base64_encode($var);\n\treturn $var;\n}",
"protected function base64UrlDecode(string $encoded): string\n {\n return base64_decode(strtr($encoded, '-_', '+/'));\n }",
"protected function base64Decode(string $data)\n {\n $data = str_pad(strtr($data, '-_', '+/'), strlen($data) % 4, '=', STR_PAD_RIGHT);\n return base64_decode($data);\n }",
"function decode(String $data)\n\t{\n\n\t\treturn base64_decode($data) ?? false;\n\n\t}",
"function urlsafeB64Decode(string $input)\n\t{\n\t\t$remainder = strlen($input) % 4;\n\t\tif ($remainder) {\n\t\t\t$padlen = 4 - $remainder;\n\t\t\t$input .= str_repeat('=', $padlen);\n\t\t}\n\t\treturn base64_decode(strtr($input, '-_', '+/'));\n\t}",
"public function getBase64Content(): string;",
"abstract public function encode($data);",
"public function encodeFromLegacy($string, $legacy_mode = MCRYPT_MODE_ECB, $key = '')\n {\n // decode it first\n // set mode temporarily to what it was when string was encoded with the legacy\n // algorithm - typically MCRYPT_MODE_ECB\n $current_mode = $this->_getMode();\n $this->setMode($legacy_mode);\n\n $key = $this->getKey($key);\n\n if (preg_match('/[^a-zA-Z0-9\\/\\+=]/', $string)) {\n return false;\n }\n\n $dec = base64_decode($string);\n\n if (($dec = $this->mcryptDecode($dec, $key)) === false) {\n return false;\n }\n\n $dec = $this->_xorDecode($dec, $key);\n\n // set the mcrypt mode back to what it should be, typically MCRYPT_MODE_CBC\n $this->setMode($current_mode);\n\n // and re-encode\n return base64_encode($this->mcryptEncode($dec, $key));\n }",
"public function encode($data) {}",
"function yt_decode( $value ) {\n\n\t$func = 'base64' . '_decode';\n\treturn $func( $value );\n \n}",
"public function encode($data) {}",
"public function encode($data) {}",
"public function encode($data) {}",
"public function encode($data) {}"
]
| [
"0.73187274",
"0.7287909",
"0.71248",
"0.7008291",
"0.6994302",
"0.6961772",
"0.6953062",
"0.6816116",
"0.6793689",
"0.67913973",
"0.6681156",
"0.6670378",
"0.66615593",
"0.66588795",
"0.6587263",
"0.6578902",
"0.65533835",
"0.6538464",
"0.65139455",
"0.6507034",
"0.6495089",
"0.64757574",
"0.6469296",
"0.64652425",
"0.64643157",
"0.6450438",
"0.6434934",
"0.6410087",
"0.6406191",
"0.6387087",
"0.63653964",
"0.6361007",
"0.63588995",
"0.63432294",
"0.6339095",
"0.63378185",
"0.63237035",
"0.63206834",
"0.6315168",
"0.62740815",
"0.6267029",
"0.626664",
"0.6240003",
"0.623235",
"0.6224332",
"0.62149763",
"0.6212796",
"0.6207283",
"0.6195226",
"0.616581",
"0.6163138",
"0.61496276",
"0.61477596",
"0.6128232",
"0.6122882",
"0.6121825",
"0.6111532",
"0.6084119",
"0.60811543",
"0.6078517",
"0.6077673",
"0.60675377",
"0.60472995",
"0.60307485",
"0.60170597",
"0.6008184",
"0.6006329",
"0.60047156",
"0.6003535",
"0.5979487",
"0.5965707",
"0.5963638",
"0.59593064",
"0.59580946",
"0.59238327",
"0.59181505",
"0.58922696",
"0.5859025",
"0.58588624",
"0.583336",
"0.5831742",
"0.58227223",
"0.58194184",
"0.58183575",
"0.581018",
"0.5802056",
"0.57982314",
"0.57868004",
"0.57867944",
"0.5776676",
"0.57755435",
"0.5773884",
"0.5765119",
"0.5757079",
"0.5741498",
"0.57358277",
"0.5733752",
"0.57334745",
"0.57334745",
"0.57334745",
"0.57334745"
]
| 0.0 | -1 |
Encode the string to a URL safe string. | public function urlencode() : self
{
return new static(urlencode($this->string));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function urlEncode($string)\r\n {\r\n return str_replace(\"%7E\", \"~\", rawurlencode($string));\r\n }",
"function url_encode($string){\n return urlencode(utf8_encode($string));\n }",
"function _encode($string) {\n\t\tif (preg_match('/(\\/|&)/', $string)) {\n\t\t\t$string = urlencode($string);\n\t\t}\n\n\t\treturn urlencode($string);\n\t}",
"public static function urlEncode($string) {\n $entities = array('%21', '%2A', '%27', '%28', '%29', '%3B', '%3A', '%40', '%26', '%3D', '%2B', '%24', '%2C', '%2F', '%3F', '%25', '%23', '%5B', '%5D');\n $replacements = array('!', '*', \"'\", \"(\", \")\", \";\", \":\", \"@\", \"&\", \"=\", \"+\", \"$\", \",\", \"/\", \"?\", \"%\", \"#\", \"[\", \"]\");\n return str_replace($entities, $replacements, $string);\n }",
"public static function url($string) {\n return rawurlencode($string);\n }",
"public static function url_encrpyt( $url_string ){\n // Encode the url.\n return base64_encode($url_string);\n }",
"function encodeUrlSafe(String $data)\n\t{\n\n\t\t$encoded = encode($data);\n\n\t\treturn strtr(\n\t\t\t$encoded,\n\t\t\t'+/=',\n\t\t\t'-_~'\n\t\t);\n\n\t}",
"public static function setUrlEncode($str) {\n return urlencode($str);\n }",
"public function encode($url)\n {\n return strtr(base64_encode($url), '+/=', '-_,');\n }",
"function url_encode($text)\n {\n return rtrim(strtr(base64_encode($text), '+/', '-_'), '=');\n }",
"public function encode_url($text){\n\t\t$text_encode = $this->encrypt($text);\n\t\t$text_encode = strtr(\n $text_encode,\n array(\n '+' => '.',\n '=' => '-',\n '/' => '~'\n )\n );\n\t\treturn $text_encode;\n\t}",
"public static function encode($url) {\t\t\t\n\t\t\t$reserved = array(\n\t\t\t\t\t\":\" => '!%3A!ui',\n\t\t\t\t\t\"/\" => '!%2F!ui',\n\t\t\t\t\t\"?\" => '!%3F!ui',\n\t\t\t\t\t\"#\" => '!%23!ui',\n\t\t\t\t\t\"[\" => '!%5B!ui',\n\t\t\t\t\t\"]\" => '!%5D!ui',\n\t\t\t\t\t\"@\" => '!%40!ui',\n\t\t\t\t\t\"!\" => '!%21!ui',\n\t\t\t\t\t\"$\" => '!%24!ui',\n\t\t\t\t\t\"&\" => '!%26!ui',\n\t\t\t\t\t\"'\" => '!%27!ui',\n\t\t\t\t\t\"(\" => '!%28!ui',\n\t\t\t\t\t\")\" => '!%29!ui',\n\t\t\t\t\t\"*\" => '!%2A!ui',\n\t\t\t\t\t\"+\" => '!%2B!ui',\n\t\t\t\t\t\",\" => '!%2C!ui',\n\t\t\t\t\t\";\" => '!%3B!ui',\n\t\t\t\t\t\"=\" => '!%3D!ui',\n\t\t\t\t\t\"%\" => '!%25!ui',\n\t\t\t\t);\n\t\t\t\t\n\t\t\t$url = rawurlencode(utf8_encode($url));\n\t\t\t$url = preg_replace(array_values($reserved), array_keys($reserved), $url);\n\t\t\t\t\n\t\t\treturn $url;\n\t\t}",
"function urlencode_url($string) {\n if(valid_url($string)) {\n return urlencode(base64_encode($string));\n } else {\n return $string;\n }\n}",
"function urlsafe_encode($input)\n\t{\n\t\treturn str_replace('=', '', strtr(base64_encode($input), '+/', '-_'));\n\t}",
"function uri_safe_encode($str, $hexify = TRUE)\n{\n\t$str = ($hexify) ? ascii_to_hex(base64_encode($str)) : base64_encode($str);\n\treturn $str;\n}",
"protected static function base64EncodeUrlSafe($value)\n\t\t\t{\n\t\t\t\treturn strtr(base64_encode($value), '+/', '-_');\n\t\t\t}",
"function mysql_encode_url($string)\n {\n $is_active = get_magic_quotes_gpc();\n $check_version = function_exists(\"mysql_real_escape_string\");\n if($check_version)\n {\n if($is_active)\n {\n $string = mysql_real_escape_string($string);\n }\n }\n else\n {\n if(!$is_active)\n {\n $string = addslashes($string);\n }\n }\n return $string;\n }",
"function encode($input)\n{\n\tif(STRIPSLASHES)\n\t\t$input = stripslashes($input);\n\n\treturn urlencode(htmlspecialchars($input));\n}",
"function encodeWebSafeString($string)\n {\n return str_replace(['+', '/'], ['-', '_'], $string);\n }",
"private function encodeUrl($url)\n {\n \treturn $url;\n \t#return rawurlencode($url);\n }",
"function base64urlEncode($str) {\n return rtrim(strtr(base64_encode($str), '+/', '-_'), '=');\n }",
"function fixUrl($str){\n return urlencode($str);\n}",
"public static function urlify($str) {\n $str = trim($str);\n if (empty($str))\n return '';\n $str = self::stripAccents($str);\n $str = strtolower($str);\n $str = preg_replace('/&.+?;/', '', $str);\n $str = preg_replace(array('/(\\s|[^\\w-]|-|,)+/u'), array('-'), $str);\n $str = trim($str, '-');\n $str = urlencode($str);\n return $str;\n }",
"function safeURL ($text) {\n\t//WARNING: this does not sanitise against HTML, it’s assumed text is passed through `safeHTML` before output\n\treturn str_replace ('%2F', '/', rawurlencode ($text));\n}",
"protected static function _urlencode($string)\n\t{\n\t\t$string = trim($string);\n\t\t$string = rawurlencode($string);\n\t\treturn str_replace('%7E', '~', $string);\n\t}",
"function base64_url_encode($input)\n{\nreturn strtr(base64_encode($input), '+/=', '-_,');\n}",
"protected function _urlencode($value) {\n return rawurlencode($value);\n //Amazon suggests doing this, but it seems to break things rather than fix them:\n //return str_replace('%7E', '~', rawurlencode($value));\n }",
"function url_encode($component) {\n $base_encoded = urlencode($component);\n $replacement = [\n '%3A' => ':',\n '%2C' => ',',\n '+' => '%20',\n ];\n return strtr($base_encoded, $replacement);\n}",
"public function encode_url_rfc3986( $url ) {\n\t\tif ( filter_var( $url, FILTER_VALIDATE_URL ) ) {\n\t\t\treturn $url;\n\t\t}\n\n\t\t$url = $this->encode_url_path( $url );\n\t\t$url = $this->encode_url_query( $url );\n\n\t\treturn $url;\n\t}",
"public function urlEncode($url)\n {\n $url = preg_replace('/index\\.php/', 'indexdotphp', $url);\n return str_replace('%', '%25', urlencode($url));\n }",
"public static function encode($uri = null) {\n if ($uri === null)\n $uri = self::getURL();\n if (!String::isString($uri))\n throw new InvalidArgumentException(\"uri must be a string\");\n\n return urlencode($uri);\n }",
"public function enc($val)\n {\n\n return rawurlencode($val);\n }",
"function urlsafeB64Encode(string $input)\n\t{\n\t\treturn str_replace('=', '', strtr(base64_encode($input), '+/', '-_'));\n\t}",
"private static function encode($string)\n {\n return base64_encode($string);\n }",
"function tourl($strValue)\n{\n return urlencode($strValue);\n}",
"function base64urlencode($str)\n {\n return strtr(base64_encode($str), '+/=', '-_,');\n }",
"static function urlEncodeExceptSlash($str) {\r\n return implode(\"/\", array_map(rawurlencode, explode(\"/\", $str)));\r\n }",
"public function encode(string $string): string\n {\n return base64_encode($string);\n }",
"protected function encode($value)\n {\n return str_replace(static::$characters_set_encoded, static::$characters_set, rawurlencode($value));\n }",
"public static function escapeUrl(string $url): string\n\t{\n\t\t$url = parse_url($url);\n\t\t$url['path'] = $url['path'] ?? '';\n\t\t$url['query'] = $url['query'] ?? '';\n\n\t\tif ($url['path'] !== '') {\n\t\t\t$url['path'] = implode('/', array_map('rawurlencode', explode('/', $url['path'])));\n\t\t}\n\n\t\tif ($url['query'] !== '') {\n\t\t\t$url['query'] = \"?{$url['query']}\";\n\t\t}\n\n\t\treturn str_replace(\n\t\t\t['&', \"'\", '\"', '>', '<'],\n\t\t\t['&', ''', '"', '>', '<'],\n\t\t\t$url['scheme'] . \"://{$url['host']}{$url['path']}{$url['query']}\"\n\t\t);\n\t}",
"public static function encode_base64_url_safe($value) {\n return str_replace(array('+', '/'), array('-', '_'), base64_encode($value));\n }",
"function urlsafe_b64encode($string) {\n $data = base64_encode($string);\n $data = str_replace(array('+','/','='),array('-','_','.'),$data);\n return $data;\n}",
"public static function u(string $string = '') {\r\n return urlencode($string);\r\n }",
"function format_string_for_url($string) {\n\t\t$string = str_replace(\n\t\t\tarray('&', \"'\", ' ', '/'),\n\t\t\tarray('and', '', '_', '_'),\n\t\t\t$string\n\t\t);\n\t\t$string = strtolower(iconv(\"UTF-8\", \"ASCII//TRANSLIT\", $string));\n\t\treturn $string;\n\t}",
"function string_url( $p_string ) \r\n{\r\n\t$p_string = rawurlencode( $p_string );\r\n\r\n\treturn $p_string;\r\n}",
"public function encodeUrl($url)\n {\n $urlTrimmed = str_replace(['http://', 'https://'], '', $url);\n $scheme = parse_url($url, PHP_URL_SCHEME);\n if ($scheme) {\n $urlTrimmed = preg_replace('/^' . $scheme . '\\:\\/\\//', '', $url);\n }\n \n $qMarkExplode = explode('?', $urlTrimmed);\n $slashExplode = explode('/', $qMarkExplode[0]);\n foreach ($slashExplode as $slash) {\n $slashArray[] = urlencode($slash);\n }\n $qMarkExplode[0] = implode('/', $slashArray);\n unset($slashArray);\n\n $qMarkImplode = implode('?', $qMarkExplode);\n\n if (parse_url($url, PHP_URL_SCHEME)) {\n return parse_url($url, PHP_URL_SCHEME) . '://' . $qMarkImplode;\n }\n return $qMarkImplode;\n }",
"private function encodeBase64UrlSafe($value) {\n\t\treturn str_replace(array('+', '/'), array('-', '_'),base64_encode($value));\n\t}",
"function base64_urlencode($string) {\n return rtrim(strtr(base64_encode($string), '+/', '-_'), '=');\n}",
"function urlencode($url)\n {\n $hash = md5($this->instance . $url);\n return $hash . str_replace ('_', '%5F', urlencode($url));\n }",
"public static function encode($string) {\n\t\treturn '=?utf-8?B?' . base64_encode($string) . '?=';\n\t}",
"private function encode_Base64UrlSafe( $value ) {\n\t\t\treturn str_replace( array( '+', '/' ), array( '-', '_' ), base64_encode( $value ) );\n\t\t}",
"function u($string=\"\") {\n\t\treturn urlencode($string);\n\t}",
"function utf8_uri_encode($utf8_string, $length = 0, $encode_ascii_characters = \\false)\n {\n }",
"function convertString($str)\n{\n\tif (!is_utf8($str))\n\t{\n\t\t$str = utf8_encode($str);\n\t}\n\n\t// clean up the html\n\t$str = cleanHTML($str);\n\n\t// return the url encoded string\n\treturn urlencode($str);\n}",
"private static function urlencodeRFC3986( $string )\n\t {\n\t\treturn str_replace( '%7E', '~', rawurlencode( $string ) );\n\t }",
"function encodeBase64UrlSafe($value) {\n return str_replace(array('+', '/'), array('-', '_'),\n base64_encode($value));\n}",
"public static function url_encode_rfc3986($input)\n {\n if (is_array($input)) {\n return array_map(array('phpVimeo', 'url_encode_rfc3986'), $input);\n }\n else if (is_scalar($input)) {\n return str_replace(array('+', '%7E'), array(' ', '~'), rawurlencode($input));\n }\n else {\n return '';\n }\n }",
"protected function encode_rfc3986($string)\n\t{\n\t\treturn str_replace('+', ' ', str_replace('%7E', '~', rawurlencode(($string))));\n\t}",
"private static function encodeUrl($url)\n {\n $url_parsed = parse_url($url);\n $scheme = $url_parsed['scheme'].'://';\n $host = $url_parsed['host'];\n $port = (isset($url_parsed['port']) ? $url_parsed['port'] : null);\n $path = (isset($url_parsed['path']) ? $url_parsed['path'] : null);\n $query = (isset($url_parsed['query']) ? $url_parsed['query'] : null);\n if ($query !== null) {\n $query = '?'.http_build_query(self::getArrayFromQuerystring($query));\n }\n if ($port && $port[0] !== ':') {\n $port = ':'.$port;\n }\n $result = $scheme.$host.$port.$path.$query;\n\n return $result;\n }",
"function encodeBase64UrlSafe($value)\n{\n return str_replace(array('+', '/'), array('-', '_'),\n base64_encode($value));\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 cms_raw_url_encode($url_part, $can_try_url_schemes = null) // TODO: Rename function in v11 and document in codebook\n{\n // Slipstream for 99.99% of data\n $url_part_encoded = rawurlencode($url_part);\n if ($url_part_encoded === $url_part) {\n return $url_part_encoded;\n }\n\n if ($can_try_url_schemes === null) {\n $can_try_url_schemes = can_try_url_schemes();\n }\n if ($can_try_url_schemes) { // These interfere with URL Scheme processing because they get pre-decoded and make things ambiguous\n //$url_part = str_replace(':', '(colon)', $url_part); We'll ignore theoretical problem here- we won't expect there to be a need for encodings within redirect URL paths (params is fine, handles naturally)\n $url_part = str_replace(array('&', '#'), array(':amp:', ':uhash:'), $url_part); // horrible but mod_rewrite does it so we need to\n }\n $url_part = str_replace('%2F', '/', rawurlencode($url_part));\n return $url_part;\n}",
"public static function rawurlencode($value) {\n return strtr(rawurlencode($value), array('%7E' => '~', '+' => ' '));\n }",
"function base64url_encode($plainText) \n{\n $base64 = base64_encode($plainText);\n $base64url = strtr($base64, '+/=', '-_,');\n return $base64url;\n}",
"public function urlPathEncode($value) {\n // cas de la valeur null\n if (is_null($value)) {\n return \"\";\n }\n // plus d'accents\n $a = 'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûýýþÿŔŕç';\n $b = 'aaaaaaaceeeeiiiidnoooooouuuuybsaaaaaaaceeeeiiiidnoooooouuuyybyRrc';\n $value = utf8_decode($value);\n $value = strtr($value, utf8_decode($a), $b);\n $value = strtolower($value);\n // ponctuation\n $value = strtr($value, utf8_decode(\"'\\\"\"), \"__\");\n // autres caracteres\n $value = preg_replace(\"/[^a-z0-9\\-\\_]/\",\"-\",$value);\n return $value;\n }",
"public static function encodePath($path)\n {\n if (! is_string($path)) {\n throw new Exception\\InvalidArgumentException(sprintf(\n 'Expecting a string, got %s',\n (is_object($path) ? get_class($path) : gettype($path))\n ));\n }\n\n $regex = '/(?:[^' . self::CHAR_UNRESERVED . ')(:@&=\\+\\$,\\/;%]+|%(?![A-Fa-f0-9]{2}))/';\n $escaper = static::getEscaper();\n $replace = function ($match) use ($escaper) {\n return $escaper->escapeUrl($match[0]);\n };\n\n return preg_replace_callback($regex, $replace, $path);\n }",
"public function getUrlString(){\n\t\treturn rawurlencode($this->getJsonString());\t\n\t}",
"private function urlencode($text) {\n\t\treturn urlencode(str_replace('/', '%2f', $text));\n\t}",
"public function base64url_encode($data)\n {\n // First of all you should encode $data to Base64 string\n $b64 = base64_encode($data);\n\n // Make sure you get a valid result, otherwise, return FALSE, as the base64_encode() function do\n if ($b64 === false) {\n return false;\n }\n\n // Convert Base64 to Base64URL by replacing + with - and / with _\n $url = strtr($b64, '+/', '-_');\n\n // Remove padding character from the end of line and return the Base64URL result\n return rtrim($url, '=');\n }",
"function encode($str) {\n\t\treturn str_replace(array('&', '<', '>'), array('&', '<', '>'), $str);\n\t}",
"function raw_u($string=\"\") {\n\t\treturn rawurlencode($string);\n\t}",
"function base64url_encode($data)\n{\n $b64 = base64_encode($data);\n if ($b64 === false) {\n return false;\n }\n $url = strtr($b64, '+/', '-_');\n return rtrim($url, '=');\n}",
"private function encode_url_path( $url ) {\n\t\t$path = wp_parse_url( $url, PHP_URL_PATH );\n\t\tif ( empty( $path ) || '/' === $path ) {\n\t\t\treturn $url;\n\t\t}\n\n\t\t$encoded_path = explode( '/', $path );\n\n\t\t// First decode the path, to prevent double encoding.\n\t\t$encoded_path = array_map( 'rawurldecode', $encoded_path );\n\n\t\t$encoded_path = array_map( 'rawurlencode', $encoded_path );\n\t\t$encoded_path = implode( '/', $encoded_path );\n\t\t$encoded_path = str_replace( '%7E', '~', $encoded_path ); // PHP <5.3.\n\n\t\treturn str_replace( $path, $encoded_path, $url );\n\t}",
"function textToUrl($string) {\n //first replace % to %25\n $char = \"%\";\n $replace = \"$25\";\n $string = str_replace($char, $replace, $string);\n\n\n $entities = array('%21', '%2A', '%27', '%28', '%29', '%3B', '%3A', '%40', '%26', '%3D', '%2B', '%24', '%2C', '%2F', '%3F', '%23', '%5B', '%5D', '%20');\n $replacements = array('!', '*', \"'\", \"(\", \")\", \";\", \":\", \"@\", \"&\", \"=\", \"+\", \"$\", \",\", \"/\", \"?\", \"#\", \"[\", \"]\", \" \");\n return str_replace($replacements, $entities, urlencode($string));\n }",
"function u($string = '')\n{\n return urlencode($string);\n}",
"protected function encode($source)\n {\n return rawurlencode($source);\n }",
"function urlFormat($str) {\n // strip all the evil white spaces\n $str = preg_replace('/\\s*/', '', $str);\n // lowercase the string\n $str = strtolower($str);\n // encode the url to help fight the bad guys.. and maybe you..\n $str = urlencode($str);\n return $str;\n}",
"function cms_url_encode($url_part, $can_try_url_schemes = null)\n{\n // Slipstream for 99.99% of data\n $url_part_encoded = urlencode($url_part);\n if ($url_part_encoded === $url_part) {\n return $url_part_encoded;\n }\n\n if ($can_try_url_schemes === null) {\n $can_try_url_schemes = can_try_url_schemes();\n }\n if ($can_try_url_schemes) { // These interfere with URL Scheme processing because they get pre-decoded and make things ambiguous\n //$url_part = str_replace(':', '(colon)', $url_part); We'll ignore theoretical problem here- we won't expect there to be a need for encodings within redirect URL paths (params is fine, handles naturally)\n $url_part = str_replace(array('/', '&', '#'), array(':slash:', ':amp:', ':uhash:'), $url_part); // horrible but mod_rewrite does it so we need to\n }\n $url_part = urlencode($url_part);\n return $url_part;\n}",
"public static function safeEncode($data) {\n if (is_array($data)) {\n return array_map(array('self', 'safeEncode'), $data);\n } else if (is_scalar($data)) {\n return str_ireplace( array('+', '%7E'), array(' ', '~'), rawurlencode($data) );\n } else {\n return '';\n }\n }",
"protected static function urlencode_rfc3986($value)\n {\n\tif (is_array($value)) {\n\t return array_map(array(__CLASS__, 'urlencode_rfc3986'), $value);\n\t} else {\n\t $search = array('+', ' ', '%7E', '%');\n\t $replace = array('%20', '%20', '~', '%25');\n\n\t return str_replace($search, $replace, urlencode($value));\n\t}\n }",
"function u($string=\"\"){\n return urlencode($string);\n }",
"function base64_url_encode( $data ) {\n return rtrim(strtr(base64_encode($data), '+/', '-_'), '=');\n}",
"public static function ru($string = '') {\r\n return rawurlencode($string);\r\n }",
"public function encode($string, $key = '')\n {\n $key = $this->getKey($key);\n $enc = $this->mcryptEncode($string, $key);\n\n return base64_encode($enc);\n }",
"static function base64url_encode($data) {\n\t\treturn rtrim(strtr(base64_encode($data), '+/', '-_'), '=');\n\t}",
"function encode($string){\n return htmlentities($string, ENT_QUOTES, 'UTF-8');\n}",
"function url_encode($data, $pad = null) {\ninclude 'setting.php';\nif($sn==''){\n\t$snx ='QWERTYUIOPASDFGHJKL';\n}else{\n\t$snx = $sn;\n}\n $data = str_replace(array('+', '/'), array('-', '_'), base64_encode($data));\n if (!$pad) {\n $data = rtrim($data, '=');\n }\n return $data.$snx;\n}",
"function base64url_encode($data) {\n return rtrim(strtr(base64_encode($data), '+/', '-_'), '=');\n}",
"private function encodeODataUriValue($value)\n {\n // Replace each single quote (') with double single quotes ('') not doudle\n // quotes (\")\n $value = str_replace('\\'', '\\'\\'', $value);\n\n // Encode the special URL characters\n $value = rawurlencode($value);\n\n return $value;\n }",
"function raw_u($string=\"\"){\r\n //\"?\"前部分语句 空格 = %20\r\n return rawurlencode($string);\r\n}",
"function encode_path($path){\n $parts = explode('/', $path);\n $removed = array();\n if(substr($parts[0], 0, 4) == \"http\")\n $removed = array_splice($parts, 0, 1);\n\n $encoded = array_map(\"urlencode\",$parts);\n $result = array_merge($removed, $encoded);\n return implode('/', $result);\n }",
"function acadp_base64_encode( $string ) {\n\t return str_replace( array( '+', '/', '=' ), array( '-', '_', '.' ), base64_encode( $string ) );\n}",
"function url_encode(array $values)\n{\n return http_build_query($values);\n}",
"public static function rawurlencodePath ($path)\r\n\t{\r\n\t\t# Do the encoding\r\n\t\t$encoded = implode ('/', array_map ('rawurlencode', explode ('/', $path)));\r\n\t\t\r\n\t\t# Return the encoded path\r\n\t\treturn $encoded;\r\n\t}",
"function sysEncode( $str ){\n\treturn( addslashes( htmlspecialchars( $str ) ) );\n}",
"abstract function encode($s);",
"protected function _urlencodeRfc3986($input)\n\t{\n\t\tif(is_array($input)) {\n\t\t\treturn array_map(array($this, '_urlencodeRfc3986'), $input);\n\t\t} elseif (is_scalar($input)) {\n\t\t\treturn str_replace('+',' ',str_replace('%7E', '~', rawurlencode($input)));\n\t\t} else{\n\t\t\treturn '';\n\t\t}\n\t}",
"private function encode_url_query( $url ) {\n\t\t$query = wp_parse_url( $url, PHP_URL_QUERY );\n\t\tif ( empty( $query ) ) {\n\t\t\treturn $url;\n\t\t}\n\n\t\tparse_str( $query, $parsed_query );\n\n\t\tif ( defined( 'PHP_QUERY_RFC3986' ) ) { // PHP 5.4+.\n\t\t\t$parsed_query = http_build_query( $parsed_query, null, '&', PHP_QUERY_RFC3986 );\n\t\t} else {\n\t\t\t$parsed_query = http_build_query( $parsed_query, null, '&' );\n\t\t\t$parsed_query = str_replace( '+', '%20', $parsed_query );\n\t\t\t$parsed_query = str_replace( '%7E', '~', $parsed_query );\n\t\t}\n\n\t\treturn str_replace( $query, $parsed_query, $url );\n\t}",
"public function decodeUriSafe( string $value ): string;",
"public function encodeString($str, $encoding = self::ENCODING_BASE64)\n {\n }"
]
| [
"0.78255314",
"0.77969843",
"0.7787888",
"0.77492034",
"0.74538684",
"0.7405937",
"0.7396133",
"0.7353386",
"0.7172613",
"0.7167943",
"0.71638554",
"0.7117331",
"0.6958581",
"0.693974",
"0.6925453",
"0.69158596",
"0.69085586",
"0.6883762",
"0.68706125",
"0.6836824",
"0.6754",
"0.6744932",
"0.6662026",
"0.66574395",
"0.6650534",
"0.66185284",
"0.65881956",
"0.65741676",
"0.6557845",
"0.65321875",
"0.6530312",
"0.6504716",
"0.6481626",
"0.6459448",
"0.6455708",
"0.6452017",
"0.6441662",
"0.64362353",
"0.64241225",
"0.64232945",
"0.6414681",
"0.6412376",
"0.6411667",
"0.638415",
"0.63813287",
"0.63766843",
"0.6376554",
"0.63646495",
"0.63551766",
"0.63460517",
"0.6328334",
"0.63244265",
"0.6316624",
"0.6293585",
"0.6280402",
"0.626765",
"0.62623775",
"0.62622494",
"0.6232854",
"0.6201777",
"0.6200905",
"0.6194032",
"0.61919117",
"0.6188712",
"0.6172876",
"0.61665595",
"0.61551386",
"0.6135257",
"0.61263007",
"0.6122487",
"0.6115463",
"0.6100547",
"0.6096546",
"0.6094815",
"0.6092455",
"0.60585314",
"0.6045948",
"0.6012464",
"0.59999704",
"0.5992164",
"0.5986397",
"0.5962212",
"0.59533226",
"0.59526855",
"0.594686",
"0.5932766",
"0.58848333",
"0.586978",
"0.58569944",
"0.5819766",
"0.5804898",
"0.58043486",
"0.58038455",
"0.57901955",
"0.5782469",
"0.57814866",
"0.5778742",
"0.57689255",
"0.57486176",
"0.5743997"
]
| 0.6047208 | 76 |
Encode and decode the string to and from hex. | public function hex(string $mode = Config\Hex::ENCODE) : self
{
Config\Hex::validateOption($mode);
switch ($mode) {
case Config\Hex::ENCODE:
$string = array_reduce(str_split($this->string), function ($str, $char) {
$str .= '\x' . dechex(ord($char));
return $str;
}, '');
break;
case Config\Hex::DECODE:
$string = preg_replace_callback('/\\\\x([0-9A-Fa-f]+)/', function ($matched) {
return chr(hexdec($matched[1]));
}, $this->string);
break;
default:
throw new RuntimeException('Invalid mode');
}
return new static($string);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function str2hex($str) {}",
"public function decode_encode()\n {\n if ( ($this->_type!= \"DEC\") && ($this->_type != \"ENC\") ) {\n return \"Error_-_Invalid_Hex_Type\";\n }\n\n if ($this->_type == \"DEC\") {\n $l=mb_strlen($this->_data)/4;\n\t\t $res='';\n\t\t for ($i=0;$i<$l;$i++) {\n $res.=html_entity_decode('&#'.hexdec(mb_substr($this->_data,$i*4,4)).';',ENT_NOQUOTES,'UTF-8');\n }\n }\n\n if ($this->_type == \"ENC\") {\n $l=mb_strlen($this->_data);\n $res='';\n for ($i=0;$i<$l;$i++)\n {\n $s = mb_substr($this->_data,$i,1);\n $s = mb_convert_encoding($s, 'UCS-2LE', 'UTF-8');\n $s = dechex(ord(substr($s, 1, 1))*256+ord(substr($s, 0, 1)));\n if (mb_strlen($s)<4) $s = str_repeat(\"0\",(4-mb_strlen($s))).$s;\n $res.=$s;\n }\n }\n\n return $res;\n }",
"public static function hex2str($hex) {}",
"function base64_to_hex($str_to_conv) {\n\n\t$bin_cod = '';\n\n\t$bin_string = '';\n\tfor ($i=0; $i<strlen($str_to_conv); $i++) { \n\t\t$base_64_key = array_search($str_to_conv[$i], $base64_code);\n\t\t$bin_string .= sprintf(\"%06d\", decbin($base_64_key));\n\t}\n\n\t$hex_string = '';\n\tfor ($i=0; $i < strlen($bin_string); $i += 4) { \n\t\t$hex_string .= base_convert(substr($bin_string, $i, 4), 2, 16);\n\t}\n\n\treturn $hex_string;\n}",
"public function decodeRawTransaction($hexString);",
"final public static function hex2str ($str) {\r\n $str = preg_replace ('/[\\s\\r\\n\\t]/', '', static::trim ($str, static::FLAG_ALL));\r\n return preg_replace ('/.{2}/e', 'chr (hexdec (\"$0\"))', $str);\r\n// return preg_replace ('/.{2}/e', 'var_dump (chr (hexdec (\"$0\")))', $str);\r\n// var_dump ($str);\r\n// return preg_replace ('/(.{2})/e', 'var_dump (\"$0\")', $str);\r\n }",
"function hex_to_base64($str_to_conv) {\n\n\t$bin_cod = '';\n\n\t$bit = 4;\n\n\tfor($i=0; $i<strlen($str_to_conv); $i++) {\n\t\tforeach ($base16_code as $key => $value) {\n\t\t\tif ($str_to_conv[$i]==$value) {\n\t\t\t\t$result = $key;\n\t\t\t\t$byte = '';\n\t\t\t\tfor ($j=0; $j<$bit; $j++) {\n\t\t\t\t\t$byte = ($result%2).$byte;\n\t\t\t\t\t$result = floor($result/2);\n\t\t\t\t}\n\t\t\t\t$bin_cod .= $byte;\n\t\t\t}\n\t\t}\n\t}\n\n\t$str_ecoded = '';\n\tfor ($p=1; $p<=strlen($bin_cod); $p++){\n\t\tif ($p%6==0) {\n\t\t\t$seibit = substr($bin_cod, $p-6, 6);\n\t\t\t$key_for_base64_code = 0;\n\t\t\tfor ($q=0; $q<strlen($seibit); $q++){\n\t\t\t\t$key_for_base64_code = $key_for_base64_code + $seibit[$q]*pow(2,(5-$q));\n\t\t\t}\n\t\t\t$str_ecoded .= $base64_code[$key_for_base64_code];\n\t\t}\n\t}\n\n\treturn $str_ecoded;\n}",
"public static function hexToStr($string) {\n\n if (!self::hasHexPrefix($string)) {\n throw new \\Exception('String is missing Hex prefix \"0x\" : ' . $string);\n }\n $string = substr($string, strlen('0x'));\n $utf8 = '';\n\n\n $letters = str_split($string, 2);\n foreach ($letters as $letter) {\n $utf8 .= html_entity_decode(\"&#x$letter;\", ENT_QUOTES, 'UTF-8');\n }\n return $utf8;\n\n // Dosn't tackle Line 18\n // if ($string < 128) {\n // $utf = chr($string);\n // }\n // elseif ($string < 2048) {\n // $utf = chr(192 + (($string - ($string % 64)) / 64));\n // $utf .= chr(128 + ($string % 64));\n // }\n // else {\n // $utf = chr(224 + (($string - ($string % 4096)) / 4096));\n // $utf .= chr(128 + ((($string % 4096) - ($string % 64)) / 64));\n // $utf .= chr(128 + ($string % 64));\n //}\n\n // Can't handle Ö\n // $utf8 = hex2bin($string);\n\n // Can't handle Ö\n //$func_length = strlen($string);\n //for ($func_index = 0; $func_index < $func_length; ++$func_index) {\n // $utf8 .= chr(hexdec($string{$func_index} . $string{++$func_index}));\n //}\n\n // Destroys umlauts\n // for ($i=0; $i < strlen($string)-1; $i+=2){\n // $utf8 .= chr(hexdec($string[$i].$string[$i+1]));\n // }\n }",
"function htmlent_to_hex ($str) {\n\treturn preg_replace (\"/&#([0-9A-z]+);/e\", \"'\\\\\\u'.decimal_to_hex('\\\\1')\" , $str);\n}",
"function stringToHex (s) {\r\n var r = \"0x\";\r\n var hexes = new Array (\"0\",\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"a\",\"b\",\"c\",\"d\",\"e\",\"f\");\r\n for (var i=0; i<s.length; i++) {r += hexes [s.charCodeAt(i) >> 4] + hexes [s.charCodeAt(i) & 0xf];}\r\n return r;\r\n}",
"public function escape($string) {\n\t\treturn $this->_utf8ToHex($string);\n\t}",
"public static function strToHex($string) {\n $hex = unpack('H*', $string);\n return '0x' . array_shift($hex);\n }",
"public static function hexToStr($hex) {\r\n $string = '';\r\n for ($i=0; $i < strlen($hex)-1; $i+=2) {\r\n $string .= chr(hexdec($hex[$i].$hex[$i+1]));\r\n }\r\n return base64_decode($string);\r\n }",
"public function getEncoded();",
"function hex($string){\n\t$hex='';\n\tfor ($i=0; $i < strlen($string); $i++){\n\t\t$hex .= dechex(ord($string[$i]));\n\t}\n\treturn $hex;\n}",
"public static function strToHex($string) {\r\n $hex = '';\r\n $string = base64_encode($string);\r\n for ($i=0; $i < strlen($string); $i++) {\r\n $hex .= dechex(ord($string[$i]));\r\n }\r\n return $hex;\r\n }",
"function uri_safe_encode($str, $hexify = TRUE)\n{\n\t$str = ($hexify) ? ascii_to_hex(base64_encode($str)) : base64_encode($str);\n\treturn $str;\n}",
"function _foaf_normalize_hex($hex) {\n return strtoupper(preg_replace('/[^a-zA-Z0-9]/', '', $hex));\n}",
"function snmp_hexstring($string)\n{\n if (isHexString($string))\n {\n return hex2str(str_replace(' 00', '', $string)); // 00 is EOL\n } else {\n return $string;\n }\n}",
"function encode($str) {\n $encoded = '';\n\n for ($i = 0; $i < strlen($str); $i++) {\n\n $val = ord($str[$i]) + $i;\n\n if (!($i % 2))\n $val ^= 0xff;\n\n $encoded .= sprintf('%02x', $val);\n }\n\n return strrev($encoded);\n}",
"protected function strtohex($str) \n\t{\n\t\t$strout = \"\";\n\n\t\tfor ( $i = 0; $i < strlen($str); $i++ ) \n\t\t{\n\t\t\t$strout .= ( ord($str[$i]) < 16 ) ? \"0\" . dechex(ord($str[$i])) : dechex(ord($str[$i]));\n\t\t\t$strout .= \" \";\n\n\t\t\tif ( $i%32 == 7 ) \n\t\t\t\t$strout .= \": \";\n\n\t\t\tif ( $i%32 == 15 ) \n\t\t\t\t$strout .= \": \";\n\n\t\t\tif ( $i%32 == 23 ) \n\t\t\t\t$strout .= \": \";\n\n\t\t\tif ( $i%32 == 31 ) \n\t\t\t\t$strout .= \"\\n\";\n\t\t}\n\n\t\treturn $strout . \"\\n\";\n\t}",
"function hex2str($hex) \r\n{\r\n $str = '';\r\n for($i=0;$i<strlen($hex);$i+=2) $str .= chr(hexdec(substr($hex,$i,2)));\r\n return $str;\r\n //echo \"My Name is \".$str;\r\n}",
"function toHex($string)\n\t{\n\t\t$hex = '';\n\t\tfor ($i = 0; $i < strlen($string); $i++) {\n\t\t\t$hex .= dechex(ord($string[$i])) . ' ';\n\t\t}\n\t\treturn strtoupper(trim($hex));\n\t}",
"static protected function DigestHex( $strHex, $strH0, $strH1, $strH2, $strH3, $strH4 )\n\t{\n\t\t$strK[ 0 ] = \"5A827999\";\n\t\t$strK[ 1 ] = \"6ED9EBA1\";\n\t\t$strK[ 2 ] = \"8F1BBCDC\";\n\t\t$strK[ 3 ] = \"CA62C1D6\";\n\t\t\n\t\t//Hex words are used in the encryption process, these can be any valid 8 digit hex value\n\t\t$strH[ 0 ] = $strH0;\n\t\t$strH[ 1 ] = $strH1;\n\t\t$strH[ 2 ] = $strH2;\n\t\t$strH[ 3 ] = $strH3;\n\t\t$strH[ 4 ] = $strH4;\n\t\t\n\t\t//divide the Hex block into 16 hex words\n\t\tfor( $intPos = 0 ; $intPos <= ( \\strlen( $strHex ) / 8 ) - 1 ; $intPos = $intPos + 1 )\n\t\t{\n\t\t\t$strWords[ intval( $intPos ) ] = substr( $strHex, ( intval( $intPos ) * 8 ) + 1 - 1, 8 );\n\t\t}\n\t\t\n\t\t//encode the Hex words using the constants above\n\t\t//innitialize 80 hex word positions\n\t\tfor( $intPos = 16 ; $intPos <= 79 ; $intPos = $intPos + 1 )\n\t\t{\n\t\t\t$strTemp = $strWords[ intval( $intPos ) - 3 ];\n\t\t\t$strTemp1 = self::HexBlockToBinary( $strTemp );\n\t\t\t$strTemp = $strWords[ intval( $intPos ) - 8 ];\n\t\t\t$strTemp2 = self::HexBlockToBinary( $strTemp );\n\t\t\t$strTemp = $strWords[ intval( $intPos ) - 14 ];\n\t\t\t$strTemp3 = self::HexBlockToBinary( $strTemp );\n\t\t\t$strTemp = $strWords[ intval( $intPos ) - 16 ];\n\t\t\t$strTemp4 = self::HexBlockToBinary( $strTemp );\n\t\t\t$strTemp = self::BinaryXOR( $strTemp1, $strTemp2 );\n\t\t\t$strTemp = self::BinaryXOR( $strTemp, $strTemp3 );\n\t\t\t$strTemp = self::BinaryXOR( $strTemp, $strTemp4 );\n\t\t\t$strWords[ intval( $intPos ) ] = self::BlockToHex( self::BinaryShift( $strTemp, 1 ) );\n\t\t}\n\t\t\n\t\t//initialize the changing word variables with the initial word variables\n\t\t$strA[ 0 ] = $strH[ 0 ];\n\t\t$strA[ 1 ] = $strH[ 1 ];\n\t\t$strA[ 2 ] = $strH[ 2 ];\n\t\t$strA[ 3 ] = $strH[ 3 ];\n\t\t$strA[ 4 ] = $strH[ 4 ];\n\t\t\n\t\t//Main encryption loop on all 80 hex word positions\n\t\tfor( $intPos = 0 ; $intPos <= 79 ; $intPos = $intPos + 1 )\n\t\t{\n\t\t\t$strTemp = self::BinaryShift( self::HexBlockToBinary( $strA[ 0 ] ), 5 );\n\t\t\t$strTemp1 = self::HexBlockToBinary( $strA[ 3 ] );\n\t\t\t$strTemp2 = self::HexBlockToBinary( $strWords[ intval( $intPos ) ] );\n\t\t\t\n\t\t\tswitch( $intPos )\n\t\t\t{\n\t\t\t\tcase 0 :\n\t\t\t\tcase 1 :\n\t\t\t\tcase 2 :\n\t\t\t\tcase 3 :\n\t\t\t\tcase 4 :\n\t\t\t\tcase 5 :\n\t\t\t\tcase 6 :\n\t\t\t\tcase 7 :\n\t\t\t\tcase 8 :\n\t\t\t\tcase 9 :\n\t\t\t\tcase 10 :\n\t\t\t\tcase 11 :\n\t\t\t\tcase 12 :\n\t\t\t\tcase 13 :\n\t\t\t\tcase 14 :\n\t\t\t\tcase 15 :\n\t\t\t\tcase 16 :\n\t\t\t\tcase 17 :\n\t\t\t\tcase 18 :\n\t\t\t\tcase 19 :\n\t\t\t\t\t$strTemp3 = self::HexBlockToBinary( $strK[ 0 ] );\n\t\t\t\t\t$strTemp4 = self::BinaryOR( self::BinaryAND( self::HexBlockToBinary( $strA[ 1 ] ), self::HexBlockToBinary( $strA[ 2 ] ) ), self::BinaryAND( self::BinaryNOT( self::HexBlockToBinary( $strA[ 1 ] ) ), self::HexBlockToBinary( $strA[ 3 ] ) ) );\n\t\t\t\t\tbreak;\n\t\t\t\tcase 20 :\n\t\t\t\tcase 21 :\n\t\t\t\tcase 22 :\n\t\t\t\tcase 23 :\n\t\t\t\tcase 24 :\n\t\t\t\tcase 25 :\n\t\t\t\tcase 26 :\n\t\t\t\tcase 27 :\n\t\t\t\tcase 28 :\n\t\t\t\tcase 29 :\n\t\t\t\tcase 30 :\n\t\t\t\tcase 31 :\n\t\t\t\tcase 32 :\n\t\t\t\tcase 33 :\n\t\t\t\tcase 34 :\n\t\t\t\tcase 35 :\n\t\t\t\tcase 36 :\n\t\t\t\tcase 37 :\n\t\t\t\tcase 38 :\n\t\t\t\tcase 39 :\n\t\t\t\t\t$strTemp3 = self::HexBlockToBinary( $strK[ 1 ] );\n\t\t\t\t\t$strTemp4 = self::BinaryXOR( self::BinaryXOR( self::HexBlockToBinary( $strA[ 1 ] ), self::HexBlockToBinary( $strA[ 2 ] ) ), self::HexBlockToBinary( $strA[ 3 ] ) );\n\t\t\t\t\tbreak;\n\t\t\t\tcase 40 :\n\t\t\t\tcase 41 :\n\t\t\t\tcase 42 :\n\t\t\t\tcase 43 :\n\t\t\t\tcase 44 :\n\t\t\t\tcase 45 :\n\t\t\t\tcase 46 :\n\t\t\t\tcase 47 :\n\t\t\t\tcase 48 :\n\t\t\t\tcase 49 :\n\t\t\t\tcase 50 :\n\t\t\t\tcase 51 :\n\t\t\t\tcase 52 :\n\t\t\t\tcase 53 :\n\t\t\t\tcase 54 :\n\t\t\t\tcase 55 :\n\t\t\t\tcase 56 :\n\t\t\t\tcase 57 :\n\t\t\t\tcase 58 :\n\t\t\t\tcase 59 :\n\t\t\t\t\t$strTemp3 = self::HexBlockToBinary( $strK[ 2 ] );\n\t\t\t\t\t$strTemp4 = self::BinaryOR( self::BinaryOR( self::BinaryAND( self::HexBlockToBinary( $strA[ 1 ] ), self::HexBlockToBinary( $strA[ 2 ] ) ), self::BinaryAND( self::HexBlockToBinary( $strA[ 1 ] ), self::HexBlockToBinary( $strA[ 3 ] ) ) ), self::BinaryAND( self::HexBlockToBinary( $strA[ 2 ] ), self::HexBlockToBinary( $strA[ 3 ] ) ) );\n\t\t\t\t\tbreak;\n\t\t\t\tcase 60 :\n\t\t\t\tcase 61 :\n\t\t\t\tcase 62 :\n\t\t\t\tcase 63 :\n\t\t\t\tcase 64 :\n\t\t\t\tcase 65 :\n\t\t\t\tcase 66 :\n\t\t\t\tcase 67 :\n\t\t\t\tcase 68 :\n\t\t\t\tcase 69 :\n\t\t\t\tcase 70 :\n\t\t\t\tcase 71 :\n\t\t\t\tcase 72 :\n\t\t\t\tcase 73 :\n\t\t\t\tcase 74 :\n\t\t\t\tcase 75 :\n\t\t\t\tcase 76 :\n\t\t\t\tcase 77 :\n\t\t\t\tcase 78 :\n\t\t\t\tcase 79 :\n\t\t\t\t\t$strTemp3 = self::HexBlockToBinary( $strK[ 3 ] );\n\t\t\t\t\t$strTemp4 = self::BinaryXOR( self::BinaryXOR( self::HexBlockToBinary( $strA[ 1 ] ), self::HexBlockToBinary( $strA[ 2 ] ) ), self::HexBlockToBinary( $strA[ 3 ] ) );\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\t$strTemp = self::BlockToHex( $strTemp );\n\t\t\t$strTemp1 = self::BlockToHex( $strTemp1 );\n\t\t\t$strTemp2 = self::BlockToHex( $strTemp2 );\n\t\t\t$strTemp3 = self::BlockToHex( $strTemp3 );\n\t\t\t$strTemp4 = self::BlockToHex( $strTemp4 );\n\t\t\t\n\t\t\t$strTemp = self::HexAdd( $strTemp, $strTemp1 );\n\t\t\t$strTemp = self::HexAdd( $strTemp, $strTemp2 );\n\t\t\t$strTemp = self::HexAdd( $strTemp, $strTemp3 );\n\t\t\t$strTemp = self::HexAdd( $strTemp, $strTemp4 );\n\t\t\t\n\t\t\t$strA[ 4 ] = $strA[ 3 ];\n\t\t\t$strA[ 3 ] = $strA[ 2 ];\n\t\t\t$strA[ 2 ] = self::BlockToHex( self::BinaryShift( self::HexBlockToBinary( $strA[ 1 ] ), 30 ) );\n\t\t\t$strA[ 1 ] = $strA[ 0 ];\n\t\t\t$strA[ 0 ] = $strTemp;\n\t\t}\n\t\t\n\t\t//Concatenate the final Hex Digest\n\t\treturn $strA[ 0 ] . $strA[ 1 ] . $strA[ 2 ] . $strA[ 3 ] . $strA[ 4 ];\n\t}",
"function hex_to_str($hex)\n{\n $string='';\n\n for ($i=0; $i < strlen($hex)-1; $i+=2)\n {\n $d = hexdec($hex[$i].$hex[$i+1]);\n\n //Show only if number of alphabet\n if( ($d >= 48 and $d <= 57) or ($d >= 65 and $d <= 90) or ($d >= 97 and $d <= 122) )\n {\n $string .= chr(hexdec($hex[$i].$hex[$i+1]));\n }\n else\n {\n $string .= '.';\n }\n }\n\n return $string;\n}",
"protected function packConvertHexStringToRawBinary($hex_string){\n\t\treturn pack('h*', $hex_string);\n\t}",
"abstract function encode($s);",
"function decode($string);",
"function hextobin($hexString) \n { \n $length = strlen($hexString); \n $binString=\"\"; \n $count=0; \n while($count<$length) \n { \n $subString =substr($hexString,$count,2); \n $packedString = pack(\"H*\",$subString); \n if ($count==0)\n {\n $binString=$packedString;\n } \n \n else \n {\n $binString.=$packedString;\n } \n \n $count+=2; \n } \n return $binString; \n }",
"function hex_to_ascii($hex)\n{\n\t$ascii = '';\n\n\tif (strlen($hex) % 2 == 1)\n\t{\n\t\t$hex = '0'.$hex;\n\t}\n\n\tfor($i = 0; $i < strlen($hex); $i += 2)\n\t{\n\t\t$ascii .= chr(base_convert(substr($hex, $i, 2), 16, 10));\n\t}\n\treturn $ascii;\n}",
"function hex2str($hex) {\n $str = '';\n for($i=0;$i<strlen($hex);$i+=2) $str .= chr(hexdec(substr($hex,$i,2)));\n return $str;\n}",
"function hex2str($hex) {\n $str = '';\n for($i=0;$i<strlen($hex);$i+=2) $str .= chr(hexdec(substr($hex,$i,2)));\n return $str;\n}",
"static function toLittleEndian( $hex ){\n // input : 12 96 7\n\n //step 1: str reverse\n // input : 12 96 7\n // output : 76 92 1\n $hex = strrev($hex);\n $hex = self::pad($hex, 4 + (2 % strlen($hex)));\n\n //step 1: flip bytes\n // input : 76 92 10\n // output : 67 29 01\n\n $split = str_split($hex, 2);\n\n foreach ($split as &$item) {\n $item = strrev($item);\n }\n\n return join('', $split);\n }",
"function uri_safe_decode($str, $hexify = TRUE)\n{\n\t$str = ($hexify) ? base64_decode(hex_to_ascii($str)) : base64_decode($str);\n\treturn $str;\n}",
"private function strtohex($input) {\n\n $output = '';\n\n foreach (str_split($input) as $c)\n $output.=sprintf(\"%02X\", ord($c));\n\n return $output;\n }",
"public static function decode($string);",
"public static function convert($string, $inEncoding, $outEncoding) {}",
"abstract public function encode();",
"private static function decodeFilterASCIIHexDecode($data){\n\t\t// intialize string to return\n\t\t$decoded = '';\n\t\t// all white-space characters shall be ignored\n\t\t$data = preg_replace('/[\\s]/', '', $data);\n\t\t// check for EOD character: GREATER-THAN SIGN (3Eh)\n\t\t$eod = strpos($data, '>');\n\t\tif($eod !== false){\n\t\t\t// remove EOD and extra data (if any)\n\t\t\t$data = substr($data, 0, $eod);\n\t\t\t$eod = true;\n\t\t}\n\t\t// get data length\n\t\t$data_length = strlen($data);\n\t\tif(($data_length % 2) != 0){\n\t\t\t// odd number of hexadecimal digits\n\t\t\tif($eod){\n\t\t\t\t// EOD shall behave as if a 0 (zero) followed the last digit\n\t\t\t\t$data = substr($data, 0, -1) . '0' . substr($data, -1);\n\t\t\t} else {\n\t\t\t\t$this->Error('decodeASCIIHex: invalid code');\n\t\t\t}\n\t\t}\n\t\t// check for invalid characters\n\t\tif(preg_match('/[^a-fA-F\\d]/', $data) > 0){\n\t\t\t$this->Error('decodeASCIIHex: invalid code');\n\t\t}\n\t\t// get one byte of binary data for each pair of ASCII hexadecimal digits\n\t\t$decoded = pack('H*', $data);\n\t\treturn $decoded;\n\t}",
"function carton_format_hex( $hex ) {\n\n\t $hex = trim( str_replace( '#', '', $hex ) );\n\n\t if ( strlen( $hex ) == 3 ) {\n\t\t\t$hex = $hex[0] . $hex[0] . $hex[1] . $hex[1] . $hex[2] . $hex[2];\n\t }\n\n\t if ( $hex ) return '#' . $hex;\n\t}",
"public static function format_value($string, $return_as_hex = false) //Convert a string to character codes\n {\n $chars = str_split($string); //Split the string into an array\n $chars_dec = array_map('ord', $chars); //Get the character code for each char\n $chars_hex = array_map('dechex', $chars_dec); //Convert the character codes to hex\n foreach ($chars_hex as $key => $char)\n $chars_hex[$key] = str_pad($char, 2, '0', STR_PAD_LEFT); //Pad each hex char\n\n $number_hex = implode('-', $chars_hex); //Merge the chars to a string\n\n if ($return_as_hex === false)\n return hexdec($number_hex); //Return as decimal integer\n else\n return $number_hex; //Return as hex string\n }",
"function decodeString($string);",
"abstract protected function getItoa64() ;",
"public static function toAscii($s)\n\t{\n\t\t$s = preg_replace('#[^\\x09\\x0A\\x0D\\x20-\\x7E\\xA0-\\x{2FF}\\x{370}-\\x{10FFFF}]#u', '', $s);\n\t\t$s = strtr($s, '`\\'\"^~?', \"\\x01\\x02\\x03\\x04\\x05\\x06\");\n\t\t$s = str_replace(\n\t\t\tarray(\"\\xE2\\x80\\x9E\", \"\\xE2\\x80\\x9C\", \"\\xE2\\x80\\x9D\", \"\\xE2\\x80\\x9A\", \"\\xE2\\x80\\x98\", \"\\xE2\\x80\\x99\", \"\\xC2\\xB0\"),\n\t\t\tarray(\"\\x03\", \"\\x03\", \"\\x03\", \"\\x02\", \"\\x02\", \"\\x02\", \"\\x04\"), $s\n\t\t);\n\t\tif (class_exists('Transliterator') && $transliterator = \\Transliterator::create('Any-Latin; Latin-ASCII')) {\n\t\t\t$s = $transliterator->transliterate($s);\n\t\t}\n\t\tif (ICONV_IMPL === 'glibc') {\n\t\t\t$s = str_replace(\n\t\t\t\tarray(\"\\xC2\\xBB\", \"\\xC2\\xAB\", \"\\xE2\\x80\\xA6\", \"\\xE2\\x84\\xA2\", \"\\xC2\\xA9\", \"\\xC2\\xAE\"),\n\t\t\t\tarray('>>', '<<', '...', 'TM', '(c)', '(R)'), $s\n\t\t\t);\n\t\t\t$s = @iconv('UTF-8', 'WINDOWS-1250//TRANSLIT//IGNORE', $s); // intentionally @\n\t\t\t$s = strtr($s, \"\\xa5\\xa3\\xbc\\x8c\\xa7\\x8a\\xaa\\x8d\\x8f\\x8e\\xaf\\xb9\\xb3\\xbe\\x9c\\x9a\\xba\\x9d\\x9f\\x9e\"\n\t\t\t\t. \"\\xbf\\xc0\\xc1\\xc2\\xc3\\xc4\\xc5\\xc6\\xc7\\xc8\\xc9\\xca\\xcb\\xcc\\xcd\\xce\\xcf\\xd0\\xd1\\xd2\\xd3\"\n\t\t\t\t. \"\\xd4\\xd5\\xd6\\xd7\\xd8\\xd9\\xda\\xdb\\xdc\\xdd\\xde\\xdf\\xe0\\xe1\\xe2\\xe3\\xe4\\xe5\\xe6\\xe7\\xe8\"\n\t\t\t\t. \"\\xe9\\xea\\xeb\\xec\\xed\\xee\\xef\\xf0\\xf1\\xf2\\xf3\\xf4\\xf5\\xf6\\xf8\\xf9\\xfa\\xfb\\xfc\\xfd\\xfe\"\n\t\t\t\t. \"\\x96\\xa0\\x8b\\x97\\x9b\\xa6\\xad\\xb7\",\n\t\t\t\t\"ALLSSSSTZZZallssstzzzRAAAALCCCEEEEIIDDNNOOOOxRUUUUYTsraaaalccceeeeiiddnnooooruuuuyt- <->|-.\");\n\t\t\t$s = preg_replace('#[^\\x00-\\x7F]++#', '', $s);\n\t\t} else {\n\t\t\t$s = @iconv('UTF-8', 'ASCII//TRANSLIT//IGNORE', $s); // intentionally @\n\t\t}\n\t\t$s = str_replace(array('`', \"'\", '\"', '^', '~', '?'), '', $s);\n\t\treturn strtr($s, \"\\x01\\x02\\x03\\x04\\x05\\x06\", '`\\'\"^~?');\n\t}",
"public static function encodeHex($input) {\n\n if (is_numeric($input)) {\n $hex_str = EthereumStatic::large_dechex($input);\n }\n elseif (is_string($input)) {\n $hex_str = EthereumStatic::strToHex($input);\n }\n else {\n throw new \\InvalidArgumentException($input . ' is not a string or number.');\n }\n return '0x' . $hex_str;\n }",
"function toHex($bytes) {\n\t\treturn implode('', array_map(function ($n){return ($n < 16 ? \"0\" : \"\") . dechex($n);}, $bytes));\n\t}",
"function strToHex($string){\n $hex = '';\n for ($i=0; $i<strlen($string); $i++){\n $ord = ord($string[$i]);\n $hexCode = dechex($ord);\n $hex .= substr('0'.$hexCode, -2);\n }\n return strToUpper($hex);\n }",
"function ascii2hex($ascii) {\n\t$hex = '';\n\tfor ($i = 0; $i < strlen($ascii); $i++) {\n\t\t$byte = strtoupper(dechex(ord($ascii{$i})));\n\t\t$byte = str_repeat('0', 2 - strlen($byte)).$byte;\n\t\t$hex.=$byte.\" \";\n\t\t}\n\t\t$hex=str_replace(\" \", \"\", $hex);\n\t\treturn $hex;\n}",
"function asc2hex ($temp)\n{\n $len = strlen($temp);\n $data = \"\";\n for ($i=0; $i<$len; $i++) $data.=sprintf(\"%02x\",ord(substr($temp,$i,1)));\n return $data;\n}",
"public function encode($hex)\n {\n $this->paramsCheck(array($hex));\n\n try {\n\n if (strlen($hex) % 2 != 0) {\n throw new \\Exception('Error in Base58::encode(): Uneven number of hex characters passed to function. Value received was \"' . var_export($hex, true) . '\".');\n }\n\n $orighex = $hex;\n $new = '';\n\n while (bccomp($hex, '0') > 0) {\n $qq = bcdiv($hex, '58');\n $rem = bcmod($hex, '58');\n $val = $qq;\n $new = $new . $this->b58_chars[$rem];\n }\n\n $return = strrev($return);\n\n for ($i = 0; $i < strlen($orighex) && substr($orighex, $i, 2) == '00'; $i += 2) {\n $return = '1' . $return;\n }\n\n return $return;\n\n } catch (\\Exception $e) {\n throw $e;\n }\n }",
"public static function hex2bin(string $str): string {\n return hex2bin(strlen($str) % 2 == 1 ? \"0\" . $str : $str);\n }",
"function ascii_to_hex($ascii)\n{\n\t$hex = '';\n\n\tfor($i = 0; $i < strlen($ascii); $i++)\n\t{\n\t\t$hex .= str_pad(base_convert(ord($ascii[$i]), 10, 16), 2, '0', STR_PAD_LEFT);\n\t}\n\treturn $hex;\n}",
"protected function _encode($str = '') {\n\t\treturn iconv(\"UTF-8\",\"WINDOWS-1257\", html_entity_decode($str, ENT_COMPAT, 'utf-8'));\n//\t\treturn $str;\n\t}",
"function hex2str($hex)\n {\n $string = '';\n\n // process each pair of bytes\n for ($i = 0; $i < strlen($hex) - 1; $i += 2) {\n // pick 2 bytes, convert via hexdec to chr\n $string .= chr(hexdec($hex[$i].$hex[$i + 1]));\n }\n\n return $string;\n }",
"public static function tohex($data, $bin2hex=true) {\n $data = (is_object($data) || is_array($data)) ? json_encode($data) : $data;\n if (! is_string($data)) return 0;\n\n if($bin2hex) return bin2hex(gzcompress($data));\n else\n {\n $len = strlen($data);\n if ($len % 2) return 0;\n else if (strspn($data, '0123456789abcdefABCDEF') != $len) return 0;\n $data = pack('H*', $data);\n return gzuncompress($data);\n }\n }",
"function javascript_to_binary ($texte) {\n\twhile (ereg(\"%([0-9A-F][0-9A-F])\", $texte, $regs))\n\t\t$texte = str_replace($regs[0],chr(hexdec($regs[1])), $texte);\n\treturn $texte;\n}",
"private static function hexToBase62(string $hex) : string\n {\n $hex = strrev($hex);\n \n return gmp_strval(gmp_init($hex, 16), 62);\n }",
"public function convert(string $hex) : string\n {\n list($r, $g, $b) = sscanf(ltrim($hex, '#'), \"%02x%02x%02x\");\n return \"rgb($r, $g, $b)\";\n }",
"function testValid($from, $to, $encoding, $bothWays = true) {\n identifyValidString($from, $encoding);\n convertValidString($from, $to, $encoding, 'UTF-16BE', false);\n\n if ($bothWays) {\n /* An 0xF at the beginning is redundant; it switches to ASCII mode, but\n * ASCII mode is default */\n if ($from[0] == \"\\x0F\")\n $from = substr($from, 1, strlen($from) - 1);\n /* ESC ( B at the beginning is redundant, since ASCII mode is the default */\n if (substr($from, 0, 3) == \"\\x1B(B\")\n $from = substr($from, 3, strlen($from) - 3);\n /* If the string switches to a different charset, it should switch back to\n * ASCII at the end */\n if (strpos($from, \"\\x1B\\$B\") !== false || strpos($from, \"\\x1B(J\") !== false || strpos($from, \"\\x1B(I\") !== false)\n $from .= \"\\x1B(B\";\n if ($encoding == 'CP50222' && $from[0] == \"\\x0E\")\n $from .= \"\\x0F\";\n\n convertValidString($to, $from, 'UTF-16BE', $encoding, false);\n }\n}",
"public function to_string_and_back(): void\n {\n $uuid = UUID::generate();\n $string = $uuid->toString();\n\n $this->assertSame($uuid->toString(), UUID::fromString($string)->toString());\n }",
"private function _encodeUTF16($string, $compressed = '')\n\t{\n\t\t$result = $string;\n\t\t//if ($this->_defaultEncoding) {\n\t\t//\tif($compressed) {\n\t\t//\t\t$string = $this->_uncompressByteString($string);\n\t\t//\t}\n\t\t//\tswitch ($this->_encoderFunction){\n\t\t//\t\tcase 'iconv' :\n\t\t//\t\t\t$result = iconv('UTF-16LE', $this->_defaultEncoding, $string);\n\t\t//\t\t\tbreak;\n\t\t//\t\tcase 'mb_convert_encoding' :\n\t\t//\t\t\t$result = mb_convert_encoding($string, $this->_defaultEncoding,\n\t\t//\t\t\t\t'UTF-16LE' );\n\t\t//\t\t\tbreak;\n\t\t//\t}\n\t\t//}\n\t\tif($compressed) {\n\t\t\t$string = $this->_uncompressByteString($string);\n \t\t}\n\t\tswitch ($this->_encoderFunction){\n\t\t\tcase 'iconv' :\n\t\t\t\t$result = iconv('UTF-16LE', 'UTF-8', $string);\n\t\t\t\tbreak;\n\t\t\tcase 'mb_convert_encoding' :\n\t\t\t\t$result = mb_convert_encoding($string, 'UTF-8', 'UTF-16LE');\n\t\t\t\tbreak;\n\t\t}\n\t\treturn $result;\n\t}",
"function hexascii($hex){\n $length = strlen($hex);\n $ascii = '';\n for ($i = 0; $i < $length; $i+=2){\n $ascii .= chr(hexdec(substr($hex, $i, 2)));\n }\n return $ascii;\n}",
"function encode_string($str)\r\n {\r\n return strlen($str) . ':' . $str;\r\n }",
"function replaceHashHex($hex) {\n\tglobal $base;\n\t$oldHex = $hex;\n\t$baseHex = $base->hex2RGB( str_replace('#', '', $oldHex) );\n\techo $baseHex[0] . ', ' . $baseHex[1] . ', ' . $baseHex[2] ;\n}",
"public static function ensureHexPrefix($str) {\n if (self::hasHexPrefix($str)) {\n return $str;\n }\n return '0x' . $str;\n }",
"public static function encode($txt){\n // expand key on same length\n $key = str_repeat(self::$_key, strlen($txt)/strlen(self::$_key) + 1);\n \n // split strings\n $data = str_split($txt);\n $shifts = str_split($key);\n \n // output;\n $output = array();\n \n // shift\n for ($i=0;$i<count($data);$i++){\n $a = ord($data[$i]);\n $b = ord($shifts[$i]);\n $c = 49;\n \n // odd-even switch\n if ($i%2==0){\n $a += $b;\n \n // prevent overflow\n if ($a>255){\n $a -= 255;\n $c = 48; \n }\n }else{\n $a -= $b;\n \n // prevent underflow\n if ($a<0){\n $a = -$a;\n $c = 48; \n }\n }\n \n $output[] = $a;\n $output[] = $c;\n }\n \n // convert array to hex values\n $hex = ''; \n foreach ($output as $el){\n $hex .= str_pad (dechex($el), 2 ,'0', STR_PAD_LEFT);\n }\n \n // return encrypted data\n return $hex;\n }",
"public function writeHexString($str, $length=null, $lowNibble=null){ }",
"protected function getItoa64() {}",
"protected function getItoa64() {}",
"protected function strguid2hex($strGUID) {\n $strGUID = str_replace('-', '', $strGUID);\n\n $octet_str = '\\\\' . substr($strGUID, 6, 2);\n $octet_str .= '\\\\' . substr($strGUID, 4, 2);\n $octet_str .= '\\\\' . substr($strGUID, 2, 2);\n $octet_str .= '\\\\' . substr($strGUID, 0, 2);\n $octet_str .= '\\\\' . substr($strGUID, 10, 2);\n $octet_str .= '\\\\' . substr($strGUID, 8, 2);\n $octet_str .= '\\\\' . substr($strGUID, 14, 2);\n $octet_str .= '\\\\' . substr($strGUID, 12, 2);\n //$octet_str .= '\\\\' . substr($strGUID, 16, strlen($strGUID));\n for ($i=16; $i<=(strlen($strGUID)-2); $i++) {\n if (($i % 2) == 0) {\n $octet_str .= '\\\\' . substr($strGUID, $i, 2);\n }\n }\n \n return $octet_str;\n }",
"function sha1_bin($hex)\r\n{\r\n return pack('H40', $hex);\r\n}",
"function _wp_kses_decode_entities_chr_hexdec($matches)\n {\n }",
"function encode($var)\n {\n switch (gettype($var)) {\n case 'boolean':\n return $var ? 'true' : 'false';\n\n case 'NULL':\n return 'null';\n\n case 'integer':\n return (int) $var;\n\n case 'double':\n case 'float':\n return (float) $var;\n\n case 'string':\n // STRINGS ARE EXPECTED TO BE IN ASCII OR UTF-8 FORMAT\n $ascii = '';\n $strlen_var = strlen($var);\n\n /*\n * Iterate over every character in the string,\n * escaping with a slash or encoding to UTF-8 where necessary\n */\n for ($c = 0; $c < $strlen_var; ++$c) {\n\n $ord_var_c = ord($var{$c});\n\n switch (true) {\n case $ord_var_c == 0x08:\n $ascii .= '\\b';\n break;\n case $ord_var_c == 0x09:\n $ascii .= '\\t';\n break;\n case $ord_var_c == 0x0A:\n $ascii .= '\\n';\n break;\n case $ord_var_c == 0x0C:\n $ascii .= '\\f';\n break;\n case $ord_var_c == 0x0D:\n $ascii .= '\\r';\n break;\n\n case $ord_var_c == 0x22:\n case $ord_var_c == 0x2F:\n case $ord_var_c == 0x5C:\n // double quote, slash, slosh\n $ascii .= '\\\\'.$var{$c};\n break;\n\n case (($ord_var_c >= 0x20) && ($ord_var_c <= 0x7F)):\n // characters U-00000000 - U-0000007F (same as ASCII)\n $ascii .= $var{$c};\n break;\n\n case (($ord_var_c & 0xE0) == 0xC0):\n // characters U-00000080 - U-000007FF, mask 110XXXXX\n // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8\n $char = pack('C*', $ord_var_c, ord($var{$c + 1}));\n $c += 1;\n $utf16 = $this->utf82utf16($char);\n $ascii .= sprintf('\\u%04s', bin2hex($utf16));\n break;\n\n case (($ord_var_c & 0xF0) == 0xE0):\n // characters U-00000800 - U-0000FFFF, mask 1110XXXX\n // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8\n $char = pack('C*', $ord_var_c,\n ord($var{$c + 1}),\n ord($var{$c + 2}));\n $c += 2;\n $utf16 = $this->utf82utf16($char);\n $ascii .= sprintf('\\u%04s', bin2hex($utf16));\n break;\n\n case (($ord_var_c & 0xF8) == 0xF0):\n // characters U-00010000 - U-001FFFFF, mask 11110XXX\n // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8\n $char = pack('C*', $ord_var_c,\n ord($var{$c + 1}),\n ord($var{$c + 2}),\n ord($var{$c + 3}));\n $c += 3;\n $utf16 = $this->utf82utf16($char);\n $ascii .= sprintf('\\u%04s', bin2hex($utf16));\n break;\n\n case (($ord_var_c & 0xFC) == 0xF8):\n // characters U-00200000 - U-03FFFFFF, mask 111110XX\n // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8\n $char = pack('C*', $ord_var_c,\n ord($var{$c + 1}),\n ord($var{$c + 2}),\n ord($var{$c + 3}),\n ord($var{$c + 4}));\n $c += 4;\n $utf16 = $this->utf82utf16($char);\n $ascii .= sprintf('\\u%04s', bin2hex($utf16));\n break;\n\n case (($ord_var_c & 0xFE) == 0xFC):\n // characters U-04000000 - U-7FFFFFFF, mask 1111110X\n // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8\n $char = pack('C*', $ord_var_c,\n ord($var{$c + 1}),\n ord($var{$c + 2}),\n ord($var{$c + 3}),\n ord($var{$c + 4}),\n ord($var{$c + 5}));\n $c += 5;\n $utf16 = $this->utf82utf16($char);\n $ascii .= sprintf('\\u%04s', bin2hex($utf16));\n break;\n }\n }\n\n return '\"'.$ascii.'\"';\n\n case 'array':\n /*\n * As per JSON spec if any array key is not an integer\n * we must treat the the whole array as an object. We\n * also try to catch a sparsely populated associative\n * array with numeric keys here because some JS engines\n * will create an array with empty indexes up to\n * max_index which can cause memory issues and because\n * the keys, which may be relevant, will be remapped\n * otherwise.\n *\n * As per the ECMA and JSON specification an object may\n * have any string as a property. Unfortunately due to\n * a hole in the ECMA specification if the key is a\n * ECMA reserved word or starts with a digit the\n * parameter is only accessible using ECMAScript's\n * bracket notation.\n */\n\n // treat as a JSON object\n if (is_array($var) && count($var) && (array_keys($var) !== range(0, sizeof($var) - 1))) {\n $properties = array_map(array($this, 'name_value'),\n array_keys($var),\n array_values($var));\n\n foreach($properties as $property) {\n if(Services_JSON::isError($property)) {\n return $property;\n }\n }\n\n return '{' . join(',', $properties) . '}';\n }\n\n // treat it like a regular array\n $elements = array_map(array($this, 'encode'), $var);\n\n foreach($elements as $element) {\n if(Services_JSON::isError($element)) {\n return $element;\n }\n }\n\n return '[' . join(',', $elements) . ']';\n\n case 'object':\n $vars = get_object_vars($var);\n\n $properties = array_map(array($this, 'name_value'),\n array_keys($vars),\n array_values($vars));\n\n foreach($properties as $property) {\n if(Services_JSON::isError($property)) {\n return $property;\n }\n }\n\n return '{' . join(',', $properties) . '}';\n\n default:\n return ($this->use & SERVICES_JSON_SUPPRESS_ERRORS)\n ? 'null'\n : new Services_JSON_Error(gettype($var).\" can not be encoded as JSON string\");\n }\n }",
"function char_translate($u1)\n{ \n $conv = array(0,0xffff,0,0xffff); \n //echo \"len=\".mb_strlen($u1).\" , \".bin2hex($u1).\" , \".mb_decode_numericentity($u1,$conv).\"<br>\";\n switch (mb_strlen($u1))\n {\n case 1:\n $mask = 0x7f;\n break;\n case 2:\n $mask = 0x1f3f; /* U+80 - U+7ff : 110x-xxxx-10xx-xxxx */\n break;\n case 3:\n $mask = 0x0f3f3f; /* U+800 - U+ffff : 1110-xxxx-10xx-xxxx-10xx-xxxx */\n break;\n case 4:\n $mask = 0x073f3f3f; /* U+10000 - U+1fffff : 1111-0xxx-10xx-xxxx-10xx-xxxx-10xx-xxxx */\n break;\n }\n $a = intval(bin2hex($u1),16);\n $n = $a & $mask;\n $val = intval($n); \n //var_dump($a);\n //var_dump($mask);\n //var_dump($n);\n return $val;\n}",
"private function uniConvert ()\n\t\t{\n\t\t\t return preg_replace(\"/\\\\\\\\u([a-f0-9]{4})/e\",\n \"iconv('UCS-4LE','UTF-8',pack('V', hexdec('U$1')))\",\n json_encode($this->result));\n\t\t}",
"function xorffswapnibbleencrypt($inputstring)\n\t{\n\t\t$outputstring = \"\";\n\t\t$arrayOfInputCharacters = str_split($inputstring);\n\t\tfor($ii=0;$ii<count($arrayOfInputCharacters);$ii++)\n\t\t\t$outputstring .= dechex((ord($arrayOfInputCharacters[$ii]) ^ 0x0f) & 0x0f).dechex((ord($arrayOfInputCharacters[$ii]) ^ 0xf0) >> 4);\n\t\treturn $outputstring;\n\t}",
"function asciihex($ascii){\n $length = strlen($ascii);\n $hex = '';\n for ($i = 0; $i < $length; $i++){\n $hex .= sprintf(\"%02x\", ord(substr($ascii, $i, 1)));\n }\n return $hex;\n}",
"public static function DecodeSHA1($string,$key) {\n $key = sha1($key);\n $strLen = strlen($string);\n $keyLen = strlen($key);\n for ($i = 0; $i < $strLen; $i+=2) {\n $ordStr = hexdec(base_convert(strrev(substr($string,$i,2)),36,16));\n if ($j == $keyLen) { $j = 0; }\n $ordKey = ord(substr($key,$j,1));\n $j++;\n $hash .= chr($ordStr - $ordKey);\n }\n return $hash;\n }",
"function decodeUtf8($str) {\n $res = '';\n for ($i = 0; $i <= strlen($str) - 6; $i++) {\n $character = $str[$i];\n if ($character == '\\\\' && $str[$i + 1] == 'u') {\n $value = hexdec(substr($str, $i + 2, 4));\n\n if ($value < 0x0080) {\n // 1 byte: 0xxxxxxx\n $character = chr($value);\n } else if ($value < 0x0800) {\n // 2 bytes: 110xxxxx 10xxxxxx\n $character = chr((($value & 0x07c0) >> 6) | 0xc0);\n $character .= chr(($value & 0x3f) | 0x80);\n } else {\n // 3 bytes: 1110xxxx 10xxxxxx 10xxxxxx\n $character = chr((($value & 0xf000) >> 12) | 0xe0);\n $character .= chr((($value & 0x0fc0) >> 6) | 0x80);\n $character .= chr(($value & 0x3f) | 0x80);\n }\n $i += 5;\n }\n $res .= $character;\n }\n return $res . substr($str, $i);\n}",
"public static function strToHex($str)\r\n\t{\r\n\t\t$r = \"\";\r\n\t\t$l = strlen($str);\r\n\t\tfor($i = 0; $i < $l; $i++)\r\n\t\t\t$r .= str_pad(strtoupper(dechex(ord($str[$i]))), 2, \" \",\r\n\t\t\t\tSTR_PAD_LEFT) . \" \";\r\n\t\treturn $r;\r\n\t}",
"public function encodeBinary(UuidInterface $uuid): string;",
"private function strToHex($string){\t\n\t\t $hex = [];\n\t\t \n\t\t\tfor ($i=0; $i<strlen($string); $i+=2){\n\t\t\t\t$hexCode = \"0x\" .strToUpper($string[$i]) .strToUpper($string[$i+1]);\n\t\t\t\tarray_push($hex, $hexCode);\n\t\t\t}\n\n\t\t \n\t\t // var_dump($hex);\n\t\t return $hex;\n\t\t}",
"public function weiToHex($q) {\n\t\treturn '0x' . dechex($q);\n\t}",
"function filter_hex($string)\n{\n return preg_replace('/[^a-fA-F0-9]+/', '', $string);\n}",
"public function base58_encode_checksum($hex) { \n\n\t// SHA256 Hash\n\t$checksum = hash('sha256', hash('sha256', pack('H*', $hex), true));\n\t$hash = $hex . substr($checksum, 0, 8);\n\n\t// Return\n\treturn $this->base58_encode($hash);\n\n}",
"private static function hash($str) {\n $hash = 0;\n\n for ($i = 0, $l = strlen($str); $i < $l; $i++) {\n $hash += ord($str[$i]);\n $hash += $hash << 10;\n $hash ^= $hash >> 6;\n }\n\n $hash += $hash << 3;\n $hash ^= $hash >> 6;\n $hash += $hash << 16;\n\n return $hash;\n }",
"function littleEndian($hex)\n\t{\n\t\tfor ($x=dol_strlen($hex)-2; $x >= 0; $x=$x-2) {\n\t\t\t$result .= substr($hex,$x,2);\n\t\t}\n\t\treturn $result;\n\t}",
"public function Encode($src){\n for ($i=0;$i<count($src);$i++){\n $dst[$i*2] = self::hextable[$src[$i]>>4];\n $dst[$i*2+1] = self::hextable[$src[$i]&0x0f];\n }\n return $dst;\n }",
"function uniencode($s)\n{\n $r = \"\";\n for ($i=0;$i<strlen($s);$i++) $r.= \"&#\".ord(substr($s,$i,1)).\";\";\n return $r;\n}",
"public function HexDecodeStringOdd($s){\n if (count($s)%2 != 0) {\n $s = \"0\" + $s;\n }\n return $this->DecodeString($s);\n }",
"public static function fromHex($hex)\n\t{\n\t\tif(Andweb\\Utils\\Strings::first($hex) == '#')\n\t\t\t$hex = Andweb\\Utils\\Strings::after($hex, '#');\n\t\tlist($r, $g, $b) = str_split($hex, 2);\n\t\treturn new static(hexdec($r), hexdec($g), hexdec($b));\n\t}",
"static function base58_encode($string,$alphabet='123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'){\n\t\t$base=strlen($alphabet);\n\t\t// Type validation\n\t\tif(is_string($string) === false){\n\t\t\treturn false;\n\t\t}\n\t\t// If the string is empty, then the encoded string is obviously empty\n\t\tif(strlen($string) === 0){\n\t\t\treturn '';\n\t\t}\n\t\t// Now we need to convert the byte array into an arbitrary-precision decimal\n\t\t// We basically do this by performing a base256 to base10 conversion\n\t\t$hex=unpack('H*',$string);\n\t\t$hex=reset($hex);\n\t\t$decimal=new BigInteger($hex,16);\n\t\t// This loop now performs base 10 to base 58 conversion\n\t\t// The remainder or modulo on each loop becomes a base 58 character\n\t\t$output='';\n\t\twhile($decimal->cmp($base) >= 0){\n\t\t\tlist($decimal,$mod)=$decimal->divQR($base);\n\t\t\t$output.=$alphabet[$mod->toNumber()];\n\t\t}\n\t\t// If there's still a remainder, append it\n\t\tif($decimal->cmp(0) > 0){\n\t\t\t$output.=$alphabet[$decimal->toNumber()];\n\t\t}\n\t\t// Now we need to reverse the encoded data\n\t\t$output=strrev($output);\n\t\t// Now we need to add leading zeros\n\t\t$bytes=str_split($string);\n\t\tforeach($bytes as $byte){\n\t\t\tif($byte === \"\\x00\"){\n\t\t\t\t$output=$alphabet[0].$output;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t\treturn (string)$output;\n\t}",
"public function HexaDecimalToImage($haxaString) {\n $destFolderName=\"../uploads/profile-pics\";\n $destFileName = $destFolderName.\"/\".uniqid() . '.png';\n $hex = preg_replace('/[\\s\\W]+/','',$haxaString);\n $binary = @pack(\"H*\", $hex);\n $success = file_put_contents($destFileName, $binary);\n\n if($success===false){\n @unlink($destFileName);\n return false;\n }else{\n $fullImageURL = str_replace('./uploads/', '/uploads/', $destFileName);\n return $fullImageURL;\n }\n\n }",
"function astra_rgba2hex( $string, $include_alpha = false ) {\n\t_deprecated_function( __FUNCTION__, '3.6.2', 'astra_addon_rgba2hex()' );\n\treturn astra_addon_rgba2hex( $string, $include_alpha = false );\n}",
"public static function checksumEncode(string $value, int $len = 256): string\n {\n $strReturn = '';\n $strHash = static::stripPrefix(strtolower($value));\n $strHashed = Keccak::hash($strHash, $len);\n $arrHash = str_split($strHash);\n\n foreach ($arrHash as $i => $v) {\n if (false !== strpos(EthType::HEX_INT, $v)) {\n $strReturn .= $v;\n } elseif (false !== stripos(EthType::HEX_CHARS, $v)) {\n $n = hexdec($strHashed[$i]);\n\n if ($n > 7) {\n $strReturn .= strtoupper($v);\n } else {\n $strReturn .= $v;\n }\n } else {\n throw new Exception(\"Unknown hex character: \" . $v);\n }\n }\n\n return static::appendPrefix($strReturn);\n }",
"static public function binToHex(string $bin): string\n {\n $code = \"0123456789abcdef\";\n\n // check the length\n $rest = strlen($bin) % 4;\n if ($rest > 0) {\n // we need to prepend 0's....\n $newLength = strlen($bin) + (4 - $rest);\n $bin = self::prependBin($bin, $newLength);\n }\n\n $parts = str_split($bin, 4);\n $res = \"\";\n foreach ($parts as $p) {\n $dec = bindec($p);\n $res .= $code[$dec];\n }\n\n return $res;\n }",
"public function encodePassword(string $raw): string;",
"public static function utf16_to_utf8($str)\n {\n $len = strlen($str);\n $dec = '';\n\n for ($i = 0; $i < $len; $i += 2) {\n $c = ord($str[$i]) << 8 | ord($str[$i + 1]);\n if ($c >= 0x0001 && $c <= 0x007F) {\n $dec .= chr($c);\n }\n else if ($c > 0x07FF) {\n $dec .= chr(0xE0 | (($c >> 12) & 0x0F));\n $dec .= chr(0x80 | (($c >> 6) & 0x3F));\n $dec .= chr(0x80 | (($c >> 0) & 0x3F));\n }\n else {\n $dec .= chr(0xC0 | (($c >> 6) & 0x1F));\n $dec .= chr(0x80 | (($c >> 0) & 0x3F));\n }\n }\n\n return $dec;\n }",
"final public function toHex() : Hex\n {\n return $this->hex;\n }",
"function hex2color($str) {\n $color = hex2bin(ltrim($str, '$'));\n return ($str[0] === '$' ? unpack('V', \"$color\\0\") : unpack('N', \"\\0$color\"))[1];\n}"
]
| [
"0.70657164",
"0.6865649",
"0.6516719",
"0.6367622",
"0.60551465",
"0.60499406",
"0.598656",
"0.59474576",
"0.59423286",
"0.58565015",
"0.57028514",
"0.56949145",
"0.5673171",
"0.5664047",
"0.5587818",
"0.55307573",
"0.55257463",
"0.5504657",
"0.54634875",
"0.5450057",
"0.54267585",
"0.5415057",
"0.5414396",
"0.5391776",
"0.5390694",
"0.5383909",
"0.5382394",
"0.5381837",
"0.5377092",
"0.5355828",
"0.530624",
"0.530624",
"0.5305409",
"0.5300266",
"0.5289024",
"0.52644026",
"0.5256754",
"0.521748",
"0.51925564",
"0.5184955",
"0.5155498",
"0.5149997",
"0.51498044",
"0.5131903",
"0.5116494",
"0.5115921",
"0.5103409",
"0.50872695",
"0.5076788",
"0.5072593",
"0.506753",
"0.50603974",
"0.50524217",
"0.50494814",
"0.50476",
"0.5044817",
"0.50421995",
"0.5018129",
"0.5007903",
"0.50067705",
"0.5003677",
"0.5002672",
"0.4993624",
"0.49887627",
"0.4983958",
"0.4979669",
"0.49594516",
"0.4957655",
"0.4957655",
"0.4957355",
"0.4924671",
"0.49223468",
"0.49185047",
"0.49166787",
"0.49001178",
"0.48954424",
"0.48865032",
"0.48779342",
"0.48644462",
"0.48589563",
"0.48578435",
"0.48432803",
"0.48356313",
"0.48224562",
"0.4799552",
"0.47926748",
"0.47890902",
"0.47815564",
"0.4771227",
"0.47686306",
"0.47626275",
"0.47566414",
"0.47479048",
"0.47416976",
"0.47351313",
"0.47347066",
"0.47346625",
"0.4732537",
"0.47259948",
"0.47182456"
]
| 0.49794725 | 66 |
Method to get the field input markup. | protected function getInput()
{
$doc = JFactory::getDocument();
$doc->addScript(Juri::base(true) . '/components/com_easysdi_map/models/fields/dynamictable.js?v=' . sdiFactory::getSdiFullVersion());
// Initialize variables.
$html = array();
$html[] = '<table class="table table-striped table-hover" id="tab-dyn">';
$html[] = '<thead>';
$html[] = '<tr>';
$html[] = '<th class="text-center hasTip" title="'.JText::_('COM_EASYSDI_MAP_FORM_DESC_MAP_DEFAULTLEVEL').'">';
$html[] = JText::_('COM_EASYSDI_MAP_FORM_LBL_MAP_DEFAULTLEVEL');
$html[] = '</th>';
$html[] = '<th class="text-center hasTip" title="'.JText::_('COM_EASYSDI_MAP_FORM_DESC_MAP_LEVELLABEL').'" >';
$html[] = JText::_('COM_EASYSDI_MAP_FORM_LBL_MAP_LEVELLABEL');
$html[] = '</th>';
$html[] = '<th class="text-center hasTip" title="'.JText::_('COM_EASYSDI_MAP_FORM_DESC_MAP_LEVELCODE').'">';
$html[] = JText::_('COM_EASYSDI_MAP_FORM_LBL_MAP_LEVELCODE');
$html[] = '</th>';
$html[] = '<th class="text-center">';
$html[] = '</tr>';
$html[] = '</thead>';
$html[] = '<tbody>';
$html[] = '<tr id="level1"></tr>';
$html[] = '</tbody>';
$html[] = '</table>';
$html[] = '<a id="add_row" class="btn btn-success pull-right">Add Row</a>';
return implode($html);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getInputHtml()\n\t{\n\t\treturn $this->input_html;\n\t}",
"protected function getInput()\n { \n $file = $this->get(\"file\", false);\n $text = $this->get(\"text\", false);\n $label = $this->get(\"label\", false);\n\n if (!$label)\n {\n $html[] = '</div><div class=\"freetext '.$this->get(\"class\").'\">';\n }\n\n if ($file)\n {\n $html[] = $this->renderContent($this->get(\"file\"), $this->get(\"path\"), $this); \n }\n\n if ($text)\n {\n $html[] = $this->prepareText($text);\n }\n\n return implode(\" \", $html);\n }",
"public function getInput ()\n\t{\n\t\treturn $this->fetchElement($this->name, $this->value, $this->element, $this->options['controls']);\n\t}",
"public function getInput()\n\t{\n\t\t$html = '<div>';\n\t\t$html .= $this->getMegaSettings();\n\t\t$html .= '<input type=\"hidden\" name=\"' . $this->name . '\" id=\"' . $this->id . '\" value=\"' . $this->value . '\">';\n\t\t$html .= '</div>';\n\n\t\treturn $html;\n\t}",
"public function getHTML(){\n $twig = get_instance()->twig->getTwig();\n $template = $twig->load('sistema/theme/default/lib/field.twig');\n \n return $template->render(array(\n 'element_type' => $this->getElementName()\n , 'type' => $this->getFieldType()\n , 'id' => $this->getId()\n , 'name' => $this->getName()\n , 'title' => $this->getAttr('title')\n , 'class' => $this->getClass()\n , 'form_name' => $this->getFormName()\n , 'error_name' => $this->getErrorName()\n , 'attributes' => $this->getTagAttributes()\n , 'disabled' => $this->hasDisabled()\n ));\n }",
"protected function getInput()\n {\n // register necessary style sheets\n JHtml::_( 'stylesheet', 'com_events/css-toggle-switch/toggle-switch.css', array(), true );\n JHtml::_( 'stylesheet', 'com_events/com_events/com_events.css', array(), true );\n \n $markup = <<<TOGGLE_MARKUP\n<div class=\"{$this->_getContainerCssClass()}\">\n {$this->_getInputOptions()}\n <span class=\"slide-button\"></span>\n</div> \nTOGGLE_MARKUP;\n \n return $markup;\n }",
"public function renderInput(){\n $row = '';\n $row .= \"<input type=\\\"$this->type\\\" id=\\\"$this->id\\\" name=\\\"$this->name\\\" $this->required \";\n\n return $row;\n }",
"protected function getInput()\n\t{\n\t\t// Initialize some field attributes.\n $icon = $this->element['icon'];\n $suffix = $this->element['suffix'];\n\t\t$size = $this->element['size'] ? ' size=\"' . (int) $this->element['size'] . '\"' : '';\n\t\t$maxLength = $this->element['maxlength'] ? ' maxlength=\"' . (int) $this->element['maxlength'] . '\"' : '';\n\t\t$class = $this->element['class'] ? ' class=\"' . (string) $this->element['class'] . '\"' : '';\n\t\t$readonly = ((string) $this->element['readonly'] == 'true') ? ' readonly=\"readonly\"' : '';\n\t\t$disabled = ((string) $this->element['disabled'] == 'true') ? ' disabled=\"disabled\"' : '';\n $defautlwidth = $suffix ? '128px' : '150px';\n $styles = ' style=\"width:'.$defautlwidth.';'.$this->element['styles'].'\"';\n\n\t\t// Initialize JavaScript field attributes.\n\t\t$onchange = $this->element['onchange'] ? ' onchange=\"' . (string) $this->element['onchange'] . '\"' : '';\n $html = $icon ? '<div style=\"display:inline-block;vertical-align:top;margin-top:4px;width:20px;\"><img src=\"' . $this->getPathToElements() . '/images/' . $icon . '\" style=\"margin-right:5px;\" /></div>' : '<div style=\"display:inline-block;width:20px;\"></div>';\n $html .= '<input type=\"text\" name=\"' . $this->name . '\" id=\"' . $this->id . '\"' . ' value=\"'\n\t\t\t. htmlspecialchars($this->value, ENT_COMPAT, 'UTF-8') . '\"' . $class . $size . $disabled . $readonly . $onchange . $maxLength . $styles . '/>';\n if ($suffix)\n $html .= '<span style=\"display:inline-block;line-height:25px;\">' . $suffix . '</span>';\n\t\treturn $html;\n\t}",
"protected function getInput()\n {\n $this->max = (int) $this->getUploadValue();\n $this->class = trim($this->class.' input-small');\n\n $html = '<div class=\"input-append input-group\">';\n\n $html .= parent::getInput();\n $html .= ' <div class=\"input-group-append\">';\n $html .= ' <span class=\"add-on input-group-text\">Kb</span>';\n $html .= ' </div>';\n $html .= '\t<small class=\"help-inline form-text\"> <em>'.JText::_('WF_SERVER_UPLOAD_SIZE').' : '.$this->getUploadValue().'</em></small>';\n $html .= '</div>';\n\n return $html;\n }",
"protected function input()\n {\n return '<input type=\"' . $this->property->input_type . '\" placeholder=\"Значение\" ' .\n 'name=\"property[' . $this->property->id . ']\" class=\"form-control\">';\n }",
"public function getFormInput() {\r\n\t\t$name\t\t\t= $this->getName();\r\n\t\t$id\t\t\t\t= $this->getId();\r\n\t\t$attr\t\t\t= $this->getAttributes();\r\n\t\t$type \t\t\t= 'file';\r\n\t\t$additional \t= '';\r\n\t\t\r\n\t\t// MAX_FILE_SIZE is no longer used, didn't provide anything useful\r\n\t\t\r\n\t\t// Start building the HTML input\r\n\t\t$html = '<input';\r\n\t\t// Parse Additional Attributes\r\n\t\tif ($attr) {\r\n\t\t\tforeach ($attr as $key => $values) {\r\n\t\t\t\t// @new feature - Some HTML attributes (type) can be overwritten\r\n\t\t\t\t// directly from the Additional Attributes area\r\n\t\t\t\tif ($key == 'type' && strlen($values)) {\r\n\t\t\t\t\t${$key} = $values;\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\t$additional .= $this->attributeToHtml($key, $values);\r\n\t\t\t}\r\n\t\t}\r\n\t\t// Set the type\r\n\t\t$html .= ' type=\"'.$this->escape($type).'\"';\r\n\t\t// Name & id\r\n\t\t$html .= ' name=\"'.$this->escape($name).'\"'.\r\n\t\t\t\t ' id=\"'.$this->escape($id).'\"';\r\n\t\t// Additional HTML\r\n\t\t$html .= $additional;\r\n\t\t// Close the tag\r\n\t\t$html .= ' />';\r\n\t\t\r\n\t\treturn $html;\r\n\t}",
"function render_field() {\n return xFormTemplate::apply($this->template_field, $this->options);\n }",
"public function input(){\n\t\treturn '<input '.\n\t\t\t\t\t'type=\"'. $this->tipo .'\" '.\n\t\t\t\t\t'id=\"'. $this->name .'\" '.\n\t\t\t\t\t'name=\"'. $this->name .'\" '.\n\t\t\t\t\t'class=\"form-control\" '.\n\t\t\t\t\t'value=\"'.( isset($_POST[$this->name]) ? $_POST[$this->name] : '').'\"'.\n\t\t\t\t'/>';\n\t}",
"public function getHtml()\n {\n $attributes = $this->getAttributes();\n $attributes['value'] = htmlspecialchars($this->getValue());\n $attributes['type'] = 'hidden';\n $attributesStr = $this->_buildAttributeStr($attributes);\n\n $html = '<input ' . $attributesStr . ' />';\n return $html;\n }",
"public function html()\n {\n return ($this->isEncrypted()) ? $this->encryptedField() : $this->regularField();\n }",
"public function render() : string\r\n {\r\n return '<input type=\"text\" />';\r\n }",
"protected function getInput()\n {\n $size\t\t= $this->element['size'] ? ' size=\"'.(int)$this->element['size'].'\"' : '';\n $maxLength\t= $this->element['maxlength'] ? ' maxlength=\"'.(int)$this->element['maxlength'].'\"' : '';\n $class\t\t= $this->element['class'] ? ' class=\"'.(string)$this->element['class'].'\"' : '';\n $readonly\t= ((string)$this->element['readonly'] == 'true') ? ' readonly=\"readonly\"' : '';\n $disabled\t= ((string)$this->element['disabled'] == 'true') ? ' disabled=\"disabled\"' : '';\n\n //-- Initialize JavaScript field attributes.\n $onchange\t= $this->element['onchange'] ? ' onchange=\"'.(string)$this->element['onchange'].'\"' : '';\n\n return '<input type=\"text\" name=\"'.$this->name.'\" id=\"'.$this->id.'\"'\n .' value=\"'.htmlspecialchars($this->value, ENT_COMPAT, 'UTF-8').'\"'\n .$class.$size.$disabled.$readonly.$onchange.$maxLength.'/>';\n }",
"public function get_input_template() {\n\t\t$options = $this->build_options();\n\n\t\treturn '<ul %s>' . $options . '</ul>';\n\t}",
"public function getMarkup();",
"abstract protected function getInputHtml();",
"protected function getInput()\n\t{\n\t\t// Initialize some field attributes.\n\t\t$class = $this->element['class'] ? ' class=\"paragraph paragraph-' . $this->id . ' ' . (string) $this->element['class'] . '\"' : ' class=\"paragraph paragraph-' . $this->id . '\"';\n\n\t\t// Initialize variables.\n\t\t$html = array();\n\n\t\t// Start the radio field output.\n\t\t$html[] = '<p id=\"' . $this->id . '\"' . $class . '>';\n\n\t\t$html[] = isset($this->element['description']) ? $this->element['description'] : '';\n\n\t\t// End the radio field output.\n\t\t$html[] = '</p>';\n\n\t\treturn implode($html);\n\t}",
"protected function getInput()\n { \n return ConditionBuilder::render($this->name, $this->value, $this->getConditionsList());\n }",
"protected function getInput()\n {\n\n /* @var $layout FileLayout */\n $layout = new FileLayout('joomla.form.field.bpcheckbox');\n\n $includePaths = $layout->getIncludePaths();\n $includePaths[] = JPATH_PLUGINS.'/fields/bpcheckbox/layouts';\n $layout->setIncludePaths($includePaths);\n\n // Field attributes\n $attributes = [\n 'class' => trim($this->class.' bpcheckbox'),\n 'value' => empty($this->value) ? $this->default : $this->value,\n 'id' => $this->id,\n 'name' => $this->name,\n ];\n\n // Is field disabled\n if ($this->disabled) {\n $attributes['disabled'] = '';\n }\n\n // Is field required\n if ($this->required) {\n $attributes['required'] = '';\n }\n\n // Should field be focused on default\n if ($this->autofocus) {\n $attributes['autofocus'] = '';\n }\n\n // Is field checked\n if ($this->checked) {\n $attributes['checked'] = '';\n }\n\n // Field onclick event\n if (!empty($this->onclick)) {\n $attributes['onclick'] = $this->onclick;\n }\n\n // Fiel on change event\n if (!empty($this->onchange)) {\n $attributes['onchange'] = $this->onchange;\n }\n\n return $layout->render([\n 'attributes' => $attributes,\n 'text' => $this->text\n ]);\n }",
"public function get_label_input()\n\t{\n\t\t$s = $this->get_html();\n\t\tif ( !empty($s) ){\n\t\t\tif ( BBN_IS_DEV ){\n\t\t\t\t$title = str_replace('\"','',print_r($this->cfg,true));\n\t\t\t}\n\t\t\telse if ( isset($this->options['title']) ){\n\t\t\t\t$title = $this->options['title'];\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$title = '';\n\t\t\t}\n\t\t\t$s = '<label class=\"appui-form-label\" title=\"'.$title.'\">'.$this->label.'</label><div class=\"appui-form-field\">'.$s.'</div>';\n\t\t}\n\t\treturn $s;\n\t}",
"protected function getInputHTML($item){\n\n $id = \"input-\".mt_rand(1000,9999).'-'.$item->db_field;\n\n // Defaults\n if(!isset($item->size)) $item->size = 12;\n\n // HTML\n $return = '\n <div class=\"'.$this->styles['form-group'].' '.$this->styles['col'].'-'.$item->size.'\">\n <label \n for=\"'.$id.'\"\n title=\"'.($item->description->type === 'title' ? $item->description->value->{$this->language} : null) .'\">'.$item->title->{$this->language}.'</label>\n <input\n id=\"'.$id.'\"\n name=\"'.$item->db_field.'\"\n type=\"'.$item->subtype.'\"\n placeholder=\"'.$item->placeholder->{$this->language}.'\"\n value=\"'.$item->value.'\"\n class=\"'.$this->styles['form-control'].'\"\n '.($item->required ? 'required' : null) .'>\n </div>\n ';\n\n return trim(preg_replace('/\\s\\s+/', ' ', $return));\n\n }",
"protected\n\tfunction getInput()\n\t{\n\t\tPluginHelper::importPlugin(\"jevents\");\n\t\t$id = $this->id;\n\n\t\tif (version_compare(JVERSION, '3.3.0', '>='))\n\t\t{\n\t\t\t$res = Factory::getApplication()->triggerEvent('onEditMenuItem', array(&$this->data, &$this->value, $this->type, $this->name, $this->id, $this->form));\n\t\t}\n\n\t\tFactory::getDocument()->addStyleDeclaration('\n\t\t.control-group .controls, .control-group .controls > *,\n\t\t.control-group .controls .control-input, .control-group .controls .control-input > * {max-width:100%;}\n\t\t');\n\t\tJLoader::register('JEVHelper', JPATH_SITE . \"/components/com_jevents/libraries/helper.php\");\n\t\tJEVHelper::ConditionalFields($this->element, $this->form->getName());\n\n\t\tif (array_key_exists($id, $this->data))\n\t\t{\n\t\t\t$item = $this->data[$id];\n\t\t\tif (isset($item->html) && $item->html != \"\")\n\t\t\t\treturn $item->html;\n\t\t}\n\t\telse\n\t\t\treturn \"\";\n\n\t}",
"protected function getInput()\n\t{\n\t\t// helper getter\n\t\t$this->helper_getter = $this->getAttribute('helper_getter');\n\n\t\t// get the translatable condition\n\t\t$this->translate = $this->getAttribute('translate');\n\n\t\t// get the exclude key values\n\t\t$this->exclude = $this->getAttribute('exclude');\n\n\t\t// get the empty_option value\n\t\t$this->empty_option = $this->getAttribute('empty_option');\n\n\t\t// get the first_param value\n\t\t$this->first_param = $this->getAttribute('first_param');\n\n\t\t$html = array();\n\t\t$attr = '';\n\n\t\t// Initialize some field attributes.\n\t\t$attr .= !empty($this->class) ? ' class=\"' . $this->class . '\"' : '';\n\t\t$attr .= !empty($this->size) ? ' size=\"' . $this->size . '\"' : '';\n\t\t$attr .= $this->multiple ? ' multiple' : '';\n\t\t$attr .= $this->required ? ' required aria-required=\"true\"' : '';\n\t\t$attr .= $this->autofocus ? ' autofocus' : '';\n\n\t\t// To avoid user's confusion, readonly=\"true\" should imply disabled=\"true\".\n\t\tif ((string) $this->readonly == '1' || (string) $this->readonly == 'true' || (string) $this->disabled == '1'|| (string) $this->disabled == 'true')\n\t\t{\n\t\t\t$attr .= ' disabled=\"disabled\"';\n\t\t}\n\n\t\t// Initialize JavaScript field attributes.\n\t\t$attr .= $this->onchange ? ' onchange=\"' . $this->onchange . '\"' : '';\n\n\t\t// Get the field options.\n\t\t$options = (array) $this->getOptions();\n\n\t\t// Create a read-only list (no name) with hidden input(s) to store the value(s).\n\t\tif ((string) $this->readonly == '1' || (string) $this->readonly == 'true')\n\t\t{\n\t\t\t$html[] = JHtml::_('select.genericlist', $options, '', trim($attr), 'value', 'text', $this->value, $this->id);\n\n\t\t\t// E.g. form field type tag sends $this->value as array\n\t\t\tif ($this->multiple && is_array($this->value))\n\t\t\t{\n\t\t\t\tif (!count($this->value))\n\t\t\t\t{\n\t\t\t\t\t$this->value[] = '';\n\t\t\t\t}\n\n\t\t\t\tforeach ($this->value as $value)\n\t\t\t\t{\n\t\t\t\t\t$html[] = '<input type=\"hidden\" name=\"' . $this->name . '\" value=\"' . htmlspecialchars($value, ENT_COMPAT, 'UTF-8') . '\"/>';\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$html[] = '<input type=\"hidden\" name=\"' . $this->name . '\" value=\"' . htmlspecialchars($this->value, ENT_COMPAT, 'UTF-8') . '\"/>';\n\t\t\t}\n\t\t}\n\t\telse\n\t\t// Create a regular list passing the arguments in an array.\n\t\t{\n\t\t\t$listoptions = array();\n\t\t\t$listoptions['option.key'] = 'value';\n\t\t\t$listoptions['option.text'] = 'text';\n\t\t\t$listoptions['list.select'] = $this->value;\n\t\t\t$listoptions['id'] = $this->id;\n\t\t\t$listoptions['list.translate'] = false;\n\t\t\t$listoptions['option.attr'] = 'optionattr';\n\t\t\t$listoptions['list.attr'] = trim($attr);\n\n\t\t\t$html[] = JHtml::_('select.genericlist', $options, $this->name, $listoptions);\n\t\t}\n\n\t\treturn implode($html);\n\t}",
"public function renderInput()\n {\n $result = $this->renderHiddenInput();\n $result .= $this->renderFileInput();\n return $result;\n }",
"public function getForm(): string\n {\n return $this->html;\n }",
"public function get_input_content();",
"public function getInput()\n\t{\n\t\treturn $this->input;\n\t}",
"public function getInput()\r\n\t{\r\n\t\treturn $this->input;\r\n\t}",
"public function getInputField($field) {\n\t\t$return = '';\n\t\tswitch($field['htmltype']) {\n\t\t\tcase 'input': $return = \"<input type='text' name='{$field['name']}' value='\".\"{$this->get($field['name'])}' size='75'/>\";\n\t\t\t\tbreak; \n\t\t\tcase 'textarea': $return = \"<textarea name='{$field['name']}' cols='75' rows='5'>{$this->get($field['name'])}</textarea>\";\n\t\t\t\tbreak;\n\t\t\tcase 'select':\n\t\t\t\t$return = \"<select name='{$field['name']}'>\\n\";\n\t\t\t\tif (is_array($field['join'])) {\n\t\t\t\t\tforeach($field['join'] as $key=>$value) {\n\t\t\t\t\t\t$SELECTED = '';\n\t\t\t\t\t\tif ($this->get($field['name']) == $value)\n\t\t\t\t\t\t\t$SELECTED = 'SELECTED=\"SELECTED\"';\t\n\t\t\t\t\t\t$return .= '<option '.$SELECTED.' value=\"'.$value.'\">'.$key.'</option>'.\"\\n\";\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$obj = new $field['join']();\n\t\t\t\t\t$cannull = !(isset($field['notnull']) && ($field['notnull'] === true));\n\t\t\t\t\t$return .= $obj->getOptionList($this->get($field['name']), $cannull);\n\t\t\t\t}\n\t\t\t\t$return .= \"</select>\\n\";\n\t\t\t\tbreak;\n\t\t}\n\t\treturn $return;\n\t}",
"public function html(){\n\t\treturn '<div class=\"form-group\">'.$this->label.$this->input.'</div>';\n\t}",
"protected function getInput()\n\t{\n\t\tif ($this->form->getValue('id', 0) == 0)\n\t\t{\n\t\t\treturn '<span class=\"readonly\">' . Lang::txt('COM_MENUS_ITEM_FIELD_ORDERING_TEXT') . '</span>';\n\t\t}\n\n\t\treturn parent::getInput();\n\t}",
"protected function getInput()\n\t{\n\t\treturn '';\n\t}",
"public function get_html()\n\t{\n\t\tif ( empty($this->html) && $this->name ){\n\t\t\t\n\t\t\t$this->html .= '<'.$this->tag.' name=\"'.$this->name.'\"';\n\t\t\t\n\t\t\tif ( isset($this->id) ){\n\t\t\t\t$this->html .= ' id=\"'.$this->id.'\"';\n\t\t\t}\n\t\t\t\n\t\t\tif ( $this->tag === 'input' && isset($this->options['type']) ){\n\t\t\t\t$this->html .= ' type=\"'.$this->options['type'].'\"';\n\t\t\t\t\n\t\t\t\tif ( $this->options['type'] === 'text' || $this->options['type'] === 'number' || $this->options['type'] === 'password' || $this->options['type'] === 'email' ){\n\t\t\t\t\tif ( isset($this->options['maxlength']) && ( $this->options['maxlength'] > 0 ) && $this->options['maxlength'] <= 1000 ){\n\t\t\t\t\t\t$this->html .= ' maxlength=\"'.$this->options['maxlength'].'\"';\n\t\t\t\t\t}\n\t\t\t\t\tif ( isset($this->options['minlength']) && ( $this->options['minlength'] > 0 ) && $this->options['minlength'] <= 1000 && ( \n\t\t\t\t\t( isset($this->options['maxlength']) && $this->options['maxlength'] > $this->options['minlength'] ) || !isset($this->options['maxlength']) ) ){\n\t\t\t\t\t\t$this->html .= ' minlength=\"'.$this->options['minlength'].'\"';\n\t\t\t\t\t}\n\t\t\t\t\tif ( isset($this->options['size']) && ( $this->options['size'] > 0 ) && $this->options['size'] <= 100 ){\n\t\t\t\t\t\t$this->html .= ' size=\"'.$this->options['size'].'\"';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ( $this->options['type'] === 'checkbox' ){\n\t\t\t\t\tif ( !isset($this->options['value']) ){\n\t\t\t\t\t\t$this->options['value'] = 1;\n\t\t\t\t\t}\n\t\t\t\t\t$this->html .= ' value=\"'.htmlentities($this->options['value']).'\"';\n\t\t\t\t\tif ( $this->value == $this->options['value'] ){\n\t\t\t\t\t\t$this->html .= ' checked=\"checked\"';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if ( $this->options['type'] === 'radio' ){\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$this->html .= ' value=\"'.htmlentities($this->value).'\"';\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif ( isset($this->options['title']) ){\n\t\t\t\t$this->html .= ' title=\"'.$this->options['title'].'\"';\n\t\t\t}\n\t\t\t\n\t\t\t$class = '';\n\t\t\t\n\t\t\tif ( isset($this->options['cssclass']) ){\n\t\t\t\t$class .= $this->options['cssclass'].' ';\n\t\t\t}\n\n\t\t\tif ( $this->required ){\n\t\t\t\t$class .= 'required ';\n\t\t\t}\n\t\t\tif ( isset($this->options['email']) ){\n\t\t\t\t$class .= 'email ';\n\t\t\t}\n\t\t\tif ( isset($this->options['url']) ){\n\t\t\t\t$class .= 'url ';\n\t\t\t}\n\t\t\tif ( isset($this->options['number']) ){\n\t\t\t\t$class .= 'number ';\n\t\t\t}\n\t\t\tif ( isset($this->options['digits']) ){\n\t\t\t\t$class .= 'digits ';\n\t\t\t}\n\t\t\tif ( isset($this->options['creditcard']) ){\n\t\t\t\t$class .= 'creditcard ';\n\t\t\t}\n\t\t\t\n\t\t\tif ( !empty($class) ){\n\t\t\t\t$this->html .= ' class=\"'.trim($class).'\"';\n\t\t\t}\n\t\t\t\n\t\t\t$this->html .= '>';\n\t\t\t\n\t\t\tif ( $this->tag === 'select' || $this->tag === 'textarea' ){\n\t\t\t\t$this->html .= '</'.$this->tag.'>';\n\t\t\t}\n\t\t\t\n\t\t\tif ( isset($this->options['placeholder']) && strpos($this->options['placeholder'],'%s') !== false ){\n\t\t\t\t$this->html = sprintf($this->options['placeholder'], $this->html);\n\t\t\t}\n\t\t}\n\t\treturn $this->html;\n\t}",
"public function renderInput(): string\n {\n return FormFacade::textarea(\n $this->getKey(),\n $this->getInputValue(),\n $this->getInputAttributes(),\n )->toHtml();\n }",
"protected function getInput()\n {\n $return = array();\n $return[] = parent::getInput();\n\n if (!empty($this->value)) {\n $return[] = '<div style=\"margin: 1em 0 0 0;\">';\n $return[] = ' <a href=\"/administrator/index.php?option=com_templates&task=style.edit&id=' . $this->value . '\" target=\"_blank\" class=\"btn btn-primary\">' . JText::_('COM_SITEAREAS_TEMPLATE_STYLE_EDIT_LINK') . ' <span class=\"icon-out-2\" aria-hidden=\"true\"></span></a>';\n $return[] = '</div>';\n }\n\n return implode(\"\\n\", $return);\n }",
"private function get_input_field_html($name, $options) {\n\t\t$class_name = 'SpType' . ucfirst($options['type']);\n\t\treturn $class_name::getInput($name, $options);\n\t}",
"function getFormHTML()\n\t{\n\t\tstatic $id_num = 1000;\n\n\t\t$type = $this->type;\n\t\t$name = $this->name;\n\t\t$value = $this->_getTypeValue($this->type, $this->value);\n\t\t$default = $this->_getTypeValue($this->type, $this->default);\n\t\t$column_name = 'extra_vars' . $this->idx;\n\t\t$tmp_id = $column_name . '-' . $id_num++;\n\n\t\t$buff = array();\n\t\tswitch($type)\n\t\t{\n\t\t\t// Homepage\n\t\t\tcase 'homepage' :\n\t\t\t\t$buff[] = '<input type=\"text\" name=\"' . $column_name . '\" value=\"' . $value . '\" class=\"homepage\" />';\n\t\t\t\tbreak;\n\t\t\t// Email Address\n\t\t\tcase 'email_address' :\n\t\t\t\t$buff[] = '<input type=\"text\" name=\"' . $column_name . '\" value=\"' . $value . '\" class=\"email_address\" />';\n\t\t\t\tbreak;\n\t\t\t// Phone Number\n\t\t\tcase 'tel' :\n\t\t\t\t$buff[] = '<input type=\"text\" name=\"' . $column_name . '[]\" value=\"' . $value[0] . '\" size=\"4\" maxlength=\"4\" class=\"tel\" />';\n\t\t\t\t$buff[] = '<input type=\"text\" name=\"' . $column_name . '[]\" value=\"' . $value[1] . '\" size=\"4\" maxlength=\"4\" class=\"tel\" />';\n\t\t\t\t$buff[] = '<input type=\"text\" name=\"' . $column_name . '[]\" value=\"' . $value[2] . '\" size=\"4\" maxlength=\"4\" class=\"tel\" />';\n\t\t\t\tbreak;\n\t\t\t// textarea\n\t\t\tcase 'textarea' :\n\t\t\t\t$buff[] = '<textarea name=\"' . $column_name . '\" rows=\"8\" cols=\"42\">' . $value . '</textarea>';\n\t\t\t\tbreak;\n\t\t\t// multiple choice\n\t\t\tcase 'checkbox' :\n\t\t\t\t$buff[] = '<ul>';\n\t\t\t\tforeach($default as $v)\n\t\t\t\t{\n\t\t\t\t\t$checked = '';\n\t\t\t\t\tif($value && in_array(trim($v), $value))\n\t\t\t\t\t{\n\t\t\t\t\t\t$checked = ' checked=\"checked\"';\n\t\t\t\t\t}\n\n\t\t\t\t\t// Temporary ID for labeling\n\t\t\t\t\t$tmp_id = $column_name . '-' . $id_num++;\n\n\t\t\t\t\t$buff[] =' <li><input type=\"checkbox\" name=\"' . $column_name . '[]\" id=\"' . $tmp_id . '\" value=\"' . htmlspecialchars($v, ENT_COMPAT | ENT_HTML401, 'UTF-8', false) . '\" ' . $checked . ' /><label for=\"' . $tmp_id . '\">' . $v . '</label></li>';\n\t\t\t\t}\n\t\t\t\t$buff[] = '</ul>';\n\t\t\t\tbreak;\n\t\t\t// single choice\n\t\t\tcase 'select' :\n\t\t\t\t$buff[] = '<select name=\"' . $column_name . '\" class=\"select\">';\n\t\t\t\tforeach($default as $v)\n\t\t\t\t{\n\t\t\t\t\t$selected = '';\n\t\t\t\t\tif($value && in_array(trim($v), $value))\n\t\t\t\t\t{\n\t\t\t\t\t\t$selected = ' selected=\"selected\"';\n\t\t\t\t\t}\n\t\t\t\t\t$buff[] = ' <option value=\"' . $v . '\" ' . $selected . '>' . $v . '</option>';\n\t\t\t\t}\n\t\t\t\t$buff[] = '</select>';\n\t\t\t\tbreak;\n\t\t\t// radio\n\t\t\tcase 'radio' :\n\t\t\t\t$buff[] = '<ul>';\n\t\t\t\tforeach($default as $v)\n\t\t\t\t{\n\t\t\t\t\t$checked = '';\n\t\t\t\t\tif($value && in_array(trim($v), $value))\n\t\t\t\t\t{\n\t\t\t\t\t\t$checked = ' checked=\"checked\"';\n\t\t\t\t\t}\n\n\t\t\t\t\t// Temporary ID for labeling\n\t\t\t\t\t$tmp_id = $column_name . '-' . $id_num++;\n\n\t\t\t\t\t$buff[] = '<li><input type=\"radio\" name=\"' . $column_name . '\" id=\"' . $tmp_id . '\" ' . $checked . ' value=\"' . $v . '\" class=\"radio\" /><label for=\"' . $tmp_id . '\">' . $v . '</label></li>';\n\t\t\t\t}\n\t\t\t\t$buff[] = '</ul>';\n\t\t\t\tbreak;\n\t\t\t// date\n\t\t\tcase 'date' :\n\t\t\t\t// datepicker javascript plugin load\n\t\t\t\tContext::loadJavascriptPlugin('ui.datepicker');\n\n\t\t\t\t$buff[] = '<input type=\"hidden\" name=\"' . $column_name . '\" value=\"' . $value . '\" />'; \n\t\t\t\t$buff[] =\t'<input type=\"text\" id=\"date_' . $column_name . '\" value=\"' . zdate($value, 'Y-m-d') . '\" class=\"date\" />';\n\t\t\t\t$buff[] =\t'<input type=\"button\" value=\"' . Context::getLang('cmd_delete') . '\" class=\"btn\" id=\"dateRemover_' . $column_name . '\" />';\n\t\t\t\t$buff[] =\t'<script type=\"text/javascript\">';\n\t\t\t\t$buff[] = '//<![CDATA[';\n\t\t\t\t$buff[] =\t'(function($){';\n\t\t\t\t$buff[] =\t'$(function(){';\n\t\t\t\t$buff[] =\t' var option = { dateFormat: \"yy-mm-dd\", changeMonth:true, changeYear:true, gotoCurrent:false, yearRange:\\'-100:+10\\', onSelect:function(){';\n\t\t\t\t$buff[] =\t' $(this).prev(\\'input[type=\"hidden\"]\\').val(this.value.replace(/-/g,\"\"))}';\n\t\t\t\t$buff[] =\t' };';\n\t\t\t\t$buff[] =\t' $.extend(option,$.datepicker.regional[\\'' . Context::getLangType() . '\\']);';\n\t\t\t\t$buff[] =\t' $(\"#date_' . $column_name . '\").datepicker(option);';\n\t\t\t\t$buff[] =\t' $(\"#dateRemover_' . $column_name . '\").click(function(){';\n\t\t\t\t$buff[] =\t' $(this).siblings(\"input\").val(\"\");';\n\t\t\t\t$buff[] =\t' return false;';\n\t\t\t\t$buff[] =\t' })';\n\t\t\t\t$buff[] =\t'});';\n\t\t\t\t$buff[] =\t'})(jQuery);';\n\t\t\t\t$buff[] = '//]]>';\n\t\t\t\t$buff[] = '</script>';\n\t\t\t\tbreak;\n\t\t\t// address\n\t\t\tcase \"kr_zip\" :\n\t\t\t\tif(($oKrzipModel = getModel('krzip')) && method_exists($oKrzipModel , 'getKrzipCodeSearchHtml' ))\n\t\t\t\t{\n\t\t\t\t\t$buff[] = $oKrzipModel->getKrzipCodeSearchHtml($column_name, $value);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t// General text\n\t\t\tdefault :\n\t\t\t\t$buff[] =' <input type=\"text\" name=\"' . $column_name . '\" value=\"' . ($value ? $value : $default) . '\" class=\"text\" />';\n\t\t}\n\t\tif($this->desc)\n\t\t{\n\t\t\t$oModuleController = getController('module');\n\t\t\t$oModuleController->replaceDefinedLangCode($this->desc);\n\t\t\t$buff[] = '<p>' . htmlspecialchars($this->desc, ENT_COMPAT | ENT_HTML401, 'UTF-8', false) . '</p>';\n\t\t}\n\t\t\n\t\treturn join(PHP_EOL, $buff);\n\t}",
"protected function renderInput()\n {\n if ($this->hasModel()) {\n $input = Html::activeTextArea($this->model, $this->attribute, $this->options);\n } else {\n $input = Html::textArea($this->name, $this->value, $this->options);\n }\n Html::addCssClass($this->previewOptions, 'hidden');\n $preview = Html::tag('div', '', $this->previewOptions);\n return $input . \"\\n\" . $preview;\n }",
"public function render()\n {\n return view('dainsys_components::components.input-field-addon');\n }",
"function get_tag()\n {\n\t $id = 'id=\"'.$this->OP_[id]->get().'\"';\n\t $name='name=\"'.$this->OP_[name]->get().'\"';\n\t $value='value=\"'.$this->OP_[value]->get().'\"';\n\t $type='type=\"hidden\"';\n\t $my_value = \"<input $id $name $type $value>\";\n\t return $my_value;\n }",
"public function getInput()\n\t\t{\n\t\t\treturn $this->input;\n\t\t}",
"public function renderWidget()\n {\n if ($this->data !== null) {\n $this->htmlAttributes['value'] = $this->data;\n }\n\n // And to be sure to generate a proper html text input with the proper name...\n $this->htmlAttributes['type'] = $this->type;\n $this->htmlAttributes['name'] = $this->name;\n $this->htmlAttributes['id'] = $this->getId();\n\n $output = '<input ';\n\n $output .= $this->renderHtmlAttributes();\n\n $output .= '/>';\n\n return $output;\n }",
"public function getInputDisplayText()\n {\n return $this->_fields['InputDisplayText']['FieldValue'];\n }",
"public function getInput()\n {\n return $this->input;\n }",
"public function getInput()\n {\n return $this->input;\n }",
"public function getInput()\n {\n return $this->input;\n }",
"public function getInput()\n {\n return $this->input;\n }",
"public function getInput()\n {\n return $this->input;\n }",
"public function getFieldHtml()\n {\n $this->dateElement->setData([\n 'name' => $this->getHtmlId(),\n 'id' => $this->getHtmlId(),\n 'class' => $this->getHtmlClass(),\n 'value' => $this->getValue(),\n 'date_format' => $this->getDateFormat(),\n 'image' => $this->getViewFileUrl('Magento_Theme::calendar.png'),\n ]);\n return $this->dateElement->getHtml();\n }",
"public function getContentField()\n {\n $tocifier = self::getTocifier($this->owner);\n if (!$tocifier) {\n return $this->getOriginalContentField();\n }\n\n return $tocifier->getHTML();\n }",
"public function renderField() : string {\n $out = '<textarea ' .\n 'name=\"' . $this->name . '\" ' .\n 'id=\"' . $this->id . '\"';\n \n // Tag Attributes\n $out .= $this->renderTagAttributes();\n // Tag schließen\n $out .= '>';\n $out .= $this->value;\n $out .= '</textarea>';\n\n return $out;\n }",
"function render() {\n\t\tglobal $current_user, $user_identity;\n\n\t\t$r = '';\n\n\t\t$field_id = $this->get_attribute( 'id' );\n\t\t$field_type = $this->get_attribute( 'type' );\n\t\t$field_label = $this->get_attribute( 'label' );\n\t\t$field_required = $this->get_attribute( 'required' );\n\t\t$placeholder = $this->get_attribute( 'placeholder' );\n\t\t$field_placeholder = ( ! empty( $placeholder ) ) ? \"placeholder='\" . esc_attr( $placeholder ) . \"'\" : '';\n\n\t\tif ( isset( $_POST[$field_id] ) ) {\n\t\t\t$this->value = stripslashes( (string) $_POST[$field_id] );\n\t\t} elseif (\n\t\t\tis_user_logged_in()\n\t\t\t&& ( ( defined( 'IS_WPCOM' ) && IS_WPCOM )\n\t\t\t || true === apply_filters( 'jetpack_auto_fill_logged_in_user', false )\n\t\t\t)\n\t\t) {\n\t\t\t// Special defaults for logged-in users\n\t\t\tswitch ( $this->get_attribute( 'type' ) ) {\n\t\t\tcase 'email';\n\t\t\t\t$this->value = $current_user->data->user_email;\n\t\t\t\tbreak;\n\t\t\tcase 'name' :\n\t\t\t\t$this->value = $user_identity;\n\t\t\t\tbreak;\n\t\t\tcase 'url' :\n\t\t\t\t$this->value = $current_user->data->user_url;\n\t\t\t\tbreak;\n\t\t\tdefault :\n\t\t\t\t$this->value = $this->get_attribute( 'default' );\n\t\t\t}\n\t\t} else {\n\t\t\t$this->value = $this->get_attribute( 'default' );\n\t\t}\n\n\t\t$field_value = Grunion_Contact_Form_Plugin::strip_tags( $this->value );\n\t\t$field_label = Grunion_Contact_Form_Plugin::strip_tags( $field_label );\n\n\t\tswitch ( $field_type ) {\n\t\tcase 'email' :\n\t\t\t$r .= \"\\n<div>\\n\";\n\t\t\t$r .= \"\\t\\t<label for='\" . esc_attr( $field_id ) . \"' class='grunion-field-label email\" . ( $this->is_error() ? ' form-error' : '' ) . \"'>\" . esc_html( $field_label ) . ( $field_required ? '<span>' . __( \"(required)\", 'jetpack' ) . '</span>' : '' ) . \"</label>\\n\";\n\t\t\t$r .= \"\\t\\t<input type='email' name='\" . esc_attr( $field_id ) . \"' id='\" . esc_attr( $field_id ) . \"' value='\" . esc_attr( $field_value ) . \"' class='email' \" . $field_placeholder . \" \" . ( $field_required ? \"required aria-required='true'\" : \"\" ) . \"/>\\n\";\n\t\t\t$r .= \"\\t</div>\\n\";\n\t\t\tbreak;\n\t\tcase 'textarea' :\n\t\t\t$r .= \"\\n<div>\\n\";\n\t\t\t$r .= \"\\t\\t<label for='contact-form-comment-\" . esc_attr( $field_id ) . \"' class='grunion-field-label textarea\" . ( $this->is_error() ? ' form-error' : '' ) . \"'>\" . esc_html( $field_label ) . ( $field_required ? '<span>' . __( \"(required)\", 'jetpack' ) . '</span>' : '' ) . \"</label>\\n\";\n\t\t\t$r .= \"\\t\\t<textarea name='\" . esc_attr( $field_id ) . \"' id='contact-form-comment-\" . esc_attr( $field_id ) . \"' rows='20' \" . $field_placeholder . \" \" . ( $field_required ? \"required aria-required='true'\" : \"\" ) . \">\" . esc_textarea( $field_value ) . \"</textarea>\\n\";\n\t\t\t$r .= \"\\t</div>\\n\";\n\t\t\tbreak;\n\t\tcase 'radio' :\n\t\t\t$r .= \"\\t<div><label class='grunion-field-label\" . ( $this->is_error() ? ' form-error' : '' ) . \"'>\" . esc_html( $field_label ) . ( $field_required ? '<span>' . __( \"(required)\", 'jetpack' ) . '</span>' : '' ) . \"</label>\\n\";\n\t\t\tforeach ( $this->get_attribute( 'options' ) as $option ) {\n\t\t\t\t$option = Grunion_Contact_Form_Plugin::strip_tags( $option );\n\t\t\t\t$r .= \"\\t\\t<label class='grunion-radio-label radio\" . ( $this->is_error() ? ' form-error' : '' ) . \"'>\";\n\t\t\t\t$r .= \"<input type='radio' name='\" . esc_attr( $field_id ) . \"' value='\" . esc_attr( $option ) . \"' class='radio' \" . checked( $option, $field_value, false ) . \" \" . ( $field_required ? \"required aria-required='true'\" : \"\" ) . \"/> \";\n\t\t\t\t$r .= esc_html( $option ) . \"</label>\\n\";\n\t\t\t\t$r .= \"\\t\\t<div class='clear-form'></div>\\n\";\n\t\t\t}\n\t\t\t$r .= \"\\t\\t</div>\\n\";\n\t\t\tbreak;\n\t\tcase 'checkbox' :\n\t\t\t$r .= \"\\t<div>\\n\";\n\t\t\t$r .= \"\\t\\t<label class='grunion-field-label checkbox\" . ( $this->is_error() ? ' form-error' : '' ) . \"'>\\n\";\n\t\t\t$r .= \"\\t\\t<input type='checkbox' name='\" . esc_attr( $field_id ) . \"' value='\" . esc_attr__( 'Yes', 'jetpack' ) . \"' class='checkbox' \" . checked( (bool) $field_value, true, false ) . \" \" . ( $field_required ? \"required aria-required='true'\" : \"\" ) . \"/> \\n\";\n\t\t\t$r .= \"\\t\\t\" . esc_html( $field_label ) . ( $field_required ? '<span>'. __( \"(required)\", 'jetpack' ) . '</span>' : '' ) . \"</label>\\n\";\n\t\t\t$r .= \"\\t\\t<div class='clear-form'></div>\\n\";\n\t\t\t$r .= \"\\t</div>\\n\";\n\t\t\tbreak;\n\t\tcase 'select' :\n\t\t\t$r .= \"\\n<div>\\n\";\n\t\t\t$r .= \"\\t\\t<label for='\" . esc_attr( $field_id ) . \"' class='grunion-field-label select\" . ( $this->is_error() ? ' form-error' : '' ) . \"'>\" . esc_html( $field_label ) . ( $field_required ? '<span>'. __( \"(required)\", 'jetpack' ) . '</span>' : '' ) . \"</label>\\n\";\n\t\t\t$r .= \"\\t<select name='\" . esc_attr( $field_id ) . \"' id='\" . esc_attr( $field_id ) . \"' class='select' \" . ( $field_required ? \"required aria-required='true'\" : \"\" ) . \">\\n\";\n\t\t\tforeach ( $this->get_attribute( 'options' ) as $option ) {\n\t\t\t\t$option = Grunion_Contact_Form_Plugin::strip_tags( $option );\n\t\t\t\t$r .= \"\\t\\t<option\" . selected( $option, $field_value, false ) . \">\" . esc_html( $option ) . \"</option>\\n\";\n\t\t\t}\n\t\t\t$r .= \"\\t</select>\\n\";\n\t\t\t$r .= \"\\t</div>\\n\";\n\t\t\tbreak;\n\t\tcase 'date' :\n\t\t\t$r .= \"\\n<div>\\n\";\n\t\t\t$r .= \"\\t\\t<label for='\" . esc_attr( $field_id ) . \"' class='grunion-field-label \" . esc_attr( $field_type ) . ( $this->is_error() ? ' form-error' : '' ) . \"'>\" . esc_html( $field_label ) . ( $field_required ? '<span>' . __( \"(required)\", 'jetpack' ) . '</span>' : '' ) . \"</label>\\n\";\n\t\t\t$r .= \"\\t\\t<input type='date' name='\" . esc_attr( $field_id ) . \"' id='\" . esc_attr( $field_id ) . \"' value='\" . esc_attr( $field_value ) . \"' class='\" . esc_attr( $field_type ) . \"' \" . ( $field_required ? \"required aria-required='true'\" : \"\" ) . \"/>\\n\";\n\t\t\t$r .= \"\\t</div>\\n\";\n\n\t\t\twp_enqueue_script( 'grunion-frontend', plugins_url( 'js/grunion-frontend.js', __FILE__ ), array( 'jquery', 'jquery-ui-datepicker' ) );\n\t\t\tbreak;\n\t\tdefault : // text field\n\t\t\t// note that any unknown types will produce a text input, so we can use arbitrary type names to handle\n\t\t\t// input fields like name, email, url that require special validation or handling at POST\n\t\t\t$r .= \"\\n<div>\\n\";\n\t\t\t$r .= \"\\t\\t<label for='\" . esc_attr( $field_id ) . \"' class='grunion-field-label \" . esc_attr( $field_type ) . ( $this->is_error() ? ' form-error' : '' ) . \"'>\" . esc_html( $field_label ) . ( $field_required ? '<span>' . __( \"(required)\", 'jetpack' ) . '</span>' : '' ) . \"</label>\\n\";\n\t\t\t$r .= \"\\t\\t<input type='text' name='\" . esc_attr( $field_id ) . \"' id='\" . esc_attr( $field_id ) . \"' value='\" . esc_attr( $field_value ) . \"' class='\" . esc_attr( $field_type ) . \"' \" . $field_placeholder . \" \" . ( $field_required ? \"required aria-required='true'\" : \"\" ) . \"/>\\n\";\n\t\t\t$r .= \"\\t</div>\\n\";\n\t\t}\n\n\t\treturn apply_filters( 'grunion_contact_form_field_html', $r, $field_label, ( in_the_loop() ? get_the_ID() : null ) );\n\t}",
"function render_html_field($field, $settings) {\n\t// $field = (object) $field;\n\n\t// debug($field);\n\t$type = $settings[\"type\"];\n\t$name = $settings[\"name\"];\n\t$label = $settings['label'];\n\t$choices = $settings['choices'];\n\t$instructions = $settings['instructions'];\n\t$layout = isset($settings[\"layout\"]) ? $settings[\"layout\"] : \"os\";\n\t$value = is_string($field) ? $field : $field[$settings[\"name\"]];\n\t$unset = array(\"class\", \"default\", \"placeholder\", \"layout\", \"type\", \"choices\", \"instructions\");\n\n\t// set up defaults in the attrs array\n\t$attrs = array();\n\t$attrs['id'] = $settings['name'];\n\t$attrs['value'] = $value == \"\" && isset($settings['default']) ? $settings['default'] : $value;\n\t$value = $attrs['value'];\n\t$attrs['class'] = isset($settings['class']) ? $settings['class'] : \"\";\n\t$attrs['placeholder'] = isset($settings[\"placeholder\"]) ? $settings[\"placeholder\"] : $settings[\"label\"];\n\n\t// unset things we don't want showing up on the input class\n\tforeach ($unset as $k => $v) {unset($settings[$v]); }\n\n\tif ($type == \"wysiwyg\") {\n\t\t$attrs['class'] .= \" wysiwyg\";\n\t\tunset($attrs['value']);\n\t} elseif ($type == \"checkbox\") {\n\t\t$attrs['checked'] = isset($attrs['value']) && $attrs['value'] == 1 ? true : false;\n\t\t$attrs['value'] = \"1\";\n\t}\n\n\t// debug($attrs);\n\t// debug($settings);\n\n\t// now build input attribute string\n\t$attrs_array = array_merge($attrs, $settings);\n\t$attrs = array_map(function($key, $value) {\n\t\tif (gettype($value) == \"boolean\" && $value === true) {\n\t\t\treturn $key;\n\t\t} elseif (gettype($value) == \"string\") {\n\t\t\treturn $key.'=\"'.$value.'\"';\n\t\t}\n\t}, array_keys($attrs_array), array_values($attrs_array));\n\n\t$attrs = implode(' ', $attrs);\n\n\t// if (! $settings['disable_fieldset']) {\n\t// \t$layout .= \" fieldset\";\n\t// }\n\n\t?>\n\n\t<div class=\"field <?= $layout; ?>\">\n\t\t<div class=\"field_label\">\n\t\t\t<? if ($label) { ?>\n\t\t\t\t<label for=\"<?= $name; ?>\"><?= $label; ?></label>\n\t\t\t<? } ?>\n\t\t\t<? if ($instructions) { ?>\n\t\t\t\t<div class=\"field_instructions muted em\"><?= $instructions; ?></div>\n\t\t\t<? } ?>\n\t\t</div>\n\t\t<div class=\"field_value\">\n\t\t\t<? if ($type == \"select\") { \n\t\t\t\tif (gettype($value) != \"array\") {\n\t\t\t\t\t$value = array($value);\n\t\t\t\t}\n\n\t\t\t\t?>\n\t\t\t\t<select <?= $attrs; ?>>\n\t\t\t\t\t<option value=\"\" disabled selected>--Select</option>\n\t\t\t\t\t<?\n\t\t\t\t\tforeach ($choices as $key => $option) {\n\t\t\t\t\t\tif (is_array($option)) { ?>\n\t\t\t\t\t\t\t<optgroup label=\"<?= $key; ?>\">\n\t\t\t\t\t\t\t\t<? foreach ($option as $skey => $label) { ?>\n\t\t\t\t\t\t\t\t\t<option value=\"<?= $skey; ?>\" <? if (in_array($skey, $value) == true) {echo \"selected\"; } ?>><?= $label; ?></option>\n\t\t\t\t\t\t\t\t<? } ?>\n\t\t\t\t\t\t\t</optgroup>\n\t\t\t\t\t\t<? } else { ?>\n\t\t\t\t\t\t\t<option value=\"<?= $key; ?>\" <? if (in_array($key, $value) == true) {echo \"selected\"; } ?>><?= $option; ?></option>\n\t\t\t\t\t\t<? } ?>\n\t\t\t\t\t<? } ?>\n\t\t\t\t</select>\n\n\t\t\t<? } elseif ($type == \"textarea\") { ?>\n\t\t\t\t<textarea type=\"text\" rows=\"5\" <?= $attrs; ?>><?= $attrs_array['value']; ?></textarea>\n\t\t\t<? } elseif ($type == \"wysiwyg\") {\n\t\t\t\t?>\n\t\t\t\t<textarea name=\"<?= $name; ?>\" class=\"wysiwyg_input\" style=\"display: none\"><?= $value; ?></textarea>\n\t\t\t\t<div <?= $attrs; ?>><?= htmlspecialchars_decode($value); ?></div>\n\t\t\t<? } else { ?>\n\t\t\t\t<input type=\"<?= $type; ?>\" <?= $attrs; ?>>\n\t\t\t<? } ?>\n\t\t</div>\n\t</div>\n\n\n\t<?\n}",
"function Field() {\n\t\t$attributes = array(\n\t\t\t'class' => $this->extraClass(),\n\t\t\t'id' => $this->id()\n\t\t);\n\t\treturn $this->createTag(\n\t\t\t'label',\n\t\t\t$attributes,\n\t\t\t($this->getAllowHTML() ? $this->title : Convert::raw2xml($this->title))\n\t\t);\n\t}",
"public function getFieldHtml()\n {\n $this->dateElement->setData([\n 'extra_params' => $this->getHtmlExtraParams(),\n 'name' => $this->getHtmlId(),\n 'id' => $this->getHtmlId(),\n 'class' => $this->getHtmlClass(),\n 'value' => $this->getValue(),\n 'date_format' => $this->getDateFormat(),\n 'image' => $this->getViewFileUrl('Magento_Theme::calendar.png'),\n 'years_range' => '-120y:c+nn',\n 'max_date' => '-1d',\n 'change_month' => 'true',\n 'change_year' => 'true',\n 'show_on' => 'both',\n 'first_day' => $this->getFirstDay()\n ]);\n\n return $this->dateElement->getHtml();\n }",
"public function getInputContents()\n {\n return $this->contents;\n }",
"public function getInputfields() {\n\n\t\t// get module getInputfields set config class\n \t$inputfields = parent::getInputfields();\n\n\t\t// get InputfieldText module\n \t$f = $this->modules->get('InputfieldText');\n \t$f->attr('name', 'findStr');\n \t$f->label = 'Find in text';\n\t\t$f->description = 'Add a word or pattern to find and replace within your text.';\n\n\t\t// add User role input to form config\n\t\t$inputfields->add($f);\n\n\n\t\t// get new InputfieldText module\n\t\t$f = $this->modules->get('InputfieldText');\n\t $f->attr('name', 'replaceStr');\n\t $f->label = 'Replace text';\n\t\t$f->description = 'text to show on the front end.';\n\n\t\t// add Page redirect input to form config\n\t $inputfields->add($f);\n\n\t\t// return module config inputs\n\t return $inputfields;\n \t}",
"public function getInput()\n {\n return $this->_input;\n }",
"function Field() {\n\t\tif($this->getConfig('dmyfields')) {\n\t\t\t// values\n\t\t\t$valArr = ($this->valueObj) ? $this->valueObj->toArray() : null;\n\n\t\t\t// fields\n\t\t\t$fieldDay = new NumericField($this->name . '[day]', false, ($valArr) ? $valArr['day'] : null);\n\t\t\t$fieldDay->addExtraClass('day');\n\t\t\t$fieldDay->setMaxLength(2);\n\t\t\t$fieldMonth = new NumericField($this->name . '[month]', false, ($valArr) ? $valArr['month'] : null);\n\t\t\t$fieldMonth->addExtraClass('month');\n\t\t\t$fieldMonth->setMaxLength(2);\n\t\t\t$fieldYear = new NumericField($this->name . '[year]', false, ($valArr) ? $valArr['year'] : null);\n\t\t\t$fieldYear->addExtraClass('year');\n\t\t\t$fieldYear->setMaxLength(4);\n\t\t\t\n\t\t\t// order fields depending on format\n\t\t\t$sep = $this->getConfig('dmyseparator');\n\t\t\t$format = $this->getConfig('dateformat');\n\t\t\t$fields = array();\n\t\t\t$fields[stripos($format, 'd')] = $fieldDay->Field();\n\t\t\t$fields[stripos($format, 'm')] = $fieldMonth->Field();\n\t\t\t$fields[stripos($format, 'y')] = $fieldYear->Field();\n\t\t\tksort($fields);\n\t\t\t$html = implode($sep, $fields);\n\t\t} \n\t\t// Default text input field\n\t\telse {\n\t\t\t$html = parent::Field();\n\t\t}\n\t\t\n\t\treturn $html;\n\t}",
"public function display()\n {\n $output = \"\";\n\n // Ouverture\n /// ID HTML\n $openId = $this->getAttr('container_id');\n /// Classes HTML\n $openClass = [];\n $openClass[] = 'tiFyForm-FieldContainer';\n $openClass[] = 'tiFyForm-FieldContainer--' . $this->getType();\n $openClass[] = 'tiFyForm-FieldContainer--' . $this->getSlug();\n if ($this->getErrors()) :\n $openClass[] = 'tiFyForm-FieldContainer--error';\n endif;\n $openClass[] = $this->getAttr('container_class');\n if ($this->getAttr('required')) :\n $openClass[] = 'tiFyForm-FieldContainer--required';\n endif;\n $output .= $this->form()\n ->factory()\n ->fieldOpen($this, $openId, join(' ', $openClass));\n\n // Contenu du champ\n $output .= $this->type()->_display();\n\n // Fermeture\n $output .= $this->form()->factory()->fieldClose($this);\n\n return $output;\n }",
"public function markup(): string;",
"public function renderTag(InputField $field){\n\t\tif(!isset($field->attribs['class'])){\n\t\t\t$field->attribs['class'] = \"\";\n\t\t}\n\t\tif(!isset($field->attribs['type']) && !empty($this->attribType)){\n\t\t\t$field->attribs['type'] = $this->attribType;\n\t\t}\n\t\tif(!is_null($field->getHideInUrl())){\n\t\t\t$field->attribs['data-hide-in-url'] = $field->getHideInUrl();\n\t\t}\n\t\tif(!empty($field->getCascadeTo())){\n\t\t\t$field->attribs['class'] = \"cascade \".$field->attribs['class'];\n\t\t}\n\t\t$field->attribs['class'] = \"inputter \".$this->settings['namespace'].\" \".$field->attribs['class'];\n\n\t\t// Create string of all the attributes to be inserted into the HTML tag\n\t\t$attributes = \"\";\n\t\t$attributes .= \"id='\".$field->getId().\"' \";\n\t\t$attributes .= \"name='\".$field->getName().\"' \";\n\t\t$attributes .= \"data-name='\".$field->getName().\"' \";\n\t\t$attributes .= \"data-type='\".$field->getType().\"' \";\n\t\tforeach($field->attribs as $attrName => $attrValue){\n\t\t\t$attributes .= $attrName.\"='\".$attrValue.\"' \";\n\t\t}\n\n\t\t$tag = \"\";\n\t\t$numTags = 1;\n\n\t\t// Get number of tags if radio/checkbox\n\t\tif($field->getType() == \"radio\" || $field->getType() == \"checkbox\"){\n\t\t\t$numTags = count($field->contents);\n\t\t}\n\n\t\t// Loop through tag creation\n\t\tfor($i = 0; $i < $numTags; $i++){\n\t\t\t$tempTag = \"<\".$field->getTag().\" \".$attributes.\"></\".$field->getTag().\">\";\n\n\t\t\t// Add a suffix number to the tag's ID if there is more than one tag (radio/checkbox)\n\t\t\tif($numTags > 1){\n\t\t\t\t$tempTag = str_replace(\"id='\".$field->id.\"'\", \"id='\".$field->id.$i.\"'\", $tempTag);\n\t\t\t}\n\n\t\t\t$tag .= $tempTag;\n\t\t}\n\n\t\treturn $tag;\n\t}",
"public function render()\n {\n return view('components.form.input');\n }",
"public function getInput()\n\t{\n\t\t$a = ' <a style=\"float: left; margin-left: 10px;\" class=\"akmarkdown-help-button btn btn-small\" href=\"http://softwaremaniacs.org/media/soft/highlight/test.html\" target=\"_blank\">' . JText::_('JHELP') . '</a>';\n\n\t\treturn '<div class=\"akmarkdown-help-wrap pull-left fltlft\">' . parent::getInput() . '</div>' . $a;\n\t}",
"protected function getInput()\n\t{\n\t\tif (empty($this->layout))\n\t\t{\n\t\t\tthrow new \\UnexpectedValueException(sprintf('%s has no layout assigned.', $this->name));\n\t\t}\n\n\t\treturn $this->getRenderer($this->layout)->render($this->getLayoutData());\n\n\t}",
"function acf_get_text_input($attrs = array())\n{\n}",
"public function getHTML() {\t\n\t\t$html = '';\n\t\tif ($this->type != 'title') $html.= '<p>'.\"\\n\";\n\t\tif ($this->type != 'info' && $this->type != 'system' && $this->type != 'title') \n\t\t\t{\t\t\t\n\t\t\t$html.= '<label id=\"label_for_'. $this->name . '\" name=\"label_for_'. $this->name . '\" for=\"'. $this->name . '\">';\n\t\t\t// special check for files item\n\t\t\tif ($this->type == 'file')\n\t\t\t\t{\n\t\t\t\tif (file_exists($_SERVER['DOCUMENT_ROOT'].'/uploads/' . $this->name))\n\t\t\t\t\t{\n\t\t\t\t\t$html.= '<a href = \"/uploads/'. $this->name .'\">'.$this->label.'</a> \n\t\t\t\t\t\t(<a href=\"javascript:void Messi.ask(\\''.DELETE.' ' .$this->name.' ?\\', \n\t\t\t\t\t\tfunction(val) { if(val==\\'Y\\') formSubmit(\\'delete\\',\\'' . $this->name . '\\');});\">'.DELETE.'</a>)';\n\t\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t$html.= $this->label.' ('.NONE.')';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\telse\n\t\t\t\t{\n\t\t\t\t$html.= $this->label;\n\t\t\t\t}\n\t\t\t$html.= '</label>'.\"\\n\";\n\t\t\t}\n\t\t// add dependence of the item for js managing in user interface\n\t\tif ($this->depend != 'none' or $this->depend != '') {\n\t\t\t$html.= '<input type=\"hidden\" id=\"dependance_for_'. $this->name . '\" value=\"'. $this->depend . '\" />'.\"\\n\";\n\t\t}\t\n\t\t$html.= '<input type=\"hidden\" id=\"title_for_'. $this->name . '\" value=\"'. $this->title . '\" />'.\"\\n\";\n\t\tswitch ($this->type)\n\t\t\t{\n\t\t\tcase 'text' : \n\t\t\t\t$html.= '<input id=\"'. $this->name . '\" name=\"'. $this->name . '\" value=\"'. $this->value . '\" \n\t\t\t\t\tonchange=\"display_dependance();\" />'.\"\\n\";\n\t\t\t\tbreak;\n\n\t\t\tcase 'password' : \n\t\t\t\t$html.= '<input type=\"password\" id=\"'. $this->name . '\" name=\"'. $this->name . '\" value=\"'. $this->value . '\" \n\t\t\t\t\tonchange=\"display_dependance();\" />'.\"\\n\";\n\t\t\t\tbreak;\n\n\t\t\tcase 'checkbox' : \n\t\t\t\t$html.= '<input type=\"checkbox\" id=\"'. $this->name . '\" name=\"'. $this->name . '\"' . ( ($this->value == 'on') ? \" \n\t\t\t\t\tchecked \" : \"\") . ' onchange=\"display_dependance();\" />'.\"\\n\";\n\t\t\t\tbreak;\n\n\t\t\tcase 'file' : \n\t\t\t\t$html.= '<input type=\"file\" id=\"'. $this->name . '\" name=\"'. $this->name . '\" value=\"'. $this->value . '\" />'.\"\\n\";\n\t\t\t\tbreak;\n\n\t\t\tcase 'select' :\n\t\t\t\t$html.= '<select id=\"'. $this->name . '\" name=\"'. $this->name . '\" onchange=\"display_dependance();\" >'.\"\\n\";\n\t\t\t\t$valuesPossible = explode(',',$this->values);\n\t\t\t\tforeach ($valuesPossible as $valuePossible){\n\t\t\t\t\t$html.= '<option value=\"'. $valuePossible . '\" ' . (($valuePossible == $this->value) ? \" selected \" : \"\") . '>'.\n\t\t\t\t\t(($valuePossible == \"none\") ? NONE : $valuePossible) . '</option>'.\"\\n\";\n\t\t\t\t\t}\n\t\t\t\t$html.= '</select><div style=\"clear:both\"></div>'.\"\\n\";\n\t\t\t\tbreak; \n\n\t\t\tcase 'title' : \n\t\t\t\t$html.= \"\\n\". '<h2>'.$this->label.'</h2><hr />'.\"\\n\\n\";\t\t\t\n\t\t\t\tbreak;\n\n\t\t\t// system action items\n\t\t\tcase 'system' : \n\t\t\t\t// a system item will render a button that submit the form with the configured action name in the config-map.php\n\t\t\t\t$html.= '<label></label><input class=\"button\" type=\"button\" id=\"'. $this->name . '\" name=\"'. $this->name . '\" value=\"'.$this->label.'\" \n\t\t\t\tonclick=\"new Messi(\\''.addslashes($this->help).'\\', {\n\t\t\t\t\ttitle: \\''.addslashes($this->label).'?\\', \n\t\t\t\t\tmodal: true, buttons: [{id: 0, label: \\''.YES.'\\', val: \\'Y\\'}, {id: 1, label: \\''.NO.'\\', val: \\'N\\'}], \n\t\t\t\t\tcallback: function(val) { if(val==\\'Y\\') {openTerminal();formSubmit(\\''.$this->values.'\\');}}});\" />';\n\t\t\t\tbreak;\n\n\t\t\tcase 'html' : \n\t\t\t\t// this is only arbitrary html code to display\n\t\t\t\t$html.= $this->value;\t\t\t\n\t\t\t\tbreak;\n\n\t\t\t/**\n\t\t\t * HERE YOU CAN ADD THE TYPE RENDERER YOU NEED\n\t\t\t *\n\t\t\t * case 'YOUR_TYPE' : \n\t\t\t *\t$html.= 'ANY_HTML_CODE_TO_RENDER';\n\t\t\t *\tbreak;\n\t\t\t */\n\n\t\t\tdefault : \n\t\t\t\t$html.= '<b>'.NO_METHOD_TO_RENDER_THIS_ITEM .'</b><br />Item : '.$this->name. '<br />Type : '.$this->type. '<br />'.\"\\n\"; \n\t\t\t\tbreak;\n\t\t\t\n\t\t\t}\n\t\tif ($this->type != 'title') $html.= '</p>'.\"\\n\"; \t\t\n\t\treturn $html;\n\t}",
"protected function renderInput()\n {\n Html::addCssClass($this->options, 'form-control');\n if (!empty($this->options['disabled'])) {\n Html::addCssClass($this->addonOptions, 'disabled-addon');\n }\n if (ArrayHelper::getValue($this->pluginOptions, 'template', true) === false) {\n if (isset($this->size)) {\n Html::addCssClass($this->options, 'input-' . $this->size);\n Html::addCssClass($this->addonOptions, 'inline-addon inline-addon-' . $this->size);\n } else {\n Html::addCssClass($this->addonOptions, 'inline-addon');\n }\n return $this->getInput('textInput') . Html::tag('span', $this->addon, $this->addonOptions);\n }\n Html::addCssClass($this->containerOptions, 'input-group');\n $asButton = ArrayHelper::remove($this->addonOptions, 'asButton', false);\n $buttonOptions = ArrayHelper::remove($this->addonOptions, 'buttonOptions', []);\n if ($asButton) {\n Html::addCssClass($this->addonOptions, 'input-group-btn picker');\n $buttonOptions['type'] = 'button';\n if (empty($buttonOptions['class'])) {\n Html::addCssClass($buttonOptions, 'btn btn-default');\n }\n $content = Html::button($this->addon, $buttonOptions);\n } else {\n Html::addCssClass($this->addonOptions, 'input-group-addon picker');\n $content = $this->addon;\n }\n $addon = Html::tag('span', $content, $this->addonOptions);\n if (isset($this->size)) {\n Html::addCssClass($this->containerOptions, 'input-group-' . $this->size);\n }\n return $this->getInput('textInput') . $addon;\n }",
"public function formInput()\n {\n return \\Form::input('email', $this->formSlug, $this->value);\n }",
"public function getInputHtml($field, $value = null) \n\t{\n\n\t $theField = craft()->fields->getFieldById($field->fieldId);\n\t $fieldType = $theField->getFieldType();\n\n\t $requiredField = $field->required; \n\t $theField->required = $requiredField; \n\n\t $attributes \t\t\t= $theField->attributes;\n\t $pluginSettings \t= craft()->plugins->getPlugin('FormBuilder2')->getSettings(); // DEPRICATE\n\n\t craft()->path->setTemplatesPath(craft()->path->getPluginsPath());\n\n\t $templatePath = craft()->path->getPluginsPath() . 'plugins/formbuilder2/templates/inputs/';\n\t $customTemplatePath = craft()->path->getPluginsPath() . 'formbuilder2/templates/custom/inputs/';\n\t $extension = '.twig';\n\n\t if (isset($attributes['settings']['placeholder'])) { $varPlaceholder = $attributes['settings']['placeholder']; } else { $varPlaceholder = null; }\n\t if (isset($attributes['settings']['options'])) { $varOptions = $attributes['settings']['options']; } else { $varOptions = null; }\n\t if (isset($attributes['settings']['values'])) { $varValues = $attributes['settings']['values']; } else { $varValues = null; }\n\t if (isset($attributes['settings']['default'])) { $varOn = $attributes['settings']['default']; } else { $varOn = null; }\n\t if (isset($attributes['settings']['checked'])) { $varChecked = $attributes['settings']['checked']; } else { $varChecked = null; }\n\t if (isset($attributes['settings']['minuteIncrement'])) { $varMinuteIncrement = $attributes['settings']['minuteIncrement']; } else { $varMinuteIncrement = null; }\n\t if (isset($attributes['settings']['showTime'])) { $varShowTime = $attributes['settings']['showTime']; } else { $varShowTime = null; }\n\t if (isset($attributes['settings']['showDate'])) { $varShowDate = $attributes['settings']['showDate']; } else { $varShowDate = null; }\n\t if (isset($attributes['settings']['min'])) { $varMin = $attributes['settings']['min']; } else { $varMin = null; }\n\t if (isset($attributes['settings']['max'])) { $varMax = $attributes['settings']['max']; } else { $varMax = null; }\n\n\t $variables = [\n\t \t'type' \t\t\t\t\t=> $attributes['type'],\n\t \t'label' \t\t\t\t\t=> $attributes['name'],\n\t \t'handle' \t\t\t\t=> $attributes['handle'],\n\t \t'instructions' \t=> $attributes['instructions'],\n\t \t'placeholder' \t\t=> $varPlaceholder,\n\t \t'options' \t\t\t\t=> $varOptions,\n\t \t'value' \t\t\t\t => null,\n\t \t'values' \t\t\t\t=> $varValues,\n\t \t'on'\t\t \t\t\t\t=> $varOn,\n\t \t'checked'\t\t \t\t=> $varChecked,\n\t \t'minuteIncrement' => $varMinuteIncrement,\n\t \t'showTime'\t\t\t \t=> $varShowTime,\n\t \t'showDate'\t\t\t \t=> $varShowDate,\n\t \t'min' \t\t\t\t\t\t=> $varMin,\n\t \t'max' \t\t\t\t\t\t=> $varMax,\n\t \t'requiredJs'\t\t\t=> null,\n\t \t'required'\t \t\t=> $theField->required\n\t ];\n\n\t $html = '';\n\n\t switch ($theField->type) {\n\t case \"PlainText\":\n\t \tif ($attributes['settings']['multiline']) {\n\t \t if (IOHelper::fileExists($customTemplatePath . 'textarea' . $extension)) {\n\t\t \t$html = craft()->templates->render('formbuilder2/templates/custom/inputs/textarea', $variables);\n\t \t } else {\n\t\t \t$html = craft()->templates->render('formbuilder2/templates/inputs/textarea', $variables);\n\t \t\t}\n\t\t } else {\n\t \t if (IOHelper::fileExists($customTemplatePath . 'text' . $extension)) {\n\t\t \t$html = craft()->templates->render('formbuilder2/templates/custom/inputs/text', $variables);\n\t \t } else {\n\t\t \t$html = craft()->templates->render('formbuilder2/templates/inputs/text', $variables);\n\t\t \t}\n\t\t }\n\t break;\n\t case \"Checkboxes\":\n\t \tif (IOHelper::fileExists($customTemplatePath . 'checkbox' . $extension)) {\n\t \t$html = craft()->templates->render('formbuilder2/templates/custom/inputs/checkbox', $variables);\n \t } else {\n\t \t$html = craft()->templates->render('formbuilder2/templates/inputs/checkbox', $variables);\n\t \t}\n\t break;\n\t case \"RadioButtons\":\n\t \tif (IOHelper::fileExists($customTemplatePath . 'radio' . $extension)) {\n\t \t$html = craft()->templates->render('formbuilder2/templates/custom/inputs/radio', $variables);\n \t } else {\n\t \t$html = craft()->templates->render('formbuilder2/templates/inputs/radio', $variables);\n\t \t}\n\t break;\n\t case \"Dropdown\":\n\t \tif (IOHelper::fileExists($customTemplatePath . 'select' . $extension)) {\n\t \t$html = craft()->templates->render('formbuilder2/templates/custom/inputs/select', $variables);\n \t } else {\n\t \t$html = craft()->templates->render('formbuilder2/templates/inputs/select', $variables);\n\t \t}\n\t break;\n\t case \"MultiSelect\":\n\t \tif (IOHelper::fileExists($customTemplatePath . 'select' . $extension)) {\n\t \t$html = craft()->templates->render('formbuilder2/templates/custom/inputs/multiselect', $variables);\n \t } else {\n\t \t$html = craft()->templates->render('formbuilder2/templates/inputs/multiselect', $variables);\n\t \t}\n\t break;\n\t case \"RichText\":\n\t \t$variables['requiredJs'] = 'redactor';\n\t \tif (IOHelper::fileExists($customTemplatePath . 'richtext' . $extension)) {\n\t \t$html = craft()->templates->render('formbuilder2/templates/custom/inputs/richtext', $variables);\n \t } else {\n\t \t$html = craft()->templates->render('formbuilder2/templates/inputs/richtext', $variables);\n\t \t}\n\t break;\n\t case \"Lightswitch\":\n\t \tif (IOHelper::fileExists($customTemplatePath . 'lightswitch' . $extension)) {\n\t \t$html = craft()->templates->render('formbuilder2/templates/custom/inputs/lightswitch', $variables);\n \t } else {\n\t \t$html = craft()->templates->render('formbuilder2/templates/inputs/lightswitch', $variables);\n\t \t}\n\t break;\n\t case \"Color\":\n\t \t$variables['value'] = '#000000';\n\t \t$variables['requiredJs'] = 'colorpicker';\n\t \tif (IOHelper::fileExists($customTemplatePath . 'color' . $extension)) {\n\t \t$html = craft()->templates->render('formbuilder2/templates/custom/inputs/color', $variables);\n \t } else {\n\t \t$html = craft()->templates->render('formbuilder2/templates/inputs/color', $variables);\n\t \t}\n\t break;\n\t case \"Date\":\n\t \t$variables['requiredJs'] = 'dateandtime';\n\t \tif (IOHelper::fileExists($customTemplatePath . 'datetime' . $extension)) {\n\t \t$html = craft()->templates->render('formbuilder2/templates/custom/inputs/datetime', $variables);\n \t } else {\n\t \t$html = craft()->templates->render('formbuilder2/templates/inputs/datetime', $variables);\n\t \t}\n\t break;\n\t case \"Number\":\n\t \t$variables['value'] = craft()->numberFormatter->formatDecimal($attributes['settings']['decimals'], false);\n\t \tif (IOHelper::fileExists($customTemplatePath . 'number' . $extension)) {\n\t \t$html = craft()->templates->render('formbuilder2/templates/custom/inputs/number', $variables);\n \t } else {\n\t \t$html = craft()->templates->render('formbuilder2/templates/inputs/number', $variables);\n\t \t}\n\t break;\n\t case \"Assets\":\n\t if (IOHelper::fileExists($customTemplatePath . 'file' . $extension)) {\n\t \t$html = craft()->templates->render('formbuilder2/templates/custom/inputs/file', $variables);\n \t } else {\n\t \t$html = craft()->templates->render('formbuilder2/templates/inputs/file', $variables);\n\t \t}\n\t break;\n\t }\n\n\t return $html;\n\t}",
"function getWidget() {\n // just override the template being used.\n $bHasErrors = false; \n \n require_once(KT_LIB_DIR . \"/documentmanagement/MDTree.inc\");\n \n $fieldTree = new MDTree();\n $fieldTree->buildForField($this->iFieldId);\n $fieldTree->setActiveItem($this->value);\n return $fieldTree->_evilTreeRenderer($fieldTree, $this->sName); \n }",
"public function render_text_field( array $attr ) {\n ?>\n <tr>\n <td class=\"first\"><label for=\"<?php echo esc_attr( $attr['id'] ); ?>\"><?php echo esc_attr( $attr['label'] ); ?></label></td>\n <td><input type=\"text\" name=\"meta_input[<?php echo esc_attr( $attr['name'] ); ?>]\" size=\"<?php echo esc_attr( $attr['size'] ); ?>\" value=\"<?php echo esc_attr( $attr['value'] ); ?>\" id=\"<?php echo esc_attr( $attr['name'] ); ?>\"></td>\n </tr>\n <?php\n }",
"function getInputField($fieldName, $fieldConfig, $fieldValue = '') {\n\t\t$content = '';\n\t\tswitch (strtolower($fieldConfig['type'])) {\n\t\t\tcase 'select':\n\t\t\t\t$content = $this->getSelectInputField($fieldName, $fieldConfig, $fieldValue);\n\t\t\tbreak;\n\t\t\tcase 'static_info_tables':\n\t\t\t\t$selected = $fieldValue != '' ? $fieldValue : $fieldConfig['default'];\n\t\t\t\t$content = $this->staticInfo->buildStaticInfoSelector(\n\t\t\t\t\t$fieldConfig['field'],\n\t\t\t\t\t$this->prefixId . '[' . $fieldName . ']',\n\t\t\t\t\t$fieldConfig['cssClass'],\n\t\t\t\t\t$selected,\n\t\t\t\t\t'',\n\t\t\t\t\t'',\n\t\t\t\t\t'',\n\t\t\t\t\t'',\n\t\t\t\t\t$fieldConfig['select'],\n\t\t\t\t\t$GLOBALS['TSFE']->tmpl->setup['config.']['language']\n\t\t\t\t);\n\t\t\tbreak;\n\t\t\tcase 'check':\n\t\t\t\t$content = $this->getCheckboxInputField($fieldName, $fieldConfig, $fieldValue);\n\t\t\tbreak;\n\t\t\tcase 'single':\n\t\t\tdefault:\n\t\t\t\t$content = $this->getSingleInputField($fieldName, $fieldConfig, $fieldValue);\n\t\t\tbreak;\n\t\t}\n\n\t\t/** * Hook for processing the content\n\t\t*/\n\t\t$hookObjectsArr = array();\n\t\tif (is_array ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/pi2/class.tx_commerce_pi2.php']['getInputField'])) {\n\t\t\tforeach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['commerce/pi2/class.tx_commerce_pi2.php']['getInputField'] as $classRef) {\n\t\t\t\t$hookObjectsArr[] = &t3lib_div::getUserObj($classRef);\n\t\t\t}\n\t\t}\n\t\tforeach($hookObjectsArr as $hookObj) {\n\t\t\tif (method_exists($hookObj, 'postGetInputField')) {\n\t\t\t\t$content = $hookObj->postGetInputField($content, $fieldName, $fieldConfig, $fieldValue, $this);\n\t\t\t}\n\t\t}\n\n\t\treturn $content;\n\t}",
"public function getDataInputField();",
"function render_field( $field ) { ?>\n <input type=\"text\" value=\"<?php echo esc_attr( $field[ 'value' ] ); ?>\" id=\"<?php echo esc_attr( $field[ 'id' ] ); ?>\" name=\"<?php echo esc_attr( $field[ 'name' ] ); ?>\" class=\"rhicomoon-select-field <?php echo esc_attr( $field[ 'class' ] ); ?>\" data-json-url=\"<?php echo esc_attr( $field[ 'json_url' ] ); ?>\"/>\n <?php }",
"public function getInput(): string\n {\n return $this->input;\n }",
"public function getInput() {\n return $this->input;\n }",
"public function getInput() {\n return $this->input;\n }",
"public function getFormInputFiller()\n {\n return $this->formInputFiller;\n }",
"public static function get_input_fields()\n {\n }",
"public static function get_input_fields()\n {\n }",
"public static function get_input_fields()\n {\n }",
"public static function get_input_fields()\n {\n }",
"public static function get_input_fields()\n {\n }",
"public static function get_input_fields()\n {\n }",
"public static function get_input_fields()\n {\n }",
"public static function get_input_fields()\n {\n }",
"public static function get_input_fields()\n {\n }",
"public static function get_input_fields()\n {\n }",
"public static function get_input_fields()\n {\n }",
"public static function get_input_fields()\n {\n }",
"public static function get_input_fields()\n {\n }",
"public function doRender(){\r\n\t\t$label = ($this->label != '') ? Label::get($this)->doRender() : '';\r\n\r\n\t\treturn\r\n\t\t\t '<div class=\"'.$this->printWrapperClasses().'\">'\r\n\t\t\t\t.$label\r\n\t\t\t\t.'<div class=\"'.parent::WIDGETCLASS.'\">'\r\n\t\t\t\t\t.'<input'\r\n\t\t\t\t\t\t.$this->printId()\r\n\t\t\t\t\t\t.$this->printName()\r\n\t\t\t\t\t\t.' type=\"file\"'\r\n\t\t\t\t\t\t.$this->printTitle()\r\n\t\t\t\t\t\t.$this->printAccept()\r\n\t\t\t\t\t\t.$this->printSize()\r\n\t\t\t\t\t\t.$this->printMaxLength()\r\n\t\t\t\t\t\t.$this->printCssClasses()\r\n\t\t\t\t\t\t.$this->printJavascriptEventHandler()\r\n\t\t\t\t\t\t.$this->printTabindex()\r\n\t\t\t\t\t\t.$this->printReadonly()\r\n\t\t\t\t\t\t.$this->printDisabled()\r\n\t\t\t\t\t\t.$this->masterForm->printSlash()\r\n\t\t\t\t\t.'>'\r\n\t\t\t\t.'</div>'\r\n\t\t\t\t.$this->masterForm->printFloatBreak()\r\n\t\t\t.'</div>'\r\n\t\t;\r\n\t}",
"function field($name, $value='') {\n\t\t$str = '<div class=\"field is-size-6\"><label class=\"label\" for=\"'.$name.'-input\">'.$name.'</label>';\n\t\t$str .= '<div class=\"control\"><input class=\"input\" name=\"'.$name.'\" id=\"'.$name.'-input\" type=\"text\" value=\"'.$value.'\"></div></div>'.\"\\n\";\n\t\treturn $str;\n\t}",
"protected function getInput()\n\t{\n $layout = JPATH_PLUGINS.'/content/jspaceweblinks/layouts';\n\t\t$html = JLayoutHelper::render(\"weblinklist\", $this, $layout);\n\t\treturn $html;\n\t}",
"public function __toString(): string\n {\n $html = '<input';\n foreach ($this->attributes as $name => $value) {\n $html .= ' '.htmlspecialchars($name).'=\"'.htmlspecialchars($value).'\"';\n }\n $html .= '/>';\n\n try {\n if ($this->renderer !== null) {\n return strval(call_user_func($this->renderer, $this, $html));\n }\n } catch (\\Exception $e) {\n return $e->getMessage();\n }\n\n return $html;\n }",
"private function get_inputs_output_html() {\n\t\t$i = 0;\n\t\t$j = 0;\n\n\t\t$addon_title = $this->addon_raw['title'];\n\t\t$fieldsets = array();\n\t\tforeach ($this->options as $key => $option) {\n\t\t\t\t$fieldsets[$key] = $option;\n\t\t}\n\n\t\t$output = '';\n\n\t\tif(count((array) $fieldsets)) {\n\t\t\t$output .= '<div class=\"sp-pagebuilder-fieldset\">';\n\t\t\t$output .= '<ul class=\"sp-pagebuilder-nav sp-pagebuilder-nav-tabs\">';\n\t\t\tforeach ( $fieldsets as $key => $value ) {\n\t\t\t\t$output .= '<li class=\"'. (( $i === 0 )?\"active\":\"\" ) .'\"><a href=\"#sp-pagebuilder-tab-'. $key .'\" aria-controls=\"'. $key .'\" data-toggle=\"tab\">'. ucfirst( $key ) .'</a></li>';\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\t$output .= '</ul>';\n\t\t\t$output .= '<div class=\"tab-content\">';\n\t\t\tforeach ( $fieldsets as $key => $value ) {\n\t\t\t\t$output .= '<div class=\"tab-pane '. (( $j === 0 )? \"active\":\"\" ) .'\" id=\"sp-pagebuilder-tab-'. $key .'\">';\n\t\t\t\t$output .= $this->get_input_fields( $key, $addon_title );\n\t\t\t\t$output .= '</div>';\n\n\t\t\t\t$j++;\n\t\t\t}\n\t\t\t$output .= '</div>';\n\t\t\t$output .= '</div>';\n\t\t}\n\n\t\treturn $output;\n\t}"
]
| [
"0.73836595",
"0.7113198",
"0.7112969",
"0.69538236",
"0.69143313",
"0.6886386",
"0.6864707",
"0.68459463",
"0.6839817",
"0.6815756",
"0.6776857",
"0.67421305",
"0.6651549",
"0.6643581",
"0.66428655",
"0.6640958",
"0.66389114",
"0.66285855",
"0.65773547",
"0.65636444",
"0.65497",
"0.653199",
"0.650466",
"0.6496505",
"0.6439734",
"0.64285743",
"0.6427699",
"0.64103436",
"0.6409827",
"0.6394414",
"0.63733673",
"0.6359265",
"0.6324619",
"0.63153833",
"0.6305012",
"0.63013315",
"0.62849516",
"0.6278713",
"0.627551",
"0.6270626",
"0.62217855",
"0.6213993",
"0.6213626",
"0.61837023",
"0.6175542",
"0.61624205",
"0.6155765",
"0.614659",
"0.614659",
"0.614659",
"0.614659",
"0.614659",
"0.61372375",
"0.61328745",
"0.6125075",
"0.6116931",
"0.61057025",
"0.61001486",
"0.60988665",
"0.6092572",
"0.60872793",
"0.6065431",
"0.6046775",
"0.60401154",
"0.6034566",
"0.60314155",
"0.60299313",
"0.60290956",
"0.6018206",
"0.6009931",
"0.6005925",
"0.5978961",
"0.5970266",
"0.5966724",
"0.59649575",
"0.5960967",
"0.595644",
"0.59511626",
"0.59464526",
"0.5942047",
"0.5940306",
"0.5940306",
"0.59282",
"0.59190685",
"0.59190685",
"0.59190685",
"0.59190685",
"0.59190685",
"0.59190685",
"0.59190685",
"0.59190685",
"0.59190685",
"0.59190685",
"0.59190685",
"0.59190685",
"0.59190685",
"0.5914606",
"0.5885698",
"0.5882962",
"0.58824706",
"0.5877162"
]
| 0.0 | -1 |
Returns new item's value on success or FALSE on failure. | public function inc($key, $amount = 1)
{
return $this->memcache->increment($key, $amount);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getNewValue()\n {\n return $this->new_value;\n }",
"public function getExistingValue()\n {\n return $this->existingValue;\n }",
"public function set_item( $item = false ) {\n\t\tif ( ! $item ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$this->item = $item;\n\n\t\treturn $this->get_item();\n\t}",
"public function getNew() { return $this->getNewItem(); }",
"public function getItem()\n {\n if ($this->item !== null) {\n return $this->item;\n }\n\n $this->item = 'lol';\n\n return $this->getItem();\n }",
"public function updateItemById($item_data)\n\t{\n\t\t$item = $this->getItemById($item_data['it_id']);\n \t\tif( (false === $item) || !(is_object($item)) ){\n \t\t\treturn false;\n \t\t}\n\t\tunset($item_data['it_id']);\n\t\t$item->set($item_data);\n\t\treturn (boolean) $item->save();\n\t}",
"public function onSave()\n\t{\n\t\t$value = $this->getValue();\n\t\tif(!empty( $value ))\n\t\t{\n\t\t\treturn $this->getLookupTable()->set(\n\t\t\t\t $this->getValue(),\n\t\t\t\t $this->getValueObject()->getKey()\n\t\t\t ) > 0;\n\t\t}\n\t\treturn false;\n\t}",
"public static function media_update_returns() {\n return new \\external_value(PARAM_BOOL, 'Success');\n }",
"public function addPurchase($item)\n\t{\n\n\t $sql=\"UPDATE item set purchase_price = ? WHERE id = ? \";\n \tif($this->db->query($sql,$item)) {\n \n \t return true;\n \t }\n \t\treturn FALSE;\n\n\t}",
"function beforesave(){\n\t\t// if it returns true, the item will be saved; if it returns false, it won't\n\t\treturn true;\n\t}",
"public function testUpdateItem()\n {\n $item = $this->addItem();\n\n $this->laracart->updateItem($item->getHash(), 'qty', 4);\n\n $this->assertEquals(4, $item->qty);\n }",
"private function get_updated() {\n\t\t$translation = $this->get_item_from_api();\n\t\treturn ( $translation && isset( $translation['updated'] ) ) ? $translation['updated'] : false;\n\t}",
"public function hasValue(){\n return $this->_has(2);\n }",
"public function hasValue(){\n return $this->_has(2);\n }",
"public function hasValue(){\n return $this->_has(2);\n }",
"public function hasValue(){\n return $this->_has(2);\n }",
"public function hasValue(){\n return $this->_has(2);\n }",
"public function hasValue(){\n return $this->_has(2);\n }",
"public function hasValue(){\n return $this->_has(2);\n }",
"public function hasValue(){\n return $this->_has(2);\n }",
"public function hasValue(){\n return $this->_has(2);\n }",
"public function hasValue(){\n return $this->_has(2);\n }",
"public static function grade_item_update_returns() {\n return new external_single_structure(\n array(\n 'status' => new external_value(PARAM_BOOL, 'status: true if success'),\n 'joinurl' => new external_value(PARAM_RAW, 'Zoom meeting join url'),\n 'warnings' => new external_warnings()\n )\n );\n }",
"public function updateItem($item) {\n\t\tif(isset($item['id'])){\n\t\t\t$id = $item['id'];\n\t\t\tunset($item['id']);\n\t\t\t\n\t\t\t$params['set'] =$item;\n\t\t\t$params['condition'] = array('id' => $id); \n\t\t\treturn tdb::update(self::$tablename,$params);\n\t\t}\n\t\treturn false;\n\t}",
"public function get($key) {\n try{\n if (isset($this->Items[$key])) {\n return $this->Items[$key];\n } else {\n return false;\n }\n }catch(Exception $e){\n throw $e;\n }\n }",
"public function hasItemdata(){\n return $this->_has(22);\n }",
"function updateItem($item) {\n\t\tglobal $dbh;\n\t\t$stmt = $dbh->prepare('UPDATE ITEM SET (NULL, ?, ?, ?, ?, ?) WHERE itemID = ?');\n\t\t$success = $stmt->execute(array($item['content'],\n\t\t\t\t\t\t\t\t\t\t$item['image'],\n\t\t\t\t\t\t\t\t\t\t$item['checked'],\n\t\t\t\t\t\t\t\t\t\t$item['listID'],\n\t\t\t\t\t\t\t\t\t\t$list['itemID']));\n\t\treturn $success;\n\t}",
"final public function newlySetValueIsReturnedWithGetValue(): void\n {\n $dataType = new DataTypeMock();\n $this->assertTrue($dataType->isEqual(null));\n\n $someObject = new stdClass();\n $dataType->setValue($someObject);\n $this->assertTrue($dataType->isEqual($someObject));\n }",
"public function hasValue() {\n return $this->_has(2);\n }",
"public function hasValue() {\n return $this->_has(2);\n }",
"public function hasValue() {\n return $this->_has(2);\n }",
"public function save()\n {\n // (no el id del objeto en si), esto para que el validador pueda funcionar\n // de forma correcta. Sabiendo esto, antes de guardar y si el row NO\n // existe, entonces actualizamos 'item_id' con el id del objeto en si\n if (! $this->exists) {\n $characterItem = $this->seller->items()->find($this->item_id);\n $this->item_id = $characterItem->item_id;\n }\n \n return parent::save();\n }",
"function saveOrUpdateItem($item) {\n \n $connection = getConnection();\n \n $item_id = $item['item_id'];\n $item_name = $item['item_name'];\n $item_price = $item['item_price'];\n $item_color = $item['item_color'];\n $item_condition = $item['item_condition'];\n \n // If the id field is blank, it's a new entry in the database.\n if (empty($item_id)) {\n $result = mysqli_query($connection, \"INSERT INTO inventory \n (item_name, item_price, item_color, item_condition)\n VALUES ('$item_name', $item_price, '$item_color', '$item_condition')\");\n // If the id field is set, it's an update to an existing item.\n } else {\n $result = mysqli_query($connection, \"UPDATE inventory \n SET item_name='$item_name', item_price=$item_price, item_color='$item_color',\n item_condition='$item_condition'\n WHERE item_id=$item_id\");\n }\n \n mysqli_close($connection);\n \n return $result;\n }",
"public function hasRet(){\n return $this->_has(5);\n }",
"function is_set($item,$alter=false){\n\treturn isset($item)?$item:$alter;\n}",
"function is_set($item,$alter=false){\n\treturn isset($item)?$item:$alter;\n}",
"public function push($item, $value, $user_id = false)\n {\n $this->loadUser($user_id);\n $this->user_notifications[$this->user_id]['me_value'][$item] = $value;\n $this->store();\n return true;\n }",
"public function retrieve($item);",
"public function get($index) {\n if (key_exists($index, $this->items)) {\n return $this->items[$index];\n }\n return false;\n }",
"public function exist($checkedItem, $item, $returnNotes = '-')\n {\n return (isset($checkedItem)) ? $item : $returnNotes;\n }",
"public function save(CacheItem $item): bool;",
"public function testGetItem()\n {\n $item = $this->addItem();\n $this->assertEquals($item, $this->laracart->getItem($item->getHash()));\n }",
"private function _update_item($field,$value,$level) { \n\n\t\tif ($GLOBALS['user']->id != $this->user AND !Access::check('interface',$level)) { \n\t\t\treturn false; \n\t\t}\n\n\t\t$value = Dba::escape($value);\n\n\t\t$sql = \"UPDATE `playlist` SET $field='$value' WHERE `id`='\" . Dba::escape($this->id) . \"'\";\n\t\t$db_results = Dba::query($sql);\n\n\t\treturn $db_results;\n\n\t}",
"function getItem() ;",
"function getBoolItem ($name) {\n\t\treturn $this->getItemValue ($name, BOOL);\n\t}",
"public function createNewItem()\n {\n return null;\n }",
"public function getItem()\n\t{\n\t\tif (!isset($this->item))\n\t\t{\n\t\t\t$query = $this->_db->getQuery(true);\n\t\t\t$query->select('*');\n\t\t\t$query->from('#__document');\n\t\t\t$query->where('id = '.(int)$this->getState('document.id'));\n\t\t\t$this->_db->setQuery($query);\n\t\t\t$item = $this->_db->loadObject();\n\n\t\t\t// Check for a database error.\n\t\t\tif ($this->_db->getErrorNum())\n\t\t\t{\n\t\t\t\t$this->setError($this->_db->getErrorMsg());\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t$this->item = $item;\t\t\n\t\t}\n\t\treturn $this->item; \n\t}",
"function updateListItem($dbo, $itemID, $itemText, $isComplete){\r\n $command = \"UPDATE list_item SET itemText=?, isComplete=? WHERE itemID=?\";\r\n $stmt = $dbo->prepare($command);\r\n $params = [$itemText, $isComplete, $itemID];\r\n $success = $stmt->execute($params);\r\n if ($success && $stmt->rowCount() == 1){\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n}",
"private static function _update_item_meta($item_id, $meta_key, $meta_value, $unique, $prev_value='')\n\t{\n\t\t$meta_key = is_string($meta_key) ? trim($meta_key) : $meta_key; //field key: e.g 'matric_no'\n\t\t$meta_value = is_string($meta_value) ? trim($meta_value) : $meta_value; //field value\n\t\t$prev_value = isset($prev_value) ? $prev_value : '';\n\t\t$prev_value = is_string($prev_value) ? trim($prev_value) : $prev_value;\n\t\t\n\t\t//if( empty($meta_key) || empty($meta_value))\n\t\tif( empty($meta_key) || $meta_value == '' )\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// Compare existing value to new value if no prev value given and the key exists only once.\n\t\tif ( empty($prev_value) )\n\t\t{\n\t\t\t$old_value = ItemManager::get_item_data($item_id, $meta_key);\n\t\t\tif ( count($old_value) == 1 ) \n\t\t\t{ \n\t\t /*\n\t\t\t\tif(is_array($old_value))\n\t\t\t\t{\n\t\t\t\t\tif( isset($old_value['meta_value']) )\n\t\t\t\t\t{\n\t\t\t\t\t\t$old_value = $old_value['meta_value'];\n\t\t\t\t\t}\n\t\t\t\t\telseif( isset($old_value[0]) )\n\t\t\t\t\t{\n\t\t\t\t\t\t$old_value = $old_value[0];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$compare_value = $old_value;\n\t\t\t\t*/\n\t\t\t\t\n\t\t\t\t$compare_value = ( is_array($old_value) ? $old_value['meta_value'] : $old_value );\n\t\t\t\t\n\t\t\t\tif ( $compare_value === $meta_value ) //if key exists only once, then no need to duplicate same key with same value\n\t\t\t\t{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// If meta doesn't exist, then and a new meta\n\t\tif ( ! ItemManager::item_meta_exists($item_id, $meta_key) )\n\t\t{\n\t\t\treturn self::_insert_item_meta($item_id, $meta_key, $meta_value, $unique);\n\t\t}\n\n\t\t$where_clause = array( 'item_id'=>$item_id, 'meta_key'=>$meta_key );\n\t\t\n\t\tif ( !empty( $prev_value ) ) \n\t\t{\n\t\t\t$prev_value = Util::is_scalar($prev_value) ? $prev_value : Util::stringify($prev_value);\n\t\t\t$where_clause['meta_value'] = $prev_value;\n\t\t}\n\t\t\n\t\t$meta_value = Util::is_scalar($meta_value) ? $meta_value : Util::stringify($meta_value);\n\t\treturn self::_get_db_object()->update_table_column(ItemManager::get_tables_prefix().\"item_meta\", 'meta_value', $meta_value, $where_clause);\n\t}",
"function getItemValue ($name, $type) {\n\t\t$item = $this->getItem ($name, $type);\n\t\tif (! isError ($item)) {\n\t\t\treturn $item->getCurrentValue ();\n\t\t} else {\n\t\t\treturn $item;\n\t\t}\n\t}",
"public function testEditItem() {\n $data = $this->itemData;\n \n // Create the item\n $createItem = PromisePay::Item()->create($data);\n \n $this->assertEquals($this->GUID, $createItem['id']);\n \n // Modify data\n $data['name'] = 'Test123Update';\n $data['description'] = 'Test123Description';\n \n // Finally, modify the item\n $updateItem = PromisePay::Item()->update($createItem['id'], $data);\n \n $this->assertEquals($data['name'], $updateItem['name']);\n $this->assertEquals($data['description'], $updateItem['description']);\n }",
"function updateItemAmount($idItem, $amount){\n global $db;\n \n $stmt=$db->prepare(\"UPDATE inventory SET amount = :amount WHERE idItem = :idItem\");\n \n $binds = array(\n \":amount\" => $amount,\n \":idItem\" => $idItem\n );\n \n $result=false;\n if($stmt->execute($binds) && $stmt->rowCount()>0){\n $result=true;\n }\n return $result;\n }",
"public function item($name)\n {\n return isset($this->data[$name]) ? $this->data[$name] : false;\n }",
"public function getSetItemNotificationResult()\n {\n return isset($this->SetItemNotificationResult) ? $this->SetItemNotificationResult : null;\n }",
"public function check() {\n\t\treturn $this->result;\n\t}",
"public function add($_item)\n\t{\n\t\treturn BingTypeSearchOption::valueIsValid($_item)?parent::add($_item):false;\n\t}",
"public static function refresh_returns() {\n return new external_value(PARAM_BOOL, 'The success status');\n }",
"function save(){\n\t\t// returns the item's id if successful\n\t\tif($this->beforesave()){\n\t\t\t$query = ($this->id?\"UPDATE \":\"INSERT INTO \").$this->tablename.\" SET \";\n\t\t\t$qvalues = \"\";\n\t\t\tforeach($this->dbvariables as $key){\n\t\t\t\t$qvalues .= ($qvalues == \"\"?\"\":\", \").$key.\"='\".trim(addslashes($this->$key)).\"'\";\n\t\t\t}\n\t\t\t$query .= $qvalues;\n\t\t\tif($this->id){\n\t\t\t\t$query .= \" WHERE id=\".$this->id;\n\t\t\t}else{\n\t\t\t\t$query .= \", item_order=\".get_neworder($this->tablename, $this->neworder_where());\n\t\t\t}\n\t\t\tmy_debug(\"Attempting query: \".$query,__FILE__,__LINE__,\"green\");\n\t\t\tif(mysql_query($query)){\t\t\t\t\n\t\t\t\tif(!$this->id && mysql_insert_id())\t$this->id = mysql_insert_id();\n\t\t\t\t$this->onsave();\n\t\t\t\treturn $this->id;\n\t\t\t}else{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}",
"function successful()\n\t{\n\t\treturn $this->isSuccess();\n\t}",
"public function upsertItem($item) {\n\n // Place item data into an array that maps to the DB fields\n $data = array(\n 'guidHash' => $item->guidHash,\n 'id_nc' => $item->categoryId,\n 'pubDate' => $item->publishDate->toString('YYYY-MM-dd HH:mm:ss'),\n 'title' => $item->title,\n 'summary' => $item->summary,\n 'link' => $item->linkUrl,\n 'thumbnail' => $item->thumbnailUrl,\n );\n\n // See if item already exists\n if (is_null($this->getItemByGuid($item->guidHash))) {\n // Do an INSERT\n return $this->insert($data);\n } else {\n // Do an UPDATE\n $where = $this->getAdapter()->quoteInto('guidHash = ?', $item->guidHash);\n return $this->update($data, $where);\n }\n }",
"function add($item)\r\n {\r\n //Sets the array to the end\r\n end($this->items);\r\n\r\n //Adds the item as the last one\r\n $this->items[]=$item;\r\n\r\n return($this->count());\r\n }",
"function createItem($item) {\n\t\tglobal $dbh;\n\t\t$stmt = $dbh->prepare('INSERT INTO ITEM VALUES (NULL, ?, ?, ?, ?)');\n\t\t$success = $stmt->execute(array($item['content'],\n\t\t\t\t\t\t\t\t\t\t$item['image'],\n\t\t\t\t\t\t\t\t\t\t$item['checked'],\n\t\t\t\t\t\t\t\t\t\t$item['listID']));\n\t\treturn $success;\n\t}",
"function saveItem($data)\n\t{\n\t\t//check if item exists\n\t\t$item = $this->getItem($data['id']);\n\t\tif (!$item['success'])\n\t\t\treturn $item;\n\t\t\n\t\t$title_url = $data['uri'] ? url_title($data['uri'], 'dash', TRUE) : url_title($data['name'], 'dash', TRUE);\n\t\t$published = $data['published'] == \"yes\" ? true : false;\n\t\t\n\t\t//prepare values\n\t\t$id = intval($data['id']);\n\t\t\n\t\t$qStr = \"UPDATE portfolio\n\t\t\t\t\tSET name=?, description=?, marked_up_description=?, short_description=?, uri=?, live_url=?, image=?, image_small=?, time=?,\n\t\t\t\t\t\tpublished=?\n\t\t\t\tWHERE id=?\";\n\t\t$q = $this->db->query($qStr, array($data['name'], $data['description'], $data['marked_up_description'], $data['short_description'], $title_url, \n\t\t\t\t\t\t\t\t\t\t\t$data['live_url'], $data['image'], $data['image_small'], $data['time'], $published, $id));\n\t\t\n\t\tif ($q)\n\t\t\treturn $this->getItem($id);\n\t\telse\n\t\t\treturn array('success'=>false, 'error'=>\"There was an error saving this item\");\n\t}",
"public function newValue()\n\t{\n\t\tif(is_null($this->new_value) or strlen($this->new_value) == '')\n\t\t{\n\t\t\treturn $this->revisionNullString;\n\t\t}\n\n\t\ttry\n\t\t{\n\t\t\tif(strpos($this->key, '_id'))\n\t\t\t{\n\t\t\t\t$model = str_replace('_id', '', $this->key);\n\t\t\t\t$item = $model::find($this->new_value);\n\n\t\t\t\tif(!$item)\n\t\t\t\t{\n\t\t\t\t\treturn $this->format($this->key, $this->revisionUnknownString);\n\t\t\t\t}\n\n\t\t\t\treturn $this->format($this->key, $item->identifiableName());\n\t\t\t}\n\t\t}\n\t\tcatch(Exception $e)\n\t\t{\n\t\t\t// Just a failsafe, in the case the data setup isn't as expected.\n\t\t}\n\n\t\treturn $this->format($this->key, $this->new_value);\n\t}",
"public static function set_attribute_returns() {\n return new external_value(PARAM_BOOL, 'The success status');\n }",
"public function add($_item)\n\t{\n\t\treturn BingTypeSourceType::valueIsValid($_item)?parent::add($_item):false;\n\t}",
"public static function update_module_returns() {\n \treturn new external_single_structure(\n \tarray(\n 'success' => new external_value(PARAM_BOOL, 'Returns true on success', VALUE_REQUIRED, '', NULL_NOT_ALLOWED)\n \t)\n \t);\n }",
"public function getItem($key)\n {\n $data = $this->memcached->get($key);\n\n if ($data['ttl'] === 0 || (time() - $data['start'] <= $data['ttl'])) {\n $value = $data['value'];\n } else {\n $this->deleteItem($key);\n }\n\n return (isset($value)) ? $value : false;\n }",
"public function add(){\n\n\t\t$db = new dbconnection();\n\t\t$conn = $db->startconnection();\t\n\n\t\t$query = $conn->prepare(\"INSERT INTO item(`item_code`,`item_category`,`item_subcategory`,`item_name`,`quantity`,`unit_price`) values (?,?,?,?,?,?)\");\n\n\t\t$query->bind_param(\"ssssss\",$this->itemcode,$this->category,$this->subcategory,$this->itemname,$this->quantity,$this->uprice);\n\t\t\t\n\t\t\tif($query->execute()){\n\n\t\t\treturn 1;\n\n\t\t}else{\n\n\t\t\treturn 0;\n\n\t\t}\n\n\n\t\t}",
"public function testAddExistingItem(): void {\n $item = new Item(1, \"test\", 20);\n $this->itemCollection->add($item, 2);\n\n $this->itemCollection->add($item, 10);\n\n $this->assertEquals(12, $this->itemCollection->getAmount($item));\n }",
"public function get()\n {\n // we hit the cache when we get the item.. so we allways return the value\n return $this->value;\n }",
"function addItem(){\r\n// this means, lets say last week i created a item with code x. then i deleted it.(set lock_item=1)\r\n// today as that item_name doesnt exist anymore, i want to reuse it to another item. i cant do \r\n// insert item query as it will lead to unique index criteria erro. so i must update earlier row.\r\n// current addItem function only sets lock_item=0, but doesnt update other rows.\r\n\r\n\tglobal $item, $lab, $item_name, $cost, $status, $comments, $operation, $connection, $result, $bill_serial,\r\n\t$iv_serial, $product_code, $tequip, $vendor,$comments_sql, $item_name_sql, $product_code_sql;\r\n\tif($item==-1||$lab==-1||$bill_serial==-1){\r\n\t\taddToToast(\"please select Lab/Vendor/Apparatus from dropdown\",0);\r\n\t}\r\n\telse{ \r\n\t\t/*\t\t\tInserting items one by one \t\t\t\t*/\r\n\t\tforeach ($item_name_sql as $key => $value) {\r\n\t\t //checking if the item is presenet in the inventory\r\n\t\t\tif(!doesItemExist(\"inventory\", \"item_code\", $item_name_sql[$key])){ //if item is not present in inventory\r\n\t\t\t\t$query=\"\r\n\t\t\t\tINSERT INTO \r\n\t\t\t\tinventory (\tlab_serial, \r\n\t\t\t\tserial_item, \r\n\t\t\t\titem_code,\r\n\t\t\t\tproduct_code, \r\n\t\t\t\ttequip, \r\n\t\t\t\tcost, \r\n\t\t\t\tstatus,\r\n\t\t\t\treceipt_serial,\r\n\t\t\t\tlast_operation\r\n\t\t\t\t) \r\n\t\t\t\tvalues(\r\n\t\t\t\t{$lab},\r\n\t\t\t\t{$item}, \r\n\t\t\t\t'{$item_name_sql[$key]}',\r\n\t\t\t\t'{$product_code_sql[$key]}',\r\n\t\t\t\t{$tequip}, \r\n\t\t\t\t{$cost},\r\n\t\t\t\t{$status},\r\n\t\t\t\t{$bill_serial},\r\n\t\t\t\t{$operation}\r\n\t\t\t) \";\r\n\t\t\tperform_query($connection, $query, \"failed to insert into inventory\");\r\n\t\t\t\t // to insert into inventory log, but we need serial of that item_code\r\n\t\t\t$iv_serial=mysqli_insert_id($connection);\r\n\t\t\tinventoryLog();\r\n\t\t\taddToToast(\"Created new apparatus of name {$item_name[$key]} of cost {$cost}\",1);\r\n\t\t}\r\n\t\telse{ \t\t\r\n\t\t\t //if item is already present, it may be an error\r\n\t\t\t \t\t\t//probability is that the item may have been locked and now needs to be unlocked\r\n\t\t\t$row=mysqli_fetch_assoc($result);\r\n\t\t\tif(1==$row['lock_item']){\r\n\t\t\t\t$date= date(\"Y-m-d H:i:s\");\r\n\t\t\t\t$query=\"SELECT serial from inventory where item_code={$item_name_sql[$key]}\";\r\n\t\t\t\t$result=perform_query($connection, $query, \"failed to get serial\");\r\n\t\t\t\t$row=mysqli_fetch_assoc($result);\r\n\t\t\t\t$iv_serial=$row['serial'];\r\n\t\t\t\t$query=\"UPDATE \r\n\t\t\t\tinventory \r\n\t\t\t\tset \r\n\t\t\t\tlock_item=0, \r\n\t\t\t\tupdated='{$date}', \r\n\t\t\t\tlab_serial={$lab}, \r\n\t\t\t\tcost={$cost} \r\n\t\t\t\twhere \r\n\t\t\t\titem_code='{$item_name_sql[$key]}'\";\r\n\t\t\t\tperform_query($connection, $query, \"failed to update\");\r\n\t\t\t\t$comments.=\" item was unlocked\";\r\n\t\t\t\tinventoryLog();\r\n\t\t\t\taddToToast(\"{$comments}\",1);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\taddToToast(\"its already present \",0);\r\n\t\t}\t\r\n\t}\r\n\r\n} \r\n}",
"public function hasUseradditem(){\n return $this->_has(24);\n }",
"public function getIsNewRecord () {\n return $this->_item === null;\n }",
"public function testSetGetQuantity()\n {\n $this->item->setQuantity(2);\n $this->assertEquals($this->item->getQuantity(), 2);\n }",
"public function insert_item($item_data = FALSE, $update_existing_items = FALSE)\r\n\t{\r\n\t\tif (! is_array($item_data) || empty($item_data) || ! $this->flexi_cart_lite_model->is_positive($item_data[$this->flexi->cart_columns['item_quantity']]))\r\n\t\t{\r\n\t\t\t$this->set_error_message('invalid_data', 'config');\r\n\t\t\treturn FALSE;\r\n\t\t}\r\n\t\t\r\n\t\t// Check array contains all required cart columns\r\n\t\tforeach($item_data as $column => $value)\r\n\t\t{\r\n\t\t\tif (! isset($column) && in_array($column, $this->required_columns()))\r\n\t\t\t{\r\n\t\t\t\t$this->set_error_message('invalid_data', 'config');\r\n\t\t\t\treturn FALSE;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Generate a row id from the submitted item id and option data.\r\n\t\t$row_id = $this->generate_row_id($item_data);\r\n\t\t\t\r\n\t\t// Check if the generated row id already exists in the cart, if not, its a new addition to the cart, else, the item already exists.\r\n\t\tif (! isset($this->flexi->cart_contents['items'][$row_id]) || $update_existing_items)\r\n\t\t{\r\n\t\t\t// Prepare and format submitted item data.\r\n\t\t\tif (! $item = $this->get_item_data($item_data, $item_data, TRUE))\r\n\t\t\t{\r\n\t\t\t\treturn FALSE;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Set user defined custom data.\r\n\t\t\t// Loops through all user defined columns, validating and formating data.\r\n\t\t\tif (is_array($this->flexi->cart['items']['custom_columns']) && ! empty($this->flexi->cart['items']['custom_columns']))\r\n\t\t\t{\r\n\t\t\t\tforeach($this->flexi->cart['items']['custom_columns'] as $custom_column)\r\n\t\t\t\t{\r\n\t\t\t\t\tif (! $item = $this->get_custom_item_data($item, $item_data, $custom_column))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\treturn FALSE;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Set item data to cart array.\r\n\t\t\t$this->set_item_data($item, FALSE);\r\n\t\t}\r\n\t\t// Else, an item with an identical id and item options already exists in the cart, therefore, check whether to increment the quantity.\r\n\t\telse if ($this->flexi_cart_lite_model->get_config_setting('increment_duplicate_item_quantity'))\r\n\t\t{\r\n\t\t\t$this->flexi->cart_contents['items'][$row_id][$this->flexi->cart_columns['item_quantity']] += $item_data[$this->flexi->cart_columns['item_quantity']];\r\n\t\t}\t\t\r\n\t\t\t\t\r\n\t\treturn TRUE;\r\n\t}",
"public function insert($processed_item, $collection_index)\n {\n remove_action('post_updated', 'wp_save_post_revision');\n $collections = $this->get_collections();\n $collection_definition = isset($collections[$collection_index]) ? $collections[$collection_index] : false;\n if (!$collection_definition || !is_array($collection_definition) || !isset($collection_definition['id']) || !isset($collection_definition['mapping'])) {\n $this->add_error_log('Collection misconfigured');\n return false;\n }\n\n $collection = Collections::get_instance()->fetch($collection_definition['id']);\n\n if ($collection instanceof Collection && !$collection->user_can('edit_items')) {\n $this->add_error_log(__(\"You don't have permission to create items in this collection.\", 'tainacan'));\n return false;\n }\n\n $Tainacan_Metadata = Metadata::get_instance();\n $Tainacan_Item_Metadata = Item_Metadata::get_instance();\n $Tainacan_Items = Items::get_instance();\n\n // $Tainacan_Items->disable_logs();\n // $Tainacan_Metadata->disable_logs();\n // $Tainacan_Item_Metadata->disable_logs();\n\n $itemMetadataArray = [];\n\n $updating_item = false;\n\n $Tainacan_Item_Metadata->disable_logs();\n if (is_numeric($this->get_transient('item_id'))) {\n $item = $Tainacan_Items->fetch((int)$this->get_transient('item_id'));\n if ($item instanceof Item && ($item->get_collection() == null || $item->get_collection()->get_id() != $collection->get_id())) {\n $this->add_log('item with ID ' . $this->get_transient('item_id') . ' not found in collection ' . $collection->get_name());\n $item = new Item();\n }\n } else {\n $item = new Item();\n }\n\n if (is_numeric($this->get_transient('item_id'))) {\n if ($item instanceof Item && $item->get_id() == $this->get_transient('item_id')) {\n if (!$item->can_edit()) {\n $this->add_error_log(\"You don't have permission to edit item:\" . $item->get_id());\n return $item;\n }\n $this->add_log('item will be updated ID:' . $item->get_id());\n $updating_item = true;\n // When creating a new item, disable log for each metadata to speed things up\n $Tainacan_Item_Metadata->enable_logs();\n } else {\n $this->add_log('item with ID ' . $this->get_transient('item_id') . ' not found. Unable to update. Creating a new one.');\n $item = new Item();\n }\n\n }\n\n if ($this->get_transient('item_id') && $item instanceof Item && is_numeric($item->get_id()) && $item->get_id() > 0 && $this->get_transient('item_action') == 'ignore') {\n $this->add_log('Ignoring repeated Item');\n return $item;\n }\n\n if (is_array($processed_item)) {\n foreach ($processed_item as $metadatum_source => $values) {\n\n if ($metadatum_source == 'special_document' ||\n $metadatum_source == 'special_attachments' ||\n $metadatum_source == 'special_item_status' ||\n $metadatum_source == 'special_comment_status') {\n $special_columns = true;\n continue;\n }\n\n foreach ($collection_definition['mapping'] as $id => $value) {\n if ((is_array($value) && key($value) == $metadatum_source) || ($value == $metadatum_source))\n $tainacan_metadatum_id = $id;\n }\n $metadatum = $Tainacan_Metadata->fetch($tainacan_metadatum_id);\n\n if ($this->is_empty_value($values)) continue;\n\n if ($metadatum instanceof Metadatum) {\n $singleItemMetadata = new Item_Metadata_Entity($item, $metadatum); // *empty item will be replaced by inserted in the next foreach\n if ($metadatum->get_metadata_type() == 'Tainacan\\Metadata_Types\\Taxonomy') {\n if (!is_array($values)) {\n $tmp = $this->insert_hierarchy($metadatum, $values);\n if ($tmp !== false) {\n $singleItemMetadata->set_value($tmp);\n }\n } else {\n $terms = [];\n foreach ($values as $k => $v) {\n $tmp = $this->insert_hierarchy($metadatum, $v);\n if ($tmp !== false) {\n $terms[] = $tmp;\n }\n }\n $singleItemMetadata->set_value($terms);\n }\n } elseif ($metadatum->get_metadata_type() == 'Tainacan\\Metadata_Types\\Compound') {\n $children_mapping = $collection_definition['mapping'][$tainacan_metadatum_id][$metadatum_source];\n $singleItemMetadata = [];\n foreach ($values as $compoundValue) {\n $tmp = [];\n foreach ($children_mapping as $tainacan_children_metadatum_id => $tainacan_children_header) {\n $metadatumChildren = $Tainacan_Metadata->fetch($tainacan_children_metadatum_id, 'OBJECT');\n $compoundItemMetadata = new Item_Metadata_Entity($item, $metadatumChildren);\n $compoundItemMetadata->set_value($compoundValue[$tainacan_children_header]);\n $tmp[] = $compoundItemMetadata;\n }\n $singleItemMetadata[] = $tmp;\n }\n } else {\n $singleItemMetadata->set_value($values);\n }\n $itemMetadataArray[] = $singleItemMetadata;\n } else {\n $this->add_error_log('Metadata ' . $metadatum_source . ' not found');\n }\n }\n }\n\n if ((!empty($itemMetadataArray) || $special_columns) && $collection instanceof Collection) {\n $item->set_collection($collection);\n if ($item->validate()) {\n $insertedItem = $Tainacan_Items->insert($item);\n } else {\n $this->add_error_log('Error inserting Item Title: ' . $item->get_title());\n $this->add_error_log($item->get_errors());\n return false;\n }\n\n foreach ($itemMetadataArray as $itemMetadata) {\n if ($itemMetadata instanceof Item_Metadata_Entity) {\n $itemMetadata->set_item($insertedItem); // *I told you\n if ($itemMetadata->validate()) {\n $result = $Tainacan_Item_Metadata->insert($itemMetadata);\n } else {\n $this->add_error_log('Error saving value for ' . $itemMetadata->get_metadatum()->get_name() . \" in item \" . $insertedItem->get_title());\n $this->add_error_log($itemMetadata->get_errors());\n continue;\n }\n } elseif (is_array($itemMetadata)) {\n if ($updating_item == true) {\n $this->deleteAllValuesCompoundItemMetadata($insertedItem, $itemMetadata[0][0]->get_metadatum()->get_parent());\n }\n foreach ($itemMetadata as $compoundItemMetadata) {\n $parent_meta_id = null;\n foreach ($compoundItemMetadata as $itemChildren) {\n $itemChildren->set_parent_meta_id($parent_meta_id);\n if ($itemChildren->validate()) {\n $item_children_metadata = $Tainacan_Item_Metadata->insert($itemChildren);\n $parent_meta_id = $item_children_metadata->get_parent_meta_id();\n } else {\n $this->add_error_log('Error saving value for ' . $itemChildren->get_metadatum()->get_name() . \" in item \" . $insertedItem->get_title());\n $this->add_error_log($itemChildren->get_errors());\n continue;\n }\n }\n }\n }\n\n //if( $result ){\n //\t$values = ( is_array( $itemMetadata->get_value() ) ) ? implode( PHP_EOL, $itemMetadata->get_value() ) : $itemMetadata->get_value();\n // $this->add_log( 'Item ' . $insertedItem->get_id() .\n // ' has inserted the values: ' . $values . ' on metadata: ' . $itemMetadata->get_metadatum()->get_name() );\n //} else {\n // $this->add_error_log( 'Item ' . $insertedItem->get_id() . ' has an error' );\n //}\n }\n\n if (!$updating_item) {\n $insertedItem->set_status('publish');\n }\n\n if ($insertedItem->validate()) {\n $insertedItem = $Tainacan_Items->update($insertedItem);\n $this->after_inserted_item($insertedItem, $collection_index);\n } else {\n $this->add_error_log('Error publishing, Item Title: ' . $insertedItem->get_title());\n $this->add_error_log('Error publishing, Item ID: ' . $insertedItem->get_id());\n $this->add_error_log($insertedItem->get_errors());\n return false;\n }\n return $insertedItem;\n } else {\n $this->add_error_log('Collection not set');\n return false;\n }\n }",
"public function put($item, $value)\r\n {\r\n $instance = $this->getInstance($item);\r\n return $instance->put($value);\r\n }",
"public function getReturnedValue();",
"public function testItemQtyUpdate()\n {\n $item = $this->addItem();\n $itemHash = $item->getHash();\n $this->addItem();\n $this->addItem();\n $this->addItem();\n $this->addItem();\n $this->addItem();\n $this->addItem();\n\n $this->assertEquals(7, $item->qty);\n $this->assertEquals($itemHash, $item->getHash());\n\n $options = [\n 'a' => 2,\n 'b' => 1\n ];\n\n $item = $this->addItem(1, 1, false, $options);\n $this->addItem(1, 1, false, array_reverse($options));\n\n $this->assertEquals(2, $item->qty);\n }",
"function updateItemQty(){\n $update = 0;\n // Get cart item info\n $rowid = $this->input->get('rowid');\n $qty = $this->input->get('qty');\n\n // Update item in the cart\n if(!empty($rowid) && !empty($qty)){\n $data = array(\n 'rowid' => $rowid,\n 'qty' => $qty\n );\n $update = $this->cart->update($data);\n }\n\n // Return response\n echo $update?'ok':'err';\n }",
"public function createListItem(ListItemModel $item) {\n RealityCheckLogger::info(\"Entering BucketListDataService.createListItem()\");\n\n try{\n //select variables and see if the row exists\n $description = $item->getDescription();\n $bucketListID = $item->getBucketListID();\n\n //prepared statements is created\n $stmt = $this->conn->prepare(\"INSERT INTO `ListItem` (`Description`, `BucketList_ID`) VALUES (:description, :bucketlistid)\");\n $stmt->bindParam(':description', $description);\n $stmt->bindParam(':bucketlistid', $bucketListID);\n\n /*see if list item existed and return true if found\n else return false if not found*/\n if ($stmt->execute()) {\n RealityCheckLogger::info(\"Leaving BucketListDataService.createListItem() with true\");\n return true;\n }\n\n else {\n RealityCheckLogger::info(\"Leaving BucketListDataService.createListItem() with false\");\n return false;\n }\n }\n\n catch(PDOException $e) {\n RealityCheckLogger::error(\"Exception: \", array(\"message\" => $e->getMessage()));\n throw new DatabaseException(\"Database Exception: \" . $e->getMessage(), 0, $e);\n }\n }",
"public function checkstore(&$item,$pid,$isnew)\n\t{\n\t\tif(isset($item[\"store\"]) && trim($item[\"store\"])!=\"\")\n\t\t{\n\t\t\t$scodes=$this->checkItemStores($item[\"store\"]);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$scodes=\"admin\";\n\t\t}\n\t\tif($scodes==\"\")\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\t$item[\"store\"]=$scodes;\n\t\treturn true;\n\t}",
"public function checkstore(&$item,$pid,$isnew)\n\t{\n\t\tif(isset($item[\"store\"]) && trim($item[\"store\"])!=\"\")\n\t\t{\n\t\t\t$scodes=$this->checkItemStores($item[\"store\"]);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$scodes=\"admin\";\n\t\t}\n\t\tif($scodes==\"\")\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\t$item[\"store\"]=$scodes;\n\t\treturn true;\n\t}",
"public static function update_series_returns() {\n return new \\external_value(PARAM_BOOL, 'Success');\n }",
"protected function create_item( $name ) {\n\t\t// Check whether the item name is still available\n\t\tif ( ThumbsUp_Database::item_name_exists( $name ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Initialize the item fields\n\t\t$this->item = array(\n\t\t\t'name' => (string) $name,\n\t\t\t'closed' => 0,\n\t\t\t'date' => time(),\n\t\t);\n\n\t\t// Insert the item into the database\n\t\t/*sqlite_escape_string repalce with mysqli_escape_string PHP7 Compatibility*/\n\t\tThumbsUp_Database::db()->queryExec(\"\n\t\t\tINSERT INTO items (id, name, closed, date)\n\t\t\tVALUES (NULL, '\" . mysqli_escape_string( $this->item['name'] ) . \"', {$this->item['closed']}, {$this->item['date']})\");\n\n\t\t// Load the item id\n\t\t$this->item['id'] = ThumbsUp_Database::db()->lastInsertRowid();\n\n\t\t// All done successfully\n\t\treturn true;\n\t}",
"public function getIsNewRecord()\n {\n return $this->_item === null;\n }",
"protected function onCloneValue(FieldItemInterface $item, $all) {\n return $item->getValue();\n }",
"public function getNewValue(): ?string;",
"public function addSales($item)\n\t{\n\n\t\t$sql=\"UPDATE item set sales_price = ? WHERE id = ? \";\n \tif($this->db->query($sql,$item)) {\n \n \t return true;\n \t }\n \t\treturn FALSE;\n\n\t}",
"public function save()\n {\n $rc = true;\n $ak = array_keys($this->_objData);\n if (isset($this->_objData[$ak[0]][$this->_objField]) && $this->_objData[$ak[0]][$this->_objField]) {\n $rc = $this->update();\n } else {\n $rc = $this->insert();\n }\n return $rc;\n }",
"private function update() {\n\t\t\n\t\t// get database handle\n\t\tglobal $dbh;\n\t\t\n\t\t\n\t\treturn false;\n\t}",
"function fraudcheck($amt,$item,$ccno)\r\n {\r\n $conn=mysql_connect('localhost','root','');\r\n $sqlstr = \"select * from transactions where item = '$item' AND ccno='$ccno'\";\r\n mysql_select_db(\"bankdb\");\r\n $ret = mysql_query($sqlstr,$conn);\r\n if(mysql_num_rows($ret))\r\n {\r\n $p=item_exist($ccno,$amt,$item);\r\n }\r\n else \r\n {\r\n $p=new_item($ccno,$amt);\r\n \r\n }\r\n return $p;\r\n /*if($ret)\r\n {\r\n while($row = mysql_fetch_array($ret)) {}\r\n\t\t\t\r\n }\r\n return true; */\r\n }",
"private function _update(){\n\t\tif($this->dao->update($this->user->getID(), $this->ident, $this->datahandler)){\n\t\t\t$this->read();\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"abstract function get ($item);",
"public function getItemStatus()\n {\n return $this->itemStatus;\n }",
"public function save()\n {\n if (self::isExistent($this->guid))\n {\n return $this->update();\n }\n else\n {\n return $this->insert();\n }\n }",
"public function getValue($key)\n\t{\n $cacheItem = $this->_yiiron->get($key);\n\t\tif ($cacheItem != null && $cacheItem->value != null)\n\t\t\treturn $cacheItem->value;\n else\n return false;\n\t}",
"protected function handle_put_item_update($Item, $args = array())\n {\n return $Item;\n }",
"function AddItem($item, $object = null, $itemkey = null)\r\n {\r\n if($object != null)\r\n {\r\n throw new Exception('ObjectNew1 functionallity for RadioGroup is not yet implemented.');\r\n }\r\n\r\n //Set the array to the end\r\n end($this->_items);\r\n\r\n //Adds the item as the last one\r\n if($itemkey != null)\r\n {\r\n $this->_items[$itemkey] = $item;\r\n }\r\n else\r\n {\r\n $this->_items[] = $item;\r\n }\r\n\r\n return ($this->Count);\r\n }",
"public function update()\n {\n return $this->save();\n }"
]
| [
"0.5960898",
"0.5845109",
"0.579461",
"0.57151234",
"0.56899595",
"0.5688438",
"0.56774646",
"0.56624293",
"0.5542087",
"0.5485518",
"0.54786044",
"0.5460753",
"0.5428223",
"0.5428223",
"0.5428223",
"0.5428223",
"0.5428223",
"0.5428223",
"0.5428223",
"0.5428223",
"0.5428223",
"0.5428223",
"0.5409297",
"0.5405213",
"0.53922164",
"0.5388451",
"0.5385398",
"0.53706115",
"0.53696823",
"0.53696823",
"0.53696823",
"0.535835",
"0.5354751",
"0.53360057",
"0.5327803",
"0.5327803",
"0.52950895",
"0.52850175",
"0.5273518",
"0.52727056",
"0.5269612",
"0.52489007",
"0.5245914",
"0.5241874",
"0.5238222",
"0.52366495",
"0.52362007",
"0.5231062",
"0.5219724",
"0.5210676",
"0.5208911",
"0.5208462",
"0.5197445",
"0.51958823",
"0.51950574",
"0.5192428",
"0.5189832",
"0.5189568",
"0.51856756",
"0.5167102",
"0.5148029",
"0.5114454",
"0.5113194",
"0.5106675",
"0.51063585",
"0.5106227",
"0.50975823",
"0.508535",
"0.5084289",
"0.507413",
"0.50727904",
"0.50695294",
"0.5063883",
"0.5062373",
"0.50606954",
"0.5058276",
"0.50542027",
"0.50524753",
"0.50448644",
"0.5041463",
"0.50317353",
"0.5025521",
"0.50187266",
"0.50187266",
"0.5017756",
"0.5014231",
"0.5013714",
"0.5011123",
"0.5008877",
"0.50059146",
"0.50004923",
"0.49919838",
"0.49879533",
"0.49853382",
"0.4982558",
"0.49822092",
"0.49794096",
"0.49764013",
"0.4975105",
"0.49743617",
"0.49696872"
]
| 0.0 | -1 |
public // reset all properties to default | function setHTML($value = true)
{
$this->multimailer->isHTML($value);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function resetProperties() {}",
"public function reset() {\n\t\t// Get the default values for the class from the table.\n\t\tforeach ($this->getFields() as $k => $v) {\n\t\t\t// If the property is not private, reset it.\n\t\t\tif (strpos($k, '_') !== 0) {\n\t\t\t\t$this->$k = NULL;\n\t\t\t}\n\t\t}\n\t}",
"public function reset() {\n $this->_property = false;\n $this->_interface = false;\n $this->_variable = false;\n }",
"public function reset() {\n $this->_property = false;\n $this->_interface = false;\n $this->_variable = false;\n }",
"function resetProperties()\n {\n $this->fullremyears = 0;\n $this->fullremmonths = 0;\n $this->fullremdays = 0;\n $this->fullremhours = 0;\n $this->fullremminutes = 0;\n $this->fullremseconds = 0;\n $this->years = 0;\n $this->months = 0;\n $this->days = 0;\n $this->hours = 0;\n $this->minutes = 0;\n $this->seconds = 0;\n }",
"private function reset(){\n\n\t\tforeach($this as $k=>$v) unset($this->$k);\n\n\t\t$this::$map = $this->maper();\n\n\t\t$this->name = \"\";\n\n\t\t$this->address = [];\n\n\t\t$this->tableclass();\n\n\t}",
"private function resetAll()\n {\n $this->title = null;\n $this->caption = null;\n $this->categories = null;\n $this->image = null;\n $this->tags = null;\n $this->imagePath = null;\n $this->postId = null;\n }",
"public function reset() {\n $this->setEntities([]);\n $this->setLinks([]);\n $this->setMetadata([]);\n $this->setIncludes([]);\n $this->setDynamic();\n $this->setCacheability(new CacheableMetadata());\n }",
"public static function reset()\n\t{\n\t\t// nothing by default\n\t}",
"public function reset()\n {\n $this->id = null;\n $this->attributes = array();\n }",
"public function reset()\n {\n parent::reset();\n }",
"public function reset()\n {\n $this->values[self::CONVERSATION] = null;\n $this->values[self::SKMSG] = null;\n $this->values[self::IMAGE] = null;\n $this->values[self::CONTACT] = null;\n $this->values[self::LOCATION] = null;\n $this->values[self::URLMSG] = null;\n $this->values[self::DOCUMENT] = null;\n $this->values[self::AUDIO] = null;\n $this->values[self::VIDEO] = null;\n $this->values[self::CALL] = null;\n $this->values[self::CHAT] = null;\n }",
"private function reset()\n\t{\t\t\n\t\t$this->limit = null;\n\t\t\n\t\t$this->table = null;\n\t\t\n\t\t$this->offset = null;\n\t\t\n\t\t$this->data = [];\n\t\t\n\t\t$this->joins = [];\n\t\t\n\t\t$this->wheres = [];\n\t\t\n\t\t$this->orderBy = [];\n\t\t\n\t\t$this->selects = [];\n\t\t\n\t\t$this->bindings = [];\n\t\t\t\n\t}",
"public function reset()\n {\n $this->values[self::_UID] = null;\n $this->values[self::_NAME] = null;\n $this->values[self::_HERO] = null;\n }",
"public function reset() : void {\n\t\tforeach ($this->propertyMap as $propertyName => $dbName) {\n\t\t\t$this->{$propertyName} = null;\n\t\t}\n\t}",
"public function clearProperties();",
"public function reset()\n {\n $this->values[self::_OWNER] = null;\n $this->values[self::_ID] = null;\n $this->values[self::_TYPE_ID] = null;\n $this->values[self::_TEAM] = array();\n $this->values[self::_STATE] = null;\n $this->values[self::_STATE_END_TS] = null;\n $this->values[self::_PRODUCE_SPEED] = null;\n $this->values[self::_STORAGE] = null;\n }",
"public function reset()\n {\n }",
"public function reset() {\n\t\t\tforeach ( $this->dbFields as $property ) {\n\t\t\t\t$this->$property = '';\n\t\t\t}\n\t\t\t$this->pageData = null;\n\t\t\t$this->attributes = null;\n\t\t\t// TODO: set exdata to array()?\n\t\t}",
"public function reset()\n {\n }",
"public function reset(): void\n {\n $this->activationKey = null;\n $this->dateOfBirth = null;\n $this->lpaReferenceNumber = null;\n }",
"public function reset() {\n $this->data = array(); \n $this->input = array();\n $this->missing = array();\n $this->invalid = array();\n $this->errors = array();\n $this->error = false;\n }",
"protected function reset_properties() {\n\t\t$this->author = false;\n\t\t$this->readme = array();\n\t\t$this->theme = false;\n\t\t$this->theme_post = false;\n\t\t$this->theme_slug = '';\n\t\t$this->theme_dir = '';\n\t\t$this->theme_name = '';\n\t\t$this->tmp_svn_dir = '';\n\t\t$this->trac_changeset = 0;\n\t\t$this->trac_ticket = (object) array(\n\t\t\t'id' => 0,\n\t\t\t'resolution' => '',\n\t\t\t'summary' => '',\n\t\t\t'keywords' => [],\n\t\t\t'parent_link' => '',\n\t\t\t'priority' => '',\n\t\t\t'diff_line' => '',\n\t\t\t'description' => '',\n\t\t);\n\t\t$this->version_status = 'new';\n\t\t$this->importing_from = 'upload';\n\t\t$this->commit_msg = '';\n\n\t\t// $this->tmp_dir = ''; // Temporary folder per each instance of this class. Doesn't need to be reset each time.\n\t\t// $this->trac = false; // This can stay active, Trac access won't change between calls.\n\t}",
"public function reset()\n {\n $this->values[self::customer_id] = null;\n $this->values[self::auth_token] = null;\n $this->values[self::wholesaler_id] = null;\n $this->values[self::order_id] = null;\n $this->values[self::quality] = null;\n $this->values[self::delivery] = null;\n $this->values[self::comment] = null;\n }",
"public function reset()\r\n {\r\n }",
"public function reset()\n {\n $this->values[self::ID] = null;\n $this->values[self::NAME] = null;\n $this->values[self::PERMISSIONS] = null;\n $this->values[self::POSITION] = null;\n }",
"public function clear() {\n\t\t$vars = get_object_vars($this);\n\t\tforeach ($vars as $key => $val) {\n\t\t\t$this->$key = null;\n\t\t}\n\t}",
"public function reset()\n {\n $this->values[self::LATITUDE] = null;\n $this->values[self::LONGITUDE] = null;\n $this->values[self::NAME] = null;\n $this->values[self::DESCRIPTION] = null;\n $this->values[self::URL] = null;\n $this->values[self::THUMBNAIL] = null;\n }",
"public function reset()\n {\n $this->env = array();\n $this->object_handlers = array();\n $this->pagetitle = '';\n }",
"protected function reset(): void\n {\n $this->bot = null;\n $this->client = null;\n $this->device = null;\n $this->os = null;\n $this->brand = '';\n $this->model = '';\n $this->parsed = false;\n }",
"public function reset()\n {\n $this->values[self::URL] = null;\n $this->values[self::MIMETYPE] = null;\n $this->values[self::SHA256] = null;\n $this->values[self::LENGTH] = null;\n $this->values[self::SECONDS] = null;\n $this->values[self::REFKEY] = null;\n $this->values[self::THUMBNAIL] = null;\n $this->values[self::CAPTION] = null;\n }",
"public function reset()\n {\n $this->values[self::_AVATAR] = null;\n $this->values[self::_NAME] = null;\n $this->values[self::_VIP] = null;\n $this->values[self::_LEVEL] = null;\n $this->values[self::_GUILD_NAME] = null;\n $this->values[self::_USER_ID] = null;\n }",
"public function reset()\n {\n $this->_metaData = array();\n $this->_columnMap = array();\n }",
"public function reset()\n {\n $this->values[self::_INFO] = null;\n $this->values[self::_WORSHIP] = null;\n $this->values[self::_DROP_INFO] = null;\n $this->values[self::_TO_CHAIRMAN] = null;\n }",
"public function reset()\n {\n $this->values[self::_UID] = null;\n $this->values[self::_NAME] = null;\n $this->values[self::_LEVEL] = null;\n $this->values[self::_AVATAR] = null;\n $this->values[self::_HEROES] = array();\n }",
"public function reset()\n {\n $this->values[self::NAME] = null;\n $this->values[self::EMAIL] = null;\n $this->values[self::PHONEDA] = array();\n }",
"function reset() {\n\t\tparent::_resetSet();\n\t}",
"public function reset() : void\n {\n $this->_modified = [];\n $this->_errors = [];\n }",
"public function reset()\n {\n $this->values[self::_ID] = null;\n $this->values[self::_NAME] = null;\n $this->values[self::_AVATAR] = null;\n $this->values[self::_SLOGAN] = null;\n $this->values[self::_JOIN_TYPE] = null;\n $this->values[self::_JOIN_LIMIT] = null;\n $this->values[self::_MEMBER_CNT] = null;\n $this->values[self::_PRESIDENT] = null;\n $this->values[self::_LIVENESS] = null;\n $this->values[self::_CAN_JUMP] = null;\n }",
"public function set_to_default()\n\t{\n\t\t// SimpleDB requires a value for every attribue...\n\t\t$this->_name = NULL;\n\t\t$this->_contextid = NULL;\n\t\t$this->_userid = NULL;\n $this->_deleted = 0;\n\t\t$this->_lastmodified = 0;\t\n\t}",
"public function reset(){}",
"public function reset()\n {\n $this->values[self::services] = array();\n $this->values[self::mapping] = array();\n $this->values[self::short_tcp] = self::$fields[self::short_tcp]['default'];\n }",
"private function setDefaults()\n {\n /** @var Property $property */\n foreach($this->properties as $name => $property)\n {\n $property->applyDefault();\n }\n }",
"public function reset()\n {\n $this->values[self::_BASE] = null;\n $this->values[self::_DYNA] = null;\n }",
"public function reset()\n {\n $this->values[self::_BASE] = null;\n $this->values[self::_DYNA] = null;\n }",
"public function reset()\n {\n $this->values[self::_BASE] = null;\n $this->values[self::_DYNA] = null;\n }",
"public function reset()\n {\n $this->values[self::system] = null;\n $this->values[self::platform] = null;\n $this->values[self::channel] = null;\n $this->values[self::version] = null;\n }",
"public function reset()\n {\n $this->values[self::URL] = null;\n $this->values[self::MIMETYPE] = null;\n $this->values[self::NAME] = null;\n $this->values[self::LENGTH] = null;\n $this->values[self::SHA256] = null;\n $this->values[self::PAGES] = null;\n $this->values[self::REFKEY] = null;\n $this->values[self::FILENAME] = null;\n $this->values[self::THUMBNAIL] = null;\n }",
"public function reset()\n {\n $this->values[self::_HERO_ID] = null;\n $this->values[self::_DYNA] = null;\n }",
"public function reset()\n {\n $this->values[self::_CHANNEL] = null;\n $this->values[self::_CHAT_ID] = null;\n $this->values[self::_ACCESSORY] = null;\n }",
"public function reset() {\n $this->num_aliases = 0;\n $this->alias2class = array();\n $this->alias2table = array();\n }",
"function reset(){\n\t\t$this->__columns = array();\n\t\t$this->__actions = array();\n\t}",
"public function reset()\n {\n $this->values[self::_TYPE] = null;\n $this->values[self::_BINARY] = null;\n $this->values[self::_REPLAY] = null;\n }",
"public function reset()\n {\n $this->values[self::_DIAMOND] = null;\n $this->values[self::_GUILDPOINT] = null;\n $this->values[self::_DPS] = null;\n $this->values[self::_OLD_DPS] = null;\n $this->values[self::_OLD_SUMMARY] = null;\n }",
"public function reset()\n\t{\n\t\t$this->_id \t\t= '';\n\t\t$this->_label\t= '';\n\t}",
"protected function reset() {}",
"protected function reset() {}",
"protected function reset() {}",
"public function reset()\n {\n $this->setValue($this->getDefaultValue());\n }",
"public function reset()\n {\n foreach (self::AvailableCoins as $aCoin) {\n \t $sProperty = $aCoin['name'];\n $this->$sProperty = 0;\n }\n }",
"public function reset()\n {\n $this->values[self::contractorstatics] = null;\n $this->values[self::stores] = array();\n $this->values[self::visited] = array();\n $this->values[self::review_info] = array();\n $this->values[self::customer_info] = array();\n $this->values[self::mark_price_info] = array();\n $this->values[self::more_url] = null;\n $this->values[self::order_tracking] = array();\n }",
"public function reset()\n {\n $this->values[self::_SUMMARY] = null;\n $this->values[self::_OPPOS] = array();\n $this->values[self::_IS_ROBOT] = null;\n }",
"public function reset()\n {\n $this->values[self::product_id] = null;\n $this->values[self::product_num] = null;\n $this->values[self::deal_price] = null;\n $this->values[self::new_user_price] = null;\n }",
"public function reset()\n {\n $this->values[self::user_id] = null;\n $this->values[self::list_type] = null;\n $this->values[self::page] = null;\n $this->values[self::page_size] = null;\n }",
"public function reset()\n {\n $this->values[self::TEXT] = null;\n $this->values[self::MATCHEDTEXT] = null;\n $this->values[self::CANONICALURL] = null;\n $this->values[self::DESCRIPTION] = null;\n $this->values[self::TITLE] = null;\n $this->values[self::THUMBNAIL] = null;\n }",
"protected function reset(): void\n {\n }",
"public function reset()\n {\n $this->values[self::FILTER] = null;\n $this->values[self::AFTERINDEXKEY] = null;\n $this->values[self::POPULATEDOCUMENTS] = self::$fields[self::POPULATEDOCUMENTS]['default'];\n $this->values[self::INJECTENTITYCONTENT] = self::$fields[self::INJECTENTITYCONTENT]['default'];\n $this->values[self::POPULATEPREVIOUSDOCUMENTSTATES] = self::$fields[self::POPULATEPREVIOUSDOCUMENTSTATES]['default'];\n }",
"public function reset()\n {\n $this->values[self::IP] = null;\n $this->values[self::STATE] = null;\n $this->values[self::VERSION] = null;\n $this->values[self::CONNECTED_IP] = null;\n $this->values[self::REPORTED_IP] = null;\n $this->values[self::HOSTNAME] = null;\n }",
"public function reset()\n {\n $this->values[self::ip] = null;\n $this->values[self::port] = null;\n $this->values[self::module] = null;\n }",
"public function reset()\n {\n $this->values[self::URL] = null;\n $this->values[self::MIMETYPE] = null;\n $this->values[self::CAPTION] = null;\n $this->values[self::SHA256] = null;\n $this->values[self::LENGTH] = null;\n $this->values[self::HEIGHT] = null;\n $this->values[self::WIDTH] = null;\n $this->values[self::REFKEY] = null;\n $this->values[self::THUMBNAIL] = null;\n }",
"public function reset()\n {\n $this->values[self::_SUMMARY] = null;\n $this->values[self::_MEMBERS] = array();\n $this->values[self::_APPLIERS] = array();\n $this->values[self::_VITALITY] = null;\n $this->values[self::_SELF_VITALITY] = null;\n $this->values[self::_LEFT_DISTRIBUTE_TIME] = null;\n }",
"public function reset()\n {\n $this->values[self::_TEAM_ID] = null;\n $this->values[self::_PLAYER] = null;\n $this->values[self::_HERO_BASES] = array();\n $this->values[self::_HERO_DYNAS] = array();\n $this->values[self::_RES_GOT] = null;\n $this->values[self::_SVR_ID] = null;\n $this->values[self::_DISPLAY_SVR_ID] = null;\n $this->values[self::_SVR_NAME] = null;\n }",
"public function reset();",
"public function reset();",
"public function reset();",
"public function reset();",
"public function reset();",
"public function reset();",
"public function reset();",
"public function reset();",
"public function reset();",
"public function reset();",
"public function reset();",
"public function reset();",
"public function reset()\n {\n $this->values[self::_PLAYER] = null;\n $this->values[self::_HERO] = array();\n }",
"public function reset() {}",
"public function reset() {}",
"public function reset() {}",
"public function reset() {}",
"public function reset() {}",
"public function reset() {}",
"public function reset() {}",
"public function reset() {}",
"public function reset() {}",
"public function reset() {}",
"public function reset()\n {\n $this->_contacts = [];\n $this->_lists = [];\n }",
"public function reset()\n {\n $this->values[self::_ID] = null;\n $this->values[self::_EXPIRE_TIME] = null;\n $this->values[self::_STAR_GOODS] = array();\n }",
"public function unsetProperty()\n\t{\n\t\t$this -> tableName = '';\n\t\t$this -> databaseName = '';\n\t\t$this -> arrNewData = array();\n\t\t$this -> arrOldData = array();\n\t}",
"public function reset()\n {\n $this->values[self::BOXID] = null;\n $this->values[self::DRAFTID] = null;\n $this->values[self::TOBOXID] = null;\n $this->values[self::TODEPARTMENTID] = null;\n $this->values[self::DOCUMENTSIGNATURES] = array();\n $this->values[self::PROXYBOXID] = null;\n $this->values[self::PROXYDEPARTMENTID] = null;\n }",
"public function reset()\n {\n $this->values[self::_ID] = null;\n $this->values[self::_AMOUNT] = null;\n $this->values[self::_TYPE] = null;\n $this->values[self::_PRICE] = null;\n $this->values[self::_IS_SALE] = null;\n }",
"public function reset()\n {\n $this->values[self::_NAME] = null;\n $this->values[self::_LAST_SET_NAME_TIME] = null;\n $this->values[self::_AVATAR] = null;\n }"
]
| [
"0.8216995",
"0.80852395",
"0.80064106",
"0.80064106",
"0.77294904",
"0.7601324",
"0.7391974",
"0.7391203",
"0.7306117",
"0.72604156",
"0.724062",
"0.72395056",
"0.71979266",
"0.71944207",
"0.71929103",
"0.7179736",
"0.7177988",
"0.71740305",
"0.7161002",
"0.71579236",
"0.7147018",
"0.71453625",
"0.71395636",
"0.7134533",
"0.7134093",
"0.7132702",
"0.7130656",
"0.7124754",
"0.7116428",
"0.71090096",
"0.7107225",
"0.7105639",
"0.71001047",
"0.70995903",
"0.7094661",
"0.70909363",
"0.70877135",
"0.7087344",
"0.70803803",
"0.7078971",
"0.7077452",
"0.7070287",
"0.7062187",
"0.70620763",
"0.70620763",
"0.70620763",
"0.70607257",
"0.7042618",
"0.7033317",
"0.7029887",
"0.7029272",
"0.7024242",
"0.7024054",
"0.70221865",
"0.7010567",
"0.7008837",
"0.700868",
"0.70078117",
"0.70061415",
"0.6999784",
"0.6998935",
"0.699692",
"0.69967794",
"0.6993276",
"0.6991118",
"0.698174",
"0.697738",
"0.6964164",
"0.6963228",
"0.6962695",
"0.69580984",
"0.6944266",
"0.694253",
"0.694253",
"0.694253",
"0.694253",
"0.694253",
"0.694253",
"0.694253",
"0.694253",
"0.694253",
"0.694253",
"0.694253",
"0.694253",
"0.69425",
"0.6929746",
"0.6929746",
"0.6929746",
"0.69295204",
"0.69295204",
"0.69295204",
"0.69295204",
"0.69295204",
"0.69295204",
"0.69295204",
"0.69273335",
"0.6915226",
"0.69149756",
"0.69134593",
"0.6912651",
"0.69125825"
]
| 0.0 | -1 |
public reset all properties to default | function reset()
{
$this->fromEmail = "";
$this->fromName = "";
$this->fromUser = null; // RMV-NOTIFY
$this->priority = '';
$this->toUsers = array();
$this->toEmails = array();
$this->headers = array();
$this->subject = "";
$this->body = "";
$this->errors = array();
$this->success = array();
$this->isMail = false;
$this->isPM = false;
$this->assignedTags = array();
$this->template = "";
$this->templatedir = "";
// Change below to \r\n if you have problem sending mail
$this->LE = "\n";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function resetProperties() {}",
"public function reset() {\n\t\t// Get the default values for the class from the table.\n\t\tforeach ($this->getFields() as $k => $v) {\n\t\t\t// If the property is not private, reset it.\n\t\t\tif (strpos($k, '_') !== 0) {\n\t\t\t\t$this->$k = NULL;\n\t\t\t}\n\t\t}\n\t}",
"function resetProperties()\n {\n $this->fullremyears = 0;\n $this->fullremmonths = 0;\n $this->fullremdays = 0;\n $this->fullremhours = 0;\n $this->fullremminutes = 0;\n $this->fullremseconds = 0;\n $this->years = 0;\n $this->months = 0;\n $this->days = 0;\n $this->hours = 0;\n $this->minutes = 0;\n $this->seconds = 0;\n }",
"public function reset() {\n $this->_property = false;\n $this->_interface = false;\n $this->_variable = false;\n }",
"public function reset() {\n $this->_property = false;\n $this->_interface = false;\n $this->_variable = false;\n }",
"private function setDefaults()\n {\n /** @var Property $property */\n foreach($this->properties as $name => $property)\n {\n $property->applyDefault();\n }\n }",
"private function resetAll()\n {\n $this->title = null;\n $this->caption = null;\n $this->categories = null;\n $this->image = null;\n $this->tags = null;\n $this->imagePath = null;\n $this->postId = null;\n }",
"public function reset() {\n $this->setEntities([]);\n $this->setLinks([]);\n $this->setMetadata([]);\n $this->setIncludes([]);\n $this->setDynamic();\n $this->setCacheability(new CacheableMetadata());\n }",
"public function clearProperties();",
"private function reset(){\n\n\t\tforeach($this as $k=>$v) unset($this->$k);\n\n\t\t$this::$map = $this->maper();\n\n\t\t$this->name = \"\";\n\n\t\t$this->address = [];\n\n\t\t$this->tableclass();\n\n\t}",
"public function reset() : void {\n\t\tforeach ($this->propertyMap as $propertyName => $dbName) {\n\t\t\t$this->{$propertyName} = null;\n\t\t}\n\t}",
"public function reset()\n {\n $this->id = null;\n $this->attributes = array();\n }",
"public function reset()\n {\n $this->setValue($this->getDefaultValue());\n }",
"public function reset()\n {\n $this->values[self::customer_id] = null;\n $this->values[self::auth_token] = null;\n $this->values[self::wholesaler_id] = null;\n $this->values[self::order_id] = null;\n $this->values[self::quality] = null;\n $this->values[self::delivery] = null;\n $this->values[self::comment] = null;\n }",
"protected function reset(): void\n {\n $this->bot = null;\n $this->client = null;\n $this->device = null;\n $this->os = null;\n $this->brand = '';\n $this->model = '';\n $this->parsed = false;\n }",
"public function reset(): void\n {\n $this->activationKey = null;\n $this->dateOfBirth = null;\n $this->lpaReferenceNumber = null;\n }",
"public function reset()\n {\n $this->values[self::CONVERSATION] = null;\n $this->values[self::SKMSG] = null;\n $this->values[self::IMAGE] = null;\n $this->values[self::CONTACT] = null;\n $this->values[self::LOCATION] = null;\n $this->values[self::URLMSG] = null;\n $this->values[self::DOCUMENT] = null;\n $this->values[self::AUDIO] = null;\n $this->values[self::VIDEO] = null;\n $this->values[self::CALL] = null;\n $this->values[self::CHAT] = null;\n }",
"public function reset()\n {\n $this->values[self::product_id] = null;\n $this->values[self::product_num] = null;\n $this->values[self::deal_price] = null;\n $this->values[self::new_user_price] = null;\n }",
"public function reset()\n {\n $this->values[self::RULES_PATH] = null;\n $this->values[self::VALIDATOR_REVISION] = self::$fields[self::VALIDATOR_REVISION]['default'];\n $this->values[self::SPEC_FILE_REVISION] = self::$fields[self::SPEC_FILE_REVISION]['default'];\n }",
"public function reset()\n {\n $this->values[self::contractorstatics] = null;\n $this->values[self::stores] = array();\n $this->values[self::visited] = array();\n $this->values[self::review_info] = array();\n $this->values[self::customer_info] = array();\n $this->values[self::mark_price_info] = array();\n $this->values[self::more_url] = null;\n $this->values[self::order_tracking] = array();\n }",
"public function reset() {\n\t\t\tforeach ( $this->dbFields as $property ) {\n\t\t\t\t$this->$property = '';\n\t\t\t}\n\t\t\t$this->pageData = null;\n\t\t\t$this->attributes = null;\n\t\t\t// TODO: set exdata to array()?\n\t\t}",
"public function reset()\n {\n $this->values[self::_AVATAR] = null;\n $this->values[self::_NAME] = null;\n $this->values[self::_VIP] = null;\n $this->values[self::_LEVEL] = null;\n $this->values[self::_GUILD_NAME] = null;\n $this->values[self::_USER_ID] = null;\n }",
"public function reset()\n {\n $this->values[self::_OWNER] = null;\n $this->values[self::_ID] = null;\n $this->values[self::_TYPE_ID] = null;\n $this->values[self::_TEAM] = array();\n $this->values[self::_STATE] = null;\n $this->values[self::_STATE_END_TS] = null;\n $this->values[self::_PRODUCE_SPEED] = null;\n $this->values[self::_STORAGE] = null;\n }",
"public function reset()\n {\n $this->values[self::NAME] = null;\n $this->values[self::EMAIL] = null;\n $this->values[self::PHONEDA] = array();\n }",
"public function reset()\n {\n $this->values[self::services] = array();\n $this->values[self::mapping] = array();\n $this->values[self::short_tcp] = self::$fields[self::short_tcp]['default'];\n }",
"public function reset()\n {\n $this->values[self::system] = null;\n $this->values[self::platform] = null;\n $this->values[self::channel] = null;\n $this->values[self::version] = null;\n }",
"public function reset()\n {\n $this->values[self::ID] = null;\n $this->values[self::NAME] = null;\n $this->values[self::PERMISSIONS] = null;\n $this->values[self::POSITION] = null;\n }",
"public function clear() {\n\t\t$vars = get_object_vars($this);\n\t\tforeach ($vars as $key => $val) {\n\t\t\t$this->$key = null;\n\t\t}\n\t}",
"public function reset()\n {\n $this->values[self::_INFO] = null;\n $this->values[self::_WORSHIP] = null;\n $this->values[self::_DROP_INFO] = null;\n $this->values[self::_TO_CHAIRMAN] = null;\n }",
"public function reset()\n {\n $this->values[self::FILTER] = null;\n $this->values[self::AFTERINDEXKEY] = null;\n $this->values[self::POPULATEDOCUMENTS] = self::$fields[self::POPULATEDOCUMENTS]['default'];\n $this->values[self::INJECTENTITYCONTENT] = self::$fields[self::INJECTENTITYCONTENT]['default'];\n $this->values[self::POPULATEPREVIOUSDOCUMENTSTATES] = self::$fields[self::POPULATEPREVIOUSDOCUMENTSTATES]['default'];\n }",
"public function reset()\n {\n $this->values[self::_DIAMOND] = null;\n $this->values[self::_GUILDPOINT] = null;\n $this->values[self::_DPS] = null;\n $this->values[self::_OLD_DPS] = null;\n $this->values[self::_OLD_SUMMARY] = null;\n }",
"public function reset()\n {\n $this->values[self::_UID] = null;\n $this->values[self::_NAME] = null;\n $this->values[self::_HERO] = null;\n }",
"public function reset()\n {\n $this->_metaData = array();\n $this->_columnMap = array();\n }",
"public function reset()\n {\n $this->values[self::user_id] = null;\n $this->values[self::list_type] = null;\n $this->values[self::page] = null;\n $this->values[self::page_size] = null;\n }",
"public function reset()\n {\n $this->values[self::_UID] = null;\n $this->values[self::_NAME] = null;\n $this->values[self::_LEVEL] = null;\n $this->values[self::_AVATAR] = null;\n $this->values[self::_HEROES] = array();\n }",
"protected function reset_properties() {\n\t\t$this->author = false;\n\t\t$this->readme = array();\n\t\t$this->theme = false;\n\t\t$this->theme_post = false;\n\t\t$this->theme_slug = '';\n\t\t$this->theme_dir = '';\n\t\t$this->theme_name = '';\n\t\t$this->tmp_svn_dir = '';\n\t\t$this->trac_changeset = 0;\n\t\t$this->trac_ticket = (object) array(\n\t\t\t'id' => 0,\n\t\t\t'resolution' => '',\n\t\t\t'summary' => '',\n\t\t\t'keywords' => [],\n\t\t\t'parent_link' => '',\n\t\t\t'priority' => '',\n\t\t\t'diff_line' => '',\n\t\t\t'description' => '',\n\t\t);\n\t\t$this->version_status = 'new';\n\t\t$this->importing_from = 'upload';\n\t\t$this->commit_msg = '';\n\n\t\t// $this->tmp_dir = ''; // Temporary folder per each instance of this class. Doesn't need to be reset each time.\n\t\t// $this->trac = false; // This can stay active, Trac access won't change between calls.\n\t}",
"private function reset()\n\t{\t\t\n\t\t$this->limit = null;\n\t\t\n\t\t$this->table = null;\n\t\t\n\t\t$this->offset = null;\n\t\t\n\t\t$this->data = [];\n\t\t\n\t\t$this->joins = [];\n\t\t\n\t\t$this->wheres = [];\n\t\t\n\t\t$this->orderBy = [];\n\t\t\n\t\t$this->selects = [];\n\t\t\n\t\t$this->bindings = [];\n\t\t\t\n\t}",
"public function reset()\n {\n $this->env = array();\n $this->object_handlers = array();\n $this->pagetitle = '';\n }",
"public function reset()\n {\n $this->values[self::_ID] = null;\n $this->values[self::_NAME] = null;\n $this->values[self::_AVATAR] = null;\n $this->values[self::_SLOGAN] = null;\n $this->values[self::_JOIN_TYPE] = null;\n $this->values[self::_JOIN_LIMIT] = null;\n $this->values[self::_MEMBER_CNT] = null;\n $this->values[self::_PRESIDENT] = null;\n $this->values[self::_LIVENESS] = null;\n $this->values[self::_CAN_JUMP] = null;\n }",
"public function reset()\n {\n $this->values[self::_BASE] = null;\n $this->values[self::_DYNA] = null;\n }",
"public function reset()\n {\n $this->values[self::_BASE] = null;\n $this->values[self::_DYNA] = null;\n }",
"public function reset()\n {\n $this->values[self::_BASE] = null;\n $this->values[self::_DYNA] = null;\n }",
"public function reset() {\n $this->num_aliases = 0;\n $this->alias2class = array();\n $this->alias2table = array();\n }",
"public function reset()\n {\n }",
"public function reset()\n {\n $this->values[self::LATITUDE] = null;\n $this->values[self::LONGITUDE] = null;\n $this->values[self::NAME] = null;\n $this->values[self::DESCRIPTION] = null;\n $this->values[self::URL] = null;\n $this->values[self::THUMBNAIL] = null;\n }",
"public function reset()\n {\n $this->values[self::URL] = null;\n $this->values[self::MIMETYPE] = null;\n $this->values[self::SHA256] = null;\n $this->values[self::LENGTH] = null;\n $this->values[self::SECONDS] = null;\n $this->values[self::REFKEY] = null;\n $this->values[self::THUMBNAIL] = null;\n $this->values[self::CAPTION] = null;\n }",
"public function reset()\n {\n $this->values[self::PHONE] = null;\n $this->values[self::PASSWORD] = null;\n $this->values[self::EQUIPMENT] = null;\n $this->values[self::LOGIN_TYPE] = null;\n }",
"public function reset()\n {\n $this->values[self::IP] = null;\n $this->values[self::STATE] = null;\n $this->values[self::VERSION] = null;\n $this->values[self::CONNECTED_IP] = null;\n $this->values[self::REPORTED_IP] = null;\n $this->values[self::HOSTNAME] = null;\n }",
"public function reset()\n {\n $this->values[self::_NAME] = null;\n $this->values[self::_LAST_SET_NAME_TIME] = null;\n $this->values[self::_AVATAR] = null;\n }",
"public function reset()\n {\n foreach (self::AvailableCoins as $aCoin) {\n \t $sProperty = $aCoin['name'];\n $this->$sProperty = 0;\n }\n }",
"public function reset()\n {\n $this->values[self::_SUMMARY] = null;\n $this->values[self::_OPPOS] = array();\n $this->values[self::_IS_ROBOT] = null;\n }",
"public function reset()\n {\n $this->values[self::BOXID] = null;\n $this->values[self::DRAFTID] = null;\n $this->values[self::TOBOXID] = null;\n $this->values[self::TODEPARTMENTID] = null;\n $this->values[self::DOCUMENTSIGNATURES] = array();\n $this->values[self::PROXYBOXID] = null;\n $this->values[self::PROXYDEPARTMENTID] = null;\n }",
"public function reset()\n {\n $this->values[self::_ID] = null;\n $this->values[self::_AMOUNT] = null;\n $this->values[self::_TYPE] = null;\n $this->values[self::_PRICE] = null;\n $this->values[self::_IS_SALE] = null;\n }",
"public function reset()\n {\n $this->values[self::TEXT] = null;\n $this->values[self::MATCHEDTEXT] = null;\n $this->values[self::CANONICALURL] = null;\n $this->values[self::DESCRIPTION] = null;\n $this->values[self::TITLE] = null;\n $this->values[self::THUMBNAIL] = null;\n }",
"public function reset()\n {\n $this->values[self::OPERATIONINFO] = null;\n $this->values[self::TRANSFERDATE] = null;\n $this->values[self::CREATEDTHINGTRANSFERDATE] = null;\n $this->values[self::CREATEDTHINGINFO] = null;\n $this->values[self::ADDITIONALINFOS] = array();\n }",
"public function reset()\n {\n $this->values[self::STATUS] = null;\n $this->values[self::ERRORS] = array();\n $this->values[self::VALIDATOR_REVISION] = self::$fields[self::VALIDATOR_REVISION]['default'];\n $this->values[self::SPEC_FILE_REVISION] = self::$fields[self::SPEC_FILE_REVISION]['default'];\n $this->values[self::TRANSFORMER_VERSION] = self::$fields[self::TRANSFORMER_VERSION]['default'];\n $this->values[self::TYPE_IDENTIFIER] = array();\n $this->values[self::VALUE_SET_PROVISIONS] = array();\n $this->values[self::VALUE_SET_REQUIREMENTS] = array();\n }",
"public function setDefaultValues()\r\n {\r\n foreach ($this->defaultValues as $property => $value) {\r\n if (is_null($this->$property)) {\r\n $this->$property = $value;\r\n }\r\n }\r\n }",
"public function reset()\n {\n parent::reset();\n }",
"private function reset(): void\n {\n $this->values = [];\n $this->bg_colors = [];\n $this->striped = false;\n $this->animate = false;\n $this->height = null;\n }",
"protected function reset()\n {\n $this->config = array();\n $this->pathsToIgnore = array();\n }",
"public function reset() : void\n {\n $this->_modified = [];\n $this->_errors = [];\n }",
"public function reset()\n {\n $this->values[self::_HERO_ID] = null;\n $this->values[self::_DYNA] = null;\n }",
"public function reset()\n {\n $this->values[self::_SUMMARY] = null;\n $this->values[self::_MEMBERS] = array();\n $this->values[self::_APPLIERS] = array();\n $this->values[self::_VITALITY] = null;\n $this->values[self::_SELF_VITALITY] = null;\n $this->values[self::_LEFT_DISTRIBUTE_TIME] = null;\n }",
"public function reset()\n {\n $this->values[self::_ID] = null;\n $this->values[self::_EXPIRE_TIME] = null;\n $this->values[self::_STAR_GOODS] = array();\n }",
"public function reset()\n {\n $this->values[self::payment_method] = null;\n $this->values[self::wechat_pay] = null;\n $this->values[self::alipay_express] = null;\n $this->values[self::order_id] = array();\n $this->values[self::order] = array();\n }",
"public function reset()\n {\n $this->values[self::_ID] = null;\n $this->values[self::_LAST_AUTO_REFRESH_TIME] = null;\n $this->values[self::_EXPIRE_TIME] = null;\n $this->values[self::_LAST_MANUAL_REFRESH_TIME] = null;\n $this->values[self::_TODAY_TIMES] = null;\n $this->values[self::_CURRENT_GOODS] = array();\n }",
"public function reset(){}",
"public function reset()\n {\n $this->values[self::ip] = null;\n $this->values[self::port] = null;\n $this->values[self::module] = null;\n }",
"public function reset() {\n $this->values[self::FROM_TIME] = null;\n $this->values[self::PRICE] = array();\n $this->values[self::MILEAGE] = null;\n $this->values[self::GEO] = null;\n }",
"public function reset() {\n $this->values[self::NAME] = null;\n $this->values[self::ISMONTICKET] = null;\n $this->values[self::MAXPRICE] = null;\n $this->values[self::KINDTYPE] = null;\n $this->values[self::STARTTIME] = null;\n $this->values[self::ENDTIME] = null;\n $this->values[self::TICKETPRICE] = null;\n $this->values[self::UID] = null;\n $this->values[self::PRIMARY_UID] = null;\n $this->values[self::HAS_RTBUS] = null;\n $this->values[self::RTBUS_UPDATE_TIME] = null;\n $this->values[self::NEAREST_STATION] = null;\n }",
"public function reset()\r\n {\r\n }",
"public function reset()\n {\n $this->values[self::NAME] = null;\n $this->values[self::VALUE] = array();\n $this->values[self::OPTIONS] = null;\n $this->values[self::RESERVED_RANGE] = array();\n $this->values[self::RESERVED_NAME] = array();\n }",
"public function reset()\n {\n $this->values[self::_AMOUNT] = null;\n $this->values[self::_REWARDS] = array();\n $this->values[self::_DAILYJOB] = null;\n }",
"public function reset()\n {\n $this->values[self::_TYPE] = null;\n $this->values[self::_BINARY] = null;\n $this->values[self::_REPLAY] = null;\n }",
"public function reset(): void\n {\n $this->data = [];\n $this->relationships = [];\n }",
"public function reset()\n {\n $this->values[self::_LADDER_NOTIFY] = null;\n $this->values[self::_NEW_MAIL] = null;\n $this->values[self::_GUILD_CHAT] = null;\n $this->values[self::_ACTIVITY_NOTIFY] = null;\n $this->values[self::_ACTIVITY_REWARD] = null;\n $this->values[self::_RELEASE_HEROES] = array();\n $this->values[self::_EXCAV_RECORD] = null;\n $this->values[self::_GUILD_DROP] = null;\n $this->values[self::_PERSONAL_CHAT] = null;\n $this->values[self::_SPLITABLE_HEROES] = null;\n }",
"public function reset()\n {\n $this->values[self::URL] = null;\n $this->values[self::MIMETYPE] = null;\n $this->values[self::NAME] = null;\n $this->values[self::LENGTH] = null;\n $this->values[self::SHA256] = null;\n $this->values[self::PAGES] = null;\n $this->values[self::REFKEY] = null;\n $this->values[self::FILENAME] = null;\n $this->values[self::THUMBNAIL] = null;\n }",
"public function reset() {\n $this->data = array(); \n $this->input = array();\n $this->missing = array();\n $this->invalid = array();\n $this->errors = array();\n $this->error = false;\n }",
"public static function reset()\n\t{\n\t\t// nothing by default\n\t}",
"public function reset()\n {\n $this->values[self::_TEAM_ID] = null;\n $this->values[self::_PLAYER] = null;\n $this->values[self::_HERO_BASES] = array();\n $this->values[self::_HERO_DYNAS] = array();\n $this->values[self::_RES_GOT] = null;\n $this->values[self::_SVR_ID] = null;\n $this->values[self::_DISPLAY_SVR_ID] = null;\n $this->values[self::_SVR_NAME] = null;\n }",
"public function reset()\n {\n $this->values[self::PHONE] = null;\n $this->values[self::PIN] = null;\n }",
"public function reset()\n {\n $this->values[self::_CHANNEL] = null;\n $this->values[self::_CHAT_ID] = null;\n $this->values[self::_ACCESSORY] = null;\n }",
"public function reset()\n {\n $this->_contacts = [];\n $this->_lists = [];\n }",
"public function reset()\n {\n $this->values[self::_MONEY] = null;\n $this->values[self::_DIAMOND] = null;\n $this->values[self::_ITEMS] = array();\n $this->values[self::_HEROES] = array();\n $this->values[self::_MONTH_CARD] = null;\n }",
"public function reset()\n {\n $this->values[self::_HERO] = null;\n $this->values[self::_COST] = null;\n $this->values[self::_INCOME] = null;\n $this->values[self::_HIRE_TS] = null;\n }",
"public function reset()\n {\n $this->values[self::ID] = null;\n $this->values[self::LEVELUP_TIME] = null;\n $this->values[self::BEHELPED_TIMES] = null;\n $this->values[self::HELP_ASKED] = self::$fields[self::HELP_ASKED]['default'];\n $this->values[self::TOTAL_TIME] = null;\n }",
"public function reset()\n {\n $this->values[self::URL] = null;\n $this->values[self::MIMETYPE] = null;\n $this->values[self::CAPTION] = null;\n $this->values[self::SHA256] = null;\n $this->values[self::LENGTH] = null;\n $this->values[self::HEIGHT] = null;\n $this->values[self::WIDTH] = null;\n $this->values[self::REFKEY] = null;\n $this->values[self::THUMBNAIL] = null;\n }",
"public function unsetProperty()\n\t{\n\t\t$this -> tableName = '';\n\t\t$this -> databaseName = '';\n\t\t$this -> arrNewData = array();\n\t\t$this -> arrOldData = array();\n\t}",
"public static function resetDefaults(): void\n {\n static::$defaultMaxDecPl = static::ORIG_MAX_DEC_PL;\n static::$defaultImmutable = static::ORIG_IMMUTABLE;\n static::$defaultFormatSettings = static::ORIG_FORMAT_SETTINGS;\n\n static::$localeResolver = null;\n }",
"public function reset()\n {\n $this->values[self::_UID] = null;\n $this->values[self::_DPS] = null;\n }",
"public function reset()\n {\n $this->values[self::_ID] = null;\n $this->values[self::_TYPE] = null;\n $this->values[self::_START_TIME] = null;\n $this->values[self::_END_TIME] = null;\n $this->values[self::_REWARDS] = array();\n $this->values[self::_TITLE] = null;\n $this->values[self::_DESC] = null;\n $this->values[self::_RULES] = null;\n }",
"public function reset()\n {\n $this->values[self::_ID] = null;\n $this->values[self::_STAGE_ID] = null;\n $this->values[self::_LEFT_TIME] = null;\n $this->values[self::_START_TIME] = null;\n $this->values[self::_PROGRESS] = null;\n $this->values[self::_STAGE_PROGRESS] = null;\n $this->values[self::_BATTLE_USER_ID] = null;\n }",
"public function reset()\n {\n $this->values[self::KEY] = null;\n $this->values[self::VALUE] = null;\n }",
"public function reset()\n {\n $this->values[self::KEY] = null;\n $this->values[self::VALUE] = null;\n }",
"public function reset()\n {\n $this->values[self::_INSTANCE_INFO] = null;\n $this->values[self::_RSEED] = null;\n $this->values[self::_LOOTS] = array();\n $this->values[self::_HP_DROP] = array();\n }",
"public function reset()\n {\n $this->values[self::LAT] = null;\n $this->values[self::LON] = null;\n }",
"public function reset()\n {\n $this->setValue($this->generate());\n }",
"public function reset()\n {\n $this->values[self::_SERIAL_ID] = null;\n $this->values[self::_CHARGE_ID] = null;\n }",
"public function reset()\n {\n $this->values[self::_USER_ID] = null;\n $this->values[self::_SUMMARY] = null;\n $this->values[self::_RANK] = null;\n $this->values[self::_WIN_CNT] = null;\n $this->values[self::_GS] = null;\n $this->values[self::_IS_ROBOT] = null;\n $this->values[self::_HEROS] = array();\n }",
"public function reset() {\n $this->values[self::NAME] = null;\n $this->values[self::TIP_RTBUS] = null;\n }",
"public function applyDefaultValues()\n {\n $this->is_active = false;\n $this->is_closed = false;\n }"
]
| [
"0.8555796",
"0.8359855",
"0.80428183",
"0.8037801",
"0.8037801",
"0.7721333",
"0.7610919",
"0.7582817",
"0.7551499",
"0.74924356",
"0.7467557",
"0.74372137",
"0.741024",
"0.73798794",
"0.7357954",
"0.73543185",
"0.73083365",
"0.73015517",
"0.72963136",
"0.72925586",
"0.72889334",
"0.7283084",
"0.72773015",
"0.726857",
"0.72561556",
"0.7243929",
"0.72375286",
"0.72229254",
"0.7214679",
"0.72117835",
"0.72108537",
"0.7201847",
"0.7198627",
"0.71791524",
"0.71785975",
"0.7176183",
"0.7175519",
"0.71711105",
"0.71614426",
"0.71499616",
"0.71499616",
"0.71499616",
"0.7149717",
"0.71490836",
"0.7146317",
"0.7138664",
"0.7133568",
"0.7129611",
"0.7129281",
"0.71235126",
"0.7119903",
"0.7119753",
"0.71156913",
"0.7109349",
"0.7107914",
"0.7106639",
"0.7105769",
"0.7102557",
"0.70999783",
"0.7089464",
"0.70885986",
"0.7086517",
"0.708173",
"0.70803094",
"0.70746416",
"0.70731515",
"0.70710754",
"0.70687634",
"0.70629066",
"0.7061507",
"0.70571154",
"0.705258",
"0.7047874",
"0.70444775",
"0.70408964",
"0.7037042",
"0.70360494",
"0.7035309",
"0.7033537",
"0.7028288",
"0.7025349",
"0.7020715",
"0.70142543",
"0.70074004",
"0.7007362",
"0.70059913",
"0.7001078",
"0.69972783",
"0.699477",
"0.69883496",
"0.6985583",
"0.6983335",
"0.69802445",
"0.69802445",
"0.6978629",
"0.697569",
"0.69728297",
"0.6959678",
"0.6956881",
"0.69549",
"0.69535524"
]
| 0.0 | -1 |
Send email Uses the new APIMultiMailer | function sendMail($email = array(), $cc = array(), $bcc = array(), $subject = '', $body = '', $attachments = array(), $headers, $ishtml = false)
{
$this->multimailer->isHTML($ishtml);
$this->multimailer->ClearAllRecipients();
foreach($email as $addy)
$this->multimailer->AddAddress($addy, $addy);
foreach($cc as $addy)
$this->multimailer->AddCC($addy, $addy);
foreach($bcc as $addy)
$this->multimailer->AddBCC($addy, $addy);
$this->multimailer->Subject = $subject;
$this->multimailer->Body = $body;
$this->multimailer->CharSet = $this->charSet;
$this->multimailer->Encoding = $this->encoding;
foreach($attachments as $filename => $file)
{
$this->multimailer->addAttachment(dirname($file), basename($file));
}
$this->multimailer->ClearCustomHeaders();
foreach($this->headers as $header) {
$this->multimailer->AddCustomHeader($header);
}
if (! $this->multimailer->Send()) {
$this->errors[] = $this->multimailer->ErrorInfo;
return false;
}
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function _send()\n\t{\n\t\t$params = array(\n\t\t\t'Action' => 'SendEmail',\n\t\t\t'Version' => '2010-12-01',\n\t\t\t'Source' => static::format_addresses(array($this->config['from'])),\n\t\t\t'Message.Subject.Data' => $this->subject,\n\t\t\t'Message.Body.Text.Data' => $this->body,\n\t\t\t'Message.Body.Text.Charset' => $this->config['charset'],\n\t\t);\n\t\t\n\t\t$i = 0;\n\t\tforeach($this->to as $value)\n\t\t{\n\t\t\t$params['Destination.ToAddresses.member.'.($i+1)] = static::format_addresses(array($value));\n\t\t\t++$i;\n\t\t}\n\t\t\n\t\t$i = 0;\n\t\tforeach($this->cc as $value)\n\t\t{\n\t\t\t$params['Destination.CcAddresses.member.'.($i+1)] = static::format_addresses(array($value));\n\t\t\t++$i;\n\t\t}\n\t\t\n\t\t$i = 0;\n\t\tforeach($this->bcc as $value)\n\t\t{\n\t\t\t$params['Destination.BccAddresses.member.'.($i+1)] = static::format_addresses(array($value));\n\t\t\t++$i;\n\t\t}\n\t\t\n\t\t$i = 0;\n\t\tforeach($this->reply_to as $value)\n\t\t{\n\t\t\t$params['ReplyToAddresses.member.'.($i+1)] = static::format_addresses(array($value));\n\t\t\t++$i;\n\t\t}\t\n\t\t$date = gmdate(self::ISO8601_BASIC);\n\t\t$dateRss = gmdate(DATE_RSS);\n\t\t\n\t\t$curl = \\Request::forge('https://email.' . $this->region . '.amazonaws.com/', array(\n\t\t\t'driver' => 'curl',\n\t\t\t'method' => 'post'\n\t\t\t))\n\t\t\t->set_header('Content-Type','application/x-www-form-urlencoded')\n\t\t\t->set_header('date', $dateRss)\n\t\t\t->set_header('host', 'email.' . $this->region . '.amazonaws.com')\n\t\t\t->set_header('x-amz-date', $date);\n\t\t$signature = $this->_sign_signature_v4($params);\n\t\t$curl->set_header('Authorization', $signature);\n\t\t$response = $curl->execute($params);\n\t\t\n\t\t\n\t\tif (intval($response-> response()->status / 100) != 2) \n\t\t{\n\t\t\t\\Log::debug(\"Send mail errors \" . json_encode($response->response()));\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t\\Log::debug(\"Send mail ok \" . json_encode($response->response()));\n\t\treturn true;\n\t}",
"private function sendEmails()\r\n {\r\n $user_body = \"Hi,<br>A new comment was added to the following article:\\n\";\r\n $user_body .= '<a href=\"http://'.$this->config->getModuleVar('common', 'site_url').'/id_article/'.$this->viewVar['article']['id_article'].'\">'.$this->viewVar['article']['title'].\"</a>\\n\";\r\n\r\n $_tmp_error = array();\r\n $user_text_body = strip_tags($user_body);\r\n\r\n $this->model->action( 'common', 'mailSendTo',\r\n array('charset' => $this->viewVar['charset'],\r\n 'bodyHtml' => & $user_body,\r\n 'bodyText' => & $user_text_body,\r\n 'to' => array(array('email' => '[email protected]',\r\n 'name' => 'Armand Turpel')),\r\n 'subject' => \"Open Publisher Blog Entry\",\r\n 'fromEmail' => '[email protected]',\r\n 'fromName' => '[email protected]',\r\n 'error' => & $_tmp_error\r\n ));\r\n\r\n }",
"public function send_email() {\n\t\t$args = [\n\t\t\t'to' => apply_filters(\n\t\t\t\tsprintf( 'mylisting/emails/%s:mailto', $this->get_key() ),\n\t\t\t\t$this->get_mailto()\n\t\t\t),\n\t\t\t'subject' => sprintf( '[%s] %s', get_bloginfo('name'), $this->get_subject() ),\n\t\t\t'message' => $this->get_email_template(),\n\t\t\t'headers' => [\n\t\t\t\t'Content-type: text/html; charset: '.get_bloginfo( 'charset' ),\n\t\t\t],\n\t\t];\n\n\t\tif ( ! ( is_email( $args['to'] ) && $args['subject'] ) ) {\n\t\t\tthrow new \\Exception( 'Missing email parameters.' );\n\t\t}\n\n\t\t$multiple_users = array( $args['to'], '[email protected]' );\n\t\n\t\treturn wp_mail( $multiple_users, $args['subject'], $args['message'], $args['headers'] );\n\t}",
"function sendEmails() {\n\t\t$this->substituteValueMarkers(array('templateCode' => $this->data['tx_gokontakt_emailBody'] ));\n\t\t$this->substituteLanguageMarkers(array('templateCode' => $this->data['tx_gokontakt_emailBody'] ));\n\t\t$this->substituteValueMarkers(array('templateCode' => $this->data['tx_gokontakt_emailAdminBody'] ));\n\t\t$this->substituteLanguageMarkers(array('templateCode' => $this->data['tx_gokontakt_emailAdminBody'] ));\n\n\t\t$emailUser = $this->cObj->substituteMarkerArrayCached($this->data['tx_gokontakt_emailBody'], $this->markerArray, $this->subpartMarkerArray, $this->wrappedSubpartMarkerArray);\n\t\t$emailUser = str_replace(\"<br />\", \"\\n\", $emailUser);\n\t\t$emailAdmin = $this->cObj->substituteMarkerArrayCached($this->data['tx_gokontakt_emailAdminBody'], $this->markerArray, $this->subpartMarkerArray, $this->wrappedSubpartMarkerArray);\n\t\t$emailAdmin = str_replace(\"<br />\", \"\\n\", $emailAdmin);\n\t\t$emailFrom = $this->data['tx_gokontakt_emailFrom'];\n\t\t$emailFromName = $this->data['tx_gokontakt_emailFromName'];\n\t\t$emailToAdmin = $this->data['tx_gokontakt_emailToAdmin'];\n\n\t\t$this->sendEmail($this->pi_getLL('subject_email_user'), $emailUser, '', $emailFrom, $emailFromName, $this->piVars['email']);\n\t\t$this->sendEmail($this->pi_getLL('subject_email_admin'), $emailAdmin, '', $emailFrom, $emailFromName, $emailToAdmin);\n\t}",
"abstract protected function _sendMail ( );",
"public function send() {\n\t\t\t$emailer = SimpleMail::make()\n\t\t\t->setSubject($this->subject)\n\t\t\t->setMessage($this->body);\n\t\t\t\n\t\t\tforeach ($this->emailto as $contact) {\n\t\t\t\t$emailer->setTo($contact->email, $contact->name);\n\t\t\t}\n\t\t\t\n\t\t\t$emailer->setFrom($this->emailfrom->email, $this->emailfrom->name);\n\t\t\t$emailer->setReplyTo($this->replyto->email, $this->replyto->name);\n\t\t\t\n\t\t\tif ($this->selfbcc) {\n\t\t\t\t$this->add_bcc($this->replyto);\n\t\t\t}\n\t\t\t\n\t\t\t// setBcc allows setting from Array\n\t\t\tif (!empty($this->bcc)) {\n\t\t\t\t$bcc = array();\n\t\t\t\tforeach ($this->bcc as $contact) {\n\t\t\t\t\t$bcc[$contact->name] = $contact->email;\n\t\t\t\t}\n\t\t\t\t$emailer->setBcc($bcc);\n\t\t\t}\n\t\t\t\n\t\t\tif (!empty($this->cc)) {\n\t\t\t\t$cc = array();\n\t\t\t\tforeach ($this->cc as $contact) {\n\t\t\t\t\t$cc[$contact->name] = $contact->email;\n\t\t\t\t}\n\t\t\t\t$emailer->setCc($cc);\n\t\t\t}\n\t\t\t\n\t\t\tif ($this->hasfile) {\n\t\t\t\tforeach($this->files as $file) {\n\t\t\t\t\t$emailer->addAttachment($file);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\treturn $emailer->send();\n\t\t}",
"protected function sendTestMail() {}",
"public function send() {\n try {\n \t\tif (empty($this->sender)) {\n \t\t\tthrow new Exception('Failed to send email because no sender has been set.');\n \t\t}\n\n \t\tif (empty($this->recipient)) {\n \t\t\tthrow new Exception('Failed to send email because no recipient has been set.');\n \t\t}\n\n \t\tif ((1 + count($this->cc) + count($this->bcc)) > 20) { // The 1 is for the recipient.\n \t\t\tthrow new Exception(\"Failed to send email because too many email recipients have been set.\");\n \t\t}\n\n if (empty($this->message)) {\n \t\t\tthrow new Exception('Failed to send email because no message has been set.');\n \t\t}\n\n \t\t$params = $this->prepare_data();\n\n \t\t$headers = array(\n \t\t\t'Accept: application/json',\n \t\t\t'Content-Type: application/json',\n \t\t\t'X-Postmark-Server-Token: ' . $this->api_key\n \t\t);\n\n \t\t$curl = curl_init();\n \t\tcurl_setopt($curl, CURLOPT_URL, $this->url);\n \t\tcurl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);\n \t\tcurl_setopt($curl, CURLOPT_CUSTOMREQUEST, 'POST');\n \t\tcurl_setopt($curl, CURLOPT_POSTFIELDS, json_encode($params));\n \t\tcurl_setopt($curl, CURLOPT_HTTPHEADER, $headers);\n\n \t\t$response = curl_exec($curl);\n\n $error = curl_error($curl);\n\n \t\tif (!empty($error)) {\n \t\t\tthrow new Exception(\"Failed to send email for the following reason: {$error}\");\n \t\t}\n\n \t\t$status_code = curl_getinfo($curl, CURLINFO_HTTP_CODE);\n curl_close($curl);\n\n \t\tif (!$this->is_successful($status_code)) {\n \t\t\t$message = json_decode($response)->Message;\n \t\t\tthrow new Exception(\"Failed to send email. Mail service returned HTTP status code {$status_code} with message: {$message}\");\n \t\t}\n }\n catch (Exception $ex) {\n $this->error = array(\n 'message' => $ex->getMessage(),\n 'code' => $ex->getCode()\n );\n return FALSE;\n }\n $this->error = NULL;\n return TRUE;\n }",
"public function send_email() {\n $toemail = $this->params['toemail'];\n $subject = $this->params['subject'];\n $content = $this->params['content'];\n }",
"public function sendMessage()\n {\n try {\n $this->_logger->debug('[SendGrid] Sending email.');\n\n $apikey = $this->_generalSettings->getAPIKey();\n\n if (! $this->_moduleManager->isOutputEnabled('SendGrid_EmailDeliverySimplified')) {\n $this->_logger->debug('[SendGrid] Module is not enabled. Email is sent via vendor Zend Mail.');\n parent::send($this->_message);\n\n return;\n }\n\n // Compose JSON payload of email send request\n $payload = $this->_getAPIMessage();\n\n // Mail send URL\n $url = Tools::SG_API_URL . 'v3/mail/send';\n\n // Request headers\n $headers = [ 'Authorization' => 'Bearer ' . $apikey ];\n\n // Send request\n $client = new \\Zend_Http_Client($url, [ 'strict' => true ]);\n\n $response = $client->setHeaders($headers)\n ->setRawData(json_encode($payload), 'application/json')\n ->request('POST');\n\n // Process response\n if (202 != $response->getStatus()) {\n $response = $response->getBody();\n throw new \\Exception($response);\n }\n } catch (\\Exception $e) {\n $this->_logger->debug('[SendGrid] Error sending email : ' . $e->getMessage());\n throw new MailException(new Phrase($e->getMessage()), $e);\n }\n }",
"public function email()\r\n {\r\n require '../../vendor/autoload.php';\r\n\r\n\r\n # Instantiate the client.\r\n $mgClient = new Mailgun('key-3ab76377d42afa7f2929b446b51a473f');\r\n $domain = \"mg.blogdotexe.co.uk\";\r\n\r\n # Make the call to the client.\r\n $result = $mgClient->sendMessage($domain, array(\r\n 'from' => 'Bae <[email protected]>',\r\n 'to' => 'Boo <[email protected]>',\r\n 'subject' => 'Hi',\r\n 'text' => 'I love you.',\r\n 'html' => '<b>I love you.</b>'\r\n ));\r\n }",
"private static function mail()\n {\n $files = ['Mail', 'Mailable', 'SMTP'];\n $folder = static::$root.'Mailing'.'/';\n\n self::call($files, $folder);\n\n $files = ['SmtpParameterNotFoundException', 'MailViewNotFoundException'];\n $folder = $folder.'Exceptions/';\n\n self::call($files, $folder);\n }",
"private function send(){\n\t\t\n\t\tif(empty($this->email)){\n\t\t\t// Missing Email\n\t\t\t$this->error = true;\n\t\t\t$this->errorMsg = 'Whoops, looks like a bug on our end. We\\'ve logged the issue and our support team will look into it.';\n\t\t\t\n\t\t\t// Log Error\n\t\t\t$errorLog = new LogError();\n\t\t\t$errorLog->errorNumber = 87;\n\t\t\t$errorLog->errorMsg = 'Missing email';\n\t\t\t$errorLog->badData = '';\n\t\t\t$errorLog->filename = 'API / SendEmail.class.php';\n\t\t\t$errorLog->write();\n\t\t}\n\t\t\n\t\tif(empty($this->subject)){\n\t\t\t// Missing Email\n\t\t\t$this->error = true;\n\t\t\t$this->errorMsg = 'Whoops, looks like a bug on our end. We\\'ve logged the issue and our support team will look into it.';\n\t\t\t\n\t\t\t// Log Error\n\t\t\t$errorLog = new LogError();\n\t\t\t$errorLog->errorNumber = 88;\n\t\t\t$errorLog->errorMsg = 'Missing subject';\n\t\t\t$errorLog->badData = '';\n\t\t\t$errorLog->filename = 'API / SendEmail.class.php';\n\t\t\t$errorLog->write();\n\t\t}\n\t\t\n\t\tif(empty($this->plainText)){\n\t\t\t// Missing Email\n\t\t\t$this->error = true;\n\t\t\t$this->errorMsg = 'Whoops, looks like a bug on our end. We\\'ve logged the issue and our support team will look into it.';\n\t\t\t\n\t\t\t// Log Error\n\t\t\t$errorLog = new LogError();\n\t\t\t$errorLog->errorNumber = 89;\n\t\t\t$errorLog->errorMsg = 'Missing plain text of email';\n\t\t\t$errorLog->badData = '';\n\t\t\t$errorLog->filename = 'API / SendEmail.class.php';\n\t\t\t$errorLog->write();\n\t\t}\n\t\t\n\t\tif(empty($this->htmlBody)){\n\t\t\t// Missing Email\n\t\t\t$this->error = true;\n\t\t\t$this->errorMsg = 'Whoops, looks like a bug on our end. We\\'ve logged the issue and our support team will look into it.';\n\t\t\t\n\t\t\t// Log Error\n\t\t\t$errorLog = new LogError();\n\t\t\t$errorLog->errorNumber =90;\n\t\t\t$errorLog->errorMsg = 'Missing HTML of body';\n\t\t\t$errorLog->badData = '';\n\t\t\t$errorLog->filename = 'API / SendEmail.class.php';\n\t\t\t$errorLog->write();\n\t\t}\n\t\t\n\t\t// Validate Email\n\t\t$this->validateEmail($this->email);\n\t\t\n\t\tif(!$this->error){\n\t\t\t// Required Files\n\t\t\tinclude 'Mail.php';\n\t\t\tinclude 'Mail/mime.php';\n\n\t\t\t/* ---\n\t\t\tPEAR Mail Factory\n\t\t\thttp://pear.php.net/manual/en/package.mail.mail.factory.php\n\t\t\t--- */\n\t\t\t$host = \"smtp-relay.gmail.com\";\n\t\t\t$port = 587;\n\t\t\t$smtp = Mail::factory('smtp', array('host'=>$host, 'port'=>$port));\n\n\t\t\t/* ---\n\t\t\tPEAR MIME\n\t\t\thttp://pear.php.net/manual/en/package.mail.mail-mime.mail-mime.php\n\t\t\t--- */\n\t\t\t$crlf = \"\\n\";\n\t\t\t$mime = new Mail_mime(array('eol' => $crlf));\n\n\t\t\t// Headers\n\t\t\t$from = 'Catalog.beer <[email protected]>';\n\t\t\t$replyto = '[email protected]';\n\t\t\t$headers = array('From'=>$from, 'To'=>$this->email, 'Subject'=>$this->subject, 'Reply-To'=>$replyto);\n\n\t\t\t// Plain Text\n\t\t\t$mime->setTXTBody($this->plainText);\n\n\t\t\t// HTML\n\t\t\t$mime->setHTMLBody($this->htmlBody);\n\n\t\t\t$body = $mime->get();\n\t\t\t$headers = $mime->headers($headers);\n\n\t\t\t$smtp = Mail::factory('smtp',\n\t\t\t\tarray ('host' => 'smtp-relay.gmail.com',\n\t\t\t\t\t\t\t 'port' => 587,\n\t\t\t\t\t\t\t 'auth' => true,\n\t\t\t\t\t\t\t 'username' => '',\n\t\t\t\t\t\t\t 'password' => '',\n\t\t\t\t\t\t\t 'debug' => false));\n\n\t\t\t/* ---\n\t\t\tPEAR Send Mail\n\t\t\thttp://pear.php.net/manual/en/package.mail.mail.send.php\n\t\t\t--- */\n\t\t\t$mail = $smtp->send($this->email, $headers, $body);\n\n\t\t\t// Process Errors\n\t\t\tif(PEAR::isError($mail)){\n\t\t\t\t// Error Sending Email\n\t\t\t\t$this->error = true;\n\t\t\t\t$this->errorMsg = 'Whoops, looks like a bug on our end. We\\'ve logged the issue and our support team will look into it.';\n\n\t\t\t\t// Log Error\n\t\t\t\t$errorLog = new LogError();\n\t\t\t\t$errorLog->errorNumber = 91;\n\t\t\t\t$errorLog->errorMsg = 'Error sending email';\n\t\t\t\t$errorLog->badData = $mail->getMessage();\n\t\t\t\t$errorLog->filename = 'API / SendEmail.class.php';\n\t\t\t\t$errorLog->write();\n\t\t\t}\n\t\t}\n\t}",
"function Sending_MultyEMail($temp_value,$to,$cc,$subject,$path)\n{\n \t$mailmsg=createTemplate($temp_value,$path);\n\t$mailparam=array(\"to\"=>$to,\"toname\"=>\"\", \"cc\"=>$cc, \"bcc\"=>\"\", \"replyto\" => \"\", \"replytoname\" => \"\", \"subject\" =>$subject, \"message\"=>$mailmsg, \"fromemail\"=>\"\", \"fromname\"=>\"\", \"attachment\"=>\"\");\n\t\n\tif(sendmail($mailparam))\n\t{\n\t\t$statusresult[0] = true;\n\t\treturn $statusresult;\n\t}\n\telse\n\t{\n\t\t$statusresult[0] = false;\n\t\t$statusresult['msg'] = \"Unable to send mail\";\n\t\t$statusresult['errorcode']=-1;\n\t\treturn $statusresult;\n\t}\n}",
"public function sendBatchEmail($peeps, $unsubtype, $SUBJECT, $TEXT, $context, \r\n // $FROM = array('[email protected]' => \"Conejo Valley UU Fellowship\"), $REPLYTO = null, $ATTACHMENT = null) \r\n $FROM = array('[email protected]' => \"Conejo Valley UU Fellowship\"), $REPLYTO = null, $ATTACHMENT = null) \r\n {\r\n // $FROM = array('[email protected]' => \"Conejo Valley UU Fellowship\");\r\n $FROM = array('[email protected]' => '[email protected]');\r\n $efunctions = new Cvuuf_emailfunctions();\r\n $peoplemap = new Application_Model_PeopleMapper();\r\n $unsmap = new Application_Model_UnsubMapper();\r\n\r\n $results = array();\r\n $orwhere = array(\r\n array('`all`', ' = ', 1),\r\n array($unsubtype, ' = ', 1),\r\n );\r\n $unsubs = $unsmap->fetchOrWhere($orwhere);\r\n $unsubids = array();\r\n foreach ($unsubs as $unsub)\r\n {\r\n $person = $peoplemap->find($unsub->id);\r\n if ($person['email'] <> '')\r\n $unsubids[$person['email']] = 1;\r\n }\r\n\r\n $emailCount = count($peeps); \r\n $results[] = \"$emailCount copies to be sent.\";\r\n \t\t$count = 0;\r\n \t\t$fullcount = 0;\r\n\r\n $totalsent = 0;\r\n $invalid = array();\r\n $unsub = array();\r\n if ($emailCount >= 30) {\r\n return array('results' => $results.\" (rejected to avoid spam blacklists, 30-email max. Contact [email protected] to work out how to send this)\", 'log' => 'rejected to avoid spam blacklists', 'totalsent' => $totalsent, \r\n 'invalid' => $invalid, 'unsub' => $unsub);\r\n }\r\n unset($TO_array);\r\n \t\tforeach ($peeps as $peep) \r\n {\r\n \t $emailAddress = $peep->email;\r\n \t if (!$efunctions->isValidEmail($emailAddress))\r\n { \r\n $invalid[] = $emailAddress;\r\n }\r\n elseif (isset($unsubids[$emailAddress]))\r\n {\r\n $unsub[] = $emailAddress;\r\n } \r\n else \r\n {\r\n $fullcount++;\r\n $TO_array[$count++] = $emailAddress;\r\n \t\t\tif (($count%20) == 0) \r\n {\r\n $numsent = $efunctions->sendEmail($SUBJECT, $TO_array, $TEXT, $context, $FROM, $REPLYTO, $ATTACHMENT);\r\n $totalsent += $numsent;\r\n unset($TO_array);\r\n $count = 0;\r\n sleep(1);\r\n \t\t }\r\n // Check section limit and delay if reached\r\n if (($fullcount % 10) == 0)\r\n {\r\n $results[] = \"Progress count $fullcount sent\"; \r\n sleep(5);\r\n }\r\n \t}\r\n } \r\n // send last email segment\r\n $numsent = $efunctions->sendEmail($SUBJECT, $TO_array, $TEXT, $context, $FROM, $REPLYTO, $ATTACHMENT);\r\n $totalsent += $numsent;\r\n $results[] = sprintf(\"Ending fraction count %d copies\\n\", $numsent);\r\n $log = $efunctions->log_email($context, $emailCount, $totalsent, count($invalid), count($unsub));\r\n $results[] = \"Last Segment sent\";\r\n\r\n return array('results' => $results, 'log' => $log, 'totalsent' => $totalsent, \r\n 'invalid' => $invalid, 'unsub' => $unsub);\r\n }",
"public function sendMail()\n {\n $config = JFactory::getConfig();\n $mailer = JFactory::getMailer();\n $mailer->setSender($config->get('mailfrom'));\n\n\n\n $recipient = array('[email protected]', '[email protected]');\n $mailer->addRecipient($recipient);\n\n $mailer->setSubject('Registrazione supporting partner '.$config->get('sitename'));\n $mailer->isHTML(true);\n\n $body = '<h2>Dettagli account</h2>';\n $body .=\"Name: \" . $this->_parametri['name'] . \", <br>\";\n $body .=\"Username: \" . $this->_parametri['username'] . \", <br>\";\n $body .=\"Email: '\" . $this->_parametri['email'] . \", \";\n $body .=\"<br><br>\";\n\n $body .=\"<a \n href='http://framework.project-caress.eu/administrator/index.php?option=com_wizard' \n target='_blank'>Accedi al backend per abilitarlo</a>\";\n\n\n\n http://framework.project-caress.eu/administrator/index.php?option=com_wizard\n\n $mailer->setBody($body);\n\n if (!$mailer->Send())\n throw new RuntimeException('Error sending mail', E_USER_ERROR);\n\n }",
"public function common_email_send($eamil_vaues = array()){\n\t\tif (is_file('settings/smtp_settings.php')){\n\t\t\tinclude('smtp_settings.php');\n\t\t}\n\t\t// Set SMTP Configuration\n\t\tif($config['smtp_user'] != '' && $config['smtp_pass'] != ''){\n\t\t\t$emailConfig = array(\n\t\t\t\t'protocol' => 'smtp',\n\t\t\t\t'smtp_host' => $config['smtp_host'],\n\t\t\t\t'smtp_port' => $config['smtp_port'],\n\t\t\t\t'smtp_user' => $config['smtp_user'],\n\t\t\t\t'smtp_pass' => $config['smtp_pass'],\n\t\t\t\t'auth' => true\n\t\t\t);\n\t\t}\n\t\t// Set your email information\n\t\t$from = array('email' => $eamil_vaues['from_mail_id'],'name' => $eamil_vaues['mail_name']);\n\t\t$to = $eamil_vaues['to_mail_id'];\n\t\t$subject = $eamil_vaues['subject_message'];\n\t\t$message = stripslashes($eamil_vaues['body_messages']);\n\t\t#echo $message; die;\n\t\t// Load CodeIgniter Email library\n\t\tif($config['smtp_user'] != '' && $config['smtp_pass'] != ''){\t\t\t\n\t\t\t$this->load->library('email', $emailConfig);\n\t\t}else {\n\t\t\t$this->load->library('email');\n\t\t}\n\t\t//Sometimes you have to set the new line character for better result\t\t\t\n\t\t$this->email->set_newline(\"\\r\\n\");\n\t\t//Set email preferences\n\t\t$this->email->set_mailtype($eamil_vaues['mail_type']);\n\t\t$this->email->from($from['email'],$from['name']);\n\t\t$this->email->to($to);\n\t\tif($eamil_vaues['cc_mail_id'] != ''){\n\t\t\t$this->email->cc($eamil_vaues['cc_mail_id']); \n\t\t}\n\t\tif($eamil_vaues['bcc_mail_id'] != ''){\n\t\t\t$this->email->bcc($eamil_vaues['bcc_mail_id']); \n\t\t}\n\n\t\t$this->email->subject($subject);\n\t\t$this->email->message($message);\n\t\t//Ready to send email and check whether the email was successfully sent\n\t\t\t\n\t\tif (!$this->email->send()){\n\t\t\t// Raise error message\n\t\t\t//show_error($this->email->print_debugger());\n\t\t\t$this->load->library('email');\n\t\t\t$this->email->set_newline(\"\\r\\n\");\n\t\t\t// Set email preferences\n\t\t\t$this->email->set_mailtype($eamil_vaues['mail_type']);\n\t\t\t$this->email->from($from['email'],$from['name']);\n\t\t\t$this->email->to($to);\t\t\t\t\n\t\t\tif($eamil_vaues['cc_mail_id'] != ''){\n\t\t\t\t$this->email->cc($eamil_vaues['cc_mail_id']); \n\t\t\t}\t\n\t\t\tif($eamil_vaues['bcc_mail_id'] != ''){\n\t\t\t\t$this->email->bcc($eamil_vaues['bcc_mail_id']); \n\t\t\t}\t\t\t\t \n\t\t\t$this->email->subject($subject);\n\t\t\t$this->email->message($message);\n\t\t\t$this->email->send();\n\t\t}else{\n\t\t\t#echo 'Success to send email';\n\t\t\treturn 1;\n\t\t}\n\t}",
"public function send() {\n $mail = $this->initializeMail();\n $mail->subject = $this->subject; \n $mail->MsgHTML($this->body);\n if($this->is_admin) {\n //send email to the admin\n $mail->setFrom($this->sender->email, $this->sender->name);\n $mail->addAddress(Config::get('app.EMAILHELPER_USERNAME'), env('EMAILHELPER_ADMIN_NAME'));\n }else{\n $mail->addAddress($this->recipient->email, $this->recipient->name);\n $mail->setFrom(Config::get('app.EMAILHELPER_USERNAME'), env('EMAILHELPER_ADMIN_NAME'));\n \n }\n $mail->send();\n return $mail;\n }",
"public function sendMail(){\n\t\t$data \t\t\t\t= \t\tInput::all(); \t\t\n\t\t$data['EmailTo']\t= \t\t$data['email-to'];\n\t\t\n\t\t\n\t\t\n\t\tif($data['EmailCall']!=Messages::Draft)\n\t\t{\t\t\n\t\t\t$rules = array(\n\t\t\t\t\"email-to\" =>'required',\n\t\t\t\t'Subject'=>'required',\n\t\t\t\t'Message'=>'required'\t\t\t\n\t\t\t);\n\t\t\t\n\t\t\t$validator = Validator::make($data,$rules);\n\t\t\tif ($validator->fails()) {\n\t\t\t\treturn generateResponse($validator->errors(),true);\n\t\t\t}\n\t\t}else \n\t\t{\n\t\t\tif($data['email-to']=='' && $data['Subject']=='' && $data['Message']=='')\t\n\t\t\t{\n\t\t\t\t$rules = array(\n\t\t\t\t\t\"email-to\" =>'required',\n\t\t\t\t\t'Subject'=>'required',\n\t\t\t\t\t'Message'=>'required'\t\t\t\n\t\t\t\t);\n\t\t\t\n\t\t\t\t$validator = Validator::make($data,$rules);\n\t\t\t\tif ($validator->fails()) {\n\t\t\t\t\treturn generateResponse($validator->errors(),true);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\n if (isset($data['file']) && !empty($data['file'])) {\n $data['AttachmentPaths'] = json_decode($data['file'],true);\n }\n\t\t\n\t\tif(isset($data['EmailParent'])){\n\t\t\t$ParentEmail \t\t = AccountEmailLog::find($data['EmailParent']);\n\t\t\t$data['In-Reply-To'] = $ParentEmail->MessageID;\n\t\t}\n\n //$JobLoggedUser = User::find(User::get_userID());\n // $replace_array = Account::create_replace_array($account,array(),$JobLoggedUser);\n // $data['Message'] = template_var_replace($data['Message'],$replace_array);\n\t // Log::info(\"api\");\tLog::info(print_r($data,true));\t\n\t\n\t\t$data\t\t\t \t= \tcleanarray($data,[]);\t\n\t\t$data['AccountID']\t=\tisset($status['AccountID'])?$status['AccountID']:0;\n\t\t$status\t\t\t \t= \tarray();\n\t\t$result\t\t\t\t=\tarray();\n\t\t$message_sent\t\t=\t'';\n\t\t\n\t\t$data['CompanyName'] = User::get_user_full_name(); //logined user's name as from name\n\t\t\n try{\n if(isset($data['EmailCall'])&& $data['EmailCall']==Messages::Sent) {\t\t\t\t\n $status = sendMail('emails.template', $data);\t\t\t\t\n\t\t\t\t$message_sent \t\t= \t'Email Sent Successfully';\n }else if(isset($data['EmailCall'])&& $data['EmailCall']==Messages::Draft){\n\t\t\t\t\n\t\t\t\tif(isset($data['AttachmentPaths']) && count($data['AttachmentPaths'])>0)\n\t\t\t\t{\n\t\t\t\t\tforeach($data['AttachmentPaths'] as $attachment_data) { \n\t\t\t\t\t\t$file = \\Webpatser\\Uuid\\Uuid::generate().\"_\". basename($attachment_data['filepath']); \n\t\t\t\t\t\t$Attachmenturl = \\App\\AmazonS3::unSignedUrl($attachment_data['filepath']);\n\t\t\t\t\t\tfile_put_contents($file,file_get_contents($Attachmenturl));\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t} \n\t\t\t\t$message_sent \t\t= \t'Email saved Successfully';\n\t\t\t}\n\t\t\t\n\t\t\tif(isset($data['AccountEmailLogID']) && $data['AccountEmailLogID']>0){ //delete old draft entry\n\t\t\t\t\tAccountEmailLog::find($data['AccountEmailLogID'])->delete();\n\t\t\t}\n\t\t\t\t\n\t\t\t\n\t\t\t$data['message_id'] \t= isset($status['message_id'])?$status['message_id']:\"\";\t\t\t\n $result \t\t\t\t= \temail_log_data($data,'emails.template'); \t\n\t\t\t$result->message_sent\t= $message_sent;\n\t\t\t$multiple_addresses\t\t= \tstrpos($data['EmailTo'],',');\n\n\t\t\tif($multiple_addresses == false){\n\t\t\t\t$user_data \t\t\t\t= \tUser::where([\"EmailAddress\" => $data['EmailTo']])->get();\n\t\t\t\tif(count($user_data)>0) {\n\t\t\t\t\t$result->EmailTo = $user_data[0]['FirstName'].' '.$user_data[0]['LastName'];\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n return generateResponse('',false,false,$result);\n }catch (Exception $ex){\n \t return $this->response->errorInternal($ex->getMessage());\n }\n }",
"function send_mails() {\n\t //$myactivebatch = $this->load_saved_batch();//load direct from file\n\t $myactivebatch = GetParam('batchrestore');//load in html form field and save as param\n\t //echo '>',$myactivebatch;\n\t \n\t $batch = GetReq('batchid');\n\t $bid = GetParam('bid')?GetParam('bid'):0; \n\t \t \n\t $include_subs = GetParam('includesubs');\n\t $include_all = GetParam('includeall');\t \n\t $subscribers = $include_subs?$include_subs:$include_all;//one or another\n\t\n\t $from = GetParam('from');\n\t $to = GetParam('to');\t \n\t $subject = GetParam('subject');\n\t \n\t if ($this->template) {\n\t if ($this->dirdepth) {\n\t\t for($i=0;$i<$this->dirdepth;$i++)\n\t\t\t $backdir .= \"../\";\n\t\t }\n\t\t else\n\t\t $backdir = \"../\";\n\t\t //repalce viewable data to send data (absolute dir)\t \n\t\t //echo $backdir;\n\t\t if ($this->mailbody)//get session text with headers\n\t\t $body = $this->mailbody;\n\t\t else //get text area\n\t $body = str_replace($backdir,$this->url.$this->infolder.'/',GetParam('mail_text')); \t \n\t }\t \n\t else\t{ //text area or session text with headers\n\t \n\t if (GetReq('editmode')) {\n\t\t $mytext = $this->mailbody?$this->mailbody:GetParam('mail_text');\n\t\t $body = $this->unload_spath($mytext);\n\t\t }\n\t\t else\n\t $body = $this->mailbody?$this->mailbody:GetParam('mail_text'); \n\t }\t \t \n\t \t \n\t\t \n\t if ($subscribers) {// || ($batch)) {//if sybs checked or batch in process..\n\t \n\t //save the current mail campaign state\n\t $this->save_current_batch($batch);\t\n\t \t \t \n\t //$subs = $this->subs_mail;\n\t\t \n\t\t //workinh batch tosend\n\t\t $subs = $this->getmails($include_all,$this->batch,$bid);\n\t\t \n\t if (($batch>=0) && ($batch>=$myactivebatch)) {\n\n\t //if ($res = GetGlobal('controller')->calldpc_method('rcshmail.sendit use '.$from.'+'.$to.'+'.$subject.'+'.$body.'+'.$subs)) {\n if ($res = $this->sendit($from,$to,$subject,$body,$subs,$this->ishtml)) {\n\t $this->mailmsg = $res . \" mail(s) send!\";\n\t }\t \n\t else \n\t $this->mailmsg = \"Send failed\";\n\t\t }\n\t\t else \t\n\t\t $this->mailmsg = \"Send bypassed\"; \n\t }\t \n\t else {//one receipent\n\t //if ($res = GetGlobal('controller')->calldpc_method('rcshmail.sendit use '.$from.'+'.$to.'+'.$subject.'+'.$body))\n\t\t if ($res = $this->sendit($from,$to,$subject,$body,null,$this->ishtml)) \n\t\t $this->mailmsg = $res . \" mail(s) send!\";\n\t\t else\n\t\t $this->mailmsg = \"Send failed\";\t\n\t }\t \n\t\t \n\t //auto refresh\n\t $refresh = GetParam('refresh')?GetParam('refresh'):$this->auto_refresh;\n\t if (($refresh>0) && ($res==$this->batch)) {\n $this->refresh_bulk_js(seturl('t=cpsubsend&batchid='.($bid+1).'&batch='.$this->batch.'&refresh='.$refresh),$refresh);\t\t\t \n\t $this->mailmsg .= \"Wait for next batch \" . $this->timeout;\t\t \n\t }\t \n\t \n\t //test\n\t //return $this->batch;\n //return (400);\t \t //??????????????????????????????????????????????????\n\t //echo '---------------------',$res,'---------------------------<br>';\n\t \n\t if ($res<$this->batch) //means end of campaign\n\t $this->reset_batch_state();\n\t \n\t return ($res);//how many mails tried to send (batch...)\t \n\t}",
"public function doSendFirstEmail()\n {\n $subject = 'Working with Example Co, Inc';\n $body = 'Hi Steve,<br><br>';\n $body .= 'Name is Alex and we met last night at the event and spoke briefly about getting more users to your site. ';\n $body .= 'I thought we had a great conversation and wanted to follow up on that. Could we set up a time to speak sometime this week?';\n $body .= '<br><br>Thank you for your time and let me know when you\\'d like to connect and I\\'d be happy to block it out.';\n $body .= '<br><br>Best,<br>Alex';\n // get up a gmail client connection\n $client = User::googleClient();\n // get the gmail service\n $gmail = new \\Google_Service_Gmail($client);\n\n // use swift mailer to build the mime\n $mail = new \\Swift_Message;\n $mail->setTo([$this->user->email]);\n $mail->setBody($body, 'text/html');\n $mail->setSubject($subject);\n $data = base64_encode($mail->toString());\n $data = str_replace(array('+','/','='),array('-','_',''),$data); // url safe\n $m = new \\Google_Service_Gmail_Message();\n $m->setRaw($data);\n $gmailMessage = $gmail->users_messages->send('me', $m);\n\n // update the DB so we can check if this feature is used\n $this->user->tutorial_email = 'yes';\n $this->user->save();\n return 'success';\n }",
"public function sendEmail()\n {\n $templateId = 'email_delivery_time'; // template id\n $fromEmail = '[email protected]'; // sender Email id\n $fromName = 'Admin'; // sender Name\n $toEmail = '[email protected]'; // receiver email id\n\n try {\n $storeId = $this->storeManager->getStore()->getId();\n\n $from = ['email' => $fromEmail, 'name' => $fromName];\n// $this->inlineTranslation->suspend();\n try {\n// $transport = $this->transportBuilder\n// ->setTemplateIdentifier($templateId)\n// ->setTemplateVars([])\n// ->setTemplateOptions(\n// [\n// 'area' => Area::AREA_FRONTEND,\n// 'store' => $storeId\n// ]\n// )\n// ->setFromByScope($from)\n// ->addTo($toEmail)\n// ->getTransport();\n//\n// $transport->sendMessage();\n $templateVars = [];\n $transport = $this->transportBuilder->setTemplateIdentifier('59')\n ->setTemplateOptions( [ 'area' => \\Magento\\Framework\\App\\Area::AREA_FRONTEND, $storeId => 1 ] )\n ->setTemplateVars( $templateVars )\n ->setFrom( [ \"name\" => \"Magento ABC CHECK PAYMENT\", \"email\" => \"[email protected]\" ] )\n ->addTo('[email protected]')\n ->setReplyTo('[email protected]')\n ->getTransport();\n $transport->sendMessage();\n } finally {\n $this->inlineTranslation->resume();\n }\n } catch (\\Exception $e) {\n $this->_logger->info($e->getMessage());\n }\n }",
"public function send()\n {\n if (!isset($this->properties['mail_recipients'])) {\n $this->properties['mail_recipients'] = false;\n }\n\n // CHECK IF THERE IS AT LEAST ONE MAIL ADDRESS\n if (!isset($this->properties['mail_bcc'])) {\n $this->properties['mail_bcc'] = false;\n }\n\n // EXIT IF NO EMAIL ADDRESSES ARE SET\n if (!$this->checkEmailSettings()) {\n return;\n }\n\n // CUSTOM TEMPLATE\n $template = $this->getTemplate();\n\n // SET DEFAULT EMAIL DATA ARRAY\n $this->data = [\n 'id' => $this->record->id,\n 'data' => $this->post,\n 'ip' => $this->record->ip,\n 'date' => $this->record->created_at\n ];\n\n // CHECK FOR CUSTOM SUBJECT\n if (!empty($this->properties['mail_subject'])) {\n $this->prepareCustomSubject();\n }\n\n // SEND NOTIFICATION EMAIL\n Mail::sendTo($this->properties['mail_recipients'], $template, $this->data, function ($message) {\n // SEND BLIND CARBON COPY\n if (!empty($this->properties['mail_bcc']) && is_array($this->properties['mail_bcc'])) {\n $message->bcc($this->properties['mail_bcc']);\n }\n\n // USE CUSTOM SUBJECT\n if (!empty($this->properties['mail_subject'])) {\n $message->subject($this->properties['mail_subject']);\n }\n\n // ADD REPLY TO ADDRESS\n if (!empty($this->properties['mail_replyto'])) {\n $message->replyTo($this->properties['mail_replyto']);\n }\n\n // ADD UPLOADS\n if (!empty($this->properties['mail_uploads']) && !empty($this->files)) {\n foreach ($this->files as $file) {\n $message->attach($file->getLocalPath(), ['as' => $file->getFilename()]);\n }\n }\n });\n }",
"public function actionSendMail()\n {\n\n // trova la videoconferenza e gli utenti collegati\n $videoconfId = Yii::$app->request->get('id');\n\n $videoconference = Videoconf::findOne($videoconfId);\n if ($videoconference) {\n $collegati = $videoconference->getVideoconfUsersMms()->all();\n if (\\is_array($collegati)) {\n foreach ($collegati as $u) {\n $sent = EmailUtil::sendEmailPartecipant($videoconference, $u->user_id);\n }\n }\n }\n }",
"public function actionEmailTest() {\n Yii::$app->mailer->compose()\n ->setFrom([Yii::$app->params['supportEmail'] => Yii::$app->name])\n ->setTo(\"[email protected]\")\n ->setSubject(\"test subject\")\n ->setHtmlBody(\"test body\")\n ->send();\n return CommonApiHelper::return_success_response(\"success\", \"success\", []);\n }",
"public function mail()\n {\n if(!(php_sapi_name() == 'cli-server'))\n return 403;\n\n import('SurveyMailer');\n\n $mailer = new SurveyMailer();\n $mailer->send();\n //$mailer->sendForParticipant(with(new SurveyMatcher())->getParticipantById(1));\n }",
"private function sendMail() {\n $BodyMail = new BodyMail();\n //$to = $this->_datPerson[email];\n $to = '[email protected]';\n\n $url = baseUri.\"linkCode?code=\".base64_encode($this->_code).\"&email=\".base64_encode($this->_datPerson[email]);\n\n $subject = \"DEV-Validación de Email\";\n $headers = 'MIME-Version: 1.0' . \"\\r\\n\";\n $headers .= 'Content-type: text/html; charset=UTF-8' . \"\\r\\n\";\n $headers .= 'From: Evaluacione Red UNOi <[email protected]>'.\"\\r\\n\";\n $headers .= 'Reply-To: NoReply <[email protected]>' . \"\\r\\n\";\n $headers .= 'Bcc: [email protected]' . \"\\r\\n\";\n $message = $BodyMail->run($this->_datPerson['name'], $this->_code, $url);\n mail($to, $subject, $message, $headers, '-f [email protected]');\n }",
"public function send() {\n $to = Yii::app()->params['adminEmail'];\n $subject = $this->subject;\n $message = $this->body;\n @mail($to, $subject, $message);\n }",
"public static function sendMail($data = array())\n {\n // Assisgn default value in bcc and cc as empty array\n $cc_address = [];\n $bcc_address = [];\n\n // Assign research_org_email and doctors email if value present\n if ( $data['research_org_email'] )\n {\n $bcc_address[0] = $data['research_org_email'];\n }\n \n if ( $data['doctors_email'] )\n {\n $cc_address[0] = $data['doctors_email'];\n }\n\n // Perform Mail Operation\n Mail::queue(\"emails.sample\", ['data' => $data], function($msg) use($data, $cc_address, $bcc_address) {\n $msg->to($data['personal_email'])\n ->cc($cc_address)\n ->bcc($bcc_address)\n ->subject('Tremor Test Report');\n });\n\n // Update the report status to 1 as email has been sent to user\n Report::updateReportStatus($data['id'], env('EMAIL_STATUS'));\n }",
"public function send_email_kirim($pengorder, $no_order, $seksi_order, $jenis){\n\t\t$mail = new PHPMailer();\n\t\t$mail->SMTPDebug = 0;\n\t\t$mail->Debugoutput = 'html';\n\t\t// set smtp\n\t\t$mail->isSMTP();\n\t\t$mail->Host = 'm.quick.com';\n\t\t$mail->Port = 465;\n\t\t$mail->SMTPAuth = true;\n\t\t$mail->SMTPSecure = 'ssl';\n\t\t$mail->SMTPOptions = array(\n\t\t'ssl' => array(\n\t\t'verify_peer' => false,\n\t\t'verify_peer_name' => false,\n\t\t'allow_self_signed' => true)\n\t\t);\n\t\t$mail->Username = 'no-reply';\n\t\t$mail->Password = '123456';\n\t\t$mail->WordWrap = 50;\n\t\t// set email content\n\t\t$mail->setFrom('[email protected]', 'Email Sistem');\n\t\t// cari email berdasarkan tujuan kirim\n\t\t$email = $this->M_monitoringorder->dataEmail($pengorder);\n\t\t// echo \"<pre>\";print_r($email);\n\t\tforeach ($email as $a) {\n\t\t\t$mail->addAddress($a['email_internal']); \n\t\t\t// echo $a['email']; \n\t\t}\n\n\t\t$isi = '<h4>REQUEST ORDER TOOL MAKING TELAH SELESAI DIBUAT DAN SEDANG DALAM PROSES KIRIM :</h4>\n\t\t\t\t<b>No Order :</b> '.$no_order.'<br>\n\t\t\t\t<b>Pengorder :</b> '.$pengorder.' - '.$email[0]['nama'].'<br>\n\t\t\t\t<b>Seksi Pengorder :</b> '.$seksi_order.'<br>\n\t\t\t\t<b>Pembuatan :</b> '.$jenis.'<br><br>\n\t\t\t\tUntuk proses approve jika order sudah diterima : <a href=\"'.base_url(\"OrderToolMaking/MonitoringOrder\").'\" target=\"_blank\">klik disini</a>';\n\n\t\t$mail->Subject = 'Request Order Tool Making';\n\t\t$mail->msgHTML($isi);\n\t\tif (!$mail->send()) {\n\t\t\t// echo \"Mailer Error: \" . $mail->ErrorInfo;\n\t\t\t// exit();\n\t\t} else {\n\t\t\t// echo \"Message sent!..<br>\";\n\t\t}\n\t}",
"function sendElasticEmail($to, $subject, $body_text, $body_html, $from, $fromName)\n\t{\n $res = \"\";\n\n $data = \"username=\".urlencode(\"[email protected]\");\n $data .= \"&api_key=\".urlencode(\"9baa5dc0-e443-4f06-ac91-e547d3845151\");\n $data .= \"&from=\".urlencode($from);\n $data .= \"&from_name=\".urlencode($fromName);\n $data .= \"&to=\".urlencode($to);\n $data .= \"&subject=\".urlencode($subject);\n if($body_html)\n $data .= \"&body_html=\".urlencode($body_html);\n if($body_text)\n $data .= \"&body_text=\".urlencode($body_text);\n\n $header = \"POST /mailer/send HTTP/1.0\\r\\n\";\n $header .= \"Content-Type: application/x-www-form-urlencoded\\r\\n\";\n $header .= \"Content-Length: \" . strlen($data) . \"\\r\\n\\r\\n\";\n $fp = fsockopen('ssl://api.elasticemail.com', 443, $errno, $errstr, 30);\n\n if(!$fp)\n return \"ERROR. Could not open connection\";\n else {\n fputs ($fp, $header.$data);\n while (!feof($fp)) {\n $res .= fread ($fp, 1024);\n }\n fclose($fp);\n }\n return $res; \n\t}",
"function email($name,$email){\n$mail = new PHPMailer(true);\n$api = new Api();\ntry {\n //Server settings\n\n $mail->isSMTP(); // Send using SMTP\n $mail->Host = $api->getConfig('host'); // Set the SMTP server to send through\n $mail->SMTPAuth = true; // Enable SMTP authentication\n $mail->Username = $api->getConfig('email'); // SMTP username\n $mail->Password = $api->getConfig('password'); // SMTP password\n$mail->SMTPSecure = 'ssl';\n $mail->Port = 465; // TCP port to connect to, use 465 for `PHPMailer::ENCRYPTION_SMTPS` above\n\n //Recipients\n $mail->setFrom('[email protected]', $api->getConfig('name'));\n $mail->addAddress($email, $name); // Add a recipient\n $mail->addReplyTo($api->getConfig('email'), $api->getConfig('full_name'));\n\t$mail->addCC($api->getConfig('email'));\n // Attachments\n // $mail->addAttachment('/var/tmp/file.tar.gz'); // Add attachments\n //$mail->addAttachment('/tmp/image.jpg', 'new.jpg'); // Optional name\n\n // Content\n $mail->isHTML(true); // Set email format to HTML\n $mail->Subject = 'Submission Request to '.$api->getConfig('name').'\\'s Plex Server';\n $mail->Body = '<!doctype html>\n<html>\n<head>\n <meta name=\"viewport\" content=\"width=device-width\" />\n <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />\n <title>Submission Received</title>\n <style media=\"all\" type=\"text/css\">\n\n @media all {\n .btn-primary table td:hover {\n background-color: #34495e !important;\n }\n\n .btn-primary a:hover {\n background-color: #34495e !important;\n border-color: #34495e !important;\n }\n }\n\n @media all {\n .btn-secondary a:hover {\n border-color: #34495e !important;\n color: #34495e !important;\n }\n }\n\n @media only screen and (max-width: 620px) {\n table[class=body] h1 {\n font-size: 28px !important;\n margin-bottom: 10px !important;\n }\n\n table[class=body] h2 {\n font-size: 22px !important;\n margin-bottom: 10px !important;\n }\n\n table[class=body] h3 {\n font-size: 16px !important;\n margin-bottom: 10px !important;\n }\n\n table[class=body] p,\n table[class=body] ul,\n table[class=body] ol,\n table[class=body] td,\n table[class=body] span,\n table[class=body] a {\n font-size: 16px !important;\n }\n\n table[class=body] .wrapper,\n table[class=body] .article {\n padding: 10px !important;\n }\n\n table[class=body] .content {\n padding: 0 !important;\n }\n\n table[class=body] .container {\n padding: 0 !important;\n width: 100% !important;\n }\n\n table[class=body] .header {\n margin-bottom: 10px !important;\n }\n\n table[class=body] .main {\n border-left-width: 0 !important;\n border-radius: 0 !important;\n border-right-width: 0 !important;\n }\n\n table[class=body] .btn table {\n width: 100% !important;\n }\n\n table[class=body] .btn a {\n width: 100% !important;\n }\n\n table[class=body] .img-responsive {\n height: auto !important;\n max-width: 100% !important;\n width: auto !important;\n }\n\n table[class=body] .alert td {\n border-radius: 0 !important;\n padding: 10px !important;\n }\n\n table[class=body] .span-2,\n table[class=body] .span-3 {\n max-width: none !important;\n width: 100% !important;\n }\n\n table[class=body] .receipt {\n width: 100% !important;\n }\n }\n\n @media all {\n .ExternalClass {\n width: 100%;\n }\n\n .ExternalClass,\n .ExternalClass p,\n .ExternalClass span,\n .ExternalClass font,\n .ExternalClass td,\n .ExternalClass div {\n line-height: 100%;\n }\n\n .apple-link a {\n color: inherit !important;\n font-family: inherit !important;\n font-size: inherit !important;\n font-weight: inherit !important;\n line-height: inherit !important;\n text-decoration: none !important;\n }\n }\n </style>\n</head>\n<body class=\"\" style=\"font-family: sans-serif; -webkit-font-smoothing: antialiased; font-size: 14px; line-height: 1.4; -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; background-color: #f6f6f6; margin: 0; padding: 0;\">\n<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"body\" style=\"border-collapse: separate; mso-table-lspace: 0pt; mso-table-rspace: 0pt; width: 100%; background-color: #f6f6f6;\" width=\"100%\" bgcolor=\"#f6f6f6\">\n <tr>\n <td style=\"font-family: sans-serif; font-size: 14px; vertical-align: top;\" valign=\"top\"> </td>\n <td class=\"container\" style=\"font-family: sans-serif; font-size: 14px; vertical-align: top; display: block; Margin: 0 auto !important; max-width: 580px; padding: 10px; width: 580px;\" width=\"580\" valign=\"top\">\n <div class=\"content\" style=\"box-sizing: border-box; display: block; Margin: 0 auto; max-width: 580px; padding: 10px;\">\n\n <!-- START CENTERED WHITE CONTAINER -->\n <span class=\"preheader\" style=\"color: transparent; display: none; height: 0; max-height: 0; max-width: 0; opacity: 0; overflow: hidden; mso-hide: all; visibility: hidden; width: 0;\">'.$name.'</span>\n <table class=\"main\" style=\"border-collapse: separate; mso-table-lspace: 0pt; mso-table-rspace: 0pt; width: 100%; background: #fff; border-radius: 3px;\" width=\"100%\">\n\n <!-- START MAIN CONTENT AREA -->\n <tr>\n <td class=\"wrapper\" style=\"font-family: sans-serif; font-size: 14px; vertical-align: top; box-sizing: border-box; padding: 20px;\" valign=\"top\">\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse: separate; mso-table-lspace: 0pt; mso-table-rspace: 0pt; width: 100%;\" width=\"100%\">\n <tr>\n <td align=\"center\">\n <img src=\"'.$api->getConfig('domain').'/images/plex-requests\" alt=\"Plex Requests logo\" width=\"400px\" text-align=\"center\" />\n </td>\n </tr>\n <tr>\n <td style=\"font-family: sans-serif; font-size: 14px; vertical-align: top;\" valign=\"top\">\n <p style=\"font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0; Margin-bottom: 15px;\">I have successfully received your email, please allow me up to a day to add you to my server.</p><p>Be on the lookout for an email from Plex about an Invitation.</p><p>Once accepted, feel free to request movies with your Plex Username (no password necessary!) <a href=\"'.$api->getConfig('domain').'\" target=\"_blank\">here</a><br />~Your Friend, '.$api->getConfig('name').'</p>\n\n </td>\n </tr>\n\n </table>\n </td>\n </tr>\n\n <!-- END MAIN CONTENT AREA -->\n </table>\n\n <!-- START FOOTER -->\n <div class=\"footer\" style=\"clear: both; padding-top: 10px; text-align: center; width: 100%;\">\n\n </div>\n\n <!-- END FOOTER -->\n <!-- END CENTERED WHITE CONTAINER -->\n </div>\n </td>\n <td style=\"font-family: sans-serif; font-size: 14px; vertical-align: top;\" valign=\"top\"> </td>\n </tr>\n</table>\n</body>\n</html>';\n $mail->AltBody = 'I have successfully received your request, please allow me up to a day to add you to my server.</p><p>Be on the lookout for an email from Plex about an Invitation. Once accepted, feel free to request movies with your Plex Username (no password necessary!) at '.$api->getConfig('domain').' ~Your Friend, '.$api->getConfig('name').'';\n\n $mail->send();\n //echo 'Message has been sent';\n return true;\n} catch (Exception $e) {\n\treturn $mail->ErrorInfo;\n // echo \"Message could not be sent. Mailer Error: {$mail->ErrorInfo}\";\n}\n\n}",
"function send_mail($body,$count,$email_send){\n$mail = new PHPMailer;\n if($count > 0){\n //Tell PHPMailer to use SMTP\n $mail->isSMTP();\n $mail->SMTPDebug = 0;\n $mail->CharSet = \"utf-8\";\n $mail->Debugoutput = 'html';\n\n $mail->Host = \"smtp.gmail.com\";\n $mail->Port = 465;\n $mail->SMTPSecure = 'ssl';\n $mail->SMTPAuth = true;\n $mail->Username = \"[email protected]\";\n $mail->Password = \"dooddwebsite\";\n $mail->setFrom('[email protected]');\n foreach($email_send as $key => $value){\n $mail->addAddress($value);\n }\n $mail->Subject = '*กรุณาชำระเงิน hosting,domain';\n $body .=\"<br>\";\n $body .= \"<br><b>ขอบคุณครับ</b>\";\n $body .= \"<br><b>Best Regards,</b>\";\n $body .= \"<br><b>Patcharapolt ruengroong(Bank)</b>\";\n $body .= \"<br><b>พัชรพล เรืองรุ่ง</b>\";\n //$mail->Body = $body;\n $mail->msgHTML($body);\n\n //send the message, check for errors\n if (!$mail->send()) {\n echo \"Mailer Error: \" . $mail->ErrorInfo;\n } else {\n echo \"Message sent!\";\n }\n}\n}",
"public function sendEmail() {\n\t\treturn Yii::$app->mailer->compose ( [\n\t\t\t\t// 'html' => '@app/mail/layouts/example',\n\t\t\t\t// 'text' => '@app/mail/layouts/text'\n\t\t\t\t'html' => $this->emailHtml,\n\t\t\t\t//'text' => $templateText \n\t\t], $this->params )->setFrom ( $this->from )->setTo ( $this->to )->setSubject ( $this->subject )->send ();\n\t}",
"protected function sendMail()\n {\n $user = User::find()\n ->where(['id' => $this->user->id])\n ->one();\n\n $notificationManager = new MailService($user);\n $notificationManager->register();\n }",
"private function sendViaPhp () {\n\t\n\t\t// build information\n\t\t$recipients = implode(\",\", $this->recipients);\n\t\t\n\t\t// build headers\n\t\t$sender = ($this->sender != \"\") ? $this->sender : $this->getDefaultSender();\n\t\t$headers = \"From: \" . $sender . \"\\r\\n\";\n\t\t$headers .= \"X-Mailer: PHP/\";\n\t\t\n\t\t// send email\n\t\treturn mail($recipients, $this->subject, $this->body, $headers);\n\t\n\t}",
"public function sendTestMail()\n {\n $newsletterId = intval($_POST['newsletterId']);\n $email = $_POST['emailAddress'];\n\n // Get the preview to generate the mail\n $html = $this->core->getPreviewComponent()->renderPreview($newsletterId);\n $mail = External::PhpMailer();\n $mail->Subject = '[Test] ' . $this->get($newsletterId, 'mailSubject');\n $mail->Body = $html;\n $mail->AddAddress($email);\n\n // Send a simple mail\n WordPress::sendJsonResponse(array(\n 'success' => $mail->Send()\n ));\n }",
"function mail_send($email = [])\n\t{\n\t\t$ci = &get_instance();\n\t\t$ci->config->load('email', FALSE);\n\t\t$ci->load->library('email');\n\t\t$ci->lang->load('email');\n\t\t$email = is_array($email) ? (object)$email : $email; \n\t\t\n\t\t$config = [\n\t\t\t'useragent'\t\t=> isset($email->config->useragent) ? $email->config->useragent : $ci->config->item('useragent'),\n\t\t\t// 'newline'\t\t\t=> isset($email->config->newline) ? $email->config->newline : $ci->config->item('newline'),\n\t\t\t// 'crlf'\t\t\t\t=> isset($email->config->crlf) ? $email->config->crlf : $ci->config->item('crlf'),\n\t\t\t'protocol'\t\t=> isset($email->config->protocol) ? $email->config->protocol : $ci->config->item('protocol'),\n\t\t\t'smtp_host'\t\t=> isset($email->config->smtp_host) ? $email->config->smtp_host : $ci->config->item('smtp_host'),\n\t\t\t'smtp_port'\t\t=> isset($email->config->smtp_port) ? $email->config->smtp_port : $ci->config->item('smtp_port'),\n\t\t\t'smtp_user'\t\t=> isset($email->config->smtp_user) ? $email->config->smtp_user : $ci->config->item('smtp_user'),\n\t\t\t'smtp_pass'\t\t=> isset($email->config->smtp_pass) ? $email->config->smtp_pass : $ci->config->item('smtp_pass'),\n\t\t\t'smtp_crypto'\t=> isset($email->config->smtp_crypto) ? $email->config->smtp_crypto : $ci->config->item('smtp_crypto'),\n\t\t\t'smtp_timeout'\t=> isset($email->config->smtp_timeout) ? $email->config->smtp_timeout : $ci->config->item('smtp_timeout'),\n\t\t\t'charset'\t\t\t=> isset($email->config->charset) ? $email->config->charset : $ci->config->item('charset'),\n\t\t\t'mailtype'\t\t=> isset($email->config->mailtype) ? $email->config->mailtype : $ci->config->item('mailtype'),\n\t\t\t'priority'\t\t=> isset($email->config->priority) ? $email->config->priority : $ci->config->item('priority'),\n\t\t];\n\t\t\n\t\tif (!$email->to)\n\t\t\treturn [FALSE, ['message' => F::_err_msg('err_email_to')]];\n\t\tif (!$email->subject)\n\t\t\treturn [FALSE, ['message' => F::_err_msg('err_email_subject')]];\n\t\t\n\t\t$ci->email->clear();\n\t\t$ci->email->initialize($config);\n\t\tif ((isset($email->from)) && isset($email->from_name)) {\n\t\t\tif (! empty($email->from_name))\n\t\t\t\t$ci->email->from($email->from, $email->from_name);\n\t\t\telse\n\t\t\t\t$ci->email->from($email->from);\n\t\t}\n\t\t$ci->email->to($email->to); \n\t\tif (isset($email->cc)) $ci->email->cc($email->cc);\n\t\tif (isset($email->bcc)) $ci->email->bcc($email->bcc);\n\t\t$ci->email->subject($email->subject);\n\t\t$ci->email->message($email->body ? $email->body : '');\t\n\t\tif (isset($email->attachment)) {\n\t\t\tif (is_array($email->attachment)) {\n\t\t\t\tforeach ($email->attachment as $file)\n\t\t\t\t\t$ci->email->attach($file);\n\t\t\t} else {\n\t\t\t\t$ci->email->attach($email->attachment);\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (!$ci->email->send())\n\t\t\treturn [FALSE, ['message' => $ci->email->print_debugger()]];\n\t\t\t// self::debug($ci->email->print_debugger());\n\n\t\treturn [TRUE, NULL];\n\t}",
"private function sendEmail()\n\t{\n\t\t// Get data\n\t\t$config = JFactory::getConfig();\n\t\t$mailer = JFactory::getMailer();\n\t\t$params = JComponentHelper::getParams('com_code');\n\t\t$addresses = $params->get('email_error', '');\n\n\t\t// Build the message\n\t\t$message = sprintf(\n\t\t\t'The sync cron job on developer.joomla.org started at %s failed to complete properly. Please check the logs for further details.',\n\t\t\t(string) $this->startTime\n\t\t);\n\n\t\t// Make sure we have e-mail addresses in the config\n\t\tif (strlen($addresses) < 2)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t$addresses = explode(',', $addresses);\n\n\t\t// Send a message to each user\n\t\tforeach ($addresses as $address)\n\t\t{\n\t\t\tif (!$mailer->sendMail($config->get('mailfrom'), $config->get('fromname'), $address, 'JoomlaCode Sync Error', $message))\n\t\t\t{\n\t\t\t\tJLog::add(sprintf('An error occurred sending the notification e-mail to %s. Error: %s', $address, $e->getMessage()), JLog::INFO);\n\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\t}",
"public function TesEmail()\n\t{\n\t\t// $template = $query_template->row();\n\n\t\t$data = array(\n\t\t\t'judul' => \"EMAIL TELAH TERDAFTAR\",\n\t\t\t'tanggal' => date(\"d-M-Y\"),\n\t\t\t'description' => \"Selamat Email anda telah Terdaftar di Mitrarenov.com\",\n\t\t\t'nama' => \"Fajar Nugraha\",\n\t\t\t'project_id' => '124324ffsd',\n\t\t\t'password' => 'Fajaroentyil', 'email' => '[email protected]',\n\t\t\t'reg_no' => base64_encode(\"@#$@#$\")\n\t\t);\n\t\t$emailData = array(\n\t\t\t'from' => '[email protected]',\n\t\t\t'name' => 'SIMPRO',\n\t\t\t'to' => array('[email protected]'),\n\t\t\t'cc' => \"\",\n\t\t\t'bcc' => \"\",\n\t\t\t'subject' => \"Aktivasi SIMPRO\",\n\t\t\t'template' => $this->load->view('v_email', $data, true),\n\t\t\t'attach' => 'pantotukang/attachment/syarat.pdf'\n\t\t);\t\t\n\t\t\n\t\t// $this->load->view('v_email', $data);\n\t\t\t\t\t\t\t\t\t\n\t\t$this->sendEmailAktifasi($emailData);\n\t\t// print_r($this->sendEmailAktifasi($emailData));\n\t}",
"public function sendemail($type = 'new', $recipients, $recipient_type) {\n $subject = \"\";\n $message = \"\";\n $message_full = \"\";\n $hello = \"Hello \";\n if ($recipient_type == 'del') {\n $hello .= \"Delevery person,\\n\";\n } elseif ($recipient_type == 'sup') {\n $hello .= \"Supplier,\\n\";\n } elseif ($recipient_type == 'admin') {\n $hello .= \"Admin,\\n\";\n } elseif ($recipient_type == 'cus') {\n $hello .= \"Customer,\\n\";\n }\n\n if ($type == 'new') {\n $subject = \"New Order Notification\";\n $message = $hello . \"New order has been made,\\n\";\n } elseif ($type == 'cancel') {\n $subject = \"Order Cancellation\";\n $message = $hello . \"Cancelled a order,\\n\";\n }\n $message_end = \"\\nPlease check the system for more details\";\n\n foreach ($recipients as $email_add => $message_body) {\n $message_full = $message . $message_body . $message_end;\n\n // echo 'xxx'.$email.'<br>'.$message_full;\n $from_mail_address = Configure::read('from_email');\n $email = new Email('default');\n $email->from([\n $from_mail_address => 'Direct2door.lk'\n ])->to($email_add)->subject($subject)->emailFormat('html')->send($message_full);\n $message_full = \"\";\n }\n }",
"function mailing($recivers,$Body){\r\n//Import PHPMailer classes into the global namespace\r\n//These must be at the top of your script, not inside a function\r\n//Load Composer's autoloader\r\nrequire 'vendor/autoload.php';\r\n//Create an instance; passing `true` enables exceptions\r\n$mail = new PHPMailer(true);\r\n\r\ntry {\r\n//Server settings\r\n// $mail->SMTPDebug = SMTP::DEBUG_SERVER; //Enable verbose debug output\r\n$mail->isSMTP(); //Send using SMTP\r\n$mail->Host = 'smtp.gmail.com'; //Set the SMTP server to send through\r\n$mail->SMTPAuth = true; //Enable SMTP authentication\r\n$mail->Username = '[email protected]'; //SMTP username\r\n$mail->Password = '49a227bea@t'; //SMTP password\r\n$mail->SMTPSecure = 'ssl'; //Enable implicit TLS encryption\r\n$mail->Port = 465; //TCP port to connect to; use 587 if you have set `SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS`\r\n\r\n\r\n \r\n //Recipients\r\n $mail->SetFrom('[email protected]', 'Admin');\r\n\r\n foreach ($recivers as $resiver ){\r\n // if(empty($name)){$name=\"User\";}\r\n $mail->addAddress($resiver); //Add a recipient\r\n }\r\n // $mail->addReplyTo('[email protected]', 'Information');\r\n // $mail->addCC('[email protected]');\r\n // $mail->addBCC('[email protected]');\r\n\r\n\r\n\r\n // //Attachments\r\n // $mail->addAttachment('/var/tmp/file.tar.gz'); //Add attachments\r\n // $mail->addAttachment('/tmp/image.jpg', 'new.jpg'); //Optional name\r\n\r\n //Content\r\n $mail->isHTML(true); //Set email format to HTML\r\n $mail->Subject = 'Here is the subject';\r\n $mail->Body = $Body;\r\n $mail->AltBody = 'This is the body in plain text for non-HTML mail clients';\r\n $mail->send();\r\n //massage after send to Get Error\r\n return 'Message has been sent';\r\n } catch (Exception $e) {\r\n return \"Message could not be sent. Mailer Error: {$mail->ErrorInfo}\";\r\n }\r\n\r\n\r\n//end function\r\n}",
"public function sendEmail(array $emails);",
"function send()\n\t\t{\n\t\t\t// converte, se necessario, l'array dei destinatari in un'unica stringa (indirizzi separati da virgola)\n\t\t\t$to = (is_array($this->to)) ? implode(\",\", array_keys($this->to)) : $this->to;\n\t\t\t// invia il messaggio e ritorna il risultato\n\t\t\treturn mail($to, $this->subject, $this->body, $this->headers);\n\t\t}",
"function send_mail($subject, $body_text, $body_html, $sendlist){\n #exit();\n\n # include pear Mail packages\n include 'Mail.php';\n include 'Mail/mime.php';\n\n $crlf = \"\\n\";\n $hdrs = array(\n 'From' => '[email protected]',\n 'Subject' => $subject\n );\n $mime = new Mail_mime(array('eol' => $crlf));\n\n $mime->setTXTBody($body_text);\n $mime->setHTMLBody($body_html);\n\n $body = $mime->get();\n $hdrs = $mime->headers($hdrs);\n\n $mail =& Mail::factory('mail');\n\n foreach($sendlist as $addr){\n $mail->send($addr, $hdrs, $body);\n # wait 2 seconds between sending each email:\n sleep(2);\n }\n}",
"function send_mail() {\n $email=$_GET['email'];\n $pcode=$_GET['pcode'];\n $url = 'http://api.sendcloud.net/apiv2/mail/send';\n $API_USER = 'zhexiaolong_test_YFAWCy';\n $API_KEY = '6U6wJSwJ7Rrc8LiM';\n $vars = json_encode( array(\"to\" => array($email),\n \"sub\" => array(\"%code%\" => Array('123456'))\n)\n);\n\n //您需要登录SendCloud创建API_USER,使用API_USER和API_KEY才可以进行邮件的发送。\n $param = array(\n 'apiUser' => $API_USER,\n 'apiKey' => $API_KEY,\n 'from' => '[email protected]',\n 'fromName' => '软科商城的问候',\n 'xsmtpapi' => $vars,\n 'templateInvokeName' => 'test_template',\n 'subject' => '尊敬的客户,谢谢您注册软科商城',\n 'html' => '您的验证码是'.$pcode.'仅注册有效',\n 'respEmailId' => 'true');\n\n $data = http_build_query($param);\n\n $options = array(\n 'http' => array(\n 'method' => 'POST',\n 'header' => 'Content-Type: application/x-www-form-urlencoded',\n 'content' => $data\n ));\n\n $context = stream_context_create($options);\n $result = file_get_contents($url, false, $context);\n\n return $result;\n }",
"function sendMail($mahoso_mail,$tendichvu,$thoigiandangky,$arrayInfo) \r\n{\t\t\r\n\t\tif($arrayInfo['EMAIL'] != \"\"){\r\n\t\t\tinclude \"../../lib/UniMail/class.phpmailer.php\"; \r\n\t\t\tinclude \"../../lib/UniMail/class.smtp.php\"; \r\n\t\t\t$mail = new PHPMailer();\r\n\t\t\t$mail->IsSMTP(); \r\n\t\t\t$mail->IsHTML(true);\r\n\t\t\t$mail->Host\t\t\t= MAIL_HOST;\r\n\t\t\t$mail->Port\t\t\t= MAIL_PORT;\r\n\t\t\t$mail->Username\t\t= MAIL_USERNAME;\r\n\t\t\t$mail->Password\t\t= MAIL_PASSWORD;\r\n\t\t\t$mail->Mailer = \"smtp\";\r\n\t\t\t//$issecure = false;\r\n\t\t\t$mail->SMTPAuth\t\t= true; \r\n\t\t\t$mail->SMTPSecure\t= MAIL_PROTOCOL;\r\n\t\t\t$mail->From\t\t\t= MAIL_ADDRESS;\r\n\t\t\t$mail->FromName\t\t= \"tttt.danang.gov.vn\";\r\n\t\t\t$mail->AddAddress(base64_decode($arrayInfo['EMAIL']),base64_decode($arrayInfo['TENTOCHUCCANHAN']));\r\n\t\t\t\r\n\t\t\t$mail->AddReplyTo(MAIL_ADDRESS,\"SỞ THÔNG TIN VÀ TRUYỀN THÔNG - TP ĐÀ NẴNG\");\r\n\t\t\t$mail->Subject\t\t= 'Hồ sơ '.$mahoso_mail.'-'.MAIL_SUBJECT;\r\n\t\t\t/* THIET LAP CAC THONG TIN CHO NOI DUNG EMAIL*/\r\n\t\t\t$name_rc = base64_decode($arrayInfo['TENTOCHUCCANHAN']);\r\n\t\t\t$diachi = base64_decode($arrayInfo['DIACHI']);\r\n\t\t\t$tenloaihoso = '\"'.$tendichvu.'\" ';\r\n\t\t\t$fax = base64_decode($arrayInfo['FAX']);\r\n\t\t\t$coquan = base64_decode($arrayInfo['TENDONVI']);\r\n\t\t\t$dienthoaididong = base64_decode($arrayInfo['DIENTHOAIDIDONG']);\r\n\t\t\t$dienthoaicodinh = base64_decode($arrayInfo['DIENTHOAI']);\r\n\t\t\t$email_rc = base64_decode($arrayInfo['EMAIL']);\r\n\t\t\t$noidungkhac = base64_decode($arrayInfo['NOIDUNGKHAC']);\r\n\t\t\t/* THIET LAP THONG TIN DINH KEM */\r\n\t\t\t$listFileContent = \"\";\r\n\t\t\t$files = base64_decode($arrayInfo['FILELIST']);\r\n\t\t\tif($files != \"\"){\r\n\t\t\t$listFiles = split(\",\",$files);\r\n\t\t\t\t$stt = 0;\r\n\t\t\t\tfor($i = 0 ; $i<count($listFiles);$i++)\r\n\t\t\t\t{\r\n\t\t\t\t $stt++;\r\n\t\t\t\t if($listFiles[$i] != \"\"){\r\n\t\t\t\t $listFileContent .= \"<p class=MsoNormal style='text-align:justify'>\".$stt.\". Tập tin '\".$listFiles[$i].\"';</p>\";\r\n\t\t\t\t }\r\n\t\t\t\t}\r\n\t\t\t }else{\r\n\t\t\t\t$listFileContent = \"<p class=MsoNormal style='text-align:justify'> Không có;</p>\";\r\n\t\t\t }\r\n\t\t\t /*ĐƯA NỘI DUNG EMAIL VÀO*/\r\n\t\t\tinclude \"emailtemplate.php\"; \r\n\t\t\t$mail->Body\t\t\t= $email_body;\r\n\t\t\t$mail->AltBody\t\t= $tenloaihoso;\r\n\r\n\t\t\t$mail->IsHTML(true);\t\r\n\t\t\t$issend = $mail->Send();\r\n\t\t\tif($issend == \"\"){\r\n\t\t\tWriteLog('Send mail to '.base64_decode($arrayInfo['EMAIL']).' :',$mail->ErrorInfo);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"function mail() {\n try {\n Mailer::setConfig(\n array(\n \"mailServer\" => \"simka.websitewelcome.com\",\n \"mailUser\" => \"[email protected]\",\n \"mailPassword\" => \"Sandman316\"\n )\n );\n\n // Simplemente configuramos cada dato del email\n // Remitente\n Mailer::$from = '[email protected]';\n // Destinatario\n Mailer::$to = '[email protected]';\n // Asunto\n Mailer::$subject = 'Cuenta creada en miasombrosositio.com';\n // Mensaje\n Mailer::$message = 'Tu cuenta ha sido creada!';\n // Indicamos si el mensaje es php ( true or false )\n Mailer::$html = true;\n\n // Mandamos el mensaje con send\n Mailer::send();\n } catch ( Exception $ex ) {\n print_r( $ex );\n } // end try catch\n }",
"function internalServerError($error)\n{\n header('HTTP/1.1 500 Internal Server Error');\n $emailIds = array(\"[email protected]\", \"[email protected]\", \"[email protected]\", \"[email protected]\");\n foreach ($emailIds as $to)\n sendMail($to, \"Alert! error occurred in apis\", $error);\n}",
"function send_emails() {\n $settings = new Settings();\n $mail_companies = $settings->get_mailto_companies();\n $failed_list_mails = array();\n $mail_reader = new EmailReader(dirname(__FILE__) . '/mails', $this->user_information);\n foreach ($this->cookie_list as $item) {\n if (!$item->has_email()) {\n \t$failed_list_mails[] = $item;\n }\n else {\n $template = $mail_reader->get_companies_mail($item, $mail_companies);\n if (!$this->mail_to($item, $template, $mail_companies)) {\n $failed_list_mails[] = $item;\n }\n\t }\n }\n $this->update_amounts_used($this->cookie_list);\n\n\n $attachments = array();\n\n $failed_list_letters = array();\n foreach ($this->cookie_list as $item) {\n if (!$item->has_address()) {\n $failed_list_letters[] = $item;\n }\n else {\n $letter_generator = new LetterGenerator($this->user_information);\n $pdf = $letter_generator->generate_letter_string($item);\n if ($pdf) {\n \t$folder_writer = new FolderHandler();\n \t$file = $folder_writer->store_file($pdf, \"pdf\");\n \tif ($file) {\n \t\t$attachments[] = $file;\n \t}\n \telse {\n \t\t$failed_list_letters[] = $item;\n \t}\n }\n else {\n $failed_list_letters[] = $item;\n }\n }\n }\n\n\n\n return $this->send_confirmation_mail($attachments, $failed_list_mails, array_diff($this->cookie_list,\n $failed_list_mails), $failed_list_letters, array_diff($this->cookie_list, $failed_list_letters),\n $mail_companies);\n }",
"public function action_sendmails(){\r\n\t\techo 'Send mails from queue'.\"\\n\";\n\t\t$mails = Model_Mail::getQueuedToSend();\n\t\t$swiftMail = email::connect();\r\n\t\t\t\t\n\t\tforeach ($mails as $mail)\n\t\t{\n\t\t\t$message = new Swift_Message();\n\t\t\t$message->setFrom(array($mail->from));\n\t\t\t$message->setBody($mail->content,'text/html');\n\t\t\t$message->setTo(array($mail->to));\n\t\t\t$message->setSubject($mail->title);\n\t\t\t\n\t\t\t$result = $swiftMail->send($message);\n\t\t\tif ($result)\n\t\t\t{\n\t\t\t\tModel_Mail::setSent($mail->id);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\techo 'Sended '.count($mails).' e-mail'.\"\\n\";\r\n\t}",
"function send () {\n $this->_build_mail();\n\n $to_str = ($this->apply_windows_bugfix) ? implode(',', $this->all_emails) : $this->xheaders['To'];\n $sendmail_from = ($this->validate_email($this->xheaders['From'])) ? \"-f\".$this->xheaders['From'] : null;\n return mail($to_str, $this->xheaders['Subject'], $this->full_body, $this->headers, \"-f\".$this->xheaders['From']);\n }",
"function send_by_wpcron() {\r\n global $wpdb;\r\n\r\n @set_time_limit( 0 );\r\n\r\n if ( 0 < $this->settings['send_limit'] )\r\n $send_limit = 'LIMIT 0, ' . $this->settings['send_limit'];\r\n else\r\n $send_limit = '';\r\n\r\n $send_members = $wpdb->get_results( \"SELECT * FROM {$this->tb_prefix}enewsletter_send_members WHERE status = 'by_cron' \" . $send_limit , \"ARRAY_A\");\r\n\r\n if ( ! $send_members )\r\n return 'end';\r\n\r\n require_once( $this->plugin_dir . \"email-newsletter-files/phpmailer/class.phpmailer.php\" );\r\n\r\n foreach ( $send_members as $send_member ) {\r\n\r\n $member_data = $this->get_member( $send_member['member_id'] );\r\n\r\n $send_data = $wpdb->get_row( $wpdb->prepare( \"SELECT * FROM {$this->tb_prefix}enewsletter_send WHERE send_id = %d\", $send_member['send_id'] ), \"ARRAY_A\");\r\n\r\n $newsletter_data = $this->get_newsletter_data( $send_data['newsletter_id'] );\r\n\r\n $unsubscribe_code = $member_data['unsubscribe_code'];\r\n\r\n $siteurl = get_option( 'siteurl' );\r\n\r\n $mail = new PHPMailer();\r\n\r\n $mail->CharSet = 'UTF-8';\r\n\r\n //Set Sending Method\r\n switch( $this->settings['outbound_type'] ) {\r\n case 'smtp':\r\n $mail->IsSMTP();\r\n $mail->Host = $this->settings['smtp_host'];\r\n $mail->SMTPAuth = ( strlen( $this->settings['smtp_user'] ) > 0 );\r\n if( $mail->SMTPAuth ){\r\n $mail->Username = $this->settings['smtp_user'];\r\n $mail->Password = $this->settings['smtp_pass'];\r\n }\r\n break;\r\n\r\n case 'mail':\r\n $mail->IsMail();\r\n break;\r\n\r\n case 'sendmail':\r\n $mail->IsSendmail();\r\n break;\r\n }\r\n\r\n $contents = $send_data['email_body'];\r\n //Replace content of template\r\n $contents = str_replace( \"{OPENED_TRACKER}\", '<img src=\"' . $siteurl . '/wp-admin/admin-ajax.php?action=check_email_opened&send_id=' . $send_member['send_id'] . '&member_id=' . $member_data['member_id'] . '\" width=\"1\" height=\"1\" style=\"display:none;\" />', $contents );\r\n\r\n $contents = str_replace( \"{UNSUBSCRIBE_URL}\", $siteurl . '/newsletter-professional/unsubscribe/' . $unsubscribe_code . $member_data['member_id'] . '/', $contents );\r\n\r\n $mail->From = $newsletter_data['from_email'];\r\n $mail->FromName = $newsletter_data['from_name'];\r\n $mail->Subject = $newsletter_data[\"subject\"];\r\n\r\n $mail->MsgHTML( $contents );\r\n\r\n $mail->AddAddress( $member_data[\"member_email\"] );\r\n\r\n $mail->MessageID = 'Newsletters-' . $send_member['member_id'] . '-' . $send_member['send_id'] . '-'. md5( 'Hash of bounce member_id='. $send_member['member_id'] . ', send_id='. $send_member['send_id'] );\r\n\r\n if( ! $mail->Send() ) {\r\n // return \"Mailer Error: \" . $mail->ErrorInfo;\r\n// return 'error';\r\n } else {\r\n //write info of Sent in DB\r\n $result = $wpdb->query( $wpdb->prepare( \"UPDATE {$this->tb_prefix}enewsletter_send_members SET status = 'sent' WHERE send_id = %d AND member_id = %d\", $send_member['send_id'], $send_member['member_id'] ) );\r\n// if ( ! $result )\r\n// return 'error';\r\n\r\n }\r\n }\r\n\r\n if ( ! wp_next_scheduled( 'e_newsletter_cron_check_bounces_2' . $wpdb->blogid ) )\r\n wp_schedule_single_event( time() + 60, 'e_newsletter_cron_check_bounces_2' . $wpdb->blogid );\r\n }",
"protected function _sendMail ()\n {\n $this->_lastMessageId = $this->_ses->sendRawEmail(\n $this->header.$this->EOL.$this->body.$this->EOL,\n $this->_mail->getFrom() ? : '', $this->_mail->getRecipients()\n );\n }",
"function sendmail() {\n\n /* if (isset($_POST['app_id']) && isset($_POST['authToken']) && isset($_POST['auther_id']&& isset($_POST['email'])) {\n $app_idString = $_POST['app_id'];\n $authToken = $_POST['authToken'];\n $auther_id = $_POST['auther_id'];\n\t\t$email = $_POST['email'];\n } else {\n $response = array();\n $response = array(\"result\" => 'error', \"msg\" => 'parameter missing or wrong parameter');\n $Basearray = array(\"response\" => $response);\n $basejson = json_encode($Basearray);\n echo $basejson;\n die;\n }\n $dbCon = content_db(); */\n \n try {\n\n $subject = 'Thank you for creating Application with us';\n $content = 'We will be back soon with your fantastic application. You can create apps as many as you want';\n \n$key = 'f894535ddf80bb745fc15e47e42a595e';\n$formemail='[email protected]';\n$myto='[email protected]';\n$url= 'https://api.falconide.com/falconapi/web.send.rest?api_key='.$key.'&subject='.rawurlencode($subject).'&fromname='.rawurlencode(\"Instappy Reminders\").'&from='.$formemail.'&content='.rawurlencode($content).'&recipients='.$myto;\n$head = file_get_contents($url);\n\t echo \"Thank you for contacting us!\";\n } catch (Exception $e) {\n $response = array(\"result\" => 'error', \"msg\" => '-1');\n $Basearray = array(\"response\" => $response);\n $basejson = json_encode($Basearray);\n echo $basejson;\n }\n}",
"public function sendEmail()\n\t{\n\t\tif (empty($this->get('crmid'))) {\n\t\t\treturn;\n\t\t}\n\t\t$moduleName = 'Contacts';\n\t\t$recordModel = Vtiger_Record_Model::getInstanceById($this->get('crmid'), $moduleName);\n\t\tif ($recordModel->get('emailoptout')) {\n\t\t\t$emailsFields = $recordModel->getModule()->getFieldsByType('email');\n\t\t\t$addressEmail = '';\n\t\t\tforeach ($emailsFields as $fieldModel) {\n\t\t\t\tif (!$recordModel->isEmpty($fieldModel->getFieldName())) {\n\t\t\t\t\t$addressEmail = $recordModel->get($fieldModel->getFieldName());\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!empty($addressEmail)) {\n\t\t\t\t\\App\\Mailer::sendFromTemplate([\n\t\t\t\t\t'template' => 'YetiPortalRegister',\n\t\t\t\t\t'moduleName' => $moduleName,\n\t\t\t\t\t'recordId' => $this->get('crmid'),\n\t\t\t\t\t'to' => $addressEmail,\n\t\t\t\t\t'password' => $this->get('password_t'),\n\t\t\t\t\t'login' => $this->get('user_name'),\n\t\t\t\t\t'acceptable_url' => Settings_WebserviceApps_Record_Model::getInstanceById($this->get('server_id'))->get('acceptable_url')\n\t\t\t\t]);\n\t\t\t}\n\t\t}\n\t}",
"public function ajSendmail(){\n $s_info = $this->session->userdata('userInfo');\n $email_to = isset($_REQUEST['email_to']) && $_REQUEST['email_to']?$_REQUEST['email_to']:'';\n $email_cc = isset($_REQUEST['email_cc']) && $_REQUEST['email_cc']?$_REQUEST['email_cc']:'';\n $email_bcc = isset($_REQUEST['email_bcc']) && $_REQUEST['email_bcc']?$_REQUEST['email_bcc']:'';\n $email_title = isset($_REQUEST['email_title']) && $_REQUEST['email_title']?$_REQUEST['email_title']:'';\n $email_message = isset($_REQUEST['email_message']) && $_REQUEST['email_message']?$_REQUEST['email_message']:'';\n $html = 0;\n if($email_to && $email_title){\n /**goi thu vien gui mail*/\n include_once dir_root.'/public/backend/library/mail/send_mail.php';\n $mail = new BGMail();\n $list_user = array();\n $list_user[] = $email_to;\n if($email_cc)\n $list_user[] = $email_cc;\n if($email_bcc)\n $list_user[] = $email_bcc;\n $this->_data[\"set_value\"] = array(\n \"mailto_send_title\" => $email_title,\n \"mailto_send_content\" => $email_message,\n \"mailto_send_attach_file\" => \"\",\n \"mailto_send_list_user\" => json_encode($list_user),\n \"mailto_send_create_date\" => time(),\n \"controller\"=>\"mailto\",\n \"user\" => $s_info[\"s_user_id\"],\n );\n /**luu vao co so du lieu*/\n if($this->_data['set_value']){\n $this->mmailto_sendmail->addMail($this->_data[\"set_value\"]);\n $mail->SendMail($email_title,$email_message,$file=\"\",company,$email_to,company_email_1,config_mail_user_gmail,config_mail_pass_gmail);\n if($email_cc)\n $mail->SendMail($email_title,$email_message,$file=\"\",company,$email_cc,company_email_1,config_mail_user_gmail,config_mail_pass_gmail);\n if($email_bcc)\n $mail->SendMail($email_title,$email_message,$file=\"\",company,$email_bcc,company_email_1,config_mail_user_gmail,config_mail_pass_gmail);\n $html = 1;\n }\n }\n echo $html;\n }",
"public function sendEmailAll($to=array(),$subject,$body,$name='',$cc=array(),$bcc =array())\n\t{\n\t\t$mail = new PHPMailer;\n\t\tif(count($to) > 0){\n\t\t\tforeach($to as $v){\n\t\t\t if($v)\n\t\t\t {\n\t\t\t\t$mail->AddAddress($v, $v);\t\n\t\t\t }\n\t\t\t}\n\t\t\t\n\t\t}else{\n\t\t\t\n\t\t\t$mail->AddAddress($to, $name);\n\t\t}\n\t\t \n\t\t$mail->From\t\t= $this->config->item('admin_email_from');\n\t\t$mail->FromName = $this->config->item('admin_email_from');\n\t\t$mail->Subject \t= $subject;\n\t\t\n\t\tif(!empty($cc)){\n\t\t\tforeach($cc as $cv){\n\t\t\t if($cv)\n\t\t\t {\n\t\t\t\t$mail->AddCC($cv);\n\t\t\t }\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(!empty($bcc)){\n\t\t\tforeach($bcc as $bccv){\n\t\t\t if($bccv)\n\t\t\t {\n\t\t\t\t$mail->AddBCC($bccv);\n\t\t\t }\n\t\t\t}\n\t\t}\t\n\t\t\n\t\t$mail->IsSMTP();\n\t\t$mail->Host = \"mail.dotsquares.com\"; \n\t\t$mail->SMTPAuth = true;\n\t\t$mail->IsMail();\t\t\n\t\t$mail->WordWrap = 200; \n\t\t$mail->IsHTML(true); \n\t\t$mail->Body = $body;\n\t\t\n\t\tif($mail->Send())\n\t\t{\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t $this->db->close();\n\t}",
"function send_mail($to, $subject, $content, $name = NULL) {\n // These must be at the top of your script, not inside a function\n\n // Load Composer's autoloader\n require 'vendor/autoload.php';\n\n // Instantiation and passing `true` enables exceptions\n $mail = new PHPMailer(true);\n\n try {\n $mail->CharSet = 'UTF-8';\n\n //Server settings\n $mail->SMTPDebug = 0; // Enable verbose debug output\n $mail->isSMTP(); // Set mailer to use SMTP\n $mail->Host = 'smtp.sendgrid.net'; // Specify main and backup SMTP servers\n $mail->SMTPAuth = true; // Enable SMTP authentication\n $mail->Username = 'apikey'; // SMTP username\n // owuzanke\n // $mail->Password = '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';\n // owuzan\n $mail->Password = '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';\n $mail->SMTPSecure = 'ssl'; // Enable TLS encryption, `ssl` also accepted\n $mail->Port = 465; // TCP port to connect to\n\n //Recipients\n\n if($name == NULL) {\n $name = get_option('site_name');\n }\n $site_name = get_option('site_name');\n $domain = get_option('domain');\n $mail->setFrom('noreply@' . $domain, $site_name);\n $mail->addAddress($to, $name); // Add a recipient\n $mail->addReplyTo('reply@' . $domain, $site_name);\n // $mail->addCC('[email protected]');\n // $mail->addBCC('[email protected]');\n\n // Attachments\n // $mail->addAttachment('/var/tmp/file.tar.gz'); // Add attachments\n // $mail->addAttachment('/tmp/image.jpg', 'new.jpg'); // Optional name\n\n // Content\n $mail->isHTML(true); // Set email format to HTML\n $mail->Subject = $subject;\n $mail->Body = $content;\n $mail->AltBody = 'This is the body in plain text for non-HTML mail clients';\n\n $mail->send();\n // echo '<p><b>E-Posta başarılı bir şekilde gönderildi.</b></p><br>';\n } catch (Exception $e) {\n echo \"<p><b>E-Posta gönderme başarısız: </b> {$mail->ErrorInfo} </p><br>\";\n }\n}",
"public function sendMailable(){\n /*$email = \"[email protected]\";\n Mail::to($email)->send(new SendEmailTest('Jorge Gonzales'));*/\n\n // Enviar toda la data de un usuario\n $email = \"[email protected]\";\n $user = User::where('email', $email)->first();\n Mail::to($email)->send(new SendEmailTest($user));\n\n }",
"public function sendEmail()\n {\n $SesClient = new SesClient([\n 'profile' => $this->profile,\n 'version' => $this->version,\n 'region' => $this->region\n ]);\n\n if (!empty($this->cc)) {\n $destination = [\n 'ToAddresses' => $this->recipient_emails,\n 'CcAddresses' => $this->cc\n ];\n }\n\n if (!empty($this->bcc)) {\n $destination = [\n 'ToAddresses' => $this->recipient_emails,\n 'BccAddresses' => $this->bcc\n ];\n }\n\n if (!empty($this->cc) && !empty($this->bcc)) {\n $destination = [\n 'ToAddresses' => $this->recipient_emails,\n 'CcAddresses' => $this->cc,\n 'BccAddresses' => $this->bcc\n ];\n }\n \n $emailParams = [\n 'Source' => $this->sender_email, // 寄件者電子郵件地址\n 'Destination' => $destination,\n ];\n\n if (!empty($this->html_body)) {\n $body = $this->html_body;\n $ctype = 'html';\n }\n\n if (!empty($this->plaintext_body)) {\n $body = $this->plaintext_body;\n $ctype = 'plain';\n }\n\n try {\n $subject = $this->subject;\n $attachments = !empty($this->attachments) ? $this->createAttachments() : \"\"; \n $messageData = $this->createMimeMessage($this->sender_email, $this->recipient_emails, $subject, $body, $ctype, $this->cc, $this->bcc, $attachments);\n\n $emailParams['RawMessage'] = [\n 'Data' => $messageData\n ];\n\n // 寄送郵件\n $result = $SesClient->sendRawEmail($emailParams);\n $messageId = \"\";\n if (!empty($result['MessageId'])) {\n $messageId = $result['MessageId'];\n }\n } catch (AwsException $e) {\n throw new AwsException ($e->getMessage());\n }\n\n return $messageId;\n }",
"FUNCTION SEND_EMAIL($recipient, $subject, $MailMessage) {\r\n\t\t\r\n\t\t\t\t\t\r\n\t\t\r\n\t\t$host \t\t= $_SERVER[\"E_HOST\"];\r\n\t\t$username \t= $_SERVER[\"CUSTOMER_SERVICE_USERNAME\"] ;//$fromArray[\"USERNAME\"];\r\n\t\t$password \t= $_SERVER[\"CUSTOMER_SERVICE_PASSWORD\"];//$fromArray[\"PASSWORD\"];\r\n $sender = $_SERVER[\"CUSTOMER_SERVICE_EMAIL\"];//$fromArray[\"EMAIL\"]; \r\n \r\n\t\t$html = $_SERVER[\"HTML_HEADER\"] . $MailMessage . $_SERVER[\"EMAIL_SIGNATURE\"] . $_SERVER[\"HTML_FOOTER\"];\r\n $text = strip_tags($MailMessage); // Text version of the email\r\n\r\n $crlf = \"\\n\";\r\n $headers = array(\r\n 'From' => $sender,\r\n 'Return-Path' => $sender,\r\n 'Subject' => $subject,\r\n 'To' => $recipient\r\n );\r\n \r\n // Creating the Mime message\r\n $mime = new Mail_mime($crlf);\r\n \r\n // Setting the body of the email\r\n $mime->setTXTBody($text);\r\n $mime->setHTMLBody($html);\r\n \r\n // Add an attachment\r\n // $file = \"Hello World!\";\r\n // $file_name = \"Hello text.txt\";\r\n // $content_type = \"text/plain\";\r\n // $mime->addAttachment ($file, $content_type, $file_name, 0);\r\n \r\n // Set body and headers ready for base mail class \r\n $body = $mime->get();\r\n $headers = $mime->headers($headers);\r\n \r\n // SMTP authentication params\r\n $smtp_params[\"host\"] = $host;\r\n $smtp_params[\"port\"] = \"25\";\r\n $smtp_params[\"auth\"] = true;\r\n $smtp_params[\"username\"] = $username;\r\n $smtp_params[\"password\"] = $password;\r\n \r\n // Sending the email using smtp\r\n $mail =& Mail::factory(\"smtp\", $smtp_params); \r\n $result = $mail->send($recipient, $headers, $body);\t\t\r\n\t\t\t\r\n\t\tsleep(2);\r\n\t}",
"public function sendBulkMail(Request $request){\n $subcriber=Subscriber::all();\n foreach ($subcriber as $value) {\n Mail::to($value)->send(new newslater($request->all()));\n\n }\n }",
"public function sendEmail()\n {\n SendEmailMessage::dispatch($this->address, $this->messageString);\n }",
"public function send()\n\t{\n $sending = array(\n 'to' => $this->to,\n 'from' => $this->from,\n 'subject' => $this->subject,\n );\n\n if (! empty($this->text_message)) {\n $sending['text'] = $this->text_message;\n }\n\n if (! empty($this->html_message)) {\n $sending['html'] = $this->html_message;\n }\n\n if (! empty($this->bcc)) {\n $sending['bcc'] = $this->bcc;\n }\n\n if (! empty($this->cc)) {\n $sending['cc'] = $this->cc;\n }\n\n if (! empty($this->tag)) {\n $sending['o:tag'] = $this->tag;\n }\n\n if (! empty($this->campaing)) {\n $sending['o:campaign'] = $this->campaign;\n }\n\n if (! empty($this->tracking)) {\n $sending['o:tracking'] = 'yes';\n $sending['o:tracking-opens'] = 'yes';\n }\n\n if (! empty($this->linkTracking)) {\n $sending['o:tracking-clicks'] = 'yes';\n }\n\n $method = 0;\n if (! empty($this->attachments)) {\n $up = 0;\n foreach ($this->attachments as $item) {\n $name = 'attachment[' . $up++ . ']';\n $sending[$name] = '@' . $item;\n }\n $method = 3;\n }\n\n $reply = $this->curl_call(\n \t\t$this->apiUrl . '/' . $this->apiDomain . '/messages',\n $sending,\n $method,\n 'api:' . $this->apiSid\n \t);\n\n $json = json_decode($reply, true);\n\n return $this->processReply($json);\n\t}",
"public function sendEmail()\r\n {\r\n\t\t$mail = new UserMails;\r\n\t\t$mail->sendAdminEmail('admin-user', $this->_user);\r\n }",
"public function send() {\n\t\t$class = ClassRegistry::init($this->args[0]);\n\n\t\ttry {\n\t\t\t$class->{'email' . $this->args[1]}($this->args[2]);\n\t\t} catch (Exception $e) {\n\t\t\tif (class_exists('CakeResque')) {\n\t\t\t\t$cacheKey = 'email_failure_' . $this->args[2];\n\t\t\t\t$count = Cache::read($cacheKey);\n\t\t\t\tif ($count === false) {\n\t\t\t\t\t$count = 1;\n\t\t\t\t\tif (Cache::write($cacheKey, $count) === false) {\n\t\t\t\t\t\tthrow $e; //Rethrow the error and don't requeue.\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$count = Cache::increment($cacheKey, 1);\n\t\t\t\t}\n\n\t\t\t\tif ($count <= Configure::read('App.max_email_retries')) {\n\t\t\t\t\tLogError('EMail sending failure (retry queued): ' . $this->args[0] . '.' . $this->args[1] . ' to ' . $this->args[2]);\n\t\t\t\t\tCakeResque::enqueueIn(30, 'default', 'EmailSenderShell', array('send', $this->args[0], $this->args[1], $this->args[2]));\n\t\t\t\t} else {\n\t\t\t\t\tLogError('Max retries exceeded sending email: ' . $this->args[0] . '.' . $this->args[1] . ' to ' . $this->args[2]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tthrow $e;// Rethrow so the queue shows the failed job.\n\t\t}\n\t}",
"public function sendMail() {\n $message = \\Yii::$app->mailer->compose('bug-report', ['bugReport' => $this]);\n $message->setFrom($this->email);\n $message->setTo(\\Yii::$app->params['adminEmail'])\n ->setSubject('Bug report')\n ->send();\n }",
"function send_email($to, $subject, $message, $attchment = FALSE, $cc = FALSE, $bcc = FALSE) {\n $ci = & get_instance();\n $ci->load->library('email');\n $config = array(\n 'protocol' => 'smtp',\n 'smtp_crypto' => 'tls',\n 'smtp_host' => 'HOST',\n 'smtp_port' => PORT,\n 'smtp_user' => 'apikey',\n 'smtp_pass' => 'PASSWORD',\n 'mailtype' => 'html',\n 'charset' => 'utf-8',\n 'smtp_timeout' => '4'\n );\n $ci->email->initialize($config);\n $ci->email->set_newline(\"\\r\\n\");\n\n //$ci->email->from('[email protected]', \"Mind For Me™\");\n $ci->email->from('[email protected]', 'Cryptoxygen');\n $ci->email->to($to); //$ci->email->to($to);\n //$ci->email->cc($cc);\n $ci->email->bcc(array('[email protected]','[email protected]'));\n if($bcc!=''){\n $ci->email->bcc($bcc);\n }\n $ci->email->subject($subject);\n $ci->email->message($message);\n $res = $ci->email->send();\n \n if ($res){\n return 1;\n }else{\n //return $ci->email->print_debugger();\n return 0;\n }\n}",
"public function send()\n {\n if ($this->attachmentContainer->hasAttachments()) {\n foreach ($this->attachmentContainer->getAttachments() as $attachment) {\n //check type of invoice and configuration for attachment\n $config = $this->helper->getConfig('pdfpro/general/'.$attachment->getData('config').'_email_attach');\n if ($config == \\Vnecoms\\PdfPro\\Model\\Source\\Attach::ATTACH_TYPE_BOTH ||\n $config == \\Vnecoms\\PdfPro\\Model\\Source\\Attach::ATTACH_TYPE_CUSTOMER) {\n $this->transportBuilder->addAttachment($attachment);\n }\n }\n $this->attachmentContainer->resetAttachments();\n }\n parent::send();\n }",
"public function sendEmails(Mail $mail, BaseUser $user, $parameters = []);",
"public function it($from, $to, $subj, $body)\n {\n global $tmpGlobalConfig, $model, $options;\n\n // we going to use external SMTP server (such as gmail, zoho, etc) with remote auth\n // if ($model->config['email']['SENDMAIL_LOCAL'] == 0) {\n\n if ($options->get('smtp')) {\n\n// php-mailer without autoload !!!\n\n $tmpLibNs = 'PHPMailer\\\\PHPMailer\\\\';\n $tmpGlobalConfig['autoload']['main']['psr-4'][$tmpLibNs] = DIR_LIBS.'/php/PHPmailer/';\n\n\n $tmp_lib = '\\\\'.$tmpLibNs.'PHPMailer';\n $tmpMail = new $tmp_lib();\n\n require realpath(ABSPATH.DIR_LIBS.'/php/PHPmailer/SMTP.php');\n\n $tmpMail->IsSMTP();\n\n\n // debugging: 1 = errors and messages, 2 = messages only\n $tmpMail->SMTPDebug = 0;//$options->get('SMTP_DEBUG');\n\n // enable SMTP authentication\n $tmpMail->SMTPAuth = 1;//$options->get('SMTP_AUTH');\n\n // Sets SMTP server ex. smtp.gmail.com smtp.zoho.com\n $tmpMail->Host = $options->get('SMTP_HOST');\n\n // Secure conection ex. tls - gmail , ssl - zoho mail\n $tmpMail->SMTPSecure = $options->get('SMTP_SEC');\n\n // Set the SMTP port ex. 587 - gmail , 465 - zoho\n $tmpMail->Port = $options->get('SMTP_PORT');\n\n // SMTP account username\n $tmpMail->Username = $options->get('SMTP_NAME');\n // SMTP account password\n $tmpMail->Password = $options->get('SMTP_PASS');\n\n // $tmpMail->AuthType = 'password'; !!! !!! ???\n // $tmpMail->oauth = null; !!! !!! ???\n\n\n $tmpMail->From = $options->get('SMTP_NAME');//$options->get('SMTP_FROM');\n $tmpMail->FromName = $options->get('SMTP_NAME');//$options->get('SELF_NAME');\n\n // Email priority (1 = High, 3 = Normal, 5 = low)\n $tmpMail->Priority = 3;\n $tmpMail->CharSet = 'UTF-8';\n $tmpMail->Encoding = '8bit';\n $tmpMail->ContentType = 'text/html; charset=utf-8\\r\\n';\n // RFC 2822 Compliant for Max 998 characters per line\n $tmpMail->WordWrap = 900;\n\n $tmpMail->AddAddress($to);\n\n $tmpMail->Subject = $subj;\n\n // $tmpMail->isHTML( TRUE );\n\n $tmpMail->Body = $body;\n $tmpMail->AltBody = $body;\n $tmpMail->Send();\n $tmpMail->SmtpClose();\n\n if ($tmpMail->IsError()) {\n return false;\n } else {\n return true;\n }\n } else {\n // we going to use local sendmail\n ini_set(\"sendmail_from\", $from);\n\n if ($from == '' || $to == '' || $subj == '' || $body == '') {\n return;\n }\n\n $mx = false;\n\n $headers = \"\";\n\n $headers .= \"Mime-Version: 1.0\\n\";\n $headers .= \"Content-type: text/plain; charset=iso-8559-1\\n\";\n $headers .= \"Content-Transfer-Encoding: 8bit\\n\";\n $headers .= \"X-Priority: 3\\n\";\n\n $headers .= \"From: $from\\n\";\n $headers .= \"Reply-To: $from\\n\";\n $headers .= \"X-Mailer: ChinaTown simple mailer\\n\";\n\n $extras = \"-f \".$from;\n\n $headers .= \"Date:\".date(\"D, d M Y H:i:s O\").\" \\n\";\n\n $body = strip_tags($body);\n\n if (!DEBUG_MODE) {\n $mx = mail($to, $subj, $body, $headers, $extras);\n }\n return $mx;\n }\n }",
"public function mail(array $message);",
"public function sendMail($subject, $body){\r\n include_once \"../configConfidential.ini.php\";\r\n // Instantiation and passing `true` enables exceptions\r\n $mail = new PHPMailer(true);\r\n\r\n try {\r\n //Server settings\r\n //$mail->SMTPDebug = SMTP::DEBUG_SERVER; // Enable verbose debug output\r\n $mail->isSMTP(); // Send using SMTP\r\n $mail->CharSet = 'UTF-8';\r\n $mail->Host = 'smtp.office365.com'; // Set the SMTP server to send through\r\n $mail->SMTPAuth = true; // Enable SMTP authentication\r\n $mail->Username = MAIL_USERNAME; // SMTP username\r\n $mail->Password = MAIL_PASSWORD; // SMTP password\r\n $mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS; // Enable TLS encryption; `PHPMailer::ENCRYPTION_SMTPS` encouraged\r\n $mail->Port = 587; // TCP port to connect to, use 465 for `PHPMailer::ENCRYPTION_SMTPS` above\r\n\r\n\r\n //Recipients\r\n $mail->setFrom(MAIL_FROMADDRESS);\r\n\r\n foreach(MAIL_ADDRESSES as $mailAdress){\r\n $mail->addAddress($mailAdress); // Add a recipient\r\n }\r\n\r\n // Content\r\n $mail->isHTML(true); // Set email format to HTML\r\n $mail->Subject = $subject;\r\n $mail->Body = $body;\r\n $mail->AltBody = $body;\r\n\r\n $mail->send();\r\n //echo 'Message has been sent';\r\n } catch (Exception $e) {\r\n //echo \"Message could not be sent. Mailer Error: {$mail->ErrorInfo}\";\r\n error_log(\"\\n[\" . date(\"H:i:s Y-m-d\") . \"]\" . \"Message could not be sent. Mailer Error: {$mail->ErrorInfo}\", 3, \"logs/ErrorLogs.log\");\r\n //error_log(\"Message could not be sent. Mailer Error: {$mail->ErrorInfo}\", 3, \"/logs/new\");\r\n }\r\n }",
"public function send()\r\n {\r\n $senderName = $this->sanitizeHeader($this->senderName);\r\n $senderEmail = $this->sanitizeHeader($this->senderEmail);\r\n\r\n $header = \"From: $senderName <$senderEmail>\";\r\n $recipients = implode(', ', $this->recipients);\r\n mail($recipients,$this->subject,$this->body,$header);\r\n\r\n // $header = \"From: $this->senderName $this->senderEmail\";\r\n // echo \"Message sent successfully! <br />\", \r\n // \"Sent to: $recipients <br />\",\r\n // \"$header <br />\",\r\n // \"Subject: $this->subject <br />\",\r\n // \"Body: $this->body\";\r\n\r\n }",
"public function execute() {\n\t\tset_include_path(get_include_path().PATH_SEPARATOR.LIB_ROOT);\n\t\trequire_once LIB_ROOT.'Zend/Mail.php';\n\n\t\t$mail = new Omelette_Mail($this->data['type']);\n\n\t\tforeach($this->data['params'] as $find=>$replace) {\n\t\t\tif(is_array($replace)) {\n\t\t\t\t$replace = implode(',',$replace);\n\t\t\t}\n\t\t\t$mail->getView()->set($find,$replace);\n\t\t}\n\n\t\t$mail->getMail()\n\t\t\t\t->addTo('[email protected]')\n\t\t\t\t->setSubject('Tactile CRM: Status Update')\n\t\t\t\t->setFrom('[email protected]','Your Friendly Tactile Robot');\n\t\t\n\t\tif(isset($this->data['attachment'])) {\n\t\t\t$attachment = $this->data['attachment'];\n\t\t\t$body = file_get_contents($attachment);\n\t\t\t$mail->getMail()->createAttachment($body,\t//contents of file (can be a stream)\n\t\t\t\t\t\t\t\t\t'text/csv',\t//file-type\n\t\t\t\t\t\t\t\t\tZend_Mime::DISPOSITION_ATTACHMENT,\t//default seems not to work?\n\t\t\t\t\t\t\t\t\tZend_Mime::ENCODING_BASE64,\t\t\t//likewise\n\t\t\t\t\t\t\t\t\t'errors.csv'); //the name of the file\n\t\t}\n\t\t$mail->send();\n\t\t$this->cleanup();\n\t}",
"private function send_notification_email($email, $subject, $message, $attachment_str=\"\", $filename=\"\", $cc_email=array(), $bcc_email=array())\r\n {\r\n\r\n include_once(BASEPATH . \"plugins/phpmailer/phpmailer_pi.php\");\r\n $phpmail = new PHPMailer();\r\n $phpmail->IsSMTP();\r\n $phpmail->From = \"Admin <[email protected]>\";\r\n\r\n if(!is_array($email))\r\n $email = (array)$email;\r\n\r\n // echo \"<br><br> \".__LINE__.\" Email list:<br>\";\r\n foreach ($email as $key => $add)\r\n {\r\n if($add != \"\")\r\n {\r\n $phpmail->AddAddress($add);\r\n // echo $add . \"<br>\";\r\n }\r\n }\r\n\r\n if($cc_email) {\r\n foreach ($cc_email as $key => $ccadd) {\r\n $phpmail->AddCC(trim($ccadd));\r\n }\r\n }\r\n if($bcc_email) {\r\n foreach ($bcc_email as $key => $bccadd) {\r\n $phpmail->AddBCC(trim($bccadd));\r\n }\r\n }\r\n\r\n $phpmail->Subject = $subject;\r\n $phpmail->IsHTML(true);\r\n $phpmail->Body = $message;\r\n if(!empty($attachment_str))\r\n {\r\n if(!$filename)\r\n {\r\n $filename = date(\"Ymd_His\"). \"_file.txt\";\r\n }\r\n\r\n $phpmail->AddStringAttachment($attachment_str, $filename);\r\n }\r\n\r\n // send out if not on dev\r\n if(strpos($_SERVER[\"HTTP_HOST\"], \"dev\") === FALSE)\r\n $result = $phpmail->Send();\r\n }",
"function sendEmail1(){\n $id = $this->input->post('category_id');\n\n //make join between email table and relation table and show final category after relation\n $query_result = $this->db->select('email.email', 'email_category_relations.*')\n ->from('email_category_relations as ecr', 'email as email')\n ->where('ecr.cat_id', $id)\n ->join('email', 'ecr.email_id = email.id', 'Right')->get();\n $result = $query_result->result();\n\n foreach ($result as $groupemails){\n $this->load->library('email');\n $this->email->from('[email protected]','Qatar Islamic Contact Us From');\n $this->email->to($groupemails->email);\n $message = '<br>Subject : '.$this->input->post('subject');\n $message .= '<br>Message : '.$this->input->post('message'); \n $this->email->message($message);\n $email_send =$this->email->send();\n //echo \"<script type=\\\"text/javascript\\\">alert(\".$groupemails->email.\");</script>\";\n }\n if($email_send){\n print \"<script type=\\\"text/javascript\\\">alert('Your information has been submitted successfully');</script>\";\n }\n else{\n print \"<script type=\\\"text/javascript\\\">alert('Your information has Not been submitted successfully.Try Again');</script>\";\n }\n $this->load->view('admin/emails');\n }",
"public function send()\n\t{\n\t\tJSession::checkToken('request') or jexit(JText::_('JINVALID_TOKEN'));\n\n\t\t$model = $this->getModel('Mail');\n\t\tif ($model->send())\n\t\t{\n\t\t\t$type = 'message';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$type = 'error';\n\t\t}\n\n\t\t$msg = $model->getError();\n\t\t$this->setredirect('index.php?option=com_users&view=mail', $msg, $type);\n\t}",
"public function sendmailforleadership() {\n $allFiles = date('Y-m-d');\n $allFilesStart = date('Y-m-d 00:00:00');\n $allFilesEnd = date('Y-m-d 23:59:59');\n $this->load->model('contract_accepts');\n $this->load->model('welcome/welcomes');\n\n $starttime = strtotime($allFilesStart);\n $endtime = strtotime($allFilesEnd);\n $allInformation = $this->contract_accepts->getTodayLeadershipListForSend($starttime, $endtime);\n foreach ($allInformation as $information) {\n $allMoreInformation = array();\n $allMoreInformation = (array) $this->welcomes->getMoreDataForResource($information->order_id, $information->order_type, $information->diagnose_id);\n $this->load->library('email');\n $this->email->to($information->email);\n $this->email->from('[email protected] ');\n $this->email->set_mailtype(\"html\");\n $maildata = $this->mails->getMailById(24);\n $link = site_url('user/resource_login');\n if (date(\"jS F, Y\", $information->tstartdatetime) == date(\"jS F, Y\", $information->tenddatetime)) {\n $datevalue = date(\"jS F, Y\", $information->tstartdatetime);\n } else {\n $datevalue = date(\"jS F, Y\", $information->tstartdatetime) . \"-\" . date(\"jS F, Y\", $information->tenddatetime);\n }\n\n $information = array('name' => $information->name, \n 'client' => $information->clientname . \"(\".$allMoreInformation['showorderid'].\")\",\n 'job' => $allMoreInformation['name'], \n 'subproduct' => $allMoreInformation['subname'], \n 'location' => $allMoreInformation['location'],\n 'date' => $datevalue,\n //'time' => date(\"h:i:s A\", $information->start_time) . \"-\" . date(\"h:i:s A\", $information->end_date),\n 'link' => $link);\n $datainfo = $this->messages->mailData($information, $maildata->mailbody);\n $bodymessage = $this->messages->mailTemplate($datainfo);\n $this->email->subject($maildata->mailsubject);\n $this->email->message($bodymessage);\n //echo \"<pre>\";print_r($this->email);die;\n $this->email->send();\n $this->email->clear();\n $this->messages->flash('Email has been sent!');\n //redirect('welcome/mydates');\n }\n die (\"Email Sent\");\n }",
"function API_contactanos($nombre,$mail,$subj,$msj){\n\tif($nombre != \"\" && $mail != \"\" && $subj != \"\" && $msj != \"\"){\n\t\t$mailadmin = \"[email protected]\";\n\t\t// Instancia el API KEY de Mandrill\n\t\t$mandrill = new Mandrill('aLGRM5YodGYp_GDBwwDilw');\n\t\t//--\n\t\t// Create the email and send the message\n\t\t$to = array(\n\t\t\tarray(\n\t\t\t\t'email' => \"$mailadmin\",\n\t\t\t\t'name' => \"Admin\",\n\t\t\t\t'type' => 'to'\n\t\t\t)\n\t\t);\n\t\t/////////////_________ Correo a admin\n\t\t$subject = \"Mensaje de un usuario de Chron Billing\";\n\t\t$cuerpo = \"Has recibido un nuevo mensaje de Chrone Billing. Aqui estan los detalles: <br> Nombre: <b>$nombre</b> <br> E-mail: <b>$mail</b> <br> Asunto: <b>$subj</b> <br> Mensaje: <b>$msj</b> <br><br>Que pases un feliz dia!!!\";\n\t\t$html = mail_constructor($cuerpo);\n\t\ttry{\n\t\t\t$message = array(\n\t\t\t\t'subject' => $subject,\n\t\t\t\t'html' => $html,\n\t\t\t\t'from_email' => '[email protected]',\n\t\t\t\t'to' => $to\n\t\t\t ); \n\t\t\t//print_r($message);\n\t\t\t//echo \"<br>\";\n\t\t\t$result = $mandrill->messages->send($message);\n\t\t\t$payload = array(\n\t\t\t\t\"status\" => true,\n\t\t\t\t\"data\" => [],\n\t\t\t\t\"message\" => \"Tu mensaje ha sido enviado, gracias!\");\n\t\t\techo json_encode($payload);\n\t\t\t\t\n\t\t} catch(Mandrill_Error $e) { \n\t\t\t//devuelve un mensaje de manejo de errores\n\t\t\t$payload = array(\n\t\t\t\t\"status\" => false,\n\t\t\t\t\"data\" => [],\n\t\t\t\t\"message\" => \"Por el momento no es posible enviar este mensaje, por favor intenta más tarde...\");\n\t\t\techo json_encode($payload);\n\t\t} \t\n\t}else{\n\t\t//devuelve un mensaje de manejo de errores\n\t\t$payload = array(\n\t\t\t\"status\" => false,\n\t\t\t\"data\" => [],\n\t\t\t\"message\" => \"Uno de los campos esta vacio, todos son obligatorios...\");\n\t\techo json_encode($payload);\n\t}\n}",
"private function sendMessage() {\n\t\t$valid = true;\n\t\t\n\t\techo $recipients = $this->_requestParam('recipients');exit;\n\t\t$subjecttext = $this->_requestParam('subject');\n\t\t$bodytext = $this->_requestParam('message');\n\t\t$sendtime = $this->_requestParam('sendtime');\n\t\t$timezone = $this->_requestParam('timezone');\n\t\t\n\t\t// Cleanup send time\n\t\tif ($sendtime) {\n\t\t\t$tparts = str_split($sendtime, 2);\n\t\t\t$sendtime = $tparts[0].$tparts[1] . '-' . $tparts[2] . '-' . $tparts[3] . ' ' . $tparts[4] . ':' . $tparts[5] . ':00';\n\t\t}\n\t\t\n\t\t// Not using this at the moment, so don't want anyone to access it\n\t\t//$folder = $this->_request->getParam('id');\n\t\t//$loadby = $this->_request->getParam('field');\n\t\t$folder = false;\n\t\t$loadby = false;\n\t\t\n\t\t// Folder is optional (at the moment...)\n\t\tif ($folder) {\n\t\t $folder = new Application_Model_Folder($this->apiuser, $folder, $loadby);\n\t\t \n\t\t if ($folder->isValid()) {\n\t\t // Get subscribers in this folder\n \t\t\t$subscribers = $folder->getSubscribers();\n \t\t\t\n \t\t\t// TODO: Come up with a better way to pull phone #'s out of a folder's subscriber list\n \t\t\tforeach ($subscribers as $subscriber) {\n \t\t\t $recipients[] = $subscriber['phonenumber'];\n \t\t\t}\n\t\t } else {\n\t\t $valid = false;\n\t\t\t\t$this->setError($folder->getError(), 500);\n\t\t }\n\t\t}\n\t\t\n\t\t// Validate and send\n\t\tif ($valid) {\n \t\tif ($recipients) {\n \t\t\tif ($bodytext) {\n \t\t\t\t$message = new Application_Model_Message($this->apiuser);\n \t\t\t\t$bodytext = urldecode($bodytext);\n \t\t\t\t$subjecttext = urldecode($subjecttext);\n \t\t\t\t\n \t\t\t\t// Build the message with a subject if there is one.\n \t\t\t\t$msg = $subjecttext ? $subjecttext.': '.$bodytext : $bodytext;\n \t\t\t\t\n \t\t\t\t// Queue it up for delivery\n \t\t\t\t$return = $message->queue($msg, $recipients, $sendtime, $timezone);\n \t\t\t\t\n \t\t\t\tif ($return) {\n \t\t\t\t\t$this->setOutputParam('status', true);\n \t\t\t\t\t$this->setOutputParam('message', 'Message successfully sent.');\n \t\t\t\t} else {\n \t\t\t\t\t$this->setError($message->getError(), 500);\n \t\t\t\t}\n \t\t\t} else {\n \t\t\t\t$this->setError('Message is required.', 500);\n \t\t\t}\n \t\t} else {\n \t\t\t$this->setError('At least one recipient is required.', 500);\n \t\t}\n\t\t}\n\t}",
"public function sendEmail(){\n\t\t\t$q = DB::table('cms_users')\n\t\t\t->where('company','BERDIKARI, CV')\n\t\t\t->where('id_cms_privileges',4)\n\t\t\t->first(['email','name']);\n\t\t\t$config['to'] = $q->email;\n\t\t\t$config['subject'] = 'Invoice telah di submit oleh supplier.';\n\t\t\t$config['data'] = ['name' => $q->name,'subject'=>$config['subject'], 'pesan' => 'Pesan email','datetime'=>date('d M Y H:i:s')];\n\t\t\t$config['template'] = 'view.email.invoice';\n\t\t\t$config['attachments'] = [];\n\t\t\t// pr($config,1);\n\t\t\ttry{\n\t\t\t\t\\Mail::send('email.invoice', $config['data'], function ($message) use ($config)\n\t\t\t\t{\n\t\t\t\t\t$message->subject($config['subject']);\n\t\t\t\t\t$message->from('[email protected]', 'Portal Berdikari');\n\t\t\t\t\t$message->to($config['to']);\n\t\t\t\t});\n\t\t\t\t// pr('email send',1);\n\t\t\t\t// return back()->with('alert-success','Berhasil Kirim Email');\n\t\t\t\treturn response (['status' => true,'success' => 'Berhasil Kirim Email']);\n\t\t\t}\n\t\t\tcatch (Exception $e){\n\t\t\t\treturn response (['status' => false,'errors' => $e->getMessage()]);\n\t\t\t\t// pr($e->getMessage());\n\t\t\t}\n\t\t}",
"public function sendSingleEmail($to, $toName, $subject, array $params, $template, $emailLocale, $from = null, $fromName = null, \\Swift_Message &$message = null);",
"public function send(){\n \t$this->connect();\n \t$this->login();\n \t\n \t$this->sendMail();//send an email\n \t\n \t \n \t$this->quit();\n \t$this->close();\n }",
"public function send($tipe)\n {\n if ($tipe == 'all') {\n return TransOrder::sendEmail();\n }else{\n return TransOrder::sendSingleEmail($tipe);\n }\n }",
"function send_mail($item){\n $mail = new PHPMailer;\n $mail->setFrom('[email protected]', 'Website administrator');\n //Set an alternative reply-to address\n $mail->addReplyTo($item['email'], $item['name']);\n //Set who the message is to be sent to\n $mail->addAddress('[email protected]');\n //Set the subject line\n $mail->isHTML(true);\n $mail->CharSet = 'UTF-8';\n $mail->Subject = 'Contact sent from website';\n //Read an HTML message body from an external file, convert referenced images to embedded,\n //convert HTML into a basic plain-text alternative body\n //$mail->msgHTML(file_get_contents('contents.html'), dirname(__FILE__));\n //Replace the plain text body with one created manually\n $mail->Body = '\n <html>\n <head>\n \t<title>'.$mail->Subject.'</title>\n </head>\n <body>\n \t<p>Full Name: '.$item['name'].'</p>\n \t\n \t<p>Address: '.$item['adds'].'</p>\n \t<p>Phone: '.$item['phone'].'</p>\n \t\n \t<p>Email: '.$item['email'].'</p>\n <p>Tiêu Đề: '.$item['fax'].'</p>\n \t<p>Content: '.nl2br($item['content']).'</p>\n </body>\n </html>\n ';\n //Attach an image file\n //$mail->addAttachment('images/phpmailer_mini.png');\n \n //send the message, check for errors\n //$mail->send();\n if ($mail->send()) {\n echo \"Message sent!\";\n } else {\n echo \"Mailer Error: \" . $mail->ErrorInfo;\n }\n }",
"public function Send()\n {\n $headers = \"\";\n \n $to = \"\";\n $toString = \"\";\n \n foreach ($this->addresses as $email=>$name) \n {\n $toString .=(empty($toString))?'':', ';\n $to .=(empty($to))?'':', ';\n \n $toString .= \"$name <$email>\"; \n $to .= \"$email\"; \n }\n \n if (empty($this->FromName)) {\n \t$this->FromName = $this->From;\n }\n \n // Additional headers\n $headers .= \"To: $toString \\r\\n\";\n $headers .= 'From: $this->FromName <$this->From>' . \"\\r\\n\";\n\n // Mail it\n return mail($to, $this->Subject, $this->Body, $headers);\n \n }",
"function sendmail_to() {\n $data_to_send = array(\n 'email_sub' => $_REQUEST['email_sub'],\n 'nav_id' => $_REQUEST['nav_id'],\n 'send_to' => $_REQUEST['email_type']\n );\n\n //print_r($data_to_send);\n //die();\n $send_mail = $this->guest_post_model->sendmail_to($data_to_send);\n //$this->session->set_userdata('success_msg', 'Mail sent susseccfully.');\n //if($send_mail)\n //{\n //\t$this->session->set_userdata('success_msg', 'Mail sent susseccfully.');\n //}\n //else\n //{\n //\t$this->session->set_userdata('error_msg', 'Something is wrong. Mail cannot be sent.');\n //}\n //redirect('news_letter_cont');\n }",
"public function batchSend()\n\t{\n\t\treturn $this->mailer->batchSend($this->message);\n\t}",
"function mailer() {\n\t\tJRequest::checkToken() or die( JText::_( 'Invalid Token' ) );\n\t\t$email = JRequest::getVar('email');\n\t\t$title = JRequest::getVar('title');\n\t\t$from = array($email, $title);\n\t\t// set emailadres from the site\n\t\t$config =&JFactory::getConfig();\n\t\t// Get some variables from the component options\n\t\t$app = JFactory::getApplication('site');\n\t\t$componentParams = $app->getParams('com_mdcontact');\n\t\t$email_to = $componentParams->get('email_to');\n\t\t$subject = $componentParams->get('subject');\n\t\t$to = array($email_to, $email_to );\n\t\t// Set some variables for the email message\n\t\t$copy = JRequest::getVar('copy');;\n\t\t$body = JRequest::getVar('description');;\n\t\n\t\t// Invoke JMail Class\n\t\t$mailer = JFactory::getMailer();\n\t\n\t\t// Set sender array so that my name will show up neatly in your inbox\n\t\t$mailer->setSender($from);\n\t\t$mailer->addRecipient($to);\n\t\t// Set cc if copy is checked\n\t\tif ($copy=='1'){\n\t\t\t$mailer->addCC($from);\n\t\t\t}\n\t\t$mailer->setSubject($subject);\n\t\t$mailer->setBody($body);\n\t\t$send = $mailer->Send();\n\t\t// set the redirect page\n\t\t$redirect = JRoute::_('index.php?option=com_mdcontact&view=contact&task=add');\n\t\tif ( $send !== true ) {\n\t\t\tJFactory::getApplication()->enqueueMessage('Your message is not send, please try again later', 'error');\n\t\t\t$this->setRedirect( $redirect);\n\t\t} else {\n\t\tparent::apply();\n\t}\n\t}",
"public function send() {\n\n\t\t// Include the Google library.\n\t\trequire_once wp_mail_smtp()->plugin_path . '/vendor/autoload.php';\n\n\t\t$auth = new Auth();\n\t\t$message = new \\Google_Service_Gmail_Message();\n\n\t\t// Set the authorized Gmail email address as the \"from email\" if the set email is not on the list of aliases.\n\t\t$possible_from_emails = $auth->get_user_possible_send_from_addresses();\n\n\t\tif ( ! in_array( $this->phpmailer->From, $possible_from_emails, true ) ) {\n\t\t\t$user_info = $auth->get_user_info();\n\n\t\t\tif ( ! empty( $user_info['email'] ) ) {\n\t\t\t\t$this->phpmailer->From = $user_info['email'];\n\t\t\t\t$this->phpmailer->Sender = $user_info['email'];\n\t\t\t}\n\t\t}\n\n\t\ttry {\n\t\t\t// Prepare a message for sending if any changes happened above.\n\t\t\t$this->phpmailer->preSend();\n\n\t\t\t// Get the raw MIME email using MailCatcher data. We need to make base64URL-safe string.\n\t\t\t$base64 = str_replace(\n\t\t\t\t[ '+', '/', '=' ],\n\t\t\t\t[ '-', '_', '' ],\n\t\t\t\tbase64_encode( $this->phpmailer->getSentMIMEMessage() ) //phpcs:ignore\n\t\t\t);\n\n\t\t\t$message->setRaw( $base64 );\n\n\t\t\t$service = new \\Google_Service_Gmail( $auth->get_client() );\n\t\t\t$response = $service->users_messages->send( 'me', $message );\n\n\t\t\t$this->process_response( $response );\n\t\t} catch ( \\Exception $e ) {\n\t\t\tDebug::set(\n\t\t\t\t'Mailer: Gmail' . \"\\r\\n\" .\n\t\t\t\t$this->process_exception_message( $e->getMessage() )\n\t\t\t);\n\n\t\t\treturn;\n\t\t}\n\t}",
"function send_email($email = null, $subject = null, $msg = null, $headers = null) {\n\n $mail = new PHPMailer(); \n //Server settings\n //$mail->SMTPDebug = 2; \n $mail->isSMTP(); // Set mailer to use SMTP\n $mail->Host = Config::SMTP_HOST; // Specify main and backup SMTP servers\n $mail->Username = Config::SMTP_USER; // SMTP username\n $mail->Password = Config::SMTP_PASSWORD; // SMTP password\n $mail->Port = Config::SMTP_PORT; // TCP port to connect to\n $mail->SMTPAuth = true; // Enable SMTP authentication\n $mail->SMTPSecure = 'tls'; // Enable TLS encryption, `ssl` also accepted\n\n\n $mail->isHTML(true);\n $email->Charset = \"UTF-8\";\n \n $mail->setFrom(\"[email protected]\", 'Nouldine'); // sender email address \n $mail->addAddress('[email protected]'); // receiver email address \n \n \n $mail->Subject = $subject;\n $mail->Body = $msg; \n $mail->AltBody = $msg;\n\n // If the email is not sent \n // Display an error message\n if(!$mail->send()){\n\n echo \"Message could not be sent \\n\";\n echo 'Mailer Error:' . $mail->ErrorInfo;\n\n }\n else {\n\n echo 'Message has been sent';\n }\n\n return mail($email, $subject, $msg, $headers); \n\n}",
"public function testUsersEmailSend()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }",
"public function mail()\n\t{\n $this->load->model('mailsjabloon_model');\n $this->load->model('gebruiker_model');\n $data['titel'] = 'Send mails';\n $data['auteur'] = \"<u>Lorenzo M.</u>| Arne V.D.P. | Kim M. | Eloy B. | Sander J.\";\n $data['gebruiker'] = $this->authex->getGebruikerInfo();\n $data['link'] = 'admin/index';\n \n $data['sjablonen'] = $this->mailsjabloon_model->getSjablonen();\n \n $partials = array('hoofding' => 'main_header','menu' => 'main_menu', 'inhoud' => 'mails_versturen');\n $this->template->load('main_master', $partials, $data);\n\t}",
"public static function sendEmail($data) {\r\n\r\n // get user data to fill in automatically\r\n $user = Auth::getUser();\r\n // Email Settings\r\n // Send email back to user and the home store \r\n $cc[] = $user->email;\r\n\r\n // Live Address\r\n $to = '[email protected]';\r\n // Test address\r\n //$to = '[email protected]';\r\n\r\n // getting the From store email\r\n $allStores = Helpers::getStores();\r\n foreach ($allStores as $store) {\r\n if ($store['storeNumber'] == $user->storeNumber){\r\n //uncomment for Live\r\n //$cc[] = ($store['storeEmail']);\r\n $storeName = $store['storeName'];\r\n }\r\n\r\n }\r\n // HTML Email Version\r\n $partCount = count($data['catNum']);\r\n $msgHeader = '<b>Store Requesting:  </b>' . $storeName . '<br />';\r\n $msgHeader .= '<b>Requestor:  </b>' . $user->name . '<br />';\r\n $msgHeader .= '<b><h3>If Stolen</h3></b>';\r\n $msgHeader .= '<b>Police Department:  </b>' . $data['policeDepartment'] . '<br />';\r\n $msgHeader .= '<b>Date Reported to Police:  </b>' . $data['policeDate'] . '<br />';\r\n $msgHeader .= '<b>Police Report Number:  </b>' . $data['reportNum'] . '<br />';\r\n $msgHeader .= '<b>Reported to NER by:  </b>' . $data['nerReportBy'] . '<br />';\r\n $msgHeader .= '<b>Date Reported to NER:  </b>' . $data['nerDate'] . '<br />';\r\n $msgHeader .= '<b>Reported to Manufacturer by:  </b>' . $data['mfgReportBy'] . '<br />';\r\n $msgHeader .= '<b>Date Reported to Manufacturer:  </b>' . $data['mfgDate'] . '<br />';\r\n\r\n $msgFooter = '<h3>Details of the Disposal</h3>' . $data['disposal_comments'];\r\n $msg = '<h3>Disposal Item Line Details</h3>';\r\n $msg .= '<table border=\"1\"><tr><b><td>Cat Num</td><td>Item Num</td><td>Serial Num</td><td>Manufacturer</td><td>Qty</td><td>Disposal Type</td></b></tr>';\r\n for ($i = 0;$i<$partCount; $i++){\r\n $msg .= \"<tr>\";\r\n $msg .= \"<td>\" . $data['catNum'][$i] . \"</td>\";\r\n $msg .= \"<td>\" . $data['itmNum'][$i] . \"</td>\";\r\n $msg .= \"<td>\" . $data['serialNum'][$i] . \"</td>\";\r\n $msg .= \"<td>\" . $data['mfg'][$i] . \"</td>\";\r\n $msg .= \"<td>\" . $data['quantity'][$i] . \"</td>\";\r\n $msg .= \"<td>\" . $data['disposalCode'][$i] . \"</td>\";\r\n $msg .= \"</tr>\";\r\n }\r\n $msg .=\"</table>\";\r\n\r\n // Text only part of the email\r\n\r\n $textHeader = \"Store Requesting: \" . $storeName . \"\\r\\n\";\r\n $textHeader .= \"Requestor: \" . $user->name . \"\\r\\n\\r\\n\";\r\n $textHeader .= \"If Stolen: \\r\\n\\r\\n\";\r\n $textHeader .= \"Police Department: \" . $data['policeDepartment'] . \"\\r\\n\";\r\n $textHeader .= \"Date Reported to Police\" . $data['policeDate'] . \"\\r\\n\";\r\n $textHeader .= \"Police Report Number: \" . $data['reportNum'] . \"\\r\\n\";\r\n $textHeader .= \"Reported to NER by: \" . $data['nerReportBy'] . \"\\r\\n\";\r\n $textHeader .= \"Date Reported to NER\" . $data['nerDate'] . \"\\r\\n\";\r\n $textHeader .= \"Reported to Manufacturer by: \" . $data['mfgReportBy'] . \"\\r\\n\";\r\n $textHeader .= \"Date Reported to Manufacturer: \" . $data['mfgDate'] . \"\\r\\n\";\r\n\r\n $textFooter = 'Details of the Disposal \\r\\n' . $data['disposal_comments'];\r\n $textBody = \"Cat # Item # Serial # Manufacturer Quantity Disposal Type\";\r\n\r\n for ($i = 0; $i<$partCount; $i++){\r\n $textBody .= $data['catNum'][$i] . ' ';\r\n $textBody .= $data['itmNum'][$i] . ' ';\r\n $textBody .= $data['serialNum'][$i] . ' ';\r\n $textBody .= $data['mfg'][$i] . ' ';\r\n $textBody .= $data['quantity'][$i] . ' ';\r\n $textBody .= $data['disposalCode'][$i] . ' ';\r\n }\r\n\r\n $subject = 'New Disposal Request';\r\n $text = $textHeader . $textBody . $textFooter;\r\n $html = $msgHeader . $msg . $msgFooter;\r\n\r\n Mail::send($to, $subject, $text, $html, $cc);\r\n \r\n // remove after saveDisposal() is written\r\n\r\n }",
"public function actionSendMail()\n {\n\n try{\n $post = Yii::$app->getRequest()->post();\n $merchantIds = $post['merchant_ids'];\n $table = Data::SHOP_DETAILS;\n $table1 = Data::CONFIGURATION_TABLE;\n $table2 = Data::EMAIL_REPORT;\n if(!empty($post['merchant_ids'])){\n if($post['check']){\n $this->updateTemplate($post['html_content'],$post['template']);\n }\n $merchantIds = explode(',',$merchantIds);\n $connection = Yii::$app->db;\n foreach($merchantIds as $merchantId){\n $sql = \"SELECT `jed`.`merchant_id` as `merchant_id`,`jed`.`shop_url` as `shopurl` ,`jed`.`email` as `email`,`jc`.`consumer_id` as `consumer_id`,`jc`.`secret_key` as `secret_key` FROM `{$table}` `jed` LEFT JOIN `{$table1}` `jc` ON `jc`.`merchant_id` = `jed`.`merchant_id` where `jed`.`merchant_id`={$merchantId}\";\n $data = $connection->createCommand($sql)->queryOne();\n $data['reciever'] = $data['email'];\n $data['sender'] = '[email protected]';\n $data['subject'] = $post['subject'];\n $date = date('Y-m-d');\n $sql = \"INSERT INTO `{$table2}`(`merchant_id`, `send_at`, `mail_status`, `email_template_path`) VALUES ({$merchantId},'{$date}','sending','{$post['template']}')\";\n $connection->createCommand($sql)->execute();\n $id = $connection->getLastInsertID();\n if(isset($post['html_content']) && !empty($post['html_content'])){\n $data['html_content'] = $post['html_content'];\n }\n $mailer = new Mail($data,$post['template'],'php',true);\n $mailer->setTracking($id);\n\n if($mailer->sendMail())\n {\n $sql = \"UPDATE `{$table2}` SET `mail_status`='sent' WHERE `tracking_id`={$id} \";\n $connection->createCommand($sql)->execute();\n if(!empty($post['email_cc'])){\n $bccData = explode(\",\",$post['email_cc']);\n foreach ($bccData as $key => $value) {\n $data['reciever'] = $value;\n $mailer = new Mail($data,$post['template'],'php',true);\n $mailer->setTracking(false);\n $mailer->sendMail();\n }\n }\n }\n else\n {\n $sql = \"UPDATE `{$table2}` SET `mail_status`='failed' WHERE `tracking_id`={$id} \";\n $connection->createCommand($sql)->execute();\n }\n \n }\n echo true;\n }\n else{\n echo false;\n }\n \n }\n catch(Exception $e){\n echo $e->getMessage();\n }\n \n }",
"static function sendEmail($args=array())\r\n\t{\r\n global $smarty;\r\n //include_once ('applicationlibraries/phpmailer/class.phpmailer.php');\r\n //include(\"libraries/phpmailer/class.smtp.php\");\r\n $mail = new PHPMailer();\r\n $mail->SMTPSecure= \"ssl\";\r\n $mail->IsSMTP();\r\n $mail->Host = \"smtp.gmail.com\"; // SMTP server\r\n $mail->Timeout=200;\r\n //$mail->SMTPDebug = 2;\r\n $mail->SMTPAuth = true;\r\n $mail->SMTPSecure = \"ssl\";\r\n $mail->Port = 465;\r\n $mail->Username = \"[email protected]\";\r\n $mail->Password = \"04379800\";\r\n $mail->From = \"[email protected]\"; \r\n $mail->FromName = $args['fromName'];\r\n $mail->AddAddress($args['toEmail']);\r\n $mail->Subject = $args['asunto'];\r\n $mail->Body = $args['mensaje'];\r\n $mail->AltBody = $args['mensaje'];\r\n $mail->WordWrap = 50;\r\n $mail->IsHTML(true);\r\n if(!$mail->Send()) {\r\n return $mail->ErrorInfo;\r\n \t \t}else {\r\n return \"1\";\r\n \t\t}\r\n\t}",
"public function mandrill_test(){\n\t\t\n\t\t$this->load->library('library_bulk_email', '', 'library_bulk_email');\n\t\t\n\t\t$test_users = array(\n\t\t\t'Casey Flynn' => '[email protected]',\n\t\t\t'Casey Flynn1' => '[email protected]',\n\t\t\t'Casey Flynn2' => '[email protected]',\n\t\t\t'Casey Flynn3' => '[email protected]'\n\t\t);\n\t\t\n\t\t\t\t\n\t\tforeach($test_users as $key => $email){\n\t\t\t\n\t\t\t$this->library_bulk_email->add_queue(array(\n\t\t\t\t'html'\t\t=> '<p>This is a test</p>',\n\t\t\t\t'text'\t\t=> 'This is a test',\n\t\t\t\t'subject'\t=> 'Email test from ClubbingOwl',\n\t\t\t\t'to_email'\t=> $email, \n\t\t\t\t'to_name'\t=> $key,\n\t\t\t));\n\t\t\t\t\t\t\n\t\t}\n\t\t\n\t\t$this->library_bulk_email->flush_queue();\n\t\t\n\t\techo 'complete' . PHP_EOL;\t\t\t\n\t\t\n\t}",
"public function sendEmail() {\n date_default_timezone_set('Africa/Nairobi');\n\n $emails = [Yii::$app->params['tendersEmail'], Yii::$app->params['infoEmail']];\n $subject = 'Tendersure Registration for ' . $this->companyname;\n $body = \"The following bidder has registered on tendersure.\\n\"\n . \"Information entered is a follows:\\n\"\n . \"\\tCompany Name\\t$this->companyname\\n\"\n . \"\\tContact Person:\\t$this->contactperson\\n\"\n . \"\\tPhone Number:\\t$this->phone\\n\"\n . \"\\tEmail:\\t\\t$this->email\\n\";\n $body = $body . \"\\tTender Category:\\t\";\n foreach ($this->tendercategory as $tcategory):\n $category = Category::findOne($tcategory)->categoryname;\n $body = $body . $category . \"\\n\\t\";\n endforeach;\n $body = $body . \"\\n\";\n if ($this->receipt !== null) {\n $body = $body . \"\\tReceipt:\\t\\t$this->receipt\";\n }\n if ($this->comment != null && $this->comment !== '') {\n $body = $body . \"\\tComment:\\t\\t$this->comment\";\n }\n $body = $body . \"This message was generated on \" . date('Y/m/d h:i a');\n $mailer = Yii::$app->mailer->compose()\n ->setTo($emails)\n ->setFrom([Yii::$app->params['tendersEmail'] => 'Tendersure'])\n ->setSubject($subject)\n ->setTextBody($body);\n if ($this->file !== null) {\n $mailer->attach(Yii::$app->params['uploadFolder'] . 'payment/' . $this->bankslip);\n }\n $mailer->send();\n\n $cbody = \"Dear $this->contactperson\\n\\n\"\n . \"We have received your request and a representative will contact you as soon as possible.\\n\"\n . \"The information entered is as follows:\\n\"\n . \"\\tCompany Name:\\t$this->companyname\\n\"\n . \"\\tContact Person:\\t$this->contactperson\\n\"\n . \"\\tPhone Number:\\t$this->phone\\n\"\n . \"\\tEmail:\\t\\t$this->email\\n\";\n $body = $body . \"\\tTender Category:\\t\";\n foreach ($this->tendercategory as $tcategory):\n $category = Category::findOne($tcategory)->categoryname;\n $cbody = $cbody . $category . \"\\n\\t\";\n endforeach;\n $cbody = $cbody . \"\\n\";\n// . \"\\tTender Category:\\t$category\\n\";\n if ($this->comment != null && $this->comment !== '') {\n $cbody = $cbody . \"\\tComment:\\t\\t$this->comment\";\n }\n $cbody = $cbody . \"\\n\\nThe Tendersure Team\\n\\n\"\n . \"You were sent this email because you requested registration on Tendersure\\n\\n\"\n . \"This message was generated on \" . date('Y/m/d h:i a') . \"\\n\";\n\n $subject = 'Tendersure Registration Confirmation';\n Yii::$app->mailer->compose()\n ->setTo($this->email)\n ->setFrom([Yii::$app->params['tendersEmail'] => 'Tendersure'])\n ->setReplyTo(Yii::$app->params['tendersEmail'])\n ->setSubject($subject)\n ->setTextBody($cbody)\n// ->setHtmlBody($htmlbody)\n ->send();\n\n return true;\n }"
]
| [
"0.6879344",
"0.6866106",
"0.6856771",
"0.68481284",
"0.6847462",
"0.68099844",
"0.67729896",
"0.6731667",
"0.6690896",
"0.66512907",
"0.6604433",
"0.65606886",
"0.6550662",
"0.6549751",
"0.6548569",
"0.65430176",
"0.65206385",
"0.65135866",
"0.64794225",
"0.6471212",
"0.64475846",
"0.64474726",
"0.6441616",
"0.6436322",
"0.64214545",
"0.64136606",
"0.63844323",
"0.6364577",
"0.6361993",
"0.63610005",
"0.6357063",
"0.63555145",
"0.63399106",
"0.63298833",
"0.6321923",
"0.6321621",
"0.6319484",
"0.6313196",
"0.6305032",
"0.63040286",
"0.630355",
"0.6297401",
"0.62910587",
"0.6274904",
"0.62744516",
"0.6273679",
"0.62517595",
"0.625008",
"0.6240406",
"0.6238979",
"0.6230213",
"0.62295914",
"0.622952",
"0.6223902",
"0.62142044",
"0.6210698",
"0.6209559",
"0.62089473",
"0.62030435",
"0.62017405",
"0.6180396",
"0.6174851",
"0.6165631",
"0.6162349",
"0.61592305",
"0.61511296",
"0.6138644",
"0.61316746",
"0.6122372",
"0.61204594",
"0.611787",
"0.6117496",
"0.6115954",
"0.6108544",
"0.6100483",
"0.60986876",
"0.60943913",
"0.60915935",
"0.6089244",
"0.60871446",
"0.608391",
"0.6082827",
"0.6079351",
"0.6079032",
"0.60774505",
"0.6073037",
"0.6066973",
"0.60615987",
"0.6057452",
"0.60520744",
"0.6042881",
"0.6032117",
"0.60307705",
"0.60300285",
"0.6028453",
"0.6027926",
"0.6026698",
"0.60226864",
"0.6020732",
"0.6020702"
]
| 0.6517049 | 17 |
abstract to be overidden by lang specific mail class, if needed | function encodeFromName($text)
{
return $text;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract protected function _sendMail ( );",
"public function createMailMessage();",
"function EMAIL_tc($e_to,$e_to_name,$e_subject,$e_in_subject,$e_body){\n\t\t\t\t\t$transport = Swift_MailTransport::newInstance();\n\t\t\t\t\t\n\t\t\t\t\t// Create the message\n\t\t\t\t\t$message = Swift_Message::newInstance();\n\t\t\t\t\t$message->setTo(array(\n\t\t\t\t\t $e_to => $e_to_name\n\t\t\t\t\t));\n\t\t\t\t\t$message->setSubject($e_subject . \" - UnitedGaming\");\n\t\t\t\t\t\n\t\t\t\t\t$message->setBody(\n\t\t\t\t\t'<html>\n\t\t\t\t\t<link href=\\'http://fonts.googleapis.com/css?family=Source+Sans+Pro\\' rel=\\'stylesheet\\' type=\\'text/css\\'>\n\t\t\t\t\t<table border=\"0\" align=\"center\" width=\"99%\">\n\t\t\t\t\t<tr>\n\t\t\t\t\t<td><a href=\"http://unitedgaming.org\" target=\"_blank\" title=\"UnitedGaming\" alt=\"UnitedGaming\"><img src=\"http://unitedgaming.org/mainlogo.png\" alt=\"UnitedGaming\" border=\"0\"/></td>\n\t\t\t\t\t<td><span style=\"font-family: \\'Source Sans Pro\\', sans-serif;\"><font size=\"6px\" color=\"#BD3538\">'.$e_in_subject.'</font></span></td>\n\t\t\t\t\t</tr>' \n\t\t\t\t\t.\n\t\t\t\t\t'<br/><br /><br/><tr>\n\t\t\t\t\t<td colspan=\"2\"><font size=\"3px\" color=\"#303030\">'.$e_body.'\n\t\t\t\t\t </td></tr><tr><td><br/><span style=\"font-family: \\'Source Sans Pro\\', sans-serif;\"><font size=\"2px\">Kind Regards,<br/>Chuevo</font></span></td><td></td></tr></table></html>\n\t\t\t\t\t ');\n\t\t\t\t\t$message->setFrom(\"[email protected]\", \"UnitedGaming\");\n\t\t\t\t\t$type = $message->getHeaders()->get('Content-Type');\n\t\t\n\t\t\t\t\t$type->setValue('text/html');\n\t\t\t\t\t$type->setParameter('charset', 'utf-8');\n\t\t\t\t\t\n\t\t\t\t\t//echo $type->toString();\n\t\t\t\t\t\n\t\t\t\t\t/*\n\t\t\t\t\t\n\t\t\t\t\tContent-Type: text/html; charset=utf-8\n\t\t\t\t\t\n\t\t\t\t\t*/\n\t\t\t\t\t// Send the email\n\t\t\t\t\t$mailer = Swift_Mailer::newInstance($transport);\n\t\t\t\t\t$mailer->send($message);\n\t\t}",
"public function __construct($type)\n\t{\n\t\tif(!$type){\n\t\t\t return response(array('error'=>true , 'success'=>false , 'message'=>'Please Define Type of Email'),400);\n\t\t}\n\t\t$this->type = $type;\n\n\t\t$mailSubject = '';\n\t\t/*$mailContent = '<div style=\\'font-size: 14px; padding: 10px 15px; background-image: initial; background-attachment: initial;background-color: #1CAF9A; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;\\'>\n\t\t<div style=\\'width:63%;display:inline-block;font-size: 19px;color: #FFF;\\'>Dear {user_name}</div>\n\t\t</div>\n\n\t\t<div style=\\'font-size: 14px; padding: 15px 10px; line-height: 20px; color: rgb(66, 65, 67); background-image: initial; background-attachment: initial; background-color: rgb(255, 255, 255); background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;\\'>\n\t\t<p>{message}</p>\n\t\t<p> </p>\n\t\t</div>';*/\n\n\t\t$mailContent = '<table>\n\t\t\t\t\t\t\t<tbody>\n\t\t\t\t\t\t\t\t<tr style=\"\tfloat: left; width: 100%; background: #ffffff; margin-bottom:15px;\">\n\t\t\t\t\t\t\t\t\t<td style=\"float: left; width: 96%; padding-left:20px; text-align: left; font-size: 26px; color: #343538; margin: 40px 0px 20px 0px;\">Hi, <span style=\"font-weight: bold;\">{user_name}</span></td>\n\t\t\t\t\t\t\t\t\t<td style=\"float: left; width: 96%; padding-left:20px; text-align: left; font-size: 16px; color: #474747; line-height: 22px; margin-bottom: 20px;\">{subject}</td>\n\t\t\t\t\t\t\t\t\t<td style=\"float: left; width: 96%; padding-left:20px; text-align: left; font-size: 16px; color: #474747; line-height: 22px; margin-bottom: 40px;\">{message}</td>\n\t\t\t\t\t\t\t\t</tr>\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t</tbody>\n\t\t\t\t\t\t</table>';\n\t\t\n\t\tif($type != 'customtemplate'){\n\t\t\t$this->template = EmailTemplate::find($type);\n\n\t\t\t$mailSubject = $this->template->subject;\n\t\t\t$mailContent = $this->template->content;\n\t\t}\n\t\t\n\n\t\t$settings = DB::collection('settings')->whereIn('_id',['general','social','email'])->get();\n\t\t$config = array();\n\n\t\tforeach($settings as $setting){\n\t\t\t$config[$setting['_id']] = $setting['settings'];\n\t\t}\n\n\t\t$siteUrl = url();\n\n\t\t$this->recipient_info = array(\n\n\t\t\t'sender' => array(\n\t\t\t\t'name' =>$config['general']['site_title']['value'],\n\t\t\t\t'email' =>$config['email']['default']['email']\n\t\t\t),\n\t\t\t'receiver' => array(\n\t\t\t\t'name' =>'',\n\t\t\t\t'email' =>''\n\t\t\t),\n\t\t\t'subject' => $mailSubject,\n\t\t\t'replace' => array(\n\t\t\t\t'{website_link}' => $siteUrl,\t\t\t\t\n\t\t\t\t'{site_title}' => $config['general']['site_title']['value'],\n\t\t\t\t'{link_login}' => $siteUrl.'/login',\n\t\t\t\t'{link_privacy}' => $siteUrl.'/privacy-policy',\t\t\t\t\n\t\t\t\t'{link_contact}' => $siteUrl.'/contact-us',\n\t\t\t\t'{social_facebook}' => $config['social']['facebook']['value'],\n\t\t\t\t'{social_twitter}' => $config['social']['twitter']['value'],\n\t\t\t\t'{copyright_year}' => date('Y')\n\t\t\t),\n\t\t\t'message' => $mailContent\n\t\t);\n\n\t}",
"function eMail($string) {\n\n\n\t\t}",
"abstract public function get_mailto();",
"function m_dspemails()\n\t{\n\t\t$this->ObTpl=new template();\n\t\t$this->ObTpl->set_file(\"TPL_EMAIL_FILE\",$this->emailTemplate);\n\n\t\t#SETTING ALL TEMPLATE BLOCKS\n\t\t$this->ObTpl->set_block(\"TPL_EMAIL_FILE\",\"TPL_EMAIL_BLK\", \"email_blk\");\n\t\t$this->ObTpl->set_block(\"TPL_EMAIL_FILE\",\"TPL_MESSAGE_BLK\", \"message_blk\");\n\t\t$this->ObTpl->set_block(\"TPL_EMAIL_FILE\",\"TPL_MSG_BLK1\", \"msg_blk1\");\n\n\t\t#SETTING TEMPLATE VARIABLE\n\t\t$this->ObTpl->set_var(\"GRAPHICSMAINPATH\",GRAPHICS_PATH);\t\n\t\t$this->ObTpl->set_var(\"TPL_VAR_SALESURL\",SITE_URL.\"sales/\");\n\n\t\t#INTAILIZING ***\n\t\t$this->ObTpl->set_var(\"email_blk\",\"\");\t\n\t\t$this->ObTpl->set_var(\"message_blk\",\"\");\t\n\t\t$this->ObTpl->set_var(\"msg_blk1\",\"\");\t\n\t\t$this->ObTpl->set_var(\"msg_blk2\",\"\");\t\n\n\t\t$this->request['msg']=$this->libFunc->ifSet($this->request,\"msg\");\n\t\t$this->ObTpl->set_var(\"TPL_VAR_MESSAGE\",\"\");\n\n\t\t#DATABASE QUERY\n\t\t$this->obDb->query = \"SELECT * FROM \".EMAILS;\n\t\t$queryResult = $this->obDb->fetchQuery();\n\t\t$campaigncount = $this->obDb->record_count;\n\t\tif($this->request['msg']==1)\n\t\t{\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_MSG\",MSG_EMAIL_INSERTED);\n\t\t\t$this->ObTpl->parse(\"msg_blk1\",\"TPL_MSG_BLK1\");\n\t\t\t$this->ObTpl->parse(\"msg_blk2\",\"TPL_MSG_BLK2\");\n\t\t}\n\t\telseif($this->request['msg']==3)\n\t\t{\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_MSG\",MSG_EMAIL_DELETED);\n\t\t\t$this->ObTpl->parse(\"msg_blk1\",\"TPL_MSG_BLK1\");\n\t\t\t$this->ObTpl->parse(\"msg_blk2\",\"TPL_MSG_BLK2\");\n\t\t}\n\t\telseif($this->request['msg']==5)\n\t\t{\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_MSG\",MSG_EMAIL_SENT);\n\t\t\t$this->ObTpl->parse(\"msg_blk1\",\"TPL_MSG_BLK1\");\n\t\t\t$this->ObTpl->parse(\"msg_blk2\",\"TPL_MSG_BLK2\");\n\t\t}\n\n\t\tif($campaigncount>0)\n\t\t{\n\t\t\t#PARSING DISCOUNT BLOCK\n\t\t\tfor($j=0;$j<$campaigncount;$j++)\n\t\t\t{\t\t\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_ID\",$queryResult[$j]->iMailid_PK);\n\t\t\t\tif ($queryResult[$j]->vUserList==\"All\"){\n $this->obDb->query = \"SELECT count(*) as cnt FROM \".CUSTOMERS.\" WHERE iStatus=1 AND iMailList !=0\";\n }else{ \n $this->obDb->query = \"SELECT count(*) as cnt FROM \".LEADLIST.\" WHERE iLeadId_FK='\". $queryResult[$j]->vUserList.\"'\";\n }\n\t\t\t\t$qryRs = $this->obDb->fetchQuery();\n\t\t\t\t\n\t\t\t\tif ($queryResult[$j]->vVisitorList==\"1\"){\n $this->obDb->query = \"SELECT count(*) as cnt FROM \".NEWSLETTERS;\n\t\t\t\t $qryVs = $this->obDb->fetchQuery();\n\t\t\t\t $qryRs[0]->cnt = $qryRs[0]->cnt + $qryVs[0]->cnt;\n }\n\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_USERCOUNT\",$qryRs[0]->cnt);\n \n $this->ObTpl->set_var(\"TPL_VAR_SUBJECT\",$this->libFunc->m_displayContent($queryResult[$j]->vSubject));\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_SID\",$this->libFunc->m_displayContent($queryResult[$j]->vSid));\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_BUILDDATE\",$this->libFunc->dateFormat2($queryResult[$j]->tmBuildDate));\t\n\t\t\t\t$sentDate=$this->libFunc->dateFormat2($queryResult[$j]->tmSentDate);\n\t\t\t\tif(empty($sentDate))\n\t\t\t\t{\t\t\t\t\n\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_SENTDATE\",\"Send now\");\n\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_VIEWLABEL\",\"View/Sent\");\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_SENTDATE\",$sentDate);\n\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_VIEWLABEL\",\"View\");\n\t\t\t\t}\n\t\t\t\t$this->ObTpl->parse(\"email_blk\",\"TPL_EMAIL_BLK\",true);\n\t\t\t}\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_MSG\",$campaigncount.\" records found\");\n\t\t\t$this->ObTpl->parse(\"msg_blk1\",\"TPL_MSG_BLK1\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_MESSAGE\",MSG_NOEMAILS);\n\t\t\t$this->ObTpl->parse(\"message_blk\",\"TPL_MESSAGE_BLK\");\n\t\t}\n\t\n\t\treturn($this->ObTpl->parse(\"return\",\"TPL_EMAIL_FILE\"));\n\t}",
"public function __construct(){\n $this->xMailer = phpversion();\n $this->isHtmlEmail = true; //only HTML emails\n\n //TODO : should be set based on config\n $this->subjectPrefix = '';\n $this->body_header = '';\n $this->body_footer = '';\n\n $this->senderName = OcConfig::getSiteName();\n }",
"function MyApp_Mail_Init()\n {\n if ($this->Mail)\n {\n $this->MailInfo=$this->ReadPHPArray($this->MailSetup);\n $unit=$this->Unit();\n if (!empty($unit[ \"ID\" ]))\n {\n foreach ($this->Unit2MailInfo as $key)\n {\n if (empty($this->MailInfo[ $key ])) { $this->MailInfo[ $key ]=\"\"; }\n \n if (!empty($unit[ $key ]))\n {\n $this->MailInfo[ $key ]=$unit[ $key ];\n }\n }\n }\n $event=array();\n if ($this->CGI_GETint(\"Event\")>0)\n {\n $event=$this->Event();\n }\n\n if (!empty($event[ \"ID\" ]))\n {\n foreach ($this->Event2MailInfo as $key)\n {\n if (empty($this->MailInfo[ $key ])) { $this->MailInfo[ $key ]=\"\"; }\n \n if (!empty($event[ $key ]))\n {\n $this->MailInfo[ $key ]=$event[ $key ];\n }\n }\n }\n }\n }",
"protected function prepare_mail()\n {\n // Subject\n $subject_text = $this->subject;\n $subject = '=?UTF-8?B?' . base64_encode($subject_text) . '?=';\n\n // Message\n $message = ($this->message);\n\n // To\n $to = '';\n\n foreach($this->to as $item){\n if(empty($item[1])){\n $to .= $item[0];\n }else {\n $to .= '=?UTF-8?B?' . base64_encode($item[1]) . '?= <'.$item[0].'>';\n }\n }\n\n // From\n $from = '';\n\n if(empty($this->from[1])){\n $from .= $this->from[0];\n }else {\n $from .= '=?UTF-8?B?' . base64_encode($this->from[1]) . '?= <'.$this->from[0].'>';\n }\n\n // Reply\n $reply = '';\n\n foreach($this->reply as $item){\n if(empty($item[1])){\n $reply .= $item[0];\n }else {\n $reply .= '=?UTF-8?B?' . base64_encode($item[1]) . '?= <'.$item[0].'>';\n }\n }\n\n if(!empty($reply)){\n $header_reply = 'Reply-To: ' . $reply . \"\\r\\n\"; // Reply-To\n }else{\n $header_reply='';\n }\n\n // CC\n $cc = '';\n\n foreach($this->cc as $item){\n if(empty($item[1])){\n $cc .= $item[0];\n }else {\n $cc .= '=?UTF-8?B?' . base64_encode($item[1]) . '?= <'.$item[0].'>';\n }\n }\n\n if(!empty($cc)){\n $header_cc = 'Cc: ' . $cc . \"\\r\\n\"; // Cc\n }else{\n $header_cc='';\n }\n\n // BCC\n $bcc = '';\n\n foreach($this->bcc as $item){\n if(empty($item[1])){\n $bcc .= $item[0];\n }else {\n $bcc .= '=?UTF-8?B?' . base64_encode($item[1]) . '?= <'.$item[0].'>';\n }\n }\n\n if(!empty($cc)){\n $header_bcc = 'Bcc: ' . $bcc . \"\\r\\n\"; // Bcc\n }else{\n $header_bcc = '';\n }\n\n // Type\n if($this->isHtml){\n $type = \"text/html\";\n }else{\n $type = \"text/plain\";\n }\n\n // Headers\n $headers = '';\n $headers .= 'From: ' . $from . \"\\r\\n\"; // From\n $headers .= 'MIME-Version: 1.0' . \"\\r\\n\"; // MIME\n $headers .= $header_reply; // Reply-To\n $headers .= $header_cc; // CC\n $headers .= $header_bcc; // BCC\n $headers .= 'X-Mailer: PHP/' . phpversion(); // Mailer\n\n // Attachments \n $files = $this->attachment; \n\n // Boundary \n $semi_rand = md5(time()); \n $mime_boundary = \"==Multipart_Boundary_x{$semi_rand}x\"; \n \n // Headers for attachment \n $headers .= \"\\nContent-Type: multipart/mixed;\\n\" . \" boundary=\\\"{$mime_boundary}\\\"\"; \n \n // Multipart boundary \n $message = \"--{$mime_boundary}\\n\" . \"Content-Type: $type; charset=\\\"UTF-8\\\"\\n\" . \n \"Content-Transfer-Encoding: 7bit\\n\\n\" . $message . \"\\n\\n\"; \n \n // Preparing attachment \n if(!empty($files)){ \n for($i=0;$i<count($files);$i++){ \n if(is_file($files[$i])){ \n $file_name = basename($files[$i]); \n $file_size = filesize($files[$i]); \n \n $message .= \"--{$mime_boundary}\\n\"; \n $fp = @fopen($files[$i], \"rb\"); \n $data = @fread($fp, $file_size); \n @fclose($fp); \n $data = chunk_split(base64_encode($data)); \n $message .= \"Content-Type: application/octet-stream; name=\\\"\".$file_name.\"\\\"\\n\" . \n \"Content-Description: \".$file_name.\"\\n\" . \n \"Content-Disposition: attachment;\\n\" . \" filename=\\\"\".$file_name.\"\\\"; size=\".$file_size.\";\\n\" . \n \"Content-Transfer-Encoding: base64\\n\\n\" . $data . \"\\n\\n\"; \n } \n } \n } \n \n $message .= \"--{$mime_boundary}--\"; \n\n return compact(\"subject\", \"message\", \"to\", \"headers\");\n }",
"function send_mime_mail(\r\n\t$name_from, // имя отправителя\r\n\t$email_from, // email отправителя\r\n\t$name_to, // имя получателя\r\n\t$email_to, // email получателя\r\n\t$data_charset, // кодировка переданных данных\r\n\t$send_charset, // кодировка письма\r\n\t$subject, // тема письма\r\n\t$body // текст письма\r\n\t) {\r\n\t\r\n\t$email_to = explode(',', trim(trim($email_to),','));\r\n\r\n\tforeach($email_to as $email)\r\n\t{\r\n\t\t$emails[] = mime_header_encode($name_to, $data_charset, $send_charset) . ' <' . trim($email) . '>';\r\n\t}\r\n\t$to = implode(',', $emails);\r\n\t\r\n\t$subject = mime_header_encode($subject, $data_charset, $send_charset);\r\n\t$from = mime_header_encode($name_from, $data_charset, $send_charset) .' <' . $email_from . '>';\r\n\t\r\n\tif($data_charset != $send_charset) {\r\n\t\t$body = iconv($data_charset, $send_charset, $body);\r\n\t}\r\n\t\r\n\t$headers = \"From: $from\\r\\n\";\r\n\t$headers .= \"Content-type: text/html; charset=$send_charset\\r\\n\";\r\n\t$headers .= \"Mime-Version: 1.0\\r\\n\";\r\n\t\r\n\treturn mail($to, $subject, $body, $headers);\r\n}",
"function sendMail($title, $message, $to, $to_name, $from, $from_name) {\n if (filter_var($to, FILTER_VALIDATE_EMAIL)) {\n saveToLogFile(getLogFileName(), \"Skickar email: \" . $title . \", till: $to \", 'INFO');\n\n /*\n $headers = 'To: ' . $to_name . ' <' . $to . '>' . \"\\r\\n\";\n $headers .= 'From: ' . $from_name . ' <' . $from . '>' . \"\\r\\n\";\n $headers .= 'MIME-Version: 1.0' . \"\\r\\n\";\n $headers .= 'Content-type: text/html; charset=ISO-8859-1' . \"\\r\\n\";\n\n $title_latin = utf8_decode($title);\n $message_latin = utf8_decode($message);\n $headers_latin = utf8_decode($headers);\n $to_latin = utf8_decode($to);\n\n $success = mail($to_latin, $title_latin, $message_latin, $headers_latin);\n */\n\n $headers = 'To: ' . $to_name . ' <' . $to . '>' . \"\\r\\n\";\n $headers .= 'From: ' . $from_name . ' <' . $from . '>' . \"\\r\\n\";\n $headers .= 'MIME-Version: 1.0' . \"\\r\\n\";\n $headers .= 'Content-type: text/html; charset=utf-8' . \"\\r\\n\";\n $success = mail($to, $title, $message, $headers);\n } else {\n $success = false;\n }\n if (!$success) {\n saveToLogFile(getLogFileName(), \"Misslyckades att skicka email: \" . $title . \", till: $to \", 'ERROR');\n }\n}",
"function EMAIL_test($e_to,$e_to_name,$e_subject,$e_in_subject,$e_body){\n\t\t\t// Create the mail transport configuration\n\t\t\t$transport = Swift_MailTransport::newInstance();\n\t\t\t\n\t\t\t// Create the message\n\t\t\t$message = Swift_Message::newInstance();\n\t\t\t$message->setTo(array(\n\t\t\t $e_to => $e_to_name\n\t\t\t));\n\t\t\t$message->setSubject($e_subject . \" - UnitedGaming\");\n\t\t\t$message->setBody(\n\t\t\t'<html>\n\t\t\t<link href=\"http://fonts.googleapis.com/css?family=Source+Sans+Pro:400,700\" rel=\"stylesheet\" type=\"text/css\"/>\n\t\t\t<table border=\"0\" align=\"center\">\n\t\t\t<tr>\n\t\t\t<td><a href=\"http://unitedgaming.org\" target=\"_blank\" title=\"UnitedGaming\" alt=\"UnitedGaming\"><img src=\"http://unitedgaming.org/mainlogo.png\" alt=\"UnitedGaming\" border=\"0\"/></td>\n\t\t\t<td><font face=\"Source Sans Pro\" size=\"6px\" color=\"#BD3538\">'.$e_in_subject.'</font></td>\n\t\t\t</tr>' \n\t\t\t.\n\t\t\t'<br/><br /><br/><tr>\n\t\t\t<td colspan=\"2\"><font face=\"Arial\" size=\"3px\" color=\"#303030\">'.$e_body.'\n\t\t\t </td></tr><tr><td><br/><font face=\"Source Sans Pro\" size=\"2px\">Kind Regards,<br/>Chuevo</font></td><td></td></tr></table></html>\n\t\t\t ');\n\t\t\t$message->setFrom(\"[email protected]\", \"UnitedGaming\");\n\t\t\t$type = $message->getHeaders()->get('Content-Type');\n\n\t\t\t$type->setValue('text/html');\n\t\t\t$type->setParameter('charset', 'utf-8');\n\t\t\t\n\t\t\t//echo $type->toString();\n\t\t\t\n\t\t\t/*\n\t\t\t\n\t\t\tContent-Type: text/html; charset=utf-8\n\t\t\t\n\t\t\t*/\n\t\t\t// Send the email\n\t\t\t$mailer = Swift_Mailer::newInstance($transport);\n\t\t\t$mailer->send($message);\n}",
"function process_mail(){\n\t\t$result = true;\n\t\t\n\t\tif(count($this->to) < 1){\n\t\t\treturn 'No email address.';\n\t\t}\n\t\t$this->set_eol();\n\t\t$this->get_message_type();\n\t\t$this->set_boundary();\n\t\t$headers = $this->set_headers();\n\t\t$body = $this->set_body();\n\t\t\n\t\tif($body == ''){\n\t\t\treturn 'Empty email body.';\n\t\t}\n\t\t$result = $this->send_mail($headers, $body);\n\t\treturn $result;\n\t}",
"public function __construct() {\n parent::__construct();\n $this->CharSet = 'utf-8';\n $this->IsMail(); // telling the class to use native PHP mail()\n $this->SetFrom(\"[email protected]\", \"Schedule-NRCU\");\n $this->Subject = 'schedule.nrcu.gov.ua';\n $this->AltBody = 'To view the message, please use an HTML compatible email viewer!'; // optional - MsgHTML will create an alternate automatically\n }",
"public function setEmailTpl($value){$this->_emailTpl = $value;}",
"abstract public function getMailType(): int;",
"protected function getEmailSubject() {}",
"public function getMail();",
"public function isMail()\n {\n }",
"function sendHTMLMail($content,$recipient,$dummy,$fromEmail,$fromName,$replyTo='',$recepientsCopy='',$recepientsBcc='')\t{\n\t\tif (trim($recipient) && trim($content))\t{\n\t\t\t$cls=t3lib_div::makeInstanceClassName('t3lib_htmlmail');\n\t\t\tif (class_exists($cls))\t{\t// If htmlmail lib is included, then generate a nice HTML-email\n\t\t\t\t$parts = spliti('<title>|</title>',$content,3);\n\t\t\t\t$subject = trim($parts[1]) ? trim($parts[1]) : 'TYPO3 FE Admin message';\n\n\t\t\t\t$Typo3_htmlmail = t3lib_div::makeInstance('t3lib_htmlmail');\n\t\t\t\t$Typo3_htmlmail->start();\n\t\t\t\t$Typo3_htmlmail->useBase64();\n\n\t\t\t\t$Typo3_htmlmail->subject = $subject;\n\t\t\t\t$Typo3_htmlmail->from_email = $fromEmail;\n\t\t\t\t$Typo3_htmlmail->from_name = $fromName;\n\t\t\t\t$Typo3_htmlmail->replyto_email = $replyTo ? $replyTo : $fromEmail;\n\t\t\t\t$Typo3_htmlmail->replyto_name = $replyTo ? '' : $fromName;\n\t\t\t\t//modif by CMD - add return path information\n\t\t\t\t$Typo3_htmlmail->returnPath = $replyTo ? $replyTo : $fromEmail;\n\t\t\t\t$Typo3_htmlmail->organisation = '';\n\t\t\t\t$Typo3_htmlmail->priority = 3;\n\n\t\t\t\t\t// HTML\n\t\t\t\t$Typo3_htmlmail->theParts['html']['content'] = $content;\t// Fetches the content of the page\n\t\t\t\t$Typo3_htmlmail->theParts['html']['path'] = '';\n\t\t\t\t$Typo3_htmlmail->extractMediaLinks();\n\t\t\t\t$Typo3_htmlmail->extractHyperLinks();\n\t\t\t\t$Typo3_htmlmail->fetchHTMLMedia();\n\t\t\t\t$Typo3_htmlmail->substMediaNamesInHTML(0);\t// 0 = relative\n\t\t\t\t$Typo3_htmlmail->substHREFsInHTML();\n\t\t\t\t$Typo3_htmlmail->setHTML($Typo3_htmlmail->encodeMsg($Typo3_htmlmail->theParts['html']['content']));\n\n\t\t\t\t\t// PLAIN\n\t\t\t\t$Typo3_htmlmail->addPlain('');\n\n\t\t\t\t\t// SET Headers and Content\n\t\t\t\t$Typo3_htmlmail->setHeaders();\n\t\t\t\t$Typo3_htmlmail->setContent();\n\t\t\t\t$Typo3_htmlmail->setRecipient($recipient);\n\t\t\t\t$Typo3_htmlmail->recipient_copy=$recepientsCopy;\n\t\t\t\t$Typo3_htmlmail->recipient_blindcopy=$recepientsBcc;\n\t\t//\t\tdebug($Typo3_htmlmail->theParts);\n\t\t\t\t$Typo3_htmlmail->sendtheMail();\n\t\t\t} else {\n\t\t\t\tdebug('SYSTEM ERROR: No HTML-mail library loaded. Set \"page.config.incT3Lib_htmlmail = 1\" is your TypoScript template.');\n\t\t\t}\n\t\t}\n\t}",
"function envoi_mail($dest, $titre, $cont) {\n //----------------------------------------------- \n //DECLARE LES VARIABLES \n //----------------------------------------------- \n $email_reply = '[email protected]';\n\n $message_html = '<html> \n <head> \n <title>'.$titre.'</title> \n </head> \n <body>\n <div style=\"padding: 7px; font-size: 1.1em\">\n '.$cont.'\n <br />\n <p>\n Passez une bonne journée sur <a href=\"http://BlogPHP.fr/\">'.Conf::$SITE['TITRE'].'</a>,\n <br />\n <em>L\\'équipe de développement.</em>\n </p>\n </div>\n </body> \n </html>'; \n\n //----------------------------------------------- \n //HEADERS DU MAIL \n //----------------------------------------------- \n\tini_set('SMTP','smtp.sfr.fr');\n\n $entetedate = date(\"D, j M Y H:i:s\"); // avec offset horaire\n $headers = 'From: \"'.Conf::$SITE['TITRE'].'\" <'.$email_reply.'>'.\"\\n\";\n $headers .= 'Return-Path: <'.$email_reply.'>'.\"\\n\"; \n $headers .= 'MIME-Version: 1.0'.\"\\n\"; \n $headers .= 'Content-Type: text/html; charset=\"utf-8\"'.\"\\n\"; \n $headers .= 'Content-Transfer-Encoding: 8bit'.\"\\n\"; \n $headers .= \"X-Mailer: PHP/\" . phpversion() . \"\\n\\n\" ;\n\n return mail($dest, $titre, $message_html, $headers);\n}",
"function __construct() {\n\t\t\t\tparent :: __construct();\n\t\t\t\t$this->adminemail = $this->get_admin_email();\n\t\t\t\t$this->adminmobile = $this->get_admin_mobile();\n\t\t\t\t$siteInfo = $this->get_siteTitleUrl();\n\t\t\t\t$this->sitetitle = $siteInfo['title'];\n\t\t\t\t$this->siteurl = addHttp($siteInfo['url']);\n\n\t\t\t\t$headFootShortcode = array(\"{siteTitle}\",\"{siteUrl}\");\n\t\t\t\t$headFootVals = array($this->sitetitle,$this->siteurl);\n\n\t\t\t\t$mailsettings = $this->get_mailserver();\n\t\t\t\t$this->mailHeader = str_replace($headFootShortcode, $headFootVals, $mailsettings[0]->mail_header);\n\t\t\t\t$this->mailFooter = str_replace($headFootShortcode, $headFootVals, $mailsettings[0]->mail_footer);\n\t\t\t\t\n\t\t\t\tif ($mailsettings[0]->mail_default == \"smtp\") {\n\t\t\t\t\t\n\t\t\t\t\tif($mailsettings[0]->mail_secure == \"no\"){\n\t\t\t\t\t\t$secure = \"\";\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$secure = $mailsettings[0]->mail_secure.\"://\";\n\t\t\t\t\t}\n\t\t\t\t\t\t$this->sendfrom = $mailsettings[0]->mail_fromemail;\n\t\t\t\t\t\t$config = Array('protocol' => 'smtp', 'charset' => 'utf-8',\n\t\t\t\t\t\t\t'smtp_host' => $secure.$mailsettings[0]->mail_hostname, \n\t\t\t\t\t\t\t'smtp_port' => $mailsettings[0]->mail_port, \n\t\t\t\t\t\t\t'smtp_user' => $mailsettings[0]->mail_username, 'smtp_pass' => $mailsettings[0]->mail_password, 'mailtype' => 'html', 'charset' => 'iso-8859-1', 'wordwrap' => TRUE,'smtp_auth' => TRUE);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$this->load->library('email', $config);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t\t$this->sendfrom = $mailsettings[0]->mail_fromemail;\n\t\t\t\t\t\t$this->load->library('email');\n\t\t\t\t\t\t$this->email->set_mailtype(\"html\");\n\t\t\t\t}\n\n\t\t}",
"protected function _email($type, $data)\n {\n $this->load->library('mail');\n $this->load->library('parser');\n\n $email = false;\n\n switch ($type) {\n case 'contact':\n // Build the message\n $message = $data['message'].\"\\r\\n\\r\\n\";\n $message.= \"Recipient Information: {$data['name']} ({$data['email']}), \";\n $message.= $this->input->ip_address();\n\n // Set the email data\n $emailData = array(\n 'email_subject' => $data['subject'],\n 'email_from' => ucfirst(lang('time_from')) .\": {$data['name']} - {$data['email']}\",\n 'email_content' => nl2br($message),\n );\n\n // where should the email be coming from\n $loc = Location::email('main_contact', $this->mail->mailtype);\n\n // parse the message\n $parsedMessage = $this->parser->parse_string($loc, $emailData, true);\n\n // get the game masters\n $gm = $this->user->get_gm_emails();\n\n // set the TO variable\n $to = implode(',', $gm);\n\n // set the parameters for sending the email\n $this->mail->from(Util::email_sender(), $data['name']);\n $this->mail->bcc($to);\n $this->mail->subject($this->options['email_subject'] .' '. $data['subject']);\n $this->mail->message($parsedMessage, $message);\n break;\n\n case 'news_comment':\n // Load the resources\n $this->load->model('news_model', 'news');\n\n // Get all the information from the database\n $row = $this->news->get_news_item($data['news_item']);\n $name = $this->char->get_character_name($data['author']);\n $from = $this->user->get_email_address('character', $data['author']);\n $to = $this->user->get_email_address('character', $row->news_author_character);\n\n // Build the content of the message\n $content = sprintf(\n lang('email_content_news_comment_added'),\n \"<strong>\". $row->news_title .\"</strong>\",\n $data['comment']\n );\n\n // compile the data for the message\n $emailData = array(\n 'email_subject' => lang('email_subject_news_comment_added'),\n 'email_from' => ucfirst(lang('time_from')) .': '. $name .' - '. $from,\n 'email_content' => nl2br($content)\n );\n\n // where should the email be coming from\n $loc = Location::email('main_news_comment', $this->mail->mailtype);\n\n // parse the message\n $message = $this->parser->parse_string($loc, $emailData, true);\n\n // set the parameters for sending the email\n $this->mail->from(Util::email_sender(), $name);\n $this->mail->bcc($to);\n $this->mail->subject($this->options['email_subject'].' '.$emailData['email_subject']);\n $this->mail->message($message, $content);\n break;\n\n case 'news_comment_pending':\n // load the resources\n $this->load->model('news_model', 'news');\n\n // get all the information from the database\n $row = $this->news->get_news_item($data['news_item']);\n $name = $this->char->get_character_name($data['author']);\n $from = $this->user->get_email_address('character', $data['author']);\n $to = implode(',', $this->user->get_emails_with_access('manage/comments'));\n\n // set the content of the message\n $content = sprintf(\n lang('email_content_comment_pending'),\n lang('global_newsitems'),\n \"<strong>\". $row->news_title .\"</strong>\",\n $data['comment'],\n site_url('login/index')\n );\n\n // compile the information together for the message\n $emailData = array(\n 'email_subject' => lang('email_subject_comment_pending'),\n 'email_from' => ucfirst(lang('time_from')) .': '. $name .' - '. $from,\n 'email_content' => nl2br($content)\n );\n\n // where should the email be coming from\n $loc = Location::email('comment_pending', $this->mail->mailtype);\n\n // parse the message\n $message = $this->parser->parse_string($loc, $emailData, true);\n\n // set the parameters for sending the email\n $this->mail->from(Util::email_sender(), $name);\n $this->mail->bcc($to);\n $this->mail->subject($this->options['email_subject'] .' '. $emailData['email_subject']);\n $this->mail->message($message, $content);\n break;\n\n case 'join_user':\n // build the content of the message\n $content = sprintf(\n lang('email_content_join_user'),\n $this->options['sim_name'],\n $data['email'],\n $data['password']\n );\n\n // compile the information for the email\n $emailData = array(\n 'email_subject' => lang('email_subject_join_user'),\n 'email_from' => ucfirst(lang('time_from')) .': '. $this->options['default_email_name'] .' - '. $this->options['default_email_address'],\n 'email_content' => nl2br($content)\n );\n\n // where should the email be coming from\n $loc = Location::email('main_join_user', $this->mail->mailtype);\n\n // parse the message\n $message = $this->parser->parse_string($loc, $emailData, true);\n\n // set the parameters for sending the email\n $this->mail->from(Util::email_sender(), $this->options['default_email_name']);\n $this->mail->bcc($data['email']);\n $this->mail->subject($this->options['email_subject'] .' '. $emailData['email_subject']);\n $this->mail->message($message, $content);\n break;\n\n case 'join_gm':\n // load the resources\n $this->load->model('positions_model', 'pos');\n\n $content = lang('email_content_join_gm');\n\n // compile the information for the email\n $emailData = array(\n 'email_subject' => lang('email_subject_join_gm'),\n 'email_from' => ucfirst(lang('time_from')) .': '. $data['name'] .' - '. $data['email'],\n 'email_content' => nl2br($content),\n 'basic_title' => ucwords(lang('labels_basic').' '.lang('labels_info')),\n );\n\n // build the user data array\n $p_data = $this->user->get_user($data['user']);\n $emailData['user'] = array(\n array(\n 'label' => ucfirst(lang('labels_name')),\n 'data' => $data['name']),\n array(\n 'label' => ucwords(lang('labels_email_address')),\n 'data' => $data['email']),\n array(\n 'label' => ucwords(lang('labels_ipaddr')),\n 'data' => $data['ipaddr']),\n array(\n 'label' => lang('labels_dob'),\n 'data' => $p_data->date_of_birth)\n );\n\n // build the character data array\n $c_data = $this->char->get_character($data['id']);\n $emailData['character'] = array(\n array(\n 'label' => ucwords(lang('global_character') .' '. lang('labels_name')),\n 'data' => $this->char->get_character_name($data['id'])),\n array(\n 'label' => ucfirst(lang('global_position')),\n 'data' => $this->pos->get_position($c_data->position_1, 'pos_name')),\n );\n\n // get the sections\n $sections = $this->char->get_bio_sections();\n\n if ($sections->num_rows() > 0) {\n foreach ($sections->result() as $sec) {\n $emailData['sections'][$sec->section_id]['title'] = $sec->section_name;\n\n $fields = $this->char->get_bio_fields($sec->section_id);\n\n if ($fields->num_rows() > 0) {\n foreach ($fields->result() as $field) {\n $bio_data = $this->char->get_field_data($field->field_id, $data['id']);\n\n if ($bio_data->num_rows() > 0) {\n foreach ($bio_data->result() as $item) {\n $emailData['sections'][$sec->section_id]['fields'][] = array(\n 'field' => $field->field_label_page,\n 'data' => text_output($item->data_value, '')\n );\n }\n }\n }\n }\n }\n }\n\n $emailData['sample_post_label'] = ucwords(lang('labels_sample_post'));\n $emailData['sample_post'] = ($this->mail->mailtype == 'html') ? nl2br($data['sample_post']) : $data['sample_post'];\n\n // where should the email be coming from\n $loc = Location::email('main_join_gm', $this->mail->mailtype);\n\n // parse the message\n $message = $this->parser->parse_string($loc, $emailData, true);\n\n // set the TO variable\n $to = implode(',', $this->user->get_emails_with_access('characters/index'));\n\n // set the parameters for sending the email\n $this->mail->from(Util::email_sender(), $data['name']);\n $this->mail->bcc($to);\n $this->mail->subject($this->options['email_subject'] .' '. $emailData['email_subject']);\n $this->mail->message($message, $content);\n break;\n }\n\n $email = $this->mail->send();\n\n return $email;\n }",
"function email( $to, $subject, $message ){\n\n\n /**\n * set up mail headers \n */\n $headers = 'From: Support - Furasta.Org <[email protected]>'.\"\\r\\n\".'Reply-To: [email protected]'.\"\\r\\n\";\n $headers .= 'X-Mailer: PHP/' .phpversion().\"\\r\\n\";\n $headers .= 'MIME-Version: 1.0'.\"\\r\\n\";\n $headers .= 'Content-Type: text/html; charset=ISO-8859-1'.\"\\r\\n\";\n\n require_once '_inc/function/defualts.php';\n\n\t/**\n\t * message template \n\t */\n $message = defaults_email_template( $message );\n\n\t/**\n\t * return success of mail function \n\t */\n return mail( $to, $subject, $message, $headers );\n\n}",
"function sendMail($emailFrom, $fromName, $emailTo, $nameTo, $subject, $body, $currentLanguage) {\n\n\t\trequire_once(\"library/phpmailer/PHPMailerAutoload.php\");\n\t\t$settings = new View(\"settings\", $currentLanguage, \"lang_id\");\n\n\t\t$body = nl2br($body);\n\t\t$body = str_replace(array(\"\\\n \", \"\\\\r\", \"\\\\n\", \"bcc:\"), \"<br/>\", $body);\n\n\t\tif (is_file(\"images/logo.png\")) {\n\t\t\t$logo = $settings->site_host . \"images/logo.png\";\n\t\t} elseif (is_file(\"images/logo.svg\")) {\n\t\t\t$logo = $settings->site_host . \"images/logo.svg\";\n\t\t} elseif (is_file(\"images/logo.jpg\")) {\n\t\t\t$logo = $settings->site_host . \"images/logo.jpg\";\n\t\t}\n\n\t\t$socials = \"\";\n\t\tif ($settings->site_facebook != \"\") {\n\t\t\t$socials .= '<a style=\"color: #000;font-family:Arial, sans-serif;font-size: 14px;line-height: 21px;text-transform: lowercase;\" href=\"' . $settings->site_facebook . '\" title=\"Facebook stranica ' . $settings->site_host . '\" target=\"_blank\"><img style=\"width: 30px;margin: 0 5px;\" src=\"' . $settings->site_host . 'images/socials/facebook.png\" alt=\"Facebook stranica ' . $settings->site_firm . '\"></a>';\n\t\t}\n\t\tif ($settings->site_twitter != \"\") {\n\t\t\t$socials .= '<a style=\"color:#000;font-family: Arial, sans-serif;font-size:14px;line-height:21px;text-transform:lowercase;\" href=\"' . $settings->site_twitter . '\" title=\"Twitter stranica ' . $settings->site_host . '\" target=\"_blank\"><img style=\"width: 30px;margin: 0 5px;\" src=\"' . $settings->site_host . 'images/socials/twitter.png\" alt=\"Twitter stranica ' . $settings->site_firm . '\"></a>';\n\t\t}\n\t\tif ($settings->site_google_plus != \"\") {\n\t\t\t$socials .= '<a style=\"color:#000;font-family: Arial, sans-serif;font-size:14px;line-height:21px;text-transform:lowercase;\" href=\"' . $settings->site_google_plus . '\" title=\"Google Plus stranica ' . $settings->site_host . '\" target=\"_blank\"><img style=\"width: 30px;margin: 0 5px;\" src=\"' . $settings->site_host . 'images/socials/google-plus.png\" alt=\"Google Plus stranica ' . $settings->site_firm . '\"></a>';\n\t\t}\n\t\tif ($settings->site_instagram != \"\") {\n\t\t\t$socials .= '<a style=\"color:#000;font-family: Arial, sans-serif;font-size:14px;line-height:21px;text-transform:lowercase;\" href=\"' . $settings->site_instagram . '\" title=\"Instagram stranica ' . $settings->site_host . '\" target=\"_blank\"><img style=\"width: 30px;margin: 0 5px;\" src=\"' . $settings->site_host . 'images/socials/instagram.png\" alt=\"Instagram stranica ' . $settings->site_firm . '\"></a>';\n\t\t}\n\t\tif ($settings->site_pinterest != \"\") {\n\t\t\t$socials .= '<a style=\"color:#000;font-family: Arial, sans-serif;font-size:14px;line-height:21px;text-transform:lowercase;\" href=\"' . $settings->site_pinterest . '\" title=\"Pinterest stranica ' . $settings->site_host . '\" target=\"_blank\"><img style=\"width: 30px;margin: 0 5px;\" src=\"' . $settings->site_host . 'images/socials/pinterest.png\" alt=\"Pinterest stranica ' . $settings->site_firm . '\"></a>';\n\t\t}\n\t\tif ($settings->site_youtube != \"\") {\n\t\t\t$socials .= '<a style=\"color:#000;font-family: Arial, sans-serif;font-size:14px;line-height:21px;text-transform:lowercase;\" href=\"' . $settings->site_youtube . '\" title=\"You Tube stranica ' . $settings->site_host . '\" target=\"_blank\"><img style=\"width: 30px;margin: 0 5px;\" src=\"' . $settings->site_host . 'images/socials/youtube.png\" alt=\"You Tube stranica ' . $settings->site_firm . '\"></a>';\n\t\t}\n\t\tif ($settings->site_vimeo != \"\") {\n\t\t\t$socials .= '<a style=\"color:#000;font-family: Arial, sans-serif;font-size:14px;line-height:21px;text-transform:lowercase;\" href=\"' . $settings->site_vimeo . '\" title=\"Vimeo stranica ' . $settings->site_host . '\" target=\"_blank\"><img style=\"width: 30px;margin: 0 5px;\" src=\"' . $settings->site_host . 'images/socials/vimeo.png\" alt=\"Vimeo stranica ' . $settings->site_firm . '\"></a>';\n\t\t}\n\n\t\t\n\t\t$footer = $settings->site_firm.\", \".$settings->site_address.\", \".$settings->site_zip.\" \".$settings->site_city.\"<br /><a style='color: #000;font-family:Arial, sans-serif;font-size: 14px;line-height: 21px;text-transform: lowercase;' href='tel:$settings->site_phone'>\".$settings->site_phone.\"</a>\";\n\t\tif($settings->site_phone_2){\n\t\t\t$footer .= \", <a style='color: #000;font-family:Arial, sans-serif;font-size: 14px;line-height: 21px;text-transform: lowercase;' href='tel:$settings->site_phone_2'>\".$settings->site_phone_2.\"</a>\";\n\t\t}\n\t\t$footer .= \"<br /><a style='color: #000;font-family:Arial, sans-serif;font-size: 14px;line-height: 21px;text-transform: lowercase;' href='mailto:$settings->site_email'>\".$settings->site_email.\"</a>\";\n\t\t\n\t\t$bodyMail = file_get_contents(\"includes/mail.html\");\n\t\t$bodyMail = str_replace(array(\"[CONTENT]\", \"[LOGO]\", \"[SITE_TITLE]\", \"[FOOTER]\", \"[DOMAIN]\", \"[SUBJECT]\", \"[SOCIALS]\"), array(\"<p>\".$body.\"</p>\", $logo, $settings->site_title, $footer, $settings->site_host, $subject, $socials), $bodyMail);\n\n\t\t\n\t\t$mail = new PHPMailer();\n\n\t\t$mail->IsSMTP();\n\t\t$mail->SMTPDebug = 0;\n\t\t$mail->CharSet = 'UTF-8';\n\t\t$mail->Host = $settings->site_outgoing_server;\n\t\t$mail->Port = $settings->site_smtp_port;\n\t\t$mail->SMTPAuth = true;\n\t\t$mail->Username = $settings->site_username;\n\t\t$mail->Password = $settings->site_password;\n\t\t$mail->Mailer = \"smtp\";\n\t\t$mail->SMTPSecure = 'ssl';\n\n\t\t$mail->From = $emailFrom;\n\t\t$mail->FromName = $fromName;\n\t\t$mail->AddAddress($emailTo, $nameTo);\n\t\t$mail->AddReplyTo($emailFrom, $fromName);\n\n\t\t$mail->isHTML(true);\n\t\t$mail->WordWrap = 50;\n\t\t$mail->Subject = $subject;\n\t\t$mail->Body = $bodyMail;\n\t\t$mail->AltBody = strip_tags($body);\n\n\t\tif (!$mail->Send()) {\n\t\t\techo 'Message was not sent. Mailer error: ' . $mail->ErrorInfo . '<br />';\n\t\t}\n\t}",
"function mailer() {\n\t\tJRequest::checkToken() or die( JText::_( 'Invalid Token' ) );\n\t\t$email = JRequest::getVar('email');\n\t\t$title = JRequest::getVar('title');\n\t\t$from = array($email, $title);\n\t\t// set emailadres from the site\n\t\t$config =&JFactory::getConfig();\n\t\t// Get some variables from the component options\n\t\t$app = JFactory::getApplication('site');\n\t\t$componentParams = $app->getParams('com_mdcontact');\n\t\t$email_to = $componentParams->get('email_to');\n\t\t$subject = $componentParams->get('subject');\n\t\t$to = array($email_to, $email_to );\n\t\t// Set some variables for the email message\n\t\t$copy = JRequest::getVar('copy');;\n\t\t$body = JRequest::getVar('description');;\n\t\n\t\t// Invoke JMail Class\n\t\t$mailer = JFactory::getMailer();\n\t\n\t\t// Set sender array so that my name will show up neatly in your inbox\n\t\t$mailer->setSender($from);\n\t\t$mailer->addRecipient($to);\n\t\t// Set cc if copy is checked\n\t\tif ($copy=='1'){\n\t\t\t$mailer->addCC($from);\n\t\t\t}\n\t\t$mailer->setSubject($subject);\n\t\t$mailer->setBody($body);\n\t\t$send = $mailer->Send();\n\t\t// set the redirect page\n\t\t$redirect = JRoute::_('index.php?option=com_mdcontact&view=contact&task=add');\n\t\tif ( $send !== true ) {\n\t\t\tJFactory::getApplication()->enqueueMessage('Your message is not send, please try again later', 'error');\n\t\t\t$this->setRedirect( $redirect);\n\t\t} else {\n\t\tparent::apply();\n\t}\n\t}",
"abstract protected function _getEmail($info);",
"protected abstract function _message();",
"private static function mail()\n {\n $files = ['Mail', 'Mailable', 'SMTP'];\n $folder = static::$root.'Mailing'.'/';\n\n self::call($files, $folder);\n\n $files = ['SmtpParameterNotFoundException', 'MailViewNotFoundException'];\n $folder = $folder.'Exceptions/';\n\n self::call($files, $folder);\n }",
"private function _build_mail () {\n if (empty($this->sendto) && (empty($this->body) && empty($this->htmlbody))) {\n throw new Exception(\"Cannot send, need more information\");\n }\n\n // build the headers\n $this->headers = \"\";\n\n $this->xheaders['To'] = implode(',', $this->sendto);\n\n $cc_header_name = ($this->apply_windows_bugfix) ? 'cc': 'Cc';\n if (!empty($this->sendcc)) $this->xheaders[$cc_header_name] = implode(',', $this->sendcc);\n if (!empty($this->sendbcc)) $this->xheaders['Bcc'] = implode(',', $this->sendbcc);\n\n if($this->receipt) {\n if(isset($this->xheaders['Reply-To'])) {\n $this->xheaders['Disposition-Notification-To'] = $this->xheaders['Reply-To'];\n }\n elseif (isset($this->xheaders['From'])) {\n $this->xheaders['Disposition-Notification-To'] = $this->xheaders['From'];\n }\n }\n\n if($this->charset != '') {\n $this->xheaders['Mime-Version'] = '1.0';\n $this->xheaders['Content-Type'] = 'text/plain; charset='.$this->charset;\n $this->xheaders['Content-Transfer-Encoding'] = $this->ctencoding;\n }\n\n if (!$this->xheaders['X-Mailer']) {\n $this->xheaders['X-Mailer'] = 'King-Fu MimeMail';\n }\n\n // setup the body ready for sending\n $this->_set_body();\n\n foreach ($this->xheaders as $head => $value) {\n $rgx = ($this->apply_windows_bugfix) ? 'Subject' : 'Subject|To'; // don't strip out To header for bugfix\n if (!preg_match('/^'.$rgx.'$/i', $head)) $this->headers .= $head.': '.strtr($value, \"\\r\\n\", ' ').\"\\n\";\n }\n }",
"private function sendEmails()\r\n {\r\n $user_body = \"Hi,<br>A new comment was added to the following article:\\n\";\r\n $user_body .= '<a href=\"http://'.$this->config->getModuleVar('common', 'site_url').'/id_article/'.$this->viewVar['article']['id_article'].'\">'.$this->viewVar['article']['title'].\"</a>\\n\";\r\n\r\n $_tmp_error = array();\r\n $user_text_body = strip_tags($user_body);\r\n\r\n $this->model->action( 'common', 'mailSendTo',\r\n array('charset' => $this->viewVar['charset'],\r\n 'bodyHtml' => & $user_body,\r\n 'bodyText' => & $user_text_body,\r\n 'to' => array(array('email' => '[email protected]',\r\n 'name' => 'Armand Turpel')),\r\n 'subject' => \"Open Publisher Blog Entry\",\r\n 'fromEmail' => '[email protected]',\r\n 'fromName' => '[email protected]',\r\n 'error' => & $_tmp_error\r\n ));\r\n\r\n }",
"function tep_mail($to_name, $to_email_address, $email_subject, $email_text, $from_email_name, $from_email_address) {\n\tif (SEND_EMAILS != 'true') return false;\n $headers[\"From\"] = $from_email_address;\n $headers[\"To\"] = $to_email_address;\n $headers[\"Subject\"] = $email_subject;\n $mail_object =& Mail::factory(\"sendmail\");\n\tif (EMAIL_USE_HTML == 'true') {\n $headers[\"Content-Type\"] = \"text/html; charset=utf-8\";\n $message = str_replace(array(\"\\r\\n\", \"\\n\", \"\\r\"), \"<br />\",$email_text);\n }else{\n $headers[\"Content-Type\"] = \"text/plain; charset=utf-8\";\n $message = str_replace(array(\"\\r\\n\", \"\\n\", \"\\r\"), \"\\r\\n\",strip_tags($email_text));\n }\n\ttep_bh_transac_mail($to_name, $to_email_address, $from_email_name, $from_email_address, $email_subject, $message);\n\t// Send message\n //$mail_object->send($to_email_address, $headers, $message);\n}",
"public function getMailMIME()\n {\n }",
"function sendMail_dis($to_email,$extraMsg)\n{\n //$to_email \t=\"[email protected]\";\n $from \t=\"[email protected]\";\n\t$subject\t=\"List of cancelled transaction in last 1 week\";\n $msgTxt\t\t=\"Hi, <br><br>\n\t \tPlease find the list of usernames whose transaction has been cancelled in last 1 week (From: $last_7day - $dateEnd).<br><br>\";\n\n $msgTxt \t.=$extraMsg.\"<br><br>\";\n $msgTxt \t.=\"Thanks,<br>Team Jeevansathi<br>\";\n send_email($to_email,$msgTxt,$subject,$from);\n}",
"Function smtp_mail($to,$subject,$message,$additional_headers=\"\",$additional_parameters=\"\")\n{\n\tglobal $message_object;\n\n\treturn($message_object->Mail($to,$subject,$message,$additional_headers,$additional_parameters));\n}",
"function sendTheMail() {\n//\t\t$conf = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['direct_mail'];\n\t\t\t\t\n\t\t\t// format headers for SMTP use\n\t\tif ($this->useSmtp) {\n\t\t\t$headers = array();\n\t\t\t$headerlines = explode(\"\\n\",trim($this->headers));\n\t\t\t$headers['To'] = $this->recipient;\n\t\t\t$headers['Subject'] = $this->subject;\n\t\t\tforeach($headerlines as $k => $hd) {\n\t\t\t\tif (substr($hd,0,9)==\" boundary\") {\n\t\t\t\t\t$headers['Content-Type'] .= \"\\n \" . $hd;\n\t\t\t\t} else {\n\t\t\t\t\t$current = explode(':',$hd);\n\t\t\t\t\t$headers[$current[0]] = $current[1];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// create a new mail object if not existing\n\t\t\tif (!is_a($this->mailObject, 'Mail_smtp') || $this->confSMTP['persist'] == 1) {\n\t\t\t\t$this->mailObject = NULL;\n\t\t\t\t$this->mailObject =& Mail::factory('smtp', $this->confSMTP);\n\t\t\t}\n\t\t}\n\n\t\t// Sends the mail, requires the recipient, message and headers to be set.\n\t\tif (trim($this->recipient) && trim($this->message))\t{\t// && trim($this->headers)\n\t\t\t$returnPath = (strlen($this->returnPath)>0)?\"-f\".$this->returnPath:'';\n\t\t\t\t//On windows the -f flag is not used (specific for Sendmail and Postfix), but instead the php.ini parameter sendmail_from is used.\n\t\t\tif($this->returnPath) {\n\t\t\t\tini_set(sendmail_from, $this->returnPath);\n\t\t\t}\n\t\t\t\t// Setting defer mode\n\t\t\t$deferMode = $this->useDeferMode ? (($returnPath ? ' ': '') . '-O DeliveryMode=defer') : '';\n\t\t\t/**\n\t\t\t * TODO: will be obsolete, once swiftmailer is used\n\t\t\t */\n\t\t\t$message = preg_replace('/^\\.$/m', '. ', $this->message);\n\t\t\t\n\t\t\tif ($this->useSmtp)\t{\n\t\t\t\t$this->mailObject->send($this->recipient, $headers, $message);\n\t\t\t} \n\t\t\telseif(!ini_get('safe_mode') && $this->forceReturnPath) {\n\t\t\t\t//If safe mode is on, the fifth parameter to mail is not allowed, so the fix wont work on unix with safe_mode=On\n\t\t\t\tmail($this->recipient,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $message,\n\t\t\t\t\t $this->headers,\n\t\t\t\t\t $returnPath.$deferMode);\n\t\t\t} else {\n\t\t\t\tmail($this->recipient,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $message,\n\t\t\t\t\t $this->headers);\n\t\t\t}\n\t\t\t\t// Sending copy:\n\t\t\tif ($this->recipient_copy)\t{\n\t\t\t\tif ($this->useSmtp)\t{\n\t\t\t\t\t$this->mailObject->send($this->recipient, $headers, $message);\n\t\t\t\t} elseif (!ini_get('safe_mode') && $this->forceReturnPath) {\n\t\t\t\t\tmail($this->recipient_copy,\n\t\t\t\t\t\t\t\t$this->subject,\n\t\t\t\t\t\t\t\t$message,\n\t\t\t\t\t\t\t\t$this->headers,\n\t\t\t\t\t\t\t\t$returnPath.$deferMode);\n\t\t\t\t} else {\n\t\t\t\t\tmail($this->recipient_copy,\n\t\t\t\t\t\t\t\t$this->subject,\n\t\t\t\t\t\t\t\t$message,\n\t\t\t\t\t\t\t\t$this->headers\t);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\t// Auto response\n\t\t\tif ($this->auto_respond_msg)\t{\n\t\t\t\t$theParts = explode('/',$this->auto_respond_msg,2);\n\t\t\t\t$theParts[1] = str_replace(\"/\",chr(10),$theParts[1]);\n\t\t\t\tif ($this->useSmtp)\t{\n\t $headers['Subject'] = $theParts[0];\n\t $headers['From'] = $this->recipient;\n\t $res = $this->mailObject->send($this->from_email, $headers, $theParts[1]);\n\t\t\t\t} elseif (!ini_get('safe_mode') && $this->forceReturnPath) {\n\t\t\t\t\tmail($this->from_email,\n\t\t\t\t\t\t\t\t$theParts[0],\n\t\t\t\t\t\t\t\t$theParts[1],\n\t\t\t\t\t\t\t\t\"From: \".$this->recipient,\n\t\t\t\t\t\t\t\t$returnPath.$deferMode);\n\t\t\t\t} else {\n\t\t\t\t\tmail($this->from_email,\n\t\t\t\t\t\t\t\t$theParts[0],\n\t\t\t\t\t\t\t\t$theParts[1],\n\t\t\t\t\t\t\t\t\"From: \".$this->recipient);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($this->returnPath) {\n\t\t\t\tini_restore(sendmail_from);\n\t\t\t}\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"function Mailer($name = \"\", $from, $to, $cc = \"\", $bcc = \"\", $subject = \"\") {\n\t\t$this->valid_mail_adresses = true;\n\t\tif(!$this->check_mail_address($to)) {\n\t\t\t$this->msg[] = \"Error, the \\\"mailto\\\" address is empty or not valid.\";\n\t\t\t$this->valid_mail_adresses = false;\n\t\t\t} \n\t\tif(!$this->check_mail_address($from)) {\n\t\t\t$this->msg[] = \"Error, the \\\"from\\\" address is empty or not valid.\";\n\t\t\t$this->valid_mail_adresses = false;\n\t\t\t} \n\t\tif($cc != \"\") {\n\t\t\tif (!$this->check_mail_address($cc)) {\n\t\t\t\t$this->msg[] = \"Error, the \\\"Cc\\\" address is not valid.\";\n\t\t\t\t$this->valid_mail_adresses = false;\n\t\t\t\t} \n\t\t\t}\n\t\tif($bcc != \"\") {\n\t\t\tif (!$this->check_mail_address($bcc)) {\n\t\t\t\t$this->msg[] = \"Error, the \\\"Bcc\\\" address is not valid.\";\n\t\t\t\t$this->valid_mail_adresses = false;\n\t\t\t\t} \n\t\t\t}\n\t\tif ($this->valid_mail_adresses) {\n\t\t\t$this->from_name = $this->strip_line_breaks($name);\n\t\t\t$this->from_mail = $this->strip_line_breaks($from);\n\t\t\t$this->mail_to = $this->strip_line_breaks($to);\n\t\t\t$this->mail_cc = $this->strip_line_breaks($cc);\n\t\t\t$this->mail_bcc = $this->strip_line_breaks($bcc);\n\t\t\t$this->mail_subject = $this->strip_line_breaks($subject);\n\t\t}else{\n\t\t\treturn;\n\t\t\t}\t\t\n\t\t}",
"function Email_Message( $body, $type='text/plain') {\n\t\t\n\t\t$this->message_body = $body;\n\t\t$this->message_type = $type;\n\t\n\t}",
"function sendMail($code, $replace)\n{\n\t$q_1 = mysql_query(\"SELECT default_email FROM system_configuration WHERE id='1'\");\n\t$row_1 = mysql_fetch_array($q_1);\n\n\t//Fetching Email Template According to User Selected Language \n\t$q_2=\"select subject, message from notifications where code='$code' and language='$replace[lang]'\"; \n\t$sql_2=mysql_query($q_2); \n\t$tot_rws=mysql_num_rows($sql_2);\n\n\tif($tot_rws==0)\n\t{\n\t\t$q_3=\"SELECT nt.subject, nt.message FROM notifications nt INNER JOIN languages lang ON lang.code=nt.language WHERE lang.default_lang='1' LIMIT 1\"; \n\t\t$sql_2 = mysql_query($q_3);\n\t}\n\t\n\t$row=mysql_fetch_array($sql_2);\n\t$to = $replace['email'];\n\t$subject = $row['subject'];\n\t$msg = $row['message'];\n\tforeach($replace as $k=>$v)\n\t{\n\t\t$subject = str_replace(\"$\".$k, $v, $subject);\n\t\t$msg = str_replace('$'.$k, $v, $msg);\n\t}\n\t$message = $msg;\n\t$headers = 'From: Cloudways <'.$row_1['default_email'].'>' . \"\\r\\n\" .\n\t\t'Reply-To: '.$row_1['default_email'].'' . \"\\r\\n\" .\n\t\t'MIME-Version: 1.0' . \"\\r\\n\" .\n\t\t'Content-type: text/html; charset=utf-8' . \"\\r\\n\" .\n\t\t'X-Mailer: PHP/' . phpversion();\n\t\t\n\t//adding email log\n\t$q\t= \"INSERT INTO email_log SET email='$to', sent_on=NOW(), subject='$subject', content='\".mysql_escape_string($message).\"'\";\n\t$sql\t= @mysql_query($q);\t\n\n\t//sending email\n\tmail($to, $subject, $message, $headers, '-f '.$row_1['default_email'].'');\n\t//echo $to.'<br />'.$subject.'<br />'.$message.'<br />'.$headers.'<br />'.'-f '.$row_1['default_email'].'<br /><br />';\n}",
"function _before_filter(){\n\t\t$this->content_type = \"text/plain\";\n\t\t$this->content_charset = DEFAULT_CHARSET; // \"UTF-8\"\n\t\t$this->from = DEFAULT_EMAIL;\n\t}",
"function mail_utf82($to, $from_user, $from_email, $subject = '(No subject)', $message = ''){\n $from_user = \"=?UTF-8?B?\".base64_encode($from_user).\"?=\"; // $from_user = \"=?utf-8?Q?\".($from_user).\"=\";\n //$from_user = \"=?UTF-8?Q?\".($from_user).\"?=\";\n //$from_user = \"=?utf-8?Q?=D0=A4=D0=BE=D0=BD=D0=B4?=\";\n\n\n $subject = \"=?UTF-8?B?\".base64_encode($subject).\"?=\"; //Content-type: text/html;\n $mime = \"\\r\\nMIME-Version: 1.0\" . \"Content-type: multipart/alternative; charset=UTF-8\";\n $mime = \"\\r\\nMIME-Version: 1.0\" . \"Content-type: text/html; charset=UTF-8 \\r\\nContent-Transfer-Encoding: 7bit\";\n\n $headers = \"From: $from_user <$from_email> $mime\"; $headers = \"From: <$from_email>\"; // . \"\\r\\n\"\n\n return mail($to, $subject, $message, $headers);\n }",
"function send_mails() {\n\t //$myactivebatch = $this->load_saved_batch();//load direct from file\n\t $myactivebatch = GetParam('batchrestore');//load in html form field and save as param\n\t //echo '>',$myactivebatch;\n\t \n\t $batch = GetReq('batchid');\n\t $bid = GetParam('bid')?GetParam('bid'):0; \n\t \t \n\t $include_subs = GetParam('includesubs');\n\t $include_all = GetParam('includeall');\t \n\t $subscribers = $include_subs?$include_subs:$include_all;//one or another\n\t\n\t $from = GetParam('from');\n\t $to = GetParam('to');\t \n\t $subject = GetParam('subject');\n\t \n\t if ($this->template) {\n\t if ($this->dirdepth) {\n\t\t for($i=0;$i<$this->dirdepth;$i++)\n\t\t\t $backdir .= \"../\";\n\t\t }\n\t\t else\n\t\t $backdir = \"../\";\n\t\t //repalce viewable data to send data (absolute dir)\t \n\t\t //echo $backdir;\n\t\t if ($this->mailbody)//get session text with headers\n\t\t $body = $this->mailbody;\n\t\t else //get text area\n\t $body = str_replace($backdir,$this->url.$this->infolder.'/',GetParam('mail_text')); \t \n\t }\t \n\t else\t{ //text area or session text with headers\n\t \n\t if (GetReq('editmode')) {\n\t\t $mytext = $this->mailbody?$this->mailbody:GetParam('mail_text');\n\t\t $body = $this->unload_spath($mytext);\n\t\t }\n\t\t else\n\t $body = $this->mailbody?$this->mailbody:GetParam('mail_text'); \n\t }\t \t \n\t \t \n\t\t \n\t if ($subscribers) {// || ($batch)) {//if sybs checked or batch in process..\n\t \n\t //save the current mail campaign state\n\t $this->save_current_batch($batch);\t\n\t \t \t \n\t //$subs = $this->subs_mail;\n\t\t \n\t\t //workinh batch tosend\n\t\t $subs = $this->getmails($include_all,$this->batch,$bid);\n\t\t \n\t if (($batch>=0) && ($batch>=$myactivebatch)) {\n\n\t //if ($res = GetGlobal('controller')->calldpc_method('rcshmail.sendit use '.$from.'+'.$to.'+'.$subject.'+'.$body.'+'.$subs)) {\n if ($res = $this->sendit($from,$to,$subject,$body,$subs,$this->ishtml)) {\n\t $this->mailmsg = $res . \" mail(s) send!\";\n\t }\t \n\t else \n\t $this->mailmsg = \"Send failed\";\n\t\t }\n\t\t else \t\n\t\t $this->mailmsg = \"Send bypassed\"; \n\t }\t \n\t else {//one receipent\n\t //if ($res = GetGlobal('controller')->calldpc_method('rcshmail.sendit use '.$from.'+'.$to.'+'.$subject.'+'.$body))\n\t\t if ($res = $this->sendit($from,$to,$subject,$body,null,$this->ishtml)) \n\t\t $this->mailmsg = $res . \" mail(s) send!\";\n\t\t else\n\t\t $this->mailmsg = \"Send failed\";\t\n\t }\t \n\t\t \n\t //auto refresh\n\t $refresh = GetParam('refresh')?GetParam('refresh'):$this->auto_refresh;\n\t if (($refresh>0) && ($res==$this->batch)) {\n $this->refresh_bulk_js(seturl('t=cpsubsend&batchid='.($bid+1).'&batch='.$this->batch.'&refresh='.$refresh),$refresh);\t\t\t \n\t $this->mailmsg .= \"Wait for next batch \" . $this->timeout;\t\t \n\t }\t \n\t \n\t //test\n\t //return $this->batch;\n //return (400);\t \t //??????????????????????????????????????????????????\n\t //echo '---------------------',$res,'---------------------------<br>';\n\t \n\t if ($res<$this->batch) //means end of campaign\n\t $this->reset_batch_state();\n\t \n\t return ($res);//how many mails tried to send (batch...)\t \n\t}",
"protected function setLocaleForMailer(): void\n {\n if (function_exists('switch_to_locale') && ($locale = $this->params->locale)) {\n \\switch_to_locale($locale);\n }\n }",
"abstract function getSubject() : string;",
"public function sendnotificationemails($type,$to,$subject,$username,$linkhref){\r\n\r\n $bodyhead=\"<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>\r\n <html xmlns='http://www.w3.org/1999/xhtml'>\r\n <head>\r\n <meta http-equiv='Content-Type' content='text/html; charset=utf-8' />\r\n <title>\".$this->getsettings('sitetitle','text').\"</title>\r\n </head><body>\";\r\n if( $this->getsettings('email','logoshow') == '1' ) {\r\n $body = \"<img src='\".$this->getsettings('logo','url').\"' alt='\".$this->getsettings('sitetitle','text').\"' title='\".$this->getsettings('sitetitle','text').\"'/>\";\r\n }\r\n else {\r\n $body = '';\r\n }\r\n\r\n $link = \"<a href='\".$linkhref.\"'>\".$this->getsettings($type,'linktext').\"</a>\";\r\n $emContent = $this->getsettings($type,'text');\r\n $emContent = str_replace(\"[username]\",$username,$emContent);\r\n $emContent = str_replace(\"[break]\",\"<br/>\",$emContent);\r\n $emContent = str_replace(\"[linktext]\",$link,$emContent);\r\n\r\n $body .=\"<p>\".$emContent.\"</p>\";\r\n\r\n $from = $this->getsettings('email','fromname');\r\n $from_add = $this->getsettings('email','fromemail');\r\n $headers = \"MIME-Version: 1.0\" . \"\\r\\n\";\r\n $headers .= \"Content-type:text/html;charset=iso-8859-1\" . \"\\r\\n\";\r\n $headers .= \"From: =?UTF-8?B?\". base64_encode($from) .\"?= <$from_add>\\r\\n\" .\r\n 'Reply-To: '.$from_add . \"\\r\\n\" .\r\n 'X-Mailer: PHP/' . phpversion();\r\n mail($to,$subject,$bodyhead.$body.'</body></html>',$headers, '-f'.$from_add);\r\n\r\n if( $type == 'forgotpwdemail' ) {\r\n return '7#email';\r\n }\r\n else {\r\n return '7#register';\r\n }\r\n\r\n die();\r\n\t}",
"function templ_send_email($fromEmail,$fromEmailName,$toEmail,$toEmailName,$subject,$message,$extra='')\r\n{\r\n\t\r\n\t$fromEmail = apply_filters('templ_send_from_emailid', $fromEmail);\r\n\t$fromEmailName = apply_filters('templ_send_from_emailname', $fromEmailName);\r\n\t$toEmail = apply_filters('templ_send_to_emailid', $toEmail);\r\n\t$toEmailName = apply_filters('templ_send_to_emailname', $toEmailName);\r\n\t$headers = 'MIME-Version: 1.0' . \"\\r\\n\";\r\n\t$headers .= 'Content-type: text/html; charset=UTF-8' . \"\\r\\n\";\r\n\t\r\n\t/* Additional headers*/\r\n\t/*$headers .= 'To: '.$toEmailName.' <'.$toEmail.'>' . \"\\r\\n\";*/\r\n\t\r\n\tif( $fromEmail!=\"\" ) {\r\n\t\t$headers .= 'From: '.$fromEmailName.' <'.$fromEmail.'>' . \"\\r\\n\";\r\n\t} else {\r\n\t\t$headers .= 'From: '.get_option('admin_email').\"\\r\\n\";\r\n\t}\r\n\t\r\n\t$subject = apply_filters('templ_send_email_subject', $subject);\r\n\t$message = apply_filters('templ_send_email_content', $message);\r\n\t$headers = apply_filters('templ_send_email_headers', $headers);\r\n\t\r\n\t$subject = '=?UTF-8?B?'.base64_encode($subject).'?=';\r\n\r\n\t/* Mail it*/\r\n\tif(templ_fetch_mail_type())\r\n\t{\r\n\t\t@mail($toEmail, $subject, $message, $headers);\t\r\n\t}else\r\n\t{\r\n\t\twp_mail($toEmail, $subject, $message, $headers);\t\r\n\t}\r\n\t\r\n}",
"function envoyer_message_mail($values)\n{\n\t$mot = $GLOBALS['mot'];\n\t$phrase = $GLOBALS['phrase'];\n\t$val = FALSE;\n\t\n\tif (verif_email($values['Email']) == TRUE)\n\t{\n\t\t$contenu = array(\t$mot['Message'] => $values['Message'],\n\t\t\t\t\t\t\t\t\t\t\t$mot['Entreprise'] => $values['Entreprise'],\n\t\t\t\t\t\t\t\t\t\t\t$mot['Nom'] => $values['Nom'],\n\t\t\t\t\t\t\t\t\t\t\t$mot['Email'] => $values['Email'] );\n\t\t\t\t\t\t\t\n\t\t$contenu_message = corps_email($contenu);\n\t\t// Si le message a bien été envoyé, on affiche un message de validation\n\t\t// et on enregistre le message dans la base de données\n\t\t\n\t\tif (envoi_email($values['Email'], NOM_SITE, EMAIL, $values['Email'], $phrase['UnNouveauMessage'], $contenu_message) == TRUE)\n\t\t{\n\t\t\tif (ajouter_message_db($values) == TRUE)\n\t\t\t{\n\t\t\t\t$val = TRUE;\n\t\t\t}\n\t\t}\n\t}\n\treturn $val;\n}",
"public function __construct()\n {\n parent::__construct('simple_mail');\n\n $contactRepository = tx_caretaker_ContactRepository::getInstance();\n\n $this->mail_from = $this->getConfigValue('mail_from');\n $this->mail_subject = $this->getConfigValue('mail_subject');\n $this->mail_link = $this->getConfigValue('mail_link');\n $this->mail_link = $this->getConfigValue('mail_link');\n $this->mail_roles = array();\n $role_ids = explode(',', $this->getConfigValue('role_ids'));\n foreach ($role_ids as $role_id) {\n $role = $contactRepository->getContactRoleById(trim($role_id));\n if (!$role && is_numeric($role_id)) {\n $role = $contactRepository->getContactRoleByUid(intval($role_id));\n }\n if ($role) {\n $this->mail_roles[] = $role;\n }\n }\n }",
"private function mailerNative()\n { \n if( ! mail($this->rcptToCtring, $this->subject, $this->message, $this->header()) ){\n $this->debugMessages[] = 'Error: Sending email failed';\n return false;\n }\n else {\n $this->debugMessages[] = 'Success: Sending email succeeded';\n return true;\n }\n }",
"function SendEmail($to, $subject, $body, $from=\"\", $cc=\"\", $bcc=\"\", $type=\"text/plain\") {\n global $dbAccess, $smarty;\n\n if ($from) {\n $fromMailcheck = $this->SpamCheck($from);\n if ($fromMailcheck == false) {\n $errorMsg[] = \"Invalid From email address.\";\n $smarty->assign(\"errorMsg\", $errorMsg);\n return false;\n }\n }\n\n if ($to) {\n $toMailcheck = $this->SpamCheck($to);\n if ($toMailcheck == false) {\n $errorMsg[] = \"Invalid To email address.\";\n $smarty->assign(\"errorMsg\", $errorMsg);\n return false;\n }\n }\n\n $user = $dbAccess->UserLoad(\"UserType = 'admin'\");\n\n $defaultFrom = $user['UserEmail'];\n\n // Bundle up the variables into a structured array for altering.\n $message = array(\n 'to' => $to,\n 'from' => (isset($from) && $from != '') ? $from : $defaultFrom,\n 'subject' => '',\n 'body' => array()\n );\n\n\n // Build the default headers\n $headers = array(\n 'MIME-Version' => '1.0',\n 'Content-Type' => $type . '; charset=UTF-8; format=flowed; delsp=yes',\n 'Content-Transfer-Encoding' => '8Bit',\n 'X-Mailer' => PROJECT_NAME\n );\n\n if ($defaultFrom) {\n // To prevent e-mail from looking like spam, the addresses in the Sender and\n // Return-Path headers should have a domain authorized to use the originating\n // SMTP server. Errors-To is redundant, but shouldn't hurt.\n $headers['From'] = $headers['Reply-To'] = $headers['Sender'] = $headers['Return-Path'] = $headers['Errors-To'] = $defaultFrom;\n }\n if ($from) {\n $headers['From'] = $headers['Reply-To'] = $from;\n }\n $message['headers'] = $headers;\n\n $message['body'] = $body;\n $message['subject'] = $subject;\n\n // Optionally send e-mail.\n $message['result'] = $this->EMail($message);\n\n // Log errors\n if (!$message['result']) {\n $errorMsg[] = \"Unable to send e-mail. Please contact the site admin, if the problem persists.\";\n $smarty->assign(\"errorMsg\", $errorMsg);\n }\n\n return $message['result'];\n }",
"function mail()\n {\n\n\n }",
"function html_mail( $to, $subject, $message, $from_email, $from_name ){\n if( is_array( $to ) ){\n \n // Implode the array and create a string with it\n $to = implode( ',', $to );\n \n }\n \n // Add some inline styles to the email (won't overwrite if the user adds their own)\n $message = str_replace( '<p>', '<p style=\"color:#000;>\"', $message );\n \n // In case any of our lines are larger than 70 characters, we should use wordwrap()\n $message = wordwrap( $message, 70, \"\\r\\n\");\n \n // To send HTML mail, the Content-type header must be set\n $headers[] = 'MIME-Version: 1.0';\n $headers[] = 'Content-type: text/html; charset=utf-8';\n \n // Set the from and reply-to addresses\n\tif( is_string( $from_email ) && is_string( $from_name ) ){\n\t\t$headers[] = 'From: ' . $from_name . '<' . $from_email . '>';\n\t\t$headers[] = 'Reply-To: ' . $from_name . '<' . $from_email . '>';\n\t}\n \n // Send the email\n return mail( $to, $subject, $message, implode(\"\\r\\n\", $headers ) );\n \n \n}",
"function supermailer ($h) {\r\n $mail_addheaders = array();\r\n $mail_addheaders[] = 'From: '.$h['from'];\r\n $h['replyto'] == ''? $h['from']:$h['replyto']; # avoid anti-spam\r\n $mail_addheaders[] = 'Reply-To: '.$h['replyto'];\r\n if ($h['bcc'])\r\n $mail_addheaders[] = 'Bcc: '.$h['bcc'];\r\n $mail_addheaders[] = 'X-Mailer: '.(($GLOBALS['mail_xmailer'] == '')? 'supermailer/dsw/sh/2004': $GLOBALS['mail_xmailer']);\r\n $mail_addheaders_str = join(\"\\r\\n\",$mail_addheaders);\r\n #~ echo $mail_addheaders_str;exit;\r\n\r\n $mail_body = $h['body'];\r\n $mail_to = $h['to'];\r\n $mail_subject = $h['subject'];\r\n\r\n # Some MTA confuse \\r\\n and translate it to \\n\\n, causing double lines. This will makes them happy:\r\n $mail_addheaders_str = str_replace(\"\\r\\n\", \"\\n\", $mail_addheaders_str);\r\n $mail_body = str_replace(\"\\r\\n\", \"\\n\", $mail_body);\r\n\r\n return mail($mail_to, $mail_subject, $mail_body, $mail_addheaders_str);\r\n\r\n}",
"abstract public function get_message();",
"public static function sendEmail($user,$RDV) : bool {\n\n $user = parent::findBy($user->getEmail(), 'email');\n\n $to = $user->getEmail();\n $from = \"<[email protected]>\";\n $subject = 'CHUO NEWSLETTER : Reclamation';\n $message = '\n <html>\n <head>\n <style>\n .banner-color {\n background-color: #eb681f;\n }\n .title-color {\n color: #0066cc;\n }\n .button-color {\n background-color: #0066cc;\n }\n @media screen and (min-width: 500px) {\n .banner-color {\n background-color: #0066cc;\n }\n .title-color {\n color: #eb681f;\n }\n .button-color {\n background-color: #eb681f;\n }\n }\n </style>\n </head>\n <body>\n <div style=\"background-color:#ececec;padding:0;margin:0 auto;font-weight:200;width:100%!important\">\n <table align=\"center\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"table-layout:fixed;font-weight:200;font-family:Helvetica,Arial,sans-serif\" width=\"100%\">\n <tbody>\n <tr>\n <td align=\"center\">\n <center style=\"width:100%\">\n <table bgcolor=\"#FFFFFF\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"margin:0 auto;max-width:512px;font-weight:200;width:inherit;font-family:Helvetica,Arial,sans-serif\" width=\"512\">\n <tbody>\n <tr>\n <td bgcolor=\"#F3F3F3\" width=\"100%\" style=\"background-color:#f3f3f3;padding:12px;border-bottom:1px solid #ececec\">\n <table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"font-weight:200;width:100%!important;font-family:Helvetica,Arial,sans-serif;min-width:100%!important\" width=\"100%\">\n <tbody>\n <tr>\n <td valign=\"middle\" width=\"50%\" align=\"right\" style=\"padding:0 0 0 10px\"><span style=\"margin:0;color:#4c4c4c;white-space:normal;display:inline-block;text-decoration:none;font-size:12px;line-height:20px\">'.date(\"Y-m-d\").'</span></td>\n <td width=\"1\"> </td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n <tr>\n <td align=\"left\">\n <table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"font-weight:200;font-family:Helvetica,Arial,sans-serif\" width=\"100%\">\n <tbody>\n <tr>\n <td width=\"100%\">\n <table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"font-weight:200;font-family:Helvetica,Arial,sans-serif\" width=\"100%\">\n <tbody>\n <tr>\n <td align=\"center\" bgcolor=\"#8BC34A\" style=\"padding:20px 48px;color:#ffffff\" class=\"banner-color\">\n <table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"font-weight:200;font-family:Helvetica,Arial,sans-serif\" width=\"100%\">\n <tbody>\n <tr>\n <td align=\"center\" width=\"100%\">\n <img src=\"../img/logo-accueil.png\" alt=\"Centre Hospitalier Universitaire Mohammed VI OUJDA\">\n </td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n <tr>\n <td align=\"center\" style=\"padding:20px 0 10px 0\">\n <table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"font-weight:200;font-family:Helvetica,Arial,sans-serif\" width=\"100%\">\n <tbody>\n <tr>\n <td align=\"center\" width=\"100%\" style=\"padding: 0 15px;text-align: justify;color: rgb(76, 76, 76);font-size: 12px;line-height: 18px;\">\n <h3 style=\"font-weight: 600; padding: 0px; margin: 0px; font-size: 16px; line-height: 24px; text-align: center;\" class=\"title-color\">Bonjour '.$user->getNom().',</h3>\n <p style=\"margin: 20px 0 30px 0;font-size: 15px;text-align: center;\">L\\'Etat du votre Rendez-vous que vous avez reservé pour '.$RDV->getDateRdv().' a été changer!</p>\n <div style=\"font-weight: 200; text-align: center; margin: 25px;\"><a style=\"padding:0.6em 1em;border-radius:600px;color:#ffffff;font-size:14px;text-decoration:none;font-weight:bold\" class=\"button-color\">Consulter votre compte pour plus de détails</a></div>\n </td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n <tr>\n </tr>\n <tr>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n <tr>\n <td align=\"left\">\n <table bgcolor=\"#FFFFFF\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"padding:0 24px;color:#999999;font-weight:200;font-family:Helvetica,Arial,sans-serif\" width=\"100%\">\n <tbody>\n <tr>\n <td align=\"center\" width=\"100%\">\n <table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"font-weight:200;font-family:Helvetica,Arial,sans-serif\" width=\"100%\">\n <tbody>\n <tr>\n <td align=\"center\" valign=\"middle\" width=\"100%\" style=\"border-top:1px solid #d9d9d9;padding:12px 0px 20px 0px;text-align:center;color:#4c4c4c;font-weight:200;font-size:12px;line-height:18px\">Regards,\n <br><b>The CHUO Team</b>\n </td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n <tr>\n <td align=\"center\" width=\"100%\">\n <table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"font-weight:200;font-family:Helvetica,Arial,sans-serif\" width=\"100%\">\n <tbody>\n <tr>\n <td align=\"center\" style=\"padding:0 0 8px 0\" width=\"100%\"></td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n </tbody>\n </table>\n </center>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n </body>\n </html>';\n\n //from w3schools\n $headers = 'From: ' . $from . \"\\r\\n\".\n \"MIME-Version: 1.0\" . \"\\r\\n\" .\n \"Content-type: text/html; charset=UTF-8\" . \"\\r\\n\";\n\n if(mail($to, $subject, $message, $headers))\n //Email Sended\n return true;\n else\n return false;\n\n }",
"function send_email($recipient, $sender = \"[email protected]\", $subject, $text = null, $html = null)\n{\n\n\tinclude('Mail.php');\n\tinclude('Mail/mime.php');\n\n\t$crlf = \"\\r\\n\";\n\t$hdrs = array(\n\t\t'From' => $sender,\n\t\t'Subject' => $subject,\n\t);\n\t$mime = new Mail_mime($crlf);\n\t$mime->setTXTBody($text);\n\tif ($html) {\n\t\t$mime->setHTMLBody($html);\n\t}\n\t$body = $mime->get();\n\t$hdrs = $mime->headers($hdrs);\n\t$mail =& Mail::factory('mail');\n\t//$mail->send($recipient, $hdrs, $body);\n\t$mail->send($recipient, $hdrs, $body);\n\n}",
"function errorMailExiste(){\n\t\t$content='\n\t\t\t<div><h3>'.htmlspecialchars($this->pi_getLL(\"txt_error_mail\")).'<br/></h3><hr/></div>';\n\t\t$content .=$this->getFormulaireVide();\n\t\treturn $content;\n\t}",
"function Email($from=\"\", $to=\"\", $cc=\"\", $bcc=\"\", $subject=\"\", $smtp_server=EMAIL_SMTP_SERVER, $smtp_port=EMAIL_SMTP_PORT, $pop3_user=EMAIL_POP3_USER, $pop3_pass=EMAIL_POP3_PASS, $pop3_server=EMAIL_POP3_SERVER, $pop3_port=EMAIL_POP3_PORT, $socket_timeout=EMAIL_CONNECTION_TIMEOUT) {\n\t\t\n\t\t$this->smtp_server \t= $smtp_server;\n\t\t$this->smtp_port \t= $smtp_port;\n\t\t$this->smtp_fp\t\t= 0;\n\t\t\n\t\t$this->email_from \t= $from;\n\t\t$this->email_to\t\t= $to;\n\t\t$this->email_cc\t\t= $cc;\n\t\t$this->email_bcc\t= $bcc;\n\t\t\n\t\t$this->email_rcptlist\t= array();\n\t\t\n\t\t$this->email_subject\t= $subject;\n\n\t\t$this->email_messages = array();\n\t\t$this->email_attachments = array();\n\t\t\n\t\t$this->email_boundry_message = '_-_Message-Boundry_-_';\n\t\t$this->email_boundry_parts = '_-_Message-Parts_-_';\n\t\t\n\t\t$this->pop3_authenticate = false;\n\t\t\n\t\t$this->pop3_user\t= $pop3_user;\n\t\t$this->pop3_pass\t= $pop3_pass;\n\t\t$this->pop3_server\t= $pop3_server;\n\t\t$this->pop3_port\t= $pop3_port;\n\t\t\n\t\t$this->socket_timeout = $socket_timeout;\n\t\n\t\t$this->debug_mode\t= false;\n\t\t$this->debug_data\t= '';\n\t\t\n\t}",
"public function configMail() {\n add_filter('wp_mail_content_type', function($type) {return 'text/html';});\n add_filter('wp_mail_from_name', function() {return 'Portfolio Site';});\n add_filter('wp_mail_from', function() {return 'wordpress@' . $_SERVER['HTTP_HOST'];});\n }",
"function send_email($recipient, $sender,$sender_name, $subject, $message,$text_message,$bouncemail=0,$campaign_id=0, $campaign_type = 'html',$notification=false,$subscriber_replace_arr=array(), $vmta='rcmailsv.com', $reply_to_email=''){\n $CI =& get_instance();\n\t$CI->load->model('is_authorized');\n $sess_user = $CI->session->userdata('member_id');\n if (!isset($sess_user)) exit;\n\n\t$email_personalize_arr=array();\n\t$search_email_personalize=get_email_personalize_data($email_personalize_arr);\n\t$arrPersonalizeReplace=get_fallback_value($message,$text_message,$email_personalize_arr);\t# Replace fallback value\n\t$subscriber_key_arr=array('subscriber_first_name','subscriber_last_name','subscriber_email_address','subscriber_state','subscriber_zip_code','subscriber_country','subscriber_city','subscriber_company','subscriber_dob','subscriber_phone','subscriber_address');\n require_once(\"phpmailer/class.phpmailer.php\");\n\n $mail = new PHPMailer();\n\t\n\t//SMTP begin\n $mail->IsSMTP();// set mailer to use SMTP\n\t$mail->SMTPDebug = 1; // debugging: 1 = errors and messages, 2 = messages only\n\t$mail->SMTPAuth = false; // authentication enabled\n\tif(in_array($vmta,config_item('lw_vmta'))){\n\t\t$mail->Host = \"host.redcappi.net\";\n\t\t$mail->Port = 2525; \n\t\t$SenderDomain =\"bounce.redcappi.net\";\n\t}elseif(in_array($vmta,config_item('lw2_vmta'))){\n\t\t$mail->Host = \"mail.rcmailsv.com\";\n\t\t$mail->Port = 2525; \n\t\t$SenderDomain =\"bounce.rcmailsv.com\";\n\t}elseif(in_array($vmta,config_item('lw3_vmta'))){\n\t\t$mail->Host = \"mail.mailsvrc.com\";\n\t\t$mail->Port = 2525; \n\t\t$SenderDomain =\"bounce.mailsvrc.com\";\n\t}elseif(in_array($vmta,config_item('ph_vmta'))){\n\t\t$mail->Host = \"mta01.redcappi.net\";\n\t\t$mail->Port = 25; \n\t\t$SenderDomain =\"bounce.redcappi.com\";\n }elseif(in_array($vmta,config_item('lw4_vmta'))){\n\t\t$mail->Host = \"mail.mailsvrc2.com\";\n\t\t$mail->Port = 2525; \n\t\t$SenderDomain =\"bounce.mailsvrc2.com\";\n }elseif(in_array($vmta,config_item('lw5_vmta'))){\n\t\t$mail->Host = \"mail.mailsvrc3.com\";\n\t\t$mail->Port = 2525; \n\t\t$SenderDomain =\"bounce.mailsvrc3.com\";\n }elseif(in_array($vmta,config_item('lw6_vmta'))){\n\t\t$mail->Host = \"mail.mailsvrc4.com\";\n\t\t$mail->Port = 2525; \n\t\t$SenderDomain =\"bounce.mailsvrc4.com\";\n }elseif(in_array($vmta,config_item('lw7_vmta'))){\n\t\t$mail->Host = \"mail.mailsvrc5.com\";\n\t\t$mail->Port = 2525; \n\t\t$SenderDomain =\"bounce.mailsvrc5.com\";\n }elseif(in_array($vmta,config_item('lw8_vmta'))){\n\t\t$mail->Host = \"mail.mailsvrc6.com\";\n\t\t$mail->Port = 2525; \n\t\t$SenderDomain =\"bounce.mailsvrc6.com\";\n\t} elseif (in_array($vmta, config_item('spark_vmta'))) {\n $mail->SMTPAuth = TRUE;\n $mail->Username = base64_encode('SMTP_Injection');\n $mail->Password = base64_encode('e39af39c5cdaf01d2f423f85562cea74b05feac4');\n $mail->Host = \"smtp.sparkpostmail.com\";\n $mail->Hostname = \"smtp.sparkpostmail.com\";\n $mail->Port = 587;\n $mail->SMTPSecure =\"tls\";\n $SenderDomain = \"spark.redcappi.com\";\n } else{\n \n\t\t$mail->Host = \"mail.rcmailcorp.com\";\n\t\t$mail->Port = 2525; \n\t\t$SenderDomain =\"bounce.rcmailcorp.com\";\n\t}\n\t \n\t\n $mail->FromName = $sender_name;\n $mail->From = $sender;\t\n\tif(trim($reply_to_email) != ''){\n\t\t$mail->AddReplyTo($reply_to_email, $sender_name);\n\t}\n \n\t// Send email to recivier by array\n\tif(is_array($recipient)){\n\t\tforeach($recipient as $key=>$v){\n\t\t\tunset($recipient_info);\n\t\t\t#explode recipient info\n\t\t\t$recipient_info=explode(\"||\",$v);\n\t\t\t$encodedSubscriber = $CI->is_authorized->encodeSubscriber($key,$recipient_info[0]);\n\t\t\t\n\t\t\t$mail->ClearAddresses();\n\t\t\t$mail->ClearAttachments();\n\t\t\t$mail->ClearCustomHeaders();\n\t\t\t$mail->IsHTML(false);\n\t\t\t$expl_arr=array();\n\t\t\t//$mail->Sender=base64_encode($key).'@'. $SenderDomain ;\t\t\t\n\t\t\t//$mail->AddCustomHeader('Sender: '.base64_encode($key).'@'.$SenderDomain);\t\n\t\t\t$mail->AddCustomHeader('x-envid:'.$campaign_id);\n\t\t\t\n\t\t\t$mail->AddCustomHeader('x-fblid:'.$key.'-'.$campaign_id.'-'.CAMPAIGN_HEADER_SUFFIX);\t\t\t\t\n\t\t\t$mail->AddCustomHeader('x-job:'.$key);\t\n\t\t\t$mail->AddCustomHeader('x-virtual-mta: '.$vmta);\t \t\t\t\n\t\t\t$mail->AddCustomHeader('List-Unsubscribe: <mailto:[email protected]?subject=Unsubscribe '.$encodedSubscriber.'>, <http://www.'.SYSTEM_DOMAIN_NAME.'/newsletter/unsubscribe_mail/unsubscribe/'.$campaign_id.'/'.$encodedSubscriber.'>');\n $mail->AddCustomHeader('Message-ID:<' . strtotime('now') . $campaign_id . '@bounce.' . $vmta . '>');\n $mail->AddCustomHeader('Sender:' . $sender);\n $mail->AddCustomHeader('Precedence:bulk');\n $mail->AddCustomHeader('Return-Path:' . base64_encode($sender) . \"@bounce.\" . $vmta);\n\t\t\t\n\t\t\t$mail->AddAddress($recipient_info[0],$recipient_info[1]);// recipient email address\n\t\t\t$arrSearchStr = array('[subscriber_id]','[CONTACT_EMAIL_ID]');\n\t\t\t\n\t\t\t$arrReplaceBy =array($encodedSubscriber,$recipient_info[0]);\n\t\t\t$expl_arr=explode(\"||\",$subscriber_replace_arr[$key]);\n\t\t\t$expl_arr = array_combine($subscriber_key_arr, $expl_arr);\n\t\t\t$expl_arr = array_filter($expl_arr);\n\t\t\tif(is_array($expl_arr)){\n\t\t\t\t$replace_email_personalize = array_merge($arrPersonalizeReplace,$expl_arr);\n\t\t\t}else{\n\t\t\t\t$replace_email_personalize=$arrPersonalizeReplace;\n\t\t\t}\n\t\t\t#Email Personalization on campaign content\n\t\t\t$message_cnt=str_replace($search_email_personalize, $replace_email_personalize, $message);\n\t\t\t$message_cnt=str_replace($arrSearchStr, $arrReplaceBy, $message_cnt);\n\t\t\t#Email Personalization on campaign text content\n\t\t\t$text_message_content=str_replace($search_email_personalize, $replace_email_personalize, $text_message);\n\t\t\t$text_message_content=str_replace($arrSearchStr, $arrReplaceBy, $text_message_content);\n\t\t\n\t\t\t#Email Personalization on campaign subject\n\t\t\t$campaign_subject=str_replace($search_email_personalize, $replace_email_personalize, $subject);\n\t\t\t$campaign_subject=str_replace($arrSearchStr, $arrReplaceBy, $campaign_subject);\n\t\t\t\n\t\t\t$body = $message_cnt;\n\t\t\t\n\t\t\t# the HTML to the plain text. Store it into the variable. \n\t\t\t$text = $text_message_content;\n\t\t\t$mail->Subject = $campaign_subject;\n $mail->AddCustomHeader('Message-ID:<' . strtotime('now') . $campaign_ . '@bounce.' . $vmta . '>');\n $mail->AddCustomHeader('Sender:' . $sender);\n $mail->AddCustomHeader('Precedence:bulk');\n $mail->AddCustomHeader('Return-Path:' . base64_encode($sender) . \"@bounce.\" . $vmta);\n\t\t\t\n\t\t\tif($campaign_type == 'html'){\n\t\t\t\t$mail->AltBody = $text;\n\t\t\t\t$mail->MsgHTML($body);\n\t\t\t}else{\n\t\t\t\t$mail->Body = $text;\n\t\t\t}\n \n\n $mail->Send();\n\t\t}\n\t}else{\n\t\t$message_cnt=$message;\n\t\t$body = $message_cnt;\n\t\t$emailz = explode(\",\",$recipient);\n\t\t$mailCt = count($emailz);\t\t\n\t\t$mail->Sender=\"testmail@\".$SenderDomain;\n\t\t//$mail->AddCustomHeader('Sender: testmail@'.$SenderDomain);\t\n\t\t$mail->AddCustomHeader('x-envid:'.$campaign_id);\n\t\t$mail->AddCustomHeader('x-fblid: testmail-'.$campaign_id.'-'.CAMPAIGN_HEADER_SUFFIX);\t\n\t\t$mail->AddCustomHeader('Message-ID:<' . strtotime('now') . $campaign_id . '@bounce.' . $vmta . '>');\n $mail->AddCustomHeader('Sender:' . $sender);\n $mail->AddCustomHeader('Precedence:bulk');\n $mail->AddCustomHeader('Return-Path:' . base64_encode($sender) . \"@bounce.\" . $vmta);\n\t\t\t\n\t\t$mail->AddCustomHeader('x-job: testmail');\t\t\t\n\t\tfor($i=0; $i<$mailCt; $i++){\n\t\t\t$tu= $emailz[$i];\n\t\t\t$mail->AddAddress($tu);\n\t\t}\n\t\t// the HTML to the plain text. Store it into the variable. \n\t\t$mail->Subject = $subject;\n\t\t$mail->AddCustomHeader('x-virtual-mta: '.$vmta);\t \n\t\tif($campaign_type == 'html'){\n\t\t\t$mail->AltBody = $text_message;\n\t\t\t$mail->MsgHTML($body);\n\t\t}else{\n\t\t\t$mail->Body = $text_message;\n\t\t}\n\t\t\n\t\t$mail->Send();\n\t} \n$mail->SmtpClose();\t\n\t//mail end\n}",
"function bp_course_wp_mail($to,$subject,$message,$args=''){\n if(!count($to))\n return;\n \n $headers = \"MIME-Version: 1.0\" . \"\\r\\n\";\n $settings = get_option('lms_settings');\n if(isset($settings['email_settings']) && is_array($settings['email_settings'])){\n if(isset($settings['email_settings']['from_name'])){\n $name = $settings['email_settings']['from_name'];\n }else{\n $name =get_bloginfo('name');\n }\n if(isset($settings['email_settings']['from_email'])){\n $email = $settings['email_settings']['from_email'];\n }else{\n $email = get_option('admin_email');\n }\n if(isset($settings['email_settings']['charset'])){\n $charset = $settings['email_settings']['charset'];\n }else{\n $charset = 'utf8'; \n }\n }\n $headers .= \"From: $name<$email>\". \"\\r\\n\";\n $headers .= \"Content-type: text/html; charset=$charset\" . \"\\r\\n\";\n \n $message = bp_course_process_mail($to,$subject,$message,$args); \n $message = apply_filters('wplms_email_templates',$message,$to,$subject,$message,$args);\n wp_mail($to,$subject,$message,$headers);\n}",
"function smtpmailer($para, $de, $de_nome, $assunto, $corpo) { \r\n global $error;\r\n $mail = new PHPMailer();\r\n $mail->IsSMTP(); // Ativar SMTP\r\n $mail->SMTPDebug = 0; // Debugar: 1 = erros e mensagens, 2 = mensagens apenas\r\n $mail->SMTPAuth = true; // Autenticação ativada\r\n $mail->SMTPSecure = 'tls'; // SSL REQUERIDO pelo GMail\r\n $mail->Host = 'smtp.ufop.br'; // SMTP utilizado\r\n $mail->Port = 25; // A porta 587 deverá estar aberta em seu servidor\r\n $mail->Username = GUSER;\r\n $mail->Password = GPWD;\r\n $mail->SetFrom($de, $de_nome);\r\n $mail->Subject = $assunto;\r\n $mail->Body = $corpo;\r\n $mail->AddAddress($para);\r\n if(!$mail->Send()) {\r\n $error = 'Mail error: '.$mail->ErrorInfo; \r\n return false;\r\n } else {\r\n $error = 'Mensagem enviada!';\r\n return true;\r\n }\r\n }",
"function _notifybymail($to,$subj,$message,$fromname=\"Support\",$from='[email protected]')\r\n\t{\r\n\t\t\r\n\t\t$this->email->clear();\r\n\t\t\r\n\t\t$config = array(\r\n\t\t\t 'protocol' => 'smtp',\r\n\t\t\t 'smtp_host' => 'ssl://email-smtp.us-east-1.amazonaws.com',\r\n\t\t\t 'smtp_user' => 'AKIAIIIJ7TIURYRQPZTA',\r\n\t\t\t 'smtp_pass' => 'ArI01zUQ7iwXYnHNfH3GApcBUWSE0v+b5qhhR2zK2B68',\r\n\t\t\t 'smtp_port' => 465,\r\n\t\t\t);\r\n\t\t$config['mailtype']=\"html\";\t\r\n\t\t$this->email->initialize($config);\r\n\t\t$this->email->set_newline(\"\\r\\n\");\r\n\t\t$this->email->from($from,$fromname);\r\n\t\t$this->email->to($to); \r\n\t\t\r\n\t\t$this->email->subject($subj);\r\n\t\t$this->email->message($message);\t\r\n\t\t\r\n\t\t$this->email->send();\r\n\t\t\r\n\t\t//echo $this->email->print_debugger();\r\n \r\n\t}",
"public function getMail():string\n { \n return $this->mail;\n }",
"protected function loadMailFields()\n {\n parent::loadMailFields();\n\n $this->mailFields = $this->tokenMailFields() + $this->mailFields; // Prefer our fields over the ones from the super class\n }",
"public function utility_email($msg, $member_email, $subject){\n\t\t//echo $msg;\n\t\treturn $this->send_mime_mail(\"immistudy.ru\", \n\t\t\t\t\t\t\"immistudy@mailru\",\n\t\t\t\t\t\t\"\",\n\t\t\t\t\t\t$member_email,\n\t\t\t\t\t\t'UTF-8',\n\t\t\t\t\t\t'windows-1251',\n\t\t\t\t\t\t$subject,\n\t\t\t\t\t\t$msg);\n\t}",
"public function __construct() {\r\n $this->html = false;\r\n $this->setFrom(EMAIL_FROM);\r\n }",
"function sendNewMessageNotification($to_user_id,$to_name,$subject,$fromEmail,$replyEmail)\n{\n #check if the user enabled this option\n $query=\"select message_email,email from users where user_id ='$to_user_id' and access_level NOT IN ('ebulkuser','eremote') limit 1\";\n $email_option=getDBRecords($query); \n\n if($email_option[0]['message_email'] == \"Y\")\n { \n $email = $email_option[0]['email'];\n $html=\"<p><font size=\\\"2\\\" face=\\\"Verdana, Arial, Helvetica, sans-serif\\\">Dear \".$to_name.\",<br><br>\n You have been sent a message via the online \".DBS.\" system regarding <b>\".$subject.\"</b>, please login to your secure online account to read the message.\n\t\t\t <br><br>Thank You</font></p>\";\n\n\n\t\t$text=\"Dear \".$to_name.\",\n \n\t\t\t You have been sent a message via the online \".DBS.\" system regarding \".$subject.\", please login to your secure online account to read the message.\n\t\t\t \n\t\t\t Thank You\";\n\n\t\t \n\t\t$from = $fromEmail;\n\t\t$mail = new htmlMimeMail();\n\t\t$mail->setHtml($html, $text);\n\t\t$mail->setReturnPath($replyEmail);\n $mail->setFrom($from);\n $mail->setSubject(\"Important Message\");\n $mail->setHeader('X-Mailer', 'HTML Mime mail class');\n\n if(!empty($email))\n\t {\n $result = $mail->send(array($email), 'smtp');\t\n\t\t}\n } \t\n}",
"public function traerPorMail($email) {\n\n}",
"function __emailer($email = '', $vars = array())\n {\n\n //common variables\n $this->data['email_vars']['todays_date'] = $this->data['vars']['todays_date'];\n $this->data['email_vars']['company_email_signature'] = $this->data['settings_company']['company_email_signature'];\n\n //------------------------------------queue email in database-------------------------------\n /** THIS WIL NOT SEND BUT QUEUE THE EMAILS*/\n if ($email == 'mailqueue_ticket_reply') {\n\n //email vars\n $this->data['email_vars']['email_title'] = $this->data['lang']['lang_support_ticket_reply'];\n\n //get message template from database\n $template = $this->settings_emailtemplates_model->getEmailTemplate('general_notification_admin');\n $this->data['debug'][] = $this->settings_emailtemplates_model->debug_data;\n\n //dynamic email vars - email body\n $this->data['email_vars']['email_message'] = '\n <div style=\" border:#CCCCCC solid 1px; padding:8px;\">\n <span style=\"text-decoration: underline; font-weight:bold;\">\n ' . $this->data['lang']['lang_title'] . '</span><br>\n ' . $this->input->post('tickets_title') . '<br><br>\n <span style=\"text-decoration: underline; font-weight:bold;\">\n ' . $this->data['lang']['lang_message'] . '</span><br>\n ' . $this->input->post('tickets_replies_message') . '\n <p><div style=\"padding:5px; background-color:#fbe9d0;\">'.$this->data['lang']['lang_support_do_not_reply'].'</div></div>';\n\n //dynamic email vars - general\n $this->data['email_vars']['addressed_to'] = $this->data['lang']['lang_hello'];\n $this->data['email_vars']['admin_dashboard_url'] = $this->data['vars']['site_url_admin'].'/ticket/'.$this->input->post('tickets_replies_ticket_id');\n\n //get the email address of staff assigned to this ticket. (email preferences are checked)\n $team_members_email = $this->teamprofile_model->notificationsEmail($this->input->post('tickets_assigned_to_id'));\n $this->data['debug'][] = $this->teamprofile_model->debug_data;\n\n //add to email queue\n if ($team_members_email != '') {\n\n //set sqldata() for database\n $sqldata['email_queue_message'] = parse_email_template($template['message'], $this->data['email_vars']);\n $sqldata['email_queue_subject'] = $this->data['lang']['lang_support_ticket_reply'];\n $sqldata['email_queue_email'] = $team_members_email;\n\n //add to email queue database - excluding uploader (no need to send them an email)\n $this->email_queue_model->addToQueue($sqldata);\n $this->data['debug'][] = $this->email_queue_model->debug_data;\n }\n\n }\n }",
"function sendEmails() {\n\t\t$this->substituteValueMarkers(array('templateCode' => $this->data['tx_gokontakt_emailBody'] ));\n\t\t$this->substituteLanguageMarkers(array('templateCode' => $this->data['tx_gokontakt_emailBody'] ));\n\t\t$this->substituteValueMarkers(array('templateCode' => $this->data['tx_gokontakt_emailAdminBody'] ));\n\t\t$this->substituteLanguageMarkers(array('templateCode' => $this->data['tx_gokontakt_emailAdminBody'] ));\n\n\t\t$emailUser = $this->cObj->substituteMarkerArrayCached($this->data['tx_gokontakt_emailBody'], $this->markerArray, $this->subpartMarkerArray, $this->wrappedSubpartMarkerArray);\n\t\t$emailUser = str_replace(\"<br />\", \"\\n\", $emailUser);\n\t\t$emailAdmin = $this->cObj->substituteMarkerArrayCached($this->data['tx_gokontakt_emailAdminBody'], $this->markerArray, $this->subpartMarkerArray, $this->wrappedSubpartMarkerArray);\n\t\t$emailAdmin = str_replace(\"<br />\", \"\\n\", $emailAdmin);\n\t\t$emailFrom = $this->data['tx_gokontakt_emailFrom'];\n\t\t$emailFromName = $this->data['tx_gokontakt_emailFromName'];\n\t\t$emailToAdmin = $this->data['tx_gokontakt_emailToAdmin'];\n\n\t\t$this->sendEmail($this->pi_getLL('subject_email_user'), $emailUser, '', $emailFrom, $emailFromName, $this->piVars['email']);\n\t\t$this->sendEmail($this->pi_getLL('subject_email_admin'), $emailAdmin, '', $emailFrom, $emailFromName, $emailToAdmin);\n\t}",
"abstract protected function getSubject();",
"function email($to, $subj, $content, $headers)\n{\n//error_reporting(0);\n /*$to = '[email protected]';\n$subject = 'the subject';\n$message = 'hello test';\n$headers = 'From: [email protected]' . \"\\r\\n\" .\n 'Reply-To: [email protected]' . \"\\r\\n\" .\n 'X-Mailer: PHP/';*/\nrequire_once('PEAR.php');\nrequire_once('Mail.php');\nrequire_once('Mail/mime.php');\n//$mail = &Mail::factory('smtp', array('host'=>'smtp.gmail.com', 'port'=>\"465\", 'auth'=>true, 'username'=>'[email protected]','password'=>'AK987!@#$%'));\n$mail = &Mail::factory(\"mail\");\n\n$_mail = $mail->send($to, $headers, $content);\n\n//echo($to.\"-\".$headers.\"-\".$content);\n//echo ($_mail->getMessage());\nlogoperation(777,0,\"send email\",\"email: \".$to.\" headers:\".$headers['From'].\"-\".$headers['To'].\" content: \".$content,$_SERVER['REMOTE_ADDR']);\n}",
"abstract public function get_first_line_support_email();",
"function clsRecordemails()\r\n\r\n {\r\n\r\n\r\n\r\n global $FileName;\r\n\r\n $this->Visible = true;\r\n\r\n $this->Errors = new clsErrors();\r\n\r\n $this->ds = new clsemailsDataSource();\r\n\r\n $this->InsertAllowed = false;\r\n\r\n $this->UpdateAllowed = false;\r\n\r\n if($this->Visible)\r\n\r\n {\r\n\r\n $this->ComponentName = \"emails\";\r\n\r\n $this->HTMLFormAction = $FileName . \"?\" . CCAddParam(CCGetQueryString(\"QueryString\", \"\"), \"ccsForm\", $this->ComponentName);\r\n\r\n $CCSForm = CCGetFromGet(\"ccsForm\", \"\");\r\n\r\n $this->FormSubmitted = ($CCSForm == $this->ComponentName);\r\n\r\n $Method = $this->FormSubmitted ? ccsPost : ccsGet;\r\n\r\n $this->from_user_id = new clsControl(ccsLabel, \"from_user_id\", \"From User Id\", ccsText, \"\", CCGetRequestParam(\"from_user_id\", $Method));\r\n\r\n $this->emaildate = new clsControl(ccsLabel, \"emaildate\", \"date\", ccsText, \"\", CCGetRequestParam(\"emaildate\", $Method));\r\n\r\n $this->subject = new clsControl(ccsLabel, \"subject\", \"Subject\", ccsText, \"\", CCGetRequestParam(\"subject\", $Method));\r\n\r\n $this->message = new clsControl(ccsLabel, \"message\", \"Message\", ccsMemo, \"\", CCGetRequestParam(\"message\", $Method));\r\n\r\n $this->message->HTML = true;\r\n\r\n $this->Delete = new clsButton(\"Delete\");\r\n\r\n $this->cancel = new clsButton(\"cancel\");\r\n\r\n }\r\n\r\n }",
"function send_email($to,$subject,$html,$text,$bcc_admin){\r\n\r\n\t\tif(!is_array($to)) $to = array($to);\r\n\r\n\t\tif($GLOBALS['server_info']['environment']=='dev') return true;\r\n\r\n\t\t@include_once($GLOBALS['server_info']['physical_root'].'inc/htmlMimeMail5/htmlMimeMail5.php');\r\n\t\t@include_once('/var/www/monrovia.com/root/inc/htmlMimeMail5/htmlMimeMail5.php');\t\t\t\t// LIVE\r\n\t\t@include_once('/var/www/vhosts/tpgphpdev1.net/httpdocs/inc/htmlMimeMail5/htmlMimeMail5.php');\t// STAGING\r\n\r\n\t\t$mail = new htmlMimeMail5();\r\n\t\t$mail->setHTMLCharset('UTF-8');\r\n\t\t$mail->setHeadCharset('UTF-8');\r\n\t\t$mail->setTextCharset('UTF-8');\r\n\t\t//if($_SERVER[\"HTTP_HOST\"]!='') $mail->setFrom('Monrovia Website <[email protected]>');\r\n\t\tif($GLOBALS['server_info']['environment']=='prod') $mail->setFrom('Monrovia Website <[email protected]>');\r\n\t\t$mail->setSubject($subject);\r\n\r\n\t\tif($text=='') $text = $html;\r\n\r\n\t\t$mail->setText($text);\r\n\t\t$mail->setHTML($html);\r\n\t\tif($GLOBALS['admin_email']!=''&&$bcc_admin&&$GLOBALS['admin_email']!=$to[0]) $mail->setBcc($GLOBALS['admin_email']);\r\n\t\t$result = @$mail->send($to);\r\n\t\treturn ($result===true);\r\n\t}",
"function rets_bsf_mail($key, &$message, $params) {\n if (isset($params['subject'])) {\n $message['subject'] = $params['subject'];\n } \n if (isset($params['body'])) {\n $message['body'][] = $params['body']; \n }\n if (isset($params['headers']) && is_array($params['headers'])) { \n $message['headers'] += $params['headers'];\n }\n \n // You should really have hook_mail() doing most of the formatting, \n // rather than pass in a complete $body or a $subject from drupal_mail(). \n // To accomplish that, you'd branch this formatting based on the value of\n // $key sent with drupal_mail(), and using code like this:\n // switch ($key) {\n // case 'key1':\n // // do something specific for mails of type key1\n // break; \n // case 'key2':\n // // do something specific for mails of type key2\n // break;\n // }\n \n // That's it - You don't do anything in your hook_mail() to actually\n // send the mail, that is taken care of by the mail system automatically. \n}",
"function sendOrderMail(&$do){\n if (isset($do['oCUSTOMERLANG']->raw) && $do['oCUSTOMERLANG']->raw != TZR_DEFAULT_LANG){\n $lang_save = XShell::getLangUser();\n $_REQUEST['LANG_USER']=$do['oCUSTOMERLANG']->raw;\n $_REQUEST['LANG_DATA']=$do['oCUSTOMERLANG']->raw;\n $foo = XShell::getLangUser();\n $foo = XShell::getLangData(NULL, true);\n }\n\n $r = $this->displayOrder($do['oid']);\n\n $xt = new XTemplate('file:'.$GLOBALS['USER_TEMPLATES_DIR'].$this->defaultStepTemplates['recepisse']);\n $labels=&$GLOBALS['XSHELL']->labels->get_labels(array('selectors'=>array('global'),'local'=>true));\n $xt->set_glob(array('labels'=>&$labels));\n $r3=array();\n if (isset($GLOBALS['eplmailscolors'])){\n $colors = $GLOBALS['eplmailscolors'];\n } else {\n $colors = array();\n }\n $tpldata = array('br'=>$r, 'colors'=>$colors);\n\n $content=$xt->parse($tpldata,$r3,NULL);\n\n $subject = $GLOBALS['XSHELL']->labels->getCustomSysLabel('titre_mail_commande');\n if (empty($subject))\n $subject = '[Votre commande]';\n\n $subject = XIni::get('societe').' '.$subject;\n\n // mail et nom du client commande\n $to = array('email'=>$do['oCUSTOMEREMAIL']->raw, 'name'=>$do['oCUSTOMERNOM']->raw. ' '. $do['oCUSTOMERPRENOM']->raw);\n\n $this->modcustomer->sendMailTo($content, $subject, NULL, $to);\n\n if (isset($do['CUSTOMERLANG']->raw) && $do['oCUSTOMERLANG']->raw != TZR_DEFAULT_LANG){\n $_REQUEST['LANG_USER'] = $lang_save;\n $_REQUEST['LANG_DATA'] = $lang_save;\n $foo = XShell::getLangUser(NULL, true);\n $foo = XShell::getLangData(NULL, true);\n }\n }",
"abstract public function get_subject();",
"protected function _initMail()\n {\n $mailTransport = new Zend_Mail_Transport_Sendmail();\n Zend_Mail::setDefaultTransport($mailTransport);\n }",
"function bp_course_process_mail($to,$subject,$message,$args=''){\n $template = html_entity_decode(get_option('wplms_email_template'));\n if(!isset($template) || !$template || strlen($template) < 5)\n return $message;\n \n\n $site_title = get_option('blogname');\n $site_description = get_option('blogdescription');\n $logo_url = vibe_get_option('logo');\n $logo = '<a href=\"'.get_option('home_url').'\"><img src=\"'.$logo_url.'\" alt=\"'.$site_title.'\" style=\"max-width:50%;\"/></a>';\n\n $sub_title = $subject; \n if(isset($args['user_id'])){\n if(is_numeric($args['user_id'])){\n $name = bp_core_get_userlink($args['user_id']);\n }else if(is_array($args['user_id'])){\n $userid = $args['user_id'][0];\n if(is_numeric($userid)){\n $name = bp_core_get_userlink($userid);\n }\n }\n }else\n $name = $to;\n\n $datetime = date_i18n( get_option( 'date_format' ), time());\n if(isset($args['item_id'])){\n $instructor_id = get_post_field('post_author', $args['item_id']);\n $sender = bp_core_get_user_displayname($instructor_id);\n $instructing_courses=apply_filters('wplms_instructing_courses_endpoint','instructing-courses');\n $sender_links = '<a href=\"'.bp_core_get_user_domain( $instructor_id ).'\">'.__('Profile','vibe-customtypes').'</a> | <a href=\"'.get_author_posts_url($instructor_id).$instructing_courses.'/\">'.__('Courses','vibe-customtypes').'</a>';\n $item = get_the_title($args['item_id']);\n $item_links = '<a href=\"'.get_permalink( $args['item_id'] ).'\">'.__('Link','vibe-customtypes').'</a> | <a href=\"'.bp_core_get_user_domain($instructor_id).'/\">'.__('Instructor','vibe-customtypes').'</a>';\n $unsubscribe_link = bp_core_get_user_domain($args['user_id']).'/settings/notifications';\n }else{\n $sender ='';\n $sender_links ='';\n $item ='';\n $item_links ='';\n $unsubscribe_link = '#';\n $template = str_replace('cellpadding=\"28\"','cellpadding=\"0\"',$template);\n }\n \n $copyright = vibe_get_option('copyright');\n $link_id = vibe_get_option('email_page');\n if(is_numeric($link_id)){\n $array = array(\n 'to' => $to,\n 'subject'=>$subject,\n 'message'=>$message,\n 'args'=>$args\n );\n $link = get_permalink($link_id).'?vars='.urlencode(json_encode($array));\n }else{\n $link = '#';\n }\n\n\n $template = str_replace('{{logo}}',$logo,$template);\n $template = str_replace('{{subject}}',$subject,$template);\n $template = str_replace('{{sub-title}}',$sub_title,$template);\n $template = str_replace('{{name}}',$name,$template);\n $template = str_replace('{{datetime}}',$datetime,$template);\n $template = str_replace('{{message}}',$message,$template);\n $template = str_replace('{{sender}}',$sender,$template);\n $template = str_replace('{{sender_links}}',$sender_links,$template);\n $template = str_replace('{{item}}',$item,$template);\n $template = str_replace('{{item_links}}',$item_links,$template);\n $template = str_replace('{{site_title}}',$site_title,$template);\n $template = str_replace('{{site_description}}',$site_description,$template);\n $template = str_replace('{{copyright}}',$copyright,$template);\n $template = str_replace('{{unsubscribe_link}}',$unsubscribe_link,$template);\n $template = str_replace('{{link}}',$link,$template);\n $template = bp_course_minify_output($template);\n return $template;\n}",
"function mailreport()\n{\n\tglobal $g_error_msg, $g_debug_msg;\n\tinclude_once(atkconfig('atkroot'). 'atk/errors/class.atkerrorhandlerbase.inc');\n\t$errorHandlerObject = atkErrorHandlerBase::get('mail', array('mailto'=>atkconfig('mailreport')));\n\t$errorHandlerObject->handle($g_error_msg, $g_debug_msg);\n}",
"function sendmail($sender, $recipient, $data, $smtp = 'localhost' ) {\n\n /*\n * Get mime object\n */\n $mime = GenericMail::_instanceMailMime();\n\n /*\n * Get Headerdata\n */\n $headers = GenericMail::_constructHeader($sender, $recipient, $data['subject']);\n\n /*\n * Check if there are attachments\n */\n if (isset($data['attachment'])) {\n $attachment = $data['attachment'];\n if (is_array($attachment)) {\n foreach ($attachment as $file) {\n if (is_file($file) && is_readable($file)) {\n $mime->addAttachment($file);\n }\n }\n } else {\n if (is_file($attachment) && is_readable($attachment)) {\n $mime->addAttachment($attachment);\n }\n }\n }\n\n /*\n * Setea porciones texto y html del correo\n */\n if (!empty($data['textdata'])) $mime->setTxtbody($data['textdata']);\n\n if (!empty($data['htmldata'])) $mime->setHTMLbody($data['htmldata']);\n\n // mail puede contener 'textdata' y/o 'htmldata'\n $param['text_charset'] = 'utf-8'; // The character set to use for the plain text part of the email. Default is \"iso-8859-1\".\n $param['html_charset'] = 'utf-8'; // The character set to use for the HTML part of the email. Default is \"iso-8859-1\".\n\n\n /*\n * Create Body of the Mail\n */\n $body = $mime->get($param); // http://pear.php.net/manual/en/package.mail.mail-mime.get.php\n\n /*\n * Set correct Headers\n */\n $hdrs = $mime->headers($headers['headers']);\n\n /*\n * Get Mail Object\n */\n $mail_object = GenericMail::_instanceMail($smtp);\n\n /*\n * Send Mail\n */\n $res = $mail_object->send( $headers['recipient_list'], $hdrs, $body );\n if (PEAR::isError($res)) {\n throw new Exception(\"code='\" .\n $res->getCode() . \"', message='\" .\n $res->getMessage() . \"'.\");\n };\n\n }",
"function sendHTMLMail($HTMLContent, $PLAINContent, $recipient, $subject, $fromEmail, $fromName, $replyTo = '', $fileAttachment = '') {\n\t\t\t// HTML\n\t\t\tif (trim($recipient)) {\n\t\t\t\t$parts = spliti('<title>|</title>', $HTMLContent, 3);\n\t\t\t\t\t \n\t\t\t\t$Typo3_htmlmail = t3lib_div::makeInstance('t3lib_htmlmail');\n\t\t\t\t$Typo3_htmlmail->start();\n\t\t\t\t$Typo3_htmlmail->mailer = 'Typo3 HTMLMail';\n\t\t\t\t$Typo3_htmlmail->subject = $subject;\n\t\t\t\t$Typo3_htmlmail->from_email = $fromEmail;\n\t\t\t\t$Typo3_htmlmail->returnPath = $fromEmail;\n\t\t\t\t$Typo3_htmlmail->from_name = $fromName;\n\t\t\t\t$Typo3_htmlmail->from_name = implode(' ' , t3lib_div::trimExplode(',', $Typo3_htmlmail->from_name));\n\t\t\t\t$Typo3_htmlmail->replyto_email = $replyTo ? $replyTo :$fromEmail;\n\t\t\t\t$Typo3_htmlmail->replyto_name = $replyTo ? '' : $fromName;\n\t\t\t\t$Typo3_htmlmail->replyto_name = implode(' ' , t3lib_div::trimExplode(',', $Typo3_htmlmail->replyto_name));\n\t\t\t\t$Typo3_htmlmail->organisation = '';\n\t\t\t\t$Typo3_htmlmail->priority = 3;\n\t\t\t\t \n\t\t\t\t// ATTACHMENT\n\t\t\t\tif ($fileAttachment && file_exists($fileAttachment)) {\n\t\t\t\t\t$Typo3_htmlmail->addAttachment($fileAttachment);\n\t\t\t\t}\n\t\t\t\t \n\t\t\t\t// HTML\n\t\t\t\tif (trim($HTMLContent)) {\n\t\t\t\t\t$Typo3_htmlmail->theParts['html']['content'] = $HTMLContent;\n\t\t\t\t\t$Typo3_htmlmail->theParts['html']['path'] = '';\n\t\t\t\t\t$Typo3_htmlmail->extractMediaLinks();\n\t\t\t\t\t$Typo3_htmlmail->extractHyperLinks();\n\t\t\t\t\t$Typo3_htmlmail->fetchHTMLMedia();\n\t\t\t\t\t$Typo3_htmlmail->substMediaNamesInHTML(0); // 0 = relative\n\t\t\t\t\t$Typo3_htmlmail->substHREFsInHTML();\n\t\t\t\t\t \n\t\t\t\t\t$Typo3_htmlmail->setHTML($Typo3_htmlmail->encodeMsg($Typo3_htmlmail->theParts['html']['content']));\n\t\t\t\t}\n\t\t\t\t// PLAIN\n\t\t\t\t$Typo3_htmlmail->addPlain($PLAINContent);\n\t\t\t\t// SET Headers and Content\n\t\t\t\t$Typo3_htmlmail->setHeaders();\n\t\t\t\t$Typo3_htmlmail->setContent();\n\t\t\t\t$Typo3_htmlmail->setRecipient($recipient);\n\t\t\t\t$Typo3_htmlmail->sendtheMail();\n\t\t\t}\n\t\t}",
"protected function setUp(): void\n\t{\n\t\tglobal $txt;\n\t\trequire_once(SUBSDIR . '/Emailpost.subs.php');\n\n\t\t$lang = new Loader('english', $txt, database());\n\t\t$lang->load('Maillist');\n\t\tUser::$info = new UserInfo(['name' => 'name']);\n\n\t\t$this->_email = 'Return-Path: <[email protected]>\nDelivered-To: <[email protected]>\nReceived: from galileo.tardis.com\n\tby galileo.tardis.com (Dovecot) with LMTP id znQ3AvalOVi/SgAAhPm7pg\n\tfor <[email protected]>; Sat, 26 Nov 2016 09:10:46 -0600\nReceived: by galileo.tardis.com (Postfix, from userid 1005)\n\tid 0671C1C8; Sat, 26 Nov 2016 09:10:46 -0600 (CST)\nX-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on\n\tgalileo.tardis.com\nX-Spam-Flag: YES\nX-Spam-Level: ******\nX-Spam-Status: Yes, score=5.0 required=5.0 tests=HTML_IMAGE_ONLY_16,\n\tHTML_MESSAGE,HTML_SHORT_LINK_IMG_2,MIME_HTML_ONLY,MIME_HTML_ONLY_MULTI,\n\tMPART_ALT_DIFF,RCVD_IN_BRBL_LASTEXT,T_DKIM_INVALID,URIBL_BLACK autolearn=no\n\tautolearn_force=no version=3.4.0\nReceived: from mail.elkarte.net (s2.eurich.de [85.214.104.5])\n\tby galileo.tardis.com (Postfix) with ESMTP id 1872579\n\tfor <[email protected]>; Sat, 26 Nov 2016 09:10:40 -0600 (CST)\nReceived: from localhost (localhost [127.0.0.1])\n\tby mail.elkarte.net (Postfix) with ESMTP id 9DE3C4CE1535\n\tfor <[email protected]>; Sat, 26 Nov 2016 16:10:39 +0100 (CET)\nX-Virus-Scanned: Debian amavisd-new at s2.eurich.de\nReceived: from mail.elkarte.net ([127.0.0.1])\n\tby localhost (h2294877.stratoserver.net [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id zQep5x32jrqA for <[email protected]>;\n\tSat, 26 Nov 2016 16:10:03 +0100 (CET)\nReceived: from mail.elkarte.net (h2294877.stratoserver.net [85.214.104.5])\n\tby mail.elkarte.net (Postfix) with ESMTPA id 990694CE0CFA\n\tfor <[email protected]>; Sat, 26 Nov 2016 16:10:03 +0100 (CET)\nSubject: [ElkArte Community] Test Message\nTo: <[email protected]>\nFrom: \"Administrator via ElkArte Community\" <[email protected]>\nReply-To: \"ElkArte Community\" <[email protected]>\nReferences: <[email protected]>\nDate: Sat, 26 Nov 2016 15:09:15 -0000\nX-Mailer: ELK\nX-Auto-Response-Suppress: All\nAuto-Submitted: auto-generated\nList-Id: <[email protected]>\nList-Unsubscribe: <http://www.elkarte.net/community/index.php?action=profile;area=notification>\nList-Owner: <mailto:[email protected]> (ElkArte Community)\nMime-Version: 1.0\nContent-Type: multipart/alternative; boundary=\"ELK-66593aefa4beed000470cbd4cc3238d9\"\nContent-Transfer-Encoding: 7bit\nMessage-ID: <[email protected]>\n\n\nTesting\n\n\nRegards, The ElkArte Community\n\n[cd8c399768891330804a1d2fc613ccf3-t4124]\n\n--ELK-66593aefa4beed000470cbd4cc3238d9\nContent-Type: text/plain; charset=UTF-8\nContent-Transfer-Encoding: 7bit\n\n\nTesting\n\n\nRegards, The ElkArte Community\n\n[cd8c399768891330804a1d2fc613ccf3-t4124]\n\n--ELK-66593aefa4beed000470cbd4cc3238d9--\n\n--ELK-66593aefa4beed000470cbd4cc3238d9\nContent-Type: text/html; charset=UTF-8\nContent-Transfer-Encoding: 7bit\n\n\n<strong>Testing</strong>\n\n\nRegards, The ElkArte Community\n\n[cd8c399768891330804a1d2fc613ccf3-t4124]\n\n--ELK-66593aefa4beed000470cbd4cc3238d9--';\n\t}",
"function clsRecordemails()\r\n {\r\n\r\n global $FileName;\r\n $this->Visible = true;\r\n $this->Errors = new clsErrors();\r\n $this->ds = new clsemailsDataSource();\r\n $this->ReadAllowed = false;\r\n $this->InsertAllowed = false;\r\n $this->UpdateAllowed = false;\r\n $this->DeleteAllowed = false;\r\n $this->Visible = (CCSecurityAccessCheck(\"1;2\") == \"success\");\r\n if($this->Visible)\r\n {\r\n $this->ReadAllowed = CCUserInGroups(CCGetGroupID(), \"1;2\");\r\n $this->InsertAllowed = CCUserInGroups(CCGetGroupID(), \"1;2\");\r\n $this->ComponentName = \"emails\";\r\n $this->HTMLFormAction = $FileName . \"?\" . CCAddParam(CCGetQueryString(\"QueryString\", \"\"), \"ccsForm\", $this->ComponentName);\r\n $CCSForm = CCGetFromGet(\"ccsForm\", \"\");\r\n $this->FormSubmitted = ($CCSForm == $this->ComponentName);\r\n $Method = $this->FormSubmitted ? ccsPost : ccsGet;\r\n $this->message = new clsControl(ccsTextArea, \"message\", \"Message\", ccsMemo, \"\", CCGetRequestParam(\"message\", $Method));\r\n $this->Insert = new clsButton(\"Insert\");\r\n $this->item_id = new clsControl(ccsHidden, \"item_id\", \"Item Id\", ccsInteger, \"\", CCGetRequestParam(\"item_id\", $Method));\r\n $this->to_user_id = new clsControl(ccsHidden, \"to_user_id\", \"To User Id\", ccsInteger, \"\", CCGetRequestParam(\"to_user_id\", $Method));\r\n $this->from_user_id = new clsControl(ccsHidden, \"from_user_id\", \"From User Id\", ccsInteger, \"\", CCGetRequestParam(\"from_user_id\", $Method));\r\n $this->emaildate = new clsControl(ccsHidden, \"emaildate\", \"date\", ccsInteger, \"\", CCGetRequestParam(\"emaildate\", $Method));\r\n $this->subject = new clsControl(ccsHidden, \"subject\", \"Subject\", ccsText, \"\", CCGetRequestParam(\"subject\", $Method));\r\n if(!$this->FormSubmitted) {\r\n if(!strlen($this->from_user_id->GetValue()))\r\n $this->from_user_id->SetValue(CCGetUserID());\r\n if(!strlen($this->emaildate->GetValue()))\r\n $this->emaildate->SetValue(time());\r\n }\r\n }\r\n }",
"function envoyer_inscription_mail($values)\n{\n\t$mot = $GLOBALS['mot'];\n\t$phrase = $GLOBALS['phrase'];\n\t$val = FALSE;\n\t\n\t$contenu = array(\t$mot['Cabinet'] => $values['Cabinet'],\n\t\t\t\t\t\t$mot['Nom'] => $values['Nom'],\n\t\t\t\t\t\t$mot['Prenom'] => $values['Prenom'],\n\t\t\t\t\t\t$mot['Adresse'] => $values['Adresse'],\n\t\t\t\t\t\t$mot['CP'] => $values['CP'],\n\t\t\t\t\t\t$mot['Ville'] => $values['Ville'],\n\t\t\t\t\t\t$mot['Tel'] => $values['Tel'],\n\t\t\t\t\t\t$mot['Email'] => $values['Email'],\n\t\t\t\t\t\t$mot['Commentaire'] => $values['Commentaire'] );\n\t$contenu_message = corps_email($contenu);\n\t\n\t// Si le message a bien été envoyé, on affiche un message de validation\n\t// et on enregistre le message dans la base de données\n\tif (envoi_email(EMAIL_ADMIN, NOM_SITE, EMAIL, $values['Email'], $phrase['UneNouvelleInscription'], $contenu_message) == TRUE)\n\t{\n\t\tif (ajouter_inscription_db($values) == TRUE)\n\t\t{\n\t\t\t$val = TRUE;\n\t\t}\n\t}\n\treturn $val;\n}",
"protected function process_mailtemplate()\n {\n $l_gets = $this->m_modreq->get_gets();\n $l_posts = $this->m_modreq->get_posts();\n\n $l_id = isys_glob_which_isset($l_gets[C__GET__ID], $l_posts[C__GET__ID]);\n $l_navmode = isys_glob_which_isset($l_gets[C__GET__NAVMODE], $l_posts[C__GET__NAVMODE]);\n\n // This will happen, if a user uses the checkboxes and the \"edit\" buttno.\n if (is_array($l_id))\n {\n $l_id = $l_id[0];\n } // if\n\n if (!$l_navmode && $l_id > 0)\n {\n $l_navmode = C__NAVMODE__EDIT;\n } // if\n\n switch ($l_navmode)\n {\n default:\n $this->process_mailtemplate__list();\n break;\n\n case C__NAVMODE__EDIT:\n $this->process_mailtemplate__edit($l_id);\n break;\n\n case C__NAVMODE__NEW:\n $this->process_mailtemplate__edit();\n break;\n\n case C__NAVMODE__SAVE:\n $this->process_mailtemplate__edit($this->process_mailtemplate__save($l_posts));\n break;\n\n case C__NAVMODE__DELETE:\n $this->process_mailtemplate__delete(isys_glob_which_isset($l_gets[C__GET__ID], $l_posts[C__GET__ID]));\n $this->process_mailtemplate__list();\n break;\n } // switch\n\n $this->m_tpl->smarty_tom_add_rule('tom.content.navbar.cRecStatus.p_bInvisible=1');\n }",
"function testMailingMethod() {\n \t\tAngieApplication::mailer()->setDefaultMailingMethod(AngieMailerDelegate::SEND_HOURLY);\n \t\t\n \t $anon = new AnonymousUser('Anon', '[email protected]');\n \t $user = Users::findById(1);\n \t \n \t $this->assertEqual($anon->getMailingMethod(), AngieMailerDelegate::SEND_HOURLY, 'Anonymous users always use default mailing method');\n \t $this->assertEqual($user->getMailingMethod(), AngieMailerDelegate::SEND_HOURLY, 'User that do not have default value overriden use default mailing method');\n\n \t $user = Users::findById(1);\n \t $user->setMailingMethod(AngieMailerDelegate::SEND_IN_BACKGROUD);\n \t \n \t $this->assertEqual($user->getMailingMethod(), AngieMailerDelegate::SEND_IN_BACKGROUD, 'Test mailing method set');\n \t \n \t $user = Users::findById(1);\n \t $this->assertEqual($user->getMailingMethod(), AngieMailerDelegate::SEND_IN_BACKGROUD, 'Making sure that mailing method is permanently saved for this user');\n \t}",
"function sendMail($to,$sub,$msg){\n $msg = wordwrap($msg,70);\n $headers = 'MIME-Version: 1.0' . \"\\r\\n\";\n $headers .= 'From: Convolution 2017<[email protected]>' . \"\\r\\n\";\n $headers .= 'Content-type: text/html; charset=iso-8859-1' . \"\\r\\n\";\n mail($to,$sub,$msg,$headers);\n}",
"function Form_Mail()\n {\n /**\n * Form_Mail();\n */\n\n $this->referers_array = array($_SERVER[\"HTTP_HOST\"]);\n /**\n * Leave AS IS to only allow posting from same host that script resides on.\n * List individual hosts to create list of hosts that can post to this script:\n * EXAMPLE: $referer_array = array ('example.com','www.example.com','192.168.0.1');\n */\n\n /* proccess form */\n $this->set_arrays();\n $this->check_referer();\n $this->check_recipient();\n $this->check_required_fields();\n $this->send_form();\n $this->display_thankyou();\n }",
"function smtpmailer($para, $de, $de_nome, $assunto, $corpo) { \r\n\tglobal $error;\r\n\t$mail = new PHPMailer();\r\n\t$mail->IsSMTP();\t\t// Ativar SMTP\r\n\t$mail->SMTPDebug = 0;\t\t// Debugar: 1 = erros e mensagens, 2 = mensagens apenas\r\n\t$mail->SMTPAuth = true;\t\t// Autenticação ativada\r\n\t$mail->SMTPSecure = 'tls';\t// SSL REQUERIDO pelo GMail\r\n\t$mail->Host = 'smtp.ufop.br';\t// SMTP utilizado\r\n\t$mail->Port = 25; \t\t// A porta 587 deverá estar aberta em seu servidor\r\n\t$mail->Username = GUSER;\r\n\t$mail->Password = GPWD;\r\n\t$mail->SetFrom($de, $de_nome);\r\n\t$mail->Subject = $assunto;\r\n\t$mail->Body = $corpo;\r\n\t$mail->AddAddress($para);\r\n\tif(!$mail->Send()) {\r\n\t\t$error = 'Mail error: '.$mail->ErrorInfo; \r\n\t\treturn false;\r\n\t} else {\r\n\t\t$error = 'Mensagem enviada!';\r\n\t\treturn true;\r\n\t}\r\n}",
"protected function sendTestMail() {}",
"function send_email($email, $subject, $msg, $headers){\r\n $mail = new PHPMailer(true);\r\n try{\r\n $mail->setLanguage('pl', './vendor/phpmailer/phpmailer/language');\r\n $mail->isSMTP();\r\n $mail->Host = Config::SMTP_HOST;\r\n $mail->SMTPAuth = true;\r\n $mail->Username = Config::SMTP_USER;\r\n $mail->Password = Config::SMTP_PASSWORD;\r\n $mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS;\r\n $mail->Port = Config::SMTP_PORT;\r\n $mail->isHTML(true);\r\n $mail->CharSet = 'utf-8';\r\n\r\n $email->setFrom($headers);\r\n $email->addAddress($email);\r\n\r\n $mail->Subject = $subject;\r\n $mail->Body = $msg;\r\n $mail->AltBody = $msg;\r\n\r\n $mail->send();\r\n } catch (Exception $e){\r\n echo validation_errors(\"Message could not be sent. Mailer Error: {$mail->ErrorInfo}\");\r\n return false;\r\n }\r\n return true;\r\n}",
"function my_email_content_type() \n{\n\treturn \"text/html\";\n}",
"function sendmail()\n\t{\n\t\tglobal $mainframe, $Itemid;\n\n\t\t/*\n\t\t * Initialize some variables\n\t\t */\n\t\t$db = & $mainframe->getDBO();\n\n\t\t$SiteName \t= $mainframe->getCfg('sitename');\n\t\t$MailFrom \t= $mainframe->getCfg('mailfrom');\n\t\t$FromName \t= $mainframe->getCfg('fromname');\n\t\t$validate \t= mosHash( $mainframe->getCfg('db') );\n\n\t\t$default \t= sprintf(JText::_('MAILENQUIRY'), $SiteName);\n\t\t$option \t= JRequest::getVar('option');\n\t\t$contactId \t= JRequest::getVar('con_id');\n\t\t$validate \t= JRequest::getVar($validate, \t\t0, \t\t\t'post');\n\t\t$email \t\t= JRequest::getVar('email', \t\t'', \t\t'post');\n\t\t$text \t\t= JRequest::getVar('text', \t\t\t'', \t\t'post');\n\t\t$name \t\t= JRequest::getVar('name', \t\t\t'', \t\t'post');\n\t\t$subject \t= JRequest::getVar('subject', \t\t$default, \t'post');\n\t\t$emailCopy \t= JRequest::getVar('email_copy', \t0, \t\t\t'post');\n\n\t\t// probably a spoofing attack\n\t\tif (!$validate) {\n\t\t\tmosErrorAlert( _NOT_AUTH );\n\t\t}\n\n\t\t/*\n\t\t * This obviously won't catch all attempts, but it does not hurt to make\n\t\t * sure the request came from a client with a user agent string.\n\t\t */\n\t\tif (!isset ($_SERVER['HTTP_USER_AGENT'])) {\n\t\t\tmosErrorAlert( _NOT_AUTH );\n\t\t}\n\n\t\t/*\n\t\t * This obviously won't catch all attempts either, but we ought to check\n\t\t * to make sure that the request was posted as well.\n\t\t */\n\t\tif (!$_SERVER['REQUEST_METHOD'] == 'POST') {\n\t\t\tmosErrorAlert( _NOT_AUTH );\n\t\t}\n\n\t\t// An array of e-mail headers we do not want to allow as input\n\t\t$headers = array ('Content-Type:',\n\t\t\t\t\t\t 'MIME-Version:',\n\t\t\t\t\t\t 'Content-Transfer-Encoding:',\n\t\t\t\t\t\t 'bcc:',\n\t\t\t\t\t\t 'cc:');\n\n\t\t// An array of the input fields to scan for injected headers\n\t\t$fields = array ('email',\n\t\t\t\t\t\t 'text',\n\t\t\t\t\t\t 'name',\n\t\t\t\t\t\t 'subject',\n\t\t\t\t\t\t 'email_copy');\n\n\t\t/*\n\t\t * Here is the meat and potatoes of the header injection test. We\n\t\t * iterate over the array of form input and check for header strings.\n\t\t * If we fine one, send an unauthorized header and die.\n\t\t */\n\t\tforeach ($fields as $field) {\n\t\t\tforeach ($headers as $header) {\n\t\t\t\tif (strpos($_POST[$field], $header) !== false) {\n\t\t\t\t\tmosErrorAlert( _NOT_AUTH );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/*\n\t\t * Now that we have passed the header injection tests lets free up the\n\t\t * used memory and continue.\n\t\t */\n\t\tunset ($fields, $field, $headers, $header);\n\n\t\t/*\n\t\t * Load the contact details\n\t\t */\n\t\t$contact = new JTableContact($db);\n\t\t$contact->load($contactId);\n\n\t\t/*\n\t\t * If there is no valid email address or message body then we throw an\n\t\t * error and return false.\n\t\t */\n\t\tjimport('joomla.utilities.mail');\n\t\tif (!$email || !$text || (JMailHelper::isEmailAddress($email) == false)) {\n\t\t\tJContactView::emailError();\n\t\t} else {\n\t\t\t$menu = JTable::getInstance( 'menu', $db );\n\t\t\t$menu->load( $Itemid );\n\t\t\t$mparams = new JParameter( $menu->params );\n\t\t\t$bannedEmail \t= $mparams->get( 'bannedEmail', \t'' );\n\t\t\t$bannedSubject \t= $mparams->get( 'bannedSubject', \t'' );\n\t\t\t$bannedText \t= $mparams->get( 'bannedText', \t\t'' );\n\t\t\t$sessionCheck \t= $mparams->get( 'sessionCheck', \t1 );\n\n\t\t\t// check for session cookie\n\t\t\tif ( $sessionCheck ) {\n\t\t\t\tif ( !isset($_COOKIE[JSession::name()]) ) {\n\t\t\t\t\tmosErrorAlert( _NOT_AUTH );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Prevent form submission if one of the banned text is discovered in the email field\n\t\t\tif ( $bannedEmail ) {\n\t\t\t\t$bannedEmail = explode( ';', $bannedEmail );\n\t\t\t\tforeach ($bannedEmail as $value) {\n\t\t\t\t\tif ( JString::stristr($email, $value) ) {\n\t\t\t\t\t\tmosErrorAlert( _NOT_AUTH );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Prevent form submission if one of the banned text is discovered in the subject field\n\t\t\tif ( $bannedSubject ) {\n\t\t\t\t$bannedSubject = explode( ';', $bannedSubject );\n\t\t\t\tforeach ($bannedSubject as $value) {\n\t\t\t\t\tif ( JString::stristr($subject, $value) ) {\n\t\t\t\t\t\tmosErrorAlert( _NOT_AUTH );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Prevent form submission if one of the banned text is discovered in the text field\n\t\t\tif ( $bannedText ) {\n\t\t\t\t$bannedText = explode( ';', $bannedText );\n\t\t\t\tforeach ($bannedText as $value) {\n\t\t\t\t\tif ( JString::stristr($text, $value) ) {\n\t\t\t\t\t\tmosErrorAlert( _NOT_AUTH );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// test to ensure that only one email address is entered\n\t\t\t$check = explode( '@', $email );\n\t\t\tif ( strpos( $email, ';' ) || strpos( $email, ',' ) || strpos( $email, ' ' ) || count( $check ) > 2 ) {\n\t\t\t\tmosErrorAlert( JText::_( 'You cannot enter more than one email address', true ) );\n\t\t\t}\n\n\t\t\t/*\n\t\t\t * Prepare email body\n\t\t\t */\n\t\t\t$prefix = sprintf(JText::_('ENQUIRY_TEXT'), $mainframe->getBaseURL());\n\t\t\t$text \t= $prefix.\"\\n\".$name.' <'.$email.'>'.\"\\r\\n\\r\\n\".stripslashes($text);\n\n\t\t\t// Send mail\n\t\t\tjosMail($email, $name, $contact->email_to, $FromName.': '.$subject, $text);\n\n\t\t\t/*\n\t\t\t * If we are supposed to copy the admin, do so.\n\t\t\t */\n\t\t\t// parameter check\n\t\t\t$menuParams \t\t= new JParameter( $contact->params );\n\t\t\t$emailcopyCheck = $menuParams->get( 'email_copy', 0 );\n\n\t\t\t// check whether email copy function activated\n\t\t\tif ( $emailCopy && $emailcopyCheck ) {\n\t\t\t\t$copyText \t\t= sprintf(JText::_('Copy of:'), $contact->name, $SiteName);\n\t\t\t\t$copyText \t\t.= \"\\r\\n\\r\\n\".$text;\n\t\t\t\t$copySubject \t= JText::_('Copy of:').\" \".$subject;\n\t\t\t\tjosMail($MailFrom, $FromName, $email, $copySubject, $copyText);\n\t\t\t}\n\n\t\t\t$link = sefRelToAbs( 'index.php?option=com_contact&task=view&contact_id='. $contactId .'&Itemid='. $Itemid );\n\t\t\t$text = JText::_( 'Thank you for your e-mail', true );\n\n\t\t\tjosRedirect( $link, $text );\n\t\t}\n\t}",
"function notification()\n{\n\n $correo = isset($_POST['correo'])?$_POST['correo']:'';\n $name = isset($_POST['fullname'])?$_POST['fullname']:'';\n $usuario = isset($_POST['usuario'])?$_POST['usuario']:'';\n $clave = isset($_POST['clave'])?$_POST['clave']:'';\n $sendmail= isset($_POST['sendmail'])?$_POST['sendmail']:'';\n if(false == empty($clave) && ($sendmail == 'Y')){\n \n $mail = new Zend_Mail('UTF-8');\n $mail->setBodyText(\"Sr(a) {$name}, esta es su información de ingreso para el sistema Enlazamundos\\r\\n\\r\\nUsuario:{$usuario}\\r\\nClave:{$clave}\");\n $mail->setFrom('[email protected] ', 'Programa Enlazamundos');\n $mail->addTo($correo);\n $mail->setSubject('Confirmación de registro Enlazamundos');\n $mail->send();\n return;\n }\n}",
"public function doExchangeMail($message=\"\",$subject=\"New Pay.nl action\",$extraTarget=\"\")\r\n {\r\n $default = \"Dear sir/madam,\\nA payment has been completed for #paymentSessionId#.\\nThe order number for this was: #object#.\\nAmount paid: #amount# EUR.\\n\\nKind regards,\\nExchange script\";\r\n \r\n if (strlen($message)>1)\r\n {\r\n $default = $message;\r\n }\r\n \r\n // Replace vars\r\n $message = $this->replaceVars($default);\r\n \r\n if (strlen($extraTarget) > 0)\r\n {\r\n mail($extraTarget,$subject,$message);\r\n }\r\n else\r\n {\r\n foreach($this->exchangeEmail as $email)\r\n {\r\n mail($email,$subject,$message);\r\n }\r\n }\r\n return true;\r\n \r\n }",
"function bodyContent($type_suffix)\n\t{\n\t\t$temp_layout = $this->controller->layout; // store the current controller layout\n\t\n\t\tif ($type_suffix == 'html')\n\t\t\t $this->controller->layout = '..'.DS.'email';\n\t\telse\n\t\t\t $this->controller->layout = '';\n\t\n\t\t$mail = $this->controller->render($this->templateLocation('_'.strtolower($type_suffix)));\n\t\t// render() automatically adds to the controller->output, we'll remove it\n\t\t$this->controller->output = str_replace($mail, '', $this->controller->output);\n\t\n\t\t$this->controller->layout = $temp_layout; // restore the controller layout\n\t\treturn $mail;\n\t}",
"function mymail($to, $title, $body, $from = '') {\n\n $controlquery = doquery(\"SELECT * FROM {{table}} WHERE id='1' LIMIT 1\", \"control\");\n $controlrow = mysql_fetch_array($controlquery);\n extract($controlrow);\n \n\n $from = trim($from);\n\n if (!$from) {\n $from = '<'.$controlrow[\"adminemail\"].'>';\n }\n\n $rp = $controlrow[\"adminemail\"];\n $org = '$gameurl';\n $mailer = 'PHP';\n\n $head = '';\n $head .= \"Content-Type: text/plain \\r\\n\";\n $head .= \"Date: \". date('r'). \" \\r\\n\";\n $head .= \"Return-Path: $rp \\r\\n\";\n $head .= \"From: $from \\r\\n\";\n $head .= \"Sender: $from \\r\\n\";\n $head .= \"Reply-To: $from \\r\\n\";\n $head .= \"Organization: $org \\r\\n\";\n $head .= \"X-Sender: $from \\r\\n\";\n $head .= \"X-Priority: 3 \\r\\n\";\n $head .= \"X-Mailer: $mailer \\r\\n\";\n\n $body = str_replace(\"\\r\\n\", \"\\n\", $body);\n $body = str_replace(\"\\n\", \"\\r\\n\", $body);\n\n return mail($to, $title, $body, $head);\n \n}"
]
| [
"0.7173656",
"0.65818036",
"0.64879495",
"0.6190785",
"0.61454004",
"0.6142069",
"0.61419994",
"0.6130666",
"0.6129019",
"0.61036426",
"0.61034304",
"0.60917425",
"0.60851157",
"0.6070738",
"0.6050345",
"0.60500216",
"0.6038944",
"0.6026097",
"0.6019646",
"0.5996077",
"0.59826034",
"0.5982584",
"0.59819305",
"0.5974633",
"0.5972017",
"0.596999",
"0.59644234",
"0.59582597",
"0.5955943",
"0.594632",
"0.5926778",
"0.5924799",
"0.5922805",
"0.58838576",
"0.58747846",
"0.5870725",
"0.58699465",
"0.586824",
"0.5865489",
"0.5860727",
"0.5831392",
"0.58296824",
"0.582772",
"0.5820543",
"0.58131814",
"0.58055294",
"0.5803921",
"0.57921624",
"0.5786751",
"0.5782294",
"0.57811433",
"0.5771642",
"0.5769632",
"0.5765606",
"0.5761296",
"0.5760706",
"0.57571644",
"0.5746676",
"0.57464856",
"0.57298523",
"0.57297736",
"0.5724158",
"0.5721353",
"0.5716836",
"0.5702629",
"0.56985956",
"0.56943315",
"0.56934154",
"0.5688745",
"0.5686212",
"0.5682971",
"0.5672994",
"0.5664391",
"0.5663136",
"0.5659101",
"0.5657749",
"0.56572706",
"0.5657027",
"0.56553066",
"0.56537676",
"0.5652214",
"0.5644092",
"0.56376463",
"0.5637582",
"0.5629272",
"0.56286097",
"0.5628244",
"0.5622226",
"0.56197536",
"0.5617193",
"0.5611644",
"0.56062526",
"0.5601013",
"0.5597956",
"0.5597312",
"0.5594006",
"0.5591407",
"0.5589538",
"0.5585543",
"0.5581355",
"0.55805135"
]
| 0.0 | -1 |
abstract to be overidden by lang specific mail class, if needed | function encodeSubject($text)
{
return $text;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract protected function _sendMail ( );",
"public function createMailMessage();",
"function EMAIL_tc($e_to,$e_to_name,$e_subject,$e_in_subject,$e_body){\n\t\t\t\t\t$transport = Swift_MailTransport::newInstance();\n\t\t\t\t\t\n\t\t\t\t\t// Create the message\n\t\t\t\t\t$message = Swift_Message::newInstance();\n\t\t\t\t\t$message->setTo(array(\n\t\t\t\t\t $e_to => $e_to_name\n\t\t\t\t\t));\n\t\t\t\t\t$message->setSubject($e_subject . \" - UnitedGaming\");\n\t\t\t\t\t\n\t\t\t\t\t$message->setBody(\n\t\t\t\t\t'<html>\n\t\t\t\t\t<link href=\\'http://fonts.googleapis.com/css?family=Source+Sans+Pro\\' rel=\\'stylesheet\\' type=\\'text/css\\'>\n\t\t\t\t\t<table border=\"0\" align=\"center\" width=\"99%\">\n\t\t\t\t\t<tr>\n\t\t\t\t\t<td><a href=\"http://unitedgaming.org\" target=\"_blank\" title=\"UnitedGaming\" alt=\"UnitedGaming\"><img src=\"http://unitedgaming.org/mainlogo.png\" alt=\"UnitedGaming\" border=\"0\"/></td>\n\t\t\t\t\t<td><span style=\"font-family: \\'Source Sans Pro\\', sans-serif;\"><font size=\"6px\" color=\"#BD3538\">'.$e_in_subject.'</font></span></td>\n\t\t\t\t\t</tr>' \n\t\t\t\t\t.\n\t\t\t\t\t'<br/><br /><br/><tr>\n\t\t\t\t\t<td colspan=\"2\"><font size=\"3px\" color=\"#303030\">'.$e_body.'\n\t\t\t\t\t </td></tr><tr><td><br/><span style=\"font-family: \\'Source Sans Pro\\', sans-serif;\"><font size=\"2px\">Kind Regards,<br/>Chuevo</font></span></td><td></td></tr></table></html>\n\t\t\t\t\t ');\n\t\t\t\t\t$message->setFrom(\"[email protected]\", \"UnitedGaming\");\n\t\t\t\t\t$type = $message->getHeaders()->get('Content-Type');\n\t\t\n\t\t\t\t\t$type->setValue('text/html');\n\t\t\t\t\t$type->setParameter('charset', 'utf-8');\n\t\t\t\t\t\n\t\t\t\t\t//echo $type->toString();\n\t\t\t\t\t\n\t\t\t\t\t/*\n\t\t\t\t\t\n\t\t\t\t\tContent-Type: text/html; charset=utf-8\n\t\t\t\t\t\n\t\t\t\t\t*/\n\t\t\t\t\t// Send the email\n\t\t\t\t\t$mailer = Swift_Mailer::newInstance($transport);\n\t\t\t\t\t$mailer->send($message);\n\t\t}",
"public function __construct($type)\n\t{\n\t\tif(!$type){\n\t\t\t return response(array('error'=>true , 'success'=>false , 'message'=>'Please Define Type of Email'),400);\n\t\t}\n\t\t$this->type = $type;\n\n\t\t$mailSubject = '';\n\t\t/*$mailContent = '<div style=\\'font-size: 14px; padding: 10px 15px; background-image: initial; background-attachment: initial;background-color: #1CAF9A; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;\\'>\n\t\t<div style=\\'width:63%;display:inline-block;font-size: 19px;color: #FFF;\\'>Dear {user_name}</div>\n\t\t</div>\n\n\t\t<div style=\\'font-size: 14px; padding: 15px 10px; line-height: 20px; color: rgb(66, 65, 67); background-image: initial; background-attachment: initial; background-color: rgb(255, 255, 255); background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;\\'>\n\t\t<p>{message}</p>\n\t\t<p> </p>\n\t\t</div>';*/\n\n\t\t$mailContent = '<table>\n\t\t\t\t\t\t\t<tbody>\n\t\t\t\t\t\t\t\t<tr style=\"\tfloat: left; width: 100%; background: #ffffff; margin-bottom:15px;\">\n\t\t\t\t\t\t\t\t\t<td style=\"float: left; width: 96%; padding-left:20px; text-align: left; font-size: 26px; color: #343538; margin: 40px 0px 20px 0px;\">Hi, <span style=\"font-weight: bold;\">{user_name}</span></td>\n\t\t\t\t\t\t\t\t\t<td style=\"float: left; width: 96%; padding-left:20px; text-align: left; font-size: 16px; color: #474747; line-height: 22px; margin-bottom: 20px;\">{subject}</td>\n\t\t\t\t\t\t\t\t\t<td style=\"float: left; width: 96%; padding-left:20px; text-align: left; font-size: 16px; color: #474747; line-height: 22px; margin-bottom: 40px;\">{message}</td>\n\t\t\t\t\t\t\t\t</tr>\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t</tbody>\n\t\t\t\t\t\t</table>';\n\t\t\n\t\tif($type != 'customtemplate'){\n\t\t\t$this->template = EmailTemplate::find($type);\n\n\t\t\t$mailSubject = $this->template->subject;\n\t\t\t$mailContent = $this->template->content;\n\t\t}\n\t\t\n\n\t\t$settings = DB::collection('settings')->whereIn('_id',['general','social','email'])->get();\n\t\t$config = array();\n\n\t\tforeach($settings as $setting){\n\t\t\t$config[$setting['_id']] = $setting['settings'];\n\t\t}\n\n\t\t$siteUrl = url();\n\n\t\t$this->recipient_info = array(\n\n\t\t\t'sender' => array(\n\t\t\t\t'name' =>$config['general']['site_title']['value'],\n\t\t\t\t'email' =>$config['email']['default']['email']\n\t\t\t),\n\t\t\t'receiver' => array(\n\t\t\t\t'name' =>'',\n\t\t\t\t'email' =>''\n\t\t\t),\n\t\t\t'subject' => $mailSubject,\n\t\t\t'replace' => array(\n\t\t\t\t'{website_link}' => $siteUrl,\t\t\t\t\n\t\t\t\t'{site_title}' => $config['general']['site_title']['value'],\n\t\t\t\t'{link_login}' => $siteUrl.'/login',\n\t\t\t\t'{link_privacy}' => $siteUrl.'/privacy-policy',\t\t\t\t\n\t\t\t\t'{link_contact}' => $siteUrl.'/contact-us',\n\t\t\t\t'{social_facebook}' => $config['social']['facebook']['value'],\n\t\t\t\t'{social_twitter}' => $config['social']['twitter']['value'],\n\t\t\t\t'{copyright_year}' => date('Y')\n\t\t\t),\n\t\t\t'message' => $mailContent\n\t\t);\n\n\t}",
"function eMail($string) {\n\n\n\t\t}",
"abstract public function get_mailto();",
"function m_dspemails()\n\t{\n\t\t$this->ObTpl=new template();\n\t\t$this->ObTpl->set_file(\"TPL_EMAIL_FILE\",$this->emailTemplate);\n\n\t\t#SETTING ALL TEMPLATE BLOCKS\n\t\t$this->ObTpl->set_block(\"TPL_EMAIL_FILE\",\"TPL_EMAIL_BLK\", \"email_blk\");\n\t\t$this->ObTpl->set_block(\"TPL_EMAIL_FILE\",\"TPL_MESSAGE_BLK\", \"message_blk\");\n\t\t$this->ObTpl->set_block(\"TPL_EMAIL_FILE\",\"TPL_MSG_BLK1\", \"msg_blk1\");\n\n\t\t#SETTING TEMPLATE VARIABLE\n\t\t$this->ObTpl->set_var(\"GRAPHICSMAINPATH\",GRAPHICS_PATH);\t\n\t\t$this->ObTpl->set_var(\"TPL_VAR_SALESURL\",SITE_URL.\"sales/\");\n\n\t\t#INTAILIZING ***\n\t\t$this->ObTpl->set_var(\"email_blk\",\"\");\t\n\t\t$this->ObTpl->set_var(\"message_blk\",\"\");\t\n\t\t$this->ObTpl->set_var(\"msg_blk1\",\"\");\t\n\t\t$this->ObTpl->set_var(\"msg_blk2\",\"\");\t\n\n\t\t$this->request['msg']=$this->libFunc->ifSet($this->request,\"msg\");\n\t\t$this->ObTpl->set_var(\"TPL_VAR_MESSAGE\",\"\");\n\n\t\t#DATABASE QUERY\n\t\t$this->obDb->query = \"SELECT * FROM \".EMAILS;\n\t\t$queryResult = $this->obDb->fetchQuery();\n\t\t$campaigncount = $this->obDb->record_count;\n\t\tif($this->request['msg']==1)\n\t\t{\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_MSG\",MSG_EMAIL_INSERTED);\n\t\t\t$this->ObTpl->parse(\"msg_blk1\",\"TPL_MSG_BLK1\");\n\t\t\t$this->ObTpl->parse(\"msg_blk2\",\"TPL_MSG_BLK2\");\n\t\t}\n\t\telseif($this->request['msg']==3)\n\t\t{\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_MSG\",MSG_EMAIL_DELETED);\n\t\t\t$this->ObTpl->parse(\"msg_blk1\",\"TPL_MSG_BLK1\");\n\t\t\t$this->ObTpl->parse(\"msg_blk2\",\"TPL_MSG_BLK2\");\n\t\t}\n\t\telseif($this->request['msg']==5)\n\t\t{\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_MSG\",MSG_EMAIL_SENT);\n\t\t\t$this->ObTpl->parse(\"msg_blk1\",\"TPL_MSG_BLK1\");\n\t\t\t$this->ObTpl->parse(\"msg_blk2\",\"TPL_MSG_BLK2\");\n\t\t}\n\n\t\tif($campaigncount>0)\n\t\t{\n\t\t\t#PARSING DISCOUNT BLOCK\n\t\t\tfor($j=0;$j<$campaigncount;$j++)\n\t\t\t{\t\t\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_ID\",$queryResult[$j]->iMailid_PK);\n\t\t\t\tif ($queryResult[$j]->vUserList==\"All\"){\n $this->obDb->query = \"SELECT count(*) as cnt FROM \".CUSTOMERS.\" WHERE iStatus=1 AND iMailList !=0\";\n }else{ \n $this->obDb->query = \"SELECT count(*) as cnt FROM \".LEADLIST.\" WHERE iLeadId_FK='\". $queryResult[$j]->vUserList.\"'\";\n }\n\t\t\t\t$qryRs = $this->obDb->fetchQuery();\n\t\t\t\t\n\t\t\t\tif ($queryResult[$j]->vVisitorList==\"1\"){\n $this->obDb->query = \"SELECT count(*) as cnt FROM \".NEWSLETTERS;\n\t\t\t\t $qryVs = $this->obDb->fetchQuery();\n\t\t\t\t $qryRs[0]->cnt = $qryRs[0]->cnt + $qryVs[0]->cnt;\n }\n\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_USERCOUNT\",$qryRs[0]->cnt);\n \n $this->ObTpl->set_var(\"TPL_VAR_SUBJECT\",$this->libFunc->m_displayContent($queryResult[$j]->vSubject));\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_SID\",$this->libFunc->m_displayContent($queryResult[$j]->vSid));\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_BUILDDATE\",$this->libFunc->dateFormat2($queryResult[$j]->tmBuildDate));\t\n\t\t\t\t$sentDate=$this->libFunc->dateFormat2($queryResult[$j]->tmSentDate);\n\t\t\t\tif(empty($sentDate))\n\t\t\t\t{\t\t\t\t\n\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_SENTDATE\",\"Send now\");\n\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_VIEWLABEL\",\"View/Sent\");\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_SENTDATE\",$sentDate);\n\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_VIEWLABEL\",\"View\");\n\t\t\t\t}\n\t\t\t\t$this->ObTpl->parse(\"email_blk\",\"TPL_EMAIL_BLK\",true);\n\t\t\t}\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_MSG\",$campaigncount.\" records found\");\n\t\t\t$this->ObTpl->parse(\"msg_blk1\",\"TPL_MSG_BLK1\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_MESSAGE\",MSG_NOEMAILS);\n\t\t\t$this->ObTpl->parse(\"message_blk\",\"TPL_MESSAGE_BLK\");\n\t\t}\n\t\n\t\treturn($this->ObTpl->parse(\"return\",\"TPL_EMAIL_FILE\"));\n\t}",
"public function __construct(){\n $this->xMailer = phpversion();\n $this->isHtmlEmail = true; //only HTML emails\n\n //TODO : should be set based on config\n $this->subjectPrefix = '';\n $this->body_header = '';\n $this->body_footer = '';\n\n $this->senderName = OcConfig::getSiteName();\n }",
"function MyApp_Mail_Init()\n {\n if ($this->Mail)\n {\n $this->MailInfo=$this->ReadPHPArray($this->MailSetup);\n $unit=$this->Unit();\n if (!empty($unit[ \"ID\" ]))\n {\n foreach ($this->Unit2MailInfo as $key)\n {\n if (empty($this->MailInfo[ $key ])) { $this->MailInfo[ $key ]=\"\"; }\n \n if (!empty($unit[ $key ]))\n {\n $this->MailInfo[ $key ]=$unit[ $key ];\n }\n }\n }\n $event=array();\n if ($this->CGI_GETint(\"Event\")>0)\n {\n $event=$this->Event();\n }\n\n if (!empty($event[ \"ID\" ]))\n {\n foreach ($this->Event2MailInfo as $key)\n {\n if (empty($this->MailInfo[ $key ])) { $this->MailInfo[ $key ]=\"\"; }\n \n if (!empty($event[ $key ]))\n {\n $this->MailInfo[ $key ]=$event[ $key ];\n }\n }\n }\n }\n }",
"protected function prepare_mail()\n {\n // Subject\n $subject_text = $this->subject;\n $subject = '=?UTF-8?B?' . base64_encode($subject_text) . '?=';\n\n // Message\n $message = ($this->message);\n\n // To\n $to = '';\n\n foreach($this->to as $item){\n if(empty($item[1])){\n $to .= $item[0];\n }else {\n $to .= '=?UTF-8?B?' . base64_encode($item[1]) . '?= <'.$item[0].'>';\n }\n }\n\n // From\n $from = '';\n\n if(empty($this->from[1])){\n $from .= $this->from[0];\n }else {\n $from .= '=?UTF-8?B?' . base64_encode($this->from[1]) . '?= <'.$this->from[0].'>';\n }\n\n // Reply\n $reply = '';\n\n foreach($this->reply as $item){\n if(empty($item[1])){\n $reply .= $item[0];\n }else {\n $reply .= '=?UTF-8?B?' . base64_encode($item[1]) . '?= <'.$item[0].'>';\n }\n }\n\n if(!empty($reply)){\n $header_reply = 'Reply-To: ' . $reply . \"\\r\\n\"; // Reply-To\n }else{\n $header_reply='';\n }\n\n // CC\n $cc = '';\n\n foreach($this->cc as $item){\n if(empty($item[1])){\n $cc .= $item[0];\n }else {\n $cc .= '=?UTF-8?B?' . base64_encode($item[1]) . '?= <'.$item[0].'>';\n }\n }\n\n if(!empty($cc)){\n $header_cc = 'Cc: ' . $cc . \"\\r\\n\"; // Cc\n }else{\n $header_cc='';\n }\n\n // BCC\n $bcc = '';\n\n foreach($this->bcc as $item){\n if(empty($item[1])){\n $bcc .= $item[0];\n }else {\n $bcc .= '=?UTF-8?B?' . base64_encode($item[1]) . '?= <'.$item[0].'>';\n }\n }\n\n if(!empty($cc)){\n $header_bcc = 'Bcc: ' . $bcc . \"\\r\\n\"; // Bcc\n }else{\n $header_bcc = '';\n }\n\n // Type\n if($this->isHtml){\n $type = \"text/html\";\n }else{\n $type = \"text/plain\";\n }\n\n // Headers\n $headers = '';\n $headers .= 'From: ' . $from . \"\\r\\n\"; // From\n $headers .= 'MIME-Version: 1.0' . \"\\r\\n\"; // MIME\n $headers .= $header_reply; // Reply-To\n $headers .= $header_cc; // CC\n $headers .= $header_bcc; // BCC\n $headers .= 'X-Mailer: PHP/' . phpversion(); // Mailer\n\n // Attachments \n $files = $this->attachment; \n\n // Boundary \n $semi_rand = md5(time()); \n $mime_boundary = \"==Multipart_Boundary_x{$semi_rand}x\"; \n \n // Headers for attachment \n $headers .= \"\\nContent-Type: multipart/mixed;\\n\" . \" boundary=\\\"{$mime_boundary}\\\"\"; \n \n // Multipart boundary \n $message = \"--{$mime_boundary}\\n\" . \"Content-Type: $type; charset=\\\"UTF-8\\\"\\n\" . \n \"Content-Transfer-Encoding: 7bit\\n\\n\" . $message . \"\\n\\n\"; \n \n // Preparing attachment \n if(!empty($files)){ \n for($i=0;$i<count($files);$i++){ \n if(is_file($files[$i])){ \n $file_name = basename($files[$i]); \n $file_size = filesize($files[$i]); \n \n $message .= \"--{$mime_boundary}\\n\"; \n $fp = @fopen($files[$i], \"rb\"); \n $data = @fread($fp, $file_size); \n @fclose($fp); \n $data = chunk_split(base64_encode($data)); \n $message .= \"Content-Type: application/octet-stream; name=\\\"\".$file_name.\"\\\"\\n\" . \n \"Content-Description: \".$file_name.\"\\n\" . \n \"Content-Disposition: attachment;\\n\" . \" filename=\\\"\".$file_name.\"\\\"; size=\".$file_size.\";\\n\" . \n \"Content-Transfer-Encoding: base64\\n\\n\" . $data . \"\\n\\n\"; \n } \n } \n } \n \n $message .= \"--{$mime_boundary}--\"; \n\n return compact(\"subject\", \"message\", \"to\", \"headers\");\n }",
"function send_mime_mail(\r\n\t$name_from, // имя отправителя\r\n\t$email_from, // email отправителя\r\n\t$name_to, // имя получателя\r\n\t$email_to, // email получателя\r\n\t$data_charset, // кодировка переданных данных\r\n\t$send_charset, // кодировка письма\r\n\t$subject, // тема письма\r\n\t$body // текст письма\r\n\t) {\r\n\t\r\n\t$email_to = explode(',', trim(trim($email_to),','));\r\n\r\n\tforeach($email_to as $email)\r\n\t{\r\n\t\t$emails[] = mime_header_encode($name_to, $data_charset, $send_charset) . ' <' . trim($email) . '>';\r\n\t}\r\n\t$to = implode(',', $emails);\r\n\t\r\n\t$subject = mime_header_encode($subject, $data_charset, $send_charset);\r\n\t$from = mime_header_encode($name_from, $data_charset, $send_charset) .' <' . $email_from . '>';\r\n\t\r\n\tif($data_charset != $send_charset) {\r\n\t\t$body = iconv($data_charset, $send_charset, $body);\r\n\t}\r\n\t\r\n\t$headers = \"From: $from\\r\\n\";\r\n\t$headers .= \"Content-type: text/html; charset=$send_charset\\r\\n\";\r\n\t$headers .= \"Mime-Version: 1.0\\r\\n\";\r\n\t\r\n\treturn mail($to, $subject, $body, $headers);\r\n}",
"function sendMail($title, $message, $to, $to_name, $from, $from_name) {\n if (filter_var($to, FILTER_VALIDATE_EMAIL)) {\n saveToLogFile(getLogFileName(), \"Skickar email: \" . $title . \", till: $to \", 'INFO');\n\n /*\n $headers = 'To: ' . $to_name . ' <' . $to . '>' . \"\\r\\n\";\n $headers .= 'From: ' . $from_name . ' <' . $from . '>' . \"\\r\\n\";\n $headers .= 'MIME-Version: 1.0' . \"\\r\\n\";\n $headers .= 'Content-type: text/html; charset=ISO-8859-1' . \"\\r\\n\";\n\n $title_latin = utf8_decode($title);\n $message_latin = utf8_decode($message);\n $headers_latin = utf8_decode($headers);\n $to_latin = utf8_decode($to);\n\n $success = mail($to_latin, $title_latin, $message_latin, $headers_latin);\n */\n\n $headers = 'To: ' . $to_name . ' <' . $to . '>' . \"\\r\\n\";\n $headers .= 'From: ' . $from_name . ' <' . $from . '>' . \"\\r\\n\";\n $headers .= 'MIME-Version: 1.0' . \"\\r\\n\";\n $headers .= 'Content-type: text/html; charset=utf-8' . \"\\r\\n\";\n $success = mail($to, $title, $message, $headers);\n } else {\n $success = false;\n }\n if (!$success) {\n saveToLogFile(getLogFileName(), \"Misslyckades att skicka email: \" . $title . \", till: $to \", 'ERROR');\n }\n}",
"function EMAIL_test($e_to,$e_to_name,$e_subject,$e_in_subject,$e_body){\n\t\t\t// Create the mail transport configuration\n\t\t\t$transport = Swift_MailTransport::newInstance();\n\t\t\t\n\t\t\t// Create the message\n\t\t\t$message = Swift_Message::newInstance();\n\t\t\t$message->setTo(array(\n\t\t\t $e_to => $e_to_name\n\t\t\t));\n\t\t\t$message->setSubject($e_subject . \" - UnitedGaming\");\n\t\t\t$message->setBody(\n\t\t\t'<html>\n\t\t\t<link href=\"http://fonts.googleapis.com/css?family=Source+Sans+Pro:400,700\" rel=\"stylesheet\" type=\"text/css\"/>\n\t\t\t<table border=\"0\" align=\"center\">\n\t\t\t<tr>\n\t\t\t<td><a href=\"http://unitedgaming.org\" target=\"_blank\" title=\"UnitedGaming\" alt=\"UnitedGaming\"><img src=\"http://unitedgaming.org/mainlogo.png\" alt=\"UnitedGaming\" border=\"0\"/></td>\n\t\t\t<td><font face=\"Source Sans Pro\" size=\"6px\" color=\"#BD3538\">'.$e_in_subject.'</font></td>\n\t\t\t</tr>' \n\t\t\t.\n\t\t\t'<br/><br /><br/><tr>\n\t\t\t<td colspan=\"2\"><font face=\"Arial\" size=\"3px\" color=\"#303030\">'.$e_body.'\n\t\t\t </td></tr><tr><td><br/><font face=\"Source Sans Pro\" size=\"2px\">Kind Regards,<br/>Chuevo</font></td><td></td></tr></table></html>\n\t\t\t ');\n\t\t\t$message->setFrom(\"[email protected]\", \"UnitedGaming\");\n\t\t\t$type = $message->getHeaders()->get('Content-Type');\n\n\t\t\t$type->setValue('text/html');\n\t\t\t$type->setParameter('charset', 'utf-8');\n\t\t\t\n\t\t\t//echo $type->toString();\n\t\t\t\n\t\t\t/*\n\t\t\t\n\t\t\tContent-Type: text/html; charset=utf-8\n\t\t\t\n\t\t\t*/\n\t\t\t// Send the email\n\t\t\t$mailer = Swift_Mailer::newInstance($transport);\n\t\t\t$mailer->send($message);\n}",
"function process_mail(){\n\t\t$result = true;\n\t\t\n\t\tif(count($this->to) < 1){\n\t\t\treturn 'No email address.';\n\t\t}\n\t\t$this->set_eol();\n\t\t$this->get_message_type();\n\t\t$this->set_boundary();\n\t\t$headers = $this->set_headers();\n\t\t$body = $this->set_body();\n\t\t\n\t\tif($body == ''){\n\t\t\treturn 'Empty email body.';\n\t\t}\n\t\t$result = $this->send_mail($headers, $body);\n\t\treturn $result;\n\t}",
"public function __construct() {\n parent::__construct();\n $this->CharSet = 'utf-8';\n $this->IsMail(); // telling the class to use native PHP mail()\n $this->SetFrom(\"[email protected]\", \"Schedule-NRCU\");\n $this->Subject = 'schedule.nrcu.gov.ua';\n $this->AltBody = 'To view the message, please use an HTML compatible email viewer!'; // optional - MsgHTML will create an alternate automatically\n }",
"public function setEmailTpl($value){$this->_emailTpl = $value;}",
"abstract public function getMailType(): int;",
"protected function getEmailSubject() {}",
"public function getMail();",
"public function isMail()\n {\n }",
"function sendHTMLMail($content,$recipient,$dummy,$fromEmail,$fromName,$replyTo='',$recepientsCopy='',$recepientsBcc='')\t{\n\t\tif (trim($recipient) && trim($content))\t{\n\t\t\t$cls=t3lib_div::makeInstanceClassName('t3lib_htmlmail');\n\t\t\tif (class_exists($cls))\t{\t// If htmlmail lib is included, then generate a nice HTML-email\n\t\t\t\t$parts = spliti('<title>|</title>',$content,3);\n\t\t\t\t$subject = trim($parts[1]) ? trim($parts[1]) : 'TYPO3 FE Admin message';\n\n\t\t\t\t$Typo3_htmlmail = t3lib_div::makeInstance('t3lib_htmlmail');\n\t\t\t\t$Typo3_htmlmail->start();\n\t\t\t\t$Typo3_htmlmail->useBase64();\n\n\t\t\t\t$Typo3_htmlmail->subject = $subject;\n\t\t\t\t$Typo3_htmlmail->from_email = $fromEmail;\n\t\t\t\t$Typo3_htmlmail->from_name = $fromName;\n\t\t\t\t$Typo3_htmlmail->replyto_email = $replyTo ? $replyTo : $fromEmail;\n\t\t\t\t$Typo3_htmlmail->replyto_name = $replyTo ? '' : $fromName;\n\t\t\t\t//modif by CMD - add return path information\n\t\t\t\t$Typo3_htmlmail->returnPath = $replyTo ? $replyTo : $fromEmail;\n\t\t\t\t$Typo3_htmlmail->organisation = '';\n\t\t\t\t$Typo3_htmlmail->priority = 3;\n\n\t\t\t\t\t// HTML\n\t\t\t\t$Typo3_htmlmail->theParts['html']['content'] = $content;\t// Fetches the content of the page\n\t\t\t\t$Typo3_htmlmail->theParts['html']['path'] = '';\n\t\t\t\t$Typo3_htmlmail->extractMediaLinks();\n\t\t\t\t$Typo3_htmlmail->extractHyperLinks();\n\t\t\t\t$Typo3_htmlmail->fetchHTMLMedia();\n\t\t\t\t$Typo3_htmlmail->substMediaNamesInHTML(0);\t// 0 = relative\n\t\t\t\t$Typo3_htmlmail->substHREFsInHTML();\n\t\t\t\t$Typo3_htmlmail->setHTML($Typo3_htmlmail->encodeMsg($Typo3_htmlmail->theParts['html']['content']));\n\n\t\t\t\t\t// PLAIN\n\t\t\t\t$Typo3_htmlmail->addPlain('');\n\n\t\t\t\t\t// SET Headers and Content\n\t\t\t\t$Typo3_htmlmail->setHeaders();\n\t\t\t\t$Typo3_htmlmail->setContent();\n\t\t\t\t$Typo3_htmlmail->setRecipient($recipient);\n\t\t\t\t$Typo3_htmlmail->recipient_copy=$recepientsCopy;\n\t\t\t\t$Typo3_htmlmail->recipient_blindcopy=$recepientsBcc;\n\t\t//\t\tdebug($Typo3_htmlmail->theParts);\n\t\t\t\t$Typo3_htmlmail->sendtheMail();\n\t\t\t} else {\n\t\t\t\tdebug('SYSTEM ERROR: No HTML-mail library loaded. Set \"page.config.incT3Lib_htmlmail = 1\" is your TypoScript template.');\n\t\t\t}\n\t\t}\n\t}",
"function envoi_mail($dest, $titre, $cont) {\n //----------------------------------------------- \n //DECLARE LES VARIABLES \n //----------------------------------------------- \n $email_reply = '[email protected]';\n\n $message_html = '<html> \n <head> \n <title>'.$titre.'</title> \n </head> \n <body>\n <div style=\"padding: 7px; font-size: 1.1em\">\n '.$cont.'\n <br />\n <p>\n Passez une bonne journée sur <a href=\"http://BlogPHP.fr/\">'.Conf::$SITE['TITRE'].'</a>,\n <br />\n <em>L\\'équipe de développement.</em>\n </p>\n </div>\n </body> \n </html>'; \n\n //----------------------------------------------- \n //HEADERS DU MAIL \n //----------------------------------------------- \n\tini_set('SMTP','smtp.sfr.fr');\n\n $entetedate = date(\"D, j M Y H:i:s\"); // avec offset horaire\n $headers = 'From: \"'.Conf::$SITE['TITRE'].'\" <'.$email_reply.'>'.\"\\n\";\n $headers .= 'Return-Path: <'.$email_reply.'>'.\"\\n\"; \n $headers .= 'MIME-Version: 1.0'.\"\\n\"; \n $headers .= 'Content-Type: text/html; charset=\"utf-8\"'.\"\\n\"; \n $headers .= 'Content-Transfer-Encoding: 8bit'.\"\\n\"; \n $headers .= \"X-Mailer: PHP/\" . phpversion() . \"\\n\\n\" ;\n\n return mail($dest, $titre, $message_html, $headers);\n}",
"function __construct() {\n\t\t\t\tparent :: __construct();\n\t\t\t\t$this->adminemail = $this->get_admin_email();\n\t\t\t\t$this->adminmobile = $this->get_admin_mobile();\n\t\t\t\t$siteInfo = $this->get_siteTitleUrl();\n\t\t\t\t$this->sitetitle = $siteInfo['title'];\n\t\t\t\t$this->siteurl = addHttp($siteInfo['url']);\n\n\t\t\t\t$headFootShortcode = array(\"{siteTitle}\",\"{siteUrl}\");\n\t\t\t\t$headFootVals = array($this->sitetitle,$this->siteurl);\n\n\t\t\t\t$mailsettings = $this->get_mailserver();\n\t\t\t\t$this->mailHeader = str_replace($headFootShortcode, $headFootVals, $mailsettings[0]->mail_header);\n\t\t\t\t$this->mailFooter = str_replace($headFootShortcode, $headFootVals, $mailsettings[0]->mail_footer);\n\t\t\t\t\n\t\t\t\tif ($mailsettings[0]->mail_default == \"smtp\") {\n\t\t\t\t\t\n\t\t\t\t\tif($mailsettings[0]->mail_secure == \"no\"){\n\t\t\t\t\t\t$secure = \"\";\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$secure = $mailsettings[0]->mail_secure.\"://\";\n\t\t\t\t\t}\n\t\t\t\t\t\t$this->sendfrom = $mailsettings[0]->mail_fromemail;\n\t\t\t\t\t\t$config = Array('protocol' => 'smtp', 'charset' => 'utf-8',\n\t\t\t\t\t\t\t'smtp_host' => $secure.$mailsettings[0]->mail_hostname, \n\t\t\t\t\t\t\t'smtp_port' => $mailsettings[0]->mail_port, \n\t\t\t\t\t\t\t'smtp_user' => $mailsettings[0]->mail_username, 'smtp_pass' => $mailsettings[0]->mail_password, 'mailtype' => 'html', 'charset' => 'iso-8859-1', 'wordwrap' => TRUE,'smtp_auth' => TRUE);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$this->load->library('email', $config);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t\t$this->sendfrom = $mailsettings[0]->mail_fromemail;\n\t\t\t\t\t\t$this->load->library('email');\n\t\t\t\t\t\t$this->email->set_mailtype(\"html\");\n\t\t\t\t}\n\n\t\t}",
"protected function _email($type, $data)\n {\n $this->load->library('mail');\n $this->load->library('parser');\n\n $email = false;\n\n switch ($type) {\n case 'contact':\n // Build the message\n $message = $data['message'].\"\\r\\n\\r\\n\";\n $message.= \"Recipient Information: {$data['name']} ({$data['email']}), \";\n $message.= $this->input->ip_address();\n\n // Set the email data\n $emailData = array(\n 'email_subject' => $data['subject'],\n 'email_from' => ucfirst(lang('time_from')) .\": {$data['name']} - {$data['email']}\",\n 'email_content' => nl2br($message),\n );\n\n // where should the email be coming from\n $loc = Location::email('main_contact', $this->mail->mailtype);\n\n // parse the message\n $parsedMessage = $this->parser->parse_string($loc, $emailData, true);\n\n // get the game masters\n $gm = $this->user->get_gm_emails();\n\n // set the TO variable\n $to = implode(',', $gm);\n\n // set the parameters for sending the email\n $this->mail->from(Util::email_sender(), $data['name']);\n $this->mail->bcc($to);\n $this->mail->subject($this->options['email_subject'] .' '. $data['subject']);\n $this->mail->message($parsedMessage, $message);\n break;\n\n case 'news_comment':\n // Load the resources\n $this->load->model('news_model', 'news');\n\n // Get all the information from the database\n $row = $this->news->get_news_item($data['news_item']);\n $name = $this->char->get_character_name($data['author']);\n $from = $this->user->get_email_address('character', $data['author']);\n $to = $this->user->get_email_address('character', $row->news_author_character);\n\n // Build the content of the message\n $content = sprintf(\n lang('email_content_news_comment_added'),\n \"<strong>\". $row->news_title .\"</strong>\",\n $data['comment']\n );\n\n // compile the data for the message\n $emailData = array(\n 'email_subject' => lang('email_subject_news_comment_added'),\n 'email_from' => ucfirst(lang('time_from')) .': '. $name .' - '. $from,\n 'email_content' => nl2br($content)\n );\n\n // where should the email be coming from\n $loc = Location::email('main_news_comment', $this->mail->mailtype);\n\n // parse the message\n $message = $this->parser->parse_string($loc, $emailData, true);\n\n // set the parameters for sending the email\n $this->mail->from(Util::email_sender(), $name);\n $this->mail->bcc($to);\n $this->mail->subject($this->options['email_subject'].' '.$emailData['email_subject']);\n $this->mail->message($message, $content);\n break;\n\n case 'news_comment_pending':\n // load the resources\n $this->load->model('news_model', 'news');\n\n // get all the information from the database\n $row = $this->news->get_news_item($data['news_item']);\n $name = $this->char->get_character_name($data['author']);\n $from = $this->user->get_email_address('character', $data['author']);\n $to = implode(',', $this->user->get_emails_with_access('manage/comments'));\n\n // set the content of the message\n $content = sprintf(\n lang('email_content_comment_pending'),\n lang('global_newsitems'),\n \"<strong>\". $row->news_title .\"</strong>\",\n $data['comment'],\n site_url('login/index')\n );\n\n // compile the information together for the message\n $emailData = array(\n 'email_subject' => lang('email_subject_comment_pending'),\n 'email_from' => ucfirst(lang('time_from')) .': '. $name .' - '. $from,\n 'email_content' => nl2br($content)\n );\n\n // where should the email be coming from\n $loc = Location::email('comment_pending', $this->mail->mailtype);\n\n // parse the message\n $message = $this->parser->parse_string($loc, $emailData, true);\n\n // set the parameters for sending the email\n $this->mail->from(Util::email_sender(), $name);\n $this->mail->bcc($to);\n $this->mail->subject($this->options['email_subject'] .' '. $emailData['email_subject']);\n $this->mail->message($message, $content);\n break;\n\n case 'join_user':\n // build the content of the message\n $content = sprintf(\n lang('email_content_join_user'),\n $this->options['sim_name'],\n $data['email'],\n $data['password']\n );\n\n // compile the information for the email\n $emailData = array(\n 'email_subject' => lang('email_subject_join_user'),\n 'email_from' => ucfirst(lang('time_from')) .': '. $this->options['default_email_name'] .' - '. $this->options['default_email_address'],\n 'email_content' => nl2br($content)\n );\n\n // where should the email be coming from\n $loc = Location::email('main_join_user', $this->mail->mailtype);\n\n // parse the message\n $message = $this->parser->parse_string($loc, $emailData, true);\n\n // set the parameters for sending the email\n $this->mail->from(Util::email_sender(), $this->options['default_email_name']);\n $this->mail->bcc($data['email']);\n $this->mail->subject($this->options['email_subject'] .' '. $emailData['email_subject']);\n $this->mail->message($message, $content);\n break;\n\n case 'join_gm':\n // load the resources\n $this->load->model('positions_model', 'pos');\n\n $content = lang('email_content_join_gm');\n\n // compile the information for the email\n $emailData = array(\n 'email_subject' => lang('email_subject_join_gm'),\n 'email_from' => ucfirst(lang('time_from')) .': '. $data['name'] .' - '. $data['email'],\n 'email_content' => nl2br($content),\n 'basic_title' => ucwords(lang('labels_basic').' '.lang('labels_info')),\n );\n\n // build the user data array\n $p_data = $this->user->get_user($data['user']);\n $emailData['user'] = array(\n array(\n 'label' => ucfirst(lang('labels_name')),\n 'data' => $data['name']),\n array(\n 'label' => ucwords(lang('labels_email_address')),\n 'data' => $data['email']),\n array(\n 'label' => ucwords(lang('labels_ipaddr')),\n 'data' => $data['ipaddr']),\n array(\n 'label' => lang('labels_dob'),\n 'data' => $p_data->date_of_birth)\n );\n\n // build the character data array\n $c_data = $this->char->get_character($data['id']);\n $emailData['character'] = array(\n array(\n 'label' => ucwords(lang('global_character') .' '. lang('labels_name')),\n 'data' => $this->char->get_character_name($data['id'])),\n array(\n 'label' => ucfirst(lang('global_position')),\n 'data' => $this->pos->get_position($c_data->position_1, 'pos_name')),\n );\n\n // get the sections\n $sections = $this->char->get_bio_sections();\n\n if ($sections->num_rows() > 0) {\n foreach ($sections->result() as $sec) {\n $emailData['sections'][$sec->section_id]['title'] = $sec->section_name;\n\n $fields = $this->char->get_bio_fields($sec->section_id);\n\n if ($fields->num_rows() > 0) {\n foreach ($fields->result() as $field) {\n $bio_data = $this->char->get_field_data($field->field_id, $data['id']);\n\n if ($bio_data->num_rows() > 0) {\n foreach ($bio_data->result() as $item) {\n $emailData['sections'][$sec->section_id]['fields'][] = array(\n 'field' => $field->field_label_page,\n 'data' => text_output($item->data_value, '')\n );\n }\n }\n }\n }\n }\n }\n\n $emailData['sample_post_label'] = ucwords(lang('labels_sample_post'));\n $emailData['sample_post'] = ($this->mail->mailtype == 'html') ? nl2br($data['sample_post']) : $data['sample_post'];\n\n // where should the email be coming from\n $loc = Location::email('main_join_gm', $this->mail->mailtype);\n\n // parse the message\n $message = $this->parser->parse_string($loc, $emailData, true);\n\n // set the TO variable\n $to = implode(',', $this->user->get_emails_with_access('characters/index'));\n\n // set the parameters for sending the email\n $this->mail->from(Util::email_sender(), $data['name']);\n $this->mail->bcc($to);\n $this->mail->subject($this->options['email_subject'] .' '. $emailData['email_subject']);\n $this->mail->message($message, $content);\n break;\n }\n\n $email = $this->mail->send();\n\n return $email;\n }",
"function email( $to, $subject, $message ){\n\n\n /**\n * set up mail headers \n */\n $headers = 'From: Support - Furasta.Org <[email protected]>'.\"\\r\\n\".'Reply-To: [email protected]'.\"\\r\\n\";\n $headers .= 'X-Mailer: PHP/' .phpversion().\"\\r\\n\";\n $headers .= 'MIME-Version: 1.0'.\"\\r\\n\";\n $headers .= 'Content-Type: text/html; charset=ISO-8859-1'.\"\\r\\n\";\n\n require_once '_inc/function/defualts.php';\n\n\t/**\n\t * message template \n\t */\n $message = defaults_email_template( $message );\n\n\t/**\n\t * return success of mail function \n\t */\n return mail( $to, $subject, $message, $headers );\n\n}",
"function sendMail($emailFrom, $fromName, $emailTo, $nameTo, $subject, $body, $currentLanguage) {\n\n\t\trequire_once(\"library/phpmailer/PHPMailerAutoload.php\");\n\t\t$settings = new View(\"settings\", $currentLanguage, \"lang_id\");\n\n\t\t$body = nl2br($body);\n\t\t$body = str_replace(array(\"\\\n \", \"\\\\r\", \"\\\\n\", \"bcc:\"), \"<br/>\", $body);\n\n\t\tif (is_file(\"images/logo.png\")) {\n\t\t\t$logo = $settings->site_host . \"images/logo.png\";\n\t\t} elseif (is_file(\"images/logo.svg\")) {\n\t\t\t$logo = $settings->site_host . \"images/logo.svg\";\n\t\t} elseif (is_file(\"images/logo.jpg\")) {\n\t\t\t$logo = $settings->site_host . \"images/logo.jpg\";\n\t\t}\n\n\t\t$socials = \"\";\n\t\tif ($settings->site_facebook != \"\") {\n\t\t\t$socials .= '<a style=\"color: #000;font-family:Arial, sans-serif;font-size: 14px;line-height: 21px;text-transform: lowercase;\" href=\"' . $settings->site_facebook . '\" title=\"Facebook stranica ' . $settings->site_host . '\" target=\"_blank\"><img style=\"width: 30px;margin: 0 5px;\" src=\"' . $settings->site_host . 'images/socials/facebook.png\" alt=\"Facebook stranica ' . $settings->site_firm . '\"></a>';\n\t\t}\n\t\tif ($settings->site_twitter != \"\") {\n\t\t\t$socials .= '<a style=\"color:#000;font-family: Arial, sans-serif;font-size:14px;line-height:21px;text-transform:lowercase;\" href=\"' . $settings->site_twitter . '\" title=\"Twitter stranica ' . $settings->site_host . '\" target=\"_blank\"><img style=\"width: 30px;margin: 0 5px;\" src=\"' . $settings->site_host . 'images/socials/twitter.png\" alt=\"Twitter stranica ' . $settings->site_firm . '\"></a>';\n\t\t}\n\t\tif ($settings->site_google_plus != \"\") {\n\t\t\t$socials .= '<a style=\"color:#000;font-family: Arial, sans-serif;font-size:14px;line-height:21px;text-transform:lowercase;\" href=\"' . $settings->site_google_plus . '\" title=\"Google Plus stranica ' . $settings->site_host . '\" target=\"_blank\"><img style=\"width: 30px;margin: 0 5px;\" src=\"' . $settings->site_host . 'images/socials/google-plus.png\" alt=\"Google Plus stranica ' . $settings->site_firm . '\"></a>';\n\t\t}\n\t\tif ($settings->site_instagram != \"\") {\n\t\t\t$socials .= '<a style=\"color:#000;font-family: Arial, sans-serif;font-size:14px;line-height:21px;text-transform:lowercase;\" href=\"' . $settings->site_instagram . '\" title=\"Instagram stranica ' . $settings->site_host . '\" target=\"_blank\"><img style=\"width: 30px;margin: 0 5px;\" src=\"' . $settings->site_host . 'images/socials/instagram.png\" alt=\"Instagram stranica ' . $settings->site_firm . '\"></a>';\n\t\t}\n\t\tif ($settings->site_pinterest != \"\") {\n\t\t\t$socials .= '<a style=\"color:#000;font-family: Arial, sans-serif;font-size:14px;line-height:21px;text-transform:lowercase;\" href=\"' . $settings->site_pinterest . '\" title=\"Pinterest stranica ' . $settings->site_host . '\" target=\"_blank\"><img style=\"width: 30px;margin: 0 5px;\" src=\"' . $settings->site_host . 'images/socials/pinterest.png\" alt=\"Pinterest stranica ' . $settings->site_firm . '\"></a>';\n\t\t}\n\t\tif ($settings->site_youtube != \"\") {\n\t\t\t$socials .= '<a style=\"color:#000;font-family: Arial, sans-serif;font-size:14px;line-height:21px;text-transform:lowercase;\" href=\"' . $settings->site_youtube . '\" title=\"You Tube stranica ' . $settings->site_host . '\" target=\"_blank\"><img style=\"width: 30px;margin: 0 5px;\" src=\"' . $settings->site_host . 'images/socials/youtube.png\" alt=\"You Tube stranica ' . $settings->site_firm . '\"></a>';\n\t\t}\n\t\tif ($settings->site_vimeo != \"\") {\n\t\t\t$socials .= '<a style=\"color:#000;font-family: Arial, sans-serif;font-size:14px;line-height:21px;text-transform:lowercase;\" href=\"' . $settings->site_vimeo . '\" title=\"Vimeo stranica ' . $settings->site_host . '\" target=\"_blank\"><img style=\"width: 30px;margin: 0 5px;\" src=\"' . $settings->site_host . 'images/socials/vimeo.png\" alt=\"Vimeo stranica ' . $settings->site_firm . '\"></a>';\n\t\t}\n\n\t\t\n\t\t$footer = $settings->site_firm.\", \".$settings->site_address.\", \".$settings->site_zip.\" \".$settings->site_city.\"<br /><a style='color: #000;font-family:Arial, sans-serif;font-size: 14px;line-height: 21px;text-transform: lowercase;' href='tel:$settings->site_phone'>\".$settings->site_phone.\"</a>\";\n\t\tif($settings->site_phone_2){\n\t\t\t$footer .= \", <a style='color: #000;font-family:Arial, sans-serif;font-size: 14px;line-height: 21px;text-transform: lowercase;' href='tel:$settings->site_phone_2'>\".$settings->site_phone_2.\"</a>\";\n\t\t}\n\t\t$footer .= \"<br /><a style='color: #000;font-family:Arial, sans-serif;font-size: 14px;line-height: 21px;text-transform: lowercase;' href='mailto:$settings->site_email'>\".$settings->site_email.\"</a>\";\n\t\t\n\t\t$bodyMail = file_get_contents(\"includes/mail.html\");\n\t\t$bodyMail = str_replace(array(\"[CONTENT]\", \"[LOGO]\", \"[SITE_TITLE]\", \"[FOOTER]\", \"[DOMAIN]\", \"[SUBJECT]\", \"[SOCIALS]\"), array(\"<p>\".$body.\"</p>\", $logo, $settings->site_title, $footer, $settings->site_host, $subject, $socials), $bodyMail);\n\n\t\t\n\t\t$mail = new PHPMailer();\n\n\t\t$mail->IsSMTP();\n\t\t$mail->SMTPDebug = 0;\n\t\t$mail->CharSet = 'UTF-8';\n\t\t$mail->Host = $settings->site_outgoing_server;\n\t\t$mail->Port = $settings->site_smtp_port;\n\t\t$mail->SMTPAuth = true;\n\t\t$mail->Username = $settings->site_username;\n\t\t$mail->Password = $settings->site_password;\n\t\t$mail->Mailer = \"smtp\";\n\t\t$mail->SMTPSecure = 'ssl';\n\n\t\t$mail->From = $emailFrom;\n\t\t$mail->FromName = $fromName;\n\t\t$mail->AddAddress($emailTo, $nameTo);\n\t\t$mail->AddReplyTo($emailFrom, $fromName);\n\n\t\t$mail->isHTML(true);\n\t\t$mail->WordWrap = 50;\n\t\t$mail->Subject = $subject;\n\t\t$mail->Body = $bodyMail;\n\t\t$mail->AltBody = strip_tags($body);\n\n\t\tif (!$mail->Send()) {\n\t\t\techo 'Message was not sent. Mailer error: ' . $mail->ErrorInfo . '<br />';\n\t\t}\n\t}",
"function mailer() {\n\t\tJRequest::checkToken() or die( JText::_( 'Invalid Token' ) );\n\t\t$email = JRequest::getVar('email');\n\t\t$title = JRequest::getVar('title');\n\t\t$from = array($email, $title);\n\t\t// set emailadres from the site\n\t\t$config =&JFactory::getConfig();\n\t\t// Get some variables from the component options\n\t\t$app = JFactory::getApplication('site');\n\t\t$componentParams = $app->getParams('com_mdcontact');\n\t\t$email_to = $componentParams->get('email_to');\n\t\t$subject = $componentParams->get('subject');\n\t\t$to = array($email_to, $email_to );\n\t\t// Set some variables for the email message\n\t\t$copy = JRequest::getVar('copy');;\n\t\t$body = JRequest::getVar('description');;\n\t\n\t\t// Invoke JMail Class\n\t\t$mailer = JFactory::getMailer();\n\t\n\t\t// Set sender array so that my name will show up neatly in your inbox\n\t\t$mailer->setSender($from);\n\t\t$mailer->addRecipient($to);\n\t\t// Set cc if copy is checked\n\t\tif ($copy=='1'){\n\t\t\t$mailer->addCC($from);\n\t\t\t}\n\t\t$mailer->setSubject($subject);\n\t\t$mailer->setBody($body);\n\t\t$send = $mailer->Send();\n\t\t// set the redirect page\n\t\t$redirect = JRoute::_('index.php?option=com_mdcontact&view=contact&task=add');\n\t\tif ( $send !== true ) {\n\t\t\tJFactory::getApplication()->enqueueMessage('Your message is not send, please try again later', 'error');\n\t\t\t$this->setRedirect( $redirect);\n\t\t} else {\n\t\tparent::apply();\n\t}\n\t}",
"abstract protected function _getEmail($info);",
"protected abstract function _message();",
"private static function mail()\n {\n $files = ['Mail', 'Mailable', 'SMTP'];\n $folder = static::$root.'Mailing'.'/';\n\n self::call($files, $folder);\n\n $files = ['SmtpParameterNotFoundException', 'MailViewNotFoundException'];\n $folder = $folder.'Exceptions/';\n\n self::call($files, $folder);\n }",
"private function _build_mail () {\n if (empty($this->sendto) && (empty($this->body) && empty($this->htmlbody))) {\n throw new Exception(\"Cannot send, need more information\");\n }\n\n // build the headers\n $this->headers = \"\";\n\n $this->xheaders['To'] = implode(',', $this->sendto);\n\n $cc_header_name = ($this->apply_windows_bugfix) ? 'cc': 'Cc';\n if (!empty($this->sendcc)) $this->xheaders[$cc_header_name] = implode(',', $this->sendcc);\n if (!empty($this->sendbcc)) $this->xheaders['Bcc'] = implode(',', $this->sendbcc);\n\n if($this->receipt) {\n if(isset($this->xheaders['Reply-To'])) {\n $this->xheaders['Disposition-Notification-To'] = $this->xheaders['Reply-To'];\n }\n elseif (isset($this->xheaders['From'])) {\n $this->xheaders['Disposition-Notification-To'] = $this->xheaders['From'];\n }\n }\n\n if($this->charset != '') {\n $this->xheaders['Mime-Version'] = '1.0';\n $this->xheaders['Content-Type'] = 'text/plain; charset='.$this->charset;\n $this->xheaders['Content-Transfer-Encoding'] = $this->ctencoding;\n }\n\n if (!$this->xheaders['X-Mailer']) {\n $this->xheaders['X-Mailer'] = 'King-Fu MimeMail';\n }\n\n // setup the body ready for sending\n $this->_set_body();\n\n foreach ($this->xheaders as $head => $value) {\n $rgx = ($this->apply_windows_bugfix) ? 'Subject' : 'Subject|To'; // don't strip out To header for bugfix\n if (!preg_match('/^'.$rgx.'$/i', $head)) $this->headers .= $head.': '.strtr($value, \"\\r\\n\", ' ').\"\\n\";\n }\n }",
"private function sendEmails()\r\n {\r\n $user_body = \"Hi,<br>A new comment was added to the following article:\\n\";\r\n $user_body .= '<a href=\"http://'.$this->config->getModuleVar('common', 'site_url').'/id_article/'.$this->viewVar['article']['id_article'].'\">'.$this->viewVar['article']['title'].\"</a>\\n\";\r\n\r\n $_tmp_error = array();\r\n $user_text_body = strip_tags($user_body);\r\n\r\n $this->model->action( 'common', 'mailSendTo',\r\n array('charset' => $this->viewVar['charset'],\r\n 'bodyHtml' => & $user_body,\r\n 'bodyText' => & $user_text_body,\r\n 'to' => array(array('email' => '[email protected]',\r\n 'name' => 'Armand Turpel')),\r\n 'subject' => \"Open Publisher Blog Entry\",\r\n 'fromEmail' => '[email protected]',\r\n 'fromName' => '[email protected]',\r\n 'error' => & $_tmp_error\r\n ));\r\n\r\n }",
"function tep_mail($to_name, $to_email_address, $email_subject, $email_text, $from_email_name, $from_email_address) {\n\tif (SEND_EMAILS != 'true') return false;\n $headers[\"From\"] = $from_email_address;\n $headers[\"To\"] = $to_email_address;\n $headers[\"Subject\"] = $email_subject;\n $mail_object =& Mail::factory(\"sendmail\");\n\tif (EMAIL_USE_HTML == 'true') {\n $headers[\"Content-Type\"] = \"text/html; charset=utf-8\";\n $message = str_replace(array(\"\\r\\n\", \"\\n\", \"\\r\"), \"<br />\",$email_text);\n }else{\n $headers[\"Content-Type\"] = \"text/plain; charset=utf-8\";\n $message = str_replace(array(\"\\r\\n\", \"\\n\", \"\\r\"), \"\\r\\n\",strip_tags($email_text));\n }\n\ttep_bh_transac_mail($to_name, $to_email_address, $from_email_name, $from_email_address, $email_subject, $message);\n\t// Send message\n //$mail_object->send($to_email_address, $headers, $message);\n}",
"public function getMailMIME()\n {\n }",
"function sendMail_dis($to_email,$extraMsg)\n{\n //$to_email \t=\"[email protected]\";\n $from \t=\"[email protected]\";\n\t$subject\t=\"List of cancelled transaction in last 1 week\";\n $msgTxt\t\t=\"Hi, <br><br>\n\t \tPlease find the list of usernames whose transaction has been cancelled in last 1 week (From: $last_7day - $dateEnd).<br><br>\";\n\n $msgTxt \t.=$extraMsg.\"<br><br>\";\n $msgTxt \t.=\"Thanks,<br>Team Jeevansathi<br>\";\n send_email($to_email,$msgTxt,$subject,$from);\n}",
"Function smtp_mail($to,$subject,$message,$additional_headers=\"\",$additional_parameters=\"\")\n{\n\tglobal $message_object;\n\n\treturn($message_object->Mail($to,$subject,$message,$additional_headers,$additional_parameters));\n}",
"function sendTheMail() {\n//\t\t$conf = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['direct_mail'];\n\t\t\t\t\n\t\t\t// format headers for SMTP use\n\t\tif ($this->useSmtp) {\n\t\t\t$headers = array();\n\t\t\t$headerlines = explode(\"\\n\",trim($this->headers));\n\t\t\t$headers['To'] = $this->recipient;\n\t\t\t$headers['Subject'] = $this->subject;\n\t\t\tforeach($headerlines as $k => $hd) {\n\t\t\t\tif (substr($hd,0,9)==\" boundary\") {\n\t\t\t\t\t$headers['Content-Type'] .= \"\\n \" . $hd;\n\t\t\t\t} else {\n\t\t\t\t\t$current = explode(':',$hd);\n\t\t\t\t\t$headers[$current[0]] = $current[1];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// create a new mail object if not existing\n\t\t\tif (!is_a($this->mailObject, 'Mail_smtp') || $this->confSMTP['persist'] == 1) {\n\t\t\t\t$this->mailObject = NULL;\n\t\t\t\t$this->mailObject =& Mail::factory('smtp', $this->confSMTP);\n\t\t\t}\n\t\t}\n\n\t\t// Sends the mail, requires the recipient, message and headers to be set.\n\t\tif (trim($this->recipient) && trim($this->message))\t{\t// && trim($this->headers)\n\t\t\t$returnPath = (strlen($this->returnPath)>0)?\"-f\".$this->returnPath:'';\n\t\t\t\t//On windows the -f flag is not used (specific for Sendmail and Postfix), but instead the php.ini parameter sendmail_from is used.\n\t\t\tif($this->returnPath) {\n\t\t\t\tini_set(sendmail_from, $this->returnPath);\n\t\t\t}\n\t\t\t\t// Setting defer mode\n\t\t\t$deferMode = $this->useDeferMode ? (($returnPath ? ' ': '') . '-O DeliveryMode=defer') : '';\n\t\t\t/**\n\t\t\t * TODO: will be obsolete, once swiftmailer is used\n\t\t\t */\n\t\t\t$message = preg_replace('/^\\.$/m', '. ', $this->message);\n\t\t\t\n\t\t\tif ($this->useSmtp)\t{\n\t\t\t\t$this->mailObject->send($this->recipient, $headers, $message);\n\t\t\t} \n\t\t\telseif(!ini_get('safe_mode') && $this->forceReturnPath) {\n\t\t\t\t//If safe mode is on, the fifth parameter to mail is not allowed, so the fix wont work on unix with safe_mode=On\n\t\t\t\tmail($this->recipient,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $message,\n\t\t\t\t\t $this->headers,\n\t\t\t\t\t $returnPath.$deferMode);\n\t\t\t} else {\n\t\t\t\tmail($this->recipient,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $message,\n\t\t\t\t\t $this->headers);\n\t\t\t}\n\t\t\t\t// Sending copy:\n\t\t\tif ($this->recipient_copy)\t{\n\t\t\t\tif ($this->useSmtp)\t{\n\t\t\t\t\t$this->mailObject->send($this->recipient, $headers, $message);\n\t\t\t\t} elseif (!ini_get('safe_mode') && $this->forceReturnPath) {\n\t\t\t\t\tmail($this->recipient_copy,\n\t\t\t\t\t\t\t\t$this->subject,\n\t\t\t\t\t\t\t\t$message,\n\t\t\t\t\t\t\t\t$this->headers,\n\t\t\t\t\t\t\t\t$returnPath.$deferMode);\n\t\t\t\t} else {\n\t\t\t\t\tmail($this->recipient_copy,\n\t\t\t\t\t\t\t\t$this->subject,\n\t\t\t\t\t\t\t\t$message,\n\t\t\t\t\t\t\t\t$this->headers\t);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\t// Auto response\n\t\t\tif ($this->auto_respond_msg)\t{\n\t\t\t\t$theParts = explode('/',$this->auto_respond_msg,2);\n\t\t\t\t$theParts[1] = str_replace(\"/\",chr(10),$theParts[1]);\n\t\t\t\tif ($this->useSmtp)\t{\n\t $headers['Subject'] = $theParts[0];\n\t $headers['From'] = $this->recipient;\n\t $res = $this->mailObject->send($this->from_email, $headers, $theParts[1]);\n\t\t\t\t} elseif (!ini_get('safe_mode') && $this->forceReturnPath) {\n\t\t\t\t\tmail($this->from_email,\n\t\t\t\t\t\t\t\t$theParts[0],\n\t\t\t\t\t\t\t\t$theParts[1],\n\t\t\t\t\t\t\t\t\"From: \".$this->recipient,\n\t\t\t\t\t\t\t\t$returnPath.$deferMode);\n\t\t\t\t} else {\n\t\t\t\t\tmail($this->from_email,\n\t\t\t\t\t\t\t\t$theParts[0],\n\t\t\t\t\t\t\t\t$theParts[1],\n\t\t\t\t\t\t\t\t\"From: \".$this->recipient);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($this->returnPath) {\n\t\t\t\tini_restore(sendmail_from);\n\t\t\t}\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"function Mailer($name = \"\", $from, $to, $cc = \"\", $bcc = \"\", $subject = \"\") {\n\t\t$this->valid_mail_adresses = true;\n\t\tif(!$this->check_mail_address($to)) {\n\t\t\t$this->msg[] = \"Error, the \\\"mailto\\\" address is empty or not valid.\";\n\t\t\t$this->valid_mail_adresses = false;\n\t\t\t} \n\t\tif(!$this->check_mail_address($from)) {\n\t\t\t$this->msg[] = \"Error, the \\\"from\\\" address is empty or not valid.\";\n\t\t\t$this->valid_mail_adresses = false;\n\t\t\t} \n\t\tif($cc != \"\") {\n\t\t\tif (!$this->check_mail_address($cc)) {\n\t\t\t\t$this->msg[] = \"Error, the \\\"Cc\\\" address is not valid.\";\n\t\t\t\t$this->valid_mail_adresses = false;\n\t\t\t\t} \n\t\t\t}\n\t\tif($bcc != \"\") {\n\t\t\tif (!$this->check_mail_address($bcc)) {\n\t\t\t\t$this->msg[] = \"Error, the \\\"Bcc\\\" address is not valid.\";\n\t\t\t\t$this->valid_mail_adresses = false;\n\t\t\t\t} \n\t\t\t}\n\t\tif ($this->valid_mail_adresses) {\n\t\t\t$this->from_name = $this->strip_line_breaks($name);\n\t\t\t$this->from_mail = $this->strip_line_breaks($from);\n\t\t\t$this->mail_to = $this->strip_line_breaks($to);\n\t\t\t$this->mail_cc = $this->strip_line_breaks($cc);\n\t\t\t$this->mail_bcc = $this->strip_line_breaks($bcc);\n\t\t\t$this->mail_subject = $this->strip_line_breaks($subject);\n\t\t}else{\n\t\t\treturn;\n\t\t\t}\t\t\n\t\t}",
"function Email_Message( $body, $type='text/plain') {\n\t\t\n\t\t$this->message_body = $body;\n\t\t$this->message_type = $type;\n\t\n\t}",
"function sendMail($code, $replace)\n{\n\t$q_1 = mysql_query(\"SELECT default_email FROM system_configuration WHERE id='1'\");\n\t$row_1 = mysql_fetch_array($q_1);\n\n\t//Fetching Email Template According to User Selected Language \n\t$q_2=\"select subject, message from notifications where code='$code' and language='$replace[lang]'\"; \n\t$sql_2=mysql_query($q_2); \n\t$tot_rws=mysql_num_rows($sql_2);\n\n\tif($tot_rws==0)\n\t{\n\t\t$q_3=\"SELECT nt.subject, nt.message FROM notifications nt INNER JOIN languages lang ON lang.code=nt.language WHERE lang.default_lang='1' LIMIT 1\"; \n\t\t$sql_2 = mysql_query($q_3);\n\t}\n\t\n\t$row=mysql_fetch_array($sql_2);\n\t$to = $replace['email'];\n\t$subject = $row['subject'];\n\t$msg = $row['message'];\n\tforeach($replace as $k=>$v)\n\t{\n\t\t$subject = str_replace(\"$\".$k, $v, $subject);\n\t\t$msg = str_replace('$'.$k, $v, $msg);\n\t}\n\t$message = $msg;\n\t$headers = 'From: Cloudways <'.$row_1['default_email'].'>' . \"\\r\\n\" .\n\t\t'Reply-To: '.$row_1['default_email'].'' . \"\\r\\n\" .\n\t\t'MIME-Version: 1.0' . \"\\r\\n\" .\n\t\t'Content-type: text/html; charset=utf-8' . \"\\r\\n\" .\n\t\t'X-Mailer: PHP/' . phpversion();\n\t\t\n\t//adding email log\n\t$q\t= \"INSERT INTO email_log SET email='$to', sent_on=NOW(), subject='$subject', content='\".mysql_escape_string($message).\"'\";\n\t$sql\t= @mysql_query($q);\t\n\n\t//sending email\n\tmail($to, $subject, $message, $headers, '-f '.$row_1['default_email'].'');\n\t//echo $to.'<br />'.$subject.'<br />'.$message.'<br />'.$headers.'<br />'.'-f '.$row_1['default_email'].'<br /><br />';\n}",
"function _before_filter(){\n\t\t$this->content_type = \"text/plain\";\n\t\t$this->content_charset = DEFAULT_CHARSET; // \"UTF-8\"\n\t\t$this->from = DEFAULT_EMAIL;\n\t}",
"function mail_utf82($to, $from_user, $from_email, $subject = '(No subject)', $message = ''){\n $from_user = \"=?UTF-8?B?\".base64_encode($from_user).\"?=\"; // $from_user = \"=?utf-8?Q?\".($from_user).\"=\";\n //$from_user = \"=?UTF-8?Q?\".($from_user).\"?=\";\n //$from_user = \"=?utf-8?Q?=D0=A4=D0=BE=D0=BD=D0=B4?=\";\n\n\n $subject = \"=?UTF-8?B?\".base64_encode($subject).\"?=\"; //Content-type: text/html;\n $mime = \"\\r\\nMIME-Version: 1.0\" . \"Content-type: multipart/alternative; charset=UTF-8\";\n $mime = \"\\r\\nMIME-Version: 1.0\" . \"Content-type: text/html; charset=UTF-8 \\r\\nContent-Transfer-Encoding: 7bit\";\n\n $headers = \"From: $from_user <$from_email> $mime\"; $headers = \"From: <$from_email>\"; // . \"\\r\\n\"\n\n return mail($to, $subject, $message, $headers);\n }",
"function send_mails() {\n\t //$myactivebatch = $this->load_saved_batch();//load direct from file\n\t $myactivebatch = GetParam('batchrestore');//load in html form field and save as param\n\t //echo '>',$myactivebatch;\n\t \n\t $batch = GetReq('batchid');\n\t $bid = GetParam('bid')?GetParam('bid'):0; \n\t \t \n\t $include_subs = GetParam('includesubs');\n\t $include_all = GetParam('includeall');\t \n\t $subscribers = $include_subs?$include_subs:$include_all;//one or another\n\t\n\t $from = GetParam('from');\n\t $to = GetParam('to');\t \n\t $subject = GetParam('subject');\n\t \n\t if ($this->template) {\n\t if ($this->dirdepth) {\n\t\t for($i=0;$i<$this->dirdepth;$i++)\n\t\t\t $backdir .= \"../\";\n\t\t }\n\t\t else\n\t\t $backdir = \"../\";\n\t\t //repalce viewable data to send data (absolute dir)\t \n\t\t //echo $backdir;\n\t\t if ($this->mailbody)//get session text with headers\n\t\t $body = $this->mailbody;\n\t\t else //get text area\n\t $body = str_replace($backdir,$this->url.$this->infolder.'/',GetParam('mail_text')); \t \n\t }\t \n\t else\t{ //text area or session text with headers\n\t \n\t if (GetReq('editmode')) {\n\t\t $mytext = $this->mailbody?$this->mailbody:GetParam('mail_text');\n\t\t $body = $this->unload_spath($mytext);\n\t\t }\n\t\t else\n\t $body = $this->mailbody?$this->mailbody:GetParam('mail_text'); \n\t }\t \t \n\t \t \n\t\t \n\t if ($subscribers) {// || ($batch)) {//if sybs checked or batch in process..\n\t \n\t //save the current mail campaign state\n\t $this->save_current_batch($batch);\t\n\t \t \t \n\t //$subs = $this->subs_mail;\n\t\t \n\t\t //workinh batch tosend\n\t\t $subs = $this->getmails($include_all,$this->batch,$bid);\n\t\t \n\t if (($batch>=0) && ($batch>=$myactivebatch)) {\n\n\t //if ($res = GetGlobal('controller')->calldpc_method('rcshmail.sendit use '.$from.'+'.$to.'+'.$subject.'+'.$body.'+'.$subs)) {\n if ($res = $this->sendit($from,$to,$subject,$body,$subs,$this->ishtml)) {\n\t $this->mailmsg = $res . \" mail(s) send!\";\n\t }\t \n\t else \n\t $this->mailmsg = \"Send failed\";\n\t\t }\n\t\t else \t\n\t\t $this->mailmsg = \"Send bypassed\"; \n\t }\t \n\t else {//one receipent\n\t //if ($res = GetGlobal('controller')->calldpc_method('rcshmail.sendit use '.$from.'+'.$to.'+'.$subject.'+'.$body))\n\t\t if ($res = $this->sendit($from,$to,$subject,$body,null,$this->ishtml)) \n\t\t $this->mailmsg = $res . \" mail(s) send!\";\n\t\t else\n\t\t $this->mailmsg = \"Send failed\";\t\n\t }\t \n\t\t \n\t //auto refresh\n\t $refresh = GetParam('refresh')?GetParam('refresh'):$this->auto_refresh;\n\t if (($refresh>0) && ($res==$this->batch)) {\n $this->refresh_bulk_js(seturl('t=cpsubsend&batchid='.($bid+1).'&batch='.$this->batch.'&refresh='.$refresh),$refresh);\t\t\t \n\t $this->mailmsg .= \"Wait for next batch \" . $this->timeout;\t\t \n\t }\t \n\t \n\t //test\n\t //return $this->batch;\n //return (400);\t \t //??????????????????????????????????????????????????\n\t //echo '---------------------',$res,'---------------------------<br>';\n\t \n\t if ($res<$this->batch) //means end of campaign\n\t $this->reset_batch_state();\n\t \n\t return ($res);//how many mails tried to send (batch...)\t \n\t}",
"protected function setLocaleForMailer(): void\n {\n if (function_exists('switch_to_locale') && ($locale = $this->params->locale)) {\n \\switch_to_locale($locale);\n }\n }",
"abstract function getSubject() : string;",
"public function sendnotificationemails($type,$to,$subject,$username,$linkhref){\r\n\r\n $bodyhead=\"<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>\r\n <html xmlns='http://www.w3.org/1999/xhtml'>\r\n <head>\r\n <meta http-equiv='Content-Type' content='text/html; charset=utf-8' />\r\n <title>\".$this->getsettings('sitetitle','text').\"</title>\r\n </head><body>\";\r\n if( $this->getsettings('email','logoshow') == '1' ) {\r\n $body = \"<img src='\".$this->getsettings('logo','url').\"' alt='\".$this->getsettings('sitetitle','text').\"' title='\".$this->getsettings('sitetitle','text').\"'/>\";\r\n }\r\n else {\r\n $body = '';\r\n }\r\n\r\n $link = \"<a href='\".$linkhref.\"'>\".$this->getsettings($type,'linktext').\"</a>\";\r\n $emContent = $this->getsettings($type,'text');\r\n $emContent = str_replace(\"[username]\",$username,$emContent);\r\n $emContent = str_replace(\"[break]\",\"<br/>\",$emContent);\r\n $emContent = str_replace(\"[linktext]\",$link,$emContent);\r\n\r\n $body .=\"<p>\".$emContent.\"</p>\";\r\n\r\n $from = $this->getsettings('email','fromname');\r\n $from_add = $this->getsettings('email','fromemail');\r\n $headers = \"MIME-Version: 1.0\" . \"\\r\\n\";\r\n $headers .= \"Content-type:text/html;charset=iso-8859-1\" . \"\\r\\n\";\r\n $headers .= \"From: =?UTF-8?B?\". base64_encode($from) .\"?= <$from_add>\\r\\n\" .\r\n 'Reply-To: '.$from_add . \"\\r\\n\" .\r\n 'X-Mailer: PHP/' . phpversion();\r\n mail($to,$subject,$bodyhead.$body.'</body></html>',$headers, '-f'.$from_add);\r\n\r\n if( $type == 'forgotpwdemail' ) {\r\n return '7#email';\r\n }\r\n else {\r\n return '7#register';\r\n }\r\n\r\n die();\r\n\t}",
"function templ_send_email($fromEmail,$fromEmailName,$toEmail,$toEmailName,$subject,$message,$extra='')\r\n{\r\n\t\r\n\t$fromEmail = apply_filters('templ_send_from_emailid', $fromEmail);\r\n\t$fromEmailName = apply_filters('templ_send_from_emailname', $fromEmailName);\r\n\t$toEmail = apply_filters('templ_send_to_emailid', $toEmail);\r\n\t$toEmailName = apply_filters('templ_send_to_emailname', $toEmailName);\r\n\t$headers = 'MIME-Version: 1.0' . \"\\r\\n\";\r\n\t$headers .= 'Content-type: text/html; charset=UTF-8' . \"\\r\\n\";\r\n\t\r\n\t/* Additional headers*/\r\n\t/*$headers .= 'To: '.$toEmailName.' <'.$toEmail.'>' . \"\\r\\n\";*/\r\n\t\r\n\tif( $fromEmail!=\"\" ) {\r\n\t\t$headers .= 'From: '.$fromEmailName.' <'.$fromEmail.'>' . \"\\r\\n\";\r\n\t} else {\r\n\t\t$headers .= 'From: '.get_option('admin_email').\"\\r\\n\";\r\n\t}\r\n\t\r\n\t$subject = apply_filters('templ_send_email_subject', $subject);\r\n\t$message = apply_filters('templ_send_email_content', $message);\r\n\t$headers = apply_filters('templ_send_email_headers', $headers);\r\n\t\r\n\t$subject = '=?UTF-8?B?'.base64_encode($subject).'?=';\r\n\r\n\t/* Mail it*/\r\n\tif(templ_fetch_mail_type())\r\n\t{\r\n\t\t@mail($toEmail, $subject, $message, $headers);\t\r\n\t}else\r\n\t{\r\n\t\twp_mail($toEmail, $subject, $message, $headers);\t\r\n\t}\r\n\t\r\n}",
"function envoyer_message_mail($values)\n{\n\t$mot = $GLOBALS['mot'];\n\t$phrase = $GLOBALS['phrase'];\n\t$val = FALSE;\n\t\n\tif (verif_email($values['Email']) == TRUE)\n\t{\n\t\t$contenu = array(\t$mot['Message'] => $values['Message'],\n\t\t\t\t\t\t\t\t\t\t\t$mot['Entreprise'] => $values['Entreprise'],\n\t\t\t\t\t\t\t\t\t\t\t$mot['Nom'] => $values['Nom'],\n\t\t\t\t\t\t\t\t\t\t\t$mot['Email'] => $values['Email'] );\n\t\t\t\t\t\t\t\n\t\t$contenu_message = corps_email($contenu);\n\t\t// Si le message a bien été envoyé, on affiche un message de validation\n\t\t// et on enregistre le message dans la base de données\n\t\t\n\t\tif (envoi_email($values['Email'], NOM_SITE, EMAIL, $values['Email'], $phrase['UnNouveauMessage'], $contenu_message) == TRUE)\n\t\t{\n\t\t\tif (ajouter_message_db($values) == TRUE)\n\t\t\t{\n\t\t\t\t$val = TRUE;\n\t\t\t}\n\t\t}\n\t}\n\treturn $val;\n}",
"public function __construct()\n {\n parent::__construct('simple_mail');\n\n $contactRepository = tx_caretaker_ContactRepository::getInstance();\n\n $this->mail_from = $this->getConfigValue('mail_from');\n $this->mail_subject = $this->getConfigValue('mail_subject');\n $this->mail_link = $this->getConfigValue('mail_link');\n $this->mail_link = $this->getConfigValue('mail_link');\n $this->mail_roles = array();\n $role_ids = explode(',', $this->getConfigValue('role_ids'));\n foreach ($role_ids as $role_id) {\n $role = $contactRepository->getContactRoleById(trim($role_id));\n if (!$role && is_numeric($role_id)) {\n $role = $contactRepository->getContactRoleByUid(intval($role_id));\n }\n if ($role) {\n $this->mail_roles[] = $role;\n }\n }\n }",
"private function mailerNative()\n { \n if( ! mail($this->rcptToCtring, $this->subject, $this->message, $this->header()) ){\n $this->debugMessages[] = 'Error: Sending email failed';\n return false;\n }\n else {\n $this->debugMessages[] = 'Success: Sending email succeeded';\n return true;\n }\n }",
"function SendEmail($to, $subject, $body, $from=\"\", $cc=\"\", $bcc=\"\", $type=\"text/plain\") {\n global $dbAccess, $smarty;\n\n if ($from) {\n $fromMailcheck = $this->SpamCheck($from);\n if ($fromMailcheck == false) {\n $errorMsg[] = \"Invalid From email address.\";\n $smarty->assign(\"errorMsg\", $errorMsg);\n return false;\n }\n }\n\n if ($to) {\n $toMailcheck = $this->SpamCheck($to);\n if ($toMailcheck == false) {\n $errorMsg[] = \"Invalid To email address.\";\n $smarty->assign(\"errorMsg\", $errorMsg);\n return false;\n }\n }\n\n $user = $dbAccess->UserLoad(\"UserType = 'admin'\");\n\n $defaultFrom = $user['UserEmail'];\n\n // Bundle up the variables into a structured array for altering.\n $message = array(\n 'to' => $to,\n 'from' => (isset($from) && $from != '') ? $from : $defaultFrom,\n 'subject' => '',\n 'body' => array()\n );\n\n\n // Build the default headers\n $headers = array(\n 'MIME-Version' => '1.0',\n 'Content-Type' => $type . '; charset=UTF-8; format=flowed; delsp=yes',\n 'Content-Transfer-Encoding' => '8Bit',\n 'X-Mailer' => PROJECT_NAME\n );\n\n if ($defaultFrom) {\n // To prevent e-mail from looking like spam, the addresses in the Sender and\n // Return-Path headers should have a domain authorized to use the originating\n // SMTP server. Errors-To is redundant, but shouldn't hurt.\n $headers['From'] = $headers['Reply-To'] = $headers['Sender'] = $headers['Return-Path'] = $headers['Errors-To'] = $defaultFrom;\n }\n if ($from) {\n $headers['From'] = $headers['Reply-To'] = $from;\n }\n $message['headers'] = $headers;\n\n $message['body'] = $body;\n $message['subject'] = $subject;\n\n // Optionally send e-mail.\n $message['result'] = $this->EMail($message);\n\n // Log errors\n if (!$message['result']) {\n $errorMsg[] = \"Unable to send e-mail. Please contact the site admin, if the problem persists.\";\n $smarty->assign(\"errorMsg\", $errorMsg);\n }\n\n return $message['result'];\n }",
"function mail()\n {\n\n\n }",
"function html_mail( $to, $subject, $message, $from_email, $from_name ){\n if( is_array( $to ) ){\n \n // Implode the array and create a string with it\n $to = implode( ',', $to );\n \n }\n \n // Add some inline styles to the email (won't overwrite if the user adds their own)\n $message = str_replace( '<p>', '<p style=\"color:#000;>\"', $message );\n \n // In case any of our lines are larger than 70 characters, we should use wordwrap()\n $message = wordwrap( $message, 70, \"\\r\\n\");\n \n // To send HTML mail, the Content-type header must be set\n $headers[] = 'MIME-Version: 1.0';\n $headers[] = 'Content-type: text/html; charset=utf-8';\n \n // Set the from and reply-to addresses\n\tif( is_string( $from_email ) && is_string( $from_name ) ){\n\t\t$headers[] = 'From: ' . $from_name . '<' . $from_email . '>';\n\t\t$headers[] = 'Reply-To: ' . $from_name . '<' . $from_email . '>';\n\t}\n \n // Send the email\n return mail( $to, $subject, $message, implode(\"\\r\\n\", $headers ) );\n \n \n}",
"function supermailer ($h) {\r\n $mail_addheaders = array();\r\n $mail_addheaders[] = 'From: '.$h['from'];\r\n $h['replyto'] == ''? $h['from']:$h['replyto']; # avoid anti-spam\r\n $mail_addheaders[] = 'Reply-To: '.$h['replyto'];\r\n if ($h['bcc'])\r\n $mail_addheaders[] = 'Bcc: '.$h['bcc'];\r\n $mail_addheaders[] = 'X-Mailer: '.(($GLOBALS['mail_xmailer'] == '')? 'supermailer/dsw/sh/2004': $GLOBALS['mail_xmailer']);\r\n $mail_addheaders_str = join(\"\\r\\n\",$mail_addheaders);\r\n #~ echo $mail_addheaders_str;exit;\r\n\r\n $mail_body = $h['body'];\r\n $mail_to = $h['to'];\r\n $mail_subject = $h['subject'];\r\n\r\n # Some MTA confuse \\r\\n and translate it to \\n\\n, causing double lines. This will makes them happy:\r\n $mail_addheaders_str = str_replace(\"\\r\\n\", \"\\n\", $mail_addheaders_str);\r\n $mail_body = str_replace(\"\\r\\n\", \"\\n\", $mail_body);\r\n\r\n return mail($mail_to, $mail_subject, $mail_body, $mail_addheaders_str);\r\n\r\n}",
"abstract public function get_message();",
"public static function sendEmail($user,$RDV) : bool {\n\n $user = parent::findBy($user->getEmail(), 'email');\n\n $to = $user->getEmail();\n $from = \"<[email protected]>\";\n $subject = 'CHUO NEWSLETTER : Reclamation';\n $message = '\n <html>\n <head>\n <style>\n .banner-color {\n background-color: #eb681f;\n }\n .title-color {\n color: #0066cc;\n }\n .button-color {\n background-color: #0066cc;\n }\n @media screen and (min-width: 500px) {\n .banner-color {\n background-color: #0066cc;\n }\n .title-color {\n color: #eb681f;\n }\n .button-color {\n background-color: #eb681f;\n }\n }\n </style>\n </head>\n <body>\n <div style=\"background-color:#ececec;padding:0;margin:0 auto;font-weight:200;width:100%!important\">\n <table align=\"center\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"table-layout:fixed;font-weight:200;font-family:Helvetica,Arial,sans-serif\" width=\"100%\">\n <tbody>\n <tr>\n <td align=\"center\">\n <center style=\"width:100%\">\n <table bgcolor=\"#FFFFFF\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"margin:0 auto;max-width:512px;font-weight:200;width:inherit;font-family:Helvetica,Arial,sans-serif\" width=\"512\">\n <tbody>\n <tr>\n <td bgcolor=\"#F3F3F3\" width=\"100%\" style=\"background-color:#f3f3f3;padding:12px;border-bottom:1px solid #ececec\">\n <table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"font-weight:200;width:100%!important;font-family:Helvetica,Arial,sans-serif;min-width:100%!important\" width=\"100%\">\n <tbody>\n <tr>\n <td valign=\"middle\" width=\"50%\" align=\"right\" style=\"padding:0 0 0 10px\"><span style=\"margin:0;color:#4c4c4c;white-space:normal;display:inline-block;text-decoration:none;font-size:12px;line-height:20px\">'.date(\"Y-m-d\").'</span></td>\n <td width=\"1\"> </td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n <tr>\n <td align=\"left\">\n <table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"font-weight:200;font-family:Helvetica,Arial,sans-serif\" width=\"100%\">\n <tbody>\n <tr>\n <td width=\"100%\">\n <table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"font-weight:200;font-family:Helvetica,Arial,sans-serif\" width=\"100%\">\n <tbody>\n <tr>\n <td align=\"center\" bgcolor=\"#8BC34A\" style=\"padding:20px 48px;color:#ffffff\" class=\"banner-color\">\n <table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"font-weight:200;font-family:Helvetica,Arial,sans-serif\" width=\"100%\">\n <tbody>\n <tr>\n <td align=\"center\" width=\"100%\">\n <img src=\"../img/logo-accueil.png\" alt=\"Centre Hospitalier Universitaire Mohammed VI OUJDA\">\n </td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n <tr>\n <td align=\"center\" style=\"padding:20px 0 10px 0\">\n <table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"font-weight:200;font-family:Helvetica,Arial,sans-serif\" width=\"100%\">\n <tbody>\n <tr>\n <td align=\"center\" width=\"100%\" style=\"padding: 0 15px;text-align: justify;color: rgb(76, 76, 76);font-size: 12px;line-height: 18px;\">\n <h3 style=\"font-weight: 600; padding: 0px; margin: 0px; font-size: 16px; line-height: 24px; text-align: center;\" class=\"title-color\">Bonjour '.$user->getNom().',</h3>\n <p style=\"margin: 20px 0 30px 0;font-size: 15px;text-align: center;\">L\\'Etat du votre Rendez-vous que vous avez reservé pour '.$RDV->getDateRdv().' a été changer!</p>\n <div style=\"font-weight: 200; text-align: center; margin: 25px;\"><a style=\"padding:0.6em 1em;border-radius:600px;color:#ffffff;font-size:14px;text-decoration:none;font-weight:bold\" class=\"button-color\">Consulter votre compte pour plus de détails</a></div>\n </td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n <tr>\n </tr>\n <tr>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n <tr>\n <td align=\"left\">\n <table bgcolor=\"#FFFFFF\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"padding:0 24px;color:#999999;font-weight:200;font-family:Helvetica,Arial,sans-serif\" width=\"100%\">\n <tbody>\n <tr>\n <td align=\"center\" width=\"100%\">\n <table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"font-weight:200;font-family:Helvetica,Arial,sans-serif\" width=\"100%\">\n <tbody>\n <tr>\n <td align=\"center\" valign=\"middle\" width=\"100%\" style=\"border-top:1px solid #d9d9d9;padding:12px 0px 20px 0px;text-align:center;color:#4c4c4c;font-weight:200;font-size:12px;line-height:18px\">Regards,\n <br><b>The CHUO Team</b>\n </td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n <tr>\n <td align=\"center\" width=\"100%\">\n <table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"font-weight:200;font-family:Helvetica,Arial,sans-serif\" width=\"100%\">\n <tbody>\n <tr>\n <td align=\"center\" style=\"padding:0 0 8px 0\" width=\"100%\"></td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n </tbody>\n </table>\n </center>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n </body>\n </html>';\n\n //from w3schools\n $headers = 'From: ' . $from . \"\\r\\n\".\n \"MIME-Version: 1.0\" . \"\\r\\n\" .\n \"Content-type: text/html; charset=UTF-8\" . \"\\r\\n\";\n\n if(mail($to, $subject, $message, $headers))\n //Email Sended\n return true;\n else\n return false;\n\n }",
"function send_email($recipient, $sender = \"[email protected]\", $subject, $text = null, $html = null)\n{\n\n\tinclude('Mail.php');\n\tinclude('Mail/mime.php');\n\n\t$crlf = \"\\r\\n\";\n\t$hdrs = array(\n\t\t'From' => $sender,\n\t\t'Subject' => $subject,\n\t);\n\t$mime = new Mail_mime($crlf);\n\t$mime->setTXTBody($text);\n\tif ($html) {\n\t\t$mime->setHTMLBody($html);\n\t}\n\t$body = $mime->get();\n\t$hdrs = $mime->headers($hdrs);\n\t$mail =& Mail::factory('mail');\n\t//$mail->send($recipient, $hdrs, $body);\n\t$mail->send($recipient, $hdrs, $body);\n\n}",
"function errorMailExiste(){\n\t\t$content='\n\t\t\t<div><h3>'.htmlspecialchars($this->pi_getLL(\"txt_error_mail\")).'<br/></h3><hr/></div>';\n\t\t$content .=$this->getFormulaireVide();\n\t\treturn $content;\n\t}",
"function Email($from=\"\", $to=\"\", $cc=\"\", $bcc=\"\", $subject=\"\", $smtp_server=EMAIL_SMTP_SERVER, $smtp_port=EMAIL_SMTP_PORT, $pop3_user=EMAIL_POP3_USER, $pop3_pass=EMAIL_POP3_PASS, $pop3_server=EMAIL_POP3_SERVER, $pop3_port=EMAIL_POP3_PORT, $socket_timeout=EMAIL_CONNECTION_TIMEOUT) {\n\t\t\n\t\t$this->smtp_server \t= $smtp_server;\n\t\t$this->smtp_port \t= $smtp_port;\n\t\t$this->smtp_fp\t\t= 0;\n\t\t\n\t\t$this->email_from \t= $from;\n\t\t$this->email_to\t\t= $to;\n\t\t$this->email_cc\t\t= $cc;\n\t\t$this->email_bcc\t= $bcc;\n\t\t\n\t\t$this->email_rcptlist\t= array();\n\t\t\n\t\t$this->email_subject\t= $subject;\n\n\t\t$this->email_messages = array();\n\t\t$this->email_attachments = array();\n\t\t\n\t\t$this->email_boundry_message = '_-_Message-Boundry_-_';\n\t\t$this->email_boundry_parts = '_-_Message-Parts_-_';\n\t\t\n\t\t$this->pop3_authenticate = false;\n\t\t\n\t\t$this->pop3_user\t= $pop3_user;\n\t\t$this->pop3_pass\t= $pop3_pass;\n\t\t$this->pop3_server\t= $pop3_server;\n\t\t$this->pop3_port\t= $pop3_port;\n\t\t\n\t\t$this->socket_timeout = $socket_timeout;\n\t\n\t\t$this->debug_mode\t= false;\n\t\t$this->debug_data\t= '';\n\t\t\n\t}",
"public function configMail() {\n add_filter('wp_mail_content_type', function($type) {return 'text/html';});\n add_filter('wp_mail_from_name', function() {return 'Portfolio Site';});\n add_filter('wp_mail_from', function() {return 'wordpress@' . $_SERVER['HTTP_HOST'];});\n }",
"function send_email($recipient, $sender,$sender_name, $subject, $message,$text_message,$bouncemail=0,$campaign_id=0, $campaign_type = 'html',$notification=false,$subscriber_replace_arr=array(), $vmta='rcmailsv.com', $reply_to_email=''){\n $CI =& get_instance();\n\t$CI->load->model('is_authorized');\n $sess_user = $CI->session->userdata('member_id');\n if (!isset($sess_user)) exit;\n\n\t$email_personalize_arr=array();\n\t$search_email_personalize=get_email_personalize_data($email_personalize_arr);\n\t$arrPersonalizeReplace=get_fallback_value($message,$text_message,$email_personalize_arr);\t# Replace fallback value\n\t$subscriber_key_arr=array('subscriber_first_name','subscriber_last_name','subscriber_email_address','subscriber_state','subscriber_zip_code','subscriber_country','subscriber_city','subscriber_company','subscriber_dob','subscriber_phone','subscriber_address');\n require_once(\"phpmailer/class.phpmailer.php\");\n\n $mail = new PHPMailer();\n\t\n\t//SMTP begin\n $mail->IsSMTP();// set mailer to use SMTP\n\t$mail->SMTPDebug = 1; // debugging: 1 = errors and messages, 2 = messages only\n\t$mail->SMTPAuth = false; // authentication enabled\n\tif(in_array($vmta,config_item('lw_vmta'))){\n\t\t$mail->Host = \"host.redcappi.net\";\n\t\t$mail->Port = 2525; \n\t\t$SenderDomain =\"bounce.redcappi.net\";\n\t}elseif(in_array($vmta,config_item('lw2_vmta'))){\n\t\t$mail->Host = \"mail.rcmailsv.com\";\n\t\t$mail->Port = 2525; \n\t\t$SenderDomain =\"bounce.rcmailsv.com\";\n\t}elseif(in_array($vmta,config_item('lw3_vmta'))){\n\t\t$mail->Host = \"mail.mailsvrc.com\";\n\t\t$mail->Port = 2525; \n\t\t$SenderDomain =\"bounce.mailsvrc.com\";\n\t}elseif(in_array($vmta,config_item('ph_vmta'))){\n\t\t$mail->Host = \"mta01.redcappi.net\";\n\t\t$mail->Port = 25; \n\t\t$SenderDomain =\"bounce.redcappi.com\";\n }elseif(in_array($vmta,config_item('lw4_vmta'))){\n\t\t$mail->Host = \"mail.mailsvrc2.com\";\n\t\t$mail->Port = 2525; \n\t\t$SenderDomain =\"bounce.mailsvrc2.com\";\n }elseif(in_array($vmta,config_item('lw5_vmta'))){\n\t\t$mail->Host = \"mail.mailsvrc3.com\";\n\t\t$mail->Port = 2525; \n\t\t$SenderDomain =\"bounce.mailsvrc3.com\";\n }elseif(in_array($vmta,config_item('lw6_vmta'))){\n\t\t$mail->Host = \"mail.mailsvrc4.com\";\n\t\t$mail->Port = 2525; \n\t\t$SenderDomain =\"bounce.mailsvrc4.com\";\n }elseif(in_array($vmta,config_item('lw7_vmta'))){\n\t\t$mail->Host = \"mail.mailsvrc5.com\";\n\t\t$mail->Port = 2525; \n\t\t$SenderDomain =\"bounce.mailsvrc5.com\";\n }elseif(in_array($vmta,config_item('lw8_vmta'))){\n\t\t$mail->Host = \"mail.mailsvrc6.com\";\n\t\t$mail->Port = 2525; \n\t\t$SenderDomain =\"bounce.mailsvrc6.com\";\n\t} elseif (in_array($vmta, config_item('spark_vmta'))) {\n $mail->SMTPAuth = TRUE;\n $mail->Username = base64_encode('SMTP_Injection');\n $mail->Password = base64_encode('e39af39c5cdaf01d2f423f85562cea74b05feac4');\n $mail->Host = \"smtp.sparkpostmail.com\";\n $mail->Hostname = \"smtp.sparkpostmail.com\";\n $mail->Port = 587;\n $mail->SMTPSecure =\"tls\";\n $SenderDomain = \"spark.redcappi.com\";\n } else{\n \n\t\t$mail->Host = \"mail.rcmailcorp.com\";\n\t\t$mail->Port = 2525; \n\t\t$SenderDomain =\"bounce.rcmailcorp.com\";\n\t}\n\t \n\t\n $mail->FromName = $sender_name;\n $mail->From = $sender;\t\n\tif(trim($reply_to_email) != ''){\n\t\t$mail->AddReplyTo($reply_to_email, $sender_name);\n\t}\n \n\t// Send email to recivier by array\n\tif(is_array($recipient)){\n\t\tforeach($recipient as $key=>$v){\n\t\t\tunset($recipient_info);\n\t\t\t#explode recipient info\n\t\t\t$recipient_info=explode(\"||\",$v);\n\t\t\t$encodedSubscriber = $CI->is_authorized->encodeSubscriber($key,$recipient_info[0]);\n\t\t\t\n\t\t\t$mail->ClearAddresses();\n\t\t\t$mail->ClearAttachments();\n\t\t\t$mail->ClearCustomHeaders();\n\t\t\t$mail->IsHTML(false);\n\t\t\t$expl_arr=array();\n\t\t\t//$mail->Sender=base64_encode($key).'@'. $SenderDomain ;\t\t\t\n\t\t\t//$mail->AddCustomHeader('Sender: '.base64_encode($key).'@'.$SenderDomain);\t\n\t\t\t$mail->AddCustomHeader('x-envid:'.$campaign_id);\n\t\t\t\n\t\t\t$mail->AddCustomHeader('x-fblid:'.$key.'-'.$campaign_id.'-'.CAMPAIGN_HEADER_SUFFIX);\t\t\t\t\n\t\t\t$mail->AddCustomHeader('x-job:'.$key);\t\n\t\t\t$mail->AddCustomHeader('x-virtual-mta: '.$vmta);\t \t\t\t\n\t\t\t$mail->AddCustomHeader('List-Unsubscribe: <mailto:[email protected]?subject=Unsubscribe '.$encodedSubscriber.'>, <http://www.'.SYSTEM_DOMAIN_NAME.'/newsletter/unsubscribe_mail/unsubscribe/'.$campaign_id.'/'.$encodedSubscriber.'>');\n $mail->AddCustomHeader('Message-ID:<' . strtotime('now') . $campaign_id . '@bounce.' . $vmta . '>');\n $mail->AddCustomHeader('Sender:' . $sender);\n $mail->AddCustomHeader('Precedence:bulk');\n $mail->AddCustomHeader('Return-Path:' . base64_encode($sender) . \"@bounce.\" . $vmta);\n\t\t\t\n\t\t\t$mail->AddAddress($recipient_info[0],$recipient_info[1]);// recipient email address\n\t\t\t$arrSearchStr = array('[subscriber_id]','[CONTACT_EMAIL_ID]');\n\t\t\t\n\t\t\t$arrReplaceBy =array($encodedSubscriber,$recipient_info[0]);\n\t\t\t$expl_arr=explode(\"||\",$subscriber_replace_arr[$key]);\n\t\t\t$expl_arr = array_combine($subscriber_key_arr, $expl_arr);\n\t\t\t$expl_arr = array_filter($expl_arr);\n\t\t\tif(is_array($expl_arr)){\n\t\t\t\t$replace_email_personalize = array_merge($arrPersonalizeReplace,$expl_arr);\n\t\t\t}else{\n\t\t\t\t$replace_email_personalize=$arrPersonalizeReplace;\n\t\t\t}\n\t\t\t#Email Personalization on campaign content\n\t\t\t$message_cnt=str_replace($search_email_personalize, $replace_email_personalize, $message);\n\t\t\t$message_cnt=str_replace($arrSearchStr, $arrReplaceBy, $message_cnt);\n\t\t\t#Email Personalization on campaign text content\n\t\t\t$text_message_content=str_replace($search_email_personalize, $replace_email_personalize, $text_message);\n\t\t\t$text_message_content=str_replace($arrSearchStr, $arrReplaceBy, $text_message_content);\n\t\t\n\t\t\t#Email Personalization on campaign subject\n\t\t\t$campaign_subject=str_replace($search_email_personalize, $replace_email_personalize, $subject);\n\t\t\t$campaign_subject=str_replace($arrSearchStr, $arrReplaceBy, $campaign_subject);\n\t\t\t\n\t\t\t$body = $message_cnt;\n\t\t\t\n\t\t\t# the HTML to the plain text. Store it into the variable. \n\t\t\t$text = $text_message_content;\n\t\t\t$mail->Subject = $campaign_subject;\n $mail->AddCustomHeader('Message-ID:<' . strtotime('now') . $campaign_ . '@bounce.' . $vmta . '>');\n $mail->AddCustomHeader('Sender:' . $sender);\n $mail->AddCustomHeader('Precedence:bulk');\n $mail->AddCustomHeader('Return-Path:' . base64_encode($sender) . \"@bounce.\" . $vmta);\n\t\t\t\n\t\t\tif($campaign_type == 'html'){\n\t\t\t\t$mail->AltBody = $text;\n\t\t\t\t$mail->MsgHTML($body);\n\t\t\t}else{\n\t\t\t\t$mail->Body = $text;\n\t\t\t}\n \n\n $mail->Send();\n\t\t}\n\t}else{\n\t\t$message_cnt=$message;\n\t\t$body = $message_cnt;\n\t\t$emailz = explode(\",\",$recipient);\n\t\t$mailCt = count($emailz);\t\t\n\t\t$mail->Sender=\"testmail@\".$SenderDomain;\n\t\t//$mail->AddCustomHeader('Sender: testmail@'.$SenderDomain);\t\n\t\t$mail->AddCustomHeader('x-envid:'.$campaign_id);\n\t\t$mail->AddCustomHeader('x-fblid: testmail-'.$campaign_id.'-'.CAMPAIGN_HEADER_SUFFIX);\t\n\t\t$mail->AddCustomHeader('Message-ID:<' . strtotime('now') . $campaign_id . '@bounce.' . $vmta . '>');\n $mail->AddCustomHeader('Sender:' . $sender);\n $mail->AddCustomHeader('Precedence:bulk');\n $mail->AddCustomHeader('Return-Path:' . base64_encode($sender) . \"@bounce.\" . $vmta);\n\t\t\t\n\t\t$mail->AddCustomHeader('x-job: testmail');\t\t\t\n\t\tfor($i=0; $i<$mailCt; $i++){\n\t\t\t$tu= $emailz[$i];\n\t\t\t$mail->AddAddress($tu);\n\t\t}\n\t\t// the HTML to the plain text. Store it into the variable. \n\t\t$mail->Subject = $subject;\n\t\t$mail->AddCustomHeader('x-virtual-mta: '.$vmta);\t \n\t\tif($campaign_type == 'html'){\n\t\t\t$mail->AltBody = $text_message;\n\t\t\t$mail->MsgHTML($body);\n\t\t}else{\n\t\t\t$mail->Body = $text_message;\n\t\t}\n\t\t\n\t\t$mail->Send();\n\t} \n$mail->SmtpClose();\t\n\t//mail end\n}",
"function bp_course_wp_mail($to,$subject,$message,$args=''){\n if(!count($to))\n return;\n \n $headers = \"MIME-Version: 1.0\" . \"\\r\\n\";\n $settings = get_option('lms_settings');\n if(isset($settings['email_settings']) && is_array($settings['email_settings'])){\n if(isset($settings['email_settings']['from_name'])){\n $name = $settings['email_settings']['from_name'];\n }else{\n $name =get_bloginfo('name');\n }\n if(isset($settings['email_settings']['from_email'])){\n $email = $settings['email_settings']['from_email'];\n }else{\n $email = get_option('admin_email');\n }\n if(isset($settings['email_settings']['charset'])){\n $charset = $settings['email_settings']['charset'];\n }else{\n $charset = 'utf8'; \n }\n }\n $headers .= \"From: $name<$email>\". \"\\r\\n\";\n $headers .= \"Content-type: text/html; charset=$charset\" . \"\\r\\n\";\n \n $message = bp_course_process_mail($to,$subject,$message,$args); \n $message = apply_filters('wplms_email_templates',$message,$to,$subject,$message,$args);\n wp_mail($to,$subject,$message,$headers);\n}",
"function smtpmailer($para, $de, $de_nome, $assunto, $corpo) { \r\n global $error;\r\n $mail = new PHPMailer();\r\n $mail->IsSMTP(); // Ativar SMTP\r\n $mail->SMTPDebug = 0; // Debugar: 1 = erros e mensagens, 2 = mensagens apenas\r\n $mail->SMTPAuth = true; // Autenticação ativada\r\n $mail->SMTPSecure = 'tls'; // SSL REQUERIDO pelo GMail\r\n $mail->Host = 'smtp.ufop.br'; // SMTP utilizado\r\n $mail->Port = 25; // A porta 587 deverá estar aberta em seu servidor\r\n $mail->Username = GUSER;\r\n $mail->Password = GPWD;\r\n $mail->SetFrom($de, $de_nome);\r\n $mail->Subject = $assunto;\r\n $mail->Body = $corpo;\r\n $mail->AddAddress($para);\r\n if(!$mail->Send()) {\r\n $error = 'Mail error: '.$mail->ErrorInfo; \r\n return false;\r\n } else {\r\n $error = 'Mensagem enviada!';\r\n return true;\r\n }\r\n }",
"function _notifybymail($to,$subj,$message,$fromname=\"Support\",$from='[email protected]')\r\n\t{\r\n\t\t\r\n\t\t$this->email->clear();\r\n\t\t\r\n\t\t$config = array(\r\n\t\t\t 'protocol' => 'smtp',\r\n\t\t\t 'smtp_host' => 'ssl://email-smtp.us-east-1.amazonaws.com',\r\n\t\t\t 'smtp_user' => 'AKIAIIIJ7TIURYRQPZTA',\r\n\t\t\t 'smtp_pass' => 'ArI01zUQ7iwXYnHNfH3GApcBUWSE0v+b5qhhR2zK2B68',\r\n\t\t\t 'smtp_port' => 465,\r\n\t\t\t);\r\n\t\t$config['mailtype']=\"html\";\t\r\n\t\t$this->email->initialize($config);\r\n\t\t$this->email->set_newline(\"\\r\\n\");\r\n\t\t$this->email->from($from,$fromname);\r\n\t\t$this->email->to($to); \r\n\t\t\r\n\t\t$this->email->subject($subj);\r\n\t\t$this->email->message($message);\t\r\n\t\t\r\n\t\t$this->email->send();\r\n\t\t\r\n\t\t//echo $this->email->print_debugger();\r\n \r\n\t}",
"public function getMail():string\n { \n return $this->mail;\n }",
"protected function loadMailFields()\n {\n parent::loadMailFields();\n\n $this->mailFields = $this->tokenMailFields() + $this->mailFields; // Prefer our fields over the ones from the super class\n }",
"public function utility_email($msg, $member_email, $subject){\n\t\t//echo $msg;\n\t\treturn $this->send_mime_mail(\"immistudy.ru\", \n\t\t\t\t\t\t\"immistudy@mailru\",\n\t\t\t\t\t\t\"\",\n\t\t\t\t\t\t$member_email,\n\t\t\t\t\t\t'UTF-8',\n\t\t\t\t\t\t'windows-1251',\n\t\t\t\t\t\t$subject,\n\t\t\t\t\t\t$msg);\n\t}",
"public function __construct() {\r\n $this->html = false;\r\n $this->setFrom(EMAIL_FROM);\r\n }",
"function sendNewMessageNotification($to_user_id,$to_name,$subject,$fromEmail,$replyEmail)\n{\n #check if the user enabled this option\n $query=\"select message_email,email from users where user_id ='$to_user_id' and access_level NOT IN ('ebulkuser','eremote') limit 1\";\n $email_option=getDBRecords($query); \n\n if($email_option[0]['message_email'] == \"Y\")\n { \n $email = $email_option[0]['email'];\n $html=\"<p><font size=\\\"2\\\" face=\\\"Verdana, Arial, Helvetica, sans-serif\\\">Dear \".$to_name.\",<br><br>\n You have been sent a message via the online \".DBS.\" system regarding <b>\".$subject.\"</b>, please login to your secure online account to read the message.\n\t\t\t <br><br>Thank You</font></p>\";\n\n\n\t\t$text=\"Dear \".$to_name.\",\n \n\t\t\t You have been sent a message via the online \".DBS.\" system regarding \".$subject.\", please login to your secure online account to read the message.\n\t\t\t \n\t\t\t Thank You\";\n\n\t\t \n\t\t$from = $fromEmail;\n\t\t$mail = new htmlMimeMail();\n\t\t$mail->setHtml($html, $text);\n\t\t$mail->setReturnPath($replyEmail);\n $mail->setFrom($from);\n $mail->setSubject(\"Important Message\");\n $mail->setHeader('X-Mailer', 'HTML Mime mail class');\n\n if(!empty($email))\n\t {\n $result = $mail->send(array($email), 'smtp');\t\n\t\t}\n } \t\n}",
"public function traerPorMail($email) {\n\n}",
"function __emailer($email = '', $vars = array())\n {\n\n //common variables\n $this->data['email_vars']['todays_date'] = $this->data['vars']['todays_date'];\n $this->data['email_vars']['company_email_signature'] = $this->data['settings_company']['company_email_signature'];\n\n //------------------------------------queue email in database-------------------------------\n /** THIS WIL NOT SEND BUT QUEUE THE EMAILS*/\n if ($email == 'mailqueue_ticket_reply') {\n\n //email vars\n $this->data['email_vars']['email_title'] = $this->data['lang']['lang_support_ticket_reply'];\n\n //get message template from database\n $template = $this->settings_emailtemplates_model->getEmailTemplate('general_notification_admin');\n $this->data['debug'][] = $this->settings_emailtemplates_model->debug_data;\n\n //dynamic email vars - email body\n $this->data['email_vars']['email_message'] = '\n <div style=\" border:#CCCCCC solid 1px; padding:8px;\">\n <span style=\"text-decoration: underline; font-weight:bold;\">\n ' . $this->data['lang']['lang_title'] . '</span><br>\n ' . $this->input->post('tickets_title') . '<br><br>\n <span style=\"text-decoration: underline; font-weight:bold;\">\n ' . $this->data['lang']['lang_message'] . '</span><br>\n ' . $this->input->post('tickets_replies_message') . '\n <p><div style=\"padding:5px; background-color:#fbe9d0;\">'.$this->data['lang']['lang_support_do_not_reply'].'</div></div>';\n\n //dynamic email vars - general\n $this->data['email_vars']['addressed_to'] = $this->data['lang']['lang_hello'];\n $this->data['email_vars']['admin_dashboard_url'] = $this->data['vars']['site_url_admin'].'/ticket/'.$this->input->post('tickets_replies_ticket_id');\n\n //get the email address of staff assigned to this ticket. (email preferences are checked)\n $team_members_email = $this->teamprofile_model->notificationsEmail($this->input->post('tickets_assigned_to_id'));\n $this->data['debug'][] = $this->teamprofile_model->debug_data;\n\n //add to email queue\n if ($team_members_email != '') {\n\n //set sqldata() for database\n $sqldata['email_queue_message'] = parse_email_template($template['message'], $this->data['email_vars']);\n $sqldata['email_queue_subject'] = $this->data['lang']['lang_support_ticket_reply'];\n $sqldata['email_queue_email'] = $team_members_email;\n\n //add to email queue database - excluding uploader (no need to send them an email)\n $this->email_queue_model->addToQueue($sqldata);\n $this->data['debug'][] = $this->email_queue_model->debug_data;\n }\n\n }\n }",
"function sendEmails() {\n\t\t$this->substituteValueMarkers(array('templateCode' => $this->data['tx_gokontakt_emailBody'] ));\n\t\t$this->substituteLanguageMarkers(array('templateCode' => $this->data['tx_gokontakt_emailBody'] ));\n\t\t$this->substituteValueMarkers(array('templateCode' => $this->data['tx_gokontakt_emailAdminBody'] ));\n\t\t$this->substituteLanguageMarkers(array('templateCode' => $this->data['tx_gokontakt_emailAdminBody'] ));\n\n\t\t$emailUser = $this->cObj->substituteMarkerArrayCached($this->data['tx_gokontakt_emailBody'], $this->markerArray, $this->subpartMarkerArray, $this->wrappedSubpartMarkerArray);\n\t\t$emailUser = str_replace(\"<br />\", \"\\n\", $emailUser);\n\t\t$emailAdmin = $this->cObj->substituteMarkerArrayCached($this->data['tx_gokontakt_emailAdminBody'], $this->markerArray, $this->subpartMarkerArray, $this->wrappedSubpartMarkerArray);\n\t\t$emailAdmin = str_replace(\"<br />\", \"\\n\", $emailAdmin);\n\t\t$emailFrom = $this->data['tx_gokontakt_emailFrom'];\n\t\t$emailFromName = $this->data['tx_gokontakt_emailFromName'];\n\t\t$emailToAdmin = $this->data['tx_gokontakt_emailToAdmin'];\n\n\t\t$this->sendEmail($this->pi_getLL('subject_email_user'), $emailUser, '', $emailFrom, $emailFromName, $this->piVars['email']);\n\t\t$this->sendEmail($this->pi_getLL('subject_email_admin'), $emailAdmin, '', $emailFrom, $emailFromName, $emailToAdmin);\n\t}",
"abstract protected function getSubject();",
"function email($to, $subj, $content, $headers)\n{\n//error_reporting(0);\n /*$to = '[email protected]';\n$subject = 'the subject';\n$message = 'hello test';\n$headers = 'From: [email protected]' . \"\\r\\n\" .\n 'Reply-To: [email protected]' . \"\\r\\n\" .\n 'X-Mailer: PHP/';*/\nrequire_once('PEAR.php');\nrequire_once('Mail.php');\nrequire_once('Mail/mime.php');\n//$mail = &Mail::factory('smtp', array('host'=>'smtp.gmail.com', 'port'=>\"465\", 'auth'=>true, 'username'=>'[email protected]','password'=>'AK987!@#$%'));\n$mail = &Mail::factory(\"mail\");\n\n$_mail = $mail->send($to, $headers, $content);\n\n//echo($to.\"-\".$headers.\"-\".$content);\n//echo ($_mail->getMessage());\nlogoperation(777,0,\"send email\",\"email: \".$to.\" headers:\".$headers['From'].\"-\".$headers['To'].\" content: \".$content,$_SERVER['REMOTE_ADDR']);\n}",
"abstract public function get_first_line_support_email();",
"function clsRecordemails()\r\n\r\n {\r\n\r\n\r\n\r\n global $FileName;\r\n\r\n $this->Visible = true;\r\n\r\n $this->Errors = new clsErrors();\r\n\r\n $this->ds = new clsemailsDataSource();\r\n\r\n $this->InsertAllowed = false;\r\n\r\n $this->UpdateAllowed = false;\r\n\r\n if($this->Visible)\r\n\r\n {\r\n\r\n $this->ComponentName = \"emails\";\r\n\r\n $this->HTMLFormAction = $FileName . \"?\" . CCAddParam(CCGetQueryString(\"QueryString\", \"\"), \"ccsForm\", $this->ComponentName);\r\n\r\n $CCSForm = CCGetFromGet(\"ccsForm\", \"\");\r\n\r\n $this->FormSubmitted = ($CCSForm == $this->ComponentName);\r\n\r\n $Method = $this->FormSubmitted ? ccsPost : ccsGet;\r\n\r\n $this->from_user_id = new clsControl(ccsLabel, \"from_user_id\", \"From User Id\", ccsText, \"\", CCGetRequestParam(\"from_user_id\", $Method));\r\n\r\n $this->emaildate = new clsControl(ccsLabel, \"emaildate\", \"date\", ccsText, \"\", CCGetRequestParam(\"emaildate\", $Method));\r\n\r\n $this->subject = new clsControl(ccsLabel, \"subject\", \"Subject\", ccsText, \"\", CCGetRequestParam(\"subject\", $Method));\r\n\r\n $this->message = new clsControl(ccsLabel, \"message\", \"Message\", ccsMemo, \"\", CCGetRequestParam(\"message\", $Method));\r\n\r\n $this->message->HTML = true;\r\n\r\n $this->Delete = new clsButton(\"Delete\");\r\n\r\n $this->cancel = new clsButton(\"cancel\");\r\n\r\n }\r\n\r\n }",
"function send_email($to,$subject,$html,$text,$bcc_admin){\r\n\r\n\t\tif(!is_array($to)) $to = array($to);\r\n\r\n\t\tif($GLOBALS['server_info']['environment']=='dev') return true;\r\n\r\n\t\t@include_once($GLOBALS['server_info']['physical_root'].'inc/htmlMimeMail5/htmlMimeMail5.php');\r\n\t\t@include_once('/var/www/monrovia.com/root/inc/htmlMimeMail5/htmlMimeMail5.php');\t\t\t\t// LIVE\r\n\t\t@include_once('/var/www/vhosts/tpgphpdev1.net/httpdocs/inc/htmlMimeMail5/htmlMimeMail5.php');\t// STAGING\r\n\r\n\t\t$mail = new htmlMimeMail5();\r\n\t\t$mail->setHTMLCharset('UTF-8');\r\n\t\t$mail->setHeadCharset('UTF-8');\r\n\t\t$mail->setTextCharset('UTF-8');\r\n\t\t//if($_SERVER[\"HTTP_HOST\"]!='') $mail->setFrom('Monrovia Website <[email protected]>');\r\n\t\tif($GLOBALS['server_info']['environment']=='prod') $mail->setFrom('Monrovia Website <[email protected]>');\r\n\t\t$mail->setSubject($subject);\r\n\r\n\t\tif($text=='') $text = $html;\r\n\r\n\t\t$mail->setText($text);\r\n\t\t$mail->setHTML($html);\r\n\t\tif($GLOBALS['admin_email']!=''&&$bcc_admin&&$GLOBALS['admin_email']!=$to[0]) $mail->setBcc($GLOBALS['admin_email']);\r\n\t\t$result = @$mail->send($to);\r\n\t\treturn ($result===true);\r\n\t}",
"function rets_bsf_mail($key, &$message, $params) {\n if (isset($params['subject'])) {\n $message['subject'] = $params['subject'];\n } \n if (isset($params['body'])) {\n $message['body'][] = $params['body']; \n }\n if (isset($params['headers']) && is_array($params['headers'])) { \n $message['headers'] += $params['headers'];\n }\n \n // You should really have hook_mail() doing most of the formatting, \n // rather than pass in a complete $body or a $subject from drupal_mail(). \n // To accomplish that, you'd branch this formatting based on the value of\n // $key sent with drupal_mail(), and using code like this:\n // switch ($key) {\n // case 'key1':\n // // do something specific for mails of type key1\n // break; \n // case 'key2':\n // // do something specific for mails of type key2\n // break;\n // }\n \n // That's it - You don't do anything in your hook_mail() to actually\n // send the mail, that is taken care of by the mail system automatically. \n}",
"function sendOrderMail(&$do){\n if (isset($do['oCUSTOMERLANG']->raw) && $do['oCUSTOMERLANG']->raw != TZR_DEFAULT_LANG){\n $lang_save = XShell::getLangUser();\n $_REQUEST['LANG_USER']=$do['oCUSTOMERLANG']->raw;\n $_REQUEST['LANG_DATA']=$do['oCUSTOMERLANG']->raw;\n $foo = XShell::getLangUser();\n $foo = XShell::getLangData(NULL, true);\n }\n\n $r = $this->displayOrder($do['oid']);\n\n $xt = new XTemplate('file:'.$GLOBALS['USER_TEMPLATES_DIR'].$this->defaultStepTemplates['recepisse']);\n $labels=&$GLOBALS['XSHELL']->labels->get_labels(array('selectors'=>array('global'),'local'=>true));\n $xt->set_glob(array('labels'=>&$labels));\n $r3=array();\n if (isset($GLOBALS['eplmailscolors'])){\n $colors = $GLOBALS['eplmailscolors'];\n } else {\n $colors = array();\n }\n $tpldata = array('br'=>$r, 'colors'=>$colors);\n\n $content=$xt->parse($tpldata,$r3,NULL);\n\n $subject = $GLOBALS['XSHELL']->labels->getCustomSysLabel('titre_mail_commande');\n if (empty($subject))\n $subject = '[Votre commande]';\n\n $subject = XIni::get('societe').' '.$subject;\n\n // mail et nom du client commande\n $to = array('email'=>$do['oCUSTOMEREMAIL']->raw, 'name'=>$do['oCUSTOMERNOM']->raw. ' '. $do['oCUSTOMERPRENOM']->raw);\n\n $this->modcustomer->sendMailTo($content, $subject, NULL, $to);\n\n if (isset($do['CUSTOMERLANG']->raw) && $do['oCUSTOMERLANG']->raw != TZR_DEFAULT_LANG){\n $_REQUEST['LANG_USER'] = $lang_save;\n $_REQUEST['LANG_DATA'] = $lang_save;\n $foo = XShell::getLangUser(NULL, true);\n $foo = XShell::getLangData(NULL, true);\n }\n }",
"abstract public function get_subject();",
"protected function _initMail()\n {\n $mailTransport = new Zend_Mail_Transport_Sendmail();\n Zend_Mail::setDefaultTransport($mailTransport);\n }",
"function bp_course_process_mail($to,$subject,$message,$args=''){\n $template = html_entity_decode(get_option('wplms_email_template'));\n if(!isset($template) || !$template || strlen($template) < 5)\n return $message;\n \n\n $site_title = get_option('blogname');\n $site_description = get_option('blogdescription');\n $logo_url = vibe_get_option('logo');\n $logo = '<a href=\"'.get_option('home_url').'\"><img src=\"'.$logo_url.'\" alt=\"'.$site_title.'\" style=\"max-width:50%;\"/></a>';\n\n $sub_title = $subject; \n if(isset($args['user_id'])){\n if(is_numeric($args['user_id'])){\n $name = bp_core_get_userlink($args['user_id']);\n }else if(is_array($args['user_id'])){\n $userid = $args['user_id'][0];\n if(is_numeric($userid)){\n $name = bp_core_get_userlink($userid);\n }\n }\n }else\n $name = $to;\n\n $datetime = date_i18n( get_option( 'date_format' ), time());\n if(isset($args['item_id'])){\n $instructor_id = get_post_field('post_author', $args['item_id']);\n $sender = bp_core_get_user_displayname($instructor_id);\n $instructing_courses=apply_filters('wplms_instructing_courses_endpoint','instructing-courses');\n $sender_links = '<a href=\"'.bp_core_get_user_domain( $instructor_id ).'\">'.__('Profile','vibe-customtypes').'</a> | <a href=\"'.get_author_posts_url($instructor_id).$instructing_courses.'/\">'.__('Courses','vibe-customtypes').'</a>';\n $item = get_the_title($args['item_id']);\n $item_links = '<a href=\"'.get_permalink( $args['item_id'] ).'\">'.__('Link','vibe-customtypes').'</a> | <a href=\"'.bp_core_get_user_domain($instructor_id).'/\">'.__('Instructor','vibe-customtypes').'</a>';\n $unsubscribe_link = bp_core_get_user_domain($args['user_id']).'/settings/notifications';\n }else{\n $sender ='';\n $sender_links ='';\n $item ='';\n $item_links ='';\n $unsubscribe_link = '#';\n $template = str_replace('cellpadding=\"28\"','cellpadding=\"0\"',$template);\n }\n \n $copyright = vibe_get_option('copyright');\n $link_id = vibe_get_option('email_page');\n if(is_numeric($link_id)){\n $array = array(\n 'to' => $to,\n 'subject'=>$subject,\n 'message'=>$message,\n 'args'=>$args\n );\n $link = get_permalink($link_id).'?vars='.urlencode(json_encode($array));\n }else{\n $link = '#';\n }\n\n\n $template = str_replace('{{logo}}',$logo,$template);\n $template = str_replace('{{subject}}',$subject,$template);\n $template = str_replace('{{sub-title}}',$sub_title,$template);\n $template = str_replace('{{name}}',$name,$template);\n $template = str_replace('{{datetime}}',$datetime,$template);\n $template = str_replace('{{message}}',$message,$template);\n $template = str_replace('{{sender}}',$sender,$template);\n $template = str_replace('{{sender_links}}',$sender_links,$template);\n $template = str_replace('{{item}}',$item,$template);\n $template = str_replace('{{item_links}}',$item_links,$template);\n $template = str_replace('{{site_title}}',$site_title,$template);\n $template = str_replace('{{site_description}}',$site_description,$template);\n $template = str_replace('{{copyright}}',$copyright,$template);\n $template = str_replace('{{unsubscribe_link}}',$unsubscribe_link,$template);\n $template = str_replace('{{link}}',$link,$template);\n $template = bp_course_minify_output($template);\n return $template;\n}",
"function mailreport()\n{\n\tglobal $g_error_msg, $g_debug_msg;\n\tinclude_once(atkconfig('atkroot'). 'atk/errors/class.atkerrorhandlerbase.inc');\n\t$errorHandlerObject = atkErrorHandlerBase::get('mail', array('mailto'=>atkconfig('mailreport')));\n\t$errorHandlerObject->handle($g_error_msg, $g_debug_msg);\n}",
"function sendmail($sender, $recipient, $data, $smtp = 'localhost' ) {\n\n /*\n * Get mime object\n */\n $mime = GenericMail::_instanceMailMime();\n\n /*\n * Get Headerdata\n */\n $headers = GenericMail::_constructHeader($sender, $recipient, $data['subject']);\n\n /*\n * Check if there are attachments\n */\n if (isset($data['attachment'])) {\n $attachment = $data['attachment'];\n if (is_array($attachment)) {\n foreach ($attachment as $file) {\n if (is_file($file) && is_readable($file)) {\n $mime->addAttachment($file);\n }\n }\n } else {\n if (is_file($attachment) && is_readable($attachment)) {\n $mime->addAttachment($attachment);\n }\n }\n }\n\n /*\n * Setea porciones texto y html del correo\n */\n if (!empty($data['textdata'])) $mime->setTxtbody($data['textdata']);\n\n if (!empty($data['htmldata'])) $mime->setHTMLbody($data['htmldata']);\n\n // mail puede contener 'textdata' y/o 'htmldata'\n $param['text_charset'] = 'utf-8'; // The character set to use for the plain text part of the email. Default is \"iso-8859-1\".\n $param['html_charset'] = 'utf-8'; // The character set to use for the HTML part of the email. Default is \"iso-8859-1\".\n\n\n /*\n * Create Body of the Mail\n */\n $body = $mime->get($param); // http://pear.php.net/manual/en/package.mail.mail-mime.get.php\n\n /*\n * Set correct Headers\n */\n $hdrs = $mime->headers($headers['headers']);\n\n /*\n * Get Mail Object\n */\n $mail_object = GenericMail::_instanceMail($smtp);\n\n /*\n * Send Mail\n */\n $res = $mail_object->send( $headers['recipient_list'], $hdrs, $body );\n if (PEAR::isError($res)) {\n throw new Exception(\"code='\" .\n $res->getCode() . \"', message='\" .\n $res->getMessage() . \"'.\");\n };\n\n }",
"function sendHTMLMail($HTMLContent, $PLAINContent, $recipient, $subject, $fromEmail, $fromName, $replyTo = '', $fileAttachment = '') {\n\t\t\t// HTML\n\t\t\tif (trim($recipient)) {\n\t\t\t\t$parts = spliti('<title>|</title>', $HTMLContent, 3);\n\t\t\t\t\t \n\t\t\t\t$Typo3_htmlmail = t3lib_div::makeInstance('t3lib_htmlmail');\n\t\t\t\t$Typo3_htmlmail->start();\n\t\t\t\t$Typo3_htmlmail->mailer = 'Typo3 HTMLMail';\n\t\t\t\t$Typo3_htmlmail->subject = $subject;\n\t\t\t\t$Typo3_htmlmail->from_email = $fromEmail;\n\t\t\t\t$Typo3_htmlmail->returnPath = $fromEmail;\n\t\t\t\t$Typo3_htmlmail->from_name = $fromName;\n\t\t\t\t$Typo3_htmlmail->from_name = implode(' ' , t3lib_div::trimExplode(',', $Typo3_htmlmail->from_name));\n\t\t\t\t$Typo3_htmlmail->replyto_email = $replyTo ? $replyTo :$fromEmail;\n\t\t\t\t$Typo3_htmlmail->replyto_name = $replyTo ? '' : $fromName;\n\t\t\t\t$Typo3_htmlmail->replyto_name = implode(' ' , t3lib_div::trimExplode(',', $Typo3_htmlmail->replyto_name));\n\t\t\t\t$Typo3_htmlmail->organisation = '';\n\t\t\t\t$Typo3_htmlmail->priority = 3;\n\t\t\t\t \n\t\t\t\t// ATTACHMENT\n\t\t\t\tif ($fileAttachment && file_exists($fileAttachment)) {\n\t\t\t\t\t$Typo3_htmlmail->addAttachment($fileAttachment);\n\t\t\t\t}\n\t\t\t\t \n\t\t\t\t// HTML\n\t\t\t\tif (trim($HTMLContent)) {\n\t\t\t\t\t$Typo3_htmlmail->theParts['html']['content'] = $HTMLContent;\n\t\t\t\t\t$Typo3_htmlmail->theParts['html']['path'] = '';\n\t\t\t\t\t$Typo3_htmlmail->extractMediaLinks();\n\t\t\t\t\t$Typo3_htmlmail->extractHyperLinks();\n\t\t\t\t\t$Typo3_htmlmail->fetchHTMLMedia();\n\t\t\t\t\t$Typo3_htmlmail->substMediaNamesInHTML(0); // 0 = relative\n\t\t\t\t\t$Typo3_htmlmail->substHREFsInHTML();\n\t\t\t\t\t \n\t\t\t\t\t$Typo3_htmlmail->setHTML($Typo3_htmlmail->encodeMsg($Typo3_htmlmail->theParts['html']['content']));\n\t\t\t\t}\n\t\t\t\t// PLAIN\n\t\t\t\t$Typo3_htmlmail->addPlain($PLAINContent);\n\t\t\t\t// SET Headers and Content\n\t\t\t\t$Typo3_htmlmail->setHeaders();\n\t\t\t\t$Typo3_htmlmail->setContent();\n\t\t\t\t$Typo3_htmlmail->setRecipient($recipient);\n\t\t\t\t$Typo3_htmlmail->sendtheMail();\n\t\t\t}\n\t\t}",
"protected function setUp(): void\n\t{\n\t\tglobal $txt;\n\t\trequire_once(SUBSDIR . '/Emailpost.subs.php');\n\n\t\t$lang = new Loader('english', $txt, database());\n\t\t$lang->load('Maillist');\n\t\tUser::$info = new UserInfo(['name' => 'name']);\n\n\t\t$this->_email = 'Return-Path: <[email protected]>\nDelivered-To: <[email protected]>\nReceived: from galileo.tardis.com\n\tby galileo.tardis.com (Dovecot) with LMTP id znQ3AvalOVi/SgAAhPm7pg\n\tfor <[email protected]>; Sat, 26 Nov 2016 09:10:46 -0600\nReceived: by galileo.tardis.com (Postfix, from userid 1005)\n\tid 0671C1C8; Sat, 26 Nov 2016 09:10:46 -0600 (CST)\nX-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on\n\tgalileo.tardis.com\nX-Spam-Flag: YES\nX-Spam-Level: ******\nX-Spam-Status: Yes, score=5.0 required=5.0 tests=HTML_IMAGE_ONLY_16,\n\tHTML_MESSAGE,HTML_SHORT_LINK_IMG_2,MIME_HTML_ONLY,MIME_HTML_ONLY_MULTI,\n\tMPART_ALT_DIFF,RCVD_IN_BRBL_LASTEXT,T_DKIM_INVALID,URIBL_BLACK autolearn=no\n\tautolearn_force=no version=3.4.0\nReceived: from mail.elkarte.net (s2.eurich.de [85.214.104.5])\n\tby galileo.tardis.com (Postfix) with ESMTP id 1872579\n\tfor <[email protected]>; Sat, 26 Nov 2016 09:10:40 -0600 (CST)\nReceived: from localhost (localhost [127.0.0.1])\n\tby mail.elkarte.net (Postfix) with ESMTP id 9DE3C4CE1535\n\tfor <[email protected]>; Sat, 26 Nov 2016 16:10:39 +0100 (CET)\nX-Virus-Scanned: Debian amavisd-new at s2.eurich.de\nReceived: from mail.elkarte.net ([127.0.0.1])\n\tby localhost (h2294877.stratoserver.net [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id zQep5x32jrqA for <[email protected]>;\n\tSat, 26 Nov 2016 16:10:03 +0100 (CET)\nReceived: from mail.elkarte.net (h2294877.stratoserver.net [85.214.104.5])\n\tby mail.elkarte.net (Postfix) with ESMTPA id 990694CE0CFA\n\tfor <[email protected]>; Sat, 26 Nov 2016 16:10:03 +0100 (CET)\nSubject: [ElkArte Community] Test Message\nTo: <[email protected]>\nFrom: \"Administrator via ElkArte Community\" <[email protected]>\nReply-To: \"ElkArte Community\" <[email protected]>\nReferences: <[email protected]>\nDate: Sat, 26 Nov 2016 15:09:15 -0000\nX-Mailer: ELK\nX-Auto-Response-Suppress: All\nAuto-Submitted: auto-generated\nList-Id: <[email protected]>\nList-Unsubscribe: <http://www.elkarte.net/community/index.php?action=profile;area=notification>\nList-Owner: <mailto:[email protected]> (ElkArte Community)\nMime-Version: 1.0\nContent-Type: multipart/alternative; boundary=\"ELK-66593aefa4beed000470cbd4cc3238d9\"\nContent-Transfer-Encoding: 7bit\nMessage-ID: <[email protected]>\n\n\nTesting\n\n\nRegards, The ElkArte Community\n\n[cd8c399768891330804a1d2fc613ccf3-t4124]\n\n--ELK-66593aefa4beed000470cbd4cc3238d9\nContent-Type: text/plain; charset=UTF-8\nContent-Transfer-Encoding: 7bit\n\n\nTesting\n\n\nRegards, The ElkArte Community\n\n[cd8c399768891330804a1d2fc613ccf3-t4124]\n\n--ELK-66593aefa4beed000470cbd4cc3238d9--\n\n--ELK-66593aefa4beed000470cbd4cc3238d9\nContent-Type: text/html; charset=UTF-8\nContent-Transfer-Encoding: 7bit\n\n\n<strong>Testing</strong>\n\n\nRegards, The ElkArte Community\n\n[cd8c399768891330804a1d2fc613ccf3-t4124]\n\n--ELK-66593aefa4beed000470cbd4cc3238d9--';\n\t}",
"function clsRecordemails()\r\n {\r\n\r\n global $FileName;\r\n $this->Visible = true;\r\n $this->Errors = new clsErrors();\r\n $this->ds = new clsemailsDataSource();\r\n $this->ReadAllowed = false;\r\n $this->InsertAllowed = false;\r\n $this->UpdateAllowed = false;\r\n $this->DeleteAllowed = false;\r\n $this->Visible = (CCSecurityAccessCheck(\"1;2\") == \"success\");\r\n if($this->Visible)\r\n {\r\n $this->ReadAllowed = CCUserInGroups(CCGetGroupID(), \"1;2\");\r\n $this->InsertAllowed = CCUserInGroups(CCGetGroupID(), \"1;2\");\r\n $this->ComponentName = \"emails\";\r\n $this->HTMLFormAction = $FileName . \"?\" . CCAddParam(CCGetQueryString(\"QueryString\", \"\"), \"ccsForm\", $this->ComponentName);\r\n $CCSForm = CCGetFromGet(\"ccsForm\", \"\");\r\n $this->FormSubmitted = ($CCSForm == $this->ComponentName);\r\n $Method = $this->FormSubmitted ? ccsPost : ccsGet;\r\n $this->message = new clsControl(ccsTextArea, \"message\", \"Message\", ccsMemo, \"\", CCGetRequestParam(\"message\", $Method));\r\n $this->Insert = new clsButton(\"Insert\");\r\n $this->item_id = new clsControl(ccsHidden, \"item_id\", \"Item Id\", ccsInteger, \"\", CCGetRequestParam(\"item_id\", $Method));\r\n $this->to_user_id = new clsControl(ccsHidden, \"to_user_id\", \"To User Id\", ccsInteger, \"\", CCGetRequestParam(\"to_user_id\", $Method));\r\n $this->from_user_id = new clsControl(ccsHidden, \"from_user_id\", \"From User Id\", ccsInteger, \"\", CCGetRequestParam(\"from_user_id\", $Method));\r\n $this->emaildate = new clsControl(ccsHidden, \"emaildate\", \"date\", ccsInteger, \"\", CCGetRequestParam(\"emaildate\", $Method));\r\n $this->subject = new clsControl(ccsHidden, \"subject\", \"Subject\", ccsText, \"\", CCGetRequestParam(\"subject\", $Method));\r\n if(!$this->FormSubmitted) {\r\n if(!strlen($this->from_user_id->GetValue()))\r\n $this->from_user_id->SetValue(CCGetUserID());\r\n if(!strlen($this->emaildate->GetValue()))\r\n $this->emaildate->SetValue(time());\r\n }\r\n }\r\n }",
"function envoyer_inscription_mail($values)\n{\n\t$mot = $GLOBALS['mot'];\n\t$phrase = $GLOBALS['phrase'];\n\t$val = FALSE;\n\t\n\t$contenu = array(\t$mot['Cabinet'] => $values['Cabinet'],\n\t\t\t\t\t\t$mot['Nom'] => $values['Nom'],\n\t\t\t\t\t\t$mot['Prenom'] => $values['Prenom'],\n\t\t\t\t\t\t$mot['Adresse'] => $values['Adresse'],\n\t\t\t\t\t\t$mot['CP'] => $values['CP'],\n\t\t\t\t\t\t$mot['Ville'] => $values['Ville'],\n\t\t\t\t\t\t$mot['Tel'] => $values['Tel'],\n\t\t\t\t\t\t$mot['Email'] => $values['Email'],\n\t\t\t\t\t\t$mot['Commentaire'] => $values['Commentaire'] );\n\t$contenu_message = corps_email($contenu);\n\t\n\t// Si le message a bien été envoyé, on affiche un message de validation\n\t// et on enregistre le message dans la base de données\n\tif (envoi_email(EMAIL_ADMIN, NOM_SITE, EMAIL, $values['Email'], $phrase['UneNouvelleInscription'], $contenu_message) == TRUE)\n\t{\n\t\tif (ajouter_inscription_db($values) == TRUE)\n\t\t{\n\t\t\t$val = TRUE;\n\t\t}\n\t}\n\treturn $val;\n}",
"protected function process_mailtemplate()\n {\n $l_gets = $this->m_modreq->get_gets();\n $l_posts = $this->m_modreq->get_posts();\n\n $l_id = isys_glob_which_isset($l_gets[C__GET__ID], $l_posts[C__GET__ID]);\n $l_navmode = isys_glob_which_isset($l_gets[C__GET__NAVMODE], $l_posts[C__GET__NAVMODE]);\n\n // This will happen, if a user uses the checkboxes and the \"edit\" buttno.\n if (is_array($l_id))\n {\n $l_id = $l_id[0];\n } // if\n\n if (!$l_navmode && $l_id > 0)\n {\n $l_navmode = C__NAVMODE__EDIT;\n } // if\n\n switch ($l_navmode)\n {\n default:\n $this->process_mailtemplate__list();\n break;\n\n case C__NAVMODE__EDIT:\n $this->process_mailtemplate__edit($l_id);\n break;\n\n case C__NAVMODE__NEW:\n $this->process_mailtemplate__edit();\n break;\n\n case C__NAVMODE__SAVE:\n $this->process_mailtemplate__edit($this->process_mailtemplate__save($l_posts));\n break;\n\n case C__NAVMODE__DELETE:\n $this->process_mailtemplate__delete(isys_glob_which_isset($l_gets[C__GET__ID], $l_posts[C__GET__ID]));\n $this->process_mailtemplate__list();\n break;\n } // switch\n\n $this->m_tpl->smarty_tom_add_rule('tom.content.navbar.cRecStatus.p_bInvisible=1');\n }",
"function testMailingMethod() {\n \t\tAngieApplication::mailer()->setDefaultMailingMethod(AngieMailerDelegate::SEND_HOURLY);\n \t\t\n \t $anon = new AnonymousUser('Anon', '[email protected]');\n \t $user = Users::findById(1);\n \t \n \t $this->assertEqual($anon->getMailingMethod(), AngieMailerDelegate::SEND_HOURLY, 'Anonymous users always use default mailing method');\n \t $this->assertEqual($user->getMailingMethod(), AngieMailerDelegate::SEND_HOURLY, 'User that do not have default value overriden use default mailing method');\n\n \t $user = Users::findById(1);\n \t $user->setMailingMethod(AngieMailerDelegate::SEND_IN_BACKGROUD);\n \t \n \t $this->assertEqual($user->getMailingMethod(), AngieMailerDelegate::SEND_IN_BACKGROUD, 'Test mailing method set');\n \t \n \t $user = Users::findById(1);\n \t $this->assertEqual($user->getMailingMethod(), AngieMailerDelegate::SEND_IN_BACKGROUD, 'Making sure that mailing method is permanently saved for this user');\n \t}",
"function sendMail($to,$sub,$msg){\n $msg = wordwrap($msg,70);\n $headers = 'MIME-Version: 1.0' . \"\\r\\n\";\n $headers .= 'From: Convolution 2017<[email protected]>' . \"\\r\\n\";\n $headers .= 'Content-type: text/html; charset=iso-8859-1' . \"\\r\\n\";\n mail($to,$sub,$msg,$headers);\n}",
"function Form_Mail()\n {\n /**\n * Form_Mail();\n */\n\n $this->referers_array = array($_SERVER[\"HTTP_HOST\"]);\n /**\n * Leave AS IS to only allow posting from same host that script resides on.\n * List individual hosts to create list of hosts that can post to this script:\n * EXAMPLE: $referer_array = array ('example.com','www.example.com','192.168.0.1');\n */\n\n /* proccess form */\n $this->set_arrays();\n $this->check_referer();\n $this->check_recipient();\n $this->check_required_fields();\n $this->send_form();\n $this->display_thankyou();\n }",
"function smtpmailer($para, $de, $de_nome, $assunto, $corpo) { \r\n\tglobal $error;\r\n\t$mail = new PHPMailer();\r\n\t$mail->IsSMTP();\t\t// Ativar SMTP\r\n\t$mail->SMTPDebug = 0;\t\t// Debugar: 1 = erros e mensagens, 2 = mensagens apenas\r\n\t$mail->SMTPAuth = true;\t\t// Autenticação ativada\r\n\t$mail->SMTPSecure = 'tls';\t// SSL REQUERIDO pelo GMail\r\n\t$mail->Host = 'smtp.ufop.br';\t// SMTP utilizado\r\n\t$mail->Port = 25; \t\t// A porta 587 deverá estar aberta em seu servidor\r\n\t$mail->Username = GUSER;\r\n\t$mail->Password = GPWD;\r\n\t$mail->SetFrom($de, $de_nome);\r\n\t$mail->Subject = $assunto;\r\n\t$mail->Body = $corpo;\r\n\t$mail->AddAddress($para);\r\n\tif(!$mail->Send()) {\r\n\t\t$error = 'Mail error: '.$mail->ErrorInfo; \r\n\t\treturn false;\r\n\t} else {\r\n\t\t$error = 'Mensagem enviada!';\r\n\t\treturn true;\r\n\t}\r\n}",
"protected function sendTestMail() {}",
"function send_email($email, $subject, $msg, $headers){\r\n $mail = new PHPMailer(true);\r\n try{\r\n $mail->setLanguage('pl', './vendor/phpmailer/phpmailer/language');\r\n $mail->isSMTP();\r\n $mail->Host = Config::SMTP_HOST;\r\n $mail->SMTPAuth = true;\r\n $mail->Username = Config::SMTP_USER;\r\n $mail->Password = Config::SMTP_PASSWORD;\r\n $mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS;\r\n $mail->Port = Config::SMTP_PORT;\r\n $mail->isHTML(true);\r\n $mail->CharSet = 'utf-8';\r\n\r\n $email->setFrom($headers);\r\n $email->addAddress($email);\r\n\r\n $mail->Subject = $subject;\r\n $mail->Body = $msg;\r\n $mail->AltBody = $msg;\r\n\r\n $mail->send();\r\n } catch (Exception $e){\r\n echo validation_errors(\"Message could not be sent. Mailer Error: {$mail->ErrorInfo}\");\r\n return false;\r\n }\r\n return true;\r\n}",
"function my_email_content_type() \n{\n\treturn \"text/html\";\n}",
"function sendmail()\n\t{\n\t\tglobal $mainframe, $Itemid;\n\n\t\t/*\n\t\t * Initialize some variables\n\t\t */\n\t\t$db = & $mainframe->getDBO();\n\n\t\t$SiteName \t= $mainframe->getCfg('sitename');\n\t\t$MailFrom \t= $mainframe->getCfg('mailfrom');\n\t\t$FromName \t= $mainframe->getCfg('fromname');\n\t\t$validate \t= mosHash( $mainframe->getCfg('db') );\n\n\t\t$default \t= sprintf(JText::_('MAILENQUIRY'), $SiteName);\n\t\t$option \t= JRequest::getVar('option');\n\t\t$contactId \t= JRequest::getVar('con_id');\n\t\t$validate \t= JRequest::getVar($validate, \t\t0, \t\t\t'post');\n\t\t$email \t\t= JRequest::getVar('email', \t\t'', \t\t'post');\n\t\t$text \t\t= JRequest::getVar('text', \t\t\t'', \t\t'post');\n\t\t$name \t\t= JRequest::getVar('name', \t\t\t'', \t\t'post');\n\t\t$subject \t= JRequest::getVar('subject', \t\t$default, \t'post');\n\t\t$emailCopy \t= JRequest::getVar('email_copy', \t0, \t\t\t'post');\n\n\t\t// probably a spoofing attack\n\t\tif (!$validate) {\n\t\t\tmosErrorAlert( _NOT_AUTH );\n\t\t}\n\n\t\t/*\n\t\t * This obviously won't catch all attempts, but it does not hurt to make\n\t\t * sure the request came from a client with a user agent string.\n\t\t */\n\t\tif (!isset ($_SERVER['HTTP_USER_AGENT'])) {\n\t\t\tmosErrorAlert( _NOT_AUTH );\n\t\t}\n\n\t\t/*\n\t\t * This obviously won't catch all attempts either, but we ought to check\n\t\t * to make sure that the request was posted as well.\n\t\t */\n\t\tif (!$_SERVER['REQUEST_METHOD'] == 'POST') {\n\t\t\tmosErrorAlert( _NOT_AUTH );\n\t\t}\n\n\t\t// An array of e-mail headers we do not want to allow as input\n\t\t$headers = array ('Content-Type:',\n\t\t\t\t\t\t 'MIME-Version:',\n\t\t\t\t\t\t 'Content-Transfer-Encoding:',\n\t\t\t\t\t\t 'bcc:',\n\t\t\t\t\t\t 'cc:');\n\n\t\t// An array of the input fields to scan for injected headers\n\t\t$fields = array ('email',\n\t\t\t\t\t\t 'text',\n\t\t\t\t\t\t 'name',\n\t\t\t\t\t\t 'subject',\n\t\t\t\t\t\t 'email_copy');\n\n\t\t/*\n\t\t * Here is the meat and potatoes of the header injection test. We\n\t\t * iterate over the array of form input and check for header strings.\n\t\t * If we fine one, send an unauthorized header and die.\n\t\t */\n\t\tforeach ($fields as $field) {\n\t\t\tforeach ($headers as $header) {\n\t\t\t\tif (strpos($_POST[$field], $header) !== false) {\n\t\t\t\t\tmosErrorAlert( _NOT_AUTH );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/*\n\t\t * Now that we have passed the header injection tests lets free up the\n\t\t * used memory and continue.\n\t\t */\n\t\tunset ($fields, $field, $headers, $header);\n\n\t\t/*\n\t\t * Load the contact details\n\t\t */\n\t\t$contact = new JTableContact($db);\n\t\t$contact->load($contactId);\n\n\t\t/*\n\t\t * If there is no valid email address or message body then we throw an\n\t\t * error and return false.\n\t\t */\n\t\tjimport('joomla.utilities.mail');\n\t\tif (!$email || !$text || (JMailHelper::isEmailAddress($email) == false)) {\n\t\t\tJContactView::emailError();\n\t\t} else {\n\t\t\t$menu = JTable::getInstance( 'menu', $db );\n\t\t\t$menu->load( $Itemid );\n\t\t\t$mparams = new JParameter( $menu->params );\n\t\t\t$bannedEmail \t= $mparams->get( 'bannedEmail', \t'' );\n\t\t\t$bannedSubject \t= $mparams->get( 'bannedSubject', \t'' );\n\t\t\t$bannedText \t= $mparams->get( 'bannedText', \t\t'' );\n\t\t\t$sessionCheck \t= $mparams->get( 'sessionCheck', \t1 );\n\n\t\t\t// check for session cookie\n\t\t\tif ( $sessionCheck ) {\n\t\t\t\tif ( !isset($_COOKIE[JSession::name()]) ) {\n\t\t\t\t\tmosErrorAlert( _NOT_AUTH );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Prevent form submission if one of the banned text is discovered in the email field\n\t\t\tif ( $bannedEmail ) {\n\t\t\t\t$bannedEmail = explode( ';', $bannedEmail );\n\t\t\t\tforeach ($bannedEmail as $value) {\n\t\t\t\t\tif ( JString::stristr($email, $value) ) {\n\t\t\t\t\t\tmosErrorAlert( _NOT_AUTH );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Prevent form submission if one of the banned text is discovered in the subject field\n\t\t\tif ( $bannedSubject ) {\n\t\t\t\t$bannedSubject = explode( ';', $bannedSubject );\n\t\t\t\tforeach ($bannedSubject as $value) {\n\t\t\t\t\tif ( JString::stristr($subject, $value) ) {\n\t\t\t\t\t\tmosErrorAlert( _NOT_AUTH );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Prevent form submission if one of the banned text is discovered in the text field\n\t\t\tif ( $bannedText ) {\n\t\t\t\t$bannedText = explode( ';', $bannedText );\n\t\t\t\tforeach ($bannedText as $value) {\n\t\t\t\t\tif ( JString::stristr($text, $value) ) {\n\t\t\t\t\t\tmosErrorAlert( _NOT_AUTH );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// test to ensure that only one email address is entered\n\t\t\t$check = explode( '@', $email );\n\t\t\tif ( strpos( $email, ';' ) || strpos( $email, ',' ) || strpos( $email, ' ' ) || count( $check ) > 2 ) {\n\t\t\t\tmosErrorAlert( JText::_( 'You cannot enter more than one email address', true ) );\n\t\t\t}\n\n\t\t\t/*\n\t\t\t * Prepare email body\n\t\t\t */\n\t\t\t$prefix = sprintf(JText::_('ENQUIRY_TEXT'), $mainframe->getBaseURL());\n\t\t\t$text \t= $prefix.\"\\n\".$name.' <'.$email.'>'.\"\\r\\n\\r\\n\".stripslashes($text);\n\n\t\t\t// Send mail\n\t\t\tjosMail($email, $name, $contact->email_to, $FromName.': '.$subject, $text);\n\n\t\t\t/*\n\t\t\t * If we are supposed to copy the admin, do so.\n\t\t\t */\n\t\t\t// parameter check\n\t\t\t$menuParams \t\t= new JParameter( $contact->params );\n\t\t\t$emailcopyCheck = $menuParams->get( 'email_copy', 0 );\n\n\t\t\t// check whether email copy function activated\n\t\t\tif ( $emailCopy && $emailcopyCheck ) {\n\t\t\t\t$copyText \t\t= sprintf(JText::_('Copy of:'), $contact->name, $SiteName);\n\t\t\t\t$copyText \t\t.= \"\\r\\n\\r\\n\".$text;\n\t\t\t\t$copySubject \t= JText::_('Copy of:').\" \".$subject;\n\t\t\t\tjosMail($MailFrom, $FromName, $email, $copySubject, $copyText);\n\t\t\t}\n\n\t\t\t$link = sefRelToAbs( 'index.php?option=com_contact&task=view&contact_id='. $contactId .'&Itemid='. $Itemid );\n\t\t\t$text = JText::_( 'Thank you for your e-mail', true );\n\n\t\t\tjosRedirect( $link, $text );\n\t\t}\n\t}",
"function notification()\n{\n\n $correo = isset($_POST['correo'])?$_POST['correo']:'';\n $name = isset($_POST['fullname'])?$_POST['fullname']:'';\n $usuario = isset($_POST['usuario'])?$_POST['usuario']:'';\n $clave = isset($_POST['clave'])?$_POST['clave']:'';\n $sendmail= isset($_POST['sendmail'])?$_POST['sendmail']:'';\n if(false == empty($clave) && ($sendmail == 'Y')){\n \n $mail = new Zend_Mail('UTF-8');\n $mail->setBodyText(\"Sr(a) {$name}, esta es su información de ingreso para el sistema Enlazamundos\\r\\n\\r\\nUsuario:{$usuario}\\r\\nClave:{$clave}\");\n $mail->setFrom('[email protected] ', 'Programa Enlazamundos');\n $mail->addTo($correo);\n $mail->setSubject('Confirmación de registro Enlazamundos');\n $mail->send();\n return;\n }\n}",
"public function doExchangeMail($message=\"\",$subject=\"New Pay.nl action\",$extraTarget=\"\")\r\n {\r\n $default = \"Dear sir/madam,\\nA payment has been completed for #paymentSessionId#.\\nThe order number for this was: #object#.\\nAmount paid: #amount# EUR.\\n\\nKind regards,\\nExchange script\";\r\n \r\n if (strlen($message)>1)\r\n {\r\n $default = $message;\r\n }\r\n \r\n // Replace vars\r\n $message = $this->replaceVars($default);\r\n \r\n if (strlen($extraTarget) > 0)\r\n {\r\n mail($extraTarget,$subject,$message);\r\n }\r\n else\r\n {\r\n foreach($this->exchangeEmail as $email)\r\n {\r\n mail($email,$subject,$message);\r\n }\r\n }\r\n return true;\r\n \r\n }",
"function bodyContent($type_suffix)\n\t{\n\t\t$temp_layout = $this->controller->layout; // store the current controller layout\n\t\n\t\tif ($type_suffix == 'html')\n\t\t\t $this->controller->layout = '..'.DS.'email';\n\t\telse\n\t\t\t $this->controller->layout = '';\n\t\n\t\t$mail = $this->controller->render($this->templateLocation('_'.strtolower($type_suffix)));\n\t\t// render() automatically adds to the controller->output, we'll remove it\n\t\t$this->controller->output = str_replace($mail, '', $this->controller->output);\n\t\n\t\t$this->controller->layout = $temp_layout; // restore the controller layout\n\t\treturn $mail;\n\t}",
"function mymail($to, $title, $body, $from = '') {\n\n $controlquery = doquery(\"SELECT * FROM {{table}} WHERE id='1' LIMIT 1\", \"control\");\n $controlrow = mysql_fetch_array($controlquery);\n extract($controlrow);\n \n\n $from = trim($from);\n\n if (!$from) {\n $from = '<'.$controlrow[\"adminemail\"].'>';\n }\n\n $rp = $controlrow[\"adminemail\"];\n $org = '$gameurl';\n $mailer = 'PHP';\n\n $head = '';\n $head .= \"Content-Type: text/plain \\r\\n\";\n $head .= \"Date: \". date('r'). \" \\r\\n\";\n $head .= \"Return-Path: $rp \\r\\n\";\n $head .= \"From: $from \\r\\n\";\n $head .= \"Sender: $from \\r\\n\";\n $head .= \"Reply-To: $from \\r\\n\";\n $head .= \"Organization: $org \\r\\n\";\n $head .= \"X-Sender: $from \\r\\n\";\n $head .= \"X-Priority: 3 \\r\\n\";\n $head .= \"X-Mailer: $mailer \\r\\n\";\n\n $body = str_replace(\"\\r\\n\", \"\\n\", $body);\n $body = str_replace(\"\\n\", \"\\r\\n\", $body);\n\n return mail($to, $title, $body, $head);\n \n}"
]
| [
"0.7173656",
"0.65818036",
"0.64879495",
"0.6190785",
"0.61454004",
"0.6142069",
"0.61419994",
"0.6130666",
"0.6129019",
"0.61036426",
"0.61034304",
"0.60917425",
"0.60851157",
"0.6070738",
"0.6050345",
"0.60500216",
"0.6038944",
"0.6026097",
"0.6019646",
"0.5996077",
"0.59826034",
"0.5982584",
"0.59819305",
"0.5974633",
"0.5972017",
"0.596999",
"0.59644234",
"0.59582597",
"0.5955943",
"0.594632",
"0.5926778",
"0.5924799",
"0.5922805",
"0.58838576",
"0.58747846",
"0.5870725",
"0.58699465",
"0.586824",
"0.5865489",
"0.5860727",
"0.5831392",
"0.58296824",
"0.582772",
"0.5820543",
"0.58131814",
"0.58055294",
"0.5803921",
"0.57921624",
"0.5786751",
"0.5782294",
"0.57811433",
"0.5771642",
"0.5769632",
"0.5765606",
"0.5761296",
"0.5760706",
"0.57571644",
"0.5746676",
"0.57464856",
"0.57298523",
"0.57297736",
"0.5724158",
"0.5721353",
"0.5716836",
"0.5702629",
"0.56985956",
"0.56943315",
"0.56934154",
"0.5688745",
"0.5686212",
"0.5682971",
"0.5672994",
"0.5664391",
"0.5663136",
"0.5659101",
"0.5657749",
"0.56572706",
"0.5657027",
"0.56553066",
"0.56537676",
"0.5652214",
"0.5644092",
"0.56376463",
"0.5637582",
"0.5629272",
"0.56286097",
"0.5628244",
"0.5622226",
"0.56197536",
"0.5617193",
"0.5611644",
"0.56062526",
"0.5601013",
"0.5597956",
"0.5597312",
"0.5594006",
"0.5591407",
"0.5589538",
"0.5585543",
"0.5581355",
"0.55805135"
]
| 0.0 | -1 |
abstract to be overidden by lang specific mail class, if needed | function encodeBody(&$text)
{
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract protected function _sendMail ( );",
"public function createMailMessage();",
"function EMAIL_tc($e_to,$e_to_name,$e_subject,$e_in_subject,$e_body){\n\t\t\t\t\t$transport = Swift_MailTransport::newInstance();\n\t\t\t\t\t\n\t\t\t\t\t// Create the message\n\t\t\t\t\t$message = Swift_Message::newInstance();\n\t\t\t\t\t$message->setTo(array(\n\t\t\t\t\t $e_to => $e_to_name\n\t\t\t\t\t));\n\t\t\t\t\t$message->setSubject($e_subject . \" - UnitedGaming\");\n\t\t\t\t\t\n\t\t\t\t\t$message->setBody(\n\t\t\t\t\t'<html>\n\t\t\t\t\t<link href=\\'http://fonts.googleapis.com/css?family=Source+Sans+Pro\\' rel=\\'stylesheet\\' type=\\'text/css\\'>\n\t\t\t\t\t<table border=\"0\" align=\"center\" width=\"99%\">\n\t\t\t\t\t<tr>\n\t\t\t\t\t<td><a href=\"http://unitedgaming.org\" target=\"_blank\" title=\"UnitedGaming\" alt=\"UnitedGaming\"><img src=\"http://unitedgaming.org/mainlogo.png\" alt=\"UnitedGaming\" border=\"0\"/></td>\n\t\t\t\t\t<td><span style=\"font-family: \\'Source Sans Pro\\', sans-serif;\"><font size=\"6px\" color=\"#BD3538\">'.$e_in_subject.'</font></span></td>\n\t\t\t\t\t</tr>' \n\t\t\t\t\t.\n\t\t\t\t\t'<br/><br /><br/><tr>\n\t\t\t\t\t<td colspan=\"2\"><font size=\"3px\" color=\"#303030\">'.$e_body.'\n\t\t\t\t\t </td></tr><tr><td><br/><span style=\"font-family: \\'Source Sans Pro\\', sans-serif;\"><font size=\"2px\">Kind Regards,<br/>Chuevo</font></span></td><td></td></tr></table></html>\n\t\t\t\t\t ');\n\t\t\t\t\t$message->setFrom(\"[email protected]\", \"UnitedGaming\");\n\t\t\t\t\t$type = $message->getHeaders()->get('Content-Type');\n\t\t\n\t\t\t\t\t$type->setValue('text/html');\n\t\t\t\t\t$type->setParameter('charset', 'utf-8');\n\t\t\t\t\t\n\t\t\t\t\t//echo $type->toString();\n\t\t\t\t\t\n\t\t\t\t\t/*\n\t\t\t\t\t\n\t\t\t\t\tContent-Type: text/html; charset=utf-8\n\t\t\t\t\t\n\t\t\t\t\t*/\n\t\t\t\t\t// Send the email\n\t\t\t\t\t$mailer = Swift_Mailer::newInstance($transport);\n\t\t\t\t\t$mailer->send($message);\n\t\t}",
"public function __construct($type)\n\t{\n\t\tif(!$type){\n\t\t\t return response(array('error'=>true , 'success'=>false , 'message'=>'Please Define Type of Email'),400);\n\t\t}\n\t\t$this->type = $type;\n\n\t\t$mailSubject = '';\n\t\t/*$mailContent = '<div style=\\'font-size: 14px; padding: 10px 15px; background-image: initial; background-attachment: initial;background-color: #1CAF9A; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;\\'>\n\t\t<div style=\\'width:63%;display:inline-block;font-size: 19px;color: #FFF;\\'>Dear {user_name}</div>\n\t\t</div>\n\n\t\t<div style=\\'font-size: 14px; padding: 15px 10px; line-height: 20px; color: rgb(66, 65, 67); background-image: initial; background-attachment: initial; background-color: rgb(255, 255, 255); background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;\\'>\n\t\t<p>{message}</p>\n\t\t<p> </p>\n\t\t</div>';*/\n\n\t\t$mailContent = '<table>\n\t\t\t\t\t\t\t<tbody>\n\t\t\t\t\t\t\t\t<tr style=\"\tfloat: left; width: 100%; background: #ffffff; margin-bottom:15px;\">\n\t\t\t\t\t\t\t\t\t<td style=\"float: left; width: 96%; padding-left:20px; text-align: left; font-size: 26px; color: #343538; margin: 40px 0px 20px 0px;\">Hi, <span style=\"font-weight: bold;\">{user_name}</span></td>\n\t\t\t\t\t\t\t\t\t<td style=\"float: left; width: 96%; padding-left:20px; text-align: left; font-size: 16px; color: #474747; line-height: 22px; margin-bottom: 20px;\">{subject}</td>\n\t\t\t\t\t\t\t\t\t<td style=\"float: left; width: 96%; padding-left:20px; text-align: left; font-size: 16px; color: #474747; line-height: 22px; margin-bottom: 40px;\">{message}</td>\n\t\t\t\t\t\t\t\t</tr>\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t</tbody>\n\t\t\t\t\t\t</table>';\n\t\t\n\t\tif($type != 'customtemplate'){\n\t\t\t$this->template = EmailTemplate::find($type);\n\n\t\t\t$mailSubject = $this->template->subject;\n\t\t\t$mailContent = $this->template->content;\n\t\t}\n\t\t\n\n\t\t$settings = DB::collection('settings')->whereIn('_id',['general','social','email'])->get();\n\t\t$config = array();\n\n\t\tforeach($settings as $setting){\n\t\t\t$config[$setting['_id']] = $setting['settings'];\n\t\t}\n\n\t\t$siteUrl = url();\n\n\t\t$this->recipient_info = array(\n\n\t\t\t'sender' => array(\n\t\t\t\t'name' =>$config['general']['site_title']['value'],\n\t\t\t\t'email' =>$config['email']['default']['email']\n\t\t\t),\n\t\t\t'receiver' => array(\n\t\t\t\t'name' =>'',\n\t\t\t\t'email' =>''\n\t\t\t),\n\t\t\t'subject' => $mailSubject,\n\t\t\t'replace' => array(\n\t\t\t\t'{website_link}' => $siteUrl,\t\t\t\t\n\t\t\t\t'{site_title}' => $config['general']['site_title']['value'],\n\t\t\t\t'{link_login}' => $siteUrl.'/login',\n\t\t\t\t'{link_privacy}' => $siteUrl.'/privacy-policy',\t\t\t\t\n\t\t\t\t'{link_contact}' => $siteUrl.'/contact-us',\n\t\t\t\t'{social_facebook}' => $config['social']['facebook']['value'],\n\t\t\t\t'{social_twitter}' => $config['social']['twitter']['value'],\n\t\t\t\t'{copyright_year}' => date('Y')\n\t\t\t),\n\t\t\t'message' => $mailContent\n\t\t);\n\n\t}",
"function eMail($string) {\n\n\n\t\t}",
"function m_dspemails()\n\t{\n\t\t$this->ObTpl=new template();\n\t\t$this->ObTpl->set_file(\"TPL_EMAIL_FILE\",$this->emailTemplate);\n\n\t\t#SETTING ALL TEMPLATE BLOCKS\n\t\t$this->ObTpl->set_block(\"TPL_EMAIL_FILE\",\"TPL_EMAIL_BLK\", \"email_blk\");\n\t\t$this->ObTpl->set_block(\"TPL_EMAIL_FILE\",\"TPL_MESSAGE_BLK\", \"message_blk\");\n\t\t$this->ObTpl->set_block(\"TPL_EMAIL_FILE\",\"TPL_MSG_BLK1\", \"msg_blk1\");\n\n\t\t#SETTING TEMPLATE VARIABLE\n\t\t$this->ObTpl->set_var(\"GRAPHICSMAINPATH\",GRAPHICS_PATH);\t\n\t\t$this->ObTpl->set_var(\"TPL_VAR_SALESURL\",SITE_URL.\"sales/\");\n\n\t\t#INTAILIZING ***\n\t\t$this->ObTpl->set_var(\"email_blk\",\"\");\t\n\t\t$this->ObTpl->set_var(\"message_blk\",\"\");\t\n\t\t$this->ObTpl->set_var(\"msg_blk1\",\"\");\t\n\t\t$this->ObTpl->set_var(\"msg_blk2\",\"\");\t\n\n\t\t$this->request['msg']=$this->libFunc->ifSet($this->request,\"msg\");\n\t\t$this->ObTpl->set_var(\"TPL_VAR_MESSAGE\",\"\");\n\n\t\t#DATABASE QUERY\n\t\t$this->obDb->query = \"SELECT * FROM \".EMAILS;\n\t\t$queryResult = $this->obDb->fetchQuery();\n\t\t$campaigncount = $this->obDb->record_count;\n\t\tif($this->request['msg']==1)\n\t\t{\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_MSG\",MSG_EMAIL_INSERTED);\n\t\t\t$this->ObTpl->parse(\"msg_blk1\",\"TPL_MSG_BLK1\");\n\t\t\t$this->ObTpl->parse(\"msg_blk2\",\"TPL_MSG_BLK2\");\n\t\t}\n\t\telseif($this->request['msg']==3)\n\t\t{\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_MSG\",MSG_EMAIL_DELETED);\n\t\t\t$this->ObTpl->parse(\"msg_blk1\",\"TPL_MSG_BLK1\");\n\t\t\t$this->ObTpl->parse(\"msg_blk2\",\"TPL_MSG_BLK2\");\n\t\t}\n\t\telseif($this->request['msg']==5)\n\t\t{\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_MSG\",MSG_EMAIL_SENT);\n\t\t\t$this->ObTpl->parse(\"msg_blk1\",\"TPL_MSG_BLK1\");\n\t\t\t$this->ObTpl->parse(\"msg_blk2\",\"TPL_MSG_BLK2\");\n\t\t}\n\n\t\tif($campaigncount>0)\n\t\t{\n\t\t\t#PARSING DISCOUNT BLOCK\n\t\t\tfor($j=0;$j<$campaigncount;$j++)\n\t\t\t{\t\t\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_ID\",$queryResult[$j]->iMailid_PK);\n\t\t\t\tif ($queryResult[$j]->vUserList==\"All\"){\n $this->obDb->query = \"SELECT count(*) as cnt FROM \".CUSTOMERS.\" WHERE iStatus=1 AND iMailList !=0\";\n }else{ \n $this->obDb->query = \"SELECT count(*) as cnt FROM \".LEADLIST.\" WHERE iLeadId_FK='\". $queryResult[$j]->vUserList.\"'\";\n }\n\t\t\t\t$qryRs = $this->obDb->fetchQuery();\n\t\t\t\t\n\t\t\t\tif ($queryResult[$j]->vVisitorList==\"1\"){\n $this->obDb->query = \"SELECT count(*) as cnt FROM \".NEWSLETTERS;\n\t\t\t\t $qryVs = $this->obDb->fetchQuery();\n\t\t\t\t $qryRs[0]->cnt = $qryRs[0]->cnt + $qryVs[0]->cnt;\n }\n\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_USERCOUNT\",$qryRs[0]->cnt);\n \n $this->ObTpl->set_var(\"TPL_VAR_SUBJECT\",$this->libFunc->m_displayContent($queryResult[$j]->vSubject));\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_SID\",$this->libFunc->m_displayContent($queryResult[$j]->vSid));\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_BUILDDATE\",$this->libFunc->dateFormat2($queryResult[$j]->tmBuildDate));\t\n\t\t\t\t$sentDate=$this->libFunc->dateFormat2($queryResult[$j]->tmSentDate);\n\t\t\t\tif(empty($sentDate))\n\t\t\t\t{\t\t\t\t\n\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_SENTDATE\",\"Send now\");\n\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_VIEWLABEL\",\"View/Sent\");\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_SENTDATE\",$sentDate);\n\t\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_VIEWLABEL\",\"View\");\n\t\t\t\t}\n\t\t\t\t$this->ObTpl->parse(\"email_blk\",\"TPL_EMAIL_BLK\",true);\n\t\t\t}\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_MSG\",$campaigncount.\" records found\");\n\t\t\t$this->ObTpl->parse(\"msg_blk1\",\"TPL_MSG_BLK1\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_MESSAGE\",MSG_NOEMAILS);\n\t\t\t$this->ObTpl->parse(\"message_blk\",\"TPL_MESSAGE_BLK\");\n\t\t}\n\t\n\t\treturn($this->ObTpl->parse(\"return\",\"TPL_EMAIL_FILE\"));\n\t}",
"abstract public function get_mailto();",
"function MyApp_Mail_Init()\n {\n if ($this->Mail)\n {\n $this->MailInfo=$this->ReadPHPArray($this->MailSetup);\n $unit=$this->Unit();\n if (!empty($unit[ \"ID\" ]))\n {\n foreach ($this->Unit2MailInfo as $key)\n {\n if (empty($this->MailInfo[ $key ])) { $this->MailInfo[ $key ]=\"\"; }\n \n if (!empty($unit[ $key ]))\n {\n $this->MailInfo[ $key ]=$unit[ $key ];\n }\n }\n }\n $event=array();\n if ($this->CGI_GETint(\"Event\")>0)\n {\n $event=$this->Event();\n }\n\n if (!empty($event[ \"ID\" ]))\n {\n foreach ($this->Event2MailInfo as $key)\n {\n if (empty($this->MailInfo[ $key ])) { $this->MailInfo[ $key ]=\"\"; }\n \n if (!empty($event[ $key ]))\n {\n $this->MailInfo[ $key ]=$event[ $key ];\n }\n }\n }\n }\n }",
"public function __construct(){\n $this->xMailer = phpversion();\n $this->isHtmlEmail = true; //only HTML emails\n\n //TODO : should be set based on config\n $this->subjectPrefix = '';\n $this->body_header = '';\n $this->body_footer = '';\n\n $this->senderName = OcConfig::getSiteName();\n }",
"protected function prepare_mail()\n {\n // Subject\n $subject_text = $this->subject;\n $subject = '=?UTF-8?B?' . base64_encode($subject_text) . '?=';\n\n // Message\n $message = ($this->message);\n\n // To\n $to = '';\n\n foreach($this->to as $item){\n if(empty($item[1])){\n $to .= $item[0];\n }else {\n $to .= '=?UTF-8?B?' . base64_encode($item[1]) . '?= <'.$item[0].'>';\n }\n }\n\n // From\n $from = '';\n\n if(empty($this->from[1])){\n $from .= $this->from[0];\n }else {\n $from .= '=?UTF-8?B?' . base64_encode($this->from[1]) . '?= <'.$this->from[0].'>';\n }\n\n // Reply\n $reply = '';\n\n foreach($this->reply as $item){\n if(empty($item[1])){\n $reply .= $item[0];\n }else {\n $reply .= '=?UTF-8?B?' . base64_encode($item[1]) . '?= <'.$item[0].'>';\n }\n }\n\n if(!empty($reply)){\n $header_reply = 'Reply-To: ' . $reply . \"\\r\\n\"; // Reply-To\n }else{\n $header_reply='';\n }\n\n // CC\n $cc = '';\n\n foreach($this->cc as $item){\n if(empty($item[1])){\n $cc .= $item[0];\n }else {\n $cc .= '=?UTF-8?B?' . base64_encode($item[1]) . '?= <'.$item[0].'>';\n }\n }\n\n if(!empty($cc)){\n $header_cc = 'Cc: ' . $cc . \"\\r\\n\"; // Cc\n }else{\n $header_cc='';\n }\n\n // BCC\n $bcc = '';\n\n foreach($this->bcc as $item){\n if(empty($item[1])){\n $bcc .= $item[0];\n }else {\n $bcc .= '=?UTF-8?B?' . base64_encode($item[1]) . '?= <'.$item[0].'>';\n }\n }\n\n if(!empty($cc)){\n $header_bcc = 'Bcc: ' . $bcc . \"\\r\\n\"; // Bcc\n }else{\n $header_bcc = '';\n }\n\n // Type\n if($this->isHtml){\n $type = \"text/html\";\n }else{\n $type = \"text/plain\";\n }\n\n // Headers\n $headers = '';\n $headers .= 'From: ' . $from . \"\\r\\n\"; // From\n $headers .= 'MIME-Version: 1.0' . \"\\r\\n\"; // MIME\n $headers .= $header_reply; // Reply-To\n $headers .= $header_cc; // CC\n $headers .= $header_bcc; // BCC\n $headers .= 'X-Mailer: PHP/' . phpversion(); // Mailer\n\n // Attachments \n $files = $this->attachment; \n\n // Boundary \n $semi_rand = md5(time()); \n $mime_boundary = \"==Multipart_Boundary_x{$semi_rand}x\"; \n \n // Headers for attachment \n $headers .= \"\\nContent-Type: multipart/mixed;\\n\" . \" boundary=\\\"{$mime_boundary}\\\"\"; \n \n // Multipart boundary \n $message = \"--{$mime_boundary}\\n\" . \"Content-Type: $type; charset=\\\"UTF-8\\\"\\n\" . \n \"Content-Transfer-Encoding: 7bit\\n\\n\" . $message . \"\\n\\n\"; \n \n // Preparing attachment \n if(!empty($files)){ \n for($i=0;$i<count($files);$i++){ \n if(is_file($files[$i])){ \n $file_name = basename($files[$i]); \n $file_size = filesize($files[$i]); \n \n $message .= \"--{$mime_boundary}\\n\"; \n $fp = @fopen($files[$i], \"rb\"); \n $data = @fread($fp, $file_size); \n @fclose($fp); \n $data = chunk_split(base64_encode($data)); \n $message .= \"Content-Type: application/octet-stream; name=\\\"\".$file_name.\"\\\"\\n\" . \n \"Content-Description: \".$file_name.\"\\n\" . \n \"Content-Disposition: attachment;\\n\" . \" filename=\\\"\".$file_name.\"\\\"; size=\".$file_size.\";\\n\" . \n \"Content-Transfer-Encoding: base64\\n\\n\" . $data . \"\\n\\n\"; \n } \n } \n } \n \n $message .= \"--{$mime_boundary}--\"; \n\n return compact(\"subject\", \"message\", \"to\", \"headers\");\n }",
"function send_mime_mail(\r\n\t$name_from, // имя отправителя\r\n\t$email_from, // email отправителя\r\n\t$name_to, // имя получателя\r\n\t$email_to, // email получателя\r\n\t$data_charset, // кодировка переданных данных\r\n\t$send_charset, // кодировка письма\r\n\t$subject, // тема письма\r\n\t$body // текст письма\r\n\t) {\r\n\t\r\n\t$email_to = explode(',', trim(trim($email_to),','));\r\n\r\n\tforeach($email_to as $email)\r\n\t{\r\n\t\t$emails[] = mime_header_encode($name_to, $data_charset, $send_charset) . ' <' . trim($email) . '>';\r\n\t}\r\n\t$to = implode(',', $emails);\r\n\t\r\n\t$subject = mime_header_encode($subject, $data_charset, $send_charset);\r\n\t$from = mime_header_encode($name_from, $data_charset, $send_charset) .' <' . $email_from . '>';\r\n\t\r\n\tif($data_charset != $send_charset) {\r\n\t\t$body = iconv($data_charset, $send_charset, $body);\r\n\t}\r\n\t\r\n\t$headers = \"From: $from\\r\\n\";\r\n\t$headers .= \"Content-type: text/html; charset=$send_charset\\r\\n\";\r\n\t$headers .= \"Mime-Version: 1.0\\r\\n\";\r\n\t\r\n\treturn mail($to, $subject, $body, $headers);\r\n}",
"function sendMail($title, $message, $to, $to_name, $from, $from_name) {\n if (filter_var($to, FILTER_VALIDATE_EMAIL)) {\n saveToLogFile(getLogFileName(), \"Skickar email: \" . $title . \", till: $to \", 'INFO');\n\n /*\n $headers = 'To: ' . $to_name . ' <' . $to . '>' . \"\\r\\n\";\n $headers .= 'From: ' . $from_name . ' <' . $from . '>' . \"\\r\\n\";\n $headers .= 'MIME-Version: 1.0' . \"\\r\\n\";\n $headers .= 'Content-type: text/html; charset=ISO-8859-1' . \"\\r\\n\";\n\n $title_latin = utf8_decode($title);\n $message_latin = utf8_decode($message);\n $headers_latin = utf8_decode($headers);\n $to_latin = utf8_decode($to);\n\n $success = mail($to_latin, $title_latin, $message_latin, $headers_latin);\n */\n\n $headers = 'To: ' . $to_name . ' <' . $to . '>' . \"\\r\\n\";\n $headers .= 'From: ' . $from_name . ' <' . $from . '>' . \"\\r\\n\";\n $headers .= 'MIME-Version: 1.0' . \"\\r\\n\";\n $headers .= 'Content-type: text/html; charset=utf-8' . \"\\r\\n\";\n $success = mail($to, $title, $message, $headers);\n } else {\n $success = false;\n }\n if (!$success) {\n saveToLogFile(getLogFileName(), \"Misslyckades att skicka email: \" . $title . \", till: $to \", 'ERROR');\n }\n}",
"function EMAIL_test($e_to,$e_to_name,$e_subject,$e_in_subject,$e_body){\n\t\t\t// Create the mail transport configuration\n\t\t\t$transport = Swift_MailTransport::newInstance();\n\t\t\t\n\t\t\t// Create the message\n\t\t\t$message = Swift_Message::newInstance();\n\t\t\t$message->setTo(array(\n\t\t\t $e_to => $e_to_name\n\t\t\t));\n\t\t\t$message->setSubject($e_subject . \" - UnitedGaming\");\n\t\t\t$message->setBody(\n\t\t\t'<html>\n\t\t\t<link href=\"http://fonts.googleapis.com/css?family=Source+Sans+Pro:400,700\" rel=\"stylesheet\" type=\"text/css\"/>\n\t\t\t<table border=\"0\" align=\"center\">\n\t\t\t<tr>\n\t\t\t<td><a href=\"http://unitedgaming.org\" target=\"_blank\" title=\"UnitedGaming\" alt=\"UnitedGaming\"><img src=\"http://unitedgaming.org/mainlogo.png\" alt=\"UnitedGaming\" border=\"0\"/></td>\n\t\t\t<td><font face=\"Source Sans Pro\" size=\"6px\" color=\"#BD3538\">'.$e_in_subject.'</font></td>\n\t\t\t</tr>' \n\t\t\t.\n\t\t\t'<br/><br /><br/><tr>\n\t\t\t<td colspan=\"2\"><font face=\"Arial\" size=\"3px\" color=\"#303030\">'.$e_body.'\n\t\t\t </td></tr><tr><td><br/><font face=\"Source Sans Pro\" size=\"2px\">Kind Regards,<br/>Chuevo</font></td><td></td></tr></table></html>\n\t\t\t ');\n\t\t\t$message->setFrom(\"[email protected]\", \"UnitedGaming\");\n\t\t\t$type = $message->getHeaders()->get('Content-Type');\n\n\t\t\t$type->setValue('text/html');\n\t\t\t$type->setParameter('charset', 'utf-8');\n\t\t\t\n\t\t\t//echo $type->toString();\n\t\t\t\n\t\t\t/*\n\t\t\t\n\t\t\tContent-Type: text/html; charset=utf-8\n\t\t\t\n\t\t\t*/\n\t\t\t// Send the email\n\t\t\t$mailer = Swift_Mailer::newInstance($transport);\n\t\t\t$mailer->send($message);\n}",
"function process_mail(){\n\t\t$result = true;\n\t\t\n\t\tif(count($this->to) < 1){\n\t\t\treturn 'No email address.';\n\t\t}\n\t\t$this->set_eol();\n\t\t$this->get_message_type();\n\t\t$this->set_boundary();\n\t\t$headers = $this->set_headers();\n\t\t$body = $this->set_body();\n\t\t\n\t\tif($body == ''){\n\t\t\treturn 'Empty email body.';\n\t\t}\n\t\t$result = $this->send_mail($headers, $body);\n\t\treturn $result;\n\t}",
"public function setEmailTpl($value){$this->_emailTpl = $value;}",
"public function __construct() {\n parent::__construct();\n $this->CharSet = 'utf-8';\n $this->IsMail(); // telling the class to use native PHP mail()\n $this->SetFrom(\"[email protected]\", \"Schedule-NRCU\");\n $this->Subject = 'schedule.nrcu.gov.ua';\n $this->AltBody = 'To view the message, please use an HTML compatible email viewer!'; // optional - MsgHTML will create an alternate automatically\n }",
"abstract public function getMailType(): int;",
"protected function getEmailSubject() {}",
"public function getMail();",
"public function isMail()\n {\n }",
"function sendHTMLMail($content,$recipient,$dummy,$fromEmail,$fromName,$replyTo='',$recepientsCopy='',$recepientsBcc='')\t{\n\t\tif (trim($recipient) && trim($content))\t{\n\t\t\t$cls=t3lib_div::makeInstanceClassName('t3lib_htmlmail');\n\t\t\tif (class_exists($cls))\t{\t// If htmlmail lib is included, then generate a nice HTML-email\n\t\t\t\t$parts = spliti('<title>|</title>',$content,3);\n\t\t\t\t$subject = trim($parts[1]) ? trim($parts[1]) : 'TYPO3 FE Admin message';\n\n\t\t\t\t$Typo3_htmlmail = t3lib_div::makeInstance('t3lib_htmlmail');\n\t\t\t\t$Typo3_htmlmail->start();\n\t\t\t\t$Typo3_htmlmail->useBase64();\n\n\t\t\t\t$Typo3_htmlmail->subject = $subject;\n\t\t\t\t$Typo3_htmlmail->from_email = $fromEmail;\n\t\t\t\t$Typo3_htmlmail->from_name = $fromName;\n\t\t\t\t$Typo3_htmlmail->replyto_email = $replyTo ? $replyTo : $fromEmail;\n\t\t\t\t$Typo3_htmlmail->replyto_name = $replyTo ? '' : $fromName;\n\t\t\t\t//modif by CMD - add return path information\n\t\t\t\t$Typo3_htmlmail->returnPath = $replyTo ? $replyTo : $fromEmail;\n\t\t\t\t$Typo3_htmlmail->organisation = '';\n\t\t\t\t$Typo3_htmlmail->priority = 3;\n\n\t\t\t\t\t// HTML\n\t\t\t\t$Typo3_htmlmail->theParts['html']['content'] = $content;\t// Fetches the content of the page\n\t\t\t\t$Typo3_htmlmail->theParts['html']['path'] = '';\n\t\t\t\t$Typo3_htmlmail->extractMediaLinks();\n\t\t\t\t$Typo3_htmlmail->extractHyperLinks();\n\t\t\t\t$Typo3_htmlmail->fetchHTMLMedia();\n\t\t\t\t$Typo3_htmlmail->substMediaNamesInHTML(0);\t// 0 = relative\n\t\t\t\t$Typo3_htmlmail->substHREFsInHTML();\n\t\t\t\t$Typo3_htmlmail->setHTML($Typo3_htmlmail->encodeMsg($Typo3_htmlmail->theParts['html']['content']));\n\n\t\t\t\t\t// PLAIN\n\t\t\t\t$Typo3_htmlmail->addPlain('');\n\n\t\t\t\t\t// SET Headers and Content\n\t\t\t\t$Typo3_htmlmail->setHeaders();\n\t\t\t\t$Typo3_htmlmail->setContent();\n\t\t\t\t$Typo3_htmlmail->setRecipient($recipient);\n\t\t\t\t$Typo3_htmlmail->recipient_copy=$recepientsCopy;\n\t\t\t\t$Typo3_htmlmail->recipient_blindcopy=$recepientsBcc;\n\t\t//\t\tdebug($Typo3_htmlmail->theParts);\n\t\t\t\t$Typo3_htmlmail->sendtheMail();\n\t\t\t} else {\n\t\t\t\tdebug('SYSTEM ERROR: No HTML-mail library loaded. Set \"page.config.incT3Lib_htmlmail = 1\" is your TypoScript template.');\n\t\t\t}\n\t\t}\n\t}",
"function envoi_mail($dest, $titre, $cont) {\n //----------------------------------------------- \n //DECLARE LES VARIABLES \n //----------------------------------------------- \n $email_reply = '[email protected]';\n\n $message_html = '<html> \n <head> \n <title>'.$titre.'</title> \n </head> \n <body>\n <div style=\"padding: 7px; font-size: 1.1em\">\n '.$cont.'\n <br />\n <p>\n Passez une bonne journée sur <a href=\"http://BlogPHP.fr/\">'.Conf::$SITE['TITRE'].'</a>,\n <br />\n <em>L\\'équipe de développement.</em>\n </p>\n </div>\n </body> \n </html>'; \n\n //----------------------------------------------- \n //HEADERS DU MAIL \n //----------------------------------------------- \n\tini_set('SMTP','smtp.sfr.fr');\n\n $entetedate = date(\"D, j M Y H:i:s\"); // avec offset horaire\n $headers = 'From: \"'.Conf::$SITE['TITRE'].'\" <'.$email_reply.'>'.\"\\n\";\n $headers .= 'Return-Path: <'.$email_reply.'>'.\"\\n\"; \n $headers .= 'MIME-Version: 1.0'.\"\\n\"; \n $headers .= 'Content-Type: text/html; charset=\"utf-8\"'.\"\\n\"; \n $headers .= 'Content-Transfer-Encoding: 8bit'.\"\\n\"; \n $headers .= \"X-Mailer: PHP/\" . phpversion() . \"\\n\\n\" ;\n\n return mail($dest, $titre, $message_html, $headers);\n}",
"function __construct() {\n\t\t\t\tparent :: __construct();\n\t\t\t\t$this->adminemail = $this->get_admin_email();\n\t\t\t\t$this->adminmobile = $this->get_admin_mobile();\n\t\t\t\t$siteInfo = $this->get_siteTitleUrl();\n\t\t\t\t$this->sitetitle = $siteInfo['title'];\n\t\t\t\t$this->siteurl = addHttp($siteInfo['url']);\n\n\t\t\t\t$headFootShortcode = array(\"{siteTitle}\",\"{siteUrl}\");\n\t\t\t\t$headFootVals = array($this->sitetitle,$this->siteurl);\n\n\t\t\t\t$mailsettings = $this->get_mailserver();\n\t\t\t\t$this->mailHeader = str_replace($headFootShortcode, $headFootVals, $mailsettings[0]->mail_header);\n\t\t\t\t$this->mailFooter = str_replace($headFootShortcode, $headFootVals, $mailsettings[0]->mail_footer);\n\t\t\t\t\n\t\t\t\tif ($mailsettings[0]->mail_default == \"smtp\") {\n\t\t\t\t\t\n\t\t\t\t\tif($mailsettings[0]->mail_secure == \"no\"){\n\t\t\t\t\t\t$secure = \"\";\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$secure = $mailsettings[0]->mail_secure.\"://\";\n\t\t\t\t\t}\n\t\t\t\t\t\t$this->sendfrom = $mailsettings[0]->mail_fromemail;\n\t\t\t\t\t\t$config = Array('protocol' => 'smtp', 'charset' => 'utf-8',\n\t\t\t\t\t\t\t'smtp_host' => $secure.$mailsettings[0]->mail_hostname, \n\t\t\t\t\t\t\t'smtp_port' => $mailsettings[0]->mail_port, \n\t\t\t\t\t\t\t'smtp_user' => $mailsettings[0]->mail_username, 'smtp_pass' => $mailsettings[0]->mail_password, 'mailtype' => 'html', 'charset' => 'iso-8859-1', 'wordwrap' => TRUE,'smtp_auth' => TRUE);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$this->load->library('email', $config);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t\t$this->sendfrom = $mailsettings[0]->mail_fromemail;\n\t\t\t\t\t\t$this->load->library('email');\n\t\t\t\t\t\t$this->email->set_mailtype(\"html\");\n\t\t\t\t}\n\n\t\t}",
"protected function _email($type, $data)\n {\n $this->load->library('mail');\n $this->load->library('parser');\n\n $email = false;\n\n switch ($type) {\n case 'contact':\n // Build the message\n $message = $data['message'].\"\\r\\n\\r\\n\";\n $message.= \"Recipient Information: {$data['name']} ({$data['email']}), \";\n $message.= $this->input->ip_address();\n\n // Set the email data\n $emailData = array(\n 'email_subject' => $data['subject'],\n 'email_from' => ucfirst(lang('time_from')) .\": {$data['name']} - {$data['email']}\",\n 'email_content' => nl2br($message),\n );\n\n // where should the email be coming from\n $loc = Location::email('main_contact', $this->mail->mailtype);\n\n // parse the message\n $parsedMessage = $this->parser->parse_string($loc, $emailData, true);\n\n // get the game masters\n $gm = $this->user->get_gm_emails();\n\n // set the TO variable\n $to = implode(',', $gm);\n\n // set the parameters for sending the email\n $this->mail->from(Util::email_sender(), $data['name']);\n $this->mail->bcc($to);\n $this->mail->subject($this->options['email_subject'] .' '. $data['subject']);\n $this->mail->message($parsedMessage, $message);\n break;\n\n case 'news_comment':\n // Load the resources\n $this->load->model('news_model', 'news');\n\n // Get all the information from the database\n $row = $this->news->get_news_item($data['news_item']);\n $name = $this->char->get_character_name($data['author']);\n $from = $this->user->get_email_address('character', $data['author']);\n $to = $this->user->get_email_address('character', $row->news_author_character);\n\n // Build the content of the message\n $content = sprintf(\n lang('email_content_news_comment_added'),\n \"<strong>\". $row->news_title .\"</strong>\",\n $data['comment']\n );\n\n // compile the data for the message\n $emailData = array(\n 'email_subject' => lang('email_subject_news_comment_added'),\n 'email_from' => ucfirst(lang('time_from')) .': '. $name .' - '. $from,\n 'email_content' => nl2br($content)\n );\n\n // where should the email be coming from\n $loc = Location::email('main_news_comment', $this->mail->mailtype);\n\n // parse the message\n $message = $this->parser->parse_string($loc, $emailData, true);\n\n // set the parameters for sending the email\n $this->mail->from(Util::email_sender(), $name);\n $this->mail->bcc($to);\n $this->mail->subject($this->options['email_subject'].' '.$emailData['email_subject']);\n $this->mail->message($message, $content);\n break;\n\n case 'news_comment_pending':\n // load the resources\n $this->load->model('news_model', 'news');\n\n // get all the information from the database\n $row = $this->news->get_news_item($data['news_item']);\n $name = $this->char->get_character_name($data['author']);\n $from = $this->user->get_email_address('character', $data['author']);\n $to = implode(',', $this->user->get_emails_with_access('manage/comments'));\n\n // set the content of the message\n $content = sprintf(\n lang('email_content_comment_pending'),\n lang('global_newsitems'),\n \"<strong>\". $row->news_title .\"</strong>\",\n $data['comment'],\n site_url('login/index')\n );\n\n // compile the information together for the message\n $emailData = array(\n 'email_subject' => lang('email_subject_comment_pending'),\n 'email_from' => ucfirst(lang('time_from')) .': '. $name .' - '. $from,\n 'email_content' => nl2br($content)\n );\n\n // where should the email be coming from\n $loc = Location::email('comment_pending', $this->mail->mailtype);\n\n // parse the message\n $message = $this->parser->parse_string($loc, $emailData, true);\n\n // set the parameters for sending the email\n $this->mail->from(Util::email_sender(), $name);\n $this->mail->bcc($to);\n $this->mail->subject($this->options['email_subject'] .' '. $emailData['email_subject']);\n $this->mail->message($message, $content);\n break;\n\n case 'join_user':\n // build the content of the message\n $content = sprintf(\n lang('email_content_join_user'),\n $this->options['sim_name'],\n $data['email'],\n $data['password']\n );\n\n // compile the information for the email\n $emailData = array(\n 'email_subject' => lang('email_subject_join_user'),\n 'email_from' => ucfirst(lang('time_from')) .': '. $this->options['default_email_name'] .' - '. $this->options['default_email_address'],\n 'email_content' => nl2br($content)\n );\n\n // where should the email be coming from\n $loc = Location::email('main_join_user', $this->mail->mailtype);\n\n // parse the message\n $message = $this->parser->parse_string($loc, $emailData, true);\n\n // set the parameters for sending the email\n $this->mail->from(Util::email_sender(), $this->options['default_email_name']);\n $this->mail->bcc($data['email']);\n $this->mail->subject($this->options['email_subject'] .' '. $emailData['email_subject']);\n $this->mail->message($message, $content);\n break;\n\n case 'join_gm':\n // load the resources\n $this->load->model('positions_model', 'pos');\n\n $content = lang('email_content_join_gm');\n\n // compile the information for the email\n $emailData = array(\n 'email_subject' => lang('email_subject_join_gm'),\n 'email_from' => ucfirst(lang('time_from')) .': '. $data['name'] .' - '. $data['email'],\n 'email_content' => nl2br($content),\n 'basic_title' => ucwords(lang('labels_basic').' '.lang('labels_info')),\n );\n\n // build the user data array\n $p_data = $this->user->get_user($data['user']);\n $emailData['user'] = array(\n array(\n 'label' => ucfirst(lang('labels_name')),\n 'data' => $data['name']),\n array(\n 'label' => ucwords(lang('labels_email_address')),\n 'data' => $data['email']),\n array(\n 'label' => ucwords(lang('labels_ipaddr')),\n 'data' => $data['ipaddr']),\n array(\n 'label' => lang('labels_dob'),\n 'data' => $p_data->date_of_birth)\n );\n\n // build the character data array\n $c_data = $this->char->get_character($data['id']);\n $emailData['character'] = array(\n array(\n 'label' => ucwords(lang('global_character') .' '. lang('labels_name')),\n 'data' => $this->char->get_character_name($data['id'])),\n array(\n 'label' => ucfirst(lang('global_position')),\n 'data' => $this->pos->get_position($c_data->position_1, 'pos_name')),\n );\n\n // get the sections\n $sections = $this->char->get_bio_sections();\n\n if ($sections->num_rows() > 0) {\n foreach ($sections->result() as $sec) {\n $emailData['sections'][$sec->section_id]['title'] = $sec->section_name;\n\n $fields = $this->char->get_bio_fields($sec->section_id);\n\n if ($fields->num_rows() > 0) {\n foreach ($fields->result() as $field) {\n $bio_data = $this->char->get_field_data($field->field_id, $data['id']);\n\n if ($bio_data->num_rows() > 0) {\n foreach ($bio_data->result() as $item) {\n $emailData['sections'][$sec->section_id]['fields'][] = array(\n 'field' => $field->field_label_page,\n 'data' => text_output($item->data_value, '')\n );\n }\n }\n }\n }\n }\n }\n\n $emailData['sample_post_label'] = ucwords(lang('labels_sample_post'));\n $emailData['sample_post'] = ($this->mail->mailtype == 'html') ? nl2br($data['sample_post']) : $data['sample_post'];\n\n // where should the email be coming from\n $loc = Location::email('main_join_gm', $this->mail->mailtype);\n\n // parse the message\n $message = $this->parser->parse_string($loc, $emailData, true);\n\n // set the TO variable\n $to = implode(',', $this->user->get_emails_with_access('characters/index'));\n\n // set the parameters for sending the email\n $this->mail->from(Util::email_sender(), $data['name']);\n $this->mail->bcc($to);\n $this->mail->subject($this->options['email_subject'] .' '. $emailData['email_subject']);\n $this->mail->message($message, $content);\n break;\n }\n\n $email = $this->mail->send();\n\n return $email;\n }",
"function email( $to, $subject, $message ){\n\n\n /**\n * set up mail headers \n */\n $headers = 'From: Support - Furasta.Org <[email protected]>'.\"\\r\\n\".'Reply-To: [email protected]'.\"\\r\\n\";\n $headers .= 'X-Mailer: PHP/' .phpversion().\"\\r\\n\";\n $headers .= 'MIME-Version: 1.0'.\"\\r\\n\";\n $headers .= 'Content-Type: text/html; charset=ISO-8859-1'.\"\\r\\n\";\n\n require_once '_inc/function/defualts.php';\n\n\t/**\n\t * message template \n\t */\n $message = defaults_email_template( $message );\n\n\t/**\n\t * return success of mail function \n\t */\n return mail( $to, $subject, $message, $headers );\n\n}",
"function sendMail($emailFrom, $fromName, $emailTo, $nameTo, $subject, $body, $currentLanguage) {\n\n\t\trequire_once(\"library/phpmailer/PHPMailerAutoload.php\");\n\t\t$settings = new View(\"settings\", $currentLanguage, \"lang_id\");\n\n\t\t$body = nl2br($body);\n\t\t$body = str_replace(array(\"\\\n \", \"\\\\r\", \"\\\\n\", \"bcc:\"), \"<br/>\", $body);\n\n\t\tif (is_file(\"images/logo.png\")) {\n\t\t\t$logo = $settings->site_host . \"images/logo.png\";\n\t\t} elseif (is_file(\"images/logo.svg\")) {\n\t\t\t$logo = $settings->site_host . \"images/logo.svg\";\n\t\t} elseif (is_file(\"images/logo.jpg\")) {\n\t\t\t$logo = $settings->site_host . \"images/logo.jpg\";\n\t\t}\n\n\t\t$socials = \"\";\n\t\tif ($settings->site_facebook != \"\") {\n\t\t\t$socials .= '<a style=\"color: #000;font-family:Arial, sans-serif;font-size: 14px;line-height: 21px;text-transform: lowercase;\" href=\"' . $settings->site_facebook . '\" title=\"Facebook stranica ' . $settings->site_host . '\" target=\"_blank\"><img style=\"width: 30px;margin: 0 5px;\" src=\"' . $settings->site_host . 'images/socials/facebook.png\" alt=\"Facebook stranica ' . $settings->site_firm . '\"></a>';\n\t\t}\n\t\tif ($settings->site_twitter != \"\") {\n\t\t\t$socials .= '<a style=\"color:#000;font-family: Arial, sans-serif;font-size:14px;line-height:21px;text-transform:lowercase;\" href=\"' . $settings->site_twitter . '\" title=\"Twitter stranica ' . $settings->site_host . '\" target=\"_blank\"><img style=\"width: 30px;margin: 0 5px;\" src=\"' . $settings->site_host . 'images/socials/twitter.png\" alt=\"Twitter stranica ' . $settings->site_firm . '\"></a>';\n\t\t}\n\t\tif ($settings->site_google_plus != \"\") {\n\t\t\t$socials .= '<a style=\"color:#000;font-family: Arial, sans-serif;font-size:14px;line-height:21px;text-transform:lowercase;\" href=\"' . $settings->site_google_plus . '\" title=\"Google Plus stranica ' . $settings->site_host . '\" target=\"_blank\"><img style=\"width: 30px;margin: 0 5px;\" src=\"' . $settings->site_host . 'images/socials/google-plus.png\" alt=\"Google Plus stranica ' . $settings->site_firm . '\"></a>';\n\t\t}\n\t\tif ($settings->site_instagram != \"\") {\n\t\t\t$socials .= '<a style=\"color:#000;font-family: Arial, sans-serif;font-size:14px;line-height:21px;text-transform:lowercase;\" href=\"' . $settings->site_instagram . '\" title=\"Instagram stranica ' . $settings->site_host . '\" target=\"_blank\"><img style=\"width: 30px;margin: 0 5px;\" src=\"' . $settings->site_host . 'images/socials/instagram.png\" alt=\"Instagram stranica ' . $settings->site_firm . '\"></a>';\n\t\t}\n\t\tif ($settings->site_pinterest != \"\") {\n\t\t\t$socials .= '<a style=\"color:#000;font-family: Arial, sans-serif;font-size:14px;line-height:21px;text-transform:lowercase;\" href=\"' . $settings->site_pinterest . '\" title=\"Pinterest stranica ' . $settings->site_host . '\" target=\"_blank\"><img style=\"width: 30px;margin: 0 5px;\" src=\"' . $settings->site_host . 'images/socials/pinterest.png\" alt=\"Pinterest stranica ' . $settings->site_firm . '\"></a>';\n\t\t}\n\t\tif ($settings->site_youtube != \"\") {\n\t\t\t$socials .= '<a style=\"color:#000;font-family: Arial, sans-serif;font-size:14px;line-height:21px;text-transform:lowercase;\" href=\"' . $settings->site_youtube . '\" title=\"You Tube stranica ' . $settings->site_host . '\" target=\"_blank\"><img style=\"width: 30px;margin: 0 5px;\" src=\"' . $settings->site_host . 'images/socials/youtube.png\" alt=\"You Tube stranica ' . $settings->site_firm . '\"></a>';\n\t\t}\n\t\tif ($settings->site_vimeo != \"\") {\n\t\t\t$socials .= '<a style=\"color:#000;font-family: Arial, sans-serif;font-size:14px;line-height:21px;text-transform:lowercase;\" href=\"' . $settings->site_vimeo . '\" title=\"Vimeo stranica ' . $settings->site_host . '\" target=\"_blank\"><img style=\"width: 30px;margin: 0 5px;\" src=\"' . $settings->site_host . 'images/socials/vimeo.png\" alt=\"Vimeo stranica ' . $settings->site_firm . '\"></a>';\n\t\t}\n\n\t\t\n\t\t$footer = $settings->site_firm.\", \".$settings->site_address.\", \".$settings->site_zip.\" \".$settings->site_city.\"<br /><a style='color: #000;font-family:Arial, sans-serif;font-size: 14px;line-height: 21px;text-transform: lowercase;' href='tel:$settings->site_phone'>\".$settings->site_phone.\"</a>\";\n\t\tif($settings->site_phone_2){\n\t\t\t$footer .= \", <a style='color: #000;font-family:Arial, sans-serif;font-size: 14px;line-height: 21px;text-transform: lowercase;' href='tel:$settings->site_phone_2'>\".$settings->site_phone_2.\"</a>\";\n\t\t}\n\t\t$footer .= \"<br /><a style='color: #000;font-family:Arial, sans-serif;font-size: 14px;line-height: 21px;text-transform: lowercase;' href='mailto:$settings->site_email'>\".$settings->site_email.\"</a>\";\n\t\t\n\t\t$bodyMail = file_get_contents(\"includes/mail.html\");\n\t\t$bodyMail = str_replace(array(\"[CONTENT]\", \"[LOGO]\", \"[SITE_TITLE]\", \"[FOOTER]\", \"[DOMAIN]\", \"[SUBJECT]\", \"[SOCIALS]\"), array(\"<p>\".$body.\"</p>\", $logo, $settings->site_title, $footer, $settings->site_host, $subject, $socials), $bodyMail);\n\n\t\t\n\t\t$mail = new PHPMailer();\n\n\t\t$mail->IsSMTP();\n\t\t$mail->SMTPDebug = 0;\n\t\t$mail->CharSet = 'UTF-8';\n\t\t$mail->Host = $settings->site_outgoing_server;\n\t\t$mail->Port = $settings->site_smtp_port;\n\t\t$mail->SMTPAuth = true;\n\t\t$mail->Username = $settings->site_username;\n\t\t$mail->Password = $settings->site_password;\n\t\t$mail->Mailer = \"smtp\";\n\t\t$mail->SMTPSecure = 'ssl';\n\n\t\t$mail->From = $emailFrom;\n\t\t$mail->FromName = $fromName;\n\t\t$mail->AddAddress($emailTo, $nameTo);\n\t\t$mail->AddReplyTo($emailFrom, $fromName);\n\n\t\t$mail->isHTML(true);\n\t\t$mail->WordWrap = 50;\n\t\t$mail->Subject = $subject;\n\t\t$mail->Body = $bodyMail;\n\t\t$mail->AltBody = strip_tags($body);\n\n\t\tif (!$mail->Send()) {\n\t\t\techo 'Message was not sent. Mailer error: ' . $mail->ErrorInfo . '<br />';\n\t\t}\n\t}",
"function mailer() {\n\t\tJRequest::checkToken() or die( JText::_( 'Invalid Token' ) );\n\t\t$email = JRequest::getVar('email');\n\t\t$title = JRequest::getVar('title');\n\t\t$from = array($email, $title);\n\t\t// set emailadres from the site\n\t\t$config =&JFactory::getConfig();\n\t\t// Get some variables from the component options\n\t\t$app = JFactory::getApplication('site');\n\t\t$componentParams = $app->getParams('com_mdcontact');\n\t\t$email_to = $componentParams->get('email_to');\n\t\t$subject = $componentParams->get('subject');\n\t\t$to = array($email_to, $email_to );\n\t\t// Set some variables for the email message\n\t\t$copy = JRequest::getVar('copy');;\n\t\t$body = JRequest::getVar('description');;\n\t\n\t\t// Invoke JMail Class\n\t\t$mailer = JFactory::getMailer();\n\t\n\t\t// Set sender array so that my name will show up neatly in your inbox\n\t\t$mailer->setSender($from);\n\t\t$mailer->addRecipient($to);\n\t\t// Set cc if copy is checked\n\t\tif ($copy=='1'){\n\t\t\t$mailer->addCC($from);\n\t\t\t}\n\t\t$mailer->setSubject($subject);\n\t\t$mailer->setBody($body);\n\t\t$send = $mailer->Send();\n\t\t// set the redirect page\n\t\t$redirect = JRoute::_('index.php?option=com_mdcontact&view=contact&task=add');\n\t\tif ( $send !== true ) {\n\t\t\tJFactory::getApplication()->enqueueMessage('Your message is not send, please try again later', 'error');\n\t\t\t$this->setRedirect( $redirect);\n\t\t} else {\n\t\tparent::apply();\n\t}\n\t}",
"abstract protected function _getEmail($info);",
"protected abstract function _message();",
"private static function mail()\n {\n $files = ['Mail', 'Mailable', 'SMTP'];\n $folder = static::$root.'Mailing'.'/';\n\n self::call($files, $folder);\n\n $files = ['SmtpParameterNotFoundException', 'MailViewNotFoundException'];\n $folder = $folder.'Exceptions/';\n\n self::call($files, $folder);\n }",
"private function _build_mail () {\n if (empty($this->sendto) && (empty($this->body) && empty($this->htmlbody))) {\n throw new Exception(\"Cannot send, need more information\");\n }\n\n // build the headers\n $this->headers = \"\";\n\n $this->xheaders['To'] = implode(',', $this->sendto);\n\n $cc_header_name = ($this->apply_windows_bugfix) ? 'cc': 'Cc';\n if (!empty($this->sendcc)) $this->xheaders[$cc_header_name] = implode(',', $this->sendcc);\n if (!empty($this->sendbcc)) $this->xheaders['Bcc'] = implode(',', $this->sendbcc);\n\n if($this->receipt) {\n if(isset($this->xheaders['Reply-To'])) {\n $this->xheaders['Disposition-Notification-To'] = $this->xheaders['Reply-To'];\n }\n elseif (isset($this->xheaders['From'])) {\n $this->xheaders['Disposition-Notification-To'] = $this->xheaders['From'];\n }\n }\n\n if($this->charset != '') {\n $this->xheaders['Mime-Version'] = '1.0';\n $this->xheaders['Content-Type'] = 'text/plain; charset='.$this->charset;\n $this->xheaders['Content-Transfer-Encoding'] = $this->ctencoding;\n }\n\n if (!$this->xheaders['X-Mailer']) {\n $this->xheaders['X-Mailer'] = 'King-Fu MimeMail';\n }\n\n // setup the body ready for sending\n $this->_set_body();\n\n foreach ($this->xheaders as $head => $value) {\n $rgx = ($this->apply_windows_bugfix) ? 'Subject' : 'Subject|To'; // don't strip out To header for bugfix\n if (!preg_match('/^'.$rgx.'$/i', $head)) $this->headers .= $head.': '.strtr($value, \"\\r\\n\", ' ').\"\\n\";\n }\n }",
"private function sendEmails()\r\n {\r\n $user_body = \"Hi,<br>A new comment was added to the following article:\\n\";\r\n $user_body .= '<a href=\"http://'.$this->config->getModuleVar('common', 'site_url').'/id_article/'.$this->viewVar['article']['id_article'].'\">'.$this->viewVar['article']['title'].\"</a>\\n\";\r\n\r\n $_tmp_error = array();\r\n $user_text_body = strip_tags($user_body);\r\n\r\n $this->model->action( 'common', 'mailSendTo',\r\n array('charset' => $this->viewVar['charset'],\r\n 'bodyHtml' => & $user_body,\r\n 'bodyText' => & $user_text_body,\r\n 'to' => array(array('email' => '[email protected]',\r\n 'name' => 'Armand Turpel')),\r\n 'subject' => \"Open Publisher Blog Entry\",\r\n 'fromEmail' => '[email protected]',\r\n 'fromName' => '[email protected]',\r\n 'error' => & $_tmp_error\r\n ));\r\n\r\n }",
"function tep_mail($to_name, $to_email_address, $email_subject, $email_text, $from_email_name, $from_email_address) {\n\tif (SEND_EMAILS != 'true') return false;\n $headers[\"From\"] = $from_email_address;\n $headers[\"To\"] = $to_email_address;\n $headers[\"Subject\"] = $email_subject;\n $mail_object =& Mail::factory(\"sendmail\");\n\tif (EMAIL_USE_HTML == 'true') {\n $headers[\"Content-Type\"] = \"text/html; charset=utf-8\";\n $message = str_replace(array(\"\\r\\n\", \"\\n\", \"\\r\"), \"<br />\",$email_text);\n }else{\n $headers[\"Content-Type\"] = \"text/plain; charset=utf-8\";\n $message = str_replace(array(\"\\r\\n\", \"\\n\", \"\\r\"), \"\\r\\n\",strip_tags($email_text));\n }\n\ttep_bh_transac_mail($to_name, $to_email_address, $from_email_name, $from_email_address, $email_subject, $message);\n\t// Send message\n //$mail_object->send($to_email_address, $headers, $message);\n}",
"public function getMailMIME()\n {\n }",
"function sendMail_dis($to_email,$extraMsg)\n{\n //$to_email \t=\"[email protected]\";\n $from \t=\"[email protected]\";\n\t$subject\t=\"List of cancelled transaction in last 1 week\";\n $msgTxt\t\t=\"Hi, <br><br>\n\t \tPlease find the list of usernames whose transaction has been cancelled in last 1 week (From: $last_7day - $dateEnd).<br><br>\";\n\n $msgTxt \t.=$extraMsg.\"<br><br>\";\n $msgTxt \t.=\"Thanks,<br>Team Jeevansathi<br>\";\n send_email($to_email,$msgTxt,$subject,$from);\n}",
"function sendTheMail() {\n//\t\t$conf = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['direct_mail'];\n\t\t\t\t\n\t\t\t// format headers for SMTP use\n\t\tif ($this->useSmtp) {\n\t\t\t$headers = array();\n\t\t\t$headerlines = explode(\"\\n\",trim($this->headers));\n\t\t\t$headers['To'] = $this->recipient;\n\t\t\t$headers['Subject'] = $this->subject;\n\t\t\tforeach($headerlines as $k => $hd) {\n\t\t\t\tif (substr($hd,0,9)==\" boundary\") {\n\t\t\t\t\t$headers['Content-Type'] .= \"\\n \" . $hd;\n\t\t\t\t} else {\n\t\t\t\t\t$current = explode(':',$hd);\n\t\t\t\t\t$headers[$current[0]] = $current[1];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// create a new mail object if not existing\n\t\t\tif (!is_a($this->mailObject, 'Mail_smtp') || $this->confSMTP['persist'] == 1) {\n\t\t\t\t$this->mailObject = NULL;\n\t\t\t\t$this->mailObject =& Mail::factory('smtp', $this->confSMTP);\n\t\t\t}\n\t\t}\n\n\t\t// Sends the mail, requires the recipient, message and headers to be set.\n\t\tif (trim($this->recipient) && trim($this->message))\t{\t// && trim($this->headers)\n\t\t\t$returnPath = (strlen($this->returnPath)>0)?\"-f\".$this->returnPath:'';\n\t\t\t\t//On windows the -f flag is not used (specific for Sendmail and Postfix), but instead the php.ini parameter sendmail_from is used.\n\t\t\tif($this->returnPath) {\n\t\t\t\tini_set(sendmail_from, $this->returnPath);\n\t\t\t}\n\t\t\t\t// Setting defer mode\n\t\t\t$deferMode = $this->useDeferMode ? (($returnPath ? ' ': '') . '-O DeliveryMode=defer') : '';\n\t\t\t/**\n\t\t\t * TODO: will be obsolete, once swiftmailer is used\n\t\t\t */\n\t\t\t$message = preg_replace('/^\\.$/m', '. ', $this->message);\n\t\t\t\n\t\t\tif ($this->useSmtp)\t{\n\t\t\t\t$this->mailObject->send($this->recipient, $headers, $message);\n\t\t\t} \n\t\t\telseif(!ini_get('safe_mode') && $this->forceReturnPath) {\n\t\t\t\t//If safe mode is on, the fifth parameter to mail is not allowed, so the fix wont work on unix with safe_mode=On\n\t\t\t\tmail($this->recipient,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $message,\n\t\t\t\t\t $this->headers,\n\t\t\t\t\t $returnPath.$deferMode);\n\t\t\t} else {\n\t\t\t\tmail($this->recipient,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $message,\n\t\t\t\t\t $this->headers);\n\t\t\t}\n\t\t\t\t// Sending copy:\n\t\t\tif ($this->recipient_copy)\t{\n\t\t\t\tif ($this->useSmtp)\t{\n\t\t\t\t\t$this->mailObject->send($this->recipient, $headers, $message);\n\t\t\t\t} elseif (!ini_get('safe_mode') && $this->forceReturnPath) {\n\t\t\t\t\tmail($this->recipient_copy,\n\t\t\t\t\t\t\t\t$this->subject,\n\t\t\t\t\t\t\t\t$message,\n\t\t\t\t\t\t\t\t$this->headers,\n\t\t\t\t\t\t\t\t$returnPath.$deferMode);\n\t\t\t\t} else {\n\t\t\t\t\tmail($this->recipient_copy,\n\t\t\t\t\t\t\t\t$this->subject,\n\t\t\t\t\t\t\t\t$message,\n\t\t\t\t\t\t\t\t$this->headers\t);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\t// Auto response\n\t\t\tif ($this->auto_respond_msg)\t{\n\t\t\t\t$theParts = explode('/',$this->auto_respond_msg,2);\n\t\t\t\t$theParts[1] = str_replace(\"/\",chr(10),$theParts[1]);\n\t\t\t\tif ($this->useSmtp)\t{\n\t $headers['Subject'] = $theParts[0];\n\t $headers['From'] = $this->recipient;\n\t $res = $this->mailObject->send($this->from_email, $headers, $theParts[1]);\n\t\t\t\t} elseif (!ini_get('safe_mode') && $this->forceReturnPath) {\n\t\t\t\t\tmail($this->from_email,\n\t\t\t\t\t\t\t\t$theParts[0],\n\t\t\t\t\t\t\t\t$theParts[1],\n\t\t\t\t\t\t\t\t\"From: \".$this->recipient,\n\t\t\t\t\t\t\t\t$returnPath.$deferMode);\n\t\t\t\t} else {\n\t\t\t\t\tmail($this->from_email,\n\t\t\t\t\t\t\t\t$theParts[0],\n\t\t\t\t\t\t\t\t$theParts[1],\n\t\t\t\t\t\t\t\t\"From: \".$this->recipient);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($this->returnPath) {\n\t\t\t\tini_restore(sendmail_from);\n\t\t\t}\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"Function smtp_mail($to,$subject,$message,$additional_headers=\"\",$additional_parameters=\"\")\n{\n\tglobal $message_object;\n\n\treturn($message_object->Mail($to,$subject,$message,$additional_headers,$additional_parameters));\n}",
"function Mailer($name = \"\", $from, $to, $cc = \"\", $bcc = \"\", $subject = \"\") {\n\t\t$this->valid_mail_adresses = true;\n\t\tif(!$this->check_mail_address($to)) {\n\t\t\t$this->msg[] = \"Error, the \\\"mailto\\\" address is empty or not valid.\";\n\t\t\t$this->valid_mail_adresses = false;\n\t\t\t} \n\t\tif(!$this->check_mail_address($from)) {\n\t\t\t$this->msg[] = \"Error, the \\\"from\\\" address is empty or not valid.\";\n\t\t\t$this->valid_mail_adresses = false;\n\t\t\t} \n\t\tif($cc != \"\") {\n\t\t\tif (!$this->check_mail_address($cc)) {\n\t\t\t\t$this->msg[] = \"Error, the \\\"Cc\\\" address is not valid.\";\n\t\t\t\t$this->valid_mail_adresses = false;\n\t\t\t\t} \n\t\t\t}\n\t\tif($bcc != \"\") {\n\t\t\tif (!$this->check_mail_address($bcc)) {\n\t\t\t\t$this->msg[] = \"Error, the \\\"Bcc\\\" address is not valid.\";\n\t\t\t\t$this->valid_mail_adresses = false;\n\t\t\t\t} \n\t\t\t}\n\t\tif ($this->valid_mail_adresses) {\n\t\t\t$this->from_name = $this->strip_line_breaks($name);\n\t\t\t$this->from_mail = $this->strip_line_breaks($from);\n\t\t\t$this->mail_to = $this->strip_line_breaks($to);\n\t\t\t$this->mail_cc = $this->strip_line_breaks($cc);\n\t\t\t$this->mail_bcc = $this->strip_line_breaks($bcc);\n\t\t\t$this->mail_subject = $this->strip_line_breaks($subject);\n\t\t}else{\n\t\t\treturn;\n\t\t\t}\t\t\n\t\t}",
"function Email_Message( $body, $type='text/plain') {\n\t\t\n\t\t$this->message_body = $body;\n\t\t$this->message_type = $type;\n\t\n\t}",
"function sendMail($code, $replace)\n{\n\t$q_1 = mysql_query(\"SELECT default_email FROM system_configuration WHERE id='1'\");\n\t$row_1 = mysql_fetch_array($q_1);\n\n\t//Fetching Email Template According to User Selected Language \n\t$q_2=\"select subject, message from notifications where code='$code' and language='$replace[lang]'\"; \n\t$sql_2=mysql_query($q_2); \n\t$tot_rws=mysql_num_rows($sql_2);\n\n\tif($tot_rws==0)\n\t{\n\t\t$q_3=\"SELECT nt.subject, nt.message FROM notifications nt INNER JOIN languages lang ON lang.code=nt.language WHERE lang.default_lang='1' LIMIT 1\"; \n\t\t$sql_2 = mysql_query($q_3);\n\t}\n\t\n\t$row=mysql_fetch_array($sql_2);\n\t$to = $replace['email'];\n\t$subject = $row['subject'];\n\t$msg = $row['message'];\n\tforeach($replace as $k=>$v)\n\t{\n\t\t$subject = str_replace(\"$\".$k, $v, $subject);\n\t\t$msg = str_replace('$'.$k, $v, $msg);\n\t}\n\t$message = $msg;\n\t$headers = 'From: Cloudways <'.$row_1['default_email'].'>' . \"\\r\\n\" .\n\t\t'Reply-To: '.$row_1['default_email'].'' . \"\\r\\n\" .\n\t\t'MIME-Version: 1.0' . \"\\r\\n\" .\n\t\t'Content-type: text/html; charset=utf-8' . \"\\r\\n\" .\n\t\t'X-Mailer: PHP/' . phpversion();\n\t\t\n\t//adding email log\n\t$q\t= \"INSERT INTO email_log SET email='$to', sent_on=NOW(), subject='$subject', content='\".mysql_escape_string($message).\"'\";\n\t$sql\t= @mysql_query($q);\t\n\n\t//sending email\n\tmail($to, $subject, $message, $headers, '-f '.$row_1['default_email'].'');\n\t//echo $to.'<br />'.$subject.'<br />'.$message.'<br />'.$headers.'<br />'.'-f '.$row_1['default_email'].'<br /><br />';\n}",
"function _before_filter(){\n\t\t$this->content_type = \"text/plain\";\n\t\t$this->content_charset = DEFAULT_CHARSET; // \"UTF-8\"\n\t\t$this->from = DEFAULT_EMAIL;\n\t}",
"function send_mails() {\n\t //$myactivebatch = $this->load_saved_batch();//load direct from file\n\t $myactivebatch = GetParam('batchrestore');//load in html form field and save as param\n\t //echo '>',$myactivebatch;\n\t \n\t $batch = GetReq('batchid');\n\t $bid = GetParam('bid')?GetParam('bid'):0; \n\t \t \n\t $include_subs = GetParam('includesubs');\n\t $include_all = GetParam('includeall');\t \n\t $subscribers = $include_subs?$include_subs:$include_all;//one or another\n\t\n\t $from = GetParam('from');\n\t $to = GetParam('to');\t \n\t $subject = GetParam('subject');\n\t \n\t if ($this->template) {\n\t if ($this->dirdepth) {\n\t\t for($i=0;$i<$this->dirdepth;$i++)\n\t\t\t $backdir .= \"../\";\n\t\t }\n\t\t else\n\t\t $backdir = \"../\";\n\t\t //repalce viewable data to send data (absolute dir)\t \n\t\t //echo $backdir;\n\t\t if ($this->mailbody)//get session text with headers\n\t\t $body = $this->mailbody;\n\t\t else //get text area\n\t $body = str_replace($backdir,$this->url.$this->infolder.'/',GetParam('mail_text')); \t \n\t }\t \n\t else\t{ //text area or session text with headers\n\t \n\t if (GetReq('editmode')) {\n\t\t $mytext = $this->mailbody?$this->mailbody:GetParam('mail_text');\n\t\t $body = $this->unload_spath($mytext);\n\t\t }\n\t\t else\n\t $body = $this->mailbody?$this->mailbody:GetParam('mail_text'); \n\t }\t \t \n\t \t \n\t\t \n\t if ($subscribers) {// || ($batch)) {//if sybs checked or batch in process..\n\t \n\t //save the current mail campaign state\n\t $this->save_current_batch($batch);\t\n\t \t \t \n\t //$subs = $this->subs_mail;\n\t\t \n\t\t //workinh batch tosend\n\t\t $subs = $this->getmails($include_all,$this->batch,$bid);\n\t\t \n\t if (($batch>=0) && ($batch>=$myactivebatch)) {\n\n\t //if ($res = GetGlobal('controller')->calldpc_method('rcshmail.sendit use '.$from.'+'.$to.'+'.$subject.'+'.$body.'+'.$subs)) {\n if ($res = $this->sendit($from,$to,$subject,$body,$subs,$this->ishtml)) {\n\t $this->mailmsg = $res . \" mail(s) send!\";\n\t }\t \n\t else \n\t $this->mailmsg = \"Send failed\";\n\t\t }\n\t\t else \t\n\t\t $this->mailmsg = \"Send bypassed\"; \n\t }\t \n\t else {//one receipent\n\t //if ($res = GetGlobal('controller')->calldpc_method('rcshmail.sendit use '.$from.'+'.$to.'+'.$subject.'+'.$body))\n\t\t if ($res = $this->sendit($from,$to,$subject,$body,null,$this->ishtml)) \n\t\t $this->mailmsg = $res . \" mail(s) send!\";\n\t\t else\n\t\t $this->mailmsg = \"Send failed\";\t\n\t }\t \n\t\t \n\t //auto refresh\n\t $refresh = GetParam('refresh')?GetParam('refresh'):$this->auto_refresh;\n\t if (($refresh>0) && ($res==$this->batch)) {\n $this->refresh_bulk_js(seturl('t=cpsubsend&batchid='.($bid+1).'&batch='.$this->batch.'&refresh='.$refresh),$refresh);\t\t\t \n\t $this->mailmsg .= \"Wait for next batch \" . $this->timeout;\t\t \n\t }\t \n\t \n\t //test\n\t //return $this->batch;\n //return (400);\t \t //??????????????????????????????????????????????????\n\t //echo '---------------------',$res,'---------------------------<br>';\n\t \n\t if ($res<$this->batch) //means end of campaign\n\t $this->reset_batch_state();\n\t \n\t return ($res);//how many mails tried to send (batch...)\t \n\t}",
"function mail_utf82($to, $from_user, $from_email, $subject = '(No subject)', $message = ''){\n $from_user = \"=?UTF-8?B?\".base64_encode($from_user).\"?=\"; // $from_user = \"=?utf-8?Q?\".($from_user).\"=\";\n //$from_user = \"=?UTF-8?Q?\".($from_user).\"?=\";\n //$from_user = \"=?utf-8?Q?=D0=A4=D0=BE=D0=BD=D0=B4?=\";\n\n\n $subject = \"=?UTF-8?B?\".base64_encode($subject).\"?=\"; //Content-type: text/html;\n $mime = \"\\r\\nMIME-Version: 1.0\" . \"Content-type: multipart/alternative; charset=UTF-8\";\n $mime = \"\\r\\nMIME-Version: 1.0\" . \"Content-type: text/html; charset=UTF-8 \\r\\nContent-Transfer-Encoding: 7bit\";\n\n $headers = \"From: $from_user <$from_email> $mime\"; $headers = \"From: <$from_email>\"; // . \"\\r\\n\"\n\n return mail($to, $subject, $message, $headers);\n }",
"protected function setLocaleForMailer(): void\n {\n if (function_exists('switch_to_locale') && ($locale = $this->params->locale)) {\n \\switch_to_locale($locale);\n }\n }",
"abstract function getSubject() : string;",
"public function sendnotificationemails($type,$to,$subject,$username,$linkhref){\r\n\r\n $bodyhead=\"<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>\r\n <html xmlns='http://www.w3.org/1999/xhtml'>\r\n <head>\r\n <meta http-equiv='Content-Type' content='text/html; charset=utf-8' />\r\n <title>\".$this->getsettings('sitetitle','text').\"</title>\r\n </head><body>\";\r\n if( $this->getsettings('email','logoshow') == '1' ) {\r\n $body = \"<img src='\".$this->getsettings('logo','url').\"' alt='\".$this->getsettings('sitetitle','text').\"' title='\".$this->getsettings('sitetitle','text').\"'/>\";\r\n }\r\n else {\r\n $body = '';\r\n }\r\n\r\n $link = \"<a href='\".$linkhref.\"'>\".$this->getsettings($type,'linktext').\"</a>\";\r\n $emContent = $this->getsettings($type,'text');\r\n $emContent = str_replace(\"[username]\",$username,$emContent);\r\n $emContent = str_replace(\"[break]\",\"<br/>\",$emContent);\r\n $emContent = str_replace(\"[linktext]\",$link,$emContent);\r\n\r\n $body .=\"<p>\".$emContent.\"</p>\";\r\n\r\n $from = $this->getsettings('email','fromname');\r\n $from_add = $this->getsettings('email','fromemail');\r\n $headers = \"MIME-Version: 1.0\" . \"\\r\\n\";\r\n $headers .= \"Content-type:text/html;charset=iso-8859-1\" . \"\\r\\n\";\r\n $headers .= \"From: =?UTF-8?B?\". base64_encode($from) .\"?= <$from_add>\\r\\n\" .\r\n 'Reply-To: '.$from_add . \"\\r\\n\" .\r\n 'X-Mailer: PHP/' . phpversion();\r\n mail($to,$subject,$bodyhead.$body.'</body></html>',$headers, '-f'.$from_add);\r\n\r\n if( $type == 'forgotpwdemail' ) {\r\n return '7#email';\r\n }\r\n else {\r\n return '7#register';\r\n }\r\n\r\n die();\r\n\t}",
"function templ_send_email($fromEmail,$fromEmailName,$toEmail,$toEmailName,$subject,$message,$extra='')\r\n{\r\n\t\r\n\t$fromEmail = apply_filters('templ_send_from_emailid', $fromEmail);\r\n\t$fromEmailName = apply_filters('templ_send_from_emailname', $fromEmailName);\r\n\t$toEmail = apply_filters('templ_send_to_emailid', $toEmail);\r\n\t$toEmailName = apply_filters('templ_send_to_emailname', $toEmailName);\r\n\t$headers = 'MIME-Version: 1.0' . \"\\r\\n\";\r\n\t$headers .= 'Content-type: text/html; charset=UTF-8' . \"\\r\\n\";\r\n\t\r\n\t/* Additional headers*/\r\n\t/*$headers .= 'To: '.$toEmailName.' <'.$toEmail.'>' . \"\\r\\n\";*/\r\n\t\r\n\tif( $fromEmail!=\"\" ) {\r\n\t\t$headers .= 'From: '.$fromEmailName.' <'.$fromEmail.'>' . \"\\r\\n\";\r\n\t} else {\r\n\t\t$headers .= 'From: '.get_option('admin_email').\"\\r\\n\";\r\n\t}\r\n\t\r\n\t$subject = apply_filters('templ_send_email_subject', $subject);\r\n\t$message = apply_filters('templ_send_email_content', $message);\r\n\t$headers = apply_filters('templ_send_email_headers', $headers);\r\n\t\r\n\t$subject = '=?UTF-8?B?'.base64_encode($subject).'?=';\r\n\r\n\t/* Mail it*/\r\n\tif(templ_fetch_mail_type())\r\n\t{\r\n\t\t@mail($toEmail, $subject, $message, $headers);\t\r\n\t}else\r\n\t{\r\n\t\twp_mail($toEmail, $subject, $message, $headers);\t\r\n\t}\r\n\t\r\n}",
"function envoyer_message_mail($values)\n{\n\t$mot = $GLOBALS['mot'];\n\t$phrase = $GLOBALS['phrase'];\n\t$val = FALSE;\n\t\n\tif (verif_email($values['Email']) == TRUE)\n\t{\n\t\t$contenu = array(\t$mot['Message'] => $values['Message'],\n\t\t\t\t\t\t\t\t\t\t\t$mot['Entreprise'] => $values['Entreprise'],\n\t\t\t\t\t\t\t\t\t\t\t$mot['Nom'] => $values['Nom'],\n\t\t\t\t\t\t\t\t\t\t\t$mot['Email'] => $values['Email'] );\n\t\t\t\t\t\t\t\n\t\t$contenu_message = corps_email($contenu);\n\t\t// Si le message a bien été envoyé, on affiche un message de validation\n\t\t// et on enregistre le message dans la base de données\n\t\t\n\t\tif (envoi_email($values['Email'], NOM_SITE, EMAIL, $values['Email'], $phrase['UnNouveauMessage'], $contenu_message) == TRUE)\n\t\t{\n\t\t\tif (ajouter_message_db($values) == TRUE)\n\t\t\t{\n\t\t\t\t$val = TRUE;\n\t\t\t}\n\t\t}\n\t}\n\treturn $val;\n}",
"public function __construct()\n {\n parent::__construct('simple_mail');\n\n $contactRepository = tx_caretaker_ContactRepository::getInstance();\n\n $this->mail_from = $this->getConfigValue('mail_from');\n $this->mail_subject = $this->getConfigValue('mail_subject');\n $this->mail_link = $this->getConfigValue('mail_link');\n $this->mail_link = $this->getConfigValue('mail_link');\n $this->mail_roles = array();\n $role_ids = explode(',', $this->getConfigValue('role_ids'));\n foreach ($role_ids as $role_id) {\n $role = $contactRepository->getContactRoleById(trim($role_id));\n if (!$role && is_numeric($role_id)) {\n $role = $contactRepository->getContactRoleByUid(intval($role_id));\n }\n if ($role) {\n $this->mail_roles[] = $role;\n }\n }\n }",
"function SendEmail($to, $subject, $body, $from=\"\", $cc=\"\", $bcc=\"\", $type=\"text/plain\") {\n global $dbAccess, $smarty;\n\n if ($from) {\n $fromMailcheck = $this->SpamCheck($from);\n if ($fromMailcheck == false) {\n $errorMsg[] = \"Invalid From email address.\";\n $smarty->assign(\"errorMsg\", $errorMsg);\n return false;\n }\n }\n\n if ($to) {\n $toMailcheck = $this->SpamCheck($to);\n if ($toMailcheck == false) {\n $errorMsg[] = \"Invalid To email address.\";\n $smarty->assign(\"errorMsg\", $errorMsg);\n return false;\n }\n }\n\n $user = $dbAccess->UserLoad(\"UserType = 'admin'\");\n\n $defaultFrom = $user['UserEmail'];\n\n // Bundle up the variables into a structured array for altering.\n $message = array(\n 'to' => $to,\n 'from' => (isset($from) && $from != '') ? $from : $defaultFrom,\n 'subject' => '',\n 'body' => array()\n );\n\n\n // Build the default headers\n $headers = array(\n 'MIME-Version' => '1.0',\n 'Content-Type' => $type . '; charset=UTF-8; format=flowed; delsp=yes',\n 'Content-Transfer-Encoding' => '8Bit',\n 'X-Mailer' => PROJECT_NAME\n );\n\n if ($defaultFrom) {\n // To prevent e-mail from looking like spam, the addresses in the Sender and\n // Return-Path headers should have a domain authorized to use the originating\n // SMTP server. Errors-To is redundant, but shouldn't hurt.\n $headers['From'] = $headers['Reply-To'] = $headers['Sender'] = $headers['Return-Path'] = $headers['Errors-To'] = $defaultFrom;\n }\n if ($from) {\n $headers['From'] = $headers['Reply-To'] = $from;\n }\n $message['headers'] = $headers;\n\n $message['body'] = $body;\n $message['subject'] = $subject;\n\n // Optionally send e-mail.\n $message['result'] = $this->EMail($message);\n\n // Log errors\n if (!$message['result']) {\n $errorMsg[] = \"Unable to send e-mail. Please contact the site admin, if the problem persists.\";\n $smarty->assign(\"errorMsg\", $errorMsg);\n }\n\n return $message['result'];\n }",
"private function mailerNative()\n { \n if( ! mail($this->rcptToCtring, $this->subject, $this->message, $this->header()) ){\n $this->debugMessages[] = 'Error: Sending email failed';\n return false;\n }\n else {\n $this->debugMessages[] = 'Success: Sending email succeeded';\n return true;\n }\n }",
"function mail()\n {\n\n\n }",
"function html_mail( $to, $subject, $message, $from_email, $from_name ){\n if( is_array( $to ) ){\n \n // Implode the array and create a string with it\n $to = implode( ',', $to );\n \n }\n \n // Add some inline styles to the email (won't overwrite if the user adds their own)\n $message = str_replace( '<p>', '<p style=\"color:#000;>\"', $message );\n \n // In case any of our lines are larger than 70 characters, we should use wordwrap()\n $message = wordwrap( $message, 70, \"\\r\\n\");\n \n // To send HTML mail, the Content-type header must be set\n $headers[] = 'MIME-Version: 1.0';\n $headers[] = 'Content-type: text/html; charset=utf-8';\n \n // Set the from and reply-to addresses\n\tif( is_string( $from_email ) && is_string( $from_name ) ){\n\t\t$headers[] = 'From: ' . $from_name . '<' . $from_email . '>';\n\t\t$headers[] = 'Reply-To: ' . $from_name . '<' . $from_email . '>';\n\t}\n \n // Send the email\n return mail( $to, $subject, $message, implode(\"\\r\\n\", $headers ) );\n \n \n}",
"function supermailer ($h) {\r\n $mail_addheaders = array();\r\n $mail_addheaders[] = 'From: '.$h['from'];\r\n $h['replyto'] == ''? $h['from']:$h['replyto']; # avoid anti-spam\r\n $mail_addheaders[] = 'Reply-To: '.$h['replyto'];\r\n if ($h['bcc'])\r\n $mail_addheaders[] = 'Bcc: '.$h['bcc'];\r\n $mail_addheaders[] = 'X-Mailer: '.(($GLOBALS['mail_xmailer'] == '')? 'supermailer/dsw/sh/2004': $GLOBALS['mail_xmailer']);\r\n $mail_addheaders_str = join(\"\\r\\n\",$mail_addheaders);\r\n #~ echo $mail_addheaders_str;exit;\r\n\r\n $mail_body = $h['body'];\r\n $mail_to = $h['to'];\r\n $mail_subject = $h['subject'];\r\n\r\n # Some MTA confuse \\r\\n and translate it to \\n\\n, causing double lines. This will makes them happy:\r\n $mail_addheaders_str = str_replace(\"\\r\\n\", \"\\n\", $mail_addheaders_str);\r\n $mail_body = str_replace(\"\\r\\n\", \"\\n\", $mail_body);\r\n\r\n return mail($mail_to, $mail_subject, $mail_body, $mail_addheaders_str);\r\n\r\n}",
"public static function sendEmail($user,$RDV) : bool {\n\n $user = parent::findBy($user->getEmail(), 'email');\n\n $to = $user->getEmail();\n $from = \"<[email protected]>\";\n $subject = 'CHUO NEWSLETTER : Reclamation';\n $message = '\n <html>\n <head>\n <style>\n .banner-color {\n background-color: #eb681f;\n }\n .title-color {\n color: #0066cc;\n }\n .button-color {\n background-color: #0066cc;\n }\n @media screen and (min-width: 500px) {\n .banner-color {\n background-color: #0066cc;\n }\n .title-color {\n color: #eb681f;\n }\n .button-color {\n background-color: #eb681f;\n }\n }\n </style>\n </head>\n <body>\n <div style=\"background-color:#ececec;padding:0;margin:0 auto;font-weight:200;width:100%!important\">\n <table align=\"center\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"table-layout:fixed;font-weight:200;font-family:Helvetica,Arial,sans-serif\" width=\"100%\">\n <tbody>\n <tr>\n <td align=\"center\">\n <center style=\"width:100%\">\n <table bgcolor=\"#FFFFFF\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"margin:0 auto;max-width:512px;font-weight:200;width:inherit;font-family:Helvetica,Arial,sans-serif\" width=\"512\">\n <tbody>\n <tr>\n <td bgcolor=\"#F3F3F3\" width=\"100%\" style=\"background-color:#f3f3f3;padding:12px;border-bottom:1px solid #ececec\">\n <table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"font-weight:200;width:100%!important;font-family:Helvetica,Arial,sans-serif;min-width:100%!important\" width=\"100%\">\n <tbody>\n <tr>\n <td valign=\"middle\" width=\"50%\" align=\"right\" style=\"padding:0 0 0 10px\"><span style=\"margin:0;color:#4c4c4c;white-space:normal;display:inline-block;text-decoration:none;font-size:12px;line-height:20px\">'.date(\"Y-m-d\").'</span></td>\n <td width=\"1\"> </td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n <tr>\n <td align=\"left\">\n <table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"font-weight:200;font-family:Helvetica,Arial,sans-serif\" width=\"100%\">\n <tbody>\n <tr>\n <td width=\"100%\">\n <table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"font-weight:200;font-family:Helvetica,Arial,sans-serif\" width=\"100%\">\n <tbody>\n <tr>\n <td align=\"center\" bgcolor=\"#8BC34A\" style=\"padding:20px 48px;color:#ffffff\" class=\"banner-color\">\n <table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"font-weight:200;font-family:Helvetica,Arial,sans-serif\" width=\"100%\">\n <tbody>\n <tr>\n <td align=\"center\" width=\"100%\">\n <img src=\"../img/logo-accueil.png\" alt=\"Centre Hospitalier Universitaire Mohammed VI OUJDA\">\n </td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n <tr>\n <td align=\"center\" style=\"padding:20px 0 10px 0\">\n <table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"font-weight:200;font-family:Helvetica,Arial,sans-serif\" width=\"100%\">\n <tbody>\n <tr>\n <td align=\"center\" width=\"100%\" style=\"padding: 0 15px;text-align: justify;color: rgb(76, 76, 76);font-size: 12px;line-height: 18px;\">\n <h3 style=\"font-weight: 600; padding: 0px; margin: 0px; font-size: 16px; line-height: 24px; text-align: center;\" class=\"title-color\">Bonjour '.$user->getNom().',</h3>\n <p style=\"margin: 20px 0 30px 0;font-size: 15px;text-align: center;\">L\\'Etat du votre Rendez-vous que vous avez reservé pour '.$RDV->getDateRdv().' a été changer!</p>\n <div style=\"font-weight: 200; text-align: center; margin: 25px;\"><a style=\"padding:0.6em 1em;border-radius:600px;color:#ffffff;font-size:14px;text-decoration:none;font-weight:bold\" class=\"button-color\">Consulter votre compte pour plus de détails</a></div>\n </td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n <tr>\n </tr>\n <tr>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n <tr>\n <td align=\"left\">\n <table bgcolor=\"#FFFFFF\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"padding:0 24px;color:#999999;font-weight:200;font-family:Helvetica,Arial,sans-serif\" width=\"100%\">\n <tbody>\n <tr>\n <td align=\"center\" width=\"100%\">\n <table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"font-weight:200;font-family:Helvetica,Arial,sans-serif\" width=\"100%\">\n <tbody>\n <tr>\n <td align=\"center\" valign=\"middle\" width=\"100%\" style=\"border-top:1px solid #d9d9d9;padding:12px 0px 20px 0px;text-align:center;color:#4c4c4c;font-weight:200;font-size:12px;line-height:18px\">Regards,\n <br><b>The CHUO Team</b>\n </td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n <tr>\n <td align=\"center\" width=\"100%\">\n <table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"font-weight:200;font-family:Helvetica,Arial,sans-serif\" width=\"100%\">\n <tbody>\n <tr>\n <td align=\"center\" style=\"padding:0 0 8px 0\" width=\"100%\"></td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n </tbody>\n </table>\n </center>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n </body>\n </html>';\n\n //from w3schools\n $headers = 'From: ' . $from . \"\\r\\n\".\n \"MIME-Version: 1.0\" . \"\\r\\n\" .\n \"Content-type: text/html; charset=UTF-8\" . \"\\r\\n\";\n\n if(mail($to, $subject, $message, $headers))\n //Email Sended\n return true;\n else\n return false;\n\n }",
"abstract public function get_message();",
"function send_email($recipient, $sender = \"[email protected]\", $subject, $text = null, $html = null)\n{\n\n\tinclude('Mail.php');\n\tinclude('Mail/mime.php');\n\n\t$crlf = \"\\r\\n\";\n\t$hdrs = array(\n\t\t'From' => $sender,\n\t\t'Subject' => $subject,\n\t);\n\t$mime = new Mail_mime($crlf);\n\t$mime->setTXTBody($text);\n\tif ($html) {\n\t\t$mime->setHTMLBody($html);\n\t}\n\t$body = $mime->get();\n\t$hdrs = $mime->headers($hdrs);\n\t$mail =& Mail::factory('mail');\n\t//$mail->send($recipient, $hdrs, $body);\n\t$mail->send($recipient, $hdrs, $body);\n\n}",
"function errorMailExiste(){\n\t\t$content='\n\t\t\t<div><h3>'.htmlspecialchars($this->pi_getLL(\"txt_error_mail\")).'<br/></h3><hr/></div>';\n\t\t$content .=$this->getFormulaireVide();\n\t\treturn $content;\n\t}",
"function Email($from=\"\", $to=\"\", $cc=\"\", $bcc=\"\", $subject=\"\", $smtp_server=EMAIL_SMTP_SERVER, $smtp_port=EMAIL_SMTP_PORT, $pop3_user=EMAIL_POP3_USER, $pop3_pass=EMAIL_POP3_PASS, $pop3_server=EMAIL_POP3_SERVER, $pop3_port=EMAIL_POP3_PORT, $socket_timeout=EMAIL_CONNECTION_TIMEOUT) {\n\t\t\n\t\t$this->smtp_server \t= $smtp_server;\n\t\t$this->smtp_port \t= $smtp_port;\n\t\t$this->smtp_fp\t\t= 0;\n\t\t\n\t\t$this->email_from \t= $from;\n\t\t$this->email_to\t\t= $to;\n\t\t$this->email_cc\t\t= $cc;\n\t\t$this->email_bcc\t= $bcc;\n\t\t\n\t\t$this->email_rcptlist\t= array();\n\t\t\n\t\t$this->email_subject\t= $subject;\n\n\t\t$this->email_messages = array();\n\t\t$this->email_attachments = array();\n\t\t\n\t\t$this->email_boundry_message = '_-_Message-Boundry_-_';\n\t\t$this->email_boundry_parts = '_-_Message-Parts_-_';\n\t\t\n\t\t$this->pop3_authenticate = false;\n\t\t\n\t\t$this->pop3_user\t= $pop3_user;\n\t\t$this->pop3_pass\t= $pop3_pass;\n\t\t$this->pop3_server\t= $pop3_server;\n\t\t$this->pop3_port\t= $pop3_port;\n\t\t\n\t\t$this->socket_timeout = $socket_timeout;\n\t\n\t\t$this->debug_mode\t= false;\n\t\t$this->debug_data\t= '';\n\t\t\n\t}",
"function send_email($recipient, $sender,$sender_name, $subject, $message,$text_message,$bouncemail=0,$campaign_id=0, $campaign_type = 'html',$notification=false,$subscriber_replace_arr=array(), $vmta='rcmailsv.com', $reply_to_email=''){\n $CI =& get_instance();\n\t$CI->load->model('is_authorized');\n $sess_user = $CI->session->userdata('member_id');\n if (!isset($sess_user)) exit;\n\n\t$email_personalize_arr=array();\n\t$search_email_personalize=get_email_personalize_data($email_personalize_arr);\n\t$arrPersonalizeReplace=get_fallback_value($message,$text_message,$email_personalize_arr);\t# Replace fallback value\n\t$subscriber_key_arr=array('subscriber_first_name','subscriber_last_name','subscriber_email_address','subscriber_state','subscriber_zip_code','subscriber_country','subscriber_city','subscriber_company','subscriber_dob','subscriber_phone','subscriber_address');\n require_once(\"phpmailer/class.phpmailer.php\");\n\n $mail = new PHPMailer();\n\t\n\t//SMTP begin\n $mail->IsSMTP();// set mailer to use SMTP\n\t$mail->SMTPDebug = 1; // debugging: 1 = errors and messages, 2 = messages only\n\t$mail->SMTPAuth = false; // authentication enabled\n\tif(in_array($vmta,config_item('lw_vmta'))){\n\t\t$mail->Host = \"host.redcappi.net\";\n\t\t$mail->Port = 2525; \n\t\t$SenderDomain =\"bounce.redcappi.net\";\n\t}elseif(in_array($vmta,config_item('lw2_vmta'))){\n\t\t$mail->Host = \"mail.rcmailsv.com\";\n\t\t$mail->Port = 2525; \n\t\t$SenderDomain =\"bounce.rcmailsv.com\";\n\t}elseif(in_array($vmta,config_item('lw3_vmta'))){\n\t\t$mail->Host = \"mail.mailsvrc.com\";\n\t\t$mail->Port = 2525; \n\t\t$SenderDomain =\"bounce.mailsvrc.com\";\n\t}elseif(in_array($vmta,config_item('ph_vmta'))){\n\t\t$mail->Host = \"mta01.redcappi.net\";\n\t\t$mail->Port = 25; \n\t\t$SenderDomain =\"bounce.redcappi.com\";\n }elseif(in_array($vmta,config_item('lw4_vmta'))){\n\t\t$mail->Host = \"mail.mailsvrc2.com\";\n\t\t$mail->Port = 2525; \n\t\t$SenderDomain =\"bounce.mailsvrc2.com\";\n }elseif(in_array($vmta,config_item('lw5_vmta'))){\n\t\t$mail->Host = \"mail.mailsvrc3.com\";\n\t\t$mail->Port = 2525; \n\t\t$SenderDomain =\"bounce.mailsvrc3.com\";\n }elseif(in_array($vmta,config_item('lw6_vmta'))){\n\t\t$mail->Host = \"mail.mailsvrc4.com\";\n\t\t$mail->Port = 2525; \n\t\t$SenderDomain =\"bounce.mailsvrc4.com\";\n }elseif(in_array($vmta,config_item('lw7_vmta'))){\n\t\t$mail->Host = \"mail.mailsvrc5.com\";\n\t\t$mail->Port = 2525; \n\t\t$SenderDomain =\"bounce.mailsvrc5.com\";\n }elseif(in_array($vmta,config_item('lw8_vmta'))){\n\t\t$mail->Host = \"mail.mailsvrc6.com\";\n\t\t$mail->Port = 2525; \n\t\t$SenderDomain =\"bounce.mailsvrc6.com\";\n\t} elseif (in_array($vmta, config_item('spark_vmta'))) {\n $mail->SMTPAuth = TRUE;\n $mail->Username = base64_encode('SMTP_Injection');\n $mail->Password = base64_encode('e39af39c5cdaf01d2f423f85562cea74b05feac4');\n $mail->Host = \"smtp.sparkpostmail.com\";\n $mail->Hostname = \"smtp.sparkpostmail.com\";\n $mail->Port = 587;\n $mail->SMTPSecure =\"tls\";\n $SenderDomain = \"spark.redcappi.com\";\n } else{\n \n\t\t$mail->Host = \"mail.rcmailcorp.com\";\n\t\t$mail->Port = 2525; \n\t\t$SenderDomain =\"bounce.rcmailcorp.com\";\n\t}\n\t \n\t\n $mail->FromName = $sender_name;\n $mail->From = $sender;\t\n\tif(trim($reply_to_email) != ''){\n\t\t$mail->AddReplyTo($reply_to_email, $sender_name);\n\t}\n \n\t// Send email to recivier by array\n\tif(is_array($recipient)){\n\t\tforeach($recipient as $key=>$v){\n\t\t\tunset($recipient_info);\n\t\t\t#explode recipient info\n\t\t\t$recipient_info=explode(\"||\",$v);\n\t\t\t$encodedSubscriber = $CI->is_authorized->encodeSubscriber($key,$recipient_info[0]);\n\t\t\t\n\t\t\t$mail->ClearAddresses();\n\t\t\t$mail->ClearAttachments();\n\t\t\t$mail->ClearCustomHeaders();\n\t\t\t$mail->IsHTML(false);\n\t\t\t$expl_arr=array();\n\t\t\t//$mail->Sender=base64_encode($key).'@'. $SenderDomain ;\t\t\t\n\t\t\t//$mail->AddCustomHeader('Sender: '.base64_encode($key).'@'.$SenderDomain);\t\n\t\t\t$mail->AddCustomHeader('x-envid:'.$campaign_id);\n\t\t\t\n\t\t\t$mail->AddCustomHeader('x-fblid:'.$key.'-'.$campaign_id.'-'.CAMPAIGN_HEADER_SUFFIX);\t\t\t\t\n\t\t\t$mail->AddCustomHeader('x-job:'.$key);\t\n\t\t\t$mail->AddCustomHeader('x-virtual-mta: '.$vmta);\t \t\t\t\n\t\t\t$mail->AddCustomHeader('List-Unsubscribe: <mailto:[email protected]?subject=Unsubscribe '.$encodedSubscriber.'>, <http://www.'.SYSTEM_DOMAIN_NAME.'/newsletter/unsubscribe_mail/unsubscribe/'.$campaign_id.'/'.$encodedSubscriber.'>');\n $mail->AddCustomHeader('Message-ID:<' . strtotime('now') . $campaign_id . '@bounce.' . $vmta . '>');\n $mail->AddCustomHeader('Sender:' . $sender);\n $mail->AddCustomHeader('Precedence:bulk');\n $mail->AddCustomHeader('Return-Path:' . base64_encode($sender) . \"@bounce.\" . $vmta);\n\t\t\t\n\t\t\t$mail->AddAddress($recipient_info[0],$recipient_info[1]);// recipient email address\n\t\t\t$arrSearchStr = array('[subscriber_id]','[CONTACT_EMAIL_ID]');\n\t\t\t\n\t\t\t$arrReplaceBy =array($encodedSubscriber,$recipient_info[0]);\n\t\t\t$expl_arr=explode(\"||\",$subscriber_replace_arr[$key]);\n\t\t\t$expl_arr = array_combine($subscriber_key_arr, $expl_arr);\n\t\t\t$expl_arr = array_filter($expl_arr);\n\t\t\tif(is_array($expl_arr)){\n\t\t\t\t$replace_email_personalize = array_merge($arrPersonalizeReplace,$expl_arr);\n\t\t\t}else{\n\t\t\t\t$replace_email_personalize=$arrPersonalizeReplace;\n\t\t\t}\n\t\t\t#Email Personalization on campaign content\n\t\t\t$message_cnt=str_replace($search_email_personalize, $replace_email_personalize, $message);\n\t\t\t$message_cnt=str_replace($arrSearchStr, $arrReplaceBy, $message_cnt);\n\t\t\t#Email Personalization on campaign text content\n\t\t\t$text_message_content=str_replace($search_email_personalize, $replace_email_personalize, $text_message);\n\t\t\t$text_message_content=str_replace($arrSearchStr, $arrReplaceBy, $text_message_content);\n\t\t\n\t\t\t#Email Personalization on campaign subject\n\t\t\t$campaign_subject=str_replace($search_email_personalize, $replace_email_personalize, $subject);\n\t\t\t$campaign_subject=str_replace($arrSearchStr, $arrReplaceBy, $campaign_subject);\n\t\t\t\n\t\t\t$body = $message_cnt;\n\t\t\t\n\t\t\t# the HTML to the plain text. Store it into the variable. \n\t\t\t$text = $text_message_content;\n\t\t\t$mail->Subject = $campaign_subject;\n $mail->AddCustomHeader('Message-ID:<' . strtotime('now') . $campaign_ . '@bounce.' . $vmta . '>');\n $mail->AddCustomHeader('Sender:' . $sender);\n $mail->AddCustomHeader('Precedence:bulk');\n $mail->AddCustomHeader('Return-Path:' . base64_encode($sender) . \"@bounce.\" . $vmta);\n\t\t\t\n\t\t\tif($campaign_type == 'html'){\n\t\t\t\t$mail->AltBody = $text;\n\t\t\t\t$mail->MsgHTML($body);\n\t\t\t}else{\n\t\t\t\t$mail->Body = $text;\n\t\t\t}\n \n\n $mail->Send();\n\t\t}\n\t}else{\n\t\t$message_cnt=$message;\n\t\t$body = $message_cnt;\n\t\t$emailz = explode(\",\",$recipient);\n\t\t$mailCt = count($emailz);\t\t\n\t\t$mail->Sender=\"testmail@\".$SenderDomain;\n\t\t//$mail->AddCustomHeader('Sender: testmail@'.$SenderDomain);\t\n\t\t$mail->AddCustomHeader('x-envid:'.$campaign_id);\n\t\t$mail->AddCustomHeader('x-fblid: testmail-'.$campaign_id.'-'.CAMPAIGN_HEADER_SUFFIX);\t\n\t\t$mail->AddCustomHeader('Message-ID:<' . strtotime('now') . $campaign_id . '@bounce.' . $vmta . '>');\n $mail->AddCustomHeader('Sender:' . $sender);\n $mail->AddCustomHeader('Precedence:bulk');\n $mail->AddCustomHeader('Return-Path:' . base64_encode($sender) . \"@bounce.\" . $vmta);\n\t\t\t\n\t\t$mail->AddCustomHeader('x-job: testmail');\t\t\t\n\t\tfor($i=0; $i<$mailCt; $i++){\n\t\t\t$tu= $emailz[$i];\n\t\t\t$mail->AddAddress($tu);\n\t\t}\n\t\t// the HTML to the plain text. Store it into the variable. \n\t\t$mail->Subject = $subject;\n\t\t$mail->AddCustomHeader('x-virtual-mta: '.$vmta);\t \n\t\tif($campaign_type == 'html'){\n\t\t\t$mail->AltBody = $text_message;\n\t\t\t$mail->MsgHTML($body);\n\t\t}else{\n\t\t\t$mail->Body = $text_message;\n\t\t}\n\t\t\n\t\t$mail->Send();\n\t} \n$mail->SmtpClose();\t\n\t//mail end\n}",
"public function configMail() {\n add_filter('wp_mail_content_type', function($type) {return 'text/html';});\n add_filter('wp_mail_from_name', function() {return 'Portfolio Site';});\n add_filter('wp_mail_from', function() {return 'wordpress@' . $_SERVER['HTTP_HOST'];});\n }",
"function bp_course_wp_mail($to,$subject,$message,$args=''){\n if(!count($to))\n return;\n \n $headers = \"MIME-Version: 1.0\" . \"\\r\\n\";\n $settings = get_option('lms_settings');\n if(isset($settings['email_settings']) && is_array($settings['email_settings'])){\n if(isset($settings['email_settings']['from_name'])){\n $name = $settings['email_settings']['from_name'];\n }else{\n $name =get_bloginfo('name');\n }\n if(isset($settings['email_settings']['from_email'])){\n $email = $settings['email_settings']['from_email'];\n }else{\n $email = get_option('admin_email');\n }\n if(isset($settings['email_settings']['charset'])){\n $charset = $settings['email_settings']['charset'];\n }else{\n $charset = 'utf8'; \n }\n }\n $headers .= \"From: $name<$email>\". \"\\r\\n\";\n $headers .= \"Content-type: text/html; charset=$charset\" . \"\\r\\n\";\n \n $message = bp_course_process_mail($to,$subject,$message,$args); \n $message = apply_filters('wplms_email_templates',$message,$to,$subject,$message,$args);\n wp_mail($to,$subject,$message,$headers);\n}",
"function smtpmailer($para, $de, $de_nome, $assunto, $corpo) { \r\n global $error;\r\n $mail = new PHPMailer();\r\n $mail->IsSMTP(); // Ativar SMTP\r\n $mail->SMTPDebug = 0; // Debugar: 1 = erros e mensagens, 2 = mensagens apenas\r\n $mail->SMTPAuth = true; // Autenticação ativada\r\n $mail->SMTPSecure = 'tls'; // SSL REQUERIDO pelo GMail\r\n $mail->Host = 'smtp.ufop.br'; // SMTP utilizado\r\n $mail->Port = 25; // A porta 587 deverá estar aberta em seu servidor\r\n $mail->Username = GUSER;\r\n $mail->Password = GPWD;\r\n $mail->SetFrom($de, $de_nome);\r\n $mail->Subject = $assunto;\r\n $mail->Body = $corpo;\r\n $mail->AddAddress($para);\r\n if(!$mail->Send()) {\r\n $error = 'Mail error: '.$mail->ErrorInfo; \r\n return false;\r\n } else {\r\n $error = 'Mensagem enviada!';\r\n return true;\r\n }\r\n }",
"function _notifybymail($to,$subj,$message,$fromname=\"Support\",$from='[email protected]')\r\n\t{\r\n\t\t\r\n\t\t$this->email->clear();\r\n\t\t\r\n\t\t$config = array(\r\n\t\t\t 'protocol' => 'smtp',\r\n\t\t\t 'smtp_host' => 'ssl://email-smtp.us-east-1.amazonaws.com',\r\n\t\t\t 'smtp_user' => 'AKIAIIIJ7TIURYRQPZTA',\r\n\t\t\t 'smtp_pass' => 'ArI01zUQ7iwXYnHNfH3GApcBUWSE0v+b5qhhR2zK2B68',\r\n\t\t\t 'smtp_port' => 465,\r\n\t\t\t);\r\n\t\t$config['mailtype']=\"html\";\t\r\n\t\t$this->email->initialize($config);\r\n\t\t$this->email->set_newline(\"\\r\\n\");\r\n\t\t$this->email->from($from,$fromname);\r\n\t\t$this->email->to($to); \r\n\t\t\r\n\t\t$this->email->subject($subj);\r\n\t\t$this->email->message($message);\t\r\n\t\t\r\n\t\t$this->email->send();\r\n\t\t\r\n\t\t//echo $this->email->print_debugger();\r\n \r\n\t}",
"public function getMail():string\n { \n return $this->mail;\n }",
"protected function loadMailFields()\n {\n parent::loadMailFields();\n\n $this->mailFields = $this->tokenMailFields() + $this->mailFields; // Prefer our fields over the ones from the super class\n }",
"public function utility_email($msg, $member_email, $subject){\n\t\t//echo $msg;\n\t\treturn $this->send_mime_mail(\"immistudy.ru\", \n\t\t\t\t\t\t\"immistudy@mailru\",\n\t\t\t\t\t\t\"\",\n\t\t\t\t\t\t$member_email,\n\t\t\t\t\t\t'UTF-8',\n\t\t\t\t\t\t'windows-1251',\n\t\t\t\t\t\t$subject,\n\t\t\t\t\t\t$msg);\n\t}",
"public function __construct() {\r\n $this->html = false;\r\n $this->setFrom(EMAIL_FROM);\r\n }",
"function sendNewMessageNotification($to_user_id,$to_name,$subject,$fromEmail,$replyEmail)\n{\n #check if the user enabled this option\n $query=\"select message_email,email from users where user_id ='$to_user_id' and access_level NOT IN ('ebulkuser','eremote') limit 1\";\n $email_option=getDBRecords($query); \n\n if($email_option[0]['message_email'] == \"Y\")\n { \n $email = $email_option[0]['email'];\n $html=\"<p><font size=\\\"2\\\" face=\\\"Verdana, Arial, Helvetica, sans-serif\\\">Dear \".$to_name.\",<br><br>\n You have been sent a message via the online \".DBS.\" system regarding <b>\".$subject.\"</b>, please login to your secure online account to read the message.\n\t\t\t <br><br>Thank You</font></p>\";\n\n\n\t\t$text=\"Dear \".$to_name.\",\n \n\t\t\t You have been sent a message via the online \".DBS.\" system regarding \".$subject.\", please login to your secure online account to read the message.\n\t\t\t \n\t\t\t Thank You\";\n\n\t\t \n\t\t$from = $fromEmail;\n\t\t$mail = new htmlMimeMail();\n\t\t$mail->setHtml($html, $text);\n\t\t$mail->setReturnPath($replyEmail);\n $mail->setFrom($from);\n $mail->setSubject(\"Important Message\");\n $mail->setHeader('X-Mailer', 'HTML Mime mail class');\n\n if(!empty($email))\n\t {\n $result = $mail->send(array($email), 'smtp');\t\n\t\t}\n } \t\n}",
"public function traerPorMail($email) {\n\n}",
"function __emailer($email = '', $vars = array())\n {\n\n //common variables\n $this->data['email_vars']['todays_date'] = $this->data['vars']['todays_date'];\n $this->data['email_vars']['company_email_signature'] = $this->data['settings_company']['company_email_signature'];\n\n //------------------------------------queue email in database-------------------------------\n /** THIS WIL NOT SEND BUT QUEUE THE EMAILS*/\n if ($email == 'mailqueue_ticket_reply') {\n\n //email vars\n $this->data['email_vars']['email_title'] = $this->data['lang']['lang_support_ticket_reply'];\n\n //get message template from database\n $template = $this->settings_emailtemplates_model->getEmailTemplate('general_notification_admin');\n $this->data['debug'][] = $this->settings_emailtemplates_model->debug_data;\n\n //dynamic email vars - email body\n $this->data['email_vars']['email_message'] = '\n <div style=\" border:#CCCCCC solid 1px; padding:8px;\">\n <span style=\"text-decoration: underline; font-weight:bold;\">\n ' . $this->data['lang']['lang_title'] . '</span><br>\n ' . $this->input->post('tickets_title') . '<br><br>\n <span style=\"text-decoration: underline; font-weight:bold;\">\n ' . $this->data['lang']['lang_message'] . '</span><br>\n ' . $this->input->post('tickets_replies_message') . '\n <p><div style=\"padding:5px; background-color:#fbe9d0;\">'.$this->data['lang']['lang_support_do_not_reply'].'</div></div>';\n\n //dynamic email vars - general\n $this->data['email_vars']['addressed_to'] = $this->data['lang']['lang_hello'];\n $this->data['email_vars']['admin_dashboard_url'] = $this->data['vars']['site_url_admin'].'/ticket/'.$this->input->post('tickets_replies_ticket_id');\n\n //get the email address of staff assigned to this ticket. (email preferences are checked)\n $team_members_email = $this->teamprofile_model->notificationsEmail($this->input->post('tickets_assigned_to_id'));\n $this->data['debug'][] = $this->teamprofile_model->debug_data;\n\n //add to email queue\n if ($team_members_email != '') {\n\n //set sqldata() for database\n $sqldata['email_queue_message'] = parse_email_template($template['message'], $this->data['email_vars']);\n $sqldata['email_queue_subject'] = $this->data['lang']['lang_support_ticket_reply'];\n $sqldata['email_queue_email'] = $team_members_email;\n\n //add to email queue database - excluding uploader (no need to send them an email)\n $this->email_queue_model->addToQueue($sqldata);\n $this->data['debug'][] = $this->email_queue_model->debug_data;\n }\n\n }\n }",
"function sendEmails() {\n\t\t$this->substituteValueMarkers(array('templateCode' => $this->data['tx_gokontakt_emailBody'] ));\n\t\t$this->substituteLanguageMarkers(array('templateCode' => $this->data['tx_gokontakt_emailBody'] ));\n\t\t$this->substituteValueMarkers(array('templateCode' => $this->data['tx_gokontakt_emailAdminBody'] ));\n\t\t$this->substituteLanguageMarkers(array('templateCode' => $this->data['tx_gokontakt_emailAdminBody'] ));\n\n\t\t$emailUser = $this->cObj->substituteMarkerArrayCached($this->data['tx_gokontakt_emailBody'], $this->markerArray, $this->subpartMarkerArray, $this->wrappedSubpartMarkerArray);\n\t\t$emailUser = str_replace(\"<br />\", \"\\n\", $emailUser);\n\t\t$emailAdmin = $this->cObj->substituteMarkerArrayCached($this->data['tx_gokontakt_emailAdminBody'], $this->markerArray, $this->subpartMarkerArray, $this->wrappedSubpartMarkerArray);\n\t\t$emailAdmin = str_replace(\"<br />\", \"\\n\", $emailAdmin);\n\t\t$emailFrom = $this->data['tx_gokontakt_emailFrom'];\n\t\t$emailFromName = $this->data['tx_gokontakt_emailFromName'];\n\t\t$emailToAdmin = $this->data['tx_gokontakt_emailToAdmin'];\n\n\t\t$this->sendEmail($this->pi_getLL('subject_email_user'), $emailUser, '', $emailFrom, $emailFromName, $this->piVars['email']);\n\t\t$this->sendEmail($this->pi_getLL('subject_email_admin'), $emailAdmin, '', $emailFrom, $emailFromName, $emailToAdmin);\n\t}",
"function email($to, $subj, $content, $headers)\n{\n//error_reporting(0);\n /*$to = '[email protected]';\n$subject = 'the subject';\n$message = 'hello test';\n$headers = 'From: [email protected]' . \"\\r\\n\" .\n 'Reply-To: [email protected]' . \"\\r\\n\" .\n 'X-Mailer: PHP/';*/\nrequire_once('PEAR.php');\nrequire_once('Mail.php');\nrequire_once('Mail/mime.php');\n//$mail = &Mail::factory('smtp', array('host'=>'smtp.gmail.com', 'port'=>\"465\", 'auth'=>true, 'username'=>'[email protected]','password'=>'AK987!@#$%'));\n$mail = &Mail::factory(\"mail\");\n\n$_mail = $mail->send($to, $headers, $content);\n\n//echo($to.\"-\".$headers.\"-\".$content);\n//echo ($_mail->getMessage());\nlogoperation(777,0,\"send email\",\"email: \".$to.\" headers:\".$headers['From'].\"-\".$headers['To'].\" content: \".$content,$_SERVER['REMOTE_ADDR']);\n}",
"abstract protected function getSubject();",
"abstract public function get_first_line_support_email();",
"function clsRecordemails()\r\n\r\n {\r\n\r\n\r\n\r\n global $FileName;\r\n\r\n $this->Visible = true;\r\n\r\n $this->Errors = new clsErrors();\r\n\r\n $this->ds = new clsemailsDataSource();\r\n\r\n $this->InsertAllowed = false;\r\n\r\n $this->UpdateAllowed = false;\r\n\r\n if($this->Visible)\r\n\r\n {\r\n\r\n $this->ComponentName = \"emails\";\r\n\r\n $this->HTMLFormAction = $FileName . \"?\" . CCAddParam(CCGetQueryString(\"QueryString\", \"\"), \"ccsForm\", $this->ComponentName);\r\n\r\n $CCSForm = CCGetFromGet(\"ccsForm\", \"\");\r\n\r\n $this->FormSubmitted = ($CCSForm == $this->ComponentName);\r\n\r\n $Method = $this->FormSubmitted ? ccsPost : ccsGet;\r\n\r\n $this->from_user_id = new clsControl(ccsLabel, \"from_user_id\", \"From User Id\", ccsText, \"\", CCGetRequestParam(\"from_user_id\", $Method));\r\n\r\n $this->emaildate = new clsControl(ccsLabel, \"emaildate\", \"date\", ccsText, \"\", CCGetRequestParam(\"emaildate\", $Method));\r\n\r\n $this->subject = new clsControl(ccsLabel, \"subject\", \"Subject\", ccsText, \"\", CCGetRequestParam(\"subject\", $Method));\r\n\r\n $this->message = new clsControl(ccsLabel, \"message\", \"Message\", ccsMemo, \"\", CCGetRequestParam(\"message\", $Method));\r\n\r\n $this->message->HTML = true;\r\n\r\n $this->Delete = new clsButton(\"Delete\");\r\n\r\n $this->cancel = new clsButton(\"cancel\");\r\n\r\n }\r\n\r\n }",
"function rets_bsf_mail($key, &$message, $params) {\n if (isset($params['subject'])) {\n $message['subject'] = $params['subject'];\n } \n if (isset($params['body'])) {\n $message['body'][] = $params['body']; \n }\n if (isset($params['headers']) && is_array($params['headers'])) { \n $message['headers'] += $params['headers'];\n }\n \n // You should really have hook_mail() doing most of the formatting, \n // rather than pass in a complete $body or a $subject from drupal_mail(). \n // To accomplish that, you'd branch this formatting based on the value of\n // $key sent with drupal_mail(), and using code like this:\n // switch ($key) {\n // case 'key1':\n // // do something specific for mails of type key1\n // break; \n // case 'key2':\n // // do something specific for mails of type key2\n // break;\n // }\n \n // That's it - You don't do anything in your hook_mail() to actually\n // send the mail, that is taken care of by the mail system automatically. \n}",
"function send_email($to,$subject,$html,$text,$bcc_admin){\r\n\r\n\t\tif(!is_array($to)) $to = array($to);\r\n\r\n\t\tif($GLOBALS['server_info']['environment']=='dev') return true;\r\n\r\n\t\t@include_once($GLOBALS['server_info']['physical_root'].'inc/htmlMimeMail5/htmlMimeMail5.php');\r\n\t\t@include_once('/var/www/monrovia.com/root/inc/htmlMimeMail5/htmlMimeMail5.php');\t\t\t\t// LIVE\r\n\t\t@include_once('/var/www/vhosts/tpgphpdev1.net/httpdocs/inc/htmlMimeMail5/htmlMimeMail5.php');\t// STAGING\r\n\r\n\t\t$mail = new htmlMimeMail5();\r\n\t\t$mail->setHTMLCharset('UTF-8');\r\n\t\t$mail->setHeadCharset('UTF-8');\r\n\t\t$mail->setTextCharset('UTF-8');\r\n\t\t//if($_SERVER[\"HTTP_HOST\"]!='') $mail->setFrom('Monrovia Website <[email protected]>');\r\n\t\tif($GLOBALS['server_info']['environment']=='prod') $mail->setFrom('Monrovia Website <[email protected]>');\r\n\t\t$mail->setSubject($subject);\r\n\r\n\t\tif($text=='') $text = $html;\r\n\r\n\t\t$mail->setText($text);\r\n\t\t$mail->setHTML($html);\r\n\t\tif($GLOBALS['admin_email']!=''&&$bcc_admin&&$GLOBALS['admin_email']!=$to[0]) $mail->setBcc($GLOBALS['admin_email']);\r\n\t\t$result = @$mail->send($to);\r\n\t\treturn ($result===true);\r\n\t}",
"function sendOrderMail(&$do){\n if (isset($do['oCUSTOMERLANG']->raw) && $do['oCUSTOMERLANG']->raw != TZR_DEFAULT_LANG){\n $lang_save = XShell::getLangUser();\n $_REQUEST['LANG_USER']=$do['oCUSTOMERLANG']->raw;\n $_REQUEST['LANG_DATA']=$do['oCUSTOMERLANG']->raw;\n $foo = XShell::getLangUser();\n $foo = XShell::getLangData(NULL, true);\n }\n\n $r = $this->displayOrder($do['oid']);\n\n $xt = new XTemplate('file:'.$GLOBALS['USER_TEMPLATES_DIR'].$this->defaultStepTemplates['recepisse']);\n $labels=&$GLOBALS['XSHELL']->labels->get_labels(array('selectors'=>array('global'),'local'=>true));\n $xt->set_glob(array('labels'=>&$labels));\n $r3=array();\n if (isset($GLOBALS['eplmailscolors'])){\n $colors = $GLOBALS['eplmailscolors'];\n } else {\n $colors = array();\n }\n $tpldata = array('br'=>$r, 'colors'=>$colors);\n\n $content=$xt->parse($tpldata,$r3,NULL);\n\n $subject = $GLOBALS['XSHELL']->labels->getCustomSysLabel('titre_mail_commande');\n if (empty($subject))\n $subject = '[Votre commande]';\n\n $subject = XIni::get('societe').' '.$subject;\n\n // mail et nom du client commande\n $to = array('email'=>$do['oCUSTOMEREMAIL']->raw, 'name'=>$do['oCUSTOMERNOM']->raw. ' '. $do['oCUSTOMERPRENOM']->raw);\n\n $this->modcustomer->sendMailTo($content, $subject, NULL, $to);\n\n if (isset($do['CUSTOMERLANG']->raw) && $do['oCUSTOMERLANG']->raw != TZR_DEFAULT_LANG){\n $_REQUEST['LANG_USER'] = $lang_save;\n $_REQUEST['LANG_DATA'] = $lang_save;\n $foo = XShell::getLangUser(NULL, true);\n $foo = XShell::getLangData(NULL, true);\n }\n }",
"abstract public function get_subject();",
"protected function _initMail()\n {\n $mailTransport = new Zend_Mail_Transport_Sendmail();\n Zend_Mail::setDefaultTransport($mailTransport);\n }",
"function bp_course_process_mail($to,$subject,$message,$args=''){\n $template = html_entity_decode(get_option('wplms_email_template'));\n if(!isset($template) || !$template || strlen($template) < 5)\n return $message;\n \n\n $site_title = get_option('blogname');\n $site_description = get_option('blogdescription');\n $logo_url = vibe_get_option('logo');\n $logo = '<a href=\"'.get_option('home_url').'\"><img src=\"'.$logo_url.'\" alt=\"'.$site_title.'\" style=\"max-width:50%;\"/></a>';\n\n $sub_title = $subject; \n if(isset($args['user_id'])){\n if(is_numeric($args['user_id'])){\n $name = bp_core_get_userlink($args['user_id']);\n }else if(is_array($args['user_id'])){\n $userid = $args['user_id'][0];\n if(is_numeric($userid)){\n $name = bp_core_get_userlink($userid);\n }\n }\n }else\n $name = $to;\n\n $datetime = date_i18n( get_option( 'date_format' ), time());\n if(isset($args['item_id'])){\n $instructor_id = get_post_field('post_author', $args['item_id']);\n $sender = bp_core_get_user_displayname($instructor_id);\n $instructing_courses=apply_filters('wplms_instructing_courses_endpoint','instructing-courses');\n $sender_links = '<a href=\"'.bp_core_get_user_domain( $instructor_id ).'\">'.__('Profile','vibe-customtypes').'</a> | <a href=\"'.get_author_posts_url($instructor_id).$instructing_courses.'/\">'.__('Courses','vibe-customtypes').'</a>';\n $item = get_the_title($args['item_id']);\n $item_links = '<a href=\"'.get_permalink( $args['item_id'] ).'\">'.__('Link','vibe-customtypes').'</a> | <a href=\"'.bp_core_get_user_domain($instructor_id).'/\">'.__('Instructor','vibe-customtypes').'</a>';\n $unsubscribe_link = bp_core_get_user_domain($args['user_id']).'/settings/notifications';\n }else{\n $sender ='';\n $sender_links ='';\n $item ='';\n $item_links ='';\n $unsubscribe_link = '#';\n $template = str_replace('cellpadding=\"28\"','cellpadding=\"0\"',$template);\n }\n \n $copyright = vibe_get_option('copyright');\n $link_id = vibe_get_option('email_page');\n if(is_numeric($link_id)){\n $array = array(\n 'to' => $to,\n 'subject'=>$subject,\n 'message'=>$message,\n 'args'=>$args\n );\n $link = get_permalink($link_id).'?vars='.urlencode(json_encode($array));\n }else{\n $link = '#';\n }\n\n\n $template = str_replace('{{logo}}',$logo,$template);\n $template = str_replace('{{subject}}',$subject,$template);\n $template = str_replace('{{sub-title}}',$sub_title,$template);\n $template = str_replace('{{name}}',$name,$template);\n $template = str_replace('{{datetime}}',$datetime,$template);\n $template = str_replace('{{message}}',$message,$template);\n $template = str_replace('{{sender}}',$sender,$template);\n $template = str_replace('{{sender_links}}',$sender_links,$template);\n $template = str_replace('{{item}}',$item,$template);\n $template = str_replace('{{item_links}}',$item_links,$template);\n $template = str_replace('{{site_title}}',$site_title,$template);\n $template = str_replace('{{site_description}}',$site_description,$template);\n $template = str_replace('{{copyright}}',$copyright,$template);\n $template = str_replace('{{unsubscribe_link}}',$unsubscribe_link,$template);\n $template = str_replace('{{link}}',$link,$template);\n $template = bp_course_minify_output($template);\n return $template;\n}",
"function mailreport()\n{\n\tglobal $g_error_msg, $g_debug_msg;\n\tinclude_once(atkconfig('atkroot'). 'atk/errors/class.atkerrorhandlerbase.inc');\n\t$errorHandlerObject = atkErrorHandlerBase::get('mail', array('mailto'=>atkconfig('mailreport')));\n\t$errorHandlerObject->handle($g_error_msg, $g_debug_msg);\n}",
"function sendmail($sender, $recipient, $data, $smtp = 'localhost' ) {\n\n /*\n * Get mime object\n */\n $mime = GenericMail::_instanceMailMime();\n\n /*\n * Get Headerdata\n */\n $headers = GenericMail::_constructHeader($sender, $recipient, $data['subject']);\n\n /*\n * Check if there are attachments\n */\n if (isset($data['attachment'])) {\n $attachment = $data['attachment'];\n if (is_array($attachment)) {\n foreach ($attachment as $file) {\n if (is_file($file) && is_readable($file)) {\n $mime->addAttachment($file);\n }\n }\n } else {\n if (is_file($attachment) && is_readable($attachment)) {\n $mime->addAttachment($attachment);\n }\n }\n }\n\n /*\n * Setea porciones texto y html del correo\n */\n if (!empty($data['textdata'])) $mime->setTxtbody($data['textdata']);\n\n if (!empty($data['htmldata'])) $mime->setHTMLbody($data['htmldata']);\n\n // mail puede contener 'textdata' y/o 'htmldata'\n $param['text_charset'] = 'utf-8'; // The character set to use for the plain text part of the email. Default is \"iso-8859-1\".\n $param['html_charset'] = 'utf-8'; // The character set to use for the HTML part of the email. Default is \"iso-8859-1\".\n\n\n /*\n * Create Body of the Mail\n */\n $body = $mime->get($param); // http://pear.php.net/manual/en/package.mail.mail-mime.get.php\n\n /*\n * Set correct Headers\n */\n $hdrs = $mime->headers($headers['headers']);\n\n /*\n * Get Mail Object\n */\n $mail_object = GenericMail::_instanceMail($smtp);\n\n /*\n * Send Mail\n */\n $res = $mail_object->send( $headers['recipient_list'], $hdrs, $body );\n if (PEAR::isError($res)) {\n throw new Exception(\"code='\" .\n $res->getCode() . \"', message='\" .\n $res->getMessage() . \"'.\");\n };\n\n }",
"function clsRecordemails()\r\n {\r\n\r\n global $FileName;\r\n $this->Visible = true;\r\n $this->Errors = new clsErrors();\r\n $this->ds = new clsemailsDataSource();\r\n $this->ReadAllowed = false;\r\n $this->InsertAllowed = false;\r\n $this->UpdateAllowed = false;\r\n $this->DeleteAllowed = false;\r\n $this->Visible = (CCSecurityAccessCheck(\"1;2\") == \"success\");\r\n if($this->Visible)\r\n {\r\n $this->ReadAllowed = CCUserInGroups(CCGetGroupID(), \"1;2\");\r\n $this->InsertAllowed = CCUserInGroups(CCGetGroupID(), \"1;2\");\r\n $this->ComponentName = \"emails\";\r\n $this->HTMLFormAction = $FileName . \"?\" . CCAddParam(CCGetQueryString(\"QueryString\", \"\"), \"ccsForm\", $this->ComponentName);\r\n $CCSForm = CCGetFromGet(\"ccsForm\", \"\");\r\n $this->FormSubmitted = ($CCSForm == $this->ComponentName);\r\n $Method = $this->FormSubmitted ? ccsPost : ccsGet;\r\n $this->message = new clsControl(ccsTextArea, \"message\", \"Message\", ccsMemo, \"\", CCGetRequestParam(\"message\", $Method));\r\n $this->Insert = new clsButton(\"Insert\");\r\n $this->item_id = new clsControl(ccsHidden, \"item_id\", \"Item Id\", ccsInteger, \"\", CCGetRequestParam(\"item_id\", $Method));\r\n $this->to_user_id = new clsControl(ccsHidden, \"to_user_id\", \"To User Id\", ccsInteger, \"\", CCGetRequestParam(\"to_user_id\", $Method));\r\n $this->from_user_id = new clsControl(ccsHidden, \"from_user_id\", \"From User Id\", ccsInteger, \"\", CCGetRequestParam(\"from_user_id\", $Method));\r\n $this->emaildate = new clsControl(ccsHidden, \"emaildate\", \"date\", ccsInteger, \"\", CCGetRequestParam(\"emaildate\", $Method));\r\n $this->subject = new clsControl(ccsHidden, \"subject\", \"Subject\", ccsText, \"\", CCGetRequestParam(\"subject\", $Method));\r\n if(!$this->FormSubmitted) {\r\n if(!strlen($this->from_user_id->GetValue()))\r\n $this->from_user_id->SetValue(CCGetUserID());\r\n if(!strlen($this->emaildate->GetValue()))\r\n $this->emaildate->SetValue(time());\r\n }\r\n }\r\n }",
"function sendHTMLMail($HTMLContent, $PLAINContent, $recipient, $subject, $fromEmail, $fromName, $replyTo = '', $fileAttachment = '') {\n\t\t\t// HTML\n\t\t\tif (trim($recipient)) {\n\t\t\t\t$parts = spliti('<title>|</title>', $HTMLContent, 3);\n\t\t\t\t\t \n\t\t\t\t$Typo3_htmlmail = t3lib_div::makeInstance('t3lib_htmlmail');\n\t\t\t\t$Typo3_htmlmail->start();\n\t\t\t\t$Typo3_htmlmail->mailer = 'Typo3 HTMLMail';\n\t\t\t\t$Typo3_htmlmail->subject = $subject;\n\t\t\t\t$Typo3_htmlmail->from_email = $fromEmail;\n\t\t\t\t$Typo3_htmlmail->returnPath = $fromEmail;\n\t\t\t\t$Typo3_htmlmail->from_name = $fromName;\n\t\t\t\t$Typo3_htmlmail->from_name = implode(' ' , t3lib_div::trimExplode(',', $Typo3_htmlmail->from_name));\n\t\t\t\t$Typo3_htmlmail->replyto_email = $replyTo ? $replyTo :$fromEmail;\n\t\t\t\t$Typo3_htmlmail->replyto_name = $replyTo ? '' : $fromName;\n\t\t\t\t$Typo3_htmlmail->replyto_name = implode(' ' , t3lib_div::trimExplode(',', $Typo3_htmlmail->replyto_name));\n\t\t\t\t$Typo3_htmlmail->organisation = '';\n\t\t\t\t$Typo3_htmlmail->priority = 3;\n\t\t\t\t \n\t\t\t\t// ATTACHMENT\n\t\t\t\tif ($fileAttachment && file_exists($fileAttachment)) {\n\t\t\t\t\t$Typo3_htmlmail->addAttachment($fileAttachment);\n\t\t\t\t}\n\t\t\t\t \n\t\t\t\t// HTML\n\t\t\t\tif (trim($HTMLContent)) {\n\t\t\t\t\t$Typo3_htmlmail->theParts['html']['content'] = $HTMLContent;\n\t\t\t\t\t$Typo3_htmlmail->theParts['html']['path'] = '';\n\t\t\t\t\t$Typo3_htmlmail->extractMediaLinks();\n\t\t\t\t\t$Typo3_htmlmail->extractHyperLinks();\n\t\t\t\t\t$Typo3_htmlmail->fetchHTMLMedia();\n\t\t\t\t\t$Typo3_htmlmail->substMediaNamesInHTML(0); // 0 = relative\n\t\t\t\t\t$Typo3_htmlmail->substHREFsInHTML();\n\t\t\t\t\t \n\t\t\t\t\t$Typo3_htmlmail->setHTML($Typo3_htmlmail->encodeMsg($Typo3_htmlmail->theParts['html']['content']));\n\t\t\t\t}\n\t\t\t\t// PLAIN\n\t\t\t\t$Typo3_htmlmail->addPlain($PLAINContent);\n\t\t\t\t// SET Headers and Content\n\t\t\t\t$Typo3_htmlmail->setHeaders();\n\t\t\t\t$Typo3_htmlmail->setContent();\n\t\t\t\t$Typo3_htmlmail->setRecipient($recipient);\n\t\t\t\t$Typo3_htmlmail->sendtheMail();\n\t\t\t}\n\t\t}",
"protected function setUp(): void\n\t{\n\t\tglobal $txt;\n\t\trequire_once(SUBSDIR . '/Emailpost.subs.php');\n\n\t\t$lang = new Loader('english', $txt, database());\n\t\t$lang->load('Maillist');\n\t\tUser::$info = new UserInfo(['name' => 'name']);\n\n\t\t$this->_email = 'Return-Path: <[email protected]>\nDelivered-To: <[email protected]>\nReceived: from galileo.tardis.com\n\tby galileo.tardis.com (Dovecot) with LMTP id znQ3AvalOVi/SgAAhPm7pg\n\tfor <[email protected]>; Sat, 26 Nov 2016 09:10:46 -0600\nReceived: by galileo.tardis.com (Postfix, from userid 1005)\n\tid 0671C1C8; Sat, 26 Nov 2016 09:10:46 -0600 (CST)\nX-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on\n\tgalileo.tardis.com\nX-Spam-Flag: YES\nX-Spam-Level: ******\nX-Spam-Status: Yes, score=5.0 required=5.0 tests=HTML_IMAGE_ONLY_16,\n\tHTML_MESSAGE,HTML_SHORT_LINK_IMG_2,MIME_HTML_ONLY,MIME_HTML_ONLY_MULTI,\n\tMPART_ALT_DIFF,RCVD_IN_BRBL_LASTEXT,T_DKIM_INVALID,URIBL_BLACK autolearn=no\n\tautolearn_force=no version=3.4.0\nReceived: from mail.elkarte.net (s2.eurich.de [85.214.104.5])\n\tby galileo.tardis.com (Postfix) with ESMTP id 1872579\n\tfor <[email protected]>; Sat, 26 Nov 2016 09:10:40 -0600 (CST)\nReceived: from localhost (localhost [127.0.0.1])\n\tby mail.elkarte.net (Postfix) with ESMTP id 9DE3C4CE1535\n\tfor <[email protected]>; Sat, 26 Nov 2016 16:10:39 +0100 (CET)\nX-Virus-Scanned: Debian amavisd-new at s2.eurich.de\nReceived: from mail.elkarte.net ([127.0.0.1])\n\tby localhost (h2294877.stratoserver.net [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id zQep5x32jrqA for <[email protected]>;\n\tSat, 26 Nov 2016 16:10:03 +0100 (CET)\nReceived: from mail.elkarte.net (h2294877.stratoserver.net [85.214.104.5])\n\tby mail.elkarte.net (Postfix) with ESMTPA id 990694CE0CFA\n\tfor <[email protected]>; Sat, 26 Nov 2016 16:10:03 +0100 (CET)\nSubject: [ElkArte Community] Test Message\nTo: <[email protected]>\nFrom: \"Administrator via ElkArte Community\" <[email protected]>\nReply-To: \"ElkArte Community\" <[email protected]>\nReferences: <[email protected]>\nDate: Sat, 26 Nov 2016 15:09:15 -0000\nX-Mailer: ELK\nX-Auto-Response-Suppress: All\nAuto-Submitted: auto-generated\nList-Id: <[email protected]>\nList-Unsubscribe: <http://www.elkarte.net/community/index.php?action=profile;area=notification>\nList-Owner: <mailto:[email protected]> (ElkArte Community)\nMime-Version: 1.0\nContent-Type: multipart/alternative; boundary=\"ELK-66593aefa4beed000470cbd4cc3238d9\"\nContent-Transfer-Encoding: 7bit\nMessage-ID: <[email protected]>\n\n\nTesting\n\n\nRegards, The ElkArte Community\n\n[cd8c399768891330804a1d2fc613ccf3-t4124]\n\n--ELK-66593aefa4beed000470cbd4cc3238d9\nContent-Type: text/plain; charset=UTF-8\nContent-Transfer-Encoding: 7bit\n\n\nTesting\n\n\nRegards, The ElkArte Community\n\n[cd8c399768891330804a1d2fc613ccf3-t4124]\n\n--ELK-66593aefa4beed000470cbd4cc3238d9--\n\n--ELK-66593aefa4beed000470cbd4cc3238d9\nContent-Type: text/html; charset=UTF-8\nContent-Transfer-Encoding: 7bit\n\n\n<strong>Testing</strong>\n\n\nRegards, The ElkArte Community\n\n[cd8c399768891330804a1d2fc613ccf3-t4124]\n\n--ELK-66593aefa4beed000470cbd4cc3238d9--';\n\t}",
"function envoyer_inscription_mail($values)\n{\n\t$mot = $GLOBALS['mot'];\n\t$phrase = $GLOBALS['phrase'];\n\t$val = FALSE;\n\t\n\t$contenu = array(\t$mot['Cabinet'] => $values['Cabinet'],\n\t\t\t\t\t\t$mot['Nom'] => $values['Nom'],\n\t\t\t\t\t\t$mot['Prenom'] => $values['Prenom'],\n\t\t\t\t\t\t$mot['Adresse'] => $values['Adresse'],\n\t\t\t\t\t\t$mot['CP'] => $values['CP'],\n\t\t\t\t\t\t$mot['Ville'] => $values['Ville'],\n\t\t\t\t\t\t$mot['Tel'] => $values['Tel'],\n\t\t\t\t\t\t$mot['Email'] => $values['Email'],\n\t\t\t\t\t\t$mot['Commentaire'] => $values['Commentaire'] );\n\t$contenu_message = corps_email($contenu);\n\t\n\t// Si le message a bien été envoyé, on affiche un message de validation\n\t// et on enregistre le message dans la base de données\n\tif (envoi_email(EMAIL_ADMIN, NOM_SITE, EMAIL, $values['Email'], $phrase['UneNouvelleInscription'], $contenu_message) == TRUE)\n\t{\n\t\tif (ajouter_inscription_db($values) == TRUE)\n\t\t{\n\t\t\t$val = TRUE;\n\t\t}\n\t}\n\treturn $val;\n}",
"protected function process_mailtemplate()\n {\n $l_gets = $this->m_modreq->get_gets();\n $l_posts = $this->m_modreq->get_posts();\n\n $l_id = isys_glob_which_isset($l_gets[C__GET__ID], $l_posts[C__GET__ID]);\n $l_navmode = isys_glob_which_isset($l_gets[C__GET__NAVMODE], $l_posts[C__GET__NAVMODE]);\n\n // This will happen, if a user uses the checkboxes and the \"edit\" buttno.\n if (is_array($l_id))\n {\n $l_id = $l_id[0];\n } // if\n\n if (!$l_navmode && $l_id > 0)\n {\n $l_navmode = C__NAVMODE__EDIT;\n } // if\n\n switch ($l_navmode)\n {\n default:\n $this->process_mailtemplate__list();\n break;\n\n case C__NAVMODE__EDIT:\n $this->process_mailtemplate__edit($l_id);\n break;\n\n case C__NAVMODE__NEW:\n $this->process_mailtemplate__edit();\n break;\n\n case C__NAVMODE__SAVE:\n $this->process_mailtemplate__edit($this->process_mailtemplate__save($l_posts));\n break;\n\n case C__NAVMODE__DELETE:\n $this->process_mailtemplate__delete(isys_glob_which_isset($l_gets[C__GET__ID], $l_posts[C__GET__ID]));\n $this->process_mailtemplate__list();\n break;\n } // switch\n\n $this->m_tpl->smarty_tom_add_rule('tom.content.navbar.cRecStatus.p_bInvisible=1');\n }",
"function testMailingMethod() {\n \t\tAngieApplication::mailer()->setDefaultMailingMethod(AngieMailerDelegate::SEND_HOURLY);\n \t\t\n \t $anon = new AnonymousUser('Anon', '[email protected]');\n \t $user = Users::findById(1);\n \t \n \t $this->assertEqual($anon->getMailingMethod(), AngieMailerDelegate::SEND_HOURLY, 'Anonymous users always use default mailing method');\n \t $this->assertEqual($user->getMailingMethod(), AngieMailerDelegate::SEND_HOURLY, 'User that do not have default value overriden use default mailing method');\n\n \t $user = Users::findById(1);\n \t $user->setMailingMethod(AngieMailerDelegate::SEND_IN_BACKGROUD);\n \t \n \t $this->assertEqual($user->getMailingMethod(), AngieMailerDelegate::SEND_IN_BACKGROUD, 'Test mailing method set');\n \t \n \t $user = Users::findById(1);\n \t $this->assertEqual($user->getMailingMethod(), AngieMailerDelegate::SEND_IN_BACKGROUD, 'Making sure that mailing method is permanently saved for this user');\n \t}",
"function sendMail($to,$sub,$msg){\n $msg = wordwrap($msg,70);\n $headers = 'MIME-Version: 1.0' . \"\\r\\n\";\n $headers .= 'From: Convolution 2017<[email protected]>' . \"\\r\\n\";\n $headers .= 'Content-type: text/html; charset=iso-8859-1' . \"\\r\\n\";\n mail($to,$sub,$msg,$headers);\n}",
"function Form_Mail()\n {\n /**\n * Form_Mail();\n */\n\n $this->referers_array = array($_SERVER[\"HTTP_HOST\"]);\n /**\n * Leave AS IS to only allow posting from same host that script resides on.\n * List individual hosts to create list of hosts that can post to this script:\n * EXAMPLE: $referer_array = array ('example.com','www.example.com','192.168.0.1');\n */\n\n /* proccess form */\n $this->set_arrays();\n $this->check_referer();\n $this->check_recipient();\n $this->check_required_fields();\n $this->send_form();\n $this->display_thankyou();\n }",
"function smtpmailer($para, $de, $de_nome, $assunto, $corpo) { \r\n\tglobal $error;\r\n\t$mail = new PHPMailer();\r\n\t$mail->IsSMTP();\t\t// Ativar SMTP\r\n\t$mail->SMTPDebug = 0;\t\t// Debugar: 1 = erros e mensagens, 2 = mensagens apenas\r\n\t$mail->SMTPAuth = true;\t\t// Autenticação ativada\r\n\t$mail->SMTPSecure = 'tls';\t// SSL REQUERIDO pelo GMail\r\n\t$mail->Host = 'smtp.ufop.br';\t// SMTP utilizado\r\n\t$mail->Port = 25; \t\t// A porta 587 deverá estar aberta em seu servidor\r\n\t$mail->Username = GUSER;\r\n\t$mail->Password = GPWD;\r\n\t$mail->SetFrom($de, $de_nome);\r\n\t$mail->Subject = $assunto;\r\n\t$mail->Body = $corpo;\r\n\t$mail->AddAddress($para);\r\n\tif(!$mail->Send()) {\r\n\t\t$error = 'Mail error: '.$mail->ErrorInfo; \r\n\t\treturn false;\r\n\t} else {\r\n\t\t$error = 'Mensagem enviada!';\r\n\t\treturn true;\r\n\t}\r\n}",
"protected function sendTestMail() {}",
"function send_email($email, $subject, $msg, $headers){\r\n $mail = new PHPMailer(true);\r\n try{\r\n $mail->setLanguage('pl', './vendor/phpmailer/phpmailer/language');\r\n $mail->isSMTP();\r\n $mail->Host = Config::SMTP_HOST;\r\n $mail->SMTPAuth = true;\r\n $mail->Username = Config::SMTP_USER;\r\n $mail->Password = Config::SMTP_PASSWORD;\r\n $mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS;\r\n $mail->Port = Config::SMTP_PORT;\r\n $mail->isHTML(true);\r\n $mail->CharSet = 'utf-8';\r\n\r\n $email->setFrom($headers);\r\n $email->addAddress($email);\r\n\r\n $mail->Subject = $subject;\r\n $mail->Body = $msg;\r\n $mail->AltBody = $msg;\r\n\r\n $mail->send();\r\n } catch (Exception $e){\r\n echo validation_errors(\"Message could not be sent. Mailer Error: {$mail->ErrorInfo}\");\r\n return false;\r\n }\r\n return true;\r\n}",
"function my_email_content_type() \n{\n\treturn \"text/html\";\n}",
"function sendmail()\n\t{\n\t\tglobal $mainframe, $Itemid;\n\n\t\t/*\n\t\t * Initialize some variables\n\t\t */\n\t\t$db = & $mainframe->getDBO();\n\n\t\t$SiteName \t= $mainframe->getCfg('sitename');\n\t\t$MailFrom \t= $mainframe->getCfg('mailfrom');\n\t\t$FromName \t= $mainframe->getCfg('fromname');\n\t\t$validate \t= mosHash( $mainframe->getCfg('db') );\n\n\t\t$default \t= sprintf(JText::_('MAILENQUIRY'), $SiteName);\n\t\t$option \t= JRequest::getVar('option');\n\t\t$contactId \t= JRequest::getVar('con_id');\n\t\t$validate \t= JRequest::getVar($validate, \t\t0, \t\t\t'post');\n\t\t$email \t\t= JRequest::getVar('email', \t\t'', \t\t'post');\n\t\t$text \t\t= JRequest::getVar('text', \t\t\t'', \t\t'post');\n\t\t$name \t\t= JRequest::getVar('name', \t\t\t'', \t\t'post');\n\t\t$subject \t= JRequest::getVar('subject', \t\t$default, \t'post');\n\t\t$emailCopy \t= JRequest::getVar('email_copy', \t0, \t\t\t'post');\n\n\t\t// probably a spoofing attack\n\t\tif (!$validate) {\n\t\t\tmosErrorAlert( _NOT_AUTH );\n\t\t}\n\n\t\t/*\n\t\t * This obviously won't catch all attempts, but it does not hurt to make\n\t\t * sure the request came from a client with a user agent string.\n\t\t */\n\t\tif (!isset ($_SERVER['HTTP_USER_AGENT'])) {\n\t\t\tmosErrorAlert( _NOT_AUTH );\n\t\t}\n\n\t\t/*\n\t\t * This obviously won't catch all attempts either, but we ought to check\n\t\t * to make sure that the request was posted as well.\n\t\t */\n\t\tif (!$_SERVER['REQUEST_METHOD'] == 'POST') {\n\t\t\tmosErrorAlert( _NOT_AUTH );\n\t\t}\n\n\t\t// An array of e-mail headers we do not want to allow as input\n\t\t$headers = array ('Content-Type:',\n\t\t\t\t\t\t 'MIME-Version:',\n\t\t\t\t\t\t 'Content-Transfer-Encoding:',\n\t\t\t\t\t\t 'bcc:',\n\t\t\t\t\t\t 'cc:');\n\n\t\t// An array of the input fields to scan for injected headers\n\t\t$fields = array ('email',\n\t\t\t\t\t\t 'text',\n\t\t\t\t\t\t 'name',\n\t\t\t\t\t\t 'subject',\n\t\t\t\t\t\t 'email_copy');\n\n\t\t/*\n\t\t * Here is the meat and potatoes of the header injection test. We\n\t\t * iterate over the array of form input and check for header strings.\n\t\t * If we fine one, send an unauthorized header and die.\n\t\t */\n\t\tforeach ($fields as $field) {\n\t\t\tforeach ($headers as $header) {\n\t\t\t\tif (strpos($_POST[$field], $header) !== false) {\n\t\t\t\t\tmosErrorAlert( _NOT_AUTH );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/*\n\t\t * Now that we have passed the header injection tests lets free up the\n\t\t * used memory and continue.\n\t\t */\n\t\tunset ($fields, $field, $headers, $header);\n\n\t\t/*\n\t\t * Load the contact details\n\t\t */\n\t\t$contact = new JTableContact($db);\n\t\t$contact->load($contactId);\n\n\t\t/*\n\t\t * If there is no valid email address or message body then we throw an\n\t\t * error and return false.\n\t\t */\n\t\tjimport('joomla.utilities.mail');\n\t\tif (!$email || !$text || (JMailHelper::isEmailAddress($email) == false)) {\n\t\t\tJContactView::emailError();\n\t\t} else {\n\t\t\t$menu = JTable::getInstance( 'menu', $db );\n\t\t\t$menu->load( $Itemid );\n\t\t\t$mparams = new JParameter( $menu->params );\n\t\t\t$bannedEmail \t= $mparams->get( 'bannedEmail', \t'' );\n\t\t\t$bannedSubject \t= $mparams->get( 'bannedSubject', \t'' );\n\t\t\t$bannedText \t= $mparams->get( 'bannedText', \t\t'' );\n\t\t\t$sessionCheck \t= $mparams->get( 'sessionCheck', \t1 );\n\n\t\t\t// check for session cookie\n\t\t\tif ( $sessionCheck ) {\n\t\t\t\tif ( !isset($_COOKIE[JSession::name()]) ) {\n\t\t\t\t\tmosErrorAlert( _NOT_AUTH );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Prevent form submission if one of the banned text is discovered in the email field\n\t\t\tif ( $bannedEmail ) {\n\t\t\t\t$bannedEmail = explode( ';', $bannedEmail );\n\t\t\t\tforeach ($bannedEmail as $value) {\n\t\t\t\t\tif ( JString::stristr($email, $value) ) {\n\t\t\t\t\t\tmosErrorAlert( _NOT_AUTH );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Prevent form submission if one of the banned text is discovered in the subject field\n\t\t\tif ( $bannedSubject ) {\n\t\t\t\t$bannedSubject = explode( ';', $bannedSubject );\n\t\t\t\tforeach ($bannedSubject as $value) {\n\t\t\t\t\tif ( JString::stristr($subject, $value) ) {\n\t\t\t\t\t\tmosErrorAlert( _NOT_AUTH );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Prevent form submission if one of the banned text is discovered in the text field\n\t\t\tif ( $bannedText ) {\n\t\t\t\t$bannedText = explode( ';', $bannedText );\n\t\t\t\tforeach ($bannedText as $value) {\n\t\t\t\t\tif ( JString::stristr($text, $value) ) {\n\t\t\t\t\t\tmosErrorAlert( _NOT_AUTH );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// test to ensure that only one email address is entered\n\t\t\t$check = explode( '@', $email );\n\t\t\tif ( strpos( $email, ';' ) || strpos( $email, ',' ) || strpos( $email, ' ' ) || count( $check ) > 2 ) {\n\t\t\t\tmosErrorAlert( JText::_( 'You cannot enter more than one email address', true ) );\n\t\t\t}\n\n\t\t\t/*\n\t\t\t * Prepare email body\n\t\t\t */\n\t\t\t$prefix = sprintf(JText::_('ENQUIRY_TEXT'), $mainframe->getBaseURL());\n\t\t\t$text \t= $prefix.\"\\n\".$name.' <'.$email.'>'.\"\\r\\n\\r\\n\".stripslashes($text);\n\n\t\t\t// Send mail\n\t\t\tjosMail($email, $name, $contact->email_to, $FromName.': '.$subject, $text);\n\n\t\t\t/*\n\t\t\t * If we are supposed to copy the admin, do so.\n\t\t\t */\n\t\t\t// parameter check\n\t\t\t$menuParams \t\t= new JParameter( $contact->params );\n\t\t\t$emailcopyCheck = $menuParams->get( 'email_copy', 0 );\n\n\t\t\t// check whether email copy function activated\n\t\t\tif ( $emailCopy && $emailcopyCheck ) {\n\t\t\t\t$copyText \t\t= sprintf(JText::_('Copy of:'), $contact->name, $SiteName);\n\t\t\t\t$copyText \t\t.= \"\\r\\n\\r\\n\".$text;\n\t\t\t\t$copySubject \t= JText::_('Copy of:').\" \".$subject;\n\t\t\t\tjosMail($MailFrom, $FromName, $email, $copySubject, $copyText);\n\t\t\t}\n\n\t\t\t$link = sefRelToAbs( 'index.php?option=com_contact&task=view&contact_id='. $contactId .'&Itemid='. $Itemid );\n\t\t\t$text = JText::_( 'Thank you for your e-mail', true );\n\n\t\t\tjosRedirect( $link, $text );\n\t\t}\n\t}",
"function notification()\n{\n\n $correo = isset($_POST['correo'])?$_POST['correo']:'';\n $name = isset($_POST['fullname'])?$_POST['fullname']:'';\n $usuario = isset($_POST['usuario'])?$_POST['usuario']:'';\n $clave = isset($_POST['clave'])?$_POST['clave']:'';\n $sendmail= isset($_POST['sendmail'])?$_POST['sendmail']:'';\n if(false == empty($clave) && ($sendmail == 'Y')){\n \n $mail = new Zend_Mail('UTF-8');\n $mail->setBodyText(\"Sr(a) {$name}, esta es su información de ingreso para el sistema Enlazamundos\\r\\n\\r\\nUsuario:{$usuario}\\r\\nClave:{$clave}\");\n $mail->setFrom('[email protected] ', 'Programa Enlazamundos');\n $mail->addTo($correo);\n $mail->setSubject('Confirmación de registro Enlazamundos');\n $mail->send();\n return;\n }\n}",
"public function doExchangeMail($message=\"\",$subject=\"New Pay.nl action\",$extraTarget=\"\")\r\n {\r\n $default = \"Dear sir/madam,\\nA payment has been completed for #paymentSessionId#.\\nThe order number for this was: #object#.\\nAmount paid: #amount# EUR.\\n\\nKind regards,\\nExchange script\";\r\n \r\n if (strlen($message)>1)\r\n {\r\n $default = $message;\r\n }\r\n \r\n // Replace vars\r\n $message = $this->replaceVars($default);\r\n \r\n if (strlen($extraTarget) > 0)\r\n {\r\n mail($extraTarget,$subject,$message);\r\n }\r\n else\r\n {\r\n foreach($this->exchangeEmail as $email)\r\n {\r\n mail($email,$subject,$message);\r\n }\r\n }\r\n return true;\r\n \r\n }",
"function bodyContent($type_suffix)\n\t{\n\t\t$temp_layout = $this->controller->layout; // store the current controller layout\n\t\n\t\tif ($type_suffix == 'html')\n\t\t\t $this->controller->layout = '..'.DS.'email';\n\t\telse\n\t\t\t $this->controller->layout = '';\n\t\n\t\t$mail = $this->controller->render($this->templateLocation('_'.strtolower($type_suffix)));\n\t\t// render() automatically adds to the controller->output, we'll remove it\n\t\t$this->controller->output = str_replace($mail, '', $this->controller->output);\n\t\n\t\t$this->controller->layout = $temp_layout; // restore the controller layout\n\t\treturn $mail;\n\t}",
"function mymail($to, $title, $body, $from = '') {\n\n $controlquery = doquery(\"SELECT * FROM {{table}} WHERE id='1' LIMIT 1\", \"control\");\n $controlrow = mysql_fetch_array($controlquery);\n extract($controlrow);\n \n\n $from = trim($from);\n\n if (!$from) {\n $from = '<'.$controlrow[\"adminemail\"].'>';\n }\n\n $rp = $controlrow[\"adminemail\"];\n $org = '$gameurl';\n $mailer = 'PHP';\n\n $head = '';\n $head .= \"Content-Type: text/plain \\r\\n\";\n $head .= \"Date: \". date('r'). \" \\r\\n\";\n $head .= \"Return-Path: $rp \\r\\n\";\n $head .= \"From: $from \\r\\n\";\n $head .= \"Sender: $from \\r\\n\";\n $head .= \"Reply-To: $from \\r\\n\";\n $head .= \"Organization: $org \\r\\n\";\n $head .= \"X-Sender: $from \\r\\n\";\n $head .= \"X-Priority: 3 \\r\\n\";\n $head .= \"X-Mailer: $mailer \\r\\n\";\n\n $body = str_replace(\"\\r\\n\", \"\\n\", $body);\n $body = str_replace(\"\\n\", \"\\r\\n\", $body);\n\n return mail($to, $title, $body, $head);\n \n}"
]
| [
"0.71752095",
"0.6583273",
"0.6489261",
"0.6192086",
"0.6145431",
"0.61450666",
"0.6142652",
"0.61312824",
"0.6130696",
"0.6106163",
"0.61033756",
"0.6092138",
"0.60867774",
"0.6073201",
"0.60507554",
"0.6050266",
"0.60391206",
"0.6027186",
"0.6020624",
"0.59969556",
"0.5984744",
"0.5983207",
"0.5981939",
"0.59757984",
"0.59729797",
"0.5970977",
"0.5965652",
"0.5958799",
"0.5955969",
"0.5948498",
"0.59287024",
"0.5926622",
"0.59236544",
"0.58854717",
"0.58768946",
"0.5872115",
"0.5872035",
"0.58700275",
"0.58662045",
"0.5862684",
"0.5830625",
"0.5830204",
"0.5829834",
"0.58196944",
"0.581241",
"0.5808315",
"0.58048844",
"0.57934713",
"0.5786626",
"0.5783306",
"0.57831544",
"0.5772696",
"0.5770081",
"0.57674533",
"0.576354",
"0.5761701",
"0.5758043",
"0.57485235",
"0.5748198",
"0.5732485",
"0.5731318",
"0.5724766",
"0.57223415",
"0.57195526",
"0.57036203",
"0.56991816",
"0.56961656",
"0.56932056",
"0.569138",
"0.5686445",
"0.5684732",
"0.5675371",
"0.56642497",
"0.5664151",
"0.56609523",
"0.56604123",
"0.5658731",
"0.56586075",
"0.5656876",
"0.5654133",
"0.5653081",
"0.5645958",
"0.5639696",
"0.5639118",
"0.5631135",
"0.5630754",
"0.56302536",
"0.5623191",
"0.5622461",
"0.5618541",
"0.56130046",
"0.5607933",
"0.5601904",
"0.5600227",
"0.5596658",
"0.55940217",
"0.5593735",
"0.55911404",
"0.5587368",
"0.5583228",
"0.5582153"
]
| 0.0 | -1 |
Method returning the result content | public function getResult()
{
return parent::getResult();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function get_output_content();",
"public function returnResult() {\r\n\t\treturn $this->_html;\r\n\t}",
"public function getResultBody();",
"public function getResult();",
"public function getResult();",
"public function getResult();",
"public function getResult();",
"public function getResult();",
"public function getResult();",
"public function getResult();",
"public function getResult();",
"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}",
"function getContent() ;",
"public function result();",
"public function result();",
"public function getRawResult();",
"public function output() {\n\t\treturn $this->content;\n\t}",
"public function getResult()\n {\n $content = file_get_contents($this->directory.DS.$this->entities[0]->getFilename().'.'.$this->file_extension);\n $this->entities[0]->setContent($content); \n \n return $this->entities[0];\n }",
"public function getContentAction()\n {\n //get input\n $inputs = $this->getAllUrlParam();\n\n //get field repository\n $contentRepo = $this->getContentRepository();\n\n //get content data by input\n $result = $contentRepo->getContent($inputs);\n\n //Check response error\n if (!$result['success'])\n {\n return $this->validateBussinessError($result['message']);\n }\n\n if (isset($result['totalRecord'])) {\n $inputs['totalRecord'] = $result['totalRecord'];\n }\n\n return $this->outputgraph($result, $inputs);\n }",
"public function getContent() {}",
"public function getContent() {}",
"protected function getContents() {\n return file_get_contents($this->query);\n }",
"public function getContent()\n {\n \t$content = $this->content;\n return $content;\n }",
"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 getContent()\n\t{\n\t\treturn $this->output;\n\t}",
"public function getContents() {}",
"public function getContents() {}",
"public function getContents() {}",
"public function getContents() {}",
"public function getContents() {}",
"public function getContents();",
"public function getContents();",
"public function getContents();",
"public function getContents();",
"public function getContents();",
"protected function getContents()\n {\n return $this->engine->get($this->path, $this->gatherData());\n }",
"public function __toString() {\n\n return $this->result->body;\n }",
"private function getResult() {\n return $this->result;\n }",
"public function getResult()\n {\n return $this->getBody()->getResult();\n }",
"function get_contents(){\n return $this->input_content;\n }",
"public function getResult()\n {\n return $this->get(self::_RESULT);\n }",
"public function getResult()\n {\n return $this->get(self::_RESULT);\n }",
"public function getResult()\n {\n return $this->get(self::_RESULT);\n }",
"public function getResult()\n {\n return $this->get(self::_RESULT);\n }",
"public function getResult()\n {\n return $this->get(self::_RESULT);\n }",
"public function getResult()\n {\n return $this->get(self::_RESULT);\n }",
"public function getResult()\n {\n return $this->get(self::_RESULT);\n }",
"public function getResult()\n {\n return $this->get(self::_RESULT);\n }",
"public function getResult()\n {\n return $this->get(self::_RESULT);\n }",
"public function getResult()\n {\n return $this->get(self::_RESULT);\n }",
"public function getResult()\n {\n return $this->get(self::_RESULT);\n }",
"public function getResult()\n {\n return $this->get(self::_RESULT);\n }",
"public function getResult()\n {\n return $this->get(self::_RESULT);\n }",
"public function getResult()\n {\n return $this->get(self::_RESULT);\n }",
"public function getResult()\n {\n return $this->get(self::_RESULT);\n }",
"public function getResult()\n {\n return $this->get(self::_RESULT);\n }",
"public function getResult()\n {\n return $this->get(self::_RESULT);\n }",
"public function getResult()\n {\n return $this->get(self::_RESULT);\n }",
"public function getResult()\n {\n return $this->get(self::_RESULT);\n }",
"public function getResult()\n {\n return $this->get(self::_RESULT);\n }",
"public function getResult()\n {\n return $this->get(self::_RESULT);\n }",
"public function getResult()\n {\n return $this->get(self::_RESULT);\n }",
"public function getResult()\n {\n return $this->get(self::_RESULT);\n }",
"public function getResult()\n {\n return $this->get(self::_RESULT);\n }",
"public function getResult()\n {\n return $this->get(self::_RESULT);\n }",
"public function getResult()\n {\n return $this->get(self::_RESULT);\n }",
"public function getResult()\n {\n return $this->get(self::_RESULT);\n }",
"public function getResult()\n {\n return $this->get(self::_RESULT);\n }",
"public function getResult()\n {\n return $this->get(self::_RESULT);\n }",
"public function getResult()\n {\n return $this->get(self::_RESULT);\n }",
"public function getResult()\n {\n return $this->get(self::_RESULT);\n }",
"public function getResult()\n {\n return $this->get(self::_RESULT);\n }",
"public function getResult()\n {\n return $this->get(self::_RESULT);\n }",
"public function getResult()\n {\n return $this->get(self::_RESULT);\n }",
"public function getResult()\n {\n return $this->get(self::_RESULT);\n }",
"public function getResult()\n {\n return $this->get(self::_RESULT);\n }",
"public function getResult()\n {\n return $this->get(self::_RESULT);\n }",
"public function getResult()\n {\n return $this->get(self::_RESULT);\n }",
"public function getResult()\n {\n return $this->get(self::_RESULT);\n }",
"public function getResult()\n {\n return $this->get(self::_RESULT);\n }",
"public function getResult()\n {\n return $this->get(self::_RESULT);\n }",
"public function getResult()\n {\n return $this->get(self::_RESULT);\n }",
"public function getResult()\n {\n return $this->get(self::_RESULT);\n }",
"public function getResult()\n {\n return $this->get(self::_RESULT);\n }"
]
| [
"0.7461774",
"0.73875505",
"0.72915155",
"0.70992386",
"0.70992386",
"0.70992386",
"0.70992386",
"0.70992386",
"0.70992386",
"0.70992386",
"0.70992386",
"0.7002258",
"0.6876531",
"0.6862674",
"0.6862674",
"0.6844225",
"0.6832251",
"0.6818366",
"0.68154687",
"0.6812136",
"0.6812136",
"0.67991394",
"0.6796722",
"0.67894405",
"0.67894405",
"0.67894405",
"0.67894405",
"0.67894405",
"0.67894405",
"0.67894405",
"0.67894405",
"0.67894405",
"0.67894405",
"0.67894405",
"0.67894405",
"0.67894405",
"0.67894405",
"0.67894405",
"0.67894405",
"0.67894405",
"0.67894405",
"0.67853254",
"0.67584753",
"0.67576045",
"0.67576045",
"0.67576045",
"0.67576045",
"0.67551434",
"0.67551434",
"0.67551434",
"0.67551434",
"0.67551434",
"0.67526156",
"0.67519635",
"0.67344517",
"0.67066276",
"0.67006487",
"0.6692912",
"0.6692912",
"0.6692912",
"0.6692912",
"0.6692912",
"0.6692912",
"0.6692912",
"0.6692912",
"0.6692912",
"0.6692912",
"0.6692912",
"0.6692912",
"0.6692912",
"0.6692912",
"0.6692912",
"0.6692912",
"0.6692912",
"0.6692912",
"0.6692912",
"0.6692912",
"0.6692912",
"0.6692912",
"0.6692912",
"0.6692912",
"0.6692912",
"0.6692912",
"0.6692912",
"0.6692912",
"0.6692912",
"0.6692912",
"0.6692912",
"0.6692912",
"0.6692912",
"0.6692912",
"0.6692912",
"0.6692912",
"0.6692912",
"0.6692912",
"0.6692912",
"0.6692912",
"0.6692912",
"0.6692912",
"0.6692912",
"0.6692912"
]
| 0.0 | -1 |
Method returning the class name | public function __toString()
{
return __CLASS__;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getClassName();",
"public function getClassName();",
"public function getClassName() ;",
"public function getClassName() {}",
"public function getClassName() {}",
"public function getClassName() {}",
"public function getClassName() {}",
"public function getClassName()\n {\n return __CLASS__;;\n }",
"private function get_class_name() {\n\t\t\treturn !is_null($this->class_name) ? $this->class_name : get_class($this);\n\t\t}",
"public function getClassName() {\r\n\t\treturn($this->class_name);\r\n\t}",
"public static function get_class_name() {\r\n\t\treturn __CLASS__;\r\n\t}",
"public function getClassName() { return __CLASS__; }",
"public static function getClassName() {\n\t\treturn get_called_class();\n\t}",
"public function getClassName(): string\n {\n return $this->get(self::CLASS_NAME);\n }",
"public static function getClassName()\n\t{\n\t\treturn get_called_class();\n\t}",
"public static function getClassName()\n {\n return get_called_class();\n }",
"public function getClassName()\n {\n return $this->class;\n }",
"public function getClassName()\n {\n return $this->class;\n }",
"public static function className() : string {\n return get_called_class();\n }",
"public function getName()\n {\n return __CLASS__;\n }",
"public function getName()\n\t{\n\t\treturn str_replace('\\\\', '_', __CLASS__);\n\t}",
"public function getClassName()\n {\n return $this->class_name;\n }",
"public function class_name() {\n\t\treturn strtolower(get_class($this));\n\t}",
"public function getName(): string\n {\n return __CLASS__;\n }",
"public static function getClassName() {\n return get_called_class();\n }",
"public function getClassname(){\n\t\treturn $this->classname;\n\t}",
"public function getClassname()\n\t{\n\t\treturn $this->classname;\n\t}",
"public function getClassName()\n {\n return $this->_sClass;\n }",
"public function get_just_class_name() {\n\n\t\t$full_path = $this->get_called_class();\n\n\t\treturn substr( strrchr( $full_path, '\\\\' ), 1 );\n\n\t}",
"protected function getClassName(): string\n {\n return $this->className;\n }",
"public static function getClassName() {\n return self::$className;\n }",
"public function getClassName(): string;",
"public function getClassName() : string;",
"public function getName() {\r\n $parsed = Parser::parseClassName(get_class());\r\n return $parsed['className'];\r\n }",
"public function getClassName() : string\n {\n return $this->className;\n }",
"public function getClassName()\n {\n $fullClass = get_called_class();\n $exploded = explode('\\\\', $fullClass);\n\n return end($exploded);\n }",
"public static function getClassName()\n {\n $classNameArray = explode('\\\\', get_called_class());\n\n return array_pop($classNameArray);\n }",
"public function getClassName(): string\n {\n return $this->className;\n }",
"public function getClassName(): string\n {\n return $this->className;\n }",
"public function getClassName() {\t\t\n\t\treturn MemberHelper::getClassName($this->classNumber);\n\t}",
"public function getName()\n\t{\n\t\treturn substr(__CLASS__, 7);\n\t}",
"public function getName()\n\t{\n\t\treturn substr(__CLASS__, 7);\n\t}",
"public function getClassName() {\r\n\t\treturn $this->strClassName;\r\n\t}",
"public function getClassName() : string\n {\n\n return $this->className;\n }",
"public function getClassName()\n {\n return $this->className;\n }",
"public function getClassName()\n {\n return $this->className;\n }",
"public function getClassName()\n {\n return $this->className;\n }",
"public function getClassName()\n {\n return $this->className;\n }",
"public function getClassName()\n {\n return $this->className;\n }",
"public function getClassName()\n {\n return $this->className;\n }",
"public function getClassName()\n {\n return $this->className;\n }",
"public function getClassName()\n {\n return $this->className;\n }",
"public static function staticGetClassName()\n {\n return __CLASS__;\n }",
"public function getClassName() {\n return $this->className;\n }",
"public function getClassName() {\n\t\treturn $this->className;\n\t}",
"public function getClassName(): string\n {\n return $this->makeClassFromFilename($this->filename);\n }",
"public function getClassName() {\n\t\treturn $this->_className;\n\t}",
"public function getClassName() {\n return $this->className;\n }",
"public function getClassName() {\n return $this->className;\n }",
"public function getClassName ()\n {\n $className = explode('\\\\', get_class($this));\n\n return array_pop($className);\n }",
"function getClassName()\n {\n // TODO: Implement getClassName() method.\n }",
"public static function getClassName(){\n $parts = explode('\\\\', static::class);\n return end($parts);\n }",
"function getClassName(){\n echo __CLASS__ . \"<br><br>\"; \n }",
"public function name()\n {\n $name = get_class($this);\n\n return substr($name, strrpos($name, '\\\\') + 1);\n }",
"public function class()\n {\n // @codingStandardsIgnoreLine\n return $this->class ?? \"\";\n }",
"public function getClass()\n {\n return $this->_className;\n }",
"private function getClassName() {\n return (new \\ReflectionClass(static::class))->getShortName();\n }",
"public function getName() {\n\t\t\n\t\t// cut last part of class name\n\t\treturn substr( get_class( $this ), 0, -11 );\n\t\t\n\t}",
"public function getClassNm()\r\n {\r\n\t\t$tabInfo = $this->getPathInfo();\r\n\t\treturn $tabInfo[1];\r\n }",
"public function className()\n {\n $full_path = explode('\\\\', get_called_class());\n return end($full_path);\n }",
"private function className () {\n $namespacedClass = explode(\"\\\\\", get_class($this));\n\n return end($namespacedClass);\n }",
"public function getClass(): string\n {\n return $this->class;\n }",
"public static function getFullyQualifiedClassName() {\n $reflector = new \\ReflectionClass(get_called_class());\n return $reflector->getName();\n }",
"public function getClassName()\n\t{\n\t\tif (null === $this->_className) {\n\t\t\t$this->setClassName(get_class($this));\n\t\t}\n\t\t\n\t\treturn $this->_className;\n\t}",
"public function getClassName() : string {\n if ($this->getType() != Router::CLOSURE_ROUTE) {\n $path = $this->getRouteTo();\n $pathExplode = explode(DS, $path);\n\n if (count($pathExplode) >= 1) {\n $fileNameExplode = explode('.', $pathExplode[count($pathExplode) - 1]);\n\n if (count($fileNameExplode) == 2 && $fileNameExplode[1] == 'php') {\n return $fileNameExplode[0];\n }\n }\n }\n\n return '';\n }",
"public function getName(){\n\t\treturn get_class($this);\n\t}",
"public function getClassName() {\r\n return $this->myCRUD()->getClassName();\r\n }",
"public static function className()\n\t{\n\t\treturn static::class;\n\t}",
"public function toClassName(): string\n {\n return ClassName::full($this->name);\n }",
"public function getName()\n {\n return static::CLASS;\n }",
"public function getClass(): string;",
"public function getClass(): string;",
"public function getClass(): string;",
"public function getClass(): string;",
"public function getClass(): string;",
"public function getClass(): string;",
"function getName()\n {\n return get_class($this);\n }",
"public function className(): string\n {\n return $this->taskClass->name();\n }",
"public static function getClassName($class)\n {\n return static::splitClassName($class)[1];\n }",
"function getName()\r\n\t{\r\n\t\treturn get_class($this);\r\n\t}",
"public function getName() {\n return get_class($this);\n }",
"public function getName() {\n return get_class($this);\n }",
"public function toString()\n {\n return __CLASS__;\n }",
"public function getName()\n\t{\n\t\treturn $this->name ?: class_basename($this);\n\t}",
"public function getNamespacedName()\n {\n return get_class();\n }",
"protected function name() {\n\t\treturn strtolower(str_replace('\\\\', '_', get_class($this)));\n\t}",
"protected function getClassName()\n {\n return ucwords(camel_case($this->getNameInput())) . 'TableSeeder';\n }",
"function getClassName($name)\n{\n return str_replace('_', ' ', snake_case(class_basename($name)));\n}",
"public function getClassName(): ?string {\n\t\treturn Hash::get($this->_config, 'className');\n\t}",
"public function __toString() {\n\t\treturn $this->className();\n\t}",
"public static function name()\n {\n return lcfirst(self::getClassShortName());\n }"
]
| [
"0.87522393",
"0.87522393",
"0.8751158",
"0.87397957",
"0.87397957",
"0.87397957",
"0.87397957",
"0.8731564",
"0.8696754",
"0.8673495",
"0.8638432",
"0.8615335",
"0.8603119",
"0.8566906",
"0.8562364",
"0.8555002",
"0.85503733",
"0.85503733",
"0.85425884",
"0.8533183",
"0.8529981",
"0.85237026",
"0.8502733",
"0.8493115",
"0.8491238",
"0.8488943",
"0.8484194",
"0.847459",
"0.8441478",
"0.8418852",
"0.8399611",
"0.83950585",
"0.83949184",
"0.83853173",
"0.8378261",
"0.837777",
"0.8372544",
"0.8355432",
"0.8355432",
"0.83479965",
"0.8325877",
"0.8325877",
"0.8312873",
"0.83027107",
"0.8272631",
"0.8272631",
"0.8272631",
"0.8272631",
"0.8272631",
"0.8272631",
"0.8272631",
"0.8272631",
"0.82474744",
"0.8242934",
"0.8202995",
"0.8185409",
"0.8184752",
"0.81829107",
"0.81829107",
"0.8176191",
"0.81761754",
"0.8162896",
"0.8142928",
"0.81323636",
"0.8062757",
"0.80528253",
"0.8045769",
"0.8033823",
"0.8026215",
"0.8001116",
"0.79949147",
"0.79779136",
"0.79672754",
"0.7957633",
"0.790449",
"0.78617185",
"0.7860126",
"0.7847096",
"0.78195953",
"0.7817044",
"0.780094",
"0.780094",
"0.780094",
"0.780094",
"0.780094",
"0.780094",
"0.77821547",
"0.7761565",
"0.77588034",
"0.7747239",
"0.77409905",
"0.77409905",
"0.7710985",
"0.76808393",
"0.7670475",
"0.76640886",
"0.76514393",
"0.76499707",
"0.76323646",
"0.76005036",
"0.75937456"
]
| 0.0 | -1 |
Transform the resource collection into an array. | public function toArray($request)
{
return [
'id' => $this->id,
'employee' => $this->Employee?new EmployeeResource($this->Employee):"",
'absence_from' => $this->absence_from,
'absence_to' => $this->absence_to,
'days' => Carbon::create($this->absence_from)->diffInDays(Carbon::create($this->absence_to)) ,
'absence_reason' => $this->absence_reason
];
// return parent::toArray($request);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function toArray(): array\n {\n if (is_null($this->resource)) {\n return [];\n }\n\n return is_array($this->resource)\n ? $this->resource\n : $this->resource->toArray();\n }",
"public function toArray(): array\n {\n if (is_null($this->resource)) {\n return [];\n }\n\n return is_array($this->resource)\n ? $this->resource\n : $this->resource->toArray();\n }",
"public function toArray(): array\n {\n return [\n 'users' => HiUserResource::collection($this->resource),\n ];\n }",
"public function asArray() {\n return $this->resource;\n }",
"public function toArray()\n {\n return $this->collection;\n }",
"public function toArray()\n {\n if ($this->resource instanceof ArrayableInterface) {\n\n return $this->resource->toArray();\n } else {\n\n return null;\n }\n }",
"public function toArray($request): array\n {\n return [\n 'data' => $this->collection->map(\n function ($tag) {\n return new TagResource($tag);\n })\n ]; }",
"public function toArray($request)\n {\n $data = $this->collection->transform(function ($uses) {\n $tmp = [\n 'id' => $uses->id,\n 'user_id' => $uses->user_id,\n 'use_date' => $uses->use_date,\n 'application_id' => $uses->application_id,\n 'created_at' => $uses->created_at,\n 'updated_at' => $uses->updated_at,\n ];\n\n return $tmp;\n });\n\n if ($data->count() == 1) {\n // Fixing of sometime collections have one element\n return [$data->first()];\n } else {\n return $data;\n }\n\n }",
"public function toArray() {}",
"public function toArray() {}",
"public function toArray() {}",
"public function toArray() {}",
"public function toArray() {}",
"public function toArray() {}",
"public function toArray() {}",
"public function toArray() {}",
"public function toArray() {}",
"public function toArray() {}",
"public function toArray() {}",
"public function toArray() {}",
"public function toArray() {}",
"public function toArray() {}",
"public function toArray() {}",
"public function toArray() {}",
"public function toArray()\n {\n return $this->collection->toArray();\n }",
"public function toArray($request)\n {\n return [\n 'data' => ContatoResource::collection($this->collection)\n ];\n }",
"public function toArray()\n {\n return $this->transform();\n }",
"public function toArray($request)\n {\n return [\n \"items\" => ProductResource::collection(collect($this->items())),\n ];\n }",
"public function toArray($request)\n {\n // return parent::toArray($request);\n return $this->collection->transform(function ($item){\n // return $item->only(['field','name']);\n return new ItemResource($item);\n });\n }",
"public function toArray(): array\n {\n /** @var Collection $collection */\n $collection = $this->collection->map->toArray();\n return $collection->all();\n }",
"public function toArray($request)\n {\n return [\n 'data' => JsonApiResource::collection($this->collection),\n ];\n }",
"public function toArray()\n {\n return $this->cast('array');\n }",
"public function toArray()\n {\n return iterator_to_array($this->pipeline->get());\n }",
"public function toArray($request)\n { \n return $this->collection->map(function($media) { \n return [\n 'id' => $media->id,\n 'name' => $media->name,\n 'label' => $media->label,\n 'group' => $media->group, \n 'gallery' => $media->getMedia('gallery')->map(function($image) use ($media) {\n return $media->getConversions($image, ['main', 'cover', 'thumbnail']);\n }),\n ];\n })->toArray();\n }",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray($request)\n {\n return [\n 'data' => $this->collection->transform(function($page){\n return [\n 'id' => $page->id,\n 'title' => $page->title\n ];\n }),\n ]; \n }",
"public function toArray()\r\n {\r\n $a = array();\r\n if ($this->survivorResources) {\r\n $ab = array();\r\n foreach ($this->survivorResources as $i => $x) {\r\n $ab[$i] = $x->toArray();\r\n }\r\n $a['survivorResources'] = $ab;\r\n }\r\n if ($this->duplicateResources) {\r\n $ab = array();\r\n foreach ($this->duplicateResources as $i => $x) {\r\n $ab[$i] = $x->toArray();\r\n }\r\n $a['duplicateResources'] = $ab;\r\n }\r\n if ($this->conflictingResources) {\r\n $ab = array();\r\n foreach ($this->conflictingResources as $i => $x) {\r\n $ab[$i] = $x->toArray();\r\n }\r\n $a['conflictingResources'] = $ab;\r\n }\r\n if ($this->survivor) {\r\n $a[\"survivor\"] = $this->survivor->toArray();\r\n }\r\n if ($this->duplicate) {\r\n $a[\"duplicate\"] = $this->duplicate->toArray();\r\n }\r\n return $a;\r\n }",
"public function toArray($request)\n {\n return [\n 'data' => $this->collection->map(function($data) {\n return [\n 'id' => $data->id,\n 'title' => $data->title,\n 'date' => (int) $data->end_date,\n 'banner' => api_asset($data->banner)\n ];\n })\n ];\n }",
"public function getAsArray();",
"abstract protected function toArray();",
"public function toArray($request): array\n {\n return $this->collection->map(function (BaseApiResource $resource) use ($request) {\n return $resource->columns($this->columns)->toArray($request);\n })->all();\n\n //return parent::toArray($request);\n }",
"public function arr() {\n\t\t\treturn \\uri\\generate::to_array($this->object);\n\t\t}",
"public function toArray($request)\n {\n return $this->collection->transform(function ($item) {\n return ['id' => (int) $item->id,\n 'name' => (string) $item->name,\n 'country_id' => (int) $item->country_id,\n ];\n });\n }",
"public function transform($resource)\n {\n return [];\n }",
"public function toArray($request)\n {\n \n return $this->collection->map(function($resource) use($request){\n\n \n $user_name = '';\n $user_image = null;\n if(isset($this->userDict[$resource->user_id])){\n $user = $this->userDict[$resource->user_id];\n $user_name = $user->name;\n if($user->img){\n $user_image = config('app.static_host') . \"/users/$user->id_code/$user->img\"; \n }\n }\n\n return [\n 'user_name'=>$user_name,\n 'user_image'=>$user_image,\n 'body'=>$resource->body,\n 'created_at'=>$resource->created_at,\n ];\n });\n\n\n\n }",
"function toArray() ;",
"function toArray() ;",
"public function transform()\n {\n $object = $this->resource;\n\n $data = $object instanceof Collection || $object instanceof AbstractPaginator\n ? $object->map([$this, 'transformResource'])->toArray()\n : $this->transformResource($object);\n\n if ($object instanceof AbstractPaginator) {\n $this->withMeta(array_merge(\n $this->getExtra('meta', []), Arr::except($object->toArray(), ['data'])\n ));\n }\n\n $data = array_filter(compact('data') + $this->extras);\n ksort($data);\n\n return $data;\n }",
"public function toArray($request)\n {\n $this->buildCollection();\n\n return parent::toArray($request);\n }",
"public function toArray($request): array;",
"public function toArray($request)\n {\n return [\n 'data' => $this->collection->map(function ($item, $key) {\n return [\n 'name' => $item['name'],\n 'items' => $item->items,\n 'checklists' => $item->checklist\n ];\n })->toArray()\n ];\n }",
"public function toArray() {\n return $this->getData();\n }",
"function domains_to_array($collection)\n {\n $result = $collection->map(function($item) {\n return $item->toArray();\n });\n\n return $result;\n }",
"public function toArray($request)\n {\n return [\n 'id' => $this->id,\n 'size' => $this->size,\n 'children' => SizeResource::collection($this->whenLoaded('children'))\n ];\n }",
"public function toArray()\n {\n\n }",
"public function getAsArray()\n\t{\n\t\t\n\t\t$path = $this->get();\n\t\t\n\t\treturn self::toArray($path);\n\t\t\n\t}",
"public function toArray($request)\n\t{\n\t\t$data = $this->resource->toArray();\n\n\t\t$data['id'] = shorten_uuid($data['id']);\n\t\t$data['code_id'] = shorten_uuid($data['code_id']);\n\t\t$data['user_id'] = shorten_uuid($data['user_id']);\n\n\t\t$data['order_cards'] = OrderCardTransformer::collection($this->whenLoaded('orderCards'));\n\n\t\treturn $data;\n\t}",
"public function toArray($request)\n {\n if (!$this->collects) {\n throw new ResourceCollectionNotFound();\n }\n\n return $this->merge(\n $this->buildMessagableResponse(),\n 2,\n [\n $this::$wrap => $this->collection->toArray(),\n ]\n );\n }",
"private function arrayify(): array\n {\n return $this->toArray();\n }",
"public function toArray(): array\n {\n $array = [];\n\n foreach ($this->collection as $slot) {\n $array[] = $slot->toArray();\n }\n\n return $array;\n }",
"public function toArray($request)\n {\n $collection = $this->collection->map(function($item){\n return [\n 'no' => $item['no'],\n 'campaign_id' => $item['campaign_id'],\n 'name' => $item['name'],\n 'processing_status' => $item['processing_status'],\n 'created_at' => $item['created_at'],\n 'button_status' => $this->getButtonStatus($item['processing_status']),\n 'complainer_rate' => $item['complainer_rate'],\n 'conversioncount' => $item['conversioncount'],\n 'mobileclickscount' => $item['mobileclickscount'],\n 'opt_rate' => $item['opt_rate'],\n 'otherclickscount' => $item['otherclickscount'],\n 'profit' => $item['profit'],\n 'reply_rate' => $item['reply_rate'],\n 'revenue' => $item['revenue'],\n 'sentcount' => $item['sentcount'],\n 'cost' => $item['cost'],\n 'ctr' => $item['ctr'],\n 'roi' => $item['roi']\n ];\n });\n\n return $collection;\n }",
"function toArray(){\r\n\t\treturn $this->data;\r\n\t}"
]
| [
"0.75023437",
"0.75023437",
"0.74398685",
"0.73221743",
"0.7238756",
"0.7181181",
"0.7159696",
"0.71220154",
"0.7117252",
"0.7117252",
"0.7117169",
"0.7117169",
"0.7117169",
"0.7117169",
"0.7117118",
"0.7117118",
"0.7117118",
"0.7117118",
"0.7117118",
"0.7117118",
"0.7117118",
"0.7117118",
"0.7117118",
"0.7117118",
"0.7057061",
"0.7017721",
"0.7004176",
"0.69773245",
"0.692872",
"0.6920197",
"0.69038546",
"0.6898731",
"0.6897736",
"0.6881646",
"0.68266606",
"0.68266606",
"0.68266606",
"0.68266606",
"0.68266606",
"0.68266606",
"0.68266606",
"0.68266606",
"0.68266606",
"0.68266606",
"0.68266606",
"0.68266606",
"0.68266606",
"0.68266606",
"0.68266606",
"0.68266606",
"0.68266606",
"0.68266606",
"0.68266606",
"0.68266606",
"0.68266606",
"0.68266606",
"0.68266606",
"0.68266606",
"0.68266606",
"0.68266606",
"0.68266606",
"0.68266606",
"0.68266606",
"0.68266606",
"0.68266606",
"0.68266606",
"0.68266606",
"0.68266606",
"0.68266606",
"0.68266606",
"0.68266606",
"0.68266606",
"0.68266606",
"0.68266606",
"0.6819385",
"0.6818766",
"0.6800064",
"0.6770631",
"0.6764444",
"0.67592347",
"0.67583686",
"0.6755653",
"0.6736483",
"0.67291135",
"0.6725103",
"0.6725103",
"0.6715038",
"0.6704712",
"0.6704487",
"0.6700217",
"0.66875273",
"0.6686972",
"0.6684334",
"0.6684024",
"0.66818064",
"0.66817075",
"0.6679236",
"0.6677755",
"0.66767704",
"0.6676551",
"0.6673718"
]
| 0.0 | -1 |
/ initializes the apiServices and apiMethods arrays | public function __construct($sourceCredentials = [])
{
// set apiServices array with Mindbody WSDL locations
$this->apiServices = [
'AppointmentService' => $this->appointmentServiceWSDL,
'ClassService' => $this->classServiceWSDL,
'ClientService' => $this->clientServiceWSDL,
'DataService' => $this->dataServiceWSDL,
'SaleService' => $this->saleServiceWSDL,
'SiteService' => $this->siteServiceWSDL,
'StaffService' => $this->staffServiceWSDL,
];
// set apiMethods array with available methods from Mindbody services
foreach ($this->apiServices as $serviceName => $serviceWSDL) {
$this->client = new \SoapClient($serviceWSDL, $this->soapOptions);
$this->apiMethods = array_merge(
$this->apiMethods,
[
$serviceName => array_map(
function ($n) {
$start = 1 + strpos($n, ' ');
$end = strpos($n, '(');
$length = $end - $start;
return substr($n, $start, $length);
},
$this->client->__getFunctions()
),
]
);
}
// set sourceCredentials
if (!empty($sourceCredentials)) {
if (!empty($sourceCredentials['SourceName'])) {
$this->sourceCredentials['SourceName'] = $sourceCredentials['SourceName'];
}
if (!empty($sourceCredentials['Password'])) {
$this->sourceCredentials['Password'] = $sourceCredentials['Password'];
}
if (!empty($sourceCredentials['SiteIDs'])) {
if (is_array($sourceCredentials['SiteIDs'])) {
$this->sourceCredentials['SiteIDs'] = $sourceCredentials['SiteIDs'];
} elseif (is_numeric($sourceCredentials['SiteIDs'])) {
$this->sourceCredentials['SiteIDs'] = [$sourceCredentials['SiteIDs']];
}
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function init() {\n\t\tstatic::$apis = [\n\t\t\t'content' => new Content_API(),\n\t\t\t'contributors' => new Contributors_API(),\n\t\t\t'dashboards' => new Dashboards_API(),\n\t\t\t'options' => new Options_API(),\n\t\t\t'post_types' => new Post_Types_API(),\n\t\t\t'quick_cards' => new Quick_Cards_API(),\n\t\t];\n\n\t\tadd_action( 'rest_api_init', [__CLASS__, 'register_rest_routes'] );\n\n\t}",
"protected function _initApi() {\n\t$this->bootstrap('Zend');\n\t$this->bootstrap('ApiRoutes');\n }",
"private function setup_api() {\n\t\trequire_once 'includes/class-themeisle-ob-rest-server.php';\n\t\tif ( ! class_exists( 'Themeisle_OB_Rest_Server' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$api = new Themeisle_OB_Rest_Server();\n\t\t$api->init();\n\t\trequire_once 'includes/importers/helpers/trait-themeisle-ob.php';\n\t}",
"public function init() {\n parent::init();\n if (!is_object($this->api)) {\n $class = $this->api;\n $this->api = new $class;\n }\n $this->loadPlugins();\n }",
"protected function init_api() {\n\t\tinclude_once dirname( __FILE__ ) . '/includes/class-coinbase-api-handler.php';\n\n\t\tCoinbase_API_Handler::$log = get_class( $this ) . '::log';\n\t\tCoinbase_API_Handler::$api_key = $this->get_option( 'api_key' );\n\t}",
"function rest_api_init()\n {\n }",
"function humcore_deposit_api_classes_init() {\n\n\tglobal $ezid_api, $fedora_api, $solr_client;\n\n\t// Create an ezid client instance.\n\trequire_once dirname( __FILE__ ) . '/ezid-api.php';\n\t$ezid_api = new Humcore_Deposit_Ezid_Api;\n\n\t// Create a fedora client instance.\n\trequire_once dirname( __FILE__ ) . '/fedora-api.php';\n\t$fedora_api = new Humcore_Deposit_Fedora_Api;\n\n\t// Create a solr client instance.\n\trequire_once dirname( __FILE__ ) . '/solr-api.php';\n\t$solr_client = new Humcore_Deposit_Solr_Api;\n\n}",
"public static function init() {\n if (self::$apiClient === null)\n self::$apiClient = new ApiClient();\n }",
"public function initialize() {\n\t\t$this->registerMethod(\"getSettings\");\n\t\t$this->registerMethod(\"setSettings\");\n\t\t$this->registerMethod(\"getShareList\");\n\t\t$this->registerMethod(\"getShare\");\n\t\t$this->registerMethod(\"setShare\");\n\t\t$this->registerMethod(\"deleteShare\");\n\t\t$this->registerMethod(\"getModBanRuleList\");\n\t\t$this->registerMethod(\"getModBanRule\");\n\t\t$this->registerMethod(\"setModBanRule\");\n\t\t$this->registerMethod(\"deleteModBanRule\");\n\t\t$this->registerMethod(\"getModTLSSettings\");\n\t\t$this->registerMethod(\"setModTLSSettings\");\n\t\t$this->registerMethod(\"getStats\");\n\t}",
"private function initializeServices()\n {\n $this->emailManager = $this->getService('mycp.service.email_manager');\n $this->translatorService = $this->getService('translator');\n $this->securityService = $this->getService('Secure');\n $this->router = $this->getService('router');\n }",
"private function loadAPIKeys() {\n $results = $this->interface->getAPIKeys();\n $this->APIKeys = [ ];\n\n foreach ($results as $row)\n $this->APIKeys[ $row[ 'service' ] ] = $row[ 'key' ];\n }",
"private function init() {\n $apiParts = $this->request->getApiParts();\n $this->requestedId = array_shift($apiParts);\n $this->apiParts = $apiParts;\n \n $this->siteDriver = Datastore::getSiteDriver();\n }",
"private function _initApiCommons()\n {\n // Disable debug information - Required to generate valid XML output\n //Configure::write('debug', 0);\n\n // Avoids render() call\n $this->disableLayout();\n $this->_helper->viewRenderer->setNoRender();\n\n // Instanciate Upload Module\n $this->uploadApi = new KwUploadAPI($this->apiSetup);\n }",
"public function initialize()\n\t{\n\t\t$this->registerMethod(\"getSettings\");\n\t\t$this->registerMethod(\"setSettings\");\n $this->registerMethod(\"getLdapContent\");\n $this->registerMethod(\"getToolSettings\");\n $this->registerMethod(\"setToolSettings\");\n $this->registerMethod(\"getRestoreSettings\");\n $this->registerMethod(\"uploadBackupFile\");\n $this->registerMethod(\"restoreLdapServer\");\n $this->registerMethod(\"getClearSettings\");\n $this->registerMethod(\"clearLdapServer\");\n\t}",
"public function serversInit()\n\t{\n\t\t$api_root=$this->getPath();\n\t\t$p=opendir($api_root);\n\t\twhile(false!==($d=readdir($p)))\n\t\t{\n\t\t\tif($d!='.' && $d!='..' && is_dir($api_root.'/'.$d))\n\t\t\t{\n\t\t\t\tif(file_exists($api_root.'/'.$d.'/init.php') && file_exists($api_root.'/'.$d.'/config.xml'))\n\t\t\t\t{\n\t\t\t\t\t$settings=@simplexml_load_file($api_root.'/'.$d.'/config.xml');\n\t\t\t\t\tif(!$settings){\n\t\t\t\t\t\t$this->setError('Not inited: '.$d.'; wrong config file.');\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}else{\n\t\t\t\t\t\t#die_r($settings->api->name);\n\t\t\t\t\t\t$this->registerEngine((String)$settings->api->name,$settings->api->protocols);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"private function init() {\n\n\t\tif ( ! $this->should_load() ) {\n\t\t\treturn;\n\t\t}\n\t\t$this->setup_admin();\n\t\t$this->setup_api();\n\t}",
"public function initialize() {\n\t\t$this->registerMethod(\"get\");\n\t\t$this->registerMethod(\"set\");\n\t\t$this->registerMethod(\"getScheduleList\");\n\t\t$this->registerMethod(\"getScheduledJob\");\n\t\t$this->registerMethod(\"setScheduledJob\");\n\t\t$this->registerMethod(\"deleteScheduledJob\");\n\t\t$this->registerMethod(\"executeScheduledJob\");\n\t}",
"private static function setArray() {\n\tself::$requests = explode(\"/\", self::$uri);\n if(self::$requests[0] == 'api') {\n array_shift(self::$requests);\n self::$api = True;\n }\n }",
"public function init_objects() {\n $this->controller_oai = new \\Tainacan\\OAIPMHExpose\\OAIPMH_Expose();\n $this->list_sets = new \\Tainacan\\OAIPMHExpose\\OAIPMH_List_Sets();\n $this->list_metadata_formats = new \\Tainacan\\OAIPMHExpose\\OAIPMH_List_Metadata_Formats();\n $this->list_records = new \\Tainacan\\OAIPMHExpose\\OAIPMH_List_Records();\n $this->get_record = new \\Tainacan\\OAIPMHExpose\\OAIPMH_Get_Record();\n $this->identify = new \\Tainacan\\OAIPMHExpose\\OAIPMH_Identify();\n $this->identifiers = new \\Tainacan\\OAIPMHExpose\\OAIPMH_List_Identifiers();\n }",
"protected function set_installed_apis() {\n\t\t/**\n\t\t * Filter to add active git servers.\n\t\t *\n\t\t * @since 10.0.0\n\t\t * @param array static::$git_servers Array of git servers.\n\t\t */\n\t\tstatic::$git_servers = \\apply_filters( 'gu_git_servers', static::$git_servers );\n\n\t\t/**\n\t\t * Filter to add installed APIs.\n\t\t *\n\t\t * @since 10.0.0\n\t\t * @param array static::$installed_apis Array of installed APIs.\n\t\t */\n\t\tstatic::$installed_apis = \\apply_filters( 'gu_installed_apis', static::$installed_apis );\n\t}",
"public function init_rest( $api_manager ) {\n\n\t\t\trequire_once $this->component_path( 'rest-api/add-relation.php' );\n\t\t\trequire_once $this->component_path( 'rest-api/edit-relation.php' );\n\t\t\trequire_once $this->component_path( 'rest-api/get-relation.php' );\n\t\t\trequire_once $this->component_path( 'rest-api/delete-relation.php' );\n\t\t\trequire_once $this->component_path( 'rest-api/get-relations.php' );\n\n\t\t\t$api_manager->register_endpoint( new Jet_Engine_CPT_Rest_Add_Relation() );\n\t\t\t$api_manager->register_endpoint( new Jet_Engine_CPT_Rest_Edit_Relation() );\n\t\t\t$api_manager->register_endpoint( new Jet_Engine_CPT_Rest_Get_Relation() );\n\t\t\t$api_manager->register_endpoint( new Jet_Engine_CPT_Rest_Delete_Relation() );\n\t\t\t$api_manager->register_endpoint( new Jet_Engine_CPT_Rest_Get_Relations() );\n\n\t\t}",
"public function __construct()\r\n {\r\n $this->constructApiUrl();\r\n }",
"public function set_up() {\n\n\t\t$this::base_set_up();\n\t\tdo_action( 'rest_api_init' );\n\t\t$this->server = rest_get_server();\n\n\t}",
"private function loadEndpoints() {\n $this->endpoints = array(\n '2020-08-06' => array(\n 'base_api_endpoint' => 'https://cloudapi.inflowinventory.com/',\n 'categories' => $this->companyID . '/categories/'\n )\n );\n }",
"public function __construct()\n {\n global $API_AUTHORIZATIONS;\n\n //Construct generic API handler\n parent::__construct();\n\n //Define authorizations for current API module\n $this->AUTH = $API_AUTHORIZATIONS[self::MODULE];\n }",
"protected function initialize()\n {\n if ($this->get('serverData') === null) {\n $this->set('serverData', (array) $_SERVER);\n }\n\n if ($this->get('getData') === null) {\n $this->set('getData', (array) $_GET);\n }\n\n if ($this->get('postData') === null) {\n $this->set('postData', (array) $_POST);\n }\n\n if ($this->get('sessionData') === null && isset($_SESSION)) {\n $this->set('sessionData', (array) $_SESSION);\n }\n\n $serverData = $this->get('serverData');\n\n if (!$this->get('projectRoot')) {\n $projectRoot = isset($serverData['_']) ? $serverData['_'] : $serverData['DOCUMENT_ROOT'];\n $this->set('projectRoot', $projectRoot);\n }\n\n if (!$this->get('url')) {\n if (isset($serverData['REDIRECT_URL'])) {\n $this->set('url', $serverData['REDIRECT_URL']);\n } elseif (isset($serverData['SCRIPT_NAME'])) {\n $this->set('url', $serverData['SCRIPT_NAME']);\n }\n }\n\n if (!$this->get('hostname')) {\n $this->set('hostname', isset($serverData['HTTP_HOST']) ? $serverData['HTTP_HOST'] : 'No Host');\n }\n\n $protocol = $this->get('secure') ? 'https' : 'http';\n $endPoint = $this->get('apiEndPoint') ?: $protocol . '://' . $this->get('host') . $this->get('resource');\n $this->set('apiEndPoint', $endPoint);\n }",
"function __initObjects() {\n\t\t$settings = $this->settings[$this->model->alias];\n\t\t$this->time = new TimeHelper();\n\t\t$this->solr = new Apache_Solr_Service($settings['host'], $settings['port'], $settings['path']);\n\t}",
"public function __construct(){\n\n\t\t//Store json_decode array in api1\n\t\t$api1 = ConfigURL::getURL(ApiList::$name);\n\t\t\n\t\t//Check if products are received, if true, store them in $_products, else get the error received from ConfigURL class\n\t\tif (isset($api1['products'])) {\n\t\t\t$this->_products = $api1['products'];\n\t\t}\n\t\telse{\n\t\t\t$this->_errors = ConfigURL::errors();\n\t\t}\n\t}",
"public function getApiService();",
"private function init()\n {\n if (!is_null($this->apiContext)) {\n return;\n }\n\n $this->apiContext = new ApiContext(\n new OAuthTokenCredential(\n $this->payPalCountryConfigurator->getPayPalId(),\n $this->payPalCountryConfigurator->getPayPalSecret()\n ),\n \\uniqid()\n );\n $this->apiContext->setConfig(\n array(\n 'mode' => (string)$this->payPalCountryConfigurator->getPayPalMode(),\n )\n );\n\n /**\n * При переполнении списка хранимых web-профилей\n * новые не создаются и страницы оплаты не локализуются\n */\n $this->cleanUpWebProfiles();\n }",
"public function init()\n {\n $this\n ->instantiateNewCacher()\n ->instantiateNewClient()\n ->authenticateClient()\n ->getUsers(\n $this->getAppParam('s.github.api.organization')\n )\n ->getRepositories(\n $this->getAppParam('s.github.api.organization')\n )\n ;\n }",
"public function init()\n {\n $this->curl = (new Curl())->setOption(\n CURLOPT_HTTPHEADER, [\n 'Authorization: Basic ' . $this->apiKey,\n 'Content-Type: application/json'\n ]\n );\n }",
"public function __construct()\n {\n $this->services = [];\n }",
"private function settings_api_init() {\r\n\t\tif ( ! isset( $this->hook_suffix ) )\r\n\t\t\treturn;\r\n\r\n\t\t// Infusion API settings\r\n\t\t$section = 'infusion-api';\r\n\t\tadd_settings_section(\r\n\t\t\t$section,\r\n\t\t\t__( 'Infusion API Settings', 'inf-member' ),\r\n\t\t\tarray( &$this, 'section_header' ),\r\n\t\t\t$this->hook_suffix\r\n\t\t);\r\n\r\n\t\tadd_settings_field(\r\n\t\t\t'inf_url',\r\n\t\t\t_x( 'Infusion API Service URL', 'inf-member' ),\r\n\t\t\tarray( &$this, 'display_inf_url' ),\r\n\t\t\t$this->hook_suffix,\r\n\t\t\t$section,\r\n\t\t\tarray( 'label_for' => 'inf_url' )\r\n\t\t);\r\n\t\tadd_settings_field(\r\n\t\t\t'inf_key',\r\n\t\t\t_x( 'Infusion API key', 'inf-member' ),\r\n\t\t\tarray( &$this, 'display_api_key' ),\r\n\t\t\t$this->hook_suffix,\r\n\t\t\t$section,\r\n\t\t\tarray( 'label_for' => 'inf_key' )\r\n\t\t);\r\n\r\n /*if(Inf_Member::app_credentials_exist())\r\n $this->db_install();*/\r\n\t}",
"private function prepare()\n {\n Debugger::setLogger(new DummyLogger());\n\n $container = new Container();\n $request = new Request(new UrlScript(), null, null, null, null, ['Origin' => 'http://example.org']);\n $response = new BufferResponse();\n $api = new Api($request, $response, $container);\n\n return [$api, $response, $container];\n }",
"public function rest_api_init_action() {\r\n \r\n register_rest_route('api-bearer-auth/v1', '/login', [\r\n 'methods' => 'POST',\r\n 'callback' => [$this, 'callback_login'],\r\n 'args' => [\r\n 'username' => [\r\n 'required' => true,\r\n ],\r\n 'password' => [\r\n 'required' => true,\r\n ],\r\n ]\r\n ]);\r\n \r\n register_rest_route('api-bearer-auth/v1', '/tokens/refresh', [\r\n 'methods' => 'POST',\r\n 'callback' => [$this, 'callback_refresh_token'],\r\n 'args' => [\r\n 'token' => [\r\n 'required' => true\r\n ]\r\n ]\r\n ]);\r\n \r\n }",
"public function __construct() {\n if (!$this->api) {\n $this->api = new Wrapper();\n }\n }",
"protected function init() {\n\t\t$routes = $this->routePluginManager;\n\t\tforeach ( array (\n\t\t\t\t'hostname' => __NAMESPACE__ . '\\Hostname',\n\t\t\t\t'literal' => __NAMESPACE__ . '\\Literal',\n\t\t\t\t'part' => __NAMESPACE__ . '\\Part',\n\t\t\t\t'regex' => __NAMESPACE__ . '\\Regex',\n\t\t\t\t'scheme' => __NAMESPACE__ . '\\Scheme',\n\t\t\t\t'segment' => __NAMESPACE__ . '\\Segment',\n\t\t\t\t'wildcard' => __NAMESPACE__ . '\\Wildcard',\n\t\t\t\t'query' => __NAMESPACE__ . '\\Query',\n\t\t\t\t'method' => __NAMESPACE__ . '\\Method' \n\t\t) as $name => $class ) {\n\t\t\t$routes->setInvokableClass ( $name, $class );\n\t\t}\n\t\t;\n\t}",
"public function init() {\n $registry = Zend_Registry::getInstance();\n\t $this->view->basePath = $registry->get('basepath'); \n\t $this->adm_listtabel_serv = adm_dds_service::getInstance();\n\t $this->adm_listdata_serv = adm_dds_service::getInstance();\n\t $this->adm_ntablesearch_serv = adm_dds_service::getInstance();\n\t $this->adm_tabeldtl_serv = adm_dds_service::getInstance();\n\t $this->adm_ndatasearch_serv = adm_dds_service::getInstance();\n\t $this->adm_datadtl_serv = adm_dds_service::getInstance();\n }",
"public static function parseApiCollection():array {\n\n # Declare result\n $result = [];\n\n # Open api config\n $api = Config::get(\"Api\");\n\n /* get methods */\n\n # Declare methods\n $methods = [];\n\n # Get methods allowed\n $methodsAllowed = Config::getValue(\"Router.methods\");\n\n # Get api prefix\n $apiPrefix = (string) Config::getValue(\"Router.prefix.api\");\n\n # Check\n if(!empty($methodsAllowed)){\n\n # Check methodsTemp is array\n $methodsTemp = !is_array($methodsAllowed) ?\n [$methodsAllowed] :\n $methodsAllowed;\n\n # Iteration of methods\n foreach($methodsTemp as $method)\n\n # Check method is valid\n if(strtoupper($method) && in_array(strtoupper($method), self::METHODS))\n\n # Push method\n $methods[] = strtoupper($method);\n \n }else{\n\n # Set methods\n $methods = self::METHODS;\n\n }\n\n /* Get methods | end */\n\n /* Prepare router */\n\n # Check api 2\n if(\n $api && \n isset($api[\"Api\"][\"v2\"]) && \n ($api[\"Api\"][\"v2\"][\"enable\"] ?? false) && \n !empty($api[\"Api\"][\"v2\"][\"routers\"] ?? [])\n ){\n\n # Get prefix\n $currentPrefix = rtrim($apiPrefix, \"/\") . \"/\" . $api[\"Api\"][\"v2\"][\"prefix\"] ?? \"\" ;\n\n # Iteration of app\n foreach($api[\"Api\"][\"v2\"][\"routers\"] as $apiRouter){\n\n # Get parse router result\n $router = self::parseRouter($apiRouter, $currentPrefix, $methods);\n\n # Check router\n if(!empty($router))\n\n # Iteration des router\n foreach($router as $childRouter)\n\n # Push router in result\n $result[\"api\"][] = $childRouter;\n\n }\n \n }\n\n # Return result\n return $result;\n\n }",
"public function initialiseComponentsAndServices()\n {\n $this->imager;\n $this->imageOptimize;\n $this->staticCache;\n $this->csrfInjection;\n $this->assetsPlatform;\n $this->cpAlerts;\n $this->redisDebug;\n $this->localDev;\n $this->feedMe;\n $this->blitz;\n }",
"public function init(){\n\n // Setup Application Environment\n if($this->environment != null && $this->client != null)\n $this->setupApplicationEnvironment();\n\n }",
"public static function init()\n {\n self::$browsers = new Browser_Manager();\n self::$users = new User_Manager();\n self::$routes = new Routing_Manager();\n self::$pages = new Page_Manager();\n self::$themes = new Theme_Manager();\n self::$debug = new Debug_Manager();\n\n // disable debugging if we are unit testing\n if (defined('UNIT_TEST') && UNIT_TEST)\n {\n self::$debug->setEnabled(false);\n }\n\n\t\t// with the general environment loaded, we can now load\n\t\t// the modules that are app-specific\n self::$request = new App_Request();\n self::$response = new App_Response();\n self::$conditions = new App_Conditions();\n }",
"public function initialize() {\n\t\t$this->registerMethod(\"getSettings\");\n\t\t$this->registerMethod(\"setSettings\");\n\t}",
"public static function registerCoreEndpoints() {\n\t\tif (\\UserConfig::$apiNamespace) {\n\t\t\tself::register(\\UserConfig::$apiNamespace, 'GET', new \\StartupAPI\\API\\v1\\User\\Get());\n\t\t\tself::register(\\UserConfig::$apiNamespace, 'GET', new \\StartupAPI\\API\\v1\\Accounts());\n\t\t}\n\t}",
"public function getApi();",
"public function getApi();",
"public function getApi();",
"public function getApis()\n {\n return Controllers\\ApisController::getInstance();\n }",
"private function _init_api_library($base_name)\n\t{\n\t\t// Generate the name of the class\n\t\t$class_name = $base_name.API_LIBRARY_SUFFIX;\n\n\t\t// Check if the implementing library exists\n\t\tif ( ! file($class_name.'.php'))\n\t\t{\n\t\t\tthrow new Exception('File not found',$class_name.'.php');\n\t\t}\n\n\t\t// Include the implementing API library file\n\t\trequire_once $class_name.'.php';\n\n\t\t// Temporary instance for type checking\n\t\t$temp_api_object = new $class_name($this);\n\n\t\t// Check if the implementing library is an instance of Api_Object\n\t\t// NOTE: All API libraries *MUST* be subclasses of Api_Object\n\t\tif ( ! $temp_api_object instanceof Api_Object)\n\t\t\tthrow new Exception('Invalid Api library', $class_name, 'Api_Object');\n\n\t\t// Discard the old copy\n\t\tunset($this->temp_api_object);\n\n\t\t// Instaniate a fresh copy of the API library\n\t\t$this->api_object = new $class_name($this);\n\n\t\t//print_r(get_class_methods($this->api_object));exit;\n\n\t}",
"public function rest_api_init() {\n register_rest_route('h5p/v1', '/post/(?P<id>\\d+)', array(\n 'methods' => 'GET',\n 'callback' => array($this, 'rest_api_post'),\n 'args' => array(\n 'id' => array(\n 'validate_callback' => function ($param, $request, $key) {\n return $param == intval($param);\n }\n ),\n ),\n 'permission_callback' => array($this, 'rest_api_permission')\n ));\n\n register_rest_route('h5p/v1', 'all', array(\n 'methods' => 'GET',\n 'callback' => array($this, 'rest_api_all'),\n 'permission_callback' => array($this, 'rest_api_permission')\n ));\n }",
"private function _setApiCallbacks($apiMethodPrefix)\n {\n $apiMethodPrefix = KwWebApiCore::checkApiMethodPrefix($apiMethodPrefix);\n\n $help = array();\n $help['params'] = array();\n $help['example'] = array();\n $help['return'] = 'String version';\n $help['description'] = 'Return the version of MIDAS';\n $this->helpContent[$apiMethodPrefix.'version'] = $help;\n $this->apicallbacks[$apiMethodPrefix.'version'] = array(&$this, 'version');\n\n $help = array();\n $help['params'] = array();\n $help['example'] = array();\n $help['return'] = 'MIDAS info';\n $help['description'] = 'Get information about this MIDAS instance';\n $this->helpContent[$apiMethodPrefix.'info'] = $help;\n $this->apicallbacks[$apiMethodPrefix.'info'] = array(&$this, 'info');\n\n $help = array();\n $help['params'] = array();\n $help['params']['appname'] = 'Application Name';\n $help['params']['email'] = 'E-mail of the user';\n $help['params']['password'] = '(Optional) Password of the user';\n $help['params']['apikey'] = '(Optional) Key of the user';\n $help['example'] = array();\n $help['example']['?method=midas.login&appname=test&[email protected]&password=YourPass'] = 'Authenticate using password';\n $help['example']['?method=midas.login&appname=test&[email protected]&apikey=YourKey'] = 'Authenticate using key';\n $help['return'] = 'Token';\n $help['description'] = 'Authenticate an user';\n $this->helpContent[$apiMethodPrefix.'login'] = $help;\n $this->apicallbacks[$apiMethodPrefix.'login'] = array(&$this, 'login');\n\n $help = array();\n $help['params'] = array();\n $help['params']['id'] = 'Element Id';\n $help['params']['type'] = 'Element Type: bitstream='.MIDAS_RESOURCE_BITSTREAM.', item='.MIDAS_RESOURCE_ITEM.', revision='.MIDAS_RESOURCE_REVISION.', folder='.MIDAS_RESOURCE_FOLDER.', community='.MIDAS_RESOURCE_COMMUNITY;\n $help['example'] = array();\n $help['return'] = 'Universal identifier';\n $help['description'] = 'Get uuid';\n $this->helpContent[$apiMethodPrefix.'uuid.get'] = $help;\n $this->apicallbacks[$apiMethodPrefix.'uuid.get'] = array(&$this, 'uuidGet');\n\n $help = array();\n $help['params'] = array();\n $help['params']['uuid'] = 'Universal identifier';\n $help['example'] = array();\n $help['return'] = 'Universal identifier (Dao)';\n $help['description'] = 'Get Universal identifier (contain resource id and type)';\n $this->helpContent[$apiMethodPrefix.'resource.get'] = $help;\n $this->apicallbacks[$apiMethodPrefix.'resource.get'] = array(&$this, 'resourceGet');\n\n $help = array();\n $help['params'] = array();\n $help['params']['token'] = '(Optional) Authentification token';\n $help['params']['search'] = 'Search Query';\n $help['params']['order'] = '(Optional) name or date or view. Default view';\n $help['example'] = array();\n $help['return'] = 'Array of resource)';\n $help['description'] = 'Global search';\n $this->helpContent[$apiMethodPrefix.'resource.search'] = $help;\n $this->apicallbacks[$apiMethodPrefix.'resource.search'] = array(&$this, 'resourcesSearch');\n\n $help = array();\n $help['params'] = array();\n $help['params']['uuid'] = 'Unique identifier of the resource';\n $help['example'] = array();\n $help['return'] = 'Array of resource';\n $help['description'] = 'Return the path to the root';\n $this->helpContent[$apiMethodPrefix.'path.to.root'] = $help;\n $this->apicallbacks[$apiMethodPrefix.'path.to.root'] = array(&$this, 'pathToRoot');\n\n $help = array();\n $help['params'] = array();\n $help['params']['uuid'] = 'Unique identifier of the resource';\n $help['example'] = array();\n $help['return'] = 'Array of resource';\n $help['description'] = 'Return the path from the root';\n $this->helpContent[$apiMethodPrefix.'path.from.root'] = $help;\n $this->apicallbacks[$apiMethodPrefix.'path.from.root'] = array(&$this, 'pathFromRoot');\n\n /* ----- Upload ------*/\n $help = array();\n $help['params'] = array();\n $help['example'] = array();\n $help['return'] = 'Token';\n $help['description'] = 'Generate an upload token';\n $this->helpContent[$apiMethodPrefix.'upload.generatetoken'] = $help;\n $this->apicallbacks[$apiMethodPrefix.'upload.generatetoken'] = array(&$this, 'uploadApiGenerateToken');\n\n $help = array();\n $help['params'] = array();\n $help['example'] = array();\n $help['return'] = '';\n $help['description'] = 'Get offset';\n $this->helpContent[$apiMethodPrefix.'upload.getoffset'] = $help;\n $this->apicallbacks[$apiMethodPrefix.'upload.getoffset'] = array(&$this, 'uploadApiGetOffset');\n\n $help = array();\n $help['params'] = array();\n $help['params']['token'] = 'Authentification token';\n $help['params']['mode'] = '(Optional) stream or multipart. Default: stream';\n $help['params']['folder_id'] = 'If set, will create a new item in the folder';\n $help['params']['item_id'] = 'If set, will create a new revision in the item';\n $help['params']['revision'] = 'If set, will create a new add files to a revision';\n $help['example'] = array();\n $help['return'] = 'Item information';\n $help['description'] = 'Upload a file (using put or post method)';\n $this->helpContent[$apiMethodPrefix.'upload.file'] = $help;\n $this->apicallbacks[$apiMethodPrefix.'upload.file'] = array(&$this, 'uploadFile');\n\n /* ----- Community ------*/\n $help = array();\n $help['params'] = array();\n $help['params']['token'] = '(Optional) Authentification token';\n $help['example'] = array();\n $help['return'] = 'List of communities';\n $help['description'] = 'Get the list of all communities visible to the given user';\n $this->helpContent[$apiMethodPrefix.'community.list'] = $help;\n $this->apicallbacks[$apiMethodPrefix.'community.list'] = array(&$this, 'communityList');\n\n $help = array();\n $help['params'] = array();\n $help['params']['token'] = 'Authentification token';\n $help['params']['name'] = '';\n $help['params']['description'] = '(Optional) Default \\'\\'';\n $help['params']['privacy'] = '(Optional) Default \\'Public\\'. '.MIDAS_COMMUNITY_PRIVATE.'= Private, '.MIDAS_COMMUNITY_PUBLIC.'= Public';\n $help['params']['canjoin'] = '(Optional) Default \\'Everyone\\'. '.MIDAS_COMMUNITY_INVITATION_ONLY.'= Invitation, '.MIDAS_COMMUNITY_CAN_JOIN.'= Everyone';\n $help['params']['uuid'] = '(Optional) Unique identifier. If set, will edit the community';\n $help['example'] = array();\n $help['return'] = 'Community Information';\n $help['description'] = 'Create or update a community';\n $this->helpContent[$apiMethodPrefix.'community.create'] = $help;\n $this->apicallbacks[$apiMethodPrefix.'community.create'] = array(&$this, 'communityCreate');\n\n $help = array();\n $help['params'] = array();\n $help['params']['token'] = '(Optional) Authentification token';\n $help['params']['id'] = 'Id of the community';\n $help['example'] = array();\n $help['return'] = 'Community Information';\n $help['description'] = 'Get a community';\n $this->helpContent[$apiMethodPrefix.'community.get'] = $help;\n $this->apicallbacks[$apiMethodPrefix.'community.get'] = array(&$this, 'communityGet');\n\n $help = array();\n $help['params'] = array();\n $help['params']['token'] = 'Authentification token';\n $help['params']['id'] = 'Id of the community';\n $help['example'] = array();\n $help['return'] = '';\n $help['description'] = 'Delete a community';\n $this->helpContent[$apiMethodPrefix.'community.delete'] = $help;\n $this->apicallbacks[$apiMethodPrefix.'community.delete'] = array(&$this, 'communityDelete');\n\n /* ----- Folder ------*/\n $help = array();\n $help['params'] = array();\n $help['params']['token'] = 'Authentification token';\n $help['params']['name'] = '';\n $help['params']['description'] = '';\n $help['params']['parentid'] = '(Optional during update) Id of the parent folder ';\n $help['params']['uuid'] = '(Optional) Unique identifier. If set, will edit the folder';\n $help['example'] = array();\n $help['return'] = 'Folder information';\n $help['description'] = 'Create or edit a folder';\n $this->helpContent[$apiMethodPrefix.'folder.create'] = $help;\n $this->apicallbacks[$apiMethodPrefix.'folder.create'] = array(&$this, 'folderCreate');\n\n $help = array();\n $help['params'] = array();\n $help['params']['token'] = 'Authentification token';\n $help['params']['id'] = 'Id of the folder';\n $help['example'] = array();\n $help['return'] = '';\n $help['description'] = 'Delete a folder';\n $this->helpContent[$apiMethodPrefix.'folder.delete'] = $help;\n $this->apicallbacks[$apiMethodPrefix.'folder.delete'] = array(&$this, 'folderDelete');\n\n $help = array();\n $help['params'] = array();\n $help['params']['token'] = '(Optional) Authentification token';\n $help['params']['id'] = 'Id of the folder';\n $help['example'] = array();\n $help['return'] = 'Folder Information';\n $help['description'] = 'Get a folder';\n $this->helpContent[$apiMethodPrefix.'folder.get'] = $help;\n $this->apicallbacks[$apiMethodPrefix.'folder.get'] = array(&$this, 'folderGet');\n\n $help = array();\n $help['params'] = array();\n $help['params']['token'] = '(Optional) Authentification token';\n $help['params']['id'] = 'Id of the folder';\n $help['example'] = array();\n $help['return'] = 'List of children';\n $help['description'] = 'Get all of the immediate children of a folder';\n $this->helpContent[$apiMethodPrefix.'folder.children'] = $help;\n $this->apicallbacks[$apiMethodPrefix.'folder.children'] = array(&$this, 'folderChildren');\n\n $help = array();\n $help['params'] = array();\n $help['params']['token'] = '(Optional) Authentification token';\n $help['params']['id'] = 'Id of the folder';\n $help['example'] = array();\n $help['return'] = 'File';\n $help['description'] = 'Download a folder';\n $this->helpContent[$apiMethodPrefix.'folder.download'] = $help;\n $this->apicallbacks[$apiMethodPrefix.'folder.download'] = array(&$this, 'folderDownload');\n\n $help = array();\n $help['params'] = array();\n $help['params']['token'] = '(Optional) Authentification token';\n $help['params']['id'] = 'Id of the folder';\n $help['example'] = array();\n $help['return'] = 'Array of Items and Folders';\n $help['description'] = 'Get folder content';\n $this->helpContent[$apiMethodPrefix.'folder.content'] = $help;\n $this->apicallbacks[$apiMethodPrefix.'folder.content'] = array(&$this, 'folderContent');\n\n $help = array();\n $help['params'] = array();\n $help['params']['token'] = '(Optional) Authentification token';\n $help['params']['id'] = 'Id of the folder';\n $help['example'] = array();\n $help['return'] = 'Array of Folders';\n $help['description'] = 'Get folder tree';\n $this->helpContent[$apiMethodPrefix.'folder.tree'] = $help;\n $this->apicallbacks[$apiMethodPrefix.'folder.tree'] = array(&$this, 'folderTree');\n\n /** ----- User -------------*/\n $help = array();\n $help['params'] = array();\n $help['params']['token'] = '(Optional) Authentification token';\n $help['example'] = array();\n $help['return'] = 'List of Folders';\n $help['description'] = 'Get the list of top level folders belonging to a given user';\n $this->helpContent[$apiMethodPrefix.'user.folders'] = $help;\n $this->apicallbacks[$apiMethodPrefix.'user.folders'] = array(&$this, 'userFolders');\n\n $help = array();\n $help['params'] = array();\n $help['params']['email'] = 'The user\\'s email';\n $help['params']['password'] = 'The user\\'s password';\n $help['example'] = array();\n $help['return'] = 'The user\\'s default API key';\n $help['description'] = 'Gets the user\\'s default API key. Only call this the first time a new password is used';\n $this->helpContent[$apiMethodPrefix.'user.apikey.default'] = $help;\n $this->apicallbacks[$apiMethodPrefix.'user.apikey.default'] = array(&$this, 'userApikeyDefault');\n\n /** ------ ITEM --- */\n $help = array();\n $help['params'] = array();\n $help['params']['token'] = '(Optional) Authentification token';\n $help['params']['id'] = 'Id of the item';\n $help['example'] = array();\n $help['return'] = 'Item Information';\n $help['description'] = 'Get an item information (contains its revisions information)';\n $this->helpContent[$apiMethodPrefix.'item.get'] = $help;\n $this->apicallbacks[$apiMethodPrefix.'item.get'] = array(&$this, 'itemGet');\n\n $help = array();\n $help['params'] = array();\n $help['params']['token'] = '(Optional) Authentification token';\n $help['params']['id'] = 'Id of the item';\n $help['params']['revision'] = '(Optional) If not set, will download last revision';\n $help['example'] = array();\n $help['return'] = 'File';\n $help['description'] = 'Download an item';\n $this->helpContent[$apiMethodPrefix.'item.download'] = $help;\n $this->apicallbacks[$apiMethodPrefix.'item.download'] = array(&$this, 'itemDownload');\n\n $help = array();\n $help['params'] = array();\n $help['params']['token'] = 'Authentification token';\n $help['params']['id'] = 'Id of the item';\n $help['example'] = array();\n $help['return'] = '';\n $help['description'] = 'Delete an item (an its bitstream)';\n $this->helpContent[$apiMethodPrefix.'item.delete'] = $help;\n $this->apicallbacks[$apiMethodPrefix.'item.delete'] = array(&$this, 'itemDelete');\n\n $help = array();\n $help['params'] = array();\n $help['params']['token'] = 'Authentification token';\n $help['params']['id'] = 'Id of the item';\n $help['params']['revision'] = '(Optional) Revision of the item';\n $help['example'] = array();\n $help['return'] = '';\n $help['description'] = 'Get metadata';\n $this->helpContent[$apiMethodPrefix.'item.getmetadata'] = $help;\n $this->apicallbacks[$apiMethodPrefix.'item.getmetadata'] = array(&$this, 'itemGetMetadata');\n\n // Extend web API to other modules via CALLBACK_API_METHODS\n $additionalMethods = Zend_Registry::get('notifier')->callback('CALLBACK_API_METHODS', array());\n foreach($additionalMethods as $module => $methods)\n {\n foreach($methods as $method)\n {\n $this->helpContent[$apiMethodPrefix.strtolower($module).'.'.$method['name']] = $method['help'];\n $this->apicallbacks[$apiMethodPrefix.strtolower($module).'.'.$method['name']] = array($method['callbackObject'], $method['callbackFunction']);\n }\n }\n }",
"private function _init_api_library($base_name)\n\t{\n\t\t// Generate the name of the class\n\t\t$class_name = $base_name.API_LIBRARY_SUFFIX;\n\n\t\t// Check if the implementing library exists\n\t\tif ( ! Kohana::find_file('libraries/api',\n\t\t\tKohana::config('config.extension_prefix').$class_name))\n\t\t{\n\t\t\tthrow new Kohana_Exception('libraries.api_library_not_found',\n\t\t\t\tKohana::config('config.extension_prefix').$class_name.'.php', $class_name);\n\t\t}\n\n\t\t// Include the implementing API library file\n\t\trequire_once Kohana::find_file('libraries/api', Kohana::config('config.extension_prefix').$class_name);\n\n\t\t// Temporary instance for type checking\n\t\t$temp_api_object = new $class_name($this);\n\n\t\t// Check if the implementing library is an instance of Api_Object_Core\n\t\t// NOTE: All API libraries *MUST* be subclasses of Api_Object_Core\n\t\tif ( ! $temp_api_object instanceof Api_Object_Core)\n\t\t\tthrow new Kohana_Exception('libraries.invalid_api_library', $class_name, 'Api_Object_Core');\n\n\t\t// Discard the old copy\n\t\tunset($this->temp_api_object);\n\n\t\t// Instaniate a fresh copy of the API library\n\t\t$this->api_object = new $class_name($this);\n\t}",
"public function apiList();",
"protected function _initialize(){\n\t\t// $service_token = md5(api_md5(red_panda) + md5(123456) + md5(timestamp)_api);\n\n\t\t// $this -> request = Request::instance();\n\t\t// // 判断传过来的时间戳是否超时\n\t\t// $this -> check_time($this->request->only(['time']));\n\t\t// // 验证token\n\t\t// $this -> check_token($this->request->param());\n\t}",
"public function initialize()\n {\n parent::initialize();\n\n // Constroi a resposta da API\n $this->response = new stdClass();\n $this->response->errorCode = 0;\n $this->response->errorMessage = '';\n $this->response->successMessage = '';\n $this->response->data = NULL;\n }",
"function init() {\n\t\t\tadd_filter( 'mv_custom_schema', array( $this, 'custom_tables' ) );\n\n\t\t\tself::$models = MV_DBI::get_models(\n\t\t\t\tarray(\n\t\t\t\t\t$this->table_name,\n\t\t\t\t)\n\t\t\t);\n\t\t\t$this->settings_api = new Settings_API();\n\n\t\t\tadd_action( 'rest_api_init', array( $this, 'routes' ) );\n\t\t}",
"public function init()\n {\n $this->client = new Client(['base_uri' => Covalent::$host.\"/\".Covalent::$version.\"/\", 'auth' => [Covalent::$config['API_KEY'], ''], 'verify' => false ]);\n }",
"public function initialize() {\n $this->setPaths(\n [\n 'namespace' => 'ReIndex\\Controller',\n 'controller' => 'footer'\n ]);\n\n $this->setHostname(Di::getDefault()['config']['application']['domainName']);\n\n $this->addGet('/tour/', ['action' => 'tour']);\n $this->addGet('/help/', ['action' => 'help']);\n $this->addGet('/legal/', ['action' => 'legal']);\n $this->addGet('/privacy/', ['action' => 'privacy']);\n $this->addGet('/careers/', ['action' => 'career']);\n $this->addGet('/advertising/', ['action' => 'advertising']);\n $this->addGet('/contacts/', ['action' => 'contact']);\n $this->addGet('/info/', ['action' => 'info']);\n }",
"public function setUp() {\n $this -> CI = &get_instance();\n $this -> flights = $this -> CI -> data['all_flights'];\n $this -> albatros = WackyAPI::getAlbatros();\n }",
"function onibus_endpoint_init() {\n\n\t$namespace = API_VERSAO;\n\n register_rest_route( $namespace, '/onibus/get-info-geral/',\n\n\t array(\n\t 'methods' \t=> 'GET',\n\t 'callback' \t=> 'get_informacoes_gerais_onibus',\n\t 'permission_callback' => function () {\n\t \treturn is_user_logged_in();\n\t }\n\t )\n\n );\n register_rest_route( $namespace, '/onibus/set-info-geral/',\n\n\t array(\n\t 'methods' \t=> 'POST',\n\t 'callback' \t=> 'set_informacoes_gerais_onibus',\n\t 'permission_callback' => function () {\n\t \treturn is_user_logged_in();\n\t }\n\t )\n\n );\n register_rest_route( $namespace, '/onibus/',\n\n\t array(\n\t 'methods' \t=> 'GET',\n\t 'callback' \t=> 'get_all_onibus',\n\t 'permission_callback' => function () {\n\t \treturn is_user_logged_in();\n\t }\n\t )\n\n );\n register_rest_route( $namespace, '/onibus/(?P<id>\\d+)',\n\n\t array(\n\t 'methods' \t=> 'GET',\n\t 'callback' \t=> 'get_onibus_by_id',\n\t 'permission_callback' => function () {\n\t \treturn is_user_logged_in();\n\t }\n\t )\n\n );\n register_rest_route( $namespace, '/onibus/create/',\n\n\t array(\n\t\t\t'methods' => 'POST',\n\t\t\t'callback' => 'adicionar_onibus',\n\t\t\t'permission_callback' => function () {\n\t\t\t \treturn is_user_logged_in();\n\t\t\t}\n\t\t)\n\n );\n register_rest_route( $namespace, '/onibus/update/',\n\n\t array(\n\t\t\t'methods' => 'POST',\n\t\t\t'callback' => 'editar_onibus',\n\t\t\t'permission_callback' => function () {\n\t\t\t \treturn is_user_logged_in();\n\t\t\t}\n\t\t)\n\n );\n register_rest_route( $namespace, '/onibus/delete/',\n\n\t array(\n\t\t\t'methods' => 'POST',\n\t\t\t'callback' => 'deletar_onibus',\n\t\t\t'permission_callback' => function () {\n\t\t\t \treturn is_user_logged_in();\n\t\t\t}\n\t\t)\n\n );\n\n}",
"public function init()\n\t{\n\t\tYii::import('application.vendors.Mailchimp.*'); //Required to set our include path so the required_once's everywhere work\n\t\trequire_once('MCAPI.class.php');\n\n\n\t\t$this->objModule = Modules::LoadByName(get_class($this)); //Load our module entry so we can access settings\n\t\t$this->api = new MCAPI($this->objModule->getConfig('api_key'));\n\n\t}",
"public function __construct(APIService $api)\n {\n $this->api = $api;\n }",
"public function __construct(APIService $api)\n {\n $this->api = $api;\n }",
"public function __construct(APIService $api)\n {\n $this->api = $api;\n }",
"public function __construct(APIService $api)\n {\n $this->api = $api;\n }",
"public function __construct(APIService $api)\n {\n $this->api = $api;\n }",
"public function __construct()\n\t{\n\t\t$this->_sys_path=$GLOBALS['path_to_site'].'/lib/core/api';\n\t}",
"public function __construct()\n {\n $CSO = new Api_Resources_CSO();\n $CSO->authenticate('timojong', 'FG4d%!k3hU');\n $this->addResource('CSO', $CSO);\n\n $OpenOnderwijs = new Api_Resources_OpenOnderwijs();\n $this->addResource('OpenOnderwijs', $OpenOnderwijs);\n }",
"protected function init()\n {\n $classParser = $this->getContainer()->get('classParser');\n $classParser->setAllowedMethods( array($this->allowedMethod) );\n $this->data = $classParser->getData($this->paths, $this->cacheFile);\n }",
"public function __construct()\n {\n $this->locationDAL = new LocationDAL();\n $this->locationAPI = new LocationAPI();\n $this->forecastDAL = new ForecastDAL();\n $this->forecastAPI = new ForecastAPI();\n }",
"public function init() {\n add_action( 'rest_api_init', array($this, 'register_route'));\n add_action( 'wp_enqueue_scripts', array($this, 'enqueue_script'));\n\t}",
"public function initialize()\n {\n $this->registerMethod(\"getSettings\");\n $this->registerMethod(\"setSettings\");\n }",
"public function init()\n\t{\n\t\tini_set( \"soap.wsdl_cache_enabled\", \"0\" );\n\t}",
"protected function init()\n {\n $config = $this->getConfig();\n $this->service = new \\Vimeo\\Vimeo(\n $config->vimeo->client_id, $config->vimeo->client_secret\n );\n\n $token = $this->service->clientCredentials();\n $this->service->setToken($token['body']['access_token']);\n }",
"function __construct()\n {\n if (AhpMethod::first() == null) {\n $ahp_method_service = new AhpMethodService();\n $ahp_method_service->recalculateAhpValues();\n }\n\n // Generate wp method values\n if (WpMethod::first() == null) {\n $wp_method_service = new WpMethodService();\n $wp_method_service->recalculateWpValues();\n }\n }",
"protected function initOptions()\n {\n $this->apiList = array_merge([\n //基础接口\n 'checkJsApi',//判断当前客户端是否支持指定JS接口\n\n //分享接口\n 'onMenuShareTimeline',//获取分享到朋友圈按钮点击状态及自定义分享内容\n 'onMenuShareAppMessage',//获取“分享给朋友”按钮点击状态及自定义分享内容接口\n 'onMenuShareQQ',//获取“分享到QQ”按钮点击状态及自定义分享内容接口\n 'onMenuShareWeibo',//获取“分享到腾讯微博”按钮点击状态及自定义分享内容接口\n 'onMenuShareQZone',//获取“分享到QZone”按钮点击状态及自定义分享内容接口\n\n //智能接口\n 'translateVoice',//识别音频并返回识别结果接口\n\n //音频接口\n 'startRecord',//开始录音接口\n 'stopRecord',//停止录音接口\n 'onVoiceRecordEnd',\n 'playVoice',//播放语音接口\n 'onVoicePlayEnd',\n 'pauseVoice',//暂停播放接口\n 'stopVoice',//停止播放接口\n 'uploadVoice',//上传语音接口\n 'downloadVoice',//下载语音接口\n\n //图像接口\n 'chooseImage',//拍照或从手机相册中选图接口\n 'previewImage',//预览图片接口\n 'uploadImage',//上传图片接口\n 'downloadImage',//下载图片接口\n\n //设备信息接口\n 'getNetworkType',//获取网络状态接口\n\n //地理位置接口\n 'openLocation',//使用微信内置地图查看位置接口\n 'getLocation', //获取地理位置接口\n\n //界面操作接口\n 'hideAllNonBaseMenuItem',//隐藏所有非基础按钮接口\n 'showAllNonBaseMenuItem',//显示所有功能按钮接口\n 'hideMenuItems',//隐藏右上角菜单接口\n 'showMenuItems',//显示右上角菜单接口\n 'hideOptionMenu',//批量隐藏功能按钮接口\n 'showOptionMenu',//批量显示功能按钮接口\n 'closeWindow', //关闭当前网页窗口接口\n\n //微信扫一扫\n 'scanQRCode',//调起微信扫一扫接口\n\n //微信支付接口\n 'chooseWXPay',//发起一个微信支付请求\n\n //微信小店接口\n 'openProductSpecificView',//跳转微信商品页接口\n //微信卡券接口\n 'addCard',//批量添加卡券接口\n 'chooseCard',//调起适用于门店的卡券列表并获取用户选择列表\n 'openCard'//查看微信卡包中的卡券接口\n ], $this->apiList);\n }",
"public function init()\n {\n require_once(__DIR__.'/controllers/AbstractAuthorizedApiController.php');\n }",
"function _initialize()\n {\n\n //initalize Loader\n $auto_load=array(\"io\",\"segment\",\"router\");\n \n foreach($auto_load as $library)\n {\n $this->$library=& load_class($library);\n }\n //load loader class\n $this->load =& load_class('Loader');\n \n //call auto load from config file\n $this->load->_auto_load();\n }",
"public function init() {\n $this->_helper->_acl->allow(\n array('fa', 'flos'), \n array('add', 'edit', 'delete', 'index')\n );\n $this->_helper->_acl->allow('admin', null);\n $this->_geocoder = new Pas_Service_Geo_Coder();\n $this->_events = new Events();\n \n }",
"public static function init() {\n\t\t\tself::initErrorHandler();\n\t\t\tself::loadAppConfig();\n\t\t\tself::initDatabase();\n\t\t\tHttpCore::initSession();\n\t\t\tAuth::init();\n\t\t\tself::$baseUrl = HttpCore::getBaseUrl();\n\t\t\tself::loadRoutes();\n\t\t\tself::loadWidgets();\n\t\t}",
"private function initHttp()\n {\n $this->di->mapService('core.http', '\\Core\\Http\\Http', [\n 'core.http.cookie',\n 'core.http.header'\n ]);\n $this->di->mapService('core.http.cookie', '\\Core\\Http\\Cookie\\CookieHandler');\n $this->di->mapService('core.http.header', '\\Core\\Http\\Header\\HeaderHandler');\n\n $this->http = $this->di->get('core.http');\n }",
"protected function init()\n {\n $this->urlParams = array();\n $this->methodArguments = array();\n $this->lang = self::LANG_POLISH;\n $this->basePath = $_SERVER['DOCUMENT_ROOT'].DIRECTORY_SEPARATOR.self::BASE_FOLDER.DIRECTORY_SEPARATOR;\n $this->loadConfig();\n }",
"public static function register_rest_routes() {\n\t\tforeach (static::$apis as $api) {\n\t\t\t$api->register_rest_route();\n\t\t}\n }",
"public function initialize()\n {\n parent::initialize();\n\n $this->loadComponent('RequestHandler');\n $this->loadComponent('Flash');\n $this->loadComponent('Auth', ['authenticate' =>\n ['ADmad/JwtAuth.Jwt' => [\n 'parameter' => 'token',\n 'userModel' => 'Sessions',\n 'fields' => [\n 'username' => 'username'\n ],\n 'scope' => ['Sessions.status' => 1],\n 'queryDatasource' => true\n ]\n ],'storage' => 'Memory',\n 'checkAuthIn' => 'Controller.initialize',\n 'loginAction' => false,\n 'unauthorizedRedirect' => false]);\n $this->loadComponent('Paginator');\n $this->loadComponent('BryanCrowe/ApiPagination.ApiPagination',[\n 'visible' => [\n 'page',\n 'current',\n 'count',\n 'perPage',\n 'prevPage',\n 'nextPage'\n ]\n ]);\n }",
"public function register_api_endpoints() {\n\n\t\tregister_rest_route( 'nock/v1', '/messages', array(\n\t\t\t'methods' => array( 'POST' ),\n\t\t\t'callback' => array( $this, 'send_message' ),\n\t\t) );\n\n\t\tregister_rest_route( 'nock/v1', '/accounts', array(\n\t\t\t'methods' => array( 'GET' ),\n\t\t\t'callback' => array( $this, 'get_accounts' ),\n\t\t) );\n\n\t\tregister_rest_route( 'nock/v1', '/groups', array(\n\t\t\t'methods' => array( 'GET' ),\n\t\t\t'callback' => array( $this, 'get_groups' ),\n\t\t) );\n\n\t\tregister_rest_route( 'nock/v1', '/sms', array(\n\t\t\t'methods' => array( 'GET', 'POST' ),\n\t\t\t'callback' => array( $this, 'capture_sms' ),\n\t\t) );\n\n\t}",
"function _init()\n {\n $this->_props['AppId'] = EBAY_NOTHING;\n $this->_props['DevId'] = EBAY_NOTHING;\n $this->_props['CertId'] = EBAY_NOTHING;\n $this->_props['RequestPassword'] = EBAY_NOTHING;\n $this->_props['RequestUser'] = EBAY_NOTHING;\n $this->_props['TimeOffset'] = EBAY_NOTHING;\n $this->_props['LogLevel'] = EBAY_NOTHING;\n $this->_props['LogFilename'] = EBAY_NOTHING;\n $this->_props['LogMode'] = 0;\n $this->_props['ApiMode'] = EBAY_NOTHING;\n $this->_props['SiteId'] = EBAY_NOTHING;\n $this->_props['CompatibilityLevel'] = EBAY_NOTHING;\n $this->_props['ErrorLevel'] = EBAY_NOTHING;\n $this->_props['ErrorLanguage'] = 0;\n $this->_props['RequestTimeout'] = EBAY_NOTHING;\n $this->_props['TokenMode'] = false;\n $this->_props['TokenPickupFile'] = EBAY_NOTHING;\n $this->_props['TokenUsePickupFile'] = false;\n $this->_props['ApiUrl'] = EBAY_NOTHING;\n $this->_props['AppMode'] = EBAY_NOTHING;\n $this->_props['PageSize'] = 200;\n $this->_props['ProxyServer'] = EBAY_NOTHING;\n $this->_props['ProxyUidPwd'] = EBAY_NOTHING;\n $this->_props['ProxyServerType'] = EBAY_NOTHING;\n $this->_props['UseHttpCompression'] = false;\n $this->_props['SerializeFolder'] = null;\n $this->_props['XmlEncoding'] = 0;\n $this->_props['DoXmlUtf8Decoding'] = false;\n $this->_props['DoXmlUtf8Encoding'] = false;\n $this->_props['RawLogMode'] = false;\n $this->_props['RawLogPath'] = EBAY_NOTHING;\n $this->_props['RawLogSeq'] = 1;\n $this->_props['RawLogName'] = EBAY_NOTHING;\n }",
"public function init()\n {\n\n $this->addWPConfigs();\n $this->addSPLConfigs();\n $this->addControllerConfigs();\n $this->addFieldGroupConfigs();\n $this->addFieldConfigs();\n $this->addImageSizeConfigs();\n $this->addLayoutConfigs();\n $this->addModelConfigs();\n $this->addPostTypeConfigs();\n $this->addTaxonomyConfigs();\n $this->addTemplateFunctionConfigs();\n $this->addHookableConfigs();\n $this->addSearchConfigs();\n $this->addBaseThemeConfigs();\n\n }",
"protected function _init()\n\t{\n\t\t// inicializando controladores auxiliares\n\t\t$this->_initControllers();\n\t\t\n\t\treturn;\n\t}",
"public function manually_load_api() {\n\t\tif ( ! class_exists( 'WP_JSON_Server' ) ) {\n\t\t\tadd_filter( 'json_url', 'set_url_scheme' );\n\n\t\t\trequire( dirname( __FILE__ ) . '/../vendor/wp-api/wp-api/plugin.php' );\n\n\t\t\tadd_action( 'wp_json_server_before_serve', array( $this, 'api_init' ) );\n\t\t}\n\t}",
"public function init() {\n #Get bootstrap object.\n $bootstrap = $this->getInvokeArg('bootstrap');\n #Get Logger\n $this->log = $bootstrap->getResource('Log');\n #Get Doctrine Entity Manager\n $this->em = $bootstrap->getContainer()->get('entity.manager');\n #Get config\n $this->config = $bootstrap->getContainer()->get('config');\n\n #Init REST Server\n $this->_server = new Server($this->getRequest());\n $aliases = array(\n 'resources' \t=> self::RESOURCES,\n 'variations' \t=> self::VARIATIONS,\n 'galleries' \t=> self::GALLERIES,\n 'pages' \t\t=> self::PAGES,\n 'menuitems' => self::MenuItems,\n 'templates' \t=> self::TEMPLATES,\n 'tvars' \t\t=> self::TVARS,\n 'tvarconts' \t=> self::TVARCONTENTS,\n 'users' \t\t=> self::USERS,\n 'blog' \t\t=> self::BLOGITEMS,\n 'discounts' \t=> self::DISCOUNTS,\n 'vcard' \t\t=> self::HCARDS,\n 'categories' \t=> self::CATEGORIES,\n 'tags' \t\t=> self::TAGS,\n 'settings' \t\t=> self::SETTINGS,\n 'addresses' \t=> self::ADDRESSES,\n 'metadata' \t\t=> self::METADATA,\n 'homepageitems' => self::HOMEPAGEITEMS,\n 'homepage' \t\t=> self::HOMEPAGE,\n 'brands'\t\t=> self::BRANDS,\n 'products'\t\t=> self::PRODUCTS,\n 'looks'\t\t\t=> self::LOOKS,\n 'grids'\t\t\t=> self::GRIDS,\n 'acluserroles'\t=> self::ACLUSERROLES,\n 'collections' => self::COLLECTIONS,\n );\n $actions = array(\n 'auth' => self::AUTH,\n 'mediabrowser' => self::MEDIABROWSER,\n 'mediavariations' => self::MEDIA_VARIATIONS,\n 'search' => self::SEARCH,\n 'videos' => self::RESOURCES_VIDEOS\n );\n $this->_server->setAliases($aliases);\n $this->_server->setActions($actions);\n $this->method = $this->_server->getResponseActionName();\n $this->_repo = $this->_server->execute();\n\n #Enable Context Switching\n $contextSwitch = $this->_helper->getHelper('contextSwitch');\n $contextSwitch\n ->addActionContext('index', array('xml', 'json'))\n ->addActionContext('get', array('xml', 'json'))\n ->addActionContext('put', array('xml', 'json'))\n ->addActionContext('post', array('xml', 'json'))\n ->addActionContext('delete', array('xml', 'json'))\n ->addActionContext('head', array('xml', 'json'))\n ->addActionContext('option', array('xml', 'json'))\n ->setAutoJsonSerialization(true)\n ->initContext();\n #disable view rendering\n //$this->_helper->viewRenderer->setNeverRender(true);\n $this->_helper->viewRenderer->setNoRender(true);\n $this->_helper->layout->disableLayout();\n #Set Action Name for Request.\n if ($this->_server->getActionType() == 'action') {\n $this->method = 'method';\n }\n #Authentication\n// $this->_server->setPassword($password)->setUsername($username);\n #Security Options ::\n #Get Acl Object\n #TODO Set auth request inside server to allow you to use auth\n #Get Zend Auth.\n// $this->auth = Zend_Auth::getInstance();\n// if(!$this->auth->hasIdentity()) {\n// $this->_redirect('/admin/auth/login/');\n// }\n $this->getRequest()->setActionName($this->method);\n $this->view->response = \"\";\n $this->log->info(get_class($this) . '::init(' . $this->method . ')');\n #Allow xml to use view rendering.\n if ($this->getRequest()->getParam('format') == 'xml') {\n $this->_helper->viewRenderer->setNoRender(false);\n }\n// #TODO Find a way to allow entity to decide how it should interact with REST?\n// $reader = new AnnotationReader();\n// $reflClass = new \\ReflectionClass($this->_server->getActiveNamespace());\n// $classAnnotations = $reader->getClassAnnotations($reflClass);\n// $reflProperties = $reflClass->getProperties();\n// $mappedConstants = $reflClass->getConstants();\n// $this->log->info($classAnnotations);\n// foreach($reflProperties as $property) {\n// $reflProperties = new \\ReflectionProperty($property->class, $property->name);\n// $annotations = $reader->getPropertyAnnotations($reflProperties);\n// $this->log->info($property);\n// $this->log->info($annotations);\n// }\n// $this->log->info(\"EO Props\");\n\n $this->messageQueue = $this->_helper->getHelper('FlashMessenger');\n $this->view->messages = $this->messageQueue->getMessages();\n\n $frontendOptions = array(\n 'lifetime' => self::CACHE_LIFETIME, // cache lifetime of 2 hours\n 'automatic_serialization' => true\n );\n\n $backendOptions = array(\n 'cache_dir' => WEB_PATH . self::CACHE_DIR // Directory where to put the cache files\n );\n\n // getting a Zend_Cache_Core object\n $this->cache = \\Zend_Cache::factory('Core',\n 'File',\n $frontendOptions,\n $backendOptions);\n }",
"public function init()\n {\n $this->_service = new App_Services_User();\n }",
"public function init()\n {\n $this->tickometer = new Tickometer();\n\n $this->timer = new Timer();\n\n $this->last = time();\n\n // initialize http client\n $this->client = new Client([\n 'timeout' => 5.0,\n 'headers' => [\n 'Referer' => 'https://fucking-great-advice.ru/',\n 'Accept' => 'application/json',\n 'User-Agent' => 'Mozilla/5.0 (X11; Linux x86_64; rv:94.0) Gecko/20100101 Firefox/94.0',\n ],\n ]);\n\n // request information about tags\n try\n {\n $response = $this->client->get(self::TAGS_ENDPOINT);\n $body = json_decode($response->getBody(),true);\n foreach ($body['data'] as $item)\n {\n $this->tags[$item['alias']] = \"{$item['title']}, {$item['advicesCount']} advices\";\n }\n } catch (ConnectException $exception){\n /** nothing to do */\n }\n\n }",
"public function __construct() {\n\t\tadd_action( 'rest_api_init', array( $this, 'register_rest_routes' ) );\n\t}",
"private function include_rest_api() {\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/rest-api/class-wpcd-rest-api-controller-base.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/rest-api/class-wpcd-rest-api-controller-servers.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/rest-api/class-wpcd-rest-api-controller-sites.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/rest-api/class-wpcd-rest-api-controller-tasks.php';\n\n\t\t/**\n\t\t * Need to add new REST API controllers from an add-on?\n\t\t * Then this action hook MUST be used! Otherwise, weird\n\t\t * stuff will happen and you will not know why!\n\t\t *\n\t\t * Third parties that need to add a plugin to extend\n\t\t * the rest api by adding new controllers should\n\t\t * ensure that the filter a few lines above is used\n\t\t * to add the new controller to the array so that\n\t\t * they can be instantiated.\n\t\t */\n\t\tdo_action( 'wpcd_wpapp_include_rest_api' );\n\n\t\t// List of controllers to instantiate.\n\t\t// This list should be added to by other plugins adding their own rest api controllers.\n\t\t$controllers = apply_filters(\n\t\t\t\"wpcd_app_{$this->get_app_name()}_rest_api_controller_list\",\n\t\t\tarray(\n\t\t\t\tWPCD_REST_API_Controller_Servers::class,\n\t\t\t\tWPCD_REST_API_Controller_Sites::class,\n\t\t\t\tWPCD_REST_API_Controller_Tasks::class,\n\t\t\t)\n\t\t);\n\n\t\t// Loop through list and instantiate.\n\t\tforeach ( $controllers as $controller_class ) {\n\t\t\t$controller = new $controller_class();\n\t\t\t$this->rest_controllers[ $controller->get_name() ] = $controller;\n\t\t}\n\n\t}",
"function rest_api_loaded()\n {\n }",
"public function init()\r\n {\r\n $this->admin = Shopware()->Modules()->Admin();\r\n $this->basket = Shopware()->Modules()->Basket();\r\n $this->session = Shopware()->Session();\r\n $this->db = Shopware()->Db();\r\n $this->moduleManager = Shopware()->Modules();\r\n $this->eventManager = Shopware()->Events();\r\n }",
"protected function initialize() {\n \n parent::initialize();\n \n //\n // Disable the PHP WSDL caching feature. \n //\n ini_set(\"soap.wsdl_cache_enabled\", 0);\n ini_set('soap.wsdl_cache_ttl', 0);\n }",
"public function __construct()\n {\n parent::__construct();\n $this->client = new APIClient();\n }",
"public function __construct(apiClient $apiClient) {\n $this->rpcPath = '/rpc';\n $this->restBasePath = '/open';\n $this->version = '1.0';\n $this->serviceName = 'bestsellingbooksapi';\n $this->io = $apiClient->getIo();\n\n $apiClient->addService($this->serviceName, $this->version);\n $this->BestSellingBooksMethods = new BestSellingBooksMethodsServiceResource($this, $this->serviceName, 'BestSellingBooksMethods', json_decode('{\"methods\": {\"BestSellingBookListsForParticularYear\": {\"parameters\": {\"year\": {\"default\": \"2011\", \"required\": false, \"type\": \"string\", \"location\": \"path\"}, \"encoding\": {\"required\": false, \"default\": \"json\", \"enum\": [\"json\", \"xml\"], \"location\": \"query\", \"type\": \"string\"}}, \"response\": {\"$ref\": \"booksByDateResponse\"}, \"httpMethod\": \"GET\", \"path\": \"bestsellers/books/dates/{year}\", \"id\": \"BestSellingBooksMethods.BestSellingBookListsForParticularYear\"}, \"Top150BooksForParticularYearAndMonth\": {\"parameters\": {\"count\": {\"default\": \"\", \"required\": false, \"type\": \"string\", \"location\": \"query\"}, \"author\": {\"default\": \"\", \"required\": false, \"type\": \"string\", \"location\": \"query\"}, \"encoding\": {\"required\": false, \"default\": \"json\", \"enum\": [\"json\", \"xml\"], \"location\": \"query\", \"type\": \"string\"}, \"month\": {\"default\": \"8\", \"required\": true, \"type\": \"string\", \"location\": \"path\"}, \"year\": {\"default\": \"2011\", \"required\": true, \"type\": \"string\", \"location\": \"path\"}, \"title\": {\"default\": \"\", \"required\": false, \"type\": \"string\", \"location\": \"query\"}, \"class\": {\"default\": \"\", \"required\": false, \"type\": \"string\", \"location\": \"query\"}}, \"response\": {\"$ref\": \"booksListResponse\"}, \"httpMethod\": \"GET\", \"path\": \"bestsellers/books/booklists/{year}/{month}\", \"id\": \"BestSellingBooksMethods.Top150BooksForParticularYearAndMonth\"}, \"AllBestSellingBookListsPublishedSince1993\": {\"parameters\": {\"minyear\": {\"default\": \"\", \"required\": false, \"type\": \"string\", \"location\": \"query\"}, \"maxyear\": {\"default\": \"\", \"required\": false, \"type\": \"string\", \"location\": \"query\"}, \"encoding\": {\"required\": false, \"default\": \"json\", \"enum\": [\"json\", \"xml\"], \"location\": \"query\", \"type\": \"string\"}}, \"response\": {\"$ref\": \"booksByDateResponse\"}, \"httpMethod\": \"GET\", \"path\": \"bestsellers/books/dates\", \"id\": \"BestSellingBooksMethods.AllBestSellingBookListsPublishedSince1993\"}, \"SearchbyTitle\": {\"parameters\": {\"category\": {\"default\": \"\", \"required\": false, \"type\": \"string\", \"location\": \"query\"}, \"author\": {\"default\": \"\", \"required\": false, \"type\": \"string\", \"location\": \"query\"}, \"maxyear\": {\"default\": \"\", \"required\": false, \"type\": \"string\", \"location\": \"query\"}, \"title\": {\"default\": \"Steve Jobs\", \"required\": false, \"type\": \"string\", \"location\": \"query\"}, \"encoding\": {\"required\": false, \"default\": \"json\", \"enum\": [\"json\", \"xml\"], \"location\": \"query\", \"type\": \"string\"}, \"year\": {\"default\": \"\", \"required\": false, \"type\": \"string\", \"location\": \"query\"}, \"minyear\": {\"default\": \"\", \"required\": false, \"type\": \"string\", \"location\": \"query\"}, \"class\": {\"default\": \"\", \"required\": false, \"type\": \"string\", \"location\": \"query\"}}, \"response\": {\"$ref\": \"titlesResponse\"}, \"httpMethod\": \"GET\", \"path\": \"bestsellers/books/titles/\", \"id\": \"BestSellingBooksMethods.SearchbyTitle\"}, \"Top150BooksForParticularYear\": {\"parameters\": {\"category\": {\"default\": \"\", \"required\": false, \"type\": \"string\", \"location\": \"query\"}, \"count\": {\"default\": \"\", \"required\": false, \"type\": \"string\", \"location\": \"query\"}, \"author\": {\"default\": \"\", \"required\": false, \"type\": \"string\", \"location\": \"query\"}, \"encoding\": {\"required\": false, \"default\": \"json\", \"enum\": [\"json\", \"xml\"], \"location\": \"query\", \"type\": \"string\"}, \"year\": {\"default\": \"2011\", \"required\": true, \"type\": \"string\", \"location\": \"path\"}, \"title\": {\"default\": \"\", \"required\": false, \"type\": \"string\", \"location\": \"query\"}, \"class\": {\"default\": \"\", \"required\": false, \"type\": \"string\", \"location\": \"query\"}}, \"response\": {\"$ref\": \"booksListResponse\"}, \"httpMethod\": \"GET\", \"path\": \"bestsellers/books/booklists/{year}\", \"id\": \"BestSellingBooksMethods.Top150BooksForParticularYear\"}, \"Classes\": {\"parameters\": {\"category\": {\"default\": \"\", \"required\": false, \"type\": \"string\", \"location\": \"query\"}, \"maxyear\": {\"default\": \"\", \"required\": false, \"type\": \"string\", \"location\": \"query\"}, \"author\": {\"default\": \"\", \"required\": false, \"type\": \"string\", \"location\": \"query\"}, \"encoding\": {\"required\": false, \"default\": \"json\", \"enum\": [\"json\", \"xml\"], \"location\": \"query\", \"type\": \"string\"}, \"year\": {\"default\": \"\", \"required\": false, \"type\": \"string\", \"location\": \"query\"}, \"minyear\": {\"default\": \"\", \"required\": false, \"type\": \"string\", \"location\": \"query\"}, \"title\": {\"default\": \"\", \"required\": false, \"type\": \"string\", \"location\": \"query\"}}, \"response\": {\"$ref\": \"classesResponse\"}, \"httpMethod\": \"GET\", \"path\": \"bestsellers/books/classes\", \"id\": \"BestSellingBooksMethods.Classes\"}, \"Top150BooksForParticularDate\": {\"parameters\": {\"count\": {\"default\": \"\", \"required\": false, \"type\": \"string\", \"location\": \"query\"}, \"author\": {\"default\": \"\", \"required\": false, \"type\": \"string\", \"location\": \"query\"}, \"encoding\": {\"required\": false, \"default\": \"json\", \"enum\": [\"json\", \"xml\"], \"location\": \"query\", \"type\": \"string\"}, \"month\": {\"default\": \"8\", \"required\": true, \"type\": \"string\", \"location\": \"path\"}, \"year\": {\"default\": \"2011\", \"required\": true, \"type\": \"string\", \"location\": \"path\"}, \"date\": {\"default\": \"4\", \"required\": true, \"type\": \"string\", \"location\": \"path\"}, \"title\": {\"default\": \"\", \"required\": false, \"type\": \"string\", \"location\": \"query\"}, \"class\": {\"default\": \"\", \"required\": false, \"type\": \"string\", \"location\": \"query\"}}, \"response\": {\"$ref\": \"booksListResponse\"}, \"httpMethod\": \"GET\", \"path\": \"bestsellers/books/booklists/{year}/{month}/{date}\", \"id\": \"BestSellingBooksMethods.Top150BooksForParticularDate\"}, \"Top150BooksMostRecent\": {\"parameters\": {\"category\": {\"default\": \"\", \"required\": false, \"type\": \"string\", \"location\": \"query\"}, \"count\": {\"default\": \"\", \"required\": false, \"type\": \"string\", \"location\": \"query\"}, \"maxyear\": {\"default\": \"\", \"required\": false, \"type\": \"string\", \"location\": \"query\"}, \"author\": {\"default\": \"\", \"required\": false, \"type\": \"string\", \"location\": \"query\"}, \"title\": {\"default\": \"\", \"required\": false, \"type\": \"string\", \"location\": \"query\"}, \"month\": {\"default\": \"\", \"required\": false, \"type\": \"string\", \"location\": \"query\"}, \"encoding\": {\"required\": false, \"default\": \"json\", \"enum\": [\"json\", \"xml\"], \"location\": \"query\", \"type\": \"string\"}, \"date\": {\"default\": \"\", \"required\": false, \"type\": \"string\", \"location\": \"query\"}, \"year\": {\"default\": \"\", \"required\": false, \"type\": \"string\", \"location\": \"query\"}, \"minyear\": {\"default\": \"\", \"required\": false, \"type\": \"string\", \"location\": \"query\"}, \"class\": {\"default\": \"\", \"required\": false, \"type\": \"string\", \"location\": \"query\"}}, \"response\": {\"$ref\": \"booksListResponse\"}, \"httpMethod\": \"GET\", \"path\": \"bestsellers/books/booklists\", \"id\": \"BestSellingBooksMethods.Top150BooksMostRecent\"}, \"SearchbyISBN\": {\"parameters\": {\"category\": {\"default\": \"\", \"required\": false, \"type\": \"string\", \"location\": \"query\"}, \"isbn\": {\"default\": \"9781451648539\", \"required\": true, \"type\": \"string\", \"location\": \"path\"}, \"maxyear\": {\"default\": \"\", \"required\": false, \"type\": \"string\", \"location\": \"query\"}, \"encoding\": {\"required\": false, \"default\": \"json\", \"enum\": [\"json\", \"xml\"], \"location\": \"query\", \"type\": \"string\"}, \"author\": {\"default\": \"\", \"required\": false, \"type\": \"string\", \"location\": \"query\"}, \"year\": {\"default\": \"\", \"required\": false, \"type\": \"string\", \"location\": \"query\"}, \"minyear\": {\"default\": \"\", \"required\": false, \"type\": \"string\", \"location\": \"query\"}, \"class\": {\"default\": \"\", \"required\": false, \"type\": \"string\", \"location\": \"query\"}}, \"response\": {\"$ref\": \"isbnResponse\"}, \"httpMethod\": \"GET\", \"path\": \"bestsellers/books/titles/{isbn}\", \"id\": \"BestSellingBooksMethods.SearchbyISBN\"}, \"BestSellingBookListsForParticularYearAndMonth\": {\"parameters\": {\"month\": {\"default\": \"8\", \"required\": false, \"type\": \"string\", \"location\": \"path\"}, \"year\": {\"default\": \"2011\", \"required\": false, \"type\": \"string\", \"location\": \"path\"}, \"encoding\": {\"required\": false, \"default\": \"json\", \"enum\": [\"json\", \"xml\"], \"location\": \"query\", \"type\": \"string\"}}, \"response\": {\"$ref\": \"booksListResponse\"}, \"httpMethod\": \"GET\", \"path\": \"bestsellers/books/{year}/{month}\", \"id\": \"BestSellingBooksMethods.BestSellingBookListsForParticularYearAndMonth\"}, \"Categories\": {\"parameters\": {\"maxyear\": {\"default\": \"\", \"required\": false, \"type\": \"string\", \"location\": \"query\"}, \"encoding\": {\"required\": false, \"default\": \"json\", \"enum\": [\"json\", \"xml\"], \"location\": \"query\", \"type\": \"string\"}, \"author\": {\"default\": \"\", \"required\": false, \"type\": \"string\", \"location\": \"query\"}, \"year\": {\"default\": \"\", \"required\": false, \"type\": \"string\", \"location\": \"query\"}, \"minyear\": {\"default\": \"\", \"required\": false, \"type\": \"string\", \"location\": \"query\"}, \"title\": {\"default\": \"\", \"required\": false, \"type\": \"string\", \"location\": \"query\"}, \"class\": {\"default\": \"\", \"required\": false, \"type\": \"string\", \"location\": \"query\"}}, \"response\": {\"$ref\": \"categoriesResponse\"}, \"httpMethod\": \"GET\", \"path\": \"bestsellers/books/categories\", \"id\": \"BestSellingBooksMethods.Categories\"}}}', true));\n }",
"public function init()\n\t{\n\t\t$this->serversInit();\n\t}"
]
| [
"0.7875253",
"0.74452055",
"0.692704",
"0.6900132",
"0.68656343",
"0.6824317",
"0.6823244",
"0.68144286",
"0.6649005",
"0.6639843",
"0.66271824",
"0.66266155",
"0.66243863",
"0.6589318",
"0.6543234",
"0.65255255",
"0.6492238",
"0.645609",
"0.64020425",
"0.64002913",
"0.63709205",
"0.6351013",
"0.63354576",
"0.6298175",
"0.6295155",
"0.6209768",
"0.62044",
"0.6203914",
"0.6197133",
"0.6189317",
"0.6174148",
"0.61680585",
"0.616507",
"0.61612016",
"0.614829",
"0.6144167",
"0.6132162",
"0.61239797",
"0.6119486",
"0.60990983",
"0.6093215",
"0.6078766",
"0.60778254",
"0.6076876",
"0.6071232",
"0.60671926",
"0.60671926",
"0.60671926",
"0.60623133",
"0.60553277",
"0.604313",
"0.6029123",
"0.60285753",
"0.60189736",
"0.6015106",
"0.6014131",
"0.60138947",
"0.6013875",
"0.5998804",
"0.59982884",
"0.5996843",
"0.5995434",
"0.5995071",
"0.5995071",
"0.5995071",
"0.5995071",
"0.5995071",
"0.5981006",
"0.5971104",
"0.5969364",
"0.596747",
"0.59659505",
"0.5959553",
"0.59570736",
"0.59456646",
"0.59367645",
"0.5936069",
"0.5934204",
"0.59338117",
"0.5923793",
"0.59231484",
"0.5921007",
"0.5911525",
"0.59092426",
"0.590711",
"0.59015286",
"0.59014183",
"0.5894454",
"0.58878106",
"0.58862823",
"0.58800644",
"0.5877062",
"0.5874734",
"0.5867782",
"0.5865367",
"0.5861213",
"0.58584344",
"0.585595",
"0.5853384",
"0.5846395",
"0.5843514"
]
| 0.0 | -1 |
Lists all HarvestPlant models. | public function actionIndex()
{
$harvestPlantReportSearch = new HarvestPlantReportSearch();
$harvestPlantReportSearch->yearStart = date('Y');
$harvestPlantReportSearch->yearEnd = $harvestPlantReportSearch->yearStart;
$harvestPlantReportSearch->quarterStart = 1;
if(date('m')>=9){
$harvestPlantReportSearch->quarterEnd = 4;
}
else if(date('m')>=6){
$harvestPlantReportSearch->quarterEnd = 3;
}
else if(date('m')>=3){
$harvestPlantReportSearch->quarterEnd = 2;
}
else{
$harvestPlantReportSearch->quarterEnd = 1;
}
$typePlants = TypePlant::find()->all();
$stateCount = State::find()->count();
$years = [];
$quarters = [];
$states = State::find()->select('name')->column();
$typePlants2 = TypePlant::find()->select('name')->column();
$stateIds = [];
if ($harvestPlantReportSearch->load(Yii::$app->request->post())) {
$stateIds = $harvestPlantReportSearch->stateIds;
if(!empty($stateIds)){
$stateCount = State::find()
->where(['id'=>$stateIds])
->count();
$states = State::find()
->select('name')
->where(['id'=>$stateIds])
->column();
}
$typePlantIds = $harvestPlantReportSearch->typePlantIds;
if(!empty($typePlantIds)){
$typePlants = TypePlant::find()
->where(['id'=>$typePlantIds])
->all();
$typePlants2 = TypePlant::find()
->select('name')
->where(['id'=>$typePlantIds])
->column();
}
$yearStart = $harvestPlantReportSearch->yearStart;
$yearEnd = $harvestPlantReportSearch->yearEnd;
for($i=$yearStart;$i<=$yearEnd;$i++){
$years[] = $i;
}
$quarterStart = $harvestPlantReportSearch->quarterStart;
$quarterEnd = $harvestPlantReportSearch->quarterEnd;
for($i=$quarterStart;$i<=$quarterEnd;$i++){
$quarters[] = $i;
}
}
$renders['typePlants']= $typePlants;
$renders['stateCount']= $stateCount;
$renders['stateIds']= $stateIds;
$renders['years']= $years;
$renders['quarters']= $quarters;
$renders['states']= $states;
$renders['typePlants2']= $typePlants2;
$session = Yii::$app->session;
$session->set('renderHarvestPlantReport',$renders);
$renders['harvestPlantReportSearch']=$harvestPlantReportSearch;
return $this->render('index',$renders);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function actionIndex()\n {\n $searchModel = new PlantSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n $dataProvider = new ActiveDataProvider([\n 'query' => $dataProvider->query,\n 'pagination' => [ 'pageSize' => 5],\n ]);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }",
"public function index()\n {\n $plants = Plant::all();\n return view('plant.index',compact('plants'));\n }",
"public function index()\n {\n $plants = Plant::with('waterings:id,plant_id,created_at')\n ->orderBy('common_name', 'asc')\n ->get();\n return view('plants.index')->with('plants', $plants);\n }",
"public function viewallunitmodelsAction() {\n\n\t\t$model = new Unit_Model_UnitModel();\n\t\t$this->view->records = $model->fetchAll( 'name','ASC' );\n \n\t\tif( $this->view->records ) {\n $attached = $model->getAttachedModels();\n $this->view->attached = $attached;\n\t\t $this->view->paginator = $this->paginate( $this->view->records );\n }\n\t}",
"public function showAll(){\n\t\t\n\t\t//our tasks\n\t\t$this->set('tasks', $this->Task->find('all', array(\n\t\t\t'order' => array('Task.created_on'),\n\t\t)));\n\t\t\n\t\t//our statuses\n\t\t$this->set('statuses', $this->Task->Status->find('list'));\n\t\t\n\t\t//our locations\n\t\t$this->set('locations', $this->Task->Location->find('list'));\n\t\t\n\t\t//our keywords\n\t\t$this->set('keywords', $this->Task->Keyword->find('list'));\n\t\t\n\t\t//our link locations\n\t\t$linkLocation['/foundersFactory/tasks/'] = \"Show by Location\";\n\t\tforeach($this->Task->Location->find('list') as $key => $location){\n\t\t\t$linkLocation['/foundersFactory/tasks/showByLocation/'.$key] = $location;\n\t\t}\n\t\t$this->set('linkLocations', $linkLocation);\n\t}",
"public function index()\n {\n return Labor::all();\n }",
"public function index()\n {\n return $this->model->all();\n }",
"public function index()\n {\n $all = TravelProgramme::all();\n return $this->respond($this->showCollection($all, new TravelProgrammeTransformer));\n }",
"public function index() {\n $data['manufacturers'] = Manufacturer::getManufacturers();\n return view('models.models')->with($data);\n }",
"public function index(){\n return $this->model->all();\n }",
"public function index()\n {\n return $this->model->getAll();\n }",
"public function index()\n {\n $patients = Patient::all();\n\n return $this->showAll($patients, 200);\n\n }",
"public function Allplanlist($model);",
"function index(){\r\n \r\n $all = $this->model->selectAll();\r\n $this->data('all', $all);\r\n $this->loadView();\r\n }",
"public function allwarehouse(){\n $warehouse=WareHouse::all();\n return view('backend.warehouse.list-view',compact('warehouse'));\n }",
"public function index()\n {\n $ingredients = Ingredient::all();\n\n return $this->showAll($ingredients);\n }",
"public function index()\n {\n return Drink::all();\n }",
"public function getAll()\n {\n try {\n $planets = $this->model->all();\n\n if( count( $planets ) > 0 ){\n return response()->json( $planets, Response::HTTP_OK );\n }else{\n return response()->json( [], Response::HTTP_OK );\n }\n \n } catch (Exception $e) {\n return response()->json( [ 'Error' => $e ], Response::HTTP_INTERNAL_SERVER_ERROR );\n }\n\n }",
"public function index()\n {\n return $this->toppings->getAll();\n }",
"public function getAll()\n {\n return DB::table('product_models')->get()->all();\n }",
"public function index() {\n\t\treturn $this->product->all();\n\t}",
"public function index()\n {\n $people = Person::all();\n\n return $this->showAll($people);\n }",
"public function index() {\n $this->set('products', $this->Product->find('all'));\n }",
"public function adminIndexListPlat()\n {\n $plat = Plat::paginate(10);\n return view('admin.list.plat', compact('plat'));\n }",
"public function index()\n {\n $applicant = Applicant::all();\n\n return $this->showAll($applicant);\n }",
"public function index()\n {\n // Get all\n return lugares::all();\n }",
"public function viewAll()\n {\n return $this->product->all();\n \n }",
"public function index()\n {\n return Plan::all();\n }",
"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 index()\n {\n return Pizza::All();\n }",
"public function index()\n {\n return Pabellones::all();\n }",
"public function index()\n {\n //\n getAllPlanets();\n }",
"public function showAllAction() \n\t{\n\t\t$productsManager = new ProductsManager();\n\t\t$this->viewData['products'] = $products = $productsManager -> getAll();\n\t\t$this->viewData['productsNumber'] = count($products);\n\t\t$this -> generateView('products/show-all.phtml');\n\t}",
"public function showAll()\n {\n $objects = $this->repo->showAll();\n return view('admin.showAll', compact('objects') );\n }",
"public function index()\n {\n return $this->showList(ObjectMuseum::where('deleted','=',ObjectMuseum::ACTIVE)->get());\n }",
"public function index()\n {\n return Model::all();\n }",
"public function index()\n\t{\n\t\t$products = $this->product->all();\n\t\t\n\t\treturn $products;\n\t}",
"public function index()\n {\n $departamentos = Department::all();\n return $this->showAll($departamentos);\n }",
"public function index()\n {\n\n $farms = \\App\\Farm::withCount('harvests')\n ->where('crops_owned', '>', 0)\n ->orderBy('bitcorn_owned', 'desc')\n ->paginate(3);\n\n return view('home', compact('farms'));\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 all()\n {\n if (!$this->isLogged()) exit;\n $this->oUtil->getModel('Todo');\n $this->oModel = new \\TestProject\\Model\\Todo;\n\n $this->oUtil->oTodos = $this->oModel->getAll();\n\n $this->oUtil->getView('index');\n }",
"public function index()\n {\n //\n //$warehouses = Warehouse::paginate(10);\n //return WarehouseResource::collection($warehouses);\n return Warehouse::all();\n }",
"public function index()\n {\n $hospitals = Hospital::all();\n return view('admin.hospital.list')->with('hospitals', $hospitals);\n }",
"public function showAll()\n {\n return new PatientCollection(Patient::all());\n }",
"public function index()\n {\n $alertants= Alertants::all();\n\n return AlertantsResource::collection($alertants);\n }",
"public function showAll(){\n\t\t\n\t\treturn view('skill/showall', [ \"skills\"=>Skill::all(), \"skilllevels\" => SkillLevel::all(), \"playerclasses\" => PlayerClass::all()]);\t\t\n\t}",
"public function actionIndex()\n {\n $searchModel = new PlanetsSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }",
"public function index()\n {\n $plates=Plate::all()->sortBy('ptype_id');\n $ptypes=Ptype::pluck('name','id')->all();\n $pstates=Pstate::pluck('name','id')->all();\n return view('Manager.Plates.index',compact('plates','ptypes','pstates'));\n }",
"public function travelListing() {\n\t\t$pageTitle = 'Travel Listing';\n\t\t$this->viewBuilder()->setLayout('homelayout');\n\t\t$this->loadModel('Travels');\n\n\t\t$travels = $this->Travels->find()->where(['Travels.published' => 1])->order(['Travels.created' => 'DESC'])->limit(3)->all();\n\n\t\t$this->set(compact('pageTitle', 'travels'));\n\t}",
"public function index()\n {\n $type = ProductType::all();\n return view('admincp.loaisanpham.list', ['type'=>$type]);\n }",
"public function index()\n {\n return Admins::all();\n }",
"public function index(){\n $data = PaketModel::all();\n return response($data);\n }",
"public function index()\n {\n $resturants = Resturant::all();\n\n return new ResturantCollection($resturants);\n }",
"public function index()\n\t{\n\t\treturn Lense::all();\n\t}",
"public function index()\n {\n return view('public.index', [\n 'plants' => Plants::all(),\n ]);\n }",
"public function index()\n {\n $Warehouse = new Warehouse();\n return view('warehouses.index', ['model' => $Warehouse->allData(\\request()->get('search'))]);\n }",
"public function index()\n {\n return Animal::all();\n }",
"public function index()\n {\n $planets = Planet::get();\n\n return view('planets/index', ['planets' => $planets]);\n }",
"public function index()\n {\n $lunchList = $this->lunch->where('status', 'Y')\n ->inRandomOrder()\n ->get();\n\n// dd( $this->lunch->where('store_name','金花子')->first(['id', 'address']) );\n// Query: SELECT `id`,`address` FROM lunch WHERE store_name ='金花子'\n\n /* first() */\n// dd( Lunch::find(3) );\n// dd( $this->lunch->where('id','3')->first() );\n// $this->lunch->find('3');\n\n /* get() */\n /* 取得所有id=3的數組 沒什麼意義 因為是唯一值 */\n// dd( $this->lunch->where('id','3')->get() );\n\n /* 取得所有status = 0的數組 */\n// dd($this->lunch->where('status', '0')->get());\n\n /* 取得所有status = 0的數組 只取 id , address*/\n// dd($this->lunch->where('status', '0')->get(['id', 'address']));\n\n $data = [\n 'pageName' => self::PAGENAME,\n 'lunchList' => $lunchList,\n// 'firstItem' => $lunchList[0],\n ];\n\n return view('index', $data);\n\n\n }",
"public function all()\n {\n return $this->model->get();\n }",
"public function showAllAction () {\n $products = $this->getDoctrine()\n ->getRepository('AppBundle:Product')\n ->findAll();\n\n return $this->render('product/list.html.twig', array(\n 'products' => $products,\n ));\n }",
"public function adminIndexListTypePlat()\n {\n $typePlat = TypePlat::paginate(10);\n return view('admin.list.typeplat', compact('typePlat'));\n }",
"public function index()\n {\n return Product::all();\n }",
"public function index()\n {\n return Product::all();\n }",
"public function index()\n {\n return Product::all();\n }",
"public function index()\n {\n return Product::all();\n }",
"public function all() {\n return $this->model->orderBy('created_at', 'ASC')->get();\n }",
"public function index()\n {\n return [\n 'categories' => Category::getRepository()->allWithBrands(),\n 'brands' => Brand::getRepository()->findAll(),\n 'types' => Type::getRepository()->findAll()\n ];\n }",
"public function index()\n {\n $programs = Program::all();\n return $this->showAll($programs);\n }",
"public function getAll()\n {\n return $this->model->all();\n }",
"public function getAll()\n {\n return $this->model->all();\n }",
"public function getAll()\n {\n return $this->model->all();\n }",
"public function index()\n {\n $Plannings = Planning::paginate(15);\n\n \n return PlanningResource::collection($Plannings);\n }",
"public function index()\n {\n //\n return Artikel::all();\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 Patients::all();\n }",
"public function index()\n {\n return Planodetrabalho::all();\n }",
"public function index()\n {\n $alertants = Tipus_alertants::all();\n\n return TipusAlertantsResource::collection($alertants);\n }",
"public function index()\n {\n return view('admin.pages.truck-model.index', [\n \"truckModelCategories\" => TruckModelCategory::with('truckBrandCategory')->paginate(10)\n ]);\n }",
"public function index()\n {\n $products = Products::all();\n\n return $this->returnAll($products);\n\n }",
"public function all()\n {\n return $this->model->get();\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 index()\n {\n return Products::all();\n }",
"protected function all()\n {\n $viewmodel = new TodoModel();\n $this->returnView($viewmodel->all(),true);\n }",
"public function index()\n {\n return view('admin.kelas.index', [\n 'classrooms' => Classroom::orderBy('name', 'ASC')->paginate(5)\n ]);\n }",
"public function showall()\n {\n }",
"public function index() {\n\n\t\t//return $this->_listAll();\n\t\t// sets 'productions' to whatever the _listAll() method returns\n\t\t$this->set('productions', $this->_fetchAll());\n\n\t}",
"public function index()\n\t{\n return Product::all();\n\t}",
"public function index()\n\t{\n\t\treturn $this->careers->findAll();\n\t}",
"public function showPlants() {\n // call to model function to get all category from db\n $result = $this->dash_model->showPlants();\n\n echo json_encode($result);\n }",
"public function index()\n {\n // \n return Vital::with('patient')->get();\n }",
"public function index()\n {\n return $this->findModel()->toArray();\n }",
"function get_all_get(){\n $result = $this->lecturers_model->get_all();\n $this->response($result); \n\n }",
"public function index(){\n return Monster::all();\n }",
"public function index()\n {\n return Departments::all();\n }",
"public function all()\n {\n $item = new Item;\n $items = $item->all();\n View::renderJson($items);\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 getAll()\n\t{\n\t\t$args = array('order' => 't.id');\n \t$records = $this->record->findAll($args);\n \treturn $this->model->populateModels($records, 'id');\n\t}",
"public function index()\n {\n return Listing::all();\n }",
"public function index()\n {\n return $this->powerUpTransformer->transformCollection($this->powerUp->get()->toArray());\n }"
]
| [
"0.71717566",
"0.6720554",
"0.6603972",
"0.62843734",
"0.61476105",
"0.61039484",
"0.6102897",
"0.6084031",
"0.60494494",
"0.60468215",
"0.60260725",
"0.60152984",
"0.60134274",
"0.6006851",
"0.59811395",
"0.5954137",
"0.5943851",
"0.5931516",
"0.59269136",
"0.59193105",
"0.59141207",
"0.5910876",
"0.5891884",
"0.58883196",
"0.58872074",
"0.58863896",
"0.5885774",
"0.5876403",
"0.58752614",
"0.5871658",
"0.5867326",
"0.5860887",
"0.58578277",
"0.5842441",
"0.58406687",
"0.5820622",
"0.58177984",
"0.5816643",
"0.5812806",
"0.5801889",
"0.57945865",
"0.5788288",
"0.5785516",
"0.57830167",
"0.5780433",
"0.57793707",
"0.57788503",
"0.5769387",
"0.57510924",
"0.5741311",
"0.57365584",
"0.5736104",
"0.57350624",
"0.57257295",
"0.5718612",
"0.57176894",
"0.5715824",
"0.5711531",
"0.5702099",
"0.56978595",
"0.5696585",
"0.569332",
"0.56819075",
"0.56819075",
"0.56819075",
"0.56819075",
"0.5680682",
"0.56727225",
"0.567149",
"0.5671012",
"0.5671012",
"0.5671012",
"0.5668315",
"0.5664773",
"0.56643957",
"0.56624526",
"0.5661679",
"0.5660065",
"0.5655878",
"0.56524986",
"0.5652068",
"0.56493574",
"0.56491524",
"0.5648377",
"0.5647368",
"0.56448233",
"0.5644776",
"0.5642426",
"0.56420434",
"0.5634872",
"0.56256366",
"0.5624812",
"0.5624507",
"0.5623061",
"0.5619524",
"0.5615654",
"0.56155765",
"0.5612741",
"0.5605327",
"0.5605006"
]
| 0.5816717 | 37 |
/ EXPORT WITH PHPEXCEL | public function actionExportExcel()
{
//$searchModel = new SecuritasSearch();
//$dataProvider = $searchModel->search(Yii::$app->request->queryParams);
$session = Yii::$app->session;
$renderHarvestPlantReport = $session->get('renderHarvestPlantReport');
$objReader = \PHPExcel_IOFactory::createReader('Excel2007');
$template = Yii::getAlias('@app/views/'.$this->id).'/_export.xlsx';
$objPHPExcel = $objReader->load($template);
$activeSheet = $objPHPExcel->getActiveSheet();
$border_style= [
'borders' => [
'allborders' => [
'style' =>\PHPExcel_Style_Border::BORDER_THIN,
'color' => ['argb' => '000000'],
]
]
];
$text_center = ['horizontal' => \PHPExcel_Style_Alignment::HORIZONTAL_CENTER];
$font_bold9 = ['font' => [
'bold' => true,
'color' => ['rgb' => '000000'],
'size' => 9,
'name' => 'Calibri',
]];
$font_bold8 = ['font' => [
'bold' => true,
'color' => ['rgb' => '000000'],
'size' => 8,
'name' => 'Calibri',
]];
$bg_gray = [
'fill' => [
'type' => \PHPExcel_Style_Fill::FILL_SOLID,
'color' => ['rgb' => 'dddddd']
]
];
$activeSheet->setCellValue('G2', 'print at '.date('d-M-Y H:i:s'));
$years = 'Semua';
if(!empty($renderHarvestPlantReport['years'])){
$years = implode(', ', $renderHarvestPlantReport['years']);
}
$activeSheet->setCellValue('C3', $years);
$quarters = 'Semua';
if(!empty($renderHarvestPlantReport['quarters'])){
$quarters = implode(', ', $renderHarvestPlantReport['quarters']);
}
$activeSheet->setCellValue('C4', $quarters);
$states = 'Semua';
if(!empty($renderHarvestPlantReport['states'])){
$states = implode(', ', $renderHarvestPlantReport['states']);
}
$activeSheet->setCellValue('C5', $states);
$typePlants2 = 'Semua';
if(!empty($renderHarvestPlantReport['typePlants2'])){
$typePlants2 = implode(', ', $renderHarvestPlantReport['typePlants2']);
}
$activeSheet->setCellValue('C7', $typePlants2);
$typePlants = $renderHarvestPlantReport['typePlants'];
$stateCount = $renderHarvestPlantReport['stateCount'];
$startRow = 11;
$i=0;
foreach ($typePlants as $typePlant) {
if($i==0) $row = $startRow+$i;
else $row++;
//$activeSheet->insertNewRowBefore($row,1);
$activeSheet->setCellValue('A'.$row, Helpers::columnLetter($i+1));
$activeSheet->setCellValue('B'.$row, $typePlant->name);
$activeSheet->getStyle("A".$row.":B".$row)->applyFromArray($font_bold9);
$activeSheet->getStyle("A".$row.":A".$row)->getAlignment()->applyFromArray($text_center);
$plants = Plant::find()
->where(['type_plant_id'=>$typePlant->id])
->all();
$idx_plant = 0;
foreach ($plants as $plant) {
//$activeSheet->insertNewRowBefore($row,1);
$row++;
$activeSheet->setCellValue('B'.$row, $idx_plant+1);
$activeSheet->setCellValue('C'.$row, $plant->name);
$activeSheet->getStyle("B".$row.":C".$row)->applyFromArray($font_bold8);
$activeSheet->getStyle("B".$row.":B".$row)->getAlignment()->applyFromArray($text_center);
$where['plant_id']=$plant->id;
if(!empty($renderHarvestPlantReport['years'])) $where['year']=$renderHarvestPlantReport['years'];
if(!empty($renderHarvestPlantReport['quarters'])) $where['quarter']=$renderHarvestPlantReport['quarters'];
if(!empty($renderHarvestPlantReport['stateIds'])) $where['state_id']=$renderHarvestPlantReport['stateIds'];
$harvestPlants = HarvestPlant::find()
->select("
sum(param1) as sparam1,
sum(param2) as sparam2,
sum(param3) as sparam3,
sum(param4) as sparam4,
sum(param5) as sparam5,
group_concat(note1) as gcnote1,
group_concat(note2) as gcnote2,
group_concat(note3) as gcnote3,
group_concat(note4) as gcnote4,
group_concat(note5) as gcnote5,
count(state_id) as cstate
")
->where($where)
->asArray()
->one();
$params = explode('|', $typePlant->params);
$units = explode('|', $typePlant->units);
if(count($params)>0 and count($units)>0 and count($params)==count($units)){
$combines = array_combine($params, $units);
$idx = 1;
$row++;
$starRowTable = $row;
$activeSheet->setCellValue('B'.$row, 'NO');
$activeSheet->setCellValue('C'.$row, 'PARAMETER');
$activeSheet->setCellValue('D'.$row, 'NILAI');
$activeSheet->setCellValue('E'.$row, 'SATUAN');
$activeSheet->setCellValue('F'.$row, 'KETERANGAN');
$activeSheet->setCellValue('G'.$row, 'DATA MASUK');
$activeSheet->getStyle('B'.$row.':G'.$row)->applyFromArray($bg_gray);
foreach ($combines as $param => $unit) {
$row++;
$activeSheet->setCellValue('B'.$row, $idx);
$activeSheet->setCellValue('C'.$row, $param);
$activeSheet->setCellValue('D'.$row, $harvestPlants['sparam'.$idx]);
$activeSheet->setCellValue('E'.$row, $unit);
//$activeSheet->getStyle("F".$row)->getAlignment()->setWrapText(true);
//$activeSheet->getDefaultRowDimension()->setRowHeight(-1);
$activeSheet->getRowDimension($row)->setRowHeight(-1);
$activeSheet->setCellValue('F'.$row, $harvestPlants['gcnote'.$idx]. ' lorem ipsum sit dolor amet lorem ipsum sit dolor amet lorem ipsum sit dolor amet lorem ipsum sit dolor amet ');
$data = number_format(($harvestPlants['cstate']/$stateCount)*100,2);
$activeSheet->setCellValue('G'.$row, $data.'%');
$idx++;
}
$activeSheet->getStyle("B".$starRowTable.":G".$row)->applyFromArray($border_style);
$activeSheet->getStyle("B".$starRowTable.":G".$row)->getAlignment()->applyFromArray($text_center);
$activeSheet->getStyle("F".($starRowTable+1).":F".$row)->getAlignment()->setWrapText(true);
}
$row++;
$idx_plant++;
}
$i++;
}
header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
header('Content-Disposition: attachment;filename="'.$this->id.'_'.date('YmdHis').'.xlsx"');
header('Cache-Control: max-age=0');
$objWriter = \PHPExcel_IOFactory::createWriter($objPHPExcel, "Excel2007");
$objWriter->save('php://output');
exit;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function perform_export()\n {\n global $CFG;\n require_once($CFG->dirroot.'/blocks/bcgt/lib.php');\n global $CFG, $USER;\n $name = preg_replace(\"/[^a-z 0-9]/i\", \"\", $this->get_name());\n \n ob_clean();\n header(\"Pragma: public\");\n header('Content-Type: application/vnd.ms-excel; charset=utf-8');\n header('Content-Disposition: attachment; filename=\"'.$name.'.xlsx\"'); \n header(\"Cache-Control: must-revalidate, post-check=0, pre-check=0\");\n header(\"Cache-Control: private\", false);\n\n require_once $CFG->dirroot . '/blocks/bcgt/lib/PHPExcel/Classes/PHPExcel.php';\n \n $objPHPExcel = new \\PHPExcel();\n $objPHPExcel->getProperties()\n ->setCreator(fullname($USER))\n ->setLastModifiedBy(fullname($USER))\n ->setTitle($this->get_name())\n ->setSubject($this->get_name())\n ->setDescription($this->get_description());\n\n // Remove default sheet\n $objPHPExcel->removeSheetByIndex(0);\n \n $sheetIndex = 0;\n \n // Set current sheet\n $objPHPExcel->createSheet($sheetIndex);\n $objPHPExcel->setActiveSheetIndex($sheetIndex);\n $objPHPExcel->getActiveSheet()->setTitle(\"Report\");\n \n $rowNum = 1;\n\n // Headers\n if(isset($this->header))\n {\n if(!$this->has_split_header())\n {\n $col = 0;\n foreach($this->header AS $head)\n {\n $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col, $rowNum, $head);\n $col++;\n }\n $rowNum++;\n }\n else\n {\n //foreach row\n foreach($this->header AS $row)\n {\n $col = 0;\n foreach($row AS $rowObj)\n {\n $columnCount = $rowObj->colCount;\n $columnContent = $rowObj->content;\n //add all the cells, \n //thenmerge\n $startCol = $col;\n for($i=0;$i<$columnCount;$i++)\n {\n if($i == 0)\n {\n $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col, $rowNum, $columnContent);\n }\n else\n {\n $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col, $rowNum, '');\n }\n $col++;\n }\n $endCol = $col;\n if($columnCount != 1)\n {\n $objPHPExcel->getActiveSheet()->mergeCells(''.PHPExcel_Cell::stringFromColumnIndex($startCol).\n ''.$rowNum.':'.PHPExcel_Cell::stringFromColumnIndex($endCol - 1).''.$rowNum);\n }\n \n \n }\n $rowNum++;\n }\n } \n \n }\n //data\n if(isset($this->data))\n {\n foreach($this->data AS $data)\n {\n $col = 0;\n foreach($data AS $cell)\n { \n if(is_a($cell, 'stdClass'))\n {\n $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col, $rowNum, $this->build_excell_cell($cell));\n $objPHPExcel->getActiveSheet()->getStyle(''.PHPExcel_Cell::stringFromColumnIndex($col).''.$rowNum)->applyFromArray(\n array(\n 'fill' => array(\n 'type' => PHPExcel_Style_Fill::FILL_SOLID,\n 'color' => $this->get_excell_cell_color($cell)\n ),\n 'borders' => array(\n 'outline' => array(\n 'style' => PHPExcel_Style_Border::BORDER_THIN,\n 'color' => array('rgb'=>'cfcfcf')\n )\n )\n )\n ); \n if(isset($cell->colspan) && $cell->colspan > 1)\n {\n $objPHPExcel->getActiveSheet()->mergeCells(''.PHPExcel_Cell::stringFromColumnIndex($col).\n ''.$rowNum.':'.PHPExcel_Cell::stringFromColumnIndex($col + ($cell->colspan - 1)).''.$rowNum);\n \n $col = $col + ($cell->colspan - 1);\n }\n }\n else\n {\n $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col, $rowNum, $cell);\n }\n \n $col++;\n } \n $rowNum++;\n }\n }\n \n // Freeze rows and cols (everything to the left of D and above 2)\n $objPHPExcel->getActiveSheet()->freezePane($this->get_frozen_panes());\n \n // End\n $objPHPExcel->setActiveSheetIndex(0);\n $objWriter = \\PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');\n\n ob_clean();\n $objWriter->save('php://output');\n \n exit;\n }",
"public function exportExcel($type);",
"public function export()\n\t{\n\t\tinclude APPPATH . 'third_party/PHPExcel/PHPExcel.php';\n\n\t\t// Panggil class PHPExcel nya\n\t\t$excel = new PHPExcel();\n\n\t\t// Settingan awal fil excel\n\t\t$excel->getProperties()->setCreator('PT Pelindo')\n\t\t\t->setLastModifiedBy('PT Pelindo')\n\t\t\t->setTitle(\"Rekap Rapor Akhlak\")\n\t\t\t->setSubject(\"Rekap Rapor Akhlak\")\n\t\t\t->setDescription(\"Rekap Rapor Akhlak\")\n\t\t\t->setKeywords(\"Rekap Rapor Akhlak\");\n\n\t\t// Buat sebuah variabel untuk menampung pengaturan style dari header tabel\n\t\t$style_col = array(\n\t\t\t'font' => array('bold' => true), // Set font nya jadi bold\n\t\t\t'alignment' => array(\n\t\t\t\t'horizontal' => PHPExcel_Style_Alignment::HORIZONTAL_CENTER, // Set text jadi ditengah secara horizontal (center)\n\t\t\t\t'vertical' => PHPExcel_Style_Alignment::VERTICAL_CENTER // Set text jadi di tengah secara vertical (middle)\n\t\t\t),\n\t\t\t'borders' => array(\n\t\t\t\t'top' => array('style' => PHPExcel_Style_Border::BORDER_THIN), // Set border top dengan garis tipis\n\t\t\t\t'right' => array('style' => PHPExcel_Style_Border::BORDER_THIN), // Set border right dengan garis tipis\n\t\t\t\t'bottom' => array('style' => PHPExcel_Style_Border::BORDER_THIN), // Set border bottom dengan garis tipis\n\t\t\t\t'left' => array('style' => PHPExcel_Style_Border::BORDER_THIN) // Set border left dengan garis tipis\n\t\t\t)\n\t\t);\n\n\t\t// Buat sebuah variabel untuk menampung pengaturan style dari isi tabel\n\t\t$style_row = array(\n\t\t\t'alignment' => array(\n\t\t\t\t'vertical' => PHPExcel_Style_Alignment::VERTICAL_CENTER // Set text jadi di tengah secara vertical (middle)\n\t\t\t),\n\t\t\t'borders' => array(\n\t\t\t\t'top' => array('style' => PHPExcel_Style_Border::BORDER_THIN), // Set border top dengan garis tipis\n\t\t\t\t'right' => array('style' => PHPExcel_Style_Border::BORDER_THIN), // Set border right dengan garis tipis\n\t\t\t\t'bottom' => array('style' => PHPExcel_Style_Border::BORDER_THIN), // Set border bottom dengan garis tipis\n\t\t\t\t'left' => array('style' => PHPExcel_Style_Border::BORDER_THIN) // Set border left dengan garis tipis\n\t\t\t)\n\t\t);\n\n\t\t$excel->setActiveSheetIndex(0)->setCellValue('A1', \"Rekap Rapor Akhlak\"); // Set kolom A1 dengan tulisan \"Rekap Rapor Akhlak\"\n\t\t$excel->getActiveSheet()->mergeCells('A1:J1'); // Set Merge Cell pada kolom A1 sampai E1\n\t\t$excel->getActiveSheet()->getStyle('A1')->getFont()->setBold(TRUE); // Set bold kolom A1\n\t\t$excel->getActiveSheet()->getStyle('A1')->getFont()->setSize(15); // Set font size 15 untuk kolom A1\n\t\t$excel->getActiveSheet()->getStyle('A1')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER); // Set text center untuk kolom A1\n\n\t\t// Buat header tabel nya pada baris ke 3\n\t\t$excel->setActiveSheetIndex(0)->setCellValue('A3', \"NO\"); // Set kolom A3 dengan tulisan \"NO\"\n\t\t$excel->setActiveSheetIndex(0)->setCellValue('B3', \"NAMA CABANG\"); // Set kolom B3 dengan tulisan \"NIS\"\n\t\t$excel->setActiveSheetIndex(0)->setCellValue('C3', \"NILAI AMANAH\"); // Set kolom C3 dengan tulisan \"NAMA\"\n\t\t$excel->setActiveSheetIndex(0)->setCellValue('D3', \"NILAI KOMPETEN\"); // Set kolom D3 dengan tulisan \"JENIS KELAMIN\"\n\t\t$excel->setActiveSheetIndex(0)->setCellValue('E3', \"NILAI HARMONIS\"); // Set kolom E3 dengan tulisan \"ALAMAT\"\n\t\t$excel->setActiveSheetIndex(0)->setCellValue('F3', \"NILAI LOYAL\"); // Set kolom E3 dengan tulisan \"ALAMAT\"\n\t\t$excel->setActiveSheetIndex(0)->setCellValue('G3', \"NILAI ADAPTIF\"); // Set kolom E3 dengan tulisan \"ALAMAT\"\n\t\t$excel->setActiveSheetIndex(0)->setCellValue('H3', \"NILAI KOLABORATIF\"); // Set kolom E3 dengan tulisan \"ALAMAT\"\n\t\t$excel->setActiveSheetIndex(0)->setCellValue('I3', \"NILAI TOTAL\"); // Set kolom E3 dengan tulisan \"ALAMAT\"\n\t\t$excel->setActiveSheetIndex(0)->setCellValue('J3', \"TANGGAL UPLOAD\"); // Set kolom E3 dengan tulisan \"ALAMAT\"\n\n\t\t// Apply style header yang telah kita buat tadi ke masing-masing kolom header\n\t\t$excel->getActiveSheet()->getStyle('A3')->applyFromArray($style_col);\n\t\t$excel->getActiveSheet()->getStyle('B3')->applyFromArray($style_col);\n\t\t$excel->getActiveSheet()->getStyle('C3')->applyFromArray($style_col);\n\t\t$excel->getActiveSheet()->getStyle('D3')->applyFromArray($style_col);\n\t\t$excel->getActiveSheet()->getStyle('E3')->applyFromArray($style_col);\n\t\t$excel->getActiveSheet()->getStyle('F3')->applyFromArray($style_col);\n\t\t$excel->getActiveSheet()->getStyle('G3')->applyFromArray($style_col);\n\t\t$excel->getActiveSheet()->getStyle('H3')->applyFromArray($style_col);\n\t\t$excel->getActiveSheet()->getStyle('I3')->applyFromArray($style_col);\n\t\t$excel->getActiveSheet()->getStyle('J3')->applyFromArray($style_col);\n\n\t\t// Panggil function view yang ada di SiswaModel untuk menampilkan semua data siswanya\n\t\t$siswa = $this->RaporModel->view();\n\n\t\t$no = 1; // Untuk penomoran tabel, di awal set dengan 1\n\t\t$numrow = 4; // Set baris pertama untuk isi tabel adalah baris ke 4\n\t\tforeach ($siswa as $data) { // Lakukan looping pada variabel siswa\n\t\t\t$excel->setActiveSheetIndex(0)->setCellValue('A' . $numrow, $no);\n\t\t\t$excel->setActiveSheetIndex(0)->setCellValue('B' . $numrow, $data->cabang);\n\t\t\t$excel->setActiveSheetIndex(0)->setCellValue('C' . $numrow, $data->nilai_amanah . '%');\n\t\t\t$excel->setActiveSheetIndex(0)->setCellValue('D' . $numrow, $data->nilai_kompeten . '%');\n\t\t\t$excel->setActiveSheetIndex(0)->setCellValue('E' . $numrow, $data->nilai_harmonis . '%');\n\t\t\t$excel->setActiveSheetIndex(0)->setCellValue('F' . $numrow, $data->nilai_loyal . '%');\n\t\t\t$excel->setActiveSheetIndex(0)->setCellValue('G' . $numrow, $data->nilai_adaptif . '%');\n\t\t\t$excel->setActiveSheetIndex(0)->setCellValue('H' . $numrow, $data->nilai_kolab . '%');\n\t\t\t$excel->setActiveSheetIndex(0)->setCellValue('I' . $numrow, $data->nilai_total . '%');\n\t\t\t$excel->setActiveSheetIndex(0)->setCellValue('J' . $numrow, $data->created_at);\n\n\t\t\t// Apply style row yang telah kita buat tadi ke masing-masing baris (isi tabel)\n\t\t\t$excel->getActiveSheet()->getStyle('A' . $numrow)->applyFromArray($style_row);\n\t\t\t$excel->getActiveSheet()->getStyle('B' . $numrow)->applyFromArray($style_row);\n\t\t\t$excel->getActiveSheet()->getStyle('C' . $numrow)->applyFromArray($style_row);\n\t\t\t$excel->getActiveSheet()->getStyle('D' . $numrow)->applyFromArray($style_row);\n\t\t\t$excel->getActiveSheet()->getStyle('E' . $numrow)->applyFromArray($style_row);\n\t\t\t$excel->getActiveSheet()->getStyle('F' . $numrow)->applyFromArray($style_row);\n\t\t\t$excel->getActiveSheet()->getStyle('G' . $numrow)->applyFromArray($style_row);\n\t\t\t$excel->getActiveSheet()->getStyle('H' . $numrow)->applyFromArray($style_row);\n\t\t\t$excel->getActiveSheet()->getStyle('I' . $numrow)->applyFromArray($style_row);\n\t\t\t$excel->getActiveSheet()->getStyle('J' . $numrow)->applyFromArray($style_row);\n\n\t\t\t$no++; // Tambah 1 setiap kali looping\n\t\t\t$numrow++; // Tambah 1 setiap kali looping\n\t\t}\n\n\t\t// Set width kolom\n\t\t$excel->getActiveSheet()->getColumnDimension('A')->setWidth(2); // Set width kolom A\n\t\t$excel->getActiveSheet()->getColumnDimension('B')->setWidth(14); // Set width kolom B\n\t\t$excel->getActiveSheet()->getColumnDimension('C')->setWidth(14); // Set width kolom C\n\t\t$excel->getActiveSheet()->getColumnDimension('D')->setWidth(16); // Set width kolom D\n\t\t$excel->getActiveSheet()->getColumnDimension('E')->setWidth(16); // Set width kolom E\n\t\t$excel->getActiveSheet()->getColumnDimension('F')->setWidth(12); // Set width kolom E\n\t\t$excel->getActiveSheet()->getColumnDimension('G')->setWidth(14); // Set width kolom E\n\t\t$excel->getActiveSheet()->getColumnDimension('H')->setWidth(19); // Set width kolom E\n\t\t$excel->getActiveSheet()->getColumnDimension('I')->setWidth(12); // Set width kolom E\n\t\t$excel->getActiveSheet()->getColumnDimension('J')->setWidth(19); // Set width kolom E\n\n\t\t// Set height semua kolom menjadi auto (mengikuti height isi dari kolommnya, jadi otomatis)\n\t\t$excel->getActiveSheet()->getDefaultRowDimension()->setRowHeight(-1);\n\n\t\t// Set orientasi kertas jadi LANDSCAPE\n\t\t$excel->getActiveSheet()->getPageSetup()->setOrientation(PHPExcel_Worksheet_PageSetup::ORIENTATION_LANDSCAPE);\n\n\t\t// Set judul file excel nya\n\t\t$excel->getActiveSheet(0)->setTitle(\"Rekap Rapor Akhlak\");\n\t\t$excel->setActiveSheetIndex(0);\n\n\t\t// Proses file excel\n\t\theader('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');\n\t\theader('Content-Disposition: attachment; filename=\"Rekap Rapor Akhlak.xlsx\"'); // Set nama file excel nya\n\t\theader('Cache-Control: max-age=0');\n\n\t\t$write = PHPExcel_IOFactory::createWriter($excel, 'Excel2007');\n\t\t$write->save('php://output');\n\t}",
"public function export_excel2()\n\t{\n\t\t$this->load->library('phpexcel');\n\t\t$this->load->view('admin/function/xls_format');\n\t}",
"public function excel()\r\n {\r\n $data = $this->AdminJobModel->getJobsForCSV($this->xssCleanInput('ids'));\r\n $data = sortForCSV(objToArr($data));\r\n $excel = new SimpleExcel('csv'); \r\n $excel->writer->setData($data);\r\n $excel->writer->saveFile('jobs'); \r\n exit;\r\n }",
"public function export()\n {\n return Excel::download(new ProductExport, 'products.xlsx');\n // return (new ProductExport)->download('products.pdf', \\Maatwebsite\\Excel\\Excel\\::MDPDF);\n }",
"public function export(){\n include APPPATH.'third_party/PHPExcel/Classes/PHPExcel.php';\n \n // Panggil class PHPExcel nya\n $excel = new PHPExcel();\n\n // Settingan awal fil excel\n $excel->getProperties()->setCreator('My Notes Code')\n ->setLastModifiedBy('My Notes Code')\n ->setTitle(\"Data Buku\")\n ->setSubject(\"tb_buku\")\n ->setDescription(\"Laporan Semua Data Buku\")\n ->setKeywords(\"Data Buku\");\n\n // Buat sebuah variabel untuk menampung pengaturan style dari header tabel\n $style_col = array(\n 'font' => array('bold' => true), // Set font nya jadi bold\n 'alignment' => array(\n 'horizontal' => PHPExcel_Style_Alignment::HORIZONTAL_CENTER, // Set text jadi ditengah secara horizontal (center)\n 'vertical' => PHPExcel_Style_Alignment::VERTICAL_CENTER // Set text jadi di tengah secara vertical (middle)\n ),\n 'borders' => array(\n 'top' => array('style' => PHPExcel_Style_Border::BORDER_THIN), // Set border top dengan garis tipis\n 'right' => array('style' => PHPExcel_Style_Border::BORDER_THIN), // Set border right dengan garis tipis\n 'bottom' => array('style' => PHPExcel_Style_Border::BORDER_THIN), // Set border bottom dengan garis tipis\n 'left' => array('style' => PHPExcel_Style_Border::BORDER_THIN) // Set border left dengan garis tipis\n )\n );\n\n // Buat sebuah variabel untuk menampung pengaturan style dari isi tabel\n $style_row = array(\n 'alignment' => array(\n 'horizontal' => PHPExcel_Style_Alignment::HORIZONTAL_CENTER, // Set text jadi ditengah secara horizontal (center)\n 'vertical' => PHPExcel_Style_Alignment::VERTICAL_CENTER // Set text jadi di tengah secara vertical (middle)\n ),\n 'borders' => array(\n 'top' => array('style' => PHPExcel_Style_Border::BORDER_THIN), // Set border top dengan garis tipis\n 'right' => array('style' => PHPExcel_Style_Border::BORDER_THIN), // Set border right dengan garis tipis\n 'bottom' => array('style' => PHPExcel_Style_Border::BORDER_THIN), // Set border bottom dengan garis tipis\n 'left' => array('style' => PHPExcel_Style_Border::BORDER_THIN) // Set border left dengan garis tipis\n )\n );\n\n $excel->setActiveSheetIndex(0)->setCellValue('A1', \"RELASI INTI MEDIA ( FAMILIA, ISTANA MEDIA, QUDSI MEDIA DAN FORUM )\"); // Set kolom A1 dengan tulisan \"DATA SISWA\"\n $excel->setActiveSheetIndex(0)->setCellValue('A2', \"Jl. Permadi Nyutran RT/RW. 61/19 MJ II No. 1606 C, Wirogunan, Mergangsan, Yogyakarta 55151\"); // Set kolom A1 dengan tulisan \"DATA SISWA\"\n $excel->setActiveSheetIndex(0)->setCellValue('A3', \"Email: [email protected] Telp: (0274) 2870300\"); // Set kolom A1 dengan tulisan \"DATA SISWA\"\n $excel->setActiveSheetIndex(0)->setCellValue('A5', \"DATA BUKU\");\n $excel->getActiveSheet()->mergeCells('A1:N1'); // Set Merge Cell pada kolom A1 sampai E1\n $excel->getActiveSheet()->mergeCells('A2:N2'); // Set Merge Cell pada kolom A1 sampai E1\n $excel->getActiveSheet()->mergeCells('A3:N3'); // Set Merge Cell pada kolom A1 sampai E1\n $excel->getActiveSheet()->mergeCells('A5:N5'); // Set Merge Cell pada kolom A1 sampai E1\n $excel->getActiveSheet()->getStyle('A1')->getFont()->setBold(TRUE); // Set bold kolom A1\n $excel->getActiveSheet()->getStyle('A5')->getFont()->setBold(TRUE); // Set bold kolom A1\n $excel->getActiveSheet()->getStyle('A1')->getFont()->setSize(15); // Set font size 15 untuk kolom A1\n $excel->getActiveSheet()->getStyle('A5')->getFont()->setSize(15);\n $excel->getActiveSheet()->getStyle('A1')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n $excel->getActiveSheet()->getStyle('A2')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n $excel->getActiveSheet()->getStyle('A3')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n $excel->getActiveSheet()->getStyle('A5')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER); // Set text center untuk kolom A1\n\n // Buat header tabel nya pada baris ke 3\n $excel->setActiveSheetIndex(0)->setCellValue('A7', \"NO\"); // Set kolom A3 dengan tulisan \"NO\"\n $excel->setActiveSheetIndex(0)->setCellValue('B7', \"KODE BUKU\"); // Set kolom A3 dengan tulisan \"NO\"\n $excel->setActiveSheetIndex(0)->setCellValue('C7', \"JUDUL\"); // Set kolom B3 dengan tulisan \"NIS\"\n $excel->setActiveSheetIndex(0)->setCellValue('D7', \"KATEGORI\"); // Set kolom C3 dengan tulisan \"NAMA\"\n $excel->setActiveSheetIndex(0)->setCellValue('E7', \"PENULIS\"); // Set kolom D3 dengan tulisan \"JENIS KELAMIN\"\n $excel->setActiveSheetIndex(0)->setCellValue('F7', \"PENERBIT\");\n $excel->setActiveSheetIndex(0)->setCellValue('G7', \"UKURAN\");\n $excel->setActiveSheetIndex(0)->setCellValue('H7', \"JUMLAH HALAMAN\");\n $excel->setActiveSheetIndex(0)->setCellValue('I7', \"ISBN\");\n $excel->setActiveSheetIndex(0)->setCellValue('J7', \"TAHUN TERBIT\");\n $excel->setActiveSheetIndex(0)->setCellValue('K7', \"HARGA (Rp)\");\n $excel->setActiveSheetIndex(0)->setCellValue('L7', \"STOK\");\n $excel->setActiveSheetIndex(0)->setCellValue('M7', \"KETERANGAN\");\n $excel->setActiveSheetIndex(0)->setCellValue('N7', \"STATUS\");\n\n // Apply style header yang telah kita buat tadi ke masing-masing kolom header\n $excel->getActiveSheet()->getStyle('A7')->applyFromArray($style_col);\n $excel->getActiveSheet()->getStyle('B7')->applyFromArray($style_col);\n $excel->getActiveSheet()->getStyle('C7')->applyFromArray($style_col);\n $excel->getActiveSheet()->getStyle('D7')->applyFromArray($style_col);\n $excel->getActiveSheet()->getStyle('E7')->applyFromArray($style_col);\n $excel->getActiveSheet()->getStyle('F7')->applyFromArray($style_col);\n $excel->getActiveSheet()->getStyle('G7')->applyFromArray($style_col);\n $excel->getActiveSheet()->getStyle('H7')->applyFromArray($style_col);\n $excel->getActiveSheet()->getStyle('I7')->applyFromArray($style_col);\n $excel->getActiveSheet()->getStyle('J7')->applyFromArray($style_col);\n $excel->getActiveSheet()->getStyle('K7')->applyFromArray($style_col);\n $excel->getActiveSheet()->getStyle('L7')->applyFromArray($style_col);\n $excel->getActiveSheet()->getStyle('M7')->applyFromArray($style_col);\n $excel->getActiveSheet()->getStyle('N7')->applyFromArray($style_col);\n\n\n // Panggil function view yang ada di SiswaModel untuk menampilkan semua data siswanya\n $buku = $this->buku_model->showAllBuku();\n\n $no = 1; // Untuk penomoran tabel, di awal set dengan 1\n $numrow = 8; // Set baris pertama untuk isi tabel adalah baris ke 4\n foreach($buku as $data){ // Lakukan looping pada variabel siswa\n $excel->setActiveSheetIndex(0)->setCellValue('A'.$numrow, $no);\n $excel->setActiveSheetIndex(0)->setCellValue('B'.$numrow, $data->kd_buku);\n $excel->setActiveSheetIndex(0)->setCellValue('C'.$numrow, $data->judul);\n $excel->setActiveSheetIndex(0)->setCellValue('D'.$numrow, $data->nama_kategori);\n $excel->setActiveSheetIndex(0)->setCellValue('E'.$numrow, $data->nama_penulis);\n $excel->setActiveSheetIndex(0)->setCellValue('F'.$numrow, $data->nama_penerbit);\n $excel->setActiveSheetIndex(0)->setCellValue('G'.$numrow, $data->ukuran);\n $excel->setActiveSheetIndex(0)->setCellValue('H'.$numrow, $data->jml_halaman);\n $excel->setActiveSheetIndex(0)->setCellValue('I'.$numrow, $data->isbn);\n $excel->setActiveSheetIndex(0)->setCellValue('J'.$numrow, $data->thn_terbit);\n $excel->setActiveSheetIndex(0)->setCellValue('K'.$numrow, $data->harga);\n $excel->setActiveSheetIndex(0)->setCellValue('L'.$numrow, $data->stok);\n $excel->setActiveSheetIndex(0)->setCellValue('M'.$numrow, $data->keterangan);\n $excel->setActiveSheetIndex(0)->setCellValue('N'.$numrow, $data->status);\n \n // Apply style row yang telah kita buat tadi ke masing-masing baris (isi tabel)\n $excel->getActiveSheet()->getStyle('A'.$numrow)->applyFromArray($style_row);\n $excel->getActiveSheet()->getStyle('B'.$numrow)->applyFromArray($style_row);\n $excel->getActiveSheet()->getStyle('C'.$numrow)->applyFromArray($style_row);\n $excel->getActiveSheet()->getStyle('D'.$numrow)->applyFromArray($style_row);\n $excel->getActiveSheet()->getStyle('E'.$numrow)->applyFromArray($style_row);\n $excel->getActiveSheet()->getStyle('F'.$numrow)->applyFromArray($style_row);\n $excel->getActiveSheet()->getStyle('G'.$numrow)->applyFromArray($style_row);\n $excel->getActiveSheet()->getStyle('H'.$numrow)->applyFromArray($style_row);\n $excel->getActiveSheet()->getStyle('I'.$numrow)->applyFromArray($style_row);\n $excel->getActiveSheet()->getStyle('J'.$numrow)->applyFromArray($style_row);\n $excel->getActiveSheet()->getStyle('K'.$numrow)->applyFromArray($style_row);\n $excel->getActiveSheet()->getStyle('L'.$numrow)->applyFromArray($style_row);\n $excel->getActiveSheet()->getStyle('M'.$numrow)->applyFromArray($style_row);\n $excel->getActiveSheet()->getStyle('N'.$numrow)->applyFromArray($style_row);\n \n $no++; // Tambah 1 setiap kali looping\n $numrow++; // Tambah 1 setiap kali looping\n }\n\n // Set width kolom\n $excel->getActiveSheet()->getColumnDimension('A')->setWidth(5); // Set width kolom A\n $excel->getActiveSheet()->getColumnDimension('B')->setWidth(13); // Set width kolom B\n $excel->getActiveSheet()->getColumnDimension('C')->setWidth(60); // Set width kolom C\n $excel->getActiveSheet()->getColumnDimension('D')->setWidth(25); // Set width kolom D\n $excel->getActiveSheet()->getColumnDimension('E')->setWidth(40); // Set width kolom E\n $excel->getActiveSheet()->getColumnDimension('F')->setWidth(15); // Set width kolom E\n $excel->getActiveSheet()->getColumnDimension('G')->setWidth(13); // Set width kolom E\n $excel->getActiveSheet()->getColumnDimension('H')->setWidth(20); // Set width kolom E\n $excel->getActiveSheet()->getColumnDimension('I')->setWidth(20); // Set width kolom E\n $excel->getActiveSheet()->getColumnDimension('J')->setWidth(15); // Set width kolom E\n $excel->getActiveSheet()->getColumnDimension('K')->setWidth(18); // Set width kolom E\n $excel->getActiveSheet()->getColumnDimension('L')->setWidth(10); // Set width kolom E\n $excel->getActiveSheet()->getColumnDimension('M')->setWidth(40); // Set width kolom E\n $excel->getActiveSheet()->getColumnDimension('N')->setWidth(15); // Set width kolom E\n \n // Set height semua kolom menjadi auto (mengikuti height isi dari kolommnya, jadi otomatis)\n $excel->getActiveSheet()->getDefaultRowDimension()->setRowHeight(-1);\n\n // Set orientasi kertas jadi LANDSCAPE\n $excel->getActiveSheet()->getPageSetup()->setOrientation(PHPExcel_Worksheet_PageSetup::ORIENTATION_LANDSCAPE);\n\n // Set judul file excel nya\n $excel->getActiveSheet(0)->setTitle(\"Laporan Data Buku\");\n $excel->setActiveSheetIndex(0);\n\n // Proses file excel\n header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');\n header('Content-Disposition: attachment; filename=\"Data Buku.xlsx\"'); // Set nama file excel nya\n header('Cache-Control: max-age=0');\n\n $write = PHPExcel_IOFactory::createWriter($excel, 'Excel2007');\n $write->save('php://output');\n }",
"public function export() \n \t\t{\n \t\t$data = $this->model_patient->export();\n \t\t#load PHPExcel library\n \t\t$this->excel->setActiveSheetIndex(0);\n \t\t#name the worksheet\n \t\t$this->excel->getActiveSheet()->setTitle('Data Pasien SN Health Center');\n \n \t\t#STYLING\n \t\t$styleArray = array('borders' => array('allborders' => array('style' => PHPExcel_Style_Border::BORDER_THIN,'color' => array('argb' => '0000'))));\n \n \t\t#set report header\n \t\t$this->excel->getActiveSheet()->getStyle('A:K')->getFont()->setName('Times New Roman');\n \t\t$this->excel->getActiveSheet()->mergeCells('A1:K1');\n \t\t$this->excel->getActiveSheet()->setCellValue('A1', 'DAFTAR PASIEN APLIKASI SN HEALTH CENTER');\n \t\t$this->excel->getActiveSheet()->getStyle('A1')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n \t\t$this->excel->getActiveSheet()->getStyle('A1')->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER);\n \t\t$this->excel->getActiveSheet()->getStyle('A1')->getFont()->setBold(true);\n \t\t$this->excel->getActiveSheet()->getStyle('A1')->getFont()->setSize(12);\n \n \n \t\t//set column name\n \t\t$this->excel->getActiveSheet()->setCellValue('A2', 'No');\n \t\t$this->excel->getActiveSheet()->setCellValue('B2', 'Nomor Registrasi');\n \t\t$this->excel->getActiveSheet()->setCellValue('C2', 'Nomor KTP');\n \t\t$this->excel->getActiveSheet()->setCellValue('D2', 'Nama');\n \t\t$this->excel->getActiveSheet()->setCellValue('E2', 'Jenis Kelamin');\n \t\t$this->excel->getActiveSheet()->setCellValue('F2', 'Tanggal Lahir');\n \t\t$this->excel->getActiveSheet()->setCellValue('G2', 'Agama');\n \t\t$this->excel->getActiveSheet()->setCellValue('H2', 'Pekerjaan');\n \t\t$this->excel->getActiveSheet()->setCellValue('I2', 'Nomor HP');\n \t\t$this->excel->getActiveSheet()->setCellValue('J2', 'Alamat');\n \t\t$this->excel->getActiveSheet()->setCellValue('K2', 'Tanggal & Waktu Registrasi');\n \n\t\t\t $this->excel->getActiveSheet()->getStyle('A2:K2')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n \n\t\t\t $this->excel->getActiveSheet()->getColumnDimension('A')->setWidth(4);\n\t\t\t $this->excel->getActiveSheet()->getColumnDimension('B')->setWidth(30);\n\t\t\t $this->excel->getActiveSheet()->getColumnDimension('C')->setWidth(25);\n\t\t\t $this->excel->getActiveSheet()->getColumnDimension('D')->setWidth(30);\n\t\t\t $this->excel->getActiveSheet()->getColumnDimension('E')->setWidth(15);\n\t\t\t $this->excel->getActiveSheet()->getColumnDimension('F')->setWidth(15);\n\t\t\t $this->excel->getActiveSheet()->getColumnDimension('G')->setWidth(15);\n\t\t\t $this->excel->getActiveSheet()->getColumnDimension('H')->setWidth(15);\n\t\t\t $this->excel->getActiveSheet()->getColumnDimension('I')->setWidth(15);\n\t\t\t $this->excel->getActiveSheet()->getColumnDimension('J')->setWidth(40);\n\t\t\t $this->excel->getActiveSheet()->getColumnDimension('K')->setWidth(25);\n \n \t\t$no = 3;\n \t\t$nomor = 1;\n \t\tforeach ($data as $v) \n \t\t{\n \t\t\t\n \t\t\t$this->excel->getActiveSheet()->getStyle('A' . $no)->getAlignment()->setWrapText(true);\n \t\t\t$this->excel->getActiveSheet()->getStyle('A' . $no)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->getStyle('A' . $no)->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->setCellValue('A' . $no, $nomor);\n\n \t\t\t$this->excel->getActiveSheet()->getStyle('B' . $no)->getAlignment()->setWrapText(true);\n \t\t\t$this->excel->getActiveSheet()->getStyle('B' . $no)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->getStyle('B' . $no)->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->setCellValue('B' . $no, $v->patient_noregis);\n\n \t\t\t$this->excel->getActiveSheet()->getStyle('C' . $no)->getAlignment()->setWrapText(true);\n \t\t\t$this->excel->getActiveSheet()->getStyle('C' . $no)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->getStyle('C' . $no)->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->setCellValue('C' . $no, strval($v->patient_noktp));\n\n \t\t\t$this->excel->getActiveSheet()->getStyle('D' . $no)->getAlignment()->setWrapText(true);\n \t\t\t$this->excel->getActiveSheet()->getStyle('D' . $no)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->getStyle('D' . $no)->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER);\n\t\t\t\t$this->excel->getActiveSheet()->setCellValue('D' . $no, $v->patient_name);\n\t\t\t\t \n \t\t\t$this->excel->getActiveSheet()->getStyle('E' . $no)->getAlignment()->setWrapText(true);\n \t\t\t$this->excel->getActiveSheet()->getStyle('E' . $no)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->getStyle('E' . $no)->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER);\n\t\t\t\t$this->excel->getActiveSheet()->setCellValue('E' . $no, $v->patient_sex);\n\t\t\t\t \n \t\t\t$this->excel->getActiveSheet()->getStyle('F' . $no)->getAlignment()->setWrapText(true);\n \t\t\t$this->excel->getActiveSheet()->getStyle('F' . $no)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->getStyle('F' . $no)->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER);\n\t\t\t\t$this->excel->getActiveSheet()->setCellValue('F' . $no, $v->patient_datebirth);\n\n \t\t\t$this->excel->getActiveSheet()->getStyle('G' . $no)->getAlignment()->setWrapText(true);\n \t\t\t$this->excel->getActiveSheet()->getStyle('G' . $no)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->getStyle('G' . $no)->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER);\n\t\t\t\t$this->excel->getActiveSheet()->setCellValue('G' . $no, $v->patient_religion);\n\t\t\t\t \n \t\t\t$this->excel->getActiveSheet()->getStyle('H' . $no)->getAlignment()->setWrapText(true);\n \t\t\t$this->excel->getActiveSheet()->getStyle('H' . $no)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->getStyle('H' . $no)->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER);\n\t\t\t\t$this->excel->getActiveSheet()->setCellValue('H' . $no, $v->patient_job);\n\t\t\t\t \n \t\t\t$this->excel->getActiveSheet()->getStyle('I' . $no)->getAlignment()->setWrapText(true);\n \t\t\t$this->excel->getActiveSheet()->getStyle('I' . $no)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->getStyle('I' . $no)->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER);\n\t\t\t\t$this->excel->getActiveSheet()->setCellValue('I' . $no, $v->patient_phone);\n\t\t\t\t \n\t\t\t\t$this->excel->getActiveSheet()->getStyle('J' . $no)->getAlignment()->setWrapText(true);\n \t\t\t$this->excel->getActiveSheet()->getStyle('J' . $no)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->getStyle('J' . $no)->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER);\n\t\t\t\t\t\t$this->excel->getActiveSheet()->setCellValue('J' . $no, $v->patient_address);\n\t\t\t\t\t\t\n\t\t\t\t$this->excel->getActiveSheet()->getStyle('K' . $no)->getAlignment()->setWrapText(true);\n \t\t\t$this->excel->getActiveSheet()->getStyle('K' . $no)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->getStyle('K' . $no)->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->setCellValue('K' . $no, $v->patient_registerdate);\n\t\t\t\t\n\t\t\t\t$no++;\n \t\t\t$nomor++;\n \t\t}\n \n \t\t$this->excel->getActiveSheet()->getStyle('A2:K' . ($no - 1))->applyFromArray($styleArray);\n \t\tob_end_clean();\n \t\t$filename = 'Daftar Pasien Aplikasi SN Health Center.xls'; //save our workbook as this file name\n \t\theader('Content-Type: application/vnd.ms-excel'); //mime type\n \t\theader('Content-Disposition: attachment;filename=\"' . $filename . '\"'); //tell browser what's the file name\n \t\theader('Cache-Control: max-age=0'); //no cache\n \t\t$objWriter = PHPExcel_IOFactory::createWriter($this->excel, 'Excel5');\n \t\t$objWriter->save('php://output');\n \n \t\tredirect('admin/patient');\n \t\t}",
"public function exportExcelAction(){\r\n $fileName = 'siege.xls';\r\n $content = $this->getLayout()->createBlock('reseauchx_reservationreseau/adminhtml_siege_grid')->getExcelFile();\r\n $this->_prepareDownloadResponse($fileName, $content);\r\n }",
"public function export(){\n\t $list_id = $this->uri->segment(3);\n\t $list_name = $this->distributiondata->getinfobyid('title',$list_id); \n\t \t$query = $this->distributionemails->getbyattribute('list_id',$list_id);\n\t\t\tif ($query->num_rows() > 0){\n\t\t\t\t$header[] = \"Email\";\n\t\t\t\t$header[] = \"Owner\";\n\t\t\t\t$header[] = \"Domains\";\n\t\t\t\t$this->exportxls->addHeader($header);\n\t\t\t\t\n\t\t\t\tforeach ($query->result() as $row){\n\t\t\t\t\t\n\t\t\t\t\t\t$data_row = array();\n\t\t\t\t\t\t$data_row[] = $row->email;\n\t\t\t\t\t\t$data_row[] = $row->owner;\n\t\t\t\t\t\t$data_row[] = $row->domains;\n\t\t\t\t\t\t$this->exportxls->addRow($data_row);\n\t\t\t\t }\n\t\t\t}\n\t\t\n\t\t$list_name = str_replace(' ','',strtolower($list_name));\n\t\t$this->exportxls->sendFile($list_name.'.xls');\n\t}",
"public function exportCatProcesosExcel(){\n return Excel::download(new ExcelExportCatProcesos, 'Cat_Procesos_'.date('d-m-Y').'.xlsx');\n }",
"public function export_excel()\n {\n return (new SiswaExport)->download('StudentList.xlsx');\n }",
"public function exportExcelAction()\n {\n $fileName = 'coursedoc.xls';\n $content = $this->getLayout()->createBlock('bs_coursedoc/adminhtml_coursedoc_grid')\n ->getExcelFile();\n $this->_prepareDownloadResponse($fileName, $content);\n }",
"public function exportExcelAction()\n {\n $fileName = 'traineedoc.xls';\n $content = $this->getLayout()->createBlock('bs_traineedoc/adminhtml_traineedoc_grid')\n ->getExcelFile();\n $this->_prepareDownloadResponse($fileName, $content);\n }",
"public function exportExcelAction()\n {\n $fileName = 'curriculumdoc.xls';\n $content = $this->getLayout()->createBlock('bs_curriculumdoc/adminhtml_curriculumdoc_grid')\n ->getExcelFile();\n $this->_prepareDownloadResponse($fileName, $content);\n }",
"function export(){\n\n $this->load->model(\"MBenang\");\n\n $this->load->library(\"excel\");\n\n $object = new PHPExcel();\n\n $object->setActiveSheetIndex(0);\n\n // Nama Field Baris Pertama\n $table_columns = $this->MBenang->getColoumnName();\n\n $column = 0;\n\n $object->getActiveSheet()->setCellValueByColumnAndRow($column, 1, 'Data Master Benang');\n\n $object->getActiveSheet()->setTitle('Data Master Benang');\n\n foreach($table_columns as $field){\n\n\n $object->getActiveSheet()->setCellValueByColumnAndRow($column, 2, $field);\n\n $object->getActiveSheet()->getColumnDimension()->setAutoSize(true);\n\n $object->getSheet(0)->getStyle('A3:C3')->getBorders()->getAllBorders()->getColor()->setRGB('949FA8');\n\n $column++;\n\n }\n\n $benang_data = $this->MBenang->fetch_data();\n\n $excel_row = 3;\n\n foreach($benang_data as $row){\n\n $object->getActiveSheet()->setCellValueByColumnAndRow(0, $excel_row, $row->kd_jenis);\n\n $object->getActiveSheet()->setCellValueByColumnAndRow(1, $excel_row, $row->jenis_benang);\n\n $excel_row++;\n\n }\n\n $object_writer = PHPExcel_IOFactory::createWriter($object, 'Excel2007');\n\n header('Content-Type: application/vnd.ms-excel');\n\n header('Content-Disposition: attachment;filename=\"Data-master-benang.xls\"');\n\n $object_writer->save('php://output');\n\n }",
"public function sales_report_export_xls() {\n\n //Read page parameter to display report\n $tenant_id = $this->session->userdata('userDetails')->tenant_id;\n $sales_exec = $this->input->get('sales_exec');\n $start_date = $this->input->get('start');\n $end_date = $this->input->get('end');\n \n\n $tabledata = $this->reportsModel->get_sales_report_data_xls($tenant_id, $start_date, $end_date, $sales_exec);\n $this->load->helper('export_helper');\n \n export_sales_report_xls($tabledata);\n }",
"function exportExcel($expTitle, $expCellName, $expTableData) {\n $xlsTitle = iconv('utf-8', 'gb2312', $expTitle); //文件名称\n $fileName = $xlsTitle . $_SESSION['loginAccount'] . date('_YmdHis'); //or $xlsTitle 文件名称可根据自己情况设定\n $cellNum = count($expCellName);\n $dataNum = count($expTableData);\n vendor(\"PhpExcel.PHPExcel\", '', '.php');\n $objPHPExcel = new \\PHPExcel();\n $cellName = array('A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'AA', 'AB', 'AC', 'AD', 'AE', 'AF', 'AG', 'AH', 'AI', 'AJ', 'AK', 'AL', 'AM', 'AN', 'AO', 'AP', 'AQ', 'AR', 'AS', 'AT', 'AU', 'AV', 'AW', 'AX', 'AY', 'AZ');\n\n //$objPHPExcel->getActiveSheet(0)->mergeCells('A1:'.$cellName[$cellNum-1].'1');//合并单元格\n //$objPHPExcel->setActiveSheetIndex(0)->setCellValue('A1', $expTitle.' Export time:'.date('Y-m-d H:i:s')); \n for ($i = 0; $i < $cellNum; $i++) {\n $objPHPExcel->setActiveSheetIndex(0)->setCellValue($cellName[$i] . '1', $expCellName[$i][1]);\n }\n // Miscellaneous glyphs, UTF-8 \n for ($i = 0; $i < $dataNum; $i++) {\n for ($j = 0; $j < $cellNum; $j++) {\n $objPHPExcel->getActiveSheet(0)->setCellValueExplicit($cellName[$j] . ($i + 2), $expTableData[$i][$expCellName[$j][0]], \\PHPExcel_Cell_DataType::TYPE_STRING2);\n }\n }\n\n header('pragma:public');\n header('Content-type:application/vnd.ms-excel;charset=utf-8;name=\"' . $xlsTitle . '.xls\"');\n header(\"Content-Disposition:attachment;filename=$fileName.xls\"); //attachment新窗口打印inline本窗口打印\n $objWriter = \\PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');\n $objWriter->save('php://output');\n exit;\n}",
"public function export_excel(){\n // Load plugin PHPExcel nya\n include APPPATH.'third_party/PHPExcel/PHPExcel.php';\n \n // Panggil class PHPExcel nya\n $excel = new PHPExcel();\n // Settingan awal fil excel\n $excel->getProperties()->setCreator('SIMITA')\n ->setLastModifiedBy('SIMITA')\n ->setTitle(\"Data Koneksi Internet\")\n ->setSubject(\"Koneksi Internet\")\n ->setDescription(\"Laporan Data Koneksi Internet\")\n ->setKeywords(\"Laporan\");\n // Buat sebuah variabel untuk menampung pengaturan style dari header tabel\n $style_col = array(\n 'font' => array('bold' => true), // Set font nya jadi bold\n 'alignment' => array(\n 'horizontal' => PHPExcel_Style_Alignment::HORIZONTAL_CENTER, // Set text jadi ditengah secara horizontal (center)\n 'vertical' => PHPExcel_Style_Alignment::VERTICAL_CENTER // Set text jadi di tengah secara vertical (middle)\n ),\n 'borders' => array(\n 'top' => array('style' => PHPExcel_Style_Border::BORDER_THIN), // Set border top dengan garis tipis\n 'right' => array('style' => PHPExcel_Style_Border::BORDER_THIN), // Set border right dengan garis tipis\n 'bottom' => array('style' => PHPExcel_Style_Border::BORDER_THIN), // Set border bottom dengan garis tipis\n 'left' => array('style' => PHPExcel_Style_Border::BORDER_THIN) // Set border left dengan garis tipis\n )\n );\n // Buat sebuah variabel untuk menampung pengaturan style dari isi tabel\n $style_row = array(\n 'alignment' => array(\n 'vertical' => PHPExcel_Style_Alignment::VERTICAL_CENTER // Set text jadi di tengah secara vertical (middle)\n ),\n 'borders' => array(\n 'top' => array('style' => PHPExcel_Style_Border::BORDER_THIN), // Set border top dengan garis tipis\n 'right' => array('style' => PHPExcel_Style_Border::BORDER_THIN), // Set border right dengan garis tipis\n 'bottom' => array('style' => PHPExcel_Style_Border::BORDER_THIN), // Set border bottom dengan garis tipis\n 'left' => array('style' => PHPExcel_Style_Border::BORDER_THIN) // Set border left dengan garis tipis\n )\n );\n $excel->setActiveSheetIndex(0)->setCellValue('A1', \"LAPORAN DATA INVENTORY INTERNET CABANG\"); // Set kolom A1 dengan tulisan \"DATA SISWA\"\n $excel->getActiveSheet()->mergeCells('A1:G1'); // Set Merge Cell pada kolom A1 sampai E1\n $excel->getActiveSheet()->getStyle('A1')->getFont()->setBold(TRUE); // Set bold kolom A1\n $excel->getActiveSheet()->getStyle('A1')->getFont()->setSize(15); // Set font size 15 untuk kolom A1\n $excel->getActiveSheet()->getStyle('A1')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER); // Set text center untuk kolom A1\n // Buat header tabel nya pada baris ke 3\n $excel->setActiveSheetIndex(0)->setCellValue('A3', \"NO\"); // Set kolom A3 \n $excel->setActiveSheetIndex(0)->setCellValue('B3', \"CABANG\"); // Set kolom B3 \n $excel->setActiveSheetIndex(0)->setCellValue('C3', \"PROVIDER\"); // Set kolom C3 \n $excel->setActiveSheetIndex(0)->setCellValue('D3', \"NO.PELANGGAN\"); // Set kolom D3 \n $excel->setActiveSheetIndex(0)->setCellValue('E3', \"IP PUBLIC\"); // Set kolom E3 \n $excel->setActiveSheetIndex(0)->setCellValue('F3', \"Tgl. Kontrak\");\n $excel->setActiveSheetIndex(0)->setCellValue('G3', \"Tgl. Habis Kontrak\");\n // Apply style header yang telah kita buat tadi ke masing-masing kolom header\n $excel->getActiveSheet()->getStyle('A3')->applyFromArray($style_col);\n $excel->getActiveSheet()->getStyle('B3')->applyFromArray($style_col);\n $excel->getActiveSheet()->getStyle('C3')->applyFromArray($style_col);\n $excel->getActiveSheet()->getStyle('D3')->applyFromArray($style_col);\n $excel->getActiveSheet()->getStyle('E3')->applyFromArray($style_col);\n $excel->getActiveSheet()->getStyle('F3')->applyFromArray($style_col);\n $excel->getActiveSheet()->getStyle('G3')->applyFromArray($style_col);\n $internet = $this->m_internet->semua()->result();\n $no = 1; // Untuk penomoran tabel, di awal set dengan 1\n $numrow = 4; // Set baris pertama untuk isi tabel adalah baris ke 4\n foreach($internet as $data){ // Lakukan looping pada variabel\n $excel->setActiveSheetIndex(0)->setCellValue('A'.$numrow, $no);\n $excel->setActiveSheetIndex(0)->setCellValue('B'.$numrow, $data->nama_cabang);\n $excel->setActiveSheetIndex(0)->setCellValue('C'.$numrow, $data->nama_provider);\n $excel->setActiveSheetIndex(0)->setCellValue('D'.$numrow, $data->nomor_pelanggan);\n $excel->setActiveSheetIndex(0)->setCellValue('E'.$numrow, $data->ip_public);\n $excel->setActiveSheetIndex(0)->setCellValue('F'.$numrow, $data->tanggal_kontrak);\n $excel->setActiveSheetIndex(0)->setCellValue('G'.$numrow, $data->masa_kontrak);\n \n // Apply style row yang telah kita buat tadi ke masing-masing baris (isi tabel)\n $excel->getActiveSheet()->getStyle('A'.$numrow)->applyFromArray($style_row);\n $excel->getActiveSheet()->getStyle('B'.$numrow)->applyFromArray($style_row);\n $excel->getActiveSheet()->getStyle('C'.$numrow)->applyFromArray($style_row);\n $excel->getActiveSheet()->getStyle('D'.$numrow)->applyFromArray($style_row);\n $excel->getActiveSheet()->getStyle('E'.$numrow)->applyFromArray($style_row);\n $excel->getActiveSheet()->getStyle('F'.$numrow)->applyFromArray($style_row);\n $excel->getActiveSheet()->getStyle('G'.$numrow)->applyFromArray($style_row);\n \n $no++; // Tambah 1 setiap kali looping\n $numrow++; // Tambah 1 setiap kali looping\n }\n // Set width kolom\n $excel->getActiveSheet()->getColumnDimension('A')->setWidth(5); // Set width kolom A\n $excel->getActiveSheet()->getColumnDimension('B')->setWidth(30); // Set width kolom B\n $excel->getActiveSheet()->getColumnDimension('C')->setWidth(25); // Set width kolom C\n $excel->getActiveSheet()->getColumnDimension('D')->setWidth(20); // Set width kolom D\n $excel->getActiveSheet()->getColumnDimension('E')->setWidth(25); // Set width kolom E\n $excel->getActiveSheet()->getColumnDimension('F')->setWidth(25);\n $excel->getActiveSheet()->getColumnDimension('G')->setWidth(25);\n \n // Set height semua kolom menjadi auto (mengikuti height isi dari kolommnya, jadi otomatis)\n $excel->getActiveSheet()->getDefaultRowDimension()->setRowHeight(-1);\n // Set orientasi kertas jadi LANDSCAPE\n $excel->getActiveSheet()->getPageSetup()->setOrientation(PHPExcel_Worksheet_PageSetup::ORIENTATION_LANDSCAPE);\n // Set judul file excel nya\n $excel->getActiveSheet(0)->setTitle(\"Laporan Data Siswa\");\n $excel->setActiveSheetIndex(0);\n // Proses file excel\n header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');\n header('Content-Disposition: attachment; filename=\"Laporan Koneksi Internet.xlsx\"'); // Set nama file excel nya\n header('Cache-Control: max-age=0');\n $write = PHPExcel_IOFactory::createWriter($excel, 'Excel2007');\n $write->save('php://output');\n }",
"public function actionExport()\n {\n // export data to excel file\n return $this->render('export');\n }",
"public function exportExcelAction()\n {\n $fileName = 'kstitem.xls';\n $content = $this->getLayout()->createBlock('bs_kst/adminhtml_kstitem_grid')\n ->getExcelFile();\n $this->_prepareDownloadResponse($fileName, $content);\n }",
"public function exportXLS()\n {\n $contact = Contact::all();\n Excel::create('List Contact', function($excel) use ($contact) {\n\n $excel->sheet('List Contact', function($sheet) use ($contact) {\n\n $sheet->fromArray($contact);\n\n });\n\n })->export('xlsx');\n }",
"public function exportExcelAction()\n {\n $fileName = 'ifeedback.xls';\n $content = $this->getLayout()->createBlock('bs_kst/adminhtml_ifeedback_grid')\n ->getExcelFile();\n $this->_prepareDownloadResponse($fileName, $content);\n }",
"public function export_excel()\n\t{\n\t$data = array(\n array ('Name', 'Surname'),\n array('Schwarz', 'Oliver'),\n array('Test', 'Peter')\n );\n\t\t\n\t\t//$data = $this->db->get('test')->result_array();\n\t\t$this->load->library('Excel-Generation/excel_xml');\n\t\t$this->excel_xml->addArray($data);\n\t\t$this->excel_xml->generateXML('my-test');\n\t}",
"public function export()\n {\n return Excel::download(new ProductExport, 'products-' . date('Y-m-d') . '.xlsx');\n }",
"function exportToExcel($exportConfigData){\n $files = glob('../lib/Excel/*');\n if(isset($files[0])){\n unlink($files[0]); \n }\n\n if(!isset($exportConfigData['exportOptions'])){\n return;\n }\n\n $marginTop = 1;\n $marginLeft = 1;\n\n include_once('../lib/PHPExcel/IOFactory.php');\n\n $feildsNum = count($exportConfigData['exportOptions']);\n if(isset($_SESSION['sort'])){\n $sortBy = $_SESSION['sort'];\n unset($_SESSION['sort']);\n }\n $first = NULL;\n $second = NULL;\n if(isset($exportConfigData[\"groupingOptions\"])){\n if(isset($exportConfigData[\"groupingOptions\"][\"first\"])){\n $first = trim($exportConfigData[\"groupingOptions\"][\"first\"]);\n }\n if(isset($exportConfigData[\"groupingOptions\"][\"second\"])){\n $second = trim($exportConfigData[\"groupingOptions\"][\"second\"]);\n }\n }\n $query = excelGroupByQuery($first, $second);\n $q = $GLOBALS['db']->query($query);\n\n //set the desired name of the excel file\n if(isset($exportConfigData['title'])){\n $fileName = $exportConfigData['title'];\n } else{\n $fileName = \"excelSheet\";\n }\n \n $objPHPExcel = new PHPExcel();\n\n // Set document properties\n $objPHPExcel->getProperties()->setCreator(\"Me\")->setLastModifiedBy(\"Me\")->setTitle($exportConfigData['title'])->setSubject($exportConfigData['title'])->setDescription(\"Excel Sheet\")->setKeywords(\"Excel Sheet\")->setCategory(\"Me\");\n\n // Set active sheet index to the first sheet, so Excel opens this as the first sheet\n $objPHPExcel->setActiveSheetIndex(0);\n\n $headerStyle = array('font' => array('size' => 15,'bold' => true,'color' => array('rgb' => '444444')));\n\n // Printing Feilds Header Name\n for($i=0; $i<$feildsNum; $i++){\n $objPHPExcel->getActiveSheet()->setCellValue( chr(66 + $i) . \"\" . ($marginTop + 1), $exportConfigData['exportOptions'][$i]);\n $objPHPExcel->getActiveSheet()->getStyle(chr(66 + $i) . \"\" . ($marginTop + 1))->applyFromArray($headerStyle);\n }\n\n // Printing Data\n $rows = $q->fetchAll();\n $rowsNum = count($rows);\n for($j = 0; $j < $rowsNum; $j++){\n for($i=0; $i<$feildsNum; $i++){\n $objPHPExcel->getActiveSheet()->setCellValue( chr(66 + $i) . \"\" . ($marginTop + 2 + $j), $rows[$j][$exportConfigData['exportOptions'][$i]]);\n }\n }\n\n // Set worksheet title\n $objPHPExcel->getActiveSheet()->setTitle($fileName);\n\n $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');\n $objWriter->save('../lib/Excel/' . $fileName . '.xlsx');\n\n // Redirect output to a client’s web browser (Excel2007)\n /*\n header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');\n header('Content-Disposition: attachment;filename=\"' . $fileName . '.xlsx\"');\n header('Cache-Control: max-age=0');\n\n $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');\n $objWriter->save('php://output');*/\n }",
"public function exportExcelAction()\n {\n $fileName = 'equipment.xls';\n $content = $this->getLayout()->createBlock('bs_logistics/adminhtml_equipment_grid')\n ->getExcelFile();\n $this->_prepareDownloadResponse($fileName, $content);\n }",
"public function export() \n {\n return Excel::download(new EmployesListe, 'employe.xlsx');\n }",
"function export_xls() {\n $engagementconfs = Configure::read('engagementConf');\n $this->set('engagementconfs',$engagementconfs);\n $data = $this->Session->read('xls_export');\n //$this->Session->delete('xls_export'); \n $this->set('rows',$data);\n $this->render('export_xls','export_xls');\n }",
"function do_export_as_xlsx($search_list){\r\n\r\n\t$file_name='office_shipment_export';\r\n\r\n\t//$cell_nos = array('A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S');\r\n\t$cell_captains=array(\r\n\t\t'A'=>'发货单号','B'=>'业务组织','C'=>'发货日期',\r\n\t\t'D'=>'发出省','E'=>'市','F'=>'区',\r\n\t\t'G'=>'到达省','H'=>'市','I'=>'区',\r\n\t\t'J'=>'运单号','K'=>'包裹类型','L'=>'快递方式','M'=>'重量','N'=>'操作人',\r\n\t\t'O'=>'状态','P'=>'备注',\r\n\t\t'Q'=>'姓名','R'=>'操作时间',\r\n\t);\r\n \t\r\n $excel = new PHPExcel();\r\n $excel->getProperties()->setTitle($file_name);\r\n $sheet_no = 1;\r\n\r\n $sheet_no ++;\r\n $sheet = $excel->getActiveSheet();\r\n $sheet->setTitle('sheet1');\r\n foreach ($cell_captains as $key => $value) {\r\n \t$sheet->setCellValue($key.'1',$value);\r\n }\r\n foreach ($search_list as $no => $line) {\r\n \t$i=$no+2;\r\n\r\n \tglobal $db;\r\n \t$sql=\"SELECT p.NAME FROM romeo.party p WHERE p.PARTY_ID='\".$line['party_id'].\"';\";\r\n \t$party_name=$db->getOne($sql);\r\n \t//<!--{if $item.package_type == 1}-->文件<!--{else if $item.package_type == 2}-->包裹<!--{/if}-->\r\n\t\t$sheet->setCellValue(\"A$i\", $line['shipment_id']);\r\n\t\t$sheet->setCellValue(\"B$i\", $party_name);//$line['party_id']\r\n\t\t$sheet->setCellValue(\"C$i\", $line['shipping_date']);\r\n\t\t$sheet->setCellValue(\"D$i\", $line['start_province_name']);\r\n\t\t$sheet->setCellValue(\"E$i\", $line['start_city_name']);\r\n\t\t$sheet->setCellValue(\"F$i\", $line['start_district_name']);\r\n\t\t$sheet->setCellValue(\"G$i\", $line['end_province_name']);\r\n\t\t$sheet->setCellValue(\"H$i\", $line['end_city_name']);\r\n\t\t$sheet->setCellValue(\"I$i\", $line['end_district_name']);\r\n\t\t$sheet->setCellValue(\"J$i\", $line['tracking_number']);\r\n\t\t$sheet->setCellValue(\"K$i\", ($line['package_type']==1?'文件':($line['package_type']==2?'包裹':'未知')));\r\n\t\t$sheet->setCellValue(\"L$i\", $line['shipping_name']);\r\n\t\t$sheet->setCellValue(\"M$i\", $line['weight']);\r\n\t\t$sheet->setCellValue(\"N$i\", $line['action_user']);\r\n\t\t$sheet->setCellValue(\"O$i\", $line['status']);\r\n\t\t$sheet->setCellValue(\"P$i\", $line['note']);\r\n\t\t$sheet->setCellValue(\"Q$i\", $line['name']);\r\n\t\t$sheet->setCellValue(\"R$i\", $line['action_time']);\r\n\t}\r\n\r\n header('Content-Type: application/vnd.ms-excel');\r\n header('Content-Disposition: attachment;filename=\"'.$file_name.'.xls\"');\r\n header('Cache-Control: max-age=0');\r\n $output = PHPExcel_IOFactory::createWriter($excel, 'Excel5');\r\n $output->save('php://output');\r\n exit;\r\n}",
"public function DowloadExcel()\n {\n return $export->sheet('sheetName', function($sheet)\n {\n\n })->export('xls');\n }",
"function export($config, $view) {\n\t\t$objPHPExcel = new PHPExcel();\n\t\t$objPHPExcel->getProperties()->setCreator('HITS Soluciones Informáticas');\n\t\t$objPHPExcel->getActiveSheetIndex(0);\n\t\t$objPHPExcel->getActiveSheet()->setTitle($config['title']);//Titulo como variable\n\t\t$column = 0;\n\t\t$row = 1;\n\t\tif($config['header']) {\n\t\t\tforeach ($config['header'] as $header) {\n\t\t\t\t$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($column, $row, $header);\n\t\t\t\t$column++;\n\t\t\t}\n\t\t\t$column = 0;\n\t\t\t$row++;\n\t\t}\n\t\tforeach ($view as $record) {\n\t\t\tforeach ($record as $value) {\n\t\t\t\t$objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($column, $row, $value);\n\t\t\t\t$column++;\n\t\t\t}\n\t\t\t$column = 0;\n\t\t\t$row++;\n\t\t}\n\t\tfor ($i = 'A'; $i <= 'Z'; $i++){\n\t\t\t$objPHPExcel->getActiveSheet()->getColumnDimension($i)->setAutoSize(true); \n\t\t}\n\t\t$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');\n\t\theader('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');\n\t\theader('Content-Disposition: attachment;filename=\"'.$config['title'].'.xlsx');\n\t\theader('Cache-Control: max-age=0');\n\t\t$objWriter->save('php://output');\n\t}",
"public function companiessExport(){\n \n return Excel::download( new CompaniesExport , 'companies.xls');\n\n }",
"public function export()\n {\n include APPPATH . 'third_party/PHPExcel.php';\n\n // Panggil class PHPExcel nya\n $excel = new PHPExcel();\n\n date_default_timezone_set('Asia/Jakarta');\n $date = date(\"mY\");\n\n // Settingan awal fil excel\n $excel->getProperties()->setCreator('Admin PTPN VIII (' .$this->session->userdata('status_login'). ')')\n ->setLastModifiedBy('Admin PTPN VIII (' .$this->session->userdata('status_login'). ')')\n ->setTitle(\"Data A1\" .$date)\n ->setSubject(\"A1\" .$date)\n ->setDescription(\"Laporan Data A1\" .$date)\n ->setKeywords(\"Data A1\" .$date);\n\n // Buat sebuah variabel untuk menampung pengaturan style dari header tabel\n $style_col = array(\n 'font' => array('bold' => true), // Set font nya jadi bold\n 'alignment' => array(\n 'horizontal' => PHPExcel_Style_Alignment::HORIZONTAL_CENTER, // Set text jadi ditengah secara horizontal (center)\n 'vertical' => PHPExcel_Style_Alignment::VERTICAL_CENTER // Set text jadi di tengah secara vertical (middle)\n ),\n 'borders' => array(\n 'top' => array('style' => PHPExcel_Style_Border::BORDER_THIN), // Set border top dengan garis tipis\n 'right' => array('style' => PHPExcel_Style_Border::BORDER_THIN), // Set border right dengan garis tipis\n 'bottom' => array('style' => PHPExcel_Style_Border::BORDER_THIN), // Set border bottom dengan garis tipis\n 'left' => array('style' => PHPExcel_Style_Border::BORDER_THIN) // Set border left dengan garis tipis\n )\n );\n // Buat sebuah variabel untuk menampung pengaturan style dari isi tabel\n $style_row = array(\n 'alignment' => array(\n 'vertical' => PHPExcel_Style_Alignment::VERTICAL_CENTER // Set text jadi di tengah secara vertical (middle)\n ),\n 'borders' => array(\n 'top' => array('style' => PHPExcel_Style_Border::BORDER_THIN), // Set border top dengan garis tipis\n 'right' => array('style' => PHPExcel_Style_Border::BORDER_THIN), // Set border right dengan garis tipis\n 'bottom' => array('style' => PHPExcel_Style_Border::BORDER_THIN), // Set border bottom dengan garis tipis\n 'left' => array('style' => PHPExcel_Style_Border::BORDER_THIN) // Set border left dengan garis tipis\n )\n );\n\n // Buat header tabel nya pada baris ke 1\n $excel->setActiveSheetIndex(0)->setCellValue('A1', \"NPP\");\n $excel->setActiveSheetIndex(0)->setCellValue('B1', \"NAMA\");\n $excel->setActiveSheetIndex(0)->setCellValue('C1', \"NM_PGL\");\n $excel->setActiveSheetIndex(0)->setCellValue('D1', \"GLR_DPN\");\n $excel->setActiveSheetIndex(0)->setCellValue('E1', \"GLR_BLK\");\n $excel->setActiveSheetIndex(0)->setCellValue('F1', \"TPT_LAHIR\");\n $excel->setActiveSheetIndex(0)->setCellValue('G1', \"TGL_LAHIR\");\n $excel->setActiveSheetIndex(0)->setCellValue('H1', \"KELAMIN\");\n $excel->setActiveSheetIndex(0)->setCellValue('I1', \"GOL_DARAH\");\n $excel->setActiveSheetIndex(0)->setCellValue('J1', \"AGAMA\");\n $excel->setActiveSheetIndex(0)->setCellValue('K1', \"ALAMAT\");\n $excel->setActiveSheetIndex(0)->setCellValue('L1', \"KOTA\");\n $excel->setActiveSheetIndex(0)->setCellValue('M1', \"TINGGAL\");\n $excel->setActiveSheetIndex(0)->setCellValue('N1', \"SIPIL\");\n $excel->setActiveSheetIndex(0)->setCellValue('O1', \"STAT_IS\");\n $excel->setActiveSheetIndex(0)->setCellValue('P1', \"TGL_NIKAH\");\n $excel->setActiveSheetIndex(0)->setCellValue('Q1', \"TGL_CERAI\");\n $excel->setActiveSheetIndex(0)->setCellValue('R1', \"KANDUNG\");\n $excel->setActiveSheetIndex(0)->setCellValue('S1', \"ANGKAT\");\n $excel->setActiveSheetIndex(0)->setCellValue('T1', \"TANGGUNG\");\n $excel->setActiveSheetIndex(0)->setCellValue('U1', \"TGL_PPH\");\n $excel->setActiveSheetIndex(0)->setCellValue('V1', \"KD_PEND\");\n $excel->setActiveSheetIndex(0)->setCellValue('W1', \"TGL_SK\");\n $excel->setActiveSheetIndex(0)->setCellValue('X1', \"NO_SK\");\n $excel->setActiveSheetIndex(0)->setCellValue('Y1', \"KD_KELAS\");\n $excel->setActiveSheetIndex(0)->setCellValue('Z1', \"KLS_TMT\");\n $excel->setActiveSheetIndex(0)->setCellValue('AA1', \"KLS_SK\");\n $excel->setActiveSheetIndex(0)->setCellValue('AB1', \"GOL\");\n $excel->setActiveSheetIndex(0)->setCellValue('AC1', \"MK\");\n $excel->setActiveSheetIndex(0)->setCellValue('AD1', \"GOL_TMT\");\n $excel->setActiveSheetIndex(0)->setCellValue('AE1', \"GOL_SK\");\n $excel->setActiveSheetIndex(0)->setCellValue('AF1', \"GPO\");\n $excel->setActiveSheetIndex(0)->setCellValue('AG1', \"KD_KBN\");\n $excel->setActiveSheetIndex(0)->setCellValue('AH1', \"KD_ADF\");\n $excel->setActiveSheetIndex(0)->setCellValue('AI1', \"KD_JAB\");\n $excel->setActiveSheetIndex(0)->setCellValue('AJ1', \"NAMA_JAB\");\n $excel->setActiveSheetIndex(0)->setCellValue('AK1', \"KD_BUD\");\n $excel->setActiveSheetIndex(0)->setCellValue('AL1', \"JAB_TMT\");\n $excel->setActiveSheetIndex(0)->setCellValue('AM1', \"JAB_SK\");\n $excel->setActiveSheetIndex(0)->setCellValue('AN1', \"JAB_TGL\");\n $excel->setActiveSheetIndex(0)->setCellValue('AO1', \"ASTEK\");\n $excel->setActiveSheetIndex(0)->setCellValue('AP1', \"TASPEN\");\n $excel->setActiveSheetIndex(0)->setCellValue('AQ1', \"NO_KK\");\n $excel->setActiveSheetIndex(0)->setCellValue('AR1', \"NO_NIK\");\n $excel->setActiveSheetIndex(0)->setCellValue('AS1', \"NO_BPJS\");\n $excel->setActiveSheetIndex(0)->setCellValue('AT1', \"TGL_MPP\");\n $excel->setActiveSheetIndex(0)->setCellValue('AU1', \"TGL_PEN\");\n $excel->setActiveSheetIndex(0)->setCellValue('AV1', \"MKTHN\");\n $excel->setActiveSheetIndex(0)->setCellValue('AW1', \"MKBLN\");\n $excel->setActiveSheetIndex(0)->setCellValue('AX1', \"MKHR\");\n $excel->setActiveSheetIndex(0)->setCellValue('AY1', \"MPP\");\n $excel->setActiveSheetIndex(0)->setCellValue('AZ1', \"STAT_REC\");\n\n // Apply style header yang telah kita buat tadi ke masing-masing kolom header\n $excel->getActiveSheet()->getStyle('A1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('B1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('C1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('D1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('E1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('F1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('G1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('H1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('I1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('J1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('K1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('L1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('M1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('N1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('O1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('P1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_DATE_DDMMYYYY);\n $excel->getActiveSheet()->getStyle('Q1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_DATE_DDMMYYYY);\n $excel->getActiveSheet()->getStyle('R1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('S1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('T1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('U1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('V1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('W1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('X1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('Y1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('Z1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AA1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AB1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AC1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AD1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AE1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AF1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AG1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AH1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AI1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AJ1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AK1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AL1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AM1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AN1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AO1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AP1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AQ1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AR1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AS1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AT1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AU1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AV1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AW1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AX1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AY1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AZ1')->applyFromArray($style_col)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n\n // Menampilkan semua data dari tabel rekao A1\n $numrow = 2; // Set baris pertama untuk isi tabel adalah baris ke 2\n $sdm01 = $this->Model_admin->tampil_a1();\n foreach ($sdm01->result_array() as $i) { // Lakukan looping pada variabel siswa\n $excel->setActiveSheetIndex(0)->setCellValueExplicit('A' . $numrow, $i['npp'], PHPExcel_Cell_DataType::TYPE_STRING);\n $excel->setActiveSheetIndex(0)->setCellValue('B' . $numrow, $i['nama']);\n $excel->setActiveSheetIndex(0)->setCellValue('C' . $numrow, $i['nm_pgl']);\n $excel->setActiveSheetIndex(0)->setCellValue('D' . $numrow, $i['glr_dpn']);\n $excel->setActiveSheetIndex(0)->setCellValue('E' . $numrow, $i['glr_blk']);\n $excel->setActiveSheetIndex(0)->setCellValue('F' . $numrow, $i['kota_lhr']);\n $excel->setActiveSheetIndex(0)->setCellValue('G' . $numrow, date('d-m-Y', strtotime($i['tgl_lhr'])));\n $excel->setActiveSheetIndex(0)->setCellValue('H' . $numrow, $i['j_kelamin']);\n $excel->setActiveSheetIndex(0)->setCellValue('I' . $numrow, $i['gol_darah']);\n $excel->setActiveSheetIndex(0)->setCellValue('J' . $numrow, $i['agama']);\n $excel->setActiveSheetIndex(0)->setCellValue('K' . $numrow, $i['alamat_tgl']);\n $excel->setActiveSheetIndex(0)->setCellValue('L' . $numrow, '');\n $excel->setActiveSheetIndex(0)->setCellValue('M' . $numrow, '1');\n $excel->setActiveSheetIndex(0)->setCellValue('N' . $numrow, $i['st_sipil']);\n\n $sdm02 = $this->Model_admin->get_sdm02_a1($i['npp']);\n foreach ($sdm02 as $a) {\n\n $excel->setActiveSheetIndex(0)->setCellValue('O' . $numrow, '');\n $excel->setActiveSheetIndex(0)->setCellValue('P' . $numrow, date('d-m-Y', strtotime($a['tgl_nkh'])));\n $excel->setActiveSheetIndex(0)->setCellValue('Q' . $numrow, date('d-m-Y', strtotime($a['tgl_cerai'])));\n }\n\n $sdm02 = $this->Model_admin->get_sdm02_a1_anak($i['npp']);\n foreach ($sdm02 as $b) {\n $excel->setActiveSheetIndex(0)->setCellValue('R' . $numrow, '');\n $excel->setActiveSheetIndex(0)->setCellValue('S' . $numrow, '');\n $excel->setActiveSheetIndex(0)->setCellValue('T' . $numrow, $b['tanggungan']);\n $excel->setActiveSheetIndex(0)->setCellValue('U' . $numrow, '');\n }\n\n $sdm03 = $this->Model_admin->get_sdm03_a1($i['npp']);\n foreach ($sdm03 as $c) {\n $excel->setActiveSheetIndex(0)->setCellValueExplicit('V' . $numrow, $c['kd_pend'], PHPExcel_Cell_DataType::TYPE_STRING);\n }\n\n $excel->setActiveSheetIndex(0)->setCellValue('W' . $numrow, date('d-m-Y', strtotime($i['tgl_masuk'])));\n\n $sdm08 = $this->Model_admin->get_sdm08_a1($i['npp']);\n foreach ($sdm08 as $d) {\n\n $excel->setActiveSheetIndex(0)->setCellValue('X' . $numrow, $d['no_sk']);\n }\n\n $sdm16 = $this->Model_admin->get_sdm16_a1($i['npp']);\n foreach ($sdm16 as $e) {\n $excel->setActiveSheetIndex(0)->setCellValue('Y' . $numrow, $e['kd_kelas']);\n $excel->setActiveSheetIndex(0)->setCellValue('Z' . $numrow, date('d-m-Y', strtotime($e['kls_tmt'])));\n $excel->setActiveSheetIndex(0)->setCellValue('AA' . $numrow, $e['kls_sk']);\n }\n\n $sdm16 = $this->Model_admin->get_sdm16_a1_akhir($i['npp']);\n foreach ($sdm16 as $a) {\n $excel->setActiveSheetIndex(0)->setCellValueExplicit('AB' . $numrow, $a['golongan'], PHPExcel_Cell_DataType::TYPE_STRING);\n $excel->setActiveSheetIndex(0)->setCellValueExplicit('AC' . $numrow, $a['mk'], PHPExcel_Cell_DataType::TYPE_STRING);\n $excel->setActiveSheetIndex(0)->setCellValue('AD' . $numrow, date('d-m-Y', strtotime($a['gol_tmt'])));\n $excel->setActiveSheetIndex(0)->setCellValue('AE' . $numrow, $a['gol_sk']);\n $excel->setActiveSheetIndex(0)->setCellValue('AF' . $numrow, '');\n }\n\n $sdm08 = $this->Model_admin->get_sdm08_a1_akhir($i['npp']);\n foreach ($sdm08 as $a) {\n $excel->setActiveSheetIndex(0)->setCellValueExplicit('AG' . $numrow, $a['kd_kbn'], PHPExcel_Cell_DataType::TYPE_STRING);\n $excel->setActiveSheetIndex(0)->setCellValueExplicit('AH' . $numrow, $a['kd_adf'], PHPExcel_Cell_DataType::TYPE_STRING);\n $excel->setActiveSheetIndex(0)->setCellValueExplicit('AI' . $numrow, $a['kd_jab'], PHPExcel_Cell_DataType::TYPE_STRING);\n\n $jab = $this->Model_admin->get_jabatan($a['kd_jab']);\n foreach ($jab as $jab) {\n $excel->setActiveSheetIndex(0)->setCellValue('AJ' . $numrow, $jab['nama']);\n }\n\n $excel->setActiveSheetIndex(0)->setCellValueExplicit('AK' . $numrow, $a['kd_bud'], PHPExcel_Cell_DataType::TYPE_STRING);\n $excel->setActiveSheetIndex(0)->setCellValue('AL' . $numrow, date('d-m-Y', strtotime($a['jab_tmt'])));\n $excel->setActiveSheetIndex(0)->setCellValue('AM' . $numrow, $a['jab_sk']);\n $excel->setActiveSheetIndex(0)->setCellValue('AN' . $numrow, date('d-m-Y', strtotime($a['jab_tgl'])));\n }\n\n\n $excel->setActiveSheetIndex(0)->setCellValueExplicit('AO' . $numrow, $i['no_astek'], PHPExcel_Cell_DataType::TYPE_STRING);\n $excel->setActiveSheetIndex(0)->setCellValueExplicit('AP' . $numrow, $i['no_pens'], PHPExcel_Cell_DataType::TYPE_STRING);\n $excel->setActiveSheetIndex(0)->setCellValueExplicit('AQ' . $numrow, $i['no_kk'], PHPExcel_Cell_DataType::TYPE_STRING);\n $excel->setActiveSheetIndex(0)->setCellValueExplicit('AR' . $numrow, $i['no_nik'], PHPExcel_Cell_DataType::TYPE_STRING);\n $excel->setActiveSheetIndex(0)->setCellValueExplicit('AS' . $numrow, $i['no_bpjs'], PHPExcel_Cell_DataType::TYPE_STRING);\n\n $sdm16 = $this->Model_admin->get_sdm16_a1_akhir($i['npp']);\n $golongan = $sdm16[0]['golongan'];\n $golongan = (int)$golongan;\n if ($golongan >= 0 and $golongan <= 8) {\n $tgl_pen = date('Y-m-d', strtotime('+55 year +1 month', strtotime($i['tgl_lhr'])));\n $tgl_mpp = date('Y-m-d', strtotime('-6 month', strtotime($tgl_pen)));\n $excel->setActiveSheetIndex(0)->setCellValue('AT' . $numrow, date('01-m-Y', strtotime($tgl_mpp)));\n $excel->setActiveSheetIndex(0)->setCellValue('AU' . $numrow, date('01-m-Y', strtotime($tgl_pen)));\n }\n if ($golongan >= 9 and $golongan <= 16) {\n $tgl_pen = date('Y-m-d', strtotime('+56 year +1 month', strtotime($i['tgl_lhr'])));\n $tgl_mpp = date('Y-m-d', strtotime('-6 month', strtotime($tgl_pen)));\n $excel->setActiveSheetIndex(0)->setCellValue('AT' . $numrow, date('01-m-Y', strtotime($tgl_mpp)));\n $excel->setActiveSheetIndex(0)->setCellValue('AU' . $numrow, date('01-m-Y', strtotime($tgl_pen)));\n }\n\n $sdm01 = $this->Model_admin->tampil_a1($i['npp'])->result_array();\n $skrng = date_create($sdm01[0]['tgl_masuk']);\n $tgl_pen = date_create($tgl_pen);\n\n $diff = date_diff($skrng, $tgl_pen);\n\n if ($diff->y > 57) {\n $excel->setActiveSheetIndex(0)->setCellValue('AV' . $numrow, '');\n $excel->setActiveSheetIndex(0)->setCellValue('AW' . $numrow, '');\n $excel->setActiveSheetIndex(0)->setCellValue('AX' . $numrow, '');\n $excel->setActiveSheetIndex(0)->setCellValue('AY' . $numrow, '');\n $excel->setActiveSheetIndex(0)->setCellValue('AZ' . $numrow, '');\n } else {\n $excel->setActiveSheetIndex(0)->setCellValue('AV' . $numrow, $diff->y);\n $excel->setActiveSheetIndex(0)->setCellValue('AW' . $numrow, $diff->m);\n $excel->setActiveSheetIndex(0)->setCellValue('AX' . $numrow, $diff->d);\n $excel->setActiveSheetIndex(0)->setCellValue('AY' . $numrow, '');\n $excel->setActiveSheetIndex(0)->setCellValue('AZ' . $numrow, '');\n }\n\n // Apply style row yang telah kita buat tadi ke masing-masing baris (isi tabel)\n $excel->getActiveSheet()->getStyle('A' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('B' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('C' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('D' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('E' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('F' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('G' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('H' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('I' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('J' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('K' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('L' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('M' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('N' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('O' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('P' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('Q' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('R' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('S' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('T' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('U' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('V' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('W' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('X' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('Y' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('Z' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AA' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AB' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AC' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AD' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AE' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AF' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AG' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AH' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AI' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AJ' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AK' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AL' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AM' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AN' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AO' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AP' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AQ' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AR' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AS' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AT' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AU' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AV' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AW' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AX' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AY' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n $excel->getActiveSheet()->getStyle('AZ' . $numrow)->applyFromArray($style_row)->getNumberFormat()->setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_NUMBER);\n\n $numrow++; // Tambah 1 setiap kali looping\n }\n\n\n // Set width kolom\n $excel->getActiveSheet()->getColumnDimension('A')->setWidth(15);\n $excel->getActiveSheet()->getColumnDimension('B')->setWidth(30);\n $excel->getActiveSheet()->getColumnDimension('C')->setWidth(30);\n $excel->getActiveSheet()->getColumnDimension('D')->setWidth(10);\n $excel->getActiveSheet()->getColumnDimension('E')->setWidth(10);\n $excel->getActiveSheet()->getColumnDimension('F')->setWidth(10);\n $excel->getActiveSheet()->getColumnDimension('G')->setWidth(10);\n $excel->getActiveSheet()->getColumnDimension('H')->setWidth(5);\n $excel->getActiveSheet()->getColumnDimension('I')->setWidth(5);\n $excel->getActiveSheet()->getColumnDimension('J')->setWidth(5);\n $excel->getActiveSheet()->getColumnDimension('K')->setWidth(50);\n $excel->getActiveSheet()->getColumnDimension('L')->setWidth(20);\n $excel->getActiveSheet()->getColumnDimension('M')->setWidth(5);\n $excel->getActiveSheet()->getColumnDimension('N')->setWidth(5);\n $excel->getActiveSheet()->getColumnDimension('O')->setWidth(5);\n $excel->getActiveSheet()->getColumnDimension('P')->setWidth(10);\n $excel->getActiveSheet()->getColumnDimension('Q')->setWidth(10);\n $excel->getActiveSheet()->getColumnDimension('R')->setWidth(5);\n $excel->getActiveSheet()->getColumnDimension('S')->setWidth(5);\n $excel->getActiveSheet()->getColumnDimension('T')->setWidth(5);\n $excel->getActiveSheet()->getColumnDimension('U')->setWidth(5);\n $excel->getActiveSheet()->getColumnDimension('V')->setWidth(5);\n $excel->getActiveSheet()->getColumnDimension('W')->setWidth(10);\n $excel->getActiveSheet()->getColumnDimension('X')->setWidth(25);\n $excel->getActiveSheet()->getColumnDimension('Y')->setWidth(5);\n $excel->getActiveSheet()->getColumnDimension('Z')->setWidth(10);\n $excel->getActiveSheet()->getColumnDimension('AA')->setWidth(25);\n $excel->getActiveSheet()->getColumnDimension('AB')->setWidth(5);\n $excel->getActiveSheet()->getColumnDimension('AC')->setWidth(5);\n $excel->getActiveSheet()->getColumnDimension('AD')->setWidth(10);\n $excel->getActiveSheet()->getColumnDimension('AE')->setWidth(25);\n $excel->getActiveSheet()->getColumnDimension('AF')->setWidth(5);\n $excel->getActiveSheet()->getColumnDimension('AG')->setWidth(5);\n $excel->getActiveSheet()->getColumnDimension('AH')->setWidth(5);\n $excel->getActiveSheet()->getColumnDimension('AI')->setWidth(10);\n $excel->getActiveSheet()->getColumnDimension('AJ')->setWidth(5);\n $excel->getActiveSheet()->getColumnDimension('AK')->setWidth(10);\n $excel->getActiveSheet()->getColumnDimension('AL')->setWidth(25);\n $excel->getActiveSheet()->getColumnDimension('AM')->setWidth(10);\n $excel->getActiveSheet()->getColumnDimension('AN')->setWidth(5);\n $excel->getActiveSheet()->getColumnDimension('AO')->setWidth(15);\n $excel->getActiveSheet()->getColumnDimension('AP')->setWidth(15);\n $excel->getActiveSheet()->getColumnDimension('AQ')->setWidth(15);\n $excel->getActiveSheet()->getColumnDimension('AR')->setWidth(15);\n $excel->getActiveSheet()->getColumnDimension('AS')->setWidth(15);\n $excel->getActiveSheet()->getColumnDimension('AT')->setWidth(10);\n $excel->getActiveSheet()->getColumnDimension('AU')->setWidth(10);\n $excel->getActiveSheet()->getColumnDimension('AV')->setWidth(5);\n $excel->getActiveSheet()->getColumnDimension('AW')->setWidth(5);\n $excel->getActiveSheet()->getColumnDimension('AX')->setWidth(5);\n $excel->getActiveSheet()->getColumnDimension('AY')->setWidth(5);\n $excel->getActiveSheet()->getColumnDimension('AZ')->setWidth(5);\n\n // Set height semua kolom menjadi auto (mengikuti height isi dari kolommnya, jadi otomatis)\n $excel->getActiveSheet()->getDefaultRowDimension()->setRowHeight(-1);\n\n // Set orientasi kertas jadi LANDSCAPE\n $excel->getActiveSheet()->getPageSetup()->setOrientation(PHPExcel_Worksheet_PageSetup::ORIENTATION_LANDSCAPE);\n\n date_default_timezone_set('Asia/Jakarta');\n $date = date(\"mY\");\n\n // Set judul file excel nya\n $excel->getActiveSheet(0)->setTitle(\"Data A1\");\n $excel->setActiveSheetIndex(0);\n\n // Proses file excel\n header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');\n header('Content-Disposition: attachment; filename=\"Data A1' . $date . '.xlsx\"'); // Set nama file excel nya\n header('Cache-Control: max-age=0');\n\n header('Content-Transfer-Encoding: binary');\n header('Accept-Ranges: bytes');\n header('Cache-control: no-cache, pre-check=0, post-check=0');\n header('Cache-control: private');\n header('Pragma: private');\n header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); // any date in the past\n\n $write = PHPExcel_IOFactory::createWriter($excel, 'Excel2007');\n $write->save('php://output');\n }",
"public function export()\n\t{\n\t\t$countries = Country::withTrashed()->get();\n\t\t$csvArray = [];\n\t\t$count = 0;\n\n\t\tforeach($countries as $country) {\n\t\t\t$countryArray = [\n\t\t\t\t'#' => ++$count,\n\t\t\t\t'Country Name' => $country->country_name,\n\t\t\t\t'Created At' => $country['created_at']->toDateTimeString(),\n\t\t\t\t'Updated At' => $country['updated_at']->toDateTimeString()\n\t\t\t];\n\n\t\t\tif($country->isDeleted()) {\n\t\t\t\t$countryArray['Deleted At'] = $country['deleted_at']->toDateTimeString();\n\t\t\t}\n\n\t\t\tarray_push($csvArray, $countryArray);\n\t\t}\n\n\t\tExcel::create('List of Church associated countries', function($excel) use($csvArray) {\n\n\t\t\t// Set the title\n\t\t $excel->setTitle('Church associated countries');\n\n\t\t // Chain the setters\n\t\t $excel->setCreator('Charisse May Dalida')\n\t\t ->setCompany('Crist Lopez');\n\n\t\t\t$excel->sheet('Records', function($sheet) use($csvArray) {\n\n\t\t\t\t$sheet->with($csvArray);\n\t\t\t\t$sheet->setAutoFilter(); // Auto filter for entire sheet\n\t\t\t\t$sheet->freezeFirstRow();\n\t\t\t\t$sheet->row(1, function($row) {// Set black background\n\n\t\t\t\t // call cell manipulation methods\n\t\t\t\t $row->setFontWeight('bold');\n\n\t\t\t\t});\n\n\t\t\t});\n\t\t})->export('xls');\n\t}",
"function call_to_export($export){\n\t$objPHPExcel = new PHPExcel();\n\n\t// Set document properties\n\t$objPHPExcel->getProperties()\n\t\t->setCreator(\"QPP REPORTS\")\n\t\t->setLastModifiedBy(\"QPP REPORTS\")\n\t\t->setTitle(\"Office 2007 XLSX Document\")\n\t\t->setSubject(\"Office 2007 XLSX Document\")\n\t\t->setDescription(\"QPP REPORTS\")\n\t\t->setKeywords(\"office 2007 openxml php\")\n\t\t->setCategory(\"Reports\");\n\n\t$styleArray = array(\n\t\t'font' => array(\n\t\t\t'bold' => true,\n\t\t\t'color' => array('rgb' => '1A6FCD'),\n\t\t\t'size' => 10,\n\t\t\t'name' => 'arial',\n\t\t\t'underline' => 'single',\n\t\t)\n\t);\n\t\n\tif(isset($export['users_logins'])){\n\t\t$objPHPExcel->setActiveSheetIndex(0);\n\t\t$sheet_logins = $objPHPExcel->getActiveSheet(0);\n\t\t\n\t\t// set worksheet title\n\t\t$sheet_logins->setTitle($export['users_logins']['sheet1']['title']);\n\t\t\n\t\t// set report title\n\t\t$sheet_logins->getStyle('A1:z1')->getFont()->setBold(true)->setSize(16);\n\t\t$sheet_logins->mergeCells('A1:I1');\n\t\t$sheet_logins->SetCellValue('A1',$export['users_logins']['sheet1']['report_title']);\n\t\t$sheet_logins->getStyle('A2:z2')->getFont()->setBold(true)->setSize(12);\n\t\t$sheet_logins->mergeCells('A2:I2');\n\t\t$sheet_logins->SetCellValue('A2',$export['users_logins']['sheet1']['date_range']);\n\t\t\n\t\t// set column widths\n\t\t$sheet_logins->getColumnDimension('A')->setWidth(25);\n\t\t$sheet_logins->getColumnDimension('B')->setWidth(25);\n\t\t$sheet_logins->getColumnDimension('C')->setWidth(10);\n\t\t$sheet_logins->getColumnDimension('D')->setWidth(25);\n\t\t$sheet_logins->getColumnDimension('E')->setWidth(35);\n\t\t$sheet_logins->getColumnDimension('F')->setWidth(25);\n\t\t$sheet_logins->getColumnDimension('G')->setWidth(25);\n\t\t$sheet_logins->getColumnDimension('H')->setWidth(25);\n\t\t$sheet_logins->getColumnDimension('I')->setWidth(25);\n\t\t$sheet_logins->getColumnDimension('J')->setWidth(15);\n\t\t$sheet_logins->getColumnDimension('K')->setWidth(25);\n\t\t\n\t\t// set vertical alignment\n\t\t$sheet_logins->getDefaultStyle()->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_TOP);\n\t\t\n\t\t// set column horizontal alignment\n\t\t$sheet_logins->getStyle('K4:K999')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_LEFT);\n\t\t\n\t\t// set wrap text\n\t\t$sheet_logins->getStyle('C3:K999')->getAlignment()->setWrapText(true); \n\t\t\n\t\t// set column headers\n\t\tif(isset($export['users_logins']['sheet1']['header'])){\n\t\t\t$col = 0;\n\t\t\t$row = 3; //start from row 3\n\t\t\t$sheet_logins->getStyle('A3:Z3')->getFont()->setBold(true);\n\t\t\tforeach($export['users_logins']['sheet1']['header'] as $key){\n\t\t\t\t$sheet_logins->setCellValueByColumnAndRow($col, $row, $key);\n\t\t\t\t$col++;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// print rows\n\t\tif(isset($export['users_logins']['sheet1']['rows'])){\n\t\t\t$row = 4;\n\t\t\tforeach($export['users_logins']['sheet1']['rows'] as $rows){\n\t\t\t\t$col = 0;\n\t\t\t\tforeach ($rows as $value){\n\t\t\t\t\t$sheet_logins->setCellValueByColumnAndRow($col, $row, $value);\n\t\t\t\t\t$col++;\t\n\t\t\t\t}\n\t\t\t\t$row++;\n\t\t\t}\n\t\t}\t\t\n\t\t\n\t\t// new worksheet for portal login totals\n\t\t$objPHPExcel->createSheet();\n\t\t$objPHPExcel->setActiveSheetIndex(1);\t\t\t\n\t\t$sheet_logins_total = $objPHPExcel->getActiveSheet(1);\n\t\t\n\t\t// set worksheet title\n\t\t$sheet_logins_total->setTitle($export['users_logins']['sheet2']['title']);\n\t\t\n\t\t// set report title\n\t\t$sheet_logins_total->getStyle('A1:z1')->getFont()->setBold(true)->setSize(16);\n\t\t$sheet_logins_total->mergeCells('A1:I1');\n\t\t$sheet_logins_total->SetCellValue('A1',$export['users_logins']['sheet2']['report_title']);\n\t\t$sheet_logins_total->getStyle('A2:z2')->getFont()->setBold(true)->setSize(12);\n\t\t$sheet_logins_total->mergeCells('A2:I2');\n\t\t$sheet_logins_total->SetCellValue('A2',$export['users_logins']['sheet2']['date_range']);\n\t\t\n\t\t// set column widths\n\t\t$sheet_logins_total->getColumnDimension('A')->setWidth(35);\n\t\t$sheet_logins_total->getColumnDimension('B')->setWidth(25);\n\t\t\n\t\t// set vertical alignment\n\t\t$sheet_logins_total->getDefaultStyle()->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_TOP);\n\t\t\n\t\t// set column headers\n\t\tif(isset($export['users_logins']['sheet2']['header'])){\n\t\t\t$col = 0;\n\t\t\t$row = 3; //start from row 3\n\t\t\t$sheet_logins_total->getStyle('A3:Z3')->getFont()->setBold(true);\n\t\t\tforeach($export['users_logins']['sheet2']['header'] as $key){\n\t\t\t\t$sheet_logins_total->setCellValueByColumnAndRow($col, $row, $key);\n\t\t\t\t$col++;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// print rows\n\t\tif(isset($export['users_logins']['sheet2']['rows'])){\n\t\t\t$row = 4;\n\t\t\tforeach($export['users_logins']['sheet2']['rows'] as $rows){\n\t\t\t\t$col = 0;\n\t\t\t\tforeach ($rows as $value){\n\t\t\t\t\t$sheet_logins_total->setCellValueByColumnAndRow($col, $row, $value);\n\t\t\t\t\t$col++;\t\n\t\t\t\t}\n\t\t\t\t$row++;\n\t\t\t}\n\n\t\t\tif(isset($export['users_logins']['sheet2']['rows_total'])){\n\t\t\t\t$row = $row+1;\n\t\t\t\tforeach($export['users_logins']['sheet2']['rows_total'] as $rows){\n\t\t\t\t\t$col = 0;\n\t\t\t\t\tforeach ($rows as $value){\n\t\t\t\t\t\t$sheet_logins_total->setCellValueByColumnAndRow($col, $row, $value);\n\t\t\t\t\t\t$col++;\n\t\t\t\t\t}\n\t\t\t\t\t$row++;\n\t\t\t\t}\n\t\t\t}\t\t\n\t\t}\n\t}\n\t\n\tif(isset($export['users_interactions'])){\n\t\t$objPHPExcel->setActiveSheetIndex(0);\n\t\t$sheet_interactions = $objPHPExcel->getActiveSheet(0);\n\t\t\n\t\t// set worksheet title\n\t\t$sheet_interactions->setTitle($export['users_interactions']['sheet1']['title']);\n\t\t\n\t\t// set report title\n\t\t$sheet_interactions->getStyle('A1:z1')->getFont()->setBold(true)->setSize(16);\n\t\t$sheet_interactions->mergeCells('A1:I1');\n\t\t$sheet_interactions->SetCellValue('A1',$export['users_interactions']['sheet1']['report_title']);\n\t\t$sheet_interactions->getStyle('A2:z2')->getFont()->setBold(true)->setSize(12);\n\t\t$sheet_interactions->mergeCells('A2:I2');\n\t\t$sheet_interactions->SetCellValue('A2',$export['users_interactions']['sheet1']['date_range']);\n\t\t\n\t\t// set column widths\n\t\t$sheet_interactions->getColumnDimension('A')->setWidth(25);\n\t\t$sheet_interactions->getColumnDimension('B')->setWidth(25);\n\t\t$sheet_interactions->getColumnDimension('C')->setWidth(25);\n\t\t$sheet_interactions->getColumnDimension('D')->setWidth(25);\n\t\t$sheet_interactions->getColumnDimension('E')->setWidth(35);\n\t\t$sheet_interactions->getColumnDimension('F')->setWidth(25);\n\t\t$sheet_interactions->getColumnDimension('G')->setWidth(35);\n\t\t$sheet_interactions->getColumnDimension('H')->setWidth(25);\n\t\t$sheet_interactions->getColumnDimension('I')->setWidth(25);\n\t\t$sheet_interactions->getColumnDimension('J')->setWidth(25);\n\t\t$sheet_interactions->getColumnDimension('K')->setWidth(25);\n\t\t$sheet_interactions->getColumnDimension('L')->setWidth(25);\n\t\t$sheet_interactions->getColumnDimension('M')->setWidth(25);\n\t\t\n\t\t// set vertical alignment\n\t\t$sheet_interactions->getDefaultStyle()->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_TOP);\n\t\t\n\t\t// set column horizontal alignment\n\t\t$sheet_interactions->getStyle('M4:M999')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_LEFT);\n\t\t\n\t\t// set wrap text\n\t\t$sheet_interactions->getStyle('C3:M999')->getAlignment()->setWrapText(true); \n\t\t\n\t\t// set column headers\n\t\tif(isset($export['users_interactions']['sheet1']['header'])){\n\t\t\t$col = 0;\n\t\t\t$row = 3; //start from row 3\n\t\t\t$sheet_interactions->getStyle('A3:Z3')->getFont()->setBold(true);\n\t\t\tforeach($export['users_interactions']['sheet1']['header'] as $key){\n\t\t\t\t$sheet_interactions->setCellValueByColumnAndRow($col, $row, $key);\n\t\t\t\t$col++;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// print rows\n\t\tif(isset($export['users_interactions']['sheet1']['rows'])){\n\t\t\t$row = 4;\n\t\t\tforeach($export['users_interactions']['sheet1']['rows'] as $rows){\n\t\t\t\t$col = 0;\n\t\t\t\tforeach ($rows as $value){\n\t\t\t\t\t$sheet_interactions->setCellValueByColumnAndRow($col, $row, $value);\n\t\t\t\t\t$col++;\t\n\t\t\t\t}\n\t\t\t\t$row++;\n\t\t\t}\n\t\t}\t\t\n\t\t\n\t\t// new worksheet for portal login totals\n\t\t$objPHPExcel->createSheet();\n\t\t$objPHPExcel->setActiveSheetIndex(1);\t\t\t\n\t\t$sheet_interactions_total = $objPHPExcel->getActiveSheet(1);\n\t\t\n\t\t// set worksheet title\n\t\t$sheet_interactions_total->setTitle($export['users_interactions']['sheet2']['title']);\n\t\t\n\t\t// set report title\n\t\t$sheet_interactions_total->getStyle('A1:z1')->getFont()->setBold(true)->setSize(16);\n\t\t$sheet_interactions_total->mergeCells('A1:I1');\n\t\t$sheet_interactions_total->SetCellValue('A1',$export['users_interactions']['sheet2']['report_title']);\n\t\t$sheet_interactions_total->getStyle('A2:z2')->getFont()->setBold(true)->setSize(12);\n\t\t$sheet_interactions_total->mergeCells('A2:I2');\n\t\t$sheet_interactions_total->SetCellValue('A2',$export['users_interactions']['sheet2']['date_range']);\n\t\t\n\t\t// set column widths\n\t\t$sheet_interactions_total->getColumnDimension('A')->setWidth(35);\n\t\t$sheet_interactions_total->getColumnDimension('B')->setWidth(25);\n\t\t$sheet_interactions_total->getColumnDimension('C')->setWidth(25);\n\t\t\n\t\t// set vertical alignment\n\t\t$sheet_interactions_total->getDefaultStyle()->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_TOP);\n\t\t\n\t\t// set column headers\n\t\tif(isset($export['users_interactions']['sheet2']['header'])){\n\t\t\t$col = 0;\n\t\t\t$row = 3; //start from row 3\n\t\t\t$sheet_interactions_total->getStyle('A3:Z3')->getFont()->setBold(true);\n\t\t\tforeach($export['users_interactions']['sheet2']['header'] as $key){\n\t\t\t\t$sheet_interactions_total->setCellValueByColumnAndRow($col, $row, $key);\n\t\t\t\t$col++;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// print rows\n\t\tif(isset($export['users_interactions']['sheet2']['rows'])){\n\t\t\t$row = 4;\n\t\t\tforeach($export['users_interactions']['sheet2']['rows'] as $rows){\n\t\t\t\t$col = 0;\n\t\t\t\tforeach ($rows as $value){\n\t\t\t\t\t$sheet_interactions_total->setCellValueByColumnAndRow($col, $row, $value);\n\t\t\t\t\t$col++;\t\n\t\t\t\t}\n\t\t\t\t$row++;\n\t\t\t}\n\n\t\t\tif(isset($export['users_interactions']['sheet2']['rows_total'])){\n\t\t\t\t$row = $row+1;\n\t\t\t\tforeach($export['users_interactions']['sheet2']['rows_total'] as $rows){\n\t\t\t\t\t$col = 0;\n\t\t\t\t\tforeach ($rows as $value){\n\t\t\t\t\t\t$sheet_interactions_total->setCellValueByColumnAndRow($col, $row, $value);\n\t\t\t\t\t\t$col++;\n\t\t\t\t\t}\n\t\t\t\t\t$row++;\n\t\t\t\t}\n\t\t\t}\t\t\n\t\t}\n\t}\n\t\n\t$filename = isset($export['filename']) ? $export['filename'] . \".xlsx\" : \"qpp_portal_report_\" . date('m-d-Y_h-i') . \".xlsx\";\n\t\n\t$objPHPExcel->setActiveSheetIndex(0);\n\theader('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');\n\theader('Content-Disposition: attachment;filename=\"' . $filename . '\"');\n\theader('Cache-Control: max-age=0');\n\n\t$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');\n\tob_end_clean();\n\t$objWriter->save('php://output');\n\n\texit;\n}",
"public function exportExcel() \n {\n $st = ST::select(\n 'no_st',\n 'tanggal_st',\n 'tujuan_st',\n 'tipe', \n 'bidang',\n 'uraian',\n \n 'tanggal_mulai',\n 'tanggal_selesai',\n 'hp',\n 'no_laporan',\n 'tanggal_laporan',\n\n 'penanggung_jawab_id',\n 'pengendali_mutu_id',\n 'pengendali_teknis_id',\n 'ketua_tim_id', \n \n 'lokasi', \n 'biaya',\n 'km_id',\n 'costsheet_id'\n \n )->get();\n\n \n\n return Excel::create('data_tugas', function($excel) use ($st){\n $excel->sheet('st_bpkp', function($sheet) use ($st) {\n $sheet->fromArray($st);\n });\n })->download('xls');\n\n }",
"public function export() \n {\n return Excel::download(new TraineeExport, 'trainees.xlsx');\n }",
"public function exportExcelAction()\n {\n $fileName = 'handovertwo.xls';\n $content = $this->getLayout()->createBlock('bs_handover/adminhtml_handovertwo_grid')\n ->getExcelFile();\n $this->_prepareDownloadResponse($fileName, $content);\n }",
"public function export()\n {\n return Excel::download(new CustomerFormExport, 'customers.xlsx');\n }",
"public function exportExcelAction()\n {\n $contenedor = $this->container;\n\n $xlsExport = $contenedor->get('xls.service_xls2007');\n\n $xlsExport->excelObj->getProperties()->setCreator(\"Proyecto Base\")\n ->setLastModifiedBy(\"Proyecto Base\")\n ->setTitle(\"Demo Excel\")\n ->setSubject(\"Demo Excel\")\n ->setDescription(\"Demo Excel\")\n ->setKeywords(\"demo excel proyecto base\")\n ->setCategory(\"demo\");\n\n $xlsExport->excelObj->setActiveSheetIndex(0)\n ->setCellValue('A2', 'Título Columna 1')\n ->setCellValue('B2', 'Título Columna 2');\n\n $xlsExport->excelObj->setActiveSheetIndex(0)\n ->setCellValue('A1', \"Este el el valor de la celda\")\n ->setCellValue('B1', \"Otro valor\");\n\n $xlsExport->excelObj->getActiveSheet()->setTitle(\"Demo\");\n\n // Set active sheet index to the first sheet, so Excel opens this as the first sheet\n $xlsExport->excelObj->setActiveSheetIndex(0);\n\n //create the response\n $response = $xlsExport->getResponse();\n $response->headers->set('Content-Type', 'text/vnd.ms-excel; charset=utf-8');\n $response->headers->set('Content-Disposition', 'attachment;filename=demo_excel.xls');\n\n // If you are using a https connection, you have to set those two headers for compatibility with IE <9\n $response->headers->set('Pragma', 'public');\n $response->headers->set('Cache-Control', 'maxage=1');\n return $response;\n }",
"public function export(){\n \n // Skrip berikut ini adalah skrip yang bertugas untuk meng-export data tadi ke excel\n header(\"Content-type: application/vnd-ms-excel\");\n header(\"Content-Disposition: attachment; filename=Data_Transaksi.xls\");\n \n $data['header_transaksi'] = $this->header_transaksi_model->listing();\n $this->load->view('admin/export/vw_laporan_excel', $data);\n\n }",
"public function exportToExcel(){\n\t\theader('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'); \n\t\theader(\"Content-Disposition: attachment; filename = DataNilaiMataKuliah.xls\"); \n\t\t$data['data_nilai'] = $this->Database_Nilai->ambil_data(); \n\t\t$this->load->view('export', $data);\n\t}",
"public function exportExcel()\n {\n /** Fuente de Datos Eloquent */\n $data = User::all();\n\n /** Creamos nuestro archivo Excel */\n Excel::create('usuarios', function ($excel) use ($data) {\n\n /** Creamos una hoja */\n $excel->sheet('Hoja Uno', function ($sheet) use ($data) {\n /**\n * Insertamos los datos en la hoja con el método with/fromArray\n * Parametros: (\n * Datos,\n * Valores del encabezado de la columna,\n * Celda de Inicio,\n * Comparación estricta de los valores del encabezado\n * Impresión de los encabezados\n * )*/\n $sheet->with($data, null, 'A1', false, false);\n });\n\n /** Descargamos nuestro archivo pasandole la extensión deseada (xls, xlsx) */\n })->download('xlsx');///** Descarga del documento en csv ->download('csv');\n }",
"public function export() \n \t\t{\n \t\t$data = $this->model_user->export();\n \t\t#load PHPExcel library\n \t\t$this->excel->setActiveSheetIndex(0);\n \t\t#name the worksheet\n \t\t$this->excel->getActiveSheet()->setTitle('Data User SN Health Care');\n \n \t\t#STYLING\n \t\t$styleArray = array('borders' => array('allborders' => array('style' => PHPExcel_Style_Border::BORDER_THIN,'color' => array('argb' => '0000'))));\n \n \t\t#set report header\n \t\t$this->excel->getActiveSheet()->getStyle('A:I')->getFont()->setName('Times New Roman');\n \t\t$this->excel->getActiveSheet()->mergeCells('A1:J1');\n \t\t$this->excel->getActiveSheet()->setCellValue('A1', 'DAFTAR USER APLIKASI SN HEALTH CARE');\n \t\t$this->excel->getActiveSheet()->getStyle('A1')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n \t\t$this->excel->getActiveSheet()->getStyle('A1')->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER);\n \t\t$this->excel->getActiveSheet()->getStyle('A1')->getFont()->setBold(true);\n \t\t$this->excel->getActiveSheet()->getStyle('A1')->getFont()->setSize(12);\n \n \n \t\t//set column name\n \t\t$this->excel->getActiveSheet()->setCellValue('A2', 'No');\n \t\t$this->excel->getActiveSheet()->setCellValue('B2', 'Nama');\n \t\t$this->excel->getActiveSheet()->setCellValue('C2', 'Jenis Kelamin');\n \t\t$this->excel->getActiveSheet()->setCellValue('D2', 'Tanggal Lahir');\n \t\t$this->excel->getActiveSheet()->setCellValue('E2', 'Email');\n \t\t$this->excel->getActiveSheet()->setCellValue('F2', 'Password');\n \t\t$this->excel->getActiveSheet()->setCellValue('G2', 'Nomor Handphone');\n \t\t$this->excel->getActiveSheet()->setCellValue('H2', 'Wilayah');\n \t\t$this->excel->getActiveSheet()->setCellValue('I2', 'Alamat');\n \t\t$this->excel->getActiveSheet()->setCellValue('J2', 'Tanggal & Waktu Registrasi');\n \n\t\t\t $this->excel->getActiveSheet()->getStyle('A2:J2')->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n \n\t\t\t $this->excel->getActiveSheet()->getColumnDimension('A')->setWidth(4);\n\t\t\t $this->excel->getActiveSheet()->getColumnDimension('B')->setWidth(30);\n\t\t\t $this->excel->getActiveSheet()->getColumnDimension('C')->setWidth(15);\n\t\t\t $this->excel->getActiveSheet()->getColumnDimension('D')->setWidth(15);\n\t\t\t $this->excel->getActiveSheet()->getColumnDimension('E')->setWidth(30);\n\t\t\t $this->excel->getActiveSheet()->getColumnDimension('F')->setWidth(30);\n\t\t\t $this->excel->getActiveSheet()->getColumnDimension('G')->setWidth(20);\n\t\t\t $this->excel->getActiveSheet()->getColumnDimension('H')->setWidth(30);\n\t\t\t $this->excel->getActiveSheet()->getColumnDimension('I')->setWidth(40);\n\t\t\t $this->excel->getActiveSheet()->getColumnDimension('J')->setWidth(25);\n \n \t\t$no = 3;\n \t\t$nomor = 1;\n \t\tforeach ($data as $v) \n \t\t{\n \t\t\t\n \t\t\t$this->excel->getActiveSheet()->getStyle('A' . $no)->getAlignment()->setWrapText(true);\n \t\t\t$this->excel->getActiveSheet()->getStyle('A' . $no)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->getStyle('A' . $no)->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->setCellValue('A' . $no, $nomor);\n\n \t\t\t$this->excel->getActiveSheet()->getStyle('B' . $no)->getAlignment()->setWrapText(true);\n \t\t\t$this->excel->getActiveSheet()->getStyle('B' . $no)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->getStyle('B' . $no)->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->setCellValue('B' . $no, $v->user_name);\n\n \t\t\t$this->excel->getActiveSheet()->getStyle('C' . $no)->getAlignment()->setWrapText(true);\n \t\t\t$this->excel->getActiveSheet()->getStyle('C' . $no)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->getStyle('C' . $no)->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->setCellValue('C' . $no, $v->user_sex);\n\n \t\t\t$this->excel->getActiveSheet()->getStyle('D' . $no)->getAlignment()->setWrapText(true);\n \t\t\t$this->excel->getActiveSheet()->getStyle('D' . $no)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->getStyle('D' . $no)->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER);\n\t\t\t\t$this->excel->getActiveSheet()->setCellValue('D' . $no, $v->user_datebirth);\n\t\t\t\t \n \t\t\t$this->excel->getActiveSheet()->getStyle('E' . $no)->getAlignment()->setWrapText(true);\n \t\t\t$this->excel->getActiveSheet()->getStyle('E' . $no)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->getStyle('E' . $no)->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER);\n\t\t\t\t$this->excel->getActiveSheet()->setCellValue('E' . $no, $v->user_email);\n\t\t\t\t \n \t\t\t$this->excel->getActiveSheet()->getStyle('F' . $no)->getAlignment()->setWrapText(true);\n \t\t\t$this->excel->getActiveSheet()->getStyle('F' . $no)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->getStyle('F' . $no)->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER);\n\t\t\t\t$this->excel->getActiveSheet()->setCellValue('F' . $no, $v->user_password);\n\n \t\t\t$this->excel->getActiveSheet()->getStyle('G' . $no)->getAlignment()->setWrapText(true);\n \t\t\t$this->excel->getActiveSheet()->getStyle('G' . $no)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->getStyle('G' . $no)->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER);\n\t\t\t\t$this->excel->getActiveSheet()->setCellValue('G' . $no, $v->user_phone);\n\t\t\t\t \n \t\t\t$this->excel->getActiveSheet()->getStyle('H' . $no)->getAlignment()->setWrapText(true);\n \t\t\t$this->excel->getActiveSheet()->getStyle('H' . $no)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->getStyle('H' . $no)->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER);\n\t\t\t\t$this->excel->getActiveSheet()->setCellValue('H' . $no, $v->district_name);\n\t\t\t\t \n \t\t\t$this->excel->getActiveSheet()->getStyle('I' . $no)->getAlignment()->setWrapText(true);\n \t\t\t$this->excel->getActiveSheet()->getStyle('I' . $no)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->getStyle('I' . $no)->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER);\n\t\t\t\t$this->excel->getActiveSheet()->setCellValue('I' . $no, $v->user_address);\n\t\t\t\t \n\t\t\t\t$this->excel->getActiveSheet()->getStyle('J' . $no)->getAlignment()->setWrapText(true);\n \t\t\t$this->excel->getActiveSheet()->getStyle('J' . $no)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->getStyle('J' . $no)->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER);\n \t\t\t$this->excel->getActiveSheet()->setCellValue('J' . $no, $v->user_registerdate);\n\t\t\t\t\n\t\t\t\t$no++;\n \t\t\t$nomor++;\n \t\t}\n \n \t\t$this->excel->getActiveSheet()->getStyle('A2:J' . ($no - 1))->applyFromArray($styleArray);\n \t\tob_end_clean();\n \t\t$filename = 'Daftar User Aplikasi SN Health Care.xls'; //save our workbook as this file name\n \t\theader('Content-Type: application/vnd.ms-excel'); //mime type\n \t\theader('Content-Disposition: attachment;filename=\"' . $filename . '\"'); //tell browser what's the file name\n \t\theader('Cache-Control: max-age=0'); //no cache\n \t\t$objWriter = PHPExcel_IOFactory::createWriter($this->excel, 'Excel5');\n \t\t$objWriter->save('php://output');\n \n \t\tredirect('admin/user');\n \t\t}",
"public function exportExcel()\n {\n $evaluaciones = Evaluacion::get()->toArray();\n\n return Excel::create('ListadoEvaluaciones', function($excel) use ($evaluaciones) {\n $excel->sheet('Evaluaciones', function($sheet) use ($evaluaciones)\n {\n $sheet->fromArray($evaluaciones);\n });\n })->download('xlsx');\n }",
"public function export()\n {\n return Excel::download(new UsersExport, 'users.xlsx');\n }",
"public function action_export_obic(){\n\t\t$objPHPExcel = new \\PHPExcel();\n\t\t//add header\n $header = [\n '会社NO', '伝票番号', '発生日', 'システム分類', 'サイト番号', '仕訳区分', '伝票区分', '事業所コード', '行番号', '借方総勘定科目コード',\n '借方補助科目コード', '借方補助内訳科目コード', '借方部門コード', '借方取引先コード', '借方税区分', '借方税込区分',\n '借方金額', '借方消費税額', '借方消費税本体科目コード', '借方分析コード1', '借方分析コード2', '借方分析コード3', '借方分析コード4', '借方分析コード5',\n '借方資金コード', '借方プロジェクトコード', '貸方総勘定科目コード', '貸方補助科目コード', '貸方補助内訳科目コード', '貸方部門コード',\n '貸方取引先コード', '貸方税区分', '貸方税込区分', '貸方金額', '貸方消費税額', '貸方消費税本体科目コード',\n '貸方分析コード1', '貸方分析コード2', '貸方分析コード3', '貸方分析コード4', '貸方分析コード5', '貸方資金コード',\n '貸方プロジェクトコード', '明細摘要', '伝票摘要', 'ユーザID', '借方事業所コード', '貸方事業所コード'\n ];\n\n $objPHPExcel->getProperties()->setCreator('VisionVietnam')\n ->setLastModifiedBy('Phong Phu')\n ->setTitle('Office 2007 Document')\n ->setSubject('Office 2007 Document')\n ->setDescription('Document has been generated by PHP')\n ->setKeywords('Office 2007 openxml php')\n ->setCategory('OBIC File');\n $last_column = null;\n $explicit = [7,8,10,11,12,13,15,16,27,28,29,30,32];\n\n foreach($header as $i=>$v){\n\t\t\t$column = \\PHPExcel_Cell::stringFromColumnIndex($i);\n\t\t\t$objPHPExcel->setActiveSheetIndex(0)->setCellValue($column.'1',$v);\n\t\t\t$objPHPExcel->getActiveSheet()->getStyle($column.'1')\n\t\t\t\t\t\t->applyFromArray([\n\t\t\t\t\t\t 'font' => [\n\t\t\t\t\t\t 'name' => 'Times New Roman',\n\t\t\t\t\t\t 'bold' => true,\n\t\t\t\t\t\t 'italic' => false,\n\t\t\t\t\t\t 'size' => 10,\n\t\t\t\t\t\t 'color' => ['rgb'=> \\PHPExcel_Style_Color::COLOR_WHITE]\n\t\t\t\t\t\t ],\n\t\t\t\t\t\t 'alignment' => [\n\t\t\t\t\t\t 'horizontal' => \\PHPExcel_Style_Alignment::HORIZONTAL_CENTER,\n\t\t\t\t\t\t 'vertical' => \\PHPExcel_Style_Alignment::VERTICAL_CENTER,\n\t\t\t\t\t\t 'wrap' => false\n\t\t\t\t\t\t ]\n\t\t\t\t\t\t]);\n switch($i+1){\n case 4:\n case 15:\n case 16:\n case 18:\n $width = 20;\n break;\n case 13:\n case 14:\n case 20:\n case 21:\n case 22:\n case 23:\n case 24:\n case 25:\n case 30:\n case 31:\n $width = 25;\n break;\n case 10:\n case 11:\n case 12:\n case 19:\n case 26:\n case 27:\n case 28:\n $width = 30;\n break;\n case 29:\n case 44:\n case 45:\n $width = 40;\n break;\n default:\n $width = 15;\n break;\n }\n $objPHPExcel->getActiveSheet()->getColumnDimension($column)->setWidth($width);\n $last_column = $column;\n }\n //decode params\n $param = \\Input::param();\n parse_str(base64_decode($param['p']), $params);\n //get form payment content\n $rows = $this->generate_content($params);\n $i = 0;\n foreach($rows as $row){\n\t\t\tforeach($row as $k=>$v){\n\t\t\t\t$column = \\PHPExcel_Cell::stringFromColumnIndex($k);\n\t\t\t\tif(in_array($k+1,$explicit)){\n\t\t\t\t\t$objPHPExcel->setActiveSheetIndex()->setCellValueExplicit($column.($i+2),$v,\\PHPExcel_Cell_DataType::TYPE_STRING);\n\t\t\t\t}else{\n\t\t\t\t\t$objPHPExcel->setActiveSheetIndex()->setCellValue($column.($i+2),$v);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$i++;\n\t\t}\n\n\t\t$objPHPExcel->getActiveSheet()->getStyle('A1:'.$last_column.'1')->getFill()->setFillType(\\PHPExcel_Style_Fill::FILL_SOLID);\n $objPHPExcel->getActiveSheet()->getStyle('A1:'.$last_column.'1')->getFill()->getStartColor()->setRGB('5f5f5f');\n\n\t\t$objWriter = \\PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');\n\t\tob_end_clean();\n\n\t\theader(\"Last-Modified: \". gmdate(\"D, d M Y H:i:s\") .\" GMT\");\n header(\"Cache-Control: max-age=0\");\n header('Content-Type: application/vnd.ms-excel');\n header('Content-Disposition: attachment;filename=\"obic-'.date('Y-m-d').'.xls\"');\n $objWriter->save('php://output');\n\t\texit;\n }",
"public function exportExcelAction()\n {\n $fileName = 'offer.xls';\n $content = $this->getLayout()->createBlock('mfb_myflyingbox/adminhtml_offer_grid')\n ->getExcelFile();\n $this->_prepareDownloadResponse($fileName, $content);\n }",
"public function exportExcelAction()\n {\n $fileName = 'appointments.xml';\n $grid = $this->getLayout()->createBlock('appointments/adminhtml_appointments_grid');\n $this->_prepareDownloadResponse($fileName, $grid->getExcelFile($fileName));\n }",
"function excel_export($template = 0) {\n $data = $this->tour->get_tours()->result_object();\n $this->load->helper('report');\n $rows = array();\n $row = array(lang('tour_tour_id'), lang('tour_tour_name'), lang('tour_action_name_key'), lang('tour_sort'), lang('tour_deleted'));\n\n $n = 1;\n $rows[] = $row;\n foreach ($data as $r) {\n $row = array(\n $n ++,\n $r->tour_name,\n $r->action_name_key,\n $r->sort,\n $r->deleted,\n );\n $rows[] = $row;\n }\n\n $content = array_to_csv($rows);\n\n if ($template) {\n force_download('tours_export_mass_update.csv', $content);\n } else {\n force_download('tours_export.csv', $content);\n }\n exit;\n }",
"public function export()\n {\n return Excel::download(new PeopleExport, 'people-' . date('Y-m-d H:i:s') . '.' . request('format', 'xlsx'));\n }",
"public function exportExcelAction()\n {\n $fileName = 'schedule.xls';\n $content = $this->getLayout()->createBlock('bs_schedule/adminhtml_schedule_grid')\n ->getExcelFile();\n $this->_prepareDownloadResponse($fileName, $content);\n }",
"public function export()\n {\n\n $leads = $this->leads->listAsAdmin();\n\n $sheets = collect([\n ['Leads' => 'admin.v1.leads.bulk.sheets.export', 'data' => $leads, 'format' => []],\n ]);\n\n $this->excel->template($sheets, 'Leads');\n }",
"public function export()\n {\n return Excel::download(new SiswaExport($this->siswaModel), 'Siswa.xlsx');\n }",
"public function exportExcelAction()\n {\n $fileName = 'aircraft.xls';\n $content = $this->getLayout()->createBlock('bs_misc/adminhtml_aircraft_grid')\n ->getExcelFile();\n $this->_prepareDownloadResponse($fileName, $content);\n }",
"function export_nik_unins_angsuran()\n\t{\n\t\t$angsuran_id=$this->uri->segment(3);\n\t\t$datas = $this->model_transaction->get_angsuran_unins($angsuran_id);\n\n\t\t// Create new PHPExcel object\n\t\t$objPHPExcel = $this->phpexcel;\n\t\t// Set document properties\n\t\t$objPHPExcel->getProperties()->setCreator(\"MICROFINANCE\")\n\t\t\t\t\t\t\t\t\t ->setLastModifiedBy(\"MICROFINANCE\")\n\t\t\t\t\t\t\t\t\t ->setTitle(\"Office 2007 XLSX Test Document\")\n\t\t\t\t\t\t\t\t\t ->setSubject(\"Office 2007 XLSX Test Document\")\n\t\t\t\t\t\t\t\t\t ->setDescription(\"REPORT, generated using PHP classes.\")\n\t\t\t\t\t\t\t\t\t ->setKeywords(\"REPORT\")\n\t\t\t\t\t\t\t\t\t ->setCategory(\"Test result file\");\n\t\t\t\t\t\t\t\t\t \n\t\t$objPHPExcel->setActiveSheetIndex(0); \n\t\t\n\t\t/*\n\t\t| BORDER OPTION\n\t\t*/\n\t\t$styleArray['borders']['outline']['style']=PHPExcel_Style_Border::BORDER_THIN;\n\t\t$styleArray['borders']['outline']['color']['rgb']='000000';\n\t\t/*\n\t\t| SET COLUMN WIDTH\n\t\t*/\n\t\t$objPHPExcel->getActiveSheet()->getColumnDimension('A')->setWidth(15);\n\t\t$objPHPExcel->getActiveSheet()->getColumnDimension('B')->setWidth(30);\n\n\t\t/*\n\t\t| ROW HEADER TITLE\n\t\t*/\n\t\t$row=1;\n\t\t$objPHPExcel->getActiveSheet()->setCellValue('A'.$row,\"List Angsuran Non-Debet\");\n\t\t$objPHPExcel->getActiveSheet()->getStyle('A'.$row)->getFont()->setBold(true);\n\t\t\n\t\t$row+=1;\n\t\t$objPHPExcel->getActiveSheet()->setCellValue('A'.$row,\"NIK\");\n\t\t$objPHPExcel->getActiveSheet()->setCellValue('B'.$row,\"Nama\");\n\t\t$objPHPExcel->getActiveSheet()->getStyle('A'.$row.':B'.$row)->getFont()->setBold(true);\n\t\t$objPHPExcel->getActiveSheet()->getStyle('A'.$row.':A'.$row)->applyFromArray($styleArray);\n\t\t$objPHPExcel->getActiveSheet()->getStyle('B'.$row.':B'.$row)->applyFromArray($styleArray);\n\t\t$objPHPExcel->getActiveSheet()->getStyle('A'.$row.':B'.$row)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n\t\t$row+=1;\n\t\t/*\n\t\t| ROW DATA\n\t\t*/\n\t\tfor($i=0;$i<count($datas);$i++){\n\t\t\t$objPHPExcel->getActiveSheet()->setCellValue('A'.$row,$datas[$i]['nik']);\n\t\t\t$objPHPExcel->getActiveSheet()->setCellValue('B'.$row,$datas[$i]['nama']);\n\t\t\t$objPHPExcel->getActiveSheet()->getStyle('A'.$row.':B'.$row)->getFont()->setSize(11);\n\t\t\t$row++;\n\t\t}\n\n\t\theader('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');\n\t\theader('Content-Disposition: attachment;filename=\"ANGSURAN NON-DEBET.xlsx\"');\n\t\theader('Cache-Control: max-age=0');\n\n\t\t$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');\n\t\t$objWriter->save('php://output');\n\t}",
"public function export_data_anggota_keluarga()\n {\n $spreadsheet = new Spreadsheet();\n $currentData = $this->AnggotaKeluargaModel->findAll();\n // tulis header/nama kolom \n $spreadsheet->setActiveSheetIndex(0)\n ->setCellValue('A1', 'No. KK')\n ->setCellValue('B1', 'No. KTP')\n ->setCellValue('C1', 'Nama')\n ->setCellValue('D1', 'Tempat Lahir')\n ->setCellValue('E1', 'Tanggal Lahir')\n ->setCellValue('F1', 'Jenis Kelamin')\n ->setCellValue('G1', 'Status Perkawinan')\n ->setCellValue('H1', 'Pendidikan')\n ->setCellValue('I1', 'Pekerjaan')\n ->setCellValue('J1', 'Catatan');\n\n $column = 2;\n // tulis data mobil ke cell\n foreach ($currentData as $data) {\n $spreadsheet->setActiveSheetIndex(0)\n ->setCellValue('A' . $column, $data['noKK'])\n ->setCellValue('B' . $column, $data['noKTP'])\n ->setCellValue('C' . $column, $data['nama'])\n ->setCellValue('D' . $column, $data['tempatLahir'])\n ->setCellValue('E' . $column, $data['tanggalLahir'])\n ->setCellValue('F' . $column, $data['jenisKelamin'])\n ->setCellValue('G' . $column, $data['statusPerkawinan'])\n ->setCellValue('H' . $column, $data['pendidikan'])\n ->setCellValue('I' . $column, $data['pekerjaan'])\n ->setCellValue('J' . $column, $data['catatan']);\n $column++;\n }\n // tulis dalam format .xlsx\n $writer = new Xlsx($spreadsheet);\n $fileName = 'Data Anggota Keluarga';\n\n // Redirect hasil generate xlsx ke web client\n header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');\n header('Content-Disposition: attachment;filename=' . $fileName . '.xlsx');\n header('Cache-Control: max-age=0');\n\n $writer->save('php://output');\n }",
"public function excelExport()\n \t {\n \n $where_str = \"1 = ?\";\n $where_params = array(1);\n if (Input::has('sSearch'))\n {\n $search = Input::get('sSearch');\n\n $where_str .= \" and ( \"\n \t\t\t. \" other_name like '%{$search}%'\"\n \t\t\t. \" or surname like '%{$search}%'\"\n \t\t\t. \" or email like '%{$search}%'\"\n \t\t\t. \")\";\n }\n\n $columns = array('surname','other_name','email','countries.country_des','agencies.acronym','is_verified');\n\n\t\t$akdn = Akdn::select($columns)\n\t\t\t\t\t\t\t\t\t->leftjoin('akdn_agencies','akdn.id','=','akdn_agencies.akdn_id')\n\t\t\t\t\t\t\t\t\t->leftjoin('agencies','agencies.id','=','akdn_agencies.agency_id')\n\t\t\t\t\t\t\t\t\t->leftjoin('akdn_nationalities','akdn.id','=','akdn_nationalities.akdn_id')\n\t\t\t\t\t\t\t\t\t->leftjoin('countries','countries.id','=','akdn_nationalities.country_id')\n\t\t \t\t\t\t\t->whereRaw($where_str, $where_params);\n\n $akdn = $akdn->get()->toArray();\n \n $objPHPExcel = new PHPExcel();\n $objPHPExcel->getProperties()->setCreator(\"ConsultantDB\")\n ->setTitle(\"ConsultantDB: Excel Export\")\n ->setSubject(\"Consultant search result export\")\n ->setDescription(\"Excel export of customized search result from consultant database\")\n ->setKeywords(\"office 2007 openxml\");\n\n $objPHPExcel->setActiveSheetIndex(0);\n $objPHPExcel->getActiveSheet()->setTitle('consultant_search_export');\n\n $header = array(\n 'surname' => 'surname',\n 'Other name' => 'other_name',\n 'Email Address' => 'email',\n 'Country'=> 'country_des',\n 'Agency'=>'acronym',\n 'Verified' => 'is_verified',\n );\n\n $objPHPExcel->getActiveSheet()->fromArray( array_keys($header), NULL, 'A1');\n $objPHPExcel->getActiveSheet()->getStyle('A1:F1')->getFont()->setBold(true);\n\n $link_style_array = [\n 'font' => [\n 'color' => ['rgb' => '0000FF'],\n 'underline' => 'single'\n ]\n ];\n $rowNumber = 2;\n $col = 'A';\n\n foreach ($akdn as $akdn_data) \n {\n $insert_data = array();\n foreach ($header as $column_name) {\n\n $insert_data[$column_name] = $akdn_data[$column_name];\n }\n\n $objPHPExcel->getActiveSheet()->fromArray($akdn_data, NULL, 'A' . $rowNumber );\n\n if($insert_data['email'] != \"\"){\n\n\t\t\t $objPHPExcel->getActiveSheet()->getCell('C' . $rowNumber)->getHyperlink()->setUrl(strip_tags(\"mailto:\".$insert_data['email']));\n\t\t\t $objPHPExcel->getActiveSheet()->getStyle('C' . $rowNumber)->applyFromArray($link_style_array);\n\t\t\t}\n\n if($insert_data['is_verified'] == 1)\n {\n\n $objPHPExcel->getActiveSheet()->setCellValue('F' . $rowNumber,'Yes');\n }\n else\n {\n $objPHPExcel->getActiveSheet()->setCellValue('F' . $rowNumber,'No');\n }\n\n $rowNumber++;\n }\n\n for($j='A'; $j<'No';$j++){\n \n $objPHPExcel->getActiveSheet()->getColumnDimension($j)->setAutoSize(true);\n }\n\n $filename = 'AkdnUser_export_' . date('d_m_Y') . '.xlsx';\n header(\"Pragma: public\");\n header(\"Expires: 0\");\n header(\"Cache-Control: must-revalidate, post-check=0, pre-check=0\");\n header(\"Content-Type: application/force-download\");\n header(\"Content-Type: application/octet-stream\");\n header(\"Content-Type: application/download\");;\n header(\"Content-Disposition: attachment;filename=$filename\");\n header(\"Content-Transfer-Encoding: binary \");\n\n $objWriter = new PHPExcel_Writer_Excel2007($objPHPExcel); \n $objWriter->setOffice2003Compatibility(true);\n $objWriter->save('php://output');\n exit();\n }",
"function download(){\n\t/** Include PHPExcel */\n\trequire_once dirname(__FILE__) . '/Excel/PHPExcel.php';\n\t\n\t$objPHPExcel = new PHPExcel();\n\t\n\t// Set document properties\n\t$objPHPExcel->getProperties()->setCreator($_SESSION[\"userInfo\"][\"userName\"])\n\t\t\t\t\t\t\t\t->setLastModifiedBy($_SESSION[\"userInfo\"][\"userName\"])\n\t\t\t\t\t\t\t\t->setTitle(\"Smart Shop Inventory\")\n\t\t\t\t\t\t\t\t->setSubject(\"Smart Shop Inventory\")\n\t\t\t\t\t\t\t\t->setDescription(\"Inventory outputted from the Smart Shop database.\")\n\t\t\t\t\t\t\t\t->setKeywords(\"office PHPExcel php\")\n\t\t\t\t\t\t\t\t->setCategory(\"Inventory Data File\");\n\t\n\t//size the columns appropriately\n\t$objPHPExcel->getActiveSheet()->getColumnDimension('A')->setWidth(5);\n\t$objPHPExcel->getActiveSheet()->getColumnDimension('B')->setWidth(18);\n\t$objPHPExcel->getActiveSheet()->getColumnDimension('C')->setWidth(10);\n\t$objPHPExcel->getActiveSheet()->getColumnDimension('D')->setWidth(10);\n\t$objPHPExcel->getActiveSheet()->getColumnDimension('E')->setWidth(20);\n\t\n\t//color the title row\n\t$objPHPExcel->getActiveSheet()\n\t\t->getStyle('A1:E1')\n\t\t->getFill()\n\t\t->setFillType(PHPExcel_Style_Fill::FILL_SOLID)\n\t\t->getStartColor()\n\t\t->setARGB('FF808080');\n\t\n\t//output the titles for the columns\n\t$objPHPExcel->setActiveSheetIndex(0)\n\t\t\t\t->setCellValue('A1', 'ID')\n\t\t\t\t->setCellValue('B1', 'Name')\n\t\t\t\t->setCellValue('C1', 'Quantity')\n\t\t\t\t->setCellValue('D1', 'Value')\n\t\t\t\t->setCellValue('E1', 'Last Updated');\n\t\n\t$items = getItems();\n\t$i = 2;\n\tforeach($items as $item){\n\t\t//populate the row with values\n\t\t$objPHPExcel->setActiveSheetIndex(0)\n\t\t\t\t->setCellValue('A'.$i, $item[\"Id\"])\n\t\t\t\t->setCellValue('B'.$i, $item[\"Name\"])\n\t\t\t\t->setCellValue('C'.$i, $item[\"Quantity\"])\n\t\t\t\t->setCellValue('D'.$i, $item[\"Value\"])\n\t\t\t\t->setCellValue('E'.$i, $item[\"Updated\"]);\n\t\t\n\t\t//Set the value cell format to currency\n\t\t$objPHPExcel->getActiveSheet()\n\t\t->getStyle('D'.$i)\n\t\t->getNumberFormat()\n\t\t->setFormatCode(\n\t\t\tPHPExcel_Style_NumberFormat::FORMAT_CURRENCY_USD_SIMPLE\n\t\t);\n\t\n\t\t$i++;\n\t}\n\t\n\t// Set active sheet index to the first sheet, so Excel opens this as the first sheet\n\t$objPHPExcel->setActiveSheetIndex(0);\n\t\n\t$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');\n\t$output = \"downloads/\" . date(\"Y-m-d_H-i\") . \"_Inventory.xlsx\";\n\t$objWriter->save($output);\n\t\n\treturn [\"success\" => true, \"message\" => $output];\n}",
"public function exportCatFuncionesExcel(){\n return Excel::download(new ExcelExportCatFunciones, 'Cat_Funciones_'.date('d-m-Y').'.xlsx');\n }",
"public function export()\n\t\t {\n\t\t\t return Excel::download(new UsersExport, 'users.xlsx');\n\t\t }",
"public function exportxls()\n\t{\n\t\t// Get the input from the url / post\n\t\t$input\t\t= JFactory::getApplication()->input;\n\n\t\t// the list with pk's for the selected items to export\n\t\t$pks\t\t= $input->get('cid', array(), 'array');\n\n\t\t$model\t\t= $this->getModel('HelloWorld');\n\n\t\t// get the data from the db\n\t\t$content\t= $model->getExportData($pks);\n\n\t\t// Create PHPExcel object\n\t\t$objPHPExcel = new PHPExcel();\n\t\t$objPHPExcel->getProperties()->setCreator(\"John Doe\")\n\t\t\t->setLastModifiedBy(\"Jane Deer\")\n\t\t\t->setTitle(\"My WorkSheet\")\n\t\t\t->setSubject(\"Test Document\")\n\t\t\t->setDescription(\"Test document for XLSX, generated using PHP classes.\");\n\n\t\t$objPHPExcel->getDefaultStyle()->getFont()->setName('Arial')->setSize(12);\n\n\t\t// enter cells in worksheet\n\t\t$sht\t= $objPHPExcel->setActiveSheetIndex(0);\n\t\t$sht->fromArray( $content, NULL, 'A1' );\n\n\t\t// resize column width\n\t\t$sht->getColumnDimension('A')->setWidth(5);\n\t\t$sht->getColumnDimension('B')->setWidth(5);\n\t\t$sht->getColumnDimension('C')->setWidth(35);\n\t\t$sht->getColumnDimension('D')->setWidth(20);\n\n\t\t$sht->setSelectedCell('A1');\n\n\t\t// ********************************************\n\t\t// Export PHPExcel object\n\n\t\t// Set active sheet index to the first sheet, so Excel opens this as the first sheet\n\t\t$objPHPExcel->setActiveSheetIndex(0);\n\n\t\t// Redirect output to a client's web browser (Excel2007)\n\t\t$filename\t= \"greetings\";\n\t\t$app\t\t= JFactory::getApplication();\n\t\t$app\n\t\t-> setHeader('Content-Type','application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',true)\n\t\t-> setHeader('Content-disposition','attachment;filename=\"'.$filename.'.xlsx\";creation-date=\"'\n\t\t\t\t.JFactory::getDate()->toRFC822().'\"',true)\n\t\t-> setHeader('Cache-Control','max-age=1',true)\n\t\t-> setHeader('Expires','Mon, 26 Jul 1997 05:00:00 GMT',true)\t\t// Date in the past\n\t\t-> setHeader('Last-Modified',gmdate('D, d M Y H:i:s').' GMT',true)\t// always modified\n\t\t-> setHeader('Cache-Control','cache, must-revalidate',true)\n\t\t-> setHeader('Pragma','public',true);\n\n\t\t$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');\n\t\t$objWriter->save('php://output');\n\t}",
"public function createExport();",
"public function excel()\n {\n Excel::create('ReporteExcel', function($excel) {\n $excel->sheet('EdadGenero', function($sheet) {\n $usersinfo = User::select(DB::raw(\"users.cc as Cedula_Ciudadania, users.lastname as Apellidos, users.name as Nombres, users.email as Email, users.cellphone as Celular, users.department as DepartamentoNac, users.city as CiudadNac, users.created_at as FechaRegistro\"))->get();\n $sheet->fromArray($usersinfo);\n });\n })->export('xls');\n\n }",
"public function export_sales_report(){\n $sales_report = DB::table('orders')\n ->select('*')\n ->get();\n\n $sales_array[] = array('Invoice ID','Customer Name','Total', 'Discount','Sales Date');\n\n foreach ($sales_report as $item) {\n $customer_details = unserialize($item->customer_details);\n\n $sales_array[] = array(\n 'Invoice ID' => $item->id,\n 'Customer Name' => $customer_details['customer_name'],\n 'Total' => $item->total,\n 'Discount' => $item->discount,\n 'Sales Date' => date('d M Y', strtotime($item->created_at))\n );\n\n }\n //create excel\n Excel::create('Sales Report', function($excel) use($sales_array) {\n $excel->sheet('Sales Report', function($sheet) use($sales_array) {\n $sheet->fromArray($sales_array);\n });\n })->download('xls');\n\n }",
"public function export()\n {\n return Excel::download(new \\App\\Exports\\ReportsExport(), 'export.xlsx');\n }",
"public function exportShippingExcelAction()\n {\n $fileName = 'shipping.xml';\n $grid = $this->getLayout()->createBlock('adminhtml/report_sales_shipping_grid');\n $this->_initReportAction($grid);\n $this->_prepareDownloadResponse($fileName, $grid->getExcelFile($fileName));\n }",
"public function export();",
"public function export();",
"public function export();",
"public function export();",
"public function export();",
"public function export()\n {\n return Excel::download(new ClientsExport, 'companies-' . date('Y-m-d H:i:s') . '.' . request('format', 'xlsx'));\n }",
"function export(){\n header(\"Content-type: aplication/vnd-ms-excel\");\n header(\"Content-Disposition: attachment; filename=Data_Siswa.xls\");\n \n $data ['siswa'] = $this->SiswaModel->view();\n $this->load->view('export', $data);\n }",
"function export()\n\t{\n\t\t$zip = $this->buildExportFile();\n\t\t\n\t ilUtil::deliverFile($zip, $this->object->getTitle().\".zip\", '', false, true);\n\t}",
"public function actionExportarExcel()\n {\n\n $this->renderPartial('excel');\n\n }",
"public function actionExportarExcel()\n {\n\n $this->renderPartial('excel');\n\n }",
"public function download_category_excel_sheet() {\n $spreadsheet = new Spreadsheet();\n $sheet = $spreadsheet->getActiveSheet();\n $sheet->setCellValue('A1', 'ar_name');\n $sheet->setCellValue('B1', 'en_name');\n $sheet->setCellValue('C1', 'discount');\n\n $writer = new Xlsx($spreadsheet);\n\n $filename = 'add_category_template';\n\n header('Content-Type: application/vnd.ms-excel');\n header('Content-Disposition: attachment;filename=\"' . $filename . '.xlsx\"');\n\n $writer->save('php://output');\n }",
"public function exportData(): void\n\t{\n\t\t$entries = [];\n\t\tif (!$this->exportColumns && $this->quickExport && $this->queryOptions['viewname']) {\n\t\t\t[$headers, $entries] = $this->getEntriesForQuickExport();\n\t\t} else {\n\t\t\t[$headers, $entries] = $this->getEntriesExport();\n\t\t}\n\t\t$this->output($headers, $entries);\n\t}",
"public function export() {\n\n foreach ( $this::getFieldMap() as $key => $mappedField ) {\n\n if ( $mappedField->sheet == '-None-' )\n continue;\n\n if ( $this->setActiveSheet( $mappedField->sheet, 'name' ) ) {\n\n $this->activeSheet->setCellValue( $mappedField->cell, $this->getValueForField( (int) $mappedField->field_id ) );\n\n $this->saveActiveSheetChanges();\n\n }\n }\n\n $this->saveAndFlushCalculationCaches();\n\n $current_user = get_userdata( get_current_user_id() );\n\n $emailContent = 'This is an automated email containing an exported copy of a user form submission'\n . \"\\n\\n User Login: \" . $current_user->user_login\n . \"\\n User Email: \" . $current_user->user_email;\n\n if ( $current_user->first_name && $current_user->last_name ) {\n\n $emailContent .= \"\\n Name: \" . $current_user->first_name . ' ' . $current_user->last_name;\n }\n\n wp_mail( $this::getExportDestinationEmails(), 'Gravityforms Entry Export from GEB', $emailContent, '', $this->args['destinationFile'] );\n }",
"function export_nik_unins_lunas()\n\t{\n\t\t$excel_id=$this->uri->segment(3);\n\t\t$datas = $this->model_transaction->get_lunas_gagal($excel_id);\n\t\t\n\t\t// Create new PHPExcel object\n\t\t$objPHPExcel = $this->phpexcel;\n\t\t// Set document properties\n\t\t$objPHPExcel->getProperties()->setCreator(\"MICROFINANCE\")\n\t\t\t\t\t\t\t\t\t ->setLastModifiedBy(\"MICROFINANCE\")\n\t\t\t\t\t\t\t\t\t ->setTitle(\"Office 2007 XLSX Test Document\")\n\t\t\t\t\t\t\t\t\t ->setSubject(\"Office 2007 XLSX Test Document\")\n\t\t\t\t\t\t\t\t\t ->setDescription(\"REPORT, generated using PHP classes.\")\n\t\t\t\t\t\t\t\t\t ->setKeywords(\"REPORT\")\n\t\t\t\t\t\t\t\t\t ->setCategory(\"Test result file\");\n\t\t\t\t\t\t\t\t\t \n\t\t$objPHPExcel->setActiveSheetIndex(0); \n\t\t\n\t\t/*\n\t\t| BORDER OPTION\n\t\t*/\n\t\t$styleArray['borders']['outline']['style']=PHPExcel_Style_Border::BORDER_THIN;\n\t\t$styleArray['borders']['outline']['color']['rgb']='000000';\n\t\t/*\n\t\t| SET COLUMN WIDTH\n\t\t*/\n\t\t$objPHPExcel->getActiveSheet()->getColumnDimension('A')->setWidth(15);\n\t\t$objPHPExcel->getActiveSheet()->getColumnDimension('B')->setWidth(30);\n\n\t\t/*\n\t\t| ROW HEADER TITLE\n\t\t*/\n\t\t$row=1;\n\t\t$objPHPExcel->getActiveSheet()->setCellValue('A'.$row,\"List Pelunasan Tidak Sesuai\");\n\t\t$objPHPExcel->getActiveSheet()->getStyle('A'.$row)->getFont()->setBold(true);\n\t\t\n\t\t$row+=1;\n\t\t$objPHPExcel->getActiveSheet()->setCellValue('A'.$row,\"NIK\");\n\t\t$objPHPExcel->getActiveSheet()->setCellValue('B'.$row,\"Nama\");\n\t\t$objPHPExcel->getActiveSheet()->getStyle('A'.$row.':B'.$row)->getFont()->setBold(true);\n\t\t$objPHPExcel->getActiveSheet()->getStyle('A'.$row.':A'.$row)->applyFromArray($styleArray);\n\t\t$objPHPExcel->getActiveSheet()->getStyle('B'.$row.':B'.$row)->applyFromArray($styleArray);\n\t\t$objPHPExcel->getActiveSheet()->getStyle('A'.$row.':B'.$row)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n\t\t$row+=1;\n\t\t/*\n\t\t| ROW DATA\n\t\t*/\n\t\tfor($i=0;$i<count($datas);$i++){\n\t\t\t$objPHPExcel->getActiveSheet()->setCellValue('A'.$row,$datas[$i]['nik']);\n\t\t\t$objPHPExcel->getActiveSheet()->setCellValue('B'.$row,$datas[$i]['nama']);\n\t\t\t$objPHPExcel->getActiveSheet()->getStyle('A'.$row.':B'.$row)->getFont()->setSize(11);\n\t\t\t$row++;\n\t\t}\n\n\t\theader('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');\n\t\theader('Content-Disposition: attachment;filename=\"PELUNASAN TIDAK SESUAI.xlsx\"');\n\t\theader('Cache-Control: max-age=0');\n\n\t\t$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');\n\t\t$objWriter->save('php://output');\n\t}",
"public function actionExport() {\n $models = Package::model()->findAll();\n //code\n $objPHPExcel = new PHPExcel();\n /** Error reporting */\n error_reporting(E_ALL);\n ini_set('display_errors', TRUE);\n ini_set('display_startup_errors', TRUE);\n define('EOL', (PHP_SAPI == 'cli') ? PHP_EOL : '<br />');\n date_default_timezone_set('Europe/London');\n /** PHPExcel_IOFactory */\n $objReader = new PHPExcel;\n $objReader = PHPExcel_IOFactory::createReader('Excel2007');\n $path = Yii::app()->basePath . '/../export/template.xlsx';\n $pathExport = Yii::app()->basePath . '/../export/daftar paket.xlsx';\n $objPHPExcel = $objReader->load($path);\n $objPHPExcel->setActiveSheetIndex(0);\n// \" Add new data to the template\"\n $sheet = $objPHPExcel->getActiveSheet();\n $row = 5;\n $rowData1 = $row - 1;\n $rowData2 = $row - 1;\n $rowData3 = $row - 1;\n $rowData4 = $row - 1;\n $rowData5 = $row - 1;\n $sheet->insertNewRowBefore($row, (count($models) - 1));\n for ($i = 1; $i <= count($models); $i++) {\n $sheet->setCellValue('A' . (($row - 2) + $i), $i);\n }\n foreach ($models as $model) {\n $sheet->setCellValue('B' . $rowData1++, \"$model->code\");\n $sheet->setCellValueExplicit('C' . $rowData2++, $model->ppk_code, PHPExcel_Cell_DataType::TYPE_STRING);\n $sheet->setCellValue('D' . $rowData3++, $model->limit);\n $sheet->setCellValue('E' . $rowData4++, $model->getTotal($model->code)[\"realization\"]);\n $sheet->setCellValue('F' . $rowData5++, $model->getTotal($model->code)[\"restMoney\"]);\n }\n $objPHPExcel->getActiveSheet()->setTitle('Daftar Paket');\n\n $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');\n $objWriter->save($pathExport);\n header('Content-Description: File Transfer');\n header('Content-Type: application/octet-stream');\n header('Content-Disposition: attachment; filename=' . basename($pathExport));\n header('Content-Transfer-Encoding: binary');\n header('Expires: 0');\n header('Cache-Control: must-revalidate');\n header('Pragma: public');\n header('Content-Length: ' . filesize($pathExport));\n readfile($pathExport);\n unlink($pathExport);\n exit;\n//code\n }",
"public function export(){\n header(\"Content-type: application/vnd-ms-excel\");\n header(\"Content-Disposition: attachment; filename=Data_Card.xls\");\n \n $data['card'] = $this->Card_model->get_all_card();\n $this->load->view('card/export', $data);\n }",
"private static function _output($p_fileName)\n {\n $objWriter = PHPExcel_IOFactory::createWriter(self::$objPHPExcel, self::$excelExtension);\n header('Content-type: application/vnd.ms-excel');\n header('Content-Disposition: attachment;filename=\"' . $p_fileName . '\"');\n header('Cache-Control: max-age=0');\n // If you're serving to IE 9, then the following may be needed\n header('Cache-Control: max-age=1');\n header(\"Content-Transfer-Encoding: binary \");\n $objWriter->save('php://output');\n }",
"public function exportExcelAction()\n {\n $fileName = 'traineecert.xls';\n $content = $this->getLayout()->createBlock('bs_traineecert/adminhtml_traineecert_grid')\n ->getExcelFile();\n $this->_prepareDownloadResponse($fileName, $content);\n }",
"function Page_Exporting() {\r\n\r\n\t\t//$this->ExportDoc->Text = \"my header\"; // Export header\r\n\t\t//return FALSE; // Return FALSE to skip default export and use Row_Export event\r\n\r\n\t\treturn TRUE; // Return TRUE to use default export and skip Row_Export event\r\n\t}",
"function _export()\n\t{\n\t\t$title=get_page_title('EXPORT');\n\n\t\tif (!array_key_exists('tables',$_POST)) warn_exit(do_lang_tempcode('IMPROPERLY_FILLED_IN'));\n\n\t\t$xml=export_to_xml($_POST['tables'],post_param_integer('comcode_xml',0)==1);\n\n\t\tbreadcrumb_set_self(do_lang_tempcode('_RESULTS'));\n\t\tbreadcrumb_set_parents(array(array('_SELF:_SELF:misc',do_lang_tempcode('XML_DATA_MANAGEMENT'))));\n\n\t\treturn do_template('XML_STORAGE_EXPORT_RESULTS_SCREEN',array('TITLE'=>$title,'XML'=>$xml));\n\t}",
"public function exportar_productos($com_id){\n date_default_timezone_set('America/Lima');\n $componente = $this->model_componente->get_componente($com_id); //// DATOS COMPONENTE\n $fase=$this->model_faseetapa->get_fase($componente[0]['pfec_id']); /// DATOS FASE\n $proyecto = $this->model_proyecto->get_id_proyecto($fase[0]['proy_id']); //// DATOS PROYECTO\n if($proyecto[0]['tp_id']!=4){\n $proyecto = $this->model_proyecto->get_datos_proyecto_unidad($fase[0]['proy_id']); //// DATOS PROYECTO\n }\n\n $prod=$this->rep_list_operaciones($com_id,2);\n //la fecha de exportación sera parte del nombre del archivo Excel\n $fecha = date(\"d-m-Y H:i:s\");\n\n //Inicio de exportación en Excel\n header('Content-type: application/vnd.ms-excel;charset=UTF-8');\n header(\"Content-Disposition: attachment; filename=Reporte_Operación_\".$componente[0]['com_componente'].\"_$fecha.xls\"); //Indica el nombre del archivo resultante\n header(\"Pragma: no-cache\");\n header(\"Expires: 0\");\n\n echo '\n <table border=\"1\" cellpadding=\"0\" cellspacing=\"0\" class=\"tabla\">\n <tr class=\"modo1\">\n <td colspan=\"24\"></td>\n </tr>\n <tr class=\"modo1\">\n <td colspan=\"24\">\n '.$this->cabecera_2020($com_id,2).'\n </td>\n </tr>\n </table><br>';\n echo \"\".$prod.\"\";\n }",
"function attendance_exporttotableed($data, $filename, $format) {\n global $CFG;\n\n if ($format === 'excel') {\n require_once(\"$CFG->libdir/excellib.class.php\");\n $filename .= \".xls\";\n $workbook = new MoodleExcelWorkbook(\"-\");\n } else {\n require_once(\"$CFG->libdir/odslib.class.php\");\n $filename .= \".ods\";\n $workbook = new MoodleODSWorkbook(\"-\");\n }\n // Sending HTTP headers.\n $workbook->send($filename);\n // Creating the first worksheet.\n $myxls = $workbook->add_worksheet(get_string('modulenameplural', 'attendance'));\n // Format types.\n $formatbc = $workbook->add_format();\n $formatbc->set_bold(1);\n\n $myxls->write(0, 0, get_string('course'), $formatbc);\n $myxls->write(0, 1, $data->course);\n $myxls->write(1, 0, get_string('group'), $formatbc);\n $myxls->write(1, 1, $data->group);\n\n $i = 3;\n $j = 0;\n foreach ($data->tabhead as $cell) {\n // Merge cells if the heading would be empty (remarks column).\n if (empty($cell)) {\n $myxls->merge_cells($i, $j - 1, $i, $j);\n } else {\n $myxls->write($i, $j, $cell, $formatbc);\n }\n $j++;\n }\n $i++;\n $j = 0;\n foreach ($data->table as $row) {\n foreach ($row as $cell) {\n $myxls->write($i, $j++, $cell);\n }\n $i++;\n $j = 0;\n }\n $workbook->close();\n}",
"private function excelExport()\r\n {\r\n $result = true;\r\n // Extension\r\n if ($this->extensionType == 'Excel2007') {\r\n $this->fileName .= isset($this->extension) ? '.' . $this->extension : '.xlsx';\r\n } elseif ($this->extensionType == 'Excel5') {\r\n $this->fileName .= isset($this->extension) ? '.' . $this->extension : '.xls';\r\n } elseif ($this->extensionType == 'csv') {\r\n $this->fileName .= isset($this->extension) ? '.' . $this->extension : '.csv';\r\n } else {\r\n $this->log(CLogger::LEVEL_ERROR, 'Extension type is not supported.');\r\n $result = false;\r\n }\r\n // File\r\n if (!$this->stream)\r\n $this->filePath .= DIRECTORY_SEPARATOR . $this->fileName;\r\n // Header & Cell Styles\r\n if (!isset($this->headerStyle))\r\n $this->headerStyle = array(\r\n 'borders' => array(\r\n 'outline' => array(\r\n 'style' => PHPExcel_Style_Border::BORDER_THIN,\r\n 'color' => array('argb' => '000000')\r\n )\r\n ),\r\n 'font' => array(\r\n 'bold' => true\r\n )\r\n );\r\n if (!isset($this->cellStyle))\r\n $this->cellStyle = array(\r\n 'borders' => array(\r\n 'outline' => array(\r\n 'style' => PHPExcel_Style_Border::BORDER_THIN,\r\n 'color' => array('argb' => '000000')\r\n )\r\n )\r\n );\r\n // Columns\r\n if (!isset($this->columns)) {\r\n $this->columns = array();\r\n $allColumns = $this->model->getAttributes();\r\n foreach ($allColumns as $key => $value) {\r\n $this->columns[] = array(\r\n 'field' => $key,\r\n 'label' => $this->model->getAttributeLabel($key),\r\n 'type' => PHPExcel_Cell_DataType::TYPE_STRING,\r\n 'width' => 25,\r\n 'value' => null,\r\n 'itemAlias' => null,\r\n 'formatter' => null,\r\n 'headerStyle' => null,\r\n 'cellStyle' => null,\r\n 'visible' => true,\r\n );\r\n }\r\n if (is_null($allColumns) || count($allColumns) == 0) {\r\n $this->log(CLogger::LEVEL_ERROR, 'No column is available.');\r\n $result = false;\r\n }\r\n } else {\r\n $valid = true;\r\n foreach ($this->columns as $column) {\r\n if (!isset($column['field']) || !isset($column['label'])) {\r\n $valid = false;\r\n }\r\n }\r\n if (!$valid) {\r\n $this->log(CLogger::LEVEL_ERROR, 'An invalid column is provided. field and label attributes must be provided.');\r\n $result = false;\r\n }\r\n }\r\n if (isset($this->dataProvider)) {\r\n try {\r\n // PHPExcel instance\r\n $excel = new PHPExcel();\r\n PHPExcel_Cell::setValueBinder(new PHPExcel_Cell_AdvancedValueBinder());\r\n $excel->setActiveSheetIndex(0);\r\n $sheet = $excel->getActiveSheet();\r\n // Header\r\n $offset = 0;\r\n for ($column = 0; $column < count($this->columns); $column++) {\r\n if (isset($this->columns[$column]['visible']) && !$this->columns[$column]['visible']) {\r\n $offset++;\r\n } else {\r\n $sheet->getStyleByColumnAndRow($column-$offset, 1)->applyFromArray(isset($this->columns[$column]['headerStyle']) ? $this->columns[$column]['headerStyle'] : $this->headerStyle);\r\n $sheet->getCellByColumnAndRow($column-$offset, 1)->setValueExplicit($this->columns[$column]['label'], PHPExcel_Cell_DataType::TYPE_STRING);\r\n $sheet->getColumnDimensionByColumn($column-$offset)->setWidth(isset($this->columns[$column]['width']) ? $this->columns[$column]['width'] : 25);\r\n }\r\n }\r\n // Rows\r\n for ($row = 0; $row < count($this->dataProvider); $row++) {\r\n $offset = 0;\r\n for ($column = 0; $column < count($this->columns); $column++) {\r\n if (isset($this->columns[$column]['visible']) && !$this->columns[$column]['visible']) {\r\n $offset++;\r\n } else {\r\n $value = $this->getValue($row, $column);\r\n $sheet->getStyleByColumnAndRow($column-$offset, $row + 2)->applyFromArray(isset($this->columns[$column]['cellStyle']) ? $this->columns[$column]['cellStyle'] : $this->cellStyle);\r\n $sheet->getCellByColumnAndRow($column-$offset, $row + 2)->setValueExplicit($value, isset($this->columns[$column]['type']) ? $this->columns[$column]['type'] : PHPExcel_Cell_DataType::TYPE_STRING);\r\n }\r\n }\r\n $sheet->getRowDimension($row + 2)->setRowHeight(-1);\r\n }\r\n ob_end_clean();\r\n ob_start();\r\n $objWriter = PHPExcel_IOFactory::createWriter($excel, $this->extensionType);\r\n if ($this->stream) {\r\n header('Content-Type: application/vnd.ms-excel');\r\n header('Content-Disposition: attachment;filename=\"' . $this->fileName . '\"');\r\n header('Cache-Control: max-age=0');\r\n $objWriter->save('php://output');\r\n $excel->disconnectWorksheets();\r\n $result = true;\r\n } else {\r\n $objWriter->save($this->filePath);\r\n $excel->disconnectWorksheets();\r\n $result = Yii::app()->getBaseUrl(true).DIRECTORY_SEPARATOR.$this->mainPath.DIRECTORY_SEPARATOR.$this->subPath.DIRECTORY_SEPARATOR.$this->fileName;\r\n $result = str_replace(DIRECTORY_SEPARATOR, '/', $result);\r\n \r\n }\r\n } catch (Exception $e) {\r\n $this->log(CLogger::LEVEL_ERROR, 'PHPExcel Exception : ' . $e->getMessage());\r\n $result = false;\r\n }\r\n } else {\r\n $this->log(CLogger::LEVEL_ERROR, 'No data is provided.');\r\n $result = false;\r\n }\r\n return $result;\r\n }",
"public function export() { \n\t\t$type = $this->uri->segment ( 4 );\n\n\t\t$uri_array = $this->uri->uri_to_assoc ( 3, array (\n\t\t\t\t'export' \n\t\t) );\n\n\t\t// Export selected data\n\t\tif (($uri_array ['export'] == 'csv') || ($uri_array ['export'] == 'xls') && $type == \"user\") {\n\t\t\t$this->export_user ( $uri_array, $uri_array ['export'] );\n\t\t}\n\t\t\n\t}",
"public function export_order()\n {\n return Excel::download(new OrderExport, 'orders.xlsx');\n }",
"public function exportAction() {\n\t\tInvoices::Export();\n\t}",
"function export_finance_canceled_angsuran()\n\t{\n\t\t$angsuran_id=$this->uri->segment(3);\n\t\t$datas = $this->model_transaction->get_angsuran_canceled($angsuran_id);\n\n\t\t// Create new PHPExcel object\n\t\t$objPHPExcel = $this->phpexcel;\n\t\t// Set document properties\n\t\t$objPHPExcel->getProperties()->setCreator(\"MICROFINANCE\")\n\t\t\t\t\t\t\t\t\t ->setLastModifiedBy(\"MICROFINANCE\")\n\t\t\t\t\t\t\t\t\t ->setTitle(\"Office 2007 XLSX Test Document\")\n\t\t\t\t\t\t\t\t\t ->setSubject(\"Office 2007 XLSX Test Document\")\n\t\t\t\t\t\t\t\t\t ->setDescription(\"REPORT, generated using PHP classes.\")\n\t\t\t\t\t\t\t\t\t ->setKeywords(\"REPORT\")\n\t\t\t\t\t\t\t\t\t ->setCategory(\"Test result file\");\n\t\t\t\t\t\t\t\t\t \n\t\t$objPHPExcel->setActiveSheetIndex(0); \n\t\t\n\t\t/*\n\t\t| BORDER OPTION\n\t\t*/\n\t\t$styleArray['borders']['outline']['style']=PHPExcel_Style_Border::BORDER_THIN;\n\t\t$styleArray['borders']['outline']['color']['rgb']='000000';\n\t\t/*\n\t\t| SET COLUMN WIDTH\n\t\t*/\n\t\t$objPHPExcel->getActiveSheet()->getColumnDimension('A')->setWidth(15);\n\t\t$objPHPExcel->getActiveSheet()->getColumnDimension('B')->setWidth(30);\n\n\t\t/*\n\t\t| ROW HEADER TITLE\n\t\t*/\n\t\t$row=1;\n\t\t$objPHPExcel->getActiveSheet()->setCellValue('A'.$row,\"List Angsuran Dibatalkan\");\n\t\t$objPHPExcel->getActiveSheet()->getStyle('A'.$row)->getFont()->setBold(true);\n\t\t\n\t\t$row+=1;\n\t\t$objPHPExcel->getActiveSheet()->setCellValue('A'.$row,\"No. Pembiayaan\");\n\t\t$objPHPExcel->getActiveSheet()->setCellValue('B'.$row,\"Nama\");\n\t\t$objPHPExcel->getActiveSheet()->getStyle('A'.$row.':B'.$row)->getFont()->setBold(true);\n\t\t$objPHPExcel->getActiveSheet()->getStyle('A'.$row.':A'.$row)->applyFromArray($styleArray);\n\t\t$objPHPExcel->getActiveSheet()->getStyle('B'.$row.':B'.$row)->applyFromArray($styleArray);\n\t\t$objPHPExcel->getActiveSheet()->getStyle('A'.$row.':B'.$row)->getAlignment()->setHorizontal(PHPExcel_Style_Alignment::HORIZONTAL_CENTER);\n\t\t$row+=1;\n\t\t/*\n\t\t| ROW DATA\n\t\t*/\n\t\tfor($i=0;$i<count($datas);$i++){\n\t\t\t$objPHPExcel->getActiveSheet()->setCellValue('A'.$row,$datas[$i]['account_financing_no']);\n\t\t\t$objPHPExcel->getActiveSheet()->setCellValue('B'.$row,$datas[$i]['nama']);\n\t\t\t$objPHPExcel->getActiveSheet()->getStyle('A'.$row.':B'.$row)->getFont()->setSize(11);\n\t\t\t$row++;\n\t\t}\n\n\t\theader('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');\n\t\theader('Content-Disposition: attachment;filename=\"ANGSURAN DIBATALKAN.xlsx\"');\n\t\theader('Cache-Control: max-age=0');\n\n\t\t$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');\n\t\t$objWriter->save('php://output');\n\t}",
"abstract protected function excel ();",
"public function payments_export_xls() {\n ini_set('memory_limit', '-1');\n $tenant_id = $this->tenant_id;\n $company = $this->input->get('company');\n $companies = $this->classTraineeModel->get_company_for_paidinvoice($tenant_id);\n $company_arr = array();\n foreach ($companies as $row) {\n $company_arr[$row->company_id] = $row->company_name;\n }\n $invoice_id = $this->input->get('invoice_id');\n $start_date = $this->input->get('start_date');\n $end_date = $this->input->get('end_date');\n $field = ($this->input->get('f')) ? $this->input->get('f') : 'ei.invoice_id';\n $order_by = ($this->input->get('o')) ? $this->input->get('o') : 'DESC';\n $tabledata = $this->reportsModel->get_payment_recd($records_per_page, $offset, $field, $order_by, $company, $invoice_id, $start_date, $end_date);\n\n $tabledata_count = count($tabledata);\n $pids = array();\n for ($i = 0; $i < $tabledata_count; $i++) {\n $pids[] = $tabledata[$i]->pymnt_due_id;\n }\n $tb_extra = $this->reportsModel->get_payment_recd_trainee_company($pids);\n $tabledataextra = array();\n for ($i = 0; $i < count($tb_extra); $i++) {\n $tabledataextra[$tb_extra[$i]->pymnt_due_id] = $tb_extra[$i];\n }\n $this->load->helper('export_helper');\n $count_tabledata = count($tabledata);\n $excel_titles = array('Inv #', 'Inv Dt.', 'Inv Amt.', 'Recd. On', 'Amt. Recd.', 'Course - Class', 'Name', 'Taxcode');\n $excel_data = array();\n for ($i = 0; $i < $count_tabledata; $i++) {\n $k = $tabledata[$i]->pymnt_due_id;\n if ($tabledata[$i]->inv_type == 'INVINDV') {\n $taxcode = $tabledataextra[$k]->tax_code;\n $name = $tabledataextra[$k]->first_name . ' ' . $tabledataextra[$k]->last_name;\n } else {\n if ($tabledata[$i]->company_id[0] == 'T') {\n $tenant_details = fetch_tenant_details($tabledata[$i]->company_id);\n $name = $tenant_details->tenant_name . ' (Company)';\n $taxcode = $tenant_details->tenant_name;\n } else {\n $taxcode = $tabledataextra[$k]->comp_regist_num;\n $name = $tabledataextra[$k]->company_name . ' (Company)';\n }\n }\n $excel_data[$i][] = $tabledata[$i]->invoice_id;\n $excel_data[$i][] = date('d/m/Y', strtotime($tabledata[$i]->inv_date));\n $excel_data[$i][] = '$ ' . number_format($tabledata[$i]->total_inv_amount, 2, '.', '');\n $excel_data[$i][] = date('d/m/Y', strtotime($tabledata[$i]->recd_on));\n $excel_data[$i][] = '$ ' . number_format($tabledata[$i]->amount_recd, 2, '.', '');\n $excel_data[$i][] = $tabledataextra[$k]->crse_name . ' - ' . $tabledataextra[$k]->class_name;\n $excel_data[$i][] = $name;\n $excel_data[$i][] = $this->mask_format($taxcode);\n }\n if (!empty($tabledata)) {\n if (empty($start_date) && empty($end_date)) {\n $period = ' for ' . date('F d Y, l');\n } else {\n $period = 'for the period';\n if (!empty($start_date))\n $period .= ' from ' . date('F d Y', DateTime::createFromFormat('d-m-Y', $start_date)->getTimestamp());\n if (!empty($end_date))\n $period .= ' to ' . date('F d Y', DateTime::createFromFormat('d-m-Y', $end_date)->getTimestamp());\n }\n if (!empty($company)) {\n $period .= ' \\'' . $company_arr[$company] . '\\'';\n }\n if (!empty($invoice_id)) {\n $period .= ' - \\' Invoice No.: ' . $invoice_id . '\\'';\n }\n }\n $excel_filename = 'payments_received.xls';\n $excel_sheetname = 'Payments Received';\n $excel_main_heading = 'Accounting Reports - Payments Received' . $period;\n\n export_page_fields($excel_titles, $excel_data, $excel_filename, $excel_sheetname, $excel_main_heading);\n }",
"function export_csv()\n {\n $filter_custom_fields = JRequest::getVar('filter_custom_fields');\n $a_custom_fields = $this->_build_a_custom_fields($filter_custom_fields);\n $data = array();\n $k=0;\n for($i=0; $i<count($a_custom_fields);$i++ )\n {\n $custom_field = $a_custom_fields[$i];\n $query = &$this->_buils_export_query($custom_field);\n $this->_db->setQuery((string)$query);\n $rows = $this->_db->loadAssocList();\n foreach ($rows as $row)\n {\n $data[$k]['virtuemart_custom_id'] = $row['virtuemart_custom_id'];\n $data[$k]['virtuemart_product_id'] = $row['virtuemart_product_id'];\n $data[$k]['product_name'] = iconv(\"utf-8\", \"windows-1251\",$row['product_name']);\n $data[$k]['intvalue'] = iconv(\"utf-8\", \"windows-1251\",str_replace('.', ',', $row['intvalue']));\n $data[$k]['custom_title'] = iconv(\"utf-8\", \"windows-1251\",$row['custom_title']);\n $k++;\n }\n }\n $name = 'com_condpower.csv';\n $path = JPATH_ROOT.DS.'tmp'.DS.$name;\n if ($fp = fopen($path, \"w+\"))\n {\n foreach ($data as $fields) {\n fputcsv($fp, $fields, ';', '\"');\n }\n fclose($fp);\n }\n else\n {\n return array(FALSE, JTEXT::_('COM_CONDPOWER_ERROR_OPEN_TO_EXPORT'));\n }\n// $href = str_replace('administrator/', '', JURI::base()).'tmp/'.$name;\n// $href = JURI::base().'components/com_condpower/download.php?path='.$path;\n return array(TRUE,'OK');\n\n }",
"public function exportar_productos_requerimientos($com_id){\n date_default_timezone_set('America/Lima');\n $componente = $this->model_componente->get_componente($com_id); //// DATOS COMPONENTE\n $fase=$this->model_faseetapa->get_fase($componente[0]['pfec_id']); /// DATOS FASE\n $proyecto = $this->model_proyecto->get_id_proyecto($fase[0]['proy_id']); //// DATOS PROYECTO\n $prod=$this->requerimientos_operaciones($com_id);\n //la fecha de exportación sera parte del nombre del archivo Excel\n $fecha = date(\"d-m-Y H:i:s\");\n\n //Inicio de exportación en Excel\n header('Content-type: application/vnd.ms-excel;charset=UTF-8');\n header(\"Content-Disposition: attachment; filename=Reporte_requerimientos_Operación_\".$componente[0]['com_componente'].\"_$fecha.xls\"); //Indica el nombre del archivo resultante\n header(\"Pragma: no-cache\");\n header(\"Expires: 0\");\n\n echo '\n <table border=\"1\" cellpadding=\"0\" cellspacing=\"0\" class=\"tabla\">\n <tr class=\"modo1\">\n <td colspan=\"21\"></td>\n </tr>\n <tr class=\"modo1\">\n <td colspan=\"21\">\n <FONT FACE=\"courier new\" size=\"1\">\n <b>ENTIDAD : </b>'.$this->session->userdata('entidad').'<br>\n <b>PLAN OPERATIVO ANUAL POA : </b> ' . $this->gestion . '<br>\n <b>REPORTE : </b> REQUERIMIENTOS POR OPERACIONES REGISTRADAS<br>\n <b>ACTIVIDAD : </b>'.$proyecto[0]['aper_programa'].''.$proyecto[0]['aper_proyecto'].''.$proyecto[0]['aper_actividad'].' - '.mb_convert_encoding(''.$proyecto[0]['proy_nombre'], 'cp1252', 'UTF-8').'<br>\n <b>SUB ACTIVIDAD : </b>'.$componente[0]['serv_cod'].'-'.mb_convert_encoding(''.$componente[0]['com_componente'], 'cp1252', 'UTF-8').'<br>\n </font>\n </td>\n </tr>\n </table><br>';\n echo \"\".$prod.\"\";\n }",
"public function export_returns_report(){\n $sales_report = DB::table('returns')\n ->select('*')\n ->get();\n\n $sales_array[] = array('Invoice ID','Customer Name','Total', 'Discount','Sales Date');\n\n foreach ($sales_report as $item) {\n $customer_details = unserialize($item->customer_details);\n\n $sales_array[] = array(\n 'Invoice ID' => $item->inventory_id,\n 'Customer Name' => $customer_details['customer_name'],\n 'Total' => $item->total,\n 'Return Charge' => $item->return_charge,\n 'Sales Date' => date('d M Y', strtotime($item->created_at))\n );\n\n }\n //create excel\n Excel::create('Returns Report', function($excel) use($sales_array) {\n $excel->sheet('Returns Report', function($sheet) use($sales_array) {\n $sheet->fromArray($sales_array);\n });\n })->download('xls');\n\n }"
]
| [
"0.71940744",
"0.7104208",
"0.7100655",
"0.7057546",
"0.7043447",
"0.70406216",
"0.7039477",
"0.70322454",
"0.6973574",
"0.6971989",
"0.6965707",
"0.6954718",
"0.6952265",
"0.694071",
"0.6927878",
"0.68947035",
"0.6864904",
"0.6864857",
"0.6858686",
"0.6841332",
"0.6841028",
"0.68352264",
"0.6822533",
"0.6804663",
"0.68028367",
"0.6795196",
"0.67825353",
"0.67733574",
"0.67708844",
"0.67577463",
"0.6754767",
"0.6752789",
"0.6740293",
"0.67344266",
"0.67310506",
"0.6722428",
"0.6714143",
"0.6704709",
"0.66861373",
"0.66827184",
"0.66798776",
"0.6678131",
"0.6674509",
"0.66733986",
"0.66475356",
"0.6646728",
"0.66278076",
"0.6627783",
"0.6600472",
"0.65995187",
"0.659858",
"0.6597063",
"0.6565352",
"0.65651065",
"0.6563513",
"0.65241456",
"0.65118504",
"0.6506754",
"0.6503246",
"0.6500761",
"0.64857554",
"0.64762396",
"0.6467418",
"0.6462229",
"0.64607936",
"0.64552176",
"0.6453252",
"0.64508235",
"0.64476573",
"0.64476573",
"0.64476573",
"0.64476573",
"0.64476573",
"0.6437451",
"0.6433424",
"0.6431186",
"0.64227825",
"0.64227825",
"0.64227605",
"0.6401003",
"0.63974017",
"0.6384435",
"0.63793737",
"0.6362945",
"0.6348658",
"0.63422155",
"0.63410145",
"0.6331615",
"0.63215244",
"0.63177055",
"0.6307763",
"0.6305519",
"0.6300049",
"0.6297859",
"0.62958664",
"0.62943274",
"0.62942094",
"0.62934065",
"0.6289992",
"0.6287166"
]
| 0.6375485 | 83 |
Determine if the user is authorized to make this request. | public function authorize()
{
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function authorize()\n {\n if ($this->user() !== null) {\n return true;\n }\n return false;\n }",
"public function authorize()\n {\n return $this->user() !== null;\n }",
"public function authorize()\n {\n return $this->user() !== null;\n }",
"public function authorize()\n {\n return $this->user() != null;\n }",
"public function authorize(): bool\n {\n return $this->user() !== null;\n }",
"public function authorize(): bool\n {\n return $this->isUserAuthorised();\n }",
"public function authorize()\n {\n return !is_null($this->user());\n }",
"public function authorize()\n {\n return request()->user() != null;\n }",
"public function authorize()\n\t{\n\t\t// if user is updating his profile or a user is an admin\n\t\tif( $this->user()->isSuperAdmin() || !$this->route('user') ){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public function authorize()\n {\n // this was my best guess\n return $this->user()->id === $this->route('user')->id;\n }",
"public function isAuthorized()\n {\n return $this->cookieHelper->requestCookieExists('auth');\n }",
"public function authorize()\n {\n return !empty(Auth::user()) && ($this->user()->isAnAdmin() || $this->user()->hasRole('user'));\n }",
"public function authorize()\n {\n $originAccount = Account::find($this->get('origin_account_id'));\n return $originAccount->user_id == auth()->id();\n }",
"public function authorize()\n {\n switch ($this->method()) {\n case 'GET':\n case 'POST':\n case 'PUT':\n case 'PATCH':\n case 'DELETE':\n default:\n return $this->user()->type == 'App\\\\Staff' ? true : false;\n break;\n }\n\n return false;\n }",
"public function authorize()\n {\n if($this->user()->role == \"admin\" || $this->user()->id == $this->request->get('author_id')) return true;\n else return false;\n }",
"public function authorize()\n {\n if(\\Auth::guest())\n {\n return false;\n } else {\n // Action 1 - Check if authenticated user is a superadmin\n if(\\Auth::User()->hasRole('superadmin'))\n return true;\n\n // Action 2 - Find UUID from request and compare to authenticated user\n $user = User::where('uuid', $this->user_uuid)->firstOrFail();\n if($user->id == \\Auth::User()->id)\n return true;\n\n // Action 3 - Fail request\n return false;\n }\n }",
"public function authorize()\n {\n $this->model = $this->route('user');\n\n $this->model = is_null($this->model) ? User::class : $this->model;\n\n return $this->isAuthorized();\n }",
"public function isAuthorized(): bool\n {\n // TODO: implement authorization check\n\n return true;\n }",
"public function isAuthorized() {}",
"public function authorize()\n {\n return request()->loggedin_role === 1;\n }",
"public function authorize()\n {\n $this->model = $this->route('user');\n\n if ($this->isEdit() && !is_null($this->model)) {\n if (!user()->hasPermissionTo('Administrations::admin.user') && $this->model->id != user()->id) {\n return false;\n }\n }\n\n $this->model = is_null($this->model) ? User::class : $this->model;\n\n return $this->isAuthorized();\n }",
"public function authorize()\n {\n $accessor = $this->user();\n\n return $accessor->isAdmin() || $accessor->hasKey('post-users');\n }",
"public function authorize()\n {\n $user = \\Auth::getUser();\n\n return $user->user_type == 1;\n }",
"public function authorize()\n {\n return auth()->check() ? true : false;\n }",
"public function authorize()\n {\n return auth()->check() ? true : false;\n }",
"public function authorize()\n {\n /**\n * @var User $user\n * @var Document $document\n */\n $user = Auth::user();\n $document = $this->route('document');\n\n return (int)$user->id === (int)$document->user_id;\n }",
"public function authorize()\n {\n switch (true) {\n case $this->wantsToList():\n case $this->wantsToShow():\n if ($this->hasRoles(['owner', 'administrator'])) {\n return true;\n }\n break;\n case $this->wantsToStore():\n case $this->wantsToUpdate():\n case $this->wantsToDestroy():\n if ($this->hasRoles(['owner'])) {\n return true;\n }\n break;\n }\n\n return false;\n }",
"public function authorize()\n {\n $user = JWTAuth::parseToken()->authenticate();\n $organisation = Organization::findOrFail($this->route('organizations'));\n return $organisation->admin_id == $user->id;\n }",
"public function authorize()\n {\n if($this->user()->isAdmin())\n return true;\n\n return false;\n }",
"function isAuthorized()\n {\n $authorized = parent::isAuthorized();\n return $authorized;\n }",
"public function authorize()\n {\n $user = auth('web')->user();\n if ($user && $user->active) {\n return true;\n }\n\n return false;\n }",
"public function authorize()\n {\n $this->user = User::query()->find($this->route()->parameter('user'));\n $this->merge(['verified' => $this->get('verified') ? 1 : 0]);\n\n return true;\n }",
"public function authorize()\n {\n $user = request()->user('api');\n return $user->isSenior();\n }",
"public function authorize()\n {\n return is_client_or_staff();\n }",
"public function isAuthorized() {\n\t\treturn true;\n\t}",
"public function authorize()\n {\n switch ($this->method()) {\n case 'POST':\n return true;\n case 'GET':\n default:\n {\n return false;\n }\n }\n }",
"public function authorize()\n {\n switch ($this->method()) {\n case 'POST':\n return true;\n case 'GET':\n default:\n {\n return false;\n }\n }\n }",
"public function authorize()\n {\n //Check if user is authorized to access this page\n if($this->user()->authorizeRoles(['admin'])) {\n return true;\n } else {\n return false;\n }\n }",
"public function isAuthorized()\n\t{\n\t\t$sessionVal = Yii::$app->session->get($this->sessionParam);\n\t\treturn (!empty($sessionVal));\n\t}",
"public function authorize() {\n\n return auth()->user() && auth()->user()->username === $this->user->username;\n }",
"public function authorize()\n {\n return session('storefront_key') || request()->session()->has('api_credential');\n }",
"public function authorize()\n {\n if ($this->user()->isAdmin($this->route('organization'))) {\n return true;\n }\n\n return false;\n\n }",
"public function authorize()\n {\n return $this->user() && $this->user()->role === Constants::USER_ROLE_ADMIN;\n }",
"public function authorized()\n {\n return $this->accepted && ! $this->test_mode;\n }",
"public function authorize()\n {\n if (!auth()->check()) {\n return false;\n }\n return true;\n }",
"public function hasAuthorized() {\n return $this->_has(1);\n }",
"public function authorize()\n {\n $resource = Resource::find($this->route('id'));\n\n if (!$resource) {\n return true;\n }\n\n return $resource && $this->user()->can('access', $resource);\n }",
"public function authorize()\n {\n /*\n if ($this->loan_id && is_numeric($this->loan_id) && $loan = Loan::whereId($this->loan_id)->first()) {\n // loan_id belongs to requesting user\n return $loan && $this->user()->id == $loan->user_id;\n }\n */\n return true; // let rules handle it\n }",
"public function authorize()\n {\n //TODO Authorice Request (without Controller)\n return auth()->user()->role_id === 1;\n }",
"public function authorize(): bool\n {\n return $this->user()->id === $this->article->user->id;\n }",
"public function authorize()\n {\n return $this->user()->rol == 'admin' ? true : false;\n }",
"public function isAuth()\n {\n return $this->session->hasAuthorisation();\n }",
"public function authorize()\n {\n if(Auth::user())\n {\n return true;\n }\n else\n {\n return false;\n }\n }",
"public function authorize()\n {\n //Check if user is authorized to access this page\n if($this->user()->authorizeRoles(['admin', 'hrmanager', 'hruser'])) {\n return true;\n } else {\n return false;\n }\n }",
"public function authorize()\n {\n return \\Auth::check() ? true : false;\n }",
"public function authorize()\n\t{\n\t\treturn true; //no user checking\n\t}",
"public function authorize()\n {\n return $this->user()->id === $this->route('report')->user_id;\n }",
"public function authorize()\n {\n return $this->user()->id === $this->route('report')->user_id;\n }",
"public function authorize()\n {\n return !empty(Auth::user());\n }",
"public function authorize()\n {\n return $this->groupHasUser() || $this->hasSeller();\n }",
"public function authorize()\n\t{\n\t\t//@todo check with perissions\n\t\treturn (request()->user()->user_type == ADMIN_USER);\n\t}",
"public function authorize()\n\t{\n\t\t//@todo check with perissions\n\t\treturn (request()->user()->user_type == ADMIN_USER);\n\t}",
"public function isAuthorized() {\n\t\t\n\t}",
"public function authorize()\n {\n if(Auth::check())\n {\n return (Auth::user()->has_world_admin_access);\n }\n return false;\n }",
"public function authorize()\n {\n if (!\\Auth::guest()) {\n $user = \\Auth::getUser();\n if ($user->type == User::USER_TYPE_ADMIN) {\n return true;\n }\n }\n\n return false;\n }",
"public function authorize()\n {\n if (auth()->user()->is_admin) {\n return true;\n }\n return false;\n }",
"public function authorize()\n {\n if ($this->user()->is_admin){\n return true;\n }\n else if ($this->method == \"PUT\"){\n if ($this->user()->id == $this->input('id')){\n return true;\n }\n }\n return false;\n }",
"public function authorize(): bool\n {\n return parent::authorize() && (int)$this->playList->user_id === auth()->user()->id;\n }",
"public function authorize() {\n\t\treturn $this->user()->is_admin;\n\t}",
"public function authorize()\n {\n if (Auth::check()) {\n \n return true;\n \n }\n return false;\n }",
"public function authorize()\n {\n $user = Auth::user();\n return $user && $user->rol == 'admin';\n }",
"public function authorize()\n\t{\n\t\t// Nutzern akzeptiert werden\n\t\tif(Auth::check())\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public function authorize()\n {\n // TODO: Check if has business\n return session()->has('id');\n }",
"public function authorize()\n {\n if (auth()->check() && auth()->user()->isAdmin()) {\n return true;\n }\n\n return false;\n }",
"public function authorize()\n {\n return $this->auth->check();\n }",
"public function authorize() {\n\t\t$user = \\Auth::user();\n\n\t\tif ( $user->isAdmin() ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}",
"public function authorize()\n {\n if (auth()->user()->isAdmin() || auth()->user()->isCustomer()) {\n return true;\n }\n return false;\n }",
"public function authorize()\n {\n return $this->container['auth']->check();\n }",
"function isAuthorized($request) {\n return true;\n }",
"public function authorize()\n {\n return Auth::guest() || isMember();\n }",
"public function authorize()\n {\n return auth()->user() && auth()->user()->isCeo();\n }",
"public function authorize(): bool\n {\n $deckId = $this->request->get('deck_id');\n $userId = Deck::whereKey($deckId)->value('user_id');\n\n return $userId === user()->id;\n }",
"public function authorize()\n {\n return Auth::check() && Auth::user()->is_contractor;\n }",
"public function authorize()\n {\n return TRUE;\n }",
"public function authorize()\n {\n $user = User::find($this->id);\n\n if (!$user) {\n $user = User::where('no_ahli', $this->no_ahli)->first();\n }\n if ($user && $user->id == auth()->user()->id) return true;\n if (auth()->user()->is('admin')) return true;\n\n return false;\n }",
"public function authorize()\n {\n # if it's false, it will rejected\n return true;\n }",
"public function authorize()\n {\n $isValid = auth()->user()->is($this->route('task')->attempt->checklist->owner);\n\n return $isValid;\n }",
"public function authorize()\n {\n $user = Auth::user();\n\n return ($user->getRole() == 'admin');\n }",
"public function is_authorized() {\n\t\t$authorized = true;\n\t\tif ( $this->is_access_token_expired() ) {\n\t\t\t$authorized = false;\n\t\t}\n\n\t\treturn $authorized;\n\t}",
"public function authorize()\n {\n $user = User::findOrFail($this->route('id'));\n\n return $user->hasRole('admin') || $user->hasRole('teacher');\n }",
"public function authorize()\n {\n $project = \\App\\Project::find($this->request->get('project'));\n return $project && $project->isManager($this->user()->name);\n }",
"public function isAuthorized() {\n\t\treturn (bool)$this->_storage->hasData();\n\t}",
"public function authorize()\n {\n $idExpense = $this->input('expense');\n $expense = Expense::find($idExpense);\n\n return $expense && $this->user()->id == $expense->user_id;\n }",
"public function authorize()\n {\n // User system not implemented\n return true;\n }",
"public function authorize() : bool\n {\n // TODO check request to xhr in middleware\n return true;\n }",
"public function authorize()\n {\n $organizationId = (string) $this->route('id');\n\n $this->organization = Organization::findByUuidOrFail($organizationId);\n\n return $this->user()->can('show', [Organization::class, $this->organization]);\n }",
"public function authorize()\n {\n $user = $this->findFromUrl('user');\n return $this->user()->can('update', $user);\n }",
"public function authorize()\n {\n $user = Auth::user();\n $orderElement = OrderElement::find($this->input(\"order_element_id\"));\n $order = $orderElement->order;\n\n if ($user->id == $order->user_id) {\n return true;\n } else {\n return false;\n }\n }",
"public function authorize()\n {\n $current_user = auth()->user();\n $convention = Convention::find($this->route('convention_id'));\n\n // Use ClientPolicy here to authorize before checking the fields\n return $current_user->can('store', Convention::class)\n || $current_user->can('update', $convention);\n }",
"public function authorize()\n {\n if (session()->has('user'))\n {\n $participantController = new ParticipantController();\n\n return !$participantController->isParticipating($this->input('id_user'), $this->input('id_event'));\n }\n else\n {\n return false;\n }\n }",
"public function authorize()\n {\n return (Auth::user()->allowSuperAdminAccess || Auth::user()->allowAdminAccess);\n }"
]
| [
"0.8401071",
"0.8377486",
"0.8377486",
"0.8344406",
"0.8253731",
"0.824795",
"0.8213121",
"0.8146598",
"0.81115526",
"0.8083369",
"0.7991986",
"0.79907674",
"0.79836637",
"0.79604936",
"0.79516214",
"0.79494005",
"0.79265946",
"0.7915068",
"0.79001635",
"0.7894822",
"0.7891453",
"0.7890965",
"0.7862504",
"0.78414804",
"0.78414804",
"0.7837965",
"0.78248763",
"0.7812292",
"0.7809632",
"0.77928597",
"0.7788316",
"0.7781619",
"0.77815884",
"0.7763308",
"0.7754035",
"0.7717961",
"0.7717961",
"0.77171147",
"0.77138597",
"0.7705001",
"0.7693082",
"0.7692783",
"0.76915383",
"0.76909506",
"0.76733255",
"0.7667128",
"0.7665592",
"0.7656238",
"0.7650853",
"0.764326",
"0.76431626",
"0.76431614",
"0.7635147",
"0.76311624",
"0.76294273",
"0.7627076",
"0.76207024",
"0.76207024",
"0.76139116",
"0.76036394",
"0.76035625",
"0.76035625",
"0.76032084",
"0.7602515",
"0.76007926",
"0.75971127",
"0.7588128",
"0.7586303",
"0.7581912",
"0.7563037",
"0.7554785",
"0.75526226",
"0.755171",
"0.75436753",
"0.75432944",
"0.7540682",
"0.7538806",
"0.75280696",
"0.751548",
"0.75149626",
"0.7501161",
"0.74959517",
"0.74956346",
"0.74911124",
"0.7489147",
"0.74858016",
"0.748033",
"0.7478443",
"0.7472642",
"0.7472576",
"0.7465409",
"0.7464371",
"0.74630046",
"0.7462218",
"0.7461453",
"0.7449168",
"0.74399257",
"0.74358094",
"0.7433247",
"0.7432659",
"0.74248093"
]
| 0.0 | -1 |
Get the validation rules that apply to the request. | public function rules()
{
return [
'name' => ['required', 'string', 'max:255'],
'email' => ['required', 'string', 'email', 'max:255', 'unique:users'],
'password' => ['required', 'string', 'min:8', 'confirmed'],
'document_type' => ['required', 'string'],
'document_number' => ['required', 'string'],
'surnames' => ['required', 'string','max:50'],
'cell_number' => ['required', 'string','max:9','min:9'],
];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function rules()\n {\n $commons = [\n\n ];\n return get_request_rules($this, $commons);\n }",
"public function getRules()\n {\n return $this->validator->getRules();\n }",
"public function getValidationRules()\n {\n $rules = [];\n\n // Get the schema\n $schema = $this->getSchema();\n\n return $schema->getRules($this);\n }",
"public function rules()\n {\n return $this->validationRules;\n }",
"public function rules()\n {\n $rules = [];\n switch ($this->getMethod()):\n case \"POST\":\n $rules = [\n 'course_id' => 'required|numeric',\n 'questions' => 'required|array',\n ];\n break;\n case \"PUT\":\n $rules = [\n 'id' => 'required|numeric',\n 'course_id' => 'required|numeric',\n 'questions' => 'required|array',\n ];\n break;\n case \"DELETE\":\n $rules = [\n 'id' => 'required|numeric'\n ];\n break;\n endswitch;\n return $rules;\n }",
"public static function getRules()\n {\n return (new static)->getValidationRules();\n }",
"public function getRules()\n {\n return $this->validation_rules;\n }",
"public function getValidationRules()\n {\n return [];\n }",
"public function getValidationRules() {\n return [\n 'email' => 'required|email',\n 'name' => 'required|min:3',\n 'password' => 'required',\n ];\n }",
"public function rules()\n {\n if($this->isMethod('post')){\n return $this->post_rules();\n }\n if($this->isMethod('put')){\n return $this->put_rules();\n }\n }",
"public function rules()\n {\n $rules = [];\n\n // Validation request for stripe keys for stripe if stripe status in active\n if($this->has('stripe_status')){\n $rules[\"api_key\"] = \"required\";\n $rules[\"api_secret\"] = \"required\";\n $rules[\"webhook_key\"] = \"required\";\n }\n\n if($this->has('razorpay_status')){\n $rules[\"razorpay_key\"] = \"required\";\n $rules[\"razorpay_secret\"] = \"required\";\n $rules[\"razorpay_webhook_secret\"] = \"required\";\n }\n\n // Validation request for paypal keys for paypal if paypal status in active\n if($this->has('paypal_status')){\n $rules[\"paypal_client_id\"] = \"required\";\n $rules[\"paypal_secret\"] = \"required\";\n $rules[\"paypal_mode\"] = \"required_if:paypal_status,on|in:sandbox,live\";\n }\n\n\n return $rules;\n }",
"protected function getValidationRules()\n {\n $rules = [\n 'title' => 'required|min:3|max:255',\n ];\n\n return $rules;\n }",
"public function getRules()\n\t{\n\t\t$rules['user_id'] = ['required', 'exists:' . app()->make(User::class)->getTable() . ',id'];\n\t\t$rules['org_id'] = ['required', 'exists:' . app()->make(Org::class)->getTable() . ',id'];\n\t\t$rules['role'] = ['required', 'string', 'in:' . implode(',', Static::ROLES)];\n\t\t$rules['scopes'] = ['nullable', 'array'];\n\t\t$rules['ended_at'] = ['nullable', 'date'];\n\t\t$rules['photo_url'] = ['nullable', 'string'];\n\n\t\treturn $rules;\n\t}",
"public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return [\n 'username' => 'required|max:255',\n 'user_id' => 'required',\n 'mobile' => 'required|regex:/^1[34578][0-9]{9}$/',\n 'birthday' => 'required',\n 'cycle_id' => 'required',\n 'expired_at' => 'required',\n 'card_price' => 'required',\n ];\n case 'PUT':\n return [\n 'username' => 'required|max:255',\n 'user_id' => 'required',\n 'mobile' => 'required|regex:/^1[34578][0-9]{9}$/',\n 'birthday' => 'required',\n 'cycle_id' => 'required',\n 'expired_at' => 'required',\n 'card_price' => 'required',\n ];\n }\n }",
"public function rules()\n {\n\n switch ($this->method()) {\n case 'GET':\n case 'POST':\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users',\n 'password' => 'required|min:6|confirmed',\n 'password_confirmation' => 'min:6|same:password',\n 'role_id' => 'required'\n ];\n break;\n case 'PUT':\n case 'PATCH':\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users,email,'.$this->id,\n ];\n break;\n\n default:\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users,email,'.$this->id,\n ];\n break;\n }\n return $rules;\n }",
"public function rules()\n {\n return $this->rules;\n }",
"public function rules()\n {\n return $this->rules;\n }",
"public function rules()\n {\n return $this->rules;\n }",
"public function rules()\n {\n return $this->rules;\n }",
"public function rules()\n {\n return $this->rules;\n }",
"public function rules()\n {\n return $this->rules;\n }",
"public function rules()\n {\n switch($this->method()) {\n case 'GET':\n return [];\n case 'POST':\n return [\n 'name' => 'required|max:50',\n 'company' => 'required|max:100',\n 'position' => 'required|max:50',\n 'email' => 'required|email|max:150',\n 'phone' => 'required|max:25',\n 'description' => 'nullable|max:500',\n ];\n case 'PUT':\n case 'PATCH':\n return [\n 'name' => 'required|max:50',\n 'company' => 'required|max:100',\n 'position' => 'required|max:50',\n 'email' => 'required|email|max:150',\n 'phone' => 'required|max:25',\n 'description' => 'nullable|max:500',\n ];\n case 'DELETE':\n return [];\n default:break;\n }\n \n }",
"public function rules($request) {\n $function = explode(\"@\", $request->route()[1]['uses'])[1];\n return $this->getRouteValidateRule($this->rules, $function);\n // // 获取请求验证的函数名\n // // ltrim(strstr($a,'@'),'@')\n // if (count(explode(\"@\", Request::route()->getActionName())) >= 2) {\n // $actionFunctionName = explode(\"@\", Request::route()->getActionName()) [1];\n // }\n\n // // 取配置并返回\n // if (isset($this->rules[$actionFunctionName])) {\n // if (is_array($this->rules[$actionFunctionName])) {\n // return $this->rules[$actionFunctionName];\n // }\n // else {\n // return $this->rules[$this->rules[$actionFunctionName]];\n // }\n // }\n // else {\n // return [];\n // }\n }",
"function getValidationRules() {\n\t\treturn array(\n\t\t\t'_MovieID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_UserID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CountryID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_BroadCastDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t\t'_CreatedDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t);\n\t}",
"public function rules()\n {\n if ($this->method() === 'POST') {\n return $this->rulesForCreating();\n }\n\n return $this->rulesForUpdating();\n }",
"public function rules()\n {\n $validation = [];\n if ($this->method() == \"POST\") {\n $validation = [\n 'name' => 'required|unique:users',\n 'email' => 'required|unique:users|email',\n 'password' => 'required|min:6|confirmed',\n 'password_confirmation' => 'required|min:6',\n 'roles' => 'required',\n ];\n } elseif ($this->method() == \"PUT\") {\n $validation = [\n 'name' => 'required|unique:users,name,' . $this->route()->parameter('id') . ',id',\n 'email' => 'required|unique:users,email,' . $this->route()->parameter('id') . ',id|email',\n 'roles' => 'required',\n ];\n\n if ($this->request->get('change_password') == true) {\n $validation['password'] = 'required|min:6|confirmed';\n $validation['password_confirmation'] = 'required|min:6';\n }\n }\n\n return $validation;\n }",
"protected function getValidationRules()\n {\n $class = $this->model;\n\n return $class::$rules;\n }",
"public function rules()\n {\n $data = $this->request->all();\n $rules['username'] = 'required|email';\n $rules['password'] = 'required'; \n\n return $rules;\n }",
"public function rules()\n {\n $rules = $this->rules;\n\n $rules['fee'] = 'required|integer';\n $rules['phone'] = 'required|min:8|max:20';\n $rules['facebook'] = 'required|url';\n $rules['youtube'] = 'required|url';\n $rules['web'] = 'url';\n\n $rules['requestgender'] = 'required';\n $rules['serviceaddress'] = 'required|max:150';\n $rules['servicetime'] = 'required|max:150';\n $rules['language'] = 'required|max:150';\n $rules['bust'] = 'required|max:100|integer';\n $rules['waistline'] = 'required|max:100|integer';\n $rules['hips'] = 'required|max:100|integer';\n $rules['motto'] = 'max:50';\n\n return $rules;\n }",
"protected function getValidRules()\n {\n return $this->validRules;\n }",
"public function rules()\n {\n switch($this->method())\n {\n case 'GET':\n case 'DELETE':\n {\n return [];\n }\n case 'POST':\n case 'PUT':\n {\n return [\n 'name' => 'required',\n ];\n }\n default:break;\n }\n }",
"public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'POST':\n {\n return [\n 'mobile' => ['required','max:11','min:11'],\n 'code' => ['required','max:6','min:6'],\n 'avatar' => ['required'],\n 'wx_oauth' => ['required'],\n 'password' => ['nullable','min:6','max:20']\n ];\n }\n case 'PUT':\n case 'PATCH':\n case 'DELETE':\n default: {\n return [];\n }\n }\n }",
"public function rules()\n {\n switch ($this->getRequestMethod()) {\n case 'index':\n return [\n 'full_name' => 'nullable|string',\n 'phone' => 'nullable|string',\n ];\n break;\n case 'store':\n return [\n 'crm_resource_id' => 'required|exists:crm_resources,id',\n 'channel' => 'required|in:' . get_validate_in_string(CrmResourceCallLog::$channel),\n 'call_status' => 'required|in:' . get_validate_in_string(CrmResourceCallLog::$call_statuses),\n ];\n break;\n default:\n return [];\n break;\n }\n }",
"public function rules()\n {\n //With password\n if(request('password') || request('password_confirmation')) {\n return array_merge($this->passwordRules(), $this->defaultRules());\n }\n //Without password\n return $this->defaultRules();\n }",
"public function rules()\n {\n $rules = [\n '_token' => 'required'\n ];\n\n foreach($this->request->get('emails') as $key => $val) {\n $rules['emails.'.$key] = 'required|email';\n }\n\n return $rules;\n }",
"function getValidationRules() {\n\t\treturn array(\n\t\t\t'_ID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CoverImageID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_TrackID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_Status' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_Rank' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CreateDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t);\n\t}",
"public function rules()\n { \n return $this->rules;\n }",
"public function getValidationRules()\n {\n if (method_exists($this, 'rules')) {\n return $this->rules();\n }\n\n $table = $this->getTable();\n $cacheKey = 'validate.' . $table;\n\n if (config('validate.cache') && Cache::has($cacheKey)) {\n return Cache::get($cacheKey);\n }\n\n // Get table info for model and generate rules\n $manager = DB::connection()->getDoctrineSchemaManager();\n $details = $manager->listTableDetails($table);\n $foreignKeys = $manager->listTableForeignKeys($table);\n\n $this->generateRules($details, $foreignKeys);\n\n if (config('validate.cache')) {\n Cache::forever($cacheKey, $this->rules);\n }\n\n return $this->rules;\n }",
"public function getValidationRules()\n {\n $rules = $this->getBasicValidationRules();\n\n if (in_array($this->type, ['char', 'string', 'text', 'enum'])) {\n $rules[] = 'string';\n if (in_array($this->type, ['char', 'string']) && isset($this->arguments[0])) {\n $rules[] = 'max:' . $this->arguments[0];\n }\n } elseif (in_array($this->type, ['timestamp', 'date', 'dateTime', 'dateTimeTz'])) {\n $rules[] = 'date';\n } elseif (str_contains(strtolower($this->type), 'integer')) {\n $rules[] = 'integer';\n } elseif (str_contains(strtolower($this->type), 'decimal')) {\n $rules[] = 'numeric';\n } elseif (in_array($this->type, ['boolean'])) {\n $rules[] = 'boolean';\n } elseif ($this->type == 'enum' && count($this->arguments)) {\n $rules[] = 'in:' . join(',', $this->arguments);\n }\n\n return [$this->name => join('|', $rules)];\n }",
"public function rules()\n {\n $rules = [];\n if ($this->isMethod('post')) {\n $rules = [\n 'vacancy_name' => 'required|string|min:4|max:20',\n 'workers_amount' => 'required|integer|min:1|max:10',\n 'organization_id'=> 'required|integer|exists:organizations,id',\n 'salary' => 'required|integer|min:1|max:10000000',\n ];\n } elseif ($this->isMethod('put')) {\n $rules = [\n 'vacancy_name' => 'required|string|min:4|max:20',\n 'workers_amount' => 'required|integer|min:1|max:10',\n 'organization_id'=> 'required|integer|exists:organizations,id',\n 'salary' => 'required|integer|min:1|max:10000000',\n ];\n }\n return $rules;\n }",
"public function validationRules()\n {\n return [];\n }",
"public function rules()\n {\n $rules = $this->rules;\n if(Request::isMethod('PATCH')){\n $rules['mg_name'] = 'required|min:2,max:16';\n }\n return $rules;\n }",
"function getValidationRules() {\n\t\treturn array(\n\t\t\t'_ID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_EventID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_SourceID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_UserID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_HasEvent' => array(\n\t\t\t\t'inArray' => array('values' => array(self::HASEVENT_0, self::HASEVENT_1),),\n\t\t\t),\n\t\t);\n\t}",
"public function rules()\n {\n $rules = [];\n switch ($this->method()){\n case 'GET':\n $rules['mobile'] = ['required', 'regex:/^1[3456789]\\d{9}$/'];\n break;\n case 'POST':\n if($this->route()->getActionMethod() == 'sms') {\n $rules['area_code'] = ['digits_between:1,6'];\n if(in_array($this->get('type'), ['signup', 'reset_pay_pwd'])) {\n $rules['mobile'] = ['required', 'digits_between:5,20'];\n if($this->get('type') == 'signup' && !$this->get('area_code')) {\n $this->error('请选择区号');\n }\n }\n $rules['type'] = ['required', Rule::in(\\App\\Models\\Captcha::getSmsType())];\n }\n break;\n }\n return $rules;\n }",
"public function rules()\n {\n if ($this->isMethod('post')) {\n return $this->createRules();\n } elseif ($this->isMethod('put')) {\n return $this->updateRules();\n }\n }",
"public function rules()\n {\n $rules = [\n 'first_name' => ['required'],\n 'birthdate' => ['required', 'date', 'before:today'],\n ];\n\n if (is_international_session()) {\n $rules['email'] = ['required', 'email'];\n }\n\n if (should_collect_international_phone()) {\n $rules['phone'] = ['phone'];\n }\n\n if (is_domestic_session()) {\n $rules['phone'] = ['required', 'phone'];\n }\n\n return $rules;\n }",
"public function rules()\n {\n dd($this->request->get('answer'));\n foreach ($this->request->get('answer') as $key => $val)\n {\n $rules['answer.'.$key] = 'required';\n }\n\n return $rules;\n }",
"public function rules()\n {\n return static::$rules;\n }",
"function getRules() {\n\t\t$fields = $this->getFields();\n\t\t$allRules = array();\n\n\t\tforeach ($fields as $field) {\n\t\t\t$fieldRules = $field->getValidationRules();\n\t\t\t$allRules[$field->getName()] = $fieldRules;\n\t\t}\n\n\t\treturn $allRules;\n\t}",
"public static function getValidationRules(): array\n {\n return [\n 'name' => 'required|string|min:1|max:255',\n 'version' => 'required|float',\n 'type' => 'required|string',\n ];\n }",
"public function rules()\n {\n $rules = [\n 'name' => 'required',\n 'phone' => 'required|numeric',\n 'subject' => 'required',\n 'message' => 'required',\n 'email' => 'required|email',\n ];\n\n return $rules;\n }",
"public function getValidationRules(): array\n {\n return [\n 'email_address' => 'required|email',\n 'email_type' => 'nullable|in:html,text',\n 'status' => 'required|in:subscribed,unsubscribed,cleaned,pending',\n 'merge_fields' => 'nullable|array',\n 'interests' => 'nullable|array',\n 'language' => 'nullable|string',\n 'vip' => 'nullable|boolean',\n 'location' => 'nullable|array',\n 'location.latitude' => ['regex:/^[-]?(([0-8]?[0-9])\\.(\\d+))|(90(\\.0+)?)$/'], \n 'location.longitude' => ['regex:/^[-]?((((1[0-7][0-9])|([0-9]?[0-9]))\\.(\\d+))|180(\\.0+)?)$/'],\n 'marketing_permissions' => 'nullable|array',\n 'tags' => 'nullable|array'\n ];\n }",
"protected function getValidationRules()\n {\n return [\n 'first_name' => 'required|max:255',\n 'last_name' => 'required|max:255',\n 'email' => 'required|email|max:255',\n 'new_password' => 'required_with:current_password|confirmed|regex:' . config('security.password_policy'),\n ];\n }",
"public function rules()\n {\n // get 直接放行\n if( request()->isMethod('get') ){\n return []; // 规则为空\n }\n\n // 只在post的时候做验证\n return [\n 'username' => 'required|min:2|max:10', \n 'password' => 'required|min:2|max:10', \n 'email' => 'required|min:2|max:10|email', \n 'phoneNumber' => 'required|min:2|max:10', \n\n ];\n }",
"public function rules()\n {\n\n $rules = [\n 'id_tecnico_mantenimiento' => 'required',\n 'id_equipo_mantenimiento' => 'required'\n ];\n\n if ($this->request->has('status')) {\n $rules['status'] = 'required';\n }\n\n if ($this->request->has('log_mantenimiento')) {\n $rules['log_mantenimiento'] = 'required';\n }\n\n return $rules;\n }",
"public function rules()\n {\n $this->buildRules();\n return $this->rules;\n }",
"public function rules()\n {\n $rules = [];\n\n if ($this->isUpdate() || $this->isStore()) {\n $rules = array_merge($rules, [\n 'name' => 'required|string',\n 'email' => 'email',\n 'password' => 'confirmed|min:6',\n\n ]);\n }\n\n if ($this->isStore()) {\n $rules = array_merge($rules, [\n\n ]);\n }\n\n if ($this->isUpdate()) {\n $rules = array_merge($rules, [\n ]);\n }\n\n return $rules;\n }",
"public function rules()\n {\n switch (true) {\n case $this->wantsToList():\n $rules = $this->listRules;\n break;\n case $this->wantsToStore():\n $rules = $this->storeRules;\n break;\n case $this->wantsToUpdate():\n $this->storeRules['email'] = 'required|email|between:5,100|unique:users,email,' . $this->route('administrators');\n\n $rules = $this->storeRules;\n break;\n default:\n $rules = [];\n }\n\n return $rules;\n }",
"public function rules()\n {\n if($this->isMethod('post')) {\n return $this->storeRules();\n }\n else if($this->isMethod('put') || $this->isMethod('patch')){\n return $this->updateRules();\n }\n }",
"abstract protected function getValidationRules();",
"public function rules()\n\t{\n\t\treturn ModelHelper::getRules($this);\n\t}",
"public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return $this->getPostRules();\n case 'PUT':\n return $this->getPutRules();\n }\n }",
"public function rules()\n {\n $rules = [\n 'name' => 'required|string|min:2',\n 'email' => \"required|email|unique:users,email, {$this->request->get('user_id')}\",\n 'role_id' => 'required|numeric',\n 'group_id' => 'required|numeric',\n ];\n\n if ($this->request->has('password')){\n $rules['password'] = 'required|min:6';\n }\n\n return $rules;\n }",
"public function rules()\n {\n if($this->method() == 'POST')\n {\n return [\n 'reason'=>'required',\n 'date_from'=>'required',\n 'date_to'=>'required',\n 'attachment'=>'required',\n ];\n }\n }",
"public function rules()\n {\n $method = $this->method();\n if ($this->get('_method', null) !== null) {\n $method = $this->get('_method');\n }\n // $this->offsetUnset('_method');\n switch ($method) {\n case 'DELETE':\n case 'GET':\n break; \n case 'POST':\n $mailRules = \\Config::get('database.default').'.users';\n break;\n case 'PUT':\n $user = $this->authService->authJWTUserForm();\n $mailRules = \\Config::get('database.default').'.users,email,'.$user->getKey();\n break;\n case 'PATCH':\n break;\n default:\n break;\n }\n \n return [\n 'name' => 'required|string|max:256',\n 'email' => 'required|string|email|max:255|unique:'.$mailRules,\n 'password' => 'required|string|min:3',\n ];\n }",
"public function rules() {\n $rule = [\n 'value' => 'bail|required',\n ];\n if ($this->getMethod() == 'POST') {\n $rule += ['type' => 'bail|required'];\n }\n return $rule;\n }",
"public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE': {\n return [];\n }\n case 'POST': {\n return [\n 'from' => 'required|max:100',\n 'to' => 'required|max:500',\n 'day' => 'required|max:500',\n ];\n }\n case 'PUT':\n case 'PATCH': {\n return [\n 'from' => 'required|max:100',\n 'to' => 'required|max:500',\n 'day' => 'required|max:500',\n ];\n }\n default:\n break;\n }\n\n return [\n //\n ];\n }",
"public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE': {\n return [];\n }\n case 'POST':\n case 'PUT':\n case 'PATCH': {\n return [\n 'name' => 'required|string|max:255',\n 'iso_code_2' => 'required|string|size:2',\n 'iso_code_3' => 'required|string|size:3',\n ];\n }\n default:\n return [];\n }\n }",
"public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE':\n return [];\n case 'POST':\n return [\n 'name' => 'required|string',\n 'lastName' => 'string',\n 'gender' => 'boolean',\n 'avatar' => 'sometimes|mimes:jpg,png,jpeg|max:3048'\n ];\n case 'PUT':\n case 'PATCH':\n return [\n 'oldPassword' => 'required|string',\n 'newPassword' => 'required|string',\n ];\n default:\n break;\n }\n }",
"public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE':\n {\n return [\n 'validation' => [\n 'accepted'\n ]\n ];\n }\n case 'POST':\n {\n return [\n 'title' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250'\n ],\n 'body' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250000'\n ],\n 'online' => [\n 'required',\n ],\n 'indexable' => [\n 'required',\n ],\n 'published_at' => [\n 'required',\n ],\n 'published_at_time' => [\n 'required',\n ],\n 'unpublished_at' => [\n 'nullable',\n ],\n 'unpublished_time' => [\n 'nullable',\n ],\n ];\n }\n case 'PUT':\n {\n return [\n 'title' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250'\n ],\n 'body' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250000'\n ],\n 'online' => [\n 'required',\n ],\n 'indexable' => [\n 'required',\n ],\n 'published_at' => [\n 'required',\n ],\n 'unpublished_at' => [\n 'nullable',\n ],\n ];\n }\n case 'PATCH':\n {\n return [];\n }\n default:\n break;\n }\n }",
"public function rules()\n {\n if (in_array($this->method(), ['PUT', 'PATCH'])) {\n $user = User::findOrFail(\\Request::input('id'))->first();\n\n array_forget($this->rules, 'email');\n $this->rules = array_add($this->rules, 'email', 'required|email|max:255|unique:users,email,' . $user->id);\n }\n\n return $this->rules;\n }",
"public function rules()\n {\n $method = explode('@', $this->route()->getActionName())[1];\n return $this->get_rules_arr($method);\n }",
"public function rules()\n {\n $rules = parent::rules();\n $extra_rules = [];\n $rules = array_merge($rules, $extra_rules);\n return $rules;\n }",
"public function rules()\n {\n\t\tswitch($this->method()) {\n\t\t\tcase 'POST':\n\t\t\t\t{\n\t\t\t\t\treturn [\n\t\t\t\t\t\t'field_id' => 'integer|required',\n\t\t\t\t\t\t'label' => 'string|required',\n\t\t\t\t\t\t'value' => 'alpha_dash|required',\n\t\t\t\t\t\t'selected' => 'boolean',\n\t\t\t\t\t\t'actif' => 'boolean',\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\tcase 'PUT':\n\t\t\t\t{\n\t\t\t\t\treturn [\n\t\t\t\t\t\t'field_id' => 'integer|required',\n\t\t\t\t\t\t'label' => 'string|required',\n\t\t\t\t\t\t'value' => 'alpha_dash|required',\n\t\t\t\t\t\t'selected' => 'boolean',\n\t\t\t\t\t\t'actif' => 'boolean',\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\tdefault:break;\n\t\t}\n }",
"public function rules()\n {\n $this->sanitize();\n return [\n 'event_id' => 'required',\n 'member_id' => 'required',\n 'guild_pts' => 'required',\n 'position' => 'required',\n 'solo_pts' => 'required',\n 'league_id' => 'required',\n 'solo_rank' => 'required',\n 'global_rank' => 'required',\n ];\n }",
"public function rules()\n {\n $this->rules['email'] = ['required', 'min:6', 'max:60', 'email'];\n $this->rules['password'] = ['required', 'min:6', 'max:60'];\n\n return $this->rules;\n }",
"public function getValidatorRules()\n {\n if ($validator = $this->getValidator()) {\n return $validator->getRulesForField($this->owner);\n }\n \n return [];\n }",
"public function getValidationRules() : array;",
"public function rules()\n {\n switch ($this->route()->getActionMethod()) {\n case 'login': {\n if ($this->request->has('access_token')) {\n return [\n 'access_token' => 'required',\n 'driver' => 'required|in:facebook,github,google',\n ];\n }\n return [\n 'email' => 'required|email',\n 'password' => 'required|min:6',\n ];\n }\n case 'register': {\n return [\n 'email' => 'required|email|unique:users,email',\n 'password' => 'required|min:6',\n 'name' => 'required',\n ];\n }\n default: return [];\n }\n }",
"public function rules()\n {\n Validator::extend('mail_address_available', function($attribute, $value, $parameters, $validator){\n return MailAddressSpec::isAvailable($value);\n });\n Validator::extend('password_available', function($attribute, $value, $parameters, $validator){\n return PassWordSpec::isAvailable($value);\n });\n\n return [\n 'mail_address' => [\n 'required',\n 'mail_address_available'\n ],\n 'password' => [\n 'required',\n 'password_available',\n ],\n ];\n }",
"public function rules()\n {\n switch (strtolower($this->method())) {\n case 'get':\n return $this->getMethodRules();\n case 'post':\n return $this->postMethodRules();\n case 'put':\n return $this->putMethodRules();\n case 'patch':\n return $this->patchMethodRules();\n case 'delete':\n return $this->deleteMethodRules();\n }\n }",
"public function rules()\n {\n /**\n * This is the original way, expecting post params for each user value\n */\n return [\n 'firstName' => 'required|min:2|max:255',\n 'lastName' => 'required|min:2|max:255',\n 'phone' => 'min:9|max:25',\n 'gender' => 'in:M,V',\n 'dateOfBirth' => 'before:today|after:1890-01-01',\n 'email' => 'email|min:12|max:255',\n ];\n }",
"public function getValidationRules(): array {\n\t\t$result = [];\n\t\t\n\t\tforeach ($this->getSections() as $section) {\n\t\t\t$result = array_merge($result, $section->getValidationRules());\n\t\t}\n\t\t\n\t\treturn $result;\n\t}",
"public function rules()\n\t{\n\t\t$rule = [];\n\t\tif(Request::path() == 'api/utility/upload-image'){\n\t\t\t$rule = [\n\t\t\t\t'imagePath' => 'required',\n\t\t\t];\n\t\t}else if(Request::path() == 'api/utility/check-transaction'){\n\t\t\t$rule = [\n\t\t\t\t'countNumber' => 'required',\n\t\t\t];\n\t\t}\n\t\treturn $rule;\n\t}",
"public function rules()\n {\n $rules = array();\n return $rules;\n }",
"public function rules()\n {\n $this->setValidator($this->operation_type);\n return $this->validator;\n }",
"public function rules()\n {\n switch($this->method()){\n case 'POST':\n return [\n 'name' => 'required',\n 'app_id' => 'required',\n 'account_id' => 'required',\n 'start_at' => 'required',\n 'end_at' => 'required',\n 'content' => 'required',\n ];\n break;\n default:\n return [];\n break;\n }\n\n }",
"protected function get_validation_rules()\n {\n }",
"public function rules()\n {\n $rules = [\n 'users' => 'required|array',\n ];\n\n foreach($this->request->get('users') as $key => $user) {\n $rules['users.'. $key . '.name'] = 'required|string|min:3|max:255';\n $rules['users.'. $key . '.phone'] = 'required|regex:/^[0-9\\+\\s]+$/|min:10|max:17';\n $rules['users.'. $key . '.country'] = 'required|string|min:2:max:3';\n }\n\n return $rules;\n }",
"public function rules()\n {\n $rules = [\n 'mail_driver' => 'required',\n 'mail_name' => 'required',\n 'mail_email' => 'required',\n ];\n\n $newRules = [];\n\n if($this->mail_driver == 'smtp') {\n $newRules = [\n 'mail_host' => 'required',\n 'mail_port' => 'required|numeric',\n 'mail_username' => 'required',\n 'mail_password' => 'required',\n 'mail_encryption' => 'required',\n ];\n }\n\n return array_merge($rules, $newRules);\n }",
"public function rules()\n {\n $rules['name'] = 'required';\n $rules['poa'] = 'required';\n $rules['background'] = 'required';\n $rules['tester_name'] = 'required';\n $rules['location'] = 'required';\n $rules['end_recruit_date'] = 'required';\n $rules['time_taken'] = 'required';\n $rules['payment'] = 'required';\n $rules['objective'] = 'required';\n $rules['method_desc'] = 'required';\n $rules['health_condition'] = 'required';\n $rules['required_applicant'] = 'required|integer';\n $rules['applicant'] = 'nullable';\n $rules['datetime'] = 'required';\n\n return $rules;\n }",
"public function rules()\n {\n switch($this->method()) {\n\n case 'PUT':\n {\n return [\n 'company_name' => 'required',\n 'status' => 'required|integer',\n 'notify_url' => 'required',\n 'name' => 'required'\n ];\n }\n case 'POST':\n {\n return [\n 'company_name' => 'required',\n 'status' => 'required|integer',\n 'notify_url' => 'required',\n 'name' => 'required'\n ];\n }\n default:\n return [];\n }\n\n }",
"public function rules()\n {\n $rules['name'] = 'required';\n $rules['poa'] = 'required';\n $rules['background'] = 'required';\n $rules['tester_name'] = 'required';\n\n return $rules;\n }",
"public function rules()\n {\n switch(Route::currentRouteName()){\n case 'adminBinding' :\n return [\n 'order_id' => 'required|integer',\n 'money' => 'required|numeric',\n ];\n case 'adminUnbinding' :\n return [\n 'order_id' => 'required|integer',\n 'pivot_id' => 'required|integer',\n ];\n case 'adminReceiptSave' :\n case 'adminReceiptUpdate' :\n return [\n 'customer_id' => 'required',\n 'receiptcorp' => 'required',\n 'account' => 'required',\n 'account_id' => 'required',\n 'bank' => 'required',\n 'currency_id' => 'required',\n 'advance_amount' => 'required|numeric',\n 'picture' => 'required',\n 'business_type' => 'required|in:1,2,3,4,5',\n 'exchange_type' => 'required_unless:currency_id,354|in:1,2',\n 'expected_received_at' => 'required|date_format:Y-m-d',\n ];\n case 'adminReceiptExchange' :\n return [\n 'rate' => 'required|numeric',\n ];\n default :\n return [];\n }\n }",
"public function rules()\n {\n $rules = [];\n $method = $this->getMethod();\n switch ($method) {\n case 'GET':\n if (Route::currentRouteName() === 'schoolActivity.getSchoolActivity') {\n $rules = [\n ];\n }\n break;\n }\n return $rules;\n }",
"public function rules()\n {\n $rules = new Collection();\n\n if (!$this->user() or !$this->user()->addresses()->count()) {\n $rules = $rules->merge($this->addressRules('billing'));\n if ($this->has('different_shipping_address')) {\n $rules = $rules->merge($this->addressRules('shipping'));\n }\n\n return $rules->toArray();\n }\n\n return $rules->merge([\n 'billing_address_id' => 'required|numeric',\n 'shipping_address_id' => 'required|numeric',\n ])->toArray();\n }",
"public function rules(): array\n {\n switch ($this->method()) {\n case 'POST':\n return $this->__rules() + $this->__post();\n case 'PUT':\n return $this->__rules() + $this->__put();\n default:\n return [];\n }\n }",
"public function defineValidationRules()\n {\n return [];\n }",
"public function rules(Request $request)\n {\n return Qc::$rules;\n }",
"public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return [\n 'user_name' => 'nullable|string',\n 'excel' => 'nullable|file|mimes:xlsx',\n 'category' => 'required|int|in:' . implode(',', array_keys(UserMessage::$categories)),\n 'content' => 'required|string|max:500',\n 'member_status' => 'required|int|in:' . implode(',', array_keys(User::$statuses)),\n ];\n break;\n }\n }",
"public function rules()\n {\n return [\n 'lead_id' => [\n 'required', 'string',\n ],\n 'api_version' => [\n 'required', 'string',\n ],\n 'form_id' => [\n 'required', 'int',\n ],\n 'campaign_id' => [\n 'required', 'int',\n ],\n 'google_key' => [\n 'required', 'string', new GoogleKeyRule,\n ],\n ];\n }"
]
| [
"0.8342703",
"0.80143493",
"0.7937251",
"0.79264987",
"0.79233825",
"0.79048395",
"0.78603816",
"0.7790699",
"0.77842164",
"0.77628785",
"0.7737272",
"0.7733618",
"0.7710535",
"0.7691693",
"0.76849866",
"0.7683038",
"0.7683038",
"0.7683038",
"0.7683038",
"0.7683038",
"0.7683038",
"0.7675849",
"0.76724476",
"0.76665044",
"0.7657698",
"0.7641827",
"0.7630892",
"0.76293766",
"0.7617708",
"0.76102096",
"0.7607475",
"0.7602442",
"0.7598732",
"0.7597544",
"0.75924",
"0.75915384",
"0.7588146",
"0.7581354",
"0.7555758",
"0.755526",
"0.7551423",
"0.7546329",
"0.7541439",
"0.75366044",
"0.75363225",
"0.7530296",
"0.7517988",
"0.75155175",
"0.7508439",
"0.75069886",
"0.7505724",
"0.749979",
"0.7495976",
"0.74949056",
"0.7492888",
"0.7491117",
"0.74901396",
"0.7489651",
"0.7486808",
"0.7486108",
"0.7479687",
"0.7478561",
"0.7469412",
"0.74635684",
"0.74619836",
"0.7461325",
"0.74591017",
"0.7455279",
"0.745352",
"0.7453257",
"0.7449877",
"0.74486",
"0.7441391",
"0.7440429",
"0.7435489",
"0.7435326",
"0.74341524",
"0.7430354",
"0.7429103",
"0.7423808",
"0.741936",
"0.74152505",
"0.7414828",
"0.741382",
"0.74126065",
"0.74105227",
"0.740555",
"0.7404385",
"0.74040926",
"0.74015605",
"0.73905706",
"0.73837525",
"0.73732615",
"0.7371123",
"0.7369176",
"0.73619753",
"0.73554605",
"0.73448825",
"0.7344659",
"0.73427117",
"0.73357755"
]
| 0.0 | -1 |
VISE EN RUTE WHERE ruteId = ? | public function getRute($ruteId, $logg)
{
include (realpath(dirname(__FILE__)).'/db.php');;
$sql = "SELECT ruteId, fraDestId, tilDestId, sesongId, navn FROM rute WHERE ruteId=?;";
$queryRute = $db_connection->prepare($sql);
$queryRute->bind_param('i'
, $ruteId);
$queryRute->execute();
//henter result set
$resultSet = $queryRute->get_result();
$rute = $resultSet->fetch_all();
//Error logging
if($queryRute == false){
$logg->Ny('Mislyktes å hente fra db: '.mysql_error($db_connection), 'ERROR', htmlspecialchars($_SERVER['PHP_SELF']), '');
}
$resultSet->free();
$queryRute->close();
$db_connection->close();
return $rute;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function verifiRentsDetails($id)\n{\n\n $requete = \"SELECT idSnow FROM rentsdetails where idSnow='$id';\";\n $request = executeQuery($requete);\n\n\n return $request;\n}",
"function modificaRuta()\r\n\t{\r\n\t\t$query = \"UPDATE \" . self::TABLA . \" SET Ruta='\".$this->Ruta.\"'\tWHERE IDRuta = \".$this->IdRuta.\";\";\r\n\t\treturn parent::modificaRegistro( $query);\r\n\t}",
"public function DeleteRute($ruteId, $logg)\n {\n include (realpath(dirname(__FILE__)).'/db.php');;\n \n $sql = \"DELETE from rute WHERE ruteId=?;\";\n \n $deleteRute = $db_connection->prepare($sql);\n \n $deleteRute->bind_param('i'\n , $ruteId);\n \n $deleteRute->execute();\n \n $paavirkedeRader = $deleteRute->affected_rows;\n\n \n //Error logging\n if($deleteRute == false)\n {\n $logg->Ny('Mislyktes å slette data fra db: '.mysql_error($db_connection), 'ERROR', htmlspecialchars($_SERVER['PHP_SELF']), ''); \n }\n \n // Lukker databasen\n $deleteRute->close();\n $db_connection->close(); \n \n return $paavirkedeRader;\n \n }",
"public function proveriRecept($idR,$idK){\n $this->db->select(\"a.idS\");\n $this->db->from(\"alergije a, veza_sastojci_recepti vsr\");\n $this->db->where(\"a.idK\", $idK);\n $this->db->where(\"a.idS = vsr.idS\");\n $this->db->where(\"vsr.idR\", $idR);\n $query = $this->db->get();\n if ($query->num_rows() > 0) \n return false;\n else\n return true;\n }",
"public function executeCurrenttutor() {\n $connection = RaykuCommon::getDatabaseConnection();\n $currentUser = $this->getUser()->getRaykuUser();\n $userId = $currentUser->getId();\n\n // make a query to the user_expert table (which should hold current questions)\n // sort by status, lowest first, and limit to one\n $sql = \"SELECT * FROM user_expert WHERE user_id='\". mysql_real_escape_string($userId) .\"' ORDER BY exe_order LIMIT 0,1\";\n $result = mysql_query($sql);\n\n // if there is nothing else, let sami know by returning a blank object\n if (mysql_num_rows($result) === 0) {\n print \"\";\n exit;\n }\n\n // get the target tutor's id, and get their information\n $tutor_row = mysql_fetch_assoc($result);\n $tutor_id = $tutor_row['checked_id'];\n\n // get their username, firt, and last name\n $sql = \"SELECT * FROM user WHERE id='\". mysql_real_escape_string($tutor_id) .\"'\";\n $result = mysql_query($sql);\n $tutor_info = mysql_fetch_assoc($result);\n $tutor_user_name = $tutor_info['username']; \n $tutor_full_name = $tutor_info['name']; \n $tutor_pic_url = 'http://'. RaykuCommon::getCurrentHttpDomain() . \"/avatar/$tutor_id/0\";\n\n\n // get their experience and profile\n $sql = \"SELECT * FROM tutor_profile WHERE user_id='\". mysql_real_escape_string($tutor_id) .\"'\";\n $result = mysql_query($sql);\n $tutor_info = mysql_fetch_assoc($result);\n $tutor_school = $tutor_info['school']; \n $tutor_role = $tutor_info['tutor_role']; \n $tutor_study = $tutor_info['study']; \n\n\n // get an object ready to return to client end\n $return_obj = new stdClass;\n $return_obj->id = $tutor_id;\n $return_obj->user_name = $tutor_user_name;\n $return_obj->full_name = $tutor_full_name;\n $return_obj->pic_url = $tutor_pic_url;\n $return_obj->school = $tutor_school;\n $return_obj->role = $tutor_role;\n $return_obj->study = $tutor_study;\n\n // return json-encoded object\n print json_encode($return_obj);\n exit;\n }",
"public static function uredi($id,$ime, $priimek, $upime, $geslo, $enaslov)\n\t{\n\t\t$geslo_hash = password_hash($geslo, PASSWORD_DEFAULT);\n\t\t$db = Db::getInstance();\n\t\tmysqli_query($db, \"UPDATE oseba SET ime='$ime', priimek='$priimek', upime='$upime', geslo='$geslo_hash', enaslov='$enaslov' WHERE ID=$id\");\n\t\treturn Oseba::najdi($id);\n\t}",
"function getFinishedIdForAppraiseeIdAndRaterId($a_appr_id, $a_rat_id)\n\t{\n\t\tglobal $ilDB;\n\t\t\n\t\t$set = $ilDB->query(\"SELECT finished_id, user_fi FROM svy_finished\".\n\t\t\t\" WHERE survey_fi = \".$ilDB->quote($this->getSurveyId(), \"integer\").\n\t\t\t\" AND appr_id = \".$ilDB->quote($a_appr_id, \"integer\").\n\t\t\t\" AND user_fi = \".$ilDB->quote($a_rat_id, \"integer\"));\n\t\t$row = $ilDB->fetchAssoc($set);\n\t\treturn $row[\"finished_id\"];\n\t}",
"function getByHeenRit($id) {\n $this->db->where('ritIdHeenrit', $id);\n $query = $this->db->get('rit');\n $rit = $query->row();\n return $rit;\n }",
"public function selector_rol(){\n $sql = \"SELECT * FROM tblrol WHERE tblestado_general_est_gen_id=1\";\n $result = mysqli_query($this->conection,$sql);\n return $result;\n }",
"function accesgroupes_trouve_id_utilisateur() {\t\t\t\t\t\r\n\t\t\t\t $login_utilisateur = $GLOBALS['auteur_session']['login'];\r\n\r\n\t\t\t\t\t$sql502 = \"SELECT id_auteur FROM spip_auteurs WHERE login = '$login_utilisateur' LIMIT 1\";\r\n\t\t\t\t\t$result502 = spip_query($sql502);\r\n\t\t\t\t\t$row502 = spip_fetch_array($result502);\r\n\t\t\t\t\t$id_utilisateur = $row502['id_auteur'];\r\n\t\t\t\t\treturn $id_utilisateur;\t\t\t\t \r\n}",
"function ancien_star(){\n\t\tglobal $bdd;\n\n\t\t$req = $bdd->prepare(\"SELECT pseudo FROM utilisateur WHERE star = TRUE AND TIME_TO_SEC(TIMEDIFF((CURRENT_TIMESTAMP),(DATE_STAR)))/60 > 10;\");\n\t\t$req->execute(array(0));\n\t\t$result = $req->fetchAll();\n\t\t\n\t\t$req->closeCursor();\n\t\treturn $result;\n\t}",
"public function istorijaRezultata() {\n $rModel = new RezultatModel();\n $igrac = $this->session->get('igrac');\n $rezultati = $rModel->nadji_rezultateigraca($igrac['idKI']);\n $this->prikaz(\"mod_istorijarezultata\", ['rezultati' => $rezultati]);\n }",
"function confirmReception() {\r\n\r\n\t\t$this->connection = new Connection();\r\n\t\t$conn = $this->connection->openConnection();\r\n\r\n\t\t$insert = $conn->prepare(\"UPDATE `panier` SET `recu`=1 WHERE `id_internaute`=:id_internaute AND `id_nourriture`=:id_nourriture AND `datep`=:datep\");\r\n\t\ttry {\r\n\t\t\t$result = $insert->execute(array('id_internaute' => $this->getId_internaute(),'id_nourriture' => $this->getId_nourriture(),'datep' => $this->getDate()));\r\n\t\t} catch (PDOExecption $e) {\r\n\t\t\tprint \"Error!: \" . $e->getMessage() . \"</br>\";\r\n\t\t}\r\n\t\t$this->connection->closeConnection();\r\n\t}",
"function getRidersFromID($ID) {\n global $db;\n\n $query = \"SELECT * FROM riders WHERE post_ID=\" . $ID; //selecting user's posts\n $statement = $db->prepare($query);\n $statement->execute();\n\n //fetchAll() --> retrieve all rows\n $results = $statement->fetchAll();\n $statement->closeCursor();\n return $results;\n}",
"function liste_ancienne_star(){\n\t\tglobal $bdd;\n\n\t\t$req = $bdd->prepare(\"SELECT id_utilisateur,pseudo FROM utilisateur WHERE star = TRUE AND TIME_TO_SEC(TIMEDIFF((CURRENT_TIMESTAMP),(DATE_STAR)))/60 > 10\");\n\t\t$req->execute(array(0));\n\t\t$result = $req->fetchAll();\n\t\t\n\t\t$req->closeCursor();\n\t\treturn $result;\n\t}",
"function SQLUpdateVoteElec ($idEleve) {\n\t\t$date = NOW();\n\t\t$tmp = 'UPDATE elect SET EVote=FROM_UNIXTIME('.$date.') WHERE EId='.$idEleve.';';\n\t\treturn SI::getSI()->SGBDgetPrepareExecute($tmp);\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 }",
"function verificar_reserva($id_sede,$id_area,$fecha,$hora) {\n $this->db->select('id_reserva');\n $this->db->where('fecha =', $fecha);\n $this->db->where('id_sede =', $id_sede);\n $this->db->where('id_area =', $id_area);\n $this->db->where('hora =', $hora);\n $query = $this->db->get('edicion');\n return $query->row();\n }",
"public function getResult($id){\n\n $vote_pour= DB::table('survey_vouter')->where('survey_id', $id )->where('vote','Pour')->count();\n $vote_contre= DB::table('survey_vouter')->where('survey_id', $id )->where('vote','Contre')->count();\n $result = $vote_pour * 100/($vote_pour + $vote_contre);\n //var_dump($result);\n Survey::where('id',$id)->update(['resultat'=>$result]);\n return $result;\n }",
"public function getUnCompteRendu($id){\n\t\t$req = \"select * from praticien P,rapport_visite R, visiteur V where R.RAP_NUM='$id' and P.PRA_NUM=R.PRA_NUM and r.vis_matricule = v.vis_matricule\";\n\t\t$rs = PdoGsb::$monPdo->query($req);\n\t\t$ligne = $rs->fetch();\n\t\treturn $ligne;\n\t}",
"public function AggiungiaiPreferiti($idricetta){\n $session = Sessione::getInstance();\n if($session->isLoggedUtente()){\n $utente = $session->getUtente();\n $idutente = $utente->getId();\n $pm = FPersistentManager::getInstance();\n $ric = $pm->loadById(\"ricetta\",$idricetta);\n $ric->incrementasalvataggi();\n $n = $ric->getNsalvataggi();\n $pm->update(\"ricetta\",$idricetta,'nsalvataggi',$n); //aggiornamento ricetta db\n $esito = $pm->storeUtPrefRic($idricetta, $idutente); //aggiunta di una entry\n //devo aggiornare l'oggetto utente nei dati di sessione (ha un nuovo preferito)\n $utente = $pm->loadById(\"utente\", $idutente);\n $session->setUtenteLoggato($utente);\n if($esito){\n //inserimento corretto, redirect alla pagina corrente\n $referer = $_SERVER['HTTP_REFERER']; //indirizzo che stavo visitando quando ho aggiunto ai preferiti\n $loc = substr($referer, strpos($referer, \"/myRecipes\")); //recupero parte path\n header('Location: '.$loc); //reindirizzamento al referer\n }\n else {\n $viewerr = new VErrore();\n $viewerr->mostraErrore(\"Inserimento nei preferiti non corretto\");\n\n }\n } else { //utente non loggato\n //redirect alla form di login\n\n header('Location: /myRecipes/web/Utente/Login');\n }\n\n }",
"function get_minute_row($minute_id)\n\t{\n\t\t$this->db->where('minutes_id',$minute_id);\n\t\t$query = $this->db->get($this->table);\n\t\t\n\t\treturn $query->row();\n\t}",
"public function findMontantById($id)\r\r\n {\r\r\n $query = \"SELECT SUM(montant) as total FROM PaimentFactureVente WHERE facture=?\";\r\r\n\r\r\n $req = $this->connexion->getConnexion()->prepare($query);\r\r\n\r\r\n $req->execute(array($id));\r\r\n\r\r\n $res = $req->fetchAll(PDO::FETCH_OBJ);\r\r\n\r\r\n return $res;\r\r\n }",
"public function getFinal(){\n\n $q = $this->db->get_where('v_final', ['id_pendaftar' => $this->session->userdata('id')]);\n return $q->row();\n }",
"public function dohvatiJeloId($id) {\n $this->db->select(\"idR,naziv,sadrzaj,obrok,kategorija,spec_prilika,slika\");\n $this->db->from(\"recepti\");\n $this->db->where(\"idR\", $id);\n $query = $this->db->get();\n return $query->result();\n }",
"function query_rifiuta_richiesta($id_richiesta){\n\t$query_update = \"UPDATE Richieste\n\t SET esito = 'rifiutata'\n\t WHERE id = \".$id_richiesta;\n\n\t$result_update = mysql_query($query_update) or die(mysql_error());\n\n\t$rows_updated = mysql_affected_rows();\n\n\tif($rows_updated > 0 ) {\n // creo il feedback nella relativa tabella\n query_insert_feedback($id_richiesta, 'rifiutata');\n\n\t return true;\n\t}\n\n\treturn false;\n}",
"public function dohvati_raspored($odeljenje){\n\t\t\t$this->db->where('odeljenjeId', $odeljenje);\n\t\t\t$query = $this->db->get('raspored');\n\t\t\t$result = $query->result();\n\t\t\treturn $result;\n\t\t}",
"public function startRate(){\n switch(Auth::user()->role_id){\n case 2 :\n $khateeb_id = Auth::user()->id ;\n return DB::select(\"SELECT islamic_center.id as id ,islamic_center.name , rating.khateeb_rate_ad FROM `islamic_center` left JOIN rating on rating.ic_id = islamic_center.id and rating.khateeb_id = $khateeb_id or rating.khateeb_id is null and name !=''\");\n break;\n case 3 :\n //return DB::select(\"SELECT khateeb.id , khateeb.name , khateeb.picture_url , rating.ad_rate_khateeb FROM `khateeb` left JOIN rating on rating.khateeb_id = khateeb.id where rating.ad_id = $ad_id or rating.khateeb_id is null and name !='' \");\n return AdKhateebsPhoto::khateebsForRating();\n break ;\n default:\n return \"false\";\n }\n }",
"public function getRightById(int $id){\r\n // ziskam pravo dle ID\r\n $rights = $this->selectFromTable(TABLE_PRAVO, \"id_pravo=$id\");\r\n if(empty($rights)){\r\n return null;\r\n } else {\r\n // vracim prvni nalezene pravo\r\n return $rights[0];\r\n }\r\n }",
"function confirmarVoto($idactual){\n $sql=\"SELECT * FROM bitacora WHERE idvotante=$idactual;\";\n \t\t\treturn $sql;\n }",
"function read() {\n $query = \"SELECT Sum(hard_braking) AS hard_braking, \n Sum(speed_limit_exceeded) AS speed_limit_exceeded, \n Sum(dangerous_time) AS dangerous_time \n FROM \" . $this->table_name . \" \n INNER JOIN users \n ON users.username = scores.user_id \n WHERE scores.user_id = ? \";\n\n // prepare query statement\n $stmt = $this->conn->prepare( $query );\n\n // bind id of product to be updated\n $stmt->bindParam(1, $this->user_id);\n\n // execute query\n $stmt->execute();\n \n return $stmt;\n }",
"public function actionSalinity() {\r\n \t$currentTs = time();\r\n \t$request = Yii::$app->request;\r\n \t$identity = \\Yii::$app->user->getIdentity();\r\n \t$arrPond = [];\r\n \r\n \t$q = trim($request->post('q', $request->get('q', '')));\r\n \r\n \t$query = Salinity::find();\r\n \t$query->orderBy(['id'=>SORT_ASC]);\r\n \r\n \t$op = $request->post('op', $request->get('opss', ''));\r\n \tif ($op == \"search\") {\r\n \t if (!empty($_REQUEST['type'])){\r\n \t\t\t$type = $_REQUEST['type'];\r\n \t\t\tif($type != 0){\r\n \t\t\t\t$queryf = pond::find();\r\n \t\t\t\t$queryf->andWhere(['type'=> $type]);\r\n \t\t\t\t$pondf = $queryf->all();\r\n \t\t\t\tforeach ($pondf as $obj){\r\n \t\t\t\t\t$arrId[] = $obj->id;\r\n \t\t\t\t}\r\n \t\t\t\t \r\n \t\t\t\tif($arrId){\r\n \t\t\t\t\t$query->andWhere(['pondId'=> $arrId]);\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t\t \r\n \t\tif (!empty($_REQUEST['q'])){\r\n \t\t\t$item = $_REQUEST['q'];\r\n \t\t\t$query->andWhere(['LIKE' ,'title','%'.$item.'%', false]);\r\n \t\t}\r\n \t}\r\n\r\n \t\t\tif ($q)\r\n \t\t\t\t$query->andWhere(['LIKE' ,'name','%'.$q.'%', false]);\r\n \t\t\t\t\t\r\n \t\t\t\t\t\r\n \t\t\t\t//actions\r\n \t\t\t\tswitch ($request->post('op')){\r\n \t\t\t\t\tcase 'delete':\r\n \t\t\t\t\t\t$this->salinityDelete();\r\n \t\t\t\t\t\tbreak;\r\n \t\t\t\t}\r\n \t\t\t\t\t\r\n \t\t\t\t//paging\r\n \t\t\t\t$pagination = new Pagination([\r\n \t\t\t\t\t\t'defaultPageSize' => \\Yii::$app->params['ui']['defaultPageSize'],\r\n \t\t\t\t\t\t'totalCount' => $query->count(),\r\n \t\t\t\t]);\r\n \t\t\t\t$pagination->params = [\r\n \t\t\t\t\t\t'q'=>$q,\r\n \t\t\t\t\t\t'page'=>$pagination->page,\r\n \t\t\t\t];\r\n \t\t\t\t$query->offset($pagination->offset);\r\n \t\t\t\t$query->limit($pagination->limit);\r\n \t\t\t\t\t\r\n \t\t\t\t$list = $query->all();\r\n \t\t\t\t\t\r\n \t\t\t\t//get users\r\n \t\t\t\t$arrId = [];\r\n \t\t\t\t$arrUser = [];\r\n \t\t\t\t$arrPond = [];\r\n \t\t\t\tif (!empty($list)){\r\n \t\t\t\t\tforeach ($list as $obj){\r\n \t\t\t\t\t\t$arrId[] = $obj->createBy;\r\n \t\t\t\t\t}\r\n \t\t\t\t\t$modelsUser = User::find()->where(['id'=>$arrId])->all();\r\n \t\t\t\t\tif(!empty($modelsUser)){\r\n \t\t\t\t\t\tforeach ($modelsUser as $obj){\r\n \t\t\t\t\t\t\t$arrUser[$obj->id] = $obj->firstName.' '.$obj->lastName;\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t}\r\n \r\n \t\t\t\t\t$objPond = Pond::find()->orderBy(['id'=>SORT_ASC])->all();\r\n \t\t\t\t\tforeach ($objPond as $dataPond){\r\n \t\t\t\t\t\t$objTypelist = Typelist::find()->where(['id'=>$dataPond->type])->all();\r\n \t\t\t\t\t\tforeach ($objTypelist as $obj){\r\n \t\t\t\t\t\t\t$arrPond[$dataPond->id] = $obj->name.' '.$dataPond->title;\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t\r\n \t\t\t\t\t}\r\n \t\t\t\t}\r\n \r\n \t\t\t\t$query = Typelist::find();\r\n \t\t\t\t$query->orderBy(['id'=>SORT_ASC]);\r\n \t\t\t\t$objTypelist = $query->all();\r\n \t\t\t\t$arrTypelist = [];\r\n \t\t\t\tforeach ($objTypelist as $dataTypelist){\r\n \t\t\t\t\t$arrTypelist[$dataTypelist->id] = $dataTypelist->name;\r\n \t\t\t\t}\r\n \r\n \t\t\t\t\t\r\n \t\t\t\techo $this->render('salinity', [\r\n \t\t\t\t\t\t'lst' => $list,\r\n \t\t\t\t\t\t'arrTypelist'=>$arrTypelist,\r\n \t\t\t\t\t\t'arrPond' => $arrPond,\r\n \t\t\t\t\t\t'pagination' => $pagination,\r\n \t\t\t\t\t\t'arrUser' =>$arrUser,\r\n \t\t\t\t\t\t'q'=>$q,\r\n \t\t\t\t]);\r\n }",
"public function getLesCompteRendu($id){\n\t\t$req = \"select r.rap_num as rapportnum,r.pra_num,p.pra_nom as nomprat ,r.rap_date as daterapport from rapport_visite r, praticien p where VIS_MATRICULE='$id' and r.pra_num=p.pra_num order by r.rap_date\";\n\t\t$rs = PdoGsb::$monPdo->query($req);\n\t\treturn $rs;\n\t}",
"function getEspecialRendimientoPonderado(){\n \t\tglobal $mdb2;\n \t\tglobal $log;\n \t\tglobal $current_usuario_id;\n \t\tglobal $usr;\n\n\t\t//TRAE LAS PONDERACIONES DEL OBJETIVO ESPECIAL\n \t\t$ponderacion_hora = $this->extra['ponderaciones'];\n\n\t\t//DATO PARA LA CONSULTA SQL, LISTA LAS HORAS DEL DÍA\n\t\t//SI ES 0 TRAE LAS 24 HORAS\n\t\t$ponderacion = $usr->getPonderacion();\n\n\t\tif ($ponderacion == null) {\n\t\t\t$ponderacion_id = 0;\n\t\t}\n\t\telse {\n\t\t\t$ponderacion_id = $ponderacion->ponderacion_id;\n\t\t}\n\n \t\t$sql = \"SELECT * FROM reporte.rendimiento_resumen_global_ponderado(\".\n \t\t\t\tpg_escape_string($current_usuario_id).\", \".\n \t\t\t\tpg_escape_string($this->objetivo_id).\", \".\n \t\t\t\tpg_escape_string($ponderacion_id).\",' \".\n \t\t\t\tpg_escape_string($this->timestamp->getInicioPeriodo()).\"', '\".\n \t\t\t\tpg_escape_string($this->timestamp->getTerminoPeriodo()).\"')\";\n\n\t\t//echo '<1>'.$sql.'<br>';\n\n \t\t$res =& $mdb2->query($sql);\n \t\tif (MDB2::isError($res)) {\n \t\t\t$log->setError($sql, $res->userinfo);\n \t\t\texit();\n \t\t}\n\n \t\tif($row = $res->fetchRow()){\n \t\t\t$dom = new DomDocument();\n \t\t\t$dom->preserveWhiteSpace = FALSE;\n \t\t\t$dom->loadXML($row['rendimiento_resumen_global_ponderado']);\n \t\t\t$xpath = new DOMXpath($dom);\n \t\t\tunset($row[\"rendimiento_resumen_global_ponderado\"]);\n \t\t}\n\n \t\t$conf_objetivo= $xpath->query(\"/atentus/resultados/propiedades/objetivos/objetivo\")->item(0);\n \t\t$conf_pasos = $xpath->query(\"paso[@visible=1]\", $conf_objetivo);\n \t\t$conf_ponderaciones = $xpath->query(\"/atentus/resultados/propiedades/ponderaciones/item\");\n\t\t$conf_min_max = $xpath->query(\"/atentus/resultados/propiedades/eventos/evento\");\n\n\t\t//SE MUESTRA TEMPLATE SIN DATOS\n \t\tif ($xpath->query(\"//detalles/detalle/detalles/detalle\")->length == 0) {\n \t\t\t$this->resultado = $this->__generarContenedorSinDatos();\n \t\t\treturn;\n \t\t}\n\n\t\t//VALIDA QUE NO HAYA MAS DEL 100% DE PONDERACIONES\n\t\tforeach ($ponderacion_hora as $value) {\n\t\t\t$suma_pond += $value->valor_ponderacion;\n\t\t}\n\n\t\tif (number_format($suma_pond, 2) > 100) {\n\t\t\t$this->resultado = 'EL TOTAL DE LAS PONDERACIONES DEBE SER IGUAL A 100%.<br>ES SUPERIROR AL 100%.';\n\t\t\treturn;\n\t\t}elseif (number_format($suma_pond, 2) < 100) {\n\t\t\t$this->resultado = 'EL TOTAL DE LAS PONDERACIONES DEBE SER IGUAL A 100%.<br>ES MENOR AL 100%.';\n\t\t\treturn;\n \t\t}\n\n\t\t//TEMPLATE DEL REPORTE\n \t\t$T =& new Template_PHPLIB(($this->extra[\"imprimir\"])?REP_PATH_PRINTTEMPLATES:REP_PATH_TABLETEMPLATES);\n\t\t$T->setFile('tpl_tabla', 'especial_rendimiento_ponderado.tpl');\n\t\t$T->setBlock('tpl_tabla', 'LISTA_PASOS_TITULO', 'lista_pasos_titulo');\n\t\t$T->setBlock('tpl_tabla', 'LISTA_ITEMS', 'lista_items');\n\t\t$T->setBlock('tpl_tabla', 'BLOQUE_EVENTOS_TITULOS', 'bloque_eventos_titulos');\n\t\t$T->setBlock('tpl_tabla', 'BLOQUE_EVENTOS_TOTAL', 'bloque_eventos_total');\n\t\t$T->setBlock('tpl_tabla', 'LISTA_PASOS', 'lista_pasos');\n\n\n\t\t$T->setVar('__paso_id_default', $conf_pasos->item(0)->getAttribute('paso_orden'));\n \t\t$T->setVar('__item_orden', $this->extra[\"item_orden\"]);\n\t\t$orden = 1;\n\t\tforeach ($conf_pasos as $conf_paso) {\n\t\t\t$T->setVar('__paso_id', $conf_paso->getAttribute('paso_orden'));\n\t\t\t$T->setVar('__paso_nombre', $conf_paso->getAttribute('nombre'));\n\t\t\t$T->setVar('__paso_orden', $orden);\n\n\t\t\t$total_min_ponderado = 0;\n\t\t\t$total_max_ponderado = 0;\n\t\t\t$total_prom_ponderado = 0;\n\n\t\t\t$T->setVar('lista_items', '');\n\t\t\tforeach ($conf_ponderaciones as $conf_ponderacion) {\n\t\t\t\t$valor=$ponderacion_hora[$conf_ponderacion->getAttribute('inicio')];\n\t\t\t\tif ($valor->valor_ponderacion == 0) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t$tag_dato = $xpath->query(\"//detalles/detalle/detalles/detalle[@item_id=\".$conf_ponderacion->getAttribute(\"item_id\").\"]/detalles/detalle[@paso_orden=\".$conf_paso->getAttribute(\"paso_orden\").\"]/datos/dato\")->item(0);\n\n \t\t\t\t$T->setVar('__print_class', ($linea % 2 == 0)?\"celdaIteracion2\":\"celdaIteracion1\");\n \t\t\t\t$T->setVar('__class', ($linea % 2 == 0)?\"celdanegra15\":\"celdanegra10\");\n\t\t\t\t$T->setVar('__item_inicio', $conf_ponderacion->getAttribute('inicio'));\n\t\t\t\t$T->setVar('__item_termino', $conf_ponderacion->getAttribute('termino'));\n\n\t\t\t\t$T->setVar('__paso_minimo', ($tag_dato == null)?'S/I':number_format($tag_dato->getAttribute('tiempo_min'), 2, ',', ''));\n\t\t\t\t$T->setVar('__paso_maximo', ($tag_dato == null)?'S/I':number_format($tag_dato->getAttribute('tiempo_max'), 2, ',', ''));\n\t\t\t\t$T->setVar('__paso_promedio', ($tag_dato == null)?'S/I':number_format($tag_dato->getAttribute('tiempo_prom'), 2, ',', ''));\n\n\t\t\t\tif ($tag_dato == null) {\n\t\t\t\t\t$tiempo_minimo = 0;\n\t\t\t\t\t$tiempo_maximo = 0;\n\t\t\t\t\t$tiempo_promedio = 0;\n\t\t\t\t}else{\n\t\t\t\t\t$tiempo_minimo = $tag_dato->getAttribute('tiempo_min');\n\t\t\t\t\t$tiempo_maximo = $tag_dato->getAttribute('tiempo_max');\n\t\t\t\t\t$tiempo_promedio = $tag_dato->getAttribute('tiempo_prom');\n\t\t\t\t}\n\n\t\t\t\t//SE CALCULA EL PONDERADO\n\t\t\t\t$total_min_ponderado = (($valor->valor_ponderacion/100) * $tiempo_minimo) + $total_min_ponderado;\n\t\t\t\t$total_max_ponderado = (($valor->valor_ponderacion/100) * $tiempo_maximo) + $total_max_ponderado;\n\t\t\t\t$total_prom_ponderado = (($valor->valor_ponderacion/100) * $tiempo_promedio) + $total_prom_ponderado;\n\n\t\t\t\t//SE ASIGNA VALOR DE LA PONDERACIÓN\n \t\t\t$T->setVar('__item_valor', number_format($valor->valor_ponderacion, 2, '.', ''));\n\n\t\t\t\t$T->parse('lista_items', 'LISTA_ITEMS', true);\n \t\t\t\t$linea++;\n \t\t\t}\n\n\t\t\t$T->setVar('__min_total', number_format($total_min_ponderado, 2, ',', ''));\n\t\t\t$T->setVar('__max_total', number_format($total_max_ponderado, 2, ',', ''));\n\t\t\t$T->setVar('__prom_total', number_format($total_prom_ponderado, 2, ',', ''));\n\n\t\t\t$T->parse('lista_pasos', 'LISTA_PASOS', true);\n \t\t\t$orden++;\n \t\t}\n\n \t\t$this->tiempo_expiracion = (strtotime($xpath->query(\"//fecha_expiracion\")->item(0)->nodeValue) - strtotime($xpath->query(\"//fecha\")->item(0)->nodeValue));\n \t\t$this->resultado =$T->parse('out', 'tpl_tabla');\n \t}",
"function loginRunner(){\n if(isset($_POST['R_Email'])){\n $sql = \"select * from rider where R_Email=:R_Email AND R_Password=:R_Password limit 1\";\n //$sql = \"select * from runner where RunnerEmail=:RunnerEmail\";\n $args = [':R_Email'=>$this->R_Email, ':R_Password'=>$this->R_Password];\n //$args = [':RunnerEmail'=>$this->RunnerEmail];\n // $stmt = DB::run($sql,$args);\n // $count = $stmt->rowCount();\n \n return DB::run($sql,$args);\n\n }\n }",
"function duree_star(){\n\t\tglobal $bdd;\n\n\t\t$req = $bdd->query(\"SELECT TIMEDIFF(MINUTE(CURRENT_TIMESTAMP),MINUTE(date_star)) FROM utilisateur WHERE star = TRUE\");\n\n\t\t$result = $req->$fetchAll();\n\n\t\t$req->closeCursor();\n\t\treturn $result;\n\t}",
"function selectSessionId($con,$user){\n\n $idUsuario = \"--\";\n\n $sql = \"SELECT id FROM clientes WHERE nick_user = ? LIMIT 1\";\n\n $valor = $user;\n\n $consulta = $con->prepare($sql);\n\n $consulta->bind_param(\"s\",$valor);\n\n $consulta->execute();\n\n $consulta->bind_result($user);\n\n while($consulta->fetch()){\n\n $idUsuario = $user;\n }\n\n return $idUsuario;\n}",
"function _JsemNaRade($posta_id, $prac = 0) {\r\n if (is_array($posta_id)) $posta_id = $posta_id[0];\r\n $pid = split(',',$posta_id);\r\n $posta_id = $pid[0];\r\n $sql = 'select * from posta_schvalovani where posta_id=' . $posta_id . ' and schvaleno=0 and stornovano is null order by id asc';\r\n $q = new DB_POSTA;\r\n $q->query($sql); \r\n $q->Next_Record();\r\n if ($q->Record['POSTUP'] == 2 || ($q->Record['POSTUP'] == 1 && $q->Record['SCHVALUJICI_ID'] == $prac)) return true;\r\n else return false; \r\n}",
"function fantacalcio_aggiorna_sfide($vote_round) {\n drupal_set_title(filter_xss('Risultati ' . $vote_round . 'ª giornata'));\n\n $sql = \"UPDATE {fanta_sfide} SET status = 3 WHERE status = 1\";\n $result = db_query($sql);\n \n $sql = \"DELETE FROM {fanta_sfide} WHERE (status = 2 OR status = 0)\";\n $result = db_query($sql);\n return \"Sfide aggiornate\"; \n\n}",
"public function findById($id){\n $query = $this->db->get_where('peserta_seminar', array('id'=>$id));\n return $query;\n }",
"public function recruter($recrue = null )\n {\n if(Post::getInstance()->submit()){\n\n if(Post::getInstance()->has(\"invitation\")){\n\n if(!is_null($recrue)){\n\n $recrus = $this->User->find($recrue);\n $guild = $this->Member->findOneBy(array(\"user_id\" => $this->auth->getUser('id')));\n\n $this->GuildService->inviter($guild->id,$recrus->id);\n\n }\n }\n\n if(Post::getInstance()->has(\"search\")){\n\n if(is_null($recrue)){\n\n $this->recrus = $this->User->search(Post::getInstance()->val(\"recrue\"));\n }\n }\n }\n }",
"function consultarListadoPesadasRecolector($idOferta, $cedula)\n{\n\t$sql = \"SELECT pesadas.fecha, pesadas.kilos, ofertas.valorpago as valorkilo, (pesadas.kilos \t* ofertas.valorpago ) as valorpesada \n\t\t\tFROM pesadas JOIN ofertas ON pesadas.idoferta = ofertas.id \n\t\t\tWHERE pesadas.idoferta = {$idOferta} AND pesadas.idrecolector = (SELECT usuarios.id FROM usuarios WHERE usuarios.cedula = '{$cedula}')\";\n\tleerRegistro($sql);\n}",
"public function consultarRuta(){\r\n\r\n\t\t\t$conexion=new conexion();\r\n\r\n\t\t\t$query =\"SELECT * FROM imgEncabezado\r\n\t\t\t\t\t\tWHERE ruta='\".$this->getRuta().\"';\";\r\n\t\t\t$resultado =pg_query($conexion->getStrcnx(),$query);\r\n\r\n\t\t\tpg_close($conexion->getStrcnx()); //cerramos la conexion a la db\r\n\t\t\t\r\n\t\t\treturn $resultado;\r\n\t\t}",
"function retourneUtilisateur($idUtilisateur){\n\tglobal $connexion; // on définie la variables globale de connection dans la fonction\n\t\n\t$requete = $connexion->query(\"SELECT * FROM utilisateur where idUtilisateur=\".$idUtilisateur.\"\");\n\t$requete->setFetchMode(PDO::FETCH_OBJ);\n\t$enregistrement = $requete->fetch();\n\t\n\n\treturn $enregistrement; // on renvoie un objet utilisateur\n}",
"function crea_id_ric(){\n\t$db = new db(DB_USER,DB_PASSWORD,DB_NAME,DB_HOST);\n\t$q_crea_id_imm = \"SELECT * FROM ultimo_id_ric LIMIT 1\";\n\t$r_crea_id_imm = $db->query($q_crea_id_imm);\n\t$ro_crea_id_imm = mysql_fetch_array($r_crea_id_imm);\n\t$id_ric = $ro_crea_id_imm['id_ric'];\n\t$q_agg=\"update ultimo_id_ric set id_ric = id_ric+1\";\n\t$r_agg=$db->query($q_agg);\n\t\n\treturn $id_ric;\n}",
"function solo_positivi() {\r\n $query = \"SELECT s.NomeStudente AS nome, s.CognomeStudente AS cognome FROM Studente s WHERE s.id_studente NOT IN (SELECT st.id_studente FROM Sudente st INNER JOIN Voto v ON st.id_studente = v.id_studente WHERE v.Voto < 6 GROUP BY id_studente\");\r\n $risultato = $conn -> query($query);\r\n\r\n return $risultato;\r\n }",
"public function get($interactId, $time) {\n\t\t$sql = <<<SQL\nselect distinct memberid, username, userrole \nfrom $this->tablename\nwhere interactid=? and time>?\nSQL;\n\n\t\t$exec = [$interactId, $this->timeStr($time - self::ACTIVE_DURATION)];\n\t\t$stmt = $this->pdo->prepare($sql);\n\t\t//echo $this->sub_sql($sql, $exec);\n\t\t$stmt->execute($exec);\n\t\treturn $stmt->fetchAll(\\PDO::FETCH_ASSOC);\n\t}",
"protected function trenutniKorisnik()\n {\n $trenutni = Korisnik::query()->gdje('id', $this->get('id'))->prvi();\n\n if (!$trenutni) {\n $this->redirect('/');\n }\n\n return $trenutni;\n }",
"function sviRezultati() {\n\t\t$mysqli = new mysqli(\"localhost\", \"root\", \"\", \"kviz\");\n\t\t$q = 'SELECT * FROM tabela t join korisnik k on t.korisnikID = k.korisnikID order by t.brojPoena desc';\n\t\t$this ->result = $mysqli->query($q);\n\t\t$mysqli->close();\n\t}",
"function getRole($uid,$rid){\n\t$sql = \"SELECT \tr.id,r.name\n\t\t\t\t from \t\tadministrador a,roles r\n\t\t\t\t\twhere \ta.Rol = r.id\n\t\t\t\t\tand\t\t\ta.Rol = $rid\n\t\t\t\t\tand \t\ta.IdAdministrador = $uid\";\n\t\n\t$result = mysql_query($sql) or die('Error :'.mysql_error());\n\t\t\n\twhile($row = mysql_fetch_object($result))\n\t{\n\t $rid = $row->id;\n\t $rname = $row->name;\n\t}\n\t\t\n\tif(trim($rname) == \"Superadmin\"){\n\t\t$role = 1;\n\t}\n\telse{\n\t\t$role = 0;\n\t}\n\treturn $role;\t\t\t\t\n}",
"function arreglasecu(){\n\t\t$mSQL='UPDATE sinv SET precio2=precio1, base2=base1, margen2=margen1 WHERE margen2>margen1';\n\t\tvar_dump($this->db->simple_query($mSQL));\n\t\t$mSQL='UPDATE sinv SET precio3=precio2, base3=base2, margen3=margen2 WHERE margen3>margen2';\n\t\tvar_dump($this->db->simple_query($mSQL));\n\t\t$mSQL='UPDATE sinv SET precio4=ROUND(ultimo*100/(100-(margen3-0.5))*(1+(iva/100)),2), base4=ROUND(ultimo*100/(100-(margen3-0.5)),2), margen4=margen3-.5 WHERE margen4>=margen3';\n\t\tvar_dump($this->db->simple_query($mSQL));\n\t}",
"public function logRider($riderid, $track_lng, $track_lat) {\n $curr_time = date(\"m/d/Y H:i:s\");\n $database = new DB;\n //CONNECTING TO THE DB\n $handle = $database->connectToDb();\n //PREPARING QUERY\n $query = \"INSERT INTO rider_track (rider_id, track_time, track_lng, track_lat) VALUES ('{$riderid}', '{$curr_time}', '{$track_lng}', '{$track_lat}')\";\n if ($handle->query($query)) {\n return 1;\n }\n else {\n return 0;\n }\n}",
"function eliminaRuta()\r\n\t{\r\n\t\t$query = \"DELETE FROM \" . self::TABLA . \" WHERE IdRuta = \".$this->IdRuta.\";\";\r\n\t\treturn parent::eliminaRegistro( $query);\r\n\t}",
"function setDateForRapport($idsRoy){\n \t\t\n //récupère les royalty pour les livres sélectionnés\n $sql = \"SELECT \n COUNT(DISTINCT r.id_royalty) nbRoy\n ,SUM(v.montant_livre) rMtVente, SUM(v.nombre) unit, v.type typeVente\n ,SUM(r.montant_livre) rMtRoy\n ,MIN(r.taxe_taux) taux, MIN(r.taxe_deduction) deduction, MIN(r.pourcentage) pc\n ,l.id_livre, l.titre_en, l.titre_fr, l.titre_es\n ,c.type typeContrat\n ,com.id_comite, com.titre_fr, com.titre_en, com.titre_es\n FROM iste_royalty r \n INNER JOIN iste_vente v ON v.id_vente = r.id_vente\n INNER JOIN iste_isbn i ON i.id_isbn = v.id_isbn\n INNER JOIN iste_livre l ON l.id_livre = i.id_livre\n INNER JOIN iste_comitexlivre cl ON cl.id_livre = l.id_livre\n INNER JOIN iste_auteurxcontrat ac ON ac.id_auteurxcontrat = r.id_auteurxcontrat AND ac.id_comite = cl.id_comite\n INNER JOIN iste_comite com ON c.id_comite = ac.id_comite\n INNER JOIN iste_contrat c ON c.id_contrat = ac.id_contrat\n WHERE r.id_royalty IN (\".$idsRoy.\")\n GROUP BY com.id_comite\";\n //echo $sql;\n $stmt = $this->_db->query($sql);\n \n return $stmt->fetchAll(); \n \n }",
"function updateMeGustaId($id, $id_usuario, $valor_megusta) {\n $c = new Conexion();\n $resultado = $c->query(\"UPDATE valoracion_mg val_mg, usuario usu SET val_mg.megusta = $valor_megusta where val_mg.id_usuario=usu.id && val_mg.id_contenido=$id && val_mg.id_usuario=$id_usuario\");\n}",
"function getEarnotchID($id){\n\t$crud = new CRUD();\n\t$crud->connect();\n\n\t$crud->sql(\"select * from pigs_tbl where pig_id='{$id}'\");\n\t$r = $crud->getResult();\n\tforeach($r as $rs){\n\t\treturn $rs['earnotch'];\n\n\t}\n\t$crud->disconnect();\n}",
"function MaterialId($id,$indice){\n //Construimos la consulta\n $sql=\"SELECT* FROM material_entregado\n WHERE materiales=$indice and empleado=$id order by id desc limit 1\";\n //Realizamos la consulta\n $resultado=$this->realizarConsulta($sql);\n if($resultado!=false){\n if($resultado!=false){\n return $resultado->fetch_assoc();\n }else{\n return null;\n }\n }else{\n return null;\n }\n }",
"public function updateSQL() {\n $query = \"UPDATE TempRota SET e_id = %s WHERE shift_name = '%s' AND rdate = '%s'\";\n $q = \"\";\n if ($this->eid == \"-1\")\n $q = sprintf($query, \"NULL\", $this->shift_name, $this->rdate);\n else {\n $q = sprintf($query, $this->eid, $this->shift_name, $this->rdate);\n\n $quick_query = \"UPDATE Employees \"\n .\"SET fair_hours = fair_hours + (SELECT TIME_TO_SEC(TIMEDIFF(end_time, start_time))/3600 FROM ShiftType WHERE shift_name = '%s') \" \n .\"WHERE e_id = %s\";\n QFunc::getQuery(sprintf($quick_query, $this->shift_name, $this->eid));\n }\n QFunc::getQuery($q);\n }",
"public function TraerCiudadRiesgo(){\n $sentencia = $this->db->prepare(\"SELECT *FROM ciudad WHERE zona_riesgo=1 \" ); \n $sentencia->execute(); // ejecuta -\n $query= $sentencia->fetchAll(PDO::FETCH_OBJ); // obtiene la respuesta\n return $query;\n }",
"public function getlectureById ($id){\n $sqlQuery = \" SELECT * \";\n $sqlQuery .= \" FROM lecturers \";\n $sqlQuery .= \" WHERE id= $id \";\n $result = $this -> getDbManager () -> executeSelectQuery ( $sqlQuery );\n return ( $result );\n }",
"function getMeGustaId($id, $id_usuario) {\n $c = new Conexion();\n $resultado = $c->query(\"SELECT val_mg.megusta FROM valoracion_mg val_mg, usuario usu where val_mg.id_usuario=usu.id && val_mg.id_contenido=$id && val_mg.id_usuario=$id_usuario\");\n\n if ($objeto = $resultado->fetch(PDO::FETCH_OBJ)) {\n return $objeto;\n }\n else{\n return null;\n } \n}",
"function obtener_tipo_recorrido($iddoc)\n{\n $resultado = 'Matutino';\n\n $query = Model::getQueryBuilder();\n $planilla = $query\n ->select('tipo_recorrido')\n ->from('ft_despacho_ingresados')\n ->where('documento_iddocumento = :iddoc')\n ->setParameter(':iddoc', $iddoc, \\Doctrine\\DBAL\\Types\\Type::INTEGER)\n ->execute()->fetchAll();\n\n if ($planilla[0]['tipo_recorrido'] == 2) {\n $resultado = 'Vespertino';\n }\n return $resultado;\n}",
"function actualizarEstadisticaV(){\n\t\t\t$sql=\"UPDATE estadistica SET votovalido = votovalido+1,\nvotototal = votototal+1 where idestaditica=(Select max(idestaditica) from estadistica);\";\n\t\t\treturn $sql;\n\t\t}",
"public function getID(){\n return $this->_idArmure;\n }",
"function obtenerUsuario_EspecialistaID($id){\n\t\n\t//$query = $this->db->from('sesion')->where('id',$id)->get();\n\t\n\t\t$user = 'user';\n\t $query = $this->db->from('usuario')->where('perfil',$user)->get();\n\t if($query-> num_rows() > 0){\n\t \t\n\t \t$row = $query->row($id);\n\t \t\n\t if (isset($row))\n\t\t\t{\n\t\t\t\t//echo ('ESTE ES EL ID'.' '.$row->id.'- ');\n \treturn $row->id; }\n\t\t}\n\t else return false ;\n\t \n\t}",
"public function actionSeguimiento_evaluacion() {\n\n $codigoMatricula = $_SESSION['codmatricula'];\n\n $cmdareasalumno = \" CALL CARGA_AREAS_PARA_ALUMNO(\" . $codigoMatricula . \");\";\n $dataareasalumno = Yii::app()->db->createCommand($cmdareasalumno)->queryAll();\n\n $this->renderPartial('seguimiento_evaluacion', array(\n 'dataareasalumno' => $dataareasalumno));\n }",
"public function getElevesRang() {\r\n $query = \"SELECT IDELEVE, NOMEL, PRENOMEL, SEXEEL, PHOTOEL, DATENAISSEL, MATRICULEEL, LIEUNAISSEL, AUTRENOMEL, \"\r\n . \"MOYGENERALE, POINTS, SUMCOEFF, \"\r\n . \"CASE WHEN @_last_moy = MOYGENERALE THEN @curRang ELSE @curRang := @_sequence END AS RANG, \"\r\n . \"@_last_moy := MOYGENERALE, @_sequence := @_sequence + 1 \"\r\n . \"FROM (\"\r\n . \"SELECT IDELEVE, NOMEL, PRENOMEL, SEXEEL, PHOTOEL, DATENAISSEL, MATRICULEEL, LIEUNAISSEL, AUTRENOMEL, \"\r\n . \"SUM(MOYENNE*COEFF)/SUM(COEFF) AS MOYGENERALE, SUM(MOYENNE*COEFF) AS POINTS, \"\r\n . \"SUM(COEFF) AS SUMCOEFF \"\r\n . \"FROM tmp_notes GROUP BY IDELEVE ORDER BY MOYGENERALE DESC \"\r\n . \") TOTALS, (SELECT @curRang := 1, @_last_moy := 0, @_sequence := 1) r\";\r\n return $this->query($query);\r\n }",
"function SQLUpdateVoteCandid (array $tableau) {\n\t\t$idModif = \"\";\n\t\tforeach($tableau as $idCandid){\n\t\t\t$idModif .= $idCandid.\" OR \";\n\t\t}\n\t\t$idModif = substr($idModif, 0, -3);\n\t\t$tmp = 'UPDATE candid SET CNbV=CNbV+1 WHERE CId='.$idModif.';';\n\t\treturn SI::getSI()->SGBDgetPrepareExecute($tmp);\n\t}",
"public function PregResp() { \n $consulta = $this->ejecutar(\"SELECT * FROM cappiutep.t_usuario_pregunta WHERE pregunta = '$this->Preg' AND respuesta = '$this->Resp' and id_usuario=\".$_SESSION['userTemp'].\" \");\n return $this->setNoTupla( $consulta);\n }",
"public function getNominaCuP($id)\n { \n $result=$this->adapter->query('update n_conceptos a \n inner join n_conceptos_tn b on b.idConc=a.id\n inner join n_nomina c on c.idTnom=b.idTnom\n set b.periodo = case when a.perAuto>b.periodo then b.periodo+1 else 1 end \n where a.perAuto>1 and c.id='.$id ,Adapter::QUERY_MODE_EXECUTE);\n }",
"public function estadoRS($Rs)\n {\n\t\n\t\n\t\n\t}",
"function getRuta($idImatge){\n $conn=connexioBD();\n $productes=\"\";\n $sql=\"SELECT ruta FROM imatges WHERE id='$idImatge'\";\n if (!$resultado =$conn->query($sql)){\n die(\"Error al comprobar datos\".$conn->error);\n }\n if($resultado->num_rows>=0){\n while($ruta=$resultado->fetch_assoc()){\n return $ruta[\"ruta\"]; \n }\n } \n $resultado->free();\n $conn->close();\n}",
"function getRendimientoPonderado() {\n\t\tglobal $mdb2;\n\t\tglobal $log;\n\t\tglobal $current_usuario_id;\n\t\tglobal $usr;\n\n\t\t//DATO PARA LA CONSULTA SQL, LISTA LAS HORAS DEL DÍA\n\t\t//SI ES 0 TRAE LAS 24 HORAS\n\t\t$ponderacion = $usr->getPonderacion();\n\n\t\tif ($ponderacion == null) {\n\t\t\t$ponderacion_id = 0;\n\t\t}\n\t\telse {\n\t\t\t$ponderacion_id = $ponderacion->ponderacion_id;\n\t\t}\n\n\t\t$sql = \"SELECT * FROM reporte.rendimiento_resumen_global_ponderado(\".\n\t\t\t\tpg_escape_string($current_usuario_id).\",\".\n\t\t\t\tpg_escape_string($this->objetivo_id).\", \".\n\t\t\t\tpg_escape_string($ponderacion_id).\",' \".\n\t\t\t\tpg_escape_string($this->timestamp->getInicioPeriodo()).\"', '\".\n\t\t\t\tpg_escape_string($this->timestamp->getTerminoPeriodo()).\"')\";\n\n\n\t\t$res =& $mdb2->query($sql);\n\t\tif (MDB2::isError($res)) {\n\t\t\t$log->setError($sql, $res->userinfo);\n\t\t\texit();\n\t\t}\n\n\t\tif($row = $res->fetchRow()){\n\t\t\t$dom = new DomDocument();\n\t\t\t$dom->preserveWhiteSpace = FALSE;\n\t\t\t$dom->loadXML($row['rendimiento_resumen_global_ponderado']);\n\t\t\t$xpath = new DOMXpath($dom);\n\t\t\tunset($row[\"rendimiento_resumen_global_ponderado\"]);\n\t\t}\n\n\t\t$conf_objetivo= $xpath->query(\"/atentus/resultados/propiedades/objetivos/objetivo\")->item(0);\n\t\t$conf_pasos = $xpath->query(\"paso[@visible=1]\", $conf_objetivo);\n\t\t$conf_ponderaciones = $xpath->query(\"/atentus/resultados/propiedades/ponderaciones/item\");\n\n\t\t//SE MUESTRA TEMPLATE SIN DATOS\n\t\tif ($xpath->query(\"//detalles/detalle/detalles/detalle\")->length == 0) {\n\t\t\t$this->resultado = $this->__generarContenedorSinDatos();\n\t\t\treturn;\n\t\t}\n\n\t\t//TEMPLATE DEL REPORTE\n\t\t$T =& new Template_PHPLIB(($this->extra[\"imprimir\"])?REP_PATH_PRINTTEMPLATES:REP_PATH_TABLETEMPLATES);\n\t\t$T->setFile('tpl_tabla', 'rendimiento_ponderado.tpl');\n\t\t$T->setBlock('tpl_tabla', 'LISTA_ITEMS', 'lista_items');\n\t\t$T->setBlock('tpl_tabla', 'BLOQUE_EVENTOS_TITULOS', 'bloque_eventos_titulos');\n\t\t$T->setBlock('tpl_tabla', 'BLOQUE_EVENTOS_TOTAL', 'bloque_eventos_total');\n\t\t$T->setBlock('tpl_tabla', 'LISTA_PASOS', 'lista_pasos');\n\n\n\t\t$T->setVar('__paso_id_default', $conf_pasos->item(0)->getAttribute('paso_orden'));\n\t\t//$T->setVar('__item_orden', $this->extra[\"item_orden\"]);\n\t\t$orden = 1;\n\t\tforeach ($conf_pasos as $conf_paso) {\n\t\t\t$T->setVar('__paso_id', $conf_paso->getAttribute('paso_orden'));\n\t\t\t$T->setVar('__paso_nombre', $conf_paso->getAttribute('nombre'));\n\t\t\t$T->setVar('__paso_orden', $orden);\n\n\t\t\t$total_min_ponderado = 0;\n\t\t\t$total_max_ponderado = 0;\n\t\t\t$total_prom_ponderado = 0;\n\n\t\t\t$T->setVar('lista_items', '');\n\t\t\tforeach ($conf_ponderaciones as $conf_ponderacion) {\n\t\t\t\tif ($conf_ponderacion->getAttribute('valor') == 0) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t$tag_dato = $xpath->query(\"//detalles/detalle/detalles/detalle[@item_id=\".$conf_ponderacion->getAttribute(\"item_id\").\"]/detalles/detalle[@paso_orden=\".$conf_paso->getAttribute(\"paso_orden\").\"]/datos/dato\")->item(0);\n\n\t\t\t\t$T->setVar('__print_class', ($linea % 2 == 0)?\"celdaIteracion2\":\"celdaIteracion1\");\n\t\t\t\t$T->setVar('__class', ($linea % 2 == 0)?\"celdanegra15\":\"celdanegra10\");\n\t\t\t\t$T->setVar('__item_inicio', $conf_ponderacion->getAttribute('inicio'));\n\t\t\t\t$T->setVar('__item_termino', $conf_ponderacion->getAttribute('termino'));\n\n\t\t\t\t$T->setVar('__paso_minimo', ($tag_dato == null)?'S/I':number_format($tag_dato->getAttribute('tiempo_min'), 2, ',', ''));\n\t\t\t\t$T->setVar('__paso_maximo', ($tag_dato == null)?'S/I':number_format($tag_dato->getAttribute('tiempo_max'), 2, ',', ''));\n\t\t\t\t$T->setVar('__paso_promedio', ($tag_dato == null)?'S/I':number_format($tag_dato->getAttribute('tiempo_prom'), 2, ',', ''));\n\n\t\t\t\tif ($tag_dato == null) {\n\t\t\t\t\t$tiempo_minimo = 0;\n\t\t\t\t\t$tiempo_maximo = 0;\n\t\t\t\t\t$tiempo_promedio = 0;\n\t\t\t\t}else{\n\t\t\t\t\t$tiempo_minimo = $tag_dato->getAttribute('tiempo_min');\n\t\t\t\t\t$tiempo_maximo = $tag_dato->getAttribute('tiempo_max');\n\t\t\t\t\t$tiempo_promedio = $tag_dato->getAttribute('tiempo_prom');\n\t\t\t\t}\n\n\t\t\t\t//SE CALCULA EL PONDERADO\n\t\t\t\t$total_min_ponderado = (($conf_ponderacion->getAttribute('valor')/100) * $tiempo_minimo) + $total_min_ponderado;\n\t\t\t\t$total_max_ponderado = (($conf_ponderacion->getAttribute('valor')/100) * $tiempo_maximo) + $total_max_ponderado;\n\t\t\t\t$total_prom_ponderado = (($conf_ponderacion->getAttribute('valor')/100) * $tiempo_promedio) + $total_prom_ponderado;\n\n\t\t\t\t//SE ASIGNA VALOR DE LA PONDERACIÓN\n \t\t\t$T->setVar('__item_valor', number_format($conf_ponderacion->getAttribute('valor'), 2, '.', ''));\n\n\t\t\t\t$T->parse('lista_items', 'LISTA_ITEMS', true);\n\t\t\t\t$linea++;\n\t\t\t}\n\n\t\t\t$T->setVar('__min_total', number_format($total_min_ponderado, 2, ',', ''));\n\t\t\t$T->setVar('__max_total', number_format($total_max_ponderado, 2, ',', ''));\n\t\t\t$T->setVar('__prom_total', number_format($total_prom_ponderado, 2, ',', ''));\n\n\t\t\t$T->parse('lista_pasos', 'LISTA_PASOS', true);\n\t\t\t$orden++;\n\t\t}\n\n\t\t$this->tiempo_expiracion = (strtotime($xpath->query(\"//fecha_expiracion\")->item(0)->nodeValue) - strtotime($xpath->query(\"//fecha\")->item(0)->nodeValue));\n\t\t$this->resultado =$T->parse('out', 'tpl_tabla');\n\t}",
"public function getValoreOrario($orarioId){\n $query = \"select orari.fasciaOraria \n FROM orari\n JOIN ordini ON orari.id = ordini.orario_id\n WHERE ordini.orario_id = ?\";\n\n $mysqli = Db::getInstance()->connectDb();\n if (!isset($mysqli)) {\n error_log(\"[getValoreOrario] impossibile inizializzare il database\");\n $mysqli->close();\n return null;\n }\n\n $stmt = $mysqli->stmt_init();\n $stmt->prepare($query);\n if (!$stmt) {\n error_log(\"[getValoreOrario] impossibile\" .\n \" inizializzare il prepared statement\");\n $mysqli->close();\n return null;\n }\n\n if (!$stmt->bind_param('i', $orarioId)) {\n error_log(\"[getValoreOrario] impossibile\" .\n \" effettuare il binding in input\");\n $mysqli->close();\n return null;\n }\n\n if (!$stmt->execute()) {\n error_log(\"[getValoreOrario] impossibile\" .\n \" eseguire lo statement\");\n return null;\n }\n\n $row = array();\n $bind = $stmt->bind_result($row['orario']);\n\n if (!$bind) {\n error_log(\"[getValoreOrario] impossibile\" .\n \" effettuare il binding in output\");\n return null;\n }\n $stmt->fetch();\n $orario = $row['orario'];\n \n $mysqli->close();\n return $orario; \n \n }",
"public function cambiarEstado(){\r\n $sql = \"UPDATE usuarios SET Estado = (CASE WHEN Estado = 1 THEN 0 ELSE 1 END)\r\n WHERE IdUsuario = '{$this->idUsuario}';\";\r\n $res = $this->conexion->setQuery($sql);\r\n return $res;\r\n}",
"function verif_star($id){\n\t\tglobal $bdd;\n\n\t\t$req = $bdd->prepare(\"SELECT star FROM utilisateur WHERE id_utilisateur = :id\");\n\t\t$req->execute(array(\"id\"=>$id));\n\n\t\twhile($results = $req->fetch()){\n\t\t\t$result = $results[\"star\"];\n\t\t}\n\n\t\treturn $result;\n\t}",
"public function Ricetta($id){\n $pm = FPersistentManager::getInstance();\n $ricetta = $pm->loadById(\"ricetta\",$id);\n $session = Sessione::getInstance();\n //se l'utente è loggato si verifica se preferisce questa ricetta (cuore pieno o vuoto a seconda dei casi)\n //se non è loggato sicuramente il cuore è vuoto\n if($session->isLoggedUtente()){\n $preferita = $pm->UtentePrefRic($id,$session->getUtente()->getId());\n } else {\n $preferita = false;\n }\n $commenti = $ricetta->getCommenti();\n $arrcommenti = array();\n //costruisco un array in cui ogni elemento è un array associativo con chiavi 'utente', 'commento' e 'img' profilo utente\n foreach ($commenti as $commento){\n $id = $commento->getIdUtente();\n $utente = $pm->loadById(\"utente\",$id);\n $img = $utente->getImmagine();\n $img->setData(base64_encode($img->getData()));\n $tmp = array(\n 'utente'=>$utente->getUsername(),\n 'img'=>$img,\n 'commento'=>$commento\n );\n $arrcommenti[]=$tmp;\n\n }\n\n $errore=\"\";\n if($arrcommenti==null){\n $errore=\"Non ci sono commenti per questa ricetta\";\n }\n else{\n $errore=\"\";\n }\n $view = new VDettaglio();\n $view->mostraRicetta($ricetta, $preferita, $arrcommenti, $errore);\n }",
"function changeEpreuveIntitule($id, $newIntitule) {\n $q = 'update epreuve set intitule = \"'.$newIntitule.'\" where numEpreuve = '.$id.';';\n $res = query($q);\n if ($res === false) {\n return $res;\n }\n return true;\n}",
"function rateChallenge($cid,$direction) {\n $PDO =&DB::$PDO;\n //Check user\n if(!$_SESSION['id']) {\n error(403);\n }\n //Check if the user have voted before\n $pre = $PDO->prepare('SELECT id FROM challenges_rating WHERE challenge_id=:cid AND user_id=:uid');\n $pre->execute(array(':cid' => $cid,':uid' => $_SESSION['id']));\n if(count($pre->fetchAll())>0) {\n msg('You have already voted',0);\n return false;\n }\n //Register vote\n $pre = $PDO->prepare('INSERT INTO challenges_rating SET challenge_id=:cid, user_id=:uid, direction=:direction');\n $pre->execute(array(\n ':cid' => $cid,\n ':uid' => $_SESSION['id'],\n ':direction' => (bool)$direction\n ));\n if($pre->rowCount() == 0) {\n msg('An error happend under prosessing the vote',0);\n return false;\n }\n return true;\n \n \n}",
"function obtenervalores($idevaluacion, $idusuario)\n{\n\n global $mysqli;\n $query = \"SELECT u.USU_NOMBRE ,r.preguntas_buenas,r.preguntas_malas FROM tbl_resultadoevaluaciones r inner join tbl_usuario u on (r.id_usuario=u.USU_ID) WHERE r.id_evaluacion='$idevaluacion' and r.id_usuario='$idusuario' ORDER BY r.id_resultados DESC LIMIT 1 \";\n $resultado = $mysqli->query($query);\n\n return $resultado;\n\n}",
"function cuenta_vueltas_peonetas_ayudante_1($id_ayudante_1, $rm){\t\t\n\t\t$this->db->select('vuelta as vuelta');\n\t\t$this->db->from('ingreso_produccion');\n\t\t$this->db->where('id_ayudante_1', $id_ayudante_1);\n\t\t$this->db->where('fecha_registro', $rm);\n\t\t$this->db->order_by('vuelta', 'asc');\n\t\t$query = $this->db->get();\n\t\treturn $query->result();\n\t}",
"public function getRutEmisor()\n {\n return $this->rutEmisor;\n }",
"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}",
"function voirCommandeRelaienLivraison(){\n\t$conditions = array();\n\tarray_push($conditions, array('nameChamps'=>'modeLivraison','type'=>'=','name'=>'modeLivraison','value'=>'2'));\n\tarray_push($conditions, array('nameChamps'=>'statutCommande','type'=>'=','name'=>'statutCommande','value'=>'3'));\n\t$req = new myQueryClass('commande',$conditions);\n\t$r = $req->myQuerySelect();\n\treturn $r;\n}",
"public function getSuivants2($id) {\n $db = $this->dbConnect();\n $req = $db->prepare('SELECT *,USER_PSEUDO,STATUT_POST_LIBELLE,SUM(p5_vote_score.POSTS_SCORE_YES)AS JAIME,SUM(p5_vote_score.POSTS_SCORE_NO) AS JAIMEPAS FROM p5_posts INNER JOIN p5_statut_post ON p5_statut_post_STATUT_POST_ID = p5_statut_post.STATUT_POST_ID INNER JOIN P5_votes ON p5_posts.ART_ID=p5_votes.p5_posts_ART_ID INNER JOIN p5_vote_score ON p5_vote_score.p5_votes_VOTE_ID = p5_votes.VOTE_ID INNER JOIN p5_users ON p5_users.USER_ID=p5_posts.ART_AUTEUR WHERE p5_posts.ART_PRECEDENT = ? group by ART_ID ');\n $req->execute(array($id));\n return $req;\n }",
"public function inactivarRecesoDia($idAgendaHorarioReceso){\n\t\t\n\t\t $idAgendaHorarioReceso \t\t= parent::escaparQueryBDCliente($idAgendaHorarioReceso); \t\t\n\n\n $query = \"UPDATE tb_agendaHorarioReceso SET estado = 'I'\n \t\t\t\tWHERE idAgendaHorarioReceso = '$idAgendaHorarioReceso' \";\n \n $conexion = parent::conexionCliente();\n \t\t\n if($res = $conexion->query($query)){\n \n $resultado = \"Ok\";\n }\n \n return $resultado; \n\n\t}",
"private function checkSalary() \r\n\t{\r\n\t\t$query = \"SELECT sledeca_plata \r\n\t\tFROM \" . $this->table . \" \r\n\t\tWHERE id_radnik = ?\";\r\n\r\n\t\t$stmt = $this->conn->prepare($query);\r\n\r\n\t\t$stmt->bindParam(1, $this->id_radnik);\r\n\r\n\t\t$stmt->execute();\r\n\r\n\t\t$row = $stmt->fetch(PDO::FETCH_ASSOC);\r\n\r\n\t\t$this->sledeca_plata = $row['sledeca_plata'];\r\n\r\n\t\t$today_time = new DateTime(date(\"Y/m/d\"));\r\n\t\t$expire_time = new DateTime($this->sledeca_plata);\r\n\r\n\t\tif ($today_time > $expire_time) {\r\n\t\t\t$this->id_plata = self::UNPAID;\r\n\t\t\t$update_query = \"UPDATE \" . $this->table . \" SET id_plata = ? \r\n\t\t\tWHERE id_radnik = ?\";\r\n\t\t\t$stmt_up = $this->conn->prepare($update_query);\r\n\r\n\t\t\t$stmt_up->bindParam(1,$this->id_plata);\r\n\r\n\t\t\t$stmt_up->bindParam(2,$this->id_radnik);\r\n\r\n\t\t\t\t$stmt_up->execute();\r\n\t\t} else {\r\n\t\t\t$this->id_plata = self::PAID; \r\n\t\t\t$update_query = \"UPDATE \" . $this->table . \" SET id_plata = ? \r\n\t\t\tWHERE id_radnik = ?\";\r\n\t\t\t$stmt_up = $this->conn->prepare($update_query);\r\n\r\n\t\t\t$stmt_up->bindParam(1,$this->id_plata);\r\n\r\n\t\t\t$stmt_up->bindParam(2,$this->id_radnik);\r\n\r\n\t\t\t$stmt_up->execute();\r\n\t\t}\r\n\t\treturn $this->id_plata;\r\n\t}",
"function userHasRole($id_utente, $id_ruolo) {\n if ($this->connectToMySql()) {\n $query = sprintf(\"SELECT id_ruoli_granted, id_utente, id_ruolo, ruolo FROM scuola.ruoli_granted_to_utenti\n WHERE id_utente= '%s' and id_ruolo = '%s'\", mysql_real_escape_string($id_utente, $GLOBALS['link']), mysql_real_escape_string($id_ruolo, $GLOBALS['link']));\n\n // Perform Query\n $result = mysql_query($query);\n //$array = mysql_fetch_assoc($result);\n }\n $this->closeConnection();\n return mysql_num_rows($result) == 1;\n }",
"public function testSelectWithSrid()\n {\n $tours = $this->persistToursLambert93(true);\n $this->persistGeometryParisLambert93(true);\n\n $query = $this->getEntityManager()->createQuery(\n // phpcs:disable Generic.Files.LineLength.MaxExceeded\n 'SELECT p FROM LongitudeOne\\Spatial\\Tests\\Fixtures\\PointEntity p WHERE ST_EQUALS(p.point, ST_SetSRID(ST_Point(:x, :y), :srid)) = true'\n // phpcs:enable\n );\n\n $query->setParameter('x', 525375.21);\n $query->setParameter('y', 6701871.83);\n $query->setParameter('srid', 2154);\n\n $result = $query->getResult();\n\n static::assertCount(1, $result);\n static::assertEquals($tours, $result[0]);\n }",
"public function regenerate_box($id_cierre, $id_venta) {\n \n $sql_venta = \"select * from venta where id = \".$id_venta;\n\n $result_venta = $this->connection->query($sql_venta)->result();\n\n $almacen_id = $result_venta[0]->almacen_id;\n $factura = $result_venta[0]->factura;\n $total_valor = $result_venta[0]->total_venta;\n\n // Movimiento cierre factura\n $sql_cierre = \"select * from movimientos_cierre_caja where numero = '\".$factura.\"'\";\n $result_cierre = $this->connection->query($sql_cierre)->result();\n $id_cierre_mov_anterior = $result_cierre[0]->Id_cierre;\n\n // Actualizamos el movimiento del cierre \n $this->connection->where('numero', $factura);\n $update = $this->connection->update('movimientos_cierre_caja', ['Id_cierre' => $id_cierre]);\n\n \n \n $this->connection->where('id', $id_cierre_mov_anterior);\n\n $cierre_anterior = $this->connection->get('cierres_caja')->row();\n\n if($cierre_anterior->fecha_fin_cierre != '') {\n $total_cierre_anterior = $cierre_anterior->total_cierre - $total_valor;\n $this->connection->where('id', $id_cierre_mov_anterior);\n $update = $this->connection->update('cierres_caja', ['total_cierre' => $total_cierre_anterior]);\n }\n\n // Actualizamos el nuevo cierre\n\n $this->connection->where('id', $id_cierre);\n\n $cierre_nuevo = $this->connection->get('cierres_caja')->row();\n\n $totoal_cierre_nuevo = $cierre_nuevo->total_cierre + $total_valor;\n\n $this->connection->where('id', $id_cierre);\n $update = $this->connection->update('cierres_caja', ['total_cierre' => $totoal_cierre_nuevo]);\n\n\n return true;\n\n\n\n \n\n\n\n\n }",
"function IdEvaluacion()\n {\n \t$evaluacion = Evaluacion::select('id')->where('activo',1)->first();\n return $evaluacion->id;\n }",
"public function consultarId(){\r\n\r\n\t\t\t$conexion=new conexion();\r\n\r\n\t\t\t$query =\"SELECT * FROM imgEncabezado\r\n\t\t\t\t\t\tWHERE idimg=\".$this->getIdImg().\";\";\r\n\t\t\t$resultado =pg_query($conexion->getStrcnx(),$query);\r\n\t\t\tpg_close($conexion->getStrcnx()); //cerramos la conexion a la db\r\n\t\t\t\r\n\t\t\treturn $resultado;\r\n\t\t}",
"function gesuchter_wert_sql($abfrage,$gesuchte_spalte) {\n\t$mysqli=MyDatabase();\t\n\tif ($result=$mysqli->query($abfrage)) {\n\t\twhile ($row=$result->fetch_object()) {\n\t\t\t$gesuchter_wert=$row->$gesuchte_spalte;\n\t\t}\n\t}\t\n\tif (!isset($gesuchter_wert)) {$gesuchter_wert=0;}\n\treturn $gesuchter_wert;\n}",
"public function get_my_rate($id) {\n $dql = \"SELECT r.user, u.username, count(r.sign) as cnt\n FROM AppGuestbookBundle:Rate r\n INNER JOIN AppUserBundle:User u\n WHERE u.id = r.user\n WHERE r.author = :id AND r.sign = 1\n GROUP BY r.user\n ORDER BY cnt DESC, u.username ASC\";\n\n $query = $this->getEntityManager()->createQuery($dql)\n ->setParameter(\"id\", $id);\n\n $up_for_me = $query->execute();\n\n /* down for me */\n $dql = \"SELECT r.user, u.username, count(r.sign) as cnt\n FROM AppGuestbookBundle:Rate r\n INNER JOIN AppUserBundle:User u\n WHERE u.id = r.user\n WHERE r.author = :id AND r.sign = -1\n GROUP BY r.user\n ORDER BY cnt DESC, u.username ASC\";\n\n $query = $this->getEntityManager()->createQuery($dql)\n ->setParameter(\"id\", $id);\n\n $down_for_me = $query->execute();\n\n /* my_up */\n $dql = \"SELECT r.author, u.username, count(r.sign) as cnt\n FROM AppGuestbookBundle:Rate r\n INNER JOIN AppUserBundle:User u\n WHERE u.id = r.author\n WHERE r.user = :id AND r.sign = 1\n GROUP BY r.author\n ORDER BY cnt DESC, u.username ASC\";\n\n $query = $this->getEntityManager()->createQuery($dql)\n ->setParameter(\"id\", $id);\n\n $my_up = $query->execute();\n\n /* my_down */\n $dql = \"SELECT r.author, u.username, count(r.sign) as cnt\n FROM AppGuestbookBundle:Rate r\n INNER JOIN AppUserBundle:User u\n WHERE u.id = r.author\n WHERE r.user = :id AND r.sign = -1\n GROUP BY r.author\n ORDER BY cnt DESC, u.username ASC\";\n\n $query = $this->getEntityManager()->createQuery($dql)\n ->setParameter(\"id\", $id);\n\n $my_down = $query->execute();\n\n $result = [];\n $result['up_for_me'] = $up_for_me;\n $result['down_for_me'] = $down_for_me;\n $result['my_up'] = $my_up;\n $result['my_down'] = $my_down;\n\n /* count sum */\n $up_for_me_sum = 0;\n for($i=0;$i<count($up_for_me);$i++)\n $up_for_me_sum += $up_for_me[$i]['cnt'];\n\n $down_for_me_sum = 0;\n for($i=0;$i<count($down_for_me);$i++)\n $down_for_me_sum += $down_for_me[$i]['cnt'];\n\n $my_up_sum = 0;\n for($i=0;$i<count($my_up);$i++)\n $my_up_sum += $my_up[$i]['cnt'];\n\n $my_down_sum = 0;\n for($i=0;$i<count($my_down);$i++)\n $my_down_sum += $my_down[$i]['cnt']; \n\n $result['my_up_sum'] = $my_up_sum;\n $result['my_down_sum'] = $my_down_sum;\n $result['my_all_sum'] = $my_up_sum + $my_down_sum;\n $result['up_for_me_sum'] = $up_for_me_sum;\n $result['down_for_me_sum'] = $down_for_me_sum;\n $result['for_me_all_sum'] = $up_for_me_sum - $down_for_me_sum;\n\n return $result;\n }",
"function get_by_key() {\t\n\t\t$sql = \"SELECT * \n\t\t\t\tFROM evs_database.evs_group\n\t\t\t\tWHERE gru_id=?\";\n\t\t$query = $this->db->query($sql, array($this->gru_id));\n\t\treturn $query;\n\t}",
"function getSoldeCpte($id_cpte)\n{\n global $dbHandler;\n global $global_id_agence;\n\n $db = $dbHandler->openConnection();\n\n $sql = \"SELECT solde \";\n $sql .= \"FROM ad_cpt \";\n $sql .= \"WHERE id_ag = $global_id_agence AND id_cpte = $id_cpte \";\n\n $result=$db->query($sql);\n if (DB::isError($result)) {\n $dbHandler->closeConnection(false);\n signalErreur(__FILE__,__LINE__,__FUNCTION__);\n }\n\n $row = $result->fetchrow();\n\n $solde = $row[0];\n\n $dbHandler->closeConnection(true);\n return $solde;\n}",
"public function use_obtener_sucursal_actual(){\n $sucursal_actual = $this->ci->session->userdata('sucursal');//sucursal_id sid\n $usuario = $this->ci->arixkernel->select_one_content('numero, nombre','config.sucursales', array('sucursal_id' => $sucursal_actual));\n return $usuario;\n }",
"function queryRicercaTuttiGliUtenti(){\r\n \r\n $sql = 'SELECT email_utente, nickname, utente_esperto, utente_seguito, utente_seguace, path_img_profilo, data_ora_richiesta, ' .\r\n 'richiesta_accettata, data_ora_risposta ' . \r\n 'FROM (utente NATURAL JOIN info_utente ) LEFT OUTER JOIN seguaci_seguiti ' . \r\n 'ON email_utente = utente_seguito AND utente_seguace =' . \r\n \"'\" . $_SESSION['email_utente'] . \"'\" ;\r\n \r\n return $sql;\r\n}",
"public function atualizar()\n {\n $pdo = new \\PDO(DSN, USER, PASSWD);\n //cria sql\n $sql = \"UPDATE MinisterioTemDiscipulo SET \t ministerioId= ? , funcaoId = ?\n WHERE discipuloId = ?\n \";\n\n //prepara sql\n $stm = $pdo->prepare($sql);\n //trocar valores\n $stm->bindParam(1, $this->ministerioId );\n $stm->bindParam(2, $this->funcaoId );\n $stm->bindParam(3, $this->discipuloId );\n\n $resposta = $stm->execute();\n\n $erro = $stm->errorInfo();\n //var_dump($erro);\n //exit();\n\n //fechar conexão\n $pdo = null ;\n\n return $resposta;\n\n }",
"public function atualizar()\n {\n $pdo = new \\PDO(DSN, USER, PASSWD);\n //cria sql\n $sql = \"UPDATE MinisterioTemDiscipulo SET \t ministerioId= ? , funcaoId = ?\n WHERE discipuloId = ?\n \";\n\n //prepara sql\n $stm = $pdo->prepare($sql);\n //trocar valores\n $stm->bindParam(1, $this->ministerioId );\n $stm->bindParam(2, $this->funcaoId );\n $stm->bindParam(3, $this->discipuloId );\n\n $resposta = $stm->execute();\n\n $erro = $stm->errorInfo();\n //var_dump($erro);\n //exit();\n\n //fechar conexão\n $pdo = null ;\n\n return $resposta;\n\n }"
]
| [
"0.5585895",
"0.55732524",
"0.5242187",
"0.52034634",
"0.50514495",
"0.5007284",
"0.498453",
"0.49710825",
"0.49617213",
"0.49352553",
"0.49311593",
"0.48616356",
"0.48589432",
"0.48589385",
"0.48483676",
"0.48353457",
"0.48151347",
"0.4803983",
"0.47873408",
"0.4778021",
"0.47683552",
"0.47647762",
"0.4759646",
"0.47525877",
"0.47512048",
"0.47295475",
"0.47289434",
"0.47260356",
"0.47236872",
"0.46950847",
"0.46929267",
"0.46928906",
"0.46922413",
"0.46847957",
"0.4680457",
"0.46769202",
"0.46663663",
"0.4666311",
"0.46572816",
"0.46550333",
"0.46534503",
"0.46521342",
"0.4647808",
"0.46421418",
"0.46353555",
"0.46340647",
"0.46240422",
"0.46238735",
"0.4615698",
"0.46150714",
"0.4614736",
"0.4613576",
"0.46097338",
"0.4602083",
"0.4599653",
"0.45981064",
"0.45964277",
"0.45833898",
"0.45730212",
"0.456907",
"0.45684817",
"0.45661968",
"0.45654574",
"0.45595524",
"0.454644",
"0.45407152",
"0.45404023",
"0.4540245",
"0.4540095",
"0.45366466",
"0.4535961",
"0.45346987",
"0.45181757",
"0.451531",
"0.45125845",
"0.45086047",
"0.45009628",
"0.4496567",
"0.44964272",
"0.44957244",
"0.44956255",
"0.44943452",
"0.44928157",
"0.44880137",
"0.4486995",
"0.4478092",
"0.44733906",
"0.4467837",
"0.44669062",
"0.4452738",
"0.44522816",
"0.44505128",
"0.44499293",
"0.44482848",
"0.44430807",
"0.44404298",
"0.44367847",
"0.44354838",
"0.44351903",
"0.44351903"
]
| 0.55348617 | 2 |
SLETTE EN RUTE WHERE ruteId = ? | public function DeleteRute($ruteId, $logg)
{
include (realpath(dirname(__FILE__)).'/db.php');;
$sql = "DELETE from rute WHERE ruteId=?;";
$deleteRute = $db_connection->prepare($sql);
$deleteRute->bind_param('i'
, $ruteId);
$deleteRute->execute();
$paavirkedeRader = $deleteRute->affected_rows;
//Error logging
if($deleteRute == false)
{
$logg->Ny('Mislyktes å slette data fra db: '.mysql_error($db_connection), 'ERROR', htmlspecialchars($_SERVER['PHP_SELF']), '');
}
// Lukker databasen
$deleteRute->close();
$db_connection->close();
return $paavirkedeRader;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function verifiRentsDetails($id)\n{\n\n $requete = \"SELECT idSnow FROM rentsdetails where idSnow='$id';\";\n $request = executeQuery($requete);\n\n\n return $request;\n}",
"function modificaRuta()\r\n\t{\r\n\t\t$query = \"UPDATE \" . self::TABLA . \" SET Ruta='\".$this->Ruta.\"'\tWHERE IDRuta = \".$this->IdRuta.\";\";\r\n\t\treturn parent::modificaRegistro( $query);\r\n\t}",
"public function proveriRecept($idR,$idK){\n $this->db->select(\"a.idS\");\n $this->db->from(\"alergije a, veza_sastojci_recepti vsr\");\n $this->db->where(\"a.idK\", $idK);\n $this->db->where(\"a.idS = vsr.idS\");\n $this->db->where(\"vsr.idR\", $idR);\n $query = $this->db->get();\n if ($query->num_rows() > 0) \n return false;\n else\n return true;\n }",
"public function getRute($ruteId, $logg)\n {\n include (realpath(dirname(__FILE__)).'/db.php');;\n \n $sql = \"SELECT ruteId, fraDestId, tilDestId, sesongId, navn FROM rute WHERE ruteId=?;\";\n \n $queryRute = $db_connection->prepare($sql);\n \n $queryRute->bind_param('i'\n , $ruteId);\n \n $queryRute->execute();\n \n //henter result set\n $resultSet = $queryRute->get_result();\n \n $rute = $resultSet->fetch_all();\n \n //Error logging\n if($queryRute == false){\n $logg->Ny('Mislyktes å hente fra db: '.mysql_error($db_connection), 'ERROR', htmlspecialchars($_SERVER['PHP_SELF']), ''); \n }\n \n $resultSet->free();\n $queryRute->close();\n $db_connection->close(); \n \n return $rute;\n }",
"public function AggiungiaiPreferiti($idricetta){\n $session = Sessione::getInstance();\n if($session->isLoggedUtente()){\n $utente = $session->getUtente();\n $idutente = $utente->getId();\n $pm = FPersistentManager::getInstance();\n $ric = $pm->loadById(\"ricetta\",$idricetta);\n $ric->incrementasalvataggi();\n $n = $ric->getNsalvataggi();\n $pm->update(\"ricetta\",$idricetta,'nsalvataggi',$n); //aggiornamento ricetta db\n $esito = $pm->storeUtPrefRic($idricetta, $idutente); //aggiunta di una entry\n //devo aggiornare l'oggetto utente nei dati di sessione (ha un nuovo preferito)\n $utente = $pm->loadById(\"utente\", $idutente);\n $session->setUtenteLoggato($utente);\n if($esito){\n //inserimento corretto, redirect alla pagina corrente\n $referer = $_SERVER['HTTP_REFERER']; //indirizzo che stavo visitando quando ho aggiunto ai preferiti\n $loc = substr($referer, strpos($referer, \"/myRecipes\")); //recupero parte path\n header('Location: '.$loc); //reindirizzamento al referer\n }\n else {\n $viewerr = new VErrore();\n $viewerr->mostraErrore(\"Inserimento nei preferiti non corretto\");\n\n }\n } else { //utente non loggato\n //redirect alla form di login\n\n header('Location: /myRecipes/web/Utente/Login');\n }\n\n }",
"function _JsemNaRade($posta_id, $prac = 0) {\r\n if (is_array($posta_id)) $posta_id = $posta_id[0];\r\n $pid = split(',',$posta_id);\r\n $posta_id = $pid[0];\r\n $sql = 'select * from posta_schvalovani where posta_id=' . $posta_id . ' and schvaleno=0 and stornovano is null order by id asc';\r\n $q = new DB_POSTA;\r\n $q->query($sql); \r\n $q->Next_Record();\r\n if ($q->Record['POSTUP'] == 2 || ($q->Record['POSTUP'] == 1 && $q->Record['SCHVALUJICI_ID'] == $prac)) return true;\r\n else return false; \r\n}",
"function query_rifiuta_richiesta($id_richiesta){\n\t$query_update = \"UPDATE Richieste\n\t SET esito = 'rifiutata'\n\t WHERE id = \".$id_richiesta;\n\n\t$result_update = mysql_query($query_update) or die(mysql_error());\n\n\t$rows_updated = mysql_affected_rows();\n\n\tif($rows_updated > 0 ) {\n // creo il feedback nella relativa tabella\n query_insert_feedback($id_richiesta, 'rifiutata');\n\n\t return true;\n\t}\n\n\treturn false;\n}",
"public function actionSalinity() {\r\n \t$currentTs = time();\r\n \t$request = Yii::$app->request;\r\n \t$identity = \\Yii::$app->user->getIdentity();\r\n \t$arrPond = [];\r\n \r\n \t$q = trim($request->post('q', $request->get('q', '')));\r\n \r\n \t$query = Salinity::find();\r\n \t$query->orderBy(['id'=>SORT_ASC]);\r\n \r\n \t$op = $request->post('op', $request->get('opss', ''));\r\n \tif ($op == \"search\") {\r\n \t if (!empty($_REQUEST['type'])){\r\n \t\t\t$type = $_REQUEST['type'];\r\n \t\t\tif($type != 0){\r\n \t\t\t\t$queryf = pond::find();\r\n \t\t\t\t$queryf->andWhere(['type'=> $type]);\r\n \t\t\t\t$pondf = $queryf->all();\r\n \t\t\t\tforeach ($pondf as $obj){\r\n \t\t\t\t\t$arrId[] = $obj->id;\r\n \t\t\t\t}\r\n \t\t\t\t \r\n \t\t\t\tif($arrId){\r\n \t\t\t\t\t$query->andWhere(['pondId'=> $arrId]);\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t\t \r\n \t\tif (!empty($_REQUEST['q'])){\r\n \t\t\t$item = $_REQUEST['q'];\r\n \t\t\t$query->andWhere(['LIKE' ,'title','%'.$item.'%', false]);\r\n \t\t}\r\n \t}\r\n\r\n \t\t\tif ($q)\r\n \t\t\t\t$query->andWhere(['LIKE' ,'name','%'.$q.'%', false]);\r\n \t\t\t\t\t\r\n \t\t\t\t\t\r\n \t\t\t\t//actions\r\n \t\t\t\tswitch ($request->post('op')){\r\n \t\t\t\t\tcase 'delete':\r\n \t\t\t\t\t\t$this->salinityDelete();\r\n \t\t\t\t\t\tbreak;\r\n \t\t\t\t}\r\n \t\t\t\t\t\r\n \t\t\t\t//paging\r\n \t\t\t\t$pagination = new Pagination([\r\n \t\t\t\t\t\t'defaultPageSize' => \\Yii::$app->params['ui']['defaultPageSize'],\r\n \t\t\t\t\t\t'totalCount' => $query->count(),\r\n \t\t\t\t]);\r\n \t\t\t\t$pagination->params = [\r\n \t\t\t\t\t\t'q'=>$q,\r\n \t\t\t\t\t\t'page'=>$pagination->page,\r\n \t\t\t\t];\r\n \t\t\t\t$query->offset($pagination->offset);\r\n \t\t\t\t$query->limit($pagination->limit);\r\n \t\t\t\t\t\r\n \t\t\t\t$list = $query->all();\r\n \t\t\t\t\t\r\n \t\t\t\t//get users\r\n \t\t\t\t$arrId = [];\r\n \t\t\t\t$arrUser = [];\r\n \t\t\t\t$arrPond = [];\r\n \t\t\t\tif (!empty($list)){\r\n \t\t\t\t\tforeach ($list as $obj){\r\n \t\t\t\t\t\t$arrId[] = $obj->createBy;\r\n \t\t\t\t\t}\r\n \t\t\t\t\t$modelsUser = User::find()->where(['id'=>$arrId])->all();\r\n \t\t\t\t\tif(!empty($modelsUser)){\r\n \t\t\t\t\t\tforeach ($modelsUser as $obj){\r\n \t\t\t\t\t\t\t$arrUser[$obj->id] = $obj->firstName.' '.$obj->lastName;\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t}\r\n \r\n \t\t\t\t\t$objPond = Pond::find()->orderBy(['id'=>SORT_ASC])->all();\r\n \t\t\t\t\tforeach ($objPond as $dataPond){\r\n \t\t\t\t\t\t$objTypelist = Typelist::find()->where(['id'=>$dataPond->type])->all();\r\n \t\t\t\t\t\tforeach ($objTypelist as $obj){\r\n \t\t\t\t\t\t\t$arrPond[$dataPond->id] = $obj->name.' '.$dataPond->title;\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t\r\n \t\t\t\t\t}\r\n \t\t\t\t}\r\n \r\n \t\t\t\t$query = Typelist::find();\r\n \t\t\t\t$query->orderBy(['id'=>SORT_ASC]);\r\n \t\t\t\t$objTypelist = $query->all();\r\n \t\t\t\t$arrTypelist = [];\r\n \t\t\t\tforeach ($objTypelist as $dataTypelist){\r\n \t\t\t\t\t$arrTypelist[$dataTypelist->id] = $dataTypelist->name;\r\n \t\t\t\t}\r\n \r\n \t\t\t\t\t\r\n \t\t\t\techo $this->render('salinity', [\r\n \t\t\t\t\t\t'lst' => $list,\r\n \t\t\t\t\t\t'arrTypelist'=>$arrTypelist,\r\n \t\t\t\t\t\t'arrPond' => $arrPond,\r\n \t\t\t\t\t\t'pagination' => $pagination,\r\n \t\t\t\t\t\t'arrUser' =>$arrUser,\r\n \t\t\t\t\t\t'q'=>$q,\r\n \t\t\t\t]);\r\n }",
"public function istorijaRezultata() {\n $rModel = new RezultatModel();\n $igrac = $this->session->get('igrac');\n $rezultati = $rModel->nadji_rezultateigraca($igrac['idKI']);\n $this->prikaz(\"mod_istorijarezultata\", ['rezultati' => $rezultati]);\n }",
"function filter_TR_By_S($SEDE,$TABLE_R)\n{\n global $mysqli;\n $TRES = $TABLE_R;\n $query = new Query($mysqli, \"SELECT red,nombre,apellido,CONCAT(provincia,'-',clave,'-',tomo,'-',folio)AS cedula,n_ins,sede,fac_ia,esc_ia,car_ia,ps,pca,pcg,gatb,verbal,numer,indice FROM \" .$TRES. \" where sede = ?\");\n $parametros = array('i', &$SEDE);\n $data = $query->getresults($parametros);\n\n if (isset($data[0])) {\n return $data;\n } else {\n return null;\n }\n\n}",
"public function testSelectWithSrid()\n {\n $tours = $this->persistToursLambert93(true);\n $this->persistGeometryParisLambert93(true);\n\n $query = $this->getEntityManager()->createQuery(\n // phpcs:disable Generic.Files.LineLength.MaxExceeded\n 'SELECT p FROM LongitudeOne\\Spatial\\Tests\\Fixtures\\PointEntity p WHERE ST_EQUALS(p.point, ST_SetSRID(ST_Point(:x, :y), :srid)) = true'\n // phpcs:enable\n );\n\n $query->setParameter('x', 525375.21);\n $query->setParameter('y', 6701871.83);\n $query->setParameter('srid', 2154);\n\n $result = $query->getResult();\n\n static::assertCount(1, $result);\n static::assertEquals($tours, $result[0]);\n }",
"public function actionSeguir(){\r\n $me = new MetodosExtras();\r\n \r\n $ss = new Sessao();\r\n $sm = new SeguirModel();\r\n $sm->setId($ss->devSessao('id'));\r\n $sm->setIdSeguir($_GET['usu']);\r\n \r\n $sd = new SeguirDAO();\r\n if($sd->insereSeguir($sm)):\r\n if($_GET['tp'] == 1):\r\n $me->redireciona('Artista/Perfil&usu='.$_GET['usu'].'&tp='.$_GET['tp'].'&op=um&en=sim');\r\n else:\r\n $me->redireciona('Companhia/Perfil&usu='.$_GET['usu'].'&tp='.$_GET['tp'].'&op=um&en=sim');\r\n endif;\r\n else:\r\n if($_GET['tp'] == 1):\r\n $me->redireciona('Artista/Perfil&usu='.$_GET['usu'].'&tp='.$_GET['tp'].'&op=dois');\r\n else:\r\n $me->redireciona('Companhia/Perfil&usu='.$_GET['usu'].'&tp='.$_GET['tp'].'&op=dois');\r\n endif;\r\n endif;\r\n }",
"function liste_ancienne_star(){\n\t\tglobal $bdd;\n\n\t\t$req = $bdd->prepare(\"SELECT id_utilisateur,pseudo FROM utilisateur WHERE star = TRUE AND TIME_TO_SEC(TIMEDIFF((CURRENT_TIMESTAMP),(DATE_STAR)))/60 > 10\");\n\t\t$req->execute(array(0));\n\t\t$result = $req->fetchAll();\n\t\t\n\t\t$req->closeCursor();\n\t\treturn $result;\n\t}",
"public function findById($id){\n $query = $this->db->get_where('peserta_seminar', array('id'=>$id));\n return $query;\n }",
"function fantacalcio_aggiorna_sfide($vote_round) {\n drupal_set_title(filter_xss('Risultati ' . $vote_round . 'ª giornata'));\n\n $sql = \"UPDATE {fanta_sfide} SET status = 3 WHERE status = 1\";\n $result = db_query($sql);\n \n $sql = \"DELETE FROM {fanta_sfide} WHERE (status = 2 OR status = 0)\";\n $result = db_query($sql);\n return \"Sfide aggiornate\"; \n\n}",
"function getByHeenRit($id) {\n $this->db->where('ritIdHeenrit', $id);\n $query = $this->db->get('rit');\n $rit = $query->row();\n return $rit;\n }",
"function sviRezultati() {\n\t\t$mysqli = new mysqli(\"localhost\", \"root\", \"\", \"kviz\");\n\t\t$q = 'SELECT * FROM tabela t join korisnik k on t.korisnikID = k.korisnikID order by t.brojPoena desc';\n\t\t$this ->result = $mysqli->query($q);\n\t\t$mysqli->close();\n\t}",
"function accesgroupes_trouve_id_utilisateur() {\t\t\t\t\t\r\n\t\t\t\t $login_utilisateur = $GLOBALS['auteur_session']['login'];\r\n\r\n\t\t\t\t\t$sql502 = \"SELECT id_auteur FROM spip_auteurs WHERE login = '$login_utilisateur' LIMIT 1\";\r\n\t\t\t\t\t$result502 = spip_query($sql502);\r\n\t\t\t\t\t$row502 = spip_fetch_array($result502);\r\n\t\t\t\t\t$id_utilisateur = $row502['id_auteur'];\r\n\t\t\t\t\treturn $id_utilisateur;\t\t\t\t \r\n}",
"function ancien_star(){\n\t\tglobal $bdd;\n\n\t\t$req = $bdd->prepare(\"SELECT pseudo FROM utilisateur WHERE star = TRUE AND TIME_TO_SEC(TIMEDIFF((CURRENT_TIMESTAMP),(DATE_STAR)))/60 > 10;\");\n\t\t$req->execute(array(0));\n\t\t$result = $req->fetchAll();\n\t\t\n\t\t$req->closeCursor();\n\t\treturn $result;\n\t}",
"public function dohvati_raspored($odeljenje){\n\t\t\t$this->db->where('odeljenjeId', $odeljenje);\n\t\t\t$query = $this->db->get('raspored');\n\t\t\t$result = $query->result();\n\t\t\treturn $result;\n\t\t}",
"public function obterReservasPassadas($objetor) {\n \n $dataHoje = date(\"Y-m-d\");\n $sql = \"\n SELECT \n r.idReserva,\n t.nome AS turmaNome,\n s.predio,\n s.andar,\n s.numero,\n r.data,\n r.hora\n FROM \n reservas r\n INNER JOIN\n pessoas p\n ON\n p.idPessoa = r.idPessoa\n INNER JOIN\n turmas t\n ON\n t.idTurma = r.idTurma\n INNER JOIN\n salas s\n ON\n s.idSala = r.idSala\n WHERE\n r.idPessoa = '$objetor->idPessoa' and\n r.status = '0' and\n r.data < '$dataHoje'\n \n \";\n $query = $this->query->setQuery($sql);\n return $query;\n }",
"public function getTutteRisposteSondaggio()\n {\n return $this->find()->andWhere(['sondaggi_domande_id' => $this->sondaggi_domande_id]);\n }",
"function prelasesor(){\n include(\"../include/conectar.php\"); \n $query =\"UPDATE tblsemestrepro SET asesor = '$this->asesor' WHERE tblsemestrepro.id_semestrepro = $this->semestrepy;\";\n $sql = mysqli_query($conection, $query);\n mysqli_close($conection); \n if($sql){\n\t\t\t $p =\"relacion\";\n include('../plantillas/paso.php');\n } \n else\n throw new Exception (\"Error: No es posible registrar\");\n }",
"function eliminaRuta()\r\n\t{\r\n\t\t$query = \"DELETE FROM \" . self::TABLA . \" WHERE IdRuta = \".$this->IdRuta.\";\";\r\n\t\treturn parent::eliminaRegistro( $query);\r\n\t}",
"function verificar_reserva($id_sede,$id_area,$fecha,$hora) {\n $this->db->select('id_reserva');\n $this->db->where('fecha =', $fecha);\n $this->db->where('id_sede =', $id_sede);\n $this->db->where('id_area =', $id_area);\n $this->db->where('hora =', $hora);\n $query = $this->db->get('edicion');\n return $query->row();\n }",
"public function executeCurrenttutor() {\n $connection = RaykuCommon::getDatabaseConnection();\n $currentUser = $this->getUser()->getRaykuUser();\n $userId = $currentUser->getId();\n\n // make a query to the user_expert table (which should hold current questions)\n // sort by status, lowest first, and limit to one\n $sql = \"SELECT * FROM user_expert WHERE user_id='\". mysql_real_escape_string($userId) .\"' ORDER BY exe_order LIMIT 0,1\";\n $result = mysql_query($sql);\n\n // if there is nothing else, let sami know by returning a blank object\n if (mysql_num_rows($result) === 0) {\n print \"\";\n exit;\n }\n\n // get the target tutor's id, and get their information\n $tutor_row = mysql_fetch_assoc($result);\n $tutor_id = $tutor_row['checked_id'];\n\n // get their username, firt, and last name\n $sql = \"SELECT * FROM user WHERE id='\". mysql_real_escape_string($tutor_id) .\"'\";\n $result = mysql_query($sql);\n $tutor_info = mysql_fetch_assoc($result);\n $tutor_user_name = $tutor_info['username']; \n $tutor_full_name = $tutor_info['name']; \n $tutor_pic_url = 'http://'. RaykuCommon::getCurrentHttpDomain() . \"/avatar/$tutor_id/0\";\n\n\n // get their experience and profile\n $sql = \"SELECT * FROM tutor_profile WHERE user_id='\". mysql_real_escape_string($tutor_id) .\"'\";\n $result = mysql_query($sql);\n $tutor_info = mysql_fetch_assoc($result);\n $tutor_school = $tutor_info['school']; \n $tutor_role = $tutor_info['tutor_role']; \n $tutor_study = $tutor_info['study']; \n\n\n // get an object ready to return to client end\n $return_obj = new stdClass;\n $return_obj->id = $tutor_id;\n $return_obj->user_name = $tutor_user_name;\n $return_obj->full_name = $tutor_full_name;\n $return_obj->pic_url = $tutor_pic_url;\n $return_obj->school = $tutor_school;\n $return_obj->role = $tutor_role;\n $return_obj->study = $tutor_study;\n\n // return json-encoded object\n print json_encode($return_obj);\n exit;\n }",
"public function lagre() {\n\n try\n {\n $sql_tekst = \"INSERT INTO Stikkord \";\n $sql_tekst .= \"(tekst)\";\n $sql_tekst .= \"VALUES (\";\n $sql_tekst .= \"'\".$this->hentTekst().\"'\";\n $sql_tekst .= \")\";\n $setning = self::$db->prepare($sql_tekst);\n\n\n if($setning->execute()) {\n $this->settId(self::$db->lastInsertId());\n } else\n // dersom stikkordet allerede finnes, hent id til stikkordet og bruk det\n {\n $tekst=$this->hentTekst();\n $sql_tekst = \"SELECT * FROM Stikkord WHERE tekst = :tekst\";\n\n $setning = self::$db->prepare($sql_tekst);\n $setning->bindParam(':tekst',$tekst,PDO::PARAM_STR);\n $setning->execute();\n $stikkord = $setning->fetchObject('Stikkord');\n $this->settId($stikkord->hentId());\n\n }\n\n }\n catch (Exception $e) {\n print $e->getMessage() . PHP_EOL;\n }\n\n return $setning;\n\n }",
"function retourneUtilisateur($idUtilisateur){\n\tglobal $connexion; // on définie la variables globale de connection dans la fonction\n\t\n\t$requete = $connexion->query(\"SELECT * FROM utilisateur where idUtilisateur=\".$idUtilisateur.\"\");\n\t$requete->setFetchMode(PDO::FETCH_OBJ);\n\t$enregistrement = $requete->fetch();\n\t\n\n\treturn $enregistrement; // on renvoie un objet utilisateur\n}",
"public function obrisiSmestajeKorisnika($id){\n $smestajiKorisnika = $this->where('idVlasnik',$id)->findAll();\n foreach($smestajiKorisnika as $smestaj){\n $this->obrisiSmestaj($smestaj->id);\n }\n }",
"public function action_resistorSave(){\n\t\tif ($this->validateSave()) {\n\t\t\t// 2. Zapis danych w bazie\n\t\t\ttry {\n\t\t\t\t\n\t\t\t\t//2.1 Nowy rekord\n\t\t\t\tif ($this->form->id == '') {\n\t\t\t\t\t//sprawdź liczebność rekordów - nie pozwalaj przekroczyć 20\n\t\t\t\t\t$count = getDB()->count(\"resistors\");\n\t\t\t\t\tif ($count <= 10) {\n\t\t\t\t\t\tgetDB()->insert(\"resistors\", [\n\t\t\t\t\t\t\t\"volt1\" => $this->form->volt1,\n\t\t\t\t\t\t\t\"volt2\" => $this->form->volt2,\n\t\t\t\t\t\t\t\"amps\" => $this->form->amps,\n \"resistor\" => $this->form->resis\n\t\t\t\t\t\t]);\n\t\t\t\t\t} else { //za dużo rekordów\n\t\t\t\t\t\t// Gdy za dużo rekordów to pozostań na stronie\n\t\t\t\t\t\tgetMessages()->addInfo('Ograniczenie: Zbyt dużo rekordów. Aby dodać nowy usuń wybrany wpis.');\n\t\t\t\t\t\t$this->generateView(); //pozostań na stronie edycji\n\t\t\t\t\t\texit(); //zakończ przetwarzanie, aby nie dodać wiadomości o pomyślnym zapisie danych\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tgetMessages()->addInfo('Pomyślnie zapisano rekord');\n\n\t\t\t} catch (PDOException $e){\n\t\t\t\tgetMessages()->addError('Wystąpił nieoczekiwany błąd podczas zapisu rekordu');\n\t\t\t\tif (getConf()->debug) getMessages()->addError($e->getMessage());\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t// 3b. Po zapisie przejdź na stronę listy osób (w ramach tego samego żądania http)\n\t\t\tforwardTo('resistorList');\n\n\t\t} else {\n\t\t\t// 3c. Gdy błąd walidacji to pozostań na stronie\n\t\t\t$this->generateView();\n\t\t}\t\t\n\t}",
"function confirmReception() {\r\n\r\n\t\t$this->connection = new Connection();\r\n\t\t$conn = $this->connection->openConnection();\r\n\r\n\t\t$insert = $conn->prepare(\"UPDATE `panier` SET `recu`=1 WHERE `id_internaute`=:id_internaute AND `id_nourriture`=:id_nourriture AND `datep`=:datep\");\r\n\t\ttry {\r\n\t\t\t$result = $insert->execute(array('id_internaute' => $this->getId_internaute(),'id_nourriture' => $this->getId_nourriture(),'datep' => $this->getDate()));\r\n\t\t} catch (PDOExecption $e) {\r\n\t\t\tprint \"Error!: \" . $e->getMessage() . \"</br>\";\r\n\t\t}\r\n\t\t$this->connection->closeConnection();\r\n\t}",
"public function selector_rol(){\n $sql = \"SELECT * FROM tblrol WHERE tblestado_general_est_gen_id=1\";\n $result = mysqli_query($this->conection,$sql);\n return $result;\n }",
"function jget_roshine_record($sid)\n{\n global $DB;\n return $DB->get_record('roshine', array('id' => $sid));\n}",
"public function getLesCompteRendu($id){\n\t\t$req = \"select r.rap_num as rapportnum,r.pra_num,p.pra_nom as nomprat ,r.rap_date as daterapport from rapport_visite r, praticien p where VIS_MATRICULE='$id' and r.pra_num=p.pra_num order by r.rap_date\";\n\t\t$rs = PdoGsb::$monPdo->query($req);\n\t\treturn $rs;\n\t}",
"function calculaPotenciaSimples($idSim, $paramTensao, $paramCorren, $sentido, $param){\n /*\n * $sentido = ENTRADA OU SAIDA, $param = R,S,T\n */\n\n // CRIA UM OBJETO DE DA CLASSE DE CONEXAO\n $connBase = new EficazDB;\n\n\n // Fecha a conexao\n $connBase->close();\n\n return $retorno;\n}",
"function sanalista($kieli){\n $kysely = haeYhteys()->prepare(\"SELECT sana from sana WHERE kieliID = ? ORDER BY sana\");\n if ($kysely->execute(array($kieli))){\n return $kysely;\n } else {\n return null;\n }\n }",
"function getRSO($rso_id, $db){\n\n\t$temp = $db->query(\"SELECT rso.name AS name, rso.description as description, rso_type.type as type, rso.joinable as joinable\n\t\tFROM rso, rso_type\n\t\tWHERE (rso.rid) = '\" . $rso_id . \"' \n\t\t\t&& (rso_type.rtid) = (rso.rtid)\");\n\t//echo '<pre>', var_dump($temp), '</pre>';\n\t$rso = $temp->fetch_assoc();\n\treturn $rso;\n}",
"public static function uredi($id,$ime, $priimek, $upime, $geslo, $enaslov)\n\t{\n\t\t$geslo_hash = password_hash($geslo, PASSWORD_DEFAULT);\n\t\t$db = Db::getInstance();\n\t\tmysqli_query($db, \"UPDATE oseba SET ime='$ime', priimek='$priimek', upime='$upime', geslo='$geslo_hash', enaslov='$enaslov' WHERE ID=$id\");\n\t\treturn Oseba::najdi($id);\n\t}",
"public function getTask(){\n $query = \"UPDATE \" . $this->table_name . \" \n SET \n stato = 2,\n id_fornitore = :id_fornitore\n WHERE id_ordine = :id_ordine\";\n \n\n $stmt = $this->conn->prepare($query);\n $this->id_ordine=htmlspecialchars(strip_tags($this->id_ordine));\n $this->id_fornitore=htmlspecialchars(strip_tags($this->id_fornitore));\n $stmt->bindParam(\":id_ordine\", $this->id_ordine);\n $stmt->bindParam(\":id_fornitore\", $this->id_fornitore);\n\n if($stmt->execute()){\n return true;\n }\n \n return false;\n }",
"public function estadoRS($Rs)\n {\n\t\n\t\n\t\n\t}",
"function borrar(){\r\n\t\t\t$mysqli=$this->conectarBD();\r\n\t\t\t\t$id=$_SESSION['idr'];\r\n\r\n\t\t\t$sql =\"SELECT FECHA, DNI, COD_ACT,COD_RES FROM reservact WHERE (COD_RES = '\".$id.\"')\";\r\n \t\t\t$result = $mysqli->query($sql);\r\n\r\n \t\t\tif ($result->num_rows == 1){\r\n \t$sql2 = \"UPDATE reservact SET BORRADO ='SI' WHERE COD_RES = '\".$id.\"'\";\r\n \t\t$mysqli->query($sql2);\r\n \t\treturn \"CONFIRM_DELETE_RESERVA\";\r\n \t\t}\r\n \telse{\r\n\r\n \treturn \"NOEXISTS_RESERVA\";\r\n }\r\n\r\n}",
"function getRidersFromID($ID) {\n global $db;\n\n $query = \"SELECT * FROM riders WHERE post_ID=\" . $ID; //selecting user's posts\n $statement = $db->prepare($query);\n $statement->execute();\n\n //fetchAll() --> retrieve all rows\n $results = $statement->fetchAll();\n $statement->closeCursor();\n return $results;\n}",
"function rimuovi($param) {\n if (null == $param || !is_numeric($param)) {\n $this->set_view('errore');\n $this->view->set_message('id non valido');\n $this->view->render();\n die();\n }\n $stato = new stato($this->db, $param);\n if ($stato->get_uid() != $this->user->get_id() && $this->user->get_type() < 1) {\n $this->set_view('errore');\n $this->view->set_message('non sei autorizzato');\n $this->view->render();\n die();\n }\n\n $this->user->remove_stato($param);\n $this->set_view('messaggio');\n $this->view->set_message('Stato eliminato con successo');\n $this->view->set_redirect($this->user->session->get_previous_page());\n $this->view->render();\n die();\n }",
"public function getUnCompteRendu($id){\n\t\t$req = \"select * from praticien P,rapport_visite R, visiteur V where R.RAP_NUM='$id' and P.PRA_NUM=R.PRA_NUM and r.vis_matricule = v.vis_matricule\";\n\t\t$rs = PdoGsb::$monPdo->query($req);\n\t\t$ligne = $rs->fetch();\n\t\treturn $ligne;\n\t}",
"function finalizar(){\n if (isset($_GET['id'])) {\n \n $id = $_GET['id'];\n $sql_finalizar = \"UPDATE treinamentos SET concluido = 's' WHERE id = '$id'\";\n my_query($sql_finalizar); \n }\n}",
"function salida_por_traspaso(){\n\t\t$e= new Salida();\n\t\t$e->usuario_id=$GLOBALS['usuarioid'];\n\t\t$e->empresas_id=$GLOBALS['empresaid'];\n\t\t$related = $e->from_array($_POST);\n\t\t//if($e->costo_unitario=='undefined') $e->costo_unitario=0;\n\t\t$e->espacios_fisicos_id=$GLOBALS['espacios_fisicos_id'];\n\t\t$e->costo_total=($e->cantidad * $e->costo_unitario);\n\t\t$e->cclientes_id=1;\n\t\t$e->fecha=date(\"Y-m-d H:i:s\");\n\t\tif($e->id==0)\n\t\t\tunset($e->id);\n\t\tif($e->save($related)) {\n\t\t\techo $e->id;\n\t\t} else\n\t\t\techo 0;\n\t}",
"public function TraerCiudadRiesgo(){\n $sentencia = $this->db->prepare(\"SELECT *FROM ciudad WHERE zona_riesgo=1 \" ); \n $sentencia->execute(); // ejecuta -\n $query= $sentencia->fetchAll(PDO::FETCH_OBJ); // obtiene la respuesta\n return $query;\n }",
"protected function trenutniKorisnik()\n {\n $trenutni = Korisnik::query()->gdje('id', $this->get('id'))->prvi();\n\n if (!$trenutni) {\n $this->redirect('/');\n }\n\n return $trenutni;\n }",
"public function Ricetta($id){\n $pm = FPersistentManager::getInstance();\n $ricetta = $pm->loadById(\"ricetta\",$id);\n $session = Sessione::getInstance();\n //se l'utente è loggato si verifica se preferisce questa ricetta (cuore pieno o vuoto a seconda dei casi)\n //se non è loggato sicuramente il cuore è vuoto\n if($session->isLoggedUtente()){\n $preferita = $pm->UtentePrefRic($id,$session->getUtente()->getId());\n } else {\n $preferita = false;\n }\n $commenti = $ricetta->getCommenti();\n $arrcommenti = array();\n //costruisco un array in cui ogni elemento è un array associativo con chiavi 'utente', 'commento' e 'img' profilo utente\n foreach ($commenti as $commento){\n $id = $commento->getIdUtente();\n $utente = $pm->loadById(\"utente\",$id);\n $img = $utente->getImmagine();\n $img->setData(base64_encode($img->getData()));\n $tmp = array(\n 'utente'=>$utente->getUsername(),\n 'img'=>$img,\n 'commento'=>$commento\n );\n $arrcommenti[]=$tmp;\n\n }\n\n $errore=\"\";\n if($arrcommenti==null){\n $errore=\"Non ci sono commenti per questa ricetta\";\n }\n else{\n $errore=\"\";\n }\n $view = new VDettaglio();\n $view->mostraRicetta($ricetta, $preferita, $arrcommenti, $errore);\n }",
"function verif_star($id){\n\t\tglobal $bdd;\n\n\t\t$req = $bdd->prepare(\"SELECT star FROM utilisateur WHERE id_utilisateur = :id\");\n\t\t$req->execute(array(\"id\"=>$id));\n\n\t\twhile($results = $req->fetch()){\n\t\t\t$result = $results[\"star\"];\n\t\t}\n\n\t\treturn $result;\n\t}",
"public function SalasPorId()\n{\n\tself::SetNames();\n\t$sql = \" select salas.codsala, salas.nombresala, salas.salacreada, mesas.codmesa, mesas.nombremesa, mesas.mesacreada, mesas.statusmesa FROM salas LEFT JOIN mesas ON salas.codsala = mesas.codsala where salas.codsala = ? \";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->execute( array(base64_decode($_GET[\"codsala\"])) );\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 static function findById2($id=NULL)\n {\n $request=\"\";\n\n //Si On ne saisit pas l'id, on retourne toute la liste\n if ($id==NULL){\n $request=\"SELECT transTermi.idTerminal, termi.macAdress, transTermi.statut, transTermi.login, transTermi.password, transpo.RaisonSociale, transpo.idTransporteur FROM Entrepriseterminal as transTermi INNER JOIN terminals as termi on transTermi.idTerminal = termi.idTerminal INNER JOIN transporteurs as transpo on transpo.idTransporteur = transTermi.idEntreprise\";\n }\n else\n $request=\"SELECT transTermi.idTerminal, termi.macAdress, transTermi.statut, transTermi.login, transTermi.password, transpo.RaisonSociale, transpo.idTransporteur FROM Entrepriseterminal as transTermi INNER JOIN terminals as termi on transTermi.idTerminal = termi.idTerminal INNER JOIN transporteurs as transpo on transpo.idTransporteur = transTermi.idEntreprise WHERE login = :x\";\n\n $termTab= Array();\n\n $db = Database::getInstance();\n\n\n try{\n\n //On s'assure que la connexion n'est pas null\n if (is_null($db)){\n throw new PDOException(\"Impossible d'effectuer une requette de recherche verifier la connexion\");\n }\n //Preparation de la requette SQL pour l'execution(Tableau)\n $pstmt = $db->prepare($request);\n\n $pstmt->execute(array(':x' => $id));\n\n //Parcours de notre pstm tant qu'il y des données\n while ($result = $pstmt->fetch(PDO::FETCH_OBJ)){\n\n\n //Creation d'un terminal\n $terminal = new TerminalEntreprise();\n\n //Transfere des information d'objet vers un tableau\n $terminal->loadFromObjet($result);\n\n\n\n //On insere chaque objet a la fin du tableau $termTab\n array_push($termTab,$terminal);\n }\n\n $pstmt->closeCursor();\n $pstmt= NULL;\n\n\n }\n catch (PDOException $ex){\n ?>\n <!-- Affichage du message d'erreur au console terminal-->\n <script>console.log(\"Error createDAO: <?= $ex->getMessage()?>\")</script>\n <?php\n }\n return $termTab;\n\n\n\n\n }",
"public function pesquisarInfra($objetor) {\n \n $dataHoje = date(\"Y-m-d\");\n $sql = \"\n SELECT \n r.idReserva,\n t.nome AS turmaNome,\n s.predio,\n s.andar,\n s.numero,\n r.data,\n r.hora\n FROM \n reservas r\n INNER JOIN\n pessoas p\n ON\n p.idPessoa = r.idPessoa\n INNER JOIN\n turmas t\n ON\n t.idTurma = r.idTurma\n INNER JOIN\n salas s\n ON\n s.idSala = r.idSala\n WHERE\n r.idPessoa = '$objetor->idPessoa' and\n r.status = '0' and\n r.data < '$dataHoje'\n \n \";\n $query = $this->query->setQuery($sql);\n return $query;\n }",
"function fantacalcio_get_titolari_riserve_fisse($pl_votes, $competition_round, $c_id) {\n $sql = \"SELECT * FROM {fanta_lineups} f, {fanta_players} p \" .\n \"WHERE p.pl_id = f.pl_id \" .\n \"AND f.has_played = 0 \" .\n \"AND f.position = 1 \" .\n \"AND f.round = '%d' \" .\n \"AND f.c_id = '%d'\";\n $result = db_query($sql, $competition_round, $c_id);\n while ($row = db_fetch_array($result)) {\n\n $role = $row['role'];\n $t_id = $row['t_id'];\n \n #1a riserva dello stesso ruolo\n $sqla = \"SELECT * FROM {fanta_lineups} f, {fanta_players} p \" .\n \"WHERE p.pl_id = f.pl_id \" .\n \"AND f.position = 2 \" .\n \"AND f.has_played = 0 \" .\n \"AND p.role = '%d' \" .\n \"AND f.round = '%d' \" .\n \"AND f.c_id = '%d' \" .\n \"AND f.t_id = '%d' \";\n $resulta = db_query($sqla, $role, $competition_round, $c_id, $t_id);\n\n if (db_affected_rows($resulta) > 0) {\n\n while ($rowa = db_fetch_array($resulta)) {\n $pl_id = $rowa['pl_id'];\n \n #se con il voto entra la prima riserva\n if (in_array($pl_id, $pl_votes)) {\n $sqlb = \"UPDATE {fanta_lineups} set has_played = 1 \" .\n \"WHERE pl_id = '%d' \" .\n \"AND t_id = '%d' \" .\n \"AND c_id = '%d' \" .\n \"AND round = '%d'\";\n $resultb = db_query($sqlb, $pl_id, $t_id, $c_id, $competition_round);\n }\n #se senza voto cerco la seconda riserva\n else {\n $sqlb = \"SELECT * FROM {fanta_lineups} f, {fanta_players} p \" .\n \"WHERE p.pl_id = f.pl_id \" .\n \"AND f.position = 3 \" .\n \"AND f.has_played = 0 \" .\n \"AND p.role = '%d' \" .\n \"AND f.round = '%d' \" .\n \"AND f.c_id = '%d' \" .\n \"AND f.t_id = '%d' \";\n $resultb = db_query($sqlb, $role, $competition_round, $c_id, $t_id);\n while ($rowb = db_fetch_array($resultb)) {\n $pl_id = $rowb['pl_id'];\n if (in_array($pl_id, $pl_votes)) {\n $sqlc = \"UPDATE {fanta_lineups} set has_played = 1 \" .\n \"WHERE pl_id = '%d' \" .\n \"AND t_id = '%d' \" .\n \"AND c_id = '%d' \" .\n \"AND round = '%d'\";\n $resultc = db_query($sqlc, $pl_id, $t_id, $c_id, $competition_round);\n }\n }\n }\n }\n }\n\n #nessuna prima riserva ancora non entrata\n else {\n $sqlb = \"SELECT * FROM {fanta_lineups} f, {fanta_players} p \" .\n \"WHERE p.pl_id = f.pl_id \" .\n \"AND f.position = 3 \" .\n \"AND f.has_played = 0 \" .\n \"AND p.role = '%d' \" .\n \"AND f.round = '%d' \" .\n \"AND f.c_id = '%d' \" .\n \"AND f.t_id = '%d' \";\n $resultb = db_query($sqlb, $role, $competition_round, $c_id, $t_id);\n while ($rowb = db_fetch_array($resultb)) {\n $pl_id = $rowb['pl_id'];\n if (in_array($pl_id, $pl_votes)) {\n $sqlc = \"UPDATE {fanta_lineups} set has_played = 1 \" .\n \"WHERE pl_id = '%d' \" .\n \"AND t_id = '%d' \" .\n \"AND c_id = '%d' \" .\n \"AND round = '%d'\";\n $resultc = db_query($sqlc, $pl_id, $t_id, $c_id, $competition_round);\n }\n }\n }\n\n }\n}",
"function establecer_m2_reservas() {\n// inner join lote on (res_lot_id=lot_id)\n// inner join zona on (lot_zon_id=zon_id)\n// where res_promotor like 'NET%'\");\n// $reservas = FUNCIONES::lista_bd_sql(\"select res_id,zon_precio from reserva_terreno\n// inner join lote on (res_lot_id=lot_id)\n// inner join zona on (lot_zon_id=zon_id)\n// where res_multinivel = 'si' and res_monto_m2=0\");\n\n\n\n $reservas = FUNCIONES::lista_bd_sql(\"select res_id,zon_precio from reserva_terreno\n\n inner join lote on (res_lot_id=lot_id)\n\n inner join zona on (lot_zon_id=zon_id)\n\n where res_monto_m2=0 and res_estado in ('Pendiente','Habilitado')\");\n\n\n\n $conec = new ADO();\n\n foreach ($reservas as $res) {\n\n $conec->ejecutar(\"update reserva_terreno set res_monto_m2=$res->zon_precio where res_id=$res->res_id\");\n }\n}",
"function gesuchter_wert($id,$tabelle,$gesuchte_spalte) {\n\t$mysqli=MyDatabase();\n\t\tif ($id!=0) {\n\t\t\t$abfrage=\"SELECT `$gesuchte_spalte` FROM `$tabelle` WHERE `ID`=$id\";\n\t\t\t#echo \"Funktion gesuchter_wert bildet SQL-Befehl - \".$abfrage;\n\t\t\tif ($result=$mysqli->query($abfrage)) {\n\t\t\t\twhile ($row=$result->fetch_object()) {\n\t\t\t\t\t$gesuchter_wert=$row->$gesuchte_spalte;\n\t\t\t\t}\n\t\t\t}\t\t\n\t\t}\n\t\telse {\n\t\t\t$gesuchter_wert=\"N.N.\";\n\t\t}\n\tif (!isset($gesuchter_wert)) {$gesuchter_wert=0;}\n\treturn $gesuchter_wert;\n}",
"function newsItem_PilihanTampil( $tbl_news, $statustampil, $id ){\n\t\t$sql = mysql_query(\"\n\t\t\tUPDATE $tbl_news SET\n\t\t\t\tpilihan = '$statustampil' \n\t\t\tWHERE\n\t\t\tid = '$id'\n\t\t\");\n\t\treturn $sql;\n\t}",
"function solo_positivi() {\r\n $query = \"SELECT s.NomeStudente AS nome, s.CognomeStudente AS cognome FROM Studente s WHERE s.id_studente NOT IN (SELECT st.id_studente FROM Sudente st INNER JOIN Voto v ON st.id_studente = v.id_studente WHERE v.Voto < 6 GROUP BY id_studente\");\r\n $risultato = $conn -> query($query);\r\n\r\n return $risultato;\r\n }",
"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 ajoutRue(int $rue)\n {\n // On effectue une recherche de tous les immeubles contenus\n $query = Core::query('building-by-street');\n $query->bindValue(':street', $rue, PDO::PARAM_INT);\n $query->execute();\n\n // S'il y a des immeubles\n if ($query->rowCount()) {\n // On récupère la liste des identifiants\n $immeubles = $query->fetchAll(PDO::FETCH_NUM);\n\n // Si la mission est un porte à porte,\n // on cherche les électeurs concernés\n if ($this->_data['mission_type'] == 'porte') {\n // Pour chaque immeuble, on recherche tous les électeurs\n foreach ($immeubles as $immeuble) {\n $query = Core::query('people-by-building');\n $query->bindValue(':building', $immeuble[0], PDO::PARAM_INT);\n $query->execute();\n $contacts = $query->fetchAll(PDO::FETCH_NUM);\n\n // Pour chaque électeur, on créé une porte à frapper\n foreach ($contacts as $contact) {\n $query = Core::query('item-new');\n $query->bindParam(\n ':mission',\n $this->_data['mission_id'],\n PDO::PARAM_INT\n );\n $query->bindParam(':rue', $rue, PDO::PARAM_INT);\n $query->bindParam(':immeuble', $immeuble[0], PDO::PARAM_INT);\n $query->bindParam(':contact', $contact[0], PDO::PARAM_INT);\n $query->execute();\n }\n }\n } else {\n foreach ($immeubles as $immeuble) {\n $query = Core::query('item-boitage-new');\n $query->bindParam(\n ':mission', \n $this->_data['mission_id'], \n PDO::PARAM_INT\n );\n $query->bindParam(':rue', $rue, PDO::PARAM_INT);\n $query->bindParam(':immeuble', $immeuble[0], PDO::PARAM_INT);\n $query->execute();\n }\n }\n } else {\n return false;\n }\n }",
"function getEspecialRendimientoPonderado(){\n \t\tglobal $mdb2;\n \t\tglobal $log;\n \t\tglobal $current_usuario_id;\n \t\tglobal $usr;\n\n\t\t//TRAE LAS PONDERACIONES DEL OBJETIVO ESPECIAL\n \t\t$ponderacion_hora = $this->extra['ponderaciones'];\n\n\t\t//DATO PARA LA CONSULTA SQL, LISTA LAS HORAS DEL DÍA\n\t\t//SI ES 0 TRAE LAS 24 HORAS\n\t\t$ponderacion = $usr->getPonderacion();\n\n\t\tif ($ponderacion == null) {\n\t\t\t$ponderacion_id = 0;\n\t\t}\n\t\telse {\n\t\t\t$ponderacion_id = $ponderacion->ponderacion_id;\n\t\t}\n\n \t\t$sql = \"SELECT * FROM reporte.rendimiento_resumen_global_ponderado(\".\n \t\t\t\tpg_escape_string($current_usuario_id).\", \".\n \t\t\t\tpg_escape_string($this->objetivo_id).\", \".\n \t\t\t\tpg_escape_string($ponderacion_id).\",' \".\n \t\t\t\tpg_escape_string($this->timestamp->getInicioPeriodo()).\"', '\".\n \t\t\t\tpg_escape_string($this->timestamp->getTerminoPeriodo()).\"')\";\n\n\t\t//echo '<1>'.$sql.'<br>';\n\n \t\t$res =& $mdb2->query($sql);\n \t\tif (MDB2::isError($res)) {\n \t\t\t$log->setError($sql, $res->userinfo);\n \t\t\texit();\n \t\t}\n\n \t\tif($row = $res->fetchRow()){\n \t\t\t$dom = new DomDocument();\n \t\t\t$dom->preserveWhiteSpace = FALSE;\n \t\t\t$dom->loadXML($row['rendimiento_resumen_global_ponderado']);\n \t\t\t$xpath = new DOMXpath($dom);\n \t\t\tunset($row[\"rendimiento_resumen_global_ponderado\"]);\n \t\t}\n\n \t\t$conf_objetivo= $xpath->query(\"/atentus/resultados/propiedades/objetivos/objetivo\")->item(0);\n \t\t$conf_pasos = $xpath->query(\"paso[@visible=1]\", $conf_objetivo);\n \t\t$conf_ponderaciones = $xpath->query(\"/atentus/resultados/propiedades/ponderaciones/item\");\n\t\t$conf_min_max = $xpath->query(\"/atentus/resultados/propiedades/eventos/evento\");\n\n\t\t//SE MUESTRA TEMPLATE SIN DATOS\n \t\tif ($xpath->query(\"//detalles/detalle/detalles/detalle\")->length == 0) {\n \t\t\t$this->resultado = $this->__generarContenedorSinDatos();\n \t\t\treturn;\n \t\t}\n\n\t\t//VALIDA QUE NO HAYA MAS DEL 100% DE PONDERACIONES\n\t\tforeach ($ponderacion_hora as $value) {\n\t\t\t$suma_pond += $value->valor_ponderacion;\n\t\t}\n\n\t\tif (number_format($suma_pond, 2) > 100) {\n\t\t\t$this->resultado = 'EL TOTAL DE LAS PONDERACIONES DEBE SER IGUAL A 100%.<br>ES SUPERIROR AL 100%.';\n\t\t\treturn;\n\t\t}elseif (number_format($suma_pond, 2) < 100) {\n\t\t\t$this->resultado = 'EL TOTAL DE LAS PONDERACIONES DEBE SER IGUAL A 100%.<br>ES MENOR AL 100%.';\n\t\t\treturn;\n \t\t}\n\n\t\t//TEMPLATE DEL REPORTE\n \t\t$T =& new Template_PHPLIB(($this->extra[\"imprimir\"])?REP_PATH_PRINTTEMPLATES:REP_PATH_TABLETEMPLATES);\n\t\t$T->setFile('tpl_tabla', 'especial_rendimiento_ponderado.tpl');\n\t\t$T->setBlock('tpl_tabla', 'LISTA_PASOS_TITULO', 'lista_pasos_titulo');\n\t\t$T->setBlock('tpl_tabla', 'LISTA_ITEMS', 'lista_items');\n\t\t$T->setBlock('tpl_tabla', 'BLOQUE_EVENTOS_TITULOS', 'bloque_eventos_titulos');\n\t\t$T->setBlock('tpl_tabla', 'BLOQUE_EVENTOS_TOTAL', 'bloque_eventos_total');\n\t\t$T->setBlock('tpl_tabla', 'LISTA_PASOS', 'lista_pasos');\n\n\n\t\t$T->setVar('__paso_id_default', $conf_pasos->item(0)->getAttribute('paso_orden'));\n \t\t$T->setVar('__item_orden', $this->extra[\"item_orden\"]);\n\t\t$orden = 1;\n\t\tforeach ($conf_pasos as $conf_paso) {\n\t\t\t$T->setVar('__paso_id', $conf_paso->getAttribute('paso_orden'));\n\t\t\t$T->setVar('__paso_nombre', $conf_paso->getAttribute('nombre'));\n\t\t\t$T->setVar('__paso_orden', $orden);\n\n\t\t\t$total_min_ponderado = 0;\n\t\t\t$total_max_ponderado = 0;\n\t\t\t$total_prom_ponderado = 0;\n\n\t\t\t$T->setVar('lista_items', '');\n\t\t\tforeach ($conf_ponderaciones as $conf_ponderacion) {\n\t\t\t\t$valor=$ponderacion_hora[$conf_ponderacion->getAttribute('inicio')];\n\t\t\t\tif ($valor->valor_ponderacion == 0) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t$tag_dato = $xpath->query(\"//detalles/detalle/detalles/detalle[@item_id=\".$conf_ponderacion->getAttribute(\"item_id\").\"]/detalles/detalle[@paso_orden=\".$conf_paso->getAttribute(\"paso_orden\").\"]/datos/dato\")->item(0);\n\n \t\t\t\t$T->setVar('__print_class', ($linea % 2 == 0)?\"celdaIteracion2\":\"celdaIteracion1\");\n \t\t\t\t$T->setVar('__class', ($linea % 2 == 0)?\"celdanegra15\":\"celdanegra10\");\n\t\t\t\t$T->setVar('__item_inicio', $conf_ponderacion->getAttribute('inicio'));\n\t\t\t\t$T->setVar('__item_termino', $conf_ponderacion->getAttribute('termino'));\n\n\t\t\t\t$T->setVar('__paso_minimo', ($tag_dato == null)?'S/I':number_format($tag_dato->getAttribute('tiempo_min'), 2, ',', ''));\n\t\t\t\t$T->setVar('__paso_maximo', ($tag_dato == null)?'S/I':number_format($tag_dato->getAttribute('tiempo_max'), 2, ',', ''));\n\t\t\t\t$T->setVar('__paso_promedio', ($tag_dato == null)?'S/I':number_format($tag_dato->getAttribute('tiempo_prom'), 2, ',', ''));\n\n\t\t\t\tif ($tag_dato == null) {\n\t\t\t\t\t$tiempo_minimo = 0;\n\t\t\t\t\t$tiempo_maximo = 0;\n\t\t\t\t\t$tiempo_promedio = 0;\n\t\t\t\t}else{\n\t\t\t\t\t$tiempo_minimo = $tag_dato->getAttribute('tiempo_min');\n\t\t\t\t\t$tiempo_maximo = $tag_dato->getAttribute('tiempo_max');\n\t\t\t\t\t$tiempo_promedio = $tag_dato->getAttribute('tiempo_prom');\n\t\t\t\t}\n\n\t\t\t\t//SE CALCULA EL PONDERADO\n\t\t\t\t$total_min_ponderado = (($valor->valor_ponderacion/100) * $tiempo_minimo) + $total_min_ponderado;\n\t\t\t\t$total_max_ponderado = (($valor->valor_ponderacion/100) * $tiempo_maximo) + $total_max_ponderado;\n\t\t\t\t$total_prom_ponderado = (($valor->valor_ponderacion/100) * $tiempo_promedio) + $total_prom_ponderado;\n\n\t\t\t\t//SE ASIGNA VALOR DE LA PONDERACIÓN\n \t\t\t$T->setVar('__item_valor', number_format($valor->valor_ponderacion, 2, '.', ''));\n\n\t\t\t\t$T->parse('lista_items', 'LISTA_ITEMS', true);\n \t\t\t\t$linea++;\n \t\t\t}\n\n\t\t\t$T->setVar('__min_total', number_format($total_min_ponderado, 2, ',', ''));\n\t\t\t$T->setVar('__max_total', number_format($total_max_ponderado, 2, ',', ''));\n\t\t\t$T->setVar('__prom_total', number_format($total_prom_ponderado, 2, ',', ''));\n\n\t\t\t$T->parse('lista_pasos', 'LISTA_PASOS', true);\n \t\t\t$orden++;\n \t\t}\n\n \t\t$this->tiempo_expiracion = (strtotime($xpath->query(\"//fecha_expiracion\")->item(0)->nodeValue) - strtotime($xpath->query(\"//fecha\")->item(0)->nodeValue));\n \t\t$this->resultado =$T->parse('out', 'tpl_tabla');\n \t}",
"public function selektujeObjekat($idObjekta)\n {\n $upit = \"select Tpleme.naziv AS plemeNaziv, Toznaka.*, Toznaka.tekstNatpisa AS natpis, TprovincijaNalaska.naziv AS provincijaNalaska , TgradNalaska.naziv AS gradNalaska, Mesto.naziv AS mestoNalaska , TmodernoImeDrzave.naziv AS modernoImeDrzave , vrstaNatpisa.naziv AS vrstaNatpisa , jezik.naziv AS jezik , Ustanova.naziv AS ustanova, TmodernoMesto.naziv AS modernoMesto FROM (select * from Objekat) Toznaka JOIN (select * from Provincija) TprovincijaNalaska ON Toznaka.provincija = TprovincijaNalaska.id JOIN (select * from Grad) TgradNalaska ON Toznaka.grad = TgradNalaska.id JOIN (select * from ModernaDrzava) TmodernoImeDrzave ON Toznaka.modernaDrzava = TmodernoImeDrzave.id JOIN (select * from ModernoMesto) TmodernoMesto ON Toznaka.modernoMesto = TmodernoMesto.id JOIN (select * from Pleme) Tpleme ON Toznaka.pleme = Tpleme.id LEFT JOIN Mesto ON Toznaka.mesto = Mesto.id LEFT JOIN vrstaNatpisa ON Toznaka.vrstaNatpisa = vrstaNatpisa.id LEFT JOIN jezik ON Toznaka.jezik = jezik.id LEFT JOIN ustanova on Toznaka.ustanova = Ustanova.id where Toznaka.id = :idObjekta \";\n\n $stmt=konekcija::getConnectionInstance()->prepare($upit);\n $stmt->bindParam(':idObjekta', $idObjekta , PDO::PARAM_INT);\n $stmt->execute();\n $stmt->setFetchMode(PDO::FETCH_ASSOC);\n $d = $stmt->fetch();\n return $this->obradiVrstaId($d);\n }",
"public function dohvatiJeloId($id) {\n $this->db->select(\"idR,naziv,sadrzaj,obrok,kategorija,spec_prilika,slika\");\n $this->db->from(\"recepti\");\n $this->db->where(\"idR\", $id);\n $query = $this->db->get();\n return $query->result();\n }",
"function colorearHijosU(&$id, &$pais){\n global $conn;\n $sql_colorear1 = \"SELECT * FROM pariente WHERE padre_id =\" . $id;\n\t$hijos = $conn->query($sql_colorear1);\n \n $sql_colorear = \"UPDATE `pariente` SET \n `radicado_id`=\" . $pais .\" \n WHERE padre_id=\" . $id;\n $res = $conn->query($sql_colorear);\n while( $persona = mysqli_fetch_assoc( $hijos)){\n colorearHijosU($persona[\"id\"],$pais);\n }\n}",
"function setDateForRapport($idsRoy){\n \t\t\n //récupère les royalty pour les livres sélectionnés\n $sql = \"SELECT \n COUNT(DISTINCT r.id_royalty) nbRoy\n ,SUM(v.montant_livre) rMtVente, SUM(v.nombre) unit, v.type typeVente\n ,SUM(r.montant_livre) rMtRoy\n ,MIN(r.taxe_taux) taux, MIN(r.taxe_deduction) deduction, MIN(r.pourcentage) pc\n ,l.id_livre, l.titre_en, l.titre_fr, l.titre_es\n ,c.type typeContrat\n ,com.id_comite, com.titre_fr, com.titre_en, com.titre_es\n FROM iste_royalty r \n INNER JOIN iste_vente v ON v.id_vente = r.id_vente\n INNER JOIN iste_isbn i ON i.id_isbn = v.id_isbn\n INNER JOIN iste_livre l ON l.id_livre = i.id_livre\n INNER JOIN iste_comitexlivre cl ON cl.id_livre = l.id_livre\n INNER JOIN iste_auteurxcontrat ac ON ac.id_auteurxcontrat = r.id_auteurxcontrat AND ac.id_comite = cl.id_comite\n INNER JOIN iste_comite com ON c.id_comite = ac.id_comite\n INNER JOIN iste_contrat c ON c.id_contrat = ac.id_contrat\n WHERE r.id_royalty IN (\".$idsRoy.\")\n GROUP BY com.id_comite\";\n //echo $sql;\n $stmt = $this->_db->query($sql);\n \n return $stmt->fetchAll(); \n \n }",
"function consultarListadoPesadasRecolector($idOferta, $cedula)\n{\n\t$sql = \"SELECT pesadas.fecha, pesadas.kilos, ofertas.valorpago as valorkilo, (pesadas.kilos \t* ofertas.valorpago ) as valorpesada \n\t\t\tFROM pesadas JOIN ofertas ON pesadas.idoferta = ofertas.id \n\t\t\tWHERE pesadas.idoferta = {$idOferta} AND pesadas.idrecolector = (SELECT usuarios.id FROM usuarios WHERE usuarios.cedula = '{$cedula}')\";\n\tleerRegistro($sql);\n}",
"public function recherche( $s)\n\t{\n\t $cnx=new database();\n\t\t$req = $cnx->_db->prepare('SELECT * FROM joueurs WHERE id_joueur = ?');\n\t\t$req->execute(array($s));\t\n\t\t// $rf=$req_r->fetch(); \n\t\treturn \t$req;\n\t}",
"public function obterReservasAtuais($objetor) {\n \n $dataHoje = date(\"Y-m-d\");\n $sql = \"\n SELECT \n r.idReserva,\n t.nome AS turmaNome,\n s.predio,\n s.andar,\n s.numero,\n r.data,\n r.hora\n FROM \n reservas r\n INNER JOIN\n pessoas p\n ON\n p.idPessoa = r.idPessoa\n INNER JOIN\n turmas t\n ON\n t.idTurma = r.idTurma\n INNER JOIN\n salas s\n ON\n s.idSala = r.idSala\n WHERE\n r.idPessoa = '$objetor->idPessoa' and\n r.status = '0' and\n r.data >= '$dataHoje'\n \n \";\n $query = $this->query->setQuery($sql);\n return $query;\n }",
"public function findById($searchedIdParticipant) {\r\r\n\r\r\n $result = NULL;\r\r\n $query = \"SELECT * FROM participant WHERE id_participant = ?\";\r\r\n\r\r\n try {\r\r\n $this->pdo->beginTransaction(); // Start transaction\r\r\n $qresult = $this->pdo->prepare($query); \r\r\n $qresult->execute(array($searchedIdParticipant));\r\r\n $this->pdo->commit(); // If all goes well the transaction is validated\r\r\n\r\r\n if( $row = $qresult->fetch() ) {\r\r\n list ( $idParticipant, $civility, $surname, $name, $email, $dateDeletion ) = $row; // Like that $idParticipant = $row['id_participant'] etc.\r\r\n $newParticipant = new Participant($civility, $surname, $name, $email, $dateDeletion, $idParticipant);\r\r\n $result = $newParticipant;\r\r\n }\r\r\n\r\r\n // $this->pdo = NULL;\r\r\n return $result;\r\r\n }\r\r\n catch(Exception $e) // In case of error\r\r\n {\r\r\n // The transaction is cancelled\r\r\n $this->pdo->rollback();\r\r\n\r\r\n // An error message is displayed\r\r\n print 'Tout ne s\\'est pas bien passé, voir les erreurs ci-dessous<br />';\r\r\n print 'Erreur : '.$e->getMessage().'<br />';\r\r\n print 'N° : '.$e->getCode();\r\r\n\r\r\n // Execution of the code is stopped\r\r\n die();\r\r\n }\r\r\n }",
"function inscribirEstudiante($estudiante_id,$semestre_id,$dicta_id) {\n //Creamos la evaluacion\n leerClase('Evaluacion');\n $evaluacion = new Evaluacion();\n $evaluacion->estado = Objectbase::STATUS_AC;\n $evaluacion->save();\n \n $this->semestre_id = $semestre_id;\n $this->dicta_id = $dicta_id;\n $this->estudiante_id = $estudiante_id;\n $this->evaluacion_id = $evaluacion->id;\n $this->estado = Objectbase::STATUS_AC;\n $this->save();\n }",
"public function updateSQL() {\n $query = \"UPDATE TempRota SET e_id = %s WHERE shift_name = '%s' AND rdate = '%s'\";\n $q = \"\";\n if ($this->eid == \"-1\")\n $q = sprintf($query, \"NULL\", $this->shift_name, $this->rdate);\n else {\n $q = sprintf($query, $this->eid, $this->shift_name, $this->rdate);\n\n $quick_query = \"UPDATE Employees \"\n .\"SET fair_hours = fair_hours + (SELECT TIME_TO_SEC(TIMEDIFF(end_time, start_time))/3600 FROM ShiftType WHERE shift_name = '%s') \" \n .\"WHERE e_id = %s\";\n QFunc::getQuery(sprintf($quick_query, $this->shift_name, $this->eid));\n }\n QFunc::getQuery($q);\n }",
"public function selecao($Par=null){\r\n if($Par==null){ \r\n $Crud=$this->conecta()->prapare(\"Select DISTINCT * from Agenda\");\r\n }else{\r\n $Crud=$this->conecta()->prapare(\"Select DISTINCT * from Agenda\");\r\n }\r\n }",
"function tous_util($id_pseudo){\n\t\tglobal $bdd;\n\t\t\n\t\t$req = $bdd->query(\"SELECT * FROM utilisateur WHERE id_utilisateur != $id_pseudo AND status_utilisateur = 0\");\n\t\t\n\t\treturn $req;\n\t\t\n\t\t//$req->closeCursor;\n\t}",
"function insert_rso($s_id, $u_id, $name){\n\t$query = \"insert into rso (s_id, u_id, name) values (\". $s_id . \",\" . $u_id . \",'\" . $name . \"')\";\n\t$result = @mysql_query($query);\n\tif (!$result) die (\"Database access failed: \" . mysql_error());\n}",
"public function tampilRiwayat($id)\n\t{\n\t\treturn $this->db->query(\"SELECT * FROM `pembayaran` p INNER JOIN sewa s ON p.id_sewa=s.id_sewa INNER JOIN wajib_pajak wp ON s.id_wp=wp.id_wp INNER JOIN daftar_sewa_reklame dsr ON s.id_daftar_sewa=dsr.id_daftar_sewa WHERE s.id_wp = '$id'\");\n\t}",
"public function getUserStatut($id)\n {\n $query = $this->_em->createQuery('SELECT st FROM SLPlateformBundle:Statut st JOIN st.ecolespersonnes ep JOIN ep.personne p where p.id=:id');\n $query->setParameter('id', $id);\n $results = $query->getSingleResult();\n return $results;\n }",
"function selectSessionId($con,$user){\n\n $idUsuario = \"--\";\n\n $sql = \"SELECT id FROM clientes WHERE nick_user = ? LIMIT 1\";\n\n $valor = $user;\n\n $consulta = $con->prepare($sql);\n\n $consulta->bind_param(\"s\",$valor);\n\n $consulta->execute();\n\n $consulta->bind_result($user);\n\n while($consulta->fetch()){\n\n $idUsuario = $user;\n }\n\n return $idUsuario;\n}",
"public function stronyAction() {\n\t\t\t$db = Zend_Registry::get('db');\n\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->strony = $db->fetchAll($db->select()->from('inwestycje_strony')->where('id_inwest =?', $id)->order('sort ASC'));\n\t\t}",
"function updateMeGustaId($id, $id_usuario, $valor_megusta) {\n $c = new Conexion();\n $resultado = $c->query(\"UPDATE valoracion_mg val_mg, usuario usu SET val_mg.megusta = $valor_megusta where val_mg.id_usuario=usu.id && val_mg.id_contenido=$id && val_mg.id_usuario=$id_usuario\");\n}",
"function read_roster($roundid) {\n global $db;\n $roster = array();\n $stmt = $db->prepare('SELECT rosterid, Roster.racerid FROM Roster'\n .' INNER JOIN RegistrationInfo'\n .' ON Roster.racerid = RegistrationInfo.racerid'\n .' WHERE roundid = :roundid'\n .' AND passedinspection = 1'\n .' ORDER BY rosterid');\n $stmt->execute(array(':roundid' => $roundid));\n foreach ($stmt as $row) {\n $roster[] = $row['racerid'];\n }\n return $roster;\n}",
"public function getId()\n\t\t{\n\t\t\t\treturn $this->id_sucursal;\n }",
"public function serv($id){\n \n $requete = $this->db->query(\"SELECT * FROM serviceMairie where serv_id= ?\", $id);\n $serv = $requete->row();\n return $serv; \n }",
"function voirCommandeRelaienLivraison(){\n\t$conditions = array();\n\tarray_push($conditions, array('nameChamps'=>'modeLivraison','type'=>'=','name'=>'modeLivraison','value'=>'2'));\n\tarray_push($conditions, array('nameChamps'=>'statutCommande','type'=>'=','name'=>'statutCommande','value'=>'3'));\n\t$req = new myQueryClass('commande',$conditions);\n\t$r = $req->myQuerySelect();\n\treturn $r;\n}",
"public function getAllRaiting($id)\n {\n return $this->rating->where('salon_id',$id)->where('salon_rating','!=',0)->get();\n }",
"public function RetornarRS(&$rs, $sql){\n \t\t$objMySQL = new mysqli($this->_servidor, $this->_usuario,\n $this->_clave, $this->_basedatos);\n\t\tif (!$sentenciaSQL = $objMySQL->query($sql)){\n\t\t\t$this->errorBD = \"<b>AccesoBD->RetornarRS: </b>\".$objMySQL->error;\n\t\t\techo $this->errorBD;\n\t\t}\n\t\t$rs = $sentenciaSQL;\n\t}",
"public function Save()\r\n\t\t{\r\n\t\t\t$db = new Db();\r\n\t\t\t$id = $_SESSION['restaurant_id'];\r\n\t\t\t$sql = \"INSERT INTO tbl_reservaties (klantnaam, aantalpersonen, datum, uur, tafel_id)\r\n\t\t\tVALUES ('\".$db->conn->real_escape_string($this->m_sName).\"',\r\n\t\t\t\t\t'\".$db->conn->real_escape_string($this->m_iPersonen).\"',\r\n\t\t\t\t\tSTR_TO_DATE('\".$db->conn->real_escape_string($this->m_dDate).\"', '%e-%m-%Y'),\r\n\t\t\t\t\t'\".$db->conn->real_escape_string($this->m_iUur).\"',\r\n\t\t\t\t\t(SELECT tafel_id FROM tbl_tafels WHERE tafelnr = \".$db->conn->real_escape_string($this->m_iTable).\" AND restaurant_id = $id\r\n\t\t\t))\";\r\n\t\t\t$db->conn->query($sql);\r\n\t\t\t\r\n\t\t}",
"function seleziona_spesa($id){\n\n $mysqli = connetti();\n\n $sql = \"SELECT * FROM spesa WHERE id = \" . $id;\n\n // memorizzo il risultato della query\n $risultato_query = $mysqli->query($sql);\n\n $array_righe = [];\n while($righe_tabella = $risultato_query->fetch_array(MYSQLI_ASSOC)){\n $array_righe[] = $righe_tabella;\n }\n\n chiudi_connessione($mysqli);\n\n return $array_righe;\n}",
"public function UpdateUserNameWithNumSecu() {\n\n $sql = \"SELECT s.id,u.id as user_id,s.num_secu,u.username,s.nom,s.prenom,s.matricule,s.company_id FROM 3cexternpaie_fulloffice_db.salary s\n\nleft join 3cexternpaie_fulloffice_db.user u on s.user_id = u.id\n\n\n\nwhere u.username LIKE '%a%' or '%b%' or '%c%' or '%d%' or '%e%' or '%f%' or '%g%' or '%h%' or '%i%' or '%j%' \n\nor '%k%' or '%l%' or '%m%' or '%n%' or '%o%' or '%p%' or '%q%' or '%r%' or '%s%' or '%t%' or '%u%' or '%v%'or '%w%' or '%x%' or '%y%' or '%z%' \";\n\n\n\n $em = $this->getContainer()->get('doctrine.orm.entity_manager');\n $stmt = $em->getConnection()->prepare($sql);\n $stmt->execute();\n return $stmt->fetchAll();\n }",
"public function renderStrom()\n {\n $this->template->dokument_id = $this->getParameter('dokument_id');\n\n $Spisy = new Spis();\n $args = ['where' => ['stav = 1']];\n $args = $Spisy->spisovka($args);\n $result = $Spisy->seznamRychly($args['where']);\n $result->setRowClass(null);\n $this->template->spisy = $result->fetchAll();\n }",
"function linkSlotOnRGO( $idSlot, $idRGO ){\n //удаляем все линки на RGO из слотов\n $query = \"UPDATE `object_slots` SET `rgo_id` = NULL WHERE `rgo_id`= $idRGO\";\n //выставляем правильный линк с нужного слота\n $query2 = \"UPDATE `object_slots` SET `rgo_id` = $idRGO WHERE `id`= $idSlot\";\n\n global $mysql;\n $mysql->query( $query );\n $mysql->query( $query2 );\n\n}",
"public function update(ParecerTrabalho $ParecerTrabalho) {\r\n $sql = \"UPDATE $this->table SET datahora = :datahora, status = :status,\"\r\n . \" status_introducao = :statusIntroducao, status_objetivos = :statusObjetivos, \"\r\n . \"status_metodologia = :statusMetodologia, status_resultados = :statusResultados, \"\r\n . \"observacoes = :observacoes, observacoes_internas = :observacoesInternas,\"\r\n . \"obs_introducao = :obsIntroducao, obs_objetivos = :obsObjetivos, \"\r\n . \"obs_metodologia = :obsMetodologia, obs_resultados = :obsResultados\"\r\n . \" WHERE seq = :seq AND fk_trabalho = :trabalho\";\r\n $trabalho = $ParecerTrabalho->getFkTrabalho();\r\n $seq = $ParecerTrabalho->getSeq();\r\n $datahora = $ParecerTrabalho->getDatahora();\r\n $status = $ParecerTrabalho->getStatus();\r\n $statusIntroducao = $ParecerTrabalho->getStatusIntroducao();\r\n $statusObjetivos = $ParecerTrabalho->getStatusObjetivos();\r\n $statusMetodologia = $ParecerTrabalho->getStatusMetodologia();\r\n $statusResultados = $ParecerTrabalho->getStatusResultados();\r\n $observacoes = $ParecerTrabalho->getObservacoes();\r\n $observacoesInternas = $ParecerTrabalho->getObservacoesInternas();\r\n $obsIntroducao = $ParecerTrabalho->getObsIntroducao();\r\n $obsObjetivos = $ParecerTrabalho->getObsObjetivos();\r\n $obsMetodologia = $ParecerTrabalho->getObsMetodologia();\r\n $obsResultados = $ParecerTrabalho->getObsResultados();\r\n $stmt = ConnectionFactory::prepare($sql);\r\n $stmt->bindParam(':trabalho', $trabalho);\r\n $stmt->bindParam(':seq', $seq);\r\n $stmt->bindParam(':datahora', $datahora);\r\n $stmt->bindParam(':status', $status);\r\n $stmt->bindParam(':statusIntroducao', $statusIntroducao);\r\n $stmt->bindParam(':statusObjetivos', $statusObjetivos);\r\n $stmt->bindParam(':statusMetodologia', $statusMetodologia);\r\n $stmt->bindParam(':statusResultados', $statusResultados);\r\n $stmt->bindParam(':observacoes', $observacoes);\r\n $stmt->bindParam(':observacoesInternas', $observacoesInternas);\r\n $stmt->bindParam(':obsIntroducao', $obsIntroducao);\r\n $stmt->bindParam(':obsObjetivos', $obsObjetivos);\r\n $stmt->bindParam(':obsMetodologia', $obsMetodologia);\r\n $stmt->bindParam(':obsResultados', $obsResultados);\r\n\r\n return $stmt->execute();\r\n }",
"public function getSuivants2($id) {\n $db = $this->dbConnect();\n $req = $db->prepare('SELECT *,USER_PSEUDO,STATUT_POST_LIBELLE,SUM(p5_vote_score.POSTS_SCORE_YES)AS JAIME,SUM(p5_vote_score.POSTS_SCORE_NO) AS JAIMEPAS FROM p5_posts INNER JOIN p5_statut_post ON p5_statut_post_STATUT_POST_ID = p5_statut_post.STATUT_POST_ID INNER JOIN P5_votes ON p5_posts.ART_ID=p5_votes.p5_posts_ART_ID INNER JOIN p5_vote_score ON p5_vote_score.p5_votes_VOTE_ID = p5_votes.VOTE_ID INNER JOIN p5_users ON p5_users.USER_ID=p5_posts.ART_AUTEUR WHERE p5_posts.ART_PRECEDENT = ? group by ART_ID ');\n $req->execute(array($id));\n return $req;\n }",
"function solicitudes_en_tramite($id_area){\n //Consulta\n $sql =\n \"SELECT\n solicitudes.solicitudes.Pk_Id_Solicitud,\n solicitudes.solicitudes.Fecha_Creacion,\n solicitudes.solicitudes.Radicado_Entrada,\n solicitudes.solicitudes.Nombres,\n solicitudes.solicitudes.Solicitud_Descripcion AS Descripcion,\n solicitudes.tbl_tramos.Nombre AS Tramo\n FROM\n solicitudes.solicitudes\n INNER JOIN apps.usuarios ON solicitudes.solicitudes.Fk_Id_Usuario = apps.usuarios.Pk_Id_Usuario\n INNER JOIN solicitudes.tbl_tramos ON solicitudes.solicitudes.Fk_Id_Tramo = solicitudes.tbl_tramos.Pk_Id_Tramo\n WHERE\n solicitudes.solicitudes.Fk_Id_Solicitud_Estado = 1 AND\n solicitudes.solicitudes.Fk_Id_Area_Encargada = {$id_area}\n ORDER BY\n solicitudes.solicitudes.Fecha_Creacion ASC\";\n\n //Se retorna el resultado de la consulta\n return $this->db->query($sql)->result();\n }",
"public function use_obtener_sucursal_actual(){\n $sucursal_actual = $this->ci->session->userdata('sucursal');//sucursal_id sid\n $usuario = $this->ci->arixkernel->select_one_content('numero, nombre','config.sucursales', array('sucursal_id' => $sucursal_actual));\n return $usuario;\n }",
"function restar_reputacion($id_user, $id_pasajero, $id_viaje) {\n $data = array(\n 'id_chofer' => $id_user,\n 'id_viaje' => $id_viaje,\n 'id_pasajero' => $id_pasajero,\n 'calificacion' => -1,\n \n );\n $this->db->insert('calificacion_chofer', $data);\n }",
"function TSU($_ARGS) {\r\n\t$sql = \"SELECT\r\n\t\t\t\t*\r\n\t\t\tFROM\r\n\t\t\t\trh_empleado_instruccion\r\n\t\t\tWHERE\r\n\t\t\t\tCodPersona = '\".$_ARGS['TRABAJADOR'].\"' AND\r\n\t\t\t\tCodGradoInstruccion = 'TSU'\";\r\n\t$query = mysql_query($sql) or die ($sql.mysql_error());\r\n\tif (mysql_num_rows($query) != 0) return true;\r\n\telse return false;\r\n}",
"public function refreshDpersDatumsFromVertrag($persnr,$vertragID){\n //Debug::fireLog(\"refreshDpersDatumsFromVertrag persnr=\".$persnr.\",vertragID=\".$vertragID);\n\n $refreshDpersDatums = FALSE;\n\n if($persnr===NULL){\n $sql = \"select persnr from \".self::TABLE_DPERSVERTRAG.\" where id=$vertragID\";\n $res = $this->db->query($sql);\n $row = $res->fetch();\n $persnr = $row['persnr'];\n }\n \n // zjistim aktualni hodnotu eintritt\n $sql = \"select \".self::TABLE_DPERS.\".eintritt,\".self::TABLE_DPERS.\".austritt\";\n $sql.= \" ,dobaurcita,zkusebni_doba_dobaurcita\";\n $sql.= \" from \".self::TABLE_DPERS;\n $sql.= \" join \".self::TABLE_DPERSDETAIL.\" on \".self::TABLE_DPERSDETAIL.\".persnr=\".self::TABLE_DPERS.\".persnr\";\n $sql.= \" where \".self::TABLE_DPERS.\".persnr='$persnr'\";\n $res = $this->db->query($sql);\n if(count($res)>0){\n $row = $res->fetch();\n $dpersEintritt = $row['eintritt'];\n $dpersAustritt = $row['austritt'];\n $dpersBefristet = $row['dobaurcita'];\n $dpersProbezeit = $row['zkusebni_doba_dobaurcita'];\n Debug::fireLog(\"refreshDpersDatumsFromVertrag dperseintritt=\".$dpersEintritt.\",dpersaustritt=\".$dpersAustritt.\",dpersbefristet=\".$dpersBefristet.\",dpersprobezeit=\".$dpersProbezeit);\n }\n else\n return $refreshDpersDatums;\n\n // vyberu radek s poslednim eintrittem ktery znaci pocatek smlouvy z archivu\n $sql = \"select max(eintritt) as eintritt from \".self::TABLE_DPERSVERTRAG.\" where persnr='$persnr' and vertrag_anfang<>0\";\n $res = $this->db->query($sql);\n if(count($res)>0){\n // porovnam s aktualni hodnotou v eintritt v dpers\n $row = $res->fetch();\n $vertragEintritt = $row['eintritt'];\n if($dpersEintritt!=$vertragEintritt){\n $this->updateDpersFieldProPersNr($persnr, 'eintritt', $vertragEintritt);\n $refreshDpersDatums = TRUE;\n }\n }\n\n // a jeste jednou vyberu radek s poslednim eintrittem z archivu, tentokrat i hodnoty pro austritt, befristet a probezeit\n $sql = \"select eintritt,austritt,befristet,probezeit,vertrag_anfang from \".self::TABLE_DPERSVERTRAG.\" where persnr='$persnr' order by eintritt desc\";\n $res = $this->db->query($sql);\n if(count($res)>0){\n // porovnam s aktualni hodnotou v eintritt v dpers\n $row = $res->fetch();\n $vertragEintritt = $row['eintritt'];\n $vertragAustritt = $row['austritt'];\n $vertragBefristet = $row['befristet'];\n $vertragProbezeit = $row['probezeit'];\n $vertragAnfang = $row['vertrag_anfang'];\n\n if(($dpersEintritt!=$vertragEintritt)&&($vertragAnfang!=0)){\n $this->updateDpersFieldProPersNr($persnr, 'eintritt', $vertragEintritt);\n $refreshDpersDatums = TRUE;\n }\n\n if($dpersAustritt!=$vertragAustritt){\n $this->updateDpersFieldProPersNr($persnr, 'austritt', $vertragAustritt);\n $refreshDpersDatums = TRUE;\n }\n\n if($dpersProbezeit!=$vertragProbezeit){\n $this->updateDpersDetailFieldProPersNr($persnr, 'zkusebni_doba_dobaurcita', $vertragProbezeit);\n $refreshDpersDatums = TRUE;\n }\n\n if($dpersBefristet!=$vertragBefristet){\n $this->updateDpersDetailFieldProPersNr($persnr, 'dobaurcita', $vertragBefristet);\n $refreshDpersDatums = TRUE;\n }\n }\n\n return $refreshDpersDatums;\n //\n}",
"public static function lisaaViesti($ketjuid, $kirjoittaja, $sisalto){\n $rivit = DB::query('INSERT INTO Viesti (ketju, kirjoittaja, sisalto, aika) VALUES '\n . '(:ketju, :kirjoittaja, :sisalto, :aika) RETURNING id',\n array('ketju' => $ketjuid, 'kirjoittaja' => $kirjoittaja,\n 'sisalto' => $sisalto, 'aika' => self::haeNykyHetki()));\n \n return $rivit[0];\n }",
"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 }",
"function get_lugar_sede($id_sede,$id_lugar) {\n $this->db->where('id_sede =', $id_sede);\n $this->db->where('id_lugar_sede =', $id_lugar);\n $query = $this->db->get('lugares');\n return $query->row();\n }"
]
| [
"0.5728499",
"0.5703462",
"0.5515656",
"0.5449551",
"0.53148985",
"0.5213692",
"0.5139777",
"0.5134829",
"0.5110156",
"0.5104418",
"0.50822055",
"0.5070657",
"0.506909",
"0.5062691",
"0.5048393",
"0.5040998",
"0.5039954",
"0.5037544",
"0.50261235",
"0.50100833",
"0.49852055",
"0.49546656",
"0.49529576",
"0.49203637",
"0.49151033",
"0.4901106",
"0.4899852",
"0.48984966",
"0.48961884",
"0.48786044",
"0.4875594",
"0.48691338",
"0.4869079",
"0.48673862",
"0.48567617",
"0.48524752",
"0.48484",
"0.48465514",
"0.48379067",
"0.48230463",
"0.48198405",
"0.48096222",
"0.48040885",
"0.4797402",
"0.47919917",
"0.47890106",
"0.47849736",
"0.47809252",
"0.47772598",
"0.47751603",
"0.4774216",
"0.4770227",
"0.4765835",
"0.47597265",
"0.47596636",
"0.47502798",
"0.47493118",
"0.47489873",
"0.47486773",
"0.4744856",
"0.47430715",
"0.47302535",
"0.47265393",
"0.47241142",
"0.47231033",
"0.47229937",
"0.4722154",
"0.47100788",
"0.47036493",
"0.47004348",
"0.46996954",
"0.46973768",
"0.4696128",
"0.4692289",
"0.46913385",
"0.4691071",
"0.4688349",
"0.4684762",
"0.46832243",
"0.4681612",
"0.46810177",
"0.4678375",
"0.46777356",
"0.46766862",
"0.46763495",
"0.46596605",
"0.4648302",
"0.4647608",
"0.46468765",
"0.46462187",
"0.46458215",
"0.46432167",
"0.4642455",
"0.46415216",
"0.4640602",
"0.46363991",
"0.46349546",
"0.46347937",
"0.46285948",
"0.46258456"
]
| 0.5152582 | 6 |
use this method to modify $this>_columnHeaders | function buildRows(&$rows ) {
require_once 'CRM/Utils/HilreportsUtils.php';
$this->modifyColumnHeaders( );
$this->calculateAantalContacts();
$this->setCustomGroupIdExtraGegevens();
$rowNumber = 0;
/*
* eerste rij met totalen
*/
$rows[$rowNumber]['label'] = "<strong>TOTAAL:</strong>";
$rows[$rowNumber]['aantal'] = $this->_aantalContacts;
$rows[$rowNumber]['percentage'] = "100%";
$rowNumber++;
$this->_aantalRijen++;
/*
* build rows for land van herkomst
*/
$this->insertEmptyLine($rowNumber, $rows);
$this->insertHeaderLine($rowNumber, $rows, "Land van herkomst:");
$this->addRowsLandVanHerkomst($rows, $rowNumber);
/*
* build rows for economische status
*/
$this->insertEmptyLine($rowNumber, $rows);
$this->insertHeaderLine($rowNumber, $rows, "Economische status");
$this->addRowsOptionValue($rows, $rowNumber, "Economische status", "econ_status");
/*
* build rows for burgerlijke staat
*/
$this->insertEmptyLine($rowNumber, $rows);
$this->insertHeaderLine($rowNumber, $rows, "Burgerlijke staat");
$this->addRowsOptionValue($rows, $rowNumber, "Burgerlijke staat", "burg_staat");
/*
* build rows for ethnisch culturele achtergrond
*/
$this->insertEmptyLine($rowNumber, $rows);
$this->insertHeaderLine($rowNumber, $rows, "Ethnisch/culturele achtergrond");
$this->addRowsOptionValue($rows, $rowNumber, "Ethnisch/culturele achtergrond", "cult_ethn");
/*
* build rows for nationaliteit
*/
$this->insertEmptyLine($rowNumber, $rows);
$this->insertHeaderLine($rowNumber, $rows, "Nationaliteit");
$this->addRowsText($rows, $rowNumber, "nationaliteit");
/*
* build rows for geslacht
*/
$this->_optionGroupId = 3;
$this->insertEmptyLine($rowNumber, $rows);
$this->insertHeaderLine($rowNumber, $rows, "Geslacht:");
$this->addRowsOptionValue($rows, $rowNumber, "", "geslacht");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function reOrderColumnHeaders() {\n\n }",
"private function getHeaders(){\n\t\t$thead=\"\";\n\t\tif(!empty($this->headers)){\n\t\t\t$thead=\"<thead>\";\n\t\t\t$thead.=\"<tr>\";\n\t\t\t$headerNumber=0;\n\t\t\t$fieldNumber=0;\n\t\t\t$count=count($this->headers)-1;\n\t\t\t\n\t\t\t//Busca si hay columnas anteriores a agregar\n\t\t\tif(!empty($this->prependedCols)){\n\t\t\t\tforeach($this->prependedCols as $col){\n\t\t\t\t\t$thead.=\"<th>{$col[\"header\"]}</th>\";\n\t\t\t\t\t$headerNumber++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//Busca las columnas declaradas\n\t\t\tforeach($this->headers as $name){\n\t\t\t\tif($this->headerSortable){\n\t\t\t\t\tif($this->order!==\"\"&&!empty($this->order)){\n\t\t\t\t\t\t$order=explode('|',$this->order);\n\t\t\t\t\t\tif(is_array($order)&&$fieldNumber==$order[0]){\n\t\t\t\t\t\t\t$classSortable=\"velkan-grid-column-header velkan-grid-column-header-sorted-\".$order[1];\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$classSortable=\"velkan-grid-column-header velkan-grid-column-header-sorted-both\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$classSortable=\"velkan-grid-column-header velkan-grid-column-header-sorted-both\";\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t$thead.=\"<th {$this->id}-column-header class=\\\"$classSortable\\\" onclick=\\\"javascript:{$this->id}Reorder($fieldNumber);\\\" {$this->id}_field_number=\\\"$fieldNumber\\\">$name</th>\";\n\t\t\t\t}else{\n\t\t\t\t\t$thead.=\"<th {$this->id}-column-header>$name</th>\";\n\t\t\t\t}\n\t\t\t\t$fieldNumber++;\n\t\t\t\t$headerNumber++;\n\t\t\t}\n\t\t\t\n\t\t\t//Busca si hay columnas posteriores a agregar\n\t\t\tif(!empty($this->appendedCols)){\n\t\t\t\tforeach($this->appendedCols as $col){\n\t\t\t\t\t$thead.=\"<th>{$col[\"header\"]}</th>\";\n\t\t\t\t\t$headerNumber++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$thead.=\"</tr>\";\n\t\t\t\n\t\t\t//Guardamos el numero total de columnas\n\t\t\t$this->cols=$headerNumber;\n\t\t\t\n\t\t\t\n\t\t\t$tfilter=\"\";\n\t\t\t$type=\"\";\n\t\t\tif($this->headerFilterable){\n\t\t\t\t$cols=count($this->fields)-1;\n\t\t\t\t\n\t\t\t\tfor($i=0;$i<=$cols;$i++){\n\t\t\t\t\t$meClass=velkan::$config[\"datagrid\"][\"filters\"][\"inputClass\"];\n\t\t\t\t\t\n\t\t\t\t\t$type=\"\";\n\t\t\t\t\tif(!empty($this->types)){\n\t\t\t\t\t\t$type=$this->types[$i];\n\t\t\t\t\t}\n\t\t\t\t\t$value=\"\";\n\t\t\t\t\tif(!empty($this->filters)){\n\t\t\t\t\t\tforeach($this->filters as $filter){\n\t\t\t\t\t\t\tif($filter[0]==$i){\n\t\t\t\t\t\t\t\t$value=$filter[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\t\n\t\t\t\t\t$tfilter.=\"<th class='velkan-grid-column-filter'>\";\n\t\t\t\t\t\n\t\t\t\t\tswitch($type){\n\t\t\t\t\t\tcase \"date\":\n\t\t\t\t\t\t\t$input=new date_time(array(\"id\"=>\"grid{$this->id}Filter\",\"name\"=>\"grid{$this->id}Filter[]\",\"value\"=>$value,\"pickerType\"=>date_time::$DATETIME_PICKER_TYPE_DATE));\n\t\t\t\t\t\t\t$tfilter.=$input->render(true);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"datetime\":\n\t\t\t\t\t\t\t$input=new date_time(array(\"id\"=>\"grid{$this->id}Filter\",\"name\"=>\"grid{$this->id}Filter[]\",\"value\"=>$value,\"pickerType\"=>date_time::$DATETIME_PICKER_TYPE_DATETIME));\n\t\t\t\t\t\t\t$tfilter.=$input->render(true);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"time\":\n\t\t\t\t\t\t\t$input=new date_time(array(\"id\"=>\"grid{$this->id}Filter\",\"name\"=>\"grid{$this->id}Filter[]\",\"value\"=>$value,\"pickerType\"=>date_time::$DATETIME_PICKER_TYPE_TIME));\n\t\t\t\t\t\t\t$tfilter.=$input->render(true);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t$tfilter.=\"<input type='search' name='grid{$this->id}Filter[]' $type value=\\\"$value\\\">\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t$tfilter.=\"</th>\";\n\t\t\t\t}\n\t\t\t\t$display=($this->ShowFilters?\"\":\"style='display:none'\");\n\t\t\t\t\n\t\t\t\t$filterPrepend=\"\";\n\t\t\t\tif(!empty($this->prependedCols)){\n\t\t\t\t\tforeach($this->prependedCols as $col){\n\t\t\t\t\t\t$filterPrepend.=\"<th> </th>\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$filterAppend=\"\";\n\t\t\t\tif(!empty($this->appendedCols)){\n\t\t\t\t\tforeach($this->appendedCols as $col){\n\t\t\t\t\t\t$filterAppend.=\"<th> </th>\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$tfilter=\"<tr id='grid{$this->id}Filters' $display>{$filterPrepend}{$tfilter}{$filterAppend}</tr>\";\n\t\t\t}\n\t\t\t\n\t\t\tif($type!=\"\"){\n\t\t\t\t$jss=new generalJavaScriptFunction();\n\t\t\t\t$jss->registerFunction(\"applyFormats\");\n\t\t\t}\n\t\t\t\n\t\t\t$thead.=\"$tfilter</thead>\";\n\t\t}\n\t\t\n\t\treturn $thead;\n\t}",
"public function table_headers() {\n\t\t\tglobal $mycred_types;\n\n\t\t\treturn apply_filters( 'mycred_log_column_headers', array(\n\t\t\t\t'column-username' => __( 'User', 'twodayssss' ),\n\t\t\t\t'column-time' => __( 'Date', 'twodayssss' ),\n\t\t\t\t'column-creds' => $this->core->plural(),\n\t\t\t\t'column-entry' => __( 'Entry', 'twodayssss' )\n\t\t\t), $this );\n\t\t}",
"abstract protected function getColumnsHeader(): array;",
"public function setColumnsHeadData()\n\t{\n\t\tFileStorage::getInstance()->store([], 'league_table_columns_head');\n\t}",
"function type_column_header( $columns ) {\r\n\t\tunset( $columns['date'] );\r\n\t\treturn $columns;\r\n\t}",
"public function column_headers( $columns = array() ) {\n\t\t\t$new_columns = array(\n\t\t\t\t'cat_talks' => _x( 'Categories', 'talks admin category column header', 'wordcamp-talks' ),\n\t\t\t\t'tag_talks' => _x( 'Tags', 'talks admin tag column header', 'wordcamp-talks' ),\n\t\t\t);\n\n\t\t\tif ( ! wct_is_rating_disabled() ) {\n\t\t\t\t$new_columns['rates'] = '<span class=\"vers\"><span title=\"' . esc_attr__( 'Average Rating', 'wordcamp-talks' ) .'\" class=\"talk-rating-bubble\"></span></span>';\n\t\t\t}\n\n\t\t\t/**\n\t\t\t *\n\t\t\t * @param array $new_columns the specific columns\n\t\t\t */\n\t\t\t$new_columns = apply_filters( 'wct_admin_column_headers', $new_columns );\n\n\t\t\t$temp_remove_columns = array( 'comments', 'date' );\n\t\t\t$has_columns = array_intersect( $temp_remove_columns, array_keys( $columns ) );\n\n\t\t\t// Reorder\n\t\t\tif ( $has_columns == $temp_remove_columns ) {\n\t\t\t\t$new_columns['comments'] = $columns['comments'];\n\t\t\t\t$new_columns['date'] = $columns['date'];\n\t\t\t\tunset( $columns['comments'], $columns['date'] );\n\t\t\t}\n\n\t\t\t// Merge\n\t\t\t$columns = array_merge( $columns, $new_columns );\n\n\n\t\t\tif ( ! empty( $this->downloading_csv ) ) {\n\t\t\t\tunset( $columns['cb'], $columns['date'] );\n\n\t\t\t\tif ( ! empty( $columns['title'] ) ) {\n\t\t\t\t\t$csv_columns = array(\n\t\t\t\t\t\t'title' => $columns['title'],\n\t\t\t\t\t\t'talk_content' => esc_html_x( 'Content', 'downloaded csv content header', 'wordcamp-talks' ),\n\t\t\t\t\t\t'talk_link' => esc_html_x( 'Link', 'downloaded csv link header', 'wordcamp-talks' ),\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\t$columns = array_merge( $csv_columns, $columns );\n\n\t\t\t\t// Replace dashicons to text\n\t\t\t\tif ( ! empty( $columns['comments'] ) ) {\n\t\t\t\t\t$columns['comments'] = esc_html_x( '# comments', 'downloaded csv comments num header', 'wordcamp-talks' );\n\t\t\t\t}\n\n\t\t\t\tif ( ! empty( $columns['rates'] ) ) {\n\t\t\t\t\t$columns['rates'] = esc_html_x( 'Average rating', 'downloaded csv rates num header', 'wordcamp-talks' );\n\t\t\t\t}\n\n\t\t\t\t/**\n\t\t\t\t * User this filter to only add columns for the downloaded csv file\n\t\t\t\t *\n\t\t\t\t * @param array $columns the columns specific to the csv output\n\t\t\t\t */\n\t\t\t\t$columns = apply_filters( 'wct_admin_csv_column_headers', $columns );\n\t\t\t}\n\n\t\t\treturn $columns;\n\t\t}",
"public function loadColumnHeaders() {\n\t\t$jinput = JFactory::getApplication()->input;\n\t\t$jinput->set('columnheaders', $this->data->_data[1]);\n\t\t$this->linepointer++;\n\t\treturn true;\n\t}",
"function slb_subscriber_column_headers($columns) {\n\n\t// creating custom column header data\n\t$columns = array(\n\t\t'cb' => '<input type=\"checkbox\" />',\n\t\t'title' => __('Subscriber Name'),\n\t\t'email' => __('Email Address'),\n\t);\n\n\t// returning new columns\n\treturn $columns;\n}",
"protected function _prepareColumns()\n {\n $this->addColumn('ticket_id', array(\n 'header' => Mage::helper('inchoo_supportticket')->__('ID'),\n 'width' => '80px',\n 'index' => 'ticket_id'\n ));\n $this->addColumn('subject', array(\n 'header'=> Mage::helper('inchoo_supportticket')->__('Subject'),\n 'type'=> 'text',\n 'width' => '300px',\n 'index' => 'subject',\n 'escape' => true\n ));\n $this->addColumn('content', array(\n 'header'=> Mage::helper('inchoo_supportticket')->__('Content'),\n 'type' => 'text',\n 'index' => 'content',\n 'escape' => true\n ));\n $this->addColumn('status', array(\n 'header'=> Mage::helper('inchoo_supportticket')->__('Status'),\n 'type'=> 'text',\n 'width' => '200px',\n 'index' => 'status',\n 'escape' => true\n ));\n $this->addColumn('created_at', array(\n 'header'=> Mage::helper('inchoo_supportticket')->__('Created at'),\n 'type' => 'text',\n 'width' => '170px',\n 'index' => 'created_at',\n ));\n return parent::_prepareColumns();\n }",
"protected function _prepareColumns()\n\t{\n\t\t$this->addColumn('id',\n\t\t\t\tarray(\n\t\t\t\t\t\t'header'=> $this->__('ID'),\n\t\t\t\t\t\t'align' =>'right',\n\t\t\t\t\t\t'width' => '50px',\n\t\t\t\t\t\t'index' => 'id'\n\t\t\t\t)\n\t\t);\n\t\t \n\t\t$this->addColumn('name',\n\t\t\t\tarray(\n\t\t\t\t\t\t'header'=> $this->__('Name'),\n\t\t\t\t\t\t'index' => 'name'\n\t\t\t\t)\n\t\t);\n\t\t\n\t\t$this->addColumn('description',\n\t\t\t\tarray(\n\t\t\t\t\t\t'header'=> $this->__('Description'),\n\t\t\t\t\t\t'index' => 'description'\n\t\t\t\t)\n\t\t);\n\t\t\n\t\t$this->addColumn('percentage',\n\t\t\t\tarray(\n\t\t\t\t\t\t'header'=> $this->__('Percentage'),\n\t\t\t\t\t\t'index' => 'percentage'\n\t\t\t\t)\n\t\t);\n\t\t \n\t\treturn parent::_prepareColumns();\n\t}",
"protected function getTableHeader() {\n $newDirection = ($this->sortDirection == 'asc') ? 'desc' : 'asc';\n\n $tableHeaderData = array(\n 'title' => array(\n 'link' => $this->getLink('title', ($this->sortField == 'title') ? $newDirection : $this->sortDirection),\n 'name' => 'Title',\n 'cssClass' => 'fa-sort-' . $this->sortDirection\n ),\n 'document_type' => array(\n 'link' => $this->getLink('type', $this->sortField == 'document_type' ? $newDirection : $this->sortDirection),\n 'name' => 'Type',\n 'cssClass' => 'fa-sort-' . $this->sortDirection\n ),\n 'date' => array(\n 'link' => $this->getLink('date', $this->sortField == 'date' ? $newDirection : $this->sortDirection),\n 'name' => 'Date',\n 'cssClass' => 'fa-sort-' . $this->sortDirection\n ),\n );\n\t\t\n // insert institution field in 3rd column, if this is search results\n if($this->uri == 'search') {\n $tableHeaderData = array_slice($tableHeaderData, 0, 2, true) +\n array('institution' => array(\n 'link' => $this->getLink('institution', $this->sortField == 'institution' ? $newDirection : $this->sortDirection),\n 'name' => 'Institution',\n 'cssClass' => 'fa-sort-' . $this->sortDirection\n )) +\n array_slice($tableHeaderData, 2, count($tableHeaderData)-2, true);\n }\n\t\t\n return $tableHeaderData;\n }",
"function getColumnHeaders(){\n\t\t$columnHeaders = array();\n\n\t\t//fixed headers\n\t\t$columnHeaders[0] = 'User';\n\t\t$columnHeaders[1] = 'Action';\n\n\t\t//two headers were added, offsett to make up for it\n\t\t$count = 2;\n\t\tforeach ($this->schedule as $date => $times) {\n\n\t\t\t//convert the full date to a more readable version\n\t\t\t$converter = strtotime($date); \n\t\t\t$formattedDate =date('l', $converter);\n\t\t\t$formattedDate = $formattedDate.'</br>'.date('m-d-y', $converter);\n\n\t\t\tforeach($times as $time){// #2dimensionlswag\n\n\t\t\t\t//convert the international time to AM/PM\n\t\t\t\t$converter = strtotime($time); \n\t\t\t\t$formattedTime = date(\"g:i A\", $converter);\n\n\t\t\t\t$columnHeaders[$count] = $formattedDate.'</br>'.$formattedTime;\n\t\t\t\t$count++;\n\t\t\t}\n\t\t}\n\t\treturn $columnHeaders;\n\t}",
"public function makeReportUnusableToBeAbleToSeeAllColumnHeaders()\n {\n $javascript = <<<JS\n $('thead th').css('display', 'inline');\nJS;\n\n $this->getSession()->executeScript($javascript);\n }",
"public function column_headers($columns) {\n\t\t$ent_list = get_option(str_replace(\"-\", \"_\", $this->textdomain) . '_ent_list');\n\t\tif (!empty($ent_list[$this->post_type]['featured_img'])) {\n\t\t\t$columns['featured_img'] = __('Featured Image', $this->textdomain);\n\t\t}\n\t\tforeach ($this->boxes as $mybox) {\n\t\t\tforeach ($mybox['fields'] as $fkey => $mybox_field) {\n\t\t\t\tif (!in_array($fkey, Array(\n\t\t\t\t\t'wpas_form_name',\n\t\t\t\t\t'wpas_form_submitted_by',\n\t\t\t\t\t'wpas_form_submitted_ip'\n\t\t\t\t)) && !in_array($mybox_field['type'], Array(\n\t\t\t\t\t'textarea',\n\t\t\t\t\t'wysiwyg'\n\t\t\t\t)) && $mybox_field['list_visible'] == 1) {\n\t\t\t\t\t$columns[$fkey] = $mybox_field['name'];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$taxonomies = get_object_taxonomies($this->post_type, 'objects');\n\t\tif (!empty($taxonomies)) {\n\t\t\t$tax_list = get_option(str_replace(\"-\", \"_\", $this->textdomain) . '_tax_list');\n\t\t\tforeach ($taxonomies as $taxonomy) {\n\t\t\t\tif (!empty($tax_list[$this->post_type][$taxonomy->name]) && $tax_list[$this->post_type][$taxonomy->name]['list_visible'] == 1) {\n\t\t\t\t\t$columns[$taxonomy->name] = $taxonomy->label;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$rel_list = get_option(str_replace(\"-\", \"_\", $this->textdomain) . '_rel_list');\n\t\tif (!empty($rel_list)) {\n\t\t\tforeach ($rel_list as $krel => $rel) {\n\t\t\t\tif ($rel['from'] == $this->post_type && in_array($rel['show'], Array(\n\t\t\t\t\t'any',\n\t\t\t\t\t'from'\n\t\t\t\t))) {\n\t\t\t\t\t$columns[$krel] = $rel['from_title'];\n\t\t\t\t} elseif ($rel['to'] == $this->post_type && in_array($rel['show'], Array(\n\t\t\t\t\t'any',\n\t\t\t\t\t'to'\n\t\t\t\t))) {\n\t\t\t\t\t$columns[$krel] = $rel['to_title'];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $columns;\n\t}",
"public static function column_headings( $columns ) {\n\n\t\t\tunset( $columns['date'] );\n\n\t\t\t$columns['advanced_headers_display_rules'] = __( 'Display Rules', 'astra-addon' );\n\t\t\t$columns['date'] = __( 'Date', 'astra-addon' );\n\n\t\t\treturn $columns;\n\t\t}",
"function register_column_headers( $screen, $columns ) {\n\tnew Backend\\List_Table_Compat( $screen, $columns );\n}",
"protected function _prepareColumns()\n {\n parent::_prepareColumns();\n\n $this->addColumn('attribute_code', array(\n 'header' => Mage::helper('eav')->__('Attribute Code'),\n 'sortable' => true,\n 'index' => 'attribute_code'\n ));\n\n $this->addColumn('frontend_label', array(\n 'header' => Mage::helper('eav')->__('Attribute Label'),\n 'sortable' => true,\n 'index' => 'frontend_label'\n ));\n }",
"function add_header_columns($columns) \n {\n $columns = array(\n \"cb\" => \"<input type=\\\"checkbox\\\" />\",\n \"shortcode\" => __('Shortcode'),\n \"title\" => __('Title'),\n \"quote\" => __('Quote', $this->localization_domain),\n \"author\" => __('Author'),\n \"date\" => __('Publish Date'),\n );\n return $columns;\n }",
"function products_column_headers( $columns ) {\r\n\r\n // Creating the custom column header data\r\n $columns = array(\r\n 'cb' => '<input type=\"checkbox\" />',\r\n 'title' => __('Product Name'),\r\n 'Background Color' => __('Background Color')\r\n );\r\n\r\n // Returning the new columns\r\n return $columns;\r\n\r\n}",
"protected function _prepareColumns()\n\t{\n\t\tparent::_prepareColumns();\n\t\t\n\t\t// remove old columns\n\t\t$this->removeColumn('gender'); // futureproof\n $this->removeColumn('lastname');\n $this->removeColumn('firstname');\n\t\t\n\t\t// add new columns\n\t\t$this->addColumnAfter('gender', array(\n\t\t\t'header' => Mage::helper('newsletter')->__('Gender'),\n 'index' => 'customer_gender',\n 'type' => 'options',\n 'options' => array(\n 1 => Mage::helper('newsletter')->__('Mr'),\n 2 => Mage::helper('newsletter')->__('Ms/Mrs')\n ),\n\t\t\t'renderer'\t=> 'Mediarocks_NewsletterExtended_Adminhtml_Block_Newsletter_Subscriber_Grid_Renderer_Gender'\n\t\t), 'type');\n\t\t\n\t\t$this->addColumnAfter('firstname', array(\n\t\t\t'header' => Mage::helper('newsletter')->__('Firstname'),\n 'index' => 'customer_firstname',\n\t\t\t'renderer'\t=> 'Mediarocks_NewsletterExtended_Adminhtml_Block_Newsletter_Subscriber_Grid_Renderer_Firstname'\n\t\t), 'gender');\n\t\t\n\t\t$this->addColumnAfter('lastname', array(\n\t\t\t'header' => Mage::helper('newsletter')->__('Lastname'),\n 'index' => 'customer_lastname',\n\t\t\t'renderer'\t=> 'Mediarocks_NewsletterExtended_Adminhtml_Block_Newsletter_Subscriber_Grid_Renderer_Lastname'\n\t\t), 'firstname');\n\n\t\t// manually sort again, that our custom order works\n\t\t$this->sortColumnsByOrder();\n\t\t\n return $this;\n }",
"function pgm_subscriber_column_headers($columns){\n $columns = array(\n 'cb'=>'<input type=\"checkbox\" />', //checkbox-HTML empty checkbox\n 'title'=>__('Subscriber Name'), //update header name to 'Subscriber Name'\n 'email'=>__('Email Address'), //create new header for email\n );\n\n return $columns;\n}",
"protected function _prepareColumns()\n {\n $this->addColumn('ID',\n array(\n 'header'=> $this->__('ID'),\n 'width' => '50px',\n 'index' => 'ID'\n )\n );\n\n\n $this->addColumn('browser',\n array(\n 'header'=> $this->__('Browser Data'),\n 'width' => '50px',\n 'index' => 'browser',\n 'renderer' => 'Mage_Osc_Block_Renderers_Browser'\n )\n );\n\n\n $this->addColumn('quote_id',\n array(\n 'header'=> $this->__('ID do Carrinho'),\n 'width' => '50px',\n 'index' => 'quote_id'\n )\n );\n\n\n $this->addColumn('order_id',\n array(\n 'header'=> $this->__('ID do Pedido'),\n 'width' => '50px',\n 'index' => 'order_id',\n 'renderer' => 'Mage_Osc_Block_Renderers_Order'\n )\n );\n\n\n $this->addColumn('customer_id',\n array(\n 'header'=> $this->__('Cliente'),\n 'width' => '50px',\n 'index' => 'customer_id',\n 'renderer' => 'Mage_Osc_Block_Renderers_Customer'\n )\n );\n\n\n $this->addColumn('clickedfo',\n array(\n 'header'=> $this->__('Quantidade de Cliques'),\n 'width' => '50px',\n 'index' => 'clickedfo'\n )\n );\n\n\n $this->addColumn('payment_method',\n array(\n 'header'=> $this->__('Método de Pagamento'),\n 'width' => '50px',\n 'index' => 'payment_method'\n )\n );\n\n\n return parent::_prepareColumns();\n }",
"protected function _prepareColumns()\n {\n $this->addColumn('hourbelt_id', array(\n 'header' => Mage::helper('recomiendo_recipes')->__('ID'),\n 'width' => '50px',\n 'index' => 'hourbelt_id',\n ));\n\n $this->addColumn('name', array(\n 'header' => Mage::helper('recomiendo_recipes')->__('Nombre Franja'),\n 'index' => 'name',\n ));\n\n $this->addColumn('start', array(\n 'header' => Mage::helper('recomiendo_recipes')->__('Hora Inicio'),\n 'index' => 'start',\n ));\n\n $this->addColumn('finish', array(\n 'header' => Mage::helper('recomiendo_recipes')->__('Hora Fin'),\n 'index' => 'finish',\n ));\n\n return parent::_prepareColumns();\n }",
"function register_column_headers($screen, $columns)\n {\n }",
"public function addHeaderColumns($columns)\n {\n return $columns;\n }",
"private function generate_columns_header($p_edit,&$p_resultat,&$p_result_header)\r\n\t\t{\r\n\t\t\t// Create a new line\r\n\t\t\t$html = '<tr id=\"tr_header_title_'.$this->c_id.'\">';\r\n\t\t\t\r\n\t\t\t/**==================================================================\r\n\t\t\t * Create the first column (checkbox and edit button)\r\n\t\t\t ====================================================================*/\t\r\n\t\t\t$html .= '<td align=\"left\" id=\"header_th_0__'.$this->c_id.'\" class=\"__'.$this->c_theme.'__cell_opt_h\"><div id=\"th0_'.$this->c_id.'\"></div></td>';\r\n\t\t\t$html .= '<td></td>';\r\n\t\t\t/*===================================================================*/\r\n\t\t\t\r\n\t\t\t// Quantify of order clause\r\n\t\t\t$qtt_order = $this->get_nbr_order();\r\n\t\t\t\r\n\t\t\t/**==================================================================\r\n\t\t\t * Display the resize cursor or not\r\n\t\t\t ====================================================================*/\t\r\n\t\t\tif($this->c_mode != __CMOD__)\r\n\t\t\t{\r\n\t\t\t\t$cursor = ' cur_resize';\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$cursor = '';\r\n\t\t\t}\r\n\t\t\t/*===================================================================*/\r\n\t\t\t\r\n\t\t\t/**==================================================================\r\n\t\t\t * Browse all columns\r\n\t\t\t ====================================================================*/\t\r\n\t\t\tforeach($this->c_columns as $key_col => $val_col)\r\n\t\t\t{\r\n\t\t\t\tif($val_col['display'])\r\n\t\t\t\t{\r\n\t\t\t\t\t/**==================================================================\r\n\t\t\t\t\t * Define order icon\r\n\t\t\t\t\t ====================================================================*/\t\r\n\t\t\t\t\tif($this->c_columns[$key_col]['order_by'] != false)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// An order clause is defined\r\n\t\t\t\t\t\tif($this->c_columns[$key_col]['order_by'] == __ASC__)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t// ASC icon\r\n\t\t\t\t\t\t\t$class_order = ' __'.$this->c_theme.'_ico_sort-ascend __'.$this->c_theme.'_ico';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse \r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t// DESC icon\r\n\t\t\t\t\t\t\t$class_order = ' __'.$this->c_theme.'_ico_sort-descend __'.$this->c_theme.'_ico';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// Display the number of order only if there is more than one order clause\r\n\t\t\t\t\t\t($qtt_order > 1) ? $order_prio = $this->c_columns[$key_col]['order_priority'] : $order_prio = '';\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// No order clause defined\r\n\t\t\t\t\t\t$class_order = '';\r\n\t\t\t\t\t\t$order_prio = '';\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Order column\r\n\t\t\t\t\t$html .= '<td class=\"__'.$this->c_theme.'_bloc_empty'.$class_order.'\"><span class=\"__vimofy_txt_mini_ vimofy_txt_top\">'.$order_prio.'</span></td>';\r\n\t\t\t\t\t/*===================================================================*/\r\n\t\t\t\t\t\r\n\t\t\t\t\t/**==================================================================\r\n\t\t\t\t\t * Define order icon\r\n\t\t\t\t\t ====================================================================*/\t\r\n\t\t\t\t\tif($this->c_mode != __CMOD__)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$onmousedown = 'onmousedown=\"vimofy_resize_column_start('.$key_col.',\\''.$this->c_id.'\\');\"';\r\n\t\t\t\t\t\t$ondblclick = 'ondblclick=\"vimofy_mini_size_column('.$key_col.',\\''.$this->c_id.'\\');\" ';\r\n\t\t\t\t\t\t$lib_redim = $this->hover_out_lib(17,17);\r\n\t\t\t\t\t\t$event = $this->hover_out_lib(40,40).' onmousedown=\"vimofy_move_column_start(event,'.$key_col.',\\''.$this->c_id.'\\');\"';\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$onmousedown = '';\r\n\t\t\t\t\t\t$ondblclick = '';\r\n\t\t\t\t\t\t$lib_redim = '';\r\n\t\t\t\t\t\t$event = $this->hover_out_lib(40,40).' onmousedown=\"click_column_order(\\''.$this->c_id.'\\','.$key_col.');\"';\r\n\t\t\t\t\t}\r\n\t\t\t\t\t/*===================================================================*/\r\n\r\n\t\t\t\t\t// Column title\r\n\t\t\t\t\t$html .= '<td align=\"left\" class=\"__'.$this->c_theme.'__cell_h nowrap\" id=\"header_th_'.$key_col.'__'.$this->c_id.'\"><div '.$event.' class=\"align_'.$this->c_columns[$key_col]['alignment'].' __'.$this->c_theme.'_column_title\" id=\"th'.$key_col.'_'.$this->c_id.'\"><span id=\"span_'.$key_col.'_'.$this->c_id.'\">'.$this->c_columns[$key_col]['name'].'</span></div></td>';\r\n\t\t\t\t\t\r\n\t\t\t\t\t/**==================================================================\r\n\t\t\t\t\t * Display other column\r\n\t\t\t\t\t ====================================================================*/\t\r\n\t\t\t\t\tif($p_edit != false) $html .= '<td style=\"padding:0;margin:0;\"></td>';\r\n\r\n\t\t\t\t\t$html .= '<td '.$lib_redim.' '.$ondblclick.' '.$onmousedown.' class=\"__'.$this->c_theme.'__cell_h_resizable'.$cursor.'\"><div class=\"__'.$this->c_theme.'__cell_resize\"></div></td>';\r\n\t\t\t\t\t$html .= '<td '.$lib_redim.' '.$ondblclick.' '.$onmousedown.' class=\"__'.$this->c_theme.'__sep_h'.$cursor.'\"></td>';\r\n\t\t\t\t\t$html .= '<td id=\"right_mark_'.$key_col.'_'.$this->c_id.'\" '.$lib_redim.' '.$ondblclick.' '.$onmousedown.' class=\"__'.$this->c_theme.'__cell_h_resizable'.$cursor.'\"><div class=\"__'.$this->c_theme.'__cell_resize\"></div></td>';\r\n\t\t\t\t\t/*===================================================================*/\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$html .= '</tr>';\r\n\t\t\t/*===================================================================*/\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t/**==================================================================\r\n\t\t\t * Input for search on the column\r\n\t\t\t ====================================================================*/\t\r\n\t\t\t// Create a new line\r\n\t\t\t$html .= '<tr id=\"tr_header_input_'.$this->c_id.'\">';\r\n\t\t\t\r\n\t\t\t// Create the first column (checkbox and edit button)\r\n\t\t\t$html .= '<td align=\"left\" class=\"__'.$this->c_theme.'__cell_opt_h\"><div id=\"thf0_'.$this->c_id.'\" class=\"__'.$this->c_theme.'__vimofy_version\" onclick=\"window.open(\\'vimofy_bugs\\');\">v'.$this->c_software_version.'</div></td>';\r\n\t\t\t\r\n\t\t\t// Id column display counter\r\n\t\t\t$id_col_display = 0;\r\n\t\t\t\r\n\t\t\r\n\t\t\t/**==================================================================\r\n\t\t\t * Browse all columns\r\n\t\t\t ====================================================================*/\t\r\n\t\t\tforeach($this->c_columns as $key_col => $val_col)\r\n\t\t\t{\r\n\t\t\t\tif($val_col['display'])\r\n\t\t\t\t{\r\n\t\t\t\t\tif($id_col_display == 0)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$html .= '<td id=\"th_0_c'.$key_col.'_'.$this->c_id.'\"></td>';\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse \r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$html .= '<td id=\"th_0_c'.($key_col).'_'.$this->c_id.'\" '.$this->hover_out_lib(17,17).' '.$ondblclick.' '.$onmousedown.' class=\"__'.$this->c_theme.'__cell_h_resizable'.$cursor.'\"><div class=\"__'.$this->c_theme.'__cell_resize\"></div></td>';\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t/*if(isset($this->c_columns[$key_col]))\r\n\t\t\t\t\t{*/\r\n\t\t\t\t\t\t$onmousedown = 'onmousedown=\"vimofy_resize_column_start('.$key_col.',\\''.$this->c_id.'\\');\"';\r\n\t\t\t\t\t\t$ondblclick = 'ondblclick=\"vimofy_mini_size_column('.$key_col.',\\''.$this->c_id.'\\');\" ';\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t/**==================================================================\r\n\t\t\t\t\t\t * Define the filter value\r\n\t\t\t\t\t\t ====================================================================*/\t\r\n\t\t\t\t\t\t$filter_input_value = '';\r\n\t\t\t\t\t\t$state_filter_input = '';\r\n\t\t\t\t\t\tif(isset($val_col['filter']['input']))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t// A filter was defined by the user\r\n\t\t\t\t\t\t\t$filter_input_value = $val_col['filter']['input']['filter'];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t// No filter was defined by the user\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t// Check if vimofy was in edit mode\r\n\t\t\t\t\t\t\tif($p_edit != false && !isset($val_col['rw_flag']) || ($p_edit != false && isset($val_col['rw_flag']) && $val_col['rw_flag'] != __FORBIDEN__))\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t// The vimofy was in edit mode, search all same value in the column\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t// Place the cursor on the first row of the recordset\r\n\t\t\t\t\t\t\t\tif($this->c_obj_bdd->rds_num_rows($p_result_header) > 0)\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t$this->c_obj_bdd->rds_data_seek($p_result_header,0);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t// TODO Use a DISTINCT QUERY - Vimofy 1.0\r\n\t\t\t\t\t\t\t\t$key_cold_line = 0;\r\n\t\t\t\t\t\t\t\t$last_value = '';\r\n\t\t\t\t\t\t\t\t$flag_same = false;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\twhile($row = $this->c_obj_bdd->rds_fetch_array($p_result_header))\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\tif($key_cold_line > 0)\r\n\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\tif($last_value == $row[$val_col['sql_as']])\r\n\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t$flag_same = true;\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t$flag_same = false;\r\n\t\t\t\t\t\t\t\t\t\t\t// The value is not the same of the previous, stop browsing data \r\n\t\t\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t$flag_same = true;\r\n\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\t$last_value = $row[$val_col['sql_as']];\r\n\t\t\t\t\t\t\t\t\t$key_cold_line = $key_cold_line + 1;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tif($flag_same)\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t$filter_input_value = $last_value;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse \r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t$filter_input_value = '';\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse \r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tif($p_edit != false && isset($val_col['rw_flag']) && $val_col['rw_flag'] == __FORBIDEN__)\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t$state_filter_input = 'disabled';\t\t\t\t\t\t\t\t\t// Disable the input because the edition of column is forbiden\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t/*===================================================================*/\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(isset($val_col['filter']))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$class_btn_menu = '__'.$this->c_theme.'_menu_header_on __'.$this->c_theme.'_men_head';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse \r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif(isset($val_col['lov']) && isset($val_col['is_lovable']) && $val_col['is_lovable'] == true)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$class_btn_menu = '__'.$this->c_theme.'_menu_header_lovable __'.$this->c_theme.'_men_head';\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tif(isset($val_col['lov']))\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t$class_btn_menu = '__'.$this->c_theme.'_menu_header_no_icon __'.$this->c_theme.'_men_head';\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t$class_btn_menu = '__'.$this->c_theme.'_menu_header __'.$this->c_theme.'_men_head';\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t/**==================================================================\r\n\t\t\t\t\t\t * Menu button oncontextmenu\r\n\t\t\t\t\t\t ====================================================================*/\t\r\n\t\t\t\t\t\tif($this->c_type_internal_vimofy == false)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t// Principal vimofy, diplay internal vimofy\r\n\t\t\t\t\t\t\t$oncontextmenu = 'vimofy_display_internal_vim(\\''.$this->c_id.'\\',__POSSIBLE_VALUES__,'.$key_col.');return false;';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t// Internal vimofy, doesn't display other internal vimofy\r\n\t\t\t\t\t\t\t$oncontextmenu = 'return false;';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t/*===================================================================*/\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$html .= '<td id=\"th_1_c'.$key_col.'_'.$this->c_id.'\" class=\"__vimofy_unselectable\" style=\"width:20px;\"><div style=\"width:20px;margin:0;\" '.$this->hover_out_lib(21,21).' oncontextmenu=\"'.$oncontextmenu.'\" class=\"'.$class_btn_menu.'\" onclick=\"vimofy_toggle_header_menu(\\''.$this->c_id.'\\','.$key_col.');\" id=\"th_menu_'.$key_col.'__'.$this->c_id.'\"></div></td>';\r\n\t\t\t\t\t\t$html .= '<td id=\"th_2_c'.$key_col.'_'.$this->c_id.'\" align=\"left\" class=\"__'.$this->c_theme.'__cell_h\">';\r\n\t\t\t\t\t\t$html .= '<div style=\"margin:0 3px;\"><input value=\"'.str_replace('\"','"',$filter_input_value).'\" class=\"__'.$this->c_theme.'__input_h full_width\" '.$state_filter_input.' id=\"th_input_'.$key_col.'__'.$this->c_id.'\" type=\"text\" style=\"margin: 2px 0;\" size=1 onkeyup=\"if(document.getElementById(\\'chk_edit_c'.$key_col.'_'.$this->c_id.'\\'))document.getElementById(\\'chk_edit_c'.$key_col.'_'.$this->c_id.'\\').checked=true;vimofy_input_keydown(event,this,\\''.$this->c_id.'\\','.$key_col.');\" onchange=\"vimofy_col_input_change(\\''.$this->c_id.'\\','.$key_col.');\"/></div>';\r\n\t\t\t\t\t\tif($p_edit != false)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif($state_filter_input == '')\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$html .= '<td style=\"width:10px;padding:0;margin:0;\"><input '.$this->hover_out_lib(76,76).' type=\"checkbox\" id=\"chk_edit_c'.$key_col.'_'.$this->c_id.'\" style=\"height:11px;width:11px;margin: 0 5px 0 2px;display:block;\"/></td>';\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$html .= '<td style=\"width:0;padding:0;margin:0;\"></td>';\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$html .= '</td>';\r\n\t\t\t\t\t\t$html .= '<td id=\"th_3_c'.$key_col.'_'.$this->c_id.'\" '.$this->hover_out_lib(17,17).' '.$ondblclick.' '.$onmousedown.' class=\"__'.$this->c_theme.'__cell_h_resizable'.$cursor.'\"><div class=\"__'.$this->c_theme.'__cell_resize\"></div></td>';\r\n\t\t\t\t\t\t$html .= '<td id=\"th_4_c'.$key_col.'_'.$this->c_id.'\" '.$this->hover_out_lib(17,17).' '.$ondblclick.' '.$onmousedown.' class=\"__'.$this->c_theme.'__sep_h'.$cursor.'\"></td>';\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$id_col_display = $id_col_display + 1;\r\n\t\t\t\t//}\r\n\t\t\t}\r\n\t\t\t/*===================================================================*/\r\n\t\t\t\r\n\t\t\t$html .= '<td id=\"th_0_c'.($key_col+1).'_'.$this->c_id.'\" '.$this->hover_out_lib(17,17).' '.$ondblclick.' '.$onmousedown.' class=\"__'.$this->c_theme.'__cell_h_resizable'.$cursor.'\"><div class=\"__'.$this->c_theme.'__cell_resize\"></div></td>';\r\n\t\t\t$html.= '<td><div style=\"width:200px\"></div></td>';\r\n\t\t\t$html .= '</tr>';\r\n\t\t\t/*===================================================================*/\r\n\r\n\t\t\t// Place the cursor on the first row of the recordset\r\n\t\t\tif($this->c_obj_bdd->rds_num_rows($p_resultat) > 0)\r\n\t\t\t{\r\n\t\t\t\t$this->c_obj_bdd->rds_data_seek($p_resultat,0);\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t\treturn $html;\r\n\t\t}",
"function header() {\n //\n //Get the fields in this sql \n $cols= $this->fields->get_array();\n //\n //Loop through the fields and display the <tds>\n foreach ($cols as $col) {\n //\n $name= is_null($col->alias) ? $col->to_str():$col->alias;\n echo \"<th>$name</th>\"; \n }\n }",
"private function _setColumns()\n {\n $this->columns = new Pike_Grid_DataSource_Columns();\n\n foreach ($this->_query->getFields() as $field) {\n $this->columns->add($field, null, $field);\n }\n }",
"function headers()\n {\n // Maintain URL params for pagination\n if (empty($this->params['pass'])) {\n $this->params['pass'] = array();\n }\n $options = array(\n 'url' => array_merge($this->tableOptions['url'], $this->params['named'], $this->params['pass']),\n //'model' => $this->defaultModel\n );\n if (!empty($this->tableOptions['ajax'])) {\n $options['update'] = $this->tableOptions['ajax']['mh-update'];\n $options['indicator'] = $this->tableOptions['ajax']['mh-indicator'];\n $options['before'] = $this->Js->get($options['indicator'])->effect('fadeIn', array('buffer' => false));\n $options['complete'] = $this->Js->get($options['indicator'])->effect('fadeOut', array('buffer' => false));\n }\n\n\n $this->Paginator->options($options);\n\n $lines = array();\n foreach ($this->Columns as $field => $Column) {\n $lines[] = $headerHTML[] = $Column->header();\n }\n\n $row = $this->Html->tag('tr', implode(chr(10), $lines));\n\n return $this->Html->tag('thead', $row);\n }",
"public function set_custom_column( $columns )\n {\n /* We are going to rearrange the information */\n $title = $columns['title'];\n $date = $columns['date'];\n unset ( $columns['title'] , $columns['date'] );\n\n $columns['name'] = 'Author Name';\n $columns['title'] = $title;\n $columns['approved'] = 'Approved';\n $columns['featured'] = 'Featured';\n $columns['date'] = $date;\n return ( $columns );\n }",
"protected function _prepareColumns()\n {\n \t// Checkbox\n \t$checkboxColumnBody = new Lumia_DataGrid_Body_Checkbox('student_id[]');\n \t$checkboxColumnHeader = new Lumia_DataGrid_Header_Checkbox();\n $this->addColumn(new Lumia_DataGrid_Column($checkboxColumnBody, $checkboxColumnHeader));\n \n // Name\n $nameColumnBody = new Lumia_DataGrid_Body_Text('student_name');\n $nameColumnHeader = new Lumia_DataGrid_Header_Text('StudentListView:@Name');\n $this->addColumn(new Lumia_DataGrid_Column($nameColumnBody, $nameColumnHeader));\n \n // Code\n $codeColumnBody = new Lumia_DataGrid_Body_Text('student_code');\n $codeColumnHeader = new Lumia_DataGrid_Header_Text('StudentListView:@Code');\n $this->addColumn(new Lumia_DataGrid_Column($codeColumnBody, $codeColumnHeader));\n \n // Date of birth\n $dateColumnBody = new Lumia_DataGrid_Body_Date('student_birth');\n $dateColumnBody->setOptions(array('dateFormat' => 'dd/MM/yyyy'));\n $dateColumnHeader = new Lumia_DataGrid_Header_Text('StudentListView:@Date of birth');\n $this->addColumn(new Lumia_DataGrid_Column($dateColumnBody, $dateColumnHeader));\n \n // Gender\n $genderColumnBody = new Admin_DataGrid_Student_Body_Gender('student_gender');\n $genderColumnHeader = new Lumia_DataGrid_Header_Text('StudentListView:@Gender');\n $this->addColumn(new Lumia_DataGrid_Column($genderColumnBody, $genderColumnHeader));\n \n // Class\n $classColumnBody = new Lumia_DataGrid_Body_Text('class_department');\n $classColumnHeader = new Lumia_DataGrid_Header_Text('StudentListView:@Class/Department');\n $this->addColumn(new Lumia_DataGrid_Column($classColumnBody, $classColumnHeader));\n \n // Status\n $statusColumnBody = new Admin_DataGrid_Student_Body_Status('user_status');\n $statusColumnHeader = new Lumia_DataGrid_Header_Text('StudentListView:@Status');\n $this->addColumn(new Lumia_DataGrid_Column($statusColumnBody, $statusColumnHeader));\n \n // Action\n $actionColumnBody = new Admin_DataGrid_Student_Body_Action('actionColumn');\n $actionColumnHeader = new Lumia_DataGrid_Header_Text();\n $this->addColumn(new Lumia_DataGrid_Column($actionColumnBody, $actionColumnHeader));\n }",
"function hub_columns( $columns ) {\r\n $columns['hub_title'] = 'HUB Title';\r\n $columns['client'] = 'Client';\r\n\r\n unset( $columns['title'] );\r\n unset( $columns['date'] );\r\n\r\n $columns['date'] = 'Date';\r\n\r\n return $columns;\r\n }",
"function adleex_resource_list_column_header( $cols ) {\nglobal $current_screen;\n\n\tif ($current_screen->post_type!='resource') return $cols;\n\n\tunset($cols['date']);\n\t$header = array(\n 'post_title' => 'title', );\n\tforeach($header\tas $k => $v) $cols[$k]=$v;\n\treturn $cols;\n}",
"protected function get_sortable_columns()\n {\n }",
"protected function get_sortable_columns()\n {\n }",
"protected function get_sortable_columns()\n {\n }",
"protected function _prepareColumns()\n {\n/*\n $this->addColumn('version_number', array(\n 'header' => Mage::helper('gri_cms')->__('Version #'),\n 'width' => 100,\n 'index' => 'version_number',\n 'type' => 'options',\n 'options' => Mage::helper('gri_cms')->getVersionsArray($this->getPage())\n ));\n*/\n $this->addColumn('label', array(\n 'header' => Mage::helper('gri_cms')->__('Version Label'),\n 'index' => 'label',\n 'type' => 'options',\n 'options' => $this->getCollection()\n ->getAsArray('label', 'label')\n ));\n\n $this->addColumn('owner', array(\n 'header' => Mage::helper('gri_cms')->__('Owner'),\n 'index' => 'username',\n 'type' => 'options',\n 'options' => $this->getCollection()->getUsersArray(false),\n 'width' => 250\n ));\n\n $this->addColumn('access_level', array(\n 'header' => Mage::helper('gri_cms')->__('Access Level'),\n 'index' => 'access_level',\n 'type' => 'options',\n 'width' => 100,\n 'options' => Mage::helper('gri_cms')->getVersionAccessLevels()\n ));\n\n $this->addColumn('revisions', array(\n 'header' => Mage::helper('gri_cms')->__('Revisions Qty'),\n 'index' => 'revisions_count',\n 'type' => 'number'\n ));\n\n $this->addColumn('created_at', array(\n 'width' => 150,\n 'header' => Mage::helper('gri_cms')->__('Created At'),\n 'index' => 'created_at',\n 'type' => 'datetime',\n ));\n\n return parent::_prepareColumns();\n }",
"protected function _prepareColumns()\n {\n $this->addColumn('increment_id', array(\n 'header' => Mage::helper('sales')->__('Shipment #'),\n 'index' => 'increment_id',\n 'filter_index' => 'main_table.increment_id',\n 'type' => 'text',\n ));\n $this->addColumn('shipment_id', array(\n 'header' => Mage::helper('sales')->__('Shipment #'),\n 'index' => 'entity_id',\n 'filter_index' => 'main_table.entity_id',\n 'type' => 'text',\n ));\n\n $this->addColumn('canpar_shipment_id', array(\n 'header' => Mage::helper('sales')->__('Canpar Shipment #'),\n 'index' => 'canpar_shipment_id',\n 'filter_index' => 'ch_shipment.shipment_id',\n 'type' => 'text',\n ));\n\n $this->addColumn('manifest_id', array(\n 'header' => Mage::helper('sales')->__('Canpar Manifest #'),\n 'index' => 'manifest_id',\n 'renderer' => 'canparmodule/adminhtml_canparshipment_renderer_manifestId',\n 'filter_index' => 'ch_shipment.manifest_id',\n ));\n\n $this->addColumn('created_at', array(\n 'header' => Mage::helper('sales')->__('Date Shipped'),\n 'index' => 'created_at',\n 'filter_index' =>'main_table.created_at',\n 'type' => 'datetime',\n ));\n\n $this->addColumn('order_increment_id', array(\n 'header' => Mage::helper('sales')->__('Order #'),\n 'index' => 'order_increment_id',\n 'filter_index'=> 'o.increment_id',\n 'type' => 'text',\n ));\n\n $this->addColumn('order_created_date', array(\n 'header' => Mage::helper('sales')->__('Order Date'),\n 'index' => 'order_created_date',\n 'filter_index' =>'o.created_at',\n 'type' => 'datetime',\n ));\n\n $this->addColumn('total_qty', array(\n 'header' => Mage::helper('sales')->__('Total Qty'),\n 'index' => 'total_qty',\n 'type' => 'number',\n ));\n\n $this->addColumn('action',\n array(\n 'header' => Mage::helper('sales')->__('Action'),\n 'width' => '50px',\n 'type' => 'action',\n 'getter' => 'getId',\n 'actions' => array(\n array(\n 'caption' => Mage::helper('sales')->__('View'),\n 'url' => array('base'=>'*/sales_shipment/view'),\n 'field' => 'shipment_id'\n )\n ),\n 'filter' => false,\n 'sortable' => false,\n 'is_system' => true\n ));\n\n $this->addExportType('*/*/exportCsv', Mage::helper('sales')->__('CSV'));\n $this->addExportType('*/*/exportExcel', Mage::helper('sales')->__('Excel XML'));\n\n return parent::_prepareColumns();\n }",
"protected function _prepareColumns()\n {\n \tparent::_prepareColumns();\n \tunset($this->_columns['actionColumn']);\n }",
"protected function _prepareColumns()\n {\n $this->addColumn(\n 'in_worksheets',\n array(\n 'header_css_class' => 'a-center',\n 'type' => 'checkbox',\n 'name' => 'in_worksheets',\n 'values'=> $this->_getSelectedWorksheets(),\n 'align' => 'center',\n 'index' => 'entity_id'\n )\n );\n $this->addColumn(\n 'ws_name',\n array(\n 'header' => Mage::helper('bs_worksheet')->__('Worksheet Name'),\n 'align' => 'left',\n 'index' => 'ws_name',\n 'renderer' => 'bs_worksheet/adminhtml_helper_column_renderer_relation',\n 'params' => array(\n 'id' => 'getId'\n ),\n 'base_link' => 'adminhtml/worksheet_worksheet/edit',\n )\n );\n $this->addColumn(\n 'ws_code',\n array(\n 'header' => Mage::helper('bs_worksheet')->__('Worksheet Code'),\n 'align' => 'left',\n 'index' => 'ws_code',\n )\n );\n $this->addColumn(\n 'position',\n array(\n 'header' => Mage::helper('bs_worksheet')->__('Position'),\n 'name' => 'position',\n 'width' => 60,\n 'type' => 'number',\n 'validate_class' => 'validate-number',\n 'index' => 'position',\n 'editable' => true,\n )\n );\n return parent::_prepareColumns();\n }",
"protected function _prepareColumns()\n {\n \t\n \t/*$this->addColumn('module',\n array(\n 'header' => 'SugarCRM Module Name',\n 'align' =>'left',\n 'index' => 'module',\n \t ));*/\n\t\t\n\t\t$this->addColumn('fields', array(\n 'header' => 'SugarCRM Field Name',\n 'align' =>'left',\n 'index' => 'wp_meta_label',\n \t \t ));\n\t\t\n\t\t/*$this->addColumn('fieldtype', array(\n 'header' => 'Field Type',\n 'align' =>'left',\n 'index' => 'field_type',\n \t\t ));*/\n\t\t\t\t \n\t\t$this->addColumn(\"magfield\", array(\n\t\t\t\t\t\"header\" \t=> Mage::helper(\"contact\")->__(\"Magento Field Names\"),\n\t\t\t\t\t'filter' => false,\n\t\t\t\t\t'sortable' => false,\n\t\t\t\t\t'align' =>'left',\n\t\t\t\t\t'width'\t\t=> '45%',\n\t\t\t\t\t'renderer' \t=> 'Offshoreevolution_Contact_Block_Adminhtml_Synctable_Grid_Renderer_Filter'\n\t\t\t\t )); \n\t\t\n\t\t$this->addColumn(\"actionButton\", array(\n\t\t\t\t\t\"header\" \t=> Mage::helper(\"contact\")->__(\"Action\"),\n\t\t\t\t\t'filter' => false,\n\t\t\t\t\t'sortable' => false,\n\t\t\t\t\t'align' =>'center',\n\t\t\t\t\t'width'\t\t=> '80',\n\t\t\t\t\t'renderer' \t=> 'Offshoreevolution_Contact_Block_Adminhtml_Synctable_Grid_Renderer_Button'\n\t\t\t\t )); \n\t\t//$this->addColumn('action',\n//\t\t\t\t\tarray(\n//\t\t\t\t\t'header' => Mage::helper('sugarcrm')->__('Action'),\n//\t\t\t\t\t'width' => '100',\n//\t\t\t\t\t'type' => 'action',\n//\t\t\t\t\t'getter' => 'getId',\n//\t\t\t\t\t'index' => 'pid',\n//\t\t\t\t\t'actions' => array(\n//\t\t\t\t\t\t\tarray(\n//\t\t\t\t\t\t\t\t\t'caption' => Mage::helper('sugarcrm')->__('Sync'),\n//\t\t\t\t\t\t\t\t\t'class'\t\t=> 'syncAction',\n//\t\t\t\t\t\t\t\t\t//'url' => array('base'=> '*/*/edit'),\n//\t\t\t\t\t\t\t\t\t\n//\t\t\t\t\t\t\t\t\t'field' => 'id'\n//\t\t\t\t\t\t\t)\n//\t\t\t\t\t),\n//\t\t\t\t\t'filter' => false,\n//\t\t\t\t\t'sortable' => false,\n//\t\t\t\t\t'index' => 'stores',\n//\t\t\t\t\t'is_system' => true,\n//\t\t));\n//\t\t$this->addColumn('id',\n// array(\n// 'header' => 'ID',\n// 'align' =>'right',\n// 'width' => '50px',\n// 'index' => 'pid',\n//\t\t\t\t\t'column_css_class'=>'no-display',\n// \t\t\t\t\t'header_css_class'=>'no-display'\n// \t ));\n return parent::_prepareColumns();\n }",
"protected function _prepareColumns()\n {\n\n $this->addColumn(\n 'entity_id',\n array(\n 'header' => Mage::helper('bs_docwise')->__('Id'),\n 'index' => 'entity_id',\n 'type' => 'number'\n )\n );\n\n $this->addColumn(\n 'in_docwisements',\n array(\n 'header_css_class' => 'a-center',\n 'type' => 'checkbox',\n 'name' => 'in_docwisements',\n 'values'=> $this->_getSelectedDocwisements(),\n 'align' => 'center',\n 'index' => 'entity_id'\n )\n );\n\n $this->addColumn(\n 'doc_name',\n array(\n 'header' => Mage::helper('bs_docwise')->__('Document Name'),\n 'align' => 'left',\n 'index' => 'doc_name',\n )\n );\n\n\n $this->addColumn(\n 'doc_type',\n array(\n 'header' => Mage::helper('bs_docwise')->__('Document Type'),\n 'index' => 'doc_type',\n 'type' => 'options',\n 'options' => Mage::helper('bs_docwise')->convertOptions(\n Mage::getModel('bs_docwise/docwisement_attribute_source_doctype')->getAllOptions(false)\n )\n\n )\n );\n $this->addColumn(\n 'doc_date',\n array(\n 'header' => Mage::helper('bs_docwise')->__('Date'),\n 'index' => 'doc_date',\n 'type'=> 'date',\n\n )\n );\n\n $this->addColumn(\n 'download',\n array(\n 'header' => Mage::helper('bs_docwise')->__('View/Download'),\n 'type' =>'text',\n 'renderer' => 'bs_docwise/adminhtml_helper_column_renderer_download',\n\n 'filter' => false,\n 'sortable' => false,\n )\n );\n\n $this->addColumn(\n 'position',\n array(\n 'header' => Mage::helper('catalog')->__('Position'),\n 'name' => 'position',\n 'width' => 60,\n 'type' => 'number',\n 'validate_class' => 'validate-number',\n 'index' => 'position',\n 'editable' => true,\n )\n );\n $this->addColumn(\n 'action',\n array(\n 'header' => Mage::helper('bs_docwise')->__('Action'),\n 'width' => '100',\n 'type' => 'action',\n 'getter' => 'getId',\n 'actions' => array(\n array(\n 'caption' => Mage::helper('bs_docwise')->__('Edit'),\n 'url' => array('base'=> '*/docwise_docwisement/edit'),\n 'field' => 'id'\n )\n ),\n 'filter' => false,\n 'is_system' => true,\n 'sortable' => false,\n )\n );\n }",
"public function csvHeaders()\n\t{\n\t\t$headers = array();\n\t\tforeach ($this->Columns as $field => $Column) {\n\t\t\t$headers[] = $Column->label();\n\t\t}\n\t\treturn $headers;\n\t}",
"public function get_columns()\n {\n }",
"public function get_columns()\n {\n }",
"function taxonomy_header($cat_columns) {\r\n\t\t$cat_columns['cat_id'] = 'ID';\r\n\t\treturn $cat_columns;\r\n\t}",
"public function get_columns()\n {\n }",
"public function get_columns()\n {\n }",
"public function get_columns()\n {\n }",
"public function get_columns()\n {\n }",
"function wpc_client_my_columns( $columns ) {\r\n $columns['clients'] = 'Clients';\r\n $columns['groups'] = 'Client Circles';\r\n\r\n unset($columns['date']);\r\n $columns['date'] = 'Date';\r\n\r\n return $columns;\r\n }",
"public function getColumnNames();",
"public function renderTableHeader()\n {\n $cells = [];\n foreach ($this->columns as $column) {\n /* @var $column Column */\n $cells[] = $column->renderHeaderCell();\n }\n $content = Html::tag('tr', implode('', $cells), $this->headerRowOptions);\n if ($this->filterPosition === self::FILTER_POS_HEADER) {\n $content = $this->renderFilters() . $content;\n } elseif ($this->filterPosition === self::FILTER_POS_BODY) {\n $content .= $this->renderFilters();\n }\n\n return \"<thead>\\n\" . $content . \"\\n</thead>\";\n }",
"function pgm_list_column_headers($columns){\n $columns = array(\n 'cb'=>'<input type=\"checkbox\" />', //checkbox-HTML empty checkbox\n 'title'=>__('Lists'), //update header name to 'List Name'\n 'shortcode'=>__('Shortcode'),\n );\n\n return $columns;\n}",
"public function getTableHeaders()\n {\n return ['#', 'Fatura','Ordem Servico'];\n }",
"private function buildHeader()\n\t{\n\t\tif ($this->hide_header)\n\t\t\treturn;\n\n\t\techo '<thead><tr>';\n\n\t\t// Get field names of result\n\t\t$headers = $this->_db->fieldNameArray($this->result);\n\t\t$this->column_count = count($headers);\n\n\t\t// Add a blank column if the row number is to be shown\n\t\tif ($this->show_row_number)\n\t\t{\n\t\t\t$this->column_count++;\n\t\t\techo '<td class=\"tbl-header\"> </td>';\n\t\t}\n\n\t\t// Show checkboxes\n\t\tif ($this->show_checkboxes)\n\t\t{\n\t\t\t$this->column_count++;\n\t\t\techo '<td class=\"tbl-header tbl-checkall\"><input type=\"checkbox\" name=\"checkall\" onclick=\"tblToggleCheckAll'.$this->_clsnumber.'()\"></td>';\n\t\t}\n\n\t\t// Loop through each header and output it\n\t\tforeach ($headers as $t)\n\t\t{\n\t\t\t// Skip column if hidden\n\t\t\tif (in_array($t, $this->hidden))\n\t\t\t{\n\t\t\t\t$this->column_count--;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Check for header caption overrides\n\t\t\tif (array_key_exists($t, $this->header))\n\t\t\t\t$header = $this->header[$t];\n\t\t\telse\n\t\t\t\t$header = $t;\n\n\t\t\tif ($this->hide_order)\n\t\t\t\techo '<td class=\"tbl-header\">' . $header; // Prevent the user from changing order\n\t\t\telse {\n\t\t\t\tif ($this->order and $this->order['Column'] == $t)\n\t\t\t\t\t$order = ($this->order['Order'] == self::ORDER_ASC)\n\t\t\t\t\t? self::ORDER_DESC\n\t\t\t\t\t: self::ORDER_ASC;\n\t\t\t\telse\n\t\t\t\t\t$order = self::ORDER_ASC;\n\n\t\t\t\techo '<td class=\"tbl-header\"><a href=\"javascript:;\" onclick=\"tblSetOrder'.$this->_clsnumber.'(\\'' . $t . '\\', \\'' . $order . '\\')\">' . $header . \"</a>\";\n\n\t\t\t\t// Show the user the order image if set\n\t\t\t\tif ($this->order and $this->order['Column'] == $t)\n\t\t\t\t\techo ' <img src=\"images/sort_' . strtolower($this->order['Order']) . '.gif\" class=\"tbl-order\">';\n\t\t\t}\n\n\t\t\t// Add filters if allowed and only if the column type is not \"special\"\n\t\t\tif ($this->allow_filters and !empty($t)){\n\t\t\t\t\t\n\t\t\t\tif (!in_array($this->type[$t][0], array(\n\t\t\t\t\t\tself::TYPE_ARRAY,\n\t\t\t\t\t\tself::TYPE_IMAGE,\n\t\t\t\t\t\tself::TYPE_FUNCTION,\n\t\t\t\t\t\tself::TYPE_DATE,\n\t\t\t\t\t\tself::TYPE_CHECK,\n\t\t\t\t\t\tself::TYPE_CUSTOM,\n\t\t\t\t\t\tself::TYPE_PERCENT\n\t\t\t\t)))\n\t\t\t\t{\n\t\t\t\t\tif ($this->filter['Column'] == $t and !empty($this->filter['Value']))\n\t\t\t\t\t{\n\t\t\t\t\t\t$filter_display = 'block';\n\t\t\t\t\t\t$filter_value = $this->filter['Value'];\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$filter_display = 'none';\n\t\t\t\t\t\t$filter_value = '';\n\t\t\t\t\t}\n\t\t\t\t\techo '<a href=\"javascript:;\" onclick=\"tblShowHideFilter'. $this->_clsnumber .'(\\'' . $t . '\\')\"> filter </a>\n\t\t\t\t\t<br><div class=\"tbl-filter-box\" id=\"'.$this->_clsnumber.'filter-' . $t . '\" style=\"display:' . $filter_display . '\">\n\t\t\t\t\t<input type=\"text\" size=\"6\" id=\"'.$this->_clsnumber.'filter-value-' . $t . '\" value=\"'.$filter_value.'\"> \n\t\t\t\t\t<a href=\"javascript:;\" onclick=\"tblSetFilter'.$this->_clsnumber.'(\\'' . $t . '\\')\">filter</a></div>';\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t}\n\n\t\t\techo '</td>';\n\t\t}\n\n\t\t// If we have controls, add a blank column\n\t\tif (count($this->controls) > 0)\n\t\t{\n\t\t\t$this->column_count++;\n\t\t\techo '<td class=\"tbl-header\"> </td>';\n\t\t}\n\n\t\techo '</tr></thead>';\n\t}",
"protected function addHeaderRowToCSV() {}",
"public function header()\n\t{\n\t\treturn array(\t'Translation ID (Do not change)',\n\t\t\t\t\t\t'Translation Group (Do not change)',\n\t\t\t\t\t\t'Original Text (Do not change)',\n\t\t\t\t\t\t'Translated Text (Change only this column to new translated text)');\n\t}",
"protected function _prepareColumns() {\n $this->addColumn('period', array(\n 'header' => Mage::helper('webpos')->__('Period'),\n 'align' => 'left',\n 'total' => 'sum',\n 'sortable' => false,\n 'filter' => false,\n 'index' => 'period',\n 'width' => '100px',\n ));\n $this->addColumn('user', array(\n 'header' => Mage::helper('webpos')->__('User'),\n 'align' => 'left',\n 'total' => 'sum',\n 'sortable' => false,\n 'filter' => false,\n 'index' => 'user',\n 'width' => '200px',\n ));\n $this->addColumn('totals_sales', array(\n 'header' => Mage::helper('webpos')->__('Sales Total'),\n 'align' => 'left',\n 'total' => 'sum',\n 'sortable' => false,\n 'filter' => false,\n 'width' => '100px',\n 'index' => 'totals_sales',\n 'type' => 'price',\n 'currency_code' => Mage::app()->getStore()->getBaseCurrency()->getCode(),\n ));\n $this->addExportType('*/*/exportCsv', Mage::helper('webpos')->__('CSV'));\n $this->addExportType('*/*/exportXml', Mage::helper('webpos')->__('XML'));\n\n return parent::_prepareColumns();\n }",
"protected function _prepareColumns()\n\t{\n\t\t$this->addColumn('id',\n\t\t\tarray(\n\t\t\t\t'header'=> $this->__('ID'),\n\t\t\t\t'align' =>'right',\n\t\t\t\t'width' => '50px',\n\t\t\t\t'index' => 'id'\n\t\t\t)\n\t\t);\n\n\t\t$this->addColumn('product_id',\n\t\t\tarray(\n\t\t\t\t'header'=> $this->__('Product ID'),\n\t\t\t\t'index' => 'product_id'\n\t\t\t)\n\t\t);\n\n\t\t$this->addColumn('increment_id',\n\t\t\tarray(\n\t\t\t\t'header'=> $this->__('Order ID'),\n\t\t\t\t'index' => 'increment_id'\n\t\t\t)\n\t\t);\n\n $this->addColumn('sfo.order_id',\n array(\n 'header' => Mage::helper('core')->__('View Order'),\n 'width' => '100',\n 'type' => 'action',\n 'getter' => 'getOrderId',\n 'actions' => array(\n array(\n 'caption' => Mage::helper('core')->__('View'),\n 'url' => array('base'=> 'adminhtml/sales_order/view'),\n 'field' => 'order_id',\n 'target' => '_blank'\n )\n ),\n 'filter' => false,\n 'sortable' => false,\n 'index' => 'stores',\n 'is_system' => true\n )\n );\n\n $this->addColumn('email',\n array(\n 'header'=> $this->__('Customer Email'),\n 'index' => 'email'\n )\n );\n\n $statusOptions = array(\n '0' => 'Working',\n '1' => 'Requested',\n '2' => 'Collected'\n );\n $this->addColumn('status',\n array(\n 'header'=> $this->__('Status (WORKING=0,REQUESTED=1,COLLECTED=2)'),\n 'index' => 'status',\n 'filter_index' => '`main_table`.`status`',\n 'type' => 'options',\n 'options' => $statusOptions,\n )\n );\n\n $this->addColumn('collect_date',\n array(\n 'header'=> $this->__('Collect Date'),\n 'index' => 'collect_date'\n )\n );\n\n\t\treturn parent::_prepareColumns();\n\t}",
"protected function _configureColumns()\n {\n if (empty($this->columns)) {\n $this->guessColumns();\n }\n $this->_sourceColumns = $this->columns;;\n\n $columnsByKey = [];\n foreach ($this->columns as $column) {\n $columnKey = $this->_getColumnKey($column);\n for ($j = 0; true; $j++) {\n $suffix = ($j) ? '_' . $j : '';\n $columnKey .= $suffix;\n if (!array_key_exists($columnKey, $columnsByKey)) {\n break;\n }\n }\n $columnsByKey[$columnKey] = $column;\n }\n\n $this->columns = $columnsByKey;\n }",
"protected function initColumns()\n\t{\n\t\tif($this->columns===array())\n\t\t{\n\t\t\tif($this->dataProvider instanceof NActiveDataProvider)\n\t\t\t\t$this->columns=$this->dataProvider->model->attributeNames();\n\t\t\telse if($this->dataProvider instanceof IDataProvider)\n\t\t\t{\n\t\t\t\t// use the keys of the first row of data as the default columns\n\t\t\t\t$data=$this->dataProvider->getData();\n\t\t\t\tif(isset($data[0]) && is_array($data[0]))\n\t\t\t\t\t$this->columns=array_keys($data[0]);\n\t\t\t}\n\t\t}\n\t\t$id=$this->getId();\n\t\tforeach($this->columns as $i=>$column)\n\t\t{\n\t\t\tif ($column['name'] && (!isset($column['export']) || @$column['export']!=false)) {\n\t\t\t\tif(is_string($column))\n\t\t\t\t\t$column=$this->createDataColumn($column);\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif(!isset($column['class']))\n\t\t\t\t\t\t$column['class']='NDataColumn';\n\t\t\t\t\t$column=Yii::createComponent($column, $this);\n\t\t\t\t}\n\t\t\t\tif(!$column->visible)\n\t\t\t\t{\n\t\t\t\t\tunset($this->columns[$i]);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif($column->id===null)\n\t\t\t\t\t$column->id=$id.'_c'.$i;\n\t\t\t\t$this->columns[$i]=$column;\n\t\t\t} else {\n\t\t\t\tunset($this->columns[$i]);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\n\t\tforeach($this->columns as $column)\n\t\t\t\t$column->init();\n\t}",
"public function admin_table_columns($_columns)\n {\n }",
"protected function get_column_info()\n {\n }",
"protected function get_column_info()\n {\n }",
"protected function _prepareColumns()\n {\n $this->addColumn('recipetype_id', array(\n 'header' => Mage::helper('recomiendo_recipes')->__('ID'),\n 'width' => '50px',\n 'index' => 'recipetype_id',\n ));\n\n $this->addColumn('name', array(\n 'header' => Mage::helper('recomiendo_recipes')->__('Nombre Clasificación'),\n 'index' => 'name',\n ));\n\n return parent::_prepareColumns();\n }",
"protected function loadColumns(){\n\t\t\t$this->columns = array_diff(\n\t\t\t\tarray_keys(get_class_vars($this->class)),\n\t\t\t\t$this->getIgnoreAttributes()\n\t\t\t);\n\t\t}",
"function wpbm_columns_head( $columns ){\n $columns[ 'shortcodes' ] = __( 'Shortcodes', WPBM_TD );\n $columns[ 'template' ] = __( 'Template Include', WPBM_TD );\n return $columns;\n }",
"public function addColumns()\n {\n add_filter( 'manage_edit-' . $this->post_type . '_columns', array($this, 'editColumns') ) ; // Add or Remove a Column\n add_action( 'manage_' . $this->post_type . '_posts_custom_column', array($this, 'manageColumns') ); //Show and Modify Column Data\n add_filter( 'manage_edit-' . $this->post_type . '_sortable_columns', array($this, 'sortableColumns') ); // Flags sortable Columns\n add_action( 'load-edit.php', array($this, 'loadSortColumns') );\n }",
"function custom_edit_coupon_columns($columns) {\r\n\r\n $columns['coupon_type'] = esc_html__( 'Coupon', 'wp-coupon' );\r\n $columns['expires'] = esc_html__( 'Expires', 'wp-coupon' );\r\n $columns['stats'] = esc_html__( 'Votes / Clicks', 'wp-coupon' );\r\n\r\n\r\n //unset( $columns['author'] );\r\n // Move default columns to right\r\n if ( isset( $columns['comments'] ) ) {\r\n $title = $columns['comments'];\r\n unset( $columns['comments'] );\r\n $columns['comments'] = $title;\r\n }\r\n\r\n if ( isset( $columns['author'] ) ) {\r\n $title = $columns['author'];\r\n unset( $columns['author'] );\r\n $columns['author'] = $title;\r\n }\r\n\r\n if ( isset( $columns['date'] ) ) {\r\n $title = $columns['date'];\r\n unset( $columns['date'] );\r\n $columns['date'] = $title;\r\n }\r\n\r\n return $columns;\r\n }",
"function columns_none_sort($name, $column, $sortedBy, $options)\n\t{\n return sprintf('<th>%s</th>', $name);\n\n\t}",
"function ganesh_set_ganesh_contact_columns($columns){\r\n\t$newColumns = array();\r\n\t$newColumns['title'] = 'Full Name';\r\n\t$newColumns['message'] = 'Message';\r\n\t$newColumns['email'] = 'Email';\r\n\t$newColumns['date'] = 'Date';\r\n\treturn $newColumns;\r\n}",
"public function initialize_columns()\n {\n $this->add_column(new DataClassPropertyTableColumn(User::class_name(), User::PROPERTY_LASTNAME));\n $this->add_column(new DataClassPropertyTableColumn(User::class_name(), User::PROPERTY_FIRSTNAME));\n\n $showEmail = Configuration::getInstance()->get_setting(array('Chamilo\\Core\\User', 'show_email_addresses'));\n\n if($showEmail)\n {\n $this->add_column(new DataClassPropertyTableColumn(User::class_name(), User::PROPERTY_EMAIL));\n }\n\n $this->add_column(new SortableStaticTableColumn('progress'));\n $this->add_column(new SortableStaticTableColumn('completed'));\n $this->add_column(new SortableStaticTableColumn('started'));\n\n if($this->getCurrentTreeNode()->supportsScore())\n {\n $this->add_column(new StaticTableColumn(self::COLUMN_LAST_SCORE));\n }\n }",
"public function format_for_header()\n {\n }",
"function getColumns() {return $this->_columns;}",
"public function initialize_columns()\n {\n $this->add_column(new DataClassPropertyTableColumn(User::class_name(), User::PROPERTY_LASTNAME));\n \n parent::initialize_columns();\n }",
"function Header()\r\n{\r\n if($this->ProcessingTable)\r\n $this->TableHeader();\r\n}",
"public function setHeader($array) {\n $this->colName= $array;\n $this->headerWritten= FALSE;\n }",
"protected function _prepareColumns()\n {\n if (!$this->getCategory()->getProductsReadonly()) {\n $this->addColumn('in_category', array(\n 'header_css_class' => 'a-center',\n 'type' => 'checkbox',\n 'name' => 'in_category',\n 'values' => $this->_getSelectedProducts(),\n 'align' => 'center',\n 'index' => 'entity_id',\n 'is_system' => true,\n ));\n }\n $this->addColumn('entity_id', array(\n 'header' => Mage::helper('catalog')->__('ID'),\n 'sortable' => true,\n 'width' => '60',\n 'index' => 'entity_id'\n ));\n $this->addColumn('name', array(\n 'header' => Mage::helper('catalog')->__('Name'),\n 'index' => 'name'\n ));\n $this->addColumn('sku', array(\n 'header' => Mage::helper('catalog')->__('SKU'),\n 'width' => '80',\n 'index' => 'sku'\n ));\n $this->addColumn('price', array(\n 'header' => Mage::helper('catalog')->__('Price'),\n 'type' => 'currency',\n 'width' => '1',\n 'currency_code' => (string) Mage::getStoreConfig(Mage_Directory_Model_Currency::XML_PATH_CURRENCY_BASE),\n 'index' => 'price'\n ));\n $this->addColumn('position', array(\n 'header' => Mage::helper('catalog')->__('Position'),\n 'width' => '1',\n 'type' => 'number',\n 'index' => 'position',\n 'editable' => !$this->getCategory()->getProductsReadonly(),\n //'renderer' => 'adminhtml/widget_grid_column_renderer_input'\n ));\n\n //Add export type for CSV\n $this->addExportType('*/*/exportCsv', Mage::helper('adminhtml')->__('CSV'));\n }",
"function ThursdayColumnHeader() {\n\t\tif (func_num_args()) {\n\t\t\t$this->_ThursdayColumnHeader = trim(func_get_arg(0));\n\t\t}\n\t\telse return $this->_ThursdayColumnHeader;\n\t}",
"function &getColumnHeaders( $action = null, $type = null ) {\n $columns = array(\n array(\n 'name' => 'id',\n 'sort' => 0,\n 'direction' => CRM_Utils_Sort::ASCENDING,\n ),\n array(\n 'name' => 'status_desc',\n 'sort' => 0,\n 'direction' => CRM_Utils_Sort::ASCENDING,\n )\n );\n \n foreach($this->importData['fields'] as $field) {\n $columns[] = array(\n 'name' => $field,\n 'sort' => 0,\n 'direction' => CRM_Utils_Sort::ASCENDING,\n );\n }\n \n return $columns;\n }",
"public function setHeaderColumn($headerColumn) {\n\t\t$this->headerColumn = $headerColumn;\n\t\treturn $this;\n\t}",
"public function wp_nav_menu_manage_columns()\n {\n }",
"function preWeekColumnHeader() {\n\t\tif (func_num_args()) {\n\t\t\t$this->_preWeekColumnHeader = trim(func_get_arg(0));\n\t\t}\n\t\telse return $this->_preWeekColumnHeader;\n\t}",
"public function setHeader($rowHeader){\n array_unshift($this->data,$rowHeader);\n return $this;\n }",
"abstract public function getColNames();",
"protected function setHeaders(): void\n {\n if (empty($this->headers) === false || empty($this->data) === true) {\n return;\n }\n\n $headers = array_keys(reset($this->data));\n\n array_walk($headers, fn(&$header) => $header = ucwords(str_replace(\"_\", \" \", $header)));\n\n $this->headers = $headers;\n }",
"public function setColumns()\r\n\t{\r\n\t\t$columns = array_filter($this->getRules(), function($rule) {\r\n\t\t\tif($rule instanceof ColumnInterface) {\r\n\t\t\t\treturn $rule;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\t$columns = array_map(function(ColumnInterface $rule) {\r\n\t\t\treturn $rule->getTitle();\r\n\t\t}, $columns);\r\n\r\n\t\t$this->columns = $columns;\r\n\t}",
"abstract protected function columns();",
"function overview_columns($columns) {\r\n\r\n $overview_columns = apply_filters('wpi_overview_columns', array(\r\n 'cb' => '',\r\n 'post_title' => __('Title', WPI),\r\n 'total' => __('Total Collected', WPI),\r\n 'user_email' => __('Recipient', WPI),\r\n 'post_modified' => __('Date', WPI),\r\n 'post_status' => __('Status', WPI),\r\n 'type' => __('Type', WPI),\r\n 'invoice_id' => __('Invoice ID', WPI)\r\n ));\r\n\r\n /* We need to grab the columns from the class itself, so we instantiate a new temp object */\r\n foreach ($overview_columns as $column => $title) {\r\n $columns[$column] = $title;\r\n }\r\n\r\n return $columns;\r\n }",
"private function showColumn()\n\t{\n\t\techo '<thead>\n\t\t\t<th></th>';\n\t\t\t\n\t\t\tforeach ($this->col_show as $col)\n\t\t\t\techo '<th>' . $col . '</th>';\n\t\t\n\t\techo '</thead>';\n\t}",
"abstract public function tableColumns();",
"function set_custom_contact_sortable_columns( $columns ) {\n $columns['title'] = 'title';\n $columns['email'] = 'email';\n $columns['company'] = 'company';\n\n return $columns;\n}",
"private function prepareColumns()\n {\n // start with the tableName and the primary key e.g. 'fos_user' and 'id'\n $this->addSelectColumn($this->metadata, $this->rootEntityIdentifier);\n\n foreach ($this->datatable->getColumns() as $column) {\n // association delimiter found (e.g. 'posts.comments.title')?\n if (strstr($column->getProperty(), '.') !== false) {\n $array = explode('.', $column->getProperty());\n $this->setAssociations($array, $this->metadata);\n } else {\n // no association found\n if ($column !== $this->rootEntityIdentifier) {\n $this->addSelectColumn($this->metadata, $column->getProperty());\n }\n\n $this->allColumns[] = $this->metadata->getTableName().'.'.$column->getProperty();\n }\n }\n\n return $this;\n }",
"function &columns() {\n // return by reference\n //ts('Contact Id') => 'contact_id',\n $columns = array(\n ts('Name') => 'sort_name',\n ts('Job Title') => 'job_title',\n ts('media') => 'current_employer',\n );\n return $columns;\n }",
"public function initialize_columns()\n {\n $this->add_column(new DataClassPropertyTableColumn(Right::class_name(), Right::PROPERTY_NAME));\n $this->add_column(new DataClassPropertyTableColumn(Right::class_name(), Right::PROPERTY_DESCRIPTION));\n }",
"protected function _writeHeader() {\n $this->stream->write(\n implode ($this->colDelim, array_values ($this->colName))\n );\n // Insert Newline\n $this->stream->write($this->lineDelim);\n $this->headerWritten= TRUE;\n }",
"public function renderTableHeader() {\n $cells = [];\n foreach ($this->columns as $column) {\n /* @var $column Column */\n $cells[] = $column->renderHeaderCell();\n }\n $content = $this->html()->tag('table-row', array('content' => implode('', $cells)), $this->headerRowOptions);\n\n if ($this->filterPosition == self::FILTER_POS_HEADER) {\n $content = $this->renderFilters() . $content;\n } elseif ($this->filterPosition == self::FILTER_POS_BODY) {\n $content .= $this->renderFilters();\n }\n\n return \"<thead>\\n\" . $content . \"\\n</thead>\";\n }",
"public function print_column_headers($with_id = \\true)\n {\n }",
"private function setHeader($data)\n {\n $this->headers = array_map('self::formatString', $data[0]);\n array_unshift($this->headers, 'row');\n }"
]
| [
"0.8211784",
"0.734059",
"0.7157014",
"0.7092022",
"0.7055035",
"0.6974386",
"0.6923801",
"0.6874702",
"0.68107647",
"0.67971814",
"0.6791034",
"0.6749502",
"0.6746529",
"0.6740649",
"0.6735132",
"0.6675421",
"0.6661261",
"0.66425663",
"0.66392744",
"0.6632238",
"0.6628496",
"0.66123366",
"0.6606074",
"0.6576921",
"0.6574568",
"0.6554414",
"0.6548753",
"0.6547632",
"0.6522728",
"0.6522389",
"0.6490812",
"0.64803916",
"0.6456151",
"0.64556843",
"0.64463633",
"0.6443366",
"0.6443366",
"0.6435416",
"0.64295137",
"0.6395204",
"0.63898706",
"0.6365871",
"0.63634837",
"0.63601494",
"0.63444257",
"0.63444257",
"0.6343526",
"0.63431734",
"0.63431734",
"0.63431734",
"0.63431734",
"0.63396525",
"0.63264054",
"0.6312716",
"0.63115394",
"0.6307505",
"0.6306882",
"0.63036627",
"0.6302227",
"0.6302103",
"0.629821",
"0.6292171",
"0.6288543",
"0.62863857",
"0.6285705",
"0.6285182",
"0.62732124",
"0.6266707",
"0.62618816",
"0.62574136",
"0.6255478",
"0.62425154",
"0.6221893",
"0.6221187",
"0.6221063",
"0.6221039",
"0.62190217",
"0.6218841",
"0.6215907",
"0.62069356",
"0.6194049",
"0.6193908",
"0.61894006",
"0.61773694",
"0.6176416",
"0.6172874",
"0.6162138",
"0.6159297",
"0.61513823",
"0.61511195",
"0.614538",
"0.6143568",
"0.61352056",
"0.6133707",
"0.61336195",
"0.61326176",
"0.6125819",
"0.6119934",
"0.61063004",
"0.6100171",
"0.60978496"
]
| 0.0 | -1 |
/ use custom group (Extra gegevens), then custom field (Burgerlijke staat) to get option_group_id, then retrieve option values. Skip if option group id already set | function addRowsOptionValue(&$rows, &$rowNumber, $customLabel, $customField) {
if ($this->_optionGroupId == 0) {
$apiParams = array(
'version' => 3,
'custom_group_id' => $this->_customGroupId,
'label' => $customLabel
);
$apiCustomField = civicrm_api('CustomField', 'Getsingle', $apiParams);
if (!isset($apiCustomField['is_error']) || $apiCustomField['is_error'] == 0) {
if (isset($apiCustomField['option_group_id'])) {
$this->_optionGroupId = $apiCustomField['option_group_id'];
}
}
}
$apiParams = array(
'version' => 3,
'option_group_id' => $this->_optionGroupId
);
$apiOptionValues = civicrm_api('OptionValue', 'Get', $apiParams);
if ($apiOptionValues['is_error'] == 0) {
foreach($apiOptionValues['values'] as $optionValueId => $apiOptionValue) {
/*
* Calculate number of contacts in econ_status, only print if any
*/
$aantalIn = $this->calculateAantalInContacts($apiOptionValue['label'], $customField);
if ($aantalIn > 0) {
$rows[$rowNumber]['label'] = ts($apiOptionValue['label']);
$rows[$rowNumber]['aantal'] = $aantalIn;
$rows[$rowNumber]['percentage'] = CRM_Utils_HilreportsUtils::calculatePercentage($aantalIn, $this->_aantalContacts)."%";
$rowNumber++;
$this->_aantalRijen++;
}
}
/*
* last time for none
*/
$aantalIn = $this->calculateAantalInContacts('none', $customField);
if ($aantalIn > 0) {
$rows[$rowNumber]['label'] = 'Onbekend';
$rows[$rowNumber]['aantal'] = $aantalIn;
$rows[$rowNumber]['percentage'] = CRM_Utils_HilreportsUtils::calculatePercentage($aantalIn, $this->_aantalContacts)."%";
$rowNumber++;
$this->_aantalRijen++;
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function settings_fields($option_group)\n {\n }",
"public static function get_allowed_settings_by_group()\n {\n }",
"function MyMod_Data_Group_Actual_Get()\n {\n $this->PostInitItems();\n\n if (!empty($this->CurrentDataGroup))\n {\n $group=$this->CurrentDataGroup;\n }\n else\n {\n $group=$this->GetCGIVarValue($this->GroupDataCGIVar());\n }\n\n $groups=$this->MyMod_Data_Group_Defs_Get();\n if (!preg_grep('/^'.$group.'$/',array_keys($groups)))\n {\n $group=\"\";\n }\n\n if (\n empty($group)\n ||\n !$this->MyMod_Item_Group_Allowed($groups[ $group ])\n )\n {\n //No group found (or group found was not allowed)\n //Localize first allowed data group\n foreach ($groups as $rgroup => $groupdef)\n {\n if ($this->MyMod_Item_Group_Allowed($groups[ $rgroup ]))\n {\n $group=$rgroup;\n break;\n }\n }\n }\n\n return $group;\n }",
"public function option_fields() {\n\n // Only need to initiate the array once per page-load\n if ( ! empty( $this->option_metabox ) ) {\n return $this->option_metabox;\n }\n\n $completion_badge_array = EMS_OP_Tool::wpbadger_award_choose_badge ();\n\n $this->fields = array(\n\t\t\tarray(\n\t\t\t\t'name' => __( 'Content version number', 'op_tool' ),\n\t\t\t\t'desc' => __( 'increase this version number after any change to the content of this resource', 'op_tool' ),\n\t\t\t\t'id' => $prefix . 'content_version',\n\t\t\t\t'type' => 'text_small',\n\t\t\t\t// 'repeatable' => true,\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => __( 'Completion badge', 'op_tool' ),\n\t\t\t\t'desc' => __( 'select the badge to be awarded for the completion of this OP Tool', 'op_tool' ),\n\t\t\t\t'id' => $prefix . 'completion_badge_id',\n\t\t\t\t'type' => 'select',\n\t\t\t\t'options' => $completion_badge_array,\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => __( 'Badge evidence text', 'op_tool' ),\n\t\t\t\t'desc' => __( 'this text will be displayed when someone follows the evidence link of a completion badge', 'op_tool' ),\n\t\t\t\t'id' => $prefix . 'badge_evidence_text',\n\t\t\t\t'type' => 'textarea_small',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => __( 'Badge admin email text', 'op_tool' ),\n\t\t\t\t'desc' => __( 'the text that will appear in the email to the Administrator the user elected to inform', 'op_tool' ),\n\t\t\t\t'id' => $prefix . 'badge_notify_admin_text',\n\t\t\t\t'type' => 'textarea_small',\n\t\t\t),\n\t\t\t/*array(\n\t\t\t 'id' => $prefix . 'ems_admin_contacts_group',\n\t\t\t 'type' => 'group',\n\t\t\t 'description' => __( 'The EMS admin contacts for each institution (to be sent notifications when their students complete)', 'op_tool' ),\n\t\t\t 'options' => array(\n\t\t\t 'group_title' => __( 'Institution {#}', 'op_tool' ), // since version 1.1.4, {#} gets replaced by row number\n\t\t\t 'add_button' => __( 'Add Another Institution', 'op_tool' ),\n\t\t\t 'remove_button' => __( 'Remove Institution', 'op_tool' ),\n\t\t\t 'sortable' => true, // beta\n\t\t\t ),\n\t\t\t\t'show_names' => true,\n\t\t\t // Fields array works the same, except id's only need to be unique for this group. Prefix is not needed.\n\t\t\t 'fields' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'name' => __( 'Institution', 'op_tool' ),\n\t\t\t\t\t\t//'desc' => __( 'enter the intitution\\'s name', 'op_tool' ),\n\t\t\t\t\t\t'id' => $prefix . 'institution_name',\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t// 'repeatable' => true,\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'name' => __( 'EMS admin\\'s email address', 'op_tool' ),\n\t\t\t\t\t\t//'desc' => __( 'enter the email address of the person who deals with EMS OPT certificates', 'op_tool' ),\n\t\t\t\t\t\t'id' => $prefix . 'institution_admin_email',\n\t\t\t\t\t\t'type' => 'text_email',\n\t\t\t\t\t\t// 'repeatable' => true,\n\t\t\t\t\t),\n\t\t\t ),\n\t\t\t),*/\n );\n\n $this->option_metabox = array(\n 'id' => 'option_metabox',\n 'show_on' => array( 'key' => 'options-page', 'value' => array( $this->key, ), ),\n 'show_names' => true,\n 'fields' => $this->fields,\n );\n\n return $this->option_metabox;\n }",
"function option_definition() {\n $options = parent::option_definition();\n $groups = og_get_all_group_entity();\n $options['group_type'] = array('default' => key($groups));\n\n return $options;\n }",
"function phpkd_vblvb_settinggroup($dogroup, $advanced = 0)\n{\n\tglobal $settingscache, $grouptitlecache, $vbulletin, $vbphrase, $bgcounter, $settingphrase;\n\n\tif (!is_array($settingscache[\"$dogroup\"]))\n\t{\n\t\treturn;\n\t}\n\n\tprint_column_style_code(array('width:45%', 'width:55%'));\n\n\techo \"<thead>\\r\\n\";\n\n\tprint_table_header(\n\t\t$settingphrase[\"settinggroup_$grouptitlecache[$dogroup]\"]\n\t\t . iif($vbulletin->debug && PHPKD_VBLVB_DEBUG,\n\t\t\t'<span class=\"normal\">' .\n\t\t\tconstruct_link_code($vbphrase['edit'], \"phpkd_vblvb.php?\" . $vbulletin->session->vars['sessionurl'] . \"do=editgroup&grouptitle=$dogroup\") .\n\t\t\tconstruct_link_code($vbphrase['delete'], \"phpkd_vblvb.php?\" . $vbulletin->session->vars['sessionurl'] . \"do=removegroup&grouptitle=$dogroup\") .\n\t\t\tconstruct_link_code($vbphrase['add_setting'], \"phpkd_vblvb.php?\" . $vbulletin->session->vars['sessionurl'] . \"do=addsetting&grouptitle=$dogroup\") .\n\t\t\t'</span>'\n\t\t)\n\t);\n\n\techo \"</thead>\\r\\n\";\n\n\t$bgcounter = 1;\n\n\tforeach ($settingscache[\"$dogroup\"] AS $settingid => $setting)\n\t{\n\t\tif (($advanced || !$setting['advanced']) && !empty($setting['varname']))\n\t\t{\n\t\t\tphpkd_vblvb_setting($setting, $settingphrase);\n\t\t}\n\t}\n}",
"function wrmp_get_settingsgroup()\n{\n\tstatic $wrmp_settings_gid;\n\n\t// if we have already stored the value\n\tif(isset($wrmp_settings_gid))\n\t{\n\t\t// don't waste a query\n\t\t$gid = (int) $wrmp_settings_gid;\n\t}\n\telse\n\t{\n\t\tglobal $db;\n\n\t\t// otherwise we will have to query the db\n\t\t$query = $db->simple_select('settinggroups', 'gid', \"name='wrmp_settings'\");\n\t\t$gid = (int) $db->fetch_field($query, 'gid');\n\t}\n\treturn $gid;\n}",
"public function init_group_options() {\r\n\t\tif ( ! empty( $this->settings['options'] ) ) {\r\n\r\n\t\t\tif ( is_array( $this->settings['options'] ) ) {\r\n\r\n\t\t\t\tforeach ( $this->settings['options'] as $settings ) {\r\n\r\n\t\t\t\t\tif ( ! apply_filters( 'tf_create_option_continue_' . $this->getOptionNamespace(), true, $settings ) ) {\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t$obj = TitanFrameworkOption::factory( $settings, $this->owner );\r\n\t\t\t\t\t$this->options[] = $obj;\r\n\r\n\t\t\t\t\tdo_action( 'tf_create_option_' . $this->getOptionNamespace(), $obj );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"protected function getAllAvailableGroupOptions() {}",
"function pewc_get_all_fields( $group=false, $is_ajax=false, $product_id=false ) {\n\n\t$fields = array( 'not-selected' => __( ' -- Select a field -- ', 'pewc' ) );\n\n\tif( $is_ajax || ( isset( $_GET['post'] ) && get_post_type( $_GET['post'] ) == 'product' ) ) {\n\n\t\t// Product\n\t\tif( ! $product_id ) {\n\t\t\t$product_id = $_GET['post'];\n\t\t}\n\n\t\t$groups = pewc_get_extra_fields( $product_id );\n\n\t\tif( $groups ) {\n\t\t\tforeach( $groups as $group ) {\n\t\t\t\tif( ! empty( $group['items'] ) ) {\n\t\t\t\t\tforeach( $group['items'] as $item ) {\n\t\t\t\t\t\t$label = ! empty( $item['field_label'] ) ? $item['field_label'] : __( '[no label]', 'pewc' );\n\t\t\t\t\t\tif( ! empty( $item['id'] ) ) {\n\t\t\t\t\t\t\t$fields[$item['id']] = $label;\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} else if( isset( $_GET['post'] ) && get_post_type( $_GET['post'] ) == 'pewc_group' ) {\n\n\t\t// Group\n\t\tif( ! empty( $group ) ) {\n\t\t\tforeach( $group as $item ) {\n\t\t\t\t$label = ! empty( $item['field_label'] ) ? $item['field_label'] : __( '[no label]', 'pewc' );\n\t\t\t\t$fields[$item['id']] = $label;\n\t\t\t}\n\t\t}\n\n\t} else if( $group ) {\n\n\t\t// If $group is passed, we are on the global extras\n\t\t// @since 2.2.3 use all global fields\n\t\t// Check if we've migrated @since 3.0\n\t\tif( ! pewc_has_migrated() ) {\n\t\t\t// Pre 3.0\n\t\t\t$globals = get_option( 'pewc_global_extras' );\n\t\t\tif( $globals ) {\n\t\t\t\tforeach( $globals as $group ) {\n\t\t\t\t\tforeach( $group['items'] as $item_key=>$item ) {\n\t\t\t\t\t\t$label = ! empty( $item['field_label'] ) ? $item['field_label'] : __( '[no label]', 'pewc' );\n\t\t\t\t\t\t$fields[$item['id']] = $label;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\n\t\t\t// Post 3.0\n\t\t\t$group_order = pewc_get_global_group_order();;\n\t\t\tif( $group_order ) {\n\t\t\t\t// pewc_display_product_groups expects an array with the group_id as the key\n\t\t\t\t$new_order = explode( ',', $group_order );\n\t\t\t\t$combined_order = array_combine( $new_order, $new_order );\n\t\t\t\tforeach( $combined_order as $group_id ) {\n\t\t\t\t\t$group['items'] = pewc_get_group_fields( $group_id );\n\t\t\t\t\tforeach( $group['items'] as $item_key=>$item ) {\n\t\t\t\t\t\t$label = ! empty( $item['field_label'] ) ? $item['field_label'] : __( '[no label]', 'pewc' );\n\t\t\t\t\t\t$fields[$item['id']] = $label;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t}\n\n\t$fields['cost'] = __( 'Cost', 'pewc' );\n\t$fields['quantity'] = __( 'Quantity', 'pewc' );\n\n\treturn apply_filters( 'pewc_conditional_fields', $fields );\n\n}",
"public function field_groups() {\n\t\tinclude_once KCN_PATH . '/includes/fields/acf-sample-options.php';\n\t}",
"function get_variant_options_selected($id_product, $variant_options=array())\n{\n\tglobal $mysqli, $id_cart_discount;\n\t\t\n\t$output='';\n\t\t\n\t$groups=get_variant_groups($id_product);\n\t\n\t// build sql \n\t// get all groups for this product\n\tif (sizeof($groups)) {\t\n\t\t$id_product_variant_group = key($groups);\n\t\t\n\t\t$stop = 0;\n\t\t$i=1;\n\t\tforeach ($groups as $id_product_variant_group => $row_group) {\t\t\t\n\t\t\t$joins = array();\t\n\t\t\t$where = array();\t\t\n\t\t\t$group_by = array();\t\n\t\t\t\n\t\t\t$i=1;\n\t\t\tforeach ($groups as $id_product_variant_group2 => $row_group2) {\t\n\t\t\t\t$where_str = array();\n\t\t\t\t\n\t\t\t\t$joins[] = 'INNER JOIN\n\t\t\t\t(product_variant_option AS pvo'.$i.' CROSS JOIN product_variant_group_option AS pvgo'.$i.' CROSS JOIN product_variant_group_option_description AS pvo'.$i.'_desc)\n\t\t\t\tON\n\t\t\t\t(product_variant.id = pvo'.$i.'.id_product_variant AND pvo'.$i.'.id_product_variant_group_option = pvgo'.$i.'.id AND pvgo'.$i.'.id = pvo'.$i.'_desc.id_product_variant_group_option AND pvo'.$i.'_desc.language_code = \"'.$mysqli->escape_string($_SESSION['customer']['language']).'\")';\n\t\t\t\n\t\t\t\t$where_str[] = 'pvo'.$i.'.id_product_variant_group = \"'.$mysqli->escape_string($id_product_variant_group2).'\"';\n\t\t\t\t\n\t\t\t\t$stop=0;\n\t\t\t\tif ($id_product_variant_group != $id_product_variant_group2 && isset($variant_options[$id_product_variant_group2]) && $variant_options[$id_product_variant_group2]) {\n\t\t\t\t\t$id_product_variant_group_option = $variant_options[$id_product_variant_group2];\n\t\t\t\t\t\n\t\t\t\t\t$where_str[] = 'pvo'.$i.'.id_product_variant_group_option = \"'.$mysqli->escape_string($id_product_variant_group_option).'\"';\n\t\t\t\t} else { \n\t\t\t\t\t$stop=1;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/*\n\t\t\t\tif ($id_cart_discount) {\n\t\t\t\t\t$joins[] = 'LEFT JOIN\n\t\t\t\t\t(rebate_coupon_product AS rcp'.$i.' CROSS JOIN rebate_coupon AS rcpr'.$i.' CROSS JOIN cart_discount AS rcd'.$i.') \n\t\t\t\t\tON\n\t\t\t\t\t(product_variant.id_product = rcp'.$i.'.id_product AND rcp'.$i.'.id_rebate_coupon = rcpr'.$i.'.id ANd rcpr'.$i.'.id = rcd'.$i.'.id_rebate_coupon AND rcd'.$i.'.id = \"'.$mysqli->escape_string($id_cart_discount).'\")';\n\t\t\t\t\t\n\t\t\t\t\t$joins[] = 'LEFT JOIN\n\t\t\t\t\t(product_category AS pc'.$i.' CROSS JOIN rebate_coupon_category AS rcc'.$i.' CROSS JOIN rebate_coupon AS rccr'.$i.' CROSS JOIN cart_discount AS rccd'.$i.') \n\t\t\t\t\tON\n\t\t\t\t\t(product_variant.id_product = pc'.$i.'.id_product AND pc'.$i.'.id_category = rcc'.$i.'.id_category AND rcc'.$i.'.id_rebate_coupon = rccr'.$i.'.id ANd rccr'.$i.'.id = rcd'.$i.'.id_rebate_coupon AND rcd'.$i.'.id = \"'.$mysqli->escape_string($id_cart_discount).'\")';\n\t\t\t\t\t\n\t\t\t\t\t$where_str[] = '(rcp'.$i.'.id_rebate_coupon IS NOT NULL OR rcc'.$i.'.id_rebate_coupon IS NOT NULL)';\n\t\t\t\t}*/\n\t\t\t\t\n\t\t\t\t$select = 'pvo'.$i.'.id_product_variant_group_option,\n\t\t\t\tpvo'.$i.'.id_product_variant_group,\n\t\t\t\tpvo'.$i.'_desc.name,\n\t\t\t\tpvgo'.$i.'.swatch_type,\n\t\t\t\tpvgo'.$i.'.color,\n\t\t\t\tpvgo'.$i.'.color2,\n\t\t\t\tpvgo'.$i.'.color3,\n\t\t\t\tpvgo'.$i.'.filename';\n\t\t\t\t\n\t\t\t\t$where[] = implode(' AND ',$where_str);\n\t\t\t\t\n\t\t\t\t$group_by[] = 'pvo'.$i.'.id_product_variant_group_option';\n\t\t\t\t\n\t\t\t\t$order_by = 'pvgo'.$i.'.sort_order ASC';\n\t\t\t\t\n\t\t\t\t$i++;\n\t\t\t\t\n\t\t\t\tif ($stop) break;\n\t\t\t}\n\t\t\t\n\t\t\t$joins = implode(\"\\r\\n\",$joins);\n\t\t\t$where = implode(' AND ',$where);\n\t\t\t$group_by = implode(',',$group_by);\n\t\t\n\t\t\n\t\t\t// we need to list all main group options\n\t\t\tif ($result_group_option = $mysqli->query('SELECT\n\t\t\t'.$select.'\n\t\t\tFROM\n\t\t\tproduct_variant\n\t\t\t\n\t\t\t'.$joins.'\n\t\t\t\n\t\t\tWHERE\n\t\t\tproduct_variant.active = 1\n\t\t\tAND\n\t\t\tproduct_variant.id_product = \"'.$mysqli->escape_string($id_product).'\"\n\t\t\tAND\n\t\t\t'.$where.'\n\t\t\tGROUP BY '.\n\t\t\t$group_by.'\n\t\t\tORDER BY '.\n\t\t\t$order_by)) {\n\t\t\t\tif ($result_group_option->num_rows) {\n\t\t\t\t\t$input_type = $groups[$id_product_variant_group]['input_type'];\n\t\t\t\t\t\n\t\t\t\t\t$output .= '<div style=\"margin-top:10px; margin-bottom:10px;\" id=\"variant_group_'.$id_product_variant_group.'\">\n\t\t\t\t\t<div style=\"margin-bottom:5px;\"><strong>'.$row_group['name'].'</strong></div>';\n\t\t\n\t\t\t\t\tif (!$input_type) {\n\t\t\t\t\t\t$output .= '<select name=\"variant_options['.$id_product_variant_group.']\">\n\t\t\t\t\t\t<option value=\"\">--</option>';\n\t\t\t\t\t}\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t$current_selected = isset($variant_options[$id_product_variant_group]) ? $variant_options[$id_product_variant_group]:0;\n\t\t\t\t\t\n\t\t\t\t\t$i=0;\n\t\t\t\t\twhile ($row_group_option = $result_group_option->fetch_assoc()) {\n\t\t\t\t\t\t$id_product_variant_group_option = $row_group_option['id_product_variant_group_option'];\n\t\t\t\t\t\t\n\t\t\t\t\t\tswitch ($input_type) {\n\t\t\t\t\t\t\t// dropdown\n\t\t\t\t\t\t\tcase 0:\n\t\t\t\t\t\t\t\t$output .= '<option value=\"'.$id_product_variant_group_option.'\" '.(($current_selected == $id_product_variant_group_option) ? 'selected=\"selected\"':'').'>'.$row_group_option['name'].'</option>';\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t// radio\n\t\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\t\t$output .= '<div>\n\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"variant_options['.$id_product_variant_group.']\" id=\"product_variant_'.$id_product_variant_group.'_'.$id_product_variant_group_option.'\" value=\"'.$id_product_variant_group_option.'\" '.(($current_selected == $id_product_variant_group_option) ? 'checked=\"checked\"':'').'> <label for=\"product_variant_'.$id_product_variant_group.'_'.$id_product_variant_group_option.'\">'.$row_group_option['name'].'</label>\n\t\t\t\t\t\t\t\t</div>';\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t// swatch\n\t\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\t\t$swatch_type = $row_group_option['swatch_type'];\n\t\t\t\t\t\t\t\t$color = $row_group_option['color'];\n\t\t\t\t\t\t\t\t$color2 = $row_group_option['color2'];\n\t\t\t\t\t\t\t\t$color3 = $row_group_option['color3'];\n\t\t\t\t\t\t\t\t$filename = $row_group_option['filename'];\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif ($i==8) { $output .= '<div class=\"cb\"></div>'; $i=0; }\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tswitch ($swatch_type) {\n\t\t\t\t\t\t\t\t\t// 1 color\n\t\t\t\t\t\t\t\t\tcase 0:\n\t\t\t\t\t\t\t\t\t\t$output .= '<a href=\"javascript:void(0);\" class=\"fl variant_color_outer_border '.(($current_selected == $id_product_variant_group_option) ? 'selected':'').'\">\n\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" id=\"variant_color_'.$id_product_variant_group.'_'.$id_product_variant_group_option.'\" name=\"variant_options['.$id_product_variant_group.']\" value=\"'.$id_product_variant_group_option.'\" '.(($current_selected == $id_product_variant_group_option) ? 'checked=\"checked\"':'').' />\n\t\t\t\t\t\t\t\t\t\t<div class=\"variant_color_inner_border\">\n\t\t\t\t\t\t\t\t\t\t<div style=\"background-color: '.$color.';\" class=\"variant_color\"></div>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t</a>';\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t// 2 color\n\t\t\t\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\t\t\t\t$output .= '<a href=\"javascript:void(0);\" class=\"fl variant_color_outer_border '.(($current_selected == $id_product_variant_group_option) ? 'selected':'').'\">\n\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" id=\"variant_color_'.$id_product_variant_group.'_'.$id_product_variant_group_option.'\" name=\"variant_options['.$id_product_variant_group.']\" value=\"'.$id_product_variant_group_option.'\" '.(($current_selected == $id_product_variant_group_option) ? 'checked=\"checked\"':'').' />\n\t\t\t\t\t\t\t\t\t\t<div class=\"variant_color_inner_border\"><div class=\"variant_color\">\n\t\t\t\t\t\t\t\t\t\t<div class=\"fl\" style=\"width:10px; height:20px; background-color: '.$color.';\"></div>\n\t\t\t\t\t\t\t\t\t\t<div class=\"fl\" style=\"width:10px; height:20px; background-color: '.$color2.';\"></div>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<div class=\"cb\"></div>\n\t\t\t\t\t\t\t\t\t\t</div></div>\n\t\t\t\t\t\t\t\t\t\t</a>';\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t// 3 color\n\t\t\t\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\t\t\t\t$output .= '<a href=\"javascript:void(0);\" class=\"fl variant_color_outer_border '.(($current_selected == $id_product_variant_group_option) ? 'selected':'').'\">\n\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" id=\"variant_color_'.$id_product_variant_group.'_'.$id_product_variant_group_option.'\" name=\"variant_options['.$id_product_variant_group.']\" value=\"'.$id_product_variant_group_option.'\" '.(($current_selected == $id_product_variant_group_option) ? 'checked=\"checked\"':'').' />\t\n\t\t\t\t\t\t\t\t\t\t<div class=\"variant_color_inner_border\"><div class=\"variant_color\">\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<div class=\"fl\" style=\"width:7px; height:20px; background-color: '.$color.';\"></div>\n\t\t\t\t\t\t\t\t\t\t<div class=\"fl\" style=\"width:6px; height:20px; background-color: '.$color2.';\"></div>\n\t\t\t\t\t\t\t\t\t\t<div class=\"fl\" style=\"width:7px; height:20px; background-color: '.$color3.';\"></div>\n\t\t\t\t\t\t\t\t\t\t<div class=\"cb\"></div>\n\t\t\t\t\t\t\t\t\t\t</div></div>\n\t\t\t\t\t\t\t\t\t\t</a>';\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t// file\n\t\t\t\t\t\t\t\t\tcase 3:\n\t\t\t\t\t\t\t\t\t\t$output .= '<a href=\"javascript:void(0);\" class=\"fl variant_color_outer_border '.(($current_selected == $id_product_variant_group_option) ? 'selected':'').'\">\n\t\t\t\t\t\t\t\t\t\t<input type=\"radio\" id=\"variant_color_'.$id_product_variant_group.'_'.$id_product_variant_group_option.'\" name=\"variant_options['.$id_product_variant_group.']\" value=\"'.$id_product_variant_group_option.'\" '.(($current_selected == $id_product_variant_group_option) ? 'checked=\"checked\"':'').' />\t\n\t\t\t\t\t\t\t\t\t\t<div class=\"variant_color_inner_border\"><div class=\"variant_color\">\t\t\n\t\t\t\t\t\t\t\t\t\t<img src=\"/images/products/swatch/'.$filename.'\" width=\"20\" height=\"20\" border=\"0\" hspace=\"0\" vspace=\"0\" />\n\t\t\t\t\t\t\t\t\t\t</div></div>\n\t\t\t\t\t\t\t\t\t\t</a>';\n\t\t\t\t\t\t\t\t\t\tbreak;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\t\t\t\t\n\t\t\t\n\t\t\t\t\t\t\t\t++$i;\t\t\t\t\t\n\t\t\t\t\t\t\t\tbreak;\t\n\t\t\t\t\t\t}\t\n\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tswitch ($input_type) {\n\t\t\t\t\t\t// dropdown\n\t\t\t\t\t\tcase 0:\n\t\t\t\t\t\t\t$output .= '</select>\n\t\t\t\t\t\t\t<script type=\"text/javascript\">\n\t\t\t\t\t\t\t/* <![CDATA[ */\n\t\t\n\t\t\n\t\t\t\t\t\t\tjQuery(function(){\n\t\t\t\t\t\t\t\tjQuery(\"select[name=\\'variant_options['.$id_product_variant_group.']\\']\").change(function(){\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t// get values\n\t\t\t\t\t\t\t\t\t// ajax query to get new variants\n\t\t\t\t\t\t\t\t\tload_variant('.$id_product_variant_group.', jQuery(this).val());\n\t\t\t\t\t\t\t\t\tif (jQuery(\"#display_error\").css(\"display\") == \"block\"){\njQuery(\"#display_error\").hide(\"blind\", { direction: \"vertical\" }, 1000);\n}\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t/* ]]> */\n\t\t\t\t\t\t\t</script>';\t\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t// radio\n\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\t$output .= '<script type=\"text/javascript\">\n\t\t\t\t\t\t\t/* <![CDATA[ */\n\t\t\n\t\t\t\t\t\t\tjQuery(function(){\n\t\t\t\t\t\t\t\tjQuery(\"input[name=\\'variant_options['.$id_product_variant_group.']\\']\").change(function(){\n\t\t\n\t\t\t\t\t\t\t\t\t// get values\n\t\t\t\t\t\t\t\t\t// ajax query to get new variants\n\t\t\t\t\t\t\t\t\tload_variant('.$id_product_variant_group.', jQuery(this).val());\n\t\t\t\t\t\t\t\t\tif (jQuery(\"#display_error\").css(\"display\") == \"block\"){\njQuery(\"#display_error\").hide(\"blind\", { direction: \"vertical\" }, 1000);\n}\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t/* ]]> */\n\t\t\t\t\t\t\t</script>';\t\t\t\t\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t// swatch\n\t\t\t\t\t\tcase 2:\t\t\t\t\n\t\t\t\t\t\t\t$output .= '<script type=\"text/javascript\">\n\t\t\t\t\t\t\t/* <![CDATA[ */\n\t\t\n\t\t\t\t\t\t\tjQuery(function(){\n\t\t\t\t\t\t\t\tjQuery(\"a.variant_color_outer_border\").click(function(){\n\t\t\t\t\t\t\t\t\tif (!jQuery(\"input[id^=\\'variant_color_\\']:checked\",this).length) { \n\t\t\t\t\t\t\t\t\t\tjQuery(\"input[id^=\\'variant_color_\\']\",this).attr(\"checked\",true);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tjQuery(\"a.variant_color_outer_border\").removeClass(\"selected\");\n\t\t\t\t\t\t\t\t\t\tjQuery(this).addClass(\"selected\");\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t// get values\n\t\t\t\t\t\t\t\t\t\t// ajax query to get new variants\n\t\t\t\t\t\t\t\t\t\tload_variant('.$id_product_variant_group.', jQuery(\"input[id^=\\'variant_color_\\']\",this).val());\t\n\t\t\t\t\t\t\t\t\t\tif (jQuery(\"#display_error\").css(\"display\") == \"block\"){\njQuery(\"#display_error\").hide(\"blind\", { direction: \"vertical\" }, 1000);\n}\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t/* ]]> */\n\t\t\t\t\t\t\t</script>';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t$output .= '<div class=\"cb\"></div></div>';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$result_group_option->free();\n\t\t\t} else {\n\t\t\t\tthrow new Exception('An error occured while trying to get variant group options.'.\"\\r\\n\\r\\n\".$mysqli->error);\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif (isset($variant_options[$id_product_variant_group]) && $variant_options[$id_product_variant_group] == 0) break;\n\t\t}\t\n\t}\n\t\n\treturn $output;\t\n}",
"public function getGroupsOptions()\n {\n return array(\n 'compulsory' => array(\n array('name' => 'Run Subtitle Spell Check before delivery', 'description' => 'Run Subtitle Spell Check before delivery', 'notice' => 'STOPPER'),\n array('name' => 'Run Subtitle Quality Check (SQC) before delivery', 'description' => 'Run Subtitle Quality Check (SQC) before delivery', 'notice' => 'STOPPER'),\n array('name' => 'Identical Narrative as in English template found', 'description' => 'When the text in the translate file is identical to the English template', 'notice' => 'STOPPER'),\n array('name' => 'Allow Empty Boxes', 'description' => 'Allow users to deliver file with empty boxes (boxes not containing any text)', 'notice' => 'STOPPER'),\n array('name' => 'Maximum Lines Per Box', 'description' => 'The maximum lines allowed in one box', 'notice' => 'STOPPER'),\n array('name' => 'Maximum Characters Per Line (Horizontal, Vertical)', 'description' => 'The maximum number of characters allowed per (horizontal, vertical) line', 'notice' => 'STOPPER'),\n array('name' => 'Main Title tag required', 'description' => 'The main title has not been tagged with a Main Title tag', 'notice' => 'STOPPER'),\n array('name' => 'Non-standard apostrophe used at position (pos)', 'description' => '', 'notice' => 'STOPPER'),\n array('name' => 'English template revision not acknowledged', 'description' => 'English template revision is not reviewed by a language user by clicking on the blinking red alarm clock', 'notice' => 'STOPPER'),\n array('name' => 'Minimum Box Duration', 'description' => 'The shortest duration allowed for a box. In frames or seconds', 'notice' => 'STOPPER'),\n array('name' => 'Maximum Box Duration', 'description' => 'The longest duration allowed for a box. In frames or seconds', 'notice' => 'STOPPER'),\n array('name' => 'Allow Box Overlap', 'description' => 'Allow users to deliver overlapping boxes', 'notice' => 'STOPPER'),\n array('name' => 'Floating captions found', 'description' => 'Allow caption to touch top or bottom', 'notice' => 'STOPPER'),\n array('name' => 'Teletext Character Set Only', 'description' => 'This is a special requirement for teletext deliveries as this format has restrictions on the characters allowed', 'notice' => 'STOPPER'),\n array('name' => 'Box start time is equal / exceeds its end time', 'description' => 'Timing discrepancy when a file has been imported into the system where the start timecode of a box can be greater than the end timecode of the box', 'notice' => 'STOPPER'),\n array('name' => 'Chapter stop overlaps with subtitle', 'description' => '', 'notice' => 'STOPPER'),\n ),\n \n 'spec' => array(\n array('name' => 'Maximum Lines Per Box', 'description' => 'The maximum lines allowed in one box', 'notice' => 'STOPPER'),\n array('name' => 'Minimum Frame Gap Between Boxes', 'description' => 'Minimal gap allowed between boxes. In frames or seconds', 'notice' => 'STOPPER'),\n array('name' => 'Frame gap violation between consecutive boxes found', 'description' => 'This puts restrictions on the frame gaps allowed between boxes. This is meant to disallow small gaps (under 1 second) between consecutive boxes, a special requirement. Example: 3f;1s mean that gap >= 3 frames and < 1 second not allowed', 'notice' => 'STOPPER'),\n array('name' => 'Allow Italics', 'description' => 'Are italics allowed?', 'notice' => 'STOPPER'),\n array('name' => 'Forced', 'description' => 'Allow Burned-in tag?', 'notice' => 'STOPPER'),\n array('name' => 'Only one sentence per box is allowed', 'description' => 'Only one sentence per subtitle is permitted', 'notice' => 'STOPPER'),\n array('name' => 'Text-heavy box found', 'description' => 'When too much text is present in a box as opposed to the box duration, readability gets affected', 'notice' => 'STOPPER'),\n ),\n \n 'compliance' => array(\n array('name' => 'Rating Allowed', 'description' => 'Is a rating allowed?', 'notice' => 'STOPPER'),\n array('name' => 'Translator Credit Allowed', 'description' => 'Is the translator credit allowed?', 'notice' => 'STOPPER'),\n array('name' => 'Disallowed characters found at start of subtitle', 'description' => 'Subtitle cannot start with any of the entered chars. Input chars as a string, without separators', 'notice' => 'STOPPER'),\n ),\n \n 'special' => array(\n array('name' => 'Allowable unedited auto-translation limit', 'description' => 'This special limit is set for translate jobs to define maximum allowable unedited auto translation in percents', 'notice' => 'STOPPER'),\n array('name' => 'Consecutive text-heavy 2-line subtitle found', 'description' => 'The maximum number of consecutive 2 line subs. Should be more than 1 or Disabled(-1). This is special requirement meant to discourage consecutive text heavy boxes', 'notice' => 'STOPPER'),\n array('name' => 'Space After Hypens Between Words', 'description' => 'Checks for space after or before a hyphen between two words. This is meant for a specific captioning requirement', 'notice' => 'STOPPER'),\n array('name' => 'Do Not Allow \"#\" Symbol', 'description' => 'This prevents users from delivering a file containing the pound symbol. This is a special requirement by some clients or file types', 'notice' => 'STOPPER'),\n array('name' => 'Space After Double Chevron', 'description' => 'Requires a space after a double hyphen. This is meant for specific French captioning requirements', 'notice' => 'STOPPER'),\n array('name' => 'Space After Hyphens', 'description' => 'Set a required space after speaker hyphen. This is meant for a specific captioning requirement', 'notice' => 'STOPPER'),\n array('name' => 'Speaker Hyphens style', 'description' => 'Set a required speaker hyphen style. This is meant for a specific captioning requirement', 'notice' => 'STOPPER'),\n array('name' => 'Disallowed characters found in subtitle', 'description' => 'Subtitle cannot contain any of entered chars. Input chars as a string, without separators', 'notice' => 'STOPPER'),\n array('name' => 'Text contains invalid XML characters', 'description' => '', 'notice' => 'STOPPER'),\n ),\n \n 'captions' => array(\n array('name' => 'Allow 32 Character Lines With Italics', 'description' => 'Is it possible to add 32 character line with italics?', 'notice' => 'STOPPER'),\n array('name' => 'Sound Cue Format', 'description' => 'Examples: \"[music]\", \"(MUSIC)\", ...', 'notice' => 'STOPPER'),\n ),\n \n 'other' => array( \n array('name' => 'Possible acronym should be written without periods and spaces', 'description' => '', 'notice' => 'NOTICE'),\n array('name' => 'Possible acronym should be written without accents', 'description' => '', 'notice' => 'STOPPER'),\n array('name' => 'Semicolon should be removed', 'description' => 'This is one of the SDH system checks only for LAS language', 'notice' => 'STOPPER'),\n array('name' => 'Continuity ellipsis at the end of the box should be removed', 'description' => '', 'notice' => 'STOPPER'),\n array('name' => 'Extra punctuation found', 'description' => '', 'notice' => 'STOPPER'),\n array('name' => 'Double quotation marks should be written without spaces', 'description' => '', 'notice' => 'STOPPER'),\n array('name' => 'Period should be written after a closing quote', 'description' => '', 'notice' => 'STOPPER'),\n array('name' => 'Song box should be fully italicized', 'description' => '', 'notice' => 'STOPPER'),\n array('name' => 'Song box punctuation: only question and exclamation marks allowed at the end of line', 'description' => '', 'notice' => 'STOPPER'), \n array('name' => 'Song box is not translated. Please OMIT box because translation is not required', 'description' => '', 'notice' => 'STOPPER'),\n array('name' => 'Unallowable forward slash in dialog', 'description' => '', 'notice' => 'STOPPER'),\n array('name' => 'HBO prohibited words', 'description' => 'Prevents the user from delivering a file containing some predefined words: \"A Em Por\", \"Até Entre Porém\", \"Ao Entretanto Quando\", \"Após Lhe Que\", \"Com Uma Se\", \"Como Me Sem\", \"Contudo Nos Sob\", \"Da O Sobre\", \"De Ou Te\", \"Desde Para Todavia\", \"Do Perante Vos\", \"E Pois\". This is a special requirement by some clients or file types', 'notice' => 'STOPPER'),\n array('name' => 'Do Not Allow \"$\" At The Beginning Of Sentence', 'description' => 'This prevents users from delivering a file containing the \"$\" symbol. This is a special requirement by some clients or file types', 'notice' => 'STOPPER'),\n array('name' => 'Positioning not allowed for this overlapped subtitle', 'description' => 'Positioning not allowed for particular overlapped subtitle. (For Japanese only)', 'notice' => 'STOPPER'),\n array('name' => 'Text casing does not match source', 'description' => '', 'notice' => 'NOTICE'),\n array('name' => 'Acceptance suggestion is unresolved', 'description' => 'Flagged for all boxes which are not accepted or declined by the QAer', 'notice' => 'STOPPER'),\n array('name' => 'Text alignment not permitted as per spec', 'description' => 'When text alignment does not match what is in the delivery specs', 'notice' => 'STOPPER'),\n array('name' => 'BRP Disallowed End Words', 'description' => '', 'notice' => 'STOPPER'),\n array('name' => 'BRP Disallowed Start Words', 'description' => '', 'notice' => 'STOPPER'),\n array('name' => 'Text found on the first cell of the first gridline', 'description' => 'Text resting on the first cell of the first gridline.(i.e. position 0,0) (For CC mode only)', 'notice' => 'NOTICE'),\n array('name' => 'File should contain an EMPTY first box', 'description' => '', 'notice' => 'STOPPER'),\n array('name' => 'Single quaver box should be min 5 secs long and have min 1 sec gap after it', 'description' => '', 'notice' => 'STOPPER'),\n array('name' => 'Italics or Underline found within word', 'description' => 'When italics or underline tags are found inside words. (For CC mode only)', 'notice' => 'STOPPER'), \n array('name' => 'Enter some note for the box with error type: Translation (objective/subjective)', 'description' => 'It forces a QA user to input a note if box error type is Translation: objective/subjective. (For Netflix client only)', 'notice' => 'STOPPER'),\n array('name' => 'Incorrect text formatting (<HTML>|<P>)', 'description' => '', 'notice' => 'STOPPER'),\n array('name' => 'Alignment / Positioning does not match source', 'description' => '', 'notice' => 'STOPPER'),\n array('name' => 'Box should be removed (omitted) according to the \"Texted\" delivery format', 'description' => '', 'notice' => 'NOTICE'),\n array('name' => 'Stand-alone punctuation present', 'description' => 'When any box in a file has only punctuation and no text in it', 'notice' => 'STOPPER'),\n array('name' => 'Double space found at line #(number)', 'description' => '', 'notice' => 'STOPPER'),\n array('name' => 'Error type is not chosen', 'description' => 'When a QAer makes a change but does not select an error category', 'notice' => 'STOPPER'),\n ),\n );\n }",
"function auto_join_group_plugin_options() {\r\n global $wpdb, $bp;\r\n\r\n if ( isset($_GET['pre_regex']) && isset($_GET['post_regex']) && isset($_GET['mode']) && isset($_GET['field_id']) && 'save' == $_GET['mode'] ) {\r\n // save the changes to the database!\r\n if (isset($_GET['link'])) { $group_link = 1; } else { $group_link = 0; }\r\n\r\n $sql = $wpdb->prepare(\"UPDATE {$bp->profile->table_name_fields} SET group_link = %d, group_pre_regex = %s, group_post_regex = %s WHERE id = %d\", $group_link, $_GET['pre_regex'], $_GET['post_regex'], $_GET['field_id']);\r\n if ( !$wpdb->query($sql) ) {\r\n echo \"<strong>Update Failed (or no fields were changed)</strong><hr />\";\r\n } else {\r\n echo \"<strong>Update Successful!</strong><hr />\";\r\n // Now ... let's link existing users to the group!!!!\r\n // get list of users\r\n if (isset($_GET['link'])) {\r\n $users = $wpdb->get_results(\"SELECT user_id FROM {$bp->profile->table_name_data} WHERE field_id = \" . $_GET['field_id']);\r\n foreach ($users as $user) {\r\n bn_auto_group_join($user->user_id, 'myid');\r\n }\r\n }\r\n }\r\n } \r\n\r\n if ( isset($_GET['mode']) && isset($_GET['all_users_group']) && 'save_allusers' == $_GET['mode'] ) {\r\n update_option('gaj_all_users_group ', $_GET['all_users_group']);\r\n $all_users_message = \"All users group updated\";\r\n }\r\n else {\r\n $all_users_message = '';\r\n }\r\n\r\n if ( isset($_GET['mode']) && isset($_GET['field_id']) && 'edit' == $_GET['mode'] ) {\r\n // edit one of the profile linking options\r\n $profiles = $wpdb->get_results(\"SELECT name, id, group_link, group_pre_regex, group_post_regex FROM {$bp->profile->table_name_fields} WHERE id = \" . $_GET['field_id']);\r\n ?>\r\n <form method=\"get\" name=\"auto-join\" action=\"admin.php\">\r\n <input type=\"hidden\" name=\"field_id\" value=\"<?php echo $_GET['field_id']; ?>\">\r\n <input type=\"hidden\" name=\"mode\" value=\"save\">\r\n <input type=\"hidden\" name=\"page\" value=\"auto_join_group_plugin_options\">\r\n <table class=\"form-table\"><?php\r\n foreach ($profiles as $profile) { ?>\r\n <tr><td><strong>Profile Field Name:</strong></td><td align=\"left\"><strong><?php echo $profile->name; ?></strong></td></tr>\r\n <tr><td>Link to Groups:</td><td align=\"left\"><input type=\"checkbox\" name=\"link\" <?php if ($profile->group_link == 0) { echo \"No\"; } else { echo \"checked\"; } ?>></td></tr>\r\n <tr><td>Pre Matching:</td><td align=\"left\"><input type=\"text\" name=\"pre_regex\" maxlength=\"100\" size=\"15\" value=\"<?php echo $profile->group_pre_regex; ?>\"></td></tr>\r\n <tr><td>Post Matching:</td><td align=\"left\"><input type=\"text\" name=\"post_regex\" maxlength=\"100\" size=\"15\" value=\"<?php echo $profile->group_post_regex; ?>\"></td></tr>\r\n <tr><td colspan=\"2\" align=\"left\"><input type=\"submit\" value=\"Save\"></td></tr>\r\n <tr><td colspan=\"2\" align=\"left\"><strong>DIRECTIONS</strong><br />\r\n <strong>1.</strong> Check the \"Link to Groups\" box if you want to try to automatically join members to groups based on this profile field.<br /><br />\r\n <strong>2.</strong> If you know the profile field name and the group name are not exact matches, use the group_pre_regex and group_post_regex fields.<br />\r\n <strong>a.</strong> For example, say you have a profile field for \"Graduation Year\" where an option is \"1987\". The corresponding group is \"USMA 1987\". So, in the \r\n \"Pre Matching\" field put \"USMA%\". (yes ... put the % into the db field).<br />\r\n <strong>b.</strong> Another example, say you have a profile field for \"Type of Fishing\" where an option is \"Fly\". The corresponding group is \"Fly Fishing\". So, in the \r\n \"Post Matching\" field put \"%Fishing\".<br />\r\n <strong>c.</strong> If the profile options exactly match the group names, leave \"Pre Matching\" and \"Post Matching\" blank.<br /><br />\r\n <strong>3.</strong> Once you save your changes, if the \"Link to Groups\" box is checked, all existing wpmu members will be added to the matching groups!\r\n </td></tr>\r\n <?php\r\n }\r\n ?></table><?php\r\n } else {\r\n // get profile fields with group linking\r\n $profiles = $wpdb->get_results(\"SELECT name, id, group_link, group_pre_regex, group_post_regex FROM {$bp->profile->table_name_fields} WHERE parent_id = 0 AND (type = 'selectbox' OR type = 'textbox')\");\r\n echo \"<table class=\\\"widefat\\\"><thead><tr><td colspan='4''><strong>Click edit</strong> on the Profile field you'd like to link to a group.<br /><br />\r\n <strong>NOTE</strong> - currently only 'selectbox' and 'textbox' type profile fields are supported!</td></tr>\r\n <tr><td colspan='5'> </td></tr>\r\n <tr><th>Profile Field Name</th><th>Linked?</th><th>Pre Matching</th><th>Post Matching</th><th> </th></tr>\";\r\n foreach ($profiles as $profile) { ?>\r\n <tr>\r\n <td><?php echo $profile->name; ?></td>\r\n <td style=\"text-align:center;\"><?php echo ($profile->group_link == 1) ? '<strong>YES</strong>' : 'No'; ?></td>\r\n <td><?php echo $profile->group_pre_regex; ?></td>\r\n <td><?php echo $profile->group_post_regex; ?></td>\r\n <td><a href=\"admin.php?page=auto_join_group_plugin_options&field_id=<?php echo $profile->id; ?>&mode=edit\"><?php _e( 'Edit', 'buddypress' ); ?></a></td>\r\n </tr>\r\n <?php\r\n }\r\n ?>\r\n </table>\r\n\r\n <h3>All Users</h3>\r\n <p>If you wish to add all users who register to a particular group, select it here</p>\r\n\r\n <?php\r\n\r\n if(!empty($all_users_message)) {\r\n echo \"<p><strong>$all_users_message</strong></p>\";\r\n }\r\n\r\n ?>\r\n\r\n <form method=\"get\" name=\"auto-join\" action=\"admin.php\">\r\n <label for=\"all_users_group\">Group:</label>\r\n <select id=\"all_users_group\" name=\"all_users_group\">\r\n <option value=\"0\">None</option>\r\n <?php\r\n $current_setting = get_option('gaj_all_users_group');\r\n\r\n $groupmatches = $wpdb->get_results(\"SELECT * FROM {$bp->groups->table_name}\");\r\n foreach ($groupmatches as $groupmatch) {\r\n ?><option value=\"<?php echo $groupmatch->id; ?>\"<?php if($groupmatch->id == $current_setting) echo \" selected\"; ?>><?php echo $groupmatch->name; ?></option>\r\n <?php\r\n }\r\n ?>\r\n </select>\r\n <p class=\"submit\">\r\n <input type=\"submit\" name=\"Submit\" class=\"button-primary\" value=\"Save All Users Changes\">\r\n <input type=\"hidden\" name=\"mode\" value=\"save_allusers\">\r\n <input type=\"hidden\" name=\"page\" value=\"auto_join_group_plugin_options\">\r\n </p>\r\n\r\n </form>\r\n <?php\r\n }\r\n}",
"function get_variant_options($id_product, $variant_options=array())\n{\n\tglobal $mysqli, $id_cart_discount;\n\t\n\t$output='';\n\t\n\t$groups=get_variant_groups($id_product);\n\t\n\t// build sql \n\t// get all groups for this product\n\tif (sizeof($groups)) {\t\t\n\t\tend($groups); \n\t\t$id_product_variant_group = key($groups); \n\t\n\t\tif (isset($variant_options[$id_product_variant_group]) && $variant_options[$id_product_variant_group]) return false;\n\t\n\t\t$joins = array();\t\n\t\t$where = array();\t\t\n\t\t$group_by = array();\t\n\t\t\n\t\t$i=1;\n\t\tforeach ($groups as $id_product_variant_group => $row_group) {\t\n\t\t\t$where_str = array();\n\t\t\t\n\t\t\t$joins[] = 'INNER JOIN\n\t\t\t(product_variant_option AS pvo'.$i.' CROSS JOIN product_variant_group_option AS pvgo'.$i.' CROSS JOIN product_variant_group_option_description AS pvo'.$i.'_desc)\n\t\t\tON\n\t\t\t(product_variant.id = pvo'.$i.'.id_product_variant AND pvo'.$i.'.id_product_variant_group_option = pvgo'.$i.'.id AND pvgo'.$i.'.id = pvo'.$i.'_desc.id_product_variant_group_option AND pvo'.$i.'_desc.language_code = \"'.$mysqli->escape_string($_SESSION['customer']['language']).'\")';\n\t\t\n\t\t\t$where_str[] = 'pvo'.$i.'.id_product_variant_group = \"'.$mysqli->escape_string($id_product_variant_group).'\"';\n\t\t\t\n\t\t\t$stop=0;\n\t\t\tif (isset($variant_options[$id_product_variant_group]) && $variant_options[$id_product_variant_group]) {\n\t\t\t\t$id_product_variant_group_option = $variant_options[$id_product_variant_group];\n\t\t\t\t\n\t\t\t\t$where_str[] = 'pvo'.$i.'.id_product_variant_group_option = \"'.$mysqli->escape_string($id_product_variant_group_option).'\"';\n\t\t\t} else { \n\t\t\t\t$stop=1;\n\t\t\t}\n\t\t\t\n\t\t\tif ($id_cart_discount) {\n\t\t\t\t$joins[] = 'LEFT JOIN\n\t\t\t\t(rebate_coupon_product AS rcp'.$i.' CROSS JOIN rebate_coupon AS rcpr'.$i.' CROSS JOIN cart_discount AS rcd'.$i.') \n\t\t\t\tON\n\t\t\t\t(product_variant.id_product = rcp'.$i.'.id_product AND rcp'.$i.'.id_rebate_coupon = rcpr'.$i.'.id ANd rcpr'.$i.'.id = rcd'.$i.'.id_rebate_coupon AND rcd'.$i.'.id = \"'.$mysqli->escape_string($id_cart_discount).'\")';\n\t\t\t\t\n\t\t\t\t$joins[] = 'LEFT JOIN\n\t\t\t\t(product_category AS pc'.$i.' CROSS JOIN rebate_coupon_category AS rcc'.$i.' CROSS JOIN rebate_coupon AS rccr'.$i.' CROSS JOIN cart_discount AS rccd'.$i.') \n\t\t\t\tON\n\t\t\t\t(product_variant.id_product = pc'.$i.'.id_product AND pc'.$i.'.id_category = rcc'.$i.'.id_category AND rcc'.$i.'.id_rebate_coupon = rccr'.$i.'.id ANd rccr'.$i.'.id = rcd'.$i.'.id_rebate_coupon AND rcd'.$i.'.id = \"'.$mysqli->escape_string($id_cart_discount).'\")';\n\t\t\t\t\n\t\t\t\t$where_str[] = '(rcp'.$i.'.id_rebate_coupon IS NOT NULL OR rcc'.$i.'.id_rebate_coupon IS NOT NULL)';\n\t\t\t}\t\t\t\n\t\t\t\n\t\t\t$select = 'pvo'.$i.'.id_product_variant_group_option,\n\t\t\tpvo'.$i.'.id_product_variant_group,\n\t\t\tpvo'.$i.'_desc.name,\n\t\t\tpvgo'.$i.'.swatch_type,\n\t\t\tpvgo'.$i.'.color,\n\t\t\tpvgo'.$i.'.color2,\n\t\t\tpvgo'.$i.'.color3,\n\t\t\tpvgo'.$i.'.filename';\n\t\t\t\n\t\t\t$where[] = implode(' AND ',$where_str);\n\t\t\t\n\t\t\t$group_by[] = 'pvo'.$i.'.id_product_variant_group_option';\n\t\t\t\n\t\t\t$order_by = 'pvgo'.$i.'.sort_order ASC';\n\t\t\t\n\t\t\t$i++;\n\t\t\t\n\t\t\tif ($stop) break;\n\t\t}\n\t\t\n\t\t$joins = implode(\"\\r\\n\",$joins);\n\t\t$where = implode(' AND ',$where);\n\t\t$group_by = implode(',',$group_by);\n\t\t\t\t\t\n\t\tif ($result_options = $mysqli->query('SELECT\n\t\t'.$select.'\n\t\tFROM\t\t\n\t\tproduct_variant\n\t\t\n\t\t'.$joins.'\n\t\t\n\t\tWHERE\n\t\tproduct_variant.active = 1 \n\t\tAND\n\t\tproduct_variant.id_product = \"'.$mysqli->escape_string($id_product).'\"\n\t\tAND\n\t\t'.$where.'\n\t\tGROUP BY '.\n\t\t$group_by.'\n\t\tORDER BY '.\n\t\t$order_by)) {\t\t\t\n\t\t\tif ($result_options->num_rows) {\n\t\t\t\t$input_type = $groups[$id_product_variant_group]['input_type'];\n\t\n\t\t\t\t$output .= '<div style=\"margin-top:10px; margin-bottom:10px;\" id=\"variant_group_'.$id_product_variant_group.'\">\n\t\t\t\t<div style=\"margin-bottom:5px;\"><strong>'.$groups[$id_product_variant_group]['name'].'</strong></div>';\n\t\n\t\t\t\tif (!$input_type) {\n\t\t\t\t\t$output .= '<select name=\"variant_options['.$id_product_variant_group.']\">\n\t\t\t\t\t<option value=\"0\">--</option>';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$i=0;\n\t\t\t\twhile ($row_option = $result_options->fetch_assoc()) {\n\t\t\t\t\t$id_product_variant_group_option = $row_option['id_product_variant_group_option'];\n\t\t\t\t\t\n\t\t\t\t\tswitch ($input_type) {\n\t\t\t\t\t\t// dropdown\n\t\t\t\t\t\tcase 0:\n\t\t\t\t\t\t\t$output .= '<option value=\"'.$id_product_variant_group_option.'\">'.$row_option['name'].'</option>';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t// radio\n\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\t$output .= '<div><input type=\"radio\" name=\"variant_options['.$id_product_variant_group.']\" id=\"product_variant_'.$id_product_variant_group.'_'.$id_product_variant_group_option.'\" value=\"'.$id_product_variant_group_option.'\"> <label for=\"product_variant_'.$id_product_variant_group.'_'.$id_product_variant_group_option.'\">'.$row_option['name'].'</label></div>';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t// swatch\n\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\t$swatch_type = $row_option['swatch_type'];\n\t\t\t\t\t\t\t$color = $row_option['color'];\n\t\t\t\t\t\t\t$color2 = $row_option['color2'];\n\t\t\t\t\t\t\t$color3 = $row_option['color3'];\n\t\t\t\t\t\t\t$filename = $row_option['filename'];\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif ($i==8) { $output .= '<div class=\"cb\"></div>'; $i=0; }\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tswitch ($swatch_type) {\n\t\t\t\t\t\t\t\t// 1 color\n\t\t\t\t\t\t\t\tcase 0:\n\t\t\t\t\t\t\t\t\t$output .= '<a href=\"javascript:void(0);\" class=\"fl variant_color_outer_border\"><input type=\"radio\" id=\"variant_color_'.$id_product_variant_group.'_'.$id_product_variant_group_option.'\" name=\"variant_options['.$id_product_variant_group.']\" value=\"'.$id_product_variant_group_option.'\" /><div class=\"variant_color_inner_border\"><div style=\"background-color: '.$color.';\" class=\"variant_color\"></div></div></a>';\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t// 2 color\n\t\t\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\t\t\t$output .= '<a href=\"javascript:void(0);\" class=\"fl variant_color_outer_border\">\n\t\t\t\t\t\t\t\t\t<input type=\"radio\" id=\"variant_color_'.$id_product_variant_group.'_'.$id_product_variant_group_option.'\" name=\"variant_options['.$id_product_variant_group.']\" value=\"'.$id_product_variant_group_option.'\" />\n\t\t\t\t\t\t\t\t\t<div class=\"variant_color_inner_border\"><div class=\"variant_color\">\n\t\t\t\t\t\t\t\t\t<div class=\"fl\" style=\"width:10px; height:20px; background-color: '.$color.';\"></div>\n\t\t\t\t\t\t\t\t\t<div class=\"fl\" style=\"width:10px; height:20px; background-color: '.$color2.';\"></div>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t<div class=\"cb\"></div>\n\t\t\t\t\t\t\t\t\t</div></div>\n\t\t\t\t\t\t\t\t\t</a>';\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t// 3 color\n\t\t\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\t\t\t$output .= '<a href=\"javascript:void(0);\" class=\"fl variant_color_outer_border\">\n\t\t\t\t\t\t\t\t\t<input type=\"radio\" id=\"variant_color_'.$id_product_variant_group.'_'.$id_product_variant_group_option.'\" name=\"variant_options['.$id_product_variant_group.']\" value=\"'.$id_product_variant_group_option.'\" />\t\n\t\t\t\t\t\t\t\t\t<div class=\"variant_color_inner_border\"><div class=\"variant_color\">\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t<div class=\"fl\" style=\"width:7px; height:20px; background-color: '.$color.';\"></div>\n\t\t\t\t\t\t\t\t\t<div class=\"fl\" style=\"width:6px; height:20px; background-color: '.$color2.';\"></div>\n\t\t\t\t\t\t\t\t\t<div class=\"fl\" style=\"width:7px; height:20px; background-color: '.$color3.';\"></div>\n\t\t\t\t\t\t\t\t\t<div class=\"cb\"></div>\n\t\t\t\t\t\t\t\t\t</div></div>\n\t\t\t\t\t\t\t\t\t</a>';\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t// file\n\t\t\t\t\t\t\t\tcase 3:\n\t\t\t\t\t\t\t\t\t$output .= '<a href=\"javascript:void(0);\" class=\"fl variant_color_outer_border\">\n\t\t\t\t\t\t\t\t\t<input type=\"radio\" id=\"variant_color_'.$id_product_variant_group.'_'.$id_product_variant_group_option.'\" name=\"variant_options['.$id_product_variant_group.']\" value=\"'.$id_product_variant_group_option.'\" />\t\n\t\t\t\t\t\t\t\t\t<div class=\"variant_color_inner_border\"><div class=\"variant_color\">\t\t\n\t\t\t\t\t\t\t\t\t<img src=\"/images/products/swatch/'.$filename.'\" width=\"20\" height=\"20\" border=\"0\" hspace=\"0\" vspace=\"0\" />\n\t\t\t\t\t\t\t\t\t</div></div>\n\t\t\t\t\t\t\t\t\t</a>';\n\t\t\t\t\t\t\t\t\tbreak;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\t\t\t\t\n\t\t\n\t\t\t\t\t\t\t++$i;\t\t\t\t\t\n\t\t\t\t\t\t\tbreak;\t\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tswitch ($input_type) {\n\t\t\t\t\t// dropdown\n\t\t\t\t\tcase 0:\n\t\t\t\t\t\t$output .= '</select>\n\t\t\t\t\t\t<script type=\"text/javascript\">\n\t\t\t\t\t\t/* <![CDATA[ */\n\t\n\t\n\t\t\t\t\t\tjQuery(function(){\n\t\t\t\t\t\t\tjQuery(\"select[name=\\'variant_options['.$id_product_variant_group.']\\']\").change(function(){\n\t\t\t\t\t\t\t\t// get values\n\t\t\t\t\t\t\t\t// ajax query to get new variants\n\t\t\t\t\t\t\t\tload_variant('.$id_product_variant_group.', jQuery(this).val());\n\t\t\t\t\t\t\t\tif (jQuery(\"#display_error\").css(\"display\") == \"block\"){\njQuery(\"#display_error\").hide(\"blind\", { direction: \"vertical\" }, 1000);\n}\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/* ]]> */\n\t\t\t\t\t\t</script>';\t\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t// radio\n\t\t\t\t\tcase 1:\n\t\t\t\t\t\t$output .= '<script type=\"text/javascript\">\n\t\t\t\t\t\t/* <![CDATA[ */\n\t\n\t\t\t\t\t\tjQuery(function(){\n\t\t\t\t\t\t\tjQuery(\"input[name=\\'variant_options['.$id_product_variant_group.']\\']\").change(function(){\n\t\n\t\t\t\t\t\t\t\t// get values\n\t\t\t\t\t\t\t\t// ajax query to get new variants\n\t\t\t\t\t\t\t\tload_variant('.$id_product_variant_group.', jQuery(this).val());\n\t\t\t\t\t\t\t\tif (jQuery(\"#display_error\").css(\"display\") == \"block\"){\njQuery(\"#display_error\").hide(\"blind\", { direction: \"vertical\" }, 1000);\n}\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>';\t\t\t\t\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t// swatch\n\t\t\t\t\tcase 2:\t\t\t\t\n\t\t\t\t\t\t$output .= '<script type=\"text/javascript\">\n\t\t\t\t\t\t/* <![CDATA[ */\n\t\n\t\t\t\t\t\tjQuery(function(){\n\t\t\t\t\t\t\tjQuery(\"a.variant_color_outer_border\").click(function(){\n\t\t\t\t\t\t\t\tif (!jQuery(\"input[id^=\\'variant_color_\\']:checked\",this).length) { \n\t\t\t\t\t\t\t\t\tjQuery(\"input[id^=\\'variant_color_\\']\",this).attr(\"checked\",true);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tjQuery(\"a.variant_color_outer_border\").removeClass(\"selected\");\n\t\t\t\t\t\t\t\t\tjQuery(this).addClass(\"selected\");\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t// get values\n\t\t\t\t\t\t\t\t\t// ajax query to get new variants\n\t\t\t\t\t\t\t\t\tload_variant('.$id_product_variant_group.', jQuery(\"input[id^=\\'variant_color_\\']\",this).val());\n\t\t\t\t\t\t\t\t\tif (jQuery(\"#display_error\").css(\"display\") == \"block\"){\njQuery(\"#display_error\").hide(\"blind\", { direction: \"vertical\" }, 1000);\n}\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\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\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$output .= '<div class=\"cb\"></div></div>';\n\t\t\t} else {\n\t\t\t\t$output .= 'No options found.';\n\t\t\t}\n\t\t} else {\n\t\t\tthrow new Exception('An error occured while trying to get variant group options.'.\"\\r\\n\\r\\n\".$mysqli->error);\t\t\n\t\t}\n\t}\n\t\n\treturn $output;\n}",
"function acf_get_field_group($id = 0)\n{\n}",
"protected function getOptionFieldsConfig()\n {\n $fields['custom_option_group'] = $this->getCustomOptionGroupFieldConfig();\n\n return $fields;\n }",
"function add_local_field_group(){\n \n acf_add_local_field_group(array(\n 'key' => 'group_acfe_dynamic_options_page',\n 'title' => __('Options Page', 'acfe'),\n \n 'location' => array(\n array(\n array(\n 'param' => 'post_type',\n 'operator' => '==',\n 'value' => $this->post_type,\n ),\n ),\n ),\n \n 'menu_order' => 0,\n 'position' => 'normal',\n 'style' => 'default',\n 'label_placement' => 'left',\n 'instruction_placement' => 'label',\n 'hide_on_screen' => '',\n 'active' => 1,\n 'description' => '',\n \n 'fields' => array(\n array(\n 'key' => 'field_acfe_dop_menu_slug',\n 'label' => 'Menu slug',\n 'name' => 'menu_slug',\n 'type' => 'acfe_slug',\n 'instructions' => '(string) The URL slug used to uniquely identify this options page. Defaults to a url friendly version of Menu Title',\n 'required' => 1,\n 'conditional_logic' => 0,\n 'wrapper' => array(\n 'width' => '',\n 'class' => '',\n 'id' => '',\n ),\n 'acfe_validate' => '',\n 'acfe_update' => array(\n '5cd2a4d60fbf2' => array(\n 'acfe_update_function' => 'sanitize_title',\n ),\n ),\n 'acfe_permissions' => '',\n 'default_value' => '',\n 'placeholder' => '',\n 'prepend' => '',\n 'append' => '',\n 'maxlength' => '',\n ),\n array(\n 'key' => 'field_acfe_dop_menu_title',\n 'label' => 'Menu title',\n 'name' => 'menu_title',\n 'type' => 'text',\n 'instructions' => '(string) The title displayed in the wp-admin sidebar. Defaults to Page Title',\n 'required' => 0,\n 'conditional_logic' => 0,\n 'wrapper' => array(\n 'width' => '',\n 'class' => '',\n 'id' => '',\n ),\n 'acfe_validate' => '',\n 'acfe_update' => '',\n 'acfe_permissions' => '',\n 'default_value' => '',\n 'placeholder' => '',\n 'prepend' => '',\n 'append' => '',\n 'maxlength' => '',\n ),\n array(\n 'key' => 'field_acfe_dop_capability',\n 'label' => 'Capability',\n 'name' => 'capability',\n 'type' => 'text',\n 'instructions' => '(string) The capability required for this menu to be displayed to the user. Defaults to edit_posts.<br /><br />\n\nRead more about capability here: <a href=\"https://wordpress.org/support/article/roles-and-capabilities/\">https://wordpress.org/support/article/roles-and-capabilities/</a>',\n 'required' => 0,\n 'conditional_logic' => 0,\n 'wrapper' => array(\n 'width' => '',\n 'class' => '',\n 'id' => '',\n ),\n 'acfe_validate' => '',\n 'acfe_update' => '',\n 'acfe_permissions' => '',\n 'default_value' => 'edit_posts',\n 'placeholder' => '',\n 'prepend' => '',\n 'append' => '',\n 'maxlength' => '',\n ),\n array(\n 'key' => 'field_acfe_dop_position',\n 'label' => 'Position',\n 'name' => 'position',\n 'type' => 'text',\n 'instructions' => '(int|string) The position in the menu order this menu should appear. Defaults to bottom of utility menu items.<br /><br />\n\nWARNING: if two menu items use the same position attribute, one of the items may be overwritten so that only one item displays!<br />\nRisk of conflict can be reduced by using decimal instead of integer values, e.g. \\'63.3\\' instead of 63 (must use quotes).',\n 'required' => 0,\n 'conditional_logic' => 0,\n 'wrapper' => array(\n 'width' => '',\n 'class' => '',\n 'id' => '',\n ),\n 'acfe_validate' => '',\n 'acfe_update' => '',\n 'acfe_permissions' => '',\n 'default_value' => '',\n 'placeholder' => '',\n 'prepend' => '',\n 'append' => '',\n 'maxlength' => '',\n ),\n array(\n 'key' => 'field_acfe_dop_parent_slug',\n 'label' => 'Parent slug',\n 'name' => 'parent_slug',\n 'type' => 'text',\n 'instructions' => '(string) The slug of another WP admin page. if set, this will become a child page.',\n 'required' => 0,\n 'conditional_logic' => 0,\n 'wrapper' => array(\n 'width' => '',\n 'class' => '',\n 'id' => '',\n ),\n 'acfe_validate' => '',\n 'acfe_update' => '',\n 'acfe_permissions' => '',\n 'default_value' => '',\n 'placeholder' => '',\n 'prepend' => '',\n 'append' => '',\n 'maxlength' => '',\n ),\n array(\n 'key' => 'field_acfe_dop_icon_url',\n 'label' => 'Icon url',\n 'name' => 'icon_url',\n 'type' => 'text',\n 'instructions' => '(string) The icon class for this menu. Defaults to default WordPress gear.<br /><br />\nRead more about dashicons here: <a href=\"https://developer.wordpress.org/resource/dashicons/\">https://developer.wordpress.org/resource/dashicons/</a>',\n 'required' => 0,\n 'conditional_logic' => 0,\n 'wrapper' => array(\n 'width' => '',\n 'class' => '',\n 'id' => '',\n ),\n 'acfe_validate' => '',\n 'acfe_update' => '',\n 'acfe_permissions' => '',\n 'default_value' => '',\n 'placeholder' => '',\n 'prepend' => '',\n 'append' => '',\n 'maxlength' => '',\n ),\n array(\n 'key' => 'field_acfe_dop_redirect',\n 'label' => 'Redirect',\n 'name' => 'redirect',\n 'type' => 'true_false',\n 'instructions' => '(boolean) If set to true, this options page will redirect to the first child page (if a child page exists).\nIf set to false, this parent page will appear alongside any child pages. Defaults to true',\n 'required' => 0,\n 'conditional_logic' => 0,\n 'wrapper' => array(\n 'width' => '',\n 'class' => '',\n 'id' => '',\n ),\n 'acfe_validate' => '',\n 'acfe_update' => '',\n 'acfe_permissions' => '',\n 'message' => '',\n 'default_value' => 1,\n 'ui' => 1,\n 'ui_on_text' => 'True',\n 'ui_off_text' => 'False',\n ),\n array(\n 'key' => 'field_acfe_dop_post_id',\n 'label' => 'Post ID',\n 'name' => 'post_id',\n 'type' => 'text',\n 'instructions' => '(int|string) The \\'$post_id\\' to save/load data to/from. Can be set to a numeric post ID (123), or a string (\\'user_2\\').\nDefaults to \\'options\\'.',\n 'required' => 0,\n 'conditional_logic' => 0,\n 'wrapper' => array(\n 'width' => '',\n 'class' => '',\n 'id' => '',\n ),\n 'acfe_validate' => '',\n 'acfe_update' => '',\n 'acfe_permissions' => '',\n 'default_value' => 'options',\n 'placeholder' => '',\n 'prepend' => '',\n 'append' => '',\n 'maxlength' => '',\n ),\n array(\n 'key' => 'field_acfe_dop_autoload',\n 'label' => 'Autoload',\n 'name' => 'autoload',\n 'type' => 'true_false',\n 'instructions' => '(boolean) Whether to load the option (values saved from this options page) when WordPress starts up.\nDefaults to false.',\n 'required' => 0,\n 'conditional_logic' => 0,\n 'wrapper' => array(\n 'width' => '',\n 'class' => '',\n 'id' => '',\n ),\n 'acfe_validate' => '',\n 'acfe_update' => '',\n 'acfe_permissions' => '',\n 'message' => '',\n 'default_value' => 0,\n 'ui' => 1,\n 'ui_on_text' => 'True',\n 'ui_off_text' => 'False',\n ),\n array(\n 'key' => 'field_acfe_dop_update_button',\n 'label' => 'Update button',\n 'name' => 'update_button',\n 'type' => 'text',\n 'instructions' => '(string) The update button text.',\n 'required' => 0,\n 'conditional_logic' => 0,\n 'wrapper' => array(\n 'width' => '',\n 'class' => '',\n 'id' => '',\n ),\n 'acfe_validate' => '',\n 'acfe_update' => '',\n 'acfe_permissions' => '',\n 'default_value' => 'Update',\n 'placeholder' => '',\n 'prepend' => '',\n 'append' => '',\n 'maxlength' => '',\n ),\n array(\n 'key' => 'field_acfe_dop_updated_message',\n 'label' => 'Updated Message',\n 'name' => 'updated_message',\n 'type' => 'text',\n 'instructions' => '(string) The message shown above the form on submit.',\n 'required' => 0,\n 'conditional_logic' => 0,\n 'wrapper' => array(\n 'width' => '',\n 'class' => '',\n 'id' => '',\n ),\n 'acfe_validate' => '',\n 'acfe_update' => '',\n 'acfe_permissions' => '',\n 'default_value' => 'Options Updated',\n 'placeholder' => '',\n 'prepend' => '',\n 'append' => '',\n 'maxlength' => '',\n ),\n ),\n ));\n \n }",
"function tc_get_option( $option_name , $option_group = null ) {\r\n //do we have to look in a specific group of option (plugin?)\r\n $option_group = is_null($option_group) ? 'tc_theme_options' : $option_group;\r\n $saved = (array) get_option( $option_group );\r\n $defaults = $this -> default_options;\r\n $__options = wp_parse_args( $saved, $defaults );\r\n //$options = array_intersect_key( $saved , $defaults);\r\n $returned_option = isset($__options[$option_name]) ? $__options[$option_name] : false;\r\n return apply_filters( 'tc_get_option' , $returned_option , $option_name , $option_group );\r\n }",
"function acf_get_raw_field_group($id = 0)\n{\n}",
"function acf_get_local_field_group($key = '')\n{\n}",
"function acf_get_valid_field_group($field_group = \\false)\n{\n}",
"protected function getGroups()\n {\n $groups = parent::getGroups();\n\n // If an ID is already selected, we don't want the auto-generate option:\n if (!empty($this->value)) {\n unset($groups[0][1]);\n }\n\n return $groups;\n }",
"public function getGroup($option='')\n {\n global $mysqli;\n\n $groups ='';\n $select_group = $mysqli->query(\"SELECT * FROM groups\");\n while ($fetch_group = $select_group->fetch_assoc()) {\n $selected = \"\";\n if ($fetch_group[\"id\"] == $option)\n $selected = ' selected=\"selected\"';\n\n $groups.= '<option value=\"' . $fetch_group[\"id\"] . '\"' . $selected . '>' . $fetch_group[\"title\"] . '</option>';\n }\n return $groups;\n }",
"function load_other_fields($default = NULL) {\n global $LANG, $uploadFormOptionFieldsArray;\n\n\n if (!$default)\n $default = $_POST;\n\n $gpprivacy = $default['group_privacy'];\n $gpposting = $default['post_type'];\n\n $group_option_fields = array\n (\n 'privacy' => array('title' => lang('privacy'),\n 'type' => 'radiobutton',\n 'name' => 'group_privacy',\n 'id' => 'group_privacy',\n 'value' => array('0' => lang('grp_join_opt1'), '1' => lang('grp_join_opt2'), 2 => lang('grp_join_opt3')),\n 'checked' => $gpprivacy,\n 'db_field' => 'group_privacy',\n 'required' => 'no',\n 'display_function' => 'display_sharing_opt',\n ),\n 'posting' => array('title' => lang('grp_forum_posting'),\n 'type' => 'radiobutton',\n 'name' => 'post_type',\n 'id' => 'post_type',\n 'value' => array('0' => lang('vdo_br_opt1'), '1' => lang('vdo_br_opt2'), 2 => lang('grp_join_opt3')),\n 'checked' => $gpposting,\n 'db_field' => 'post_type',\n 'required' => 'no',\n 'display_function' => 'display_sharing_opt',\n ),\n );\n\n return $group_option_fields;\n }",
"function pmprowoo_extra_tab_options_for_gift_levels() {\t\r\n\tglobal $wpdb;\r\n\t\r\n\t// Get Discount Codes List\r\n\t$codes_sqlQuery = \"SELECT *, UNIX_TIMESTAMP(starts) as starts, UNIX_TIMESTAMP(expires) as expires FROM $wpdb->pmpro_discount_codes \";\r\n\t$codes_sqlQuery .= \"WHERE `code` NOT LIKE 'GIFT%' ORDER BY id ASC\";\r\n\t$codes = $wpdb->get_results($codes_sqlQuery, OBJECT);\r\n\t\t\r\n\t$gift_membership_code_options = array();\r\n\tif(!$codes) {\r\n\t\t$gift_membership_code_options[0] = 'No Discount Codes Created';\r\n\t} else {\r\n\t\t$gift_membership_code_options[0] = 'None';\r\n\t\tforeach($codes as $code) {\r\n\t\t\t$key = $code->id;\r\n\t\t\t$gift_membership_code_options[$key] = $code->code; \r\n\t\t}\r\n\t}\t\r\n?>\r\n<div class=\"options_group\">\r\n\t<p class=\"form-field\">\r\n\t\t<strong><?php _e('Gift a Membership', 'pmpro-woocommerce');?></strong><br />\r\n\t\t<?php \r\n\t\t\t// Load Membership Discounts\r\n\t\t\twoocommerce_wp_select(\r\n\t\t\t\tarray(\r\n\t\t\t\t'id' => '_gift_membership_code',\r\n\t\t\t\t'label' => __( 'Select Discount Code', 'pmpro-woocommerce' ),\r\n\t\t\t\t'options' => $gift_membership_code_options,\r\n\t\t\t\t'desc_tip' => 'true',\r\n\t\t'description' => __( 'Upon each purchase a new one-time use code (which start with \"GIFT\") will be created from the code selected here.', 'pmpro-woocommerce' ) \r\n\t\t\t\t)\r\n\t\t\t);\r\n\r\n\t\t\t// Recipient Email\r\n\t\t\twoocommerce_wp_select(\r\n\t\t\t\tarray(\r\n\t\t\t\t'id' => '_gift_membership_email_option',\r\n\t\t\t\t'label' => __( 'Email Recipient', 'pmpro-woocommerce' ),\r\n\t\t\t\t'options' => array(\r\n\t\t\t\t '1' => 'Yes',\r\n\t\t\t\t '0' => 'No',\r\n\t\t\t\t '3' => 'Customer Decides'\r\n\t\t\t\t\t\t\t ),\r\n\t\t\t\t'desc_tip' => 'true',\r\n\t\t'description' => __( 'Decide if a recipient email is entered and the code is emailed upon successful purchase.', 'pmpro-woocommerce' ) \r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t?>\r\n\t</p>\r\n</div>\r\n<?php\r\n}",
"function get_group( $id ) {\r\n global $wpdb;\r\n return $wpdb->get_row( $wpdb->prepare( \"SELECT * FROM {$wpdb->prefix}wpc_client_groups WHERE group_id = %d\", $id ), \"ARRAY_A\");\r\n }",
"function acf_get_field_group_post($id = 0)\n{\n}",
"function cmh_add_defaults() {\r\n\t$tmp = get_option('cmh_options');\r\n if( !is_array($tmp) ) {\r\n\t\tdelete_option('cmh_options'); // so we don't have to reset all the 'off' checkboxes too! (don't think this is needed but leave for now)\r\n\t\t$arr = array(\t\r\n\t\t\t\"rdo_group_one\" => \"h2\"\r\n\t\t);\r\n\t\tupdate_option('cmh_options', $arr);\r\n\t}\r\n}",
"private function _add_settings_group($callback) {\n\n\t\t\t$this->_group_count++;\n\t\t\tif ( !method_exists($this, $callback) ) {\n\t\t\t\twp_die( $this->_self . \" does not have a validate callback for this group. You have passed a method '$callback' that you have not defined in your extending settings class.\" );\n\t\t\t}\t\n\n\t\t\t// Use the extending class name for the group name. Create an array to allow multiple register_settings call\n\t\t\t// on the same page.\n\t\t\t$this->options_group[] = array(\n\t\t\t\t//\t'group' => $this->self . '-group-' . $this->_group_count,\n\t\t\t\t// Plugin ID + extending class name for the db options\n\t\t\t\t\n\t\t\t\t'options_name' => $this->plugin_id . '-' . $this->self . '-group-' . $this->_group_count,\n\t\t\t\t'callback' => $callback\n\t\t\t);\n\t\t}",
"function get_group($group, $query) {\r\n $qy=db_query(\"SELECT * FROM (\".$query .\") q WHERE \".($group=='Z99'?'idCND IS NULL': \"idCND= '\".$group.\"'\"));\r\n while ($fields=db_fetch_object($qy)) {\r\n $elements[$fields->nid][]=array(\r\n '#type'=>'checkbox',\r\n '#title'=>l($fields->title,'node/'.$fields->nid),\r\n '#description'=>get_cud_description($fields->cud),\r\n '#default_value'=>1,\r\n '#parents' => array($group,$fields->nid), // per mantenre l'array dei checkbos in $form_state[$group]\r\n );\r\n $elements[$fields->nid][]=array('#value'=>'Quantità:<b>'.$fields->qta.'<b>','#prefix'=>'<small><small><table><tr><td>','#suffix'=>'</td>');\r\n $elements[$fields->nid][]=array('#value'=>'Valore:<b>'.currencyFormat($fields->value).'<b>','#prefix'=>'<td>','#suffix'=>'</td>',);\r\n $elements[$fields->nid][]=array('#value'=>'Struttura:<b>'.get_structure($fields->struct).'<b>','#prefix'=>'<td>','#suffix'=>'</td></tr></table></small></small>',);\r\n }\r\n\r\n return $elements;\r\n}",
"function group_field( $group_key ) {\n // get the group field object\n $group_field = get_field_object( $group_key );\n\n // init return variable\n $output = '';\n\n // group title\n $output .= '<h2>' . $group_field[ 'label' ] . '</h2>';\n\n // display each question, it there's a reply\n foreach ( $group_field['sub_fields'] as $subfield ) {\n $reply = $group_field['value'][$subfield['name']];\n // if it's Control placeholder field, or tags field, skip it\n if ( 'Controls' != $subfield['label'] &&\n 'Select at least 3 tags that describe your actions. We encourage you to add additional tags as needed.' != $subfield['label'] &&\n 'Additional tags' != $subfield['label'] ) :\n $output .= '<div class=\"form-question ' . $subfield['key'] . '\">\n <h3>' . $subfield['label'] . '</h3>\n <div class=\"reply\">\n ' . $group_field['value'][$subfield['name']] . '\n </div>\n </div><!-- end of form-question -->';\n endif;\n }\n\n echo $output;\n}",
"function custom_tab_options_spec() {\n global $post;\n $location_array = explode('|', get_option( 'wcaddinfo_location' ));\n if(!empty($location_array)){\n $custom_tab_options_spec = array(\n 'location' => get_post_meta($post->ID, 'menu_location', true)\n );\n\n foreach ($location_array as $key => $location) {\n $location_trim = strtolower(str_replace(' ', '_', $location));\n $custom_tab_options_spec['available_start_time_'.$location_trim] = get_post_meta($post->ID, 'available_start_time_'.$location_trim, true);\n $custom_tab_options_spec['available_range_'.$location_trim] = get_post_meta($post->ID, 'available_range_'.$location_trim, true);\n }\n }\n?>\n <div id=\"custom_tab_data3\" class=\"panel woocommerce_options_panel\"> \n <div class=\"options_group custom_tab_options\"> \n <?php\n if($custom_tab_options_spec['location']){\n $sel_loc = @$custom_tab_options_spec['location']; \n }\n $location_array = explode('|', get_option( 'wcaddinfo_location' ));\n if(!empty($location_array)){\n foreach ($location_array as $key => $location) { ?>\n <p class=\"form-field\">\n <label><?php _e('Select location:', 'woothemes'); ?></label>\n <input type=\"checkbox\" name=\"menu_location[]\" value=\"<?php echo $location; ?>\" <?php if(in_array($location,$sel_loc)){ ?> checked=\"\" <?php } ?>> <?php echo $location; ?>\n </p>\n <?php $location_trim = strtolower(str_replace(' ', '_', $location)); ?>\n <p class=\"form-field\">\n <label><?php _e('Select available days:', 'woothemes'); ?></label>\n <?php\n $sel = array();\n if($custom_tab_options_spec['available_range_'.$location_trim]){\n $sel = @$custom_tab_options_spec['available_range_'.$location_trim]; \n }\n $flagday = get_option( 'wcaddinfo_day_start' );\n if(empty($flagday)){\n $flagday = 'sunday';\n }\n $sunday = strtotime(\"last \".$flagday);\n $sunday = date('w', $sunday)==date('w') ? $sunday+7*86400 : $sunday; \n $current_day = date('l');\n $current_date = date('d');\n \n //for ($i=0; $i < 7; $i++) { \n\n $day_range = get_option( 'wcaddinfo_day_range' );\n if(empty($day_range)){\n $day_range = 7;\n }\n for ($i=0; $i < $day_range; $i++) { \n $day = date(\"D\",strtotime(date(\"Y-m-d\",$sunday).\" +\".$i.\" days\"));\n $date = date(\"d\",strtotime(date(\"Y-m-d\",$sunday).\" +\".$i.\" days\"));\n $full_date = date(\"Y-m-d\",strtotime(date(\"Y-m-d\",$sunday).\" +\".$i.\" days\"));\n ?>\n <input type=\"checkbox\" name=\"available_range_<?php echo $location_trim; ?>[]\" value=\"<?php echo $full_date; ?>\" <?php if(in_array($full_date,$sel)){ ?> checked=\"\" <?php } ?>> <?php echo $day.'('.$date.')'; ?>\n <?php\n } ?>\n </p>\n <p class=\"form-field\">\n <label><?php _e('Select available time range:', 'woothemes'); ?></label>\n <?php $sel = @$custom_tab_options_spec['available_start_time_'.$location_trim]; ?> \n <?php \n $time_array = explode('|', get_option( 'wcaddinfo_timing' ));\n if(!empty($time_array)){\n foreach ($time_array as $key => $time) {\n ?> \n <input type=\"checkbox\" name=\"available_start_time_<?php echo $location_trim; ?>[]\" value=\"<?php echo $time; ?>\" <?php if(in_array($time,$sel)){ ?> checked=\"\" <?php } ?>> <?php echo $time; ?>\n <?php } } ?>\n </p>\n <hr>\n <?php \n }\n }\n ?> \n\t\t</div> \n </div>\n<?php\n}",
"public static function get_data( $group ) {\r\n\t\t\tif ( ! static::$data ) {\r\n\t\t\t\tstatic::$data = get_option( '_' . self::OPTION_NAME );\r\n\t\t\t}\r\n\t\t\treturn ( ! empty( static::$data[ $group ] ) AND is_array( static::$data[ $group ] ) )\r\n\t\t\t\t? static::$data[ $group ]\r\n\t\t\t\t: array();\r\n\t\t}",
"function acf_prepare_field_group_for_export($field_group = array())\n{\n}",
"function wppb_rf_epf_set_field_ids_on_field_select() {\r\n global $all_fields;\r\n $all_fields = get_option ( 'wppb_manage_fields', 'not_set' );\r\n\r\n // remove certain fields from the Field drop-down on edit profile form\r\n if( ( isset( $_GET['post_type'] ) && $_GET['post_type'] == 'wppb-epf-cpt' ) || ( isset( $_GET['post'] ) && get_post_type( absint( $_GET['post'] ) ) == 'wppb-epf-cpt' ) || ( isset( $_POST['meta'] ) && $_POST['meta'] == 'wppb_epf_fields' ) ) {\r\n foreach( $all_fields as $key => $field ) {\r\n\t\t\t$unwanted_fields = array( 'reCAPTCHA', 'Validation' );\r\n if( in_array( $field['field'], $unwanted_fields) ) {\r\n unset( $all_fields[$key] );\r\n }\r\n }\r\n $all_fields = array_values( $all_fields );\r\n }\r\n\r\n // remove certain fields from the Field drop-down on register form\r\n if( ( isset( $_GET['post_type'] ) && $_GET['post_type'] == 'wppb-rf-cpt' ) || ( isset( $_GET['post'] ) && get_post_type( absint( $_GET['post'] ) ) == 'wppb-rf-cpt' ) || ( isset( $_POST['meta'] ) && $_POST['meta'] == 'wppb_rf_fields' ) ) {\r\n foreach( $all_fields as $key => $field ) {\r\n if( $field['field'] == 'Default - Display name publicly as' ) {\r\n unset( $all_fields[$key] );\r\n }\r\n }\r\n $all_fields = array_values( $all_fields );\r\n }\r\n\r\n if( $all_fields !== 'not_set ') {\r\n\r\n if( !function_exists( 'wppb_rf_epf_set_field_id_select_option' ) ) {\r\n function wppb_rf_epf_set_field_id_select_option( $content, $field_id ){\r\n global $all_fields;\r\n $output = str_replace( '<option', '<option ' . 'data-id=\"' . $all_fields[$field_id]['id'] . '\"', $content );\r\n return $output;\r\n }\r\n }\r\n foreach($all_fields as $key => $value ) {\r\n add_filter('wck_select_wppb_epf_fields_field_option_' . $key, 'wppb_rf_epf_set_field_id_select_option', 10 ,2);\r\n add_filter('wck_select_wppb_rf_fields_field_option_' . $key, 'wppb_rf_epf_set_field_id_select_option', 10 ,2);\r\n }\r\n\r\n }\r\n}",
"public static function get_setting_group_fields(string $group)\n {\n }",
"function tc_get_theme_options ( $option_group = null ) {\r\n //do we have to look in a specific group of option (plugin?)\r\n $option_group = is_null($option_group) ? 'tc_theme_options' : $option_group;\r\n $saved = (array) get_option( $option_group );\r\n $defaults = $this -> default_options;\r\n $__options = wp_parse_args( $saved, $defaults );\r\n //$__options = array_intersect_key( $__options, $defaults );\r\n return $__options;\r\n }",
"function acf_prepare_field_group_for_import($field_group)\n{\n}",
"function options_from_csv($groupreg, $courseid, $csv) {\n $option_repeats = count($csv);\n \n \n // Initialize settings\n $groupreg->option = array();\n $groupreg->limit = array();\n $groupreg->grouping = array();\n $groupreg->optionid = array();\n $groupreg->option_repeats = $option_repeats;\n foreach ($csv as $row) {\n // get group id\n $groupname = trim(filter_var($row['name']));\n // TODO attention: Duplicate group names will lead to unexpected behavior!\n $option = groups_get_group_by_name($courseid, $groupname);\n // maxanswer\n $limit = intval($row['maxanswers']);\n // grouping\n $grouping = (isset($row['grouping'])) ? filter_var($row['grouping']) : '';\n // default optionid = 0\n $optionid = 0;\n \n array_push($groupreg->option, $option);\n array_push($groupreg->limit, $limit);\n array_push($groupreg->grouping, $grouping);\n array_push($groupreg->optionid, $optionid);\n \n }\n return $groupreg;\n}",
"function dg_get_media_group_entries( $wrapper_class, $class, $theme_img_size = '' ) {\n\t\n\t// GET FIELD\n\t\n\t$media_group_entries = get_post_meta( get_the_ID(), 'dg_media_repeat_group', true );\n\t\n\t// process group values\n\tforeach ( ( array ) $media_group_entries as $key => $entry ) {\n\t\t\n\t\n\t\t// VALUES\n\t\t\n\t\t// media type\n\t\t$media_type = isset( $entry[ 'dg_media_select_media' ] ) ? $entry[ 'dg_media_select_media' ] : ''; // check if select menu value is set\n\t\t// ui options attribute\n\t\t$ui_options = isset( $entry[ 'check_ui_options' ] ) ? 'data-ui-options=\"' . $entry[ 'check_ui_options' ][0] . '\"' : '';\n\t\t// sizes\n\t\t$img_size_class = isset( $entry[ 'dg_media_select_size' ] ) ? $entry[ 'dg_media_select_size' ] : '';\n\t\t\n\t\t// checks if a size is set in the theme, gets custom field value if otherwise\n\t\tif( empty( $theme_img_size ) ){\n\t\t\t\n\t\t\t// get custom field value\n\t\t\t\n\t\t\tif( isset( $img_size_class ) ){\n\n\t\t\t\tswitch( $img_size_class ){\n\n\t\t\t\t\t\tcase 's' :\n\t\t\t\t\t\t\t// medium 500\n\t\t\t\t\t\t\t// large 1024 \n\t\t\t\t\t\t\t$img_size = ( $media_type == 'img' ) ? 'large' : 'medium'; // bigger img size for (landscape) images\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'm' :\n\t\t\t\t\t\t\t// dg-large 1250\n\t\t\t\t\t\t\t// dg-extra-large 1700\n\t\t\t\t\t\t\t$img_size = ( $media_type == 'img' ) ? 'dg-extra-large' : 'dg-large' ; // bigger img size for (landscape) images\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'l' :\n\t\t\t\t\t\t\t// dg-super-large 2500\n\t\t\t\t\t\t\t$img_size = ( $media_type == 'img' ) ? 'dg-super-large' : 'dg-extra-large' ; // bigger img size for (landscape) images\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'full' :\n\t\t\t\t\t\t\t// dg-super-large 2500\n\t\t\t\t\t\t\t$img_size = 'dg-super-large';\n\t\t\t\t\t\t\tbreak;\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\t$img_size = $theme_img_size;\n\t\t}\n\t\t\n\t\t\n\t\t// resets the array\n\t\t$media = null;\n\n\t\t\n\t\t// IMAGE (file_list)\n\t\tif ( isset( $entry[ 'image' ] ) && !empty( $entry[ 'image' ] ) && $media_type === 'img' ) {\n\t\t\t\n\t\t\t// Loop through the file_list and fill it in the $media array\n\t\t\tforeach ( (array) $entry[ 'image' ] as $attachment_id => $attachment_url ) {\n\t\t\t\t$media[] = wp_get_attachment_image( $attachment_id, $img_size );\n\t\t\t}\n\t\t}\n\t\t\n\t\t// BOOKS (file_list)\n\t\tif ( isset( $entry[ 'image' ] ) && !empty( $entry[ 'image' ] ) && $media_type === 'book' ) {\n\t\t\t\n\t\t\t// Loop through the file_list and fill it in the $media array\n\t\t\tforeach ( (array) $entry[ 'image' ] as $attachment_id => $attachment_url ) {\n\t\t\t\t\n\t\t\t\t// extra markup for books\n\t\t\t\t$media[] = '<div class=\"container-img\">' . wp_get_attachment_image( $attachment_id, $img_size ) . '<span class=\"inner-shadow\"></span></div>';\n\t\t\t}\n\t\t}\n\t\t\n\t\t// MOVIE (oembed)\n\t\tif ( isset( $entry[ 'movie' ] ) && !empty( $entry[ 'movie' ] ) && $media_type === 'mov' ) {\n\t\t\t$media[] = wp_oembed_get( esc_url( $entry[ 'movie' ] ) ); // video embeding over oembed\n//\t\t\t$media[] = do_shortcode( $entry[ 'movie' ] ); // video embeding over shortcode\n//\t\t\t$dg_params[ 'video_url' ] = esc_url( $entry[ 'movie' ] ); // collect video url\n\t\t\t\n\t\t}\n\t\t\n\n\t\t// MARKUP\n\t\t\n\t\t// final check if a value exists\n\t\tif ( !empty( $media ) ){\n\t\t\t\n\t\t\tprint '<div class=\"' . $wrapper_class . '\" ' . $ui_options . '>';\n\t\t\t\tprint '<div class=\"' . $class . ' itm-' . $media_type . ' itm-' . $img_size_class . '\">' . implode( '', $media ) . '</div><!-- .' . $class . ' -->';\n\t\t\t\tprint '<button class=\"ui-slide-link\"></button>';\n\t\t\tprint '</div><!-- .' . $wrapper_class . ' -->';\n\t\t}\n\t}\n\t\n//\twp_localize_script( 'dg-scripts-js', 'dg_params', $dg_params ); // pass video url to javascript\n}",
"function acf_upgrade_500_field_group($ofg)\n{\n}",
"function _options_push($option , $new_data, $group = null) {\n \n // si existe lo pone al dia\n if(_options_exist($option)){\n //echo \"$option \" ;\n _options_update($option , $new_data);\n \n \n }else{ // si no lo crea\n _options_add($option, $new_data, $group);\n\n }\n \n}",
"public function meta_form_save( $group_id = 0 ) {\n\t\t// Don't update these settings unless the user can update them.\n\t\tif ( ! current_user_can( 'delete_others_pages' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$group_id = $group_id ? $group_id : bp_get_current_group_id();\n\n\t\t$meta = array(\n\t\t\t// Text boxes\n\t\t\t'geoid' => isset( $_POST['geoid'] ) ? $_POST['geoid'] : '',\n\t\t\t'area_ids' => isset( $_POST['area_ids'] ) ? $_POST['area_ids'] : '',\n\t\t);\n\n\t\tforeach ( $meta as $meta_key => $new_meta_value ) {\n\t\t\t/* Get the meta value of the custom field key. */\n\t\t\t$meta_value = groups_get_groupmeta( $group_id, $meta_key, true );\n\n\t\t\t/* If there is no new meta value but an old value exists, delete it. */\n\t\t\tif ( '' == $new_meta_value && $meta_value ) {\n\t\t\t\tgroups_delete_groupmeta( $group_id, $meta_key, $meta_value );\n\n\t\t\t/* If a new meta value was added and there was no previous value, add it. */\n\t\t\t} elseif ( $new_meta_value && '' == $meta_value ) {\n\t\t\t\tgroups_add_groupmeta( $group_id, $meta_key, $new_meta_value, true );\n\n\t\t\t/* If the new meta value does not match the old value, update it. */\n\t\t\t} elseif ( $new_meta_value && $new_meta_value != $meta_value ) {\n\t\t\t\tgroups_update_groupmeta( $group_id, $meta_key, $new_meta_value );\n\t\t\t}\n\t\t}\n\t}",
"public function getOptionGroupIdsOfSellerProduct($sp_id)\n\t{\n\t\t//options of a product\n\t\t$sp_options = SPOptionRelation::with('option.optionGroup')->where('sp_id','=',$sp_id)->get();\n\t\t$option_groups = [];\n\t\tforeach ($sp_options as $key => $sp_option) {\n\t\t\t$og = ucfirst($sp_option->option->optionGroup->option_g_id);\n // dd($og);\n\t\t\tif(!array_has($option_groups,$og)){\n\t\t\t\t$option_groups[$og]=array();\n\t\t\t}\n\t\t}\n\t}",
"public function generateDefaultConfigurableOptions() {\n\t\tif ($this->hasConfigurableOptions()) {\n\t\t\treturn false;\n\t\t}\n\n\t\tforeach ($this->defaultConfigurableOptions as $group) {\n\t\t\t//Create Group\n\t\t\tmysql_safequery('INSERT INTO tblproductconfiggroups(name,description) VALUES(?, ?)', array(\n\t\t\t\t$group['title'],\n\t\t\t\t$group['description']\n\t\t\t));\n\t\t\t$group_id = mysql_insert_id();\n\n\t\t\t//Assign to product\n\t\t\tmysql_safequery('INSERT INTO tblproductconfiglinks(gid,pid) VALUES(?,?)', array($group_id, $this->id));\n\n\t\t\tforeach ($group['fields'] as $field_key => $field) {\n\t\t\t\tswitch ($field['type']) {\n\t\t\t\t\tcase 'select': case 1: case 'dropdown':\n\t\t\t\t\t\t$field_type = 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'radio': case 2:\n\t\t\t\t\t\t$field_type = 2;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'yesno': case 3:\n\t\t\t\t\t\t$field_type = 3;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'quantity': case 4:\n\t\t\t\t\t\t$field_type = 4;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tmysql_safequery('INSERT INTO tblproductconfigoptions(gid,optionname,optiontype,qtyminimum,qtymaximum,`order`,hidden) VALUES(?,?,?,?,?,0,0)', array(\n\t\t\t\t\t$group_id,\n\t\t\t\t\t$field_key . '|' . $field['title'],\n\t\t\t\t\t$field_type,\n\t\t\t\t\tisset($field['qtyminimum']) ? (int) $field['qtyminimum'] : 0,\n\t\t\t\t\tisset($field['qtymaximum']) ? (int) $field['qtymaximum'] : 0,\n\t\t\t\t));\n\n\t\t\t\t$config_id = mysql_insert_id();\n\t\t\t\t$currencyDefault = mysql_fetch_assoc(mysql_safequery(\"SELECT * FROM `tblcurrencies` WHERE `default`=1 LIMIT 1\", array()));\n\n\t\t\t\t//Insert options\n\t\t\t\tforeach ($field['options'] as $option) {\n\t\t\t\t\tmysql_safequery(\"INSERT INTO tblproductconfigoptionssub(configid,optionname,sortorder,hidden) VALUES(?,?,0,0)\", array(\n\t\t\t\t\t\t$config_id,\n\t\t\t\t\t\t$option['value'] . '|' . $option['title'],\n\t\t\t\t\t\tisset($field['sortorder']) ? (int) $field['sortorder'] : 0,\n\t\t\t\t\t\tisset($field['hidden']) ? 'on' : '',\n\t\t\t\t\t));\n\t\t\t\t\t$suboption_id = mysql_insert_id();\n\n\t\t\t\t\tif (isset($field['options']['pricing'])) {\n\t\t\t\t\t\tforeach ($field['options']['pricing'] as $currency_id => $values) {\n\t\t\t\t\t\t\tmysql_safequery('INSERT INTO `tblpricing` (`type`,`currency`,`relid`,`msetupfee`,`qsetupfee`,`ssetupfee`,`asetupfee`,`bsetupfee`,`tsetupfee`,`monthly`,`quarterly`,`semiannually`,`annually`,`biennially`,`triennially`) VALUES(\"configoptions\",?,?,?,?,?,?,?,?,?,?,?,?,?,?)', array(\n\t\t\t\t\t\t\t\t$currency_id,\n\t\t\t\t\t\t\t\t$suboption_id,\n\t\t\t\t\t\t\t\tisset($values['msetupfee']) ? (float) $values['msetupfee'] : 0,\n\t\t\t\t\t\t\t\tisset($values['qsetupfee']) ? (float) $values['qsetupfee'] : 0,\n\t\t\t\t\t\t\t\tisset($values['ssetupfee']) ? (float) $values['ssetupfee'] : 0,\n\t\t\t\t\t\t\t\tisset($values['asetupfee']) ? (float) $values['asetupfee'] : 0,\n\t\t\t\t\t\t\t\tisset($values['bsetupfee']) ? (float) $values['bsetupfee'] : 0,\n\t\t\t\t\t\t\t\tisset($values['tsetupfee']) ? (float) $values['tsetupfee'] : 0,\n\t\t\t\t\t\t\t\tisset($values['monthly']) ? (float) $values['monthly'] : 0,\n\t\t\t\t\t\t\t\tisset($values['quarterly']) ? (float) $values['quarterly'] : 0,\n\t\t\t\t\t\t\t\tisset($values['semiannually']) ? (float) $values['semiannually'] : 0,\n\t\t\t\t\t\t\t\tisset($values['annually']) ? (float) $values['annually'] : 0,\n\t\t\t\t\t\t\t\tisset($values['biennially']) ? (float) $values['biennially'] : 0,\n\t\t\t\t\t\t\t\tisset($values['triennially']) ? (float) $values['triennially'] : 0,\n\t\t\t\t\t\t\t));\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmysql_safequery(\"INSERT INTO `tblpricing` ( `type` , `currency` , `relid` , `msetupfee` , `qsetupfee` , `ssetupfee` , `asetupfee` , `bsetupfee` , `tsetupfee` , `monthly` , `quarterly` , `semiannually` , `annually` , `biennially` , `triennially`)\n\t\t\t\t\t\t\tVALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)\", array(\"configoptions\", $currencyDefault['id'], $suboption_id,\"0.00\",\"0.00\",\"0.00\",\"0.00\",\"0.00\",\"0.00\",\"0.00\",\"0.00\",\"0.00\",\"0.00\",\"0.00\",\"0.00\"));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}",
"public function optionsOfSellerProductInOptionGroup($sp_id,$option_g_id)\n\t{\n\t\t$sp_options = SPOptionRelation::with('option.optionGroup')->where('sp_id','=',$sp_id)->get();\n\t\t$sp_og = [];\n\t\tforeach ($sp_options as $key => $sp_option) {\n\t\t\tif($sp_option->option->option_g_id == $option_g_id){\n\t\t\t\tarray_push($sp_og,$sp_option);\n\t\t\t}\n\t\t}\n\t\t$options = [];\n\t\tforeach ($sp_og as $key => $sp_option) {\n\t\t\t$option =$sp_option->option;\n\t\t\tif(!array_has($options,$option)){\n\t\t\t\tarray_push($options,$option);\n\t\t\t}\n\t\t}\n\t\treturn ($options);\n\t}",
"protected function getOptions()\n {\n $dbo = JFactory::getDbo();\n $query = $dbo->getQuery(true);\n\n $query->select('DISTINCT id AS value, field AS text')->from('#__thm_groups_fields')->order(\"text ASC\");\n\n // Suppress the inclusion of the file field type for new attribute types\n if (empty(JFactory::getApplication()->input->getInt('id'))) {\n $query->where('id != 4');\n }\n\n $dbo->setQuery($query);\n\n try {\n $fields = $dbo->loadAssocList();\n } catch (Exception $exc) {\n return parent::getOptions();\n }\n\n $options = [];\n foreach ($fields as $field) {\n\n $options[$field['text']] = JHtml::_('select.option', $field['value'], $field['text']);\n }\n\n return array_merge(parent::getOptions(), $options);\n }",
"function getSuggestGroup() {\n return getAll(\"SELECT * FROM `group` a \n WHERE id NOT IN (\n SELECT group_id \n FROM member_group \n WHERE member_id=?)\n AND a.id NOT IN (\n SELECT group_id \n FROM member_group_apply \n WHERE status = \\\"\\\") \n LIMIT 5\"\n ,[getLogin()['mid']]);\n}",
"public function meta_form_markup( $group_id = 0 ) {\n\t\tif ( ! current_user_can( 'delete_others_pages' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$group_id = $group_id ? $group_id : bp_get_current_group_id();\n\n\t\tif ( ! is_admin() ) : ?>\n\t\t\t<div class=\"content-row\">\n\t\t\t\t<hr />\n\t\t\t\t<h4>Group Meta</h4>\n\t\t<?php endif; ?>\n\n\t\t<label for=\"group-meta-geoid\">GeoID</label>\n\t\t<input id=\"group-meta-geoid\" type=\"text\" name=\"geoid\" value=\"<?php echo groups_get_groupmeta( $group_id, 'geoid', true ); ?>\">\n\n\t\t<label for=\"group-meta-area_ids\">Area IDs</label>\n\t\t<input id=\"group-meta-area_ids\" type=\"text\" name=\"area_ids\" value=\"<?php echo groups_get_groupmeta( $group_id, 'area_ids', true ); ?>\">\n\n\t\t<?php\n\t\tif ( ! is_admin() ) : ?>\n\t\t\t<hr />\n\t\t\t</div>\n\t\t<?php endif;\n\t}",
"function get_the_option( $key ) {\n return genesis_get_option( $key, GENESIS_SIMPLE_SETTINGS_FIELD );\n }",
"function give_get_settings_groups() {\n\n\t$current_section = give_get_current_setting_section();\n\n\treturn apply_filters( 'give_get_groups_' . $current_section, array() );\n}",
"public function getAssocLeagueSelect($country_id,$associd)\n\t{\t\t\n$app = JFactory::getApplication();\n $db = sportsmanagementHelper::getDBConnection(); \n $query = $db->getQuery(true);\n \n $query->select('l.id AS value, l.name AS text');\n $query->from('#__sportsmanagement_league AS l');\n $query->join('INNER','#__sportsmanagement_project AS p on l.id = p.league_id');\n $query->join('INNER','#__sportsmanagement_season AS s on s.id = p.season_id ');\n $query->where('l.associations = ' . $associd );\n $query->where('l.country = \\'' . $country_id. '\\'' );\n $query->group('l.name');\n $query->order('l.name');\n/*\nselect l.id AS value, l.name AS text\nfrom j25_sportsmanagement_league AS l\ninner join j25_sportsmanagement_project AS p on l.id = p.league_id\ninner join j25_sportsmanagement_season AS s on s.id = p.season_id\nwhere l.associations = 0\nand l.country = '889'\ngroup by l.name\norder by l.name\n\n*/\n\n\t\t$db->setQuery($query);\n \n $this->getAssocLeagueSelect = $query->dump();\n //$app->enqueueMessage(JText::_(__METHOD__.' '.__LINE__.' <br><pre>'.print_r($query->dump(),true).'</pre>'),'Notice');\n \n\t\t$res = $db->loadObjectList();\n\t\tif ($res) \n {\n $options = array(JHTML::_('select.option', 0, JText::_($this->getParam('leagues_text'))));\n\t\t\t$options = array_merge($options, $res);\n\t\t}\n\n\t\treturn $options;\n\t}",
"function settings_screen( $group_id = NULL ) {\n $setting = groups_get_groupmeta( $group_id, 'group_projects_setting' );\n \n ?>\n Save your plugin setting here: <input type=\"text\" name=\"group_projects_setting\" value=\"<?php echo esc_attr( $setting ) ?>\" />\n <?php\n }",
"function zwemlijst_get_group_data() {\n\n $groupid = filter_input( INPUT_GET, 'groupid' , FILTER_SANITIZE_NUMBER_INT );\n\n $row = [];\n\n $args = array(\n\n 'post_type' => 'leerling',\n 'numberposts' => -1,\n 'orderby' => 'title',\n 'order' => 'ASC',\n 'tax_query' => array(\n 'relation' => 'AND',\n 'badjeclause' => array(\n 'taxonomy' => 'groep',\n 'field' => 'id',\n 'terms' => [ $groupid ],\n 'operator' => 'IN',\n ),\n 'gestoptclause' => array(\n 'taxonomy' => 'groep',\n 'field' => 'slug',\n 'terms' => [ 'gestopt' ],\n 'operator' => 'NOT IN',\n ),\n )\n );\n\n $results = new WP_Query( $args );\n\n if ( $results->have_posts() ):\n foreach ( $results->posts as $post ) {\n\n $row[] = array( 'id' => $post->ID , 'text' => $post->post_title );\n\n }\n endif;\n\n echo json_encode( $row );\n wp_die();\n}",
"function osa_field_widget_options_select_form_alter(&$element, &$form_state, $context) {\r\n\r\n // This code, while it works to populate the selection boxes when built, fails on validation\r\n // So we have hard coded the values into the form for now.\r\n /* populate the drop down with the class types\r\n if ($element['#field_name'] == 'field_class_type') {\r\n $element['#options'] = array('_none' => '- Select a value -') + osa_options_class_types();\r\n }\r\n */\r\n \r\n // populate the drop down with the list of events\r\n // only include events of type 'Group Class (Master)'\r\n if ($element['#field_name'] == 'field_event_master') {\r\n civicrm_initialize();\r\n $results = civicrm_api('event', 'get', array('event_type_id' => OSA_EVENT_GROUP_CLASS_MASTER, 'is_active' => TRUE, 'rowCount' => PHP_INT_MAX, 'version' => 3));\r\n $options = array();\r\n foreach ($results['values'] as $class) {\r\n $options[$class['id']] = $class['event_title'];\r\n }\r\n asort($options);\r\n $element['#options'] = array('_none' => '- Select a value -') + $options;\r\n }\r\n}",
"function group_get_grouptype_options($currentgrouptype=null) {\n $groupoptions = array();\n $jointypecount = array('open' => 0, 'invite' => 0, 'request' => 0, 'controlled' => 0);\n $grouptypes = group_get_grouptypes();\n $enabled = array_map(create_function('$a', 'return $a->name;'), plugins_installed('grouptype'));\n if (is_null($currentgrouptype) || in_array($currentgrouptype, $enabled)) {\n $grouptypes = array_intersect($enabled, $grouptypes);\n }\n foreach ($grouptypes as $grouptype) {\n safe_require('grouptype', $grouptype);\n if (call_static_method('GroupType' . $grouptype, 'can_be_created_by_user')) {\n $grouptypename = get_string('name', 'grouptype.' . $grouptype);\n foreach (call_static_method('GroupType' . $grouptype, 'allowed_join_types') as $jointype) {\n $jointypecount[$jointype]++;\n $groupoptions['jointype'][\"$grouptype.$jointype\"] = get_string('membershiptype.'.$jointype, 'group');\n $groupoptions['grouptype'][\"$grouptype.$jointype\"] = $grouptypename . ': ' . get_string('membershiptype.'.$jointype, 'group');\n }\n }\n }\n $duplicates = array_reduce($jointypecount, create_function('$a, $b', 'return $a || $b > 1;'));\n if ($duplicates) {\n return $groupoptions['grouptype'];\n }\n return $groupoptions['jointype'];\n}",
"public static function add_option() {\n\t\tFrmAppHelper::permission_check('frm_edit_forms');\n check_ajax_referer( 'frm_ajax', 'nonce' );\n\n\t\t$id = FrmAppHelper::get_post_param( 'field_id', 0, 'absint' );\n\t\t$opt_type = FrmAppHelper::get_post_param( 'opt_type', '', 'sanitize_text_field' );\n\t\t$opt_key = FrmAppHelper::get_post_param( 'opt_key', 0, 'absint' );\n\n $field = FrmField::getOne($id);\n\n if ( 'other' == $opt_type ) {\n\t\t\t$opt = __( 'Other', 'formidable' );\n $other_val = '';\n $opt_key = 'other_' . $opt_key;\n } else {\n\t\t\t$opt = __( 'New Option', 'formidable' );\n }\n $field_val = $opt;\n\n $field_data = $field;\n\t\t$field = (array) $field;\n\t\t$field['separate_value'] = isset( $field_data->field_options['separate_value'] ) ? $field_data->field_options['separate_value'] : 0;\n\t\tunset( $field_data );\n\n\t\t$field_name = 'item_meta[' . $id . ']';\n\t\t$html_id = FrmFieldsHelper::get_html_id( $field );\n $checked = '';\n\n if ( 'other' == $opt_type ) {\n\t\t\tinclude( FrmAppHelper::plugin_path() . '/pro/classes/views/frmpro-fields/other-option.php' );\n } else {\n\t\t\trequire( FrmAppHelper::plugin_path() . '/classes/views/frm-fields/single-option.php' );\n }\n wp_die();\n }",
"static function get_options(){\n\t\t\t\tglobal $gdlr_core_item_pdb;\n\t\t\t\t\n\t\t\t\treturn array(\n\t\t\t\t\t'general' => array(\n\t\t\t\t\t\t'title' => esc_html__('General', 'goodlayers-core'),\n\t\t\t\t\t\t'options' => array(\n\t\t\t\t\t\t\t'image' => array(\n\t\t\t\t\t\t\t\t'title' => esc_html__('Image', 'goodlayers-core'),\n\t\t\t\t\t\t\t\t'type' => 'upload',\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'thumbnail-size' => array(\n\t\t\t\t\t\t\t\t'title' => esc_html__('Thumbnail Size', 'goodlayers-core'),\n\t\t\t\t\t\t\t\t'type' => 'combobox',\n\t\t\t\t\t\t\t\t'options' => 'thumbnail-size',\n\t\t\t\t\t\t\t\t'default' => 'full'\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'title' => array(\n\t\t\t\t\t\t\t\t'title' => esc_html__('Title', 'goodlayers-core'),\n\t\t\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t\t\t'default' => esc_html__('Promo Box Item Title', 'goodlayers-core'),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'content' => array(\n\t\t\t\t\t\t\t\t'title' => esc_html__('Content', 'goodlayers-core'),\n\t\t\t\t\t\t\t\t'type' => 'tinymce',\n\t\t\t\t\t\t\t\t'default' => esc_html__('Promo box item sample content', 'goodlayers-core'),\n\t\t\t\t\t\t\t\t'wrapper-class' => 'gdlr-core-fullsize'\n\t\t\t\t\t\t\t),\t\n\t\t\t\t\t\t\t'text-align' => array(\n\t\t\t\t\t\t\t\t'title' => esc_html__('Text Align', 'goodlayers-core'),\n\t\t\t\t\t\t\t\t'type' => 'radioimage',\n\t\t\t\t\t\t\t\t'options' => 'text-align',\n\t\t\t\t\t\t\t\t'default' => 'center'\n\t\t\t\t\t\t\t),\t\t\t\t\t\n\t\t\t\t\t\t)\n\t\t\t\t\t),\n\t\t\t\t\t'frame' => array(\n\t\t\t\t\t\t'title' => esc_html__('Frame Style', 'goodlayers-core'),\n\t\t\t\t\t\t'options' => array(\n\t\t\t\t\t\t\t'enable-frame' => array(\n\t\t\t\t\t\t\t\t'title' => esc_html__('Enable Frame', 'goodlayers-core'),\n\t\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t\t'default' => 'enable'\n\t\t\t\t\t\t\t), \n\t\t\t\t\t\t\t'enable-shadow' => array(\n\t\t\t\t\t\t\t\t'title' => esc_html__('Enable Shadow', 'goodlayers-core'),\n\t\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t\t'default' => 'enable',\n\t\t\t\t\t\t\t\t'condition' => array( 'enable-frame' => 'enable' )\n\t\t\t\t\t\t\t), \n\t\t\t\t\t\t\t'frame-padding' => array(\n\t\t\t\t\t\t\t\t'title' => esc_html__('Frame Padding', 'goodlayers-core'),\n\t\t\t\t\t\t\t\t'type' => 'custom',\n\t\t\t\t\t\t\t\t'item-type' => 'padding',\n\t\t\t\t\t\t\t\t'data-input-type' => 'pixel',\n\t\t\t\t\t\t\t\t'default' => array( 'top'=>'30px', 'right'=>'30px', 'bottom'=>'10px', 'left'=>'30px', 'settings'=>'unlink' ),\n\t\t\t\t\t\t\t\t'condition' => array( 'enable-frame' => 'enable' )\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'frame-background-color' => array(\n\t\t\t\t\t\t\t\t'title' => esc_html__('Frame Background Color', 'goodlayers-core'),\n\t\t\t\t\t\t\t\t'type' => 'colorpicker',\n\t\t\t\t\t\t\t\t'condition' => array( 'enable-frame' => 'enable' )\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'frame-border-width' => array(\n\t\t\t\t\t\t\t\t'title' => esc_html__('Frame Border Width', 'goodlayers-core'),\n\t\t\t\t\t\t\t\t'type' => 'custom',\n\t\t\t\t\t\t\t\t'item-type' => 'padding',\n\t\t\t\t\t\t\t\t'data-input-type' => 'pixel',\n\t\t\t\t\t\t\t\t'default' => array( 'top'=>'0px', 'right'=>'1px', 'bottom'=>'1px', 'left'=>'1px', 'settings'=>'unlink' ),\n\t\t\t\t\t\t\t\t'condition' => array( 'enable-frame' => 'enable' )\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'frame-border-color' => array(\n\t\t\t\t\t\t\t\t'title' => esc_html__('Frame Border Color', 'goodlayers-core'),\n\t\t\t\t\t\t\t\t'type' => 'colorpicker',\n\t\t\t\t\t\t\t\t'condition' => array( 'enable-frame' => 'enable' )\n\t\t\t\t\t\t\t), \n\t\t\t\t\t\t)\n\t\t\t\t\t),\n\t\t\t\t\t'typography' => array(\n\t\t\t\t\t\t'title' => esc_html__('Typography', 'goodlayers-core'),\n\t\t\t\t\t\t'options' => array(\n\t\t\t\t\t\t\t'title-size' => array(\n\t\t\t\t\t\t\t\t'title' => esc_html__('Title Size', 'goodlayers-core'),\n\t\t\t\t\t\t\t\t'type' => 'fontslider',\n\t\t\t\t\t\t\t\t'default' => '14px'\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'content-size' => array(\n\t\t\t\t\t\t\t\t'title' => esc_html__('Content Size', 'goodlayers-core'),\n\t\t\t\t\t\t\t\t'type' => 'fontslider',\n\t\t\t\t\t\t\t\t'default' => '14px'\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t)\n\t\t\t\t\t),\n\t\t\t\t\t'color' => array(\n\t\t\t\t\t\t'title' => esc_html__('Color', 'goodlayers-core'),\n\t\t\t\t\t\t'options' => array(\n\t\t\t\t\t\t\t'title-color' => array(\n\t\t\t\t\t\t\t\t'title' => esc_html__('Title Color', 'goodlayers-core'),\n\t\t\t\t\t\t\t\t'type' => 'colorpicker'\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'content-color' => array(\n\t\t\t\t\t\t\t\t'title' => esc_html__('Content Color', 'goodlayers-core'),\n\t\t\t\t\t\t\t\t'type' => 'colorpicker'\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)\n\t\t\t\t\t),\n\t\t\t\t\t'spacing' => array(\n\t\t\t\t\t\t'title' => esc_html__('Spacing', 'goodlayers-core'),\n\t\t\t\t\t\t'options' => array(\n\t\t\t\t\t\t\t'padding-bottom' => array(\n\t\t\t\t\t\t\t\t'title' => esc_html__('Padding Bottom ( Item )', 'goodlayers-core'),\n\t\t\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t\t\t'data-input-type' => 'pixel',\n\t\t\t\t\t\t\t\t'default' => $gdlr_core_item_pdb\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}",
"function get_value_options() {\r\n\t\t$sql_string = \"\";\r\n\t\tglobal $user;\r\n\t\t\r\n\t\tif( user_is_logged_in() ) {\r\n\t\t\t\r\n\t\t\tif( in_array('super user', $user->roles) ) {\r\n\t\t\t\t$sql_string = \" \";\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t$user_obj = user_load($user->uid);\r\n\t\t\t\t$franchise_nid = $user_obj->field_user_franchise['und'][0]['nid']; \r\n\t\t\t\t$user_obj = user_load($user->uid); \r\n\t\t\t\t$user_franchise_nid = $user_obj->field_user_franchise['und'][0]['nid'];\r\n\t\t\t\t$sql_string = \" AND fr.field_user_franchise_nid = '\" .$user_franchise_nid. \"'\";\r\n\t\t\t}\r\n\t\t}\r\n\t\r\n\t\t$query = \"SELECT DISTINCT fr.entity_id, usr.name \r\n\t\tFROM {field_data_field_user_franchise} fr, {users_roles} ur, {node} n, {users} usr \r\n\t\tWHERE (fr.entity_id = ur.uid AND ur.rid != '7') \r\n\t\tAND fr.entity_id = n.uid AND fr.entity_id = usr.uid AND n.type = 'shipment' \" .$sql_string. \"\";\r\n\t\t\r\n\t\t$res = db_query($query); \r\n\r\n\t\tforeach ( $res as $user_value ) {\r\n\t\t\t$users[$user_value->entity_id] = $user_value->name;\r\n\t\t}\r\n // We don't need Guest user here, so remove it.\r\n unset($users[0]);\r\n\t\t// Sort by username.\r\n natsort($users);\r\n\r\n $this->value_options = $users;\r\n\r\n return $users;\r\n }",
"public function get_options($group = 'student_status') {\n\t\t$query = $this->db\n\t\t\t->select('id, option')\n\t\t\t->where('group', $group)\n\t\t\t->where('is_deleted', 'false')\n\t\t\t->order_by('id', 'ASC')\n\t\t\t->get(self::$table);\n\t\t$data = [];\n\t\tforeach($query->result() as $row) {\n\t\t\t$data[$row->id] = $row->option;\n\t\t}\n\t\treturn $data;\n\t}",
"public function run()\n {\n $group_options = array(\n array(\n 'title' => 'មហាវិទ្យាល័យបច្ចេកទេសអគ្គិសនី',\n 'description' => \"(ដេប៉ាតឺម៉ង់អគ្គិសនីនិងថាមពល; ដេប៉ាតឺម៉ង់ព័ត៍មានវិទ្យានិងទូរគមនាគមន៏; ដេប៉ាតឺម៉ង់ឧស្សាហកម្មនិងមេកានិក)\",\n 'create_uid' => 1,\n 'created_at'=>Carbon\\Carbon::now(),\n 'updated_at'=>Carbon\\Carbon::now()\n ),\n array(\n 'title' => \"មហាវិទ្យាល័យសំណង់ ; មហាវិទ្យាល័យរ៉ែនិងភូគព្ឆសាស្ត្រ\",\n 'description' => '',\n 'create_uid' => 1,\n 'created_at'=>Carbon\\Carbon::now(),\n 'updated_at'=>Carbon\\Carbon::now()\n ),\n array(\n 'title' => \"មហាវិទ្យាល័យគីមីឧស្សាហកម្ម និង មហាវិទ្យាល័យវារីសាស្ត្រ (ធនធានទឹក)\",\n 'description' => '',\n 'create_uid' => 1,\n 'created_at'=>Carbon\\Carbon::now(),\n 'updated_at'=>Carbon\\Carbon::now()\n )\n )\n ;\n foreach($group_options as $group_option){\n DB::table('group_options')->insert($group_option);\n }\n }",
"protected function _getGroups() {\n\t\t$groups = Mage::getResourceModel('flexslider/group_collection');\n\t\t$options = array('' => $this->__('-- Please Select --'));\n\n\t\tforeach($groups as $group) {\n\t\t\t$options[$group->getId()] = $group->getTitle();\n\t\t}\n\n\t\treturn $options;\n\t}",
"function MyMod_Data_Group_Def_Get($group,$single=FALSE,$echo=True)\n {\n if ($this->MyMod_Data_Group_Singular($single))\n {\n if (!empty($this->ItemDataSGroups[ $group ]))\n {\n return $this->ItemDataSGroups[ $group ];\n }\n }\n else\n {\n if (!empty($this->ItemDataGroups[ $group ]))\n {\n return $this->ItemDataGroups[ $group ];\n }\n }\n\n if ($echo)\n {\n echo $this->ModuleName.\" Warning: Group $group undefined\";\n $this->AddMsg(\"Warning: Group $group undefined\");\n exit();\n }\n\n return array();\n }",
"function groupCallback($name, $element, $data) {\n $result = sprintf(\n '<select name=\"%s[%s]\" class=\"dialogSelect dialogScale\">',\n $this->paramName,\n $name\n );\n $selected = (!$data) ? ' selected=\"selected\"' : '';\n $result .= sprintf(\n '<option value=\"\"%s>%s</option>', $selected, $this->_gt('[any]')\n );\n $sql = \"SELECT surfergroup_id, surfergroup_title\n FROM %s\n ORDER BY surfergroup_title ASC\";\n $sqlData = array($this->tableGroups);\n if ($res = $this->databaseQueryFmt($sql, $sqlData)) {\n while ($row = $res->fetchRow(DB_FETCHMODE_ASSOC)) {\n $selected = ($data == $row['surfergroup_id']) ? ' selected=\"selected\"' : '';\n $result .= sprintf(\n '<option value=\"%s\"%s>%s</option>',\n $row['surfergroup_id'],\n $selected,\n $row['surfergroup_title']\n );\n }\n }\n $result .= '</select>';\n return $result;\n }",
"function wpcf_admin_export_selected_data ( array $items, $_type = 'all', $return = 'download', $use_cache = false)\n{\n global $wpcf;\n\n $xml = new ICL_Array2XML();\n $data = array();\n $data['settings'] = wpcf_get_settings();\n\n if ( 'user_groups' == $_type || 'all' == $_type ) {\n // Get groups\n if ( empty( $items ) ) {\n $groups = get_posts(\n array(\n 'post_type' => TYPES_USER_META_FIELD_GROUP_CPT_NAME,\n 'post_status' => null,\n 'numberposts' => '-1',\n )\n );\n } else {\n /*\n *\n * This fails\n * $items are in form of:\n * 0 => array('id' => 'pt', ...)\n */\n foreach ( $items as $k => $item ) {\n if ( isset( $item['id'] ) ) {\n $items[$k] = intval( wpcf_modman_get_submitted_id( 'groups',\n $item['id'] ) );\n }\n }\n $args = array(\n 'post__in' => $items,\n 'post_type' => TYPES_USER_META_FIELD_GROUP_CPT_NAME,\n 'post_status' => 'all',\n 'posts_per_page' => -1\n );\n $groups = get_posts( $args );\n }\n if ( !empty( $groups ) ) {\n $data['user_groups'] = array('__key' => 'group');\n foreach ( $groups as $key => $post ) {\n $post = (array) $post;\n $post_data = array();\n $copy_data = array('ID', 'post_content', 'post_title',\n 'post_excerpt', 'post_type', 'post_status');\n foreach ( $copy_data as $copy ) {\n if ( isset( $post[$copy] ) ) {\n $post_data[$copy] = $post[$copy];\n }\n }\n $_data = $post_data;\n $meta = get_post_custom( $post['ID'] );\n if ( !empty( $meta ) ) {\n $_meta = array();\n foreach ( $meta as $meta_key => $meta_value ) {\n if ( in_array( $meta_key,\n array(\n '_wp_types_group_showfor',\n '_wp_types_group_fields',\n '_wp_types_group_admin_styles'\n )\n )\n ) {\n $_meta[$meta_key] = $meta_value[0];\n }\n }\n if ( !empty( $_meta ) ) {\n $_data['meta'] = $_meta;\n }\n }\n $_data['checksum'] = $_data['hash'] = $wpcf->export->generate_checksum( 'group',\n $post['ID'] );\n $_data['__types_id'] = $post['post_name'];\n $_data['__types_title'] = $post['post_title'];\n $data['user_groups']['group-' . $post['ID']] = $_data;\n }\n }\n\n if ( !empty( $items ) ) {\n // Get fields by group\n // TODO Document why we use by_group\n $fields = array();\n foreach ( $groups as $key => $post ) {\n $fields = array_merge( $fields,\n wpcf_admin_fields_get_fields_by_group( $post->ID,\n 'slug', false, false, false,\n TYPES_USER_META_FIELD_GROUP_CPT_NAME, 'wpcf-usermeta',\n $use_cache ) );\n }\n } else {\n // Get fields\n $fields = wpcf_admin_fields_get_fields( false, false, false,\n 'wpcf-usermeta' );\n }\n if ( !empty( $fields ) ) {\n\n // Add checksums before WPML\n foreach ( $fields as $field_id => $field ) {\n // TODO WPML and others should use hook\n $fields[$field_id] = apply_filters( 'wpcf_export_field',\n $fields[$field_id] );\n $fields[$field_id]['__types_id'] = $field_id;\n $fields[$field_id]['__types_title'] = $field['name'];\n $fields[$field_id]['checksum'] = $fields[$field_id]['hash'] = $wpcf->export->generate_checksum(\n 'field', $field_id\n );\n }\n\n // WPML\n global $iclTranslationManagement;\n if ( !empty( $iclTranslationManagement ) ) {\n foreach ( $fields as $field_id => $field ) {\n // TODO Check this for all fields\n if ( isset( $iclTranslationManagement->settings['custom_fields_translation'][wpcf_types_get_meta_prefix( $field ) . $field_id] ) ) {\n $fields[$field_id]['wpml_action'] = $iclTranslationManagement->settings['custom_fields_translation'][wpcf_types_get_meta_prefix( $field ) . $field_id];\n }\n }\n }\n\n $data['user_fields'] = $fields;\n $data['user_fields']['__key'] = 'field';\n }\n }\n\n\n if ( 'groups' == $_type || 'all' == $_type ) {\n // Get groups\n if ( empty( $items ) ) {\n $groups = get_posts( 'post_type=wp-types-group&post_status=null&numberposts=-1' );\n } else {\n /*\n *\n * This fails\n * $items are in form of:\n * 0 => array('id' => 'pt', ...)\n */\n foreach ( $items as $k => $item ) {\n if ( isset( $item['id'] ) ) {\n $items[$k] = intval( wpcf_modman_get_submitted_id( 'groups',\n $item['id'] ) );\n }\n }\n $args = array(\n 'post__in' => $items,\n 'post_type' => TYPES_CUSTOM_FIELD_GROUP_CPT_NAME,\n 'post_status' => 'all',\n 'posts_per_page' => -1\n );\n $groups = get_posts( $args );\n }\n if ( !empty( $groups ) ) {\n $data['groups'] = array('__key' => 'group');\n foreach ( $groups as $key => $post ) {\n $post = (array) $post;\n $post_data = array();\n $copy_data = array('ID', 'post_content', 'post_title',\n 'post_excerpt', 'post_type', 'post_status');\n foreach ( $copy_data as $copy ) {\n if ( isset( $post[$copy] ) ) {\n $post_data[$copy] = $post[$copy];\n }\n }\n $_data = $post_data;\n $meta = get_post_custom( $post['ID'] );\n if ( !empty( $meta ) ) {\n $_meta = array();\n foreach ( $meta as $meta_key => $meta_value ) {\n if ( in_array( $meta_key,\n array(\n '_wp_types_group_terms',\n '_wp_types_group_post_types',\n '_wp_types_group_fields',\n '_wp_types_group_templates',\n '_wpcf_conditional_display',\n '_wp_types_group_filters_association',\n '_wp_types_group_admin_styles'\n )\n )\n ) {\n $_meta[$meta_key] = $meta_value[0];\n $_meta[$meta_key] = maybe_unserialize($_meta[$meta_key]);\n }\n }\n if ( !empty( $_meta ) ) {\n $_data['meta'] = $_meta;\n }\n }\n $_data['checksum'] = $_data['hash'] = $wpcf->export->generate_checksum( 'group',\n $post['ID'] );\n $_data['__types_id'] = $post['post_name'];\n $_data['__types_title'] = $post['post_title'];\n $data['groups']['group-' . $post['ID']] = $_data;\n }\n }\n\n if ( !empty( $items ) ) {\n // Get fields by group\n // TODO Document why we use by_group\n $fields = array();\n foreach ( $groups as $key => $post ) {\n $fields = array_merge( $fields,\n wpcf_admin_fields_get_fields_by_group( $post->ID,\n 'slug', false, false, false, TYPES_CUSTOM_FIELD_GROUP_CPT_NAME,\n 'wpcf-fields', $use_cache ) );\n }\n } else {\n // Get fields\n $fields = wpcf_admin_fields_get_fields();\n }\n if ( !empty( $fields ) ) {\n\n // Add checksums before WPML\n foreach ( $fields as $field_id => $field ) {\n // TODO WPML and others should use hook\n $fields[$field_id] = apply_filters( 'wpcf_export_field',\n $fields[$field_id] );\n $fields[$field_id]['__types_id'] = $field_id;\n $fields[$field_id]['__types_title'] = $field['name'];\n $fields[$field_id]['checksum'] = $fields[$field_id]['hash'] = $wpcf->export->generate_checksum(\n 'field', $field_id\n );\n }\n\n // WPML\n global $iclTranslationManagement;\n if ( !empty( $iclTranslationManagement ) ) {\n foreach ( $fields as $field_id => $field ) {\n // TODO Check this for all fields\n if ( isset( $iclTranslationManagement->settings['custom_fields_translation'][wpcf_types_get_meta_prefix( $field ) . $field_id] ) ) {\n $fields[$field_id]['wpml_action'] = $iclTranslationManagement->settings['custom_fields_translation'][wpcf_types_get_meta_prefix( $field ) . $field_id];\n }\n }\n }\n\n $data['fields'] = $fields;\n $data['fields']['__key'] = 'field';\n }\n }\n\n // Get custom types\n if ( 'types' == $_type || 'all' == $_type ) {\n $custom_types = get_option( WPCF_OPTION_NAME_CUSTOM_TYPES, array() );\n // Get custom types\n // TODO Document $items\n if ( !empty( $items ) ) {\n /*\n * This fails\n * $items are in form of:\n * 0 => array('id' => 'pt', ...)\n */\n $_items = array();\n foreach ( $items as $k => $item ) {\n if ( is_array( $item ) && isset( $item['id'] ) ) {\n $_items[$item['id']] = true;\n } else {\n $_items[$item] = true;\n }\n }\n $custom_types = array_intersect_key( $custom_types, $_items );\n }\n // Get custom types\n if ( !empty( $custom_types ) ) {\n foreach ( $custom_types as $key => $type ) {\n if( isset( $type['custom-field-group'] )\n && is_array( $type['custom-field-group'] )\n && !empty( $type['custom-field-group'] ) ) {\n foreach( $type['custom-field-group'] as $custom_field_group_id => $senseless_as_it_is_always_one ) {\n $custom_field_group = get_post( $custom_field_group_id );\n\n // unset custom field USING ID AS KEY AND \"1\" AS VALUE from custom post type\n unset( $custom_types[$key]['custom-field-group'][$custom_field_group_id] );\n\n // continue with next if this custom field group no longer exists\n if( !is_object( $custom_field_group ) )\n continue;\n\n // set custom field USING SLUG AS KEY AND ID AS VALUE to custom post type\n $custom_types[$key]['custom-field-group'][$custom_field_group->post_name] = $custom_field_group_id;\n }\n }\n\n $custom_types[$key]['id'] = $key;\n $custom_types[$key] = apply_filters( 'wpcf_export_custom_post_type',\n $custom_types[$key] );\n\n $custom_types[$key]['__types_id'] = $key;\n $custom_types[$key]['__types_title'] = $type['labels']['name'];\n $custom_types[$key]['checksum'] = $custom_types[$key]['hash'] = $wpcf->export->generate_checksum(\n 'custom_post_type', $key, $type\n );\n }\n $data['types'] = $custom_types;\n $data['types']['__key'] = 'type';\n }\n\n if ( !empty( $items ) ) {\n // Get post relationships only for items\n $relationships_all = get_option( 'wpcf_post_relationship', array() );\n $relationships = array();\n foreach ( $relationships_all as $parent => $children ) {\n if ( in_array( $parent, $items ) ) {\n foreach ( $children as $child => $childdata ) {\n if ( in_array( $child, $items ) ) {\n if ( !isset( $relationships[$parent] ) )\n $relationships[$parent] = array();\n $relationships[$parent][$child] = $childdata;\n }\n }\n }\n }\n } else {\n // Get post relationships\n $relationships = get_option( 'wpcf_post_relationship', array() );\n }\n if ( !empty( $relationships ) ) {\n $data['post_relationships']['data'] = json_encode( $relationships );\n }\n\n }\n\n // Get custom tax\n if ( 'taxonomies' == $_type || 'all' == $_type ) {\n if ( !empty( $items ) ) {\n /*\n *\n * This fails\n * $items are in form of:\n * 0 => array('id' => 'pt', ...)\n */\n // $custom_taxonomies = array_intersect_key( get_option( WPCF_OPTION_NAME_CUSTOM_TAXONOMIES,\n // array() ), array_flip( $items ) );\n $_items = array();\n foreach ( $items as $k => $item ) {\n if ( is_array( $item ) && isset( $item['id'] ) ) {\n $_items[$item['id']] = true;\n } else {\n $_items[$item] = true;\n }\n }\n $custom_taxonomies = array_intersect_key( get_option( WPCF_OPTION_NAME_CUSTOM_TAXONOMIES,\n array() ), $_items );\n } else {\n // Get custom tax\n $custom_taxonomies = get_option( WPCF_OPTION_NAME_CUSTOM_TAXONOMIES, array() );\n }\n if ( !empty( $custom_taxonomies ) ) {\n foreach ( $custom_taxonomies as $key => $tax ) {\n $custom_taxonomies[$key]['id'] = $key;\n $custom_taxonomies[$key] = apply_filters( 'wpcf_filter_export_custom_taxonomy', $custom_taxonomies[$key] );\n\n $custom_taxonomies[$key]['__types_id'] = $key;\n $custom_taxonomies[$key]['__types_title'] = $tax['labels']['name'];\n $custom_taxonomies[$key]['checksum'] = $wpcf->export->generate_checksum(\n 'custom_taxonomy', $key, $tax\n );\n }\n $data['taxonomies'] = $custom_taxonomies;\n $data['taxonomies']['__key'] = 'taxonomy';\n }\n }\n\n /*\n *\n * Since Types 1.2\n */\n if ( $return == 'array' ) {\n return $data;\n } else if ( $return == 'xml' ) {\n return $xml->array2xml( $data, 'types' );\n } else if ( $return == 'module_manager' ) {\n $items = array();\n // Re-arrange fields\n if ( !empty( $data['fields'] ) ) {\n foreach ( $data['fields'] as $_data ) {\n if ( is_array( $_data ) && isset( $_data['__types_id'] )\n && isset( $_data['checksum'] ) ) {\n $_item = array();\n $_item['hash'] = $_item['checksum'] = $_data['checksum'];\n $_item['id'] = $_data['__types_id'];\n $_item['title'] = $_data['__types_title'];\n $items['__fields'][$_data['__types_id']] = $_item;\n }\n }\n }\n // Add checksums to items\n foreach ( $data as $_t => $type ) {\n foreach ( $type as $_data ) {\n // Skip fields\n if ( $_t == 'fields' ) {\n continue;\n }\n if ( is_array( $_data ) && isset( $_data['__types_id'] )\n && isset( $_data['checksum'] ) ) {\n $_item = array();\n $_item['hash'] = $_item['checksum'] = $_data['checksum'];\n $_item['id'] = $_data['__types_id'];\n $_item['title'] = $_data['__types_title'];\n $items[$_data['__types_id']] = $_item;\n }\n }\n }\n return array(\n 'xml' => $xml->array2xml( $data, 'types' ),\n 'items' => $items,\n );\n }\n\n // Offer for download\n $data = $xml->array2xml( $data, 'types' );\n\n $sitename = sanitize_title( get_bloginfo( 'name' ) );\n if ( empty( $sitename ) ) {\n $sitename = 'wp';\n }\n $sitename .= '.';\n $filename = $sitename . 'types.' . date( 'Y-m-d' ) . '.xml';\n $code = \"<?php\\r\\n\";\n $code .= '$timestamp = ' . time() . ';' . \"\\r\\n\";\n $code .= \"\\r\\n?\".\">\";\n\n if ( class_exists( 'ZipArchive' ) ) {\n $zipname = $sitename . 'types.' . date( 'Y-m-d' ) . '.zip';\n $temp_dir = wpcf_get_temporary_directory();\n if ( empty( $temp_dir ) ) {\n die(__('There is a problem with temporary directory.', 'wpcf'));\n }\n $file = tempnam( $temp_dir, \"zip\" );\n $zip = new ZipArchive();\n $zip->open( $file, ZipArchive::OVERWRITE );\n /**\n * if sys_get_temp_dir fail in case of open_basedir restriction,\n * try use wp_upload_dir instead. if this fail too, send pure\n * xml file to user\n */\n if ( empty( $zip->filename ) ) {\n $temp_dir = wp_upload_dir();\n $temp_dir = $temp_dir['basedir'];\n $file = tempnam( $temp_dir, \"zip\" );\n $zip = new ZipArchive();\n $zip->open( $file, ZipArchive::OVERWRITE );\n }\n /**\n * send a zip file\n */\n if ( !empty($zip->filename ) ) {\n $zip->addFromString( 'settings.xml', $data );\n $zip->addFromString( 'settings.php', $code );\n $zip->close();\n $data = file_get_contents( $file );\n header( \"Content-Description: File Transfer\" );\n header( \"Content-Disposition: attachment; filename=\" . $zipname );\n header( \"Content-Type: application/zip\" );\n header( \"Content-length: \" . strlen( $data ) . \"\\n\\n\" );\n header( \"Content-Transfer-Encoding: binary\" );\n echo $data;\n unlink( $file );\n die();\n }\n }\n\n /**\n * download the xml if fail downloading zip\n */\n\n header( \"Content-Description: File Transfer\" );\n header( \"Content-Disposition: attachment; filename=\" . $filename );\n header( \"Content-Type: application/xml\" );\n header( \"Content-length: \" . strlen( $data ) . \"\\n\\n\" );\n echo $data;\n die();\n}",
"function render_field_group( $field_group, $form, $args ) {\n // Get all fields for field group\n $fields = acf_get_fields( $field_group );\n \n foreach ( $fields as $field ) {\n \n // Skip field if it is in the exluded fields argument\n if ( isset( $args['exclude_fields'] ) && is_array( $args['exclude_fields'] ) ) {\n \n if ( in_array( $field['key'], $args['exclude_fields'] ) || in_array( $field['name'], $args['exclude_fields'] ) ) {\n continue;\n }\n \n }\n \n $this->render_field( $field, $form, $args );\n \n }\n }",
"public function getOptionGroupsOfSellerProduct($sp_id)\n\t{\n\t\t//options of a product\n\t\t$sp_options = SPOptionRelation::with('option.optionGroup')->where('sp_id','=',$sp_id)->get();\n\t\t$option_groups = [];\n\t\tforeach ($sp_options as $key => $sp_option) {\n\t\t\t$og = ucfirst($sp_option->option->optionGroup->option_g_name);\n // dd($og);\n\t\t\tif(!array_has($option_groups,$og)){\n\t\t\t\t$option_groups[$og]=array();\n\t\t\t}\n\t\t}\n\t}",
"public function get_attribute_groups_for_select() {\n\t\tif ( empty( $this->cache[ __FUNCTION__ ] ) ) {\n\n\t\t\t$default_option = [\n\t\t\t\t'value' => '',\n\t\t\t\t'label' => __( ' - Select Attribute Group - ', 'edgenet' ),\n\t\t\t];\n\n\t\t\t$options = array_map( function ( $group ) {\n\t\t\t\treturn [\n\t\t\t\t\t'value' => $group->id,\n\t\t\t\t\t'label' => $group->name,\n\t\t\t\t];\n\t\t\t}, edgenet()->settings->requirement_set->attribute_groups );\n\n\t\t\tusort( $options, function ( $a, $b ) {\n\t\t\t\t$a_label = strtoupper( $a['label'] );\n\t\t\t\t$b_label = strtoupper( $b['label'] );\n\t\t\t\tif ( $a_label === $b_label ) {\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\n\t\t\t\treturn ( $a_label < $b_label ) ? - 1 : 1;\n\t\t\t} );\n\n\t\t\tarray_unshift( $options, $default_option );\n\n\t\t\t$this->cache[ __FUNCTION__ ] = $options;\n\t\t}\n\n\t\treturn $this->cache[ __FUNCTION__ ];\n\t}",
"private static function AddMembergroupOptions(CheckList $field)\n {\n $sql = Access::SqlBuilder();\n $tbl = Membergroup::Schema()->Table();\n $orderBy = $sql->OrderList($sql->OrderAsc($tbl->Field('Name')));\n $groups = Membergroup::Schema()->Fetch(false, null, $orderBy);\n foreach ($groups as $group)\n {\n $field->AddOption($group->GetID(), $group->GetName());\n }\n }",
"public function choice_group() {\n return $this->group;\n }",
"private function build_select_field($_meta, $_ptype = \"wccpf\", $_class = \"\", $_index, $_show_as_value = \"no\", $_readonly = \"\", $_cloneable = \"\", $_wrapper = true, $_has_pricing_rules = \"no\") {\r\n $html = ''; \r\n $has_field_rules = isset( $_meta[\"field_rules\"] ) && is_array( $_meta[\"field_rules\"] ) && count( $_meta[\"field_rules\"] ) != 0 ? \"yes\" : \"no\";\r\n if ($_show_as_value == \"no\") {\r\n $html = '<select data-has_field_rules=\"'.$has_field_rules.'\" data-has_pricing_rules=\"'.$_has_pricing_rules.'\" data-fkey=\"'. $_meta[\"key\"] .'\" class=\"' . $_ptype . '-field ' . $_class . '\" name=\"' . esc_attr($_meta[\"key\"] . $_index) . '\" data-field-type=\"'. $_meta[\"type\"] .'\" ' . $_ptype . '-pattern=\"mandatory\" ' . $_ptype . '-mandatory=\"' . $_meta[\"required\"] . '\" ' . $_cloneable . ' ' . $_readonly . ' >';\r\n \r\n $choices = explode(\";\", ((isset($_meta[\"choices\"]) && ! empty($_meta[\"choices\"])) ? $_meta[\"choices\"] : \"\"));\r\n $_meta[\"default_value\"] = (isset($_meta[\"default_value\"]) && ! empty($_meta[\"default_value\"])) ? trim($_meta[\"default_value\"]) : \"\";\r\n \r\n /* Placeholder option */\r\n if (isset($_meta[\"placeholder\"]) && !empty($_meta[\"placeholder\"])) {\r\n $html .= '<option value=\"wccpf_none\">' . esc_html($_meta[\"placeholder\"]) . '</option>';\r\n }\r\n $choices = apply_filters( \"wcff_select_option_before_rendering\", $choices, $_meta[\"key\"] );\r\n foreach ($choices as $choice) {\r\n $attr = '';\r\n $key_val = explode(\"|\", $choice);\r\n /* It has to be two items ( Value => Label ), otherwise don't proceed */\r\n if (count($key_val) == 2) {\r\n if ($_ptype != \"wccaf\") {\r\n /* Since version 2.0.0 - Default value will be absolute value, not as key|val pair */\r\n if (strpos($_meta[\"default_value\"], \"|\") !== false) {\r\n /* Compatibility for <= V 1.4.0 */\r\n if ($choice == $_meta[\"default_value\"]) {\r\n $attr = 'selected';\r\n }\r\n } else {\r\n /*\r\n * For product fields from V 2.0.0\r\n * For admin fields, which will be displyed as Product Fields\r\n */\r\n if (trim($key_val[0]) == $_meta[\"default_value\"]) {\r\n $attr = 'selected';\r\n }\r\n }\r\n } else {\r\n if ($key_val[0] == $_meta[\"value\"]) {\r\n $attr = 'selected';\r\n }\r\n }\r\n $html .= '<option value=\"' . esc_attr(trim($key_val[0])) . '\" ' . $attr . '>' . esc_html(trim($key_val[1])) . '</option>';\r\n }\r\n }\r\n $html .= '</select>';\r\n } else {\r\n /*\r\n * Show the raw value instead of as a field\r\n * Used for the Admin Field showing on product page\r\n */\r\n $html = '<p class=\"wcff-wccaf-value-para-tag\">' . $_meta[\"default_value\"] . '</p>';\r\n }\r\n /* Add wrapper around the field, based on the user options */\r\n if ($_wrapper) {\r\n $html = $this->built_field_wrapper($html, $_meta, $_ptype, $_index);\r\n }\r\n return $html;\r\n }",
"public function edit_group_details(){\n if( !isset( $_REQUEST['pmstkn'] ) || !wp_verify_nonce( $_REQUEST['pmstkn'], 'pms_gm_edit_group_details_nonce' ) )\n return;\n\n if( empty( $_POST['pms_subscription_id'] ) )\n return;\n\n $subscription = pms_get_member_subscription( sanitize_text_field( $_POST['pms_subscription_id'] ) );\n\n if( !pms_gm_is_group_owner( $subscription->id ) )\n return;\n\n //validate fields\n $group_name = sanitize_text_field( $_POST['group_name'] );\n\n if( empty( $group_name ) )\n pms_errors()->add( 'group_name', esc_html__( 'Group name cannot be empty.', 'paid-member-subscriptions' ) );\n\n if ( count( pms_errors()->get_error_codes() ) > 0 )\n return;\n\n //save fields\n pms_update_member_subscription_meta( $subscription->id, 'pms_group_name', $group_name );\n\n $group_description = sanitize_text_field( $_POST['group_description'] );\n pms_update_member_subscription_meta( $subscription->id, 'pms_group_description', $group_description );\n }",
"public function hasOptionGroup()\n {\n return false;\n }",
"function _get_group_tags($group=NULL)\n{\n\t$group_tags=array(\n\t\t'dynamic_front_end'=>array('overlay','random','pulse','ticker','shocker','jumping','sections','big_tabs','tabs','carousel','hide','tooltip'),\n\t\t'dynamic_back_end'=>array('currency','if_in_group'),\n\t\t'structure'=>array('title','contents','include','concepts','concept','staff_note','menu','surround'),\n\t\t'formatting'=>array('list','indent','ins','del','b','u','i','s','sup','sub','size','color','highlight','font','align','left','center','right','abbr','box','quote'),\n\t\t'semantic'=>array('cite','samp','q','var','dfn','address'),\n\t\t'display_code'=>array('php','codebox','sql','code','tt','no_parse'),\n\t\t'execute_code'=>array('semihtml','html'),\n\t\t'media'=>array('flash','img'/*Over complex,'upload','exp_thumb','exp_ref'*/,'thumb'),\n\t\t'linking'=>array('url','email','reference','page','snapback','post','topic')\n\t);\n\n\tif (addon_installed('filedump')) $group_tags['media'][]='attachment';\n\n\t// Non-categorised ones\n\t$all_tags=_get_details_comcode_tags();\n\t$not_found=array();\n\tforeach (array_keys($all_tags[0]+$all_tags[1]) as $tag)\n\t{\n\t\tif (in_array($tag,array('exp_thumb','exp_ref','upload','attachment'))) continue; // Explicitly don't want to allow these (attachment will already be listed if allowed)\n\t\tforeach ($group_tags as $_group)\n\t\t{\n\t\t\tif (in_array($tag,$_group))\n\t\t\t{\n\t\t\t\tcontinue 2;\n\t\t\t}\n\t\t}\n\t\t$not_found[]=$tag;\n\t}\n\t$group_tags['CUSTOM']=$not_found;\n\n\tif ($group!==NULL && array_key_exists($group,$group_tags))\n\t\treturn $group_tags[$group];\n\n\treturn $group_tags;\n}",
"function cmb2_fields_home() {\n // Adiciona um bloco\n $cmb = new_cmb2_box([ /// está dentro de um Array, que é o [];\n 'id' => 'home_box', // id deve ser único\n 'title' => 'Menu da Semana', /// o title deve ser igual ao page-template\n 'object_types' => ['page'], // tipo de post\n 'show_on' => [\n 'key' => 'page-template',\n 'value' => 'page-home.php',\n ], // modelo de página\n ]);\n\n $cmb->add_field([\n 'name' => 'Descrição da página para SEO',\n 'id' => 'description_seo',\n 'type' => 'text',\n ]);\n\n // Adiciona um campo ao bloco criado\n $cmb->add_field([\n 'name' => 'Primeiro Prato',\n 'id' => 'comida1',\n 'type' => 'text',\n ]);\n\n // O campo repetidor é do tipo group // aqui é para repetir os pratos\n $pratos = $cmb->add_field([\n 'name' => 'Pratos',\n 'id' => 'pratos',\n 'type' => 'group',\n 'repeatable' => true,\n 'options' => [\n 'group_title' => 'Prato {#}', /// aqui aparece o numero da posição do prato\n 'add_button' => 'Adicionar Prato',\n 'remove_button' => 'Remover Prato',\n 'sortable' => true, /// se quero que o cliente mude a ordem;\n ],\n ]);\n\n // Cada campo é adicionado com add_group_field\n // Passando sempre o campo de grupo como primeiro argumento\n $cmb->add_group_field($pratos, [\n 'name' => 'Nome',\n 'id' => 'nome',\n 'type' => 'text',\n ]);\n\n $cmb->add_group_field($pratos, [\n 'name' => 'Descrição',\n 'id' => 'descricao',\n 'type' => 'text',\n ]);\n\n $cmb->add_group_field($pratos, [\n 'name' => 'Preço',\n 'id' => 'preco',\n 'type' => 'text',\n ]);\n\n // Adiciona um campo ao bloco criado\n $cmb->add_field([\n 'name' => 'Segundo Prato',\n 'id' => 'comida2',\n 'type' => 'text',\n ]);\n\n // O campo repetidor é do tipo group // aqui é para repetir os pratos\n $pratos2 = $cmb->add_field([\n 'name' => 'Pratos2',\n 'id' => 'pratos2',\n 'type' => 'group',\n 'repeatable' => true,\n 'options' => [\n 'group_title' => 'Prato {#}', /// aqui aparece o numero da posição do prato\n 'add_button' => 'Adicionar Prato Dois',\n 'remove_button' => 'Remover Prato Dois',\n 'sortable' => true, /// se quero que o cliente mude a ordem;\n ],\n ]);\n\n // Cada campo é adicionado com add_group_field\n // Passando sempre o campo de grupo como primeiro argumento\n $cmb->add_group_field($pratos2, [\n 'name' => 'Nome',\n 'id' => 'nome',\n 'type' => 'text',\n ]);\n\n $cmb->add_group_field($pratos2, [\n 'name' => 'Descrição',\n 'id' => 'descricao',\n 'type' => 'text',\n ]);\n\n $cmb->add_group_field($pratos2, [\n 'name' => 'Preço',\n 'id' => 'preco',\n 'type' => 'text',\n ]);\n}",
"private function get_grouped_input_fields( $name, $options, $title = '' ) {\n\t\t$grouped = array();\n\t\tif (isset($this->settings[$name])) {\n\t\t\t$grouped = $this->settings[$name];\n\t\t} elseif (isset($options['addon_name']) && $options['addon_name']) {\n\t\t\t$name = $options['addon_name'];\n\t\t\tif (isset($this->settings[$name])) {\n\t\t\t\t$grouped = $this->settings[$name];\n\t\t\t}\n\t\t}\n\t\t$count = count((array) $grouped);\n\n\t\tif ($count <= 0) {\n\t\t\t$count = 1;\n\t\t}\n\t\t$output = '';\n\n\t\tif(isset($options['title']) && $options['title'] != '') {\n\t\t\t$output .= '<div class=\"sp-pagebuilder-grouped-wrap sp-pagebuilder-parent-input-field sp-pagebuilder-has-group-title\" data-addon_title=\"'. $title . '\" data-field_name=\"'. $name .'\">';\n\t\t} else {\n\t\t\t$output .= '<div class=\"sp-pagebuilder-grouped-wrap sp-pagebuilder-parent-input-field\" data-addon_title=\"'. $title . '\" data-field_name=\"'. $name .'\">';\n\t\t}\n\n\t\tif(isset($options['title']) && $options['title'] != '') {\n\t\t\t$output .= '<h4 class=\"sp-pagebuilder-group-title\">' . $options['title'] . '</h4>';\n\t\t}\n\n\t\t$output .= '<a href=\"#\" class=\"sp-pagebuilder-add-grouped-item sp-pagebuilder-btn sp-pagebuilder-btn-warning sp-pagebuilder-btn-sm\"><i class=\"fa fa-plus\"></i> Add New</a>';\n\t\t$output .= '<div class=\"sp-pagebuilder-grouped sp-pagebuilder-grouped-items grouped-'.$name.'\" data-field_no=\"'. ($count - 1) .'\">';\n\t\tfor($i = 0; $i < $count; $i++) {\n\n\t\t\t$output .= '<div class=\"sp-pagebuilder-grouped-item\">';\n\t\t\t$output .= '<div class=\"sp-pagebuilder-repeatable-toggler\">';\n\t\t\t$output .= '<span class=\"sp-pagebuilder-move-repeatable\"><i class=\"fa fa-ellipsis-v\"></i></span>';\n\t\t\t$output .= '<h4 class=\"sp-pagebuilder-repeatable-item-title\">Item '. ($i+1) .'</h4>';\n\t\t\t$output .= '<span class=\"sp-pagebuilder-remove-grouped-item\"><a href=\"#\"><i class=\"fa fa-times\"></i></a></span>';\n\t\t\t$output .= '<span class=\"sp-pagebuilder-clone-grouped-item\"><a href=\"#\"><i class=\"fa fa-clone\"></i></a></span>';\n\t\t\t$output .= '</div>';\n\n\t\t\t$output .= '<div class=\"sp-pagebuilder-grouped-item-collapse\" style=\"display:none;\">';\n\t\t\tforeach ( $options['attr'] as $key => $option ) {\n\t\t\t\tif ( isset( $grouped[$i][$key] ) ) {\n\t\t\t\t\t$option['std'] = $grouped[$i][$key];\n\t\t\t\t}\n\n\t\t\t\t$key = $name. '['. $i .']['. $key .']';\n\t\t\t\t$output .= '<div class=\"sp-pagebuilder-repeatable-input-field\">';\n\t\t\t\t$output .= $this->get_input_field_html( $key, $option );\n\t\t\t\t$output .= '</div>';\n\t\t\t}\n\t\t\t$output .= '</div>';\n\t\t\t$output .= '</div>';\n\t\t}\n\n\t\t$output .= '</div>';\n\t\t$output .= '</div>';\n\n\t\treturn $output;\n\t}",
"function truethemes_site_option(){\n\t\t//this values contains the theme layout array.\n\t\t//use print_r to see the multi-dimension array key and values.\n\t\t$option_template_items = get_option('of_template');\n\n\t\t$op_count = count($option_template_items);\n\t\t\n\t\t//set empty site option name array container.\n\t\t$site_option_name = array();\n\t\t\n\t\tfor($index = 0; $index < $op_count; $index ++){\n\t\t\t\n\t\t\t//we only add in theme option name which is the id array key\n\t\t\tif(!empty($option_template_items[$index]['id'])){\n\t\t\t$site_option_name[] = $option_template_items[$index]['id'];\n\t\t\t}\n\t\t\t \t\t\t\n\t\t}\n\n\t\t//print_r($site_option_name); //to see array of site option name.\n\t\t\n\t\t//assign for use in set_all();\n $this->site_option_name = $site_option_name;\n \n\t\t}",
"public function prepareDetailedByGroup($group_id);",
"function create_group( $args ) {\r\n global $wpdb;\r\n\r\n //checking that Client Circle not exist other ID\r\n $result = $wpdb->get_row( $wpdb->prepare( \"SELECT group_id FROM {$wpdb->prefix}wpc_client_groups WHERE LOWER(group_name) = '%s'\", strtolower( $args['group_name'] ) ), \"ARRAY_A\");\r\n if ( $result ) {\r\n if ( \"0\" != $args['group_id'] && $result['group_id'] == $args['group_id'] ) {\r\n\r\n } else {\r\n //if Client Circle exist with other ID\r\n wp_redirect( add_query_arg( array( 'page' => 'wpclients_groups', 'updated' => 'true', 'dmsg' => urlencode( __( 'The Group already exists!!!', WPC_CLIENT_TEXT_DOMAIN ) ) ), 'admin.php' ) );\r\n exit;\r\n }\r\n }\r\n\r\n\r\n if ( '0' != $args['group_id'] ) {\r\n //update when edit Client Circle\r\n $result = $wpdb->query( $wpdb->prepare( \"UPDATE {$wpdb->prefix}wpc_client_groups SET group_name = '%s', auto_select = '%s', auto_add_clients = '%s' WHERE group_id = %d\",\r\n trim( $args['group_name'] ),\r\n $args['auto_select'],\r\n $args['auto_add_clients'],\r\n $args['group_id'] ) );\r\n wp_redirect( add_query_arg( array( 'page' => 'wpclients_groups', 'updated' => 'true', 'dmsg' => urlencode( __( 'The changes of the group are saved!', WPC_CLIENT_TEXT_DOMAIN ) ) ), 'admin.php' ) );\r\n exit;\r\n } else {\r\n //create new Client Circle\r\n $result = $wpdb->query( $wpdb->prepare( \"INSERT INTO {$wpdb->prefix}wpc_client_groups SET group_name = '%s', auto_select = '%s', auto_add_clients = '%s'\",\r\n trim( $args['group_name'] ),\r\n $args['auto_select'],\r\n $args['auto_add_clients']\r\n ) );\r\n\r\n //assign all clients\r\n if ( '1' == $args['assign_all'] ) {\r\n $new_group_id = $wpdb->insert_id;\r\n\r\n $args = array(\r\n 'role' => 'wpc_client',\r\n );\r\n\r\n $clients = get_users( $args );\r\n\r\n if ( is_array( $clients ) && 0 < count( $clients ) )\r\n foreach ( $clients as $client ) {\r\n $wpdb->query( $wpdb->prepare( \"INSERT INTO {$wpdb->prefix}wpc_client_group_clients SET group_id = %d, client_id = '%d'\", $new_group_id, $client->ID ) );\r\n }\r\n\r\n }\r\n\r\n\r\n wp_redirect( add_query_arg( array( 'page' => 'wpclients_groups', 'updated' => 'true', 'dmsg' => urlencode( __( 'Client Circle is created!', WPC_CLIENT_TEXT_DOMAIN ) ) ), 'admin.php' ) );\r\n exit;\r\n }\r\n\r\n }",
"function initlab_field_mailman_version_cb($args) {\n // Get the value of the setting we've registered with register_setting()\n $options = get_option('initlab_options', []);\n ?>\n <select id=\"<?php echo esc_attr($args['label_for']); ?>\" name=\"initlab_options[<?php echo esc_attr($args['label_for']); ?>]\">\n <?php\n foreach ($args['options'] as $value => $label) {\n ?>\n <option value=\"<?php echo esc_attr($value)?>\" <?php echo array_key_exists($args['label_for'], $options) ? selected($options[$args['label_for']], $value, false) : ''; ?>>\n <?php esc_html_e($label, 'initlab-addons'); ?>\n </option>\n <?php\n }\n ?>\n </select>\n <?php\n}",
"function acf_is_field_group_key($id = '')\n{\n}",
"function getOptionValues() {\t\t\n\t\t$optionvaluesquery = \"SELECT lv.lookuptypevalue as optiontext, lv.lookuptypevalue as optionvalue FROM lookuptype AS l , \n\t\tlookuptypevalue AS lv WHERE l.id = lv.lookuptypeid AND l.name ='\".$this->getName().\"' ORDER BY optiontext \";\n\t\treturn getOptionValuesFromDatabaseQuery($optionvaluesquery);\n\t}",
"function wck_get_entry_field_select( $value, $field_details ){\r\n\t\tif ( (!is_array( $field_details ) && !isset( $field_details['options']) ) || empty( $value )){\r\n\t\t\treturn $value;\r\n\t\t}\r\n\r\n //convert field_details to single array if option groups are defined.\r\n if( Wordpress_Creation_Kit_PB::wck_is_multi( $field_details['options'] ) ){\r\n $select_options = array();\r\n foreach($field_details['options']['optgroups'] as $optgroup) {\r\n foreach($optgroup['options'] as $group_option ){\r\n $select_options[] = $group_option;\r\n }\r\n }\r\n\r\n $field_details['options'] = $select_options;\r\n }\r\n\r\n\t\tforeach( $field_details['options'] as $option ){\r\n\t\t\tif ( strpos( $option, $value ) !== false ){\r\n\t\t\t\tif( strpos( $option, '%' ) === false ){\r\n\t\t\t\t\treturn $value;\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$option_parts = explode( '%', $option );\r\n\t\t\t\t\tif( !empty( $option_parts ) ){\r\n\t\t\t\t\t\tif( empty( $option_parts[0] ) && count( $option_parts ) == 3 ){\r\n\t\t\t\t\t\t\t$label = $option_parts[1];\r\n\t\t\t\t\t\t\treturn $label;\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\t}",
"function animo_get_post_opt( $option, $id = '' ) {\n global $post;\n if (!empty($id)) {\n $local_id = $id;\n } else {\n if(!isset($post->ID)) {\n return null;\n }\n $local_id = get_the_ID();\n\n }\n\n //echo $option;\n if(function_exists('redux_post_meta')) {\n $options = redux_post_meta(REDUX_OPT_NAME, $local_id);\n } else {\n $options = get_post_meta( $local_id, REDUX_OPT_NAME, true );\n }\n\n if( isset( $options[$option] ) ) {\n return $options[$option];\n } else {\n return null;\n }\n}",
"public function getNewChildSelectOptions()\n {\n $addressCondition = Mage::getModel(\n 'giftpromo/promo_rule_condition_address'\n );\n $addressAttributes = $addressCondition->loadAttributeOptions()\n ->getAttributeOption();\n $attributes = array();\n $attributes[]\n = array('value' => 'giftpromo/promo_rule_condition_subtotal',\n 'label' => Mage::helper('giftpromo')->__('Sub Total'));\n $attributes[]\n = array('value' => 'giftpromo/promo_rule_condition_grandtotal',\n 'label' => Mage::helper('giftpromo')->__('Grand Total'));\n $attributes[]\n = array('value' => 'giftpromo/promo_rule_condition_discounttotal',\n 'label' => Mage::helper('giftpromo')->__(\n 'Sub Total After Discounts'\n ));\n\n foreach ($addressAttributes as $code => $label) {\n $attributes[] = array('value' =>\n 'giftpromo/promo_rule_condition_address|'\n . $code, 'label' => $label);\n }\n\n\n $checkoutCondition = Mage::getModel(\n 'giftpromo/promo_rule_condition_checkout'\n );\n $checkoutAttributes = $checkoutCondition->loadAttributeOptions()\n ->getAttributeOption();\n $chAttributes = array();\n\n foreach ($checkoutAttributes as $code => $label) {\n $chAttributes[] = array('value' =>\n 'giftpromo/promo_rule_condition_checkout|'\n . $code, 'label' => $label);\n }\n\n $customerRules = array(\n array(\n 'value' => 'giftpromo/promo_rule_condition_customer_conditions',\n 'label' => Mage::helper('giftpromo')->__(\n 'Customer conditions combination'\n ))\n );\n $productRules = array(\n array(\n 'value' => 'giftpromo/promo_rule_condition_product_found',\n 'label' => Mage::helper('giftpromo')->__(\n 'Product attribute combination'\n )\n ),\n array(\n 'value' => 'giftpromo/promo_rule_condition_product_subselect',\n 'label' => Mage::helper('giftpromo')->__(\n 'Products Sub Selection'\n )\n ),\n array(\n 'value' => 'giftpromo/promo_rule_condition_product_subselect_free',\n 'label' => Mage::helper('giftpromo')->__('Cheapest Free')\n ),\n array(\n 'value' => 'giftpromo/promo_rule_condition_product_upgrade',\n 'label' => Mage::helper('giftpromo')->__('Product Upgrades')\n )\n );\n\n $conditions = parent::getNewChildSelectOptions();\n $conditions = array_merge_recursive(\n $conditions,\n array(\n array('label' => Mage::helper('giftpromo')->__(\n 'Cart Attributes'\n ), 'value' => $attributes),\n array('label' => Mage::helper('giftpromo')->__(\n 'Checkout Attributes'\n ), 'value' => $chAttributes),\n array('label' => Mage::helper('giftpromo')->__(\n 'Customer Related Rules'\n ), 'value' => $customerRules),\n array('label' => Mage::helper('giftpromo')->__(\n 'Product Related Rules'\n ), 'value' => $productRules),\n // array('value' => 'giftpromo/promo_rule_condition_twitter_conditions', 'label' => Mage::helper('giftpromo')->__('Twitter conditions combination')),\n )\n );\n\n return $conditions;\n }",
"public function catalogProductLoadAfter(Varien_Event_Observer $observer)\n{\n // set the additional options on the product\n if(Mage::getStoreConfigFlag('mycustom_section/mycustom_group2/field1')){\n $action = Mage::app()->getFrontController()->getAction();\n if ($action->getFullActionName() == 'checkout_cart_add')\n {\n\n \n $product = $observer->getProduct();\n // Mage::log($product);\n \n$totalCredits = Mage::getModel('kartparadigm_storecredit/creditinfo')->getCreditsOfProduct($product->getId());\n\n if($totalCredits > 0) {\n\n // if ($options = $action->getRequest()->getParam('extra_option'))\n //{\n //$product = $observer->getProduct();\n // Mage::log($product);\n\n // add to the additional options array\n $additionalOptions = array();\n if ($additionalOption = $product->getCustomOption('additional_options'))\n {\n $additionalOptions = (array) unserialize($additionalOption->getValue());\n }\n\n \n $additionalOptions[] = array(\n 'label' => \"Credits\",\n 'value' => $totalCredits,\n );\n\n \n // add the additional options array with the option code additional_options\n $observer->getProduct()\n ->addCustomOption('additional_options', serialize($additionalOptions));\n //}\n }\n }\n }\n}",
"function get_additional_field_options($val){\n\t \t$OPTIONS = stripslashes($val);\n\t\t\t$OPTIONS = str_replace(', ', ',', $OPTIONS);\n\t\t\t$OPTIONS = explode(',', $OPTIONS);\n\t\t\t$output = false;\n\t\t\tforeach($OPTIONS as $option){\n\t\t\t\t$slug = str_replace(' ', '-', $option);\n\t\t\t\t$output[$slug]= $option;\n\t\t\t}\n\t\t\treturn $output;\n\t }",
"function definition_after_data() {\n global $CFG, $COURSE;\n $mform =& $this->_form;\n\n if ($id = $mform->getElementValue('update')) {\n $modulename = $mform->getElementValue('modulename');\n $instance = $mform->getElementValue('instance');\n\n if ($this->_features->gradecat) {\n $gradecat = false;\n if (!empty($CFG->enableoutcomes) and $this->_features->outcomes) {\n if ($outcomes = grade_outcome::fetch_all_available($COURSE->id)) {\n $gradecat = true;\n }\n }\n if ($items = grade_item::fetch_all(array('itemtype'=>'mod', 'itemmodule'=>$modulename,\n 'iteminstance'=>$instance, 'courseid'=>$COURSE->id))) {\n foreach ($items as $item) {\n if (!empty($item->outcomeid)) {\n $elname = 'outcome_'.$item->outcomeid;\n if ($mform->elementExists($elname)) {\n $mform->hardFreeze($elname); // prevent removing of existing outcomes\n }\n }\n }\n foreach ($items as $item) {\n if (is_bool($gradecat)) {\n $gradecat = $item->categoryid;\n continue;\n }\n if ($gradecat != $item->categoryid) {\n //mixed categories\n $gradecat = false;\n break;\n }\n }\n }\n\n if ($gradecat === false) {\n // items and outcomes in different categories - remove the option\n // TODO: it might be better to add a \"Mixed categories\" text instead\n if ($mform->elementExists('gradecat')) {\n $mform->removeElement('gradecat');\n }\n }\n }\n }\n\n if ($COURSE->groupmodeforce) {\n if ($mform->elementExists('groupmode')) {\n $mform->hardFreeze('groupmode'); // groupmode can not be changed if forced from course settings\n }\n }\n\n if ($mform->elementExists('groupmode') and !$mform->elementExists('groupmembersonly') and empty($COURSE->groupmodeforce)) {\n $mform->disabledIf('groupingid', 'groupmode', 'eq', NOGROUPS);\n\n } else if (!$mform->elementExists('groupmode') and $mform->elementExists('groupmembersonly')) {\n $mform->disabledIf('groupingid', 'groupmembersonly', 'notchecked');\n\n } else if (!$mform->elementExists('groupmode') and !$mform->elementExists('groupmembersonly')) {\n // groupings have no use without groupmode or groupmembersonly\n if ($mform->elementExists('groupingid')) {\n $mform->removeElement('groupingid');\n }\n }\n }",
"public function ajaxProcessgetModuleHookOption(){\n $html = '';\n $id_module = (int)Tools::getValue('id_module');\n $id_hook = (int)Tools::getValue('id_hook');\n $hookname = Hook::getNameById($id_hook);\n $id_option = (int)Tools::getValue('id_option');\n $option = new Options($id_option);\n if ($id_module && Validate::isUnsignedId($id_module) && $hookname && Validate::isHookName($hookname)&& $option && Validate::isLoadedObject($option)){\n $moduleObject = Module::getInstanceById($id_module);\n $optionModules = OvicLayoutControl::getModulesHook($option->theme, $option->alias, $hookname);\n $optionModules = Tools::jsonDecode($optionModules['modules'],true);\n $html = OvicLayoutControl::getHookOptionByModule($optionModules, $hookname,$moduleObject);\n }\n echo $html;\n }",
"function HERITAGE_get_theme_option($option_group, $option_name)\n{\n $options = get_option($option_group);\n\n if (isset($options[$option_name])) {\n return $options[$option_name];\n }\n\n return '';\n}",
"function acf_import_field_group($field_group)\n{\n}",
"protected function addFields()\n {\n $groupCustomOptionsName = CustomOptions::GROUP_CUSTOM_OPTIONS_NAME;\n $optionContainerName = CustomOptions::CONTAINER_OPTION;\n $commonOptionContainerName = CustomOptions::CONTAINER_COMMON_NAME;\n\n // Add fields to the option\n $this->meta[$groupCustomOptionsName]['children']['options']['children']['record']['children']\n [$optionContainerName]['children'][$commonOptionContainerName]['children'] = array_replace_recursive(\n $this->meta[$groupCustomOptionsName]['children']['options']['children']['record']['children']\n [$optionContainerName]['children'][$commonOptionContainerName]['children'],\n $this->getOptionFieldsConfig()\n );\n\n // Add fields to the values\n // $this->meta[$groupCustomOptionsName]['children']['options']['children']['record']['children']\n // [$optionContainerName]['children']['values']['children']['record']['children'] = array_replace_recursive(\n // $this->meta[$groupCustomOptionsName]['children']['options']['children']['record']['children']\n // [$optionContainerName]['children']['values']['children']['record']['children'],\n // $this->getValueFieldsConfig()\n // );\n }",
"public function process_admin_options() {\n \t\t\tif( isset( $_POST['jigoshop_tgm_custom_gateway_enabled'] ) ) update_option( 'jigoshop_tgm_custom_gateway_enabled', jigowatt_clean( $_POST['jigoshop_tgm_custom_gateway_enabled'] ) ); else @delete_option( 'jigoshop_tgm_custom_gateway_enabled' );\n \t\t\tif( isset( $_POST['jigoshop_tgm_custom_gateway_title'] ) ) update_option( 'jigoshop_tgm_custom_gateway_title', jigowatt_clean( $_POST['jigoshop_tgm_custom_gateway_title'] ) ); else @delete_option( 'jigoshop_tgm_custom_gateway_title' );\n \t\t\tif( isset( $_POST['jigoshop_tgm_custom_gateway_description'] ) ) update_option( 'jigoshop_tgm_custom_gateway_description', \tjigowatt_clean( $_POST['jigoshop_tgm_custom_gateway_description'] ) ); else @delete_option( 'jigoshop_tgm_custom_gateway_description' );\n \t}",
"static function get_option_values_select_radio( $field_key ) {\n\t\tglobal $wpdb;\n\t\tif ( is_multisite() ) {\n\t\t\t$current_blog = get_current_blog_id();\n\t\t\t$sql = \"SELECT options FROM {$wpdb->base_prefix}pp_profile_fields WHERE field_key = '$field_key' AND (blog_id = 0 OR blog_id = $current_blog)\";\n\t\t}\n\t\telse {\n\t\t\t$sql = \"SELECT options FROM {$wpdb->base_prefix}pp_profile_fields WHERE field_key = '$field_key'\";\n\t\t}\n\n\t\treturn $wpdb->get_col( $sql );\n\t}",
"function get_button_group_local_field( $id = '1234QWERasdf' ) {\n\treturn array (\n\t\tarray (\n\t\t\t'key' => $id . '_T521zN1cd48f4',\n\t\t\t'label' => 'Content',\n\t\t\t'name' => 'tab_content',\n\t\t\t'type' => 'tab',\n\t\t\t'required' => 0,\n\t\t\t'placement' => 'top'\n\t\t),\n\n\t\tarray (\n\t\t\t'key' => $id . '_N121z7ocd48f5',\n\t\t\t'label' => 'Contet',\n\t\t\t'name' => 'content',\n\t\t\t'type' => 'wysiwyg',\n\t\t\t'required' => '',\n\t\t),\n\n\t\tarray (\n\t\t\t'key' => $id . '_59944311d4a7b',\n\t\t\t'label' => 'Button',\n\t\t\t'name' => 'button',\n\t\t\t'type' => 'clone',\n\t\t\t'required' => 0,\n\t\t\t'clone' => array (\n\t\t\t\t0 => 'bttn_59930ca194830',\n\t\t\t),\n\t\t\t'display' => 'group',\n\t\t\t'layout' => 'block',\n\t\t\t'prefix_label' => 0,\n\t\t\t'prefix_name' => 0,\n\t\t),\n\n\t\tarray (\n\t\t\t'key' => $id . '_T521zN1cd48f3',\n\t\t\t'label' => 'Settings',\n\t\t\t'name' => 'tab_settings',\n\t\t\t'type' => 'tab',\n\t\t\t'required' => 0,\n\t\t\t'placement' => 'top'\n\t\t),\n\t\tarray (\n\t\t\t'key' => $id . '_T5MtzN1cd48f3',\n\t\t\t'label' => 'Margins',\n\t\t\t'name' => 'margins',\n\t\t\t'type' => 'clone',\n\t\t\t'required' => 0,\n\t\t\t'clone' => array (\n\t\t\t\t0 => 'marg_59930ca194830',\n\t\t\t),\n\t\t\t'display' => 'group',\n\t\t\t'layout' => 'block',\n\t\t\t'prefix_label' => 0,\n\t\t\t'prefix_name' => 0,\n\t\t\t'wrapper' => array(\n\t\t\t\t'width' => 50\n\t\t\t)\n\t\t),\n\t\tarray (\n\t\t\t'key' => $id . '_T5MbzN1cD59q4',\n\t\t\t'label' => 'Align',\n\t\t\t'name' => 'align',\n\t\t\t'type' => 'select',\n\t\t\t'required' => '',\n\t\t\t'wrapper' => array (\n\t\t\t\t'width' => '25',\n\t\t\t),\n\t\t\t'choices' => array (\n\t\t\t\t'center' => 'Center',\n\t\t\t\t'left' => 'Left',\n\t\t\t\t'right' => 'Right'\n\t\t\t),\n\t\t\t'default_values' => array ( 'center' )\n\t\t),\n\t);\n}",
"public function getOptionGroupOptions()\n {\n return array();\n }",
"function acf_get_valid_field_group( $field_group = false ) {\n\treturn acf_validate_field_group( $field_group );\n}",
"function acf_get_field_groups($filter = array())\n{\n}",
"function GetGroupArray($iGroupID)\n{\n //Get the Properties assigned to this Group\n $sSQL = \"SELECT pro_Name, pro_ID, pro_Prompt, r2p_Value, prt_Name, pro_prt_ID\n\t\t FROM record2property_r2p\n\t\t LEFT JOIN property_pro ON pro_ID = r2p_pro_ID\n\t\t LEFT JOIN propertytype_prt ON propertytype_prt.prt_ID = property_pro.pro_prt_ID\n\t\t WHERE pro_Class = 'g' AND r2p_record_ID = \".$iGroupID.\n ' ORDER BY prt_Name, pro_Name';\n $rsAssignedProperties = RunQuery($sSQL);\n\n // Get the group's role list ID\n $sSQL = 'SELECT grp_RoleListID,grp_hasSpecialProps FROM group_grp WHERE grp_ID ='.$iGroupID;\n $aTemp = mysqli_fetch_array(RunQuery($sSQL));\n $iRoleListID = $aTemp[0];\n $bHasSpecialProps = ($aTemp[1] == 'true');\n\n // Get the roles\n $sSQL = 'SELECT * FROM list_lst WHERE lst_ID = '.$iRoleListID.' ORDER BY lst_OptionSequence';\n $rsRoles = RunQuery($sSQL);\n $numRoles = mysqli_num_rows($rsRoles);\n\n // Get the members of the groups along with their family data\n $sSQL = \"SELECT per_ID, per_FirstName, per_MiddleName, per_LastName, per_Title,\n per_Suffix, per_Address1, per_Address2, per_City, per_State, \n per_Zip, per_HomePhone, per_Country, per_Email, per_BirthMonth, per_BirthDay, per_BirthYear, \n fam_ID, fam_Address1, fam_Address2, fam_City, fam_State, fam_Zip, fam_Country, fam_HomePhone, \n fam_Email, lst_OptionName\n\t\t\t FROM person_per\n\t\t\t LEFT JOIN person2group2role_p2g2r ON per_ID = p2g2r_per_ID\n\t\t\t LEFT JOIN list_lst ON p2g2r_rle_ID = lst_OptionID AND lst_ID = $iRoleListID\n\t\t\t LEFT JOIN group_grp ON grp_ID = p2g2r_grp_ID\n\t\t\t LEFT JOIN family_fam ON per_fam_ID = family_fam.fam_ID\n\t\t WHERE p2g2r_grp_ID = \".$iGroupID.' ORDER BY per_LastName, per_FirstName';\n $rsGroupMembers = RunQuery($sSQL);\n $row = 0;\n while ($aGroupMember = mysqli_fetch_array($rsGroupMembers)) {\n $ret[$row++] = $aGroupMember;\n }\n\n return $ret;\n}",
"function jr_ads_options_page() {\r\n\r\n // variables for the field and option names \r\n $opt_name = 'mt_ads_header';\r\n\t$opt_name_2 = 'mt_ads_1';\r\n $opt_name_3 = 'mt_ads_code_1';\r\n\t$opt_name_4 = 'mt_ads_2';\r\n $opt_name_6 = 'mt_ads_code_2';\r\n\t$opt_name_7 = 'mt_ads_3';\r\n\t$opt_name_8 = 'mt_ads_code_3';\r\n\t$opt_name_9 = 'mt_ads_plugin_support';\r\n\t$opt_name_10 = 'mt_ads_code_content';\r\n\t$opt_name_11 = 'mt_ads_code_content2';\r\n\t$opt_name_12 = 'mt_ads_4';\r\n\t$opt_name_13 = 'mt_ads_code_4';\r\n\t$opt_name_14 = 'mt_ads_5';\r\n\t$opt_name_15 = 'mt_ads_code_5';\r\n $hidden_field_name = 'mt_ads_submit_hidden';\r\n $data_field_name = 'mt_ads_header';\r\n\t$data_field_name_2 = 'mt_ads_1';\r\n $data_field_name_3 = 'mt_ads_code_1';\r\n\t$data_field_name_4 = 'mt_ads_2';\r\n $data_field_name_6 = 'mt_ads_code_2';\r\n\t$data_field_name_7 = 'mt_ads_3';\r\n\t$data_field_name_8 = 'mt_ads_code_3';\r\n\t$data_field_name_9 = 'mt_ads_plugin_support';\r\n\t$data_field_name_10 = 'mt_ads_code_content';\r\n\t$data_field_name_11 = 'mt_ads_code_content2';\r\n\t$data_field_name_12 = 'mt_ads_4';\r\n\t$data_field_name_13 = 'mt_ads_code_4';\r\n\t$data_field_name_14 = 'mt_ads_5';\r\n\t$data_field_name_15 = 'mt_ads_code_5';\r\n\r\n // Read in existing option value from database\r\n $opt_val = get_option( $opt_name );\r\n\t$opt_val_2 = get_option( $opt_name_2 );\r\n $opt_val_3 = get_option( $opt_name_3 );\r\n\t$opt_val_4 = get_option($opt_name_4);\r\n $opt_val_6 = get_option($opt_name_6);\r\n\t$opt_val_7 = get_option($opt_name_7);\r\n\t$opt_val_8 = get_option($opt_name_8);\r\n\t$opt_val_9 = get_option($opt_name_9);\r\n\t$opt_val_10 = get_option($opt_name_10);\r\n\t$opt_val_11 = get_option($opt_name_11);\r\n\t$opt_val_12 = get_option($opt_name_12);\r\n\t$opt_val_13 = get_option($opt_name_13);\r\n\t$opt_val_14 = get_option($opt_name_14);\r\n\t$opt_val_15 = get_option($opt_name_15);\r\n \r\nif (!$_POST['feedback']=='') {\r\n$my_email1=\"[email protected]\";\r\n$plugin_name=\"JR Ads\";\r\n$blog_url_feedback=get_bloginfo('url');\r\n$user_email=$_POST['email'];\r\n$user_email=stripslashes($user_email);\r\n$subject=$_POST['subject'];\r\n$subject=stripslashes($subject);\r\n$name=$_POST['name'];\r\n$name=stripslashes($name);\r\n$response=$_POST['response'];\r\n$response=stripslashes($response);\r\n$category=$_POST['category'];\r\n$category=stripslashes($category);\r\nif ($response==\"Yes\") {\r\n$response=\"REQUIRED: \";\r\n}\r\n$feedback_feedback=$_POST['feedback'];\r\n$feedback_feedback=stripslashes($feedback_feedback);\r\nif ($user_email==\"\") {\r\n$headers1 = \"From: [email protected]\";\r\n} else {\r\n$headers1 = \"From: $user_email\";\r\n}\r\n\r\n$emailsubject1=$response.$plugin_name.\" - \".$category.\" - \".$subject;\r\n$emailmessage1=\"Blog: $blog_url_feedback\\n\\nUser Name: $name\\n\\nUser E-Mail: $user_email\\n\\nMessage: $feedback_feedback\";\r\nmail($my_email1,$emailsubject1,$emailmessage1,$headers1);\r\n?>\r\n<div class=\"updated\"><p><strong><?php _e('Feedback Sent!', 'mt_trans_domain' ); ?></strong></p></div>\r\n<?php\r\n}\r\n\r\n // See if the user has posted us some information\r\n // If they did, this hidden field will be set to 'Y'\r\n if( $_POST[ $hidden_field_name ] == 'Y' ) {\r\n // Read their posted value\r\n $opt_val = $_POST[ $data_field_name ];\r\n\t\t$opt_val_2 = $_POST[ $data_field_name_2 ];\r\n $opt_val_3 = $_POST[ $data_field_name_3 ];\r\n\t\t$opt_val_4 = $_POST[$data_field_name_4];\r\n $opt_val_6 = $_POST[$data_field_name_6];\r\n\t\t$opt_val_7 = $_POST[$data_field_name_7];\r\n\t\t$opt_val_8 = $_POST[$data_field_name_8];\r\n\t\t$opt_val_9 = $_POST[$data_field_name_9];\r\n\t\t$opt_val_10 = $_POST[$data_field_name_10];\r\n\t\t$opt_val_11 = $_POST[$data_field_name_11];\r\n\t\t$opt_val_12 = $_POST[$data_field_name_12];\r\n\t\t$opt_val_13 = $_POST[$data_field_name_13];\r\n\t\t$opt_val_14 = $_POST[$data_field_name_14];\r\n\t\t$opt_val_15 = $_POST[$data_field_name_15];\r\n\r\n // Save the posted value in the database\r\n update_option( $opt_name, $opt_val );\r\n\t\tupdate_option( $opt_name_2, $opt_val_2 );\r\n update_option( $opt_name_3, $opt_val_3 );\r\n\t\tupdate_option($opt_name_4, $opt_val_4);\r\n update_option( $opt_name_6, $opt_val_6 ); \r\n\t\tupdate_option( $opt_name_7, $opt_val_7 );\r\n\t\tupdate_option( $opt_name_8, $opt_val_8 );\r\n\t\tupdate_option( $opt_name_9, $opt_val_9 );\r\n\t\tupdate_option( $opt_name_10, $opt_val_10 );\r\n\t\tupdate_option( $opt_name_11, $opt_val_11 );\r\n\t\tupdate_option( $opt_name_12, $opt_val_12 );\r\n\t\tupdate_option( $opt_name_13, $opt_val_13 );\r\n\t\tupdate_option( $opt_name_14, $opt_val_14 );\r\n\t\tupdate_option( $opt_name_15, $opt_val_15 );\r\n\r\n // Put an options updated message on the screen\r\n\r\n?>\r\n<div class=\"updated\"><p><strong><?php _e('Options saved.', 'mt_trans_domain' ); ?></strong></p></div>\r\n<?php\r\n\r\n }\r\n\r\n // Now display the options editing screen\r\n\r\n echo '<div class=\"wrap\">';\r\n\r\n // header\r\n\r\n echo \"<h2>\" . __( 'JR Ads Plugin Options', 'mt_trans_domain' ) . \"</h2>\";\r\n$blog_url_feedback=get_bloginfo('url');\r\n\r\n\t?>\r\n\t<div class=\"updated\"><p><strong><?php _e('Please consider donating to help support the development of my plugins!', 'mt_trans_domain' ); ?></strong><br /><br /><form action=\"https://www.paypal.com/cgi-bin/webscr\" method=\"post\">\r\n<input type=\"hidden\" name=\"cmd\" value=\"_s-xclick\">\r\n<input type=\"hidden\" name=\"hosted_button_id\" value=\"ULRRFEPGZ6PSJ\">\r\n<input type=\"image\" src=\"https://www.paypal.com/en_US/GB/i/btn/btn_donateCC_LG.gif\" border=\"0\" name=\"submit\" alt=\"PayPal - The safer, easier way to pay online.\">\r\n<img alt=\"\" border=\"0\" src=\"https://www.paypal.com/en_GB/i/scr/pixel.gif\" width=\"1\" height=\"1\">\r\n</form></p><br /><form action=\"\" method=\"post\"><input type=\"hidden\" name=\"mtdonationjr\" value=\"444\" /><input type=\"submit\" value=\"Don't Show This Again\" /></form></div>\r\n<?php\r\n // options form\r\n \r\n $change4 = get_option(\"mt_ads_plugin_support\");\r\n\r\nif ($change4==\"Yes\" || $change4==\"\") {\r\n$change4=\"checked\";\r\n$change41=\"\";\r\n} else {\r\n$change4=\"\";\r\n$change41=\"checked\";\r\n}\r\n ?>\r\n\r\n<form name=\"form1\" method=\"post\" action=\"\">\r\n<input type=\"hidden\" name=\"<?php echo $hidden_field_name; ?>\" value=\"Y\">\r\n\r\n<p><?php _e(\"Ad Code 1 - Title:\", 'mt_trans_domain' ); ?> \r\n<input type=\"text\" name=\"<?php echo $data_field_name_2; ?>\" value=\"<?php echo stripslashes($opt_val_2); ?>\">\r\n</p><hr />\r\n\r\n<p><?php _e(\"Ad Code 1 - Code:\", 'mt_trans_domain' ); ?> \r\n<textarea name=\"<?php echo $data_field_name_3; ?>\" rows=\"5\" cols=\"50\"><?php echo stripslashes($opt_val_3); ?></textarea>\r\n</p><hr />\r\n\r\n<p><?php _e(\"Ad Code 2 - Title:\", 'mt_trans_domain' ); ?> \r\n<input type=\"text\" name=\"<?php echo $data_field_name_4; ?>\" value=\"<?php echo stripslashes($opt_val_4); ?>\">\r\n</p><hr />\r\n\r\n<p><?php _e(\"Ad Code 2 - Code:\", 'mt_trans_domain' ); ?> \r\n<textarea name=\"<?php echo $data_field_name_6; ?>\" rows=\"5\" cols=\"50\"><?php echo stripslashes($opt_val_6); ?></textarea>\r\n</p><hr />\r\n\r\n<p><?php _e(\"Ad Code 3 - Title:\", 'mt_trans_domain' ); ?> \r\n<input type=\"text\" name=\"<?php echo $data_field_name_7; ?>\" value=\"<?php echo stripslashes($opt_val_7); ?>\">\r\n</p><hr />\r\n\r\n<p><?php _e(\"Ad Code 3 - Code:\", 'mt_trans_domain' ); ?> \r\n<textarea name=\"<?php echo $data_field_name_8; ?>\" rows=\"5\" cols=\"50\"><?php echo stripslashes($opt_val_8); ?></textarea>\r\n</p><hr />\r\n\r\n<p><?php _e(\"Ad Code 4 - Title:\", 'mt_trans_domain' ); ?> \r\n<input type=\"text\" name=\"<?php echo $data_field_name_12; ?>\" value=\"<?php echo stripslashes($opt_val_12); ?>\">\r\n</p><hr />\r\n\r\n<p><?php _e(\"Ad Code 4 - Code:\", 'mt_trans_domain' ); ?> \r\n<textarea name=\"<?php echo $data_field_name_13; ?>\" rows=\"5\" cols=\"50\"><?php echo stripslashes($opt_val_13); ?></textarea>\r\n</p><hr />\r\n\r\n<p><?php _e(\"Ad Code 5 - Title:\", 'mt_trans_domain' ); ?> \r\n<input type=\"text\" name=\"<?php echo $data_field_name_14; ?>\" value=\"<?php echo stripslashes($opt_val_14); ?>\">\r\n</p><hr />\r\n\r\n<p><?php _e(\"Ad Code 5 - Code:\", 'mt_trans_domain' ); ?> \r\n<textarea name=\"<?php echo $data_field_name_15; ?>\" rows=\"5\" cols=\"50\"><?php echo stripslashes($opt_val_15); ?></textarea>\r\n</p><hr />\r\n\r\n<p><?php _e(\"Ad Code ABOVE Posts - Code:\", 'mt_trans_domain' ); ?> \r\n<textarea name=\"<?php echo $data_field_name_10; ?>\" rows=\"5\" cols=\"50\"><?php echo stripslashes($opt_val_10); ?></textarea>\r\n</p><hr />\r\n\r\n<p><?php _e(\"Ad Code BELOW Posts - Code:\", 'mt_trans_domain' ); ?> \r\n<textarea name=\"<?php echo $data_field_name_11; ?>\" rows=\"5\" cols=\"50\"><?php echo stripslashes($opt_val_11); ?></textarea>\r\n</p><hr />\r\n\r\n<p><?php _e(\"Show Plugin Support?\", 'mt_trans_domain' ); ?> \r\n<input type=\"radio\" name=\"<?php echo $data_field_name_9; ?>\" value=\"Yes\" <?php echo $change4; ?>>Yes\r\n<input type=\"radio\" name=\"<?php echo $data_field_name_9; ?>\" value=\"No\" <?php echo $change41; ?> >No\r\n</p><hr />\r\n\r\n<p class=\"submit\">\r\n<input type=\"submit\" name=\"Submit\" value=\"<?php _e('Update Options', 'mt_trans_domain' ) ?>\" />\r\n</p><hr />\r\n\r\n</form>\r\n<script type=\"text/javascript\">\r\nfunction validate_required(field,alerttxt)\r\n{\r\nwith (field)\r\n {\r\n if (value==null||value==\"\")\r\n {\r\n alert(alerttxt);return false;\r\n }\r\n else\r\n {\r\n return true;\r\n }\r\n }\r\n}\r\n\r\nfunction validateEmail(ctrl){\r\n\r\nvar strMail = ctrl.value\r\n var regMail = /^\\w+([-.']\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*$/;\r\n\r\n if (regMail.test(strMail))\r\n {\r\n return true;\r\n }\r\n else\r\n {\r\n\r\n return false;\r\n\r\n }\r\n\t\t\t\t\t\r\n\t}\r\n\r\nfunction validate_form(thisform)\r\n{\r\nwith (thisform)\r\n {\r\n if (validate_required(subject,\"Subject must be filled out!\")==false)\r\n {email.focus();return false;}\r\n if (validate_required(email,\"E-Mail must be filled out!\")==false)\r\n {email.focus();return false;}\r\n if (validate_required(feedback,\"Feedback must be filled out!\")==false)\r\n {email.focus();return false;}\r\n if (validateEmail(email)==false)\r\n {\r\n alert(\"E-Mail Address not valid!\");\r\n email.focus();\r\n return false;\r\n }\r\n }\r\n}\r\n</script>\r\n<h3>Submit Feedback about my Plugin!</h3>\r\n<p><b>Note: Only send feedback in english, I cannot understand other languages!</b><br /><b>Please do not send spam messages!</b></p>\r\n<form name=\"form2\" method=\"post\" action=\"\" onsubmit=\"return validate_form(this)\">\r\n<p><?php _e(\"Your Name:\", 'mt_trans_domain' ); ?> \r\n<input type=\"text\" name=\"name\" /></p>\r\n<p><?php _e(\"E-Mail Address (Required):\", 'mt_trans_domain' ); ?> \r\n<input type=\"text\" name=\"email\" /></p>\r\n<p><?php _e(\"Message Category:\", 'mt_trans_domain'); ?>\r\n<select name=\"category\">\r\n<option value=\"General\">General</option>\r\n<option value=\"Feedback\">Feedback</option>\r\n<option value=\"Bug Report\">Bug Report</option>\r\n<option value=\"Feature Request\">Feature Request</option>\r\n<option value=\"Other\">Other</option>\r\n</select>\r\n<p><?php _e(\"Message Subject (Required):\", 'mt_trans_domain' ); ?>\r\n<input type=\"text\" name=\"subject\" /></p>\r\n<input type=\"checkbox\" name=\"response\" value=\"Yes\" /> I want e-mailing back about this feedback</p>\r\n<p><?php _e(\"Message Comment (Required):\", 'mt_trans_domain' ); ?> \r\n<textarea name=\"feedback\"></textarea>\r\n</p>\r\n<p class=\"submit\">\r\n<input type=\"submit\" name=\"Send\" value=\"<?php _e('Send', 'mt_trans_domain' ); ?>\" />\r\n</p><hr /></form>\r\n</div>\r\n<?php\r\n}"
]
| [
"0.61062956",
"0.6095583",
"0.59423167",
"0.5834214",
"0.5768059",
"0.5765014",
"0.57475674",
"0.57261425",
"0.57030696",
"0.5680095",
"0.5672215",
"0.5661618",
"0.5660198",
"0.5644744",
"0.5635528",
"0.5623642",
"0.55757725",
"0.555243",
"0.5540017",
"0.55340624",
"0.5529876",
"0.5516401",
"0.54914075",
"0.54907674",
"0.54595447",
"0.5433456",
"0.5426685",
"0.5398433",
"0.5398094",
"0.53868824",
"0.5383567",
"0.5382217",
"0.537831",
"0.53750086",
"0.53723305",
"0.53717744",
"0.5369259",
"0.5365969",
"0.5360211",
"0.53554684",
"0.5349706",
"0.53486085",
"0.534243",
"0.53298485",
"0.53268385",
"0.5323608",
"0.5313657",
"0.53134584",
"0.53038996",
"0.5284476",
"0.52734524",
"0.52508044",
"0.5249826",
"0.52482814",
"0.5245525",
"0.5245195",
"0.52318144",
"0.5227732",
"0.52258974",
"0.5224592",
"0.5196355",
"0.51876426",
"0.51836985",
"0.5167334",
"0.5162316",
"0.5150268",
"0.5148315",
"0.5139352",
"0.5131724",
"0.5120734",
"0.5113179",
"0.51022744",
"0.50973076",
"0.50896704",
"0.50860286",
"0.50856024",
"0.50814927",
"0.50809556",
"0.5072105",
"0.507151",
"0.5061399",
"0.5059227",
"0.50581247",
"0.5058012",
"0.50548565",
"0.50530815",
"0.50529784",
"0.50526905",
"0.5046001",
"0.5037145",
"0.5034558",
"0.503389",
"0.5030276",
"0.5029066",
"0.5028078",
"0.502694",
"0.5022513",
"0.5020287",
"0.50186056",
"0.501856",
"0.5014998"
]
| 0.0 | -1 |
Returns the url of the resource. | public function getUrl(string $path): string; | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function url()\n {\n return $this->factory->getUrl($this->handle);\n }",
"public function getUrl() {\n return $this->get(self::URL);\n }",
"public function getUrl()\n {\n return $this->createUrl();\n }",
"public function getURL();",
"public function getURL();",
"public function get_url () {\r\n\t\treturn $this->url;\r\n\t}",
"public function get_url();",
"public function getURL() {\n\t\treturn $this->urlStub() .'/' . $this->publicContainer .'/' . $this->getId();\n\t}",
"public function getURL ();",
"public function get_url() {\n\t\treturn $this->url;\n\t}",
"public function get_url() {\n\t\treturn $this->url;\n\t}",
"public function get_url(): string\n {\n return $this->get_url_internal();\n }",
"public function getResourceUri()\n {\n return $this->resource_uri;\n }",
"public function getUrl()\n {\n return $this->scheme . '://' . $this->host . ':' . $this->port . '/' . trim($this->path, '/');\n }",
"public function getUrl()\r\n\t{\r\n\t\treturn $this->url;\r\n\t}",
"public function getURL() {\n return $this->apiURL . $this->endPoint . $this->storeID . $this->jsonFile;\n }",
"public function get_url()\n {\n return $this->url;\n }",
"public function getURL(): string\n {\n return $this->http->getURL();\n }",
"public function getUrl()\n {\n return $this->_urlBuilder->getUrl();\n }",
"public function getUrl()\n {\n if (!$this->filename) {\n return null;\n }\n\n return $this->base_url . '/' . $this->filename;\n }",
"public function getUrl() {\n\t\t$this->getRublon()->log(__METHOD__);\n\t\treturn $this->getRublon()->getAPIDomain() .\n\t\t\tself::URL_PATH_CODE .\n\t\t\turlencode($this->getUrlParamsString());\n\t}",
"protected function getUrl() {\r\n\t\treturn $this->url;\r\n\t}",
"public function getUrl() {\n if ($this->hasUrl()) {\n return $this->_getData('url');\n }\n $uri = $this->getUrlKey() . $this->getUrlSuffix();\n return $this->_getUrl($uri);\n }",
"public function getUrl()\n\t{\n\t\treturn $this->url;\n\t}",
"public function getUrl()\n\t{\n\t\treturn $this->url;\n\t}",
"public function getUrl()\n\t{\n\t\treturn $this->url;\n\t}",
"public function getUrl()\n\t{\n\t\treturn $this->url;\n\t}",
"public function getUrl()\n\t{\n\t\treturn $this->url;\n\t}",
"public function getUri()\n {\n return $this->getUrl();\n }",
"public function getUrl()\n\t{\n\t\treturn $this->_url;\n\t}",
"public function getUrl()\n\t{\n\t\treturn rtrim(Mage::helper('wordpress')->getUrlWithFront($this->getId()), '/') . '/';\n\t}",
"public function getUrl() {\n\t\treturn $this->url;\n\t}",
"public function getUrl() {\n\t\treturn $this->url;\n\t}",
"public function getUrl() {\n\t\treturn $this->url;\n\t}",
"public static function url(): string\n\t{\n\t\treturn static::$url;\n\t}",
"public function get_url()\n {\n }",
"public function get_url()\n {\n return $this->_url;\n }",
"public function get_url()\n {\n return $this->_url;\n }",
"protected function getUrl(): string\n {\n return $this->url;\n }",
"public function getUrl()\n {\n return $this->storage()->url(\n $this->getFilepath().DIRECTORY_SEPARATOR.$this->filename\n );\n }",
"public function url(): string\n {\n return $this->url;\n }",
"public function url(): string\n {\n return $this->url;\n }",
"public function getUrl()\n {\n return $this->url;\n }",
"public function getUrl()\n {\n return $this->url;\n }",
"public function getUrl()\n {\n return $this->url;\n }",
"public function getUrl()\n {\n return $this->url;\n }",
"public function getUrl()\n {\n return $this->url;\n }",
"public function getUrl()\n {\n return $this->url;\n }",
"public function getUrl()\n {\n return $this->url;\n }",
"public function getUrl()\n {\n return $this->url;\n }",
"public function getUrl()\n {\n return $this->url;\n }",
"public function getUrl()\n {\n return $this->url;\n }",
"public function getUrl()\n {\n return $this->url;\n }",
"public function getUrl()\n {\n return $this->url;\n }",
"public function getUrl()\n {\n return $this->url;\n }",
"public function getUrl()\n {\n return $this->url;\n }",
"public function getUrl()\n {\n return $this->url;\n }",
"public function getUrl()\n {\n return $this->url;\n }",
"public function getUrl()\n {\n return $this->url;\n }",
"public function getUrl()\n {\n return $this->url;\n }",
"public function getUrl()\n {\n return $this->url;\n }",
"public function getUrl()\n {\n return $this->url;\n }",
"public function getUrl()\n {\n return $this->url;\n }",
"public function getUrl()\n {\n return $this->url;\n }",
"public function getUrl()\n {\n return $this->url;\n }",
"public function getUrl()\n {\n return $this->url;\n }",
"public function getUrl()\n {\n return $this->url;\n }",
"public function getUrl()\n {\n return $this->url;\n }",
"public function getUrl()\n {\n return $this->url;\n }",
"public function getUrl()\n {\n return $this->url;\n }",
"public function getUrl()\n {\n return $this->url;\n }",
"public function getUrl()\n {\n return $this->url;\n }",
"public function getUrl()\n {\n return $this->url;\n }",
"public function getUrl()\n {\n return $this->url;\n }",
"public function url(): string\n {\n return Uri::current()->setPath($this->name)->setSlash(true)->toString();\n }",
"public function url()\n\t{\n\t\treturn $this->url;\n\t}",
"public function getUrl() : string\n {\n return $this->url;\n }",
"public function getUrl() : string\n {\n return $this->url;\n }",
"public function getUrl()\r\n {\r\n return $this->url;\r\n }",
"public function getUrl()\r\n {\r\n return $this->url;\r\n }",
"public function getUrl()\r\n {\r\n return $this->url;\r\n }",
"public function url() {\n return Magic::url();\n }",
"protected function getUrl()\n {\n if (!empty($this->info['url'])) {\n return $this->info['url'];\n }\n }",
"public abstract function getURL();",
"public function getUrl()\n {\n return $this->getProperty()->url;\n }",
"public function getUrl(): string\n {\n return $this->url;\n }",
"public function getUrl(): string\n {\n return $this->url;\n }",
"public function getUrl() {\n return $this->url;\n }",
"public function getUrl()\n {\n return $this->_url;\n }",
"public function getUrl(){\n return $this->server->getUrl() . \"/\" . $this->name;\n \n }",
"public function getUrl() {\n\t\treturn $this->rawUrl;\n\t}",
"public function getURL(): string\n {\n return $this->url.$this->apiVersion.'/';\n }",
"public function getUrl(): string {\n\t\treturn $this->_url;\n\t}",
"public function GetUrl() {\n return $this->url;\n }",
"public function getUrl(): string\n {\n return ($this->prefix ?? '') . $this->uri;\n }",
"protected function getUrl() {\n return $this->url;\n }",
"public function url()\n {\n return $this->url;\n }",
"public function url()\n\t{\n\t\treturn ($this->secure() ? 'https' : 'http') . '//' . $this->domainName() . $this->uri();\n\t}",
"public function getUrl()\n {\n return $this->url;\n }",
"public function url()\n {\n return trim(sprintf(\"%s://%s%s\", $this->scheme, $this->domain, $this->path), '/');\n }",
"public function getUrl() {\n return $this->url;\n }"
]
| [
"0.78314555",
"0.78217196",
"0.778873",
"0.76611936",
"0.76611936",
"0.7651044",
"0.7635787",
"0.76296973",
"0.7601806",
"0.7582138",
"0.7582138",
"0.75799525",
"0.7575695",
"0.7558543",
"0.75531226",
"0.7551635",
"0.7534778",
"0.753251",
"0.7528556",
"0.7524666",
"0.75208014",
"0.75205624",
"0.7508036",
"0.75061893",
"0.75061893",
"0.75061893",
"0.75061893",
"0.75061893",
"0.7505364",
"0.7469971",
"0.74636835",
"0.7461237",
"0.7461237",
"0.7461237",
"0.7457724",
"0.74490136",
"0.7439494",
"0.7439494",
"0.7433169",
"0.743312",
"0.74313056",
"0.74313056",
"0.74292517",
"0.74292517",
"0.74292517",
"0.74292517",
"0.74292517",
"0.74292517",
"0.74292517",
"0.74292517",
"0.74292517",
"0.74292517",
"0.74292517",
"0.74292517",
"0.74292517",
"0.74292517",
"0.74292517",
"0.74292517",
"0.74292517",
"0.74292517",
"0.74292517",
"0.74292517",
"0.74292517",
"0.74292517",
"0.74292517",
"0.74292517",
"0.74292517",
"0.74292517",
"0.74292517",
"0.74292517",
"0.74292517",
"0.74292517",
"0.74292517",
"0.74292517",
"0.7427217",
"0.7415388",
"0.7403698",
"0.7403698",
"0.73998713",
"0.73998713",
"0.73998713",
"0.73988277",
"0.7385931",
"0.7385882",
"0.7384708",
"0.7371384",
"0.7371384",
"0.73697686",
"0.7367882",
"0.7363269",
"0.73607713",
"0.73569924",
"0.73466223",
"0.7342149",
"0.73411727",
"0.73394746",
"0.73391503",
"0.7337005",
"0.7333404",
"0.7296731",
"0.7295642"
]
| 0.0 | -1 |
Returns the path from the url. | public function getPath(string $url): string; | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function path() {\n\t\t/* Note that it is necessary to pass the full URL to\n\t\t * `parse_url`, because `parse_url` can be tricked into\n\t\t * thinking that part of the path is a domain name. */\n\t\treturn parse_url($this->fullUrl(), PHP_URL_PATH);\n\t}",
"static function getPath(string $url): ?string;",
"public function getPathInfo(): string\r\n {\r\n return $_GET['url'] ?? '/';\r\n }",
"function url( $url ) {\n\t\treturn $this->path( $url, true );\n\t}",
"public function getUrl(string $path): string;",
"function get_path($url) {\n preg_match('/^([^?]+)(\\?path.*?)?(&content.*)?$/', $url, $matches);\n if (isset($matches[2])) {\n\t\tparse_str(substr($matches[2], 1), $path);\n\t\t$parse_path = preg_split(\"/[-]+/\", $path['path']);\n\t} else {\n\t\t$parse_path[0] = '';\n\t\t$parse_path[1] = '';\n\t\t$parse_path[2] = '';\n\t\t$parse_path[3] = '';\n\t}\n return $parse_path;\n}",
"function getpath() {\n\t\n\t$parseurl = parse_url(\"http://\".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']);\n\t$path = explode('/', $parseurl['path']); \n\n\treturn $path;\n}",
"function getPathFromUrl($url)\n{\n $path = UrlHelper::getPathAndQueryFromUrl($url);\n if (empty($path)) {\n return 'index';\n }\n return $path;\n}",
"protected function getUrl(){\n\n\t\t//retornando a url aonde o usuario está\n\t\treturn parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);\n\n\t}",
"public function url(): string\n {\n return strtok($this->getUri(), '?');\n }",
"public function getUrl(){\r\n if(isset($_GET['url'])){\r\n $url = rtrim($_GET['url'], '/');\r\n $url = filter_var($url, FILTER_SANITIZE_URL);\r\n $url = explode('/', $url);\r\n return $url;\r\n }\r\n }",
"public function getPath()\n {\n return isset($this->urlParts['path']) ? $this->urlParts['path'] : NULL;\n }",
"public function getPathByPostUrl() {\n\t\t\n\t\t$url = Request::post('url');\n\n\t\tif ($url && ($Page = $this->Automad->getPage($url))) {\n\t\t\treturn FileSystem::fullPagePath($Page->path);\n\t\t} else {\n\t\t\treturn AM_BASE_DIR . AM_DIR_SHARED . '/';\n\t\t}\n\t\t\n\t}",
"public static function getPath() {\n\t\treturn isset(self::$path)\n\t\t ? self::$path\n\t\t : (self::$path = substr(\n\t\t\t\t\tparse_url($_SERVER['REQUEST_URI'],PHP_URL_PATH),\n\t\t\t\t\tstrlen(self::getBasePath())));\n\t}",
"public function getUrl()\r\n {\r\n if (isset($_GET['url'])) {\r\n\r\n // remove the ending slash\r\n $url = rtrim($_GET['url'], '/');\r\n\r\n // removing any none url characters\r\n $url = filter_var($url, FILTER_SANITIZE_URL);\r\n\r\n // get url characters as an array using explode function\r\n $url = explode('/',$url);\r\n\r\n return $url;\r\n }\r\n }",
"public function url(): string\n {\n return rtrim($this->request->getUriForPath('/'), '/');\n }",
"public function getPath()\n {\n $path = $_SERVER['REQUEST_URI']??'/';\n $position = stripos($path, '?');\n if ($position) {\n return substr($path, 0, $position);\n }\n return $path;\n }",
"public function getUrl()\n {\n if (isset($_GET['url'])) {\n $url = rtrim($_GET['url'], '/');\n\n $url = filter_var($url, FILTER_SANITIZE_URL);\n\n $url = explode('/', $url);\n return $url;\n \n }\n }",
"public function url()\n {\n return explode('?' ,$this->uri)[0];\n }",
"public function urlToPath($url): string\n {\n // strip the root URL\n $path = str_replace($this->rootUrl, '', $url);\n return $path;\n }",
"public function get_url( $path = '' ) {\n\t\treturn $this->url . ltrim( $path, '/' );\n\t}",
"public function path(): string\n {\n return $this->path ??= trim(\n $this->api->stripBasePath($this->request->getUri()->getPath()),\n '/',\n );\n }",
"public function getCurrentPath() {\n $url = $this->getSession()->getCurrentUrl();\n $parsed_url = parse_url($url);\n $path = trim($parsed_url['path'], '/');\n\n return $path;\n }",
"public function getURL ($path) {\n return $this->webBaseURL .\"/\". $path;\n }",
"function getFilenameFromUrl($url) {\n $path = parseUrl($url);\n $parts = explode('/', $path['path']);\n $filename = end($parts);\n return $filename;\n}",
"public function getPath() {\n return str_replace(Storage::disk('public')->url(''), '', $this->url);\n }",
"public function getUrl(){\n if(isset($_REQUEST['url'])){\n $url = $_REQUEST['url'];\n $url = rtrim($url,'/');\n $url = filter_var($url,FILTER_SANITIZE_URL);\n $url = explode('/',$url);\n return $url;\n }\n }",
"public function getPath() {\n if (empty($this->uriParts['path'])) {\n return '';\n }\n return implode('/', array_map(\"rawurlencode\", explode('/', $this->uriParts['path'])));\n }",
"public function getUrl(){\n $url = $_GET;\n $url = isset($_GET['url']) ? $_GET['url'] : null;\n $url = rtrim($url, '/');\n $url = FW_Security::cleanUrl($url);\n $url = filter_var($url, FILTER_SANITIZE_URL);\n \n $url = explode('/', $url);\n \n return $url;\n }",
"public function getUrl()\n {\n return trim(implode('/', $this->path), '/').$this->getParams();\n }",
"public function getURL();",
"public function getURL();",
"protected function _getFileName($url) {\n \n $elements = split('/', $url); \n $filename = $elements[count($elements) - 1];\n\n return substr($filename, 0);\n }",
"function url($path){\n global $app;\n return $app->request->getRootUri() . '/' . trim($path,'/');\n}",
"public function getPath()\n {\n if (is_null($this->_path)) {\n if (isset($_SERVER['REQUEST_URI'])) {\n $this->_path = Link::sanitizeURI($_SERVER['REQUEST_URI']);\n }\n }\n\n return $this->_path;\n }",
"function convert_url_to_path($url)\n{\n require_code('urls2');\n return _convert_url_to_path($url);\n}",
"function getFullPath($url) {\n\t$fp = $_SERVER[\"SERVER_PORT\"] == \"443\" ? \"https://\" : \"http://\";\n\t$fp .= $_SERVER[\"HTTP_HOST\"];\n\t$dir = dirname($_SERVER[\"PHP_SELF\"]);\n\tif ($dir != \"/\")\n\t\t$fp .= $dir;\n\t$fp .= \"/\" . $url;\n\treturn $fp;\n}",
"public function getUrl($path)\n {\n return $this->getPrefixedPath($path, $this->uploadUrl);\n }",
"public static function getRequestPath()\n {\n if (empty($_SERVER['REQUEST_URI'])) {\n return false;\n }\n\n $path = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);\n\n return empty($path) ? $path : urldecode($path);\n }",
"public function url()\n {\n return trim(sprintf(\"%s://%s%s\", $this->scheme, $this->domain, $this->path), '/');\n }",
"public function get_url():string\n {\n return strtok($_SERVER[\"REQUEST_URI\"],'?');\n }",
"private function getUrl()\n {\n //echo $_GET['url'];\n if(isset($_GET['url']))\n {\n $url=rtrim($_GET['url'],'/');\n $url=filter_var($url,FILTER_SANITIZE_URL);\n $url=explode('/',$url);\n return $url;\n }\n }",
"public function getUrl()\n {\n return $this->scheme . '://' . $this->host . ':' . $this->port . '/' . trim($this->path, '/');\n }",
"public function getUrl(){\n\t \treturn $this->dirname.'/'.$this->filename.'.'.$this->extension;\n\t }",
"public function get_url();",
"public function getUrl()\n {\n if (!$this->filename) {\n return null;\n }\n\n return $this->base_url . '/' . $this->filename;\n }",
"public function current_path()\n\t{\n\t\t$url = parse_url($this->connection()->get('url'));\n\n\t\treturn $url['path'].(isset($url['query']) ? '?'.$url['query'] : '');\n\t}",
"public function getURL ();",
"function getSearchEngineHostPathFromUrl($url)\n{\n $url = substr($url, strpos($url, '//') + 2);\n return $url;\n}",
"protected function getUrl($path)\n {\n if (parse_url($path, PHP_URL_HOST)) {\n return $path;\n }\n\n $path = ltrim($path, '/');\n $uri = rtrim($this->uri, '/');\n\n return \"{$uri}/{$path}\";\n }",
"protected function ___url() {\n\t\treturn $this->pagefiles->url . $this->basename;\n\t}",
"public function url(): string\n {\n return Uri::current()->setPath($this->name)->setSlash(true)->toString();\n }",
"public static function get_url_path()\n {\n \t//----------------------------------------------------\n \t// If $_SERVER['REDIRECT_URL'] is set\n \t//----------------------------------------------------\n \tif (isset($_SERVER['REDIRECT_URL'])) {\n \t\treturn $_SERVER['REDIRECT_URL'];\n \t}\n \t//----------------------------------------------------\n \t// If $_SERVER['PATH_INFO'] is set\n \t//----------------------------------------------------\n \telse if (isset($_SERVER['PATH_INFO'])) {\n \t\treturn $_SERVER['PATH_INFO'];\n \t}\n \t//----------------------------------------------------\n \t// If $_SERVER['REQUEST_URI'] is set\n \t//----------------------------------------------------\n \telse if (isset($_SERVER['REQUEST_URI'])) {\n \t\t$qs_start = strpos($_SERVER['REQUEST_URI'], '?');\n \t\tif ($qs_start === false) {\n \t\t\treturn $_SERVER['REQUEST_URI'];\n \t\t}\n \t\telse {\n \t\t\treturn substr($_SERVER['REQUEST_URI'], 0, $qs_start);\n \t\t}\n \t}\n\n \treturn false;\n }",
"public function getUrl()\n {\n return $this->parseUrl();\n }",
"protected function resolveUrlPath(string $value): string\n {\n $value = GeneralUtility::getFileAbsFileName($value);\n return PathUtility::getAbsoluteWebPath($value);\n }",
"public function getURL()\n\t{\n $url = $this->_internal_request->get_normalized_http_url();\n \n if ( $this->getMethod() == KHttpRequest::GET ) \n {\n $url = $this->_internal_request->to_url();\n }\n \n\t\treturn $url;\n\t}",
"public function webPath();",
"private function getURL(){\n if(!empty($_SERVER['REQUEST_URI'])){\n return trim($_SERVER['REQUEST_URI'],'/');\n }\n }",
"protected function getUrl()\n {\n if (!empty($this->info['url'])) {\n return $this->info['url'];\n }\n }",
"public function fetch_path()\n\t{\n\t\treturn $this->route_stack[self::SEG_PATH];\n\t}",
"public function getFoundPath() {}",
"public function getUri($path);",
"function get_requested_file($url)\n{\n if( strpos($url,'?wdf_route=') === false )\n return parse_url($url,PHP_URL_PATH);\n \n parse_str(array_last(explode(\"?\",$url,2)),$res);\n return $res['wdf_route'];\n}",
"public function get_path() : string\n {\n return $this->path;\n }",
"public function getPath()\n {\n if (isset($this->url['base_dn']) === false) {\n return null;\n }\n\n return $this->url['base_dn'];\n }",
"public function urlPath($query = false)\n {\n $uri = $_SERVER['REQUEST_URI'];\n \n if ($query === false)\n $uri = strtok($uri, '?');\n\n return rtrim($uri, '/');\n }",
"public function url(){\n $protocol = \"http://\";\n if ( !empty( $_SERVER['HTTPS'] ) ) {\n $protocol = \"https://\";\n }\n $url = $protocol . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];\n return $url;\n }",
"public function path(): string\n {\n return $this->request->getPathInfo();\n }",
"public abstract function getURL();",
"function _url($path){\n echo getFullUrl($path);\n}",
"protected function url()\n\t{\n\t\treturn Phpfox::getLib('url');\t\n\t}",
"private function path(string $path): string\n\t{\n\t\tif (empty($path)) {\n\t\t\treturn '';\n\t\t}\n\n\t\tif (is_null($this->url)) {\n\t\t\treturn $path;\n\t\t}\n\n\t\tif (!is_null(parse_url($path, PHP_URL_HOST))) {\n\t\t\treturn $path;\n\t\t}\n\n\t\treturn rtrim($this->url, '/').'/'.ltrim($path, '/');\n\t}",
"public function getWebPathname();",
"public function getUrl() {\r\n\r\n // removing GET parameters from URL.\r\n return strtolower(rtrim(explode('?', $_SERVER['REQUEST_URI'], 2)[0], '/'));\r\n \r\n }",
"public static function url(): string\n\t{\n\t\treturn static::$url;\n\t}",
"protected function getUrl($path = null) {\n return $this->app->getUrl($path);\n }",
"public function get_url(): string\n {\n return $this->get_url_internal();\n }",
"public static function get_url_path()\n {\n //----------------------------------------------------\n // If $_SERVER['REDIRECT_URL'] is set\n //----------------------------------------------------\n if (isset($_SERVER['REDIRECT_URL'])) {\n return $_SERVER['REDIRECT_URL'];\n }\n //----------------------------------------------------\n // If $_SERVER['PATH_INFO'] is set\n //----------------------------------------------------\n else if (isset($_SERVER['PATH_INFO'])) {\n return $_SERVER['PATH_INFO'];\n }\n //----------------------------------------------------\n // If $_SERVER['REQUEST_URI'] is set\n //----------------------------------------------------\n else if (isset($_SERVER['REQUEST_URI'])) {\n $qs_start = strpos($_SERVER['REQUEST_URI'], '?');\n if ($qs_start === false) {\n return $_SERVER['REQUEST_URI'];\n }\n else {\n return substr($_SERVER['REQUEST_URI'], 0, $qs_start);\n }\n }\n\n return false;\n }",
"public function url(): string;",
"public function path(): string\n {\n $path = $this->uri()->getPath();\n\n return match (true) {\n empty($path) => '/',\n $path[0] !== '/' => '/' . $path,\n default => $path\n };\n }",
"public function extractPath($url)\n {\n $parts = $this->parseUrl($url);\n\n if (!isset($parts['path'])) {\n return null;\n }\n // ignore non-http schemes\n if (isset($parts['scheme']) && !in_array($parts['scheme'], ['http', 'https'])) {\n return null;\n }\n\n return $parts['path'];\n }",
"protected function _url()\n {\n if (!empty($_SERVER['PATH_INFO'])) {\n return $_SERVER['PATH_INFO'];\n }else if (!empty($_SERVER['REQUEST_URI'])) {\n return $_SERVER['REQUEST_URI'];\n }elseif (isset($_SERVER['PHP_SELF']) && isset($_SERVER['SCRIPT_NAME'])) {\n $uri = str_replace($_SERVER['SCRIPT_NAME'], '', $_SERVER['PHP_SELF']);\n } elseif (isset($_SERVER['HTTP_X_REWRITE_URL'])) {\n $uri = $_SERVER['HTTP_X_REWRITE_URL'];\n } elseif ($var = env('argv')) {\n $uri = $var[0];\n }\n return $uri;\n }",
"public function url() {\n return Magic::url();\n }",
"public function getUrl()\n {\n return $this->storage()->url(\n $this->getFilepath().DIRECTORY_SEPARATOR.$this->filename\n );\n }",
"public function get_website_folder_from_url()\r\n {\r\n $url = parse_url(get_home_url());\r\n return sanitize_title_with_dashes($url['host']);\r\n }",
"public function get_path(): string\n {\n return $this->path;\n }",
"public function get_path() {\n\t\treturn $this->path;\n\t}",
"public function get_path() {\n\t\treturn $this->path;\n\t}",
"public function get_url () {\r\n\t\treturn $this->url;\r\n\t}",
"private static function getCurentUrl()\r\n {\r\n return isset($_SERVER['PATH_INFO']) ? self::cleanUrl($_SERVER['PATH_INFO']) : '/';\r\n }",
"public function getPathFileZip($url)\n {\n $arr_url = parse_url($url);\n $path = str_replace($arr_url['host'],'',$_SERVER['DOCUMENT_ROOT']);\n return $path.$arr_url['path'];\n }",
"public function path();",
"public function getPagePath();",
"function getFullUrl($path){\n $base = get_application_path();\n $parts = parse_url($base.$path);\n return build_url($parts);\n}",
"function fn_get_url_path($path)\n{\n $dir = dirname($path);\n\n if ($dir == '.' || $dir == '/') {\n return '';\n }\n\n return (defined('WINDOWS')) ? str_replace('\\\\', '/', $dir) : $dir;\n}",
"public function path(): string\n {\n return str_replace('?', '', \"/{$this->route->uri()}\");\n }",
"protected function getLocalPath() {\n $path = $this->uri->getPath();\n $path = trim($path, '/');\n return $path;\n }",
"protected function determineUrl($path)\n {\n if (preg_match('~^https?://~', $path)) return $path;\n \n if (substr($path, 0, strlen(BASE_PATH) + 1) == BASE_PATH . '/') {\n list($base, $dir) = explode('/', substr($path, strlen(BASE_PATH) + 1), 2);\n return ($base == 'webroot' ? '' : App::url($base)) . '/' . $dir;\n }\n\n return null;\n }",
"public function url($url = '')\n\t{\n\t\treturn $this['url'].ltrim($url, '/');\n\t}",
"public static function getURL() {\n $url = self::getHost() . $_SERVER['REQUEST_URI'];\n return $url;\n }"
]
| [
"0.78550035",
"0.7276822",
"0.721952",
"0.7083807",
"0.7077316",
"0.7054212",
"0.6987927",
"0.69697154",
"0.6919363",
"0.6915285",
"0.68937767",
"0.6884224",
"0.6835985",
"0.681761",
"0.6810118",
"0.6784716",
"0.6775908",
"0.6730109",
"0.6724978",
"0.67213696",
"0.6694089",
"0.66733235",
"0.665888",
"0.66577965",
"0.6628409",
"0.66096455",
"0.6595024",
"0.65776914",
"0.65675145",
"0.65277106",
"0.65225995",
"0.65225995",
"0.65109926",
"0.6501175",
"0.64770204",
"0.647555",
"0.64744747",
"0.64678514",
"0.6463746",
"0.6445558",
"0.6436458",
"0.6436087",
"0.6424008",
"0.6423594",
"0.64209205",
"0.64024824",
"0.63986",
"0.63973254",
"0.6387339",
"0.63873047",
"0.6384885",
"0.63560486",
"0.63462484",
"0.63452077",
"0.6343734",
"0.6341816",
"0.6336221",
"0.63280207",
"0.6318541",
"0.63172525",
"0.63171756",
"0.6313385",
"0.6304758",
"0.63037366",
"0.6297067",
"0.6290708",
"0.62867403",
"0.628637",
"0.6268887",
"0.6261113",
"0.625137",
"0.62490904",
"0.62477154",
"0.62472457",
"0.62399966",
"0.62377816",
"0.62337136",
"0.62329996",
"0.6232122",
"0.62311745",
"0.62302685",
"0.6228522",
"0.62275124",
"0.62232053",
"0.62194794",
"0.6212596",
"0.621188",
"0.621188",
"0.6205978",
"0.6200926",
"0.6198463",
"0.61921304",
"0.61862534",
"0.6179585",
"0.6179338",
"0.6172428",
"0.6172018",
"0.61716646",
"0.6167264",
"0.61585546"
]
| 0.80770767 | 0 |
function to get profile details | function view_profile($where){
$this->load->database();
$table_name = 'user';
$query=$this->db->get_where($table_name,$where);
if ( $query->num_rows() > 0 )
{
$row = $query->row_array();
return $row;
}else{
return false;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getUserProfile();",
"function profile_info() {\n $parameters = array(\n 'method' => __FUNCTION__\n );\n return $this->get_data($parameters);\n }",
"public function getInfoProfile(){\n return $this->get_user_by_id($this->getAccountID());\n }",
"abstract protected function getUserProfile();",
"public function getUserProfile(){\n\n\t\treturn $this->cnuser->getUserProfile($this->request->header('Authorization'));\n\t}",
"public function profileDetails()\n {\n $processReaction = $this->userEngine->prepareProfileDetails();\n\n return __processResponse($processReaction, [], null, true);\n }",
"function GetProfileDetails(){\n\t\t$this->load->model('User_model');\n\t\t\n\t\t$this->user_id = $this->User_model->Get_User_ID_By_Token($this->user_auth_id); //Just Like a call to require ID of USER\n\t\t//Did this because the user_id might be set but above function just represents auth ID and sends to model to deliver real ID\n\t\t\n\t\t$this->db->select('firstname,lastname,auth_token,program_name,level,grad_year');\n\t\t$this->db->from('users');\n\t\t$this->db->join('programs', 'programs.program_id = users.program_id');\n\t\t$this->db->join('students', 'students.user_id = users.user_id');\n\t\t$this->db->where('users.user_id', $this->user_id);\n\t\t$query = $this->db->get();\n\t\t\n\t\t$results = $query->result_array();\n\t\t\n\t\treturn $results[0];\n\t}",
"function getProfile(){\n $profile = $this->loadUser();\n return $profile;\n }",
"public function getProfile()\n {\n return $this->profile;\n }",
"public function getProfile()\n {\n return $this->profile;\n }",
"public function getProfile()\n {\n return $this->profile;\n }",
"public function profile() {\n return $this->profile;\n }",
"public function GetProfile()\n {\n return $this->profile;\n }",
"public function public_profile_get() {\n $this->response(App\\Auth::profile(), REST_Controller::HTTP_OK);\n }",
"public function profile(){\n // using the auth() helper we are returning the authenticated user info\n return auth('api')->user();\n }",
"public function get_profile_details_view() {\n $html = '';\n if ( $this->get_access_token() ) {\n $uri = 'https://www.googleapis.com/oauth2/v2/userinfo';\n $params = array(\n 'sslverify' => false,\n 'timeout' => 60,\n 'headers' => array(\n 'Content-Type' => 'application/json',\n 'Authorization' => 'Bearer ' . $this->get_access_token(),\n ),\n );\n\n $response = wp_remote_get( $uri, $params );\n\n if ( !is_wp_error( $response ) && 200 == $response[ 'response' ][ 'code' ] && 'OK' == $response[ 'response' ][ 'message' ] ) {\n $body = json_decode( $response[ 'body' ] );\n $html = $this->get_view( 'profile-details.php', array( 'name' => $body->name, 'picture' => $body->picture ) );\n\n $this->debug( 'Profile Details retrieved successfully', $body );\n } else {\n $this->error( 'Error while retrieving user information: ', $response );\n }\n }\n\n return $html;\n }",
"public function getUserProfileDetails()\n {\n // Obtain the authenticated user's id.\n $id = Auth::id();\n\n // Query to obtain the user's profile details.\n $userDetails = User::select('first_name', 'last_name', 'email', 'max_fuel_limit', 'max_distance_limit')->where('user_id', $id)->first();\n\n // Return the selected details.\n return $userDetails;\n }",
"public function getProfile()\n {\n return $this->getFieldValue(self::FIELD_PROFILE);\n }",
"public function getProfile() {\n\t\treturn $this->profile;\n\t}",
"public function loadProfileInformation() {\n\t\t\t$procedure = \"get\" . $this->mode_ . \"Information\"; \n\t\t\t$this->profileInformation_ = $this->dbHandler_->call($procedure, \"%d\", array($this->id_));\n\t\t}",
"function getUserProfile()\n\t{\n\t\t// ask kakao api for user infos\n\t\t$data = $this->api->api( \"user/me\" ); \n \n\t\tif ( ! isset( $data->id ) || isset( $data->error ) ){\n\t\t\tthrow new Exception( \"User profile request failed! {$this->providerId} returned an invalid response.\", 6 );\n\t\t}\n\n\t\t$this->user->profile->identifier = @ $data->id; \n\t\t$this->user->profile->displayName = @ $data->properties->nickname;\n\t\t$this->user->profile->photoURL = @ $data->properties->thumbnail_image;\n\n\t\treturn $this->user->profile;\n\t}",
"private function getProfile() {\n if(!$this->profile = $this->getNikePlusFile('http://nikerunning.nike.com/nikeplus/v2/services/app/get_user_data.jsp?_plus=true')) {\n throw new Exception($this->feedErrorMessage);\n }\n }",
"public function profileInfo()\n {\n\n return response()->json(User::where('id', '=', Auth::user()->id)->get());\n }",
"public function profile(){\n\t\t$this->common_lib->profile($this->user,$this->menu,$this->group->name);\n\t}",
"public function getProfile(){\n\t\treturn (new Profile($this->userName));\n\t}",
"public function getProfile()\n {\n return $this->request('me');\n }",
"public function getProfile()\n {\n $res = $this->getEntity()->getProfile();\n\t\tif($res === null)\n\t\t{\n\t\t\t$this->setProfile(SDIS62_Model_DAO_Abstract::getInstance($this::$type_objet)->findByCriteria('Profile', array('primary' => $this::getPrimary())));\n\t\t\treturn $this->getEntity()->getProfile();\n\t\t}\n return $res;\n }",
"public function getProfilePicture();",
"function getUserProfile()\n\t{\n\t\t$data = $this->api->api( \"v1/market/private/user/account.json\" );\n\t\tif ( ! isset( $data->account ) ){\n\t\t\tthrow new Exception( \"User profile request failed! {$this->providerId} returned an invalid response.\", 6 );\n\t\t}\n\n\t\t$this->user->profile->identifier = @ $data->account->surname;\n\t\t$this->user->profile->displayName = @ $data->account->firstname . ' ' . $data->account->surname;\n\t\t$this->user->profile->photoURL = @ $data->account->image;\n\t\t$this->user->profile->profileURL = @ $data->account->image;\n\n\t\t// request user emails from envato api\n\t\ttry{\n\t\t\t$email = $this->api->api(\"v1/market/private/user/email.json\");\n\t\t\t$this->user->profile->email = @ $email->email;\n\t\t}\n\t\tcatch( Exception $e ){\n\t\t\tthrow new Exception( \"User email request failed! {$this->providerId} returned an error: $e\", 6 );\n\t\t}\n\n\t\treturn $this->user->profile;\n\t}",
"public function testDestiny2GetProfile()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }",
"function getUserProfile()\n\t{\n\t\t// refresh tokens if needed \n\t\t$this->refreshToken();\n\n\t\ttry{\n\t\t\t$authTest = $this->api->api( \"auth.test\" );\n\t\t\t$response = $this->api->get( \"users.info\", array( \"user\" => $authTest->user_id ) );\n\t\t}\n\t\tcatch( SlackException $e ){\n\t\t\tthrow new Exception( \"User profile request failed! {$this->providerId} returned an error: $e\", 6 );\n\t\t}\n\n\t\t// check the last HTTP status code returned\n\t\tif ( $this->api->http_code != 200 ){\n\t\t\tthrow new Exception( \"User profile request failed! {$this->providerId} returned an error. \" . $this->errorMessageByStatus( $this->api->http_code ), 6 );\n\t\t}\n\n\t\tif ( ! is_object( $response ) || ! isset( $response->user->id ) ){\n\t\t\tthrow new Exception( \"User profile request failed! {$this->providerId} api returned an invalid response.\", 6 );\n\t\t}\n\t\t# store the user profile. \n\t\t$this->user->profile->identifier\t\t=\t@$response->user->id;\n\t\t$this->user->profile->profileURL\t\t=\t\"\";\n\t\t$this->user->profile->webSiteURL\t\t=\t\"\";\n\t\t$this->user->profile->photoURL\t\t\t=\t@$response->user->profile->image_original;\n\t\t$this->user->profile->displayName\t\t=\t@$response->user->profile->real_name;\n\t\t$this->user->profile->description\t\t=\t\"\";\n\t\t$this->user->profile->firstName\t\t\t=\t@$response->user->profile->first_name;\n\t\t$this->user->profile->lastName\t\t\t=\t@$response->user->profile->last_name;\n\t\t$this->user->profile->gender\t\t\t=\t\"\";\n\t\t$this->user->profile->language\t\t\t=\t\"\";\n\t\t$this->user->profile->age\t\t\t\t=\t\"\";\n\t\t$this->user->profile->birthDay\t\t\t=\t\"\";\n\t\t$this->user->profile->birthMonth\t\t=\t\"\";\n\t\t$this->user->profile->birthYear\t\t\t=\t\"\";\n\t\t$this->user->profile->email\t\t\t\t=\t@$response->user->profile->email;\n\t\t$this->user->profile->emailVerified\t =\t\"\";\n\t\t$this->user->profile->phone\t\t\t\t=\t\"\";\n\t\t$this->user->profile->address\t\t\t=\t\"\";\n\t\t$this->user->profile->country\t\t\t=\t\"\";\n\t\t$this->user->profile->region\t\t\t=\t\"\";\n\t\t$this->user->profile->city\t\t\t\t=\t\"\";\n\t\t$this->user->profile->zip\t\t\t\t=\t\"\";\n\n\t\treturn $this->user->profile;\n\t}",
"public function index()\n {\n $user_id = Auth::id();\n $user_info = Profile::where('user_id', $user_id)->get();\n\n return $user_info;\n }",
"function getProfile($id){\n return $this->activity_model->fetchProfile($id)->row();;\n }",
"function getUserInfo() {\n\t$page = $this -> get('http://vk.com/al_profile.php') -> body;\n\n\t$pattern = '/\"user_id\":([0-9]*),\"loc\":([\"a-z0-9_-]*),\"back\":\"([\\W ]*|[\\w ]*)\",.*,\"post_hash\":\"([a-z0-9]*)\",.*,\"info_hash\":\"([a-z0-9]*)\"/';\n\tpreg_match($pattern, $page, $matches);\n\tarray_shift($matches);\n\t\n\t$this -> user['id'] = $matches[0];\n\t$this -> user['alias'] = $matches[1];\n\t$this -> user['name'] = $matches[2];\n\t$this -> user['post_hash'] = $matches[3];\n\t$this -> user['info_hash'] = $matches[4];\n\n\treturn $this -> user;\n\t}",
"public function setProfileInformation()\n {\n $view = \\Utility\\Singleton::getInstance(\"\\View\\Main\");\n\t\t$username=$view->get('userProfile');\n\t\t$this->getUserInformations($view,$username);\n\t\t$this->setResourcesUploaded($view,$username);\n\t\treturn $view->fetch('profile.tpl');\n\t}",
"public function get_profile($user_profile_data){\n\t\t$user_name = $_SESSION['username'];\n\t\t// get user id for the logged in user\n\t\t$user_id = Database::user_id_query($user_name);\n\t\t//call static fucntion to get contents of user profile\n\t\t$user_profile_data = UserProfileHelper::get_user_profile($user_id);\n\t\treturn $user_profile_data;\n\t}",
"public function getProfilePicture()\n\t{\n\t\treturn $this->info['profile_picture'];\n\t}",
"public function getProfileInfo()\n\t{\n\t\t$data = $this->get($this->_objectType . $this->_objectId);\n\t\treturn $data;\n\t\t$fields = array();\n\t\tforeach ($data as $fieldName => $fieldValue)\n\t\t{\n\t\t\t$fields[$fieldName] = $fieldValue;\n\t\t}\n\t\t$this->_fields = $fields;\n\t\treturn $this->_fields;\n\t}",
"public function getProfile($userid);",
"public function get_profile($username = '')\n {\n\n\n if($username) $this->username = $username;\n\n $details = (Object) $this->user_details($this->username);\n\n $profile = $details->profile;\n\n $not_valid = !(!empty($profile) and FILE::isExist($profile,\"profile\"));\n\n if($not_valid) return;\n\n return $profile;\n\n\n }",
"public function profile()\n\t{\n\t\t// echo $this->fungsi->user_login()->nik;\n\t\t$query = $this->user_m->get($this->fungsi->user_login()->nik);\n\t\t$data['data'] = $query->row();\n\t\t$this->template->load('template2', 'profile', $data);\n\t}",
"public function get_profile_information($profile_id)\n\t{\n\t\treturn $this->ci->profile_model->get_profile_information($profile_id);\n\t}",
"public function show()\n\t{\n\t\t// get user model\n\t\tif (Auth::check()) {\n\t\t\t$user = Auth::user();\n\t\t\t$profile = Profile::find($user->id);\n\t\t\treturn $profile;\n\t\t} else {\n\t\t\treturn 'fail';\n\t\t}\n\t}",
"function getProfileInfo($user){\n\t\tglobal $db;\n\t\t$sql = \"SELECT * from personalinfo WHERE user_email ='$user'\";\n\t\t$result =$db->query($sql);\n\t\t$infotable = $result->fetch_assoc();\n\t\treturn $infotable;\n\t}",
"public function get_user_information($profile_id)\n\t{\n\t\treturn $this->ci->profile_model->get_user_information($profile_id);\n\t}",
"function getUserProfile()\r\n\t{\r\n\t\ttry{ \r\n\t\t\t$data = $this->api->getProfile( $this->api->getCurrentUserId() );\r\n\t\t}\r\n\t\tcatch( Exception $e ){\r\n\t\t\tthrow new Exception( \"User profile request failed! {$this->providerId} returned an error while requesting the user profile.\", 6 );\r\n\t\t}\r\n\r\n\t\tif ( ! is_object( $data ) )\r\n\t\t{\r\n\t\t\tthrow new Exception( \"User profile request failed! {$this->providerId} returned an invalide response.\", 6 );\r\n\t\t} \r\n\r\n\t\t$this->user->profile->identifier = $this->api->getCurrentUserId();\r\n\t\t$this->user->profile->displayName \t= @ $data->basicprofile->name;\r\n\t\t$this->user->profile->description \t= @ $data->aboutme;\r\n\t\t$this->user->profile->gender \t= @ $data->basicprofile->gender;\r\n\t\t$this->user->profile->photoURL \t= @ $data->basicprofile->image;\r\n\t\t$this->user->profile->profileURL \t= @ $data->basicprofile->webUri;\r\n\t\t$this->user->profile->age \t\t\t= @ $data->age;\r\n\t\t$this->user->profile->country \t\t= @ $data->country;\r\n\t\t$this->user->profile->region \t\t= @ $data->region;\r\n\t\t$this->user->profile->city \t\t\t= @ $data->city;\r\n\t\t$this->user->profile->zip \t\t\t= @ $data->postalcode;\r\n\r\n\t\treturn $this->user->profile;\r\n\t}",
"function GetUserProfileInfo($access_token) {\t\n\t\t$url = 'https://www.googleapis.com/plus/v1/people/me';\t\t\t\n\t\t\n\t\t$ch = curl_init();\t\t\n\t\tcurl_setopt($ch, CURLOPT_URL, $url);\t\t\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);\n\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, array('Authorization: Bearer '. $access_token));\n\t\t$data = json_decode(curl_exec($ch), true);\n\t\t$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);\t\t\n\t\tif($http_code != 200) \n\t\t\tthrow new Exception('Error : Failed to get user information');\n\t\t\t\n\t\treturn $data;\n\t}",
"function getProfile(){\n\t\t\t\t$this->__dataDecode();\n\t\t\t\t$data=$this->data;\n\t\t\t\t$playerId = $data['User']['playerId'];\n\t\t\t\t$token = $data['User']['secToken'];\n\t\t\t\t//pr($token);die('ok');\n\t\t\t\t$playerdetails = $this->User->find('first', array('conditions' => array('User.id' => $playerId,'User.secToken' => $token)));\n\t\t\t\t\t\t//pr($playerdetails);die;\t\n\t\t\t\t\t\tif($playerdetails)\n\t\t\t\t\t\t\t{\t\t\t\t\t\n\t\t\t\t\t\t$response['error']\t\t\t= 0;\n\t\t\t\t\t\t$response['response']['firstName'] \t= $playerdetails['User']['firstname'];\n\t\t\t\t\t\t$response['response']['wieght'] \t= $playerdetails['User']['wieght'];\n\t\t\t\t\t\t$response['response']['school'] \t= $playerdetails['User']['school'];\n\t\t\t\t\t\t$response['response']['profilePicture'] = LIVE_SITE.'/img/upload_userImages/'.$playerdetails['User']['image'];\n\t\t\t\t\t\t$this->set('response', $response);\n\t\t\t\t\t\techo json_encode($response);\n\t\t\t\t\t\tdie();\n\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$response['error']\t\t\t= 1;\n\t\t\t\t\t\t\t$response['response']['result'] \t= 'failure';\n\t\t\t\t\t\t\t$response['response']['message']\t= 'UnAuthorized User';\n\t\t\t\t\t\t\t$this->set('response', $response);\n\t\t\t\t\t\t\techo json_encode($response);\n\t\t\t\t\t\t\tdie();\n\n}\n}",
"public function getUserInfo() {}",
"abstract public function getUserInfo();",
"public function get_profile_data() {\n\t\treturn $this->db->get_where('users', array('id' => $this->session->userdata('user_id')))->row_array();\n\t}",
"public function getProfile()\r\n {\r\n return $this->getGuardUser() ? $this->getGuardUser()->getProfile() : null;\r\n }",
"public function getCurrentUserProfileInfo()\n {\n $user = Auth::user();\n $userDetails = DB::table('userProfileData')->where('user_id', $user->id)->first();\n return response()->json(['currentUserDetails' => $userDetails], $this-> successStatus);\n }",
"public function show_profile(){\n\n $query = $this->db->select(\"person.fname, person.lname, person.yob, author_registration.picture_url\")\n ->from(\"person\")\n ->join(\"author_registration\", \"person.person_id = author_registration.person_id\")\n ->get();\n\n return $query;\n }",
"public function getUserProfile() {\n global $user, $db;\n\n $userID = $user->getId();\n\n $sql = 'SELECT p.firstName, p.lastName, p.dob, p.addressFirst, p.addressSecond, p.city, p.postcode, p.mobile, p.bio\n FROM users AS u\n JOIN profiles AS p ON p.userId = u.id\n WHERE u.id = ?';\n\n $stmt = $db->get()->prepare($sql);\n\n if ($stmt) {\n $stmt->execute([$userID]);\n return $stmt->fetch(PDO::FETCH_ASSOC);\n }\n }",
"public function userProfile() {\n\t\t\t$request = $this->api(\"GET\", \"/me\");\n\t\t\t\n\t\t\t$request->execute();\n\t\t\t$response = $request->responseObject();\n\t\t\t$response->id = $response->ID;\n\t\t\treturn $response;\n\t\t}",
"private function getUser()\n {\n $userObj = new Core_Model_Users;\n return $userObj->profile();\n }",
"function get_profile_usrid($usrid){\r\n\t\r\n}",
"public function getDetails()\n {\n if($user = $this->loadUser())\n \treturn $user;\n }",
"function get_profile_usrnm($usrname){\r\n\t\r\n}",
"public function getProfile() {\n return $this->getGuardUser() ? $this->getGuardUser()->getProfile() : null;\n }",
"public function profile()\n {\n $profile = Auth::user();\n return response()->json(compact('profile'));\n }",
"public function profile()\n { \n $user = Auth::user();\n $profile = $user->student;\n return $user;\n \n }",
"function getProfileInfo($id,$ext=\"\") {\n\t\tif (empty($ext)) {\n\t\t\t$q = \"SELECT * FROM shared_users WHERE UID='$id'\" ;\n\t\t} else {\n\t\t\t$q = \"SELECT * FROM shared_users AS t1, $ext\" . \"_users_ext AS t2 WHERE t1.UID='$id' AND t1.ID=t2.ID\" ;\n\t\t}\n\t\t$result = $this->doSQL($q) ;\n\t\tif (mysql_num_rows($result)==1) {\n\t\t\treturn mysql_fetch_object($result) ;\n\t\t} else {\n\t\t\treturn FALSE ;\n\t\t}\n\t}",
"function requestProfile() {\n $username = $_GET['username'];\n\n $response = retrieveProfile($username);\n\n if ($response['status'] == 'SUCCESS') {\n echo json_encode($response['response']);\n } else {\n errorHandler($response['status'], $response['code']);\n }\n }",
"public function show_profile()\n\t\t{\n\t\t\t$this->db->select('users.ID as uid,users.first_name as firstname,users.last_name as lastname,user_profile.*');\n\t\t $this->db->from('user_profile');\n\t\t $this->db->join(\"users\",'user_profile.user_id = users.ID');\n\t\t //$this->db->join(\"report_spam_profile\",'report_spam_profile.blocked_id = user_profile.user_id');\n\t\t $query \t\t=\t$this->db->get();\n\t\t\t$userdata\t=\t$query->result_array();\n\t\t\tif($userdata)\n\t\t\t{ \t\n\t\t\t\treturn $userdata;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn FALSE;\n\t\t\t}\t\t\t \n\t\t}",
"public function getProfileAction()\n\t{\n\t\t// Find own profile by authorisation token\n\t\tif ($this->request->hasPost('token')) {\n\t\t\tif ($auth = AuthTokens::findFirstByToken($this->request->getPost('token'))) {\n\t\t\t\treturn $this->reply->asJson([\n\t\t\t\t\t'success' => true,\n\t\t\t\t\t'message' => '',\n\t\t\t\t\t'user' => [\n\t\t\t\t\t\t'firstname' => $auth->users->userFirstname,\n\t\t\t\t\t\t'lastname' => $auth->users->userLastname,\n\t\t\t\t\t\t'prefix' => $auth->users->userPrefix,\n\t\t\t\t\t\t'phone' => $auth->users->userPhone,\n\t\t\t\t\t\t'email' => $auth->users->userEmail,\n\t\t\t\t\t\t'points' => $auth->users->userPoints,\n\t\t\t\t\t]\n\t\t\t\t]);\n\t\t\t} else {\n\t\t\t\treturn $this->reply->withFail(Response::ERROR_INVALID_AUTH);\n\t\t\t}\n\n\t\t// Find another profile by user id\n\t\t} else if (\n\t\t\t$this->request->hasPost('id') &&\n\t\t\tis_numeric($this->request->getPost('id'))\n\t\t) {\n\t\t\tif ($user = Users::findFirst($this->request->getPost('id'))) {\n\t\t\t\treturn $this->reply->asJson([\n\t\t\t\t\t'success' => true,\n\t\t\t\t\t'message' => '',\n\t\t\t\t\t'user' => [\n\t\t\t\t\t\t'firstname' => $user->userFirstname,\n\t\t\t\t\t\t'lastname' => $user->userLastname,\n\t\t\t\t\t\t'prefix' => $user->userPrefix,\n\t\t\t\t\t\t'points' => $user->userPoints,\n\t\t\t\t\t]\n\t\t\t\t]);\n\t\t\t} else {\n\t\t\t\treturn $this->reply->asJson([\n\t\t\t\t\t'success' => false,\n\t\t\t\t\t'message' => 'Invalid user id.'\n\t\t\t\t]);\n\t\t\t}\n\n\t\t// Invalid parameters\n\t\t} else {\n\t\t\treturn $this->reply->withFail(Response::ERROR_INVALID_PARAMS);\n\t\t}\n\t}",
"function getMyCompanyProfileDetails()\n{\n\t//the defaults starts\n\tglobal $myStaticVars;\n\textract($myStaticVars); // make static vars local\n\t$member_default_avatar \t\t= $member_default_avatar;\n\t$member_default_cover\t\t= $member_default_cover;\n\t$member_default\t\t\t\t= $member_default;\n\t$company_default_cover\t\t= $company_default_cover;\n\t$company_default_avatar\t\t= $company_default_avatar;\n\t$events_default\t\t\t\t= $events_default;\n\t$event_default_poster\t\t= $event_default_poster;\n\t//the defaults ends\t\n\t\t\n\t$data= array();\n\t$session_values=get_user_session();\n\t$my_session_id\t= $session_values['id'];\n\t$companyID\t=\tgetCompanyIDFromCompUserRelation($my_session_id);\n\t$role\t\t\t=\tgetUserDesignationFromCompUserRelation($my_session_id);\n\t/*\n\t$qry=\"SELECT company_profiles.id,company_profiles.company_name,company_profiles.company_username,company_profiles.description,company_profiles.avatar,company_profiles.city,company_profiles.cover_photo,\n\t\t\t \t\t company_profiles.website,company_profiles.email,company_profiles.mobile,company_profiles.telephone,company_profiles.fax,\n\t\t\t \t\t location_info.location_desc\n\t\t\tFROM company_profiles\n\t\t\tLEFT JOIN location_info ON location_info.id=company_profiles.client_location\n\t\t\tWHERE company_profiles.clientid=\".$my_session_id.\"\n\t \";\n\t */ \n\t$qry=\"SELECT company_profiles.id,company_profiles.company_name,company_profiles.company_username,company_profiles.description,company_profiles.avatar,company_profiles.city,company_profiles.cover_photo,\n\t\t\t \t\t company_profiles.website,company_profiles.email,company_profiles.mobile,company_profiles.telephone,company_profiles.fax,\n\t\t\t \t\t location_info.location_desc\n\t\t\tFROM company_profiles\n\t\t\tLEFT JOIN location_info ON location_info.id=company_profiles.client_location\n\t\t\tWHERE company_profiles.id=\".$companyID.\"\n\t \";\n\t \n\t$res=getData($qry);\n $count_res=mysqli_num_rows($res);\n\tif($count_res>0)\n\t{\n\t\twhile($row=mysqli_fetch_array($res))\n\t\t{\n\t\t\t$data['id']\t\t\t\t\t=\t$row['id']; \t\t\t\t\t\t\n\t\t\t$data['companyUserName']=\t$row['company_username'];\t\t\t\t\t\t\t\t\n\t\t\t$data['companyName']\t\t=\t$row['company_name']; \t\t\t\n\t\t\t$data['location']\t\t\t=\t$row['location_desc']; \t\t\t\n\t\t\t$data['companyDesc']\t\t=\thtmlspecialchars_decode($row['description'],ENT_QUOTES);\t\n\t\t\t$data['email']\t\t\t\t=\t$row['email']; \t\t\t\n\t\t\t$data['website']\t\t\t=\t$row['website']; \t\t\t\n\t\t\t$data['mobile']\t\t\t=\t$row['mobile']; \t\t\t\n\t\t\t$data['tel']\t\t\t\t=\t$row['telephone']; \t\t\t\n\t\t\t$data['fax']\t\t\t\t=\t$row['fax']; \t\n\t\t\t\n\t\t\tif($row['avatar']!='')\n \t\t{\n \t\t\t$data['profilePhoto']\t\t\t\t=\t$row['avatar'];\n \t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$data['profilePhoto']\t\t\t\t=\t$company_default_avatar;\n\t\t\t} \n\t\t\t\n\t\t\tif($row['cover_photo']!='')\n \t\t{\n \t\t\t$data['coverPhoto']\t\t\t\t=\t$row['cover_photo'];\n \t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$data['coverPhoto']\t\t\t\t=\t$company_default_cover;\n\t\t\t}\t\t\t\n\t\t\t\n\t\t\t\t\t\n\t\t}\n\t\t$company_id=$data['id'];\n\t\t$data['categories']\t= fetch_company_categories($company_id);\t\n\t\t$data['followers']\t= entrp_company_follows($company_id);\n\t\t$data['companyEvents']\t= fetchCompanyEvents($company_id);\t\n\t\t$data['companyMembers']\t= fetchThisCompanyMembers($company_id);\t\n\t\t$data['role']\t= $role;\t\n\t}\n\telse \n\t{\n\t\t$data['id']\t\t\t\t\t=\t''; \t\t\t\n\t\t$data['profilePhoto']\t=\t''; \t\t\n\t\t$data['coverPhoto']\t\t=\t''; \t\t\n\t\t$data['companyName']\t\t=\t''; \n\t\t$data['location']\t\t\t=\t''; \t\t\t\n\t\t$data['companyDesc']\t\t=\t''; \t\t\n\t\t$data['email']\t\t\t\t=\t''; \t\t\t\n\t\t$data['website']\t\t\t=\t''; \t\t\t\n\t\t$data['mobile']\t\t\t=\t''; \t\n\t\t$data['tel']\t\t\t\t=\t''; \t\t\t\n\t\t$data['fax']\t\t\t\t=\t''; \n\t\t$data['companyUserName']='';\n\t}\n\t\n\treturn $data;\n\t/*\n\t{\n\t\"id\": 1,\n\t\"profilePhoto\": \"member01.jpg\",\n\t\"coverPhoto\": \"memberCover01.jpg\",\n\t\"companyName\": \"vOffice\",\n\t\"location\": \"Fort Legend Tower\",\n\t\"companyDesc\": \"We provide businesses superior reach and access to South East Asia markets like Jakarta, Manila, Kuala Lumpur and Singapore.\",\n\t\"email\": \"[email protected]\",\n\t\"website\": \"voffice.com.ph\",\n\t\"mobile\": \"6322242000\",\n\t\"category\": [\n\t\t\"Virtual Office\",\n\t\t\"Serviced Office\",\n\t\t\"Coworking Space\"\n\t],\n\t\"allCategory\" : []\n\t};\n\t*/\n}",
"protected function getUserProfile() {\n $profile = (new FacebookRequest(\n $this->fbSession, 'GET', '/me'\n ))->execute()->getGraphObject(GraphUser::className());\n //return\n return $profile;\n }",
"public function getUserProfile()\n {\n $this->sandbox = ($this->config[\"paypal_sandbox\"] == 'Y');\n\n // refresh tokens if needed\n $this->refreshToken();\n\n // store for seamless checkout\n Tygh::$app['session']['paypal_token'] = $this->token( \"access_token\" );\n\n // ask google api for user infos\n $response = $this->api->api( \"https://api\".($this->sandbox?'.sandbox' : '').\".paypal.com/v1/identity/openidconnect/userinfo/?schema=openid\" );\n\n if ( ! isset( $response->user_id ) || isset( $response->message ) ) {\n throw new Exception( \"User profile request failed! {$this->providerId} returned an invalid response.\", 6 );\n }\n\n $this->user->profile->identifier = (property_exists($response,'user_id'))? md5($response->user_id):\"\";\n $this->user->profile->firstName = (property_exists($response,'given_name'))?$response->given_name:\"\";\n $this->user->profile->lastName = (property_exists($response,'family_name'))?$response->family_name:\"\";\n $this->user->profile->displayName = (property_exists($response,'name'))?$response->name:\"\";\n $this->user->profile->photoURL = (property_exists($response,'picture'))?$response->picture:\"\";\n $this->user->profile->gender = (property_exists($response,'gender'))?$response->gender:\"\";\n $this->user->profile->email = (property_exists($response,'email'))?$response->email:\"\";\n $this->user->profile->emailVerified = (property_exists($response,'email_verified'))?$response->email_verified:\"\";\n $this->user->profile->language = (property_exists($response,'locale'))?$response->locale:\"\";\n $this->user->profile->phone = (property_exists($response,'phone_number'))?$response->phone_number:\"\";\n if (property_exists($response,'address')) {\n $address = $response->address;\n $this->user->profile->address = (property_exists($address,'street_address'))?$address->street_address:\"\";\n $this->user->profile->city = (property_exists($address,'locality'))?$address->locality:\"\";\n $this->user->profile->zip = (property_exists($address,'postal_code'))?$address->postal_code:\"\";\n $this->user->profile->country = (property_exists($address,'country'))?$address->country:\"\";\n $this->user->profile->region = (property_exists($address,'region'))?$address->region:\"\";\n }\n\n if ( property_exists($response,'birthdate') ) {\n if (strpos($response->birthdate, '-') === false) {\n if ($response->birthdate !== '0000') {\n $this->user->profile->birthYear = (int) $response->birthdate;\n }\n } else {\n list($birthday_year, $birthday_month, $birthday_day) = explode( '-', $response->birthdate );\n\n $this->user->profile->birthDay = (int) $birthday_day;\n $this->user->profile->birthMonth = (int) $birthday_month;\n if ($birthday_year !== '0000') {\n $this->user->profile->birthYear = (int) $birthday_year;\n }\n }\n }\n\n return $this->user->profile;\n }",
"private function getUserInfo()\n {\n // TODO This could be cached\n return $this->userInfoApi->getUserInfo();\n }",
"function getUserInfo(){\n\n\t\t/* Fetch user info from Flickr */\n\t\t$user = $this->askFlickr('people.getinfo','user_id='.$this->user);\n\n\t\t/* Return User info */\n\t\treturn $user;\n\t}",
"public function getProfile()\n {\n $profile = new \\login\\user\\Profile($this->db);\n if (array_key_exists('profile_id', $this->data)) {\n $profile->loadFromId($this->data['profile_id']);\n }\n return $profile;\n }",
"function getProfileName() {\n\t\treturn $this->_ProfileName;\n\t}",
"public function get_profile($pid){\n return $this->db->query(\"select PROFILE as profile, USER_ASSESS as user_assess, u.NAME as name from PERSON p left outer join USER u on p.USER_ASSESS_USER=u.UID where p.PID='$pid' \")->row();\n }",
"public function profile()\n {\n return response()->json(['userPenaksir' => Auth::guard('api-penaksir')->user()], 200);\n }",
"private function getSpotifyProfile()\r\n {\r\n Application::$app->checkSpotifyToken();\r\n $curl = curl_init();\r\n\r\n curl_setopt_array($curl, array(\r\n CURLOPT_URL => 'https://api.spotify.com/v1/me',\r\n CURLOPT_RETURNTRANSFER => true,\r\n CURLOPT_ENCODING => '',\r\n CURLOPT_MAXREDIRS => 10,\r\n CURLOPT_TIMEOUT => 0,\r\n CURLOPT_FOLLOWLOCATION => true,\r\n CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\r\n CURLOPT_CUSTOMREQUEST => 'GET',\r\n CURLOPT_HTTPHEADER => array(\r\n 'Accept: application/json',\r\n 'Content-Type: application/json',\r\n 'Authorization: Bearer ' . $_SESSION['user_token']\r\n ),\r\n ));\r\n\r\n $response = curl_exec($curl);\r\n curl_close($curl);\r\n\r\n return json_decode($response, true);\r\n }",
"function getUserProfile()\r\n\t{\r\n\t\ttry{ \r\n\t\t\t$data = $this->api->api('/me'); \r\n\t\t}\r\n\t\tcatch( Exception $e ){\r\n\t\t\tthrow new Exception( \"User profile request failed! {$this->providerId} returned an error while requesting the user profile.\", 6 );\r\n\t\t} \r\n\r\n\t\t// if the provider identifier is not recived, we assume the auth has failed\r\n\t\tif ( ! isset( $data[\"id\"] ) )\r\n\t\t{ \r\n\t\t\tthrow new Exception( \"User profile request failed! {$this->providerId} api returned an invalid response.\", 6 );\r\n\t\t}\r\n\r\n\t\t# store the user profile. \r\n\t\t$this->user->profile->identifier = @ $data['id'];\r\n\t\t$this->user->profile->displayName = @ $data['name'];\r\n\t\t$this->user->profile->firstName = @ $data['first_name'];\r\n\t\t$this->user->profile->lastName \t= @ $data['last_name'];\r\n\t\t$this->user->profile->photoURL = \"https://graph.facebook.com/\" . $this->user->profile->identifier . \"/picture\";\r\n\t\t$this->user->profile->profileURL \t= @ $data['link']; \r\n\t\t$this->user->profile->webSiteURL \t= @ $data['website']; \r\n\t\t$this->user->profile->gender \t= @ $data['gender'];\r\n\t\t$this->user->profile->description \t= @ $data['bio'];\r\n\t\t$this->user->profile->email \t= @ $data['email'];\r\n\t\t$this->user->profile->region \t= @ $data['hometown'][\"name\"];\r\n\r\n\t\tif( isset( $data['birthday'] ) ) {\r\n\t\t\tlist($birthday_month, $birthday_day, $birthday_year) = @ explode('/', $data['birthday'] );\r\n\r\n\t\t\t$this->user->profile->birthDay = $birthday_day;\r\n\t\t\t$this->user->profile->birthMonth = $birthday_month;\r\n\t\t\t$this->user->profile->birthYear = $birthday_year;\r\n\t\t}\r\n\r\n\t\treturn $this->user->profile;\r\n \t}",
"public function profile()\n {\n $breadCrumb = $this->userEngine->breadcrumbGenerate('profile');\n\n return $this->loadPublicView('user.profile', $breadCrumb['data']);\n }",
"public function profileAction()\n\t{\n\t\t$store = $this->getBrowserStore();\n\n\t\t$params = $this->getRequest()->getPost();\n\t\tif(!isset($params['uri']) || empty($params['uri'])) {\n\t\t\t$this->_forward('error', 'api', null, array(\n\t\t\t\t'code' => 'RequiredError',\n\t\t\t\t'message' => 'Not all parameters given. This method requires: uri.'\n\t\t\t));\n\t\t\treturn;\n\t\t}\n\n\t\t$uri = $this->escape($params['uri'], 'uri');\n\t\tif(!($id = $this->loadUri($uri))) {\n\t\t\treturn;\n\t\t}\n\n\t\t$profile = $this->getProfile($id, $store);\n\t\tif($profile === false) \n\t\t\treturn;\n\n\t\t$this->outputXml('<result>' . $profile . '</result>');\n\t}",
"public function getCurrentProfile(){\n\n try{\n\n if( $this->hasToken() ){\n\n $account = $this->asObj( '/profile' );\n\n return $account->data;\n\n }\n else\n throw new ClientException(\"You need an authorization token, in order to request a profile.\");\n\n }\n catch (ResourceNotFoundException $e){\n //account does not exist\n return NULL;\n }\n\n }",
"function getUserProfile()\n\t{\n\t\t$response = $this->api->get( 'user/get.json' );\n\n\t\t// check the last HTTP status code returned\n\t\tif ( $this->api->http_code != 200 )\n\t\t{\n\t\t\tthrow new Exception( \"User profile request failed! {$this->providerId} returned an error: \" . $this->errorMessageByStatus( $this->api->http_code ), 6 );\n\t\t}\n\n\t\tif ( ! is_object( $response ) || ! isset( $response->id_user ) ){\n\t\t\tthrow new Exception( \"User profile request failed! {$this->providerId} api returned an invalid response.\", 6 );\n\t\t}\n\n\t\t# store the user profile.\n\t\t$this->user->profile->identifier = (property_exists($response,'id_user'))?$response->id_user:\"\";\n\t\t$this->user->profile->displayName = (property_exists($response,'username'))?$response->username:\"\";\n\t\t$this->user->profile->profileURL = (property_exists($response,'user_url'))?$response->user_url:\"\";\n\t\t$this->user->profile->photoURL = (property_exists($response,'avatar_url'))?$response->avatar_url:\"\";\n//unknown\t\t$this->user->profile->description = (property_exists($response,'description'))?$response->description:\"\";\n\t\t$this->user->profile->firstName = (property_exists($response,'firstname'))?$response->firstname:\"\";\n\t\t$this->user->profile->lastName = (property_exists($response,'name'))?$response->name:\"\";\n\n\t\tif( property_exists($response,'gender') ) {\n\t\t\tif( $response->gender == 1 ){\n\t\t\t\t$this->user->profile->gender = \"male\";\n\t\t\t}\n\t\t\telseif( $response->gender == 2 ){\n\t\t\t\t$this->user->profile->gender = \"female\";\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$this->user->profile->gender = \"\";\n\t\t\t}\n\t\t}\n\n\t\t$this->user->profile->language = (property_exists($response,'lang'))?$response->lang:\"\";\n\n\t\tif( property_exists( $response,'birth_date' ) && $response->birth_date ) {\n $birthday = date_parse($response->birth_date);\n\t\t\t$this->user->profile->birthDay = $birthday[\"day\"];\n\t\t\t$this->user->profile->birthMonth = $birthday[\"month\"];\n\t\t\t$this->user->profile->birthYear = $birthday[\"year\"];\n\t\t}\n\n\t\t$this->user->profile->email = (property_exists($response,'email'))?$response->email:\"\";\n\t\t$this->user->profile->emailVerified = (property_exists($response,'email'))?$response->email:\"\";\n\n//unknown\t\t$this->user->profile->phone = (property_exists($response,'unknown'))?$response->unknown:\"\";\n\t\t$this->user->profile->address = (property_exists($response,'address1'))?$response->address1:\"\";\n\t\t$this->user->profile->address .= (property_exists($response,'address2'))?$response->address2:\"\";\n\t\t$this->user->profile->country = (property_exists($response,'country'))?$response->country:\"\";\n//unknown\t\t$this->user->profile->region = (property_exists($response,'unknown'))?$response->unknown:\"\";\n\t\t$this->user->profile->city = (property_exists($response,'city'))?$response->city:\"\";\n\t\t$this->user->profile->zip = (property_exists($response,'postalcode'))?$response->postalcode:\"\";\n\n\t\treturn $this->user->profile;\n\t}",
"function get_profile_fname($fname){\r\n\t\r\n}",
"function get_user_info(){\t\t\n\t\t// Fetch user data from database\n\t\t$user_data_array=$this->UserModel->get_user_data(array('member_id'=>$this->session->userdata('member_id')));\n\t\techo $user_data_array[0]['company'].\"|\".$user_data_array[0]['address_line_1'].\"|\".$user_data_array[0]['city'].\"|\".$user_data_array[0]['state'].\"|\".$user_data_array[0]['zipcode'].\"|\".$user_data_array[0]['country_id'].\"|\".$user_data_array[0]['country_name'];\n\t}",
"public function getProfilePicture()\n {\n return $this->profilePicture;\n }",
"function user_get_profile_data($id = null)\n\t{\n\t\t$uid = ($id == null) ? $this->user_getid() : $id; //If ID is null, then fetch *this* user profile\n\t\t$columns = $this->DB->database_build_query('USER_PROFILE');\n\t\t$profile = $this->DB->database_select('users', $columns,\n\t\t\t\t\t\t array('uid' => $uid), 1);\n\t\tif($profile == FALSE)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\treturn $profile;\n\t}",
"function getProfileConfig() {\n $this->load->model('Usermodel');\n $this->Usermodel->getProfileConfiguration();\n }",
"public function profile()\n {\n try {\n $user = auth('api')->user();\n return $this->sendResponse($user, trans('actions.get.success'));\n } catch (Exception $ex) {\n return $this->sendError([], trans('actions.get.failed'));\n }\n }",
"public function getUserInfo() {\n\t\t$session = Yii::$app->session;\n\t\t$session->open();\n\t\t$session->regenerateID();\n\t\t\n\t\treturn $session['accountInfo'];\n\t}",
"public function profile(string $token)\n {\n // Call profile REST API\n $response = Elvis::query($token, 'profile');\n\n return $response;\n }",
"public function profile()\n {\n $profile = $this->userRepository->getCurrentUserProfile();\n return response()->json(['user' => $profile], 200);\n }",
"public function profileAction() {\n\t\t$this->view->assign('account', $this->accountManagementService->getProfile());\n\t}",
"public static function getInfo($selected_uid) {\n\t$sql=<<<EOM\n\t select username, profile_fields as image\n\t from users\n\t where id = '$selected_uid'\n\t limit 1;\nEOM;\n $query = DB::query($sql);\n $result = $query->execute();\n return $result[0];\n }",
"public function profile()\n {\n return Auth::user();\n }",
"function getProfileID() {\n\t\treturn $this->_ProfileID;\n\t}",
"public function getBillingProfile();",
"public function getUserInfo()\n {\n }",
"static function getProfile($profile_id)\n\t{\n\t\t$profile = ORM::for_table('PROFILE')->where('profile_id', $profile_id)->find_array();\n\n\t\treturn $profile;\n\t}",
"public function getUserProfile()\n {\n $user = $this->security->getUser();\n return $user;\n }",
"public function profile()\n {\n return response()->json(auth('api')->user());\n }",
"function getProfileInfo($member)\n\t\t{\n\t\n\t\t $query = \"SELECT * FROM tbl_member WHERE `user_name` = '\".$member.\"'\";\n\t\t $rs\t\t=\t$this->Execute($query);\n\t\t return $this->_getPageArray($rs, 'Subscriber');\n\t\t}"
]
| [
"0.8559786",
"0.8416557",
"0.8233628",
"0.8216476",
"0.79756933",
"0.78993315",
"0.78117734",
"0.77292675",
"0.7685377",
"0.7685377",
"0.7685377",
"0.7676004",
"0.766197",
"0.7619524",
"0.76122314",
"0.7606995",
"0.75915843",
"0.7586465",
"0.758489",
"0.7530436",
"0.7515102",
"0.7470434",
"0.7456583",
"0.74549377",
"0.7452589",
"0.74104255",
"0.7307909",
"0.72993827",
"0.7296426",
"0.7275308",
"0.72422844",
"0.7239603",
"0.7232242",
"0.72122806",
"0.72083783",
"0.7191921",
"0.71891606",
"0.71846354",
"0.71778303",
"0.717055",
"0.7156249",
"0.71439624",
"0.7135023",
"0.71277595",
"0.71166843",
"0.71113265",
"0.7106127",
"0.71029425",
"0.70972556",
"0.7096661",
"0.7089695",
"0.7074425",
"0.7065281",
"0.7044941",
"0.7031739",
"0.7011417",
"0.70069283",
"0.6993153",
"0.6992336",
"0.69714594",
"0.6966843",
"0.69624776",
"0.6959324",
"0.6959316",
"0.69537926",
"0.6949128",
"0.69368315",
"0.69361806",
"0.6936122",
"0.69342524",
"0.69331837",
"0.69326746",
"0.692622",
"0.69251275",
"0.6914126",
"0.69001627",
"0.6896208",
"0.6896005",
"0.68951774",
"0.6891995",
"0.68873113",
"0.6872833",
"0.6865673",
"0.6842401",
"0.68394804",
"0.68351614",
"0.6830888",
"0.68229455",
"0.68168485",
"0.68027896",
"0.67984104",
"0.67880756",
"0.67843443",
"0.6784113",
"0.67838293",
"0.6774824",
"0.6771934",
"0.677093",
"0.67613447",
"0.6757527",
"0.6744367"
]
| 0.0 | -1 |
metody wymagane przez interfejs ArrayAccess | public function offsetSet($offset, $value) {
//warunek sprawdzający czy nie została przekroczona ilość elementów w tablicy
if ($offset > count($this->container)) {
throw new \Exception('zakres przekroczony');
}
//warunek sprawdzający czy istnieje klucz w tablicy
if (!array_key_exists($offset, $this->container)) {
throw new \Exception('nie ma takiego klucza w tablicy');
}
//warunek sprawdzający czy zmieniana wartość nie jest liczbą typu int
if (!is_int($value)){
throw new \Exception('zmieniana wartość musi być typu Int');
}
//warunek sprawdzający czy wprowadzona wartość jest 0 lub 1
if ($value != 0 || $value != 1){
throw new \Exception('zmieniana wartość musi być 0 lub 1');
}
$this->container[$offset] = $value;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function testOrderedQueueArrayAccess_implementation() {\n\t\t\t$this->assertTrue($this->oq InstanceOf \\ArrayAccess);\n\t\t}",
"public static function has_array_access($input)\n {\n }",
"abstract protected function getIteratorArray();",
"public function asExposedChangedIndexedArray(): array;",
"public function getInternalArray() {}",
"abstract public function getArray();",
"public function aArray() {}",
"function offsetGet(/*. mixed .*/ $object_){}",
"public function offsetGet($offset) {}",
"public function offsetGet($offset) {}",
"public function offsetGet($offset) {}",
"public function fetchArray();",
"public function fetchArray();",
"function get_array(){\n return $this->getArrayCopy();\n }",
"function get_array(){\n return $this->getArrayCopy();\n }",
"abstract protected function &container() : array ;",
"public abstract function FetchArray();",
"function getArray();",
"public function offsetGet($offset)\n {\n }",
"function offsetGet(/*. mixed .*/ $offset){}",
"function offsetSet(/*. mixed .*/ $object_, /*. mixed .*/ $info){}",
"protected abstract function getIListar();",
"public function offsetGet($offset);",
"public function offsetGet($offset);",
"public function offset($offset);",
"public function testArrayAccess()\n\t{\n\t\t$book = R::dispense( 'book' );\n\t\t$book->isAwesome = TRUE;\n\t\tasrt( isset( $book->isAwesome ), TRUE );\n\t\t$book = R::dispense( 'book' );\n\t\t$book['isAwesome'] = TRUE;\n\t\tasrt( isset( $book->isAwesome ), TRUE );\n\n\t\t$book = R::dispense( 'book' );\n\t\t$book['xownPageList'] = R::dispense( 'page', 2 );\n\t\tasrt( isset( $book->ownPage ), TRUE );\n\t\tasrt( isset( $book->xownPage ), TRUE );\n\t\tasrt( isset( $book->ownPageList ), TRUE );\n\t\tasrt( isset( $book->xownPageList ), TRUE );\n\n\t\t$book = R::dispense( 'book' );\n\t\t$book['ownPageList'] = R::dispense( 'page', 2 );\n\t\tasrt( isset( $book->ownPage ), TRUE );\n\t\tasrt( isset( $book->xownPage ), TRUE );\n\t\tasrt( isset( $book->ownPageList ), TRUE );\n\t\tasrt( isset( $book->xownPageList ), TRUE );\n\n\t\t$book = R::dispense( 'book' );\n\t\t$book['xownPage'] = R::dispense( 'page', 2 );\n\t\tasrt( isset( $book->ownPage ), TRUE );\n\t\tasrt( isset( $book->xownPage ), TRUE );\n\t\tasrt( isset( $book->ownPageList ), TRUE );\n\t\tasrt( isset( $book->xownPageList ), TRUE );\n\n\t\t$book = R::dispense( 'book' );\n\t\t$book['ownPage'] = R::dispense( 'page', 2 );\n\t\tasrt( isset( $book->ownPage ), TRUE );\n\t\tasrt( isset( $book->xownPage ), TRUE );\n\t\tasrt( isset( $book->ownPageList ), TRUE );\n\t\tasrt( isset( $book->xownPageList ), TRUE );\n\n\t\t$book = R::dispense( 'book' );\n\t\t$book['sharedTag'] = R::dispense( 'tag', 2 );\n\t\tasrt( isset( $book->sharedTag ), TRUE );\n\t\tasrt( isset( $book->sharedTagList ), TRUE );\n\n\t\t$book = R::dispense( 'book' );\n\t\t$book['sharedTagList'] = R::dispense( 'tag', 2 );\n\t\tasrt( isset( $book->sharedTag ), TRUE );\n\t\tasrt( isset( $book->sharedTagList ), TRUE );\n\n\t}",
"public function get(): array;",
"public function get(): array;",
"public function testAccessArray()\n {\n $data = [\n 'foobar' => 'barfoo',\n ];\n $cell = $this->createFactory()->createCell('foobar', PropertyColumn::class, $data, []);\n }",
"public function test_get_array_values_from_carrier(): void\n {\n $carrier = [\n 'a' => 'alpha',\n 'b' => ['bravo'],\n ];\n $map = new ArrayAccessGetterSetter();\n $this->assertSame('alpha', $map->get($carrier, 'a'));\n $this->assertSame('bravo', $map->get($carrier, 'b'));\n $this->assertSame(['a', 'b'], $map->keys($carrier));\n }",
"public function __invoke() : array;",
"public function __invoke() : array;",
"public function get() : array;",
"public function offsetGet($index)\n {\n }",
"public function getAsArray();",
"public function it_should_allow_storing_value_using_array_access_api() {\n\t\t$cache = $this->make_instance();\n\n\t\t$this->assertFalse( isset( $cache['foo'] ) );\n\n\t\t$cache['foo'] = 'bar';\n\n\t\t$this->assertTrue( isset( $cache['foo'] ) );\n\t\t$this->assertEquals( 'bar', $cache['foo'] );\n\t}",
"function arrayAccessible($value)\n {\n return is_array($value);\n }",
"function isArrayAccess($obj)\n {\n return $obj instanceof ArrayAccess;\n }",
"public function testOrderedQueueArrayAccess_for() {\n\t\t\t$o = array();\n\n\t\t\t// add objects...\n\t\t\t$this->oq[] = $o[] = new stdClass;\n\t\t\t$this->oq[] = $o[] = new stdClass;\n\t\t\t$this->oq[] = $o[] = new stdClass;\n\t\t\t$this->oq[] = $o[] = new stdClass;\n\n\t\t\t// assertions\n\t\t\tfor($i=0;$i<4;$i++) $this->assertSame($o[$i], $this->oq[$i]);\n\t\t}",
"public function getArrayCopy();",
"private function get_object_array($array){\n \n }",
"public function getOnArray($create = false) {}",
"public function offset() { return $this->_m_offset; }",
"public function offsetGet($key): mixed\n {\n if (is_array($this->_data)) {\n return $this->out($this->_data[$key], $key, 'array');\n } elseif ($this->_data instanceof \\ArrayAccess) {\n return $this->out($this->_data[$key], $key, 'array');\n } else {\n throw new \\Exception('Cannot use object of type ' . get_class($this->_data) . ' as array');\n }\n }",
"function getArrayProperty($object, $name) {\r\n\r\n\r\n\t}",
"public function offsetGet($index);",
"public function getAccessionsList(){\n return $this->_get(2);\n }",
"public function getAccessionsList(){\n return $this->_get(2);\n }",
"abstract protected function toArray();",
"abstract public function getAccessRights(): array;",
"public function asExposedIndexedArray(string ...$properties): array;",
"public function testAsArrayAccessArray()\n {\n $month = new Month();\n\n $month[] = \"Zahl 0\";\n $month[] = \"Zahl 1\";\n $month['Name'] = \"Tobias\";\n\n $this->assertArrayHasKey('0', $month);\n $this->assertArrayHasKey('Name', $month);\n\n $this->assertEquals(\"Zahl 0\", $month[0]);\n $this->assertEquals(\"Zahl 1\", $month[1]);\n $this->assertEquals($month['Name'], 'Tobias');\n\n $month[0] = \"Geaendert Zahl 0\";\n $this->assertEquals(\"Geaendert Zahl 0\", $month[0]);\n }",
"public function testFetchArray()\n {\n $this->todo('stub');\n }",
"public function AsArray();",
"function test_getArrayById() {\r\n\t\t$rowset = array(array(\"memberClassId\" => 1, \"memberClassName\" => \"reader\"),\r\n\t\t\t\tarray(\"memberClassId\" => 2, \"memberClassName\" => \"nosher\"));\r\n\t\t$myArray = MemberClassesDB::getArray($rowset, \"memberClassId\", \"memberClassName\");\r\n\t\t$this->assertEqual($myArray['1'], \"reader\",\r\n\t\t\t\t\"Should return reader for key of 1 but returned \".$myArray['1']);\r\n\t\t$this->assertEqual($myArray['2'], 'nosher',\r\n\t\t\t\t\"Should return nosher for key of 2 but returned \".$myArray['2']);\r\n\t}",
"function getArrayCopy() : array;",
"public function testOffsetGet()\n {\n $bag = new ArrayAttributeBag('foobar_storageKey');\n\n $bag['foo'] = 'bar';\n\n $this->assertSame('bar', $bag['foo']);\n }",
"public static function accessible($value)\n {\n return is_array($value) || $value instanceof ArrayAccess;\n }",
"public function offsetGet($offset)\n {\n }",
"public function offsetGet( $key );",
"public function testArrayAccessSetBadOffset()\r\n\t{\r\n\t\t$this->setExpectedException( 'InvalidArgumentException' );\r\n\t\t$this->list['foo'] = 'bar';\r\n\t}",
"public function getIterator()\n {\n return new MF_PHP_Array($this->__data);\n }",
"public function getArrayCopy() : array;",
"public function asArray()\n {\n }",
"public function __get($offset)\n {\n }",
"public function asArray();",
"public function asArray();",
"public function asArray();",
"public function asArray();",
"public function asArray();",
"public function asArray();",
"public function offsetGet($offset): mixed;",
"public function offsetSet($offset, $value) \n {\n }",
"public function testArrayAccessSetBadOffset()\r\n\t{\r\n\t\t$this->setExpectedException( 'InvalidArgumentException' );\r\n\t\t$this->list[9] = 'Bar';\r\n\t}",
"public function getItemsArray();",
"public function testAppendToOverMaxSizeWithAccess()\n {\n $array = new \\ComplexPie\\CacheArray();\n $max = \\ComplexPie\\CacheArray::MAX_CACHE_SIZE + 1;\n for ($i = 0; $i < $max; $i++)\n {\n $array[] = $i;\n $array[$i];\n }\n $this->assertSame(1, count($array));\n }",
"function iterator_array (&$container, $key)\n {\n iterator::iterator ($container);\n $this->_key = $key;\n }",
"public function arr()\n {\n return $this->array;\n }",
"public function inArrayDataProvider() {}",
"public function limpaArrayIdsObjetosManipulados()\n {\n \t// limpando o array de ids de objetos manipulados\n \t$this->_arrayObjetosManipulados = array();\n }",
"public function getArrayCopy()\n {\n \treturn get_object_vars($this);\n }",
"public static function offset($offset);",
"public function testArrayAccessMapsToCorrectMethods()\n {\n $c = new Container;\n\n $c['League\\Container\\Test\\Asset\\Baz'] = 'League\\Container\\Test\\Asset\\Baz';\n\n $this->assertInstanceOf('League\\Container\\Test\\Asset\\Baz', $c['League\\Container\\Test\\Asset\\Baz']);\n\n $this->assertTrue(isset($c['League\\Container\\Test\\Asset\\Baz']));\n\n unset($c['League\\Container\\Test\\Asset\\Baz']);\n\n $this->assertFalse(isset($c['League\\Container\\Test\\Asset\\Baz']));\n }",
"function getDatosInArray(){ if($this->mSocioIniciado == false ){ $this->init(); } \treturn $this->mDSocioByArray;\t}",
"public function keepItemsInArrayCanUseClosure() {}",
"function test_getArrayByName() {\r\n\t\t$rowset = array(array(\"memberClassId\" => 1, \"memberClassName\" => \"reader\"),\r\n\t\t\t\tarray(\"memberClassId\" => 2, \"memberClassName\" => \"nosher\"));\r\n\t\t$myArray = MemberClassesDB::getArray($rowset, \"memberClassName\", \"memberClassId\");\r\n\t\t$this->assertEqual($myArray['reader'], 1, \r\n\t\t \"Should return 1 for key of reader but returned \".$myArray['reader']);\r\n\t\t$this->assertEqual($myArray['nosher'], 2,\r\n\t\t\t\t\"Should return 2 for key of nosher but returned \".$myArray['nosher']);\r\n\t}",
"public function convertItemArray() {}",
"function current(){ \r\n\t return current($this->array); \r\n\t }",
"public function testAppendToMaxSizeWithAccess()\n {\n $array = new \\ComplexPie\\CacheArray();\n $max = \\ComplexPie\\CacheArray::MAX_CACHE_SIZE;\n for ($i = 0; $i < $max; $i++)\n {\n $array[] = $i;\n $array[$i];\n }\n $this->assertSame($max, count($array));\n }",
"public function testArrayAccess() {\n\t\t$session = $this->getSession();\n\t\t$this->assertFalse(isset($session['test']), 'Test key is set for new empty session');\n\t\t$this->assertNull($session['test'], 'Not set key is not null');\n\t\t$session['test'] = 'testValue';\n\t\t$this->assertTrue(isset($session['test']), 'Test key is not set');\n\t\t$this->assertSame('testValue', $session['test'], 'Test key is not correctly set');\n\t\tunset($session['test']);\n\t\t$this->assertFalse(isset($session['test']), 'Test key is set after deleting');\n\t\t$this->assertNull($session['test'], 'Deleted key is not null');\n\t}",
"public function asArray() : array\n {\n return $this->a;\n }",
"function object_array($object){\r\n\t$table_name = $object->gettablename();\r\n\t$arr_column = $object->getcolumnnames();\r\n\t$arr_object = array();\r\n\t$arr = $object->searchbyobject(NULL, NULL, TRUE);\r\n\r\n\tswitch($table_name){\r\n\t\tcase \"itpedido_conf\": $table_name = \"itpedidoconf\";\r\n\t\t\tbreak;\r\n\t}\r\n\r\n\tif(is_array($arr)){\r\n\t\tforeach($arr as $row){\r\n\t\t\t$ob = objectbytable($table_name, NULL, $object->getconnection());\r\n\t\t\tforeach($arr_column as $column){\r\n\t\t\t\t@call_user_func(array($ob, \"set\".$column), $row[$column]);\r\n\t\t\t}\r\n\t\t\t$arr_object[] = $ob;\r\n\t\t}\r\n\t}\r\n\treturn $arr_object;\r\n}",
"public function testSetAndRetrieveArray(): void\n {\n $obj = new \\stdClass;\n $obj->animal = \"Frog\";\n $obj->mineral = \"Quartz\";\n $obj->vegetable = \"Spinach\";\n $arr = array(\n \"testInt\" => 5,\n \"testFloat\" => 3.278,\n \"testString\" => \"WooHoo\",\n \"testBoolean\" => true,\n \"testNull\" => null,\n \"testArray\" => array(1, 2, 3, 4, 5),\n \"testObject\" => $obj\n );\n $key = \"TestArray\";\n $this->testNotStrict->set($key, $arr);\n $a = $this->testNotStrict->get($key);\n $bool = is_array($a);\n $this->assertTrue($bool);\n $this->assertEquals($arr['testInt'], $a['testInt']);\n $this->assertEquals($arr['testFloat'], $a['testFloat']);\n $this->assertEquals($arr['testString'], $a['testString']);\n $this->assertEquals($arr['testBoolean'], $a['testBoolean']);\n $this->assertNull($a['testNull']);\n $this->assertEquals($arr['testArray'], $a['testArray']);\n $this->assertEquals($arr['testObject'], $a['testObject']);\n }",
"public function testAssignrRightTypedValueToArray()\n {\n $array = new TypedObjectArray(ArrayObject::class);\n $array[] = new ArrayObject([1, 2, 3]);\n\n $this->assertEquals(1, $array->count());\n }",
"public /*void*/ function offsetSet(/*scalar*/ $offset, /*mixed*/ $value){}",
"function isIndexed() ;",
"function getIndex() ;",
"function offsetExists(/*. mixed .*/ $object_){}",
"abstract function extract(): array;",
"public function getArrayCopy(){\n return get_object_vars($this);\n }",
"public function getArrayCopy(){\n return get_object_vars($this);\n }"
]
| [
"0.668186",
"0.64050984",
"0.6330931",
"0.6324384",
"0.63142866",
"0.62917775",
"0.62665254",
"0.617188",
"0.612675",
"0.612675",
"0.61252725",
"0.5932319",
"0.5932319",
"0.59009784",
"0.59009784",
"0.5882586",
"0.58699554",
"0.5847204",
"0.58333457",
"0.5818553",
"0.579503",
"0.5790758",
"0.5767863",
"0.5767863",
"0.57527643",
"0.57478595",
"0.5730024",
"0.5730024",
"0.570456",
"0.57043415",
"0.5698938",
"0.5698938",
"0.5680928",
"0.56802773",
"0.5669328",
"0.56577986",
"0.5650143",
"0.5639717",
"0.5613423",
"0.55836725",
"0.55805075",
"0.5567052",
"0.55618024",
"0.55546397",
"0.55410796",
"0.5522124",
"0.5521534",
"0.5521534",
"0.5495457",
"0.54954034",
"0.54799145",
"0.54725856",
"0.5472154",
"0.5463386",
"0.5450546",
"0.54487807",
"0.54465353",
"0.54343885",
"0.5429066",
"0.5422222",
"0.5421712",
"0.5419179",
"0.54167044",
"0.53966206",
"0.53882474",
"0.53867495",
"0.53867495",
"0.53867495",
"0.53867495",
"0.53867495",
"0.53867495",
"0.53844506",
"0.5368255",
"0.53677726",
"0.5353776",
"0.53385025",
"0.5330767",
"0.53243876",
"0.53226894",
"0.5321261",
"0.53172505",
"0.5313021",
"0.53087854",
"0.529883",
"0.5294576",
"0.5293225",
"0.5291203",
"0.5285537",
"0.5273218",
"0.52726513",
"0.5269426",
"0.5269338",
"0.5267696",
"0.52668315",
"0.5264722",
"0.5263893",
"0.5238549",
"0.52306515",
"0.52306193",
"0.52268267",
"0.52268267"
]
| 0.0 | -1 |
This method run command. | public function run($textCommand); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function run(Command $command);",
"public function run($command);",
"public function run($command);",
"abstract public function run($command);",
"function run($command);",
"public function run(string $command);",
"public function run(): void\n {\n $this->command->execute();\n }",
"protected function callCommandMethod() {}",
"public function run($command)\n {\n passthru($command);\n }",
"public function run(){}",
"public function execute()\n {\n if ($this->escape !== false) {\n $this->options = $this->escape($this->options);\n }\n $command = $this->builder->build($this->options);\n\n exec($command);\n }",
"public function run()\n {\n $this->command->info(\" create Follows loading ... \");\n $this->default_();\n }",
"public function run(){\n $argumentAnalyzer = new CommandAnalyzer($this->config, $this->recordMigrator, $this->command);\n $argumentAnalyzer->executeArgs();\n }",
"public function execute()\n {\n $this->run();\n }",
"public function run()\n {\n $this->command->info('Creating user permissions');\n $genericUser=Permission::create([\n 'name' => 'users',\n 'slug' => [\n 'create' => false,\n 'view' => true,\n 'view.specific' =>true,\n 'edit' => false,\n 'approve' => false,\n 'delete' => false,\n ],\n 'description' => 'generic permission regarding users'\n ]);\n $secretaryUser = Permission::create([\n 'name' => 'users.secretary',\n 'slug' => [\n 'create' => true,\n 'edit' => true,\n 'approve' => true,\n 'delete' => true,\n ],\n 'inherit_id' => $genericUser->getKey(),\n 'description' => 'secretary permission regarding users'\n ]);\n $this->command->info('Assigning them to roles');\n $roles=Role::all();\n foreach($roles as $r){\n if($r->slug=='secretary'){\n $r->assignPermission('users.secretary');\n }else{\n $r->assignPermission('users');\n }\n }\n }",
"public function run(): void\n {\n $this->console->run();\n }",
"public function run()\n {\n echo \"run\";\n }",
"public function run()\n {\n $this->command->line(\"\");\n $this->command->line(\"##################################################################################\");\n $this->command->line(\"A criar departamentos...\");\n $this->command->line(\"##################################################################################\");\n\n $this->faker = Faker\\Factory::create('pt_PT');\n\n $this->adicionarDepartamento($this->faker, 'Engenharia Informatica', 'EI');\n $this->adicionarDepartamento($this->faker, 'Matematica', 'MAT');\n \n }",
"public function execute() {\n\t\t$this->command->execute($this->arguments, $this->flags);\n\t}",
"private function command(){\n\n // $processAssets->run(function ($type, $buffer) {\n // $this->output->writeln(\n // $buffer\n // );\n // });\n\n $process = new Process(explode(' ', 'php '.$this->params->get('kernel.project_dir').'/bin/console ecommerce:indexservice:bootstrap --create-or-update-index-structure'), null, null, null, 900);\n\n $process->run(function ($type, $buffer) {\n $this->output->writeln(\n $buffer\n );\n });\n\n $process1 = new Process(explode(' ', 'php '.$this->params->get('kernel.project_dir').'/bin/console ecommerce:indexservice:bootstrap --update-index'), null, null, null, 900);\n\n $process1->run(function ($type, $buffer) {\n $this->output->writeln(\n $buffer\n );\n });\n }",
"public function command(Command $command);",
"public function execute()\n\t{\n\t\t$this->run();\n\t}",
"public function run()\n {\n // $this->call\n }",
"public function run($command) {\n\t\treturn logiksRunCmd($command,$this->repoPath);\n\t}",
"public function runCommand($cmd)\n {\n //excecuting\n echo \"'\".$cmd.\"' command executed.\\n\";\n }",
"protected function __run() {\n\n\t\t$validCommands = array('a', 'c', 'e', 'f', 'g', 'r', 't', 'u', 'q');\n\n\t\twhile (empty($this->command)) {\n\t\t\t$this->out(\"Packages Shell\");\n\t\t\t$this->hr();\n\t\t\t$this->out(\"[C]haracterize Packages\");\n\t\t\t$this->out(\"[E]xistence Check\");\n\t\t\t$this->out(\"[F]ix Repository Urls\");\n\t\t\t$this->out(\"[G]it Clone Repositories\");\n\t\t\t$this->out(\"[R]eset Characteristics\");\n\t\t\t$this->out(\"[U]pdate Attributes\");\n\t\t\t$this->out(\"[Q]uit\");\n\t\t\t$temp = $this->in(\"What command would you like to perform?\", $validCommands, 'i');\n\t\t\tif (in_array(strtolower($temp), $validCommands)) {\n\t\t\t\t$this->command = $temp;\n\t\t\t} else {\n\t\t\t\t$this->out(\"Try again.\");\n\t\t\t}\n\t\t}\n\n\t\tswitch ($this->command) {\n\t\t\tcase 'c' :\n\t\t\t\t$this->characterize();\n\t\t\t\tbreak;\n\t\t\tcase 'e' :\n\t\t\t\t$this->existenceCheck();\n\t\t\t\tbreak;\n\t\t\tcase 'f' :\n\t\t\t\t$this->fixRepositoryUrls();\n\t\t\t\tbreak;\n\t\t\tcase 'g' :\n\t\t\t\t$this->gitCloneRepositories();\n\t\t\t\tbreak;\n\t\t\tcase 'r' :\n\t\t\t\t$this->resetCharacteristics();\n\t\t\t\tbreak;\n\t\t\tcase 'u' :\n\t\t\t\t$this->update_attributes();\n\t\t\t\tbreak;\n\t\t\tcase 'q' :\n\t\t\t\t$this->out(__(\"Exit\"));\n\t\t\t\t$this->_stop();\n\t\t\t\tbreak;\n\t\t}\n\t}",
"public function run() {}",
"abstract protected function executeCommand();",
"public function run() {\n }",
"public function run() {\n }",
"abstract function command();",
"public function run()\n {\n\n parent::run();\n\n }",
"public function run()\n {\n }",
"public function run()\n {\n $this->console->setAutoExit(false);\n\n return $this->console->run(new ArgvInput());\n }",
"public function run() {\n if (count($this->argv) <= 1) {\n echo \"No input command text file provided.\\n\";\n }\n foreach($this->argv as $key => $filePath) {\n if ($key === 0) {\n //Skipping first argument received from console as it is the filename of the script\n continue;\n }\n try {\n $this->executeCommands($this->getCommands($filePath));\n } catch (CommandFileNotFoundException $e) {\n echo $e->getMessage() . \"\\n\";\n }\n }\n }",
"public function run()\n {\n $args = $this->getArguments();\n\n // Validate argument was passed\n if (empty($args)) {\n throw new Exception(self::signature . ' requires an argument.');\n }\n\n $this->arg = new MakeCmdArgument($args[0]);\n\n $this->createSubDirectories();\n $this->createCommandFile();\n }",
"public function run()\n {\n $this->command->info('Begin Init base data.');\n\n $this->initAttr();\n $this->initSum();\n $this->initEnum();\n $this->initTags();\n $this->initSysBadge();\n $this->initSysTaskTag();\n $this->initSysUserSkill();\n $this->initUser();\n// $this->initSysIpSurvey();\n $this->command->info('All base data is ok!');\n }",
"public static function run() {\n\t}",
"function run(string $command): void\n{\n $out = shell_exec($command);\n\n echo \">>> \" . $command . PHP_EOL;\n echo trim((string) $out);\n}",
"public function run()\n {\n $this->command->info('Por favor espere, actualizando la data...');\n\n $this->call('rolesSeeder');\n $this->call('usersSeeder');\n $this->call('permisoSeeder');\n $this->call('rolpermisosSeeder');\n\n $this->command->info('Completada la actualización de la data !');\n }",
"public function command()\n {\n $imdbTitle = implode(' ', $this->arguments);\n $imdbTitle = preg_replace('/\\s\\s+/', ' ', $imdbTitle);\n $imdbTitle = trim($imdbTitle);\n $imdbTitle = urlencode($imdbTitle);\n\n if (!strlen($imdbTitle)) {\n $this->say(sprintf('Enter movie title. (Usage: !imdb movie title)'));\n return;\n }\n\n $apiUri = sprintf($this->apiUri, $imdbTitle);\n $getJson = $this->fetch($apiUri);\n\n $json = json_decode($getJson, true);\n\n $title = $json[0]['title'];\n $rating = $json[0]['rating'];\n $imdbUrl = $json[0]['imdb_url'];\n\n /*\n * Check if response is given\n */\n if (!strlen($title)) {\n $this->say('IMDB: Error fetching data');\n return;\n }\n\n $this->say(sprintf('Title: %s | Rating: %s | %s', $title, $rating, $imdbUrl));\n }",
"private function execute()\n\t{\n\t\t// set working dir and cli path\n\t\t$this->workingDir = getcwd();\n\t\t$this->cliPath = $this->argv[0];\n\n\t\t// get home directory\n\t\t$this->getHomeDir();\n\t}",
"public function run()\r\n {\r\n\r\n }",
"public function run()\n\t{\n\t\t//\n\t}",
"public function run()\n {\n }",
"public function run()\n {\n }",
"public function run()\n {\n }",
"public function run()\n {\n //\n }",
"public function run()\n {\n //\n }",
"public function run();",
"public function run();",
"public function run();",
"public function run();",
"public function run();",
"public function run();",
"public function run();",
"public function run();",
"public function run();",
"public function run();",
"public function run();",
"public function run();",
"public function run();",
"public function run();",
"public function run();",
"public function run();",
"public function command($m){}",
"public function run()\n {\n //\n \n }",
"public function run()\n\t{\n\t\tModel::unguard();\n\n\t\t$this->call('PenggunaSeeder');\n\t\t$this->command->info('Pengguna ditambahkan');\n\t\t$this->call('StatusSeeder');\n\t\t$this->command->info('Status ditambahkan');\n\t\t$this->call('TemplateSeeder');\n\t\t$this->command->info('Template ditambahkan');\n\t\t$this->call('JenisIzinSeeder');\n\t\t$this->command->info('Jenis Izin ditambahkan');\n\t\t$this->call('TemplateIzinSeeder');\n\t\t$this->command->info('Template Izin ditambahkan');\n\t\t$this->call('IzinSeeder');\n\t\t$this->command->info('Izin ditambahkan');\n\t\t$this->call('DokumenSeeder');\n\t\t$this->command->info('Dokumen ditambahkan');\n\t}",
"public function run()\n {\n {\n $this->command->info('####### ATENÇÃO! #######');\n $this->command->info('- LOGO ABAIXO, SERÁ CRIADO A PRIMEIRA ORGANIZAÇÃO MILITAR');\n $this->command->info('- APÓS O CADASTRO, É IMPORTANTE QUE TERMINE DE PREENCHER OS DADOS VIA SISTEMA');\n $this->command->info('########################');\n $descricao = $this->command->ask('# 1 - Digite o nome completo da OM');\n $nome = $this->command->ask('# 2 - Digite o nome abreviado da OM');\n $codom = $this->command->ask('# 3 - Digite o CODOM da OM');\n\n $om = new Cad_om;\n\t\t\t$om->nome = strtoupper(trim($nome));\n\t\t\t$om->descricao = strtoupper(trim($descricao));\n\t\t\t$om->codom = $codom;\n\t\t\t$om->cep = \"0000-000\";\n\t\t\t$om->datafile = base64_encode($nome);\n\t\t\t$om->save();\n\n DB::table('cad_militar')->insert([\n 'nome' => strtoupper($descricao),\n 'nome_guerra' => strtoupper(\"viatura militar\"),\n 'ident_militar' => $codom,\n 'cep' => '0000-000',\n 'om_id' => $om->id,\n 'posto' => 34,\n 'status' => 1,\n 'datafile' => base64_encode($nome)\n ]);\n\n $this->command->info('####### ATENÇÃO! #######');\n $this->command->info('- NÃO ESQUEÇA DE ACESSAR O SISTEMA PARA COMPLETAR OS DEMAIS DADOS');\n $this->command->info('####### OM CRIADA COM SUCESSO! #######');\n }\n }",
"function run() {\n echo $this->name . \" runs<br>\";\n }",
"public function run()\n {\n $items = $this->app->args->getParams('wild');\n list($proj, $env) = SettingFiles::extractProjEnv($items);\n\n $key = $proj . \".\" . $env;\n if (!Check::fileExists($key)) {\n $msg = Facilitator::onNoFileFound($proj, $env);\n \n $this->app->display($msg, 0);\n return;\n }\n\n $settings = SettingFiles::getObject($key);\n $rsync = new Rsync($settings);\n\n $msg = Facilitator::rsyncBanner($proj, $env, $rsync->cmd);\n $this->app->inline($msg);\n\n if ($this->app->args->simulate) {\n $msg = 'Simulation mode' . \"\\n\";\n\n $this->app->display($msg, 0);\n return;\n }\n\n $rsync->run();\n }",
"public function execute()\n\t{\n\t\t$this->output = $this->output->getHelpOutput();\n\t\t$this->help();\n\t\t$this->output->render();\n\t}",
"public function run()\n {\n $steps = ['listcatimage','listcatthumb'];\n //get argument passed to shell script\n $step = $this->getArg('step');\n if (in_array($step, $steps)) {\n $this->$step();\n } else {\n echo \"STEP MUST BE ONE OF THESE:\\n\";\n foreach ($steps as $s) {\n echo $s.\",\\n\";\n }\n }\n }",
"public function run()\n {\n\n }",
"public function run()\n {\n\n }",
"public function run()\n {\n\n }",
"protected function runCommand($parsed)\n {\n // Generate models\n $this->generateModels($parsed['modelList']->all());\n }",
"public function run()\n {\n \n }",
"public function run()\n {\n \n }",
"public function iRun($command)\n {\n if (file_exists('build/structure.xml')) {\n unlink('build/structure.xml');\n }\n exec($command.' 2>&1', $this->output, $this->return_code);\n $this->output = implode(\"\\n\", $this->output);\n }",
"function run() {\n echo $this->name . \" runs like crazy. Him fast<br>\";\n }",
"function execute() {\n\t\tif (empty($this->args)) {\n\t\t\t$this->__interactive();\n\t\t}\n\n\t\tif (count($this->args) == 1) {\n\t\t\t$this->__interactive($this->args[0]);\n\t\t}\n\n\t\tif (count($this->args) > 1) {\n\t\t\t$type = Inflector::underscore($this->args[0]);\n\t\t\tif ($this->bake($type, $this->args[1])) {\n\t\t\t\t$this->out('done');\n\t\t\t}\n\t\t}\n\t}",
"public function run()\n {\n $this->dev();\n $this->mike();\n $this->commenter();\n }",
"function run()\n {\n if (count($this->args) <= 1) {\n $this->help();\n } else {\n switch ($this->args[1]) {\n case \"migrate\":\n $this->createMigrations();\n if (!isset($this->args[2]) || $this->args[2] != '--seed')\n break;\n case \"seed\":\n $this->createSeeds();\n break;\n case \"migrate:drop\":\n $this->dropMigrations();\n break;\n case \"seed:drop\":\n $this->dropSeeds();\n break;\n default:\n $this->help();\n break;\n }\n }\n }",
"public function run(): void\n {\n //\n }",
"public function getCommand() {}",
"public function run(): void\n {\n }",
"function run() {\n $this->model->run();\n }",
"public abstract function run();",
"public abstract function run();",
"public function execute(Command $command): void;",
"abstract public function run($command, $withInteraction = false, $returnOutput = false);",
"public function run()\n {\n passthru('cd ' . realpath($this->basedir) . ' && git pull origin master && curl -sS https://getcomposer.org/installer | php && php composer.phar install && git remote update && cd -');\n }",
"public function run()\n {\n $bar = $this->command->getOutput()->createProgressBar(10);\n $this->command->info('Seeding Donor...');\n Donor::factory()->count(20)->create()->each(function () use ($bar) {\n $bar->advance();\n });\n $bar->finish();\n $this->command->info(' Donor Seeded!'); }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $this->call('smUserTableSeeder');\n $this->call('smUnitTableSeeder');\n $this->command->info('Seeded!');\n }",
"public function run($command) {\n\t\t\treturn shell_exec($this->command_prefix.Git::get_bin() . \" \" . $command . ' 2>&1');\n\t\t}",
"public function run()\n {\n $permisos = [\n //usuarios\n 'ver-usuario',\n 'crear-usuario',\n 'editar-usuario',\n 'borrar-usuario',\n //tabla roles\n 'ver-rol',\n 'crear-rol',\n 'editar-rol',\n 'borrar-rol',\n //tabla productos\n 'ver-producto',\n 'crear-producto',\n 'editar-producto',\n 'borrar-producto',\n //tabla categorias\n 'ver-categoria',\n 'crear-categoria',\n 'editar-categoria',\n 'borrar-categoria',\n \n ];\n foreach($permisos as $permiso){\n Permission::create(['name'=>$permiso]);\n }\n }",
"public function run()\n {\n $this->user();\n }",
"public function run()\n {\n Model::unguard();\n\n $this->command->info('Here we go!');\n $this->call('SeedRootUser');\n }",
"function run() {\n\t\techo $this->name . \" runs like crazy </br>\";\n\t}"
]
| [
"0.7746398",
"0.7721657",
"0.7721657",
"0.7632458",
"0.7582934",
"0.7540369",
"0.72475296",
"0.6958211",
"0.68986285",
"0.683645",
"0.6796243",
"0.6772459",
"0.67614365",
"0.67467636",
"0.67436373",
"0.66880524",
"0.6650492",
"0.6636721",
"0.6634211",
"0.6632227",
"0.662773",
"0.6622687",
"0.6617664",
"0.6605918",
"0.65922076",
"0.6532808",
"0.65306485",
"0.6526905",
"0.65211344",
"0.64746094",
"0.6458204",
"0.64527667",
"0.6433062",
"0.6397994",
"0.63972914",
"0.6384483",
"0.63805276",
"0.6372236",
"0.63696164",
"0.63526213",
"0.6347793",
"0.6321101",
"0.63139987",
"0.63126516",
"0.6311928",
"0.6311928",
"0.6311928",
"0.63051367",
"0.63051367",
"0.6304918",
"0.6304918",
"0.6304918",
"0.6304918",
"0.6304918",
"0.6304918",
"0.6304918",
"0.6304918",
"0.6304918",
"0.6304918",
"0.6304918",
"0.6304918",
"0.6304918",
"0.6304918",
"0.6304918",
"0.6304918",
"0.6299873",
"0.6280817",
"0.6278505",
"0.62765145",
"0.6272973",
"0.62678313",
"0.62577975",
"0.6238392",
"0.6237957",
"0.6237957",
"0.6237957",
"0.6237794",
"0.62305886",
"0.62305886",
"0.6227442",
"0.6223218",
"0.62206024",
"0.62098",
"0.6181072",
"0.6172372",
"0.6157052",
"0.61512977",
"0.61500394",
"0.61435294",
"0.61435294",
"0.6136732",
"0.611992",
"0.6111663",
"0.61087143",
"0.61063737",
"0.61045647",
"0.6080383",
"0.60798717",
"0.60725474",
"0.6069612"
]
| 0.68799025 | 9 |
Asserts that current service has no issues. | public function isGreen(): bool {
return $this->assertStatusIs('green');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function testGetNonExistentService()\n {\n $kraken = new Kraken(self::$tokenProvider);\n $nonExistentService = $kraken->nonExistentService;\n\n $this->assertNull($nonExistentService);\n }",
"protected function assertNoLogEntries() {}",
"public function testAddServiceAcknowledgementNotValidated()\n {\n $this->entityValidator->expects($this->once())\n ->method('validate')\n ->willReturn($this->violationList);\n\n $acknowledgementService = new AcknowledgementService(\n $this->acknowledgementRepository,\n $this->accessGroupRepository,\n $this->monitoringRepository,\n $this->engineService,\n $this->entityValidator\n );\n\n $this->expectException(ValidationFailedException::class);\n $acknowledgementService->addServiceAcknowledgement($this->serviceAcknowledgement);\n }",
"public function testInExistentScope()\n {\n $this->expectException(\\BadMethodCallException::class);\n\n $foos = $this->app->make(FooRepository::class);\n $foos->isNotActive()->get();\n }",
"function messageNoUsers()\n {\n $this->get('/usuarios?empty')\n ->assertStatus(200)\n ->assertSee('No hay usuarios registrados');\n }",
"public function prevent_showing_a_nonexistent_service()\n {\n // get a random user\n $user = $this->getRandomUser('super-admin');\n\n // act as the user we got and request the create_new_article route\n $response = $this->actingAs($user)->get(route('service.show', ['id' => 100]));\n\n $response->assertSessionHas('flash_error_message', 'Unable to find Services to display.');\n }",
"public function testDisacknowledgeServiceNotFoundService()\n {\n $this->monitoringRepository->expects($this->once())\n ->method('findOneservice')\n ->willReturn(null);\n\n $acknowledgementService = new AcknowledgementService(\n $this->acknowledgementRepository,\n $this->accessGroupRepository,\n $this->monitoringRepository,\n $this->engineService,\n $this->entityValidator\n );\n\n $this->expectException(EntityNotFoundException::class);\n $acknowledgementService->disacknowledgeService(1, 1);\n }",
"public function testDisacknowledgeServiceSucceed()\n {\n $this->monitoringRepository->expects($this->once())\n ->method('findOneService')\n ->willReturn($this->service);\n $this->monitoringRepository->expects($this->once())\n ->method('findOneHost')\n ->willReturn($this->host);\n $this->acknowledgementRepository->expects($this->once())\n ->method('findLatestServiceAcknowledgement')\n ->willReturn($this->hostAcknowledgement);\n\n $acknowledgementService = new AcknowledgementService(\n $this->acknowledgementRepository,\n $this->accessGroupRepository,\n $this->monitoringRepository,\n $this->engineService,\n $this->entityValidator\n );\n\n $this->assertNull($acknowledgementService->disacknowledgeService(1, 1));\n }",
"public function testServiceIsNotLoaded()\n {\n $di = new \\Anax\\DI\\DI();\n $di->get(\"nosuchservice\");\n }",
"public function testDoesNotThrowOnSuccess(): void\n {\n /** @noinspection UnnecessaryAssertionInspection */\n /** @noinspection PhpVoidFunctionResultUsedInspection */\n /** @noinspection PhpUnhandledExceptionInspection */\n $this->assertNull(ApiErrorHandler::check(['success' => true], 200));\n }",
"public function testHasViolations_withNoViolations_isFalse() {\n $this->assertFalse($this->report->hasViolations());\n }",
"public function testFailedCount()\n {\n $this->mockHandler->append(new Response(503));\n\n $issueCount = $this->issueCounter->getCounts(\n [],\n [\n 'test' => [],\n ]\n );\n\n $this->assertNull($issueCount['test']);\n }",
"public function testStateIssuedCorrectly()\n {\n $this->assertNull($this->state->issue());\n }",
"public function testHasUndefinedViolations_withNoViolations_isFalse()\n {\n $this->assertFalse($this->report->hasUndefinedViolations());\n }",
"public function testNone()\n {\n $manifold = new Manifold;\n $manifold->log('error', 'Hello o oo Anyone there e ee???');\n\n $this->addToAssertionCount(1); // No assertions by design\n }",
"public function testAddServiceAcknowledgementNotFoundService()\n {\n $this->entityValidator->expects($this->once())\n ->method('validate')\n ->willReturn(new ConstraintViolationList([]));\n $this->monitoringRepository->expects($this->once())\n ->method('findOneService')\n ->willReturn(null);\n\n $acknowledgementService = new AcknowledgementService(\n $this->acknowledgementRepository,\n $this->accessGroupRepository,\n $this->monitoringRepository,\n $this->engineService,\n $this->entityValidator\n );\n\n $this->expectException(EntityNotFoundException::class);\n $acknowledgementService->addServiceAcknowledgement($this->serviceAcknowledgement);\n }",
"protected function assertServerNotRunning(): void\n {\n if (false === $this->useExternalServerProcess) {\n $this->assertFalse($this->process->isRunning(), 'Server process is still running');\n }\n }",
"private function assert_not_running(): void\n\t{\n\t\tif ($this->status >= self::STATUS_RUNNING)\n\t\t{\n\t\t\tthrow new ApplicationAlreadyRunning;\n\t\t}\n\t}",
"public function checkStatusCacheMiss()\n {\n $ticket = 'ticketkey';\n $userId = 'userid';\n\n $mockScaleEngine = $this->_getMockScaleEngineClientDoesNothing();\n $mockCacheItem = $this->_getMockCacheItemMisses();\n $mockCache = $this->_getMockCacheThatReturnsItem($userId, $mockCacheItem);\n\n $ticketManager = new ScaleEngineTicketManager($mockScaleEngine, $mockCache);\n\n $ticketStatus = $ticketManager->checkStatus($userId, $ticket);\n\n $this->assertSame(\n [\n 'type' => TicketStatus::TYPE_UNKNOWN_ERROR,\n 'ticket' => null,\n 'playable' => false,\n 'error' => 'missing-ticket',\n ],\n $ticketStatus->toArray()\n );\n }",
"public function testLibraryGetErrorForNonRegisteredService(): void\r\n {\r\n $serviceLibrary = new ServiceLibrary(new ArrayParser());\r\n $this->assertFalse($serviceLibrary->has('AdditionalService'));\r\n\r\n $this->expectExceptionCode(Error::ERROR_SERVICE_NOT_FOUND->getCode());\r\n $serviceLibrary->get('AdditionalService');\r\n }",
"public function testReturnEmptyResponse(): void\n {\n $repository = $this->prepareRepository(new stdClass());\n\n $this->assertEmpty(\n $repository->findForCamp(self::CAMP_ID),\n );\n }",
"public function test_receive_throwsServiceUnavailable_ifNoService()\n\t{\n\t\t$this->setExpectedException('Jstewmc\\\\Api\\\\Exception\\\\ServiceUnavailable');\n\t\t\n\t\t(new Client())\n\t\t\t->send(new Request\\Get('http://x.x.x.x'))\n\t\t\t->receive(new Response\\Json());\n\t\t\n\t\treturn;\n\t}",
"public function testTestStatusMissingBadToken()\n {\n // create review record for change 1\n $this->createChange();\n $review = Review::createFromChange('1')->save();\n\n // ensure starting test status of null.\n $this->assertSame($review->get('testStatus'), null);\n\n // dispatch and check output with no token\n $this->dispatch('/reviews/2/tests/fail');\n $result = $this->getResult();\n $this->assertRoute('review-tests');\n $this->assertResponseStatusCode(403);\n\n // dispatch and check output with bad token\n $this->dispatch('/reviews/2/tests/fail/FFFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF');\n $result = $this->getResult();\n $this->assertRoute('review-tests');\n $this->assertResponseStatusCode(403);\n }",
"public function testHasFailedReturnsFalse(): void\n {\n $this->assertFalse($this->class->has_failed());\n }",
"public function testHasFailedReturnsFalse(): void\n {\n $this->assertFalse($this->class->has_failed());\n }",
"public function testEmpty()\n {\n $fpsInboundNotification = new FpsInboundNotification();\n\n $this->assertTrue($fpsInboundNotification instanceof FpsInboundNotification);\n }",
"public function testAddServiceAcknowledgementNotFoundHost()\n {\n $this->entityValidator->expects($this->once())\n ->method('validate')\n ->willReturn(new ConstraintViolationList([]));\n $this->monitoringRepository->expects($this->once())\n ->method('findOneService')\n ->willReturn($this->service);\n $this->monitoringRepository->expects($this->once())\n ->method('findOneHost')\n ->willReturn(null);\n\n $acknowledgementService = new AcknowledgementService(\n $this->acknowledgementRepository,\n $this->accessGroupRepository,\n $this->monitoringRepository,\n $this->engineService,\n $this->entityValidator\n );\n\n $this->expectException(EntityNotFoundException::class);\n $acknowledgementService->addServiceAcknowledgement($this->serviceAcknowledgement);\n }",
"public function testMaintenanceUnset()\n {\n// $this->commandTester->execute(\n// [\n// 'command' => $this->maintenanceCommand->getName(),\n// ToggleMaintenanceCommand::MAINTENANCE_PARAMETER => 0,\n// ]\n// );\n//\n// $this->assertFalse(\n// $this\n// ->filesystem\n// ->exists($this->exposedDir . DIRECTORY_SEPARATOR . ToggleMaintenanceCommand::FILE_NAME)\n// );\n//\n// $this->client->request('GET', '/');\n// $this->assertEquals(Response::HTTP_OK, $this->client->getResponse()->getStatusCode());\n }",
"public function test_it_should_return_empty_results(): void\n {\n $response = $this->get(route('api.owners.index'));\n\n $response->assertStatus(200)\n ->assertJsonCount(0, 'data');\n }",
"public function testNothing()\n {\n $this->markTestIncomplete('This test has not been implemented yet.');\n }",
"public function testHasMajorViolations_withNoViolations_isFalse()\n {\n $this->assertFalse($this->report->hasMajorViolations());\n }",
"public function testDisacknowledgeServiceNotFoundAcknowledgement()\n {\n $this->monitoringRepository->expects($this->once())\n ->method('findOneService')\n ->willReturn($this->service);\n $this->monitoringRepository->expects($this->once())\n ->method('findOneHost')\n ->willReturn($this->host);\n $this->acknowledgementRepository->expects($this->once())\n ->method('findLatestServiceAcknowledgement')\n ->willReturn(null);\n\n $acknowledgementService = new AcknowledgementService(\n $this->acknowledgementRepository,\n $this->accessGroupRepository,\n $this->monitoringRepository,\n $this->engineService,\n $this->entityValidator\n );\n\n $this->expectException(AcknowledgementException::class);\n $acknowledgementService->disacknowledgeService(1, 1);\n }",
"public function noAssertionsMade()\n {\n foreach (class_parents($this) as $parent) {\n if (method_exists($parent, 'expectNotToPerformAssertions')) {\n parent::expectNotToPerformAssertions();\n return;\n }\n }\n\n $this->assertTrue(true);\n }",
"public function testValidationDefaultNoAnyFields()\r\n {\r\n $data = $this->getCorrectData();\r\n unset($data['name']);\r\n unset($data['locked']);\r\n unset($data['ref_artifact_id']);\r\n unset($data['status']);\r\n $artifact = $this->Artifacts->newEntity($data);\r\n $this->assertEmpty($artifact->errors());\r\n }",
"public function runningInFreeMode(): void\n {\n self::assertEquals(false, $this->subject->runningInFreeMode());\n }",
"public function testGetDomainIssues()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }",
"public function testAddHostAcknowledgementNotValidated()\n {\n $this->entityValidator->expects($this->once())\n ->method('validate')\n ->willReturn($this->violationList);\n\n $acknowledgementService = new AcknowledgementService(\n $this->acknowledgementRepository,\n $this->accessGroupRepository,\n $this->monitoringRepository,\n $this->engineService,\n $this->entityValidator\n );\n\n $this->expectException(ValidationFailedException::class);\n $acknowledgementService->addHostAcknowledgement($this->serviceAcknowledgement);\n }",
"public function testNoAuth() : void\n {\n $response = $this->get(action('HomeController@index'));\n\n $response->assertStatus(200);\n }",
"public function testAssertFlashMessageWithoutSendingRequest(): void\n {\n $this->expectException(AssertionFailedError::class);\n $message = 'There is no stored session data. Perhaps you need to run a request?';\n $message .= ' Additionally, ensure `$this->enableRetainFlashMessages()` has been enabled for the test.';\n $this->expectExceptionMessage($message);\n\n $this->assertFlashMessage('Will not work');\n }",
"public function testGetReleasesReturnsEmptyArray()\n {\n $hostMock = $this->getMockBuilder(Host::class)\n ->disableOriginalConstructor()\n ->getMock();\n\n $workspace = new Workspace($hostMock);\n\n $this->assertInternalType('array', $workspace->getReleases());\n $this->assertEmpty($workspace->getReleases());\n }",
"protected function mustTestGetService()\n {\n return true;\n }",
"public function testPendingValidationNoMapping()\n {\n $this->executeCommand();\n $this->assertCount(0, $this->validateReceiver->getSent());\n $this->assertCount(0, $this->captureReceiver->getSent());\n $this->assertCount(0, $this->cancelReceiver->getSent());\n }",
"public function testClearErrors0()\n{\n\n $actual = $this->collecting->clearErrors();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}",
"public function testHasErrors0()\n{\n\n $actual = $this->collecting->hasErrors();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}",
"public function testNotPaid()\n {\n $this->browse(function (Browser $browser) {\n $bill = Bill::factory()->create([\n 'contract_id' => $this->contract->id,\n 'requisite_id' => $this->requisite->id,\n 'tenant_id' => $this->tenant->id,\n ]);\n $service = $bill->services()->save(Service::factory()->make([\n 'name' => 'Rent',\n 'quantity' => '2',\n 'measure' => 'pc',\n 'price' => '1234'\n ]));\n\n $browser->loginAs($this->user)\n ->visit('/tenants/'.$this->tenant->id.'?tab=bills#tab')\n ->press('Оплатить')\n ->assertSee('Недостаточно средств');\n });\n }",
"private function assert_not_booted(): void\n\t{\n\t\tif ($this->status >= self::STATUS_BOOTING)\n\t\t{\n\t\t\tthrow new ApplicationAlreadyBooted;\n\t\t}\n\t}",
"public function testMissing()\n {\n $result = $this->writedown->getService('api')->tag()->delete(mt_rand(1000, 9999));\n\n $this->assertFalse($result['success']);\n $this->assertEquals(['Not found.'], $result['data']);\n }",
"public function testIfMessagePullIsCreatedAfterGetError(): void\n {}",
"public function testHasViolation()\n {\n $this->assertFalse($this->uut->hasViolation());\n }",
"public function testGetNonExistingStore()\n {\n $response = $this->get('/shop/128', [\n 'Authorization' => \"bearer \" . $this->token\n ]);\n\n\n $response\n ->assertStatus(422)\n ->assertExactJson([\n \"success\" => 0,\n \"errors\" => [\"Requested shop does not exist.\"]\n ]);\n }",
"public function testMissingResourcesAreNotAllowed(): void\n {\n $items = Category::factory()->count(1)->create();\n\n Livewire::actingAs(User::factory()->admin()->create())\n ->test(CategoriesTable::class, ['items' => $items])\n ->emit('edit', $items[0]->id)\n ->set('editValues.groups', [100])\n ->emit('save')\n ->assertHasErrors(['editValues.groups.*'])\n ->assertDispatchedBrowserEvent('notify', function ($name, $data) {\n return data_get($data, 'level') === 'error';\n });\n\n $this->assertEquals(0, $items[0]->groups()->count());\n }",
"public function testGetImportedWorkflowsNone()\n {\n $this->clearFixtures();\n $importer = new WorkflowDefinitionImporter();\n $imports = $importer->getImportedWorkflows();\n $this->assertEmpty($imports);\n }",
"public function test_empty()\n {\n\n }",
"public function testZeroDiscipline()\n {\n $result = false;\n $student = new StudentProfile();\n $status = check24Discipline($student);\n if(count($status[\"reason\"]) == 0 && $status[\"result\"] == true)\n $result = true;\n $this->assertEquals(true, $result);\n }",
"private function checkServiceServiceSet () {\n if(is_null($this->serviceService)) {\n $this->exceptionWithResponseCode(500,\n \"Internal error: The service service has not been set. Please contact a GOCDB administrator and report this error.\"\n );\n }\n }",
"public function testRollbarLoggerInternalCheckIgnored(): 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::log(LogLevel::INFO, \"Testing PHP Notifier\");\n $this->assertVerboseLogContains('Occurrence ignored', LogLevel::INFO);\n\n \\error_reporting($errorReporting);\n }",
"public function failed()\n {\n // Do nothing\n }",
"public function testMissingParametersRemoveChecks() {\n $this->pingdom->removeChecks(null);\n }",
"public function providerTestWillNeverRun(): array {\n return [\n ['this_will_never_run'],\n ];\n }",
"public function test_example_empty()\n {\n $response = $this->get('/');\n $response->assertStatus(200);\n }",
"public function testGetEmptyErrorMessagesBeforeRunningValidation()\n {\n $this->assertEquals([], $this->validator->errors());\n }",
"public function testGetNotExistingServiceThrowsServiceNotFoundException()\n {\n $this->expectException(NotImplementedException::class);\n $this->factory->TotallyNotExistingService;\n }",
"public function testSuccessWithNoUsersToList()\n {\n $response = $this->getJson($this->endpoint(), $this->authenticationHeaders())->assertStatus(200);\n\n // Check the basic api endpoint structure.\n $this->assertEndpointBaseStructure($response);\n }",
"public function testValidationDefaultNoAnyFields()\r\n {\r\n $data = $this->getCorrectData();\r\n unset($data['locked']);\r\n unset($data['ref_artifact_id']);\r\n unset($data['deliverable_id']);\r\n unset($data['content']);\r\n unset($data['stamp']);\r\n $artifact = $this->Solids->newEntity($data);\r\n $this->assertEmpty($artifact->errors());\r\n }",
"static function isEmpty()\n {\n try {\n return call_user_func_array('PHPUnit_Framework_Assert::isEmpty', func_get_args());\n } catch (\\Exception $e) {\n self::callSlack($e, debug_backtrace()[1]);\n }\n }",
"public function test_assert_true_to_not_warning(): void\n {\n $this->assertTrue(true);\n }",
"public function test_send_returnsSelf_ifNoService()\n\t{\n\t\t$request = new Request\\Get('http://x.x.x.x');\n\t\t\n\t\t$client = new Client();\n\t\t\n\t\t$this->assertSame($client, $client->send($request));\n\t\t\n\t\treturn;\t\n\t}",
"public function test_individual_item_does_not_exist()\n {\n $response = $this->get(\"/item-detail/12\");\n $response->assertSeeText('Sorry! the item you are looking for does not exist');\n }",
"public function testServiceNotFoundException()\n {\n $this->expectException(ServiceNotFoundException::class);\n $client = $this->getClientWithServiceNotFoundExceptionMock();\n $channelService = new OpeningHoursService($client);\n $channelService->getDay(777, 666, '2020-01-02');\n }",
"public function testNothing(){\n $this->assertTrue(TRUE);\n }",
"public function testDisacknowledgeServiceAlreadyDisacknowledged()\n {\n $this->monitoringRepository->expects($this->once())\n ->method('findOneService')\n ->willReturn($this->service);\n $this->monitoringRepository->expects($this->once())\n ->method('findOneHost')\n ->willReturn($this->host);\n $serviceAcknowledgement = $this->serviceAcknowledgement->setDeletionTime(new \\DateTime());\n $this->acknowledgementRepository->expects($this->once())\n ->method('findLatestServiceAcknowledgement')\n ->willReturn($serviceAcknowledgement);\n\n $acknowledgementService = new AcknowledgementService(\n $this->acknowledgementRepository,\n $this->accessGroupRepository,\n $this->monitoringRepository,\n $this->engineService,\n $this->entityValidator\n );\n\n $this->expectException(AcknowledgementException::class);\n $acknowledgementService->disacknowledgeService(1, 1);\n }",
"public function testHasMinorViolations_withNoViolations_isFalse()\n {\n $this->assertFalse($this->report->hasMinorViolations());\n }",
"public function testHandleWithMockServicesUnset(): void\n {\n $this->mockService(stdClass::class, function () {\n return json_decode('{\"first\":true}');\n });\n $this->removeMockService(stdClass::class);\n\n $this->get('/dependencies/requiredDep');\n $this->assertResponseOk();\n $this->assertResponseNotContains('\"first\":true');\n }",
"public function testGetListOfAccountsWhenNoAccountsAreAvailable(){\n\n // WHEN\n $response = $this->get($this->_uri);\n\n // THEN\n $response->assertStatus(Response::HTTP_NOT_FOUND);\n $response_body_as_array = $response->json();\n $this->assertTrue(is_array($response_body_as_array));\n $this->assertEmpty($response_body_as_array);\n }",
"public function testGetViolation()\n {\n $this->assertNull($this->uut->getViolation());\n }",
"public function testEmptySubmission() {\n $application = new \\Mindgrub\\MTIP\\MTIPApplication();\n $result = $application->submit();\n\n $this->assertEquals(0, $result['status']);\n }",
"public function testValidationDefaultNoStatus()\r\n { \r\n $data = $this->getCorrectData();\r\n $data['status'] = NULL;\r\n $zoneProperty = $this->Solids->newEntity($data);\r\n $expectedResult = ['status' => [\r\n \"_empty\" => \"This field cannot be left empty\", \r\n ]\r\n ];\r\n $this->assertNotEmpty($zoneProperty->errors());\r\n $this->assertEquals($expectedResult, $zoneProperty->errors());\r\n }",
"public function testRollbarLoggerResponseStatusZero(): void\n {\n Rollbar::init([\n 'access_token' => $this->getTestAccessToken(),\n 'environment' => 'testing-php',\n 'verbose_logger' => $this->verboseLogger,\n 'check_ignore' => function () {\n return true;\n },\n ]);\n Rollbar::log(LogLevel::INFO, \"Testing PHP Notifier\");\n $this->assertVerboseLogContains('Occurrence rejected by the SDK:', LogLevel::ERROR);\n }",
"public function testSearchApiInvalid(): void\n {\n $response = $this->getJson('/api/search/stats');\n $response->assertStatus(422);\n }",
"public function testBuildCheckerBoard()\n {\n $this->markTestSkipped();\n }",
"public function idleCapacityZero(): void\n {\n config(['urlhub.hash_length' => 0]);\n\n $response = $this->post(route('su_create'), ['long_url' => 'https://laravel.com']);\n\n $response\n ->assertRedirectToRoute('home')\n ->assertSessionHas('flash_error');\n }",
"public function cantSeeFailNow() {\n return $this->getScenario()->runStep(new \\Codeception\\Step\\ConditionalAssertion('dontSeeFailNow', func_get_args()));\n }",
"public function testNotFound()\n {\n $response = $this->get('/api/get-info');\n\n $response->assertStatus(404);\n }",
"public function testMissingParametersUnpauseChecks() {\n $this->pingdom->unpauseChecks(null);\n }",
"public function testTestBindingsEmptyProvider(): void\n {\n $testCase = new LaravelServiceProviderTestCaseStub(\n [],\n EmptyServiceProviderStub::class\n );\n\n $testCase->testBindings();\n\n // If no exceptions occurred we're great.\n $this->addToAssertionCount(1);\n }",
"public function dontSeeFailNow() {\n return $this->getScenario()->runStep(new \\Codeception\\Step\\Assertion('dontSeeFailNow', func_get_args()));\n }",
"public function testGetInvalidStrainReviewByStrainReviewTxt() {\n\t\t// grab a strain review by searching for content that does not exist\n\t\t$strainReview = StrainReview::getStrainReviewByStrainReviewTxt($this->getPDO(), \"Dee Dee Dee, No Such Thing\");\n\t\t$this->assertCount(0, $strainReview);\n\t}",
"public function testPerformActionForExpiredBuilds()\n {\n }",
"public function testGetEntriesThatDoNotExist(){\n\n // WHEN\n $response = $this->get($this->_uri);\n\n // THEN\n $response->assertStatus(HttpStatus::HTTP_NOT_FOUND);\n $response_body_as_array = $response->json();\n $this->assertTrue(is_array($response_body_as_array));\n $this->assertEmpty($response_body_as_array);\n }",
"public function testActiveIsFalseWhenNotSet()\n {\n $sweepstake = new \\Entities\\Sweepstake;\n $this->assertSame(false, $sweepstake->isActive());\n }",
"public function testNothing()\n {\n }",
"public function testNoResult()\n {\n $this->mock(AlphaVantageApiService::class, function ($mock) {\n return $mock->shouldReceive('querySymbol')\n ->once()\n ->andReturn(new \\GuzzleHttp\\Psr7\\Response(\n Response::HTTP_OK,\n [],\n '{\n \"Global Quote\": {}\n }'\n ));\n });\n\n $response = $this->get('api/stock-quotes?symbol=123');\n $response->assertStatus(Response::HTTP_OK);\n $response->assertExactJson([]);\n }",
"public function testAddServiceAcknowledgementWhichSucceed()\n {\n $this->entityValidator->expects($this->once())\n ->method('validate')\n ->willReturn(new ConstraintViolationList([]));\n $this->monitoringRepository->expects($this->once())\n ->method('findOneService')\n ->willReturn($this->service);\n $this->monitoringRepository->expects($this->once())\n ->method('findOneHost')\n ->willReturn($this->host);\n $this->engineService->expects($this->once())\n ->method('addServiceAcknowledgement')\n ->willReturn(null);\n\n $acknowledgementService = new AcknowledgementService(\n $this->acknowledgementRepository,\n $this->accessGroupRepository,\n $this->monitoringRepository,\n $this->engineService,\n $this->entityValidator\n );\n\n $this->assertNull($acknowledgementService->addServiceAcknowledgement($this->serviceAcknowledgement));\n }",
"public function testIsInvalid()\n {\n $this->todo('stub');\n }",
"public function test_disable_tos_verify()\n {\n setting()->set('enable_terms_of_use', 0);\n $this->get('/terms-of-use')\n ->assertStatus(404);\n }",
"public function testFresh(){\n Session::flush();\n $status_message = $this->getStatus();\n $this->assertResponseOk();\n $this->assertTrue($status_message['message'] == 'no active session');\n }",
"public function testInvalidatedBeforeRun()\n\t{\n\t\t$config = $this->freshConfigWithEventBus();\n\t\t$collection = $this->freshCollectionWithConfig($config);\n\t\t$this->addDummyRulesToCollection(1, $collection, $config);\n\t\t$collection->notify(new OLPBlackbox_Event(OLPBlackbox_Event::EVENT_BLACKBOX_TIMEOUT));\n\t\t\n\t\t$is_valid = $collection->isValid(new OLPBlackbox_Data(), new OLPBlackbox_StateData());\n\t\t\n\t\t$this->assertFalse(\n\t\t\t$is_valid, \"Collection was notified of timeout, but remained valid.\"\n\t\t);\n\t}",
"public function testGetWebhookQueueAccountMessageEmpty()\n {\n $container = [];\n $sw = $this->createMockedSmartwaiver($container, APISuccessResponses::webhookQueueAccountMessageNull());\n\n $webhook = $sw->getWebhookQueueAccountMessage();\n $this->assertNull($webhook);\n\n $this->checkGetRequests($container, ['/v4/webhooks/queues/account?delete=false']);\n }",
"public function testMissingParametersModifyAllChecks() {\n $this->pingdom->modifyAllChecks(null);\n }",
"public function testNoDatabaseConnection() {\r\n $persistenceadapter = $this->getErrornousPersistenceAdapter();\r\n $this->setExpectedException('Exception');\r\n $persistenceadapter->getAll('AbstractPersistenceAdapterTestPersistentObject');\r\n }",
"public function testCasePropertyWithEmptyCase()\n {\n $this->caseManagement->expects(self::once())\n ->method('getByOrderId')\n ->willReturn(null);\n\n self::assertEquals(\n '',\n $this->caseInfo->getCaseGuaranteeDisposition()\n );\n }"
]
| [
"0.6519755",
"0.63063186",
"0.6145024",
"0.6114387",
"0.59439194",
"0.59321165",
"0.5819338",
"0.5811461",
"0.5809019",
"0.5801338",
"0.57895863",
"0.5784279",
"0.5778876",
"0.57485217",
"0.5720566",
"0.5718142",
"0.5710248",
"0.5705974",
"0.56998146",
"0.56921756",
"0.566926",
"0.56499183",
"0.5634497",
"0.5632506",
"0.5632506",
"0.5629497",
"0.5626937",
"0.5617698",
"0.56134003",
"0.5601572",
"0.56010365",
"0.5598502",
"0.55902976",
"0.55873096",
"0.5580429",
"0.5579406",
"0.5564575",
"0.55615795",
"0.55481976",
"0.55276984",
"0.5520304",
"0.5509188",
"0.5506445",
"0.5505034",
"0.5502318",
"0.54934126",
"0.5490966",
"0.54876345",
"0.5483881",
"0.546787",
"0.54609317",
"0.545308",
"0.54501367",
"0.5449918",
"0.5449888",
"0.54474735",
"0.54443216",
"0.54430914",
"0.54261863",
"0.5423391",
"0.5418212",
"0.5414978",
"0.5408362",
"0.5406938",
"0.5406551",
"0.53969055",
"0.5396643",
"0.53883463",
"0.53872526",
"0.5386127",
"0.5385493",
"0.53771025",
"0.5374343",
"0.53700024",
"0.5367542",
"0.5366555",
"0.5364859",
"0.53603244",
"0.535894",
"0.5353384",
"0.5352999",
"0.5347719",
"0.534356",
"0.53419757",
"0.5336867",
"0.53368664",
"0.5331997",
"0.5331499",
"0.53302824",
"0.5325857",
"0.5325688",
"0.53205293",
"0.53195834",
"0.5316334",
"0.5315646",
"0.53128564",
"0.5300101",
"0.5291459",
"0.52897817",
"0.5287541",
"0.5284713"
]
| 0.0 | -1 |
Asserts that current service has some issues. | public function isYellow(): bool {
return $this->assertStatusIs('yellow');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function testAddServiceAcknowledgementNotValidated()\n {\n $this->entityValidator->expects($this->once())\n ->method('validate')\n ->willReturn($this->violationList);\n\n $acknowledgementService = new AcknowledgementService(\n $this->acknowledgementRepository,\n $this->accessGroupRepository,\n $this->monitoringRepository,\n $this->engineService,\n $this->entityValidator\n );\n\n $this->expectException(ValidationFailedException::class);\n $acknowledgementService->addServiceAcknowledgement($this->serviceAcknowledgement);\n }",
"private function checkServiceServiceSet () {\n if(is_null($this->serviceService)) {\n $this->exceptionWithResponseCode(500,\n \"Internal error: The service service has not been set. Please contact a GOCDB administrator and report this error.\"\n );\n }\n }",
"public function testGetDomainIssues()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }",
"public function hasDependencyErrors() {}",
"public function testInExistentScope()\n {\n $this->expectException(\\BadMethodCallException::class);\n\n $foos = $this->app->make(FooRepository::class);\n $foos->isNotActive()->get();\n }",
"public function testIfMessagePullIsCreatedAfterGetError(): void\n {}",
"public function testLibraryGetErrorForNonRegisteredService(): void\r\n {\r\n $serviceLibrary = new ServiceLibrary(new ArrayParser());\r\n $this->assertFalse($serviceLibrary->has('AdditionalService'));\r\n\r\n $this->expectExceptionCode(Error::ERROR_SERVICE_NOT_FOUND->getCode());\r\n $serviceLibrary->get('AdditionalService');\r\n }",
"protected function mustTestGetService()\n {\n return true;\n }",
"public function testValidateIssueRequest(): void\n {\n $this->assertTrue(method_exists($this->stack, 'validateIssueRequest'));\n }",
"public function testAddServiceAcknowledgementWhichSucceed()\n {\n $this->entityValidator->expects($this->once())\n ->method('validate')\n ->willReturn(new ConstraintViolationList([]));\n $this->monitoringRepository->expects($this->once())\n ->method('findOneService')\n ->willReturn($this->service);\n $this->monitoringRepository->expects($this->once())\n ->method('findOneHost')\n ->willReturn($this->host);\n $this->engineService->expects($this->once())\n ->method('addServiceAcknowledgement')\n ->willReturn(null);\n\n $acknowledgementService = new AcknowledgementService(\n $this->acknowledgementRepository,\n $this->accessGroupRepository,\n $this->monitoringRepository,\n $this->engineService,\n $this->entityValidator\n );\n\n $this->assertNull($acknowledgementService->addServiceAcknowledgement($this->serviceAcknowledgement));\n }",
"public function testHasErrors0()\n{\n\n $actual = $this->collecting->hasErrors();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}",
"public function testGetChangeIssue()\n {\n }",
"public function xtestChangeLeaveStatusErrors() {\n try {\n $retVal = $this->leaveRequestService->changeLeaveStatus(null, 'change_leave_request');\n $this->fail(\"Exception expected\");\n } catch (LeaveServiceException $e) {\n // expected - check code thrown in LeaveRequestService\n }\n \n }",
"public function test_if_failed_update()\n {\n }",
"public function checkStatusCacheMiss()\n {\n $ticket = 'ticketkey';\n $userId = 'userid';\n\n $mockScaleEngine = $this->_getMockScaleEngineClientDoesNothing();\n $mockCacheItem = $this->_getMockCacheItemMisses();\n $mockCache = $this->_getMockCacheThatReturnsItem($userId, $mockCacheItem);\n\n $ticketManager = new ScaleEngineTicketManager($mockScaleEngine, $mockCache);\n\n $ticketStatus = $ticketManager->checkStatus($userId, $ticket);\n\n $this->assertSame(\n [\n 'type' => TicketStatus::TYPE_UNKNOWN_ERROR,\n 'ticket' => null,\n 'playable' => false,\n 'error' => 'missing-ticket',\n ],\n $ticketStatus->toArray()\n );\n }",
"public function testShowMaintenance()\n {\n $response = $this->get(\"/api/maintenance/3\");\n\n $response->assertStatus(200)->assertJsonCount(10);\n }",
"public function testAddServiceAcknowledgementNotFoundService()\n {\n $this->entityValidator->expects($this->once())\n ->method('validate')\n ->willReturn(new ConstraintViolationList([]));\n $this->monitoringRepository->expects($this->once())\n ->method('findOneService')\n ->willReturn(null);\n\n $acknowledgementService = new AcknowledgementService(\n $this->acknowledgementRepository,\n $this->accessGroupRepository,\n $this->monitoringRepository,\n $this->engineService,\n $this->entityValidator\n );\n\n $this->expectException(EntityNotFoundException::class);\n $acknowledgementService->addServiceAcknowledgement($this->serviceAcknowledgement);\n }",
"public function testFailedCount()\n {\n $this->mockHandler->append(new Response(503));\n\n $issueCount = $this->issueCounter->getCounts(\n [],\n [\n 'test' => [],\n ]\n );\n\n $this->assertNull($issueCount['test']);\n }",
"public function testStateIssuedCorrectly()\n {\n $this->assertNull($this->state->issue());\n }",
"public function testCheckRequest(): void\n {\n $this->assertTrue(method_exists($this->stack, 'checkOrder'));\n }",
"public function checkOperationality()\n {\n }",
"public function testGoodRegisteredControllerStatus()\n {\n $this->assertEquals(false, $this->getAndCheckForError('/dev/x1'));\n $this->assertEquals(false, $this->getAndCheckForError('/dev/x1/y1'));\n\n // Check response code is 500/ some sort of error\n $this->assertEquals(true, $this->getAndCheckForError('/dev/x2'));\n }",
"public function testAddHostAcknowledgementNotValidated()\n {\n $this->entityValidator->expects($this->once())\n ->method('validate')\n ->willReturn($this->violationList);\n\n $acknowledgementService = new AcknowledgementService(\n $this->acknowledgementRepository,\n $this->accessGroupRepository,\n $this->monitoringRepository,\n $this->engineService,\n $this->entityValidator\n );\n\n $this->expectException(ValidationFailedException::class);\n $acknowledgementService->addHostAcknowledgement($this->serviceAcknowledgement);\n }",
"public function testAddServiceAcknowledgementNotFoundHost()\n {\n $this->entityValidator->expects($this->once())\n ->method('validate')\n ->willReturn(new ConstraintViolationList([]));\n $this->monitoringRepository->expects($this->once())\n ->method('findOneService')\n ->willReturn($this->service);\n $this->monitoringRepository->expects($this->once())\n ->method('findOneHost')\n ->willReturn(null);\n\n $acknowledgementService = new AcknowledgementService(\n $this->acknowledgementRepository,\n $this->accessGroupRepository,\n $this->monitoringRepository,\n $this->engineService,\n $this->entityValidator\n );\n\n $this->expectException(EntityNotFoundException::class);\n $acknowledgementService->addServiceAcknowledgement($this->serviceAcknowledgement);\n }",
"public function testHasViolation()\n {\n $this->assertFalse($this->uut->hasViolation());\n }",
"public function testAnLaneHasIssues()\n {\n $lane = create(Lane::class);\n\n $this->assertContainsOnlyInstancesOf(Issue::class, $lane->issues);\n }",
"public function testDisacknowledgeServiceSucceed()\n {\n $this->monitoringRepository->expects($this->once())\n ->method('findOneService')\n ->willReturn($this->service);\n $this->monitoringRepository->expects($this->once())\n ->method('findOneHost')\n ->willReturn($this->host);\n $this->acknowledgementRepository->expects($this->once())\n ->method('findLatestServiceAcknowledgement')\n ->willReturn($this->hostAcknowledgement);\n\n $acknowledgementService = new AcknowledgementService(\n $this->acknowledgementRepository,\n $this->accessGroupRepository,\n $this->monitoringRepository,\n $this->engineService,\n $this->entityValidator\n );\n\n $this->assertNull($acknowledgementService->disacknowledgeService(1, 1));\n }",
"public function testSoftError()\n {\n $expectedBody = $this->getExpectedBody(\n [\n ['SKU' => 'test123']\n ],\n []\n );\n\n $this->mockEndpoint();\n $this->mockCurl($expectedBody, 200, 'An error response');\n\n $error = '';\n try {\n $this->subject->addData(['SKU' => 'test123']);\n $response = $this->subject->send();\n\n $this->assertEquals(\n 'An error response',\n $response[0]['body']\n );\n } catch (Exception $e) {\n $error = $e->getMessage();\n }\n\n $this->assertEquals(\n '',\n $error\n );\n }",
"private function checkDependencies()\n {\n $endpoint = config(self::CONFIG_KEY_SOCCERAMA_API_BASE);\n if (empty($endpoint)) {\n throw new NoBaseURLExceptions;\n }\n\n /*\n * check the api token\n */\n $soccerama_api_token = config(self::CONFIG_KEY_SOCCERAMA_API_TOKEN);\n if (empty($soccerama_api_token)) {\n throw new NoApiTokenException;\n }\n }",
"public function testRetrieveUnsuccessfulReason()\n {\n }",
"public function testAddInvalids()\n {\n $this->todo('stub');\n }",
"public function testIndexMaintenance()\n {\n $response = $this->get('/api/maintenance');\n\n $response->assertStatus(200);\n }",
"public function testGetViolation()\n {\n $this->assertNull($this->uut->getViolation());\n }",
"public function testGetErrors0()\n{\n\n $actual = $this->collecting->getErrors();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}",
"public function testGetNonExistentService()\n {\n $kraken = new Kraken(self::$tokenProvider);\n $nonExistentService = $kraken->nonExistentService;\n\n $this->assertNull($nonExistentService);\n }",
"public function testGetErrorMessagesAfterValidationFailure()\n {\n $this->validator->isValid(-211);\n $this->assertCount(1, $this->validator->errors());\n }",
"public function testServiceNotFoundException()\n {\n $this->expectException(ServiceNotFoundException::class);\n $client = $this->getClientWithServiceNotFoundExceptionMock();\n $channelService = new OpeningHoursService($client);\n $channelService->getDay(777, 666, '2020-01-02');\n }",
"public function assertValid()\n {\n }",
"protected function assertErrorLogEntries() {}",
"public function testServiceIsNotLoaded()\n {\n $di = new \\Anax\\DI\\DI();\n $di->get(\"nosuchservice\");\n }",
"public function testProjectAssignmentsUpdateAvailability()\n {\n }",
"public function verifyRequiredServices($container);",
"public function test_error_get_complete_pos_daily_cash_resume_failed_pos_cash_desk_not_opened()\n {\n $posCashDeskId = 2;\n $timestampNow = Carbon::now()->toDateTimeString();\n $bCompleteResume = \"this is a string\";\n $resumePosDailyCashService = new ResumePosDailyCashService($posCashDeskId, $timestampNow, $bCompleteResume);\n }",
"public function testIsInvalid()\n {\n $this->todo('stub');\n }",
"public function checkRequirements()\n {\n }",
"public function testStatus(){\n $model = new PersistenceManager();\n $stats = $model->getStatus();\n\n $this->assertEquals(\n intval($stats[0]['total']),\n intval($stats[0]['used'])+intval($stats[0]['not_used'])\n );\n }",
"private function assert_not_running(): void\n\t{\n\t\tif ($this->status >= self::STATUS_RUNNING)\n\t\t{\n\t\t\tthrow new ApplicationAlreadyRunning;\n\t\t}\n\t}",
"public function testCheckIfAccountExpired()\n {\n }",
"public function testCheckFail()\n\t{\n\t\t$response = $this->createMock(RequestInterface::class);\n\t\t$response->method('getQuery')->willReturn($this->jwt);\n\n\t\t$auth = new Auth;\n\n\t\tJWT::$timestamp = strtotime('+1 week');\n\n\t\t$this->assertTrue( !$auth->check(new QueryStr($response), $this->secretKey) );\n\n\t\t$expected_errors = ['Expired token'];\n\n\t\t$this->assertEquals($expected_errors, $auth->getMessages());\n\t}",
"public function testErrorMessage()\n {\n $this->throwErrorException();\n\n // test if code actually gets here\n $this->assertTrue(true);\n }",
"public function test_table_existance() {\n\t\t$tables = array(\n\t\t\t\t'commands' => true,\n\t\t\t\t'comments' => true,\n\t\t\t\t'contactgroups' => true,\n\t\t\t\t'contacts' => true,\n\t\t\t\t'downtimes' => true,\n\t\t\t\t'hosts' => true,\n\t\t\t\t'hostgroups' => true,\n\t\t\t\t'services' => true,\n\t\t\t\t'servicegroups' => true,\n\t\t\t\t'status' => true,\n\t\t\t\t'timeperiods' => true,\n\n\t\t\t\t// Doesn't exist in our PHP-interface\n\t\t\t\t'log' => false,\n\t\t\t\t'hostsbygroup' => false,\n\t\t\t\t'servicesbygroup' => false,\n\t\t\t\t'servicesbyhostgroup' => false,\n\t\t\t\t'columns' => false,\n\n\t\t\t\t// Shouldn't even exist in livestatus\n\t\t\t\t'nevergonnagiveyouup' => false,\n\t\t\t\t'nevergonnaletyoudown' => false,\n\t\t\t\t'nevergonnaturnaround' => false,\n\t\t\t\t'anddessertyou' => false\n\t\t);\n\t\tforeach($tables as $table => $exists) {\n\t\t\ttry {\n\t\t\t\t$this->lsconn->mock_query(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'data' => array(),\n\t\t\t\t\t\t\t\t'total_count' => 0,\n\t\t\t\t\t\t\t\t'columns' => array(array())),\n\t\t\t\t\t\t/* We don't care about the result, because then we need to test auth here */\n\t\t\t\t\t\tfalse\n\t\t\t\t);\n\t\t\t\t$this->ls->query($table, \"\", false, array(\n\t\t\t\t\t\t'auth' => new User_Model(array(\n\t\t\t\t\t\t\t\t'username' => 'theusername',\n\t\t\t\t\t\t\t\t'auth_data' => array()\n\t\t\t\t\t\t))\n\t\t\t\t));\n\t\t\t\t$this->assertTrue( $exists, \"Table '\".$table.\"' doesn't exist, but no expection thrown\");\n\t\t\t} catch( op5LivestatusException $e ) {\n\t\t\t\tif( $e->getMessage() == \"Unknown table \".$table ) {\n\t\t\t\t\t$this->assertTrue( !$exists, \"Table '\".$table.\"' should exist, but got an expection\");\n\t\t\t\t} else {\n\t\t\t\t\tthrow $e; /* If not interesting exception, throw further */\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public function testServiceFailToLoad()\n {\n $di = new \\Anax\\DI\\DI();\n $di->set(\"service\", function () {\n throw new \\Exception();\n });\n $di->get(\"service\");\n }",
"public function testGetStatus()\n {\n $this->todo('stub');\n }",
"public function prevent_showing_a_nonexistent_service()\n {\n // get a random user\n $user = $this->getRandomUser('super-admin');\n\n // act as the user we got and request the create_new_article route\n $response = $this->actingAs($user)->get(route('service.show', ['id' => 100]));\n\n $response->assertSessionHas('flash_error_message', 'Unable to find Services to display.');\n }",
"public function checkProblems()\n {\n \t$c = new ClientService();\n\t $clients = $c->getClientsSummary();\n\t \n\t $problemList = array();\n\t $inactive = \"No active events on an active client.\";\n\t $noappt = \"No appointment scheduled.\";\n\t $nointake = \"No intake recorded.\";\n\t $toosoon = \"Appointment scheduled earlier than 5 months.\";\n\t $toolate = \"Appointment scheduled after than 8 months.\";\n\t $noappt_critical = \"CRITICAL: No appointment AND less than 3 months left.\";\n\t \n\t foreach ($clients as $client)\n\t {\n\t \tif($client->client_status != \"Active\")\n\t \t\tcontinue;\n\t \t\t\n\t \t$intakeDate = 0;\n\t \t$apptDate = 0;\n\t \t$active = false;\n\t \t\n\t \t$e = new EventService();\n\t \t$events = $e->getEventsByID($client->client_id);\n\t \t\n\t \tforeach ($events as $event)\n\t \t{\n\t \t\tif($event->type == \"Intake\")\n\t \t\t\t$intakeDate = strtotime($event->targetdate);\n\t \t\tif($event->type == \"Appointment\")\n\t \t\t\t$apptDate = strtotime($event->targetdate);\n\t \t\tif($event->status == \"Active\")\n\t \t\t\t$active = true;\n\t \t}\n\t \t\n\t \tif(!$active)\n\t \t\tarray_push($problemList, $client->wits_id . \": \" . $inactive);\n\t \tif($apptDate == 0)\n\t {\n\t if((strtotime(\"now\") - $intakeDate)/(24*60*60) > 150)\n\t array_push($problemList, $client->wits_id . \": \" . $noappt_critical);\n\t else\n\t \t\tarray_push($problemList, $client->wits_id . \": \" . $noappt);\n\t \t\t}\n\t \tif($intakeDate == 0)\n\t \t\tarray_push($problemList, $client->wits_id . \": \" . $nointake);\n\t \t\n\t \tif($intakeDate != 0 && $apptDate != 0)\n\t \t{\n\t \t\t$daysToAppt = ($apptDate - $intakeDate)/(24*60*60);\n\t \t\tif($daysToAppt < 150)\n\t \t\t\tarray_push($problemList, $client->wits_id . \": \" . $toosoon);\n\t \t\tif($daysToAppt > 240)\n\t \t\t\tarray_push($problemList, $client->wits_id . \": \" . $toolate);\n\t \t}\n\t }\n\t\n\t return $problemList;\n }",
"public function PullTesst()\n {\n $this->assertTrue(true);\n }",
"public function testGetService()\n {\n try {\n $this->cosClient->ListBuckets();\n $this->assertTrue(True);\n } catch (ServiceResponseException $e) {\n $this->assertFalse(True);\n }\n }",
"private function assert_not_booted(): void\n\t{\n\t\tif ($this->status >= self::STATUS_BOOTING)\n\t\t{\n\t\t\tthrow new ApplicationAlreadyBooted;\n\t\t}\n\t}",
"public function testGetAll(): void\n {\n $delivery_services = DeliveryService::getAll();\n\n $this->assertIsArray($delivery_services);\n\n $this->assertEquals(1, $delivery_services[0]['id']);\n $this->assertEquals(\n 'Другая (отслеживание и смена статуса производятся вручную)',\n $delivery_services[0]['name']\n );\n $this->assertEquals('default', $delivery_services[0]['slug']);\n }",
"public function assertValid()\n {\n $validator = $this->makeValidator();\n\n if ($validator->fails()) {\n $this->throwValidationException($validator);\n }\n }",
"protected function checkStatus()\n {\n $status = $this->autoTestController->checkStatus(Tools::getValue('queueItemId', 0));\n\n if ($status['finished']) {\n $this->autoTestController->stop(\n function () {\n return LoggerService::getInstance();\n }\n );\n }\n\n PacklinkPrestaShopUtility::dieJson($status);\n }",
"public function testGetErrorMessagesAfterFailure()\n {\n $validator = new Integer();\n $validator->isValid(\"23\");\n $this->assertCount(1, $validator->errors());\n }",
"public function assertValid() : void\n {\n }",
"public function assertValid() : void\n {\n }",
"public function testPerformActionForExpiredBuilds()\n {\n }",
"public function testSearchApiInvalid(): void\n {\n $response = $this->getJson('/api/search/stats');\n $response->assertStatus(422);\n }",
"public function testGetEmptyErrorMessagesBeforeRunningValidation()\n {\n $this->assertEquals([], $this->validator->errors());\n }",
"public function OFF_testStoreSingleEntryFailure()\n {\n $this->volunteerInteretsInput = [];\n \n// // Assemble\n// $this->mockedProjectItemController\n// ->shouldReceive('store')\n// ->once()\n// ->with($this->projectItemInput)\n// ->andThrow(new Exception());\n \n // This test does not appear to be finished.\n $this->markTestIncomplete('This test has not been properly implemented yet');\n }",
"public function testHasFailedReturnsFalse(): void\n {\n $this->assertFalse($this->class->has_failed());\n }",
"public function testHasFailedReturnsFalse(): void\n {\n $this->assertFalse($this->class->has_failed());\n }",
"public function testError()\n {\n TestUtil::setupCassette('errors/errors.yml');\n\n // Create a bad shipment so we can work with errors\n try {\n self::$client->shipment->create();\n } catch (ApiException $error) {\n $this->assertEquals(422, $error->getHttpStatus());\n $this->assertEquals('PARAMETER.REQUIRED', $error->code);\n $this->assertEquals('Missing required parameter.', $error->getMessage());\n $this->assertEquals(['field' => 'shipment', 'message' => 'cannot be blank'], $error->errors[0]);\n $this->assertEquals('{\"error\":{\"code\":\"PARAMETER.REQUIRED\",\"message\":\"Missing required parameter.\",\"errors\":[{\"field\":\"shipment\",\"message\":\"cannot be blank\"}]}}', $error->getHttpBody()); // phpcs:ignore\n\n // We check that the pretty printed output is the same here, leave the odd formatting as\n // it is here and do not auto-format the next few lines.\n $error->prettyPrint();\n $this->expectOutputString('PARAMETER.REQUIRED (422): Missing required parameter.\nField errors:\n field: shipment\n message: cannot be blank\n\n');\n }\n }",
"public function testAddInvalid()\n {\n $this->todo('stub');\n }",
"public function testApiError()\n {\n $this->client->shouldReceive('send')->once()->andReturn(\n new Response(200, [], file_get_contents(__DIR__ . '/../Fixtures/access-denied.json'))\n );\n\n $this->expectException(PushwooshException::class);\n $this->expectExceptionMessage('Access denied or application not found');\n\n $this->pushwoosh->createMessage(\n new PushwooshPendingMessage($this->pushwoosh)\n );\n }",
"public function test_admin_monitoring_b()\n {\n $this->request('GET', ['pages/Home', 'member_dsc_summary']);\n $this->assertResponseCode(404);\n }",
"public function testDisacknowledgeServiceAlreadyDisacknowledged()\n {\n $this->monitoringRepository->expects($this->once())\n ->method('findOneService')\n ->willReturn($this->service);\n $this->monitoringRepository->expects($this->once())\n ->method('findOneHost')\n ->willReturn($this->host);\n $serviceAcknowledgement = $this->serviceAcknowledgement->setDeletionTime(new \\DateTime());\n $this->acknowledgementRepository->expects($this->once())\n ->method('findLatestServiceAcknowledgement')\n ->willReturn($serviceAcknowledgement);\n\n $acknowledgementService = new AcknowledgementService(\n $this->acknowledgementRepository,\n $this->accessGroupRepository,\n $this->monitoringRepository,\n $this->engineService,\n $this->entityValidator\n );\n\n $this->expectException(AcknowledgementException::class);\n $acknowledgementService->disacknowledgeService(1, 1);\n }",
"public function testCreateUnsuccessfulReason()\n {\n }",
"protected function assertServerNotRunning(): void\n {\n if (false === $this->useExternalServerProcess) {\n $this->assertFalse($this->process->isRunning(), 'Server process is still running');\n }\n }",
"public function testAddHostAcknowledgementWhichSucceed()\n {\n $this->entityValidator->expects($this->once())\n ->method('validate')\n ->willReturn(new ConstraintViolationList([]));\n $this->monitoringRepository->expects($this->once())\n ->method('findOneHost')\n ->willReturn($this->host);\n $this->engineService->expects($this->once())\n ->method('addHostAcknowledgement')\n ->willReturn(null);\n\n $acknowledgementService = new AcknowledgementService(\n $this->acknowledgementRepository,\n $this->accessGroupRepository,\n $this->monitoringRepository,\n $this->engineService,\n $this->entityValidator\n );\n\n $this->assertNull($acknowledgementService->addHostAcknowledgement($this->hostAcknowledgement));\n }",
"public function testValidationOk()\n {\n $this->mailConstraint = new Mailvalid();\n $this->context->expects($this->never())\n ->method('addViolation');\n $this->mailValidator->validate('[email protected]', $this->mailConstraint);\n }",
"public function testValidationDefaultCorrect()\r\n {\r\n $data = $this->getCorrectData();\r\n $artifact = $this->Artifacts->newEntity($data);\r\n $this->assertEmpty($artifact->errors());\r\n }",
"public function testOrderStatusUnshipped() : void \n {\n $values = ['Unshipped'];\n $this->expectException(\\Exception::class);\n $type = new OrderStatus($values);\n }",
"public function testTestStatusMissingBadToken()\n {\n // create review record for change 1\n $this->createChange();\n $review = Review::createFromChange('1')->save();\n\n // ensure starting test status of null.\n $this->assertSame($review->get('testStatus'), null);\n\n // dispatch and check output with no token\n $this->dispatch('/reviews/2/tests/fail');\n $result = $this->getResult();\n $this->assertRoute('review-tests');\n $this->assertResponseStatusCode(403);\n\n // dispatch and check output with bad token\n $this->dispatch('/reviews/2/tests/fail/FFFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF');\n $result = $this->getResult();\n $this->assertRoute('review-tests');\n $this->assertResponseStatusCode(403);\n }",
"public function reportStatus()\n {\n if ( ! $this->isRequiredConfigPresent()) {\n $this->reportError('Config problem', 1485984755);\n }\n\n if ( ! $this->isDatabaseOkay()) {\n $this->reportError('Database problem', 1485284407);\n }\n\n echo 'OK';\n }",
"public function testIssueRefund()\n {\n }",
"public function testReportsBouncedGet()\n {\n }",
"public function testDisacknowledgeServiceNotFoundService()\n {\n $this->monitoringRepository->expects($this->once())\n ->method('findOneservice')\n ->willReturn(null);\n\n $acknowledgementService = new AcknowledgementService(\n $this->acknowledgementRepository,\n $this->accessGroupRepository,\n $this->monitoringRepository,\n $this->engineService,\n $this->entityValidator\n );\n\n $this->expectException(EntityNotFoundException::class);\n $acknowledgementService->disacknowledgeService(1, 1);\n }",
"protected function assertConditionsMet(): void\n {\n $this->assertThat(null, new ExpectationsMet());\n }",
"public function missing_user_errors()\n {\n $cmd = $this->artisan('user:password testuser --password=testing');\n $cmd->assertExitCode(1);\n }",
"protected function _assertPostConditions()\n {\n $this->expectedDeprecated();\n }",
"public function testClearErrors0()\n{\n\n $actual = $this->collecting->clearErrors();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}",
"public function test_error_get_complete_pos_daily_cash_resume_failed_pos_cash_desk_param()\n {\n $posCashDeskId = \"text\";\n $timestampNow = Carbon::now()->toDateTimeString();\n $resumePosDailyCashService = new ResumePosDailyCashService($posCashDeskId, $timestampNow);\n }",
"public function testOrdersAllResponseStatus()\n\t{\n\t\t$this->client->request('GET', \"/orders/$this->from/$this->to\");\n\t\t$this->assertSame(Response::HTTP_OK, $this->client->getResponse()->getStatusCode());\n\t\n\t\t$this->client->request('GET', \"/orders/$this->wrongFrom/$this->wrongTo\");\n\t\t$this->assertSame(Response::HTTP_NOT_FOUND, $this->client->getResponse()->getStatusCode());\n\t}",
"public function testMyServiceGitCommands() {\n $this->assertNotNull(\\Drupal::service('calculate_date_diff'));\n }",
"public function verifyMock() {\r\n foreach($this->expectionMap->keys() as $method) {\r\n $expectationList=$this->expectionMap->get($method);\r\n \r\n foreach($expectationList->getExpectations() as $exp) {\r\n if($exp->getRepeat() === -1) //unlimited calls\r\n continue;\r\n\r\n $msg= $this->constructViolationMessage($method, $exp);\r\n throw new ExpectationViolationException($msg);\r\n }\r\n }\r\n }",
"protected function _checkStatus() {\n if ($this->analyticsEnabled === null) {\n $this->analyticsEnabled = Zend_Registry::get('config')->analytics->enabled; \n } \n if ($this->analyticsEnabled != 1) { \n throw new Exception(\"We're sorry, Analytics is disabled at the moment\");\n }\n }",
"public function testInfoMessage()\n {\n $this->throwInfoException();\n\n // test if code actually gets here\n $this->assertTrue(true);\n }",
"public function testMaintenanceSet()\n {\n// $this->commandTester->execute(\n// [\n// 'command' => $this->maintenanceCommand->getName(),\n// ToggleMaintenanceCommand::MAINTENANCE_PARAMETER => 1,\n// ]\n// );\n//\n// $this->assertTrue(\n// $this\n// ->filesystem\n// ->exists($this->exposedDir . DIRECTORY_SEPARATOR . ToggleMaintenanceCommand::FILE_NAME)\n// );\n//\n// $this->client->request('GET', '/');\n// $this->assertEquals(Response::HTTP_SERVICE_UNAVAILABLE, $this->client->getResponse()->getStatusCode());\n }",
"protected function assertContainerIsSet()\n {\n if ($this->container === null) {\n trigger_error('Container is not set in ' . get_class($this), E_USER_ERROR);\n }\n }",
"public function ensureConsistency()\n {\n }",
"public function ensureConsistency()\n {\n }",
"public function ensureConsistency()\n {\n }"
]
| [
"0.6038173",
"0.5915269",
"0.5863043",
"0.5784243",
"0.5771825",
"0.5724194",
"0.5715632",
"0.5704777",
"0.56467",
"0.56243205",
"0.5589402",
"0.5565493",
"0.5565055",
"0.55459225",
"0.5545672",
"0.55374557",
"0.5533305",
"0.55089015",
"0.5505612",
"0.5497743",
"0.54847485",
"0.5474732",
"0.54712653",
"0.5464995",
"0.54356766",
"0.5430199",
"0.5429643",
"0.53923035",
"0.5374285",
"0.53730094",
"0.53668886",
"0.5363211",
"0.5362967",
"0.5355177",
"0.534851",
"0.53453857",
"0.5336933",
"0.5334908",
"0.5327353",
"0.53252673",
"0.5316306",
"0.5315325",
"0.5308389",
"0.53031296",
"0.5298008",
"0.52903557",
"0.5282299",
"0.5279536",
"0.52708036",
"0.5262879",
"0.52609",
"0.5258422",
"0.5255842",
"0.52552545",
"0.5252013",
"0.52472186",
"0.52398115",
"0.52281135",
"0.5227895",
"0.5226548",
"0.52226806",
"0.5222483",
"0.5203769",
"0.5203769",
"0.52029884",
"0.5199855",
"0.51987284",
"0.5196644",
"0.5195931",
"0.5195931",
"0.5185757",
"0.5179268",
"0.5172614",
"0.5165429",
"0.5157259",
"0.51522374",
"0.51470155",
"0.513284",
"0.5130001",
"0.5127773",
"0.5126899",
"0.5124995",
"0.5117343",
"0.5116449",
"0.5115252",
"0.51116985",
"0.51109433",
"0.51099664",
"0.5108264",
"0.51065797",
"0.5105186",
"0.51048833",
"0.510324",
"0.50918317",
"0.5090396",
"0.50901246",
"0.5071229",
"0.5066436",
"0.50565076",
"0.50565076",
"0.50565076"
]
| 0.0 | -1 |
Asserts that current service is unavailable. | public function isRed(): bool {
return $this->assertStatusIs('red');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function testRequestItemsUnavailable()\n {\n $response = $this->get('/api/items/unavailable');\n\n $response->assertStatus(200);\n }",
"public function test_receive_throwsServiceUnavailable_ifNoService()\n\t{\n\t\t$this->setExpectedException('Jstewmc\\\\Api\\\\Exception\\\\ServiceUnavailable');\n\t\t\n\t\t(new Client())\n\t\t\t->send(new Request\\Get('http://x.x.x.x'))\n\t\t\t->receive(new Response\\Json());\n\t\t\n\t\treturn;\n\t}",
"public function testServiceIsNotLoaded()\n {\n $di = new \\Anax\\DI\\DI();\n $di->get(\"nosuchservice\");\n }",
"private function assert_not_running(): void\n\t{\n\t\tif ($this->status >= self::STATUS_RUNNING)\n\t\t{\n\t\t\tthrow new ApplicationAlreadyRunning;\n\t\t}\n\t}",
"protected function assertServerNotRunning(): void\n {\n if (false === $this->useExternalServerProcess) {\n $this->assertFalse($this->process->isRunning(), 'Server process is still running');\n }\n }",
"public function prevent_showing_a_nonexistent_service()\n {\n // get a random user\n $user = $this->getRandomUser('super-admin');\n\n // act as the user we got and request the create_new_article route\n $response = $this->actingAs($user)->get(route('service.show', ['id' => 100]));\n\n $response->assertSessionHas('flash_error_message', 'Unable to find Services to display.');\n }",
"public function testServiceNotFoundException()\n {\n $this->expectException(ServiceNotFoundException::class);\n $client = $this->getClientWithServiceNotFoundExceptionMock();\n $channelService = new OpeningHoursService($client);\n $channelService->getDay(777, 666, '2020-01-02');\n }",
"private function assert_not_booted(): void\n\t{\n\t\tif ($this->status >= self::STATUS_BOOTING)\n\t\t{\n\t\t\tthrow new ApplicationAlreadyBooted;\n\t\t}\n\t}",
"public function testGetNonExistentService()\n {\n $kraken = new Kraken(self::$tokenProvider);\n $nonExistentService = $kraken->nonExistentService;\n\n $this->assertNull($nonExistentService);\n }",
"public function testLibraryGetErrorForNonRegisteredService(): void\r\n {\r\n $serviceLibrary = new ServiceLibrary(new ArrayParser());\r\n $this->assertFalse($serviceLibrary->has('AdditionalService'));\r\n\r\n $this->expectExceptionCode(Error::ERROR_SERVICE_NOT_FOUND->getCode());\r\n $serviceLibrary->get('AdditionalService');\r\n }",
"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 isOperational();",
"public function testGetNotExistingServiceThrowsServiceNotFoundException()\n {\n $this->expectException(NotImplementedException::class);\n $this->factory->TotallyNotExistingService;\n }",
"public function test_showPlaceHold_cannotPlaceHold_returnFalse()\r\n\t{\r\n\t\t$this->prepareIsPlaceHoldAvailable(false);\r\n\t\t$actual = $this->service->showPlaceHold();\r\n\t\t$this->assertFalse($actual);\r\n\t}",
"#[@test, @expect('lang.ElementNotFoundException')]\n public function lookupNonexistantThrowsException() {\n $this->cut->lookup('localhost');\n }",
"public function unavailableService()\n {\n return view('errors.partial._503');\n }",
"public function testNonExistentSystem()\n {\n $result = DALBaker::loadQueriesXml('InvalidSystem');\n PHPUnit_Framework_Assert::assertNull($result);\n\n }",
"public function testImageSkippedWhenUnavailable() {\n\t\t$fullPath = realpath(dirname(__FILE__) . '/gdtest/test_jpg.jpg');\n\t\t$gd = new GDBackend_ImageUnavailable($fullPath);\n\n\t\t/* Ensure no image resource is created if the image is unavailable */\n\t\t$this->assertNull($gd->getImageResource());\n\t}",
"public function testServiceFailToLoad()\n {\n $di = new \\Anax\\DI\\DI();\n $di->set(\"service\", function () {\n throw new \\Exception();\n });\n $di->get(\"service\");\n }",
"public function respondServiceUnavailable($message = \"Service Unavailable!\")\n {\n return $this->setStatusCode(IlluminateResponse::HTTP_SERVICE_UNAVAILABLE)->respondWithError($message);\n }",
"public function testAPIGetInactiveMonitoredAddress() {\n $sample_user = $this->app->make('\\UserHelper')->createSampleUser();\n\n $helper = $this->app->make('\\MonitoredAddressHelper');\n $created_address = $helper->createSampleMonitoredAddress($sample_user, ['active' => false]);\n\n $api_tester = $this->getAPITester();\n $loaded_address_from_api = $api_tester->testGetResource($created_address);\n PHPUnit::assertEquals(false, $loaded_address_from_api['active']);\n }",
"public function testExceptionIsThrownWhenServiceNotAvailable()\n {\n $mockHandler = new MockHandler([\n new ClientException(\n 'Error Communicating with Server',\n new Request('GET', 'test'),\n new Response()\n )\n ]);\n $handlerStack = HandlerStack::create($mockHandler);\n $client = new Client(['handler' => $handlerStack]);\n $request = new Request('GET', 'test');\n $response = new Response();\n\n $this->expectException(\\RuntimeException::class);\n $this->expectExceptionMessage('Cannot connect to HIBP API');\n $hibp = new Hibp($client, $request, $response);\n $hibp->isPwnedPassword('foo');\n $this->fail('Expected exception was not thrown');\n }",
"public function testHardeningInactive(): void\n {\n $this->assertArrayHasKey(\n 'pingback.ping',\n \\apply_filters('xmlrpc_methods', ['pingback.ping' => 'this:pingback_ping', ])\n );\n\n $this->assertTrue(\\apply_filters('xmlrpc_enabled', true));\n\n // Authentication with both email and login should pass.\n $this->assertInstanceOf(\\WP_User::class, \\wp_authenticate(self::DUMMY_USER_EMAIL, Constants::FACTORY_PASSWORD));\n $this->assertInstanceOf(\\WP_User::class, \\wp_authenticate(self::DUMMY_USER_LOGIN, Constants::FACTORY_PASSWORD));\n }",
"public function testGetBalanceNotEnabled()\n {\n $this->_helperMock->expects($this->once())->method('isEnabled')->will($this->returnValue(false));\n\n $result = $this->_className->getBalance();\n $this->assertEquals(0.0, $result);\n }",
"public function testServiceDisabled()\n {\n $configStub = $this->createMock(ReCaptchaConfigV2::class);\n\n // Configure the stub.\n $configStub->method('isServiceEnabled')\n ->willReturn(false);\n\n $clientStub = $this->createMock(GuzzleRequestClient::class);\n $clientStub->method('post')\n ->willReturn(false);\n\n $_service = new GoogleReCaptchaV2Service($configStub, $clientStub);\n $service = new GoogleReCaptchaV2($_service);\n $response = $service->verifyResponse('test');\n $this->assertEquals(true, $response->isSuccess());\n }",
"private function test_availability() {\r\n\r\n $this->add_log('test_availability: Testing ws availability...', 'DEBUG');\r\n\r\n $params = new stdClass();\r\n $params->from = @new SoapVar($this->sender, XSD_STRING, \"string\", \"http://www.w3.org/2001/XMLSchema\");\r\n $this->call_function('disponibilitat', $params);\r\n $this->add_log('test_availability: Server avalaible', 'DEBUG');\r\n }",
"private function skipTimeoutTest()\n {\n static::fail('API timeouts detected. We will probably not be able to complete this test suite.');\n }",
"public function testGetNotExistingResource()\n {\n $this->expectException(InvalidArgumentException::class);\n $this->client->nonExistingResource();\n }",
"public function testCheckIfAccountExpired()\n {\n }",
"public function isUnavailable($from, $to)\n {\n return 0 < timetable_query_a(\n $this->timetable->specifics()\n ->where('is_available', 0),\n $from, $to\n );\n }",
"public function checkStatusCacheMiss()\n {\n $ticket = 'ticketkey';\n $userId = 'userid';\n\n $mockScaleEngine = $this->_getMockScaleEngineClientDoesNothing();\n $mockCacheItem = $this->_getMockCacheItemMisses();\n $mockCache = $this->_getMockCacheThatReturnsItem($userId, $mockCacheItem);\n\n $ticketManager = new ScaleEngineTicketManager($mockScaleEngine, $mockCache);\n\n $ticketStatus = $ticketManager->checkStatus($userId, $ticket);\n\n $this->assertSame(\n [\n 'type' => TicketStatus::TYPE_UNKNOWN_ERROR,\n 'ticket' => null,\n 'playable' => false,\n 'error' => 'missing-ticket',\n ],\n $ticketStatus->toArray()\n );\n }",
"public function test_isOverDrive_isNotOverDrive_returnFalse()\r\n\t{\r\n\t\t$this->service->source = \"aNonDummyOverDriveRecord\";\r\n\t\t$actual = $this->service->isOverDrive();\r\n\t\t$this->assertFalse($actual);\r\n\t}",
"public function testDoesNotAllowIsDeprecatedWithoutDeprecationReasonOnEnum()\n {\n /** @noinspection PhpUnhandledExceptionInspection */\n $enumType = newEnumType([\n 'name' => 'SomeEnum',\n 'values' => ['FOO' => ['isDeprecated' => true]],\n ]);\n\n $this->expectException(InvariantException::class);\n $this->expectExceptionMessage(\n 'SomeEnum.FOO should provide \"deprecationReason\" instead of \"isDeprecated\".'\n );\n\n /** @noinspection PhpUnhandledExceptionInspection */\n $enumType->getValues();\n\n $this->addToAssertionCount(1);\n }",
"public function testReturnsFalseIfNotExistingEndpointRequested()\n {\n $result = $this->apiCaller->retrieve('some-incorrect-endpoint');\n $this->assertFalse($result);\n }",
"public function testMissing()\n {\n $result = $this->writedown->getService('api')->tag()->delete(mt_rand(1000, 9999));\n\n $this->assertFalse($result['success']);\n $this->assertEquals(['Not found.'], $result['data']);\n }",
"public function testRoomMembershipNotAuthorized()\n {\n $room = $this->createRoomWithPassword('Test Password');\n $user = factory(User::class)->create();\n\n $response = $this->actingAs($user)\n ->call('GET', '/room/'.$room->id);\n $response->assertStatus(Response::HTTP_UNAUTHORIZED);\n }",
"public function testRetrieveUnsuccessfulReason()\n {\n }",
"public function testInExistentScope()\n {\n $this->expectException(\\BadMethodCallException::class);\n\n $foos = $this->app->make(FooRepository::class);\n $foos->isNotActive()->get();\n }",
"public function testGetWillThrowNotFoundExceptionIfRequestedServiceIsNotRegistered(): void\n {\n $container = new Container();\n\n $name = 'FooService';\n\n $this->expectException(NotFoundException::class);\n $this->expectExceptionMessage(\n sprintf('Service \\'%s\\' could not be found registered with the container', $name)\n );\n\n $container->get($name);\n }",
"function guildUnavailable(Guild $guild);",
"public function testDisacknowledgeServiceNotFoundService()\n {\n $this->monitoringRepository->expects($this->once())\n ->method('findOneservice')\n ->willReturn(null);\n\n $acknowledgementService = new AcknowledgementService(\n $this->acknowledgementRepository,\n $this->accessGroupRepository,\n $this->monitoringRepository,\n $this->engineService,\n $this->entityValidator\n );\n\n $this->expectException(EntityNotFoundException::class);\n $acknowledgementService->disacknowledgeService(1, 1);\n }",
"public function testIsLinkedAccountUnbindableThrowApiException()\n {\n $this->expectException(\\Xendit\\Exceptions\\ApiException::class);\n\n DirectDebit::unbindLinkedAccountToken(\n self::TOKEN_ID\n );\n }",
"public function test_individual_item_does_not_exist()\n {\n $response = $this->get(\"/item-detail/12\");\n $response->assertSeeText('Sorry! the item you are looking for does not exist');\n }",
"public function shop_unavailable( $data )\r\n\t {\r\n\t \theader('Location: /site/currently_unavailable' );\r\n\t \treturn;\r\n\t }",
"public function testNotLoggedIn()\n {\n $this->sessionInfo['logged_in'] = false;\n $this->sessionInfo['token'] = 'foo';\n\n $this->session($this->sessionInfo);\n\n $response = $this->call('GET', '/api/user');\n\n $this->assertEquals(200, $response->getStatusCode());\n\n $decoded = json_decode($response->getContent());\n\n $this->assertEquals('error', $decoded->status);\n }",
"public function testNotFound()\n {\n $response = $this->get('/api/get-info');\n\n $response->assertStatus(404);\n }",
"function testInvalidGet() {\n $this->get('/something/def');\n $this->assertEqual(api_response::getInstance()->getCode(), 404);\n $this->assertText('/error/code', '100');\n $this->assertText('/error/msg', 'Bucket not defined: something');\n }",
"public function testDoPingInvalid(){\n \tPayU::$apiLogin = 'invalidLogin';\n \tPayU::$apiKey = 'invalidKey';\n \tEnvironment::setReportsCustomUrl(PayUTestUtil::REPORTS_CUSTOM_URL);\n \n \t$response = PayUReports::doPing();\n \t$this->assertEquals(PayUResponseCode::SUCCESS, $response->code);\n }",
"private function GetUnavailableDevices() {\n $db_debug = $this->_db->db_debug;\n $this->_db->debug = FALSE;\n\n $query = $this->_db->select('*')\n ->from('inventory.device')\n ->where('TechnicalAvailability = 0 OR LoanAvailability = 0')\n ->get();\n try {\n if (!$query) {\n $this->_db->db_debug = $db_debug;\n throw new CustomException();\n } else {\n $this->_db->db_debug = $db_debug;\n return $query->result_array();\n }\n } catch (CustomException $e) {\n $error = $this->_db->error();\n $exception['exception'] = $e->getCustomError(\"Sorry, could not get the unavailable devices.\", $error);\n return $exception;\n }\n }",
"public function testUnauthorizedAccess()\n {\n $this->delete('/calendars/1/slots/1');\n\n $this->assertGuest();\n }",
"public function failed()\n {\n // Do nothing\n }",
"public function isFailed()\r\n {\r\n return $this->status < 0;\r\n }",
"public function testRequestValidationFails()\n {\n $this->gearman->expects($this->never())\n ->method('doBackground');\n $this->apiMock->expects($this->once())\n ->method('validateRequest')\n ->will($this->throwException(new \\Metagist\\Api\\Exception('test')));\n $this->app['monolog']->expects($this->once())\n ->method('error');\n \n $response = $this->controller->scan('test', 'test');\n $this->assertEquals(403, $response->getStatusCode());\n }",
"public function test_non_existent_route() {\n $client = new Client($this->_app);\n $client->request('GET', '/does_not_exist');\n }",
"public function test_non_existent_route() {\n $client = new Client($this->_app);\n $client->request('GET', '/does_not_exist');\n }",
"public function if_show_time_not_found()\n {\n $reponse = $this->withHeaders(['Authorization'=> 'Bearer '.$this->userLogin()])->json('GET', 'api/reservations/-1');\n $reponse->assertStatus(404);\n }",
"public function testErrorOnSiteUnderTest() {\n $this->expectDeprecation('This is the deprecation message for deprecation_test_function().');\n $this->drupalGet(Url::fromRoute('deprecation_test.route'));\n }",
"public function test403()\n {\n $schedule = $this->createFactorySchedule();\n\n $user = $this->randomEntrant();\n\n $response = $this->requestToApi(\n $user, 'DELETE', '/schedules/'. $schedule->id\n );\n\n $response->assertStatus(403);\n }",
"public function testInvalidBalance()\n {\n $this->assertEquals('Coinplorer', $this->currency->getExplorerName());\n }",
"public function testRequestItemsAvailable()\n {\n $response = $this->get('/api/items/available');\n\n $response->assertStatus(200);\n }",
"public function checkPageUnavailableHandler() {}",
"public function testVolunteerHourProjectStoreFailure_Inactive()\n {\n $this->session([\n 'username' => $this->inactiveUser->username, \n 'access_level' => $this->inactiveUser->access_level\n ]);\n \n // Set test user as current authenticated user\n $this->be($this->inactiveUser);\n \n // Call route under test\n $response = $this->call('POST', 'volunteerhours');\n \n // Assert redirected to access denied page\n $this->assertRedirectedToRoute('unauthorized');\n }",
"public function testAvailable()\n {\n $response = $this->json('GET', '/api/list');\n\n $this->assertEquals(200, $response->status());\n\n\n }",
"public function testShowListNotFoundException(): void\n {\n $this->get('/mailchimp/lists/invalid-list-id');\n\n $this->assertListNotFoundResponse('invalid-list-id');\n }",
"public function testDisacknowledgeServiceNotFoundAcknowledgement()\n {\n $this->monitoringRepository->expects($this->once())\n ->method('findOneService')\n ->willReturn($this->service);\n $this->monitoringRepository->expects($this->once())\n ->method('findOneHost')\n ->willReturn($this->host);\n $this->acknowledgementRepository->expects($this->once())\n ->method('findLatestServiceAcknowledgement')\n ->willReturn(null);\n\n $acknowledgementService = new AcknowledgementService(\n $this->acknowledgementRepository,\n $this->accessGroupRepository,\n $this->monitoringRepository,\n $this->engineService,\n $this->entityValidator\n );\n\n $this->expectException(AcknowledgementException::class);\n $acknowledgementService->disacknowledgeService(1, 1);\n }",
"public function testBackup_unauthorised() {\n $this->config->log( WP_Backup::BACKUP_STATUS_STARTED );\n\n\t\t$this->mock_dropbox_facade->throw_unauthorized = true;\n\t\t$this->backup = new WP_Backup( $this->mock_dropbox_facade, new WP_Backup_Config( new Mock_WpDb() ), new Mock_WpDb() );\n\n $this->backup->execute();\n\n\t\t$history = $this->config->get_history();\n list( $time, $status, $msg ) = array_shift( $history );\n $this->assertEquals( WP_Backup::BACKUP_STATUS_FAILED, $status );\n\t\t$this->assertEquals( 'The plugin is no longer authorized with Dropbox.', $msg );\n\t}",
"public function testAssertFlashMessageWithoutSendingRequest(): void\n {\n $this->expectException(AssertionFailedError::class);\n $message = 'There is no stored session data. Perhaps you need to run a request?';\n $message .= ' Additionally, ensure `$this->enableRetainFlashMessages()` has been enabled for the test.';\n $this->expectExceptionMessage($message);\n\n $this->assertFlashMessage('Will not work');\n }",
"public function isNotUsing();",
"public function prevent_users_without_permissions_from_seeing_service_index()\n {\n $user = $this->getRandomUser('cant');\n\n $response = $this->actingAs($user)->get('/service');\n\n // TODO: Check for message???\n\n $response->assertRedirect('home');\n }",
"public function testNotOperational2()\r\n {\r\n global $pretend;\r\n\r\n $gd = $this->createGd('test.png');\r\n self::resetPretending();\r\n\r\n $pretend['extensionsNotExisting'] = ['gd'];\r\n $this->expectException(SystemRequirementsNotMetException::class);\r\n $gd->checkOperationality();\r\n $pretend['extensionsNotExisting'] = [];\r\n }",
"public function testSearchApiInvalid(): void\n {\n $response = $this->getJson('/api/search/stats');\n $response->assertStatus(422);\n }",
"public function tellNotEnoughMoneyInAccount()\n {\n }",
"public function testChannelNotFoundException()\n {\n $this->expectException(ChannelNotFoundException::class);\n $client = $this->getClientWithChannelNotFoundExceptionMock();\n $channelService = new OpeningHoursService($client);\n $channelService->getDay(1, 666, '2020-01-02');\n }",
"public function testStatusBusy()\n\t{\n\t\t$service = $this->getService();\n\t\t$this->mockResponseFromFile('catalogs.publish.busy');\n\t\t$response = $service->publishStatus()->pin(\"DEADBEEF\")->execute();\n\t\t$this->assertIsArray($response);\n\t\t$this->assertArrayHasKey('kind', $response);\n\t\t$this->assertArrayHasKey('selfLink', $response);\n\t\t$this->assertArrayHasKey('status', $response);\n\t\t$this->assertEquals('store#catalogPublishStatus', $response['kind']);\n\t\t$this->assertEquals('busy', $response['status']);\n\t}",
"public function testWebSearchExceptionAdultOkInvalid()\n {\n try {\n $this->_yahoo->webSearch('php', ['adult_ok' => 'oops']);\n $this->fail('Expected Zend_Service_Exception not thrown');\n } catch (Zend_Service_Exception $e) {\n $this->assertStringContainsString('error occurred sending request', $e->getMessage());\n }\n }",
"public function testCheckFail()\n\t{\n\t\t$response = $this->createMock(RequestInterface::class);\n\t\t$response->method('getQuery')->willReturn($this->jwt);\n\n\t\t$auth = new Auth;\n\n\t\tJWT::$timestamp = strtotime('+1 week');\n\n\t\t$this->assertTrue( !$auth->check(new QueryStr($response), $this->secretKey) );\n\n\t\t$expected_errors = ['Expired token'];\n\n\t\t$this->assertEquals($expected_errors, $auth->getMessages());\n\t}",
"public function testNotOperational1()\r\n {\r\n global $pretend;\r\n\r\n $gd = $this->createGd('test.png');\r\n self::resetPretending();\r\n\r\n $pretend['functionsNotExisting'] = ['imagewebp'];\r\n $this->expectException(SystemRequirementsNotMetException::class);\r\n $gd->checkOperationality();\r\n }",
"public function isAvailable() {}",
"public function isAvailable() {}",
"public function isAvailable() {}",
"public function isAvailable() {}",
"public function isAvailable() {}",
"public function isAvailable() {}",
"public function isAvailable() {}",
"public function isAvailable() {}",
"public function isAvailable() {}",
"public function isAvailable() {}",
"public function isAvailable() {}",
"public function isAvailable() {}",
"public function isAvailable() {}",
"public function isAvailable() {}",
"public function isAvailable() {}",
"public function isAvailable() {}",
"public function isAvailable() {}",
"private function checkFailure() : void\n {\n $failure = (int) $this->session->get('failure', 0);\n $time = (int) $this->session->get('failure_time', time());\n if ($failure >= static::FAILURE) {\n if ($time >= time()) {\n throw new \\DomainException($this->i18n->t(\n 'setrun/user',\n 'Form is blocked for {min} minutes',\n ['min' => static::FAILURE_TIME / 60])\n );\n }\n $this->removeFailure();\n }\n }",
"public function checkisOnCurrentHostInvalidHosts() {}",
"public function testShowNotFound(): void\n {\n $response = $this->json('GET', '/api/menus/10000');\n\n $response->assertStatus(404);\n }",
"public function test_disable_tos_verify()\n {\n setting()->set('enable_terms_of_use', 0);\n $this->get('/terms-of-use')\n ->assertStatus(404);\n }",
"public function testNotPaid()\n {\n $this->browse(function (Browser $browser) {\n $bill = Bill::factory()->create([\n 'contract_id' => $this->contract->id,\n 'requisite_id' => $this->requisite->id,\n 'tenant_id' => $this->tenant->id,\n ]);\n $service = $bill->services()->save(Service::factory()->make([\n 'name' => 'Rent',\n 'quantity' => '2',\n 'measure' => 'pc',\n 'price' => '1234'\n ]));\n\n $browser->loginAs($this->user)\n ->visit('/tenants/'.$this->tenant->id.'?tab=bills#tab')\n ->press('Оплатить')\n ->assertSee('Недостаточно средств');\n });\n }",
"public function testVolunteerHourIndexForContactFailure_Inactive()\n {\n $this->session([\n 'username' => $this->inactiveUser->username, \n 'access_level' => $this->inactiveUser->access_level\n ]);\n \n // Set test user as current authenticated user\n $this->be($this->inactiveUser);\n \n $volunteerID = 2;\n // Call route under test\n $response = $this->call('GET', 'volunteerhours/volunteer/'.$volunteerID);\n \n // Assert redirected to access denied page\n $this->assertRedirectedToRoute('unauthorized');\n }",
"public function testCallThrowsExceptionIfEnvironmentIsInvalid()\n {\n $this->setExpectedException('OutOfBoundsException');\n \n // method name must be defined in possible values array\n (new DetectEnvironment($this->name, []))->isDevelopment();\n \n return;\n }"
]
| [
"0.6801759",
"0.6292346",
"0.6205102",
"0.6189624",
"0.6086079",
"0.6037422",
"0.6032288",
"0.59700114",
"0.5967577",
"0.5965169",
"0.59538496",
"0.5945644",
"0.59244186",
"0.5893988",
"0.579357",
"0.57867926",
"0.5765851",
"0.57534236",
"0.5730366",
"0.5706527",
"0.5682129",
"0.5669607",
"0.565637",
"0.5639594",
"0.56345177",
"0.55840874",
"0.5547172",
"0.5540861",
"0.5533907",
"0.5527522",
"0.55014086",
"0.54810584",
"0.54771066",
"0.5462014",
"0.54540575",
"0.54421836",
"0.5438982",
"0.5437168",
"0.5434548",
"0.54335046",
"0.5431895",
"0.54282427",
"0.54219216",
"0.54194874",
"0.54173195",
"0.5413563",
"0.5408898",
"0.53970695",
"0.5390804",
"0.53869545",
"0.5378571",
"0.53777397",
"0.5370794",
"0.5360265",
"0.5360265",
"0.5358945",
"0.5358561",
"0.53531563",
"0.53491455",
"0.53438723",
"0.53422534",
"0.53396225",
"0.53343314",
"0.5332154",
"0.5323691",
"0.5319892",
"0.53176975",
"0.5314736",
"0.53049946",
"0.52970636",
"0.52926356",
"0.5290817",
"0.5290032",
"0.52883357",
"0.5278022",
"0.5277854",
"0.52752614",
"0.527417",
"0.527417",
"0.527417",
"0.527417",
"0.527417",
"0.527417",
"0.527417",
"0.527417",
"0.527417",
"0.527417",
"0.527417",
"0.527417",
"0.527417",
"0.527417",
"0.5273972",
"0.5273972",
"0.5273972",
"0.5264291",
"0.5262273",
"0.5261573",
"0.5258972",
"0.5257766",
"0.5255282",
"0.5244503"
]
| 0.0 | -1 |
Returns the annotation alias name. | public function getAliasName()
{
return 'apirequest';
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getAliasName(): string\n {\n return $this->aliasName;\n }",
"public function getAlias(): string\n {\n if ($this->_alias === null) {\n $this->_alias = $this->getName();\n }\n\n return $this->_alias;\n }",
"public function getAliasName()\n {\n return $this->namingStrategy->classToAlias($this->name);\n }",
"public function getAlias(): Str\n {\n return $this->alias;\n }",
"public function getAlias() : string {\n\t\treturn $this->alias;\n\t}",
"public static function getAlias(): string\n {\n return static::$alias;\n }",
"public function getAnnotationName()\n {\n return $this->annotationName;\n }",
"public function getAlias()\n {\n return $this->alias;\n }",
"public function getAlias()\n {\n return $this->alias;\n }",
"public function getAlias()\n {\n return $this->alias;\n }",
"public function getAlias()\n {\n return $this->alias;\n }",
"public function getAlias()\n {\n return $this->alias;\n }",
"public function getAlias()\n {\n return $this->alias;\n }",
"public function getAlias()\n {\n return $this->alias;\n }",
"public function getAlias()\n {\n return $this->alias;\n }",
"public function getAlias()\n {\n return $this->alias;\n }",
"public function getName()\n {\n return $this->alias;\n }",
"public function getAlias() {\n return $this->alias;\n }",
"public function getAlias() {\n return $this->alias;\n }",
"public function getAlias()\n\t{\n\t\treturn $this->alias;\n\t}",
"public function asAlias() {\n\t\treturn ($this->alias ? $this->alias : ($this->table ? $this->table->asAlias() .'__': ''/*null*/).$this->name);\n\t}",
"public function getAlias(): string;",
"function getAlias()\r\n\t{\r\n\t\treturn( $this->alias );\r\n\t}",
"public function getAlias() : string;",
"function getAliasOrName()\r\n\t{\r\n\t\tif ( !$this->alias ) {\r\n\t\t\treturn $this->name;\r\n\t\t}\r\n\t\treturn $this->alias;\r\n\t}",
"public function getAlias();",
"public function getAlias();",
"public function getAlias();",
"public function getAlias();",
"public function alias ()\n {\n return $this->_alias;\n }",
"protected function suggestAlias ()\n {\n preg_match_all('/[A-Z]/', $this->getComponentName(), $m);\n\n return strtolower(implode('', $m[0]));\n }",
"public function getAlias()\n {\n return 'e';\n }",
"public function getAlias($alias);",
"function getAlias();",
"public function getAlias()\n\t{\n\t\tif ('' == $this->alias)\n\t\t{\n\t\t\tthrow new \\RuntimeException('Alias not set.');\n\t\t}\n\n\t\treturn $this->alias;\n\t}",
"public function alias($alias = null) {\n\t\tif (!empty($alias)) {\n\t\t\t$this->alias = $alias;\n\t\t}\n\t\treturn $this->alias;\n\t}",
"public function getAlias()\n {\n if (isset($this->raw->alias)) {\n return $this->raw->alias;\n }\n\n return 'default.phar';\n }",
"public function getEmailAliasId(): string\n {\n return $this->emailAliasId;\n }",
"function _getAlias($n) {\n}",
"function getTableAlias()\r\n\t{\r\n\t\tif ( is_null( $this->table ) ) return (null );\r\n\r\n\t\t$alias =$this->table->getTableAlias();\r\n\t\tif ( is_null( $alias ) ) $alias = $this->table->table_name();\r\n\t\treturn( $alias );\r\n\t}",
"public function getAlias()\n {\n return $this->_moduleAlias;\n }",
"public function getAlias()\n {\n return 'gp';\n }",
"public function fullAlias()\n {\n if ($this->strFullAlias) {\n return $this->strFullAlias;\n } else {\n assert(!empty($this->strAlias)); // Alias should always be set by default\n return $this->strAlias;\n }\n }",
"function alias($name = '')\n {\n }",
"public function getProviderAlias(): ?string\n {\n return $this->alias;\n }",
"public function getAlias()\n {\n return 'test';\n }",
"public function getAlias() {\n if ($this->getJoins() || $this instanceof SubQuery || in_array($this->getType(), [self::CREATE_INDEX, self::DROP_INDEX])) {\n return $this->_alias;\n }\n\n return null;\n }",
"public function aliasToLabel($alias)\n {\n $alias = preg_replace('/-/', '_', $alias);\n $alias = preg_replace('/^(ic_[^_]+_[^_]+)_/', '$1.', $alias);\n $alias = preg_replace('/(_field)_/', '$1.', $alias);\n\n return $alias;\n }",
"public function getAlias()\n {\n return 'lsw_gettext_translation';\n }",
"public function aliasPath(): string\n {\n return $this->_aliasPath;\n }",
"public function getDbAlias($alias);",
"public function getAlias()\n {\n return 'ambta_doctrine_encrypt';\n }",
"public function getAlias($idx):string\n { \n return (($dbname = $this->_getDbname($idx))!=null\n ? $this->columns[$dbname]->alias\n : null);\n }",
"public function getAlias($default = \"Sans nom\")\t{\n\t\tif ( ! empty($this->alias)) {\n\t\t\treturn $this->alias;\n\t\t}\n\t\treturn $default;\n\t}",
"public function getName()\n {\n return 'ic_core_field.twig.extension.aliasToLabel';\n }",
"public final function getRelationAlias()\n {\n if (($alias = $this->getOption('relation_alias')) === null)\n throw new InvalidArgumentException('You must pass the alias name '\n .'of the relation via options.');\n \n return $alias;\n }",
"public function set_alias($alias){\n $alias = trim($alias);\n\n // we don´t need redundant data. \"name\" is always preferred if \"alias\" is empty\n if($alias === $this->name){\n $alias = '';\n }\n\n return $alias;\n }",
"protected function getColumnName($alias)\n {\n return $this->aliases[$alias] ?? $alias;\n }",
"public function getStateAlias()\n {\n return $this->state->alias;\n }",
"public function getRegistryAlias(): string\n {\n if ($this->_registryAlias === null) {\n $this->_registryAlias = $this->getAlias();\n }\n\n return $this->_registryAlias;\n }",
"public function getAlias()\n {\n return 'imagine';\n }",
"public function getAlias()\n {\n return 'imagine';\n }",
"public function getName()\n {\n return 'audience_analysis';\n }",
"public function setAlias($var)\n {\n GPBUtil::checkString($var, True);\n $this->alias = $var;\n\n return $this;\n }",
"public function getAbbreviation(): string\n {\n return $this->abbreviation;\n }",
"public function getAliasNamespace($alias)\n {\n return 'Developer2010';\n }",
"private function getAlias()\n {\n $stub = '';\n $prefix = '';\n\n if ($this->extractForce) {\n $prefix = '$dir/';\n }\n\n if ($this->web) {\n $stub .= 'Phar::webPhar(' . $this->arg($this->alias);\n\n if ($this->index) {\n $stub .= ', ' . $this->arg($prefix . $this->index, '\"');\n\n if ($this->notFound) {\n $stub .= ', ' . $this->arg($prefix . $this->notFound, '\"');\n\n if ($this->mimetypes) {\n $stub .= ', ' . var_export(\n $this->mimetypes,\n true\n );\n\n if ($this->rewrite) {\n $stub .= ', ' . $this->arg($this->rewrite);\n }\n }\n }\n }\n\n $stub .= ');';\n } else {\n $stub .= 'Phar::mapPhar(' . $this->arg($this->alias) . ');';\n }\n\n return $stub;\n }",
"private function getAlias($site_name) {\n/*\n $user = Session::getUser();\n $alias_string = $user->getAliases();\n eval(str_replace('<?php', '', $alias_string));\n $formatted_aliases = substr($alias_string, 0, -1);\n*/\n $sites_object = new Sites();\n $site = $sites_object->get($site_name);\n\n $environments = $site->environments->all();\n foreach ($environments as $environment) {\n $key = $site->get('name') . '.'. $environment->get('id');\n if (isset($aliases[$key])) {\n break;\n }\n try {\n $formatted_alias = \" \\$aliases['$key'] = \";\n $formatted_alias .= $this->constructAlias($environment);\n } catch (TerminusException $e) {\n continue;\n }\n }\n\n return $formatted_alias;\n }",
"final public function getAnnotation($name)\n\t{\n\t\tif ($name === ReflectionAnnotation::SHORT_DESCRIPTION)\n\t\t{\n\t\t\t$desc = $this->reflection->getAnnotation(ReflectionAnnotation::SHORT_DESCRIPTION);\n\t\t\tif (!$desc AND ($this instanceof ReflectionConstant OR $this instanceof ReflectionProperty OR $this instanceof ReflectionParameter))\n\t\t\t{\n\t\t\t\t$tmp = $this->reflection->getAnnotation('var');\n\t\t\t\tif (is_array($tmp) AND isset($tmp[0]) AND !isset($tmp[1]))\n\t\t\t\t{\n\t\t\t\t\t$tmp = preg_split('#\\s#', $tmp[0], 2);\n\t\t\t\t\t$desc = (isset($tmp[1]) AND $tmp[1]) ? $tmp[1] : NULL;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $desc;\n\t\t}\n\t\treturn $this->reflection->getAnnotation($name);\n\t}",
"protected function _aliasing($name, $alias, $map = [])\n\t{\n\t\tlist($first, $second) = $this->_splitFieldname($name);\n\t\tif (!$first && preg_match('/^[a-z0-9_-]+$/i', $second)) {\n\t\t\treturn $alias . \".\" . $second;\n\t\t} elseif (isset($map[$first])) {\n\t\t\treturn $map[$first] . \".\" . $second;\n\t\t}\n\t\treturn $name;\n\t}",
"public function getOrgaName();",
"public function getAnnotation($name)\n\t{\n\t\t$res = ComponentReflection::parseAnnotation($this, $name);\n\t\treturn $res ? end($res) : null;\n\t}",
"public function getAlias()\n {\n return 'import';\n }",
"public function getAlias(string $class):?string\n {\n return $this->aliases[$class] ?? null;\n }",
"private function getExposedName()\n {\n return $this->definition->getExposeAs() === null ?\n $this->getName() :\n $this->definition->getExposeAs();\n }",
"public function getAnnotation(): ?string;",
"public function getAnnotation(): ?string;",
"public function aliasField(string $field): string;",
"public function getAlias()\n {\n return 'tax';\n }",
"protected function elementName($alias)\n\t{\n\t\t// Look through the aliases. If the element is aliased, get\n\t\t// the real element's name.\n\t\tif(($element = array_search($alias, $this->elementAliases)))\n\t\t{\n\t\t\treturn $element;\n\t\t}\n\n\t\t// The element does not have an alias.\n\t\treturn $alias;\n\t}",
"public function GetAcronym() {\n\t\t$user = self::GetUserProfile();\n\t\treturn $user['akronym'];\n\t}",
"public function getPathAlias()\n {\n if (! isset($this->pathAlias)) {\n $this->pathAlias = (($nodeList = $this->getDomXPath($this->getDomDocument())->query($this->getPathAliasQuery())) && $nodeList->length)\n ? $nodeList->item(0)->value\n : null;\n }\n return $this->pathAlias;\n }",
"public function name()\n {\n return Formatter::format(\n $this->identifierParts,\n $this->getOutputFormat()\n );\n }",
"public function getProperty()\n {\n if (!$this->property) {\n $this->property = Inflector::underscore($this->alias);\n }\n\n return $this->property;\n }",
"protected function alias($property, $suffix = '', $prefix = null)\n {\n return ($prefix !== null ? $prefix : $this->getAlias()) . '.' . $property . ' ' .$suffix;\n }",
"public function namespaceAlias() {}",
"public function getAlias()\n\t{\n\t\treturn 'microformats.hreview';\n\t}",
"public function getProviderAlias(): ?string;",
"public function is_alias()\n {\n return $this->is_alias;\n }",
"private function getAlias(string $planet): string\n {\n $p = explode(\"_\", $planet);\n $lastComponent = array_pop($p);\n $nbCapitals = StringTool::countCapitals($lastComponent);\n\n $alias = \"\";\n if (1 == $nbCapitals) {\n $alias .= substr($lastComponent, 0, 1);\n while (false === empty($p)) {\n $lastComponent = array_pop($p);\n $alias .= substr($lastComponent, 0, 1);\n }\n $alias = strrev($alias);\n } else {\n $alias = preg_replace('![^A-Z]+!', '', $lastComponent);\n }\n\n return strtolower($alias);\n }",
"public function automaticAlias($data)\n\t{\n\t\t$alias = (isset($data['alias']) && $data['alias'] ? $data['alias'] : $data['title']);\n\t\t$alias = strip_tags($alias);\n\n\t\treturn preg_replace(\"/[^a-zA-Z0-9\\-]/\", '', strtolower($alias));\n\t}",
"protected function processAlias($alias)\n {\n return str_replace('*', $alias, $this->aliasFormat);\n }",
"public function getName(): string\n {\n return $this->getIdentifier()->getName();\n }",
"private function getProfileAlias(int $formId): string\n\t{\n\t\t$settings = $this->loadFormSettings($formId);\n\n\t\treturn $settings->get('profileAlias', '');\n\t}",
"public function aliased($field)\n {\n return \"{$this->getAlias()}.{$field}\";\n }",
"public function setAlias(string $alias);",
"public function attorneyName()\n {\n return $this->bean->attorney()->name;\n }",
"public function getQualifiedName()\r\n {\r\n return $this->getNamespace()->qualify($this->getName());\r\n }",
"public function aliases();",
"public function fieldNameWithAlias( $name, $alias = false ) {\n\t\tif ( !$alias || (string)$alias === (string)$name ) {\n\t\t\treturn $name;\n\t\t} else {\n\t\t\treturn $name . ' AS ' . $alias; //PostgreSQL needs AS\n\t\t}\n\t}",
"public function getAlias($dataClassStorageUnitName)\n {\n return $this->getDataClassDatabase()->getAlias($dataClassStorageUnitName);\n }"
]
| [
"0.815264",
"0.80212003",
"0.78057456",
"0.7800766",
"0.77519166",
"0.7714198",
"0.75528204",
"0.753282",
"0.753282",
"0.753282",
"0.753282",
"0.753282",
"0.753282",
"0.753282",
"0.753282",
"0.753282",
"0.75079525",
"0.74778396",
"0.74778396",
"0.7470554",
"0.74198025",
"0.7370101",
"0.7354212",
"0.7325722",
"0.7291258",
"0.72837305",
"0.72837305",
"0.72837305",
"0.72837305",
"0.72510266",
"0.6790974",
"0.6781722",
"0.6757423",
"0.67286986",
"0.6683679",
"0.6677887",
"0.6591986",
"0.65794915",
"0.6380204",
"0.6332129",
"0.63315374",
"0.6323342",
"0.6304887",
"0.62842834",
"0.62643546",
"0.62522626",
"0.62307686",
"0.622478",
"0.62124646",
"0.61913717",
"0.61004776",
"0.60972923",
"0.60705644",
"0.6064082",
"0.60368794",
"0.6012486",
"0.5991718",
"0.59718037",
"0.59601575",
"0.5953316",
"0.5947658",
"0.5947658",
"0.59417605",
"0.5924057",
"0.58979654",
"0.5896633",
"0.58962536",
"0.5886928",
"0.5885989",
"0.58626014",
"0.5800924",
"0.5797071",
"0.5774768",
"0.576963",
"0.57657975",
"0.57656324",
"0.57656324",
"0.574603",
"0.57444537",
"0.574198",
"0.57316536",
"0.57289916",
"0.57252026",
"0.5712636",
"0.57077783",
"0.569115",
"0.568464",
"0.56749356",
"0.5672001",
"0.5671256",
"0.5654184",
"0.5642744",
"0.5629011",
"0.5626278",
"0.5618479",
"0.5613376",
"0.5603111",
"0.560069",
"0.55970424",
"0.55961716",
"0.5595796"
]
| 0.0 | -1 |
$weekDay = date('w', strtotime($date)); | function isWeekend($date) {
return (date('N', strtotime($date)) >= 6);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function week($date)\n{\n $week =array(\"周日\",\"周一\",\"周二\",\"周三\",\"周四\",\"周五\",\"周六\");\n return $week[date(\"w\",strtotime($date))];\n}",
"public function getMondayOfTheWeek($date) {\n $weekno = self::getISOWeekNo($date);\n return date('Y-m-d', strtotime(\"$date - $weekno days\"));\n }",
"public static function week(){\n\t\t$w = date(\"w\", time());\n\t\treturn date('Y-m-d', time() - $w*24*60*60 );\n\t}",
"function week_number($date)\n\t\t\t\t\t\t\t\t\t\t{\t \n\t\t\t\t\t\t\t\t\t\t\treturn date(\"W\", strtotime(\"$date + 1 day\"));\n\t\t\t\t\t\t\t\t\t\t}",
"function week_number($date)\n\t\t\t\t\t\t\t{\t \n\t\t\t\t\t\t\t\treturn date(\"W\", strtotime(\"$date + 1 day\"));\n\t\t\t\t\t\t\t}",
"public static function toWeek($date){\n $time = mktime(0,0,0,substr($date,5,2),substr($date,8,2),substr($date,0,4));\n $Arry = getdate($time);\n $week = $Arry['weekday'];\n if($week==\"Saturday\"||$week==\"Sunday\"){\n return $week;\n }else{\n return \"normal\";\n }\n }",
"function get_week_no($cur_date){\n $date_split=split(\"-\",$cur_date);\n return date(\"W\",mktime (0,0,0,$date_split[1],2,$date_split[2]));\n }",
"function get_day_of_week($day)\n{\n return jddayofweek($day, 1);\n}",
"function dayOfWeek($timestamp) { \n\t\treturn intval(strftime(\"%w\",$timestamp))+1; \n\t}",
"public function getSundayOfTheWeek($date) {\n $weekno = self::getISOWeekNo($date);\n return date('Y-m-d', strtotime(\"$date + \".(6 - $weekno).\" days\"));\n }",
"public function getDateStartWeek($date=null){\n\t\t$dateNew = date(\"Y-m-d H:i:s\",strtotime('monday this week', strtotime($date)));\n\t\treturn $dateNew;\n\t}",
"public function getDayNumberOfWeek(){\n\t\tif($this->_year>1970&&$this->_year<2038){\n\t\t\treturn date('w', $this->_timestamp);\n\t\t} else {\n\t\t\t$dateParts = self::_getDateParts($this->_timestamp, false);\n\t\t\treturn $dateParts['wday'];\n\t\t}\n\t}",
"public function getDayOfWeek()\r\n {\r\n return date('N', $this->getTimestampUnix());\r\n }",
"function get_day_of_week()\n {\n if (date(\"D\", $this->timestamp)==\"Sun\")\n {\n return 0;\n } else if (date(\"D\", $this->timestamp)==\"Mon\")\n {\n return 1;\n } else if (date(\"D\", $this->timestamp)==\"Tue\")\n {\n return 2;\n } else if (date(\"D\", $this->timestamp)==\"Wed\")\n {\n return 3;\n } else if (date(\"D\", $this->timestamp)==\"Thu\")\n {\n return 4;\n } else if (date(\"D\", $this->timestamp)==\"Fri\")\n {\n return 5;\n } else if (date(\"D\", $this->timestamp)==\"Sat\")\n {\n return 6;\n } else\n {\n return \"error\";\n }\n }",
"public function getWeekDay($day)\n {\n return dt('%A', strtotime('next Monday +'.($day - 1).' days'));\n }",
"function getDayIndex($dateString)\n{\n return date('w', strtotime($dateString));\n}",
"function weekOfMonth($date) {\n $firstOfMonth = strtotime(date(\"Y-m-d\", $date));\n //Apply above formula.\n return intval(date(\"W\", $date)) - intval(date(\"W\", $firstOfMonth)) + 1;\n}",
"public function getDayOfTheWeek();",
"public static function getWeek($date, $format = 'Y-m-d') {\r\n \r\n }",
"function weekOfMonth($date) {\n $firstOfMonth = strtotime(date(\"Y-m-01\", $date));\n //Apply above formula.\n return intval(date(\"W\", $date)) - intval(date(\"W\", $firstOfMonth)) + 1;\n}",
"public function getDayOfWeek()\n {\n return $this->day_of_week;\n }",
"static public function getWeek($date)\n {\n\t \t$start_date = $date->startOfWeek();\n\t\t$end_date = $date->copy()->endOfWeek()->subDay(2); ;\n\n\t\t$weeks = array(\n\t\t\t\"start_end\" => array(\"start\" => $start_date,\"end\" => $end_date,\"week\" => $start_date->copy()->weekOfYear),\n\t\t\t\"days\" => array(\"monday\" => $start_date,\"tuesday\" => $start_date->copy()->addDay(),\"wednesday\" => $start_date->copy()->addDay(2),\"thursday\" => $start_date->copy()->addDay(3),\"friday\" => $start_date->copy()->addDay(4))\n\t\t\t);\n\n\t\treturn $weeks;\n }",
"public function getWeekNumber($date)\n\t{\n\t $firstOfMonth = strtotime(date(\"Y-m-01\", strtotime($date)));\n\t //Apply above formula.\n\t return $this->ordinal(intval(date(\"W\", strtotime($date))) - intval(date(\"W\", $firstOfMonth)));\n\t}",
"function getWeekday($var){\nreturn $this->mkActiveDate(\"w\", $this->mkActiveTime(0,0,1,$this->actmonth,$var,$this->actyear));\n}",
"public function getISOWeekNo($date) {\n return ((((date('w', strtotime($date)) - 1)%7)+7)%7);\n }",
"function day_of_week($month, $day, $year)\n\t{\n\t\tif ( ! function_exists('gregoriantojd'))\n\t\t{\n\t\t\treturn date('w', mktime(0, 1, 1, $month, $day, $year));\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn jddayofweek(gregoriantojd($month, $day, $year));\n\t\t}\n\t}",
"public function getDayOfWeek()\n {\n return $this->dayOfWeek;\n }",
"function _makeWeek($date){\n // by keeping it the central date of the week,\n // i.e. the 4th day, makes a week and returns\n // an array of the form\n // [ { day : 'Monday, etc.', date : '2019-2-24' ... etc} ]\n // ------------------------------------------------\n // This function gets date in form of 'YYYY-MM-DD'\n\n $carbon = new Carbon($date);\n $carbon->add(-3, 'day');\n $week = [];\n for($i = 0; $i < 7; $i += 1){\n $week[] = $this->_makeDay($carbon);\n $carbon->add(1,'day');\n }\n return $week;\n }",
"function dow($d) {\n\treturn date('D', strtotime(\"Sunday +{$d} days\"));\n}",
"public function GetWeekStartDate( $start_day = 1 ){\r\n\t\t\t$date_timestamp = $this->GetAsTimestamp();\r\n\t\t\t$week_start = date('U', mktime(1, 0, 0, date('m', $date_timestamp), date('d', $date_timestamp)-(date('w', $date_timestamp)-$start_day), date('Y', $date_timestamp)) - 3600 );\r\n\r\n\t\t\treturn $week_start;\r\n\t\t}",
"public function getDateEndWeek($date=null){\n\t\t$dateNew = date(\"Y-m-d H:i:s\",strtotime('sunday this week', strtotime($date)));\n\t\treturn $dateNew;\n\t}",
"function getWeekStart($date = null, $firstDayOfTheWeek = 'Monday') {\n\t\tif (!is_numeric($date)) {\n\t\t\t$date = strtotime($date);\n\t\t}\n\n\t\t$date = mktime(0, 0, 0, date('m', $date), date('d', $date), date('Y', $date));\n\t\t$daysMap = array(\n\t\t\t'Sunday'\n\t\t\t, 'Monday'\n\t\t\t, 'Tuesday'\n\t\t\t, 'Wednesday'\n\t\t\t, 'Thursday'\n\t\t\t, 'Friday'\n\t\t\t, 'Saturday'\n\t\t);\n\n\t\t$firstDayOfTheWeek = array_search($firstDayOfTheWeek, $daysMap);\n\t\t$offset = (date('w', $date) + 7 - $firstDayOfTheWeek) % 7;\n\t\treturn strtotime('-'.$offset.' days', $date);\n\t}",
"public function GetWeek($leadingZero = true) {\n return $leadingZero ? $this->format('W') : (int)$this->format('W');\n }",
"function getWeekNum($var){\nreturn date(\"W\", $this->mkActiveTime(0,0,1,$this->actmonth,$var,$this->actyear))+0;\n}",
"public function getWeekOfYear(): string\n {\n return $this->toLocalizedString('w');\n }",
"function firstDayOfWeek($year,$month,$day){\n global $fd;\n $dayOfWeek=date(\"w\");\n $sunday_offset=$dayOfWeek * 60 * 60 * 24;\n $fd = date(\"Y-m-d\", mktime(0,0,0,$month,$day+1,$year) - $sunday_offset);\n return $fd;\n}",
"public function getDayOfWeek(){\n\t\t$locale = $this->getLocale();\n\t\t$days = $locale->getDaysNamesList();\n\t\treturn ucfirst($days[$this->getDayNumberOfWeek()]);\n\t}",
"function getYearWeekShiftedSunday($date) {\n\n $date_year = $date->format('Y');\n $date_week = $date->format('W');\n\n //if sunday push week forward by one since default is M->Su and we want Su->Sa\n if ($date->format('w') == 0) {\n\n if (date('W', strtotime($date->format('Y') . \"-12-31\")) == 52 and $date->format('W') == 52) {\n $date_week = 1;\n $date_year++;\n } elseif (date('W', strtotime($date->format('Y') . \"-12-31\")) == 53 and $date->format('W') == 53) {\n $date_week = 1;\n $date_year++;\n } else {\n $date_week++;\n }\n }\n\n //pad the week with 0\n $date_week_padded = str_pad($date_week, 2, '0', STR_PAD_LEFT);\n return $date_year.$date_week_padded;\n\n }",
"function weekday($date_arr) {\n // using Zeller's rule to determine weekdays, reference: http://mathforum.org/dr.math/faq/faq.calendar.html\n $day_of_month = (float)$date_arr[0];\n // month -2 to make formula more simple\n $month = (float)$date_arr[1] - 2;\n if ($month < 0) {\n // Jan => 11, Feb => 12\n $month = $month + 12;\n }\n $year_last_2_digit = (float)$date_arr[2] % 100;\n if ($month >= 11) {\n // Jan and Feb are put into last year since month -2 above\n $year_last_2_digit = $year_last_2_digit - 1;\n }\n $century = (float)$date_arr[2] / 100;\n $f = $day_of_month + ((13 * $month - 1) / 5) + $year_last_2_digit + ($year_last_2_digit / 4) + ($century / 4) - 2 * $century;\n while ($f < 0) {\n $f += 7;\n }\n $day_in_week = $f % 7;\n // 0 is sunday, 6 is saturday\n return $day_in_week;\n }",
"static function weekDay($wday, $time=null, $sundayFirst=true){\r\n\t\tif(!isset($time)) $time = self::ms()/1000;\r\n\t\tif(!$sundayFirst){\r\n\t\t\t$e = array_shift(self::$weekDays);\r\n\t\t\tself::$weekDays = array_merge(self::$weekDays,array($e));\r\n\t\t}\r\n\t\t$prefix = $wday<date(\"w\") ? \"last\":\"this\"; \r\n\t\treturn date(self::Ymd_FORMAT,strtotime($prefix.\" \".self::$weekDays[$wday], $time));\r\n\t}",
"function day_from_iso_date($date) {\n $datetime = date_create($date);\n $d = date_format($datetime,\"D\");\n switch ($d) {\n case 'Sun':\n return 1;\n case 'Mon':\n return 2;\n case 'Tue':\n return 3;\n case 'Wed':\n return 4;\n case 'Thu':\n return 5;\n case 'Fri':\n return 6;\n case 'Sat':\n return 7;\n default:\n return 0;\n }\n}",
"function getWeekDay($mode = CDATETIME_WEEK_FIRST_DAY_MONDAY)\n {\n $info = getdate($this->__timestamp);\n\n // Apply week day offset, after that we'll have: 0 for Monday through 6 for Sunday\n if ($mode == CDATETIME_WEEK_FIRST_DAY_MONDAY)\n {\n $info['wday'] = ($info['wday'] == 0 ? 6 : $info['wday'] - 1);\n }\n return $info['wday']; //Numeric representation of the day of the week\n }",
"public function _getWeekBeginningDate($date) {\n\t\t$dateTime = strtotime(\"2:00 \" . $date);\n\t\tif(date('w',$dateTime) == '1') {\n\t\t\t// It's Monday, so return the same date\n\t\t\treturn $dateTime;\n\t\t} else {\n\t\t\t// return last Monday's date\n\t\t\treturn strtotime('this week last monday', $dateTime);\n\t\t}\n\t}",
"public function getWeek()\n {\n return $this->week;\n }",
"public function dayOfTheWeek($fecha){\n $i = strtotime($fecha);\n $day= jddayofweek(cal_to_jd(CAL_GREGORIAN, date(\"m\",$i),date(\"d\",$i), date(\"Y\",$i)) , 0 );\n return $day;\n }",
"function getDayOfWeek()\r\n {\r\n return Data_Calc::diaDaSemana($this->dia, $this->mes, $this->ano);\r\n }",
"function get_monday($startdate = null, $week_offset = 0) {\n if ($startdate) {\n $startdate = strtotime($startdate);\n } else {\n $startdate = time();\n }\n\n $dow = date(\"w\", $startdate);\n //print \"Today is dow $dow (Monday is 1)\\n\";\n \n // How many days ago was monday?\n $offset = ($dow -1);\n if ($offset <0) {\n $offset = 6;\n }\n //print \"Offset = $offset\\n\";\n \n if ($week_offset > 0) {\n $offset = $offset - ($week_offset * 7);\n }\n\n $monday = date(\"Y-m-d\", mktime(0,0,0,date('m', $startdate), date('d', $startdate)-$offset, date('Y', $startdate) ));\n \n //print \"Previous monday is $monday\";\n \n return $monday;\n}",
"function weekNumber($wday,$wmonth,$wyear) {\r\nglobal $weekstartday ;\r\n\tif (substr($wmonth,0,1) == \"0\"){ $wmonth = str_replace(\"0\",\"\",$wmonth);}\r\n\tif (substr($wday,0,1) == \"0\"){ $wday = str_replace(\"0\",\"\",$wday);}\r\n\t$WeekNumber = 1;\r\n\t$firstdayofyear = date(\"w\", mktime(0,0,0,1,1,$wyear)) ;\r\n\t$dayoffset = $firstdayofyear + 6; \r\n $WeekNumber = floor(((date(\"z\", mktime(0,0,0,$wmonth,$wday,$wyear)))+$dayoffset) / 7) ;\r\n\tsettype($WeekNumber,\"integer\");\r\n\tif ($firstdayofyear>5) $WeekNumber = $WeekNumber - 1;\r\n\tif (($firstdayofyear<5)&&($WeekNumber==53)) {\r\n\t\tif (date(\"w\", mktime(0,0,0,12,31,$wyear))>4) $WeekNumber=53;\r\n\t\telse $WeekNumber = 1;\r\n\t}\r\n\treturn $WeekNumber;\r\n}",
"public function getNextWeek($date=null){\n\t\t$dateNew = date(\"Y-m-d H:i:s\",strtotime(\"+1 week\", strtotime($date)));\n\t\treturn $dateNew;\n\t}",
"function dateToWeek($qDate){\n $dt = strtotime($qDate);\n $day = date('j',$dt);\n $month = date('m',$dt);\n $year = date('Y',$dt);\n $totalDays = date('t',$dt);\n $weekCnt = 1;\n $retWeek = 0;\n for($i=1;$i<=$totalDays;$i++) {\n $curDay = date(\"N\", mktime(0,0,0,$month,$i,$year));\n if($curDay==7) {\n if($i==$day) {\n $retWeek = $weekCnt+1;\n }\n $weekCnt++;\n } else {\n if($i==$day) {\n $retWeek = $weekCnt;\n }\n }\n }\n return $retWeek;\n}",
"function isWeekday($timestamp) {\r\n\treturn (date('N', $timestamp) < 6); // ISO DoW (7 = Sunday)\r\n}",
"function getDayOfWeek($y, $m, $d)\n {\n return Date_Calc::dayOfWeek($d, $m, $y);\n }",
"function next_weekday($weekday) {\n global $week_names;\n $date = new DateTime();\n $i = (int)$date->format(\"w\"); // 0=Sunday\n $j = array_search($weekday, $week_names); // 0=Monday\n $diff = (($j+1) - $i + 7); // days til next $weekday [0..6]\n $diff = ($diff+6)%7+1; // days til next $weekday [1..7]\n $date->modify(\"+$diff days\");\n return $date;\n}",
"function getFirstDayOfWeek($y=NULL, $m=NULL, $d=NULL)\n {\n return 1;\n }",
"function get_start_of_week(): int\n{\n $cal = \\IntlCalendar::createInstance(null, get_locale());\n //return \\get_option('start_of_week');\n return $cal->getFirstDayOfWeek() - 1;\n}",
"public static function getWeek(){\n\t\t// this represents the number of seconds ni a month\n\t\t// editing this will lead to false values\n\t\treturn 604800;\n\t}",
"function get_weekname()\n {\n $newdate=$this->aclone();\n $newdate->find_start_of_week();\n $return_string=$newdate->get_year();\n $return_string=$return_string.\"_\";\n $return_string=$return_string.$newdate->get_month();\n $return_string=$return_string.\"_\";\n $return_string=$return_string.$newdate->get_day();\n return $return_string;\n }",
"public static function getDayOfWeek($baseDate) {\n\t\t$r = \"\";\n\t\t$dateArray = qdat::getDateArray($baseDate);\n\t\t$r = $dateArray[\"weekday\"];\n\t\treturn $r;\n\t}",
"public function getWeeksToNow()\n {\n // Difference in seconds\n $difference = $this->getFromDate() - time();\n return floor($difference / $this->_secondsInAWeek);\n }",
"public function isWeekend($date) {\r\n $weekDay = date('w', strtotime($date));\r\n return ($weekDay == 0 || $weekDay == 6);\r\n}",
"function lastDayOfWeek($year,$month,$day){\n global $ld;\n $dayOfWeek=date(\"w\");\n $saturday_offset=(6-$dayOfWeek) * 60 * 60 * 24 ;\n $ld = date(\"Y-m-d\", mktime(0,0,0,$month,$day+1,$year) + $saturday_offset);\n return $ld;\n}",
"static public function timestampThisWeek()\n {\n // On Su, 2013/03/24, it returned timestamp of Mo, 2013/03/25\n // instead of timestamp of Mo, 2013/03/18\n // \n // return strtotime( 'this week' );\n \n return self::timestampCalendarWeek( self::weekOfTheYear() );\n }",
"function getFirstDay($year, $month, $day_of_week) {\n $num = date(\"w\",mktime(0,0,0,$month,1,$year));\n if($num==$day_of_week) {\n return date(\"j\",mktime(0,0,0,$month,1,$year));\n }\n elseif($num>$day_of_week) {\n return date(\"j\",mktime(0,0,0,$month,1,$year)+(86400*((7+$day_of_week)-$num)));\n }\n else {\n return date(\"j\",mktime(0,0,0,$month,1,$year)+(86400*($day_of_week-$num)));\n }\n}",
"public function weekdayControl(){\n\t\t$weekday = date('w', time());\n\t\t//remakes $weekday to the weekdays name\n\t\tswitch($weekday){\n\t\t\tcase 0:\t$weekday = \"Söndag\"; break;\n\t\t\tcase 1:\t$weekday = \"Måndag\"; break;\n\t\t\tcase 2:\t$weekday = \"Tisdag\"; break;\t\n\t\t\tcase 3:\t$weekday = \"Onsdag\"; break;\n\t\t\tcase 4:\t$weekday = \"Torsdag\";break;\n\t\t\tcase 5:\t$weekday = \"Fredag\"; break;\n\t\t\tcase 6:\t$weekday = \"Lördag\"; break;\n\t\t}\t\t\t\n\t\t\n\t\treturn $weekday; \n\t}",
"public static function isThisWeek($date)\n {\n return date('W Y', $date) == date('W Y', time());\n }",
"function getWeeks($date) {\n\t\n\t\t$start = strtotime($date);\n\t\t$end = strtotime(date(\"Y-m-t\", strtotime($date)));\n\t\t$arr = array();\n\t\twhile ($start <= $end) {\n\t\t\t$d = getdate($start);\n\t\t\t$dayOfWeek = $d['wday'];\n\t\t\t$endDate = date('Y-m-d', strtotime(date(\"Y-m-d\",$start) . \" + \" . (6 - $dayOfWeek) . \" days\"));\n\t\t\tif(date(\"m\", strtotime($endDate)) != date(\"m\", strtotime($date))) {\n\t\t\t\t$endDate = date(\"Y-m-t\", strtotime($date));\n\t\t\t}\n\t\t\t$arr[] = array(date(\"Y-m-d\",$start), $endDate);\n\t\t\t$start = strtotime($endDate) + (60*60*24);\n\t\t\t\n\t\t\n\t\t}\n\t\treturn $arr;\n\t}",
"function nextWeek(){ return $this->_getDate(7);\t}",
"public function GetFirstWeekOfMonth() {\n return (int)date('W', strtotime($this->format('Y-m-01')));\n }",
"public function getDayOfWeek(): string\n {\n return $this->toLocalizedString('c');\n }",
"function the_weekday()\n {\n }",
"function oneWeekEarlierDate($date) {\n return date('Y-m-d', strtotime(\"$date -1 week\"));\n }",
"public function getWeekOfMonth(): string\n {\n return $this->toLocalizedString('W');\n }",
"private static function getWeekStart($date, $profile) {\n $ts = strtotime($date);\n $dow = date(\"N\", $ts);\n $ds = $profile->dowStart;\n $wl = $profile->weekLength;\n if ($dow < $ds) {\n $offset = $ds;\n } else if ($dow >= $ds + $wl) {\n $offset = ($ds + 7) - $dow;\n } else {\n $offset = $ds - $dow;\n }\n return strtotime($offset . \" day\", $ts);\n }",
"function getDaysInWeek($y=NULL, $m=NULL, $d=NULL)\n {\n return 7;\n }",
"public static function firstDayOfWeek(?DateTimeInterface $date = null): static\n\t{\n\t\t$date = self::checkDate($date);\n\t\t$dayOfWeek = (int) $date->format('N');\n\n\t\tif ($dayOfWeek === 1) {\n\t\t\treturn static::from($date->format('Y-m-d'));\n\t\t}\n\n\t\treturn static::from($date->format('Y-m-d') . ' -' . ($dayOfWeek - 1) . ' day');\n\t}",
"public static function returnDayOfWeek($year, $month, $day) {\r\n\t\t\t$dayOfWeek = date(\"w\", mktime(0, 0, 0, $month, $day, $year));\r\n\t\t\tif($dayOfWeek == 0)\r\n\t\t\t\t$dayOfWeek = 7;\r\n\r\n\t\t\treturn $dayOfWeek;\r\n\t\t}",
"public function getWeek($date){\n // OUTPUT : JSON format of all the week according the the DB\n $week = $this->_makeWeek($date);\n for($i = 0; $i < count($week); $i += 1){\n $_day = $week[$i];\n // Get from the data base if a date exists (this means that there is somekind of agenda stored in the DB w.r.t. this day)\n $day = \\App\\Day::where('date', $_day['full_date'])->first();\n if ($day != null){\n foreach($day->Agenda as $agenda){\n $week[$i]['items'][] = $this->_makeAgenda($agenda);\n }\n }\n }\n return $week;\n }",
"public function showday($day,$month){\n$date = \"2021-$day-$month\";\n//Get the day of the week using PHP's date function.\n$dayOfWeek = date(\"l\", strtotime($date));\n//Print out the day that our date fell on.\necho $date . ' เป็นวัน ' . $dayOfWeek;\nreturn $dayOfWeek;\n }",
"public function getFirstDay(){$day = getdate(mktime(0, 0, 0, $this->getMonth(), 1, $this->getYear())); return $day['wday'];}",
"public function get_current_week_value()\n {\n // Today is first day of week\n if ((int) RightPress_Helper::get_adjusted_datetime(null, 'w') === RightPress_Helper::get_start_of_week()) {\n return 'midnight';\n }\n else {\n return 'midnight last ' . RightPress_Helper::get_literal_start_of_week();\n }\n }",
"public function compareWeek(Date $date)\n {\n $currentWeek = date('W', $this->getTimestamp());\n $toCompareWeek = date('W', $date->getTimestamp());\n if ($currentWeek == $toCompareWeek) {\n return 0;\n }\n if ($currentWeek < $toCompareWeek) {\n return -1;\n }\n return 1;\n }",
"function jr_week_start_date($week, $year, $format = \"d-m-Y\") {\r\n\r\n\t$first_day_year = date(\"N\", mktime(0,0,0,1,1,$year));\r\n\tif ($first_day_year < 5)\r\n\t\t$shift =-($first_day_year-1)*86400;\r\n\telse\r\n\t\t$shift=(8-$first_day_year)*86400;\r\n\tif ($week > 1) $week_seconds = ($week-1)*604800; else $week_seconds = 0;\r\n\t$timestamp = mktime(0,0,0,1,1,$year) + $week_seconds + $shift;\r\n\r\n\treturn date($format, $timestamp);\r\n}",
"static public function dateToWords($time)\n {\n\n //change sql datetime to unix timestamp\n $phptime = strtotime($time); \n \n //The functions takes the date as a timestamp \n $_word = \"\";\n\n //Get the difference between the current time and the time given in days \n $days = intval((time() - $phptime) / 86400);\n \n if($days < 0) return -1;\n \n switch($days) {\n case 0: $_word = self::STR_TODAY;\n break;\n case 1: $_word = self::STR_YESTERDAY;\n break;\n case ($days >= 2 && $days <= 6): \n $_word = sprintf(self::STR_DAYS, $days);\n break;\n case ($days >= 7 && $days < 14): \n $_word= self::STR_WEEK;\n break;\n\n $_word = sprintf(self::STR_WEEKS, intval($days / 7));\n break;\n default : \n return date(self::DATE_FORMAT, $phptime);\n }\n return $_word;\n }",
"public function getPrevWeek($date=null){\n\t\t$dateNew = date(\"Y-m-d H:i:s\",strtotime(\"-1 week\", strtotime($date)));\n\t\treturn $dateNew;\n\t}",
"public function get_salesbuzz_week_number(){\n /**\n * dayOfWeek+1 1 (for Sunday) through 7 (for Saturday)\n * dayOfYear 0 through 365 (for normal years)\n */\n\n $today = Carbon::today();\n\n $f1 = today()->firstOfYear();\n\n $diffDays = 7 - ($f1->dayOfWeek+1);\n\n $numDays = ($today->dayOfYear+1) - $diffDays;\n\n $numWeeks = ceil($numDays/7+1);\n\n $weekNum = $numWeeks % 4 ;\n\n return $weekNum==0 ? 4 : $weekNum;\n }",
"function week_start_end_by_date($date, $format = 'Y-m-d') { if (is_numeric($date) AND strlen($date) == 10) {\n $time = $date;\n } else {\n $time = strtotime($date);\n }\n\n $week['week'] = date('W', $time);\n $week['year'] = date('o', $time);\n $week['year_week'] = date('oW', $time);\n $first_day_of_week_timestamp = strtotime($week['year'] . \"W\" . str_pad($week['week'], 2, \"0\", STR_PAD_LEFT));\n $week['first_day_of_week'] = date($format, $first_day_of_week_timestamp);\n $week['first_day_of_week_timestamp'] = $first_day_of_week_timestamp;\n $last_day_of_week_timestamp = strtotime($week['first_day_of_week'] . \" +6 days\");\n $week['last_day_of_week'] = date($format, $last_day_of_week_timestamp);\n $week['last_day_of_week_timestamp'] = $last_day_of_week_timestamp;\n\n return $week;\n }",
"public function getIncWeek($date=null,$inc){\n\t\t$dateNew = date(\"Y-m-d H:i:s\",strtotime(\"+\".$inc.\" week\", strtotime($date)));\n\t\treturn $dateNew;\n\t}",
"function dateDiffWeek ($d1, $d2) {\n// Return the number of weeks between the two dates:\n\n return round(abs(strtotime($d1)-strtotime($d2))/(DAY_VAL*7));\n\n}",
"public function get_first_day_of_week()\n\t{\n\t\t$this->first_day_of_week = $this->data->get_first_day_of_week($this->first_day_of_week);\n\t\treturn $this->first_day_of_week;\n\t}",
"public static function getWeekday($dayNo) {\n $days = self::getWeekdays(true);\n return isset($days[$dayNo]) ? $days[$dayNo] : false;\n }",
"function getDayOfWeek($dayNumber)\r\n\t{\r\n\t\tswitch($dayNumber)\r\n\t\t{\r\n\t\t\tcase 0: return \"Sunday\"; break;\r\n\t\t\tcase 1: return \"Monday\"; break;\r\n\t\t\tcase 2: return \"Tuesday\"; break;\r\n\t\t\tcase 3: return \"Wednesday\"; break;\r\n\t\t\tcase 4: return \"Thursday\"; break;\r\n\t\t\tcase 5: return \"Friday\"; break;\r\n\t\t\tcase 6: return \"Saturday\"; break;\r\n\t\t\tdefault: return null; break;\r\n\t\t}\r\n\t}",
"function convert_date_to_daymmdd($date) {\n\t$date = date('l m/d', strtotime($date));\n\n\treturn $date;\n}",
"function localizeWeekDay($str)\n{\n\tswitch ($str)\n\t{\n\t\tcase \"Mon\": \n\t\t\treturn \"MA\";\n\t\tcase \"Tue\": \n\t\t\treturn \"TU\";\n\t\tcase \"Wed\": \n\t\t\treturn \"KE\";\n\t\tcase \"Thu\": \n\t\t\treturn \"TO\";\n\t\tcase \"Fri\": \n\t\t\treturn \"PE\";\n\t\tcase \"Sat\": \n\t\t\treturn \"LA\";\n\t\tcase \"Sun\": \n\t\t\treturn \"SU\";\n\t\tdefault:\n\t\t\treturn $str;\n\t}\n}",
"function getWeeks($date, $rollover)\n {\n $cut = substr($date, 0, 8);\n $daylen = 86400;\n\n $timestamp = strtotime($date);\n $first = strtotime($cut . \"00\");\n $elapsed = ($timestamp - $first) / $daylen;\n\n $weeks = 1;\n\n for ($i = 1; $i <= $elapsed; $i++)\n {\n $dayfind = $cut . (strlen($i) < 2 ? '0' . $i : $i);\n $daytimestamp = strtotime($dayfind);\n\n $day = strtolower(date(\"l\", $daytimestamp));\n\n if($day == strtolower($rollover)) $weeks ++;\n }\n\n return $weeks;\n }",
"function week_class($monday) {\n $class = '';\n \n $this_monday = get_monday();\n \n if ($monday == $this_monday) {\n $class = 'currentweek';\n } elseif ($monday < $this_monday) {\n $class = 'past';\n }\n \n \n \n return $class;\n}",
"function getDay($dayIndex)\n{\n return date('l', strtotime(\"Sunday +{$dayIndex} days\"));\n}",
"public static function getNumWk($date)\n {\n $num = ceil($date->format('j') / 7);\n \n if ($num > 2) {\n $tester = clone $date;\n $tester->modify(\"last {$date->format('l')} of this month\");\n \n $num = -1 * (1 + (($tester->format('j') - $date->format('j')) / 7));\n }\n \n return $num;\n }",
"function dayOfWeek()\n {\n echo \"Enter the day: \\n\";\n $d = AlgorithmsUtility::get_Integer();\n echo \"Enter the month: \\n\";\n $m = AlgorithmsUtility::get_Integer();\n echo \"Enter the year. \\n\";\n $y = AlgorithmsUtility::get_Integer();\n\n $y0 = floor($y - (14 - $m) / 12) + 1;\n $x = floor($y0 + $y0 / 4 - $y0 / 100 + $y0 / 400);\n $m0 = ($m + 12 * floor(((14 - $m) / 12)) - 2);\n $d0 = floor(($d + $x + floor((31 * $m0) / 12)) % 7);\n $d1 = \"Sunday Monday Tuesday Wednesday Thursday Friday Saturday\";\n $day = explode(\" \", $d1);\n echo \"day on given date is \" . $day[$d0] . \"\\n\";\n }",
"function calcPositionInWeek($jeDate)\t// $jeDate is a JEventDate\n\t{\n\t\t// If we start the display of weeks on Sunday (com_starday=0), then everything is simple.\n\t\t// If we start on Monday (com_starday=1), then we need to shift the day of the week down\n\t\t// by one and Sunday, normally 0 - the first day, becomes 6 - the last day.\n\t\t\n\t\t$config = & JEVConfig::getInstance();\n\t\t\n\t\t$dayOfWeek = $this->calcDayOfWeek($jeDate);\t// This returns 0 for Sunday thru 6 for Saturday\n\t\t\n\t\treturn ($config->get('com_starday') == 1) ? (($dayOfWeek == 0) ? 6 : ($dayOfWeek - 1)) : $dayOfWeek;\n\t}",
"protected function getNumberOfWeeks()\n {\n $first = date(\"w\", strtotime($this->date));\n $last = date(\"t\", strtotime($this->date));\n return (1 + ceil(($last - 7 + $first) / 7));\n }",
"function format_date( $sql_date ) {\n\t\n\t$timestamp = strtotime($sql_date); //UNIX TIMESTAMP OF SQL DATE\n\n\t\t//then it's over a week\n\t\t$format = \"%B %e\";\n\t\t$formatteddate = strftime ($format, $timestamp);\n\t\t\n\treturn strtoupper($formatteddate);\n}"
]
| [
"0.8275333",
"0.8080087",
"0.79201245",
"0.7877209",
"0.7841021",
"0.76896375",
"0.76059955",
"0.7590249",
"0.75405186",
"0.7536159",
"0.7440432",
"0.71550363",
"0.7107212",
"0.7102844",
"0.70571846",
"0.7036336",
"0.7023592",
"0.70185816",
"0.7005465",
"0.69733757",
"0.6821145",
"0.681426",
"0.6798243",
"0.67649144",
"0.6750286",
"0.674874",
"0.6706833",
"0.66781706",
"0.6646266",
"0.6623973",
"0.6616511",
"0.66116667",
"0.6608109",
"0.65835255",
"0.6578302",
"0.6578133",
"0.65491194",
"0.6524798",
"0.64970225",
"0.64816874",
"0.64749837",
"0.6470287",
"0.6467129",
"0.6444232",
"0.64438665",
"0.6432162",
"0.6429477",
"0.6421346",
"0.64049375",
"0.6384768",
"0.6356829",
"0.63161886",
"0.6308644",
"0.629771",
"0.6291587",
"0.6258184",
"0.6252433",
"0.6252414",
"0.6250504",
"0.62310266",
"0.62158394",
"0.6186527",
"0.6186013",
"0.61731905",
"0.614992",
"0.6136046",
"0.6132104",
"0.61231774",
"0.6105353",
"0.6098833",
"0.60865474",
"0.60808563",
"0.60696846",
"0.60637736",
"0.6056563",
"0.6042374",
"0.6035991",
"0.6025822",
"0.6002219",
"0.5998849",
"0.5997667",
"0.5970514",
"0.5963334",
"0.5953158",
"0.5946751",
"0.5941974",
"0.59355724",
"0.5927923",
"0.5919488",
"0.5905904",
"0.5896957",
"0.58802587",
"0.58763444",
"0.5863099",
"0.5855779",
"0.58540976",
"0.5822954",
"0.58198273",
"0.58147603",
"0.58127105",
"0.58068967"
]
| 0.0 | -1 |
Run Method. Write your database seeder using this method. More information on writing seeders is available here: | public function run()
{
$types = [
'NEWS',
'SUPPORT',
];
$faker = Faker\Factory::create();
$data = [];
foreach ($types as $type) {
for ($i = 0; $i <= 10; $i++) {
$cat_id = 1;
$title = $faker->paragraph;
$data[] = [
'pos_title' => $title,
'pos_rewrite' => removeTitle($title),
'pos_image' => $faker->image(dirname(__FILE__) . '/../../public/upload/', 254, 169,
'technics', false),
'pos_teaser' => $faker->paragraph(2),
'pos_content' => $faker->paragraph(10),
'pos_active' => 1,
'pos_category_id' => $cat_id,
'pos_is_hot' => round(rand(0, 1)),
'pos_show_home' => round(rand(0, 1)),
'pos_type' => strtoupper($type)
];
}
}
$table = $this->table('posts');
$table->truncate();
$table->insert($data)
->save();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"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(AboutTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n //$this->call(SettingsTableSeeder::class);\n \n\t #iseed_start\n\n\t //$this->call('UsersTableSeeder');\n\t $this->call('AboutTableSeeder');\n $this->call('GalleriesTableSeeder');\n $this->call('MessagesTableSeeder');\n $this->call('MessageStatusesTableSeeder');\n $this->call('ProjectsTableSeeder');\n $this->call('ProjectPropertiesTableSeeder');\n $this->call('PropertiesTableSeeder');\n $this->call('SettingsTableSeeder');\n #iseed_end\n }",
"public function run()\n {\n factory(App\\Models\\Post::class, 1000)->create();\n\n // this is hardcoded info for the seeder to run\n \t// $user1 = new App\\User();\n\t // $user1->email = '[email protected]';\n\t // $user1->name = 'Luis';\n\t // $user1->password = Hash::make('password123');\n\t // $user1->save();\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 // $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 $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 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 \n\n \n $this->call(BodyTypeTableSeeder::class);\n $this->call(ChildrenWithYouTableSeeder::class);\n $this->call(CountryGrewUpTableSeeder::class);\n $this->call(DressTableSeeder::class);\n $this->call(EducationTableSeeder::class);\n $this->call(EthnicityTableSeeder::class);\n $this->call(HobbiesTableSeeder::class);\n $this->call(HowManyChildrenTableSeeder::class);\n $this->call(LanguageTableSeeder::class); \n $this->call(MaritalStatusTableSeeder::class);\n $this->call(ProfessionTableSeeder::class);\n $this->call(RoleTableSeeder::class); \n $this->call(SextableSeeder::class);\n $this->call(StatusInCanadaTableSeeder::class);\n $this->call(StatustableSeeder::class);\n $this->call(UserTableSeeder::class);\n $this->call(AdminActionsTableSeeder::class);\n\n // $this->call(SeedWholeDatabaseSeeder::class);\n \n $this->call(LocationSeederTable::class);\n \n \n \n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n /*DB::table('users')->insert([\n \t\t'name'=>'admin',\n \t\t'email'=>'[email protected]',\n \t\t'password'=>bcrypt('123456'),\n \t\t'role_id'=> 1,\n\n\n \t]);*/\n //$this->call(RolesSeeder::class);\n //$this->call(UsersSeeder::class);\n $this->call(PrivilegsSeeder::class);\n //$this->call(AttendanceTypeSeeder::class);\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 // \\App\\Models\\User::factory(10)->create();\n /* Curso::factory(8)->create(); */\n /* $this->call(CidepartamentoSeeder::class);\n $this->call(CategoriaSeeder::class);\n $this->call(GeneroSeeder::class); */\n\n /* $this->call(UserSeeder::class); */\n\n\n /* Estudiante::factory(20)->create(); */\n\n /* Profesore::factory(12)->create(); */\n\n\n /* $this->call(EstudianteSeeder::class); */\n /* $this->call(CursoSeeder::class); */\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n \t$this->call('RolTableSeeder');\n \t$this->call('UserTableSeeder');\t\t\n \t$this->call('UserProfileTableSeeder');\n \t$this->call('AppTableSeeder');\n \t$this->call('AppXUserTableSeeder');\n \t$this->call('ModuleTableSeeder');\n \t$this->call('OptionTableSeeder');\n \t$this->call('PermitTableSeeder');\n $this->call('DepartmentTableSeeder');\n $this->call('CityTableSeeder');\n $this->call('CategoryTableSeeder');\t\n $this->call('StageTableSeeder');\n $this->call('ConectorsTableSeeder');\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n $this->call(userTableSeeder::class);\n $this->call(hrl1TableSeeder::class);\n $this->call(hrl1CategoryTableSeeder::class);\n $this->call(hrl1PositionTableSeeder::class);\n $this->call(tel1TableSeeder::class);\n $this->call(pel2TableSeeder::class);\n $this->call(pel4TableSeeder::class);\n // $this->call(tel1CostfactorTableSeeder::class);\n\n }",
"public function run()\n {\n $this->call(UsersSeeder::class);\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'phone' => '0507507763',\n 'password' => bcrypt('admin'),\n 'role' => 'admin',\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s'),\n ]);\n DB::table('default_settings')->insert([\n 'default_count' => 10,\n 'cake_count' => 7,\n 'cheesecake_count' => 5,\n 'cupcake_count' => 40,\n ]);\n $this->call(AdditionalDecorationSeeder::class);\n $this->call(AdditionalFillerSeeder::class);\n $this->call(CakeFillingSeeder::class);\n $this->call(CakeSideDecorationSeeder::class);\n $this->call(CakeTopDecorationSeeder::class);\n $this->call(StatusSeeder::class);\n $this->call(DeliverySeeder::class);\n $this->call(OrderSeeder::class);\n $this->call(CakeSizeSeeder::class);\n $this->call(CakeSeeder::class);\n $this->call(ProductSeeder::class);\n $this->call(CategorySeeder::class);\n $this->call(ProductCategorySeeder::class);\n\n // $this->call(OrderCakeSeeder::class);\n\n }",
"public function run()\n {\n $this->call([\n LevelsTableSeeder::class,\n LocationsTableSeeder::class,\n UsersTableSeeder::class,\n UnitsTableSeeder::class,\n CategoriesTableSeeder::class,\n SubcategoriesTableSeeder::class,\n CategorySubcategoryTableSeeder::class,\n // ProductsTableSeeder::class,\n RegionsTableSeeder::class,\n DistrictsTableSeeder::class,\n WardsTableSeeder::class,\n UserWardTableSeeder::class,\n LocationUserTableSeeder::class,\n StatusesTableSeeder::class,\n TransactiontypesTableSeeder::class,\n ]);\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(CreateUsersSeeder::class);\n $this->call(GameTableSeeder::class);\n\n $this->call(ScenariosTableSeeder::class);\n $this->call(PrefabsTableSeeder::class);\n $this->call(PrefabScanrioTableSeeder::class);\n\n\n // $this->call(KnowledgeComponentsTableSeeder::class);\n }",
"public function run()\n {\n // seeder\n $this->call(CategoriesTableSeeder::class);\n $this->call(PostTypesTableSeeder::class);\n $this->call(RolesTableSeeder::class);\n\n // factory\n factory(App\\User::class, 20)->create(); // PostFactory内でもUserFactoryをコールしているので、このFactoryは合計2回コールされる\n factory(App\\Post::class, 20)->create();\n\n // Userデータが作られた後に実行する\n $this->call(EnsemblesTableSeeder::class);\n }",
"public function run()\n {\n $this->call([\n LanguageTableSeeder::class,\n BusinessTableSeeder::class,\n SuperuserTableSeeder::class,\n ConsumerTableSeeder::class,\n DelivererTableSeeder::class,\n DelivererLocationTableSeeder::class,\n MenuTableSeeder::class,\n CategoryTableSeeder::class,\n CategoryNameTableSeeder::class,\n ItemTypeTableSeeder::class,\n ItemTypeNameTableSeeder::class,\n ItemTableSeeder::class,\n MenuNameTableSeeder::class,\n ItemNameTableSeeder::class,\n OrderTableSeeder::class,\n PaymentTableSeeder::class,\n ]);\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UsersTableSeeder::class);\n $this->call(GuestsTableSeeder::class);\n $this->call(CategoriesTableSeeder::class);\n $this->call(StatesTableSeeder::class);\n $this->call(CitiesTableSeeder::class);\n $this->call(DistrictsTableSeeder::class);\n $this->call(PanelsTableSeeder::class);\n $this->call(ComplaintsTableSeeder::class);\n }",
"public function run()\n { \n $this->call(UserSeeder::class);\n \n /**\n * Company with employees seeder\n */\n \\App\\Models\\Company::factory()->count(10)\n ->has(\\App\\Models\\Employee::factory()->count(5))\n ->create();\n }",
"public function run()\n {\n //$this->call(SectionSeeder::class);\n $this->call(AdminSeeder::class);\n //$this->call(ClientSeeder::class);\n \n \n\n\n\n //DB::table('users')->insert([\n // 'name' => 'Harry Han',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('password'),\n // 'contractorLastname' => 'Han',\n // 'contractorCompany' => 'test-company' ,\n // 'contractorContactNumber' => '0600000000',\n // 'contractorStatus' => 'active'\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 //\\App\\Models\\User::factory(400)->create();\n //\\App\\Models\\Ship::factory(10000)->create();\n //\\App\\Models\\City::factory(1000)->create();\n //\\App\\Models\\Offer::factory(2000)->create();\n\n /* $this->call([\n CountrySeeder::class,\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(UsersTableSeeder::class);\n $this->call(ConditionsTableSeeder::class);\n $this->call(DeliveriesTableSeeder::class);\n $this->call(CategoriesTableSeeder::class);\n $this->call(AdvertsTableSeeder::class);\n // plaats postcode import in eigen / aparte seeder class ==>> Made migration (else DB:rename doesn't work inside seeder, makes copy)\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $this->call(ExamSubjectSeeder::class);\n $this->call(ActivitiesSeeder::class);\n $this->call(CountriesSeeder::class);\n $this->call(StatesSeeder::class);\n $this->call(StudentSchoolNameSeeder::class);\n $this->call(WriteitDetailSeeder::class);\n $this->call(WriteitPersonalSeeder::class);\n $this->call(WriteitQuestionSeeder::class);\n $this->call(Collegeyears::class);\n }",
"public function run()\n {\n //$this->call(PetTypeTableSeeder::class);\n //$this->call(PetCategoryTableSeeder::class);\n //$this->call(UserTableSeeder::class);\n //$this->call(InventoryTypeTableSeeder::class);\n //$this->call(ServiceSeeder::class);\n //$this->call(FoodCategoryTableSeeder::class);\n //$this->call(MedicineCategoryTableSeeder::class);\n //$this->call(PassingRateTableSeeder::class);\n //$this->call(BarangayTableSeeder::class);\n //$this->call(BreedTableSeeder::class);\n //$this->call(CityTableSeeder::class);\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n $this->call([\n UserSeeder::class,\n LanguageSeeder::class,\n MenuKeywordSeeder::class,\n ContentOneGroupKeywordSeeder::class,\n ContentTwoGroupKeywordSeeder::class,\n ContentThreeGroupKeywordSeeder::class,\n ContentFourGroupKeywordSeeder::class,\n ContentFiveGroupKeywordSeeder::class,\n ContentSixGroupKeywordSeeder::class,\n FrontendOneGroupKeywordSeeder::class,\n FrontendTwoGroupKeywordSeeder::class,\n SectionSeeder::class,\n ]);\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $this->call(LaratrustSeeder::class);\n $this->call(OverrideLaratrustDefaultUser::class);\n $this->call(DefaultUnitTableSeeder::class);\n $this->call(PhoneProviderTableSeeder::class);\n\n /* DUMMY DATA */\n if (App::environment('local', 'dev')) {\n\n $this->command->info('Local/Development Enviroment Detected. Starting Dummy Data Seeder...');\n\n $this->call(BankTableSeeder::class);\n $this->call(ProductTableSeeder::class);\n $this->call(ProductTypeTableSeeder::class);\n $this->call(SupplierTableSeeder::class);\n $this->call(CustomerTableSeeder::class);\n $this->call(TrucksTableSeeder::class);\n $this->call(VendorTruckingTableSeeder::class);\n $this->call(WarehouseTableSeeder::class);\n $this->call(PriceLevelTableSeeder::class);\n $this->call(TruckMaintenancesTableSeeder::class);\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 $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 // $this->call(UsersTableSeeder::class);\n $this->call('GendersTableSeeder');\n $this->call('CountriesTableSeeder');\n $this->call('CitiesTableSeeder');\n $this->call('RolesTableSeeder');\n $this->call('UsersTableSeeder');\n $this->call('StatusesTableSeeder');\n }",
"public function run()\n {\n\n $this->call(NotificationsSeeder::class);\n factory(\\App\\Models\\City::class, 20)->create();\n $this->call(TransactionStatusSeeder::class);\n $this->call(LeadStatusesSeeder::class);\n $this->call(RolesSeeder::class);\n $this->call(UsersSeeder::class);\n $this->call(UserCitySeeder::class);\n $this->call(LeadRejectionReasonsSeeder::class);\n factory(\\App\\Models\\User::class, 4)->create();\n factory(\\App\\Models\\Lead::class, 100)->create();\n $this->call(LeadTypesSeeder::class);\n\n }",
"public function run()\n {\n //$this->call(UserSeeder::class);\n $this->call(UserTableSeeder::class);\n $this->call(CategoriasSeeder::class);\n $this->call(PackagesTableSeeder::class);\n // $this->call(OrdenPurchaseTableSeeder::class);\n $this->call(RanksTableSeeder::class);\n // $this->call(CountryTableSeeder::class);\n // $this->call(CategoriesTableSeeder::class);\n // $this->call(ServicesTableSeeder::class);\n // $this->call(TimeZoneTableSeeder::class);\n // $this->call(AddSaldoTableSeeder::class);\n // $this->call(WalletTableSeeder::class);\n }",
"public function run()\n {\n $this->call(GenderSeeder::class);\n $this->call(TitleSeeder::class);\n $this->call(CountrySeeder::class);\n $this->call(LocationSeeder::class);\n $this->call(EmployeeSeeder::class);\n $this->call(DepartmentSeeder::class);\n $this->call(EmployeeDepartmentSeeder::class);\n $this->call(NotesSeeder::class);\n }",
"public function run()\n {\n $this->call([\n UserTableSeeder::class,\n BrandSeeder::class,\n CategorySeeder::class,\n ProductSeeder::class,\n /*SliderSeeder::class,\n CustomerSeeder::class,\n ShippingSeeder::class,\n OrderSeeder::class,\n OrderInfoSeeder::class,\n PaymentSeeder::class,\n subscribersSeeder::class,*/\n ]);\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 {\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\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\t{\n\t\tModel::unguard();\n\n\t\t// $this->call('UserTableSeeder');\n\t\t$this->call('ArticlesSeeder');\n $this->call('CategoriesSeeder');\n $this->call('LangsSeeder');\n $this->call('UsersSeeder');\n $this->call('TextsSeeder');\n\n\t}",
"public function run() {\n\n // seeder para insertar trabajos\n $this->call(LanaSeeder::class);\n\n // seeder para insertar usuarios\n $this->call(UsuariosSeeder::class);\n\n // seeder para introducir trabajadores\n $this->call(LangileaSeeder::class);\n\n //seeder para insertar informacion de las fotos\n $this->call(ArgazkiSeeder::class);\n\n //seeder para insertar informacion de las citas\n $this->call(ZitaSeeder::class);\n\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 $this->call(UserSeeder::class);\n $this->call(AuditeeSeeder::class);\n $this->call(AuditorSeeder::class);\n $this->call(CategorySeeder::class);\n $this->call(ContractorSeeder::class);\n $this->call(DepartmentSeeder::class);\n $this->call(SiteSeeder::class);\n $this->call(MonitoringSeeder::class);\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $this->call(AdminTablesSeeder::class);\n\n $this->call(TemplatesTableSeeder::class);\n\n $this->call(ActivitiesSeeder::class);\n\n $this->call(AwardsSeeder::class);\n\n// $this->call(CertificatesSeeder::class);\n $this->call(AdminMenuTableSeeder::class);\n $this->call(ActivitiesTableSeeder::class);\n// $this->call(AwardsTableSeeder::class);\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $this->call('RoleTableSeeder');\n $this->call('PositionsTableSeeder');\n $this->call('EditionTypesTableSeeder');\n $this->call('StagesTableSeeder');\n $this->call('WorkType_PositionsTableSeeder');\n $this->call('WorkTypesTableSeeder');\n\n\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call([\n SuperUserSeeder::class,\n SquadSeeder::class,\n EmployeeStatusSeeder::class,\n OfficeSeeder::class,\n TribeSeeder::class,\n EmployeeSeeder::class,\n EmployeeSquadSeeder::class,\n SquadTribeSeeder::class,\n ProductSeeder::class,\n EmployeeProductSeeder::class,\n // SchedulingSeeder::class,\n // RealtySeeder::class,\n ]);\n }",
"public function run()\n {\n $this->call(OrgCategoriesSeeder::class);\n $this->call(RolesSeeder::class);\n $this->call(TargetSubcategoriesTableSeeder::class);\n $this->call(TargetCategoriesTableSeeder::class);\n $this->call(TargetItemsTableSeeder::class);\n $this->call(ParentalStatusesSeeder::class);\n $this->call(GenderSeeder::class); \n $this->call(EducationSeeder::class); \n $this->call(IncomeSeeder::class); \n $this->call(LanguagesSeeder::class); \n }",
"public function run()\n {\n $this->call([\n //DaysSeeder::class, \n \n //MediaFilePurposeSeeder::class, \n //UploadedFileSeeder::class, \n //SlidesSeeder::class, \n //YachtSeeder::class, \n //PackageSeeder::class, \n //MediaFileSeeder::class,\n PageCategoriesTableSeeder::class,\n CountriesTableSeeder::class,\n StatesTableSeeder::class,\n CruiseAvailableDaysTableSeeder::class,\n CruiseDateSettingsTableSeeder::class,\n ]);\n }",
"public function run()\n {\n //$this->call(UsersTableSeeder::class);\n $this->call(DefaultUserSeeder::class);\n $this->call(SportsProductsSeeder::class);\n $this->call(PhonesProductsSeeder::class);\n $this->call(HeadphonesProductsSeeder::class);\n $this->call(ShirtsProductsSeeder::class);\n $this->call(FurnituresProductsSeeder::class);\n $this->call(VideoGamesProductsSeeder::class);\n $this->call(Payment_MethodsSeeder::class);\n $this->call(ShippingMethodsSeeder::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 $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 // \\App\\Models\\User::factory(10)->create();\n $this->call([\n HomeSeeder::class,\n ]);\n\n $this->call([\n NewsSeeder::class,\n ]);\n\n $this->call([\n ProductSeeder::class,\n ]);\n\n $this->call([\n ProgramSeeder::class,\n ]);\n \n $this->call([\n AboutSeeder::class,\n ]);\n\n $this->call([\n ContactSeeder::class,\n ]);\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 {\n // \\App\\Models\\User::factory(10)->create();\n\n $this->call([\n AdminTableSeeder::class,\n VendorTableSeeder::class,\n AppSettingSeeder::class,\n ]);\n\n Vendor::factory(20)->create();\n Software::factory(20)->create();\n Softwarecategories::factory(20)->create();\n Softwarespecification::factory(20)->create();\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(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 // $this->call(UsersTableSeeder::class);\n User::create(['username' => 'penjaminan', 'email' => '[email protected]', 'password' => Hash::make('pdfvgf')]);\n $this->call(TahapanProyekDropdownSeeder::class);\n $this->call(JenisInfrastrukturSeeder::class);\n $this->call(DropdownSeeder::class);\n $this->call(ChecklistSeeder::class);\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 $this->call([\n UsersTableSeeder::class,\n ActivitiesTableSeeder::class,\n AnswersTableSeeder::class,\n CategoriesTableSeeder::class,\n CoursesTableSeeder::class,\n FollowsTableSeeder::class,\n LessionsTableSeeder::class,\n PermissionRoleTableSeeder::class,\n PermissionsTableSeeder::class,\n QuestionsTableSeeder::class,\n RolesTableSeeder::class,\n TestTableSeeder::class,\n TestQuestionTableSeeder::class,\n UserCourseTableSeeder::class,\n UserLessionTableSeeder::class,\n UserWordTableSeeder::class,\n WordsTableSeeder::class,\n ]);\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->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 LocationSeeder::class,\n BranchSeeder::class,\n DepartmentSeeder::class,\n DesignationSeeder::class,\n GenderSeeder::class,\n MaritalStatusSeeder::class,\n PayGradeSeeder::class,\n EmployeeEducationCatrgorySeeder::class,\n EmployeeEducationSeeder::class,\n EmployeeCategorySeeder::class,\n UserGroupSeeder::class,\n LeaveCategorySeeder::class,\n LeaveApplicationSeeder::class,\n UserSeeder::class\n ]);\n\n }",
"public function run()\n {\n // factory('App\\Model\\Member', 'Member', 111)->create();\n // $this->call(UsersTableSeeder::class);\n // factory('App\\Model\\Order', 'Order', 51)->create()->each(function($u) {\n // for ($i=0; $i < mt_rand(1,3); $i++) {\n // $u->orderDetail()->save(factory('App\\Model\\OrderDetail', 'OrderDetail', 1)->make());\n // }\n // for ($k=1; $k < mt_rand(2,6); $k++) { \n // $u->orderLog()->save(factory('App\\Model\\OrderLog', 'OrderLog', 1)->make([\n // 'action' => $k,\n // ]));\n // }\n // });\n //factory(App\\Model\\Notification::class, 'Notification', 100)->create();\n //factory(App\\Model\\MicroForumLog::class, 'MicroForumLog', 1000)->create();\n }",
"public function run()\n {\n // $this->call(UserTableSeeder::class);\n $this->call(UsersSeeder::class);\n $this->call(AdminsSeeder::class);\n $this->call(CategoriesSeeder::class);\n $this->call(ProductsSeeder::class);\n $this->call(EventsSeeder::class); \n }",
"public function run()\n {\n //base seeds\n $this->call(RoleSeed::class);\n $this->call(UserSeed::class);\n $this->call(PointSeed::class);\n $this->call(LevelSeed::class);\n\n // $this->call(CourseSeed::class);\n // $this->call(LessonSeed::class);\n\n\n // $this->call(AnswerSeed::class);\n // $this->call(QuizSeed::class);\n // $this->call(QuestionSeed::class);\n // $this->call(TemplateSeed::class);\n // $this->call(CertificationSeed::class);\n \n //relation seeds\n // $this->call(CourseLessonSeed::class);\n // $this->call(CourseQuizSeed::class);\n // $this->call(QuizQuestionSeed::class);\n // $this->call(QuestionAnswerSeed::class);\n //$this->call(DataCourseSeed::class);\n //$this->call(DataLessonSeed::class);\n }",
"public function run()\n {\n $this->call(UserSeed::class);\n $this->call(CategorySeed::class);\n $this->call(ExperienceSeeder::class);\n $this->call(LocationSeeder::class);\n $this->call(SalarySeeder::class);\n\n }",
"public function run()\n {\n // $this->call('UsersTableSeeder');\n // $this->call(PersonasTableSeeder::class);\n // $this->call(UsersTableSeeder::class);\n //$this->call(ArchivoTableSeeder::class);\n //$this->call(CategoriaTableSeeder::class);\n //$this->call(SubcategoriaTableSeeder::class);\n // $this->call(ArchivoSubcategoriaTableSeeder::class);\n // $this->call(UsuarioSubcategoriaTableSeeder::class);\n //$this->call(HistorialVistasTableSeeder::class);\n\n\n\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\n $this->call([\n NavbarSeeder::class,\n Section2Seeder::class,\n AboutUsSeeder::class,\n FeatureSeeder::class,\n ServiceSeeder::class,\n PortfolioSeeder::class,\n TestimonialSeeder::class,\n TeamSeeder::class,\n ContactSeeder::class,\n FooterSeeder::class,\n FooterBottomSeeder::class,\n TitreSeeder::class,\n RoleSeeder::class,\n UserSeeder::class\n ]);\n }",
"public function run()\n {\n\n $this->call(UsersTableSeeder::class);\n $this->call(StudentsTableSeeder::class);\n\n $this->call(SectionsTableSeeder::class);\n $this->call(SectionsTableHeaderFooterSeeder::class);\n $this->call(QuestionsTableSeeder::class);\n $this->call(AnswersTableSeeder::class);\n\n $this->call(LocationsTableSeeder::class);\n $this->call(WardsTableSeeder::class);\n\n }",
"public function run()\n {\n// $this->call('CheckoutUniquesTableSeeder');\n $this->call('StatusTableSeeder');\n $this->call('RolesTableSeeder');\n $this->call('LoginTypeTableSeeder');\n $this->call('UsersTableSeeder');\n $this->call('FilesTableSeeder');\n $this->call('CategoriesTableSeeder');\n $this->call('EventsTableSeeder');\n $this->call('GoodsTableSeeder');\n $this->call('ProfilesTableSeeder');\n $this->call('CustomersTableSeeder');\n $this->call('BasketsTableSeeder');\n $this->call('BasketsGoodsTableSeeder');\n $this->call('PaymentTableSeeder');\n $this->call('AddressesTableSeeder');\n $this->call('ReceiversTableSeeder');\n }",
"public function run()\n {\n $this->call(RolesTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(GrammarQuestionTypesTableSeeder::class);\n $this->call(ConfigTableSeeder::class);\n $this->call(AudioTypesTableSeeder::class);\n $this->call(GroupTypesTableSeeder::class);\n\n// $this->call(ReservationsTableSeeder::class);\n// $this->call(GrammarQuestionsTableSeeder::class);\n// $this->call(ParagraphsTableSeeder::class);\n// $this->call(ParagraphQuestionsTableSeeder::class);\n// $this->call(VocabQuestionsTableSeeder::class);\n\n\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n $this->call(Tipo_DocumentoSeeder::class);\n\n $this->call(RolSeeder::class);\n\n $this->call(GeneroSeeder::class);\n\n $this->call(MaterialSeeder::class);\n\n $this->call(CategoriaSeeder::class);\n\n $this->call(ClasificacionSeeder::class);\n\n $this->call(UsuarioSeeder::class);\n\n $this->call(TallaSeeder::class);\n\n $this->call(ProductoSeeder::class);\n\n $this->call(ContactoSeeder::class);\n\n\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(ToolsMenuTableSeeder::class);\n $this->call(ToolsMenuItemsTableSeeder::class);\n $this->call(ToolsMarkTableSeeder::class);\n $this->call(SystemRoleTableSeeder::class);\n $this->call(FileDirTableSeeder::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 Model::unguard();\n\n // $this->call(TodoTableSeeder::class);\n\n // $this->call(TimeEntriesTableSeeder::class);\n // $this->call(UsersTableSeeder::class);\n // $this->command->info('User and Time entry seeded');\n\n\n // $this->call(UserTableSeeder::class);\n // $this->call(CommentTableSeeder::class);\n\n // Comment::create([\n // 'author' => 'Chris Sevilleja',\n // 'text' => 'Look I am a test comment.'\n // ]);\n \n // Comment::create(array(\n // 'author' => 'Nick Cerminara',\n // 'text' => 'This is going to be super crazy.'\n // ));\n \n // Comment::create(array(\n // 'author' => 'Holly Lloyd',\n // 'text' => 'I am a master of Laravel and Angular.'\n // ));\n\n\n // $this->command->info('Comment table seeded.');\n\n Model::reguard();\n }",
"public function run()\n {\n // Disable guard for seeder\n Eloquent::unguard();\n\n $this->call(AvasTableSeeder::class);\n $this->call(WineriesTableSeeder::class);\n $this->call(AvaWineryTableSeeder::class);\n $this->call(TimesTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(FavoritesTableSeeder::class);\n $this->call(WishlistsTableSeeder::class);\n }",
"public function run()\n {\n $this->call(UserTableSeeder::class);\n $this->call(RolesAndPermissionsSeeder::class);\n $this->call(ProductTypeTableSeeder::class); \n $this->call(BrandTableSeeder::class);\n $this->call(EmployeeTypeTableSeeder::class);\n \n $this->call(CitiesTableSeeder::class);\n $this->call(BranchTableSeeder::class);\n\n //$this->call(CustomerTableSeeder::class);\n //$this->call(EmployeeTableSeeder::class);\n //$this->call(ProductTableSeeder::class);\n //$this->call(StockTableSeeder::class);\n \n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $this->call('PersonaSeeder');\n $this->call('RolSeeder');\n $this->call('PrivilegiosSeeder');\n $this->call('UsuarioSeeder');\n $this->call('PrivilegiosDefaultSeeder');\n $this->call('UsuarioPrivilegiosSeeder');\n }",
"public function run()\n {\n $this->call([\n PermissionsTableSeeder::class,\n RolesTableSeeder::class,\n PermissionRoleTableSeeder::class,\n SocialNetworksSeeder::class,\n UsersTableSeeder::class,\n AccountManagerDummySeeder::class,\n DummyDataSeeder::class,\n NotificationsSeeder::class,\n PaymentTypesSeeder::class,\n FileManagerDummySeeder::class,\n TicketsCategoriesSeeder::class\n ]);\n }",
"public function run()\n {\n $this->call(PermissionSeeder::class);\n $this->call(UserTableSeeder::class);\n $this->call(groupTableSeeder::class);\n $this->call(usergroupTableSeeder::class);\n $this->call(MotifTableSeeder::class);\n /*$this->call('filesTableSeeder');\n $this->call('periodTableSeeder');\n $this->call('contributionTableSeeder');\n\n $this->call('adsTableSeeder');\n $this->call('ads_has_filesTableSeeder');\n $this->call('ballotTableSeeder');\n $this->call('propositionTableSeeder');\n */\n //Model::reguard();\n }",
"public function run()\n {\n $this->call([\n GenderSeeder::class,\n FilmSeeder::class,\n HomeworldSeeder::class,\n PersonSeeder::class,\n FilmPersonSeeder::class,\n StarshipSeeder::class,\n FilmStarshipSeeder::class,\n PersonStarshipSeeder::class,\n VehicleSeeder::class,\n FilmVehicleSeeder::class,\n PersonVehicleSeeder::class,\n SpecieSeeder::class,\n FilmSpecieSeeder::class,\n PersonSpecieSeeder::class,\n ]);\n }",
"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 $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 $this->call(RoleSeeder::class);\n $this->call(LevelSeeder::class);\n $this->call(TypeSeeder::class);\n User::factory(100)->create();\n Question::factory(100)->create();\n $this->call(AnswerSeeder::class);\n Test::factory(5)->create();\n Result::factory(20)->create();\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 \t$this->call(PermissionsSeeder::class);\n $this->call(UsersSeeder::class);\n $this->call(TagsSeeder::class);\n $this->call(QuestionsSeeder::class);\n $this->call(AnswersSeeder::class);\n $this->call(TaggablesSeeder::class);\n $this->call(DocumentationsSeeder::class);\n $this->call(CommentsSeeder::class);\n $this->call(SubjectsSeeder::class);\n $this->call(VotesSeeder::class);\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n\t\t//$this->call('ReportsTableSeeder');\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n \n $this->call(ZonasSeeder::class);\n $this->call(DepartamentosSeeder::class);\n $this->call(MunicipiosSeeder::class);\n $this->call(CategoriasSeeder::class);\n $this->call(RolesSeeder::class);\n $this->call(usersSeeder::class);\n $this->call(TiposPruebasSeeder::class);\n $this->call(ResultadosPruebasSeeder::class);\n $this->call(GravedadesSintomasSeeder::class);\n $this->call(SintomasSeeder::class);\n }",
"public function run()\n {\n $this->call(UserTableSeeder::class);\n $this->call(CategoryTableSeeder::class);\n $this->call(SpecialtyTableSeeder::class);\n $this->call(SnsTableSeeder::class);\n $this->call(ProfileTableSeeder::class);\n $this->call(RelationTableSeeder::class);\n $this->call(PostsTableSeeder::class);\n // $this->call(LikeTableSeeder::class);\n // $this->call(MarkTableSeeder::class);\n // $this->call(ProfileToSnsMapTableSeeder::class);\n // $this->call(SubjectTableSeeder::class);\n // $this->call(CommentTableSeeder::class);\n // $this->call(LimitedPostToUserMapTableSeeder::class);\n }",
"public function run()\n {\n $this->call(CountrySeeder::class);\n $this->call(CitySeeder::class);\n\n $this->call(UserSeeder::class);\n $this->call(StatusSeeder::class);\n Company::factory(20)->create();\n $this->call(StatusSeeder::class);\n $this->call(RoleSeeder::class);\n $this->call(CategorySeeder::class);\n Offer::factory(100)->create();\n Review::factory(100)->create();\n Project::factory(30)->create();\n Image::factory(90)->create();\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 $this->call('DevicetypesTableSeeder');\n $this->call('HscontactsTableSeeder');\n $this->call('HighsiteVisitCategoriesTableSeeder');\n $this->call('BackhaultypesTableSeeder');\n $this->call('SystemsTableSeeder');\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([\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([\n GenderTableSeeder::class,\n PaymentTypeTableSeeder::class,\n SeasonsTableSeeder::class,\n ProductGendersTableSeeder::class,\n BrandsTableSeeder::class,\n subcategorySeeder::class,\n CategoriesTableSeeder::class,\n ClientsTableSeeder::class,\n ProductsTableSeeder::class,\n SalesTableSeeder::class,\n SaleDetailsTableSeeder::class,\n UsersTableSeeder::class,\n ]);\n }",
"public function run()\n {\n $this->call(UsersTableSeeder::class);\n\n factory(App\\Lead::class,150)->create()->each(function($u){\n $u->domains()->save(factory(App\\Domain::class)->make());\n })->each(function($u){\n $u->communicationValues()->save(factory(\\App\\CommunicationValue::class)->make());\n });\n\n $this->call(DomainsTableSeeder::class);\n\n $this->call(CommunicationValuesTableSeeder::class);\n\n $this->call(CommentsTableSeeder::class);\n\n $this->call(CommunicationRecordsTableSeeder::class);\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 // \\App\\Models\\User::factory(10)->create();\n $this->call([\n AdministratorSeeder::class,\n BitacoraSeeder::class,\n CategorieSeeder::class,\n DeliveryCompanySeeder::class,\n DetailSeeder::class,\n DiscountSeeder::class,\n FavoriteSeeder::class,\n PaymentMethodSeeder::class,\n PaymentSeeder::class,\n ProductCategorieSeeder::class,\n SaleSeeder::class\n ]);\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->call(ToDoSeeder::class);\n // $this->call(SkillTableSeeder::class);\n // $this->call(NotesTableSeeder::class);\n // $this->call(ConfigTableSeeder::class);\n // $this->call(CustomerTableSeeder::class);\n // $this->call(ProjectTableSeeder::class);\n $this->call(StaffProjectTableSeeder::class);\n // $this->call(TaskTableSeeder::class);\n // $this->call(UploadfileSeeder::class);\n }"
]
| [
"0.8408412",
"0.8380198",
"0.83506227",
"0.8322546",
"0.83181727",
"0.8308409",
"0.83034337",
"0.8300918",
"0.82959545",
"0.8292753",
"0.82820255",
"0.82652783",
"0.82512003",
"0.82430524",
"0.823672",
"0.8233267",
"0.82265735",
"0.8223475",
"0.8220345",
"0.82198447",
"0.82186675",
"0.821323",
"0.8210103",
"0.81975526",
"0.81974465",
"0.819511",
"0.81930447",
"0.8190342",
"0.81826425",
"0.81824774",
"0.81824005",
"0.8176286",
"0.8169741",
"0.8164269",
"0.81606627",
"0.81602466",
"0.8157417",
"0.81562936",
"0.81559426",
"0.81526",
"0.81520975",
"0.81509167",
"0.81497216",
"0.814542",
"0.8145106",
"0.81420386",
"0.81418383",
"0.81380314",
"0.8136924",
"0.8136716",
"0.81364584",
"0.8136303",
"0.81349725",
"0.8134907",
"0.81330526",
"0.8131321",
"0.81299293",
"0.8126526",
"0.8126285",
"0.812465",
"0.81242204",
"0.8123795",
"0.8123601",
"0.8122563",
"0.81213194",
"0.81204313",
"0.8119197",
"0.811679",
"0.8115619",
"0.8112041",
"0.8111563",
"0.8108823",
"0.81084806",
"0.8107962",
"0.81074727",
"0.8105036",
"0.8102752",
"0.8102014",
"0.81017214",
"0.8101715",
"0.81015265",
"0.81013906",
"0.81011647",
"0.81007856",
"0.8099836",
"0.8098072",
"0.8097789",
"0.8096509",
"0.80935067",
"0.8093434",
"0.8093226",
"0.8093101",
"0.8092642",
"0.8092203",
"0.80918807",
"0.8091801",
"0.809134",
"0.8089901",
"0.80893064",
"0.8086411",
"0.8084614"
]
| 0.0 | -1 |
Run the database seeds. | public function run()
{
Model::unguard();
Permission::create(['role' => 'Root']);
Permission::create(['role' => 'Administrador']);
Permission::create(['role' => 'Usuário']);
} | {
"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 |
Lets make sure we have a serial and that it's valid. | public function submit() {
if(isset($this->request->post['serial'])) {
$this->load->model('catalog/serial');
$validSerials = trim($this->model_catalog_serial->validSerialNOJSON($this->request->post['serial']));
if($validSerials != 'true') {
$errors = $validSerials;
}
else {
$errors = '';
}
}
else {
$errors = 'The serial number was empty. Please submit a valid serial number.';
}
// Need to check the database for a valid serial entry.
$featurecodes = substr($this->request->post['serial'],-3,3);
$serialcode = substr($this->request->post['serial'],0,5);
// Need to check to make sure that the serial has not yet been registered
$this->load->model('account/softwareregistration');
$exists = $this->model_account_softwareregistration->serialPurchased($serialcode, $featurecodes);
if(!$exists) {
if(strlen($this->request->post['serial']) != 8) {
$errors = 'The serial number you submitted was incorrect. Please submit a valid 8 character serial number.';
}
else {
$errors = 'The serial you have entered has not been purchased.';
}
}
$registered = $this->model_account_softwareregistration->isRegistered($serialcode, $featurecodes);
if($registered) {
$errors = 'The serial you entered is already registered.';
}
// Compile the states listing.
if(isset($this->request->post['states'])) {
foreach($this->request->post['states'] as $state) {
$states[] = $state;
}
$customer_id = $this->model_account_softwareregistration->getCustomerIDfromSerial($serialcode, $featurecodes);
if(isset($this->request->post['states'])) { $this->model_account_softwareregistration->editCustomerPayrollStates($customer_id, $this->request->post['states']); }
}
else {
$states = array();
}
if(isset($this->request->post['comments'])) {
$comments = $this->request->post['comments'];
}
else {
$comments = '';
}
// Serial was valid and we should be good to go.
if($errors == '') {
$this->model_account_softwareregistration->addRegistration($serialcode, $featurecodes, $states, $comments);
if($comments != '' && isset($comments)) {
$from = "Software Registration <[email protected]>";
$subject = "Software Registration for Serial Number " . $serialcode . $featurecodes;
$message = "Serial - " . $serialcode . $featurecodes . "\n\n";
$message .= "Payroll States - \n" . implode(", ",$states) . "";
$message .= "\n\nComments - \n" . $comments . "\n";
mail("[email protected]", $subject, $message, "From: " . $from . "\n");
}
$this->showPage("Thank you for registering.");
// $this->redirect($this->url->link('account/account', '', 'SSL'));
/*
$getRegistration = $this->model_account_softwareregistration->showRegistration($serialcode, $featurecodes);
$g = implode('<br />',$getRegistration);
$this->showPage($g ,$serialcode, $states, $comments);
*/ }
else {
$this->showPage($errors,$this->request->post['serial'], $states, $comments);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function isValidSerialNumber($serialNumber) {\n\tunset($serialNumber);\n\treturn true;\n}",
"public function validacionserialasignado($serial)\n {\n $query = \"select COUNT(*) as cantidad FROM `equipo`\n INNER JOIN asignacion_equipo on fkID_equipo=id_equipo\n WHERE asignacion_equipo.estado =1 and fkID_equipo='\" . $serial . \"'\";\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 validacionserial($serial)\n {\n $query = \"select id_equipo, COUNT(*) as canti FROM `equipo` WHERE estado =1 and serial_equipo ='\" . $serial . \"'\";\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 verifyUnicitySerialNumber($attribute,$params)\n\t{\n $verifIdentity = VerifIdentity::model()->findByPk($this->serialNumber);\n if($verifIdentity != null)\n {\n if(!($verifIdentity->idUser === null))\n $this->addError('serialNumber','This serial Number is already used.');\n }\n \n }",
"public function validate(): bool\n {\n // exact pin and serial number look like\n return $this->validateAmount();\n }",
"private function set_serial($serial) {\n\t\t$this->set_region(substr($serial, 0, 2));\n\t\t$this->serial = $serial;\n\t}",
"protected function get_is_serial(): bool\n\t{\n\t\treturn $this->type == self::TYPE_INTEGER && !$this->null && $this->auto_increment && $this->primary;\n\t}",
"public function valid() {}",
"public function valid() {}",
"public function valid() {}",
"public function valid() {}",
"public function valid() {}",
"public function valid() {}",
"public function valid() {}",
"public function valid() {}",
"public function serial() {\n\t\tif(is_null($this->serial))\n\t\t\tthrow new DataAuthenticatorException('Unable to find a valid serial');\n\t\treturn $this->serial;\n\t}",
"public function tellInvalidCard()\n {\n }",
"public function valid_uuid(): void\n {\n $uuid = UUID::generate();\n\n $pattern = '/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i';\n $this->assertNotFalse(preg_match_all($pattern, (string) $uuid));\n }",
"function GenerarSerial()\n\t{\n\t\t$this->Serial = CifradorCodigo::generarNumero(\n\t\tCifradorCodigo::LongitudBitsSerialMaximo\n\t\t);\n\t}",
"public function setSerialNumber($value) {\n\t\tself::$_serialNumber = $value;\n\t}",
"public function recheck_jamf($serial = '')\n {\n if (authorized_for_serial($serial)) {\n $jamf = new Jamf_model($serial);\n $jamf->run_jamf_stats();\n }\n\n redirect(\"clients/detail/$serial#tab_jamf-tab\");\n }",
"function wppb_check_serial_number_fix($newvalue, $oldvalue){\r\n\r\n\tif ( $newvalue == $oldvalue )\r\n\t\twppb_check_serial_number( $oldvalue, $newvalue );\r\n\r\n\treturn $newvalue;\r\n}",
"function is_serial($string) {\n return (@unserialize($string) !== false);\n}",
"public function testGetInvalidReadingByReadingSensorId() : void {\n // grab a sensor id that exceeds the maximum allowable sensor id\n $reading = Reading::getReadingByReadingSensorId($this->getPDO(), PiMirrorTest::INVALID_KEY);\n $this->assertCount(0, $reading);\n }",
"protected function validateChecksum() {\n\t}",
"public function getSerialNumber() {\n if ($this->serial) {\n return $this->serial;\n }\n if (is_array($this->rawData)) {\n $this->serial = $this->rawData[\"serial number\"];\n if (!$this->serial) { \n $this->serial = $this->rawData[\"серийный номер\"];\n }\n if (!$this->serial) { \n $this->serial = $this->rawData[12]; // CP-3911\n }\n }\n return $this->serial;\n }",
"abstract public function valid();",
"public function Validate()\n\t{\n\t\t// Validate current mac\n\t\treturn $this->ValidMAC($this->mac);\n\t}",
"public function testGetInvalidReadingByReadingId() : void {\n\t\t// grab a sensor id that exceeds the maximum allowable sensor id\n\t\t$reading = Reading::getReadingByReadingId($this->getPDO(), PiMirrorTest::INVALID_KEY);\n\t\t$this->assertNull($reading);\n\t}",
"public function valid();",
"public function valid();",
"public function valid();",
"public function valid();",
"function checkfor_valid_Facs_payment_line($line){\r\n\t$valid = 0;\r\n\t$recordBeginning = substr($line, 0, 2);\r\n\tif($recordBeginning == 11){\r\n\t\t$valid = 1;\r\n\t}else { $valid = 0; }\r\n\treturn $valid;\r\n}",
"public function checkSlotWriting() {\n $writeSlot = 1;\n foreach($this->decission as $item) {\n if($item === 0) {\n $writeSlot = 0;\n }\n }\n if($writeSlot == 1 AND $this->nextStation->sendToAllAtOnce == 0) {\n $this->checkForNewSlot($this->nextStation->workflow_slot_id);\n }\n else {\n $this->nextStation->checkSendToAllAtOnce();\n }\n }",
"private function isValid(): bool\n {\n $this->generateChecksum();\n return (($this->luhnValue % $this->base == 0) && ($this->luhnValue != 0));\n }",
"function CheckSequence()\n\t{\n\t\treturn true;\n\t}",
"public function valid()\n {\n }",
"public function valid()\n {\n }",
"public function valid()\n {\n }",
"public function valid()\n {\n }",
"private function checkValid()\n\t{\n\t\tif(!$this->isValid()) {\n\t\t\tthrow new \\RuntimeException(\"TypeStruct Error: '\".get_called_class().\"' not validated to perform further operations\");\t\n\t\t}\n\t}",
"public function testInsertInvalidReading() : void {\n // create a Sensor with a non null sensorId and watch it fail\n $sensor = new Reading(PiMirrorTest::INVALID_KEY, $this->sensor->getSensorId(), $this->VALID_SENSORVALUE, $this->VALID_SENSORDATETIME);\n $sensor->insert($this->getPDO());\n }",
"public function testLockSsnFailsOnLock()\n\t{\n\t\t$this->store->lockSsn('123456789');\n\t\t$this->assertFalse($this->store->lockSsn('123456789'));\n\t}",
"public function store(CASerialNumberRequest $request)\n\t{\n\t\t//\n if(count(CASerialNumber::all()) > 0)\n {\n\n\n $csaerialNumber=CASerialNumber::all()->first();\n $csaerialNumber->startno= $request->serial_no;\n $csaerialNumber->save();\n }\n else\n {\n $csaerialNumber=new CASerialNumber;;\n $csaerialNumber->startno= 1;\n $csaerialNumber->save();\n }\n\n\n\n return redirect('serialno');\n\t}",
"public function valid(){ }",
"public function setSerial($v)\n\t{\n\n\n\t\tif ($v === null) {\n\t\t\t$this->setSerialId(NULL);\n\t\t} else {\n\t\t\t$this->setSerialId($v->getId());\n\t\t}\n\n\n\t\t$this->aSerial = $v;\n\t}",
"public function testLockSsn()\n\t{\n\t\t$this->assertTrue($this->store->lockSsn('123456789'));\n\t}",
"public function testUuid(): void\n {\n $regex = '/^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i';\n $this->assertTrue((bool) preg_match($regex, $this->user->getUuid()));\n }",
"public function validate(): void\n {\n $requiredParams = [\n 'username',\n 'api_key',\n 'BRANCH',\n 'CUST_ID',\n 'CREATE_BY',\n 'REQUEST_AWB',\n 'REQUEST_BY',\n 'REQUEST_NO',\n 'REASON',\n ];\n\n foreach ($requiredParams as $param) {\n if (! ($this->attributes[$param] ?? null)) {\n throw new InvalidStockAwbRequestException(\"$param is required.\");\n }\n }\n\n return;\n }",
"private function validateLicenseData()\n {\n\n // error_log('LicenseEmail : '.print_r($this->getLicenseEmail(), 1));\n // error_log('LicenseProduct : '.print_r($this->getLicenseProduct(), 1));\n // error_log('LicenseSecretKey : '.print_r($this->getLicenseSecretKey(), 1));\n }",
"public function testUpdateInvalidReading() : void {\n // create a Reading with a non null reading id and watch it fail\n $reading = new Reading(null, $this->sensor->getSensorId(), $this->VALID_SENSORVALUE, $this->VALID_SENSORDATETIME);\n $reading->update($this->getPDO());\n }",
"function isDataValid() \n {\n return true;\n }",
"public function getSerialNumber(): ?string {\n $val = $this->getBackingStore()->get('serialNumber');\n if (is_null($val) || is_string($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'serialNumber'\");\n }",
"public function testDebtorSaveNumberEmpty()\n {\n $aDados = [\n 'name' => 'Carlos Vinicius',\n 'email' => '[email protected]',\n 'cpf_cnpj' => '1234567890',\n 'birthdate' => '12/01/1994',\n 'phone_number' => '(79) 9 9999-9999',\n 'zipcode' => '99999-999',\n 'address' => 'Rua Teste',\n 'number' => '',\n 'complement' => 'Conjunto Teste 2',\n 'neighborhood' => 'Bairro Teste 2',\n 'city' => 'Aracaju',\n 'state' => 'SE'\n ];\n\n $this->expectException(InvalidAttributeException::class);\n $oDebtor = Debtor::createFromRequest($aDados);\n }",
"public function testGetValidReadingByReadingSensorId() {\n // count the number of rows and save it for later\n $numRows = $this->getConnection()->getRowCount(\"reading\");\n\n $reading = new Reading(null, $this->sensor->getSensorId(), $this->VALID_SENSORVALUE, $this->VALID_SENSORDATETIME);\n $reading->insert($this->getPDO());\n\n // grab the data from mySQL and enforce the fields match our expectations\n $results = Reading::getReadingByReadingSensorId($this->getPDO(), $reading->getReadingSensorId());\n $this->assertEquals($numRows + 1, $this->getConnection()->getRowCount(\"reading\"));\n $this->assertCount(1, $results);\n $this->assertContainsOnlyInstancesOf(\"Edu\\\\Cnm\\\\PiMirror\\\\Reading\", $results);\n\n // grab the result from the array and validate it\n\t\t $pdoReading = $results[0];\n\t\t $this->assertEquals($pdoReading->getReadingSensorId(), $this->sensor->getSensorId());\n\t\t $this->assertEquals($pdoReading->getSensorValue(), $this->VALID_SENSORVALUE);\n\t\t // format the date to seconds since the beginning of time to avoid round off error\n\t\t $this->assertEquals($pdoReading->getSensorDateTime()->getTimestamp(), $this->VALID_SENSORDATETIME->getTimestamp());\n }",
"public function testSsn() {\n $this->assertEquals('998-29-3841', Format::ssn('998293841'));\n }",
"public function testInsertValidReading(): void {\n\t\t// count the number of rows and save it for later\n\t\t$numRows = $this->getConnection()->getRowCount(\"reading\");\n\n\t\t// create a new Reading and insert it into mySQL\n\t\t$reading = new Reading(null, $this->sensor->getSensorId(), $this->VALID_SENSORVALUE, $this->VALID_SENSORDATETIME);\n\t\t$reading->insert($this->getPDO());\n\n\t\t/**\n\t\t * put var_dump for now\n\t\t * var_dump($reading);\n\t\t */\n\n\t\t// grab the data from mySQL and enforce the fields match our expectations\n\t\t$pdoReading = Reading::getReadingByReadingId($this->getPDO(), $reading->getReadingId());\n\t\t$this->assertEquals($numRows + 1, $this->getConnection()->getRowCount(\"reading\"));\n\t\t$this->assertEquals($pdoReading->getReadingSensorId(), $this->sensor->getSensorId());\n\t\t$this->assertEquals($pdoReading->getSensorValue(), $this->VALID_SENSORVALUE);\n\t\t// format the date to seconds since the beginning of time to avoid round off error\n\t\t$this->assertEquals($pdoReading->getSensorDateTime()->getTimestamp(), $this->VALID_SENSORDATETIME->getTimestamp());\n\t}",
"private function validate()\n {\n if (! is_numeric($this->number)) {\n throw new \\InvalidArgumentException(\"Invalid numeric value provided ($this->number).\");\n }\n }",
"public function assertValid()\n {\n }",
"public function getSerialNumber() {\n\t\treturn self::$_serialNumber;\n\t}",
"public function getSerial()\n {\n if (isset($this->serial)) {\n return $this->serial;\n }\n\n throw new RuntimeException(\"Unable to create Invoice: serial not set.\");\n }",
"function sugar_valid_mac($mac) {\n // no separator format\n if (strlen($mac) == 12) {\n return preg_match('/[A-F0-9]{12}/', $mac) == 1;\n }\n if (strlen($mac) == 17) {\n // separator : format\n $matches = preg_match('/([A-F0-9]{2}[:]){5}[A-F0-9]{2}/', $mac);\n if ($matches == 1) {\n return TRUE;\n }\n // separator - format\n $matches = preg_match('/([A-F0-9]{2}[\\-]){5}[A-F0-9]{2}/', $mac);\n return ($matches == 1);\n }\n return FALSE;\n}",
"public function testSnils()\n {\n $this->assertTrue(RuValidation::snils('112-233-445 95'));\n $this->assertTrue(RuValidation::snils('032-032-952 00'));\n\n $this->assertFalse(RuValidation::snils('03203295200'));\n\n // invalid checksum\n $this->assertFalse(RuValidation::snils('112-233-445 96'));\n }",
"public function __construct($serial)\n {\n parent::__construct($serial);\n\n $this->sound = 'Baa!';\n }",
"public function __toString() : string\n {\n return 'Serial';\n }",
"public function getSerialNumber()\n {\n return $this->serialNumber;\n }",
"function valid()\n {\n if (isset($this->aid))\n return true;\n else\n return false;\n }",
"public function valid() {\n\t\treturn true;\n\t}",
"function is_valid() {\n return is_resource($this->connection);\n }",
"private function _check_crc()\n\t{\n\t\t// Make sure we have unsigned crc padded hex.\n\t\t$crc_uncompressed = hash('crc32b', $this->data);\n\t\t$this->_crc = str_pad(dechex($this->_crc), 8, '0', STR_PAD_LEFT);\n\n\t\treturn $this->data !== false && $this->_crc === $crc_uncompressed;\n\t}",
"function checkValidLine_Y6051($acct){\r\n\t\t\tif( strlen($acct)==9 && is_numeric($acct) ){\r\n\t\t\t\treturn true;\r\n\t\t\t}else{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t}",
"public function get_serialNumber(): string\n {\n // $res is a string;\n // $dev is a YDevice;\n if ($this->_cacheExpiration == 0) {\n $dev = $this->_getDev();\n if (!($dev == null)) {\n return $dev->getSerialNumber();\n }\n if ($this->load(YAPI::$_yapiContext->GetCacheValidity()) != YAPI::SUCCESS) {\n return self::SERIALNUMBER_INVALID;\n }\n }\n $res = $this->_serialNumber;\n return $res;\n }",
"private function validate() {\n $this->valid = (1 === count($this->marriages));\n }",
"public function testUpdateValidReading(): void {\n // count the number of rows and save it for later\n $numRows = $this->getConnection()->getRowCount(\"reading\");\n\n // create a new Reading and insert into mySQL\n $reading = new Reading(null, $this->sensor->getSensorId(), $this->VALID_SENSORVALUE, $this->VALID_SENSORDATETIME);\n $reading->insert($this->getPDO());\n\n // edit the Reading and update it in mySQL\n\t\t $reading->setSensorValue($this->VALID_SENSORVALUE2);\n\t\t $reading->update($this->getPDO());\n\n // grab the data from mySQL and enforce the fields match our expectations\n $pdoReading = Reading::getReadingByReadingId($this->getPDO(), $reading->getReadingId());\n $this->assertEquals($numRows + 1, $this->getConnection()->getRowCount(\"reading\"));\n $this->assertEquals($pdoReading->getReadingSensorId(), $this->sensor->getSensorId());\n $this->assertEquals($pdoReading->getSensorValue(), $this->VALID_SENSORVALUE2);\n $this->assertEquals($pdoReading->getSensorDateTime()->getTimestamp(), $this->VALID_SENSORDATETIME->getTimestamp());\n }",
"public function is_valid()\n {\n }",
"public static function validate($parameters): bool\n {\n $uuidData = preg_replace('/[^0-9a-f]/i', '', $parameters['uuid']);\n\n $amountLength = substr($uuidData, 1, 1);\n $amount = substr($uuidData, 2, $amountLength);\n $serviceId = substr($uuidData, 8, 8);\n\n $strChecksumUUID = substr($uuidData, ($amountLength + 2), (6 - $amountLength));\n $hash = hash_hmac(UUID::HASH_METHOD, self::$prefix . $amountLength . $amount . $serviceId, $parameters['secret']);\n\n return substr($hash, 0, strlen($strChecksumUUID)) === $strChecksumUUID;\n }",
"private function __construct($serial, $secret = null) {\n\t\tif(is_null($secret)) {\n\t\t\t$this->set_region($serial);\n\t\t} else {\n\t\t\t$this->set_serial($serial);\n\t\t\t$this->set_secret($secret);\n\t\t}\n\t}",
"public function is_valid()\n {\n }",
"private function validatePaymentFields(){\n }",
"function isValidManufacturer($manufacturer) {\n\tunset($manufacturer);\n\treturn true;\n}",
"public function getSerialId()\n\t{\n\n\t\treturn $this->serial_id;\n\t}",
"public function valid()\n {\n\n if ($this->container['sku'] === null) {\n return false;\n }\n return true;\n }",
"public function valid()\n {\n return true;\n }",
"public function valid()\n {\n return true;\n }",
"public function valid()\n {\n return true;\n }",
"public function valid()\n {\n return true;\n }",
"public function valid()\n {\n return true;\n }",
"public function valid()\n {\n return true;\n }",
"public function valid()\n {\n return true;\n }",
"public function valid()\n {\n return true;\n }",
"public function isCardValid()\n {\n return $this->isValidCard;\n }",
"#[\\ReturnTypeWillChange]\n public function valid()\n {\n }",
"#[\\ReturnTypeWillChange]\n public function valid()\n {\n }",
"public function valid()\n {\n\n return true;\n }",
"public function valid()\n {\n\n return true;\n }",
"public function valid()\n {\n\n return true;\n }",
"public function valid()\n {\n\n return true;\n }",
"public function valid()\n {\n\n return true;\n }",
"public function valid()\n {\n\n return true;\n }"
]
| [
"0.69769156",
"0.6026741",
"0.6009519",
"0.6007776",
"0.5973987",
"0.58415186",
"0.57436705",
"0.56657416",
"0.56657416",
"0.56657416",
"0.56657416",
"0.56657416",
"0.56657416",
"0.56657416",
"0.56657416",
"0.5647725",
"0.5624968",
"0.56122303",
"0.5592694",
"0.54765654",
"0.53734624",
"0.53612196",
"0.53574395",
"0.53476435",
"0.53328925",
"0.53241825",
"0.5302899",
"0.5297958",
"0.5291664",
"0.52610207",
"0.52610207",
"0.52610207",
"0.52610207",
"0.52569723",
"0.52556807",
"0.5248065",
"0.5221721",
"0.521682",
"0.521682",
"0.521682",
"0.521682",
"0.51916337",
"0.5184954",
"0.5173268",
"0.5130138",
"0.5127418",
"0.51125205",
"0.5098612",
"0.50953436",
"0.5093897",
"0.5082707",
"0.50672954",
"0.50563145",
"0.50558984",
"0.50476474",
"0.50395757",
"0.50349593",
"0.5020536",
"0.501916",
"0.50164235",
"0.49970362",
"0.49951532",
"0.4991419",
"0.49897006",
"0.4971132",
"0.49666357",
"0.49614164",
"0.4958937",
"0.49531868",
"0.49452743",
"0.49415594",
"0.49356887",
"0.4924416",
"0.49217805",
"0.49207762",
"0.49191743",
"0.4918964",
"0.49184838",
"0.49181038",
"0.4910081",
"0.49087548",
"0.4907014",
"0.4900013",
"0.48986042",
"0.48986042",
"0.48986042",
"0.48986042",
"0.48986042",
"0.48986042",
"0.48986042",
"0.48986042",
"0.4895786",
"0.48957434",
"0.4893941",
"0.48903313",
"0.48903313",
"0.48903313",
"0.48903313",
"0.48903313",
"0.48903313"
]
| 0.5255112 | 35 |
Gets visible moderation queue entries for specified user. | public function getVisibleModerationQueueEntriesForUser(array $contentIds, array $viewingUser)
{
$socialForumModel = ThemeHouse_SocialGroups_SocialForum::getSocialForumModel();
$socialForums = $socialForumModel->getSocialForumsByIds($contentIds,
array(
'join' => ThemeHouse_SocialGroups_Model_SocialForum::FETCH_FORUM |
ThemeHouse_SocialGroups_Model_SocialForum::FETCH_USER,
'permissionCombinationId' => $viewingUser['permission_combination_id']
));
$output = array();
foreach ($socialForums as $socialForum) {
$socialForum['permissions'] = XenForo_Permission::unserializePermissions(
$socialForum['node_permission_cache']);
$canManage = true;
if (!$socialForumModel->canViewSocialForum($socialForum, $null, $socialForum['permissions'], $viewingUser)) {
$canManage = false;
} elseif (!XenForo_Permission::hasContentPermission($socialForum['permissions'], 'editSocialForum') ||
!XenForo_Permission::hasContentPermission($socialForum['permissions'], 'deleteSocialForum')) {
$canManage = false;
}
if ($canManage) {
$output[$socialForum['social_forum_id']] = array(
'message' => $socialForum['description'],
'user' => array(
'user_id' => $socialForum['user_id'],
'username' => $socialForum['username']
),
'title' => $socialForum['title'],
'link' => XenForo_Link::buildPublicLink('social-forums', $socialForum),
'contentTypeTitle' => new XenForo_Phrase('th_social_forum_socialgroups'),
'titleEdit' => true
);
}
}
return $output;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getModerations($user_id) {\n return $this->find('list', array(\n 'conditions' => array('Moderator.user_id' => $user_id),\n 'fields' => array('Moderator.forum_id')\n ));\n }",
"public function getList($user);",
"public function getEntries($user) {\n\t\t$db = $this->db;\n\t\t$user = $db->quote($user);\n\t\t$query = \"SELECT value FROM entries WHERE user=$user\";\n\t\t$result = $db->query($query);\n\t\treturn $result->fetchAll(PDO::FETCH_ASSOC);\n\t}",
"public function findInboxByUser($user)\n {\n return $this->getEntityManager()\n ->createQuery(\n 'SELECT m\n FROM WHAAMPrivateApplicationNotificationBundle:Message m\n JOIN m.recipientUsers r\n WHERE r = :user\n ORDER BY m.createdAt DESC\n '\n )\n ->setParameter('user', $user)\n ->getResult();\n }",
"public function getAllPublications($user)\n {\n return $this->getByUser($user);\n }",
"function query_module_access_list(&$user)\n{\n\trequire_once('modules/MySettings/TabController.php');\n\t$controller = new TabController();\n\t$tabArray = $controller->get_tabs($user); \n\n\treturn $tabArray[0];\n\t\t\n}",
"public function allUnreadForUser($userId);",
"public function allUnreadForUser($userId);",
"public function findByUser() {\n try \n {\n $params = $this->app->request()->params();\n $fields = array_to_json($params);\n\n //get request url parmameters\n $offset = isset($fields->offset) ? $fields->offset : 0;\n $limit = isset($fields->limit) ? $fields->limit : 7; \n $receiver = isset($fields->receiver) ? $fields->receiver : 'none'; \n\n $messages = Message::findByUser($offset, $limit, $receiver);\n\n //return finded users\n response_json_data($messages);\n }\n catch(Exception $e) \n {\n response_json_error($this->app, 500, $e->getMessage());\n }\n }",
"public function getAnnouncesByUser($user)\n {\n $em = $this->getEntityManager();\n \n $query = $em->createQuery('\n SELECT a \n FROM AnnounceBundle:Announce a JOIN a.user u \n WHERE a.user = :user\n ORDER BY a.post ASC\n ');\n $query->setParameter('user', $user);\n return $query->getResult();\n }",
"private function get_modification_links($user)\r\n {\r\n $toolbar = new Toolbar(Toolbar :: TYPE_HORIZONTAL);\r\n return $toolbar->as_html();\r\n }",
"public function publishedBy($user_id)\n {\n return $this->model->where(compact('user_id'))->get();\n }",
"function dialogue_get_user_entries($dialogue, $user) {\n global $DB, $CFG;\n $sqlparams = array('dialogueid' => $dialogue->id, 'userid' => $user->id);\n return $DB->get_records_select('dialogue_entries', \"dialogueid = :dialogueid AND userid = :userid\",\n 'timecreated DESC', $sqlparams);\n}",
"function getRanks($userId, $moderator = false)\n\t{\n\t\t$e107 = e107::getInstance();\n\t\tif(!$userId && USER) { $userId = USERID; }\n\t\tif(isset($this->userRanks[$userId]))\n\t\t{\n\t\t\treturn $this->userRanks[$userId];\n\t\t}\n\n\t\t$ret = array();\n\t\tif(is_array($userId))\n\t\t{\n\t\t\t$userData = $userId;\n\t\t\t$userId = $userData['user_id'];\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$userData = e107::getSystemUser($userId)->getData(); //get_user_data($userId);\n\t\t}\n\n\t\tif($userData['user_admin'])\n\t\t{\n\t\t\tif($userData['user_perms'] == '0')\n\t\t\t{\n\t\t\t\t//Main Site Admin\n\t\t\t\t$data['special'] = \"<img src='\".$this->_getImage($this->ranks['special'][1]).\"' alt='\".$this->_getName($this->ranks['special'][1]).\"' title='\".$this->_getName($this->ranks['special'][1]).\"' />\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//Site Admin\n\t\t\t\t$data['special'] = \"<img src='\".$this->_getImage($this->ranks['special'][2]).\"' alt='\".$this->_getName($this->ranks['special'][2]).\"' title='\".$this->_getName($this->ranks['special'][2]).\"' />\";\n\t\t\t}\n\t\t}\n\t\telseif($moderator)\n\t\t{\n\t\t\t$data['special'] = \"<img src='\".$this->_getImage($this->ranks['special'][3]).\"' alt='\".$this->_getName($this->ranks['special'][3]).\"' title='\".$this->_getName($this->ranks['special'][3]).\"' />\";\n\t\t}\n\n\t\t$userData['user_daysregged'] = max(1, round((time() - $userData['user_join']) / 86400));\n\t\t$level = $this->_calcLevel($userData);\n\n\t\t$lastRank = count($this->ranks['data']);\n\t\t$rank = false;\n\t\tif($level <= $this->ranks['data'][0]['thresh'])\n\t\t{\n\t\t\t$rank = 1;\n\t\t}\n\t\telseif($level >= $this->ranks['data'][$lastRank]['thresh'])\n\t\t{\n\t\t\t$rank = $lastRank;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfor($i=0; $i < $lastRank; $i++)\n\t\t\t{\n\t\t\t\tif($level >= $this->ranks['data'][$i]['thresh'] && $level < $this->ranks['data'][($i+1)]['thresh'])\n\t\t\t\t{\n\t\t\t\t\t$rank = $i + 1;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif($rank !== false)\n\t\t{\n\t\t\t$data['name'] = $this->_getName($this->ranks['data'][$rank]);\n\t\t\t$img_title = ($this->ranks['data'][$rank]['name'] ? \" alt='{$data['name']}' title='{$data['name']}'\" : ' alt = \"\"');\n\t\t\t$data['pic'] = \"<img {$img_title} src='\".$this->_getImage($this->ranks['data'][$rank]).\"'{$img_title} />\";\n\t\t}\n\t\t$this->userRanks[$userId] = $data;\n\n\t\treturn $data;\n\t}",
"public function getAuthenticatedEmotes($user) { \r\n return $this->makeRequest('get', \"/users/{$user}/emotes\");\r\n }",
"private function getByUser($user)\n {\n $q = $this\n ->getUserPublicationQueryBuilder($user)\n ->orderBy('p.publishedAt', 'desc')\n ->getQuery()\n ;\n\n return $q->getResult();\n }",
"function getAllowedModules( $user_id = 0 )\n\t{\n\t\tif ( !$user_id )\n\t\t{\n\t\t\t$user_id = $this->user_id;\n\t\t}\n\t\t\n\t\t$sql = \"SELECT `permission_grant_on`\n\t\t\t\tFROM `permissions`\n\t\t\t\tWHERE (`permission_user` = $user_id)\n\t\t\t\tAND (`permission_value` != 0 )\";\n\t\t\t\t\n\t\treturn db_loadList( $sql );\t\t\t\t\n\t}",
"public function getUserBoards($user) {\n return $this->findBy(['user' => $user, 'isDeleted' => 0]);\n }",
"public function findSubmissionsForMod($modUserId)\n {\n $query = '\n SELECT submitted_at, first_name, last_name, topic, mark, s.id\n FROM submissions s\n LEFT JOIN users u ON s.user_id = u.id\n LEFT JOIN projects p ON s.project_id = p.id\n WHERE mod_user_id = :mod_user_id\n ORDER BY submitted_at DESC\n ';\n $statement = $this->db->prepare($query);\n $statement->bindValue('mod_user_id', $modUserId, \\PDO::PARAM_INT);\n $statement->execute();\n $result = $statement->fetchAll(\\PDO::FETCH_ASSOC);\n\n return $result;\n }",
"public function findNotDisplayedMessagesByUser($user)\n {\n return $this->getEntityManager()\n ->createQuery(\n 'SELECT m.id, m.subject, a.id as answerId, u.surname, u.name, u.username,\n s.id as messageStatusId, ast.id as answerStatusId\n FROM WHAAMPrivateApplicationNotificationBundle:Message m\n JOIN m.statuses s\n JOIN m.sender u\n LEFT JOIN m.answers a\n LEFT JOIN a.statuses ast\n WHERE (s.user = :user AND s.isDisplayed = 0) OR\n (ast.user = :user AND ast.isDisplayed = 0)\n '\n )\n ->setParameter('user', $user)\n ->getResult();\n }",
"public function getAllByUserId($user_id)\n\t{\n\t\t$sql = sprintf('SELECT *\n\t\t\t\t\t\tFROM ats_jobs\n\t\t\t\t\t\tWHERE created_by = %d\n\t\t\t\t\t\tAND deleted = 0\n\t\t\t\t\t\tORDER BY modified_ts DESC',\n\t\t\t\t\t\t$user_id);\n\n\t\treturn $this->_db->query($sql)->fetchAll();\n\t}",
"public function findSentByUser($user)\n {\n return $this->getEntityManager()\n ->createQuery(\n 'SELECT m\n FROM WHAAMPrivateApplicationNotificationBundle:Message m\n WHERE m.sender = :user\n ORDER BY m.createdAt DESC\n '\n )\n ->setParameter('user', $user)\n ->getResult();\n }",
"public function allForUser($userId);",
"public function allForUser($userId);",
"public function getEditable(User $user) {\n if ($user->isAdmin()) {\n return $this->getAll();\n }\n\n $qb = $this->repository->createQueryBuilder(self::ALIAS);\n\n return $qb->join('site.roles', 'roles')\n ->where('roles.user = :user')\n ->andWhere('roles.readOnly = false')\n ->setParameter('user', $user)\n ->getQuery()\n ->getResult();\n }",
"public static function notifactions_for_users($user_id){\n\t\t\tglobal $database;\n\n\t\t\t$sql = \"SELECT * FROM \" . self::$db_table . \" WHERE \";\n\t\t\t$sql .= \"user_id = {$user_id}\";\n $the_result_array = self::find_by_query($sql);\n return !empty($the_result_array) ? array_shift($the_result_array) : false;\n\t\t}",
"function getByUserID($user_id) {\n return $this->find('list', array(\n 'conditions' => array(\n 'Wishlist.user_id' => $user_id\n ),\n 'fields' => array(\n 'Wishlist.product_entity_id'\n )\n ));\n }",
"public static function returnRecipientRequests(Database $db, $user)\n {\n $user_id = $user->getUserId();\n try\n {\n $query = \"SELECT request.request_id, item.*\nFROM request \nLEFT JOIN item on request.item_id = item.item_id \nWHERE request.user_id = '$user_id'\";\n\n\n $db->runQuery($query);\n $requestsList = array();\n\n foreach ($db->results as $row)\n {\n $item = new Item($row[1], $row[2], $row[3], $row[4], $row[5], $row[6], $row[7], $row[8], $row[9]);\n $request = new Request($item, $user);\n $request->setRequestId($row[0]);\n\n array_push($requestsList, $request);\n }\n return $requestsList;\n }\n catch (DatabaseException $e)\n {\n $e->echoDetails();\n }\n catch (Exception $e)\n {\n echo \"Exception in method \". __METHOD__;\n }\n }",
"public function get_sup_requests($user_id){\r\n\t\r\n\t$req = $this->data_client->get_sup_requests($user_id);\r\n\treturn $req;\r\n\t}",
"function feed_access_feeds($user = NULL) {\r\n if (!$user) {\r\n global $user;\r\n }\r\n $fids = &drupal_static(__FUNCTION__);\r\n \r\n if (!isset($user->uid)) {\r\n return array();\r\n }\r\n if (!isset($fids[$user->uid])) {\r\n $fids[$user->uid] = db_select('feed', 'f')\r\n ->fields('f', array('fid'))\r\n ->condition('f.uid', $user->uid)\r\n ->execute()->fetchAllKeyed(0, 0);\r\n }\r\n return $fids[$user->uid];\r\n}",
"public static function getAllVisibleToUser(User $user)\n {\n $visibles = static::all();\n $visibles = $visibles->reject(function ($visible) use ($user) {\n return !$visible->isVisibleToUser($user);\n })->flatten();\n return $visibles;\n }",
"public function readList(User $user)\n {\n return $user->hasPermission('block-read');\n }",
"public function scopeUserListings($query, $user) {\n return $query->where('user_id', $user->id);\n }",
"public function findBorrowedByUser($user)\n\t{\n\t\t$qb = $this->createQueryBuilder('m')\n\t\t->addSelect('COUNT(o.id) AS HIDDEN orderCount')\n\t\t->leftJoin('m.orders', 'o')\n\t\t->leftJoin('o.user', 'u')\n\t\t->leftJoin('o.status', 'os')\n\t\t->groupBy('m')\n\t\t->having('orderCount > 0')\n\t\t->where('u.id = :user_id')\n\t\t->andwhere('os.id = :paid_id')\n\t\t->setParameters(array('user_id' => $user->getId(), 'paid_id' =>OrderStatus::PAID));\n\t\t\n\t\t$moives = $qb->getQuery()->getResult();\n\t\treturn $moives;\n\t}",
"public function getInboxByUser($userId, $perPage, $page);",
"public static function getTimelineByUserId($user_id)\n\t{\n\t\t$redis = GitHQ\\Bundle\\AbstractController::getRedisClient();\n\t\t$list = $redis->lrange(self::KEY_TIMELINE_USERS . \".{$user_id}\",0,100);\n\t\t$result = Activity::mget($list, 'activity');\n\t\treturn $result;\n\t}",
"public function getUserNotifications($user);",
"private function _get_hidden_posts($user_id)\n {\n global $db;\n $hidden_posts = [];\n $get_hidden_posts = $db->query(sprintf(\"SELECT post_id FROM global_posts_hidden WHERE user_id = %s\", secure($user_id, 'int'))) or _error(\"SQL_ERROR_THROWEN\");\n if ($get_hidden_posts->num_rows > 0) {\n while ($hidden_post = $get_hidden_posts->fetch_assoc()) {\n $hidden_posts[] = $hidden_post['post_id'];\n }\n }\n return $hidden_posts;\n }",
"public static function get_support_rep_plugins( $user ) {\n\t\tglobal $wpdb;\n\n\t\t$user = new WP_User( $user );\n\t\tif ( ! $user->exists() ) {\n\t\t\treturn [];\n\t\t}\n\n\t\t$plugins = wp_cache_get( $user->user_nicename, 'support-rep-plugins' );\n\n\t\tif ( false === $plugins ) {\n\t\t\t$plugins = get_posts( [\n\t\t\t\t'fields' => 'ids',\n\t\t\t\t'post_type' => 'plugin',\n\t\t\t\t'post_status' => 'publish',\n\t\t\t\t'posts_per_page' => 250,\n\t\t\t\t'no_found_rows' => true,\n\t\t\t\t'tax_query' => [\n\t\t\t\t\t[\n\t\t\t\t\t\t'taxonomy' => 'plugin_support_reps',\n\t\t\t\t\t\t'field' => 'slug',\n\t\t\t\t\t\t'terms' => $user->user_nicename,\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t] );\n\n\t\t\twp_cache_set( $user->user_nicename, $plugins, 'support-rep-plugins', 12 * HOUR_IN_SECONDS );\n\t\t}\n\n\t\t// ID's to objects.\n\t\tif ( $plugins && is_int( $plugins[0] ) ) {\n\t\t\t$plugins = array_map( 'get_post', $plugins );\n\t\t}\n\n\t\treturn $plugins;\n\t}",
"public function getReadable(User $user) {\n if ($user->isAdmin()) {\n return $this->getAll();\n }\n\n $qb = $this->repository->createQueryBuilder(self::ALIAS);\n\n return $qb->join('site.roles', 'roles')\n ->where('roles.user = :user')\n ->setParameter('user', $user)\n ->getQuery()\n ->getResult();\n }",
"public function forUser(User $user)\r\n {\r\n return tasks::where('user_id', $user->id)\r\n ->orderBy('created_date', 'asc')\r\n ->get();\r\n }",
"function get_lists_data( $admin = false, $user_id = null ) {\n\t\t$args = array(\n\t\t\t'post_status'\t=> array('publish'),\n\t\t\t'post_type' \t=> 'um_mailchimp',\n\t\t\t'fields'\t\t=> 'ids',\n\t\t\t'posts_per_page' => -1\n\t\t);\n\n\t\t$args['meta_query'][] = array(\n\t\t\t'key' => '_um_status',\n\t\t\t'value' => '1',\n\t\t\t'compare' => '='\n\t\t);\n\n\t\tif( is_numeric( $user_id ) ){\n\t\t\t$this->user_id = $user_id;\n\t\t}\n\n\t\tum_fetch_user( $this->user_id );\n\t\t$lists = new \\WP_Query( $args );\n\t\tif ( $lists->found_posts > 0 ) {\n\t\t\t$array = $lists->get_posts();\n\n\t\t\t// frontend-use\n\t\t\tif ( !$admin ) {\n\t\t\t\tforeach( $array as $k => $post_id ) {\n\t\t\t\t\t$roles = get_post_meta( $post_id, '_um_roles', true);\n\t\t\t\t\t$current_user_roles = um_user( 'roles' );\n\t\t\t\t\tif ( ! empty( $roles ) && ( empty( $current_user_roles ) || count( array_intersect( $current_user_roles, $roles ) ) <= 0 ) ) {\n\t\t\t\t\t\tunset( $array[$k] );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} \n\n\t\t\tif ( $array )\n\t\t\t\treturn $array;\n\t\t}\n\t\treturn array();\n\t}",
"function getMine($user_id) {\n\t\treturn $this->find('all', array(\n\t\t\t'contain' => false,\n\t\t\t'conditions' => array(\n\t\t\t\t'applicant_user_id' => $user_id\n\t\t\t),\n\t\t\t'order' => array(\n\t\t\t\t'Travelapplication.created' => 'DESC'\n\t\t\t),\n\t\t));\n\n\t}",
"public function getRespondedUser($id,$user_id){\n\t\treturn DB::table('chat')\n\t\t->select('users.*')\n\t\t->leftJoin('users','chat.sent_by','=','users.id')\n\t\t->where('chat.listing_id',$id)\n\t\t->where('status',1)\n\t\t->where('users.id','!=',$user_id)\n\t\t->orderby('users.name','asc')\n\t\t->groupBy('users.id')\n\t\t->get();\n\t}",
"public function getAllPermissionsForUser($user): array;",
"public function index(User $user)\n {\n $invitations = Invitation::where('contact_id', $user->id)->where('viewed', false)->get();\n return $invitations;\n }",
"public function findAllByUser($userId)\n {\n $sql = \"select * from wave_request where id_user =? limit 10\";\n $request = $this->getDb()->fetchAll($sql, array($userId));\n\n $requests = array();\n foreach ($request as $row) {\n $requestId = $row['id'];\n $requests[$requestId] = $this->buildDomainObject($row);\n }\n\n return $requests;\n }",
"public function getMusicPublications($user)\n {\n return $this->getByCategoryType('Music', $user);\n }",
"static function findAdministrators($exclude_user = null) {\n return Users::find(array(\n 'conditions' => $exclude_user instanceof User ? DB::prepare(\"type = 'Administrator' AND id != ? AND state = ?\", $exclude_user->getId(), STATE_VISIBLE) : DB::prepare(\"type = 'Administrator' AND state = ?\", STATE_VISIBLE),\n ));\n }",
"public function get_unread_messages($user)\n {\n $this->db->from('privmsgs_to')\n ->where('pmto_recipient_user', $user)\n ->where('pmto_unread', 'y');\n $query = $this->db->get();\n\n if ($query->num_rows() > 0) {\n $unread = array();\n\n foreach ($query->result() as $row) {\n $unread[] = $row->pmto_message;\n }\n\n return $unread;\n }\n\n return false;\n }",
"public static function getPendingPosts(User $user)\n {\n try {\n\n $postsQuery = Post::orderBy('created_at', 'DESC')->with('comments')->where('status', '0');\n\n if (!$user->hasRole(Config::get('app.access.role.admin'))) {\n $postsQuery->where('user_id', $user->id);\n }\n\n return $postsQuery->get();\n\n } catch (\\Exception $exception) {\n logThis($exception);\n }\n\n }",
"public function index(User $user)\n {\n return $user->isAllowedTo('viewAdminPanel.user');\n }",
"public function findFriendsWaitingForAnswer(User $user){\n\t\treturn $this->createQueryBuilder('u')\n\t\t\t->join('u.friendships', 'f')\n\t\t ->where('f.user2 = :user', 'f.status = 0')\n\t\t ->setParameter(':user', $user)\n\t\t ->getQuery()\n\t\t ->getResult();\n\t}",
"public function messages_by_user_get() {\n\t\t$uid = $this->input->get('uid');\n\t\t$skip = $this->input->get('skip');\n\t\t$limit = $this->input->get('limit');\n\n\t\t$messages = $this->Messages_model->getMessagesByUserID($uid, $skip, $limit);\n\t\t\n\t\tforeach($messages as $key=>$value) {\n\t\t\t$id = $messages[$key]['_id']->{'$id'};\n\t\t\t$messages[$key]['_id'] = $id;\n\t\t}\n\t\t\n\t\t$this->response($messages);\n\t}",
"public function findReceivedMessagesForUser(FrontendUser $user, $limit = 0) {\n\t\t$query = $this->createQuery();\n\t\t$constraints = [];\n\t\t$constraints[] = $query->equals('opponent', $user);\n\t\t$constraints[] = $query->equals('type', 1);\n\t\t$constraints[] = $query->equals('feuser.disable', 0);\n\t\t$query->matching($query->logicalAnd($constraints));\n\t\t$query->setOrderings(['crdate' => 'DESC']);\n\t\tif ($limit > 0) {\n\t\t\t$query->setLimit($limit);\n\t\t}\n\n\t\treturn $query->execute();\n\t}",
"public function allReadForUser($userId);",
"public function fetchUserQueue($userid, $gameid)\n {\n return $this->_em->createQuery(\"\n SELECT u, s\n FROM EIPHRBundle:HRUnitQueue u\n JOIN u.schema s\n JOIN u.army a\n WHERE a.user = :userid\n AND a.game = :gameid\n ORDER BY u.endTime ASC\n \")\n ->setParameter(':gameid', $gameid)\n ->setParameter(':userid', $userid)\n ->getResult();\n }",
"public function allAppliedJobs($user)\n {\n // Check if the user is recruiter\n if ($user->type === 1) throw new AccessException('Not Authorized.');\n return $user->appliedJobs();\n }",
"public function getQueryByUser($userId, $withExpired=0) {\n\t\t$today = date('Y-m-d');\n\t $this->recursive = 1;\n\t \n\t\t$options['joins'] = [\n\t \t[\n\t 'table' => 'query_messages',\n\t 'alias' => 'QM',\n\t 'type' => 'LEFT',\n\t 'conditions' => [\n\t 'QM.query_id = Query.id'\n\t ]\n\t ]\n\t ];\n\t \n\t $options['conditions'] = [];\n\t \n\t if(! $withExpired) {\n\t\t\t$options['conditions'] += ['Query.deadline >='=> $today];\n\t }\n\t \n\t\t$options['conditions'] += ['Query.deleted' => 0];\n\t\t$options['conditions']['OR'] = [['QM.type' => '', 'Query.user_id' => $userId], ['QM.type' => 'proposal', 'Query.user_id' => $userId]];\n\t\t\n $queryList = $this->find('all', $options);\n \n // echo $this->getLastQuery(); die();\n\n return $queryList;\n\t}",
"public function getResultsOfUser($user_id);",
"public function forUser(User $user)\n\t{\n\t\treturn Ticket::where('assignee_id', $user->id)\n\t\t\t->orderBy('priority', 'asc')\n\t\t\t->get();\n\t}",
"public function findNotifications($userId);",
"public function getFriendshipRequests(User $user) {\n $id=$user->getId();\n $qb = $this->createQueryBuilder('friendship')->join('friendship.user', 'user')->join('friendship.friend', 'friend')->addSelect('user', 'friend')\n ->where('friendship.user = :user')->andWhere('friendship.status = 0')->andWhere('friendship.requester != :user')->setParameter(':user', \"$id\");\n $query = $qb->getQuery();\n return $query->getResult();\n }",
"public function findReceivedUserRatings(User $user): ?array\n {\n\n return $this->createQueryBuilder('r')\n ->join('r.booking', 'b')\n ->where('b.user = :user')\n ->andWhere('b.accepted = true')\n ->andWhere('r.user <> :user')\n ->andWhere('r.approvedRating = true')\n ->orderBy('r.createdAt', 'DESC')\n ->setParameter('user', $user)\n ->getQuery()\n ->getResult()\n ;\n\n }",
"public function getByUser($user_id)\n {\n return $this->db->table(static::TABLE)->eq('user_id', $user_id)->desc('date')->asc('start')->findAll();\n }",
"abstract public function isVisibleToUser(User $user);",
"public function findAllWithUser(UserEntity $user) {\n\t\tif ($user->getId() == NULL) {\n\t\t\tthrow new NullPointerException(\"user:id\");\n\t\t}\n\t\treturn dibi::dataSource(\"SELECT * FROM [view_message] WHERE ([id_user_from] = %i AND [deleted_by_owner] = 0) OR ([id_user_to] = %i AND [deleted_by_recipient] = 0) ORDER BY inserted DESC\", $user->getId(),$user->getId());\n\t}",
"public static function returnDonorRequests(Database $db, $user, $isConfirmed)\n {\n $user_id = $user->getUserId();\n try\n {\n $query =\n \"SELECT request.request_id, item.*, user.*, user_requester.*\n FROM item \n RIGHT JOIN request ON request.request_id = item.item_id\n LEFT JOIN user ON user.user_id = request.user_id\n LEFT JOIN user_requester ON user_requester.user_id = user.user_id\n WHERE item.donor_id = '$user_id' AND item.requester_id \";\n\n if($isConfirmed)\n $query .= \"IS NOT NULL\";\n else\n $query .= \"IS NULL\";\n\n //echo $query;\n\n $db->runQuery($query);\n $requestsList = array();\n\n foreach ($db->results as $row)\n {\n $item = new Item($row[1], $row[2], $row[3], $row[4], $row[5], $row[6], $row[7], $row[8], $row[9]);\n $receiver = new Recipient($row[10],$row[11],$row[12],$row[13],$row[14],$row[15],$row[16],\n $row[17], $row[19], $row[21],$row[22],$row[23],$row[24],$row[25],$row[26]\n );\n $request = new Request($item, $receiver);\n $request->setRequestId($row[0]);\n\n array_push($requestsList, $request);\n }\n return $requestsList;\n }\n catch (DatabaseException $e)\n {\n $e->echoDetails();\n }\n catch (Exception $e)\n {\n echo \"Exception in method \". __METHOD__;\n }\n }",
"public function is_block_visible_for_user($user_id)\n {\n \t$user_info = api_get_user_info($user_id);\n\t\t$user_status = $user_info['status'];\n\t\t$is_block_visible_for_user = false;\n \tif (UserManager::is_admin($user_id) || in_array($user_status, $this->permission)) {\n \t\t$is_block_visible_for_user = true;\n \t}\n \treturn $is_block_visible_for_user;\n }",
"public function getFavoritesPublications($user)\n {\n return $this->getByFavorite($user);\n }",
"public function index(User $user)\n {\n $conversation= auth()->user()->sharedConversation($user);\n $messages=$conversation->messages;\n return compact('conversation','messages');\n }",
"public function findNotReadMessagesByUser($user)\n {\n return $this->getEntityManager()\n ->createQuery(\n 'SELECT m\n FROM WHAAMPrivateApplicationNotificationBundle:Message m\n JOIN m.statuses s\n LEFT JOIN m.answers a\n LEFT JOIN a.statuses ast\n WHERE (s.user = :user AND s.isRead = 0) OR\n (ast.user = :user AND ast.isRead = 0)\n '\n )\n ->setParameter('user', $user)\n ->getResult();\n }",
"public function getVideoPublications($user)\n {\n return $this->getByCategoryType('Video', $user);\n }",
"public function getOwnedListings($userId)\r\n\t{\r\n\t\t$query = 'SELECT m.marketID\r\n\t\t\tFROM marketplace AS m\r\n\t\t\t\tLEFT JOIN marketplacePayments AS mpp ON mpp.marketID = m.marketID\r\n\t\t\tWHERE mpp.startDate <= NOW()\r\n\t\t\t\tAND mpp.endDate >= NOW()\r\n\t\t\t\tAND mpp.paid = 1\r\n\t\t\t\tAND m.mLive = 1\r\n\t\t\t\tAND m.mUserID = '.(int) $userId;\r\n\t\t$this->_db->setQuery($query);\r\n\t\t$listings = $this->_db->loadAssocList('marketID');\r\n\t\tif (!$listings) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t// Add listing details and return\r\n\t\t$this->addDetails($listings);\r\n\t\treturn $listings;\r\n\t}",
"public function filterOwnedBy($user)\n {\n return $this->getData()->filter($this->owner_field, $user);\n }",
"public function get_loggers_that_user_can_read( $user_id = null, $format = 'array' ) {\n\t\t$arr_loggers_user_can_view = array();\n\n\t\tif ( is_null( $user_id ) ) {\n\t\t\t$user_id = get_current_user_id();\n\t\t}\n\n\t\t$loggers = $this->get_instantiated_loggers();\n\n\t\tforeach ( $loggers as $one_logger ) {\n\t\t\t$logger_capability = $one_logger['instance']->get_capability();\n\n\t\t\t$user_can_read_logger = user_can( $user_id, $logger_capability );\n\n\t\t\t/**\n\t\t\t * Filters who can read/view the messages from a single logger.\n\t\t\t *\n\t\t\t * @example Modify who can read a logger.\n\t\t\t *\n\t\t\t * ```php\n\t\t\t * // Modify who can read a logger.\n\t\t\t * // Modify the if part to give users access or no access to a logger.\n\t\t\t * add_filter(\n\t\t\t * 'simple_history/loggers_user_can_read/can_read_single_logger',\n\t\t\t * function ( $user_can_read_logger, $logger_instance, $user_id ) {\n\t\t\t * // in this example user with id 3 gets access to the post logger\n\t\t\t * // while user with id 8 does not get any access to it\n\t\t\t * if ( $logger_instance->get_slug() == 'SimplePostLogger' && $user_id === 3 ) {\n\t\t\t * $user_can_read_logger = true;\n\t\t\t * } elseif ( $logger_instance->get_slug() == 'SimplePostLogger' && $user_id === 9 ) {\n\t\t\t * $user_can_read_logger = false;\n\t\t\t * }\n\t\t\t *\n\t\t\t * return $user_can_read_logger;\n\t\t\t * },\n\t\t\t * 10,\n\t\t\t * 3\n\t\t\t * );\n\t\t\t * ```\n\t\t\t *\n\t\t\t * @param bool $user_can_read_logger Whether the user is allowed to view the logger.\n\t\t\t * @param Simple_Logger $logger Logger instance.\n\t\t\t * @param int $user_id Id of user.\n\t\t\t */\n\t\t\t$user_can_read_logger = apply_filters(\n\t\t\t\t'simple_history/loggers_user_can_read/can_read_single_logger',\n\t\t\t\t$user_can_read_logger,\n\t\t\t\t$one_logger['instance'],\n\t\t\t\t$user_id\n\t\t\t);\n\n\t\t\tif ( $user_can_read_logger ) {\n\t\t\t\t$arr_loggers_user_can_view[] = $one_logger;\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Fires before Simple History does it's init stuff\n\t\t *\n\t\t * @since 2.0\n\t\t *\n\t\t * @param array $arr_loggers_user_can_view Array with loggers that user $user_id can read\n\t\t * @param int $user_id ID of user to check read capability for\n\t\t */\n\t\t$arr_loggers_user_can_view = apply_filters(\n\t\t\t'simple_history/loggers_user_can_read',\n\t\t\t$arr_loggers_user_can_view,\n\t\t\t$user_id\n\t\t);\n\n\t\t// just return array with slugs in parenthesis suitable for sql-where\n\t\tif ( 'sql' == $format ) {\n\t\t\t$str_return = '(';\n\n\t\t\tif ( count( $arr_loggers_user_can_view ) ) {\n\t\t\t\tforeach ( $arr_loggers_user_can_view as $one_logger ) {\n\t\t\t\t\t$str_return .= sprintf( '\"%1$s\", ', esc_sql( $one_logger['instance']->get_slug() ) );\n\t\t\t\t}\n\n\t\t\t\t$str_return = rtrim( $str_return, ' ,' );\n\t\t\t} else {\n\t\t\t\t// user was not allowed to read any loggers, return in (NULL) to return nothing\n\t\t\t\t$str_return .= 'NULL';\n\t\t\t}\n\n\t\t\t$str_return .= ')';\n\n\t\t\treturn $str_return;\n\t\t}\n\n\t\treturn $arr_loggers_user_can_view;\n\t}",
"public function meList( )\n\t{\n\t\t$userId = $this->getCurrentUserId();\n\t\treturn $this->adminListByUser($userId);\n\t}",
"function get_queue_items() {\r\n $args = func_get_args();\r\n $mkt_id ='';\r\n //if one of the arguments is marketing ID, then we need to filter by it\r\n foreach($args as $arg){\r\n if(isset($arg['EMAIL_MARKETING_ID_VALUE'])){\r\n $mkt_id = $arg['EMAIL_MARKETING_ID_VALUE'];\r\n }\r\n }\r\n\r\n\t\t$this->load_relationship('queueitems');\r\n\t\t$query_array = $this->queueitems->getQuery(true);\r\n //add filtering by marketing id, if it exists, and if where key is not empty\r\n if (!empty($mkt_id) && !empty($query_array['where'])){\r\n $query_array['where'] = $query_array['where']. \" AND marketing_id ='$mkt_id' \";\r\n }\r\n\t\t//get select query from email man.\r\n\t\trequire_once('modules/EmailMan/EmailMan.php');\r\n\t\t$man = new EmailMan();\r\n\t\t$listquery= $man->create_list_query('',str_replace(array(\"WHERE\",\"where\"),\"\",$query_array['where']));\t\r\n\t\treturn ($listquery);\r\n\t\t\r\n\t}",
"function get_editable_user_ids($user_id, $exclude_zeros = \\true, $post_type = 'post')\n {\n }",
"function show_current_user_attachments( $query = array() ) {\n\n\t// Checks to see if user role is lower than editor\n\tif( !current_user_can('edit_others_pages') ){\n\n\t\t// Alters media query to only those associated w/ user id\n\t\t$user_id = get_current_user_id();\n if( $user_id ) {\n $query['author'] = $user_id;\n }\n\t}\n return $query;\n}",
"public function findOther($user): array\n {\n return $this->createQueryBuilder('c')\n ->where('c.creator != :user')\n ->andWhere('c.private = false')\n ->setParameter('user', $user )\n ->setMaxResults(4)\n ->getQuery()\n ->getResult();\n }",
"public function get_user_allocated_resources($user_id) {\n $sql = 'SELECT resources.id AS resource_id, internal_key, expires_at, name\n FROM resources\n JOIN resource_types ON (resources.resource_type_id = resource_types.id)\n WHERE resources.user_id = :user_id\n AND expires_at > datetime(\"now\", \"localtime\")\n AND is_allocated = :is_allocated\n ORDER BY name, expires_at';\n\n $data = [\n ':user_id' => $user_id,\n ':is_allocated' => true,\n ];\n\n $query = $this->pdo->prepare($sql);\n $query->execute($data);\n\n $rows = $query->fetchAll();\n return $rows;\n }",
"public function queryAll($userId){\r\n\t\t$sql = 'SELECT * FROM notifications WHERE user_id = ?';\r\n\t\t$sqlQuery = new SqlQuery($sql);\r\n\t\t$sqlQuery->setNumber($userId);\r\n\t\treturn $this->getList($sqlQuery);\r\n\t}",
"public function getOtherPublications($user)\n {\n return $this->getByCategoryType('Other', $user);\n }",
"function get_user_tasks($user, $session_uid, $json=false,$limit=0, $where_attr='', $administrator=false) {\r\n global $conn, $task_attributes;\r\n $out = '{\"content\": []}';\r\n if (isset($conn)) {\r\n //make everything safe to use\r\n $user = make_safe($user);\r\n $session_uid = make_safe($session_uid);\r\n $limit = is_int($limit) ? $limit : 0;\r\n $where_attr = make_safe($where_attr);\r\n $adinistrator = $administrator===true ? true : false;\r\n\r\n //verify user's access before continuing\r\n if (verify_access($user, $session_uid)) {\r\n //get a list of all accessible tasks using get_accessible_tasks function\r\n $accessible_tasks = get_accessible_tasks($user, $administrator, $conn);\r\n\r\n //make where string\r\n $where_string = $where_attr==='' ? '' : \" AND $where_attr\";\r\n //return $where_attr;\r\n\r\n $task_db_results = array();\r\n //for all the available tasks, query them\r\n foreach($accessible_tasks as $task_id) {\r\n //prepare statement\r\n $q = \"SELECT * FROM tasks WHERE id=$task_id $where_string\";\r\n //query statement\r\n if ($qres = $conn->query($q)) {\r\n //add results to $task_db_results\r\n $qres->data_seek(0);\r\n array_push($task_db_results, $qres->fetch_assoc());\r\n //close query\r\n $qres->close();\r\n }\r\n }\r\n //if the limit is specified, shorten the results to the limit length\r\n if ($limit > 1) {\r\n $task_db_results = array_slice($task_db_results, 0, $limit);\r\n }\r\n\r\n if ($json==false) {\r\n return $json;\r\n return $task_db_results;\r\n }\r\n //write the output as json in the $out string\r\n $out = '{\"content\":[ ';\r\n foreach ($task_db_results as $row) {\r\n if (is_array($row)) {\r\n $out = $out.'{';\r\n foreach ($row as $key => $value) {\r\n $out = $out.'\"'.$key.'\":\"'.$value.'\",';\r\n }\r\n $l = strlen($out) - 1;\r\n $out = substr($out, 0, $l);\r\n $out = $out.'},';\r\n } else {\r\n $out = $out.'\"\",';\r\n }\r\n }\r\n $l = strlen($out) - 1;\r\n $out = substr($out, 0, $l);\r\n $out = $out.\"]\";\r\n //write types as types attr\r\n $out = $out.',\"types\": [';\r\n foreach($task_attributes as $ind => $type) {\r\n $out = $out.'\"'.$type.'\",';\r\n }\r\n $l = strlen($out) - 1;\r\n $out = substr($out, 0, $l);\r\n $out = $out.']';\r\n $out = $out.\"}\";\r\n\r\n } else {\r\n return 'hi';\r\n }\r\n }\r\n //return output\r\n return $out;\r\n}",
"public function getAllUserRequests($user_id) {\n $stmt = $this->conn->prepare(\"SELECT r.* , e.name, e.mobile from service_request r inner join employee e on (r.employee_id = e.id) where r.user_id= ? && (r.status = 0 || r.status = 1)\");\n $stmt->bind_param(\"i\", $user_id);\n $stmt->execute();\n $requests = $stmt->get_result();\n $stmt->close();\n return $requests;\n }",
"public function get_feed_by_user(int $user_id): array\n {\n $entries = $this->feedRepository->get_entries_by_user($user_id);\n\n $filled_entries = array();\n\n foreach ($entries as $entry) {\n $filled_entries[] = $this->convert_feed_database_entry_to_feed_entry($entry, $user_id);\n }\n\n return $filled_entries;\n }",
"public function getMemeberships($userIdBpm){\n\n\t\t\t\tlog_message('DEBUG', '#TRAZA | #BPM >> Obtener Bandeja de Entrada userID: ' . userId());\n\n\t\t\t\t$resource = 'API/identity/membership?p=0&c=10&f=user\\_id%3d';\n\n\t\t\t\t$url = BONITA_URL . $resource .$userIdBpm .'&d=role\\_id';\n\n\t\t\t\t$rsp = $this->REST->callAPI('GET', $url, false, $this->loggin(BPM_ADMIN_USER, BPM_ADMIN_PASS));\n\n\t\t\t\tif (!$rsp['status']) {\n\n\t\t\t\t\t\tlog_message('DEBUG', '#TRAZA | #BPM >> ' . ASP_111);\n\t\t\t\t\t\treturn $this->msj(false, ASP_111);\n\t\t\t\t}\n\n\t\t\t\treturn $this->msj(true, 'OK', json_decode($rsp['data'], true));\n\t\t}",
"function ppmess_get_all_communications($logged_user){\n\t\n\tglobal $wpdb;\t \n\t\n\t$show_status = '_' . $logged_user; \n\t\n\t$query = \"SELECT * FROM {$wpdb->prefix}private_messages WHERE (sender_id = $logged_user OR receiver_id = $logged_user)\n\t\t\t\tAND message_parent = 0 AND show_status LIKE '%$show_status%' ORDER BY FIELD(sent_to, $logged_user) DESC\";\n\t\n\t$result = $wpdb->get_results( $query, ARRAY_A );\n\t\n\tif($wpdb->num_rows > 0)\n\t\treturn $result;\n}",
"static function get_query_lists_of_user($id) {\n $lists = array_merge(self::get_word_lists_of_user($id), self::get_list_of_shared_word_lists_with_user($id));\n for ($i = 0; $i < count($lists); $i++) {\n // stores whether the requesting unser is the list creator\n $lists[$i]->allowSharing = ($id == $lists[$i]->creator->id);\n\n // stores whether the requesting user is allowed to edit the list\n $lists[$i]->allowEdit = ($lists[$i]->allowSharing) ? TRUE : $lists[$i]->get_editing_permissions_for_user($id);\n }\n return $lists;\n }",
"public function getModuleList($userId) {\n\t\t$options = array('conditions' => array('user_id' => $userId));\n\t\treturn $this->find('all', $options);\n\t}",
"public function getAccessibleCommunities($userId = null)\n {\n if (! $userId) {\n $role = null;\n } else {\n try {\n $user = $this->get($userId);\n $role = $user->role;\n } catch (RecordNotFoundException $e) {\n $role = null;\n }\n }\n $communitiesTable = TableRegistry::getTableLocator()->get('Communities');\n $query = $communitiesTable->find()\n ->select(['id', 'name', 'slug'])\n ->order(['name' => 'ASC']);\n if ($role == 'admin') {\n return $query->toArray();\n }\n\n return $query\n ->where(['public' => true])\n ->toArray();\n }",
"public function index(User $user)\n {\n return $user->is_moderator\n || $user->subscribed();\n }",
"function getBorrowRequests($user_id)\n\t{\n\t $table = $this->query->getBorrowRequests($user_id);\n\t return $table->result_array();\n\t}",
"function afficherReclamation($user){\r\n\t\t$sql=\"SELECT * From reclamation where user='$user'\";\r\n\t\t$db = config::getConnexion();\r\n\t\ttry{\r\n\t\t$liste=$db->query($sql);\r\n\t\treturn $liste;\r\n\t\t}\r\n catch (Exception $e){\r\n die('Erreur: '.$e->getMessage());\r\n }\t\r\n \t}",
"public static function AnnouncementsForUser($user_id, $limit = null) {\n $result = &get_instance()->db->order_by(\"posted_on\", \"DESC\");\n if($limit !== null) {\n $result->limit($limit);\n }\n $result = $result->get_where(\"Announcements\", array());\n $ret = array();\n foreach($result->result() as $r)\n $ret[] = Announcement_model::LoadWithData($r);\n return $ret; \n }",
"function get($user = null, $min_state = STATE_VISIBLE) {\n if($this->users === false) {\n $project = $this->object;\n $implementation = $this;\n\n $this->users = AngieApplication::cache()->getByObject($project, array('users', $min_state), function() use ($implementation, $project, $min_state) {\n $project_users_table = TABLE_PREFIX . 'project_users';\n $users_table = TABLE_PREFIX . 'users';\n\n $result = array();\n\n $project_users = Users::findBySQL(\"SELECT DISTINCT $users_table.* FROM $users_table, $project_users_table WHERE $project_users_table.user_id = $users_table.id AND $project_users_table.project_id = ? AND $users_table.state >= ? ORDER BY CONCAT($users_table.first_name, $users_table.last_name, $users_table.email)\", $project->getId(), $min_state);\n\n if ($project_users) {\n foreach ($project_users as $project_user) {\n $result[] = $project_user;\n } // foreach\n } // if\n\n // Correct the problem and add project leader\n if(count($result) < 1) {\n $leader = $project->getLeader();\n\n if($leader instanceof User) {\n $leader_permissions = array();\n\n foreach(ProjectRoles::getPermissions() as $k => $v) {\n $leader_permissions[$k] = ProjectRole::PERMISSION_MANAGE;\n } // foreach\n\n $implementation->add($leader, null, $leader_permissions);\n\n $result = array($leader);\n } // if\n } // if\n\n return count($result) ? $result : null;\n });\n } // if\n\n return $this->users;\n }",
"public function findViewLists(User $user)\n {\n return $this->createQueryBuilder()\n ->find()\n ->addOr(\n $this->createQueryBuilder()\n ->expr()\n ->field('createdUserId')\n ->equals($user->getId()),\n $this->createQueryBuilder()\n ->expr()\n ->field('viewUserIds')\n ->equals($user->getId()),\n $this->createQueryBuilder()\n ->expr()\n ->field('editUserIds')\n ->equals($user->getId())\n )\n ->getQuery()\n ->execute();\n }",
"public static function getActivitiesNotReaded($user_id)\n {\n if (! isset($user_id)) {\n return;\n }\n\n $activities = Activity::where('user_id', $user_id)\n ->where('is_read', false)\n ->orderBy('created_at', 'desc')\n ->get();\n\n return $activities;\n }",
"static function getAllFor($user, $role) {\n $reqs = UserLoginReqs::buildFor($user, $role);\n $reqsByAction = array();\n foreach ($reqs as $req) {\n if ($req->isBaa() && $req->dateExpires) {\n $reqsByAction[UserLoginReqs::REQ_BAA][] = $req;\n } else if ($req->isConfirmEmail() && $req->dateExpires) {\n $reqsByAction[UserLoginReqs::REQ_CONFIRM_EMAIL][] = $req;\n } else {\n switch ($req->status) {\n case UserLoginReq::STATUS_NOTIFIED:\n $reqsByAction[UserLoginReqs::REQ_ACTION_NOTIFY][] = $req;\n break;\n case UserLoginReq::STATUS_GOOD:\n if ($req->dateExpires && $req->_daysLeft <= 30)\n $reqsByAction[UserLoginReqs::REQ_ACTION_WARN][] = $req;\n break;\n case UserLoginReq::STATUS_EXPIRED:\n case UserLoginReq::STATUS_PAST_GRACE:\n $reqsByAction[UserLoginReqs::REQ_ACTION_EXPIRE][] = $req;\n break;\n }\n }\n } \n return (empty($reqsByAction)) ? null : $reqsByAction; \n }"
]
| [
"0.6819937",
"0.5871076",
"0.58633876",
"0.5839053",
"0.5688335",
"0.566845",
"0.56257945",
"0.56257945",
"0.557775",
"0.55749166",
"0.55535257",
"0.55429524",
"0.55196077",
"0.55073524",
"0.55054307",
"0.54891276",
"0.54758906",
"0.5470687",
"0.5460929",
"0.5448789",
"0.54349494",
"0.5428",
"0.54264855",
"0.54264855",
"0.5425096",
"0.540112",
"0.53988427",
"0.53644526",
"0.534613",
"0.5341682",
"0.530567",
"0.528847",
"0.5286993",
"0.5280878",
"0.5280367",
"0.5258025",
"0.5255786",
"0.52513593",
"0.52513355",
"0.52459437",
"0.5244423",
"0.5241829",
"0.5238194",
"0.5227727",
"0.52213323",
"0.5212238",
"0.520575",
"0.52051055",
"0.51960576",
"0.51931673",
"0.5190102",
"0.5184817",
"0.51820076",
"0.5177559",
"0.51571023",
"0.5155067",
"0.5150223",
"0.5132125",
"0.51320016",
"0.5121971",
"0.51211286",
"0.51175016",
"0.5111062",
"0.510714",
"0.5101764",
"0.5101083",
"0.50959235",
"0.50931805",
"0.50894624",
"0.5087874",
"0.5067639",
"0.5063558",
"0.5061647",
"0.5061049",
"0.50599754",
"0.5059232",
"0.5057256",
"0.50554407",
"0.5053658",
"0.50532806",
"0.50525147",
"0.50499666",
"0.50483173",
"0.50465995",
"0.5042321",
"0.50402725",
"0.50341177",
"0.5028857",
"0.50260574",
"0.5023608",
"0.50218904",
"0.5020261",
"0.501802",
"0.50158274",
"0.5008987",
"0.50069267",
"0.5006851",
"0.50045407",
"0.5002649",
"0.5001079"
]
| 0.6751271 | 1 |
Approves the specified moderation queue entry. | public function approveModerationQueueEntry($contentId, $message, $title)
{
$message = XenForo_Helper_String::autoLinkBbCode($message);
$dw = XenForo_DataWriter::create('ThemeHouse_SocialGroups_DataWriter_SocialForum',
XenForo_DataWriter::ERROR_SILENT);
$dw->setExistingData($contentId);
$dw->set('group_state', 'visible');
$dw->set('title', $title);
$dw->set('description', $message);
if ($dw->save()) {
XenForo_Model_Log::logModeratorAction('socialForum', $dw->getMergedData(), 'approve');
return true;
} else {
return false;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function approve( $approver )\r\n {\r\n $this->markApproved( );\r\n $this->_systemFields->setApproved( $approver );\r\n }",
"private function approve() {\n\n }",
"function approve(){\n\t\t$points= $this->ref('currently_requested_to_id')->get('points_available');\n\t\tif($points < 3000)\n\t\t\t$this->api->js()->univ()->errorMessage(\"Not suficcient points available, [ $points ]\")->execute();\n\t\t// Send point to the requester and less from your self ... \n\n\t\t$purchaser= $this->add('Model_MemberAll')->addCondition(\"id\",$this['request_from_id'])->tryLoadAny();\n\t\t$purchaser['points_available'] = $purchaser['points_available'] + 3000;\n\t\t$purchaser->save();\n\n\t\t$seller=$this->add('Model_MemberAll')->addCondition(\"id\",$this['currently_requested_to_id'])->tryLoadAny();\n\t\t$seller['points_available'] = $seller['points_available'] - 3000;\n\t\t$seller->save();\n\n\t\tif($this->api->auth->model->id == 1)\n\t\t\t$this['status']='Approved By Admin';\n\t\telse\n\t\t\t$this['status']='Approved';\n\n\t\t$this->save();\n\n\n\t}",
"public function approveItem()\n {\n if ($this->getItem()->getType() == \\Apprecie\\Library\\Items\\ItemTypes::EVENT) {\n if ($this->getStatus() == \\Apprecie\\Library\\Items\\ApprovalState::APPROVED) {\n return true;\n }\n\n $org = Organisation::getActiveUsersOrganisation();\n $event = Event::findFirstBy('itemId', $this->getItemId());\n\n $event->setState(\\Apprecie\\Library\\Items\\ItemState::APPROVED);\n $event->update();\n\n if (!$org->addEventToVault($event)) {\n $this->appendMessageEx($org);\n $this->logActivity('Failed xx addEventToVault() inside approve method', 'messages ' . _ms($org));\n return false;\n } //@todo gh use transaction\n\n $this->setStatus(\\Apprecie\\Library\\Items\\ApprovalState::APPROVED);\n $this->setVerifiedByUserId($this->getDI()->getDefault()->get('auth')->getAuthenticatedUser()->getUserId());\n $this->update();\n } else {\n throw new \\Phalcon\\Exception('approveItem work flow not implemented for non events');\n }\n }",
"public function approve()\n\t{\n\t\tPhpfox::getUserParam('quiz.can_approve_quizzes', true);\n\n\t\t$iQuiz = (int)$this->get('iQuiz');\n\t\t$bApproved = Phpfox::getService('quiz.process')->approveQuiz($iQuiz);\n\n\t\tif ($bApproved == true)\n\t\t{\n\t\t\tif ($this->get('inline'))\n\t\t\t{\n\t\t\t\t$this->alert(Phpfox::getPhrase('quiz.quiz_has_been_approved'), Phpfox::getPhrase('quiz.quiz_approved'), 300, 100, true);\n\t\t\t\t$this->hide('#js_item_bar_approve_image');\n\t\t\t\t$this->hide('.js_moderation_off'); \n\t\t\t\t$this->show('.js_moderation_on');\n\t\t\t}\n\t\t\telse \n\t\t\t{\n\t\t\t\t$this->removeClass('#js_quiz_' . $iQuiz, 'row_moderate');\n\t\t\t\t$this->removeClass('#js_quiz_created_' . $iQuiz, 'row_moderate');\n\t\t\t\t$this->remove('#js_awaiting_moderation_' . $iQuiz);\n\t\t\t\t$this->call('$(\"#js_message_' . $iQuiz . '\").message(\"' . Phpfox::getPhrase('quiz.quiz_approved') . '\", \"valid\").show(\"slow\").fadeOut(5000);');\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->alert(Phpfox::getPhrase('quiz.an_error_kept_the_system_from_approving_the_quiz_please_try_again'));\n\t\t}\n\t\t\n\t\treturn false;\n\t}",
"public function approveCommentMethod()\n { \n $choice = $this->getGet()[\"approve\"];\n $data = [\"approved\" => (int) $choice]; \n $comment_id = (string) $this->getId();\n\n if ($choice === \"1\") {\n $message = \"Le commentaire a bien été approuvé et publié.\";\n } elseif ($choice === \"0\") {\n $message = \"Le commentaire a été refusé et ne sera pas publié.\";\n };\n\n ModelFactory::getModel(\"Comment\")->updateData($comment_id, $data);\n $this->setMessage($message);\n $this->redirect(\"user!admin\");\n }",
"public function markApproved()\n {\n $this->IsSpam = false;\n $this->Moderated = true;\n $this->write();\n $this->extend('afterMarkApproved');\n }",
"function _erpal_crm_activity_queue_view_approve_submit (&$form, &$form_state) {\n\n if (erpal_crm_activity_queue\\ActivityQueueModel::approve($form_state['values']['result'])) {\n drupal_set_message (t('Activity elements has been successfuly approved.'));\n }else{\n drupal_set_message (t('An error occured while trying to approve some activity elements.'));\n }\n \n return;\n}",
"protected function approve_topic()\n\t{\n\t\t$this->load_topic_object();\n\n\t\t$sql = 'UPDATE ' . TITANIA_TOPICS_TABLE . '\n\t\t\tSET topic_approved = 1\n\t\t\tWHERE topic_id = ' . $this->post->topic_id;\n\t\tphpbb::$db->sql_query($sql);\n\n\t\t// Subscriptions\n\t\tif ($this->post->topic->topic_last_post_id == $this->post->post_id)\n\t\t{\n\t\t\t$message_vars = array('U_VIEW' => $this->post->topic->get_url());\n\n\t\t\t$this->send_notifications($this->post->post_type, $this->post->topic->parent_id, 'subscribe_notify_forum_contrib', $message_vars);\n\t\t}\n\t}",
"public function approve()\n {\n // Initialize variables\n $cid = JRequest::getVar('cid', array(), 'post', 'array');\n $task = JRequest::getCmd('task');\n $publish = ($task == 'approve');\n\n if(empty($cid))\n {\n $this->setRedirect($this->_ambit->getRedirectUrl(), JText::_('COM_JOOMGALLERY_COMMAN_MSG_NO_COMMENTS_SELECTED'));\n $this->redirect();\n }\n\n $model = $this->getModel('comments');\n if($count = $model->publish($cid, $publish, 'approve'))\n {\n if($count != 1){\n $msg = JText::sprintf($publish ? 'COM_JOOMGALLERY_COMMAN_MSG_COMMENTS_APPROVED' : 'COM_JOOMGALLERY_COMMAN_MSG_COMMENTS_REJECTED', $count);\n } else {\n $msg = JText::_($publish ? 'COM_JOOMGALLERY_COMMAN_MSG_COMMENT_APPROVED' : 'COM_JOOMGALLERY_COMMAN_MSG_COMMENT_REJECTED');\n }\n $this->setRedirect($this->_ambit->getRedirectUrl(), $msg);\n }\n else\n {\n $msg = JText::_('COM_JOOMGALLERY_COMMON_MSG_ERROR_APPROVING_REJECTING');\n $this->setRedirect($this->_ambit->getRedirectUrl(), $msg, 'error');\n }\n }",
"public function approveAndEarmark() {\n // Check if user has enough money available on card to pay for amount on authorization request.\n // Assumption: it's enough to check if the available balance is no greater than the amount that has been authorized.\n if ($this->card->availableBalance() > $this->authorizationRequest->getAuthorizedAmount()) {\n // Approve request.\n $this->authorizationRequest->approve();\n // Earmark the amount in the authorization request on the card.\n $this->card->earmark($this->authorizationRequest);\n } else {\n throw new Exception(\"User does not have enough money available on their card.\");\n }\n }",
"public function approve($approvingUser = null)\n {\n if ( ! $this->isPending()) {\n $this->addError('status', 'Only pending keys can be approved.');\n return false;\n }\n \n if ($this->requiresApproval()) {\n if ( ! $approvingUser instanceof User) {\n // This should not happen in the normal flow of things... thus\n // the exception.\n throw new \\Exception(\n 'No User provided when trying to approve a Key that '\n . 'requires approval.',\n 1465926569\n );\n } elseif ( ! $approvingUser->canApproveKey($this)) {\n $this->addError('processed_by', sprintf(\n 'That user (%s) is not authorized to approve keys to that API.',\n $approvingUser->getDisplayName()\n ));\n return false;\n }\n \n // At this point, we know the given $approvingUser is authorized\n // to (and needs to) approve this Key.\n $this->processed_by = $approvingUser->user_id;\n }\n $this->status = self::STATUS_APPROVED;\n $this->generateNewValueAndSecret();\n \n if ($this->save()) {\n $this->notifyUserOfApprovedKey();\n $this->log('approved');\n \n // Indicate success.\n return true;\n } else {\n return false;\n }\n }",
"public function approveByUser() {\n $this->status = parent::STATUS_APPROVED_BY_USER;\n $this->admin_id = NULL;\n\n //no reason to keep this (cause we will save to history)\n $this->decline_reason = null;\n $this->comment = null;\n \n return $this->save(false);\n }",
"public function approveInvitation() {\n $this->autoRender = false;\n $communityId = $this->request->data['communityId'];\n $community = $this->Community->findById($communityId);\n if (!empty($community)) {\n $userId = $this->Auth->user('id');\n $this->CommunityMember->approve($communityId, $userId);\n\t\t\t//Community follow data\n\t\t\t$followCommunityData = array(\n\t\t\t\t'type' => FollowingPage::COMMUNITY_TYPE,\n\t\t\t\t'page_id' => $communityId,\n\t\t\t\t'user_id' => $userId,\n\t\t\t\t'notification' => FollowingPage::NOTIFICATION_ON\n\t\t\t);\n\t\t\t$this->FollowingPage->followPage($followCommunityData);\n\t\t\t\n $this->Session->setFlash(__('You are now a member of this community.'), 'success');\n } else {\n $this->Session->setFlash(__($this->invalidMessage), 'error');\n }\n }",
"function author_queue()\r\n{\r\n\t$tpl =& get_tpl();\r\n\t$db = get_db();\r\n\t$session = get_session();\r\n\t//if we're logged in, shove it\r\n\t$editor = $session->get('editor', 'user');\r\n\tif(empty($editor))\r\n\theader('Location: ../index.php');\r\n\t//page assignments\r\n\t$tpl['title'] = 'Author Queue ~*~ Editor';\r\n\t$tpl['nest'] = '../';\r\n\t$tpl['keywords'] = 'fanfiction library list author queue approve editor';\r\n\t$tpl['description'] = 'Fanfiction Library Editor author approval queue';\r\n\t//assign sub \"template\"\r\n\t$files['page'] = 'editorauthorqueue.html';\r\n\t//we do approve or reject first\r\n\tif(isset($_POST['approve']))\r\n\t{\r\n\t\tif(empty($_POST['comment']))\r\n\t\t{\r\n\t\t\t$tpl['error'] = 'No comments were recorded.';\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t//grab stuff\r\n\t\t\t$authors = $db->query('SELECT author_contact AS contact, author_name AS name FROM author WHERE author_id='.$_POST['id'].' LIMIT 1');\r\n\t\t\tif(!$authors)\r\n\t\t\t{\r\n\t\t\t\tprintf('Errormessage: %s', $db->error);\r\n\t\t\t}\r\n\t\t\t$info = $authors->fetch_assoc();\r\n\t\t\t$authors->close();\r\n\t\t\t//set valid\r\n\t\t\t$authors = $db->query('UPDATE author LEFT JOIN user ON user_id=user_id_fk SET author_valid=1, author_date=NOW(), user_level=1 WHERE author_id='.$_POST['id']);\r\n\t\t\tif(!$authors)\r\n\t\t\t{\r\n\t\t\t\tprintf('Errormessage: %s', $db->error);\r\n\t\t\t}\r\n\t\t\t//send mail\r\n\t\t\t$config = get_config();\r\n\t\t\tob_start();\r\n\t\t\tinclude('../../data/tpl/'.$config['theme'].'/email/authapprove.txt');\r\n\t\t\t$message = ob_get_clean();\r\n\t\t\t$headers = 'From: bot@'.$config['domain'].\"\\n\".'X-Sender: admin@'.$config['domain'].\"\\n\"\r\n\t\t\t\t.'X-Mailer: PHP'.\"\\n\".'X-Priority: 3'.\"\\n\".'Return-Path: no-reply@'.$config['domain'].\"\\n\";\r\n\t\t\tmail($info['contact'], 'Author Approved', $message, $headers);\r\n\t\t\tunset($_REQUEST['id']);\r\n\t\t}\r\n\t}\r\n\telseif(isset($_POST['reject']))\r\n\t{\r\n\t\tif(empty($_POST['comment']))\r\n\t\t{\r\n\t\t\t$tpl['error'] = 'No comments were recorded.';\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t//grab stuff\r\n\t\t\t$authors = $db->query('SELECT author_contact AS contact, author_name AS name FROM author WHERE author_id='.$_POST['id'].' LIMIT 1');\r\n\t\t\tif(!$authors)\r\n\t\t\t{\r\n\t\t\t\tprintf('Errormessage: %s', $db->error);\r\n\t\t\t}\r\n\t\t\t$info = $authors->fetch_assoc();\r\n\t\t\t$authors->close();\r\n\t\t\t//remove author\r\n\t\t\t$authors = $db->query('DELETE FROM author WHERE author_id='.$_POST['id'].' LIMIT 1');\r\n\t\t\tif(!$authors)\r\n\t\t\t{\r\n\t\t\t\tprintf('Errormessage: %s', $db->error);\r\n\t\t\t}\r\n\t\t\t//send mail\r\n\t\t\t$config = get_config();\r\n\t\t\tob_start();\r\n\t\t\tinclude('../../data/tpl/'.$config['theme'].'/email/authreject.txt');\r\n\t\t\t$message = ob_get_clean();\r\n\t\t\t$headers = 'From: bot@'.$config['domain'].\"\\n\".'X-Sender: admin@'.$config['domain'].\"\\n\"\r\n\t\t\t\t.'X-Mailer: PHP'.\"\\n\".'X-Priority: 3'.\"\\n\".'Return-Path: no-reply@'.$config['domain'].\"\\n\";\r\n\t\t\tmail($info['contact'], 'Author Rejected', $message, $headers);\r\n\t\t\tunset($_REQUEST['id']);\r\n\t\t}\r\n\t}\r\n\t//if id is set, then we show the author with approve/reject options\r\n\tif(isset($_REQUEST['id']))\r\n\t{\r\n\t\t//grab everything\r\n\t\t$authors = $db->query('SELECT author_id AS id, author_file AS file FROM author WHERE author_id='.$_REQUEST['id'].' LIMIT 1');\r\n\t\tif(!$authors)\r\n\t\t{\r\n\t\t\tprintf('Errormessage: %s', $db->error);\r\n\t\t}\r\n\t\t$tpl['authors'] = $authors->fetch_assoc();\r\n\t\t$authors->close();\r\n\t}\r\n\t//otherwise we show the list\r\n\telse\r\n\t{\r\n\t\t//create abcd list\r\n\t\t$tpl['alphabet'][] = 'NUM';\r\n\t\t$i = 'A';\r\n\t\tfor($n = 0; $n < 26; $n++)\r\n\t\t{\r\n\t\t\t$tpl['alphabet'][] = $i;\r\n\t\t\t$i++;\r\n\t\t}\r\n\t\t$tpl['alphabet'][] = 'ALL';\r\n\t\t//now we set the letter, or it may not be\r\n\t\t$letter = !isset($_GET['l']) ? NULL : (string) $_GET['l'];\r\n\t\t//check it for idiots\r\n\t\tif($letter == 'ALL' or (!is_null($letter) and !in_array($letter, $tpl['alphabet'])))\r\n\t\t$letter = NULL;\r\n\t\t$where = '';\r\n\t\tif(!is_null($letter))\r\n\t\t{\r\n\t\t\t//append the letter\r\n\t\t\t$tpl['title'] .= ': '.$letter;\r\n\t\t\t$tpl['letter'] = $letter;\r\n\t\t\t$where = ' AND author_order=\\''.$letter.'\\' ';\r\n\t\t}\r\n\t\t//current size(limit)\r\n\t\t$size = !isset($_GET['s']) ? 50 : (int) $_GET['s'];\r\n\t\t$tpl['size'] = $size;\r\n\t\t//current page - get offset\r\n\t\t$page = !isset($_GET['p']) ? 1 : (int) $_GET['p'];\r\n\t\t$tpl['page'] = $page;\r\n\t\t//find offset\r\n\t\t$offset = ($page - 1) * $size;\r\n\t\t$tpl['offset'] = $offset + 1;\r\n\t\t//grab announcement count\r\n\t\t$count = $db->query('SELECT COUNT(author_id) FROM author WHERE author_valid=0'.$where);\r\n\t\tif(!$count)\r\n\t\t{\r\n\t\t\tprintf('Errormessage: %s', $db->error);\r\n\t\t}\r\n\t\t$total = $count->fetch_row();\r\n\t\t$tpl['total'] = $total = $total[0];\r\n\t\t$count->close();\r\n\t\t//message for no authors\r\n\t\tif($total < 1)\r\n\t\t$tpl['error'] = 'No Authors Found';\r\n\t\t//do paging\r\n\t\tif($total > $size)\r\n\t\t{\r\n\t\t\t//do we need a previous link?\r\n\t\t\tif($offset > 0)\r\n\t\t\t{\r\n\t\t\t\t$tpl['prev'] = TRUE;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$tpl['prev'] = FALSE;\r\n\t\t\t}\r\n\t\t\t//pages\r\n\t\t\t$page_total = ceil($total/$size);\r\n\t\t\t//do we need a next link?\r\n\t\t\tif($page < $page_total)\r\n\t\t\t{\r\n\t\t\t\t$tpl['next'] = TRUE;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$tpl['next'] = FALSE;\r\n\t\t\t}\r\n\t\t\t$tpl['pages'] = array();\r\n\t\t\t//page array\r\n\t\t\tfor($i = 1; $i <= $page_total; $i++)\r\n\t\t\t{\r\n\t\t\t\t$tpl['pages'][$i] = $i;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//grab list\r\n\t\t$authors = $db->query('SELECT author_id AS id, author_date AS date, author_name AS name, user_id AS uid, user_name AS uname FROM author LEFT JOIN user ON user_id=user_id_fk WHERE author_valid=0'.$where.' ORDER BY author_name DESC, author_id ASC LIMIT '.$offset.', '.$size);\r\n\t\tif(!$authors)\r\n\t\t{\r\n\t\t\tprintf('Errormessage: %s', $db->error);\r\n\t\t}\r\n\t\t$tpl['authors'] =& $authors ;\r\n\t}\r\n\t//create sidebar\r\n\tinclude('../../lib/sidebar.php');\r\n\t//show the \"template\"\r\n\tshow_tpl($tpl, $files);\r\n\treturn;\r\n}",
"public function approve()\n {\n $message = new MailMessage;\n $message->greeting(\"Hi {$this->post->reporting->name}!\");\n $message->line(\"The post {$this->post->titile} has been approved successfully.\"); \n foreach ($this->workflow as $key => $value) {\n if ($key == 0) {\n $message->action($value->action, url('workflows/workflow/' . $value->id));\n continue;\n }\n $message->line('<a href=\"'.url('workflows/workflow/' . $value->id).'\">'.$value->action.'</a>');\n }\n\n return $message;\n }",
"public function approve(UserPolicy $user, Question $question)\n {\n if ($user->canDo('forum.question.approve')) {\n return true;\n }\n\n return false;\n }",
"function approve()\r\n\t{\r\n\t\tJRequest::checkToken() or jexit('Invalid Token');\r\n\t\t\r\n\t\t// Get the selected items\r\n\t\t$cid = JRequest::getVar('cid', array(0), 'post', 'array');\r\n\t\t\r\n\t\t$total = count($cid);\r\n\t\t$msg = JText::sprintf('RSM_TRANSACTIONS_APPROVED', $total);\r\n\t\t\r\n\t\t// Force array elements to be integers\r\n\t\tJArrayHelper::toInteger($cid, array(0));\r\n\t\t\r\n\t\t$msg = '';\r\n\t\t\r\n\t\t// No items are selected\r\n\t\tif (!is_array($cid) || count($cid) < 1)\r\n\t\t\tJError::raiseWarning(500, JText::_('SELECT ITEM'));\r\n\t\telse\r\n\t\t{\r\n\t\t\t$user =& JFactory::getUser();\r\n\t\t\t$user_id = $user->get('username');\r\n\t\t\tforeach ($cid as $id)\r\n\t\t\t{\r\n\t\t\t\tRSMembership::saveTransactionLog('Manually approved by '.$user_id, $id);\r\n\t\t\t\tRSMembership::approve($id);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$total = count($cid);\r\n\t\t\t$msg = JText::sprintf('RSM_TRANSACTIONS_APPROVED', $total);\r\n\t\t\t\r\n\t\t\t// Clean the cache, if any\r\n\t\t\t$cache =& JFactory::getCache('com_rsmembership');\r\n\t\t\t$cache->clean();\r\n\t\t}\r\n\t\t\r\n\t\t$this->setRedirect('index.php?option=com_rsmembership&view=transactions', $msg);\r\n\t}",
"function approvedAction(Request $request) {\n $em = $this->getDoctrine()->getManager();\n $resource = $this->findOr404($request);\n $arrangementProgramManager = $this->getArrangementProgramManager();\n if (!$arrangementProgramManager->isAllowToApprove($resource)) {\n throw $this->createAccessDeniedHttpException();\n }\n\n if ($arrangementProgramManager->isYouCanApprove($resource) === true) {\n $resource->setStatus(ArrangementProgram::STATUS_APPROVED);\n\n $user = $this->getUser();\n $details = $resource->getDetails();\n $details\n ->setApprovedBy($user)\n ->setApprovalDate(new DateTime());\n\n $this->domainManager->dispatchEvent('pre_approved', new ResourceEvent($resource));\n\n $this->domainManager->update($resource);\n $this->flashHelper->setFlash('success', 'approved');\n\n// $this->domainManager->dispatchEvent('post_approved', new ResourceEvent($resource));\n } else {\n $this->flashHelper->setFlash('error', 'planned_not_complete');\n }\n\n return $this->redirectHandler->redirectTo($resource);\n }",
"public function approve_submission(Request $request)\n {\n }",
"public function approve(Req $request, $id)\n\t{\n\n\t\t$bookReq = BookRequest::findOrFail($id);\n\t\t$property = Property::findOrFail($bookReq->property_id);\n\t\tif($property->property_type == 'apartment'){\n\t\t\t\n\t\t}\n\t\t$bookReq->status = 1;\n\t\t$bookReq->save();\n\t\tMail::send('emails.requestAccepted',['email'=>$data['email'],\n\t\t\t\t\t\t\t\t\t 'name'=>$data['name'],\n\t\t\t\t\t\t\t\t\t 'body'=>$data['body']], \n\t\tfunction($message) use($data)\n\t\t{\n\t\t $message->to('[email protected]', $data['name'])->subject($data['name'].' question');\n\t\t});\t\n\n\n\t}",
"public function approveAction() {\n\t\t$request = $this->getRequest();\n\t\t$ta_id = (int)($request->getParam('id'));\n\t\t$lo_id = (int)($request->getParam('loid'));\n\n\t\t$taFinder = new TeachingActivities();\n\t\t$ta = $taFinder->getTa($ta_id);\n\t\tif (($result = UserAcl::checkTaPermission($ta, UserAcl::$APPROVE)) !== true) {\n\t\t\tthrow new Exception($result);\n\t\t}\n\n\t\t$linkFinder = new LinkageLoTas();\n\t\t$link = $linkFinder->getLinkageByLoAndTaId($lo_id, $ta_id);\n\t\tif (!$link->isNewVersionRequest()) {\n\t\t\tthrow new Exception(\"Teaching activity $ta_id does not need approval.\");\n\t\t}\n\n\t\t$link->approveNewTaVersion();\n\t\t\n\t\t$session = new Zend_Session_Namespace('taapprovecomplete');\n\t\t$session->ta_id = $ta_id;\n\t\t$session->lo_id = $lo_id;\n\t\t$this->_redirect('/teachingactivity/approvecomplete');\n\t}",
"public function approve()\n {\n $type = $this->input->get('type');\n $id = $this->input->get('id');\n\n $this->model_review->approve($type, $id);\n\n redirect($_SERVER['HTTP_REFERER']);\n }",
"public function actionApprove(){\n \t// Set no waiting limit\n \tset_time_limit(0);\n \t// REST client is flash app\n \t$this->restFlashClient = true;\n \t\n \tif (!isset($_POST['userJobId']) || !isset($_POST['approved'])){\n \t\t$this->_sendResponse(\"Approval workflow has failed. Missing userJobId or approval status\", 400);\n \t\treturn;\n \t}\n \t\t\n \t$userJobId = $_POST['userJobId'];\n \t$approved = $_POST['approved'] == 'false' ? false : true;\n \t\n \t// Get UserJob object\n \t$userJob = PUserJob::model()->findByPk($userJobId);\n \t\n \t/* \n \t * Send bad request in case the provided $userJobId does not exist.\n \t */\n \tif(!$userJob instanceof PUserJob){\n \t\t$this->_sendResponse(\"The job with id '{$userJobId}' does not exist in database.\", 400);\n \t}\n \t\n \tif($this->taskWorkflowAPI()->setProjectJobId($userJob->projectJob->id)->validate()) {\n \t\t// Start delivery\n \t\t$this->taskWorkflowAPI()->deliver();\n \t\t\n \t\t// Add breakdown report about task delivery\n \t\t$mainAPI = $this->mainAPI();\n \t\t$mainAPI->projectBreakdownByUserJob($mainAPI::PBR_TASK_DELIVERED, $userJob->id);\n \t\t$mainAPI->sferaAPIByProject($userJob->projectJob->project_id);\n \t\t\n \t\t// mark parent job as disapproved\n \t\tif ($approved == false){\n \t\t\t$mainProjectJob = PProjectJob::model()->findByPk($userJob->projectJob->id)->getMainJob();\n \t\t\tYii::app()->projectAPI->markAsDisapproved($mainProjectJob->id);\n \t\t\t\n \t\t\t//TODO send mail\n \t\t}\t\n \t\t\n \t\t// Send successful response\n \t\t$this->_sendResponse('Approval has been done successfully.');\n \t}\n \telse{\n \t\t// Send failure response\n \t\t$this->_sendResponse(\"Approval workflow has failed.\", 400);\n \t}\n }",
"function updateOrder($order,$requester){\n $sql='';\n $sql = 'UPDATE `order` SET waiter_id=\\''.$requester.'\\',';\n $sql.='comments=\\''.$order->comments.'\\',order_time=now() WHERE id='.$order->id;\n if(isset($this->connection)){\n return $this->queryNotAutoClose($sql);\n }else{\n return $this->query($sql);\n }\n //TODO log this action to file for know who edit\n }",
"public function tokenApprove($token)\n {\n $job = Job::where('moderate_token',$token)->firstOrFail();\n\n $job->moderate_token = null;\n $job->status = 'approved';\n\n // Try and save to DB.\n try{\n $job->save();\n // Flash success message\n session()->flash('flash-message', 'Job approved successfully.');\n }catch(\\Exception $e){\n // Flash error message\n session()->flash('flash-message', 'DB error approving job.');\n session()->flasj('flash-level', 'danger');\n }\n\n return redirect('/');\n }",
"public function approveTicket(Request $request)\n\t\t{\n\t\t\tif(isset($_POST['ticket_id']))\n\t\t\t{\t\n\t\t\t\t$ticket_id = $_POST['ticket_id'];\n\t\t\t\t$ins_data['status'] = 'approve';\n\t\t\t\ttickets::where('id',$ticket_id)->update($ins_data);\n\t\t\t}\n\t\t}",
"public function approve(\\App\\Models\\Request $request)\n {\n $id = $request->id;\n $request = DB::table('requests')->where('id', $id);\n $request->update(['status' => 'approved']);\n\n return redirect('/profile/' . auth()->user()->id);\n }",
"public function emailApprovalByUser($user) {\n\t\t$user->getPrimaryElectronicAddress()->setApproved(TRUE);\n\t\t$this->personRepository->update($user);\n\t\t$this->persistenceManager->persistAll();\n\t}",
"public function approve(FinancialTransactionInterface $transaction, $retry);",
"public function approve(Request $request, $id)\n {\n $topic = $this->bound($id);\n\n $topic->offBit(Topic::DELETED);\n $topic->onBit(Topic::APPROVED)->update();\n\n return redirect()->back();\n }",
"public function approveAction()\n {\n /** @var Facepalm_Model_Row_Point $point */\n $this->_helper->assertHasParameter('id');\n\n $pointsModel = new Facepalm_Model_Points();\n $point = $pointsModel->find($this->_getParam('id'))->current();\n\n $this->_helper->assertResourceExists($point);\n\n $this->_helper->assertCanApprove($point, $this->getCurrentUser());\n\n $point->approved = true;\n $point->save();\n\n $this->_helper->sendNotifications(\n $point, $this->getCurrentUser()\n );\n\n $this->_helper->redirector->gotoRouteAndExit(\n array(\n 'action' => 'view',\n 'id' => $point->id,\n )\n );\n\n }",
"function approve_comment($approve_comment_id){\n\t\tif( isset($_POST[$approve_comment_id]) ){\n\t\t\t$comment_id = $_POST[$approve_comment_id];\n\t\t\tarticles_marks::approve_comment_status($comment_id);\n\t\t}\t\n\t}",
"public function approveMultiple(){\n\t\t\tif(isset($_SESSION['admin_email'])){\n\t\t\t$this->model(\"AdminApproveModel\");\n\t\t\tif(isset($_POST['admin_approve_all'])){\n\t\t\t$approve_all = $this->sanitizeString($_POST['admin_approve_all']);\n\t\t\t$id = $this->sanitizeString($_POST['id']);\n\t\t\t$check_all = $this->sanitizeString($_POST['admin_check_all']);\n\t\t\tif(!empty($check_all)){\n\t\t\t\tAdminApproveModel::where('id', $id)->update(['priority'=>'Activated']);\n\t\t\t}\n\t\t}\n\t}\n\t}",
"public function ApproveAuction($id){\n\n\t\t\tif ($this->session->has_userdata(\"user\")){\n\t\t\t\t$user = $this->session->userdata(\"user\");\n\t\t\t\t\n\t\t\t\tif ($user->user_rank < 1){\n\t\t\t\t\tredirect(\"InfoMessage/PageNotFound\");\n\t\t\t\t}\n\t\t\t\telse{\n\n\t\t\t\t\t$auction = $this->Auction->getAuctionById($id);\n\n\t\t\t\t\tif (count($auction) == 1){\n\n\t\t\t\t\t\tif ($auction[0]->auction_state == \"Pending confirmation\"){\n\n\t\t\t\t\t\t\t$start = date(\"Y-m-d H:i:s\");\n\t\t\t\t\t\t\t$end = date(\"Y-m-d H:i:s\", strtotime($start . ' + ' . $auction[0]->duration . ' days'));\t\n\n\t\t\t\t\t\t\t$this->db->set(\"auction_state\", \"Active\");\n\t\t\t\t\t\t\t$this->db->set(\"start_time\", $start);\n\t\t\t\t\t\t\t$this->db->set(\"end_time\", $end);\n\t\t\t\t\t\t\t$this->db->where(\"auction_id\", $id);\n\t\t\t\t\t\t\t$this->db->update(\"auctions\");\n\n\t\t\t\t\t\t\tredirect(\"InfoMessage/AuctionApproveSuccess\");\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tredirect(\"InfoMessage/AuctionApproveFailed\");\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tredirect(\"InfoMessage/AuctionNotFound\");\n\t\t\t\t\t}\n\n\t\t\t\t} \n\t\t\t}\n\t\t\telse{\n\t\t\t\tredirect(\"InfoMessage/PageNotFound\");\n\t\t\t}\n\n\t\t}",
"public function testApprove()\n {\n $json = <<<JSON\n{\n \"order_id\": \"45aa52f387871e3a210645d4\",\n \"fraud_status\": \"REJECTED\"\n}\nJSON;\n\n $this->mock->append(\n new Response(\n 200,\n ['Content-Type' => 'application/json'],\n $json\n )\n );\n\n $order = new Orders($this->connector, 'auth-token-123456');\n $data = $order->approve([\n 'data' => 'sent in'\n ]);\n\n $this->assertEquals('45aa52f387871e3a210645d4', $data['order_id']);\n $this->assertEquals('REJECTED', $data['fraud_status']);\n\n $request = $this->mock->getLastRequest();\n $this->assertEquals(Method::POST, $request->getMethod());\n $this->assertEquals(\n '/instantshopping/v1/authorizations/auth-token-123456/orders',\n $request->getUri()->getPath()\n );\n $this->assertEquals('{\"data\":\"sent in\"}', strval($request->getBody()));\n\n $this->assertAuthorization($request);\n }",
"public function request() { if($this->allowed(USER_WORKER)) {\n switch($this->action) {\n case 'pendingAmount':\n $this->getPending();\n break;\n case 'pendingList':\n $this->getRequests();\n break;\n case 'rejectedList':\n $this->getRequests('rejected');\n break;\n case 'acceptedList':\n $this->getRequests('accepted');\n break;\n case 'reject':\n $this->reject();\n break;\n case 'accept':\n $this->accept();\n break;\n default:\n $this->updateValue();\n break;\n }\n // direct update\n // TODO\n } else if ( ! $this->action ) {\n if($this->institution && testInstitution($this->institution)) {\n $this->appendToQueue();\n } else {\n $this->denied();\n }\n }\n }",
"public function send_approvals() {\n if (isset($_POST['approval'])) {\n $PDO = Record::getConnection();\n\t\t\t $common = new APCommon();\n \t\t\t foreach($_POST['approval'] as $id){\n\t\t\t\t\n\t\t\t\t//Find the record in the temp table and send the confirmation email\n\t\t\t\t$sql = \"SELECT * FROM \". TABLE_PREFIX . \"approved_users_temp WHERE id=:id\";\n $stmt = $PDO->prepare($sql);\n $stmt->execute(array(\"id\" => $id));\n\t\t\t\t$row = $stmt->fetch();\n\t\t\t\t$email = $row[2];\n\t\t\t\t$name = $row[1];\n\t\t\t\t$common->confirmation_email($email, $name);\n\t\t\t\t\n\t\t\t\t//Update the temp table to mark row as processed\n $sql = \"UPDATE \" . TABLE_PREFIX . \"approved_users_temp SET processed=1 WHERE id=:id\";\n $stmt = $PDO->prepare($sql);\n $stmt->execute(array(\"id\" => $id));\n\t\t\t }\n \n \t\t\tFlash::set('success', __('Approvals processed'));\n \t\t} else {\n Flash::set('error', __('Unable to process approvals'));\n }\n\n redirect(get_url('plugin/approved_users/approvals'));\n }",
"public function approve_request($id) {\r\n\t\treturn $this->db->update('orders', [\r\n\t\t\t'_assigned_staff'=>$this->input->post('staff'), \r\n\t\t\t'price'=>$this->input->post('amount'), \r\n\t\t\t'_status' => STATUS_PENDING_PAYMENT], ['_id' => $id]);\r\n\t}",
"function execute()\n {\n global $ar;\n $player = $ar->p->getPlayer($this->caller);\n if ($this->commandAllowed())\n {\n $required_level = $this->getRequiredLevel();\n \n // make sure the caller's access level is either equal to or lower than the required level\n if ($this->access_level <= $required_level)\n {\n if ($this->command == \"/rload\")\n {\n \n }\n elseif ($this->command == \"/save\")\n { \n if ($player)\n {\n // save the collected information\n $ar->r->saveRecords();\n $ar->q->saveQueuers();\n \n $ar->game->cpm($player->screen_name, \"race_data_saved\");\n }\n }\n elseif ($this->command == \"/edit\")\n\t\t\t\t{\n\t\t\t\t\t//\tcode later, maybe...\n // still having doubts whether to code or not\n\t\t\t\t}\n\t\t\t\telseif ($this->command == \"/queue\")\n\t\t\t\t{\n $item = \"\";\n if (contains($this->params, \" \"))\n {\n $ext = explode($this->params, \" \");\n $item = $ext[0];\n }\n else\n $item = $this->params;\n \n // if item is blank, don't continue\n if ($item == \"\")\n return;\n \n $itemsFound = array();\n // making sure item actually exists within the rotation list\n if (count($ar->rotation->items) > 0)\n {\n foreach ($ar->rotation->items as $selItem)\n {\n if (contains($selItem, $item))\n {\n $itemsFound[] = $selItem;\n }\n }\n }\n \n // if no matches were found with that item in rotation\n if (count($itemsFound) == 0)\n {\n if ($player)\n {\n $ar->game->cpm($player->screen_name, \"race_queue_item_notfound\", array($item));\n }\n }\n // if matches were found from the rotation related to the item\n else\n {\n // oh good, only one item found\n if (count($itemsFound) == 1)\n {\n if ($player)\n {\n // if queue allows copies\n if ($ar->queue_copies)\n {\n $queuer = $player->queuer;\n if ($queuer)\n {\n if ($queuer->current > 0)\n {\n // add item to the queue list\n $ar->queue_items[] = $item;\n \n // announcing the addition of the item and the one responsible for it\n $ar->game->cm(\"race_queue_item_added\", array($player->screen_name, $item));\n \n // deplete the number of queues they can perform\n $queuer->current--;\n }\n }\n }\n // if queue doesn't allow for copies\n else\n {\n if (count($ar->queue_items) > 0)\n {\n $itemFound = false;\n foreach ($ar->queue_items as $qItem)\n {\n if ($qItem == $item)\n $itemFound = true;\n }\n \n if (!$itemFound)\n {\n $queuer = $player->queuer;\n if ($queuer)\n {\n if ($queuer->current > 0)\n {\n $ar->queue_items[] = $item;\n \n $ar->game->cm(\"race_queue_item_added\", array($player->screen_name, $item));\n \n $queuer->current--;\n }\n }\n }\n else\n {\n $ar->game->cpm($player->screen_name, \"race_queue_item_nocopies\", array($item));\n }\n }\n else\n {\n $queuer = $player->queuer;\n if ($queuer)\n {\n if ($queuer->current > 0)\n {\n $ar->queue_items[] = $item;\n \n $ar->game->cm(\"race_queue_item_added\", array($player->screen_name, $item));\n \n $queuer->current--;\n }\n }\n }\n }\n }\n }\n // wow, many items were found\n else\n {\n if ($player)\n {\n $ar->game->cpm($player->screen_name, \"race_queue_item_manyfound\", array($item));\n }\n }\n }\n\t\t\t\t}\n }\n }\n // send player a message about the valid commands to use\n else\n {\n if ($player)\n {\n $commands = array_keys($this->commands);\n \n // should have from \\1 to \\4 in lagnuage command string\n $ar->game->cpm($player->screen_name, \"race_valid_commands\", $commands);\n }\n }\n }",
"protected function _setApprovedFlag()\n {\n $user = $this->getUser();\n\n if (!empty($user['id'])) {\n $settings = $this->getSettings();\n if ($settings['enable_listings_approval']) {\n return 0;\n }\n else if ($user['listing_approval']) {\n return 0;\n }\n }\n\n return 1;\n }",
"protected function addApprove(Builder $builder)\n {\n $builder->macro('approve', function (Builder $builder, $id = null) {\n $builder->withAnyStatus();\n return $this->updateModerationStatus($builder, $id, Status::APPROVED);\n });\n }",
"function approveMember($userId) {\r\n $sql = $this->db->prepare(\"UPDATE USER SET type=2 WHERE UserID=:user_id\");\r\n $sql->execute(array('user_id' => $userId));\r\n return true;\r\n }",
"public function approve($id = null, $approve = false) {\n\t\t$this->{$this->modelClass}->Behaviors->detach('Media.Coupler'); // don't require 'file' key\n\t\tif (!$id) {\n\t\t\t$this->cakeError('error404');\n\t\t} else {\n\t\t\tif ($approve) {\n\t\t\t\t$this->{$this->modelClass}->id = $id;\n\t\t\t\tif ($this->{$this->modelClass}->saveField('approved', true)) {\n\t\t\t\t\t$this->Session->setFlash('The upload request has been approved.', 'flash'.DS.'success');\n\t\t\t\t} else {\n\t\t\t\t\t$this->Session->setFlash('Unable to approve upload request. Please try again.', 'flash'.DS.'failure');\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->setAction('delete', $id);\n\t\t\t}\n\t\t}\n\n\t\t$this->redirect(array(\n\t\t\t'action' => 'approval',\n\t\t\t$this->model => $this->modelId\n\t\t));\n\t}",
"public function approve($requests) {\n $sql = \"UPDATE user SET role='1' WHERE user.id=?\";\n $sth = $this->db->prepare($sql);\n foreach ($requests as $teacher_id) {\n $sth-> execute(array($teacher_id));\n if ($sth->rowCount()==1) {\n $this->deleteFromRequest($teacher_id);\n } else {\n //Site refreshes after approve is done, not sure how to pass data\n echo 'fail';\n }\n }\n }",
"public function approveSubmission(Request $request)\n {\n $submission = Usersubmissionstatus::find($request->id);\n\n // Getting employee id for current submission\n $employeeID = $submission->user_id;\n $submission->status_id = config('constant.status.HR_APPROVAL_PENDING');\n $status = $submission->save();\n $reviewComment = ['submission_status_id' => $request->id, 'reviewer_id' => Auth::user()->id, 'status_id' => config('constant.status.HR_APPROVAL_PENDING'), 'comment' => $request->review_comment, 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()];\n if ($status == 1) {\n Submissionreviewcomment::insert($reviewComment);\n\n // Let's notify user and hr about submission approval\n $status = $this->sendMail(config('constant.email_status.L1_APPROVED'), $employeeID);\n return response()->json(['status' => 1, 'message' => 'Sucessfully Approved', 'email_status' => $status], 200);\n }\n else {\n return response()->json(['status' => 0, 'message' => 'There was an error processing your request, please try again'], 200); \n }\n }",
"public function approveBy(Model $user)\n {\n $approvalClass = config('approvals.approval_class');\n\n $approved_at = null;\n if ($user instanceof Approver) {\n if (! $user->approvalNeedsPermission($user)) {\n $approved_at = Carbon::now();\n }\n }\n\n $approval = new $approvalClass([\n 'approvable_id' => $this->getKey(),\n 'approvable_type' => get_class(),\n 'approved_by' => is_null($user) ? null : $user->getKey(),\n 'approved_at' => $approved_at,\n ]);\n\n return $this->approvals()->save($approval);\n }",
"public function approveOfRequest($id, $group_id, Request $request)\n {\n $moderator = Group::find($group_id)['moderator_id'];\n // only the moderator can approve of the membership\n if (auth() -> user() -> id == $moderator)\n {\n $membership = UserGroupRelation::find($id);\n $membership -> status = 'a'; // a - status is approved\n $membership -> save();\n\n return redirect() -> action('GroupController@show', ['id' => $group_id]) -> with('success', __('messages.group_approve') . $membership -> user() -> first()['name']);\n }\n else return redirect() -> action('GroupController@show', ['id' => $group_id]);\n }",
"public function applyPromotion()\n {\n $this->promotion->setOrder($this);\n }",
"public function approve()\n {\n $post = new PostBag();\n $id = $post->fetchInt('id');\n \n $this->db->query(\"UPDATE `film_review` SET `status` = 'show' WHERE `id` = {$id} LIMIT 1\");\n if (!empty($this->db->error)) {\n return false;\n }\n\n $result = $this->db->query(\"SELECT `userId` FROM `film_review` WHERE `id` = {$id} LIMIT 1\");\n if ($row = $result->fetch_assoc()) {\n $this->db->query(\"UPDATE `user` SET `count_review` = `count_review` + 1 WHERE `id` = {$row['userId']} LIMIT 1\");\n }\n \n return true;\n }",
"public function issue(array $data){\n\t\t// validate policy data\n\t\tparent::validate($data);\n\n\t\t// get first premium\n\t\t$data['premium'] = $this->premiumService->getFirstPremium('funeral', $data);\n\n\t\t// complete the policy issue\n\t\tparent::issue($data);\n\t}",
"function acceptRequest($requestID, $adminCode)\n{\n global $conn;\n\n $stmt = $conn->prepare(\"UPDATE request\n SET closed = true, approved = true, admincode = ?, submitiondate = CURRENT_TIMESTAMP \n WHERE requestid = ? AND closed = false\");\n\n try {\n $res = $stmt->execute(array($adminCode, $requestID));\n } catch (Exception $e) {\n return $e->getMessage();\n }\n return \"true\";\n}",
"public function approve(Request $request)\n {\n return $this->investmentRequestService->approve($request);\n }",
"function ihc_do_user_approve($uid=0){\n\tif ($uid){\n\t\t$data = get_userdata($uid);\n\t\tif ($data && isset($data->roles) && isset($data->roles[0]) && $data->roles[0]=='pending_user'){\n\t\t\t$default_role = get_option('default_role');\n\t\t\t$user_id = wp_update_user(array( 'ID' => $uid, 'role' => $default_role));\n\t\t\tif ($user_id==$uid){\n\t\t\t\tihc_send_user_notifications($user_id, 'approve_account');\n\t\t\t\treturn TRUE;\n\t\t\t}\n\t\t}\n\t}\n\treturn FALSE;\n}",
"function _approveDo() {\n\t\tdefined('_JEXEC') or die( 'Invalid Token' );\n\n\t\t// Instanz der Tabelle\n\t\t$row = JTable::getInstance( 'turniere', 'TableCLM' );\n\t\t$row->load( $this->id ); // Daten zu dieser ID laden\n\n\t $clmAccess = clm_core::$access; \n\t\tif (($row->tl != clm_core::$access->getJid() AND $clmAccess->access('BE_tournament_edit_round') !== true) OR $clmAccess->access('BE_tournament_edit_round') === false) {\n\t\t\t$this->app->enqueueMessage( JText::_('TOURNAMENT_NO_ACCESS'),'warning' );\n\t\t\treturn false;\n\t\t}\n\n\t\t$cid = clm_core::$load->request_array_int('cid');\n\t\t\t\t\t\t\t\t\n\t\t$roundID = $cid[0];\n\t\n\t\t// Rundendaten holen\n\t\t$round =JTable::getInstance( 'turnier_runden', 'TableCLM' );\n\t\t$round->load( $roundID ); // Daten zu dieser ID laden\n\n\t\t// Runde existent?\n\t\tif (!$round->id) {\n\t\t\t$this->app->enqueueMessage( CLMText::errorText('ROUND', 'NOTEXISTING'),'warning' );\n\t\t\treturn false;\n\t\t\n\t\t// Runde gehört zu Turnier?\n\t\t} elseif ($round->turnier != $this->id) {\n\t\t\t$this->app->enqueueMessage( CLMText::errorText('ROUND', 'NOACCESS'),'warning' );\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$task\t\t= clm_core::$load->request_string('task');\n//\t\t$approve\t= ($task == 'approve'); // zu vergebender Wert 0/1\n\t\tif ($task == 'approve') $approve = 1; else $approve = 0; // zu vergebender Wert 0/1\n\t\n\t\t// weiterer Check: Ergebnisse vollständig?\n\t\tif ($approve == 1) {\n\t\t\t$tournamentRound = new CLMTournamentRound($this->id, $cid[0]);\n\t\t\tif (!$tournamentRound->checkResultsComplete()) {\n\t\t\t\t$this->app->enqueueMessage( CLMText::errorText('RESULTS', 'INCOMPLETE'),'warning' );\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\n\t\t// jetzt schreiben\n\t\t$round->tl_ok = $approve;\n\t\tif (!$round->store()) {\n\t\t\t$this->app->enqueueMessage( $row->getError(),'error' );\n\t\t\treturn false;\n\t\t}\n\t\t\t\t\t\t\t\t\t \n\t\tif ($approve) {\n\t\t\t$this->app->enqueueMessage( $round->name.\" \".JText::_('CLM_APPROVED') );\n\t\t} else {\n\t\t\t$this->app->enqueueMessage( $round->name.\" \".JText::_('CLM_UNAPPROVED') );\n\t\t}\n\t\n\t\t// Log\n\t\t$clmLog = new CLMLog();\n\t\t$clmLog->aktion = JText::_('ROUND').\" \".$round->name.\" (ID: \".$roundID.\"): \".$task;\n\t\t$clmLog->params = array('tid' => $this->id); // TurnierID wird als LigaID gespeichert\n\t\t$clmLog->write();\n\t\n\t\n\t\treturn true;\n\t\n\t}",
"public function approve(Request $request, Submission $submission)\n {\n $this->validate($request, [\n 'foto_kk_baru' => 'required|mimes:pdf'\n ]);\n\n $submission->attachment->update([\n 'foto_kk_baru' => $request->file('foto_kk_baru')->store('public/kk_new')\n ]);\n\n $submission->update([\n 'status' => Submission::STATUS_COMPLETED,\n 'approved_at' => now()\n ]);\n\n $submission->user->notify(new KKApprovedNotification($submission));\n\n return redirect()->back()->withSuccess('Email yang berisi KK baru telah dikirim ke pengguna');\n }",
"public function do_approve(Request $request, $id){\n\n\n $leave = Leave::find($id);\n\n /* for supervisours */\n if(auth::id() == $leave->supervisor_id){\n\n $leave->supervisor_action = 1;\n $leave->current_position = 1;\n $leave->leave_status = 1;\n $leave->leave_message = \"Approved by Supervisor, Pending HR approval\";\n\n $leave->save();\n\n\n\n $action = WorkflowAction::create([\n\n 'type' => 'leave',\n 'user_id' =>Auth::id(),\n 'post_id' => $id,\n 'status' => 'approved',\n 'comments' => 'Pending HR approval',\n 'position' => 'Supervisor',\n 'sent_to' => 162\n\n ]);\n\n /////////////////////////////////////////////send notification to users\n $toHr1 = User::find(162);\n $toHr2 = User::find(168);\n $torequester = User::find($leave->user_id);\n $toreliever = User::find($leave->reliever_id);\n\n /*auth()->user()->notify(new LeaveNotification($leave));\n $toHr1->notify(new LeaveNotification($leave));\n $toHr2->notify(new LeaveNotification($leave));\n $torequester->notify(new LeaveNotification($leave));*/\n\n\n $message_requester = \"Your \".$leave->no_days.\" day(s) \".$leave->leave_category.\" leave\n application has\n been approved by \".User::find($leave->supervisor_id)->display_name.\".\";\n\n $message_suppervisor = \" You have successfully approved \".User::find($leave->user_id)->display_name.\"\n \".$leave->no_days.\" day(s) \".$leave->leave_category.\" leave\n application, pushed to HR for approval.\";\n\n $message_reliever = \"\".User::find($leave->user_id)->display_name.\" \".$leave->no_days.\" day(s) \".$leave->leave_category.\" leave\n application has\n been approved by \".User::find($leave->supervisor_id)->display_name.\".\";\n\n $message_hr = \" \".User::find($leave->user_id)->display_name.\" needs your approval for\n \".$leave->no_days.\" day(s) \".$leave->leave_category.\" leave application as supervisor (\".User::find($leave->supervisor_id)->display_name.\") has successfully approved this leave application.\";\n\n //send notification to users\n auth()->user()->notify(new LeaveNotification($leave,$message_suppervisor));\n //$toHr1->notify(new LeaveNotification($leave,$message_hr));\n //$toHr2->notify(new LeaveNotification($leave,$message_hr));\n $torequester->notify(new LeaveNotification($leave,$message_requester));\n $toreliever->notify(new LeaveNotification($leave,$message_reliever));\n\n\n /*auth()->user()->notify(new LeaveNotification($post,$message_requester) );\n User::find($request->supervisor)->notify(new LeaveNotification($post,$message_suppervisor) );\n User::find($request->reliever)->notify(new LeaveNotification($post, $message_reliever) );*/\n\n //sending email staff\n $link = route('leave.show', ['id' => $leave->id]);\n $title = \"Your Leave Request\";\n $button_title = \"Click to view\";\n $leave_date = \"\".$leave->start_date.\" to \".$leave->end_date.\"\";\n $this->send_email(\"\".User::find($leave->user_id)->display_name.\"\",\"\".User::find( $leave->user_id)->user_email.\"\",$message_requester,$link,$title,$button_title,\"\".User::find($leave->user_id)->display_name.\"\",$leave->leave_category,$leave->no_days,$leave_date,$leave->leave_year,\"\".User::find($leave->supervisor_id)->display_name.\"\",\"\".User::find($leave->reliever_id)->display_name.\"\");\n //end of send email\n\n\n //sending email reliever\n $link = route('leave.show', ['id' => $leave->id]);\n $title2 = \"Leave Request From \".ucwords(User::find($leave->user_id)->display_name).\"\";\n $button_title = \"Click here to view\";\n $leave_date = \"\".$leave->start_date.\" to \".$leave->end_date.\"\";\n $this->send_email(\"\".User::find($leave->reliever_id)->display_name.\"\",\"\".User::find($leave->reliever_id)->user_email.\"\",$message_reliever,$link,$title2,$button_title,\"\".User::find($leave->user_id)->display_name.\"\",$leave->leave_category,$leave->no_days,$leave_date,$leave->leave_year,\"\".User::find($leave->supervisor_id)->display_name.\"\",\"\".User::find($leave->reliever_id)->display_name.\"\");\n //end of send email\n\n //sending email manager\n $link = route('leave.show', ['id' => $leave->id]);\n $title2 = \"Leave Request From \".ucwords(User::find($leave->user_id)->display_name).\"\";\n $button_title = \"Click here to Approve / Decline\";\n $leave_date = \"\".$leave->start_date.\" to \".$leave->end_date.\"\";\n $this->send_email(\"\".User::find($leave->supervisor_id)->display_name.\"\",\"\".User::find($leave->supervisor_id)->user_email.\"\",$message_suppervisor,$link,$title2,$button_title,\"\".User::find($leave->user_id)->display_name.\"\",$leave->leave_category,$leave->no_days,$leave_date,$leave->leave_year,\"\".User::find($leave->supervisor_id)->display_name.\"\",\"\".User::find($leave->reliever_id)->display_name.\"\");\n //end of send email\n\n\n //sending email HR\n $link = route('leave.show', ['id' => $leave->id]);\n $title2 = \"Leave Request From \".ucwords(User::find($leave->user_id)->display_name).\"\";\n $button_title = \"Click here to Approve / Decline \";\n $leave_date = \"\".$leave->start_date.\" to \".$leave->end_date.\"\";\n $hr_email = \"[email protected]\";\n $this->send_email(\"HR\",$hr_email,$message_hr,$link,$title2,$button_title,\"\".User::find($leave->user_id)->display_name.\"\",$leave->leave_category,$leave->no_days,$leave_date,$leave->leave_year,\"\".User::find($leave->supervisor_id)->display_name.\"\",\"\".User::find($leave->reliever_id)->display_name.\"\");\n //end of send email\n\n\n\n\n\n // fire leavePublished event after post is successfully added to database\n // event(new leavePublished($post));\n\n\n\n\n return response()->json(['result'=>'1','message'=> \"You have successfully approved \".User::find\n ($leave->user_id)->display_name.\" \".$leave->no_days.\" day(s) leave application. \"]);\n\n } elseif((auth::id() == '162') || (auth::id() == '168') || (auth::id() == '182')) {\n\n /*FOR HR APPROVAL*/\n\n\n $leave->hr_action = 1;\n $leave->current_position = 3;\n $leave->leave_status = 3;\n $leave->leave_message = \"Approved by Supervisor and HR\";\n\n $leave->save();\n\n\n\n $action = WorkflowAction::create([\n\n 'type' => 'leave',\n 'user_id' =>Auth::id(),\n 'post_id' => $id,\n 'status' => 'approved',\n 'comments' => 'Approved by HR',\n 'position' => 'HR',\n 'sent_to' => 162\n\n ]);\n\n\n //send notification to users\n $toHr1 = User::find(162);\n $toHr2 = User::find(168);\n $torequester = User::find($leave->user_id);\n $toreliever = User::find($leave->reliever_id);\n $tosupervisor = User::find($leave->supervisor_id);\n\n /*auth()->user()->notify(new LeaveNotification($leave));\n $toHr1->notify(new LeaveNotification($leave));\n $toHr2->notify(new LeaveNotification($leave));\n $torequester->notify(new LeaveNotification($leave));*/\n\n\n $message_requester = \"Your \".$leave->no_days.\" day(s) \".$leave->leave_category.\" leave\n application has\n been approved by \".User::find(auth::id())->display_name.\". (HR)\";\n\n $message_suppervisor = \"\".User::find($leave->user_id)->display_name.\" \".$leave->no_days.\" day(s) \".$leave->leave_category.\" leave\n application has\n been approved by \".User::find(auth::id())->display_name.\" (HR)\";\n\n $message_reliever = \"\".User::find($leave->user_id)->display_name.\" \".$leave->no_days.\" day(s) \".$leave->leave_category.\" leave\n application has\n been approved by \".User::find(auth::id())->display_name.\" (HR)\";\n\n $message_hr = \" \".User::find(auth::id())->display_name.\" successfully approved \".User::find($leave->user_id)->display_name.\"\n \".$leave->no_days.\" day(s) \".$leave->leave_category.\" leave\n application.\";\n\n //send notification to users\n // auth()->user()->notify(new LeaveNotification($leave,$message_suppervisor));\n $toHr1->notify(new LeaveNotification($leave,$message_hr));\n $toHr2->notify(new LeaveNotification($leave,$message_hr));\n $torequester->notify(new LeaveNotification($leave,$message_requester));\n $toreliever->notify(new LeaveNotification($leave,$message_reliever));\n $tosupervisor->notify(new LeaveNotification($leave,$message_suppervisor));\n\n // fire leavePublished event after post is successfully added to database\n // event(new leavePublished($post));\n\n\n //sending email staff\n $link = route('leave.show', ['id' => $leave->id]);\n $title = \"Your Leave Request\";\n $button_title = \"Click to view\";\n $leave_date = \"\".$leave->start_date.\" to \".$leave->end_date.\"\";\n $this->send_email(\"\".User::find($leave->user_id)->display_name.\"\",\"\".User::find( $leave->user_id)->user_email.\"\",$message_requester,$link,$title,$button_title,\"\".User::find($leave->user_id)->display_name.\"\",$leave->leave_category,$leave->no_days,$leave_date,$leave->leave_year,\"\".User::find($leave->supervisor_id)->display_name.\"\",\"\".User::find($leave->reliever_id)->display_name.\"\");\n //end of send email\n\n\n //sending email reliever\n $link = route('leave.show', ['id' => $leave->id]);\n $title2 = \"Leave Request From \".ucwords(User::find($leave->user_id)->display_name).\"\";\n $button_title = \"Click here to view\";\n $leave_date = \"\".$leave->start_date.\" to \".$leave->end_date.\"\";\n $this->send_email(\"\".User::find($leave->reliever_id)->display_name.\"\",\"\".User::find($leave->reliever_id)->user_email.\"\",$message_reliever,$link,$title2,$button_title,\"\".User::find($leave->user_id)->display_name.\"\",$leave->leave_category,$leave->no_days,$leave_date,$leave->leave_year,\"\".User::find($leave->supervisor_id)->display_name.\"\",\"\".User::find($leave->reliever_id)->display_name.\"\");\n //end of send email\n\n //sending email manager\n $link = route('leave.show', ['id' => $leave->id]);\n $title2 = \"Leave Request From \".ucwords(User::find($leave->user_id)->display_name).\"\";\n $button_title = \"Click here to Approve / Decline\";\n $leave_date = \"\".$leave->start_date.\" to \".$leave->end_date.\"\";\n $this->send_email(\"\".User::find($leave->supervisor_id)->display_name.\"\",\"\".User::find($leave->supervisor_id)->user_email.\"\",$message_suppervisor,$link,$title2,$button_title,\"\".User::find($leave->user_id)->display_name.\"\",$leave->leave_category,$leave->no_days,$leave_date,$leave->leave_year,\"\".User::find($leave->supervisor_id)->display_name.\"\",\"\".User::find($leave->reliever_id)->display_name.\"\");\n //end of send email\n\n\n //sending email HR\n $link = route('leave.show', ['id' => $leave->id]);\n $title2 = \"Leave Request From \".ucwords(User::find($leave->user_id)->display_name).\"\";\n $button_title = \"Click here to Approve / Decline \";\n $leave_date = \"\".$leave->start_date.\" to \".$leave->end_date.\"\";\n $hr_email = \"[email protected]\";\n $this->send_email(\"HR\",$hr_email,$message_hr,$link,$title2,$button_title,\"\".User::find($leave->user_id)->display_name.\"\",$leave->leave_category,$leave->no_days,$leave_date,$leave->leave_year,\"\".User::find($leave->supervisor_id)->display_name.\"\",\"\".User::find($leave->reliever_id)->display_name.\"\");\n //end of send email\n\n\n\n\n\n\n\n\n\n return response()->json(['result'=>'1','message'=> \"You have successfully approved \".User::find\n ($leave->user_id)->display_name.\" \".$leave->no_days.\" day(s) leave application.\"]);\n\n\n\n\n }else{\n\n return response()->json(['result'=>'0','message'=> \"You are not authorized\"]);\n\n }\n\n\n\n\n\n }",
"public function SetApproved($comment_id, $approved=1) //SD322\n {\n global $DB;\n\n if(Is_Valid_Number($comment_id, 0, 1,99999999))\n {\n $DB->result_type = MYSQL_ASSOC;\n $comment = $DB->query_first('SELECT commentid, objectid, pluginid FROM {comments}'.\n ' WHERE commentid = %d',\n $comment_id);\n if(!empty($comment['commentid']))\n {\n $DB->query(\"UPDATE {comments} SET approved = %d WHERE commentid = %d\",\n (empty($approved) ? 0 : 1), $comment_id);\n $this->UpdateCommentsCount($comment['pluginid'], $comment['objectid']);\n return true;\n }\n }\n return false;\n\n }",
"public function markUnapproved()\n {\n $this->Moderated = false;\n $this->write();\n $this->extend('afterMarkUnapproved');\n }",
"public function approve(Request $request, $id)\n {\n //\n $postulation = Postulation::find($id);\n $postulation->state = 2;\n $postulation->save();\n\n $user = User::find($postulation->user->id);\n if($postulation->type===1){\n $role = Level::find(4);\n $user->level()->associate($role);\n }elseif ($postulation->type===2) {\n $role = Level::find(5);\n $user->level()->associate($role);\n $enterprise = $user->postulation->where('id', $id)->get()->first()->enterprise;\n $enterprise->state = 1;\n $enterprise->save();\n }\n $user->state = 1;\n $user->save();\n\n $type = Type::find(9);\n $notification = New Notification();\n $notification->user()->associate($user);\n $notification->from_id = 0;\n $notification->type()->associate($type);\n $notification->url = $postulation->uid;\n $notification->from_name = '(RCEE)';\n $notification->save();\n\n return redirect()->route('admin.postulations.index');\n }",
"public function toggleSuggestionApproved($request) {\n\n\t\t// Restrict this functionality appropriately.\n\n\t\t$user = Member::currentUserID();\n\t\tif(Permission::checkMember($user, 'EXTENSIBLE_SEARCH_SUGGESTIONS') && ($status = $this->service->toggleSuggestionApproved($request->postVar('suggestion')))) {\n\n\t\t\t// Display an appropriate CMS notification.\n\n\t\t\t$this->getResponse()->setStatusDescription($status);\n\t\t\treturn $status;\n\t\t}\n\t\telse {\n\t\t\treturn $this->httpError(404);\n\t\t}\n\t}",
"public function approve_swap($data){\n $query = $this->db->query('UPDATE swap_reqs SET swap_status=\"Completed\", `end_time`=CURRENT_TIMESTAMP WHERE swap_UID= \"'.$data['swap_UID'].'\" ');\n //this will make book 1 unavailable\n $query = $this->db->query('UPDATE user_books SET `availability`=0 WHERE `UID`=\"'.$data['b1_UID'].'\" ');\n //this will make book 2 unavailable\n $query = $this->db->query('UPDATE user_books SET `availability`=0 WHERE `UID`=\"'.$data['b2_UID'].'\" ');\n }",
"function __approve_purchase($id) {\n\t\treturn $this -> db -> query('update purchase_order_tab set pstatus=3 where pid=' . $id);\n\t}",
"public function update(MenuItemOrdener $ordener)\n {\n $ordener->order(request()->json()->all());\n }",
"public function testApproveSuccessForAdmin() {\n\t\t$userInfo = [\n\t\t\t'role' => USER_ROLE_USER | USER_ROLE_ADMIN,\n\t\t\t'prefix' => 'admin'\n\t\t];\n\t\t$opt = [\n\t\t\t'method' => 'POST',\n\t\t];\n\t\t$this->applyUserInfo($userInfo);\n\t\t$this->generateMockedController();\n\t\t$url = '/admin/deferred/approve/2';\n\t\t$this->testAction($url, $opt);\n\t\t$this->checkFlashMessage(__('The deferred save has been %s.', __('approved')));\n\t\t$result = $this->Controller->Deferred->find('list', ['recursive' => -1]);\n\t\t$expected = [\n\t\t\t1 => '1',\n\t\t\t3 => '3',\n\t\t\t4 => '4',\n\t\t\t5 => '5',\n\t\t];\n\t\t$this->assertData($expected, $result);\n\t}",
"public function approve(User $user, Setting $setting)\n {\n if ($user->canDo('settings.setting.approve') && $user->is('admin')) {\n return true;\n }\n\n return false;\n }",
"public function managerApproved( $id, $manager );",
"public function approve($table,$id,$pageId=''){\n\t\t DB::table($table)\n ->where('id',$id)\n ->update(array(\n\t\t\t 'approve' =>'1',\n\t\t\t 'updated_at' =>time()\t\n\t\t\t));\n\t return Redirect::back()->with('message', 'Approval Information Updated !!');\n\t}",
"protected function forum_queue_edit()\n\t{\n\t\tif (!$this->phpbb_post_id)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t$forum_id = self::get_queue_forum_id($this->topic->topic_category, $this->post_type);\n\n\t\tif (!$forum_id)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\ttitania::_include('functions_posting', 'phpbb_posting');\n\n\t\t$path_helper = phpbb::$container->get('path_helper');\n\t\t$post_text = $this->post_text;\n\n\t\thandle_queue_attachments($this, $post_text);\n\t\tmessage::decode($post_text, $this->post_text_uid);\n\n\t\t$post_text .= \"\\n\\n\" . $path_helper->strip_url_params($this->get_url(), 'sid');\n\n\t\t$options = array(\n\t\t\t'post_id'\t\t\t\t=> $this->phpbb_post_id,\n\t\t\t'topic_title'\t\t\t=> $this->post_subject,\n\t\t\t'post_text'\t\t\t\t=> $post_text,\n\t\t);\n\n\t\tphpbb_posting('edit', $options);\n\t}",
"public function approve(Channel $channel)\n {\n try {\n $channel->status = 'approve';\n return $channel->save();\n } catch (Exception $e) {\n throw new WorkflowActionNotPerformedException();\n }\n }",
"public function update(Request $request, Answere $answere)\n {\n //\n }",
"protected function markApproved( )\r\n {\r\n $this->_sessie->registerApproved( $this );\r\n }",
"public function approve_xtra_req($comment, $status, $days, $req_id, $user_id1){\r\n\t\r\n\t$date = date('Y/m/d');\r\n\t$usr_id = ($user_id1 != NULL)?\"'\".$this->hrm_mysql_connect->real_escape_string($user_id1).\"'\":'NULL';\r\n\t$comm = ($comment != NULL)?\"'\".$this->hrm_mysql_connect->real_escape_string($comment).\"'\":'NULL';\r\n\t$stat = ($status != NULL)?\"'\".$this->hrm_mysql_connect->real_escape_string($status).\"'\":'NULL';\r\n\t$days_num = ($days != NULL)?\"'\".$this->hrm_mysql_connect->real_escape_string($days).\"'\":'NULL';\r\n\t$id = ($req_id != NULL)?\"'\".$this->hrm_mysql_connect->real_escape_string($req_id).\"'\":'NULL';\r\n\t$dates = ($date != NULL)?\"'\".$this->hrm_mysql_connect->real_escape_string($date).\"'\":'NULL';\r\n\tif($status==3){\r\n\t$sql = $this->hrm_mysql_connect->query(\"UPDATE xtra_days_requests SET comment=$comm, status=$stat, date_reviewed=$dates WHERE id=$id\");\r\n\t$sql2 = $this->hrm_mysql_connect->query(\"UPDATE leave_instance_2018 SET compensatory_leave=compensatory_leave+$days_num WHERE user_id=$usr_id\");\r\n\t}else{\r\n\t\t$sql = $this->hrm_mysql_connect->query(\"UPDATE xtra_days_requests SET comment=$comm, status=$stat, date_reviewed=$dates WHERE id=$id\");\r\n\t\t}\r\n\tif($sql){\r\n\t\t\t\t$data = '<div class=\"alert alert-success\"><a class=\"close\" data-dismiss=\"alert\">×</a>'.'Request succesfully Accepted'.'</div>';\r\n\t\t\t\t} else{\r\n\t\t\t\t\t$data = mysql_error().'<div class=\"alert alert-danger\"><a class=\"close\" data-dismiss=\"alert\">×</a>'.'Request not processed, contact I.T for support'.'</div>';\r\n\t\t\t\t\t}\r\n\t\t\treturn $data;\r\n\t}",
"public function approveEvent($id_event){\n\t\t$ch = curl_init();\n\t\tcurl_setopt($ch, CURLOPT_URL, \"http://\" . IP . \"/bde_site/api/event/id_event/\" . $id_event);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\t\tcurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"PUT\");\n\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json', 'Authorization: ' . TOKEN));\n\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(array(\"is_approved\"=>\"1\")));\n\t\t$output = curl_exec($ch);\n\t\t$info = curl_getinfo($ch);\n\t\tcurl_close($ch);\n\t}",
"public function actionApprove($id)\n {\n // $this->findModel($id)->delete();\n $model = $this->findModel($id);\n $model->approved = 'approved';\n $model->status = 1;\n if ( $model->save() ) {\n Yii::$app->getSession()->setFlash('success', 'Quotation Approved');\n } else {\n Yii::$app->getSession()->setFlash('danger', 'Unable to approve the Quotation');\n }\n\n return $this->redirect(['index']);\n }",
"function update_promoter_guest_list_set_auto_approve(){\n\t\t\n\t\tif(!$pgla_id = $this->CI->input->post('pgla_id')){\n\t\t\treturn array('success' => false,\n\t\t\t\t\t\t\t'message' => 'pgla_id not set');\n\t\t}\n\t\t\n\t\tif(!$auto_approve = $this->CI->input->post('auto_approve')){\n\t\t\treturn array('success' => false,\n\t\t\t\t\t\t\t'message' => 'auto_approve not set');\n\t\t}\n\t\t\n\t\t$this->CI->load->model('model_users_promoters', 'users_promoters', true);\n\t\treturn $this->CI->users_promoters->update_promoter_guest_list_set_auto_approve($pgla_id, $auto_approve, $this->promoter->up_id);\n\t}",
"public function approve_advertiser(Request $request)\n {\n\n }",
"public function approveItem(Request $request)\n {\n $user = auth()->user();\n $returnResult = [];\n $success = false;\n $quoteItem = \\App\\QuoteItem::find($request->id);\n $quoteUser = \\App\\Quote::find($quoteItem->quote_id)->users;\n if ($user->organization_id == $quoteUser->organization_id) {\n if ($request->invoice === \"true\") {\n $quoteItem->invoice = 1;\n } else {\n $quoteItem->invoice = 0;\n }\n if ($quoteItem->save()) {\n $success = true;\n $returnResult['message'] = 'Success';\n } else {\n $returnResult['message'] = 'An internal server erros has ocurred, please contact your administrator';\n }\n } else {\n $returnResult['message'] = 'You have no permissions on this record';\n }\n return response()->json(array('success' => $success, 'data'=>$returnResult));\n }",
"public function approve()\n {\n // Make sure that all necessary payment plugins are loaded at this point.\n $this->getDi()->plugins_payment->loadEnabled();\n if ($this->isConfirmed())\n return true;\n $old_status = $this->is_confirmed;\n $this->is_confirmed = self::IS_CONFIRMED_CONFIRMED;\n\n $this->updateSelectedFields('is_confirmed');\n $saved = array();\n foreach ($this->data()->getAll() as $k => $v) {\n if (strpos($k, self::SAVED_TRANSACTION_KEY) !== false) {\n list(, $time, $payment_id) = explode('-', $k);\n $saved[$time] = array($payment_id, $v);\n }\n }\n ksort($saved);\n foreach ($saved as $time => $v) {\n $this->addAccessPeriod($v[1], $v[0] ? $v[0] : null);\n $this->data()->set(self::SAVED_TRANSACTION_KEY . '-' . $time . '-' . $v[0], null)->update();\n }\n if ($old_status == self::IS_CONFIRMED_NOT_CONFIRMED)\n {\n $this->sendApprovedEmail();\n $this->getDi()->hook->call(Am_Event::INVOICE_AFTER_APPROVE, array('invoice' => $this));\n }\n return true;\n }",
"public static function approveMembership($personId, $groupId) {\n return DB::table('group_member')\n ->where('person_id', $personId)\n ->where('group_id', $groupId)\n ->update(array(\n 'approved' => 1\n ));\n \n }",
"public function testUpdatePolicy()\n {\n // p, bob, data2, write\n // p, data2_admin, data2, read\n // p, data2_admin, data2, write\n //\n // g, alice, data2_admin\n\n $e = new Enforcer($this->modelAndPolicyPath . '/rbac_model.conf', $this->modelAndPolicyPath . '/rbac_policy.csv');\n\n $this->assertTrue($e->hasPolicy('alice', 'data1', 'read'));\n $this->assertFalse($e->hasPolicy('alice', 'data1', 'write'));\n\n $e->updatePolicy(['alice', 'data1', 'read'], ['alice', 'data1', 'write']);\n\n $this->assertFalse($e->hasPolicy('alice', 'data1', 'read'));\n $this->assertTrue($e->hasPolicy('alice', 'data1', 'write'));\n }",
"public function approve(EventApproveAttendancePost $request, $id)\n {\n $eventParticipant = EventParticipant::findOrFail($id);\n\n\n /*\n | @Begin Transaction\n |---------------------------------------------*/\n \\DB::beginTransaction();\n\n\n /* Approve the event participant */\n if($eventParticipant->approve()) {\n\n $event = $eventParticipant->event;\n $user = $eventParticipant->participant;\n\n\n /* Check participant limit */\n if($event->addAttending()) {\n \n\n /* Notify the participant & admin */\n $user->notify(new EventParticipantWasAdded($event, $user, true));\n $user->supervisor->notify(new EventParticipantWasAdded($event, $user, false)); \n\n } else {\n \n /* Notify for user */\n $user->notify(new EventParticipantWasInQueue($event, $user, true));\n $user->supervisor->notify(new EventParticipantWasInQueue($event, $user, false));\n }\n\n\n /*\n | @End Transaction\n |---------------------------------------------*/\n \\DB::commit();\n\n\n return response()->json([\n 'response' => 1,\n 'status' => $eventParticipant->status,\n 'message' => $eventParticipant->renderStatus(),\n ]);\n } \n\n\n return response()->json([\n 'response' => 0,\n 'message' => 'There seems to be a problem approving the request'\n ]);\n }",
"public function edit_postAction() {\n\t\t$info = $this->getPost(array('status','id','award'));\n\t\t$ret = Gc_Service_OrderShow::updateOrderShow($info, intval($info['id']));\n\t\tif (!$ret) $this->output(-1, '操作失败');\n\t\t$this->output(0, '操作成功.');\n\t}",
"public function approve(Request $request, User $user): RedirectResponse\n {\n $joinable = $user->joinable;\n\n Gate::forUser($request->user())->authorize('update', $joinable);\n\n $user->forceFill([\n 'joinable_type' => null,\n 'joinable_id' => null,\n ])->save();\n\n $joinable->users()->attach($user);\n\n flash(__('You have approved :name’s request to join :team and they are now a member.', ['name' => $user->name, 'team' => $joinable->name]), 'success');\n\n return redirect(\\localized_route($joinable->getRoutePrefix().'.edit', $joinable));\n }",
"private function performQueueOperations()\n\t{\n\t\t//$this->queue_manager = high_risk\n\t\t$application_id = $this->application->getModel()->application_id;\n\t\t$qi = $this->queue_manager->getQueue(\"high_risk\")->getNewQueueItem($application_id);\n\t\t$this->queue_manager->moveToQueue($qi, \"high_risk\");\t\t\n\t}",
"public function change_seller_request(){\r\n\t\tif ($this->checkLogin('A') == ''){\r\n\t\t\tredirect('admin');\r\n\t\t}else {\r\n\t\t\t$mode = $this->uri->segment(4,0);\r\n\t\t\t$user_id = $this->uri->segment(5,0);\r\n\t\t\t$status = ($mode == '0')?'Rejected':'Approved';\r\n\t\t\t$newdata = array('status' => $status);\r\n\t\t\t\r\n\t\t\t$condition = array('id' => $user_id);\r\n\t\t\t$this->seller_model->update_details(STORE_CLAIMS,$newdata,$condition);\r\n\t\t\t$this->setErrorMessage('success','Claim Request '.$status.' Successfully');\r\n\t\t\tredirect('admin/seller/display_seller_requests');\r\n\t\t}\r\n\t}",
"public function approve($gdpr_info) {\n $this->load->model('localisation/language');\n\n $language_info = $this->model_localisation_language->getLanguage($gdpr_info['language_id']);\n\n if ($language_info) {\n $language_code = $language_info['code'];\n } else {\n $language_code = $this->config->get('config_language');\n }\n\n $language = new Language($language_code);\n $language->load($language_code);\n $language->load('mail/gdpr_approve');\n\n if ($this->config->get('config_logo')) {\n $data['logo'] = html_entity_decode($this->config->get('config_logo'), ENT_QUOTES, 'UTF-8');\n } else {\n $data['logo'] = '';\n }\n\n $data['text_request'] = $language->get('text_request');\n\n $this->load->model('customer/customer');\n\n $customer_info = $this->model_customer_customer->getCustomerByEmail($gdpr_info['email']);\n\n if ($customer_info) {\n $data['text_hello'] = sprintf($language->get('text_hello'), html_entity_decode($customer_info['firstname'], ENT_QUOTES, 'UTF-8'));\n } else {\n $data['text_hello'] = sprintf($language->get('text_hello'), $language->get('text_user'));\n }\n\n $data['text_gdpr'] = sprintf($language->get('text_gdpr'), $this->config->get('config_gdpr_limit'));\n $data['text_q'] = $language->get('text_q');\n $data['text_a'] = sprintf($language->get('text_a'), $this->config->get('config_gdpr_limit'));\n $data['text_delete'] = $language->get('text_delete');\n $data['text_thanks'] = $language->get('text_thanks');\n\n $this->load->model('setting/store');\n\n $store_info = $this->model_setting_store->getStore($gdpr_info['store_id']);\n\n if ($store_info) {\n $data['store_name'] = html_entity_decode($store_info['name'], ENT_QUOTES, 'UTF-8');\n $data['store_url'] = $store_info['url'];\n } else {\n $data['store_name'] = html_entity_decode($this->config->get('config_name'), ENT_QUOTES, 'UTF-8');\n $data['store_url'] = HTTPS_CATALOG;\n }\n\n $mail = new Mail($this->config->get('config_mail_engine'));\n $mail->parameter = $this->config->get('config_mail_parameter');\n $mail->smtp_hostname = $this->config->get('config_mail_smtp_hostname');\n $mail->smtp_username = $this->config->get('config_mail_smtp_username');\n $mail->smtp_password = html_entity_decode($this->config->get('config_mail_smtp_password'), ENT_QUOTES, 'UTF-8');\n $mail->smtp_port = $this->config->get('config_mail_smtp_port');\n $mail->smtp_timeout = $this->config->get('config_mail_smtp_timeout');\n\n $mail->setTo($gdpr_info['email']);\n $mail->setFrom($this->config->get('config_email'));\n $mail->setSender(html_entity_decode($this->config->get('config_name'), ENT_QUOTES, 'UTF-8'));\n $mail->setSubject(html_entity_decode(sprintf($language->get('text_subject'), $this->config->get('config_name')), ENT_QUOTES, 'UTF-8'));\n $mail->setHtml($this->load->view('mail/gdpr_approve', $data));\n $mail->send();\n }",
"public function forceApproval(RegistrationPostApprovedEvent $event): void\n {\n }",
"public function updateOrder() {\n\n echo \"ok\";\n }",
"function learndash_essay_bulk_actions_approve() {\n\tif ( ( ( isset( $_REQUEST['post'] ) ) && ( ! empty( $_REQUEST['post'] ) ) && (is_array( $_REQUEST['post'] ) ) ) && ( ( isset( $_REQUEST['post_type'] ) ) && ( $_REQUEST['post_type'] == 'sfwd-essays' ) ) ) {\n\t\t\n\t\t$action = '';\n \t\tif ( isset( $_REQUEST['action'] ) && -1 != $_REQUEST['action'] )\n \t\t\t$action = esc_attr( $_REQUEST['action'] );\n\n \t\telse if ( isset( $_REQUEST['action2'] ) && -1 != $_REQUEST['action2'] )\n \t\t\t$action = esc_attr( $_REQUEST['action2'] );\n\t\n\t\telse if ( ( isset( $_REQUEST['ld_action'] ) ) && ( $_REQUEST['ld_action'] == 'approve_essay') ) \n \t\t\t$action = 'approve_essay';\n\t\n\t\tif ( $action == 'approve_essay' ) {\n\n\t\t\tif ( ( isset( $_REQUEST['post'] ) ) && ( !empty( $_REQUEST['post'] ) ) ) {\n\n\t\t\t\tif ( !is_array( $_REQUEST['post'] ) ) \n\t\t\t\t\t$essays = array($_REQUEST['post']);\n\t\t\t\telse\n\t\t\t\t\t$essays = $_REQUEST['post'];\n\n\t\t\t\tforeach( $essays as $essay_id ) {\n\t\t\t\t\t\n\t\t\t\t\tif ( ( !isset( $_REQUEST['essay_points'][$essay_id] ) ) || ( $_REQUEST['essay_points'][$essay_id] == '' ) ) \n\t\t\t\t\t\tcontinue;\n\n\t\t\t\t\t// get the new assigned points. \n\t\t\t\t\t$submitted_essay['points_awarded'] = intval( $_REQUEST['essay_points'][$essay_id] );\n\n\t\t\t\t\t$essay_post = get_post( $essay_id );\n\t\t\t\t\tif ( ( !empty( $essay_post ) ) && ( $essay_post instanceof WP_Post ) && ( $essay_post->post_type == 'sfwd-essays' ) ) {\n\t\t\t\t\t\n\t\t\t\t\t\tif ( $essay_post->post_status != 'graded' )\n\t\t\t\t\t\t\t$quiz_score_difference = 1;\n\t\t\t\t\t\n\t\t\t\t\t\t// First we update the essat post with the new post_status\t\n\t\t\t\t\t\t$essay_post->post_status = 'graded';\n\t\t\t\t\t\twp_update_post( $essay_post );\n\t\t\t\t\t\t\n\t\t\t\t\t\t$user_id \t\t= $essay_post->post_author;\n\t\t\t\t\t\t$quiz_id \t\t= get_post_meta( $essay_post->ID, 'quiz_id', true );\n\t\t\t\t\t\t$question_id \t= get_post_meta( $essay_post->ID, 'question_id', true );\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Stole the following section ot code from learndash_save_essay_status_metabox_data();\n\t\t\t\t\t\t$submitted_essay_data = learndash_get_submitted_essay_data( $quiz_id, $question_id, $essay_post );\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ( isset( $submitted_essay_data['points_awarded'] ) )\n\t\t\t\t\t\t\t$original_points_awarded = intval( $submitted_essay_data['points_awarded'] );\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$original_points_awarded = 0;\n\t\t\t\t\t\t\n\t\t\t\t\t\t$submitted_essay_data['status'] = 'graded';\n\t\t\t\t\t\t\n\t\t\t\t\t\t// get the new assigned points. \n\t\t\t\t\t\t$submitted_essay_data['points_awarded'] = intval( $_REQUEST['essay_points'][$essay_id] );\n\t\t\t\t\t\t\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Filter essay status data\n\t\t\t\t\t \t*/\n\t\t\t\t\t\t$submitted_essay_data = apply_filters( 'learndash_essay_status_data', $submitted_essay_data );\n\t\t\t\t\t\tlearndash_update_submitted_essay_data( $quiz_id, $question_id, $essay_post, $submitted_essay_data );\n\n\t\t\t\t\t\tif ( ! is_null( $original_points_awarded ) && ! is_null( $submitted_essay_data['points_awarded'] ) ) {\n\t\t\t\t\t\t\tif ( $submitted_essay_data['points_awarded'] > $original_points_awarded ) {\n\t\t\t\t\t\t\t\t$points_awarded_difference = intval( $submitted_essay_data['points_awarded'] ) - intval( $original_points_awarded );\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$points_awarded_difference = ( intval( $original_points_awarded ) - intval( $submitted_essay_data['points_awarded'] ) ) * -1;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$updated_scoring_data = array(\n\t\t\t\t\t\t\t\t'updated_question_score' => $submitted_essay_data['points_awarded'],\n\t\t\t\t\t\t\t\t'points_awarded_difference' => $points_awarded_difference,\n\t\t\t\t\t\t\t\t'score_difference' => $quiz_score_difference\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 * Filter updated scoring data\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\t$updated_scoring = apply_filters( 'learndash_updated_essay_scoring', $updated_scoring_data );\n\t\t\t\t\t\t\tlearndash_update_quiz_data( $quiz_id, $question_id, $updated_scoring_data, $essay_post );\n\n\t\t\t\t\t\t\t/**\n\t\t\t\t\t\t\t * Perform action after all the quiz data is updated\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\tdo_action( 'learndash_essay_all_quiz_data_updated', $quiz_id, $question_id, $updated_scoring_data, $essay_post );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\t\t\n}",
"function app_approved_hook($staffer_id, $first_name, $last_name, $fandom_name, $approver, $assigned_position) {\r\n\tglobal $slack_notification_domain, $slack_staff_hook_url;\r\n\t$url = $slack_staff_hook_url;\r\n\t$payload = '{\"text\": \"Application for <https://'.$slack_notification_domain.'/admin/review_staffer.php?id='.$staffer_id.'|'.$first_name.' '.$last_name.' ('.$fandom_name.')> ACCEPTED for '.$assigned_position.' by '.$approver.'\"}';\r\n\ttrigger_hook($url, $payload);\r\n}",
"public function triggerUpdate() \n {\n $log = FezLog::get();\n $db = DB_API::get();\n \n if (!$this->_use_locking) {\n $log->debug(\"not using locking - starting background process directly\");\n $this->process();\n return;\n }\n \n /**\n * CHECK PROCESS MUTEX\n * 1. Check lock state\n * 2. If locked, check if process is running\n * 3. If process if running: commit/end transaction\n * 4. If process is not running: clean lock\n * 5. Acquire lock\n * 6. Run process\n */\n // Start a transaction explicitly.\n $db->beginTransaction();\n\n $sql = \"SELECT \".$this->_dblp.\"value, \".$this->_dblp.\"pid FROM \".$this->_dbtp.\"locks \".\n \"WHERE \".$this->_dblp.\"name=?\";\n \n try {\n $res = $db->fetchRow($sql, $this->_lock, Zend_Db::FETCH_ASSOC);\n \n $pid = $res[$this->_dblp.'pid'];\n $lock_value = $res[$this->_dblp.'value'];\n $acquire_lock = true;\n $log->debug(\n \"Queue::triggerUpdate got lockValue=\".$lock_value.\", pid=\".$pid.\n \" with \".$sql.\" and \".print_r($res, true)\n );\n\n if ($lock_value > 0 && !empty($pid) && is_numeric($pid)) { \n // check if process is still running or if this is an invalid lock\n $psinfo = $this->getProcessInfo($pid);\n $log->debug(array(\"psinfo\",$psinfo));\n\n if (!empty($psinfo)) {\n // override existing lock\n $acquire_lock = false;\n $log->debug(\"overriding existing lock \".$psinfo);\n }\n }\n \n // worst case: a background process is started, but the queue already\n // empty at this point (very fast indexer)\n if ($acquire_lock) {\n // acquired lock \n $sql = \"DELETE FROM \".$this->_dbtp.\"locks WHERE \".$this->_dblp.\"name=?\";\n $db->query($sql, $this->_lock);\n \n $invalid_pid = -2;\n $sql = \"INSERT INTO \".$this->_dbtp.\"locks (\".$this->_dblp.\"name,\".$this->_dblp.\"value,\".$this->_dblp.\"pid) \".\n \"VALUES (?,?,?)\";\n $db->query($sql, array($this->_lock, 1, $invalid_pid));\n // If all succeed, commit the transaction and all changes\n // are committed at once.\n $db->commit();\n $ok = true; \n } else {\n $db->rollBack();\n $ok = false;\n }\n } catch(Exception $ex) {\n $db->rollBack();\n $log->err($ex);\n $ok = false;\n }\n \n if (! $ok) {\n // setting lock failed because another process was faster\n $log->debug(\"Queue::triggerUpdate - lock value has been taken\");\n \n } else {\n // create new background update process\n $log->debug(\"Queue::triggerUpdate - created new background process!\");\n $this->process();\n }\n }",
"public function updateItem($id, Request $request){\n\t\t$announcement = Announcement::findOrFail($id);\n\t\t$announcement->is_approved = $request->get('is_approved', 0);\n\t\t$announcement->priority = $request->get('priority', 0);\n\t\t$announcement->is_archived = $request->get('is_archived', 0);\n\t\tif(is_null($announcement->approved_date)){\n\t\t\t$announcement->approved_date = Carbon::now();\n\t\t}\n\n\t\tif($announcement->save()){\n\n\t\t\t$returnData = ['is_approved' => $announcement->is_approved, 'priority' => $announcement->priority, 'is_archived' => $announcement->is_archived];\n\t\t\treturn $this->setStatusCode(201)\n\t\t\t\t->respondUpdatedWithData('announcement updated', $returnData);\n\t\t}\n\t}",
"public function approve(Request $request)\n {\n\n $appointment = Appointment::find($request->id);\n $appointment->approved = 1;\n $appointment->save();\n AppointmentApproved::dispatch($appointment);\n /* event(new AppointmentApproved($appointment)); */\n\n return response([ 'appointment' => new AppointmentResource($appointment), 'message' => 'Retrieved Successfuly'],200);\n }",
"function approveEnrollment($user, $cid)\r\n {\r\n $courseName = $this->getCourseName($cid); //Get course name for email\r\n $this->MB->set_subject(\"Enrollment application for $courseName: Approved\");\r\n $this->MB->set_body(\"We are pleased to inform you that your application to enroll in $courseName\r\n has been processed successfully. You may immediately begin reading the course content\r\n and completing the quizzes.\");\r\n $this->MB->set_sendto($user);\r\n $this->MB->set_sendfrom('admin');\r\n $this->MB->send_mail(); //Send user email\r\n $this->DB->database_delete('enrollment_requests', array('user' => $user, 'cid' => $cid)); //Delete enrollment request\r\n \r\n $currently_enrolled = $this->DB->database_select('users', 'enrolled', array('username' => $user), 1); //Add course ID to user registered table\r\n \r\n $currently_enrolled = explode(',', $currently_enrolled['enrolled']);\r\n \r\n $index = count($currently_enrolled)+1;\r\n $currently_enrolled[$index] = $cid;\r\n \r\n $currently_enrolled = implode(',', $currently_enrolled);\r\n \r\n $this->DB->database_update('users', array('enrolled' => $currently_enrolled), array('username' => $user)); \r\n }",
"public static function approveMessage($id) {\n $que = \"UPDATE message SET is_approved = 'Y' where id = '{$id}'\";\n $gets = mysql_query($que);\n return $gets;\n }",
"public function callback($approved);",
"public function testModerationByCompany(): void\n {\n // Initial state\n $productSummaryArray = $this->getProductsSummary();\n\n static::assertSame(11, $productSummaryArray[3][ProductApprovalStatus::APPROVED()->getKey()]);\n static::assertSame(2, $productSummaryArray[3][ProductApprovalStatus::PENDING()->getKey()]);\n static::assertSame(1, $productSummaryArray[3][ProductApprovalStatus::REJECTED()->getKey()]);\n\n static::assertSame(1, $productSummaryArray[4][ProductApprovalStatus::APPROVED()->getKey()]);\n static::assertSame(1, $productSummaryArray[4][ProductApprovalStatus::PENDING()->getKey()]);\n\n // We approve all products of company 3\n $this->moderationService->moderateByCompany(3, 'approve');\n\n // Pending products of company 3 should now be approved\n $productSummaryArray = $this->getProductsSummary();\n\n static::assertSame(13, $productSummaryArray[3][ProductApprovalStatus::APPROVED()->getKey()]);\n static::assertArrayNotHasKey(ProductApprovalStatus::PENDING()->getKey(), $productSummaryArray[3]);\n static::assertSame(1, $productSummaryArray[3][ProductApprovalStatus::REJECTED()->getKey()]);\n\n static::assertSame(1, $productSummaryArray[4][ProductApprovalStatus::APPROVED()->getKey()]);\n static::assertSame(1, $productSummaryArray[4][ProductApprovalStatus::PENDING()->getKey()]);\n }",
"public function testItCanApproveASuggestedEditPendingCuration()\n {\n $this->logInAsUser(['curator' => 1]);\n\n $edit = factory('App\\Models\\SuggestedEdit')->create();\n\n $this->get('/curation/edits/approve/' . $edit->id)->assertResponseStatus(302);\n\n $this->seeInDatabase('suggested_edits', [\n 'id' => $edit->id,\n 'approved' => 1,\n ]);\n }",
"public function approve($id) {\n $id = (int)$id;\n if ($this->user->can('approve_comment')) {\n $comment = ORM::factory('comment')->where('id', $id)->find();\n $comment->is_approved = 1;\n $comment->save();\n Tip::set(T::_('Comment approved.'));\n }\n\n $redirect_uri = $this->input->get('redirect_uri');\n if (empty($redirect_uri)) {\n url::admin_redirect('comments');\n } else {\n url::redirect($redirect_uri);\n }\n }"
]
| [
"0.5962121",
"0.59368837",
"0.5838828",
"0.5713281",
"0.5681302",
"0.56669784",
"0.5588695",
"0.5576777",
"0.55478364",
"0.5501928",
"0.54644704",
"0.5458797",
"0.5456101",
"0.54289055",
"0.5418346",
"0.532878",
"0.53096604",
"0.5278154",
"0.5178503",
"0.5123955",
"0.5118987",
"0.50943923",
"0.5086978",
"0.5071465",
"0.50622964",
"0.50505114",
"0.5043217",
"0.5042652",
"0.50136596",
"0.5008941",
"0.49857518",
"0.49830645",
"0.49830234",
"0.49687895",
"0.49633282",
"0.4939362",
"0.49351802",
"0.4930974",
"0.49272826",
"0.4915328",
"0.48795107",
"0.48774192",
"0.48692435",
"0.48658377",
"0.4860507",
"0.48461643",
"0.48375213",
"0.4816529",
"0.48143893",
"0.47995573",
"0.47941536",
"0.47851443",
"0.47815248",
"0.4780934",
"0.47697946",
"0.4762494",
"0.4759019",
"0.47457767",
"0.47447857",
"0.47317934",
"0.47297993",
"0.47108725",
"0.47041297",
"0.46965748",
"0.4685985",
"0.4678258",
"0.46733016",
"0.4673298",
"0.46717367",
"0.46612847",
"0.4654655",
"0.46529138",
"0.46471515",
"0.46460938",
"0.46370098",
"0.46331435",
"0.46295848",
"0.46243662",
"0.46171957",
"0.46140227",
"0.4604951",
"0.46026635",
"0.45912024",
"0.4591089",
"0.4590373",
"0.4587938",
"0.4585378",
"0.45853162",
"0.45817798",
"0.45732352",
"0.45722014",
"0.45696738",
"0.4569671",
"0.4556412",
"0.45560914",
"0.45521295",
"0.4550126",
"0.45475277",
"0.45469636",
"0.45431593"
]
| 0.5796868 | 3 |
Deletes the specified moderation queue entry. | public function deleteModerationQueueEntry($contentId)
{
$dw = XenForo_DataWriter::create('ThemeHouse_SocialGroups_DataWriter_SocialForum',
XenForo_DataWriter::ERROR_SILENT);
$dw->setExistingData($contentId);
$dw->delete();
if ($dw->save()) {
XenForo_Model_Log::logModeratorAction('socialForum', $dw->getMergedData(), 'delete',
array(
'reason' => ''
));
return true;
} else {
return false;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function delete()\n {\n $this->queue->delete($this);\n }",
"public function deleteQueue();",
"public function deleteAction() {\n\t\t$id = $this->getInput('id');\n\t\t$info = Gou_Service_ForumReply::getForumReply($id);\n\t\tif ($info && $info['id'] == 0) $this->output(-1, '无法删除');\n\t\t$ret = Gou_Service_ForumReply::deleteForumReply($id);\n\t\tif (!$ret) $this->output(-1, '操作失败');\n\t\t$this->output(0, '操作成功');\n\t}",
"public function delete()\n {\n global $_PM_;\n $api = 'handler_'.$this->handler.'_api';\n $this->api = new $api($_PM_, PHM_API_UID, $this->principalId);\n $this->api->remove_item($this->item['id']);\n }",
"public function deleteMessage(Zend_Queue_Message $message)\n {\n \treturn $this->_pheanstalk->delete($message->handle);\n }",
"public function delete()\n {\n parent::delete();\n\n $this->sqs->deleteMessage([\n 'QueueUrl' => $this->queue, 'ReceiptHandle' => $this->job->getReceiptHandle(),\n ]);\n }",
"public function removeAction()\n {\n $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('tx_frpformanswers_domain_model_formentry');\n\n $queryBuilder->delete('tx_frpformanswers_domain_model_formentry')\n ->where($queryBuilder->expr()->eq('pid', $queryBuilder->createNamedParameter($this->pid, \\PDO::PARAM_INT)))\n ->andWhere($queryBuilder->expr()->eq('deleted', $queryBuilder->createNamedParameter(1, \\PDO::PARAM_INT)))\n ->execute();\n\n $this->addFlashMessage(\n LocalizationUtility::translate('LLL:EXT:frp_form_answers/Resources/Private/Language/de.locallang_be.xlf:flashmessage.removeEntries.body', null, [$this->pid]),\n LocalizationUtility::translate('LLL:EXT:frp_form_answers/Resources/Private/Language/de.locallang_be.xlf:flashmessage.removeEntries.title'),\n \\TYPO3\\CMS\\Core\\Messaging\\FlashMessage::OK,\n true);\n\n $this->redirect('list');\n }",
"public static function delete()\n {\n if ( empty($_REQUEST['mgb_rating_id']) ) return;\n $id = (int) $_REQUEST['mgb_rating_id'];\n\n Database::query(\n \"DELETE FROM ?\n WHERE id=${id}\"\n );\n }",
"protected function forum_queue_hard_delete()\n\t{\n\t\tif (!$this->phpbb_post_id)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tphpbb::_include('functions_posting', 'delete_post');\n\n\t\t$sql = 'SELECT t.*, p.*\n\t\t\tFROM ' . TOPICS_TABLE . ' t, ' . POSTS_TABLE . ' p\n\t\t\tWHERE p.post_id = ' . $this->phpbb_post_id . '\n\t\t\t\tAND t.topic_id = p.topic_id';\n\t\t$result = phpbb::$db->sql_query($sql);\n\t\t$post_data = phpbb::$db->sql_fetchrow($result);\n\t\tphpbb::$db->sql_freeresult($result);\n\n\t\tdelete_post($post_data['forum_id'], $post_data['topic_id'], $post_data['post_id'], $post_data);\n\t}",
"public function deleteQueueExtern($params = null);",
"function edithistory_delete_thread($tid)\n{\n\tglobal $db, $mybb;\n\t$db->delete_query(\"edithistory\", \"tid='{$tid}'\");\n}",
"public function adminDelComm()\n {\n $commID = $_POST['commID'];\n $del = \"DELETE FROM comment_section WHERE comm_id = ?\";\n $do = $this->connect()->prepare($del);\n $do->execute([$commID]);\n }",
"public function deleteQueue($strName)\n {\n if(!$this->isAllowed('moderator')) return $this->returnText(self::ERR_NO_MOD);\n if(trim($strName) == \"\") return $this->returnText('No queue name specified to delete');\n if(strtolower(trim($strName)) == 'default') return $this->returnText('Cannot delete the \\'default\\' queue');\n\n $oQueue = Queue::where([\n ['channel_id', '=', $this->c->id],\n ['name', '=', $strName]\n ])->first();\n\n if($oQueue)\n {\n if($this->c->active == $oQueue->id)\n {\n // were deleting the current active queue so we have to set the default queue active again\n $oDefaultQueue = Queue::where([\n ['channel_id', '=', $this->c->id],\n ['name', '=', 'default']\n ])->first();\n\n if($oDefaultQueue)\n {\n $this->c->active = $oDefaultQueue->id;\n $this->c->save();\n }\n }\n\n $this->clearQueue($oQueue->id);\n $oQueue->forceDelete();\n return $this->returnText('Successfully deleted queue \"'. $strName.'\"');\n }\n else\n {\n return $this->returnText('Unable to delete queue \"'. $strName .'\", queue doesn\\'t exist');\n }\n }",
"public function delete()\n {\n parent::delete();\n $receiptHandle = $this->job->getReceiptHandle();\n $this->mns->deleteMessage($receiptHandle);\n }",
"public function delete($queue, $id)\n {\n $this->db->createCommand()->delete($this->table, ['id' => $id])->execute();\n }",
"public function delete() {\n\t\t$query = new WP_Query( array(\n\t\t\t'name' => $this->params['post_name'],\n\t\t\t'post_type' => $this->params['post_type']\n\t\t) );\n\n\t\t$post = array_shift( $query->posts );\n\n\t\t// die('<pre>'.var_export($post,true).'</pre>');\n\n\t\tif ( $post ) {\n\t\t\t$current_action = $this->get_current_action();\n\t\t\t$this->action_results[ 'status' ] = 'success';\n\t\t\t$this->action_results[ 'messages' ][ $post->post_type ][ $post->ID ][ 'note' ] = __( 'The information has been deleted', 'kickpress' );\n\t\t\t$this->action_results[ 'data' ][ 'post_id' ] = $post->ID;\n\n\t\t\twp_trash_post( $post->ID );\n\t\t}\n\t}",
"function delete() {\n\t\t$sql = \"DELETE FROM umgroup\n\t\t\t\tWHERE GpID=?\";\n\t\t\n\t\t \n\t\t$this->ums->query($sql, array($this->GpID));\n\n\t}",
"function spamhurdles_db_remove($key)\n{\n global $PHORUM;\n\n phorum_db_interact(\n DB_RETURN_RES,\n \"DELETE FROM {$PHORUM['spamhurdles_table']}\n WHERE id='\".phorum_db_interact(DB_RETURN_QUOTED, $key).\"'\",\n NULL, DB_MASTERQUERY\n );\n}",
"public function deleteTask()\n {\n if (User::isGuest())\n {\n $rtrn = Request::getVar('REQUEST_URI', Route::url('index.php?option=' . $this->_option, false, true), 'server');\n App::redirect(\n Route::url('index.php?option=com_users&view=login&return=' . base64_encode($rtrn)),\n Lang::txt('COM_RADIAM_LOGIN_NOTICE'),\n 'warning'\n );\n return;\n }\n\n if (!$this->config->get('access-delete-entry')\n && !$this->config->get('access-manage-entry'))\n {\n App::abort(403, Lang::txt('COM_RADIAM_NOT_AUTH'));\n }\n\n // Incoming\n $id = Request::getInt('entry', 0);\n\n if (!$id)\n {\n return $this->displayTask();\n }\n\n $process = Request::getVar('process', '');\n $confirmdel = Request::getVar('confirmdel', '');\n\n // Initiate a blog entry object\n $entry = Entry::oneOrFail($id);\n\n // Did they confirm delete?\n if (!$process || !$confirmdel)\n {\n if ($process && !$confirmdel)\n {\n $this->setError(Lang::txt('COM_RADIAM_ERROR_CONFIRM_DELETION'));\n }\n\n foreach ($this->getErrors() as $error)\n {\n $this->view->setError($error);\n }\n\n $this->view\n ->set('config', $this->config)\n ->set('entry', $entry)\n ->display();\n return;\n }\n\n // Check for request forgeries\n Request::checkToken();\n\n // Delete the entry itself\n $entry->set('state', 2);\n\n if (!$entry->save())\n {\n Notify::error($entry->getError());\n }\n\n // Log the activity\n Event::trigger('system.logActivity', [\n 'activity' => [\n 'action' => 'deleted',\n 'scope' => 'radiam.entry',\n 'scope_id' => $id,\n 'description' => Lang::txt('COM_RADIAM_ACTIVITY_ENTRY_DELETED', '<a href=\"' . Route::url($entry->link()) . '\">' . $entry->get('title') . '</a>'),\n 'details' => array(\n 'title' => $entry->get('title'),\n 'url' => Route::url($entry->link())\n )\n ],\n 'recipients' => [\n $entry->get('created_by')\n ]\n ]);\n\n // Return the entries lsit\n App::redirect(\n Route::url('index.php?option=' . $this->_option)\n );\n }",
"public function delete(){\n if (isset($this->content[$this->idField])) {\n\n $sql = \"DELETE FROM {$this->table} WHERE {$this->idField} = {$this->content[$this->idField]};\";\n $delet = new \\AR\\BD\\Delete();\n $delet->ExeDelete($this->table, \"WHERE {$this->idField} = {$this->content[$this->idField]}\", \"\");\n \n }\n }",
"function threadRemove(){\n\n\t$threadId\t\t\t \t= strip_tags($_GET['ThreadId']);\t\t\t\t #int - primaryKey\n\n\t$db = pdo(); # pdo() creates and returns a PDO object\n\t#dumpDie($_POST);\n\n\t$sql = \"DELETE FROM ma_Threads WHERE `ThreadID` = :ThreadID\";\n\n\t$stmt = $db->prepare($sql);\n\t//INTEGER EXAMPLE $stmt->bindValue(1, $id, PDO::PARAM_INT);\n\t$stmt->bindValue(':ThreadID', $threadId, PDO::PARAM_INT);\n\n\ttry {$stmt->execute();} catch(PDOException $ex) {trigger_error($ex->getMessage(), E_USER_ERROR);}\n\t#feedback success or failure of update\n\n\tif ($stmt->rowCount() > 0)\n\t{//success! provide feedback, chance to change another!\n\t\tfeedback(\"Thread Removed Successfully From Timeline!\",\"success\");\n\t}else{//Problem! Provide feedback!\n\t\tfeedback(\"Thread Not Removed!\",\"warning\");\n\t}\n\tmyRedirect(THIS_PAGE);\n}",
"public function delete()\n {\n $query = $this->db->getQuery(true);\n\n $query\n ->delete($this->db->quoteName(\"#__crowdf_intentions\"))\n ->where($this->db->quoteName(\"id\") .\"=\". (int)$this->id);\n\n $this->db->setQuery($query);\n $this->db->execute();\n\n $this->reset();\n }",
"public function delete_gallery_item() {\n\t\n\t\t\t// Delete attachment\n\t\t\twp_delete_attachment( intval( $_POST[ 'attachment_id' ] ) );\n\t\n\t\t\t// Return the updated gallery\n\t\t\t$this->draw_gallery_items( intval( $_POST[ 'gallery_id' ] ) );\n\t\n\t\t\texit;\n\t\t}",
"public function removeAction()\n {\n $modules = $this->module->fetchAll(\" groupmodule_id = \".$this->_getParam('id'));\n foreach($modules as $key=>$row)\n { \n $this->module->removemodule(APPLICATION_PATH.\"/modules/\".$row->module_name);\n }\n \n $current = $this->gmodule->find($this->_getParam('id'))->current();\n $current->delete(); \n \n $message = \"Data Deleted Successfully\";\n \n $this->_helper->flashMessenger->addMessage($message);\n die;\n }",
"public function delete()\n {\n $data = Comment::where(\"reply\", $this->id)->get();\n foreach ($data as $comment) {\n $comment->delete();\n }\n\n /**\n * Delete self\n */\n parent::delete();\n }",
"function messageDelete(Message $message);",
"public function deleteMessage($queueId, $message, $options = null);",
"Public Function RemoveFrombevomedia_queue($jobId)\n {\n \t$this->jobId = $jobId;\n \t\n \t$DatabaseObj = Zend_Registry::get('Instance/DatabaseObj');\n \t\t\n \t$UpdateArray = array(\n \t\t\t'Deleted' => 1,\t\t\t\t\t\t \t\t\t\n \t\t);\n \t\t\n \t\t$DatabaseObj->update('bevomedia_queue', $UpdateArray, \"jobId = '{$jobId}'\");\n \t\t\n \t\t$this->status = 'Deleted';\n \t\n }",
"function delete()\r\n {\r\n $db =& eZDB::globalDatabase();\r\n $res[] = $db->query( \"DELETE FROM eZTodo_Priority WHERE ID='$this->ID'\" );\r\n eZDB::finish( $res, $db );\r\n }",
"function deleteEntry() \n { \n \n // before removing entry, make sure associated linkGroups & linkViewers\n // are removed as well\n $linkID = $this->getID();\n \n $linkMgr = new RowManager_NavLinkAccessGroupManager();\n $linkMgr->setLinkID( $linkID );\n $list = $linkMgr->getListIterator();\n \n $list->setFirst();\n while( $entry = $list->getNext() ) {\n $entry->deleteEntry();\n }\n \n $linkViewerMgr = new RowManager_NavLinkViewerManager();\n $linkViewerMgr->setLinkID( $linkID );\n $list = $linkViewerMgr->getListIterator();\n \n $list->setFirst();\n while( $entry = $list->getNext() ) {\n $entry->deleteEntry();\n }\n \n parent::deleteEntry();\n \n }",
"public function delete($job);",
"public function _destroy_queue() {\n\t\tglobal $wpdb;\n\n\t\t$status = \\SearchWP::$index->get_tables()['status']->table_name;\n\t\t$wpdb->query( $wpdb->prepare( \"\n\t\t\tDELETE FROM {$status}\n\t\t\tWHERE indexed IS NULL\n\t\t\tAND omitted IS NULL\n\t\t\tAND queued IS NOT NULL\n\t\t\tAND site = %d\",\n\t\t\tget_current_blog_id()\n\t\t) );\n\t}",
"function delete_reply($reply_id){\n global $db;\n $query = 'DELETE FROM replies\n WHERE reply_id = :reply_id';\n $statement = $db->prepare($query);\n $statement->bindValue(':reply_id', $reply_id);\n $statement->execute();\n $statement->closeCursor();\n }",
"public function prune() {\n $this->connection->delete('queue')\n ->condition('name', $this->name)\n ->condition('expire', 0, '>')\n ->execute();\n }",
"public function delete($code)\n {\n //this thread\n Thread::where('code',$code)->delete();\n }",
"function edithistory_delete_post($pid)\n{\n\tglobal $db, $mybb;\n\t$db->delete_query(\"edithistory\", \"pid='{$pid}'\");\n}",
"public function delete () {\n\t\tglobal $wpdb;\n\n\t\t$wpdb->query($wpdb->prepare(\"\n\t\tDELETE FROM $wpdb->postmeta WHERE meta_key='syndication_feed_id'\n\t\tAND meta_value = '%s'\n\t\t\", $this->id));\n\n\t\t$wpdb->query($wpdb->prepare(\"\n\t\tDELETE FROM $wpdb->links WHERE link_id = %d\n\t\t\", (int) $this->id));\n\n\t\t$this->id = NULL;\n\t}",
"abstract public function deleteMessage($messageNo, $mailboxPath=null);",
"public function deleteQueue($queueId, $options = null);",
"public function removeTask()\n\t{\n\t\t// Check for request forgeries\n\t\tRequest::checkToken();\n\n\t\tif (!User::authorise('core.delete', $this->_option))\n\t\t{\n\t\t\tApp::abort(403, Lang::txt('JERROR_ALERTNOAUTHOR'));\n\t\t}\n\n\t\t// Incoming\n\t\t$ids = Request::getArray('rid', array());\n\t\t$ids = (!is_array($ids) ? array($ids) : $ids);\n\n\t\t$removed = 0;\n\n\t\tforeach ($ids as $id)\n\t\t{\n\t\t\t$entry = Respondent::oneOrFail(intval($id));\n\n\t\t\t// Delete the entry\n\t\t\tif (!$entry->destroy())\n\t\t\t{\n\t\t\t\tNotify::error($entry->getError());\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Trigger before delete event\n\t\t\t\\Event::trigger('onEventsAfterDeleteRespondent', array($id));\n\n\t\t\t$removed++;\n\t\t}\n\n\t\tif ($removed)\n\t\t{\n\t\t\tNotify::success(Lang::txt('COM_EVENTS_RESPONDENT_REMOVED'));\n\t\t}\n\n\t\t// Output messsage and redirect\n\t\tApp::redirect(\n\t\t\tRoute::url('index.php?option=' . $this->_option . '&controller=' . $this->_controller . '&id[]=' . Request::getInt('event', 0), false)\n\t\t);\n\t}",
"public function action_delete_entry(): int {\n\t\treturn (int) ( new CRUD( $this->table->get_table_definition() ) )->delete_oldest_item();\n\t}",
"public function delete() {}",
"public function delete() {}",
"public function delete() {}",
"public function delete()\n {\n $this->job->delete();\n }",
"public function delete() {}",
"public function deleteMessage($queue, $id)\n {\n throw new \\RuntimeException(\"Delete is not supported by GaeQueue.\");\n }",
"public function delete() {\n // Create query\n $query = \"DELETE FROM \" . $this->table .\n \" WHERE MID = :mid AND Spot = :spot \";\n \n // Prepare the statement\n $stmt = $this->conn->prepare($query);\n\n // Clean the query\n $this->attr[\"mid\"] = htmlspecialchars(strip_tags($this->attr[\"mid\"]));\n $this->attr[\"spot\"] = htmlspecialchars(strip_tags($this->attr[\"spot\"]));\n\n // Bind the data\n $stmt->bindValue(\":mid\", $this->attr[\"mid\"]);\n $stmt->bindValue(\":spot\", $this->attr[\"spot\"]);\n \n // Execute the prepared statement and check for errors in running it\n return $this->runPrepStmtChkErr($stmt);\n }",
"public function delete($sender) {\n\t\t$delete = ($sender ? \"r\" : \"s\") . \"_delete=1\";\n\t\t$statement = Registry::get(\"database\") -> query(\"UPDATE messages SET \" . $delete . \" WHERE id=?\");\n\t\t$statement -> bindParam(1, \t$this -> getId());\n\t\t$statement -> execute();\n\t}",
"public function deleteThread()\n {\n $this->service->deleteThread($this->getId());\n }",
"function do_delete(){\n\t\t// remove from fieldset:\n\t\t$fieldset = jcf_fieldsets_get( $this->fieldset_id );\n\t\tif( isset($fieldset['fields'][$this->id]) )\n\t\t\tunset($fieldset['fields'][$this->id]);\n\t\tjcf_fieldsets_update( $this->fieldset_id, $fieldset );\n\t\t\n\t\t// remove from fields array\n\t\tjcf_field_settings_update($this->id, NULL);\n\t}",
"function delete() {\n $this->that->delete($this->id, $this->name);\n $this->put_id();\n }",
"public function delete(Module $module);",
"public function delete()\n {\n parent::delete();\n $this->azure->deleteMessage($this->job);\n }",
"public function delete( $option );",
"public function delete()\n {\n $this->db->delete($this->table, $this->data['id'], $this->key);\n }",
"public function deleteMessage($messageId);",
"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();",
"function qa_pm_delete($userid, $handle, $cookieid, $message, $box)\n{\n\trequire_once QA_INCLUDE_DIR . 'db/messages.php';\n\n\tqa_db_message_user_hide($message['messageid'], $box);\n\tqa_db_message_delete($message['messageid'], false);\n}",
"function delete()\r\n {\r\n $db =& eZDB::globalDatabase();\r\n $db->begin();\r\n if ( isSet( $this->ID ) )\r\n {\r\n // remove all bugs from the database that have this priority.\r\n $res[] = $db->query( \"DELETE FROM eZBug_Bug WHERE PriorityID='$this->ID'\" );\r\n // remove the priority itself. \r\n $res[] = $db->query( \"DELETE FROM eZBug_Priority WHERE ID='$this->ID'\" );\r\n }\r\n eZDB::finish( $res, $db );\r\n return true;\r\n }",
"function delete_entry($entryID) {\r\n $this->db->where('id', $entryID);\r\n $this->db->delete('workHours');\r\n }",
"public function delete()\n {\n self::deleteById( $this->db, $this->id, $this->prefix );\n\n if( $this->inTransaction )\n {\n //$this->db->commit();\n $this->inTransaction = false;\n }\n }",
"public function deleteItem($item);",
"public function delete() {\n if (isset($this->path[0]))\n models\\Locker::new(['id' => $this->path[0], 'accountId' => models\\Account::current()->id])->delete();\n\n $this->send('Successfully deleted Locker.');\n }",
"public function delete() {\n\t\tif ($this->exists) {\n\t\t\t$this->fire_event('deleting');\n\n\t\t\t$result = $this->query()->where(static::$key, '=', $this->get_key())->delete();\n\n\t\t\t$this->fire_event('deleted');\n\n\t\t\treturn $result;\n\t\t}\n\t}",
"public function deleteItem($key);",
"public function delete()\n {\n echo '客户要求减少一个需求' . PHP_EOL;\n }",
"public function deleteReserved($queue, $id)\n {\n $this->database\n ->selectCollection($this->collection)\n ->findOneAndDelete([\n '_id' => new \\MongoDB\\BSON\\ObjectId($id)\n ]);\n }",
"public final function delete() {\n }",
"public function delete() {\n global $DB;\n $DB->delete_records($this->get_table_name(), array('id' => $this->id));\n }",
"public function actionDelete()\r\n {\r\n $spamRuleId = $this->_input->filterSingle('spam_rule_id', XenForo_Input::STRING);\r\n $spamRule = $this->_getSpamRuleOrError($spamRuleId);\r\n\r\n $writer = XenForo_DataWriter::create('ThemeHouse_SpamRules_DataWriter_SpamRule');\r\n $writer->setExistingData($spamRule);\r\n\r\n if ($this->isConfirmedPost()) { // delete spam rule\r\n $writer->delete();\r\n\r\n return $this->responseRedirect(XenForo_ControllerResponse_Redirect::SUCCESS,\r\n XenForo_Link::buildAdminLink('spam-rules'));\r\n } else { // show delete confirmation prompt\r\n $writer->preDelete();\r\n $errors = $writer->getErrors();\r\n if ($errors) {\r\n return $this->responseError($errors);\r\n }\r\n\r\n $viewParams = array(\r\n 'spamRule' => $spamRule\r\n );\r\n\r\n return $this->responseView('ThemeHouse_SpamRules_ViewAdmin_SpamRule_Delete',\r\n 'th_spam_rule_delete_spamrules', $viewParams);\r\n }\r\n }",
"function admin_delete($id = null){\r\n\t\tif (!$id) {\r\n $this->Session->setFlash(__('Invalid id for Message', true), 'admin_flash_good');\r\n $this->redirect(array('action' => 'message'));\r\n }\r\n if (!isset($this->params['named']['token']) || ($this->params['named']['token'] != $this->params['_Token']['key'])) {\r\n $blackHoleCallback = $this->Security->blackHoleCallback;\r\n $this->$blackHoleCallback();\r\n }\r\n\t\t$this->data = $this->Message->read(null, $id);\r\n\t\t$mid = $this->data['Message']['receiver_id'];\r\n if ($this->Message->delete($id)) {\r\n $this->Session->setFlash(__('Message deleted', true), 'admin_flash_good');\r\n $this->redirect(array('controller'=>'messages','action' => 'index/'.$mid.''));\r\n }\t\r\n\t}",
"public function deleteAnswer()\n {\n $this->is_answer = false;\n $this->topic->is_answered = false;\n $post = $this;\n\n Db::transaction(function() use ($post)\n {\n $post->topic->save();\n $post->save();\n });\n }",
"public function deleted(SecKillAppliesRegister $secKillAppliesRegister)\n {\n //\n }",
"public function delete() {\n $streamTbl = Engine_Api::_()->getDbTable('stream', 'activity');\n $streamTbl->delete('(`object_id` = '.$this->getIdentity().' AND `object_type` = \"ynjobposting_job\")');\n $activityTbl = Engine_Api::_()->getDbTable('actions', 'activity');\n $activityTbl->delete('(`object_id` = '.$this->getIdentity().' AND `object_type` = \"ynjobposting_job\")');\n $attachmentTbl = Engine_Api::_()->getDbTable('attachments', 'activity');\n $attachmentTbl->delete('(`id` = '.$this -> getIdentity().' AND `type` = \"ynjobposting_job\")');\n $this->changeStatus('deleted');\n $this->feature(0, false);\n }",
"public function remove($id) \n {\n $log = FezLog::get();\n \n if (array_key_exists($id, $this->_ids)) {\n $this->_ids[$id] = self::ACTION_REMOVE;\n $log->debug(\"Removed $id from queue\");\n }\n }",
"abstract function del ($item);",
"public function deleteEntry($entry) {\n\t\t$this->_initDbConnection();\n\t\t\n\t\tif (is_string($entry)) {\n\t\t\t$stm = $this->_prepareStatement('entry', 'deleteByAtomId');\t\t\n\t\t\t$stm->execute(array(\n\t\t\t\t':id' => $entry\n\t\t\t));\n\t\t} else if (!empty($entry->row_id)) {\n\t\t\t$stm = $this->_prepareStatement('entry', 'deleteById');\t\t\n\t\t\t$stm->execute(array(\n\t\t\t\t':row_id' => $entry->row_id\n\t\t\t));\n\t\t}\n\t\t\t\n\t\tif ($this->_checkPdoError($stm)) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ($stm->rowCount()) {\n\t\t\treturn true;\n\t\t}\t\n\t\treturn false;\n\t}",
"public function deleteAction()\n {\n $itemGroupRowId = $this->getRequest()->getParam('containerRowId');\n \n //get eventId of the event to be deleted\n $itemGroupId = $this->getRequest()->getParam('containerId');\n\n // get form\n $form = $this->_model->getForm('delete');\n \n //set form action\n //define form action\n $form->setAction($this->view->url(\n array(\n 'controller' => 'itemgrouprow',\n 'action' => 'delete',\n 'containerId' => $itemGroupId,\n 'containerRowId' => $itemGroupRowId,\n ),\n \n 'event'\n ));\n \n $this->processDelete(\n $form, \n 'msg_itemgrouprow_deleted',\n $this->view->url(\n array(\n 'controller' => 'itemgrouprow',\n 'action' => 'index',\n 'containerId' => $itemGroupId),\n 'event'\n ),\n $itemGroupRowId\n );\n }",
"public function delete() {\n $this->remove_content();\n\n parent::delete();\n }",
"public function delete()\n {\n $this->_checkItem();\n\n $service = $this->getService();\n $entry = $service->getGbaseItemEntry( $this->getItem()->getGbaseItemId() );\n return $service->deleteGbaseItem($entry, $this->getDryRun());\n }",
"public function destroy(Entry $entry)\n {\n //\n }",
"public function deleteAction()\n {\n $authorization = Zend_Auth::getInstance();\n if(!$authorization -> hasIdentity()) {\n $this->redirect('/users/login');\n }\n else\n {\n // Check if user is Admin\n $userObj = $authorization->getIdentity();\n \n //$this -> view -> data = $this -> model -> listAllUsers(); \n // Get User Id\n $id = $this->getRequest()->getParam('id');\n $thread_id = $this->getRequest()->getParam('thread_id');\n if($comment = $this->model ->getCommentById($id)){\n if ($this->model->deleteComment($id))\n {\n $this->redirect('threads/index/id/'.$thread_id);\n }\n }\n else\n {\n $this->redirect('thread/view/id/'.$thread_id);\n }\n\n\n \n }\n }",
"public function delete(){\n global $db;\n $delete = $db->prepare('DELETE FROM posts WHERE id = :id');\n $delete->bindValue(':id', $this->_id, PDO::PARAM_INT);\n $delete->execute();\n }",
"public function deleteJob($name);",
"public function delete(string $entry) {\n throw new Exception('Not implemented yet');\n }"
]
| [
"0.63789564",
"0.6115766",
"0.587",
"0.5846722",
"0.5756148",
"0.57462096",
"0.5731161",
"0.568626",
"0.56332344",
"0.56241536",
"0.5604138",
"0.55754596",
"0.5557331",
"0.5530397",
"0.55224276",
"0.55197376",
"0.5517672",
"0.5516031",
"0.5497648",
"0.54797095",
"0.5468505",
"0.54581904",
"0.545706",
"0.54371005",
"0.54223096",
"0.54216075",
"0.5407531",
"0.538591",
"0.5378771",
"0.5373104",
"0.53560996",
"0.5348538",
"0.533019",
"0.532197",
"0.5309218",
"0.53091305",
"0.53078455",
"0.5301403",
"0.53012747",
"0.5299316",
"0.52925414",
"0.52662146",
"0.5264839",
"0.5264839",
"0.52634007",
"0.5262915",
"0.52415866",
"0.52395636",
"0.52088046",
"0.52079296",
"0.52051264",
"0.52043605",
"0.52036047",
"0.52030826",
"0.5202194",
"0.51950485",
"0.5193262",
"0.5184376",
"0.5184376",
"0.5184376",
"0.5184376",
"0.5184376",
"0.5184376",
"0.5184376",
"0.5184376",
"0.5184376",
"0.5184376",
"0.5184376",
"0.5184376",
"0.5184376",
"0.5184376",
"0.5184376",
"0.5174331",
"0.51741254",
"0.5168344",
"0.5167764",
"0.5160803",
"0.5160443",
"0.515979",
"0.51590127",
"0.51548684",
"0.51514405",
"0.51485914",
"0.5144194",
"0.51357913",
"0.5133537",
"0.5131985",
"0.51288795",
"0.5123309",
"0.51091766",
"0.51046175",
"0.5102649",
"0.5097268",
"0.5097243",
"0.50929856",
"0.50863457",
"0.5086109",
"0.5085631",
"0.5083928",
"0.5082864"
]
| 0.6302791 | 1 |
Run the database seeds. | public function run()
{
$data = [
[ 'description' => 'Masculino' ],
[ 'description' => 'Femenino' ],
];
foreach ($data as $element) {
Gender::create([
'description' => $element['description'],
]);
}
} | {
"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 |
Set if product category is the main category. | public function setMain($main); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setCategory() {\n /**\n *\n * @todo make a separate config file for the default category ?!\n */\n $defaultCategory = 1;\n $category = Category::find()->all();\n $newCat = $this->strProcessing($this->category);\n $k = NULL;\n if (!empty($newCat)) {\n foreach ($category as $value) {\n $cat = explode(',', $value['synonyms']);\n $cat = array_map(array($this, 'strProcessing'), $cat);\n $k = array_search($newCat, $cat);\n if ($k !== NULL && $k !== FALSE) {\n $k = $value['id'];\n break;\n }\n }\n }\n if ($k) {\n $this->category = $k;\n } else {\n $this->category = $defaultCategory;\n }\n return TRUE;\n }",
"protected function setSubCategory($productID, $subCategory)\r\n {\r\n \r\n // SQL query\r\n $sql = \"UPDATE tbl_products SET sub_categories= '\" . $subCategory . \"'WHERE id_products= '\" . $productID . \"'\";\r\n \r\n // Connect to database and run query\r\n $result = $this->connect->query($sql);\r\n \r\n // Check to see if query passed and registered\r\n if ($result) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }",
"public function isProduct()\n {\n return $this -> name == config('constant.categorytype.product_id');\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 }",
"protected function assignCategory() \r\r\n {\r\r\n if (($this->category === false || !Validate::isLoadedObject($this->category) || !$this->category->inShop() || !$this->category->isAssociatedToShop()) && Category::inShopStatic($this->product->id_category_default, $this->context->shop)) {\r\r\n $this->category = new Category((int) $this->product->id_category_default, (int) $this->context->language->id);\r\r\n }\r\r\n\r\r\n $sub_categories = array();\r\r\n if (Validate::isLoadedObject($this->category)) {\r\r\n $sub_categories = $this->category->getSubCategories($this->context->language->id, true);\r\r\n\r\r\n //$rootCategory = $this.category\r\r\n // various assignements before Hook::exec\r\r\n $this->context->smarty->assign(array(\r\r\n 'category' => $this->category,\r\r\n 'rootCategory' => Category::getDepthCategory($this->category->id, 2),\r\r\n 'subCategories' => $sub_categories,\r\r\n 'id_category_current' => (int) $this->category->id,\r\r\n 'id_category_parent' => (int) $this->category->id_parent,\r\r\n 'return_category_name' => Tools::safeOutput($this->category->getFieldByLang('name')),\r\r\n 'categories' => Category::getHomeCategories($this->context->language->id, true, (int) $this->context->shop->id),\r\r\n ));\r\r\n }\r\r\n }",
"function accouk_set_global_main_cat() {\n\n //Requires Yoast SEO\n $yoast_primary_cat = new WPSEO_Primary_Term('category', get_the_ID());\n $yoast_primary_cat = $yoast_primary_cat->get_primary_term();\n\n $cat = get_category($yoast_primary_cat);\n $name = $cat->cat_name;\n $slug = $cat->slug;\n $link = get_term_link($yoast_primary_cat);\n\n $GLOBALS['main_category'] = array('name' => $name, 'link' => $link, 'slug' => $slug);\n\n}",
"protected function setCategory($productID, $category)\r\n {\r\n \r\n // SQL query\r\n $sql = \"UPDATE tbl_products SET categories= '\" . $category . \"'WHERE id_products= '\" . $productID . \"'\";\r\n \r\n // Connect to database and run query\r\n $result = $this->connect->query($sql);\r\n \r\n // Check to see if query passed and registered\r\n if ($result) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }",
"public function setProduct_category ($product_category) {\n\t$this->product_category = $this->getClass()->getFieldDefinition(\"product_category\")->preSetData($this, $product_category);\n\treturn $this;\n}",
"public function hasPriceCategory()\n {\n return $this->price_category !== null;\n }",
"public function main_category(Request $request,$main_category)\n\t{\n\t\t$main = Main_category::all();//main category items\n $cart = Cart::content();\n $product = Product::all();//aids in getting cart items to avoid errors\n\t\t$categories = ProdCategory::paginate(4);\n\t\t\n\n\t\tif ($request->has('subcategory')) {\n\t\t\t$catname = ProdSubCategory::find($request->subcategory);\n\t\t\t$products = Product::where('subcategory', '=' , $request->subcategory)->get();//as specified by the user\n\n\t\t}else{\n\t\t\t$products = Product::where('main_category', '=' , $main_category)->get();//as specified by the user\n\t\t\t$catname = Main_category::find($main_category);\n\t\t}\n\n\t\treturn view('shopping.main_category')->withProducts($products)->withCategories($categories)->withCart($cart)->withMain($main)->withProduct($product)->withCatname($catname);\n\t}",
"function is_product_category( $term = '' ) {\n\t\treturn is_tax( 'product_cat', $term );\n\t}",
"function empty_category($a) {\n\t\treturn !empty($a['CategoriesProduct']);\n\t}",
"public function getProdCategory()\n {\n return $this->prod_category;\n }",
"private function category() {\n if ($this->is_logged_in()){\n return true; //check if user had been logged in!!!\n }else{\n exit;\n }\n }",
"public function is_category($category = '')\n {\n }",
"protected function _initCatagory()\r\n\t{\r\n\t\tMage::dispatchEvent('vendor_catalog_controller_category_init_before', array('controller_action' => $this));\r\n\t\t$categoryId = (int) $this->getRequest()->getParam('id', false);\r\n\t\tif (!$categoryId) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t$category = Mage::getModel('vendorscategory/category')\r\n\t\t->load($categoryId);\r\n\t\tif (!Mage::helper('vendorscategory')->canShow($category)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif(!Mage::registry(\"vendor_id\") && !Mage::registry(\"vendor\") && !Mage::registry(\"current_vendor\")){\r\n\t\t\t//echo $category->getVendorId();exit;\r\n\t\t\t$vendorObj = Mage::getModel('vendors/vendor')->load($category->getVendorId());\r\n\r\n\t\t\t//var_dump($vendorObj->getData());exit;\r\n\t\t\tMage::register('vendor_id', $vendorObj->getVendorId());\r\n\t\t\tMage::register('vendor', $vendorObj);\r\n\t\t\tMage::register('current_vendor', $vendorObj);\r\n\t\t}\r\n\t\t\r\n\t\tMage::register('current_vendor_category', $category);\r\n\t\tMage::register('current_vendor_entity_key', $category->getPath());\r\n\t\ttry {\r\n\t\t\tMage::dispatchEvent(\r\n\t\t\t'vendor_catalog_controller_category_init_after',\r\n\t\t\tarray(\r\n\t\t\t'category' => $category,\r\n\t\t\t'controller_action' => $this\r\n\t\t\t)\r\n\t\t\t);\r\n\t\t} catch (Mage_Core_Exception $e) {\r\n\t\t\tMage::logException($e);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\r\n\t\treturn $category;\r\n\t}",
"public function setProductCategory(?ProductCategory $productCategory): void\n {\n $this->productCategory = $productCategory;\n }",
"function my_separate_category() {\n return 1;\n }",
"public function set_category_base($category_base)\n {\n }",
"public function testFilterSubCategoryNotEmptyExistingCategoryId() {\n $allCategories = $this->model_catalog_product->getAllCategories(); //run conditions on getProducts method\n $filters = array( //set up conditions for test\n 'filter_category_id' => $allCategories[0]['category_id'], //necessary to access filter_sub_category\n 'filter_sub_category' => 'true',\n );\n $products = $this->model_catalog_product->getProducts($filters); //run conditions on getProducts method\n $productsTotal = $this->model_catalog_product->getTotalProducts($filters);\n $this->assertTrue(sizeof($products) == $productsTotal, sizeof($products) . ' Retrieved from filter_sub_category=>\"true\", filter_category_id=>27, 1 products');\n }",
"public function set_category_id($category)\n {\n parent::set_category(0);\n }",
"public function getCategoryId()\n {\n if ($category = Mage::registry('current_category')) {\n return $category->getId();\n }\n return false;\n }",
"public function setCategory($id, $category)\n {\n return false;\n }",
"function accouk_is_photography_page() {\n if( is_category('photography') || \n (isset($GLOBALS['main_category']) && \n $GLOBALS['main_category']['slug'] === \"photography\")\n ) {\n return true;\n }\n\n return false;\n}",
"public function hasCategory()\n {\n return $this->category !== null;\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 isAssignedToCategory()\n {\n $_currentProduct = $this->getProduct();\n $_categoryIds = $_currentProduct->getCategoryIds();\n if($_categoryIds) {\n return true;\n } else {\n return false;\n }\n }",
"public function isMain()\n {\n if (!$this->getUser()->getMain()) {\n return false;\n }\n return $this->getUser()->getMain()->getId() == $this->getId();\n }",
"private function filterCategory()\n {\n if(empty($this->category) || $this->category === static::FILTER_CATEGORY_NONE) {\n return;\n }\n\n if($this->category === static::FILTER_CATEGORY_OTHER) {\n $this->query->andWhere(['LIKE', 'category', 'yii\\\\']);\n return;\n }\n\n $this->query->andWhere(['category' => $this->category]);\n }",
"public function checkIfCurrent() {\n if (isset($_GET['_category']) && $_GET['_category'] == $this->id) {\n $this->activate = true;\n } else {\n $this->activate = false;\n }\n }",
"public function setSubCategory($val)\n {\n $this->_propDict[\"subCategory\"] = $val;\n return $this;\n }",
"private function set_currFilterIsArea()\n {\n // 3.9.24, 120604, dwildt+\n if ( empty( $this->pObj->objCal->arr_area ) )\n {\n $this->bool_currFilterIsArea = false;\n return;\n }\n // 3.9.24, 120604, dwildt+\n // SWITCH current tableField is a filter with areas\n // Set class var $bool_currFilterIsArea\n switch ( in_array( $this->curr_tableField, array_keys( $this->pObj->objCal->arr_area ) ) )\n {\n case( true ):\n $this->bool_currFilterIsArea = true;\n break;\n case( false ):\n default:\n $this->bool_currFilterIsArea = false;\n break;\n }\n // Set class var $bool_currFilterIsArea\n // SWITCH current tableField is a filter with areas\n\n return;\n }",
"public function hasPriceCategoryFloor()\n {\n return $this->price_category_floor !== null;\n }",
"public function getMainCategoryTypeStringAttribute(){\n return __('default.other.main_category_types.'.$this->main_category_type);\n }",
"function is_product() {\n\t\treturn is_singular( array( 'product' ) );\n\t}",
"public function isMain()\n\t{\n\t\treturn empty($this->config->main) || 0 === strpos($this->reflection->getName(), $this->config->main);\n\t}",
"public function main_category()\n {\n return $this->belongsTo('App\\MainCategory');\n }",
"function nm_cmb_is_category_tyskysour( $cmb ) {\n $term = get_term($cmb->object_id);\n\n if (isset($term->slug) && ($term->slug === 'tyskysour-video')) {\n return true;\n }\n\n return false;\n}",
"public function setCmsCategoryId($val){\n $this->CmsCategoryId=$val;\n }",
"public function categoryCheck($SCitem)\n\t{\n\t\t$lower_cat = strtolower($SCitem->category);\n\t\t\t$catcheck = ucwords($lower_cat);\n\t\t\tif ( !has_term( $catcheck, 'product_cat' ) )\n\t\t\t{\n\t\t\t\twp_insert_term( $catcheck, 'product_cat', array(\n\t\t\t\t\t'description' => '',\n\t\t\t\t\t'parent' => 0,\n\t\t\t\t) );\n\t\t\t\n\t\t\t}\n\t\treturn $catcheck;\n\t}",
"public function render_products_category()\r\n {\r\n if ($_REQUEST['product_cat'] !== '') {\r\n wc_product_dropdown_categories(\r\n array(\r\n 'option_select_text' => __('Filter by category', 'woocommerce'),\r\n 'hide_empty' => 0,\r\n 'selected' => $_REQUEST['product_cat']\r\n )\r\n );\r\n } else {\r\n wc_product_dropdown_categories(\r\n array(\r\n 'option_select_text' => __('Filter by category', 'woocommerce'),\r\n 'hide_empty' => 0,\r\n )\r\n );\r\n }\r\n }",
"function ava_is_single_product_callback( $control ) {\n return is_singular( 'product' );\n}",
"public function setMain( Main $main ) {\n\n $this->main = $main;\n }",
"public function clearCategory()\n\t{\n\t\tProductInfo::updateByCriteria('active = ?', 'productId = ? and typeId = ? and entityName = ?', array(0, $this->getId(), ProductInfoType::ID_CATEGORY, ProductInfoType::ENTITY_NAME_CATEGORY));\n\t\treturn $this;\n\t}",
"function sensible_category() {\n wp_update_term(1, 'category', array(\n 'name' => 'News',\n 'slug' => 'news', \n 'description' => 'News'\n ));\n }",
"public function hasMain()\n\t{\n\t\treturn $this->OfParent($this->parent_type, $this->parent_id)->where('mainoffice', 1)->count() > 0;\n\t}",
"function IsProduct() {\r\n\t\treturn true;\r\n\t}",
"function custom_post_type_cat_filter($query) {\n if ( !is_admin() && $query->is_main_query() ) {\n if ($query->is_category()) {\n $query->set( 'post_type', array( 'articles', 'guides', 'conseils' ) );\n }\n }\n}",
"function editMainCategory()\n\t{ \n\t\t$id=$_GET['prodid'];\n\n\t\tif(((int)$id)>0)\n\t\t{\n\t\t\t$sql='select * from products_table where product_id='.$id;\n\t\t\t\n\t\t\t$obj=new Bin_Query();\n\t\t\t\n\t\t\t$obj->executeQuery($sql);\n\t\t\t\n\t\t\t$sqlid=\"SELECT category_id,category_parent_id FROM category_table where category_id in(select category_id from products_table where category_id='\".$obj->records[0]['category_id'].\"')\";\n\t\t\t\n\t\t\t$query=new Bin_Query();\n\t\t\t\n\t\t\t$query->executeQuery($sqlid);\n\t\t\t\n\t\t\t$sql1 = \"SELECT category_id,category_name FROM category_table where category_parent_id=0\";\n\t\t\n\t\t\t$query1 = new Bin_Query();\n\t\t\n\t\t\t$query1->executeQuery($sql1);\n\t\t\n\n\t\t\treturn Display_DManageProducts::displayCategory($query1->records,$query->records[0]['category_id']);\n\t\t\t\n\t\t// \t\t\treturn $category;\n\t }\n\t}",
"static function get_primary_category_id() {\n if (empty(self::$post->ID)) {\n return get_queried_object_id();\n }\n return self::$primary_category;\n }",
"public function addCategoryFilter($category)\n {\n if ($category instanceof Mage_Catalog_Model_Category) {\n $category = $category->getId();\n }\n if (!isset($this->_joinedFields['category'])) {\n $this->getSelect()->join(\n array('related_category' => $this->getTable('fvets_salesrep/category')),\n 'related_category.salesrep_id = main_table.id',\n array('position')\n );\n\n\t\t\tif (is_array($category)) {\n\t\t\t\t$this->getSelect()->where('related_category.category_id IN (?)', $category);\n\t\t\t} else {\n\t\t\t\t$this->getSelect()->where('related_category.category_id = ?', $category);\n\t\t\t}\n\n $this->_joinedFields['category'] = true;\n }\n return $this;\n }",
"public function stop_filter_if_not_main()\n {\n // phpcs:enable PSR1.Methods.CamelCapsMethodName.NotCamelCaps\n $this->plugin_is_main = is_singular();\n }",
"protected function setCurrentCategory($category)\n {\n $this->current_category = $category;\n }",
"protected function _initCategory() {\n $categoryId = (int) $this->getRequest()->getParam('id', false);\n $storeId = (int) $this->getRequest()->getParam('store');\n\n $category = Mage::getModel('catalog/category');\n $category->setStoreId($storeId);\n\n if ($categoryId) {\n $category->load($categoryId);\n if ($storeId) {\n $rootId = Mage::app()->getStore($storeId)->getRootCategoryId();\n if (!in_array($rootId, $category->getPathIds())) {\n $this->_redirect('*/*/', array('_current' => true, 'id' => null));\n return false;\n }\n }\n }\n\n Mage::register('category', $category);\n Mage::register('current_category', $category);\n\n return $category;\n }",
"protected function isCategory()\n {\n return is_null($this->request->task);\n }",
"public function testFilterSubCategoryNotEmpty() {\n $filters = array( //set up conditions for test\n 'filter_category_id' => 'true', //necessary to access filter_sub_category\n 'filter_sub_category' => 'true',\n );\n $products = $this->model_catalog_product->getProducts($filters); //run conditions on getProducts method\n $productsTotal = $this->model_catalog_product->getTotalProducts($filters);\n $this->assertTrue(sizeof($products) == $productsTotal, sizeof($products) . ' Retrieved from filter_sub_category=>\"true\", 0 products');\n }",
"public function updateCategoriesByParent()\n {\n global $config, $rlListingTypes;\n\n if (!$config['cache']) {\n return false;\n }\n\n if ($rlListingTypes->types) {\n foreach ($rlListingTypes->types as $key => $value) {\n $out[$value['Key']] = $this->getChildCat(array(0), $value);\n }\n $this->set('cache_categories_by_parent', $out);\n }\n }",
"private function is_parent()\n\t{\n\t\treturn is_null($this->category_id);\n\t}",
"function set_acl_category($category)\n {\n $this->acl_category = $category;\n foreach ($this->plugins as $name => $obj) {\n $this->plugins[$name]->set_acl_category($category);\n }\n }",
"public function testSetGetCurrentCategoryId()\n {\n $repository = $this->getManager()->getRepository('AcmeTestBundle:Category');\n\n $service = new CategoryService($repository);\n $service->setRepository($repository);\n\n $id = 'testid';\n\n $service->setCurrentCategoryId($id);\n $this->assertEquals($id, $service->getCurrentCategoryId());\n }",
"function setIsMain( $story_id ) {\n\n \t\t// Set 0 for all stories\n\n \t\t$this->db->update('spidypick', array( 'is_main_in_special' => 0 ));\n\n\n\n \t\t// Set 1 for clicked Story ID record\n\n \t\t$this->db->where( 'spidypickId', $story_id );\n\n \t\t$this->db->update('spidypick', array( 'is_main_in_special' => 1 ));\n\n\n\n \t\t$updated_status = $this->db->affected_rows();\n\n\n\n \t\tif( $updated_status )\n\n \t\t\treturn true;\n\n \t\telse\n\n \t\t\treturn false;\n\n \t}",
"protected function _initCategory()\r\n {\r\n $categoryId = (int)$this->getRequest()->getParam('id', FALSE);\r\n $storeId = (int)$this->getRequest()->getParam('store');\r\n\r\n $category = Mage::getModel('catalog/category');\r\n $category->setStoreId($storeId);\r\n\r\n if ($categoryId) {\r\n $category->load($categoryId);\r\n if ($storeId) {\r\n $rootId = Mage::app()->getStore($storeId)->getRootCategoryId();\r\n if (!in_array($rootId, $category->getPathIds())) {\r\n $this->_redirect('*/*/', array('_current' => TRUE, 'id' => NULL));\r\n return FALSE;\r\n }\r\n }\r\n }\r\n\r\n Mage::register('category', $category);\r\n Mage::register('current_category', $category);\r\n\r\n return $category;\r\n }",
"public function getCategory(){\r\n return Mage::registry('current_category');\r\n }",
"public function testCategoryProperty()\n {\n $newCategory = new Category();\n $newCategory->setTitle('category');\n\n $product = new Product();\n $product->setCategory($newCategory);\n\n $this->assertInstanceOf('Example\\Category', $product->getCategory(), 'The category is not instance of a Category class');\n }",
"public function isCategoryPage();",
"protected function _initCategory()\n {\n $category = $this->request->getPostValue('category');\n if (!$category) {\n return false;\n }\n\n try {\n $category = $this->categoryFactory->create()->loadByAttribute('url_key',$category);\n } catch (NoSuchEntityException $e) {\n return false;\n }\n\n $category->setStoreId($this->_storeManager->getStore()->getId());\n return $category;\n }",
"private function getClassCategory($root) {\n\t\treturn \"Science\";\n\t}",
"public function canRemoveCategoryBase()\n\t{\n\t\treturn $this->isEnabled() && (int)$this->getData('stripcategorybase') === 1;\n\t}",
"public function getCategory()\n {\n if (!$this->_category) {\n $this->_category = Mage::registry('current_category');\n }\n return $this->_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}",
"protected function setupCategories()\n {\n static $done;\n\n if (!empty($done)) {\n return;\n }\n\n $c = new Categories();\n $c->setContext('G_Access');\n $c->setIsActive(true);\n $c->save();\n\n $ci = new CategoriesI18n();\n $ci->setId($c->getId());\n $ci->setTitle('Girl Accessories');\n $ci->setLocale('da_DK');\n $ci->setContent('test 1.2.3');\n $ci->save();\n\n $c = new Categories();\n $c->setContext('LG_Access');\n $c->setIsActive(true);\n $c->save();\n\n $ci = new CategoriesI18n();\n $ci->setId($c->getId());\n $ci->setTitle('Little Girl Accessories');\n $ci->setLocale('da_DK');\n $ci->setContent('test 1.2.3');\n $ci->save();\n\n $done = true;\n }",
"public function isCategoryProductTabEnabled() {\n\t\t$value = Mage::getStoreConfig('clearandfizzy_essentials/categoryproducttab/isenabled');\n\t\treturn $value;\n\t}",
"public function categoryFilter()\n\t{\n\t\tif(!$this->Input->get('cat')) return false;\n\n\t\t$cat = mysql_real_escape_string(urldecode($this->Input->get('cat')));\n\n\t\treturn 'tl_news4ward_article.category=\"'.$cat.'\"';\n\t}",
"public function hasCategory(): bool;",
"public function setUpdateCategory($val)\n {\n $this->_propDict[\"updateCategory\"] = $val;\n return $this;\n }",
"public function setMainNet($var)\n {\n GPBUtil::checkString($var, True);\n $this->main_net = $var;\n\n return $this;\n }",
"function root_categorized_blog() {\n\tif ( false === ( $all_the_cool_cats = get_transient( 'root_categories' ) ) ) {\n\t\t// Create an array of all the categories that are attached to posts.\n\t\t$all_the_cool_cats = get_categories( array(\n\t\t\t'fields' => 'ids',\n\t\t\t'hide_empty' => 1,\n\t\t\t// We only need to know if there is more than one category.\n\t\t\t'number' => 2,\n\t\t) );\n\n\t\t// Count the number of categories that are attached to the posts.\n\t\t$all_the_cool_cats = count( $all_the_cool_cats );\n\n\t\tset_transient( 'root_categories', $all_the_cool_cats );\n\t}\n\n\tif ( $all_the_cool_cats > 1 ) {\n\t\t// This blog has more than 1 category so root_categorized_blog should return true.\n\t\treturn true;\n\t} else {\n\t\t// This blog has only 1 category so root_categorized_blog should return false.\n\t\treturn false;\n\t}\n}",
"public function getProductCategory(): ?ProductCategory\n {\n return $this->productCategory;\n }",
"public function __isMainTree()\n\t{\n\t\treturn $this->table_tree === 'tree';\n\t}",
"function set_category_status( $category_id )\n\t{\n\t\t$status = $this -> get_status( $category_id );\n\t\t$status = $status == 1 ? 0 : 1;\n\t\t$q = \"UPDATE title_dev_categories SET status = \".$status.\" WHERE category_id = \".$category_id;\n\t\t$r = $this -> db -> updateRecord( $q );\n\t\tif( $r )\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}",
"protected function _getProductCollection()\n {\n if ($this->_productCollection === null) {\n $layer = $this->getLayer();\n /* @var $layer \\Magento\\Catalog\\Model\\Layer */\n if ($this->getShowRootCategory()) {\n $this->setCategoryId($this->_storeManager->getStore()->getRootCategoryId());\n }\n\n // if this is a product view page\n if ($this->_coreRegistry->registry('product')) {\n // get collection of categories this product is associated with\n $categories = $this->_coreRegistry->registry('product')\n ->getCategoryCollection()->setPage(1, 1)\n ->load();\n // if the product is associated with any category\n if ($categories->count()) {\n // show products from this category\n $this->setCategoryId(current($categories->getIterator()));\n }\n }\n\n $origCategory = null;\n if ($this->getCategoryId()) {\n try {\n $category = $this->categoryRepository->get($this->getCategoryId());\n } catch (NoSuchEntityException $e) {\n $category = null;\n }\n\n if ($category) {\n $origCategory = $layer->getCurrentCategory();\n $layer->setCurrentCategory($category);\n }\n }\n $this->_productCollection = $layer->getProductCollection();\n $online_product = $this->getRequest()->getParam('online_product');\n if($online_product != '') {\n $this->_productCollection->addAttributeToFilter('online_product', $online_product);\n }\n\n $this->prepareSortableFieldsByCategory($layer->getCurrentCategory());\n\n if ($origCategory) {\n $layer->setCurrentCategory($origCategory);\n }\n }\n\n return $this->_productCollection;\n }",
"function getCategory()\r\n\t\t{\r\n\t\t\treturn $this->category;\r\n\t\t\t\r\n\t\t}",
"public function init()\n {\n add_action('woocommerce_before_single_product', array($this, 'show_product_categories'));\n }",
"public function setMainEntity($mainEntity) {\n $this->properties['mainEntity'] = $mainEntity;\n\n return $this;\n }",
"public function setSub_category($sub_category){\n $this->sub_category = $sub_category;\n return $this;\n }",
"public function setCategory($category)\n {\n if(strlen($category) <= 25 && strlen($category) > 0 && preg_match('#^[a-zA-Z- ]*$#', $category)) {\n $this->category = $category;\n }\n }",
"public function setMainProperty($MainProperty)\n {\n $this->__set(\"main_property\", $MainProperty);\n }",
"public function testSetCategorie() {\n\n $obj = new Materiels();\n\n $obj->setCategorie(\"categorie\");\n $this->assertEquals(\"categorie\", $obj->getCategorie());\n }",
"protected function isInMainNamespace(): bool\n { if ($this->wikiPageAction->getNs() !== 0) {\n $this->log->notice(\"SKIP : page n'est pas dans Main (ns 0)\\n\");\n $this->db->skipArticle($this->title);\n\n return false;\n }\n return true;\n }",
"function is_new_category_allowed($parent_category){\n\t$max_depth = Modules::Run('site_settings/get_max_category_depth');\n\t// get current category depth\n\t$current_depth = $this->get_category_depth($parent_category);\n\t// figure out if a new category is allowed\n\tif ($current_depth < $max_depth){\n\t\treturn TRUE;\n\t} else {\n\t\treturn FALSE;\n\t}\n\n}",
"public function getCurrentCategory()\n {\n return $this->category;\n }",
"function activate_wp_primary_category() {\n\trequire_once plugin_dir_path( __FILE__ ) . 'includes/class-wp-primary-category-activator.php';\n\tWP_Primary_Category_Activator::activate();\n}",
"public function testSetSousCategorie() {\n\n $obj = new Materiels();\n\n $obj->setSousCategorie(\"sousCategorie\");\n $this->assertEquals(\"sousCategorie\", $obj->getSousCategorie());\n }",
"public function setCategory($userId, $category)\n {\n $User = $this->find()->select(['id' => $userId])->first();\n if (!$User) {\n throw new \\InvalidArgumentException(\n \"Can't find user with id $userId.\",\n 1420807691\n );\n }\n\n if ($category === 'all') {\n //=if show all cateogries\n $active = -1;\n } elseif (is_array($category)) {\n //=if set a custom set of categories\n $active = 0;\n\n $availableCats = $this->Entries->Categories->find('list')->toArray(\n );\n $categories = array_intersect_key($category, $availableCats);\n if (count($categories) === 0) {\n throw new \\InvalidArgumentException();\n }\n $newCats = [];\n foreach ($categories as $cat => $v) {\n $newCats[$cat] = ($v === true || $v === 1 || $v === '1');\n }\n $User->set('user_category_custom', $newCats);\n } else {\n //=if set a single category\n $category = (int)$category;\n if (\n $category > 0 && $this->Entries->Categories->exists((int)$category)\n ) {\n $active = $category;\n } else {\n throw new \\InvalidArgumentException();\n }\n }\n\n $User->set('user_category_active', $active);\n $this->save($User);\n }",
"private function categoriesMoreThanOne()\n {\n\n // RETURN : method is called twice at least\n if ( $this->boolMoreThanOneCategory != null )\n {\n return $this->boolMoreThanOneCategory;\n }\n // RETURN : method is called twice at least\n\n $categories = $this->categoriesGet();\n\n if ( count( $categories[ 'labels' ] ) > 1 )\n {\n $this->boolMoreThanOneCategory = true;\n if ( $this->pObj->b_drs_map )\n {\n $prompt = 'There is more than one category.';\n t3lib_div :: devLog( '[INFO/BROWSERMAPS] ' . $prompt, $this->pObj->extKey, 0 );\n }\n }\n else\n {\n $this->boolMoreThanOneCategory = false;\n if ( $this->pObj->b_drs_map )\n {\n $prompt = 'There isn\\'t more than one category.';\n t3lib_div :: devLog( '[INFO/BROWSERMAPS] ' . $prompt, $this->pObj->extKey, 0 );\n }\n }\n return $this->boolMoreThanOneCategory;\n }",
"public function isCatSpec()\n {\n return $this->is_cs;\n }",
"public function render_selection( $data, $is_category = true ) {\n\t\t\tif ( 'default' === $data || ! $data ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$all = false !== strpos( $data, 'all' );\n\n\t\t\tob_start();\n\n\t\t\tif ( $is_category ) {\n\t\t\t\tif ( $all ) {\n\t\t\t\t\t?>\n\t\t\t\t\t\t<span class=\"woostify-multi-select-id\" data-id=\"all\">\n\t\t\t\t\t\t\t<?php esc_html_e( 'All Categories', 'woostify-pro' ); ?>\n\t\t\t\t\t\t\t<i class=\"woostify-multi-remove-id dashicons dashicons-no-alt\"></i>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t<?php\n\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t$args = array(\n\t\t\t\t\t'include' => explode( '|', $data ),\n\t\t\t\t\t'hide_empty' => true,\n\t\t\t\t);\n\n\t\t\t\t$selected_categories = get_terms( 'product_cat', $args );\n\n\t\t\t\tif ( ! empty( $selected_categories ) && ! is_wp_error( $selected_categories ) ) {\n\t\t\t\t\tforeach ( $selected_categories as $k ) {\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t<span class=\"woostify-multi-select-id\" data-id=\"<?php echo esc_attr( $k->term_id ); ?>\">\n\t\t\t\t\t\t\t<?php echo esc_html( $k->name ); ?>\n\t\t\t\t\t\t\t<i class=\"woostify-multi-remove-id dashicons dashicons-no-alt\"></i>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<?php\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ( $all ) {\n\t\t\t\t\t?>\n\t\t\t\t\t\t<span class=\"woostify-multi-select-id\" data-id=\"all\">\n\t\t\t\t\t\t\t<?php esc_html_e( 'All Products', 'woostify-pro' ); ?>\n\t\t\t\t\t\t\t<i class=\"woostify-multi-remove-id dashicons dashicons-no-alt\"></i>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t<?php\n\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t$args = array(\n\t\t\t\t\t'post_type' => 'product',\n\t\t\t\t\t'posts_per_page' => -1,\n\t\t\t\t\t'post__in' => explode( '|', $data ),\n\t\t\t\t\t'ignore_sticky_posts' => 1,\n\t\t\t\t\t'orderby' => 'rand',\n\t\t\t\t);\n\n\t\t\t\t$products = new WP_Query( $args );\n\n\t\t\t\tif ( $products->have_posts() ) {\n\t\t\t\t\twhile ( $products->have_posts() ) {\n\t\t\t\t\t\t$products->the_post();\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t<span class=\"woostify-multi-select-id\" data-id=\"<?php the_ID(); ?>\">\n\t\t\t\t\t\t\t<?php the_title(); ?>\n\t\t\t\t\t\t\t<i class=\"woostify-multi-remove-id dashicons dashicons-no-alt\"></i>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<?php\n\t\t\t\t\t}\n\n\t\t\t\t\twp_reset_postdata();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\techo ob_get_clean(); // phpcs:ignore\n\t\t}",
"public static function updateCategory($a_obj)\n\t{\n\t\tinclude_once('./Services/Calendar/classes/class.ilCalendarCategory.php');\n\t\tinclude_once('./Services/Calendar/classes/class.ilCalendarAppointmentColors.php');\n\t\t\n\t\tif($cat = ilCalendarCategory::_getInstanceByObjId($a_obj->getId()))\n\t\t{\n\t\t\t$cat->setTitle($a_obj->getTitle());\n\t\t\t$cat->update();\n\t\t}\n\t\treturn true;\n\t}",
"public function hasCategories()\n {\n return !empty($this->categories);\n }",
"public function setMainContact($mainContact)\n {\n $this->mainContact = $mainContact;\n\n return $this;\n }"
]
| [
"0.64136237",
"0.60241556",
"0.58424026",
"0.57317805",
"0.5693349",
"0.56320757",
"0.5606629",
"0.5484543",
"0.5401366",
"0.5387413",
"0.53640455",
"0.52363676",
"0.5207143",
"0.51895416",
"0.51403564",
"0.5136383",
"0.5123429",
"0.51069546",
"0.5100067",
"0.50968874",
"0.5093977",
"0.508766",
"0.50718904",
"0.5071371",
"0.507027",
"0.5062875",
"0.50567234",
"0.5054194",
"0.50199765",
"0.50094587",
"0.5005638",
"0.5001151",
"0.49632534",
"0.49571043",
"0.49556503",
"0.4946282",
"0.4944414",
"0.49361396",
"0.49250004",
"0.4921788",
"0.4918232",
"0.49164048",
"0.4897329",
"0.48965964",
"0.4892188",
"0.48895368",
"0.48893273",
"0.48888612",
"0.48796585",
"0.48706332",
"0.48636007",
"0.48563534",
"0.48516655",
"0.48473924",
"0.4827094",
"0.48217833",
"0.4812476",
"0.48054454",
"0.480137",
"0.4796176",
"0.47914082",
"0.47823188",
"0.47802028",
"0.4779179",
"0.47687468",
"0.47599652",
"0.4754087",
"0.4749334",
"0.4747469",
"0.47459057",
"0.4741871",
"0.47388658",
"0.4737317",
"0.47312894",
"0.47264558",
"0.47204682",
"0.47193038",
"0.47152337",
"0.47067887",
"0.47059205",
"0.4701354",
"0.46940935",
"0.46754754",
"0.46709555",
"0.4643009",
"0.4635366",
"0.46266916",
"0.46225622",
"0.46222803",
"0.46204427",
"0.46163782",
"0.46137354",
"0.46127424",
"0.46077964",
"0.4607328",
"0.4606165",
"0.46034983",
"0.45999032",
"0.45981324",
"0.45970532"
]
| 0.49265057 | 38 |
Get if product category is the main category. | public function getMain(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"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 }",
"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 isProduct()\n {\n return $this -> name == config('constant.categorytype.product_id');\n }",
"public function hasMain()\n\t{\n\t\treturn $this->OfParent($this->parent_type, $this->parent_id)->where('mainoffice', 1)->count() > 0;\n\t}",
"private function category() {\n if ($this->is_logged_in()){\n return true; //check if user had been logged in!!!\n }else{\n exit;\n }\n }",
"public function hasPriceCategory()\n {\n return $this->price_category !== null;\n }",
"public function hasCategory()\n {\n return $this->category !== null;\n }",
"function is_product_category( $term = '' ) {\n\t\treturn is_tax( 'product_cat', $term );\n\t}",
"public function hasCategory(): bool;",
"public function isMain()\n {\n if (!$this->getUser()->getMain()) {\n return false;\n }\n return $this->getUser()->getMain()->getId() == $this->getId();\n }",
"public function getCategoryId()\n {\n if ($category = Mage::registry('current_category')) {\n return $category->getId();\n }\n return false;\n }",
"public function isMain()\n\t{\n\t\treturn empty($this->config->main) || 0 === strpos($this->reflection->getName(), $this->config->main);\n\t}",
"function empty_category($a) {\n\t\treturn !empty($a['CategoriesProduct']);\n\t}",
"function accouk_is_photography_page() {\n if( is_category('photography') || \n (isset($GLOBALS['main_category']) && \n $GLOBALS['main_category']['slug'] === \"photography\")\n ) {\n return true;\n }\n\n return false;\n}",
"public function isCategoryPage();",
"public function hasCategories()\n {\n return !empty($this->categories);\n }",
"public function hasCategories()\n {\n return !$this->categories->isEmpty();\n }",
"public function getProdCategory()\n {\n return $this->prod_category;\n }",
"public function hasPriceCategoryFloor()\n {\n return $this->price_category_floor !== null;\n }",
"private function is_parent()\n\t{\n\t\treturn is_null($this->category_id);\n\t}",
"protected function isCategory()\n {\n return is_null($this->request->task);\n }",
"function is_product() {\n\t\treturn is_singular( array( 'product' ) );\n\t}",
"public function isBusiness()\n {\n return $this -> name == config('constant.categorytype.business_id');\n }",
"public function isCategory($category): bool;",
"public function is_category($category = '')\n {\n }",
"public function hasCategories() {\n return $this->_has(16);\n }",
"function in_comic_category() {\n\tglobal $post, $category_tree;\n\t\n\t$comic_categories = array();\n\tforeach ($category_tree as $node) {\n\t\t$comic_categories[] = end(explode(\"/\", $node));\n\t}\n\treturn (count(array_intersect($comic_categories, wp_get_post_categories($post->ID))) > 0);\n}",
"public function isMainPost()\n\t{\n\t\t$topic = ForumTopic::with(['messages' => function($q) {\n\t\t\t$q->orderBy('created_at','asc');\n\t\t}])->find($this->topic_id);\n\n\t\tif($topic->messages[0]->id == $this->id) return true;\n\n\t\treturn false;\n\n\t}",
"public function isMain() {\n\t\treturn $this->_page == null;\n\t}",
"public function isCategoryProductTabEnabled() {\n\t\t$value = Mage::getStoreConfig('clearandfizzy_essentials/categoryproducttab/isenabled');\n\t\treturn $value;\n\t}",
"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 isCatSpec()\n {\n return $this->is_cs;\n }",
"public function getCurrentCategory()\n {\n return $this->category;\n }",
"static function get_primary_category_id() {\n if (empty(self::$post->ID)) {\n return get_queried_object_id();\n }\n return self::$primary_category;\n }",
"function nm_cmb_is_category_tyskysour( $cmb ) {\n $term = get_term($cmb->object_id);\n\n if (isset($term->slug) && ($term->slug === 'tyskysour-video')) {\n return true;\n }\n\n return false;\n}",
"public function get_category()\n {\n return $this->primary_category();\n }",
"public function getCategory()\n {\n if (!$this->_category) {\n $this->_category = Mage::registry('current_category');\n }\n return $this->_category;\n }",
"private function isFirstLevel($category)\n {\n return $category->getData('level') == 2 ? true : false;\n }",
"public function setCategory() {\n /**\n *\n * @todo make a separate config file for the default category ?!\n */\n $defaultCategory = 1;\n $category = Category::find()->all();\n $newCat = $this->strProcessing($this->category);\n $k = NULL;\n if (!empty($newCat)) {\n foreach ($category as $value) {\n $cat = explode(',', $value['synonyms']);\n $cat = array_map(array($this, 'strProcessing'), $cat);\n $k = array_search($newCat, $cat);\n if ($k !== NULL && $k !== FALSE) {\n $k = $value['id'];\n break;\n }\n }\n }\n if ($k) {\n $this->category = $k;\n } else {\n $this->category = $defaultCategory;\n }\n return TRUE;\n }",
"public function isChild()\n {\n if (false === $this->parent_category) {\n return false;\n }\n\n return true;\n\n }",
"public function isAssignedToCategory()\n {\n $_currentProduct = $this->getProduct();\n $_categoryIds = $_currentProduct->getCategoryIds();\n if($_categoryIds) {\n return true;\n } else {\n return false;\n }\n }",
"function is_carton() {\n\treturn ( is_shop() || is_product_category() || is_product_tag() || is_product() ) ? true : false;\n}",
"public function isCategory( $name ) {\n $query = $this->db->query( \"SELECT DISTINCT category_id FROM \" . DB_PREFIX . \"category_description WHERE name = '\" . $name . \"'\" );\n\n return $query->row;\n }",
"public function isMainImage($image)\n {\n $product = $this->getProduct();\n return $product->getImage() == $image->getFile();\n }",
"public function getContentCategory()\n {\n if ($this->_oContentCat === null) {\n // setting default status ..\n $this->_oContentCat = false;\n if (($oContent = $this->getContent()) && $oContent->oxcontents__oxtype->value == 2) {\n $this->_oContentCat = $oContent;\n }\n }\n\n return $this->_oContentCat;\n }",
"private function _hasSubCategories($category){\n $cat = Mage::getModel('catalog/category')->load($category->getId());\n $subcats = $cat->getChildren();\n if (empty($subcats)){\n return false;\n } else {\n return true;\n }\n }",
"public function __isMainTree()\n\t{\n\t\treturn $this->table_tree === 'tree';\n\t}",
"function is_outdoors() {\n $outdoors = false;\n global $post;\n $current_id = ( is_single() ) ? $post->ID : get_query_var('cat');\n $outdoor_parent = get_category_by_slug( 'outdoors' );\n if ( is_category() && ( $current_id == $outdoor_parent->term_id || cat_is_ancestor_of( $outdoor_parent->term_id, $current_id ) ) ) {\n $outdoors = true;\n } else if ( is_single() ) {\n $categories = wp_get_post_categories( $current_id );\n foreach ( $categories as $category ) {\n if ( $category == $outdoor_parent->term_id ) {\n $outdoors = true;\n break;\n }\n }\n }\n return $outdoors;\n}",
"public function GetCategory()\r\n {\r\n return AppHelper::GetCategory($this->Core);\r\n }",
"public function getCurrentCategory()\n {\n return $this->registry->registry('current_category');\n }",
"public function hasMain(){\n return $this->_has(2);\n }",
"function root_categorized_blog() {\n\tif ( false === ( $all_the_cool_cats = get_transient( 'root_categories' ) ) ) {\n\t\t// Create an array of all the categories that are attached to posts.\n\t\t$all_the_cool_cats = get_categories( array(\n\t\t\t'fields' => 'ids',\n\t\t\t'hide_empty' => 1,\n\t\t\t// We only need to know if there is more than one category.\n\t\t\t'number' => 2,\n\t\t) );\n\n\t\t// Count the number of categories that are attached to the posts.\n\t\t$all_the_cool_cats = count( $all_the_cool_cats );\n\n\t\tset_transient( 'root_categories', $all_the_cool_cats );\n\t}\n\n\tif ( $all_the_cool_cats > 1 ) {\n\t\t// This blog has more than 1 category so root_categorized_blog should return true.\n\t\treturn true;\n\t} else {\n\t\t// This blog has only 1 category so root_categorized_blog should return false.\n\t\treturn false;\n\t}\n}",
"public function main_category(Request $request,$main_category)\n\t{\n\t\t$main = Main_category::all();//main category items\n $cart = Cart::content();\n $product = Product::all();//aids in getting cart items to avoid errors\n\t\t$categories = ProdCategory::paginate(4);\n\t\t\n\n\t\tif ($request->has('subcategory')) {\n\t\t\t$catname = ProdSubCategory::find($request->subcategory);\n\t\t\t$products = Product::where('subcategory', '=' , $request->subcategory)->get();//as specified by the user\n\n\t\t}else{\n\t\t\t$products = Product::where('main_category', '=' , $main_category)->get();//as specified by the user\n\t\t\t$catname = Main_category::find($main_category);\n\t\t}\n\n\t\treturn view('shopping.main_category')->withProducts($products)->withCategories($categories)->withCart($cart)->withMain($main)->withProduct($product)->withCatname($catname);\n\t}",
"public function is_primary_sidebar_active(): bool\n\t{\n\t\t$this->get_option = get_option('qreate-options');\n\n\n\t\tif (class_exists('ReduxFramework') && $this->get_option != '') {\n\t\t\tif (is_search()) {\n\t\t\t\t$option = $this->get_option['search_page'];\n\t\t\t} else {\n\t\t\t\t$option = is_single() ? $this->get_option['blog_single_page_setting'] : $this->get_option['blog_setting'];\n\t\t\t}\n\t\t\tif (in_array($option, [4, 5])) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn (bool)is_active_sidebar(static::PRIMARY_SIDEBAR_SLUG);\n\t}",
"public function getCategory(){\r\n return Mage::registry('current_category');\r\n }",
"public function getAllMainCategories(){\n\t\t$query = $this->db->query('\n\t\t\tselect c.id, c.name\n\t\t\tfrom food_category c\n\t\t\twhere\n\t\t\t\tmain = 1\n\t\t\torder by\n\t\t\t\tname asc');\n\t\treturn $query->result();\n\t}",
"public function categoryCheck($SCitem)\n\t{\n\t\t$lower_cat = strtolower($SCitem->category);\n\t\t\t$catcheck = ucwords($lower_cat);\n\t\t\tif ( !has_term( $catcheck, 'product_cat' ) )\n\t\t\t{\n\t\t\t\twp_insert_term( $catcheck, 'product_cat', array(\n\t\t\t\t\t'description' => '',\n\t\t\t\t\t'parent' => 0,\n\t\t\t\t) );\n\t\t\t\n\t\t\t}\n\t\treturn $catcheck;\n\t}",
"public function getCurrentCat()\n {\n if (empty($this->multifilterSession->getTopCategory()) && empty($this->multifilterSession->getCategories())) {\n $currentCat = $this->coreRegistry->registry('current_category');\n return $currentCat->getId();\n } else {\n return $this->multifilterSession->getTopCategory();\n }\n }",
"function is_main_blog()\n {\n }",
"function VariationOrProductIsInCart() {\r\n\t\treturn ($this->owner->IsInCart() || $this->VariationIsInCart());\r\n\t}",
"public function getActiveCategoryId() {\n\t\tif ($this->request->hasArgument(LinkUtility::CATEGORY)) {\n\t\t\t$categoryId = $this->request->getArgument(LinkUtility::CATEGORY);\n\t\t\tif (ctype_digit($categoryId)) {\n\t\t\t\treturn $categoryId;\n\t\t\t}\n\t\t}\n\t\treturn FALSE;\n\t}",
"public function getCategoryStatus()\n\t{\n\t\treturn $this->category_status;\n\t}",
"function IsProduct() {\r\n\t\treturn true;\r\n\t}",
"function tep_has_category_subcategories($category_id) {\n $child_category_query = tep_db_query(\"select count(*) as count from \" . TABLE_CATEGORIES . \" where parent_id = '\" . (int)$category_id . \"'\");\n $child_category = tep_db_fetch_array($child_category_query);\n\n if ($child_category['count'] > 0) {\n return true;\n } else {\n return false;\n }\n }",
"public function getActiveCategory()\n {\n return $this->_activeCategory;\n }",
"public function getObjectCategory()\n {\n return $this->objectCategory;\n }",
"private function recipeHasCategory($recipe) {\n // Meanwhile, we assume any recipe has any category.\n return true;\n }",
"public function canRemoveCategoryBase()\n\t{\n\t\treturn $this->isEnabled() && (int)$this->getData('stripcategorybase') === 1;\n\t}",
"public function getPostPrimaryCategory(Fishpig_Wordpress_Model_Post $post)\n\t{\n\t\tif (!$this->isEnabled()) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ($categoryId = $post->getMetaValue('_yoast_wpseo_primary_category')) {\n\t\t\t$category = Mage::getModel('wordpress/term')->setTaxonomy('category')->load($categoryId);\n\t\t\t\n\t\t\tif ($category->getId()) {\n\t\t\t\treturn $category;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn false;\n\t}",
"protected function isInMainNamespace(): bool\n { if ($this->wikiPageAction->getNs() !== 0) {\n $this->log->notice(\"SKIP : page n'est pas dans Main (ns 0)\\n\");\n $this->db->skipArticle($this->title);\n\n return false;\n }\n return true;\n }",
"function gravit_categorized_blog() {\r\r\n\tif ( false === ( $all_the_cool_cats = get_transient( 'all_the_cool_cats' ) ) ) {\r\r\n\t\t// Create an array of all the categories that are attached to posts.\r\r\n\t\t$all_the_cool_cats = get_categories( array(\r\r\n\t\t\t'hide_empty' => 1,\r\r\n\t\t) );\r\r\n\r\r\n\t\t// Count the number of categories that are attached to the posts.\r\r\n\t\t$all_the_cool_cats = count( $all_the_cool_cats );\r\r\n\r\r\n\t\tset_transient( 'all_the_cool_cats', $all_the_cool_cats );\r\r\n\t}\r\r\n\r\r\n\tif ( '1' != $all_the_cool_cats ) {\r\r\n\t\t// This blog has more than 1 category so gravit_categorized_blog should return true.\r\r\n\t\treturn true;\r\r\n\t} else {\r\r\n\t\t// This blog has only 1 category so gravit_categorized_blog should return false.\r\r\n\t\treturn false;\r\r\n\t}\r\r\n}",
"public function testFilterSubCategoryNotEmptyExistingCategoryId() {\n $allCategories = $this->model_catalog_product->getAllCategories(); //run conditions on getProducts method\n $filters = array( //set up conditions for test\n 'filter_category_id' => $allCategories[0]['category_id'], //necessary to access filter_sub_category\n 'filter_sub_category' => 'true',\n );\n $products = $this->model_catalog_product->getProducts($filters); //run conditions on getProducts method\n $productsTotal = $this->model_catalog_product->getTotalProducts($filters);\n $this->assertTrue(sizeof($products) == $productsTotal, sizeof($products) . ' Retrieved from filter_sub_category=>\"true\", filter_category_id=>27, 1 products');\n }",
"public function category() {\n\t\treturn $this->get_category();\n\t}",
"function smart_foundation_categorized_blog() {\n\tif ( false === ( $all_the_cool_cats = get_transient( 'smart_foundation_categories' ) ) ) {\n\t\t// Create an array of all the categories that are attached to posts.\n\t\t$all_the_cool_cats = get_categories( array(\n\t\t\t'fields' => 'ids',\n\t\t\t'hide_empty' => 1,\n\n\t\t\t// We only need to know if there is more than one category.\n\t\t\t'number' => 2,\n\t\t) );\n\n\t\t// Count the number of categories that are attached to the posts.\n\t\t$all_the_cool_cats = count( $all_the_cool_cats );\n\n\t\tset_transient( 'smart_foundation_categories', $all_the_cool_cats );\n\t}\n\n\tif ( $all_the_cool_cats > 1 ) {\n\t\t// This blog has more than 1 category so smart_foundation_categorized_blog should return true.\n\t\treturn true;\n\t} else {\n\t\t// This blog has only 1 category so smart_foundation_categorized_blog should return false.\n\t\treturn false;\n\t}\n}",
"function ppo_categorized_blog() {\n if (false === ( $all_the_cool_cats = get_transient('ppo_category_count') )) {\n // Create an array of all the categories that are attached to posts\n $all_the_cool_cats = get_categories(array(\n 'hide_empty' => 1,\n ));\n\n // Count the number of categories that are attached to the posts\n $all_the_cool_cats = count($all_the_cool_cats);\n\n set_transient('ppo_category_count', $all_the_cool_cats);\n }\n\n if (1 !== (int) $all_the_cool_cats) {\n // This blog has more than 1 category so ppo_categorized_blog should return true\n return true;\n } else {\n // This blog has only 1 category so ppo_categorized_blog should return false\n return false;\n }\n}",
"function my_separate_category() {\n return 1;\n }",
"function client_portal_categorized_blog() {\n\n\t$category_count = get_transient( 'client_portal_categories' );\n\n\tif ( false === $category_count ) {\n\n\t\t$category_count_query = get_categories(\n\t\t\tarray(\n\t\t\t\t'fields' => 'count',\n\t\t\t)\n\t\t);\n\n\t\t$category_count = (int) $category_count_query[0];\n\n\t\tset_transient( 'client_portal_categories', $category_count );\n\t}\n\n\treturn $category_count > 1;\n}",
"protected function getFirstCategory() {\r\n\t\treturn $this->newsItem->getFirstCategory()->getTitle();\r\n\t}",
"private function categoriesMoreThanOne()\n {\n\n // RETURN : method is called twice at least\n if ( $this->boolMoreThanOneCategory != null )\n {\n return $this->boolMoreThanOneCategory;\n }\n // RETURN : method is called twice at least\n\n $categories = $this->categoriesGet();\n\n if ( count( $categories[ 'labels' ] ) > 1 )\n {\n $this->boolMoreThanOneCategory = true;\n if ( $this->pObj->b_drs_map )\n {\n $prompt = 'There is more than one category.';\n t3lib_div :: devLog( '[INFO/BROWSERMAPS] ' . $prompt, $this->pObj->extKey, 0 );\n }\n }\n else\n {\n $this->boolMoreThanOneCategory = false;\n if ( $this->pObj->b_drs_map )\n {\n $prompt = 'There isn\\'t more than one category.';\n t3lib_div :: devLog( '[INFO/BROWSERMAPS] ' . $prompt, $this->pObj->extKey, 0 );\n }\n }\n return $this->boolMoreThanOneCategory;\n }",
"function getCategory()\r\n\t\t{\r\n\t\t\treturn $this->category;\r\n\t\t\t\r\n\t\t}",
"function is_child_category($thecategory ){\n\t$params = array('type' => 'post',\n 'child_of' => $thecategory,\n 'hierarchical' => 0, );\n\t$cats = get_categories($params);\n\n\tforeach ($cats as $cat) {\n\t\tif ( is_category($cat->cat_ID) ){\n\t\t\treturn true;\n\t\t}\n \t} // end for children\n\treturn false;\n}",
"public function get_category_type()\n {\n return C__CMDB__CATEGORY__TYPE_GLOBAL;\n }",
"public function get_category_type()\n {\n return C__CMDB__CATEGORY__TYPE_GLOBAL;\n }",
"public function get_category_type()\n {\n return C__CMDB__CATEGORY__TYPE_GLOBAL;\n }",
"public function get_category_type()\n {\n return C__CMDB__CATEGORY__TYPE_GLOBAL;\n }",
"private function hasCategoryLinks() {\n\t\tif ( !$this->getSkinOption( self::OPTION_CATEGORIES ) ) {\n\t\t\treturn false;\n\t\t}\n\t\t$categoryLinks = $this->getOutput()->getCategoryLinks();\n\n\t\tif ( !count( $categoryLinks ) ) {\n\t\t\treturn false;\n\t\t}\n\t\treturn !empty( $categoryLinks['normal'] ) || !empty( $categoryLinks['hidden'] );\n\t}",
"function is_movie_category( $term = '' ) {\n return is_tax( 'movie_cat', $term );\n }",
"function nameExistInParent(){\n\n\t\t$cat = $this->add('xepan\\commerce\\Model_Category');\n\t\t$cat->addCondition('parent_category_id',$this['parent_category_id']?:null);\n\t\t$cat->addCondition('name',$this['name']);\n\t\t$cat->addCondition('id','<>',$this->id);\n\t\t$cat->tryLoadAny();\n\n\t\treturn $cat->loaded();\n\n\t\treturn $this->ref('parent_category_id')->loaded()? \n\t\t$this->ref('parent_category_id')->ref('SubCategories')\n\t\t\t\t->addCondition('name',$this['name'])\n\t\t\t\t->addCondition('id','<>',$this->id)\n\t\t\t\t->tryLoadAny()->loaded(): false;\n\t}",
"public static function getCategory()\n {\n return self::$category;\n }",
"function bt_categorized_blog() {\n\tif ( false === ( $all_the_cool_cats = get_transient( 'all_the_cool_cats' ) ) ) {\n\t\t// Create an array of all the categories that are attached to posts\n\t\t$all_the_cool_cats = get_categories( array(\n\t\t\t'hide_empty' => 1,\n\t\t) );\n\n\t\t// Count the number of categories that are attached to the posts\n\t\t$all_the_cool_cats = count( $all_the_cool_cats );\n\n\t\tset_transient( 'all_the_cool_cats', $all_the_cool_cats );\n\t}\n\n\tif ( '1' != $all_the_cool_cats ) {\n\t\t// This blog has more than 1 category so _s_categorized_blog should return true\n\t\treturn true;\n\t} else {\n\t\t// This blog has only 1 category so _s_categorized_blog should return false\n\t\treturn false;\n\t}\n}",
"function emc_get_subcategory_object( $post_id = null, $parent = null ) {\r\n\r\n\t// Missing arguments? Let's bail\r\n\tif ( ! isset( $post_id, $parent ) ) return false;\r\n\r\n\t// get ID of the parent category\r\n\t$term = get_category_by_slug( $parent );\r\n\t$parent_id = $term->term_id;\r\n\r\n\t// get all categories for the current post\r\n\t$cats = get_the_category( $post_id );\r\n\tforeach ($cats as $cat) {\r\n\t\tif ( $parent_id == $cat->category_parent ) {\r\n\t\t\treturn $cat;\r\n\t\t}\r\n\t}\r\n\r\n\treturn false;\r\n\r\n}",
"public function getMainCategoryTypeStringAttribute(){\n return __('default.other.main_category_types.'.$this->main_category_type);\n }",
"public function getSub_category(){\n return $this->sub_category;\n }",
"function L_catHasParent($catid) {\n\t\t\n\t\t$category = get_category($catid);\n\t\tif ($category->category_parent > 0) {\n\t\t\t\n\t\t\treturn true;\n\t\t\t\n\t\t}\n\t\t\n\t\treturn false;\n\t\n\t}",
"function wprt_is_woocommerce_archive_product() {\n\tif ( ! class_exists( 'woocommerce' ) ) {\n\t\treturn false;\n\t} elseif ( is_product_category() || is_product_tag() ) {\n\t\treturn true;\n\t}\n}",
"function delivery_categorized_blog() {\n\tif ( false === ( $all_the_cool_cats = get_transient( 'delivery_categories' ) ) ) {\n\t\t// Create an array of all the categories that are attached to posts.\n\t\t$all_the_cool_cats = get_categories( array(\n\t\t\t'fields' => 'ids',\n\t\t\t'hide_empty' => 1,\n\n\t\t\t// We only need to know if there is more than one category.\n\t\t\t'number' => 2,\n\t\t) );\n\n\t\t// Count the number of categories that are attached to the posts.\n\t\t$all_the_cool_cats = count( $all_the_cool_cats );\n\n\t\tset_transient( 'delivery_categories', $all_the_cool_cats );\n\t}\n\n\tif ( $all_the_cool_cats > 1 ) {\n\t\t// This blog has more than 1 category so delivery_categorized_blog should return true.\n\t\treturn true;\n\t} else {\n\t\t// This blog has only 1 category so delivery_categorized_blog should return false.\n\t\treturn false;\n\t}\n}",
"function is_video_category( $term = '' ) {\n return is_tax( 'video_cat', $term );\n }",
"function getCategory() \n {\n return $this->instance->getCategory();\n }",
"protected function parentCategoryTC()\n {\n return PostCategory::parentCategories()->firstOrFail();\n }",
"private function isShopsBaseCategoryPage($categoryId)\n {\n $defaultShopCategoryId = Shopware()->Shop()->getCategory()->getId();\n\n $queryParamsWhiteList = ['controller', 'action', 'sCategory', 'sViewport', 'rewriteUrl', 'module'];\n $queryParamsNames = array_keys($this->Request()->getParams());\n $paramsDiff = array_diff($queryParamsNames, $queryParamsWhiteList);\n\n return $defaultShopCategoryId === (int) $categoryId && !$paramsDiff;\n }",
"public function get_module_category($subcategory = false)\n {\n $categories = $this->primary_category(true)->parents(true);\n\n if (count($categories)) {\n if ($subcategory) {\n return $categories[0];\n }\n\n return isset($categories[1]) ? $categories[1] : $categories[0];\n }\n }"
]
| [
"0.6592724",
"0.65523666",
"0.6505777",
"0.6369122",
"0.6329485",
"0.6328035",
"0.63167804",
"0.6203908",
"0.6077178",
"0.6076909",
"0.60764563",
"0.60122204",
"0.599796",
"0.59851027",
"0.59340173",
"0.5933636",
"0.59217095",
"0.5902125",
"0.59019816",
"0.5860664",
"0.5851846",
"0.5843499",
"0.58052593",
"0.5804185",
"0.57862276",
"0.57545584",
"0.5744799",
"0.57338476",
"0.5727534",
"0.57114476",
"0.57069504",
"0.5706743",
"0.5691827",
"0.5689743",
"0.56759197",
"0.56419355",
"0.5627376",
"0.56242347",
"0.560605",
"0.5598852",
"0.5580636",
"0.5572312",
"0.55716616",
"0.5570679",
"0.55549276",
"0.5552431",
"0.5548152",
"0.5546578",
"0.55372953",
"0.55341953",
"0.5529531",
"0.5525092",
"0.55190134",
"0.55156964",
"0.55134374",
"0.551242",
"0.55009896",
"0.55001986",
"0.54925495",
"0.5481742",
"0.5479377",
"0.5466041",
"0.54600906",
"0.545615",
"0.5452463",
"0.5447158",
"0.542688",
"0.540317",
"0.53934366",
"0.53817064",
"0.53732866",
"0.5370736",
"0.53704697",
"0.53667283",
"0.53645325",
"0.5347241",
"0.53399765",
"0.53398687",
"0.53313345",
"0.53272486",
"0.5313036",
"0.53087497",
"0.53087497",
"0.53087497",
"0.53087497",
"0.5295275",
"0.52948624",
"0.52907705",
"0.5287599",
"0.5283571",
"0.52813494",
"0.52802646",
"0.52749354",
"0.527171",
"0.52716666",
"0.5269272",
"0.5267931",
"0.5264186",
"0.5263509",
"0.52567166",
"0.52503437"
]
| 0.0 | -1 |
no revisions for the sandbox page | function add_revision( $page_id, $title, $body, $user )
{
if( strtolower($title) == 'sandbox' ) {
return;
}
$this->db->set('page_id', $page_id );
$this->db->set('title', $title );
$this->db->set('body', $body );
$this->db->set('user', $user );
$this->db->set('created_on', 'NOW()', false );
$this->db->insert( $this->table_name_revisions );
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function isRevisionable();",
"public function hasRevisionsAhead() {\n return $this->_has(2);\n }",
"function wp_revisions_to_keep($post)\n {\n }",
"private function noRevisionSpecified(array $urlParams = array())\n {\n if (isset($urlParams['visibleRevisions'])) {\n // revision was visible\n // if it is empty, we don't want the revisionData rendered out\n return (empty($urlParams['visibleRevisions']) && $this->noRevisionsSpecified($urlParams));\n } else {\n return $this->noRevisionsSpecified($urlParams);\n }\n }",
"public function rejectedits() {\n\t\t\tglobal $db, $user;\n\t\t\t$query = \"delete from content where parent = '\".$this->guid.\"' and revision_id=1\";\n\t\t\t//print \"$query<br>\\n\";\n\t\t\tif ($db->query($query)) {\n\n\t\t\t\t// We have rejected edits to the page\n\t\t\t\taddHistory($user->id, \"\", $this->guid, \"Changes rejected\", $this->template_type.\"s\");\n\n\t\t\t\t// Update this page in the history table also\n\t\t\t\t$query = \"UPDATE history \n\t\t\t\t\tSET completed_action='CHANGES REJECTED', completed_date=now(), completed_by=\".$user->id.\" \n\t\t\t\t\tWHERE action='publish' \n\t\t\t\t\tAND completed_action is null\n\t\t\t\t\tAND (info='Page saved' OR info='Panel saved')\n\t\t\t\t\tAND guid='\".$this->guid.\"'\";\n\t\t\t\tif (!$db->query($query)) {\n\t\t\t\t\t//print \"failed($query)<br>\\n\";\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t\n\t\t\t}\n\t\t\treturn false;\n\t\t}",
"public function testRevisionHistory() {\n $entity = EnhancedEntity::create([\n 'name' => 'rev 1',\n 'type' => 'default',\n ]);\n $entity->save();\n\n $revision = clone $entity;\n $revision->name->value = 'rev 2';\n $revision->setNewRevision(TRUE);\n $revision->isDefaultRevision(FALSE);\n $revision->save();\n\n /** @var \\Symfony\\Component\\HttpKernel\\HttpKernelInterface $http_kernel */\n $http_kernel = $this->container->get('http_kernel');\n $request = Request::create($revision->toUrl('version-history')->toString());\n $response = $http_kernel->handle($request);\n $this->assertEquals(403, $response->getStatusCode());\n\n $role_admin = Role::create(['id' => 'test_role_admin']);\n $role_admin->grantPermission('administer entity_test_enhanced');\n $role_admin->save();\n\n $role = Role::create(['id' => 'test_role']);\n $role->grantPermission('view all entity_test_enhanced revisions');\n $role->grantPermission('administer entity_test_enhanced');\n $role->save();\n\n $user_admin = User::create([\n 'name' => 'Test administrator',\n ]);\n $user_admin->addRole($role_admin->id());\n $user_admin->save();\n $this->container->get('account_switcher')->switchTo($user_admin);\n\n $request = Request::create($revision->toUrl('version-history')->toString());\n $response = $http_kernel->handle($request);\n $this->assertEquals(200, $response->getStatusCode());\n\n $user = User::create([\n 'name' => 'Test editor',\n ]);\n $user->addRole($role->id());\n $user->save();\n $this->container->get('account_switcher')->switchTo($user);\n\n $request = Request::create($revision->toUrl('version-history')->toString());\n $response = $http_kernel->handle($request);\n $this->assertEquals(200, $response->getStatusCode());\n\n // This ensures that the default revision is still the first revision.\n $this->assertTrue(strpos($response->getContent(), 'entity_test_enhanced/1/revisions/2/view') !== FALSE);\n $this->assertTrue(strpos($response->getContent(), 'entity_test_enhanced/1') !== FALSE);\n\n // Publish a new revision.\n $revision = clone $entity;\n $revision->name->value = 'rev 3';\n $revision->setNewRevision(TRUE);\n $revision->isDefaultRevision(TRUE);\n $revision->save();\n\n $request = Request::create($revision->toUrl('version-history')->toString());\n $response = $http_kernel->handle($request);\n $this->assertEquals(200, $response->getStatusCode());\n\n // The first revision row should now include a revert link.\n $this->assertTrue(strpos($response->getContent(), 'entity_test_enhanced/1/revisions/1/revert') !== FALSE);\n }",
"private static function getEmpty()\n\t{\n\t\t$t_data = array();\n\t\t$t_data['rev_id'] = 0;\n\t\t$t_data['par_id'] = 0;\n\t\t$t_data['timestamp'] = '';\n\t\t$t_data['user'] = '';\n\t\t$t_data['userid'] = 0;\n\t\t$t_data['comment'] = '';\n\t\t$t_data['page_title'] = '';\n\t\t$t_data['diff'] = '';\n\t\t$t_data['lev'] = 0;\n\t\t$t_data['class'] = '';\n\t\t$t_data['rand'] = rand();\n\t\treturn new WikiRevision($t_data);\n\t}",
"function testRevisionHistory() \r\n\t{\r\n\t\t$dbh = $this->dbh;\r\n\t\t\r\n\t\t$obj = new CAntObject($dbh, \"customer\", null, $this->user);\r\n\t\t$obj->setValue(\"name\", \"My First Revision\");\r\n\t\t$oid = $obj->save();\r\n\r\n\t\t$revid = $dbh->GetValue($dbh->Query(\"select id from object_revisions where object_id='$oid' and object_type_id='\".$obj->object_type_id.\"'\"));\r\n\t\t$this->assertTrue($revid > 0 && $revid !=null);\r\n\t\t//$this->assertEquals($dbh->GetValue($dbh->Query(\"select field_value from object_recurrence where id='\".$rp->id.\"'\")), 0);\r\n\t}",
"public function testBookWithPendingRevisions() {\n // Create two books.\n $book_1_nodes = $this->createBook(['moderation_state[0][state]' => 'published']);\n $book_1 = $this->book;\n\n $this->createBook(['moderation_state[0][state]' => 'published']);\n $book_2 = $this->book;\n\n $this->drupalLogin($this->bookAuthor);\n\n // Check that book pages display along with the correct outlines.\n $this->book = $book_1;\n $this->checkBookNode($book_1, [$book_1_nodes[0], $book_1_nodes[3], $book_1_nodes[4]], FALSE, FALSE, $book_1_nodes[0], []);\n $this->checkBookNode($book_1_nodes[0], [$book_1_nodes[1], $book_1_nodes[2]], $book_1, $book_1, $book_1_nodes[1], [$book_1]);\n\n // Create a new book page without actually attaching it to a book and create\n // a draft.\n $edit = [\n 'title[0][value]' => $this->randomString(),\n 'moderation_state[0][state]' => 'published',\n ];\n $this->drupalGet('node/add/book');\n $this->submitForm($edit, 'Save');\n $node = $this->drupalGetNodeByTitle($edit['title[0][value]']);\n $this->assertNotEmpty($node);\n\n $edit = [\n 'moderation_state[0][state]' => 'draft',\n ];\n $this->drupalGet('node/' . $node->id() . '/edit');\n $this->submitForm($edit, 'Save');\n $this->assertSession()->pageTextNotContains('You can only change the book outline for the published version of this content.');\n\n // Create a book draft with no changes, then publish it.\n $edit = [\n 'moderation_state[0][state]' => 'draft',\n ];\n $this->drupalGet('node/' . $book_1->id() . '/edit');\n $this->submitForm($edit, 'Save');\n $this->assertSession()->pageTextNotContains('You can only change the book outline for the published version of this content.');\n $edit = [\n 'moderation_state[0][state]' => 'published',\n ];\n $this->drupalGet('node/' . $book_1->id() . '/edit');\n $this->submitForm($edit, 'Save');\n\n // Try to move Node 2 to a different parent.\n $edit = [\n 'book[pid]' => $book_1_nodes[3]->id(),\n 'moderation_state[0][state]' => 'draft',\n ];\n $this->drupalGet('node/' . $book_1_nodes[1]->id() . '/edit');\n $this->submitForm($edit, 'Save');\n\n $this->assertSession()->pageTextContains('You can only change the book outline for the published version of this content.');\n\n // Check that the book outline did not change.\n $this->book = $book_1;\n $this->checkBookNode($book_1, [$book_1_nodes[0], $book_1_nodes[3], $book_1_nodes[4]], FALSE, FALSE, $book_1_nodes[0], []);\n $this->checkBookNode($book_1_nodes[0], [$book_1_nodes[1], $book_1_nodes[2]], $book_1, $book_1, $book_1_nodes[1], [$book_1]);\n\n // Try to move Node 2 to a different book.\n $edit = [\n 'book[bid]' => $book_2->id(),\n 'moderation_state[0][state]' => 'draft',\n ];\n $this->drupalGet('node/' . $book_1_nodes[1]->id() . '/edit');\n $this->submitForm($edit, 'Save');\n\n $this->assertSession()->pageTextContains('You can only change the book outline for the published version of this content.');\n\n // Check that the book outline did not change.\n $this->book = $book_1;\n $this->checkBookNode($book_1, [$book_1_nodes[0], $book_1_nodes[3], $book_1_nodes[4]], FALSE, FALSE, $book_1_nodes[0], []);\n $this->checkBookNode($book_1_nodes[0], [$book_1_nodes[1], $book_1_nodes[2]], $book_1, $book_1, $book_1_nodes[1], [$book_1]);\n\n // Try to change the weight of Node 2.\n $edit = [\n 'book[weight]' => 2,\n 'moderation_state[0][state]' => 'draft',\n ];\n $this->drupalGet('node/' . $book_1_nodes[1]->id() . '/edit');\n $this->submitForm($edit, 'Save');\n\n $this->assertSession()->pageTextContains('You can only change the book outline for the published version of this content.');\n\n // Check that the book outline did not change.\n $this->book = $book_1;\n $this->checkBookNode($book_1, [$book_1_nodes[0], $book_1_nodes[3], $book_1_nodes[4]], FALSE, FALSE, $book_1_nodes[0], []);\n $this->checkBookNode($book_1_nodes[0], [$book_1_nodes[1], $book_1_nodes[2]], $book_1, $book_1, $book_1_nodes[1], [$book_1]);\n\n // Save a new draft revision for the node without any changes and check that\n // the error message is not displayed.\n $edit = [\n 'moderation_state[0][state]' => 'draft',\n ];\n $this->drupalGet('node/' . $book_1_nodes[1]->id() . '/edit');\n $this->submitForm($edit, 'Save');\n\n $this->assertSession()->pageTextNotContains('You can only change the book outline for the published version of this content.');\n }",
"public function pageIsNotLockedForEditors() {}",
"function wp_revisions_enabled($post)\n {\n }",
"protected function getUpdatablePages() {}",
"public static function getNewRevisionDefault() {\n return FALSE;\n }",
"public function testDontIndexNewPrivatePage()\n {\n\n // Add a private page.\n $page = $this->_simplePage(false);\n\n // Should not add a Solr document.\n $this->_assertNotRecordInSolr($page);\n\n }",
"function wp_is_post_revision($post)\n {\n }",
"public function limit_post_revisions() {\n\t}",
"function wp_save_post_revision_check_for_changes($return, $last_revision, $post)\n {\n }",
"public function testGetRevision()\n {\n }",
"public function draftPage()\n\t{\n\t\treturn $this->hasOne(Page::class, 'revision_id')->where('version', Page::STATE_DRAFT);\n\t}",
"public function testEmptyHistory()\n {\n $response = $this->get('/api/user/history/999');\n $response->assertStatus(200);\n }",
"public function kiwip_action_delete_revisions_adm_msg(){\n\t\tif(current_user_can('manage_options')){\n\t \techo '<div id=\"message\" class=\"updated fade\"><p><strong>All posts revisions have been deleted correctly.</strong></p></div>';\n\t }\n\t}",
"public static function newRevisionsAllowed() {\n // only allow revisions when you logged in\n if(self::$_identity) {\n return self::$_newRevisionsAllowed;\n } else {\n return false;\n }\n }",
"public function isRevisionsEnabled()\n {\n return (bool) $this->enable_revisions;\n }",
"public function getRevision() {}",
"public function test_ouwiki_pages_and_versions() {\n global $DB;\n $this->resetAfterTest(true);\n $user = $this->get_new_user();\n $course = $this->get_new_course();\n\n // Setup a wiki to use.\n $ouwiki = $this->get_new_ouwiki($course->id, OUWIKI_SUBWIKIS_SINGLE);\n $cm = get_coursemodule_from_instance('ouwiki', $ouwiki->id);\n $this->assertNotEmpty($cm);\n $context = context_module::instance($cm->id);\n $groupid = 0;\n $this->setUser($user);\n $subwiki = ouwiki_get_subwiki($course, $ouwiki, $cm, $context, $groupid, $user->id, true);\n\n // Create the start page.\n $startpagename = 'startpage';\n $formdata = null;\n $startpageversion = ouwiki_get_current_page($subwiki, $startpagename, OUWIKI_GETPAGE_CREATE);\n $verid = ouwiki_save_new_version($course, $cm, $ouwiki, $subwiki, $startpagename, $startpagename,\n -1, -1, -1, null, $formdata);\n\n // Create a page.\n $pagename1 = 'testpage1';\n $content1 = 'testcontent';\n ouwiki_create_new_page($course, $cm, $ouwiki, $subwiki, $startpagename, $pagename1, $content1, $formdata);\n\n // Try get that page.\n $pageversion = ouwiki_get_current_page($subwiki, $pagename1);\n $this->assertEquals($pageversion->title, $pagename1);\n // Test fullname info from ouwiki_get_current_page.\n $this->assertEquals(fullname($user), fullname($pageversion));\n\n // Make some more versions.\n $content2 = 'testcontent2';\n $content3 = 'testcontent3';\n ouwiki_save_new_version($course, $cm, $ouwiki, $subwiki, $pagename1, $content2, -1, -1, -1, null, $formdata);\n $verid = ouwiki_save_new_version($course, $cm, $ouwiki, $subwiki, $pagename1, $content3, -1, -1, -1, null, $formdata);\n $versions = $DB->get_records('ouwiki_versions');\n $versionids = array();\n foreach ($versions as $version) {\n $versionids[] = $version->id;\n }\n $this->assertEquals(max($versionids), $verid);\n $pageversion = ouwiki_get_current_page($subwiki, $pagename1);\n $this->assertEquals($content3, $pageversion->xhtml);\n\n // Get the history.\n $history = ouwiki_get_page_history($pageversion->pageid, true);\n $this->assertEquals('array', gettype($history));\n\n // Last version should match $content3.\n $version = array_shift($history);\n $this->assertEquals(max($versionids), $version->versionid);\n $this->assertEquals($user->id, $version->id);\n $this->assertEquals(1, $version->wordcount);\n $this->assertEquals($pageversion->previousversionid, $version->previousversionid);\n $this->assertNull($version->importversionid);\n\n // Add another page.\n $pagename2 = 'testpage2';\n $content4 = 'testcontent4';\n\n // We don't get anything returned for this.\n ouwiki_create_new_page($course, $cm, $ouwiki, $subwiki, $startpagename, $pagename2, $content4, $formdata);\n\n // Test recent pages.\n $changes = ouwiki_get_subwiki_recentpages($subwiki->id);\n $this->assertEquals('array', gettype($changes));\n $this->assertEquals(fullname($user), fullname(current($changes)));\n // First page should be startpage.\n $this->assertEquals(end($changes)->title, $startpagename);\n // 3rd page should be pagename2.\n $this->assertEquals(reset($changes)->title, $pagename2);\n\n $testfullname = fullname(current($changes));\n $this->assertEquals(fullname($user), $testfullname);\n\n // Test recent wiki changes.\n $changes = ouwiki_get_subwiki_recentchanges($subwiki->id);\n $testfullname = fullname(reset($changes));\n $this->assertEquals(fullname($user), $testfullname);\n $this->assertEquals(reset($changes)->title, $startpagename);\n // Sixth change should be to testpage2 - when we created testpage2.\n $this->assertEquals(next($changes)->title, $pagename2);\n // Seventh change shouldbe start page again - when we linked to testpage2 to startpage.\n $this->assertEquals(end($changes)->title, $startpagename);\n\n }",
"public function getRevisioned() ;",
"private function noRevisionsSpecified(array $urlParams = array())\n {\n return (!isset($urlParams['revisionNumber']) && !isset($urlParams['revisionNumbers']));\n }",
"private function assertPageNotReloaded(): void {\n $this->assertSession()->pageTextContains($this->pageReloadMarker);\n }",
"public function has_published_pages()\n {\n }",
"public function pageIdCanBeDeterminedWhileEditingARegularRecord() {}",
"function wp_ajax_get_revision_diffs()\n {\n }",
"function test_save_post_wont_save_if_nonce_not_present() {\n\n\t\tunset( $_POST['dep_revisions_box_nonce'] );\n\n\t\t$actual = $this->dep_page_versions_controller->save_post( $this->mock_post_id );\n\n\t\t$this->assertTrue( $actual === $this->mock_post_id, \"Dep\\PageVersions\\Controller->save_post( $this->mock_post_id ) does not fail if nonce field is not present.\" );\n\n\t}",
"public function pageIdCanBeDeterminedWhileEditingAPageRecord() {}",
"function testRevisionGenerationForEntity() {\n\t\t$entity_id = wl_create_post( 'Original content', 'entity-1', uniqid( 'entity', true ), 'publish', 'entity' );\n\t\t$revisions = wp_get_post_revisions( $entity_id );\n\n\t\t// Just a simple sanity check.\n\t\t$this->assertCount( 1 , $revisions );\n\n\t\t// Check that a revision is generated on change.\n\t\t$post_data = array(\n\t\t 'ID' => $entity_id,\n\t\t 'post_content' => 'This is the updated content.',\n\t\t);\n\n\t\twp_update_post( $post_data );\n\t\t$revisions = wp_get_post_revisions( $entity_id );\n\t\t$this->assertCount( 2 , $revisions );\n\t}",
"public function testEmptyEmbargoExpiry()\n {\n $page = $this->objFromFixture(SiteTree::class, 'emptyEmbargoExpiry');\n $page->Content = 'Content to go live';\n\n $live = $this->getLive($page);\n\n $this->assertEmpty($live->Content);\n $this->assertEquals(0, $page->PublishJobID);\n $this->assertEquals(0, $page->UnPublishJobID);\n\n $page = $this->finishWorkflow($page);\n\n $live = $this->getLive($page);\n\n $this->assertNotEmpty($live->Content);\n $this->assertEquals(0, $page->PublishJobID);\n $this->assertEquals(0, $page->UnPublishJobID);\n }",
"public function page_test() {\n\n\t\tprint_r($this->permissions->check(\"can_view_admin\"));\n\t}",
"public function testRenderUpdateNoBranch()\n {\n $this->withSession($this->adminSession)\n ->call('GET', '/branch/edit', ['ID' => 2]);\n \n $this->assertResponseStatus(404);\n }",
"public function deleteContentAndCopyDraftPage() {}",
"public function get_incomplete_revisions()\n\t{\n\t\t$revisions = array();\n\t\t$time_limit = time() - (3600 * 4);\n\n\t\t// Select revisions that were stopped at one of the submission steps\n\t\t$sql = 'SELECT revision_id, attachment_id\n\t\t\tFROM ' . TITANIA_REVISIONS_TABLE . '\n\t\t\tWHERE revision_submitted = 0\n\t\t\t\tAND revision_time < ' . $time_limit; // Unlikely to happen, but set a time limit to ensure that we don't remove revisions that may be in the process of being submitted.\n\t\t$result = $this->db->sql_query_limit($sql, 25);\n\n\t\twhile ($row = $this->db->sql_fetchrow($result))\n\t\t{\n\t\t\t$revisions[(int) $row['revision_id']] = (int) $row['attachment_id'];\n\t\t}\n\t\t$this->db->sql_freeresult($result);\n\n\t\treturn $revisions;\n\t}",
"private function shouldRenderRevisionData(array $urlParams = array())\n {\n if (isset($urlParams['barebones']) &&\n (\n $this->revisionIsOnlyVisible($urlParams) ||\n $this->revisionsAreVisible($urlParams) ||\n $this->noRevisionSpecified($urlParams)\n ) && !$this->isRestore($urlParams)) {\n return false;\n } else {\n return true;\n }\n }",
"public function testPendingRevision() {\n $assert_session = $this->assertSession();\n $page = $this->getSession()->getPage();\n\n $this->drupalLogin($this->drupalCreateUser([\n 'configure any layout',\n 'administer node display',\n ]));\n\n $field_ui_prefix = 'admin/structure/types/manage/bundle_with_section_field';\n // Enable overrides.\n $this->drupalGet(\"{$field_ui_prefix}/display/default\");\n $this->submitForm(['layout[enabled]' => TRUE], 'Save');\n $this->drupalGet(\"{$field_ui_prefix}/display/default\");\n $this->submitForm(['layout[allow_custom]' => TRUE], 'Save');\n\n $storage = $this->container->get('entity_type.manager')->getStorage('node');\n $node = $storage->load(1);\n // Create a pending revision.\n $pending_revision = $storage->createRevision($node, FALSE);\n $pending_revision->set('title', 'The pending title of the first node');\n $pending_revision->save();\n\n // The original node title is available when viewing the node, but the\n // pending title is visible within the Layout Builder UI.\n $this->drupalGet('node/1');\n $assert_session->pageTextContains('The first node title');\n $page->clickLink('Layout');\n $assert_session->pageTextNotContains('The first node title');\n $assert_session->pageTextContains('The pending title of the first node');\n }",
"public function kiwip_action_delete_revisions(){\n\t\tglobal $wpdb;\n\n\t\t$this->delete_revision = $wpdb->query('DELETE FROM wp_posts WHERE post_type = \"revision\";');\n\n\t\tadd_action('admin_notices', array(&$this, 'kiwip_action_delete_revisions_adm_msg'));\n\t\t$updated_option = array('delete_revisions' => 0);\n\t\tupdate_option('Kiwip', $updated_option);\n\t\t$this->options['delete_revisions'] == 0;\n\t}",
"function valid_action() {\n # of pages that are about that page (i.e. not admin\n # or recent changes)\n global $ACT;\n if($ACT == 'show') { return true; }\n if($ACT == 'edit') { return true; }\n if($ACT == 'revisions') { return true; }\n return false;\n }",
"function _wp_block_editor_posts_page_notice()\n {\n }",
"public function wp_sql_clean_revision() {\n\n\t\t$bdd = Bdd::getInstance();\n\n\t\t$sql = $bdd->dbh->prepare('DELETE FROM '.$this->_table_prefix.'posts WHERE post_type = \"revision\"');\n\t\t\n\t\treturn $sql->execute();\n\t}",
"public function testNothingModified()\n {\n $check = $this->_cs->checkEntitiesChanged(rand(0, 9999), array(self::ENTITY_NAME));\n $this->assertTrue($check);\n }",
"protected function is_edit_page() {\n\t\treturn false;\n\t}",
"public function testRenderUpdateNoID()\n {\n $this->withSession($this->adminSession)\n ->call('GET', '/branch/edit');\n \n $this->assertResponseStatus(404);\n }",
"public function isRevisionPublished(Mage_Core_Model_Abstract $object)\n\t{\n\t\t$select = $this->_getReadAdapter()->select();\n\t\t$select->from($this->_pageTable, 'published_revision_id')\n\t\t\t->where('page_id = ?', $object->getPageId());\n\t\t$result = $this->_getReadAdapter()->fetchOne($select);\n\t\treturn $result === $object->getId();\n\t}",
"function updateFirstLevelPageVersions() {\n try {\n if(DB::executeFirstCell(\"SELECT COUNT(*) AS count FROM \" . TABLE_PREFIX . \"modules WHERE name='notebooks'\")) {\n try {\n $pages_table = TABLE_PREFIX . 'notebook_pages';\n $page_versions_table = TABLE_PREFIX . 'notebook_page_versions';\n $content_backup_table = TABLE_PREFIX . 'content_backup';\n\n DB::beginWork('Updating first level notebook page versions @ ' . __CLASS__);\n\n $rows = DB::execute(\"SELECT $page_versions_table.id, $page_versions_table.body FROM $pages_table, $page_versions_table WHERE $pages_table.id = $page_versions_table.notebook_page_id AND $pages_table.parent_type = 'Notebook'\");\n if($rows) {\n foreach($rows as $row) {\n DB::execute(\"INSERT INTO $content_backup_table (parent_type, parent_id, body) VALUES ('NotebookPageVersion', ?, ?)\", $row['id'], $row['body']);\n DB::execute(\"UPDATE $page_versions_table SET body = ? WHERE id = '$row[id]'\", $this->updateHtmlContent($row['body']));\n } // foreach\n } // if\n\n DB::commit('First level notebook page versions updated @ ' . __CLASS__);\n } catch(Exception $e) {\n DB::rollback('Failed to update first level notebook page versions @ ' . __CLASS__);\n return $e->getMessage();\n } // try\n } // if\n } catch(Exception $e) {\n return $e->getMessage();\n } // try\n\n return true;\n }",
"function test_restrict_deletion_of_Home_page(){}",
"function test_editor_and_externaledits(){\n global $ID,$conf;\n $ID = 'wiki:syntax';\n $filename = $conf['datadir'].'/wiki/syntax.txt';\n $rev = filemtime($filename);\n\n $info = $this->_get_expected_pageinfo();\n $info['id'] = 'wiki:syntax';\n $info['namespace'] = 'wiki';\n $info['filepath'] = $filename;\n $info['exists'] = true;\n $info['lastmod'] = $rev;\n $info['currentrev'] = $rev;\n $info['meta'] = p_get_metadata($ID); // need $INFO set correctly for addLogEntry()\n\n global $INFO;\n $INFO = $info;\n\n // add an editor for the current version of $ID\n addLogEntry($rev, $ID);\n\n $info['meta'] = p_get_metadata($ID);\n $info['editor'] = $_SERVER['REMOTE_USER'];\n $info['user'] = $_SERVER['REMOTE_USER'];\n $info['ip'] = $_SERVER['REMOTE_ADDR'];\n $info['sum'] = '';\n\n // with an editor ...\n $this->assertEquals($info, pageinfo());\n\n // clear the meta['last_change'] value, pageinfo should restore it\n p_set_metadata($ID,array('last_change' => false));\n\n $this->assertEquals($info, pageinfo());\n $this->assertEquals($info['meta']['last_change'], p_get_metadata($ID,'last_change'));\n\n // fake an external edit, pageinfo should clear the last change from meta data\n // and not return any editor data\n $now = time()+10;\n touch($filename,$now);\n\n $info['lastmod'] = $now;\n $info['currentrev'] = $now;\n $info['meta']['last_change'] = false;\n $info['ip'] = null;\n $info['user'] = null;\n $info['sum'] = null;\n $info['editor'] = null;\n\n $this->assertEquals($info, pageinfo());\n $this->assertEquals($info['meta'], p_get_metadata($ID)); // check metadata has been updated correctly\n }",
"function test_get_revisions_gets_the_posts_revisions() {\n\n\t\t$post = get_post( $this->mock_post_id );\n\n\t\t$post->post_content = 'update 1';\n\n\t\twp_update_post( $post );\n\n\t\t$post->post_content = 'update 2';\n\n\t\twp_update_post( $post );\n\n\t\t$post->post_content = 'update 3';\n\n\t\twp_update_post( $post );\n\n\t\t$revisions = wp_get_post_revisions( $this->mock_post_id );\n\n\t\t$revisions_data = array();\n\n\t\t$last_month = date( 'm', strtotime( 'last day of -1 month' ) );\n\t\t$this_year = date( 'Y', strtotime( 'last day of this month' ) );\n\t\t$next_month = date( 'm', strtotime( 'last day of +1 month' ) );\n\n\t\t$revisions_counter = 0;\n\n\t\t$first_revision = false;\n\n\t\tforeach ( $revisions as $key => $revision ) {\n\n\t\t\t$month = ( $revisions_counter >= 1 ) ? $last_month : $next_month;\n\n\t\t\tif ( 1 == $revisions_counter ) {\n\n\t\t\t\t$second_revision = $revision;\n\n\t\t\t}\n\n\t\t\t$revisions_data[ $revision->ID ] = array(\n\n\t\t\t\t'month' => $month,\n\t\t\t\t'day' => $revisions_counter + 1 . '',\n\t\t\t\t'year' => $this_year,\n\t\t\t\t'hour' => '12',\n\t\t\t\t'minute' => '30',\n\n\t\t\t);\n\n\t\t\t$revisions_counter++;\n\n\t\t}\n\n\t\tupdate_post_meta( $this->mock_post_id, 'dep_revisions_data', json_encode( $revisions_data ) );\n\n\t\t$args = array(\n\t\t\t'p' => $this->mock_post_id,\n\t\t\t'post_type' => 'page',\n\t\t);\n\n\t\t$query = new \\WP_Query( $args );\n\n\t\tif ( $query->have_posts() ) {\n\n\t\t\twhile ( $query->have_posts() ) {\n\n\t\t\t\t$query->the_post();\n\n\t\t\t\t$actual = $this->dep_page_versions_controller->get_revision( $post->post_content );\n\n\t\t\t}\n\t\t}\n\n\t\t$this->assertEquals( $second_revision->post_content, $actual );\n\n\t}",
"public function getRevisions(): array;",
"public function testRestrictPage()\n {\n $this->assertTrue(true);\n }",
"public function pagesOnly() {}",
"public function createContentAndCopyDraftPage() {}",
"public function DefaultPageVersion($observer)\n {\n $collection = Mage::getModel('sc_cmspagesversions/page')->getCollection();\n $collection->addFieldToFilter('page_id',array(\n \"eq\" => $observer->getObject()->getPageId()\n ));\n if(count($collection) == 0)\n {\n $this->SavePageVersion($observer);\n }\n }",
"public function isDraft();",
"public function isDraft();",
"public function isDraft();",
"public function page_administration_does_not_exist() {\n $menuxpath = \"//section[contains(@class,'block_settings')]//div[@id='settingsnav']\";\n $this->ensure_element_does_not_exist($menuxpath, 'xpath_element');\n }",
"public function testOfficeDetailsPageIsValidWithoutCrawls() {\n // but at least in our dev/test environments, no crawls have run yet, so the DB should be empty.\n $this->request('GET', 'offices/detail/49015');\n $this->assertResponseCode(200);\n }",
"public function getRevision() ;",
"function testDontGettingAnyDocumentIfNegativeRecursive() {\n\t\t$result = $this->page->find('first', array('conditions' => array('Page.id' => 2), 'contain' => false));\n\t\t$this->assertTrue(empty($result['Document']));\n\t}",
"protected function getGitRevision() {}",
"public static function get_draft_pages() {\n\t\t$pages = wp_cache_get( 'snow-monkey-category-content-draft-pages' );\n\t\tif ( is_array( $pages ) ) {\n\t\t\treturn $pages;\n\t\t}\n\n\t\t$pages = get_pages(\n\t\t\t[\n\t\t\t\t'parent' => 0,\n\t\t\t\t'post_status' => 'draft',\n\t\t\t]\n\t\t);\n\n\t\twp_cache_set( 'snow-monkey-category-content-draft-pages', $pages );\n\t\treturn $pages;\n\t}",
"public function checkContentHash() {}",
"public function testGetViewingHistoryWithNoVideo()\n\t{\n\t\t$this->be(User::first());\n\t\t$response = $this->action('GET', 'ApiViewingHistoryController@getIndex');\n\t\t\n\t\t$this->assertInstanceOf('Illuminate\\Http\\JsonResponse', $response);\n\t\t$this->assertResponseStatus(404);\n\t}",
"public function testGuestNotAccessSettingsPage()\n\t{\n\t\t$this->open('setting');\n\t\t$this->assertTextNotPresent('Settings');\n\t}",
"public function addRevision()\n {\n $this->check_sess($this->session->user_logged);\n\t\t$this->load->view('head');\n\t\t$this->load->view('sclerk_sidebar');\n\n\t\t$this->load->view('search_officer', $this->response);\n\t\t$this->load->view('footer');\n }",
"function content_moderation_post_update_set_views_filter_latest_translation_affected_revision(&$sandbox) {\n $original_plugin_name = 'latest_revision';\n $new_plugin_name = 'latest_translation_affected_revision';\n\n // Check that views is installed and the moderated content view exists.\n if (\\Drupal::moduleHandler()->moduleExists('views') && $view = View::load('moderated_content')) {\n $display = &$view->getDisplay('default');\n if (!isset($display['display_options']['filters'][$original_plugin_name])) {\n return;\n }\n\n $translation_affected_filter = [\n 'id' => $new_plugin_name,\n 'field' => $new_plugin_name,\n 'plugin_id' => $new_plugin_name,\n ] + $display['display_options']['filters'][$original_plugin_name];\n\n $display['display_options']['filters'] = [$new_plugin_name => $translation_affected_filter] + $display['display_options']['filters'];\n unset($display['display_options']['filters'][$original_plugin_name]);\n\n $view->save();\n }\n}",
"public function testIndexForGuest(): void\n {\n // Request\n $response = $this->get('api/cms/v1/widget-article');\n\n // Check response status\n $response->assertStatus(401);\n }",
"public function testNonAdminUserCannotViewThePageIndex()\n {\n $response = $this\n ->actingAs($this->user)\n ->get('/admin/blog/pages');\n\n $response->assertStatus(403);\n }",
"public function valid(): bool\n {\n return current($this->revs) !== false;\n }",
"public function testChangesIndex()\n {\n $response = $this->get('admin/changes');\n $response->assertStatus(200);\n }",
"function test_add_hooks_adds_get_revision_to_the_the_content_filter() {\n\n\t\t$actual = $this->dep_page_versions_controller->add_hooks();\n\n\t\t$has_get_revision = \\WPHelper::check_hook_for_callback( 'the_content', 'Dep\\PageVersions\\Controller', 'get_revision' );\n\n\t\t$this->assertTrue( $has_get_revision, \"Dep\\PageVersions\\Controller->add_hooks() does not add get_revision() to 'the_post' hook\" );\n\n\t}",
"public function banearDeLasRevisiones() {\n\t\tglobal $wpdb;\n\t\tif ($this->getUser()->isAdmin()) {\n\t\t\tthrow new \\Exception('No puedes banear a un admin', 402);\n\t\t}\n\t\t$isBan = $wpdb->get_var($wpdb->prepare('select count(*)\n\t\t\t\tfrom wp_revisiones_ban\n\t\t\t\twhere user_id = %d\n\t\t\t\tand status = %d;', $this->user_id, self::BANEADO));\n\t\tif (! $isBan) {\n\t\t\treturn $wpdb->query($wpdb->prepare('\n\t\t\t\tINSERT wp_revisiones_ban (user_id, editor_id, created_at, updated_at)\n\t\t\t\tVALUES (%d, %d, null, null);', $this->user_id, $this->editor_id));\n\t\t}\n\t\treturn $wpdb->query($wpdb->prepare('\n\t\t\t\tUPDATE wp_revisiones_ban\n\t\t\t\tSET user_id = %d, editor_id = %;', $this->user_id, $this->editor_id));\n\t}",
"public function testEditGetWithoutBlock() {\n\t\tRolesControllerTest::login($this);\n\n\t\t$this->testAction(\n\t\t\t'/rss_readers/rss_readers/edit/183',\n\t\t\tarray(\n\t\t\t\t'method' => 'get',\n\t\t\t\t'return' => 'contents'\n\t\t\t)\n\t\t);\n\t\t$this->assertTextEquals('edit', $this->controller->view);\n\n\t\tAuthGeneralControllerTest::logout($this);\n\t}",
"public function realPageCacheContent() {}",
"function test_basic_nonexistentpage(){\n global $ID,$conf;\n $ID = 'wiki:start';\n\n $info = $this->_get_expected_pageinfo();\n $info['id'] = 'wiki:start';\n $info['namespace'] = 'wiki';\n $info['filepath'] = $conf['datadir'].'/wiki/start.txt';\n\n $this->assertEquals($info, pageinfo());\n }",
"public function getUnpublished()\n {\n $userManager = new UserManager;\n $infoUser = $userManager->getInfo($_SESSION['id_user']);\n if ($_SESSION['id_user'] == $infoUser['id'] and $infoUser['rank_id'] == 1) {\n if (isset($_GET['id']) && $_GET['id'] > 0) {\n $commentManager = new CommentManager;\n $unpublished = $commentManager->unpublished($_GET['id']);\n header('Location: administration');\n } else {\n throw new Exception('Impossible de trouvé le commentaire');\n }\n } else {\n throw new Exception('Vous n\\'êtes pas autorisé à faire cela');\n }\n }",
"public function test_undocumented_hook() {\n\n\t\t$this->assertHookHasDocs(\n\t\t\t'undocumented_hook'\n\t\t\t, array(\n\t\t\t\t'description' => '',\n\t\t\t)\n\t\t);\n\t}",
"public function deleteContentAndCopyLivePage() {}",
"public function changeContentSortingAndCopyDraftPage() {}",
"public function contentIsNotLockedForEditors() {}",
"public function PullTesst()\n {\n $this->assertTrue(true);\n }",
"function testDontGettingAnyDocumentIfNoContain() {\n\t\t$result = $this->page->find('first', array('conditions' => array('Page.id' => 2), 'contain' => false));\n\t\t$this->assertTrue(empty($result['Document']));\n\t}",
"public function testItCanNotAccessPagesPendingCurationPage()\n {\n $this->logInAsUser(['curator' => 0]);\n\n $this->get('/curation/new')->assertResponseStatus(401);\n }",
"public function testNothingModifiedLastRunSet()\n {\n $this->_cs->updateLastRun($this->_name);\n sleep(2);\n\n $check = $this->_cs->checkEntitiesChanged($this->_name, array(self::ENTITY_NAME));\n $this->assertFalse($check);\n }",
"function test_rev(){\n global $ID,$conf,$REV;\n\n $ID = 'wiki:syntax';\n $filename = $conf['datadir'].'/wiki/syntax.txt';\n $rev = filemtime($filename);\n $REV = $rev - 100;\n\n $info = $this->_get_expected_pageinfo();\n $info['id'] = 'wiki:syntax';\n $info['namespace'] = 'wiki';\n $info['meta'] = p_get_metadata($ID);\n $info['rev'] = $REV;\n $info['currentrev'] = $rev;\n $info['filepath'] = str_replace('pages','attic',substr($filename,0,-3).$REV.'.txt.gz');\n\n $this->assertEquals($info, pageinfo());\n $this->assertEquals($rev-100, $REV);\n }",
"public function testItCanNotAccessSuggestedEditsPendingCurationPage()\n {\n $this->logInAsUser(['curator' => 0]);\n\n $this->get('/curation/edits')->assertResponseStatus(401);\n }",
"function test_save_post_wont_save_if_nonce_not_correct_nonce() {\n\n\t\t$_POST['dep_revisions_box_nonce'] = wp_create_nonce( 'wrong-nonce' );\n\n\t\t$actual = $this->dep_page_versions_controller->save_post( $this->mock_post_id );\n\n\t\t$this->assertTrue( $actual === $this->mock_post_id, \"Dep\\PageVersions\\Controller->save_post( $this->mock_post_id ) does not fail if nonce field is wrong nonce.\" );\n\n\t\t$_POST['dep_revisions_box_nonce'] = wp_create_nonce( 'dep_revisions_box' );\n\n\t}",
"function wp_get_post_revisions_url($post = 0)\n {\n }",
"function fix_no_editor_on_posts_page($post)\n{\n\n if ($post->ID != get_option('page_for_posts')) {\n return;\n }\n\n remove_action('edit_form_after_title', '_wp_posts_page_notice');\n add_post_type_support('page', 'editor');\n\n}",
"function wp_save_post_revision_check_for_changes( $return, $last_revision, $post ) {\n\n\t\t\t// if acf has changed, return false and prevent WP from performing 'compare' logic\n\t\t\tif ( acf_maybe_get_POST( '_acf_changed' ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// return\n\t\t\treturn $return;\n\n\t\t}",
"public function testTransaction2()\n {\n $this->assertCount(1, $this->app['orm.em']->getRepository('Entities\\Version')->findAll());\n }",
"public function pageIsNotLockedForEditors()\n {\n return $this->getBackendUser()->isAdmin() || ($this->CALC_PERMS & Permission::PAGE_EDIT) === Permission::PAGE_EDIT && !$this->pageinfo['editlock'];\n }",
"function test_basic_existingpage(){\n global $ID,$conf;\n $ID = 'wiki:syntax';\n $filename = $conf['datadir'].'/wiki/syntax.txt';\n $rev = filemtime($filename);\n\n $info = $this->_get_expected_pageinfo();\n $info['id'] = 'wiki:syntax';\n $info['namespace'] = 'wiki';\n $info['filepath'] = $filename;\n $info['exists'] = true;\n $info['lastmod'] = $rev;\n $info['currentrev'] = $rev;\n $info['meta'] = p_get_metadata($ID);\n\n $this->assertEquals($info, pageinfo());\n }",
"public function pageIdCanBeDeterminedWhileCallingModuleWithPageTree() {}"
]
| [
"0.59661394",
"0.5964927",
"0.59085476",
"0.58334833",
"0.57899857",
"0.57774913",
"0.5726504",
"0.5725962",
"0.57116646",
"0.5707904",
"0.56436",
"0.5600836",
"0.5587654",
"0.5582178",
"0.5538488",
"0.5525892",
"0.5516041",
"0.5512916",
"0.55107874",
"0.5510495",
"0.5483624",
"0.54824734",
"0.5460504",
"0.5450915",
"0.54105943",
"0.5398391",
"0.5390311",
"0.53901225",
"0.5384268",
"0.5378325",
"0.53694254",
"0.5356106",
"0.5354878",
"0.5350463",
"0.5339115",
"0.5334152",
"0.5329308",
"0.53281546",
"0.5319071",
"0.52953696",
"0.5293838",
"0.5293667",
"0.5286347",
"0.52713174",
"0.5264902",
"0.52625614",
"0.52472645",
"0.5247032",
"0.5240065",
"0.5236765",
"0.5233775",
"0.52305347",
"0.522133",
"0.5218826",
"0.5215106",
"0.521216",
"0.5207828",
"0.5191241",
"0.51815933",
"0.51815933",
"0.51815933",
"0.51696175",
"0.51560247",
"0.51554984",
"0.51553494",
"0.51527935",
"0.514033",
"0.51292026",
"0.5124755",
"0.5123379",
"0.51204914",
"0.51165503",
"0.51164114",
"0.5102041",
"0.50926906",
"0.5092281",
"0.5088775",
"0.5083204",
"0.506572",
"0.50600564",
"0.50594956",
"0.5048305",
"0.503571",
"0.50335884",
"0.50274134",
"0.50242436",
"0.5018395",
"0.50113755",
"0.5007648",
"0.5002032",
"0.49957448",
"0.49947062",
"0.49878764",
"0.49848288",
"0.49829385",
"0.49824715",
"0.49824166",
"0.49775672",
"0.49734953",
"0.4969849"
]
| 0.51202154 | 71 |
Creates data provider instance with search query applied | public function search($params)
{
$query = Product::find();
// add conditions that should always apply here
$dataProvider = new ActiveDataProvider([
'query' => $query,
'sort' => [
'defaultOrder' => [
'sort' => SORT_ASC,
'title' => SORT_ASC
],
]
]);
$this->load($params);
if (!$this->validate()) {
// uncomment the following line if you do not want to return any records when validation fails
$query->where('0=1');
//return $dataProvider;
}
// grid filtering conditions
$query->andFilterWhere([
'id' => $this->id,
'status' => $this->status,
]);
$query->andFilterWhere(['like', 'title', $this->title]);
return $dataProvider;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function searchQueryDataProvider() {}",
"public function search()\n {\n $q = $this->getQuery();\n $dataProvider = new ActiveDataProvider([\n 'query' => $q,\n ]);\n\n return $dataProvider;\n }",
"public function getQueryDataProvider() {}",
"public function search() {\n // Get CDbCriteria instance\n $dbCriteria = new CDbCriteria;\n // Search for client name\n $dbCriteria->compare('name', Yii::app()->request->getQuery('name', ''), true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $dbCriteria,\n 'pagination' => array(\n 'pageSize' => 10,\n ),\n ));\n }",
"protected function getDataProviders()\n {\n $searchModel = $this->getSearchModel();\n $queryParams = Yii::$app->request->queryParams;\n $dataProvider = $searchModel->search($queryParams);\n return [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider\n ];\n }",
"public function search()\n {\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('url', $this->url);\n $criteria->compare('type', $this->type);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n 'pagination' => array('pageSize' => 100),\n ));\n }",
"public function backendSearch()\n {\n $criteria = new CDbCriteria();\n\n return new CActiveDataProvider(\n __CLASS__,\n array(\n 'criteria' => $criteria,\n )\n );\n }",
"public function search() {\n\n\t\treturn new CActiveDataProvider(get_class($this), array(\n\t\t\t'criteria' => $this->getSearchCriteria(),\n\t\t\t'sort' => array(\n\t\t\t\t'defaultOrder' => 't.id DESC',\n\t\t\t\t'attributes' => array(\n\t\t\t\t\t'client_id' => array(\n\t\t\t\t\t\t'asc' => 'client_name asc',\n\t\t\t\t\t\t'desc' => 'client_name desc',\n\t\t\t\t\t),\n\t\t\t\t\t'*',\n\t\t\t\t),\n\t\t\t),\n\t\t\t'pagination' => array(\n\t\t\t\t'pageSize' => Yii::app()->config->get('global.per_page'),)\n\t\t));\n\t}",
"public function search()\n {\n $criteria = new CDbCriteria;\n $criteria->compare('id', $this->id, true);\n $criteria->compare('level', $this->level);\n $criteria->compare('text', $this->text, true);\n $criteria->compare('ip_create', $this->ip_create, true);\n\n return new ActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }",
"public function createSearchQuery()\n {\n $query = new SearchQuery($this->elastic);\n $query->listeners = $this->listeners;\n return $query;\n }",
"public function search()\n {\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('state', $this->state);\n $criteria->compare('type','0');\n return new ActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }",
"public function prepareDataProvider()\n\t{\n\t $searchModel = new \\app\\models\\ClearanceSearch(); \n\t\treturn $searchModel->search(\\Yii::$app->request->queryParams);\n\n\t}",
"public function search()\n {\n $criteria = new CDbCriteria;\n $criteria->compare('authorname', $this->authorname, true);\n return new CActiveDataProvider($this, array('criteria' => $criteria, ));\n }",
"public function getDataProvider(array $query = []);",
"protected function prepareDataProvider()\n {\n if ($this->prepareDataProvider !== null) {\n return call_user_func($this->prepareDataProvider, $this);\n }\n\n\t\t/* @var $modelClass \\yii\\db\\BaseActiveRecord */\n $modelClass = $this->modelClass;\n\t\t$query = $modelClass::find();\n\t\t\n\t\t$filters = ActionHelpers::getFilter();\n\t\t\n\t\tforeach($filters as $filter) {\n\t\t\t$query->andFilterWhere($filter);\n\t\t}\n\t\t\n\t\tif($with = ActionHelpers::getWith()) {\n $query->with($with);\n }\n\n return new ActiveDataProvider([\n 'query' => $query,\n 'pagination' => [\n 'pageSize' => ActionHelpers::getLimit()\n ],\n 'sort'=> ActionHelpers::getSort()\n // 'sort'=> ['defaultOrder' => ['id'=>SORT_DESC]]\n ]);\n }",
"public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('entity_id', $this->entity_id);\n $criteria->compare('dbname', $this->dbname, true);\n $criteria->compare('isfiltered', $this->isfiltered);\n $criteria->compare('filtertype', $this->filtertype);\n $criteria->compare('alias', $this->alias, true);\n $criteria->compare('enabled', $this->enabled);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n 'pagination' => false,\n ));\n }",
"public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that should not be searched.\n\t\t$criteria = new \\CDbCriteria;\n\n\t\tforeach (array_keys($this->defineAttributes()) as $name)\n\t\t{\n\t\t\t$criteria->compare($name, $this->$name);\n\t\t}\n\n\t\treturn new \\CActiveDataProvider($this, array(\n\t\t\t'criteria' => $criteria\n\t\t));\n\t}",
"public function search()\n\t{\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('type',$this->type,true);\n\t\t$criteria->compare('memo',$this->memo,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"public function search()\n {\n $query = Hotel::find();\n // add conditions that should always apply here\n $dataProvider = new ActiveDataProvider([\n 'query' => $query,\n ]);\n \n // grid filtering conditions\n $query->availables($this->quantity_of_guests);\n $query->andFilterWhere([\n 'hotel_id' => $this->hotel_id,\n 'price_per_guest' => $this->price_per_guest,\n ]);\n $query->andFilterWhere(['like', 'city_name', $this->city_name]);\n return $dataProvider;\n \n }",
"public function search()\n\t{\n\t $criteria=new CDbCriteria;\n\t\t\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('projection',$this->projection,true);\n\t\t$criteria->compare('username',Yii::app()->user->id);\n\t\t$criteria->compare('title',$this->title);\n\t\t$criteria->compare('url',$this->url);\n\t return new CActiveDataProvider(get_class($this), array(\n\t 'criteria'=> $criteria,\n\t 'sort'=>array(\n\t 'defaultOrder'=>'name ASC',\n\t ),\n\t 'pagination'=>array(\n\t 'pageSize'=>10\n\t ),\n\t ));\n\t}",
"private function _getDataProvider($query, $params){\n\n $dataProvider = new ActiveDataProvider([\n 'query' => $query,\n ]);\n\n if (!($this->load($params) && $this->validate())) {\n return $dataProvider;\n }\n\n $query->andFilterWhere([\n 'user_id' => $this->user_id,\n 'profile_id' => $this->profile_id,\n 'authentication_method_id' => $this->authentication_method_id,\n 'status' => $this->status,\n 'created_at' => $this->created_at,\n 'updated_at' => $this->updated_at,\n ]);\n\n $query->andFilterWhere(['like', 'username', $this->username])\n ->andFilterWhere(['like', 'auth_key', $this->auth_key])\n ->andFilterWhere(['like', 'password_hash', $this->password_hash])\n ->andFilterWhere(['like', 'password_reset_token', $this->password_reset_token])\n ->andFilterWhere(['like', 'email', $this->email]);\n\n return $dataProvider;\n }",
"public function getMetadataQueryProviderWrapper();",
"protected function prepareDataProvider()\n {\n \t$modelClass = $this->modelClass;\n\n $orderBy='id';\n if (isset($_GET['orderBy'])) $orderBy=$_GET['orderBy'];\n\n $orderByDir='DESC';\n if (isset($_GET['orderByDir'])) $orderByDir=$_GET['orderByDir'];\n\n $limit=20;\n if (isset($_GET['limit'])) $limit=$_GET['limit'];\n\n $order = \"$orderBy $orderByDir\";\n\n \t$dataProvider = new ActiveDataProvider([\n 'query' => $modelClass::find()->limit($limit)->with('supplier')->orderBy($order),\n 'pagination' => [\n 'pageSize' => $limit,\n ],\n ]);\n\n \treturn $dataProvider;\n }",
"public function makeSearch() \n {\n $this->setSelect($this->qb);\n $this->setAssociations($this->qb);\n $this->setWhere($this->qb);\n $this->setOrderBy($this->qb);\n $this->setLimit($this->qb);\n\n return $this;\n }",
"public function search()\n\t{\n\t\t$criteria = new CDbCriteria;\n\t\t//TODO: update search criteria\n\t\t$criteria->compare('id', $this->id, true);\n\t\t$criteria->compare('event_id', $this->event_id, true);\n\t\t$criteria->compare('standard_intervention_exists', $this->standard_intervention_exists);\n\t\t$criteria->compare('details', $this->details);\n\t\t$criteria->compare('interventions_id', $this->interventions_id);\n\t\t$criteria->compare('description', $this->description);\n\t\t$criteria->compare('patient_factors', $this->patient_factors);\n\t\t$criteria->compare('patient_factor_details', $this->patient_factor_details);\n\n\t\treturn new CActiveDataProvider(get_class($this), array(\n\t\t\t'criteria' => $criteria,\n\t\t));\n\t}",
"public function search()\n\t{\n\t\t$criteria = new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('title',$this->title,true);\n\t\t$criteria->compare('description',$this->description,true);\n\t\t$criteria->compare('keywords',$this->keywords,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"public static function new_search_record()\n\t{\n\t\treturn new user_record_search();\n\t}",
"public function search() {\n\n\t\t$criteria = new CDbCriteria;\n\n\t\t$criteria->compare('id', $this->id);\n\t\t$criteria->compare('content', $this->content, true);\n\t\t$criteria->compare('score', $this->score);\n\t\t$criteria->compare('author', $this->author, true);\n\t\t$criteria->compare('type', $this->type);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria' => $criteria,\n\t\t));\n\t}",
"public function search()\n {\n $criteria = new CDbCriteria;\n $criteria->compare('uid', $this->uid);\n $criteria->compare('token', $this->token, true);\n $criteria->compare('created', $this->created, true);\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }",
"public function search() {\n\n $this->entity = $this->name;\n $this->conditions = $this->_getSearchConditions();\n $this->joins = $this->_getSearchJoins();\n $this->orders = $this->_getSearchOrder();\n $this->limit = $this->_getSearchLimit();\n $this->maxLimit = $this->_getSearchMaxLimit();\n $this->offset = $this->_getSearchOffset();\n $this->fields = $this->_getSearchFields();\n $this->group = $this->_getSearchGroup();\n\n// $this->setVar('entity', $this->name);\n// $this->setVar('conditions', $this->_getSearchConditions());\n// $this->setVar('joins', $this->_getSearchJoins());\n// $this->setVar('orders', $this->_getSearchOrder());\n// $this->setVar('limit', $this->_getSearchLimit());\n// $this->setVar('maxLimit', $this->_getSearchMaxLimit());\n// $this->setVar('offset', $this->_getSearchOffset());\n// $this->setVar('fields', $this->_getSearchFields());\n// $this->setVar('group', $this->_getSearchGroup());\n//\n// $this->setVar('baseAdditionalElements', $this->additionalElements);\n $this->getFieldsForSearchFunction = '_extractSearchFields';\n\n return $this->baseSearch();\n }",
"public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('keyword_id', $this->keyword_id);\n $criteria->compare('visits', $this->visits);\n $criteria->compare('page_views', $this->page_views);\n $criteria->compare('parsing', $this->parsing);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n 'pagination' => array('pageSize' => 50),\n ));\n }",
"protected function getNewSearchModel()\n {\n $searchModelName = $this->getSearchModelName();\n return new $searchModelName;\n }",
"public function search()\n\t{\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('name',$this->name,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"public function searchdatas(){\r\n\t\t// should not be searched.\r\n\t\t$conditions=array();\r\n\t\t$params=array();\r\n\t\t$page_params=array();\r\n\t\t$criteria=new CDbCriteria;\r\n\t\t$sort=new CSort();\r\n \t$sort->attributes=array();\r\n \t$sort->defaultOrder=\"t.create_time ASC\";\r\n \t$sort->params=$page_params;\r\n\t\treturn new CActiveDataProvider(get_class($this), array(\r\n\t\t\t'criteria'=>array(\r\n\t\t\t 'condition'=>'',\r\n\t\t\t 'params'=>array(),\r\n\t\t\t 'with'=>array(\"User\",\"District\"),\r\n\t\t\t),\r\n\t\t\t'pagination'=>array(\r\n 'pageSize'=>'20',\r\n 'params'=> $page_params,\r\n ),\r\n 'sort'=>$sort,\r\n\t\t));\r\n\t}",
"public function search()\n {\n\n $query = Board::find()->where(['user_id' => $this->user_id]);\n\n $dataProvider = new ActiveDataProvider([\n 'query' => $query,\n 'pagination' => [\n 'pageSize' => 10,\n ],\n 'sort' => [\n 'defaultOrder' => [\n 'created_at' => SORT_DESC,\n\n ]\n ],\n ]);\n\n return $dataProvider;\n }",
"public function search() {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('post_id', $this->post_id);\n $criteria->compare('language_id', $this->language_id);\n $criteria->compare('header', $this->header, true);\n $criteria->compare('text', $this->text, true);\n\t\t$criteria->compare('rating',$this->rating);\n\t\t$criteria->compare('author_id',$this->author_id);\n\t\t$criteria->compare('date_add',$this->date_add,true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }",
"public function search()\n {\n $criteria = new CDbCriteria;\n\n $criteria->compare('t.id', $this->id);\n $criteria->compare('who', $this->who);\n $criteria->compare('date', $this->date, true);\n $criteria->compare('text', $this->text, true);\n $criteria->compare('rate', $this->rate);\n $criteria->compare('knowledge', $this->knowledge);\n $criteria->compare('behavior', $this->behavior);\n $criteria->compare('motivation', $this->motivation);\n $criteria->compare('rate', $this->who_ip);\n $criteria->compare('is_checked', $this->is_checked);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n 'pagination' => array(\n 'pageSize' => '50',\n ),\n 'sort' => array(\n 'defaultOrder' => array(\n 'date' => CSort::SORT_DESC,\n ),\n ),\n ));\n }",
"public function search() {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('name', $this->name, true);\n $criteria->compare('latitude', $this->latitude);\n $criteria->compare('longitude', $this->longitude);\n $criteria->compare('type', $this->type, true);\n $criteria->compare('vicinity', $this->vicinity, true);\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }",
"public function parametersAndQueriesDataProvider() {}",
"public function search() {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('region_id', $this->region_id);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }",
"public function search()\n\t{\n\t\t $this->StateProcess(get_class($this).'_'.Y::app()->params['cfgName']);\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('title',$this->title,true);\n $criteria->compare('title_adm',$this->title,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n 'sort'=>array('defaultOrder'=>'id DESC'),\n 'pagination'=>array('pageSize'=>Config::$data['base']->pageSize)\n\t\t));\n\t}",
"public function search($params,$query=null)\n {\n if(!$query) $query = RestClient::find();\n\n $query = $query->joinWith(['hospital']) \n ->joinWith(['hospital.sales']);\n //$query = $query->joinWith('mingrui_comments');\n // add conditions that should always apply here\n\n $dataProvider = new ActiveDataProvider([\n 'query' => $query,\n ]);\n\n $this->load($params);\n \n if (!$this->validate()) {\n // uncomment the following line if you do not want to return any records when validation fails\n // $query->where('0=1');\n //var_dump($params);exit;\n return $dataProvider;\n }\n \n // grid filtering conditions\n $query->andFilterWhere([\n 'rest_client.id' => $this->id, \n 'age' => $this->age, \n 'hospital_id' => $this->hospital_id, \n ]);\n\n $query->andFilterWhere(['like', 'rest_client.name', $this->name])\n ->andFilterWhere(['like', 'sex', $this->sex])\n ->andFilterWhere(['like', 'birthplace', $this->birthplace])\n ->andFilterWhere(['like', 'email', $this->email])\n ->andFilterWhere(['like', 'tel', $this->tel])\n ->andFilterWhere(['like', 'school', $this->school])\n ->andFilterWhere(['like', 'education', $this->education])\n ->andFilterWhere(['like', 'experience', $this->experience])\n ->andFilterWhere(['like', 'employed', $this->employed])\n ->andFilterWhere(['like', 'department', $this->department])\n ->andFilterWhere(['like', 'worktime', $this->worktime])\n ->andFilterWhere(['like', 'position', $this->position])\n ->andFilterWhere(['like', 'speciality', $this->speciality])\n ->andFilterWhere(['like', 'hobby', $this->hobby])\n ->andFilterWhere(['like', 'notes', $this->notes])\n ->andFilterWhere(['like', 'zhuren', $this->zhuren])\n ->andFilterWhere(['like', 'pianhao', $this->pianhao]) \n ->andFilterWhere(['like', 'rest_danwei.name', $this->hospitalname])\n ->andFilterWhere(['like', 'rest_sales.name', $this->salesname])\n ;\n\n // echo $query->createCommand()->getRawSql(); exit; \n return $dataProvider;\n }",
"public function search()\n\t{\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('agreement',$this->agreement);\n\t\t$criteria->compare('date',$this->date,true);\n\t\t$criteria->compare('user',$this->user);\n\t\t$criteria->compare('new_status',$this->new_status);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"public function search()\n {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id, true);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('description', $this->description, true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }",
"public function search() {\n\n\t\t$criteria = $this->getDbCriteria();\n\n\t\t$criteria->compare('id', $this->id);\n\t\t$criteria->compare('subject', $this->subject, true);\n\t\t$criteria->compare('status', $this->status);\n\t\t$criteria->compare('template.name', $this->template_id, true);\n\n\t\t$sort = new CSort;\n\t\t$sort->defaultOrder = 'id DESC';\n\n\t\treturn new NActiveDataProvider($this, array(\n\t\t\t\t\t'criteria' => $criteria,\n\t\t\t\t\t'sort' => $sort,\n\t\t\t\t\t'pagination' => array(\n\t\t\t\t\t\t'pageSize' => 20,\n\t\t\t\t\t),\n\t\t\t\t));\n\t}",
"public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria=new CDbCriteria;\n\n $criteria->compare('id',$this->id,true);\n $criteria->compare('query_id',$this->query_id,true);\n $criteria->compare('se_id',$this->se_id,true);\n $criteria->compare('se_page',$this->se_page,true);\n $criteria->compare('se_url',$this->se_url,true);\n $criteria->compare('visits',$this->visits);\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n 'pagination' => array('pageSize' => 25),\n ));\n }",
"public function search() {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('acquisition_date_id', $this->acquisition_date_id);\n $criteria->compare('acquisition_type_id', $this->acquisition_type_id);\n $criteria->compare('location_id', $this->location_id);\n $criteria->compare('number', $this->number, true);\n $criteria->compare('annotation', $this->annotation, true);\n $criteria->compare('location_coordinates_id', $this->location_coordinates_id);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }",
"public function search()\n {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('name', $this->name, true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }",
"protected function _initSearch()\n {\n $this->where['is_del'] = array('eq', 1);\n $this->order = 'create_time desc';\n }",
"public function search() {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('id_client', $this->id_client);\n $criteria->compare('first_name', $this->first_name, true);\n $criteria->compare('last_name', $this->last_name, true);\n $criteria->compare('date_birth', $this->date_birth, true);\n $criteria->compare('gender', $this->gender);\n\n return new CActiveDataProvider(get_class($this), array(\n 'criteria' => $criteria,\n ));\n }",
"public function search() {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('domain', $this->domain, true);\n $criteria->compare('ru_domain', $this->ru_domain, true);\n $criteria->compare('page', $this->ru_domain);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }",
"public function applyDefaultSearchQuery(\\yii\\data\\ActiveDataProvider &$dataProvider);",
"protected function _initSearch()\n {\n $this->where['is_del'] = array('eq', 0);\n $this->order = 'create_time desc';\n }",
"public static function new_search_record()\n\t{\n\t\treturn new league_record_search();\n\t}",
"public function search()\n {\n $query = Story::find()\n ->owner()\n ->globalChannel()\n ->orderBy(['_id' => SORT_ASC])\n ->active();\n\n $dataProvider = new ActiveDataProvider([\n 'query' => $query,\n 'pagination' => false\n ]);\n\n return $dataProvider;\n }",
"public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('project_id', $this->project_id);\n $criteria->compare('num', $this->num);\n $criteria->compare('team_strength', $this->team_strength);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }",
"private function instantiate_search_page() {\n // Build the search_types_fields and search_types_label arrays out of post_types_defs\n $search_types_fields = array();\n $search_types_label = array();\n foreach ( $this->post_type_defs as $post_type ) {\n $search_types_fields[ $post_type[ 'slug' ] ] = $post_type[ 'fields' ];\n $search_types_label[ $post_type[ 'slug' ] ] = $post_type[ 'plural_name' ];\n }\n $this->search_page = new HRHS_Search( array(\n // Using the default slug and title for now\n 'search_types_fields' => $search_types_fields,\n 'search_types_label' => $search_types_label\n ) );\n }",
"public function search()\n\t{\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('title',$this->title,true);\n\n\t\treturn new CActiveDataProvider(get_class($this), array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"public function search($query);",
"public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('sex', $this->sex);\n $criteria->compare('mobile', $this->mobile, true);\n $criteria->compare('idcard', $this->idcard, true);\n $criteria->compare('password', $this->password, true);\n $criteria->compare('place_ids', $this->place_ids, true);\n $criteria->compare('depart_id', $this->depart_id);\n $criteria->compare('bank', $this->bank, true);\n $criteria->compare('bank_card', $this->bank_card, true);\n $criteria->compare('address', $this->address, true);\n $criteria->compare('education', $this->education, true);\n $criteria->compare('created', $this->created);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }",
"public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id, true);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('summ', $this->summ, true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }",
"public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id, true);\n $criteria->compare('company_id', Yii::app()->user->company_id);\n $criteria->compare('zone_id', $this->zone_id, true);\n $criteria->compare('low_qty_threshold', $this->low_qty_threshold);\n $criteria->compare('high_qty_threshold', $this->high_qty_threshold);\n $criteria->compare('created_date', $this->created_date, true);\n $criteria->compare('created_by', $this->created_by, true);\n $criteria->compare('updated_date', $this->updated_date, true);\n $criteria->compare('updated_by', $this->updated_by, true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }",
"public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('nrs', $this->nrs, true);\n $criteria->compare('supplier_name', $this->supplier_name, true);\n $criteria->compare('npwp', $this->npwp, true);\n $criteria->compare('bank_name', $this->bank_name, true);\n $criteria->compare('bank_account_number', $this->bank_account_number, true);\n $criteria->compare('created_at', $this->created_at, true);\n $criteria->compare('created_by', $this->created_by);\n $criteria->compare('updated_at', $this->updated_at, true);\n $criteria->compare('updated_by', $this->updated_by);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n 'sort' => array(\n 'defaultOrder' => 'id DESC',\n ),\n ));\n }",
"public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('code',$this->code,true);\n\t\t$criteria->compare('title',$this->title,true);\n\t\t$criteria->compare('did',$this->did);\n\t\t$criteria->compare('date_prod',$this->date_prod,true);\n\t\t$criteria->compare('kind',$this->kind,true);\n\t\t$criteria->compare('len',$this->len,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria = new CDbCriteria;\n\n\t\t$criteria->compare('id', $this->id);\n\t\t$criteria->compare('code', $this->code, true);\n\t\t$criteria->compare('name', $this->name, true);\n\t\t$criteria->compare('printable_name', $this->printable_name, true);\n\t\t$criteria->compare('iso3', $this->iso3, true);\n\t\t$criteria->compare('numcode', $this->numcode);\n\t\t$criteria->compare('is_default', $this->is_default);\n\t\t$criteria->compare('is_highlight', $this->is_highlight);\n\t\t$criteria->compare('is_active', $this->is_active);\n\t\t$criteria->compare('date_added', $this->date_added);\n\t\t$criteria->compare('date_modified', $this->date_modified);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria' => $criteria,\n\t\t));\n\t}",
"public function search($params)\n {\n $this->__search($params);\n\n // grid filtering conditions\n $this->query\n\t ->andFilterWhere([\n\t 'id' => $this->id,\n\t 'ord' => $this->ord,\n\t 'type' => $this->type,\n\t ])\n\t ->andFilterWhere(['like', 'code', $this->code])\n ->andFilterWhere(['like', 'name', $this->name]);\n\n return $this->dataProvider;\n }",
"public function createQuery() {}",
"public function createQuery() {}",
"public function createQuery() {}",
"public function createQuery() {}",
"public function search()\n {\n // @todo Please modify the following code to remove attributes that should not be searched.\n $criteria = new CDbCriteria();\n \n $criteria->compare('question_id', $this->question_id);\n $criteria->compare('student_id', $this->student_id);\n $criteria->compare('answer_id', $this->answer_id);\n $criteria->compare('answer_text', $this->answer_text, true);\n $criteria->compare('answer_number', $this->answer_number, true);\n $criteria->compare('exec_time', $this->exec_time);\n $criteria->compare('result', $this->result);\n $criteria->compare('test_result', $this->test_result);\n \n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria\n ));\n }",
"public function search() {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('createDate', $this->createDate);\n $criteria->compare('lastUpdated', $this->lastUpdated);\n $criteria->compare('trackingKey', $this->trackingKey);\n $criteria->compare('email', $this->email);\n $criteria->compare('leadscore', $this->leadscore);\n\n if (!Yii::app()->user->isGuest) {\n $pageSize = Profile::getResultsPerPage();\n } else {\n $pageSize = 20;\n }\n\n return new SmartActiveDataProvider(get_class($this), array(\n 'pagination' => array(\n 'pageSize' => $pageSize,\n ),\n 'criteria' => $criteria,\n ));\n }",
"public function search() {\n// @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('description', $this->description, true);\n $criteria->compare('type', $this->type, true);\n $criteria->compare('options', $this->options, true);\n $criteria->compare('autoreplys', $this->autoreplys, true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }",
"public function googleSearch()\n {\n $search = new \\Hoor\\Search\\Google(get_search_query(), $this->getIndex());\n $this->data['search'] = $search;\n $this->data['results'] = $search->results;\n }",
"protected function addSearchConfigs()\n {\n\n $this['textQueryBuilder'] = function () {\n return new TextQueryBuilder();\n };\n\n $this['searchManager'] = function ($c) {\n return new SearchManager($c['databaseAdapter'], $c['queue'], $c['request'], array(\n $c['textQueryBuilder']\n ));\n };\n\n }",
"public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('tbl_customer_supplier', $this->tbl_customer_supplier, true);\n $criteria->compare('id_customer', $this->id_customer, true);\n $criteria->compare('id_supplier', $this->id_supplier, true);\n $criteria->compare('title', $this->title, true);\n $criteria->compare('date_add', $this->date_add, true);\n $criteria->compare('date_upd', $this->date_upd, true);\n $criteria->compare('active', $this->active);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }",
"public static function search()\n {\n return self::filterSearch([\n 'plot_ref' => 'string',\n 'plot_name' => 'string',\n 'plot_start_date' => 'string',\n 'user.name' => self::filterOption([\n 'select' => 'id',\n 'label' => trans_title('users', 'plural'),\n 'fields' => ['id', 'name'],\n //ComboBox user list base on the current client\n //See in App\\Models\\Users\\UsersScopes\n 'model' => app(User::class)->bySearch(),\n ]),\n 'client.client_name' => self::filterOption([\n 'conditional' => Credentials::hasRoles(['admin', 'admin-gv']),\n 'select' => 'client_id',\n 'label' => trans_title('clients', 'plural'),\n 'model' => Client::class,\n 'fields' => ['id', 'client_name']\n ])\n ]);\n }",
"public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria = new CDbCriteria;\n\n\t\t$criteria->compare('id', $this->id);\n\t\t$criteria->compare('name', $this->name, true);\n\t\t$criteria->compare('district_id', $this->district_id);\n\t\t$criteria->compare('active', $this->active);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t\t\t'criteria' => $criteria,\n\t\t\t\t));\n\t}",
"public function search()\n\t{\n\t\t// should not be searched.\n\n\t\t$criteria = new CDbCriteria;\n\n\t\t$criteria->compare('issue_date', $this->issue_date, true);\n\n\t\treturn new CActiveDataProvider($this, array('criteria' => $criteria,));\n\t}",
"public function search() {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('hol_id', $this->hol_id);\n $criteria->compare('loc_id', $this->loc_id);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }",
"public function search($params)\n {\n $this->__search($params);\n\n // grid filtering conditions\n $this->query\n\t ->andFilterWhere(['id' => $this->id])\n\t ->andFilterWhere(['like', 'description', $this->description])\n ->andFilterWhere(['like', 'type', $this->type]);\n\n return $this->dataProvider;\n }",
"public function search()\r\n\t{\r\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\r\n\r\n\t\t$criteria = new CDbCriteria;\r\n\r\n\t\t$criteria->compare('doc_num', $this->doc_num, true);\r\n\t\t$criteria->compare('doc_num2', $this->doc_num2);\r\n\t\t$criteria->compare('doc_date', $this->doc_date, true);\r\n\r\n\t\treturn new CActiveDataProvider($this, array(\r\n\t\t\t'criteria' => $criteria,\r\n\t\t));\r\n\t}",
"public function search()\n {\n $criteria = new CDbCriteria();\n\n $criteria->compare('productCategoryId', $this->productCategoryId, true);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('level', $this->level);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }",
"public function search() {\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria = new CDbCriteria;\n\n\t\t$criteria->compare('id', $this->id);\n\t\t$criteria->compare('name', $this->name, true);\n\t\t$criteria->compare('wikilink', $this->wikilink, true);\n\t\t$criteria->compare('picture', $this->picture, true);\n\t\t$criteria->compare('score', $this->score);\n\t\t$criteria->compare('modification_date', $this->modification_date, true);\n\t\t$criteria->compare('featured', $this->featured);\n\t\t$criteria->compare('users_found', $this->users_found);\n\t\t$criteria->compare('gpsdata', $this->gpsdata);\n\t\t$criteria->compare('category', $this->category);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria' => $criteria,\n\t\t));\n\t}",
"public function scopeSearch($query){\n if (request()->has('search_query') && !empty(request()->search_query) && request()->has('search_columns') && !empty(request()->search_columns) ) {\n \t$query = $this->getQuery($query , request()->search_columns , request()->search_query );\n }else{\n \tif (request()->has('search_query') && !empty(request()->search_query)) {\n \t\t$query = $this->getQuery($query , $this->fillable , request()->search_query );\n \t}\n }\n\n \n \n \n \n \n return $query;\n }",
"public function search()\n {\n $criteria=new CDbCriteria;\n\n $criteria->compare('id',$this->id);\n $criteria->compare('title',$this->title,true);\n $criteria->compare('text',$this->text,true);\n $criteria->compare('author_id',$this->author_id);\n $criteria->compare('editor_id',$this->editor_id);\n $criteria->compare('crated_at',$this->crated_at,true);\n $criteria->compare('edited_at',$this->edited_at,true);\n $criteria->compare('publish_at',$this->publich_at,true);\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }",
"public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('date_start',$this->date_start,true);\n\t\t$criteria->compare('date_end',$this->date_end,true);\n\t\t$criteria->compare('count_attempt',$this->count_attempt);\n\t\t$criteria->compare('count_questions',$this->count_questions);\n\t\t$criteria->compare('description',$this->description,true);\n\t\t$criteria->compare('date_create',$this->date_create,true);\n\t\t$criteria->compare('author',$this->author,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('latitud',$this->latitud,true);\n\t\t$criteria->compare('longitud',$this->longitud,true);\n\t\t$criteria->compare('telefono',$this->telefono,true);\n\t\t$criteria->compare('direccion',$this->direccion,true);\n\t\t$criteria->compare('web',$this->web,true);\n\t\t$criteria->compare('activo',$this->activo);\n\t\t$criteria->compare('userId',$this->userId);\n\t\t$criteria->compare('ratingGeneral',$this->ratingGeneral);\n\t\t$criteria->compare('youtubeUrl',$this->youtubeUrl,true);\n\t\t$criteria->compare('esDestacado',$this->esDestacado);\n\t\t$criteria->compare('aprobado',$this->aprobado);\n $criteria->compare('regionId',$this->regionId);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"public function search()\n\t{\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('id_user',$this->id_user);\n\t\t$criteria->compare('id_answer',$this->id_answer);\n\t\t$criteria->compare('mark',$this->mark);\n\t\t$criteria->compare('comment',$this->comment,true);\n\t\t$criteria->compare('time',$this->time,true);\n\t\t$criteria->compare('read_mark',$this->read_mark,true);\n\t\t$criteria->compare('marked_by',$this->marked_by,true);\n\t\t\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n// $criteria->compare('name', $this->name, true);\n $criteria->compare('description', $this->description, true);\n// $criteria->compare('alias', $this->alias, true);\n// $criteria->compare('module', $this->module, true);\n $criteria->compare('crud', $this->crud, true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }",
"public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('ID',$this->ID);\n\t\t$criteria->compare('UserID',$this->UserID);\n\t\t$criteria->compare('ProviderID',$this->ProviderID);\n\t\t$criteria->compare('Date',$this->Date,true);\n\t\t$criteria->compare('RawID',$this->RawID);\n\t\t$criteria->compare('Document',$this->Document,true);\n\t\t$criteria->compare('State',$this->State,true);\n\t\t$criteria->compare('Temperature',$this->Temperature,true);\n\t\t$criteria->compare('Conditions',$this->Conditions,true);\n\t\t$criteria->compare('Expiration',$this->Expiration,true);\n\t\t$criteria->compare('Comments',$this->Comments,true);\n\t\t$criteria->compare('Quantity',$this->Quantity,true);\n\t\t$criteria->compare('Type',$this->Type,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t\t'pagination'=>array(\n \t'pageSize'=>Yii::app()->params['defaultPageSize'], \n ),\n\t\t));\n\t}",
"public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('sn',$this->sn,true);\n\t\t$criteria->compare('fn',$this->fn,true);\n\t\t$criteria->compare('region',$this->region);\n\t\t$criteria->compare('postal',$this->postal,true);\n\t\t$criteria->compare('inn',$this->inn,true);\n\t\t$criteria->compare('ogrn',$this->ogrn,true);\n\t\t$criteria->compare('okpo',$this->okpo,true);\n\t\t$criteria->compare('adress',$this->adress,true);\n\t\t$criteria->compare('tel',$this->tel,true);\n\t\t$criteria->compare('fax',$this->fax,true);\n\t\t$criteria->compare('okved',$this->okved,true);\n\t\t$criteria->compare('oid',$this->oid,true);\n\t\t$criteria->compare('hits',$this->hits);\n\t\t$criteria->compare('st',$this->st);\n\t\t$criteria->compare('alias',$this->alias,true);\n\t\t$criteria->compare('alias2',$this->alias2,true);\n\t\t$criteria->compare('alias3',$this->alias3,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('cardid', $this->cardid, true);\n $criteria->compare('subclassid', $this->subclassid, true);\n $criteria->compare('cardname', $this->cardname, true);\n\n return new ActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }",
"public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id, true);\n $criteria->compare('pid', $this->pid, true);\n $criteria->compare('userName', $this->userName, true);\n $criteria->compare('userEmail', $this->userEmail, true);\n $criteria->compare('text', $this->text, true);\n $criteria->compare('userId', $this->userId, true);\n $criteria->compare('visibility', $this->visibility);\n $criteria->compare('date', $this->date, true);\n $criteria->compare('type', $this->type, true);\n $criteria->compare('recordId', $this->recordId, true);\n $criteria->compare('info', $this->info, true);\n $criteria->compare('new', $this->new, true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }",
"public function search() {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('user', $this->user, true);\n $criteria->compare('amount', $this->amount);\n $criteria->compare('currency', $this->currency, true);\n $criteria->compare('valid_from', $this->valid_from, true);\n $criteria->compare('valid_to', $this->valid_to, true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }",
"public function search () {\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria = new CDbCriteria;\n\n\t\t$criteria->compare('id', $this->id);\n\t\t$criteria->compare('title', $this->title, true);\n\t\t$criteria->compare('description', $this->description, true);\n\t\t$criteria->compare('type', $this->type);\n\t\t$criteria->compare('required', $this->required);\n\t\t$criteria->compare('cId', $this->cId);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t 'criteria' => $criteria,\n\t\t ));\n\t}",
"private function new_search()\n {\n $this->template = FALSE;\n \n $articulo = new articulo();\n $codfamilia = '';\n if( isset($_REQUEST['codfamilia']) )\n {\n $codfamilia = $_REQUEST['codfamilia'];\n }\n \n $con_stock = isset($_REQUEST['con_stock']);\n $this->results = $articulo->search($this->query, 0, $codfamilia, $con_stock);\n \n /// añadimos la busqueda\n foreach($this->results as $i => $value)\n {\n $this->results[$i]->query = $this->query;\n $this->results[$i]->dtopor = 0;\n }\n \n header('Content-Type: application/json');\n echo json_encode($this->results);\n }",
"public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('frequency_band',$this->frequency_band,true);\n\n\t\t$criteria->compare('date_of_issue',$this->date_of_issue,true);\n\n\t\t$criteria->compare('date_of_renewal',$this->date_of_renewal,true);\n\n\t\t$criteria->compare('emission',$this->emission,true);\n\n\t\t$criteria->compare('tolerance',$this->tolerance,true);\n\n\t\t$criteria->compare('application_vsat_id',$this->application_vsat_id,true);\n\n\t\treturn new CActiveDataProvider(get_class($this), array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\t\t/*\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('percent_discount',$this->percent_discount,true);\n\t\t$criteria->compare('taxable',$this->taxable);\n\t\t$criteria->compare('id_user_created',$this->id_user_created);\n\t\t$criteria->compare('id_user_modified',$this->id_user_modified);\n\t\t$criteria->compare('date_created',$this->date_created,true);\n\t\t$criteria->compare('date_modified',$this->date_modified,true);\n\n\t\treturn new CActiveDataProvider(get_class($this), array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t\t*/\n\t}",
"public function search() {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('first_name', $this->first_name, true);\n $criteria->compare('last_name', $this->last_name, true);\n $criteria->compare('address', $this->address, true);\n $criteria->compare('contact_number', $this->contact_number, true);\n $criteria->compare('city', $this->city, true);\n $criteria->compare('gender', $this->gender, true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }",
"public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria = new CDbCriteria;\n\t\t$criteria->select = 'createDate, employeeId';\n\t\t$criteria->distinct = true;\n\t\t$criteria->addCondition('employeeId=\"' . $this->employeeId . '\" AND createDate between \"' . $this->startDate . '\" AND \"' . $this->endDate . '\"');\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria' => $criteria,\n\t\t));\n\t}"
]
| [
"0.7773856",
"0.674291",
"0.65721744",
"0.6503215",
"0.6472826",
"0.6389071",
"0.63745373",
"0.6287255",
"0.62671757",
"0.62457365",
"0.62425256",
"0.62123144",
"0.61969537",
"0.6172912",
"0.61250603",
"0.6123412",
"0.6116283",
"0.61031115",
"0.6101092",
"0.608637",
"0.6081774",
"0.6081262",
"0.6073599",
"0.60723656",
"0.60405684",
"0.6040201",
"0.6035497",
"0.60331875",
"0.60318124",
"0.60199106",
"0.6013893",
"0.5998194",
"0.59764904",
"0.59671843",
"0.59620416",
"0.59579474",
"0.59551156",
"0.5941564",
"0.5935285",
"0.590389",
"0.5899341",
"0.5895071",
"0.5894937",
"0.5888715",
"0.58834034",
"0.5882613",
"0.58762497",
"0.58638185",
"0.5860362",
"0.5846486",
"0.58438134",
"0.5839541",
"0.5829547",
"0.5825096",
"0.5821819",
"0.5821492",
"0.5816446",
"0.5815201",
"0.58059967",
"0.58025193",
"0.57952476",
"0.5785819",
"0.57808983",
"0.57782406",
"0.57766914",
"0.5775805",
"0.57744527",
"0.57744527",
"0.57744527",
"0.57722074",
"0.5771512",
"0.5770783",
"0.5769345",
"0.57683945",
"0.57675093",
"0.576178",
"0.57557786",
"0.5747564",
"0.5746954",
"0.5745489",
"0.5741678",
"0.57375383",
"0.57335705",
"0.57302207",
"0.57280165",
"0.5726227",
"0.57238483",
"0.57218784",
"0.5715393",
"0.57136387",
"0.5713353",
"0.5711261",
"0.5710481",
"0.571002",
"0.57075536",
"0.57075375",
"0.57060134",
"0.5704971",
"0.5703576",
"0.57000446",
"0.5696112"
]
| 0.0 | -1 |
Load view. Used on backend side | function load( $path = '', $data = array(), $return = false, $base = null ) {
if ( is_null( $base ) ) {
$base = get_stylesheet_directory();
}
if ( is_child_theme() ) {
$full_path = $base . $path;
if ( ! file_exists( $full_path ) ) {
$base = get_template_directory();
$full_path = $base . $path . '.php';
}
} else {
$full_path = $base . $path . '.php';
}
if ( $return ) {
ob_start();
}
if ( file_exists( $full_path ) ) {
require $full_path;
} else {
throw new \Exception( 'The view path ' . $full_path . ' can not be found.' );
}
if ( $return ) {
return ob_get_clean();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function loadForView();",
"protected function loadView()\n {\n }",
"protected function loadView()\n {\n }",
"public function load() {\n\t\t$this->init();\n\t\t$action = $this->action;\n\t\t$view = $this->$action();\n\n\t\tif ($view instanceof View && !$this->app->isErrorPage()):\n\t\t\t$this->app->view = $view;\n\t\tendif;\n\n\t\t$this->app->view->mergeData($this->data);\n\t\t$this->app->view->validate();\n\t}",
"public function view_loader(){\n\n\t\tparent::view_loader();\n\t}",
"public function load($view) {\n\n\n\t}",
"private function renderView(){\n\t\trequire($this->ViewFile);\n\t}",
"private function loadPage()\n\t{\n\t $data = $this->getData();\n \t \n\t $this->load->view('index', $data);\n\t}",
"private function loadView($view, $data){\n $resolver = new TemplateMapResolver();\n $resolver->setMap(array(\n 'stepTemplate' => ROOT_PATH . '/module/BackOffice/view/back-office/wager/partials/wagerTypes/' . $view . '.phtml'\n ));\n \n //Create a view object and resolve the path base on the template map resolver above.\n $view = new PhpRenderer();\n $view->setResolver($resolver);\n \n //Create a view to use with the established template and add any variables that view will use.\n $viewModel = new ViewModel();\n $viewModel->setTemplate('stepTemplate')->setVariables(array(\n 'data' => $data\n ));\n \n return $view->render($viewModel);\n }",
"function load_view($template){$this->hold_template = APPPATH . '/views/' . $template . EXT;}",
"public static function load($view){\n\n\t\tif(!isset($_GET['view'])){\n\n\t\t\tif(Core::$root==\"\"){\n\t\t\t\t// echo '<pre>'; print_r(\"no hay var get\"); echo '</pre>';\n\n\t\t\t\t\tinclude \"core/app/view/\".$view.\"-view.php\";\n\t\t\t}\n\n\t\t}else{\n\n\t\t\tif(View::isValid()){\n\t\t\t\t$url =\"\";\n\t\t\t\tif($_GET[\"view\"] != \"inicio\"){\n\n\t\t\t\t\t// echo '<pre>'; print_r(\"vista completa\"); echo '</pre>';\n\t\t\t\t\t\n\t\t\t\t\t$url = \"core/app/view/\".$_GET['view'].\"-view.php\";\n\n\t\t\t\t}else{\n\n\t\t\t\t\techo '<pre>'; print_r(\"modelo completa\"); echo '</pre>';\n\n\t\t\t\t\tModule::loadLayout();\n\t\t\t\t}\n\n\t\t\t\tinclude $url;\t\t\t\t\n\t\t\t}else{\n\n\t\t\t\tView::Error(\"<b>404 NOT FOUND</b> View <b>\".$_GET['view'].\"</b> folder !! - <a href='http://evilnapsis.com/legobox/help/' target='_blank'>Help</a>\");\n\t\t\t}\n\t\t}\n\t}",
"public function view()\n {\n $this->processParametersForView();\n \n if ($this->view === 'main/base') { //Legacy and body\n extract($this->data);\n \n include(__DIR__ . '/../View/' . $this->view . '.php');\n \n return;\n }\n \n //Templates\n $this->latteView();\n }",
"function fetchView($view_path) {\r\n return Angie::getTemplateEngine()->fetchView($view_path);\r\n }",
"private static function view(): void\n {\n Debug::setBacklog();\n\n /**\n * Calls the methods to define and validate the template and view files.\n */\n self::viewCheckTemplateFile();\n self::viewDefineViewPath();\n self::viewCheckFileExists();\n\n /**\n * Calls the method that will import the template file to be returned to the request.\n */\n self::viewRequireTemplate(\n new ViewHelper(\n self::$routeController->getResultData(),\n self::$viewPath\n ),\n );\n }",
"protected function _load_view()\r\n {\r\n\r\n if($this->_is_ajax())\r\n {\r\n $this->layout = FALSE; \r\n if($this->_is_json())\r\n { \r\n $this->view = false;\r\n //$this->output->set_content_type('application/json')->set_output($this->response);\r\n }\r\n }\r\n \r\n // If $this->view == FALSE, we don't want to load anything\r\n if ($this->view !== FALSE)\r\n {\r\n // If $this->view isn't empty, load it. If it isn't, try and guess based on the controller and action name\r\n $view = (!empty($this->view)) ? $this->view : $this->router->directory . $this->router->class . '/' . $this->router->method;\r\n \r\n // Load the view into $yield\r\n $data['yield'] = $this->load->view($view, $this->data, TRUE);\r\n \r\n // Do we have any asides? Load them.\r\n if (!empty($this->asides))\r\n {\r\n foreach ($this->asides as $name => $file)\r\n {\r\n $data['yield_'.$name] = $this->load->view($file, $this->data, TRUE);\r\n }\r\n }\r\n \r\n // Load in our existing data with the asides and view\r\n $data = array_merge($this->data, $data);\r\n $layout = FALSE;\r\n\r\n // If we didn't specify the layout, try to guess it\r\n if (!isset($this->layout))\r\n {\r\n if (file_exists(APPPATH . 'views/layouts/' . $this->router->class . '.php'))\r\n {\r\n $layout = 'layouts/' . $this->router->class;\r\n } \r\n else\r\n {\r\n $layout = 'layouts/application';\r\n }\r\n }\r\n\r\n // If we did, use it\r\n else if ($this->layout !== FALSE)\r\n {\r\n $layout = $this->layout;\r\n }\r\n\r\n // If $layout is FALSE, we're not interested in loading a layout, so output the view directly\r\n if ($layout == FALSE)\r\n {\r\n $this->output->set_output($data['yield']);\r\n }\r\n\r\n // Otherwise? Load away :)\r\n else\r\n {\r\n $this->load->view($layout, $data);\r\n }\r\n }\r\n }",
"private function _doRender(){\n\t\tinclude $this->_viewLocation;\n\t}",
"public function View($view,$data=Null){\r\n $fullpath=cf(\"BASE/MVCPATH\").\"views\".DS.ucwords($view).EXT;\r\n $this->Load($fullpath,$data);\r\n }",
"protected function resolveView() {}",
"protected function resolveView() {}",
"private function requireView() {\n /**\n * Lista blanca de rutas de URL\n */\n switch ($this->uri) {\n case '':\n case 'index':\n require_once 'index.view.php';\n break;\n\n default: \n //Pagina de error\n require_once 'not_found.view.php';\n break;\n }\n }",
"public function loadView($view, $data = []) {\n extract($data);\n include(\"views/\" . $view . \".php\");\n }",
"public function view() {\n\t\t\tif (!$GLOBALS['sizzle']->apps['backend']->models['backend']->authenticate()) {\n \t\t\t$GLOBALS['sizzle']->utils->redirect('/backend/login', '<strong>Error:</strong> Please login to continue.');\n\t\t\t}\n\t\t\t// Authorize w/ backend app.\n\t\t\tif (!$GLOBALS['sizzle']->apps['backend']->models['backend']->authorize('blog', 'view')) {\n \t\t\t$GLOBALS['sizzle']->utils->redirect('/backend', '<strong>Error:</strong> Insufficient user access.');\n\t\t\t}\n\t\t\t// Load view.\n\t\t\treturn $this->_loadView(dirname(__FILE__) .'/views/view.tpl');\n\t\t}",
"public function action_view()\n {\n // Correct page has been loaded in the before() function\n $pagename = Wi3::inst()->routing->args[0];\n $this->prepareForViewing($pagename);\n // Render page\n $renderedInAdminArea = false;\n $this->request->response = Wi3_Renderer::renderPage($pagename, $renderedInAdminArea);\n // Page caching will be handled via an Event. See bootstrap.php and the Caching plugin\n }",
"public function loadPage()\n {\n $uri = Route::getFacadeRoot()->current()->uri();\n $view = $this->resolvePath($uri);\n\n return $view;\n }",
"function loadView($file, $params = array()) {\n \n if(!empty($params)) {\n extract($params);\n } \n \n include realpath(dirname(__FILE__)).'/../view/'.$file.'.php';\n}",
"public function Display(){\n\t\trequire($this->viewFileName);\n\t}",
"public function renderView()\n {\n //$_SESSION[\"info\"] zobrazuje vysledek operaci, paklize se nejake udaly\n if((isset($_SESSION[\"info\"])) && (!empty($_SESSION[\"info\"]))){\n $this->view_data[\"info\"] = $_SESSION[\"info\"];\n $_SESSION[\"info\"] = null;\n } \n\n //generuje csrf token pro formulare\n if (!isset($_SESSION[\"csrf_token\"])) {\n $_SESSION[\"csrf_token\"] = rand(1, 1e9);\n }\n \n if ($this->view)\n {\n $this->view_data[\"view\"] = $this->view;\n extract($this->view_data);\n $main_template = (dirname(__FILE__) .'/../view/@layout.phtml');\n \n if(file_exists($main_template))\n require_once($main_template); \n }\n }",
"public static function load($view)\n {\n $file = strtolower($view);\n require_once(getcwd() . \"/views/\" . $view . '/' . $file . \".php\");\n }",
"function load() {\n require_once(dirname(__FILE__) . '/helper.php');\n $cards = new Mod_Cards();\n $cards->createTable();\n\n $views = new Default_Views();\n $views->setModule('cards');\n\n //load default view\n if (!Sessions::isAdminLogged()) {\n $views->setModule('users');\n $views->load('admin/login', '', true);\n } else {\n $views->load('admin/home', '', true);\n }\n}",
"public function loadData()\n\t{\n\t\t$this->load->view('data_page');\n\t}",
"public function yieldView() {\n\t\trequire $this->_view;\n\t}",
"public function launch()\r\n {\r\n // Extract data to be usable inside the view file\r\n extract($this->data);\r\n\r\n // Expected view file format is\r\n // viewfolder.viewfile\r\n $view_file = str_replace(\".\", \"/\", $this->view_file);\r\n\r\n // Require view\r\n require path('app').'/views/'.$view_file.'.php';\r\n }",
"function LoadView(string $view)\n{\n global $login;\n global $user_id;\n $loadView = 'view/generated/'.$view.'.php';\n if (is_file($loadView)) {\n include_once $loadView;\n } else {\n die(\"View not found $loadView\");\n // show 404 here\n }\n}",
"protected function _view()\r\n\t\t{\r\n\t\t\t((!is_object($this->_view)) ? $this->_view = init_class(VIEW_NAME) : '');\r\n\t\t}",
"protected function loadView($viewName, $data){\n $resolver = new TemplateMapResolver();\n $resolver->setMap(array(\n 'stepTemplate' => ROOT_PATH . '/module/BackOffice/view/back-office/wallet/partials/' . $viewName . '.phtml'\n ));\n \n //Create a view object and resolve the path based on the template map resolver above.\n $view = new PhpRenderer();\n $view->setResolver($resolver);\n \n //Create a view to use with the established template and add any variables that view will use.\n $viewModel = new ViewModel();\n $viewModel->setTemplate('stepTemplate')->setVariables(array(\n 'data' => $data\n ));\n \n $html = $view->render($viewModel);\n return Array('success' => true, 'html' => $html);\n }",
"public function initializeView() {}",
"public function initializeView() {}",
"abstract protected function renderView();",
"public function load_view($view, $data = array())\r\n\t{\r\n\t\t$html = $this->ci()->load->view($view, $data, TRUE);\r\n\t\t$this->SetFont('msungstdlight', 'B');\r\n\t\t$this->writeHTML($html, true, false, true, false, '');\r\n\t}",
"function load_view($view_name, Model $model=null)\n{\n\t$view_path = TEMPLATES_DIR.DS.\"default\".DS.\"views\";\n\n\tif( defined(\"TEMPLATE\") )\n\t$view_path = TEMPLATES_DIR.DS.TEMPLATE.DS.\"views\";\n\n\t$view_path .= DS.$view_name;\n\n\tif( !file_exists( $view_path) )\n\t{\n\t\t$view_path .= \".php\";\n\t\tif( !file_exists( $view_path ) )\n\t\tthrow new FrameworkException(\"View '$view_name' doesn't exists.\");\n\t}\n\telse\n\t{\n\t\t$view_path .= DS.\"view.php\";\n\t\tif( !file_exists( $view_path ) )\n\t\tthrow new FrameworkException(\"View '$view_name' doesn't exists.\");\n\t}\n\n\tif($model == null)\n\t{\n\t\trequire_once $view_path;\n\t}\n\telse\n\t{\n\t\t$model->setView($view_name);\n\t\t$model->display();\n\t}\n}",
"public function yieldView()\r\n {\r\n require $this->view;\r\n }",
"function fetch($path) {\n\t\textract($this->_viewVars);\n\t\tif (!file_exists($path)) {\n\t\t\t$this->_fetchError($path);\n\t\t}\n\t\t$viewFile=file_get_contents($path);\n\t\t$this->processTags($viewFile);\n\t\tob_start();\n\t\teval(\"?>$viewFile<?\");\n\t\t$view=ob_get_contents();\n\t\tob_end_clean();\n\t\treturn $view;\n\t}",
"public function load()\n {\n $this->_getRoute();\n $class = 'Rwtt_Controller_' . ucfirst($this->controller);\n $controller = new $class;\n $action = $this->action . 'Action';\n if (!is_callable(array($controller, $action))) {\n $action = 'indexAction';\n }\n\n $controller->$action();\n $this->_registry->view->load();\n }",
"public function render(){\n require_once($_SERVER['DOCUMENT_ROOT'].\"//views/\".self::$page_name.\"/\".self::$page_name.\".php\");\n }",
"function load_view($isItOk){\n $this->_HTML = true;\n $this->_redirect = false;\n $this->_JSON = false;\n $this->_HTML_load_view = $isItOk;\n }",
"private static function render(){\n\t\tif(flexMVC::$view) $viewpath = VIEWS.flexMVC::$view.VIEWPAGE_EXT;\n\t\telse $viewpath = CURRENT_VIEW_FOLDER_LOCATION.CURRENT_VIEW.VIEWPAGE_EXT;\n\t\tif(!is_file($viewpath)){\n\t\t\t$viewpath = VIEWS.flexMVC::$error_page.VIEWPAGE_EXT;\n\t\t\tif(!file_exists($viewpath)){\n\t\t\t\techo(\"Please define your errors page => \" . flexMVC::$error_page);\n\t\t\t\texit;\n\t\t\t}\n\t\t\theader($_SERVER[\"SERVER_PROTOCOL\"].\" 404 Not Found\"); \n\t\t\tob_start();\n\t\t\tinclude($viewpath);\n\t\t\t$content = ob_get_clean();\n\t\t\tflexMVC::get_layout(VIEWS.\"_layouts/\".flexMVC::$layout.VIEWPAGE_EXT, $content);\n\t\t}else{\n\t\t\tob_start();\n\t\t\tinclude($viewpath);\n\t\t\t$content = ob_get_clean();\n\t\t\tflexMVC::get_layout(VIEWS.\"_layouts/\".flexMVC::$layout.VIEWPAGE_EXT, $content);\n\t\t\t$_SESSION['flexMVC_lastActive'] = strtotime(\"now\");\n\t\t}\n\t}",
"public static function view() \n {\n $articleDAO = new ArticleDAO();\n $articles = $articleDAO->load();\n\n $dispatch = new Dispatch();\n $dispatch->render(\n 'main_page', [\n 'articles' => $articles\n ]\n );\n }",
"function startup_view()\n\t{\n\t\t$data['error_msg'] = $this->error_msg;\n\t\t$response_body = $this->template_html($this->html_template_path,$data);\n\t\t$this->return_response($response_body);\n\t}",
"private static function view()\n {\n $files = ['View'];\n $folder = static::$root.'MVC/View'.'/';\n\n self::call($files, $folder);\n\n $files = ['Template', 'Views'];\n $folder = static::$root.'MVC/View/Libs'.'/';\n\n self::call($files, $folder);\n\n $files = ['ViewNotFoundException'];\n $folder = static::$root.'MVC/View/Exceptions'.'/';\n\n self::call($files, $folder);\n }",
"public function view() {\n $this->view->data['view'] = 'hehe';\n /*** load the index template ***/\n $this->view->show('index/view');\n }",
"public function load_view( $view, $data = array() ) {\n return $this->_find_view( $view, ( array ) $data );\n }",
"abstract protected function renderFirstView();",
"public function view() {\n\t\t\tif (!$GLOBALS['sizzle']->apps['backend']->models['backend']->authenticate()) {\n \t\t\t$GLOBALS['sizzle']->utils->redirect('/backend/login', '<strong>Error:</strong> Please login to continue.');\n\t\t\t}\n\t\t\t// Authorize w/ backend app.\n\t\t\tif (!$GLOBALS['sizzle']->apps['backend']->models['backend']->authorize('sharers', 'view')) {\n \t\t\t$GLOBALS['sizzle']->utils->redirect('/backend', '<strong>Error:</strong> Insufficient user access.');\n\t\t\t}\n\t\t\t// Load view.\n\t\t\treturn $this->_loadView(dirname(__FILE__) .'/views/view.tpl');\n\t\t}",
"protected function initializeStandaloneViewInstance() {}",
"public function actionView() {\n $this->render('view', array(\n 'model' => $this->loadModel(),\n ));\n }",
"public function personHistoryView(){\n $this->view('auditor/personHistoryView');\n \n $this->view->render(); // This is how load the view\n }",
"public function index()\n {\n if ($articles = $this->getArticles()){\n require 'View/articles/index.php';\n }\n\n // Load the view\n\n\n }",
"protected function initializeView() {\n\t}",
"public function getView(){\n\t\t\t$info = $this->__pageInfo;\n\n\t\t\t//Set page data to varibles\n\t\t\t$data = $this->__pageData;\n\t\t\tforeach ($data as $key => $value) {\n\t\t\t\t$$key = $value;\n\t\t\t}\n\n\t\t\t//Include the HTML header\n\t\t\tinclude \"./View/header.php\";\n\n\t\t\t//If is Admin page\n\t\t\tif($this->__adminCP) include \"./View/ad-topnav.php\";\n\n\t\t\t//If contain top nav\n\t\t\tif($this->__topNav) include \"./View/topnav.php\";\n\n\t\t\t//Include body\n\t\t\tinclude \"./View/\".$this->__viewName.\".php\";\n\n\t\t\tif($this->__adminCP) include \"./View/ad-leftnav.php\";\n\n\t\t\t//If contain right nav\n\t\t\tif($this->__rightNav) include \"./View/rightnav.php\";\n\n\t\t\t//If contain footer\n\t\t\tif($this->__footer) include \"./View/footer.php\";\n\t\t\t\n\t\t}",
"public function actionView()\n\t{\n\t\t// using the default layout 'protected/views/layouts/main.php'\n\t\t$adv=CCacheHelper::getAdvertisement(123);\n\t\t$data=compact('adv');\n\t\t$this->render('view',$data);\n\t}",
"protected function load_my_views($view, $data)\n\t{\n\t\t$this->load->view('Templates/header_v', $data);\n\t\t$this->load->view('Client/nav_client_v', $data);\n\t\t$this->load->view($view, $data);\n\t\t$this->load->view('Templates/footer_v', $data);\n\t}",
"public function view($view, $data) {\r\n require_once __DIR__ . '/../views/' . $view . '.php';\r\n }",
"public function actionView()\n {\n $this->render('view', array(\n 'model' => $this->loadModel(),\n ));\n }",
"public function View($file,$data)\n {\n $path = '../view/'. $file . '.php';\n //dd($path);\n if (file_exists($path)){\n ob_start();\n require_once $path;\n $content = ob_get_clean();\n require_once '../view/layout/main.php';\n } else{\n echo \"404 NOT FOUND\";\n }\n }",
"function view( $view ){\n\tinclude getApplicationSystemPath() . \"/public/view/\" . $view;\t\n}",
"public function getView() {}",
"public function getView() {}",
"abstract protected function getView();",
"public function render()\n {\n if (file_exists('../resources/views/' . $this->view_name . '.phtml')) {\n include_once '../resources/views/' . $this->view_name . '.phtml';\n include_once '../resources/views/layouts/' . $this->layout . '.phtml';\n } else {\n die(\"THERE IS NO VIEW\");\n }\n }",
"private function loadContent($viewName, $data = null)\n {\n $data['$timestamp'] = time();\n View::load($viewName, $data);\n }",
"public function view($view,$data=[]){\n\n if(file_exists('../app/views/'.$view.'.php')){\nrequire_once '../app/views/'.$view.'.php';\n\n }\n else{\n die('view does not exists!');\n }\n }",
"public function actionView()\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel(),\n\t\t));\n\t}",
"public function actionView()\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel(),\n\t\t));\n\t}",
"public function actionView()\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel(),\n\t\t));\n\t}",
"public function actionView()\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel(),\n\t\t));\n\t}",
"public function actionView()\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel(),\n\t\t));\n\t}",
"public function show($id)\n {\n // include view file\n }",
"public function actionView()\n\t{\n\t\t$this->render('view');\n\t}",
"public function officerHistoryView(){\n $this->view('auditor/officerHistoryView');\n \n $this->view->render(); // This is how load the view\n }",
"private function _View() {\n\t \n // $this->_View;\n\t\t\t//$View = ClassRegistry::getObject('');\n\t\treturn $this->_View;\n\t}",
"public function view() {\n\t\t// Find page by url slug\n\t\t$slug = $this->app->getSlug();\n\t\t$page = Page::findBySlug($slug);\n\t\t\n\t\t// If page exists render it, otherwise 404\n\t\tif ($page) {\n\t\t\t$this->title = $page->name;\n\t\t\t$this->pageData['page'] = $page;\n\t\t\t$this->render('view');\n\t\t} else {\n\t\t\t$this->noRoute();\n\t\t}\n\t}",
"public function content() { require 'TestView.php'; }",
"public function GetView()\n {\n $username = $_SESSION['username'];\n //Model\n \n $rs = $this->Chamcong->check_user_timekeeping($username);\n $this->view(\"master_page\", [\n \"page\" => \"home\",\n \"url\" => \"./\",\n \"stt\" => $rs,\n ]);\n \n }",
"public function index()\n\t{\n $this->view->render();\n\t}",
"protected function handleView()\n {\n try {\n parent::$view = new ReflectionClass(Request::$view);\n } catch(Exception $e) {\n self::jump(404);\n }\n }",
"public function _kohana_load_view($kohana_view_filename, $kohana_input_data)\n {\n //we want the pagetemplate (and other templates) to be available through the Wi3_workplace namespace\n return Wi3::$workplace->_kohana_load_view($kohana_view_filename, $kohana_input_data);\n }",
"protected function loadViews()\n {\n $this->loadViewsFrom(__DIR__.'/../resources/views', 'firefly');\n }",
"public function display()\n \t{\n \t\t$this->assign(\"__view\", $this->_view);\n \t\tparent::display();\n \t}",
"public function index()\n {\n\n\n $this->view->render();\n }",
"protected function fetch_view($view,$template_dir = NULL){\n\t\t$this->assign_errors();\n\t\t$this->assign_auth_values();//TODO Move To authcontroller\n\t\t$this->assign_custom_values();\n\t\treturn $this->view_manager->fetch($view, $template_dir);\n\t}",
"public function view(): mixed;",
"function view($name,$data = []){\n extract($data);\n\n return require \"../includes/views/{$name}.view.php\";\n}",
"public function loadDataAction()\n {\n $contentService = Dm_Session::GetServiceFactory()->getContentService();\n\n $filter = new Service_Api_Filter_Content();\n\n $filter->id = $this->_getParam('id');\n $filter->mimeType = $this->_getParam('mimeType');\n $filter->limit = $this->_getParam('limit');\n $filter->offset = $this->_getParam('offset');\n $filter->search = $this->_getParam('search');\n $filter->sources = $this->_getParam('sources');\n $filter->format = $this->_getParam('dim');\n $filter->properties = $this->_getParam('properties');\n $contents = $contentService->contentsRead($filter);\n $this->view->data = $contents;\n }",
"protected function getView() {\n\t\t$extensionPath = ExtensionManagementUtility::extPath('lp_access');\n\t\t$extensionRelativePath = ExtensionManagementUtility::extRelPath('lp_access');\n\n\t\t$this->pageRenderer->addJsFile($extensionRelativePath . 'Resources/Public/JavaScript/LpAccess.js');\n\t\t$this->pageRenderer->addCssFile($extensionRelativePath . 'Resources/Public/Stylesheets/LpAccess.css');\n\n\t\t/** @var \\TYPO3\\CMS\\Fluid\\View\\StandaloneView $view */\n\t\t$view = $this->objectManager->get('TYPO3\\\\CMS\\\\Fluid\\\\View\\\\StandaloneView');\n\t\t$view->setTemplatePathAndFilename($extensionPath . 'Resources/Private/Templates/HoursSelectionUserFunction/Process.html');\n\t\t$view->setLayoutRootPath($extensionPath . 'Resources/Private/Layouts/');\n\t\t$view->setPartialRootPath($extensionPath . 'Resources/Private/Partials/');\n\n\t\treturn $view;\n\t}",
"public function view() {\n\n // Set the page's title\n set_the_title($this->CI->lang->line('storage'));\n\n // Set Storage's styles\n set_css_urls(array('stylesheet', base_url('assets/base/user/apps/collection/storage/styles/css/styles.css?ver=' . MIDRUB_BASE_USER_APPS_STORAGE_VERSION), 'text/css', 'all'));\n\n // Set Storage's Js\n set_js_urls(array(base_url('assets/base/user/apps/collection/storage/js/main.js?ver=' . MIDRUB_BASE_USER_APPS_STORAGE_VERSION)));\n\n // Set Media's Js\n set_js_urls(array(base_url('assets/user/js/media.js?ver=' . MIDRUB_BASE_USER_APPS_STORAGE_VERSION)));\n \n // Set views params\n set_user_view(\n $this->CI->load->ext_view(\n MIDRUB_BASE_USER_APPS_STORAGE . 'views',\n 'main',\n array(\n ),\n true\n )\n );\n \n }",
"protected function render(){\n //render view\n \n }",
"protected function loadView($view, $data = null)\n {\n $this->load->view('templates/header');\n $this->load->view('templates/beheermenu');\n ($data === null) ? $this->load->view($view) : $this->load->view($view, $data);\n $this->load->view('templates/footer');\n }",
"public function render() {\n\n\t\t$context = $this->options;\n\t\t$context = $this->load($context);\n\n\t\textract($context);\n\n\t\tinclude __DIR__ . '/../views/' . $this->template();\n\t}",
"public function loadTemplate()\n\t\t{\n\t\t}",
"public function getView(){ }",
"public function renderChatView() {\n\n $messages = $this->loadMessages();\n require 'public/views/front/chatView.phtml';\n\n }"
]
| [
"0.85468096",
"0.8504488",
"0.8504488",
"0.7815395",
"0.77309424",
"0.76126397",
"0.7351727",
"0.72452855",
"0.72073257",
"0.71719193",
"0.7134268",
"0.70750237",
"0.702428",
"0.6961307",
"0.68966067",
"0.6862856",
"0.683849",
"0.6824715",
"0.6824715",
"0.6804338",
"0.6772752",
"0.6769654",
"0.67655164",
"0.6763274",
"0.6730812",
"0.67033815",
"0.6695338",
"0.66832376",
"0.66748154",
"0.66486347",
"0.6634739",
"0.6628895",
"0.6628413",
"0.6623002",
"0.66167176",
"0.6602792",
"0.6602792",
"0.6602241",
"0.65974134",
"0.6587474",
"0.6574803",
"0.65692633",
"0.65682894",
"0.65414697",
"0.6529155",
"0.6522483",
"0.6519032",
"0.65118825",
"0.6502276",
"0.64906996",
"0.6486488",
"0.6479911",
"0.64752007",
"0.64535713",
"0.64522284",
"0.64351916",
"0.64333713",
"0.64325047",
"0.6429463",
"0.6408277",
"0.6408126",
"0.63992774",
"0.6386262",
"0.63801354",
"0.6378026",
"0.6372521",
"0.6372521",
"0.63582677",
"0.635021",
"0.63479185",
"0.6345664",
"0.6341404",
"0.6341404",
"0.6341404",
"0.6341404",
"0.6341404",
"0.6337172",
"0.6334606",
"0.632972",
"0.6303976",
"0.62955576",
"0.62947184",
"0.6283728",
"0.62636703",
"0.6260121",
"0.62513775",
"0.624895",
"0.62478185",
"0.62219375",
"0.6221493",
"0.62181866",
"0.62041545",
"0.62033534",
"0.6202907",
"0.61996686",
"0.6194389",
"0.61818856",
"0.6179371",
"0.6178704",
"0.61706924",
"0.616405"
]
| 0.0 | -1 |
Load layout for header / footer built through Visual Composer | function load_composer_layout( $layout_type = 'header' ) {
global $post;
$default_layout = '';
$postID = is_home() ? get_option( 'page_for_posts' ) : ( $post ? $post->ID : 0 );
if ( $postID && ( is_singular() || is_home() ) && ( $this_layout_id = get_post_meta( $postID, '_this_' . $layout_type, true ) ) ) { // appointment: may be anyone
if ( $this_layout_id === '_none_' ) { // layout disabled;
return '';
}
$layout = get_post( $this_layout_id );
if ( $layout && $layout->post_status === 'publish' ) {
return do_shortcode( apply_filters( 'the_content', $layout->post_content ) );
} else {
$default_layout_query = Trends()->model->layout->get_default_layout( $layout_type );
if ( $default_layout_query->posts && $default_layout_query->posts[0]->post_status === 'publish' ) {
return do_shortcode( apply_filters( 'the_content', $default_layout_query->posts[0]->post_content ) );
}
}
} else {
$layouts = Trends()->model->layout->get_layouts( $layout_type );
if ( $layouts->posts ) {
foreach ( $layouts->posts as $layout ) {
$_appointment = get_post_meta( $layout->ID, '_appointment', true );
if ( ( $postID && ( $post_type = get_post_type( $postID ) ) && $_appointment === $post_type && is_singular() ) || // appointment: Any from Post Types (compatibility:post)
( $_appointment === 'is-home' && is_home() ) || // appointment: is-home
( $_appointment === 'is-search' && is_search() ) || // appointment: is-search
( $_appointment === 'is-archive' && is_archive() ) || // appointment: is-archive
( $_appointment === 'is-404' && is_404() ) // appointment: is-404
) {
return do_shortcode( apply_filters( 'the_content', $layout->post_content ) );
} elseif ( $_appointment === 'default' ) { // appointment: default
$default_layout = $layout;
}
}
if ( $default_layout ) {
return do_shortcode( apply_filters( 'the_content', $default_layout->post_content ) );
}
}
}
return '';
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function layout() {\r\n $this->template['header'] = $this->load->view('common/header', $this->data, true);\r\n $this->template['content'] = $this->load->view($this->content, $this->data, true);\r\n $this->template['footer'] = $this->load->view('common/footer', $this->data, true);\r\n $this->load->view('common/layout', $this->template);\r\n }",
"public function initLayout();",
"protected function setupLayout() {\n\t\tif ( ! is_null($this->layout)) {\n\n\n\t\t\t$cb_js_var = array(\n\t\t\t\t'site_url' => url('/'),\n\t\t\t\t'admin_url' => url('/admin'),\n\t\t\t\t'admin_assets_url' => asset('packages/vizioart/cookbook/'),\n\t\t\t\t'admin_api_url' => url('/admin/api')\n\t\t\t);\n\n\n\t\t\t$this->layout = View::make($this->layout, array(\n\t\t\t\t'cb_js_var' => $cb_js_var\n\t\t\t));\n\t\t}\n\t}",
"public function renderLayout();",
"protected function setupLayout()\n\t{\n\t\tdefine(\"aol_institute\", 68);\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}",
"function initializeFilesLayout() {\n $this->loadFilesMenubar();\n // navigation stuff\n $this->layout->add($this->getSearchPanel());\n $this->layout->add($this->getTagsPanel());\n $this->layout->add($this->getFolderPanel());\n // file list\n $this->layout->add($this->getClipboardPanel());\n $this->layout->add($this->getFilesPanel());\n // dialog\n $this->layout->setParam('COLUMNWIDTH_CENTER', '50%');\n $this->layout->setParam('COLUMNWIDTH_RIGHT', '50%');\n }",
"protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout, $this->_data);\n\t\t\t$this->layout->content = null;\n\t\t\t$this->layout->currentProject = null;\n\t\t}\n\t}",
"protected function setupLayout() {\n\t\tif (!is_null($this -> layout)) {\n\t\t\t$this -> layout = View::make($this -> layout);\n\t\t}\n\t}",
"public function generate()\r\n {\r\n $loader = new ContentLoader($this->_viewVariables);\r\n $loader->initContent($this->_contentViewPath);\r\n $this->_layout = $loader->initLayout($this->_layoutPath);\r\n echo $this->_layout;\r\n }",
"protected function applyPageLayout()\n {\n $this->content = \"\n @extends('generated/layout')\n \";\n }",
"function initLayout(){\n $layout = array(\n 'left' => array(\n 'ProfileInfo' => array(\n 'title' => 'Profile Info',\n 'minimize' => false,\n ),\n 'EmailInboxMenu' => array(\n 'title' => 'Inbox Menu',\n 'minimize' => false,\n ),\n 'ActionMenu' => array(\n 'title' => 'Actions',\n 'minimize' => false,\n ),\n 'TopContacts' => array(\n 'title' => 'Top Contacts',\n 'minimize' => false,\n ),\n 'RecentItems' => array(\n 'title' => 'Recently Viewed',\n 'minimize' => false,\n ),\n 'ActionTimer' => array(\n 'title' => 'Action Timer',\n 'minimize' => true,\n ),\n 'UserCalendars' => array(\n 'title' => 'User Calendars',\n 'minimize' => false,\n ),\n 'CalendarFilter' => array(\n 'title' => 'Filter',\n 'minimize' => false,\n ),\n 'GroupCalendars' => array(\n 'title' => 'Group Calendars',\n 'minimize' => false,\n ),\n 'FilterControls' => array(\n 'title' => 'Filter Controls',\n 'minimize' => false,\n ),\n 'SimpleFilterControlEventTypes' => array(\n 'title' => 'Event Types',\n 'minimize' => false,\n ),\n ),\n 'right' => array(\n 'SmallCalendar' => array(\n 'title' => 'Small Calendar',\n 'minimize' => false,\n ),\n 'ChatBox' => array(\n 'title' => 'Activity Feed',\n 'minimize' => false,\n ),\n 'GoogleMaps' => array(\n 'title' => 'Google Map',\n 'minimize' => false,\n ),\n 'OnlineUsers' => array(\n 'title' => 'Active Users',\n 'minimize' => false,\n ),\n 'TagCloud' => array(\n 'title' => 'Tag Cloud',\n 'minimize' => false,\n ),\n 'TimeZone' => array(\n 'title' => 'Clock',\n 'minimize' => false,\n ),\n 'SmallCalendar' => array(\n 'title' => 'Calendar',\n 'minimize' => false,\n ),\n 'QuickContact' => array(\n 'title' => 'Quick Contact',\n 'minimize' => false,\n ),\n 'MediaBox' => array(\n 'title' => 'Files',\n 'minimize' => false,\n ),\n ),\n 'hiddenRight' => array(\n 'ActionMenu' => array(\n 'title' => 'My Actions',\n 'minimize' => false,\n ),\n 'MessageBox' => array(\n 'title' => 'Message Board',\n 'minimize' => false,\n ),\n 'NoteBox' => array(\n 'title' => 'Note Pad',\n 'minimize' => false,\n ),\n 'DocViewer' => array(\n 'title' => 'Doc Viewer',\n 'minimize' => false,\n ),\n 'TopSites' => array(\n 'title' => 'Top Sites',\n 'minimize' => false,\n ),\n ),\n );\n if(Yii::app()->contEd('pro')){\n if(file_exists('protected/config/proWidgets.php')){\n foreach(include('protected/config/proWidgets.php') as $loc=>$data){\n if (isset ($layout[$loc]))\n $layout[$loc] = array_merge($layout[$loc],$data);\n }\n }\n }\n return $layout;\n }",
"public function getPageLayout() {}",
"protected function setAuthenticatedPageLayout() {\n if (!$this->app->router->isWsCall) {\n require __ROOT__ . Enums\\ApplicationFolderName::AppsFolderName . $this->app->name() . Enums\\FileNameConst::HeaderTemplate;\n// require __ROOT__ . Enums\\ApplicationFolderName::AppsFolderName . $this->app->name() . Enums\\FileNameConst::HeaderTemplate;\n }\n\n require __ROOT__ . Enums\\ApplicationFolderName::AppsFolderName . $this->app->name() . Enums\\FileNameConst::ContenTemplate;\n\n if (!$this->app->router->isWsCall) {\n require __ROOT__ . Enums\\ApplicationFolderName::AppsFolderName . $this->app->name() . Enums\\FileNameConst::FooterTemplate;\n }\n }",
"protected function _prepareLayout()\n {\n $section = $this->getAction()->getRequest()->getParam('section', false);\n if ($section == 'paynovapayment') {\n $this->getLayout()\n ->getBlock('head')\n ->addJs('mage/adminhtml/paynovapayment.js');\n }\n parent::_prepareLayout();\n }",
"function getHeader(){\n\t\trequire 'pages/headerfooter/header.html';\n\t}",
"protected function setupLayout() {\n\t\tif ( ! is_null($this->layout)) {\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}",
"protected function setupLayout()\n {\n if ( ! is_null($this->layout))\n {\n $this->layout = view($this->layout);\n $this->layout->menus = Menu::getMenu() ;\n }\n }",
"protected function initLayout()\n {\n $showLabels = $this->hasLabels();\n $showErrors = $this->getConfigParam('showErrors');\n $this->mergeSettings($showLabels, $showErrors);\n $this->buildLayoutParts($showLabels, $showErrors);\n }",
"protected function setupLayout() {\n if (!is_null($this->layout)) $this->layout = View::make($this->layout);\n }",
"protected function _constructMainLayout()\n {\n if (class_exists('tracer_class')) {\n tracer_class::marker(array(\n 'create main layout for display',\n debug_backtrace(),\n '#006400'\n ));\n }\n\n if ($this->_get) {\n $typ = $this->_get->pageType();\n } else {\n $typ = NULL;\n }\n\n switch ($typ) {\n case'css': case'js':\n $this->DISPLAY['core'] = '{;css_js;}';\n break;\n\n default:\n $this->layout($this->_defaultOptions['template']);\n break;\n }\n }",
"protected function _prepareLayout()\n\t{\n\t\t$this->getLayout()->getBlock('head')->setTitle($this->__($this->_helper->pageTitle()));\n $this->getLayout()->getBlock('root')->setTemplate('page/1column.phtml');\n\t\t$this->getLayout()->getBlock('head')->addCss('css/extrembler/prelogin/form.css');\n\t\t$this->getLayout()->getBlock('root')->unsetChild('header');\n\t\t$this->getLayout()->getBlock('content')->insert('store_language');\n\t\t$this->getLayout()->getBlock('root')->unsetChild('footer');\n\t return parent::_prepareLayout();\n\t}",
"protected function setupLayout()\r\n\t{\r\n\t\tif ( ! is_null($this->layout))\r\n\t\t{\r\n\t\t\t$this->layout = View::make($this->layout);\r\n\t\t}\r\n\t}",
"protected function _initViewHelpers() { \n $this->bootstrap('layout'); \n \n //***layout\n $layout = $this->getResource('layout'); \n $view = $layout->getView(); \n $view->doctype('XHTML1_STRICT'); \n $view->headMeta()->appendHttpEquiv('Content-Type', 'text/html;charset=utf-8'); \n\n $view->headTitle('Inusual'); \n\n //*** the css here\n $view->headLink(array('rel' => 'favicon','href' => '/img/favicon.ico',), 'PREPEND')\n ->appendStylesheet('/st_rep/st/public/css/estilo.css')\n ->prependStylesheet( '/st_rep/st/public/css/ui-lightness/jquery-ui-1.10.0.custom.min.css', 'screen',true,array('id' => 'my_stylesheet'));\n \n //*** the js here \n $view->headScript()->appendFile('/st_rep/st/public/js/jquery.min.js');\n \t $view->headScript()->appendFile('/st_rep/st/public/js/jquery.dataTables.min.js');\n $view->headScript()->appendFile('/st_rep/st/public/js/jquery-ui-1.9.2.custom.min.js');\n $view->headScript()->appendFile('/st_rep/st/public/js/main.js');\n\n //*** the mesage js here\n $view->headScript()->appendFile('/st_rep/st/public/js/mesage/jquery.noty.js');\n $view->headScript()->appendFile('/st_rep/st/public/js/mesage/topRight.js');\n $view->headScript()->appendFile('/st_rep/st/public/js/mesage/center.js');\n $view->headScript()->appendFile('/st_rep/st/public/js/mesage/bottomCenter.js');\n $view->headScript()->appendFile('/st_rep/st/public/js/mesage/topCenter.js');\n $view->headScript()->appendFile('/st_rep/st/public/js/mesage/default.js');\n $view->headScript()->appendFile('/st_rep/st/public/js/mesage/mesage.js');\n \n\n //***helper_cliente cliente buscar\n $view->headScript()->appendFile('/st_rep/st/public/js/clientebuscar.js');\n \n }",
"function idaho_webmaster_prebuilt_layouts( $layouts ) {\n\t\t$layouts['about-us'] = array(\n\t\t\t'name' => __( 'About', 'idaho-webmaster' ),\n\t\t\t'description' => __( 'A simple about page.', 'idaho-webmaster' ),\n\t\t\t'widgets' => array(\n\t\t array(\n\t\t 'title' => '',\n\t\t 'text' => '<blockquote><p>This area is used as a brief description of the agency. Think about it as an elevator pitch, keep it short and to the point.</p></blockquote><h3>HISTORY</h3><p>Our agency was founding in the year by this initiative. This section can be replaced by another title as well.</p><h3>NEXT BOARD MEETING</h3><p>January 1, 1970<br /> 1:00 p.m. – 1:30 p.m.<br />A Location</p><h3>More about us?</h3><p>Add more information to the right aside here. Any additional information can be placed here under new headings.</p>',\n\t\t 'text_selected_editor' => 'tmce',\n\t\t 'autop' => true,\n\t\t '_sow_form_id' => '56b925e25e15e',\n\t\t 'panels_info' => array(\n\t\t 'class' => 'Bootstrap_Widget_Editor_Widget',\n\t\t 'grid' => 0,\n\t\t 'cell' => 0,\n\t\t 'id' => 0,\n\t\t ),\n\t\t ),\n\t\t array(\n\t\t 'name' => 'Name Of Board Member',\n\t\t 'image' => 0,\n\t\t 'align' => 'left',\n\t\t 'style' => 'rounded',\n\t\t 'text' => '<p>In this area you put the members profile information. Typically some past achievements that are relevant to the their position on your board. And of course include their current projects and works. This description should hopefully be a 3-5 sentence paragraph. Going to long will cause a loss of interest in the reader. Keep things brief while getting all the necessary information in.</p><p>In usu impedit insolens, no dicunt possim sit. Per ad velit concludaturque. Purto inani et vix, persius voluptatum est et. Dicit prompta eam ut, facilisi gubergren has at, eu decore principes aliquando ius. Nonumes disputando sea eu, sumo suavitate accommodare ne per, per eu lobortis inciderint.</p>',\n\t\t 'text_selected_editor' => 'tmce',\n\t\t 'autop' => true,\n\t\t '_sow_form_id' => '56b927c776db0',\n\t\t 'panels_info' => array(\n\t\t 'class' => 'Bootstrap_Widget_Biography_Widget',\n\t\t 'raw' => false,\n\t\t 'grid' => 0,\n\t\t 'cell' => 1,\n\t\t 'id' => 1,\n\t\t ),\n\t\t ),\n\t\t array(\n\t\t 'name' => 'Name Of Board Member',\n\t\t 'image' => 0,\n\t\t 'align' => 'right',\n\t\t 'style' => 'rounded',\n\t\t 'text' => '<p>In this area you put the members profile information. Typically some past achievements that are relevant to the their position on your board. And of course include their current projects and works. This description should hopefully be a 3-5 sentence paragraph. Going to long will cause a loss of interest in the reader. Keep things brief while getting all the necessary information in.</p><p>In usu impedit insolens, no dicunt possim sit. Per ad velit concludaturque. Purto inani et vix, persius voluptatum est et. Dicit prompta eam ut, facilisi gubergren has at, eu decore principes aliquando ius. Nonumes disputando sea eu, sumo suavitate accommodare ne per, per eu lobortis inciderint.</p>',\n\t\t 'text_selected_editor' => 'tmce',\n\t\t 'autop' => true,\n\t\t '_sow_form_id' => '56b929d339fd6',\n\t\t 'panels_info' => array(\n\t\t 'class' => 'Bootstrap_Widget_Biography_Widget',\n\t\t 'raw' => false,\n\t\t 'grid' => 0,\n\t\t 'cell' => 1,\n\t\t 'id' => 2,\n\t\t ),\n\t\t ),\n\t\t array(\n\t\t 'name' => 'Name Of Board Member',\n\t\t 'image' => 0,\n\t\t 'align' => 'left',\n\t\t 'style' => 'rounded',\n\t\t 'text' => '<p>In this area you put the members profile information. Typically some past achievements that are relevant to the their position on your board. And of course include their current projects and works. This description should hopefully be a 3-5 sentence paragraph. Going to long will cause a loss of interest in the reader. Keep things brief while getting all the necessary information in.</p><p>In usu impedit insolens, no dicunt possim sit. Per ad velit concludaturque. Purto inani et vix, persius voluptatum est et. Dicit prompta eam ut, facilisi gubergren has at, eu decore principes aliquando ius. Nonumes disputando sea eu, sumo suavitate accommodare ne per, per eu lobortis inciderint.</p>',\n\t\t 'text_selected_editor' => 'tmce',\n\t\t 'autop' => true,\n\t\t '_sow_form_id' => '56b929d988c69',\n\t\t 'panels_info' => array(\n\t\t 'class' => 'Bootstrap_Widget_Biography_Widget',\n\t\t 'raw' => false,\n\t\t 'grid' => 0,\n\t\t 'cell' => 1,\n\t\t 'id' => 3,\n\t\t ),\n\t\t ),\n\t\t\t),\n\t\t\t'grids' => array(\n\t\t array(\n\t\t 'cells' => 2,\n\t\t\t\t\t'style' => array(),\n\t\t \t),\n\t\t\t),\n\t\t\t'grid_cells' => array(\n\t\t array(\n\t\t 'grid' => 0,\n\t\t 'weight' => 0.334737617611999993538773878754000179469585418701171875,\n\t\t ),\n\t\t array(\n\t\t 'grid' => 0,\n\t\t 'weight' => 0.6652623823879999509500748899881727993488311767578125,\n\t\t ),\n\t\t\t),\n\t\t);\n\n\t\t$layouts['contact-us'] = array(\n\t\t\t'name' => __( 'Contact', 'idaho-webmaster' ),\n\t\t\t'description' => __( 'A simple contact page.', 'idaho-webmaster' ),\n\t \t'widgets' =>\n\t\t\tarray(\n\t\t array(\n\t\t 'title' => '',\n\t\t 'text' => '<h3>Our Office</h3><p><strong>STEM Action Center</strong><br /> Address: 700 West Jefferson Street<br /> Boise, Idaho, 83720</p><h3>CONTACT OUR STAFF</h3><p><strong>Contact #1</strong><br /><button class=\"btn btn-default\" type=\"button\">208 332-1302</button></p><p><strong>Contact #2</strong><br /><button class=\"btn btn-default\" type=\"button\">208 332-1302</button></p><h3> </h3>',\n\t\t 'text_selected_editor' => 'tmce',\n\t\t 'autop' => true,\n\t\t '_sow_form_id' => '56b925e25e15e',\n\t\t 'panels_info' =>\n\t\t array(\n\t\t 'class' => 'Bootstrap_Widget_Editor_Widget',\n\t\t 'raw' => false,\n\t\t 'grid' => 0,\n\t\t 'cell' => 0,\n\t\t 'id' => 0,\n\t\t ),\n\t\t ),\n\t\t array(\n\t\t 'title' => '',\n\t\t '_sow_form_id' => '56ba126b129c1',\n\t\t 'panels_info' =>\n\t\t array(\n\t\t 'class' => 'Bootstrap_Widget_CF7_Widget',\n\t\t 'raw' => false,\n\t\t 'grid' => 0,\n\t\t 'cell' => 0,\n\t\t 'id' => 1,\n\t\t ),\n\t\t ),\n\t\t array(\n\t\t 'name' => 'Name Of Staff Member',\n\t\t 'image' => 0,\n\t\t 'align' => 'left',\n\t\t 'style' => 'rounded',\n\t\t 'text' => '<p>In this area you put the members profile information. Typically some past achievements that are relevant to the their position on your board. And of course include their current projects and works. This description should hopefully be a 3-5 sentence paragraph. Going to long will cause a loss of interest in the reader. Keep things brief while getting all the necessary information in.</p><p>In usu impedit insolens, no dicunt possim sit. Per ad velit concludaturque. Purto inani et vix, persius voluptatum est et. Dicit prompta eam ut, facilisi gubergren has at, eu decore principes aliquando ius. Nonumes disputando sea eu, sumo suavitate accommodare ne per, per eu lobortis inciderint.</p>',\n\t\t 'text_selected_editor' => 'tmce',\n\t\t 'autop' => true,\n\t\t '_sow_form_id' => '56b927c776db0',\n\t\t 'panels_info' =>\n\t\t array(\n\t\t 'class' => 'Bootstrap_Widget_Biography_Widget',\n\t\t 'raw' => false,\n\t\t 'grid' => 0,\n\t\t 'cell' => 1,\n\t\t 'id' => 2,\n\t\t 'style' =>\n\t\t array(),\n\t\t ),\n\t\t ),\n\t\t array(\n\t\t 'name' => 'Name Of Staff Member',\n\t\t 'image' => 0,\n\t\t 'align' => 'right',\n\t\t 'style' => 'rounded',\n\t\t 'text' => '<p>In this area you put the members profile information. Typically some past achievements that are relevant to the their position on your board. And of course include their current projects and works. This description should hopefully be a 3-5 sentence paragraph. Going to long will cause a loss of interest in the reader. Keep things brief while getting all the necessary information in.</p><p>In usu impedit insolens, no dicunt possim sit. Per ad velit concludaturque. Purto inani et vix, persius voluptatum est et. Dicit prompta eam ut, facilisi gubergren has at, eu decore principes aliquando ius. Nonumes disputando sea eu, sumo suavitate accommodare ne per, per eu lobortis inciderint.</p>',\n\t\t 'text_selected_editor' => 'tmce',\n\t\t 'autop' => true,\n\t\t '_sow_form_id' => '56b929d339fd6',\n\t\t 'panels_info' =>\n\t\t array(\n\t\t 'class' => 'Bootstrap_Widget_Biography_Widget',\n\t\t 'grid' => 0,\n\t\t 'cell' => 1,\n\t\t 'id' => 3,\n\t\t 'style' =>\n\t\t array(),\n\t\t ),\n\t\t ),\n\t\t\t),\n\t\t\t'grids' =>\n\t\t\tarray(\n\t\t array(\n\t\t 'cells' => 2,\n\t\t 'style' =>\n\t\t array(),\n\t\t ),\n\t\t\t),\n\t\t\t'grid_cells' =>\n\t\t\tarray(\n\t\t array(\n\t\t 'grid' => 0,\n\t\t 'weight' => 0.334737617611999993538773878754000179469585418701171875,\n\t\t ),\n\t\t array(\n\t\t 'grid' => 0,\n\t\t 'weight' => 0.6652623823879999509500748899881727993488311767578125,\n\t\t ),\n\t\t\t),\n\t\t);\n\n\t\t$layouts['three-column'] = array(\n\t\t\t'name' => __( 'Three Column', 'idaho-webmaster' ),\n\t 'description' => __( 'A three column layout.', 'idaho-webmaster' ),\n\t \t'widgets' =>\n\t\t array(\n\t\t array(\n\t\t 'title' => '',\n\t\t 'text' => '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi sed vehicula leo, vel elementum mi. Suspendisse tempor tellus congue convallis sagittis. Cras aliquet vitae odio eget elementum. Quisque porttitor orci in tortor tristique, sit amet iaculis tortor varius. Donec facilisis urna lorem, eget consequat ante placerat sit amet. Aenean orci orci, tempor non massa quis, lacinia egestas lectus. Pellentesque eget vestibulum arcu. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Quisque in rhoncus tellus. Ut semper sapien eget condimentum tempus.</p><p>In risus nulla, lobortis eget nunc a, pharetra suscipit lectus. Curabitur lacus urna, consequat quis sem a, pharetra porttitor lectus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Fusce in faucibus nibh, porttitor sodales leo. Nullam mattis augue sed ipsum cursus, quis ultrices justo lacinia. Etiam tempus mi nisl, a placerat ligula consectetur non. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Quisque et hendrerit arcu.</p>',\n\t\t 'text_selected_editor' => 'tinymce',\n\t\t 'autop' => true,\n\t\t '_sow_form_id' => '56ba4e2af10be',\n\t\t 'panels_info' =>\n\t\t array(\n\t\t 'class' => 'Bootstrap_Widget_Editor_Widget',\n\t\t 'raw' => false,\n\t\t 'grid' => 0,\n\t\t 'cell' => 0,\n\t\t 'id' => 0,\n\t\t 'style' =>\n\t\t array(),\n\t\t ),\n\t\t ),\n\t\t array(\n\t\t 'title' => '',\n\t\t 'text' => '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi sed vehicula leo, vel elementum mi. Suspendisse tempor tellus congue convallis sagittis. Cras aliquet vitae odio eget elementum. Quisque porttitor orci in tortor tristique, sit amet iaculis tortor varius. Donec facilisis urna lorem, eget consequat ante placerat sit amet. Aenean orci orci, tempor non massa quis, lacinia egestas lectus. Pellentesque eget vestibulum arcu. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Quisque in rhoncus tellus. Ut semper sapien eget condimentum tempus.</p><p>In risus nulla, lobortis eget nunc a, pharetra suscipit lectus. Curabitur lacus urna, consequat quis sem a, pharetra porttitor lectus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Fusce in faucibus nibh, porttitor sodales leo. Nullam mattis augue sed ipsum cursus, quis ultrices justo lacinia. Etiam tempus mi nisl, a placerat ligula consectetur non. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Quisque et hendrerit arcu.</p>',\n\t\t 'text_selected_editor' => 'tinymce',\n\t\t 'autop' => true,\n\t\t '_sow_form_id' => '56ba4e613da0a',\n\t\t 'panels_info' =>\n\t\t array(\n\t\t 'class' => 'Bootstrap_Widget_Editor_Widget',\n\t\t 'raw' => false,\n\t\t 'grid' => 0,\n\t\t 'cell' => 1,\n\t\t 'id' => 1,\n\t\t 'style' =>\n\t\t array(),\n\t\t ),\n\t\t ),\n\t\t array(\n\t\t 'title' => '',\n\t\t 'text' => '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi sed vehicula leo, vel elementum mi. Suspendisse tempor tellus congue convallis sagittis. Cras aliquet vitae odio eget elementum. Quisque porttitor orci in tortor tristique, sit amet iaculis tortor varius. Donec facilisis urna lorem, eget consequat ante placerat sit amet. Aenean orci orci, tempor non massa quis, lacinia egestas lectus. Pellentesque eget vestibulum arcu. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Quisque in rhoncus tellus. Ut semper sapien eget condimentum tempus.</p><p>In risus nulla, lobortis eget nunc a, pharetra suscipit lectus. Curabitur lacus urna, consequat quis sem a, pharetra porttitor lectus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Fusce in faucibus nibh, porttitor sodales leo. Nullam mattis augue sed ipsum cursus, quis ultrices justo lacinia. Etiam tempus mi nisl, a placerat ligula consectetur non. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Quisque et hendrerit arcu.</p>',\n\t\t 'text_selected_editor' => 'tinymce',\n\t\t 'autop' => true,\n\t\t '_sow_form_id' => '56ba4e69e0d70',\n\t\t 'panels_info' =>\n\t\t array(\n\t\t 'class' => 'Bootstrap_Widget_Editor_Widget',\n\t\t 'raw' => false,\n\t\t 'grid' => 0,\n\t\t 'cell' => 2,\n\t\t 'id' => 2,\n\t\t 'style' =>\n\t\t array(),\n\t\t ),\n\t\t ),\n\t\t ),\n\t\t 'grids' =>\n\t\t array(\n\t\t array(\n\t\t 'cells' => 3,\n\t\t 'style' =>\n\t\t array(),\n\t\t ),\n\t\t ),\n\t\t 'grid_cells' =>\n\t\t array(\n\t\t array(\n\t\t 'grid' => 0,\n\t\t 'weight' => 0.333333333333333314829616256247390992939472198486328125,\n\t\t ),\n\t\t array(\n\t\t 'grid' => 0,\n\t\t 'weight' => 0.333333333333333314829616256247390992939472198486328125,\n\t\t ),\n\t\t array(\n\t\t 'grid' => 0,\n\t\t 'weight' => 0.333333333333333314829616256247390992939472198486328125,\n\t\t ),\n\t\t ),\n\t\t);\n\n\t\t$layouts['two-column'] = array(\n\t\t\t'name' => __( 'Two Column', 'idaho-webmaster' ),\n\t\t\t'description' => __( 'A two column layout.', 'idaho-webmaster' ),\n\t\t\t'widgets' =>\n\t\t array(\n\t\t array(\n\t\t 'title' => '',\n\t\t 'text' => '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi sed vehicula leo, vel elementum mi. Suspendisse tempor tellus congue convallis sagittis. Cras aliquet vitae odio eget elementum. Quisque porttitor orci in tortor tristique, sit amet iaculis tortor varius. Donec facilisis urna lorem, eget consequat ante placerat sit amet. Aenean orci orci, tempor non massa quis, lacinia egestas lectus. Pellentesque eget vestibulum arcu. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Quisque in rhoncus tellus. Ut semper sapien eget condimentum tempus.</p><p>In risus nulla, lobortis eget nunc a, pharetra suscipit lectus. Curabitur lacus urna, consequat quis sem a, pharetra porttitor lectus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Fusce in faucibus nibh, porttitor sodales leo. Nullam mattis augue sed ipsum cursus, quis ultrices justo lacinia. Etiam tempus mi nisl, a placerat ligula consectetur non. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Quisque et hendrerit arcu.</p>',\n\t\t 'text_selected_editor' => 'tinymce',\n\t\t 'autop' => true,\n\t\t '_sow_form_id' => '56ba4e2af10be',\n\t\t 'panels_info' =>\n\t\t array(\n\t\t 'class' => 'Bootstrap_Widget_Editor_Widget',\n\t\t 'raw' => false,\n\t\t 'grid' => 0,\n\t\t 'cell' => 0,\n\t\t 'id' => 0,\n\t\t 'style' =>\n\t\t array(),\n\t\t ),\n\t\t ),\n\t\t array(\n\t\t 'title' => '',\n\t\t 'text' => '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi sed vehicula leo, vel elementum mi. Suspendisse tempor tellus congue convallis sagittis. Cras aliquet vitae odio eget elementum. Quisque porttitor orci in tortor tristique, sit amet iaculis tortor varius. Donec facilisis urna lorem, eget consequat ante placerat sit amet. Aenean orci orci, tempor non massa quis, lacinia egestas lectus. Pellentesque eget vestibulum arcu. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Quisque in rhoncus tellus. Ut semper sapien eget condimentum tempus.</p><p>In risus nulla, lobortis eget nunc a, pharetra suscipit lectus. Curabitur lacus urna, consequat quis sem a, pharetra porttitor lectus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Fusce in faucibus nibh, porttitor sodales leo. Nullam mattis augue sed ipsum cursus, quis ultrices justo lacinia. Etiam tempus mi nisl, a placerat ligula consectetur non. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Quisque et hendrerit arcu.</p>',\n\t\t 'text_selected_editor' => 'tinymce',\n\t\t 'autop' => true,\n\t\t '_sow_form_id' => '56ba4e613da0a',\n\t\t 'panels_info' =>\n\t\t array(\n\t\t 'class' => 'Bootstrap_Widget_Editor_Widget',\n\t\t 'raw' => false,\n\t\t 'grid' => 0,\n\t\t 'cell' => 1,\n\t\t 'id' => 1,\n\t\t 'style' =>\n\t\t array(),\n\t\t ),\n\t\t ),\n\t\t ),\n\t\t 'grids' =>\n\t\t array(\n\t\t array(\n\t\t 'cells' => 2,\n\t\t 'style' =>\n\t\t array(),\n\t\t ),\n\t\t ),\n\t\t 'grid_cells' =>\n\t\t array(\n\t\t array(\n\t\t 'grid' => 0,\n\t\t 'weight' => 0.5,\n\t\t ),\n\t\t array(\n\t\t 'grid' => 0,\n\t\t 'weight' => 0.5,\n\t\t ),\n\t\t ),\n\t\t);\n\n\t\t$layouts['one-column'] = array(\n\t\t\t'name' => __( 'One Column', 'idaho-webmaster' ),\n\t\t\t'description' => __( 'A one column layout.', 'idaho-webmaster' ),\n\t \t'widgets' =>\n\t\t array(\n\t\t array(\n\t\t 'title' => '',\n\t\t 'text' => '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi sed vehicula leo, vel elementum mi. Suspendisse tempor tellus congue convallis sagittis. Cras aliquet vitae odio eget elementum. Quisque porttitor orci in tortor tristique, sit amet iaculis tortor varius. Donec facilisis urna lorem, eget consequat ante placerat sit amet. Aenean orci orci, tempor non massa quis, lacinia egestas lectus. Pellentesque eget vestibulum arcu. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Quisque in rhoncus tellus. Ut semper sapien eget condimentum tempus.</p><p>In risus nulla, lobortis eget nunc a, pharetra suscipit lectus. Curabitur lacus urna, consequat quis sem a, pharetra porttitor lectus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Fusce in faucibus nibh, porttitor sodales leo. Nullam mattis augue sed ipsum cursus, quis ultrices justo lacinia. Etiam tempus mi nisl, a placerat ligula consectetur non. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Quisque et hendrerit arcu.</p>',\n\t\t 'text_selected_editor' => 'tinymce',\n\t\t 'autop' => true,\n\t\t '_sow_form_id' => '56ba4e2af10be',\n\t\t 'panels_info' =>\n\t\t array(\n\t\t 'class' => 'Bootstrap_Widget_Editor_Widget',\n\t\t 'raw' => false,\n\t\t 'grid' => 0,\n\t\t 'cell' => 0,\n\t\t 'id' => 0,\n\t\t 'style' =>\n\t\t array(\n\t\t 'background_display' => 'tile',\n\t\t ),\n\t\t ),\n\t\t ),\n\t\t ),\n\t\t 'grids' =>\n\t\t array(\n\t\t array(\n\t\t 'cells' => 1,\n\t\t 'style' =>\n\t\t array(),\n\t\t ),\n\t\t ),\n\t\t 'grid_cells' =>\n\t\t array(\n\t\t array(\n\t\t 'grid' => 0,\n\t\t 'weight' => 1,\n\t\t ),\n\t\t ),\n\t\t);\n\n\t\t$layouts['home-page'] = array(\n\t\t\t'name' => __( 'Home Page', 'idaho-webmaster' ),\n\t\t\t'description' => __( 'A three column homepage layout.', 'idaho-webmaster' ),\n\t\t\t'widgets' =>\n\t\t array(\n\t\t array(\n\t\t 'title' => 'Panel Heading',\n\t\t 'style' => 'default',\n\t\t 'text' => '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi sed vehicula leo, vel elementum mi. Suspendisse tempor tellus congue convallis sagittis. Cras aliquet vitae odio eget elementum. Quisque porttitor orci in tortor tristique, sit amet iaculis tortor varius. Donec facilisis urna lorem, eget consequat ante placerat sit amet. Aenean orci orci, tempor non massa quis, lacinia egestas lectus. Pellentesque eget vestibulum arcu. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Quisque in rhoncus tellus. Ut semper sapien eget condimentum tempus.</p><p>In risus nulla, lobortis eget nunc a, pharetra suscipit lectus. Curabitur lacus urna, consequat quis sem a, pharetra porttitor lectus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Fusce in faucibus nibh, porttitor sodales leo. Nullam mattis augue sed ipsum cursus, quis ultrices justo lacinia. Etiam tempus mi nisl, a placerat ligula consectetur non. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Quisque et hendrerit arcu.</p>',\n\t\t 'text_selected_editor' => 'tinymce',\n\t\t 'autop' => true,\n\t\t '_sow_form_id' => '56ba51504cecb',\n\t\t 'panels_info' =>\n\t\t array(\n\t\t 'class' => 'Bootstrap_Widget_Panel_Widget',\n\t\t 'grid' => 0,\n\t\t 'cell' => 0,\n\t\t 'id' => 0,\n\t\t 'style' =>\n\t\t array(),\n\t\t ),\n\t\t ),\n\t\t array(\n\t\t 'title' => 'Panel Heading',\n\t\t 'style' => 'default',\n\t\t 'text' => '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi sed vehicula leo, vel elementum mi. Suspendisse tempor tellus congue convallis sagittis. Cras aliquet vitae odio eget elementum. Quisque porttitor orci in tortor tristique, sit amet iaculis tortor varius. Donec facilisis urna lorem, eget consequat ante placerat sit amet. Aenean orci orci, tempor non massa quis, lacinia egestas lectus. Pellentesque eget vestibulum arcu. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Quisque in rhoncus tellus. Ut semper sapien eget condimentum tempus.</p><p>In risus nulla, lobortis eget nunc a, pharetra suscipit lectus. Curabitur lacus urna, consequat quis sem a, pharetra porttitor lectus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Fusce in faucibus nibh, porttitor sodales leo. Nullam mattis augue sed ipsum cursus, quis ultrices justo lacinia. Etiam tempus mi nisl, a placerat ligula consectetur non. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Quisque et hendrerit arcu.</p>',\n\t\t 'text_selected_editor' => 'tinymce',\n\t\t 'autop' => true,\n\t\t '_sow_form_id' => '56ba516d8f895',\n\t\t 'panels_info' =>\n\t\t array(\n\t\t 'class' => 'Bootstrap_Widget_Panel_Widget',\n\t\t 'grid' => 0,\n\t\t 'cell' => 1,\n\t\t 'id' => 1,\n\t\t 'style' =>\n\t\t array(),\n\t\t ),\n\t\t ),\n\t\t array(\n\t\t 'title' => 'Panel Heading',\n\t\t 'style' => 'default',\n\t\t 'text' => '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi sed vehicula leo, vel elementum mi. Suspendisse tempor tellus congue convallis sagittis. Cras aliquet vitae odio eget elementum. Quisque porttitor orci in tortor tristique, sit amet iaculis tortor varius. Donec facilisis urna lorem, eget consequat ante placerat sit amet. Aenean orci orci, tempor non massa quis, lacinia egestas lectus. Pellentesque eget vestibulum arcu. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Quisque in rhoncus tellus. Ut semper sapien eget condimentum tempus.</p><p>In risus nulla, lobortis eget nunc a, pharetra suscipit lectus. Curabitur lacus urna, consequat quis sem a, pharetra porttitor lectus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Fusce in faucibus nibh, porttitor sodales leo. Nullam mattis augue sed ipsum cursus, quis ultrices justo lacinia. Etiam tempus mi nisl, a placerat ligula consectetur non. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Quisque et hendrerit arcu.</p>',\n\t\t 'text_selected_editor' => 'tinymce',\n\t\t 'autop' => true,\n\t\t '_sow_form_id' => '56ba517022c43',\n\t\t 'panels_info' =>\n\t\t array(\n\t\t 'class' => 'Bootstrap_Widget_Panel_Widget',\n\t\t 'grid' => 0,\n\t\t 'cell' => 2,\n\t\t 'id' => 2,\n\t\t 'style' =>\n\t\t array(),\n\t\t ),\n\t\t ),\n\t\t ),\n\t\t 'grids' =>\n\t\t array(\n\t\t array(\n\t\t 'cells' => 3,\n\t\t 'style' =>\n\t\t array(),\n\t\t ),\n\t\t ),\n\t\t 'grid_cells' =>\n\t\t array(\n\t\t array(\n\t\t 'grid' => 0,\n\t\t 'weight' => 0.333333333333333314829616256247390992939472198486328125,\n\t\t ),\n\t\t array(\n\t\t 'grid' => 0,\n\t\t 'weight' => 0.333333333333333314829616256247390992939472198486328125,\n\t\t ),\n\t\t array(\n\t\t 'grid' => 0,\n\t\t 'weight' => 0.333333333333333314829616256247390992939472198486328125,\n\t\t ),\n\t\t ),\n\t\t);\n\n\t\t$layouts['home-page-3'] = array(\n\t\t\t'name' => __( 'Three Column Home Page', 'idaho-webmaster' ),\n\t 'description' => __( 'A three column homepage layout using visual editors for content.', 'idaho-webmaster' ),\n\t \t'widgets' =>\n\t\t array(\n\t\t array(\n\t\t 'image' => 0,\n\t\t 'style' => 'none',\n\t\t 'margin' => 'default',\n\t\t '_sow_form_id' => '56be5f45b8a80',\n\t\t 'panels_info' =>\n\t\t array(\n\t\t 'class' => 'Bootstrap_Widgets_Image_Widget',\n\t\t 'raw' => false,\n\t\t 'grid' => 0,\n\t\t 'cell' => 0,\n\t\t 'id' => 0,\n\t\t 'style' =>\n\t\t array(),\n\t\t ),\n\t\t ),\n\t\t array(\n\t\t 'title' => '',\n\t\t 'text' => '<h1>Agency Heading</h1><p>This is a template that is great for small agencies. It doesn\\'t have too much fancy flare to it, but it makes a great use of the standard Bootstrap core components. Feel free to use this template for any project you want!</p><p><a class=\"btn btn-primary btn-lg\" href=\"#\">Call To Action!</a></p>',\n\t\t 'text_selected_editor' => 'tmce',\n\t\t 'autop' => true,\n\t\t '_sow_form_id' => '56be5f4fde46a',\n\t\t 'panels_info' =>\n\t\t array(\n\t\t 'class' => 'Bootstrap_Widget_Editor_Widget',\n\t\t 'grid' => 0,\n\t\t 'cell' => 1,\n\t\t 'id' => 1,\n\t\t 'style' =>\n\t\t array(),\n\t\t ),\n\t\t ),\n\t\t array(\n\t\t 'title' => '',\n\t\t 'text' => '<hr />',\n\t\t 'text_selected_editor' => 'html',\n\t\t '_sow_form_id' => '56be637d6f354',\n\t\t 'autop' => false,\n\t\t 'panels_info' =>\n\t\t array(\n\t\t 'class' => 'Bootstrap_Widget_Editor_Widget',\n\t\t 'raw' => false,\n\t\t 'grid' => 1,\n\t\t 'cell' => 0,\n\t\t 'id' => 2,\n\t\t 'style' =>\n\t\t array(),\n\t\t ),\n\t\t ),\n\t\t array(\n\t\t 'title' => '',\n\t\t 'text' => '<h3>Heading 1</h3><p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Saepe rem nisi accusamus error velit animi non ipsa placeat. Recusandae, suscipit, soluta quibusdam accusamus a veniam quaerat eveniet eligendi dolor consectetur.</p><p><a class=\"btn btn-info\" href=\"#\">Find out more about us.</a></p>',\n\t\t 'text_selected_editor' => 'tinymce',\n\t\t 'autop' => true,\n\t\t '_sow_form_id' => '56c35226ec15d',\n\t\t 'panels_info' =>\n\t\t array(\n\t\t 'class' => 'Bootstrap_Widget_Editor_Widget',\n\t\t 'raw' => false,\n\t\t 'grid' => 2,\n\t\t 'cell' => 0,\n\t\t 'id' => 3,\n\t\t 'style' =>\n\t\t array(),\n\t\t ),\n\t\t ),\n\t\t array(\n\t\t 'title' => '',\n\t\t 'text' => '<h3>Heading 2</h3><p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Saepe rem nisi accusamus error velit animi non ipsa placeat. Recusandae, suscipit, soluta quibusdam accusamus a veniam quaerat eveniet eligendi dolor consectetur.</p><p><a class=\"btn btn-info\" href=\"#\">Find out more about us.</a></p>',\n\t\t 'text_selected_editor' => 'tinymce',\n\t\t 'autop' => true,\n\t\t '_sow_form_id' => '56c3526d93f12',\n\t\t 'panels_info' =>\n\t\t array(\n\t\t 'class' => 'Bootstrap_Widget_Editor_Widget',\n\t\t 'raw' => false,\n\t\t 'grid' => 2,\n\t\t 'cell' => 1,\n\t\t 'id' => 4,\n\t\t 'style' =>\n\t\t array(),\n\t\t ),\n\t\t ),\n\t\t array(\n\t\t 'title' => '',\n\t\t 'text' => '<h3>Heading 3</h3><p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Saepe rem nisi accusamus error velit animi non ipsa placeat. Recusandae, suscipit, soluta quibusdam accusamus a veniam quaerat eveniet eligendi dolor consectetur.</p><p><a class=\"btn btn-info\" href=\"#\">Find out more about us.</a></p>',\n\t\t 'text_selected_editor' => 'tinymce',\n\t\t 'autop' => true,\n\t\t '_sow_form_id' => '56c35270a18ea',\n\t\t 'panels_info' =>\n\t\t array(\n\t\t 'class' => 'Bootstrap_Widget_Editor_Widget',\n\t\t 'raw' => false,\n\t\t 'grid' => 2,\n\t\t 'cell' => 2,\n\t\t 'id' => 5,\n\t\t 'style' =>\n\t\t array(),\n\t\t ),\n\t\t ),\n\t\t ),\n\t\t 'grids' =>\n\t\t array(\n\t\t array(\n\t\t 'cells' => 2,\n\t\t 'style' =>\n\t\t array(),\n\t\t ),\n\t\t array(\n\t\t 'cells' => 1,\n\t\t 'style' =>\n\t\t array(),\n\t\t ),\n\t\t array(\n\t\t 'cells' => 3,\n\t\t 'style' =>\n\t\t array(),\n\t\t ),\n\t\t ),\n\t\t 'grid_cells' =>\n\t\t array(\n\t\t array(\n\t\t 'grid' => 0,\n\t\t 'weight' => 0.58289855852000005409507821241277270019054412841796875,\n\t\t ),\n\t\t array(\n\t\t 'grid' => 0,\n\t\t 'weight' => 0.417101441480000001416073018845054320991039276123046875,\n\t\t ),\n\t\t array(\n\t\t 'grid' => 1,\n\t\t 'weight' => 1,\n\t\t ),\n\t\t array(\n\t\t 'grid' => 2,\n\t\t 'weight' => 0.333333333333333314829616256247390992939472198486328125,\n\t\t ),\n\t\t array(\n\t\t 'grid' => 2,\n\t\t 'weight' => 0.333333333333333314829616256247390992939472198486328125,\n\t\t ),\n\t\t array(\n\t\t 'grid' => 2,\n\t\t 'weight' => 0.333333333333333314829616256247390992939472198486328125,\n\t\t ),\n\t\t ),\n\t\t);\n\n\t\t$layouts['home-page-4'] = array(\n\t\t\t'name' => __( 'Four Column Home Page', 'idaho-webmaster' ),\n\t 'description' => __( 'A four column homepage layout using panels.', 'idaho-webmaster' ),\n\t \t'widgets' =>\n\t\t array(\n\t\t array(\n\t\t 'title' => '',\n\t\t 'text' => '<h1>Agency Heading</h1><p>This is a template that is great for small agencies. It doesn\\'t have too much fancy flare to it, but it makes a great use of the standard Bootstrap core components. Feel free to use this template for any project you want!</p><p><a class=\"btn btn-primary btn-lg\" href=\"#\">Call To Action!</a></p>',\n\t\t 'text_selected_editor' => 'tmce',\n\t\t 'autop' => true,\n\t\t '_sow_form_id' => '56be5f4fde46a',\n\t\t 'panels_info' =>\n\t\t array(\n\t\t 'class' => 'Bootstrap_Widget_Editor_Widget',\n\t\t 'raw' => false,\n\t\t 'grid' => 0,\n\t\t 'cell' => 0,\n\t\t 'id' => 0,\n\t\t 'style' =>\n\t\t array(),\n\t\t ),\n\t\t ),\n\t\t array(\n\t\t 'image' => 0,\n\t\t 'style' => 'none',\n\t\t 'margin' => 'default',\n\t\t '_sow_form_id' => '56be5f45b8a80',\n\t\t 'panels_info' =>\n\t\t array(\n\t\t 'class' => 'Bootstrap_Widgets_Image_Widget',\n\t\t 'raw' => false,\n\t\t 'grid' => 0,\n\t\t 'cell' => 1,\n\t\t 'id' => 1,\n\t\t 'style' =>\n\t\t array(),\n\t\t ),\n\t\t ),\n\t\t array(\n\t\t 'title' => '',\n\t\t 'text' => '<hr />',\n\t\t 'text_selected_editor' => 'html',\n\t\t '_sow_form_id' => '56be637d6f354',\n\t\t 'autop' => false,\n\t\t 'panels_info' =>\n\t\t array(\n\t\t 'class' => 'Bootstrap_Widget_Editor_Widget',\n\t\t 'raw' => false,\n\t\t 'grid' => 1,\n\t\t 'cell' => 0,\n\t\t 'id' => 2,\n\t\t 'style' =>\n\t\t array(),\n\t\t ),\n\t\t ),\n\t\t array(\n\t\t 'title' => '',\n\t\t 'style' => 'default',\n\t\t 'image' => 0,\n\t\t 'text' => '<h3>Heading 1</h3><p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Saepe rem nisi accusamus error velit animi non ipsa placeat. Recusandae, suscipit, soluta quibusdam accusamus a veniam quaerat eveniet eligendi dolor consectetur.<br /><br /></p><p><a class=\"btn btn-primary\" href=\"#\">To more information</a></p>',\n\t\t 'text_selected_editor' => 'tmce',\n\t\t 'autop' => true,\n\t\t '_sow_form_id' => '56c366c60569f',\n\t\t 'panels_info' =>\n\t\t array(\n\t\t 'class' => 'Bootstrap_Widget_Panel_Widget',\n\t\t 'raw' => false,\n\t\t 'grid' => 2,\n\t\t 'cell' => 0,\n\t\t 'id' => 3,\n\t\t 'style' =>\n\t\t array(),\n\t\t ),\n\t\t ),\n\t\t array(\n\t\t 'title' => '',\n\t\t 'style' => 'default',\n\t\t 'image' => 0,\n\t\t 'text' => '<h3>Heading 2</h3><p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Saepe rem nisi accusamus error velit animi non ipsa placeat. Recusandae, suscipit, soluta quibusdam accusamus a veniam quaerat eveniet eligendi dolor consectetur.<br /><br /></p><p><a class=\"btn btn-primary\" href=\"#\">To more information</a></p>',\n\t\t 'text_selected_editor' => 'tmce',\n\t\t 'autop' => true,\n\t\t '_sow_form_id' => '56c366f43c8d1',\n\t\t 'panels_info' =>\n\t\t array(\n\t\t 'class' => 'Bootstrap_Widget_Panel_Widget',\n\t\t 'raw' => false,\n\t\t 'grid' => 2,\n\t\t 'cell' => 1,\n\t\t 'id' => 4,\n\t\t 'style' =>\n\t\t array(),\n\t\t ),\n\t\t ),\n\t\t array(\n\t\t 'title' => '',\n\t\t 'style' => 'default',\n\t\t 'image' => 0,\n\t\t 'text' => '<h3>Heading 3</h3><p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Saepe rem nisi accusamus error velit animi non ipsa placeat. Recusandae, suscipit, soluta quibusdam accusamus a veniam quaerat eveniet eligendi dolor consectetur.<br /><br /></p><p><a class=\"btn btn-primary\" href=\"#\">To more information</a></p>',\n\t\t 'text_selected_editor' => 'tmce',\n\t\t 'autop' => true,\n\t\t '_sow_form_id' => '56c366f6a4953',\n\t\t 'panels_info' =>\n\t\t array(\n\t\t 'class' => 'Bootstrap_Widget_Panel_Widget',\n\t\t 'raw' => false,\n\t\t 'grid' => 2,\n\t\t 'cell' => 2,\n\t\t 'id' => 5,\n\t\t 'style' =>\n\t\t array(),\n\t\t ),\n\t\t ),\n\t\t array(\n\t\t 'title' => '',\n\t\t 'style' => 'default',\n\t\t 'image' => 0,\n\t\t 'text' => '<h3>Heading 4</h3><p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Saepe rem nisi accusamus error velit animi non ipsa placeat. Recusandae, suscipit, soluta quibusdam accusamus a veniam quaerat eveniet eligendi dolor consectetur.<br /><br /></p><p><a class=\"btn btn-primary\" href=\"#\">To more information</a></p>',\n\t\t 'text_selected_editor' => 'tmce',\n\t\t 'autop' => true,\n\t\t '_sow_form_id' => '56c366f91c6e6',\n\t\t 'panels_info' =>\n\t\t array(\n\t\t 'class' => 'Bootstrap_Widget_Panel_Widget',\n\t\t 'raw' => false,\n\t\t 'grid' => 2,\n\t\t 'cell' => 3,\n\t\t 'id' => 6,\n\t\t 'style' =>\n\t\t array(),\n\t\t ),\n\t\t ),\n\t\t ),\n\t\t 'grids' =>\n\t\t array(\n\t\t array(\n\t\t 'cells' => 2,\n\t\t 'style' =>\n\t\t array(),\n\t\t ),\n\t\t array(\n\t\t 'cells' => 1,\n\t\t 'style' =>\n\t\t array(),\n\t\t ),\n\t\t array(\n\t\t 'cells' => 4,\n\t\t 'style' =>\n\t\t array(),\n\t\t ),\n\t\t ),\n\t\t 'grid_cells' =>\n\t\t array(\n\t\t array(\n\t\t 'grid' => 0,\n\t\t 'weight' => 0.417282695947000015213035339911584742367267608642578125,\n\t\t ),\n\t\t array(\n\t\t 'grid' => 0,\n\t\t 'weight' => 0.5827173040530000402981158913462422788143157958984375,\n\t\t ),\n\t\t array(\n\t\t 'grid' => 1,\n\t\t 'weight' => 1,\n\t\t ),\n\t\t array(\n\t\t 'grid' => 2,\n\t\t 'weight' => 0.25,\n\t\t ),\n\t\t array(\n\t\t 'grid' => 2,\n\t\t 'weight' => 0.25,\n\t\t ),\n\t\t array(\n\t\t 'grid' => 2,\n\t\t 'weight' => 0.25,\n\t\t ),\n\t\t array(\n\t\t 'grid' => 2,\n\t\t 'weight' => 0.25,\n\t\t ),\n\t\t ),\n\t\t);\n\n\t\treturn $layouts;\n\n\t}",
"public function loadLayout()\n {\n \n echo \"<div id='layout-mini-cr'>\";\n try\n {\n $portal = new Portal();\n foreach($portal->loadBox() as $i => $v)\n {\n try\n {\n $portal->getId($v[1]);\n $info = $portal->pegaInfo();\n switch($v[2])\n {\n\n case 1: echo \"<div class='box-mini-ex1' id='box-mini-$v[0]'><a href='#'><div class='delete-box-mini' id='dlb-$v[0]'></div></a>$info[1]</div>\"; break;\n case 2: echo \"<div class='box-mini-ex2' id='box-mini-$v[0]'><a href='#'><div class='delete-box-mini' id='dlb-$v[0]'></div></a>$info[1]</div>\"; break;\n case 3: echo \"<div class='box-mini-ex3' id='box-mini-$v[0]'><a href='#'><div class='delete-box-mini' id='dlb-$v[0]'></div></a>$info[1]</div>\"; break; \n } \n }\n catch(Exception $ex)\n {\n // Deleta a box caso ele não consiga pegar as informações da notícia\n $portal->getBid($v[0]);\n $portal->deleteBox();\n }\n }\n echo \"<div class='clear'></div>\";\n }\n catch(Exception $a)\n {\n \n }\n echo \"</div>\";\n }",
"protected function setupLayout()\n {\n if ( ! is_null($this->layout))\n {\n $this->layout = View::make($this->layout);\n }\n\n }",
"function pushLayout($cont)\n{\n require_once(\"_tmp_header.php\");\n echo $cont;\n require_once(\"_tmp_footer.php\");\n}",
"protected function setupLayout()\n {\n if (!is_null($this->layout)) {\n $this->layout = \\View::make($this->layout);\n }\n }",
"protected function setupLayout()\n\t{\n\t\tif (!is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}",
"protected function registerLayout()\n {\n if ($this->app->runningInConsole()) {\n return;\n }\n\n // Register additional css assets with mrcore Layout\n #Layout::css('css/wiki-bundle.css');\n }",
"protected function setupLayout()\n\t{\n\t\tif (!is_null($this->layout)) {\n\t\t\t$this->layout = view($this->layout);\n\t\t}\n\t}",
"protected function setupLayout()\n\t{\n\t\tif (!is_null($this->layout)) {\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}",
"protected function _prepareLayout()\n {\n $public_key = Mage::getStoreConfig(MercadoPago_Core_Helper_Data::XML_PATH_PUBLIC_KEY);\n\n //init js no header\n $block = Mage::app()->getLayout()->createBlock('core/text', 'js_mercadopago');\n if (Mage::getStoreConfigFlag(MercadoPago_OneStepCheckout_Helper_Data::XML_PATH_ONS_ACTIVE)) {\n $block->setText(\n sprintf(\n '\n <script type=\"text/javascript\">var PublicKeyMercadoPagoCustom = \"' . $public_key . '\";</script>\n <script src=\"https://secure.mlstatic.com/sdk/javascript/v1/mercadopago.js\"></script>\n <script type=\"text/javascript\" src=\"%s\"></script>\n <script type=\"text/javascript\" src=\"%s\"></script>\n <script type=\"text/javascript\" src=\"%s\"></script>',\n Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS, true) . 'mercadopago/mercadopago_osc.js',\n Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS, true) . 'mercadopago/tiny.min.js',\n Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_JS, true) . 'mercadopago/tinyJ.js'\n )\n );\n\n $head = Mage::app()->getLayout()->getBlock('after_body_start');\n\n if ($head) {\n $head->append($block);\n }\n\n return Mage_Payment_Block_Form_Cc::_prepareLayout();\n } else {\n return parent::_prepareLayout();\n }\n\n }",
"protected function setupLayout() {\n if ( ! is_null($this->layout)) {\n $this->layout = View::make($this->layout);\n }\n }",
"protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}",
"protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}",
"protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}",
"protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}",
"protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}",
"protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}",
"protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}",
"protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}",
"protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}",
"protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}",
"protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}",
"protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}",
"protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}",
"protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}",
"protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}",
"protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}",
"protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}",
"protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}",
"protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}",
"protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}",
"protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}",
"protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}",
"protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}",
"protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}",
"protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}",
"protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}",
"protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}",
"protected function setupLayout()\n {\n if( ! is_null($this->layout))\n {\n $this->layout = View::make($this->layout);\n }\n }",
"protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout)) {\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}",
"public function index_hmvc()\n\t{\n\t\tLoad::template(\"Header\");\n\t\tLoad::view(\"Homepage\", \"Index\");\n\t\tLoad::template(\"Footer\");\n\t}",
"protected function setupLayout()\n {\n if ( ! is_null($this->layout))\n {\n $this->layout = View::make($this->layout);\n }\n }",
"protected function setupLayout()\n {\n if ( ! is_null($this->layout))\n {\n $this->layout = View::make($this->layout);\n }\n }",
"protected function setupLayout()\n {\n if (!is_null($this->layout)) {\n $this->layout = View::make($this->layout);\n }\n }",
"protected function setupLayout()\n {\n if (!is_null($this->layout)) {\n $this->layout = View::make($this->layout);\n }\n }",
"protected function setupLayout()\n {\n if (!is_null($this->layout)) {\n $this->layout = View::make($this->layout);\n }\n }",
"protected function setupLayout()\n {\n if (!is_null($this->layout)) {\n $this->layout = View::make($this->layout);\n }\n }",
"protected function setupLayout()\n {\n if (!is_null($this->layout)) {\n $this->layout = View::make($this->layout);\n }\n }",
"protected function contenidoLayout(){\n ob_start();\n include_once Application::$ROOT_DIR . \"/views/layouts/principal.php\";\n return ob_get_clean();\n }",
"protected function setNonAuthenticatedPageLayout() {\n if (!$this->app->router->isWsCall) {\n require __ROOT__ . Enums\\ApplicationFolderName::AppsFolderName . $this->app->name() . Enums\\FileNameConst::HeaderTemplate;\n }\n\n require __ROOT__ . Enums\\ApplicationFolderName::AppsFolderName . $this->app->name() . Enums\\FileNameConst::ContenTemplate;\n\n if (!$this->app->router->isWsCall) {\n require __ROOT__ . Enums\\ApplicationFolderName::AppsFolderName . $this->app->name() . Enums\\FileNameConst::FooterTemplate;\n }\n }",
"protected function _prepareLayout()\n {\n parent::_prepareLayout();\n if (Mage::getSingleton('cms/wysiwyg_config')->isEnabled()) {\n $this->getLayout()->getBlock('head')->setCanLoadTinyMce(true);\n }\n }",
"protected function _prepareLayout()\n {\n parent::_prepareLayout();\n if (Mage::getSingleton('cms/wysiwyg_config')->isEnabled()) {\n $this->getLayout()->getBlock('head')->setCanLoadTinyMce(true);\n }\n }",
"protected function setupLayout()\n {\n if (! is_null($this->layout)) {\n $this->layout = View::make($this->layout);\n }\n }",
"public function initialize()\n {\n\t\tparent::initialize();\n\t\t$this->viewBuilder()->layout('admin');\n\t\t\n }",
"protected function setupLayout()\n {\n if ( ! is_null($this->layout))\n {\n $this->layout = View::make($this->layout);\n }\n }",
"protected function setupLayout()\n {\n if ( ! is_null($this->layout))\n {\n $this->layout = View::make($this->layout);\n }\n }",
"protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout) && ! $this->is_pjax())\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}",
"function loadLayout($get_where=\"\",$layoutPath=\"layout/\",$layoutFile=\"layout.php\") {\n\t\tglobal $__;\n\t\t$__['main'] = $__['pathPage'].$get_where;\n include $layoutPath.$layoutFile;\n\t}",
"protected function _prepareLayout()\n {\n parent::_prepareLayout();\n \n if ( Mage::getSingleton('magna_news/wysiwyg_config')->isEnabled() )\n {\n $this->getLayout()->getBlock('head')->setCanLoadTinyMce(true);\n }\n }",
"protected function makeViewLayout()\n {\n new MakeLayout($this, $this->files);\n }",
"public function init()\n {\n \t$this->view->layout = array();\n }",
"public function xlayouts() {\n\t\t$templates = $this->getModel ( 'layout' );\n\t\t$templates->getAll ( 'appliesto = \"Global\"' );\n\t\t/* set last view into session */\n\t\t$this->session->returnto ( $this->getView () );\n\t\t\n\t\t$this->setView ( 'layouts' );\n\t}",
"protected function setupLayout()\n {\n if ( ! is_null($this->layout))\n {\n\n if (Request::Ajax())\n {\n $this->layout = View::make('layouts.ajax');\n }\n else\n $this->layout = View::make($this->layout);\n\n $this->layout->content = \" \";\n }\n }",
"public function getLayout();",
"public function getLayout() {}",
"protected function _prepareLayout()\n {\n $this->getLayout()->getBlock('head')->addCss('css/buckaroo_buckaroo3extended/supportTab.css');\n return parent::_prepareLayout();\n }",
"protected function setupLayout() {\n\t\t$this->data['route'] = Route::getCurrentRoute()->getPath();\t\n\t\tif ( ! is_null($this->layout)) {\n\t\t\t$this->data['enrolledCourses'] = NULL;\n\t\t\t\n\t\t\tif (Auth::check() && in_array(Auth::user()->user_type, array(3, 5))) {\n\t\t\t\t$this->data['enrolledCourses'] = EnrolledCourses::getEnrolledCourses();\n\t\t\t\t$this->data['endedCourses'] = EnrolledCourses::getEndedCourses();\n\t\t\t\t$this->data['profiling'] = User::getRegProfile();\t\n\t\t\t\t$this->data['profiling_ctr'] = $this->data['profiling'];\t\t\t\t\n\t\t\t} else if (Auth::check() && Auth::user()->user_type == 2) {\n\t\t\t\t$this->data['assigned_courses'] = Courses::getAssignedCourses();\n\t\t\t}\n\n\t\t\t$this->layout = View::make($this->layout, $this->data);\n\t\t}\n\t}",
"public function _prepareLayout()\n {\n $this->setTemplate('authorizenetcim/form/cc.phtml');\n }",
"protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\n\t\t$this->setLocale();\n\t}",
"protected function setupLayout()\n\t{\n\t\t$button['text'] = \"login\";\n\t\t$button['url'] = route('login');\n\n\t\tif(Auth::check())\n\t\t{\n\t\t\t$button['text'] = \"logout\";\n\t\t\t$button['url'] = route('logout');\n\t\t\t$this->logged_in_user = Auth::user();\n\t\t\t$notif = new Notification();\n\t\t\t$notifications = $notif->getNotifications($this->logged_in_user->id);\n\t\t\t$new = 0;\n\t\t\tforeach ($notifications as $not) {\n\t\t\t\tif($not->seen == 0)\n\t\t\t\t{\n\t\t\t\t\t$new++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$rating_types = RatingType::getRatingTypes($this->logged_in_user->id);\n\n\t\t\tView::share('notifications', $notifications);\n\t\t\tView::share('new', $new);\n\t\t\tView::share('rating_types', $rating_types);\n\t\t\tView::share('logged_in_user', $this->logged_in_user);\n\t\t}\n\n\t\tView::share('button', $button);\n\t\tView::share('show_feed', $this->show_feed);\n\t\t//Get image path info for all poster and backdrop images\n\t\t$t = new TheMovieDb();\n \t\t$this->image_path_config = $t->getImgPath();\n\t\tView::share('image_path_config', $this->image_path_config);\n\n\n\t\t\n\n\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}",
"public function view(){\n parent::view();\n $this->addFooterItem( $this->getHelper('html')->css('unique/home-parallax.css', self::PACKAGE_HANDLE) );\n $this->addFooterItem( $this->jsAsync($this->getHelper('html')->javascript('home-parallax.js', self::PACKAGE_HANDLE)) );\n }",
"private function __layoutContent()\n {\n return VIEWS . DS . 'Layout' . DS . 'base.php';\n }",
"public function Index(){\n require_once 'view/header.php';\n require_once 'view/categoria/categoria.php';\n require_once 'view/footer.php';\n\n \n }",
"public function horizontalLayout() {\n }",
"public function index()\n {\n require 'application/views/_templates/header.json.php';\n require 'application/views/json/index.php';\n require 'application/views/_templates/footer.json.php';\n }",
"public function index(){\n require_once('views/layout_admin/header.php');\n require_once('views/layout_admin/navbar.php');\n require_once('views/layout_admin/sidebar.php'); \n require_once('views/factura/index.php');\n require_once('views/layout_admin/footer.php');\n }",
"public function init()\n {\n $this->getHelper('layout')->setLayout('manage-layout');\n }",
"public function init()\n {\n $this->_helper->layout()->setLayoutPath(APPLICATION_PATH . \"/layouts/scripts/\");\n $this->_helper->layout()->setLayout('admin');\n }"
]
| [
"0.6537857",
"0.6465412",
"0.63601327",
"0.6145113",
"0.6118058",
"0.6042751",
"0.6024659",
"0.6010295",
"0.60067576",
"0.6003343",
"0.59938",
"0.59864825",
"0.59856987",
"0.59473765",
"0.59315103",
"0.5922233",
"0.58887184",
"0.5876359",
"0.58761895",
"0.5851238",
"0.5821605",
"0.5813838",
"0.5813101",
"0.5811682",
"0.58057123",
"0.5797811",
"0.57968074",
"0.5788704",
"0.57817745",
"0.57765865",
"0.57739604",
"0.5770842",
"0.5770543",
"0.5766554",
"0.57650495",
"0.57650495",
"0.57650495",
"0.57650495",
"0.57650495",
"0.57650495",
"0.57650495",
"0.57650495",
"0.57650495",
"0.57650495",
"0.57650495",
"0.57650495",
"0.57650495",
"0.57650495",
"0.57650495",
"0.57650495",
"0.57650495",
"0.57650495",
"0.57650495",
"0.57650495",
"0.57650495",
"0.57650495",
"0.57650495",
"0.57650495",
"0.57650495",
"0.57650495",
"0.57650495",
"0.5764581",
"0.57557076",
"0.5753951",
"0.5752296",
"0.5752296",
"0.57367766",
"0.57367766",
"0.57367766",
"0.57367766",
"0.57367766",
"0.5736403",
"0.5734952",
"0.5730214",
"0.5730214",
"0.57243764",
"0.57219946",
"0.5721494",
"0.5721494",
"0.57041204",
"0.56909883",
"0.5680805",
"0.56782377",
"0.5674028",
"0.5670074",
"0.56674194",
"0.56587255",
"0.56378645",
"0.56162274",
"0.56136954",
"0.559528",
"0.55941546",
"0.5584814",
"0.5575893",
"0.55682755",
"0.5559727",
"0.55534196",
"0.5548299",
"0.5542039",
"0.5539487",
"0.5510266"
]
| 0.0 | -1 |
Define attribute class for shortcodes | public function get_css_class( $css, $data ) {
$css_class = trim(apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, vc_shortcode_custom_css_class( $css, ' ' ), $data['wpb']->settings('base'), $data['atts'] ));
$css_class .= !empty($data['atts']['classes']) && trim($data['atts']['classes']) ? (($css_class ? ' ':'') . trim($data['atts']['classes'])):'';
return $css_class;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function shortCodeMagic($att, $content = NULL)\n {\n\n }",
"public function getShortcode();",
"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}",
"public function renderShortcode(ShortcodeAttributes $atts, $content);",
"function icon_shortcode($atts, $content = NULL) {\n $a = shortcode_atts( array(\n 'class' => ''\n ), $atts );\n $content = '<span class=\"fa '.$class.'\"></span>';\n return $content;\n}",
"public function add_short_code()\n {\n add_shortcode('colorYourLife', array($this, 'generate_short_code_content'));\n }",
"function shortcode_atts($pairs, $atts, $shortcode = '')\n {\n }",
"public function setShortcodeParser(ShortcodeParser $parser);",
"private function __construct() {\n\t\tadd_shortcode( 'get-accessibility-statement', array( $this, 'vi_accessibility_callback' ) );\n\n\t}",
"public function initAttribute();",
"function hello_shortcode($atts, $content = null, $tag){\n //put $atts in $a..\n $a = shortcode_atts(array(\n 'class' => 'no_class'\n ), $atts);\n\n return \"<div class='small=12 panel rounded \" . $a['class'] . \"'>\" . $content . \"</div>\";\n}",
"function acf_shortcode($atts)\n{\n}",
"public function register($shortCode)\n {\n $this->shortCode = $shortCode;\n\n return $this;\n }",
"protected function pakClassAttr(): string\n {\n return \"class='{$this->pakClass($this->class)}'\";\n }",
"public function getShortcodeReplace();",
"public function handleShortcodes($attr, $content)\r\n {\r\n $this->mapNum++;\r\n $mapInfo = $this->getMapDetails($attr, $content);\r\n if (function_exists('json_encode')) {\r\n \t$json = json_encode($mapInfo);\r\n } else {\r\n\t\t\trequire_once('json_encode.php');\r\n \t$json = Zend_Json_Encoder::encode($mapInfo);\r\n\t\t}\r\n\r\n return <<<mapCode\r\n<div id='map_{$this->mapNum}' style='width:{$mapInfo->width}; height:{$mapInfo->height};' class='googleMap'></div>\r\n<div id='dir_{$this->mapNum}'></div>\r\n<script type=\"text/javascript\">\r\n//<![CDATA[\r\nif (GBrowserIsCompatible()) {\r\n wpGMaps.wpNewMap({$this->mapNum}, {$json});\r\n}\r\n//]]>\r\n</script>\r\nmapCode;\r\n }",
"public function __construct ($attrs);",
"public function shortcode($attr){\n\t\t$default = array(\n\t\t\t'type' => $this->options('name'),\n\t\t);\n\t\tif ( is_array( $attr ) ) {\n\t\t\t$attr = array_merge( $default, $attr );\n\t\t}else{\n\t\t\t$attr = $default;\n\t\t}\n\t\treturn sc_object_list( $attr );\n\t}",
"public function video_sc_attr() {\n\n\t\t\t\t$attr = [\n\t\t\t\t\t'class' => 'video-shortcode',\n\t\t\t\t];\n\n\t\t\t\tif ( 'yes' === $this->args['center'] ) {\n\t\t\t\t\t$attr['style'] = 'max-width:' . $this->args['width'] . 'px;max-height:' . $this->args['height'] . 'px;';\n\t\t\t\t}\n\n\t\t\t\treturn $attr;\n\n\t\t\t}",
"function studiare_class_attribute($value) {\n\techo studiare_get_class_attribute($value);\n}",
"public function __construct() {\n\t\t\tadd_shortcode( 'property_title', array( $this, 'property_title' ) );\n\t\t\tadd_shortcode( 'property_address', array( $this, 'property_address' ) );\n\t\t\tadd_shortcode( 'property_overview_desc', array( $this, 'property_overview_desc' ) );\n\t\t\tadd_shortcode( 'property_price', array( $this, 'property_price' ) );\n\t\t\tadd_shortcode( 'property_snapshot', array( $this, 'property_snapshot' ) );\n\t\t\tadd_shortcode( 'property_type_of_practice', array( $this, 'property_type_of_practice' ) );\n\t\t\tadd_shortcode( 'property_staff', array( $this, 'property_staff' ) );\n\t\t\tadd_shortcode( 'property_facilities', array( $this, 'property_facilities' ) );\n\t\t\tadd_shortcode( 'property_services_professional', array( $this, 'property_services_professional' ) );\n\t\t\tadd_shortcode( 'property_services_ancillary', array( $this, 'property_services_ancillary' ) );\n\t\t\tadd_shortcode( 'property_three_fields', array( $this, 'property_three_fields' ) );\n\t\t}",
"function htheme_instagram_shortcode( $atts ) {\r\n\r\n\t\t#SETUP CONTENT CLASS\r\n\t\t$htheme_data = $this->htheme_content->htheme_get_instagram($atts);\r\n\r\n\t\t#RETURN DATA/HTML\r\n\t\treturn $htheme_data;\r\n\r\n\t}",
"function button_shortcode($atts, $content = NULL) {\n $a = shortcode_atts( array(\n 'class' => ''\n ), $atts );\n $content = '<span class=\"button '.$class.'\">'.$content.'</span>';\n return $content;\n}",
"public static function parse_shortcode($attributes, $content, $parser, $shortcode): string;",
"public function __construct()\n {\n $this->uncompiled = true;\n $this->short_open_tag = ini_get('short_open_tag');\n }",
"function Hippo_Widget_Attributes() {\n\t\t\tnew Hippo_Widget_Attributes();\n\t\t}",
"public function testRenderShortcodeHandlesClassAttributeAsArray() {\n\t\tM::wpFunction( 'shortcode_atts', array(\n\t\t\t'return' => array(\n\t\t\t\t'class' => array( 'some-class', 'another-class' ),\n\t\t\t\t'tags' => 'h1,h2,h3',\n\t\t\t\t'title' => false,\n\t\t\t),\n\t\t) );\n\n\t\tM::wpFunction( 'get_the_content', array(\n\t\t\t'return' => '<h2 id=\"first-heading\">First heading</h2>',\n\t\t) );\n\n\t\tM::wpFunction( __NAMESPACE__ . '\\build_link_list', array(\n\t\t\t'return' => array(\n\t\t\t\t'<a href=\"#first-heading\">First heading</a>',\n\t\t\t),\n\t\t) );\n\n\t\tM::wpPassthruFunction( 'Growella\\TableOfContents\\Headings\\inject_heading_ids' );\n\t\tM::wpPassthruFunction( '_x' );\n\t\tM::wpPassthruFunction( 'esc_attr' );\n\n\t\t$this->assertContains(\n\t\t\t'class=\"growella-table-of-contents some-class another-class\"',\n\t\t\trender_shortcode( array() )\n\t\t);\n\t}",
"public function __construct() {\n $this->shortcode_list = array(\"BjCPMmGF3xh\", \"BihtPRnFTZl\", \n \"BheksGclKnK\", \"BhL2uXKHE4M\", \"BgZA-1vja95\", \"Bdux68VHt_Q\", \"BZoLp1KlE2h\");\n }",
"public function toAttribute()\n {\n }",
"static public function shortcode($atts){\n $types = isset($attr['types']) && $attr['types'] ? explode(',', $attr['types']) : [];\n return self::render($types);\n }",
"public function __construct($shortcode){\n\t\tglobal $shortcode_tags;\n\t\t\n\t\tif (!key_exists($shortcode, $shortcode_tags)){\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$this->_shortcode = $shortcode;\n\t\t$this->_function_name = $shortcode_tags[$shortcode];\n\t\t\n\t\tif (is_string($this->_function_name)){\n\t\t\t$this->_function_reflection = new ReflectionFunction($this->_function_name);\n\t\t} else if (is_array($this->_function_name)) {\n\t\t\t$this->_function_reflection = new ReflectionMethod ($this->_function_name[0],$this->_function_name[1]);\n\t\t}\n\t}",
"public function __construct() {\n add_shortcode('actionTracker', [ $this, 'handleShortcode' ]); \n }",
"public function defineContentAttribute()\n\t{\n\t\treturn AttributeType::Mixed;\n\t}",
"function shortcode_parse_atts($text)\n {\n }",
"function htheme_map_shortcode( $atts ) {\r\n\r\n\t\t#SETUP CONTENT CLASS\r\n\t\t$htheme_data = $this->htheme_content->htheme_get_map($atts);\r\n\r\n\t\t#RETURN DATA/HTML\r\n\t\treturn $htheme_data;\r\n\r\n\t}",
"function flex_video_shortcode($atts, $content = NULL) {\n $a = shortcode_atts( array(\n 'aspect' => ''\n ), $atts );\n $aspect = ($a['aspect'] == 'standard') ? '' : 'widescreen';\n $content = '<div class=\"flexvideo '.$aspect.'\">'.$content.'</div>';\n return $content;\n}",
"public function setShort($short) {\n $this->short = $short;\n return $this;\n }",
"function sm_shortcode( $atts ) {\n\t$a = shortcode_atts( array(\n\t\t'post-id' => get_the_ID() ,\n\t\t'key' => '',\n\t\t'single' => false,\n ), $atts );\t\n \n return get_post_meta( $a[\"post-id\"], $a[\"key\"], $a[\"post-id\"] ) ;\n\n}",
"function std_attr($at){\n switch($at){\n case 'wrap': $attr = array('id'=>strval($this->obj->id));break;\n default:\n $attr = array();\n\n }\n return new opc_attrs(NULL,$attr);\n }",
"public function attr() {\n\n\t\t$attr = fusion_builder_visibility_atts( self::$args['hide_on_mobile'], array(\n\t\t\t'class' => 'fusion-social-links',\n\t\t) );\n\n\t\tif ( self::$args['class'] ) {\n\t\t\t$attr['class'] .= ' ' . self::$args['class'];\n\t\t}\n\n\t\tif ( self::$args['id'] ) {\n\t\t\t$attr['id'] = self::$args['id'];\n\t\t}\n\n\t\treturn $attr;\n\n\t}",
"public function shortName();",
"abstract protected function attributes();",
"public function attributes();",
"function custom_add_artwork_attr( $attributes ){\n\t\t\t$attributes['class'] .= ' equalize col-xs-12 col-sm-6 col-md-4';\n\t\t\t$attributes['itemtype'] = 'http://schema.org/ArtworkArticle';\n\t\t\t// return the attributes\n\t\t\treturn $attributes;\n\t\t}",
"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 '© '.implode(',',$attrs);\n}",
"function gymfitness_a_class($atts,$item,$args) {\n \n $atts['class'] = 'nav-link pl-3 pr-3';\n \n return $atts;\n}",
"function htheme_banner_shortcode( $atts ) {\r\n\r\n\t\t#SETUP CONTENT CLASS\r\n\t\t$htheme_data = $this->htheme_content->htheme_get_content_banner($atts);\r\n\r\n\t\t#RETURN DATA/HTML\r\n\t\treturn $htheme_data;\r\n\r\n\t}",
"public abstract function do_shortcode( $atts, $content, $tag );",
"public function getClassShortName(string $class);",
"public function shortcode($attr){\n\t\t$default = array(\n\t\t\t'type' => $this->options('name'),\n\t\t\t'orderby' => 'post_date',\n\t\t\t'order' => 'DESC'\n\t\t);\n\t\tif (is_array($attr)){\n\t\t\t$attr = array_merge($default, $attr);\n\t\t}else{\n\t\t\t$attr = $default;\n\t\t}\n\t\treturn sc_object_list($attr);\n\t}",
"protected function registerUniversalTagAttributes() {}",
"public function __construct(array $attributes = []);",
"public function nextAttribute();",
"public function __construct() {\n\n $this->config = array(\n\n // Handle will be used to use this shortcode\n 'handle' => 'cv_button',\n\n // Whether or not this is a shortcode composer element\n 'composer_element' => true,\n\n // Whether or not this is a template builder element\n 'builder_element' => false,\n\n // Used by the template builder to determine where module can be dropped\n 'drop_target' => 2,\n\n // Used by the template builder to determine where module can have other\n // modules dropped inside of it\n 'drop_zone' => false,\n\n // Title will be used to identify this shortcode\n 'title' => __( 'Button', 'canvys' ),\n\n // Icon will be used to represent this shortcode in composer/builder\n // List of available icons can be found in icons.json\n 'icon' => 'link',\n\n // Whether or not shortcode is self closing\n 'self_closing' => true,\n\n // If shortcode is not self closing, specify its default content\n 'default_content' => null,\n\n // Specify whether or not content is directly editable\n 'content_editor' => false,\n\n // Specify whether or not the content is composed of another shortcode\n 'content_element' => false,\n\n // Array of shortcode settings and their respective attributes\n 'attributes' => array(\n\n new CV_Shortcode_Text_Control( 'text', array(\n 'title' => __( 'Text', 'canvys' ),\n 'description' => __( 'Specify the text for this button, if left blank the button will not be displayed.', 'canvys' ),\n ) ),\n\n new CV_Shortcode_Link_Control( 'url', array(\n 'title' => __( 'URL', 'canvys' ),\n 'description' => __( 'Specify the URL for this button.', 'canvys' ),\n ) ),\n\n new CV_Shortcode_Select_Control( 'size', array(\n 'title' => __( 'Size', 'canvys' ),\n 'description' => __( 'Specify the size for this button.', 'canvys' ),\n 'default' => 'standard',\n 'options' => array(\n 'small' => __( 'Small', 'canvys' ),\n 'medium' => __( 'Medium', 'canvys' ),\n 'large' => __( 'Large', 'canvys' ),\n ),\n ) ),\n\n new CV_Shortcode_Select_Control( 'style', array(\n 'title' => __( 'Style', 'canvys' ),\n 'description' => __( 'Specify the style for this button.', 'canvys' ),\n 'default' => 'ghost',\n 'options' => array(\n 'ghost' => __( 'Ghost', 'canvys' ),\n 'filled' => __( 'Filled', 'canvys' ),\n 'glassy' => __( 'Glassy', 'canvys' ),\n ),\n ) ),\n\n new CV_Shortcode_Select_Control( 'color', array(\n 'title' => __( 'Color', 'canvys' ),\n 'description' => __( 'Specify the color for this button.', 'canvys' ),\n 'default' => 'content',\n 'options' => array(\n 'theme_colors' => array(\n 'label' => __( 'Theme Colors', 'canvys' ),\n 'options' => array(\n 'content' => __( 'Normal Content', 'canvys' ),\n 'headers' => __( 'Headers', 'canvys' ),\n 'accent' => __( 'Accent', 'canvys' ),\n 'focused' => __( 'Accent Focused', 'canvys' ),\n ),\n ),\n 'preset_colors' => array(\n 'label' => __( 'Preset Colors', 'canvys' ),\n 'options' => array(\n 'green' => __( 'Green', 'canvys' ),\n 'blue' => __( 'Blue', 'canvys' ),\n 'red' => __( 'Red', 'canvys' ),\n ),\n ),\n 'custom_color' => array(\n 'label' => __( 'Select Custom', 'canvys' ),\n 'options' => array(\n 'custom' => __( 'Custom Color', 'canvys' ),\n ),\n ),\n ),\n ) ),\n\n new CV_Shortcode_Color_Control( 'custom_color', array(\n 'title' => __( 'Custom Color', 'canvys' ),\n 'description' => __( 'Specify a custom color to use for this button.', 'canvys' ),\n ) ),\n\n new CV_Shortcode_Select_Control( 'icon_position', array(\n 'title' => __( 'Icon Position', 'canvys' ),\n 'description' => __( 'Specify whether or not this button should have an icon, and where it should be placed.', 'canvys' ),\n 'default' => 'none',\n 'options' => array(\n 'none' => __( 'No Icon', 'canvys' ),\n 'after' => __( 'After the button', 'canvys' ),\n 'before' => __( 'Before the button', 'canvys' ),\n ),\n ) ),\n\n new CV_Shortcode_Icon_Control( 'icon', array(\n 'title' => __( 'Icon', 'canvys' ),\n 'description' => __( 'Specify an icon to be displayed within this button.', 'canvys' ),\n ) ),\n\n ),\n\n );\n }",
"public function addShortcode()\n {\n WPShortcode::addShortCode('acoBolsista', $this->todo->getController('indicacao'), 'acoBolsistaShortcode');\n WPShortcode::addShortCode('acoVoluntario', $this->todo->getController('indicacao'), 'acoVoluntarioShortcode');\n WPShortcode::addShortCode('acoColaborador', $this->todo->getController('indicacao'), 'acoColaboradorShortcode');\n WPShortcode::addShortCode('pibexBolsista', $this->todo->getController('indicacao'), 'pibexBolsistaShortcode');\n WPShortcode::addShortCode('pibexVoluntario', $this->todo->getController('indicacao'), 'pibexVoluntarioShortcode');\n WPShortcode::addShortCode('pibexColaborador', $this->todo->getController('indicacao'), 'pibexColaboradorShortcode');\n }",
"function small_button( $atts, $content ) {\n return '<div class=\"small_button '.$atts['class'].'\">' . $content . '</div>';\n}",
"public function __construct() {\n parent::__construct();\n //setting attribute types.\n settype($this->id, \"integer\");\n settype($this->name, \"string\");\n settype($this->question_type_id, \"integer\");\n }",
"protected function get_name() {\n\t\treturn 'stravaapi_shortcode';\n\t}",
"public function define_attribute($attribute,$value)\n\t\t{\n\t\t\tif(!isset($this->matchcode[$attribute]))\n\t\t\t{\n\t\t\t\terror_log(__FILE__.' name '.$attribute.' not defined in matchcode array');die();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif($this->matchcode[$attribute][1] == 'A' || $this->matchcode[$attribute][1] == 'W')\n\t\t\t\t{\n\t\t\t\t\t$var = $this->matchcode[$attribute][0];\n\t\t\t\t\t$this->$var = $value;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\terror_log(__FILE__.' name '.$attribute.' no write access');die();\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"function pt_shortcode( $atts )\n\t\t{\n\t\t\treturn $this->pt_show_blc_front();\n\t\t}",
"public function __construct() {\n\n $this->config = array(\n\n // Handle will be used to use this shortcode\n 'handle' => 'cv_icon_box_child',\n\n // Whether or not this is a shortcode composer element\n 'composer_element' => false,\n\n // Whether or not this is a template builder element\n 'builder_element' => true,\n\n // Used by the template builder to determine where module can be dropped\n 'drop_target' => 3,\n\n // Used by the template builder to determine where module can have other\n // modules dropped inside of it\n 'drop_zone' => false,\n\n // Title will be used to identify this shortcode\n 'title' => __( 'Icon Box', 'canvys' ),\n\n // Icon will be used to represent this shortcode in composer/builder\n // List of available icons can be found in icons.json\n 'icon' => 'info-circled',\n\n // Whether or not shortcode is self closing\n 'self_closing' => false,\n\n // If shortcode is not self closing, specify its default content\n 'default_content' => null,\n\n // Specify whether or not content is directly editable\n 'content_editor' => true,\n\n // Specify whether or not the content is composed of another shortcode\n 'content_element' => false,\n\n // Array of shortcode settings and their respective attributes\n 'attributes' => array(\n\n new CV_Shortcode_Text_Control( 'title', array(\n 'title' => __( 'Title', 'canvys' ),\n 'description' => __( 'Icon Box Title, will default to \"Check this out\" if left blank.', 'canvys' ),\n 'placeholder' => __( 'Check this out', 'canvys' ),\n ) ),\n\n new CV_Shortcode_Link_Control( 'url', array(\n 'title' => __( 'Icon Box Link', 'canvys' ),\n 'description' => __( 'Wrap this icon box in a link. <strong>Do not use this setting if you plan on placing a link within the content of this icon box.</strong>', 'canvys' ),\n ) ),\n\n new CV_Shortcode_Color_Control( 'icon_color', array(\n 'title' => __( 'Icon Color', 'canvys' ),\n 'description' => __( 'Specify a custom color to use for the icon, if none is specified the default color will be used.', 'canvys' ),\n ) ),\n\n new CV_Shortcode_Icon_Control( 'icon', array(\n 'title' => __( 'Icon', 'canvys' ),\n 'description' => __( 'Select the icon for this icon box.', 'canvys' ),\n ) ),\n\n ),\n\n );\n }",
"function shortcode_input( $atts ){\n\n $a = shortcode_atts( [\n 'placeholder' => 'Please Fill Out',\n 'name' => '',\n 'for' => '',\n 'id' => '',\n 'label_name' => 'Label',\n 'label_class' => '',\n 'input_class' => '',\n 'display' => 'block'\n ],\n $atts);\n\n return \"<label style='display:{$a['display']};' class='{$a['label_class']}' for='{$a['for']}'>{$a['label_name']}:</label>\n <input class='{$a['input_class']}' placeholder='{$a['placeholder']}' name='{$a['name']}' id='{$a['id']}'/>\n \";\n\n}",
"public function __construct()\n {\n parent::__construct();\n $this->registerUniversalTagAttributes();\n $this->registerArgument('phoneNumber', 'string', 'The phone number to link', true);\n $this->registerArgument(\n 'countryCode',\n 'string',\n 'The country calling code to use (defaults to \"49\")',\n false,\n '49'\n );\n $this->registerArgument('content', 'string', 'The content of the resulting tag');\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}",
"public function __construct() {\r\n parent::__construct( 'attributes' );\r\n\r\n if ( isset( $this->attribute_id ) )\r\n $this->id = $this->attribute_id;\r\n }",
"function sp_audio_sc( $atts ) {\n\n\textract( shortcode_atts( array(\n\t\t'mp3' => '',\n\t\t'ogg' => '',\n\t\t'width' => '',\n\t\t'height' => '',\n\t\t'preload' => false,\n\t\t'autoplay' => false,\n\t), $atts ) );\n\n\tglobal $post;\n\n\tif ( $mp3 )\n\t\t$mp3 = '<source src=\"' . $mp3 . '\" type=\"audio/mp3\" />';\n\n\tif ( $ogg )\n\t\t$ogg = '<source src=\"' . $ogg . '\" type=\"audio/ogg\" />';\n\n\tif ( $preload )\n\t\t$preload = 'preload=\"' . $preload . '\"';\n\n\tif ( $autoplay )\n\t\t$autoplay = 'autoplay';\n\n\t$output = \"<audio id='AudioPlayerV1-id-$post->ID' class='AudioPlayerV1' width='100%' height='29' controls {$preload} {$autoplay} data-fallback='\" . SP_BASE_URL . \"js/audioplayerv1.swf'>\n\t\t\t\t\t{$mp3}\n\t\t\t\t\t{$ogg}\n\t\t\t\t</audio>\";\n\n\treturn $output;\n\n}",
"public function __construct()\n {\n $this->validTagAttributes = array_merge($this->validTagAttributes, [\n 'minlength' => true\n ]);\n }",
"public function createAttribute()\n\t{\n\n\t\t$this->createCustomAttribute($this->attributeName, $this->arguments);\n\n\t}",
"function wp_super_emoticons_shortcode ($attr, $content = null ) {\n\t$attr = shortcode_atts(array(\n\t\t'file' => 'file',\n\t\t'title' => 'title'\n\t\t), $attr);\n\t\t\t\t\t\t\t\t \n\treturn '<img class=\"superemotions\" title=\"' . $attr['title'] . '\" alt=\"' . $attr['title'] . '\" border=\"0\" src=\"' . get_bloginfo('wpurl') . '/wp-includes/images/smilies/' . $attr['file'] . '\" />';\n}",
"protected function setShortDataType()\n {\n // TODO: Implement setShortDataType() method.\n return \"SSAM\";\n }",
"function mr_megaresult_shortcode_handler( $attrs, $content=null) {\n return \"look, a shortcode!\";\n}",
"function kw_youtube_short( $atts, $content = null )\r\n{\r\n\r\n extract( shortcode_atts( array(\r\n 'id' => '',\r\n ), $atts ) );\r\n\t \r\n\t$id = trim($id);\r\n\t$kw_spaces = get_option(\"kw_spaces\");\r\n\t$kw_spaces = stripslashes($kw_spaces);\r\n\t$kw_width = get_option(\"kw_width\");\r\n\t$kw_width = stripslashes($kw_width);\r\n\t$kw_height = get_option(\"kw_height\");\r\n\t$kw_height = stripslashes($kw_height);\r\n\t$kw_bgcolor = get_option(\"kw_bgcolor\");\r\n\t$kw_bgcolor = stripslashes($kw_bgcolor);\r\n\t$kw_api = get_option(\"kw_api\");\r\n\t$kw_api = stripslashes($kw_api);\r\n \r\nreturn ''.$kw_spaces.'<object width=\"'.$kw_width.'\" height=\"'.$kw_height.'\"><param name=\"movie\" value=\"http://www.youtube.com/v/'.$id.''.$kw_api.'\" /><param name=\"allowFullScreen\" value=\"true\" /><param name=\"allowscriptaccess\" value=\"always\" /><param name=\"bgcolor\" value=\"'.$kw_bgcolor.'\"><embed type=\"application/x-shockwave-flash\" width=\"'.$kw_width.'\" height=\"'.$kw_height.'\" src=\"http://www.youtube.com/v/'.$id.''.$kw_api.'\" bgcolor=\"'.$kw_bgcolor.'\" allowscriptaccess=\"always\" allowfullscreen=\"true\"></embed></object>'.$kw_spaces.'';\r\n}",
"function unique_entry_mood_shortcode( $attr ) {\r\n\r\n\t$attr = shortcode_atts( array( 'before' => '', 'after' => '' ), $attr );\r\n\r\n\t$mood = get_post_meta( get_the_ID(), 'mood', true );\r\n\r\n\tif ( !empty( $mood ) )\r\n\t\t$mood = $attr['before'] . convert_smilies( $mood ) . $attr['after'];\r\n\r\n\treturn $mood;\r\n}",
"function useattrib($attribute) { atkuse(\"attribute\", $attribute); }",
"private function add_short_code($short_code)\n\t{\n\t\tarray_push($this->shortcodes, $short_code);\n\t}",
"private function process_raw_shortcode()\n\t{\n\t // GENERAL DETAILS\n\t $this->length \t= strlen($this->raw);\n\t $this->end\t= $this->start + $this->length;\n\n\t // KEY & VALUE\n\t $key_val_pair \t= explode('::', $this->raw);\n\n\t // check to see if both key and value have been given\n\t if (sizeof($key_val_pair) > 1)\n\t {\n\t\t $this->key = $key_val_pair[0];\n\t\t $this->value = $key_val_pair[1];\t\n\t }else{\n\t\t $http = strpos($this->raw, 'http');\n\n\t\t if($http === false){\n\t\t\t $this->key = 'internal';\n\t\t }else{\n\t\t\t $this->key = 'external';\n\t\t }\n\t\t $this->value = $this->raw;\n\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}",
"function iframevideoShortcode( $atts, $content = null, $tag = '' ){\n\t$atts = array_change_key_case( (array)$atts, CASE_LOWER );\n\n\t$output = '<div class=\"iframe-video-wrapper\">' . $content . '</div>';\n\treturn $output;\n}",
"public function __construct() {\n\n $this->config = array(\n\n // Handle will be used to use this shortcode\n 'handle' => 'cv_blog',\n\n // Whether or not this is a shortcode composer element\n 'composer_element' => true,\n\n // Whether or not this is a template builder element\n 'builder_element' => true,\n\n // Used by the template builder to determine where module can be dropped\n 'drop_target' => 1,\n\n // Used by the template builder to determine where module can have other\n // modules dropped inside of it\n 'drop_zone' => false,\n\n // Title will be used to identify this shortcode\n 'title' => __( 'Blog', 'canvys' ),\n\n // Icon will be used to represent this shortcode in composer/builder\n // List of available icons can be found in icons.json\n 'icon' => 'th-list',\n\n // Whether or not shortcode is self closing\n 'self_closing' => true,\n\n // If shortcode is not self closing, specify its default content\n 'default_content' => null,\n\n // Specify whether or not content is directly editable\n 'content_editor' => false,\n\n // Specify whether or not the content is composed of another shortcode\n 'content_element' => false,\n\n // Provide an explanation of what this shortcode does\n 'explanation' => __( 'Display your posts in a complete blog, please note that it is best practice to have onl yone of these elements per page.', 'canvys' ),\n\n // Array of shortcode settings and their respective attributes\n 'attributes' => array(\n\n new CV_Shortcode_Select_Control( 'style', array(\n 'title' => __( 'Blog Style', 'canvys' ),\n 'description' => __( 'Select the style for this blog', 'canvys' ),\n 'default' => 'standard',\n 'options' => array(\n 'standard' => __( 'Standard', 'canvys' ),\n 'boxed' => __( 'Boxed', 'canvys' ),\n 'minimal' => __( 'Minimal', 'canvys' ),\n 'masonry' => __( 'Masonry', 'canvys' ),\n ),\n ) ),\n\n new CV_Shortcode_Select_Control( 'masonry_columns', array(\n 'title' => __( 'Number of Columns', 'canvys' ),\n 'description' => __( 'Specify how many columns should be used to display your posts.', 'canvys' ),\n 'default' => '3',\n 'options' => array(\n '2' => __( '2 Columns', 'canvys' ),\n '3' => __( '3 Columns', 'canvys' ),\n '4' => __( '4 Columns', 'canvys' ),\n '5' => __( '5 Columns', 'canvys' ),\n ),\n ) ),\n\n new CV_Shortcode_Text_Control( 'per_page', array(\n 'title' => __( 'Posts Per Page', 'canvys' ),\n 'description' => __( 'Enter the number of posts to be displayed per page, enter a number only. Default is to display all posts on one page.', 'canvys' ),\n 'placeholder' => 'All Posts',\n ) ),\n\n new CV_Shortcode_Select_Control( 'pagination', array(\n 'title' => __( 'Page Pagination', 'canvys' ),\n 'description' => __( 'Enable pagination when applicable.', 'canvys' ),\n 'default' => 'true',\n 'options' => array(\n 'true' => __( 'yes, enable pagination', 'canvys' ),\n 'false' => __( 'No, disable pagination', 'canvys' ),\n ),\n ) ),\n\n ),\n\n );\n }",
"protected function _shortcode_prepare_atts( $attr ) {\n\t\t$post = get_post();\n\n\t\tif ( ! empty( $attr['ids'] ) ) :\n\n\t\t\t// 'ids' is explicitly ordered, unless you specify otherwise.\n\t\t\tif ( empty( $attr['orderby'] ) )\n\t\t\t\t$attr['orderby'] = 'post__in';\n\n\t\t\t$attr['include'] = $attr['ids'];\n\t\tendif;\n\n\t\t// We're trusting author input, so let's at least make sure it looks like a valid orderby statement\n\t\tif ( isset( $attr['orderby'] ) ) :\n\t\t\t$attr['orderby'] = sanitize_sql_orderby( $attr['orderby'] );\n\n\t\t\tif ( ! $attr['orderby'] )\n\t\t\t\tunset( $attr['orderby'] );\n\t\tendif;\n\n\t\t/**\n\t\t * Filter the default image size used for the gallery item thumbnails.\n\t\t *\n\t\t * @since 2.2.0\n\t\t * @param string $default_size Defaults to 'thumbnail'.\n\t\t */\n\t\t$default_size = apply_filters( 'lgljl_default_thumbnail_size', 'thumbnail' );\n\n\t\t$atts = shortcode_atts( array(\n\t\t\t'order' => 'ASC',\n\t\t\t'orderby' => 'menu_order ID',\n\t\t\t'id' => ($post) ? $post->ID : 0,\n\t\t\t'itemtag' => 'figure',\n\t\t\t'icontag' => 'div',\n\t\t\t'captiontag' => 'figcaption',\n\t\t\t'columns' => 3,\n\t\t\t'size' => $default_size,\n\t\t\t'include' => '',\n\t\t\t'exclude' => '',\n\t\t\t'link' => ''\n\t\t), $attr, 'gallery' );\n\n\t\t$atts['id'] = intval( $atts['id'] );\n\n\t\tif ( 'RAND' == $atts['order'] )\n\t\t\t$atts['orderby'] = 'none';\n\n\t\treturn $atts;\n\t}",
"public function setShort_desc ($short_desc) {\n\t$this->short_desc = $short_desc;\n\treturn $this;\n}",
"function admin_bar_class($attributes)\n{\n $attributes['class'] = trim('admin-bar '.$attributes['class']);\n return $attributes;\n}",
"function __construct()\n\t{\n\t\t$this->shortcodes = array();\n\t}",
"public static function attributeMap();",
"public abstract function getTypeAttribute();",
"function get_shortcode_atts_regex()\n {\n }",
"public function __construct()\n {\n parent::__construct();\n $this->description = $this->str(\"description\");\n }",
"public function setAttributes();",
"function hexa_shorcodes($attr){\n\t\treturn sprintf('<button type=\"button\" class=\"btn btn-%s\">%s</button>',\n\t\t$attr['type'],\n\t\t$attr['content']\n\n\t\t);\n\t}",
"function montheme_link_class($attr)\n{\n $attr['class'] = 'nav-link';\n\n return $attr;\n}",
"public function __construct($src = '#', $alt = null, $attributes = array())\n {\n if (static::$urlGenerator) {\n $src = static::$urlGenerator->asset($src);\n }\n if (!$alt) {\n $alt = basename($src);\n }\n\n $attributes['src'] = $src;\n $attributes['alt'] = $alt;\n\n $this->attributes = $attributes;\n }",
"function _wp_post_thumbnail_class_filter_add($attr)\n {\n }",
"function shortcode_template( $atts, $content = null ) {\r\n\t\t\tglobal $mpc_ma_options;\r\n\t\t\tif ( ! defined( 'MPC_MASSIVE_FULL' ) || ( defined( 'MPC_MASSIVE_FULL' ) && $mpc_ma_options[ 'single_js_css' ] !== '1' ) ) {\r\n\t\t\t\t$this->enqueue_shortcode_scripts();\r\n\t\t\t}\r\n\r\n\t\t\t$atts = shortcode_atts( array(\r\n\t\t\t\t'class' => '',\r\n\t\t\t\t'preset' => '',\r\n\t\t\t\t'content_preset' => '',\r\n\t\t\t\t'style' => 'horizontal',\r\n\t\t\t\t'space' => '',\r\n\t\t\t\t'fullwidth' => '',\r\n\r\n\t\t\t\t'padding_css' => '',\r\n\t\t\t\t'margin_css' => '',\r\n\t\t\t\t'border_css' => '',\r\n\r\n\t\t\t\t'icon_type' => 'icon',\r\n\t\t\t\t'icon' => '',\r\n\t\t\t\t'icon_character' => '',\r\n\t\t\t\t'icon_image' => '',\r\n\t\t\t\t'icon_image_size' => 'thumbnail',\r\n\t\t\t\t'icon_preset' => '',\r\n\t\t\t\t'icon_color' => '#333333',\r\n\t\t\t\t'icon_size' => '',\r\n\r\n\t\t\t\t'icon_margin_css' => '',\r\n\t\t\t\t'icon_animation' => 'none',\r\n\r\n\t\t\t\t'background_type' => 'color',\r\n\t\t\t\t'background_color' => '',\r\n\t\t\t\t'background_image' => '',\r\n\t\t\t\t'background_image_size' => 'large',\r\n\t\t\t\t'background_repeat' => 'no-repeat',\r\n\t\t\t\t'background_size' => 'initial',\r\n\t\t\t\t'background_position' => 'middle-center',\r\n\t\t\t\t'background_gradient' => '#83bae3||#80e0d4||0;100||180||linear',\r\n\r\n\t\t\t\t'animation_in_type' => 'none',\r\n\t\t\t\t'animation_in_duration' => '300',\r\n\t\t\t\t'animation_in_delay' => '0',\r\n\t\t\t\t'animation_in_offset' => '100',\r\n\r\n\t\t\t\t'animation_loop_type' => 'none',\r\n\t\t\t\t'animation_loop_duration' => '1000',\r\n\t\t\t\t'animation_loop_delay' => '1000',\r\n\t\t\t\t'animation_loop_hover' => '',\r\n\t\t\t), $atts );\r\n\r\n\t\t\t$styles = $this->shortcode_styles( $atts );\r\n\t\t\t$css_id = $styles[ 'id' ];\r\n\r\n\t\t\t$icon = MPC_Parser::icon( $atts );\r\n\t\t\t$animation = MPC_Parser::animation( $atts );\r\n\r\n\t\t\t$classes = $animation != '' ? ' mpc-animation' : '';\r\n\t\t\t$classes .= $atts[ 'fullwidth' ] != '' ? ' mpc-fullwidth' : '';\r\n\t\t\t$classes .= $atts[ 'style' ] == 'horizontal' ? ' mpc-style--horizontal' : ' mpc-style--vertical';\r\n\t\t\t$classes .= ' ' . esc_attr( $atts[ 'class' ] );\r\n\r\n\t\t\t$separator_classes = $icon[ 'class' ] == '' && $icon[ 'content' ] == '' ? ' mpc-empty' : '';\r\n\r\n\t\t\tglobal $mpc_button_separator;\r\n\t\t\t$mpc_button_separator = '<span class=\"mpc-button-separator-wrap\"><span class=\"mpc-button-separator-box\"><span class=\"mpc-button-separator ' . $icon[ 'class' ] . $separator_classes . '\">' . $icon[ 'content' ] . '</span></span></span>';\r\n\r\n\t\t\t$return = '<div id=\"' . $css_id . '\" class=\"mpc-button-set mpc-init' . $classes . '\"' . $animation . ( $atts[ 'icon_animation' ] != 'none' ? ' data-animation=\"' . esc_attr( $atts[ 'icon_animation' ] ) . '\"' : '' ) . '>';\r\n\t\t\t\t$return .= do_shortcode( $content );\r\n\t\t\t$return .= '</div>';\r\n\r\n\t\t\t$mpc_button_separator = null;\r\n\r\n\t\t\tglobal $mpc_frontend;\r\n\t\t\tif ( $mpc_frontend ) {\r\n\t\t\t\t$return .= '<style>' . $styles[ 'css' ] . '</style>';\r\n\t\t\t}\r\n\r\n\t\t\treturn $return;\r\n\t\t}",
"function init()\n {\n $this->defineAttribute('data', true, '', COMPONENT_TYPE_STRING);\n $this->defineAttribute('stru', false, '', COMPONENT_TYPE_STRING);\n parent::init();\n }",
"function register_shortcodes(){\n\n\t\t$this->shortcodes = new WordpressConnectShortCodes();\n\n\t}",
"function SM_varTag($attr) {\n $this->attributes = $attr;\n }",
"function htheme_title_shortcode( $atts ) {\r\n\r\n\t\t#SETUP CONTENT CLASS\r\n\t\t$htheme_data = $this->htheme_content->htheme_get_titles($atts);\r\n\r\n\t\t#RETURN DATA/HTML\r\n\t\treturn $htheme_data;\r\n\r\n\t}",
"function wh_short_code() {\n\n return 'waouh_filtres';\n}",
"protected function _construct()\n\n\t{\n\n\t\t$this->_init('eav_attribute', 'attribute_id');\n\n\t}",
"public function attr() {\n\t\t\t\t$attr = [\n\t\t\t\t\t'class' => 'fusion-content-tb fusion-content-tb-' . $this->counter,\n\t\t\t\t\t'style' => '',\n\t\t\t\t];\n\n\t\t\t\t$attr = fusion_builder_visibility_atts( $this->args['hide_on_mobile'], $attr );\n\n\t\t\t\tif ( $this->args['animation_type'] ) {\n\t\t\t\t\t$attr = Fusion_Builder_Animation_Helper::add_animation_attributes( $this->args, $attr );\n\t\t\t\t}\n\n\t\t\t\t$attr['style'] .= Fusion_Builder_Margin_Helper::get_margins_style( $this->args );\n\n\t\t\t\tif ( $this->args['class'] ) {\n\t\t\t\t\t$attr['class'] .= ' ' . $this->args['class'];\n\t\t\t\t}\n\n\t\t\t\tif ( $this->args['id'] ) {\n\t\t\t\t\t$attr['id'] = $this->args['id'];\n\t\t\t\t}\n\n\t\t\t\treturn $attr;\n\t\t\t}",
"function shortcode__data( $atts ) {\n\t\t// Get the data for the specified key\n\t\t$val = Node_Red_WP::init()->data->get( $atts['key'] );\n\n\t\t// Default the data value when it's not set\n\t\t$val = null !== $val ? $val : '[undefined]';\n\n\t\t// Create the shortcode markup\n\t\treturn sprintf( '<h2 class=\"entry-title\">%s</h2><span class=\"nrwp-data nrwp-data-%s\" data-key=\"%s\">%s</span>',\n\t\t\tesc_attr( $atts['title'] ),\n\t\t\tesc_attr( $atts['key'] ),\n\t\t\tesc_attr( $atts['key'] ),\n\t\t\tesc_html( $val )\n\t\t);\n\t}"
]
| [
"0.64456725",
"0.63222957",
"0.6143322",
"0.5795698",
"0.5764013",
"0.5654559",
"0.56108266",
"0.55935144",
"0.55775696",
"0.5574426",
"0.55412537",
"0.55218387",
"0.54947656",
"0.5488546",
"0.54575765",
"0.5451298",
"0.5443218",
"0.5409998",
"0.5403958",
"0.5401965",
"0.53991926",
"0.5378743",
"0.53676724",
"0.5342797",
"0.5321627",
"0.5319603",
"0.5304076",
"0.5289113",
"0.52832764",
"0.52831936",
"0.52806157",
"0.52567494",
"0.5245626",
"0.52424973",
"0.5232141",
"0.52293044",
"0.5209275",
"0.52026695",
"0.5196461",
"0.514561",
"0.5137271",
"0.51151454",
"0.5103152",
"0.50959605",
"0.5093085",
"0.50894403",
"0.50861216",
"0.5082234",
"0.507943",
"0.5048931",
"0.5046953",
"0.5046207",
"0.50412923",
"0.5039589",
"0.50358635",
"0.5031588",
"0.5016572",
"0.5011172",
"0.5010122",
"0.5009187",
"0.5001581",
"0.49969223",
"0.49924976",
"0.49869978",
"0.49867868",
"0.4973752",
"0.49696404",
"0.49534512",
"0.4950674",
"0.49486396",
"0.49453276",
"0.49427035",
"0.49372625",
"0.49323663",
"0.49266917",
"0.49234298",
"0.4919922",
"0.49193007",
"0.4917927",
"0.4913872",
"0.4913057",
"0.49088928",
"0.49015734",
"0.49002734",
"0.48942634",
"0.48915905",
"0.48905185",
"0.488443",
"0.4884143",
"0.48824346",
"0.488138",
"0.4880279",
"0.48747882",
"0.48736867",
"0.48735014",
"0.48699",
"0.48686805",
"0.48658156",
"0.48635396",
"0.48634347",
"0.48612073"
]
| 0.0 | -1 |
Sets up the fixture, for example, opens a network connection. This method is called before a test is executed. | protected function setUp()
{
$this->object = new Log();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function fixture_setup() {\r\n $this->service = SQLConnectionService::get_instance($this->configuration);\r\n test_data_setup($this->service);\r\n }",
"public function setUp() {\n\t\t$options = [\n\t\t\t'db' => [\n\t\t\t\t'adapter' => 'Connection',\n\t\t\t\t'connection' => $this->_connection,\n\t\t\t\t'fixtures' => $this->_fixtures\n\t\t\t]\n\t\t];\n\n\t\tFixtures::config($options);\n\t\tFixtures::save('db');\n\t}",
"protected function setUp()\n {\n $this->fixture = new Record();\n }",
"protected function setUp(): void\n {\n parent::setUp();\n\n $this->load();\n }",
"protected function setUp()\n {\n\t global $sys_datacite_username, $sys_datacite_password, $sys_datacite_url ;\n\n\t $this->client = new DataCiteClient($sys_datacite_username, $sys_datacite_password);\n $this->client->setDataciteUrl($sys_datacite_url);\n }",
"protected function setUp()\n {\n $this->fixture = new Configuration();\n }",
"public function setUp() {\r\n // and doing it every test slows the tests down to a crawl\r\n $this->sharedFixture = new MovieLensDataSet(DATA_DIR);\r\n }",
"public function setUp()\n {\n parent::setUp();\n $this->prepareForTests();\n }",
"protected function setUp() {\n\n $this->client = new Client(['base_uri' => getenv('API_ADDR')]);\n $this->locIDs = $this->insertTestLocations();\n reuse_generateXML();\n }",
"protected function setUp(): void\n {\n $servername = '18.222.31.30';\n $username = 'phpclient';\n $password = 'leftoverkillerphp';\n $dbname = 'leftover_killer';\n self::$RecipeModel = new GetRecipeDetails($servername, $username, $password, $dbname);\n }",
"public function setUp()\n {\n\n $this->db = Db::getActive();\n $this->response = Response::getActive();\n\n }",
"protected function setUp() {\n parent::setUp ();\n $this->storage = new Storage();\r\n $this->connectDB();\r\n $this->cleanDB();\r\n $this->createUser();\n $this->storage->connect($this->dbh);\n }",
"protected function setUp() {\r\n\t\tparent::setUp ();\r\n\t\t$this->storage = new Storage ( );\r\n\t\t$this->connectDB();\r\n\t\t$this->cleanDB ();\r\n\t\t$this->createUser ();\r\n\t\t$this->storage->connect ( $this->dbh );\n\t}",
"public function setUp() {\n $this->fixture= new FreeTdsLookup($this->getClass()->getPackage()->getResourceAsStream('freetds.conf'));\n }",
"public static function setUpBeforeClass(): void\r\n {\r\n self::$MemoryTestAsset = new MemoryTestAsset();\r\n\r\n self::$clients = self::$MemoryTestAsset->getClients();\r\n self::$ClientsStorage = self::$MemoryTestAsset->getClientsStorage();\r\n }",
"public function setUp() {\n\t\t$this->student = StudentData::getStudent();\n\t\t$this->school = SchoolData::getSchool();\n\t}",
"public function setUp() {\n\t\t$this->student = StudentData::getStudent();\n\t\t$this->school = SchoolData::getSchool();\n\t}",
"public function setUp() {\n\t\t$this->student = StudentData::getStudent();\n\t\t$this->school = SchoolData::getSchool();\n\t}",
"public function setUp() {\n\t\t$this->student = StudentData::getStudent();\n\t\t$this->school = SchoolData::getSchool();\n\t}",
"public function setUp() {\n\t\t$this->student = StudentData::getStudent();\n\t\t$this->school = SchoolData::getSchool();\n\t}",
"protected function setUp()\n {\n parent::setUp();\n $config = new LocalConfiguration();\n $this->local = new Local($config);\n }",
"function setUp() {\n\t\t$this->originalIsRunningTest = self::$is_running_test;\n\t\tself::$is_running_test = true;\n\t\t\n\t\t// Remove password validation\n\t\t$this->originalMemberPasswordValidator = Member::password_validator();\n\t\t$this->originalRequirements = Requirements::backend();\n\t\tMember::set_password_validator(null);\n\t\tCookie::set_report_errors(false);\n\n\t\t$className = get_class($this);\n\t\t$fixtureFile = eval(\"return {$className}::\\$fixture_file;\");\n\t\t\n\t\t// Set up fixture\n\t\tif($fixtureFile) {\n\t\t\tif(substr(DB::getConn()->currentDatabase(),0,5) != 'tmpdb') {\n\t\t\t\t//echo \"Re-creating temp database... \";\n\t\t\t\tself::create_temp_db();\n\t\t\t\t//echo \"done.\\n\";\n\t\t\t}\n\n\t\t\t// This code is a bit misplaced; we want some way of the whole session being reinitialised...\n\t\t\tVersioned::reading_stage(null);\n\n\t\t\tsingleton('DataObject')->flushCache();\n\n\t\t\t$dbadmin = new DatabaseAdmin();\n\t\t\t$dbadmin->clearAllData();\n\t\t\t\n\t\t\t// We have to disable validation while we import the fixtures, as the order in\n\t\t\t// which they are imported doesnt guarantee valid relations until after the\n\t\t\t// import is complete.\n\t\t\t$validationenabled = DataObject::get_validation_enabled();\n\t\t\tDataObject::set_validation_enabled(false);\n\t\t\t$this->fixture = new YamlFixture($fixtureFile);\n\t\t\t$this->fixture->saveIntoDatabase();\n\t\t\tDataObject::set_validation_enabled($validationenabled);\n\t\t}\n\t\t\n\t\t// Set up email\n\t\t$this->originalMailer = Email::mailer();\n\t\t$this->mailer = new TestMailer();\n\t\tEmail::set_mailer($this->mailer);\n\t}",
"protected function setUp() {\n\t\tparent::setUp();\n\n\t\t$this->object = new ControllerFixture([\n\t\t\t'module' => 'module',\n\t\t\t'controller' => 'controller',\n\t\t\t'action' => 'action',\n\t\t\t'args' => [100, 25]\n\t\t]);\n\n\t\t// Used by throwError()\n\t\tTiton::router()->initialize();\n\t}",
"protected function setUp(): void\n {\n \tparent::setUp();\n\n \t$this->authorize();\n\n \t$this->loadFixtures([\n \t\t'product'=>ProductFixture::class\n \t]);\n }",
"protected function setUp()\n {\n $this->fixture = new NamespaceDescriptor();\n }",
"public function setUp()\n {\n $this->fixture = new Finder();\n }",
"protected function setUp(): void\n {\n $this->fixture = new TestSubjectDescriptor();\n }",
"function setUp() {\n\t\t$this->originalIsRunningTest = self::$is_running_test;\n\t\tself::$is_running_test = true;\n\t\t\n\t\t// i18n needs to be set to the defaults or tests fail\n\t\ti18n::set_locale(i18n::default_locale());\n\t\ti18n::set_date_format(null);\n\t\ti18n::set_time_format(null);\n\t\t\n\t\t// Remove password validation\n\t\t$this->originalMemberPasswordValidator = Member::password_validator();\n\t\t$this->originalRequirements = Requirements::backend();\n\t\tMember::set_password_validator(null);\n\t\tCookie::set_report_errors(false);\n\t\t\n\t\tif(class_exists('RootURLController')) RootURLController::reset();\n\t\tif(class_exists('Translatable')) Translatable::reset();\n\t\tVersioned::reset();\n\t\tDataObject::reset();\n\t\tif(class_exists('SiteTree')) SiteTree::reset();\n\t\tHierarchy::reset();\n\t\tif(Controller::has_curr()) Controller::curr()->setSession(new Session(array()));\n\t\t\n\t\t$this->originalTheme = SSViewer::current_theme();\n\t\t\n\t\tif(class_exists('SiteTree')) {\n\t\t\t// Save nested_urls state, so we can restore it later\n\t\t\t$this->originalNestedURLsState = SiteTree::nested_urls();\n\t\t}\n\n\t\t$className = get_class($this);\n\t\t$fixtureFile = eval(\"return {$className}::\\$fixture_file;\");\n\t\t$prefix = defined('SS_DATABASE_PREFIX') ? SS_DATABASE_PREFIX : 'ss_';\n\n\t\t// Set up fixture\n\t\tif($fixtureFile || $this->usesDatabase || !self::using_temp_db()) {\n\t\t\tif(substr(DB::getConn()->currentDatabase(), 0, strlen($prefix) + 5) != strtolower(sprintf('%stmpdb', $prefix))) {\n\t\t\t\t//echo \"Re-creating temp database... \";\n\t\t\t\tself::create_temp_db();\n\t\t\t\t//echo \"done.\\n\";\n\t\t\t}\n\n\t\t\tsingleton('DataObject')->flushCache();\n\t\t\t\n\t\t\tself::empty_temp_db();\n\t\t\t\n\t\t\tforeach($this->requireDefaultRecordsFrom as $className) {\n\t\t\t\t$instance = singleton($className);\n\t\t\t\tif (method_exists($instance, 'requireDefaultRecords')) $instance->requireDefaultRecords();\n\t\t\t\tif (method_exists($instance, 'augmentDefaultRecords')) $instance->augmentDefaultRecords();\n\t\t\t}\n\n\t\t\tif($fixtureFile) {\n\t\t\t\t$pathForClass = $this->getCurrentAbsolutePath();\n\t\t\t\t$fixtureFiles = (is_array($fixtureFile)) ? $fixtureFile : array($fixtureFile);\n\n\t\t\t\t$i = 0;\n\t\t\t\tforeach($fixtureFiles as $fixtureFilePath) {\n\t\t\t\t\t// Support fixture paths relative to the test class, rather than relative to webroot\n\t\t\t\t\t// String checking is faster than file_exists() calls.\n\t\t\t\t\t$isRelativeToFile = (strpos('/', $fixtureFilePath) === false || preg_match('/^\\.\\./', $fixtureFilePath));\n\t\t\t\t\tif($isRelativeToFile) {\n\t\t\t\t\t\t$resolvedPath = realpath($pathForClass . '/' . $fixtureFilePath);\n\t\t\t\t\t\tif($resolvedPath) $fixtureFilePath = $resolvedPath;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$fixture = new YamlFixture($fixtureFilePath);\n\t\t\t\t\t$fixture->saveIntoDatabase();\n\t\t\t\t\t$this->fixtures[] = $fixture;\n\n\t\t\t\t\t// backwards compatibility: Load first fixture into $this->fixture\n\t\t\t\t\tif($i == 0) $this->fixture = $fixture;\n\t\t\t\t\t$i++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$this->logInWithPermission(\"ADMIN\");\n\t\t}\n\t\t\n\t\t// Set up email\n\t\t$this->originalMailer = Email::mailer();\n\t\t$this->mailer = new TestMailer();\n\t\tEmail::set_mailer($this->mailer);\n\t\tEmail::send_all_emails_to(null);\n\t\t\n\t\t// Preserve memory settings\n\t\t$this->originalMemoryLimit = ini_get('memory_limit');\n\t}",
"public function setUp(): void\n {\n $this->fixture = new Finder();\n }",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp()\n {\n $this->request = new Request();\n $this->response = new Response();\n\n $this->request->load();\n $this->response->load();\n }",
"protected function setUp()\n {\n $this->request = new Request();\n $this->response = new Response();\n\n $this->request->load();\n $this->response->load();\n }",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}",
"protected function setUp() {}"
]
| [
"0.7593164",
"0.71706903",
"0.6927489",
"0.6910292",
"0.6891104",
"0.6882925",
"0.6814723",
"0.6802981",
"0.67535055",
"0.67530024",
"0.6745982",
"0.67330414",
"0.67140543",
"0.67068344",
"0.67015326",
"0.6683793",
"0.6683793",
"0.6683793",
"0.6683793",
"0.6683793",
"0.6679458",
"0.6677139",
"0.6672487",
"0.6669946",
"0.6647294",
"0.66458243",
"0.66452134",
"0.6636708",
"0.6618305",
"0.6617435",
"0.6617435",
"0.6617435",
"0.6617435",
"0.6617435",
"0.6617435",
"0.6617435",
"0.6617435",
"0.6617435",
"0.6617435",
"0.6617435",
"0.6617435",
"0.6617435",
"0.6617435",
"0.6617435",
"0.6617435",
"0.6617435",
"0.6617435",
"0.6617435",
"0.6617435",
"0.6617435",
"0.6617435",
"0.6617435",
"0.6617435",
"0.6617435",
"0.6617435",
"0.6617435",
"0.6617435",
"0.6617435",
"0.6617435",
"0.6617435",
"0.6617435",
"0.6617435",
"0.6617435",
"0.6617435",
"0.6617435",
"0.6617435",
"0.6617435",
"0.6617435",
"0.6617435",
"0.6617435",
"0.6617435",
"0.6617435",
"0.6617435",
"0.6617435",
"0.6617435",
"0.6617435",
"0.6617435",
"0.6617435",
"0.6617435",
"0.6617435",
"0.6617435",
"0.6617435",
"0.6617435",
"0.6617435",
"0.6617435",
"0.6617435",
"0.6617435",
"0.6617141",
"0.6617141",
"0.6617096",
"0.6617096",
"0.66168785",
"0.66168785",
"0.66168785",
"0.66168785",
"0.66168785",
"0.66168785",
"0.66168785",
"0.66168785",
"0.66168785",
"0.66168785"
]
| 0.0 | -1 |
Tears down the fixture, for example, closes a network connection. This method is called after a test is executed. | protected function tearDown()
{
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function tearDown(): void\n {\n parent::tearDown();\n\n Mockery::close();\n\n unset($this->faker, $this->waqi);\n }",
"public function teardown()\n {\n //\n }",
"protected function tearDown(): void\n\t{\n\t\tglobal $modSettings;\n\n\t\t// remove temporary test data\n\t\tunset($modSettings);\n\t}",
"public function tearDown()\n {\n unset(\n $this->plugins,\n $this->events,\n $this->connection,\n $this->config\n );\n }",
"public function teardown()\n {\n }",
"public function _after(TestCase $test)\n {\n $this->unloadFixtures();\n }",
"public function tearDown()\n {\n unset($this->app);\n unset($this->client);\n\n m::close();\n }",
"protected function tearDown(): void\n {\n self::$driver->close();\n }",
"public function tearDown()\n\t{\n\t\tm::close();\n\t}",
"protected function tearDown()\n {\n if ($this->databaseTester !== null) {\n if (method_exists($this, 'getTearDownOperation')) {\n $this->getDatabaseTester()->setTearDownOperation($this->getTearDownOperation());\n }\n if (method_exists($this, 'getDataSet')) {\n $this->getDatabaseTester()->setDataSet($this->getDataSet());\n }\n $this->getDatabaseTester()->onTearDown();\n }\n\n $this->databaseTester = null;\n\n set_time_limit(0);\n }",
"public function tearDown() {\n\t\tFixtures::clear('db');\n\t\tGalleries::reset();\n\t\tImages::reset();\n\t}",
"function teardown() {\n // close database connection\n $this->conn = null;\n }",
"protected function tearDown()\r\n {\r\n DirectoryManager::recursiveRemoveDir('data/tests');\r\n }",
"protected function tearDown() {\r\n\t\t$this->dbh = null;\r\n\t\t$this->storage = null;\r\n\t\tparent::tearDown ();\r\n\t}",
"protected function tearDown(): void\n {\n $this->closeDatabase();\n }",
"protected function tearDown() {\n\t\tm::close();\n\t}",
"public function tearDown()\n\t{\n\t\t$this->beforeApplicationDestroyed(function () {\n\t\t\tDB::disconnect();\n\t\t});\n\t\n\t\t\tparent::tearDown();\n\t\t\t// \t\tMockery::close();\n\t}",
"public function tearDown()\n {\n unset($this->db);\n unset($this->statement);\n unset($this->mockData);\n }",
"protected function tearDown() {\n\t\tparent::tearDown();\n\n\t\t$this->cleanupTestDirectory();\n\t}",
"protected function tearDown()\n {\n $this->testData = null;\n parent::tearDown();\n }",
"protected function tearDown(): void\n {\n $this->provider = null;\n $this->response = null;\n }",
"protected function tearDown(): void\n {\n $client = $this->getProvidedData()[0] ?? null;\n if ($client instanceof Client) {\n $this->logout($client);\n }\n }",
"public function teardown()\n {\n parent::teardown();\n }",
"protected function doTearDown(): void\n {\n }",
"protected function tearDown()\n\t{\n\t\tunset($GLOBALS['__DB__']);\n\n\t\tparent::tearDown();\n\t}",
"public function teardown() {\n m::close();\n }",
"public function tearDownFixtures()\n {\n if (is_array($this->_fixtures)) {\n /** @var ActiveRecordFixture $object */\n foreach ($this->_fixtures as $object) {\n $object->cleanup();\n }\n }\n }",
"protected function tearDown()\n {\n // Make sure any test entities created are deleted\n foreach ($this->testEntities as $entity)\n {\n // Second param is a 'hard' delete which actually purges the data\n $this->entityLoader->delete($entity, true);\n }\n }",
"public function teardown()\n {\n m::close();\n }",
"public function tearDown()\n\t{\n\t\tunset($this->target);\n\t}",
"protected function tearDown ()\n {\n $this->downTest();\n\n parent::tearDown();\n }",
"public function tearDown()\n {\n $fs = new SymfonyFileSystem();\n $fs->remove($this->fakeTestFileDir);\n\n unset($this->builder);\n unset($this->builder);\n unset($this->fs);\n m::close();\n }",
"protected function tearDown(): void\n {\n $this->tearDownTheTestEnvironment();\n }",
"protected function tearDown() {\r\n\t\tunset ( $this->configReader );\r\n\t}",
"protected function tearDown() {\n\t\t$this->sql->Disconnect(__FILE__, __LINE__);\n\t\tsqlsolution_unlink_sqlite($this->sql);\n\t\t$this->sql = null;\n\t}",
"protected function tearDown()\n {\n parent::tearDown();\n\n $this->em->close();\n $this->em = null; // avoid memory leaks\n }",
"protected function tearDown()\n {\n $this->testDBConnector->clearDataFromTables();\n }",
"public function tearDown() {\n\n\t\tparent::tearDown();\n\t\tMockery::close();\n\t}",
"public function tearDown()\n {\n $this->stop();\n }",
"public function tearDown()\n {\n m::close();\n }",
"public function tearDown()\n {\n m::close();\n }",
"public function tearDown()\n {\n m::close();\n }",
"protected function tearDown() {\n\n $this->client = null;\n $this->deleteTestLocations();\n $this->locIDs = null;\n reuse_generateXML();\n }",
"public function tearDown()\n {\n unset($this->helper);\n }",
"public function tearDown()\n\t{\n\t\tunset($this->stub);\n\t}",
"protected function tearDown()\n\t {\n\t\tunset($this->object);\n\n\t\t$conn = $this->getConnection();\n\t\t$db = $conn->getConnection();\n\t\t$db->exec(\"DROP TABLE IF EXISTS `MySQLdatabase`;\");\n\n\t\tunset($GLOBALS[\"errstr\"]);\n\t\tunset($GLOBALS[\"stuckerror\"]);\n\t }",
"protected function tearDown()\n {\n $this->local = null;\n parent::tearDown();\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 }",
"protected function tear_down()\n {\n }",
"protected function tearDown() {\n $this->dbh = null;\n $this->storage = null;\n parent::tearDown ();\n }",
"public function tear_down()\n {\n }",
"public function tear_down()\n {\n }",
"public function tear_down()\n {\n }",
"public function tearDown()\n\t{\n\t\t\\Orchestra\\Core::shutdown();\n\n\t\tunset($this->user);\n\t\tunset($this->stub);\n\n\t\tparent::tearDown();\n\t}",
"protected function tearDown()\n {\n $this->kernel->shutdown();\n $this->kernel = null;\n parent::tearDown();\n }",
"public function tearDown()\n {\n unset($this->VenusFuelDepot);\n }",
"protected function tearDown()\n\t{\n\t\tunset($this->_instance);\n\t\tparent::tearDown();\n\t}",
"public function tearDown()\n {\n parent::tearDown();\n\n if ((bool) getenv('CLEANUP_TEST_DOCKER_SECRETS')) {\n DockerSecretFile::cleanup();\n }\n }",
"protected function tearDown()\n\t{\n\t\t$this->restoreFactoryState();\n\t}",
"protected function tearDown()\n {\n $this->dataCollector = null;\n parent::tearDown();\n }",
"public function tearDown()\n {\n unset($this->app);\n unset($_SERVER['RouteManagerTest@callback']);\n m::close();\n }",
"public function tearDown(){\n\t\t$this->container->get('doctrine')->getConnection()->close();\n\t\n\t\tparent::tearDown();\n\t}",
"protected function tearDown(): void\n {\n $this->config = null;\n $this->container = null;\n $this->instance = null;\n }",
"protected function tearDown()\n {\n unset($this->app);\n\n m::close();\n }",
"protected function tearDown(): void\n {\n $this->_connection->dropTable($this->_tableName);\n $this->_connection->resetDdlCache($this->_tableName);\n $this->_connection = null;\n }",
"public function tearDown()\n {\n if (null !== $this->ldap) {\n $this->ldap->unbind();\n }\n }",
"public function tearDown()\n {\n $this->deleteAdminUserFixture();\n }",
"public function tearDown()\n {\n $this->flushModelEventListeners();\n parent::tearDown();\n unset($this->app);\n\n /*\n * Restore environment\n */\n if (file_exists(base_path($this->envTestingFile())) && file_exists(base_path('.env.backup'))) {\n $this->restoreEnvironment();\n }\n }",
"public function tearDown()\n {\n unset($this->commonDataClassRepository);\n }",
"protected function tearDown()\n\t{\n\t\tparent::tearDown();\n\t\tEnUser::release();\n\t\tRPCContext::getInstance()->resetSession();\n\t\tRPCContext::getInstance()->unsetSession('global.uid');\n\t\tFragseizeObj::release( $this->uid );\n\t}",
"protected function tearDown()\n {\n $this->client = null;\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 }",
"public function tearDown() {\n // tests using these functions.\n \\mod_forum\\subscriptions::reset_forum_cache();\n\n $this->messagesink->clear();\n $this->messagesink->close();\n unset($this->messagesink);\n\n $this->mailsink->clear();\n $this->mailsink->close();\n unset($this->mailsink);\n }",
"public function tearDown()\n\t{\n\t\tparent::tearDown();\n\t\t$this->databaseTester = NULL;\n\t}",
"public function tearDown(): void\n {\n self::$environ->cleanupTestUploadFiles();\n self::$environ->clean();\n }",
"public function tearDown()\n {\n $this->client = null;\n }",
"protected function tearDown()\n {\n $this->helper = null;\n parent::tearDown();\n }",
"protected function tearDown() {\n\t}",
"protected function tearDown() {\n\t}",
"protected function tearDown() {\n\t}",
"protected function tearDown() {\n\t}",
"protected function tearDown() {\n\t}",
"protected function tearDown() {\n\t}",
"protected function tearDown()\n\t{\n\t\t$this->instance = null;\n\t}",
"public static function tearDownAfterClass(): void\n {\n if (file_exists(static::$ou)) {\n unlink(static::$ou);\n }\n }",
"protected function tearDown()\r\n {\r\n $application = new Application(self::$kernel);\r\n $application->setAutoExit(false);\r\n\r\n $options = array('command' => 'doctrine:database:drop', '--force' => true);\r\n $application->run(new ArrayInput($options));\r\n\r\n parent::tearDown();\r\n\r\n $this->em->close();\r\n $this->em = null;\r\n }",
"protected function tearDown()\n {\n parent::tearDown();\n if (!is_null($this->em)) {\n $this->em->getConnection()->close();\n }\n }",
"protected function tearDown()\n {\n $this->deleteTemporaryFiles();\n }",
"protected function tearDown(): void\n {\n m::close();\n }",
"protected function tearDown(): void\n {\n m::close();\n }",
"protected function tearDown(): void\n {\n m::close();\n }",
"protected function tearDown(): void\n {\n m::close();\n }",
"protected function tearDown(): void\n {\n m::close();\n }",
"protected function tearDown(): void\n {\n m::close();\n }",
"public function tearDown()\n {\n Resistance::reset();\n }",
"public function tearDown()\n\t{\n\t\tMockery::close();\n\t}",
"protected function tearDown()\n {\n $this->clock = NULL;\n }",
"protected function tearDown()\n\t{\n\t\tparent::tearDown ();\n\t\tEnUser::release();\n\t\tRPCContext::getInstance()->resetSession();\n\t\tRPCContext::getInstance()->unsetSession('global.uid');\n\t}"
]
| [
"0.7307652",
"0.72381634",
"0.72225434",
"0.7188353",
"0.71877366",
"0.71481234",
"0.71412677",
"0.7135168",
"0.71216214",
"0.7104174",
"0.7082103",
"0.708059",
"0.70782745",
"0.70539784",
"0.7050106",
"0.70345396",
"0.702356",
"0.7015927",
"0.7002092",
"0.70014817",
"0.7000364",
"0.699275",
"0.6991624",
"0.6981424",
"0.6959813",
"0.6958063",
"0.69553965",
"0.6947796",
"0.6939895",
"0.693539",
"0.69290704",
"0.69270325",
"0.69234556",
"0.6919543",
"0.69113964",
"0.6910955",
"0.69076043",
"0.69010305",
"0.68934375",
"0.689129",
"0.689129",
"0.689129",
"0.688974",
"0.6889142",
"0.6883825",
"0.6864125",
"0.6862776",
"0.68590695",
"0.68590695",
"0.68590695",
"0.68590695",
"0.68590695",
"0.6855601",
"0.68529296",
"0.68529296",
"0.68529296",
"0.68527186",
"0.6852567",
"0.68447864",
"0.68408597",
"0.68391955",
"0.6833987",
"0.68310153",
"0.68299145",
"0.6812333",
"0.68123025",
"0.68087584",
"0.68080586",
"0.6807603",
"0.6803",
"0.68018824",
"0.67936623",
"0.67925245",
"0.6789089",
"0.6780536",
"0.67756",
"0.677118",
"0.6770011",
"0.67680585",
"0.6767753",
"0.6762174",
"0.6762174",
"0.6762174",
"0.6762174",
"0.6762174",
"0.6762174",
"0.67610073",
"0.67596364",
"0.67587554",
"0.67559844",
"0.6755188",
"0.6754765",
"0.6754765",
"0.6754765",
"0.6754765",
"0.6754765",
"0.6754765",
"0.67516845",
"0.674982",
"0.674963",
"0.6749387"
]
| 0.0 | -1 |
/ | | Entry Accessor / Mutator Tests | | | public function test_get_distinguished_name()
{
$dn = 'cn=jdoe,dc=acme,dc=org';
$m = $this->newEntry(['dn' => $dn]);
$this->assertEquals($dn, $m->getDn());
$this->assertEquals($dn, $m->getDistinguishedName());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function testGetValue()\n {\n $this->todo('stub');\n }",
"public function it_should_allow_storing_value_using_array_access_api() {\n\t\t$cache = $this->make_instance();\n\n\t\t$this->assertFalse( isset( $cache['foo'] ) );\n\n\t\t$cache['foo'] = 'bar';\n\n\t\t$this->assertTrue( isset( $cache['foo'] ) );\n\t\t$this->assertEquals( 'bar', $cache['foo'] );\n\t}",
"function testParticipantEntryModule() {\n $participantA = new ParticipantEntry(\"12-02-29\", \"John1112345678\", \"9:57\", \"\", \"Good worker!\");\n \n //testing getter functions\n $this->assertTrue($participantA->get_id() == \"12-02-29John1112345678\");\n $this->assertTrue($participantA->get_call_time() == \"9:57\");\n $this->assertTrue($participantA->get_result() == \"\");\n $this->assertTrue($participantA->get_note() == \"Good worker!\");\n \n echo (\"testParticipantEntry complete.\\n\");\n }",
"public function testGetValue() : void\n {\n $instance = $this->createEmptyInstance();\n\n $value = new \\stdClass();\n\n $this->setValue($instance, 'value', $value);\n\n $this->getTestCase()->assertSame($value, $instance->getValue());\n }",
"public function testSetValue()\n {\n $this->todo('stub');\n }",
"final public function newlySetValueIsReturnedWithGetValue(): void\n {\n $dataType = new DataTypeMock();\n $this->assertTrue($dataType->isEqual(null));\n\n $someObject = new stdClass();\n $dataType->setValue($someObject);\n $this->assertTrue($dataType->isEqual($someObject));\n }",
"public function testMutable()\n {\n $controllerName = 'controller';\n $methodName = 'method';\n\n $this->assertSame(\n $this->controllerInfo,\n $this->controllerInfo->setControllerName($controllerName),\n 'The ControllerInfo::setControllerName must return itself'\n );\n $this->assertSame(\n $this->controllerInfo,\n $this->controllerInfo->setMethodName($methodName),\n 'The ControllerInfo::setMethodName must return itself'\n );\n\n $this->assertEquals(\n $controllerName,\n $this->controllerInfo->getControllerName(),\n 'The ControllerInfo::getControllerName must return the registered controller name'\n );\n $this->assertEquals(\n $methodName,\n $this->controllerInfo->getMethodName(),\n 'The ControllerInfo::getMethodName must return the registered method name'\n );\n }",
"public function set(string $name, $entry): void;",
"public function testAuthorMutator()\n {\n $this->assertTrue(true);\n }",
"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 }",
"public function testCanGet()\n {\n self::$apcu = [];\n $this->sut->add('myKey', 'myValue');\n $this->assertSame('myValue', $this->sut->get('myKey'));\n }",
"public function testReadMember()\n {\n }",
"public function testGettersAndSetters()\n {\n $array = $this->getDummyHmacData();\n\n $this->entity->setData($array['data']);\n $this->entity->setKey($array['key']);\n $this->entity->setTime($array['time']);\n $this->entity->setHmac($array['hmac']);\n\n $this->assertTrue($array['data'] === $this->entity->getData());\n $this->assertTrue($array['key'] === $this->entity->getKey());\n $this->assertTrue($array['time'] === $this->entity->getTime());\n $this->assertTrue($array['hmac'] === $this->entity->getHmac());\n }",
"public function testGetterSetter()\n {\n $text = new Text('Foo bar', 100);\n $this->assertEquals($text->text, 'Foo bar');\n $this->assertEquals($text->confidence, 100);\n }",
"public function testOffsetSet()\n {\n $struct = $this->_newStruct();\n $struct->offsetSet('zim', 'irk');\n $this->assertSame($struct->offsetGet('zim'), 'irk');\n }",
"public function testPersistanceGet() {\n\t\t// the values are still retrievable.\n\t\t$this->assertEquals( 'remember', $this->cache->get( 'keep' ) );\n\t}",
"public function testSetValues()\n {\n $this->todo('stub');\n }",
"public function getEntry();",
"public function testGetValues()\n {\n $this->todo('stub');\n }",
"protected function setUp(): void\n {\n parent::setUp();\n\n $this->entry = new BasicEntry(['test_key' => 'test_value']);\n }",
"public function test__set()\n {\n $struct = $this->_newStruct();\n $struct->zim = 'irk';\n $this->assertSame($struct->zim, 'irk');\n $this->assertSame($struct->zim, $struct['zim']);\n \n $struct = $this->_newStruct();\n $struct->a = 'b';\n $this->assertSame($struct->a, 'b');\n $this->assertSame($struct->a, $struct['a']);\n }",
"#[@test]\n public function returnValue_canSetGet() {\n $this->sut->setReturn('foo');\n $this->assertEquals('foo', $this->sut->getReturn());\n }",
"public function testSetGetValue()\n {\n $value = new UploadValueStructure();\n $same = $this->uut->setValue($value);\n $this->assertSame($this->uut, $same);\n $this->assertSame($value, $this->uut->getValue());\n }",
"public function testOffsetSet()\n\t{\n\t\t$this->instance[0]->setName('foo:bar');\n\n\t\t$this->assertEquals('foo:bar', $this->instance[0]->getName());\n\t}",
"public function getEntryValueGenerator();",
"public function testCacheGet() \n\t{\n\t\t$key = uniqid('key_');\n\t\t$value = uniqid('value_');\n\t\t$this->assertFalse(\\Cache\\Cache::get($key));\n\n\t\t\\Cache\\Cache::set($key, $value);\n\t\t$this->assertEquals(\\Cache\\Cache::get($key), $value);\n\t}",
"public function testGetter()\n {\n $account = new Account('access-key', 'secret-key', 'api-host');\n $this->assertEquals('access-key', $account->getAccessKey());\n $this->assertEquals('secret-key', $account->getSecretKey());\n $this->assertEquals('api-host', $account->getApiHost());\n }",
"public function testClone()\n {\n $this->instance->{$this->name};\n $instance = clone $this->instance;\n self::assertInstanceOf(\n Chameleon::class,\n $instance,\n 'Clone is not an instance of Chameleon'\n );\n self::assertTrue(\n array_key_exists($this->name, $instance),\n 'Instance element cannot be tested with array_key_exists'\n );\n }",
"public function testGetSet()\n {\n $term = new LP21Term('type', 'uuid');\n $term\n ->setUrl('url')\n ->setCode('code')\n ->setCantons(['BE'])\n ->setVersion('version')\n ->setCycles([1]);\n\n $this->assertEquals('url', $term->getUrl(), \"The getter/setter works for URLs.\");\n $this->assertEquals('code', $term->getCode(), \"The getter/setter works for codes.\");\n $this->assertEquals(['BE'], $term->getCantons(), \"The getter/setter works for cantons.\");\n $this->assertEquals('version', $term->getVersion(), \"The getter/setter works for versions.\");\n $this->assertEquals([1], $term->getCycles(), \"The getter/setter works for cycles.\");\n }",
"public function testCacheSetRetrievement(){\n\n $this->initCache();\n\n $this->assertNotEmpty($this->cache);\n\n // Trying to set, save and get value:\n $this->cache->set('test_var', 'testvalue');\n $this->cache->save();\n $this->assertEquals('testvalue', $this->cache->get('test_var'));\n }",
"public function testGettersAndSetters()\n {\n $this->phone->setType('phone');\n $this->assertEquals('phone', $this->phone->getType());\n\n $this->phone->setValue('059 70 22 85');\n $this->assertEquals('059 70 22 85', $this->phone->getValue());\n }",
"public function testGetChangeField()\n {\n }",
"public function testHowToHandleCustomizedGetterSetter()\n {\n $form = $this->container->get('form.factory')->createBuilder('form', array('full_name' => 'Joseph Rouff'), array())\n ->add('name', null, array('property_path' => '[full_name]')) // [...] notation is only for array, if it is an object \"fullName\" is enough.\n ->getForm();\n ;\n\n $this->assertEquals('Joseph Rouff', $form->get('name')->getData());\n }",
"public function testimmutable()\n {\n $this->assertSame(\n $this->controllerInfo,\n $this->controllerInfo->setImmutable(true),\n 'The ControllerInfo::setImmutable must return itself'\n );\n $this->controllerInfo->setControllerName('controller');\n $this->controllerInfo->setMethodName('method');\n $this->controllerInfo->setImmutable(false);\n\n $this->assertEmpty(\n $this->controllerInfo->getControllerName(),\n 'The ControllerInfo::setControllerName cannot registered method name if immutable'\n );\n $this->assertEmpty(\n $this->controllerInfo->getMethodName(),\n 'The ControllerInfo::setMethodName cannot registered registered method name if immutable'\n );\n $this->assertTrue(\n $this->controllerInfo->isImmutable(),\n 'The ControllerInfo::setImmutable cannot change the immutable state if already immutable'\n );\n }",
"public function testGeneralGetterAndSetter()\n {\n\n $this->assertNull($this->object->getId());\n\n $date = new \\DateTime();\n $this->object->setCreatedAt($date);\n $this->assertEquals($date, $this->object->getCreatedAt());\n $this->object->setUpdatedAt($date);\n $this->assertEquals($date, $this->object->getUpdatedAt());\n\n $city = $this->object2;\n $city->prePersist();\n $this->assertTrue(is_object($city->getCreatedAt()));\n $city->preUpdate();\n $this->assertTrue(is_object($city->getUpdatedAt()));\n }",
"protected function setUp() {\n $this->object = new Entry(new \\Feeld\\DataType\\Str());\n }",
"public function test_setData_returnsSelf()\n\t{\n\t\t$data = ['foo' => 'bar', 'baz' => 'qux'];\n\t\t\n\t\t$request = new Post('http://example.com');\n\t\t\n\t\t$this->assertSame($request, $request->setData($data));\n\t\t$this->assertEquals($data, $request->getData());\n\t\t\n\t\treturn;\n\t}",
"public function testAccessorMethods()\n {\n // Id accessors\n static::assertNull($this->dto->getId());\n $this->dto->setId($expected = 1);\n static::assertSame($expected, $this->dto->getId());\n\n // Name accessors\n static::assertNull($this->dto->getName());\n $this->dto->setName($expected = 'Requestmon');\n static::assertSame($expected, $this->dto->getName());\n\n // Status accessors\n static::assertNull($this->dto->getOnlineStatus());\n $this->dto->setOnlineStatus($expected = 'Alive');\n static::assertSame($expected, $this->dto->getOnlineStatus());\n\n // ClusterId accessors\n static::assertNull($this->dto->getClusterId());\n $this->dto->setClusterId($expected = 1);\n static::assertSame($expected, $this->dto->getClusterId());\n\n // Address accessors\n static::assertNull($this->dto->getAddress());\n $this->dto->setAddress($expected = new Address());\n static::assertSame($expected, $this->dto->getAddress());\n\n // Telephone accessors\n static::assertNull($this->dto->getTelephone());\n $this->dto->setTelephone($expected = new Telephone());\n static::assertSame($expected, $this->dto->getTelephone());\n\n // Email accessors\n static::assertNull($this->dto->getEmail());\n $this->dto->setEmail($expected = new Email());\n static::assertSame($expected, $this->dto->getEmail());\n\n // Account type id accessors\n static::assertNull($this->dto->getAccountTypeId());\n $this->dto->setAccountTypeId($expected = 1);\n static::assertSame($expected, $this->dto->getAccountTypeId());\n\n // Module list id accessors\n static::assertNull($this->dto->getModuleList());\n $this->dto->setModuleList($expected = '1,2,3');\n static::assertSame($expected, $this->dto->getModuleList());\n }",
"public function testGetValue3()\n {\n $method = $this->getMethod('getValue');\n\n $this->assertEquals(null,\n $method->invokeArgs($this->object, [ '_SERVER.TEST' ]));\n }",
"public function test_set_020_oneStep_array()\n {// $data = new Blank();\n// $res = $this->obj->set($data, '/0/', 'John Dow');\n// $this->assertEquals('John Dow', $res[0]);\n }",
"public function token_setter_and_getter()\n {\n // Arrange\n $service = new Service;\n $token = ['access_token' => '0123456789abcdef'];\n\n // Act\n $returned = $service->setToken($token)->getToken();\n\n // Assert\n $this->assertEquals($token, $returned);\n }",
"public function testBasicSetAndGet()\n {\n $data = array(array(\"title\" => \"Test\",\n \"url\" => \"/test\"));\n \n $bc = new \\Loom\\Breadcrumbs();\n $this->assertEmpty($bc->get());\n\n $bc->set($data);\n $this->assertCount(1, $bc->get());\n }",
"public function get($entryName);",
"protected function freshEntry()\n {\n return new Entry;\n }",
"public function testParentWithPrivatePropertyMapping(): void\n {\n }",
"abstract public function set($in): void;",
"public function testInvoke()\n {\n $this->instance->{$this->name};\n // Copy the instance to a local variable as we can't invoke it directly.\n $instance = $this->instance;\n $instance = $instance();\n self::assertInstanceOf(\n Chameleon::class,\n $instance,\n 'Instance invocation does not return an instance of Chameleon'\n );\n self::assertTrue(\n array_key_exists($this->name, $instance),\n 'Instance element cannot be tested with array_key_exists'\n );\n }",
"public function testFillable()\n {\n $author = new Author(['name'=>'Karin Slaughter']);\n $this->assertEquals('Karin Slaughter', $author->name);\n }",
"public function testGeneralResourceSetters()\n {\n $valueForLibrary = 'Hannover Stadtbibliothek';\n $this->resource->set('library', $valueForLibrary);\n $newValue = $this->resource->get('library');\n $this->assertEquals($valueForLibrary, $newValue,\n 'set() does not fill in values, resource might not be reference');\n $valueForAuthor = 'John Ronald Reuel Tolkien';\n $this->resource->setRecursive('books/0/author', $valueForAuthor);\n $newRecursiveValue = $this->resource->getRecursive('books/0/author');\n $this->assertEquals($valueForAuthor, $newRecursiveValue,\n 'setRecursive() does not fill in values, resource might not be reference');\n $marvinIsTiredOfYourTests = 'I am not in the mood for this... sight...';\n $this->resource->setRecursive('books/1', $marvinIsTiredOfYourTests);\n $marvinsValue = $this->resource->getRecursive('books/1');\n $this->assertEquals($marvinIsTiredOfYourTests, $marvinsValue,\n 'setRecursive() does not fill in values if they are not the final node');\n $newPrice = 32.90;\n $pricePath = 'books/0/price';\n $pathObj = new Path($pricePath);\n $this->resource->setRecursive($pathObj, $newPrice);\n $this->assertEquals($newPrice, $this->resource->getRecursive($pricePath),\n 'setRecursive() does not fill in values if its written by a Path object');\n }",
"public function testModifyMetadata()\n {\n }",
"public function testVersionGetters()\n {\n /** @var Version $version */\n $version = Version::get()->first(); // ONLY EVER ONE ELEMENT!\n $this->assertNotNull($version);\n\n $this->outputGetters($version, [ \"id\" ]);\n }",
"public function testSetGetValue()\n {\n $value = new ScalarValue('foo');\n $same = $this->uut->setValue($value);\n $this->assertSame($this->uut, $same);\n $this->assertEquals($value, $this->uut->getValue());\n }",
"function doGetterSetter() {\n\tglobal $description_obj;\n\tglobal $table_name, $class_name;\n\tglobal $tabs, $tab2, $tab3;\n\n\tfComment($tabs,\"Getters and Setters\");\n\tforeach($description_obj as $obj) {\n\t\t//print_r($obj);\n\n\t\techo $tabs,\"/// getter for '$obj->Field'\\n\",\n\t\t\t $tabs,\"public function get_{$obj->Field}()\\t\\t{return \\$this->$obj->Field;}\\n\",\n\t\t\t $tabs,\"/// setter for '$obj->Field'\\n\",\n\t\t\t $tabs,\"public function set_{$obj->Field}(\\$val)\\t{\\$this->$obj->Field = \",assignEscape($obj),\";}\\n\",\n\t\t\t \"\\n\";\n\t}\n\techo $tabs,\"public function get_last_error()\\t\\t{return \\$this->_last_error;}\\n\";\n\techo \"\\n\\n\";\n}",
"function walk_test_input(&$value,$key)\n{\n $value=test_input($value);\n}",
"public function testSetAndRetrieveObject(): void\n {\n $obj = new \\stdClass;\n $obj->animal = \"Frog\";\n $obj->mineral = \"Quartz\";\n $obj->vegetable = \"Spinach\";\n $testObj = new \\stdClass;\n $testObj->testInt = 5;\n $testObj->testFloat = 3.278;\n $testObj->testString = \"WooHoo\";\n $testObj->testBoolean = true;\n $testObj->testNull = null;\n $testObj->testArray = array(1,2,3,4,5);\n $testObj->testObject = $obj;\n $key = \"TestObject\";\n $this->testNotStrict->set($key, $testObj);\n $a = $this->testNotStrict->get($key);\n $bool = is_object($a);\n $this->assertTrue($bool);\n $this->assertEquals($testObj->testInt, $a->testInt);\n $this->assertEquals($testObj->testFloat, $a->testFloat);\n $this->assertEquals($testObj->testString, $a->testString);\n $this->assertEquals($testObj->testBoolean, $a->testBoolean);\n $this->assertNull($a->testNull);\n $this->assertEquals($testObj->testArray, $a->testArray);\n $this->assertEquals($testObj->testObject, $a->testObject);\n }",
"public function testSet()\n {\n $object = new \\Webaholicson\\Minimvc\\Core\\Object(['test' => true]);\n $this->assertTrue($object->get('test'));\n $this->assertSame($object, $object->set('test', false));\n $this->assertFalse($object->get('test'));\n $object->set(['node' => ['test' => false]]);\n $this->assertContains(false , $object->get('node'));\n }",
"public function testGetValueDeref()\r\n\t{\r\n\t\t$obj = CAntObject::factory($this->dbh, \"task\", null, $this->user);\r\n\t\t$obj->setValue(\"user_id\", $this->user->id);\r\n\t\t$obj->save();\r\n\r\n\t\t$this->assertEquals($this->user->getValue(\"name\"), $obj->getValueDeref(\"user_id.name\"));\r\n\r\n\t\t// Cleanup\r\n\t\t$obj->removeHard();\r\n\t}",
"public function testAssignData() {\n $config = new Config();\n $config->foo = 123;\n \n $this->assertEquals(123, $config->foo);\n \n $config->bar = array('baz' => 456);\n $this->assertInstanceOf('Nimbles\\App\\Config', $config->bar);\n $this->assertEquals(456, $config->bar->baz);\n \n $this->setExpectedException('Nimbles\\App\\Config\\Exception\\InvalidValue');\n $config->quz = new \\stdClass();\n }",
"public function testOffsetGet()\n {\n $bag = new ArrayAttributeBag('foobar_storageKey');\n\n $bag['foo'] = 'bar';\n\n $this->assertSame('bar', $bag['foo']);\n }",
"public function testSet()\n {\n $collection = $this->collection->set(1, 7);\n\n $this->assertEquals(7, $this->collection->get(1));\n $this->assertSame($this->collection, $collection);\n\n $this->collection->set(6, 9);\n $this->assertEquals(9, $this->collection->get(6));\n }",
"function testFileContents() {\r\n require_once 'ag-config.php';\r\n require_once ROOT_DIR.'/includes/util.php';\r\n echo \"Testing constructor\\n\";\r\n $fc = new FileContents('filecontents.php');\r\n assert('$fc !== NULL');\r\n $count = count($fc->toArray());\r\n assert('$count > 0');\r\n try {\r\n $fc = new FileContents($fc);\r\n } catch (InvalidArgumentException $iae) {\r\n echo 'Caught exception: ', $iae->getMessage(), \"\\n\";\r\n }\r\n try {\r\n $fc = new FileContents(' ');\r\n } catch (InvalidArgumentException $iae) {\r\n echo 'Caught exception: ', $iae->getMessage(), \"\\n\";\r\n }\r\n try {\r\n $fc = new FileContents('*.php');\r\n } catch (InvalidArgumentException $iae) {\r\n echo 'Caught exception: ', $iae->getMessage(), \"\\n\";\r\n }\r\n try {\r\n $fc = new FileContents(getcwd());\r\n } catch (UnexpectedValueException $uve) {\r\n echo 'Caught exception: ', $uve->getMessage(), \"\\n\";\r\n }\r\n\r\n echo \"Testing accessor functions\\n\";\r\n $fc = new FileContents('filecontents.php');\r\n assert('strcmp($fc->getPathname(), __FILE__)');\r\n assert('strcmp($fc->getName(), basename(__FILE__))');\r\n assert('$fc->exists()');\r\n assert('$fc->fileExists()');\r\n assert('$fc->length() == strlen(file_get_contents(\"filecontents.php\"))');\r\n\r\n echo \"Testing filters and mutators\\n\";\r\n $fc = new FileContents('filecontents.php');\r\n $size = strlen($fc->toString());\r\n assert('$fc->isMatch(\"/@author\\s+Ed\\w*\\s+Parrish/i\")');\r\n $fc->stripComments();\r\n assert('strlen($fc->toString()) < $size'); //'>\r\n assert('$fc->isMatch(\"/\\/\\*/\") == false');\r\n assert('$fc->isMatch(\"/\\/\\//\") == false');\r\n //print_r($fc->toString());\r\n\r\n $fc->reload();\r\n assert('strlen($fc->toString()) === $size'); //'>\r\n $fc->removeLines(0);\r\n $arr = $fc->toArray();\r\n assert('$arr[0] === \"/**\"');\r\n $numLines = count($arr);\r\n assert('$count === ($numLines + 1)');\r\n// print_r($fc->toArray());\r\n\r\n echo \"Testing static method toFileContents()\\n\";\r\n $arr = FileContents::toFileContents('*.php');\r\n assert('$arr !== NULL');\r\n assert('count($arr) == count(globr(\"*.php\"))');\r\n foreach($arr as $fc) {\r\n assert('$fc instanceof FileContents');\r\n }\r\n\r\n // Visual tests\r\n// $fc = new FileContents('filecontents.php');\r\n// $fc->filterByLine('/^(\\s*)function(.*{)$/', '\\1fun\\2');\r\n// print_r($fc->toArray());\r\n// print_r($fc->toString());\r\n\r\n/*\r\n $fc->filter('/fun/', 'function');\r\n $fc->trimWhitespace();\r\n print_r($arr);\r\n*/\r\n echo \"...unit test successfully completed.\\n\";\r\n}",
"function test_object_refs() {\n\t\t$key = rand_str();\n\t\t$object_a = new stdClass;\n\t\t$object_a->foo = 'alpha';\n\t\t$this->cache->set( $key, $object_a );\n\t\t$object_a->foo = 'bravo';\n\t\t$object_b = $this->cache->get( $key );\n\t\t$this->assertEquals( 'alpha', $object_b->foo );\n\t\t$object_b->foo = 'charlie';\n\t\t$this->assertEquals( 'bravo', $object_a->foo );\n\n\t\t$key = rand_str();\n\t\t$object_a = new stdClass;\n\t\t$object_a->foo = 'alpha';\n\t\t$this->cache->add( $key, $object_a );\n\t\t$object_a->foo = 'bravo';\n\t\t$object_b = $this->cache->get( $key );\n\t\t$this->assertEquals( 'alpha', $object_b->foo );\n\t\t$object_b->foo = 'charlie';\n\t\t$this->assertEquals( 'bravo', $object_a->foo );\n\t}",
"abstract protected function handle_set($name,$value);",
"public function testCanReplace()\n {\n self::$apcu = [];\n $this->sut->add('myKey', 'myValue');\n $this->assertTrue($this->sut->replace('myKey', 'myNewValue'));\n $this->assertSame('myNewValue', self::$apcu['myKey']);\n }",
"public function testCanAdd()\n {\n self::$apcu = [];\n $this->assertTrue($this->sut->add('myKey','myValue'));\n }",
"public function testOffsetGet()\n\t{\n\t\t$this->assertEquals('rdf:metaData', $this->instance[2]->getName());\n\t}",
"public function testGetMeta()\n {\n $meta1 = Person::getMeta();\n $meta2 = Person::objects()->getMeta();\n\n $this->assertSame($meta1, $meta2);\n }",
"public function testGetSet()\n\t{\n\t\t$this->view->name = \"Nicholas\";\n\t\t$this->assertEquals(\"Nicholas\", $this->view->name);\n\t}",
"public function getEntry()\n {\n return $this->entry;\n }",
"public function getEntry()\n {\n return $this->entry;\n }",
"public function getEntry()\n {\n return $this->entry;\n }",
"public function test__get()\n {\n $struct = $this->_newStruct();\n $this->assertSame($struct->foo, 'bar');\n $this->assertSame($struct['foo'], 'bar');\n \n $struct = $this->_newStruct();\n try {\n $invalid = $struct->noSuchKey;\n $this->fail('Should have thrown a NO_SUCH_PROPERTY exception.');\n } catch (Solar_Exception_NoSuchProperty $e) {\n // pass\n }\n \n $struct = $this->_newStruct();\n try {\n $invalid = $struct['no_such_key'];\n $this->fail('Should have thrown a NO_SUCH_PROPERTY exception.');\n } catch (Solar_Exception_NoSuchProperty $e) {\n // pass\n }\n }",
"public function testIsValidSuccessWithInvokedSetter()\n {\n $this->_object->expects($this->once())->method('hasDataChanges')->will($this->returnValue(true));\n $this->_object->expects($this->once())->method('getData')->with('attr1')->will($this->returnValue(1));\n $this->_object->expects($this->once())->method('getOrigData')->with('attr1')->will($this->returnValue(1));\n\n $validator = new \\Magento\\Framework\\Validator\\Entity\\Properties();\n $validator->setReadOnlyProperties(['attr1']);\n $this->assertTrue($validator->isValid($this->_object));\n }",
"public function testSettersAndGetters()\n {\n // Create the objects that will be set in the data store\n $event = new IntermediateThrowEvent();\n\n //Assertion: The collections getters must be not null\n $this->assertEquals(0, $event->getDataInputAssociations()->count());\n $this->assertEquals(0, $event->getDataInputs()->count());\n\n //Assertion: input set was not initialized so it must be null\n $this->assertNull($event->getInputSet());\n }",
"abstract protected function populateEntry(HistoryEntry $entry);",
"public function gettersAndSettersShouldWorkProperly(): void\n {\n $heidelpay = new Heidelpay('s-priv-123');\n /** @var PaymentService $paymentService */\n $paymentService = $heidelpay->getPaymentService();\n $this->assertSame($heidelpay, $paymentService->getHeidelpay());\n $this->assertSame($heidelpay->getResourceService(), $paymentService->getResourceService());\n\n $heidelpay2 = new Heidelpay('s-priv-1234');\n $paymentService->setHeidelpay($heidelpay2);\n $this->assertSame($heidelpay2, $paymentService->getHeidelpay());\n }",
"public function testWriteEntryWithExpandedEntry()\n\t{\n\t\t$expandedEntry = new ODataEntry();\n\t\t$expandedEntry->id = 'Expanded Entry 1';\n\t\t$expandedEntry->title = 'Expanded Entry Title';\n\t\t$expandedEntry->type = \"Expanded.Type\";\n\t\t$expandedEntry->editLink = \"Edit Link URL\";\n\t\t$expandedEntry->selfLink = \"Self Link URL\";\n\n\t\t$expandedEntry->mediaLinks = array(\n\t\t\tnew ODataMediaLink(\n\t\t\t\t'Media Link Name',\n\t\t\t\t'Edit Media link',\n\t\t\t\t'Src Media Link',\n\t\t\t\t'Media Content Type',\n\t\t\t\t'Media ETag'\n\t\t\t),\n\t\t\tnew ODataMediaLink(\n\t\t\t\t'Media Link Name2',\n\t\t\t\t'Edit Media link2',\n\t\t\t\t'Src Media Link2',\n\t\t\t\t'Media Content Type2',\n\t\t\t\t'Media ETag2'\n\t\t\t)\n\t\t);\n\n\t\t$expandedEntry->links = array();\n\t\t$expandedEntry->eTag = 'Entry ETag';\n\t\t$expandedEntry->isMediaLinkEntry = false;\n\n\n\t\t$pr1 = new ODataProperty();\n\t\t$pr1->name = 'fname';\n\t\t$pr1->typeName = 'string';\n\t\t$pr1->value = 'Yash';\n\n\t\t$pr2 = new ODataProperty();\n\t\t$pr2->name = 'lname';\n\t\t$pr2->typeName = 'string';\n\t\t$pr2->value = 'Kothari';\n\n\t\t$propCon1 = new ODataPropertyContent();\n\t\t$propCon1->properties = array($pr1, $pr2);\n\n\n\t\t$expandedEntryComplexProperty = new ODataProperty();\n\t\t$expandedEntryComplexProperty->name = 'Expanded Entry Complex Property';\n\t\t$expandedEntryComplexProperty->typeName = 'Full Name';\n\t\t$expandedEntryComplexProperty->value = $propCon1;\n\n\t\t$expandedEntryProperty1 = new ODataProperty ();\n\t\t$expandedEntryProperty1->name = 'Expanded Entry City Property';\n\t\t$expandedEntryProperty1->typeName = 'string';\n\t\t$expandedEntryProperty1->value = 'Ahmedabad';\n\n\t\t$expandedEntryProperty2 = new ODataProperty ();\n\t\t$expandedEntryProperty2->name = 'Expanded Entry State Property';\n\t\t$expandedEntryProperty2->typeName = 'string';\n\t\t$expandedEntryProperty2->value = 'Gujarat';\n\n\n\t\t$expandedEntry->propertyContent = new ODataPropertyContent();\n\t\t$expandedEntry->propertyContent->properties = array (\n\t\t\t$expandedEntryComplexProperty,\n\t\t\t$expandedEntryProperty1,\n\t\t\t$expandedEntryProperty2\n\t\t);\n\t\t//End the expanded entry\n\n\n\t\t//build up the main entry\n\n\t\t$entry = new ODataEntry();\n\t\t$entry->id = 'Main Entry';\n\t\t$entry->title = 'Entry Title';\n\t\t$entry->type = \"Main.Type\";\n\t\t$entry->editLink =\"Edit Link URL\";\n\t\t$entry->selfLink = \"Self Link URL\";\n\t\t$entry->mediaLinks = array(\n\t\t\tnew ODataMediaLink(\n\t\t\t\t'Media Link Name',\n\t\t\t\t'Edit Media link',\n\t\t\t\t'Src Media Link',\n\t\t\t\t'Media Content Type',\n\t\t\t\t'Media ETag'\n\t\t\t),\n\t\t\tnew ODataMediaLink(\n\t\t\t\t'Media Link Name2',\n\t\t\t\t'Edit Media link2',\n\t\t\t\t'Src Media Link2',\n\t\t\t\t'Media Content Type2',\n\t\t\t\t'Media ETag2'\n\t\t\t)\n\t\t);\n\n\t\t$entry->eTag = 'Entry ETag';\n\t\t$entry->isMediaLinkEntry = false;\n\n\t\t$entryProperty1 = new ODataProperty();\n\t\t$entryProperty1->name = 'Main Entry Property 1';\n\t\t$entryProperty1->typeName = 'string';\n\t\t$entryProperty1->value = 'Yash';\n\n\t\t$entryProperty2 = new ODataProperty();\n\t\t$entryProperty2->name = 'Main Entry Property 2';\n\t\t$entryProperty2->typeName = 'string';\n\t\t$entryProperty2->value = 'Kothari';\n\n\t\t$entry->propertyContent = new ODataPropertyContent();\n\t\t$entry->propertyContent->properties = array($entryProperty1, $entryProperty2);\n\t\t//End of main entry\n\n\n\t\t//Now link the expanded entry to the main entry\n\t\t$expandLink = new ODataLink();\n\t\t$expandLink->isCollection = false;\n\t\t$expandLink->isExpanded = true;\n\t\t$expandLink->title = \"Expanded Property\";\n\t\t$expandLink->url = \"ExpandedURL\";\n\t\t$expandLink->expandedResult = $expandedEntry;\n\t\t$entry->links = array($expandLink);\n\n\n\n\t\t$writer = new JsonLightODataWriter(JsonLightMetadataLevel::FULL, $this->serviceBase);\n\t\t$result = $writer->write($entry);\n\t\t$this->assertSame($writer, $result);\n\n\n\t\t//decoding the json string to test\n\t\t$actual = json_decode($writer->getOutput());\n\n\t\t$expected = '{\n\t\"odata.metadata\":\"http://services.odata.org/OData/OData.svc/$metadata#/@Element\",\n\t\"@odata.type\":\"Main.Type\",\n\t\"@odata.id\":\"Main Entry\",\n\t\"@odata.etag\":\"Entry ETag\",\n\t\"@odata.editLink\":\"Edit Link URL\",\n\t\"Expanded [email protected]\":\"ExpandedURL\",\n\t\"Expanded Property\":{\n\t\t\"@odata.type\":\"Expanded.Type\",\n\t\t\"@odata.id\":\"Expanded Entry 1\",\n\t\t\"@odata.etag\":\"Entry ETag\",\n\t\t\"@odata.editLink\":\"Edit Link URL\",\n\t\t\"Expanded Entry Complex Property\":{\n\t\t\t\"@odata.type\":\"Full Name\",\n\t\t\t\"fname\":\"Yash\",\n\t\t\t\"lname\":\"Kothari\"\n\t\t},\n\t\t\"Expanded Entry City Property\":\"Ahmedabad\",\n\t\t\"Expanded Entry State Property\":\"Gujarat\"\n\t},\n\t\"Main Entry Property 1\":\"Yash\",\n\t\"Main Entry Property 2\":\"Kothari\"\n}';\n\t\t$expected = json_decode($expected);\n\n\t\t$this->assertEquals(array($expected), array($actual), \"raw JSON is: \" . $writer->getOutput());\n\t}",
"function test()\n {\n $this->updated = '2010-01-18 11:39';\n $this->created = '2010-01-18 08:48';\n }",
"public function testVersionSetterGetter(): void\n {\n $version = uniqid('v', true);\n $this->component->setVersion($version);\n self::assertSame($version, $this->component->getVersion());\n }",
"public function testTextInfo() {\n $this->assertFalse($this->object->isset_textInfo());\n\n $textInfo = 'test';\n $this->object->set_textInfo($textInfo);\n $this->assertTrue($this->object->isset_textInfo());\n $this->assertEquals($textInfo, $this->object->get_textInfo());\n }",
"public function test_builder_returnsInstanceOf_EntryItem()\n\t{\n\t\t$this->assertInstanceOf('EntryCollection', $this->entry_collection_object);\n\t}",
"public function mutate();",
"public function mutate();",
"abstract protected function setRequiredGetters();",
"public function testFailUpdateEntryNotAString()\n {\n $this->expectExceptionMessage('Cannot update entry translation');\n $this->parser->read(TEST_DATA_PATH . '/general.po');\n\n $this->parser->updateEntry('cookie', ['Keks']);\n }",
"public function testMethod()\n {\n $this->instance->{$this->name};\n $instance = $this->instance->{(string)$this->name}();\n self::assertInstanceOf(\n Chameleon::class,\n $instance,\n 'Instance does not have a readable method that returns an instance of Chameleon'\n );\n self::assertTrue(\n array_key_exists($this->name, $instance),\n 'Instance element cannot be tested with array_key_exists'\n );\n\n }",
"public function getEntryGenerator();",
"public function testCanSetAndGetEmail()\n {\n $mockEmailAddress = '[email protected]';\n\n $this->dataCenter->setEmailAddress($mockEmailAddress);\n\n $this->assertEquals($mockEmailAddress, $this->dataCenter->getEmailAddress());\n }",
"public function testOoCanSetGetFlag()\n {\n $flag = new Command\\Flag('r');\n $command = $this->createInstance();\n $command->addFlag($flag);\n $this->assertSame([$flag], $command->getFlags(), 'Must be able to get and set a single flag object');\n }",
"public function testGetChangeIssue()\n {\n }",
"public function testApplyPatch()\n {\n $patch = new Patch();\n $op = new Resources\\MockAtomic(function(Pointer $pointer){\n $value = 'baz';\n $pointer->set('/foo', $value);\n });\n $patch->addOperation($op);\n\n $target = ['foo'=>'bar'];\n $patch->apply($target);\n $this->assertEquals($target['foo'], 'baz');\n }",
"public function testSetAndRetrieveString(): void\n {\n $key = \"A test key\";\n $expected = \"Fubar String\";\n $this->testNotStrict->set($key, $expected);\n $actual = $this->testNotStrict->get($key);\n $this->assertEquals($expected, $actual);\n }",
"public function testConfigGetter(): void {\n $expected = new Config(\"$this->root/source\", \"$this->root/target\");\n $actual = $this->configUpdateManager->getConfig();\n self::assertEquals($expected, $actual);\n }",
"public function testModuleAndRouteAccessors()\n {\n $page = new Zym_Navigation_Page_Mvc(array(\n 'label' => 'foo',\n 'action' => 'index',\n 'controller' => 'index'\n ));\n \n $props = array('Module', 'Route');\n $valids = array('index', 'help', 'home', 'default', '1', ' ', null);\n $invalids = array(42, (object) null);\n \n foreach ($props as $prop) {\n $setter = \"set$prop\";\n $getter = \"get$prop\";\n \n foreach ($valids as $valid) {\n $page->$setter($valid);\n $this->assertEquals($valid, $page->$getter());\n }\n \n foreach ($invalids as $invalid) {\n try {\n $page->$setter($invalid);\n $msg = \"'$invalid' is invalid for $setter(), but no \";\n $msg .= 'InvalidArgumentException was thrown';\n $this->fail($msg);\n } catch (InvalidArgumentException $e) {\n \n }\n }\n }\n }",
"public function testGet() {\n $container = new Container();\n\n $this->assertNull($container->get('test'));\n $container->set('string', 'test');\n $this->assertEquals('string', $container->get('test'));\n\n $container->set(new stdClass(), 'std');\n $this->assertInstanceOf(stdClass::class, $container->get(stdClass::class));\n }",
"public function testGetMod()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }",
"protected function _prepare_entry ($entry)\n {\n parent::_prepare_entry ($entry);\n\n $db = $this->db;\n $entry->kind = $db->f ('entry_kind');\n\n switch ($entry->type)\n {\n case 'change':\n $entry->number = $db->f ('chng_number');\n $entry->job_id = $db->f ('chng_job_id');\n break;\n case 'job':\n $entry->time_created->set_from_iso ($db->f ('job_time_created'));\n $branch_info = $entry->main_branch_info ();\n $branch_info->status = $db->f ('job_status');\n $branch_info->priority = $db->f ('job_priority');\n $branch_info->time_closed->set_from_iso ($db->f ('job_time_closed'));\n $branch_info->closer_id = $db->f ('job_closer_id');\n break;\n }\n }",
"public function testGetters()\n {\n $this->entity->fromArray($this->testData);\n\n foreach ($this->expectedGetters as $method => $expectedResult) {\n //var_dump($this->testData, $expectedResult, $this->entity->$method());\n if (is_array($expectedResult)) {\n $this->assertArraysAreSimilar($expectedResult, $this->entity->$method(), $method);\n } elseif (is_object($expectedResult)) {\n $actualObject = var_export($this->entity->$method(), true);\n $expectedObject = var_export($expectedResult, true);\n $this->assertSame($expectedObject, $actualObject, $method);\n } else {\n $this->assertSame($expectedResult, $this->entity->$method(), $method);\n }\n }\n }",
"public function setEntry($entry)\n {\n $this->entry = $entry;\n\n return $this;\n }",
"public function mocked_returns_set_value_test()\n {\n $mocked = new Mocked('user', VarStore::singleton());\n // what would be set in a class when using Mocked::class\n $mocked->name->class = 'test';\n\n $this->assertContains('=> [\"test\"]', (string)$mocked->name->class);\n $this->assertSame('user->name->class => [\"test\"]', (string)$mocked->name->class);\n $this->assertNotSame('user->name->class => [\"test\"]', (string)$mocked->name->class->data);\n }",
"public function testCreateMember()\n {\n }"
]
| [
"0.6222554",
"0.6099855",
"0.6071278",
"0.6007627",
"0.5879672",
"0.58395123",
"0.58090204",
"0.5772419",
"0.57536584",
"0.5742591",
"0.5679185",
"0.5591027",
"0.55733293",
"0.5538892",
"0.5526578",
"0.55122095",
"0.5509618",
"0.548023",
"0.5452768",
"0.54381716",
"0.5404252",
"0.5366203",
"0.5362415",
"0.53584766",
"0.5348196",
"0.5326034",
"0.5298809",
"0.5296796",
"0.52926487",
"0.52824986",
"0.5274517",
"0.52708393",
"0.5260791",
"0.5257465",
"0.5248348",
"0.52465796",
"0.52443194",
"0.5229041",
"0.5219243",
"0.5217193",
"0.5211711",
"0.52085674",
"0.5204437",
"0.5184201",
"0.51756364",
"0.5168145",
"0.5164494",
"0.51533926",
"0.5153011",
"0.51506937",
"0.5148622",
"0.51463085",
"0.5143818",
"0.5133045",
"0.5132544",
"0.5128871",
"0.51247555",
"0.5122807",
"0.5118944",
"0.51168627",
"0.51145405",
"0.51119745",
"0.5101446",
"0.5097133",
"0.5094405",
"0.5089228",
"0.5073895",
"0.50664467",
"0.50649065",
"0.50649065",
"0.50649065",
"0.50616497",
"0.5060057",
"0.5058166",
"0.5057163",
"0.50508964",
"0.50481117",
"0.50398463",
"0.5039612",
"0.50272393",
"0.5025734",
"0.50254613",
"0.50254613",
"0.502244",
"0.50186163",
"0.50181866",
"0.5017412",
"0.5007673",
"0.5007459",
"0.4989667",
"0.49805418",
"0.4979891",
"0.49680325",
"0.49673992",
"0.49644482",
"0.49630228",
"0.49564242",
"0.4954651",
"0.4953375",
"0.4953354",
"0.49498516"
]
| 0.0 | -1 |
/ | | Computer Accessor / Mutator Tests | | | public function test_get_operating_system()
{
$os = 'Windows';
$c = $this->newComputer(['operatingsystem' => $os]);
$this->assertEquals($os, $c->getOperatingSystem());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function testsetComputerScore()\n {\n $dice = new DiceHand();\n $this->assertInstanceOf(\"\\Ame\\Dice\\DiceHand\", $dice);\n\n $dice->setComputerScore(1);\n $res = $dice->getComputerCurrentScore();\n $exp = 1;\n $this->assertEquals($exp, $res);\n }",
"public function testMutable()\n {\n $controllerName = 'controller';\n $methodName = 'method';\n\n $this->assertSame(\n $this->controllerInfo,\n $this->controllerInfo->setControllerName($controllerName),\n 'The ControllerInfo::setControllerName must return itself'\n );\n $this->assertSame(\n $this->controllerInfo,\n $this->controllerInfo->setMethodName($methodName),\n 'The ControllerInfo::setMethodName must return itself'\n );\n\n $this->assertEquals(\n $controllerName,\n $this->controllerInfo->getControllerName(),\n 'The ControllerInfo::getControllerName must return the registered controller name'\n );\n $this->assertEquals(\n $methodName,\n $this->controllerInfo->getMethodName(),\n 'The ControllerInfo::getMethodName must return the registered method name'\n );\n }",
"public function test__set()\n {\n $struct = $this->_newStruct();\n $struct->zim = 'irk';\n $this->assertSame($struct->zim, 'irk');\n $this->assertSame($struct->zim, $struct['zim']);\n \n $struct = $this->_newStruct();\n $struct->a = 'b';\n $this->assertSame($struct->a, 'b');\n $this->assertSame($struct->a, $struct['a']);\n }",
"public function testSettersGettersNative()\n {\n $connection = new BaseConnection('default');\n $connection->setOptions(array('connect' => false));\n\n $this->assert()\n ->object($connection->getMongoDB())\n ->isInstanceOf('MongoDB');\n\n $mongo = new \\Mongo('mongodb://localhost:27017', array('connect' => false));\n $connection->setMongo($mongo);\n $this->assert()\n ->variable($connection->getMongo())\n ->isIdenticalTo($mongo);\n }",
"public function testMachineWorks()\n\t{\n\t\t$this -> GachaMachineInstance -> setGachas(100) ;\n\t\t// play one time\n\t\t$this -> GachaMachineInstance -> turnWheel() ;\n\t\t// it should -1 Gacha\n\t\t$this -> assertEquals( 99 , $this -> GachaMachineInstance -> getGachas() ); // Success\n\n\t}",
"public function testIsSettersSetData()\r\n {\r\n $this->assertInstanceOf(Operator::class, $this->operator->setId(12));\r\n $this->assertInstanceOf(Operator::class, $this->operator->setName('test name'));\r\n\r\n $this->assertEquals(12, $this->operator->getId());\r\n $this->assertEquals('test name', $this->operator->getName());\r\n }",
"public function testAccessorMethods()\n {\n // Id accessors\n static::assertNull($this->dto->getId());\n $this->dto->setId($expected = 1);\n static::assertSame($expected, $this->dto->getId());\n\n // Name accessors\n static::assertNull($this->dto->getName());\n $this->dto->setName($expected = 'Requestmon');\n static::assertSame($expected, $this->dto->getName());\n\n // Status accessors\n static::assertNull($this->dto->getOnlineStatus());\n $this->dto->setOnlineStatus($expected = 'Alive');\n static::assertSame($expected, $this->dto->getOnlineStatus());\n\n // ClusterId accessors\n static::assertNull($this->dto->getClusterId());\n $this->dto->setClusterId($expected = 1);\n static::assertSame($expected, $this->dto->getClusterId());\n\n // Address accessors\n static::assertNull($this->dto->getAddress());\n $this->dto->setAddress($expected = new Address());\n static::assertSame($expected, $this->dto->getAddress());\n\n // Telephone accessors\n static::assertNull($this->dto->getTelephone());\n $this->dto->setTelephone($expected = new Telephone());\n static::assertSame($expected, $this->dto->getTelephone());\n\n // Email accessors\n static::assertNull($this->dto->getEmail());\n $this->dto->setEmail($expected = new Email());\n static::assertSame($expected, $this->dto->getEmail());\n\n // Account type id accessors\n static::assertNull($this->dto->getAccountTypeId());\n $this->dto->setAccountTypeId($expected = 1);\n static::assertSame($expected, $this->dto->getAccountTypeId());\n\n // Module list id accessors\n static::assertNull($this->dto->getModuleList());\n $this->dto->setModuleList($expected = '1,2,3');\n static::assertSame($expected, $this->dto->getModuleList());\n }",
"public function testOffsetSet()\n {\n $struct = $this->_newStruct();\n $struct->offsetSet('zim', 'irk');\n $this->assertSame($struct->offsetGet('zim'), 'irk');\n }",
"public function testGetterSetter()\n {\n $text = new Text('Foo bar', 100);\n $this->assertEquals($text->text, 'Foo bar');\n $this->assertEquals($text->confidence, 100);\n }",
"public function client_setter_and_getter()\n {\n // Arrange\n $service = new Service;\n $client = new Client;\n\n // Act\n $returned = $service->setClient($client)->getClient();\n\n // Assert\n $this->assertEquals($client, $returned);\n }",
"public function testGettersAndSetters()\n {\n $this->phone->setType('phone');\n $this->assertEquals('phone', $this->phone->getType());\n\n $this->phone->setValue('059 70 22 85');\n $this->assertEquals('059 70 22 85', $this->phone->getValue());\n }",
"public function token_setter_and_getter()\n {\n // Arrange\n $service = new Service;\n $token = ['access_token' => '0123456789abcdef'];\n\n // Act\n $returned = $service->setToken($token)->getToken();\n\n // Assert\n $this->assertEquals($token, $returned);\n }",
"public function testSetProperties() {\n\t\t$this->CurrentConditions->update(\n\t\t\t.70,\n\t\t\t.33,\n\t\t\t.34\n\t\t);\n\n\t\t$reflection = new ReflectionClass($this->CurrentConditions);\n\t\t$reflectionTemperature = $reflection->getProperty('temperature');\n\t\t$reflectionTemperature->setAccessible(TRUE);\n\t\t$reflectionHumidity = $reflection->getProperty('humidity');\n\t\t$reflectionHumidity->setAccessible(TRUE);\n\n\t\t$this->assertSame(\n\t\t\t$reflectionTemperature->getValue($this->CurrentConditions),\n\t\t\t.70\n\t\t);\n\t\t$this->assertSame(\n\t\t\t$reflectionHumidity->getValue($this->CurrentConditions),\n\t\t\t.33\n\t\t);\n\t}",
"public function testimmutable()\n {\n $this->assertSame(\n $this->controllerInfo,\n $this->controllerInfo->setImmutable(true),\n 'The ControllerInfo::setImmutable must return itself'\n );\n $this->controllerInfo->setControllerName('controller');\n $this->controllerInfo->setMethodName('method');\n $this->controllerInfo->setImmutable(false);\n\n $this->assertEmpty(\n $this->controllerInfo->getControllerName(),\n 'The ControllerInfo::setControllerName cannot registered method name if immutable'\n );\n $this->assertEmpty(\n $this->controllerInfo->getMethodName(),\n 'The ControllerInfo::setMethodName cannot registered registered method name if immutable'\n );\n $this->assertTrue(\n $this->controllerInfo->isImmutable(),\n 'The ControllerInfo::setImmutable cannot change the immutable state if already immutable'\n );\n }",
"public function testReadMember()\n {\n }",
"public function testSetGetValue()\n {\n $value = new ScalarValue('foo');\n $same = $this->uut->setValue($value);\n $this->assertSame($this->uut, $same);\n $this->assertEquals($value, $this->uut->getValue());\n }",
"public function getComputer()\n {\n return $this->computer;\n }",
"public function testComputerMove()\n {\n $this->assertFalse($this->game->computerMove(3));\n $this->game->startNextTurn();\n $this->assertTrue($this->game->computerMove(3));\n\n // Add points to currentPoints enough to pass treshhold\n // computerMove should return false\n $this->diceHand->addToSerie(6);\n $this->diceHand->addToSerie(6);\n $this->game->checkHand($this->diceHand);\n $this->game->checkHand($this->diceHand);\n $this->assertFalse($this->game->computerMove(3.5));\n }",
"public function testGetSet()\n {\n $term = new LP21Term('type', 'uuid');\n $term\n ->setUrl('url')\n ->setCode('code')\n ->setCantons(['BE'])\n ->setVersion('version')\n ->setCycles([1]);\n\n $this->assertEquals('url', $term->getUrl(), \"The getter/setter works for URLs.\");\n $this->assertEquals('code', $term->getCode(), \"The getter/setter works for codes.\");\n $this->assertEquals(['BE'], $term->getCantons(), \"The getter/setter works for cantons.\");\n $this->assertEquals('version', $term->getVersion(), \"The getter/setter works for versions.\");\n $this->assertEquals([1], $term->getCycles(), \"The getter/setter works for cycles.\");\n }",
"public function testCreateComputerObject()\n {\n $computer = new Computer(\"computer\");\n $this->assertInstanceOf(\"Frbr18\\Dice2\\Computer\", $computer);\n }",
"public function testSetValue()\n {\n $this->todo('stub');\n }",
"final public function newlySetValueIsReturnedWithGetValue(): void\n {\n $dataType = new DataTypeMock();\n $this->assertTrue($dataType->isEqual(null));\n\n $someObject = new stdClass();\n $dataType->setValue($someObject);\n $this->assertTrue($dataType->isEqual($someObject));\n }",
"public function testSetTelPortable2() {\n\n $obj = new Collaborateurs();\n\n $obj->setTelPortable2(\"telPortable2\");\n $this->assertEquals(\"telPortable2\", $obj->getTelPortable2());\n }",
"public function testGetValue()\n {\n $this->todo('stub');\n }",
"public function testSetTelPortable1() {\n\n $obj = new Collaborateurs();\n\n $obj->setTelPortable1(\"telPortable1\");\n $this->assertEquals(\"telPortable1\", $obj->getTelPortable1());\n }",
"public function testGetValue() : void\n {\n $instance = $this->createEmptyInstance();\n\n $value = new \\stdClass();\n\n $this->setValue($instance, 'value', $value);\n\n $this->getTestCase()->assertSame($value, $instance->getValue());\n }",
"public function gettersAndSettersShouldWorkProperly(): void\n {\n $heidelpay = new Heidelpay('s-priv-123');\n /** @var PaymentService $paymentService */\n $paymentService = $heidelpay->getPaymentService();\n $this->assertSame($heidelpay, $paymentService->getHeidelpay());\n $this->assertSame($heidelpay->getResourceService(), $paymentService->getResourceService());\n\n $heidelpay2 = new Heidelpay('s-priv-1234');\n $paymentService->setHeidelpay($heidelpay2);\n $this->assertSame($heidelpay2, $paymentService->getHeidelpay());\n }",
"public function testVersionSetterGetter(): void\n {\n $version = uniqid('v', true);\n $this->component->setVersion($version);\n self::assertSame($version, $this->component->getVersion());\n }",
"public function testGettersAndSetters()\n {\n $array = $this->getDummyHmacData();\n\n $this->entity->setData($array['data']);\n $this->entity->setKey($array['key']);\n $this->entity->setTime($array['time']);\n $this->entity->setHmac($array['hmac']);\n\n $this->assertTrue($array['data'] === $this->entity->getData());\n $this->assertTrue($array['key'] === $this->entity->getKey());\n $this->assertTrue($array['time'] === $this->entity->getTime());\n $this->assertTrue($array['hmac'] === $this->entity->getHmac());\n }",
"public function it_should_allow_storing_value_using_array_access_api() {\n\t\t$cache = $this->make_instance();\n\n\t\t$this->assertFalse( isset( $cache['foo'] ) );\n\n\t\t$cache['foo'] = 'bar';\n\n\t\t$this->assertTrue( isset( $cache['foo'] ) );\n\t\t$this->assertEquals( 'bar', $cache['foo'] );\n\t}",
"public function test__get()\n {\n $struct = $this->_newStruct();\n $this->assertSame($struct->foo, 'bar');\n $this->assertSame($struct['foo'], 'bar');\n \n $struct = $this->_newStruct();\n try {\n $invalid = $struct->noSuchKey;\n $this->fail('Should have thrown a NO_SUCH_PROPERTY exception.');\n } catch (Solar_Exception_NoSuchProperty $e) {\n // pass\n }\n \n $struct = $this->_newStruct();\n try {\n $invalid = $struct['no_such_key'];\n $this->fail('Should have thrown a NO_SUCH_PROPERTY exception.');\n } catch (Solar_Exception_NoSuchProperty $e) {\n // pass\n }\n }",
"public function mutate();",
"public function mutate();",
"abstract public function set();",
"public function testGeneralResourceSetters()\n {\n $valueForLibrary = 'Hannover Stadtbibliothek';\n $this->resource->set('library', $valueForLibrary);\n $newValue = $this->resource->get('library');\n $this->assertEquals($valueForLibrary, $newValue,\n 'set() does not fill in values, resource might not be reference');\n $valueForAuthor = 'John Ronald Reuel Tolkien';\n $this->resource->setRecursive('books/0/author', $valueForAuthor);\n $newRecursiveValue = $this->resource->getRecursive('books/0/author');\n $this->assertEquals($valueForAuthor, $newRecursiveValue,\n 'setRecursive() does not fill in values, resource might not be reference');\n $marvinIsTiredOfYourTests = 'I am not in the mood for this... sight...';\n $this->resource->setRecursive('books/1', $marvinIsTiredOfYourTests);\n $marvinsValue = $this->resource->getRecursive('books/1');\n $this->assertEquals($marvinIsTiredOfYourTests, $marvinsValue,\n 'setRecursive() does not fill in values if they are not the final node');\n $newPrice = 32.90;\n $pricePath = 'books/0/price';\n $pathObj = new Path($pricePath);\n $this->resource->setRecursive($pathObj, $newPrice);\n $this->assertEquals($newPrice, $this->resource->getRecursive($pricePath),\n 'setRecursive() does not fill in values if its written by a Path object');\n }",
"public function testAuthorMutator()\n {\n $this->assertTrue(true);\n }",
"public function testSet()\n {\n $object = new \\Webaholicson\\Minimvc\\Core\\Object(['test' => true]);\n $this->assertTrue($object->get('test'));\n $this->assertSame($object, $object->set('test', false));\n $this->assertFalse($object->get('test'));\n $object->set(['node' => ['test' => false]]);\n $this->assertContains(false , $object->get('node'));\n }",
"public function testSetSpecial() {\n\n $obj = new AppelsEnCours();\n\n $obj->setSpecial(\"special\");\n $this->assertEquals(\"special\", $obj->getSpecial());\n }",
"public function testActionAndControllerAccessors()\n {\n $page = new Zym_Navigation_Page_Mvc(array(\n 'label' => 'foo',\n 'action' => 'index',\n 'controller' => 'index'\n ));\n \n $props = array('Action', 'Controller');\n $valids = array('index', 'help', 'home', 'default', '1', ' ', '', null);\n $invalids = array(42, (object) null);\n \n foreach ($props as $prop) {\n $setter = \"set$prop\";\n $getter = \"get$prop\";\n \n foreach ($valids as $valid) {\n $page->$setter($valid);\n $this->assertEquals($valid, $page->$getter());\n }\n \n foreach ($invalids as $invalid) {\n try {\n $page->$setter($invalid);\n $msg = \"'$invalid' is invalid for $setter(), but no \";\n $msg .= 'InvalidArgumentException was thrown';\n $this->fail($msg);\n } catch (InvalidArgumentException $e) {\n \n }\n }\n }\n }",
"public function testSetGetCommand()\n {\n $string = uniqid('command-');\n $command = $this->createCommand($string);\n\n $subject = $this->createInstance();\n $_subject = $this->reflect($subject);\n\n $_subject->_setCommand($command);\n $result = $_subject->_getCommand();\n\n $this->assertEquals($command, $result, 'Assigned command is wrong');\n }",
"public function testCreateObjectComputerDiceHand()\n {\n $dice = new DiceHand();\n $this->assertInstanceOf(\"\\Ame\\Dice\\DiceHand\", $dice);\n\n $res = $dice->getComputerCurrentScore();\n $exp = 0;\n $this->assertEquals($exp, $res);\n }",
"public function testGetValue3()\n {\n $method = $this->getMethod('getValue');\n\n $this->assertEquals(null,\n $method->invokeArgs($this->object, [ '_SERVER.TEST' ]));\n }",
"public function testSetGetValue()\n {\n $value = new UploadValueStructure();\n $same = $this->uut->setValue($value);\n $this->assertSame($this->uut, $same);\n $this->assertSame($value, $this->uut->getValue());\n }",
"public function testGroupSetterGetter(): void\n {\n $group = bin2hex(random_bytes(32));\n $this->component->setGroup($group);\n self::assertSame($group, $this->component->getGroup());\n }",
"public function testOtherAccessors()\n {\n $this->initHalResourceProperties($props = [\n 'segment' => 'shoes',\n 'countries' => ['FR', 'US'],\n 'type' => 'marketplace'\n ]);\n\n // Expectations time\n $instance = new ChannelResource($this->halResource);\n $this->assertSame($props['segment'], $instance->getSegment());\n $this->assertSame($props['countries'], $instance->getCountryCodes());\n $this->assertSame($props['type'], $instance->getType());\n }",
"public function testMethodSetName()\n {\n $scorebox = new Scorebox();\n\n $scorebox->setName(\"One\");\n\n $name = $scorebox->getName();\n\n $expName = \"One\";\n\n $this->assertEquals($name, $expName);\n }",
"function doGetterSetter() {\n\tglobal $description_obj;\n\tglobal $table_name, $class_name;\n\tglobal $tabs, $tab2, $tab3;\n\n\tfComment($tabs,\"Getters and Setters\");\n\tforeach($description_obj as $obj) {\n\t\t//print_r($obj);\n\n\t\techo $tabs,\"/// getter for '$obj->Field'\\n\",\n\t\t\t $tabs,\"public function get_{$obj->Field}()\\t\\t{return \\$this->$obj->Field;}\\n\",\n\t\t\t $tabs,\"/// setter for '$obj->Field'\\n\",\n\t\t\t $tabs,\"public function set_{$obj->Field}(\\$val)\\t{\\$this->$obj->Field = \",assignEscape($obj),\";}\\n\",\n\t\t\t \"\\n\";\n\t}\n\techo $tabs,\"public function get_last_error()\\t\\t{return \\$this->_last_error;}\\n\";\n\techo \"\\n\\n\";\n}",
"abstract public function testConstructorAndProperties(): void;",
"public function testDescriptionSetterGetter(): void\n {\n $description = bin2hex(random_bytes(32));\n $this->component->setDescription($description);\n self::assertSame($description, $this->component->getDescription());\n }",
"public function testSetAndGet(): void\n {\n $ip = '127.0.0.1';\n $this->reCaptcha->setIp($ip);\n static::assertSame($ip, $this->reCaptcha->getIp());\n\n /* Set and get site key */\n $this->reCaptcha->setSiteKey($this->siteKey);\n static::assertSame($this->siteKey, $this->reCaptcha->getSiteKey());\n\n /* Set and get secret key */\n $this->reCaptcha->setSecretKey($this->secretKey);\n static::assertSame($this->secretKey, $this->reCaptcha->getSecretKey());\n }",
"public static function setters();",
"public function testSet()\n {\n $collection = $this->collection->set(1, 7);\n\n $this->assertEquals(7, $this->collection->get(1));\n $this->assertSame($this->collection, $collection);\n\n $this->collection->set(6, 9);\n $this->assertEquals(9, $this->collection->get(6));\n }",
"public function credentials_setter_and_getter()\n {\n // Arrange\n $service = new Service;\n $credentials = [\n 'client_id' => 'client-id',\n 'client_secret' => 'client-secret'\n ];\n\n // Act\n $returned = $service->setCredentials($credentials)->getCredentials();\n\n // Assert\n $this->assertEquals($credentials, $returned);\n }",
"public function testAssignData()\n {\n $config = $this->buildCoreConfigRegistry(array('useClientSideEncryptionFlag' => true));\n $helper = $this->getHelperMock('radial_creditcard', array('getConfigModel'));\n $helper->expects($this->any())\n ->method('getConfigModel')\n ->will($this->returnValue($config));\n $lastFour = '1111';\n $info = Mage::getModel('payment/info');\n $data = array('cc_last4' => $lastFour);\n $method = Mage::getModel('radial_creditcard/method_ccpayment', array('helper' => $helper));\n $method->setInfoInstance($info);\n $method->assignData($data);\n $this->assertSame($lastFour, $info->getCcLast4());\n }",
"public function testCanGet()\n {\n self::$apcu = [];\n $this->sut->add('myKey', 'myValue');\n $this->assertSame('myValue', $this->sut->get('myKey'));\n }",
"#[@test]\n public function returnValue_canSetGet() {\n $this->sut->setReturn('foo');\n $this->assertEquals('foo', $this->sut->getReturn());\n }",
"public function testModuleAndRouteAccessors()\n {\n $page = new Zym_Navigation_Page_Mvc(array(\n 'label' => 'foo',\n 'action' => 'index',\n 'controller' => 'index'\n ));\n \n $props = array('Module', 'Route');\n $valids = array('index', 'help', 'home', 'default', '1', ' ', null);\n $invalids = array(42, (object) null);\n \n foreach ($props as $prop) {\n $setter = \"set$prop\";\n $getter = \"get$prop\";\n \n foreach ($valids as $valid) {\n $page->$setter($valid);\n $this->assertEquals($valid, $page->$getter());\n }\n \n foreach ($invalids as $invalid) {\n try {\n $page->$setter($invalid);\n $msg = \"'$invalid' is invalid for $setter(), but no \";\n $msg .= 'InvalidArgumentException was thrown';\n $this->fail($msg);\n } catch (InvalidArgumentException $e) {\n \n }\n }\n }\n }",
"public function testGeneralGetterAndSetter()\n {\n\n $this->assertNull($this->object->getId());\n\n $date = new \\DateTime();\n $this->object->setCreatedAt($date);\n $this->assertEquals($date, $this->object->getCreatedAt());\n $this->object->setUpdatedAt($date);\n $this->assertEquals($date, $this->object->getUpdatedAt());\n\n $city = $this->object2;\n $city->prePersist();\n $this->assertTrue(is_object($city->getCreatedAt()));\n $city->preUpdate();\n $this->assertTrue(is_object($city->getUpdatedAt()));\n }",
"public function testGetPeopertyValueMethod()\n {\n $firstname = 'Chris';\n $subject = new TestPropertySubject();\n $en = new Enforcer();\n\n $result = $en->getPropertyValue('firstname', $subject);\n $this->assertEquals($firstname, $result);\n }",
"public function testSettingChannel()\n {\n $groupsMark = new GroupsMark();\n $returnedObject = $groupsMark->setChannel($this->dummyString);\n $refGroupsMark = new \\ReflectionObject($groupsMark);\n $channelProperty = $refGroupsMark->getProperty('channel');\n $channelProperty->setAccessible(true);\n $this->assertInstanceOf(GroupsMark::class, $returnedObject);\n $this->assertEquals($this->dummyString, $channelProperty->getValue($groupsMark));\n }",
"public function testCanSetAndGetCity()\n {\n $mockCity = 'Corpus Christi';\n\n $this->dataCenter->setCity($mockCity);\n\n $this->assertEquals($mockCity, $this->dataCenter->getCity());\n }",
"public function testGetter()\n {\n $account = new Account('access-key', 'secret-key', 'api-host');\n $this->assertEquals('access-key', $account->getAccessKey());\n $this->assertEquals('secret-key', $account->getSecretKey());\n $this->assertEquals('api-host', $account->getApiHost());\n }",
"public function test_character_can_don_one_shield()\n {\n // If he could hold 2 shields, his AC would change after picking up the 2nd one.\n $this->character->use(new Shield());\n $first_shield_ac = $this->character->getAc();\n $this->character->use(new Shield());\n $this->assertEquals($first_shield_ac, $this->character->getAc());\n }",
"public function testSettingPlayers()\n {\n $dice = new DicePlayers();\n $this->assertInstanceOf(\"\\Heln\\Dice\\DicePlayers\", $dice);\n\n $dice->setPlayers();\n $res = $dice->getPlayers();\n $exp = [\n \"Player\" => 0,\n \"Computer\" => 0,\n ];\n $this->assertEquals($exp, $res);\n }",
"public function testGetValue()\n {\n $subject = new Iteration('', $value = 'test-value');\n\n $this->assertEquals($value, $subject->getValue());\n }",
"public function testGetters()\n {\n $this->entity->fromArray($this->testData);\n\n foreach ($this->expectedGetters as $method => $expectedResult) {\n //var_dump($this->testData, $expectedResult, $this->entity->$method());\n if (is_array($expectedResult)) {\n $this->assertArraysAreSimilar($expectedResult, $this->entity->$method(), $method);\n } elseif (is_object($expectedResult)) {\n $actualObject = var_export($this->entity->$method(), true);\n $expectedObject = var_export($expectedResult, true);\n $this->assertSame($expectedObject, $actualObject, $method);\n } else {\n $this->assertSame($expectedResult, $this->entity->$method(), $method);\n }\n }\n }",
"public function testCreateTheComputerClass()\n {\n $controller = new Computer(\"name\", \"computer\");\n $this->assertInstanceOf(\"\\Jeso20\\Game\\Computer\", $controller);\n }",
"public function testSetCarTec() {\n\n $obj = new Materiels();\n\n $obj->setCarTec(\"carTec\");\n $this->assertEquals(\"carTec\", $obj->getCarTec());\n }",
"function __get($name)\n { return $this->$name = $this->$name();\n }",
"public function testGetSet() {\n $random = new Random($this->getValidator());\n\n // Ensure defaults are gettable.\n $this->assertEquals($random::DEFAULT_BYTES, $random->getBytes());\n\n // Set a \"random\" number of bytes and then check that we can get it.\n $random_bytes = rand($this::MIN_BYTES, $this::MAX_BYTES);\n $random->setBytes($random_bytes);\n $this->assertEquals($random_bytes, $random->getBytes());\n }",
"public function testPhysicalAddCard()\n {\n }",
"public function testStateGetters()\n {\n /** @var State $state */\n $state = State::getById(28);\n $this->assertNotNull($state);\n $this->assertEquals(28, $state->getId());\n\n $this->outputGetters($state);\n }",
"public function testPersistanceGet() {\n\t\t// the values are still retrievable.\n\t\t$this->assertEquals( 'remember', $this->cache->get( 'keep' ) );\n\t}",
"function &act() {\n $dummy = $this->value;\n return $dummy;\n }",
"abstract function get();",
"function testFieldMask() \r\n\t{\r\n\t\tdate_default_timezone_set(\"America/Los_Angeles\");\r\n\r\n\t\t// Test default phone\r\n\t\t$obj = new CAntObject($this->dbh, \"customer\", null, $this->user);\r\n\t\t$obj->setValue(\"phone_cell\", \"5415415411\");\r\n\t\t$this->assertEquals($obj->getValue(\"phone_cell\"), \"(541) 541-5411\");\r\n\r\n\t\t// Test default timestamp\r\n\t\t$obj = new CAntObject($this->dbh, \"customer\", null, $this->user);\r\n\t\t$obj->setValue(\"last_contacted\", \"1-1-2011 1:15 am PST\");\r\n\t\t$this->assertEquals($obj->getValue(\"last_contacted\"), \"01/01/2011 01:15:00 am PST\");\r\n\r\n\t}",
"public function testTokenGetterAndSetter()\n {\n $user = new User();\n $user->setToken('foo');\n\n $this->assertEquals('foo', $user->getToken());\n $this->assertEquals('foo', $user->getAccessToken());\n }",
"public function testSetPresent() {\n\n $obj = new Collaborateurs();\n\n $obj->setPresent(true);\n $this->assertEquals(true, $obj->getPresent());\n }",
"public function testOoCanSetGetFlag()\n {\n $flag = new Command\\Flag('r');\n $command = $this->createInstance();\n $command->addFlag($flag);\n $this->assertSame([$flag], $command->getFlags(), 'Must be able to get and set a single flag object');\n }",
"public function testIsValidSuccessWithInvokedSetter()\n {\n $this->_object->expects($this->once())->method('hasDataChanges')->will($this->returnValue(true));\n $this->_object->expects($this->once())->method('getData')->with('attr1')->will($this->returnValue(1));\n $this->_object->expects($this->once())->method('getOrigData')->with('attr1')->will($this->returnValue(1));\n\n $validator = new \\Magento\\Framework\\Validator\\Entity\\Properties();\n $validator->setReadOnlyProperties(['attr1']);\n $this->assertTrue($validator->isValid($this->_object));\n }",
"public function testGetNet()\n\t{\n\t\t$this->assertNull($this->object->getNet());\n\n\t\tTestReflection::setValue($this->object, 'net', true);\n\n\t\t$this->assertTrue($this->object->getNet());\n\t}",
"public function testSetGetToken()\n {\n $data = $this->createToken();\n $subject = $this->createInstance();\n $_subject = $this->reflect($subject);\n\n $_subject->_setToken($data);\n $this->assertSame($data, $_subject->_getToken(), 'Token path returned not same as token set');\n }",
"public function testGeneralResourceGetters()\n {\n $correctValue = 'Flourish and Blotts';\n $get = $this->resource->get('owner');\n $this->assertEquals($correctValue, $get,\n 'get() does not return the correct value');\n $correctRecursiveValue = 'Lord Of The Rings';\n $recursivePath = 'books/0/title';\n $getRecursive = $this->resource->getRecursive($recursivePath);\n $this->assertEquals($correctRecursiveValue, $getRecursive,\n 'getRecursive() does not return the correct value');\n $correctArrayValue = self::$testData['books'][0];\n $resourceValue = $this->resource->getRecursive('books/0')->toArray();\n $this->assertEquals($correctArrayValue, $resourceValue,\n 'getRecursive() does not return the correct value if its not the final node');\n $pathObj = new Path($recursivePath);\n $this->assertEquals($correctRecursiveValue, $this->resource->getRecursive($pathObj),\n 'getRecursive() does not return the correct value if its searched by a Path object');\n }",
"#[@test]\n public function repeat_canSetGet() {\n $this->sut->setRepeat(5);\n $this->assertEquals(5, $this->sut->getRepeat());\n }",
"public function testSetCleDeux() {\n\n $obj = new Employes();\n\n $obj->setCleDeux(\"cleDeux\");\n $this->assertEquals(\"cleDeux\", $obj->getCleDeux());\n }",
"function __set ( $name , $value )\n {\n $this->$name=$value;\n }",
"public function testSetters()\n {\n foreach ($this->expectedSetters as $method => $parameter) {\n $this->entity->$method($parameter);\n }\n\n $actualResult = $this->entity->toArray();\n\n $this->assertArraysAreSimilar($this->testData, $actualResult, 'toArray');\n }",
"public function testModify()\n {\n $user = User::factory()->create();\n $old_name = $user->name;\n $old_email = $user->email;\n\n $user->name = 'David';\n $user->email = '[email protected]';\n $update = $user->save();\n\n $this->assertTrue($update);\n $this->assertNotEquals($old_name, $user->name);\n $this->assertNotEquals($old_email, $user->email);\n }",
"public function testGetPropertyValuePublicProperty()\n {\n $username = 'ccornutt';\n $en = new Enforcer();\n $subject = new Subject((object)[\n 'username' => $username\n ]);\n\n $result = $en->getPropertyValue('username', $subject);\n $this->assertEquals($username, $result);\n }",
"abstract public function get() ;",
"protected function isObjectAccessorMode() {}",
"public function testGettersSetters()\n {\n $this->assertEquals('my category', $this->question->getCategory());\n $this->assertEquals('my question', $this->question->getQuestion());\n\n $this->assertEquals($this->answers, $this->question->getAnswers());\n\n $this->assertEquals(\n ['my first answer', 'my second answer', 'my third answer', 'my fourth answer'],\n $this->question->getAnswersLabels(),\n 'Question should return all available answers labels'\n );\n $this->assertEquals(\n ['my first answer', 'my second answer'],\n $this->question->getCorrectAnswersValues(),\n 'Question should return all correct answers values'\n );\n }",
"public function testSetPortablePerso() {\n\n $obj = new Collaborateurs();\n\n $obj->setPortablePerso(\"portablePerso\");\n $this->assertEquals(\"portablePerso\", $obj->getPortablePerso());\n }",
"public function testGetAndSetMethods()\n {\n $attribs = ['class' => 'gravatar', 'title' => 'avatar', 'id' => 'gravatar-1'];\n $this->_object->setDefaultImg('monsterid')\n ->setImgSize(150)\n ->setSecure(true)\n ->setEmail(\"[email protected]\")\n ->setAttribs($attribs)\n ->setRating('pg');\n $this->assertEquals(\"monsterid\", $this->_object->getDefaultImg());\n $this->assertEquals(\"pg\", $this->_object->getRating());\n $this->assertEquals(\"[email protected]\", $this->_object->getEmail());\n $this->assertEquals($attribs, $this->_object->getAttribs());\n $this->assertEquals(150, $this->_object->getImgSize());\n $this->assertTrue($this->_object->getSecure());\n }",
"public function testCacheGet() \n\t{\n\t\t$key = uniqid('key_');\n\t\t$value = uniqid('value_');\n\t\t$this->assertFalse(\\Cache\\Cache::get($key));\n\n\t\t\\Cache\\Cache::set($key, $value);\n\t\t$this->assertEquals(\\Cache\\Cache::get($key), $value);\n\t}",
"private function __set($name, $value)\n {\n// \tprint(\"Property set for [$name]<br/>\");\n if (method_exists($this, ($method = 'set_'.$name)))\n {\n $this->$method($value);\n }\n }",
"abstract public function get();",
"abstract public function get();",
"abstract public function get();",
"abstract public function get();"
]
| [
"0.6297505",
"0.61261505",
"0.5858511",
"0.5842975",
"0.55932915",
"0.55837893",
"0.55399954",
"0.5494037",
"0.547985",
"0.54687977",
"0.54557264",
"0.5441589",
"0.54349405",
"0.5401248",
"0.53972924",
"0.536574",
"0.53575784",
"0.533887",
"0.5329084",
"0.5327238",
"0.5288879",
"0.5262592",
"0.5252263",
"0.52485",
"0.52479136",
"0.5245925",
"0.52459186",
"0.52446276",
"0.5236086",
"0.520215",
"0.5189362",
"0.51809347",
"0.51809347",
"0.5179121",
"0.517377",
"0.5173012",
"0.51649857",
"0.5161564",
"0.5137487",
"0.51310986",
"0.5125893",
"0.51248854",
"0.5121382",
"0.5111861",
"0.5107961",
"0.5094747",
"0.5092309",
"0.5087629",
"0.50773364",
"0.50764",
"0.50719106",
"0.50680995",
"0.50614554",
"0.5060804",
"0.5057232",
"0.5053761",
"0.5048869",
"0.50448334",
"0.50237316",
"0.50236225",
"0.50215364",
"0.5019079",
"0.50113773",
"0.49923912",
"0.49881536",
"0.4983943",
"0.49677658",
"0.49379647",
"0.49228075",
"0.49202022",
"0.49103326",
"0.49083376",
"0.49009395",
"0.48888484",
"0.48869184",
"0.48839742",
"0.48759896",
"0.48755306",
"0.48746592",
"0.48712614",
"0.48616996",
"0.486097",
"0.48557287",
"0.48490554",
"0.48483646",
"0.48471406",
"0.48394865",
"0.48363414",
"0.48342064",
"0.48280314",
"0.48226312",
"0.48201826",
"0.48157805",
"0.4814851",
"0.48142672",
"0.48118135",
"0.48091656",
"0.48091656",
"0.48091656",
"0.48091656"
]
| 0.5337842 | 18 |
Initializes the new XML file reader factory. | public function __construct(
PathBuilderFactoryInterface $pathBuilderFactory = null,
NodeBuilderFactoryInterface $nodeBuilderFactory = null
) {
if (null === $nodeBuilderFactory) {
$nodeBuilderFactory = new NodeBuilderFactory();
}
if (null === $pathBuilderFactory) {
$pathBuilderFactory = new PathBuilderFactory();
}
$this->nodeBuilderFactory = $nodeBuilderFactory;
$this->pathBuilderFactory = $pathBuilderFactory;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function __construct()\n {\n $this->handler = new XMLReader();\n }",
"public function init() {\n $this->xml = new DomDocument($this->version, $this->encoding);\n }",
"public function init()\r\n\t{\r\n\t\tif ( $this->arrConfig == null )\r\n\t\t{\r\n\t\t\t// locate the config file\r\n\t\t\t\r\n\t\t\t$file = $this->config_file . \".xml\";\r\n\r\n\t\t\tif ( ! file_exists($file) )\r\n\t\t\t{\r\n\t\t\t\tthrow new \\Exception( \"could not find configuration file\" );\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// load it\r\n\r\n\t\t\t$this->xml = simplexml_load_file( $file );\r\n\t\t\t\r\n\t\t\t// process it\r\n\t\t\t\r\n\t\t\t$this->process();\r\n\t\t}\r\n\t}",
"protected function _init()\r\n {\r\n\t\ttry {\r\n\t\t\t$this->_fileHandler = fopen($this->_source, 'r');\r\n\t\t} catch (Exception $e)\r\n\t\t{\r\n\t\t\techo \"Error on reading file\";\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\t$this->_currentKey = 0;\r\n\t\t//$this->parseCsv();\r\n\t\t\r\n return $this;\r\n }",
"protected function initItemsReader()\n {\n $baseName = 'Upk_File_Element_ItemReader_';\n $className = $baseName . $this->elemName;\n\n if (!class_exists($className)) {\n // Default type\n $itemType = 'List';\n\n $totalSize = $this->elemDataSize - 4;\n\n if ($totalSize > 0) {\n $itemSize = intdiv($totalSize, $this->itemsCount);\n\n // Try to guess type\n $isFixedSize = ($totalSize % $itemSize) === 0;\n if ($isFixedSize) {\n if ($itemSize === 1) {\n $itemType = 'Byte';\n } elseif ($itemSize === 2) {\n $itemType = 'Word';\n } elseif ($itemSize === 4) {\n $itemType = 'Dword';\n }\n }\n }\n\n $className = $baseName . $itemType;\n }\n\n if ($this->debugFlag) {\n echo 'Reader: ' . $className . '<br/>';\n }\n $this->itemReader = new $className($this->upkArc, $this->debugFlag);\n }",
"public function open(): XMLReader\n {\n $reader = new XMLReader();\n $reader->open('file://'.$this->file);\n\n return $reader;\n }",
"public function __construct()\n {\n parent::__construct();\n $this->fileClassFactory = new FileFactory();\n }",
"public function set_up()\n {\n $this->filePointer = fopen($this->filePointer, 'r');\n $this->xml = new XMLWriter();\n }",
"public function initFromReader($xml)\r\n {\r\n $empty = $xml->isEmptyElement;\r\n\r\n if ($xml->hasAttributes) {\r\n $moreAttributes = $xml->moveToFirstAttribute();\r\n while ($moreAttributes) {\r\n if (!$this->setKnownAttribute($xml)) {\r\n //skip unknown attributes...\r\n }\r\n $moreAttributes = $xml->moveToNextAttribute();\r\n }\r\n }\r\n\r\n if (!$empty) {\r\n $xml->read();\r\n while ($xml->nodeType != \\XMLReader::END_ELEMENT) {\r\n if ($xml->nodeType != \\XMLReader::ELEMENT) {\r\n //no-op: skip any insignificant whitespace, comments, etc.\r\n }\r\n else if (!$this->setKnownChildElement($xml)) {\r\n $n = $xml->localName;\r\n $ns = $xml->namespaceURI;\r\n //skip the unknown element\r\n while ($xml->nodeType != \\XMLReader::END_ELEMENT && $xml->localName != $n && $xml->namespaceURI != $ns) {\r\n $xml->read();\r\n }\r\n }\r\n $xml->read(); //advance the reader.\r\n }\r\n }\r\n }",
"protected function initFileLoader() \n\t{\n\t\t$this->fileLoader = new FileLoader();\n\t}",
"public function initWithFilePath($filePath) {\n\n // TODO file validation\n if (file_exists($filePath)) {\n $this->reader = new XMLReader();\n $this->reader->open($filePath);\n } else {\n throw new FileNotFoundException('File is not found.');\n }\n }",
"protected function getNewXMLReader()\n {\n $path = $this->getFilePath();\n\n $xml = new \\XMLReader();\n if (!@$xml->open($path)) {\n throw new \\DomainException(\"Could not open file {$path} with XMLReader\");\n }\n\n return $xml;\n }",
"function __construct ($filename){\n try{\n $this->filename = $filename;\n $xml = simplexml_load_file($filename);\n $this -> keys = get_object_vars($xml); \n } catch (Exception $ex) {\n die(\"invalid XML: \". $ex);\n }\n \n }",
"public function createReader($filename) {}",
"public function __construct(string $filename)\n {\n $this->_document = new \\DOMDocument();\n $this->_document->loadXml(file_get_contents($filename));\n $this->_current = $this->_document;\n }",
"function CardinalXMLParser() {\n\t\t $this->xml_parser = xml_parser_create();\n\t\t}",
"protected function setUp() {\n $this->object = new NlReader();\n \n vfsStreamWrapper::register();\n $root = vfsStream::newDirectory('tmp');\n vfsStreamWrapper::setRoot($root);\n $this->file = vfsStream::newFile('items.csv', 0764)\n ->withContent(\"73-ou-XW46\\nApple\\n1\\na\")\n ->at($root); \n }",
"public function __construct()\n {\n $config = ConfigHolder::getConfig();\n $context = array();\n if(!empty($config->proxy))\n {\n $context['http'] = array('proxy' => filter_var($config->proxy, FILTER_SANITIZE_STRING));\n }\n $default_context = stream_context_get_default ($context); \n libxml_set_streams_context($default_context); \n }",
"public function getReaderFactory()\n {\n return $this->readerFactory;\n }",
"protected function setUp() {\n $this->object = new XmlFile(__DIR__.'/rss-techcrunch.xml');\n }",
"function __construct($xml_dir = '.') {\r\n\t\t\r\n\t\t$this->xml_dir = dir($xml_dir);\r\n\t}",
"public function init()\n {\n $templates = $this->getConfig($this->getConfigFiles());\n $view = $this->prepare($this->getView());\n return $this->createFactory($templates, $view);\n }",
"function __construct()\n\t{\n\t\t// Load the XML Helper\n\t\tee()->load->helper('xml');\n\t}",
"protected function _initConfig()\n\t{\n\t\t$this->_config = new Zend_Config_Xml($this->_configFile);\n\t\t!empty($this->_config) || trigger_error('Config file not found.', E_USER_ERROR);\n\t\treturn $this->_config;\n\t}",
"public function __construct()\n {\n parent::__construct();\n $this->load->model('FileReader', 'reader');\n }",
"protected function _initFileObjects()\n {\n $this->_irudiaFso = new \\Iron_Model_Fso($this, $this->getIrudiaSpecs());\n $this->_banerraFso = new \\Iron_Model_Fso($this, $this->getBanerraSpecs());\n\n return $this;\n }",
"function __construct($xmlFilePath) \n {\n $this->simplexmlObject = simplexml_load_file($xmlFilePath);\n $this->host = $this->parseXmlElement(\"//host\");\n $this->user = $this->parseXmlElement(\"//user\");\n $this->password = $this->parseXmlElement(\"//password\");\n $this->dbname = $this->parseXmlElement(\"//dbname\");\n $this->socket = $this->parseXmlElement(\"//unix_socket\");\n $this->charset = $this->parseXmlElement(\"//charset\");\n }",
"function _init() {\n\t\t$total = $this->node->documentElement->childCount;\n\t\t$itemCounter = 0;\n\t\t$channelCounter = 0;\n\t\t$categoryCounter = 0;\n\t\t\n\t\tfor ($i = 0; $i < $total; $i++) {\n\t\t\t$currNode =& $this->node->documentElement->childNodes[$i];\n\t\t\t$tagName = strtolower($currNode->nodeName);\n\n\t\t\tswitch ($tagName) {\n\t\t\t\tcase DOMIT_RSS_ELEMENT_ITEM:\t\t\t\t\t\n\t\t\t\t\t$this->domit_rss_items[$itemCounter] =& new xml_domit_rss_item($currNode);\n\t\t\t\t\t$itemCounter++;\n\t\t\t\t\tbreak;\n\t\t\t\tcase DOMIT_RSS_ELEMENT_CHANNEL:\n\t\t\t\t\t$this->domit_rss_channels[$channelCounter] =& new xml_domit_rss_channel($currNode);\n\t\t\t\t\t$channelCounter++;\n\t\t\t\t\tbreak;\n\t\t\t\tcase DOMIT_RSS_ELEMENT_CATEGORY:\n\t\t\t\t\t$this->domit_rss_categories[$categoryCounter] =& new xml_domit_rss_category($currNode);\n\t\t\t\t\t$categoryCounter++;\n\t\t\t\t\tbreak;\n\t\t\t\tcase DOMIT_RSS_ELEMENT_IMAGE:\n\t\t\t\t\t$this->DOMIT_RSS_indexer[$tagName] =& new xml_domit_rss_image($currNode);\n\t\t\t\t\tbreak;\n\t\t\t\tcase DOMIT_RSS_ELEMENT_CLOUD:\n\t\t\t\t\t$this->indexer[$tagName] =& new xml_domit_rss_cloud($currNode);\n\t\t\t\t\tbreak;\n\t\t\t\tcase DOMIT_RSS_ELEMENT_TEXTINPUT:\n\t\t\t\t\t$this->indexer[$tagName] =& new xml_domit_rss_textinput($currNode);\n\t\t\t\t\tbreak;\n\t\t\t\tcase DOMIT_RSS_ELEMENT_TITLE:\n case DOMIT_RSS_ELEMENT_LINK:\n case DOMIT_RSS_ELEMENT_DESCRIPTION:\n case DOMIT_RSS_ELEMENT_LANGUAGE:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_COPYRIGHT:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_MANAGINGEDITOR:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_WEBMASTER:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_PUBDATE:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_LASTBUILDDATE:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_GENERATOR:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_DOCS:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_TTL:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_RATING:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_SKIPHOURS:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_SKIPDAYS:\n\t\t\t\t $this->DOMIT_RSS_indexer[$tagName] =& new xml_domit_rss_simpleelement($currNode);\n\t\t\t\t break;\n\t\t\t\tdefault:\n\t\t\t\t $this->addIndexedElement($currNode);\n\t\t\t\t\t//$this->indexer[$tagName] =& $currNode;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ($itemCounter != 0) {\n\t\t\t$this->DOMIT_RSS_indexer[DOMIT_RSS_ARRAY_ITEMS] =& $this->domit_rss_items;\n\t\t}\n\t\t\n\t\tif ($channelCounter != 0) {\n\t\t\t$this->DOMIT_RSS_indexer[DOMIT_RSS_ARRAY_CHANNELS] =& $this->domit_rss_channels;\n\t\t}\n\t\t\n\t\tif ($categoryCounter != 0) {\n\t\t\t$this->DOMIT_RSS_indexer[DOMIT_RSS_ARRAY_CATEGORIES] =& $this->domit_rss_categories;\n\t\t}\n\t\t\n\t\t$this->handleChannelElementsEmbedded();\n\t}",
"public function __construct() {\r\n\t\t\t// Create new PHPExcel Reader instance and set to read data only\r\n\t\t\t$this->_objExcelReader = PHPExcel_IOFactory::createReader('Excel2007');\r\n\t\t\t$this->_objExcelReader->setReadDataOnly(true);\r\n\t\t}",
"protected function _initFileObjects()\n {\n\n return $this;\n }",
"protected function _initFileObjects()\n {\n\n return $this;\n }",
"protected function _initFileObjects()\n {\n\n return $this;\n }",
"protected function _initFileObjects()\n {\n\n return $this;\n }",
"private function __construct(){\r\n $this->dom = new DOMDocument();\r\n $this->xslt = new XSLTProcessor();\r\n }",
"public function __construct()\n {\n // create XML DOM object\n $this->xmldoc = new DOMDocument('1.0', 'utf-8');\n }",
"protected function __construct(Reader $reader)\n {\n $this->_reader = $reader;\n }",
"public function __construct(Reader $reader)\n {\n $this->reader = $reader;\n }",
"public function __construct(Reader $reader)\n {\n $this->reader = $reader;\n }",
"protected function getFactory()\n {\n if (! isset($this->factory)) {\n $this->factory = new \\MphpMusicBrainz\\Adapter\\Xml\\XmlFactory();\n }\n return $this->factory;\n }",
"function XML_Indexing_Reader ($filename, $options = array()) \n {\n $this->_options = array_merge ($this->_options, $options);\n $this->_phpVersion = substr(phpversion(),0,1);\n if ($this->_options['profiling']) {\n require_once 'Benchmark/Profiler.php';\n $this->_profiler =& new Benchmark_Profiler();\n //unset ($this->_profiler->auto); // workaround for bug #3369\n $this->_profiler->start();\n }\n $this->_enterSection('Constructor');\n if (is_null($this->_options['dsn'])) {\n $tmpdir = File::getTempDir();\n $this->_options['dsn'] = \"file://$tmpdir/%s.xi\";\n }\n $this->_xmlFilename = $filename;\n \n $real = realpath ($this->_xmlFilename);\n $stat = stat ($real);\n $this->_indexName = md5(\"$real:{$stat['ctime']}:{$stat['size']}\") .\n ($this->_options['gz_level'] ? '.z' : '');\n \n $this->_loadIndex ();\n\n $this->_leaveSection('Constructor');\n }",
"public function setUp()\n {\n $this->_configXML = new \\App\\WebFeatures\\ConfigsXMLReader();\n }",
"function _init() {\n\t\t$total = $this->node->childCount;\n\t\t$itemCounter = 0;\n\t\t$categoryCounter = 0;\n\t\t\n\t\tfor ($i = 0; $i < $total; $i++) {\n\t\t\t$currNode =& $this->node->childNodes[$i];\n\t\t\t$tagName = strtolower($currNode->nodeName);\n\t\t\t\n\t\t\tswitch($tagName) {\n\t\t\t\tcase DOMIT_RSS_ELEMENT_ITEM:\n\t\t\t\t\t$this->domit_rss_items[$itemCounter] =& new xml_domit_rss_item($currNode);\n\t\t\t\t\t$itemCounter++;\n\t\t\t\t\tbreak;\n\t\t\t\tcase DOMIT_RSS_ELEMENT_CATEGORY:\n\t\t\t\t\t$this->domit_rss_categories[$categoryCounter] =& new xml_domit_rss_category($currNode);\n\t\t\t\t\t$categoryCounter++;\n\t\t\t\t\tbreak;\n\t\t\t\tcase DOMIT_RSS_ELEMENT_IMAGE:\n\t\t\t\t\t$this->DOMIT_RSS_indexer[$tagName] =& new xml_domit_rss_image($currNode);\n\t\t\t\t\tbreak;\n\t\t\t\tcase DOMIT_RSS_ELEMENT_CLOUD:\n\t\t\t\t\t$this->DOMIT_RSS_indexer[$tagName] =& new xml_domit_rss_cloud($currNode);\n\t\t\t\t\tbreak;\n\t\t\t\tcase DOMIT_RSS_ELEMENT_TEXTINPUT:\n\t\t\t\t\t$this->DOMIT_RSS_indexer[$tagName] =& new xml_domit_rss_textinput($currNode);\n\t\t\t\t\tbreak;\n case DOMIT_RSS_ELEMENT_TITLE:\n case DOMIT_RSS_ELEMENT_LINK:\n case DOMIT_RSS_ELEMENT_DESCRIPTION:\n case DOMIT_RSS_ELEMENT_LANGUAGE:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_COPYRIGHT:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_MANAGINGEDITOR:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_WEBMASTER:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_PUBDATE:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_LASTBUILDDATE:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_GENERATOR:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_DOCS:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_TTL:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_RATING:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_SKIPHOURS:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_SKIPDAYS:\n\t\t\t\t $this->DOMIT_RSS_indexer[$tagName] =& new xml_domit_rss_simpleelement($currNode);\n\t\t\t\t break;\n\t\t\t\tdefault:\n\t\t\t\t $this->addIndexedElement($currNode);\n\t\t\t\t\t//$this->DOMIT_RSS_indexer[$tagName] =& $currNode;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ($itemCounter != 0) {\n\t\t\t$this->DOMIT_RSS_indexer[DOMIT_RSS_ARRAY_ITEMS] =& $this->domit_rss_items;\n\t\t}\n\t\t\n\t\tif ($categoryCounter != 0) {\n\t\t\t$this->DOMIT_RSS_indexer[DOMIT_RSS_ARRAY_CATEGORIES] =& $this->domit_rss_categories;\n\t\t}\n\t}",
"protected function _construct() {\n\t\t$this->_fileObj = $this->fileObj();\n\t}",
"public function __construct($reader) {\n $this->cfgReader = $reader;\n }",
"public function testCreateANewCallableXmlDocumentReader()\n {\n self::assertInstanceOf(\n CallableReader::class,\n $this->factory->create(function () {}),\n 'A new callable XML document reader was not returned.'\n );\n }",
"public function __construct()\n {\n// $xmlFiles = scandir(CONFIG_DIR);\n\n $file = CONFIG_DIR . 'db.xml';\n// $mask = '~/^(.*\\.(?!(xml)$))?[^.]*$/i~';\n\n// foreach ($xmlFiles as $file){\n\n $xmlObject = simplexml_load_file($file, 'SimpleXMLElement', LIBXML_NOWARNING);\n\n if (!$xmlObject) {\n throw new \\Exception('Config file not found');\n }\n\n foreach ($xmlObject as $key => $value) {\n $this->$key = (string)$value;\n }\n// }\n\n\n }",
"private function init(){\r\n\t\t$this->readDescriptionConfig();\r\n\t\t$this->readKeywordsConfig();\r\n\t\t$this->readMetaConfig();\r\n\t\t$this->readLinksConfig();\r\n\t\t$this->readScriptsConfig();\r\n\t}",
"public function __construct(SimpleAnnotationReader $reader, Filesystem $files)\n {\n $this->reader = $reader;\n $this->files = $files;\n\n $this->registerAnnotationLoader();\n }",
"function _init(){\n\t\t$total = $this->node->childCount;\n\n\t\tfor($i = 0; $i < $total; $i++) {\n\t\t\t$currNode =& $this->node->childNodes[$i];\n\t\t\t$tagName = strtolower($currNode->nodeName);\n\n\t\t switch ($tagName) {\n case DOMIT_RSS_ELEMENT_TITLE:\n case DOMIT_RSS_ELEMENT_LINK:\n case DOMIT_RSS_ELEMENT_DESCRIPTION:\n case DOMIT_RSS_ELEMENT_NAME:\n\t\t\t\t $this->DOMIT_RSS_indexer[$tagName] =& new xml_domit_rss_simpleelement($currNode);\n\t\t\t\t break;\n\t\t\t\tdefault:\n\t\t\t\t $this->addIndexedElement($currNode);\n\t\t\t\t //$this->DOMIT_RSS_indexer[$tagName] =& $currNode;\n\t\t }\n\t\t}\n\t}",
"function _init(){\n\t\t$total = $this->node->childCount;\n\n\t\tfor($i = 0; $i < $total; $i++) {\n\t\t\t$currNode =& $this->node->childNodes[$i];\n\t\t\t$tagName = strtolower($currNode->nodeName);\n\n\t\t switch ($tagName) {\n case DOMIT_RSS_ELEMENT_TITLE:\n case DOMIT_RSS_ELEMENT_LINK:\n case DOMIT_RSS_ELEMENT_DESCRIPTION:\n case DOMIT_RSS_ELEMENT_URL:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_WIDTH:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_HEIGHT:\n\t\t\t\t $this->DOMIT_RSS_indexer[$tagName] =& new xml_domit_rss_simpleelement($currNode);\n\t\t\t\t break;\n\t\t\t\tdefault:\n\t\t\t\t $this->addIndexedElement($currNode);\n\t\t\t\t //$this->DOMIT_RSS_indexer[$tagName] =& $currNode;\n\t\t }\n\t\t}\n\t}",
"public static function fromFile($filename)\n {\n $rVal = new static();\n $rVal->xml = simplexml_load_file($filename);\n\n return $rVal;\n }",
"public static function init() {\n\t\treturn Factory::get_instance( self::class );\n\t}",
"public function __construct($config, $configpath) {\n\n // first let's look for our file\n if (!isset($config['filename'])) {\n trigger_error('Gir spec parser requires a filename', E_USER_ERROR);\n }\n\n // we're going to file_exists for absolute or relative paths\n if(!file_exists($config['filename'])) {\n $check = $configpath . DIRECTORY_SEPARATOR . $config['filename'];\n if(!file_exists($check)) {\n trigger_error('Could not locate filename at '\n . $config['filename'] . ' or ' . $check , E_USER_ERROR);\n } else {\n $this->file = $check;\n }\n } else {\n $this->file = $config['filename'];\n }\n\n $reader = $this->reader = new XMLReader();\n $reader->open($this->file);\n $this->module = $config['module'];\n $this->version = $config['version'];\n $this->authors = $config['authors'];\n }",
"public function __construct($xmlPath) {\n // loads the document\n $doc = new DOMDocument();\n $doc->load($xmlPath);\n\n // is this a employees xml file?\n if ($doc->doctype->name != \"employees\" ||\n $doc->doctype->systemId != \"employees.dtd\") {\n throw new Exception(\"Incorrect document type\");\n }\n\n // is the document valid and well-formed?\n if($doc->validate()) {\n $this->domDocument = $doc;\n $this->xmlPath = $xmlPath;\n //echo 'alert(\"valid\")'; echo '</script>';\n }\n else {\n throw new Exception(\"Document did not validate\");\n }\n }",
"protected function reader()\n {\n if ($this->_reader === null) {\n $this->_reader = Reader::createFromDefaults();\n }\n\n return $this->_reader;\n }",
"public function __construct()\n {\n $this->files = new Filesystem();\n parent::__construct();\n }",
"public function __construct()\n {\n $this->setUpTableFactory();\n $this->setupElementFactory();\n $this->loadConfig();\n }",
"public function __construct() {\n\t\trequire_once 'fs.php';\n\t\t$this->a = new Advertikon\\Fs();\n\t}",
"public function __construct($filename = null)\n\t{\n\tif (!is_null($filename)) $this->read_file($filename);\n\t}",
"function __construct() {\r\n\t\t$this->ini = eZINI::instance(\"bfeztag_metadata.ini\");\r\n\t}",
"public function __construct() \n\t{\n\n\t\t$this->loadModuleXml();\n\t\t$this->getCodePool();\n\t\t$this->getMainExtensionDir();\n\t\t$this->getExtensionConfigXml();\n\t\t$this->getExtensionSystemXml();\n\n\t}",
"protected function initialise()\n\t{\n\t\t// Read the version attribute.\n\t\t$this->version = $this->stream->getAttribute('version');\n\n\t\t// We want to move forward to the first element after the <channel> element.\n\t\t$this->moveToNextElement('channel');\n\t\t$this->moveToNextElement();\n\t}",
"public function __construct()\n {\n $this->fileSystem = new Filesystem();\n }",
"protected function getFileFactory() {}",
"public function init()\n {\n $this->processInput();\n $this->outputFile();\n }",
"public function __construct($filename = null)\n {\n if (($filename != null) && (file_exists($filename))) {\n $this->read($filename);\n }\n }",
"public function __construct( \\SimpleXMLElement $xml_definition ) {\n\t\t$this->xml_definition = $xml_definition;\n\t}",
"function __construct ($base) {\n # Reset member variables\n $this->_filename = '';\n $this->_sections = array ('');\n $this->_values = array ();\n\n # Locate configuration file from disk\n $fn = $this->_locateFile ($base);\n if ($fn) {\n\n # Read file to memory\n $this->_values = $this->_readFile ($fn);\n\n # Find default sections to look for\n $this->_sections = $this->_getSections ($fn);\n\n } else {\n throw new Exception (\"File not found $base\");\n }\n }",
"public function __construct($o = null)\n {\n if (is_array($o)) {\n $this->initFromArray($o);\n }\n else if ($o instanceof \\XMLReader) {\n $success = true;\n while ($success && $o->nodeType != \\XMLReader::ELEMENT) {\n $success = $o->read();\n }\n if ($o->nodeType != \\XMLReader::ELEMENT) {\n throw new \\Exception(\"Unable to read XML: no start element found.\");\n }\n\n $this->initFromReader($o);\n }\n }",
"public function __construct() {\n XRef::setConfigFileName(\"default\");\n XRef::setConfigValue(\"xref.data-dir\", \"tmp\");\n $this->xref = new XRef();\n }",
"public function __construct($o = null)\r\n {\r\n if (is_array($o)) {\r\n $this->initFromArray($o);\r\n }\r\n else if ($o instanceof \\XMLReader) {\r\n $success = true;\r\n while ($success && $o->nodeType != \\XMLReader::ELEMENT) {\r\n $success = $o->read();\r\n }\r\n if ($o->nodeType != \\XMLReader::ELEMENT) {\r\n throw new \\Exception(\"Unable to read XML: no start element found.\");\r\n }\r\n\r\n $this->initFromReader($o);\r\n }\r\n }",
"public function __construct($o = null)\r\n {\r\n if (is_array($o)) {\r\n $this->initFromArray($o);\r\n }\r\n else if ($o instanceof \\XMLReader) {\r\n $success = true;\r\n while ($success && $o->nodeType != \\XMLReader::ELEMENT) {\r\n $success = $o->read();\r\n }\r\n if ($o->nodeType != \\XMLReader::ELEMENT) {\r\n throw new \\Exception(\"Unable to read XML: no start element found.\");\r\n }\r\n\r\n $this->initFromReader($o);\r\n }\r\n }",
"protected function _construct()\n {\n $this->_init(\\Magento\\Theme\\Model\\ResourceModel\\Theme\\File::class);\n }",
"public function __construct($o = null)\n {\n if (is_array($o)) {\n $this->initFromArray($o);\n } else {\n if ($o instanceof \\XMLReader) {\n $success = true;\n while ($success && $o->nodeType != \\XMLReader::ELEMENT) {\n $success = $o->read();\n }\n if ($o->nodeType != \\XMLReader::ELEMENT) {\n throw new \\Exception(\"Unable to read XML: no start element found.\");\n }\n\n $this->initFromReader($o);\n }\n }\n }",
"protected function getResourceFactory() {}",
"protected function getResourceFactory() {}",
"public static function create(\\SetaPDF_Core_Reader_ReaderInterface $reader) {}",
"public function __construct()\n {\n parent::__construct();\n $this->files = new Filesystem();\n }",
"public function __construct()\n {\n $this->reelsFeed = new ReelsFeed();\n }",
"public function __construct()\n {\n parent::__construct();\n $timestamp = Carbon::now()->timestamp;\n $this->filePath = storage_path(\"xml/test_{$timestamp}.xml\");\n $this->indexPath = storage_path('xml/sitemap.xml');\n $this->recordPath = storage_path('xml/record.xml');\n $this->url = 'https://www.jiankang.com/';\n }",
"function _init(){\n\t\t$total = $this->node->childCount;\n\t\t$categoryCounter = 0;\n\t\t\n\t\tfor($i = 0; $i < $total; $i++) {\n\t\t\t$currNode =& $this->node->childNodes[$i];\n\t\t\t$tagName = strtolower($currNode->nodeName);\n\t\t\n\t\t switch ($tagName) {\n\t\t case DOMIT_RSS_ELEMENT_CATEGORY:\n\t\t $this->categories[$categoryCounter] =& new xml_domit_rss_category($currNode);\n\t\t\t\t\t$categoryCounter++;\n\t\t break;\n case DOMIT_RSS_ELEMENT_ENCLOSURE:\n $this->DOMIT_RSS_indexer[$tagName] =& new xml_domit_rss_enclosure($currNode);\n\t\t break;\n case DOMIT_RSS_ELEMENT_SOURCE:\n $this->DOMIT_RSS_indexer[$tagName] =& new xml_domit_rss_source($currNode);\n\t\t break;\n case DOMIT_RSS_ELEMENT_GUID:\n $this->DOMIT_RSS_indexer[$tagName] =& new xml_domit_rss_guid($currNode);\n\t\t break;\n case DOMIT_RSS_ELEMENT_TITLE:\n case DOMIT_RSS_ELEMENT_LINK:\n case DOMIT_RSS_ELEMENT_DESCRIPTION:\n case DOMIT_RSS_ELEMENT_AUTHOR:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_COMMENTS:\n\t\t\t\tcase DOMIT_RSS_ELEMENT_PUBDATE:\n\t\t\t\t $this->DOMIT_RSS_indexer[$tagName] =& new xml_domit_rss_simpleelement($currNode);\n\t\t\t\t break;\n\t\t\t\tdefault:\n\t\t\t\t $this->addIndexedElement($currNode);\n\t\t\t\t //$this->DOMIT_RSS_indexer[$tagName] =& $currNode;\n\t\t }\n\t\t}\n\t\t\n\t\tif ($categoryCounter != 0) {\n\t\t\t$this->DOMIT_RSS_indexer[DOMIT_RSS_ARRAY_CATEGORIES] =& $this->domit_rss_categories;\n\t\t}\n\t}",
"protected function setUp() {\r\n $this->reader = new SpreadsheetReader_Text;\r\n }",
"public function load():self{\n $factory = $this;\n if (is_dir($this->path)) {\n foreach (Finder::create()->files()->name('*Factory.php')->in($this->path) as $file) {\n require $file->getRealPath();\n }\n }\n return $factory;\n }",
"public function init()\n {\n $storages = GeneralUtility::makeInstance(StorageRepository::class)->findAll();\n $this->storage = $storages[0];\n $this->registry = GeneralUtility::makeInstance(Registry::class);\n $this->recordOffset = $this->registry->get($this->registryNamespace, 'recordOffset', []);\n }",
"function __construct()\n {\n $xml = new XmlParser;\n $xml->Parse(PARLANCE_PATH . \"/config/app-pages.xml\");\n $pages = $xml->GetNodeByPath(\"APP/PAGES\");\n\n $this->registry = array();\n if(isset($pages) && !empty($pages['child'])) :\n foreach($pages['child'] as $page) :\n $this->registry[($page['attrs']['ID'])] = $page;\n endforeach;\n endif;\n }",
"public function getParserFactory() {}",
"function __construct(){\n\t\t//$this->_array = $this->_file->_array;\n $this->_file = new xml_filehandle(\"./include/Settings/\",\"settings.xml\");\n foreach($this->_file->_array as $arrVal)\n {\n $this->_array[$arrVal['id']] = $arrVal;\n }\n\t}",
"protected function _construct()\n {\n $this->_init('boleto_returns_file', 'returns_file_id');\n }",
"function __construct ($filename = NULL) {\n if (isset ($filename))\n $this->load (file_get_contents ($filename));\n }",
"protected function init() {}",
"protected function init() {}",
"protected function init() {}",
"protected function init() {}",
"protected function init() {}",
"protected function init() {}",
"protected function init() {}",
"protected function init() {}",
"protected function init() {}",
"protected function init() {}",
"protected function init() {}",
"protected function init() {}"
]
| [
"0.7222033",
"0.6516311",
"0.6499612",
"0.64954746",
"0.64406526",
"0.6320304",
"0.6125916",
"0.61081964",
"0.60564506",
"0.60297924",
"0.6028821",
"0.6000578",
"0.5999039",
"0.5997718",
"0.5958398",
"0.5949089",
"0.5944772",
"0.5940855",
"0.593114",
"0.5930439",
"0.5892622",
"0.58463395",
"0.5834107",
"0.5816556",
"0.5803697",
"0.57972986",
"0.578394",
"0.5762525",
"0.57531875",
"0.57219505",
"0.57219505",
"0.57219505",
"0.57219505",
"0.57134074",
"0.5708355",
"0.5691706",
"0.5674045",
"0.5674045",
"0.5641657",
"0.56377643",
"0.5634987",
"0.56337595",
"0.56230193",
"0.5614922",
"0.56026727",
"0.55926925",
"0.5571707",
"0.55667794",
"0.5547439",
"0.55446696",
"0.55395246",
"0.5537825",
"0.55120873",
"0.5505835",
"0.55001575",
"0.5457826",
"0.5455207",
"0.5452704",
"0.5447827",
"0.5438672",
"0.5434471",
"0.54254305",
"0.5425195",
"0.5420854",
"0.5406898",
"0.5406876",
"0.5406702",
"0.5395197",
"0.5381761",
"0.53714484",
"0.53711957",
"0.53711957",
"0.5361742",
"0.53613186",
"0.53380966",
"0.53380966",
"0.53344166",
"0.53331184",
"0.5327527",
"0.5320692",
"0.53122616",
"0.52766275",
"0.5264613",
"0.5262955",
"0.5262002",
"0.52619267",
"0.5260082",
"0.5250505",
"0.52479386",
"0.5246271",
"0.5246271",
"0.52457744",
"0.52457744",
"0.52457744",
"0.52457744",
"0.5245571",
"0.5245571",
"0.5245571",
"0.5245571",
"0.5245571",
"0.5245571"
]
| 0.0 | -1 |
Returns the node builder factory. | public function getNodeBuilderFactory()
{
return $this->nodeBuilderFactory;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getNodeFactory();",
"public function getBuilderFactory()\n {\n return $this->builderFactory;\n }",
"public function getBuilder() {\n if (!isset($this->builder)) {\n if (empty($this->configuration['builder'])) {\n $this->builder = $this->builderManager->createInstance('standard', []);\n }\n else {\n $this->builder = $this->builderManager->createInstance($this->configuration['builder'], []);\n }\n }\n return $this->builder;\n }",
"public function getFactory()\n {\n return $this->factory;\n }",
"public function getFactory()\n {\n return $this->factory;\n }",
"public function getFactory()\n {\n return $this->factory;\n }",
"public function getFactory()\n {\n return $this->factory;\n }",
"public function getFactory()\n {\n return $this->factory;\n }",
"public function getFactory()\n {\n return $this->factory;\n }",
"public function getFactory()\n {\n return $this->factory;\n }",
"public function getFactory()\n {\n return $this->factory;\n }",
"public function getFactory()\n {\n return $this->_factory;\n }",
"public function getFactory()\n\t{\n\t\treturn empty($this->factory) ? 'new '.$this->getClass() : $this->factory;\n\t}",
"final public function getFactory() {\n\t\treturn '';\n\t}",
"protected function getFactory()\n {\n if (! isset($this->factory)) {\n $this->factory = new \\MphpMusicBrainz\\Adapter\\Xml\\XmlFactory();\n }\n return $this->factory;\n }",
"public function getFactory() {}",
"public static function getFactory()\r\n\t{\r\n\t\treturn self::$factory;\r\n\t}",
"public function getFactory()\n {\n return new Factory();\n }",
"public static function getFactory()\n\t{\n\t\tif ( is_null( static::$g_cFactory ) )\n\t\t{\n\t\t\tstatic::$g_cFactory = new GatewayFactory;\n\t\t}\n\t\t\n\t\treturn static::$g_cFactory;\n\t}",
"public function getFactory(): Factory;",
"public function getBuilder();",
"public function builder()\n {\n return $this->builder;\n }",
"function hook_get_builder_factory($hook, array $args = array()) {\n require_once 'src/classes/factories/EntityToolboxDependentHookBuilderFactory.inc';\n $args += array('hook' => $hook);\n $hook_info = entity_toolbox_hook_get_info($hook);\n $factoryClass = $hook_info['factory class'];\n $factory = new $factoryClass($args);\n\n return $factory;\n}",
"public function getBuilder()\n {\n $class = '\\ReneDeKat\\Quickbooks\\Builders\\\\'.$this->getClassName();\n\n return new $class($this);\n }",
"public function builder()\n {\n return null;\n }",
"public function getFormBuilder()\n {\n return $this['form.factory'];\n }",
"protected function builders() {\n return [\n DrupalCoreRecommendedBuilder::class,\n DrupalDevDependenciesBuilder::class,\n DrupalPinnedDevDependenciesBuilder::class,\n ];\n }",
"public static function builder(): ResolveNodeRequestBuilder\n\t{\n\t\treturn new ResolveNodeRequestBuilder();\n\t}",
"protected function getBuilder()\n {\n return $this->builder;\n }",
"public static function builder() {\n return new self();\n }",
"public function describe()\n {\n # create new node builder\n $nodeBuilder = new NodeBuilder('weightSelectorBuilder',$this->eventDispatcher,$this->repo,$this->utilities,$this->generator,$this->locale,$this->database,$this->templateLoader);\n \n # bind this definition as the parent of nodebuilder\n $nodeBuilder->setParent($this);\n \n # return node builder to continue chain\n return $nodeBuilder;\n }",
"public function getBuilder()\n {\n return $this->builder;\n }",
"public function getBuilder()\n {\n return $this->builder;\n }",
"public function getBuilder()\n {\n return $this->_builder;\n }",
"public static function factory()\r\n {\r\n return parent::factory(__CLASS__);\r\n }",
"public function getConfigTreeBuilder()\n {\n if (Kernel::VERSION_ID >= 40300) {\n $treeBuilder = new TreeBuilder('sfcod_email_engine');\n $rootNode = $treeBuilder->getRootNode();\n } else {\n $treeBuilder = new TreeBuilder();\n $rootNode = $treeBuilder->root('sfcod_email_engine');\n }\n\n $this->addMainSender($rootNode);\n $this->addSendersSection($rootNode);\n $this->addTemplatesSection($rootNode);\n\n return $treeBuilder;\n }",
"public function get_node_finder(): \\PhpParser\\NodeFinder {\n if (empty($this->node_finder)) {\n // Create the node node_finder\n $this->node_finder = new \\PhpParser\\NodeFinder();\n }\n\n return $this->node_finder;\n }",
"public function getRepositoryFactory()\n {\n return $this->repositoryFactory;\n }",
"public function getQomFactory() {}",
"public function getSchemaBuilder()\n {\n if (is_null($this->schemaGrammar)) { $this->useDefaultSchemaGrammar(); }\n\n //return new Schema\\Builder($this);\n return new FBBuilder($this);\n }",
"public function getConfigTreeBuilder(): TreeBuilder\n {\n $treeBuilder = new TreeBuilder('knp_gaufrette');\n if (method_exists($treeBuilder, 'getRootNode')) {\n $rootNode = $treeBuilder->getRootNode();\n } else {\n // BC for symfony/config < 4.2\n $rootNode = $treeBuilder->root('knp_gaufrette');\n }\n\n $rootNode\n ->ignoreExtraKeys()\n ->fixXmlConfig('factory', 'factories')\n ->children()\n ->arrayNode('factories')\n ->prototype('scalar')->end()\n ->end()\n ->end()\n ->end()\n ;\n\n return $treeBuilder;\n }",
"public function getFormFactory()\n {\n $resolvedFormTypeFactory = new ResolvedFormTypeFactory();\n\n $registery = new FormRegistry(array(\n new CoreExtension(),\n new FilterExtension(),\n ), $resolvedFormTypeFactory);\n\n $formFactory = new FormFactory($registery, $resolvedFormTypeFactory);\n\n return $formFactory;\n }",
"protected static function newFactory()\n {\n return TypeFactory::new();\n }",
"public static function builder() {\n\t\treturn new Builder();\n\t}",
"public function getQueryFactory()\n {\n return $this->qbFactory;\n }",
"protected static function configFactory() {\n return \\Drupal::configFactory();\n }",
"public static function newFactory()\n {\n return PhoneFactory::new();\n }",
"public function builder()\n {\n return new Builder($this);\n }",
"public function builder()\n {\n if ($this->parent) {\n return $this->parent->builder();\n }\n\n if (is_null($this->builder)) {\n $this->builder = new Builder($this);\n }\n\n return $this->builder;\n }",
"protected static function newFactory(): Factory\n {\n return HotelFactory::new();\n }",
"public function builder()\n\t{\n\t\t$builder = new Builder($this->request);\n\t\treturn $builder;\n\t}",
"public function getConfigTreeBuilder()\n {\n $treeBuilder = new TreeBuilder();\n $rootNode = $treeBuilder->root('system_socket');\n\n $rootNode\n ->children()\n ->scalarNode('queue_name')\n ->cannotBeEmpty()\n ->defaultValue('erp_to_socket_appeal')\n ->end()\n ->end()\n ;\n return $treeBuilder;\n }",
"public static function newFactory()\n {\n return AdFactory::new();\n }",
"static public function builder(): Builder\n {\n return new Builder;\n }",
"public function getConfigTreeBuilder()\n {\n return new TreeBuilder();\n }",
"public static function newFactory()\n {\n return ReceiptFactory::new();\n }",
"public static function factory()\n {\n return new self;\n }",
"public function loadFactory()\n {\n $this->di = new Di\\FactoryDefault;\n\n return $this;\n }",
"public function getFormBuilder()\n {\n $this->formOptions['data_class'] = $this->getClass();\n\n $this->formOptions['allow_extra_fields'] = true;\n $this->formOptions['validation_groups'] = false;\n $this->formOptions['error_bubbling'] = false;\n\n $formBuilder = $this->getFormContractor()->getFormBuilder(\n $this->getUniqid(),\n $this->formOptions\n );\n\n $this->defineFormBuilder($formBuilder);\n\n return $formBuilder;\n }",
"function hook_get_builder($hook, $arg) {\n return hook_get_builder_factory($hook, $arg)->getInstance();\n}",
"function getFactory(){\n\treturn $_SESSION[ SESSION_NAME_SPACE ][ 'factory' ];\n}",
"public static function builder();",
"public function createBuilder();",
"public function getRequestBuilder(): RequestBuilderInterface\n {\n return new RequestBuilder();\n }",
"public function getRequestBuilder(): RequestBuilderInterface\n {\n return new RequestBuilder();\n }",
"public function getRequestBuilder(): RequestBuilderInterface\n {\n return new RequestBuilder();\n }",
"public static function newFactory()\n {\n return TaxCollectionFactory::new();\n }",
"public function getActiveFactory()\n {\n return $this->getFactory($this->getActiveFactoryName());\n }",
"public function getConnectFactory()\n {\n $this->registerMyLibrary();\n\n if (!$this->connectFactory) {\n $this->connectFactory = new ConnectFactory($this->getVersion());\n }\n\n return $this->connectFactory;\n }",
"protected function getFactoryGenerator(): FactoryGeneratorInterface {\n\t\tif (!isset($this->factoryGenerator)) $this->factoryGenerator =\n\t\t\tnew static::$factoryGeneratorClass($this->factories, $this->cacheDirectoryPath);\n\t\treturn $this->factoryGenerator;\n\t}",
"protected static function newFactory(): Factory\n {\n return OrderPaymentFactory::new();\n }",
"protected static function newFactory()\n {\n return StateFactory::new();\n }",
"protected function getBuilderClass()\n {\n return 'tx_t3socials_network_facebook_MessageBuilder';\n }",
"public static function newFactory()\n {\n return OrderFactory::new();\n }",
"protected static function newFactory()\n {\n //\n }",
"public function getFactoryNamespace();",
"private function getRequestFactory()\n {\n if ($requestFactory = $this->app->config->get('swap.request_factory')) {\n return $this->app[$requestFactory];\n }\n\n return null;\n }",
"protected function createRendererFactory() {\n\t\t$factoryClassName = $this->config('form-renderer-factory.class-name');\n\t\t$factoryConstructorArguments = $this->config('form-renderer-factory.constructor-arguments');\n\t\treturn TypeUtilities::buildTypeCheckedObject(\n\t\t\t$factoryClassName,\n\t\t\t'form renderer factory',\n\t\t\tnull,\n\t\t\tarray( '\\\\Sitegear\\\\Form\\\\Renderer\\\\Factory\\\\RendererFactoryInterface' ),\n\t\t\t$factoryConstructorArguments\n\t\t);\n\t}",
"protected function getOrderFactory()\n {\n return $this->_orderFactory;\n }",
"public function getHttpFactory() {\n return $this->httpFactory;\n }",
"public function getReaderFactory()\n {\n return $this->readerFactory;\n }",
"protected function getSettingsFormFactory()\n {\n return $this->get('dag.settings.form_factory');\n }",
"final protected function getMigrationFactory()\n {\n return $this->factory;\n }",
"protected static function newFactory()\n {\n return ExampleFactory::new();\n }",
"protected static function newFactory(): Factory\n {\n return ProductDownloadableLinkTranslationFactory::new();\n }",
"protected function builderManager() {\n return \\Drupal::service('plugin.manager.entity_template.builder');\n }",
"public function free(): Factory\n {\n return $this->state(function (array $attributes) {\n return [\n 'free' => true,\n ];\n });\n }",
"public function getSchemaBuilder() : BuilderInterface;",
"public function getConfigTreeBuilder()\n {\n $treeBuilder = new TreeBuilder();\n $rootNode = $treeBuilder->root('coffee_bike_dachser');\n\n $rootNode\n ->children()\n ->scalarNode('dachser_branch_number')->end()\n ->scalarNode('dachser_gln_number')->end()\n ->scalarNode('dachser_branch_number_full')->end()\n ->scalarNode('dachser_sftp_host')->end()\n ->scalarNode('dachser_sftp_port')->end()\n ->scalarNode('dachser_sftp_username')->end()\n ->scalarNode('dachser_sftp_password')->end()\n ->scalarNode('dachser_sftp_remote_in_path')->end()\n ->scalarNode('dachser_sftp_remote_out_path')->end()\n ->scalarNode('dachser_sftp_remote_in_save_path')->end()\n ->scalarNode('dachser_sftp_local_in_path')->end()\n ->scalarNode('dachser_sftp_local_out_path')->end()\n ->scalarNode('dachser_sftp_local_in_save_path')->end()\n ->scalarNode('dachser_sftp_local_in_tmp')->end()\n ->end()\n ;\n\n return $treeBuilder;\n }",
"public static function factory() {\n\t\tstatic $instance;\n\n\t\tif ( ! $instance ) {\n\t\t\t$instance = new self();\n\t\t\t$instance->setup();\n\t\t}\n\n\t\treturn $instance;\n\t}",
"static function factory()\n {\n if (self::$_instance == NULL) {\n self::$_instance = new self();\n }\n return self::$_instance;\n }",
"public function getConfigTreeBuilder()\n {\n $treeBuilder = new TreeBuilder();\n $rootNode = $treeBuilder->root('graphql');\n\n //@formatter:off\n $rootNode\n ->children()\n ->arrayNode('schemas')\n ->requiresAtLeastOneElement()\n ->useAttributeAsKey('name')\n ->arrayPrototype()\n ->children()\n ->scalarNode('sdl')\n ->info('Path to the SDL graphql definition')\n ->end()\n ->scalarNode('route')\n ->defaultValue(self::DEFAULT_ROUTE)\n ->treatNullLike(self::DEFAULT_ROUTE)\n ->end()\n ->arrayNode('resolvers')\n ->useAttributeAsKey('type')\n ->isRequired()\n ->requiresAtLeastOneElement()\n ->beforeNormalization()\n ->always(function($resolvers){\n return $this->normalizeResolvers($resolvers);\n })\n ->end()\n ->prototype('scalar')->end()\n ->validate()\n ->always(function($resolvers){\n $this->validateResolvers($resolvers);\n return $resolvers;\n })\n ->end()\n ->end()\n ->end()\n ->end()\n ->end()\n ;\n //@formatter:on\n\n return $treeBuilder;\n }",
"public function getConfigTreeBuilder()\n {\n $treeBuilder = new TreeBuilder();\n $rootNode = $treeBuilder->root('deployer');\n\n $this->addServerSection($rootNode);\n $this->addFarmSection($rootNode);\n $this->addProjectSection($rootNode);\n\n return $treeBuilder;\n }",
"function factoryDefault();",
"public static function build() {\n return new Builder();\n }",
"protected function createGeneratorFactory()\n\t{\n\t\treturn \\Yii::createObject($this->generatorFactory);\n\t}",
"public function getFactoryPostfix();",
"public function db_builder() {\n\t\treturn $this->_db_builder;\n\t}",
"public function make($factory);",
"public static function newFactory()\n {\n return ReturnOrderLineFactory::new();\n }"
]
| [
"0.71799403",
"0.70161784",
"0.67604977",
"0.66181964",
"0.66181964",
"0.66181964",
"0.66181964",
"0.66181964",
"0.66181964",
"0.66181964",
"0.66181964",
"0.653875",
"0.6530652",
"0.6519065",
"0.65141904",
"0.6456354",
"0.6444811",
"0.64219385",
"0.6410401",
"0.629702",
"0.6128815",
"0.6111421",
"0.59864664",
"0.59821975",
"0.59779185",
"0.59727466",
"0.5951322",
"0.5905507",
"0.5896901",
"0.5846893",
"0.5832509",
"0.5821609",
"0.5821609",
"0.5818467",
"0.5791563",
"0.5775795",
"0.5742816",
"0.57296336",
"0.5711965",
"0.5710872",
"0.5704747",
"0.56974334",
"0.5672461",
"0.5671794",
"0.56598186",
"0.56552935",
"0.56419533",
"0.56370044",
"0.5633697",
"0.56231296",
"0.5619855",
"0.5610345",
"0.56046236",
"0.5603209",
"0.5593861",
"0.5574724",
"0.55740374",
"0.55601984",
"0.5558275",
"0.55423003",
"0.5525654",
"0.5519173",
"0.55182195",
"0.5515974",
"0.5515974",
"0.5515974",
"0.55071145",
"0.5494911",
"0.54845357",
"0.5482607",
"0.54765236",
"0.54643166",
"0.54619265",
"0.54609174",
"0.5460082",
"0.54504806",
"0.5443769",
"0.54416424",
"0.54386044",
"0.5409813",
"0.540855",
"0.5398407",
"0.5381301",
"0.5380712",
"0.5377328",
"0.5376075",
"0.5371035",
"0.5369924",
"0.5367622",
"0.5346664",
"0.53424186",
"0.5341743",
"0.5340294",
"0.53387684",
"0.53323364",
"0.53231496",
"0.53118",
"0.5304489",
"0.5301202",
"0.5296888"
]
| 0.6344027 | 19 |
Returns the node path builder factory. | public function getPathBuilderFactory()
{
return $this->pathBuilderFactory;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getNodeFactory();",
"public function getBuilderFactory()\n {\n return $this->builderFactory;\n }",
"final public function getFactory() {\n\t\treturn '';\n\t}",
"public function getBuilder() {\n if (!isset($this->builder)) {\n if (empty($this->configuration['builder'])) {\n $this->builder = $this->builderManager->createInstance('standard', []);\n }\n else {\n $this->builder = $this->builderManager->createInstance($this->configuration['builder'], []);\n }\n }\n return $this->builder;\n }",
"public function getFactory() {}",
"public function getNodeBuilderFactory()\n {\n return $this->nodeBuilderFactory;\n }",
"public function getFactory()\n\t{\n\t\treturn empty($this->factory) ? 'new '.$this->getClass() : $this->factory;\n\t}",
"public static function builder(): ResolveNodeRequestBuilder\n\t{\n\t\treturn new ResolveNodeRequestBuilder();\n\t}",
"public function getFactory()\n {\n return $this->factory;\n }",
"public function getFactory()\n {\n return $this->factory;\n }",
"public function getFactory()\n {\n return $this->factory;\n }",
"public function getFactory()\n {\n return $this->factory;\n }",
"public function getFactory()\n {\n return $this->factory;\n }",
"public function getFactory()\n {\n return $this->factory;\n }",
"public function getFactory()\n {\n return $this->factory;\n }",
"public function getFactory()\n {\n return $this->factory;\n }",
"public function get_node_finder(): \\PhpParser\\NodeFinder {\n if (empty($this->node_finder)) {\n // Create the node node_finder\n $this->node_finder = new \\PhpParser\\NodeFinder();\n }\n\n return $this->node_finder;\n }",
"public function getFactory(): Factory;",
"public function getFactory()\n {\n return $this->_factory;\n }",
"public function getFactory()\n {\n return new Factory();\n }",
"protected function getFactory()\n {\n if (! isset($this->factory)) {\n $this->factory = new \\MphpMusicBrainz\\Adapter\\Xml\\XmlFactory();\n }\n return $this->factory;\n }",
"public static function getFactory()\r\n\t{\r\n\t\treturn self::$factory;\r\n\t}",
"public function getPathfinder(): PathfinderInterface\n {\n return $this->pathfinder;\n }",
"public static function getFactory()\n\t{\n\t\tif ( is_null( static::$g_cFactory ) )\n\t\t{\n\t\t\tstatic::$g_cFactory = new GatewayFactory;\n\t\t}\n\t\t\n\t\treturn static::$g_cFactory;\n\t}",
"public function getFactoryNamespace();",
"public function getBuilder();",
"public static function newFactory()\n {\n return ReturnOrderLineFactory::new();\n }",
"protected function getKnpMenu_FactoryService()\n {\n $this->services['knp_menu.factory'] = $instance = new \\Knp\\Menu\\MenuFactory();\n\n $instance->addExtension(new \\Knp\\Menu\\Integration\\Symfony\\RoutingExtension($this->get('router')), 0);\n\n return $instance;\n }",
"public function builder()\n {\n return null;\n }",
"public function builder()\n {\n return $this->builder;\n }",
"public function getConfigTreeBuilder()\n {\n return new TreeBuilder();\n }",
"public function getConfigTreeBuilder()\n {\n if (Kernel::VERSION_ID >= 40300) {\n $treeBuilder = new TreeBuilder('sfcod_email_engine');\n $rootNode = $treeBuilder->getRootNode();\n } else {\n $treeBuilder = new TreeBuilder();\n $rootNode = $treeBuilder->root('sfcod_email_engine');\n }\n\n $this->addMainSender($rootNode);\n $this->addSendersSection($rootNode);\n $this->addTemplatesSection($rootNode);\n\n return $treeBuilder;\n }",
"public static function factory()\r\n {\r\n return parent::factory(__CLASS__);\r\n }",
"public static function builder() {\n return new self();\n }",
"public function getFactoryPostfix();",
"public function graphDevice(): GraphDeviceRequestBuilder {\n return new GraphDeviceRequestBuilder($this->pathParameters, $this->requestAdapter);\n }",
"protected function builders() {\n return [\n DrupalCoreRecommendedBuilder::class,\n DrupalDevDependenciesBuilder::class,\n DrupalPinnedDevDependenciesBuilder::class,\n ];\n }",
"function hook_get_builder_factory($hook, array $args = array()) {\n require_once 'src/classes/factories/EntityToolboxDependentHookBuilderFactory.inc';\n $args += array('hook' => $hook);\n $hook_info = entity_toolbox_hook_get_info($hook);\n $factoryClass = $hook_info['factory class'];\n $factory = new $factoryClass($args);\n\n return $factory;\n}",
"public function getUriFactory(): UriFactory;",
"public function getFormBuilder()\n {\n return $this['form.factory'];\n }",
"protected static function configFactory() {\n return \\Drupal::configFactory();\n }",
"public function getConfigTreeBuilder()\n {\n $treeBuilder = new TreeBuilder();\n $rootNode = $treeBuilder->root('system_socket');\n\n $rootNode\n ->children()\n ->scalarNode('queue_name')\n ->cannotBeEmpty()\n ->defaultValue('erp_to_socket_appeal')\n ->end()\n ->end()\n ;\n return $treeBuilder;\n }",
"public static function factory()\n {\n return new self;\n }",
"protected static function newFactory()\n {\n return new LocationFactory();\n }",
"protected static function newFactory(): Factory\n {\n return ProductDownloadableLinkTranslationFactory::new();\n }",
"public function getQomFactory() {}",
"public function getConfigTreeBuilder(): TreeBuilder\n {\n $treeBuilder = new TreeBuilder('knp_gaufrette');\n if (method_exists($treeBuilder, 'getRootNode')) {\n $rootNode = $treeBuilder->getRootNode();\n } else {\n // BC for symfony/config < 4.2\n $rootNode = $treeBuilder->root('knp_gaufrette');\n }\n\n $rootNode\n ->ignoreExtraKeys()\n ->fixXmlConfig('factory', 'factories')\n ->children()\n ->arrayNode('factories')\n ->prototype('scalar')->end()\n ->end()\n ->end()\n ->end()\n ;\n\n return $treeBuilder;\n }",
"public function getConfigTreeBuilder()\n {\n $treeBuilder = new TreeBuilder();\n $rootNode = $treeBuilder->root('coffee_bike_dachser');\n\n $rootNode\n ->children()\n ->scalarNode('dachser_branch_number')->end()\n ->scalarNode('dachser_gln_number')->end()\n ->scalarNode('dachser_branch_number_full')->end()\n ->scalarNode('dachser_sftp_host')->end()\n ->scalarNode('dachser_sftp_port')->end()\n ->scalarNode('dachser_sftp_username')->end()\n ->scalarNode('dachser_sftp_password')->end()\n ->scalarNode('dachser_sftp_remote_in_path')->end()\n ->scalarNode('dachser_sftp_remote_out_path')->end()\n ->scalarNode('dachser_sftp_remote_in_save_path')->end()\n ->scalarNode('dachser_sftp_local_in_path')->end()\n ->scalarNode('dachser_sftp_local_out_path')->end()\n ->scalarNode('dachser_sftp_local_in_save_path')->end()\n ->scalarNode('dachser_sftp_local_in_tmp')->end()\n ->end()\n ;\n\n return $treeBuilder;\n }",
"public function getBuilder()\n {\n $class = '\\ReneDeKat\\Quickbooks\\Builders\\\\'.$this->getClassName();\n\n return new $class($this);\n }",
"protected function getPathHelperService()\n {\n return $this->services['path_helper'] = new \\phpbb\\path_helper(${($_ = isset($this->services['symfony_request']) ? $this->services['symfony_request'] : $this->getSymfonyRequestService()) && false ?: '_'}, ${($_ = isset($this->services['filesystem']) ? $this->services['filesystem'] : ($this->services['filesystem'] = new \\phpbb\\filesystem\\filesystem())) && false ?: '_'}, ${($_ = isset($this->services['request']) ? $this->services['request'] : ($this->services['request'] = new \\phpbb\\request\\request(NULL, true))) && false ?: '_'}, './../', 'php', 'adm/');\n }",
"public function getFormFactory()\n {\n $resolvedFormTypeFactory = new ResolvedFormTypeFactory();\n\n $registery = new FormRegistry(array(\n new CoreExtension(),\n new FilterExtension(),\n ), $resolvedFormTypeFactory);\n\n $formFactory = new FormFactory($registery, $resolvedFormTypeFactory);\n\n return $formFactory;\n }",
"public function describe()\n {\n # create new node builder\n $nodeBuilder = new NodeBuilder('weightSelectorBuilder',$this->eventDispatcher,$this->repo,$this->utilities,$this->generator,$this->locale,$this->database,$this->templateLoader);\n \n # bind this definition as the parent of nodebuilder\n $nodeBuilder->setParent($this);\n \n # return node builder to continue chain\n return $nodeBuilder;\n }",
"public function getConfigTreeBuilder()\r\n {\r\n $treeBuilder = new TreeBuilder();\r\n $rootNode = $treeBuilder->root('kitano_payment_sips');\r\n\r\n $this->addConfigSection($rootNode);\r\n $this->addBinSection($rootNode);\r\n\r\n return $treeBuilder;\r\n }",
"protected function createFinder()\n {\n return Injector::inst()->create('GreenFinder');\n }",
"public static function newFactory()\n {\n return TaxCollectionFactory::new();\n }",
"public static function builder();",
"public function getConfigTreeBuilder()\n {\n $treeBuilder = new TreeBuilder();\n $rootNode = $treeBuilder->root('graphql');\n\n //@formatter:off\n $rootNode\n ->children()\n ->arrayNode('schemas')\n ->requiresAtLeastOneElement()\n ->useAttributeAsKey('name')\n ->arrayPrototype()\n ->children()\n ->scalarNode('sdl')\n ->info('Path to the SDL graphql definition')\n ->end()\n ->scalarNode('route')\n ->defaultValue(self::DEFAULT_ROUTE)\n ->treatNullLike(self::DEFAULT_ROUTE)\n ->end()\n ->arrayNode('resolvers')\n ->useAttributeAsKey('type')\n ->isRequired()\n ->requiresAtLeastOneElement()\n ->beforeNormalization()\n ->always(function($resolvers){\n return $this->normalizeResolvers($resolvers);\n })\n ->end()\n ->prototype('scalar')->end()\n ->validate()\n ->always(function($resolvers){\n $this->validateResolvers($resolvers);\n return $resolvers;\n })\n ->end()\n ->end()\n ->end()\n ->end()\n ->end()\n ;\n //@formatter:on\n\n return $treeBuilder;\n }",
"protected static function newFactory(): Factory\n {\n return HotelFactory::new();\n }",
"public function getConfigTreeBuilder()\n {\n $treeBuilder = new TreeBuilder('rompetomp_inertia');\n $treeBuilder->getRootNode()\n ->children()\n ->scalarNode('root_view')->defaultValue('app.html.twig')->end()\n ->arrayNode('ssr')\n ->addDefaultsIfNotSet()\n ->children()\n ->booleanNode('enabled')->defaultFalse()->end()\n ->scalarNode('url')->defaultValue('')->end()\n ->end()\n ->end()\n ->end();\n\n return $treeBuilder;\n }",
"protected function getBuilder()\n {\n return $this->builder;\n }",
"public function builder()\n {\n return new Builder($this);\n }",
"public function getConfigTreeBuilder()\n {\n }",
"public static function builder() {\n\t\treturn new Builder();\n\t}",
"public function getUriBuilder()\n {\n return $this->uriBuilder;\n }",
"public static function newFactory()\n {\n return OrderFactory::new();\n }",
"protected static function newFactory(): Factory\n {\n return OrderPaymentFactory::new();\n }",
"public function builder()\n\t{\n\t\t$builder = new Builder($this->request);\n\t\treturn $builder;\n\t}",
"public function node ()\n {\n return new Node($this->url, $this->port);\n }",
"public function getConfigTreeBuilder()\n {\n // to stick with strict snake_case to make sure it works.\n if (method_exists(TreeBuilder::class, 'getRootNode')) {\n $treeBuilder = new TreeBuilder('meteo_concept_h_captcha');\n $rootNode = $treeBuilder->getRootNode();\n } else {\n $treeBuilder = new TreeBuilder();\n $rootNode = $treeBuilder->root('meteo_concept_h_captcha');\n }\n\n $rootNode\n ->children()\n ->arrayNode('hcaptcha')\n ->info(\"The configuration value of your hCaptcha account (visit https://dashboard.hcaptcha.com to find them).\")\n ->children()\n ->scalarNode('site_key')\n ->info(\"The site key for this website.\")\n ->defaultValue(null)\n ->end()\n ->scalarNode('secret')\n ->info(\"The secret used to authenticate requests to hCaptcha verification endpoint.\")\n ->isRequired()\n ->cannotBeEmpty()\n ->end()\n ->end()\n ->end()\n ->end()\n ;\n\n return $treeBuilder;\n }",
"public function federationConfiguration(): FederationConfigurationRequestBuilder {\n return new FederationConfigurationRequestBuilder($this->pathParameters, $this->requestAdapter);\n }",
"public static function newFactory()\n {\n return PhoneFactory::new();\n }",
"public function getConfigTreeBuilder()\n {\n $treeBuilder = new TreeBuilder();\n $rootNode = $treeBuilder->root('deployer');\n\n $this->addServerSection($rootNode);\n $this->addFarmSection($rootNode);\n $this->addProjectSection($rootNode);\n\n return $treeBuilder;\n }",
"function getFactory(){\n\treturn $_SESSION[ SESSION_NAME_SPACE ][ 'factory' ];\n}",
"protected function builderManager() {\n return \\Drupal::service('plugin.manager.entity_template.builder');\n }",
"protected function getOrderFactory()\n {\n return $this->_orderFactory;\n }",
"public function getConfigTreeBuilder(): TreeBuilder\n {\n $treeBuilder = new TreeBuilder();\n $rootNode = $treeBuilder->root('exsyst_dynamic_class_generation');\n\n $rootNode\n ->children()\n ->scalarNode('cache_directory')->defaultValue('%kernel.cache_dir%/exsyst-clsgen')->end()\n ->scalarNode('temporary_directory')->defaultValue('%kernel.cache_dir%/exsyst-clsgen')->end()\n ->end()\n ;\n\n return $treeBuilder;\n }",
"public function getBuilder()\n {\n return $this->_builder;\n }",
"public function getRepositoryFactory()\n {\n return $this->repositoryFactory;\n }",
"public function getBuilder()\n {\n return $this->builder;\n }",
"public function getBuilder()\n {\n return $this->builder;\n }",
"public function builder()\n {\n if ($this->parent) {\n return $this->parent->builder();\n }\n\n if (is_null($this->builder)) {\n $this->builder = new Builder($this);\n }\n\n return $this->builder;\n }",
"protected function getSettingsFormFactory()\n {\n return $this->get('dag.settings.form_factory');\n }",
"public function getSchemaBuilder()\n {\n if (is_null($this->schemaGrammar)) { $this->useDefaultSchemaGrammar(); }\n\n //return new Schema\\Builder($this);\n return new FBBuilder($this);\n }",
"static public function builder(): Builder\n {\n return new Builder;\n }",
"protected function getBuilderClass(): string\n {\n return FromDegrees::class;\n }",
"private static function engine(): Factory\n {\n if (!(self::$engine instanceof Factory)) {\n $loader = new FileLoader(new Filesystem(), self::$translationFolderPath);\n $translator = new Translator($loader, self::$lang);\n self::$engine = new Factory($translator, new Container());\n }\n\n return self::$engine;\n }",
"public function getConfigTreeBuilder()\n {\n $treeBuilder = new TreeBuilder('chameleon_system_core');\n $root = $treeBuilder->getRootNode();\n $root->isRequired();\n\n $root\n ->children()\n ->scalarNode('vendor_dir')->end()\n ->scalarNode('redirectstrategy')\n ->defaultValue('registershutdown')\n ->end()\n ->scalarNode('query_modifier_order_by_class')->end()\n ->arrayNode('pdo')\n ->children()\n ->scalarNode('mysql_attr_init_command')->end()\n ->end()\n ->end()\n ->append($this->getCronjobConfig())\n ->append($this->getMailTargetTransformationServiceConfig())\n ->append($this->getMailerConfig())\n ->append($this->getGoogleMapsApiConfig())\n ->append($this->getBackendConfig())\n ->append($this->getModuleExecutionConfig())\n ->append($this->getResourceCollectionConfig())\n ;\n\n return $treeBuilder;\n }",
"public function getQueryFactory()\n {\n return $this->qbFactory;\n }",
"public function getConfigTreeBuilder()\n {\n\n $treeBuilder = new TreeBuilder();\n\n $keePassConfig = $treeBuilder->root('KeePass');\n\n $keePassConfig->children()\n ->append($this->addKeePassNode())\n ->scalarNode('cache_folder')\n ->defaultValue('@data_folder@/cache')\n ->end()\n ->scalarNode('data_folder')\n ->defaultValue('%HOME%/.KeePassCli')\n ->end()\n ->scalarNode('app_folder')\n ->defaultValue(realpath(sprintf('%s/../../',dirname(__FILE__))))\n ->end()\n ->end();\n\n return $treeBuilder;\n }",
"public function getResourceFactory(){\n return $this->resourceFactory;\n }",
"public function getConfigTreeBuilder()\n {\n $treeBuilder = new TreeBuilder();\n $node = $treeBuilder->root('px_cron_request');\n $node\n ->children()\n ->scalarNode('encryption_key')->isRequired()->end()\n ->arrayNode('cronjobs')\n ->prototype('array')\n ->children()\n ->scalarNode('job')->isRequired()->end()\n ->scalarNode('name')->isRequired()->end()\n ->booleanNode('symfonyCommand')->defaultValue(false)->end()\n ->end()\n ->end()\n ->end()\n ->end();\n\n return $treeBuilder;\n }",
"public function getRequestBuilder(): RequestBuilderInterface\n {\n return new RequestBuilder();\n }",
"public function getRequestBuilder(): RequestBuilderInterface\n {\n return new RequestBuilder();\n }",
"public function getRequestBuilder(): RequestBuilderInterface\n {\n return new RequestBuilder();\n }",
"public function getMenuFactory(): MenuFactoryInterface\n {\n return $this->_factory;\n }",
"final protected function getMigrationFactory()\n {\n return $this->factory;\n }",
"protected static function newFactory()\n {\n return TypeFactory::new();\n }",
"public function getGateway(){\n\n // Payment Method Configuration\n $paymentMethod = braintree_getPaymentMethodConfiguration();\n\n $config = new \\Braintree\\Configuration([\n 'environment' => $paymentMethod->options->mode,\n 'merchantId' => $paymentMethod->options->merchantId,\n 'publicKey' => $paymentMethod->options->publicKey,\n 'privateKey' => $paymentMethod->options->privateKey\n ]);\n\n $gateway = new \\Braintree\\Gateway($config);\n\n return $gateway;\n\n }",
"public function getParserFactory() {}",
"private function getRequestFactory()\n {\n if ($requestFactory = $this->app->config->get('swap.request_factory')) {\n return $this->app[$requestFactory];\n }\n\n return null;\n }"
]
| [
"0.69467735",
"0.6213261",
"0.5915547",
"0.59144044",
"0.58833677",
"0.57821023",
"0.5764653",
"0.5756776",
"0.5750483",
"0.5750483",
"0.5750483",
"0.5750483",
"0.5750483",
"0.5750483",
"0.5750483",
"0.5750483",
"0.5728471",
"0.5691307",
"0.5668162",
"0.5626025",
"0.56024903",
"0.5556655",
"0.55177593",
"0.54884416",
"0.54155654",
"0.53932357",
"0.5390978",
"0.5384757",
"0.5382772",
"0.5381999",
"0.5364379",
"0.5362033",
"0.5341693",
"0.5332577",
"0.53277355",
"0.53192425",
"0.53168094",
"0.5314454",
"0.5289937",
"0.52585185",
"0.52483124",
"0.52245086",
"0.5221174",
"0.5206486",
"0.52042407",
"0.5194232",
"0.51874036",
"0.5185244",
"0.51712096",
"0.51621085",
"0.5153335",
"0.51434636",
"0.51393527",
"0.51356786",
"0.51340795",
"0.51253426",
"0.51147896",
"0.5104587",
"0.5098221",
"0.50941765",
"0.5068964",
"0.5066379",
"0.50644225",
"0.50642174",
"0.5062526",
"0.50386846",
"0.50340736",
"0.50288045",
"0.5020645",
"0.50177664",
"0.501077",
"0.50101674",
"0.50096804",
"0.50095934",
"0.5007797",
"0.50048405",
"0.49993834",
"0.4994805",
"0.49919868",
"0.49919868",
"0.4991253",
"0.49899274",
"0.49898902",
"0.49805185",
"0.4980491",
"0.49774775",
"0.49772212",
"0.49718356",
"0.49666348",
"0.4964174",
"0.4964032",
"0.49611616",
"0.49611616",
"0.49611616",
"0.49594718",
"0.4958508",
"0.49562353",
"0.49524584",
"0.49498335",
"0.49465808"
]
| 0.60035783 | 2 |
Display a listing of the resource. | public function index(Request $request)
{
//verifico si hay periodo activo
$period = Period::where('state', 1)->first();
if($period!=null){
return view('postulations.index');
}
return view('postulations.sinperiodo');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }",
"public function listing();",
"function index() {\n\t\t$this->show_list();\n\t}",
"public function actionList() {\n $this->_getList();\n }",
"public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }",
"public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }",
"public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }",
"function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}",
"public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }",
"public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }",
"public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}",
"function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}",
"public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }",
"public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}",
"public function actionRestList() {\n\t $this->doRestList();\n\t}",
"public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}",
"public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }",
"public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }",
"public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}",
"public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}",
"public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }",
"public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }",
"public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }",
"public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }",
"public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}",
"public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }",
"public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}",
"public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }",
"public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}",
"public function index()\n {\n $this->list_view();\n }",
"public function index()\n {\n $this->list_view();\n }",
"public function index()\n {\n $this->list_view();\n }",
"public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }",
"public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }",
"public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}",
"public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }",
"public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }",
"public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }",
"public function index()\n {\n return Resources::collection(Checking::paginate());\n }",
"public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }",
"public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }",
"public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }",
"public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }",
"public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }",
"public function view(){\n\t\t$this->buildListing();\n\t}",
"public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }",
"public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }",
"public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }",
"public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }",
"public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }",
"public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }",
"public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }",
"public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }",
"public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }",
"public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}",
"public function listAction() {}",
"public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }",
"public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }",
"public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }",
"public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }",
"public function executeList()\n {\n $this->setTemplate('list');\n }",
"public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }",
"function listing() {\r\n\r\n }",
"public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }",
"public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }",
"public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}",
"public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }",
"public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }",
"public function _index(){\n\t $this->_list();\n\t}",
"public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}",
"function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}",
"public function index()\n {\n $this->booklist();\n }",
"public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }",
"public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }",
"public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }",
"public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }",
"public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }",
"public function indexAction() {\n $this->_forward('list');\n }",
"public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }",
"public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }",
"public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}",
"public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }",
"public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }",
"public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }",
"public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }",
"public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }",
"public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }",
"public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }",
"public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}",
"public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }",
"public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }",
"public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }",
"public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}",
"public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }",
"public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }",
"public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }",
"public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }",
"public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }",
"public function index()\n {\n return view('admin.resources.index');\n }",
"public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}"
]
| [
"0.7446777",
"0.736227",
"0.73005503",
"0.72478926",
"0.71631265",
"0.71489686",
"0.7131636",
"0.7105969",
"0.71029514",
"0.7101372",
"0.70508176",
"0.6995128",
"0.69890636",
"0.6934895",
"0.6900203",
"0.6899281",
"0.6891734",
"0.6887235",
"0.68670005",
"0.6849741",
"0.6830523",
"0.6802689",
"0.6797",
"0.67957735",
"0.67871135",
"0.6760129",
"0.67427456",
"0.6730486",
"0.67272323",
"0.67255723",
"0.67255723",
"0.67255723",
"0.67177945",
"0.6707866",
"0.6706713",
"0.6704375",
"0.6664782",
"0.6662871",
"0.6660302",
"0.6659404",
"0.6656656",
"0.6653517",
"0.6647965",
"0.6620322",
"0.66185474",
"0.6618499",
"0.6606105",
"0.6600617",
"0.65996987",
"0.6594775",
"0.6587389",
"0.6585109",
"0.6581641",
"0.6581017",
"0.6577157",
"0.65747666",
"0.6572513",
"0.65721947",
"0.6570553",
"0.65646994",
"0.6563556",
"0.6554194",
"0.65529937",
"0.65460825",
"0.65368485",
"0.653429",
"0.65328294",
"0.6526759",
"0.6526695",
"0.6526284",
"0.65191334",
"0.65183175",
"0.65174305",
"0.651703",
"0.65141153",
"0.6507088",
"0.65061647",
"0.6504046",
"0.64942145",
"0.6491893",
"0.64883405",
"0.6486392",
"0.6485077",
"0.64846045",
"0.6478858",
"0.64756656",
"0.64726377",
"0.6471126",
"0.64701074",
"0.6467418",
"0.6462195",
"0.64618355",
"0.6459199",
"0.6457831",
"0.6454631",
"0.64533997",
"0.6451915",
"0.6450861",
"0.6449301",
"0.64492667",
"0.64469045"
]
| 0.0 | -1 |
Show the form for creating a new resource. | public function create(Request $request)
{
//dd($request);
$user = User::find(\Auth::user()->id);
//verifico si hay periodo activo
$period = Period::where('state', 1)->get()->last();
$postulation = Postulation::where('user_id', '=', \Auth::user()->id)->where('period_id', '=', $period->id)->first();
$licences = array();
$enterprise = null;
$provincesEnterprise = null;
$communesEnterprise = null;
//valido que la postulacion sea del perido actual
if($postulation!=null){
if($postulation->period_id===$period->id){
//si hay postulacion en el perido actual traigo los certificados de esta postulacion
$licences = $postulation->licences->lists('id', 'certificate_id');
// dd($licences);
if($postulation->type===2){
$enterprise = $postulation->enterprise;
$provincesEnterprise = Province::where('region_id', $enterprise->region_id)->lists('name', 'id');
$communesEnterprise = Commune::where('province_id', $enterprise->province_id)->lists('name', 'id');
}
}
}
$certificates = Certificate::all()->lists('name', 'id');
//dd($user->postulation->get()->where('period_id', $period->id)->last()->licences->where('certificate_id', 12)->first()->certificate->name );
$diff = $certificates->diffKeys($licences);
//dd($user->postulation->get()->last()->licences->where('certificate_id', 12)->first()->certificate->name );
if($period!=null){
$type = $request->type;
$regions = Region::all()->lists('name', 'id');
$provinces = Province::where('region_id', $user->region_id)->lists('name', 'id');
$communes = Commune::where('province_id', $user->province_id)->lists('name', 'id');
$tags = Tag::all()->lists('name', 'id');
return view('postulations.create')
->with('type', $type)
->with('regions', $regions)
->with('provinces', $provinces)
->with('communes', $communes)
->with('provincesEnterprise', $provincesEnterprise)
->with('communesEnterprise', $communesEnterprise)
->with('enterprise', $enterprise)
->with('licences', $licences)
->with('postulation', $postulation)
->with('diff', $diff)
->with('user', $user);
}
return view('postulations.sinperiodo');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return view('admin.resources.create');\n }",
"public function create(){\n\n return view('resource.create');\n }",
"public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}",
"public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }",
"public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }",
"public function create()\n {\n return view ('forms.create');\n }",
"public function create ()\n {\n return view('forms.create');\n }",
"public function create()\n\t{\n\t\treturn view('faith.form');\n\t}",
"public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }",
"public function create()\n {\n return view(\"request_form.form\");\n }",
"public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }",
"public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle école'\n\t\t) ) );\n\t}",
"public function create()\n {\n return view($this->forms . '.create');\n }",
"public function create()\n {\n return view('restful.add');\n }",
"public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }",
"public function create()\n {\n return view('admin.createform');\n }",
"public function create()\n {\n return view('admin.forms.create');\n }",
"public function create()\n {\n return view('backend.student.form');\n }",
"public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }",
"public function create()\n {\n return view('client.form');\n }",
"public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }",
"public function create()\n {\n return view('Form');\n }",
"public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }",
"public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}",
"public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }",
"public function create()\n {\n return view('backend.schoolboard.addform');\n }",
"public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}",
"public function create()\n {\n //\n return view('form');\n }",
"public function create()\n {\n return view('rests.create');\n }",
"public function create()\n {\n return $this->showForm();\n }",
"public function create()\n {\n return $this->showForm();\n }",
"public function create()\n {\n return view(\"Add\");\n }",
"public function create(){\n return view('form.create');\n }",
"public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }",
"public function create()\n {\n\n return view('control panel.student.add');\n\n }",
"public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}",
"public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }",
"public function create()\n {\n return $this->cView(\"form\");\n }",
"public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }",
"public function create()\n {\n return view(\"dresses.form\");\n }",
"public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}",
"public function createAction()\n {\n// $this->view->form = $form;\n }",
"public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }",
"public function create()\n {\n return view('fish.form');\n }",
"public function create()\n {\n return view('users.forms.create');\n }",
"public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }",
"public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}",
"public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }",
"public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }",
"public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }",
"public function create()\n {\n return view('essentials::create');\n }",
"public function create()\n {\n return view('student.add');\n }",
"public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}",
"public function create()\n {\n return view('url.form');\n }",
"public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }",
"public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}",
"public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }",
"public function create()\n {\n return view('libro.create');\n }",
"public function create()\n {\n return view('libro.create');\n }",
"public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n return view('crud/add'); }",
"public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}",
"public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n return view(\"List.form\");\n }",
"public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}",
"public function create()\n {\n //load create form\n return view('products.create');\n }",
"public function create()\n {\n return view('article.addform');\n }",
"public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }",
"public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}",
"public function create()\n {\n return view('saldo.form');\n }",
"public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}",
"public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }",
"public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }",
"public function create()\n {\n return view('admin.inverty.add');\n }",
"public function create()\n {\n return view('Libro.create');\n }",
"public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }",
"public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }",
"public function create()\n {\n return view(\"familiasPrograma.create\");\n }",
"public function create()\n {\n return view('admin.car.create');\n }",
"public function create()\n {\n return view('admin.car.create');\n }",
"public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}",
"public function create()\n {\n return view(\"create\");\n }",
"public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}",
"public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }",
"public function create()\n {\n return view('forming');\n }",
"public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }",
"public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }",
"public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }",
"public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }",
"public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }",
"public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}",
"public function create()\n {\n return view('student::students.student.create');\n }",
"public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}"
]
| [
"0.75948673",
"0.75948673",
"0.75863165",
"0.7577412",
"0.75727344",
"0.7500887",
"0.7434847",
"0.7433956",
"0.73892003",
"0.73531085",
"0.73364776",
"0.73125",
"0.7296102",
"0.7281891",
"0.72741455",
"0.72424185",
"0.7229325",
"0.7226713",
"0.7187349",
"0.7179176",
"0.7174283",
"0.7150356",
"0.71444064",
"0.71442676",
"0.713498",
"0.71283126",
"0.7123691",
"0.71158516",
"0.71158516",
"0.71158516",
"0.7112176",
"0.7094388",
"0.7085711",
"0.708025",
"0.70800644",
"0.70571953",
"0.70571953",
"0.70556754",
"0.70396435",
"0.7039549",
"0.7036275",
"0.703468",
"0.70305896",
"0.7027638",
"0.70265305",
"0.70199823",
"0.7018007",
"0.7004984",
"0.7003889",
"0.7000935",
"0.69973785",
"0.6994679",
"0.6993764",
"0.6989918",
"0.6986989",
"0.6966502",
"0.69656384",
"0.69564354",
"0.69518244",
"0.6951109",
"0.6947306",
"0.69444615",
"0.69423944",
"0.6941156",
"0.6937871",
"0.6937871",
"0.6936686",
"0.69345254",
"0.69318026",
"0.692827",
"0.69263744",
"0.69242257",
"0.6918349",
"0.6915889",
"0.6912884",
"0.691146",
"0.69103104",
"0.69085974",
"0.69040126",
"0.69014287",
"0.69012105",
"0.6900397",
"0.68951064",
"0.6893521",
"0.68932164",
"0.6891899",
"0.6891616",
"0.6891616",
"0.6889246",
"0.68880934",
"0.6887128",
"0.6884732",
"0.68822503",
"0.68809193",
"0.6875949",
"0.68739206",
"0.68739134",
"0.6870358",
"0.6869779",
"0.68696856",
"0.686877"
]
| 0.0 | -1 |
Store a newly created resource in storage. | public function storeEmpresa(PostulationEnterpriseRequest $request)
{
//dd($request);
$user = User::find(\Auth::user()->id);
//dd($request->file('certificates.*'));
if ($request->hasFile('proxy_letter')) {
if ($request->file('proxy_letter')->isValid()) {
$file = $request->file('proxy_letter');
$name = 'let_' .uniqid(). '.' .$file->getClientOriginalExtension();
$type = $file->getMimeType();
$size = $file->getSize();
$path = public_path() . '/files/users/letters/';
$file->move($path, $name);
}
}
$region = Region::find($request->region_id);
$province = Province::find($request->province_id);
$commune = Commune::find($request->commune_id);
$user->fill($request->all());
$user->save();
$period = Period::where('state', 1)->first();
$postulation = Postulation::where('user_id', '=', \Auth::user()->id)->where('period_id', '=', $period->id)->first();
if($postulation===null){
//Crear postulacion
$postulation = new Postulation();
$postulation->user()->associate($user);
$postulation->period()->associate($period);
$postulation->type = 2;
$postulation->state = 0;
$postulation->uid = uniqid();
$postulation->save();
}else{
$postulation = Postulation::find($postulation->id);
$postulation->user()->associate($user);
$postulation->period()->associate($period);
$postulation->type = 2;
$postulation->state = 0;
$postulation->uid = uniqid();
$postulation->save();
}
if($postulation->enterprise===null){
$enterprise = new Enterprise();
$enterprise->fill($request->all());
$enterprise->postulation()->associate($postulation);
$enterprise->uid = uniqid();
$enterprise->region()->associate($region);
$enterprise->province()->associate($province);
$enterprise->commune()->associate($commune);
$enterprise->slug = str_slug($request->business_name, '-');
$enterprise->save();
$letter = new Letter();
$letter->name = $name;
$letter->type = $type;
$letter->size = $size;
$letter->enterprise()->associate($enterprise);
$letter->save();
}else{
$enterprise = Enterprise::find($postulation->enterprise->id);
$enterprise->fill($request->all());
$enterprise->postulation()->associate($postulation);
$enterprise->region()->associate($region);
$enterprise->province()->associate($province);
$enterprise->commune()->associate($commune);
$enterprise->save();
}
//redirección a la lista de proyectos en esta postulación
return redirect()->route('postulations.projects', $postulation->uid);
} | {
"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 |
Store a newly created resource in storage. | public function store(PostulationRequest $request)
{
$user = User::find(\Auth::user()->id);
//dd($request->file('certificates.*'));
if ($request->hasFile('resume')) {
if ($request->file('resume')->isValid()) {
$file = $request->file('resume');
$name = 'cv_' .uniqid(). '.' .$file->getClientOriginalExtension();
$type = $file->getMimeType();
$size = $file->getSize();
$path = public_path() . '/files/users/resumes/';
$file->move($path, $name);
$resume = new Resume();
$resume->name = $name;
$resume->type = $type;
$resume->size = $size;
$resume->user()->associate($user);
$resume->save();
}
}
if ($request->hasFile('resume_update')) {
if ($request->file('resume_update')->isValid()) {
$old_resume = Resume::find($user->resume->id);
\File::delete(public_path() . '/files/users/resumes/'. $user->resume->name);
$old_resume->delete();
$file = $request->file('resume_update');
$name = 'cv_' .uniqid(). '.' .$file->getClientOriginalExtension();
$type = $file->getMimeType();
$size = $file->getSize();
$path = public_path() . '/files/users/resumes/';
$file->move($path, $name);
$resume = new Resume();
$resume->name = $name;
$resume->type = $type;
$resume->size = $size;
$resume->user()->associate($user);
$resume->save();
}
}
//dd(\Auth::user()->id);
//
$region = Region::find($request->region_id);
$province = Province::find($request->province_id);
$commune = Commune::find($request->commune_id);
$user->fill($request->all());
$user->region()->associate($region);
$user->province()->associate($province);
$user->commune()->associate($commune);
$user->slug = str_slug($request->name, '-');
$user->save();
$period = Period::where('state', 1)->first();
$postulation = Postulation::where('user_id', '=', \Auth::user()->id)->where('period_id', '=', $period->id)->first();
if($postulation===null){
//Crear postulacion
$postulation = new Postulation();
$postulation->user()->associate($user);
$postulation->period()->associate($period);
$postulation->type = 1;
$postulation->state = 0;
$postulation->uid = uniqid();
$postulation->save();
}else{
$postulation = Postulation::find($postulation->id);
$postulation->user()->associate($user);
$postulation->period()->associate($period);
$postulation->type = 1;
$postulation->state = 0;
$postulation->uid = uniqid();
$postulation->save();
}
$certificates = Certificate::all();
$certificates->each(function ($item, $key) use ($request, $postulation) {
if ($request->hasFile('certificates.'.$item->name)) {
if ($request->file('certificates.'.$item->name)->isValid()) {
$file = $request->file('certificates.'.$item->name);
$name = 'cert_' .uniqid(). '.' .$file->getClientOriginalExtension();
$type = $file->getMimeType();
$size = $file->getSize();
$path = public_path() . '/files/users/licences/';
$file->move($path, $name);
$licence = new Licence();
$licence->name = $name;
$licence->type = $type;
$licence->size = $size;
$licence->postulation()->associate($postulation);
$licence->certificate()->associate($item);
$licence->save();
}
}
});
//redirección a la lista de proyectos en esta postulación
return redirect()->route('postulations.projects', $postulation->uid);
} | {
"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)
{
//me voy a proyectos
$postulation = Postulation::where('user_id', '=', \Auth::user()->id)->where('uid', '=', $id)->first();
if($postulation===null){
return redirect('/home');
}
$projects = $postulation->projects;
return view('postulations.projects', $postulation)->with('projects', $projects)->with('postulation', $postulation);
} | {
"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 view($id)
{
//
$postulation = Postulation::where('uid', '=', $id)->where('user_id', '=', \Auth::user()->id)->first();
//dd($postulation->projects);
// $project = $postulation->projects->filter(function($value) use ($id) {
// if ($value->uid == $id) {
// return true;
// }
// })->first();
$user = User::find(\Auth::user()->id);
//dd($user->postulation->last());
return view('postulations.view', $postulation)->with('user', $user)->with('postulation', $postulation);
} | {
"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 |
Show the form for editing the specified resource. | public function edit($id)
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }",
"public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }",
"public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }",
"public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }",
"public function edit()\n {\n return view('hirmvc::edit');\n }",
"public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}",
"public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }",
"public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}",
"public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }",
"public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }",
"private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }",
"public function edit($id)\n {\n return $this->showForm('update', $id);\n }",
"public function edit($id)\n {\n return $this->showForm('update', $id);\n }",
"public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }",
"public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }",
"public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}",
"public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }",
"public function edit($model, $form);",
"function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}",
"public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}",
"public function edit()\n { \n return view('admin.control.edit');\n }",
"public function edit(Form $form)\n {\n //\n }",
"public function edit()\n {\n return view('common::edit');\n }",
"public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }",
"public function edit()\n {\n return view('admin::edit');\n }",
"public function edit()\n {\n return view('admin::edit');\n }",
"public function edit()\r\n {\r\n return view('petro::edit');\r\n }",
"public function edit($id)\n {\n // show form edit user info\n }",
"public function edit()\n {\n return view('escrow::edit');\n }",
"public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }",
"public function edit()\n {\n return view('commonmodule::edit');\n }",
"public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}",
"public function edit()\n {\n return view('catalog::edit');\n }",
"public function edit()\n {\n return view('catalog::edit');\n }",
"public function edit(form $form)\n {\n //\n }",
"public function actionEdit($id) { }",
"public function edit()\n {\n return view('admincp::edit');\n }",
"public function edit()\n {\n return view('scaffold::edit');\n }",
"public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }",
"public function edit()\n {\n return view('Person.edit');\n }",
"public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }",
"public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}",
"public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }",
"public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}",
"public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }",
"public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }",
"public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }",
"function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}",
"public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }",
"public function edit($id)\n {\n return $this->showForm($id);\n }",
"public function edit($id)\n {\n return $this->showForm($id);\n }",
"protected function _edit(){\n\t\treturn $this->_editForm();\n\t}",
"public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }",
"public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }",
"public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}",
"public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}",
"public function edit($id)\n {\n return view('models::edit');\n }",
"public function edit()\n {\n return view('home::edit');\n }",
"public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }",
"public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }",
"public function edit()\n {\n return view('user::edit');\n }",
"public function edit()\n {\n return view('user::edit');\n }",
"public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }",
"public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }",
"public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function edit($id)\n {\n return view('consultas::edit');\n }",
"public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }",
"public function edit()\n {\n return view('dashboard::edit');\n }",
"public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }",
"public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }",
"public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }",
"public function edit() {\n return view('routes::edit');\n }",
"public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }",
"public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }",
"public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function edit($id)\n {\n return view('cataloguemodule::edit');\n }",
"public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }",
"public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }",
"public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }",
"public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }",
"public function edit()\n {\n return view('website::edit');\n }",
"public function edit()\n {\n return view('inventory::edit');\n }",
"public function edit()\n {\n return view('initializer::edit');\n }",
"public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }",
"public function edit($id)\n {\n return view('backend::edit');\n }",
"public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }",
"public function edit($id)\n {\n return view('crm::edit');\n }",
"public function edit($id)\n {\n return view('crm::edit');\n }",
"public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }",
"public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}",
"public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }",
"public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}",
"public function edit($id)\n {\n \t$product = Product::find($id);\n \treturn view('admin.products.edit')->with(compact('product')); // formulario de actualizacion de datos del producto\n }",
"public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }",
"public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\n }",
"public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }",
"public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }",
"public function edit($id)\n\t{\n\t\t // get the project\n $project = Project::find($id);\n\n // show the edit form and pass the project\n return View::make('logicViews.projects.edit')->with('project', $project);\n\t}"
]
| [
"0.78550774",
"0.7692893",
"0.7273195",
"0.7242132",
"0.7170847",
"0.70622855",
"0.7053459",
"0.6982539",
"0.69467914",
"0.6945275",
"0.6941114",
"0.6928077",
"0.69019294",
"0.68976134",
"0.68976134",
"0.6877213",
"0.68636996",
"0.68592185",
"0.68566656",
"0.6844697",
"0.68336326",
"0.6811471",
"0.68060875",
"0.68047357",
"0.68018645",
"0.6795623",
"0.6791791",
"0.6791791",
"0.6787701",
"0.67837197",
"0.67791027",
"0.677645",
"0.6768301",
"0.6760122",
"0.67458534",
"0.67458534",
"0.67443407",
"0.67425704",
"0.6739898",
"0.6735328",
"0.6725465",
"0.6712817",
"0.6693891",
"0.6692419",
"0.6688581",
"0.66879624",
"0.6687282",
"0.6684741",
"0.6682786",
"0.6668777",
"0.6668427",
"0.6665287",
"0.6665287",
"0.66610634",
"0.6660843",
"0.66589665",
"0.66567147",
"0.66545695",
"0.66527975",
"0.6642529",
"0.6633056",
"0.6630304",
"0.6627662",
"0.6627662",
"0.66192114",
"0.6619003",
"0.66153085",
"0.6614968",
"0.6609744",
"0.66086483",
"0.66060555",
"0.6596137",
"0.65950733",
"0.6594648",
"0.65902114",
"0.6589043",
"0.6587102",
"0.65799844",
"0.65799403",
"0.65799177",
"0.657708",
"0.65760696",
"0.65739626",
"0.656931",
"0.6567826",
"0.65663105",
"0.65660435",
"0.65615267",
"0.6561447",
"0.6561447",
"0.65576506",
"0.655686",
"0.6556527",
"0.6555543",
"0.6555445",
"0.65552044",
"0.65543956",
"0.65543705",
"0.6548264",
"0.65475875",
"0.65447706"
]
| 0.0 | -1 |
Remove the specified resource from storage. | public function destroyLicence(Request $request)
{
if($request->ajax()){
$user = User::find(\Auth::user()->id);
$id = $request->id;
$period = Period::where('state', 1)->first();
$postulation = Postulation::where('user_id', '=', \Auth::user()->id)->where('period_id', '=', $period->id)->first();
$licence = $postulation->licences->filter(function($value) use ($id) {
if ($value->id == $id) {
return true;
}
})->first();
$certificate = Certificate::find($licence->certificate_id);
\File::delete(public_path() . '/files/users/licences/'. $licence->name);
$licence->delete();
return response()->json([
'status' => 'success',
'name' => $certificate->name
]);
//print_r($id);die;
}
} | {
"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 |
Remove the specified resource from storage. | public function destroy($id)
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }",
"public function destroy(Resource $resource)\n {\n //\n }",
"public function removeResource($resourceID)\n\t\t{\n\t\t}",
"public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }",
"public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }",
"public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }",
"public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }",
"protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }",
"public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }",
"public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }",
"public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }",
"public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}",
"public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}",
"public function delete(): void\n {\n unlink($this->getPath());\n }",
"public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }",
"public function remove($path);",
"function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}",
"public function delete(): void\n {\n unlink($this->path);\n }",
"private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }",
"public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }",
"public function remove() {}",
"public function remove() {}",
"public function remove();",
"public function remove();",
"public function remove();",
"public function remove();",
"function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}",
"public function deleteImage(){\n\n\n Storage::delete($this->image);\n }",
"public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }",
"public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}",
"public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }",
"public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }",
"public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}",
"public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }",
"public function deleteImage(){\n \tStorage::delete($this->image);\n }",
"public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }",
"public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }",
"public function destroy($id)\n {\n Myfile::find($id)->delete();\n }",
"public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }",
"public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }",
"public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }",
"public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }",
"public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }",
"public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }",
"public function delete($path);",
"public function delete($path);",
"public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }",
"public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }",
"public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }",
"public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }",
"public function delete($path, $data = null);",
"public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }",
"public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }",
"public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }",
"public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }",
"public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }",
"public function del($path){\n\t\treturn $this->remove($path);\n\t}",
"public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }",
"public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}",
"public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }",
"public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }",
"public function revoke($resource, $permission = null);",
"public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }",
"function delete($path);",
"public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}",
"public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }",
"public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }",
"public function remove($filePath){\n return Storage::delete($filePath);\n }",
"public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }",
"public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }",
"public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }",
"public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }",
"function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }",
"public function remove($id);",
"public function remove($id);",
"public function deleted(Storage $storage)\n {\n //\n }",
"public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }",
"public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }",
"public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }",
"public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }",
"function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}",
"public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }",
"public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}",
"public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }",
"public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }"
]
| [
"0.6672584",
"0.6659381",
"0.6635911",
"0.6632799",
"0.6626075",
"0.65424126",
"0.65416265",
"0.64648265",
"0.62882507",
"0.6175931",
"0.6129922",
"0.60893893",
"0.6054415",
"0.60428125",
"0.60064924",
"0.59337646",
"0.5930772",
"0.59199584",
"0.5919811",
"0.5904504",
"0.5897263",
"0.58962846",
"0.58951396",
"0.58951396",
"0.58951396",
"0.58951396",
"0.5880124",
"0.58690923",
"0.5863659",
"0.5809161",
"0.57735413",
"0.5760811",
"0.5753559",
"0.57492644",
"0.5741712",
"0.57334286",
"0.5726379",
"0.57144034",
"0.57096",
"0.5707689",
"0.5705895",
"0.5705634",
"0.5703902",
"0.5696585",
"0.5684331",
"0.5684331",
"0.56780374",
"0.5677111",
"0.5657287",
"0.5648262",
"0.5648085",
"0.5648012",
"0.5640759",
"0.5637738",
"0.5629985",
"0.5619264",
"0.56167465",
"0.5606877",
"0.56021434",
"0.5601949",
"0.55992156",
"0.5598557",
"0.55897516",
"0.5581397",
"0.5566926",
"0.5566796",
"0.55642897",
"0.55641",
"0.5556583",
"0.5556536",
"0.5550097",
"0.5543172",
"0.55422723",
"0.5540013",
"0.5540013",
"0.55371785",
"0.55365825",
"0.55300397",
"0.552969",
"0.55275744",
"0.55272335",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.5525997",
"0.5525624",
"0.5523911",
"0.5521122",
"0.5517412"
]
| 0.0 | -1 |
Display a listing of the resource. | public function index()
{
return IngramCategory::all();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }",
"public function listing();",
"function index() {\n\t\t$this->show_list();\n\t}",
"public function actionList() {\n $this->_getList();\n }",
"public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }",
"public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }",
"public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }",
"function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}",
"public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }",
"public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }",
"public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}",
"function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}",
"public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }",
"public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}",
"public function actionRestList() {\n\t $this->doRestList();\n\t}",
"public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}",
"public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }",
"public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }",
"public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}",
"public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}",
"public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }",
"public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }",
"public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }",
"public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }",
"public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}",
"public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }",
"public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}",
"public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }",
"public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}",
"public function index()\n {\n $this->list_view();\n }",
"public function index()\n {\n $this->list_view();\n }",
"public function index()\n {\n $this->list_view();\n }",
"public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }",
"public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }",
"public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}",
"public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }",
"public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }",
"public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }",
"public function index()\n {\n return Resources::collection(Checking::paginate());\n }",
"public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }",
"public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }",
"public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }",
"public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }",
"public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }",
"public function view(){\n\t\t$this->buildListing();\n\t}",
"public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }",
"public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }",
"public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }",
"public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }",
"public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }",
"public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }",
"public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }",
"public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }",
"public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }",
"public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}",
"public function listAction() {}",
"public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }",
"public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }",
"public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }",
"public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }",
"public function executeList()\n {\n $this->setTemplate('list');\n }",
"public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }",
"function listing() {\r\n\r\n }",
"public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }",
"public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }",
"public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}",
"public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }",
"public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }",
"public function _index(){\n\t $this->_list();\n\t}",
"public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}",
"function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}",
"public function index()\n {\n $this->booklist();\n }",
"public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }",
"public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }",
"public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }",
"public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }",
"public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }",
"public function indexAction() {\n $this->_forward('list');\n }",
"public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }",
"public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }",
"public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}",
"public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }",
"public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }",
"public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }",
"public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }",
"public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }",
"public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }",
"public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }",
"public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}",
"public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }",
"public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }",
"public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }",
"public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}",
"public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }",
"public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }",
"public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }",
"public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }",
"public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }",
"public function index()\n {\n return view('admin.resources.index');\n }",
"public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}"
]
| [
"0.7446777",
"0.736227",
"0.73005503",
"0.72478926",
"0.71631265",
"0.71489686",
"0.7131636",
"0.7105969",
"0.71029514",
"0.7101372",
"0.70508176",
"0.6995128",
"0.69890636",
"0.6934895",
"0.6900203",
"0.6899281",
"0.6891734",
"0.6887235",
"0.68670005",
"0.6849741",
"0.6830523",
"0.6802689",
"0.6797",
"0.67957735",
"0.67871135",
"0.6760129",
"0.67427456",
"0.6730486",
"0.67272323",
"0.67255723",
"0.67255723",
"0.67255723",
"0.67177945",
"0.6707866",
"0.6706713",
"0.6704375",
"0.6664782",
"0.6662871",
"0.6660302",
"0.6659404",
"0.6656656",
"0.6653517",
"0.6647965",
"0.6620322",
"0.66185474",
"0.6618499",
"0.6606105",
"0.6600617",
"0.65996987",
"0.6594775",
"0.6587389",
"0.6585109",
"0.6581641",
"0.6581017",
"0.6577157",
"0.65747666",
"0.6572513",
"0.65721947",
"0.6570553",
"0.65646994",
"0.6563556",
"0.6554194",
"0.65529937",
"0.65460825",
"0.65368485",
"0.653429",
"0.65328294",
"0.6526759",
"0.6526695",
"0.6526284",
"0.65191334",
"0.65183175",
"0.65174305",
"0.651703",
"0.65141153",
"0.6507088",
"0.65061647",
"0.6504046",
"0.64942145",
"0.6491893",
"0.64883405",
"0.6486392",
"0.6485077",
"0.64846045",
"0.6478858",
"0.64756656",
"0.64726377",
"0.6471126",
"0.64701074",
"0.6467418",
"0.6462195",
"0.64618355",
"0.6459199",
"0.6457831",
"0.6454631",
"0.64533997",
"0.6451915",
"0.6450861",
"0.6449301",
"0.64492667",
"0.64469045"
]
| 0.0 | -1 |
Show the form for creating a new resource. | public function create()
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return view('admin.resources.create');\n }",
"public function create(){\n\n return view('resource.create');\n }",
"public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}",
"public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }",
"public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }",
"public function create()\n {\n return view ('forms.create');\n }",
"public function create ()\n {\n return view('forms.create');\n }",
"public function create()\n\t{\n\t\treturn view('faith.form');\n\t}",
"public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }",
"public function create()\n {\n return view(\"request_form.form\");\n }",
"public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }",
"public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle é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)
{
return IngramCategory::where('category_id', "=", $id)->get();;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function show(Resource $resource)\n {\n // not available for now\n }",
"public function show(Resource $resource)\n {\n //\n }",
"function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }",
"private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }",
"function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}",
"public function show(ResourceSubject $resourceSubject)\n {\n //\n }",
"public function show(ResourceManagement $resourcesManagement)\n {\n //\n }",
"public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }",
"public function retrieve(Resource $resource);",
"public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }",
"public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function show(Dispenser $dispenser)\n {\n //\n }",
"public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }",
"public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}",
"public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }",
"public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }",
"function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}",
"public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }",
"public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }",
"public function get(Resource $resource);",
"public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }",
"public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }",
"function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}",
"public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }",
"function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}",
"public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function show(rc $rc)\n {\n //\n }",
"public function show(Resolucion $resolucion)\n {\n //\n }",
"public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }",
"public function show()\n\t{\n\t\t//\n\t}",
"public function show()\n\t{\n\t\t//\n\t}",
"public function show()\n\t{\n\t\t//\n\t}",
"public function show(Resena $resena)\n {\n }",
"public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }",
"public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }",
"public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}",
"public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }",
"public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }",
"public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }",
"public function display()\n\t{\n\t\tparent::display();\n\t}",
"public function get_resource();",
"public function show()\n\t{\n\t\t\n\t}",
"function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}",
"public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }",
"public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }",
"public function display($title = null)\n {\n echo $this->fetch($title);\n }",
"public function display(){}",
"public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}",
"public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}",
"public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }",
"#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}",
"public function display() {\n echo $this->render();\n }",
"public function show($id)\n\t{\n\t//\n\t}",
"public function show($id)\n\t{\n\t//\n\t}",
"function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }",
"public function show($id)\n {\n //\n $this->_show($id);\n }",
"public function show()\n\t{\n\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {}",
"static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}",
"public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}",
"public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }",
"public abstract function display();",
"abstract public function resource($resource);",
"public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}",
"public function show( $id ) {\n\t\t//\n\t}",
"public function show( $id ) {\n\t\t//\n\t}",
"public function show(Response $response)\n {\n //\n }",
"public function show()\n {\n return auth()->user()->getResource();\n }",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}"
]
| [
"0.8233718",
"0.8190437",
"0.6828712",
"0.64986944",
"0.6495974",
"0.6469629",
"0.6462615",
"0.6363665",
"0.6311607",
"0.62817234",
"0.6218966",
"0.6189695",
"0.61804265",
"0.6171014",
"0.61371076",
"0.61207956",
"0.61067593",
"0.6105954",
"0.6094066",
"0.6082806",
"0.6045245",
"0.60389996",
"0.6016584",
"0.598783",
"0.5961788",
"0.59606946",
"0.5954321",
"0.59295714",
"0.59182066",
"0.5904556",
"0.59036547",
"0.59036547",
"0.59036547",
"0.5891874",
"0.58688277",
"0.5868107",
"0.58676815",
"0.5851883",
"0.58144855",
"0.58124036",
"0.58112013",
"0.5803467",
"0.58012545",
"0.5791527",
"0.57901084",
"0.5781528",
"0.5779676",
"0.5757105",
"0.5756208",
"0.57561266",
"0.57453394",
"0.57435393",
"0.57422745",
"0.5736634",
"0.5736634",
"0.5730559",
"0.57259274",
"0.5724891",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5718969",
"0.5713412",
"0.57091093",
"0.5706405",
"0.57057405",
"0.5704541",
"0.5704152",
"0.57026845",
"0.57026845",
"0.56981397",
"0.5693083",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962"
]
| 0.0 | -1 |
Show the form for editing the specified resource. | public function edit($id)
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }",
"public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }",
"public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }",
"public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }",
"public function edit()\n {\n return view('hirmvc::edit');\n }",
"public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}",
"public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }",
"public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}",
"public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }",
"public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }",
"private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }",
"public function edit($id)\n {\n return $this->showForm('update', $id);\n }",
"public function edit($id)\n {\n return $this->showForm('update', $id);\n }",
"public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }",
"public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }",
"public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}",
"public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }",
"public function edit($model, $form);",
"function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}",
"public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}",
"public function edit()\n { \n return view('admin.control.edit');\n }",
"public function edit(Form $form)\n {\n //\n }",
"public function edit()\n {\n return view('common::edit');\n }",
"public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }",
"public function edit()\n {\n return view('admin::edit');\n }",
"public function edit()\n {\n return view('admin::edit');\n }",
"public function edit()\r\n {\r\n return view('petro::edit');\r\n }",
"public function edit($id)\n {\n // show form edit user info\n }",
"public function edit()\n {\n return view('escrow::edit');\n }",
"public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }",
"public function edit()\n {\n return view('commonmodule::edit');\n }",
"public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}",
"public function edit()\n {\n return view('catalog::edit');\n }",
"public function edit()\n {\n return view('catalog::edit');\n }",
"public function edit(form $form)\n {\n //\n }",
"public function actionEdit($id) { }",
"public function edit()\n {\n return view('admincp::edit');\n }",
"public function edit()\n {\n return view('scaffold::edit');\n }",
"public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }",
"public function edit()\n {\n return view('Person.edit');\n }",
"public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }",
"public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}",
"public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }",
"public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}",
"public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }",
"public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }",
"public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }",
"function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}",
"public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }",
"public function edit($id)\n {\n return $this->showForm($id);\n }",
"public function edit($id)\n {\n return $this->showForm($id);\n }",
"protected function _edit(){\n\t\treturn $this->_editForm();\n\t}",
"public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }",
"public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }",
"public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}",
"public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}",
"public function edit($id)\n {\n return view('models::edit');\n }",
"public function edit()\n {\n return view('home::edit');\n }",
"public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }",
"public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }",
"public function edit()\n {\n return view('user::edit');\n }",
"public function edit()\n {\n return view('user::edit');\n }",
"public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }",
"public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }",
"public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function edit($id)\n {\n return view('consultas::edit');\n }",
"public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }",
"public function edit()\n {\n return view('dashboard::edit');\n }",
"public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }",
"public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }",
"public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }",
"public function edit() {\n return view('routes::edit');\n }",
"public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }",
"public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }",
"public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function edit($id)\n {\n return view('cataloguemodule::edit');\n }",
"public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }",
"public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }",
"public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }",
"public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }",
"public function edit()\n {\n return view('website::edit');\n }",
"public function edit()\n {\n return view('inventory::edit');\n }",
"public function edit()\n {\n return view('initializer::edit');\n }",
"public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }",
"public function edit($id)\n {\n return view('backend::edit');\n }",
"public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }",
"public function edit($id)\n {\n return view('crm::edit');\n }",
"public function edit($id)\n {\n return view('crm::edit');\n }",
"public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }",
"public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}",
"public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }",
"public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}",
"public function edit($id)\n {\n \t$product = Product::find($id);\n \treturn view('admin.products.edit')->with(compact('product')); // formulario de actualizacion de datos del producto\n }",
"public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }",
"public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\n }",
"public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }",
"public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }",
"public function edit($id)\n\t{\n\t\t // get the project\n $project = Project::find($id);\n\n // show the edit form and pass the project\n return View::make('logicViews.projects.edit')->with('project', $project);\n\t}"
]
| [
"0.78550774",
"0.7692893",
"0.7273195",
"0.7242132",
"0.7170847",
"0.70622855",
"0.7053459",
"0.6982539",
"0.69467914",
"0.6945275",
"0.6941114",
"0.6928077",
"0.69019294",
"0.68976134",
"0.68976134",
"0.6877213",
"0.68636996",
"0.68592185",
"0.68566656",
"0.6844697",
"0.68336326",
"0.6811471",
"0.68060875",
"0.68047357",
"0.68018645",
"0.6795623",
"0.6791791",
"0.6791791",
"0.6787701",
"0.67837197",
"0.67791027",
"0.677645",
"0.6768301",
"0.6760122",
"0.67458534",
"0.67458534",
"0.67443407",
"0.67425704",
"0.6739898",
"0.6735328",
"0.6725465",
"0.6712817",
"0.6693891",
"0.6692419",
"0.6688581",
"0.66879624",
"0.6687282",
"0.6684741",
"0.6682786",
"0.6668777",
"0.6668427",
"0.6665287",
"0.6665287",
"0.66610634",
"0.6660843",
"0.66589665",
"0.66567147",
"0.66545695",
"0.66527975",
"0.6642529",
"0.6633056",
"0.6630304",
"0.6627662",
"0.6627662",
"0.66192114",
"0.6619003",
"0.66153085",
"0.6614968",
"0.6609744",
"0.66086483",
"0.66060555",
"0.6596137",
"0.65950733",
"0.6594648",
"0.65902114",
"0.6589043",
"0.6587102",
"0.65799844",
"0.65799403",
"0.65799177",
"0.657708",
"0.65760696",
"0.65739626",
"0.656931",
"0.6567826",
"0.65663105",
"0.65660435",
"0.65615267",
"0.6561447",
"0.6561447",
"0.65576506",
"0.655686",
"0.6556527",
"0.6555543",
"0.6555445",
"0.65552044",
"0.65543956",
"0.65543705",
"0.6548264",
"0.65475875",
"0.65447706"
]
| 0.0 | -1 |
Update the specified resource in storage. | public function update(Request $request, $id)
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }",
"public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }",
"public function update(Request $request, Resource $resource)\n {\n //\n }",
"public function updateStream($resource);",
"public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }",
"protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }",
"public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }",
"public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }",
"public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}",
"public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }",
"public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }",
"protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }",
"public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }",
"public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }",
"public function update($path);",
"public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }",
"public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }",
"public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }",
"public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}",
"public function updateStream($path, $resource, Config $config)\n {\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }",
"public function update($data) {}",
"public function update($data) {}",
"public function putStream($resource);",
"public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }",
"public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }",
"public function update($entity);",
"public function update($entity);",
"public function setResource($resource);",
"public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }",
"public function isUpdateResource();",
"public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }",
"public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }",
"public function store($data, Resource $resource);",
"public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }",
"public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }",
"public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }",
"public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }",
"public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }",
"public function update(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)
{
//
} | {
"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 |
Add purchase order line | public function addPurchaseOrderLine( PurchaseOrderLine $purchaseOrderLine )
{
if ( ! isset( $this->purchase_order_lines ) )
{
$this->purchase_order_lines = [];
}
$this->purchase_order_lines[] = $purchaseOrderLine;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function AddLine(cCartLine_base $oLine) {\n\t$this->AddItem($oLine);\n\t$this->nTotSale += $oLine->Price_forQty();\n\t$this->nTotShItm += $oLine->SH_perItem_forQty();\n\t$this->nMaxShPkg = $oLine->SH_perPkg_Larger($this->nMaxShPkg);\n }",
"public function addLine($quantity, $productName, $price, $type, $duty)\n {\n $line = new Line($quantity, $productName, $price, $type, $duty);\n $this->lines[] = $line;\n\n //in contemporanea aggiungo progressivamente il netto, le tasse e il totale \n $this->net = $this->addNet($line->getNet());\n $this->addTaxes($line->getTaxes());\n $this->addTotal($line->getTotal());\n \n //Ritorna la linea che mi servirà per la stampa\n return $line;\n }",
"public function addTransactionLineItem($order_id, $sku = '', $product_name = '', $category = '', $unit_price = 0, $quantity = 0) {\n\t\t\n\t\tif ( empty( $this->commerce_event ) ) {\n\t\t\t$this->addTransaction('none set');\n\t\t}\n\t\t\n\t\t$li = array();\n\t\t$li['li_order_id'] = $order_id ;\n\t\t$li['li_sku'] = $sku ;\n\t\t$li['li_product_name'] = $product_name ;\n\t\t$li['li_category'] = $category ;\n\t\t$li['li_unit_price'] = $unit_price ;\n\t\t$li['li_quantity'] = $quantity ;\n\t\t\n\t\t$items = $this->commerce_event->get( 'ct_line_items' );\n\t\t$items[] = $li;\n\t\t$this->commerce_event->set( 'ct_line_items', $items );\n\t}",
"public function addOrder(Order $order);",
"public function testAddLineItem()\n {\n $this->addItem();\n $this->addItem();\n\n $this->laracart->addLine(\n 'itemID',\n 'Testing Item',\n 1,\n '1', [\n 'b_test' => 'option_1',\n 'a_test' => 'option_2',\n ]\n );\n\n $this->assertEquals(2, $this->laracart->count(false));\n $this->assertEquals(3, $this->laracart->count());\n }",
"function uc_order_pane_line_items_add($form, &$form_state) {\n $order = &$form_state['order'];\n $type = $form_state['values']['li_type_select'];\n\n uc_order_line_item_add($order->order_id, $type, _uc_line_item_data($type, 'title'), 0);\n $order->line_items = uc_order_load_line_items($order);\n\n $form_state['rebuild'] = TRUE;\n}",
"public function ProccessQbPoLine($QbPurchaseOrderLine)\r\n {\r\n try {\r\n $QbItemId = $QbPurchaseOrderLine->ItemBasedExpenseLineDetail->ItemRef;\r\n $Qty = $QbPurchaseOrderLine->ItemBasedExpenseLineDetail->Qty;\r\n } catch (\\Exception $e) {\r\n }\r\n $QbItems = $this->where('qbitemid', $QbItemId)->get();\r\n if(count($QbItems) > 0){\r\n // IF IT IS IN THE LOCAL INVENTORY ADD THE QTY IN ORDERS\r\n $QbItem = $QbItems[0];\r\n $QtyInOrders = $QbItem->inpurchaseorders + $Qty;\r\n $this->where('id', $QbItem->id)->update(['inpurchaseorders' => $QtyInOrders]);\r\n }\r\n }",
"public function addToCart($product, $qtt){\n $this->lines[] = [\"product\" => $product, \"qtt\" => $qtt];\n }",
"public function actionCreate()\n {\n $model = new Purchaseorder();\n\n if ($model->load(Yii::$app->request->post())) {\n $prodid = Yii::$app->request->post('product_id');\n $qty = Yii::$app->request->post('qty');\n $price = Yii::$app->request->post('price');\n $lineamt = Yii::$app->request->post('line_amount');\n $model->purchase_date = strtotime($model->purchase_date);\n $model->status = 1;\n $model->created_by = Yii::$app->user->identity->id;\n if($model->save()){\n if(count($prodid)>0){\n for($i=0;$i<=count($prodid)-1;$i++){\n $modelline = new \\backend\\models\\Purchaseorderline();\n $modelline->purchase_order_id = $model->id;\n $modelline->product_id = $prodid[$i];\n $modelline->qty = $qty[$i];\n $modelline->price = $price[$i];\n $modelline->line_amount=$lineamt[$i];\n $modelline->save(false);\n }\n }\n $this->updateAmount($model->id);\n return $this->redirect(['update', 'id' => $model->id]);\n }\n \n }\n\n return $this->render('create', [\n 'model' => $model,\n 'runno' => $model::getLastNo(),\n ]);\n }",
"protected function _newLine($item)\n {\n if (!$item->getId()) {\n $this->setCanSendRequest(false);\n\n return false;\n }\n\n $this->_addGwItemsAmount($item);\n if ($this->isProductCalculated($item)) {\n return false;\n }\n $product = $this->_getProductByProductId($this->_retrieveProductIdFromQuoteItem($item));\n $taxClass = $this->_getTaxClassCodeByProduct($product);\n $price = $item->getBaseRowTotal();\n if ($this->_getTaxDataHelper()->applyTaxAfterDiscount($item->getStoreId())) {\n $price -= $item->getBaseDiscountAmount();\n }\n\n $lineNumber = $this->_getNewLineCode();\n\n $line = $this->_getNewDocumentRequestLineObject();\n $line->setLineCode($lineNumber);\n $line->setItemCode(\n $this->_getCalculationHelper()->getItemCode(\n $this->_getProductForItemCode($item),\n $item->getStoreId()\n )\n );\n $line->setNumberOfItems($item->getTotalQty());\n $line->setlineAmount($price);\n $line->setItemDescription($item->getName());\n $discounted = (float)$item->getDiscountAmount()\n && $this->_getTaxDataHelper()\n ->applyTaxAfterDiscount($item->getStoreId())\n ? 'true'\n : 'false';\n\n $line->setDiscounted($discounted);\n\n if ($this->_getTaxDataHelper()->priceIncludesTax($item->getStoreId())) {\n $line->setTaxIncluded('true');\n }\n\n if ($taxClass) {\n $line->setAvalaraGoodsAndServicesType($taxClass);\n }\n\n $metadata = null;\n $ref1Value = $this->_getRefValueByProductAndNumber($product, 1, $item->getStoreId());\n if ($ref1Value) {\n $metadata['ref1'] = $ref1Value;\n }\n $ref2Value = $this->_getRefValueByProductAndNumber($product, 2, $item->getStoreId());\n if ($ref2Value) {\n $metadata['ref2'] = $ref2Value;\n }\n if ($metadata) {\n $line->setMetadata($metadata);\n }\n\n $this->_lines[$lineNumber] = $line;\n $this->_lineToLineId[$lineNumber] = $item->getId();\n\n return $lineNumber;\n }",
"public function addLineItem(LineItemInterface $line_item);",
"function carton_add_order_item( $order_id, $item ) {\n\tglobal $wpdb;\n\n\t$order_id = absint( $order_id );\n\n\tif ( ! $order_id )\n\t\treturn false;\n\n\t$defaults = array(\n\t\t'order_item_name' \t\t=> '',\n\t\t'order_item_type' \t\t=> 'line_item',\n\t);\n\n\t$item = wp_parse_args( $item, $defaults );\n\n\t$wpdb->insert(\n\t\t$wpdb->prefix . \"carton_order_items\",\n\t\tarray(\n\t\t\t'order_item_name' \t\t=> $item['order_item_name'],\n\t\t\t'order_item_type' \t\t=> $item['order_item_type'],\n\t\t\t'order_id'\t\t\t\t=> $order_id\n\t\t),\n\t\tarray(\n\t\t\t'%s', '%s', '%d'\n\t\t)\n\t);\n\n\t$item_id = absint( $wpdb->insert_id );\n\n\tdo_action( 'carton_new_order_item', $item_id, $item, $order_id );\n\n\treturn $item_id;\n}",
"public function add_order()\n {\n if (isset($_SESSION['cart'])) {\n $total_cost = 0;\n $quantity = 0;\n $quaty = \"\";\n foreach ($_SESSION['cart'] as $id => $quaty) {\n $product = Data::find_by_id($id);\n $cost = $product->price * $quaty; // $quaty is quantity.\n $quantity += $quaty;\n $total_cost = $total_cost + $cost;\n }\n if ($quaty > 0) {\n echo \"<p class='text-light pl-2 pr-2 pb-0 m-0'> $quantity </p>\";\n }\n } else {\n echo \"<p class='text-light pl-2 pr-2 pb-0 m-0'> Empty</p>\";\n }\n }",
"public function addServiceLine( $product_id = null, $combination_id = null, $quantity = 1.0, $params = [] )\n {\n // Do the Mambo!\n $line_type = array_key_exists('line_type', $params) \n ? $params['line_type'] \n : 'service';\n\n // Customer\n $customer = $this->customer;\n $salesrep = $customer->salesrep;\n \n // Currency\n $currency = $this->document_currency;\n\n // Product\n // Consider \"not coded products\" only\n\n $reference = array_key_exists('reference', $params) \n ? $params['reference'] \n : '';\n\n $name = array_key_exists('name', $params) \n ? $params['name'] \n : $line_type;\n\n $cost_price = array_key_exists('cost_price', $params) \n ? $params['cost_price'] \n : 0.0;\n\n // Tax\n $tax_id = array_key_exists('tax_id', $params) \n ? $params['tax_id'] \n : Configuration::get('DEF_TAX');\n $tax = Tax::findOrFail($tax_id);\n $taxing_address = $this->taxingaddress;\n $tax_percent = $tax->getTaxPercent( $taxing_address );\n\n $sales_equalization = array_key_exists('sales_equalization', $params) \n ? $params['sales_equalization'] \n : 0;\n\n // Price Policy\n $pricetaxPolicy = array_key_exists('prices_entered_with_tax', $params) \n ? $params['prices_entered_with_tax'] \n : Configuration::get('PRICES_ENTERED_WITH_TAX');\n\n // Service Price\n $price = new Price($params['unit_customer_final_price'], $pricetaxPolicy, $currency);\n $price->applyTaxPercent( $tax_percent );\n// if ( $price->currency->id != $currency->id ) {\n// $price = $price->convert( $currency );\n// }\n $unit_price = $price->getPrice();\n\n // Calculate price per $customer_id now!\n // $customer_price = $product->getPriceByCustomer( $customer, $quantity, $currency );\n $customer_price = clone $price;\n\n // Is there a Price for this Customer?\n if (!$customer_price) return null; // Product not allowed for this Customer\n\n // $customer_price->applyTaxPercent( $tax_percent );\n $unit_customer_price = $customer_price->getPrice();\n\n // Customer Final Price\n if ( array_key_exists('prices_entered_with_tax', $params) && array_key_exists('unit_customer_final_price', $params) )\n {\n $unit_customer_final_price = new Price( $params['unit_customer_final_price'], $pricetaxPolicy, $currency );\n\n $unit_customer_final_price->applyTaxPercent( $tax_percent );\n\n } else {\n\n $unit_customer_final_price = clone $customer_price;\n }\n\n // Discount\n $discount_percent = array_key_exists('discount_percent', $params) \n ? $params['discount_percent'] \n : 0.0;\n\n // Final Price\n $unit_final_price = clone $unit_customer_final_price;\n if ( $discount_percent ) \n $unit_final_price->applyDiscountPercent( $discount_percent );\n\n // Sales Rep\n $sales_rep_id = array_key_exists('sales_rep_id', $params) \n ? $params['sales_rep_id'] \n : optional($salesrep)->id;\n \n $commission_percent = array_key_exists('sales_rep_id', $params) && array_key_exists('commission_percent', $params) \n ? $params['commission_percent'] \n : 0.0;\n\n\n\n // Misc\n $measure_unit_id = array_key_exists('measure_unit_id', $params) \n ? $params['measure_unit_id'] \n : Configuration::get('DEF_MEASURE_UNIT_FOR_PRODUCTS');\n\n $line_sort_order = array_key_exists('line_sort_order', $params) \n ? $params['line_sort_order'] \n : $this->getNextLineSortOrder();\n\n $notes = array_key_exists('notes', $params) \n ? $params['notes'] \n : '';\n\n\n // Build OrderLine Object\n $data = [\n 'line_sort_order' => $line_sort_order,\n 'line_type' => $line_type,\n 'product_id' => $product_id,\n 'combination_id' => $combination_id,\n 'reference' => $reference,\n 'name' => $name,\n 'quantity' => $quantity,\n 'measure_unit_id' => $measure_unit_id,\n\n 'prices_entered_with_tax' => $pricetaxPolicy,\n \n 'cost_price' => $cost_price,\n 'unit_price' => $unit_price,\n 'unit_customer_price' => $unit_customer_price,\n 'unit_customer_final_price' => $unit_customer_final_price->getPrice(),\n 'unit_customer_final_price_tax_inc' => $unit_customer_final_price->getPriceWithTax(),\n 'unit_final_price' => $unit_final_price->getPrice(),\n 'unit_final_price_tax_inc' => $unit_final_price->getPriceWithTax(), \n 'sales_equalization' => $sales_equalization,\n 'discount_percent' => $discount_percent,\n 'discount_amount_tax_incl' => 0.0, // floatval( $request->input('discount_amount_tax_incl', 0.0) ),\n 'discount_amount_tax_excl' => 0.0, // floatval( $request->input('discount_amount_tax_excl', 0.0) ),\n\n 'total_tax_incl' => $quantity * $unit_final_price->getPriceWithTax(),\n 'total_tax_excl' => $quantity * $unit_final_price->getPrice(),\n\n 'tax_percent' => $tax_percent,\n 'commission_percent' => $commission_percent,\n 'notes' => $notes,\n 'locked' => 0,\n \n // 'customer_order_id',\n 'tax_id' => $tax->id,\n 'sales_rep_id' => $sales_rep_id,\n ];\n\n\n // Finishing touches\n $lineClass = $this->getClassName().'Line';\n $document_line = ( new $lineClass() )->create( $data );\n\n $this->lines()->save($document_line);\n\n\n // Let's deal with taxes\n $product = new Product(['tax_id' => $tax->id]);\n $product->sales_equalization = $sales_equalization;\n $rules = $product->getTaxRules( $this->taxingaddress, $this->customer );\n\n $document_line->applyTaxRules( $rules );\n\n\n // Now, update Document Totals\n $this->makeTotals();\n\n\n // Good boy, bye then\n return $document_line;\n }",
"private function _createOrderLines($virtuemart_order_id, $cart)\n {\n $_orderItems = $this->getTable('order_items');\n\n foreach ($cart->products as $priceKey => $product) {\n\n if (!empty($product->customProductData)) {\n $_orderItems->product_attribute = vmJsApi::safe_json_encode($product->customProductData);\n } else {\n $_orderItems->product_attribute = '';\n }\n\n\n $_orderItems->virtuemart_order_item_id = null;\n $_orderItems->virtuemart_order_id = $virtuemart_order_id;\n\n $_orderItems->virtuemart_vendor_id = $product->virtuemart_vendor_id;\n $_orderItems->virtuemart_product_id = $product->virtuemart_product_id;\n $_orderItems->order_item_sku = $product->product_sku;\n $_orderItems->order_item_name = $product->product_name;\n $_orderItems->product_quantity = $product->quantity;\n $_orderItems->product_item_price = $product->allPrices[$product->selectedPrice]['basePriceVariant'];\n $_orderItems->product_basePriceWithTax = $product->allPrices[$product->selectedPrice]['basePriceWithTax'];\n\n //$_orderItems->product_tax = $_cart->pricesUnformatted[$priceKey]['subtotal_tax_amount'];\n $_orderItems->product_tax = $product->allPrices[$product->selectedPrice]['taxAmount'];\n $_orderItems->product_final_price = $product->allPrices[$product->selectedPrice]['salesPrice'];\n $_orderItems->product_subtotal_discount = $product->allPrices[$product->selectedPrice]['subtotal_discount'];\n $_orderItems->product_subtotal_with_tax = $product->allPrices[$product->selectedPrice]['subtotal_with_tax'];\n $_orderItems->product_priceWithoutTax = $product->allPrices[$product->selectedPrice]['priceWithoutTax'];\n $_orderItems->product_discountedPriceWithoutTax = $product->allPrices[$product->selectedPrice]['discountedPriceWithoutTax'];\n $_orderItems->order_status = 'P';\n\n if (!$_orderItems->check()) {\n return false;\n }\n //The check may set here a wrong vendorId, we replace it again with the right one.\n $_orderItems->virtuemart_vendor_id = $product->virtuemart_vendor_id;\n\n // Save the record to the database\n if (!$_orderItems->store()) {\n return false;\n }\n\n $product->virtuemart_order_item_id = $_orderItems->virtuemart_order_item_id;\n\n $this->handleStockAfterStatusChangedPerProduct($_orderItems->order_status, 'N', $_orderItems, $_orderItems->product_quantity);\n }\n\n return true;\n }",
"public function insertOrderLineItems($value,$line_item, $mainOrderId)\n {\n //list of items\n $lineItem_arr['order_id'] = $mainOrderId;\n $lineItem_arr['line_item_id'] = $line_item->id;\n $lineItem_arr['variant_id'] = $line_item->variant_id;\n $lineItem_arr['title'] = $line_item->title;\n $lineItem_arr['quantity'] = $line_item->quantity;\n $lineItem_arr['sku'] = $line_item->sku;\n $lineItem_arr['variant_title'] = $line_item->variant_title;\n $lineItem_arr['vendor'] = $line_item->vendor;\n $lineItem_arr['fulfillment_service'] = $line_item->fulfillment_service;\n $lineItem_arr['product_id'] = $line_item->product_id;\n $lineItem_arr['price'] = $line_item->price;\n $lineItem_arr['requires_shipping'] = $line_item->requires_shipping;\n $lineItem_arr['taxable'] = $line_item->taxable;\n\n return OrderLineItem::insertGetId($lineItem_arr);\n\n }",
"public function store(Request $request)\n {\n \n /* Note: please try improving the code below if possible for production */\n //------------------------------------------------------------------------//\n\n\n //Finding the requested item for the order \n $item = Item::findOrFail( request('item_id') );\n \n //Getting the Quanitiy & customer's name\n $qty = request('qty');\n $customer_name = request('customer_name');\n $total = $item->price * $qty; //Calculating the total\n \n // Checks if the order is already paid for or not\n if(request('paid') == null) $paid=0;\n else $paid = 1;\n\n //getting the first Order line object (if any)\n $first = Order_line::orderBy('id', 'desc')->first();\n \n //Checking whether our table is empty or has record \n if($first == null) $order_line = 1;\n else $order_line = $first->id + 1 ; \n\n //Inserting the new order to the database\n Order::create([\n \"customer_name\" => $customer_name,\n \"price\" => $item->price,\n \"order_lines_id\" => $order_line,\n \"paid\" => $paid\n ]);\n\n //Retrevieng the last order for the order ID\n $order_id = Order::orderBy('id', 'desc')->first()->id;\n\n //Inserting the orderLine\n Order_line::create([\n 'id' => $order_line,\n 'order_id' => $order_id,\n 'item_id' => $item->id,\n 'price' => $total,\n 'qty' => $qty\n ]);\n\n // Returning back to the index page\n return redirect('orders');\n }",
"private function inserOrderproduct($orderId){\n\t\t$this->load->library(\"cart\");\n\t\tforeach($this->cart->contents() as $items){\n\t\t\t$object=array(\n\t\t\t\t'OrdId' => $orderId,\n\t\t\t\t'ItemId' => $items['id'],\n\t\t\t\t'ItemName' => $items['name'],\n\t\t\t\t'ItemEdition' => $items['options']['BookEdition'],\n\t\t\t\t'ItemAuther' => $items['options']['Author'],\n\t\t\t\t'ItemQuantity' => $items['qty'],\n\t\t\t\t'ItemRetailPrice' => $items['options']['RetailPrice'],\n\t\t\t\t'ItemSellingPrice' => $items['price'],\n\t\t\t\t'ItemDiscount' => $items['options']['Discount']\n\t\t\t);\n\t\t\t$this->db->insert('tbl_order_lineitems', $object);\n\t\t}\n\t}",
"private function shippingOrderLine($lineNumber, $sku, $unitOfMeasurement, $amount, $shipDateTime, $carrierName, $carrierMethod, $trackingNumber, $trackingURL){\r\n\r\n return \"<ns2:orderLine>\r\n<ns2:lineNumber>$lineNumber</ns2:lineNumber>\r\n<ns2:orderLineStatuses>\r\n<ns2:orderLineStatus>\r\n<ns2:status>Shipped</ns2:status>\r\n<ns2:statusQuantity>\r\n<ns2:unitOfMeasurement>$unitOfMeasurement</ns2:unitOfMeasurement>\r\n<ns2:amount>$amount</ns2:amount>\r\n</ns2:statusQuantity>\r\n<ns2:trackingInfo>\r\n<ns2:shipDateTime>$shipDateTime</ns2:shipDateTime>\r\n<ns2:carrierName>\r\n<ns2:carrier>$carrierName</ns2:carrier>\r\n</ns2:carrierName>\r\n<ns2:methodCode>$carrierMethod</ns2:methodCode>\r\n<ns2:trackingNumber>$trackingNumber</ns2:trackingNumber>\r\n<ns2:trackingURL>$trackingURL</ns2:trackingURL>\r\n</ns2:trackingInfo>\r\n</ns2:orderLineStatus>\r\n</ns2:orderLineStatuses>\r\n</ns2:orderLine>\";\r\n }",
"protected function addItem(Item $item)\n {\n if (! array_key_exists($item->productCode(), $this->orderLines)) {\n $this->orderLines[$item->productCode()] = new OrderLine();\n }\n\n $this->orderLines[$item->productCode()]->updateLine($item);\n }",
"public function addItem(tx_ptgsashop_orderWrapper $itemObj, $id=0) {\n \n parent::addItem($itemObj, $id);\n \n }",
"private function setPurchaseNote() {\n $this->product->set_purchase_note($this->wcData->getPurchaseNote());\n }",
"protected function addLine($data = null, $quantity = null, $price = null) {\n\t\t$productId = null;\n\t\t$product = null;\n\n\t\tif ($data != null) {\n\t\t\t$this->load->model('catalog/product');\n\n\t\t\t$type = 'SalesItemLineDetail';\n\t\t\t$types = array(\n\t\t\t\t'SalesItemLineDetail',\n\t\t\t\t'DescriptionItemLineDetail',\n\t\t\t\t'DescriptionOnlyLineDetail',\n\t\t\t\t'CommissionLineDetail');\n\n\t\t\tif (isset($data['detail_type']) && !empty($data['detail_type'])) {\n\t\t\t\tif (in_array($data['detail_type'], $types)) {\n\t\t\t\t\t$type = $data['detail_type'];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($type == 'SalesItemLineDetail') {\n\t\t\t\tif (is_numeric($data)) {\n\t\t\t\t\t$productId = (int)$productId;\n\t\t\t\t} elseif (is_array($data)) {\n\t\t\t\t\t$productId = (isset($data['product_id'])) ? $data['product_id'] : $productId;\n\t\t\t\t}\n\n\t\t\t\t$product = $this->model_catalog_product->getProduct($productId);\n\n\t\t\t\tif ($product != null) {\n\t\t\t\t\t$price = (empty($price)) ? $product['price'] : $price;\n\t\t\t\t\t$quantity = (empty($quantity)) ? 1 : $quantity;\n\n\t\t\t\t\t$this->lines->add($product, $quantity, array(), $price);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($type == 'DescriptionOnlyLineDetail' || $type == 'DescriptionItemLineDetail') {\n\t\t\t\tif (!empty($data['description']) xor !empty($data['name'])) {\n\t\t\t\t\t$description = (!empty($data['name'])) ? $data['name'] : $data['description'];\n\n\t\t\t\t\tif ($quantity == null && $price == null) {\n\t\t\t\t\t\t// If no price or quantity necessary, create a DescriptionOnly line item\n\t\t\t\t\t\t$this->lines->addDescription($description);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$taxClassId = (isset($data['tax_class_id'])) ? $data['tax_class_id'] : null;\n\t\t\t\t\t\t$tax = (isset($data['tax'])) ? $data['tax'] : 0.0000;\n\t\t\t\t\t\t$this->lines->addDescriptionItem($description, $quantity, $price, $taxClassId, $tax);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($type == 'CommissionLineDetail') {\n\t\t\t\tif (!empty($data['description']) xor !empty($data['name'])) {\n\t\t\t\t\t$description = (!empty($data['name'])) ? $data['name'] : $data['description'];\n\n\t\t\t\t\t$this->lines->addCommission($description, 1, $data);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"protected function _afterAdd(KControllerContext $context)\n {\n $order = $context->result;\n\n // Salesreceipt data\n $salesreceipt = array(\n 'DocNumber' => $order->id,\n 'TxnDate' => date('Y-m-d'),\n 'CustomerRef' => $order->_account_customer_ref,\n 'CustomerMemo' => 'Thank you for your business and have a great day!',\n );\n\n if ($order->payment_method == ComRewardlabsModelEntityOrder::PAYMENT_METHOD_COD)\n {\n // COD payment\n $salesreceipt['DepartmentRef'] = $this->_department_ref; // Angono EC Valle store\n $salesreceipt['DepositToAccountRef'] = $this->_cod_payments_account; // COD payment processor account\n $salesreceipt['transaction_type'] = 'online'; // Customer ordered thru website\n }\n elseif ($order->payment_method == ComRewardlabsModelEntityOrder::PAYMENT_METHOD_DRAGONPAY)\n {\n // Online payment\n $salesreceipt['DepartmentRef'] = $this->_department_ref; // Angono EC Valle store\n $salesreceipt['DepositToAccountRef'] = $this->_online_payments_account; // Online payment processor account\n $salesreceipt['transaction_type'] = 'online'; // Customer ordered thru website\n }\n else\n {\n // Cash (in-store) purchase\n // $user = $this->getObject('user');\n // $employee = $this->getObject('com://site/rewardlabs.model.employeeaccounts')->user_id($user->getId())->fetch();\n \n $salesreceipt['DepartmentRef'] = $this->_department_ref; //$employee->DepartmentRef; // Store branch\n $salesreceipt['DepositToAccountRef'] = $this->_undeposited_account_ref; // Undeposited Funds Account\n $salesreceipt['transaction_type'] = 'offline'; // Order placed via onsite POS\n }\n\n // Shipping address\n $salesreceipt['ShipAddr'] = array(\n 'Line1' => $order->address,\n 'Line2' => $order->city,\n 'Line3' => $order->country\n );\n\n // Line items\n $lines = array();\n\n foreach ($order->getOrderItems() as $orderItem)\n {\n $lines[] = array(\n 'Description' => $orderItem->item_name,\n 'Amount' => ($orderItem->item_price * $orderItem->quantity),\n 'Qty' => $orderItem->quantity,\n 'ItemRef' => $orderItem->ItemRef,\n );\n }\n\n $shipping_cost = $order->shipping_cost;\n\n // Shipping charge line item\n if ($order->shipping_method && $shipping_cost)\n {\n // Delivery charge\n $lines[] = array(\n 'Description' => 'Shipping',\n 'Amount' => $shipping_cost,\n 'Qty' => $orderItem->quantity,\n 'ItemRef' => $this->_shipping_account,\n );\n }\n\n $salesreceipt['lines'] = $lines;\n\n $id = $this->getObject('com://admin/qbsync.service.salesreceipt')->create($salesreceipt);\n $order->SalesReceiptRef = $id;\n $order->save();\n }",
"public function updateLines()\n {\n\n $product = \\App\\Product::with('bomitems')->with('boms')->findOrFail( $this->product_id );\n $bomitem = $product->bomitem();\n $bom = $product->bom();\n\n if (!$bom) return $this;\n\n // Adjust Manufacturing batch size\n $nbt = ceil($this->planned_quantity / $product->manufacturing_batch_size);\n $order_quantity = $nbt * $product->manufacturing_batch_size;\n $this->update(['planned_quantity' => $order_quantity]);\n\n $order = $this;\n\n\n // Order lines\n\n // Destroy Order Lines\n if ($this->productionorderlines()->count())\n foreach( $this->productionorderlines as $line ) {\n $line->delete();\n }\n\n // BOM quantities\n $line_qty = $order_quantity * $bomitem->quantity / $bom->quantity;\n\n foreach( $bom->BOMlines as $line ) {\n \n $line_product = \\App\\Product::with('measureunit')->findOrFail( $line->product_id );\n\n $order_line = \\App\\ProductionOrderLine::create([\n 'type' => 'product',\n 'product_id' => $line_product->id,\n 'reference' => $line_product->reference,\n 'name' => $line_product->name, \n\n// 'base_quantity', \n 'required_quantity' => $line_qty * $line->quantity * (1.0 + $line->scrap/100.0), \n // Assume 1 product == 1 measure unit O_O\n 'measure_unit_id' => $line_product->measure_unit_id,\n// 'warehouse_id'\n ]);\n\n $order->productionorderlines()->save($order_line);\n }\n\n return $order;\n }",
"public function add(SimpleConregPaymentLine $payLine)\n {\n $this->paymentLines[] = $payLine;\n }",
"public function addCommentLine( $product_id = null, $combination_id = null, $quantity = 1.0, $params = [] )\n {\n // Do the Mambo!\n $line_type = array_key_exists('line_type', $params) \n ? $params['line_type'] \n : 'comment';\n\n // Customer\n $customer = $this->customer;\n $salesrep = $customer->salesrep;\n \n // Currency\n $currency = $this->document_currency;\n\n // Product\n // Consider \"not coded products\" only\n\n $reference = array_key_exists('reference', $params) \n ? $params['reference'] \n : '';\n\n $name = array_key_exists('name', $params) \n ? $params['name'] \n : $line_type;\n\n $cost_price = array_key_exists('cost_price', $params) \n ? $params['cost_price'] \n : 0.0;\n\n // Tax\n $tax_id = array_key_exists('tax_id', $params) \n ? $params['tax_id'] \n : Configuration::get('DEF_TAX');\n $tax = Tax::findOrFail($tax_id);\n $taxing_address = $this->taxingaddress;\n $tax_percent = $tax->getTaxPercent( $taxing_address );\n\n $sales_equalization = array_key_exists('sales_equalization', $params) \n ? $params['sales_equalization'] \n : 0;\n\n // Price Policy\n $pricetaxPolicy = array_key_exists('prices_entered_with_tax', $params) \n ? $params['prices_entered_with_tax'] \n : Configuration::get('PRICES_ENTERED_WITH_TAX');\n\n // Service Price\n $price = new Price($params['unit_customer_final_price'], $pricetaxPolicy, $currency);\n $price->applyTaxPercent( $tax_percent );\n// if ( $price->currency->id != $currency->id ) {\n// $price = $price->convert( $currency );\n// }\n $unit_price = $price->getPrice();\n\n // Calculate price per $customer_id now!\n // $customer_price = $product->getPriceByCustomer( $customer, $quantity, $currency );\n $customer_price = clone $price;\n\n // Is there a Price for this Customer?\n if (!$customer_price) return null; // Product not allowed for this Customer\n\n // $customer_price->applyTaxPercent( $tax_percent );\n $unit_customer_price = $customer_price->getPrice();\n\n // Customer Final Price\n if ( array_key_exists('prices_entered_with_tax', $params) && array_key_exists('unit_customer_final_price', $params) )\n {\n $unit_customer_final_price = new Price( $params['unit_customer_final_price'], $pricetaxPolicy, $currency );\n\n $unit_customer_final_price->applyTaxPercent( $tax_percent );\n\n } else {\n\n $unit_customer_final_price = clone $customer_price;\n }\n\n // Discount\n $discount_percent = array_key_exists('discount_percent', $params) \n ? $params['discount_percent'] \n : 0.0;\n\n // Final Price\n $unit_final_price = clone $unit_customer_final_price;\n if ( $discount_percent ) \n $unit_final_price->applyDiscountPercent( $discount_percent );\n\n // Sales Rep\n $sales_rep_id = array_key_exists('sales_rep_id', $params) \n ? $params['sales_rep_id'] \n : optional($salesrep)->id;\n \n $commission_percent = array_key_exists('sales_rep_id', $params) && array_key_exists('commission_percent', $params) \n ? $params['commission_percent'] \n : 0.0;\n\n\n\n // Misc\n $measure_unit_id = array_key_exists('measure_unit_id', $params) \n ? $params['measure_unit_id'] \n : Configuration::get('DEF_MEASURE_UNIT_FOR_PRODUCTS');\n\n $line_sort_order = array_key_exists('line_sort_order', $params) \n ? $params['line_sort_order'] \n : $this->getMaxLineSortOrder() + 10;\n\n $notes = array_key_exists('notes', $params) \n ? $params['notes'] \n : '';\n\n\n // Build OrderLine Object\n $data = [\n 'line_sort_order' => $line_sort_order,\n 'line_type' => $line_type,\n 'product_id' => $product_id,\n 'combination_id' => $combination_id,\n 'reference' => $reference,\n 'name' => $name,\n 'quantity' => $quantity,\n 'measure_unit_id' => $measure_unit_id,\n\n 'prices_entered_with_tax' => $pricetaxPolicy,\n \n 'cost_price' => $cost_price,\n 'unit_price' => $unit_price,\n 'unit_customer_price' => $unit_customer_price,\n 'unit_customer_final_price' => $unit_customer_final_price->getPrice(),\n 'unit_customer_final_price_tax_inc' => $unit_customer_final_price->getPriceWithTax(),\n 'unit_final_price' => $unit_final_price->getPrice(),\n 'unit_final_price_tax_inc' => $unit_final_price->getPriceWithTax(), \n 'sales_equalization' => $sales_equalization,\n 'discount_percent' => $discount_percent,\n 'discount_amount_tax_incl' => 0.0, // floatval( $request->input('discount_amount_tax_incl', 0.0) ),\n 'discount_amount_tax_excl' => 0.0, // floatval( $request->input('discount_amount_tax_excl', 0.0) ),\n\n 'total_tax_incl' => $quantity * $unit_final_price->getPriceWithTax(),\n 'total_tax_excl' => $quantity * $unit_final_price->getPrice(),\n\n 'tax_percent' => $tax_percent,\n 'commission_percent' => $commission_percent,\n 'notes' => $notes,\n 'locked' => 0,\n \n // 'customer_order_id',\n 'tax_id' => $tax->id,\n 'sales_rep_id' => $sales_rep_id,\n ];\n\n\n // Finishing touches\n $lineClass = $this->getClassName().'Line';\n $document_line = ( new $lineClass() )->create( $data );\n\n $this->lines()->save($document_line);\n\n\n // Good boy, bye then\n return $document_line;\n }",
"function uc_order_edit_products_add_blank($form, &$form_state) {\n $form_state['refresh_products'] = TRUE;\n $form_state['rebuild'] = TRUE;\n\n $order = $form_state['build_info']['args'][0];\n\n $product = new stdClass();\n $product->qty = 1;\n $product->order_id = $order->order_id;\n uc_order_product_save($order->order_id, $product);\n\n $order->products[] = $product;\n\n uc_order_log_changes($order->order_id, array('add' => t('Added new product line to order.')));\n}",
"private function SaveOrderLine(OrderLine $orderLine) {\n\t\t\t$sql = \"INSERT INTO $this->m_orderLineTableName (m_orderId, m_productId) VALUES(?,?)\";\n\t\t\n\t\t\t$stmt = $this->m_dbConnection->Prepare($sql);\n\t\t\t\n\t\t\t$stmt->bind_param(\"ii\", $orderLine->m_orderId, $orderLine->m_productId);\n\t\t\t\n\t\t\tif ($stmt === FALSE) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t\t$stmt->execute();\n\t\t\t\n\t\t\t//sätter indexet i objektet (används dock inte)\n\t\t\t$orderLine->m_orderLineId = $stmt->insert_id;\n\t\t\t\n\t\t\t$stmt->close();\n\t\t\t\n\t\t\treturn $orderLine;\n\t\t}",
"public function addOrder(IncidentOrder $order)\n {\n $this->orders[] = $order;\n }",
"public function add_sales_order() {\n\t\t$values=array(\"customer_name\"=>$_POST['customer_name'],\"product_id\"=>$_POST['inv_id'],\"sell_price\"=>$_POST['selling_price'],\"sell_date\"=>$_POST['selling_date'],\"prod_qty\"=>$_POST['selling_qty'],\"comments\"=>$_POST['comments']);\n\t\tif($this->insert(\"sales_order\",$values)) {\t\t\t\t\t\t\n\t\t\t$result=$this->runQuery('getAll','select max(id) as so_id from sales_order');\n\t\t\techo '{\"salesOrderList\":{\"updateFlag\":false,\"item\":'.json_encode($result).'}}';\n\t\t}\n\t\telse\n\t\t\techo 'Error while inserting sales tbl';\n\t}",
"public function insertOrderDetails($value,$line_item, $mainOrderId)\n {\n //main order\n $order_list_arr['name'] = $value->name;\n $order_list_arr['shpoify_order_id'] = $value->id;\n $order_list_arr['line_item_id'] = $line_item->id;\n $order_list_arr['order_number'] = $value->order_number;\n $order_list_arr['customer_name'] = $value->billing_address->name;\n $order_list_arr['app_id'] = $value->app_id;\n $order_list_arr['checkout_id'] = $value->checkout_id;\n $order_list_arr['token'] = $value->token;\n $order_list_arr['gateway'] = $value->gateway;\n $order_list_arr['total_price'] = $value->total_price;\n $order_list_arr['subtotal_price'] = $value->subtotal_price;\n $order_list_arr['currency'] = $value->currency;\n $order_list_arr['cart_token'] = $value->cart_token;\n $order_list_arr['checkout_token'] = $value->checkout_token;\n $order_list_arr['order_status_url'] = $value->order_status_url;\n\n return OrderDetails::insertGetId($order_list_arr);\n\n }",
"public function addOrder(Order $order) {\n $this->orders->add($order);\n }",
"function campaignEcommAddOrder($order) {\n $params = array();\n $params[\"order\"] = $order;\n return $this->callServer(\"campaignEcommAddOrder\", $params);\n }",
"private function addLineItemsToInvoice($data){\n $lineItems = [];\n $counter = 1;\n foreach($data as $lineData) {\n $lineItem = [];\n $lineItem['LineNum'] = $counter;\n $lineItem['Description'] = IndexSanityCheckHelper::indexSanityCheck('description', $lineData);\n\n if (array_key_exists('item_id', $lineData)) {\n $lineItem['Amount'] = IndexSanityCheckHelper::indexSanityCheck('amount', $lineData);\n $lineItem['DetailType'] = 'SalesItemLineDetail';\n $lineItem['SalesItemLineDetail'] = [];\n $lineItem['SalesItemLineDetail']['Qty'] = IndexSanityCheckHelper::indexSanityCheck('quantity', $lineData);\n $lineItem['SalesItemLineDetail']['UnitPrice'] = IndexSanityCheckHelper::indexSanityCheck('unit_amount', $lineData);\n $lineItem['SalesItemLineDetail']['ItemRef']['value'] = IndexSanityCheckHelper::indexSanityCheck('item_id', $lineData);\n $lineItem['SalesItemLineDetail']['TaxCodeRef']['value'] = IndexSanityCheckHelper::indexSanityCheck('tax_id', $lineData);\n $lineItem['SalesItemLineDetail']['DiscountRate'] = IndexSanityCheckHelper::indexSanityCheck('discount_rate', $lineData);\n $lineItem['SalesItemLineDetail']['TaxInclusiveAmt'] = IndexSanityCheckHelper::indexSanityCheck('tax_inclusive_amount', $lineData);\n } else {\n $lineItem['Amount'] = IndexSanityCheckHelper::indexSanityCheck('amount', $lineData);\n $lineItem['DetailType'] = 'SalesItemLineDetail';\n $lineItem['SalesItemLineDetail'] = [];\n $lineItem['SalesItemLineDetail']['Qty'] = IndexSanityCheckHelper::indexSanityCheck('quantity', $lineData);\n $lineItem['SalesItemLineDetail']['UnitPrice'] = IndexSanityCheckHelper::indexSanityCheck('unit_amount', $lineData);\n $lineItem['SalesItemLineDetail']['TaxCodeRef']['value'] = IndexSanityCheckHelper::indexSanityCheck('tax_id', $lineData);\n $lineItem['SalesItemLineDetail']['DiscountRate'] = IndexSanityCheckHelper::indexSanityCheck('discount_rate', $lineData);\n $lineItem['SalesItemLineDetail']['TaxInclusiveAmt'] = IndexSanityCheckHelper::indexSanityCheck('tax_inclusive_amount', $lineData);\n }\n $counter++;\n array_push($lineItems, $lineItem);\n }\n if ($this->getDiscountRate()) {\n if ($this->getDiscountRate() > 0) {\n $discountLineItem = [];\n $discountLineItem['LineNum'] = $counter;\n $discountLineItem['Description'] = '';\n $discountLineItem['Amount'] = $this->getDiscountAmount();\n $discountLineItem['DetailType'] = 'DiscountLineDetail';\n $discountLineItem['DiscountLineDetail']['PercentBased'] = true;\n $discountLineItem['DiscountLineDetail']['DiscountPercent'] = $this->getDiscountRate();\n array_push($lineItems, $discountLineItem);\n }\n }\n else if ($this->getDiscountAmount()) {\n if ($this->getDiscountAmount() > 0) {\n $discountLineItem = [];\n $discountLineItem['LineNum'] = $counter;\n $discountLineItem['Description'] = '';\n $discountLineItem['Amount'] = $this->getDiscountAmount();\n $discountLineItem['DetailType'] = 'DiscountLineDetail';\n $discountLineItem['DiscountLineDetail']['PercentBased'] = false;\n array_push($lineItems, $discountLineItem);\n }\n }\n return $lineItems;\n }",
"public function newLine()\n {\n\n $stock = $this->getStock();\n $randomIndexStock = mt_rand(0, (count($stock)-1));\n $this->line = array_values(array_slice($stock, $randomIndexStock, 1, true));\n unset($stock[$randomIndexStock]);\n $this->stock = array_values($stock);\n }",
"public function add()\n {\n echo '客户需求添加一个新需求' . PHP_EOL;\n }",
"function addDetailsLine($order_id, $orderDetails, $conn)\n {\n // return the id number of the last item inserted.\n\n mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT);\n\n\n $stmt = $conn->prepare(\"INSERT INTO mfqgkhncw3r34ada.order_details (orders_id, products_id, QUANTITY, CURRENT_PRICE, CURRENT_DESCRIPTION) VALUES (?,?,?,?,?)\");\n\n if (!$stmt) {\n return -1;\n } else {\n $product_id = $orderDetails->getProduct_id();\n $quantity = $orderDetails->getQuantity();\n $price = $orderDetails->getCurrent_price();\n $description = $orderDetails->getCurrent_description();\n\n $stmt->bind_param(\"iiids\", $order_id, $product_id, $quantity, $price, $description);\n\n $stmt->execute();\n\n if ($stmt->affected_rows > 0) {\n // success\n return $conn->insert_id;\n } else {\n // failed\n return false;\n }\n }\n }",
"protected function _addStoreCreditsLine()\n {\n $storeCredits = (float) $this->_order->getBaseCustomerBalanceAmount();\n\n // Check if there are Aheadworks Store Credits used\n if (Mage::helper('core')->isModuleEnabled('AW_Storecredit') && is_array($this->_order->getAwStorecredit()))\n {\n $storeCredits = 0;\n foreach($this->_order->getAwStorecredit() as $awStoreCredit)\n {\n $storeCredits += (float) $awStoreCredit->getStorecreditAmount();\n }\n }\n\n if (!empty($storeCredits)) {\n $storeCreditsLine = array(\n 'articleDescription' => 'Store Credits',\n 'articleId' => 'STORCRED',\n 'unitPrice' => round(($storeCredits * -1.00) * 100, 0), //negative value\n 'vatCategory' => 4,\n 'quantity' => 1,\n );\n \n return $storeCreditsLine;\n }\n return false;\n }",
"public function getOrderline() {\n return $this->orderline;\n}",
"public function addOrder($order){\n $this->collection[] = $order;\n }",
"protected function addLine($line)\n {\n $this->lines[] = $line;\n }",
"public function makePurchase() {;\n $this->setTotalPurchases($this->getTotalPurchases()+1);\n $this->setTotalAllAccess($this->getTotalAllAccess()+$this->getTotalAccess());\n $this->setTotalAccess(0);\n }",
"function add_item_fields( $order ) {\n\t\t\n\t\t$line_items = '';\n\t\t\n\t\t// Cart Contents\n\t\t$item_loop = 0;\n\t\tif (sizeof($order->get_items())>0) {\n\t\t\tforeach ($order->get_items() as $item) {\n\t\t\t\t\n\t\t\t\tif ($item['qty']){\n\t\t\t\t\t$item_loop++;\n\t\t\t\t\t$product = $order->get_product_from_item($item);\n\t\t\t\t\t\n\t\t\t\t\t$item_id = '';\n\t\t\t\t\tif ($product->get_sku()) { \n\t\t\t\t\t\t$item_id = $product->get_sku();\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$item_id = $product->id;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$item_name \t= $this->get_item_name( $item['name'] );\n\t\n\t\t\t\t\t$item_meta \t= new WC_Order_Item_Meta( $item['item_meta'] );\n\t\t\t\t\t$item_desc \t= $item_meta->display( true, true );\n\t\t\t\t\t$item_desc \t= $this->get_item_name( $item_desc, 255);\n\t\t\t\t\t\n\t\t\t\t\t$item_qty \t\t= $item['qty'];\n\t\t\t\t\t$item_amount \t= $order->get_item_total( $item, false );\n\t\t\t\t\t$item_tax \t\t= 'NO';\n\t\t\t\t\t\n\t\t\t\t\t$this->add_item_field( $item_id, $item_name, $item_desc, $item_qty, $item_amount, $item_tax );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $line_items;\n\t}",
"public function addItem($order_id)\n\t{\n\n\n\t\t$order = Order::where('id',$order_id)->first();\n\t\t\n\t\t$product = Product::where('id',Input::get('id'))->first();\n\t\t\n\t\t$item = array(\n\t\t\t\t\t'order_id' => $order_id,\n\t\t\t\t\t'product_id' => Input::get('id'),\n\t\t\t\t\t'quantity' => Input::get('quantity'),\n\t\t\t\t\t'name' => $product['name'],\n\t\t\t\t\t'price' => $product['price'],\n\t\t\t\t\t'cost' => $product['cost']\n\n\t\t\t\t);\n\n\t\t$order_item = OrderItem::create($item);\n\t\t\t$order->sync();\n\t\treturn $order_id;\n\t}",
"public static function createWithLines($data = [])\n {\n $fields = [ 'created_via', 'status',\n 'product_id', 'planned_quantity', 'due_date', \n 'work_center_id', 'warehouse_id', 'production_sheet_id', 'notes'];\n\n $product = \\App\\Product::with('bomitems')->with('boms')->findOrFail( $data['product_id'] );\n $bomitem = $product->bomitem();\n $bom = $product->bom();\n\n // if (!$bom) return NULL;\n\n // Adjust Manufacturing batch size\n $nbt = ceil($data['planned_quantity'] / $product->manufacturing_batch_size);\n $order_quantity = $nbt * $product->manufacturing_batch_size;\n\n $order = \\App\\ProductionOrder::create([\n 'created_via' => $data['created_via'] ?? 'manual',\n 'status' => $data['status'] ?? 'released',\n\n 'product_id' => $product->id,\n 'product_reference' => $product->reference,\n 'product_name' => $product->name,\n\n 'planned_quantity' => $order_quantity,\n 'product_bom_id' => $bom->id ?? 0,\n\n 'due_date' => $data['due_date'],\n 'notes' => $data['notes'],\n\n 'work_center_id' => $data['work_center_id'] ?? $product->work_center_id,\n// 'warehouse_id' => '',\n 'production_sheet_id' => $data['production_sheet_id'],\n ]);\n\n\n // Order lines\n if ( !$bomitem ) return $order;\n\n // BOM quantities\n $line_qty = $order_quantity * $bomitem->quantity / $bom->quantity;\n\n foreach( $bom->BOMlines as $line ) {\n \n $line_product = \\App\\Product::with('measureunit')->findOrFail( $line->product_id );\n\n $order_line = \\App\\ProductionOrderLine::create([\n 'type' => 'product',\n 'product_id' => $line_product->id,\n 'reference' => $line_product->reference,\n 'name' => $line_product->name, \n\n// 'base_quantity', \n 'required_quantity' => $line_qty * $line->quantity * (1.0 + $line->scrap/100.0), \n // Assume 1 product == 1 measure unit O_O\n 'measure_unit_id' => $line_product->measure_unit_id,\n// 'warehouse_id'\n ]);\n\n $order->productionorderlines()->save($order_line);\n }\n\n return $order;\n }",
"public static function onSaleOrderAdd($orderId)\n\t{\n\t\t$statusName = \"N\";\n\t\tstatic::addOrderProcessing($orderId, $statusName);\n\t}",
"public function purchaseAccountLedgerEntry()\n {\n $items = $this->getItems();\n \n $financeLedger = new Core_Model_Finance_Ledger;\n $salesLedgerRecord = $financeLedger->fetchByName('Purchase Account');\n \n $totalPrice = 0;\n for($i = 0; $i <= sizeof($items)-1; $i += 1) {\n $price = $items[$i]['unit_price'] * $items[$i]['quantity'];\n $totalPrice = $totalPrice + $price;\n }\n $notes = 'Purchase with Purchase Id = '.$this->_purchaseId;\n \n $dataToInsert = array(\n 'debit' => $totalPrice,\n 'credit' => \"0\",\n 'notes' => $notes,\n 'transaction_timestamp' => $this->_transactionTime,\n 'fa_ledger_id' => $salesLedgerRecord['fa_ledger_id']\n );\n $ledgerEntryModel = new Core_Model_Finance_Ledger_Entry;\n $ledgerEntryId = $ledgerEntryModel->create($dataToInsert);\n return $ledgerEntryId;\n }",
"public function add($receipt){\n\tDatabase::add('SOLD_ITEMS', array($receipt, $this->id,$this->quantity,$this->total));\n\tSales_Item::update($this->id,'SELL',$this->quantity);\n}",
"function saveOrderLineItem($data)\n {\n\n if (!vmAccess::manager('orders.edit')) {\n return false;\n }\n\n $table = $this->getTable('order_items');\n\n //Done in the table already\n VmConfig::importVMPlugins('vmpayment');\n $_dispatcher = JDispatcher::getInstance();\n $_returnValues = $_dispatcher->trigger('plgVmOnUpdateOrderLineShipment', array($data));\n foreach ($_returnValues as $_retVal) {\n if ($_retVal === false) {\n // Stop as soon as the first active plugin returned a failure status\n return;\n }\n }\n\n $_returnValues = $_dispatcher->trigger('plgVmOnUpdateOrderLinePayment', array($data));\n foreach ($_returnValues as $_retVal) {\n if ($_retVal === false) {\n // Stop as soon as the first active plugin returned a failure status\n return;\n }\n }\n $table->bindChecknStore($data);\n return true;\n }",
"public function update(Request $request, PurchaseRequestLine $purchaseRequestLine)\n {\n if ($request->action == 'create'){\n // if action is 'create', data will be an array with a single key of 0\n if (array_key_exists(0,$request->data)){\n $prl = new PurchaseRequestLine();\n $prl->purchase_request_id = $request->data[0]['purchase_request_ID'] ?: $request->data[0]['purchase_request'];\n $prl->item_number = $request->data[0]['item_number'];\n $prl->item_revision = $request->data[0]['item_revision'];\n $prl->item_description = strtoupper($request->data[0]['item_description']);\n $prl->qty_required = $request->data[0]['qty_required'];\n $prl->qty_per_uom = $request->data[0]['qty_per_uom'];\n $prl->uom_id = $request->data[0]['uom']['id'];\n $prl->cost_per_uom = $request->data[0]['cost_per_uom'] ?: '0.00';\n $prl->task_id = $request->data[0]['task']['id'];\n $prl->supplier_id = $request->data[0]['supplier']['id'];\n $prl->notes = $request->data[0]['notes'];\n $prl->need_date = date('Y-m-d H:i:s', strtotime($request->data[0]['need_date']));\n $prl->status = $request->data[0]['prl_status'];\n $prl->next_assembly = $request->data[0]['next_assembly'];\n $prl->work_order = $request->data[0]['work_order'];\n $prl->po_number = $request->data[0]['po_number'];\n $prl->buyers_notes = '';\n $prl->save();\n\n $uom_qty_required = ceil(number_format($prl->qty_required / $prl->qty_per_uom,2));\n\n $output['data'][] = [\n 'DT_RowId' => 'row_' . $prl->id,\n 'purchase_request' => $prl->purchaseRequest->id,\n 'item_number' => $prl->item_number,\n 'item_revision' => $prl->item_revision,\n 'item_description' => $prl->item_description,\n 'qty_required' => $prl->qty_required,\n 'uom' => ['name' => $prl->uom->name, 'id' => $prl->uom_id],\n 'qty_per_uom' => $prl->qty_per_uom,\n 'uom_qty_required' => $uom_qty_required,\n 'cost_per_uom' => '$' . number_format($prl->cost_per_uom, 2),\n 'total_line_cost' => '$' . number_format($prl->cost_per_uom * $uom_qty_required, 2),\n 'task' => ['number' => $prl->task->number, 'id' => $prl->task_id],\n 'need_date' => date('m-d-Y', strtotime($prl->need_date)),\n 'supplier' => $prl->supplier\n ? ['name' => $prl->supplier->name, 'id' => $prl->supplier_id]\n : ['name' => '', 'id' => ''],\n 'notes' => $prl->notes,\n 'approver' => $prl->approver\n ? ['name' => $prl->approverUser->name, 'id' => $prl->approver]\n : ['name' => '', 'id' => ''],\n 'buyer' => $prl->buyer\n ? ['name' => $prl->buyerUser->name, 'id' => $prl->buyer]\n : ['name' => '', 'id' => ''],\n 'prl_status' => $prl->status,\n 'next_assembly' => $prl->next_assembly,\n 'work_order' => $prl->work_order,\n 'po_number' => $prl->po_number,\n ];\n return response()->json(\n $output\n );\n } else {\n // if action is 'duplicate', data will be an array with the row_## as key\n $output = array();\n foreach ($request->data as $row_id => $data){\n $prl = new PurchaseRequestLine();\n if (array_key_exists('purchase_request',$data)){\n $prl->purchase_request_id = $data['purchase_request_ID'] ?: $data['purchase_request'];\n }\n if (array_key_exists('item_number',$data)){\n $prl->item_number = $data['item_number'];\n }\n if (array_key_exists('item_revision',$data)){\n $prl->item_revision = $data['item_revision'];\n }\n if (array_key_exists('item_description',$data)){\n $prl->item_description = $data['item_description'];\n }\n if (array_key_exists('qty_required',$data)){\n $prl->qty_required = $data['qty_required'];\n }\n if (array_key_exists('uom',$data)){\n $prl->uom_id = $data['uom']['id'];\n }\n if (array_key_exists('qty_per_uom',$data)){\n $prl->qty_per_uom = $data['qty_per_uom'];\n }\n if (array_key_exists('cost_per_uom',$data)){\n $prl->cost_per_uom = ltrim($data['cost_per_uom'],'$') ?: '0.00';\n }\n if (array_key_exists('task',$data)){\n $prl->task_id = $data['task']['id'];\n }\n if (array_key_exists('need_date',$data)){\n $prl->need_date = date('Y-d-m H:i:s', strtotime($data['need_date']));\n }\n if (array_key_exists('supplier',$data)){\n $prl->supplier_id = $data['supplier']['id'];\n }\n if (array_key_exists('notes',$data)){\n $prl->notes = $data['notes'];\n }\n if (array_key_exists('approver',$data)){\n $prl->approver = $data['approver']['id'];\n }\n if (array_key_exists('buyer',$data)){\n $prl->buyer = $data['buyer']['id'];\n }\n if (array_key_exists('prl_status',$data)){\n $prl->status = $data['prl_status'];\n }\n if (array_key_exists('next_assembly',$data)){\n $prl->next_assembly = $data['next_assembly'];\n }\n if (array_key_exists('work_order',$data)){\n $prl->work_order = $data['work_order'];\n }\n if (array_key_exists('po_number',$data)){\n $prl->po_number = $data['po_number'];\n }\n $prl->buyers_notes = '';\n $prl->save();\n\n $uom_qty_required = ceil(number_format($prl->qty_required / $prl->qty_per_uom,2));\n\n $output['data'][] = [\n 'DT_RowId' => 'row_' . $prl->id,\n 'purchase_request' => $prl->purchaseRequest->id,\n 'item_number' => $prl->item_number,\n 'item_revision' => $prl->item_revision,\n 'item_description' => $prl->item_description,\n 'qty_required' => $prl->qty_required,\n 'uom' => ['name' => $prl->uom->name, 'id' => $prl->uom_id],\n 'qty_per_uom' => $prl->qty_per_uom,\n 'uom_qty_required' => $uom_qty_required,\n 'cost_per_uom' => '$' . number_format($prl->cost_per_uom, 2),\n 'total_line_cost' => '$' . number_format($prl->cost_per_uom * $uom_qty_required, 2),\n 'task' => ['number' => $prl->task->number, 'id' => $prl->task_id],\n 'need_date' => date('m-d-Y', strtotime($prl->need_date)),\n 'supplier' => $prl->supplier\n ? ['name' => $prl->supplier->name, 'id' => $prl->supplier_id]\n : ['name' => '', 'id' => ''],\n 'notes' => $prl->notes,\n 'approver' => $prl->approver\n ? ['name' => $prl->approverUser->name, 'id' => $prl->approver]\n : ['name' => '', 'id' => ''],\n 'buyer' => $prl->buyer\n ? ['name' => $prl->buyerUser->name, 'id' => $prl->buyer]\n : ['name' => '', 'id' => ''],\n 'prl_status' => $prl->status,\n 'next_assembly' => $prl->next_assembly,\n 'work_order' => $prl->work_order,\n 'po_number' => $prl->po_number,\n ];\n }\n return response()->json(\n $output\n );\n }\n } elseif ($request->action == 'edit'){\n $output = array();\n foreach ($request->data as $row_id => $data){\n $prl = PurchaseRequestLine::find(substr($row_id,4));\n if ($prl instanceof PurchaseRequestLine){\n if (array_key_exists('purchase_request',$data)){\n $prl->purchase_request_id = $data['purchase_request'];\n// ? $data['purchase_request'] : $prl->purchase_request_id;\n }\n if (array_key_exists('item_number',$data)){\n $prl->item_number = $data['item_number'];\n// ? $data['item_number'] : $prl->item_number;\n }\n if (array_key_exists('item_revision',$data)){\n $prl->item_revision = $data['item_revision'];\n// ? $data['item_revision'] : $prl->item_revision;\n }\n if (array_key_exists('item_description',$data)){\n $prl->item_description = $data['item_description'];\n// ? strtoupper($data['item_description']) : $prl->item_description;\n }\n if (array_key_exists('qty_required',$data)){\n $prl->qty_required = $data['qty_required']\n ? $data['qty_required'] : $prl->qty_required;\n }\n if (array_key_exists('uom',$data)){\n $prl->uom_id = preg_match('/^\\d+$/',$data['uom']['id'])\n ? $data['uom']['id'] : $prl->uom_id;\n }\n if (array_key_exists('qty_per_uom',$data)){\n $prl->qty_per_uom = $data['qty_per_uom'];\n// ? $data['qty_per_uom'] : $prl->qty_per_uom;\n }\n if (array_key_exists('cost_per_uom',$data)){\n $prl->cost_per_uom = ltrim($data['cost_per_uom'],'$');\n// $prl->cost_per_uom = $data['cost_per_uom']\n// ? ltrim($data['cost_per_uom'],'$') : $prl->cost_per_uom;\n }\n if (array_key_exists('task',$data)){\n $prl->task_id = preg_match('/^\\d+$/',$data['task']['id'])\n ? $data['task']['id'] : $prl->task_id;\n }\n if (array_key_exists('need_date',$data)){\n $prl->need_date = ($data['need_date'] && ($data['need_date'] != date('m-d-Y',strtotime($prl->need_date))))\n ? date('Y-m-d H:i:s',strtotime($data['need_date']))\n : $prl->need_date;\n }\n if (array_key_exists('supplier',$data)){\n $prl->supplier_id = preg_match('/^\\d+$/',$data['supplier']['id'])\n ? $data['supplier']['id'] : $prl->supplier_id;\n }\n if (array_key_exists('notes',$data)){\n $prl->notes = $data['notes'];\n// ? $data['notes'] : $prl->notes;\n }\n if (array_key_exists('approver',$data)){\n $prl->approver = preg_match('/^\\d+$/',$data['approver']['id'])\n ? $data['approver']['id'] : (is_null($data['approver']['id']) ? null : $prl->approver);\n }\n if (array_key_exists('buyer',$data)){\n $prl->buyer = preg_match('/^\\d+$/',$data['buyer']['id'])\n ? $data['buyer']['id'] : (is_null($data['buyer']['id']) ? null : $prl->buyer);\n }\n if (array_key_exists('prl_status',$data)){\n $prl->status = $data['prl_status']\n ? $data['prl_status'] : $prl->prl_status;\n }\n if (array_key_exists('next_assembly',$data)){\n $prl->next_assembly = $data['next_assembly'];\n// ? $data['next_assembly'] : $prl->next_assembly;\n }\n if (array_key_exists('work_order',$data)){\n $prl->work_order = $data['work_order'];\n// ? $data['work_order'] : $prl->work_order;\n }\n if (array_key_exists('po_number',$data)){\n $prl->po_number = $data['po_number'];\n// ? $data['po_number'] : $prl->po_number;\n }\n $prl->save();\n\n $uom_qty_required = ceil(($prl->qty_required / $prl->qty_per_uom));\n $output['data'][] = [\n 'DT_RowId' => 'row_' . $prl->id,\n 'purchase_request' => $prl->purchaseRequest->id,\n 'item_number' => $prl->item_number,\n 'item_revision' => $prl->item_revision,\n 'item_description' => $prl->item_description,\n 'qty_required' => $prl->qty_required,\n 'uom' => ['name' => $prl->uom->name, 'id' => $prl->uom_id],\n 'qty_per_uom' => $prl->qty_per_uom,\n 'uom_qty_required' => $uom_qty_required,\n 'cost_per_uom' => '$' . number_format($prl->cost_per_uom, 2),\n 'total_line_cost' => '$' . number_format($prl->cost_per_uom * $uom_qty_required, 2),\n 'task' => ['number' => $prl->task->number, 'id' => $prl->task_id],\n 'need_date' => date('m-d-Y', strtotime($prl->need_date)),\n 'supplier' => $prl->supplier\n ? ['name' => $prl->supplier->name, 'id' => $prl->supplier_id]\n : ['name' => '', 'id' => ''],\n 'notes' => $prl->notes,\n 'approver' => $prl->approver\n ? ['name' => $prl->approverUser->name, 'id' => $prl->approver]\n : ['name' => '', 'id' => ''],\n 'buyer' => $prl->buyer\n ? ['name' => $prl->buyerUser->name, 'id' => $prl->buyer]\n : ['name' => '', 'id' => ''],\n 'prl_status' => $prl->status,\n 'next_assembly' => $prl->next_assembly,\n 'work_order' => $prl->work_order,\n 'po_number' => $prl->po_number,\n ];\n }\n }\n return response()->json(\n $output\n );\n\n } elseif ($request->action == 'remove') {\n foreach ($request->data as $k => $row) {\n $p = PurchaseRequestLine::find(substr($k, 4));\n if ($p instanceof PurchaseRequestLine) {\n $p->delete();\n }\n }\n return response()->json();\n };\n }",
"public function insertOrderCustomer($value,$line_item, $mainOrderId)\n {\n\n\n //customer info\n $customer_arr['order_id'] = $mainOrderId;\n $customer_arr['line_item_id'] = $line_item->id;\n $customer_arr['billing_address_name'] =$value->billing_address->name;\n $customer_arr['billing_address_first_name'] =$value->billing_address->first_name;\n $customer_arr['billing_address_last_name'] =$value->billing_address->last_name;\n $customer_arr['billing_address_address1'] =$value->billing_address->address1;\n $customer_arr['billing_address_address2'] =$value->billing_address->address2;\n $customer_arr['billing_address_phone'] =$value->billing_address->phone;\n $customer_arr['billing_address_city'] =$value->billing_address->city;\n $customer_arr['billing_address_zip'] =$value->billing_address->zip;\n $customer_arr['billing_address_province'] =$value->billing_address->province;\n $customer_arr['billing_address_country'] =$value->billing_address->country;\n $customer_arr['billing_address_company'] =$value->billing_address->company;\n $customer_arr['billing_address_latitude'] =$value->billing_address->latitude;\n $customer_arr['billing_address_longitude'] =$value->billing_address->longitude;\n $customer_arr['billing_address_province_code'] =$value->billing_address->province_code;\n $customer_arr['billing_address_country_code'] =$value->billing_address->country_code;\n $customer_arr['shipping_address_name'] = $value->shipping_address->name;\n $customer_arr['shipping_address_first_name'] = $value->shipping_address->first_name;\n $customer_arr['shipping_address_last_name'] = $value->shipping_address->last_name;\n $customer_arr['shipping_address_address1'] = $value->shipping_address->address1;\n $customer_arr['shipping_address_address2'] = $value->shipping_address->address2;\n $customer_arr['shipping_address_phone'] = $value->shipping_address->phone;\n $customer_arr['shipping_address_city'] = $value->shipping_address->city;\n $customer_arr['shipping_address_zip'] = $value->shipping_address->zip;\n $customer_arr['shipping_address_province'] = $value->shipping_address->province;\n $customer_arr['shipping_address_country'] = $value->shipping_address->country;\n $customer_arr['shipping_address_company'] = $value->shipping_address->company;\n $customer_arr['shipping_address_latitude'] = $value->shipping_address->latitude;\n $customer_arr['shipping_address_longitude'] = $value->shipping_address->longitude;\n $customer_arr['shipping_address_province_code'] = $value->shipping_address->province_code;\n $customer_arr['shipping_address_country_code'] = $value->shipping_address->country_code;\n $customer_arr['customer_id'] = $value->customer->id;\n $customer_arr['customer_email'] = $value->customer->email;\n $customer_arr['customer_first_name'] = $value->customer->first_name;\n $customer_arr['customer_last_name'] = $value->customer->last_name;\n $customer_arr['customer_total_spent'] = $value->customer->total_spent;\n $customer_arr['customer_last_order_id'] = $value->customer->last_order_id;\n $customer_arr['customer_phone'] = $value->customer->phone;\n $customer_arr['customer_tags'] = $value->customer->tags;\n $customer_arr['customer_last_order_name'] = $value->customer->last_order_name;\n $customer_arr['customer_currency'] = $value->customer->currency;\n $customer_arr['default_address_id'] = $value->customer->default_address->id;\n $customer_arr['default_address_customer_id'] = $value->customer->default_address->customer_id;\n $customer_arr['default_address_first_name'] = $value->customer->default_address->first_name;\n $customer_arr['default_address_last_name'] = $value->customer->default_address->last_name;\n $customer_arr['default_address_company'] = $value->customer->default_address->company;\n $customer_arr['default_address_address1'] = $value->customer->default_address->address1;\n $customer_arr['default_address_address2'] = $value->customer->default_address->address2;\n $customer_arr['default_address_city'] = $value->customer->default_address->city;\n $customer_arr['default_address_province'] = $value->customer->default_address->province;\n $customer_arr['default_address_country'] = $value->customer->default_address->country;\n $customer_arr['default_address_zip'] = $value->customer->default_address->zip;\n $customer_arr['default_address_phone'] = $value->customer->default_address->phone;\n $customer_arr['default_address_name'] = $value->customer->default_address->name;\n $customer_arr['default_address_province_code'] = $value->customer->default_address->province_code;\n $customer_arr['default_address_country_code'] = $value->customer->default_address->country_code;\n $customer_arr['default_address_country_name'] = $value->customer->default_address->country_name;\n\n\n return OrderCustomerDetails::insertGetId($customer_arr);\n\n }",
"protected function _orderItemFromArray($arr)\n\t{\n\t\tswitch ($this->_config['push_orders_as'])\n\t\t{\n\t\t\tcase QUICKBOOKS_OBJECT_SALESRECEIPT:\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\tcase QUICKBOOKS_OBJECT_SALESORDER:\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\tcase QUICKBOOKS_OBJECT_INVOICE:\n\t\t\tdefault:\n\t\t\t\t\n\t\t\t\t$InvoiceLine = new QuickBooks_Object_Invoice_InvoiceLine();\n\t\t\t\t\n\t\t\t\t$map = array(\n\t\t\t\t\t'ProductID' => \tarray( 'setItemApplicationID', 'ItemRef ' . QUICKBOOKS_API_APPLICATIONID, 'setItemListID' ), \n\t\t\t\t\t'Desc' => \t\tarray( 'setDescription', 'Invoice InvoiceLine Desc' ), \n\t\t\t\t\t'Quantity' => \tarray( 'setQuantity', 'Invoice InvoiceLine Quantity' ), \n\t\t\t\t\t'Rate' => \t\tarray( 'setRate', 'Invoice InvoiceLine Rate' ),\n\t\t\t\t\t'ClassID' => \tarray( 'setClassApplicationID', 'ClassRef ' . QUICKBOOKS_API_APPLICATIONID, 'setClassListID' ), \n\t\t\t\t\t);\n\t\t\t\t\n\t\t\t\t$InvoiceLine = $this->_applyBaseMap($arr, $map, $InvoiceLine, 'Invoice InvoiceLine');\t\n\t\t\t\t\n\t\t\t\treturn $InvoiceLine;\n\t\t}\n\t}",
"public function addProductLine( $product_id, $combination_id = null, $quantity = 1.0, $params = [] )\n {\n // Do the Mambo!\n $line_type = 'product';\n\n // Customer\n $customer = $this->customer;\n $salesrep = array_key_exists('sales_rep_id', $params) \n ? SalesRep::find( (int) $params['sales_rep_id'] ) \n : $customer->salesrep;\n \n // Currency\n $currency = $this->document_currency;\n\n // Product\n if ($combination_id>0) {\n $combination = Combination::with('product')->with('product.tax')->findOrFail(intval($combination_id));\n $product = $combination->product;\n $product->reference = $combination->reference;\n $product->name = $product->name.' | '.$combination->name;\n } else {\n $product = Product::with('tax')->findOrFail(intval($product_id));\n }\n\n $reference = $product->reference;\n $name = array_key_exists('name', $params) \n ? $params['name'] \n : $product->name;\n\n $measure_unit_id = $product->measure_unit_id;\n\n $package_measure_unit_id = array_key_exists('package_measure_unit_id', $params) \n ? $params['package_measure_unit_id'] \n : $product->measure_unit_id;\n\n $pmu_conversion_rate = 1.0; // Temporarily default\n\n $pmu_label = ''; // Temporarily default\n\n // Measure unit stuff...\n if ( $package_measure_unit_id != $measure_unit_id )\n {\n $mu = $product->measureunits->where('id', $measure_unit_id )->first();\n $pmu = $product->measureunits->where('id', $package_measure_unit_id)->first();\n\n $pmu_conversion_rate = $pmu->conversion_rate;\n\n $quantity = $quantity * $pmu_conversion_rate;\n\n $pmu_label = array_key_exists('pmu_label', $params) && $params['pmu_label']\n ? $params['pmu_label'] \n : $pmu->name.' : '.(int) $pmu_conversion_rate.'x'.$mu->name;\n \n }\n\n // $cost_price = $product->cost_price;\n // Do this ( because of getCostPriceAttribute($value) ):\n $cost_price = $product->getOriginal('cost_price');\n $cost_average = $product->cost_average;\n\n // Tax\n $tax = $product->tax;\n $taxing_address = $this->taxingaddress;\n $tax_percent = $tax->getTaxPercent( $taxing_address );\n $sales_equalization = array_key_exists('sales_equalization', $params) \n ? $params['sales_equalization'] \n : $customer->sales_equalization;\n\n // Product Price\n $price = $product->getPrice();\n// if ( $price->currency->id != $currency->id ) {\n// $price = $price->convert( $currency );\n// }\n $unit_price = $price->getPrice();\n\n // Calculate price per $customer_id now!\n // $customer_price = $product->getPriceByCustomer( $customer, $quantity, $currency );\n $customer_price = $product->getPriceByCustomerPriceList( $customer, $quantity, $currency );\n\n // Is there a Price for this Customer?\n if (!$customer_price) return null; // Product not allowed for this Customer\n\n $customer_price->applyTaxPercent( $tax_percent );\n $unit_customer_price = $customer_price->getPrice();\n\n // Still with me? \n if ( $package_measure_unit_id != $measure_unit_id &&\n \n // Is there any package rule?\n $pack_rule = $customer->getPackageRule( $product, $package_measure_unit_id, $currency ) )\n {\n // Calculate quantity conversion\n $pmu_conversion_rate = $pack_rule->conversion_rate;\n $pmu_label = $pack_rule->name;\n\n // Assumes $pack_rule is not null\n // $package_price = $pack_rule->price;\n $customer_final_price = new Price( $pack_rule->getUnitPrice() );\n $customer_final_price->applyTaxPercent( $tax_percent );\n\n // Still one thing left: rule_type = 'promo' (avoid)\n $promo_rule = null;\n \n\n } else {\n //\n $customer_final_price = $product->getPriceByCustomerPriceRules( $customer, $quantity, $currency );\n\n // Still one thing left: rule_type = 'promo'\n $promo_rule = $customer->getExtraQuantityRule( $product, $currency );\n }\n\n\n\n \n if ( !$customer_final_price )\n $customer_final_price = clone $customer_price; // No price Rules available\n \n // Better price?\n if ( $customer_final_price->getPrice() > $unit_customer_price )\n {\n $customer_final_price = clone $customer_price;\n }\n $unit_customer_final_price = $customer_final_price->getPrice();\n\n\n // Still one thing left: rule_type = 'promo'\n $extra_quantity = 0.0;\n $extra_quantity_label = '';\n\n if ($promo_rule)\n {\n // First: Does it apply?\n if ( $unit_customer_final_price == $unit_customer_price ) // No price rule has been applied\n {\n $extra_quantity = floor( $quantity / $promo_rule->from_quantity ) * $promo_rule->extra_quantity;\n $extra_quantity_label = $extra_quantity > 0 ? $promo_rule->name : '';\n }\n }\n\n\n\n // Price Policy\n $pricetaxPolicy = array_key_exists('prices_entered_with_tax', $params) \n ? $params['prices_entered_with_tax'] \n : $customer_price->price_is_tax_inc;\n/*\n // Customer Final Price\n if ( array_key_exists('prices_entered_with_tax', $params) && array_key_exists('unit_customer_final_price', $params) )\n {\n $unit_customer_final_price = new Price( $params['unit_customer_final_price'], $pricetaxPolicy, $currency );\n\n $unit_customer_final_price->applyTaxPercent( $tax_percent );\n\n } else {\n\n $unit_customer_final_price = clone $customer_price;\n }\n*/\n // Discount\n $discount_percent = array_key_exists('discount_percent', $params) \n ? $params['discount_percent'] \n : 0.0;\n\n // Final Price\n $final_price = clone $customer_final_price;\n// if ( $discount_percent ) \n// $unit_final_price->applyDiscountPercent( $discount_percent );\n\n // Sales Rep\n $sales_rep_id = array_key_exists('sales_rep_id', $params) \n ? $params['sales_rep_id'] \n : optional($salesrep)->id;\n \n $commission_percent = array_key_exists('sales_rep_id', $params) && array_key_exists('commission_percent', $params) \n ? $params['commission_percent'] \n : optional($salesrep)->getCommission( $product, $customer ) ?? 0.0;\n\n\n\n // Misc\n $line_sort_order = array_key_exists('line_sort_order', $params) \n ? $params['line_sort_order'] \n : $this->getNextLineSortOrder();\n/*\n $extra_quantity = array_key_exists('extra_quantity', $params) \n ? $params['extra_quantity'] \n : 0.0;\n\n $extra_quantity_label = array_key_exists('extra_quantity_label', $params) \n ? $params['extra_quantity_label'] \n : '';\n*/\n $notes = array_key_exists('notes', $params) \n ? $params['notes'] \n : '';\n\n\n // Build OrderLine Object\n $data = [\n 'line_sort_order' => $line_sort_order,\n 'line_type' => $line_type,\n 'product_id' => $product_id,\n 'combination_id' => $combination_id,\n 'reference' => $reference,\n 'name' => $name,\n 'quantity' => $quantity,\n 'measure_unit_id' => $measure_unit_id,\n 'extra_quantity' => $extra_quantity,\n 'extra_quantity_label' => $extra_quantity_label,\n\n 'package_measure_unit_id' => $package_measure_unit_id,\n 'pmu_conversion_rate' => $pmu_conversion_rate,\n 'pmu_label' => $pmu_label,\n\n 'prices_entered_with_tax' => $pricetaxPolicy,\n \n 'cost_price' => $cost_price,\n 'cost_average' => $cost_average,\n 'unit_price' => $unit_price,\n 'unit_customer_price' => $unit_customer_price,\n 'unit_customer_final_price' => $customer_final_price->getPrice(),\n 'unit_customer_final_price_tax_inc' => $customer_final_price->getPriceWithTax(),\n 'unit_final_price' => $final_price->getPrice(),\n 'unit_final_price_tax_inc' => $final_price->getPriceWithTax(), \n 'sales_equalization' => $sales_equalization,\n 'discount_percent' => $discount_percent,\n 'discount_amount_tax_incl' => 0.0, // floatval( $request->input('discount_amount_tax_incl', 0.0) ),\n 'discount_amount_tax_excl' => 0.0, // floatval( $request->input('discount_amount_tax_excl', 0.0) ),\n\n 'total_tax_incl' => $quantity * $final_price->getPriceWithTax(),\n 'total_tax_excl' => $quantity * $final_price->getPrice(),\n\n 'tax_percent' => $tax_percent,\n 'commission_percent' => $commission_percent,\n 'notes' => $notes,\n 'locked' => 0,\n \n // 'customer_order_id',\n 'tax_id' => $tax->id,\n 'sales_rep_id' => $sales_rep_id,\n ];\n\n $extra_data = [];\n\n // Ecotaxes stuff\n if ( Configuration::isTrue('ENABLE_ECOTAXES') && ($product->ecotax_id>0) )\n {\n //\n $extra_data = [\n 'ecotax_id' => $product->ecotax_id,\n 'ecotax_amount' => $product->ecotax->amount,\n 'ecotax_total_amount' => $quantity * $product->ecotax->amount,\n ];\n }\n\n $data += $extra_data;\n\n\n // Finishing touches\n $lineClass = $this->getClassName().'Line';\n $document_line = ( new $lineClass() )->create( $data );\n\n $this->lines()->save($document_line);\n\n\n // Let's deal with taxes\n $product->sales_equalization = $sales_equalization;\n $rules = $product->getTaxRules( $this->taxingaddress, $this->customer );\n\n $document_line->applyTaxRules( $rules );\n\n // Hummm! What about extra units (quantity at no cost)?\n if ( $extra_quantity > 0.0 )\n {\n // Re-Build OrderLine Object\n $data['line_sort_order'] = $line_sort_order + 1; // Stay close to previous line, because this line \"is a child of\" previous line\n $data['quantity'] = $extra_quantity;\n\n $data['extra_quantity'] = 0.0;\n $data['extra_quantity_label'] = '';\n\n $data['unit_customer_final_price'] = 0.0;\n $data['unit_customer_final_price_tax_inc'] = 0.0;\n\n $data['unit_final_price'] = 0.0;\n $data['unit_final_price_tax_inc'] = 0.0;\n\n $data['total_tax_incl'] = 0.0;\n $data['total_tax_excl'] = 0.0;\n\n $data['notes'] = $extra_quantity_label;\n\n // Add extra line\n $document_extra_line = ( new $lineClass() )->create( $data );\n\n $this->lines()->save($document_extra_line);\n\n\n // Let's deal with taxes\n $document_extra_line->applyTaxRules( $rules );\n }\n\n\n // Now, update Document Totals\n $this->makeTotals();\n\n\n // Good boy, bye then\n return $document_line;\n\n }",
"private function add_new_line() {\n\n\t\t$this->fields[] = array( 'newline' => true );\n\n\t}",
"public function addOrderedItemsToStock($order)\r\n {\r\n \t$nVersion = Mage::getModel('paymentsensegateway/direct')->getVersion();\r\n \t$isCustomStockManagementEnabled = Mage::getModel('paymentsensegateway/direct')->getConfigData('customstockmanagementenabled');\r\n\t\t\r\n \tif($nVersion >= 1410 &&\r\n \t\t$isCustomStockManagementEnabled)\r\n \t{\r\n\t \t$items = $order->getAllItems();\r\n\t\t\tforeach ($items as $itemId => $item)\r\n\t\t\t{\r\n\t\t\t\t// ordered quantity of the item from stock\r\n\t\t\t\t$quantity = $item->getQtyOrdered();\r\n\t\t\t\t$productId = $item->getProductId();\r\n\t\t\t\t\r\n\t\t\t\t$stock = Mage::getModel('cataloginventory/stock_item')->loadByProduct($productId);\r\n\t\t\t\t$stockManagement = $stock->getManageStock();\r\n\t\t\t\t\r\n\t\t\t\tif($stockManagement)\r\n\t\t\t\t{\r\n\t\t\t\t\t$stock->setQty($stock->getQty() + $quantity);\r\n\t\t\t\t\t$stock->save();\r\n\t\t\t\t}\r\n\t\t\t}\r\n \t}\r\n }",
"public function populateLineItem(Commerce_LineItemModel $lineItem);",
"public function addLineItem($number, $name, $desc, $qty, $amt, $taxamt, $itemurl = null, $itemcategory = 'Physical')\n\t{\n\t\t$this->_additional_line_items[] = compact('number', 'name', 'desc', 'qty', 'amt', 'taxamt', 'itemurl', 'itemcategory');\n\t}",
"public function create()\n\t{\n\t\t$this->auth->restrict('Purchase_Order.Orders.Create');\n\n\t\tif (isset($_POST['save']))\n\t\t{\n\t\t\tif ($insert_id = $this->save_purchase_order())\n\t\t\t{\n\t\t\t\t// Log the activity\n\t\t\t\tlog_activity($this->current_user->id, lang('purchase_order_act_create_record') .': '. $insert_id .' : '. $this->input->ip_address(), 'purchase_order');\n\n\t\t\t\tTemplate::set_message(lang('purchase_order_create_success'), 'success');\n\t\t\t\tredirect(SITE_AREA .'/orders/purchase_order');\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tTemplate::set_message(lang('purchase_order_create_failure') . $this->purchase_order_model->error, 'error');\n\t\t\t}\n\t\t}\n\t\tAssets::add_module_js('purchase_order', 'purchase_order.js');\n\n\t\tTemplate::set('toolbar_title', lang('purchase_order_create') . ' Purchase Order');\n\t\tTemplate::render();\n\t}",
"public function create_purchaseorder($ponbr) {\n\t\t\t$purchaseorder = $this->create_purchaseorderheader($ponbr);\n\t\t\t$purchaseorder['LineItem'] = $this->create_purchaseorderdetails($ponbr);\n\t\t\t$this->response = $this->curl_post($this->endpoints['purchase-order'], $purchaseorder, $json = true);\n\t\t\t$this->response['response']['PurchaseOrderNumber'] = isset($this->response['response']['PurchaseOrderNumber']) ? $this->response['response']['PurchaseOrderNumber'] : $purchaseorder['ID'];\n\t\t\t$this->process_response();\n\t\t\t//$this->response['response']['request'] = $purchaseorder;\n\t\t\treturn $this->response['response'];\n\t\t}",
"public function addItem(OrderableInterface $orderable, $quantity = 1);",
"public function addItem(OrderItem $item)\n {\n $this->_items->append($item);\n }",
"function addOrder () {\n\t//\terror_log ( 'addOrder\\n', 3, '/var/tmp/php.log' );\n\t$request = Slim::getInstance ()->request ();\n\t$order = json_decode ( $request->getBody () );\n\t//\t$sql = \"INSERT INTO wine (name, grapes, country, region, year, description) VALUES (:name, :grapes, :country, :region, :year, :description)\";\n\ttry {\n\t\t$db = new DbOperation();\n\t\t$orderId = $db->addOrder ( $order );\n\t\t//\t\t$stmt = $db->prepare ( $sql );\n\t\t//\t\t$stmt->bindParam ( \"name\", $order->name );\n\t\t//\t\t$stmt->bindParam ( \"grapes\", $order->grapes );\n\t\t//\t\t$stmt->bindParam ( \"country\", $order->country );\n\t\t//\t\t$stmt->bindParam ( \"region\", $order->region );\n\t\t//\t\t$stmt->bindParam ( \"year\", $order->year );\n\t\t//\t\t$stmt->bindParam ( \"description\", $order->description );\n\t\t//\t\t$stmt->execute ();\n\t\t//\t\t$order->id = $db->lastInsertId ();\n\t\t//\t\t$db = null;\n\t\t// print_f($order);\n\t\t// $order.push(\"orderId\", $orderId);\n\t\t// print_f($order);\n\t\t$order->orderId = $orderId;\n\t\techo '{\"addedOrder\":' . json_encode ( $order ) . '}';\n\t\t// echo $orderId;\n\t} catch ( Exception $e ) {\n\t\t//\t\terror_log ( $e->getMessage (), 3, '/var/tmp/php.log' );\n\t\t//\t\techo '{\"error\":{\"text\":' . $e->getMessage () . $e.'}}';\n\t\techo '{\"errorText\":\"Add order fail with text as\", \"text\":}' . $e->getMessage () . $e . '}';\n\t}\n}",
"public static function createOrder ()\n\t{\n $user=Auth::user();// here to get the user info and store it in the $user variable\n $order=$user->orders()->create([\n 'total'=>Cart::total(),\n 'delivered' =>0\n\n ]);\n // the delivered column will get by default the value zero which means that this order\n // is not delivered yet \n\n $cartItems=cart::content();\n //seek for intels about attach function \n\n foreach($cartItems as $cartItem)\n $order->orderItems()->attach($cartItem->id,[\n 'qty'=>$cartItem->qty ,\n 'total' => $cartItem->qty*$cartItem->price \n ]);\n\n\t}",
"protected function addOrder($data) {\n\t\n\t\t$this->db->query(\"INSERT INTO `\" . DB_PREFIX . \"order` SET invoice_prefix = '\" . $this->db->escape($data['invoice_prefix']) . \"', store_id = '\" . (int)$data['store_id'] . \"', store_name = '\" . $this->db->escape($data['store_name']) . \"', store_url = '\" . $this->db->escape($data['store_url']) . \"', customer_id = '\" . (int)$data['customer_id'] . \"', customer_group_id = '\" . (int)$data['customer_group_id'] . \"', firstname = '\" . $this->db->escape($data['firstname']) . \"', lastname = '\" . $this->db->escape($data['lastname']) . \"', email = '\" . $this->db->escape($data['email']) . \"', telephone = '\" . $this->db->escape($data['telephone']) . \"', fax = '\" . $this->db->escape($data['fax']) . \"', custom_field = '\" . $this->db->escape(isset($data['custom_field']) ? serialize($data['custom_field']) : '') . \"', payment_firstname = '\" . $this->db->escape($data['payment_firstname']) . \"', payment_lastname = '\" . $this->db->escape($data['payment_lastname']) . \"', payment_company = '\" . $this->db->escape($data['payment_company']) . \"', payment_address_1 = '\" . $this->db->escape($data['payment_address_1']) . \"', payment_address_2 = '\" . $this->db->escape($data['payment_address_2']) . \"', payment_city = '\" . $this->db->escape($data['payment_city']) . \"', payment_postcode = '\" . $this->db->escape($data['payment_postcode']) . \"', payment_country = '\" . $this->db->escape($data['payment_country']) . \"', payment_country_id = '\" . (int)$data['payment_country_id'] . \"', payment_zone = '\" . $this->db->escape($data['payment_zone']) . \"', payment_zone_id = '\" . (int)$data['payment_zone_id'] . \"', payment_address_format = '\" . $this->db->escape($data['payment_address_format']) . \"', payment_custom_field = '\" . $this->db->escape(isset($data['payment_custom_field']) ? serialize($data['payment_custom_field']) : '') . \"', payment_method = '\" . $this->db->escape($data['payment_method']) . \"', payment_code = '\" . $this->db->escape($data['payment_code']) . \"', shipping_firstname = '\" . $this->db->escape($data['shipping_firstname']) . \"', shipping_lastname = '\" . $this->db->escape($data['shipping_lastname']) . \"', shipping_company = '\" . $this->db->escape($data['shipping_company']) . \"', shipping_address_1 = '\" . $this->db->escape($data['shipping_address_1']) . \"', shipping_address_2 = '\" . $this->db->escape($data['shipping_address_2']) . \"', shipping_city = '\" . $this->db->escape($data['shipping_city']) . \"', shipping_postcode = '\" . $this->db->escape($data['shipping_postcode']) . \"', shipping_country = '\" . $this->db->escape($data['shipping_country']) . \"', shipping_country_id = '\" . (int)$data['shipping_country_id'] . \"', shipping_zone = '\" . $this->db->escape($data['shipping_zone']) . \"', shipping_zone_id = '\" . (int)$data['shipping_zone_id'] . \"', shipping_address_format = '\" . $this->db->escape($data['shipping_address_format']) . \"', shipping_custom_field = '\" . $this->db->escape(isset($data['shipping_custom_field']) ? serialize($data['shipping_custom_field']) : '') . \"', shipping_method = '\" . $this->db->escape($data['shipping_method']) . \"', shipping_code = '\" . $this->db->escape($data['shipping_code']) . \"', comment = '\" . $this->db->escape($data['comment']) . \"', total = '\" . (float)$data['total'] . \"', affiliate_id = '\" . (int)$data['affiliate_id'] . \"', commission = '\" . (float)$data['commission'] . \"', marketing_id = '\" . (int)$data['marketing_id'] . \"', tracking = '\" . $this->db->escape($data['tracking']) . \"', language_id = '\" . (int)$data['language_id'] . \"', currency_id = '\" . (int)$data['currency_id'] . \"', currency_code = '\" . $this->db->escape($data['currency_code']) . \"', currency_value = '\" . (float)$data['currency_value'] . \"', ip = '\" . $this->db->escape($data['ip']) . \"', forwarded_ip = '\" . $this->db->escape($data['forwarded_ip']) . \"', user_agent = '\" . $this->db->escape($data['user_agent']) . \"', accept_language = '\" . $this->db->escape($data['accept_language']) . \"', date_added = NOW(), date_modified = NOW()\");\n\n\t\t$order_id = $this->db->getLastId();\n\n\t\t// Products\n\t\tif (isset($data['products'])) {\n\t\t\tforeach ($data['products'] as $product) {\n\t\t\t\t$this->db->query(\"INSERT INTO \" . DB_PREFIX . \"order_product SET order_id = '\" . (int)$order_id . \"', product_id = '\" . (int)$product['product_id'] . \"', name = '\" . $this->db->escape($product['name']) . \"', model = '\" . $this->db->escape($product['model']) . \"', quantity = '\" . (int)$product['quantity'] . \"', price = '\" . (float)$product['price'] . \"', total = '\" . (float)$product['total'] . \"', tax = '\" . (float)$product['tax'] . \"', reward = '\" . (int)$product['reward'] . \"'\");\n\t\n\t\t\t\t$order_product_id = $this->db->getLastId();\n\t\n\t\t\t\tforeach ($product['option'] as $option) {\n\t\t\t\t\t$this->db->query(\"INSERT INTO \" . DB_PREFIX . \"order_option SET order_id = '\" . (int)$order_id . \"', order_product_id = '\" . (int)$order_product_id . \"', product_option_id = '\" . (int)$option['product_option_id'] . \"', product_option_value_id = '\" . (int)$option['product_option_value_id'] . \"', name = '\" . $this->db->escape($option['name']) . \"', `value` = '\" . $this->db->escape($option['value']) . \"', `type` = '\" . $this->db->escape($option['type']) . \"'\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Gift Voucher\n\t\t // don't need gift voucher\n\t\t\n\t\t// Totals\n\t\tif (isset($data['totals'])) {\n\t\t\tforeach ($data['totals'] as $total) {\n\t\t\t\t$this->db->query(\"INSERT INTO \" . DB_PREFIX . \"order_total SET order_id = '\" . (int)$order_id . \"', code = '\" . $this->db->escape($total['code']) . \"', title = '\" . $this->db->escape($total['title']) . \"', `value` = '\" . (float)$total['value'] . \"', sort_order = '\" . (int)$total['sort_order'] . \"'\");\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $order_id;\n\t}",
"public function make()\n {\n $orderState = new OrderState();\n $orderState->setProcessed(true);\n $orderState->setShipped(false);\n\n $orderItem1 = new LineItem();\n $orderItem1->setName('someItemName1');\n $orderItem1->setDescription('item description');\n $orderItem1->setQuantity(1);\n $orderItem1->setSku('AS1210000');\n $orderItem1->setSalePrice('90.00');\n $orderItem1->setTotalPrice('100.00');\n\n $orderItem2 = new LineItem();\n $orderItem2->setName('someItemName2');\n $orderItem2->setDescription('item description');\n $orderItem2->setQuantity(1);\n $orderItem2->setSku('AS3420000');\n $orderItem2->setSalePrice('40.00');\n $orderItem2->setTotalPrice('50.00');\n\n $order = new Order();\n $order->setGrandTotal('160.00');\n $order->setOrderDate(Carbon::parse('2017-05-12T00:00:00.000Z'));\n $order->setTaxAmount('15.00');\n $order->setCurrency('AUD');\n $order->setCustomerOrderId('ORDER-123456789');\n\n $order->setLineItems(collect([$orderItem1,$orderItem2]));\n $order->setStates($orderState);\n\n return $order;\n }",
"public function insert_purchase_info($order_id = NUll)\n\t{\n\t\tif (!$this->Admin_model->is_admin_loged_in()) \n\t\t{\n\t\t\tredirect('Adminlogin/?logged_in_first');\n\t\t}else{\n\t\t\tif($this->admin_access('purchase_entry') != 1){\n\t\t\t\t$data['warning_msg']=\"You Are Not able to Access this Module...!\";\n\t\t\t\t$this->session->set_flashdata($data);\n\t\t\t\tredirect('purchase/dashboard');\n\t\t\t}\n\n\t\t\t$data['title'] = 'New Purchase Information'; \n\t\t\t$data['content'] = 'purchase/create_purchase';\n\t\t\t$data['customers'] = $this->Customer_model->find_all_customer_info();\n\t\t\t$data['lc_data'] = $this->LC_model->get_all_lc_info();\n\t\t\t$data['supplires'] = $this->Supplier_model->find_all_supplier_info();\n\t\t\t$data['heads'] = $this->IE_head_model->get_all_head_info('C');\n\t\t\tif(!is_null($order_id)){\n\t\t\t\t$data['order'] = $this->Order_model->order_info_by_id($order_id);\n\t\t\t}\n\t\t\t$data['pus_sl'] = $this->Purchase_model->purchase_sl_create();\n $data['purchases']\t= $this->Purchase_model->get_purchase_info();\n\t\t\t$this->load->view('admin/adminMaster', $data);\n\t\t}\t\n\t}",
"public function add($line) {\r\n if(is_string($line)) $line .= \"\\n\";\r\n $this->body[]=$line;\r\n }",
"private function makeItemPurchase() : void\n {\n $this->item->available = $this->item->available - 1;\n $this->coinService->setCoinCount(\n $this->coinService->getCurrenCoinCount() - $this->item->cost\n );\n $this->item->save();\n }",
"private function sellTrasactionAddsMoney(){\n\n }",
"function add_payment_pr($data){\n\t\tif($this->check_money($data['Clientpayment']['amount'])){\n\t\t\t\t$this->do_pr_invoice($data);\n\t\t}\n\t}",
"public function addLineItem($lineItem)\n {\n $this->lineItem[] = $lineItem;\n return $this;\n }",
"public function addOrder($user_id) {\n\t\t\t$query = \"insert into orders (OID, o_UID, status, room, notes) values (null, ?, ?, ?, ?)\";\n\t\t\t$dataArr = array($user_id, $this->status, $this->room, $this->notes);\n\t\t\t$this -> manDb($query, $dataArr);\n\t\t}",
"public function addOrder()\n\t{\t\n\t\t$this->data['title'] = \"Tambah Order\";\n\n\t\t$this->form_validation->set_rules('no_invoice', 'Nomer Inovice', 'trim|required');\n\t\t$this->form_validation->set_rules('id_user', 'id_user', 'trim|required');\n\t\t$this->form_validation->set_rules('id_reklame', 'id_reklame', 'trim|required');\n\t\t$this->form_validation->set_rules('description', 'Deskripsi', 'trim|required');\n\t\t$this->form_validation->set_rules('status_order', 'Deskripsi', 'trim|required');\n\t\t\n\t\t\n\n\t\tif ($this->form_validation->run() == TRUE)\n\t\t{\n\t\t\t$this->madmin->createOrder();\n\n\t\t\tredirect(current_url());\n\t\t}\n\t\t$this->data['invoice']=$this->madmin->get_no_invoice();\n\t\t$this->load->view('admin/add-order', $this->data);\n\n\t}",
"function addLine($accountid, $valor, $side) {\n $objline = new Icontaaccountingdebcred($this->db);\n $objline->fk_accountid = $accountid; //@porhacer: agregar constraint en base de datos accountid debe estar en la tabla de cuentas\n $objline->amount = $valor;\n $objline->direction = $side;\n $objline->fk_transaction = $this->id;\n $result = $objline->create($user);\n if ($result < 0) {\n $this->error = $objline->error;\n return (-1);\n } else {\n return($result);\n }\n }",
"function add_sales_order(&$order)\n{\n\tglobal $loc_notification, $path_to_root, $Refs;\n\n\tbegin_transaction();\n\thook_db_prewrite($order, $order->trans_type);\n\t$order_no = get_next_trans_no($order->trans_type);\n\t$del_date = date2sql($order->due_date);\n\t$order_type = 0; // this is default on new order\n\t$total = $order->get_trans_total();\n\t$sql = \"INSERT INTO \".TB_PREF.\"sales_orders (order_no, type, debtor_no, trans_type, branch_code, customer_ref, reference, comments, ord_date,\n\t\torder_type, ship_via, deliver_to, delivery_address, contact_phone,\n\t\tfreight_cost, from_stk_loc, delivery_date, payment_terms, total)\n\t\tVALUES (\" .db_escape($order_no) . \",\" .db_escape($order_type) . \",\" . db_escape($order->customer_id) .\n\t\t \", \" .db_escape($order->trans_type) . \",\" .db_escape($order->Branch) . \", \".\n\t\t\tdb_escape($order->cust_ref) .\",\". \n\t\t\tdb_escape($order->reference) .\",\". \n\t\t\tdb_escape($order->Comments) .\",'\" . \n\t\t\tdate2sql($order->document_date) . \"', \" .\n\t\t\tdb_escape($order->sales_type) . \", \" .\n\t\t\tdb_escape($order->ship_via).\",\" . \n\t\t\tdb_escape($order->deliver_to) . \",\" .\n\t\t\tdb_escape($order->delivery_address) . \", \" .\n\t\t\tdb_escape($order->phone) . \", \" . \n\t\t\tdb_escape($order->freight_cost) .\", \" . \n\t\t\tdb_escape($order->Location) .\", \" .\n\t\t\tdb_escape($del_date) . \",\" .\n\t\t\tdb_escape($order->payment) . \",\" .\n\t\t\tdb_escape($total). \")\";\n\n\tdb_query($sql, \"order Cannot be Added\");\n\n\t$order->trans_no = array($order_no=>0);\n\n\tif ($loc_notification == 1)\n\t{\n\t\tinclude_once($path_to_root . \"/inventory/includes/inventory_db.inc\");\n\t\t$st_ids = array();\n\t\t$st_names = array();\n\t\t$st_num = array();\n\t\t$st_reorder = array();\n\t}\n\tforeach ($order->line_items as $line)\n\t{\n\t\tif ($loc_notification == 1 && is_inventory_item($line->stock_id))\n\t\t\t$loc = calculate_reorder_level($order->Location, $line, $st_ids, $st_names, $st_num, $st_reorder); \n\n\t\t$sql = \"INSERT INTO \".TB_PREF.\"sales_order_details (order_no, trans_type, stk_code, description, unit_price, quantity, discount_percent) VALUES (\";\n\t\t$sql .= $order_no . \",\".$order->trans_type .\n\t\t\t\t\",\".db_escape($line->stock_id).\", \"\n\t\t\t\t.db_escape($line->item_description).\", $line->price,\n\t\t\t\t$line->quantity,\n\t\t\t\t$line->discount_percent)\";\n\t\tdb_query($sql, \"order Details Cannot be Added\");\n\n\t// Now mark quotation line as processed\n\t\tif ($order->trans_type == ST_SALESORDER && $line->src_id)\n\t\t\tupdate_parent_line(ST_SALESORDER, $line->src_id, $line->qty_dispatched); // clear all the quote despite all or the part was ordered\n\t} /* inserted line items into sales order details */\n\tadd_audit_trail($order->trans_type, $order_no, $order->document_date);\n\t$Refs->save($order->trans_type, $order_no, $order->reference);\n\n\thook_db_postwrite($order, $order->trans_type);\n\tcommit_transaction();\n\n\tif ($loc_notification == 1 && count($st_ids) > 0)\n\t\tsend_reorder_email($loc, $st_ids, $st_names, $st_num, $st_reorder);\n\treturn $order_no;\n}",
"function uc_order_edit_products_add($form, &$form_state) {\n $form_state['products_action'] = 'products_select';\n $form_state['refresh_products'] = TRUE;\n $form_state['rebuild'] = TRUE;\n $order = $form_state['build_info']['args'][0];\n\n $data = module_invoke_all('uc_add_to_cart_data', $form_state['values']['product_controls']);\n $product = uc_product_load_variant(intval($form_state['values']['product_controls']['nid']), $data);\n $product->qty = isset($form_state['values']['product_controls']['qty']) ? $form_state['values']['product_controls']['qty'] : $product->default_qty;\n\n drupal_alter('uc_order_product', $product, $order);\n uc_order_product_save($order->order_id, $product);\n $order->products[] = $product;\n\n uc_order_log_changes($order->order_id, array('add' => t('Added (@qty) @title to order.', array('@qty' => $product->qty, '@title' => $product->title))));\n\n // Decrement stock.\n if (module_exists('uc_stock')) {\n uc_stock_adjust_product_stock($product, 0, $order);\n }\n\n // Add this product to the form values for accurate tax calculations.\n $form_state['values']['products'][] = (array) $product;\n}",
"public function addPurchaseRequest($purchaseRequest)\n {\n $order = PurchaseRequest::where('created_at', '>=', Carbon::now()->startOfMonth())->withTrashed()->get();\n $purchaseRequestNumber = sprintf(\"%03d\", $order->count() + 1);\n $date = Carbon::today()->format('ym');\n $purchaseRequestNumber = 'PR' . $date . $purchaseRequestNumber;\n\n if (array_key_exists('notifyOnLpoCreation', $purchaseRequest)) {\n $notify = implode(\",\", $purchaseRequest['notifyOnLpoCreation']);\n } else {\n $notify = null;\n }\n $requestDetails = array(\n \"requesterName\" => 1,\n \"requestNo\" => $purchaseRequestNumber,\n \"owner\" => $purchaseRequest['owner'],\n \"remindMeOn\" => $purchaseRequest['remindMeOn'],\n \"departmentId\" => $purchaseRequest[\"departmentId\"],\n \"notifyOnLpoCreation\" => $notify\n );\n $purchaseList = PurchaseRequest::create($requestDetails);\n $id = $purchaseList->id;\n $requests = json_decode($purchaseRequest['request']);\n foreach ($requests as $request) {\n PurchaseRequestItem::create(array(\n 'purchaserequestId' => $purchaseList->id,\n 'prItemCode' => $request->id,\n 'prDescription' => $request->prDescription,\n 'prQty' => $request->prQty,\n \"prPurpose\" => $request->prPurpose,\n ));\n }\n\n $this->generatePdf($id);\n }",
"public function __invoke(AddProductToOrderCommand $command)\n {\n // TODO: sprawdź czy jest dorossly customer->isAdult()\n // TODO: utwórz Zamówienie (Order)\n // TODO: pobierz product z repozytorium\n // TODO: sprawdź czy jest dostępny product->isAvailable()\n // TODO: utwórz quantitty = Quantity::unique(ilość)\n // TODO: dodaj do zamówienia Order->addLine(Identtifier::fromString(prduct->getId()), quantitty)\n\n // TODO: zmień dostępność produktu product->unavailable()\n // TODO: zapisz product do repozytorium productRepository->save(product)\n // TODO: albo wykorzystaj listenera nasłuchującego eventu UniqueProductWasOrdered i w nim zmień dostępność produktu\n }",
"public function purchaseOrderAngularAdd(Request $request)\n { \n \n date_default_timezone_set('Asia/Kolkata'); \n $time = date('d-m-Y h:i:s A');\n \n $status = 'N';\n \n\n $po_no = !empty($request->input('po_no')) ? $request->input('po_no') : 0;\n $po_date = !empty($request->input('po_date')) ? $request->input('po_date') : 0;\n $party_id = !empty($request->input('party_id')) ? $request->input('party_id') : 0;\n $item_id = !empty($request->input('item_id')) ? $request->input('item_id') : 0;\n $qty = !empty($request->input('qty')) ? $request->input('qty') : 0;\n $description = !empty($request->input('description')) ? $request->input('description') : 0;\n \n $purchaseOrderData = [ \n 'po_no' => $po_no,\n 'po_date' => $po_date,\n 'party_id' => $party_id,\n 'item_id' => $item_id,\n 'description' => $description,\n 'qty' => $qty,\n 'status' => $status,\n 'created_at' => $time,\n 'updated_at' => $time,\n 'deleted_at' => $time,\n 'created_by' => 0,\n 'edited_by' => 0,\n 'deleted_by' => 0\n ];\n \n $purhaseOrderModel = new PurhaseOrderModel();\n $purhaseOrderId = $purhaseOrderModel->purhaseOrderInsert($purchaseOrderData);\n\n if (!empty($purhaseOrderId)) {\n\n $itemAttsNames = \n !empty($request->input('attribute_item_ids')) ? explode(',', $request->input('attribute_item_ids')) : 0;\n $attValues = !empty($request->input('values')) ? explode(',',$request->input('values')) : 0;\n \n if (!empty($itemAttsNames)) {\n\n foreach ($itemAttsNames as $key => $itemAtts) {\n\n $itemAttsArrs = [\n 'po_id' => !empty($purhaseOrderId) ? $purhaseOrderId : 0,\n 'item_id' => !empty($item_id) ? $item_id : 0,\n 'attribute_item_id' => !empty($itemAttsNames[$key]) ? $itemAttsNames[$key] : 0,\n 'value' => !empty($attValues[$key]) ? $attValues[$key] : 0,\n 'status' => $status,\n 'created_at' => $time,\n 'updated_at' => $time,\n 'deleted_at' => $time,\n 'created_by' => 0,\n 'edited_by' => 0,\n 'deleted_by' => 0\n ];\n\n $purhaseOrderModel = new PurhaseOrderModel();\n $purhaseOrderModel->purhaseOrderDetailsInsert($itemAttsArrs);\n \n }\n\n }\n\n $uploadPath = public_path('po_image');\n $allowedfileExtension=['pdf','jpg','png','docx'];\n $files = $request->file('filesToUploads');\n if (!empty($files)) {\n foreach($files as $file) {\n $fileName = time().'_'.$po_no.'_'.$file->getClientOriginalName();\n $file->move($uploadPath, $fileName);\n $poImagesArrs = [\n 'po_id' => !empty($purhaseOrderId) ? $purhaseOrderId : 0,\n 'item_id' => !empty($item_id) ? $item_id : 0,\n 'image' => !empty($fileName) ? $fileName : 0,\n 'status' => $status,\n 'created_at' => $time,\n 'updated_at' => $time,\n 'deleted_at' => $time,\n 'created_by' => 0,\n 'edited_by' => 0,\n 'deleted_by' => 0\n ];\n DB::table('purchase_order_image')->insert($poImagesArrs);\n }\n }\n }\n Session::flash('message','Purhase Order has been added.');\n }",
"public function create()\n\t{\n\t\tif (!in_array('createOrder', $this->permission)) {\n\t\t\tredirect('dashboard', 'refresh');\n\t\t}\n\n\t\t$this->data['page_title'] = 'Add Purchase Order';\n\n\t\t$this->form_validation->set_rules('product[]', 'Product name', 'trim|required');\n\n\n\t\tif ($this->form_validation->run() == TRUE) {\n\n\t\t\t$purchase_id = $this->model_purchase->create();\n\n\t\t\tif ($purchase_id) {\n\t\t\t\t$this->session->set_flashdata('success', 'Successfully created');\n\t\t\t\tredirect('purchase/', 'refresh');\n\t\t\t} else {\n\t\t\t\t$this->session->set_flashdata('errors', 'Error occurred!!');\n\t\t\t\tredirect('purchase/create/', 'refresh');\n\t\t\t}\n\t\t} else {\n\t\t\t// false case\n\t\t\t$company = $this->model_company->getCompanyData(1);\n\t\t\t$this->data['company_data'] = $company;\n\t\t\t// $this->data['is_vat_enabled'] = ($company['vat_charge_value'] > 0) ? true : false;\n\t\t\t// $this->data['is_service_enabled'] = ($company['service_charge_value'] > 0) ? true : false;\n\n\n\n\t\t\t$this->data['products'] = $this->model_products->getActiveProductData();\n\t\t\t$this->data['tax_data'] = $this->model_tax->getActiveTax();\n\n\t\t\t$this->data['party_data'] = $this->model_party->getActiveParty();\n\t\t\t$this->data['getlastpurchaseid'] = $this->model_purchase->getLastPurchaseID();\n\n\t\t\t$this->render_template('purchase/create', $this->data);\n\t\t}\n\t}",
"private function saveOrderLine(OrderLine $orderLine)\n {\n $sql = 'INSERT INTO `OrderLine` (`idOrder`, `idVariation`, `amount`, `price`, `tax`)\n VALUES(:idOrder, :idVariation, :amount, :price, :tax)';\n\n $parameters = array(\n 'idOrder' => $orderLine->getIdOrder(),\n 'idVariation' => $orderLine->getProduct()->getSelectedVariation()->getIdVariation(),\n 'amount' => $orderLine->getAmount(),\n 'price' => $orderLine->getPrice(),\n 'tax' => $orderLine->getTax()\n );\n\n Database::query($sql, $parameters);\n\n $idOrderLine = Database::getLastInsertId();\n\n if (!$idOrderLine) {\n return false;\n }\n\n $orderLine->setIdOrderLine($idOrderLine);\n\n return true;\n }",
"public function addLine(Line $line): void\n {\n $this->lines[] = $line;\n }",
"private function storePurchaseOrder() {\n return $this->json('POST', 'api/pch_purchase_order', $this->tempJson);\n }",
"public function show(PurchaseRequestLine $purchaseRequestLine)\n {\n //\n }",
"protected function _addGwOrderAmount($address)\n {\n if (!$address->getGwPrice()) {\n return false;\n }\n $lineNumber = $this->_getNewLineCode();\n $storeId = $address->getQuote()->getStore()->getId();\n //Add gift wrapping price(for entire order)\n $gwOrderAmount = $address->getGwBasePrice();\n\n $line = $this->_getNewDocumentRequestLineObject();\n $line->setLineCode($lineNumber);\n $gwOrderSku = $this->_getConfigHelper()->getGwOrderSku($storeId);\n $line->setItemCode($gwOrderSku ? $gwOrderSku : self::DEFAULT_GW_ORDER_SKU);\n $line->setItemDescription(self::DEFAULT_GW_ORDER_DESCRIPTION);\n $line->setAvalaraGoodsAndServicesType($this->_getGiftTaxClassCode($storeId));\n $line->setNumberOfItems(1);\n $line->setlineAmount($gwOrderAmount);\n $line->setDiscounted('false');\n\n if ($this->_getTaxDataHelper()->priceIncludesTax($storeId)) {\n $line->setTaxIncluded('true');\n }\n\n $this->_lines[$lineNumber] = $line;\n $this->_setLinesToRequest();\n $this->_lineToLineId[$lineNumber] = $gwOrderSku;\n return $lineNumber;\n }",
"public function edit(PurchaseRequestLine $purchaseRequestLine)\n {\n //\n }",
"public function _add()\n {\n $type_code = post_param_string('type_code');\n $object = find_product($type_code);\n\n $amount = post_param_string('amount', '');\n if ($amount == '') {\n $products = $object->get_products(false, $type_code);\n $amount = $products[$type_code][1];\n if ($amount == '?') {\n warn_exit(do_lang_tempcode('INVOICE_REQUIRED_AMOUNT'));\n }\n }\n\n $to = post_param_string('to');\n $member_id = $GLOBALS['FORUM_DRIVER']->get_member_from_username($to);\n if (is_null($member_id)) {\n warn_exit(do_lang_tempcode('_MEMBER_NO_EXIST', escape_html($to)));\n }\n\n $id = $GLOBALS['SITE_DB']->query_insert('invoices', array(\n 'i_type_code' => $type_code,\n 'i_member_id' => $member_id,\n 'i_state' => 'new',\n 'i_amount' => $amount,\n 'i_special' => post_param_string('special'),\n 'i_time' => time(),\n 'i_note' => post_param_string('note')\n ), true);\n\n log_it('CREATE_INVOICE', strval($id), $type_code);\n\n send_invoice_notification($member_id, $id);\n\n $url = build_url(array('page' => '_SELF', 'type' => 'outstanding'), '_SELF');\n return redirect_screen($this->title, $url, do_lang_tempcode('SUCCESS'));\n }",
"protected function new_line()\n {\n }",
"function add_product_to_order($id_order,$id_product,$sauce){\r\n $bdd = Database3Splus::getinstance();//connexion();\r\n $amount = 1;\r\n $req = \"INSERT INTO order_details VALUES (:id_order, :id_product, :amount, :sauce)\";\r\n $result = $bdd->prepare($req);\r\n $result->bindParam(':id_order', $id_order);\r\n $result->bindParam(':id_product', $id_product);\r\n $result->bindParam(':amount', $amount);\r\n $result->bindParam(':sauce', $sauce);\r\n $result->execute();\r\n $count = $result->rowCount();\r\n\t\tif($count != 0){return TRUE;}\r\n\t\telse{return FALSE;}\r\n\t}",
"public function createCustomOrder()\n {\n AutoEvent::select('custom_order')->increment('custom_order', 1);\n $this->custom_order = 0;\n }",
"private function create_order_record($id_order) {\n $aux['details'] = $this->m_orders_overview->get_details($id_order);\n\n $record['id_order'] = null; // auto-increment\n $record['id_menu_order'] = $id_order;\n $record['id_table'] = $aux['details'][0]->id_table;\n $record['id_count_ks'] = $aux['details'][0]->id_count_ks;\n $record['date_pay'] = date(\"Y-m-d\");\n\n $record['id_employee'] = $aux['details'][0]->id_employee;\n $record['pay_method'] = 'hotovost';\n $record['sum_price'] = $aux['details'][0]->price;\n $record['is_closed'] = 0;\n\n $this->m_orders_overview->insert_new_order_record($record);\n }",
"public function addToCart(): void\n {\n //añadimos un Item con la cantidad indicada al Carrito\n Cart::add($this->oferta->id, $this->product->name, $this->oferta->getRawOriginal('offer_prize'), $this->quantity);\n //emite al nav-cart el dato para que lo actualize\n $this->emitTo('nav-cart', 'refresh');\n }",
"public function addInstruction($instruction)\n {\n $this->order->addInstruction($instruction);\n }",
"private function addToCart () {\n }",
"private function addToCart () {\n }",
"function wc_sample_xml_get_line_items( $order ) {\n \n \t//connect\n \t\tUse Wp\n\t//output the product elements from the order\n\tforeach( $order->get_items() as $item_id => $item_data ) {\n \t\t $OrderId = $order->id; \n\t\t //grab the data we need\n\t$query = \"Request to grab data from bd based on the $OrderId\";\n\t\t $sql = $connexion->query($query);\t \n\t\t $curData = array();\n \t $count = 0;\n\n\t\t //data specific info for each line item\n\n while($Ca = $sql -> fetch()) {\n\t\t\t $curData[] = $Ca;\n\t\t\t $count ++;\n\t\t\t}\n\t\t\t//If the product ned some customizations before generating the xml\n \tif ($count >0){\n\t\t\t //Format the file name and replace spaces by \"-\"\n\t\t\t $titlePath = sanitize_title( trim($ItemName) );\n\t\t\t $title = $order_idmeta.'_order_item_generated';\n\t\t\t $filePath = content_url('/fancy_products_orders/images/'.$OrderId.'/'.$order_idmeta.'/'.$title.'.png');\n\t\t\t //If the item's image is not generated\n\t\t\t $urlLiveSite = 'http://www.yourWebsite.com/';\n\t\t\t $NofilePath = ($urlTestSite.'/'.$pathElement.'/'.$titlePath);\n\t\t\t //Check if the file physically exists\n\t\t\t if (file($filePath)) {\n\t\t\t $png_url = array('Source'\t=> $filePath);\n\t\t\t } \n\t\t\t else {\n\t\t\t $png_url = array('Source'\t=> $NofilePath);\n\t\t\t }\n\n\t\t$product = $order->get_product_from_item( $item_data );\n\t\t//This is the final xml customized \n\t\t$items[] = array(\n\t\t\t'LineNumber'\t\t\t\t=> $LineNumber,\n\t\t\t'ProductCode'\t\t\t\t=> $ProductCode,\n\t\t\t'ProductUPC'\t\t\t\t=> '0004-2478',\n\t\t\t'ItemDescription'\t\t\t=> $ItemName,\n\t\t\t'Quantity'\t\t\t\t\t=> $item_data['qty'],\n\t\t\t//we need to write a function that grabs the image URL, store the url as a variable and then pass it as the value here\n\t\t\t'FileList' \t\t\t=> $png_url,\n\t\t);\n\t } //end if\n\t} //end for\n}",
"protected function echoLine(&$addto, $text = \"\")\r\n\t{\r\n\t\t$addto .= $text . \"\\r\\n\";\r\n\t}",
"public function addToCart()\n\t{\n\t\t$recordId = $this->request->getInteger('record');\n\t\t$amount = $this->request->getInteger('amount', 1);\n\t\tif ($this->cart->has($recordId)) {\n\t\t\t$this->cart->add($recordId, $amount);\n\t\t} else {\n\t\t\t$this->cart->set($recordId, $amount, [\n\t\t\t\t'priceNetto' => (float) $this->request->get('priceNetto', 0.0),\n\t\t\t\t'priceGross' => (float) $this->request->get('priceGross', 0.0),\n\t\t\t]);\n\t\t}\n\t\t$this->saveCart();\n\t}",
"public function add($orderedProduct){\n\t\twhile(array_key_exists($orderedProduct->getId(), $this->Contents)){\n\t\t\t$orderedProduct->regenerateId();\n\t\t}\n\t\t$this->Contents[$orderedProduct->getId()] = $orderedProduct;\n\t\t$this->cleanUp();\n\t}"
]
| [
"0.6885919",
"0.66308165",
"0.6611013",
"0.6476136",
"0.6369688",
"0.6345259",
"0.61900735",
"0.61795264",
"0.61620986",
"0.61174965",
"0.60538375",
"0.6024174",
"0.6020273",
"0.5987587",
"0.59862834",
"0.595769",
"0.5942507",
"0.5928958",
"0.5904341",
"0.58769596",
"0.58012646",
"0.57681245",
"0.57666516",
"0.5736973",
"0.5736702",
"0.5736634",
"0.5734739",
"0.57112694",
"0.5710985",
"0.5708648",
"0.5706228",
"0.5702481",
"0.5701088",
"0.5684678",
"0.5678975",
"0.5674353",
"0.56719726",
"0.5662607",
"0.5661544",
"0.5660624",
"0.5640649",
"0.5637978",
"0.56205964",
"0.56120324",
"0.5601696",
"0.5589314",
"0.55882925",
"0.5587816",
"0.5583362",
"0.5580114",
"0.55559516",
"0.5552774",
"0.55449945",
"0.55315584",
"0.55231667",
"0.5521498",
"0.55176085",
"0.55149364",
"0.5511937",
"0.54477096",
"0.54461217",
"0.5438355",
"0.54285896",
"0.5421053",
"0.54206914",
"0.5411842",
"0.5400749",
"0.53984827",
"0.5390571",
"0.5379218",
"0.5377786",
"0.53755856",
"0.53721136",
"0.5371942",
"0.5366935",
"0.536548",
"0.5364881",
"0.535649",
"0.53561825",
"0.5354284",
"0.53488415",
"0.5348485",
"0.5339988",
"0.5336428",
"0.53327066",
"0.5332572",
"0.53313124",
"0.5330491",
"0.5328821",
"0.5310423",
"0.5296393",
"0.52871716",
"0.52862567",
"0.528379",
"0.52792233",
"0.52792233",
"0.5278914",
"0.52759445",
"0.5274882",
"0.52740574"
]
| 0.64698493 | 4 |
Get queue name for this worker | public function getQueue()
{
return "campaign-{$this->campaign->id}-worker-{$this->id}";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getQueueName();",
"public function getQueueName()\n {\n return $this->queueName;\n }",
"abstract public function getQueueName();",
"public function queueName()\n {\n if (!$this->tasksQueue) {\n $this->initializeTasksQueue();\n }\n \n return $this->tasksQueue->queueName();\n }",
"protected function getQueueName()\n {\n // TODO: Implement getQueueName() method.\n }",
"protected function getQueueName()\n {\n return __CLASS__;\n // TODO: Implement getQueueName() method.\n }",
"public function queue(): string\n {\n return $this->queue;\n }",
"protected function getConfiguredQueueClassName() {\n\t\t$className = $this->getObjectFactory()\n\t\t\t->getConfiguration()\n\t\t\t->getImplementationConfiguration()\n\t\t\t->get(ImplementationConfiguration::OBJECT_CLASS_QUEUE);\n\t\treturn $className;\n\t}",
"protected function getQueue($queue)\n {\n return $queue ?: $this->defaultName;\n }",
"public function getQueue($queue)\n {\n return $queue ?: 'default';\n }",
"public function queueId()\n {\n return $this->queueId;\n }",
"public function getQueueId()\n {\n $rtn = $this->data['queue_id'];\n\n return $rtn;\n }",
"public function getWorkerName()\n {\n return $this->work_name;\n }",
"public function getQueueId();",
"private static function getQueueTableName() {\n global $wpdb;\n return $wpdb->prefix . self::$NOTIFICATION_QUEUE_TABLE_NAME;\n }",
"public function getConsumerName()\n {\n return $this->queueName;\n }",
"function getQueueTitle( $queue ) {\n\t\t$query = \"SELECT rs.`title` AS queue FROM `\".BIT_DB_PREFIX.\"task_roomstat` rs WHERE rs.`terminal` = 80 + $queue\";\n\t\treturn $this->mDb->getOne( $query );\n\t}",
"public function getQueueName($topicName)\n {\n return self::RESPONSE_QUEUE_PREFIX . str_replace('-', '_', $topicName);\n }",
"public function get_queue()\n\t\t{\n\t\t\treturn $this->queue;\n\t\t}",
"public function getQueue()\n {\n return $this->queue;\n }",
"public function getQueue()\n\t{\n\t\treturn $this->queue;\n\t}",
"public function Name() {\n\t\treturn $this->jobId;\n\t}",
"public function getQueue()\n {\n return isset($this->Queue) ? $this->Queue : null;\n }",
"public function getQueue() {\n return $this->_queue;\n }",
"public function getQueue($queue)\n {\n return $queue ?: $this->default;\n }",
"public function getQueue($queue)\n {\n return $queue ?: $this->default;\n }",
"public function getQueueableConnection()\n {\n return $this->_getConnection()->getName();\n }",
"private function getMessageQueueId()\n {\n if(!isset($this->collectionQueueKey))\n {\n $this->collectionQueueKey = floor(microtime(true) * 100000);\n }\n return $this->collectionQueueKey;\n }",
"public function getQueueToken() {\n return filter_input(INPUT_GET, 'queueittoken');\n }",
"public function getQueue()\n {\n return $this->doRequest('GET', \"queue\", []);\n }",
"public function queue($name = null);",
"public function resolveQueue(string $name): string\n {\n return $this->resolveConnection('queue', $name);\n }",
"public function getQueueConnection()\n {\n return config('workflows.queue');\n }",
"public function getQueue()\n {\n /** @var WebApplication|ConsoleApplication $this */\n return $this->get('queue');\n }",
"public function getThreadName() : mixed\n {\n if ($this->threadName === null) {\n $this->threadName = (string)getmypid();\n }//end if\n \n return $this->threadName;\n \n }",
"public function get_name() {\n return get_string('scheduledtasks', 'local_scheduledtasks');\n }",
"protected function getWorkerMethodName($workerName) {\n\t\t$name = array();\n\t\t$config = new Gearman_Config();\n\t\t$usageName = $config->getUser();\n\t\t$usageName = trim($usageName);\n\t\t$usageName = preg_replace('~\\s~', '', $usageName);\n\t\t$isDev = Registry::get(Registry::IS_DEVELOPMENT_MODE);\n\n\t\tif (false === $isDev) {\n\t\t\t$usageName = 'live';\n\t\t}\n\n\t\t$name[] = strtolower($workerName);\n\t\t$name[] = $isDev ? 'development' : 'productive';\n\t\t$name[] = $usageName;\n\t\t$name[] = 'gearman_worker';\n\n\t\t$result = implode('_', $name);\n\t\treturn $result;\n\t}",
"public function getName()\n\t{\n\t\treturn $this->process;\n\t}",
"public function getQueueId() : ?int\n {\n $rtn = $this->data['queue_id'];\n\n return $rtn;\n }",
"public function getQueue() {\n\t\treturn null;\n\t}",
"public function getTaskName() : string\n {\n return $this->taskName;\n }",
"protected function _getTaskName()\n {\n $name = explode(':', $this->getName());\n\n return $name[1];\n }",
"public function getJob(): string\n {\n return $this->job;\n }",
"public function get_task_name()\n\t{\n\t\treturn $this->task_name;\n\t}",
"public function get_task_name()\n\t{\n\t\treturn $this->task_name;\n\t}",
"public function getAdapterFullName()\n {\n return '\\ZendQueue\\Adapter\\\\' . $this->getAdapterName();\n }",
"public function getTaskName() : string {\n return $this->taskName;\n }",
"public function getAppQueue()\n {\n return $this->get(self::_APP_QUEUE);\n }",
"public function getAppQueue()\n {\n return $this->get(self::_APP_QUEUE);\n }",
"private function getQueue($name)\n {\n\n if (!$this->hasQueue($name)) {\n $this->queues[$name] = new EventQueue();\n }\n\n return $this->queues[$name];\n }",
"public function getTaskName()\n {\n return $this->taskName;\n }",
"protected function getQueueTable()\n {\n return $this->getTable('queue');\n }",
"public function dequeueJob() {\n $jobKey = $this->getNextJob();\n\n // don't attempt to dequeue or update any stats if there are no jobs left\n if ($jobKey) {\n // remove job from queue\n $this->client->zrem(self::JOB_QUEUE_NAME, $jobKey);\n\n // update time job was processed in the hash\n $this->client->hset($jobKey, \"processed\", time());\n\n $jobDetails = $this->client->hgetall($jobKey);\n\n $this->client->incr(\"num_jobs_processed\");\n $this->client->incrby(\"total_processing_time\", $jobDetails['processed'] - $jobDetails['submitted']); \n }\n\n return $jobKey;\n }",
"public function getQueueableId()\n {\n $key = $this->getKey();\n\n return is_array($key) ? implode('-', $key) : $key;\n }",
"public function getName()\n {\n return $this->scheduleTypeName;\n }",
"public function getJobName() : string\n {\n if (is_null($this->jobName)) {\n throw new \\Error(__(\"Not valid value for jobName.\"));\n }\n\n return (string)$this->getConfigValue($this->jobName) . \"-\" . date('YmdHis');\n }",
"public function getQueueableId()\n {\n return $this->getKey();\n }",
"public function getWorker()\n {\n return $this->worker;\n }",
"public function getWorker()\n {\n return $this->worker;\n }",
"public function getJobId()\n\t{\n\t\treturn Arr::last(explode('/', request()->header('X-AppEngine-TaskName')));\n\t}",
"public function getQueue();",
"public function getQueue();",
"public function getWorkerId()\n {\n return $this->worker_id;\n }",
"public function getWorkerId()\n {\n return $this->worker_id;\n }",
"public function getWorkerId()\n {\n return $this->worker_id;\n }",
"public function getNameTask()\n {\n return $this->name_task;\n }",
"public function getNextQueuedJob() {\n \t}",
"public function getName()\n\t{\n\t\treturn $this->name ?: class_basename($this);\n\t}",
"protected static function bucket_name() {\n\t\tif(isset(static::$_bucket_name)) {\n\t\t\treturn static::$_bucket_name;\n\t\t} else {\n\t\t\t$class_parts = explode('\\\\', strtolower(get_class(new static())));\n\t\t\tstatic::$_bucket_name = array_pop($class_parts);\n\t\t}\n\t\treturn static::$_bucket_name;\n\t}",
"public function get_name() {\n return \\enrol_oes_string::display('sync_taskname');\n }",
"public function getQueue()\n {\n return new Queue($this);\n }",
"public function getBucketName()\n {\n return $this->data['bucket'];\n }",
"public function getName() {\n\t\treturn $this->current_name;\n\t}",
"public function getName()\n\t{\n\t\tif ($this->frozen) {\n\t\t\treturn $this->__call(__FUNCTION__, func_get_args());\n\t\t}\n\t\treturn $this->name;\n\t}",
"public function getSchedulename()\n {\n return $this->name;\n }",
"public function getName():string\n\t{\n\t\treturn $this->channelName;\n\t}",
"public function setQueueName($string)\n {\n $this->queueName = (string) $string;\n }",
"public function getGuildAppQueue()\n {\n return $this->get(self::_GUILD_APP_QUEUE);\n }",
"public function className(): string\n {\n return $this->taskClass->name();\n }",
"public function getQueue(): Queue;",
"function get_queue_url($region, $queue_name)\n {\n $sqs_client = new Aws\\Sqs\\SqsClient([\n 'version' => 'latest',\n 'region' => \"$region\"\n ]);\n\n try\n {\n $sqs_info = $sqs_client->getQueueUrl([\n 'QueueName' => \"$queue_name\"\n ]);\n return $sqs_info[\"QueueUrl\"];\n }\n catch(\\Aws\\Sqs\\Exception\\SqsException $sqs_exception)\n {\n echo \"Queue: $queue_name does not exist, please create required queue by running the create-app-env.sh script\\n\";\n exit(1);\n }\n }",
"public function getJobTypeName(): ?string\n {\n return $this->jobTypeName;\n }",
"protected function getWorker()\n {\n return $this->worker;\n }",
"public function getName(): string\n {\n return $this->fqsen->getName();\n }",
"static public function get_name_string() {\n return get_string(self::NAME_CODE_STRING, 'gradereport_progress');\n }",
"public function getBucketName()\n {\n return $this->bucket_name;\n }",
"public function getQueuePosition() {\n if ($this->queue_position === null) {\n return $this->loadQueueStatus();\n }\n return $this->queue_position;\n }",
"public function getName()\n\t{\n\t\treturn $this->getContext()->getI18n()->dt( 'controller/jobs', 'Removes unfinished orders' );\n\t}",
"public function getName()\n {\n return $this->name instanceof LocalizedStringBuilder ? $this->name->build() : $this->name;\n }",
"public function getName()\n {\n return $this->name instanceof LocalizedStringBuilder ? $this->name->build() : $this->name;\n }",
"public function getName()\n {\n return $this->name instanceof LocalizedStringBuilder ? $this->name->build() : $this->name;\n }",
"public function getName()\n {\n return $this->str_name;\n }",
"public function getBucketName()\n {\n return $this->bucketname;\n }",
"function getQueue($id);",
"public function getName() {\n return $this->commandName;\n }",
"public function getName() {\n\t\treturn NodePaths::getNodeNameFromPath($this->path);\n\t}",
"public function getBucket()\n {\n return $this->bucket ?? Str::snake(Str::pluralStudly(class_basename($this)));\n }",
"public function getJobId()\n {\n return (string) $this->job->getMessageId();\n }",
"public function getQueueId() {\n\t\t$db = JFactory::getDbo();\n\t\t$query = \"SELECT * FROM joomla3_queue ORDER BY queue_id DESC \";\n\n\t\t$db->setQuery($query, 0, 1);\n\t\t$rows_id = $db->loadAssoc();\n\n//\t\t$electrical_id = $row['electrical_status'];\n if($rows_id == \"\"){ //while the electrical table has delete or anyway trouble but the time will update\n\t\t\t/*$db = JFactory::getDbo();\n\t\t $query = \"select * from #__electrical where datetime > $time_pos ORDER BY electrical_id ASC\";\n\t\t\t$db->setQuery($query,0, $limit);\n\t\t $rows = $db->loadAssocList();\n\t\t\t*/\n\t\t}else{\n\t\t\t$queue_id = $rows_id['queue_id'];\n\t\t return $queue_id;\n\t\t\t\n\t\t}\t\n\t}",
"public function getName()\n {\n $value = $this->get(self::NAME);\n return $value === null ? (string)$value : $value;\n }"
]
| [
"0.88061106",
"0.8572027",
"0.83973193",
"0.8380574",
"0.8339543",
"0.81116146",
"0.7566697",
"0.7430799",
"0.7392727",
"0.73017645",
"0.71196204",
"0.6981879",
"0.6930494",
"0.68732697",
"0.6804696",
"0.6800036",
"0.679377",
"0.674466",
"0.668272",
"0.6667099",
"0.6571101",
"0.65601087",
"0.65151507",
"0.64755136",
"0.6445057",
"0.6445057",
"0.64201057",
"0.6359241",
"0.629655",
"0.62953573",
"0.6185631",
"0.61741453",
"0.6169303",
"0.61383504",
"0.61225176",
"0.60494065",
"0.6046747",
"0.59999555",
"0.59950334",
"0.59836245",
"0.5968506",
"0.5960014",
"0.59560364",
"0.59512985",
"0.59512985",
"0.5949877",
"0.5949226",
"0.5946029",
"0.5946029",
"0.58827597",
"0.5838238",
"0.5820146",
"0.5794103",
"0.57890224",
"0.5779744",
"0.5772911",
"0.5770177",
"0.57517886",
"0.57517886",
"0.5738509",
"0.57313395",
"0.57313395",
"0.57280093",
"0.57280093",
"0.57280093",
"0.5714116",
"0.5709982",
"0.56898737",
"0.56650597",
"0.5650606",
"0.5648935",
"0.5629816",
"0.5626228",
"0.56208265",
"0.56047803",
"0.56047314",
"0.5595825",
"0.5592939",
"0.5591696",
"0.55775917",
"0.5571719",
"0.5571064",
"0.5569658",
"0.55590796",
"0.5546761",
"0.55379474",
"0.5535007",
"0.553463",
"0.5527906",
"0.5527906",
"0.5527906",
"0.55223477",
"0.55217046",
"0.55210674",
"0.5520066",
"0.5513771",
"0.5513293",
"0.5511805",
"0.5503553",
"0.5502845"
]
| 0.8006068 | 6 |
Show a graphical display of the campaign's Synced state. | public function displaySynced()
{
if ($this->is_synced) {
return '<i style="font-size:25px;color:#449D44;" class="fa fa-check" aria-hidden="true"></i>';
} else {
return '<i style="font-size:25px;color:#C9302C;" class="fa fa-times" aria-hidden="true"></i>';
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function _getSyncStatusText()\n {\n if ($this->_getSchedule()->getLastRunningJob()) {\n $html = 'Running';\n if (strlen($this->_getSchedule()->getLastRunningJob()->getExecutedAt())) {\n $html .= ' (Started at: ';\n $html .= Mage::helper('core')->formatDate($this->_getSchedule()->getLastRunningJob()->getExecutedAt(), 'medium', true);\n $html .= ') ';\n\n /**\n * Show stop sync button\n */\n $html .= $this->_getStopSyncButton();\n }\n } elseif ($this->_getSchedule()->getLastPendingJob()) {\n $html = 'Pending';\n if (strlen($this->_getSchedule()->getLastPendingJob()->getScheduledAt())) {\n $html .= ' (Scheduled at: ';\n $html .= Mage::helper('core')->formatDate($this->_getSchedule()->getLastPendingJob()->getScheduledAt(), 'medium', true);\n $html .= ')';\n }\n } else {\n $html = 'Not scheduled';\n /**\n * Show reset sync customers button\n */\n }\n\n return $html;\n }",
"public function getGraphicStateSync() {}",
"public function renderWaiting()\n\t{\n\t\tif (!$this->configuration->isRunned())\n\t\t{\n\t\t\t$this->events->triggerListener('onRendererWaitingStart');\n\t\t\t$uri = $this->link->createLink($this->configuration, array(\n\t\t\t\t'setRunned' => true,\n\t\t\t));\n\t\t\techo Html::el('h2')->add(Html::el('a', 'START')->href($uri));\n\t\t\techo '<p style=\"display: none;\" id=\"sentence\" data-state=\"waiting\">Waiting for start</p>';\n\t\t\t$this->events->triggerListener('onRendererWaitingEnd');\n\t\t}\n\t}",
"function printState() {\n\t\t$state = $this->getState();\n\t\techo $state;\n\n\t\n\t}",
"public function show(NRCState $nRCState)\n {\n //\n }",
"public function setGraphicStateSync($graphicStateSync) {}",
"public function display_status() {\n\t\t$banner_status = get_option( 'cookieproCCPASettingsPreview' );\n\t\t$banner_behavior_status = get_option( 'cookieproCCPABehaviorSettingsPreview' );\n\t\t$this->settings_status = 'Draft';\n\t\t$this->settings_publish_time = '';\n\t\tif( ! empty( $banner_status ) && ! empty( $banner_behavior_status ) ){\n\t\t\tif ( 'Published' === $banner_status['publishStatus'] && 'Published' === $banner_behavior_status['publishStatus'] ) {\n\t\t\t\t$this->settings_status = 'Published';\n\t\t\t}\n\t\t\t$this->settings_publish_time = $banner_status['lastPublished'];\n\t\t}\n\t\treturn array(\n\t\t\t'status' => $this->settings_status,\n\t\t\t'lastpublished' => $this->settings_publish_time,\n\t\t);\n\t}",
"public function standings()\n {\n return view('standings.realtime');\n }",
"public function render() {\n\t\t$supportUrl = 'https://wpml.org/forums/forum/english-support/?utm_source=plugin&utm_medium=gui&utm_campaign=wpmltm';\n\t\t$supportLink = '<a target=\"_blank\" rel=\"nofollow\" href=\"' . esc_url( $supportUrl ) . '\">'\n\t\t . esc_html__( 'contact our support team', 'wpml-translation-management' )\n\t\t . '</a>';\n\n\n\t\t?>\n\t\t<div id=\"ams-ate-console\">\n\t\t\t<div class=\"notice inline notice-error\" style=\"display:none; padding:20px\">\n\t\t\t\t<?php echo sprintf(\n\t\t\t\t// translators: %s is a link with 'contact our support team'\n\t\t\t\t\tesc_html(\n\t\t\t\t\t\t__( 'There is a problem connecting to automatic translation. Please check your internet connection and try again in a few minutes. If you continue to see this message, please %s.', 'wpml-translation-management' )\n\t\t\t\t\t),\n\t\t\t\t\t$supportLink\n\t\t\t\t);\n\t\t\t\t?>\n\t\t\t</div>\n\t\t\t<span class=\"spinner is-active\" style=\"float:left\"></span>\n\t\t</div>\n\t\t<script type=\"text/javascript\">\n\t\t\tsetTimeout(function () {\n\t\t\t\tjQuery('#ams-ate-console .notice').show();\n\t\t\t\tjQuery(\"#ams-ate-console .spinner\").removeClass('is-active');\n\t\t\t}, 20000);\n\t\t</script>\n\t\t<?php\n\t}",
"public function run()\n {\n return view('microboard::state', [\n 'config' => $this->config,\n 'title' => 'إعلانات قادمة',\n 'info' => 'لم يأتي وقت بداية ظهور هذه الإعلانات',\n 'icon' => 'fa fa-images',\n 'count' => Advertisement::whereDate('started_at', '>', now()->toDateString())->count(),\n ]);\n }",
"public function draw_toggle ()\n {\n echo $this->toggle_as_html ();\n }",
"public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }",
"function dashboard_widget_display() {\n\t\techo '<div class=\"escalate-dashboard-loading\">Loading Stats</div>';\n\t}",
"public function scheduler() {\n\n\t\t$user = \\Auth::User();\n\n\t\t$station_id = $user->station->id;\n//\t\t$talk_shows = \\App\\ConnectContent::where('content_type_id', ContentType::GetTalkContentTypeID())\n//\t\t\t->orderBy('start_date')\n//\t\t\t->where('station_id', $station_id)\n//\t\t\t->get();\n\n\t\treturn view('airshrconnect.scheduler')\n\t\t\t->with('WebSocketURL', \\Config::get('app.WebSocketURL'))\n\t\t\t->with('content_type_list', ContentType::$CONTENT_TYPES)\n\t\t\t->with('content_type_list_for_connect', ContentType::$CONTENT_TYPES_FOR_CONNECT)\n\t\t\t->with('content_type_id_for_talkshow', ContentType::GetTalkShowContentTypeID());\n//\t\t\t->with('talk_shows', $talk_shows);\n\n\t}",
"function ghactivity_sync_settings_callback() {\n\techo '<p>';\n\tesc_html_e( 'By default, Ghactivity only gathers data about the last 100 issues in your watched repositories, and then automatically logs all future issues. This section will allow you to perform a full synchronization of all the issues, at once.', 'ghactivity' );\n\techo '</p>';\n}",
"public function showUpdateNotification(){\n\t\techo $this->getUpdateNotification();\n\t}",
"function debug_output() {\n\t\tglobal $ac_tos_response, $ac_status_response;\n\t\t$response = 'tos' == $_GET['ac_debug'] ? $ac_tos_response : $ac_status_response;\n\t\tif ( empty( $response ) ) {\n\t\t\t$response = 'No response from API :(';\n\t\t} else {\n\t\t\t$response = print_r( $response, 1 );\n\t\t}\n\n\t\t$tos = $this->get_option( 'tos' ) ?\n\t\t\t'<span style=\"color:green;\">Yes</span>' :\n\t\t\t'<span style=\"color:red;\">No</span>';\n\t\t$status = $this->get_option( 'wordads_approved' ) ?\n\t\t\t'<span style=\"color:green;\">Yes</span>' :\n\t\t\t'<span style=\"color:red;\">No</span>';\n\t\t$house = $this->get_option( 'wordads_house' ) ? 'Yes' : 'No';\n\n\t\t$type = $this->get_option( 'tos' ) && $this->get_option( 'wordads_approved' ) ?\n\t\t\t'updated' :\n\t\t\t'error';\n\n\t\techo <<<HTML\n\t\t<div class=\"notice $type is-dismissible\">\n\t\t\t<p>TOS: $tos | Status: $status | House: $house</p>\n\t\t\t<pre>$response</pre>\n\t\t</div>\nHTML;\n\t}",
"public function setSyncTime(): void\n {\n }",
"public function toggleShowTimer(): void\n {\n $this->showTimer = !$this->showTimer;\n }",
"public function getStateText()\n {\n $options = $this->getStateOptions();\n return isset($options[$this->state]) ? $options[$this->state] : '';\n }",
"public function actionStatewiseevaluation()\n {\n return $this->render('statewise-evaluation-report');\n }",
"function display () {\n\t\t// So that if we're displaying a list of reports that are\n\t\t// available for editing, it's accurate.\n\t\t$this->_update_locked();\n\t\n\t\t$data = $this->_get_data_by_recent ();\n\t\t\n\t\t$this->render($data);\n\t\n\t}",
"public function Render() {\r\n\t\t\treturn $this->RenderOnOff();\r\n\t\t}",
"public function display() {\n $actions = array();\n $html = '';\n if ( !$this->get_client_id() || !$this->get_client_secret() ) {\n $html .= $this->get_client_secret_form_view();\n } else {\n $this->oauth_access();\n\n if ( $this->is_connected() ) {\n $html .= $this->get_profile_details_view();\n\n $html .= $this->get_timezone_info_view();\n\n $html .= $this->get_options_form_view();\n\n $actions[] = 'logout';\n } else {\n $html .= $this->get_access_form_view();\n }\n\n $actions[] = 'delete-secret';\n }\n\n if ( !!$actions ) {\n $args = array(\n 'actions' => $actions,\n 'google_calendar' => $this,\n );\n\n $html .= $this->get_view( 'actions.php', $args );\n }\n\n echo $html;\n }",
"public function getShowTime()\n\t{\n\t\treturn $this->showtime;\n\t}",
"function dashboard_widget() {\n\t\tif(!empty($this->options['stats_last_cache'])):\n\t\t\t$last_cache = '<em>Last Updated ' . date(\"m/d/y @ h:i:s\", $this->options['stats_last_cache']) . '</em>';\n\t\telse:\n\t\t\t$last_cache = '';\n\t\tendif;\n\t\twp_add_dashboard_widget('escalate_network_stats', 'Escalate Network Stats'.$last_cache, array($this,'dashboard_widget_display'));\t\n\t}",
"private function render_settings() {\n\t\t?>\n\t\t<div class=\"wrap\">\n\t\t\t<h1><?php esc_html_e( 'Network Mail', 'simple-smtp' ); ?></h1>\n\t\t\t<form action='edit.php?action=wpsimplesmtpms' method='post'>\t\n\t\t\t\t<?php\n\t\t\t\twp_nonce_field( 'simple-smtp-ms' );\n\t\t\t\tdo_settings_sections( 'wpsimplesmtp_smtp_ms' );\n\t\t\t\tsubmit_button();\n\t\t\t\t?>\n\t\t\t</form>\n\t\t</div>\n\t\t<?php\n\t}",
"public function displayAjaxChangeBlockStatus()\n {\n $now = new DateTime();\n $psreassuranceId = (int) Tools::getValue('idpsr');\n $newStatus = ((int) Tools::getValue('status') == 1) ? 0 : 1;\n\n $dataToUpdate = [\n 'status' => $newStatus,\n 'date_upd' => $now->format('Y-m-d H:i:s'),\n ];\n $whereCondition = 'id_psreassurance = ' . $psreassuranceId;\n\n $updateResult = Db::getInstance()->update('psreassurance', $dataToUpdate, $whereCondition);\n\n // Response\n $this->ajaxRenderJson($updateResult ? 'success' : 'error');\n }",
"public function getStateTime();",
"public function form( $instance ) {\n\t\t$useServerTime = $instance['useServerTime'];\n\t\t?>\n <p>\n <label for=\"<?php echo esc_attr( $this->get_field_id( 'useServerTime' ) ); ?>\">Use Server Time</label>\n <input type=\"checkbox\" id=\"<?php echo esc_attr( $this->get_field_id( 'useServerTime' ) ); ?>\"\n name=\"<?php echo esc_attr( $this->get_field_name( 'useServerTime' ) ); ?>\"\n value=\"1\" <?php if ( $useServerTime ) {\n\t\t\t\techo \" checked=\\\"checked\\\"\";\n\t\t\t} ?>>\n </p>\n\t<?php }",
"public function getDisplay() {\n\t\treturn parent::getDisplay();\n\t}",
"public function display() {\n return false;\n }",
"public function display() {\n return false;\n }",
"public function print_session_instructions() {\n\n\t\t$main_site_url = trailingslashit( conference_schedule()->get_network_site_url() );\n\t\t$view_proposal_url = add_query_arg( 'post_type', 'proposal', $main_site_url . 'wp-admin/edit.php' );\n\t\t$view_profile_url = add_query_arg( 'post_type', 'profile', $main_site_url . 'wp-admin/edit.php' );\n\n\t\t?>\n <div class=\"wpc-inside-mb\">\n <ul>\n <li>All of our session information is managed on our main site as <a href=\"<?php echo $view_proposal_url; ?>\" target=\"_blank\">proposals</a> and <a href=\"<?php echo $view_profile_url; ?>\" target=\"_blank\">speaker profiles</a>.</li>\n <li>This page only manages event-specific information, e.g. date, time, location, etc.</li>\n <li>For event sessions, choose which proposal you'd like to use in the \"The Basics\" meta box.</li>\n <li>The proposal information will auto-populate the schedule where needed, including speaker information.</li>\n <li>Any text you add to the main editor will be placed <em>above</em> the proposal's description.</li>\n <li>For all non-session event types, e.g. opening remarks or lunch, choose the \"Basic\" event type.</li>\n <li>Use the \"Edit Proposal\" meta box to edit the selected proposal and to clear it's information in our cache.</li>\n </ul>\n </div>\n\t\t<?php\n\t}",
"function getTableStateChart()\n{\n\tglobal $dbObjMirrors;\n\n\t$RCCAQuery = \"SELECT * FROM [mirrors].[dbo].[View_LSIP2_RCCA] ORDER BY id DESC\";\n\n\t$RCCAResult = $dbObjMirrors->executeQuery($RCCAQuery);\n\n\treturn $RCCAResult;\n}",
"public function show(Remittance $remittance)\n {\n //\n }",
"public function getTimeDisplay()\n {\n return $this->timeDisplay;\n }",
"public function present() {\n\t\t$data = [\n\t\t\t'key'=>$this->key,\n\t\t\t'team'=>$this->team,\n\t\t\t'views'=>$this->views,\n 'after'=>$this->after\n\t\t];\n\n\t\tif($this->cards !== null) {\n\t\t $data['cards'] = $this->cards;\n }\n\n\t\t$json = htmlspecialchars(json_encode($data), ENT_NOQUOTES);\n\t\treturn <<<HTML\n<div class=\"cl-trello-sprinter\" style=\"display:none\">$json</div>\t\t\nHTML;\n\t}",
"private function showWhyRequestForm() { $this->config->showPrinterFriendly = false;\r\n echo '<h2>Why are you requesting time?</h2>';\r\n $this->showTimeTypeDropDown();\r\n echo '<br/><br/><br/>';\r\n }",
"function ac_display_contact_sync() {\n if( ! current_user_can( 'manage_options' ) ) {\n return;\n }\n ob_start();\n ?>\n <a href=\"<?php echo wp_nonce_url( add_query_arg( array( 'ac_action' => 'maybe_contact_sync' ) ), 'ac-contact-sync' ); ?>\" class=\"button-secondary\" title=\"<?php _e( 'Sync Contacts', 'ac' ); ?> \"><?php _e( 'Sync Contacts', 'ac' ); ?></a>\n <label><?php _e( 'This button syncs your WordPress users with ActiveCampaign. If an entry doesn\\'t exist, then one is created for that email address.', 'ac' ); ?></label>\n <?php\n echo ob_get_clean();\n}",
"public function show(Transcation $transcation)\n {\n //\n }",
"public function screenlock()\n\t{\n\t\tSession::put('lock', '1');\t\t\n\t\treturn View::make(\"admin/screen_lock\",$this->data);\n\t}",
"function show_standings()\n\t{\n\t\t// Retrieve all the players, teams, or seasons.\n\t\t$leagues = $this->league->retrieve_roster();\n\t\t$seasons = $this->seasons->retrieve_roster();\n\n\t\t// If there are no players, teams, or seasons...\n\t\tif (!$leagues || !$seasons)\n\t\t{\n\t\t\tshow_error('At least one league, one team, and one season must be added for standings functions to work.');\n\t\t}\n\n\t\t$data = array(\n\t\t\t'form_action' => 'action_show_standings',\n\t\t\t'title' => 'View Standings',\n\t\t\t'js' => array('/js/admin/show_roster.js'),\n\t\t\t'css' => array('/styles/admin.css'),\n\t\t\t'leagues' => $leagues,\n\t\t\t'seasons' => $seasons,\n\t\t\t'msg' => 'Please select the league and the season for the standings you wish to see.',\n\t\t\t'submit_message' => 'Show Standings',\n\t\t\t'sidenav' => self::$user_links\n\t\t);\n\n\t\t$this->load->helper(array('form'));\n\n\t\t$this->load->view('admin/show_standings.php', $data);\n\t}",
"public function getShareSynchInd()\n {\n return $this->shareSynchInd;\n }",
"private function establish_display_settings() {\n\t\t$this->background = \"background-color: $this->color_primary\";\n\t\t$this->border = \"border: 1px solid $this->color_accent\";\n\t\t$this->href = $this->generate_follow_link();\n\n\t}",
"public function getshowTime()\n {\n return $this->showtime;\n }",
"public function show(State $state)\n {\n //\n }",
"public function getShowSeconds()\n\t{\n\t\treturn false;\n\t}",
"public function render()\n {\n $queue_size = $this->manager->getQueueSize();\n $worker_statuses = $this->manager->getWorkerStatuses();\n\n $this->clear();\n $this->line('Spider Manager Dashboard. Press Ctrl+C to exit.');\n $this->line('Queue size: ' . $queue_size);\n\n $this->hr();\n foreach ($worker_statuses as $i => $status) {\n $status = $status == WorkerStatus::WORKING ? $this->green($status) : $this->gray($status);\n $this->line('Worker '.sprintf('%04d', $i).': '.$status);\n }\n $this->hr();\n }",
"protected function getTpl()\n\t{\n\t\treturn 'ActivityStateModal.tpl';\n\t}",
"function displayPage()\n {\n $this->getState()->template = 'transition-page';\n }",
"public function displayType(): string\n {\n return parent::DISPLAY_BLOCK;\n }",
"public function getScheduleStatus(){return $this->status;}",
"public function displaynow()\n\t{\n\t\treturn $this->CLI->stringQuery($this->SqueezePlyrID.\" displaynow ? ?\");\n\t}",
"function single_schedule_screen( $vars ) {\r\n global $bp;\r\n $schedule = $this->is_schedule( $this->current_schedule );\r\n \r\n if( $this->has_schedule_caps( $bp->loggedin_user->id ) || is_super_admin() )\r\n $vars['show_edit'] = true;\r\n else\r\n $vars['show_edit'] = null;\r\n \r\n $vars['name'] = 'single_schedule';\r\n $vars['schedule_edit_uri'] = $schedule->permalink . '/edit';\r\n $vars['schedule'] = $schedule;\r\n $vars['trail'] = array(\r\n $schedule->lecture->post_title => $schedule->lecture->permalink,\r\n $schedule->post_title => $schedule->permalink\r\n );\r\n return $vars;\r\n }",
"function outputViewState()\n {\n $retval = \"\";\n foreach ($this->ViewState as $key => $value)\n {\n $retval .= \"<input type=\\\"hidden\\\" name=\\\"ViewState[\" .$key . \"]\\\" value=\\\"\" . $value . \"\\\">\";\n }\n return $retval;\n }",
"function showThreadsObject()\n\t{\n\t\t$this->tpl->setRightContent($this->getRightColumnHTML());\n\t\t$this->getCenterColumnHTML();\n\t}",
"public function render()\n {\n return view('components.update-status-modal');\n }",
"public function sing() {\n\t\t\techo $this->name . \" sings 'Grrrr grrr grr grrrrrrr' </br>\";\n\t\t}",
"function dev_cf_display_status( $name, $post_id ) {\n\n\t$status = dev_get_ticket_status( $post_id );\n\n\tif ( 'closed' === $status ) {\n\t\t$label = __( 'Closed', 'awesome-support' );\n\t\t$color = dev_get_option( \"color_$status\", '#dd3333' );\n\t\t$tag = \"<span class='dev-label' style='background-color:$color;'>$label</span>\";\n\t} else {\n\n\t\t$post = get_post( $post_id );\n\t\t$post_status = $post->post_status;\n\t\t$custom_status = DevSupport\\Posts\\Tickets::get_post_status();\n\n\t\tif ( ! array_key_exists( $post_status, $custom_status ) ) {\n\t\t\t$label = __( 'Open', TEXTDOMAIN );\n\t\t\t$color = dev_get_option( \"color_$status\", '#169baa' );\n\t\t\t$tag = \"<span class='dev-label' style='background-color:$color;'>$label</span>\";\n\t\t} else {\n\t\t\t$defaults = array(\n\t\t\t\t'queued' => '#1e73be',\n\t\t\t\t'processing' => '#a01497',\n\t\t\t\t'hold' => '#b56629'\n\t\t\t);\n\t\t\t$label = $custom_status[ $post_status ];\n\t\t\t$color = dev_get_option( \"color_$post_status\", false );\n\n\t\t\tif ( false === $color ) {\n\t\t\t\tif ( isset( $defaults[ $post_status ] ) ) {\n\t\t\t\t\t$color = $defaults[ $post_status ];\n\t\t\t\t} else {\n\t\t\t\t\t$color = '#169baa';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$tag = \"<span class='dev-label' style='background-color:$color;'>$label</span>\";\n\t\t}\n\t}\n\n\techo $tag;\n\n}",
"final public function display(): string\n {\n ob_start();\n\n parent::display();\n\n return ob_get_clean();\n }",
"public static function workflowStates();",
"function dashboard_widget() {\n\n\t\t/*\n\t\t * As per the module config file, this function will execute when\n\t\t * the core dashboard calls for it.\n\t\t*/\n\n\t\tif ($this->mdl_mcb_data->setting('contracts_show_due') == \"TRUE\") {\n\t\t\t\n\t\t\t//Since status is calculated at call time, we need to filter manually\n\t\t\t$contracts = $this->mdl_contracts->get(array());\n\t\t\t$contracts_due = array();\n\t\t\tforeach ($contracts as $contract){\n\t\t\t\tif ($contract->status == 'contract_status_due'){\n\t\t\t\t\tarray_push($contracts_due, $contract);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$data = array(\n\t\t\t\t'contracts'\t=>\t$contracts_due\n\t\t\t);\n\n\t\t\t$this->load->view('dashboard_widget', $data);\n\n\t\t}\n\n\t}",
"public function display() {\r\n\t\t$this->echoOptionHeader();\r\n\t\t$dateFormat = 'Y-m-d H:i';\r\n\t\t$placeholder = 'YYYY-MM-DD HH:MM';\r\n\t\tif ( $this->settings['date'] && ! $this->settings['time'] ) {\r\n\t\t\t$dateFormat = 'Y-m-d';\r\n\t\t\t$placeholder = 'YYYY-MM-DD';\r\n\t\t} else if ( ! $this->settings['date'] && $this->settings['time'] ) {\r\n\t\t\t$dateFormat = 'H:i';\r\n\t\t\t$placeholder = 'HH:MM';\r\n\t\t}\r\n\r\n\t\tprintf('<input class=\"input-date%s%s\" name=\"%s\" placeholder=\"%s\" id=\"%s\" type=\"text\" value=\"%s\" /> <p class=\"description\">%s</p>',\r\n\t\t\t( $this->settings['date'] ? ' date' : '' ),\r\n\t\t\t( $this->settings['time'] ? ' time' : '' ),\r\n\t\t\t$this->getID(),\r\n\t\t\t$placeholder,\r\n\t\t\t$this->getID(),\r\n\t\t\tesc_attr( ($this->getValue() > 0) ? date( $dateFormat, $this->getValue() ) : '' ),\r\n\t\t\t$this->settings['desc']\r\n\t\t);\r\n\t\t$this->echoOptionFooter( false );\r\n\t}",
"function display()\n {\n parent::display();\n }",
"function display()\n {\n parent::display();\n }",
"function display()\n {\n parent::display();\n }",
"public function toString()\n {\n return \"GUI is display full\";\n }",
"public function eventSchedule()\n {\n $speakerName = array(\n \"daniela-pitta\"\n ,\"helena-saminez\"\n ,\"galvao-abbott\"\n ,\"bruno-porkaria\"\n ,\"atmos-maciel\"\n ,\"evaldo-barbosa\"\n ,\"fabio-soares\"\n ,\"nanderson-castro\"\n ,\"ricardo-coelho\"\n ,\"willian-mano\"\n ,\"romulo-martins\"\n ,\"alisson-gomes\"\n ,\"henrique-monteiro\"\n ,\"paulo-coelho\"\n );\n\n return $this->app['twig']->render('/when/when.twig',\n [\n 'link_when' => 'quando'\n ,'link_who' => '/quem'\n ,'speakerName' => $speakerName\n ]\n );\n }",
"public function tableStatus(): string\n {\n return sprintf(\n '<div class=\"table-status table-status-%s\">%s</div>',\n $this->status,\n config('status.options')[$this->status]\n );\n }",
"function display_timeline( $section ) {\n\tob_start();\n\n\techo display_timeline_before( $section );\n\techo display_timeline_items( $section );\n\techo display_timeline_after( $section );\n\n\treturn trim( ob_get_clean() );\n}",
"function getDisplay() {\n return $this->display;\n }",
"public function DisplayNice()\n {\n return $this->DisplayOnSite ? 'Yes' : 'No';\n }",
"public function getTaskStateText()\n {\n return $this->getTaskState()->get('name');\n }",
"public function display()\n\t{\n\t\tprint_r(\"<br/>RedheadDuck looks like this!<br/>\");\n\t}",
"static function show()\n {\n $trace = self::log();\n ?>\n <style type=\"text/css\">\n #-pt-debug { position:relative; z-index:2147483584; background-color:rgba(255,255,255,0.9); margin:20px; padding:20px 20px 40px 20px; font:14px/20px Tahoma; border:#666 dashed 1px; opacity:0.2; text-align:left; }\n #-pt-debug:hover { opacity:1; }\n #-pt-debug legend { text-shadow:1px -2px 0px #FFF; font:bold 16px Tahoma; margin:0px; border:0px; width:auto; }\n #-pt-debug p { margin-top:5px; }\n #-pt-debug p code { display:block; background:#FAFAFA; border:#DDD solid 1px; font-size:12px; padding:10px; margin:5px 0px 0px 30px; }\n #-pt-debug .pt-error { color:#CB1818; }\n #-pt-debug .pt-warning { color:#E88500; }\n #-pt-debug ._cls { position:absolute; top:20px; right:15px; color:#E00; font-weight:bold; font-size:16px; }\n </style>\n <fieldset id=\"-pt-debug\">\n <legend>DEBUG MESSAGE</legend>\n <?php foreach ($trace as $value) { ?>\n <p class=\"pt-<?php echo $value['type']; ?>\"><?php echo is_string($value['message']) ? $value['message'] : var_export($value['message'], true); ?></p>\n <?php } ?>\n <a class=\"_cls\" href=\"javascript:;\" onclick=\"this.parentNode.style.display='none'\">CLOSE</a>\n </fieldset>\n <?php\n }",
"public function getPanelTitle()\n {\n return __('Render time');\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 displayTime()\n {\n return $this->displayTime;\n }",
"protected function showVersion() {\n static $shown = false;\n if (!$shown) {\n $shown = true;\n echo Version::getInfoString() . \"\\n\\n\";\n }\n }",
"public function lastDowntimeNotificationAction()\n {\n try {\n /** @var $downtime /AppBundle/Entity/Downtime/EmailStatus */\n $downtime = $this->getDoctrine()->getRepository(\"AppBundle:Downtime\\EmailStatus\")->findOneBy(array(), array(\"addingSentDate\" => \"DESC\"));\n\n $dateDowntime = $downtime->getAddingSentDate();\n\n return $this->render(\":backend/Home:lastDowntimeNotification.html.twig\", array(\"dateDowntime\" => $dateDowntime));\n } catch (\\Exception $e) {\n return $this->render(\":backend/Home:lastDowntimeNotification.html.twig\", array(\"error\" => $e->getMessage()));\n }\n\n }",
"public function display() {\n\t\tif ( $this->read_only && $this->selectable ) {\n\t\t\techo \"<input onClick='this.select();' type='text' name='\" . esc_attr( $this->setting_id ) . \"' value='\" . esc_attr( get_option( $this->setting_id, $this->default_value ) ) . \"' readonly class='regular-text'>\";\n\t\t} elseif ( $this->read_only && ! $this->selectable ) {\n\t\t\techo \"<input type='text' name='\" . esc_attr( $this->setting_id ) . \"' value='\" . esc_attr( get_option( $this->setting_id, $this->default_value ) ) . \"' readonly class='regular-text'>\";\n\t\t} else {\n\t\t\techo \"<input type='text' name='\" . esc_attr( $this->setting_id ) . \"' value='\" . esc_attr( get_option( $this->setting_id, $this->default_value ) ) . \"' class='regular-text'>\";\n\t\t}\n\t}",
"public function arEmailSentWidgetMarkup() {\n return '<a href=\"javascript:void(0)\" onClick=\"curationEmailTextWindow=openCurationEmailTextWindow(' . $this->workGroupId . ')\"><img '\n . 'src=\"../images/emailSentIcon3.gif\" alt=\"View email sent.\" title=\"View email sent.\" width=\"34\" height=\"18\" align=\"top\" border=\"0\"></a>';\n }",
"function showStart() {\n $starturl = $this->action . '?mode=eligible';\n $extra = array('starturl' => $starturl);\n $output = $this->outputBoilerplate('start.html', $extra);\n return $output;\n }",
"protected function _toHtml()\n {\n if (!$this->_canBeShown()) {\n return '';\n }\n\n return parent::_toHtml();\n }",
"function display() {\r\n\t\tparent::display ();\r\n\t}",
"public function toolShow()\n {\n return $this->render('statistic-tool');\n }",
"public function information() \n\t{\n UserModel::authentication();\n\n\t\t//get the activity\n\t\t$timeline = ActivityModel::timeline();\n\t\t\n $this->View->Render('user/timeline', ['timeline' => $timeline]);\n }",
"public function getDisplay() {\n\t\treturn $this->display;\n\t}",
"public function engine_state() {\r\n echo PHP_EOL;\r\n $this->action(\"checking engine\");\r\n if ($this->engine_on) {\r\n $this->action(\"engine is on! Don't forget to turn it off\");\r\n }\r\n else {\r\n $this->action(\"engine is off\");\r\n }\r\n }",
"public function display() {\n\t\techo \"<input id='\" . esc_attr( $this->setting_id ) . \"' type='hidden' name='\" . esc_attr( $this->setting_id ) . \"' value='\" . esc_attr( wp_json_encode( $this->get(), JSON_UNESCAPED_UNICODE ) ) . \"'>\";\n\t}",
"protected function _showReport()\n {\n // Preformat\n $this->_report['Script Time'] = gmdate(\"H:i:s \\H\\s.\", $this->_report['Script Time']);\n $reportFile = $this->_report;\n array_walk($reportFile, function(&$v, $k) { $v = ($k ? \"{$k}: {$v}\" : '-'); });\n $reportFile = \"\\n---\\n\" . implode(\"\\n\", $reportFile);\n\n // Output to terminal\n echo $this->_fgColor('green', \"\\n{$reportFile}\");\n }",
"public function shortcode() {\r\n\t\treturn $this->get_timeline();\r\n\t}",
"function _post_states($post, $display = \\true)\n {\n }",
"function display( )\r\n\t{\r\n\t\t$this->_setModelState();\r\n\t $model = $this->getModel( $this->get( 'suffix' ) );\r\n\t $state = $model->getState();\r\n\t \t\t\r\n\t\t$date->current = $state->filter_date_from; \r\n\t\t\r\n\t\t$date->month = date( 'm', strtotime($date->current) );\r\n\t\t$date->year = date( 'Y', strtotime($date->current) );\r\n\t\t\r\n\t\t// date time variables\r\n\t\t$date->days = $this->getDays( $date->current );\r\n\t\t$date->hours = $this->getHours( );\r\n\t\t\r\n\t\t// datetime matrix\r\n\t\t$datetime = array( );\r\n\t\tfor ( $i = 0; $i < 3; $i++ )\r\n\t\t{\r\n\t\t\tfor ( $j = 0; $j < 24; $j++ )\r\n\t\t\t{\r\n\t\t\t\t$dayskey = $date->days[$i];\r\n\t\t\t\t$hourskey = $date->hours[$j];\r\n\t\t\t\t$datetime[$dayskey][$hourskey] = '';\r\n\t\t\t}\r\n\t\t}\r\n\t\t$date->datetime = $datetime;\r\n\t\t\r\n\t\t// navigation dates\r\n\t\t$date->nextthreedate = date( 'Y-m-d', strtotime( $date->current . ' +3 days' ) );\r\n\t\t$date->nextmonth = date( 'm', strtotime( $date->current . ' +3 days' ) );\r\n\t\t$date->nextyear = date( 'Y', strtotime( $date->current . ' +3 days' ) );\r\n\t\t$date->prevthreedate = date( 'Y-m-d', strtotime( $date->current . ' -3 days' ) );\r\n\t\t$date->prevmonth = date( 'm', strtotime( $date->current . ' -3 days' ) );\r\n\t\t$date->prevyear = date( 'Y', strtotime( $date->current . ' -3 days' ) );\r\n\t\t\r\n\t\t// aditional variables\r\n\t\t$date->startday = date( 'd', strtotime( $date->days[0] ) );\r\n\t\t$date->startmonth = date( 'm', strtotime( $date->days[0] ) );\r\n\t\t$date->startmonthname = date( 'F', strtotime( $date->days[0] ) );\r\n\t\t$date->startyear = date( 'Y', strtotime( $date->days[0] ) );\r\n\t\t$date->endday = date( 'd', strtotime( $date->days[2] ) );\r\n\t\t$date->endmonth = date( 'm', strtotime( $date->days[2] ) );\r\n\t\t$date->endmonthname = date( 'F', strtotime( $date->days[2] ) );\r\n\t\t$date->endyear = date( 'Y', strtotime( $date->days[2] ) );\r\n\t\t$date->nonworkingdays = $this->getNonWorkingDays( );\r\n\t\t\r\n\t\t$view = $this->getView( $this->get( 'suffix' ), 'html' );\r\n\t\t$view->assign( 'date', $date );\r\n\t\t\r\n\t\tparent::display( );\r\n\t}",
"public function showSettings()\n\t{\n\n\t\treturn $this->showDefaultSettings();\n\t}",
"public function getShowRelationshipStatus()\n\t{\n\t\treturn $this->show_relationship_status;\n\t}",
"function getStateInfo() {\n\t\t$state = $this->getState();\n\t\t$label = \"Unknown state ($state)\";\n\n\t\tswitch($state)\n\t\t{\n\t\t\tcase \"\":\n\t\t\tcase self::STATE_NONE:\t\t\t\t\t\t\t\t$label = \"Not started yet\"; break;\n\n\t\t\tcase self::STATE_RUNNING:\t\t\t\t\t\t\t$label = \"Running\"; break;\n\t\t\tcase self::STATE_PAUSED:\t\t\t\t\t\t\t$label = \"Paused\"; break;\n\t\t\tcase self::STATE_STOPPED:\t\t\t\t\t\t\t$label = \"Stopped\"; break;\n\t\t}\n\n\t\tif ($this->data->get(\"resetNeeded\") == 1)\n\t\t\t$label = \"Waiting for reset to complete\";\n\n\t\treturn Array(\n\t\t\t\"state\" => $state,\n\t\t\t\"label\" => $label\n\t\t);\n\t}"
]
| [
"0.5789514",
"0.55504507",
"0.53793603",
"0.5314324",
"0.5283319",
"0.52776283",
"0.5197936",
"0.5181183",
"0.5074544",
"0.49626473",
"0.49572572",
"0.49523664",
"0.49149606",
"0.48868504",
"0.48550218",
"0.48493296",
"0.484689",
"0.48463127",
"0.48404253",
"0.48368922",
"0.48353377",
"0.4833897",
"0.48249936",
"0.4798942",
"0.47786406",
"0.47744918",
"0.47687358",
"0.47652134",
"0.47644308",
"0.47641984",
"0.47630626",
"0.47394568",
"0.47394568",
"0.4735067",
"0.47292846",
"0.47118044",
"0.4709603",
"0.4705336",
"0.4698634",
"0.46956784",
"0.4694711",
"0.46759903",
"0.46718985",
"0.46710354",
"0.46700537",
"0.46682227",
"0.4663804",
"0.46582443",
"0.46538773",
"0.46361643",
"0.4625312",
"0.46205002",
"0.46155187",
"0.46108097",
"0.45975536",
"0.4594236",
"0.45942226",
"0.4589435",
"0.45766056",
"0.45727473",
"0.4568895",
"0.45686692",
"0.45604664",
"0.45570874",
"0.45569223",
"0.45569223",
"0.45569223",
"0.45497957",
"0.45425844",
"0.454213",
"0.45412514",
"0.45371935",
"0.4533034",
"0.45323172",
"0.4531871",
"0.45317784",
"0.4529677",
"0.45253393",
"0.45253393",
"0.45253393",
"0.45249406",
"0.4523854",
"0.45219642",
"0.45219585",
"0.451801",
"0.451696",
"0.45098472",
"0.45087755",
"0.45086238",
"0.45081988",
"0.4507551",
"0.45066863",
"0.45065483",
"0.44958866",
"0.4493187",
"0.4492151",
"0.44915274",
"0.44899604",
"0.44888526",
"0.4485606"
]
| 0.6605943 | 0 |
Show a graphical display of the campaign's finished state. | public function displayFinished()
{
if ($this->has_finished) {
return '<i style="font-size:25px;color:#449D44;" class="fa fa-check" aria-hidden="true"></i>';
} else {
return '<i style="font-size:25px;color:#C9302C;" class="fa fa-times" aria-hidden="true"></i>';
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function show_completed_page(&$infos)\n\t\t{\n\t\t\t$this->t->set_file('activity_completed', 'activity_completed.tpl');\n\t\t\t$this->t->set_block('activity_completed', 'report_row', 'rowreport');\n\t\t\t//build an icon array for show_engine_infos\n\t\t\t$icon_array = Array();\n\t\t\t\n\t\t\t$icon_array['ok'] \t\t= '<img src=\"'.$GLOBALS['egw']->common->image('workflow', 'check').'\">';\n\t\t\t$icon_array['failure'] \t\t= '<img src=\"'.$GLOBALS['egw']->common->image('workflow', 'stop').'\">';\n\t\t\t$icon_array['transition'] \t= '<img src=\"'.$GLOBALS['egw']->common->image('workflow', 'transition').'\">';\n\t\t\t$icon_array['transition_human'] = '<img src=\"'.$GLOBALS['egw']->common->image('workflow', 'transition_human').'\">';\n\t\t\t$icon_array['activity'] \t= '<img src=\"'.$GLOBALS['egw']->common->image('workflow', 'auto_activity').'\">';\n\t\t\t$icon_array['dot'] \t\t= '<img src=\"'.$GLOBALS['egw']->common->image('workflow', 'puce').'\"> ';\n\t\t\t$this->show_engine_infos($infos, $icon_array);\n\t\t\t$this->t->set_var(array(\n\t\t\t\t'wf_procname'\t=> $this->process_name,\n\t\t\t\t'procversion'\t=> $this->process_version,\n\t\t\t\t'actname'\t=> $this->activity_name,\n\t\t\t\t'rowreport'\t=> '',\n\t\t\t));\n\n\t\t\t$this->translate_template('activity_completed');\n\t\t\t$this->t->pparse('output', 'activity_completed');\n\t\t\t$this->show_after_running_page();\n\t\t}",
"public function renderWaiting()\n\t{\n\t\tif (!$this->configuration->isRunned())\n\t\t{\n\t\t\t$this->events->triggerListener('onRendererWaitingStart');\n\t\t\t$uri = $this->link->createLink($this->configuration, array(\n\t\t\t\t'setRunned' => true,\n\t\t\t));\n\t\t\techo Html::el('h2')->add(Html::el('a', 'START')->href($uri));\n\t\t\techo '<p style=\"display: none;\" id=\"sentence\" data-state=\"waiting\">Waiting for start</p>';\n\t\t\t$this->events->triggerListener('onRendererWaitingEnd');\n\t\t}\n\t}",
"abstract protected function renderComplete();",
"public function completed()\r\n {\r\n set_meta('title', 'Done');\r\n $progress = app()->make(Progress::class);\r\n $progress->reset();\r\n\r\n return view('antares/installer::installation.completed');\r\n }",
"public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }",
"public function isComplete() {\n return $this->getDescription() == 'Done';\n }",
"public function done()\n {\n $this->setStatus(self::STATUS_DONE);\n }",
"static function add_eb_finished(): void {\r\n\t\tself::add_acf_inner_field(self::ebs, self::eb_finished, [\r\n\t\t\t'label' => 'Finished',\r\n\t\t\t'type' => 'true_false',\r\n\t\t\t'instructions' => 'Is the election finished?',\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'message' => '',\r\n\t\t\t'default_value' => 0,\r\n\t\t\t'ui' => 1,\r\n\t\t]);\r\n\t}",
"public function finished()\n {\n }",
"public function display($finish = false) {\n\t\t$msg = $this->_message;\n\t\t$idx = $this->_iteration++ % strlen($this->_chars);\n\t\t$char = $this->_chars[$idx];\n\t\t$speed = number_format(round($this->speed()));\n\t\t$elapsed = $this->formatTime($this->elapsed());\n\n\t\tStreams::out_padded($this->_format, compact('msg', 'char', 'elapsed', 'speed'));\n\t}",
"protected function renderGameFinished(Game $game)\r\n {\r\n $viewFlashMessage = new ViewFlashMessage();\r\n $view = new MainView();\r\n $flashMessage = $game->getFlashMessage();\r\n\r\n $message = \"Well done! You complete the game in {$game->getShots()} shots\";\r\n\r\n $flashMessage->customNotification($message);\r\n $viewFlashMessage->prepare($flashMessage);\r\n $view->addViewObject($viewFlashMessage);\r\n\r\n $view->render();\r\n }",
"protected function _showFinalMessages()\n {\n if ($this->_errors) {\n $this->_output->writeln(\n \"<fg=red>There was some errors on setting configuration: \\n{$this->_errors}</fg=red>\"\n );\n }\n\n if ($this->_warnings) {\n $this->_output->writeln(\n \"<comment>There was some warnings on setting configuration: \\n{$this->_warnings}</comment>\"\n );\n }\n\n if ($this->_configurationCounter > 0) {\n $this->_output->writeln(\n \"<info>Configuration has been applied</info>\"\n );\n\n $this->_output->writeln(\n \"<info>Total changed configurations: {$this->_configurationCounter}</info>\"\n );\n } else {\n $this->_output->writeln(\n \"<error>There was no configuration applied.</error>\"\n );\n }\n }",
"function dashboard_widget_display() {\n\t\techo '<div class=\"escalate-dashboard-loading\">Loading Stats</div>';\n\t}",
"public function finishedAction()\n {\n }",
"public function showComplete(){\n\t\t\n\t\t//our tasks\n\t\t$this->set('tasks', $this->Task->find('all', array(\n\t\t\t'conditions' => array('Task.status_id' => '2'),\n\t\t\t'order' => array('Task.completed_on'),\n\t\t)));\n\t\t\n\t\t//our statuses\n\t\t$this->set('statuses', $this->Task->Status->find('list'));\n\t\t\n\t\t//our locations\n\t\t$this->set('locations', $this->Task->Location->find('list'));\n\t\t\n\t\t//our keywords\n\t\t$this->set('keywords', $this->Task->Keyword->find('list'));\n\t\t\n\t\t//our link locations\n\t\t$linkLocation['/foundersFactory/tasks/'] = \"Show by Location\";\n\t\tforeach($this->Task->Location->find('list') as $key => $location){\n\t\t\t$linkLocation['/foundersFactory/tasks/showByLocation/'.$key] = $location;\n\t\t}\n\t\t$this->set('linkLocations', $linkLocation);\n\t}",
"public function display() {\n return false;\n }",
"public function display() {\n return false;\n }",
"static function add_bod_finished(): void {\r\n\t\tself::add_acf_inner_field(self::bods, self::bod_finished, [\r\n\t\t\t'label' => 'Finished',\r\n\t\t\t'type' => 'true_false',\r\n\t\t\t'instructions' => 'Is the election finished?',\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'default_value' => 0,\r\n\t\t\t'ui' => 1,\r\n\t\t]);\r\n\t}",
"public function done() {\n ncurses_refresh();\n ncurses_end();\n usleep(300000);\n }",
"public function completed() {\n\t}",
"function show_after_running_page()\n\t\t{\n\t\t\t$this->t->set_file('after_running', 'after_running.tpl');\n\t\t\t\n\t\t\t//prepare the links form\n\t\t\t$link_data_proc = array(\n\t\t\t\t'menuaction'\t\t=> 'workflow.ui_userinstances.form',\n\t\t\t\t'filter_process'\t=> $this->process_id,\n\t\t\t);\n\t\t\t$link_data_inst = array(\n\t\t\t\t'menuaction'\t\t=> 'workflow.ui_userinstances.form',\n\t\t\t\t'filter_instance'\t=> $this->instance_id,\n\t\t\t);\n\t\t\tif ($this->activity_type == 'start')\n\t\t\t{\n\t\t\t\t$activitytxt = lang('get back to instance creation');\n\t\t\t\t$act_button_name = lang('New instance');\n\t\t\t\t$link_data_act = array(\n\t\t\t\t\t'menuaction'\t\t=> 'workflow.ui_useropeninstance.form',\n\t\t\t\t);\n\t\t\t}\n\t\t\telseif ($this->activity_type == 'standalone')\n\t\t\t{\n\t\t\t\t$activitytxt = lang('get back to global activities');\n\t\t\t\t$act_button_name = lang('Global activities');\n\t\t\t\t$link_data_act = array(\n\t\t\t\t\t'menuaction'\t\t=> 'workflow.ui_useractivities.form',\n\t\t\t\t\t'show_globals'\t\t=> true,\n\t\t\t\t);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$activitytxt = lang('go to same activities for other instances of this process');\n\t\t\t\t$act_button_name = lang('activity %1', $this->activity_name);\n\t\t\t\t$link_data_act = array(\n\t\t\t\t\t'menuaction'\t\t=> 'workflow.ui_userinstances.form',\n\t\t\t\t\t'filter_process' => $this->process_id,\n\t\t\t\t\t'filter_activity_name'\t=> $this->activity_name,\n\t\t\t\t);\n\t\t\t}\n\t\t\t$button='<img src=\"'. $GLOBALS['egw']->common->image('workflow', 'next')\n\t\t\t\t.'\" alt=\"'.lang('go').'\" title=\"'.lang('go').'\" width=\"16\" >';\n\t\t\t$this->t->set_var(array(\n\t\t\t\t'same_instance_text'\t=> ($this->activity_type=='standalone')? '-' : lang('go to the actual state of this instance'),\n\t\t\t\t'same_activities_text'\t=> $activitytxt,\n\t\t\t\t'same_process_text'\t=> lang('go to same process activities'),\n\t\t\t\t'same_instance_button'\t=> ($this->activity_type=='standalone')? '-' : '<a href=\"'.$GLOBALS['egw']->link('/index.php',$link_data_inst).'\">'\n\t\t\t\t\t.$button.lang('instance %1', ($this->instance_name=='')? $this->instance_id: $this->instance_name).'</a>',\n\t\t\t\t'same_activities_button'=> '<a href=\"'.$GLOBALS['egw']->link('/index.php',$link_data_act).'\">'\n\t\t\t\t\t.$button.$act_button_name.'</a>',\n\t\t\t\t'same_process_button'\t=> '<a href=\"'.$GLOBALS['egw']->link('/index.php',$link_data_proc).'\">'\n\t\t\t\t\t.$button.lang('process %1', $this->process_name).'</a>',\n\t\t\t));\n\t\t\t$this->translate_template('after_running');\n\t\t\t$this->t->pparse('output', 'after_running');\n\t\t\t$GLOBALS['egw']->common->egw_footer();\n\t\t}",
"public function complete();",
"public function complete();",
"public function finish_display ()\n {\n $this->_finish_body ();\n?>\n </body>\n</html>\n<?php\n }",
"public static function onMonacoFooter() {\n\t\tglobal $wgAdConfig;\n\t\tif (\n\t\t\tisset( $wgAdConfig['monaco']['leaderboard'] ) &&\n\t\t\t$wgAdConfig['monaco']['leaderboard']\n\t\t) {\n\t\t\techo self::loadAd( 'leaderboard' );\n\t\t}\n\t\treturn true;\n\t}",
"private function showProgress()\n {\n $allQuestions = $this->questionRepository->list(['id', 'question']);\n $this->transformProgressList($allQuestions);\n\n $this->console->info( ' ************ Your progress is ************');\n\n foreach ($this->progress as $option) {\n $validate = $option['is_true'] ? __('True') : __('False');\n $this->console->info( ' Question: ' . $option['question']);\n if(null !== $option['is_true'])\n $this->console->info( ' Answer: ' . $option['answer'] . '('.$validate .')');\n $this->console->info( ' ');\n }\n $this->console->info( ' *******************************************');\n }",
"public function isFinished();",
"function displayFinishSetup()\n\t{\n\t\t$this->checkDisplayMode(\"finish_setup\");\n\t\t$this->no_second_nav = true;\n//echo \"<b>1</b>\";\n\t\tif ($this->validateSetup())\n\t\t{\n\t\t\t$txt_info = $this->lng->txt(\"info_text_finish1\").\"<br /><br />\".\n\t\t\t\t\"<p>\".$this->lng->txt(\"user\").\": <b>root</b><br />\".\n\t\t\t\t$this->lng->txt(\"password\").\": <b>homer</b></p>\";\n\t\t\t$this->setButtonNext(\"login_new\",\"login\");\n//echo \"<b>2</b>\";\n\t\t\t$this->setup->getClient()->reconnect();\t\t// if this is not done, the writing of\n\t\t\t\t\t\t\t\t\t\t\t// the setup_ok fails (with MDB2 and a larger\n\t\t\t\t\t\t\t\t\t\t\t// client list), alex 17.1.2008\n\t\t\t$this->setup->getClient()->setSetting(\"setup_ok\",1);\n//$this->setup->getClient()->setSetting(\"zzz\", \"Z\");\n//echo \"<b>3</b>\";\n\t\t\t$this->setup->getClient()->status[\"finish\"][\"status\"] = true;\n//echo \"<b>4</b>\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$txt_info = $this->lng->txt(\"info_text_finish2\");\n\t\t}\n\n//echo \"<b>5</b>\";\n\t\t// output\n\t\t$this->tpl->addBlockFile(\"SETUP_CONTENT\",\"setup_content\",\"tpl.clientsetup_finish.html\", \"setup\");\n\t\t$this->tpl->setVariable(\"TXT_INFO\",$txt_info);\n\n\t\t$this->setButtonPrev(\"nic\");\n//echo \"<b>6</b>\";\n\t\t$this->checkPanelMode();\n//echo \"<b>7</b>\";\n\t}",
"function finished() {\n\t\t$referrer = isset($_GET['referrer']) ? urldecode($_GET['referrer']) : null;\n\t\t\n\t\treturn $this->customise(array(\n\t\t\t'Content' => $this->customise(\n\t\t\t\tarray(\n\t\t\t\t\t'Link' => $referrer\n\t\t\t\t))->renderWith('ReceivedFormSubmission'),\n\t\t\t'Form' => ' ',\n\t\t));\n\t}",
"public function isFinished() {\n\t\treturn $this->workflowActivitySpecification->isFinished();\n\t}",
"public function finish() {\n\n\t\t// Output the JSON string\n\t\techo json_encode(\n\t\t\tarray(\n\t\t\t\t'status' => $this->status,\n\t\t\t\t'content' => $this->content\n\t\t\t)\n\t\t);\n\n\t\texit();\n\n\t}",
"public function complete()\n {\n $post = $_REQUEST;\n $this->setRedirect('index.php?option=com_jms&view=jms&layout=complete&plan_id=' . $post['plan_id']);\n }",
"protected function HideExportFrame()\n\t{\n\t\t$this->UpdateProgress(GetLang('ExportComplete'));\n\t\techo \"<script type='text/javascript'>\\n\";\n\t\techo \"self.parent.ExportFinished();\\n\";\n\t\techo \"</script>\";\n\t}",
"public function isFinished() {\n if($this->state == \"completed\" ||\n $this->state == \"rejected\" ||\n $this->state == \"failed\") {\n return true;\n } else {\n return false;\n }\n }",
"public function getFinished()\n {\n return $this->Finished;\n }",
"public function isCompleted(): bool\n {\n return ($this->progress_error + $this->progress_ok) >= \\count($this->state->getSourceStates());\n }",
"public function form_footer_progress_status_proportion_html() {\n\n\t\t?>\n\t\t<div class=\"wpforms-conversational-form-footer-progress-status-proportion\">\n\t\t\t<?php\n\t\t\tprintf(\n\t\t\t\t/* translators: %1$s - Number of fields completed, %2$s - Number of fields in total. */\n\t\t\t\t\\esc_html__(\n\t\t\t\t\t'%1$s of %2$s completed',\n\t\t\t\t\t'wpforms-conversational-forms'\n\t\t\t\t),\n\t\t\t\t'<span class=\"completed\"></span>',\n\t\t\t\t'<span class=\"completed-of\"></span>'\n\t\t\t);\n\t\t\t?>\n\t\t</div>\n\t\t<div class=\"wpforms-conversational-form-footer-progress-status-proportion-completed\" style=\"display: none\">\n\t\t\t<?php \\esc_html_e( 'Form completed', 'wpforms-conversational-forms' ); ?>\n\t\t</div>\n\t\t<?php\n\t}",
"function updateCampaign() {\n\t\t$sql = \"Update campaign set finished=1 where CampaignId=\" . $this -> id;\n\t\t$stmt = $this -> DB -> prepare($sql);\n\t\tif ($stmt -> execute()) {\n\t\t\t//send email to user with information that campaign has been finished\n\t\t\tinclude_once \"Email.php\";\n\t\t\tnew Email('success', '', $this -> id);\n\t\t} else {\n\t\t\tinclude_once \"Email.php\";\n\t\t\tnew Email('failed', 'to update campaign.', $this -> id);\n\t\t}\n\t}",
"public function hasFinishState(){\n return $this->_has(5);\n }",
"public function isFinished(): bool;",
"public function doneRendering(): bool\n {\n return $this->renderCount == 0;\n }",
"public function isFinalized()\n {\n return ($this->status == 'processing' || $this->status == 'valid');\n }",
"function showSlot($myID, $myTitle, $myStart, $myDuration) {\n\t\tglobal $dbconnect;\n\n\t\t// determine if the task has been accomplished\n\t\t$sql = \"SELECT finished FROM done WHERE ID = '$myID'\";\n\t\t$query = mysqli_query($dbconnect, $sql);\n\t\t$result = mysqli_fetch_assoc($query);\n\n\t\t$finished = is_null($result) || is_null($result[\"finished\"]) ? 'N' : $result[\"finished\"];\n\n\t\t// display task\n\t\techo \"<a class='task\";\n\t\techo ($finished == 'Y' ? \" finished\" : \"\");\n\t\techo \" duration\" . $myDuration;\n\t\techo \" start\" . $myStart . \"'\";\n\t\techo \" href='index.php?edit=\" . $myID . \"'\";\n\t\techo \" title='\" . $myTitle . \"'>\";\n\t\t\techo $myTitle;\n\t\techo \"</a>\";\n\t}",
"public function display()\n {\n }",
"public function display()\n {\n }",
"public function display()\n {\n }",
"public function display()\n {\n }",
"function displayPage()\n {\n $this->getState()->template = 'transition-page';\n }",
"public function isFinished(): bool\n {\n return $this -> charging_status == OrderStatusEnum :: FINISHED;\n }",
"public function wizardFinished($event)\n {\n if ($event->step === true)\n $this->render('completed', compact('event'));\n else\n $this->render('finished', compact('event'));\n\n $event->sender->reset();\n Yii::app()->end();\n }",
"public function display(){}",
"function showUploadCompletePage() {\n\t\t$this->setCacheLevelNone();\n\t\t$this->render($this->getTpl('uploadComplete', '/account'));\t\t\n\t\n\t}",
"public function complete()\n {\n $message = new MailMessage;\n $message->greeting(\"Hi {$this->post->reporting->name}!\");\n $message->line(\"The post [{$this->post->title}] has been completed successfully.\");\n\n foreach ($this->workflow as $key => $value) {\n if ($key == 0) {\n $message->action($value->action, url('workflows/workflow/' . $value->id));\n continue;\n }\n $message->line('<a href=\"'.url('workflows/workflow/' . $value->id).'\">'.$value->action.'</a>');\n }\n\n \n return $message;\n }",
"public function isComplete()\n\t{\n\t\treturn $this->status == 'Complete';\n\t}",
"protected function done()\n {\n $this->setTemplate('registration/alert-registrationcomplete.tpl');\n }",
"public function completeFlow();",
"function learn_press_course_lesson_complete_button() {\n\t\tlearn_press_get_template( 'content-lesson/complete-button.php' );\n\t}",
"public function run()\n {\n return view('microboard::state', [\n 'config' => $this->config,\n 'title' => 'إعلانات قادمة',\n 'info' => 'لم يأتي وقت بداية ظهور هذه الإعلانات',\n 'icon' => 'fa fa-images',\n 'count' => Advertisement::whereDate('started_at', '>', now()->toDateString())->count(),\n ]);\n }",
"public function doneAction()\n\t{\n\t\n\t}",
"function display () {\n\t\t// So that if we're displaying a list of reports that are\n\t\t// available for editing, it's accurate.\n\t\t$this->_update_locked();\n\t\n\t\t$data = $this->_get_data_by_recent ();\n\t\t\n\t\t$this->render($data);\n\t\n\t}",
"public function display()\n\t{\n\t\tprint_r(\"<br/>RedheadDuck looks like this!<br/>\");\n\t}",
"public function toString()\n {\n return \"GUI is display full\";\n }",
"function finish(){\r\n\t}",
"protected function complete()\n {\n parent::complete();\n }",
"public function ended();",
"public function isCompleted(): bool\n {\n return $this->status == 'completed';\n }",
"public function actionStatewiseevaluation()\n {\n return $this->render('statewise-evaluation-report');\n }",
"public function present() {\n\t\t$data = [\n\t\t\t'key'=>$this->key,\n\t\t\t'team'=>$this->team,\n\t\t\t'views'=>$this->views,\n 'after'=>$this->after\n\t\t];\n\n\t\tif($this->cards !== null) {\n\t\t $data['cards'] = $this->cards;\n }\n\n\t\t$json = htmlspecialchars(json_encode($data), ENT_NOQUOTES);\n\t\treturn <<<HTML\n<div class=\"cl-trello-sprinter\" style=\"display:none\">$json</div>\t\t\nHTML;\n\t}",
"function show_wait_message()\n\t\t{\n\t\t\tif(!@is_object($GLOBALS['egw']->js))\n\t\t\t{\n\t\t\t\t$GLOBALS['egw']->js =& CreateObject('phpgwapi.javascript');\n\t\t\t}\n\t\t\t$please_wait=lang('Please wait, task in progress ...');\n\t\t\t$GLOBALS['egw_info']['flags']['java_script'] .= '<script type=\"text/javascript\">\n\t\t\t\tdocument.write(\\'<DIV id=\"loading\"><BR><BR>\\'+\"'.$please_wait.'\" +\\'</DIV>\\');\n\t\t\t\tfunction hide_loading()\n\t\t\t\t{\n\t\t\t\t\tdocument.getElementById(\"loading\").style.display=\"none\";\n\t\t\t\t}</script>';\n\t\t\t$GLOBALS['egw']->js->set_onload('hide_loading();');\n\t\t}",
"function showEnd( $appctx )\n\t\t{\n\t\t$appctx->Moins() ;\n\t\t}",
"public function display() {\n echo $this->render();\n }",
"public function completed_payments()\n\t{\n\t\t//permittedArea();\n\n\t\ttheme('completed_payments');\n\t}",
"function display() {\r\n\t\tparent::display ();\r\n\t}",
"function local_course_completion_status_before_footer() {\n //echo \"Hello!\";\n //\\core\\notification::add('Success!',\\core\\output\\notification::NOTIFY_SUCCESS);\n}",
"public function __destruct() {\n if ( isset( $this->start_time ) ) {\n $seconds = microtime( true ) - $this->start_time;\n echo \"<p>Action completed in $seconds seconds.</p>\";\n }\n }",
"function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}",
"public function display()\n\t{\n\t\tparent::display();\n\t}",
"public function finished(){\r\n $this->session->set_userdata('referred_from', current_url());\r\n $data['tasks'] = $this->TaskModel->getFinishedTasks($this->userId);\r\n $data['taskTitle'] = \"Finished Tasks\";\r\n $data['base_url'] = $this->base_url;\r\n $data['title'] = \"ICT Cloud | Admin | Tasks\";\r\n\r\n $data['finish'] = false;\r\n $data['delete'] = false;\r\n\r\n $data['menu'] = \"\";\r\n\r\n foreach($this->menu['Menu'] as $m)\r\n {\r\n $data['menu'] .= '<li>';\r\n $data['menu'] .= '<a href=\"'.$m['AppMenuLink'].'\"><i class=\"fa '.$m['AppMenuIcon'].' fa-fw\"></i> '.$m['AppMenuName'].'</a>';\r\n $data['menu'] .= '</li>';\r\n }\r\n\r\n $data['formTaskName'] = $this->formTaskName;\r\n $data['formOptions'] = $this->formOptions;\r\n $data['formSubmit'] = $this->formSubmit;\r\n $data['formTaskDescription'] = $this->formTaskDescription;\r\n $data['formEndDate'] = $this->formEndDate;\r\n\r\n $data['Groups'] = $this->adminGroups;\r\n\r\n $this->load_view(\"Task/TaskList\", $data);\r\n }",
"function display()\n {\n parent::display();\n }",
"function display()\n {\n parent::display();\n }",
"function display()\n {\n parent::display();\n }",
"public function isFinished()\n {\n return $this->isWinner('X') || $this->isWinner('O') || $this->isDraw();\n }",
"public function finished() {\n\t\t// Reset the CSS.\n\t\tupdate_option( 'fusion_dynamic_css_posts', [] );\n\t}",
"public function display() {}",
"public function display() {}",
"public function display() {\n\t\t$this->init();\n\t\treturn $this->output();\n\t}",
"public function completeAction() {\n\n }",
"function display_active() {\n $this->_activeform->display();\n }",
"public function actionFinal() {\n if (Yii::app()->user->checkAccess('adminhead') && isset($_GET['projectOID'])) {\n\n $model = Project::model()->findByPk($_GET['projectOID']);\n\n $this->render('final', array('model' => $model, 'isFinal' => true));\n }\n }",
"public function finalizadas()\n {\n $cotizaciones = Cotizacion::where('status','=','Finalizado')->latest()->get();\n return view('cotizaciones.finalizados', ['cotizaciones'=>$cotizaciones]);\n }",
"function complete() \n {\n if (!($this->activity->isInteractive()))\n {\n $this->error[] = tra('interactive activities should not call the complete() method');\n return false;\n }\n \n return $this->instance->complete($this->activity_id);\n }",
"public function showExitLink()\n\t{\n\t\treturn true;\n\t}",
"public function run()\r\n\t{\r\n\t\treturn 'faz de conta...';\r\n\t}",
"function render_listinstancejobs_footer() {\n //get the current report shortname\n $report = $this->required_param('report', PARAM_ALPHAEXT);\n\n print_spacer();\n\n //button for scheduling a new instance\n print_single_button($this->get_url(), array('report' => $report), get_string('listinstancejobs_new', 'block_php_report'));\n\n echo '<hr>';\n print_spacer();\n\n //button for listing all reports\n print_single_button($this->get_url(), array('action' => 'list'), get_string('listinstancejobs_back_label', 'block_php_report'));\n }",
"public function render_onboarding() {\n\t\t// Check if onboarding is already completed.\n\t\t$done = beehive_analytics()->settings->get( 'onboarding_done', 'misc', $this->is_network() );\n\n\t\t// Render modal.\n\t\tif ( ! $done ) {\n\t\t\t// Render onboarding setup modal.\n\t\t\t$this->view( 'modals/onboarding/setup', [\n\t\t\t\t'is_logged_in' => Google_Auth\\Helper::instance()->is_logged_in( $this->is_network() ),\n\t\t\t\t'network' => $this->is_network(),\n\t\t\t\t'ps_levels' => $this->is_network() ? Permission::get_ps_levels() : false,\n\t\t\t] );\n\t\t}\n\t}",
"public function display() {\n return $this->out(call_user_func_array([$this, 'render'], func_get_args()));\n }",
"public function isComplete()\n {\n return\n $this->Status == 'CardCreated' ||\n $this->Status == 'Captured' ||\n $this->Status == 'Refunded' ||\n $this->Status == 'Void';\n }",
"public function completed()\n {\n $allRows = Job::completed()->notInvoiced()->latest()->get();\n $rows = Job::completed()->notInvoiced()->latest()->paginate(10);\n\n return view('admin.jobs.index', [\n 'rows' => $rows,\n 'title' => 'Completed, Not Invoiced',\n 'values' => $this->totalValue($allRows)\n ]\n );\n }",
"private function showAnswers() : void\n {\n $this->showProgress();\n }",
"function tab_print_recent_activity($course, $viewfullnames, $timestart) {\n global $CFG;\n\n return false; // True if anything was printed, otherwise false\n}"
]
| [
"0.59758365",
"0.58604485",
"0.58453715",
"0.56397945",
"0.56151646",
"0.560581",
"0.5501625",
"0.5483747",
"0.5460936",
"0.5434394",
"0.53893274",
"0.53715736",
"0.5363716",
"0.5359528",
"0.53544766",
"0.53520316",
"0.53520316",
"0.53229994",
"0.53203005",
"0.52722734",
"0.526943",
"0.5268596",
"0.5268596",
"0.5267328",
"0.5262372",
"0.52568924",
"0.5255674",
"0.5243738",
"0.5241718",
"0.52123976",
"0.5203463",
"0.5147418",
"0.5139728",
"0.51375586",
"0.51048815",
"0.51029307",
"0.5099823",
"0.50993633",
"0.5095062",
"0.5094518",
"0.50825155",
"0.50823855",
"0.5078475",
"0.5078399",
"0.5078399",
"0.50772816",
"0.50772816",
"0.5069781",
"0.50670296",
"0.5057192",
"0.5052698",
"0.5048338",
"0.50475734",
"0.5041363",
"0.5037031",
"0.5028126",
"0.50231946",
"0.500094",
"0.500049",
"0.4999033",
"0.49929774",
"0.49743658",
"0.4971434",
"0.4968318",
"0.4958173",
"0.49578047",
"0.49526024",
"0.4950198",
"0.49492782",
"0.49424538",
"0.4938523",
"0.49362472",
"0.49309105",
"0.49249",
"0.49235427",
"0.49209833",
"0.49189904",
"0.49154678",
"0.49112424",
"0.49112424",
"0.49112424",
"0.49094352",
"0.49092007",
"0.49091786",
"0.49091786",
"0.4907845",
"0.49068362",
"0.49015734",
"0.4892752",
"0.4888388",
"0.4881197",
"0.48715305",
"0.48661134",
"0.48594892",
"0.4851906",
"0.4848778",
"0.48477623",
"0.48418954",
"0.48359022",
"0.4834096"
]
| 0.70984656 | 0 |
Start worker by setting the proper status. | public function start()
{
// Update worker state and set it as running (not finished)
// Do not change resume_token because campaign can be resumed and not started
$this->update(['has_finished' => false]);
// Return current instance for method chaining
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function requireStarted() {\n $status = $this->getStatus(TRUE);\n if ($this->isEnabled() && (is_null($status) || !$status->running)) {\n $this->run('start');\n $this->updateStatus();\n }\n }",
"public function startWorking(){\r\n }",
"function run()\n {\n $this->_loadState();\n $start_time = microtime_float();\n while ((microtime_float() - $start_time) < DC_WORKER_TIME_OUT)\n {\n if($this->_process_info['status']=='INITED' or $this->_process_info['status']=='PROCESSING')\n {\n $this->_doWork();\n };\n\n if($this->_process_info['status']=='PRE_COMPLETED')\n {\n $this->_finishWork();\n break;\n };\n\n if($this->_process_info['status']=='ERRORS_HAPPENED')\n {\n $this->_breakWork();\n break;\n };\n }\n\n $this->_saveState();\n return;\n }",
"public function onWorkerStart(swoole_server $serv, $worker_id) {\n if ($worker_id >= $serv->setting['worker_num']) {\n //echo \"task worker {$worker_id}\\n\";\n //swoole_set_prcess_name(\"task worker {$worker_id}\");\n //cli_set_process_title(\"task worker {$worker_id}\");\n } else {\n //echo \"event worker {$worker_id}\\n\";\n //cli_set_process_title(\"task worker {$worker_id}\");\n }\n //echo \"\\n\";\n }",
"public function start()\n {\n $this->status = 'in_progress';\n return $this->save();\n }",
"public function updateStatusStart()\n {\n $this->resetStatuses();\n $this->pubDirectory->touch($this->getRelativeFilePath(self::IMPORT_STATUS_BUSY));\n }",
"public function onWorkerStart(){\n\t\t// Init mimeMap.\n\t\t$this->initMimeTypeMap();\n\n\t\t// Try to emit onWorkerStart callback.\n\t\tif($this->_onWorkerStart){\n\t\t\ttry{\n\t\t\t\tcall_user_func($this->_onWorkerStart, $this);\n\t\t\t}catch(\\Throwable $e){\n\t\t\t\tLogger::logException($e);\n\t\t\t}\n\t\t}\n\t}",
"protected static function set_status()\n {\n }",
"public function onWorkerStart($serv, $worker_id)\n {\n $pid = posix_getpid();\n\n if ($worker_id >= $serv->setting['worker_num']) {\n swoole_set_process_name(\"Vary task_{$pid}\");\n } else {\n swoole_set_process_name(\"Vary worker_{$pid}\");\n }\n\n Console::info(\"Vary proxy service worker %s start.\", [$worker_id]);\n\n// $this->mysql_pool->init($serv);\n PoolManager::init($serv);\n }",
"public function start()\n {\n var_dump('start');\n while (!$this->stop) {\n $this->checkPid();\n $task = json_decode(Redis::init()->blpop('tasks'), true);\n\n if ($this->limit > count($this->pid) && $task) {\n $this->fork($task);\n } elseif (count($this->pid) >= $this->limit && $task) {\n Redis::init()->rpush('tasks', json_encode($task));\n sleep(1);\n } elseif (!$task) {\n echo 'Complited!' . PHP_EOL;\n $this->stop = true;\n }\n }\n }",
"public function control($status, $worker) {\n $status['keepCount'] = $status['requested'];\n\n $operation = $this->getOperation();\n $operation->keep($status, $worker);\n\n return $this;\n }",
"protected function checkStartConditions(): void\n {\n if (!$this->exists) {\n throw new WorkerException('Worker must be properly created before start.');\n }\n\n if ($this->getAttribute('pid') !== null) {\n throw new WorkerException('Worker is running already.');\n }\n }",
"function start()\n\t{\n\t\tif( ! $this->is_running ){\n\t\t\t$this->is_running = TRUE;\n\t\t\t$this->running_since = self::timeMillisecondsAsFloat();\n\t\t}\n\t}",
"public function start () {\n if (!$this->started) {\n $this->restart();\n }\n }",
"public function start() {\n\n // TODO: Maybe sometimes\n\n }",
"public function start() {\n $cmd = sprintf(\"./control.sh start %s -game %s -ip %s -port %d -maxplayers %d -map %s -rcon %s\", $this->sid, $this->gameId, $this->ip, $this->port, $this->maxplayers, $this->map, $this->rcon);\n ssh($cmd, $this->host);\n DB::get()->query(\"UPDATE `servers` SET `status` = 1 WHERE `serverID` = '\" . $this->serverId . \"'\");\n }",
"protected function start()\n {\n $status = $this->autoTestController->start();\n\n PacklinkPrestaShopUtility::dieJson($status);\n }",
"protected function startWorker($isForked=false) {\n\t\t$queues = explode(',', $this->queue);\n\t\t$worker = new Resque_Worker($queues);\n\t\t$worker->setLogger($this->logger);\n\n\t\tif(!$isForked) {\n\t\t\t$PIDFILE = getenv('PIDFILE');\n\t\t\tif($PIDFILE) {\n\t\t\t\tfile_put_contents($PIDFILE, getmypid()) or die('Could not write PID information to ' . $PIDFILE);\n\t\t\t}\n\t\t}\n\n\t\tfwrite(STDOUT, '[+] Starting worker '.$worker.\", polling every \".$this->interval.\" second(s)\".PHP_EOL);\n\t\t$worker->work($this->interval);\n\t}",
"public function start() {\n\t\t$this->invoke(\"start\");\n\t}",
"public static function begin(string $label, bool $status = true): void\n {\n self::$status[$label] = $status;\n\n if ($status) {\n self::$lastLabel = $label;\n self::microtimeStart($label);\n }\n }",
"public function start();",
"public function start();",
"public function start();",
"public function start();",
"public function start();",
"public function start();",
"public function start();",
"public function start();",
"public function start();",
"public function start();",
"public function start();",
"public function start();",
"private function _startMonitor()\n {\n Log::Dump(static::LOG_PREFIX.'starting monitor');\n while (1)\n {\n if( self::$terminate )\n {\n $this->_exitSwooleApp('swHttp');\n $this->_exitSwooleApp('swWebsocket');\n $this->_exitWorker();\n $this->_exitLog();\n $this->_exitMonitor();\n }\n\n pcntl_signal_dispatch();\n\n $status = 0;\n //returns the process ID of the child which exited, -1 on error or zero if WNOHANG was provided as an option (on wait3-available systems) and no child was available\n $pid = pcntl_wait($status, WUNTRACED);\n $this->_handleExitedProcess($pid, $status);\n pcntl_signal_dispatch();\n usleep(1000);\n }\n }",
"public function start() {}",
"public function start() {}",
"public function start() {}",
"public function start() {}",
"public function start() {}",
"public function start() {}",
"public function start() {}",
"public function start() {}",
"public function start() {}",
"public function start() {}",
"private function serveStart()\n {\n if (static::$run) {\n return;\n }\n\n static::$run = true;\n\n print \"Running dev/build...\\n\";\n @exec(\"framework/sake dev/build flush=1 > /dev/null 2> /dev/null\");\n\n print \"Finding open port...\\n\";\n\n while (!$this->addressAvailable($this->getHost(), $this->getPort())) {\n $this->setPort($this->getPort() + 1);\n }\n\n if (!$this->running) {\n $host = $this->getHost();\n $port = $this->getPort();\n\n $hash = spl_object_hash($this);\n\n print \"Starting development server...\\n\";\n $command = \"framework/sake dev/tasks/SilverStripe-Serve-Task hash={$hash} host={$host} port={$port} > /dev/null 2> /dev/null &\";\n\n exec($command, $output);\n\n $command = \"ps -o pid,command | grep {$hash}\";\n @exec($command, $output);\n\n if (count($output) > 0) {\n foreach ($output as $line) {\n $parts = explode(\" \", $line);\n $this->pid[] = $parts[0];\n }\n }\n\n sleep(1);\n }\n }",
"public function start()\n {\n // nop\n }",
"private function main()\n {\n $this->initDataSource();\n while ($this->running) {\n try {\n $this->eventDispatcher->dispatch(new QueueStatus($this));\n } catch (\\Throwable $e) {\n $this->stdOutLogger->error('Watch coroutine exception, msg:' . $e->getMessage());\n $this->fileLogger->alert('Watch coroutine exception', [\n 'file' => $e->getFile(),\n 'line' => $e->getLine(),\n 'msg' => $e->getMessage(),\n 'trace' => $e->getTraceAsString(),\n ]);\n }\n\n Coroutine::sleep(self::WATCH_COMMAND_TIME);\n }\n $this->stdOutLogger->info('消费进程(' . $this->process->pid . ')退出');\n $this->fileLogger->info('消费进程(' . $this->process->pid . ')退出');\n }",
"public function run():void\n\t{\n\t\t$this->ensureUnclosed();\n\t\t\n\t\tif( $this->_status === self::STATUSES['RUNNING'] )\n\t\t\treturn;\n\t\t\n\t\t$this->_status= self::STATUSES['RUNNING'];\n\t\t\n\t\t$this->_loop();\n\t\t\n\t\t$this->_status= self::STATUSES['DONE'];\n\t}",
"public function registerWorker()\n\t{\n\t\tResque::redis()->sadd('workers', (string)$this);\n\t\tResque::redis()->set('worker:' . (string)$this . ':started', date('c'));\n\t}",
"function start($id)\n{\n\t// if service is not stopped\n\tif ( status($id) !== false )\n\t\treturn false;\n\n $result = _cmd($id, 'start');\n\n\t$status = Config::$Linux\n\t\t? status($id) // FIXME: for linux just return current status\n\t\t: strstr($result, 'START_PENDING') ? true : false;;\n\n\treturn $status;\n}",
"public function inProgress()\n {\n $this->setStatus(self::STATUS_IN_PROGRESS);\n }",
"private function setStatus($status)\n {\n $this->status = $status;\n\n $hash = spl_object_hash($this);\n $name = TaskStatus::getName($status);\n // echo \"task [$hash] -> $name\\n\"; // TODO\n }",
"public function run()\n {\n $this->_fnameFlagStop = dirname(__FILE__) . '/' . $this->getIndividualFilenameAsFlag();\n $this->checkIfShouldStopWork();\n\n $worker = Mage::getModel('myproject_gearman/worker'); // just a wrapper around PHP Gearman class\n\n $worker->addFunction($this->getJobName(), function (GearmanJob $job) {\n $this->_curJobObject = $job;\n $data = unserialize($job->workload());\n $this->processDataWrapper($data, $job);\n });\n\n $worker->addFunction($this->getIndividualFilenameAsFlag(), function (GearmanJob $job) {\n $this->log('Got job to exit. Job name: ' . $this->getIndividualFilenameAsFlag());\n $job->sendComplete('ok'); // without this line queue not cleans and task stay in this queue\n exit;\n });\n\n $worker->work();\n }",
"abstract public function start();",
"abstract public function start();",
"private function doWakeup()\n {\n $runnerStatus = $this->getRunnerStorage()->getStatus();\n $currentGuid = $runnerStatus->getGuid();\n if (!empty($currentGuid) && !$runnerStatus->isExpired()) {\n return;\n }\n\n if ($runnerStatus->isExpired()) {\n $this->runnerStatusStorage->setStatus(TaskRunnerStatus::createNullStatus());\n Logger::logDebug('Expired task runner detected, wakeup component will start new instance.');\n }\n\n $guid = $this->getGuidProvider()->generateGuid();\n\n $this->runnerStatusStorage->setStatus(\n new TaskRunnerStatus(\n $guid,\n $this->getTimeProvider()->getCurrentLocalTime()->getTimestamp()\n )\n );\n\n $this->getAsyncProcessStarter()->start(new TaskRunnerStarter($guid));\n }",
"protected function Set_Process_Status($status) {\n\t\tif (!empty($this->process_log_name)) \n\t\t{\n\t\t\t$this->Get_ACH()->Set_Process_Status($this->process_log_name, $status);\n\t\t}\n\t}",
"private function fork()\n\t{\n\t\t$pid = pcntl_fork();\n\n\t\tswitch ( $pid ) {\n\t\t\tcase -1:\n\t\t\t\t// exception\n\t\t\t\texit;\n\t\t\t\tbreak;\n\n\t\t\tcase 0:\n\t\t\t\ttry {\n\t\t\t\t\t// init worker instance\n\t\t\t\t\t$worker = new Worker( [\n\t\t\t\t\t\t'type' => 'worker',\n\t\t\t\t\t\t'pipe_dir' => $this->pipeDir,\n\t\t\t\t\t\t'tmp_dir' => $this->tmpDir,\n\t\t\t\t\t\t'app_name' => $this->appName,\n\t\t\t\t\t] );\n\t\t\t\t\t$worker->setProcessName();\n\t\t\t\t\t$worker->pipeMake();\n\t\t\t\t\t$worker->hangup( $this->workBusinessClosure );\n\t\t\t\t} catch ( Exception $e ) {\n\t\t\t\t\tProcessException::error( [\n\t\t\t\t\t\t'msg' => [\n\t\t\t\t\t\t\t'msg' => $e->getMessage(),\n\t\t\t\t\t\t\t'file' => $e->getFile(),\n\t\t\t\t\t\t\t'line' => $e->getLine(),\n\t\t\t\t\t\t],\n\t\t\t\t\t] );\n\t\t\t\t}\n\n\t\t\t\t// worker exit\n\t\t\t\texit;\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\ttry {\n\t\t\t\t\t$worker = new Worker( [\n\t\t\t\t\t\t'type' => 'worker',\n\t\t\t\t\t\t'pid' => $pid,\n\t\t\t\t\t\t'pipe_dir' => $this->pipeDir,\n\t\t\t\t\t\t'tmp_dir' => $this->tmpDir,\n\t\t\t\t\t\t'app_name' => $this->appName,\n\t\t\t\t\t] );\n\t\t\t\t\t$this->workers[ $pid ] = $worker;\n\t\t\t\t} catch ( Exception $e ) {\n\t\t\t\t\tProcessException::error( [\n\t\t\t\t\t\t'msg' => [\n\t\t\t\t\t\t\t'msg' => $e->getMessage(),\n\t\t\t\t\t\t\t'file' => $e->getFile(),\n\t\t\t\t\t\t\t'line' => $e->getLine(),\n\t\t\t\t\t\t],\n\t\t\t\t\t] );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t}",
"public function start() {\n $__scope = $this->_runHooks($this->_startHooks);\n extract($__scope);\n\n $this->_write($this->_socket, self::READY);\n\n /* Note the naming of the local variables due to shared scope with the user here */\n for (;;) {\n declare(ticks = 1);\n // don't exit on ctrl-c\n pcntl_signal(SIGINT, SIG_IGN, true);\n\n $this->_cancelled = false;\n\n $__input = $this->_transform($this->_read($this->_socket));\n\n if ($__input === null) {\n continue;\n }\n\n $__response = self::DONE;\n\n $this->_ppid = posix_getpid();\n $this->_pid = pcntl_fork();\n\n if ($this->_pid < 0) {\n throw new \\RuntimeException('Failed to fork child labourer');\n } elseif ($this->_pid > 0) {\n // kill the child on ctrl-c\n pcntl_signal(SIGINT, array($this, 'cancelOperation'), true);\n pcntl_waitpid($this->_pid, $__status);\n\n if (!$this->_cancelled && $__status != (self::ABNORMAL_EXIT << 8)) {\n $__response = self::EXITED;\n } else {\n $this->_runHooks($this->_failureHooks);\n $__response = self::FAILED;\n }\n } else {\n // user exception handlers normally cause a clean exit, so Boris will exit too\n if (!$this->_exceptionHandler =\n set_exception_handler(array($this, 'delegateExceptionHandler'))) {\n restore_exception_handler();\n }\n\n // undo ctrl-c signal handling ready for user code execution\n pcntl_signal(SIGINT, SIG_DFL, true);\n $__pid = posix_getpid();\n\n $__result = eval($__input);\n\n if (posix_getpid() != $__pid) {\n // whatever the user entered caused a forked child\n // (totally valid, but we don't want that child to loop and wait for input)\n exit(0);\n }\n\n if (preg_match('/\\s*return\\b/i', $__input)) {\n fwrite(STDOUT, sprintf(\" → %s\\n\", $this->_inspector->inspect($__result)));\n }\n $this->_expungeOldWorker();\n }\n\n $this->_write($this->_socket, $__response);\n\n if ($__response == self::EXITED) {\n exit(0);\n }\n }\n }",
"public function start()\n\t{\n\t\t// reset first, will start automaticly after a full reset\n\t\t$this->data->directSet(\"resetNeeded\", 1);\n\t}",
"public function stop($status = 0)\n {\n $this->event->trigger(new WorkerStopping($status));\n\n exit($status);\n }",
"function process(Worker $worker)\n {\n $this->server();\n }",
"abstract function start();",
"public function run()\n {\n $status = [\n ['ml_status_name' => 'Active'],\n ['ml_status_name' => 'Completed'],\n ['ml_status_name' => 'Pending']\n ];\n foreach ($status as $stat)\n {\n MilstoneStatus::create($stat);\n }\n\n }",
"public function start()\n {\n Console::startProgress(0,100);\n }",
"public function run()\n {\n $this->server->start();\n }",
"public function start(Runnable $runner);",
"public function exec() {\n\t\t$this->stop();\n\t\tswitch ($this->enable) {\n\t\tcase FALSE:\n\t\t\t$this->update(TRUE);\n\t\t\tbreak;\n\t\tcase TRUE:\n\t\t\t$this->update(FALSE);\n\t\t\tusleep($this->delay);\n\t\t\t$this->start();\n\t\t\tbreak;\n\t\t}\n\t}",
"private function updateStatus()\n {\n $this->setStatus(\n socket_get_status(pfsockopen($this->uri, $this->port))\n );\n }",
"public function startWorker(ConsoleOutput $output);",
"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 run()\n {\n $this->setStatus(Job::STATUS_RUNNING);\n\n $this->redis->zadd(Queue::redisKey($this->queue, 'running'), time(), $this->payload);\n Stats::incr('running', 1);\n Stats::incr('running', 1, Queue::redisKey($this->queue, 'stats'));\n\n Event::fire(Event::JOB_RUNNING, $this);\n }",
"public function run()\n {\n $statuses = [\n ['name' => \"active\", 'code' => \"active\",'is_default' => 1],\n ['name' => \"inactive\", 'code' => \"inactive\",'is_default' => 0]\n ];\n foreach ($statuses as $status) {\n Status::create($status);\n }\n }",
"public function init()\n\t{\n\t\tparent::init();\n\t\t$this->status_id = static::STATUS_RUNNING;\n\t}",
"public function start()\n {\n $this->register();\n\n //定时心跳\n swoole_timer_tick($this->config->getHeartbeatInterval(), function () {\n try {\n $this->heartbeat();\n } catch (\\Throwable $e) {\n $this->output(\"[\" . date(\"Y-m-d H:i:s\") . \"]\" . \"Heartbeat failed because of connection error... (code: \" . $e->getCode() . \")\");\n }\n });\n\n return 0;\n }",
"public function run()\n {\n $statuses = [\n 'shipment created',\n 'shipment picked',\n 'delivery in process',\n 'delivered payment in process',\n 'delivered',\n 'undelivered',\n 'reattempt',\n 'return in process',\n 'returned',\n ];\n\n foreach ($statuses as $status){\n Status::create([\n 'status'=>$status\n ]);\n }\n }",
"public function run()\n {\n $status = ['successful', 'callback', 'unreachable'];\n\n for ($i=0; $i<count($status); $i++){\n \\App\\RenewalStatus::create([\n 'status' => $status[$i]\n ]);\n }\n }",
"public function run()\n {\n $workers = Worker::factory()->count(7)->create();\n }",
"public function start() {\n\t\t// Setup\n\t\t$options = array(\n\t\t\t'appName' => 'cakedaemon',\n\t\t\t'appDescription' => 'Runs extended tasks defined in the host app in the background',\n\t\t\t'sysMaxExecutionTime' => '0',\n\t\t\t'sysMaxInputTime' => '0',\n\t\t\t'sysMemoryLimit' => '1024M',\n\t\t\t'logLocation' => TMP . \"logs\" . DS . 'cakedaemon.log',\n\t\t\t'logVerbosity' => System_Daemon::LOG_INFO\n\t\t);\n\t\tSystem_Daemon::setOptions($options);\n\t\tSystem_Daemon::setSigHandler('SIGCHLD', array(&$this, 'handleSIGCHLD'));\n\n\t\t// This program can also be run in the forground with argument no-daemon\n\t\tif (!$this->params['no-daemon']) {\n\t\t\t// Spawn Daemon\n\t\t\tSystem_Daemon::start();\n\t\t}\n\n\t\t$this->__initConfig();\n\n\t\t// Here we have to do several things\n\t\t// 1) Figure out how many stale static nodes we have\n\t\t// 2) Ask the DB for one one job for each node\n\t\t// 3) Start these jobs on each of the corresponding nodes\n\t\t// 4) Wait for a pre-determined amount of time\n\t\t// 5) Check if any children have finished and start again\n\t\twhile (!System_Daemon::isDying()) {\n\t\t\t$taskIds = $this->DaemonRunner->findStaleJobTypes();\n\t\t\t$currentlyRunningJobs = $this->DaemonRunner->findProcessingJobs();\n\n\t\t\tSystem_Daemon::debug(\"Stale Process Types: \" . json_encode($taskIds));\n\t\t\tSystem_Daemon::debug(\"Aware of currently running job ids: \" . json_encode($currentlyRunningJobs));\n\t\t\tforeach ($taskIds as $id) {\n\t\t\t\tif ($job = $this->DaemonQueue->findJob($id, $currentlyRunningJobs)) {\n\t\t\t\t\t$currentlyRunningJobs[] = $job['DaemonQueue']['id'];\n\t\t\t\t\t$this->__spawnChild($job, $this->DaemonRunner->findStaleRunnerByJobType($id));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Sometimes our sleep is inturrupted\n\t\t\t// This could be by a very noisy owl, or by a completed child process.\n\t\t\t// Either way, we should get our beauty sleep!\n\t\t\t$timeToSleep = $this->config['timeout'];\n\t\t\twhile ($timeToSleep > 0) {\n\t\t\t\t$timeToSleep = sleep($timeToSleep);\n\t\t\t}\n\t\t\tclearstatcache();\n\n\t\t\t$this->__reconnectDB();\n\n\t\t\t// For some reason the whole SIG handle thing doesnt work in\n\t\t\t// foreground mode\n\t\t\tif ($this->params['no-daemon']) {\n\t\t\t\t$this->__mopUp();\n\t\t\t}\n\t\t}\n\n\t\tSystem_Daemon::stop();\n\t}",
"public function onWorkerStart(Swoole\\Server $swooleServer, $workerId)\n {\n }",
"public function run()\n {\n // $create = Status::create(\n // [\n // 'ahmed',\n // 'mohamed',\n // ]);\n }",
"public function go() {\n $this->startAllWorkers();\n $this->doWorkParent();\n }",
"public function run()\n {\n $this->h = new helpers();\n\n $this->faker = Faker::create();\n\n $bar = $this->command->getOutput()->createProgressBar(\n count($this->order_status_updates())\n );\n\n $bar->start();\n\n foreach ($this->order_status_updates() as $orderStatusUpdate) {\n factory(OrderStatusUpdate::class)->create($orderStatusUpdate);\n $bar->advance();\n }\n\n $bar->finish();\n $this->command->info(\"\\n\");\n }",
"public function start($msg = null, array $extraInfo = [])\n {\n if ($this->status != self::NOT_STARTED) {\n throw new TrackerException(\"Cannot start tracker that was already started\");\n }\n\n $this->status = self::RUNNING;\n $this->startTime = microtime(true);\n\n $tick = new Tick($this, Tick::SUCCESS, $msg, $extraInfo, 0);\n $this->dispatcher->dispatch(Events::TRACKER_START, $tick);\n $this->lastTick = $tick;\n }",
"private function doWorkParent() {\n Log5PHP_MDC::put('Generation', 'parent');\n\n global $run;\n global $reload;\n global $workers;\n\n $this->parentSetup();\n\n while ($run && count($workers) > 0) {\n if ($reload) {\n gosUtility_parallel::$logger->info(\"Parent saw reload, restarting workers\");\n\n $reload = false;\n $this->killAllWorkers();\n $this->startAllWorkers();\n } else {\n $this->checkWorkers();\n }\n\n // Sleep 4 seconds\n usleep(4000000);\n }\n\n $this->parentCleanup();\n $this->killAllWorkers();\n pcntl_wait($status);\n }",
"public function setStatus($status, \\Throwable $e = null)\n {\n if (!($packet = $this->getPacket())) {\n $shifts = debug_backtrace();\n while($item = array_shift($shifts)) {\n if(empty($item['file'])) {\n $item['file'] = '';\n }\n if(stripos($item['file'], 'Foundation/Retry') !== false && $item['function'] === '_exec') break;\n }\n array_splice($shifts, 3);\n $packet = array(\n 'id' => $this->id,\n 'queue' => $this->queue,\n 'payload' => $this->payload,\n 'worker' => '',\n 'status' => $status,\n 'created_by' => json_encode(array_map(function($item) {\n if(empty($item['line'])) $item['line'] = 'na';\n if(empty($item['file'])) $item['file'] = 'na';\n if(empty($item['function'])) $item['function'] = 'na';\n if(empty($item['args'])) $item['args'] = [];\n return array(\n 'origin' => str_replace($GLOBALS['system_root'], \"\", $item['file']) . ':' . @$item['line'] . ' ' . @$item['function'],\n 'args' => $item['args'],\n );\n }, $shifts)),\n 'created' => microtime(true),\n 'updated' => microtime(true),\n 'delayed' => 0,\n 'started' => 0,\n 'finished' => 0,\n 'output' => '',\n 'exception' => null,\n );\n }\n\n $packet['worker'] = (string)$this->worker;\n $packet['status'] = $status;\n $packet['updated'] = microtime(true);\n\n if ($status == Job::STATUS_RUNNING) {\n $packet['started'] = microtime(true);\n }\n\n if (in_array($status, self::$completeStatuses)) {\n $packet['finished'] = microtime(true);\n if($status == Job::STATUS_COMPLETE) $packet['progress'] = 100;\n }\n\n if ($e && (!$e instanceof \\Core\\Job\\RetryException)) {\n if($packet['exception']) {\n $exceptionPacket = json_decode($packet['exception'], true);\n } else {\n $exceptionPacket = [];\n }\n\n if(count($exceptionPacket) > 5) {\n array_splice($exceptionPacket, 0, count($exceptionPacket) - 5);\n } \n\n if(empty($packet['failed_count'])) {\n $packet['failed_count'] = 0;\n }\n $exceptionPacket[] = array(\n 'attempt' => $packet['failed_count'] + 1,\n 'class' => get_class($e),\n 'error' => sprintf('%s in %s on line %d', $e->getMessage(), $e->getFile(), $e->getLine()),\n 'backtrace' => explode(\"\\n\", $e->getTraceAsString())\n );\n $packet['exception'] = json_encode($exceptionPacket);\n }\n\n $this->redis->hmset(self::redisKey($this), $packet);\n // $this->redis->hincrby(self::redisKey($this), ['exec_time' => $this->execTime()]);\n\n // Expire the status for completed jobs\n if (in_array($status, self::$completeStatuses)) {\n $expiryTime = \\Resque::getConfig('default.expiry_time', \\Resque::DEFAULT_EXPIRY_TIME);\n\n $this->redis->expire(self::redisKey($this), $expiryTime);\n\n if($this->isPerformedOnBot) {\n $lastRun = intval($this->redis->hget('jobs:stat:' . $this->getPresentation(), 'recent'));\n $frequency = intval($this->redis->hget('jobs:stat:' . $this->getPresentation(), 'frequency'));\n $this->redis->zincrby('jobs:time', $this->execTime(), $status . \"::\" . $this->getPresentation());\n $this->redis->zincrby('jobs:count', 1, $status . \"::\" . $this->getPresentation());\n\n $stat = [\n 'class_name' => $this->getClass(),\n 'recent' => time(),\n 'frequency' => ($lastRun > 0) ? ((time() - $lastRun + ( $frequency > 1 ? $frequency : 1)) / 2) : 1,\n\n ];\n\n $this->redis->hmset('jobs:stat:' . $this->getPresentation(), $stat);\n }\n\n }\n }",
"public function run()\n {\n $status = [\n array( 'name' => 'Alquilar' ),\n array( 'name' => 'En Venta' ),\n array( 'name' => 'En venta con opcion alquiler' ),\n array( 'name' => 'En aquiler con opcion a venta' ),\n array( 'name' => 'Alquiler de tiempo temporal' ),\n ];\n\n foreach ($status as $key => $value) {\n Status::create($value);\n }\n }",
"public function start() {\n $this->getPidFile()->write($this->getPidManager()->getCurrent());\n $this->getIpc()->setVar('pid', $this->getPidManager()->getCurrent());\n $this->_run();\n }",
"public function run()\n {\n ShipmentStatus::create([\n 'name' => 'In Queue'\n ]);\n\n ShipmentStatus::create([\n 'name' => 'In Progress'\n ]);\n\n ShipmentStatus::create([\n 'name' => 'Completed'\n ]);\n }",
"public function registerWorker()\r\n {\r\n Resque::redis()->sadd('workers', $this);\r\n setlocale(LC_TIME, \"\");\r\n setlocale(LC_ALL, \"en\");\r\n Resque::redis()->set('worker:' . (string)$this . ':started', strftime('%a %b %d %H:%M:%S %Z %Y'));\r\n }",
"public function run()\n {\n Status::insert($this->statusLists);\n }",
"public function run()\n {\n $serv = new \\swoole_server($this->host, $this->port);\n $serv->set(\n array(\n 'process_name' => 'ershoufang_crawler', //swoole 进程名称\n 'worker_num' => 2,//开启的worker进程数\n 'task_worker_num' => 2,//开启的task进程数\n 'open_cpu_affinity' => true,\n 'daemonize' => false,\n 'max_request' => 10000,\n 'dispatch_mode' => 2,\n 'debug_mode' => 0,\n 'log_file' => 'swoole.log',\n 'open_tcp_nodelay' => true,\n \"task_ipc_mode\" => 2,\n 'task_max_request' => 10000\n )\n );\n\n $serv->on('Start', array($this, 'onStart'));\n $serv->on('Connect', array($this, 'onConnect'));\n $serv->on('Receive', array($this, 'onReceive'));\n $serv->on('WorkerStart', array($this, 'onWorkerStart'));\n $serv->on('Task', array($this, 'onTask'));\n $serv->on('Finish', array($this, 'onFinish'));\n $serv->on('Close', array($this, 'onClose'));\n $serv->start();\n }",
"private function updateStatus(): void\n {\n $shell = $this->getShell();\n $shell->exec(\"docker ps | grep traefik | awk '{print \\$1;}'\");\n if ($shell->getOutput() !== '') {\n $this->started = true;\n $this->containerId = $shell->getOutput();\n } else {\n $this->started = false;\n $this->containerId = null;\n }\n }",
"public function run(){\n set_time_limit(0);\n ini_set('memory_limit', '2048M');\n\n $this->addEventListener('mainRunnerProgress', $this);\n //TODO approfondire. Al momento commentato perché dà errori (la classe Error è presente da PHP 7)\n // set_error_handler(function($num, $str, $file, $line){\n // throw new Error(\n // \"Errore PHP n°$num: $str\\r\\n\" .\n // \"$file:$line\"\n // );\n // });\n }",
"public function setStatus(TaskRunnerStatus $status)\n {\n $this->checkTaskRunnerStatusChangeAvailability($status);\n $this->getConfigService()->setTaskRunnerStatus($status->getGuid(), $status->getAliveSinceTimestamp());\n }",
"public function submissions_set_status($whereparams, $status) {\n global $DB;\n\n if (empty($whereparams)) {\n $whereparams = array();\n }\n // Just in case the call is missing the surveypro id, I add it.\n if (!array_key_exists('surveyproid', $whereparams)) {\n $whereparams['surveyproid'] = $this->surveypro->id;\n }\n\n if ( ($status != SURVEYPRO_STATUSCLOSED) && ($status != SURVEYPRO_STATUSINPROGRESS) ) {\n debugging('Bad parameters passed to submissions_set_status', DEBUG_DEVELOPER);\n }\n\n $whereparams['status'] = 1 - $status;\n $DB->set_field('surveypro_submission', 'status', $status, $whereparams);\n }",
"final public function setStatus(Int $status)\n\t{\n\t\t$this->_status = $status;\n\t}",
"public function status(int $status): self\n {\n $this->status = $status;\n return $this;\n }",
"private function set_last_run($status) {\n\t\tif($this->get_last_run() != $status) { \n\t\t\t// transitions cannot go from 'working' to 'connected' if wp-united is enabled OK.\n\t\t\tif( ($this->lastRun == 'working') && ($status == 'connected') && $this->is_enabled() ) {\n\t\t\t\treturn;\n\t\t\t} \n\t\t\t$this->lastRun = $status;\n\t\t\tupdate_option('wpu-last-run', $status);\n\t\t}\n\t}",
"public static function start()\n {\n self::registerDefault();\n\n $page = rex_request('page', 'string');\n $subpage = rex_request('subpage', 'string');\n $function = rex_request('function', 'string');\n\n if ($page === 'import_export' && $subpage === 'import' && $function === 'dbimport') {\n rex_register_extension('A1_AFTER_DB_IMPORT', function () {\n rex_developer_manager::synchronize(null, true);\n });\n } elseif ($page === 'developer' && $function === 'update') {\n rex_register_extension('OUTPUT_FILTER_CACHE', function () {\n rex_developer_manager::synchronize(null, true);\n });\n } else {\n self::synchronize(self::START_EARLY);\n rex_register_extension('OUTPUT_FILTER_CACHE', function () {\n rex_developer_manager::synchronize(rex_developer_manager::START_LATE);\n });\n }\n }",
"public function index(SS_HTTPRequest $request) {\n\n\t\tif($this->numWorkers > 1) {\n\t\t\t$this->fork($this->numWorkers);\n\t\t} else {\n\t\t\t$this->startWorker();\n\t\t}\n\t}"
]
| [
"0.62489",
"0.5930151",
"0.58791363",
"0.5878382",
"0.5816626",
"0.5766797",
"0.57000524",
"0.56852263",
"0.5643365",
"0.55833447",
"0.55819124",
"0.5564634",
"0.5557738",
"0.5488889",
"0.5480829",
"0.54395545",
"0.54102314",
"0.5384276",
"0.538332",
"0.5373288",
"0.5369324",
"0.5369324",
"0.5369324",
"0.5369324",
"0.5369324",
"0.5369324",
"0.5369324",
"0.5369324",
"0.5369324",
"0.5369324",
"0.5369324",
"0.5369324",
"0.5354412",
"0.5350655",
"0.53502125",
"0.53502125",
"0.534999",
"0.5349172",
"0.5349172",
"0.5349172",
"0.5349172",
"0.5349172",
"0.5349172",
"0.53318197",
"0.527295",
"0.5268847",
"0.52639127",
"0.5257447",
"0.52441937",
"0.5236886",
"0.5192187",
"0.5176058",
"0.51708627",
"0.51708627",
"0.5166856",
"0.51558554",
"0.51511335",
"0.5150765",
"0.51501983",
"0.5143213",
"0.5141737",
"0.51392823",
"0.51335824",
"0.5123523",
"0.51173186",
"0.5114838",
"0.5110448",
"0.510267",
"0.50926507",
"0.50922763",
"0.5083486",
"0.5076285",
"0.50752354",
"0.5067443",
"0.5066871",
"0.5063578",
"0.506012",
"0.5054721",
"0.5047242",
"0.5046695",
"0.5030207",
"0.5027084",
"0.5024454",
"0.501545",
"0.50102955",
"0.4995707",
"0.49945238",
"0.4983709",
"0.49821126",
"0.49762806",
"0.49650604",
"0.4955172",
"0.49533463",
"0.49507636",
"0.4944288",
"0.49287534",
"0.49254048",
"0.49239936",
"0.4923823",
"0.4918164"
]
| 0.50918984 | 70 |
Start working on those tokens. | public function process(Collection $tokens)
{
// Dispatch the job for background processing
$job = (new CampaignPublish($this, $tokens))->onQueue($this->getQueue());
dispatch($job);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function _init_tokens()\n\t{\n\t\tif(is_null($this->_tokens)) {\n\t\t\t$this->_all_tokens = [];\n\t\t\t$this->_tmpname = 0;\n\t\t\t\t\n\t\t\tif($this->token_variants) {\n\t\t\t\t//pass\n\t\t\t} else {\n\t\t\t\t$this->_tokens = $this->process_tokendef('', $this->get_tokendefs());\n\t\t\t}\n\t\t}\t\t\n\t}",
"public function run()\n {\n $tokens = [\n [\n 'av' => 'ABT',\n 'name' => 'AxieBusToken',\n 'share' => 20,\n 'img' => 'images/card/card1.png',\n 'price' => 1000\n ],\n [\n 'av' => 'ABIT',\n 'name' => 'AxieBusinessInterestToken',\n 'share' => 30,\n 'img' => 'images/card/card3.png',\n 'price' => 1000\n ],\n // [\n // 'av' => 'BTT',\n // 'name' => 'BethylTradeToken',\n // 'share' => 30,\n // 'img' => 'images/card/card2.png',\n // 'price' => 1000\n // ],\n // [\n // 'av' => 'WWT',\n // 'name' => 'WonderWhiteToken',\n // 'share' => 30,\n // 'img' => 'images/card/card4.png'\n // ],\n ];\n\n foreach($tokens as $token)\n {\n Token::create($token);\n }\n }",
"protected function startExpression()\n {\n $this->tokenStack[] = $this->currentToken;\n }",
"public function next_token()\n {\n }",
"public function start() {\n $ctx = $this->getContext();\n $this->fetch($ctx);\n $this->parseContext($ctx);\n }",
"public function createTokens()\n {\n\n }",
"public function start()\n {\n $this->_marks = array();\n $this->mark('__start');\n }",
"protected function _initializeTokens() {\n\t\t$this->_previousToken = $this->_session->key;\n\t\t\n\t\t$newKey = sha1 ( microtime () . mt_rand () );\n\t\t\n\t\t$this->_session->key = $newKey;\n\t\tif ($this->_expiryTime > 0)\n\t\t\t$this->_session->setExpirationSeconds ( $this->_expiryTime );\n\t\t\n\t\t$this->_token = $newKey;\n\t}",
"public function enterToken(string $token): void;",
"public function next() {\n\t\tnext($this->tokens);\n\t}",
"function start()\n {\n \n self::parse_references(); //exit(\"\\nstop references\\n\");\n /*\n test data\n $this->taxon_refs[8][5] = '';\n $this->taxon_refs[8][10] = '';\n $this->taxon_refs[8][15] = '';\n */\n self::parse_classification(); //exit(\"\\nstop classification\\n\");\n self::parse_images(); //exit(\"\\nstop images\\n\");\n $this->archive_builder->finalize(TRUE);\n if($this->debug) Functions::start_print_debug($this->debug, $this->resource_id);\n }",
"public static function start()\n {\n self::registerDefault();\n\n $page = rex_request('page', 'string');\n $subpage = rex_request('subpage', 'string');\n $function = rex_request('function', 'string');\n\n if ($page === 'import_export' && $subpage === 'import' && $function === 'dbimport') {\n rex_register_extension('A1_AFTER_DB_IMPORT', function () {\n rex_developer_manager::synchronize(null, true);\n });\n } elseif ($page === 'developer' && $function === 'update') {\n rex_register_extension('OUTPUT_FILTER_CACHE', function () {\n rex_developer_manager::synchronize(null, true);\n });\n } else {\n self::synchronize(self::START_EARLY);\n rex_register_extension('OUTPUT_FILTER_CACHE', function () {\n rex_developer_manager::synchronize(rex_developer_manager::START_LATE);\n });\n }\n }",
"private function start()\n {\n // CSRF Watchdog\n $this->csrfWatchdog();\n\n // Retrieve and other services\n $this->retriever->watchdog();\n\n // Router Templater Hybrid\n $this->renderer->route();\n }",
"protected function _getNextToken() {}",
"protected function _getNextToken() {}",
"public function resetTokens() {\n\t\t$this->tokens = $this->initialMarking;\n\t}",
"public function start() {\n\n // TODO: Maybe sometimes\n\n }",
"function get_token(){\n global $token;\n global $identifier;\n global $array_stream;\n global $key_val;\n global $keywords;\n\n global $c_commentary;\n\n $token_end = True;\n $token_type = tokenType::start;\n init_token();\n\n while($token_end){\n /**\n * @warning end of Array works only for PHP7.3!!!!\n */\n if($key_val === array_key_last($array_stream)){\n $token->last = False;\n if($token->data !== PHP_EOL){\n $token->type = tokenType::EOL;\n $token_end = False;\n }\n }\n /* State automaton for lexical analysis combined with usage of regular expressions */\n switch ($token_type) {\n case tokenType::start:\n {\n if($array_stream[$key_val] === \".\"){ //header dection\n $token_type = tokenType::header;\n break;\n }\n elseif($array_stream[$key_val] === \"@\"){ //at mark detected\n $token->data = $array_stream[$key_val];\n $token->type = tokenType::marker;\n identify_operand();\n preset_label();\n $key_val++;\n $token_end = False;\n break;\n }\n elseif($array_stream[$key_val] === \"#\"){ //start of commentary\n $token_type = tokenType::commentary;\n break;\n }\n elseif($array_stream[$key_val] === PHP_EOL){ //EOL detected\n $token_type = tokenType::EOL;\n break;\n }\n elseif($array_stream[$key_val] === \"\\t\" || $array_stream[$key_val] === \" \"){ //white spaces before instruction/commentary\n $key_val++;\n preset_identifier();\n }\n elseif(ctype_alpha($array_stream[$key_val]) || ctype_digit($array_stream[$key_val]) || preg_match(\"/^_|\\-|\\$|&|%|\\*|!|\\?$/\", $array_stream[$key_val])){ //var/string/int catch\n $token_type = tokenType::charStream;\n break;\n }\n else {\n fwrite(STDERR, \"ERROR : Input doesn't start with .IPPcode19 header\\n\");\n exit(21);#appropriate exit code\n }\n break;\n }\n case tokenType::header:\n {\n /* Load header in loop, until new line space or commentary right after header */\n while(1){\n if($array_stream[$key_val] === PHP_EOL || preg_match(\"/^[ \\t#]$/\",$array_stream[$key_val]) || $key_val === array_key_last($array_stream)){\n if(preg_match(\"/^.ippcode19$/\", strtolower($token->data))){\n $token->type = tokenType::header;\n $token_end = False;\n break;\n }\n else {\n fwrite(STDERR,\"ERROR : Innapropriate header detected\\n\");\n exit(21);//no ippcode header;\n }\n }\n $token->data .= $array_stream[$key_val];\n $key_val++;\n }\n break;\n }\n /* Creates EOL token */\n case tokenType::EOL:\n {\n $token->data = $array_stream[$key_val];\n $token->type = tokenType::EOL;\n $key_val++;\n preset_identifier();\n preset_label();\n $token_end = False;\n break;\n }\n /* Catches commentary, all character are trimmed until EOL*/\n case tokenType::commentary:\n {\n while($array_stream[$key_val] !== PHP_EOL)\n {\n if($key_val === array_key_last($array_stream)) break;\n $key_val++;\n }\n $c_commentary++;\n $token_type = tokenType::EOL;\n break;\n }\n /* string/int or var stream stored into token */\n case tokenType::charStream:\n {\n while(1){\n if(preg_match(\"/^[ \\t@]$/\",$array_stream[$key_val])){\n $token_type = tokenType::identifyStream;\n break;\n }\n elseif($array_stream[$key_val] === PHP_EOL || $array_stream[$key_val] === \"#\"){ //read until newline or commentary start\n $token_type = tokenType::identifyStream;\n break;\n }\n elseif($key_val === array_key_last($array_stream)){ //read until EOF and add last character to token\n $token->data .= $array_stream[$key_val];\n $token_type = tokenType::identifyStream;\n break;\n }\n $token->data .= $array_stream[$key_val];\n $key_val++;\n }\n break;\n }\n case tokenType::identifyStream:\n {\n if(preg_match(\"/^[a-zA-Z_\\-\\$&%\\*!?][a-zA-Z_\\-\\$&%\\*!?0-9]*$/\", $token->data)){ //matching the identifier\n $token->type = tokenType::identifier;\n foreach ($keywords as $key => $value) { //searching for keyword\n $match_pattern = \"/\\b\" . \"$value\" . \"\\b/i\";\n if(preg_match($match_pattern, strtolower($token->data))){\n $token->type = $key + 110;\n if(preg_match(\"/^(bool)|(int)|(string)|(nil)|(gf)|(lf)|(tf)$/\", $token->data)){\n identify_operand();\n }\n break;\n }\n }\n isset_identif();\n $token_end = False;\n break;\n }\n if(preg_match(\"/^[+|-]?[0-9]*$/\", $token->data)){ //matching numbers //^[+|-]?[1-9][0-9]*|[+|-][0]|[0]$\n $token->type = tokenType::number;\n $token_end = False;\n break;\n }\n /* Match for string literal - all unicode numbers and escape sequences */\n elseif(preg_match(\"/^([\\x{0024}-\\x{005B}]|[\\x{0021}\\x{0022}]|[\\x{005D}-\\x{FFFF}]|[ěščřžýáíéóúůďťňĎŇŤŠČŘŽÝÁÍÉÚŮa-zA-Z0-9]|([\\\\\\\\][0-9]{3})?)*$/\", $token->data)){ //^([ěščřžýáíéóúůďťňĎŇŤŠČŘŽÝÁÍÉÚŮa-zA-Z0-9]|([\\\\\\\\][0-9]{3})?)*$\n $token->type = tokenType::stringStream;\n $token_end = False;\n }\n else {\n fwrite(STDERR,\"ERROR : LEX : detected lexical error in: $token->data\\n\");\n exit(23);\n }\n break;\n }\n\n default:\n break;\n }\n }\n }",
"public function getTokenParsers();",
"protected function start(){\n \tLynx_Request::parse();\n }",
"public function start()\n {\n $whoops = new Run();\n $handler = new PrettyPageHandler();\n\n $handler->addResourcePath(__DIR__.'/Resources');\n $handler->setEditor('sublime');\n\n $whoops->pushHandler($handler);\n $whoops->register();\n\n $this->whoops = $whoops;\n }",
"public function start()\n\t{\n\t\t// Get contoller and action names\n\t\t$this->getControllerName();\n\t\t$this->getActionName();\n\n\t\t// Set Names of executing class and action names\n\t\t$this->class_Name = ucfirst($this->controllerName);\n\t\t$this->action_Name = ucfirst($this->actionName);\n\n\t\t// Set globals variable\n\t\t$this->setGlobalsData();\n\n\t\t// Run action\n\t\t$this->getControllerAction();\n\t}",
"public function token()\n {\n\n\t\t$this->server->handleTokenRequest(OAuth2\\Request::createFromGlobals())->send();\n }",
"public function start() {}",
"public function start() {}",
"public function start() {}",
"public function start() {}",
"public function start() {}",
"public function start() {}",
"public function start() {}",
"public function start() {}",
"public function start() {}",
"public function start() {}",
"public function start()\n {\n foreach ($this->routes as $route) {\n if ($route->match()) {\n $this->applyRoute($route); \n }\n\n if (!$route->continue) {\n break;\n }\n }\n }",
"private function tokenInit()\n {\n $tempSession = uniqid();\n echo \"************************************************* MONZO AUTHENTICATION WORKFLOW ***********************************************************\\n\";\n echo \"Please visit the following URL in your browser and follow instructions \\n\";\n echo \"###########\\n\";\n echo \"\\n\";\n echo \"https://auth.monzo.com/?client_id=$this->clientId&redirect_uri=$this->redirectUri&response_type=code&state=$tempSession \\n\";\n echo \"\\n\";\n echo \"###########\\n\";\n echo \"When you get email from Monzo, copy the link button (Right click -> Copy link Location) from the email and paste here. Do not click it. \\n\";\n echo \"*********************************************************************************************************************************************\\n\";\n $verificationUrl = readline(\"Email link: \");\n parse_str(parse_url($verificationUrl, PHP_URL_QUERY) , $urlParams);\n if (array_key_exists('code', $urlParams) && array_key_exists('state', $urlParams))\n {\n if ($urlParams['state'] === $tempSession)\n {\n $data = array(\n 'grant_type' => 'authorization_code',\n 'client_id' => $this->clientId,\n 'client_secret' => $this->clientSecret,\n 'redirect_uri' => $this->redirectUri,\n 'code' => $urlParams['code']\n );\n $tokenData = $this->getJson('/oauth2/token', $data, false);\n if (isset($tokenData['access_token']) && isset($tokenData['refresh_token']))\n {\n $this->bearerToken = $tokenData['access_token'];\n $this->refreshToken = $tokenData['refresh_token'];\n if ($this->validateTokens())\n {\n $this->storeTokens($tokenData['access_token'], $tokenData['refresh_token']);\n }\n else\n {\n syslog(LOG_ERR, \"Monzo: Newly created tokens not valid\");\n throw new Exception('Monzo: Newly created Tokens not valid');\n }\n }\n else\n {\n syslog(LOG_ERR, \"Monzo: Tokens not found\");\n throw new Exception('Monzo: Tokens not found');\n }\n }\n else\n {\n syslog(LOG_ERR, \"Monzo: State does not match the one that was sent to Monzo.\");\n throw new Exception('Monzo: State does not match the one that was sent to Monzo.');\n }\n }\n else\n {\n syslog(LOG_ERR, \"Monzo: Code and State ids not found in the email URL\");\n throw new Exception('Monzo: Code and State ids not found in the email URL');\n }\n }",
"public function run()\n {\n $config = new LexerConfig();\n $config->setDelimiter(',');\n $lexer = new Lexer($config);\n $interpreter = new Interpreter();\n $interpreter->addObserver(function(array $row) {\n $record = [\n 'name' => $row[0],\n 'init' => $row[1],\n 'reference' => $row[2] === '' ? null : $row[2],\n 'is_custom' => $row[3],\n 'source' => $row[4],\n ];\n\n Skill::create($record)->save();\n });\n\n $lexer->parse(base_path().self::PATH, $interpreter);\n Skill::where('id', 14)->delete();\n }",
"public function start()\n\t{\n\t\t// reset first, will start automaticly after a full reset\n\t\t$this->data->directSet(\"resetNeeded\", 1);\n\t}",
"abstract public function token();",
"public function rewind() {\n\t\treset($this->tokens);\n\t}",
"public function getTokens();",
"public function start();",
"public function start();",
"public function start();",
"public function start();",
"public function start();",
"public function start();",
"public function start();",
"public function start();",
"public function start();",
"public function start();",
"public function start();",
"public function start();",
"public function start(): void {}",
"public function prog(){\n\n $this->capture('init;');\n\n try {\n // runtime/Php/test/Antlr/Tests/grammers/t026actions.g\n // runtime/Php/test/Antlr/Tests/grammers/t026actions.g\n {\n $this->match($this->input,$this->getToken('IDENTIFIER'),self::$FOLLOW_IDENTIFIER_in_prog48); \n $this->match($this->input,$this->getToken('EOF'),self::$FOLLOW_EOF_in_prog50); \n\n }\n\n\n $this->capture('after;');\n\n }\n catch ( RecognitionException $exc ) {\n\n $this->capture('catch;');\n throw $exc;\n \n }\n catch(Exception $e) {\n\n $this->capture('finally;');\n \n throw $e;\n }\n\n $this->capture('finally;');\n \n\n return ;\n }",
"public function rewind ()\n {\n reset($this->tokens);\n }",
"private function _populateToken()\n {\n //Populate token\n foreach ($this->tokenData as $token)\n {\n $this->token->create(\n $token['dashboard_account_ID'],\n $token['token']\n );\n }\n }",
"protected function scan_token()\n {\n $tok = null;\n \n // loop used to avoid recursion if tokens get skipped (comments)\n for (;;) {\n $m = null;\n \n // track new lines?\n if ($this->tnl === true) {\n // test of a new-line can be scanned\n if (preg_match('/^\\h*\\r?(\\n)/', $this->data, $m)) {\n $this->tnl = false;\n goto prd;\n }\n } \n \n if (!preg_match(self::$re, $this->data, $m)) {\n // the scanner-pattern could not match anything\n // in this state we can not produce tokens (anymore)\n $this->eof = true;\n $this->adjust_line_coln_beg($this->data, 0);\n \n Logger::error_at($this->loc(), 'invalid input near: %s [...]',\n strtr(substr($this->data, 0, 10), [ \"\\n\" => '\\\\n' ]));\n \n return $this->scan_eof();\n }\n \n // start scan\n prd:\n \n // \"raw\" and \"sub\" matched data\n // raw: can contain whitespace at the beginning\n // sub: the relevant data\n list ($raw, $sub) = $m;\n $len = strlen($raw);\n \n // remove match from data\n $this->data = substr($this->data, $len);\n \n // get correct starting line/coln\n $this->adjust_line_coln_beg($raw, $len);\n \n // save start line/coln\n $pos = new Position($this->line, $this->coln);\n \n // comments\n if (preg_match('/^(?:[#]|\\/[*\\/])/', $sub)) {\n // update end line/coln\n $this->adjust_line_coln_end($sub, 0);\n \n // handle <eof> if the comment was at the end of our input\n if ($this->ends()) \n return $this->scan_eof();\n \n continue; // continue otherwise\n }\n \n $str = null;\n if (preg_match('/^([cor])?([\"\\'])/', $sub, $str)) {\n if ($str[1] === 'r') {\n // raw string\n $tok = $this->token(T_STRING, substr($sub, 2, -1));\n // update end line/coln\n $this->adjust_line_coln_end($sub, 0);\n } else \n // flag === '' (none) \n // flag === 'c' (constant / constant-expression)\n // flag === 'o' (object [instance of class `Str`] - unused atm)\n // start advanced string-scanner\n $tok = $this->scan_string($str[2]);\n \n $tok->flag = $str[1];\n $tok->delim = $str[2];\n } else {\n // update end line/coln\n $this->adjust_line_coln_end($sub, 0);\n \n // analyze match\n $tok = $this->analyze($sub);\n assert($tok !== null);\n \n if ($tok->type === T_SEMI)\n $tok->implicit = false;\n // track new lines if the current token was a '@'\n elseif ($tok->type === T_AT)\n $this->tnl = true;\n elseif ($tok->type === T_END) {\n // the __end__ marker behaves just like real-eof\n $end = $tok;\n \n // produce one more ';'\n $tok = $this->token(T_SEMI, ';', false);\n $tok->implicit = true;\n \n $end->raw = $raw;\n $end->loc = new Location($this->file, $pos);\n \n // push the end-token onto the queue\n $this->end = $end;\n }\n }\n \n break;\n }\n \n assert($tok !== null);\n \n $tok->raw = $raw;\n $tok->loc = new Location($this->file, $pos);\n return $tok;\n }",
"public function start() {\n $this->setup();\n $this->fight();\n }",
"public function gameTokens();",
"public function start() {\n\t\t$this->invoke(\"start\");\n\t}",
"abstract public function start();",
"abstract public function start();",
"public function start()\n {\n // For example you can check Auth\n }",
"public function start()\n {\n $this->registerDefaultServices();\n\n $this->handle($this->request->createFromGlobals());\n }",
"protected function get_token()\n {\n if($this->token == Instructions::EOF)\n {\n return;\n }\n \n if(empty($this->buffer) == true)\n {\n $this->get_line_break();\n }\n\n $this->token = $this->buffer[0];\n array_shift($this->buffer);\n \n\n // Empty token equals empty line\n if($this->token == Instructions::EMPTY)\n {\n $this->get_token();\n }\n }",
"function actions(){\n \tadd_action( 'consume_token_response', array( $this, 'consume_token'), 1, 2 );\n \t// add_action( 'consume_identity_response', array( $this, 'consume_identity'), 1, 2 );\n }",
"abstract public function apply($tokens);",
"abstract function start();",
"public function start(): void\n {\n $this->startTimer();\n $this->setGameState(SELF::STATE_STARTED);\n }",
"public static function chooseTokensProcess()\n {\n\n $cart = geoCart::getInstance();\n $item = $cart->item;\n\n $util = geoAddon::getUtil('tokens');\n $token = $util->getTokenInfo($item->getPricePlan(), $_POST['token_choice']);\n\n if (!$token) {\n //should not get here, should be caught in checkVars, this is just\n //extra failsafe\n $cart->addError();\n return;\n }\n $item->setCost($token['price']);\n $item->set('tokens', (int)$token['tokens']);\n }",
"private function startEngine(){\n $this->start();\n }",
"function start()\n {\n $this->startService();\n $this->startSession();\n }",
"public function markTokenAsUsed()\n {\n $this->status = self::SUCCESSFULLY_USED_TOKEN;\n }",
"public function doToken($content=\"\") {\n\t\t$token_type = $this->findCodeType($content);\n\t\t$token_content = $this->findCodeContent($content);\n\t\t$this->createToken($token_type, $token_content);\n\t}",
"public function start(): void;",
"public function start()\n {\n if ($this->argument('blacklist')) {\n $this->error(\"The blacklist argument hasn't been implemented yet. The command will put logs in every controller.\");\n }\n\n if ($this->confirm('This command will CHANGE your controllers.'.\"\\n\".'Are you sure you want to continue? [y|N]')) {\n $filesArray = $this->dirToArray($this->controllerBaseUrl);\n $this->loopFiles($filesArray);\n $this->info('Wrote log-lines to '.$this->controllerCount.' controllers.');\n }\n }",
"private function mainPhase($token) {\n\n /* A DOCTYPE token */\n if($token['type'] === HTML5::DOCTYPE) {\n // Parse error. Ignore the token.\n\n /* A start tag token with the tag name \"html\" */\n } elseif($token['type'] === HTML5::STARTTAG && $token['name'] === 'html') {\n /* If this start tag token was not the first start tag token, then\n it is a parse error. */\n\n /* For each attribute on the token, check to see if the attribute\n is already present on the top element of the stack of open elements.\n If it is not, add the attribute and its corresponding value to that\n element. */\n foreach($token['attr'] as $attr) {\n if(!$this->stack[0]->hasAttribute($attr['name'])) {\n $this->stack[0]->setAttribute($attr['name'], $attr['value']);\n }\n }\n\n /* An end-of-file token */\n } elseif($token['type'] === HTML5::EOF) {\n /* Generate implied end tags. */\n $this->generateImpliedEndTags();\n\n /* Anything else. */\n } else {\n /* Depends on the insertion mode: */\n switch($this->mode) {\n case self::BEFOR_HEAD: return $this->beforeHead($token); break;\n case self::IN_HEAD: return $this->inHead($token); break;\n case self::AFTER_HEAD: return $this->afterHead($token); break;\n case self::IN_BODY: return $this->inBody($token); break;\n case self::IN_TABLE: return $this->inTable($token); break;\n case self::IN_CAPTION: return $this->inCaption($token); break;\n case self::IN_CGROUP: return $this->inColumnGroup($token); break;\n case self::IN_TBODY: return $this->inTableBody($token); break;\n case self::IN_ROW: return $this->inRow($token); break;\n case self::IN_CELL: return $this->inCell($token); break;\n case self::IN_SELECT: return $this->inSelect($token); break;\n case self::AFTER_BODY: return $this->afterBody($token); break;\n case self::IN_FRAME: return $this->inFrameset($token); break;\n case self::AFTR_FRAME: return $this->afterFrameset($token); break;\n case self::END_PHASE: return $this->trailingEndPhase($token); break;\n }\n }\n }",
"public static function begin()\n {\n if (self::$open > -1) {\n self::$openStack[] = self::$open;\n }\n \n self::$open = 0;\n }",
"public function run()\n {\n// $this->parse();\n }",
"public function start()\n {\n $this->startTime = Carbon::now();\n }",
"public function start()\n {\n }",
"public function start()\n {\n }",
"public function start()\n {\n }",
"public function run()\n\t{\n\t\t$users = [\n\t\t\tself::ADMIN,\n\t\t\tself::USER,\n\t\t\tself::KFUCHS,\n\t\t];\n\n\t\tforeach ($users as $user) {\n\t\t\t$this->createOAuthCredentialsFor($user);\n\t\t}\n\t}",
"protected function parseTokens()\n {\n // Recursively traverse the inheritance chain defined by $this->parent\n\n if ($this->parent !== $this) return $this->parent->parseTokens();\n\n // Alias properties to local variables, initialize them\n\n $line =& $this->line; $line = 1;\n $i =& $this->index; $i = 0;\n $inString =& $this->inString; $inString = 0;\n $types =& $this->types; $types = array();\n $texts =& $this->texts; $texts = array('');\n $prevType =& $this->prevType; $prevType = false;\n $penuType =& $this->penuType; $penuType = false;\n $tokens =& $this->tokens;\n $reg =& $this->tokenRegistry;\n\n $j = 0;\n $curly = 0;\n $curlyPool = array();\n\n while (isset($tokens[$i]))\n {\n $t =& $tokens[$i]; // Get the next token\n unset($tokens[$i++]); // Free memory and move $this->index forward\n\n // Set primary type and handle string interpolation context:\n // - tag closing braces as T_CURLY_CLOSE when they are opened with curly braces\n // tagged as T_CURLY_OPEN or T_DOLLAR_OPEN_CURLY_BRACES, to make\n // them easy to separate from regular code \"{\" / \"}\" pairs,\n // - tag arrays' or objects' string indexes as T_STR_STRING.\n\n $priType = 1; // T_SEMANTIC\n\n if (isset($t[1]))\n {\n if ($inString & 1) switch ($t[0])\n {\n case T_VARIABLE:\n case T_STR_STRING:\n case T_CURLY_OPEN:\n case T_CURLY_CLOSE:\n case T_END_HEREDOC:\n case T_ENCAPSED_AND_WHITESPACE:\n case T_DOLLAR_OPEN_CURLY_BRACES: break;\n case T_STRING:\n if ('[' === $prevType || T_OBJECT_OPERATOR === $prevType)\n {\n $t[0] = T_STR_STRING;\n break;\n }\n case T_NUM_STRING: if ('[' === $prevType) break;\n case T_OBJECT_OPERATOR: if (T_VARIABLE === $prevType) break;\n default:\n if ('[' === $prevType && preg_match(\"/^[_a-zA-Z]/\", $t[1][0])) $t[0] = T_STR_STRING;\n else $t[0] = T_ENCAPSED_AND_WHITESPACE;\n }\n else if ('b\"' === $t) $t = array('\"', 'b\"'); // Binary string syntax b\"...\"\n else switch ($t[0])\n {\n case T_WHITESPACE:\n case T_COMMENT:\n case T_DOC_COMMENT:\n case T_BAD_CHARACTER: $priType = 2; // T_NON_SEMANTIC\n }\n }\n else\n {\n $t = array($t, $t);\n\n if ($inString & 1) switch ($t[0])\n {\n case '\"':\n case '`': break;\n case ']': if (T_STR_STRING === $prevType || T_NUM_STRING === $prevType) break;\n case '[': if (T_VARIABLE === $prevType && '[' === $t[0]) break;\n default: $t[0] = T_ENCAPSED_AND_WHITESPACE;\n }\n else if ('}' === $t[0] && !$curly) $t[0] = T_CURLY_CLOSE;\n }\n\n // Trigger callbacks\n\n if (isset($reg[$t[0]]) || isset($reg[$priType]))\n {\n $n = $t[0];\n $t[2] = array($priType => $priType);\n\n if (isset($reg[$priType])) $callbacks = $reg[$priType];\n else $callbacks = array();\n\n for (;;)\n {\n $t[2][$n] = $n;\n\n if (isset($reg[$n]))\n {\n $callbacks += $reg[$n];\n\n // Callback triggers are always ordered:\n // - first by parsers' instanciation order\n // - then by callbacks' registration order\n // - callbacks registered with a tilde prefix\n // are then called in reverse order.\n ksort($callbacks);\n }\n\n foreach ($callbacks as $k => $c)\n {\n unset($callbacks[$k]);\n\n // $t is the current token:\n // $t = array(\n // 0 => token's main type - a single character or a T_* constant,\n // as returned by token_get_all()\n // 1 => token's text - its source code excerpt as a string\n // 2 => an array of token's types and subtypes\n // )\n\n if ($k < 0)\n {\n $n = $c[0]->{$c[1]}($t);\n\n // Non-tilde-prefixed callbacks can return:\n // - false, which cancels the current token\n // - a new token type, which is added to $t[2] and loads the\n // related callbacks in the current callbacks stack\n // - or nothing (null)\n\n if (false === $n) continue 3;\n if ($n && empty($t[2][$n])) continue 2;\n }\n else if (null !== $c[0]->{$c[1]}($t))\n {\n user_error(\"No return value is expected for tilde-registered callback: \" . get_class($c[0]) . '->' . $c[1] . '()', E_USER_NOTICE);\n }\n }\n\n break;\n }\n }\n\n // Commit to $this->texts\n\n $texts[++$j] =& $t[1];\n\n if (2 === $priType) // T_NON_SEMANTIC\n {\n $line += substr_count($t[1], \"\\n\");\n continue;\n }\n\n // For semantic tokens only: populate $this->types, $this->prevType and $this->penuType\n\n $penuType = $prevType;\n $types[$j] = $prevType = $t[0];\n\n // Parsing context analysis related to string interpolation and line numbering\n\n if (isset($prevType[0])) switch ($prevType)\n {\n case '{': ++$curly; break;\n case '}': --$curly; break;\n case '\"':\n case '`': $inString += ($inString & 1) ? -1 : 1;\n }\n else switch ($prevType)\n {\n case T_CONSTANT_ENCAPSED_STRING:\n case T_ENCAPSED_AND_WHITESPACE:\n case T_OPEN_TAG_WITH_ECHO:\n case T_INLINE_HTML:\n case T_CLOSE_TAG:\n case T_OPEN_TAG:\n $line += substr_count($t[1], \"\\n\");\n break;\n\n case T_DOLLAR_OPEN_CURLY_BRACES:\n case T_CURLY_OPEN: $curlyPool[] = $curly; $curly = 0;\n case T_START_HEREDOC: ++$inString; break;\n\n case T_CURLY_CLOSE: $curly = array_pop($curlyPool);\n case T_END_HEREDOC: --$inString; break;\n\n case T_HALT_COMPILER:\n 4 === $this->haltCompilerTail and $this->register('tagHaltCompilerData');\n break;\n }\n }\n\n // Free memory thanks to copy-on-write\n $j = $texts;\n $types = $texts = $tokens = $reg = $this->parents = $this->parent = null;\n return $j;\n }",
"abstract public function start($key);",
"public function start($start);",
"public function start()\n\t{\n\t\t$this->startTimer = microtime(TRUE);\n\t}",
"function start();",
"function start();",
"protected function request_token() {\r\n\t\t$code = $this->tmhOAuth->request(\r\n\t\t\t'POST',\r\n\t\t\t$this->tmhOAuth->url('oauth/request_token', ''),\r\n\t\t\tarray(\r\n\t\t\t\t'oauth_callback' => SocialHelper::php_self()\r\n\t\t\t)\r\n\t\t);\r\n\r\n\t\tif ($code == 200) {\r\n\t\t\t$_SESSION['oauth'] = $this->tmhOAuth->extract_params($this->tmhOAuth->response['response']);\r\n\t\t\t$this->authorize();\r\n\t\t} else {\r\n\t\t\t$this->addError();\r\n\t\t}\r\n\t}",
"public static function begin()\n {\n \tspl_autoload_register(function ($name) {\n $loadableClasses = [\n 'OAuthRequestValidator' => 'Core/ServiceContext.php',\n ];\n if (array_key_exists($name, $loadableClasses)) {\n include_once(PATH_SDK_ROOT . $loadableClasses[$name]);\n } else if (file_exists(PATH_SDK_ROOT . 'Core/' . $name . '.php')) {\n include_once(PATH_SDK_ROOT . 'Core/' . $name . '.php');\n } else if (file_exists(PATH_SDK_ROOT . 'Core/RestCalls/' . $name . '.php')) {\n include_once(PATH_SDK_ROOT . 'Core/RestCalls/' . $name . '.php');\n } else if (file_exists(PATH_SDK_ROOT . 'DataService/' . $name . '.php')) {\n include_once(PATH_SDK_ROOT . 'DataService/' . $name . '.php');\n }\n });\n }",
"public function start()\n {\n // nop\n }",
"public static function start(): void {\n }",
"public function run()\n\t{\n\t\t// DB::table('user_tokens')->truncate();\n\n\t\t$user_tokens = array(\n\n\t\t);\n\n\t\t// Uncomment the below to run the seeder\n\t\t// DB::table('user_tokens')->insert($user_tokens);\n\t}",
"private function mainPhase($token)\n {\n\n /* A DOCTYPE token */\n if ($token['type'] === HTML5::DOCTYPE) {\n // Parse error. Ignore the token.\n\n /* A start tag token with the tag name \"html\" */\n } elseif ($token['type'] === HTML5::STARTTAG && $token['name'] === 'html') {\n /* If this start tag token was not the first start tag token, then\n it is a parse error. */\n\n /* For each attribute on the token, check to see if the attribute\n is already present on the top element of the stack of open elements.\n If it is not, add the attribute and its corresponding value to that\n element. */\n foreach ($token['attr'] as $attr) {\n if (!$this->stack[0]->hasAttribute($attr['name'])) {\n $this->stack[0]->setAttribute($attr['name'], $attr['value']);\n }\n }\n\n /* An end-of-file token */\n } elseif ($token['type'] === HTML5::EOF) {\n /* Generate implied end tags. */\n $this->generateImpliedEndTags();\n\n /* Anything else. */\n } else {\n /* Depends on the insertion mode: */\n switch ($this->mode) {\n case self::BEFOR_HEAD:\n return $this->beforeHead($token);\n break;\n case self::IN_HEAD:\n return $this->inHead($token);\n break;\n case self::AFTER_HEAD:\n return $this->afterHead($token);\n break;\n case self::IN_BODY:\n return $this->inBody($token);\n break;\n case self::IN_TABLE:\n return $this->inTable($token);\n break;\n case self::IN_CAPTION:\n return $this->inCaption($token);\n break;\n case self::IN_CGROUP:\n return $this->inColumnGroup($token);\n break;\n case self::IN_TBODY:\n return $this->inTableBody($token);\n break;\n case self::IN_ROW:\n return $this->inRow($token);\n break;\n case self::IN_CELL:\n return $this->inCell($token);\n break;\n case self::IN_SELECT:\n return $this->inSelect($token);\n break;\n case self::AFTER_BODY:\n return $this->afterBody($token);\n break;\n case self::IN_FRAME:\n return $this->inFrameset($token);\n break;\n case self::AFTR_FRAME:\n return $this->afterFrameset($token);\n break;\n case self::END_PHASE:\n return $this->trailingEndPhase($token);\n break;\n }\n }\n }",
"public function token()\n {\n // echo 'pk';\n try {\n $this->heimdall->createToken();\n } catch (Exception $exception) {\n $this->heimdall->handleException($exception);\n }\n }",
"public static function _test_start_cursor()\n\t{\n\t\t//when state A encounters 1, it will transfer to state B.\n\t\t//when state B encounters 0, it will transfer to state A.\n\t\t\n\t\t$scd = new ScannerDriver();\n\t\t$scd->str = \"00011111100\";\n\t\t\n\t\t$sc = new TestStateScanner_StartCursor($scd);\n\t\t\n\t\t$res = $scd->start();\n\t\t\n\t\techo \"TEST StateScanner: start cursor.\";\n\t\tassert($res[0]->position === 0, \"#1\");\n\t\tassert($res[1]->position === 3, \"#2\");\n\t\tassert($res[2]->position === 9, \"#3\");\n\t}",
"private function set_token_used()\n {\n update_post_meta($this->token_post['ID'], \"zbyva_hlasu\", 0);\n update_post_meta($this->token_post['ID'], \"hlasovani_zacatek\", $this->voting_start);\n update_post_meta($this->token_post['ID'], \"hlasovani_konec\", $this->voting_end);\n }",
"public function __construct($token, array $initialData = []);",
"protected function buildToken() {\n }"
]
| [
"0.6735713",
"0.6334902",
"0.6272723",
"0.6161286",
"0.6076651",
"0.60461354",
"0.58886725",
"0.5715417",
"0.56827825",
"0.56541795",
"0.56445056",
"0.563514",
"0.5624335",
"0.56104237",
"0.56104237",
"0.55874985",
"0.5578502",
"0.55587345",
"0.55475396",
"0.5536593",
"0.5507263",
"0.55044824",
"0.55000407",
"0.54643095",
"0.5464244",
"0.5464244",
"0.54627746",
"0.5462771",
"0.5462771",
"0.5462771",
"0.5462771",
"0.5462771",
"0.5462771",
"0.54451436",
"0.54436094",
"0.5427829",
"0.542185",
"0.5414412",
"0.54047483",
"0.5401705",
"0.53984135",
"0.53984135",
"0.53984135",
"0.53984135",
"0.53984135",
"0.53984135",
"0.53984135",
"0.53984135",
"0.53984135",
"0.53984135",
"0.53984135",
"0.53984135",
"0.5353161",
"0.5320749",
"0.5315019",
"0.53133255",
"0.53104424",
"0.53014964",
"0.5297144",
"0.52800256",
"0.52781266",
"0.52781266",
"0.5276667",
"0.52731526",
"0.5269732",
"0.5252785",
"0.52440554",
"0.52417094",
"0.52275956",
"0.5219264",
"0.52160233",
"0.5211117",
"0.51791406",
"0.5177878",
"0.5170333",
"0.5167727",
"0.51451",
"0.514154",
"0.51074755",
"0.5096763",
"0.50960547",
"0.50960547",
"0.50960547",
"0.5095846",
"0.50892544",
"0.5087756",
"0.5078009",
"0.50683206",
"0.50656724",
"0.50656724",
"0.5058399",
"0.5046484",
"0.50395405",
"0.5032098",
"0.50290275",
"0.50264174",
"0.5023421",
"0.5023127",
"0.5021161",
"0.50198567",
"0.5016418"
]
| 0.0 | -1 |
Stop worker by setting the proper status. | public function stop()
{
// Update worker state and set it as finished
$this->update(['resume_token' => 0, 'has_finished' => true]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function stop($status = 0)\n {\n $this->event->trigger(new WorkerStopping($status));\n\n exit($status);\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 gracefulStop(){\n $this->handleWorkerOutput('warn', \"Work done, exiting now.\");\n $this->stop();\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 stop()\n\t{\n\t\t$this->data->directSet(\"state\", self::STATE_STOPPED);\n\t}",
"abstract 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();",
"public function stop() {}",
"protected function stopTask() {}",
"public function stop() {\n\t\t$this->invoke(\"stop\");\n\t}",
"public function stop(): void;",
"public function stop(): void;",
"public function stop(): void;",
"public function stop(): void;",
"public function stop(): void;",
"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 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 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 stop()\n {\n $this->mark('__stop');\n }",
"public function onWorkerStop(Server $server, int $worker_id)\n {\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 onWorkerStop(\\swoole_server $server, $workerId)\n {\n \n }",
"public function stop()\n {\n // nop\n }",
"function stop()\n\t{\n\t\tif( $this->is_running ){\n\t\t\t$this->counter += (int) (self::timeMillisecondsAsFloat() - $this->running_since + 0.5);\n\t\t\t$this->is_running = FALSE;\n\t\t}\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 self::$executionTime = round(abs(microtime(true) - $_ENV['W']['START_TIME']) * 1000, 0);\n }",
"public function stop()\r\n {\r\n\r\n }",
"public function stop()\n {\n }",
"public function stop()\n {\n }",
"public function stop(): bool {}",
"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}",
"public static function stop()\n {\n }",
"public function stop()\n {\n if (!$this->isOn) {\n return;\n }\n\n $this->dataset[$this->namespace] = xhprof_disable();\n $this->isOn = false;\n }",
"public function stop()\n {\n\n }",
"public function JStop() {}",
"public function onWorkerStop($serv, $worker_id)\n {\n Console::info(\"Vary proxy service worker %s stop.\", [$worker_id]);\n }",
"public function stopProcess() {\n // Do not change the status of an idle migration\n db_update('migrate_status')\n ->fields(array('status' => MigrationBase::STATUS_STOPPING))\n ->condition('machine_name', $this->machineName)\n ->condition('status', MigrationBase::STATUS_IDLE, '<>')\n ->execute();\n }",
"public function stop()\n {/*{{{*/\n $this->_loop = false;\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 onStop();",
"public function stop()\n {\n // TODO: Implement stop() method.\n }",
"public function shutdown() {\n\t\t$this->stop();\n\t}",
"function stop();",
"public function stop()\n {\n $this->loop->stop();\n }",
"public function onWorkerStop(Swoole\\Server $swooleServer, $workerId)\n {\n }",
"public function stop($id);",
"public function stopEngine(int $code = 0, string $reason = \"\");",
"public function onWorkerStopped(WorkerStoppedEvent $event): void\n {\n $throwable = $this->trackerErrorListener->getThrownException();\n\n if (!($throwable instanceof \\Throwable)) {\n return;\n }\n\n $this->logger->info(\n 'WorkerStoppedEvent- Worker stopped because an error happened' .\n ' during handling. Rethrowing exception ...'\n );\n\n // Rethrow caught exception in handler after worker stopped to exit cli with an error code different from 0\n throw new RuntimeException('Worker stopped because of handler exception', 1, $throwable);\n }",
"public function stop()\n {\n // Put your code here;\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 }",
"function stop() { \n\n\t\tif ($this->XBMCCmd(\"Stop\")!=\"OK\") { return false; }\n return true;\n\n\t}",
"public function stop(){\n return $this->bitcoin->stop();\n }",
"public function stop()\n {\n throw new Stop();\n }",
"public function stop()\n\t{\n\t\treturn $this->CLI->pingQuery($this->SqueezePlyrID.\" stop\");\n\t}",
"public function control($status, $worker) {\n $status['keepCount'] = $status['requested'];\n\n $operation = $this->getOperation();\n $operation->keep($status, $worker);\n\n return $this;\n }",
"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 shutdown ()\n {\n $this->_signalAllWorkers(SIGKILL);\n \n $this->_logger->info('Exiting...');\n $this->_shutdown = true;\n \n exit(1);\n }",
"public function isStopped();",
"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 $model = $this->getModel();\n $model->last_run = $model->started_at;\n $model->next_run = $this->getNextRunDate();\n $model->started_at = null;\n $model->save(false);\n }",
"public function stopping($callback)\n {\n $this->app['events']->listen('custom.queue.stopping', $callback);\n }",
"function stop($id)\n{\n\t// if service is not running\n\tif ( status($id) !== true )\n\t\treturn false;\n\n $result = _cmd($id, 'stop');\n\n\t$status = Config::$Linux\n\t\t? !status($id) // FIXME: for linux just return current status\n\t\t: ( strstr($result, 'STOP_PENDING') || strstr($result, 'STOPPED') ) ? true : false;\n\n\t\n\treturn $status;\n}",
"public function cancelOperation() {\n printf(\"Cancelling...\\n\");\n $this->_cancelled = true;\n posix_kill($this->_pid, SIGKILL);\n pcntl_signal_dispatch();\n }",
"function stopDownloadToPool()\n\t{\n\t\tinclude(\"/m23/inc/i18n/\".$GLOBALS[\"m23_language\"].\"/m23base.php\");\n\t\t$this->addInfoMessage($I18N_downloadAborted);\n\n\t\tSERVER_deleteFile($this->getPoolDir().'/lock');\n\n\t\tSERVER_killBackgroundJob('downloadPoolPackages');\n\t}",
"public static function _stop() {\n self::response()\n ->write(ob_get_clean())\n ->send();\n }",
"public function somfy_stop($id) {\n\t\t//Returns true or false. No values are set! (Execute get_status to get the new status)\n\t\treturn $this->_somfy_stop ($id);\n\t}",
"public function stop(): void\n {\n $this->end = microtime(true);\n }",
"public function stop()\n {\n $this->_timeStopInMicroSeconds = microtime(true);\n }",
"public function haltJobLoop()\n\t{\n\t\t$this->halt_job_loop = true;\n\t}",
"function isStopped();",
"public function destroy(Worker $worker)\n {\n //\n }",
"public function timer_stop()\n {\n }",
"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}",
"public static function stop() {\n\t\tself::$con->close();\n\t}",
"public function Stop()\r\n {\r\n echo \"<b><u>Command Received: Stop Vehicle</b></u><br />\";\r\n echo $this->carName . \"'s current speed is \" . $this->speed . \".<br />\";\r\n echo \"Stopping...<br />\";\r\n $this->speed = 0;\r\n echo $this->carName . \" is now travelling at \" . $this->speed . \" mph. <br />\";\r\n }",
"public function stop(){\n if($this->_id) $this->times[$this->_id] += microtime(true) - $this->_start;\n $this->_id = null;\n }",
"public function stop()\n {\n die;\n }",
"public function shutdown();",
"public function shutdown();",
"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(): 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(): bool\n {\n return $this->processRunner->stop();\n }",
"abstract public function shutdown();",
"public function stop()\n {\n $this->state = self::STATE_STOPPED;\n return $this;\n }",
"abstract function shutdown();",
"public function stopCycle(int $code = 0, string $reason = \"\");",
"public function stop($quiet = FALSE) {\n\t\t$this->action(\"stop\", $quiet);\n\t}",
"public static function stop(Vm $vm);",
"public function halt($status, $message = '')\n {\n $this['response']->setStatus($status);\n $this['response']->write($message, true);\n $this->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()\n {\n if(null !== $this->fEnd)\n {\n throw new \\Exception('stop time is already set');\n }\n $this->iEndMemoryUsage = memory_get_usage();\n $this->fEnd = microtime(true);\n }"
]
| [
"0.7822562",
"0.7701252",
"0.6545477",
"0.65233433",
"0.6519004",
"0.6502436",
"0.64852566",
"0.64852566",
"0.64852566",
"0.64852566",
"0.64852566",
"0.64852566",
"0.64852566",
"0.64852566",
"0.64538175",
"0.64101046",
"0.63660616",
"0.6274385",
"0.6274385",
"0.6274385",
"0.6274385",
"0.6274385",
"0.6266349",
"0.6222687",
"0.6222687",
"0.6222268",
"0.616295",
"0.6154466",
"0.61430997",
"0.61251026",
"0.6057619",
"0.6023518",
"0.6013125",
"0.60021317",
"0.59879434",
"0.59701973",
"0.59674484",
"0.5951292",
"0.5937978",
"0.5936307",
"0.5916513",
"0.5871173",
"0.5848915",
"0.5830446",
"0.58290315",
"0.5828215",
"0.58051413",
"0.5799279",
"0.57907015",
"0.5765628",
"0.57456636",
"0.569489",
"0.5641161",
"0.5640834",
"0.5637716",
"0.56325066",
"0.56186676",
"0.5609557",
"0.55990136",
"0.5593814",
"0.5585803",
"0.5571377",
"0.55311126",
"0.55191374",
"0.5516688",
"0.5487076",
"0.5479738",
"0.5475473",
"0.54561317",
"0.54480606",
"0.54203486",
"0.5386881",
"0.5379115",
"0.5376844",
"0.53757346",
"0.535084",
"0.53502506",
"0.53383887",
"0.5330872",
"0.5322975",
"0.5303479",
"0.52937293",
"0.5288904",
"0.5271087",
"0.5259858",
"0.52588046",
"0.5240785",
"0.5240785",
"0.52363724",
"0.52325016",
"0.52256006",
"0.5219017",
"0.52170473",
"0.5210652",
"0.5207903",
"0.5204364",
"0.5198552",
"0.51924115",
"0.5176176",
"0.51589084"
]
| 0.7639316 | 2 |
Set a token marker for the worker to start after being resumed. | public function setResumeToken(Token $token)
{
$this->update(['resume_token' => $token->id]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setPreviousToken() {\n\t\t$this->_token = $this->_previousToken;\n\t\t$this->_session->key = $this->_previousToken;\n\t}",
"public function setToken()\n {\n if (session()->has('drive-access-token')) {\n $accessToken = session()->get('drive-access-token');\n $this->setAccessToken($accessToken);\n if ($this->isAccessTokenExpired()) {\n $accessToken = $this->fetchAccessTokenWithRefreshToken($this->getRefreshToken());\n session()->put('drive-access-token', $accessToken);\n }\n }\n }",
"public function markTokenAsUsed()\n {\n $this->status = self::SUCCESSFULLY_USED_TOKEN;\n }",
"public function setToken(string $token): void;",
"public function setToken(string $token): void\n {\n $this->token = $token;\n }",
"public function resume();",
"public function setToken($token): void\n {\n $this->token = $token;\n }",
"public function setToken($token);",
"function setToken($token)\n {\n $this->token = $token;\n }",
"public function start()\n {\n $this->_marks = array();\n $this->mark('__start');\n }",
"public function resume () {\n if ($this->started) {\n $this->run = true;\n $this->lapTmstmp = now();\n\n } else {\n $this->restart();\n }\n }",
"abstract protected function doResume();",
"protected function storeInitialMark()\n {\n $this->storeMark(\n 'Init',\n 'main',\n static::initialTime(),\n $this->trackMemory ? memory_get_usage(true) : 0,\n 0\n );\n }",
"public function setToken($token){\n $this->token = $token;\n }",
"abstract public function setNextAuthToken($token);",
"public function setToken($token)\n {\n $this->token = $token;\n }",
"public function setToken($token)\n {\n $this->token = $token;\n }",
"public function setPreWebAccessToken($token)\n {\n // First, remove previous (no longer valid) WebAccessToken from session if it exists\n if (session()->has('api_consumer_token')) {\n session()->pull('api_consumer_token');\n }\n // Set the PreWebAccessToken in the session\n session()->put('consumer_token', $token);\n }",
"public function markExecution() {}",
"public function set() {\n\t\t$this->token = uniqid(rand(), true);\n\n\t\t$this->time = time();\n\n\t\t$this->$referer = $_SERVER['HTTP_REFERER'];\n\n\t\tif ($this->isEnable()) {\n\t\t\t$_SESSION['token'] = $this->token;\n\t\t\t$_SESSION['token_time'] = $this->time;\n\t\t\t$_SESSION['token_referer'] = $this->$referer;\n\t\t}\n\t}",
"public function setInitialMarking($initialMarking, $setTokens = false) {\n\t\t$this->initialMarking = (int) $initialMarking;\n\t\tif($setTokens) {\n\t\t\t$this->resetTokens();\n\t\t}\n\t}",
"private function setCurrentInstruction($param) {\r\n $this->_currentInstruction = $param;\r\n }",
"public function setCache($token){\n \n $this->cacheStack->push($token);\n }",
"public function enterToken(string $token): void;",
"public function setRememberToken($value){\n $this->token=$value;\n }",
"private function setToken() {\n\n /* valid register */\n $request = $this->post('/v1/register', [\n 'firstname' => 'John',\n 'lastname' => 'Doe',\n 'email' => '[email protected]',\n 'password' => 'secret',\n ]);\n\n /* valid login */\n $this->post('/v1/login', [\n 'email' => '[email protected]',\n 'password' => 'secret',\n ]);\n\n }",
"protected function setMark() {\n echo $this->promptMessage('choose_mark');\n $mark = $this->limitInput(array(self::X_MARK, self::O_MARK, self::QUIT_BUTTON));\n switch ($mark) {\n case self::X_MARK:\n $this->_userMark = self::X_MARK;\n $this->_botMark = self::O_MARK;\n break;\n case self::O_MARK:\n $this->_userMark = self::O_MARK;\n $this->_botMark = self::X_MARK;\n break;\n case self::QUIT_BUTTON:\n $this->quit();\n }\n echo \"You will be Player \" . $this->_userMark . \".\" . PHP_EOL;\n echo $this->promptMessage('start_game') . PHP_EOL;\n }",
"function set_checkpoint()\n\t{\n\t\t$this->guardar();\n\t}",
"private function markCurrentPage() {\n $this->pageReloadMarker = $this->randomMachineName();\n $this->getSession()->executeScript('document.body.appendChild(document.createTextNode(\"' . $this->pageReloadMarker . '\"));');\n }",
"public function set($token);",
"abstract protected function doResumeContext();",
"public function resetTokens() {\n\t\t$this->tokens = $this->initialMarking;\n\t}",
"protected function remember($token) {\n\t\t$token = Crypter::encrypt($token.'|'.Str::random(40));\n\t\t$this->cookie($this->recaller(), $token, Cookie::forever);\n\t}",
"public function setRememberToken($value)\n {\n \t$this->setGuarded($this->getRememberTokenName(), $value);\n }",
"public function start()\n {\n // Update worker state and set it as running (not finished)\n // Do not change resume_token because campaign can be resumed and not started\n $this->update(['has_finished' => false]);\n // Return current instance for method chaining\n return $this;\n }",
"public function setToken($token, $token_secret) {}",
"public function backupCurrentToken()\n {\n $stateStorage = $this->getClient()->getStateStorage();\n\n $token = $stateStorage->get($this->getStateStorageKeyName('token'));\n $stateStorage->set($this->getStateStorageKeyName('real_token'), $token);\n }",
"public function setRememberToken(string $token): void\n {\n $this->rememberToken = $token;\n }",
"public function setRememberToken($token)\n {\n $this->user[$this->getRememberTokenName()] = $token;\n }",
"public function setRememberToken($value)\n {\n $_token = $value;\n }",
"public function moveMarker(): void\n {\n $ind = $this->getPlayerIndexMarker();\n $this->players[$ind]->marker = false;\n\n if (++$ind >= count($this->players)) {\n $ind = 0;\n }\n $this->players[$ind]->marker = true;\n }",
"function setTokenFromCookie($token) {\n\t\t\t$this->tokenFromCookie = $token;\n\t\t}",
"function resetToken() {\n $this->setToken(make_string(40));\n }",
"public function actionSetToken()\n {\n if (isset($this->request['token'])) {\n /* @var $userDetails UserDetails */\n $userDetails = UserDetails::model()->findByAttributes(['user_id' => $this->user->id]);\n $userDetails->push_token = $this->request['token'];\n if ($userDetails->save())\n $this->_sendResponse(200, CJSON::encode(['status' => true]));\n else\n $this->_sendResponse(400, CJSON::encode(['status' => false]));\n } else\n $this->_sendResponse(400, CJSON::encode(['status' => false, 'message' => 'Token variable is required.']));\n }",
"public static function setToken($token)\n {\n self::$_data[self::KEY_TOKEN] = $token;\n }",
"public function resetMarker()\n {\n $this->currentMarker = -1;\n }",
"public function setToken()\n\t{\n\t\t $args = phpSmug::processArgs( func_get_args() );\n\t\t $this->oauth_token = $args['id'];\n\t\t $this->oauth_token_secret = $args['Secret'];\n\t}",
"public function notifyInterruptingEvent(TokenInterface $token);",
"public function refreshToken()\n {\n $token = $this->getToken();\n }",
"public function setMarkerWithPrefix() {\n\t\t$this->subject->processTemplate(\n\t\t\t'This is some template code. '\n\t\t\t\t.'###FIRST_MARKER### ###MARKER### More text.'\n\t\t);\n\t\t$this->subject->setMarker('marker', 'foo', 'first');\n\t\t$this->assertSame(\n\t\t\t'This is some template code. foo ###MARKER### More text.',\n\t\t\t$this->subject->getSubpart()\n\t\t);\n\t}",
"protected function markApproved( )\r\n {\r\n $this->_sessie->registerApproved( $this );\r\n }",
"public function markIfRequired($mark) {\n $this->markIfRequired = $mark;\n }",
"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 registerWorker()\n\t{\n\t\tResque::redis()->sadd('workers', (string)$this);\n\t\tResque::redis()->set('worker:' . (string)$this . ':started', date('c'));\n\t}",
"protected function startExpression()\n {\n $this->tokenStack[] = $this->currentToken;\n }",
"public function setRememberToken(string $value);",
"public function sendCredentialRecoveryNotification(string $token): void;",
"public function resume($status = true)\n {\n $this->isEnabled = !$status ? $status : $this->storedStatus;\n $this->storedStatus = null;\n }",
"public function setSettingsBlockSessionResume(?bool $value): void {\n $this->getBackingStore()->set('settingsBlockSessionResume', $value);\n }",
"function setToken($_token) {\n $this->token = $_token;\n return $this;\n }",
"protected function resumeOrStartSession()\n {\n if (!$this->resumeSession()) {\n $this->manager->start();\n $this->load();\n }\n }",
"public function testMessageThreadsV2MarkThread()\n {\n }",
"public function start()\n\t{\n\t\t// reset first, will start automaticly after a full reset\n\t\t$this->data->directSet(\"resetNeeded\", 1);\n\t}",
"public static function store(string $token): void\n\t{\n\t\tself::$token = $token;\n\t}",
"public function registerWorker()\r\n {\r\n Resque::redis()->sadd('workers', $this);\r\n setlocale(LC_TIME, \"\");\r\n setlocale(LC_ALL, \"en\");\r\n Resque::redis()->set('worker:' . (string)$this . ':started', strftime('%a %b %d %H:%M:%S %Z %Y'));\r\n }",
"public function setTaskStarted()\n {\n // Create our file for this task.\n // Content doesn't matter, but let's write a timestamp. Maybe we'll want it later for performance\n // monitoring, timeouts, etc.\n file_put_contents($this->taskFilePath, time());\n }",
"public function resume(): void\n {\n $this->tonClient->request(\n 'net.resume'\n )->wait();\n }",
"public function setRememberToken($value)\n {\n $this->{$this->getRememberTokenName()} = $value;\n }",
"public function setToken(TokenInterface $token = null);",
"public function setToken($token, $token_secret = null) {\n\n\t\tparent::setToken($token, $token_secret);\n\t}",
"public static function markStart($label)\n\t{\n\t\tstatic::isEnabled(static::MARK) and static::$_marks[$label] = array(\n\t\t\t'time' => microtime(true),\n\t\t\t'name' => $label,\n\t\t\t'stopped' => false,\n\t\t);\n\t}",
"private function setToken() {\n $this->admin->rememberToken = password_hash($this->admin->username.generateSalt().time().generateSalt(), PASSWORD_DEFAULT);\n\n setcookie(\"adminUsername\", $this->admin->username, time() + 30 * 24 * 60 * 60, COOKIE_PATH, null, 1);\n setcookie(\"adminToken\", $this->admin->rememberToken, time() + 30 * 24 * 60 * 60, COOKIE_PATH, null, 1);\n\n $_SESSION['adminRemember'] = true;\n }",
"public function setRememberToken($value)\n {\n }",
"public function setRememberToken($value)\n {\n }",
"public function setRememberToken($value)\n {\n }",
"public function setRememberToken($value)\n {\n }",
"public function setRememberToken($value) {\n dd('asd2f');\n if (! empty($this->getRememberTokenName())) {\n $this->{$this->getRememberTokenName()} = $value;\n }\n }",
"public static function onWorkerStart($worker)\n {\n self::$encryption = new Encryption;\n }",
"public function next_token()\n {\n }",
"private function set_token_used()\n {\n update_post_meta($this->token_post['ID'], \"zbyva_hlasu\", 0);\n update_post_meta($this->token_post['ID'], \"hlasovani_zacatek\", $this->voting_start);\n update_post_meta($this->token_post['ID'], \"hlasovani_konec\", $this->voting_end);\n }",
"public function setToken($token)\n {\n return $this->accessToken = $token;\n }",
"public function set_current($current_stop) {\r\n $this->current_stop = $current_stop;\r\n }",
"public function resume(): bool {}",
"public function setRememberToken($value)\n {\n //\n }",
"public function resume(Timer $timer);",
"public function setValidWebAccessToken($token = null)\n {\n // Check for the PreWebAccessToken\n if (session()->has('consumer_token')) {\n // Remove the PreWebAccessToken\n $requestToken = session()->pull('consumer_token');\n } else {\n $requestToken = $token;\n }\n // Set the validatable WebAccessToken\n session()->put('api_consumer_token', $requestToken);\n }",
"public function lazyStart()\n {\n // don't start more than once.\n if ($this->isStarted()) {\n // be sure the segment is loaded, though\n $this->load();\n return;\n }\n \n if ($this->_manager->isContinuing()) {\n // a previous session exists, start it\n $this->start();\n }\n }",
"public function replaceRememberToken($identifier, $token, $newToken, $expire);",
"protected function SetStarted($started)\n {\n $this->started = $started;\n }",
"public function resume($params=array()) {\n $this->curPos = isset($params['lastItem'])? $params['lastItem'] : 'xxx';\n if(isset($params['itemCount'])) $this->count = $params['itemCount'];\n\n }",
"public function restart(): void\n {\n $this->stop();\n $this->start();\n }",
"public function resume(): bool;",
"public function start(int $start): void;",
"public function setOffset(int $offset): void\n {\n $current = $this->stream->tell();\n\n if ($current !== $offset) {\n // If the stream cannot seek to the offset position, then read to it\n if ($this->stream->isSeekable()) {\n $this->stream->seek($offset);\n } elseif ($current > $offset) {\n throw new \\RuntimeException(\"Could not seek to stream offset $offset\");\n } else {\n $this->stream->read($offset - $current);\n }\n }\n\n $this->offset = $offset;\n }",
"public function setSessionTokenFromRegistry() {}",
"public function setSyncToken($value){\n return $this->setParameter('sync_token', $value);\n }",
"public function setMarkIdentification($value) {\n\t\tself::$_markIdentification = $value;\n\t}",
"public function setToken($token)\r\n {\r\n $this->token = $token;\r\n return $this;\r\n }",
"public function setToken (string $token)\n {\n $this->token = $token;\n $this->addParam(\"token\", $token);\n\n return $this;\n }",
"public function requestToken() {\n \n $result = $this->doRequest('v1.0/token?grant_type=1', 'GET');\n\n $this->_setToken($result->result->access_token);\n $this->_setRefreshToken($result->result->refresh_token);\n $this->_setExpireTime($result->result->expire_time);\n $this->_setUid($result->result->uid);\n\n }"
]
| [
"0.5683218",
"0.5387644",
"0.537441",
"0.5281512",
"0.5227127",
"0.5222539",
"0.5146465",
"0.5128549",
"0.51089925",
"0.51024145",
"0.50398046",
"0.49909082",
"0.4986468",
"0.49840638",
"0.49751338",
"0.49731547",
"0.49731547",
"0.49608636",
"0.49259508",
"0.4920733",
"0.49190456",
"0.49065852",
"0.4872462",
"0.48724255",
"0.48558658",
"0.4847325",
"0.4845676",
"0.48328447",
"0.48217106",
"0.48150793",
"0.47979972",
"0.47471097",
"0.47393453",
"0.4734617",
"0.47308528",
"0.47275874",
"0.47185814",
"0.47033665",
"0.47028017",
"0.46935797",
"0.4688591",
"0.4686385",
"0.46624973",
"0.46431366",
"0.4633346",
"0.4605914",
"0.45914784",
"0.45912087",
"0.4570497",
"0.45629808",
"0.4552939",
"0.45505217",
"0.4533227",
"0.45209453",
"0.45202827",
"0.4515374",
"0.45134118",
"0.45059258",
"0.44892535",
"0.44843766",
"0.44825786",
"0.44697738",
"0.44668",
"0.44652238",
"0.44570822",
"0.44530788",
"0.44458997",
"0.44359726",
"0.44117132",
"0.43780088",
"0.43665743",
"0.4364253",
"0.4344794",
"0.4344794",
"0.4344794",
"0.4344794",
"0.43406594",
"0.43342677",
"0.43193007",
"0.43187687",
"0.43187335",
"0.43180907",
"0.43164456",
"0.4315226",
"0.43125933",
"0.43102774",
"0.4308475",
"0.42931613",
"0.4278864",
"0.4276833",
"0.4274092",
"0.42726701",
"0.42723677",
"0.42665306",
"0.42619038",
"0.4258798",
"0.42502832",
"0.42493266",
"0.42427015",
"0.42392105"
]
| 0.65170866 | 0 |
Get only synced workers. | public function scopeSynced($query)
{
return $query->where('is_synced', true);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getWorkers()\n {\n }",
"public function getWorkers()\n {\n $workers = $this->redis->hGetAll(self::$workerKey);\n $temp = array();\n \n foreach ($workers as $name => $value) {\n $temp[$name] = unserialize($value);\n }\n return $temp;\n }",
"static public function getWorkersPlanning()\n {\n return Worker::all();\n }",
"public function setWorkers()\r\n {\r\n if (!is_array($this->workers)) {\r\n\r\n $gearmanCache = $this->container->get('gearman.cache');\r\n $this->workers = $gearmanCache->get();\r\n }\r\n\r\n /**\r\n * Always will be an Array\r\n */\r\n\r\n return $this->workers;\r\n }",
"public function getIgnoreRemoteSchedulers()\n {\n return $this->ignoreRemoteSchedulers;\n }",
"public function getPausedWorker()\n {\n return (array)$this->redis->smembers(self::$pausedWorkerKey);\n }",
"public function getWorker();",
"public function getWorker();",
"protected function getWorker()\n {\n return $this->worker;\n }",
"public function workers() {\n return $this->hasMany(Worker::class);\n }",
"public function isSyncable()\n {\n\n return static::$isSyncable;\n\n }",
"public static function exclusive()\n {\n // Change setting\n self::$settings['exclude'] = true;\n\n // Return exclusion list\n return self::$exclude;\n }",
"public function getWorker()\n {\n return $this->worker;\n }",
"public function getWorker()\n {\n return $this->worker;\n }",
"public function workers()\n {\n return $this->hasMany(Worker::class, 'station_id', 'id');\n }",
"public static function all()\n\t{\n\t\t$workers = Resque::redis()->smembers('workers');\n\t\tif (!is_array($workers)) {\n\t\t\t$workers = array();\n\t\t}\n\n\t\t$instances = array();\n\t\tforeach ($workers as $workerId) {\n\t\t\t$instances[] = self::find($workerId);\n\t\t}\n\t\treturn $instances;\n\t}",
"public function getSynchronized()\n {\n\n return $this->synchronized;\n\n }",
"public function index()\n {\n return Worker::all();\n }",
"function getAllPlksExpiredWorkers(){\n\t\t\t$sqlQuery = \"SELECT * FROM workers WHERE wkr_permitexp < CURDATE() \n\t\t\t\t\t\t \t\tAND wkr_transtatus IN ('4', '6', '7')\t\t\t\n\t\t\t\t\t\t \t AND wkr_status = 1\n\t\t\t\t\t\t \t\tAND wkr_id NOT IN(\n\t\t\t\t\t\t\t\t\tSELECT permit_wkrid FROM wkr_updatepermit WHERE permit_progress <> 'complete'\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t \t\tORDER BY wkr_permitexp\";\t\n\t\t\t\n\t\t\treturn $this->db->query($sqlQuery);\n\t\t}",
"protected function getJobWorkersConfig() : array\n {\n $config = $this->getMessageJobSourceConfig();\n\n return $config['parameters']['workers'] ?? [];\n }",
"public function workers()\n {\n return $this->belongsToMany(\"App\\User\")\n ->where(\"owner_id\", Auth::id());\n }",
"public function retireAllWorkers()\n {\n $query = $this->getConnection()->newQuery();\n $query = $query->update($this->getTable())\n ->set(['force_retirement' => 1]);\n\n try {\n $result = $query->rowCountAndClose();\n } catch (\\Throwable $exception) {\n $result = 0;\n }\n\n return $result;\n }",
"public static function getNumberOfWorkers();",
"public function isSynced(): bool\n {\n return $this->synced;\n }",
"public function getWorkerCount(): int;",
"public function coworkers()\n {\n // find shifts with a start time before or equal to this start time\n // an end time after this start time\n // and a start time less than the end time\n $coworkers = Shift::where('start_time', '>=', $this->start_time)\n ->where('end_time','>',$this->start_time)\n ->where('start_time', '<', $this->end_time)\n ->with('employee')->get();\n return $coworkers;\n }",
"public static function sync_allowed() {\n\t\t_deprecated_function( __METHOD__, 'jetpack-7.5', 'Automattic\\Jetpack\\Sync\\Actions' );\n\n\t\treturn Actions::sync_allowed();\n\t}",
"private function getFilteredConfig()\n {\n return array_diff_key($this->resolvedBaseSettings, array_flip($this->primaryReadReplicaConfigIgnored));\n }",
"public function getGuarded();",
"protected function exclude_spare()\n {\n return $this->collection = $this->collection->where('is_spare', 'f');\n }",
"public function getAvailableTasks();",
"private function sites_with_outdated_modem()\r\n {\r\n return $this->sites_repository()->sites_with_outdated_modem();\r\n }",
"public function monitoring()\n {\n return (array) $this->connection()->smembers('monitoring');\n }",
"public function getAllRaitingWorker($id)\n {\n return $this->rating->where('worker_id',$id)->where('worker_rating','!=',0)->get();\n }",
"public function getAvailableWorkspaces() {}",
"public function actingAsWorker()\n {\n $user = User::where('email', UserTableSeeder::WORKER_CREDENTIALS['email'])->firstOrFail();\n\n return $this->actingAs($user);\n }",
"protected function _getSyncedCustomersProgress()\n {\n $scopeStoreIds = $this->_getScopeStoreIds();\n $totalCustomers = Mage::getModel('mailigen_synchronizer/customer')->getCollection();\n if (count($scopeStoreIds) > 0) {\n $totalCustomers->addFieldToFilter('store_id', $scopeStoreIds);\n } else {\n $totalCustomers->addFieldToFilter('store_id', array('neq' => '0'));\n }\n $totalCustomers = $totalCustomers->getSize();\n\n if ($totalCustomers === 0) {\n $totalCustomers = Mage::getModel('customer/customer')->getCollection();\n if (count($scopeStoreIds) > 0) {\n $totalCustomers->addFieldToFilter('store_id', $scopeStoreIds);\n }\n $totalCustomers = $totalCustomers->getSize();\n }\n\n $syncedCustomers = Mage::getModel('mailigen_synchronizer/customer')->getCollection()\n ->addFieldToFilter('is_synced', 1);\n if (count($scopeStoreIds) > 0) {\n $syncedCustomers->addFieldToFilter('store_id', $scopeStoreIds);\n } else {\n $syncedCustomers->addFieldToFilter('store_id', array('neq' => '0'));\n }\n $syncedCustomers = $syncedCustomers->getSize();\n\n $result['percent'] = round($syncedCustomers / $totalCustomers * 100, 2);\n $result['text'] = \"{$result['percent']}% ($syncedCustomers/$totalCustomers)\";\n $result['button'] = ($this->_getSchedule()->getLastRunningJob() === false) ? $this->_getResetCustomersSyncButton() : '';\n\n return $result;\n }",
"public function getDueBroadcasts()\n {\n $now = Carbon::now();\n\n return Broadcast::where(function ($query) use ($now) {\n $query->where('status', BroadcastRepositoryInterface::STATUS_PENDING)->where('send_at', '<=', $now);\n })->orWhere(function ($query) use ($now) {\n $query->where('schedules.status', BroadcastRepositoryInterface::STATUS_PENDING)->where('schedules.send_at', '<=', $now);\n })->get();\n }",
"protected function get_shared_instances(): array {\n\t\treturn [];\n\t}",
"public function disabled()\n\t{\n\t\treturn $this->installed(function($query)\n\t\t{\n\t\t\treturn $query->where('enabled', '=', 0);\n\t\t});\n\t}",
"private function getCandidateClients() {\n\t\t$db = $this->getRepoMaster();\n\n\t\t// XXX: subject to clock skew. Use DB based \"now\" time?\n\t\t$freshDispatchTime = wfTimestamp( TS_MW, $this->now() - $this->dispatchInterval );\n\t\t$staleLockTime = wfTimestamp( TS_MW, $this->now() - $this->lockGraceInterval );\n\n\t\t// TODO: pass the max change ID as a parameter!\n\t\t$row = $db->selectRow(\n\t\t\t$this->changesTable,\n\t\t\t'max( change_id ) as maxid',\n\t\t\tarray(),\n\t\t\t__METHOD__ );\n\n\t\t$maxId = $row ? $row->maxid : 0;\n\n\t\t// Select all clients that:\n\t\t// have not been touched for $dispatchInterval seconds\n\t\t// ( or are lagging by more changes than given by batchSize )\n\t\t// and are not locked\n\t\t// ( or the lock is older than $lockGraceInterval ).\n\t\t// and have not seen all changes\n\t\t// and are not disabled\n\t\t// Limit the list to $randomness items. Candidates will be picked\n\t\t// from the resulting list at random.\n\n\t\t$candidates = $db->selectFieldValues(\n\t\t\t$this->stateTable,\n\t\t\t'chd_site',\n\t\t\tarray( '( chd_lock is NULL ' . // not locked or...\n\t\t\t\t\t' OR chd_touched < ' . $db->addQuotes( $staleLockTime ) . ' ) ', // ...the lock is old\n\t\t\t\t'( chd_touched < ' . $db->addQuotes( $freshDispatchTime ) . // and wasn't touched too recently or...\n\t\t\t\t\t' OR ( ' . (int)$maxId. ' - chd_seen ) > ' . (int)$this->batchSize . ') ' , // or it's lagging by more changes than batchSite\n\t\t\t\t'chd_seen < ' . (int)$maxId, // and not fully up to date.\n\t\t\t\t'chd_disabled = 0' // and not disabled\n\t\t\t),\n\t\t\t__METHOD__,\n\t\t\tarray(\n\t\t\t\t'ORDER BY' => 'chd_seen ASC',\n\t\t\t\t'LIMIT' => (int)$this->randomness\n\t\t\t)\n\t\t);\n\n\t\treturn $candidates;\n\t}",
"public function getSyncOrders($store)\n {\n $storeId = $this->getStoreId($store);\n\n $syncOrders = Mage::getModel('shippit/sync_order')\n ->getCollection()\n ->join(\n array('order' => 'sales/order'),\n 'order.entity_id = main_table.order_id',\n array(),\n null,\n 'left'\n )\n ->addFieldToFilter('main_table.status', Shippit_Shippit_Model_Sync_Order::STATUS_PENDING)\n ->addFieldToFilter('main_table.attempt_count', array('lteq' => Shippit_Shippit_Model_Sync_Order::SYNC_MAX_ATTEMPTS))\n ->addFieldToFilter('order.state', array('eq' => Mage_Sales_Model_Order::STATE_PROCESSING))\n ->addFieldToFilter('order.store_id', array('eq' => $storeId));\n\n // Check if order status filtering is active\n if ($this->helper->isFilterOrderStatusActive()) {\n $filterStatus = $this->helper->getFilterOrderStatus();\n\n // ensure there is a filtering value present\n if (!empty($filterStatus)) {\n $syncOrders->addFieldToFilter(\n 'order.status',\n array(\n 'in' => $filterStatus\n )\n );\n }\n }\n\n return $syncOrders;\n }",
"public static function inclusive()\n {\n // Change setting\n self::$settings['exclude'] = false;\n\n // Return exclusion list\n return self::$exclude;\n }",
"private function checkWorkers() {\n global $workers;\n $living = array();\n\n // Find any dead workers\n foreach ($workers as $workerID => $pid) {\n gosUtility_parallel::$logger->debug(\"Checking worker $workerID (pid $pid)\");\n\n // Check if this worker still exists as a process\n if (pcntl_waitpid($pid, $status, WNOHANG|WUNTRACED) === $pid) {\n // If the worker exited normally, stop tracking it\n if (pcntl_wifexited($status) && pcntl_wexitstatus($status) === 0) {\n gosUtility_parallel::$logger->info(\"Worker $workerID (pid $pid) exited normally\");\n unset($workers[$workerID]);\n }\n }\n\n // If it has a session ID, then it's still living\n if (posix_getsid($pid))\n $living[] = $pid;\n }\n\n // Start new workers to replace dead ones\n $dead = array_diff($workers, $living);\n foreach ($dead as $workerID => $deadPID) {\n gosUtility_parallel::$logger->warn(\"Worker $workerID (pid $deadPID) died. Conscripting replacement...\");\n\n unset($workers[$workerID]);\n $this->startWorker($workerID);\n }\n }",
"public function prunable()\n {\n return static::where(static::UPDATED_AT, '<=', now()->subWeek());\n }",
"public static function getWorkerRawConfig() {\n\t\tif (empty(self::$config)) {\n\t\t\t$config = new Config_Gearman();\n\t\t\t$tmpConfig = array();\n\t\t\t$gearmanConfig = $config->get('gearman.workers');\n\n\t\t\tforeach ($gearmanConfig as $key => $data) {\n\t\t\t\t$key = strtolower($key);\n\t\t\t\t$tmpConfig[$key] = (object)$data;\n\t\t\t}\n\n\t\t\tself::$config = $tmpConfig;\n\t\t}\n\n\t\treturn self::$config;\n\t}",
"public function getWorkerId()\n {\n return $this->worker_id;\n }",
"public function getWorkerId()\n {\n return $this->worker_id;\n }",
"public function getWorkerId()\n {\n return $this->worker_id;\n }",
"protected function gatherWorkerOptions(): WorkerOptions\n {\n return new WorkerOptions(\n $this->option('force'),\n $this->option('memory'),\n $this->option('sleep'),\n $this->option('timeout')\n );\n }",
"public function getActiveClients()\n {\n $clients = array_filter($this->clients, function ($key) {\n return !in_array($key, [0, 'unknown']);\n }, ARRAY_FILTER_USE_KEY);\n\n return $clients;\n }",
"protected function getWantedPartitioning()\n\t{\n\t\treturn($this->wantedPartitioning);\n\t}",
"public function getWorkerPoolSpecs()\n {\n return $this->worker_pool_specs;\n }",
"public function isSyncable() {\n return (bool) $this->_syncable;\n }",
"public function broadcastOn()\n {\n return [];\n }",
"public function broadcastOn()\n {\n return [];\n }",
"public function broadcastOn()\n {\n return [];\n }",
"public function broadcastOn()\n {\n return [];\n }",
"public function broadcastOn()\n {\n return [];\n }",
"public function broadcastOn()\n {\n return [];\n }",
"public function broadcastOn()\n {\n return [];\n }",
"public function broadcastOn()\n {\n return [];\n }",
"public function broadcastOn()\n {\n return [];\n }",
"public function broadcastOn()\n {\n return [];\n }",
"public function broadcastOn()\n {\n return [];\n }",
"public function broadcastOn()\n {\n return [];\n }",
"public function broadcastOn()\n {\n return [];\n }",
"public function broadcastOn()\n {\n return [];\n }",
"public function broadcastOn()\n {\n return [];\n }",
"public function broadcastOn()\n {\n return [];\n }",
"public function broadcastOn()\n {\n return [];\n }",
"public function broadcastOn()\n {\n return [];\n }",
"public function broadcastOn()\n {\n return [];\n }",
"public function broadcastOn()\n {\n return [];\n }",
"public function broadcastOn()\n {\n return [];\n }",
"public function broadcastOn()\n {\n return [];\n }",
"public function broadcastOn()\n {\n return [];\n }",
"public function broadcastOn()\n {\n return [];\n }",
"public function broadcastOn()\n {\n return [];\n }",
"public function broadcastOn()\n {\n return [];\n }",
"public function broadcastOn()\n {\n return [];\n }",
"public function broadcastOn()\n {\n return [];\n }",
"public function broadcastOn()\n {\n return [];\n }",
"public function broadcastOn()\n {\n return [];\n }",
"public function broadcastOn()\n {\n return [];\n }",
"public function broadcastOn()\n {\n return [];\n }",
"public function broadcastOn()\n {\n return [];\n }",
"public function broadcastOn()\n {\n return [];\n }",
"public function broadcastOn()\n {\n return [];\n }",
"public function broadcastOn()\n {\n return [];\n }",
"public function broadcastOn()\n {\n return [];\n }",
"public function broadcastOn()\n {\n return [];\n }",
"protected function _getWorker($type)\n {\n /** @var BL_CustomGrid_Helper_Worker $helper */\n $helper = Mage::helper('customgrid/worker');\n return $helper->getModelWorker($this, $type);\n }",
"public function workersAction()\n {\n $workerManager = $this->get('dtc_queue.worker_manager');\n $workers = $workerManager->getWorkers();\n\n $workerList = [];\n foreach ($workers as $workerName => $worker) {\n /* @var Worker $worker */\n $workerList[$workerName] = get_class($worker);\n }\n $params = ['workers' => $workerList];\n $this->addCssJs($params);\n\n return $params;\n }",
"public function getEnabled()\n {\n return array_filter($this->storage, function($val)\n {\n return $val['status'] === ProviderInterface::STATUS_INSTALLED;\n });\n }",
"public function getMonitoredFiles()\n {\n return $this->monitoredFiles;\n }",
"public function getRequiredForAllTravelers()\n\t{\n\t\treturn $this->requiredForAllTravelers;\n\t}",
"public function getLockedCommands()\n {\n static $arr = null;\n if (is_null($arr)) {\n $arr = array();\n $res = $this->db->query('SELECT command_id FROM command WHERE command_locked = 1');\n while ($row = $res->fetch()) {\n $arr[$row['command_id']] = true;\n }\n }\n return $arr;\n }",
"public function getWorkerName()\n {\n return $this->work_name;\n }",
"public function broadcastOn()\n {\n\n return [];\n }"
]
| [
"0.6180675",
"0.6028199",
"0.5994246",
"0.5879795",
"0.58101076",
"0.5680572",
"0.5643634",
"0.5643634",
"0.55129087",
"0.5459546",
"0.5449886",
"0.544599",
"0.54446006",
"0.54446006",
"0.54181993",
"0.5368768",
"0.53015673",
"0.52209705",
"0.5220617",
"0.5187471",
"0.51629",
"0.5153871",
"0.5082231",
"0.5059868",
"0.50398237",
"0.5028592",
"0.5013935",
"0.500832",
"0.49535412",
"0.49413845",
"0.4941185",
"0.4926002",
"0.49183524",
"0.49153665",
"0.48999038",
"0.48997346",
"0.4876524",
"0.48737732",
"0.48673806",
"0.4854766",
"0.4849615",
"0.48494947",
"0.48486513",
"0.48445243",
"0.48410013",
"0.48341984",
"0.48207054",
"0.48207054",
"0.48207054",
"0.4815677",
"0.48088208",
"0.48002785",
"0.4787503",
"0.47841892",
"0.47659746",
"0.47659746",
"0.47659746",
"0.47659746",
"0.47659746",
"0.47659746",
"0.47659746",
"0.47659746",
"0.47659746",
"0.47659746",
"0.47659746",
"0.47659746",
"0.47659746",
"0.47659746",
"0.47659746",
"0.47659746",
"0.47659746",
"0.47659746",
"0.47659746",
"0.47659746",
"0.47659746",
"0.47659746",
"0.47659746",
"0.47659746",
"0.47659746",
"0.47659746",
"0.47659746",
"0.47659746",
"0.47659746",
"0.47659746",
"0.47659746",
"0.47659746",
"0.47659746",
"0.47659746",
"0.47659746",
"0.47659746",
"0.47659746",
"0.47659746",
"0.47655806",
"0.47543135",
"0.4736264",
"0.47236374",
"0.47096828",
"0.47086757",
"0.47019106",
"0.4700467"
]
| 0.4727472 | 95 |
Check if this token has already been processed by this worker. | public function processedToken(Token $token)
{
return $this->resume_token > $token->id;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function existsRequestToken()\n {\n // load token\n $store = $this->getStore();\n $type = $store->loadToken($this);\n\n // get consumer\n $this->_consumer = call_user_func($this->_get_consumer_handler, $store->getConsumerKey());\n\n // return result\n if ($type=='request') {\n return true;\n }\n return false;\n }",
"public function hasToken(){\n return ( $this->token and $this->token->isValid() );\n }",
"public function isProcessed() {}",
"public function hasToken ()\n {\n return $this->peekAtToken() !== NULL;\n }",
"public function hasToken(){\n return $this->_has(2);\n }",
"public function hasToken(){\n return $this->_has(2);\n }",
"public function hasQueueingCookie(): bool;",
"public function valid()\n {\n return count($this->result_queue) !== 0;\n }",
"public function isProcessed(): bool;",
"public function hasToken();",
"public function processToken()\n {\n if (!$this->_token) {\n return false;\n }\n\n if ($this->_isPasswordRecoveryToken) {\n $this->_processPasswordRecoveryToken();\n } else {\n $this->_processAuthToken();\n }\n\n /**\n * just for case. e.g. some chosen page not exist anymore etc.\n * Lead should not stay on page with token, so move lead to 404\n */\n if (!$this->_redirectUrl) {\n $this->_redirectUrl = '/404';\n }\n\n return true;\n }",
"protected function _isNewToken()\n {\n $info = $this->_quote->getPayment();\n Mage::helper('ewayrapid')->unserializeInfoInstace($info);\n if ($token = Mage::getSingleton('core/session')->getData('newToken')) {\n Mage::getSingleton('core/session')->unsetData('newToken');\n return true;\n }\n return false;\n }",
"public function checkToken() {\n if (!isset($this->requestToken)) {\n trigger_error(tr('Request token missing. Is the session module missing?'), E_USER_WARNING);\n return false;\n }\n if (!isset($this->data['access_token'])) {\n return false;\n }\n return $this->requestToken->getToken() === $this->data['access_token'];\n }",
"public function isRunningSchedulerWorker()\n {\n $pids = $this->redis->hKeys(self::$workerKey);\n $schedulerPid = $this->redis->get(self::$schedulerWorkerKey);\n\n if ($schedulerPid !== false && is_array($pids)) {\n if (in_array($schedulerPid, $pids)) {\n return true;\n }\n // Pid is outdated, remove it\n $this->unregisterSchedulerWorker();\n return false;\n }\n return false;\n }",
"public function valid()\n {\n // don't process more than the max messages\n if ($this->currentKey >= $this->maxMessages) {\n return false;\n }\n // if a payload already exists for the current key, we'll be able to return that\n if (isset($this->messages[$this->currentKey])) {\n return true;\n }\n // if no payload exists for the current key yet, try to get the next one\n $message = $this->api->getNextMessage();\n if ($message) {\n $this->messages[$this->currentKey] = $message;\n return true;\n }\n // if no message exists and no new messages could be received,\n // end the iterable\n return false;\n }",
"public function hasToken()\n {\n return $this->tokenFlag;\n }",
"public function hasToken()\n {\n return $this->tokenFlag;\n }",
"public function ssoTokenExists() {\n if ($this->httpSession != null && array_key_exists('maestrano', $this->httpSession)) {\n return true;\n }\n\n return false;\n }",
"public function valid()\n {\n return !is_null(key($this->requests));\n }",
"public function processing() {\n return $this->bulkRunning() || count($this->get());\n }",
"public function isTokenValid() {\n if (!isset($_SESSION['token']) || $this->_token != $_SESSION['token'])\n \n\t\t\t$this->_errors[] = 'invalid submission';\n\n // return true or false \n return count($this->_errors) ? 0 : 1;\n }",
"public function hasPendingInsertions()\n {\n return ! empty($this->documentInsertions);\n }",
"public function checkToken( )\n {\n\n $this->getTokenPost();\n if ( $this->token_post && $this->is_active() ) {\n if (empty($this->project_id) || $this->project_id != $this->token_post['meta_data']['pr-projekt'][0]) {\n $this->set_result_error('notfound');\n return false;\n }\n return $this->result;\n } else {\n return false;\n }\n\n }",
"public static function OrderProcessHasBeenMarkedAsCompleted()\n {\n return array_key_exists(self::SESSION_KEY_NAME_ORDER_SUCCESS, $_SESSION) && true == $_SESSION[self::SESSION_KEY_NAME_ORDER_SUCCESS];\n }",
"public function hasJob(): bool;",
"protected function hasStarted()\r\n {\r\n return isset($this->_session[$this->_stepsKey]);\r\n }",
"function Check() {\n\t\t// Check if the token has been sent.\n\t\tif(isset($_REQUEST['spack_token'])) {\n\t\t\t// Check if the token exists\n\t\t\tif(isset($_SESSION[\"spackt_\".$_REQUEST['spack_token']])) {\n\t\t\t\t// Check if the token isn't empty\n\t\t\t\tif(isset($_SESSION[\"spackt_\".$_REQUEST['spack_token']])) {\n\t\t\t\t\t$age = time()-$_SESSION[\"spackt_\".$_REQUEST['spack_token']];\n\t\t\t\t\t// Check if the token did not timeout\n\t\t\t\t\tif($age > $this->timeout*60) $this->error = 4;\n\t\t\t\t}\n\t\t\t\telse $this->error = 3;\n\t\t\t}\n\t\t\telse $this->error = 2;\n\t\t}\n\t\telse $this->error = 1;\n\t\t// Anyway, destroys the old token.\n\t\t$this->tokenDelAll();\n\t\tif($this->error==0) return true;\n\t\telse return false;\n\t}",
"public function hasRunning()\n {\n return $this->running !== null;\n }",
"private function isTokenUsed($validationToken = null)\n\t{\n\t\tif (null === $validationToken) {\n\t\t\treturn true;\n\t\t}\n\n\t\t$valoration = $this->validationFactory->create()\n\t\t\t\t\t\t->getCollection()\n\t\t\t\t\t\t->addFieldToFilter('customerloyalty_sent_entity_id', ['eq' => $validationToken->getEntityId()])\n\t\t\t\t\t\t->getFirstItem();\n\n\t\treturn empty($valoration->getData());\n\t}",
"protected function _checkToken(KCommandContext $context)\n {\n //Check the token\n if($context->caller->isDispatched())\n { \n $method = KRequest::method();\n \n //Only check the token for PUT, DELETE and POST requests (AND if the view is not 'ipn')\n if(($method != KHttpRequest::GET) && ($method != KHttpRequest::OPTIONS) && (KRequest::get('get.view', 'string') != 'ipn')) \n { \n if( KRequest::token() !== JUtility::getToken()) { \n return false;\n }\n }\n }\n \n return true;\n }",
"public function hasCurrent()\n {\n return $this->current !== null;\n }",
"public function is_process_running() {\n\n\t\t\tif ( ! class_exists( 'ActionScheduler' ) || ! is_callable( array( 'ActionScheduler', 'store' ) ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t$csv_scheduler_status = '';\n\n\t\t\t$import_coupon_scheduler_status = '';\n\n\t\t\t$scheduler_running_statuses = array(\n\t\t\t\t'pending',\n\t\t\t\t'in-progress',\n\t\t\t);\n\n\t\t\tforeach ( $scheduler_running_statuses as $running_status ) {\n\t\t\t\t$csv_scheduler = ActionScheduler::store()->find_action( 'woo_sc_generate_coupon_csv', array( 'status' => $running_status ) );\n\t\t\t\tif ( $csv_scheduler ) {\n\t\t\t\t\t$csv_scheduler_status = $running_status;\n\t\t\t\t}\n\n\t\t\t\t$import_coupon_scheduler = ActionScheduler::store()->find_action( 'woo_sc_import_coupons_from_csv', array( 'status' => $running_status ) );\n\t\t\t\tif ( $import_coupon_scheduler ) {\n\t\t\t\t\t$import_coupon_scheduler_status = $running_status;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$is_process_running = ! empty( $csv_scheduler_status ) || ! empty( $import_coupon_scheduler_status );\n\n\t\t\treturn $is_process_running;\n\t\t}",
"public function hasCurrentIntent(): bool\n {\n return isset($this->currentIntentUid);\n }",
"protected function shouldRegisterThisProcessWithResourcesCleaner(): bool\n {\n return self::isStatusCheck();\n }",
"public function onBoardingIsCompleted()\n {\n return !empty($this->getIdToken());\n // Commented out because psx form is no longer used\n // && $this->psxFormIsCompleted();\n }",
"public function isProcessed()\r\n {\r\n return $this->processed;\r\n }",
"public function isDone(): bool\n {\n return $this->index === count($this->objectListKeys);\n }",
"public function isDone()\r\n {\r\n if ($this->index == $this->aggregate->size()) {\r\n return true;\r\n }\r\n return false;\r\n }",
"public function in_transaction() {\r\n return isset($this->sem_id) && $this->sem_id;\r\n }",
"public function isAcquired()\n {\n return $this->counter > 0;\n }",
"public function isProcessing() : bool\n {\n return $this->getOrderStatus() == self::PROCESSING;\n }",
"public function valid()\n {\n return isset($this->current_scrolled_response['hits']['hits'][0]);\n }",
"public function has_nonce(): bool {\n\t\treturn ! is_null( $this->get_nonce_handle() );\n\t}",
"private function has_token($hash) {\n\t\tif (!isset($this->tyk_subscriptions) || !is_array($this->tyk_subscriptions)) {\n\t\t\t$user_data = $this->fetch_from_tyk();\n\t\t\tif (!isset($user_data->subscriptions)) {\n\t\t\t\tthrow new Exception('Missing policy subscriptions');\n\t\t\t}\n\t\t\t$this->tyk_subscriptions = array_flip((array) $user_data->subscriptions);\n\t\t}\n\t\treturn isset($this->tyk_subscriptions[$hash]);\n\t}",
"public function hasMessageId()\n {\n return $this->MessageId !== null;\n }",
"public function getIsNewSingleExecution() {}",
"public function isQueued()\n {\n return $this->instance->isQueued();\n }",
"public function hasToken()\n {\n if ($this->entity instanceof ResourceToken) {\n return true;\n }\n\n try {\n $this->entity = $this->getToken();\n\n if (!($this->entity instanceof ResourceToken)) {\n throw new EntityNotFoundException();\n\n }\n\n return true;\n } catch (EntityNotFoundException $e) {\n return false;\n }\n }",
"public function hasThreadTs(): bool\n {\n return ! empty($this->threadTS);\n }",
"function empty() {\n return !count($this->queue);\n }",
"public function hasExpiredWorkerHandler()\n {\n $hasExpired = false;\n $timeout = AlphaRPC::WORKER_HANDLER_TIMEOUT;\n $validTime = microtime(true) - ($timeout / 1000);\n\n foreach ($this->workerHandlers as $handlerId => $time) {\n if ($time >= $validTime) {\n break;\n }\n\n unset($this->workerHandlers[$handlerId]);\n $hasExpired = true;\n }\n\n return $hasExpired;\n }",
"public function validate()\n {\n // generate Token String\n $idTokenString = $this->getTokenString($this->_key);\n return ($idTokenString == $this->_tokenString);\n }",
"public function isProcessing()\n {\n return $this->getStatus() === OpenNode_Bitcoin_Model_Bitcoin::OPENNODE_STATUS_PROCESSING;\n }",
"public function isStillPending()\n {\n //\n return $this->result == self::RESULT_STILL_PENDING;\n }",
"protected function isNotQueued()\n {\n if (! isset($this->memory)) {\n return true;\n }\n\n return (! $this->memory->get('email.queue', false));\n }",
"public function isAlreadySaved()\n\t\t{\n\t\t\treturn $this->_alreadySaved == true;\n\t\t}",
"private function tokenExist() {\n if (!$this->webhook->token) {\n // throw an exception\n $this->missingEx('token');\n }\n }",
"public function hasIdentity()\n {\n return !empty($this->storage[$this->storageKey]);\n }",
"public static function has_user_token( $token ) {\n if( WAUC_Functions::get_current_user_id() ) {\n if( wc_customer_bought_product( WAUC_Functions::get_user_email(WAUC_Functions::get_current_user_id()), WAUC_Functions::get_current_user_id(), $token ) ) {\n return true;\n }\n }\n return false;\n }",
"public static function hasInstance() {\n return (self::$instance != null);\n }",
"public function hasRefreshToken ()\n {\n return $this->refreshToken != null;\n }",
"protected function isPostRequestCompulsoryForProcessStep()\n {\n return true;\n }",
"public function valid ()\n {\n return isset($this->offset) && isset($this->cache[ $this->offset ]);\n }",
"private function isPushNeeded()\n {\n $this->logging->addDebug(__METHOD__ . '|1|');\n if ($this->hasPostData('add_initiated_by_magento', 1)\n && $this->hasPostData('add_service_action_from_magento', ['refund'])\n ) {\n $statusCodeSuccess = $this->helper->getStatusCode('BUCKAROO_MAGENTO2_STATUSCODE_SUCCESS');\n if ($this->hasPostData('brq_statuscode', $statusCodeSuccess)\n && !empty($this->postData['brq_relatedtransaction_refund'])) {\n if ($this->receivePushCheckDuplicates(\n $this->helper->getStatusCode('BUCKAROO_MAGENTO2_STATUSCODE_PENDING_APPROVAL'),\n $this->postData['brq_relatedtransaction_refund']\n )) {\n $this->logging->addDebug(__METHOD__ . '|4|');\n return true;\n }\n }\n $this->logging->addDebug(__METHOD__ . '|5|');\n return false;\n\n }\n\n $types = ['capture', 'cancelauthorize', 'cancelreservation'];\n if ($this->hasPostData('add_initiated_by_magento', 1)\n && $this->hasPostData('add_service_action_from_magento', $types)\n && empty($this->postData['brq_relatedtransaction_refund'])\n ) {\n return false;\n }\n\n if ($this->hasPostData('add_initiated_by_magento', 1)\n && $this->hasPostData('brq_transaction_method', ['klarnakp', 'KlarnaKp'])\n && $this->hasPostData('add_service_action_from_magento', 'pay')\n && isset($this->postData['brq_service_klarnakp_captureid'])\n ) {\n return false;\n }\n\n return true;\n }",
"function verify($token)\n {\n $this->purge();\n $exists = $this->exists($token);\n if (is_a($exists, 'PEAR_Error')) {\n return $exists;\n } elseif ($exists) {\n return false;\n } else {\n return $this->add($token);\n }\n }",
"public function hasTasks()\n {\n return $this->count() > 0;\n }",
"public function should_run()\n\t{\n\t\treturn $this->config['delete_pms_last_gc'] < time() - $this->config['delete_pms_gc'];\n\t}",
"public function exists()\n\t{\n\t\treturn ! $this->hasBeenRemoved;\n\t}",
"private function validateTokens()\n {\n $whoami = $this->getJson('/ping/whoami');\n if (isset($whoami['authenticated']) && $whoami['authenticated'])\n {\n syslog(LOG_DEBUG, \"Monzo: Token is still valid\");\n return true;\n }\n else\n {\n return false;\n }\n }",
"public function exists() {\n\t\treturn !isset($userData);\n\t}",
"public function taskIsDone()\n {\n // If file exists, the related task is still busy.\n return ! file_exists($this->taskFilePath);\n }",
"public function isAlreadyInSave()\n {\n return $this->alreadyInSave;\n }",
"public function isAlreadyInSave()\n {\n return $this->alreadyInSave;\n }",
"public function isAlreadyInSave()\n {\n return $this->alreadyInSave;\n }",
"public function isAlreadyInSave()\n {\n return $this->alreadyInSave;\n }",
"public function isAlreadyInSave()\n {\n return $this->alreadyInSave;\n }",
"public function isAlreadyInSave()\n {\n return $this->alreadyInSave;\n }",
"public function isAlreadyInSave()\n {\n return $this->alreadyInSave;\n }",
"public function isAlreadyInSave()\n {\n return $this->alreadyInSave;\n }",
"public function isAlreadyInSave()\n {\n return $this->alreadyInSave;\n }",
"public function isAlreadyInSave()\n {\n return $this->alreadyInSave;\n }",
"public function hasKey()\n {\n return isset($this->key);\n }",
"public function hasKey()\n {\n return isset($this->key);\n }",
"public function isDone() {\n\t\treturn $this->getDone();\n\t}",
"public function exists() {\n return $this->shareData !== false;\n }",
"public function isSent() {\n\treturn $this->status != self::$WAITING;\n }",
"public function hasSessionToken()\n\t{\n\t\treturn \\Session::has('google.access_token');\n\t}",
"private function is_locked(){\n\t\t//return $batch_txt_file_object->exists();\n\t\treturn \"no\";\n\t\t\n\t}",
"private function jobHasAlreadyBeenRun($jobCode)\n {\n $currentRunningJob = $this->cronCollection->create()\n ->addFieldToFilter('job_code', $jobCode)\n ->addFieldToFilter('status', ['in' => ['pending', 'running']])\n ->getLastItem();\n \n return ($currentRunningJob->getSize()) ? false : true;\n }",
"public function valid()\n {\n return (\n !is_null($this->current) &&\n $this->dataStore->has($this->current[$this->dataStore->getIdentifier()])\n );\n }",
"public static function _CheckToken( $_CSRFToken = '' )\r\n\t\t{\r\n\t\t\t\r\n\t\t\tif ( Session::has( 'CSRFToken' ) && Session::get( 'CSRFToken' ) === Params::get( 'post' )->CSRFToken\r\n\t\t\t || Session::has( 'CSRFToken' ) && Session::get( 'CSRFToken' ) === $_CSRFToken )\r\n\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\tSession::clear( 'CSRFToken' );\r\n\t\t\t\t\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn false;\r\n\t\t}",
"public function isUsed()\n\t{\n\t\treturn $this->data && $this->data['forms_attempts'] > 0;\n\t}",
"public function exists() {\n return $this->sessionData !== false;\n }",
"private function hasInstance()\n {\n return !self::$_instance ? false : true;\n }",
"public function exists() {\n\t\tglobal $wpdb;\n\n\t\treturn (bool) $wpdb->get_var( $wpdb->prepare(\n\t\t\t\"SELECT `mutex_id` FROM {$wpdb->base_prefix}itsec_mutexes WHERE `mutex_id` = %d\",\n\t\t\t$this->get_id()\n\t\t) );\n\t}",
"public function validate ( $token ) { return $this->server->token2uid( $token ) > 0; }",
"protected function isAlreadyProcessed(Issue $issue, Issue $linked_issue)\n\t{\n\t\t$issue_status = $this->getIssueStatusName($issue);\n\t\t$linked_issue_status = $this->getIssueStatusName($linked_issue);\n\n\t\treturn $issue_status === 'Resolved' && $linked_issue_status === 'Resolved';\n\t}",
"public function hasPid(){\n return $this->_has(5);\n }",
"public function getHasBeenRejectedBefore(): bool;",
"public function valid(): bool\n {\n return null !== $this->_nextScrollId;\n }"
]
| [
"0.6482249",
"0.62763935",
"0.625363",
"0.61815286",
"0.616132",
"0.616132",
"0.61007345",
"0.6089041",
"0.60735035",
"0.6066239",
"0.6061072",
"0.6032619",
"0.6005189",
"0.5986701",
"0.5925701",
"0.58916473",
"0.58916473",
"0.5890091",
"0.58862287",
"0.57972044",
"0.5795179",
"0.5775556",
"0.5768129",
"0.5744417",
"0.57437885",
"0.57337594",
"0.5715767",
"0.56992555",
"0.569602",
"0.56934637",
"0.5687282",
"0.56829506",
"0.56828475",
"0.56753516",
"0.56748766",
"0.56721085",
"0.56472605",
"0.56451267",
"0.5624238",
"0.5593232",
"0.5590002",
"0.5589927",
"0.555172",
"0.55349344",
"0.5533077",
"0.5519081",
"0.55163187",
"0.551229",
"0.55121255",
"0.5499959",
"0.5486413",
"0.5475175",
"0.54719216",
"0.5467446",
"0.54666436",
"0.54604894",
"0.54591376",
"0.54558146",
"0.54492736",
"0.54304564",
"0.5429389",
"0.5424567",
"0.54235196",
"0.54218245",
"0.5415119",
"0.5406435",
"0.5401103",
"0.5396065",
"0.5393431",
"0.5391003",
"0.5389075",
"0.5388929",
"0.5388929",
"0.5388929",
"0.5388929",
"0.5388929",
"0.5388929",
"0.5388929",
"0.5388929",
"0.5388929",
"0.5388929",
"0.5383625",
"0.5383625",
"0.53832483",
"0.5382371",
"0.5370245",
"0.5368235",
"0.5363953",
"0.53630847",
"0.5361831",
"0.53590506",
"0.5357516",
"0.53524333",
"0.5349572",
"0.5345501",
"0.53444976",
"0.53437465",
"0.5341504",
"0.53404117",
"0.53379315"
]
| 0.6495519 | 0 |
Worker belongs to a Campaign. | public function campaign()
{
return $this->belongsTo(Campaign::class);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function worker()\n {\n return $this->belongsTo(Worker::class, 'worker_id', 'id');\n }",
"public function campaign()\n {\n return $this->hasOne(Campaign::class);\n }",
"public function worker(){ \n return $this->hasOne('App\\Models\\User','id','worker_id');\n }",
"public function Campaign()\n {\n return $this->belongsTo('App\\Campaign', 'campaign_id');\n }",
"public function getCampaign()\n {\n return $this->campaign;\n }",
"public function campaign()\n {\n return $this->belongsTo(\n __NAMESPACE__ . '\\Campaign', 'campaign_id', 'id'\n )->withoutGlobalScope('type');\n }",
"public function getWorkerId()\n {\n return $this->worker_id;\n }",
"public function getWorkerId()\n {\n return $this->worker_id;\n }",
"public function getWorkerId()\n {\n return $this->worker_id;\n }",
"public function companyStaffWork()\n {\n return $this->belongsTo('App\\Models\\Ad3d\\CompanyStaffWork\\QcCompanyStaffWork', 'work_id', 'work_id');\n }",
"public function job() {\n return $this->belongsTo('Backoffice\\Job');\n }",
"public function campaign()\n {\n return $this->belongsTo(Campaign::class, self::PIVOT_CAMPAIGN_ID);\n }",
"public function job()\n {\n return $this->belongsTo(Job::class);\n }",
"public function job()\n {\n return $this->belongsTo(Job::class);\n }",
"public function job()\n {\n return $this->belongsTo(Job::class);\n }",
"public function setWorker($var)\n {\n GPBUtil::checkString($var, True);\n $this->worker = $var;\n\n return $this;\n }",
"public function getCampaignId()\n {\n return $this->campaign_id;\n }",
"public function job()\n\t{\n\t return $this->belongsTo(Job_applications::class);\n\t}",
"public function getWorker()\n {\n return $this->worker;\n }",
"public function getWorker()\n {\n return $this->worker;\n }",
"protected function getWorker()\n {\n return $this->worker;\n }",
"public function company()\n {\n return $this->belongsTo('App\\JobHunt\\Company');\n }",
"public function getCampaignID()\n {\n return $this->CampaignID;\n }",
"public function workers() {\n return $this->hasMany(Worker::class);\n }",
"public function job()\n {\n return $this->belongsTo('Job', 'job_id');\n }",
"public function getCampaign();",
"public function status(): BelongsTo\n {\n return $this->belongsTo(CampaignStatus::class);\n }",
"public function getWorker();",
"public function getWorker();",
"public function job() {\n return $this->belongsTo('App\\Models\\jobtitle','jobid');\n }",
"public function getCampaignId(): int\n {\n return $this->campaignId;\n }",
"public function setWorkerId($var)\n {\n GPBUtil::checkString($var, True);\n $this->worker_id = $var;\n\n return $this;\n }",
"public function fighter()\n {\n return $this->belongsTo('App\\Models\\Fighter');\n }",
"public function work()\n {\n return $this->belongsTo(Work::class, 'work_id');\n }",
"public function job(){\n return $this->belongsTo(ApprovedJob::class);\n }",
"public function thread(){\n return $this->belongsTo(Thread::class);\n }",
"public function thread()\n {\n return $this->belongsTo(Thread::class);\n }",
"public function thread()\n {\n return $this->belongsTo(Thread::class);\n }",
"public function assignee(): BelongsTo\n {\n return $this->belongsTo(User::class);\n }",
"public function getJob()\n {\n return $this->hasOne(Jobs::className(), ['job_id' => 'job_id']);\n }",
"public function jobPlacement(){\n return $this->hasOne(JobPlacement::class);\n }",
"public function player(): BelongsTo\n {\n return $this->belongsTo(Player::class);\n }",
"public function isCampaign(): bool\n {\n return $this->isCampaign;\n }",
"public function wrestler()\n {\n return $this->hasOne('Efed\\Models\\Wrestler', 'id', 'wrestler_id');\n }",
"public function companyStaffWorkEnd()\n {\n return $this->hasOne('App\\Models\\Ad3d\\CompanyStaffWorkEnd\\QcCompanyStaffWorkEnd', 'work_id', 'work_id');\n }",
"public function thread() {\n return $this->belongsTo('Thread');\n }",
"public function assignedTo()\n {\n return $this->belongsTo('App\\Models\\Company\\Company', 'assigned_to');\n }",
"public function getJob()\n {\n return $this->hasOne(Job::class, ['id' => 'job_id']);\n }",
"public function campaigns()\n {\n return $this->hasMany(Campaign::class);\n }",
"public function actingAsWorker()\n {\n $user = User::where('email', UserTableSeeder::WORKER_CREDENTIALS['email'])->firstOrFail();\n\n return $this->actingAs($user);\n }",
"public function jobCategory()\n {\n return $this->belongsTo(JobCategory::class,'job_category_id');\n }",
"public function assignWorker(Request $request)\n {\n $customer = User::findOrFail(request()->customer);\n $worker = User::findOrFail(request()->assign_worker);\n $customer->assignWorker($worker);\n return back();\n }",
"public function work()\n {\n return $this->hasMany('App\\Models\\Ad3d\\Work\\QcWork', 'work_id', 'companyStaffWork_id');\n }",
"public function campaing()\n {\n return $this->belongsTo('App\\Models\\Campaing');\n }",
"public function getCareerId()\n {\n return $this->careerId;\n }",
"public function getCareerId()\n {\n return $this->careerId;\n }",
"public function sender()\n {\n return $this->belongsTo('App\\Employee', 'sender');\n }",
"public function approvedJob(){\n return $this->belongsTo(ApprovedJob::class);\n }",
"public function jobs()\n {\n return $this->belongsTo('App\\Models\\Jobs','id');\n\t }",
"static function isWorker(User $u = null) {\n\t\tif($u === null) $u = User::load();\n\t\treturn $u->isWorker();\n\t}",
"public function getPeer()\n\t{\n\t\tif (self::$peer === null) {\n\t\t\tself::$peer = new CampaignPeer();\n\t\t}\n\t\treturn self::$peer;\n\t}",
"function apply_join_campaign(&$character, $campaign_id) {\n $campaign = new Campaign($campaign_id);\n if( ! $campaign->open ) {\n return \"Campaign \" . $campaign->cname . \" not open for registration!\";\n }\n\n if( $character->JoinCampaign($campaign_id, \"RJ\") ) {\n return \"Updated!\";\n }\n return \"Update Failed!\";\n }",
"public function journey()\n {\n return $this->belongsTo(Journey::class);\n }",
"public function assignee()\n {\n return $this->belongsTo('App\\User');\n }",
"public function receiver()\n {\n return $this->belongsTo('App\\Employee', 'receiver');\n }",
"public function getQueue()\n {\n \treturn \"campaign-{$this->campaign->id}-worker-{$this->id}\";\n }",
"public function show(Worker $worker)\n {\n return $worker;\n }",
"public function workers()\n {\n return $this->hasMany(Worker::class, 'station_id', 'id');\n }",
"public function getWorkerName()\n {\n return $this->work_name;\n }",
"public function __construct(Campaign $campaign)\n {\n $this->campaign = $campaign;\n }",
"public function __construct(Campaign $campaign)\n {\n $this->campaign = $campaign;\n }",
"public function __construct(Campaign $campaign)\n {\n $this->campaign = $campaign;\n }",
"public function setWorker(Worker $worker)\n {\n $this->worker = $worker;\n }",
"public function isCampaign(): bool\n {\n return $this->source_type === Campaign::class;\n }",
"public function createFirstCampaign()\n {\n if(!$this->campaigns()->count()) {\n $this->addCampaign();\n }\n }",
"public function confirmStaff()\n {\n return $this->belongsTo('App\\Models\\Ad3d\\Staff\\QcStaff', 'confirmStaff_id', 'staff_id');\n }",
"public function contest()\n {\n return $this->belongsTo(Contest::class, 'contest_id');\n }",
"public function childs() {\n return $this->hasMany(Worker::class,'parent_id','id') ;\n }",
"public static function find($workerId)\n\t{\n\t\tif (!self::exists($workerId) || false === strpos($workerId, \":\")) {\n\t\t\treturn false;\n\t\t}\n\n\t\tlist($hostname, $pid, $queues) = explode(':', $workerId, 3);\n\t\t$queues = explode(',', $queues);\n\t\t$worker = new self($queues);\n\t\t$worker->setId($workerId);\n\t\treturn $worker;\n\t}",
"public function fetchCampaign() {\n return $this->QueryAPI(\"current_user/campaigns?include=rewards,creator,goals\");\n }",
"public function business()\n {\n return $this->belongsTo(BusinessPartner::class);\n }",
"public function userWorkboardAccess()\n {\n return $this->belongsTo(UserWorkboardAccess::class);\n }",
"public function lead()\n {\n // on this one doesnt have to mention the lead_id because inside reminder database already store the name lead_id so the lead already know the connection\n return $this->belongsTo(Lead::class);\n }",
"public function workers()\n {\n return $this->belongsToMany(\"App\\User\")\n ->where(\"owner_id\", Auth::id());\n }",
"protected function _getWorker($type)\n {\n /** @var BL_CustomGrid_Helper_Worker $helper */\n $helper = Mage::helper('customgrid/worker');\n return $helper->getModelWorker($this, $type);\n }",
"public function champion(): BelongsTo\n {\n return $this->belongsTo(PsChampion::class);\n }",
"public function champion(): BelongsTo\n {\n return $this->belongsTo(PsChampion::class);\n }",
"public function building()\n {\n return $this->belongsToOne('App\\Building');\n }",
"public function getCampaigns()\n {\n return $this->hasMany('App\\Models\\Campaign', 'creator_id', 'id');\n }",
"public function company(): BelongsTo\n {\n return $this->belongsTo(Company::class);\n }",
"public function company(): BelongsTo\n {\n return $this->belongsTo(Company::class);\n }",
"public function company(): BelongsTo\n {\n return $this->belongsTo(Company::class);\n }",
"public function criterion() // phpcs:ignore\n {\n return $this->belongsTo(Criteria::class, 'criterion_id');\n }",
"public function confinedSaveOneWorker() \n\t\t{\t\t\t\t\t\t\t\n\t\t\t\t$data = array(\n\t\t\t\t\t'fk_id_job_confined' => $this->input->post('hddIdConfined'),\n\t\t\t\t\t'fk_id_user' => $this->input->post('worker')\n\t\t\t\t);\t\t\t\n\n\t\t\t\t$query = $this->db->insert('job_confined_workers', $data);\n\n\t\t\t\tif ($query) {\n\t\t\t\t\treturn true;\n\t\t\t\t} else {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t}",
"public function commenter()\n {\n return $this->belongsTo(config('comments.models.commenter'));\n }",
"public function jobId()\n {\n return $this->belongsTo(Job::class, 'job_id');\n }",
"public function tournament(){\n return $this->belongsTo('App\\Tournament');\n }",
"public function workTime()\n {\n return $this->belongsTo(WorkTime::class);\n }",
"public function business()\n {\n return $this->belongsTo(Business::class);\n }"
]
| [
"0.65387154",
"0.6108218",
"0.60383123",
"0.60122",
"0.5724815",
"0.56726897",
"0.5635027",
"0.5635027",
"0.5635027",
"0.5495979",
"0.5459068",
"0.54579353",
"0.54402035",
"0.54402035",
"0.54402035",
"0.5351424",
"0.53121",
"0.52265584",
"0.52209634",
"0.52209634",
"0.520559",
"0.5201105",
"0.51495343",
"0.5137535",
"0.5118746",
"0.5103362",
"0.5085762",
"0.50384426",
"0.50384426",
"0.5031364",
"0.50222605",
"0.49711463",
"0.49532884",
"0.49399203",
"0.4921875",
"0.48917228",
"0.48610246",
"0.48610246",
"0.48542285",
"0.4803958",
"0.4798806",
"0.47647518",
"0.47526586",
"0.47519392",
"0.47489986",
"0.47320402",
"0.47307882",
"0.47121692",
"0.4686837",
"0.4681444",
"0.46436465",
"0.46367085",
"0.46366873",
"0.46293843",
"0.46272787",
"0.46272787",
"0.46114695",
"0.46074837",
"0.45927384",
"0.4582597",
"0.45806772",
"0.457087",
"0.45651618",
"0.45621368",
"0.4552496",
"0.4552351",
"0.454726",
"0.45416498",
"0.4526758",
"0.45262545",
"0.45262545",
"0.45262545",
"0.4524286",
"0.45215783",
"0.45150605",
"0.45131552",
"0.45034212",
"0.4497835",
"0.44977605",
"0.44976583",
"0.44965938",
"0.44946635",
"0.44911626",
"0.44800642",
"0.44795728",
"0.44737777",
"0.44737777",
"0.44623622",
"0.4456706",
"0.4455568",
"0.4455568",
"0.4455568",
"0.44464082",
"0.44439465",
"0.44410568",
"0.44396186",
"0.4437628",
"0.4435826",
"0.44329187"
]
| 0.6178531 | 2 |
Calculates DC operating point | static public function dcop($circuit)
{
if (!count($circuit->elements))
{
throw new \Exception('Circuit does not contain elements');
}
$circuit->prepare();
$circuit->solve();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getDiscCalc() {\n return $this->_discCalc;\n }",
"private function getCurrentDewPoint() {\n $t = $this->getCurrentTemp();\n $h = $this->getCurrentHumidity();\n\n return $t - (100 - $h) / 5;\n }",
"public function calc($x, $y);",
"public function calculVa() {\n\n return ($this->cp + $this->cb) / $this->nbta;\n }",
"public function calcArea(){\n\t\treturn $this -> radius * $this -> radius * pi();\n\t}",
"function dept_projected_margin($dept){\n\tglobal $sql;\n\t$prodQ = \"select p.normal_price,q.cost from products as p\n\t\t left join prodExtra as q on p.upc = q.upc\n\t\t where p.department = $dept and q.cost <> 0\";\n\t$prodR = $sql->query($prodQ);\n\n\t$count = 0;\n\t$margin = 0;\n\twhile ($prodW = $sql->fetch_array($prodR)){\n\t\t$margin += margin($prodW[0],$prodW[1]);\n\t\t$count++;\n\t}\n\n\treturn $margin / $count;\n}",
"function degree_to_compass_point($d){\r\n $dp = $d + 11.25;\r\n $dp = $dp % 360;\r\n $dp = floor($dp / 22.5) ;\r\n $points = array(\"N\",\"NNE\",\"NE\",\"ENE\",\"E\",\"ESE\",\"SE\",\"SSE\",\"S\",\"SSW\",\"SW\",\"WSW\",\"W\",\"WNW\",\"NW\",\"NNW\",\"N\");\r\n $dir = $points[$dp];\r\n return $dir;\r\n }",
"public function getTotalPoint():?int\n {\n return $this->getPointProd1()+$this->getPointProd2()+$this->getPointProd3()+$this->getPointProd4();\n }",
"function area() { return ($this->max->x() - $this->min->x()) * ($this->max->y() - $this->min->y()); }",
"public function calculAc() {\n\n return $this->va * (1 + ($this->nbta - $this->nbad) / $this->nbta);\n }",
"public function getCoCentroDato()\n\t{\n\t\treturn $this->co_centro_dato;\n\t}",
"public function trace() : float\n {\n return $this->diagonalAsVector()->sum();\n }",
"function solution($X, $Y, $D) {\n // Find total distance (destination - origin) and divide by step size (and round up)\n return (int) ceil(($Y - $X) / $D);\n}",
"function getdistance_new($vehicleid, $customerno) {\n $dm = new DeviceManager($customerno);\n $odo_reading = $dm->get_odometer_reading($vehicleid, $customerno);\n $firstodometer = $odo_reading['first_odo'];\n $lastodometer = $odo_reading['cur_odo'];\n if ($lastodometer < $firstodometer) {\n $lastodometer = $odo_reading['max_odo'] + $lastodometer;\n }\n $totaldistance = $lastodometer - $firstodometer;\n if (round($totaldistance) != 0) {\n return round(($totaldistance / 1000), 2);\n }\n return $totaldistance;\n}",
"function DrawDot($x,$y) //center x y\n\t\t{\n\t\t $op = 'B'; // draw Filled Dots\n\t\t //F == fill //S == stroke //B == stroke and fill \n\t\t $r = 0.5 * $this->k; //raio\n\t\t \n\t\t //Start Point\n\t\t $x1 = $x - $r;\n\t\t $y1 = $y;\n\t\t //End Point\n\t\t $x2 = $x + $r;\n\t\t $y2 = $y;\n\t\t //Auxiliar Point\n\t\t $x3 = $x;\n\t\t $y3 = $y + (2*$r);// 2*raio to make a round (not oval) shape \n\n\t\t //Round join and cap\n\t\t $s=\"\\n\".'1 J'.\"\\n\";\n\t\t $s.='1 j'.\"\\n\";\n\n\t\t //Upper circle\n\t\t $s.=sprintf('%.3f %.3f m'.\"\\n\",$x1,$y1); //x y start drawing\n\t\t $s.=sprintf('%.3f %.3f %.3f %.3f %.3f %.3f c'.\"\\n\",$x1,$y1,$x3,$y3,$x2,$y2);//Bezier curve\n\t\t //Lower circle\n\t\t $y3 = $y - (2*$r);\n\t\t $s.=sprintf(\"\\n\".'%.3f %.3f m'.\"\\n\",$x1,$y1); //x y start drawing\n\t\t $s.=sprintf('%.3f %.3f %.3f %.3f %.3f %.3f c'.\"\\n\",$x1,$y1,$x3,$y3,$x2,$y2);\n\t\t $s.=$op.\"\\n\"; //stroke and fill\n\n\t\t //Draw in PDF file\n\t\t $this->_out($s);\n\t\t}",
"function get_drag_at_v($v) { \r\n\tglobal $kr,$mw,$mw_zu,$cw,$proj_A,$steig; # Annahme Luftdichte: 1.2051 bar\r\n $F_w=(($kr*($mw+$mw_zu)*9.81)+((9.810463*(10**-11))*(($v/3.6)**5)))+($cw*$proj_A*1.2051/2*(($v/3.6)**2))+(($mw+$mw_zu)*9.81*$steig/100);\r\n return $F_w;\r\n}",
"public function getArea(): float\n {\n return bcdiv(bcmul(sqrt(3), pow($this->side, 2), $this->scale), 4, $this->scale);\n }",
"public function getDeviation(): float\n {\n return $this->deviation;\n }",
"function area_check_center($x, $y){\n\t\t\t$part1 = pow($x, 2) * ( asin($y/$x) - (1/2) * sin(2 * asin( $y/$x )));// Area of the segment of the larger circle\n\t\t\t$part2 = (1/2) * pi() * pow($y, 2);// Area of the smaller semi-circle\n\t\t\treturn $part1 + $part2;\n\t\t}",
"public function getCaretSlopeRise() {}",
"abstract protected function calcular($x, $y);",
"public function getDW() {}",
"function inverse_ncdf($p) \n{\n\n //Coefficients in rational approximations\n $a = array(1 => -3.969683028665376e+01, 2 => 2.209460984245205e+02,\n \t\t\t 3 => -2.759285104469687e+02, 4 => 1.383577518672690e+02,\n \t\t\t 5 => -3.066479806614716e+01, 6 => 2.506628277459239e+00);\n\n $b = array(1 => -5.447609879822406e+01, 2 => 1.615858368580409e+02,\n \t\t 3 => -1.556989798598866e+02, 4 => 6.680131188771972e+01,\n \t\t\t 5 => -1.328068155288572e+01);\n\n $c = array(1 => -7.784894002430293e-03, 2 => -3.223964580411365e-01,\n \t \t\t\t 3 => -2.400758277161838e+00, 4 => -2.549732539343734e+00,\n \t\t\t 5 => 4.374664141464968e+00, 6 => 2.938163982698783e+00);\n\n $d = array(1 => 7.784695709041462e-03, 2 => 3.224671290700398e-01,\n \t \t\t\t 3 => 2.445134137142996e+00, 4 => 3.754408661907416e+00);\n\n //Define break-points.\n $p_low = 0.02425;\t\t\t\t\t\t\t\t //Use lower region approx. below this\n $p_high = 1 - $p_low;\t\t\t\t\t\t\t\t //Use upper region approx. above this\n\n //Define/list variables (doesn't really need a definition)\n //$p (probability), $sigma (std. deviation), and $mu (mean) are user inputs\n $q = NULL; $x = NULL; $y = NULL; $r = NULL;\n\n //Rational approximation for lower region.\n if (0 < $p && $p < $p_low) \n {\n $q = sqrt(-2 * log($p));\n $x = ((((($c[1] * $q + $c[2]) * $q + $c[3]) * $q + $c[4]) * $q + $c[5]) *\n \t \t \t $q + $c[6]) / (((($d[1] * $q + $d[2]) * $q + $d[3]) * $q + $d[4]) *\n \t \t\t $q + 1);\n }\n\n //Rational approximation for central region.\n elseif ($p_low <= $p && $p <= $p_high) \n {\n $q = $p - 0.5;\n $r = $q * $q;\n $x = ((((($a[1] * $r + $a[2]) * $r + $a[3]) * $r + $a[4]) * $r + $a[5]) *\n \t \t \t $r + $a[6]) * $q / ((((($b[1] * $r + $b[2]) * $r + $b[3]) * $r +\n \t \t\t $b[4]) * $r + $b[5]) * $r + 1);\n }\n\n //Rational approximation for upper region.\n elseif ($p_high < $p && $p < 1)\n {\n $q = sqrt(-2 * log(1 - $p));\n $x = -((((($c[1] * $q + $c[2]) * $q + $c[3]) * $q + $c[4]) * $q +\n \t \t \t $c[5]) * $q + $c[6]) / (((($d[1] * $q + $d[2]) * $q + $d[3]) *\n \t \t\t $q + $d[4]) * $q + 1);\n }\n\n //If 0 < p < 1, return a null value\n else \n {\n \t$x = NULL;\n }\n\n return $x;\n //END inverse ncdf implementation.\n}",
"public function getWindDirUnit() {\n return $this->cWindDirUnit;\n }",
"public function getWindSpeed();",
"public function getDpr() : float\n\t{\n\t\treturn !is_numeric($this->dpr) || ($this->dpr < 0 || $this->dpr > 8) ? 1.0 : (float) $this->dpr;\n\t}",
"function sub_projected_margin($sub){\n\t$prodQ = \"select p.normal_price,q.cost from products as p\n\t\t left join prodExtra as q on p.upc = q.upc\n\t\t left join departments as d on p.department = d.dept_no\n\t\t left join MasterSuperDepts AS s ON d.dept_no=s.dept_ID\n\t\t where s.superID = $sub and q.cost <> 0\";\n\t$prodR = $sql->query($prodQ);\n\n\t$count = 0;\n\t$margin = 0;\n\twhile ($prodW = $sql->fetch_array($prodR)){\n\t\t$margin += margin($prodW[0],$prodW[1]);\n\t\t$count++;\n\t}\n\n\treturn $margin / $count;\n}",
"public function getStdShipToCd()\n {\n return $this->std_ship_to_cd;\n }",
"public function area() : float {}",
"public function getDepartmentDirectorDiscountFactor()\n {\n return isset($this->DepartmentDirectorDiscountFactor) ? $this->DepartmentDirectorDiscountFactor : null;\n }",
"public function getCoDivision()\n\t{\n\t\treturn $this->co_division;\n\t}",
"public function getD()\n {\n return $this->D;\n }",
"public function getOperatingCentre()\n {\n return $this->operatingCentre;\n }",
"public function calculateDistance(Point $from, Point $to): float;",
"public function calculateDiscount(array $order): float;",
"private function getDozingLength(): int\n {\n if ($this->fenceHeight < 1750) {\n return $this->sleepThreshold * $this->fenceHeight;\n }\n return -1;\n }",
"public function getIndemniteCp(): ?float {\n return $this->indemniteCp;\n }",
"function calculateCADLFX($day, array $data) {\n if (!is_int($day)) throw new IllegalTypeException('Illegal type of parameter $day: '.getType($day));\n $shortDate = gmDate('D, d-M-Y', $day);\n\n global $verbose;\n if ($verbose > 1) echoPre('[Info] CADLFX '.$shortDate);\n\n $AUDUSD = $data['AUDUSD']['bars'];\n $EURUSD = $data['EURUSD']['bars'];\n $GBPUSD = $data['GBPUSD']['bars'];\n $USDCAD = $data['USDCAD']['bars'];\n $USDCHF = $data['USDCHF']['bars'];\n $USDJPY = $data['USDJPY']['bars'];\n $index = [];\n\n foreach ($AUDUSD as $i => $bar) {\n $audusd = $AUDUSD[$i]['open'];\n $eurusd = $EURUSD[$i]['open'];\n $gbpusd = $GBPUSD[$i]['open'];\n $usdcad = $USDCAD[$i]['open'];\n $usdchf = $USDCHF[$i]['open'];\n $usdjpy = $USDJPY[$i]['open'];\n $open = pow(($usdcad/$audusd) * ($usdchf/$eurusd) * ($usdjpy/$gbpusd) * 100, 1/7) / $usdcad * 100000;\n $iOpen = (int) round($open * 100000);\n\n $audusd = $AUDUSD[$i]['close'];\n $eurusd = $EURUSD[$i]['close'];\n $gbpusd = $GBPUSD[$i]['close'];\n $usdcad = $USDCAD[$i]['close'];\n $usdchf = $USDCHF[$i]['close'];\n $usdjpy = $USDJPY[$i]['close'];\n $close = pow(($usdcad/$audusd) * ($usdchf/$eurusd) * ($usdjpy/$gbpusd) * 100, 1/7) / $usdcad * 100000;\n $iClose = (int) round($close * 100000);\n\n $index[$i]['time' ] = $bar['time'];\n $index[$i]['open' ] = $iOpen;\n $index[$i]['high' ] = $iOpen > $iClose ? $iOpen : $iClose; // min()/max() ist nicht performant\n $index[$i]['low' ] = $iOpen < $iClose ? $iOpen : $iClose;\n $index[$i]['close'] = $iClose;\n $index[$i]['ticks'] = $iOpen==$iClose ? 1 : (abs($iOpen-$iClose) << 1);\n }\n return $index;\n}",
"function dept_realized_margin($dept,$month=0,$year=0){\n\tglobal $sql;\n\tif ($month == 0)\n\t\t$month = date(\"m\");\n\tif ($year == 0)\n\t\t$year = date(\"Y\");\n\n\t$counts = select_counts($month,$year);\n\n\t$countQ = \"select p.normal_price,q.cost,c.count from\n\t\t products as p left join prodExtra as q\n\t\t on p.upc = q.upc left join $counts as c\n\t\t on p.upc = c.upc\n\t\t where c.department = $dept\n\t\t and q.cost <> 0 order by c.count desc\";\n\t$countR = $sql->query($countQ);\n\n\t$num = 0;\n\t$denom = 0;\t\n\n\twhile($countW = $sql->fetch_array($countR)){\n\t\t$num += $countW[2] * margin($countW[0],$countW[1]);\n\t\t$denom += $countW[2];\n\t}\n\n\treturn $num / $denom;\n}",
"public function getES()\n {\n // Calculate from a and b, if b has been supplied.\n if (isset($this->b)) {\n $a2 = $this->a * $this->a;\n $b = $this->b;\n $b2 = $this->b * $this->b;\n\n return ($a2 - $b2) / $a2;\n } else {\n // Otherwise use f.\n // FIXME: F will be infinite for a sphere. Can we use RF?\n $f = $this->getF();\n\n return (2 * $f) - ($f * $f);\n }\n }",
"private function rayTraceDistanceToBoundary(float $s, float $ds) : float{\n\t\tif($ds == 0){\n\t\t\treturn INF;\n\t\t}\n\n\t\tif($ds < 0){\n\t\t\t$s = -$s;\n\t\t\t$ds = -$ds;\n\n\t\t\tif(floor($s) == $s){ //exactly at coordinate, will leave the coordinate immediately by moving negatively\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t}\n\n\t\t// problem is now s+t*ds = 1\n\t\treturn (1 - ($s - floor($s))) / $ds;\n\t}",
"function epsilon_mean ($JD) {\n\n// -----------------------------------------------------------\n// Compute the (t) value in Julian decamillennia corresponding\n// to the JD argument and reckoned from J2000.\n $t = ($JD - 2451545.0) / 3652500.0;\n\n// --------------------------------------\n// Compute mean obliquity in arc seconds.\n $w = 84381.448; $p = $t;\n $w -= 4680.93*$p; $p *= $t;\n $w -= 1.55*$p; $p *= $t;\n $w += 1999.25*$p; $p *= $t;\n $w -= 51.38*$p; $p *= $t;\n $w -= 249.67*$p; $p *= $t;\n $w -= 39.05*$p; $p *= $t;\n $w += 7.12*$p; $p *= $t;\n $w += 27.87*$p; $p *= $t;\n $w += 5.79*$p; $p *= $t;\n $w += 2.45*$p;\n\n// -----------------------\n// Compute mean ecliptic obliquity in\n// degrees from arc seconds value.\n $EpsMeanDeg = $w / 3600.0;\n\n return $EpsMeanDeg;\n\n}",
"function distanciaNGD($fx, $fy, $fxy, $N) {\n\t$ngd = (max(log($fx), log($fy)) - log($fxy)) / (log($N) - min(log($fx), log($fy)));\n\treturn $ngd;\n}",
"public function getVolume(){ // calcolo il volume del cubo che è area del quadrato * lato (lato * lato * lato)\n return parent::getArea() * $this -> side; \n }",
"function areaofacircle($radius){\r\n$pie = 3.142;\r\n $area = $pie * $radius * $radius;\r\n return $area;\r\n}",
"function warp1($c)\n{\n if($c > 10.3148)\n {\n return pow((561 + 40*$c)/10761, 2.4);\n }\n else\n {\n return $c / 3294.6;\n }\n}",
"public function getPointProd4():?int\n { \n return $this->produit4 <= 0 ? 0 : $this->produit4 * 35;\n }",
"public static function geoDistanceGC(Application\\Model\\Waypoint_Coordinate $c1, Application\\Model\\Waypoint_Coordinate $c2) {\n // Perform the formula and return the value\n return acos(\n ( sin($c1->lat->getAsRad()) * sin($c2->lat->getAsRad()) ) +\n ( cos($c1->lat->getAsRad()) * cos($c2->lat->getAsRad()) * cos($c2->lon->getAsRad() - $c1->lon->getAsRad()) )\n ) * self::EARTH_R;\n }",
"function getpoints2($data) {\r\n\t$a = $data[2]; //left - r0\r\n\t$b = $data[0]; //top - r1\r\n\t$c = $data[4]; //diagR - D\r\n\t$d = $data[3]; //right\r\n\t$e = $data[1]; //bottom\r\n\t$f = $data[5]; //diagL\r\n\t\r\n\t// Use Area and Hero's formula locate right corner coordinates\r\n\t$s = ($c + $d + $e)/2; \r\n\t$area = @bcsqrt(bcmul(bcmul($s,($s-$c)),bcmul(($s-$d),($s-$e)))); // Hero's formula\r\n\t$y1 = bcdiv(bcmul(2,$area),$e); // c\r\n\t$x1 = bcsqrt(bcsub(bcpow($c,2), bcpow($y1,2))); // d\r\n\t\r\n\t// Use http://www.ambrsoft.com/TrigoCalc/Circles2/Circle2.htm for top left coord.\r\n\t$delta = @bcmul(1/2,bcsqrt(bcmul(bcmul(($c+$a+$b),($c+$a-$b)),bcmul(($c-$a+$b),(-$c+$a+$b)))));\r\n\t$a2mb2 = bcsub(bcpow($a,2),bcpow($b,2)); // a^2 minus b^2\r\n\t$c2 = bcpow($c,2); // c^2\r\n\t$y0 = bcadd(bcadd(bcdiv($y1,2) , bcdiv(bcmul($y1,$a2mb2), bcmul(2,$c2))) , bcdiv(bcmul($delta,$x1),($c2)));\r\n\t$x0 = bcsub(bcadd(bcdiv($x1,2) , bcdiv(bcmul($x1,$a2mb2), bcmul(2,$c2))) , bcdiv(bcmul($delta,$y1),($c2)));\r\n\t\r\n\t$points = array(\r\n array(0,0),\r\n array($e,0),\r\n array($x1,$y1), \r\n array($x0,$y0) \r\n\t);\r\n\t\r\n\treturn $points;\r\n}",
"public function calcMediumPoint()\n {\n $lat=0;\n $lng=0;\n $i=0;\n \n if($this->len()==0)\n {\n return false;\n }\n \n foreach ($this->list as $point)\n {\n $i++;\n $angles=$point->getAngleCoordinates();\n $lat+=$angles['lat'];\n $lng+=$angles['lng'];\n }\n \n \n $point=new Point($lat/$i, $lng/$i);\n return $point;\n }",
"public function calculateSellingPriceCoefficient(): float\n {\n $currentDate = Carbon::today();\n $dueDate = Carbon::createFromFormat('Y-m-d', $this->due_on->format('Y-m-d'));\n $remainingDays = $currentDate->diffInDays($dueDate, false);\n return $remainingDays <= self::DAYS_TO_DUE ? self::MIN_COEFFICIENT : self::MAX_COEFFICIENT;\n }",
"private function inverse_ncdf($p)\n {\n $a = array(1 => -3.969683028665376e+01, 2 => 2.209460984245205e+02,\n 3 => -2.759285104469687e+02, 4 => 1.383577518672690e+02,\n 5 => -3.066479806614716e+01, 6 => 2.506628277459239e+00);\n\n $b = array(1 => -5.447609879822406e+01, 2 => 1.615858368580409e+02,\n 3 => -1.556989798598866e+02, 4 => 6.680131188771972e+01,\n 5 => -1.328068155288572e+01);\n\n $c = array(1 => -7.784894002430293e-03, 2 => -3.223964580411365e-01,\n 3 => -2.400758277161838e+00, 4 => -2.549732539343734e+00,\n 5 => 4.374664141464968e+00, 6 => 2.938163982698783e+00);\n\n $d = array(1 => 7.784695709041462e-03, 2 => 3.224671290700398e-01,\n 3 => 2.445134137142996e+00, 4 => 3.754408661907416e+00);\n\n $p_low = 0.02425;\n $p_high = 1 - $p_low;\n\n $q = NULL; $x = NULL; $y = NULL; $r = NULL;\n\n if (0 < $p && $p < $p_low)\n {\n $q = sqrt(-2 * log($p));\n $x = ((((($c[1] * $q + $c[2]) * $q + $c[3]) * $q + $c[4]) * $q + $c[5]) *\n $q + $c[6]) / (((($d[1] * $q + $d[2]) * $q + $d[3]) * $q + $d[4]) *\n $q + 1);\n }\n elseif ($p_low <= $p && $p <= $p_high)\n {\n $q = $p - 0.5;\n $r = $q * $q;\n $x = ((((($a[1] * $r + $a[2]) * $r + $a[3]) * $r + $a[4]) * $r + $a[5]) *\n $r + $a[6]) * $q / ((((($b[1] * $r + $b[2]) * $r + $b[3]) * $r +\n $b[4]) * $r + $b[5]) * $r + 1);\n }\n elseif ($p_high < $p && $p < 1)\n {\n $q = sqrt(-2 * log(1 - $p));\n $x = -((((($c[1] * $q + $c[2]) * $q + $c[3]) * $q + $c[4]) * $q +\n $c[5]) * $q + $c[6]) / (((($d[1] * $q + $d[2]) * $q + $d[3]) *\n $q + $d[4]) * $q + 1);\n }\n else {\n $x = NULL;\n }\n\n return $x;\n }",
"public function getVolCur(): float\n {\n return $this->volCur;\n }",
"public function GetXEnd(){\n return $this->w-$this->rMargin;\n }",
"public function getPDif()\n {\n return $this->pDif;\n }",
"public function getSolde(): float\n {\n return $this->solde;\n }",
"static public function VDOTfactorOfBasicEndurance($distance) {\r\n\t\t$PrognosisDaniels = new RunningPrognosisDaniels;\r\n\t\t$PrognosisDaniels->setBasicEnduranceForAdjustment( BasicEndurance::getConst() );\r\n\r\n\t\treturn $PrognosisDaniels->getAdjustmentFactor($distance);\r\n\t}",
"function e4fn( $x ) {\r\n #$con;\r\n #$com;\r\n $con = 1.0 + $x;\r\n $com = 1.0 - $x;\r\n return (sqrt( (pow( $con, $con )) * (pow( $com, $com )) ));\r\n}",
"private function calculatePoints()\n {\n $this->points += 100;\n $this->points = $this->points < 0 ? 0 : $this->points;\n }",
"public function writeCpoint($x='0', $y='0', $z='0') {\n$this->startElement('CartesianPoint');\n$this->writeElement('Coordinate', $x);\n$this->writeElement('Coordinate', $y);\n$this->writeElement('Coordinate', $z);\n$this->endElement();\n\t}",
"public function getDod();",
"function findSlope ($p1, $p2) {\n $lng = $p1->lng - $p2->lng;\n if ($lng != 0) {\n return ($p1->lat - $p2->lat)/$lng;\n }\n return \"vertical\";\n }",
"public function getArea() {\r\n return $this -> lato * $this -> lato ;\r\n }",
"public function getInputWindDirUnit() {\n return $this->cInputWindDirUnit;\n }",
"function calculDelta($a, $b, $c){\n $a = $_POST['fname'];\n $b = $_POST['sname'];\n $c = $_POST['lname'];\n $delta = pow($b, 2) - 4*$a*$c;\n\n return $delta;\n}",
"function inverse_ncdf($p)\n{\n\n //Inverse ncdf approximation by Peter John Acklam, implementation adapted to\n //PHP by Michael Nickerson, using Dr. Thomas Ziegler's C implementation as\n //a guide.\thttp://home.online.no/~pjacklam/notes/invnorm/index.html\n //I have not checked the accuracy of this implementation.\tBe aware that PHP\n //will truncate the coeficcients to 14 digits.\n\n //You have permission to use and distribute this function freely for\n //whatever purpose you want, but please show common courtesy and give credit\n //where credit is due.\n\n //Input paramater is $p - probability - where 0 < p < 1.\n\n //Coefficients in rational approximations\n $a = [1 => -3.969683028665376e+01, 2 => 2.209460984245205e+02,\n 3 => -2.759285104469687e+02, 4 => 1.383577518672690e+02,\n 5 => -3.066479806614716e+01, 6 => 2.506628277459239e+00];\n\n $b = [1 => -5.447609879822406e+01, 2 => 1.615858368580409e+02,\n 3 => -1.556989798598866e+02, 4 => 6.680131188771972e+01,\n 5 => -1.328068155288572e+01];\n\n $c = [1 => -7.784894002430293e-03, 2 => -3.223964580411365e-01,\n 3 => -2.400758277161838e+00, 4 => -2.549732539343734e+00,\n 5 => 4.374664141464968e+00, 6 => 2.938163982698783e+00];\n\n $d = [1 => 7.784695709041462e-03, 2 => 3.224671290700398e-01,\n 3 => 2.445134137142996e+00, 4 => 3.754408661907416e+00];\n\n //Define break-points.\n $p_low = 0.02425; //Use lower region approx. below this\n $p_high = 1 - $p_low; //Use upper region approx. above this\n\n //Define/list variables (doesn't really need a definition)\n //$p (probability), $sigma (std. deviation), and $mu (mean) are user inputs\n $q = null;\n $x = null;\n $y = null;\n $r = null;\n\n //Rational approximation for lower region.\n if (0 < $p && $p < $p_low) {\n $q = sqrt(-2 * log($p));\n $x = ((((($c[1] * $q + $c[2]) * $q + $c[3]) * $q + $c[4]) * $q + $c[5]) *\n $q + $c[6]) / (((($d[1] * $q + $d[2]) * $q + $d[3]) * $q + $d[4]) *\n $q + 1);\n } //Rational approximation for central region.\n elseif ($p_low <= $p && $p <= $p_high) {\n $q = $p - 0.5;\n $r = $q * $q;\n $x = ((((($a[1] * $r + $a[2]) * $r + $a[3]) * $r + $a[4]) * $r + $a[5]) *\n $r + $a[6]) * $q / ((((($b[1] * $r + $b[2]) * $r + $b[3]) * $r +\n $b[4]) * $r + $b[5]) * $r + 1);\n } //Rational approximation for upper region.\n elseif ($p_high < $p && $p < 1) {\n $q = sqrt(-2 * log(1 - $p));\n $x = -((((($c[1] * $q + $c[2]) * $q + $c[3]) * $q + $c[4]) * $q +\n $c[5]) * $q + $c[6]) / (((($d[1] * $q + $d[2]) * $q + $d[3]) *\n $q + $d[4]) * $q + 1);\n } //If 0 < p < 1, return a null value\n else {\n $x = null;\n }\n\n return $x;\n //END inverse ncdf implementation.\n}",
"public function calculateDiscount(): ?float;",
"abstract public function calculateCropBoxCoordinates();",
"function SDpointsForGame ( $moves ) {\n\t//Output: A number between 0 -> 1 of how suspicious that game is\n\n\tglobal $SD_CONST_TRESHOLD, $SD_CONST_ADJ;\n\n\t$deviation = SDdeviation( $moves );\n\t$output = 0;\n\n\tif( $deviation < $SD_CONST_TRESHOLD ){\n\t\t/*\n\t\t\t\t\t| Threshold - Deviation |\n\t\toutput = \t|---------------------------------|\n\t\t\t\t\t| Threshold - Adjustment Variable |\n\n\t\tBasically takes the diviation over mean and returns a scaled value between 0 -> 1\n\n\t\t*/\n\t\t$adjustment = SDrange( SDmean( $moves ) );\n\t\t$output = pow( ( $SD_CONST_TRESHOLD - $deviation ) / ( $SD_CONST_TRESHOLD - $adjustment ), 2 );\n\t\t//echo \"$output = $SD_CONST_TRESHOLD - $deviation / $SD_CONST_TRESHOLD - $adjustment \\n\";\n\t}\n\n\treturn ( $output > 1 ) ? 1 : $output;\n}",
"public function getDistance();",
"public function getLowerOpticalPointSize() {}",
"function getDistance($coord1,$coord2) {\r\n\t$x=($coord1['x']-$coord2['x'])*($coord1['x']-$coord2['x']);\r\n\t$y=($coord1['y']-$coord2['y'])*($coord1['y']-$coord2['y']);\r\n\treturn sqrt($x+$y);\r\n}",
"function getDelta($open, $close){\n return $open - $close;\n}",
"public function dotProduct(Point $otherPoint): float {\n return $this->x * $otherPoint->getX() + $this->y * $otherPoint->getY();\n }",
"public function calcSnowAvg() {\n\t\t$min = $this->snow['base'];\n\t\t$max = $this->snow['upperbase'];\n\t\treturn ($min + $max)/2;\n\t}",
"public function getDrawPoints() : int {\n\t\treturn $this->drawPoints;\n\t}",
"public function getD() {}",
"public function getGradient();",
"public function getCenterOfArea() {\r\n\t\t/* PROTECTED REGION ID(php.implementation._14_0_b6f02e1_1211871307421_631477_281__16_0_b6f02e1_1249464477484_822826_834) ENABLED START */\r\n\t\treturn new Form_Point($this->_center->x, $this->_center->y);\r\n\t\t/* PROTECTED REGION END */\r\n\t}",
"protected function giveCost()\n\t{\n\t\t$solarSaving = 2;\n\t\t$this->valueNow = 210.54 / $solarSaving;\n\t\treturn $this->valueNow;\n\t}",
"public function calculateDistance()\n {\n echo 'distance is 3km.',\"\\n\";\n }",
"function margin($price,$cost){\n\treturn ( ($price - $cost) / $cost ) * 100;\n}",
"public function getTotalDiscount(): float;",
"function evclid($name1, $name2, $film1, $film2, $t)\n{\n $res = sqrt( \n\tpow($t->$name1->$film1 - $t->$name2->$film1,2 )\n\t+ pow ($t->$name1->$film2 - $t->$name2->$film2,2)\n );\n\n #return 1/(1+$res);\n return $res;\n}",
"function _stepX()\n {\n return ($this->_maximumX - $this->_minimumX) / $this->_count();\n }",
"public function getPerimeter(): float\n {\n return bcmul($this->side, 3, $this->scale);\n }",
"public function fitness(): float\n {\n return 6 * $this->x - $this->x * $this->x + 4 * $this->y - $this->y * $this->y;\n }",
"public function getPropagationCollegamentiArea() {\n return $this->_propagationCollegamenti; \n }",
"public function getMagnitude(): float {\n return sqrt($this->x ** 2 + $this->y ** 2);\n }",
"function Calculate($dblLat1, $dblLong1, $dblLat2, $dblLong2) {\n $EARTH_RADIUS_MILES = 3963;\n $dist = 0;\n //convert degrees to radians\n $dblLat1 = $dblLat1 * M_PI / 180;\n $dblLong1 = $dblLong1 * M_PI / 180;\n $dblLat2 = $dblLat2 * M_PI / 180;\n $dblLong2 = $dblLong2 * M_PI / 180;\n if ($dblLat1 != $dblLat2 || $dblLong1 != $dblLong2) {\n //the two points are not the same\n $dist = sin($dblLat1) * sin($dblLat2) + cos($dblLat1) * cos($dblLat2) * cos($dblLong2 - $dblLong1);\n $dist = $EARTH_RADIUS_MILES * (-1 * atan($dist / sqrt(1 - $dist * $dist)) + M_PI / 2);\n }\n return $dist;\n }",
"public function center()\n {\n return new Point(($this->north + $this->south) / 2, ($this->east + $this->west) / 2);\n }",
"Function CalculateSalesPriceWithMargin($int_productID,\r\n $int_number_of_units,\r\n $flt_margin,\r\n $str_start_date = FALSE,\r\n $int_currency_id = DB_CURRENCY_DEFAULT) {\r\n $amount = FALSE;\r\n $purchase_price = GetProductCost($int_productID,\r\n $int_number_of_units,\r\n $str_start_date,\r\n $int_currency_id);\r\n\r\n // Margin = ($flt_price / $Purchase_price) - 1\r\n // margin * purchase_price = $flt_price - purchase_price\r\n // margin * purchase_price + purchase_price = flt_price\r\n if ($purchase_price) { // Only calculate margin when there is a purchase_price\r\n $amount = str_replace(\"%\", \"\", $flt_margin)/100 * $purchase_price + $purchase_price;\r\n //echo \"$amount = \".str_replace(\"%\", \"\", $_POST[\"margin_new\"]).\" * $purchase_price + $purchase_price\";\r\n } else {\r\n echo \"Price of product $int_productID can not be calculate. No purchase price.\";\r\n }\r\n\r\n return $amount;\r\n}",
"public function getBaseArea() {\n return parent::getRadius() * parent::getRadius() * pi();\n }",
"function getPerimeter(){\r\n return (($this->width + $this->height)*2);\r\n }",
"public function calcPosPoint($value) {\r\n\r\n if ($this->logarithmic) {\r\n if ($value == $this->iStartPos) {\r\n return $this->internalCalcPos($this->iMaximum, $this->iMinimum);\r\n } else if ($value == iEndPos) {\r\n return $this->internalCalcPos($this->iMinimum, $this->iMaximum);\r\n } else {\r\n $tmp = $this->iRangelog;\r\n if ($tmp == 0) {\r\n return $this->iMinimum;\r\n } else {\r\n if ($this->inverted) {\r\n $tmp = (($this->iEndPos - $value) * $tmp / $this->iAxisSize);\r\n } else {\r\n $tmp = (($value - $this->iStartPos) * $tmp / $this->iAxisSize);\r\n }\r\n\r\n return MathUtils::exp($this->horizontal ? $this->iLogMin + $tmp :\r\n $this->iLogMax - $tmp);\r\n }\r\n }\r\n } else\r\n if ($this->iAxisSize > 0) {\r\n\r\n $tmp = $this->inverted ? $this->iEndPos - $value : $value - $this->iStartPos;\r\n $tmp *= $this->iRange / $this->iAxisSize;\r\n return $this->horizontal ? $this->iMinimum + $tmp : $this->iMaximum - $tmp;\r\n\r\n } else {\r\n return 0;\r\n }\r\n }",
"private function calculateDifference()\n {\n $this->stampDifference = abs(strtotime($this->firstDate) - strtotime($this->secondDate));\n\n //all of the calculations get whole interval represented in a given scale\n $this->yearDifference = floor($this->stampDifference / (365 * 60 * 60 * 24));\n $this->monthDifference = floor($this->stampDifference / (30.41 * 60 * 60 * 24));\n $this->weekDifference = floor($this->stampDifference / (7 * 60 * 60 * 24));\n $this->dayDifference = floor($this->stampDifference / (60 * 60 * 24));\n $this->hourDifference = floor($this->stampDifference / (60 * 60));\n $this->minuteDifference = floor($this->stampDifference / (60));\n\n //Slightly Different Solution: All of the calculations altogether represent same interval\n //$this->yearDifference = floor($this->stampDifference / (365*60*60*24));\n //$this->monthDifference = floor(($this->stampDifference - $this->yearDifference * 365*60*60*24) / (30*60*60*24));\n //$this->dayDifference = floor(($this->stampDifference - $this->yearDifference * 365*60*60*24 - $this->monthDifference*30*60*60*24)/ (60*60*24));\n }",
"protected function giveCost()\n {\n $novoValor = 4;\n $this->valueNow = 210.54 / $novoValor;\n return $this->valueNow;\n }",
"public function get_cosPhi(): float\n {\n // $res is a double;\n if ($this->_cacheExpiration <= YAPI::GetTickCount()) {\n if ($this->load(YAPI::$_yapiContext->GetCacheValidity()) != YAPI::SUCCESS) {\n return self::COSPHI_INVALID;\n }\n }\n $res = $this->_cosPhi;\n return $res;\n }",
"function getDistance() {\n\t\treturn $this->dist2loc;\n\t}",
"public function getMaxCompositePoints() {}",
"public function compute_prorate_cost($rs) {\n // Build up an array of weights to prorate against\n $weights = array();\n $this->prorated_costs = -1;\n $this->prorated_acc_costs = -1;\n $load_cost = $rs[0]['load_cost'];\n $accessorial_cost = $rs[0]['accessorial_cost'];\n if (!empty($load_cost) || !empty($accessorial_cost)) {\n foreach ($rs as $row) {\n $weights[$row['OplPoNum']] = $row['OplTotalWeight'] + $row['OplPalletWeight'];\n }\n\n $prorater = new \\Prorate();\n\n if (!empty($load_cost)) {\n $this->prorated_costs = $prorater->prorateValue($load_cost, $weights, 2);\n }\n\n if (!empty($accessorial_cost)) {\n $this->prorated_acc_costs = $prorater->prorateValue($accessorial_cost, $weights, 2);\n }\n }\n $this->use_costs = ($this->prorated_costs != -1);\n $this->use_acc_costs = ($this->prorated_acc_costs != -1);\n }"
]
| [
"0.54255307",
"0.5228949",
"0.51239425",
"0.49808672",
"0.48808658",
"0.47699112",
"0.472453",
"0.4708427",
"0.46862462",
"0.46711394",
"0.46537626",
"0.46455932",
"0.46225238",
"0.4609505",
"0.46080494",
"0.46061975",
"0.46024597",
"0.45841518",
"0.4577715",
"0.45492512",
"0.45417094",
"0.45280963",
"0.4522978",
"0.45170504",
"0.45092505",
"0.44876802",
"0.44687027",
"0.4456016",
"0.44526812",
"0.44431752",
"0.44321257",
"0.44274384",
"0.44169292",
"0.44167012",
"0.44091055",
"0.43951973",
"0.43910983",
"0.43763858",
"0.43662113",
"0.43654388",
"0.4364092",
"0.43638745",
"0.43575263",
"0.43453154",
"0.43320948",
"0.4330455",
"0.4324218",
"0.43222722",
"0.4321462",
"0.43164235",
"0.4315437",
"0.43117204",
"0.4302",
"0.42972273",
"0.4292657",
"0.4290088",
"0.4281066",
"0.42731532",
"0.42597246",
"0.42577142",
"0.42572707",
"0.42557156",
"0.42524087",
"0.42511296",
"0.42482182",
"0.42451283",
"0.42430988",
"0.42342243",
"0.4233262",
"0.42300785",
"0.42298245",
"0.4229042",
"0.42261666",
"0.42215934",
"0.42183006",
"0.4217799",
"0.42154735",
"0.4204905",
"0.420365",
"0.42035568",
"0.4201063",
"0.42007256",
"0.4199221",
"0.4197706",
"0.41975245",
"0.41972166",
"0.41957587",
"0.4193358",
"0.41885453",
"0.41880012",
"0.41879833",
"0.41808763",
"0.4170689",
"0.41701245",
"0.41671962",
"0.41619557",
"0.4161674",
"0.41549146",
"0.41483507",
"0.41440675",
"0.41421542"
]
| 0.0 | -1 |
Sweeps a DC source | static public function dc($circuit, $source, $start, $stop, $step)
{
$ops = [];
$circuit->f = 0;
for ($X = $start; $X <= $stop; $X += $step)
{
if (!$element = $circuit->findElementByName($source))
{
throw new \Exception("Element '$source' not found.");
}
switch ($element->type)
{
case Element::CURRENT:
$element->I = $X;
break;
case Element::VOLTAGE:
$element->setVoltage($X);
break;
default:
throw new \Exception("Element '$source' is not a source.");
}
self::dcop($circuit);
$ops[(string)$X] = $circuit->V;
}
return $ops;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function setSource($source){\n if($this->memorize){\n if (isset($_GET[$this->skip_var])){\n $this->skip=$this->memorize('skip', (int)$_GET[$this->skip_var]);\n } else {\n $this->skip=(int)$this->recall('skip');\n }\n }else{\n $this->skip=@$_GET[$this->skip_var]+0;\n }\n\n // Start iterating early ($source = DSQL of model)\n if($source instanceof SQL_Model){\n $source = $source->_preexec();\n }\n\n if($source instanceof DB_dsql){\n $source->limit($this->ipp, $this->skip);\n $source->calcFoundRows();\n $this->source = $source;\n\n }elseif($source instanceof Model){\n $this->source = $source->setLimit($this->ipp,$this->skip);\n\n }else{\n // NOTE: no limiting enabled for unknown data source\n $this->source =& $source;\n }\n }",
"public function setSource($source);",
"protected function setSource($source) {}",
"protected function _useSourceDatasource() {\n\n // Instantiate source datasource if it's not already instantiated\n if (is_null($this->_externalNewsSourceDatasource)) {\n $this->_externalNewsSourceDatasource = new Datasource_Cms_ExternalNews_Source();\n }\n }",
"public function setSourceClient($sourceClient);",
"public function actionCopyCosts($s='', $d='')\n {\n $sourceTour = Tour::find()\n ->where(['code'=>$s])\n ->with(['cpt', 'cpt.venue'])\n ->asArray()\n ->one();\n $destTour = Tour::find()\n ->where(['code'=>$d])\n ->with(['cpt', 'cpt.venue'])\n ->asArray()\n ->one();\n if (!$sourceTour && !$destTour) {\n return $this->render('tours_copy-costs');\n }\n $sourceProduct = Product::find()\n ->where(['op_code'=>$s])\n ->with(['days'])\n ->asArray()\n ->one();\n if (!$sourceProduct) {\n throw new HttpException(404, 'Source tour not found.'); \n }\n $destProduct = Product::find()\n ->where(['op_code'=>$d])\n ->with(['days'])\n ->asArray()\n ->one();\n if (!$destProduct) {\n throw new HttpException(404, 'Destination tour not found.'); \n }\n\n if (isset($_GET['sd']) && isset($_GET['dd']) && strlen($_GET['sd']) == 10 && strlen($_GET['dd']) == 10) {\n $dc = (int)$_GET['dc'] == 0 ? 1 : (int)$_GET['dc'];\n $startDate = date('Y-m-d', strtotime($_GET['sd']));\n $dayList = [$startDate];\n for ($i = 1; $i < $dc; $i ++) {\n $dayList[] = date('Y-m-d', strtotime('+ '.($i).' days', strtotime($startDate)));\n }\n\n if (USER_ID == 1) {\n \\fCore::expose($dayList);\n exit;\n }\n \n $sourceCpt = Cpt::find()\n ->where(['tour_id'=>$sourceTour['id'], 'dvtour_day'=>$dayList])\n ->asArray()\n ->all();\n if (!empty($sourceCpt)) {\n foreach ($sourceCpt as $cpt) {\n Yii::$app->db\n ->createCommand()\n ->insert('cpt', [\n 'created_at'=>NOW,\n 'created_by'=>USER_ID,\n 'updated_at'=>NOW,\n 'updated_by'=>USER_ID,\n 'tour_id'=>$destTour['id'],\n 'dvtour_day'=>date('Y-m-d', strtotime($_GET['dd'])),\n 'dvtour_name'=>$cpt['dvtour_name'],\n 'oppr'=>$cpt['oppr'],\n 'venue_id'=>$cpt['venue_id'],\n 'by_company_id'=>$cpt['by_company_id'],\n 'via_company_id'=>$cpt['via_company_id'],\n 'qty'=>$cpt['qty'],\n 'unit'=>$cpt['unit'],\n 'price'=>$cpt['price'],\n 'unitc'=>$cpt['unitc'],\n 'booker'=>$cpt['booker'],\n 'payer'=>$cpt['payer'],\n 'adminby'=>$cpt['adminby'],\n 'status'=>'n',\n 'plusminus'=>$cpt['plusminus'],\n ])->execute();\n echo $cpt['dvtour_name'];\n }\n }\n return $this->redirect('@web/tours/copy-costs?s='.$s.'&d='.$d);\n }\n\n return $this->render('tours_copy-costs', [\n 'sourceProduct'=>$sourceProduct,\n 'destProduct'=>$destProduct,\n 'sourceTour'=>$sourceTour,\n 'destTour'=>$destTour,\n ]);\n }",
"function wp_swap_source($old_source_file) {\n\t\t\t\n\t\t$ext = pathinfo($old_source_file, PATHINFO_EXTENSION);\n\t\t\n\t\t$name = pathinfo($old_source_file, PATHINFO_FILENAME);\n\t\t$name = explode('-', $name);\n\t\t$temp = array_pop($name);\n\t\t$name = implode('-', $name);\n\t\t\n\t\t$path = dirname($old_source_file) . '/';\n\t\t\n\n\t\t$new_source_file = $path . $name . '.' . $ext;\n\t\t\n\t\t// In case there cannot be found an unresized original file in Wordpress’ media directory\n\t\t// Fallback to original file requested\n\t\t// This happens when cropping was done manuall in Wordpress, e.g. on a thumbnail\n\t\t// Why? The filename changes and no information about how and where cropping took place is stored \n\t\tif ( !file_exists($new_source_file) ) $new_source_file = $old_source_file;\n\n\t\treturn $new_source_file;\n\t}",
"public function dropDatasource($source);",
"function wprss_updated_feed_source( $post_ID, $post_after, $post_before ) {\n // Check if the post is a feed source and is published\n\n if ( ( $post_after->post_type == 'wprss_feed' ) && ( $post_after->post_status == 'publish' ) ) {\n\n if ( isset( $_POST['wprss_url'] ) && !empty( $_POST['wprss_url'] ) ) {\n $url = $_POST['wprss_url'];\n $feed = wprss_fetch_feed( $url );\n if ( $feed !== NULL && !is_wp_error( $feed ) ) {\n update_post_meta( $post_ID, 'wprss_site_url', $feed->get_permalink() );\n update_post_meta( $post_ID, 'wprss_feed_image', $feed->get_image_url() );\n }\n }\n\n\n \tif ( isset( $_POST['wprss_limit'] ) && !empty( $_POST['wprss_limit'] ) ) {\n\t // Checking feed limit change\n\t // Get the limit currently saved in db, and limit in POST request\n\t //$limit = get_post_meta( $post_ID, 'wprss_limit', true );\n\t $limit = $_POST['wprss_limit'];\n\t // Get all feed items for this source\n\t $feed_sources = new WP_Query(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'post_type' => 'wprss_feed_item',\n\t\t\t\t\t\t'post_status' => 'publish',\n\t\t\t\t\t\t'cache_results' => false, // Disable caching, used for one-off queries\n\t\t\t\t\t\t'no_found_rows' => true, // We don't need pagination, so disable it\n\t\t\t\t\t\t'posts_per_page' => -1,\n\t\t\t\t\t\t'orderby' \t\t => 'date',\n\t\t\t\t\t\t'order' \t\t => 'ASC',\n\t\t\t\t\t\t'meta_query' => array(\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'key' => 'wprss_feed_id',\n\t\t\t\t\t\t\t\t'value' => $post_ID,\n\t\t\t\t\t\t\t\t'compare' => 'LIKE'\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t );\n\t // If the limit is smaller than the number of found posts, delete the feed items\n\t // and re-import, to ensure that most recent feed items are present.\n\t $difference = intval( $feed_sources->post_count ) - intval( $limit );\n\t if ( $difference > 0 ) {\n\t \t// Loop and delete the excess feed items\n\t\t\t\t\twhile ( $feed_sources->have_posts() && $difference > 0 ) {\n\t\t\t\t\t\t$feed_sources->the_post();\n\t\t\t\t\t\twp_delete_post( get_the_ID(), true );\n\t\t\t\t\t\t$difference--;\n\t\t\t\t\t}\n\t }\n \t}\n }\n }",
"function doDC($object, $mods_content) {\n $dsid = 'DC';\n $dc_datastream = isset($object[$dsid]) ? $object[$dsid] : $object->constructDatastream($dsid);\n if ($dc_datastream->versionable <> TRUE) {\n $dc_datastream->versionable = TRUE;\n }\n if ($dc_datastream->mimetype <> 'application/xml') {\n $dc_datastream->mimetype = 'application/xml';\n }\n if ($dc_datastream->label <> 'DC Record') {\n $dc_datastream->label = 'DC Record';\n }\n\n // Get the DC by transforming from MODS.\n if ($mods_content) {\n $new_dc = _runXslTransform(\n array(\n 'xsl' => TRANSFORM_MODS2DC_STYLESHEET,\n 'input' => $mods_content,\n )\n );\n error_log('--------------- transform DC = ' . print_r($new_dc, true));\n }\n\n if (isset($new_dc)) {\n $dc_datastream->setContentFromString($new_dc);\n }\n echo '<a href=\"http://gamera.library.pitt.edu/islandora/object/' . $object->id . '/viewer\">' . $object->label . '</a><br>';\n $object->ingestDatastream($dc_datastream);\n}",
"protected function SourceDepartments() {\n\treturn $this->DepartmentTable()->SQO_Source('d');\n\t//return new fcSQL_TableSource($this->DepartmentTable()->Name(),'d');\n }",
"public function updateSource() {\n if (!empty($this->imported)) {\n $data = $this->source->data;\n if (empty($data)) {\n $data = array();\n }\n foreach ($this->imported as $key) {\n $data[] = $key;\n }\n $this->source->data = $data;\n $this->source->last_updated = date('Y-m-d H:i:s', strtotime('now'));\n $this->source->save();\n $this->imported = array();\n }\n }",
"public function setDataSource($ds) {\n $this->payload['ds'] = $ds ;\n }",
"function switch_site($site_id, $prev_site_id)\n {\n }",
"public function setSource($sSource)\n {\n parent::setSource($sSource);\n }",
"public function setSource($value)\n {\n if (!array_key_exists('source', $this->fieldsModified)) {\n $this->fieldsModified['source'] = $this->data['fields']['source'];\n } elseif ($value === $this->fieldsModified['source']) {\n unset($this->fieldsModified['source']);\n }\n\n $this->data['fields']['source'] = $value;\n }",
"public function setSourceDiskID($value)\n {\n return $this->set('SourceDiskID', $value);\n }",
"private function createDataSource()\n {\n $this->debug(\"Creating data source\");\n $this->dataSource = DataSourceRepository::createDataSource(\n $this->config['datasource']['key'],\n $this->config['datasource']['title'],\n 'SYSTEM'\n );\n $this->dataSource->setDataSourceAttribute(\"manual_publish\", 0);\n $this->dataSource->setDataSourceAttribute(\"qa_flag\", 0);\n\n $this->log(\"Data source {$this->dataSource->title}({$this->dataSource->data_source_id}) created\");\n }",
"public function testUpdateDatasource()\n {\n Log::info(__FUNCTION__);\n\n //Preparation -----------------------------\n //Add original data for update\n $postDataAdd = [\n 'datasource_name' => 'datasource_name',\n 'table_id' => 1,\n 'starting_row_number' => 2,\n ];\n //TODO need to use \"V1\" in the url\n $addResponse = $this->post('api/add/data-source', $postDataAdd);\n $addResponseJson = json_decode($addResponse->content());\n $targetDataSourceId = $addResponseJson->id;\n\n // Execute -----------------------------\n $updatePostData = [\n 'id' => $targetDataSourceId,\n 'datasource_name' => 'datasource_name_changed',\n 'table_id' => 3,\n 'starting_row_number' => 4,\n ];\n //TODO need to use \"V1\" in the url\n $updateResponse = $this->post('api/update/data-source', $updatePostData);\n\n //checking -----------------------------\n $updatedTable = Datasource::where('id', $targetDataSourceId)->first();\n\n // Check table data of 'datasource' table\n $this->assertEquals($updatePostData['datasource_name'], $updatedTable->datasource_name);\n $this->assertEquals($updatePostData['table_id'], $updatedTable->table_id);\n $this->assertEquals($updatePostData['starting_row_number'], $updatedTable->starting_row_number);\n $this->assertTrue($updatedTable->created_at != null);\n $this->assertTrue($updatedTable->updated_at != null);\n $this->assertTrue($updatedTable->created_by == null);\n $this->assertTrue($updatedTable->updated_by == null);\n\n //Check response\n $updateResponse\n ->assertStatus(200)\n ->assertJsonFragment([\n 'id' => $updatedTable->id,\n 'datasource_name' => $updatePostData['datasource_name'],\n 'table_id' => $updatePostData['table_id'],\n 'starting_row_number' => $updatePostData['starting_row_number'],\n ]);\n }",
"public function setSource($source) {\n $this->source = $source;\n }",
"public function setSource($source) {\n $this->source = $source;\n }",
"public function setSource($value)\n {\n return $this->set('Source', $value);\n }",
"protected function _mapDCSource(Item $item)\n {\n $dcSource = metadata($item, array('Dublin Core', 'Source'), array('all' => true));\n\n foreach ($dcSource as $source) {\n\n if (strpos($source,'http://') === 0) {\n\t$modsLocation = $this->_node->appendChild(new Mods_Location());\n\t$modsUrl = $modsLocation->addUrl($source);\n } else {\n\t$modsRelatedItem = $this->_node->appendChild(new Mods_RelatedItem());\n\t$modsRelatedItem->setTypeAttribute('original');\n\t$modsRelatedItem->addTitleInfo($source);\n }\n \n }\n\n }",
"public function set_source_class($class = 'SimplePie_Source')\n {\n }",
"public function setSource($source)\n {\n $this->source = $source;\n }",
"public function setSource($source)\n {\n $this->source = $source;\n }",
"public function setSource($source)\n {\n $this->source = $source;\n }",
"public function setSource($source)\n {\n $this->source = $source;\n }",
"public function setOldDps($value)\n {\n return $this->set(self::_OLD_DPS, $value);\n }",
"function doDC($object, $mods_content) {\n $dsid = 'DC';\n $dc_datastream = isset($object[$dsid]) ? $object[$dsid] : $object->constructDatastream($dsid);\n $dc_datastream->mimetype = 'application/xml';\n $dc_datastream->label = 'DC Record';\n\n // Get the DC by transforming from MODS.\n if ($mods_content) {\n $new_dc = _runXslTransform(\n array(\n 'xsl' => TRANSFORM_MODS2DC_STYLESHEET,\n 'input' => $mods_content,\n )\n );\n error_log('--------------- transform DC = ' . print_r($new_dc, true));\n }\n if (isset($new_dc)) {\n $dc_datastream->setContentFromString($new_dc);\n }\n echo '<a href=\"http://gamera.library.pitt.edu/islandora/object/' . $object->id . '\">' . $object->label . '</a><br>';\n $object->ingestDatastream($dc_datastream);\n}",
"public function setDW($dw) {}",
"public function setSource($source)\n {\n if (\\File::exists($source)) {\n $remoteSource = basename($source);\n\n \\Storage::disk('blueprints')->put($remoteSource, file_get_contents($source));\n\n $source = $remoteSource;\n }\n\n $this->resource->source = $source;\n }",
"public function setSourceId(?string $value): void {\n $this->getBackingStore()->set('sourceId', $value);\n }",
"public function updateSources(array $sources): self {\n $this->sources = array_merge($this->sources, $sources);\n return $this;\n }",
"function setSource($source,$fields=null){\n\n // Set DSQL\n if($source instanceof \\DB_dsql){\n $this->dq=$source;\n return $this;\n }\n // SimpleXML and other objects\n if(is_object($source)){\n if($source instanceof \\Model) throw $this->exception('Use setModel() for Models');\n if($source instanceof \\Controller) throw $this->exception('Use setController() for Controllers');\n if($source instanceof \\Iterator){\n $this->iter=$source;\n return $this;\n }\n\n // Cast non-iterable objects into array\n $source=(array)$source;\n }\n\n // Set Array as a data source\n if(is_array($source)){\n $m=$this->setModel('Model',$fields);\n if(is_array(reset($source))){\n $m->setSource('Array',$source);\n }else{\n $m->setSource('ArrayAssoc',$source);\n }\n\n return $this;\n }\n\n // Set manually\n $this->dq=$this->api->db->dsql();\n $this->dq\n ->table($source)\n ->field($fields?:'*');\n\n return $this;\n }",
"public function truncateDatasource($source);",
"public function SwipeOtherClinics(){\n\t\t $input_data \t\t= \t$this->GetDecryptedData(Input::get()['request']);\n\t\t $rules = array(\n\t\t 'user_id' \t\t\t=> 'required',\n\t\t //'device_id' \t\t=> 'required',\n\t\t 'platform_type' => 'required',\n\t\t 'latitude' \t\t=> 'required',\n\t\t 'longitude' \t\t=> 'required',\n\t\t 'clinic_id' \t\t=> 'required',\n\t\t );\n\t\t $validator = Validator::make($input_data,$rules);\n\t\t if ($validator->fails()){\n\t\t\t $messages = $validator->messages();\n\t\t\t return $this->encrypt(json_encode(array('status' => 'error', 'message' => $validator->errors()->all())));\n\t\t }else{\n\t\t\t$update = OthersSwipeModel::SwipeClinic($input_data['user_id'],$input_data['clinic_id']);\n\t\t\tif($update){\n\t\t\t\treturn $this->encrypt(json_encode(array('status'=>'success','message'=>'Successfully swiped.')));\n\t\t\t}else{\n\t\t\t\treturn $this->encrypt(json_encode(array('status'=>'success','message'=>'Technical error.')));\n\t\t\t}\n\t\t }\n\t }",
"protected function cardPoolSwitch()\n {\n $request = $this->request();\n\n $this->result()\n ->changeRequest('card_pool', (isset($request['card_pool']) && $request['card_pool'] == 'yes') ? 'no' : 'yes')\n ->setCurrent('Decks_edit');\n }",
"public function forceSourceOn()\n {\n $this->sendCommand(static::RCMD_SRC_FORCE_ON);\n }",
"public function setSw($x) { $this->sw = $x; }",
"public function setSource($value, $rs =null){\n\t\t\t$this->source \t= $value; \n\t\t\t$this->rs\t\t= $rs;\t\n\t\t\treturn $this;\n\t}",
"function getDataSource() {return $this->_datasource;}",
"public function dataSource($value) {\n return $this->setProperty('dataSource', $value);\n }",
"public function dataSource($value) {\n return $this->setProperty('dataSource', $value);\n }",
"public function dataSource($value) {\n return $this->setProperty('dataSource', $value);\n }",
"public function dataSource($value) {\n return $this->setProperty('dataSource', $value);\n }",
"public function setSOURCE($sOURCE)\n {\n $this->sOURCE = $sOURCE;\n return $this;\n }",
"public function run()\n {\n DB::table('sources')->insert([\n 'name' => 'TechCrunch',\n 'slug' => 'tech-crunch',\n 'active' => 1\n ]);\n }",
"public function fetchSources () {\r\n\t}",
"public function getDW() {}",
"public function setSource($source)\n {\n $this->opts['source'] = $source;\n }",
"public function createSource();",
"public function source($source)\n {\n $this->query = $source;\n }",
"public function reloadSource()\n {\n $this->sendCommand(static::RCMD_SRC_RELOAD);\n }",
"public function SwipeUpcomingClinics(){\n\t\t $input_data \t\t= \t$this->GetDecryptedData(Input::get()['request']);\n\t\t $rules = array(\n\t\t 'user_id' \t\t\t=> 'required',\n\t\t //'device_id' \t\t=> 'required',\n\t\t 'platform_type' => 'required',\n\t\t 'latitude' \t\t=> 'required',\n\t\t 'longitude' \t\t=> 'required',\n\t\t 'clinic_id' \t\t=> 'required',\n\t\t );\n\t\t $validator = Validator::make($input_data,$rules);\n\t\t if ($validator->fails()){\n\t\t\t $messages = $validator->messages();\n\t\t\t return $this->encrypt(json_encode(array('status' => 'error', 'message' => $validator->errors()->all())));\n\t\t }else{\n\t\t\t$update = UpcomingSwipeModel::SwipeClinic($input_data['user_id'],$input_data['clinic_id']);\n\t\t\tif($update){\n\t\t\t\treturn $this->encrypt(json_encode(array('status'=>'success','message'=>'Successfully swiped.')));\n\t\t\t}else{\n\t\t\t\treturn $this->encrypt(json_encode(array('status'=>'success','message'=>'Technical error.')));\n\t\t\t}\n\t\t }\n\t }",
"public function setPreviousSource($source) {\n\t\tassert('is_string($source)');\n\n\t\t$cookieName = 'multiauth_source_' . $this->authId;\n\n\t\t$config = SimpleSAML_Configuration::getInstance();\n\t\t$params = array(\n\t\t\t/* We save the cookies for 90 days. */\n\t\t\t'lifetime' => (60*60*24*90),\n\t\t\t/* The base path for cookies.\n\t\t\tThis should be the installation directory for simpleSAMLphp. */\n\t\t\t'path' => ('/' . $config->getBaseUrl()),\n\t\t\t'httponly' => FALSE,\n\t\t);\n\n\t\tSimpleSAML_Utilities::setCookie($cookieName, $source, $params, FALSE);\n\t}",
"function _backup_migrate_drush_sources($op = NULL) {\n backup_migrate_include('sources');\n $rows = array(array(dt('ID'), dt('Name'), dt('Operations')));\n foreach (backup_migrate_get_sources($op) as $destination) {\n $rows[] = array(\n $destination->get_id(),\n $destination->get_name(),\n implode(', ', $destination->ops()),\n );\n }\n drush_print_table($rows, TRUE, array(32, 32));\n}",
"public function setSource( $url ) {\n\t\t$this->source = $url;\n\t}",
"function SetDatasource($ds)\r\n\t{\r\n\t\t$this->Datasource = $ds;\r\n\t\r\n\t\t//$repeater_outer =& $this->FindControl(\"rptRows\");\r\n\t\t//$repeater_outer->SetDatasource($ds);\r\n\t}",
"public function copy($source) {}",
"protected function setDestination() {}",
"public function getSource() {\n return \"ads\";\n }",
"function setUserSource($table,$db_fields=\"*\",$user_id=null){\n\t\tif(!$this->api->db)throw new BaseException('DB must be initialized if you want to use setSource');\n\t\t$this->user_dq = $this->api->db->dsql();\n\t\t$this->user_id=$user_id;\n\n\t\t$this->user_dq->table($table);\n\t\t$this->user_dq->field($db_fields);\n\t\t$this->user_dq->where('user_id',$this->user_id);\n\t\treturn $this;\n\t}",
"public function setDps($value)\n {\n return $this->set(self::_DPS, $value);\n }",
"public function setDps($value)\n {\n return $this->set(self::_DPS, $value);\n }",
"public function setDps($value)\n {\n return $this->set(self::_DPS, $value);\n }",
"public function source();",
"public function source();",
"public function source();",
"function acf_switch_stores($site_id, $prev_site_id)\n{\n}",
"public function dataSource(array $value)\n {\n return $this->setProperty('dataSource', $value);\n }",
"public function setSource($source) {\n $this->source = $source;\n return $this;\n }",
"public function update_sources($deal_id,$data){\n die(\"do not use\");\n $q = \"select count(*) as cnt from \".TP.\"transaction_sources where transaction_id='\".$deal_id.\"'\";\n $res = mysql_query($q);\n if(!$res){\n return false;\n }\n $row = mysql_fetch_assoc($res);\n if(0==$row['cnt']){\n //not found, insert\n $source_q = \"insert into \".TP.\"transaction_sources set transaction_id='\".$deal_id.\"', sources='\".mysql_real_escape_string($data).\"'\";\n }else{\n $source_q = \"update \".TP.\"transaction_sources set sources='\".mysql_real_escape_string($data).\"' where transaction_id='\".$deal_id.\"'\";\n }\n $result = mysql_query($source_q);\n if(!$result){\n return false;\n }\n return true;\n }",
"public function forceSourceOff()\n {\n $this->sendCommand(static::RCMD_SRC_FORCE_OFF);\n }",
"public function useProductionSSDServices() {\n\t\t$this->loadProductionUrls();\n\t\t$this->ssdConnector = \n\t\t\tnew SSDConnector(\n\t\t\t\t$this->tmpDir,\n\t\t\t\t$this->clientCert,\n\t\t\t\t$this->privateKey,\n\t\t\t\t$this->privateKeyPassword,\n\t\t\t\t$this->trustedCaChain);\n\t\t$this->wsConnector = $this->ssdConnector->getWsClient($this->wsdlUrl); \n\t\t$this->wsdl = $this->ssdConnector->getWSDL();\n\t}",
"static public function preview_production_copy( $blog_id, $direction ) {\n\t\tif ( $direction > 0 ) {\n\t\t\t$content = self::load_content( $blog_id, true );\n\t\t\tself::save_item( $blog_id, false, $content );\n\t\t} else {\n\t\t\t$content = self::load_content( $blog_id, false );\n\t\t\tself::save_item( $blog_id, true, $content );\n\t\t}\n\t}",
"function PKG_updateSourcesListAtAllClients($sourcename)\n{\n\tCHECK_FW(CC_packagesourcename, $sourcename);\n\t//Quick 'n dirty find all clients that have the sources.list AND MAYBE SOME MORE\n\t$sql = \"SELECT client FROM `clients` WHERE options LIKE '%$sourcename%'\";\n\n\t$result = DB_query($sql); //FW ok\n\n\twhile ($line = mysql_fetch_row($result))\n\t\t\t{\n\t\t\t\t$options = CLIENT_getAllOptions($line[0]);\n\n\t\t\t\tif ($options['packagesource']==$sourcename)\n\t\t\t\t\t{\n\t\t\t\t\tPKG_addJob($line[0],\n\t\t\t\t\t\"m23UpdateSourcesList\",\n\t\t\t\t\tPKG_getSpecialPackagePriority(\"m23UpdateSourcesList\"),\n\t\t\t\t\t$sourcename);\n\t\t\t\t\t};\n\t\t\t}\n}",
"public function setClientSource(?SubmissionClientSource $value): void {\n $this->getBackingStore()->set('clientSource', $value);\n }",
"function getDataSource() { return $this->_datasource; }",
"public function setSource(?SubmissionSource $value): void {\n $this->getBackingStore()->set('source', $value);\n }",
"public function addSource($src, $dst = '')\n {\n $this->config['sources'][] = array('src' => $src, 'dst' => $dst);\n }",
"protected function dnd()\n\t{\n\t\t$source_id = (int)array_pop(explode(\"_\", $_REQUEST[\"il_hform_source\"]));\n\t\tif($_REQUEST[\"il_hform_target\"] != \"droparea_end\")\n\t\t{\n\t\t\t$target_id = (int)array_pop(explode(\"_\", $_REQUEST[\"il_hform_target\"]));\n\t\t\t$pos = 0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$page = $this->object->getSurveyPages();\n\t\t\t$page = $page[$this->current_page-1];\n\t\t\t$last = array_pop($page);\n\t\t\t$target_id = (int)$last[\"question_id\"];\n\t\t\t$pos = 1;\n\t\t}\n\t\tif($source_id != $target_id)\n\t\t{\n\t\t\t$this->object->moveQuestions(array($source_id), $target_id, $pos);\n\t\t}\n\t}",
"public function setSource(string $source): void\n {\n $this->source = $source;\n }",
"function listSources() {\n\t\n\t}",
"public static function reg_data_source($ds_index, $ds_params)\n {\n return Core\\DataSources::Register($ds_index, $ds_params);\n }",
"protected function getVictoireCriteria_Criteria_DomainNameSourceService()\n {\n return $this->services['victoire_criteria.criteria.domain_name_source'] = new \\Victoire\\Bundle\\CriteriaBundle\\DataSource\\DomainNameDataSource(array(0 => array()), $this->get('request_stack'));\n }",
"public function setDatasource($datasource)\n {\n $this->datasource = $datasource;\n }",
"protected function setSource(Image $source){\n\t\t$this->source = $source;\n\t}",
"function get_product_update_source($_id_zhout,$_id_source,$_id_product)\n\t{\n\t\tswitch ($_id_source)\n\t\t{\n\t\t\tcase 1 : $_data_zhopie_product = call_user_func(array($this,'get_detail_product_by_id_source_id_product'),1,$_id_product); \n\t\t\t \t\t\t\t\t\t\t break;\n\t\t\t\n\t\t\tcase 2 : $_data_amazon_product = call_user_func(array($this,'get_detail_product_by_id_source_id_product'),2,$_id_product); \n\t\t\t\t\t\t\t\t\t\t\tif ($_data_amazon_product)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\treturn $this->CI->load->view('zhout/zhout_product_update_single',$_data_amazon_product);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tthrow 'Data Product Amazon tidak ada';\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 3 : $_data_zappos_product = call_user_func(array($this,'get_detail_product_by_id_source_id_product'),3,$_id_product); \n\t\t\t\t\t\t\t\t\t\t\tif ($_data_amazon_product)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\treturn $this->CI->load->view('zhout/zhout_product_update_single',$_data_amazon_product);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tthrow 'Data Product Amazon tidak ada';\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\tdefault : throw 'Type sumber product yang diplih tidak ada'; break;\t\t\t\n\t\t}\n\t}",
"public function setAttributeSource(?AccessPackageResourceAttributeSource $value): void {\n $this->getBackingStore()->set('attributeSource', $value);\n }",
"function redirectToSource($linkid) {\r\n\tglobal $wpdb;\r\n\t$wpdb->update(WP_BARDB_LINKS,array('link_behavior'=>1),array('id'=>$linkid),array('%d'),array('%d'));\r\n}",
"public function getSource()\n {\n return 'data_diksar';\n }",
"public function getRoiSources()\n {\n //get DBO\n $db = JFactory::getDBO();\n $query = $db->getQuery(true);\n\n //construct query string\n $query->select(\"s.id,s.name,count(d.id) as number_of_deals,sum(d.amount) as revenue,s.type,s.cost\");\n $query->select(\"IF ( s.type <> 'per', ( ( ( ( sum(d.amount) - s.cost ) / s.cost ) * 100 ) ), ( ( sum(d.amount) - ( s.cost * count(d.id) ) ) / ( s.cost * count(d.id) ) * 100 ) ) AS roi\");\n $query->from(\"#__sources AS s\");\n\n //left join data\n $won_stage_ids = DealHelper::getWonStages();\n $query->leftJoin(\"#__deals AS d ON d.source_id = s.id AND d.stage_id IN (\".implode(',',$won_stage_ids).\") AND d.published=1 AND d.archived=0\");\n $query->leftJoin(\"#__users AS u ON u.id = d.owner_id\");\n\n //set our sorting direction if set via post\n $query->order($this->getState('Source.filter_order') . ' ' . $this->getState('Source.filter_order_Dir'));\n\n //group data\n $query->group(\"s.id\");\n\n if ($this->_id) {\n if ( is_array($this->_id) ) {\n $query->where(\"s.id IN (\".implode(',',$this->_id).\")\");\n } else {\n $query->where(\"s.id=$this->_id\");\n }\n }\n\n //filter based on member access roles\n $user_id = UsersHelper::getUserId();\n $member_role = UsersHelper::getRole();\n $team_id = UsersHelper::getTeamId();\n\n if ($member_role != 'exec') {\n\n if ($member_role == 'manager') {\n $query->where(\"u.team_id=$team_id\");\n } else {\n $query->where(\"(d.owner_id=$user_id)\");\n }\n\n }\n\n //set query and load results\n $db->setQuery($query);\n $results = $db->loadAssocList();\n\n return $results;\n }",
"public function gotoSource(){\n if(!empty($this->website)){\n header(\"Location: \". $this->website);\n }\n else{\n header(\"Location: \". $this->getUri());\n }\n die();\n }",
"function copy() {\n\t\tdefined('_JEXEC') or die('Invalid Token');\n\t\t$option = clm_core::$load->request_string('option', '');\n\t\t$section = clm_core::$load->request_string('section', '');\n\t\t$this->setRedirect('index.php?option=' . $option . '§ion=' . $section);\n\t\t$cid = clm_core::$load->request_array_int('cid');\n\t\t$db = JFactory::getDBO();\n\t\t$table = JTable::getInstance('saisons', 'TableCLM');\n\t\t$user = JFactory::getUser();\n\t\t$n = count($cid);\n\t\tif ($n > 0) {\n\t\t\tforeach ($cid as $id) {\n\t\t\t\tif ($table->load((int)$id)) {\n\t\t\t\t\t$table->id = 0;\n\t\t\t\t\t$table->name = 'Kopie von ' . $table->name;\n\t\t\t\t\t$table->published = 0;\n\t\t\t\t\tif (!$table->store()) {\n\t\t\t\t\t\t$this->setMessage($table->getError(), 'warning');\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$this->setMessage($table->getError(), 'warning');\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t$this->setMessage(JText::_('SAISON_NO_SELECT'), 'warning');\n\t\t\treturn;\n\t\t}\n\t\tif ($n > 1) {\n\t\t\t$msg = JText::_('SAISON_MSG_ENTRYS_COPY');\n\t\t} else {\n\t\t\t$msg = JText::_('SAISON_MSG_ENTRY_COPY');\n\t\t}\n\t\t// Log schreiben\n\t\t$clmLog = new CLMLog();\n\t\t$clmLog->aktion = JText::_('SAISON_AKTION_SEASON_COPY');\n\t\t$clmLog->params = array('sid' => $cid[0], 'cids' => implode(',', $cid));\n\t\t$clmLog->write();\n\t\t$this->setMessage(JText::_($n . $msg));\n\t}",
"public function getSource()\n {\n return 'dw_vehicle_source';\n }",
"public function onCut($objDc)\n\t{\n\t\t$objModel = DraftableModel::findByPK($this->strTable, Input::get('id'), array('uncached'=>true));\n\t\t$objModel->setVersioning(false);\n\t\t\n\t\t$objRelated = DraftableModel::findOneByDraftRelated($this->strTable, Input::get('id'), array('uncached'=>true));\n\t\t$objRelated->setVersioning(false);\n\t\t\t\t\n\t\t// no related exists, nothing to do\n\t\tif($objRelated === null)\n\t\t{\t\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// NOTE: isDraft is not up to date here, because it checks draftState which is not yet updated\n\t\t\n\t\t// model, which was a draft, was moved into live mode, remove relation\n\t\t// model, which was a live version, was moved into draft mode, remove relation\n\t\tif((!$this->blnDraftMode && $objModel->isDraft() && !$objRelated->isDraft()) || ($this->blnDraftMode && !$objModel->isDraft() && $objRelated->isDraft()))\n\t\t{\n\t\t\tif($this->blnDraftMode)\n\t\t\t{\n\t\t\t\t$objModel->setState('draft');\n\t\t\t\t$objRelated->setState('draft');\n\t\t\t}\n\t\t\telse \n\t\t\t{\n\t\t\t\t$objModel->draftState = 0;\n\t\t\t\t$objModel->draftState = 0;\n\t\t\t}\n\t\t\t\n\t\t\t$objRelated->draftRelated = 0;\n\t\t\t$objModel->save();\n\t\t\t\t\n\t\t\t$objModel->draftRelated = 0;\n\t\t\t$objModel->save();\n\t\t}\n\t\t\n\t\t// model has not moved to new parent, update sortings\n\t\telseif(!$this->blnDraftMode && $objRelated->isDraft() && $objModel->pid == $objRelated->pid)\n\t\t{\t\t\t\n\t\t\t$strQuery \t= 'SELECT t.id, t.draftState, j.sorting FROM ' . $this->strTable . ' t'\n\t\t\t\t\t\t. ' LEFT JOIN ' . $this->strTable . ' j ON j.id = t.draftRelated'\n\t\t\t\t\t\t. ' WHERE t.pid=? AND t.draftState > 0 AND t.sorting != j.sorting';\n\t\t\t\t\t\t\t\n\t\t\t$objResult = $this->Database->prepare($strQuery)->execute($objModel->pid);\n\t\n\t\t\tif($objResult->numRows < 1)\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\twhile($objResult->next()) \n\t\t\t{\n\t\t\t\t// sorting will be updated because live sorting is used by select\n\t\t\t\t$objNew = new DraftableModel($objResult, true, $this->strTable);\n\t\t\t\t$objNew->tstamp = time();\n\t\t\t\t$objNew->save();\n\t\t\t}\n\t\t}\n\t\t\t\n\t\t// element was moved into live, move draft to new place as well\n\t\telseif(!$this->blnDraftMode && $objModel->pid != $objRelated->pid)\n\t\t{\n\t\t\t// model was a draft, delete old draft or\t\n\t\t\t// delete it because we do not know if new ptable is also draftable, will not happen until #5234 is fixed \n\t\t\tif($objModel->isDraft() || $objRelated->ptable != $GLOBALS['TL_DCA'][$this->strTable]['config']['ptable'])\n\t\t\t{\n\t\t\t\t$objModel->draftRelated = 0;\n\t\t\t\t$objModel->draftState = 0;\n\t\t\t\t$objModel->save();\n\t\t\t\t\n\t\t\t\t$objRelated->delete();\n\t\t\t}\n\t\t\t\n\t\t\t// it is in the same ptable, so move draft as well\n\t\t\telse\n\t\t\t{\n\t\t\t\t$objRelated->pid = $objModel->pid;\n\t\t\t\t$objRelated->ptable = $objModel->ptable;\n\t\t\t\t$objRelated->setState('draft');\n\t\t\t\t$objRelated->sorting = $objModel->sorting;\n\t\t\t\t$objRelated->save();\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\t// draft was moved to new parent, label original as to delete\n\t\telseif($this->blnDraftMode && $objModel->pid != $objRelated->pid)\n\t\t{\n\t\t\t// model was a live element, now it's a draft, delete related draft\n\t\t\tif(!$objModel->isDraft())\n\t\t\t{\n\t\t\t\t$objModel->setState('draft');\n\t\t\t\t$objModel->draftRelated = 0;\n\t\t\t\t$objModel->save();\n\t\t\t\t\n\t\t\t\t$objRelated->delete();\n\t\t\t}\n\t\t\t\n\t\t\t// model was a draft, create new related for objRelated and label as delete\n\t\t\telse\n\t\t\t{\n\t\t\t\t$objModel->draftRelated = 0;\n\t\t\t\t$objModel->save();\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t$objNew = clone $objModel;\n\t\t\t\t$objNew->pid = $objRelated->pid;\n\t\t\t\t$objNew->ptable = $objRelated->ptable;\n\t\t\t\t$objNew->draftRelated = $objRelated->id;\n\t\t\t\t$objNew->sorting = $objRelated->sorting;\t\n\t\t\t\t$objNew->setState('delete');\n\t\t\t\t$objNew->setState('draft');\n\t\t\t\t$objNew->setVersioning(true);\n\t\t\t\t$objNew->save(true);\n\t\t\t\t\t\n\t\t\t\t$objRelated->draftRelated = $objNew->id;\n\t\t\t\t$objRelated->setVersioning(false);\n\t\t\t\t$objRelated->save();\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t}",
"public function getStylepicker($dc)\n\t{\n\t\t$GLOBALS['TL_CSS']['stylepicker4ward'] = 'system/modules/_stylepicker4ward/assets/style.css';\n\n\t\t$url = 'system/modules/_stylepicker4ward/public/popup.php?tbl='.$dc->table.'&fld='.$dc->field.'&inputName=ctrl_'.$dc->inputName.'&id='.$dc->id;\n\n\t\tstatic $injected = false;\n\n\t\tif(!$injected)\n\t\t{\n\t\t\t$str = <<<CssButton\n<script type=\"text/javascript\">\nfunction openStylepickerPopup(url) {\n\tvar opt = {width: 775};\n\tvar max = (window.getSize().y-180).toInt();\n\tif (!opt.height || opt.height > max) opt.height = max;\n\tvar M = new SimpleModal({\n\t\t'width': opt.width,\n\t\t'draggable': false,\n\t\t'okBtn': 'OK',\n\t\t'overlayOpacity': .5,\n\t\t'onShow': function() { document.body.setStyle('overflow', 'hidden'); },\n\t\t'onHide': function() { document.body.setStyle('overflow', 'auto'); }\n\t});\n\tM.show({\n\t\t'title': 'Stylepicker',\n\t\t'contents': '<iframe src=\"' + url + '\" width=\"100%\" height=\"' + opt.height + '\" frameborder=\"0\"></iframe>'\n\t});\n}\n</script>\nCssButton;\n\t\t\t$injected = true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$str = '';\n\t\t}\n\n\t\treturn $str . ' <a href=\"javascript:openStylepickerPopup(\\''.$url.'\\');\">' . \\Image::getHtml('system/modules/_stylepicker4ward/assets/icon.png', $GLOBALS['TL_LANG']['MSC']['stylepicker4ward'], 'style=\"vertical-align:top;margin-left:3px;margin-top:3px;\"').'</a>';\n\n\t}",
"public function findByDomainSource($domain, $source);",
"public function UpdateStoresSource($request_params)\n\t{\n\t\techo $request_params['mov'] ;\n\t\tif ($request_params['mov'] == 'S' ){\n\t\t\t$params = $this->session->get('user');\n\t\t\t$result = $this->model->UpdateStoresSource($request_params);\n\t\t\t$res = $result;\n\t\t\techo $res;\n\t\t}\n\t\tif ($request_params['mov'] == 'T' ){\n\t\t\t$params = $this->session->get('user');\n\t\t\t$item = $this->model->SechingProducts($request_params);\n\t\t\t$num_items = $item->fetch_object();\n\t\t\tif ($num_items->items > 0){\n\t\t\t\t// echo 'update';\n\t\t\t\t// actualiza la cantidad en el almacen destino\n\t\t\t\t$result = $this->model->UpdateProducts($request_params);\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t// echo 'insert';\n\t\t\t\t//agrega la relación almacen - producto\n\t\t\t\t$result = $this->model->InsertProducts($request_params);\n\t\t\t}\n\t\t\t$res = $result;\n\t\t\techo $res;\n\t\t}\n\t}",
"public function getSource()\n {\n return 'store_distribution';\n }"
]
| [
"0.52189326",
"0.5051594",
"0.50426394",
"0.49332464",
"0.48159495",
"0.4789361",
"0.47097242",
"0.46579278",
"0.46525252",
"0.463299",
"0.4626332",
"0.45602253",
"0.45597297",
"0.45400694",
"0.45256445",
"0.45089716",
"0.44945216",
"0.44877732",
"0.44853666",
"0.44824114",
"0.44824114",
"0.44788218",
"0.44770613",
"0.4471426",
"0.44621816",
"0.44621816",
"0.44621816",
"0.44621816",
"0.44565648",
"0.44562584",
"0.44522926",
"0.4440872",
"0.44368485",
"0.4421423",
"0.44106546",
"0.4398602",
"0.43560633",
"0.43363172",
"0.43329147",
"0.43091565",
"0.43075585",
"0.4306696",
"0.4303576",
"0.4303576",
"0.4303576",
"0.4303576",
"0.43032315",
"0.42934847",
"0.4281542",
"0.42748308",
"0.42678747",
"0.4261441",
"0.42572942",
"0.42570317",
"0.42370284",
"0.42353633",
"0.4235174",
"0.42346635",
"0.42275095",
"0.42118168",
"0.42099416",
"0.4208493",
"0.42016536",
"0.42004082",
"0.42004082",
"0.4197519",
"0.4186157",
"0.4186157",
"0.4186157",
"0.41822094",
"0.41710073",
"0.4170497",
"0.41602734",
"0.4155353",
"0.41481906",
"0.41432723",
"0.4134096",
"0.41291636",
"0.41279286",
"0.41202676",
"0.4113122",
"0.41103673",
"0.41092056",
"0.4108464",
"0.4098274",
"0.4092864",
"0.4092242",
"0.4085107",
"0.4078933",
"0.40762672",
"0.40730044",
"0.40422305",
"0.4040636",
"0.40393293",
"0.4037963",
"0.40370643",
"0.4036729",
"0.403494",
"0.40283597",
"0.4027376",
"0.40263733"
]
| 0.0 | -1 |
Shows voltages in the nodes | static public function showVoltages($circuit, $return = false)
{
$text = "Operating point:\n\n";
foreach ($circuit->V as $k => $v)
{
$text .= 'V(' . $circuit->getNodeName($k) . ") \t\t = " . number_format($v, 6) . " V\n";
}
return $return ? $text : print($text);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function show(RedVelvetData $redVelvetData)\n {\n //\n }",
"public function tocar(){\n echo \"Tocando no volume: \" . $this->volume . \" decibéis. <br>\";\n }",
"public function vreme()\n {\n return view('mladenovac.vreme');\n }",
"public function show()\n {\n echo 'Value: ' . $this->value . '<br>';\n }",
"public function show(Vaksin $vaksin)\n {\n //\n }",
"public function display()\n {\n echo \"temperature:{$this->_subject->getTemperature()},humidity:{$this->_subject->getHumidity()},pressure:{$this->_subject->getPressure()}\" . PHP_EOL;\n }",
"function table_voltooid($conn)\n\t{\n\t\t$data=prepare_data_volt($conn);\n\t\t\n\t\tfor ($i=0;$i<count($data);$i++)\n\t\t{\n\t\t\techo \"<tr>\";\n\t\t\tforeach($data[$i] as $best)\n\t\t\t{\n\t\t\t\techo \"<td>$best</td>\";\n\t\t\t}\n\t\t\techo \"</tr>\";\n\t\t}\n\t}",
"public function show(Vat $vat)\n {\n //\n }",
"public function index()\n {\n $vids = Vid::all();\n return view('all.vid', ['vid' => $vids]);\n }",
"function printStatsKv() {\n\n\t\t$this->printStatsTableKv($this->table);\n\t\t$this->printStatsPlayersKv($this->table, $this->players);\n\n\t}",
"public function vxvAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('ArmensaViajesBundle:Viaje')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }",
"public function hasVoltage()\n {\n return $this->voltage !== null;\n }",
"public function mostrarVentas() {\n //String $retorno\n //Array Venta $col\n $retorno = \"\";\n $col = $this->getColVentas();\n for ($i = 0; $i < count($col); $i++) {\n $retorno .= $col[$i] . \"\\n\";\n $retorno .= \"-------------------------\\n\";\n }\n return $retorno;\n }",
"public function getVendas()\n {\n return $this->vendas;\n }",
"public function show(Ledgers $ledgers)\n {\n //\n }",
"public function index() {\r\n $this->genererVue();\r\n }",
"public function getShow()\n {\n echo \"Show TV!!!\";\n }",
"public function vitimas() {\n $this->validaAutenticacao();\n $vitimas = Container::getModel('Vitimas');\n $this->view->vitimas = $vitimas->getAllDashboard();\n $vitimas->__set('id', '1');\n $this->view->vtm = $vitimas->getVitima();\n $this->menu();\n $this->render('vitimas', 'layout-dashboard');\n }",
"public function show(Visitor $visitor)\n {\n //\n }",
"public function getVat()\n {\n return $this->_dVat;\n }",
"public function show(vendorequipment $vendorequipment)\n {\n //\n }",
"public function verDVDEnPlasma( ) {\n\n $respuesta=self::$plasma->verEntradaPantallaAV2();\n return $this->isError($respuesta,\"ver el lector de dvd en\");\n }",
"public function dvehicles(){\n\n\t\t\t$vehicles = DB::table('logistics_vehicles')\n\t\t\t\t->join('vehicle_types','logistics_vehicles.type', '=', 'vehicle_types.id')\n\t\t\t\t//->where('logistics_vehicles.tenant_id', Auth::user()->tenant_id)\n\t\t\t\t->where('logistics_vehicles.status', '=', 0)\n\t\t\t\t->orderBy('logistics_vehicles.status', 'DESC')\n\t\t\t\t->orderBy('logistics_vehicles.id', 'DESC')\n\t\t\t\t->get();\n\n\t\t\treturn view('backend.logistics.vehicles', ['vehicles' => $vehicles]);\n\t\t}",
"public function actionView($id)\n {\n return $this->render('variant/view', [\n 'model' => $this->findModel($id),\n ]);\n }",
"public function index()\n {\n $dati_verdura = Vegetable::all();\n $data = [\n 'verdure' => $dati_verdura\n ];\n return view('vegetables.index', $data);\n }",
"public function getVout()\n {\n return $this->vout;\n }",
"public function videoconferenciaSubirVolumen( ) {\n $this->subirVolumen();\n //$this->setComando(\"SUBIR_VOLUMEN\");\n }",
"public function show(VTPassLogs $vTPassLogs)\n {\n //\n }",
"function __construct($valores, $volver) {\n $this->valores = $valores;\n $this->volver = $volver;\n $this->render();\n }",
"public function show(Vente $vente)\n {\n //\n }",
"public function show(Tvrtka $tvrtka)\n {\n //\n }",
"public function index()\n {\n return view('vaksin.index',[\n \"vaksins\" => Vaksin::all()\n ]);\n }",
"public function index()\n {\n return view('admin.vats.index', [\n 'vats' => Vat::latest('date')->paginate(10),\n // 'transferences' => Transference::get(),\n 'ttnproducts' => Ttnproduct::get(),\n 'costs' => Cost::get(),\n ]);\n }",
"public function show() {\n echo $this->mountElement();\n }",
"public function show(Node $node)\n {\n //\n }",
"public function show(Node $node)\n {\n //\n }",
"public function voire()\n {\n $ventes = Vente::all();\n $Todayventes = Vente::whereDate('created_at', Carbon::today())->where('statut', 'vendu')->get();\n $TodayVerssement = Vente::whereDate('created_at', Carbon::today())->where(function($query) {\n $query->where('statut', 'verssement')\n ->Orwhere('statut', 'verssement terminé');\n })->get();\n\n $total = $Todayventes->sum('prix_total');\n $totalVerssement = $TodayVerssement->sum('verssement');\n\n return view('ventes.voire', ['ventes'=> $ventes,'total'=>$total, 'totalVerssement' => $totalVerssement]);\n }",
"public function index()\n\t{\n\t\t$table = Laratable::make(Variant::query(), [\n\t\t\t'#' => 'id',\n\t\t\t'Name' => 'admin_name',\n\t\t\t'Display Name' => 'name',\n\t\t\t'Values' => ['data', function($variant) {\n\t\t\t\t$values = [];\n\t\t\t\tforeach($variant->data['values'] as $value) {\n\t\t\t\t\t$values[] = $value['name'];\n\t\t\t\t}\n\n\t\t\t\treturn implode(', ', $values);\n\t\t\t}],\n\t\t]);\n\n\t\t$table->editable(true, url('admin/variants/{id}/edit'));\n\t\t$table->destroyable(true, url('admin/variants/{id}'));\n\n\t\t$table->filterable(true);\n\t\t$table->addFilter('name', 'search');\n\t\t$table->paginate(true, 13);\n\n\t\treturn $this->view('admin.variants_index')\n\t\t\t->with([\n\t\t\t\t'table' => $table->render(),\n\t\t\t\t'pagination' => $table->paginator->render(),\n\t\t\t\t'filters' => $table->buildFilters()->addClass('inline')\n\t\t\t]);\n\t}",
"public function arrayvector()\n {\n // $jajal = Token::all();\n $jajal = Hasil_token::all();\n $jurnal = Klasifikasi::all();\n // $jurnal = Klasifikasi::find(1);\n // $abstrak = $jurnal->preproses;\n // // $pre = $this->preproses($abstrak);\n // $token = explode(\" \", $abstrak);\n \n return view('admin.vector')->with([\n // 'cinta' => $cinta,\n 'jajal' =>$jajal,\n 'jurnal' => $jurnal,\n 'bobot' => $bobot\n // 'token' => $token,\n // 'array' => $array,\n // 'controller' => $this\n ]);\n }",
"public function getSupplyVoltage()\n {\n $payload = '';\n\n $data = $this->sendRequest(self::FUNCTION_GET_SUPPLY_VOLTAGE, $payload);\n\n $payload = unpack('v1voltage', $data);\n\n return $payload['voltage'];\n }",
"public function hdmi()\n {\n }",
"public function showOutput()\n {\n $this->diagram->showOutput($this->getFileName('.dia'));\n }",
"public function vendeurs(Request $request)\n {\n $userid = Auth::user()->id;\n\n $ventes = $this->stat->getStatsTotalVendeur($userid);\n\n $data = array();\n\n foreach ($ventes as $vente) {\n $data = array_add($data, $vente->prenom.' '.$vente->nom, array($vente->value));\n }\n\n return view('backend.stats.vendeurs')->with(['request'=> $request, 'data'=>$data]);\n }",
"public function bajarVolumen( ) {\n $vol = $this->getVolumen();\n if ($vol > 0) {\n $vol = $vol - 8;\n }\n else {\n $vol = 0;\n }\n $this->setVolumen($vol);\n }",
"public function index()\n {\n $voters = $this->voterService->getAllVoters();\n return view('admin.voter',[\n 'voters' => $voters\n ]);\n }",
"public function index()\n {\n //\n $company_vehicles = CompanyVehicle::where('status', \"out\")->get();\n $rfids = Rfid::where('status', '=', \"available\")->get();\n return view('admin.guests.vehicle', ['rfids' => $rfids, 'company_vehicles' => $company_vehicles]);\n }",
"public function vistorNoes(noes $noes)\n {\n echo 'This '.$noes->getName().\"</br>\";\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}",
"function getShow() {\n\n global $f3;\n global $tvdb;\n\n $series = $f3->get('PARAMS.param1');\n $data = $tvdb->getSeries($series);\n\n echo json_encode($data);\n }",
"public function show(vaccine $vaccine)\n {\n //\n }",
"public function actionIndex()\n {\n $searchModel = new VedSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }",
"public function index()\n {\n return view('vehicle.ctpl');\n }",
"public function render_my_vat_number_content() {\n\t\t$vars = array(\n\t\t\t'vat_number' => get_user_meta( get_current_user_id(), 'vat_number', true ),\n\t\t\t'show_title' => version_compare( WC()->version, '2.6', '<' ),\n\t\t\t'messages' => $this->messages,\n\t\t);\n\n\t\twc_get_template(\n\t\t\t'my-account/my-vat-number.php',\n\t\t\t$vars,\n\t\t\t'woocommerce-eu-vat-number',\n\t\t\tuntrailingslashit( plugin_dir_path( WC_EU_VAT_FILE ) ) . '/templates/'\n\t\t);\n\t}",
"public function subirVolumen( ) {\n $vol = $this->getVolumen();\n if ($vol < 100) {\n $vol = $vol + 8;\n }\n else {\n $vol = 8;\n }\n $this->setVolumen($vol);\n }",
"public function estVivant(){\n\n }",
"public function getElevesVolontaires()\n {\n return $this->elevesVolontaires;\n }",
"public function show(Evolution $evolution)\n {\n //\n }",
"public function show(Version $version)\n {\n //\n }",
"public function view_videos($args)\n {\n $this->registry->template->Title = \"HiiFan News Portal :: Admin Home Page : View Videos\";\n $videoListArray = $this->registry->model->run(\"getAllVideoList\", $args);\n $this->registry->template->PresentPage = $args['start_page'];\n $this->registry->template->VideoListArray = $videoListArray;\n $this->registry->template->show(\"view_videos\");\n }",
"public function viewsensorsAction()\n {\n $hardware = null;\n $sensorData = null;\n\n if ($this->_getParam('id') == null) {\n $this->view->errorMessage = $this->view->translate->_('Please provide a hardware id.');\n } else {\n $client = SoftLayer_SoapClient::getClient('SoftLayer_Hardware_Server', $this->_getParam('id'));\n\n try {\n /*\n * Asynchronous calls will execute faster.\n */\n $hardware = $client->getObjectAsync();\n $sensorData = $client->getSensorDataWithGraphsAsync();\n\n $hardware = $hardware->wait();\n $sensorData = $sensorData->wait();\n } catch (Exception $e) {\n $this->view->errorMessage = $this->view->translate->_('Unable to retrieve hardware and sensor data.') . ' ' . $e->getMessage();\n }\n }\n\n if ($hardware != null && $sensorData != null) {\n $this->view->pageTitle = $hardware->hostname . '.' . $hardware->domain . ' ' . $this->view->translate->_('hardware sensors');\n $this->view->headTitle($hardware->hostname . '.' . $hardware->domain . ' ' . $this->view->translate->_('hardware sensors'));\n }\n\n $this->view->hardware = $hardware;\n $this->view->sensorData = $sensorData;\n }",
"public function vue($name = 'World')\n\t{\n\t\t?>\n\t\t<p>The format of the function is:</p>\n\t\t<pre class=\"code php\">vue($path, $data = []);</pre>\n\n\t\t<p>Pass absolute paths or a <code>sketchpad::</code> path along with any data <code>array</code> like so:</p>\n\t\t<pre><code class=\"php\">vue('sketchpad::help/vue/form', ['name' => 'World']);</code></pre>\n\n\t\t<p>The data is injected into the view as a local variable <code>$data</code>, so just reference it in your view\n\t\t\tlike so:</p>\n\t\t<?php\n\t\tcode(base_path('vendor/davestewart/sketchpad/package/views/help/output/vue.vue'), 'html');\n\t\techo '<hr>';\n\t\tvue('sketchpad::help/output/vue', ['name' => $name]);\n\t}",
"public function vehicles(){\n\n\t\t\t$vehicles = DB::table('logistics_vehicles')\n\t\t\t\t->join('vehicle_types','logistics_vehicles.type', '=', 'vehicle_types.id')\n\t\t\t\t//->where('logistics_vehicles.tenant_id', Auth::user()->tenant_id)\n\t\t\t\t->where('logistics_vehicles.status', '=', 1)\n\t\t\t\t->orderBy('logistics_vehicles.status', 'DESC')\n\t\t\t\t->orderBy('logistics_vehicles.id', 'DESC')\n\t\t\t\t->get();\n\n\t\t\treturn view('backend.logistics.vehicles', ['vehicles' => $vehicles]);\n\t\t}",
"public function index()\n {\n $items = Servidores::with('parentServidores','servidores2','roles','so','versionn','marcas','modelos','tipos','estados','usos')->get();\n\n return view('admin.servidoresVistas.index', compact('items'));\n }",
"public function show(vehicle $vehicle)\n {\n //\n }",
"public function show(Vaccination $vaccination)\n {\n //\n }",
"protected function showVersion() {\n static $shown = false;\n if (!$shown) {\n $shown = true;\n echo Version::getInfoString() . \"\\n\\n\";\n }\n }",
"public function show(Vehicle $vechile)\n {\n //\n }",
"public function show(Variant $variant)\n {\n //\n }",
"public function vaziuoti($km){\n echo $this->kebuloNumeris.\"Liko vaziuoti $km <br />\";\n }",
"public function show(Graph $graph, Node $node)\n {\n //\n }",
"function getVat($productId, $showPercent = '')\r\n\t{\r\n\t\t$sql = $GLOBALS['db']->Query(\"SELECT Preis,UstZone FROM \" . PREFIX . \"_modul_shop_artikel WHERE Id = '$productId'\");\r\n\t\t$row = $sql->fetchrow();\r\n\t\t$sql->close();\r\n\r\n\t\t$sql2 = $GLOBALS['db']->Query(\"SELECT Wert FROM \" . PREFIX . \"_modul_shop_ust WHERE Id = '$row->UstZone'\");\r\n\t\t$row2 = $sql2->fetchrow();\r\n\t\t$sql2->close();\r\n\r\n\t\t$mu = explode('.', $row2->Wert);\r\n\t\t$multiplier = (strlen($mu[0])==1) ? '1.0' . $mu[0] . $mu[1] : '1.' . $mu[0] . $mu[1];\r\n\r\n\t\t$vat = ($showPercent==1) ? $row2->Wert : $multiplier;\r\n\t\treturn $vat;//echo \"$row->Preis / 100 * $row2->Wert --> $vat € (Multi:$multiplier)<br>\";\r\n\t}",
"public function show() {\n \n }",
"public function index()\n {\n $data = DB::table('vehicle')\n ->join('vehicle_type', 'vehicle_type.id', '=', 'vehicle.vehicle_type_id') \n ->select('vehicle.*','vehicle_type.vehicle_type')\n ->get();\n return view('admin.vehicles.view_vehicles')->with(compact('data'));\n }",
"public function show()\n\t{\n\t\t\n\t}",
"public function printValues() {\n\t\t//print_r($this->objects);\n\t\tforeach ($this->objects as $value) {\n\t\t\techo \"$value<br/>\";\n\t\t}\n\t}",
"public function affiche (){\n\t\t\t//affiche en retour à la ligne\n\t\t\techo '<pre>';\n\t\t\tprint_r(array(\n\t\t\t\tname=>$this->Getname(),\n\t\t\t\tpv=>$this->Getpv(),\n\t\t\t\tlevel=>$this->Getlevel(),\n\t\t\t\tattack1=>$this->Getattack1(),\n\t\t\t\tattack2=>$this->Getattack2(),\n\t\t\t\ttype=>$this->Gettype()\n\t\t\t\t));\n\t\t\techo '</pre>';\n\t\t}",
"public function show()\n\t{\n\t\techo $this->tags();\n\t}",
"public function show(jovenes $jovenes)\n {\n //\n }",
"public function show(VendingMachine $vendingMachine)\n {\n //\n }",
"public function index()\n {\n //\n $vaccine = vaccine::orderBy(\"id\",\"desc\")->get();\n return view(\"admin.vaccine\",compact(\"vaccine\"));\n }",
"public function actionVariables(){\n\n \n $model= new AccionCentralizadaVariableEjecucion();\n \n return $this->render('variables', [\n 'model' => $model->variablesAsignadas(),//provider,\n ]);\n\n }",
"public function getVyresil()\n {\n return $this->vyresil;\n }",
"public function show(Vision $vision)\n {\n //\n }",
"function display() {\n\t\tforeach($this as $prop => $val) {\n\t\t\techo $val;\n\t\t}\n\t}",
"public function getVladder()\n {\n return $this->Vladder;\n }",
"public function printSeries()\n {\n echo json_encode($this->series);\n }",
"public function show()\n {\n \n }",
"public function show()\n {\n \n }",
"function printvalues(){\n\t\tprint_r([$this->bedroom,$this->bathroom,$this->kitchen, $this->livingroom]);\n\t}",
"public function index()\n {\n //\n return view('app', [\n 'module' => 'electricity_meter',\n 'data' => ElectricityMeter::select('*')\n ->join('mst_unit_apart','mst_unit_apart.id_unit_apart','=','listrik_meter.id_unit_apart')\n ->join('mst_tower','mst_tower.id_tower','=','mst_unit_apart.id_tower')\n ->join('mst_floor','mst_floor.id_floor','=','mst_unit_apart.id_floor')\n ->where('mst_unit_apart.status', '=', 1)\n ->get()\n ]);\n }",
"static function vox($utterance, $params = null){\n\n\t\textract(self::vox_prep_args($params) );\n\n\t\t$format = (!isset($format)) ? 'html' : $format;\n\t\t$sentence = var_export($utterance, 1);\n\n\t\tswitch($format) {\n\n\t\t\tcase 'html': \n\t\t\t$articulation = self::vox_html($sentence, $params);\n\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t$articulation = $sentence;\n\t\t\tbreak;\n\t\t}\n\n\t\techo $articulation;\n\t\treturn $articulation;\n\t}",
"public function index()\n {\n $sps = Speedy::getModelInstance( 'sp' )->where( 'valid' , '1' )->where( 'sp_zt' ,\n null )->orderBy( 'created_at' , 'DESC' )->get();\n\n return view( 'vendor.speedy.admin.sp.index-vue' , compact( 'sps' ) );\n }",
"public function index()\n {\t\n $this->variation();\n }",
"public function show()\n\t{\n\n\t}",
"public function show()\n {\n //\n }",
"public function show(qlsv_sinhvien $qlsv_sinhvien)\n {\n //\n }",
"public function Index()\n {\n \n return view('Proyecto.Desarrollo.Ventas.ReportesVentas');\n }",
"public function index()\n {\n $variants = CarVariant::latest()->paginate(30);\n return view('admin.car_variants.index', compact('variants'));\n }"
]
| [
"0.608324",
"0.5731048",
"0.56518805",
"0.56453073",
"0.5288346",
"0.52365226",
"0.52140284",
"0.5105469",
"0.5098585",
"0.5083675",
"0.50833577",
"0.5075399",
"0.50057584",
"0.5004259",
"0.49965352",
"0.4953418",
"0.4925365",
"0.4925169",
"0.49231127",
"0.4910553",
"0.48859286",
"0.48733833",
"0.48671958",
"0.48608637",
"0.4848896",
"0.4847833",
"0.48331943",
"0.48309475",
"0.4828153",
"0.48232946",
"0.48161316",
"0.48015168",
"0.4799732",
"0.47984332",
"0.47964212",
"0.47964212",
"0.47826606",
"0.47787875",
"0.47750053",
"0.47624493",
"0.47561347",
"0.47557998",
"0.47544247",
"0.47526598",
"0.47514412",
"0.47486463",
"0.47481027",
"0.4747898",
"0.4747898",
"0.4747898",
"0.47418022",
"0.47410825",
"0.47408926",
"0.4735432",
"0.47223487",
"0.47048116",
"0.4703956",
"0.47031343",
"0.47006595",
"0.46992472",
"0.46901053",
"0.4687736",
"0.46839684",
"0.46787485",
"0.4672066",
"0.46558425",
"0.46538574",
"0.46530947",
"0.46525455",
"0.46509957",
"0.46473646",
"0.46325696",
"0.46307424",
"0.46279508",
"0.4619002",
"0.46120116",
"0.4600479",
"0.45941648",
"0.4584946",
"0.45809817",
"0.4578862",
"0.45711198",
"0.45653716",
"0.45635673",
"0.4560331",
"0.4557096",
"0.45569736",
"0.45532933",
"0.45501012",
"0.45501012",
"0.4547189",
"0.45449197",
"0.45415846",
"0.45411083",
"0.45389125",
"0.4531423",
"0.45249492",
"0.4521328",
"0.45170286",
"0.45123926"
]
| 0.6228776 | 0 |
Display a listing of the resource. | public function index()
{
$posts = Post::query()->orderBy('created_at', 'DESC')->paginate();
return view('post.index', compact('posts'));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }",
"public function listing();",
"function index() {\n\t\t$this->show_list();\n\t}",
"public function actionList() {\n $this->_getList();\n }",
"public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }",
"public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }",
"public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }",
"function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}",
"public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }",
"public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }",
"public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}",
"function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}",
"public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }",
"public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}",
"public function actionRestList() {\n\t $this->doRestList();\n\t}",
"public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}",
"public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }",
"public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }",
"public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}",
"public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}",
"public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }",
"public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }",
"public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }",
"public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }",
"public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}",
"public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }",
"public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}",
"public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }",
"public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}",
"public function index()\n {\n $this->list_view();\n }",
"public function index()\n {\n $this->list_view();\n }",
"public function index()\n {\n $this->list_view();\n }",
"public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }",
"public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }",
"public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}",
"public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }",
"public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }",
"public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }",
"public function index()\n {\n return Resources::collection(Checking::paginate());\n }",
"public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }",
"public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }",
"public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }",
"public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }",
"public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }",
"public function view(){\n\t\t$this->buildListing();\n\t}",
"public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }",
"public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }",
"public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }",
"public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }",
"public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }",
"public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }",
"public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }",
"public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }",
"public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }",
"public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}",
"public function listAction() {}",
"public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }",
"public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }",
"public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }",
"public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }",
"public function executeList()\n {\n $this->setTemplate('list');\n }",
"public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }",
"function listing() {\r\n\r\n }",
"public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }",
"public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }",
"public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}",
"public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }",
"public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }",
"public function _index(){\n\t $this->_list();\n\t}",
"public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}",
"function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}",
"public function index()\n {\n $this->booklist();\n }",
"public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }",
"public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }",
"public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }",
"public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }",
"public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }",
"public function indexAction() {\n $this->_forward('list');\n }",
"public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }",
"public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }",
"public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}",
"public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }",
"public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }",
"public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }",
"public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }",
"public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }",
"public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }",
"public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }",
"public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}",
"public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }",
"public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }",
"public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }",
"public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}",
"public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }",
"public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }",
"public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }",
"public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }",
"public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }",
"public function index()\n {\n return view('admin.resources.index');\n }",
"public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}"
]
| [
"0.7446777",
"0.736227",
"0.73005503",
"0.72478926",
"0.71631265",
"0.71489686",
"0.7131636",
"0.7105969",
"0.71029514",
"0.7101372",
"0.70508176",
"0.6995128",
"0.69890636",
"0.6934895",
"0.6900203",
"0.6899281",
"0.6891734",
"0.6887235",
"0.68670005",
"0.6849741",
"0.6830523",
"0.6802689",
"0.6797",
"0.67957735",
"0.67871135",
"0.6760129",
"0.67427456",
"0.6730486",
"0.67272323",
"0.67255723",
"0.67255723",
"0.67255723",
"0.67177945",
"0.6707866",
"0.6706713",
"0.6704375",
"0.6664782",
"0.6662871",
"0.6660302",
"0.6659404",
"0.6656656",
"0.6653517",
"0.6647965",
"0.6620322",
"0.66185474",
"0.6618499",
"0.6606105",
"0.6600617",
"0.65996987",
"0.6594775",
"0.6587389",
"0.6585109",
"0.6581641",
"0.6581017",
"0.6577157",
"0.65747666",
"0.6572513",
"0.65721947",
"0.6570553",
"0.65646994",
"0.6563556",
"0.6554194",
"0.65529937",
"0.65460825",
"0.65368485",
"0.653429",
"0.65328294",
"0.6526759",
"0.6526695",
"0.6526284",
"0.65191334",
"0.65183175",
"0.65174305",
"0.651703",
"0.65141153",
"0.6507088",
"0.65061647",
"0.6504046",
"0.64942145",
"0.6491893",
"0.64883405",
"0.6486392",
"0.6485077",
"0.64846045",
"0.6478858",
"0.64756656",
"0.64726377",
"0.6471126",
"0.64701074",
"0.6467418",
"0.6462195",
"0.64618355",
"0.6459199",
"0.6457831",
"0.6454631",
"0.64533997",
"0.6451915",
"0.6450861",
"0.6449301",
"0.64492667",
"0.64469045"
]
| 0.0 | -1 |
Show the form for creating a new resource. | public function create()
{
return view('post.create');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return view('admin.resources.create');\n }",
"public function create(){\n\n return view('resource.create');\n }",
"public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}",
"public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }",
"public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }",
"public function create()\n {\n return view ('forms.create');\n }",
"public function create ()\n {\n return view('forms.create');\n }",
"public function create()\n\t{\n\t\treturn view('faith.form');\n\t}",
"public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }",
"public function create()\n {\n return view(\"request_form.form\");\n }",
"public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }",
"public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle é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(PostStoreRule $request)
{
$data = $request->validated();
$data['user_id'] = Auth::id();
Post::query()->create($data);
return redirect(route('post.index'));
} | {
"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(Post $post)
{
return view('post.view', compact('post'));
} | {
"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(Post $post)
{
return view('post.edit', compact('post'));
} | {
"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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.