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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
34,100 | silverorange/swat | Swat/SwatTableView.php | SwatTableView.insertColumnBefore | public function insertColumnBefore(
SwatTableViewColumn $column,
SwatTableViewColumn $reference_column
) {
$this->insertColumn($column, $reference_column, false);
} | php | public function insertColumnBefore(
SwatTableViewColumn $column,
SwatTableViewColumn $reference_column
) {
$this->insertColumn($column, $reference_column, false);
} | [
"public",
"function",
"insertColumnBefore",
"(",
"SwatTableViewColumn",
"$",
"column",
",",
"SwatTableViewColumn",
"$",
"reference_column",
")",
"{",
"$",
"this",
"->",
"insertColumn",
"(",
"$",
"column",
",",
"$",
"reference_column",
",",
"false",
")",
";",
"}"... | Inserts a column before an existing column in this table-view
@param SwatTableViewColumn $column the column to insert.
@param SwatTableViewColumn $reference_column the column before which the
column will be inserted.
@throws SwatWidgetNotFoundException if the reference column does not
exist in this table-view.
@throw... | [
"Inserts",
"a",
"column",
"before",
"an",
"existing",
"column",
"in",
"this",
"table",
"-",
"view"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTableView.php#L1388-L1393 |
34,101 | silverorange/swat | Swat/SwatTableView.php | SwatTableView.insertColumnAfter | public function insertColumnAfter(
SwatTableViewColumn $column,
SwatTableViewColumn $reference_column
) {
$this->insertColumn($column, $reference_column, true);
} | php | public function insertColumnAfter(
SwatTableViewColumn $column,
SwatTableViewColumn $reference_column
) {
$this->insertColumn($column, $reference_column, true);
} | [
"public",
"function",
"insertColumnAfter",
"(",
"SwatTableViewColumn",
"$",
"column",
",",
"SwatTableViewColumn",
"$",
"reference_column",
")",
"{",
"$",
"this",
"->",
"insertColumn",
"(",
"$",
"column",
",",
"$",
"reference_column",
",",
"true",
")",
";",
"}"
] | Inserts a column after an existing column in this table-view
@param SwatTableViewColumn $column the column to insert.
@param SwatTableViewColumn $reference_column the column after which the
column will be inserted.
@throws SwatWidgetNotFoundException if the reference column does not
exist in this table-view.
@throws ... | [
"Inserts",
"a",
"column",
"after",
"an",
"existing",
"column",
"in",
"this",
"table",
"-",
"view"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTableView.php#L1410-L1415 |
34,102 | silverorange/swat | Swat/SwatTableView.php | SwatTableView.getColumn | public function getColumn($id)
{
if (!array_key_exists($id, $this->columns_by_id)) {
throw new SwatWidgetNotFoundException(
"Column with an id of '{$id}' not found."
);
}
return $this->columns_by_id[$id];
} | php | public function getColumn($id)
{
if (!array_key_exists($id, $this->columns_by_id)) {
throw new SwatWidgetNotFoundException(
"Column with an id of '{$id}' not found."
);
}
return $this->columns_by_id[$id];
} | [
"public",
"function",
"getColumn",
"(",
"$",
"id",
")",
"{",
"if",
"(",
"!",
"array_key_exists",
"(",
"$",
"id",
",",
"$",
"this",
"->",
"columns_by_id",
")",
")",
"{",
"throw",
"new",
"SwatWidgetNotFoundException",
"(",
"\"Column with an id of '{$id}' not found... | Gets a column in this table-view by the column's id
@param string $id the id of the column to get.
@return SwatTableViewColumn the requested column.
@throws SwatWidgetNotFoundException if no column with the specified id
exists in this table-view. | [
"Gets",
"a",
"column",
"in",
"this",
"table",
"-",
"view",
"by",
"the",
"column",
"s",
"id"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTableView.php#L1448-L1457 |
34,103 | silverorange/swat | Swat/SwatTableView.php | SwatTableView.getVisibleColumns | public function getVisibleColumns()
{
$columns = array();
foreach ($this->columns as $column) {
if ($column->visible) {
$columns[] = $column;
}
}
return $columns;
} | php | public function getVisibleColumns()
{
$columns = array();
foreach ($this->columns as $column) {
if ($column->visible) {
$columns[] = $column;
}
}
return $columns;
} | [
"public",
"function",
"getVisibleColumns",
"(",
")",
"{",
"$",
"columns",
"=",
"array",
"(",
")",
";",
"foreach",
"(",
"$",
"this",
"->",
"columns",
"as",
"$",
"column",
")",
"{",
"if",
"(",
"$",
"column",
"->",
"visible",
")",
"{",
"$",
"columns",
... | Gets all visible columns of this table-view as an array
@return array the visible columns of this table-view. | [
"Gets",
"all",
"visible",
"columns",
"of",
"this",
"table",
"-",
"view",
"as",
"an",
"array"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTableView.php#L1493-L1503 |
34,104 | silverorange/swat | Swat/SwatTableView.php | SwatTableView.setDefaultOrderbyColumn | public function setDefaultOrderbyColumn(
SwatTableViewOrderableColumn $column,
$direction = SwatTableViewOrderableColumn::ORDER_BY_DIR_DESCENDING
) {
if ($column->view !== $this) {
throw new SwatException(
'Can only set the default orderby on ' .
... | php | public function setDefaultOrderbyColumn(
SwatTableViewOrderableColumn $column,
$direction = SwatTableViewOrderableColumn::ORDER_BY_DIR_DESCENDING
) {
if ($column->view !== $this) {
throw new SwatException(
'Can only set the default orderby on ' .
... | [
"public",
"function",
"setDefaultOrderbyColumn",
"(",
"SwatTableViewOrderableColumn",
"$",
"column",
",",
"$",
"direction",
"=",
"SwatTableViewOrderableColumn",
"::",
"ORDER_BY_DIR_DESCENDING",
")",
"{",
"if",
"(",
"$",
"column",
"->",
"view",
"!==",
"$",
"this",
")... | Sets a default column to use for ordering the data of this table-view
@param SwatTableViewOrderableColumn the column in this view to use
for default ordering
@param integer $direction the default direction of the ordered column.
@throws SwatException
@see SwatTableView::$default_orderby_column | [
"Sets",
"a",
"default",
"column",
"to",
"use",
"for",
"ordering",
"the",
"data",
"of",
"this",
"table",
"-",
"view"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTableView.php#L1532-L1545 |
34,105 | silverorange/swat | Swat/SwatTableView.php | SwatTableView.validateColumn | protected function validateColumn(SwatTableViewColumn $column)
{
// note: This works because the id property is set before children are
// added to parents in SwatUI.
if ($column->id !== null) {
if (array_key_exists($column->id, $this->columns_by_id)) {
throw new ... | php | protected function validateColumn(SwatTableViewColumn $column)
{
// note: This works because the id property is set before children are
// added to parents in SwatUI.
if ($column->id !== null) {
if (array_key_exists($column->id, $this->columns_by_id)) {
throw new ... | [
"protected",
"function",
"validateColumn",
"(",
"SwatTableViewColumn",
"$",
"column",
")",
"{",
"// note: This works because the id property is set before children are",
"// added to parents in SwatUI.",
"if",
"(",
"$",
"column",
"->",
"id",
"!==",
"null",
")",
"{",
"if",
... | Ensures a column added to this table-view is valid for this table-view
@param SwatTableViewColumn $column the column to check.
@throws SwatDuplicateIdException if the column has the same id as a
column already in this table-view. | [
"Ensures",
"a",
"column",
"added",
"to",
"this",
"table",
"-",
"view",
"is",
"valid",
"for",
"this",
"table",
"-",
"view"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTableView.php#L1558-L1572 |
34,106 | silverorange/swat | Swat/SwatTableView.php | SwatTableView.insertColumn | protected function insertColumn(
SwatTableViewColumn $column,
SwatTableViewColumn $reference_column = null,
$after = true
) {
$this->validateColumn($column);
if ($reference_column !== null) {
$key = array_search($reference_column, $this->columns, true);
... | php | protected function insertColumn(
SwatTableViewColumn $column,
SwatTableViewColumn $reference_column = null,
$after = true
) {
$this->validateColumn($column);
if ($reference_column !== null) {
$key = array_search($reference_column, $this->columns, true);
... | [
"protected",
"function",
"insertColumn",
"(",
"SwatTableViewColumn",
"$",
"column",
",",
"SwatTableViewColumn",
"$",
"reference_column",
"=",
"null",
",",
"$",
"after",
"=",
"true",
")",
"{",
"$",
"this",
"->",
"validateColumn",
"(",
"$",
"column",
")",
";",
... | Helper method to insert columns into this table-view
@param SwatTableViewColumn $column the column to insert.
@param SwatTableViewColumn $reference_column optional. An existing column
within this table-view to
which the inserted column
is relatively positioned.
If not specified, the
column is inserted at the
beginning... | [
"Helper",
"method",
"to",
"insert",
"columns",
"into",
"this",
"table",
"-",
"view"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTableView.php#L1611-L1657 |
34,107 | silverorange/swat | Swat/SwatTableView.php | SwatTableView.appendSpanningColumn | public function appendSpanningColumn(SwatTableViewSpanningColumn $column)
{
$this->spanning_columns[] = $column;
$column->view = $this;
$column->parent = $this;
} | php | public function appendSpanningColumn(SwatTableViewSpanningColumn $column)
{
$this->spanning_columns[] = $column;
$column->view = $this;
$column->parent = $this;
} | [
"public",
"function",
"appendSpanningColumn",
"(",
"SwatTableViewSpanningColumn",
"$",
"column",
")",
"{",
"$",
"this",
"->",
"spanning_columns",
"[",
"]",
"=",
"$",
"column",
";",
"$",
"column",
"->",
"view",
"=",
"$",
"this",
";",
"$",
"column",
"->",
"p... | Appends a spanning column object to this table-view
@param SwatTableViewSpanningColumn $column the table-view spanning column to use for this
table-view.
@see SwatTableViewSpanningColumn | [
"Appends",
"a",
"spanning",
"column",
"object",
"to",
"this",
"table",
"-",
"view"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTableView.php#L1672-L1677 |
34,108 | silverorange/swat | Swat/SwatTableView.php | SwatTableView.getSpanningColumn | public function getSpanningColumn($id)
{
if (!array_key_exists($id, $this->spanning_columns_by_id)) {
throw new SwatWidgetNotFoundException(
"Spanning column with an id of '{$id}' not found."
);
}
return $this->spanning_columns_by_id[$id];
} | php | public function getSpanningColumn($id)
{
if (!array_key_exists($id, $this->spanning_columns_by_id)) {
throw new SwatWidgetNotFoundException(
"Spanning column with an id of '{$id}' not found."
);
}
return $this->spanning_columns_by_id[$id];
} | [
"public",
"function",
"getSpanningColumn",
"(",
"$",
"id",
")",
"{",
"if",
"(",
"!",
"array_key_exists",
"(",
"$",
"id",
",",
"$",
"this",
"->",
"spanning_columns_by_id",
")",
")",
"{",
"throw",
"new",
"SwatWidgetNotFoundException",
"(",
"\"Spanning column with ... | Gets a spanning column in this table-view by the spanning column's id
@param string $id the id of the row to get.
@return SwatTableViewSpanningColumn the requested spanning column.
@throws SwatWidgetNotFoundException if no spanning column with the
specified id exists in this
table-view. | [
"Gets",
"a",
"spanning",
"column",
"in",
"this",
"table",
"-",
"view",
"by",
"the",
"spanning",
"column",
"s",
"id"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTableView.php#L1706-L1715 |
34,109 | silverorange/swat | Swat/SwatTableView.php | SwatTableView.getVisibleSpanningColumns | public function getVisibleSpanningColumns()
{
$columns = array();
foreach ($this->spanning_columns as $column) {
if ($column->visible) {
$columns[] = $column;
}
}
return $columns;
} | php | public function getVisibleSpanningColumns()
{
$columns = array();
foreach ($this->spanning_columns as $column) {
if ($column->visible) {
$columns[] = $column;
}
}
return $columns;
} | [
"public",
"function",
"getVisibleSpanningColumns",
"(",
")",
"{",
"$",
"columns",
"=",
"array",
"(",
")",
";",
"foreach",
"(",
"$",
"this",
"->",
"spanning_columns",
"as",
"$",
"column",
")",
"{",
"if",
"(",
"$",
"column",
"->",
"visible",
")",
"{",
"$... | Gets all visible spanning columns of this table-view as an array
@return array the visible spanning columns of this table-view. | [
"Gets",
"all",
"visible",
"spanning",
"columns",
"of",
"this",
"table",
"-",
"view",
"as",
"an",
"array"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTableView.php#L1738-L1749 |
34,110 | silverorange/swat | Swat/SwatTableView.php | SwatTableView.appendGroup | public function appendGroup(SwatTableViewGroup $group)
{
$this->validateGroup($group);
$this->groups[] = $group;
if ($group->id !== null) {
$this->groups_by_id[$group->id] = $group;
}
$group->view = $this;
$group->parent = $this;
} | php | public function appendGroup(SwatTableViewGroup $group)
{
$this->validateGroup($group);
$this->groups[] = $group;
if ($group->id !== null) {
$this->groups_by_id[$group->id] = $group;
}
$group->view = $this;
$group->parent = $this;
} | [
"public",
"function",
"appendGroup",
"(",
"SwatTableViewGroup",
"$",
"group",
")",
"{",
"$",
"this",
"->",
"validateGroup",
"(",
"$",
"group",
")",
";",
"$",
"this",
"->",
"groups",
"[",
"]",
"=",
"$",
"group",
";",
"if",
"(",
"$",
"group",
"->",
"id... | Appends a grouping object to this table-view
A grouping object affects how the data in the table model is displayed
in this table-view. With a grouping, rows are split into groups with
special group headers above each group.
Multiple groupings may be added to table-views.
@param SwatTableViewGroup $group the table-v... | [
"Appends",
"a",
"grouping",
"object",
"to",
"this",
"table",
"-",
"view"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTableView.php#L1773-L1785 |
34,111 | silverorange/swat | Swat/SwatTableView.php | SwatTableView.getGroup | public function getGroup($id)
{
if (!array_key_exists($id, $this->groups_by_id)) {
throw new SwatWidgetNotFoundException(
"Group with an id of '{$id}' not found."
);
}
return $this->groups_by_id[$id];
} | php | public function getGroup($id)
{
if (!array_key_exists($id, $this->groups_by_id)) {
throw new SwatWidgetNotFoundException(
"Group with an id of '{$id}' not found."
);
}
return $this->groups_by_id[$id];
} | [
"public",
"function",
"getGroup",
"(",
"$",
"id",
")",
"{",
"if",
"(",
"!",
"array_key_exists",
"(",
"$",
"id",
",",
"$",
"this",
"->",
"groups_by_id",
")",
")",
"{",
"throw",
"new",
"SwatWidgetNotFoundException",
"(",
"\"Group with an id of '{$id}' not found.\"... | Gets a group in this table-view by the group's id
@param string $id the id of the group to get.
@return SwatTableViewGroup the requested group.
@throws SwatWidgetNotFoundException if no group with the specified id
exists in this table-view. | [
"Gets",
"a",
"group",
"in",
"this",
"table",
"-",
"view",
"by",
"the",
"group",
"s",
"id"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTableView.php#L1817-L1826 |
34,112 | silverorange/swat | Swat/SwatTableView.php | SwatTableView.insertRowBefore | public function insertRowBefore(
SwatTableViewRow $row,
SwatTableViewRow $reference_row
) {
$this->insertRow($row, $reference_row, false);
} | php | public function insertRowBefore(
SwatTableViewRow $row,
SwatTableViewRow $reference_row
) {
$this->insertRow($row, $reference_row, false);
} | [
"public",
"function",
"insertRowBefore",
"(",
"SwatTableViewRow",
"$",
"row",
",",
"SwatTableViewRow",
"$",
"reference_row",
")",
"{",
"$",
"this",
"->",
"insertRow",
"(",
"$",
"row",
",",
"$",
"reference_row",
",",
"false",
")",
";",
"}"
] | Inserts a row before an existing row in this table-view
@param SwatTableViewRow $row the row to insert.
@param SwatTableViewRow $reference_row the row before which the row will
be inserted.
@throws SwatWidgetNotFoundException if the reference row does not exist
in this table-view.
@throws SwatDuplicateIdException if ... | [
"Inserts",
"a",
"row",
"before",
"an",
"existing",
"row",
"in",
"this",
"table",
"-",
"view"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTableView.php#L1906-L1911 |
34,113 | silverorange/swat | Swat/SwatTableView.php | SwatTableView.insertRowAfter | public function insertRowAfter(
SwatTableViewRow $row,
SwatTableViewRow $reference_row
) {
$this->insertRow($row, $reference_row, true);
} | php | public function insertRowAfter(
SwatTableViewRow $row,
SwatTableViewRow $reference_row
) {
$this->insertRow($row, $reference_row, true);
} | [
"public",
"function",
"insertRowAfter",
"(",
"SwatTableViewRow",
"$",
"row",
",",
"SwatTableViewRow",
"$",
"reference_row",
")",
"{",
"$",
"this",
"->",
"insertRow",
"(",
"$",
"row",
",",
"$",
"reference_row",
",",
"true",
")",
";",
"}"
] | Inserts a row after an existing row in this table-view
@param SwatTableViewRow $row the row to insert.
@param SwatTableViewRow $reference_row the row after which the row will
be inserted.
@throws SwatWidgetNotFoundException if the reference row does not exist
in this table-view.
@throws SwatDuplicateIdException if th... | [
"Inserts",
"a",
"row",
"after",
"an",
"existing",
"row",
"in",
"this",
"table",
"-",
"view"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTableView.php#L1930-L1935 |
34,114 | silverorange/swat | Swat/SwatTableView.php | SwatTableView.getRow | public function getRow($id)
{
if (!array_key_exists($id, $this->rows_by_id)) {
throw new SwatWidgetNotFoundException(
"Row with an id of '{$id}' not found."
);
}
return $this->rows_by_id[$id];
} | php | public function getRow($id)
{
if (!array_key_exists($id, $this->rows_by_id)) {
throw new SwatWidgetNotFoundException(
"Row with an id of '{$id}' not found."
);
}
return $this->rows_by_id[$id];
} | [
"public",
"function",
"getRow",
"(",
"$",
"id",
")",
"{",
"if",
"(",
"!",
"array_key_exists",
"(",
"$",
"id",
",",
"$",
"this",
"->",
"rows_by_id",
")",
")",
"{",
"throw",
"new",
"SwatWidgetNotFoundException",
"(",
"\"Row with an id of '{$id}' not found.\"",
"... | Gets a row in this table-view by the row's id
@param string $id the id of the row to get.
@return SwatTableViewRow the requested row.
@throws SwatWidgetNotFoundException if no row with the specified id
exists in this table-view. | [
"Gets",
"a",
"row",
"in",
"this",
"table",
"-",
"view",
"by",
"the",
"row",
"s",
"id"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTableView.php#L1967-L1976 |
34,115 | silverorange/swat | Swat/SwatTableView.php | SwatTableView.getRowsByClass | public function getRowsByClass($class_name)
{
$rows = array();
foreach ($this->extra_rows as $row) {
if ($row instanceof $class_name) {
$rows[] = $row;
}
}
return $rows;
} | php | public function getRowsByClass($class_name)
{
$rows = array();
foreach ($this->extra_rows as $row) {
if ($row instanceof $class_name) {
$rows[] = $row;
}
}
return $rows;
} | [
"public",
"function",
"getRowsByClass",
"(",
"$",
"class_name",
")",
"{",
"$",
"rows",
"=",
"array",
"(",
")",
";",
"foreach",
"(",
"$",
"this",
"->",
"extra_rows",
"as",
"$",
"row",
")",
"{",
"if",
"(",
"$",
"row",
"instanceof",
"$",
"class_name",
"... | Gets all the extra rows of the specified class from this table-view
@param string $class_name the class name to filter by.
@return array all the extra rows of the specified class. | [
"Gets",
"all",
"the",
"extra",
"rows",
"of",
"the",
"specified",
"class",
"from",
"this",
"table",
"-",
"view"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTableView.php#L1988-L1998 |
34,116 | silverorange/swat | Swat/SwatTableView.php | SwatTableView.getFirstRowByClass | public function getFirstRowByClass($class_name)
{
$my_row = null;
foreach ($this->extra_rows as $row) {
if ($row instanceof $class_name) {
$my_row = $row;
break;
}
}
return $my_row;
} | php | public function getFirstRowByClass($class_name)
{
$my_row = null;
foreach ($this->extra_rows as $row) {
if ($row instanceof $class_name) {
$my_row = $row;
break;
}
}
return $my_row;
} | [
"public",
"function",
"getFirstRowByClass",
"(",
"$",
"class_name",
")",
"{",
"$",
"my_row",
"=",
"null",
";",
"foreach",
"(",
"$",
"this",
"->",
"extra_rows",
"as",
"$",
"row",
")",
"{",
"if",
"(",
"$",
"row",
"instanceof",
"$",
"class_name",
")",
"{"... | Gets the first extra row of the specified class from this table-view
Unlike the {@link SwatUIParent::getFirstDescendant()} method, this
method only checks this table-view and does not check the child objects
of this table-view.
@param string $class_name the class name to filter by.
@return SwatTableViewRow the first... | [
"Gets",
"the",
"first",
"extra",
"row",
"of",
"the",
"specified",
"class",
"from",
"this",
"table",
"-",
"view"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTableView.php#L2018-L2028 |
34,117 | silverorange/swat | Swat/SwatTableView.php | SwatTableView.validateRow | protected function validateRow(SwatTableViewRow $row)
{
if ($row instanceof SwatTableViewInputRow) {
if ($this->has_input_row) {
throw new SwatException(
'Only one input row may be added to a table-view.'
);
} else {
... | php | protected function validateRow(SwatTableViewRow $row)
{
if ($row instanceof SwatTableViewInputRow) {
if ($this->has_input_row) {
throw new SwatException(
'Only one input row may be added to a table-view.'
);
} else {
... | [
"protected",
"function",
"validateRow",
"(",
"SwatTableViewRow",
"$",
"row",
")",
"{",
"if",
"(",
"$",
"row",
"instanceof",
"SwatTableViewInputRow",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"has_input_row",
")",
"{",
"throw",
"new",
"SwatException",
"(",
"'On... | Ensures a row added to this table-view is valid for this table-view
@param SwatTableViewRow $row the row to check.
@throws SwatDuplicateIdException if the row has the same id as a row
already in this table-view.
@throws SwatException if the row is an input row and this table-view
already contains an input-row. | [
"Ensures",
"a",
"row",
"added",
"to",
"this",
"table",
"-",
"view",
"is",
"valid",
"for",
"this",
"table",
"-",
"view"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTableView.php#L2043-L2065 |
34,118 | silverorange/swat | Swat/SwatTableView.php | SwatTableView.insertRow | protected function insertRow(
SwatTableViewRow $row,
SwatTableViewRow $reference_row = null,
$after = true
) {
$this->validateRow($row);
if ($reference_row !== null) {
$key = array_search($reference_row, $this->extra_rows, true);
if ($key === false) ... | php | protected function insertRow(
SwatTableViewRow $row,
SwatTableViewRow $reference_row = null,
$after = true
) {
$this->validateRow($row);
if ($reference_row !== null) {
$key = array_search($reference_row, $this->extra_rows, true);
if ($key === false) ... | [
"protected",
"function",
"insertRow",
"(",
"SwatTableViewRow",
"$",
"row",
",",
"SwatTableViewRow",
"$",
"reference_row",
"=",
"null",
",",
"$",
"after",
"=",
"true",
")",
"{",
"$",
"this",
"->",
"validateRow",
"(",
"$",
"row",
")",
";",
"if",
"(",
"$",
... | Helper method to insert rows into this table-view
@param SwatTableViewRow $row the row to insert.
@param SwatTableViewRow $reference_row optional. An existing row within
this table-view to which the
inserted row is relatively
positioned. If not specified,
the row is inserted at the
beginning or the end of this
table-v... | [
"Helper",
"method",
"to",
"insert",
"rows",
"into",
"this",
"table",
"-",
"view"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTableView.php#L2101-L2147 |
34,119 | brainworxx/kreXX | src/Analyse/Callback/Analyse/Objects/Methods.php | Methods.callMe | public function callMe()
{
$output = $this->dispatchStartEvent();
/** @var \ReflectionClass $ref */
$ref = $this->parameters[static::PARAM_REF];
$doProtected = $this->pool->config->getSetting(Fallback::SETTING_ANALYSE_PROTECTED_METHODS) ||
$this->pool->scope->isInScope(... | php | public function callMe()
{
$output = $this->dispatchStartEvent();
/** @var \ReflectionClass $ref */
$ref = $this->parameters[static::PARAM_REF];
$doProtected = $this->pool->config->getSetting(Fallback::SETTING_ANALYSE_PROTECTED_METHODS) ||
$this->pool->scope->isInScope(... | [
"public",
"function",
"callMe",
"(",
")",
"{",
"$",
"output",
"=",
"$",
"this",
"->",
"dispatchStartEvent",
"(",
")",
";",
"/** @var \\ReflectionClass $ref */",
"$",
"ref",
"=",
"$",
"this",
"->",
"parameters",
"[",
"static",
"::",
"PARAM_REF",
"]",
";",
"... | Decides which methods we want to analyse and then starts the dump.
@return string
The generated markup. | [
"Decides",
"which",
"methods",
"we",
"want",
"to",
"analyse",
"and",
"then",
"starts",
"the",
"dump",
"."
] | a03beaa4507ffb391412b9ac61593d263d3f8bca | https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/Analyse/Callback/Analyse/Objects/Methods.php#L64-L95 |
34,120 | brainworxx/kreXX | src/Analyse/Callback/Analyse/Objects/Methods.php | Methods.generateDomIdFromClassname | protected function generateDomIdFromClassname($data, $doProtected, $doPrivate)
{
$string = 'k' . $this->pool->emergencyHandler->getKrexxCount() . '_m_';
if ($doProtected === true) {
$string .= 'pro_';
}
if ($doPrivate === true) {
$string .= 'pri_';
}
... | php | protected function generateDomIdFromClassname($data, $doProtected, $doPrivate)
{
$string = 'k' . $this->pool->emergencyHandler->getKrexxCount() . '_m_';
if ($doProtected === true) {
$string .= 'pro_';
}
if ($doPrivate === true) {
$string .= 'pri_';
}
... | [
"protected",
"function",
"generateDomIdFromClassname",
"(",
"$",
"data",
",",
"$",
"doProtected",
",",
"$",
"doPrivate",
")",
"{",
"$",
"string",
"=",
"'k'",
".",
"$",
"this",
"->",
"pool",
"->",
"emergencyHandler",
"->",
"getKrexxCount",
"(",
")",
".",
"'... | Generates a id for the DOM.
This is used to jump from a recursion to the object analysis data.
The ID is simply the md5 hash of the classname with the namespace.
@param string $data
The object name from which we want the ID.
@param boolean $doProtected
Are we analysing the protected methods here?
@param boolean $doPr... | [
"Generates",
"a",
"id",
"for",
"the",
"DOM",
"."
] | a03beaa4507ffb391412b9ac61593d263d3f8bca | https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/Analyse/Callback/Analyse/Objects/Methods.php#L171-L183 |
34,121 | flextype-components/filesystem | Filesystem.php | Filesystem.getMimeType | public static function getMimeType(string $file, bool $guess = true)
{
// Get mime using the file information functions
if (function_exists('finfo_open')) {
$info = finfo_open(FILEINFO_MIME_TYPE);
$mime = finfo_file($info, $file);
finfo_close($info);
... | php | public static function getMimeType(string $file, bool $guess = true)
{
// Get mime using the file information functions
if (function_exists('finfo_open')) {
$info = finfo_open(FILEINFO_MIME_TYPE);
$mime = finfo_file($info, $file);
finfo_close($info);
... | [
"public",
"static",
"function",
"getMimeType",
"(",
"string",
"$",
"file",
",",
"bool",
"$",
"guess",
"=",
"true",
")",
"{",
"// Get mime using the file information functions",
"if",
"(",
"function_exists",
"(",
"'finfo_open'",
")",
")",
"{",
"$",
"info",
"=",
... | Returns the mime type of a file. Returns false if the mime type is not found.
@param string $file Full path to the file
@param bool $guess Set to false to disable mime type guessing
@return mixed | [
"Returns",
"the",
"mime",
"type",
"of",
"a",
"file",
".",
"Returns",
"false",
"if",
"the",
"mime",
"type",
"is",
"not",
"found",
"."
] | 4a007ea30d05028a7ca7e96f9066d20210064b28 | https://github.com/flextype-components/filesystem/blob/4a007ea30d05028a7ca7e96f9066d20210064b28/Filesystem.php#L140-L165 |
34,122 | flextype-components/filesystem | Filesystem.php | Filesystem.write | public static function write(string $path, string $contents, string $visibility = 'public', int $flags = LOCK_EX)
{
if (file_put_contents($path, $contents, $flags) === false) {
return false;
}
Filesystem::setVisibility($path, $visibility);
return true;
} | php | public static function write(string $path, string $contents, string $visibility = 'public', int $flags = LOCK_EX)
{
if (file_put_contents($path, $contents, $flags) === false) {
return false;
}
Filesystem::setVisibility($path, $visibility);
return true;
} | [
"public",
"static",
"function",
"write",
"(",
"string",
"$",
"path",
",",
"string",
"$",
"contents",
",",
"string",
"$",
"visibility",
"=",
"'public'",
",",
"int",
"$",
"flags",
"=",
"LOCK_EX",
")",
"{",
"if",
"(",
"file_put_contents",
"(",
"$",
"path",
... | Write a file.
@param string $path The path of the new file.
@param string $contents The file contents.
@param string $visibility An optional configuration array.
@param int $flags Flags
@return bool True on success, false on failure. | [
"Write",
"a",
"file",
"."
] | 4a007ea30d05028a7ca7e96f9066d20210064b28 | https://github.com/flextype-components/filesystem/blob/4a007ea30d05028a7ca7e96f9066d20210064b28/Filesystem.php#L358-L367 |
34,123 | rollun-com/rollun-datastore | src/DataStore/src/DataStore/CsvBase.php | CsvBase.flush | protected function flush($item, $delete = false)
{
// Create and open temporary file for writing
$tmpFile = tempnam(sys_get_temp_dir(), uniqid() . '.tmp');
$tempHandler = fopen($tmpFile, 'w');
// Write headings
fputcsv($tempHandler, $this->columns, $this->csvDelimiter);
... | php | protected function flush($item, $delete = false)
{
// Create and open temporary file for writing
$tmpFile = tempnam(sys_get_temp_dir(), uniqid() . '.tmp');
$tempHandler = fopen($tmpFile, 'w');
// Write headings
fputcsv($tempHandler, $this->columns, $this->csvDelimiter);
... | [
"protected",
"function",
"flush",
"(",
"$",
"item",
",",
"$",
"delete",
"=",
"false",
")",
"{",
"// Create and open temporary file for writing",
"$",
"tmpFile",
"=",
"tempnam",
"(",
"sys_get_temp_dir",
"(",
")",
",",
"uniqid",
"(",
")",
".",
"'.tmp'",
")",
"... | Flushes all changes to temporary file which then will change the original one
@param $item
@param bool|false $delete
@throws \rollun\datastore\DataStore\DataStoreException | [
"Flushes",
"all",
"changes",
"to",
"temporary",
"file",
"which",
"then",
"will",
"change",
"the",
"original",
"one"
] | ef433b58b94e1c311123ad1b2a0360e95a636bd1 | https://github.com/rollun-com/rollun-datastore/blob/ef433b58b94e1c311123ad1b2a0360e95a636bd1/src/DataStore/src/DataStore/CsvBase.php#L241-L281 |
34,124 | rollun-com/rollun-datastore | src/DataStore/src/DataStore/CsvBase.php | CsvBase.openFile | protected function openFile($seekFirstDataRow = true)
{
$this->lockFile();
try {
$this->fileHandler = fopen($this->filename, 'r');
if ($seekFirstDataRow) {
fgets($this->fileHandler);
}
} catch (\Exception $e) {
throw new DataSt... | php | protected function openFile($seekFirstDataRow = true)
{
$this->lockFile();
try {
$this->fileHandler = fopen($this->filename, 'r');
if ($seekFirstDataRow) {
fgets($this->fileHandler);
}
} catch (\Exception $e) {
throw new DataSt... | [
"protected",
"function",
"openFile",
"(",
"$",
"seekFirstDataRow",
"=",
"true",
")",
"{",
"$",
"this",
"->",
"lockFile",
"(",
")",
";",
"try",
"{",
"$",
"this",
"->",
"fileHandler",
"=",
"fopen",
"(",
"$",
"this",
"->",
"filename",
",",
"'r'",
")",
"... | Opens file for reading.
@param bool $seekFirstDataRow - the first row in csv-file contains the column headings; this parameter says,
if it is need to pass it (row) after the opening the file.
@throws \rollun\datastore\DataStore\DataStoreException | [
"Opens",
"file",
"for",
"reading",
"."
] | ef433b58b94e1c311123ad1b2a0360e95a636bd1 | https://github.com/rollun-com/rollun-datastore/blob/ef433b58b94e1c311123ad1b2a0360e95a636bd1/src/DataStore/src/DataStore/CsvBase.php#L290-L306 |
34,125 | rollun-com/rollun-datastore | src/DataStore/src/DataStore/CsvBase.php | CsvBase.lockFile | protected function lockFile($nbTries = 0)
{
if (!$this->lockHandler->lock()) {
if ($nbTries >= static::MAX_LOCK_TRIES) {
throw new DataStoreException(
sprintf("Reach max retry (%s) for locking queue file {$this->filename}", static::MAX_LOCK_TRIES)
... | php | protected function lockFile($nbTries = 0)
{
if (!$this->lockHandler->lock()) {
if ($nbTries >= static::MAX_LOCK_TRIES) {
throw new DataStoreException(
sprintf("Reach max retry (%s) for locking queue file {$this->filename}", static::MAX_LOCK_TRIES)
... | [
"protected",
"function",
"lockFile",
"(",
"$",
"nbTries",
"=",
"0",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"lockHandler",
"->",
"lock",
"(",
")",
")",
"{",
"if",
"(",
"$",
"nbTries",
">=",
"static",
"::",
"MAX_LOCK_TRIES",
")",
"{",
"throw",
... | Locks the file
@param int $nbTries - count of tries of locking queue
@return bool
@throws \rollun\datastore\DataStore\DataStoreException | [
"Locks",
"the",
"file"
] | ef433b58b94e1c311123ad1b2a0360e95a636bd1 | https://github.com/rollun-com/rollun-datastore/blob/ef433b58b94e1c311123ad1b2a0360e95a636bd1/src/DataStore/src/DataStore/CsvBase.php#L315-L330 |
34,126 | rollun-com/rollun-datastore | src/DataStore/src/DataStore/CsvBase.php | CsvBase.getHeaders | public function getHeaders()
{
// Don't pass the first row!!
$this->openFile(0);
$this->columns = fgetcsv($this->fileHandler, null, $this->csvDelimiter);
$this->closeFile();
} | php | public function getHeaders()
{
// Don't pass the first row!!
$this->openFile(0);
$this->columns = fgetcsv($this->fileHandler, null, $this->csvDelimiter);
$this->closeFile();
} | [
"public",
"function",
"getHeaders",
"(",
")",
"{",
"// Don't pass the first row!!",
"$",
"this",
"->",
"openFile",
"(",
"0",
")",
";",
"$",
"this",
"->",
"columns",
"=",
"fgetcsv",
"(",
"$",
"this",
"->",
"fileHandler",
",",
"null",
",",
"$",
"this",
"->... | Sets the column headings
@throws \rollun\datastore\DataStore\DataStoreException | [
"Sets",
"the",
"column",
"headings"
] | ef433b58b94e1c311123ad1b2a0360e95a636bd1 | https://github.com/rollun-com/rollun-datastore/blob/ef433b58b94e1c311123ad1b2a0360e95a636bd1/src/DataStore/src/DataStore/CsvBase.php#L361-L367 |
34,127 | rollun-com/rollun-datastore | src/DataStore/src/DataStore/CsvBase.php | CsvBase.createNewItem | protected function createNewItem($itemData)
{
$item = array_flip($this->columns);
foreach ($item as $key => $value) {
if (isset($itemData[$key])) {
$item[$key] = $itemData[$key];
} else {
$item[$key] = null;
}
}
re... | php | protected function createNewItem($itemData)
{
$item = array_flip($this->columns);
foreach ($item as $key => $value) {
if (isset($itemData[$key])) {
$item[$key] = $itemData[$key];
} else {
$item[$key] = null;
}
}
re... | [
"protected",
"function",
"createNewItem",
"(",
"$",
"itemData",
")",
"{",
"$",
"item",
"=",
"array_flip",
"(",
"$",
"this",
"->",
"columns",
")",
";",
"foreach",
"(",
"$",
"item",
"as",
"$",
"key",
"=>",
"$",
"value",
")",
"{",
"if",
"(",
"isset",
... | Creates a new item, combines data with the column headings
@param $itemData
@return array | [
"Creates",
"a",
"new",
"item",
"combines",
"data",
"with",
"the",
"column",
"headings"
] | ef433b58b94e1c311123ad1b2a0360e95a636bd1 | https://github.com/rollun-com/rollun-datastore/blob/ef433b58b94e1c311123ad1b2a0360e95a636bd1/src/DataStore/src/DataStore/CsvBase.php#L374-L387 |
34,128 | rollun-com/rollun-datastore | src/DataStore/src/DataStore/CsvBase.php | CsvBase.getTrueRow | public function getTrueRow($row)
{
if ($row) {
array_walk(
$row,
function (&$item, $key) {
if ('' === $item) {
$item = null;
}
if ($item === '""') {
$item ... | php | public function getTrueRow($row)
{
if ($row) {
array_walk(
$row,
function (&$item, $key) {
if ('' === $item) {
$item = null;
}
if ($item === '""') {
$item ... | [
"public",
"function",
"getTrueRow",
"(",
"$",
"row",
")",
"{",
"if",
"(",
"$",
"row",
")",
"{",
"array_walk",
"(",
"$",
"row",
",",
"function",
"(",
"&",
"$",
"item",
",",
"$",
"key",
")",
"{",
"if",
"(",
"''",
"===",
"$",
"item",
")",
"{",
"... | Returns the associative array with the column headings;
also checks and sanitize empty string and null value and converts type for the numeric fields
@param $row
@return array|null | [
"Returns",
"the",
"associative",
"array",
"with",
"the",
"column",
"headings",
";",
"also",
"checks",
"and",
"sanitize",
"empty",
"string",
"and",
"null",
"value",
"and",
"converts",
"type",
"for",
"the",
"numeric",
"fields"
] | ef433b58b94e1c311123ad1b2a0360e95a636bd1 | https://github.com/rollun-com/rollun-datastore/blob/ef433b58b94e1c311123ad1b2a0360e95a636bd1/src/DataStore/src/DataStore/CsvBase.php#L409-L439 |
34,129 | silverorange/swat | Swat/SwatRadioList.php | SwatRadioList.display | public function display()
{
$options = $this->getOptions();
if (!$this->visible || $options === null) {
return;
}
SwatWidget::display();
// add a hidden field so we can check if this list was submitted on
// the process step
$this->getForm()->ad... | php | public function display()
{
$options = $this->getOptions();
if (!$this->visible || $options === null) {
return;
}
SwatWidget::display();
// add a hidden field so we can check if this list was submitted on
// the process step
$this->getForm()->ad... | [
"public",
"function",
"display",
"(",
")",
"{",
"$",
"options",
"=",
"$",
"this",
"->",
"getOptions",
"(",
")",
";",
"if",
"(",
"!",
"$",
"this",
"->",
"visible",
"||",
"$",
"options",
"===",
"null",
")",
"{",
"return",
";",
"}",
"SwatWidget",
"::"... | Displays this radio list | [
"Displays",
"this",
"radio",
"list"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatRadioList.php#L54-L125 |
34,130 | silverorange/swat | Swat/SwatRadioList.php | SwatRadioList.displayDivider | protected function displayDivider(SwatOption $option, $index)
{
$span_tag = new SwatHtmlTag('span');
$span_tag->class = 'swat-radio-list-divider';
if ($option->value !== null) {
$span_tag->id = $this->id . '_' . (string) $option->value;
}
$span_tag->setContent($o... | php | protected function displayDivider(SwatOption $option, $index)
{
$span_tag = new SwatHtmlTag('span');
$span_tag->class = 'swat-radio-list-divider';
if ($option->value !== null) {
$span_tag->id = $this->id . '_' . (string) $option->value;
}
$span_tag->setContent($o... | [
"protected",
"function",
"displayDivider",
"(",
"SwatOption",
"$",
"option",
",",
"$",
"index",
")",
"{",
"$",
"span_tag",
"=",
"new",
"SwatHtmlTag",
"(",
"'span'",
")",
";",
"$",
"span_tag",
"->",
"class",
"=",
"'swat-radio-list-divider'",
";",
"if",
"(",
... | Displays a divider option in this radio list
@param SwatOption $option the divider option to display.
@param integer $index the numeric index of the option in this list.
Starts at 0. | [
"Displays",
"a",
"divider",
"option",
"in",
"this",
"radio",
"list"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatRadioList.php#L172-L182 |
34,131 | brainworxx/kreXX | src/Analyse/Code/Scope.php | Scope.isInScope | public function isInScope()
{
return $this->pool->emergencyHandler->getNestingLevel() <= 1 &&
$this->scope === static::THIS_SCOPE &&
$this->pool->config->getSetting(Fallback::SETTING_USE_SCOPE_ANALYSIS);
} | php | public function isInScope()
{
return $this->pool->emergencyHandler->getNestingLevel() <= 1 &&
$this->scope === static::THIS_SCOPE &&
$this->pool->config->getSetting(Fallback::SETTING_USE_SCOPE_ANALYSIS);
} | [
"public",
"function",
"isInScope",
"(",
")",
"{",
"return",
"$",
"this",
"->",
"pool",
"->",
"emergencyHandler",
"->",
"getNestingLevel",
"(",
")",
"<=",
"1",
"&&",
"$",
"this",
"->",
"scope",
"===",
"static",
"::",
"THIS_SCOPE",
"&&",
"$",
"this",
"->",... | We decide if a method or property is currently within a reachable scope.
@return bool
Whether it is within the scope or not. | [
"We",
"decide",
"if",
"a",
"method",
"or",
"property",
"is",
"currently",
"within",
"a",
"reachable",
"scope",
"."
] | a03beaa4507ffb391412b9ac61593d263d3f8bca | https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/Analyse/Code/Scope.php#L119-L124 |
34,132 | brainworxx/kreXX | src/Analyse/Routing/Process/ProcessBoolean.php | ProcessBoolean.process | public function process(Model $model)
{
$data = $model->getData() ? 'TRUE' : 'FALSE';
return $this->pool->render->renderSingleChild(
$model->setData($data)
->setNormal($data)
->setType(static::TYPE_BOOL)
);
} | php | public function process(Model $model)
{
$data = $model->getData() ? 'TRUE' : 'FALSE';
return $this->pool->render->renderSingleChild(
$model->setData($data)
->setNormal($data)
->setType(static::TYPE_BOOL)
);
} | [
"public",
"function",
"process",
"(",
"Model",
"$",
"model",
")",
"{",
"$",
"data",
"=",
"$",
"model",
"->",
"getData",
"(",
")",
"?",
"'TRUE'",
":",
"'FALSE'",
";",
"return",
"$",
"this",
"->",
"pool",
"->",
"render",
"->",
"renderSingleChild",
"(",
... | Render a dump for a boolean value.
@param Model $model
The data we are analysing.
@return string
The rendered markup. | [
"Render",
"a",
"dump",
"for",
"a",
"boolean",
"value",
"."
] | a03beaa4507ffb391412b9ac61593d263d3f8bca | https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/Analyse/Routing/Process/ProcessBoolean.php#L56-L64 |
34,133 | brainworxx/kreXX | src/Analyse/Callback/Analyse/Objects/Constants.php | Constants.callMe | public function callMe()
{
$output = $this->dispatchStartEvent();
// This is actually an array, we ara analysing. But We do not want to render
// an array, so we need to process it like the return from an iterator.
/** @var \ReflectionClass $ref */
$ref = $this->parameters[s... | php | public function callMe()
{
$output = $this->dispatchStartEvent();
// This is actually an array, we ara analysing. But We do not want to render
// an array, so we need to process it like the return from an iterator.
/** @var \ReflectionClass $ref */
$ref = $this->parameters[s... | [
"public",
"function",
"callMe",
"(",
")",
"{",
"$",
"output",
"=",
"$",
"this",
"->",
"dispatchStartEvent",
"(",
")",
";",
"// This is actually an array, we ara analysing. But We do not want to render",
"// an array, so we need to process it like the return from an iterator.",
"/... | Dumps the constants of a class,
@return string
The generated markup. | [
"Dumps",
"the",
"constants",
"of",
"a",
"class"
] | a03beaa4507ffb391412b9ac61593d263d3f8bca | https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/Analyse/Callback/Analyse/Objects/Constants.php#L58-L89 |
34,134 | brainworxx/kreXX | src/Analyse/Comment/Methods.php | Methods.getTraitComment | protected function getTraitComment($originalComment, \ReflectionClass $reflection)
{
// We need to check if we can get traits here.
if (method_exists($reflection, 'getTraits') === true) {
// Get the traits from this class.
// Now we should have an array with reflections of al... | php | protected function getTraitComment($originalComment, \ReflectionClass $reflection)
{
// We need to check if we can get traits here.
if (method_exists($reflection, 'getTraits') === true) {
// Get the traits from this class.
// Now we should have an array with reflections of al... | [
"protected",
"function",
"getTraitComment",
"(",
"$",
"originalComment",
",",
"\\",
"ReflectionClass",
"$",
"reflection",
")",
"{",
"// We need to check if we can get traits here.",
"if",
"(",
"method_exists",
"(",
"$",
"reflection",
",",
"'getTraits'",
")",
"===",
"t... | Gets the comment from all added traits.
Iterated through an array of traits, to see
if we can resolve the inherited comment. Traits
are only supported since PHP 5.4, so we need to
check if they are available.
@param string $originalComment
The original comment, so far.
@param \ReflectionClass $reflection
A reflection... | [
"Gets",
"the",
"comment",
"from",
"all",
"added",
"traits",
"."
] | a03beaa4507ffb391412b9ac61593d263d3f8bca | https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/Analyse/Comment/Methods.php#L153-L182 |
34,135 | brainworxx/kreXX | src/Analyse/Comment/Methods.php | Methods.getInterfaceComment | protected function getInterfaceComment($originalComment, \ReflectionClass $reflectionClass)
{
foreach ($reflectionClass->getInterfaces() as $interface) {
if ($interface->hasMethod($this->methodName) === true) {
$interfaceComment = $this->prettifyComment($interface->getMethod($thi... | php | protected function getInterfaceComment($originalComment, \ReflectionClass $reflectionClass)
{
foreach ($reflectionClass->getInterfaces() as $interface) {
if ($interface->hasMethod($this->methodName) === true) {
$interfaceComment = $this->prettifyComment($interface->getMethod($thi... | [
"protected",
"function",
"getInterfaceComment",
"(",
"$",
"originalComment",
",",
"\\",
"ReflectionClass",
"$",
"reflectionClass",
")",
"{",
"foreach",
"(",
"$",
"reflectionClass",
"->",
"getInterfaces",
"(",
")",
"as",
"$",
"interface",
")",
"{",
"if",
"(",
"... | Gets the comment from all implemented interfaces.
Iterated through an array of interfaces, to see
if we can resolve the inherited comment.
@param string $originalComment
The original comment, so far.
@param \ReflectionClass $reflectionClass
A reflection of the object we are currently analysing.
@return string
The co... | [
"Gets",
"the",
"comment",
"from",
"all",
"implemented",
"interfaces",
"."
] | a03beaa4507ffb391412b9ac61593d263d3f8bca | https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/Analyse/Comment/Methods.php#L198-L215 |
34,136 | honey-comb/core | src/Services/HCMenuService.php | HCMenuService.sortByWeight | private function sortByWeight(array $adminMenu): array
{
usort($adminMenu, function ($a, $b) {
if (!array_key_exists('priority', $a)) {
$a['priority'] = 0;
}
if (!array_key_exists('priority', $b)) {
$b['priority'] = 0;
}
... | php | private function sortByWeight(array $adminMenu): array
{
usort($adminMenu, function ($a, $b) {
if (!array_key_exists('priority', $a)) {
$a['priority'] = 0;
}
if (!array_key_exists('priority', $b)) {
$b['priority'] = 0;
}
... | [
"private",
"function",
"sortByWeight",
"(",
"array",
"$",
"adminMenu",
")",
":",
"array",
"{",
"usort",
"(",
"$",
"adminMenu",
",",
"function",
"(",
"$",
"a",
",",
"$",
"b",
")",
"{",
"if",
"(",
"!",
"array_key_exists",
"(",
"'priority'",
",",
"$",
"... | Sort admin menu by given priority DESC
@param array $adminMenu
@return array | [
"Sort",
"admin",
"menu",
"by",
"given",
"priority",
"DESC"
] | 5c12aba31cae092e9681f0ae3e3664ed3fcec956 | https://github.com/honey-comb/core/blob/5c12aba31cae092e9681f0ae3e3664ed3fcec956/src/Services/HCMenuService.php#L82-L103 |
34,137 | honey-comb/core | src/Services/HCMenuService.php | HCMenuService.getAccessibleMenuItems | private function getAccessibleMenuItems(HCUser $user, array $menus): array
{
foreach ($menus as $key => $menu) {
if (!array_key_exists('aclPermission', $menu) || $user->cannot($menu['aclPermission'])) {
unset($menus[$key]);
}
}
return array_values($me... | php | private function getAccessibleMenuItems(HCUser $user, array $menus): array
{
foreach ($menus as $key => $menu) {
if (!array_key_exists('aclPermission', $menu) || $user->cannot($menu['aclPermission'])) {
unset($menus[$key]);
}
}
return array_values($me... | [
"private",
"function",
"getAccessibleMenuItems",
"(",
"HCUser",
"$",
"user",
",",
"array",
"$",
"menus",
")",
":",
"array",
"{",
"foreach",
"(",
"$",
"menus",
"as",
"$",
"key",
"=>",
"$",
"menu",
")",
"{",
"if",
"(",
"!",
"array_key_exists",
"(",
"'acl... | Filter acl permissions
@param HCUser $user
@param array $menus
@return array | [
"Filter",
"acl",
"permissions"
] | 5c12aba31cae092e9681f0ae3e3664ed3fcec956 | https://github.com/honey-comb/core/blob/5c12aba31cae092e9681f0ae3e3664ed3fcec956/src/Services/HCMenuService.php#L152-L161 |
34,138 | honey-comb/core | src/Services/HCMenuService.php | HCMenuService.existInArray | private function existInArray($items, $routeName): bool
{
foreach ($items as $item) {
if ($item['route'] == $routeName) {
return true;
}
if (array_key_exists('children', $item)) {
$found = $this->existInArray($item['children'], $routeName... | php | private function existInArray($items, $routeName): bool
{
foreach ($items as $item) {
if ($item['route'] == $routeName) {
return true;
}
if (array_key_exists('children', $item)) {
$found = $this->existInArray($item['children'], $routeName... | [
"private",
"function",
"existInArray",
"(",
"$",
"items",
",",
"$",
"routeName",
")",
":",
"bool",
"{",
"foreach",
"(",
"$",
"items",
"as",
"$",
"item",
")",
"{",
"if",
"(",
"$",
"item",
"[",
"'route'",
"]",
"==",
"$",
"routeName",
")",
"{",
"retur... | Check if exists in array
@param $items
@param $routeName
@return bool | [
"Check",
"if",
"exists",
"in",
"array"
] | 5c12aba31cae092e9681f0ae3e3664ed3fcec956 | https://github.com/honey-comb/core/blob/5c12aba31cae092e9681f0ae3e3664ed3fcec956/src/Services/HCMenuService.php#L170-L188 |
34,139 | silverorange/swat | Swat/SwatDetailsViewVerticalField.php | SwatDetailsViewVerticalField.display | public function display($data, $odd)
{
if (!$this->visible) {
return;
}
$this->odd = $odd;
$tr_tag = new SwatHtmlTag('tr');
$tr_tag->id = $this->id;
$tr_tag->class = $this->getCSSClassString();
$td_tag = new SwatHtmlTag('td');
$td_tag->c... | php | public function display($data, $odd)
{
if (!$this->visible) {
return;
}
$this->odd = $odd;
$tr_tag = new SwatHtmlTag('tr');
$tr_tag->id = $this->id;
$tr_tag->class = $this->getCSSClassString();
$td_tag = new SwatHtmlTag('td');
$td_tag->c... | [
"public",
"function",
"display",
"(",
"$",
"data",
",",
"$",
"odd",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"visible",
")",
"{",
"return",
";",
"}",
"$",
"this",
"->",
"odd",
"=",
"$",
"odd",
";",
"$",
"tr_tag",
"=",
"new",
"SwatHtmlTag",
... | Displays this details view field using a data object
@param mixed $data a data object used to display the cell renderers in
this field.
@param boolean $odd whether this is an odd or even field so alternating
style can be applied.
@see SwatDetailsViewField::display() | [
"Displays",
"this",
"details",
"view",
"field",
"using",
"a",
"data",
"object"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatDetailsViewVerticalField.php#L25-L46 |
34,140 | silverorange/swat | SwatDB/SwatDBRange.php | SwatDBRange.combine | public function combine(SwatDBRange $range)
{
// find leftmost extent
$offset = min($this->getOffset(), $range->getOffset());
if ($this->getLimit() === null || $range->getLimit() === null) {
// rightmost extent is infinite
$limit = null;
} else {
... | php | public function combine(SwatDBRange $range)
{
// find leftmost extent
$offset = min($this->getOffset(), $range->getOffset());
if ($this->getLimit() === null || $range->getLimit() === null) {
// rightmost extent is infinite
$limit = null;
} else {
... | [
"public",
"function",
"combine",
"(",
"SwatDBRange",
"$",
"range",
")",
"{",
"// find leftmost extent",
"$",
"offset",
"=",
"min",
"(",
"$",
"this",
"->",
"getOffset",
"(",
")",
",",
"$",
"range",
"->",
"getOffset",
"(",
")",
")",
";",
"if",
"(",
"$",
... | Combines this range with another range forming a new range
Ranges are combined so the combined range includes both ranges. For
example, if a range of (10, 100) is combined with a
range of (20, 160) the resulting range will be (80, 100).
<pre>
..|====|................. range1
...........|============| range2
..|======... | [
"Combines",
"this",
"range",
"with",
"another",
"range",
"forming",
"a",
"new",
"range"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/SwatDB/SwatDBRange.php#L116-L132 |
34,141 | brainworxx/kreXX | src/Analyse/Routing/Routing.php | Routing.handleNoneSimpleTypes | protected function handleNoneSimpleTypes($data, Model $model)
{
// Check the nesting level.
if ($this->pool->emergencyHandler->checkNesting() === true) {
$text = $this->pool->messages->getHelp('maximumLevelReached2');
if (is_array($data) === true) {
$type = st... | php | protected function handleNoneSimpleTypes($data, Model $model)
{
// Check the nesting level.
if ($this->pool->emergencyHandler->checkNesting() === true) {
$text = $this->pool->messages->getHelp('maximumLevelReached2');
if (is_array($data) === true) {
$type = st... | [
"protected",
"function",
"handleNoneSimpleTypes",
"(",
"$",
"data",
",",
"Model",
"$",
"model",
")",
"{",
"// Check the nesting level.",
"if",
"(",
"$",
"this",
"->",
"pool",
"->",
"emergencyHandler",
"->",
"checkNesting",
"(",
")",
"===",
"true",
")",
"{",
... | Routing of objects and arrays.
@param object|array $data
The object / array we are analysing.
@param \Brainworxx\Krexx\Analyse\Model $model
The already prepared model.
@return string
The rendered HTML code. | [
"Routing",
"of",
"objects",
"and",
"arrays",
"."
] | a03beaa4507ffb391412b9ac61593d263d3f8bca | https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/Analyse/Routing/Routing.php#L206-L242 |
34,142 | brainworxx/kreXX | src/Analyse/Routing/Routing.php | Routing.preprocessNoneSimpleTypes | protected function preprocessNoneSimpleTypes($data, Model $model)
{
if (is_object($data) === true) {
// Object?
// Remember that we've been here before.
$this->pool->recursionHandler->addToHive($data);
// We need to check if this is an object first.
... | php | protected function preprocessNoneSimpleTypes($data, Model $model)
{
if (is_object($data) === true) {
// Object?
// Remember that we've been here before.
$this->pool->recursionHandler->addToHive($data);
// We need to check if this is an object first.
... | [
"protected",
"function",
"preprocessNoneSimpleTypes",
"(",
"$",
"data",
",",
"Model",
"$",
"model",
")",
"{",
"if",
"(",
"is_object",
"(",
"$",
"data",
")",
"===",
"true",
")",
"{",
"// Object?",
"// Remember that we've been here before.",
"$",
"this",
"->",
"... | Do some pre processing, before the routing.
@param object|array $data
The object / array we are analysing.
@param \Brainworxx\Krexx\Analyse\Model $model
The already prepared model.
@return string
The rendered HTML code. | [
"Do",
"some",
"pre",
"processing",
"before",
"the",
"routing",
"."
] | a03beaa4507ffb391412b9ac61593d263d3f8bca | https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/Analyse/Routing/Routing.php#L255-L276 |
34,143 | silverorange/swat | Swat/SwatNoteBook.php | SwatNoteBook.getInlineJavaScript | protected function getInlineJavaScript()
{
switch ($this->tab_position) {
case self::POSITION_RIGHT:
$position = 'right';
break;
case self::POSITION_LEFT:
$position = 'left';
break;
case self::POSITION_BOTTOM... | php | protected function getInlineJavaScript()
{
switch ($this->tab_position) {
case self::POSITION_RIGHT:
$position = 'right';
break;
case self::POSITION_LEFT:
$position = 'left';
break;
case self::POSITION_BOTTOM... | [
"protected",
"function",
"getInlineJavaScript",
"(",
")",
"{",
"switch",
"(",
"$",
"this",
"->",
"tab_position",
")",
"{",
"case",
"self",
"::",
"POSITION_RIGHT",
":",
"$",
"position",
"=",
"'right'",
";",
"break",
";",
"case",
"self",
"::",
"POSITION_LEFT",... | Gets the inline JavaScript used by this notebook
@return string the inline JavaScript used by this notebook. | [
"Gets",
"the",
"inline",
"JavaScript",
"used",
"by",
"this",
"notebook"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatNoteBook.php#L543-L568 |
34,144 | brainworxx/kreXX | src/Service/Config/Model.php | Model.setValue | public function setValue($value)
{
if ($value === Fallback::VALUE_TRUE) {
$value = true;
}
if ($value === Fallback::VALUE_FALSE) {
$value = false;
}
$this->value = $value;
return $this;
} | php | public function setValue($value)
{
if ($value === Fallback::VALUE_TRUE) {
$value = true;
}
if ($value === Fallback::VALUE_FALSE) {
$value = false;
}
$this->value = $value;
return $this;
} | [
"public",
"function",
"setValue",
"(",
"$",
"value",
")",
"{",
"if",
"(",
"$",
"value",
"===",
"Fallback",
"::",
"VALUE_TRUE",
")",
"{",
"$",
"value",
"=",
"true",
";",
"}",
"if",
"(",
"$",
"value",
"===",
"Fallback",
"::",
"VALUE_FALSE",
")",
"{",
... | Setter for the value.
@param string $value
@return $this
Return $this for Chaining. | [
"Setter",
"for",
"the",
"value",
"."
] | a03beaa4507ffb391412b9ac61593d263d3f8bca | https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/Service/Config/Model.php#L115-L127 |
34,145 | silverorange/swat | Swat/SwatReplicableNoteBookChild.php | SwatReplicableNoteBookChild.getPages | public function getPages()
{
$pages = array();
foreach ($this->children as $child) {
if ($child instanceof SwatNoteBookChild) {
$pages = array_merge($pages, $child->getPages());
}
}
return $pages;
} | php | public function getPages()
{
$pages = array();
foreach ($this->children as $child) {
if ($child instanceof SwatNoteBookChild) {
$pages = array_merge($pages, $child->getPages());
}
}
return $pages;
} | [
"public",
"function",
"getPages",
"(",
")",
"{",
"$",
"pages",
"=",
"array",
"(",
")",
";",
"foreach",
"(",
"$",
"this",
"->",
"children",
"as",
"$",
"child",
")",
"{",
"if",
"(",
"$",
"child",
"instanceof",
"SwatNoteBookChild",
")",
"{",
"$",
"pages... | Gets the notebook pages of this replicable notebook child
Implements the {@link SwatNoteBookChild::getPages()} interface.
@return array an array containing all the replicated pages of this
child. | [
"Gets",
"the",
"notebook",
"pages",
"of",
"this",
"replicable",
"notebook",
"child"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatReplicableNoteBookChild.php#L23-L34 |
34,146 | silverorange/swat | Swat/SwatTextarea.php | SwatTextarea.display | public function display()
{
if (!$this->visible) {
return;
}
parent::display();
$div_tag = new SwatHtmlTag('div');
$div_tag->class = 'swat-textarea-container';
$div_tag->open();
$textarea_tag = $this->getTextareaTag();
$textarea_tag->dis... | php | public function display()
{
if (!$this->visible) {
return;
}
parent::display();
$div_tag = new SwatHtmlTag('div');
$div_tag->class = 'swat-textarea-container';
$div_tag->open();
$textarea_tag = $this->getTextareaTag();
$textarea_tag->dis... | [
"public",
"function",
"display",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"visible",
")",
"{",
"return",
";",
"}",
"parent",
"::",
"display",
"(",
")",
";",
"$",
"div_tag",
"=",
"new",
"SwatHtmlTag",
"(",
"'div'",
")",
";",
"$",
"div_tag",... | Displays this textarea
Outputs an appropriate XHTML tag. | [
"Displays",
"this",
"textarea"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTextarea.php#L131-L149 |
34,147 | silverorange/swat | Swat/SwatTextarea.php | SwatTextarea.process | public function process()
{
parent::process();
$data = &$this->getForm()->getFormData();
if (!isset($data[$this->id])) {
return;
}
$this->value = $data[$this->id];
$length = $this->getValueLength();
if ($length === 0) {
$this->value... | php | public function process()
{
parent::process();
$data = &$this->getForm()->getFormData();
if (!isset($data[$this->id])) {
return;
}
$this->value = $data[$this->id];
$length = $this->getValueLength();
if ($length === 0) {
$this->value... | [
"public",
"function",
"process",
"(",
")",
"{",
"parent",
"::",
"process",
"(",
")",
";",
"$",
"data",
"=",
"&",
"$",
"this",
"->",
"getForm",
"(",
")",
"->",
"getFormData",
"(",
")",
";",
"if",
"(",
"!",
"isset",
"(",
"$",
"data",
"[",
"$",
"t... | Processes this textarea
If a validation error occurs, an error message is attached to this
widget. | [
"Processes",
"this",
"textarea"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTextarea.php#L160-L189 |
34,148 | silverorange/swat | Swat/SwatTextarea.php | SwatTextarea.getTextareaTag | protected function getTextareaTag()
{
// textarea tags cannot be self-closing when using HTML parser on XHTML
$value = $this->value === null ? '' : $this->value;
// escape value for display because we actually want to show entities
// for editing
$value = htmlspecialchars($v... | php | protected function getTextareaTag()
{
// textarea tags cannot be self-closing when using HTML parser on XHTML
$value = $this->value === null ? '' : $this->value;
// escape value for display because we actually want to show entities
// for editing
$value = htmlspecialchars($v... | [
"protected",
"function",
"getTextareaTag",
"(",
")",
"{",
"// textarea tags cannot be self-closing when using HTML parser on XHTML",
"$",
"value",
"=",
"$",
"this",
"->",
"value",
"===",
"null",
"?",
"''",
":",
"$",
"this",
"->",
"value",
";",
"// escape value for dis... | Gets the textarea tag used to display this textarea control
@return SwatHtmlTag the textarea tag used to display this textarea
control. | [
"Gets",
"the",
"textarea",
"tag",
"used",
"to",
"display",
"this",
"textarea",
"control"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTextarea.php#L248-L282 |
34,149 | silverorange/swat | Swat/SwatTextarea.php | SwatTextarea.getValueLength | protected function getValueLength()
{
if ($this->maxlength_ignored_characters != '') {
$chars = preg_quote($this->maxlength_ignored_characters, '/');
$pattern = sprintf('/[%s]/u', $chars);
$value = preg_replace($pattern, '', $this->value);
$length = mb_strlen(... | php | protected function getValueLength()
{
if ($this->maxlength_ignored_characters != '') {
$chars = preg_quote($this->maxlength_ignored_characters, '/');
$pattern = sprintf('/[%s]/u', $chars);
$value = preg_replace($pattern, '', $this->value);
$length = mb_strlen(... | [
"protected",
"function",
"getValueLength",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"maxlength_ignored_characters",
"!=",
"''",
")",
"{",
"$",
"chars",
"=",
"preg_quote",
"(",
"$",
"this",
"->",
"maxlength_ignored_characters",
",",
"'/'",
")",
";",
"$",
... | Gets the computed length of the value of this textarea
@return integer the length of the value of this textarea | [
"Gets",
"the",
"computed",
"length",
"of",
"the",
"value",
"of",
"this",
"textarea"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTextarea.php#L292-L303 |
34,150 | silverorange/swat | Swat/SwatTextarea.php | SwatTextarea.getInlineJavaScript | protected function getInlineJavaScript()
{
$resizeable = $this->resizeable ? 'true' : 'false';
return sprintf(
"var %s_obj = new SwatTextarea('%s', %s);",
$this->id,
$this->id,
$resizeable
);
} | php | protected function getInlineJavaScript()
{
$resizeable = $this->resizeable ? 'true' : 'false';
return sprintf(
"var %s_obj = new SwatTextarea('%s', %s);",
$this->id,
$this->id,
$resizeable
);
} | [
"protected",
"function",
"getInlineJavaScript",
"(",
")",
"{",
"$",
"resizeable",
"=",
"$",
"this",
"->",
"resizeable",
"?",
"'true'",
":",
"'false'",
";",
"return",
"sprintf",
"(",
"\"var %s_obj = new SwatTextarea('%s', %s);\"",
",",
"$",
"this",
"->",
"id",
",... | Gets the inline JavaScript for this textarea widget
@return string the inline JavaScript for this textarea widget. | [
"Gets",
"the",
"inline",
"JavaScript",
"for",
"this",
"textarea",
"widget"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTextarea.php#L328-L337 |
34,151 | mindkomm/types | lib/Taxonomy.php | Taxonomy.register | public static function register( $taxonomies = [] ) {
foreach ( $taxonomies as $taxonomy => $args ) {
$args = self::parse_args( $args );
self::register_extensions( $taxonomy, $args );
$for_post_types = $args['for_post_types'];
// Defaults for taxonomy registration.
$args = wp_parse_args( $args['args'... | php | public static function register( $taxonomies = [] ) {
foreach ( $taxonomies as $taxonomy => $args ) {
$args = self::parse_args( $args );
self::register_extensions( $taxonomy, $args );
$for_post_types = $args['for_post_types'];
// Defaults for taxonomy registration.
$args = wp_parse_args( $args['args'... | [
"public",
"static",
"function",
"register",
"(",
"$",
"taxonomies",
"=",
"[",
"]",
")",
"{",
"foreach",
"(",
"$",
"taxonomies",
"as",
"$",
"taxonomy",
"=>",
"$",
"args",
")",
"{",
"$",
"args",
"=",
"self",
"::",
"parse_args",
"(",
"$",
"args",
")",
... | Register taxonomies based on an array definition.
@param array $taxonomies {
An array of arrays for taxonomies, where the name of the taxonomy is the key of an array.
@type string $name_singular Singular name for taxonomy.
@type string $name_plural Plural name for taxonomy.
@type array $for_post_types The array ... | [
"Register",
"taxonomies",
"based",
"on",
"an",
"array",
"definition",
"."
] | a075d59acf995605427ce8a647a10ed12463b856 | https://github.com/mindkomm/types/blob/a075d59acf995605427ce8a647a10ed12463b856/lib/Taxonomy.php#L21-L39 |
34,152 | mindkomm/types | lib/Taxonomy.php | Taxonomy.update | public static function update( $taxonomies = [] ) {
foreach ( $taxonomies as $taxonomy => $args ) {
$args = self::parse_args( $args );
self::register_extensions( $taxonomy, $args );
if ( isset( $args['args'] ) ) {
add_filter( 'register_taxonomy_args', function( $defaults, $name ) use ( $taxonomy, $args ... | php | public static function update( $taxonomies = [] ) {
foreach ( $taxonomies as $taxonomy => $args ) {
$args = self::parse_args( $args );
self::register_extensions( $taxonomy, $args );
if ( isset( $args['args'] ) ) {
add_filter( 'register_taxonomy_args', function( $defaults, $name ) use ( $taxonomy, $args ... | [
"public",
"static",
"function",
"update",
"(",
"$",
"taxonomies",
"=",
"[",
"]",
")",
"{",
"foreach",
"(",
"$",
"taxonomies",
"as",
"$",
"taxonomy",
"=>",
"$",
"args",
")",
"{",
"$",
"args",
"=",
"self",
"::",
"parse_args",
"(",
"$",
"args",
")",
"... | Updates settings for a taxonomy.
Here, you use the same settings that you also use for the `register()` funciton.
Run this function before the `init` hook.
@see register_taxonomy()
@since 2.2.0
@param array $taxonomies An associative array of post types and its arguments that should be updated. See the
`register()`... | [
"Updates",
"settings",
"for",
"a",
"taxonomy",
"."
] | a075d59acf995605427ce8a647a10ed12463b856 | https://github.com/mindkomm/types/blob/a075d59acf995605427ce8a647a10ed12463b856/lib/Taxonomy.php#L54-L71 |
34,153 | mindkomm/types | lib/Taxonomy.php | Taxonomy.rename | public static function rename( $taxonomy, $name_singular, $name_plural ) {
if ( ! taxonomy_exists( $taxonomy ) ) {
return;
}
( new Taxonomy_Labels( $taxonomy, $name_singular, $name_plural ) )->init();
} | php | public static function rename( $taxonomy, $name_singular, $name_plural ) {
if ( ! taxonomy_exists( $taxonomy ) ) {
return;
}
( new Taxonomy_Labels( $taxonomy, $name_singular, $name_plural ) )->init();
} | [
"public",
"static",
"function",
"rename",
"(",
"$",
"taxonomy",
",",
"$",
"name_singular",
",",
"$",
"name_plural",
")",
"{",
"if",
"(",
"!",
"taxonomy_exists",
"(",
"$",
"taxonomy",
")",
")",
"{",
"return",
";",
"}",
"(",
"new",
"Taxonomy_Labels",
"(",
... | Renames a taxonomy.
Run this function before the `init` hook.
@since 2.2.0
@param string $taxonomy The taxonomy to rename.
@param string $name_singular The new singular name.
@param string $name_plural The new plural name. | [
"Renames",
"a",
"taxonomy",
"."
] | a075d59acf995605427ce8a647a10ed12463b856 | https://github.com/mindkomm/types/blob/a075d59acf995605427ce8a647a10ed12463b856/lib/Taxonomy.php#L84-L90 |
34,154 | brainworxx/kreXX | src/Analyse/Routing/Process/ProcessBacktrace.php | ProcessBacktrace.process | public function process(&$backtrace = array())
{
if (empty($backtrace) === true) {
$backtrace = $this->getBacktrace();
}
$output = '';
$maxStep = (int) $this->pool->config->getSetting(Fallback::SETTING_MAX_STEP_NUMBER);
$stepCount = count($backtrace);
//... | php | public function process(&$backtrace = array())
{
if (empty($backtrace) === true) {
$backtrace = $this->getBacktrace();
}
$output = '';
$maxStep = (int) $this->pool->config->getSetting(Fallback::SETTING_MAX_STEP_NUMBER);
$stepCount = count($backtrace);
//... | [
"public",
"function",
"process",
"(",
"&",
"$",
"backtrace",
"=",
"array",
"(",
")",
")",
"{",
"if",
"(",
"empty",
"(",
"$",
"backtrace",
")",
"===",
"true",
")",
"{",
"$",
"backtrace",
"=",
"$",
"this",
"->",
"getBacktrace",
"(",
")",
";",
"}",
... | Do a backtrace analysis.
@param array $backtrace
The backtrace, which may (or may not) come from other sources.
If omitted, a new debug_backtrace() will be retrieved.
@return string
The rendered backtrace. | [
"Do",
"a",
"backtrace",
"analysis",
"."
] | a03beaa4507ffb391412b9ac61593d263d3f8bca | https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/Analyse/Routing/Process/ProcessBacktrace.php#L69-L100 |
34,155 | brainworxx/kreXX | src/Analyse/Routing/Process/ProcessBacktrace.php | ProcessBacktrace.getBacktrace | protected function getBacktrace()
{
// Remove the fist step from the backtrace,
// because that is the internal function in kreXX.
$backtrace = debug_backtrace();
// We remove all steps that came from inside the kreXX lib.
$krexxScr = KREXX_DIR . 'src';
foreach ($bac... | php | protected function getBacktrace()
{
// Remove the fist step from the backtrace,
// because that is the internal function in kreXX.
$backtrace = debug_backtrace();
// We remove all steps that came from inside the kreXX lib.
$krexxScr = KREXX_DIR . 'src';
foreach ($bac... | [
"protected",
"function",
"getBacktrace",
"(",
")",
"{",
"// Remove the fist step from the backtrace,",
"// because that is the internal function in kreXX.",
"$",
"backtrace",
"=",
"debug_backtrace",
"(",
")",
";",
"// We remove all steps that came from inside the kreXX lib.",
"$",
... | Get the backtrace, and remove all steps that were caused by kreXX.
@return array
The scrubbed backtrace. | [
"Get",
"the",
"backtrace",
"and",
"remove",
"all",
"steps",
"that",
"were",
"caused",
"by",
"kreXX",
"."
] | a03beaa4507ffb391412b9ac61593d263d3f8bca | https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/Analyse/Routing/Process/ProcessBacktrace.php#L108-L128 |
34,156 | silverorange/swat | Swat/SwatDisclosure.php | SwatDisclosure.display | public function display()
{
if (!$this->visible) {
return;
}
SwatWidget::display();
$control_div = $this->getControlDivTag();
$span = $this->getSpanTag();
$input = $this->getInputTag();
$container_div = $this->getContainerDivTag();
$anima... | php | public function display()
{
if (!$this->visible) {
return;
}
SwatWidget::display();
$control_div = $this->getControlDivTag();
$span = $this->getSpanTag();
$input = $this->getInputTag();
$container_div = $this->getContainerDivTag();
$anima... | [
"public",
"function",
"display",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"visible",
")",
"{",
"return",
";",
"}",
"SwatWidget",
"::",
"display",
"(",
")",
";",
"$",
"control_div",
"=",
"$",
"this",
"->",
"getControlDivTag",
"(",
")",
";",
... | Displays this disclosure container
Creates appropriate divs and outputs closed or opened based on the
initial state.
The disclosure is always displayed as opened in case the user has
JavaScript turned off. | [
"Displays",
"this",
"disclosure",
"container"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatDisclosure.php#L62-L93 |
34,157 | silverorange/swat | Swat/SwatDisclosure.php | SwatDisclosure.getInlineJavaScript | protected function getInlineJavaScript()
{
$open = $this->open ? 'true' : 'false';
return sprintf(
"var %s_obj = new %s('%s', %s);",
$this->id,
$this->getJavaScriptClass(),
$this->id,
$open
);
} | php | protected function getInlineJavaScript()
{
$open = $this->open ? 'true' : 'false';
return sprintf(
"var %s_obj = new %s('%s', %s);",
$this->id,
$this->getJavaScriptClass(),
$this->id,
$open
);
} | [
"protected",
"function",
"getInlineJavaScript",
"(",
")",
"{",
"$",
"open",
"=",
"$",
"this",
"->",
"open",
"?",
"'true'",
":",
"'false'",
";",
"return",
"sprintf",
"(",
"\"var %s_obj = new %s('%s', %s);\"",
",",
"$",
"this",
"->",
"id",
",",
"$",
"this",
... | Gets disclosure specific inline JavaScript
@return string disclosure specific inline JavaScript. | [
"Gets",
"disclosure",
"specific",
"inline",
"JavaScript"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatDisclosure.php#L192-L202 |
34,158 | rhoone/yii2-rhoone | controllers/DictionaryController.php | DictionaryController.actionValidate | public function actionValidate($class)
{
try {
Yii::$app->rhoone->dic->validate($class);
} catch (\Exception $ex) {
throw new Exception($ex->getMessage());
}
echo "No errors occured.";
return 0;
} | php | public function actionValidate($class)
{
try {
Yii::$app->rhoone->dic->validate($class);
} catch (\Exception $ex) {
throw new Exception($ex->getMessage());
}
echo "No errors occured.";
return 0;
} | [
"public",
"function",
"actionValidate",
"(",
"$",
"class",
")",
"{",
"try",
"{",
"Yii",
"::",
"$",
"app",
"->",
"rhoone",
"->",
"dic",
"->",
"validate",
"(",
"$",
"class",
")",
";",
"}",
"catch",
"(",
"\\",
"Exception",
"$",
"ex",
")",
"{",
"throw"... | Validate dictionary of extension.
@param string $class The extension class.
@return int
@throws Exception if error(s) occured. | [
"Validate",
"dictionary",
"of",
"extension",
"."
] | f6ae90d466ea6f34bba404be0aba03e37ef369ad | https://github.com/rhoone/yii2-rhoone/blob/f6ae90d466ea6f34bba404be0aba03e37ef369ad/controllers/DictionaryController.php#L33-L42 |
34,159 | rhoone/yii2-rhoone | controllers/DictionaryController.php | DictionaryController.actionHeadwords | public function actionHeadwords($class = null)
{
try {
foreach (Yii::$app->rhoone->dic->getHeadwords($class) as $headword) {
echo $headword->word . "\n";
}
} catch (\Exception $ex) {
throw new Exception($ex->getMessage());
}
return ... | php | public function actionHeadwords($class = null)
{
try {
foreach (Yii::$app->rhoone->dic->getHeadwords($class) as $headword) {
echo $headword->word . "\n";
}
} catch (\Exception $ex) {
throw new Exception($ex->getMessage());
}
return ... | [
"public",
"function",
"actionHeadwords",
"(",
"$",
"class",
"=",
"null",
")",
"{",
"try",
"{",
"foreach",
"(",
"Yii",
"::",
"$",
"app",
"->",
"rhoone",
"->",
"dic",
"->",
"getHeadwords",
"(",
"$",
"class",
")",
"as",
"$",
"headword",
")",
"{",
"echo"... | List all headwords.
@param string $class
@return int | [
"List",
"all",
"headwords",
"."
] | f6ae90d466ea6f34bba404be0aba03e37ef369ad | https://github.com/rhoone/yii2-rhoone/blob/f6ae90d466ea6f34bba404be0aba03e37ef369ad/controllers/DictionaryController.php#L49-L59 |
34,160 | rhoone/yii2-rhoone | controllers/DictionaryController.php | DictionaryController.actionSynonyms | public function actionSynonyms($class = null)
{
try {
foreach (Yii::$app->rhoone->dic->getSynonyms($class) as $synonyms) {
echo $synonyms->word . "\n";
}
} catch (\Exception $ex) {
throw new Exception($ex->getMessage());
}
return 0;... | php | public function actionSynonyms($class = null)
{
try {
foreach (Yii::$app->rhoone->dic->getSynonyms($class) as $synonyms) {
echo $synonyms->word . "\n";
}
} catch (\Exception $ex) {
throw new Exception($ex->getMessage());
}
return 0;... | [
"public",
"function",
"actionSynonyms",
"(",
"$",
"class",
"=",
"null",
")",
"{",
"try",
"{",
"foreach",
"(",
"Yii",
"::",
"$",
"app",
"->",
"rhoone",
"->",
"dic",
"->",
"getSynonyms",
"(",
"$",
"class",
")",
"as",
"$",
"synonyms",
")",
"{",
"echo",
... | List all synonyms.
@param string $class
@return int | [
"List",
"all",
"synonyms",
"."
] | f6ae90d466ea6f34bba404be0aba03e37ef369ad | https://github.com/rhoone/yii2-rhoone/blob/f6ae90d466ea6f34bba404be0aba03e37ef369ad/controllers/DictionaryController.php#L66-L76 |
34,161 | rhoone/yii2-rhoone | controllers/DictionaryController.php | DictionaryController.actionAddHeadword | public function actionAddHeadword($class, $word)
{
$extMgr = Yii::$app->rhoone->ext;
/* @var $extMgr \rhoone\base\ExtensionManager */
$model = $extMgr->getModel($class);
if (!$model) {
throw new Exception('`' . $class . '` does not exist.');
}
try {
... | php | public function actionAddHeadword($class, $word)
{
$extMgr = Yii::$app->rhoone->ext;
/* @var $extMgr \rhoone\base\ExtensionManager */
$model = $extMgr->getModel($class);
if (!$model) {
throw new Exception('`' . $class . '` does not exist.');
}
try {
... | [
"public",
"function",
"actionAddHeadword",
"(",
"$",
"class",
",",
"$",
"word",
")",
"{",
"$",
"extMgr",
"=",
"Yii",
"::",
"$",
"app",
"->",
"rhoone",
"->",
"ext",
";",
"/* @var $extMgr \\rhoone\\base\\ExtensionManager */",
"$",
"model",
"=",
"$",
"extMgr",
... | Add headword to class.
@param string $class
@param string $word
@throws Exception | [
"Add",
"headword",
"to",
"class",
"."
] | f6ae90d466ea6f34bba404be0aba03e37ef369ad | https://github.com/rhoone/yii2-rhoone/blob/f6ae90d466ea6f34bba404be0aba03e37ef369ad/controllers/DictionaryController.php#L84-L99 |
34,162 | rhoone/yii2-rhoone | controllers/DictionaryController.php | DictionaryController.actionAddSynonyms | public function actionAddSynonyms($class, $headword, $word, $addMissing = true)
{
$extMgr = Yii::$app->rhoone->ext;
/* @var $extMgr \rhoone\base\ExtensionManager */
$model = $extMgr->getModel($class);
$headwordModel = $model->getHeadwords()->andWhere(['word' => $headword])->one();
... | php | public function actionAddSynonyms($class, $headword, $word, $addMissing = true)
{
$extMgr = Yii::$app->rhoone->ext;
/* @var $extMgr \rhoone\base\ExtensionManager */
$model = $extMgr->getModel($class);
$headwordModel = $model->getHeadwords()->andWhere(['word' => $headword])->one();
... | [
"public",
"function",
"actionAddSynonyms",
"(",
"$",
"class",
",",
"$",
"headword",
",",
"$",
"word",
",",
"$",
"addMissing",
"=",
"true",
")",
"{",
"$",
"extMgr",
"=",
"Yii",
"::",
"$",
"app",
"->",
"rhoone",
"->",
"ext",
";",
"/* @var $extMgr \\rhoone\... | Add synonyms to class.
@param string $class
@param string $headword
@param string $word
@param boolean $addMissing | [
"Add",
"synonyms",
"to",
"class",
"."
] | f6ae90d466ea6f34bba404be0aba03e37ef369ad | https://github.com/rhoone/yii2-rhoone/blob/f6ae90d466ea6f34bba404be0aba03e37ef369ad/controllers/DictionaryController.php#L134-L156 |
34,163 | brainworxx/kreXX | src/Analyse/Callback/Analyse/Objects/PublicProperties.php | PublicProperties.callMe | public function callMe()
{
$output = $this->dispatchStartEvent();
/** @var \Brainworxx\Krexx\Service\Reflection\ReflectionClass $ref */
$ref = $this->parameters[static::PARAM_REF];
$data = $ref->getData();
$refProps = $ref->getProperties(\ReflectionProperty::IS_PUBLIC);
... | php | public function callMe()
{
$output = $this->dispatchStartEvent();
/** @var \Brainworxx\Krexx\Service\Reflection\ReflectionClass $ref */
$ref = $this->parameters[static::PARAM_REF];
$data = $ref->getData();
$refProps = $ref->getProperties(\ReflectionProperty::IS_PUBLIC);
... | [
"public",
"function",
"callMe",
"(",
")",
"{",
"$",
"output",
"=",
"$",
"this",
"->",
"dispatchStartEvent",
"(",
")",
";",
"/** @var \\Brainworxx\\Krexx\\Service\\Reflection\\ReflectionClass $ref */",
"$",
"ref",
"=",
"$",
"this",
"->",
"parameters",
"[",
"static",
... | Dump all public properties.
@throws \ReflectionException
@return string
The generated HTML markup. | [
"Dump",
"all",
"public",
"properties",
"."
] | a03beaa4507ffb391412b9ac61593d263d3f8bca | https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/Analyse/Callback/Analyse/Objects/PublicProperties.php#L64-L106 |
34,164 | mindkomm/types | lib/Post_Type_Query.php | Post_Type_Query.parse_query_args | public function parse_query_args( $args ) {
$query_args = [
'frontend' => $args,
'backend' => $args,
];
if ( isset( $args['frontend'] ) || isset( $args['backend'] ) ) {
foreach ( [ 'frontend', 'backend' ] as $query_type ) {
$query_args[ $query_type ] = isset( $args[ $query_type ] )
? $args[ $q... | php | public function parse_query_args( $args ) {
$query_args = [
'frontend' => $args,
'backend' => $args,
];
if ( isset( $args['frontend'] ) || isset( $args['backend'] ) ) {
foreach ( [ 'frontend', 'backend' ] as $query_type ) {
$query_args[ $query_type ] = isset( $args[ $query_type ] )
? $args[ $q... | [
"public",
"function",
"parse_query_args",
"(",
"$",
"args",
")",
"{",
"$",
"query_args",
"=",
"[",
"'frontend'",
"=>",
"$",
"args",
",",
"'backend'",
"=>",
"$",
"args",
",",
"]",
";",
"if",
"(",
"isset",
"(",
"$",
"args",
"[",
"'frontend'",
"]",
")",... | Parses the query args.
Returns an associative array with key `frontend` and `backend` that each contain query
settings.
@since 2.2.0
@param array $args An array of query args.
@return array An array of query args. | [
"Parses",
"the",
"query",
"args",
"."
] | a075d59acf995605427ce8a647a10ed12463b856 | https://github.com/mindkomm/types/blob/a075d59acf995605427ce8a647a10ed12463b856/lib/Post_Type_Query.php#L53-L68 |
34,165 | mindkomm/types | lib/Post_Type_Query.php | Post_Type_Query.pre_get_posts | public function pre_get_posts( $query ) {
global $typenow;
/**
* Check if we should modify the query.
*
* As a hint for for future condition updates: We can’t use $query->is_post_type_archive(),
* because some post_types have 'has_archive' set to false.
*/
if ( ! is_admin() ) {
if (
// Spec... | php | public function pre_get_posts( $query ) {
global $typenow;
/**
* Check if we should modify the query.
*
* As a hint for for future condition updates: We can’t use $query->is_post_type_archive(),
* because some post_types have 'has_archive' set to false.
*/
if ( ! is_admin() ) {
if (
// Spec... | [
"public",
"function",
"pre_get_posts",
"(",
"$",
"query",
")",
"{",
"global",
"$",
"typenow",
";",
"/**\n\t\t * Check if we should modify the query.\n\t\t *\n\t\t * As a hint for for future condition updates: We can’t use $query->is_post_type_archive(),\n\t\t * because some post_types have '... | Alters the query.
@param \WP_Query $query A WP_Query object. | [
"Alters",
"the",
"query",
"."
] | a075d59acf995605427ce8a647a10ed12463b856 | https://github.com/mindkomm/types/blob/a075d59acf995605427ce8a647a10ed12463b856/lib/Post_Type_Query.php#L75-L108 |
34,166 | silverorange/swat | Swat/SwatReplicableFieldset.php | SwatReplicableFieldset.init | public function init()
{
$children = array();
foreach ($this->children as $child_widget) {
$children[] = $this->remove($child_widget);
}
$fieldset = new SwatFieldset();
$fieldset->id = $fieldset->getUniqueId();
$prototype_id = $fieldset->id;
fore... | php | public function init()
{
$children = array();
foreach ($this->children as $child_widget) {
$children[] = $this->remove($child_widget);
}
$fieldset = new SwatFieldset();
$fieldset->id = $fieldset->getUniqueId();
$prototype_id = $fieldset->id;
fore... | [
"public",
"function",
"init",
"(",
")",
"{",
"$",
"children",
"=",
"array",
"(",
")",
";",
"foreach",
"(",
"$",
"this",
"->",
"children",
"as",
"$",
"child_widget",
")",
"{",
"$",
"children",
"[",
"]",
"=",
"$",
"this",
"->",
"remove",
"(",
"$",
... | Initilizes this replicable fieldset | [
"Initilizes",
"this",
"replicable",
"fieldset"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatReplicableFieldset.php#L23-L46 |
34,167 | silverorange/swat | Swat/SwatUriEntry.php | SwatUriEntry.process | public function process()
{
parent::process();
if ($this->value === null) {
return;
}
$this->value = trim($this->value);
if ($this->value == '') {
$this->value = null;
return;
}
if (!$this->validateUri($this->value)) {
... | php | public function process()
{
parent::process();
if ($this->value === null) {
return;
}
$this->value = trim($this->value);
if ($this->value == '') {
$this->value = null;
return;
}
if (!$this->validateUri($this->value)) {
... | [
"public",
"function",
"process",
"(",
")",
"{",
"parent",
"::",
"process",
"(",
")",
";",
"if",
"(",
"$",
"this",
"->",
"value",
"===",
"null",
")",
"{",
"return",
";",
"}",
"$",
"this",
"->",
"value",
"=",
"trim",
"(",
"$",
"this",
"->",
"value"... | Processes this URI entry
Ensures this URI is formatted correctly. If the URI is not formatted
correctly, adds an error message to this widget. | [
"Processes",
"this",
"URI",
"entry"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatUriEntry.php#L52-L82 |
34,168 | silverorange/swat | Swat/SwatUriEntry.php | SwatUriEntry.validateUri | protected function validateUri($value)
{
$schemes = array();
foreach ($this->valid_schemes as $scheme) {
$schemes[] = preg_quote($scheme, '_');
}
$schemes = implode('|', $schemes);
$regexp =
'_^
# scheme
((' .
$schemes .
... | php | protected function validateUri($value)
{
$schemes = array();
foreach ($this->valid_schemes as $scheme) {
$schemes[] = preg_quote($scheme, '_');
}
$schemes = implode('|', $schemes);
$regexp =
'_^
# scheme
((' .
$schemes .
... | [
"protected",
"function",
"validateUri",
"(",
"$",
"value",
")",
"{",
"$",
"schemes",
"=",
"array",
"(",
")",
";",
"foreach",
"(",
"$",
"this",
"->",
"valid_schemes",
"as",
"$",
"scheme",
")",
"{",
"$",
"schemes",
"[",
"]",
"=",
"preg_quote",
"(",
"$"... | Validates a URI
@param string $value the URI to validate.
@return boolean true if <code>$value</code> is a valid URI and
false if it is not. | [
"Validates",
"a",
"URI"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatUriEntry.php#L95-L124 |
34,169 | silverorange/swat | Swat/SwatTableViewWidgetRow.php | SwatTableViewWidgetRow.getMessages | public function getMessages()
{
$messages = array();
foreach ($this->getDescendants() as $widget) {
$messages = array_merge($messages, $widget->getMessages());
}
return $messages;
} | php | public function getMessages()
{
$messages = array();
foreach ($this->getDescendants() as $widget) {
$messages = array_merge($messages, $widget->getMessages());
}
return $messages;
} | [
"public",
"function",
"getMessages",
"(",
")",
"{",
"$",
"messages",
"=",
"array",
"(",
")",
";",
"foreach",
"(",
"$",
"this",
"->",
"getDescendants",
"(",
")",
"as",
"$",
"widget",
")",
"{",
"$",
"messages",
"=",
"array_merge",
"(",
"$",
"messages",
... | Gathers all messages from this table-view-row
@return array an array of {@link SwatMessage} objects. | [
"Gathers",
"all",
"messages",
"from",
"this",
"table",
"-",
"view",
"-",
"row"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTableViewWidgetRow.php#L404-L413 |
34,170 | silverorange/swat | Swat/SwatEntry.php | SwatEntry.process | public function process()
{
parent::process();
// if nothing was submitted by the user, shortcut return
if (!$this->hasRawValue()) {
$this->value = null;
return;
}
$this->value = $this->getRawValue();
if ($this->auto_trim) {
$thi... | php | public function process()
{
parent::process();
// if nothing was submitted by the user, shortcut return
if (!$this->hasRawValue()) {
$this->value = null;
return;
}
$this->value = $this->getRawValue();
if ($this->auto_trim) {
$thi... | [
"public",
"function",
"process",
"(",
")",
"{",
"parent",
"::",
"process",
"(",
")",
";",
"// if nothing was submitted by the user, shortcut return",
"if",
"(",
"!",
"$",
"this",
"->",
"hasRawValue",
"(",
")",
")",
"{",
"$",
"this",
"->",
"value",
"=",
"null... | Processes this entry widget
If any validation type errors occur, an error message is attached to
this entry widget. | [
"Processes",
"this",
"entry",
"widget"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatEntry.php#L162-L204 |
34,171 | silverorange/swat | Swat/SwatEntry.php | SwatEntry.getInputTag | protected function getInputTag()
{
$tag = new SwatHtmlTag('input');
$tag->type = 'text';
$tag->name = $this->autocomplete ? $this->id : $this->getNonce();
$tag->id = $this->autocomplete ? $this->id : $this->getNonce();
$tag->class = $this->getCSSClassString();
// eve... | php | protected function getInputTag()
{
$tag = new SwatHtmlTag('input');
$tag->type = 'text';
$tag->name = $this->autocomplete ? $this->id : $this->getNonce();
$tag->id = $this->autocomplete ? $this->id : $this->getNonce();
$tag->class = $this->getCSSClassString();
// eve... | [
"protected",
"function",
"getInputTag",
"(",
")",
"{",
"$",
"tag",
"=",
"new",
"SwatHtmlTag",
"(",
"'input'",
")",
";",
"$",
"tag",
"->",
"type",
"=",
"'text'",
";",
"$",
"tag",
"->",
"name",
"=",
"$",
"this",
"->",
"autocomplete",
"?",
"$",
"this",
... | Get the input tag to display
Can be used by sub-classes to change the setup of the input tag.
@return SwatHtmlTag Input tag to display. | [
"Get",
"the",
"input",
"tag",
"to",
"display"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatEntry.php#L299-L346 |
34,172 | silverorange/swat | Swat/SwatFormField.php | SwatFormField.getCSSClassNames | protected function getCSSClassNames()
{
$classes = array('swat-form-field');
if ($this->widget_class !== null) {
$classes[] = $this->widget_class;
}
if ($this->display_messages && $this->hasMessage()) {
$classes[] = 'swat-form-field-with-messages';
}... | php | protected function getCSSClassNames()
{
$classes = array('swat-form-field');
if ($this->widget_class !== null) {
$classes[] = $this->widget_class;
}
if ($this->display_messages && $this->hasMessage()) {
$classes[] = 'swat-form-field-with-messages';
}... | [
"protected",
"function",
"getCSSClassNames",
"(",
")",
"{",
"$",
"classes",
"=",
"array",
"(",
"'swat-form-field'",
")",
";",
"if",
"(",
"$",
"this",
"->",
"widget_class",
"!==",
"null",
")",
"{",
"$",
"classes",
"[",
"]",
"=",
"$",
"this",
"->",
"widg... | Gets the array of CSS classes that are applied to this form field
@return array the array of CSS classes that are applied to this form
field. | [
"Gets",
"the",
"array",
"of",
"CSS",
"classes",
"that",
"are",
"applied",
"to",
"this",
"form",
"field"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatFormField.php#L499-L517 |
34,173 | silverorange/swat | Swat/SwatFormField.php | SwatFormField.getTitleTag | protected function getTitleTag()
{
$label_tag = new SwatHtmlTag('label');
if ($this->title !== null) {
if ($this->show_colon) {
$label_tag->setContent(
sprintf(Swat::_('%s: '), $this->title),
$this->title_content_type
... | php | protected function getTitleTag()
{
$label_tag = new SwatHtmlTag('label');
if ($this->title !== null) {
if ($this->show_colon) {
$label_tag->setContent(
sprintf(Swat::_('%s: '), $this->title),
$this->title_content_type
... | [
"protected",
"function",
"getTitleTag",
"(",
")",
"{",
"$",
"label_tag",
"=",
"new",
"SwatHtmlTag",
"(",
"'label'",
")",
";",
"if",
"(",
"$",
"this",
"->",
"title",
"!==",
"null",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"show_colon",
")",
"{",
"$",
... | Get a SwatHtmlTag to display the title
Subclasses can change this to change their appearance.
@return SwatHtmlTag a tag object containing the title. | [
"Get",
"a",
"SwatHtmlTag",
"to",
"display",
"the",
"title"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatFormField.php#L529-L548 |
34,174 | silverorange/swat | Swat/SwatCheckbox.php | SwatCheckbox.display | public function display()
{
if (!$this->visible) {
return;
}
parent::display();
$this->getForm()->addHiddenField($this->id . '_submitted', 1);
$input_tag = new SwatHtmlTag('input');
$input_tag->type = 'checkbox';
$input_tag->class = $this->getCS... | php | public function display()
{
if (!$this->visible) {
return;
}
parent::display();
$this->getForm()->addHiddenField($this->id . '_submitted', 1);
$input_tag = new SwatHtmlTag('input');
$input_tag->type = 'checkbox';
$input_tag->class = $this->getCS... | [
"public",
"function",
"display",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"visible",
")",
"{",
"return",
";",
"}",
"parent",
"::",
"display",
"(",
")",
";",
"$",
"this",
"->",
"getForm",
"(",
")",
"->",
"addHiddenField",
"(",
"$",
"this",
... | Displays this checkbox
Outputs an appropriate XHTML tag. | [
"Displays",
"this",
"checkbox"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatCheckbox.php#L67-L98 |
34,175 | silverorange/swat | Swat/SwatCheckbox.php | SwatCheckbox.process | public function process()
{
parent::process();
if (
$this->getForm()->getHiddenField($this->id . '_submitted') === null
) {
return;
}
$data = &$this->getForm()->getFormData();
$this->value = array_key_exists($this->id, $data);
} | php | public function process()
{
parent::process();
if (
$this->getForm()->getHiddenField($this->id . '_submitted') === null
) {
return;
}
$data = &$this->getForm()->getFormData();
$this->value = array_key_exists($this->id, $data);
} | [
"public",
"function",
"process",
"(",
")",
"{",
"parent",
"::",
"process",
"(",
")",
";",
"if",
"(",
"$",
"this",
"->",
"getForm",
"(",
")",
"->",
"getHiddenField",
"(",
"$",
"this",
"->",
"id",
".",
"'_submitted'",
")",
"===",
"null",
")",
"{",
"r... | Processes this checkbox
Sets the internal value of this checkbox based on submitted form data. | [
"Processes",
"this",
"checkbox"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatCheckbox.php#L108-L120 |
34,176 | silverorange/swat | Swat/exceptions/SwatException.php | SwatException.process | public function process($exit = true, $handled = true)
{
$this->handled = $handled;
if (ini_get('display_errors')) {
$this->display();
}
if (ini_get('log_errors')) {
$this->log();
}
if ($exit) {
exit(1);
}
} | php | public function process($exit = true, $handled = true)
{
$this->handled = $handled;
if (ini_get('display_errors')) {
$this->display();
}
if (ini_get('log_errors')) {
$this->log();
}
if ($exit) {
exit(1);
}
} | [
"public",
"function",
"process",
"(",
"$",
"exit",
"=",
"true",
",",
"$",
"handled",
"=",
"true",
")",
"{",
"$",
"this",
"->",
"handled",
"=",
"$",
"handled",
";",
"if",
"(",
"ini_get",
"(",
"'display_errors'",
")",
")",
"{",
"$",
"this",
"->",
"di... | Processes this exception
Processing involves displaying errors, logging errors and sending
error message emails
@param boolean $exit optional. Whether or not to exit after processing
this exception. If unspecified, defaults to true.
@param boolean $handled optional. Whether or not this exception was
manually handled.... | [
"Processes",
"this",
"exception"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/exceptions/SwatException.php#L176-L191 |
34,177 | silverorange/swat | Swat/exceptions/SwatException.php | SwatException.getSummary | public function getSummary()
{
ob_start();
printf(
"%s in file '%s' line %s",
$this->class,
$this->getFile(),
$this->getLine()
);
if ($this->wasHandled()) {
echo ' Exception was handled';
}
return ob_get_c... | php | public function getSummary()
{
ob_start();
printf(
"%s in file '%s' line %s",
$this->class,
$this->getFile(),
$this->getLine()
);
if ($this->wasHandled()) {
echo ' Exception was handled';
}
return ob_get_c... | [
"public",
"function",
"getSummary",
"(",
")",
"{",
"ob_start",
"(",
")",
";",
"printf",
"(",
"\"%s in file '%s' line %s\"",
",",
"$",
"this",
"->",
"class",
",",
"$",
"this",
"->",
"getFile",
"(",
")",
",",
"$",
"this",
"->",
"getLine",
"(",
")",
")",
... | Gets a one-line short text summary of this exception
This summary is useful for log entries and error email titles.
@return string a one-line summary of this exception | [
"Gets",
"a",
"one",
"-",
"line",
"short",
"text",
"summary",
"of",
"this",
"exception"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/exceptions/SwatException.php#L276-L292 |
34,178 | silverorange/swat | Swat/exceptions/SwatException.php | SwatException.toString | public function toString()
{
ob_start();
printf(
"%s Exception: %s\n\nMessage: %s\n\nCode:\n\t%s\n\n" .
"Created in file '%s' on line %s.\n\n",
$this->wasHandled() ? 'Caught' : 'Uncaught',
$this->class,
$this->getMessage(),
... | php | public function toString()
{
ob_start();
printf(
"%s Exception: %s\n\nMessage: %s\n\nCode:\n\t%s\n\n" .
"Created in file '%s' on line %s.\n\n",
$this->wasHandled() ? 'Caught' : 'Uncaught',
$this->class,
$this->getMessage(),
... | [
"public",
"function",
"toString",
"(",
")",
"{",
"ob_start",
"(",
")",
";",
"printf",
"(",
"\"%s Exception: %s\\n\\nMessage: %s\\n\\nCode:\\n\\t%s\\n\\n\"",
".",
"\"Created in file '%s' on line %s.\\n\\n\"",
",",
"$",
"this",
"->",
"wasHandled",
"(",
")",
"?",
"'Caught'... | Gets this exception as a nicely formatted text block
This is useful for text-based logs and emails.
@return string this exception formatted as text. | [
"Gets",
"this",
"exception",
"as",
"a",
"nicely",
"formatted",
"text",
"block"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/exceptions/SwatException.php#L304-L355 |
34,179 | silverorange/swat | Swat/exceptions/SwatException.php | SwatException.toXHTML | public function toXHTML()
{
ob_start();
$this->displayStyleSheet();
echo '<div class="swat-exception">';
printf(
'<h3>%s Exception: %s</h3>' .
'<div class="swat-exception-body">' .
'Message:<div class="swat-exception-message">%s</div>' .... | php | public function toXHTML()
{
ob_start();
$this->displayStyleSheet();
echo '<div class="swat-exception">';
printf(
'<h3>%s Exception: %s</h3>' .
'<div class="swat-exception-body">' .
'Message:<div class="swat-exception-message">%s</div>' .... | [
"public",
"function",
"toXHTML",
"(",
")",
"{",
"ob_start",
"(",
")",
";",
"$",
"this",
"->",
"displayStyleSheet",
"(",
")",
";",
"echo",
"'<div class=\"swat-exception\">'",
";",
"printf",
"(",
"'<h3>%s Exception: %s</h3>'",
".",
"'<div class=\"swat-exception-body\">'... | Gets this exception as a nicely formatted XHTML fragment
This is nice for debugging errors on a staging server.
@return string this exception formatted as XHTML. | [
"Gets",
"this",
"exception",
"as",
"a",
"nicely",
"formatted",
"XHTML",
"fragment"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/exceptions/SwatException.php#L367-L427 |
34,180 | silverorange/swat | Swat/exceptions/SwatException.php | SwatException.handle | public static function handle($e)
{
// wrap other exceptions in SwatExceptions
if (!$e instanceof SwatException) {
$e = new SwatException($e);
}
$e->process(true, false);
} | php | public static function handle($e)
{
// wrap other exceptions in SwatExceptions
if (!$e instanceof SwatException) {
$e = new SwatException($e);
}
$e->process(true, false);
} | [
"public",
"static",
"function",
"handle",
"(",
"$",
"e",
")",
"{",
"// wrap other exceptions in SwatExceptions",
"if",
"(",
"!",
"$",
"e",
"instanceof",
"SwatException",
")",
"{",
"$",
"e",
"=",
"new",
"SwatException",
"(",
"$",
"e",
")",
";",
"}",
"$",
... | Handles an exception
Wraps a generic exception in a SwatException object and process the
SwatException object.
@param Throwable $e the exception to handle. | [
"Handles",
"an",
"exception"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/exceptions/SwatException.php#L469-L477 |
34,181 | silverorange/swat | Swat/exceptions/SwatException.php | SwatException.formatValue | protected function formatValue($value)
{
$formatted_value = '<unknown parameter type>';
if (is_object($value)) {
$formatted_value = '<' . get_class($value) . ' object>';
} elseif ($value === null) {
$formatted_value = '<null>';
} elseif (is_string($value)) {
... | php | protected function formatValue($value)
{
$formatted_value = '<unknown parameter type>';
if (is_object($value)) {
$formatted_value = '<' . get_class($value) . ' object>';
} elseif ($value === null) {
$formatted_value = '<null>';
} elseif (is_string($value)) {
... | [
"protected",
"function",
"formatValue",
"(",
"$",
"value",
")",
"{",
"$",
"formatted_value",
"=",
"'<unknown parameter type>'",
";",
"if",
"(",
"is_object",
"(",
"$",
"value",
")",
")",
"{",
"$",
"formatted_value",
"=",
"'<'",
".",
"get_class",
"(",
"$",
"... | Formats a parameter value for display in a stack trace
@param mixed $value the value of the parameter.
@return string the formatted version of the parameter. | [
"Formats",
"a",
"parameter",
"value",
"for",
"display",
"in",
"a",
"stack",
"trace"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/exceptions/SwatException.php#L584-L636 |
34,182 | TeknooSoftware/states | demo/Acme/Article/Article.php | Article.getAttribute | protected function getAttribute($name)
{
if (isset($this->data[$name])) {
return $this->data[$name];
}
return null;
} | php | protected function getAttribute($name)
{
if (isset($this->data[$name])) {
return $this->data[$name];
}
return null;
} | [
"protected",
"function",
"getAttribute",
"(",
"$",
"name",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"data",
"[",
"$",
"name",
"]",
")",
")",
"{",
"return",
"$",
"this",
"->",
"data",
"[",
"$",
"name",
"]",
";",
"}",
"return",
"null",... | Get an article's attribute.
@param string $name
@return mixed | [
"Get",
"an",
"article",
"s",
"attribute",
"."
] | 0c675b768781ee3a3a15c2663cffec5d50c1d5fd | https://github.com/TeknooSoftware/states/blob/0c675b768781ee3a3a15c2663cffec5d50c1d5fd/demo/Acme/Article/Article.php#L72-L79 |
34,183 | silverorange/swat | Swat/SwatFrameDisclosure.php | SwatFrameDisclosure.display | public function display()
{
if (!$this->visible) {
return;
}
SwatWidget::display();
// default header level is h2
$level = 2;
$ancestor = $this->parent;
// get appropriate header level, limit to h6
while ($ancestor !== null && $level < 6... | php | public function display()
{
if (!$this->visible) {
return;
}
SwatWidget::display();
// default header level is h2
$level = 2;
$ancestor = $this->parent;
// get appropriate header level, limit to h6
while ($ancestor !== null && $level < 6... | [
"public",
"function",
"display",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"visible",
")",
"{",
"return",
";",
"}",
"SwatWidget",
"::",
"display",
"(",
")",
";",
"// default header level is h2",
"$",
"level",
"=",
"2",
";",
"$",
"ancestor",
"="... | Displays this frame disclosure container
Creates appropriate divs and outputs closed or opened based on the
initial state.
The disclosure is always displayed as opened in case the user has
JavaScript turned off. | [
"Displays",
"this",
"frame",
"disclosure",
"container"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatFrameDisclosure.php#L40-L90 |
34,184 | silverorange/swat | Swat/SwatFrameDisclosure.php | SwatFrameDisclosure.getCSSClassNames | protected function getCSSClassNames()
{
$classes = array();
$classes[] = 'swat-frame';
$classes[] = 'swat-disclosure-control-opened';
$classes[] = 'swat-frame-disclosure-control-opened';
$classes[] = 'swat-frame-disclosure';
$classes = array_merge($classes, parent::ge... | php | protected function getCSSClassNames()
{
$classes = array();
$classes[] = 'swat-frame';
$classes[] = 'swat-disclosure-control-opened';
$classes[] = 'swat-frame-disclosure-control-opened';
$classes[] = 'swat-frame-disclosure';
$classes = array_merge($classes, parent::ge... | [
"protected",
"function",
"getCSSClassNames",
"(",
")",
"{",
"$",
"classes",
"=",
"array",
"(",
")",
";",
"$",
"classes",
"[",
"]",
"=",
"'swat-frame'",
";",
"$",
"classes",
"[",
"]",
"=",
"'swat-disclosure-control-opened'",
";",
"$",
"classes",
"[",
"]",
... | Gets the array of CSS classes that are applied to this disclosure
@return array the array of CSS classes that are applied to this
disclosure. | [
"Gets",
"the",
"array",
"of",
"CSS",
"classes",
"that",
"are",
"applied",
"to",
"this",
"disclosure"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatFrameDisclosure.php#L140-L149 |
34,185 | brainworxx/kreXX | src/Analyse/Routing/Process/ProcessObject.php | ProcessObject.process | public function process(Model $model)
{
$object = $model->getData();
// Output data from the class.
return $this->pool->render->renderExpandableChild(
$model->setType(static::TYPE_CLASS)
->addParameter(static::PARAM_DATA, $object)
->addParameter(st... | php | public function process(Model $model)
{
$object = $model->getData();
// Output data from the class.
return $this->pool->render->renderExpandableChild(
$model->setType(static::TYPE_CLASS)
->addParameter(static::PARAM_DATA, $object)
->addParameter(st... | [
"public",
"function",
"process",
"(",
"Model",
"$",
"model",
")",
"{",
"$",
"object",
"=",
"$",
"model",
"->",
"getData",
"(",
")",
";",
"// Output data from the class.",
"return",
"$",
"this",
"->",
"pool",
"->",
"render",
"->",
"renderExpandableChild",
"("... | Render a dump for an object.
@param Model $model
The object we want to analyse.
@return string
The generated markup. | [
"Render",
"a",
"dump",
"for",
"an",
"object",
"."
] | a03beaa4507ffb391412b9ac61593d263d3f8bca | https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/Analyse/Routing/Process/ProcessObject.php#L56-L70 |
34,186 | mindkomm/types | lib/Taxonomy_Labels.php | Taxonomy_Labels.get_labels | public function get_labels( $name_singular, $name_plural ) {
$labels = [
'name' => $name_plural,
'singular_name' => $name_singular,
/* translators: %s: Singular taxonomy name */
'add_new_item' => sprintf( __( 'Add New %s', 'mind/types' ), $name_singular ),
... | php | public function get_labels( $name_singular, $name_plural ) {
$labels = [
'name' => $name_plural,
'singular_name' => $name_singular,
/* translators: %s: Singular taxonomy name */
'add_new_item' => sprintf( __( 'Add New %s', 'mind/types' ), $name_singular ),
... | [
"public",
"function",
"get_labels",
"(",
"$",
"name_singular",
",",
"$",
"name_plural",
")",
"{",
"$",
"labels",
"=",
"[",
"'name'",
"=>",
"$",
"name_plural",
",",
"'singular_name'",
"=>",
"$",
"name_singular",
",",
"/* translators: %s: Singular taxonomy name */",
... | Get labels for taxonomy base on singular and plural name.
The following labels are not translated, because they don’t contain the post type name:
most_used
@link https://developer.wordpress.org/reference/functions/get_taxonomy_labels/
@param string $name_singular Singular name for taxonomy.
@param string $name_plura... | [
"Get",
"labels",
"for",
"taxonomy",
"base",
"on",
"singular",
"and",
"plural",
"name",
"."
] | a075d59acf995605427ce8a647a10ed12463b856 | https://github.com/mindkomm/types/blob/a075d59acf995605427ce8a647a10ed12463b856/lib/Taxonomy_Labels.php#L82-L129 |
34,187 | mindkomm/types | lib/Taxonomy_Labels.php | Taxonomy_Labels.add_term_updated_messages | public function add_term_updated_messages( $messages ) {
$messages[ $this->taxonomy ] = [
0 => '',
/* translators: %s: Singular taxonomy name */
1 => sprintf( __( '%s added.', 'mind/types' ), $this->name_singular ),
/* translators: %s: Singular taxonomy name */
2 => sprintf( __( '%s deleted.', 'mind/ty... | php | public function add_term_updated_messages( $messages ) {
$messages[ $this->taxonomy ] = [
0 => '',
/* translators: %s: Singular taxonomy name */
1 => sprintf( __( '%s added.', 'mind/types' ), $this->name_singular ),
/* translators: %s: Singular taxonomy name */
2 => sprintf( __( '%s deleted.', 'mind/ty... | [
"public",
"function",
"add_term_updated_messages",
"(",
"$",
"messages",
")",
"{",
"$",
"messages",
"[",
"$",
"this",
"->",
"taxonomy",
"]",
"=",
"[",
"0",
"=>",
"''",
",",
"/* translators: %s: Singular taxonomy name */",
"1",
"=>",
"sprintf",
"(",
"__",
"(",
... | Sets term updated messages for custom taxonomies.
Check out the `term_updated_messages` in wp-admin/includes/edit-tag-messages.php.
@param array $messages An associative array of taxonomies and their messages.
@return array The filtered messages. | [
"Sets",
"term",
"updated",
"messages",
"for",
"custom",
"taxonomies",
"."
] | a075d59acf995605427ce8a647a10ed12463b856 | https://github.com/mindkomm/types/blob/a075d59acf995605427ce8a647a10ed12463b856/lib/Taxonomy_Labels.php#L140-L158 |
34,188 | brainworxx/kreXX | src/View/Messages.php | Messages.addMessage | public function addMessage($key, array $args = array())
{
// We will only display these messages once.
if (isset($this->keys[$key]) === false) {
// Add it to the keys, so the CMS can display it.
$this->keys[$key] = array('key' => $key, 'params' => $args);
$this->m... | php | public function addMessage($key, array $args = array())
{
// We will only display these messages once.
if (isset($this->keys[$key]) === false) {
// Add it to the keys, so the CMS can display it.
$this->keys[$key] = array('key' => $key, 'params' => $args);
$this->m... | [
"public",
"function",
"addMessage",
"(",
"$",
"key",
",",
"array",
"$",
"args",
"=",
"array",
"(",
")",
")",
"{",
"// We will only display these messages once.",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"keys",
"[",
"$",
"key",
"]",
")",
"===",
"false... | The message we want to add. It will be displayed in the output.
@param string $key
The message itself.
@param array $args
The parameters for vsprintf(). | [
"The",
"message",
"we",
"want",
"to",
"add",
".",
"It",
"will",
"be",
"displayed",
"in",
"the",
"output",
"."
] | a03beaa4507ffb391412b9ac61593d263d3f8bca | https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/View/Messages.php#L97-L105 |
34,189 | brainworxx/kreXX | src/View/Messages.php | Messages.outputMessages | public function outputMessages()
{
// Simple Wrapper for OutputActions::$render->renderMessages
if (php_sapi_name() === 'cli' &&
!empty($this->messages)
) {
// Output the messages on the shell.
$result = "\n\nkreXX messages\n";
$result .= "===... | php | public function outputMessages()
{
// Simple Wrapper for OutputActions::$render->renderMessages
if (php_sapi_name() === 'cli' &&
!empty($this->messages)
) {
// Output the messages on the shell.
$result = "\n\nkreXX messages\n";
$result .= "===... | [
"public",
"function",
"outputMessages",
"(",
")",
"{",
"// Simple Wrapper for OutputActions::$render->renderMessages",
"if",
"(",
"php_sapi_name",
"(",
")",
"===",
"'cli'",
"&&",
"!",
"empty",
"(",
"$",
"this",
"->",
"messages",
")",
")",
"{",
"// Output the message... | Renders the output of the messages.
@return string
The rendered html output of the messages. | [
"Renders",
"the",
"output",
"of",
"the",
"messages",
"."
] | a03beaa4507ffb391412b9ac61593d263d3f8bca | https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/View/Messages.php#L135-L154 |
34,190 | brainworxx/kreXX | src/View/Messages.php | Messages.getHelp | public function getHelp($key, array $args = array())
{
// Check if we can get a value, at all.
if (empty($this->helpArray[$key]) === true) {
return '';
}
// Return the value
return vsprintf($this->helpArray[$key], $args);
} | php | public function getHelp($key, array $args = array())
{
// Check if we can get a value, at all.
if (empty($this->helpArray[$key]) === true) {
return '';
}
// Return the value
return vsprintf($this->helpArray[$key], $args);
} | [
"public",
"function",
"getHelp",
"(",
"$",
"key",
",",
"array",
"$",
"args",
"=",
"array",
"(",
")",
")",
"{",
"// Check if we can get a value, at all.",
"if",
"(",
"empty",
"(",
"$",
"this",
"->",
"helpArray",
"[",
"$",
"key",
"]",
")",
"===",
"true",
... | Returns the help text when found, otherwise returns an empty string.
@param string $key
The help ID from the array above.
@param array $args
THe replacement arguments for vsprintf().
@return string
The help text. | [
"Returns",
"the",
"help",
"text",
"when",
"found",
"otherwise",
"returns",
"an",
"empty",
"string",
"."
] | a03beaa4507ffb391412b9ac61593d263d3f8bca | https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/View/Messages.php#L167-L176 |
34,191 | brainworxx/kreXX | src/View/Messages.php | Messages.readHelpFile | public function readHelpFile($file)
{
$this->helpArray = array_merge(
$this->helpArray,
(array)parse_ini_string($this->pool->fileService->getFileContents($file))
);
} | php | public function readHelpFile($file)
{
$this->helpArray = array_merge(
$this->helpArray,
(array)parse_ini_string($this->pool->fileService->getFileContents($file))
);
} | [
"public",
"function",
"readHelpFile",
"(",
"$",
"file",
")",
"{",
"$",
"this",
"->",
"helpArray",
"=",
"array_merge",
"(",
"$",
"this",
"->",
"helpArray",
",",
"(",
"array",
")",
"parse_ini_string",
"(",
"$",
"this",
"->",
"pool",
"->",
"fileService",
"-... | Read a help text file, and add its contents to the already read content.
@param string $file
Absolute path to the file we want to read. | [
"Read",
"a",
"help",
"text",
"file",
"and",
"add",
"its",
"contents",
"to",
"the",
"already",
"read",
"content",
"."
] | a03beaa4507ffb391412b9ac61593d263d3f8bca | https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/View/Messages.php#L184-L190 |
34,192 | brainworxx/kreXX | src/View/Messages.php | Messages.readHelpTexts | public function readHelpTexts()
{
$this->helpArray = array();
$this->readHelpFile(KREXX_DIR . 'resources/language/Help.ini');
foreach (SettingsGetter::getAdditionelHelpFiles() as $filename) {
$this->readHelpFile($filename);
}
} | php | public function readHelpTexts()
{
$this->helpArray = array();
$this->readHelpFile(KREXX_DIR . 'resources/language/Help.ini');
foreach (SettingsGetter::getAdditionelHelpFiles() as $filename) {
$this->readHelpFile($filename);
}
} | [
"public",
"function",
"readHelpTexts",
"(",
")",
"{",
"$",
"this",
"->",
"helpArray",
"=",
"array",
"(",
")",
";",
"$",
"this",
"->",
"readHelpFile",
"(",
"KREXX_DIR",
".",
"'resources/language/Help.ini'",
")",
";",
"foreach",
"(",
"SettingsGetter",
"::",
"g... | Reset the read help texts to factory settings. | [
"Reset",
"the",
"read",
"help",
"texts",
"to",
"factory",
"settings",
"."
] | a03beaa4507ffb391412b9ac61593d263d3f8bca | https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/View/Messages.php#L195-L204 |
34,193 | silverorange/swat | SwatI18N/SwatI18NNumberFormat.php | SwatI18NNumberFormat.override | public function override(array $format)
{
$vars = get_object_vars($this);
foreach ($format as $key => $value) {
if (!array_key_exists($key, $vars)) {
throw new SwatException(
"Number formatting information " .
"contains invalid... | php | public function override(array $format)
{
$vars = get_object_vars($this);
foreach ($format as $key => $value) {
if (!array_key_exists($key, $vars)) {
throw new SwatException(
"Number formatting information " .
"contains invalid... | [
"public",
"function",
"override",
"(",
"array",
"$",
"format",
")",
"{",
"$",
"vars",
"=",
"get_object_vars",
"(",
"$",
"this",
")",
";",
"foreach",
"(",
"$",
"format",
"as",
"$",
"key",
"=>",
"$",
"value",
")",
"{",
"if",
"(",
"!",
"array_key_exists... | Gets a new number format object with certain properties overridden from
specified values
The override information is specified as an associative array with
array keys representing property names of this formatting object and
array values being the overridden values.
For example, to override the positive and negative ... | [
"Gets",
"a",
"new",
"number",
"format",
"object",
"with",
"certain",
"properties",
"overridden",
"from",
"specified",
"values"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/SwatI18N/SwatI18NNumberFormat.php#L65-L88 |
34,194 | rhoone/yii2-rhoone | models/Headword.php | Headword.setExtension | public function setExtension($extension)
{
if (is_string($extension) && preg_match(Number::GUID_REGEX, $extension)) {
return $this->extension_guid = $extension;
}
if ($extension instanceof Extension) {
return $this->extension_guid = $extension->guid;
}
... | php | public function setExtension($extension)
{
if (is_string($extension) && preg_match(Number::GUID_REGEX, $extension)) {
return $this->extension_guid = $extension;
}
if ($extension instanceof Extension) {
return $this->extension_guid = $extension->guid;
}
... | [
"public",
"function",
"setExtension",
"(",
"$",
"extension",
")",
"{",
"if",
"(",
"is_string",
"(",
"$",
"extension",
")",
"&&",
"preg_match",
"(",
"Number",
"::",
"GUID_REGEX",
",",
"$",
"extension",
")",
")",
"{",
"return",
"$",
"this",
"->",
"extensio... | Set extension.
@param Extension|string $extension | [
"Set",
"extension",
"."
] | f6ae90d466ea6f34bba404be0aba03e37ef369ad | https://github.com/rhoone/yii2-rhoone/blob/f6ae90d466ea6f34bba404be0aba03e37ef369ad/models/Headword.php#L94-L103 |
34,195 | rhoone/yii2-rhoone | models/Headword.php | Headword.add | public static function add($word, $extension)
{
$headword = Headword::find()->where(['word' => $word, 'extension_guid' => $extension->guid])->one();
if ($headword) {
throw new InvalidParamException('The word: `' . $word . '` has existed.');
}
$headword = new Headword(['wo... | php | public static function add($word, $extension)
{
$headword = Headword::find()->where(['word' => $word, 'extension_guid' => $extension->guid])->one();
if ($headword) {
throw new InvalidParamException('The word: `' . $word . '` has existed.');
}
$headword = new Headword(['wo... | [
"public",
"static",
"function",
"add",
"(",
"$",
"word",
",",
"$",
"extension",
")",
"{",
"$",
"headword",
"=",
"Headword",
"::",
"find",
"(",
")",
"->",
"where",
"(",
"[",
"'word'",
"=>",
"$",
"word",
",",
"'extension_guid'",
"=>",
"$",
"extension",
... | Add a headword.
@param string $word
@param Extension $extension
@return true|\static
@throws InvalidParamException | [
"Add",
"a",
"headword",
"."
] | f6ae90d466ea6f34bba404be0aba03e37ef369ad | https://github.com/rhoone/yii2-rhoone/blob/f6ae90d466ea6f34bba404be0aba03e37ef369ad/models/Headword.php#L121-L142 |
34,196 | silverorange/swat | Swat/SwatTileView.php | SwatTileView.init | public function init()
{
parent::init();
if ($this->tile !== null) {
$this->tile->init();
}
foreach ($this->groups as $group) {
$group->init();
// index the group by id if it is not already indexed
if (!array_key_exists($group->id, $t... | php | public function init()
{
parent::init();
if ($this->tile !== null) {
$this->tile->init();
}
foreach ($this->groups as $group) {
$group->init();
// index the group by id if it is not already indexed
if (!array_key_exists($group->id, $t... | [
"public",
"function",
"init",
"(",
")",
"{",
"parent",
"::",
"init",
"(",
")",
";",
"if",
"(",
"$",
"this",
"->",
"tile",
"!==",
"null",
")",
"{",
"$",
"this",
"->",
"tile",
"->",
"init",
"(",
")",
";",
"}",
"foreach",
"(",
"$",
"this",
"->",
... | Initializes this tile view
This initializes the tile view and the tile contained in the view.
@see SwatView::init() | [
"Initializes",
"this",
"tile",
"view"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTileView.php#L171-L186 |
34,197 | silverorange/swat | Swat/SwatTileView.php | SwatTileView.process | public function process()
{
if (!$this->isInitialized()) {
$this->init();
}
if ($this->getFirstAncestor('SwatForm') !== null) {
$this->getCompositeWidget('check_all')->process();
}
$this->processed = true;
if ($this->tile !== null) {
... | php | public function process()
{
if (!$this->isInitialized()) {
$this->init();
}
if ($this->getFirstAncestor('SwatForm') !== null) {
$this->getCompositeWidget('check_all')->process();
}
$this->processed = true;
if ($this->tile !== null) {
... | [
"public",
"function",
"process",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"isInitialized",
"(",
")",
")",
"{",
"$",
"this",
"->",
"init",
"(",
")",
";",
"}",
"if",
"(",
"$",
"this",
"->",
"getFirstAncestor",
"(",
"'SwatForm'",
")",
"!==",
... | Processes this tile view
Process the tile contained by this tile view.
Unlike SwatWidget, composite widgets of this tile are not automatically
processed. This allows tile-views to be created outside a SwatForm. | [
"Processes",
"this",
"tile",
"view"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTileView.php#L199-L214 |
34,198 | silverorange/swat | Swat/SwatTileView.php | SwatTileView.display | public function display()
{
if (!$this->visible) {
return;
}
if ($this->model === null) {
return;
}
parent::display();
if (
count($this->model) === 0 &&
$this->no_records_message !== null &&
$this->show_ch... | php | public function display()
{
if (!$this->visible) {
return;
}
if ($this->model === null) {
return;
}
parent::display();
if (
count($this->model) === 0 &&
$this->no_records_message !== null &&
$this->show_ch... | [
"public",
"function",
"display",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"visible",
")",
"{",
"return",
";",
"}",
"if",
"(",
"$",
"this",
"->",
"model",
"===",
"null",
")",
"{",
"return",
";",
"}",
"parent",
"::",
"display",
"(",
")",
... | Displays this tile view | [
"Displays",
"this",
"tile",
"view"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTileView.php#L236-L293 |
34,199 | silverorange/swat | Swat/SwatTileView.php | SwatTileView.displayTiles | public function displayTiles()
{
// this uses read-ahead iteration
$this->model->rewind();
$record = $this->model->valid() ? $this->model->current() : null;
$this->model->next();
$next_record = $this->model->valid() ? $this->model->current() : null;
// tile count u... | php | public function displayTiles()
{
// this uses read-ahead iteration
$this->model->rewind();
$record = $this->model->valid() ? $this->model->current() : null;
$this->model->next();
$next_record = $this->model->valid() ? $this->model->current() : null;
// tile count u... | [
"public",
"function",
"displayTiles",
"(",
")",
"{",
"// this uses read-ahead iteration",
"$",
"this",
"->",
"model",
"->",
"rewind",
"(",
")",
";",
"$",
"record",
"=",
"$",
"this",
"->",
"model",
"->",
"valid",
"(",
")",
"?",
"$",
"this",
"->",
"model",... | Displays the tiles of this tile view | [
"Displays",
"the",
"tiles",
"of",
"this",
"tile",
"view"
] | e65dc5bc351927c61f594068430cdeeb874c8bc5 | https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTileView.php#L301-L357 |
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.