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,000
silverorange/swat
Swat/SwatImageCropper.php
SwatImageCropper.getInlineJavaScript
protected function getInlineJavaScript() { $options = array(); if ($this->crop_width !== null) { $options['initWidth'] = $this->crop_width; } if ($this->crop_height !== null) { $options['initHeight'] = $this->crop_height; } $options['minWidt...
php
protected function getInlineJavaScript() { $options = array(); if ($this->crop_width !== null) { $options['initWidth'] = $this->crop_width; } if ($this->crop_height !== null) { $options['initHeight'] = $this->crop_height; } $options['minWidt...
[ "protected", "function", "getInlineJavaScript", "(", ")", "{", "$", "options", "=", "array", "(", ")", ";", "if", "(", "$", "this", "->", "crop_width", "!==", "null", ")", "{", "$", "options", "[", "'initWidth'", "]", "=", "$", "this", "->", "crop_widt...
Gets the inline JavaScript required by this image cropper @return string the inline JavaScript required by this image cropper.
[ "Gets", "the", "inline", "JavaScript", "required", "by", "this", "image", "cropper" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatImageCropper.php#L240-L288
34,001
silverorange/swat
Swat/SwatView.php
SwatView.init
public function init() { parent::init(); // add selectors of this view but not selectors of sub-views $selectors = $this->getDescendants('SwatViewSelector'); foreach ($selectors as $selector) { if ($selector->getFirstAncestor('SwatView') === $this) { $thi...
php
public function init() { parent::init(); // add selectors of this view but not selectors of sub-views $selectors = $this->getDescendants('SwatViewSelector'); foreach ($selectors as $selector) { if ($selector->getFirstAncestor('SwatView') === $this) { $thi...
[ "public", "function", "init", "(", ")", "{", "parent", "::", "init", "(", ")", ";", "// add selectors of this view but not selectors of sub-views", "$", "selectors", "=", "$", "this", "->", "getDescendants", "(", "'SwatViewSelector'", ")", ";", "foreach", "(", "$"...
Initializes this view
[ "Initializes", "this", "view" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatView.php#L84-L95
34,002
silverorange/swat
Swat/SwatView.php
SwatView.getSelection
public function getSelection($selector = null) { if ($selector === null) { if (count($this->selectors) > 0) { $selector = reset($this->selectors); } else { throw new SwatException( 'This view does not have any selectors.' ...
php
public function getSelection($selector = null) { if ($selector === null) { if (count($this->selectors) > 0) { $selector = reset($this->selectors); } else { throw new SwatException( 'This view does not have any selectors.' ...
[ "public", "function", "getSelection", "(", "$", "selector", "=", "null", ")", "{", "if", "(", "$", "selector", "===", "null", ")", "{", "if", "(", "count", "(", "$", "this", "->", "selectors", ")", ">", "0", ")", "{", "$", "selector", "=", "reset",...
Gets a selection of this view Selections are an iterable, countable set of row identifiers for rows processed in this view that were selected (in some way) by the user. @param SwatViewSelector|string $selector optional. The view selector object or the view selector identifier for which to get the selection. Use this ...
[ "Gets", "a", "selection", "of", "this", "view" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatView.php#L131-L165
34,003
silverorange/swat
Swat/SwatView.php
SwatView.setSelection
public function setSelection(SwatViewSelection $selection, $selector = null) { if ($selector === null) { if (count($this->selectors) > 0) { $selector = reset($this->selectors); } else { throw new SwatException( 'This view does not h...
php
public function setSelection(SwatViewSelection $selection, $selector = null) { if ($selector === null) { if (count($this->selectors) > 0) { $selector = reset($this->selectors); } else { throw new SwatException( 'This view does not h...
[ "public", "function", "setSelection", "(", "SwatViewSelection", "$", "selection", ",", "$", "selector", "=", "null", ")", "{", "if", "(", "$", "selector", "===", "null", ")", "{", "if", "(", "count", "(", "$", "this", "->", "selectors", ")", ">", "0", ...
Sets a selection of this view Use by {@link SwatViewSelector} objects during the processing phase to set the selection of this view for a particular selector. This method may also be used to override the selection provided by a selector. @param SwatViewSelection $selection the selection object to set. @param SwatVie...
[ "Sets", "a", "selection", "of", "this", "view" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatView.php#L202-L236
34,004
silverorange/swat
Swat/SwatUIObject.php
SwatUIObject.addStyleSheet
public function addStyleSheet($stylesheet) { if ($this->html_head_entry_set === null) { throw new SwatException( sprintf( "Child class '%s' did not " . 'instantiate a HTML head entry set. This should be done in ' . ...
php
public function addStyleSheet($stylesheet) { if ($this->html_head_entry_set === null) { throw new SwatException( sprintf( "Child class '%s' did not " . 'instantiate a HTML head entry set. This should be done in ' . ...
[ "public", "function", "addStyleSheet", "(", "$", "stylesheet", ")", "{", "if", "(", "$", "this", "->", "html_head_entry_set", "===", "null", ")", "{", "throw", "new", "SwatException", "(", "sprintf", "(", "\"Child class '%s' did not \"", ".", "'instantiate a HTML ...
Adds a stylesheet to the list of stylesheets needed by this user-iterface element @param string $stylesheet the uri of the style sheet. @param integer $display_order the relative order in which to display this stylesheet head entry.
[ "Adds", "a", "stylesheet", "to", "the", "list", "of", "stylesheets", "needed", "by", "this", "user", "-", "iterface", "element" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatUIObject.php#L78-L95
34,005
silverorange/swat
Swat/SwatUIObject.php
SwatUIObject.addJavaScript
public function addJavaScript($java_script) { if ($this->html_head_entry_set === null) { throw new SwatException( sprintf( "Child class '%s' did not " . 'instantiate a HTML head entry set. This should be done in ' . ...
php
public function addJavaScript($java_script) { if ($this->html_head_entry_set === null) { throw new SwatException( sprintf( "Child class '%s' did not " . 'instantiate a HTML head entry set. This should be done in ' . ...
[ "public", "function", "addJavaScript", "(", "$", "java_script", ")", "{", "if", "(", "$", "this", "->", "html_head_entry_set", "===", "null", ")", "{", "throw", "new", "SwatException", "(", "sprintf", "(", "\"Child class '%s' did not \"", ".", "'instantiate a HTML...
Adds a JavaScript include to the list of JavaScript includes needed by this user-interface element @param string $java_script the uri of the JavaScript include. @param integer $display_order the relative order in which to display this JavaScript head entry.
[ "Adds", "a", "JavaScript", "include", "to", "the", "list", "of", "JavaScript", "includes", "needed", "by", "this", "user", "-", "interface", "element" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatUIObject.php#L108-L125
34,006
silverorange/swat
Swat/SwatUIObject.php
SwatUIObject.addComment
public function addComment($comment) { if ($this->html_head_entry_set === null) { throw new SwatException( sprintf( "Child class '%s' did not " . 'instantiate a HTML head entry set. This should be done in ' . 't...
php
public function addComment($comment) { if ($this->html_head_entry_set === null) { throw new SwatException( sprintf( "Child class '%s' did not " . 'instantiate a HTML head entry set. This should be done in ' . 't...
[ "public", "function", "addComment", "(", "$", "comment", ")", "{", "if", "(", "$", "this", "->", "html_head_entry_set", "===", "null", ")", "{", "throw", "new", "SwatException", "(", "sprintf", "(", "\"Child class '%s' did not \"", ".", "'instantiate a HTML head e...
Adds a comment to the list of HTML head entries needed by this user- interface element @param string $comment the contents of the comment to include.
[ "Adds", "a", "comment", "to", "the", "list", "of", "HTML", "head", "entries", "needed", "by", "this", "user", "-", "interface", "element" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatUIObject.php#L136-L153
34,007
silverorange/swat
Swat/SwatUIObject.php
SwatUIObject.getFirstAncestor
public function getFirstAncestor($class_name) { if (!class_exists($class_name)) { return null; } if ($this->parent === null) { $out = null; } elseif ($this->parent instanceof $class_name) { $out = $this->parent; } else { $out =...
php
public function getFirstAncestor($class_name) { if (!class_exists($class_name)) { return null; } if ($this->parent === null) { $out = null; } elseif ($this->parent instanceof $class_name) { $out = $this->parent; } else { $out =...
[ "public", "function", "getFirstAncestor", "(", "$", "class_name", ")", "{", "if", "(", "!", "class_exists", "(", "$", "class_name", ")", ")", "{", "return", "null", ";", "}", "if", "(", "$", "this", "->", "parent", "===", "null", ")", "{", "$", "out"...
Gets the first ancestor object of a specific class Retrieves the first ancestor object in the parent path that is a descendant of the specified class name. @param string $class_name class name to look for. @return mixed the first ancestor object or null if no matching ancestor is found. @see SwatUIParent::getFirstD...
[ "Gets", "the", "first", "ancestor", "object", "of", "a", "specific", "class" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatUIObject.php#L179-L194
34,008
silverorange/swat
Swat/SwatUIObject.php
SwatUIObject.getHtmlHeadEntrySet
public function getHtmlHeadEntrySet() { if ($this->isVisible()) { $set = new SwatHtmlHeadEntrySet($this->html_head_entry_set); } else { $set = new SwatHtmlHeadEntrySet(); } return $set; }
php
public function getHtmlHeadEntrySet() { if ($this->isVisible()) { $set = new SwatHtmlHeadEntrySet($this->html_head_entry_set); } else { $set = new SwatHtmlHeadEntrySet(); } return $set; }
[ "public", "function", "getHtmlHeadEntrySet", "(", ")", "{", "if", "(", "$", "this", "->", "isVisible", "(", ")", ")", "{", "$", "set", "=", "new", "SwatHtmlHeadEntrySet", "(", "$", "this", "->", "html_head_entry_set", ")", ";", "}", "else", "{", "$", "...
Gets the SwatHtmlHeadEntry objects needed by this UI object If this UI object is not visible, an empty set is returned to reduce the number of required HTTP requests. @return SwatHtmlHeadEntrySet the SwatHtmlHeadEntry objects needed by this UI object.
[ "Gets", "the", "SwatHtmlHeadEntry", "objects", "needed", "by", "this", "UI", "object" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatUIObject.php#L208-L217
34,009
silverorange/swat
Swat/SwatUIObject.php
SwatUIObject.isVisible
public function isVisible() { if ($this->parent instanceof SwatUIObject) { return $this->parent->isVisible() && $this->visible; } else { return $this->visible; } }
php
public function isVisible() { if ($this->parent instanceof SwatUIObject) { return $this->parent->isVisible() && $this->visible; } else { return $this->visible; } }
[ "public", "function", "isVisible", "(", ")", "{", "if", "(", "$", "this", "->", "parent", "instanceof", "SwatUIObject", ")", "{", "return", "$", "this", "->", "parent", "->", "isVisible", "(", ")", "&&", "$", "this", "->", "visible", ";", "}", "else", ...
Gets whether or not this UI object is visible Looks at the visible property of the ancestors of this UI object to determine if this UI object is visible. @return boolean true if this UI object is visible and false if it is not. @see SwatUIObject::$visible
[ "Gets", "whether", "or", "not", "this", "UI", "object", "is", "visible" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatUIObject.php#L249-L256
34,010
silverorange/swat
Swat/SwatUIObject.php
SwatUIObject.getCSSClassString
final protected function getCSSClassString() { $class_string = null; $class_names = $this->getCSSClassNames(); if (count($class_names) > 0) { $class_string = implode(' ', $class_names); } return $class_string; }
php
final protected function getCSSClassString() { $class_string = null; $class_names = $this->getCSSClassNames(); if (count($class_names) > 0) { $class_string = implode(' ', $class_names); } return $class_string; }
[ "final", "protected", "function", "getCSSClassString", "(", ")", "{", "$", "class_string", "=", "null", ";", "$", "class_names", "=", "$", "this", "->", "getCSSClassNames", "(", ")", ";", "if", "(", "count", "(", "$", "class_names", ")", ">", "0", ")", ...
Gets the string representation of this user-interface object's list of CSS classes @return string the string representation of the CSS classes that are applied to this user-interface object. If this object has no CSS classes, null is returned rather than a blank string. @see SwatUIObject::getCSSClassNames()
[ "Gets", "the", "string", "representation", "of", "this", "user", "-", "interface", "object", "s", "list", "of", "CSS", "classes" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatUIObject.php#L354-L364
34,011
rollun-com/rollun-datastore
src/DataStore/src/Middleware/Handler/QueryHandler.php
QueryHandler.getTotalItems
protected function getTotalItems(Query $rqlQuery) { $rqlQuery->setLimit(new LimitNode(ReadInterface::LIMIT_INFINITY)); $aggregateCountFunction = new AggregateFunctionNode('count', $this->dataStore->getIdentifier()); $rqlQuery->setSelect(new SelectNode([$aggregateCountFunction])); $a...
php
protected function getTotalItems(Query $rqlQuery) { $rqlQuery->setLimit(new LimitNode(ReadInterface::LIMIT_INFINITY)); $aggregateCountFunction = new AggregateFunctionNode('count', $this->dataStore->getIdentifier()); $rqlQuery->setSelect(new SelectNode([$aggregateCountFunction])); $a...
[ "protected", "function", "getTotalItems", "(", "Query", "$", "rqlQuery", ")", "{", "$", "rqlQuery", "->", "setLimit", "(", "new", "LimitNode", "(", "ReadInterface", "::", "LIMIT_INFINITY", ")", ")", ";", "$", "aggregateCountFunction", "=", "new", "AggregateFunct...
Get total count items in data store @param Query $rqlQuery @return mixed
[ "Get", "total", "count", "items", "in", "data", "store" ]
ef433b58b94e1c311123ad1b2a0360e95a636bd1
https://github.com/rollun-com/rollun-datastore/blob/ef433b58b94e1c311123ad1b2a0360e95a636bd1/src/DataStore/src/Middleware/Handler/QueryHandler.php#L80-L89
34,012
silverorange/swat
Swat/SwatChangeOrder.php
SwatChangeOrder.display
public function display() { if (!$this->visible) { return; } parent::display(); $ordered_options = $this->getOrderedOptions(); $div_tag = new SwatHtmlTag('div'); $div_tag->id = $this->id; $div_tag->class = $this->getCSSClassString(); $di...
php
public function display() { if (!$this->visible) { return; } parent::display(); $ordered_options = $this->getOrderedOptions(); $div_tag = new SwatHtmlTag('div'); $div_tag->id = $this->id; $div_tag->class = $this->getCSSClassString(); $di...
[ "public", "function", "display", "(", ")", "{", "if", "(", "!", "$", "this", "->", "visible", ")", "{", "return", ";", "}", "parent", "::", "display", "(", ")", ";", "$", "ordered_options", "=", "$", "this", "->", "getOrderedOptions", "(", ")", ";", ...
Displays this change-order control
[ "Displays", "this", "change", "-", "order", "control" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatChangeOrder.php#L75-L135
34,013
silverorange/swat
Swat/SwatChangeOrder.php
SwatChangeOrder.&
public function &getOrderedOptions() { if ($this->values === null) { $ordered_options = $this->options; } else { // copy options array so we don't modify the original $options = $this->options; $ordered_options = array(); foreach ($this->va...
php
public function &getOrderedOptions() { if ($this->values === null) { $ordered_options = $this->options; } else { // copy options array so we don't modify the original $options = $this->options; $ordered_options = array(); foreach ($this->va...
[ "public", "function", "&", "getOrderedOptions", "(", ")", "{", "if", "(", "$", "this", "->", "values", "===", "null", ")", "{", "$", "ordered_options", "=", "$", "this", "->", "options", ";", "}", "else", "{", "// copy options array so we don't modify the orig...
Gets the options of this change-order control ordered by the values of this change-order If this control has two or more equivalent values, the order of options having those values is arbitrary. @return array the options of this change-order control ordered by the values of this change-order.
[ "Gets", "the", "options", "of", "this", "change", "-", "order", "control", "ordered", "by", "the", "values", "of", "this", "change", "-", "order" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatChangeOrder.php#L214-L239
34,014
mindkomm/types
lib/Post_Type.php
Post_Type.register
public static function register( $post_types = [] ) { foreach ( $post_types as $post_type => $args ) { $args = self::parse_args( $args ); self::register_extensions( $post_type, $args ); // Defaults for post registration. $args = wp_parse_args( $args['args'], [ 'description' => $args['name_plur...
php
public static function register( $post_types = [] ) { foreach ( $post_types as $post_type => $args ) { $args = self::parse_args( $args ); self::register_extensions( $post_type, $args ); // Defaults for post registration. $args = wp_parse_args( $args['args'], [ 'description' => $args['name_plur...
[ "public", "static", "function", "register", "(", "$", "post_types", "=", "[", "]", ")", "{", "foreach", "(", "$", "post_types", "as", "$", "post_type", "=>", "$", "args", ")", "{", "$", "args", "=", "self", "::", "parse_args", "(", "$", "args", ")", ...
Registers post types based on an array definition. @since 2.0.0 @param array $post_types { An associative array of post types and the arguments used for registering the post type. @type string $name_singular Singular name for post type. @type string $name_plural Optional. Plural name for post type. If not set, ...
[ "Registers", "post", "types", "based", "on", "an", "array", "definition", "." ]
a075d59acf995605427ce8a647a10ed12463b856
https://github.com/mindkomm/types/blob/a075d59acf995605427ce8a647a10ed12463b856/lib/Post_Type.php#L25-L41
34,015
mindkomm/types
lib/Post_Type.php
Post_Type.update
public static function update( $post_types = [] ) { foreach ( $post_types as $post_type => $args ) { $args = self::parse_args( $args ); self::register_extensions( $post_type, $args ); if ( isset( $args['args'] ) ) { add_filter( 'register_post_type_args', function( $defaults, $name ) use ( $post_type, $...
php
public static function update( $post_types = [] ) { foreach ( $post_types as $post_type => $args ) { $args = self::parse_args( $args ); self::register_extensions( $post_type, $args ); if ( isset( $args['args'] ) ) { add_filter( 'register_post_type_args', function( $defaults, $name ) use ( $post_type, $...
[ "public", "static", "function", "update", "(", "$", "post_types", "=", "[", "]", ")", "{", "foreach", "(", "$", "post_types", "as", "$", "post_type", "=>", "$", "args", ")", "{", "$", "args", "=", "self", "::", "parse_args", "(", "$", "args", ")", ...
Updates settings for a post type. Here, you use the same settings that you also use for the `register()` function. Run this function before the `init` hook. @see register_post_type() @since 2.2.0 @param array $post_types An associative array of post types and its arguments that should be updated. See the `register...
[ "Updates", "settings", "for", "a", "post", "type", "." ]
a075d59acf995605427ce8a647a10ed12463b856
https://github.com/mindkomm/types/blob/a075d59acf995605427ce8a647a10ed12463b856/lib/Post_Type.php#L56-L74
34,016
mindkomm/types
lib/Post_Type.php
Post_Type.rename
public static function rename( $post_type, $name_singular, $name_plural ) { if ( ! post_type_exists( $post_type ) ) { return; } ( new Post_Type_Labels( $post_type, $name_singular, $name_plural ) )->init(); }
php
public static function rename( $post_type, $name_singular, $name_plural ) { if ( ! post_type_exists( $post_type ) ) { return; } ( new Post_Type_Labels( $post_type, $name_singular, $name_plural ) )->init(); }
[ "public", "static", "function", "rename", "(", "$", "post_type", ",", "$", "name_singular", ",", "$", "name_plural", ")", "{", "if", "(", "!", "post_type_exists", "(", "$", "post_type", ")", ")", "{", "return", ";", "}", "(", "new", "Post_Type_Labels", "...
Renames a post type. Run this function before the `init` hook. @since 2.1.1 @param string $post_type The post type to rename. @param string $name_singular The new singular name. @param string $name_plural The new plural name.
[ "Renames", "a", "post", "type", "." ]
a075d59acf995605427ce8a647a10ed12463b856
https://github.com/mindkomm/types/blob/a075d59acf995605427ce8a647a10ed12463b856/lib/Post_Type.php#L87-L93
34,017
mindkomm/types
lib/Post_Type.php
Post_Type.admin_columns
public static function admin_columns( $post_types = [] ) { foreach ( $post_types as $name => $column_settings ) { ( new Post_Type_Columns( $name, $column_settings ) )->init(); } }
php
public static function admin_columns( $post_types = [] ) { foreach ( $post_types as $name => $column_settings ) { ( new Post_Type_Columns( $name, $column_settings ) )->init(); } }
[ "public", "static", "function", "admin_columns", "(", "$", "post_types", "=", "[", "]", ")", "{", "foreach", "(", "$", "post_types", "as", "$", "name", "=>", "$", "column_settings", ")", "{", "(", "new", "Post_Type_Columns", "(", "$", "name", ",", "$", ...
Registers admin column settings for a post type. @since 2.1.0 @param array $post_types An associative array of post types, where the name of the post type is the key of an array that defines the admin column settings for this post type.
[ "Registers", "admin", "column", "settings", "for", "a", "post", "type", "." ]
a075d59acf995605427ce8a647a10ed12463b856
https://github.com/mindkomm/types/blob/a075d59acf995605427ce8a647a10ed12463b856/lib/Post_Type.php#L104-L108
34,018
brainworxx/kreXX
src/Service/Factory/Factory.php
Factory.createClass
public function createClass($classname) { // Check for possible overwrite. if (isset($this->rewrite[$classname]) === true) { $classname = $this->rewrite[$classname]; } return new $classname($this); }
php
public function createClass($classname) { // Check for possible overwrite. if (isset($this->rewrite[$classname]) === true) { $classname = $this->rewrite[$classname]; } return new $classname($this); }
[ "public", "function", "createClass", "(", "$", "classname", ")", "{", "// Check for possible overwrite.", "if", "(", "isset", "(", "$", "this", "->", "rewrite", "[", "$", "classname", "]", ")", "===", "true", ")", "{", "$", "classname", "=", "$", "this", ...
Create objects and returns them. Singletons are handled by the pool. @param string $classname @return mixed The requested object.
[ "Create", "objects", "and", "returns", "them", ".", "Singletons", "are", "handled", "by", "the", "pool", "." ]
a03beaa4507ffb391412b9ac61593d263d3f8bca
https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/Service/Factory/Factory.php#L68-L76
34,019
brainworxx/kreXX
src/Service/Factory/Factory.php
Factory.createPool
public static function createPool() { if (Krexx::$pool !== null) { // The pool is there, do nothing. return; } $rewrite = SettingsGetter::getRewriteList(); // Create a new pool where we store all our classes. // We also need to check if we have an ov...
php
public static function createPool() { if (Krexx::$pool !== null) { // The pool is there, do nothing. return; } $rewrite = SettingsGetter::getRewriteList(); // Create a new pool where we store all our classes. // We also need to check if we have an ov...
[ "public", "static", "function", "createPool", "(", ")", "{", "if", "(", "Krexx", "::", "$", "pool", "!==", "null", ")", "{", "// The pool is there, do nothing.", "return", ";", "}", "$", "rewrite", "=", "SettingsGetter", "::", "getRewriteList", "(", ")", ";"...
Create the pool, but only if it is not already there. @internal
[ "Create", "the", "pool", "but", "only", "if", "it", "is", "not", "already", "there", "." ]
a03beaa4507ffb391412b9ac61593d263d3f8bca
https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/Service/Factory/Factory.php#L112-L130
34,020
silverorange/swat
Swat/SwatTableViewCheckAllRow.php
SwatTableViewCheckAllRow.getHtmlHeadEntrySet
public function getHtmlHeadEntrySet() { $this->createEmbeddedWidgets(); $set = parent::getHtmlHeadEntrySet(); $set->addEntrySet($this->check_all->getHtmlHeadEntrySet()); return $set; }
php
public function getHtmlHeadEntrySet() { $this->createEmbeddedWidgets(); $set = parent::getHtmlHeadEntrySet(); $set->addEntrySet($this->check_all->getHtmlHeadEntrySet()); return $set; }
[ "public", "function", "getHtmlHeadEntrySet", "(", ")", "{", "$", "this", "->", "createEmbeddedWidgets", "(", ")", ";", "$", "set", "=", "parent", "::", "getHtmlHeadEntrySet", "(", ")", ";", "$", "set", "->", "addEntrySet", "(", "$", "this", "->", "check_al...
Gets the SwatHtmlHeadEntry objects needed by this check-all row @return SwatHtmlHeadEntrySet the SwatHtmlHeadEntry objects needed by this check-all row. @see SwatUIObject::getHtmlHeadEntrySet()
[ "Gets", "the", "SwatHtmlHeadEntry", "objects", "needed", "by", "this", "check", "-", "all", "row" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTableViewCheckAllRow.php#L141-L149
34,021
silverorange/swat
Swat/SwatTableViewCheckAllRow.php
SwatTableViewCheckAllRow.getAvailableHtmlHeadEntrySet
public function getAvailableHtmlHeadEntrySet() { $this->createEmbeddedWidgets(); $set = parent::getAvailableHtmlHeadEntrySet(); $set->addEntrySet($this->check_all->getAvailableHtmlHeadEntrySet()); return $set; }
php
public function getAvailableHtmlHeadEntrySet() { $this->createEmbeddedWidgets(); $set = parent::getAvailableHtmlHeadEntrySet(); $set->addEntrySet($this->check_all->getAvailableHtmlHeadEntrySet()); return $set; }
[ "public", "function", "getAvailableHtmlHeadEntrySet", "(", ")", "{", "$", "this", "->", "createEmbeddedWidgets", "(", ")", ";", "$", "set", "=", "parent", "::", "getAvailableHtmlHeadEntrySet", "(", ")", ";", "$", "set", "->", "addEntrySet", "(", "$", "this", ...
Gets the SwatHtmlHeadEntry objects that may be needed by this check-all row @return SwatHtmlHeadEntrySet the SwatHtmlHeadEntry objects that may be needed by this check-all row. @see SwatUIObject::getAvailableHtmlHeadEntrySet()
[ "Gets", "the", "SwatHtmlHeadEntry", "objects", "that", "may", "be", "needed", "by", "this", "check", "-", "all", "row" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTableViewCheckAllRow.php#L163-L170
34,022
silverorange/swat
Swat/SwatTableViewCheckAllRow.php
SwatTableViewCheckAllRow.display
public function display() { if (!$this->visible || count($this->view->model) < 2) { return; } parent::display(); $this->createEmbeddedWidgets(); $columns = $this->view->getVisibleColumns(); $tr_tag = new SwatHtmlTag('tr'); $tr_tag->id = $this->...
php
public function display() { if (!$this->visible || count($this->view->model) < 2) { return; } parent::display(); $this->createEmbeddedWidgets(); $columns = $this->view->getVisibleColumns(); $tr_tag = new SwatHtmlTag('tr'); $tr_tag->id = $this->...
[ "public", "function", "display", "(", ")", "{", "if", "(", "!", "$", "this", "->", "visible", "||", "count", "(", "$", "this", "->", "view", "->", "model", ")", "<", "2", ")", "{", "return", ";", "}", "parent", "::", "display", "(", ")", ";", "...
Displays this check-all row
[ "Displays", "this", "check", "-", "all", "row" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTableViewCheckAllRow.php#L217-L274
34,023
silverorange/swat
Swat/SwatTableViewCheckAllRow.php
SwatTableViewCheckAllRow.getInlineJavaScript
public function getInlineJavaScript() { if (count($this->view->model) < 2) { return ''; } // set the controller of the check-all widget return sprintf( "%s_obj.setController(%s);", $this->check_all->id, $this->list_id ); }
php
public function getInlineJavaScript() { if (count($this->view->model) < 2) { return ''; } // set the controller of the check-all widget return sprintf( "%s_obj.setController(%s);", $this->check_all->id, $this->list_id ); }
[ "public", "function", "getInlineJavaScript", "(", ")", "{", "if", "(", "count", "(", "$", "this", "->", "view", "->", "model", ")", "<", "2", ")", "{", "return", "''", ";", "}", "// set the controller of the check-all widget", "return", "sprintf", "(", "\"%s...
Gets the inline JavaScript required for this check-all row @return string the inline JavaScript required for this check-all row. @see SwatTableViewRow::getInlineJavaScript()
[ "Gets", "the", "inline", "JavaScript", "required", "for", "this", "check", "-", "all", "row" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTableViewCheckAllRow.php#L286-L298
34,024
silverorange/swat
Swat/SwatTableViewCheckAllRow.php
SwatTableViewCheckAllRow.createEmbeddedWidgets
private function createEmbeddedWidgets() { if (!$this->widgets_created) { $this->check_all = new SwatCheckAll(); $this->check_all->parent = $this; $this->widgets_created = true; } }
php
private function createEmbeddedWidgets() { if (!$this->widgets_created) { $this->check_all = new SwatCheckAll(); $this->check_all->parent = $this; $this->widgets_created = true; } }
[ "private", "function", "createEmbeddedWidgets", "(", ")", "{", "if", "(", "!", "$", "this", "->", "widgets_created", ")", "{", "$", "this", "->", "check_all", "=", "new", "SwatCheckAll", "(", ")", ";", "$", "this", "->", "check_all", "->", "parent", "=",...
Creates internal widgets required for this check-all row
[ "Creates", "internal", "widgets", "required", "for", "this", "check", "-", "all", "row" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTableViewCheckAllRow.php#L306-L314
34,025
silverorange/swat
Swat/SwatToolbar.php
SwatToolbar.display
public function display() { if (!$this->visible) { return; } SwatWidget::display(); $toolbar_ul = new SwatHtmlTag('ul'); $toolbar_ul->id = $this->id; $toolbar_ul->class = $this->getCSSClassString(); $toolbar_ul->open(); $this->displayChi...
php
public function display() { if (!$this->visible) { return; } SwatWidget::display(); $toolbar_ul = new SwatHtmlTag('ul'); $toolbar_ul->id = $this->id; $toolbar_ul->class = $this->getCSSClassString(); $toolbar_ul->open(); $this->displayChi...
[ "public", "function", "display", "(", ")", "{", "if", "(", "!", "$", "this", "->", "visible", ")", "{", "return", ";", "}", "SwatWidget", "::", "display", "(", ")", ";", "$", "toolbar_ul", "=", "new", "SwatHtmlTag", "(", "'ul'", ")", ";", "$", "too...
Displays this toolbar as an unordered list with each sub-item as a list item
[ "Displays", "this", "toolbar", "as", "an", "unordered", "list", "with", "each", "sub", "-", "item", "as", "a", "list", "item" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatToolbar.php#L35-L50
34,026
silverorange/swat
Swat/SwatToolbar.php
SwatToolbar.getToolLinks
public function getToolLinks() { $tools = array(); foreach ($this->getDescendants('SwatToolLink') as $tool) { if ($tool->getFirstAncestor('SwatToolbar') === $this) { $tools[] = $tool; } } return $tools; }
php
public function getToolLinks() { $tools = array(); foreach ($this->getDescendants('SwatToolLink') as $tool) { if ($tool->getFirstAncestor('SwatToolbar') === $this) { $tools[] = $tool; } } return $tools; }
[ "public", "function", "getToolLinks", "(", ")", "{", "$", "tools", "=", "array", "(", ")", ";", "foreach", "(", "$", "this", "->", "getDescendants", "(", "'SwatToolLink'", ")", "as", "$", "tool", ")", "{", "if", "(", "$", "tool", "->", "getFirstAncesto...
Gets the tool links of this toolbar Returns an the array of {@link SwatToolLink} objects contained by this toolbar. @return array the tool links contained by this toolbar.
[ "Gets", "the", "tool", "links", "of", "this", "toolbar" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatToolbar.php#L81-L91
34,027
silverorange/swat
Swat/SwatToolbar.php
SwatToolbar.displayChildren
protected function displayChildren() { foreach ($this->children as &$child) { ob_start(); $child->display(); $content = ob_get_clean(); if ($content != '') { echo '<li>', $content, '</li>'; } } }
php
protected function displayChildren() { foreach ($this->children as &$child) { ob_start(); $child->display(); $content = ob_get_clean(); if ($content != '') { echo '<li>', $content, '</li>'; } } }
[ "protected", "function", "displayChildren", "(", ")", "{", "foreach", "(", "$", "this", "->", "children", "as", "&", "$", "child", ")", "{", "ob_start", "(", ")", ";", "$", "child", "->", "display", "(", ")", ";", "$", "content", "=", "ob_get_clean", ...
Displays the child widgets of this container
[ "Displays", "the", "child", "widgets", "of", "this", "container" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatToolbar.php#L99-L109
34,028
silverorange/swat
Swat/SwatToolbar.php
SwatToolbar.getCSSClassNames
protected function getCSSClassNames() { $classes = array('swat-toolbar'); if ($this->parent instanceof SwatContainer) { $children = $this->parent->getChildren(); if (end($children) === $this) { $classes[] = 'swat-toolbar-end'; } } ...
php
protected function getCSSClassNames() { $classes = array('swat-toolbar'); if ($this->parent instanceof SwatContainer) { $children = $this->parent->getChildren(); if (end($children) === $this) { $classes[] = 'swat-toolbar-end'; } } ...
[ "protected", "function", "getCSSClassNames", "(", ")", "{", "$", "classes", "=", "array", "(", "'swat-toolbar'", ")", ";", "if", "(", "$", "this", "->", "parent", "instanceof", "SwatContainer", ")", "{", "$", "children", "=", "$", "this", "->", "parent", ...
Gets the array of CSS classes that are applied to this tool bar @return array the array of CSS classes that are applied to this tool bar.
[ "Gets", "the", "array", "of", "CSS", "classes", "that", "are", "applied", "to", "this", "tool", "bar" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatToolbar.php#L119-L132
34,029
mindkomm/types
lib/Post_Type_Labels.php
Post_Type_Labels.add_post_updated_messages
public function add_post_updated_messages( $messages ) { global $post_id; $preview_url = get_preview_post_link( $post_id ); $permalink = get_permalink( $post_id ); // Preview post link. $preview_post_link_html = is_post_type_viewable( $this->post_type ) ? sprintf( ' <a target="_blank" href="%1$s">%2$s<...
php
public function add_post_updated_messages( $messages ) { global $post_id; $preview_url = get_preview_post_link( $post_id ); $permalink = get_permalink( $post_id ); // Preview post link. $preview_post_link_html = is_post_type_viewable( $this->post_type ) ? sprintf( ' <a target="_blank" href="%1$s">%2$s<...
[ "public", "function", "add_post_updated_messages", "(", "$", "messages", ")", "{", "global", "$", "post_id", ";", "$", "preview_url", "=", "get_preview_post_link", "(", "$", "post_id", ")", ";", "$", "permalink", "=", "get_permalink", "(", "$", "post_id", ")",...
Sets post updated messages for custom post types. Check out the `post_updated_messages` in wp-admin/edit-form-advanced.php. @param array $messages An associative array of post types and their messages. @return array The filtered messages.
[ "Sets", "post", "updated", "messages", "for", "custom", "post", "types", "." ]
a075d59acf995605427ce8a647a10ed12463b856
https://github.com/mindkomm/types/blob/a075d59acf995605427ce8a647a10ed12463b856/lib/Post_Type_Labels.php#L153-L197
34,030
silverorange/swat
Swat/SwatMessage.php
SwatMessage.getCSSClassString
public function getCSSClassString() { $classes = array('swat-message'); // legacy style for backwards compatibility if ($this->type === 'notice') { $classes[] = 'swat-message-notification'; } // type-specific style if ($this->type != '') { $c...
php
public function getCSSClassString() { $classes = array('swat-message'); // legacy style for backwards compatibility if ($this->type === 'notice') { $classes[] = 'swat-message-notification'; } // type-specific style if ($this->type != '') { $c...
[ "public", "function", "getCSSClassString", "(", ")", "{", "$", "classes", "=", "array", "(", "'swat-message'", ")", ";", "// legacy style for backwards compatibility", "if", "(", "$", "this", "->", "type", "===", "'notice'", ")", "{", "$", "classes", "[", "]",...
Gets the CSS class names of this message as a string @return string the CSS class names of this message.
[ "Gets", "the", "CSS", "class", "names", "of", "this", "message", "as", "a", "string" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatMessage.php#L138-L157
34,031
brainworxx/kreXX
src/Analyse/Callback/Analyse/Debug.php
Debug.callMe
public function callMe() { // This could be anything, we need to route it. return $this->dispatchStartEvent() . $this->pool->routing->analysisHub( $this->dispatchEventWithModel( static::EVENT_MARKER_ANALYSES_END, $this->pool->create...
php
public function callMe() { // This could be anything, we need to route it. return $this->dispatchStartEvent() . $this->pool->routing->analysisHub( $this->dispatchEventWithModel( static::EVENT_MARKER_ANALYSES_END, $this->pool->create...
[ "public", "function", "callMe", "(", ")", "{", "// This could be anything, we need to route it.", "return", "$", "this", "->", "dispatchStartEvent", "(", ")", ".", "$", "this", "->", "pool", "->", "routing", "->", "analysisHub", "(", "$", "this", "->", "dispatch...
Iterate though the result of the polled debug methods. @return string The generated markup.
[ "Iterate", "though", "the", "result", "of", "the", "polled", "debug", "methods", "." ]
a03beaa4507ffb391412b9ac61593d263d3f8bca
https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/Analyse/Callback/Analyse/Debug.php#L60-L72
34,032
silverorange/swat
Swat/SwatReplicableDisclosure.php
SwatReplicableDisclosure.init
public function init() { $children = array(); foreach ($this->children as $child_widget) { $children[] = $this->remove($child_widget); } $disclosure = new SwatDisclosure(); $disclosure->id = $disclosure->getUniqueId(); $prototype_id = $disclosure->id; ...
php
public function init() { $children = array(); foreach ($this->children as $child_widget) { $children[] = $this->remove($child_widget); } $disclosure = new SwatDisclosure(); $disclosure->id = $disclosure->getUniqueId(); $prototype_id = $disclosure->id; ...
[ "public", "function", "init", "(", ")", "{", "$", "children", "=", "array", "(", ")", ";", "foreach", "(", "$", "this", "->", "children", "as", "$", "child_widget", ")", "{", "$", "children", "[", "]", "=", "$", "this", "->", "remove", "(", "$", ...
Initilizes this replicable disclosure
[ "Initilizes", "this", "replicable", "disclosure" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatReplicableDisclosure.php#L23-L46
34,033
brainworxx/kreXX
src/Controller/TimerController.php
TimerController.timerAction
public function timerAction($string) { // Did we use this one before? if (isset(static::$counterCache[$string]) === true) { // Add another to the counter. ++static::$counterCache[$string]; static::$timekeeping['[' . static::$counterCache[$string] . ']' . $string] ...
php
public function timerAction($string) { // Did we use this one before? if (isset(static::$counterCache[$string]) === true) { // Add another to the counter. ++static::$counterCache[$string]; static::$timekeeping['[' . static::$counterCache[$string] . ']' . $string] ...
[ "public", "function", "timerAction", "(", "$", "string", ")", "{", "// Did we use this one before?", "if", "(", "isset", "(", "static", "::", "$", "counterCache", "[", "$", "string", "]", ")", "===", "true", ")", "{", "// Add another to the counter.", "++", "s...
Takes a "moment" for the benchmark test. @param string $string Defines a "moment" during a benchmark test. The string should be something meaningful, like "Model invoice db call". @return $this Return $this for chaining
[ "Takes", "a", "moment", "for", "the", "benchmark", "test", "." ]
a03beaa4507ffb391412b9ac61593d263d3f8bca
https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/Controller/TimerController.php#L80-L94
34,034
brainworxx/kreXX
src/Controller/TimerController.php
TimerController.timerEndAction
public function timerEndAction() { $this->timerAction('end'); // And we are done. Feedback to the user. $miniBench = $this->miniBenchTo(static::$timekeeping); $this->pool->createClass('Brainworxx\\Krexx\\Controller\\DumpController') ->dumpAction($miniBench, 'kreXX timer')...
php
public function timerEndAction() { $this->timerAction('end'); // And we are done. Feedback to the user. $miniBench = $this->miniBenchTo(static::$timekeeping); $this->pool->createClass('Brainworxx\\Krexx\\Controller\\DumpController') ->dumpAction($miniBench, 'kreXX timer')...
[ "public", "function", "timerEndAction", "(", ")", "{", "$", "this", "->", "timerAction", "(", "'end'", ")", ";", "// And we are done. Feedback to the user.", "$", "miniBench", "=", "$", "this", "->", "miniBenchTo", "(", "static", "::", "$", "timekeeping", ")", ...
Outputs the timer @return $this Return $this for chaining
[ "Outputs", "the", "timer" ]
a03beaa4507ffb391412b9ac61593d263d3f8bca
https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/Controller/TimerController.php#L102-L114
34,035
brainworxx/kreXX
src/Controller/TimerController.php
TimerController.miniBenchTo
protected function miniBenchTo(array $timeKeeping) { // Get the very first key. $start = key($timeKeeping); $totalTime = round((end($timeKeeping) - $timeKeeping[$start]) * 1000, 4); $result['url'] = $this->getCurrentUrl(); $result['total_time'] = $totalTime; $prevMome...
php
protected function miniBenchTo(array $timeKeeping) { // Get the very first key. $start = key($timeKeeping); $totalTime = round((end($timeKeeping) - $timeKeeping[$start]) * 1000, 4); $result['url'] = $this->getCurrentUrl(); $result['total_time'] = $totalTime; $prevMome...
[ "protected", "function", "miniBenchTo", "(", "array", "$", "timeKeeping", ")", "{", "// Get the very first key.", "$", "start", "=", "key", "(", "$", "timeKeeping", ")", ";", "$", "totalTime", "=", "round", "(", "(", "end", "(", "$", "timeKeeping", ")", "-...
The benchmark main function. @param array $timeKeeping The timekeeping array. @return array The benchmark array. @see http://php.net/manual/de/function.microtime.php @author gomodo at free dot fr
[ "The", "benchmark", "main", "function", "." ]
a03beaa4507ffb391412b9ac61593d263d3f8bca
https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/Controller/TimerController.php#L128-L149
34,036
silverorange/swat
Swat/SwatUI.php
SwatUI.loadFromXML
public function loadFromXML($filename, $container = null, $validate = null) { if ($container === null) { $container = $this->root; } else { // ensure container belongs to this UI $found = false; $object = $container; while ($object !== null...
php
public function loadFromXML($filename, $container = null, $validate = null) { if ($container === null) { $container = $this->root; } else { // ensure container belongs to this UI $found = false; $object = $container; while ($object !== null...
[ "public", "function", "loadFromXML", "(", "$", "filename", ",", "$", "container", "=", "null", ",", "$", "validate", "=", "null", ")", "{", "if", "(", "$", "container", "===", "null", ")", "{", "$", "container", "=", "$", "this", "->", "root", ";", ...
Loads a UI tree from an XML file @param string $filename the filename of the XML UI file to load. @param SwatContainer $container optional. The container into which to load the UI tree. The specified container must already be a member of this UI. If not specified, the UI tree will be loaded into the root container of ...
[ "Loads", "a", "UI", "tree", "from", "an", "XML", "file" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatUI.php#L176-L294
34,037
silverorange/swat
Swat/SwatUI.php
SwatUI.getWidget
public function getWidget($id) { if (array_key_exists($id, $this->widgets)) { return $this->widgets[$id]; } else { throw new SwatWidgetNotFoundException( "Widget with an id of '{$id}' not found.", 0, $id ); }...
php
public function getWidget($id) { if (array_key_exists($id, $this->widgets)) { return $this->widgets[$id]; } else { throw new SwatWidgetNotFoundException( "Widget with an id of '{$id}' not found.", 0, $id ); }...
[ "public", "function", "getWidget", "(", "$", "id", ")", "{", "if", "(", "array_key_exists", "(", "$", "id", ",", "$", "this", "->", "widgets", ")", ")", "{", "return", "$", "this", "->", "widgets", "[", "$", "id", "]", ";", "}", "else", "{", "thr...
Retrieves a widget from the internal widget list Looks up a widget in the widget list by the widget's unique identifier. @param string $id the id of the widget to retrieve. @return SwatWidget a reference to the widget. @throws SwatWidgetNotFoundException
[ "Retrieves", "a", "widget", "from", "the", "internal", "widget", "list" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatUI.php#L326-L337
34,038
silverorange/swat
Swat/SwatUI.php
SwatUI.displayTidy
public function displayTidy() { $breaking_tags = '@</?(div|p|table|tr|td|ul|li|ol|dl|option)[^<>]*>@ui'; ob_start(); $this->display(); $buffer = ob_get_clean(); $tidy = preg_replace($breaking_tags, "\n\\0\n", $buffer); $tidy = str_replace("\n\n", "\n", $tidy); ...
php
public function displayTidy() { $breaking_tags = '@</?(div|p|table|tr|td|ul|li|ol|dl|option)[^<>]*>@ui'; ob_start(); $this->display(); $buffer = ob_get_clean(); $tidy = preg_replace($breaking_tags, "\n\\0\n", $buffer); $tidy = str_replace("\n\n", "\n", $tidy); ...
[ "public", "function", "displayTidy", "(", ")", "{", "$", "breaking_tags", "=", "'@</?(div|p|table|tr|td|ul|li|ol|dl|option)[^<>]*>@ui'", ";", "ob_start", "(", ")", ";", "$", "this", "->", "display", "(", ")", ";", "$", "buffer", "=", "ob_get_clean", "(", ")", ...
Displays this interface with tidy XHTML The display() method is called and the output is cleaned up. @deprecated This method breaks some elements of swat by adding whitespace between nodes. Use {@link SwatUI::display()} instead.
[ "Displays", "this", "interface", "with", "tidy", "XHTML" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatUI.php#L406-L416
34,039
silverorange/swat
Swat/SwatUI.php
SwatUI.parseUI
private function parseUI($node, SwatUIObject $parent) { array_push($this->stack, $parent); foreach ($node->childNodes as $child_node) { // only parse element nodes. ignore text nodes if ($child_node->nodeType == XML_ELEMENT_NODE) { if ($child_node->nodeName =...
php
private function parseUI($node, SwatUIObject $parent) { array_push($this->stack, $parent); foreach ($node->childNodes as $child_node) { // only parse element nodes. ignore text nodes if ($child_node->nodeType == XML_ELEMENT_NODE) { if ($child_node->nodeName =...
[ "private", "function", "parseUI", "(", "$", "node", ",", "SwatUIObject", "$", "parent", ")", "{", "array_push", "(", "$", "this", "->", "stack", ",", "$", "parent", ")", ";", "foreach", "(", "$", "node", "->", "childNodes", "as", "$", "child_node", ")"...
Recursivly parses an XML node into a widget tree Calls self on all node children. @param Object $node the XML node to begin with. @param SwatUIObject $parent the parent object (usually a SwatContainer) to add parsed objects to. @throws SwatDuplicateIdException, SwatInvalidClassException, SwatInvalidPropertyException...
[ "Recursivly", "parses", "an", "XML", "node", "into", "a", "widget", "tree" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatUI.php#L467-L502
34,040
silverorange/swat
Swat/SwatUI.php
SwatUI.checkParsedObject
private function checkParsedObject( SwatUIObject $parsed_object, $element_name ) { if ($element_name == 'widget') { if ( class_exists('SwatWidget') && $parsed_object instanceof SwatWidget && $parsed_object->id !== null )...
php
private function checkParsedObject( SwatUIObject $parsed_object, $element_name ) { if ($element_name == 'widget') { if ( class_exists('SwatWidget') && $parsed_object instanceof SwatWidget && $parsed_object->id !== null )...
[ "private", "function", "checkParsedObject", "(", "SwatUIObject", "$", "parsed_object", ",", "$", "element_name", ")", "{", "if", "(", "$", "element_name", "==", "'widget'", ")", "{", "if", "(", "class_exists", "(", "'SwatWidget'", ")", "&&", "$", "parsed_objec...
Does some error checking on a parsed object Checks to make sure widget objects are created from widget elements and other objects are created from object elements. @param SwatUIObject $parsed_object an object that has been parsed from SwatML. @param string $element_name the name of the XML element node the object was...
[ "Does", "some", "error", "checking", "on", "a", "parsed", "object" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatUI.php#L520-L568
34,041
silverorange/swat
Swat/SwatUI.php
SwatUI.attachToParent
private function attachToParent(SwatUIObject $object, SwatUIParent $parent) { if ($parent instanceof SwatUIParent) { $parent->addChild($object); } else { $class_name = get_class($parent); throw new SwatDoesNotImplementException( "Can not add object...
php
private function attachToParent(SwatUIObject $object, SwatUIParent $parent) { if ($parent instanceof SwatUIParent) { $parent->addChild($object); } else { $class_name = get_class($parent); throw new SwatDoesNotImplementException( "Can not add object...
[ "private", "function", "attachToParent", "(", "SwatUIObject", "$", "object", ",", "SwatUIParent", "$", "parent", ")", "{", "if", "(", "$", "parent", "instanceof", "SwatUIParent", ")", "{", "$", "parent", "->", "addChild", "(", "$", "object", ")", ";", "}",...
Attaches a widget to a parent widget in the widget tree @param SwatUIObject $object the object to attach. @param SwatUIParent $parent the parent to attach the widget to. @throws SwatDoesNotImplementException
[ "Attaches", "a", "widget", "to", "a", "parent", "widget", "in", "the", "widget", "tree" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatUI.php#L581-L594
34,042
silverorange/swat
Swat/SwatUI.php
SwatUI.parseObject
private function parseObject($node) { // class is required in the schema $class = $node->getAttribute('class'); if (!class_exists($class)) { throw new SwatClassNotFoundException( "Class '{$class}' is not defined.", 0, $class ...
php
private function parseObject($node) { // class is required in the schema $class = $node->getAttribute('class'); if (!class_exists($class)) { throw new SwatClassNotFoundException( "Class '{$class}' is not defined.", 0, $class ...
[ "private", "function", "parseObject", "(", "$", "node", ")", "{", "// class is required in the schema", "$", "class", "=", "$", "node", "->", "getAttribute", "(", "'class'", ")", ";", "if", "(", "!", "class_exists", "(", "$", "class", ")", ")", "{", "throw...
Parses an XML object or widget element node into a PHP object @param array $node the XML element node to parse. @return SwatUIObject a reference to the object created. @throws SwatClassNotFoundException
[ "Parses", "an", "XML", "object", "or", "widget", "element", "node", "into", "a", "PHP", "object" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatUI.php#L608-L637
34,043
silverorange/swat
Swat/SwatUI.php
SwatUI.parseProperty
private function parseProperty($property_node, SwatUIObject $object) { $class_properties = get_class_vars(get_class($object)); // name is required in the schema $name = trim($property_node->getAttribute('name')); $value = $property_node->nodeValue; $array_property = false; ...
php
private function parseProperty($property_node, SwatUIObject $object) { $class_properties = get_class_vars(get_class($object)); // name is required in the schema $name = trim($property_node->getAttribute('name')); $value = $property_node->nodeValue; $array_property = false; ...
[ "private", "function", "parseProperty", "(", "$", "property_node", ",", "SwatUIObject", "$", "object", ")", "{", "$", "class_properties", "=", "get_class_vars", "(", "get_class", "(", "$", "object", ")", ")", ";", "// name is required in the schema", "$", "name", ...
Parses a single XML property node and applies it to an object @param array $property_node the XML property node to parse. @param SwatUIObject $object the object to apply the property to. @throws SwatInvalidPropertyException, SwatInvalidPropertyTypeException, SwatInvalidConstantExpressionException, SwatUndefinedConsta...
[ "Parses", "a", "single", "XML", "property", "node", "and", "applies", "it", "to", "an", "object" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatUI.php#L652-L724
34,044
silverorange/swat
Swat/SwatUI.php
SwatUI.parseValue
private function parseValue( $name, $value, $type, $translatable, SwatUIObject $object ) { switch ($type) { case 'string': return $this->translateValue($value, $translatable, $object); case 'boolean': return $val...
php
private function parseValue( $name, $value, $type, $translatable, SwatUIObject $object ) { switch ($type) { case 'string': return $this->translateValue($value, $translatable, $object); case 'boolean': return $val...
[ "private", "function", "parseValue", "(", "$", "name", ",", "$", "value", ",", "$", "type", ",", "$", "translatable", ",", "SwatUIObject", "$", "object", ")", "{", "switch", "(", "$", "type", ")", "{", "case", "'string'", ":", "return", "$", "this", ...
Parses the value of a property Also does error notification in the event of a missing or unknown type attribute. @param string $name the name of the property. @param string $value the value of the property. @param string $type the type of the value. @param boolean translatable whether the property is translatable. @p...
[ "Parses", "the", "value", "of", "a", "property" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatUI.php#L747-L798
34,045
silverorange/swat
Swat/SwatUI.php
SwatUI.parseMapping
private function parseMapping($name, $value, SwatUIObject $object) { $renderer = null; $renderer_container = null; foreach (array_reverse($this->stack) as $ancestor) { if ($renderer === null && $ancestor instanceof SwatCellRenderer) { $renderer = $ancestor; ...
php
private function parseMapping($name, $value, SwatUIObject $object) { $renderer = null; $renderer_container = null; foreach (array_reverse($this->stack) as $ancestor) { if ($renderer === null && $ancestor instanceof SwatCellRenderer) { $renderer = $ancestor; ...
[ "private", "function", "parseMapping", "(", "$", "name", ",", "$", "value", ",", "SwatUIObject", "$", "object", ")", "{", "$", "renderer", "=", "null", ";", "$", "renderer_container", "=", "null", ";", "foreach", "(", "array_reverse", "(", "$", "this", "...
Handle a 'data' type property value by parsing it into a mapping object @param string $name the name of the property. @param string $value the value of the property. @param SwatUIObject $object the object the property applies to. @return SwatCellRendererMapping the parsed mapping object. @throws SwatInvalidPropertyT...
[ "Handle", "a", "data", "type", "property", "value", "by", "parsing", "it", "into", "a", "mapping", "object" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatUI.php#L814-L846
34,046
silverorange/swat
Swat/SwatUI.php
SwatUI.translateValue
private function translateValue($value, $translatable, SwatUIObject $object) { if (!$translatable) { return $value; } if ($this->translation_callback !== null) { return call_user_func($this->translation_callback, $value); } return $value; }
php
private function translateValue($value, $translatable, SwatUIObject $object) { if (!$translatable) { return $value; } if ($this->translation_callback !== null) { return call_user_func($this->translation_callback, $value); } return $value; }
[ "private", "function", "translateValue", "(", "$", "value", ",", "$", "translatable", ",", "SwatUIObject", "$", "object", ")", "{", "if", "(", "!", "$", "translatable", ")", "{", "return", "$", "value", ";", "}", "if", "(", "$", "this", "->", "translat...
Translates a property value if possible @param string $value the value to be translated. @param boolean $translatable whether or not it is possible to translate the value. @param SwatUIObject $object the object the property value applies to. @return string the translated value if possible, otherwise $value.
[ "Translates", "a", "property", "value", "if", "possible" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatUI.php#L861-L872
34,047
silverorange/swat
Swat/SwatNumericEntry.php
SwatNumericEntry.process
public function process() { parent::process(); try { $value = $this->getNumericValue($this->value); } catch (SwatIntegerOverflowException $e) { $value = null; } if ($value !== null) { if ( $this->minimum_value !== null && ...
php
public function process() { parent::process(); try { $value = $this->getNumericValue($this->value); } catch (SwatIntegerOverflowException $e) { $value = null; } if ($value !== null) { if ( $this->minimum_value !== null && ...
[ "public", "function", "process", "(", ")", "{", "parent", "::", "process", "(", ")", ";", "try", "{", "$", "value", "=", "$", "this", "->", "getNumericValue", "(", "$", "this", "->", "value", ")", ";", "}", "catch", "(", "SwatIntegerOverflowException", ...
Checks the minimum and maximum values of this numeric entry widget
[ "Checks", "the", "minimum", "and", "maximum", "values", "of", "this", "numeric", "entry", "widget" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatNumericEntry.php#L67-L115
34,048
silverorange/swat
Swat/SwatNumericEntry.php
SwatNumericEntry.getValidationMessage
protected function getValidationMessage($id) { switch ($id) { case 'below-minimum': $text = $this->show_field_title_in_messages ? Swat::_('The %%s field must not be less than %s.') : Swat::_('This field must not be less than %s.'); ...
php
protected function getValidationMessage($id) { switch ($id) { case 'below-minimum': $text = $this->show_field_title_in_messages ? Swat::_('The %%s field must not be less than %s.') : Swat::_('This field must not be less than %s.'); ...
[ "protected", "function", "getValidationMessage", "(", "$", "id", ")", "{", "switch", "(", "$", "id", ")", "{", "case", "'below-minimum'", ":", "$", "text", "=", "$", "this", "->", "show_field_title_in_messages", "?", "Swat", "::", "_", "(", "'The %%s field m...
Gets a validation message for this numeric entry @see SwatEntry::getValidationMessage() @param string $id the string identifier of the validation message. @return SwatMessage the validation message.
[ "Gets", "a", "validation", "message", "for", "this", "numeric", "entry" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatNumericEntry.php#L128-L153
34,049
silverorange/swat
Swat/SwatTimeEntry.php
SwatTimeEntry.display
public function display() { if (!$this->visible) { return; } parent::display(); $div_tag = new SwatHtmlTag('div'); $div_tag->id = $this->id; $div_tag->class = $this->getCSSClassString(); $div_tag->open(); echo '<span class="swat-time-ent...
php
public function display() { if (!$this->visible) { return; } parent::display(); $div_tag = new SwatHtmlTag('div'); $div_tag->id = $this->id; $div_tag->class = $this->getCSSClassString(); $div_tag->open(); echo '<span class="swat-time-ent...
[ "public", "function", "display", "(", ")", "{", "if", "(", "!", "$", "this", "->", "visible", ")", "{", "return", ";", "}", "parent", "::", "display", "(", ")", ";", "$", "div_tag", "=", "new", "SwatHtmlTag", "(", "'div'", ")", ";", "$", "div_tag",...
Displays this time entry
[ "Displays", "this", "time", "entry" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTimeEntry.php#L190-L271
34,050
silverorange/swat
Swat/SwatTimeEntry.php
SwatTimeEntry.isStartTimeValid
protected function isStartTimeValid() { $this->valid_range_start->setYear(self::$date_year); $this->valid_range_start->setMonth(self::$date_month); $this->valid_range_start->setDay(self::$date_day); $this->valid_range_start->setTZById('UTC'); return SwatDate::compare( ...
php
protected function isStartTimeValid() { $this->valid_range_start->setYear(self::$date_year); $this->valid_range_start->setMonth(self::$date_month); $this->valid_range_start->setDay(self::$date_day); $this->valid_range_start->setTZById('UTC'); return SwatDate::compare( ...
[ "protected", "function", "isStartTimeValid", "(", ")", "{", "$", "this", "->", "valid_range_start", "->", "setYear", "(", "self", "::", "$", "date_year", ")", ";", "$", "this", "->", "valid_range_start", "->", "setMonth", "(", "self", "::", "$", "date_month"...
Checks if the entered time is valid with respect to the valid start time @return boolean true if the entered time is on or after the valid start time and false if the entered time is before the valid start time.
[ "Checks", "if", "the", "entered", "time", "is", "valid", "with", "respect", "to", "the", "valid", "start", "time" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTimeEntry.php#L586-L598
34,051
silverorange/swat
Swat/SwatTimeEntry.php
SwatTimeEntry.isEndTimeValid
protected function isEndTimeValid() { $this->valid_range_end->setYear(self::$date_year); $this->valid_range_end->setMonth(self::$date_month); $this->valid_range_end->setDay(self::$date_day); $this->valid_range_end->setTZById('UTC'); return SwatDate::compare($this->value, $th...
php
protected function isEndTimeValid() { $this->valid_range_end->setYear(self::$date_year); $this->valid_range_end->setMonth(self::$date_month); $this->valid_range_end->setDay(self::$date_day); $this->valid_range_end->setTZById('UTC'); return SwatDate::compare($this->value, $th...
[ "protected", "function", "isEndTimeValid", "(", ")", "{", "$", "this", "->", "valid_range_end", "->", "setYear", "(", "self", "::", "$", "date_year", ")", ";", "$", "this", "->", "valid_range_end", "->", "setMonth", "(", "self", "::", "$", "date_month", ")...
Checks if the entered time is valid with respect to the valid end time @return boolean true if the entered time is before the valid end time and false if the entered time is on or after the valid end time.
[ "Checks", "if", "the", "entered", "time", "is", "valid", "with", "respect", "to", "the", "valid", "end", "time" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTimeEntry.php#L610-L619
34,052
silverorange/swat
Swat/SwatTimeEntry.php
SwatTimeEntry.createCompositeWidgets
protected function createCompositeWidgets() { if ($this->display_parts & self::HOUR) { $this->addCompositeWidget( $this->createHourFlydown(), 'hour_flydown' ); if ($this->twelve_hour) { $this->addCompositeWidget( ...
php
protected function createCompositeWidgets() { if ($this->display_parts & self::HOUR) { $this->addCompositeWidget( $this->createHourFlydown(), 'hour_flydown' ); if ($this->twelve_hour) { $this->addCompositeWidget( ...
[ "protected", "function", "createCompositeWidgets", "(", ")", "{", "if", "(", "$", "this", "->", "display_parts", "&", "self", "::", "HOUR", ")", "{", "$", "this", "->", "addCompositeWidget", "(", "$", "this", "->", "createHourFlydown", "(", ")", ",", "'hou...
Creates the composite widgets used by this time entry @see SwatWidget::createCompositeWidgets()
[ "Creates", "the", "composite", "widgets", "used", "by", "this", "time", "entry" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTimeEntry.php#L629-L658
34,053
silverorange/swat
Swat/SwatTimeEntry.php
SwatTimeEntry.createHourFlydown
private function createHourFlydown() { $flydown = new SwatFlydown($this->id . '_hour'); $flydown->classes = array('swat-time-entry-hour'); if ($this->twelve_hour) { for ($i = 1; $i <= 12; $i++) { $flydown->addOption($i, $i); } } else { ...
php
private function createHourFlydown() { $flydown = new SwatFlydown($this->id . '_hour'); $flydown->classes = array('swat-time-entry-hour'); if ($this->twelve_hour) { for ($i = 1; $i <= 12; $i++) { $flydown->addOption($i, $i); } } else { ...
[ "private", "function", "createHourFlydown", "(", ")", "{", "$", "flydown", "=", "new", "SwatFlydown", "(", "$", "this", "->", "id", ".", "'_hour'", ")", ";", "$", "flydown", "->", "classes", "=", "array", "(", "'swat-time-entry-hour'", ")", ";", "if", "(...
Creates the hour flydown for this time entry @return the hour flydown for this time entry.
[ "Creates", "the", "hour", "flydown", "for", "this", "time", "entry" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTimeEntry.php#L668-L684
34,054
silverorange/swat
Swat/SwatTimeEntry.php
SwatTimeEntry.createMinuteFlydown
private function createMinuteFlydown() { $flydown = new SwatFlydown($this->id . '_minute'); $flydown->classes = array('swat-time-entry-minute'); for ($i = 0; $i <= 59; $i++) { $flydown->addOption($i, str_pad($i, 2, '0', STR_PAD_LEFT)); } return $flydown; }
php
private function createMinuteFlydown() { $flydown = new SwatFlydown($this->id . '_minute'); $flydown->classes = array('swat-time-entry-minute'); for ($i = 0; $i <= 59; $i++) { $flydown->addOption($i, str_pad($i, 2, '0', STR_PAD_LEFT)); } return $flydown; }
[ "private", "function", "createMinuteFlydown", "(", ")", "{", "$", "flydown", "=", "new", "SwatFlydown", "(", "$", "this", "->", "id", ".", "'_minute'", ")", ";", "$", "flydown", "->", "classes", "=", "array", "(", "'swat-time-entry-minute'", ")", ";", "for...
Creates the minute flydown for this time entry @return SwatFlydown the minute flydown for this time entry.
[ "Creates", "the", "minute", "flydown", "for", "this", "time", "entry" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTimeEntry.php#L694-L704
34,055
silverorange/swat
Swat/SwatTimeEntry.php
SwatTimeEntry.getFormattedTime
private function getFormattedTime(SwatDate $time) { $format = ''; if ($this->display_parts & self::HOUR) { $format .= $this->twelve_hour ? 'h' : 'H'; if ($this->display_parts & (self::MINUTE | self::SECOND)) { $format .= ':'; } } ...
php
private function getFormattedTime(SwatDate $time) { $format = ''; if ($this->display_parts & self::HOUR) { $format .= $this->twelve_hour ? 'h' : 'H'; if ($this->display_parts & (self::MINUTE | self::SECOND)) { $format .= ':'; } } ...
[ "private", "function", "getFormattedTime", "(", "SwatDate", "$", "time", ")", "{", "$", "format", "=", "''", ";", "if", "(", "$", "this", "->", "display_parts", "&", "self", "::", "HOUR", ")", "{", "$", "format", ".=", "$", "this", "->", "twelve_hour",...
Formats a time for display in error messages @param SwatDate $time the time to format. @return string the formatted time.
[ "Formats", "a", "time", "for", "display", "in", "error", "messages" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTimeEntry.php#L756-L783
34,056
rollun-com/rollun-datastore
src/DataStore/src/DataStore/CsvIntId.php
CsvIntId.checkIntegrityData
public function checkIntegrityData() { $prevId = 0; $identifier = $this->getIdentifier(); foreach ($this as $item) { $this->checkIdentifierType($item[$identifier]); if ($item[$identifier] < $prevId) { throw new DataStoreException("This storage type s...
php
public function checkIntegrityData() { $prevId = 0; $identifier = $this->getIdentifier(); foreach ($this as $item) { $this->checkIdentifierType($item[$identifier]); if ($item[$identifier] < $prevId) { throw new DataStoreException("This storage type s...
[ "public", "function", "checkIntegrityData", "(", ")", "{", "$", "prevId", "=", "0", ";", "$", "identifier", "=", "$", "this", "->", "getIdentifier", "(", ")", ";", "foreach", "(", "$", "this", "as", "$", "item", ")", "{", "$", "this", "->", "checkIde...
Checks integrity data @return bool @throws \rollun\datastore\DataStore\DataStoreException
[ "Checks", "integrity", "data" ]
ef433b58b94e1c311123ad1b2a0360e95a636bd1
https://github.com/rollun-com/rollun-datastore/blob/ef433b58b94e1c311123ad1b2a0360e95a636bd1/src/DataStore/src/DataStore/CsvIntId.php#L112-L128
34,057
brainworxx/kreXX
src/Errorhandler/Fatal.php
Fatal.shutdownCallback
public function shutdownCallback() { $error = error_get_last(); // Do we have an error at all? if ($error !== null && $this->getIsActive() === true) { // Do we need to check this one, according to our settings? $translatedError = $this->translateErrorType($error[sta...
php
public function shutdownCallback() { $error = error_get_last(); // Do we have an error at all? if ($error !== null && $this->getIsActive() === true) { // Do we need to check this one, according to our settings? $translatedError = $this->translateErrorType($error[sta...
[ "public", "function", "shutdownCallback", "(", ")", "{", "$", "error", "=", "error_get_last", "(", ")", ";", "// Do we have an error at all?", "if", "(", "$", "error", "!==", "null", "&&", "$", "this", "->", "getIsActive", "(", ")", "===", "true", ")", "{"...
The registered shutdown callback handles fatal errors. In case that this handler is active, it will check whether a fatal error has happened and give additional info like backtrace, object analysis of the backtrace and code samples to all stations in the backtrace.
[ "The", "registered", "shutdown", "callback", "handles", "fatal", "errors", "." ]
a03beaa4507ffb391412b9ac61593d263d3f8bca
https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/Errorhandler/Fatal.php#L93-L127
34,058
silverorange/swat
Swat/SwatFloatEntry.php
SwatFloatEntry.process
public function process() { parent::process(); if ($this->value === null) { return; } $float_value = $this->getNumericValue($this->value); if ($float_value === null) { $this->addMessage($this->getValidationMessage('float')); } else { ...
php
public function process() { parent::process(); if ($this->value === null) { return; } $float_value = $this->getNumericValue($this->value); if ($float_value === null) { $this->addMessage($this->getValidationMessage('float')); } else { ...
[ "public", "function", "process", "(", ")", "{", "parent", "::", "process", "(", ")", ";", "if", "(", "$", "this", "->", "value", "===", "null", ")", "{", "return", ";", "}", "$", "float_value", "=", "$", "this", "->", "getNumericValue", "(", "$", "...
Checks to make sure value is a number If the value of this widget is not a number then an error message is attached to this widget.
[ "Checks", "to", "make", "sure", "value", "is", "a", "number" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatFloatEntry.php#L20-L35
34,059
silverorange/swat
Swat/SwatFloatEntry.php
SwatFloatEntry.getDisplayValue
protected function getDisplayValue($value) { if (is_numeric($value)) { $locale = SwatI18NLocale::get(); $thousands_separator = $this->show_thousands_separator ? null : ''; $value = $locale->formatNumber($value, null, array( 'thousands_separator' => $thous...
php
protected function getDisplayValue($value) { if (is_numeric($value)) { $locale = SwatI18NLocale::get(); $thousands_separator = $this->show_thousands_separator ? null : ''; $value = $locale->formatNumber($value, null, array( 'thousands_separator' => $thous...
[ "protected", "function", "getDisplayValue", "(", "$", "value", ")", "{", "if", "(", "is_numeric", "(", "$", "value", ")", ")", "{", "$", "locale", "=", "SwatI18NLocale", "::", "get", "(", ")", ";", "$", "thousands_separator", "=", "$", "this", "->", "s...
Formats a float value to display @param string $value the value to format for display. @return string the formatted value.
[ "Formats", "a", "float", "value", "to", "display" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatFloatEntry.php#L47-L61
34,060
brainworxx/kreXX
src/Analyse/Callback/Analyse/Objects/DebugMethods.php
DebugMethods.callMe
public function callMe() { /** @var \Brainworxx\Krexx\Service\Reflection\ReflectionClass $reflectionClass */ $reflectionClass = $this->parameters[static::PARAM_REF]; $data = $reflectionClass->getData(); $output = $this->dispatchStartEvent(); foreach (explode(',', $this->pool...
php
public function callMe() { /** @var \Brainworxx\Krexx\Service\Reflection\ReflectionClass $reflectionClass */ $reflectionClass = $this->parameters[static::PARAM_REF]; $data = $reflectionClass->getData(); $output = $this->dispatchStartEvent(); foreach (explode(',', $this->pool...
[ "public", "function", "callMe", "(", ")", "{", "/** @var \\Brainworxx\\Krexx\\Service\\Reflection\\ReflectionClass $reflectionClass */", "$", "reflectionClass", "=", "$", "this", "->", "parameters", "[", "static", "::", "PARAM_REF", "]", ";", "$", "data", "=", "$", "r...
Calls all configured debug methods in die class. I've added a try and an empty error function callback to catch possible problems with this. This will, of cause, not stop a possible fatal in the function itself. @return string The generated markup.
[ "Calls", "all", "configured", "debug", "methods", "in", "die", "class", "." ]
a03beaa4507ffb391412b9ac61593d263d3f8bca
https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/Analyse/Callback/Analyse/Objects/DebugMethods.php#L71-L126
34,061
brainworxx/kreXX
src/Analyse/Callback/Analyse/Objects/DebugMethods.php
DebugMethods.checkIfAccessible
protected function checkIfAccessible($data, $funcName, ReflectionClass $reflectionClass) { // We need to check if: // 1.) Method exists. It may be protected though. // 2.) Method can be called. There may be a magical method, though. // 3.) It's not blacklisted. if (method_exi...
php
protected function checkIfAccessible($data, $funcName, ReflectionClass $reflectionClass) { // We need to check if: // 1.) Method exists. It may be protected though. // 2.) Method can be called. There may be a magical method, though. // 3.) It's not blacklisted. if (method_exi...
[ "protected", "function", "checkIfAccessible", "(", "$", "data", ",", "$", "funcName", ",", "ReflectionClass", "$", "reflectionClass", ")", "{", "// We need to check if:", "// 1.) Method exists. It may be protected though.", "// 2.) Method can be called. There may be a magical metho...
Check if we are allowed to access this class method as a debug method for this class. @param mixed $data The class that we are currently analysing. @param string $funcName The name of the function that we want to call. @param ReflectionClass $reflectionClass The reflection of the class that we are currently analysing....
[ "Check", "if", "we", "are", "allowed", "to", "access", "this", "class", "method", "as", "a", "debug", "method", "for", "this", "class", "." ]
a03beaa4507ffb391412b9ac61593d263d3f8bca
https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/Analyse/Callback/Analyse/Objects/DebugMethods.php#L141-L167
34,062
brainworxx/kreXX
src/Analyse/Routing/Process/ProcessNull.php
ProcessNull.process
public function process(Model $model) { $data = 'NULL'; return $this->pool->render->renderSingleChild( $model->setData($data)->setNormal($data)->setType(static::TYPE_NULL) ); }
php
public function process(Model $model) { $data = 'NULL'; return $this->pool->render->renderSingleChild( $model->setData($data)->setNormal($data)->setType(static::TYPE_NULL) ); }
[ "public", "function", "process", "(", "Model", "$", "model", ")", "{", "$", "data", "=", "'NULL'", ";", "return", "$", "this", "->", "pool", "->", "render", "->", "renderSingleChild", "(", "$", "model", "->", "setData", "(", "$", "data", ")", "->", "...
Render a 'dump' for a NULL value. @param Model $model The model with the data for the output. @return string The rendered markup.
[ "Render", "a", "dump", "for", "a", "NULL", "value", "." ]
a03beaa4507ffb391412b9ac61593d263d3f8bca
https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/Analyse/Routing/Process/ProcessNull.php#L57-L63
34,063
brainworxx/kreXX
src/Controller/BacktraceController.php
BacktraceController.backtraceAction
public function backtraceAction(array $backtrace = null) { if ($this->pool->emergencyHandler->checkMaxCall() === true) { // Called too often, we might get into trouble here! return $this; } $this->pool->reset(); // Find caller. $caller = $this->calle...
php
public function backtraceAction(array $backtrace = null) { if ($this->pool->emergencyHandler->checkMaxCall() === true) { // Called too often, we might get into trouble here! return $this; } $this->pool->reset(); // Find caller. $caller = $this->calle...
[ "public", "function", "backtraceAction", "(", "array", "$", "backtrace", "=", "null", ")", "{", "if", "(", "$", "this", "->", "pool", "->", "emergencyHandler", "->", "checkMaxCall", "(", ")", "===", "true", ")", "{", "// Called too often, we might get into troub...
Outputs a backtrace. @param array|null $backtrace An already existing backtrace. @return $this Return $this for chaining.
[ "Outputs", "a", "backtrace", "." ]
a03beaa4507ffb391412b9ac61593d263d3f8bca
https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/Controller/BacktraceController.php#L54-L96
34,064
silverorange/swat
Swat/SwatTableViewCheckboxColumn.php
SwatTableViewCheckboxColumn.init
public function init() { parent::init(); $this->createEmbeddedWidgets(); $this->check_all->init(); if ($this->show_check_all && $this->visible) { $this->parent->appendRow($this->check_all); } }
php
public function init() { parent::init(); $this->createEmbeddedWidgets(); $this->check_all->init(); if ($this->show_check_all && $this->visible) { $this->parent->appendRow($this->check_all); } }
[ "public", "function", "init", "(", ")", "{", "parent", "::", "init", "(", ")", ";", "$", "this", "->", "createEmbeddedWidgets", "(", ")", ";", "$", "this", "->", "check_all", "->", "init", "(", ")", ";", "if", "(", "$", "this", "->", "show_check_all"...
Initializes this checkbox column
[ "Initializes", "this", "checkbox", "column" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTableViewCheckboxColumn.php#L121-L131
34,065
silverorange/swat
Swat/SwatTableViewCheckboxColumn.php
SwatTableViewCheckboxColumn.process
public function process() { parent::process(); if ($this->show_check_all) { $this->check_all->process(); } // this is part of the old selection API $item_name = $this->getCheckboxRendererId(); if (isset($_POST[$item_name]) && is_array($_POST[$item_name])...
php
public function process() { parent::process(); if ($this->show_check_all) { $this->check_all->process(); } // this is part of the old selection API $item_name = $this->getCheckboxRendererId(); if (isset($_POST[$item_name]) && is_array($_POST[$item_name])...
[ "public", "function", "process", "(", ")", "{", "parent", "::", "process", "(", ")", ";", "if", "(", "$", "this", "->", "show_check_all", ")", "{", "$", "this", "->", "check_all", "->", "process", "(", ")", ";", "}", "// this is part of the old selection A...
Processes this checkbox column Column-level processing is needed for the deprecated selection API. @see SwatView::getSelection()
[ "Processes", "this", "checkbox", "column" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTableViewCheckboxColumn.php#L143-L156
34,066
silverorange/swat
Swat/SwatInputCell.php
SwatInputCell.init
public function init() { if ($this->widget !== null) { $this->widget->init(); } // ensure the widget has an id if ($this->widget->id === null) { $this->widget->id = $this->widget->getUniqueId(); } }
php
public function init() { if ($this->widget !== null) { $this->widget->init(); } // ensure the widget has an id if ($this->widget->id === null) { $this->widget->id = $this->widget->getUniqueId(); } }
[ "public", "function", "init", "(", ")", "{", "if", "(", "$", "this", "->", "widget", "!==", "null", ")", "{", "$", "this", "->", "widget", "->", "init", "(", ")", ";", "}", "// ensure the widget has an id", "if", "(", "$", "this", "->", "widget", "->...
Initializes this input cell This calls {@link SwatWidget::init()} on the cell's prototype widget.
[ "Initializes", "this", "input", "cell" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatInputCell.php#L106-L116
34,067
silverorange/swat
Swat/SwatInputCell.php
SwatInputCell.getWidget
public function getWidget($row_identifier, $widget_id = null) { $this->getClonedWidget($row_identifier); if ($widget_id === null && isset($this->clones[$row_identifier])) { return $this->clones[$row_identifier]; } elseif ( $widget_id !== null && isset($th...
php
public function getWidget($row_identifier, $widget_id = null) { $this->getClonedWidget($row_identifier); if ($widget_id === null && isset($this->clones[$row_identifier])) { return $this->clones[$row_identifier]; } elseif ( $widget_id !== null && isset($th...
[ "public", "function", "getWidget", "(", "$", "row_identifier", ",", "$", "widget_id", "=", "null", ")", "{", "$", "this", "->", "getClonedWidget", "(", "$", "row_identifier", ")", ";", "if", "(", "$", "widget_id", "===", "null", "&&", "isset", "(", "$", ...
Gets a particular widget in this input cell @param integer $row_identifier the numeric row identifier of the widget. @param string $widget_id optional. The unique identifier of the widget. If no <i>$widget_id</i> is specified, the root widget of this cell is returned for the given <i>$row_identifier</i>. @return Swat...
[ "Gets", "a", "particular", "widget", "in", "this", "input", "cell" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatInputCell.php#L240-L257
34,068
silverorange/swat
Swat/SwatInputCell.php
SwatInputCell.unsetWidget
public function unsetWidget($replicator_id) { if (isset($this->widgets[$replicator_id])) { unset($this->widgets[$replicator_id]); } if (isset($this->clones[$replicator_id])) { unset($this->clones[$replicator_id]); } }
php
public function unsetWidget($replicator_id) { if (isset($this->widgets[$replicator_id])) { unset($this->widgets[$replicator_id]); } if (isset($this->clones[$replicator_id])) { unset($this->clones[$replicator_id]); } }
[ "public", "function", "unsetWidget", "(", "$", "replicator_id", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "widgets", "[", "$", "replicator_id", "]", ")", ")", "{", "unset", "(", "$", "this", "->", "widgets", "[", "$", "replicator_id", "]", ...
Unsets a cloned widget within this cell This is useful if you are deleting a row from an input row. @param integer replicator_id the replicator id of the cloned widget to unset. @see SwatTableViewInputRow::removeReplicatedRow()
[ "Unsets", "a", "cloned", "widget", "within", "this", "cell" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatInputCell.php#L272-L281
34,069
silverorange/swat
Swat/SwatInputCell.php
SwatInputCell.getHtmlHeadEntrySet
public function getHtmlHeadEntrySet() { $set = parent::getHtmlHeadEntrySet(); $set->addEntrySet($this->widget->getHtmlHeadEntrySet()); return $set; }
php
public function getHtmlHeadEntrySet() { $set = parent::getHtmlHeadEntrySet(); $set->addEntrySet($this->widget->getHtmlHeadEntrySet()); return $set; }
[ "public", "function", "getHtmlHeadEntrySet", "(", ")", "{", "$", "set", "=", "parent", "::", "getHtmlHeadEntrySet", "(", ")", ";", "$", "set", "->", "addEntrySet", "(", "$", "this", "->", "widget", "->", "getHtmlHeadEntrySet", "(", ")", ")", ";", "return",...
Gets the SwatHtmlHeadEntry objects needed by this input cell @return SwatHtmlHeadEntrySet the SwatHtmlHeadEntry objects needed by this input cell. @see SwatUIObject::getHtmlHeadEntrySet()
[ "Gets", "the", "SwatHtmlHeadEntry", "objects", "needed", "by", "this", "input", "cell" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatInputCell.php#L294-L299
34,070
silverorange/swat
Swat/SwatInputCell.php
SwatInputCell.getAvailableHtmlHeadEntrySet
public function getAvailableHtmlHeadEntrySet() { $set = parent::getAvailableHtmlHeadEntrySet(); $set->addEntrySet($this->widget->getAvailableHtmlHeadEntrySet()); return $set; }
php
public function getAvailableHtmlHeadEntrySet() { $set = parent::getAvailableHtmlHeadEntrySet(); $set->addEntrySet($this->widget->getAvailableHtmlHeadEntrySet()); return $set; }
[ "public", "function", "getAvailableHtmlHeadEntrySet", "(", ")", "{", "$", "set", "=", "parent", "::", "getAvailableHtmlHeadEntrySet", "(", ")", ";", "$", "set", "->", "addEntrySet", "(", "$", "this", "->", "widget", "->", "getAvailableHtmlHeadEntrySet", "(", ")"...
Gets the SwatHtmlHeadEntry objects that may be needed by this input cell @return SwatHtmlHeadEntrySet the SwatHtmlHeadEntry objects that may be needed by this input cell. @see SwatUIObject::getAvailableHtmlHeadEntrySet()
[ "Gets", "the", "SwatHtmlHeadEntry", "objects", "that", "may", "be", "needed", "by", "this", "input", "cell" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatInputCell.php#L312-L317
34,071
silverorange/swat
Swat/SwatInputCell.php
SwatInputCell.getInputRow
protected function getInputRow() { $view = $this->getFirstAncestor('SwatTableView'); if ($view === null) { return null; } $row = $view->getFirstRowByClass('SwatTableViewInputRow'); return $row; }
php
protected function getInputRow() { $view = $this->getFirstAncestor('SwatTableView'); if ($view === null) { return null; } $row = $view->getFirstRowByClass('SwatTableViewInputRow'); return $row; }
[ "protected", "function", "getInputRow", "(", ")", "{", "$", "view", "=", "$", "this", "->", "getFirstAncestor", "(", "'SwatTableView'", ")", ";", "if", "(", "$", "view", "===", "null", ")", "{", "return", "null", ";", "}", "$", "row", "=", "$", "view...
Gets the input row this cell belongs to If this input-cell is not yet added to a table-view, or if the parent table-view of this cell does not have an input-row, null is returned. @return SwatTableViewInputRow the input row this cell belongs to.
[ "Gets", "the", "input", "row", "this", "cell", "belongs", "to" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatInputCell.php#L516-L526
34,072
silverorange/swat
Swat/SwatInputCell.php
SwatInputCell.getClonedWidget
protected function getClonedWidget($replicator_id) { if (isset($this->clones[$replicator_id])) { return $this->clones[$replicator_id]; } if ($this->widget === null) { return null; } $row = $this->getInputRow(); if ($row === null) { ...
php
protected function getClonedWidget($replicator_id) { if (isset($this->clones[$replicator_id])) { return $this->clones[$replicator_id]; } if ($this->widget === null) { return null; } $row = $this->getInputRow(); if ($row === null) { ...
[ "protected", "function", "getClonedWidget", "(", "$", "replicator_id", ")", "{", "if", "(", "isset", "(", "$", "this", "->", "clones", "[", "$", "replicator_id", "]", ")", ")", "{", "return", "$", "this", "->", "clones", "[", "$", "replicator_id", "]", ...
Gets a cloned widget given a unique identifier @param string $replicator_id the unique identifier of the new cloned widget. The actual cloned widget id is constructed from this identifier and from the input row that this input cell belongs to. @return SwatWidget the new cloned widget or the cloned widget retrieved fr...
[ "Gets", "a", "cloned", "widget", "given", "a", "unique", "identifier" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatInputCell.php#L546-L598
34,073
brainworxx/kreXX
src/Service/Misc/File.php
File.readSourcecode
public function readSourcecode($filePath, $highlight, $readFrom, $readTo) { $result = ''; // Read the file into our cache array. We may need to reed this file a // few times. $content = $this->getFileContentsArray($filePath); if ($readFrom < 0) { $readFrom = 0;...
php
public function readSourcecode($filePath, $highlight, $readFrom, $readTo) { $result = ''; // Read the file into our cache array. We may need to reed this file a // few times. $content = $this->getFileContentsArray($filePath); if ($readFrom < 0) { $readFrom = 0;...
[ "public", "function", "readSourcecode", "(", "$", "filePath", ",", "$", "highlight", ",", "$", "readFrom", ",", "$", "readTo", ")", "{", "$", "result", "=", "''", ";", "// Read the file into our cache array. We may need to reed this file a", "// few times.", "$", "c...
Reads sourcecode from files, for the backtrace. @param string $filePath Path to the file you want to read. @param int $highlight The line number you want to highlight @param int $readFrom The start line. @param int $readTo The end line. @return string The source code, HTML formatted.
[ "Reads", "sourcecode", "from", "files", "for", "the", "backtrace", "." ]
a03beaa4507ffb391412b9ac61593d263d3f8bca
https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/Service/Misc/File.php#L97-L144
34,074
brainworxx/kreXX
src/Service/Misc/File.php
File.readFile
public function readFile($filePath, $readFrom = 0, $readTo = 0) { $result = ''; // Read the file into our cache array. $content = $this->getFileContentsArray($filePath); if ($readFrom < 0) { $readFrom = 0; } if ($readTo < 0) { $readTo = 0; ...
php
public function readFile($filePath, $readFrom = 0, $readTo = 0) { $result = ''; // Read the file into our cache array. $content = $this->getFileContentsArray($filePath); if ($readFrom < 0) { $readFrom = 0; } if ($readTo < 0) { $readTo = 0; ...
[ "public", "function", "readFile", "(", "$", "filePath", ",", "$", "readFrom", "=", "0", ",", "$", "readTo", "=", "0", ")", "{", "$", "result", "=", "''", ";", "// Read the file into our cache array.", "$", "content", "=", "$", "this", "->", "getFileContent...
Simply read a file into a string. @param string $filePath @param int $readFrom @param int $readTo @return string The content of the file, between the $from and $to.
[ "Simply", "read", "a", "file", "into", "a", "string", "." ]
a03beaa4507ffb391412b9ac61593d263d3f8bca
https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/Service/Misc/File.php#L156-L187
34,075
brainworxx/kreXX
src/Service/Misc/File.php
File.getFileContentsArray
protected function getFileContentsArray($filePath) { $filePath = realpath($filePath); static $filecache = array(); if (isset($filecache[$filePath]) === true) { return $filecache[$filePath]; } // Using \SplFixedArray to save some memory, as it can get //...
php
protected function getFileContentsArray($filePath) { $filePath = realpath($filePath); static $filecache = array(); if (isset($filecache[$filePath]) === true) { return $filecache[$filePath]; } // Using \SplFixedArray to save some memory, as it can get //...
[ "protected", "function", "getFileContentsArray", "(", "$", "filePath", ")", "{", "$", "filePath", "=", "realpath", "(", "$", "filePath", ")", ";", "static", "$", "filecache", "=", "array", "(", ")", ";", "if", "(", "isset", "(", "$", "filecache", "[", ...
Reads a file into an array and uses some caching. @param string $filePath The path to the file we want to read. @return \SplFixedArray The file in a \SplFixedArray.
[ "Reads", "a", "file", "into", "an", "array", "and", "uses", "some", "caching", "." ]
a03beaa4507ffb391412b9ac61593d263d3f8bca
https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/Service/Misc/File.php#L198-L215
34,076
brainworxx/kreXX
src/Service/Misc/File.php
File.getFileContents
public function getFileContents($filePath, $showError = true) { $filePath = realpath($filePath); if ($this->fileIsReadable($filePath) === false) { if ($showError === true) { // This file was not readable! We need to tell the user! $this->pool->messages->a...
php
public function getFileContents($filePath, $showError = true) { $filePath = realpath($filePath); if ($this->fileIsReadable($filePath) === false) { if ($showError === true) { // This file was not readable! We need to tell the user! $this->pool->messages->a...
[ "public", "function", "getFileContents", "(", "$", "filePath", ",", "$", "showError", "=", "true", ")", "{", "$", "filePath", "=", "realpath", "(", "$", "filePath", ")", ";", "if", "(", "$", "this", "->", "fileIsReadable", "(", "$", "filePath", ")", "=...
Reads the content of a file. @param string $filePath The path to the file. @param boolean $showError Do we need to display na error message? @return string The content of the file, if readable.
[ "Reads", "the", "content", "of", "a", "file", "." ]
a03beaa4507ffb391412b9ac61593d263d3f8bca
https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/Service/Misc/File.php#L228-L252
34,077
brainworxx/kreXX
src/Service/Misc/File.php
File.putFileContents
public function putFileContents($filePath, $string) { if ($this->fileIsReadable($filePath) === true) { // Existing file. Most likely a html log file. file_put_contents($filePath, $string, FILE_APPEND); return; } // New file. We tell the caching, that we h...
php
public function putFileContents($filePath, $string) { if ($this->fileIsReadable($filePath) === true) { // Existing file. Most likely a html log file. file_put_contents($filePath, $string, FILE_APPEND); return; } // New file. We tell the caching, that we h...
[ "public", "function", "putFileContents", "(", "$", "filePath", ",", "$", "string", ")", "{", "if", "(", "$", "this", "->", "fileIsReadable", "(", "$", "filePath", ")", "===", "true", ")", "{", "// Existing file. Most likely a html log file.", "file_put_contents", ...
Write the content of a string to a file. When the file already exists, we will append the content. Caches weather we are allowed to write, to reduce the overhead. @param string $filePath Path and filename. @param string $string The string we want to write.
[ "Write", "the", "content", "of", "a", "string", "to", "a", "file", "." ]
a03beaa4507ffb391412b9ac61593d263d3f8bca
https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/Service/Misc/File.php#L265-L276
34,078
brainworxx/kreXX
src/Service/Misc/File.php
File.deleteFile
public function deleteFile($filePath) { $filePath = realpath($filePath); // Check if it is an actual file and if it is writable. if (is_file($filePath) === true) { set_error_handler( function () { /* do nothing */ } ); ...
php
public function deleteFile($filePath) { $filePath = realpath($filePath); // Check if it is an actual file and if it is writable. if (is_file($filePath) === true) { set_error_handler( function () { /* do nothing */ } ); ...
[ "public", "function", "deleteFile", "(", "$", "filePath", ")", "{", "$", "filePath", "=", "realpath", "(", "$", "filePath", ")", ";", "// Check if it is an actual file and if it is writable.", "if", "(", "is_file", "(", "$", "filePath", ")", "===", "true", ")", ...
Tries to delete a file. @param string $filePath
[ "Tries", "to", "delete", "a", "file", "." ]
a03beaa4507ffb391412b9ac61593d263d3f8bca
https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/Service/Misc/File.php#L283-L305
34,079
brainworxx/kreXX
src/Service/Misc/File.php
File.fileIsReadable
public function fileIsReadable($filePath) { $filePath = realpath($filePath); // Return the cache, if we have any. if (isset(static::$isReadableCache[$filePath]) === true) { return static::$isReadableCache[$filePath]; } // Set the cache and return it. ret...
php
public function fileIsReadable($filePath) { $filePath = realpath($filePath); // Return the cache, if we have any. if (isset(static::$isReadableCache[$filePath]) === true) { return static::$isReadableCache[$filePath]; } // Set the cache and return it. ret...
[ "public", "function", "fileIsReadable", "(", "$", "filePath", ")", "{", "$", "filePath", "=", "realpath", "(", "$", "filePath", ")", ";", "// Return the cache, if we have any.", "if", "(", "isset", "(", "static", "::", "$", "isReadableCache", "[", "$", "filePa...
Checks if a file exists and is readable, with some caching. @param string $filePath The path to the file we are checking. @return bool If the file is readable, or not.
[ "Checks", "if", "a", "file", "exists", "and", "is", "readable", "with", "some", "caching", "." ]
a03beaa4507ffb391412b9ac61593d263d3f8bca
https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/Service/Misc/File.php#L346-L357
34,080
silverorange/swat
Swat/SwatEmailEntry.php
SwatEmailEntry.process
public function process() { parent::process(); if ($this->value === null) { return; } if ($this->value == '') { $this->value = null; return; } if (!$this->validateEmailAddress()) { $this->addMessage($this->getValidati...
php
public function process() { parent::process(); if ($this->value === null) { return; } if ($this->value == '') { $this->value = null; return; } if (!$this->validateEmailAddress()) { $this->addMessage($this->getValidati...
[ "public", "function", "process", "(", ")", "{", "parent", "::", "process", "(", ")", ";", "if", "(", "$", "this", "->", "value", "===", "null", ")", "{", "return", ";", "}", "if", "(", "$", "this", "->", "value", "==", "''", ")", "{", "$", "thi...
Processes this email entry Ensures this email address is formatted correctly. If the email address is not formatted correctly, adds an error message to this entry widget.
[ "Processes", "this", "email", "entry" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatEmailEntry.php#L23-L39
34,081
silverorange/swat
Swat/SwatEmailEntry.php
SwatEmailEntry.getValidationMessage
protected function getValidationMessage($id) { switch ($id) { case 'email': $text = Swat::_( 'The email address you have entered is not ' . 'properly formatted.' ); $message = new SwatMessage($text, 'err...
php
protected function getValidationMessage($id) { switch ($id) { case 'email': $text = Swat::_( 'The email address you have entered is not ' . 'properly formatted.' ); $message = new SwatMessage($text, 'err...
[ "protected", "function", "getValidationMessage", "(", "$", "id", ")", "{", "switch", "(", "$", "id", ")", "{", "case", "'email'", ":", "$", "text", "=", "Swat", "::", "_", "(", "'The email address you have entered is not '", ".", "'properly formatted.'", ")", ...
Gets a validation message for this email entry @see SwatEntry::getValidationMessage() @param string $id the string identifier of the validation message. @return SwatMessage the validation message.
[ "Gets", "a", "validation", "message", "for", "this", "email", "entry" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatEmailEntry.php#L66-L84
34,082
brainworxx/kreXX
src/Analyse/Caller/AbstractCaller.php
AbstractCaller.getType
protected function getType($headline, $varname, $data) { if (empty($headline) === true) { if (is_object($data) === true) { $type = get_class($data); } else { $type = gettype($data); } return 'Analysis of ' . $varname . ', ' . $t...
php
protected function getType($headline, $varname, $data) { if (empty($headline) === true) { if (is_object($data) === true) { $type = get_class($data); } else { $type = gettype($data); } return 'Analysis of ' . $varname . ', ' . $t...
[ "protected", "function", "getType", "(", "$", "headline", ",", "$", "varname", ",", "$", "data", ")", "{", "if", "(", "empty", "(", "$", "headline", ")", "===", "true", ")", "{", "if", "(", "is_object", "(", "$", "data", ")", "===", "true", ")", ...
Get the analysis type for the metadata and the page title. @param string $headline The headline from the call. We will use this one, if not empty. @param string $varname The name of the variable that we were able to determine. @param mixed $data The variable tht we are analysing. @return string The analysis type.
[ "Get", "the", "analysis", "type", "for", "the", "metadata", "and", "the", "page", "title", "." ]
a03beaa4507ffb391412b9ac61593d263d3f8bca
https://github.com/brainworxx/kreXX/blob/a03beaa4507ffb391412b9ac61593d263d3f8bca/src/Analyse/Caller/AbstractCaller.php#L146-L159
34,083
silverorange/swat
Swat/SwatNoteBookPage.php
SwatNoteBookPage.display
public function display() { if (!$this->visible) { return; } $div_tag = new SwatHtmlTag('div'); $div_tag->id = $this->id; $div_tag->class = $this->getCSSClassString(); $div_tag->open(); parent::display(); $div_tag->close(); }
php
public function display() { if (!$this->visible) { return; } $div_tag = new SwatHtmlTag('div'); $div_tag->id = $this->id; $div_tag->class = $this->getCSSClassString(); $div_tag->open(); parent::display(); $div_tag->close(); }
[ "public", "function", "display", "(", ")", "{", "if", "(", "!", "$", "this", "->", "visible", ")", "{", "return", ";", "}", "$", "div_tag", "=", "new", "SwatHtmlTag", "(", "'div'", ")", ";", "$", "div_tag", "->", "id", "=", "$", "this", "->", "id...
Displays this notebook page Displays this notebook page as well as recursively displaying all child- widgets of this page.
[ "Displays", "this", "notebook", "page" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatNoteBookPage.php#L55-L67
34,084
silverorange/swat
Swat/SwatTableView.php
SwatTableView.init
public function init() { parent::init(); foreach ($this->columns as $column) { $column->init(); // index the column by id if it is not already indexed if (!array_key_exists($column->id, $this->columns_by_id)) { $this->columns_by_id[$column->id] = ...
php
public function init() { parent::init(); foreach ($this->columns as $column) { $column->init(); // index the column by id if it is not already indexed if (!array_key_exists($column->id, $this->columns_by_id)) { $this->columns_by_id[$column->id] = ...
[ "public", "function", "init", "(", ")", "{", "parent", "::", "init", "(", ")", ";", "foreach", "(", "$", "this", "->", "columns", "as", "$", "column", ")", "{", "$", "column", "->", "init", "(", ")", ";", "// index the column by id if it is not already ind...
Initializes this table-view This initializes all columns, extra rows and groupsin this table-view. @see SwatWidget::init()
[ "Initializes", "this", "table", "-", "view" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTableView.php#L222-L257
34,085
silverorange/swat
Swat/SwatTableView.php
SwatTableView.display
public function display() { if (!$this->visible) { return; } if ($this->model === null) { return; } parent::display(); $show_no_records = true; $row_count = count($this->model); foreach ($this->extra_rows as $row) { ...
php
public function display() { if (!$this->visible) { return; } if ($this->model === null) { return; } parent::display(); $show_no_records = true; $row_count = count($this->model); foreach ($this->extra_rows as $row) { ...
[ "public", "function", "display", "(", ")", "{", "if", "(", "!", "$", "this", "->", "visible", ")", "{", "return", ";", "}", "if", "(", "$", "this", "->", "model", "===", "null", ")", "{", "return", ";", "}", "parent", "::", "display", "(", ")", ...
Displays this table-view The table view is displayed as an XHTML table.
[ "Displays", "this", "table", "-", "view" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTableView.php#L267-L325
34,086
silverorange/swat
Swat/SwatTableView.php
SwatTableView.process
public function process() { parent::process(); foreach ($this->columns as $column) { $column->process(); } foreach ($this->spanning_columns as $column) { $column->process(); } foreach ($this->extra_rows as $row) { $row->process()...
php
public function process() { parent::process(); foreach ($this->columns as $column) { $column->process(); } foreach ($this->spanning_columns as $column) { $column->process(); } foreach ($this->extra_rows as $row) { $row->process()...
[ "public", "function", "process", "(", ")", "{", "parent", "::", "process", "(", ")", ";", "foreach", "(", "$", "this", "->", "columns", "as", "$", "column", ")", "{", "$", "column", "->", "process", "(", ")", ";", "}", "foreach", "(", "$", "this", ...
Processes this table-view
[ "Processes", "this", "table", "-", "view" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTableView.php#L333-L354
34,087
silverorange/swat
Swat/SwatTableView.php
SwatTableView.getMessages
public function getMessages() { $messages = parent::getMessages(); if ($this->model !== null) { foreach ($this->model as $row) { foreach ($this->columns as $column) { $messages = array_merge( $messages, ...
php
public function getMessages() { $messages = parent::getMessages(); if ($this->model !== null) { foreach ($this->model as $row) { foreach ($this->columns as $column) { $messages = array_merge( $messages, ...
[ "public", "function", "getMessages", "(", ")", "{", "$", "messages", "=", "parent", "::", "getMessages", "(", ")", ";", "if", "(", "$", "this", "->", "model", "!==", "null", ")", "{", "foreach", "(", "$", "this", "->", "model", "as", "$", "row", ")...
Gathers all messages from this table-view @return array an array of {@link SwatMessage} objects.
[ "Gathers", "all", "messages", "from", "this", "table", "-", "view" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTableView.php#L409-L438
34,088
silverorange/swat
Swat/SwatTableView.php
SwatTableView.hasMessage
public function hasMessage() { $has_message = parent::hasMessage(); if (!$has_message && $this->model !== null) { foreach ($this->model as $row) { foreach ($this->columns as $column) { if ($column->hasMessage($row)) { $has_mess...
php
public function hasMessage() { $has_message = parent::hasMessage(); if (!$has_message && $this->model !== null) { foreach ($this->model as $row) { foreach ($this->columns as $column) { if ($column->hasMessage($row)) { $has_mess...
[ "public", "function", "hasMessage", "(", ")", "{", "$", "has_message", "=", "parent", "::", "hasMessage", "(", ")", ";", "if", "(", "!", "$", "has_message", "&&", "$", "this", "->", "model", "!==", "null", ")", "{", "foreach", "(", "$", "this", "->",...
Gets whether or not this table-view has any messages @return boolean true if this table-view has one or more messages and false if it does not.
[ "Gets", "whether", "or", "not", "this", "table", "-", "view", "has", "any", "messages" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTableView.php#L449-L481
34,089
silverorange/swat
Swat/SwatTableView.php
SwatTableView.getXhtmlColspan
public function getXhtmlColspan() { $colspan = 0; // Add all colspans of visible columns to get table colspan. foreach ($this->getVisibleColumns() as $column) { $colspan += $column->getXhtmlColspan(); } // Check each spanning column. If it has more colspan than ...
php
public function getXhtmlColspan() { $colspan = 0; // Add all colspans of visible columns to get table colspan. foreach ($this->getVisibleColumns() as $column) { $colspan += $column->getXhtmlColspan(); } // Check each spanning column. If it has more colspan than ...
[ "public", "function", "getXhtmlColspan", "(", ")", "{", "$", "colspan", "=", "0", ";", "// Add all colspans of visible columns to get table colspan.", "foreach", "(", "$", "this", "->", "getVisibleColumns", "(", ")", "as", "$", "column", ")", "{", "$", "colspan", ...
Gets how many XHTML table columns the visible column objects of this table-view object span on display @return integer the number of XHTML table columns the visible column objects of this table-view object span on display.
[ "Gets", "how", "many", "XHTML", "table", "columns", "the", "visible", "column", "objects", "of", "this", "table", "-", "view", "object", "span", "on", "display" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTableView.php#L493-L513
34,090
silverorange/swat
Swat/SwatTableView.php
SwatTableView.getHtmlHeadEntrySet
public function getHtmlHeadEntrySet() { $set = parent::getHtmlHeadEntrySet(); foreach ($this->columns as $column) { $set->addEntrySet($column->getHtmlHeadEntrySet()); } foreach ($this->spanning_columns as $column) { $set->addEntrySet($column->getHtmlHeadEntr...
php
public function getHtmlHeadEntrySet() { $set = parent::getHtmlHeadEntrySet(); foreach ($this->columns as $column) { $set->addEntrySet($column->getHtmlHeadEntrySet()); } foreach ($this->spanning_columns as $column) { $set->addEntrySet($column->getHtmlHeadEntr...
[ "public", "function", "getHtmlHeadEntrySet", "(", ")", "{", "$", "set", "=", "parent", "::", "getHtmlHeadEntrySet", "(", ")", ";", "foreach", "(", "$", "this", "->", "columns", "as", "$", "column", ")", "{", "$", "set", "->", "addEntrySet", "(", "$", "...
Gets the SwatHtmlHeadEntry objects needed by this table @return SwatHtmlHeadEntrySet the SwatHtmlHeadEntry objects needed by this table-view. @see SwatUIObject::getHtmlHeadEntrySet()
[ "Gets", "the", "SwatHtmlHeadEntry", "objects", "needed", "by", "this", "table" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTableView.php#L526-L547
34,091
silverorange/swat
Swat/SwatTableView.php
SwatTableView.hasHeader
protected function hasHeader() { $has_header = false; foreach ($this->columns as $column) { if ($column->hasHeader()) { $has_header = true; break; } } return $has_header; }
php
protected function hasHeader() { $has_header = false; foreach ($this->columns as $column) { if ($column->hasHeader()) { $has_header = true; break; } } return $has_header; }
[ "protected", "function", "hasHeader", "(", ")", "{", "$", "has_header", "=", "false", ";", "foreach", "(", "$", "this", "->", "columns", "as", "$", "column", ")", "{", "if", "(", "$", "column", "->", "hasHeader", "(", ")", ")", "{", "$", "has_header"...
Whether this table has a header to display Each column is asked whether is has a header to display.
[ "Whether", "this", "table", "has", "a", "header", "to", "display" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTableView.php#L873-L885
34,092
silverorange/swat
Swat/SwatTableView.php
SwatTableView.displayBody
protected function displayBody() { $count = 0; // this uses read-ahead iteration $this->model->rewind(); $row = $this->model->valid() ? $this->model->current() : null; $this->model->next(); $next_row = $this->model->valid() ? $this->model->current() : null; ...
php
protected function displayBody() { $count = 0; // this uses read-ahead iteration $this->model->rewind(); $row = $this->model->valid() ? $this->model->current() : null; $this->model->next(); $next_row = $this->model->valid() ? $this->model->current() : null; ...
[ "protected", "function", "displayBody", "(", ")", "{", "$", "count", "=", "0", ";", "// this uses read-ahead iteration", "$", "this", "->", "model", "->", "rewind", "(", ")", ";", "$", "row", "=", "$", "this", "->", "model", "->", "valid", "(", ")", "?...
Displays the contents of this view The contents reflect the data stored in the model of this table-view. Things like row highlighting are done here. Table rows are displayed inside a <tbody> XHTML tag.
[ "Displays", "the", "contents", "of", "this", "view" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTableView.php#L920-L952
34,093
silverorange/swat
Swat/SwatTableView.php
SwatTableView.displayRow
protected function displayRow($row, $next_row, $count) { $this->displayRowGroupHeaders($row, $next_row, $count); $this->displayRowColumns($row, $next_row, $count); $this->displayRowSpanningColumns($row, $next_row, $count); $this->displayRowMessages($row); $this->displayRowGro...
php
protected function displayRow($row, $next_row, $count) { $this->displayRowGroupHeaders($row, $next_row, $count); $this->displayRowColumns($row, $next_row, $count); $this->displayRowSpanningColumns($row, $next_row, $count); $this->displayRowMessages($row); $this->displayRowGro...
[ "protected", "function", "displayRow", "(", "$", "row", ",", "$", "next_row", ",", "$", "count", ")", "{", "$", "this", "->", "displayRowGroupHeaders", "(", "$", "row", ",", "$", "next_row", ",", "$", "count", ")", ";", "$", "this", "->", "displayRowCo...
Displays a single row The contents reflect the data stored in the model of this table-view. Things like row highlighting are done here. @param mixed $row the row to display. @param mixed $next_row the next row that will be displayed. If there is no next row, this is null. @param integer $count the ordinal position of...
[ "Displays", "a", "single", "row" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTableView.php#L969-L976
34,094
silverorange/swat
Swat/SwatTableView.php
SwatTableView.displayRowColumns
protected function displayRowColumns($row, $next_row, $count) { // Make sure we should display a row for the current data. If there // are no visible columns for the row data, just skip displaying the // entire row. $should_show_row = false; foreach ($this->getVisibleColumns(...
php
protected function displayRowColumns($row, $next_row, $count) { // Make sure we should display a row for the current data. If there // are no visible columns for the row data, just skip displaying the // entire row. $should_show_row = false; foreach ($this->getVisibleColumns(...
[ "protected", "function", "displayRowColumns", "(", "$", "row", ",", "$", "next_row", ",", "$", "count", ")", "{", "// Make sure we should display a row for the current data. If there", "// are no visible columns for the row data, just skip displaying the", "// entire row.", "$", ...
Displays the columns for a row @param mixed $row the row to display. @param mixed $next_row the next row that will be displayed. If there is no next row, this is null. @param integer $count the ordinal position of the current row. Starts at one.
[ "Displays", "the", "columns", "for", "a", "row" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTableView.php#L1028-L1062
34,095
silverorange/swat
Swat/SwatTableView.php
SwatTableView.displayRowSpanningColumns
protected function displayRowSpanningColumns($row, $next_row, $count) { $tr_tag = new SwatHtmlTag('tr'); $tr_tag->class = $this->getRowClassString($row, $count); if ($this->rowHasMessage($row)) { $tr_tag->class = $tr_tag->class . ' swat-error'; } $tr_tag->class ...
php
protected function displayRowSpanningColumns($row, $next_row, $count) { $tr_tag = new SwatHtmlTag('tr'); $tr_tag->class = $this->getRowClassString($row, $count); if ($this->rowHasMessage($row)) { $tr_tag->class = $tr_tag->class . ' swat-error'; } $tr_tag->class ...
[ "protected", "function", "displayRowSpanningColumns", "(", "$", "row", ",", "$", "next_row", ",", "$", "count", ")", "{", "$", "tr_tag", "=", "new", "SwatHtmlTag", "(", "'tr'", ")", ";", "$", "tr_tag", "->", "class", "=", "$", "this", "->", "getRowClassS...
Displays row spanning columns @param mixed $row the row to display. @param mixed $next_row the next row that will be displayed. If there is no next row, this is null. @param integer $count the ordinal position of the current row. Starts at one.
[ "Displays", "row", "spanning", "columns" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTableView.php#L1076-L1094
34,096
silverorange/swat
Swat/SwatTableView.php
SwatTableView.displayFooter
protected function displayFooter() { ob_start(); foreach ($this->extra_rows as $row) { $row->display(); } $footer_content = ob_get_clean(); if ($footer_content != '') { $tfoot_tag = new SwatHtmlTag('tfoot'); if ($this->use_invalid_tfoot_...
php
protected function displayFooter() { ob_start(); foreach ($this->extra_rows as $row) { $row->display(); } $footer_content = ob_get_clean(); if ($footer_content != '') { $tfoot_tag = new SwatHtmlTag('tfoot'); if ($this->use_invalid_tfoot_...
[ "protected", "function", "displayFooter", "(", ")", "{", "ob_start", "(", ")", ";", "foreach", "(", "$", "this", "->", "extra_rows", "as", "$", "row", ")", "{", "$", "row", "->", "display", "(", ")", ";", "}", "$", "footer_content", "=", "ob_get_clean"...
Displays any footer content for this table-view Rows in the footer are outputted inside a <tfoot> HTML tag.
[ "Displays", "any", "footer", "content", "for", "this", "table", "-", "view" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTableView.php#L1155-L1174
34,097
silverorange/swat
Swat/SwatTableView.php
SwatTableView.rowHasMessage
protected function rowHasMessage($row) { $has_message = false; foreach ($this->columns as $column) { if ($column->hasMessage($row)) { $has_message = true; break; } } if (!$has_message) { foreach ($this->spanning_co...
php
protected function rowHasMessage($row) { $has_message = false; foreach ($this->columns as $column) { if ($column->hasMessage($row)) { $has_message = true; break; } } if (!$has_message) { foreach ($this->spanning_co...
[ "protected", "function", "rowHasMessage", "(", "$", "row", ")", "{", "$", "has_message", "=", "false", ";", "foreach", "(", "$", "this", "->", "columns", "as", "$", "column", ")", "{", "if", "(", "$", "column", "->", "hasMessage", "(", "$", "row", ")...
Whether any of the columns in the row has a message @param mixed $row the data object to use to check the column for messages. @return boolean true if any of the columns in the row has a message, otherwise false.
[ "Whether", "any", "of", "the", "columns", "in", "the", "row", "has", "a", "message" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTableView.php#L1188-L1209
34,098
silverorange/swat
Swat/SwatTableView.php
SwatTableView.getRowClasses
protected function getRowClasses($row, $count) { $classes = array(); if ($count % 2 === 1) { $classes[] = 'odd'; } if ($count === 1) { $classes[] = 'first'; } if ($count === count($this->model)) { $classes[] = 'last'; } ...
php
protected function getRowClasses($row, $count) { $classes = array(); if ($count % 2 === 1) { $classes[] = 'odd'; } if ($count === 1) { $classes[] = 'first'; } if ($count === count($this->model)) { $classes[] = 'last'; } ...
[ "protected", "function", "getRowClasses", "(", "$", "row", ",", "$", "count", ")", "{", "$", "classes", "=", "array", "(", ")", ";", "if", "(", "$", "count", "%", "2", "===", "1", ")", "{", "$", "classes", "[", "]", "=", "'odd'", ";", "}", "if"...
Gets CSS classes for the XHTML tr tag @param mixed $row a data object containing the data to be displayed in this row. @param integer $count the ordinal position of this row in the table. @return array CSS class names.
[ "Gets", "CSS", "classes", "for", "the", "XHTML", "tr", "tag" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTableView.php#L1239-L1256
34,099
silverorange/swat
Swat/SwatTableView.php
SwatTableView.getRowClassString
protected function getRowClassString($row, $count) { $class_string = null; $classes = $this->getRowClasses($row, $count); if (count($classes) > 0) { $class_string = implode(' ', $classes); } return $class_string; }
php
protected function getRowClassString($row, $count) { $class_string = null; $classes = $this->getRowClasses($row, $count); if (count($classes) > 0) { $class_string = implode(' ', $classes); } return $class_string; }
[ "protected", "function", "getRowClassString", "(", "$", "row", ",", "$", "count", ")", "{", "$", "class_string", "=", "null", ";", "$", "classes", "=", "$", "this", "->", "getRowClasses", "(", "$", "row", ",", "$", "count", ")", ";", "if", "(", "coun...
Gets CSS class string for the XHTML tr tag @param mixed $row a data object containing the data to be displayed in this row. @param integer $count the ordinal position of this row in the table. @return string CSS class string.
[ "Gets", "CSS", "class", "string", "for", "the", "XHTML", "tr", "tag" ]
e65dc5bc351927c61f594068430cdeeb874c8bc5
https://github.com/silverorange/swat/blob/e65dc5bc351927c61f594068430cdeeb874c8bc5/Swat/SwatTableView.php#L1270-L1281