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,200
silverorange/swat
Swat/SwatTileView.php
SwatTileView.displayTileGroupHeaders
public function displayTileGroupHeaders($record, $next_record) { foreach ($this->groups as $group) { $group->display($record); } }
php
public function displayTileGroupHeaders($record, $next_record) { foreach ($this->groups as $group) { $group->display($record); } }
[ "public", "function", "displayTileGroupHeaders", "(", "$", "record", ",", "$", "next_record", ")", "{", "foreach", "(", "$", "this", "->", "groups", "as", "$", "group", ")", "{", "$", "group", "->", "display", "(", "$", "record", ")", ";", "}", "}" ]
Displays tile group headers @param mixed $record the record to display. @param mixed $next_record the next record to display. If there is no next record, this is null.
[ "Displays", "tile", "group", "headers" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTileView.php#L384-L389
34,201
silverorange/swat
Swat/SwatTileView.php
SwatTileView.displayTileGroupFooters
public function displayTileGroupFooters($record, $next_record) { foreach ($this->groups as $group) { $group->displayFooter($record, $next_record); } }
php
public function displayTileGroupFooters($record, $next_record) { foreach ($this->groups as $group) { $group->displayFooter($record, $next_record); } }
[ "public", "function", "displayTileGroupFooters", "(", "$", "record", ",", "$", "next_record", ")", "{", "foreach", "(", "$", "this", "->", "groups", "as", "$", "group", ")", "{", "$", "group", "->", "displayFooter", "(", "$", "record", ",", "$", "next_re...
Displays tile group footers @param mixed $record the record to display. @param mixed $next_record the next record to display. If there is no next record, this is null.
[ "Displays", "tile", "group", "footers" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTileView.php#L401-L406
34,202
silverorange/swat
Swat/SwatTileView.php
SwatTileView.getMessages
public function getMessages() { $messages = parent::getMessages(); if ($this->tile !== null) { $messages = array_merge($messages, $this->tile->getMessages()); } return $messages; }
php
public function getMessages() { $messages = parent::getMessages(); if ($this->tile !== null) { $messages = array_merge($messages, $this->tile->getMessages()); } return $messages; }
[ "public", "function", "getMessages", "(", ")", "{", "$", "messages", "=", "parent", "::", "getMessages", "(", ")", ";", "if", "(", "$", "this", "->", "tile", "!==", "null", ")", "{", "$", "messages", "=", "array_merge", "(", "$", "messages", ",", "$"...
Gathers all messages from this tile view @return array an array of {@link SwatMessage} objects.
[ "Gathers", "all", "messages", "from", "this", "tile", "view" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTileView.php#L600-L608
34,203
silverorange/swat
Swat/SwatTileView.php
SwatTileView.hasMessage
public function hasMessage() { $has_message = parent::hasMessage(); if (!$has_message && $this->tile !== null) { $has_message = $this->tile->hasMessage(); } return $has_message; }
php
public function hasMessage() { $has_message = parent::hasMessage(); if (!$has_message && $this->tile !== null) { $has_message = $this->tile->hasMessage(); } return $has_message; }
[ "public", "function", "hasMessage", "(", ")", "{", "$", "has_message", "=", "parent", "::", "hasMessage", "(", ")", ";", "if", "(", "!", "$", "has_message", "&&", "$", "this", "->", "tile", "!==", "null", ")", "{", "$", "has_message", "=", "$", "this...
Gets whether or not this tile view has any messages @return boolean true if this tile view has one or more messages and false if it does not.
[ "Gets", "whether", "or", "not", "this", "tile", "view", "has", "any", "messages" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTileView.php#L619-L627
34,204
silverorange/swat
Swat/SwatTileView.php
SwatTileView.getHtmlHeadEntrySet
public function getHtmlHeadEntrySet() { $set = parent::getHtmlHeadEntrySet(); if ($this->tile !== null) { $set->addEntrySet($this->tile->getHtmlHeadEntrySet()); } foreach ($this->groups as $group) { $set->addEntrySet($group->getHtmlHeadEntrySet()); }...
php
public function getHtmlHeadEntrySet() { $set = parent::getHtmlHeadEntrySet(); if ($this->tile !== null) { $set->addEntrySet($this->tile->getHtmlHeadEntrySet()); } foreach ($this->groups as $group) { $set->addEntrySet($group->getHtmlHeadEntrySet()); }...
[ "public", "function", "getHtmlHeadEntrySet", "(", ")", "{", "$", "set", "=", "parent", "::", "getHtmlHeadEntrySet", "(", ")", ";", "if", "(", "$", "this", "->", "tile", "!==", "null", ")", "{", "$", "set", "->", "addEntrySet", "(", "$", "this", "->", ...
Gets the SwatHtmlHeadEntry objects needed by this tile view @return SwatHtmlHeadEntrySet the SwatHtmlHeadEntry objects needed by this tile view. @see SwatUIObject::getHtmlHeadEntrySet()
[ "Gets", "the", "SwatHtmlHeadEntry", "objects", "needed", "by", "this", "tile", "view" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTileView.php#L640-L653
34,205
silverorange/swat
Swat/SwatTileView.php
SwatTileView.getAvailableHtmlHeadEntrySet
public function getAvailableHtmlHeadEntrySet() { $set = parent::getAvailableHtmlHeadEntrySet(); if ($this->tile !== null) { $set->addEntrySet($this->tile->getAvailableHtmlHeadEntrySet()); } foreach ($this->groups as $group) { $set->addEntrySet($group->getAva...
php
public function getAvailableHtmlHeadEntrySet() { $set = parent::getAvailableHtmlHeadEntrySet(); if ($this->tile !== null) { $set->addEntrySet($this->tile->getAvailableHtmlHeadEntrySet()); } foreach ($this->groups as $group) { $set->addEntrySet($group->getAva...
[ "public", "function", "getAvailableHtmlHeadEntrySet", "(", ")", "{", "$", "set", "=", "parent", "::", "getAvailableHtmlHeadEntrySet", "(", ")", ";", "if", "(", "$", "this", "->", "tile", "!==", "null", ")", "{", "$", "set", "->", "addEntrySet", "(", "$", ...
Gets the SwatHtmlHeadEntry objects that may be needed by this tile view @return SwatHtmlHeadEntrySet the SwatHtmlHeadEntry objects that may be needed by this tile view. @see SwatUIObject::getAvailableHtmlHeadEntrySet()
[ "Gets", "the", "SwatHtmlHeadEntry", "objects", "that", "may", "be", "needed", "by", "this", "tile", "view" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTileView.php#L666-L679
34,206
silverorange/swat
Swat/SwatTileView.php
SwatTileView.getInlineJavaScript
protected function getInlineJavaScript() { $javascript = sprintf( "var %s = new SwatTileView('%s');", $this->id, $this->id ); if ($this->tile !== null) { $tile_javascript = $this->tile->getRendererInlineJavaScript(); if ($tile_java...
php
protected function getInlineJavaScript() { $javascript = sprintf( "var %s = new SwatTileView('%s');", $this->id, $this->id ); if ($this->tile !== null) { $tile_javascript = $this->tile->getRendererInlineJavaScript(); if ($tile_java...
[ "protected", "function", "getInlineJavaScript", "(", ")", "{", "$", "javascript", "=", "sprintf", "(", "\"var %s = new SwatTileView('%s');\"", ",", "$", "this", "->", "id", ",", "$", "this", "->", "id", ")", ";", "if", "(", "$", "this", "->", "tile", "!=="...
Gets the inline JavaScript required for this tile view @return string the inline JavaScript required for this tile view. @see SwatTile::getInlineJavaScript()
[ "Gets", "the", "inline", "JavaScript", "required", "for", "this", "tile", "view" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTileView.php#L731-L766
34,207
silverorange/swat
Swat/SwatTileView.php
SwatTileView.showCheckAll
protected function showCheckAll() { if ( $this->getCheckboxCellRenderer() === null || $this->getFirstAncestor('SwatForm') === null ) { $show = false; } elseif ($this->show_check_all === null && count($this->model) > 1) { $show = true; }...
php
protected function showCheckAll() { if ( $this->getCheckboxCellRenderer() === null || $this->getFirstAncestor('SwatForm') === null ) { $show = false; } elseif ($this->show_check_all === null && count($this->model) > 1) { $show = true; }...
[ "protected", "function", "showCheckAll", "(", ")", "{", "if", "(", "$", "this", "->", "getCheckboxCellRenderer", "(", ")", "===", "null", "||", "$", "this", "->", "getFirstAncestor", "(", "'SwatForm'", ")", "===", "null", ")", "{", "$", "show", "=", "fal...
Whether or not a check-all widget is to be displayed for the tiles of this tile view This depends on the {@link SwatTileView::$show_check_all} property as well as whether or not this tile view contains a {@link SwatCheckboxCellRenderer} and whether or not this tile view contains enough tiles to warrent having a check-...
[ "Whether", "or", "not", "a", "check", "-", "all", "widget", "is", "to", "be", "displayed", "for", "the", "tiles", "of", "this", "tile", "view" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTileView.php#L799-L815
34,208
silverorange/swat
Swat/SwatTileView.php
SwatTileView.getCheckboxCellRenderer
protected function getCheckboxCellRenderer() { $checkbox_cell_renderer = null; foreach ($this->tile->getRenderers() as $renderer) { if ($renderer instanceof SwatCheckboxCellRenderer) { $checkbox_cell_renderer = $renderer; break; } } ...
php
protected function getCheckboxCellRenderer() { $checkbox_cell_renderer = null; foreach ($this->tile->getRenderers() as $renderer) { if ($renderer instanceof SwatCheckboxCellRenderer) { $checkbox_cell_renderer = $renderer; break; } } ...
[ "protected", "function", "getCheckboxCellRenderer", "(", ")", "{", "$", "checkbox_cell_renderer", "=", "null", ";", "foreach", "(", "$", "this", "->", "tile", "->", "getRenderers", "(", ")", "as", "$", "renderer", ")", "{", "if", "(", "$", "renderer", "ins...
Gets the first checkbox cell renderer in this tile view's tile @return SwatCheckboxCellRenderer the first checkbox cell renderer in this tile view's tile or null if no such cell renderer exists.
[ "Gets", "the", "first", "checkbox", "cell", "renderer", "in", "this", "tile", "view", "s", "tile" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTileView.php#L827-L839
34,209
silverorange/swat
Swat/SwatTileView.php
SwatTileView.setTile
public function setTile(SwatTile $tile) { // if we're overwriting an existing tile, remove it's parent link if ($this->tile !== null) { $this->tile->parent = null; } $this->tile = $tile; $tile->parent = $this; }
php
public function setTile(SwatTile $tile) { // if we're overwriting an existing tile, remove it's parent link if ($this->tile !== null) { $this->tile->parent = null; } $this->tile = $tile; $tile->parent = $this; }
[ "public", "function", "setTile", "(", "SwatTile", "$", "tile", ")", "{", "// if we're overwriting an existing tile, remove it's parent link", "if", "(", "$", "this", "->", "tile", "!==", "null", ")", "{", "$", "this", "->", "tile", "->", "parent", "=", "null", ...
Sets a tile of this tile view @param SwatTile $tile the tile to set
[ "Sets", "a", "tile", "of", "this", "tile", "view" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTileView.php#L878-L887
34,210
silverorange/swat
Swat/SwatTileView.php
SwatTileView.validateGroup
protected function validateGroup(SwatTileViewGroup $group) { // note: This works because the id property is set before children are // added to parents in SwatUI. if ($group->id !== null) { if (array_key_exists($group->id, $this->groups_by_id)) { throw new SwatDup...
php
protected function validateGroup(SwatTileViewGroup $group) { // note: This works because the id property is set before children are // added to parents in SwatUI. if ($group->id !== null) { if (array_key_exists($group->id, $this->groups_by_id)) { throw new SwatDup...
[ "protected", "function", "validateGroup", "(", "SwatTileViewGroup", "$", "group", ")", "{", "// note: This works because the id property is set before children are", "// added to parents in SwatUI.", "if", "(", "$", "group", "->", "id", "!==", "null", ")", "{", "if", "(",...
Ensures a group added to this tile-view is valid for this tile-view @param SwatTileViewGroup $group the group to check. @throws SwatDuplicateIdException if the group has the same id as a group already in this tile-view.
[ "Ensures", "a", "group", "added", "to", "this", "tile", "-", "view", "is", "valid", "for", "this", "tile", "-", "view" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTileView.php#L990-L1004
34,211
silverorange/swat
Swat/SwatRating.php
SwatRating.init
public function init() { parent::init(); $flydown = $this->getCompositeWidget('flydown'); $flydown->addOptionsByArray($this->getRatings()); }
php
public function init() { parent::init(); $flydown = $this->getCompositeWidget('flydown'); $flydown->addOptionsByArray($this->getRatings()); }
[ "public", "function", "init", "(", ")", "{", "parent", "::", "init", "(", ")", ";", "$", "flydown", "=", "$", "this", "->", "getCompositeWidget", "(", "'flydown'", ")", ";", "$", "flydown", "->", "addOptionsByArray", "(", "$", "this", "->", "getRatings",...
Initializes this rating control
[ "Initializes", "this", "rating", "control" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatRating.php#L56-L62
34,212
silverorange/swat
Swat/SwatRating.php
SwatRating.process
public function process() { parent::process(); $flydown = $this->getCompositeWidget('flydown'); if ($flydown->value == '') { $this->value = null; } else { $this->value = (int) $flydown->value; } }
php
public function process() { parent::process(); $flydown = $this->getCompositeWidget('flydown'); if ($flydown->value == '') { $this->value = null; } else { $this->value = (int) $flydown->value; } }
[ "public", "function", "process", "(", ")", "{", "parent", "::", "process", "(", ")", ";", "$", "flydown", "=", "$", "this", "->", "getCompositeWidget", "(", "'flydown'", ")", ";", "if", "(", "$", "flydown", "->", "value", "==", "''", ")", "{", "$", ...
Processes this rating control
[ "Processes", "this", "rating", "control" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatRating.php#L70-L80
34,213
silverorange/swat
Swat/SwatRating.php
SwatRating.display
public function display() { parent::display(); if (!$this->visible) { return; } $flydown = $this->getCompositeWidget('flydown'); $flydown->value = (string) $this->value; $div = new SwatHtmlTag('div'); $div->id = $this->id; $div->class = ...
php
public function display() { parent::display(); if (!$this->visible) { return; } $flydown = $this->getCompositeWidget('flydown'); $flydown->value = (string) $this->value; $div = new SwatHtmlTag('div'); $div->id = $this->id; $div->class = ...
[ "public", "function", "display", "(", ")", "{", "parent", "::", "display", "(", ")", ";", "if", "(", "!", "$", "this", "->", "visible", ")", "{", "return", ";", "}", "$", "flydown", "=", "$", "this", "->", "getCompositeWidget", "(", "'flydown'", ")",...
Displays this rating control
[ "Displays", "this", "rating", "control" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatRating.php#L88-L110
34,214
silverorange/swat
Swat/SwatRating.php
SwatRating.getInlineJavaScript
protected function getInlineJavaScript() { $quoted_string = SwatString::quoteJavaScriptString($this->id); return sprintf( 'var %s_obj = new SwatRating(%s, %s);', $this->id, $quoted_string, intval($this->maximum_value) ); }
php
protected function getInlineJavaScript() { $quoted_string = SwatString::quoteJavaScriptString($this->id); return sprintf( 'var %s_obj = new SwatRating(%s, %s);', $this->id, $quoted_string, intval($this->maximum_value) ); }
[ "protected", "function", "getInlineJavaScript", "(", ")", "{", "$", "quoted_string", "=", "SwatString", "::", "quoteJavaScriptString", "(", "$", "this", "->", "id", ")", ";", "return", "sprintf", "(", "'var %s_obj = new SwatRating(%s, %s);'", ",", "$", "this", "->...
Gets the inline JavaScript for this rating control @return string the inline JavaScript required for this rating control.
[ "Gets", "the", "inline", "JavaScript", "for", "this", "rating", "control" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatRating.php#L150-L159
34,215
silverorange/swat
Swat/SwatRating.php
SwatRating.createCompositeWidgets
protected function createCompositeWidgets() { $flydown = new SwatFlydown(); $flydown->id = $this->id . '_flydown'; $flydown->serialize_values = false; $this->addCompositeWidget($flydown, 'flydown'); }
php
protected function createCompositeWidgets() { $flydown = new SwatFlydown(); $flydown->id = $this->id . '_flydown'; $flydown->serialize_values = false; $this->addCompositeWidget($flydown, 'flydown'); }
[ "protected", "function", "createCompositeWidgets", "(", ")", "{", "$", "flydown", "=", "new", "SwatFlydown", "(", ")", ";", "$", "flydown", "->", "id", "=", "$", "this", "->", "id", ".", "'_flydown'", ";", "$", "flydown", "->", "serialize_values", "=", "...
Creates the composite flydown used by this rating control @see SwatWidget::createCompositeWidgets()
[ "Creates", "the", "composite", "flydown", "used", "by", "this", "rating", "control" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatRating.php#L169-L175
34,216
silverorange/swat
Swat/SwatForm.php
SwatForm.display
public function display() { if (!$this->visible) { return; } SwatWidget::display(); $this->addHiddenField(self::PROCESS_FIELD, $this->id); $form_tag = $this->getFormTag(); $form_tag->open(); $this->displayChildren(); $this->displayHidde...
php
public function display() { if (!$this->visible) { return; } SwatWidget::display(); $this->addHiddenField(self::PROCESS_FIELD, $this->id); $form_tag = $this->getFormTag(); $form_tag->open(); $this->displayChildren(); $this->displayHidde...
[ "public", "function", "display", "(", ")", "{", "if", "(", "!", "$", "this", "->", "visible", ")", "{", "return", ";", "}", "SwatWidget", "::", "display", "(", ")", ";", "$", "this", "->", "addHiddenField", "(", "self", "::", "PROCESS_FIELD", ",", "$...
Displays this form Outputs the HTML form tag and calls the display() method on each child widget of this form. Then, after all the child widgets are displayed, displays all hidden fields. This method also adds a hidden field called 'process' that is given the unique identifier of this form as a value.
[ "Displays", "this", "form" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatForm.php#L311-L336
34,217
silverorange/swat
Swat/SwatForm.php
SwatForm.process
public function process() { $this->processed = $this->isSubmitted(); if ($this->processed) { $this->processEncoding(); $this->processHiddenFields(); foreach ($this->children as $child) { if ($child !== null && !$child->isProcessed()) { ...
php
public function process() { $this->processed = $this->isSubmitted(); if ($this->processed) { $this->processEncoding(); $this->processHiddenFields(); foreach ($this->children as $child) { if ($child !== null && !$child->isProcessed()) { ...
[ "public", "function", "process", "(", ")", "{", "$", "this", "->", "processed", "=", "$", "this", "->", "isSubmitted", "(", ")", ";", "if", "(", "$", "this", "->", "processed", ")", "{", "$", "this", "->", "processEncoding", "(", ")", ";", "$", "th...
Processes this form If this form has been submitted then calls the process() method on each child widget. Then processes hidden form fields. This form is only marked as processed if it was submitted by the user. @return true if this form was actually submitted, false otherwise. @see SwatContainer::process()
[ "Processes", "this", "form" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatForm.php#L353-L367
34,218
silverorange/swat
Swat/SwatForm.php
SwatForm.getHiddenField
public function getHiddenField($name) { $data = null; if (isset($this->hidden_fields[$name])) { // Get value of a hidden field we've already unserialized after // processing this form. $data = $this->hidden_fields[$name]; } elseif (!$this->processed && $t...
php
public function getHiddenField($name) { $data = null; if (isset($this->hidden_fields[$name])) { // Get value of a hidden field we've already unserialized after // processing this form. $data = $this->hidden_fields[$name]; } elseif (!$this->processed && $t...
[ "public", "function", "getHiddenField", "(", "$", "name", ")", "{", "$", "data", "=", "null", ";", "if", "(", "isset", "(", "$", "this", "->", "hidden_fields", "[", "$", "name", "]", ")", ")", "{", "// Get value of a hidden field we've already unserialized aft...
Gets the value of a hidden form field @param string $name the name of the field whose value to get. @return mixed the value of the field. The type of the field is preserved from the call to {@link SwatForm::addHiddenField()}. If the field does not exist, null is returned. @throws SwatInvalidSerializedDataException i...
[ "Gets", "the", "value", "of", "a", "hidden", "form", "field" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatForm.php#L423-L444
34,219
silverorange/swat
Swat/SwatForm.php
SwatForm.addWithField
public function addWithField(SwatWidget $widget, $title) { $field = new SwatFormField(); $field->add($widget); $field->title = $title; $this->add($field); }
php
public function addWithField(SwatWidget $widget, $title) { $field = new SwatFormField(); $field->add($widget); $field->title = $title; $this->add($field); }
[ "public", "function", "addWithField", "(", "SwatWidget", "$", "widget", ",", "$", "title", ")", "{", "$", "field", "=", "new", "SwatFormField", "(", ")", ";", "$", "field", "->", "add", "(", "$", "widget", ")", ";", "$", "field", "->", "title", "=", ...
Adds a widget within a new SwatFormField This is a convenience method that does the following: - creates a new SwatFormField, - adds the widget as a child of the form field, - and then adds the SwatFormField to this form. @param SwatWidget $widget a reference to a widget to add. @param string $title the visible title...
[ "Adds", "a", "widget", "within", "a", "new", "SwatFormField" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatForm.php#L471-L477
34,220
silverorange/swat
Swat/SwatForm.php
SwatForm.&
public function &getFormData() { $data = null; switch ($this->method) { case self::METHOD_POST: $data = &$_POST; break; case self::METHOD_GET: $data = &$_GET; break; } return $data; }
php
public function &getFormData() { $data = null; switch ($this->method) { case self::METHOD_POST: $data = &$_POST; break; case self::METHOD_GET: $data = &$_GET; break; } return $data; }
[ "public", "function", "&", "getFormData", "(", ")", "{", "$", "data", "=", "null", ";", "switch", "(", "$", "this", "->", "method", ")", "{", "case", "self", "::", "METHOD_POST", ":", "$", "data", "=", "&", "$", "_POST", ";", "break", ";", "case", ...
Returns the super-global array with this form's data Returns a reference to the super-global array containing this form's data. The array is chosen based on this form's method. @return array a reference to the super-global array containing this form's data.
[ "Returns", "the", "super", "-", "global", "array", "with", "this", "form", "s", "data" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatForm.php#L491-L505
34,221
silverorange/swat
Swat/SwatForm.php
SwatForm.isSubmitted
public function isSubmitted() { $raw_data = $this->getFormData(); return isset($raw_data[self::PROCESS_FIELD]) && $raw_data[self::PROCESS_FIELD] == $this->id; }
php
public function isSubmitted() { $raw_data = $this->getFormData(); return isset($raw_data[self::PROCESS_FIELD]) && $raw_data[self::PROCESS_FIELD] == $this->id; }
[ "public", "function", "isSubmitted", "(", ")", "{", "$", "raw_data", "=", "$", "this", "->", "getFormData", "(", ")", ";", "return", "isset", "(", "$", "raw_data", "[", "self", "::", "PROCESS_FIELD", "]", ")", "&&", "$", "raw_data", "[", "self", "::", ...
Whether or not this form was submitted on the previous page request This method may be called before or after the SwatForm::process() method. and is thus sometimes more useful than SwatForm::isProcessed() which only returns a meaningful value after SwatForm::process() is called. @return boolean true if this form was ...
[ "Whether", "or", "not", "this", "form", "was", "submitted", "on", "the", "previous", "page", "request" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatForm.php#L520-L526
34,222
silverorange/swat
Swat/SwatForm.php
SwatForm.isAuthenticated
public function isAuthenticated() { /* * If this form was not submitted, consider it authenticated. Processing * should be safe on forms that were not submitted. */ if (!$this->isSubmitted()) { return true; } $raw_data = $this->getFormData(); ...
php
public function isAuthenticated() { /* * If this form was not submitted, consider it authenticated. Processing * should be safe on forms that were not submitted. */ if (!$this->isSubmitted()) { return true; } $raw_data = $this->getFormData(); ...
[ "public", "function", "isAuthenticated", "(", ")", "{", "/*\n * If this form was not submitted, consider it authenticated. Processing\n * should be safe on forms that were not submitted.\n */", "if", "(", "!", "$", "this", "->", "isSubmitted", "(", ")", ")", ...
Whether or not this form is authenticated This can be used to catch cross-site request forgeries if the {@link SwatForm::setAuthenticationToken()} method was previously called. If form authentication is used, processing should only be performed on authenticated forms. An unauthenticated form may be a malicious reques...
[ "Whether", "or", "not", "this", "form", "is", "authenticated" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatForm.php#L545-L571
34,223
silverorange/swat
Swat/SwatForm.php
SwatForm.processHiddenFields
protected function processHiddenFields() { $raw_data = $this->getFormData(); $serialized_field_name = self::HIDDEN_FIELD; if (isset($raw_data[$serialized_field_name])) { $fields = SwatString::signedUnserialize( $raw_data[$serialized_field_name], $...
php
protected function processHiddenFields() { $raw_data = $this->getFormData(); $serialized_field_name = self::HIDDEN_FIELD; if (isset($raw_data[$serialized_field_name])) { $fields = SwatString::signedUnserialize( $raw_data[$serialized_field_name], $...
[ "protected", "function", "processHiddenFields", "(", ")", "{", "$", "raw_data", "=", "$", "this", "->", "getFormData", "(", ")", ";", "$", "serialized_field_name", "=", "self", "::", "HIDDEN_FIELD", ";", "if", "(", "isset", "(", "$", "raw_data", "[", "$", ...
Checks submitted form data for hidden fields Checks submitted form data for hidden fields. If hidden fields are found, properly re-adds them to this form. @throws SwatInvalidSerializedDataException if the serialized form data does not match the signature data.
[ "Checks", "submitted", "form", "data", "for", "hidden", "fields" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatForm.php#L739-L761
34,224
silverorange/swat
Swat/SwatForm.php
SwatForm.processEncoding
protected function processEncoding() { $raw_data = &$this->getFormData(); if ( $this->_8bit_encoding !== null && isset($raw_data[self::ENCODING_FIELD]) ) { $value = $raw_data[self::ENCODING_FIELD]; if ($value === self::ENCODING_8BIT_VALUE) { ...
php
protected function processEncoding() { $raw_data = &$this->getFormData(); if ( $this->_8bit_encoding !== null && isset($raw_data[self::ENCODING_FIELD]) ) { $value = $raw_data[self::ENCODING_FIELD]; if ($value === self::ENCODING_8BIT_VALUE) { ...
[ "protected", "function", "processEncoding", "(", ")", "{", "$", "raw_data", "=", "&", "$", "this", "->", "getFormData", "(", ")", ";", "if", "(", "$", "this", "->", "_8bit_encoding", "!==", "null", "&&", "isset", "(", "$", "raw_data", "[", "self", "::"...
Detects 8-bit character encoding in form data and converts data to UTF-8 Conversion is only performed if this form's 8-bit encoding is set. This form's 8-bit encoding may be set automatically if the SwatForm default 8-bit encoding is set. This algorithm is adapted from a blog post at {@link http://blogs.sun.com/shank...
[ "Detects", "8", "-", "bit", "character", "encoding", "in", "form", "data", "and", "converts", "data", "to", "UTF", "-", "8" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatForm.php#L779-L848
34,225
silverorange/swat
Swat/SwatForm.php
SwatForm.displayHiddenFields
protected function displayHiddenFields() { $input_tag = new SwatHtmlTag('input'); $input_tag->type = 'hidden'; echo '<div class="swat-hidden">'; if ($this->_8bit_encoding !== null) { // The character encoding detection field is intentionally not using // Swa...
php
protected function displayHiddenFields() { $input_tag = new SwatHtmlTag('input'); $input_tag->type = 'hidden'; echo '<div class="swat-hidden">'; if ($this->_8bit_encoding !== null) { // The character encoding detection field is intentionally not using // Swa...
[ "protected", "function", "displayHiddenFields", "(", ")", "{", "$", "input_tag", "=", "new", "SwatHtmlTag", "(", "'input'", ")", ";", "$", "input_tag", "->", "type", "=", "'hidden'", ";", "echo", "'<div class=\"swat-hidden\">'", ";", "if", "(", "$", "this", ...
Displays hidden form fields Displays hiden form fields as <input type="hidden" /> XHTML elements. This method automatically handles array type values so they will be returned correctly as arrays. This methods also generates an array of hidden field names and passes them as hidden fields. If an authentication token i...
[ "Displays", "hidden", "form", "fields" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatForm.php#L896-L977
34,226
silverorange/swat
Swat/SwatForm.php
SwatForm.getFormTag
protected function getFormTag() { $form_tag = new SwatHtmlTag('form'); $form_tag->addAttributes(array( 'id' => $this->id, 'method' => $this->method, 'enctype' => $this->encoding_type, 'accept-charset' => $this->accept_charset, 'action' => ...
php
protected function getFormTag() { $form_tag = new SwatHtmlTag('form'); $form_tag->addAttributes(array( 'id' => $this->id, 'method' => $this->method, 'enctype' => $this->encoding_type, 'accept-charset' => $this->accept_charset, 'action' => ...
[ "protected", "function", "getFormTag", "(", ")", "{", "$", "form_tag", "=", "new", "SwatHtmlTag", "(", "'form'", ")", ";", "$", "form_tag", "->", "addAttributes", "(", "array", "(", "'id'", "=>", "$", "this", "->", "id", ",", "'method'", "=>", "$", "th...
Gets the XHTML form tag used to display this form @return SwatHtmlTag the XHTML form tag used to display this form.
[ "Gets", "the", "XHTML", "form", "tag", "used", "to", "display", "this", "form" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatForm.php#L987-L1005
34,227
silverorange/swat
Swat/SwatForm.php
SwatForm.getInlineJavaScript
protected function getInlineJavaScript() { $javascript = sprintf( "var %s_obj = new %s(%s, %s);", $this->id, $this->getJavaScriptClass(), SwatString::quoteJavaScriptString($this->id), SwatString::quoteJavaScriptString($this->connection_close_uri) ...
php
protected function getInlineJavaScript() { $javascript = sprintf( "var %s_obj = new %s(%s, %s);", $this->id, $this->getJavaScriptClass(), SwatString::quoteJavaScriptString($this->id), SwatString::quoteJavaScriptString($this->connection_close_uri) ...
[ "protected", "function", "getInlineJavaScript", "(", ")", "{", "$", "javascript", "=", "sprintf", "(", "\"var %s_obj = new %s(%s, %s);\"", ",", "$", "this", "->", "id", ",", "$", "this", "->", "getJavaScriptClass", "(", ")", ",", "SwatString", "::", "quoteJavaSc...
Gets inline JavaScript required for this form Right now, this JavaScript focuses the first SwatControl in the form. @return string inline JavaScript required for this form.
[ "Gets", "inline", "JavaScript", "required", "for", "this", "form" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatForm.php#L1032-L1072
34,228
silverorange/swat
Swat/SwatForm.php
SwatForm.serializeHiddenField
protected function serializeHiddenField($value) { $value = SwatString::signedSerialize($value, $this->salt); // escape special characters that confuse browsers (mostly IE; // null characters confuse all browsers) $value = str_replace('\\', '\\\\', $value); $value = str_repla...
php
protected function serializeHiddenField($value) { $value = SwatString::signedSerialize($value, $this->salt); // escape special characters that confuse browsers (mostly IE; // null characters confuse all browsers) $value = str_replace('\\', '\\\\', $value); $value = str_repla...
[ "protected", "function", "serializeHiddenField", "(", "$", "value", ")", "{", "$", "value", "=", "SwatString", "::", "signedSerialize", "(", "$", "value", ",", "$", "this", "->", "salt", ")", ";", "// escape special characters that confuse browsers (mostly IE;", "//...
Serializes a hidden field value into a string safe for including in form data @param mixed $value the hidden field value to serialize. @return string the hidden field value serialized for safely including in form data.
[ "Serializes", "a", "hidden", "field", "value", "into", "a", "string", "safe", "for", "including", "in", "form", "data" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatForm.php#L1103-L1115
34,229
brainworxx/kreXX
src/Krexx.php
Krexx.timerMoment
public static function timerMoment($string) { Pool::createPool(); // Disabled? // We do not use the config settings here, because we do not have any // output whatsoever. The config settings are either on or off, during // the entire run, meaning the can not be changed (by n...
php
public static function timerMoment($string) { Pool::createPool(); // Disabled? // We do not use the config settings here, because we do not have any // output whatsoever. The config settings are either on or off, during // the entire run, meaning the can not be changed (by n...
[ "public", "static", "function", "timerMoment", "(", "$", "string", ")", "{", "Pool", "::", "createPool", "(", ")", ";", "// Disabled?", "// We do not use the config settings here, because we do not have any", "// output whatsoever. The config settings are either on or off, during",...
Takes a "moment". @api @param string $string Defines a "moment" during a benchmark test. The string should be something meaningful, like "Model invoice db call".
[ "Takes", "a", "moment", "." ]
a03beaa4507ffb391412b9ac61593d263d3f8bca
https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/Krexx.php#L98-L121
34,230
brainworxx/kreXX
src/Krexx.php
Krexx.timerEnd
public static function timerEnd() { Pool::createPool(); // Disabled ? if (static::$pool->config->getSetting(Fallback::SETTING_DISABLED) || AbstractController::$analysisInProgress || Config::$disabledByPhp ) { return; } AbstractCon...
php
public static function timerEnd() { Pool::createPool(); // Disabled ? if (static::$pool->config->getSetting(Fallback::SETTING_DISABLED) || AbstractController::$analysisInProgress || Config::$disabledByPhp ) { return; } AbstractCon...
[ "public", "static", "function", "timerEnd", "(", ")", "{", "Pool", "::", "createPool", "(", ")", ";", "// Disabled ?", "if", "(", "static", "::", "$", "pool", "->", "config", "->", "getSetting", "(", "Fallback", "::", "SETTING_DISABLED", ")", "||", "Abstra...
Takes a "moment" and outputs the timer. @api
[ "Takes", "a", "moment", "and", "outputs", "the", "timer", "." ]
a03beaa4507ffb391412b9ac61593d263d3f8bca
https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/Krexx.php#L128-L148
34,231
brainworxx/kreXX
src/Krexx.php
Krexx.open
public static function open($data = null) { Pool::createPool(); // Disabled? if (static::$pool->config->getSetting(Fallback::SETTING_DISABLED) || AbstractController::$analysisInProgress || Config::$disabledByPhp ) { return $data; } ...
php
public static function open($data = null) { Pool::createPool(); // Disabled? if (static::$pool->config->getSetting(Fallback::SETTING_DISABLED) || AbstractController::$analysisInProgress || Config::$disabledByPhp ) { return $data; } ...
[ "public", "static", "function", "open", "(", "$", "data", "=", "null", ")", "{", "Pool", "::", "createPool", "(", ")", ";", "// Disabled?", "if", "(", "static", "::", "$", "pool", "->", "config", "->", "getSetting", "(", "Fallback", "::", "SETTING_DISABL...
Starts the analysis of a variable. @api @param mixed $data The variable we want to analyse. @return mixed Return the original anslysis value.
[ "Starts", "the", "analysis", "of", "a", "variable", "." ]
a03beaa4507ffb391412b9ac61593d263d3f8bca
https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/Krexx.php#L161-L183
34,232
brainworxx/kreXX
src/Krexx.php
Krexx.backtrace
public static function backtrace(array $backtrace = null) { Pool::createPool(); // Disabled? if (static::$pool->config->getSetting(Fallback::SETTING_DISABLED) || AbstractController::$analysisInProgress || Config::$disabledByPhp ) { return; ...
php
public static function backtrace(array $backtrace = null) { Pool::createPool(); // Disabled? if (static::$pool->config->getSetting(Fallback::SETTING_DISABLED) || AbstractController::$analysisInProgress || Config::$disabledByPhp ) { return; ...
[ "public", "static", "function", "backtrace", "(", "array", "$", "backtrace", "=", "null", ")", "{", "Pool", "::", "createPool", "(", ")", ";", "// Disabled?", "if", "(", "static", "::", "$", "pool", "->", "config", "->", "getSetting", "(", "Fallback", ":...
Prints a debug backtrace. When there are classes found inside the backtrace, they will be analysed. @param array|null $backtrace An already existing backtrace. @api
[ "Prints", "a", "debug", "backtrace", "." ]
a03beaa4507ffb391412b9ac61593d263d3f8bca
https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/Krexx.php#L196-L216
34,233
brainworxx/kreXX
src/Krexx.php
Krexx.disable
public static function disable() { Pool::createPool(); static::$pool->config->setDisabled(true); static::$pool->createClass('Brainworxx\\Krexx\\Controller\\DumpController') ->noFatalForKrexx(); Config::$disabledByPhp = true; }
php
public static function disable() { Pool::createPool(); static::$pool->config->setDisabled(true); static::$pool->createClass('Brainworxx\\Krexx\\Controller\\DumpController') ->noFatalForKrexx(); Config::$disabledByPhp = true; }
[ "public", "static", "function", "disable", "(", ")", "{", "Pool", "::", "createPool", "(", ")", ";", "static", "::", "$", "pool", "->", "config", "->", "setDisabled", "(", "true", ")", ";", "static", "::", "$", "pool", "->", "createClass", "(", "'Brain...
Disable kreXX. @api
[ "Disable", "kreXX", "." ]
a03beaa4507ffb391412b9ac61593d263d3f8bca
https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/Krexx.php#L223-L232
34,234
brainworxx/kreXX
src/Krexx.php
Krexx.editSettings
public static function editSettings() { Pool::createPool(); // Disabled? // We are ignoring local settings here. if (static::$pool->config->getSetting(Fallback::SETTING_DISABLED) || Config::$disabledByPhp ) { return; } static::$pool-...
php
public static function editSettings() { Pool::createPool(); // Disabled? // We are ignoring local settings here. if (static::$pool->config->getSetting(Fallback::SETTING_DISABLED) || Config::$disabledByPhp ) { return; } static::$pool-...
[ "public", "static", "function", "editSettings", "(", ")", "{", "Pool", "::", "createPool", "(", ")", ";", "// Disabled?", "// We are ignoring local settings here.", "if", "(", "static", "::", "$", "pool", "->", "config", "->", "getSetting", "(", "Fallback", "::"...
Displays the edit settings part, no analysis. Ignores the 'disabled' settings in the cookie. @api
[ "Displays", "the", "edit", "settings", "part", "no", "analysis", "." ]
a03beaa4507ffb391412b9ac61593d263d3f8bca
https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/Krexx.php#L241-L257
34,235
brainworxx/kreXX
src/Krexx.php
Krexx.registerFatal
public static function registerFatal() { Pool::createPool(); // Disabled? if (static::$pool->config->getSetting(Fallback::SETTING_DISABLED) || Config::$disabledByPhp ) { return; } // Wrong PHP version? if (version_compare(phpversion()...
php
public static function registerFatal() { Pool::createPool(); // Disabled? if (static::$pool->config->getSetting(Fallback::SETTING_DISABLED) || Config::$disabledByPhp ) { return; } // Wrong PHP version? if (version_compare(phpversion()...
[ "public", "static", "function", "registerFatal", "(", ")", "{", "Pool", "::", "createPool", "(", ")", ";", "// Disabled?", "if", "(", "static", "::", "$", "pool", "->", "config", "->", "getSetting", "(", "Fallback", "::", "SETTING_DISABLED", ")", "||", "Co...
Registers a shutdown function. Our fatal errorhandler is located there. @api
[ "Registers", "a", "shutdown", "function", "." ]
a03beaa4507ffb391412b9ac61593d263d3f8bca
https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/Krexx.php#L266-L288
34,236
brainworxx/kreXX
src/Krexx.php
Krexx.unregisterFatal
public static function unregisterFatal() { Pool::createPool(); // Disabled? if (static::$pool->config->getSetting(Fallback::SETTING_DISABLED) || Config::$disabledByPhp ) { return; } static::$pool->createClass('Brainworxx\\Krexx\\Controller\\E...
php
public static function unregisterFatal() { Pool::createPool(); // Disabled? if (static::$pool->config->getSetting(Fallback::SETTING_DISABLED) || Config::$disabledByPhp ) { return; } static::$pool->createClass('Brainworxx\\Krexx\\Controller\\E...
[ "public", "static", "function", "unregisterFatal", "(", ")", "{", "Pool", "::", "createPool", "(", ")", ";", "// Disabled?", "if", "(", "static", "::", "$", "pool", "->", "config", "->", "getSetting", "(", "Fallback", "::", "SETTING_DISABLED", ")", "||", "...
Tells the registered shutdown function to do nothing. We can not unregister a once declared shutdown function, so we need to tell our errorhandler to do nothing, in case there is a fatal. @api
[ "Tells", "the", "registered", "shutdown", "function", "to", "do", "nothing", "." ]
a03beaa4507ffb391412b9ac61593d263d3f8bca
https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/Krexx.php#L299-L312
34,237
brainworxx/kreXX
src/Krexx.php
Krexx.startForcedLog
protected static function startForcedLog() { Pool::createPool(); // Output destination: file static::$pool->config ->settings[Fallback::SETTING_DESTINATION] ->setSource('forced logging') ->setValue(Fallback::VALUE_FILE); // Do not care about ajax...
php
protected static function startForcedLog() { Pool::createPool(); // Output destination: file static::$pool->config ->settings[Fallback::SETTING_DESTINATION] ->setSource('forced logging') ->setValue(Fallback::VALUE_FILE); // Do not care about ajax...
[ "protected", "static", "function", "startForcedLog", "(", ")", "{", "Pool", "::", "createPool", "(", ")", ";", "// Output destination: file", "static", "::", "$", "pool", "->", "config", "->", "settings", "[", "Fallback", "::", "SETTING_DESTINATION", "]", "->", ...
Configure everything to start the forced logging.
[ "Configure", "everything", "to", "start", "the", "forced", "logging", "." ]
a03beaa4507ffb391412b9ac61593d263d3f8bca
https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/Krexx.php#L367-L386
34,238
joomlatools/joomlatools-framework-activities
view/activities/json.php
ComActivitiesViewActivitiesJson._getEntity
protected function _getEntity(KModelEntityInterface $entity) { if ($this->_layout == 'stream') { $activity = $entity; $renderer = $this->getRenderer(); $item = array( 'id' => $activity->getActivityId(), 'title' => $rende...
php
protected function _getEntity(KModelEntityInterface $entity) { if ($this->_layout == 'stream') { $activity = $entity; $renderer = $this->getRenderer(); $item = array( 'id' => $activity->getActivityId(), 'title' => $rende...
[ "protected", "function", "_getEntity", "(", "KModelEntityInterface", "$", "entity", ")", "{", "if", "(", "$", "this", "->", "_layout", "==", "'stream'", ")", "{", "$", "activity", "=", "$", "entity", ";", "$", "renderer", "=", "$", "this", "->", "getRend...
Get the entity data @link http://activitystrea.ms/specs/json/1.0/#json See JSON serialization. @param KModelEntityInterface $entity The model entity. @return array The array with data to be encoded to JSON.
[ "Get", "the", "entity", "data" ]
701abf6186729f62643bc834055cdebc08c25c21
https://github.com/joomlatools/joomlatools-framework-activities/blob/701abf6186729f62643bc834055cdebc08c25c21/view/activities/json.php#L75-L118
34,239
joomlatools/joomlatools-framework-activities
view/activities/json.php
ComActivitiesViewActivitiesJson.getRenderer
public function getRenderer() { if (!$this->_renderer instanceof KTemplateHelperInterface) { // Make sure we have an identifier if(!($this->_renderer instanceof KObjectIdentifier)) { $this->setRenderer($this->_renderer); } $this->_rend...
php
public function getRenderer() { if (!$this->_renderer instanceof KTemplateHelperInterface) { // Make sure we have an identifier if(!($this->_renderer instanceof KObjectIdentifier)) { $this->setRenderer($this->_renderer); } $this->_rend...
[ "public", "function", "getRenderer", "(", ")", "{", "if", "(", "!", "$", "this", "->", "_renderer", "instanceof", "KTemplateHelperInterface", ")", "{", "// Make sure we have an identifier", "if", "(", "!", "(", "$", "this", "->", "_renderer", "instanceof", "KObj...
Get the activity renderer. @throws UnexpectedValueException if renderer has the wrong type. @return ComActivitiesActivityRendererInterface The activity renderer.
[ "Get", "the", "activity", "renderer", "." ]
701abf6186729f62643bc834055cdebc08c25c21
https://github.com/joomlatools/joomlatools-framework-activities/blob/701abf6186729f62643bc834055cdebc08c25c21/view/activities/json.php#L126-L148
34,240
joomlatools/joomlatools-framework-activities
view/activities/json.php
ComActivitiesViewActivitiesJson.setRenderer
public function setRenderer($renderer) { if(!$renderer instanceof ComActivitiesActivityRendererInterface) { if(is_string($renderer) && strpos($renderer, '.') === false ) { $identifier = $this->getIdentifier()->toArray(); $identifier['pa...
php
public function setRenderer($renderer) { if(!$renderer instanceof ComActivitiesActivityRendererInterface) { if(is_string($renderer) && strpos($renderer, '.') === false ) { $identifier = $this->getIdentifier()->toArray(); $identifier['pa...
[ "public", "function", "setRenderer", "(", "$", "renderer", ")", "{", "if", "(", "!", "$", "renderer", "instanceof", "ComActivitiesActivityRendererInterface", ")", "{", "if", "(", "is_string", "(", "$", "renderer", ")", "&&", "strpos", "(", "$", "renderer", "...
Set the activity renderer. @param mixed $renderer An activity renderer instance, identifier object or string. @return ComActivitiesViewActivitiesJson
[ "Set", "the", "activity", "renderer", "." ]
701abf6186729f62643bc834055cdebc08c25c21
https://github.com/joomlatools/joomlatools-framework-activities/blob/701abf6186729f62643bc834055cdebc08c25c21/view/activities/json.php#L156-L176
34,241
joomlatools/joomlatools-framework-activities
view/activities/json.php
ComActivitiesViewActivitiesJson._getObjectData
protected function _getObjectData(ComActivitiesActivityObjectInterface $object) { $data = $object->toArray(); // Make sure we get fully qualified URLs. if ($url = $object->getUrl()) { $data['url'] = $this->_getUrl($url); } $attachments = array(); // Han...
php
protected function _getObjectData(ComActivitiesActivityObjectInterface $object) { $data = $object->toArray(); // Make sure we get fully qualified URLs. if ($url = $object->getUrl()) { $data['url'] = $this->_getUrl($url); } $attachments = array(); // Han...
[ "protected", "function", "_getObjectData", "(", "ComActivitiesActivityObjectInterface", "$", "object", ")", "{", "$", "data", "=", "$", "object", "->", "toArray", "(", ")", ";", "// Make sure we get fully qualified URLs.", "if", "(", "$", "url", "=", "$", "object"...
Activity object data getter. @param ComActivitiesActivityObjectInterface $object The activity object. @return array The object data.
[ "Activity", "object", "data", "getter", "." ]
701abf6186729f62643bc834055cdebc08c25c21
https://github.com/joomlatools/joomlatools-framework-activities/blob/701abf6186729f62643bc834055cdebc08c25c21/view/activities/json.php#L184-L224
34,242
joomlatools/joomlatools-framework-activities
view/activities/json.php
ComActivitiesViewActivitiesJson._getMedialinkData
protected function _getMedialinkData(ComActivitiesActivityMedialinkInterface $medialink) { $data = $medialink->toArray(); $data['url'] = $this->_getUrl($medialink->getUrl()); return $this->_cleanupData($data); }
php
protected function _getMedialinkData(ComActivitiesActivityMedialinkInterface $medialink) { $data = $medialink->toArray(); $data['url'] = $this->_getUrl($medialink->getUrl()); return $this->_cleanupData($data); }
[ "protected", "function", "_getMedialinkData", "(", "ComActivitiesActivityMedialinkInterface", "$", "medialink", ")", "{", "$", "data", "=", "$", "medialink", "->", "toArray", "(", ")", ";", "$", "data", "[", "'url'", "]", "=", "$", "this", "->", "_getUrl", "...
Activity medialink data getter. @param ComActivitiesActivityMedialinkInterface $medialink The medialink object. @return array The object data.
[ "Activity", "medialink", "data", "getter", "." ]
701abf6186729f62643bc834055cdebc08c25c21
https://github.com/joomlatools/joomlatools-framework-activities/blob/701abf6186729f62643bc834055cdebc08c25c21/view/activities/json.php#L232-L239
34,243
joomlatools/joomlatools-framework-activities
view/activities/json.php
ComActivitiesViewActivitiesJson._cleanupData
protected function _cleanupData(array $data = array()) { $clean = array(); foreach ($data as $key => $value) { if (!empty($value)) { $clean[$key] = $value; } } return $clean; }
php
protected function _cleanupData(array $data = array()) { $clean = array(); foreach ($data as $key => $value) { if (!empty($value)) { $clean[$key] = $value; } } return $clean; }
[ "protected", "function", "_cleanupData", "(", "array", "$", "data", "=", "array", "(", ")", ")", "{", "$", "clean", "=", "array", "(", ")", ";", "foreach", "(", "$", "data", "as", "$", "key", "=>", "$", "value", ")", "{", "if", "(", "!", "empty",...
Removes entries with empty values. @param array $data The data to cleanup. @return array The cleaned up data.
[ "Removes", "entries", "with", "empty", "values", "." ]
701abf6186729f62643bc834055cdebc08c25c21
https://github.com/joomlatools/joomlatools-framework-activities/blob/701abf6186729f62643bc834055cdebc08c25c21/view/activities/json.php#L247-L259
34,244
joomlatools/joomlatools-framework-activities
view/activities/json.php
ComActivitiesViewActivitiesJson._getUrl
protected function _getUrl(KHttpUrlInterface $url) { if (!$url->getHost() && !$url->getScheme()) { $url->setUrl($this->getUrl()->toString(KHttpUrl::AUTHORITY)); } return $url->toString(KHttpUrl::FULL, false); }
php
protected function _getUrl(KHttpUrlInterface $url) { if (!$url->getHost() && !$url->getScheme()) { $url->setUrl($this->getUrl()->toString(KHttpUrl::AUTHORITY)); } return $url->toString(KHttpUrl::FULL, false); }
[ "protected", "function", "_getUrl", "(", "KHttpUrlInterface", "$", "url", ")", "{", "if", "(", "!", "$", "url", "->", "getHost", "(", ")", "&&", "!", "$", "url", "->", "getScheme", "(", ")", ")", "{", "$", "url", "->", "setUrl", "(", "$", "this", ...
URL getter. Provides a fully qualified and un-escaped URL provided a URL object. @param KHttpUrlInterface $url The URL. @return string The fully qualified un-escaped URL.
[ "URL", "getter", "." ]
701abf6186729f62643bc834055cdebc08c25c21
https://github.com/joomlatools/joomlatools-framework-activities/blob/701abf6186729f62643bc834055cdebc08c25c21/view/activities/json.php#L269-L276
34,245
joomlatools/joomlatools-framework-activities
activity/object/object.php
ComActivitiesActivityObject.setObjectName
public function setObjectName($name) { if (!is_null($name)) { $name = (string) $name; } $this->objectName = $name; return $this; }
php
public function setObjectName($name) { if (!is_null($name)) { $name = (string) $name; } $this->objectName = $name; return $this; }
[ "public", "function", "setObjectName", "(", "$", "name", ")", "{", "if", "(", "!", "is_null", "(", "$", "name", ")", ")", "{", "$", "name", "=", "(", "string", ")", "$", "name", ";", "}", "$", "this", "->", "objectName", "=", "$", "name", ";", ...
Set the activity object name. @see ComActivitiesActivityObject::getObjectName @param string|null $name The activity object name. @return ComActivitiesActivityObject
[ "Set", "the", "activity", "object", "name", "." ]
701abf6186729f62643bc834055cdebc08c25c21
https://github.com/joomlatools/joomlatools-framework-activities/blob/701abf6186729f62643bc834055cdebc08c25c21/activity/object/object.php#L58-L66
34,246
joomlatools/joomlatools-framework-activities
activity/object/object.php
ComActivitiesActivityObject.setDisplayName
public function setDisplayName($name) { if (!is_null($name)) { $name = (string) $name; } $this->displayName = $name; return $this; }
php
public function setDisplayName($name) { if (!is_null($name)) { $name = (string) $name; } $this->displayName = $name; return $this; }
[ "public", "function", "setDisplayName", "(", "$", "name", ")", "{", "if", "(", "!", "is_null", "(", "$", "name", ")", ")", "{", "$", "name", "=", "(", "string", ")", "$", "name", ";", "}", "$", "this", "->", "displayName", "=", "$", "name", ";", ...
Set the display name. @link http://activitystrea.ms/specs/json/1.0/#object See displayName property. @param string|null $name The display name. @return ComActivitiesActivityObject
[ "Set", "the", "display", "name", "." ]
701abf6186729f62643bc834055cdebc08c25c21
https://github.com/joomlatools/joomlatools-framework-activities/blob/701abf6186729f62643bc834055cdebc08c25c21/activity/object/object.php#L88-L96
34,247
joomlatools/joomlatools-framework-activities
activity/object/object.php
ComActivitiesActivityObject.setAttachments
public function setAttachments(array $attachments, $merge = true) { if ($merge) { $this->attachments = array_merge($this->attachments, $attachments); } else { $this->attachments = $attachments; } return $this; }
php
public function setAttachments(array $attachments, $merge = true) { if ($merge) { $this->attachments = array_merge($this->attachments, $attachments); } else { $this->attachments = $attachments; } return $this; }
[ "public", "function", "setAttachments", "(", "array", "$", "attachments", ",", "$", "merge", "=", "true", ")", "{", "if", "(", "$", "merge", ")", "{", "$", "this", "->", "attachments", "=", "array_merge", "(", "$", "this", "->", "attachments", ",", "$"...
Set the attachments. @link http://activitystrea.ms/specs/json/1.0/#object See attachments property. @param array $attachments An array of {@link ComActivitiesActivityObjectInterface} objects. @param bool $merge Tells if attachments should be replaced or merged with current existing attachments. @return ComAct...
[ "Set", "the", "attachments", "." ]
701abf6186729f62643bc834055cdebc08c25c21
https://github.com/joomlatools/joomlatools-framework-activities/blob/701abf6186729f62643bc834055cdebc08c25c21/activity/object/object.php#L120-L129
34,248
joomlatools/joomlatools-framework-activities
activity/object/object.php
ComActivitiesActivityObject.setAuthor
public function setAuthor($author) { if (!is_null($author) && !$author instanceof ComActivitiesActivityObjectInterface) { throw new InvalidArgumentException('Invalid author type.'); } $this->author = $author; return $this; }
php
public function setAuthor($author) { if (!is_null($author) && !$author instanceof ComActivitiesActivityObjectInterface) { throw new InvalidArgumentException('Invalid author type.'); } $this->author = $author; return $this; }
[ "public", "function", "setAuthor", "(", "$", "author", ")", "{", "if", "(", "!", "is_null", "(", "$", "author", ")", "&&", "!", "$", "author", "instanceof", "ComActivitiesActivityObjectInterface", ")", "{", "throw", "new", "InvalidArgumentException", "(", "'In...
Set the author. @link http://activitystrea.ms/specs/json/1.0/#object See author property. @param ComActivitiesActivityObjectInterface|null $author The author. @return ComActivitiesActivityObject
[ "Set", "the", "author", "." ]
701abf6186729f62643bc834055cdebc08c25c21
https://github.com/joomlatools/joomlatools-framework-activities/blob/701abf6186729f62643bc834055cdebc08c25c21/activity/object/object.php#L151-L159
34,249
joomlatools/joomlatools-framework-activities
activity/object/object.php
ComActivitiesActivityObject.setContent
public function setContent($content) { if (!is_null($content)) { $content = (string) $content; } $this->content = $content; return $this; }
php
public function setContent($content) { if (!is_null($content)) { $content = (string) $content; } $this->content = $content; return $this; }
[ "public", "function", "setContent", "(", "$", "content", ")", "{", "if", "(", "!", "is_null", "(", "$", "content", ")", ")", "{", "$", "content", "=", "(", "string", ")", "$", "content", ";", "}", "$", "this", "->", "content", "=", "$", "content", ...
Set the content. @link http://activitystrea.ms/specs/json/1.0/#object See content property. @param string $content The content. @return ComActivitiesActivityObject
[ "Set", "the", "content", "." ]
701abf6186729f62643bc834055cdebc08c25c21
https://github.com/joomlatools/joomlatools-framework-activities/blob/701abf6186729f62643bc834055cdebc08c25c21/activity/object/object.php#L181-L189
34,250
joomlatools/joomlatools-framework-activities
activity/object/object.php
ComActivitiesActivityObject.setDownstreamDuplicates
public function setDownstreamDuplicates(array $duplicates, $merge = true) { if ($merge) { $this->downstreamDuplicates = array_merge($this->downstreamDuplicates, $duplicates); } else { $this->downstreamDuplicates = $duplicates; } return $this; }
php
public function setDownstreamDuplicates(array $duplicates, $merge = true) { if ($merge) { $this->downstreamDuplicates = array_merge($this->downstreamDuplicates, $duplicates); } else { $this->downstreamDuplicates = $duplicates; } return $this; }
[ "public", "function", "setDownstreamDuplicates", "(", "array", "$", "duplicates", ",", "$", "merge", "=", "true", ")", "{", "if", "(", "$", "merge", ")", "{", "$", "this", "->", "downstreamDuplicates", "=", "array_merge", "(", "$", "this", "->", "downstrea...
Set the downstream duplicates. @link http://activitystrea.ms/specs/json/1.0/#object See downstreamDuplicates property. @param array $duplicates An array of {@link ComActivitiesActivityObjectInterface} objects. @param bool $merge Tells if downstream duplicates should be replaced or merged with current existing d...
[ "Set", "the", "downstream", "duplicates", "." ]
701abf6186729f62643bc834055cdebc08c25c21
https://github.com/joomlatools/joomlatools-framework-activities/blob/701abf6186729f62643bc834055cdebc08c25c21/activity/object/object.php#L213-L222
34,251
joomlatools/joomlatools-framework-activities
activity/object/object.php
ComActivitiesActivityObject.setId
public function setId($id) { if (!is_null($id)) { $id = (string) $id; } $this->id = $id; return $this; }
php
public function setId($id) { if (!is_null($id)) { $id = (string) $id; } $this->id = $id; return $this; }
[ "public", "function", "setId", "(", "$", "id", ")", "{", "if", "(", "!", "is_null", "(", "$", "id", ")", ")", "{", "$", "id", "=", "(", "string", ")", "$", "id", ";", "}", "$", "this", "->", "id", "=", "$", "id", ";", "return", "$", "this",...
Set the Id. @link http://activitystrea.ms/specs/json/1.0/#object See id property. @param string|null $id The Id. @return ComActivitiesActivityObject
[ "Set", "the", "Id", "." ]
701abf6186729f62643bc834055cdebc08c25c21
https://github.com/joomlatools/joomlatools-framework-activities/blob/701abf6186729f62643bc834055cdebc08c25c21/activity/object/object.php#L244-L252
34,252
joomlatools/joomlatools-framework-activities
activity/object/object.php
ComActivitiesActivityObject.setUuid
public function setUuid($uuid) { if (!is_null($uuid)) { $uuid = (string) $uuid; } $this->uuid = $uuid; return $this; }
php
public function setUuid($uuid) { if (!is_null($uuid)) { $uuid = (string) $uuid; } $this->uuid = $uuid; return $this; }
[ "public", "function", "setUuid", "(", "$", "uuid", ")", "{", "if", "(", "!", "is_null", "(", "$", "uuid", ")", ")", "{", "$", "uuid", "=", "(", "string", ")", "$", "uuid", ";", "}", "$", "this", "->", "uuid", "=", "$", "uuid", ";", "return", ...
Set the Universally Unique Identifier. @param string|null $uuid The Universally Unique Identifier. @return ComActivitiesActivityObjectInterface
[ "Set", "the", "Universally", "Unique", "Identifier", "." ]
701abf6186729f62643bc834055cdebc08c25c21
https://github.com/joomlatools/joomlatools-framework-activities/blob/701abf6186729f62643bc834055cdebc08c25c21/activity/object/object.php#L271-L279
34,253
joomlatools/joomlatools-framework-activities
activity/object/object.php
ComActivitiesActivityObject.setImage
public function setImage($image) { if (!is_null($image) && !$image instanceof ComActivitiesActivityMedialinkInterface) { throw new InvalidArgumentException('Invalid image type.'); } $this->image = $image; return $this; }
php
public function setImage($image) { if (!is_null($image) && !$image instanceof ComActivitiesActivityMedialinkInterface) { throw new InvalidArgumentException('Invalid image type.'); } $this->image = $image; return $this; }
[ "public", "function", "setImage", "(", "$", "image", ")", "{", "if", "(", "!", "is_null", "(", "$", "image", ")", "&&", "!", "$", "image", "instanceof", "ComActivitiesActivityMedialinkInterface", ")", "{", "throw", "new", "InvalidArgumentException", "(", "'Inv...
Set the image. @link http://activitystrea.ms/specs/json/1.0/#object See image property. @param ComActivitiesActivityMedialinkInterface|null $image The image. @return ComActivitiesActivityObject
[ "Set", "the", "image", "." ]
701abf6186729f62643bc834055cdebc08c25c21
https://github.com/joomlatools/joomlatools-framework-activities/blob/701abf6186729f62643bc834055cdebc08c25c21/activity/object/object.php#L303-L311
34,254
joomlatools/joomlatools-framework-activities
activity/object/object.php
ComActivitiesActivityObject.setPublished
public function setPublished($date) { if (!is_null($date) && !$date instanceof KDate) { throw new InvalidArgumentException('Invalid date type.'); } $this->published = $date; return $this; }
php
public function setPublished($date) { if (!is_null($date) && !$date instanceof KDate) { throw new InvalidArgumentException('Invalid date type.'); } $this->published = $date; return $this; }
[ "public", "function", "setPublished", "(", "$", "date", ")", "{", "if", "(", "!", "is_null", "(", "$", "date", ")", "&&", "!", "$", "date", "instanceof", "KDate", ")", "{", "throw", "new", "InvalidArgumentException", "(", "'Invalid date type.'", ")", ";", ...
Set the published date. @link http://activitystrea.ms/specs/json/1.0/#object See published property. @param KDate $date The published date. @return ComActivitiesActivityObject
[ "Set", "the", "published", "date", "." ]
701abf6186729f62643bc834055cdebc08c25c21
https://github.com/joomlatools/joomlatools-framework-activities/blob/701abf6186729f62643bc834055cdebc08c25c21/activity/object/object.php#L363-L371
34,255
joomlatools/joomlatools-framework-activities
activity/object/object.php
ComActivitiesActivityObject.setSummary
public function setSummary($summary) { if (!is_null($summary)) { $summary = (string) $summary; } $this->summary = $summary; return $this; }
php
public function setSummary($summary) { if (!is_null($summary)) { $summary = (string) $summary; } $this->summary = $summary; return $this; }
[ "public", "function", "setSummary", "(", "$", "summary", ")", "{", "if", "(", "!", "is_null", "(", "$", "summary", ")", ")", "{", "$", "summary", "=", "(", "string", ")", "$", "summary", ";", "}", "$", "this", "->", "summary", "=", "$", "summary", ...
Set the summary. @link http://activitystrea.ms/specs/json/1.0/#object See summary property. @param mixed $summary The summary. @return ComActivitiesActivityObject
[ "Set", "the", "summary", "." ]
701abf6186729f62643bc834055cdebc08c25c21
https://github.com/joomlatools/joomlatools-framework-activities/blob/701abf6186729f62643bc834055cdebc08c25c21/activity/object/object.php#L393-L401
34,256
joomlatools/joomlatools-framework-activities
activity/object/object.php
ComActivitiesActivityObject.setUpdated
public function setUpdated($date) { if (!is_null($date) && !$date instanceof KDate) { throw new InvalidArgumentException('Invalid date type.'); } $this->updated = $date; return $this; }
php
public function setUpdated($date) { if (!is_null($date) && !$date instanceof KDate) { throw new InvalidArgumentException('Invalid date type.'); } $this->updated = $date; return $this; }
[ "public", "function", "setUpdated", "(", "$", "date", ")", "{", "if", "(", "!", "is_null", "(", "$", "date", ")", "&&", "!", "$", "date", "instanceof", "KDate", ")", "{", "throw", "new", "InvalidArgumentException", "(", "'Invalid date type.'", ")", ";", ...
Set the updated date. @link http://activitystrea.ms/specs/json/1.0/#object See updated property. @param KDate|null $date The updated date. @return ComActivitiesActivityObject
[ "Set", "the", "updated", "date", "." ]
701abf6186729f62643bc834055cdebc08c25c21
https://github.com/joomlatools/joomlatools-framework-activities/blob/701abf6186729f62643bc834055cdebc08c25c21/activity/object/object.php#L423-L431
34,257
joomlatools/joomlatools-framework-activities
activity/object/object.php
ComActivitiesActivityObject.setUpstreamDuplicates
public function setUpstreamDuplicates(array $duplicates, $merge = true) { if ($merge) { $this->downstreamDuplicates = array_merge($this->downstreamDuplicates, $duplicates); } else { $this->upstreamDuplicates = $duplicates; } return $this; }
php
public function setUpstreamDuplicates(array $duplicates, $merge = true) { if ($merge) { $this->downstreamDuplicates = array_merge($this->downstreamDuplicates, $duplicates); } else { $this->upstreamDuplicates = $duplicates; } return $this; }
[ "public", "function", "setUpstreamDuplicates", "(", "array", "$", "duplicates", ",", "$", "merge", "=", "true", ")", "{", "if", "(", "$", "merge", ")", "{", "$", "this", "->", "downstreamDuplicates", "=", "array_merge", "(", "$", "this", "->", "downstreamD...
Set the upstream duplicates. @link http://activitystrea.ms/specs/json/1.0/#object See upstreamDuplicates property. @param array $duplicates An array of {@link ComActivitiesActivityObjectInterface} objects. @param bool $merge Tells if upstream duplicates should be replaced or merged with current existing upstrea...
[ "Set", "the", "upstream", "duplicates", "." ]
701abf6186729f62643bc834055cdebc08c25c21
https://github.com/joomlatools/joomlatools-framework-activities/blob/701abf6186729f62643bc834055cdebc08c25c21/activity/object/object.php#L455-L464
34,258
joomlatools/joomlatools-framework-activities
activity/object/object.php
ComActivitiesActivityObject.setAttributes
public function setAttributes(array $attribs = array(), $merge = true) { if ($merge) { $this->attributes = array_merge($this->attributes, $attribs); } else { $this->attributes = $attribs; } return $this; }
php
public function setAttributes(array $attribs = array(), $merge = true) { if ($merge) { $this->attributes = array_merge($this->attributes, $attribs); } else { $this->attributes = $attribs; } return $this; }
[ "public", "function", "setAttributes", "(", "array", "$", "attribs", "=", "array", "(", ")", ",", "$", "merge", "=", "true", ")", "{", "if", "(", "$", "merge", ")", "{", "$", "this", "->", "attributes", "=", "array_merge", "(", "$", "this", "->", "...
Set the attributes. @param array $attributes The attributes. @param bool $merge Tells if attributes should be replaced or merged with current existing attributes. @return ComActivitiesActivityObject
[ "Set", "the", "attributes", "." ]
701abf6186729f62643bc834055cdebc08c25c21
https://github.com/joomlatools/joomlatools-framework-activities/blob/701abf6186729f62643bc834055cdebc08c25c21/activity/object/object.php#L513-L522
34,259
joomlatools/joomlatools-framework-activities
controller/activity.php
ComActivitiesControllerActivity.getRequest
public function getRequest() { $request = parent::getRequest(); // Force set the 'package' in the request $request->query->package = $this->getIdentifier()->package; return $request; }
php
public function getRequest() { $request = parent::getRequest(); // Force set the 'package' in the request $request->query->package = $this->getIdentifier()->package; return $request; }
[ "public", "function", "getRequest", "(", ")", "{", "$", "request", "=", "parent", "::", "getRequest", "(", ")", ";", "// Force set the 'package' in the request", "$", "request", "->", "query", "->", "package", "=", "$", "this", "->", "getIdentifier", "(", ")",...
Overridden for forcing the package model state.
[ "Overridden", "for", "forcing", "the", "package", "model", "state", "." ]
701abf6186729f62643bc834055cdebc08c25c21
https://github.com/joomlatools/joomlatools-framework-activities/blob/701abf6186729f62643bc834055cdebc08c25c21/controller/activity.php#L111-L119
34,260
joomlatools/joomlatools-framework-activities
controller/activity.php
ComActivitiesControllerActivity._beforeAdd
protected function _beforeAdd(KControllerContextInterface $context) { $context->request->data->ip = $this->getObject('request')->getAddress(); }
php
protected function _beforeAdd(KControllerContextInterface $context) { $context->request->data->ip = $this->getObject('request')->getAddress(); }
[ "protected", "function", "_beforeAdd", "(", "KControllerContextInterface", "$", "context", ")", "{", "$", "context", "->", "request", "->", "data", "->", "ip", "=", "$", "this", "->", "getObject", "(", "'request'", ")", "->", "getAddress", "(", ")", ";", "...
Set the IP address if we are adding a new activity. @param KControllerContextInterface $context A command context object. @return KModelEntityInterface
[ "Set", "the", "IP", "address", "if", "we", "are", "adding", "a", "new", "activity", "." ]
701abf6186729f62643bc834055cdebc08c25c21
https://github.com/joomlatools/joomlatools-framework-activities/blob/701abf6186729f62643bc834055cdebc08c25c21/controller/activity.php#L127-L130
34,261
netgen-layouts/content-browser-ezplatform
lib/Backend/EzTagsBackend.php
EzTagsBackend.buildLocation
private function buildLocation(): Location { $tag = $this->getRootTag(); $tagName = $this->translationHelper->getTranslatedByMethod( $tag, 'getKeyword' ); return new Location($tag, (string) $tagName); }
php
private function buildLocation(): Location { $tag = $this->getRootTag(); $tagName = $this->translationHelper->getTranslatedByMethod( $tag, 'getKeyword' ); return new Location($tag, (string) $tagName); }
[ "private", "function", "buildLocation", "(", ")", ":", "Location", "{", "$", "tag", "=", "$", "this", "->", "getRootTag", "(", ")", ";", "$", "tagName", "=", "$", "this", "->", "translationHelper", "->", "getTranslatedByMethod", "(", "$", "tag", ",", "'g...
Builds the location.
[ "Builds", "the", "location", "." ]
1f189f154933b92757d8072aea1ba95ac07c1167
https://github.com/netgen-layouts/content-browser-ezplatform/blob/1f189f154933b92757d8072aea1ba95ac07c1167/lib/Backend/EzTagsBackend.php#L167-L177
34,262
netgen-layouts/content-browser-ezplatform
lib/Backend/EzTagsBackend.php
EzTagsBackend.buildItem
private function buildItem(Tag $tag): Item { $tagName = $this->translationHelper->getTranslatedByMethod( $tag, 'getKeyword' ); return new Item($tag, (string) $tagName); }
php
private function buildItem(Tag $tag): Item { $tagName = $this->translationHelper->getTranslatedByMethod( $tag, 'getKeyword' ); return new Item($tag, (string) $tagName); }
[ "private", "function", "buildItem", "(", "Tag", "$", "tag", ")", ":", "Item", "{", "$", "tagName", "=", "$", "this", "->", "translationHelper", "->", "getTranslatedByMethod", "(", "$", "tag", ",", "'getKeyword'", ")", ";", "return", "new", "Item", "(", "...
Builds the item from provided tag.
[ "Builds", "the", "item", "from", "provided", "tag", "." ]
1f189f154933b92757d8072aea1ba95ac07c1167
https://github.com/netgen-layouts/content-browser-ezplatform/blob/1f189f154933b92757d8072aea1ba95ac07c1167/lib/Backend/EzTagsBackend.php#L182-L190
34,263
netgen-layouts/content-browser-ezplatform
lib/Backend/EzTagsBackend.php
EzTagsBackend.buildItems
private function buildItems(array $tags): array { return array_map( function (Tag $tag): Item { return $this->buildItem($tag); }, $tags ); }
php
private function buildItems(array $tags): array { return array_map( function (Tag $tag): Item { return $this->buildItem($tag); }, $tags ); }
[ "private", "function", "buildItems", "(", "array", "$", "tags", ")", ":", "array", "{", "return", "array_map", "(", "function", "(", "Tag", "$", "tag", ")", ":", "Item", "{", "return", "$", "this", "->", "buildItem", "(", "$", "tag", ")", ";", "}", ...
Builds the items from provided tags. @param \Netgen\TagsBundle\API\Repository\Values\Tags\Tag[] $tags @return \Netgen\ContentBrowser\Ez\Item\EzTags\Item[]
[ "Builds", "the", "items", "from", "provided", "tags", "." ]
1f189f154933b92757d8072aea1ba95ac07c1167
https://github.com/netgen-layouts/content-browser-ezplatform/blob/1f189f154933b92757d8072aea1ba95ac07c1167/lib/Backend/EzTagsBackend.php#L199-L207
34,264
joomlatools/joomlatools-framework-activities
controller/behavior/loggable.php
ComActivitiesControllerBehaviorLoggable.attachLogger
public function attachLogger($logger, $config = array()) { $identifier = $this->getIdentifier($logger); if (!$this->__queue->hasIdentifier($identifier)) { $logger = $this->getObject($identifier, $config); if (!($logger instanceof ComActivitiesActivityLoggerInterface...
php
public function attachLogger($logger, $config = array()) { $identifier = $this->getIdentifier($logger); if (!$this->__queue->hasIdentifier($identifier)) { $logger = $this->getObject($identifier, $config); if (!($logger instanceof ComActivitiesActivityLoggerInterface...
[ "public", "function", "attachLogger", "(", "$", "logger", ",", "$", "config", "=", "array", "(", ")", ")", "{", "$", "identifier", "=", "$", "this", "->", "getIdentifier", "(", "$", "logger", ")", ";", "if", "(", "!", "$", "this", "->", "__queue", ...
Attach a logger. @param mixed $logger An object that implements ObjectInterface, ObjectIdentifier object or valid identifier string. @param array $config An optional associative array of configuration settings. @throws UnexpectedValueException if the logger does not implement ComActivitiesActivityLoggerInterface. @ret...
[ "Attach", "a", "logger", "." ]
701abf6186729f62643bc834055cdebc08c25c21
https://github.com/joomlatools/joomlatools-framework-activities/blob/701abf6186729f62643bc834055cdebc08c25c21/controller/behavior/loggable.php#L144-L163
34,265
joomlatools/joomlatools-framework-activities
controller/behavior/resourceable.php
ComActivitiesControllerBehaviorResourceable._getResource
protected function _getResource($entity) { $model = $this->_getController()->getModel(); $model->reset()->getState()->setValues(array( 'package' => $entity->package, 'name' => $entity->name, 'resource_id' => $entity->row )); return $mo...
php
protected function _getResource($entity) { $model = $this->_getController()->getModel(); $model->reset()->getState()->setValues(array( 'package' => $entity->package, 'name' => $entity->name, 'resource_id' => $entity->row )); return $mo...
[ "protected", "function", "_getResource", "(", "$", "entity", ")", "{", "$", "model", "=", "$", "this", "->", "_getController", "(", ")", "->", "getModel", "(", ")", ";", "$", "model", "->", "reset", "(", ")", "->", "getState", "(", ")", "->", "setVal...
Resource getter. @param KModelEntityInterface $entity The entity to get the resource from @return KModelEntityInterface|null The resource
[ "Resource", "getter", "." ]
701abf6186729f62643bc834055cdebc08c25c21
https://github.com/joomlatools/joomlatools-framework-activities/blob/701abf6186729f62643bc834055cdebc08c25c21/controller/behavior/resourceable.php#L81-L92
34,266
joomlatools/joomlatools-framework-activities
controller/behavior/resourceable.php
ComActivitiesControllerBehaviorResourceable._getData
protected function _getData(KModelEntityInterface $entity) { $data = array( 'package' => $entity->package, 'name' => $entity->name, 'resource_id' => $entity->row, 'title' => $entity->title ); if ($uuid = $entity->getActivityOb...
php
protected function _getData(KModelEntityInterface $entity) { $data = array( 'package' => $entity->package, 'name' => $entity->name, 'resource_id' => $entity->row, 'title' => $entity->title ); if ($uuid = $entity->getActivityOb...
[ "protected", "function", "_getData", "(", "KModelEntityInterface", "$", "entity", ")", "{", "$", "data", "=", "array", "(", "'package'", "=>", "$", "entity", "->", "package", ",", "'name'", "=>", "$", "entity", "->", "name", ",", "'resource_id'", "=>", "$"...
Entity data getter @param KModelEntityInterface $entity The entity to get data from @return array The entity data
[ "Entity", "data", "getter" ]
701abf6186729f62643bc834055cdebc08c25c21
https://github.com/joomlatools/joomlatools-framework-activities/blob/701abf6186729f62643bc834055cdebc08c25c21/controller/behavior/resourceable.php#L101-L115
34,267
joomlatools/joomlatools-framework-activities
controller/behavior/resourceable.php
ComActivitiesControllerBehaviorResourceable._getController
protected function _getController() { if (!$this->_controller instanceof KControllerInterface) { $this->_controller = $this->getObject($this->_controller); } return $this->_controller; }
php
protected function _getController() { if (!$this->_controller instanceof KControllerInterface) { $this->_controller = $this->getObject($this->_controller); } return $this->_controller; }
[ "protected", "function", "_getController", "(", ")", "{", "if", "(", "!", "$", "this", "->", "_controller", "instanceof", "KControllerInterface", ")", "{", "$", "this", "->", "_controller", "=", "$", "this", "->", "getObject", "(", "$", "this", "->", "_con...
Resource controller getter. @return KControllerInterface The controller
[ "Resource", "controller", "getter", "." ]
701abf6186729f62643bc834055cdebc08c25c21
https://github.com/joomlatools/joomlatools-framework-activities/blob/701abf6186729f62643bc834055cdebc08c25c21/controller/behavior/resourceable.php#L122-L129
34,268
aviat4ion/Query
src/Drivers/AbstractDriver.php
AbstractDriver._loadSubClasses
protected function _loadSubClasses(): void { // Load the sql and util class for the driver $thisClass = \get_class($this); $nsArray = explode("\\", $thisClass); array_pop($nsArray); $driver = array_pop($nsArray); $sqlClass = __NAMESPACE__ . "\\{$driver}\\SQL"; $utilClass = __NAMESPACE__ . "\\{$driver}\\U...
php
protected function _loadSubClasses(): void { // Load the sql and util class for the driver $thisClass = \get_class($this); $nsArray = explode("\\", $thisClass); array_pop($nsArray); $driver = array_pop($nsArray); $sqlClass = __NAMESPACE__ . "\\{$driver}\\SQL"; $utilClass = __NAMESPACE__ . "\\{$driver}\\U...
[ "protected", "function", "_loadSubClasses", "(", ")", ":", "void", "{", "// Load the sql and util class for the driver", "$", "thisClass", "=", "\\", "get_class", "(", "$", "this", ")", ";", "$", "nsArray", "=", "explode", "(", "\"\\\\\"", ",", "$", "thisClass",...
Loads the subclasses for the driver @return void
[ "Loads", "the", "subclasses", "for", "the", "driver" ]
172eb3f6ebdfb7295b42e32cc74bf37c3ebd7650
https://github.com/aviat4ion/Query/blob/172eb3f6ebdfb7295b42e32cc74bf37c3ebd7650/src/Drivers/AbstractDriver.php#L100-L112
34,269
aviat4ion/Query
src/Drivers/AbstractDriver.php
AbstractDriver.prepareQuery
public function prepareQuery(string $sql, array $data): ?PDOStatement { // Prepare the sql, save the statement for easy access later $this->statement = $this->prepare($sql); // Bind the parameters foreach($data as $k => $value) { // Parameters are 1-based, the data is 0-based // So, if the key is nume...
php
public function prepareQuery(string $sql, array $data): ?PDOStatement { // Prepare the sql, save the statement for easy access later $this->statement = $this->prepare($sql); // Bind the parameters foreach($data as $k => $value) { // Parameters are 1-based, the data is 0-based // So, if the key is nume...
[ "public", "function", "prepareQuery", "(", "string", "$", "sql", ",", "array", "$", "data", ")", ":", "?", "PDOStatement", "{", "// Prepare the sql, save the statement for easy access later", "$", "this", "->", "statement", "=", "$", "this", "->", "prepare", "(", ...
Simplifies prepared statements for database queries @param string $sql @param array $data @return PDOStatement | FALSE @throws InvalidArgumentException
[ "Simplifies", "prepared", "statements", "for", "database", "queries" ]
172eb3f6ebdfb7295b42e32cc74bf37c3ebd7650
https://github.com/aviat4ion/Query/blob/172eb3f6ebdfb7295b42e32cc74bf37c3ebd7650/src/Drivers/AbstractDriver.php#L202-L220
34,270
aviat4ion/Query
src/Drivers/AbstractDriver.php
AbstractDriver.prepareExecute
public function prepareExecute(string $sql, array $params): ?PDOStatement { $this->statement = $this->prepareQuery($sql, $params); $this->statement->execute(); return $this->statement; }
php
public function prepareExecute(string $sql, array $params): ?PDOStatement { $this->statement = $this->prepareQuery($sql, $params); $this->statement->execute(); return $this->statement; }
[ "public", "function", "prepareExecute", "(", "string", "$", "sql", ",", "array", "$", "params", ")", ":", "?", "PDOStatement", "{", "$", "this", "->", "statement", "=", "$", "this", "->", "prepareQuery", "(", "$", "sql", ",", "$", "params", ")", ";", ...
Create and execute a prepared statement with the provided parameters @param string $sql @param array $params @throws InvalidArgumentException @return PDOStatement
[ "Create", "and", "execute", "a", "prepared", "statement", "with", "the", "provided", "parameters" ]
172eb3f6ebdfb7295b42e32cc74bf37c3ebd7650
https://github.com/aviat4ion/Query/blob/172eb3f6ebdfb7295b42e32cc74bf37c3ebd7650/src/Drivers/AbstractDriver.php#L230-L236
34,271
aviat4ion/Query
src/Drivers/AbstractDriver.php
AbstractDriver.prefixTable
public function prefixTable(string $table): string { // Add the prefix to the table name // before quoting it if ( ! empty($this->tablePrefix)) { // Split identifier by period, will split into: // database.schema.table OR // schema.table OR // database.table OR // table $identifiers = explode...
php
public function prefixTable(string $table): string { // Add the prefix to the table name // before quoting it if ( ! empty($this->tablePrefix)) { // Split identifier by period, will split into: // database.schema.table OR // schema.table OR // database.table OR // table $identifiers = explode...
[ "public", "function", "prefixTable", "(", "string", "$", "table", ")", ":", "string", "{", "// Add the prefix to the table name", "// before quoting it", "if", "(", "!", "empty", "(", "$", "this", "->", "tablePrefix", ")", ")", "{", "// Split identifier by period, w...
Prefixes a table if it is not already prefixed @param string $table @return string
[ "Prefixes", "a", "table", "if", "it", "is", "not", "already", "prefixed" ]
172eb3f6ebdfb7295b42e32cc74bf37c3ebd7650
https://github.com/aviat4ion/Query/blob/172eb3f6ebdfb7295b42e32cc74bf37c3ebd7650/src/Drivers/AbstractDriver.php#L254-L276
34,272
aviat4ion/Query
src/Drivers/AbstractDriver.php
AbstractDriver.quoteTable
public function quoteTable($table): string { $table = $this->prefixTable($table); // Finally, quote the table return $this->quoteIdent($table); }
php
public function quoteTable($table): string { $table = $this->prefixTable($table); // Finally, quote the table return $this->quoteIdent($table); }
[ "public", "function", "quoteTable", "(", "$", "table", ")", ":", "string", "{", "$", "table", "=", "$", "this", "->", "prefixTable", "(", "$", "table", ")", ";", "// Finally, quote the table", "return", "$", "this", "->", "quoteIdent", "(", "$", "table", ...
Quote database table name, and set prefix @param string $table @return string
[ "Quote", "database", "table", "name", "and", "set", "prefix" ]
172eb3f6ebdfb7295b42e32cc74bf37c3ebd7650
https://github.com/aviat4ion/Query/blob/172eb3f6ebdfb7295b42e32cc74bf37c3ebd7650/src/Drivers/AbstractDriver.php#L284-L290
34,273
aviat4ion/Query
src/Drivers/AbstractDriver.php
AbstractDriver.quoteIdent
public function quoteIdent($identifier) { if (\is_array($identifier)) { return array_map([$this, __METHOD__], $identifier); } // Handle comma-separated identifiers if (strpos($identifier, ',') !== FALSE) { $parts = array_map('mb_trim', explode(',', $identifier)); $parts = array_map([$this, __METH...
php
public function quoteIdent($identifier) { if (\is_array($identifier)) { return array_map([$this, __METHOD__], $identifier); } // Handle comma-separated identifiers if (strpos($identifier, ',') !== FALSE) { $parts = array_map('mb_trim', explode(',', $identifier)); $parts = array_map([$this, __METH...
[ "public", "function", "quoteIdent", "(", "$", "identifier", ")", "{", "if", "(", "\\", "is_array", "(", "$", "identifier", ")", ")", "{", "return", "array_map", "(", "[", "$", "this", ",", "__METHOD__", "]", ",", "$", "identifier", ")", ";", "}", "//...
Surrounds the string with the databases identifier escape characters @param mixed $identifier @return string|array
[ "Surrounds", "the", "string", "with", "the", "databases", "identifier", "escape", "characters" ]
172eb3f6ebdfb7295b42e32cc74bf37c3ebd7650
https://github.com/aviat4ion/Query/blob/172eb3f6ebdfb7295b42e32cc74bf37c3ebd7650/src/Drivers/AbstractDriver.php#L298-L333
34,274
aviat4ion/Query
src/Drivers/AbstractDriver.php
AbstractDriver.getColumns
public function getColumns($table): ?array { return $this->driverQuery($this->getSql()->columnList($this->prefixTable($table)), FALSE); }
php
public function getColumns($table): ?array { return $this->driverQuery($this->getSql()->columnList($this->prefixTable($table)), FALSE); }
[ "public", "function", "getColumns", "(", "$", "table", ")", ":", "?", "array", "{", "return", "$", "this", "->", "driverQuery", "(", "$", "this", "->", "getSql", "(", ")", "->", "columnList", "(", "$", "this", "->", "prefixTable", "(", "$", "table", ...
Retrieve column information for the current database table @param string $table @return array
[ "Retrieve", "column", "information", "for", "the", "current", "database", "table" ]
172eb3f6ebdfb7295b42e32cc74bf37c3ebd7650
https://github.com/aviat4ion/Query/blob/172eb3f6ebdfb7295b42e32cc74bf37c3ebd7650/src/Drivers/AbstractDriver.php#L436-L439
34,275
aviat4ion/Query
src/Drivers/AbstractDriver.php
AbstractDriver.getIndexes
public function getIndexes($table): ?array { return $this->driverQuery($this->getSql()->indexList($this->prefixTable($table)), FALSE); }
php
public function getIndexes($table): ?array { return $this->driverQuery($this->getSql()->indexList($this->prefixTable($table)), FALSE); }
[ "public", "function", "getIndexes", "(", "$", "table", ")", ":", "?", "array", "{", "return", "$", "this", "->", "driverQuery", "(", "$", "this", "->", "getSql", "(", ")", "->", "indexList", "(", "$", "this", "->", "prefixTable", "(", "$", "table", "...
Retrieve indexes for the table @param string $table @return array
[ "Retrieve", "indexes", "for", "the", "table" ]
172eb3f6ebdfb7295b42e32cc74bf37c3ebd7650
https://github.com/aviat4ion/Query/blob/172eb3f6ebdfb7295b42e32cc74bf37c3ebd7650/src/Drivers/AbstractDriver.php#L458-L461
34,276
aviat4ion/Query
src/Drivers/AbstractDriver.php
AbstractDriver.driverQuery
public function driverQuery($query, $filteredIndex=TRUE): ?array { // Call the appropriate method, if it exists if (\is_string($query) && method_exists($this->sql, $query)) { $query = $this->getSql()->$query(); } // Return if the values are returned instead of a query, // or if the query doesn't apply ...
php
public function driverQuery($query, $filteredIndex=TRUE): ?array { // Call the appropriate method, if it exists if (\is_string($query) && method_exists($this->sql, $query)) { $query = $this->getSql()->$query(); } // Return if the values are returned instead of a query, // or if the query doesn't apply ...
[ "public", "function", "driverQuery", "(", "$", "query", ",", "$", "filteredIndex", "=", "TRUE", ")", ":", "?", "array", "{", "// Call the appropriate method, if it exists", "if", "(", "\\", "is_string", "(", "$", "query", ")", "&&", "method_exists", "(", "$", ...
Method to simplify retrieving db results for meta-data queries @param string|array|null $query @param bool $filteredIndex @return array|null
[ "Method", "to", "simplify", "retrieving", "db", "results", "for", "meta", "-", "data", "queries" ]
172eb3f6ebdfb7295b42e32cc74bf37c3ebd7650
https://github.com/aviat4ion/Query/blob/172eb3f6ebdfb7295b42e32cc74bf37c3ebd7650/src/Drivers/AbstractDriver.php#L480-L502
34,277
aviat4ion/Query
src/Drivers/AbstractDriver.php
AbstractDriver.numRows
public function numRows(): ?int { $regex = '/^SELECT\s+(?:ALL\s+|DISTINCT\s+)?(?:.*?)\s+FROM\s+(.*)$/i'; $output = []; if (preg_match($regex, $this->lastQuery, $output) > 0) { $stmt = $this->query("SELECT COUNT(*) FROM {$output[1]}"); return (int) $stmt->fetchColumn(); } return NULL; }
php
public function numRows(): ?int { $regex = '/^SELECT\s+(?:ALL\s+|DISTINCT\s+)?(?:.*?)\s+FROM\s+(.*)$/i'; $output = []; if (preg_match($regex, $this->lastQuery, $output) > 0) { $stmt = $this->query("SELECT COUNT(*) FROM {$output[1]}"); return (int) $stmt->fetchColumn(); } return NULL; }
[ "public", "function", "numRows", "(", ")", ":", "?", "int", "{", "$", "regex", "=", "'/^SELECT\\s+(?:ALL\\s+|DISTINCT\\s+)?(?:.*?)\\s+FROM\\s+(.*)$/i'", ";", "$", "output", "=", "[", "]", ";", "if", "(", "preg_match", "(", "$", "regex", ",", "$", "this", "->...
Return the number of rows returned for a SELECT query @see http://us3.php.net/manual/en/pdostatement.rowcount.php#87110 @return int|null
[ "Return", "the", "number", "of", "rows", "returned", "for", "a", "SELECT", "query" ]
172eb3f6ebdfb7295b42e32cc74bf37c3ebd7650
https://github.com/aviat4ion/Query/blob/172eb3f6ebdfb7295b42e32cc74bf37c3ebd7650/src/Drivers/AbstractDriver.php#L510-L522
34,278
aviat4ion/Query
src/Drivers/AbstractDriver.php
AbstractDriver.truncate
public function truncate(string $table): PDOStatement { $sql = $this->hasTruncate ? 'TRUNCATE TABLE ' : 'DELETE FROM '; $sql .= $this->quoteTable($table); $this->statement = $this->query($sql); return $this->statement; }
php
public function truncate(string $table): PDOStatement { $sql = $this->hasTruncate ? 'TRUNCATE TABLE ' : 'DELETE FROM '; $sql .= $this->quoteTable($table); $this->statement = $this->query($sql); return $this->statement; }
[ "public", "function", "truncate", "(", "string", "$", "table", ")", ":", "PDOStatement", "{", "$", "sql", "=", "$", "this", "->", "hasTruncate", "?", "'TRUNCATE TABLE '", ":", "'DELETE FROM '", ";", "$", "sql", ".=", "$", "this", "->", "quoteTable", "(", ...
Empty the passed table @param string $table @return PDOStatement
[ "Empty", "the", "passed", "table" ]
172eb3f6ebdfb7295b42e32cc74bf37c3ebd7650
https://github.com/aviat4ion/Query/blob/172eb3f6ebdfb7295b42e32cc74bf37c3ebd7650/src/Drivers/AbstractDriver.php#L581-L591
34,279
aviat4ion/Query
src/Drivers/AbstractDriver.php
AbstractDriver._quote
public function _quote($str) { // Check that the current value is a string, // and is not already quoted before quoting // that value, otherwise, return the original value return ( \is_string($str) && strpos($str, $this->escapeCharOpen) !== 0 && strrpos($str, $this->escapeCharClose) !== 0 ) ? "{$...
php
public function _quote($str) { // Check that the current value is a string, // and is not already quoted before quoting // that value, otherwise, return the original value return ( \is_string($str) && strpos($str, $this->escapeCharOpen) !== 0 && strrpos($str, $this->escapeCharClose) !== 0 ) ? "{$...
[ "public", "function", "_quote", "(", "$", "str", ")", "{", "// Check that the current value is a string,", "// and is not already quoted before quoting", "// that value, otherwise, return the original value", "return", "(", "\\", "is_string", "(", "$", "str", ")", "&&", "strp...
Helper method for quote_ident @param mixed $str @return mixed
[ "Helper", "method", "for", "quote_ident" ]
172eb3f6ebdfb7295b42e32cc74bf37c3ebd7650
https://github.com/aviat4ion/Query/blob/172eb3f6ebdfb7295b42e32cc74bf37c3ebd7650/src/Drivers/AbstractDriver.php#L599-L612
34,280
aviat4ion/Query
src/Drivers/AbstractDriver.php
AbstractDriver._prefix
protected function _prefix(string $str): string { // Don't prefix an already prefixed table if (strpos($str, $this->tablePrefix) !== FALSE) { return $str; } return $this->tablePrefix . $str; }
php
protected function _prefix(string $str): string { // Don't prefix an already prefixed table if (strpos($str, $this->tablePrefix) !== FALSE) { return $str; } return $this->tablePrefix . $str; }
[ "protected", "function", "_prefix", "(", "string", "$", "str", ")", ":", "string", "{", "// Don't prefix an already prefixed table", "if", "(", "strpos", "(", "$", "str", ",", "$", "this", "->", "tablePrefix", ")", "!==", "FALSE", ")", "{", "return", "$", ...
Sets the table prefix on the passed string @param string $str @return string
[ "Sets", "the", "table", "prefix", "on", "the", "passed", "string" ]
172eb3f6ebdfb7295b42e32cc74bf37c3ebd7650
https://github.com/aviat4ion/Query/blob/172eb3f6ebdfb7295b42e32cc74bf37c3ebd7650/src/Drivers/AbstractDriver.php#L620-L629
34,281
aviat4ion/Query
RoboFile.php
RoboFile.analyze
public function analyze() { $this->prepare(); $this->lint(); $this->phploc(TRUE); $this->phpcs(TRUE); $this->dependencyReport(); $this->phpcpdReport(); }
php
public function analyze() { $this->prepare(); $this->lint(); $this->phploc(TRUE); $this->phpcs(TRUE); $this->dependencyReport(); $this->phpcpdReport(); }
[ "public", "function", "analyze", "(", ")", "{", "$", "this", "->", "prepare", "(", ")", ";", "$", "this", "->", "lint", "(", ")", ";", "$", "this", "->", "phploc", "(", "TRUE", ")", ";", "$", "this", "->", "phpcs", "(", "TRUE", ")", ";", "$", ...
Do static analysis tasks
[ "Do", "static", "analysis", "tasks" ]
172eb3f6ebdfb7295b42e32cc74bf37c3ebd7650
https://github.com/aviat4ion/Query/blob/172eb3f6ebdfb7295b42e32cc74bf37c3ebd7650/RoboFile.php#L54-L62
34,282
aviat4ion/Query
RoboFile.php
RoboFile.phploc
public function phploc($report = FALSE) { // Command for generating reports $report_cmd_parts = [ 'vendor/bin/phploc', '--count-tests', '--log-csv=build/logs/phploc.csv', '--log-xml=build/logs/phploc.xml', 'src', 'tests' ]; // Command for generating direct output $normal_cmd_parts = [ '...
php
public function phploc($report = FALSE) { // Command for generating reports $report_cmd_parts = [ 'vendor/bin/phploc', '--count-tests', '--log-csv=build/logs/phploc.csv', '--log-xml=build/logs/phploc.xml', 'src', 'tests' ]; // Command for generating direct output $normal_cmd_parts = [ '...
[ "public", "function", "phploc", "(", "$", "report", "=", "FALSE", ")", "{", "// Command for generating reports", "$", "report_cmd_parts", "=", "[", "'vendor/bin/phploc'", ",", "'--count-tests'", ",", "'--log-csv=build/logs/phploc.csv'", ",", "'--log-xml=build/logs/phploc.xm...
Run the phploc tool @param bool $report - if true, generates reports instead of direct output
[ "Run", "the", "phploc", "tool" ]
172eb3f6ebdfb7295b42e32cc74bf37c3ebd7650
https://github.com/aviat4ion/Query/blob/172eb3f6ebdfb7295b42e32cc74bf37c3ebd7650/RoboFile.php#L153-L176
34,283
aviat4ion/Query
RoboFile.php
RoboFile.watch
public function watch() { $this->taskWatch() ->monitor('composer.json', function() { $this->taskComposerUpdate()->run(); }) ->monitor('src', function () { $this->taskExec('test')->run(); }) ->monitor('tests', function () { $this->taskExec('test')->run(); }) ->run(); }
php
public function watch() { $this->taskWatch() ->monitor('composer.json', function() { $this->taskComposerUpdate()->run(); }) ->monitor('src', function () { $this->taskExec('test')->run(); }) ->monitor('tests', function () { $this->taskExec('test')->run(); }) ->run(); }
[ "public", "function", "watch", "(", ")", "{", "$", "this", "->", "taskWatch", "(", ")", "->", "monitor", "(", "'composer.json'", ",", "function", "(", ")", "{", "$", "this", "->", "taskComposerUpdate", "(", ")", "->", "run", "(", ")", ";", "}", ")", ...
Watches for file updates, and automatically runs appropriate actions
[ "Watches", "for", "file", "updates", "and", "automatically", "runs", "appropriate", "actions" ]
172eb3f6ebdfb7295b42e32cc74bf37c3ebd7650
https://github.com/aviat4ion/Query/blob/172eb3f6ebdfb7295b42e32cc74bf37c3ebd7650/RoboFile.php#L201-L214
34,284
aviat4ion/Query
RoboFile.php
RoboFile.getAllSourceFiles
protected function getAllSourceFiles() { $files = array_merge( glob_recursive('build/*.php'), glob_recursive('src/*.php'), glob_recursive('tests/*.php'), glob('*.php') ); sort($files); return $files; }
php
protected function getAllSourceFiles() { $files = array_merge( glob_recursive('build/*.php'), glob_recursive('src/*.php'), glob_recursive('tests/*.php'), glob('*.php') ); sort($files); return $files; }
[ "protected", "function", "getAllSourceFiles", "(", ")", "{", "$", "files", "=", "array_merge", "(", "glob_recursive", "(", "'build/*.php'", ")", ",", "glob_recursive", "(", "'src/*.php'", ")", ",", "glob_recursive", "(", "'tests/*.php'", ")", ",", "glob", "(", ...
Get the total list of source files, including tests @return array
[ "Get", "the", "total", "list", "of", "source", "files", "including", "tests" ]
172eb3f6ebdfb7295b42e32cc74bf37c3ebd7650
https://github.com/aviat4ion/Query/blob/172eb3f6ebdfb7295b42e32cc74bf37c3ebd7650/RoboFile.php#L236-L248
34,285
aviat4ion/Query
RoboFile.php
RoboFile.parallelLint
protected function parallelLint(array $chunk) { $task = $this->taskParallelExec() ->timeout(5) ->printed(FALSE); foreach($chunk as $file) { $task = $task->process("php -l {$file}"); } $task->run(); }
php
protected function parallelLint(array $chunk) { $task = $this->taskParallelExec() ->timeout(5) ->printed(FALSE); foreach($chunk as $file) { $task = $task->process("php -l {$file}"); } $task->run(); }
[ "protected", "function", "parallelLint", "(", "array", "$", "chunk", ")", "{", "$", "task", "=", "$", "this", "->", "taskParallelExec", "(", ")", "->", "timeout", "(", "5", ")", "->", "printed", "(", "FALSE", ")", ";", "foreach", "(", "$", "chunk", "...
Run php's linter in one parallel task for the passed chunk @param array $chunk
[ "Run", "php", "s", "linter", "in", "one", "parallel", "task", "for", "the", "passed", "chunk" ]
172eb3f6ebdfb7295b42e32cc74bf37c3ebd7650
https://github.com/aviat4ion/Query/blob/172eb3f6ebdfb7295b42e32cc74bf37c3ebd7650/RoboFile.php#L255-L267
34,286
aviat4ion/Query
src/Drivers/Sqlite/Driver.php
Driver.getTables
public function getTables(): array { $sql = $this->sql->tableList(); $res = $this->query($sql); return dbFilter($res->fetchAll(PDO::FETCH_ASSOC), 'name'); }
php
public function getTables(): array { $sql = $this->sql->tableList(); $res = $this->query($sql); return dbFilter($res->fetchAll(PDO::FETCH_ASSOC), 'name'); }
[ "public", "function", "getTables", "(", ")", ":", "array", "{", "$", "sql", "=", "$", "this", "->", "sql", "->", "tableList", "(", ")", ";", "$", "res", "=", "$", "this", "->", "query", "(", "$", "sql", ")", ";", "return", "dbFilter", "(", "$", ...
List tables for the current database @return mixed
[ "List", "tables", "for", "the", "current", "database" ]
172eb3f6ebdfb7295b42e32cc74bf37c3ebd7650
https://github.com/aviat4ion/Query/blob/172eb3f6ebdfb7295b42e32cc74bf37c3ebd7650/src/Drivers/Sqlite/Driver.php#L55-L60
34,287
aviat4ion/Query
src/Drivers/Sqlite/Driver.php
Driver.getFks
public function getFks($table): array { $returnRows = []; foreach(parent::getFks($table) as $row) { $returnRows[] = [ 'child_column' => $row['from'], 'parent_table' => $row['table'], 'parent_column' => $row['to'], 'update' => $row['on_update'], 'delete' => $row['on_delete'] ]; } r...
php
public function getFks($table): array { $returnRows = []; foreach(parent::getFks($table) as $row) { $returnRows[] = [ 'child_column' => $row['from'], 'parent_table' => $row['table'], 'parent_column' => $row['to'], 'update' => $row['on_update'], 'delete' => $row['on_delete'] ]; } r...
[ "public", "function", "getFks", "(", "$", "table", ")", ":", "array", "{", "$", "returnRows", "=", "[", "]", ";", "foreach", "(", "parent", "::", "getFks", "(", "$", "table", ")", "as", "$", "row", ")", "{", "$", "returnRows", "[", "]", "=", "[",...
Retrieve foreign keys for the table @param string $table @return array
[ "Retrieve", "foreign", "keys", "for", "the", "table" ]
172eb3f6ebdfb7295b42e32cc74bf37c3ebd7650
https://github.com/aviat4ion/Query/blob/172eb3f6ebdfb7295b42e32cc74bf37c3ebd7650/src/Drivers/Sqlite/Driver.php#L68-L84
34,288
joomlatools/joomlatools-framework-activities
model/behavior/searchable.php
ComActivitiesModelBehaviorSearchable._afterReset
protected function _afterReset(KModelContextInterface $context) { $reset_columns = false; if ($context->modified) { if (in_array('search', $context->modified->toArray())) { $reset_columns = true; } } else $reset_columns = true; ...
php
protected function _afterReset(KModelContextInterface $context) { $reset_columns = false; if ($context->modified) { if (in_array('search', $context->modified->toArray())) { $reset_columns = true; } } else $reset_columns = true; ...
[ "protected", "function", "_afterReset", "(", "KModelContextInterface", "$", "context", ")", "{", "$", "reset_columns", "=", "false", ";", "if", "(", "$", "context", "->", "modified", ")", "{", "if", "(", "in_array", "(", "'search'", ",", "$", "context", "-...
Resets the columns property by making sure that ip if removed when the state gets reset.
[ "Resets", "the", "columns", "property", "by", "making", "sure", "that", "ip", "if", "removed", "when", "the", "state", "gets", "reset", "." ]
701abf6186729f62643bc834055cdebc08c25c21
https://github.com/joomlatools/joomlatools-framework-activities/blob/701abf6186729f62643bc834055cdebc08c25c21/model/behavior/searchable.php#L50-L65
34,289
wpsharks/css-minifier
src/includes/classes/Core.php
Core.selfMin
protected function selfMin() { if (!$this->css) { return $this->css; } $static = &static::$static[__FUNCTION__.'_map']; if (!isset($static['replace'], $static['with'], $static['colors'])) { $de_spacifiables = array( '{', '}', ...
php
protected function selfMin() { if (!$this->css) { return $this->css; } $static = &static::$static[__FUNCTION__.'_map']; if (!isset($static['replace'], $static['with'], $static['colors'])) { $de_spacifiables = array( '{', '}', ...
[ "protected", "function", "selfMin", "(", ")", "{", "if", "(", "!", "$", "this", "->", "css", ")", "{", "return", "$", "this", "->", "css", ";", "}", "$", "static", "=", "&", "static", "::", "$", "static", "[", "__FUNCTION__", ".", "'_map'", "]", ...
Self minifier. @since 15xxxx Adding SCSS compiler. @return string Output (minified) CSS.
[ "Self", "minifier", "." ]
f70806d752ba262fbcfdab21ae850fe490a51816
https://github.com/wpsharks/css-minifier/blob/f70806d752ba262fbcfdab21ae850fe490a51816/src/includes/classes/Core.php#L77-L123
34,290
wpsharks/css-minifier
src/includes/classes/Core.php
Core.selfMaybeCompressCssColorCb
protected function selfMaybeCompressCssColorCb(array $m) { $m['hex'] = strtoupper($m['hex']); // Convert to uppercase for easy comparison. if ($m['hex'][0] === $m['hex'][1] && $m['hex'][2] === $m['hex'][3] && $m['hex'][4] === $m['hex'][5]) { return $m['context'].$m['hex'][0].$m['hex'][2...
php
protected function selfMaybeCompressCssColorCb(array $m) { $m['hex'] = strtoupper($m['hex']); // Convert to uppercase for easy comparison. if ($m['hex'][0] === $m['hex'][1] && $m['hex'][2] === $m['hex'][3] && $m['hex'][4] === $m['hex'][5]) { return $m['context'].$m['hex'][0].$m['hex'][2...
[ "protected", "function", "selfMaybeCompressCssColorCb", "(", "array", "$", "m", ")", "{", "$", "m", "[", "'hex'", "]", "=", "strtoupper", "(", "$", "m", "[", "'hex'", "]", ")", ";", "// Convert to uppercase for easy comparison.", "if", "(", "$", "m", "[", ...
Compresses HEX color codes. @since 140417 Initial release. @param array $m Regular expression matches. @return string Full match with compressed HEX color code.
[ "Compresses", "HEX", "color", "codes", "." ]
f70806d752ba262fbcfdab21ae850fe490a51816
https://github.com/wpsharks/css-minifier/blob/f70806d752ba262fbcfdab21ae850fe490a51816/src/includes/classes/Core.php#L134-L142
34,291
joomlatools/joomlatools-framework-activities
activity/translator/translator.php
ComActivitiesActivityTranslator.translateActivityFormat
public function translateActivityFormat(ComActivitiesActivityInterface $activity) { $tokens = $this->getActivityTokens($activity); $format = $activity->getActivityFormat(); $parameters = array(); foreach ($tokens as $key => $value) { if ($value instanceof ComAct...
php
public function translateActivityFormat(ComActivitiesActivityInterface $activity) { $tokens = $this->getActivityTokens($activity); $format = $activity->getActivityFormat(); $parameters = array(); foreach ($tokens as $key => $value) { if ($value instanceof ComAct...
[ "public", "function", "translateActivityFormat", "(", "ComActivitiesActivityInterface", "$", "activity", ")", "{", "$", "tokens", "=", "$", "this", "->", "getActivityTokens", "(", "$", "activity", ")", ";", "$", "format", "=", "$", "activity", "->", "getActivity...
Translates an activity format. @param string $string The activity format to translate. @return string The translated activity format.
[ "Translates", "an", "activity", "format", "." ]
701abf6186729f62643bc834055cdebc08c25c21
https://github.com/joomlatools/joomlatools-framework-activities/blob/701abf6186729f62643bc834055cdebc08c25c21/activity/translator/translator.php#L252-L304
34,292
joomlatools/joomlatools-framework-activities
activity/translator/translator.php
ComActivitiesActivityTranslator.translateActivityToken
public function translateActivityToken($token, ComActivitiesActivityInterface $activity) { if (is_string($token)) { $tokens = $this->getActivityTokens($activity); if (isset($tokens[$token])) { $token = $tokens[$token]; } } if (!$t...
php
public function translateActivityToken($token, ComActivitiesActivityInterface $activity) { if (is_string($token)) { $tokens = $this->getActivityTokens($activity); if (isset($tokens[$token])) { $token = $tokens[$token]; } } if (!$t...
[ "public", "function", "translateActivityToken", "(", "$", "token", ",", "ComActivitiesActivityInterface", "$", "activity", ")", "{", "if", "(", "is_string", "(", "$", "token", ")", ")", "{", "$", "tokens", "=", "$", "this", "->", "getActivityTokens", "(", "$...
Translates an activity token. @param string|ComActivitiesActivityObjectInterface $token The activity token. @param ComActivitiesActivityInterface $activity The activity object. @return string The translated token.
[ "Translates", "an", "activity", "token", "." ]
701abf6186729f62643bc834055cdebc08c25c21
https://github.com/joomlatools/joomlatools-framework-activities/blob/701abf6186729f62643bc834055cdebc08c25c21/activity/translator/translator.php#L313-L342
34,293
joomlatools/joomlatools-framework-activities
activity/translator/translator.php
ComActivitiesActivityTranslator._getFallbackCatalogue
protected function _getFallbackCatalogue() { if (!$this->_fallback_catalogue instanceof KTranslatorCatalogueInterface) { $this->_setFallbackCatalogue($this->getObject($this->_fallback_catalogue)); } return $this->_fallback_catalogue; }
php
protected function _getFallbackCatalogue() { if (!$this->_fallback_catalogue instanceof KTranslatorCatalogueInterface) { $this->_setFallbackCatalogue($this->getObject($this->_fallback_catalogue)); } return $this->_fallback_catalogue; }
[ "protected", "function", "_getFallbackCatalogue", "(", ")", "{", "if", "(", "!", "$", "this", "->", "_fallback_catalogue", "instanceof", "KTranslatorCatalogueInterface", ")", "{", "$", "this", "->", "_setFallbackCatalogue", "(", "$", "this", "->", "getObject", "("...
Decorator catalogue getter. @return KTranslatorCatalogueInterface The decorator catalogue.
[ "Decorator", "catalogue", "getter", "." ]
701abf6186729f62643bc834055cdebc08c25c21
https://github.com/joomlatools/joomlatools-framework-activities/blob/701abf6186729f62643bc834055cdebc08c25c21/activity/translator/translator.php#L361-L368
34,294
joomlatools/joomlatools-framework-activities
activity/translator/translator.php
ComActivitiesActivityTranslator._getOverride
protected function _getOverride($format, $parameters = array()) { $override = $format; $locale = $this->getLocale(); if (!isset($this->_overrides[$locale])) { $this->_overrides[$locale] = array(); } if ($parameters) { $key = $this->_getOverr...
php
protected function _getOverride($format, $parameters = array()) { $override = $format; $locale = $this->getLocale(); if (!isset($this->_overrides[$locale])) { $this->_overrides[$locale] = array(); } if ($parameters) { $key = $this->_getOverr...
[ "protected", "function", "_getOverride", "(", "$", "format", ",", "$", "parameters", "=", "array", "(", ")", ")", "{", "$", "override", "=", "$", "format", ";", "$", "locale", "=", "$", "this", "->", "getLocale", "(", ")", ";", "if", "(", "!", "iss...
Get an activity format override. @param string $format The activity format. @param array $parameters Associative array containing parameters. @return string The activity format override. If an override was not found, the original activity format is returned instead.
[ "Get", "an", "activity", "format", "override", "." ]
701abf6186729f62643bc834055cdebc08c25c21
https://github.com/joomlatools/joomlatools-framework-activities/blob/701abf6186729f62643bc834055cdebc08c25c21/activity/translator/translator.php#L378-L410
34,295
joomlatools/joomlatools-framework-activities
activity/translator/translator.php
ComActivitiesActivityTranslator._getOverrideKey
protected function _getOverrideKey($format, $parameters = array()) { $result = $format; foreach ($parameters as $key => $value) { $result = str_replace(sprintf('{%s}', $key), $value, $result); } return $result; }
php
protected function _getOverrideKey($format, $parameters = array()) { $result = $format; foreach ($parameters as $key => $value) { $result = str_replace(sprintf('{%s}', $key), $value, $result); } return $result; }
[ "protected", "function", "_getOverrideKey", "(", "$", "format", ",", "$", "parameters", "=", "array", "(", ")", ")", "{", "$", "result", "=", "$", "format", ";", "foreach", "(", "$", "parameters", "as", "$", "key", "=>", "$", "value", ")", "{", "$", ...
Get an activity format override key. @param string $format The activity format. @param array $parameters Associative array containing parameters. @return string The activity format override key.
[ "Get", "an", "activity", "format", "override", "key", "." ]
701abf6186729f62643bc834055cdebc08c25c21
https://github.com/joomlatools/joomlatools-framework-activities/blob/701abf6186729f62643bc834055cdebc08c25c21/activity/translator/translator.php#L419-L428
34,296
joomlatools/joomlatools-framework-activities
activity/translator/translator.php
ComActivitiesActivityTranslator._getOverrides
protected function _getOverrides($format, $parameters = array()) { $overrides = array(); if (!empty($parameters)) { // Get the power set of the set of parameters and construct a list of string overrides from it. foreach ($this->_getPowerSet(array_keys($parameters)) a...
php
protected function _getOverrides($format, $parameters = array()) { $overrides = array(); if (!empty($parameters)) { // Get the power set of the set of parameters and construct a list of string overrides from it. foreach ($this->_getPowerSet(array_keys($parameters)) a...
[ "protected", "function", "_getOverrides", "(", "$", "format", ",", "$", "parameters", "=", "array", "(", ")", ")", "{", "$", "overrides", "=", "array", "(", ")", ";", "if", "(", "!", "empty", "(", "$", "parameters", ")", ")", "{", "// Get the power set...
Returns a list of activity format overrides. @param string $format The activity format. @param array $parameters Associative array containing parameters. @return array A list of activity format overrides.
[ "Returns", "a", "list", "of", "activity", "format", "overrides", "." ]
701abf6186729f62643bc834055cdebc08c25c21
https://github.com/joomlatools/joomlatools-framework-activities/blob/701abf6186729f62643bc834055cdebc08c25c21/activity/translator/translator.php#L437-L457
34,297
joomlatools/joomlatools-framework-activities
activity/translator/translator.php
ComActivitiesActivityTranslator._getPowerSet
protected function _getPowerSet(array $set = array(), $min_length = 1) { $elements = count($set); $size = pow(2, $elements); $members = array(); for ($i = 0; $i < $size; $i++) { $b = sprintf("%0" . $elements . "b", $i); $member = array(); ...
php
protected function _getPowerSet(array $set = array(), $min_length = 1) { $elements = count($set); $size = pow(2, $elements); $members = array(); for ($i = 0; $i < $size; $i++) { $b = sprintf("%0" . $elements . "b", $i); $member = array(); ...
[ "protected", "function", "_getPowerSet", "(", "array", "$", "set", "=", "array", "(", ")", ",", "$", "min_length", "=", "1", ")", "{", "$", "elements", "=", "count", "(", "$", "set", ")", ";", "$", "size", "=", "pow", "(", "2", ",", "$", "element...
Returns the power set of a set represented by the elements contained in an array. For convenience, the elements are ordered from size (subsets with more elements first). @param array $set The set to get the power set from. @param int $min_length The minimum amount of elements that a subset from the p...
[ "Returns", "the", "power", "set", "of", "a", "set", "represented", "by", "the", "elements", "contained", "in", "an", "array", "." ]
701abf6186729f62643bc834055cdebc08c25c21
https://github.com/joomlatools/joomlatools-framework-activities/blob/701abf6186729f62643bc834055cdebc08c25c21/activity/translator/translator.php#L468-L504
34,298
joomlatools/joomlatools-framework-activities
activity/translator/translator.php
ComActivitiesActivityTranslator._switchCatalogues
protected function _switchCatalogues() { // Switch Catalogues $catalogue = $this->_getFallbackCatalogue(); $this->_setFallbackCatalogue($this->getCatalogue()); $this->setCatalogue($catalogue); return $this; }
php
protected function _switchCatalogues() { // Switch Catalogues $catalogue = $this->_getFallbackCatalogue(); $this->_setFallbackCatalogue($this->getCatalogue()); $this->setCatalogue($catalogue); return $this; }
[ "protected", "function", "_switchCatalogues", "(", ")", "{", "// Switch Catalogues", "$", "catalogue", "=", "$", "this", "->", "_getFallbackCatalogue", "(", ")", ";", "$", "this", "->", "_setFallbackCatalogue", "(", "$", "this", "->", "getCatalogue", "(", ")", ...
Switch translator catalogues. The translator and fallback catalogues are switched. @return ComActivitiesActivityTranslatorInterface
[ "Switch", "translator", "catalogues", "." ]
701abf6186729f62643bc834055cdebc08c25c21
https://github.com/joomlatools/joomlatools-framework-activities/blob/701abf6186729f62643bc834055cdebc08c25c21/activity/translator/translator.php#L552-L560
34,299
joomlatools/joomlatools-framework-activities
model/entity/activity.php
ComActivitiesModelEntityActivity.getTranslator
public function getTranslator() { if (!$this->_translator instanceof ComActivitiesActivityTranslatorInterface) { $translator = $this->getObject('translator'); if (!$translator instanceof ComActivitiesActivityTranslatorInterface) { $translator = $translator->d...
php
public function getTranslator() { if (!$this->_translator instanceof ComActivitiesActivityTranslatorInterface) { $translator = $this->getObject('translator'); if (!$translator instanceof ComActivitiesActivityTranslatorInterface) { $translator = $translator->d...
[ "public", "function", "getTranslator", "(", ")", "{", "if", "(", "!", "$", "this", "->", "_translator", "instanceof", "ComActivitiesActivityTranslatorInterface", ")", "{", "$", "translator", "=", "$", "this", "->", "getObject", "(", "'translator'", ")", ";", "...
Set the activity translator. @param ComActivitiesActivityTranslatorInterface $translator @return ComActivitiesActivityInterface
[ "Set", "the", "activity", "translator", "." ]
701abf6186729f62643bc834055cdebc08c25c21
https://github.com/joomlatools/joomlatools-framework-activities/blob/701abf6186729f62643bc834055cdebc08c25c21/model/entity/activity.php#L361-L376