id int32 0 241k | repo stringlengths 6 63 | path stringlengths 5 140 | func_name stringlengths 3 151 | original_string stringlengths 84 13k | language stringclasses 1
value | code stringlengths 84 13k | code_tokens list | docstring stringlengths 3 47.2k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 91 247 |
|---|---|---|---|---|---|---|---|---|---|---|---|
203,400 | m6w6/pq-gateway | lib/pq/Gateway/Table.php | Table.getIdentity | function getIdentity() {
if (!isset($this->identity)) {
$this->identity = new Table\Identity($this);
}
return $this->identity;
} | php | function getIdentity() {
if (!isset($this->identity)) {
$this->identity = new Table\Identity($this);
}
return $this->identity;
} | [
"function",
"getIdentity",
"(",
")",
"{",
"if",
"(",
"!",
"isset",
"(",
"$",
"this",
"->",
"identity",
")",
")",
"{",
"$",
"this",
"->",
"identity",
"=",
"new",
"Table",
"\\",
"Identity",
"(",
"$",
"this",
")",
";",
"}",
"return",
"$",
"this",
"-... | Get the primary key
@return \pq\Gateway\Table\Identity | [
"Get",
"the",
"primary",
"key"
] | 58233722a06fd742f531f8f012ea540b309303da | https://github.com/m6w6/pq-gateway/blob/58233722a06fd742f531f8f012ea540b309303da/lib/pq/Gateway/Table.php#L206-L211 |
203,401 | m6w6/pq-gateway | lib/pq/Gateway/Table.php | Table.getRelations | function getRelations() {
if (!isset($this->relations)) {
$this->relations = new Table\Relations($this);
}
return $this->relations;
} | php | function getRelations() {
if (!isset($this->relations)) {
$this->relations = new Table\Relations($this);
}
return $this->relations;
} | [
"function",
"getRelations",
"(",
")",
"{",
"if",
"(",
"!",
"isset",
"(",
"$",
"this",
"->",
"relations",
")",
")",
"{",
"$",
"this",
"->",
"relations",
"=",
"new",
"Table",
"\\",
"Relations",
"(",
"$",
"this",
")",
";",
"}",
"return",
"$",
"this",
... | Get foreign key relations
@return \pq\Gateway\Table\Relations | [
"Get",
"foreign",
"key",
"relations"
] | 58233722a06fd742f531f8f012ea540b309303da | https://github.com/m6w6/pq-gateway/blob/58233722a06fd742f531f8f012ea540b309303da/lib/pq/Gateway/Table.php#L228-L233 |
203,402 | m6w6/pq-gateway | lib/pq/Gateway/Table.php | Table.notify | function notify(\pq\Gateway\Row $row = null, $event = null, array &$where = null) {
foreach ($this->observers as $observer) {
$observer->update($this, $row, $event, $where);
}
} | php | function notify(\pq\Gateway\Row $row = null, $event = null, array &$where = null) {
foreach ($this->observers as $observer) {
$observer->update($this, $row, $event, $where);
}
} | [
"function",
"notify",
"(",
"\\",
"pq",
"\\",
"Gateway",
"\\",
"Row",
"$",
"row",
"=",
"null",
",",
"$",
"event",
"=",
"null",
",",
"array",
"&",
"$",
"where",
"=",
"null",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"observers",
"as",
"$",
"obse... | Implements \SplSubject | [
"Implements",
"\\",
"SplSubject"
] | 58233722a06fd742f531f8f012ea540b309303da | https://github.com/m6w6/pq-gateway/blob/58233722a06fd742f531f8f012ea540b309303da/lib/pq/Gateway/Table.php#L282-L286 |
203,403 | m6w6/pq-gateway | lib/pq/Gateway/Table.php | Table.onResult | public function onResult(\pq\Result $result = null) {
if ($result && $result->status != \pq\Result::TUPLES_OK) {
return $result;
}
$rowset = $this->getRowsetPrototype();
if (is_callable($rowset)) {
return $rowset($result);
} elseif ($rowset) {
return new $rowset($this, $result);
}
return $r... | php | public function onResult(\pq\Result $result = null) {
if ($result && $result->status != \pq\Result::TUPLES_OK) {
return $result;
}
$rowset = $this->getRowsetPrototype();
if (is_callable($rowset)) {
return $rowset($result);
} elseif ($rowset) {
return new $rowset($this, $result);
}
return $r... | [
"public",
"function",
"onResult",
"(",
"\\",
"pq",
"\\",
"Result",
"$",
"result",
"=",
"null",
")",
"{",
"if",
"(",
"$",
"result",
"&&",
"$",
"result",
"->",
"status",
"!=",
"\\",
"pq",
"\\",
"Result",
"::",
"TUPLES_OK",
")",
"{",
"return",
"$",
"r... | Retreives the result of an executed query
@param \pq\Result $result
@return mixed | [
"Retreives",
"the",
"result",
"of",
"an",
"executed",
"query"
] | 58233722a06fd742f531f8f012ea540b309303da | https://github.com/m6w6/pq-gateway/blob/58233722a06fd742f531f8f012ea540b309303da/lib/pq/Gateway/Table.php#L302-L315 |
203,404 | m6w6/pq-gateway | lib/pq/Gateway/Table.php | Table.find | function find(array $where = null, $order = null, $limit = 0, $offset = 0, $lock = null) {
$query = $this->getQueryWriter()->reset();
$query->write("SELECT * FROM", $this->conn->quoteName($this->name));
if ($where) {
$query->write("WHERE")->criteria($where);
}
if ($order) {
$query->write("ORDER BY", $or... | php | function find(array $where = null, $order = null, $limit = 0, $offset = 0, $lock = null) {
$query = $this->getQueryWriter()->reset();
$query->write("SELECT * FROM", $this->conn->quoteName($this->name));
if ($where) {
$query->write("WHERE")->criteria($where);
}
if ($order) {
$query->write("ORDER BY", $or... | [
"function",
"find",
"(",
"array",
"$",
"where",
"=",
"null",
",",
"$",
"order",
"=",
"null",
",",
"$",
"limit",
"=",
"0",
",",
"$",
"offset",
"=",
"0",
",",
"$",
"lock",
"=",
"null",
")",
"{",
"$",
"query",
"=",
"$",
"this",
"->",
"getQueryWrit... | Find rows in the table
@param array $where
@param array|string $order
@param int $limit
@param int $offset
@param string $lock
@return mixed | [
"Find",
"rows",
"in",
"the",
"table"
] | 58233722a06fd742f531f8f012ea540b309303da | https://github.com/m6w6/pq-gateway/blob/58233722a06fd742f531f8f012ea540b309303da/lib/pq/Gateway/Table.php#L326-L345 |
203,405 | m6w6/pq-gateway | lib/pq/Gateway/Table.php | Table.of | function of(Row $foreign, $ref = null, $order = null, $limit = 0, $offset = 0) {
// select * from $this where $this->$foreignColumn = $foreign->$referencedColumn
if (!($rel = $this->getRelation($foreign->getTable()->getName(), $ref))) {
return $this->onResult(null);
}
$where = array();
foreach ($rel ... | php | function of(Row $foreign, $ref = null, $order = null, $limit = 0, $offset = 0) {
// select * from $this where $this->$foreignColumn = $foreign->$referencedColumn
if (!($rel = $this->getRelation($foreign->getTable()->getName(), $ref))) {
return $this->onResult(null);
}
$where = array();
foreach ($rel ... | [
"function",
"of",
"(",
"Row",
"$",
"foreign",
",",
"$",
"ref",
"=",
"null",
",",
"$",
"order",
"=",
"null",
",",
"$",
"limit",
"=",
"0",
",",
"$",
"offset",
"=",
"0",
")",
"{",
"// select * from $this where $this->$foreignColumn = $foreign->$referencedColumn",... | Get the child rows of a row by foreign key
@param \pq\Gateway\Row $foreign
@param string $ref optional fkey name
@param string $order
@param int $limit
@param int $offset
@return mixed | [
"Get",
"the",
"child",
"rows",
"of",
"a",
"row",
"by",
"foreign",
"key"
] | 58233722a06fd742f531f8f012ea540b309303da | https://github.com/m6w6/pq-gateway/blob/58233722a06fd742f531f8f012ea540b309303da/lib/pq/Gateway/Table.php#L356-L369 |
203,406 | m6w6/pq-gateway | lib/pq/Gateway/Table.php | Table.by | function by(Row $foreign, $ref = null) {
// select * from $this where $this->$referencedColumn = $me->$foreignColumn
if (!($rel = $foreign->getTable()->getRelation($this->getName(), $ref))) {
return $this->onResult(null);
}
$where = array();
foreach ($rel as $key => $ref) {
$where["$ref="] = $fore... | php | function by(Row $foreign, $ref = null) {
// select * from $this where $this->$referencedColumn = $me->$foreignColumn
if (!($rel = $foreign->getTable()->getRelation($this->getName(), $ref))) {
return $this->onResult(null);
}
$where = array();
foreach ($rel as $key => $ref) {
$where["$ref="] = $fore... | [
"function",
"by",
"(",
"Row",
"$",
"foreign",
",",
"$",
"ref",
"=",
"null",
")",
"{",
"// select * from $this where $this->$referencedColumn = $me->$foreignColumn",
"if",
"(",
"!",
"(",
"$",
"rel",
"=",
"$",
"foreign",
"->",
"getTable",
"(",
")",
"->",
"getRel... | Get the parent rows of a row by foreign key
@param \pq\Gateway\Row $foreign
@param string $ref
@return mixed | [
"Get",
"the",
"parent",
"rows",
"of",
"a",
"row",
"by",
"foreign",
"key"
] | 58233722a06fd742f531f8f012ea540b309303da | https://github.com/m6w6/pq-gateway/blob/58233722a06fd742f531f8f012ea540b309303da/lib/pq/Gateway/Table.php#L377-L389 |
203,407 | m6w6/pq-gateway | lib/pq/Gateway/Table.php | Table.with | function with(array $relations, array $where = null, $order = null, $limit = 0, $offset = 0) {
$qthis = $this->conn->quoteName($this->getName());
$query = $this->getQueryWriter()->reset();
$query->write("SELECT", "$qthis.*", "FROM", $qthis);
foreach ($relations as $relation) {
if (!($relation instanceof Tabl... | php | function with(array $relations, array $where = null, $order = null, $limit = 0, $offset = 0) {
$qthis = $this->conn->quoteName($this->getName());
$query = $this->getQueryWriter()->reset();
$query->write("SELECT", "$qthis.*", "FROM", $qthis);
foreach ($relations as $relation) {
if (!($relation instanceof Tabl... | [
"function",
"with",
"(",
"array",
"$",
"relations",
",",
"array",
"$",
"where",
"=",
"null",
",",
"$",
"order",
"=",
"null",
",",
"$",
"limit",
"=",
"0",
",",
"$",
"offset",
"=",
"0",
")",
"{",
"$",
"qthis",
"=",
"$",
"this",
"->",
"conn",
"->"... | Get rows dependent on other rows by foreign keys
@param array $relations
@param array $where
@param string $order
@param int $limit
@param int $offset
@return mixed | [
"Get",
"rows",
"dependent",
"on",
"other",
"rows",
"by",
"foreign",
"keys"
] | 58233722a06fd742f531f8f012ea540b309303da | https://github.com/m6w6/pq-gateway/blob/58233722a06fd742f531f8f012ea540b309303da/lib/pq/Gateway/Table.php#L400-L443 |
203,408 | m6w6/pq-gateway | lib/pq/Gateway/Table.php | Table.create | function create(array $data = null, $returning = "*") {
$query = $this->getQueryWriter()->reset();
$query->write("INSERT INTO", $this->conn->quoteName($this->name));
if ($data) {
$first = true;
$params = array();
foreach ($data as $key => $val) {
$query->write($first ? "(" : ",", $key);
$params[]... | php | function create(array $data = null, $returning = "*") {
$query = $this->getQueryWriter()->reset();
$query->write("INSERT INTO", $this->conn->quoteName($this->name));
if ($data) {
$first = true;
$params = array();
foreach ($data as $key => $val) {
$query->write($first ? "(" : ",", $key);
$params[]... | [
"function",
"create",
"(",
"array",
"$",
"data",
"=",
"null",
",",
"$",
"returning",
"=",
"\"*\"",
")",
"{",
"$",
"query",
"=",
"$",
"this",
"->",
"getQueryWriter",
"(",
")",
"->",
"reset",
"(",
")",
";",
"$",
"query",
"->",
"write",
"(",
"\"INSERT... | Insert a row into the table
@param array $data
@param string $returning
@return mixed | [
"Insert",
"a",
"row",
"into",
"the",
"table"
] | 58233722a06fd742f531f8f012ea540b309303da | https://github.com/m6w6/pq-gateway/blob/58233722a06fd742f531f8f012ea540b309303da/lib/pq/Gateway/Table.php#L451-L471 |
203,409 | m6w6/pq-gateway | lib/pq/Gateway/Table.php | Table.update | function update(array $where, array $data, $returning = "*") {
$query = $this->getQueryWriter()->reset();
$query->write("UPDATE", $this->conn->quoteName($this->name));
$first = true;
foreach ($data as $key => $val) {
$query->write($first ? "SET" : ",", $key, "=",
$query->param($val, $this->getAttributes... | php | function update(array $where, array $data, $returning = "*") {
$query = $this->getQueryWriter()->reset();
$query->write("UPDATE", $this->conn->quoteName($this->name));
$first = true;
foreach ($data as $key => $val) {
$query->write($first ? "SET" : ",", $key, "=",
$query->param($val, $this->getAttributes... | [
"function",
"update",
"(",
"array",
"$",
"where",
",",
"array",
"$",
"data",
",",
"$",
"returning",
"=",
"\"*\"",
")",
"{",
"$",
"query",
"=",
"$",
"this",
"->",
"getQueryWriter",
"(",
")",
"->",
"reset",
"(",
")",
";",
"$",
"query",
"->",
"write",... | Update rows in the table
@param array $where
@param array $data
@param string $returning
@retunr mixed | [
"Update",
"rows",
"in",
"the",
"table"
] | 58233722a06fd742f531f8f012ea540b309303da | https://github.com/m6w6/pq-gateway/blob/58233722a06fd742f531f8f012ea540b309303da/lib/pq/Gateway/Table.php#L480-L494 |
203,410 | m6w6/pq-gateway | lib/pq/Gateway/Table.php | Table.delete | function delete(array $where, $returning = null) {
$query = $this->getQueryWriter()->reset();
$query->write("DELETE FROM", $this->conn->quoteName($this->name));
$query->write("WHERE")->criteria($where);
if (strlen($returning)) {
$query->write("RETURNING", $returning);
}
return $this->execute($query);
} | php | function delete(array $where, $returning = null) {
$query = $this->getQueryWriter()->reset();
$query->write("DELETE FROM", $this->conn->quoteName($this->name));
$query->write("WHERE")->criteria($where);
if (strlen($returning)) {
$query->write("RETURNING", $returning);
}
return $this->execute($query);
} | [
"function",
"delete",
"(",
"array",
"$",
"where",
",",
"$",
"returning",
"=",
"null",
")",
"{",
"$",
"query",
"=",
"$",
"this",
"->",
"getQueryWriter",
"(",
")",
"->",
"reset",
"(",
")",
";",
"$",
"query",
"->",
"write",
"(",
"\"DELETE FROM\"",
",",
... | Delete rows from the table
@param array $where
@param string $returning
@return mixed | [
"Delete",
"rows",
"from",
"the",
"table"
] | 58233722a06fd742f531f8f012ea540b309303da | https://github.com/m6w6/pq-gateway/blob/58233722a06fd742f531f8f012ea540b309303da/lib/pq/Gateway/Table.php#L502-L510 |
203,411 | schpill/thin | src/Google/Chart.php | Chart.load | public function load($data, $dataType = 'json')
{
$this->_data = ($dataType != 'json') ? $this->dataToJson($data) : $data;
} | php | public function load($data, $dataType = 'json')
{
$this->_data = ($dataType != 'json') ? $this->dataToJson($data) : $data;
} | [
"public",
"function",
"load",
"(",
"$",
"data",
",",
"$",
"dataType",
"=",
"'json'",
")",
"{",
"$",
"this",
"->",
"_data",
"=",
"(",
"$",
"dataType",
"!=",
"'json'",
")",
"?",
"$",
"this",
"->",
"dataToJson",
"(",
"$",
"data",
")",
":",
"$",
"dat... | loads the dataset and converts it to the correct format | [
"loads",
"the",
"dataset",
"and",
"converts",
"it",
"to",
"the",
"correct",
"format"
] | a9102d9d6f70e8b0f6be93153f70849f46489ee1 | https://github.com/schpill/thin/blob/a9102d9d6f70e8b0f6be93153f70849f46489ee1/src/Google/Chart.php#L34-L37 |
203,412 | schpill/thin | src/Google/Chart.php | Chart.draw | public function draw($div, array $options = [])
{
$output = '';
if (self::$_first) {
$output .= $this->initChart();
}
// start a code block
$output .= '<script type="text/javascript">' . "\n";
// set callback function
... | php | public function draw($div, array $options = [])
{
$output = '';
if (self::$_first) {
$output .= $this->initChart();
}
// start a code block
$output .= '<script type="text/javascript">' . "\n";
// set callback function
... | [
"public",
"function",
"draw",
"(",
"$",
"div",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"output",
"=",
"''",
";",
"if",
"(",
"self",
"::",
"$",
"_first",
")",
"{",
"$",
"output",
".=",
"$",
"this",
"->",
"initChart",
"(",
")"... | draws the chart | [
"draws",
"the",
"chart"
] | a9102d9d6f70e8b0f6be93153f70849f46489ee1 | https://github.com/schpill/thin/blob/a9102d9d6f70e8b0f6be93153f70849f46489ee1/src/Google/Chart.php#L58-L87 |
203,413 | schpill/thin | src/Google/Chart.php | Chart.getColumns | private function getColumns($data)
{
$cols = [];
foreach ($data[0] as $key => $value) {
if (is_numeric($key)){
if (is_string($data[1][$key])) {
$cols[] = ['id' => '', 'label' => $value, 'type' => 'string'];
... | php | private function getColumns($data)
{
$cols = [];
foreach ($data[0] as $key => $value) {
if (is_numeric($key)){
if (is_string($data[1][$key])) {
$cols[] = ['id' => '', 'label' => $value, 'type' => 'string'];
... | [
"private",
"function",
"getColumns",
"(",
"$",
"data",
")",
"{",
"$",
"cols",
"=",
"[",
"]",
";",
"foreach",
"(",
"$",
"data",
"[",
"0",
"]",
"as",
"$",
"key",
"=>",
"$",
"value",
")",
"{",
"if",
"(",
"is_numeric",
"(",
"$",
"key",
")",
")",
... | substracts the column names from the first and second row in the dataset | [
"substracts",
"the",
"column",
"names",
"from",
"the",
"first",
"and",
"second",
"row",
"in",
"the",
"dataset"
] | a9102d9d6f70e8b0f6be93153f70849f46489ee1 | https://github.com/schpill/thin/blob/a9102d9d6f70e8b0f6be93153f70849f46489ee1/src/Google/Chart.php#L92-L115 |
203,414 | schpill/thin | src/Google/Chart.php | Chart.dataToJson | private function dataToJson($data)
{
$cols = $this->getColumns($data);
$rows = [];
foreach ($data as $key => $row) {
if ($key != 0 || !$this->_skipFirstRow) {
$c = [];
foreach ($row as $v) {
$c... | php | private function dataToJson($data)
{
$cols = $this->getColumns($data);
$rows = [];
foreach ($data as $key => $row) {
if ($key != 0 || !$this->_skipFirstRow) {
$c = [];
foreach ($row as $v) {
$c... | [
"private",
"function",
"dataToJson",
"(",
"$",
"data",
")",
"{",
"$",
"cols",
"=",
"$",
"this",
"->",
"getColumns",
"(",
"$",
"data",
")",
";",
"$",
"rows",
"=",
"[",
"]",
";",
"foreach",
"(",
"$",
"data",
"as",
"$",
"key",
"=>",
"$",
"row",
")... | convert array data to json | [
"convert",
"array",
"data",
"to",
"json"
] | a9102d9d6f70e8b0f6be93153f70849f46489ee1 | https://github.com/schpill/thin/blob/a9102d9d6f70e8b0f6be93153f70849f46489ee1/src/Google/Chart.php#L120-L139 |
203,415 | kamilabs/icobench-client | src/Kami/IcoBench/Client.php | Client.processResponse | protected function processResponse(ResponseInterface $response)
{
if (200 !== $response->getStatusCode()) {
throw new IcoBenchException(
sprintf('IcoBench replied with non-success status (%s)', $response->getStatusCode())
);
}
$data = json_decode($res... | php | protected function processResponse(ResponseInterface $response)
{
if (200 !== $response->getStatusCode()) {
throw new IcoBenchException(
sprintf('IcoBench replied with non-success status (%s)', $response->getStatusCode())
);
}
$data = json_decode($res... | [
"protected",
"function",
"processResponse",
"(",
"ResponseInterface",
"$",
"response",
")",
"{",
"if",
"(",
"200",
"!==",
"$",
"response",
"->",
"getStatusCode",
"(",
")",
")",
"{",
"throw",
"new",
"IcoBenchException",
"(",
"sprintf",
"(",
"'IcoBench replied wit... | Get data from response
@param ResponseInterface $response
@return array | string
@throws IcoBenchException | [
"Get",
"data",
"from",
"response"
] | b06def3015e00de0587b485648d2ff2828595186 | https://github.com/kamilabs/icobench-client/blob/b06def3015e00de0587b485648d2ff2828595186/src/Kami/IcoBench/Client.php#L124-L143 |
203,416 | gregorybesson/PlaygroundFlow | src/Service/Event.php | Event.getTotal | public function getTotal($user, $type = '', $count = 'points')
{
$em = $this->serviceLocator->get('playgroundflow_doctrine_em');
if ($count == 'points') {
$aggregate = 'SUM(e.points)';
} elseif ($count == 'count') {
$aggregate = 'COUNT(e.id)';
}
swit... | php | public function getTotal($user, $type = '', $count = 'points')
{
$em = $this->serviceLocator->get('playgroundflow_doctrine_em');
if ($count == 'points') {
$aggregate = 'SUM(e.points)';
} elseif ($count == 'count') {
$aggregate = 'COUNT(e.id)';
}
swit... | [
"public",
"function",
"getTotal",
"(",
"$",
"user",
",",
"$",
"type",
"=",
"''",
",",
"$",
"count",
"=",
"'points'",
")",
"{",
"$",
"em",
"=",
"$",
"this",
"->",
"serviceLocator",
"->",
"get",
"(",
"'playgroundflow_doctrine_em'",
")",
";",
"if",
"(",
... | This function return count of events or total points by event category for one user
@param unknown_type $user
@param unknown_type $type
@param unknown_type $count | [
"This",
"function",
"return",
"count",
"of",
"events",
"or",
"total",
"points",
"by",
"event",
"category",
"for",
"one",
"user"
] | f97493f8527e425d46223ac7b5c41331ab8b3022 | https://github.com/gregorybesson/PlaygroundFlow/blob/f97493f8527e425d46223ac7b5c41331ab8b3022/src/Service/Event.php#L54-L105 |
203,417 | Phpillip/phpillip | src/Console/Model/Builder.php | Builder.clear | public function clear()
{
if ($this->files->exists($this->destination)) {
$this->files->remove($this->destination);
}
$this->files->mkdir($this->destination);
} | php | public function clear()
{
if ($this->files->exists($this->destination)) {
$this->files->remove($this->destination);
}
$this->files->mkdir($this->destination);
} | [
"public",
"function",
"clear",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"files",
"->",
"exists",
"(",
"$",
"this",
"->",
"destination",
")",
")",
"{",
"$",
"this",
"->",
"files",
"->",
"remove",
"(",
"$",
"this",
"->",
"destination",
")",
";",
... | Clear destination folder | [
"Clear",
"destination",
"folder"
] | c37afaafb536361e7e0b564659f1cd5b80b98be9 | https://github.com/Phpillip/phpillip/blob/c37afaafb536361e7e0b564659f1cd5b80b98be9/src/Console/Model/Builder.php#L53-L60 |
203,418 | Phpillip/phpillip | src/Console/Model/Builder.php | Builder.build | public function build(Route $route, $name, array $parameters = [])
{
$url = $this->app['url_generator']->generate($name, $parameters, UrlGeneratorInterface::ABSOLUTE_URL);
$request = Request::create($url, 'GET', array_merge(['_format' => $route->getFormat()], $parameters));
$response =... | php | public function build(Route $route, $name, array $parameters = [])
{
$url = $this->app['url_generator']->generate($name, $parameters, UrlGeneratorInterface::ABSOLUTE_URL);
$request = Request::create($url, 'GET', array_merge(['_format' => $route->getFormat()], $parameters));
$response =... | [
"public",
"function",
"build",
"(",
"Route",
"$",
"route",
",",
"$",
"name",
",",
"array",
"$",
"parameters",
"=",
"[",
"]",
")",
"{",
"$",
"url",
"=",
"$",
"this",
"->",
"app",
"[",
"'url_generator'",
"]",
"->",
"generate",
"(",
"$",
"name",
",",
... | Dump the given Route into a file
@param Route $route
@param string $name
@param array $parameters | [
"Dump",
"the",
"given",
"Route",
"into",
"a",
"file"
] | c37afaafb536361e7e0b564659f1cd5b80b98be9 | https://github.com/Phpillip/phpillip/blob/c37afaafb536361e7e0b564659f1cd5b80b98be9/src/Console/Model/Builder.php#L69-L81 |
203,419 | nasumilu/geometry | src/Geometry.php | Geometry.getBoundary | public function getBoundary(): Geometry {
$event = new AccessorOpEvent($this);
$this->fireOperationEvent(AccessorOpEvent::BOUNDARY_EVENT, $event);
return $event->getResults();
} | php | public function getBoundary(): Geometry {
$event = new AccessorOpEvent($this);
$this->fireOperationEvent(AccessorOpEvent::BOUNDARY_EVENT, $event);
return $event->getResults();
} | [
"public",
"function",
"getBoundary",
"(",
")",
":",
"Geometry",
"{",
"$",
"event",
"=",
"new",
"AccessorOpEvent",
"(",
"$",
"this",
")",
";",
"$",
"this",
"->",
"fireOperationEvent",
"(",
"AccessorOpEvent",
"::",
"BOUNDARY_EVENT",
",",
"$",
"event",
")",
"... | Gets the closure of the combinatorial bound of this Geometry object | [
"Gets",
"the",
"closure",
"of",
"the",
"combinatorial",
"bound",
"of",
"this",
"Geometry",
"object"
] | 000fafe3e61f1d0682952ad236b7486dded65eae | https://github.com/nasumilu/geometry/blob/000fafe3e61f1d0682952ad236b7486dded65eae/src/Geometry.php#L125-L129 |
203,420 | nasumilu/geometry | src/Geometry.php | Geometry.getEnvelope | public function getEnvelope(): Geometry {
$event = new AccessorOpEvent($this);
$this->fireOperationEvent(AccessorOpEvent::ENVELOPE_EVENT, $event);
return $event->getResults();
} | php | public function getEnvelope(): Geometry {
$event = new AccessorOpEvent($this);
$this->fireOperationEvent(AccessorOpEvent::ENVELOPE_EVENT, $event);
return $event->getResults();
} | [
"public",
"function",
"getEnvelope",
"(",
")",
":",
"Geometry",
"{",
"$",
"event",
"=",
"new",
"AccessorOpEvent",
"(",
"$",
"this",
")",
";",
"$",
"this",
"->",
"fireOperationEvent",
"(",
"AccessorOpEvent",
"::",
"ENVELOPE_EVENT",
",",
"$",
"event",
")",
"... | Gets the minimum bounding box for this Geometry as a Geometry.
The polygon is defined by the corner points of the bound box as
[(MINX, MINY), (MAXX, MINY), (MAXX, MAXY), (MINZX, MAXY), (MINX, MINY)].
The minimums for z and m may be added.
@return Geometry | [
"Gets",
"the",
"minimum",
"bounding",
"box",
"for",
"this",
"Geometry",
"as",
"a",
"Geometry",
"."
] | 000fafe3e61f1d0682952ad236b7486dded65eae | https://github.com/nasumilu/geometry/blob/000fafe3e61f1d0682952ad236b7486dded65eae/src/Geometry.php#L171-L175 |
203,421 | nasumilu/geometry | src/Geometry.php | Geometry.asText | public function asText(bool $extended = false): string {
$event = new OutputOpEvent($this, ['extended' => $extended]);
$this->fireOperationEvent(OutputOpEvent::AS_TEXT_EVENT, $event);
return $event->getResults();
} | php | public function asText(bool $extended = false): string {
$event = new OutputOpEvent($this, ['extended' => $extended]);
$this->fireOperationEvent(OutputOpEvent::AS_TEXT_EVENT, $event);
return $event->getResults();
} | [
"public",
"function",
"asText",
"(",
"bool",
"$",
"extended",
"=",
"false",
")",
":",
"string",
"{",
"$",
"event",
"=",
"new",
"OutputOpEvent",
"(",
"$",
"this",
",",
"[",
"'extended'",
"=>",
"$",
"extended",
"]",
")",
";",
"$",
"this",
"->",
"fireOp... | Exports this Geometry object to a specific Well-known Text Representation.
@param bool $extended true will export to Extended Well-known Text | [
"Exports",
"this",
"Geometry",
"object",
"to",
"a",
"specific",
"Well",
"-",
"known",
"Text",
"Representation",
"."
] | 000fafe3e61f1d0682952ad236b7486dded65eae | https://github.com/nasumilu/geometry/blob/000fafe3e61f1d0682952ad236b7486dded65eae/src/Geometry.php#L193-L197 |
203,422 | nasumilu/geometry | src/Geometry.php | Geometry.asBinary | public function asBinary(bool $extended = false, string $endianness = 'NDR', bool $unpack = false): string {
$event = new OutputOpEvent($this, [
'extended' => $extended,
'endianness' => $endianness,
'unpack' => $unpack]);
$this->fireOperationEvent(OutputOpEvent::AS_BI... | php | public function asBinary(bool $extended = false, string $endianness = 'NDR', bool $unpack = false): string {
$event = new OutputOpEvent($this, [
'extended' => $extended,
'endianness' => $endianness,
'unpack' => $unpack]);
$this->fireOperationEvent(OutputOpEvent::AS_BI... | [
"public",
"function",
"asBinary",
"(",
"bool",
"$",
"extended",
"=",
"false",
",",
"string",
"$",
"endianness",
"=",
"'NDR'",
",",
"bool",
"$",
"unpack",
"=",
"false",
")",
":",
"string",
"{",
"$",
"event",
"=",
"new",
"OutputOpEvent",
"(",
"$",
"this"... | Exports this Geometry object to a specific Well-known Binary Representation.
@param bool $extended true will export to Extended Well-known Binary
@param string $endianness either 'NDR' little-endian or 'XDR' big-endian
@param bool $unpack true will return hex_string; false binary string | [
"Exports",
"this",
"Geometry",
"object",
"to",
"a",
"specific",
"Well",
"-",
"known",
"Binary",
"Representation",
"."
] | 000fafe3e61f1d0682952ad236b7486dded65eae | https://github.com/nasumilu/geometry/blob/000fafe3e61f1d0682952ad236b7486dded65eae/src/Geometry.php#L206-L213 |
203,423 | nasumilu/geometry | src/Geometry.php | Geometry.isSimple | public function isSimple(): bool {
$event = new AccessorOpEvent($this);
$this->fireOperationEvent(AccessorOpEvent::IS_SIMPLE_EVENT, $event);
return $event->getResults();
} | php | public function isSimple(): bool {
$event = new AccessorOpEvent($this);
$this->fireOperationEvent(AccessorOpEvent::IS_SIMPLE_EVENT, $event);
return $event->getResults();
} | [
"public",
"function",
"isSimple",
"(",
")",
":",
"bool",
"{",
"$",
"event",
"=",
"new",
"AccessorOpEvent",
"(",
"$",
"this",
")",
";",
"$",
"this",
"->",
"fireOperationEvent",
"(",
"AccessorOpEvent",
"::",
"IS_SIMPLE_EVENT",
",",
"$",
"event",
")",
";",
... | Indicates whether this Geometry object has no anomalous geometric points,
such as self intersection of self tangency.
@return bool | [
"Indicates",
"whether",
"this",
"Geometry",
"object",
"has",
"no",
"anomalous",
"geometric",
"points",
"such",
"as",
"self",
"intersection",
"of",
"self",
"tangency",
"."
] | 000fafe3e61f1d0682952ad236b7486dded65eae | https://github.com/nasumilu/geometry/blob/000fafe3e61f1d0682952ad236b7486dded65eae/src/Geometry.php#L229-L233 |
203,424 | nasumilu/geometry | src/Geometry.php | Geometry.convexHull | public function convexHull(): Geometry {
$event = new ProcessOpEvent($this);
$this->fireOperationEvent(ProcessOpEvent::CONVEX_HULL_EVENT, $event);
return $event->getResults();
} | php | public function convexHull(): Geometry {
$event = new ProcessOpEvent($this);
$this->fireOperationEvent(ProcessOpEvent::CONVEX_HULL_EVENT, $event);
return $event->getResults();
} | [
"public",
"function",
"convexHull",
"(",
")",
":",
"Geometry",
"{",
"$",
"event",
"=",
"new",
"ProcessOpEvent",
"(",
"$",
"this",
")",
";",
"$",
"this",
"->",
"fireOperationEvent",
"(",
"ProcessOpEvent",
"::",
"CONVEX_HULL_EVENT",
",",
"$",
"event",
")",
"... | Gets a Geometry that represents the convex hull of this Geometry.
@return \Nasumilu\Geometry\Geometry | [
"Gets",
"a",
"Geometry",
"that",
"represents",
"the",
"convex",
"hull",
"of",
"this",
"Geometry",
"."
] | 000fafe3e61f1d0682952ad236b7486dded65eae | https://github.com/nasumilu/geometry/blob/000fafe3e61f1d0682952ad236b7486dded65eae/src/Geometry.php#L403-L407 |
203,425 | nasumilu/geometry | src/Geometry.php | Geometry.getCentroid | public function getCentroid(bool $use_spheriod = false): Point {
$event = new AccessorOpEvent($this, ['use_spheriod' => $use_spheriod]);
$this->fireOperationEvent(AccessorOpEvent::CENTROID_EVENT, $event);
return $event->getResults();
} | php | public function getCentroid(bool $use_spheriod = false): Point {
$event = new AccessorOpEvent($this, ['use_spheriod' => $use_spheriod]);
$this->fireOperationEvent(AccessorOpEvent::CENTROID_EVENT, $event);
return $event->getResults();
} | [
"public",
"function",
"getCentroid",
"(",
"bool",
"$",
"use_spheriod",
"=",
"false",
")",
":",
"Point",
"{",
"$",
"event",
"=",
"new",
"AccessorOpEvent",
"(",
"$",
"this",
",",
"[",
"'use_spheriod'",
"=>",
"$",
"use_spheriod",
"]",
")",
";",
"$",
"this",... | The mathematical centroid for this Surface as a Point. The result is not
guaranteed to be on this Surface.
@param bool $use_spheriod
@return \Nasumilu\Geometry\Point | [
"The",
"mathematical",
"centroid",
"for",
"this",
"Surface",
"as",
"a",
"Point",
".",
"The",
"result",
"is",
"not",
"guaranteed",
"to",
"be",
"on",
"this",
"Surface",
"."
] | 000fafe3e61f1d0682952ad236b7486dded65eae | https://github.com/nasumilu/geometry/blob/000fafe3e61f1d0682952ad236b7486dded65eae/src/Geometry.php#L490-L494 |
203,426 | caouecs/Laravel4-Clef | example/ClefController.php | ClefController.authentication | public function authentication()
{
$response = \Aperdia\Clef::authentication($_GET['code']);
// error
if (!$response) {
$error = 'Error';
// error
} elseif (isset($response['error'])) {
$error = $response['error'];
// success
} elseif ... | php | public function authentication()
{
$response = \Aperdia\Clef::authentication($_GET['code']);
// error
if (!$response) {
$error = 'Error';
// error
} elseif (isset($response['error'])) {
$error = $response['error'];
// success
} elseif ... | [
"public",
"function",
"authentication",
"(",
")",
"{",
"$",
"response",
"=",
"\\",
"Aperdia",
"\\",
"Clef",
"::",
"authentication",
"(",
"$",
"_GET",
"[",
"'code'",
"]",
")",
";",
"// error",
"if",
"(",
"!",
"$",
"response",
")",
"{",
"$",
"error",
"... | Authentication with Clef account
@return Response | [
"Authentication",
"with",
"Clef",
"account"
] | d9d3596df734184cc9937bd83fd06ab8f0f8f7b4 | https://github.com/caouecs/Laravel4-Clef/blob/d9d3596df734184cc9937bd83fd06ab8f0f8f7b4/example/ClefController.php#L11-L52 |
203,427 | caouecs/Laravel4-Clef | example/ClefController.php | ClefController.logout | public function logout()
{
// Token from Clef.io
if (isset($_POST['logout_token'])) {
// Verif token
$clef = \Aperdia\Clef::logout($_POST['logout_token']);
if (!$clef) {
// Verif in Authentication table
$auth = Authentication::wher... | php | public function logout()
{
// Token from Clef.io
if (isset($_POST['logout_token'])) {
// Verif token
$clef = \Aperdia\Clef::logout($_POST['logout_token']);
if (!$clef) {
// Verif in Authentication table
$auth = Authentication::wher... | [
"public",
"function",
"logout",
"(",
")",
"{",
"// Token from Clef.io",
"if",
"(",
"isset",
"(",
"$",
"_POST",
"[",
"'logout_token'",
"]",
")",
")",
"{",
"// Verif token",
"$",
"clef",
"=",
"\\",
"Aperdia",
"\\",
"Clef",
"::",
"logout",
"(",
"$",
"_POST"... | Logout by WebHook
@access public
@return Response | [
"Logout",
"by",
"WebHook"
] | d9d3596df734184cc9937bd83fd06ab8f0f8f7b4 | https://github.com/caouecs/Laravel4-Clef/blob/d9d3596df734184cc9937bd83fd06ab8f0f8f7b4/example/ClefController.php#L60-L81 |
203,428 | MetaModels/attribute_translatedurl | src/EventListener/UrlWizardHandler.php | UrlWizardHandler.getWizard | public function getWizard(ManipulateWidgetEvent $event)
{
if ($event->getModel()->getProviderName() !== $this->metaModel->getTableName()
|| $event->getProperty()->getName() !== $this->propertyName
) {
return;
}
$propName = $event->getProperty()->getName();
... | php | public function getWizard(ManipulateWidgetEvent $event)
{
if ($event->getModel()->getProviderName() !== $this->metaModel->getTableName()
|| $event->getProperty()->getName() !== $this->propertyName
) {
return;
}
$propName = $event->getProperty()->getName();
... | [
"public",
"function",
"getWizard",
"(",
"ManipulateWidgetEvent",
"$",
"event",
")",
"{",
"if",
"(",
"$",
"event",
"->",
"getModel",
"(",
")",
"->",
"getProviderName",
"(",
")",
"!==",
"$",
"this",
"->",
"metaModel",
"->",
"getTableName",
"(",
")",
"||",
... | Build the wizard string.
@param ManipulateWidgetEvent $event The event.
@return void | [
"Build",
"the",
"wizard",
"string",
"."
] | ad6b4967244614be49d382934043c766b5fa08d8 | https://github.com/MetaModels/attribute_translatedurl/blob/ad6b4967244614be49d382934043c766b5fa08d8/src/EventListener/UrlWizardHandler.php#L68-L106 |
203,429 | CodeCollab/Http | src/Cookie/Factory.php | Factory.build | public function build(string $key, $value, \DateTimeInterface $expire = null): Cookie
{
return new Cookie($key, $this->encryptor->encrypt($value), $expire, '/', $this->domain, $this->secure);
} | php | public function build(string $key, $value, \DateTimeInterface $expire = null): Cookie
{
return new Cookie($key, $this->encryptor->encrypt($value), $expire, '/', $this->domain, $this->secure);
} | [
"public",
"function",
"build",
"(",
"string",
"$",
"key",
",",
"$",
"value",
",",
"\\",
"DateTimeInterface",
"$",
"expire",
"=",
"null",
")",
":",
"Cookie",
"{",
"return",
"new",
"Cookie",
"(",
"$",
"key",
",",
"$",
"this",
"->",
"encryptor",
"->",
"... | Builds a new cookie
@param string $key The name of the cookie
@param mixed $value The value of the cookie
@param \DateTimeInterface $expire The expiration time of the cookie
@return \CodeCollab\Http\Cookie\Cookie The built cookie | [
"Builds",
"a",
"new",
"cookie"
] | b1f8306b20daebcf26ed4b13c032c5bc008a0861 | https://github.com/CodeCollab/Http/blob/b1f8306b20daebcf26ed4b13c032c5bc008a0861/src/Cookie/Factory.php#L67-L70 |
203,430 | rujiali/acquia-site-factory-cli | src/AppBundle/Connector/ConnectorSites.php | ConnectorSites.clearCache | public function clearCache()
{
if ($this->connector->getURL() === null) {
return 'Cannot find site URL from configuration.';
}
$url = $this->connector->getURL().self::VERSION.$this->connector->getSiteID().'/cache-clear';
$params = [];
$response = $this->connector-... | php | public function clearCache()
{
if ($this->connector->getURL() === null) {
return 'Cannot find site URL from configuration.';
}
$url = $this->connector->getURL().self::VERSION.$this->connector->getSiteID().'/cache-clear';
$params = [];
$response = $this->connector-... | [
"public",
"function",
"clearCache",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"connector",
"->",
"getURL",
"(",
")",
"===",
"null",
")",
"{",
"return",
"'Cannot find site URL from configuration.'",
";",
"}",
"$",
"url",
"=",
"$",
"this",
"->",
"connecto... | Clear site cache.
@return mixed|string | [
"Clear",
"site",
"cache",
"."
] | c9dbb9dfd71408adff0ea26db94678a61c584df6 | https://github.com/rujiali/acquia-site-factory-cli/blob/c9dbb9dfd71408adff0ea26db94678a61c584df6/src/AppBundle/Connector/ConnectorSites.php#L34-L44 |
203,431 | rujiali/acquia-site-factory-cli | src/AppBundle/Connector/ConnectorSites.php | ConnectorSites.createBackup | public function createBackup($label, $components)
{
if ($this->connector->getURL() === null) {
return 'Cannot find site URL from configuration.';
}
$url = $this->connector->getURL().self::VERSION.$this->connector->getSiteID().'/backup';
$params = [
'label' => ... | php | public function createBackup($label, $components)
{
if ($this->connector->getURL() === null) {
return 'Cannot find site URL from configuration.';
}
$url = $this->connector->getURL().self::VERSION.$this->connector->getSiteID().'/backup';
$params = [
'label' => ... | [
"public",
"function",
"createBackup",
"(",
"$",
"label",
",",
"$",
"components",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"connector",
"->",
"getURL",
"(",
")",
"===",
"null",
")",
"{",
"return",
"'Cannot find site URL from configuration.'",
";",
"}",
"$",
... | Create backup for specific site in site factory.
@param string $label Backup label.
@param array $components Backup components.
@return integer
Task ID. | [
"Create",
"backup",
"for",
"specific",
"site",
"in",
"site",
"factory",
"."
] | c9dbb9dfd71408adff0ea26db94678a61c584df6 | https://github.com/rujiali/acquia-site-factory-cli/blob/c9dbb9dfd71408adff0ea26db94678a61c584df6/src/AppBundle/Connector/ConnectorSites.php#L55-L75 |
203,432 | rujiali/acquia-site-factory-cli | src/AppBundle/Connector/ConnectorSites.php | ConnectorSites.deleteBackup | public function deleteBackup($backupId, $callbackUrl, $callbackMethod, $callerData)
{
if ($this->connector->getURL() === null) {
return 'Cannot find site URL from configuration.';
}
$url = $this->connector->getURL().self::VERSION.$this->connector->getSiteID().'/backups/'.$backupI... | php | public function deleteBackup($backupId, $callbackUrl, $callbackMethod, $callerData)
{
if ($this->connector->getURL() === null) {
return 'Cannot find site URL from configuration.';
}
$url = $this->connector->getURL().self::VERSION.$this->connector->getSiteID().'/backups/'.$backupI... | [
"public",
"function",
"deleteBackup",
"(",
"$",
"backupId",
",",
"$",
"callbackUrl",
",",
"$",
"callbackMethod",
",",
"$",
"callerData",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"connector",
"->",
"getURL",
"(",
")",
"===",
"null",
")",
"{",
"return",
"... | Delete backup.
@param int $backupId BackupId.
@param string $callbackUrl Callback URL.
@param string $callbackMethod Callback method.
@param string $callerData Caller data in JSON format.
@return mixed|string | [
"Delete",
"backup",
"."
] | c9dbb9dfd71408adff0ea26db94678a61c584df6 | https://github.com/rujiali/acquia-site-factory-cli/blob/c9dbb9dfd71408adff0ea26db94678a61c584df6/src/AppBundle/Connector/ConnectorSites.php#L87-L108 |
203,433 | rujiali/acquia-site-factory-cli | src/AppBundle/Connector/ConnectorSites.php | ConnectorSites.getBackupURL | public function getBackupURL($backupId)
{
if ($this->connector->getURL() === null) {
return 'Cannot find site URL from configuration.';
}
$url = $this->connector->getURL().self::VERSION.$this->connector->getSiteID().'/backups/'.$backupId.'/url';
$params = [];
$res... | php | public function getBackupURL($backupId)
{
if ($this->connector->getURL() === null) {
return 'Cannot find site URL from configuration.';
}
$url = $this->connector->getURL().self::VERSION.$this->connector->getSiteID().'/backups/'.$backupId.'/url';
$params = [];
$res... | [
"public",
"function",
"getBackupURL",
"(",
"$",
"backupId",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"connector",
"->",
"getURL",
"(",
")",
"===",
"null",
")",
"{",
"return",
"'Cannot find site URL from configuration.'",
";",
"}",
"$",
"url",
"=",
"$",
"thi... | Get backup URL.
@param string $backupId Backup ID.
@return string | [
"Get",
"backup",
"URL",
"."
] | c9dbb9dfd71408adff0ea26db94678a61c584df6 | https://github.com/rujiali/acquia-site-factory-cli/blob/c9dbb9dfd71408adff0ea26db94678a61c584df6/src/AppBundle/Connector/ConnectorSites.php#L117-L130 |
203,434 | rujiali/acquia-site-factory-cli | src/AppBundle/Connector/ConnectorSites.php | ConnectorSites.getSiteDetails | public function getSiteDetails($siteId)
{
if ($this->connector->getURL() === null) {
return 'Cannot find site URL from configuration.';
}
$url = $this->connector->getURL().self::VERSION.$siteId;
$params = [];
$response = $this->connector->connecting($url, $params,... | php | public function getSiteDetails($siteId)
{
if ($this->connector->getURL() === null) {
return 'Cannot find site URL from configuration.';
}
$url = $this->connector->getURL().self::VERSION.$siteId;
$params = [];
$response = $this->connector->connecting($url, $params,... | [
"public",
"function",
"getSiteDetails",
"(",
"$",
"siteId",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"connector",
"->",
"getURL",
"(",
")",
"===",
"null",
")",
"{",
"return",
"'Cannot find site URL from configuration.'",
";",
"}",
"$",
"url",
"=",
"$",
"thi... | Get site details
@param int $siteId Site ID.
@return mixed|string | [
"Get",
"site",
"details"
] | c9dbb9dfd71408adff0ea26db94678a61c584df6 | https://github.com/rujiali/acquia-site-factory-cli/blob/c9dbb9dfd71408adff0ea26db94678a61c584df6/src/AppBundle/Connector/ConnectorSites.php#L161-L171 |
203,435 | rujiali/acquia-site-factory-cli | src/AppBundle/Connector/ConnectorSites.php | ConnectorSites.listBackups | public function listBackups()
{
if ($this->connector->getURL() === null) {
return 'Cannot find site URL from configuration.';
}
$url = $this->connector->getURL().self::VERSION.$this->connector->getSiteID().'/backups';
$params = [];
$response = $this->connector->co... | php | public function listBackups()
{
if ($this->connector->getURL() === null) {
return 'Cannot find site URL from configuration.';
}
$url = $this->connector->getURL().self::VERSION.$this->connector->getSiteID().'/backups';
$params = [];
$response = $this->connector->co... | [
"public",
"function",
"listBackups",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"connector",
"->",
"getURL",
"(",
")",
"===",
"null",
")",
"{",
"return",
"'Cannot find site URL from configuration.'",
";",
"}",
"$",
"url",
"=",
"$",
"this",
"->",
"connect... | List all backups in for specific site in site factory.
@return mixed | [
"List",
"all",
"backups",
"in",
"for",
"specific",
"site",
"in",
"site",
"factory",
"."
] | c9dbb9dfd71408adff0ea26db94678a61c584df6 | https://github.com/rujiali/acquia-site-factory-cli/blob/c9dbb9dfd71408adff0ea26db94678a61c584df6/src/AppBundle/Connector/ConnectorSites.php#L178-L192 |
203,436 | rujiali/acquia-site-factory-cli | src/AppBundle/Connector/ConnectorSites.php | ConnectorSites.getLastBackupTime | public function getLastBackupTime()
{
$backups = $this->listBackups();
if (is_array($backups)) {
if (!empty($backups)) {
$timestamp = $backups[0]->timestamp;
return $timestamp;
}
return 'There is no backup available.';
}
... | php | public function getLastBackupTime()
{
$backups = $this->listBackups();
if (is_array($backups)) {
if (!empty($backups)) {
$timestamp = $backups[0]->timestamp;
return $timestamp;
}
return 'There is no backup available.';
}
... | [
"public",
"function",
"getLastBackupTime",
"(",
")",
"{",
"$",
"backups",
"=",
"$",
"this",
"->",
"listBackups",
"(",
")",
";",
"if",
"(",
"is_array",
"(",
"$",
"backups",
")",
")",
"{",
"if",
"(",
"!",
"empty",
"(",
"$",
"backups",
")",
")",
"{",
... | Get the last backup timestamp.
@return mixed|string | [
"Get",
"the",
"last",
"backup",
"timestamp",
"."
] | c9dbb9dfd71408adff0ea26db94678a61c584df6 | https://github.com/rujiali/acquia-site-factory-cli/blob/c9dbb9dfd71408adff0ea26db94678a61c584df6/src/AppBundle/Connector/ConnectorSites.php#L199-L213 |
203,437 | rujiali/acquia-site-factory-cli | src/AppBundle/Connector/ConnectorSites.php | ConnectorSites.backupSuccessIndicator | public function backupSuccessIndicator($label)
{
$backups = $this->listBackups();
if (is_array($backups)) {
if (!empty($backups)) {
if ($backups[0]->label === $label) {
return true;
}
return false;
}
... | php | public function backupSuccessIndicator($label)
{
$backups = $this->listBackups();
if (is_array($backups)) {
if (!empty($backups)) {
if ($backups[0]->label === $label) {
return true;
}
return false;
}
... | [
"public",
"function",
"backupSuccessIndicator",
"(",
"$",
"label",
")",
"{",
"$",
"backups",
"=",
"$",
"this",
"->",
"listBackups",
"(",
")",
";",
"if",
"(",
"is_array",
"(",
"$",
"backups",
")",
")",
"{",
"if",
"(",
"!",
"empty",
"(",
"$",
"backups"... | Indicate when required backup is generated.
@param string $label Backup label.
@return bool | [
"Indicate",
"when",
"required",
"backup",
"is",
"generated",
"."
] | c9dbb9dfd71408adff0ea26db94678a61c584df6 | https://github.com/rujiali/acquia-site-factory-cli/blob/c9dbb9dfd71408adff0ea26db94678a61c584df6/src/AppBundle/Connector/ConnectorSites.php#L222-L236 |
203,438 | rujiali/acquia-site-factory-cli | src/AppBundle/Connector/ConnectorSites.php | ConnectorSites.listSites | public function listSites($limit, $page, $canary = false)
{
if ($this->connector->getURL() === null) {
return 'Cannot find site URL from configuration.';
}
$params = [
'limit' => $limit,
'page' => $page,
'canary' => $canary,
];
$url =... | php | public function listSites($limit, $page, $canary = false)
{
if ($this->connector->getURL() === null) {
return 'Cannot find site URL from configuration.';
}
$params = [
'limit' => $limit,
'page' => $page,
'canary' => $canary,
];
$url =... | [
"public",
"function",
"listSites",
"(",
"$",
"limit",
",",
"$",
"page",
",",
"$",
"canary",
"=",
"false",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"connector",
"->",
"getURL",
"(",
")",
"===",
"null",
")",
"{",
"return",
"'Cannot find site URL from config... | List sites.
@param int $limit Limit number.
@param int $page Page number.
@param boolean $canary No value necessary.
@return string | [
"List",
"sites",
"."
] | c9dbb9dfd71408adff0ea26db94678a61c584df6 | https://github.com/rujiali/acquia-site-factory-cli/blob/c9dbb9dfd71408adff0ea26db94678a61c584df6/src/AppBundle/Connector/ConnectorSites.php#L263-L282 |
203,439 | anklimsk/cakephp-console-installer | Console/Helper/StateShellHelper.php | StateShellHelper.output | public function output($args) {
$args += ['', '', 63];
$this->_consoleOutput->write($this->_getState($args[0], $args[1], $args[2]));
} | php | public function output($args) {
$args += ['', '', 63];
$this->_consoleOutput->write($this->_getState($args[0], $args[1], $args[2]));
} | [
"public",
"function",
"output",
"(",
"$",
"args",
")",
"{",
"$",
"args",
"+=",
"[",
"''",
",",
"''",
",",
"63",
"]",
";",
"$",
"this",
"->",
"_consoleOutput",
"->",
"write",
"(",
"$",
"this",
"->",
"_getState",
"(",
"$",
"args",
"[",
"0",
"]",
... | This method should output formatted message.
@param array $args The arguments for the `StateShellHelper::_getState()`.
@return void | [
"This",
"method",
"should",
"output",
"formatted",
"message",
"."
] | 76136550e856ff4f8fd3634b77633f86510f63e9 | https://github.com/anklimsk/cakephp-console-installer/blob/76136550e856ff4f8fd3634b77633f86510f63e9/Console/Helper/StateShellHelper.php#L69-L72 |
203,440 | chilimatic/chilimatic-framework | lib/database/sql/mysql/Tool.php | Tool.mysql_aes_encrypt | static public function mysql_aes_encrypt($val, $ky)
{
if (empty($ky) && empty($val)) return null;
$key = "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0";
for ($a = 0; $a < strlen($ky); $a++) {
$key[$a % 16] = chr(ord($key[$a % 16]) ^ ord($ky[$a]));
}
$mode = MCRYPT_MODE_ECB;... | php | static public function mysql_aes_encrypt($val, $ky)
{
if (empty($ky) && empty($val)) return null;
$key = "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0";
for ($a = 0; $a < strlen($ky); $a++) {
$key[$a % 16] = chr(ord($key[$a % 16]) ^ ord($ky[$a]));
}
$mode = MCRYPT_MODE_ECB;... | [
"static",
"public",
"function",
"mysql_aes_encrypt",
"(",
"$",
"val",
",",
"$",
"ky",
")",
"{",
"if",
"(",
"empty",
"(",
"$",
"ky",
")",
"&&",
"empty",
"(",
"$",
"val",
")",
")",
"return",
"null",
";",
"$",
"key",
"=",
"\"\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0... | aes mysql encryption
@param string $val
@param string $ky
@return null|string | [
"aes",
"mysql",
"encryption"
] | 8df7f12e75d75d3fd2197a58c80d39cbb4b9ff12 | https://github.com/chilimatic/chilimatic-framework/blob/8df7f12e75d75d3fd2197a58c80d39cbb4b9ff12/lib/database/sql/mysql/Tool.php#L75-L89 |
203,441 | schpill/thin | src/Url/Rule.php | Rule.resolveUrl | public function resolveUrl($url, &$parameters)
{
$parameters = array();
$patternSegments = $this->segments;
$patternSegmentNum = count($patternSegments);
$urlSegments = Helper::segmentizeUrl($url);
/*
* If the number of URL segments is m... | php | public function resolveUrl($url, &$parameters)
{
$parameters = array();
$patternSegments = $this->segments;
$patternSegmentNum = count($patternSegments);
$urlSegments = Helper::segmentizeUrl($url);
/*
* If the number of URL segments is m... | [
"public",
"function",
"resolveUrl",
"(",
"$",
"url",
",",
"&",
"$",
"parameters",
")",
"{",
"$",
"parameters",
"=",
"array",
"(",
")",
";",
"$",
"patternSegments",
"=",
"$",
"this",
"->",
"segments",
";",
"$",
"patternSegmentNum",
"=",
"count",
"(",
"$... | Checks whether a given URL matches a given pattern.
@param string $url The URL to check.
@param array $parameters A reference to a PHP array variable to return the parameter list fetched from URL.
@return boolean Returns true if the URL matches the pattern. Otherwise returns false. | [
"Checks",
"whether",
"a",
"given",
"URL",
"matches",
"a",
"given",
"pattern",
"."
] | a9102d9d6f70e8b0f6be93153f70849f46489ee1 | https://github.com/schpill/thin/blob/a9102d9d6f70e8b0f6be93153f70849f46489ee1/src/Url/Rule.php#L83-L169 |
203,442 | schpill/thin | src/Url/Rule.php | Rule.name | public function name($name = null)
{
if ($name === null) return $this->ruleName;
$this->ruleName = $name;
return $this;
} | php | public function name($name = null)
{
if ($name === null) return $this->ruleName;
$this->ruleName = $name;
return $this;
} | [
"public",
"function",
"name",
"(",
"$",
"name",
"=",
"null",
")",
"{",
"if",
"(",
"$",
"name",
"===",
"null",
")",
"return",
"$",
"this",
"->",
"ruleName",
";",
"$",
"this",
"->",
"ruleName",
"=",
"$",
"name",
";",
"return",
"$",
"this",
";",
"}"... | Unique route name
@param string $name Unique name for the router object
@return object Self | [
"Unique",
"route",
"name"
] | a9102d9d6f70e8b0f6be93153f70849f46489ee1 | https://github.com/schpill/thin/blob/a9102d9d6f70e8b0f6be93153f70849f46489ee1/src/Url/Rule.php#L177-L184 |
203,443 | schpill/thin | src/Url/Rule.php | Rule.pattern | public function pattern($pattern = null)
{
if ($pattern === null) return $this->rulePattern;
$this->rulePattern = $pattern;
return $this;
} | php | public function pattern($pattern = null)
{
if ($pattern === null) return $this->rulePattern;
$this->rulePattern = $pattern;
return $this;
} | [
"public",
"function",
"pattern",
"(",
"$",
"pattern",
"=",
"null",
")",
"{",
"if",
"(",
"$",
"pattern",
"===",
"null",
")",
"return",
"$",
"this",
"->",
"rulePattern",
";",
"$",
"this",
"->",
"rulePattern",
"=",
"$",
"pattern",
";",
"return",
"$",
"t... | Route match pattern
@param string $pattern Pattern used to match this rule
@return object Self | [
"Route",
"match",
"pattern"
] | a9102d9d6f70e8b0f6be93153f70849f46489ee1 | https://github.com/schpill/thin/blob/a9102d9d6f70e8b0f6be93153f70849f46489ee1/src/Url/Rule.php#L192-L199 |
203,444 | schpill/thin | src/Url/Rule.php | Rule.afterMatch | public function afterMatch($callback = null)
{
if ($callback !== null) {
if (!is_callable($callback)) {
throw new InvalidArgumentException(
sprintf(
"The after match callback provided is not valid. Given (%s)",
... | php | public function afterMatch($callback = null)
{
if ($callback !== null) {
if (!is_callable($callback)) {
throw new InvalidArgumentException(
sprintf(
"The after match callback provided is not valid. Given (%s)",
... | [
"public",
"function",
"afterMatch",
"(",
"$",
"callback",
"=",
"null",
")",
"{",
"if",
"(",
"$",
"callback",
"!==",
"null",
")",
"{",
"if",
"(",
"!",
"is_callable",
"(",
"$",
"callback",
")",
")",
"{",
"throw",
"new",
"InvalidArgumentException",
"(",
"... | After match callback
@param callback $callback Callback function to be used to modify params after a successful match
@throws InvalidArgumentException When supplied argument is not a valid callback
@return callback | [
"After",
"match",
"callback"
] | a9102d9d6f70e8b0f6be93153f70849f46489ee1 | https://github.com/schpill/thin/blob/a9102d9d6f70e8b0f6be93153f70849f46489ee1/src/Url/Rule.php#L236-L254 |
203,445 | znframework/package-hypertext | BuilderExtends.php | BuilderExtends.openCloseTag | protected function openCloseTag($string)
{
if( $this->tag === true )
{
$script = $this->getScriptClass();
$string = $script->open() . $string . $script->close();
}
$this->tag = false;
return $string;
} | php | protected function openCloseTag($string)
{
if( $this->tag === true )
{
$script = $this->getScriptClass();
$string = $script->open() . $string . $script->close();
}
$this->tag = false;
return $string;
} | [
"protected",
"function",
"openCloseTag",
"(",
"$",
"string",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"tag",
"===",
"true",
")",
"{",
"$",
"script",
"=",
"$",
"this",
"->",
"getScriptClass",
"(",
")",
";",
"$",
"string",
"=",
"$",
"script",
"->",
"o... | Protected script open close tag | [
"Protected",
"script",
"open",
"close",
"tag"
] | 12bbc3bd47a2fae735f638a3e01cc82c1b9c9005 | https://github.com/znframework/package-hypertext/blob/12bbc3bd47a2fae735f638a3e01cc82c1b9c9005/BuilderExtends.php#L64-L76 |
203,446 | znframework/package-hypertext | BuilderExtends.php | BuilderExtends.isCallableOption | protected function isCallableOption($callback, $parameter)
{
$option = 'function(' . $parameter . '){' . PHP_EOL;
$option .= Buffering\Callback::do($callback);
$option .= '}';
return $option;
} | php | protected function isCallableOption($callback, $parameter)
{
$option = 'function(' . $parameter . '){' . PHP_EOL;
$option .= Buffering\Callback::do($callback);
$option .= '}';
return $option;
} | [
"protected",
"function",
"isCallableOption",
"(",
"$",
"callback",
",",
"$",
"parameter",
")",
"{",
"$",
"option",
"=",
"'function('",
".",
"$",
"parameter",
".",
"'){'",
".",
"PHP_EOL",
";",
"$",
"option",
".=",
"Buffering",
"\\",
"Callback",
"::",
"do",
... | Protected is callable option | [
"Protected",
"is",
"callable",
"option"
] | 12bbc3bd47a2fae735f638a3e01cc82c1b9c9005 | https://github.com/znframework/package-hypertext/blob/12bbc3bd47a2fae735f638a3e01cc82c1b9c9005/BuilderExtends.php#L81-L88 |
203,447 | wdbo/webdocbook | src/WebDocBook/Controller/WebDocBookController.php | WebDocBookController.docbookdocAction | public function docbookdocAction()
{
$title = _T('User manual');
$md_parser = $this->wdb->getMarkdownParser();
// user manual
$path = Kernel::getPath('webdocbook_assets') . Kernel::getConfig('pages:user_manual', '');
$update = ... | php | public function docbookdocAction()
{
$title = _T('User manual');
$md_parser = $this->wdb->getMarkdownParser();
// user manual
$path = Kernel::getPath('webdocbook_assets') . Kernel::getConfig('pages:user_manual', '');
$update = ... | [
"public",
"function",
"docbookdocAction",
"(",
")",
"{",
"$",
"title",
"=",
"_T",
"(",
"'User manual'",
")",
";",
"$",
"md_parser",
"=",
"$",
"this",
"->",
"wdb",
"->",
"getMarkdownParser",
"(",
")",
";",
"// user manual",
"$",
"path",
"=",
"Kernel",
"::... | The internal documentation action
@return array | [
"The",
"internal",
"documentation",
"action"
] | 7d4e806f674b6222c9a3e85bfed34e72bc9d584e | https://github.com/wdbo/webdocbook/blob/7d4e806f674b6222c9a3e85bfed34e72bc9d584e/src/WebDocBook/Controller/WebDocBookController.php#L91-L150 |
203,448 | wdbo/webdocbook | src/WebDocBook/Controller/WebDocBookController.php | WebDocBookController.adminAction | public function adminAction()
{
$allowed = Kernel::getConfig('expose_admin', false, 'user_config');
$saveadmin = $this->wdb->getUser()->getSession()->get('saveadmin');
$this->wdb->getUser()->getSession()->remove('saveadmin');
if (
(!$allowed || ('true' !== $allowed &&... | php | public function adminAction()
{
$allowed = Kernel::getConfig('expose_admin', false, 'user_config');
$saveadmin = $this->wdb->getUser()->getSession()->get('saveadmin');
$this->wdb->getUser()->getSession()->remove('saveadmin');
if (
(!$allowed || ('true' !== $allowed &&... | [
"public",
"function",
"adminAction",
"(",
")",
"{",
"$",
"allowed",
"=",
"Kernel",
"::",
"getConfig",
"(",
"'expose_admin'",
",",
"false",
",",
"'user_config'",
")",
";",
"$",
"saveadmin",
"=",
"$",
"this",
"->",
"wdb",
"->",
"getUser",
"(",
")",
"->",
... | Admin panel action
@return array
@throws \WebDocBook\Exception\NotFoundException | [
"Admin",
"panel",
"action"
] | 7d4e806f674b6222c9a3e85bfed34e72bc9d584e | https://github.com/wdbo/webdocbook/blob/7d4e806f674b6222c9a3e85bfed34e72bc9d584e/src/WebDocBook/Controller/WebDocBookController.php#L157-L198 |
203,449 | jasny/iterator-stream | src/CsvOutputStream.php | CsvOutputStream.write | public function write(iterable $data, ?array $headers = null): void
{
$this->assertAttached();
$this->begin($headers);
foreach ($data as $element) {
$this->writeElement($element);
}
$this->end();
} | php | public function write(iterable $data, ?array $headers = null): void
{
$this->assertAttached();
$this->begin($headers);
foreach ($data as $element) {
$this->writeElement($element);
}
$this->end();
} | [
"public",
"function",
"write",
"(",
"iterable",
"$",
"data",
",",
"?",
"array",
"$",
"headers",
"=",
"null",
")",
":",
"void",
"{",
"$",
"this",
"->",
"assertAttached",
"(",
")",
";",
"$",
"this",
"->",
"begin",
"(",
"$",
"headers",
")",
";",
"fore... | Write to traversable data to stream.
@param iterable $data
@param string[]|null $headers
@return void | [
"Write",
"to",
"traversable",
"data",
"to",
"stream",
"."
] | a4d63eb2825956a879740cc44addd6170f7a481d | https://github.com/jasny/iterator-stream/blob/a4d63eb2825956a879740cc44addd6170f7a481d/src/CsvOutputStream.php#L90-L101 |
203,450 | alekitto/metadata | lib/Factory/MetadataFactory.php | MetadataFactory.setMetadataClass | public function setMetadataClass(string $metadataClass): void
{
if (! class_exists($metadataClass) || ! (new \ReflectionClass($metadataClass))->implementsInterface(ClassMetadataInterface::class)) {
throw InvalidArgumentException::create(InvalidArgumentException::INVALID_METADATA_CLASS, $metadata... | php | public function setMetadataClass(string $metadataClass): void
{
if (! class_exists($metadataClass) || ! (new \ReflectionClass($metadataClass))->implementsInterface(ClassMetadataInterface::class)) {
throw InvalidArgumentException::create(InvalidArgumentException::INVALID_METADATA_CLASS, $metadata... | [
"public",
"function",
"setMetadataClass",
"(",
"string",
"$",
"metadataClass",
")",
":",
"void",
"{",
"if",
"(",
"!",
"class_exists",
"(",
"$",
"metadataClass",
")",
"||",
"!",
"(",
"new",
"\\",
"ReflectionClass",
"(",
"$",
"metadataClass",
")",
")",
"->",... | Set the metadata class to be created by this factory.
@param string $metadataClass | [
"Set",
"the",
"metadata",
"class",
"to",
"be",
"created",
"by",
"this",
"factory",
"."
] | 0422ac8d7fe72d5fa8cc51b6f1e173866e8afb2c | https://github.com/alekitto/metadata/blob/0422ac8d7fe72d5fa8cc51b6f1e173866e8afb2c/lib/Factory/MetadataFactory.php#L23-L30 |
203,451 | oliwierptak/Everon1 | src/Everon/Logger.php | Logger.write | protected function write($message, $level, array $parameters)
{
if ($this->enabled === false) {
return null;
}
if ($this->log_request_identifier === null) {
$this->log_request_identifier = "MISSING_REQUEST_ID";
}
$ExceptionToTrace = $message;... | php | protected function write($message, $level, array $parameters)
{
if ($this->enabled === false) {
return null;
}
if ($this->log_request_identifier === null) {
$this->log_request_identifier = "MISSING_REQUEST_ID";
}
$ExceptionToTrace = $message;... | [
"protected",
"function",
"write",
"(",
"$",
"message",
",",
"$",
"level",
",",
"array",
"$",
"parameters",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"enabled",
"===",
"false",
")",
"{",
"return",
"null",
";",
"}",
"if",
"(",
"$",
"this",
"->",
"log_r... | Don't generate errors and only write to log file when possible
@param $message \Exception or string
@param $level
@param $parameters
@return \DateTime
@throws Exception\Logger | [
"Don",
"t",
"generate",
"errors",
"and",
"only",
"write",
"to",
"log",
"file",
"when",
"possible"
] | ac93793d1fa517a8394db5f00062f1925dc218a3 | https://github.com/oliwierptak/Everon1/blob/ac93793d1fa517a8394db5f00062f1925dc218a3/src/Everon/Logger.php#L72-L119 |
203,452 | vi-kon/laravel-bootstrap | src/ViKon/Bootstrap/Compiler.php | Compiler.enableComponent | public function enableComponent($name)
{
if (!array_key_exists($name, $this->components)) {
throw new NotValidCompoenentException($name . ' component is not valid');
}
$this->components[$name] = true;
return $this;
} | php | public function enableComponent($name)
{
if (!array_key_exists($name, $this->components)) {
throw new NotValidCompoenentException($name . ' component is not valid');
}
$this->components[$name] = true;
return $this;
} | [
"public",
"function",
"enableComponent",
"(",
"$",
"name",
")",
"{",
"if",
"(",
"!",
"array_key_exists",
"(",
"$",
"name",
",",
"$",
"this",
"->",
"components",
")",
")",
"{",
"throw",
"new",
"NotValidCompoenentException",
"(",
"$",
"name",
".",
"' compone... | Enable named component for compiler
@param string $name component name
@return $this | [
"Enable",
"named",
"component",
"for",
"compiler"
] | f4bdfd19241ad19344bef3d2bdbf3658bbbb2ddd | https://github.com/vi-kon/laravel-bootstrap/blob/f4bdfd19241ad19344bef3d2bdbf3658bbbb2ddd/src/ViKon/Bootstrap/Compiler.php#L101-L110 |
203,453 | vi-kon/laravel-bootstrap | src/ViKon/Bootstrap/Compiler.php | Compiler.enableAll | public function enableAll(array $except = [])
{
// Check if excluded components name are exists or not
foreach ($except as $name) {
if (!array_key_exists($name, $this->components)) {
throw new NotValidCompoenentException($name . ' component is not valid');
}
... | php | public function enableAll(array $except = [])
{
// Check if excluded components name are exists or not
foreach ($except as $name) {
if (!array_key_exists($name, $this->components)) {
throw new NotValidCompoenentException($name . ' component is not valid');
}
... | [
"public",
"function",
"enableAll",
"(",
"array",
"$",
"except",
"=",
"[",
"]",
")",
"{",
"// Check if excluded components name are exists or not",
"foreach",
"(",
"$",
"except",
"as",
"$",
"name",
")",
"{",
"if",
"(",
"!",
"array_key_exists",
"(",
"$",
"name",... | Enable all components except listed ones
@param string[] $except list of components that will be not enabled
@return $this | [
"Enable",
"all",
"components",
"except",
"listed",
"ones"
] | f4bdfd19241ad19344bef3d2bdbf3658bbbb2ddd | https://github.com/vi-kon/laravel-bootstrap/blob/f4bdfd19241ad19344bef3d2bdbf3658bbbb2ddd/src/ViKon/Bootstrap/Compiler.php#L119-L134 |
203,454 | vi-kon/laravel-bootstrap | src/ViKon/Bootstrap/Compiler.php | Compiler.compile | public function compile($force = false)
{
$jsOutputPath = $this->outputPath['js'] . '/bootstrap.min.js';
$cssOutputPath = $this->outputPath['css'] . '/bootstrap.min.css';
if ($force === true || !$this->filesystem->exists($jsOutputPath)) {
$this->filesystem->makeDirectory(dirnam... | php | public function compile($force = false)
{
$jsOutputPath = $this->outputPath['js'] . '/bootstrap.min.js';
$cssOutputPath = $this->outputPath['css'] . '/bootstrap.min.css';
if ($force === true || !$this->filesystem->exists($jsOutputPath)) {
$this->filesystem->makeDirectory(dirnam... | [
"public",
"function",
"compile",
"(",
"$",
"force",
"=",
"false",
")",
"{",
"$",
"jsOutputPath",
"=",
"$",
"this",
"->",
"outputPath",
"[",
"'js'",
"]",
".",
"'/bootstrap.min.js'",
";",
"$",
"cssOutputPath",
"=",
"$",
"this",
"->",
"outputPath",
"[",
"'c... | Compile enabled components
@param bool $force if TRUE cache will be invalidated and new compiled resources will be created
@return void
@throws \ViKon\Bootstrap\Exception\CompilerException | [
"Compile",
"enabled",
"components"
] | f4bdfd19241ad19344bef3d2bdbf3658bbbb2ddd | https://github.com/vi-kon/laravel-bootstrap/blob/f4bdfd19241ad19344bef3d2bdbf3658bbbb2ddd/src/ViKon/Bootstrap/Compiler.php#L194-L210 |
203,455 | vi-kon/laravel-bootstrap | src/ViKon/Bootstrap/Compiler.php | Compiler.minifyJs | protected function minifyJs()
{
$minifier = new Minify\JS();
// Components
$this->addJsToMinifier($minifier, 'dropdowns', 'dropdown');
// Components w/ JavaScript
$this->addJsToMinifier($minifier, 'modals', 'modal');
$this->addJsToMinifier($minifier, 'tooltip');
... | php | protected function minifyJs()
{
$minifier = new Minify\JS();
// Components
$this->addJsToMinifier($minifier, 'dropdowns', 'dropdown');
// Components w/ JavaScript
$this->addJsToMinifier($minifier, 'modals', 'modal');
$this->addJsToMinifier($minifier, 'tooltip');
... | [
"protected",
"function",
"minifyJs",
"(",
")",
"{",
"$",
"minifier",
"=",
"new",
"Minify",
"\\",
"JS",
"(",
")",
";",
"// Components",
"$",
"this",
"->",
"addJsToMinifier",
"(",
"$",
"minifier",
",",
"'dropdowns'",
",",
"'dropdown'",
")",
";",
"// Componen... | Minify JS components to single string
@return string | [
"Minify",
"JS",
"components",
"to",
"single",
"string"
] | f4bdfd19241ad19344bef3d2bdbf3658bbbb2ddd | https://github.com/vi-kon/laravel-bootstrap/blob/f4bdfd19241ad19344bef3d2bdbf3658bbbb2ddd/src/ViKon/Bootstrap/Compiler.php#L217-L240 |
203,456 | vi-kon/laravel-bootstrap | src/ViKon/Bootstrap/Compiler.php | Compiler.addJsToMinifier | protected function addJsToMinifier(Minify\JS $minify, $componentName, $fileName = null)
{
if ($fileName === null) {
$fileName = $componentName;
}
// Add component data to minifier if it is enabled
if ($this->components[$componentName] === true) {
$minify->add... | php | protected function addJsToMinifier(Minify\JS $minify, $componentName, $fileName = null)
{
if ($fileName === null) {
$fileName = $componentName;
}
// Add component data to minifier if it is enabled
if ($this->components[$componentName] === true) {
$minify->add... | [
"protected",
"function",
"addJsToMinifier",
"(",
"Minify",
"\\",
"JS",
"$",
"minify",
",",
"$",
"componentName",
",",
"$",
"fileName",
"=",
"null",
")",
"{",
"if",
"(",
"$",
"fileName",
"===",
"null",
")",
"{",
"$",
"fileName",
"=",
"$",
"componentName",... | Add components javascript file to minifier if component is enabled
@param \MatthiasMullie\Minify\JS $minify minifier instance
@param string $componentName valid component name
@param string|null $fileName file name (if not set component name is used)
@return void | [
"Add",
"components",
"javascript",
"file",
"to",
"minifier",
"if",
"component",
"is",
"enabled"
] | f4bdfd19241ad19344bef3d2bdbf3658bbbb2ddd | https://github.com/vi-kon/laravel-bootstrap/blob/f4bdfd19241ad19344bef3d2bdbf3658bbbb2ddd/src/ViKon/Bootstrap/Compiler.php#L251-L261 |
203,457 | vi-kon/laravel-bootstrap | src/ViKon/Bootstrap/Compiler.php | Compiler.prepareCssForLess | protected function prepareCssForLess($componentName, $fileName = null)
{
if ($fileName === null) {
$fileName = $componentName;
}
// Add component data to minifier if it is enabled
if ($this->components[$componentName] === true) {
return "@import \"{$fileName}... | php | protected function prepareCssForLess($componentName, $fileName = null)
{
if ($fileName === null) {
$fileName = $componentName;
}
// Add component data to minifier if it is enabled
if ($this->components[$componentName] === true) {
return "@import \"{$fileName}... | [
"protected",
"function",
"prepareCssForLess",
"(",
"$",
"componentName",
",",
"$",
"fileName",
"=",
"null",
")",
"{",
"if",
"(",
"$",
"fileName",
"===",
"null",
")",
"{",
"$",
"fileName",
"=",
"$",
"componentName",
";",
"}",
"// Add component data to minifier ... | Prepare components less file for less processor's input if component is enabled
@param string $componentName valid component name
@param string|null $fileName file name (if not set component name is used)
@return string | [
"Prepare",
"components",
"less",
"file",
"for",
"less",
"processor",
"s",
"input",
"if",
"component",
"is",
"enabled"
] | f4bdfd19241ad19344bef3d2bdbf3658bbbb2ddd | https://github.com/vi-kon/laravel-bootstrap/blob/f4bdfd19241ad19344bef3d2bdbf3658bbbb2ddd/src/ViKon/Bootstrap/Compiler.php#L358-L370 |
203,458 | rackberg/para | src/EventSubscriber/AddEnvironmentVariableEventSubscriber.php | AddEnvironmentVariableEventSubscriber.addEnvironmentVariable | public function addEnvironmentVariable(PostProcessCreationEvent $event)
{
// Get the current set environment variables.
$env = $event->getProcess()->getEnv();
// Add the "para_project" environment variable
$env['para_project'] = $event->getProject()->getName();
// Save the ... | php | public function addEnvironmentVariable(PostProcessCreationEvent $event)
{
// Get the current set environment variables.
$env = $event->getProcess()->getEnv();
// Add the "para_project" environment variable
$env['para_project'] = $event->getProject()->getName();
// Save the ... | [
"public",
"function",
"addEnvironmentVariable",
"(",
"PostProcessCreationEvent",
"$",
"event",
")",
"{",
"// Get the current set environment variables.",
"$",
"env",
"=",
"$",
"event",
"->",
"getProcess",
"(",
")",
"->",
"getEnv",
"(",
")",
";",
"// Add the \"para_pro... | This callback method adds an environment variable to a created process.
@param \Para\Event\PostProcessCreationEvent $event | [
"This",
"callback",
"method",
"adds",
"an",
"environment",
"variable",
"to",
"a",
"created",
"process",
"."
] | e0ef1356ed2979670eb7c670d88921406cade46e | https://github.com/rackberg/para/blob/e0ef1356ed2979670eb7c670d88921406cade46e/src/EventSubscriber/AddEnvironmentVariableEventSubscriber.php#L37-L47 |
203,459 | inc2734/wp-awesome-components | src/Awesome_Components.php | Awesome_Components._media_buttons | public function _media_buttons( $editor_id = 'content' ) {
$post_type = get_post_type();
if ( ! $post_type ) {
return;
}
$post_type_object = get_post_type_object( $post_type );
if ( ! $post_type_object || ! $post_type_object->public ) {
return;
}
?>
<button type="button" id="button-wp-awesome-co... | php | public function _media_buttons( $editor_id = 'content' ) {
$post_type = get_post_type();
if ( ! $post_type ) {
return;
}
$post_type_object = get_post_type_object( $post_type );
if ( ! $post_type_object || ! $post_type_object->public ) {
return;
}
?>
<button type="button" id="button-wp-awesome-co... | [
"public",
"function",
"_media_buttons",
"(",
"$",
"editor_id",
"=",
"'content'",
")",
"{",
"$",
"post_type",
"=",
"get_post_type",
"(",
")",
";",
"if",
"(",
"!",
"$",
"post_type",
")",
"{",
"return",
";",
"}",
"$",
"post_type_object",
"=",
"get_post_type_o... | Added "Add components" button
@param string $editor_id
@return void | [
"Added",
"Add",
"components",
"button"
] | 45ce014943db141350a001d4138921b1c7bec0a2 | https://github.com/inc2734/wp-awesome-components/blob/45ce014943db141350a001d4138921b1c7bec0a2/src/Awesome_Components.php#L32-L49 |
203,460 | inc2734/wp-awesome-components | src/Awesome_Components.php | Awesome_Components._edit_form_after_editor | public function _edit_form_after_editor() {
$post_type = get_post_type();
if ( ! $post_type ) {
return;
}
if ( false === get_post_type_object( $post_type )->public ) {
return;
}
ob_start();
include( __DIR__ . '/view/modal.php' );
// @codingStandardsIgnoreStart
echo ob_get_clean();
// @codin... | php | public function _edit_form_after_editor() {
$post_type = get_post_type();
if ( ! $post_type ) {
return;
}
if ( false === get_post_type_object( $post_type )->public ) {
return;
}
ob_start();
include( __DIR__ . '/view/modal.php' );
// @codingStandardsIgnoreStart
echo ob_get_clean();
// @codin... | [
"public",
"function",
"_edit_form_after_editor",
"(",
")",
"{",
"$",
"post_type",
"=",
"get_post_type",
"(",
")",
";",
"if",
"(",
"!",
"$",
"post_type",
")",
"{",
"return",
";",
"}",
"if",
"(",
"false",
"===",
"get_post_type_object",
"(",
"$",
"post_type",... | Added modal html
@return void | [
"Added",
"modal",
"html"
] | 45ce014943db141350a001d4138921b1c7bec0a2 | https://github.com/inc2734/wp-awesome-components/blob/45ce014943db141350a001d4138921b1c7bec0a2/src/Awesome_Components.php#L56-L72 |
203,461 | gplcart/file_manager | models/Command.php | Command.getHandlers | public function getHandlers()
{
$commands = &gplcart_static('module.file_manager.handlers');
if (isset($commands)) {
return $commands;
}
$commands = (array) gplcart_config_get(__DIR__ . '/../config/commands.php');
foreach ($commands as $id => &$command) {
... | php | public function getHandlers()
{
$commands = &gplcart_static('module.file_manager.handlers');
if (isset($commands)) {
return $commands;
}
$commands = (array) gplcart_config_get(__DIR__ . '/../config/commands.php');
foreach ($commands as $id => &$command) {
... | [
"public",
"function",
"getHandlers",
"(",
")",
"{",
"$",
"commands",
"=",
"&",
"gplcart_static",
"(",
"'module.file_manager.handlers'",
")",
";",
"if",
"(",
"isset",
"(",
"$",
"commands",
")",
")",
"{",
"return",
"$",
"commands",
";",
"}",
"$",
"commands",... | Returns an array of supported commands
@return array | [
"Returns",
"an",
"array",
"of",
"supported",
"commands"
] | 45424e93eafea75d31af6410ac9cf110f08e500a | https://github.com/gplcart/file_manager/blob/45424e93eafea75d31af6410ac9cf110f08e500a/models/Command.php#L41-L57 |
203,462 | gplcart/file_manager | models/Command.php | Command.get | public function get($command)
{
$commands = $this->getHandlers();
return empty($commands[$command]) ? array() : $commands[$command];
} | php | public function get($command)
{
$commands = $this->getHandlers();
return empty($commands[$command]) ? array() : $commands[$command];
} | [
"public",
"function",
"get",
"(",
"$",
"command",
")",
"{",
"$",
"commands",
"=",
"$",
"this",
"->",
"getHandlers",
"(",
")",
";",
"return",
"empty",
"(",
"$",
"commands",
"[",
"$",
"command",
"]",
")",
"?",
"array",
"(",
")",
":",
"$",
"commands",... | Returns a single command
@param string $command
@return array | [
"Returns",
"a",
"single",
"command"
] | 45424e93eafea75d31af6410ac9cf110f08e500a | https://github.com/gplcart/file_manager/blob/45424e93eafea75d31af6410ac9cf110f08e500a/models/Command.php#L64-L68 |
203,463 | gplcart/file_manager | models/Command.php | Command.getAllowed | public function getAllowed($file)
{
$commands = array();
foreach ($this->getHandlers() as $id => $command) {
if ($this->isAllowed($command, $file)) {
$commands[$id] = $command;
}
}
return $commands;
} | php | public function getAllowed($file)
{
$commands = array();
foreach ($this->getHandlers() as $id => $command) {
if ($this->isAllowed($command, $file)) {
$commands[$id] = $command;
}
}
return $commands;
} | [
"public",
"function",
"getAllowed",
"(",
"$",
"file",
")",
"{",
"$",
"commands",
"=",
"array",
"(",
")",
";",
"foreach",
"(",
"$",
"this",
"->",
"getHandlers",
"(",
")",
"as",
"$",
"id",
"=>",
"$",
"command",
")",
"{",
"if",
"(",
"$",
"this",
"->... | Returns an array of allowed commands for the given file
@param SplFileInfo|array $file
@return array | [
"Returns",
"an",
"array",
"of",
"allowed",
"commands",
"for",
"the",
"given",
"file"
] | 45424e93eafea75d31af6410ac9cf110f08e500a | https://github.com/gplcart/file_manager/blob/45424e93eafea75d31af6410ac9cf110f08e500a/models/Command.php#L75-L86 |
203,464 | gplcart/file_manager | models/Command.php | Command.callHandler | public function callHandler(array $command, $method, $args = array())
{
try {
$handlers = $this->getHandlers();
return Handler::call($handlers, $command['command_id'], $method, $args);
} catch (Exception $ex) {
return $ex->getMessage();
}
} | php | public function callHandler(array $command, $method, $args = array())
{
try {
$handlers = $this->getHandlers();
return Handler::call($handlers, $command['command_id'], $method, $args);
} catch (Exception $ex) {
return $ex->getMessage();
}
} | [
"public",
"function",
"callHandler",
"(",
"array",
"$",
"command",
",",
"$",
"method",
",",
"$",
"args",
"=",
"array",
"(",
")",
")",
"{",
"try",
"{",
"$",
"handlers",
"=",
"$",
"this",
"->",
"getHandlers",
"(",
")",
";",
"return",
"Handler",
"::",
... | Call a command handler
@param array $command
@param string $method
@param array $args
@return mixed | [
"Call",
"a",
"command",
"handler"
] | 45424e93eafea75d31af6410ac9cf110f08e500a | https://github.com/gplcart/file_manager/blob/45424e93eafea75d31af6410ac9cf110f08e500a/models/Command.php#L112-L120 |
203,465 | gplcart/file_manager | models/Command.php | Command.submit | public function submit(array $command, array $args)
{
$result = (array) $this->callHandler($command, 'submit', $args);
$result += array('redirect' => '', 'message' => '', 'severity' => '');
return $result;
} | php | public function submit(array $command, array $args)
{
$result = (array) $this->callHandler($command, 'submit', $args);
$result += array('redirect' => '', 'message' => '', 'severity' => '');
return $result;
} | [
"public",
"function",
"submit",
"(",
"array",
"$",
"command",
",",
"array",
"$",
"args",
")",
"{",
"$",
"result",
"=",
"(",
"array",
")",
"$",
"this",
"->",
"callHandler",
"(",
"$",
"command",
",",
"'submit'",
",",
"$",
"args",
")",
";",
"$",
"resu... | Submit a command
@param array $command
@param array $args
@return array | [
"Submit",
"a",
"command"
] | 45424e93eafea75d31af6410ac9cf110f08e500a | https://github.com/gplcart/file_manager/blob/45424e93eafea75d31af6410ac9cf110f08e500a/models/Command.php#L128-L133 |
203,466 | as3io/modlr | src/Rest/RestRequest.php | RestRequest.getUrl | public function getUrl()
{
$query = $this->getQueryString();
return sprintf('%s://%s/%s/%s%s',
$this->getScheme(),
trim($this->getHost(), '/'),
trim($this->config->getRootEndpoint(), '/'),
$this->getEntityType(),
empty($query) ? '' : sprint... | php | public function getUrl()
{
$query = $this->getQueryString();
return sprintf('%s://%s/%s/%s%s',
$this->getScheme(),
trim($this->getHost(), '/'),
trim($this->config->getRootEndpoint(), '/'),
$this->getEntityType(),
empty($query) ? '' : sprint... | [
"public",
"function",
"getUrl",
"(",
")",
"{",
"$",
"query",
"=",
"$",
"this",
"->",
"getQueryString",
"(",
")",
";",
"return",
"sprintf",
"(",
"'%s://%s/%s/%s%s'",
",",
"$",
"this",
"->",
"getScheme",
"(",
")",
",",
"trim",
"(",
"$",
"this",
"->",
"... | Generates the request URL based on its current object state.
@todo Add support for inclusions and other items.
@return string | [
"Generates",
"the",
"request",
"URL",
"based",
"on",
"its",
"current",
"object",
"state",
"."
] | 7e684b88bb22a2e18397df9402075c6533084b16 | https://github.com/as3io/modlr/blob/7e684b88bb22a2e18397df9402075c6533084b16/src/Rest/RestRequest.php#L150-L160 |
203,467 | as3io/modlr | src/Rest/RestRequest.php | RestRequest.getQueryString | public function getQueryString()
{
$query = [];
if (!empty($this->pagination)) {
$query[self::PARAM_PAGINATION] = $this->pagination;
}
if (!empty($this->filters)) {
$query[self::PARAM_FILTERING] = $this->filters;
}
foreach ($this->fields as $mo... | php | public function getQueryString()
{
$query = [];
if (!empty($this->pagination)) {
$query[self::PARAM_PAGINATION] = $this->pagination;
}
if (!empty($this->filters)) {
$query[self::PARAM_FILTERING] = $this->filters;
}
foreach ($this->fields as $mo... | [
"public",
"function",
"getQueryString",
"(",
")",
"{",
"$",
"query",
"=",
"[",
"]",
";",
"if",
"(",
"!",
"empty",
"(",
"$",
"this",
"->",
"pagination",
")",
")",
"{",
"$",
"query",
"[",
"self",
"::",
"PARAM_PAGINATION",
"]",
"=",
"$",
"this",
"->",... | Gets the query string based on the current object properties.
@return string | [
"Gets",
"the",
"query",
"string",
"based",
"on",
"the",
"current",
"object",
"properties",
"."
] | 7e684b88bb22a2e18397df9402075c6533084b16 | https://github.com/as3io/modlr/blob/7e684b88bb22a2e18397df9402075c6533084b16/src/Rest/RestRequest.php#L227-L247 |
203,468 | as3io/modlr | src/Rest/RestRequest.php | RestRequest.isAutocomplete | public function isAutocomplete()
{
if (false === $this->hasFilter(self::FILTER_AUTOCOMPLETE)) {
return false;
}
$autocomplete = $this->getFilter(self::FILTER_AUTOCOMPLETE);
return isset($autocomplete[self::FILTER_AUTOCOMPLETE_KEY]) && isset($autocomplete[self::FILTER_AUTO... | php | public function isAutocomplete()
{
if (false === $this->hasFilter(self::FILTER_AUTOCOMPLETE)) {
return false;
}
$autocomplete = $this->getFilter(self::FILTER_AUTOCOMPLETE);
return isset($autocomplete[self::FILTER_AUTOCOMPLETE_KEY]) && isset($autocomplete[self::FILTER_AUTO... | [
"public",
"function",
"isAutocomplete",
"(",
")",
"{",
"if",
"(",
"false",
"===",
"$",
"this",
"->",
"hasFilter",
"(",
"self",
"::",
"FILTER_AUTOCOMPLETE",
")",
")",
"{",
"return",
"false",
";",
"}",
"$",
"autocomplete",
"=",
"$",
"this",
"->",
"getFilte... | Determines if this has an autocomplete filter enabled.
@return bool | [
"Determines",
"if",
"this",
"has",
"an",
"autocomplete",
"filter",
"enabled",
"."
] | 7e684b88bb22a2e18397df9402075c6533084b16 | https://github.com/as3io/modlr/blob/7e684b88bb22a2e18397df9402075c6533084b16/src/Rest/RestRequest.php#L323-L330 |
203,469 | as3io/modlr | src/Rest/RestRequest.php | RestRequest.getAutocompleteKey | public function getAutocompleteKey()
{
if (false === $this->isAutocomplete()) {
return null;
}
return $this->getFilter(self::FILTER_AUTOCOMPLETE)[self::FILTER_AUTOCOMPLETE_KEY];
} | php | public function getAutocompleteKey()
{
if (false === $this->isAutocomplete()) {
return null;
}
return $this->getFilter(self::FILTER_AUTOCOMPLETE)[self::FILTER_AUTOCOMPLETE_KEY];
} | [
"public",
"function",
"getAutocompleteKey",
"(",
")",
"{",
"if",
"(",
"false",
"===",
"$",
"this",
"->",
"isAutocomplete",
"(",
")",
")",
"{",
"return",
"null",
";",
"}",
"return",
"$",
"this",
"->",
"getFilter",
"(",
"self",
"::",
"FILTER_AUTOCOMPLETE",
... | Gets the autocomplete attribute key.
@return string|null | [
"Gets",
"the",
"autocomplete",
"attribute",
"key",
"."
] | 7e684b88bb22a2e18397df9402075c6533084b16 | https://github.com/as3io/modlr/blob/7e684b88bb22a2e18397df9402075c6533084b16/src/Rest/RestRequest.php#L337-L343 |
203,470 | as3io/modlr | src/Rest/RestRequest.php | RestRequest.getAutocompleteValue | public function getAutocompleteValue()
{
if (false === $this->isAutocomplete()) {
return null;
}
return $this->getFilter(self::FILTER_AUTOCOMPLETE)[self::FILTER_AUTOCOMPLETE_VALUE];
} | php | public function getAutocompleteValue()
{
if (false === $this->isAutocomplete()) {
return null;
}
return $this->getFilter(self::FILTER_AUTOCOMPLETE)[self::FILTER_AUTOCOMPLETE_VALUE];
} | [
"public",
"function",
"getAutocompleteValue",
"(",
")",
"{",
"if",
"(",
"false",
"===",
"$",
"this",
"->",
"isAutocomplete",
"(",
")",
")",
"{",
"return",
"null",
";",
"}",
"return",
"$",
"this",
"->",
"getFilter",
"(",
"self",
"::",
"FILTER_AUTOCOMPLETE",... | Gets the autocomplete search value.
@return string|null | [
"Gets",
"the",
"autocomplete",
"search",
"value",
"."
] | 7e684b88bb22a2e18397df9402075c6533084b16 | https://github.com/as3io/modlr/blob/7e684b88bb22a2e18397df9402075c6533084b16/src/Rest/RestRequest.php#L350-L356 |
203,471 | as3io/modlr | src/Rest/RestRequest.php | RestRequest.isQuery | public function isQuery()
{
if (false === $this->hasFilter(self::FILTER_QUERY)) {
return false;
}
$query = $this->getFilter(self::FILTER_QUERY);
return isset($query[self::FILTER_QUERY_CRITERIA]);
} | php | public function isQuery()
{
if (false === $this->hasFilter(self::FILTER_QUERY)) {
return false;
}
$query = $this->getFilter(self::FILTER_QUERY);
return isset($query[self::FILTER_QUERY_CRITERIA]);
} | [
"public",
"function",
"isQuery",
"(",
")",
"{",
"if",
"(",
"false",
"===",
"$",
"this",
"->",
"hasFilter",
"(",
"self",
"::",
"FILTER_QUERY",
")",
")",
"{",
"return",
"false",
";",
"}",
"$",
"query",
"=",
"$",
"this",
"->",
"getFilter",
"(",
"self",
... | Determines if this has the database query filter enabled.
@return bool | [
"Determines",
"if",
"this",
"has",
"the",
"database",
"query",
"filter",
"enabled",
"."
] | 7e684b88bb22a2e18397df9402075c6533084b16 | https://github.com/as3io/modlr/blob/7e684b88bb22a2e18397df9402075c6533084b16/src/Rest/RestRequest.php#L363-L370 |
203,472 | as3io/modlr | src/Rest/RestRequest.php | RestRequest.getQueryCriteria | public function getQueryCriteria()
{
if (false === $this->isQuery()) {
return [];
}
$queryKey = self::FILTER_QUERY;
$criteriaKey = self::FILTER_QUERY_CRITERIA;
$decoded = @json_decode($this->getFilter($queryKey)[$criteriaKey], true);
if (!is_array($decod... | php | public function getQueryCriteria()
{
if (false === $this->isQuery()) {
return [];
}
$queryKey = self::FILTER_QUERY;
$criteriaKey = self::FILTER_QUERY_CRITERIA;
$decoded = @json_decode($this->getFilter($queryKey)[$criteriaKey], true);
if (!is_array($decod... | [
"public",
"function",
"getQueryCriteria",
"(",
")",
"{",
"if",
"(",
"false",
"===",
"$",
"this",
"->",
"isQuery",
"(",
")",
")",
"{",
"return",
"[",
"]",
";",
"}",
"$",
"queryKey",
"=",
"self",
"::",
"FILTER_QUERY",
";",
"$",
"criteriaKey",
"=",
"sel... | Gets the query criteria value.
@return array | [
"Gets",
"the",
"query",
"criteria",
"value",
"."
] | 7e684b88bb22a2e18397df9402075c6533084b16 | https://github.com/as3io/modlr/blob/7e684b88bb22a2e18397df9402075c6533084b16/src/Rest/RestRequest.php#L377-L392 |
203,473 | as3io/modlr | src/Rest/RestRequest.php | RestRequest.getFilter | public function getFilter($key)
{
if (!isset($this->filters[$key])) {
return null;
}
return $this->filters[$key];
} | php | public function getFilter($key)
{
if (!isset($this->filters[$key])) {
return null;
}
return $this->filters[$key];
} | [
"public",
"function",
"getFilter",
"(",
"$",
"key",
")",
"{",
"if",
"(",
"!",
"isset",
"(",
"$",
"this",
"->",
"filters",
"[",
"$",
"key",
"]",
")",
")",
"{",
"return",
"null",
";",
"}",
"return",
"$",
"this",
"->",
"filters",
"[",
"$",
"key",
... | Gets a specific filter, by key.
@param string $key
@return mixed|null | [
"Gets",
"a",
"specific",
"filter",
"by",
"key",
"."
] | 7e684b88bb22a2e18397df9402075c6533084b16 | https://github.com/as3io/modlr/blob/7e684b88bb22a2e18397df9402075c6533084b16/src/Rest/RestRequest.php#L519-L525 |
203,474 | as3io/modlr | src/Rest/RestRequest.php | RestRequest.parsePath | private function parsePath($path)
{
$parts = explode('/', trim($path, '/'));
for ($i = 0; $i < 1; $i++) {
// All paths must contain /{workspace_entityType}
if (false === $this->issetNotEmpty($i, $parts)) {
throw RestException::invalidEndpoint($path);
... | php | private function parsePath($path)
{
$parts = explode('/', trim($path, '/'));
for ($i = 0; $i < 1; $i++) {
// All paths must contain /{workspace_entityType}
if (false === $this->issetNotEmpty($i, $parts)) {
throw RestException::invalidEndpoint($path);
... | [
"private",
"function",
"parsePath",
"(",
"$",
"path",
")",
"{",
"$",
"parts",
"=",
"explode",
"(",
"'/'",
",",
"trim",
"(",
"$",
"path",
",",
"'/'",
")",
")",
";",
"for",
"(",
"$",
"i",
"=",
"0",
";",
"$",
"i",
"<",
"1",
";",
"$",
"i",
"++"... | Parses the incoming request path and sets appropriate properties on this RestRequest object.
@param string $path
@return self
@throws RestException | [
"Parses",
"the",
"incoming",
"request",
"path",
"and",
"sets",
"appropriate",
"properties",
"on",
"this",
"RestRequest",
"object",
"."
] | 7e684b88bb22a2e18397df9402075c6533084b16 | https://github.com/as3io/modlr/blob/7e684b88bb22a2e18397df9402075c6533084b16/src/Rest/RestRequest.php#L580-L593 |
203,475 | as3io/modlr | src/Rest/RestRequest.php | RestRequest.extractRelationship | private function extractRelationship(array $parts)
{
if (isset($parts[2])) {
if ('relationships' === $parts[2]) {
if (!isset($parts[3])) {
throw RestException::invalidRelationshipEndpoint($this->parsedUri['path']);
}
$this->rela... | php | private function extractRelationship(array $parts)
{
if (isset($parts[2])) {
if ('relationships' === $parts[2]) {
if (!isset($parts[3])) {
throw RestException::invalidRelationshipEndpoint($this->parsedUri['path']);
}
$this->rela... | [
"private",
"function",
"extractRelationship",
"(",
"array",
"$",
"parts",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"parts",
"[",
"2",
"]",
")",
")",
"{",
"if",
"(",
"'relationships'",
"===",
"$",
"parts",
"[",
"2",
"]",
")",
"{",
"if",
"(",
"!",
"... | Extracts the entity relationship properties from an array of path parts.
@param array $parts
@return self | [
"Extracts",
"the",
"entity",
"relationship",
"properties",
"from",
"an",
"array",
"of",
"path",
"parts",
"."
] | 7e684b88bb22a2e18397df9402075c6533084b16 | https://github.com/as3io/modlr/blob/7e684b88bb22a2e18397df9402075c6533084b16/src/Rest/RestRequest.php#L627-L646 |
203,476 | as3io/modlr | src/Rest/RestRequest.php | RestRequest.parseQueryString | private function parseQueryString($queryString)
{
parse_str($queryString, $parsed);
$supported = $this->getSupportedParams();
foreach ($parsed as $param => $value) {
if (!isset($supported[$param])) {
throw RestException::unsupportedQueryParam($param, array_keys($... | php | private function parseQueryString($queryString)
{
parse_str($queryString, $parsed);
$supported = $this->getSupportedParams();
foreach ($parsed as $param => $value) {
if (!isset($supported[$param])) {
throw RestException::unsupportedQueryParam($param, array_keys($... | [
"private",
"function",
"parseQueryString",
"(",
"$",
"queryString",
")",
"{",
"parse_str",
"(",
"$",
"queryString",
",",
"$",
"parsed",
")",
";",
"$",
"supported",
"=",
"$",
"this",
"->",
"getSupportedParams",
"(",
")",
";",
"foreach",
"(",
"$",
"parsed",
... | Parses the incoming request query string and sets appropriate properties on this RestRequest object.
@param string $queryString
@return self
@throws RestException | [
"Parses",
"the",
"incoming",
"request",
"query",
"string",
"and",
"sets",
"appropriate",
"properties",
"on",
"this",
"RestRequest",
"object",
"."
] | 7e684b88bb22a2e18397df9402075c6533084b16 | https://github.com/as3io/modlr/blob/7e684b88bb22a2e18397df9402075c6533084b16/src/Rest/RestRequest.php#L655-L672 |
203,477 | as3io/modlr | src/Rest/RestRequest.php | RestRequest.extractInclusions | private function extractInclusions(array $params)
{
if (false === $this->issetNotEmpty(self::PARAM_INCLUSIONS, $params)) {
if (true === $this->config->includeAllByDefault()) {
$this->inclusions = ['*' => true];
}
return $this;
}
$inclusions... | php | private function extractInclusions(array $params)
{
if (false === $this->issetNotEmpty(self::PARAM_INCLUSIONS, $params)) {
if (true === $this->config->includeAllByDefault()) {
$this->inclusions = ['*' => true];
}
return $this;
}
$inclusions... | [
"private",
"function",
"extractInclusions",
"(",
"array",
"$",
"params",
")",
"{",
"if",
"(",
"false",
"===",
"$",
"this",
"->",
"issetNotEmpty",
"(",
"self",
"::",
"PARAM_INCLUSIONS",
",",
"$",
"params",
")",
")",
"{",
"if",
"(",
"true",
"===",
"$",
"... | Extracts relationship inclusions from an array of query params.
@param array $params
@return self | [
"Extracts",
"relationship",
"inclusions",
"from",
"an",
"array",
"of",
"query",
"params",
"."
] | 7e684b88bb22a2e18397df9402075c6533084b16 | https://github.com/as3io/modlr/blob/7e684b88bb22a2e18397df9402075c6533084b16/src/Rest/RestRequest.php#L680-L696 |
203,478 | as3io/modlr | src/Rest/RestRequest.php | RestRequest.extractSorting | private function extractSorting(array $params)
{
if (false === $this->issetNotEmpty(self::PARAM_SORTING, $params)) {
return $this;
}
$sort = explode(',', $params[self::PARAM_SORTING]);
$this->sorting = [];
foreach ($sort as $field) {
$direction = 1;
... | php | private function extractSorting(array $params)
{
if (false === $this->issetNotEmpty(self::PARAM_SORTING, $params)) {
return $this;
}
$sort = explode(',', $params[self::PARAM_SORTING]);
$this->sorting = [];
foreach ($sort as $field) {
$direction = 1;
... | [
"private",
"function",
"extractSorting",
"(",
"array",
"$",
"params",
")",
"{",
"if",
"(",
"false",
"===",
"$",
"this",
"->",
"issetNotEmpty",
"(",
"self",
"::",
"PARAM_SORTING",
",",
"$",
"params",
")",
")",
"{",
"return",
"$",
"this",
";",
"}",
"$",
... | Extracts sorting criteria from an array of query params.
@param array $params
@return self | [
"Extracts",
"sorting",
"criteria",
"from",
"an",
"array",
"of",
"query",
"params",
"."
] | 7e684b88bb22a2e18397df9402075c6533084b16 | https://github.com/as3io/modlr/blob/7e684b88bb22a2e18397df9402075c6533084b16/src/Rest/RestRequest.php#L704-L720 |
203,479 | as3io/modlr | src/Rest/RestRequest.php | RestRequest.extractFields | private function extractFields(array $params)
{
if (false === $this->issetNotEmpty(self::PARAM_FIELDSETS, $params)) {
return $this;
}
$fields = $params[self::PARAM_FIELDSETS];
if (!is_array($fields)) {
throw RestException::invalidQueryParam(self::PARAM_FIELDSE... | php | private function extractFields(array $params)
{
if (false === $this->issetNotEmpty(self::PARAM_FIELDSETS, $params)) {
return $this;
}
$fields = $params[self::PARAM_FIELDSETS];
if (!is_array($fields)) {
throw RestException::invalidQueryParam(self::PARAM_FIELDSE... | [
"private",
"function",
"extractFields",
"(",
"array",
"$",
"params",
")",
"{",
"if",
"(",
"false",
"===",
"$",
"this",
"->",
"issetNotEmpty",
"(",
"self",
"::",
"PARAM_FIELDSETS",
",",
"$",
"params",
")",
")",
"{",
"return",
"$",
"this",
";",
"}",
"$",... | Extracts fields to return from an array of query params.
@param array $params
@return self | [
"Extracts",
"fields",
"to",
"return",
"from",
"an",
"array",
"of",
"query",
"params",
"."
] | 7e684b88bb22a2e18397df9402075c6533084b16 | https://github.com/as3io/modlr/blob/7e684b88bb22a2e18397df9402075c6533084b16/src/Rest/RestRequest.php#L728-L741 |
203,480 | as3io/modlr | src/Rest/RestRequest.php | RestRequest.extractFilters | private function extractFilters(array $params)
{
if (false === $this->issetNotEmpty(self::PARAM_FILTERING, $params)) {
return $this;
}
$filters = $params[self::PARAM_FILTERING];
if (!is_array($filters)) {
throw RestException::invalidQueryParam(self::PARAM_FILT... | php | private function extractFilters(array $params)
{
if (false === $this->issetNotEmpty(self::PARAM_FILTERING, $params)) {
return $this;
}
$filters = $params[self::PARAM_FILTERING];
if (!is_array($filters)) {
throw RestException::invalidQueryParam(self::PARAM_FILT... | [
"private",
"function",
"extractFilters",
"(",
"array",
"$",
"params",
")",
"{",
"if",
"(",
"false",
"===",
"$",
"this",
"->",
"issetNotEmpty",
"(",
"self",
"::",
"PARAM_FILTERING",
",",
"$",
"params",
")",
")",
"{",
"return",
"$",
"this",
";",
"}",
"$"... | Extracts filtering criteria from an array of query params.
@param array $params
@return self | [
"Extracts",
"filtering",
"criteria",
"from",
"an",
"array",
"of",
"query",
"params",
"."
] | 7e684b88bb22a2e18397df9402075c6533084b16 | https://github.com/as3io/modlr/blob/7e684b88bb22a2e18397df9402075c6533084b16/src/Rest/RestRequest.php#L771-L784 |
203,481 | as3io/modlr | src/Rest/RestRequest.php | RestRequest.getSupportedParams | public function getSupportedParams()
{
return [
self::PARAM_INCLUSIONS => true,
self::PARAM_FIELDSETS => true,
self::PARAM_SORTING => true,
self::PARAM_PAGINATION => true,
self::PARAM_FILTERING => true,
];
} | php | public function getSupportedParams()
{
return [
self::PARAM_INCLUSIONS => true,
self::PARAM_FIELDSETS => true,
self::PARAM_SORTING => true,
self::PARAM_PAGINATION => true,
self::PARAM_FILTERING => true,
];
} | [
"public",
"function",
"getSupportedParams",
"(",
")",
"{",
"return",
"[",
"self",
"::",
"PARAM_INCLUSIONS",
"=>",
"true",
",",
"self",
"::",
"PARAM_FIELDSETS",
"=>",
"true",
",",
"self",
"::",
"PARAM_SORTING",
"=>",
"true",
",",
"self",
"::",
"PARAM_PAGINATION... | Gets query string parameters that this request supports.
@return array | [
"Gets",
"query",
"string",
"parameters",
"that",
"this",
"request",
"supports",
"."
] | 7e684b88bb22a2e18397df9402075c6533084b16 | https://github.com/as3io/modlr/blob/7e684b88bb22a2e18397df9402075c6533084b16/src/Rest/RestRequest.php#L791-L800 |
203,482 | soliantconsulting/SoliantEntityAudit | src/SoliantEntityAudit/Controller/IndexController.php | IndexController.userAction | public function userAction()
{
$page = (int)$this->getEvent()->getRouteMatch()->getParam('page');
$userId = (int)$this->getEvent()->getRouteMatch()->getParam('userId');
$user = \SoliantEntityAudit\Module::getModuleOptions()->getEntityManager()
->getRepository(\SoliantEntityAudit... | php | public function userAction()
{
$page = (int)$this->getEvent()->getRouteMatch()->getParam('page');
$userId = (int)$this->getEvent()->getRouteMatch()->getParam('userId');
$user = \SoliantEntityAudit\Module::getModuleOptions()->getEntityManager()
->getRepository(\SoliantEntityAudit... | [
"public",
"function",
"userAction",
"(",
")",
"{",
"$",
"page",
"=",
"(",
"int",
")",
"$",
"this",
"->",
"getEvent",
"(",
")",
"->",
"getRouteMatch",
"(",
")",
"->",
"getParam",
"(",
"'page'",
")",
";",
"$",
"userId",
"=",
"(",
"int",
")",
"$",
"... | Renders a paginated list of revisions for the given user
@param int $page | [
"Renders",
"a",
"paginated",
"list",
"of",
"revisions",
"for",
"the",
"given",
"user"
] | 9e77a39ca8399d43c2113c532f3cf2df5349d4a5 | https://github.com/soliantconsulting/SoliantEntityAudit/blob/9e77a39ca8399d43c2113c532f3cf2df5349d4a5/src/SoliantEntityAudit/Controller/IndexController.php#L31-L43 |
203,483 | soliantconsulting/SoliantEntityAudit | src/SoliantEntityAudit/Controller/IndexController.php | IndexController.revisionEntityAction | public function revisionEntityAction()
{
$this->mapAllAuditedClasses();
$page = (int)$this->getEvent()->getRouteMatch()->getParam('page');
$revisionEntityId = (int) $this->getEvent()->getRouteMatch()->getParam('revisionEntityId');
$revisionEntity = \SoliantEntityAudit\Module::getMo... | php | public function revisionEntityAction()
{
$this->mapAllAuditedClasses();
$page = (int)$this->getEvent()->getRouteMatch()->getParam('page');
$revisionEntityId = (int) $this->getEvent()->getRouteMatch()->getParam('revisionEntityId');
$revisionEntity = \SoliantEntityAudit\Module::getMo... | [
"public",
"function",
"revisionEntityAction",
"(",
")",
"{",
"$",
"this",
"->",
"mapAllAuditedClasses",
"(",
")",
";",
"$",
"page",
"=",
"(",
"int",
")",
"$",
"this",
"->",
"getEvent",
"(",
")",
"->",
"getRouteMatch",
"(",
")",
"->",
"getParam",
"(",
"... | Show the detail for a specific revision entity | [
"Show",
"the",
"detail",
"for",
"a",
"specific",
"revision",
"entity"
] | 9e77a39ca8399d43c2113c532f3cf2df5349d4a5 | https://github.com/soliantconsulting/SoliantEntityAudit/blob/9e77a39ca8399d43c2113c532f3cf2df5349d4a5/src/SoliantEntityAudit/Controller/IndexController.php#L70-L91 |
203,484 | soliantconsulting/SoliantEntityAudit | src/SoliantEntityAudit/Controller/IndexController.php | IndexController.entityAction | public function entityAction()
{
$page = (int)$this->getEvent()->getRouteMatch()->getParam('page');
$entityClass = $this->getEvent()->getRouteMatch()->getParam('entityClass');
return array(
'entityClass' => $entityClass,
'page' => $page,
);
} | php | public function entityAction()
{
$page = (int)$this->getEvent()->getRouteMatch()->getParam('page');
$entityClass = $this->getEvent()->getRouteMatch()->getParam('entityClass');
return array(
'entityClass' => $entityClass,
'page' => $page,
);
} | [
"public",
"function",
"entityAction",
"(",
")",
"{",
"$",
"page",
"=",
"(",
"int",
")",
"$",
"this",
"->",
"getEvent",
"(",
")",
"->",
"getRouteMatch",
"(",
")",
"->",
"getParam",
"(",
"'page'",
")",
";",
"$",
"entityClass",
"=",
"$",
"this",
"->",
... | Lists revisions for the supplied entity. Takes an audited entity class or audit class
@param string $className
@param string $id | [
"Lists",
"revisions",
"for",
"the",
"supplied",
"entity",
".",
"Takes",
"an",
"audited",
"entity",
"class",
"or",
"audit",
"class"
] | 9e77a39ca8399d43c2113c532f3cf2df5349d4a5 | https://github.com/soliantconsulting/SoliantEntityAudit/blob/9e77a39ca8399d43c2113c532f3cf2df5349d4a5/src/SoliantEntityAudit/Controller/IndexController.php#L99-L108 |
203,485 | edwardstock/forker | src/system/SharedMemoryManager.php | SharedMemoryManager.packHeader | private function packHeader(int $id, int $offset, int $size, int $flags = 0): string
{
return pack('SSQI', $id, $offset, $size, $flags);
} | php | private function packHeader(int $id, int $offset, int $size, int $flags = 0): string
{
return pack('SSQI', $id, $offset, $size, $flags);
} | [
"private",
"function",
"packHeader",
"(",
"int",
"$",
"id",
",",
"int",
"$",
"offset",
",",
"int",
"$",
"size",
",",
"int",
"$",
"flags",
"=",
"0",
")",
":",
"string",
"{",
"return",
"pack",
"(",
"'SSQI'",
",",
"$",
"id",
",",
"$",
"offset",
",",... | Blocking method, writes process result state to state file
@param int $id
@param int $offset
@param int $size
@param int $flags
@return string binary data
sizes: 2 (ushort) + 2 (ushort) + 8(ulong long) + 4(uint) bytes, order - machine-dependent
@see SharedMemoryManager::F_SERIALIZED and other flags | [
"Blocking",
"method",
"writes",
"process",
"result",
"state",
"to",
"state",
"file"
] | 024a6d1d8a34a4fffb59717e066cad01a78141b5 | https://github.com/edwardstock/forker/blob/024a6d1d8a34a4fffb59717e066cad01a78141b5/src/system/SharedMemoryManager.php#L323-L326 |
203,486 | activecollab/databaseconnection | src/Connection/MysqliConnection.php | MysqliConnection.& | public function &setDatabaseName($database_name, $select_database = true)
{
if (empty($select_database) || $this->link->select_db($database_name)) {
$this->database_name = $database_name;
} else {
throw new ConnectionException("Failed to select database '$database_name'");
... | php | public function &setDatabaseName($database_name, $select_database = true)
{
if (empty($select_database) || $this->link->select_db($database_name)) {
$this->database_name = $database_name;
} else {
throw new ConnectionException("Failed to select database '$database_name'");
... | [
"public",
"function",
"&",
"setDatabaseName",
"(",
"$",
"database_name",
",",
"$",
"select_database",
"=",
"true",
")",
"{",
"if",
"(",
"empty",
"(",
"$",
"select_database",
")",
"||",
"$",
"this",
"->",
"link",
"->",
"select_db",
"(",
"$",
"database_name"... | Set database name and optionally select that database.
@param string $database_name
@param bool|true $select_database
@return $this
@throws ConnectionException | [
"Set",
"database",
"name",
"and",
"optionally",
"select",
"that",
"database",
"."
] | f38accc083863262325858a3d72a5afb6b4513f8 | https://github.com/activecollab/databaseconnection/blob/f38accc083863262325858a3d72a5afb6b4513f8/src/Connection/MysqliConnection.php#L71-L80 |
203,487 | activecollab/databaseconnection | src/Connection/MysqliConnection.php | MysqliConnection.tryToRecoverFromFailedQuery | private function tryToRecoverFromFailedQuery($sql, $arguments, $load_mode, $return_mode)
{
switch ($this->link->errno) {
// Non-transactional tables not rolled back!
case 1196:
return null;
// Server gone away
case 2006:
case 2013... | php | private function tryToRecoverFromFailedQuery($sql, $arguments, $load_mode, $return_mode)
{
switch ($this->link->errno) {
// Non-transactional tables not rolled back!
case 1196:
return null;
// Server gone away
case 2006:
case 2013... | [
"private",
"function",
"tryToRecoverFromFailedQuery",
"(",
"$",
"sql",
",",
"$",
"arguments",
",",
"$",
"load_mode",
",",
"$",
"return_mode",
")",
"{",
"switch",
"(",
"$",
"this",
"->",
"link",
"->",
"errno",
")",
"{",
"// Non-transactional tables not rolled bac... | Try to recover from failed query.
@param string $sql
@param array|null $arguments
@param $load_mode
@param $return_mode
@return array|bool|DateTime|float|int|mixed|null|string|void
@throws QueryException | [
"Try",
"to",
"recover",
"from",
"failed",
"query",
"."
] | f38accc083863262325858a3d72a5afb6b4513f8 | https://github.com/activecollab/databaseconnection/blob/f38accc083863262325858a3d72a5afb6b4513f8/src/Connection/MysqliConnection.php#L778-L799 |
203,488 | activecollab/databaseconnection | src/Connection/MysqliConnection.php | MysqliConnection.onLogQuery | public function onLogQuery(callable $callback = null)
{
if ($callback === null || is_callable($callback)) {
$this->on_log_query = $callback;
} else {
throw new InvalidArgumentException('Callback needs to be NULL or callable');
}
} | php | public function onLogQuery(callable $callback = null)
{
if ($callback === null || is_callable($callback)) {
$this->on_log_query = $callback;
} else {
throw new InvalidArgumentException('Callback needs to be NULL or callable');
}
} | [
"public",
"function",
"onLogQuery",
"(",
"callable",
"$",
"callback",
"=",
"null",
")",
"{",
"if",
"(",
"$",
"callback",
"===",
"null",
"||",
"is_callable",
"(",
"$",
"callback",
")",
")",
"{",
"$",
"this",
"->",
"on_log_query",
"=",
"$",
"callback",
"... | Set a callback that will receive every query after we run it.
Callback should accept two parameters: first for SQL that was ran, and second for time that it took to run
@param callable|null $callback | [
"Set",
"a",
"callback",
"that",
"will",
"receive",
"every",
"query",
"after",
"we",
"run",
"it",
"."
] | f38accc083863262325858a3d72a5afb6b4513f8 | https://github.com/activecollab/databaseconnection/blob/f38accc083863262325858a3d72a5afb6b4513f8/src/Connection/MysqliConnection.php#L955-L962 |
203,489 | QoboLtd/cakephp-translations | src/Model/Table/TranslationsTable.php | TranslationsTable.getLanguageId | public function getLanguageId(string $shortCode): string
{
$query = $this->Languages->find('all', [
'conditions' => ['Languages.code' => $shortCode]
]);
$language = $query->first();
if (empty($language->id)) {
throw new InvalidArgumentException("Unsupported l... | php | public function getLanguageId(string $shortCode): string
{
$query = $this->Languages->find('all', [
'conditions' => ['Languages.code' => $shortCode]
]);
$language = $query->first();
if (empty($language->id)) {
throw new InvalidArgumentException("Unsupported l... | [
"public",
"function",
"getLanguageId",
"(",
"string",
"$",
"shortCode",
")",
":",
"string",
"{",
"$",
"query",
"=",
"$",
"this",
"->",
"Languages",
"->",
"find",
"(",
"'all'",
",",
"[",
"'conditions'",
"=>",
"[",
"'Languages.code'",
"=>",
"$",
"shortCode",... | Retrive language ID by code
@throws \InvalidArgumentException for unknown short code
@param string $shortCode language code i.e. ru, cn etc
@return string language's uuid | [
"Retrive",
"language",
"ID",
"by",
"code"
] | b488eafce71a55d517b975342487812f0d2d375a | https://github.com/QoboLtd/cakephp-translations/blob/b488eafce71a55d517b975342487812f0d2d375a/src/Model/Table/TranslationsTable.php#L185-L197 |
203,490 | andyburton/Sonic-Framework | src/Resource/Crypt.php | Crypt._genRijndael256IV | public static function _genRijndael256IV ($cypher = FALSE)
{
// If a module has not been passed
if (!$cypher)
{
// Open the cypher
$cypher = mcrypt_module_open ('rijndael-256', '', 'ofb', '');
}
// Create the IV
$iv = mcrypt_create_iv (mcrypt_enc_get_iv_size ($cypher), MCRYPT... | php | public static function _genRijndael256IV ($cypher = FALSE)
{
// If a module has not been passed
if (!$cypher)
{
// Open the cypher
$cypher = mcrypt_module_open ('rijndael-256', '', 'ofb', '');
}
// Create the IV
$iv = mcrypt_create_iv (mcrypt_enc_get_iv_size ($cypher), MCRYPT... | [
"public",
"static",
"function",
"_genRijndael256IV",
"(",
"$",
"cypher",
"=",
"FALSE",
")",
"{",
"// If a module has not been passed",
"if",
"(",
"!",
"$",
"cypher",
")",
"{",
"// Open the cypher",
"$",
"cypher",
"=",
"mcrypt_module_open",
"(",
"'rijndael-256'",
"... | Generate a rijndael 256 initialisation vector
@param resource $cypher Encryption Resource
@return string | [
"Generate",
"a",
"rijndael",
"256",
"initialisation",
"vector"
] | a5999448a0abab4d542413002a780ede391e7374 | https://github.com/andyburton/Sonic-Framework/blob/a5999448a0abab4d542413002a780ede391e7374/src/Resource/Crypt.php#L70-L96 |
203,491 | andyburton/Sonic-Framework | src/Resource/Crypt.php | Crypt._encryptRijndael256 | public static function _encryptRijndael256 ($str, $key, $iv = FALSE)
{
// If the string is empty
if (empty ($str))
{
return '';
}
// Open the cypher
$cypher = mcrypt_module_open ('rijndael-256', '', 'ofb', '');
// Create the IV if there is none
if ($iv === FALSE)
{
$iv = sel... | php | public static function _encryptRijndael256 ($str, $key, $iv = FALSE)
{
// If the string is empty
if (empty ($str))
{
return '';
}
// Open the cypher
$cypher = mcrypt_module_open ('rijndael-256', '', 'ofb', '');
// Create the IV if there is none
if ($iv === FALSE)
{
$iv = sel... | [
"public",
"static",
"function",
"_encryptRijndael256",
"(",
"$",
"str",
",",
"$",
"key",
",",
"$",
"iv",
"=",
"FALSE",
")",
"{",
"// If the string is empty",
"if",
"(",
"empty",
"(",
"$",
"str",
")",
")",
"{",
"return",
"''",
";",
"}",
"// Open the cyphe... | Encrypt and return a string using the Rijndael 256 cypher
@param string $str String to encrypt
@param string $key Key to encrypt the string
@param string $iv Initialisation vector
@return string | [
"Encrypt",
"and",
"return",
"a",
"string",
"using",
"the",
"Rijndael",
"256",
"cypher"
] | a5999448a0abab4d542413002a780ede391e7374 | https://github.com/andyburton/Sonic-Framework/blob/a5999448a0abab4d542413002a780ede391e7374/src/Resource/Crypt.php#L107-L152 |
203,492 | andyburton/Sonic-Framework | src/Resource/Crypt.php | Crypt._decryptRijndael256 | public static function _decryptRijndael256 ($str, $key, $iv)
{
// If the string is empty
if (empty ($str))
{
return '';
}
// Open the cypher
$cypher = mcrypt_module_open ('rijndael-256', '', 'ofb', '');
// Set Key
$key = substr ($key, 0, mcrypt_enc_get_key_size ($cypher));
/... | php | public static function _decryptRijndael256 ($str, $key, $iv)
{
// If the string is empty
if (empty ($str))
{
return '';
}
// Open the cypher
$cypher = mcrypt_module_open ('rijndael-256', '', 'ofb', '');
// Set Key
$key = substr ($key, 0, mcrypt_enc_get_key_size ($cypher));
/... | [
"public",
"static",
"function",
"_decryptRijndael256",
"(",
"$",
"str",
",",
"$",
"key",
",",
"$",
"iv",
")",
"{",
"// If the string is empty",
"if",
"(",
"empty",
"(",
"$",
"str",
")",
")",
"{",
"return",
"''",
";",
"}",
"// Open the cypher",
"$",
"cyph... | Decrypt and return a string using the Rijndael 256 cypher
@param string $str String to decrypt
@param string $key Key to decrypt the string
@param string $ic Initialisation vector
@return string | [
"Decrypt",
"and",
"return",
"a",
"string",
"using",
"the",
"Rijndael",
"256",
"cypher"
] | a5999448a0abab4d542413002a780ede391e7374 | https://github.com/andyburton/Sonic-Framework/blob/a5999448a0abab4d542413002a780ede391e7374/src/Resource/Crypt.php#L163-L201 |
203,493 | canax/anax-ramverk1-me | src/StyleChooser/StyleChooserController.php | StyleChooserController.updateActionPost | public function updateActionPost() : object
{
$response = $this->di->get("response");
$request = $this->di->get("request");
$session = $this->di->get("session");
$key = $request->getPost("stylechooser");
if ($key === "none") {
$session->set("flashmessage", "Unset... | php | public function updateActionPost() : object
{
$response = $this->di->get("response");
$request = $this->di->get("request");
$session = $this->di->get("session");
$key = $request->getPost("stylechooser");
if ($key === "none") {
$session->set("flashmessage", "Unset... | [
"public",
"function",
"updateActionPost",
"(",
")",
":",
"object",
"{",
"$",
"response",
"=",
"$",
"this",
"->",
"di",
"->",
"get",
"(",
"\"response\"",
")",
";",
"$",
"request",
"=",
"$",
"this",
"->",
"di",
"->",
"get",
"(",
"\"request\"",
")",
";"... | Update current selected style.
@return object | [
"Update",
"current",
"selected",
"style",
"."
] | 592d5e7891f20b68047009ae2c9efdff45763543 | https://github.com/canax/anax-ramverk1-me/blob/592d5e7891f20b68047009ae2c9efdff45763543/src/StyleChooser/StyleChooserController.php#L111-L127 |
203,494 | canax/anax-ramverk1-me | src/StyleChooser/StyleChooserController.php | StyleChooserController.updateActionGet | public function updateActionGet($style) : object
{
$response = $this->di->get("response");
$session = $this->di->get("session");
$key = $this->cssUrl . "/" . $style . ".css";
$keyMin = $this->cssUrl . "/" . $style . ".min.css";
if ($style === "none") {
$session-... | php | public function updateActionGet($style) : object
{
$response = $this->di->get("response");
$session = $this->di->get("session");
$key = $this->cssUrl . "/" . $style . ".css";
$keyMin = $this->cssUrl . "/" . $style . ".min.css";
if ($style === "none") {
$session-... | [
"public",
"function",
"updateActionGet",
"(",
"$",
"style",
")",
":",
"object",
"{",
"$",
"response",
"=",
"$",
"this",
"->",
"di",
"->",
"get",
"(",
"\"response\"",
")",
";",
"$",
"session",
"=",
"$",
"this",
"->",
"di",
"->",
"get",
"(",
"\"session... | Update current selected style using a GET url and redirect to last
page visited.
@param string $style the key to the style to use.
@return object | [
"Update",
"current",
"selected",
"style",
"using",
"a",
"GET",
"url",
"and",
"redirect",
"to",
"last",
"page",
"visited",
"."
] | 592d5e7891f20b68047009ae2c9efdff45763543 | https://github.com/canax/anax-ramverk1-me/blob/592d5e7891f20b68047009ae2c9efdff45763543/src/StyleChooser/StyleChooserController.php#L139-L160 |
203,495 | schpill/thin | src/Reflection.php | Reflection.get | public function get($class = null)
{
$class = $this->getClass($class);
if (Arrays::exists($class, $this->reflections)) {
return $this->reflections[$class];
}
throw new Exception("Class not found: $class");
} | php | public function get($class = null)
{
$class = $this->getClass($class);
if (Arrays::exists($class, $this->reflections)) {
return $this->reflections[$class];
}
throw new Exception("Class not found: $class");
} | [
"public",
"function",
"get",
"(",
"$",
"class",
"=",
"null",
")",
"{",
"$",
"class",
"=",
"$",
"this",
"->",
"getClass",
"(",
"$",
"class",
")",
";",
"if",
"(",
"Arrays",
"::",
"exists",
"(",
"$",
"class",
",",
"$",
"this",
"->",
"reflections",
"... | Get an Instantiated ReflectionClass.
@param string $class Optional name of a class
@return mixed null or a ReflectionClass instance
@throws Exception if class was not found | [
"Get",
"an",
"Instantiated",
"ReflectionClass",
"."
] | a9102d9d6f70e8b0f6be93153f70849f46489ee1 | https://github.com/schpill/thin/blob/a9102d9d6f70e8b0f6be93153f70849f46489ee1/src/Reflection.php#L58-L67 |
203,496 | ScreamingDev/phpsemver | lib/PHPSemVer/Console/AbstractCommand.php | AbstractCommand.appendIgnorePattern | protected function appendIgnorePattern($config, $latestWrapper, $previousWrapper)
{
$latestWrapper->setFilter($config->filter());
$previousWrapper->setFilter($config->filter());
} | php | protected function appendIgnorePattern($config, $latestWrapper, $previousWrapper)
{
$latestWrapper->setFilter($config->filter());
$previousWrapper->setFilter($config->filter());
} | [
"protected",
"function",
"appendIgnorePattern",
"(",
"$",
"config",
",",
"$",
"latestWrapper",
",",
"$",
"previousWrapper",
")",
"{",
"$",
"latestWrapper",
"->",
"setFilter",
"(",
"$",
"config",
"->",
"filter",
"(",
")",
")",
";",
"$",
"previousWrapper",
"->... | Add pattern to exclude files.
@param Config $config
@param AbstractWrapper $latestWrapper
@param AbstractWrapper $previousWrapper | [
"Add",
"pattern",
"to",
"exclude",
"files",
"."
] | 11a4bc508f71dee73d4f5fee2e9d39e7984d3e15 | https://github.com/ScreamingDev/phpsemver/blob/11a4bc508f71dee73d4f5fee2e9d39e7984d3e15/lib/PHPSemVer/Console/AbstractCommand.php#L54-L58 |
203,497 | ScreamingDev/phpsemver | lib/PHPSemVer/Console/AbstractCommand.php | AbstractCommand.debug | public function debug($message)
{
if ( ! $this->getOutput()->isDebug()) {
return null;
}
if (func_num_args() > 1) {
$message = vsprintf($message, array_slice(func_get_args(), 1));
}
$this->getOutput()->writeln($message);
} | php | public function debug($message)
{
if ( ! $this->getOutput()->isDebug()) {
return null;
}
if (func_num_args() > 1) {
$message = vsprintf($message, array_slice(func_get_args(), 1));
}
$this->getOutput()->writeln($message);
} | [
"public",
"function",
"debug",
"(",
"$",
"message",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"getOutput",
"(",
")",
"->",
"isDebug",
"(",
")",
")",
"{",
"return",
"null",
";",
"}",
"if",
"(",
"func_num_args",
"(",
")",
">",
"1",
")",
"{",
"... | Print debug message.
Prints debug message,
if debug mode is enabled (via -vvv).
@param $message
@return null | [
"Print",
"debug",
"message",
"."
] | 11a4bc508f71dee73d4f5fee2e9d39e7984d3e15 | https://github.com/ScreamingDev/phpsemver/blob/11a4bc508f71dee73d4f5fee2e9d39e7984d3e15/lib/PHPSemVer/Console/AbstractCommand.php#L97-L108 |
203,498 | ScreamingDev/phpsemver | lib/PHPSemVer/Console/AbstractCommand.php | AbstractCommand.getEnvironment | public function getEnvironment($config = null)
{
if ( ! $this->environment) {
if (null == $config) {
$config = $this->getConfig();
}
$this->environment = new Environment($config);
}
return $this->environment;
} | php | public function getEnvironment($config = null)
{
if ( ! $this->environment) {
if (null == $config) {
$config = $this->getConfig();
}
$this->environment = new Environment($config);
}
return $this->environment;
} | [
"public",
"function",
"getEnvironment",
"(",
"$",
"config",
"=",
"null",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"environment",
")",
"{",
"if",
"(",
"null",
"==",
"$",
"config",
")",
"{",
"$",
"config",
"=",
"$",
"this",
"->",
"getConfig",
"("... | Get environment object.
@param Config $config Deprecated 4.0.0, command config will be used instead.
@return Environment | [
"Get",
"environment",
"object",
"."
] | 11a4bc508f71dee73d4f5fee2e9d39e7984d3e15 | https://github.com/ScreamingDev/phpsemver/blob/11a4bc508f71dee73d4f5fee2e9d39e7984d3e15/lib/PHPSemVer/Console/AbstractCommand.php#L154-L165 |
203,499 | ScreamingDev/phpsemver | lib/PHPSemVer/Console/AbstractCommand.php | AbstractCommand.getPreviousWrapper | protected function getPreviousWrapper()
{
if ($this->previousWrapper) {
return $this->previousWrapper;
}
$input = $this->getInput();
$this->previousWrapper = $this->getWrapperInstance(
$input->getArgument('previous'),
$input->getOption('type')
... | php | protected function getPreviousWrapper()
{
if ($this->previousWrapper) {
return $this->previousWrapper;
}
$input = $this->getInput();
$this->previousWrapper = $this->getWrapperInstance(
$input->getArgument('previous'),
$input->getOption('type')
... | [
"protected",
"function",
"getPreviousWrapper",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"previousWrapper",
")",
"{",
"return",
"$",
"this",
"->",
"previousWrapper",
";",
"}",
"$",
"input",
"=",
"$",
"this",
"->",
"getInput",
"(",
")",
";",
"$",
"th... | Get the wrapper for the VCS.
@return AbstractWrapper | [
"Get",
"the",
"wrapper",
"for",
"the",
"VCS",
"."
] | 11a4bc508f71dee73d4f5fee2e9d39e7984d3e15 | https://github.com/ScreamingDev/phpsemver/blob/11a4bc508f71dee73d4f5fee2e9d39e7984d3e15/lib/PHPSemVer/Console/AbstractCommand.php#L213-L227 |
Subsets and Splits
Yii Code Samples
Gathers all records from test, train, and validation sets that contain the word 'yii', providing a basic filtered view of the dataset relevant to Yii-related content.