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
197,300
ZFrapid/zfrapid-core
src/Console/Console.php
Console.write
public function write($text, $color = null, $bgColor = null) { $this->adapter->write($text, $color, $bgColor); }
php
public function write($text, $color = null, $bgColor = null) { $this->adapter->write($text, $color, $bgColor); }
[ "public", "function", "write", "(", "$", "text", ",", "$", "color", "=", "null", ",", "$", "bgColor", "=", "null", ")", "{", "$", "this", "->", "adapter", "->", "write", "(", "$", "text", ",", "$", "color", ",", "$", "bgColor", ")", ";", "}" ]
Write a chunk of text to console. @param string $text @param null|int $color @param null|int $bgColor @return void
[ "Write", "a", "chunk", "of", "text", "to", "console", "." ]
8be56b82f9f5a687619a2b2175fcaa66ad3d2233
https://github.com/ZFrapid/zfrapid-core/blob/8be56b82f9f5a687619a2b2175fcaa66ad3d2233/src/Console/Console.php#L71-L74
197,301
ZFrapid/zfrapid-core
src/Console/Console.php
Console.writeLine
public function writeLine($text = "", $color = null, $bgColor = null) { $this->adapter->writeLine($text, $color, $bgColor); }
php
public function writeLine($text = "", $color = null, $bgColor = null) { $this->adapter->writeLine($text, $color, $bgColor); }
[ "public", "function", "writeLine", "(", "$", "text", "=", "\"\"", ",", "$", "color", "=", "null", ",", "$", "bgColor", "=", "null", ")", "{", "$", "this", "->", "adapter", "->", "writeLine", "(", "$", "text", ",", "$", "color", ",", "$", "bgColor",...
Write a single line of text to console and advance cursor to the next line. If the text is longer than console width it will be truncated. @param string $text @param null|int $color @param null|int $bgColor @return void
[ "Write", "a", "single", "line", "of", "text", "to", "console", "and", "advance", "cursor", "to", "the", "next", "line", ".", "If", "the", "text", "is", "longer", "than", "console", "width", "it", "will", "be", "truncated", "." ]
8be56b82f9f5a687619a2b2175fcaa66ad3d2233
https://github.com/ZFrapid/zfrapid-core/blob/8be56b82f9f5a687619a2b2175fcaa66ad3d2233/src/Console/Console.php#L100-L103
197,302
ZFrapid/zfrapid-core
src/Console/Console.php
Console.writeTextBlock
public function writeTextBlock( $text, $width, $height = null, $x = 0, $y = 0, $color = null, $bgColor = null ) { $this->adapter->writeTextBlock( $text, $width, $height, $x, $y, $color, $bgColor ); }
php
public function writeTextBlock( $text, $width, $height = null, $x = 0, $y = 0, $color = null, $bgColor = null ) { $this->adapter->writeTextBlock( $text, $width, $height, $x, $y, $color, $bgColor ); }
[ "public", "function", "writeTextBlock", "(", "$", "text", ",", "$", "width", ",", "$", "height", "=", "null", ",", "$", "x", "=", "0", ",", "$", "y", "=", "0", ",", "$", "color", "=", "null", ",", "$", "bgColor", "=", "null", ")", "{", "$", "...
Write a block of text at the given coordinates, matching the supplied width and height. In case a line of text does not fit desired width, it will be wrapped to the next line. In case the whole text does not fit in desired height, it will be truncated. @param string $text Text to write @param int $width Ma...
[ "Write", "a", "block", "of", "text", "at", "the", "given", "coordinates", "matching", "the", "supplied", "width", "and", "height", ".", "In", "case", "a", "line", "of", "text", "does", "not", "fit", "desired", "width", "it", "will", "be", "wrapped", "to"...
8be56b82f9f5a687619a2b2175fcaa66ad3d2233
https://github.com/ZFrapid/zfrapid-core/blob/8be56b82f9f5a687619a2b2175fcaa66ad3d2233/src/Console/Console.php#L172-L184
197,303
ZFrapid/zfrapid-core
src/Console/Console.php
Console.colorize
public function colorize($string, $color = null, $bgColor = null) { return $this->adapter->colorize($string, $color, $bgColor); }
php
public function colorize($string, $color = null, $bgColor = null) { return $this->adapter->colorize($string, $color, $bgColor); }
[ "public", "function", "colorize", "(", "$", "string", ",", "$", "color", "=", "null", ",", "$", "bgColor", "=", "null", ")", "{", "return", "$", "this", "->", "adapter", "->", "colorize", "(", "$", "string", ",", "$", "color", ",", "$", "bgColor", ...
Prepare a string that will be rendered in color. @param string $string @param null|int $color Foreground color @param null|int $bgColor Background color @return string
[ "Prepare", "a", "string", "that", "will", "be", "rendered", "in", "color", "." ]
8be56b82f9f5a687619a2b2175fcaa66ad3d2233
https://github.com/ZFrapid/zfrapid-core/blob/8be56b82f9f5a687619a2b2175fcaa66ad3d2233/src/Console/Console.php#L278-L281
197,304
ZFrapid/zfrapid-core
src/Console/Console.php
Console.writeSelectPrompt
public function writeSelectPrompt($message, &$options) { $this->writeLine(); // translate options foreach ($options as $optionKey => $optionValue) { $options[$optionKey] = $this->translator->translate($optionValue); } // write prompt badge $this->writeBa...
php
public function writeSelectPrompt($message, &$options) { $this->writeLine(); // translate options foreach ($options as $optionKey => $optionValue) { $options[$optionKey] = $this->translator->translate($optionValue); } // write prompt badge $this->writeBa...
[ "public", "function", "writeSelectPrompt", "(", "$", "message", ",", "&", "$", "options", ")", "{", "$", "this", "->", "writeLine", "(", ")", ";", "// translate options", "foreach", "(", "$", "options", "as", "$", "optionKey", "=>", "$", "optionValue", ")"...
Write a customizable prompt @param $message @param $options @return string
[ "Write", "a", "customizable", "prompt" ]
8be56b82f9f5a687619a2b2175fcaa66ad3d2233
https://github.com/ZFrapid/zfrapid-core/blob/8be56b82f9f5a687619a2b2175fcaa66ad3d2233/src/Console/Console.php#L409-L434
197,305
ZFrapid/zfrapid-core
src/Console/Console.php
Console.writeLinePrompt
public function writeLinePrompt($message) { $this->writeLine(); // write prompt badge $this->writeBadge('badge_pick', Color::RED); // output prompt $prompt = new Line( $this->translator->translate($message), false ); $answer = $promp...
php
public function writeLinePrompt($message) { $this->writeLine(); // write prompt badge $this->writeBadge('badge_pick', Color::RED); // output prompt $prompt = new Line( $this->translator->translate($message), false ); $answer = $promp...
[ "public", "function", "writeLinePrompt", "(", "$", "message", ")", "{", "$", "this", "->", "writeLine", "(", ")", ";", "// write prompt badge", "$", "this", "->", "writeBadge", "(", "'badge_pick'", ",", "Color", "::", "RED", ")", ";", "// output prompt", "$"...
Write a customizable line prompt @param $message @return string
[ "Write", "a", "customizable", "line", "prompt" ]
8be56b82f9f5a687619a2b2175fcaa66ad3d2233
https://github.com/ZFrapid/zfrapid-core/blob/8be56b82f9f5a687619a2b2175fcaa66ad3d2233/src/Console/Console.php#L443-L461
197,306
ZFrapid/zfrapid-core
src/Console/Console.php
Console.writeConfirmPrompt
public function writeConfirmPrompt($message, $yes, $no) { $this->writeLine(); // write prompt badge $this->writeBadge('badge_pick', Color::RED); // output prompt $prompt = new Confirm( $this->translator->translate($message), $this->translator->transl...
php
public function writeConfirmPrompt($message, $yes, $no) { $this->writeLine(); // write prompt badge $this->writeBadge('badge_pick', Color::RED); // output prompt $prompt = new Confirm( $this->translator->translate($message), $this->translator->transl...
[ "public", "function", "writeConfirmPrompt", "(", "$", "message", ",", "$", "yes", ",", "$", "no", ")", "{", "$", "this", "->", "writeLine", "(", ")", ";", "// write prompt badge", "$", "this", "->", "writeBadge", "(", "'badge_pick'", ",", "Color", "::", ...
Write a customizable confirm prompt @param string $message @param string $yes @param string $no @return bool
[ "Write", "a", "customizable", "confirm", "prompt" ]
8be56b82f9f5a687619a2b2175fcaa66ad3d2233
https://github.com/ZFrapid/zfrapid-core/blob/8be56b82f9f5a687619a2b2175fcaa66ad3d2233/src/Console/Console.php#L472-L489
197,307
ZFrapid/zfrapid-core
src/Console/Console.php
Console.writeBadge
public function writeBadge($badgeText, $badgeColor) { $this->adapter->write( $this->translator->translate($badgeText), Color::NORMAL, $badgeColor ); $this->adapter->write(' '); }
php
public function writeBadge($badgeText, $badgeColor) { $this->adapter->write( $this->translator->translate($badgeText), Color::NORMAL, $badgeColor ); $this->adapter->write(' '); }
[ "public", "function", "writeBadge", "(", "$", "badgeText", ",", "$", "badgeColor", ")", "{", "$", "this", "->", "adapter", "->", "write", "(", "$", "this", "->", "translator", "->", "translate", "(", "$", "badgeText", ")", ",", "Color", "::", "NORMAL", ...
Write a customizable badge @param string $badgeText @param string $badgeColor
[ "Write", "a", "customizable", "badge" ]
8be56b82f9f5a687619a2b2175fcaa66ad3d2233
https://github.com/ZFrapid/zfrapid-core/blob/8be56b82f9f5a687619a2b2175fcaa66ad3d2233/src/Console/Console.php#L497-L505
197,308
ZFrapid/zfrapid-core
src/Console/Console.php
Console.writeBadgeLine
public function writeBadgeLine( $message, array $placeholders = [], $badgeText, $badgeColor, $preNewLine = false, $postNewLine = false ) { if ($preNewLine) { $this->adapter->writeLine(); } $this->adapter->write( $this->translator->translate($badgeText...
php
public function writeBadgeLine( $message, array $placeholders = [], $badgeText, $badgeColor, $preNewLine = false, $postNewLine = false ) { if ($preNewLine) { $this->adapter->writeLine(); } $this->adapter->write( $this->translator->translate($badgeText...
[ "public", "function", "writeBadgeLine", "(", "$", "message", ",", "array", "$", "placeholders", "=", "[", "]", ",", "$", "badgeText", ",", "$", "badgeColor", ",", "$", "preNewLine", "=", "false", ",", "$", "postNewLine", "=", "false", ")", "{", "if", "...
Write a line with customizable badge @param string $message @param array $placeholders @param string $badgeText @param string $badgeColor @param bool $preNewLine @param bool $postNewLine
[ "Write", "a", "line", "with", "customizable", "badge" ]
8be56b82f9f5a687619a2b2175fcaa66ad3d2233
https://github.com/ZFrapid/zfrapid-core/blob/8be56b82f9f5a687619a2b2175fcaa66ad3d2233/src/Console/Console.php#L517-L539
197,309
ZFrapid/zfrapid-core
src/Console/Console.php
Console.writeListItemLineLevel3
public function writeListItemLineLevel3($message, array $placeholders = []) { $this->adapter->write(' * '); $this->adapter->writeLine( vsprintf($this->translator->translate($message), $placeholders) ); }
php
public function writeListItemLineLevel3($message, array $placeholders = []) { $this->adapter->write(' * '); $this->adapter->writeLine( vsprintf($this->translator->translate($message), $placeholders) ); }
[ "public", "function", "writeListItemLineLevel3", "(", "$", "message", ",", "array", "$", "placeholders", "=", "[", "]", ")", "{", "$", "this", "->", "adapter", "->", "write", "(", "' * '", ")", ";", "$", "this", "->", "adapter", "->", "writeLine"...
Write a list item line for third level @param string $message @param array $placeholders
[ "Write", "a", "list", "item", "line", "for", "third", "level" ]
8be56b82f9f5a687619a2b2175fcaa66ad3d2233
https://github.com/ZFrapid/zfrapid-core/blob/8be56b82f9f5a687619a2b2175fcaa66ad3d2233/src/Console/Console.php#L590-L596
197,310
ZFrapid/zfrapid-core
src/Console/Console.php
Console.writeGoLine
public function writeGoLine($message, array $placeholders = []) { $this->writeBadgeLine( $message, $placeholders, 'badge_go', Color::YELLOW, false, true ); }
php
public function writeGoLine($message, array $placeholders = []) { $this->writeBadgeLine( $message, $placeholders, 'badge_go', Color::YELLOW, false, true ); }
[ "public", "function", "writeGoLine", "(", "$", "message", ",", "array", "$", "placeholders", "=", "[", "]", ")", "{", "$", "this", "->", "writeBadgeLine", "(", "$", "message", ",", "$", "placeholders", ",", "'badge_go'", ",", "Color", "::", "YELLOW", ","...
Write a line with a yellow GO badge @param string $message @param array $placeholders
[ "Write", "a", "line", "with", "a", "yellow", "GO", "badge" ]
8be56b82f9f5a687619a2b2175fcaa66ad3d2233
https://github.com/ZFrapid/zfrapid-core/blob/8be56b82f9f5a687619a2b2175fcaa66ad3d2233/src/Console/Console.php#L604-L609
197,311
ZFrapid/zfrapid-core
src/Console/Console.php
Console.writeTaskLine
public function writeTaskLine($message, array $placeholders = []) { $this->writeBadgeLine( $message, $placeholders, 'badge_task', Color::BLUE, false, false ); }
php
public function writeTaskLine($message, array $placeholders = []) { $this->writeBadgeLine( $message, $placeholders, 'badge_task', Color::BLUE, false, false ); }
[ "public", "function", "writeTaskLine", "(", "$", "message", ",", "array", "$", "placeholders", "=", "[", "]", ")", "{", "$", "this", "->", "writeBadgeLine", "(", "$", "message", ",", "$", "placeholders", ",", "'badge_task'", ",", "Color", "::", "BLUE", "...
Write a line with a Blue Done badge @param string $message @param array $placeholders
[ "Write", "a", "line", "with", "a", "Blue", "Done", "badge" ]
8be56b82f9f5a687619a2b2175fcaa66ad3d2233
https://github.com/ZFrapid/zfrapid-core/blob/8be56b82f9f5a687619a2b2175fcaa66ad3d2233/src/Console/Console.php#L617-L622
197,312
ZFrapid/zfrapid-core
src/Console/Console.php
Console.writeOkLine
public function writeOkLine($message, array $placeholders = []) { $this->writeBadgeLine( $message, $placeholders, 'badge_ok', Color::GREEN, true, true ); }
php
public function writeOkLine($message, array $placeholders = []) { $this->writeBadgeLine( $message, $placeholders, 'badge_ok', Color::GREEN, true, true ); }
[ "public", "function", "writeOkLine", "(", "$", "message", ",", "array", "$", "placeholders", "=", "[", "]", ")", "{", "$", "this", "->", "writeBadgeLine", "(", "$", "message", ",", "$", "placeholders", ",", "'badge_ok'", ",", "Color", "::", "GREEN", ",",...
Write a line with a green OK badge @param string $message @param array $placeholders
[ "Write", "a", "line", "with", "a", "green", "OK", "badge" ]
8be56b82f9f5a687619a2b2175fcaa66ad3d2233
https://github.com/ZFrapid/zfrapid-core/blob/8be56b82f9f5a687619a2b2175fcaa66ad3d2233/src/Console/Console.php#L630-L635
197,313
ZFrapid/zfrapid-core
src/Console/Console.php
Console.writeFailLine
public function writeFailLine($message, array $placeholders = []) { $this->writeBadgeLine( $message, $placeholders, 'badge_fail', Color::RED, true, true ); }
php
public function writeFailLine($message, array $placeholders = []) { $this->writeBadgeLine( $message, $placeholders, 'badge_fail', Color::RED, true, true ); }
[ "public", "function", "writeFailLine", "(", "$", "message", ",", "array", "$", "placeholders", "=", "[", "]", ")", "{", "$", "this", "->", "writeBadgeLine", "(", "$", "message", ",", "$", "placeholders", ",", "'badge_fail'", ",", "Color", "::", "RED", ",...
Write a line with a red Fail badge @param string $message @param array $placeholders
[ "Write", "a", "line", "with", "a", "red", "Fail", "badge" ]
8be56b82f9f5a687619a2b2175fcaa66ad3d2233
https://github.com/ZFrapid/zfrapid-core/blob/8be56b82f9f5a687619a2b2175fcaa66ad3d2233/src/Console/Console.php#L643-L648
197,314
ZFrapid/zfrapid-core
src/Console/Console.php
Console.writeWarnLine
public function writeWarnLine($message, array $placeholders = []) { $this->writeBadgeLine( $message, $placeholders, 'badge_warning', Color::RED, true, true ); }
php
public function writeWarnLine($message, array $placeholders = []) { $this->writeBadgeLine( $message, $placeholders, 'badge_warning', Color::RED, true, true ); }
[ "public", "function", "writeWarnLine", "(", "$", "message", ",", "array", "$", "placeholders", "=", "[", "]", ")", "{", "$", "this", "->", "writeBadgeLine", "(", "$", "message", ",", "$", "placeholders", ",", "'badge_warning'", ",", "Color", "::", "RED", ...
Write a line with a red Warn badge @param string $message @param array $placeholders
[ "Write", "a", "line", "with", "a", "red", "Warn", "badge" ]
8be56b82f9f5a687619a2b2175fcaa66ad3d2233
https://github.com/ZFrapid/zfrapid-core/blob/8be56b82f9f5a687619a2b2175fcaa66ad3d2233/src/Console/Console.php#L656-L661
197,315
ZFrapid/zfrapid-core
src/Console/Console.php
Console.writeTodoLine
public function writeTodoLine($message, array $placeholders = []) { $this->writeBadgeLine( $message, $placeholders, 'badge_todo', Color::GREEN, false, true ); }
php
public function writeTodoLine($message, array $placeholders = []) { $this->writeBadgeLine( $message, $placeholders, 'badge_todo', Color::GREEN, false, true ); }
[ "public", "function", "writeTodoLine", "(", "$", "message", ",", "array", "$", "placeholders", "=", "[", "]", ")", "{", "$", "this", "->", "writeBadgeLine", "(", "$", "message", ",", "$", "placeholders", ",", "'badge_todo'", ",", "Color", "::", "GREEN", ...
Write a line with a yellow to-do badge @param string $message @param array $placeholders
[ "Write", "a", "line", "with", "a", "yellow", "to", "-", "do", "badge" ]
8be56b82f9f5a687619a2b2175fcaa66ad3d2233
https://github.com/ZFrapid/zfrapid-core/blob/8be56b82f9f5a687619a2b2175fcaa66ad3d2233/src/Console/Console.php#L669-L674
197,316
mitogh/Katana
src/Helpers/Formatter.php
Formatter.katana_filter
public static function katana_filter( $param = '' ) { if ( $param ) { $param = trim( $param, ' _' ); return sprintf( '%s_%s', Config::KATANA_FILTER, $param ); } else { return Config::KATANA_FILTER; } }
php
public static function katana_filter( $param = '' ) { if ( $param ) { $param = trim( $param, ' _' ); return sprintf( '%s_%s', Config::KATANA_FILTER, $param ); } else { return Config::KATANA_FILTER; } }
[ "public", "static", "function", "katana_filter", "(", "$", "param", "=", "''", ")", "{", "if", "(", "$", "param", ")", "{", "$", "param", "=", "trim", "(", "$", "param", ",", "' _'", ")", ";", "return", "sprintf", "(", "'%s_%s'", ",", "Config", "::...
Creates a specific katana filter based on a param, like a post_id, a page template name or similar. @param string $param The suffix of the filter. @return string KATANA_FILTER by default and adding a suffix is param is provided. @since 2.0.0
[ "Creates", "a", "specific", "katana", "filter", "based", "on", "a", "param", "like", "a", "post_id", "a", "page", "template", "name", "or", "similar", "." ]
9eb7267f061fbe555dbe9c12461650bb4153915f
https://github.com/mitogh/Katana/blob/9eb7267f061fbe555dbe9c12461650bb4153915f/src/Helpers/Formatter.php#L40-L47
197,317
eliasis-framework/wp-plugin-info
src/controller/class-main.php
Main.get
public function get( $option, $slug ) { if ( $this->is_active() ) { $this->prepare( $slug ); $slug = $this->slug; if ( isset( $this->plugin[ $slug ][ $option ] ) ) { return $this->plugin[ $slug ][ $option ]; } elseif ( '*' == $option && isset( $this->plugin[ $slug ] ) ) { return $this->plugin[...
php
public function get( $option, $slug ) { if ( $this->is_active() ) { $this->prepare( $slug ); $slug = $this->slug; if ( isset( $this->plugin[ $slug ][ $option ] ) ) { return $this->plugin[ $slug ][ $option ]; } elseif ( '*' == $option && isset( $this->plugin[ $slug ] ) ) { return $this->plugin[...
[ "public", "function", "get", "(", "$", "option", ",", "$", "slug", ")", "{", "if", "(", "$", "this", "->", "is_active", "(", ")", ")", "{", "$", "this", "->", "prepare", "(", "$", "slug", ")", ";", "$", "slug", "=", "$", "this", "->", "slug", ...
Get plugin options. @param string $option → option to get. @param string $slug → WordPress plugin slug. @return mixed → value or false
[ "Get", "plugin", "options", "." ]
052843260394a457c9f8336a07d1a986cfbc5860
https://github.com/eliasis-framework/wp-plugin-info/blob/052843260394a457c9f8336a07d1a986cfbc5860/src/controller/class-main.php#L45-L61
197,318
eliasis-framework/wp-plugin-info
src/controller/class-main.php
Main.is_updated
protected function is_updated() { if ( $this->is_active() && isset( $this->plugin[ $this->slug ]['last-update'] ) ) { $interval = Plugin::WP_Plugin_Info()->getOption( 'interval' ); $last_update = $this->plugin[ $this->slug ]['last-update']; if ( ( time() - $last_update ) < $interval ) { return true...
php
protected function is_updated() { if ( $this->is_active() && isset( $this->plugin[ $this->slug ]['last-update'] ) ) { $interval = Plugin::WP_Plugin_Info()->getOption( 'interval' ); $last_update = $this->plugin[ $this->slug ]['last-update']; if ( ( time() - $last_update ) < $interval ) { return true...
[ "protected", "function", "is_updated", "(", ")", "{", "if", "(", "$", "this", "->", "is_active", "(", ")", "&&", "isset", "(", "$", "this", "->", "plugin", "[", "$", "this", "->", "slug", "]", "[", "'last-update'", "]", ")", ")", "{", "$", "interva...
Check the last update. @return bool
[ "Check", "the", "last", "update", "." ]
052843260394a457c9f8336a07d1a986cfbc5860
https://github.com/eliasis-framework/wp-plugin-info/blob/052843260394a457c9f8336a07d1a986cfbc5860/src/controller/class-main.php#L68-L81
197,319
eliasis-framework/wp-plugin-info
src/controller/class-main.php
Main.prepare
protected function prepare( $slug ) { $this->slug = $slug; $file = Plugin::WP_Plugin_Info()->getOption( 'file', 'plugins' ); if ( empty( $this->plugin ) ) { $this->plugin = $this->model->get_plugins_info( $file ); } if ( ! $this->is_updated() ) { $this->plugin[ $slug ] = $this->get_plugin_info( $s...
php
protected function prepare( $slug ) { $this->slug = $slug; $file = Plugin::WP_Plugin_Info()->getOption( 'file', 'plugins' ); if ( empty( $this->plugin ) ) { $this->plugin = $this->model->get_plugins_info( $file ); } if ( ! $this->is_updated() ) { $this->plugin[ $slug ] = $this->get_plugin_info( $s...
[ "protected", "function", "prepare", "(", "$", "slug", ")", "{", "$", "this", "->", "slug", "=", "$", "slug", ";", "$", "file", "=", "Plugin", "::", "WP_Plugin_Info", "(", ")", "->", "getOption", "(", "'file'", ",", "'plugins'", ")", ";", "if", "(", ...
Get plugin info. @param string $slug → WordPress plugin slug.
[ "Get", "plugin", "info", "." ]
052843260394a457c9f8336a07d1a986cfbc5860
https://github.com/eliasis-framework/wp-plugin-info/blob/052843260394a457c9f8336a07d1a986cfbc5860/src/controller/class-main.php#L98-L117
197,320
eliasis-framework/wp-plugin-info
src/controller/class-main.php
Main.get_plugin_info
protected function get_plugin_info( $slug ) { $args = (object) [ 'slug' => $slug ]; $request = [ 'action' => 'plugin_information', 'timeout' => 15, 'request' => serialize( $args ), ]; $url = Plugin::WP_Plugin_Info()->getOption( 'url', 'wp-api' ); $resp = wp_remote_post( $url, [ 'body' => $reques...
php
protected function get_plugin_info( $slug ) { $args = (object) [ 'slug' => $slug ]; $request = [ 'action' => 'plugin_information', 'timeout' => 15, 'request' => serialize( $args ), ]; $url = Plugin::WP_Plugin_Info()->getOption( 'url', 'wp-api' ); $resp = wp_remote_post( $url, [ 'body' => $reques...
[ "protected", "function", "get_plugin_info", "(", "$", "slug", ")", "{", "$", "args", "=", "(", "object", ")", "[", "'slug'", "=>", "$", "slug", "]", ";", "$", "request", "=", "[", "'action'", "=>", "'plugin_information'", ",", "'timeout'", "=>", "15", ...
Get plugin info in WordPress API. @param string $slug → WordPress plugin slug. @return array → plugin info
[ "Get", "plugin", "info", "in", "WordPress", "API", "." ]
052843260394a457c9f8336a07d1a986cfbc5860
https://github.com/eliasis-framework/wp-plugin-info/blob/052843260394a457c9f8336a07d1a986cfbc5860/src/controller/class-main.php#L126-L145
197,321
cloudtek/dynamodm
lib/Cloudtek/DynamoDM/Hydrator/HydratorFactory.php
HydratorFactory.hydrate
public function hydrate($document, $data, $readOnly = false) { $metadata = $this->dm->getClassMetadata(get_class($document)); // Invoke preLoad lifecycle events and listeners if (!empty($metadata->lifecycleCallbacks[Event::preLoad])) { $args = [new PreLoadEventArgs($document, $th...
php
public function hydrate($document, $data, $readOnly = false) { $metadata = $this->dm->getClassMetadata(get_class($document)); // Invoke preLoad lifecycle events and listeners if (!empty($metadata->lifecycleCallbacks[Event::preLoad])) { $args = [new PreLoadEventArgs($document, $th...
[ "public", "function", "hydrate", "(", "$", "document", ",", "$", "data", ",", "$", "readOnly", "=", "false", ")", "{", "$", "metadata", "=", "$", "this", "->", "dm", "->", "getClassMetadata", "(", "get_class", "(", "$", "document", ")", ")", ";", "//...
Hydrate array of DynamoDB document data into the given document object. @param object $document The document object to hydrate the data into. @param array $data The array of document data. @param bool $readOnly @return array $values The array of hydrated values.
[ "Hydrate", "array", "of", "DynamoDB", "document", "data", "into", "the", "given", "document", "object", "." ]
119d355e2c5cbaef1f867970349b4432f5704fcd
https://github.com/cloudtek/dynamodm/blob/119d355e2c5cbaef1f867970349b4432f5704fcd/lib/Cloudtek/DynamoDM/Hydrator/HydratorFactory.php#L384-L437
197,322
anime-db/catalog-bundle
src/Service/Item/Search/Selector/Builder.php
Builder.addLabels
public function addLabels(Search $entity) { if ($entity->getLabels()->count()) { $this->add(function (QueryBuilder $query) use ($entity) { $ids = []; foreach ($entity->getLabels() as $label) { $ids[] = (int) $label->getId(); } ...
php
public function addLabels(Search $entity) { if ($entity->getLabels()->count()) { $this->add(function (QueryBuilder $query) use ($entity) { $ids = []; foreach ($entity->getLabels() as $label) { $ids[] = (int) $label->getId(); } ...
[ "public", "function", "addLabels", "(", "Search", "$", "entity", ")", "{", "if", "(", "$", "entity", "->", "getLabels", "(", ")", "->", "count", "(", ")", ")", "{", "$", "this", "->", "add", "(", "function", "(", "QueryBuilder", "$", "query", ")", ...
Add labels. @param Search $entity @return Builder
[ "Add", "labels", "." ]
631b6f92a654e91bee84f46218c52cf42bdb8606
https://github.com/anime-db/catalog-bundle/blob/631b6f92a654e91bee84f46218c52cf42bdb8606/src/Service/Item/Search/Selector/Builder.php#L224-L240
197,323
pixelpolishers/makedocs
src/MakeDocs/WebHook/GitHub/GitHub.php
GitHub.listen
public function listen() { if ($_SERVER['REQUEST_METHOD'] != 'POST') { throw new InvalidRequestException('Expected a POST request.'); } $remoteAddress = $this->getRemoteAddress(); if (!$this->isValidRemoteAddress($remoteAddress)) { throw new InvalidRequestExc...
php
public function listen() { if ($_SERVER['REQUEST_METHOD'] != 'POST') { throw new InvalidRequestException('Expected a POST request.'); } $remoteAddress = $this->getRemoteAddress(); if (!$this->isValidRemoteAddress($remoteAddress)) { throw new InvalidRequestExc...
[ "public", "function", "listen", "(", ")", "{", "if", "(", "$", "_SERVER", "[", "'REQUEST_METHOD'", "]", "!=", "'POST'", ")", "{", "throw", "new", "InvalidRequestException", "(", "'Expected a POST request.'", ")", ";", "}", "$", "remoteAddress", "=", "$", "th...
Listens for incoming requests. @throws InvalidRequestException
[ "Listens", "for", "incoming", "requests", "." ]
1fa243b52565b5de417ef2dbdfbcae9896b6b483
https://github.com/pixelpolishers/makedocs/blob/1fa243b52565b5de417ef2dbdfbcae9896b6b483/src/MakeDocs/WebHook/GitHub/GitHub.php#L155-L190
197,324
jamset/process-load-manager
src/TerminatorPauseStander.php
TerminatorPauseStander.checkSubscription
public function checkSubscription() { if (!$this->subscriberSocket) { $this->subscriberSocket = $this->context->getSocket(\ZMQ::SOCKET_SUB); $this->subscriberSocket->connect($this->publisherPmSocketAddress); $this->subscriberSocket->setSockOpt(\ZMQ::SOCKOPT_SUBSCRIBE, "")...
php
public function checkSubscription() { if (!$this->subscriberSocket) { $this->subscriberSocket = $this->context->getSocket(\ZMQ::SOCKET_SUB); $this->subscriberSocket->connect($this->publisherPmSocketAddress); $this->subscriberSocket->setSockOpt(\ZMQ::SOCKOPT_SUBSCRIBE, "")...
[ "public", "function", "checkSubscription", "(", ")", "{", "if", "(", "!", "$", "this", "->", "subscriberSocket", ")", "{", "$", "this", "->", "subscriberSocket", "=", "$", "this", "->", "context", "->", "getSocket", "(", "\\", "ZMQ", "::", "SOCKET_SUB", ...
Check if subscription contain pid of process @return mixed
[ "Check", "if", "subscription", "contain", "pid", "of", "process" ]
cffed6ff73bf66617565707ec4f2c9251a497cc6
https://github.com/jamset/process-load-manager/blob/cffed6ff73bf66617565707ec4f2c9251a497cc6/src/TerminatorPauseStander.php#L115-L138
197,325
jamset/process-load-manager
src/TerminatorPauseStander.php
TerminatorPauseStander.standOnPauseIfMust
public function standOnPauseIfMust() { if ($this->mustStandOnPause) { $this->iAmInPause = true; while ($this->canContinue === false) { $this->logger->info(getmypid() . " come to usleep for microseconds: " . $this->uSleepTime); usleep($this->uSleepTi...
php
public function standOnPauseIfMust() { if ($this->mustStandOnPause) { $this->iAmInPause = true; while ($this->canContinue === false) { $this->logger->info(getmypid() . " come to usleep for microseconds: " . $this->uSleepTime); usleep($this->uSleepTi...
[ "public", "function", "standOnPauseIfMust", "(", ")", "{", "if", "(", "$", "this", "->", "mustStandOnPause", ")", "{", "$", "this", "->", "iAmInPause", "=", "true", ";", "while", "(", "$", "this", "->", "canContinue", "===", "false", ")", "{", "$", "th...
Go into infinite loop with periodic checking of the subscription if it allows to continue @return mixed
[ "Go", "into", "infinite", "loop", "with", "periodic", "checking", "of", "the", "subscription", "if", "it", "allows", "to", "continue" ]
cffed6ff73bf66617565707ec4f2c9251a497cc6
https://github.com/jamset/process-load-manager/blob/cffed6ff73bf66617565707ec4f2c9251a497cc6/src/TerminatorPauseStander.php#L143-L164
197,326
jamset/process-load-manager
src/TerminatorPauseStander.php
TerminatorPauseStander.continueExecution
public function continueExecution() { $this->logger->info("TerminatorPauseStander " . getmypid() . " CONTINUED."); $this->iAmInPause = false; $this->mustStandOnPause = false; $this->canContinue = false; return null; }
php
public function continueExecution() { $this->logger->info("TerminatorPauseStander " . getmypid() . " CONTINUED."); $this->iAmInPause = false; $this->mustStandOnPause = false; $this->canContinue = false; return null; }
[ "public", "function", "continueExecution", "(", ")", "{", "$", "this", "->", "logger", "->", "info", "(", "\"TerminatorPauseStander \"", ".", "getmypid", "(", ")", ".", "\" CONTINUED.\"", ")", ";", "$", "this", "->", "iAmInPause", "=", "false", ";", "$", "...
Exit from infinite loop @return mixed
[ "Exit", "from", "infinite", "loop" ]
cffed6ff73bf66617565707ec4f2c9251a497cc6
https://github.com/jamset/process-load-manager/blob/cffed6ff73bf66617565707ec4f2c9251a497cc6/src/TerminatorPauseStander.php#L169-L178
197,327
Fulfillment-dot-com/api-wrapper-php
src/Utilities/RequestParser.php
RequestParser.parseError
public static function parseError(RequestException $requestException, $isAssoc = true) { $error = $error = json_decode($requestException->getResponse()->getBody(), $isAssoc); if (!is_null($error)) { return $error; } else { return $requestException->getMessage(); } }
php
public static function parseError(RequestException $requestException, $isAssoc = true) { $error = $error = json_decode($requestException->getResponse()->getBody(), $isAssoc); if (!is_null($error)) { return $error; } else { return $requestException->getMessage(); } }
[ "public", "static", "function", "parseError", "(", "RequestException", "$", "requestException", ",", "$", "isAssoc", "=", "true", ")", "{", "$", "error", "=", "$", "error", "=", "json_decode", "(", "$", "requestException", "->", "getResponse", "(", ")", "->"...
Returns an object or array of the FDC error parsed from the Guzzle Request exception @param RequestException $requestException @param bool $isAssoc @return string
[ "Returns", "an", "object", "or", "array", "of", "the", "FDC", "error", "parsed", "from", "the", "Guzzle", "Request", "exception" ]
f4352843d060bc1b460c1283f25c210c9b94d324
https://github.com/Fulfillment-dot-com/api-wrapper-php/blob/f4352843d060bc1b460c1283f25c210c9b94d324/src/Utilities/RequestParser.php#L23-L36
197,328
gplcart/cli
controllers/commands/Alias.php
Alias.cmdGetAlias
public function cmdGetAlias() { $result = $this->getListAlias(); $this->outputFormat($result); $this->outputFormatTableAlias($result); $this->output(); }
php
public function cmdGetAlias() { $result = $this->getListAlias(); $this->outputFormat($result); $this->outputFormatTableAlias($result); $this->output(); }
[ "public", "function", "cmdGetAlias", "(", ")", "{", "$", "result", "=", "$", "this", "->", "getListAlias", "(", ")", ";", "$", "this", "->", "outputFormat", "(", "$", "result", ")", ";", "$", "this", "->", "outputFormatTableAlias", "(", "$", "result", ...
Callback for "alias-get" command
[ "Callback", "for", "alias", "-", "get", "command" ]
e57dba53e291a225b4bff0c0d9b23d685dd1c125
https://github.com/gplcart/cli/blob/e57dba53e291a225b4bff0c0d9b23d685dd1c125/controllers/commands/Alias.php#L42-L48
197,329
gplcart/cli
controllers/commands/Alias.php
Alias.cmdAddAlias
public function cmdAddAlias() { $params = $this->getParam(); if (count($params) != 3) { $this->errorAndExit($this->text('Invalid command')); } list($entity, $entity_id, $alias) = $params; if (empty($entity) || empty($entity_id) || empty($alias) || !is_numeric($...
php
public function cmdAddAlias() { $params = $this->getParam(); if (count($params) != 3) { $this->errorAndExit($this->text('Invalid command')); } list($entity, $entity_id, $alias) = $params; if (empty($entity) || empty($entity_id) || empty($alias) || !is_numeric($...
[ "public", "function", "cmdAddAlias", "(", ")", "{", "$", "params", "=", "$", "this", "->", "getParam", "(", ")", ";", "if", "(", "count", "(", "$", "params", ")", "!=", "3", ")", "{", "$", "this", "->", "errorAndExit", "(", "$", "this", "->", "te...
Callback for "alias-add" command
[ "Callback", "for", "alias", "-", "add", "command" ]
e57dba53e291a225b4bff0c0d9b23d685dd1c125
https://github.com/gplcart/cli/blob/e57dba53e291a225b4bff0c0d9b23d685dd1c125/controllers/commands/Alias.php#L53-L79
197,330
gplcart/cli
controllers/commands/Alias.php
Alias.cmdGenerateAlias
public function cmdGenerateAlias() { $entity = $this->getParam(0); $entity_id = $this->getParam(1); $all = $this->getParam('all'); if (empty($entity)) { $this->errorAndExit($this->text('Invalid command')); } if (!isset($entity_id) && empty($all)) { ...
php
public function cmdGenerateAlias() { $entity = $this->getParam(0); $entity_id = $this->getParam(1); $all = $this->getParam('all'); if (empty($entity)) { $this->errorAndExit($this->text('Invalid command')); } if (!isset($entity_id) && empty($all)) { ...
[ "public", "function", "cmdGenerateAlias", "(", ")", "{", "$", "entity", "=", "$", "this", "->", "getParam", "(", "0", ")", ";", "$", "entity_id", "=", "$", "this", "->", "getParam", "(", "1", ")", ";", "$", "all", "=", "$", "this", "->", "getParam"...
Callback for "alias-generate" command
[ "Callback", "for", "alias", "-", "generate", "command" ]
e57dba53e291a225b4bff0c0d9b23d685dd1c125
https://github.com/gplcart/cli/blob/e57dba53e291a225b4bff0c0d9b23d685dd1c125/controllers/commands/Alias.php#L84-L129
197,331
gplcart/cli
controllers/commands/Alias.php
Alias.addAlias
protected function addAlias($entity, $entity_id, $alias) { $this->alias->delete(array('entity' => $entity, 'entity_id' => $entity_id)); $data = array( 'alias' => $alias, 'entity' => $entity, 'entity_id' => $entity_id ); return $this->alias->add($...
php
protected function addAlias($entity, $entity_id, $alias) { $this->alias->delete(array('entity' => $entity, 'entity_id' => $entity_id)); $data = array( 'alias' => $alias, 'entity' => $entity, 'entity_id' => $entity_id ); return $this->alias->add($...
[ "protected", "function", "addAlias", "(", "$", "entity", ",", "$", "entity_id", ",", "$", "alias", ")", "{", "$", "this", "->", "alias", "->", "delete", "(", "array", "(", "'entity'", "=>", "$", "entity", ",", "'entity_id'", "=>", "$", "entity_id", ")"...
Add a URL alias @param string $entity @param int $entity_id @param string $alias @return int
[ "Add", "a", "URL", "alias" ]
e57dba53e291a225b4bff0c0d9b23d685dd1c125
https://github.com/gplcart/cli/blob/e57dba53e291a225b4bff0c0d9b23d685dd1c125/controllers/commands/Alias.php#L137-L148
197,332
gplcart/cli
controllers/commands/Alias.php
Alias.generateListAlias
protected function generateListAlias($entity) { if (!$this->alias->isSupportedEntity($entity)) { $this->errorAndExit($this->text('Invalid argument')); } $model = gplcart_instance_model($entity); if (!$model instanceof CrudInterface) { $this->errorAndExit($th...
php
protected function generateListAlias($entity) { if (!$this->alias->isSupportedEntity($entity)) { $this->errorAndExit($this->text('Invalid argument')); } $model = gplcart_instance_model($entity); if (!$model instanceof CrudInterface) { $this->errorAndExit($th...
[ "protected", "function", "generateListAlias", "(", "$", "entity", ")", "{", "if", "(", "!", "$", "this", "->", "alias", "->", "isSupportedEntity", "(", "$", "entity", ")", ")", "{", "$", "this", "->", "errorAndExit", "(", "$", "this", "->", "text", "("...
Mass generate URL aliases for the given entity @param string $entity @return bool
[ "Mass", "generate", "URL", "aliases", "for", "the", "given", "entity" ]
e57dba53e291a225b4bff0c0d9b23d685dd1c125
https://github.com/gplcart/cli/blob/e57dba53e291a225b4bff0c0d9b23d685dd1c125/controllers/commands/Alias.php#L155-L194
197,333
gplcart/cli
controllers/commands/Alias.php
Alias.getListAlias
protected function getListAlias() { $id = $this->getParam(0); if (!isset($id)) { return $this->alias->getList(array('limit' => $this->getLimit())); } if ($this->getParam('entity')) { return $this->alias->getList(array('entity' => $id, 'limit' => $this->getLi...
php
protected function getListAlias() { $id = $this->getParam(0); if (!isset($id)) { return $this->alias->getList(array('limit' => $this->getLimit())); } if ($this->getParam('entity')) { return $this->alias->getList(array('entity' => $id, 'limit' => $this->getLi...
[ "protected", "function", "getListAlias", "(", ")", "{", "$", "id", "=", "$", "this", "->", "getParam", "(", "0", ")", ";", "if", "(", "!", "isset", "(", "$", "id", ")", ")", "{", "return", "$", "this", "->", "alias", "->", "getList", "(", "array"...
Returns an array of URL aliases @return array
[ "Returns", "an", "array", "of", "URL", "aliases" ]
e57dba53e291a225b4bff0c0d9b23d685dd1c125
https://github.com/gplcart/cli/blob/e57dba53e291a225b4bff0c0d9b23d685dd1c125/controllers/commands/Alias.php#L251-L274
197,334
linpax/microphp-framework
src/mvc/views/PhpView.php
PhpView.render
public function render() { if (!$this->view) { return false; } return $this->renderRawData( $this->data ?: $this->renderFile($this->getViewFile($this->view), $this->params) ); }
php
public function render() { if (!$this->view) { return false; } return $this->renderRawData( $this->data ?: $this->renderFile($this->getViewFile($this->view), $this->params) ); }
[ "public", "function", "render", "(", ")", "{", "if", "(", "!", "$", "this", "->", "view", ")", "{", "return", "false", ";", "}", "return", "$", "this", "->", "renderRawData", "(", "$", "this", "->", "data", "?", ":", "$", "this", "->", "renderFile"...
Render insert data into view @access protected @return string @throws Exception
[ "Render", "insert", "data", "into", "view" ]
11f3370f3f64c516cce9b84ecd8276c6e9ae8df9
https://github.com/linpax/microphp-framework/blob/11f3370f3f64c516cce9b84ecd8276c6e9ae8df9/src/mvc/views/PhpView.php#L67-L76
197,335
linpax/microphp-framework
src/mvc/views/PhpView.php
PhpView.renderRawData
public function renderRawData($data = '') { $layoutPath = null; if ($this->layout && (!$layoutPath = $this->getLayoutFile((new KernelInjector)->build()->getAppDir(), $this->module)) ) { (new LoggerInjector)->build()->send('error', 'Layout `'.$this->layout.'` not f...
php
public function renderRawData($data = '') { $layoutPath = null; if ($this->layout && (!$layoutPath = $this->getLayoutFile((new KernelInjector)->build()->getAppDir(), $this->module)) ) { (new LoggerInjector)->build()->send('error', 'Layout `'.$this->layout.'` not f...
[ "public", "function", "renderRawData", "(", "$", "data", "=", "''", ")", "{", "$", "layoutPath", "=", "null", ";", "if", "(", "$", "this", "->", "layout", "&&", "(", "!", "$", "layoutPath", "=", "$", "this", "->", "getLayoutFile", "(", "(", "new", ...
Render raw data in layout @access public @param string $data arguments array @return string @throws Exception
[ "Render", "raw", "data", "in", "layout" ]
11f3370f3f64c516cce9b84ecd8276c6e9ae8df9
https://github.com/linpax/microphp-framework/blob/11f3370f3f64c516cce9b84ecd8276c6e9ae8df9/src/mvc/views/PhpView.php#L88-L102
197,336
linpax/microphp-framework
src/mvc/views/PhpView.php
PhpView.getLayoutFile
protected function getLayoutFile($appDir, $module) { if ($module) { $module = strtolower(str_replace('\\', '/', $module)); $module = substr($module, strpos($module, '/') + 1); $module = substr($module, 0, strrpos($module, '/')); } $layout = $appDir.'/'.($...
php
protected function getLayoutFile($appDir, $module) { if ($module) { $module = strtolower(str_replace('\\', '/', $module)); $module = substr($module, strpos($module, '/') + 1); $module = substr($module, 0, strrpos($module, '/')); } $layout = $appDir.'/'.($...
[ "protected", "function", "getLayoutFile", "(", "$", "appDir", ",", "$", "module", ")", "{", "if", "(", "$", "module", ")", "{", "$", "module", "=", "strtolower", "(", "str_replace", "(", "'\\\\'", ",", "'/'", ",", "$", "module", ")", ")", ";", "$", ...
Get layout path @access protected @param string $appDir path to base dir @param string $module module name @return string @throws Exception
[ "Get", "layout", "path" ]
11f3370f3f64c516cce9b84ecd8276c6e9ae8df9
https://github.com/linpax/microphp-framework/blob/11f3370f3f64c516cce9b84ecd8276c6e9ae8df9/src/mvc/views/PhpView.php#L115-L135
197,337
linpax/microphp-framework
src/mvc/views/PhpView.php
PhpView.renderFile
protected function renderFile($fileName, array $data = []) { /** @noinspection OnlyWritesOnParameterInspection */ /** @noinspection PhpUnusedLocalVariableInspection */ $lang = new Language($fileName); extract($data, EXTR_PREFIX_SAME || EXTR_REFS, 'data'); ob_start(); ...
php
protected function renderFile($fileName, array $data = []) { /** @noinspection OnlyWritesOnParameterInspection */ /** @noinspection PhpUnusedLocalVariableInspection */ $lang = new Language($fileName); extract($data, EXTR_PREFIX_SAME || EXTR_REFS, 'data'); ob_start(); ...
[ "protected", "function", "renderFile", "(", "$", "fileName", ",", "array", "$", "data", "=", "[", "]", ")", "{", "/** @noinspection OnlyWritesOnParameterInspection */", "/** @noinspection PhpUnusedLocalVariableInspection */", "$", "lang", "=", "new", "Language", "(", "$...
Render file by path @access protected @param string $fileName file name @param array $data arguments array @return string @throws Exception widget not declared
[ "Render", "file", "by", "path" ]
11f3370f3f64c516cce9b84ecd8276c6e9ae8df9
https://github.com/linpax/microphp-framework/blob/11f3370f3f64c516cce9b84ecd8276c6e9ae8df9/src/mvc/views/PhpView.php#L148-L164
197,338
linpax/microphp-framework
src/mvc/views/PhpView.php
PhpView.getViewFile
private function getViewFile($view) { $calledClass = $this->path; // Calculate path to view if (0 === strpos($calledClass, 'App')) { $path = (new KernelInjector)->build()->getAppDir(); } else { $path = Autoload::getAlias('Micro'); } $cl = str...
php
private function getViewFile($view) { $calledClass = $this->path; // Calculate path to view if (0 === strpos($calledClass, 'App')) { $path = (new KernelInjector)->build()->getAppDir(); } else { $path = Autoload::getAlias('Micro'); } $cl = str...
[ "private", "function", "getViewFile", "(", "$", "view", ")", "{", "$", "calledClass", "=", "$", "this", "->", "path", ";", "// Calculate path to view", "if", "(", "0", "===", "strpos", "(", "$", "calledClass", ",", "'App'", ")", ")", "{", "$", "path", ...
Get view file @access private @param string $view view file name @return string @throws Exception
[ "Get", "view", "file" ]
11f3370f3f64c516cce9b84ecd8276c6e9ae8df9
https://github.com/linpax/microphp-framework/blob/11f3370f3f64c516cce9b84ecd8276c6e9ae8df9/src/mvc/views/PhpView.php#L176-L205
197,339
iumio/framework-setup
Tools.php
Tools.checkPhpVersion
final public static function checkPhpVersion() { $phpv = phpversion(); if ($phpv >= self::$php_accept) { return (json_encode(array("code" => 200, "results" => "OK", "phpv" => $phpv))); } else { return (json_encode(array("code" => 500, "results" => "NOK", "phpv" => $p...
php
final public static function checkPhpVersion() { $phpv = phpversion(); if ($phpv >= self::$php_accept) { return (json_encode(array("code" => 200, "results" => "OK", "phpv" => $phpv))); } else { return (json_encode(array("code" => 500, "results" => "NOK", "phpv" => $p...
[ "final", "public", "static", "function", "checkPhpVersion", "(", ")", "{", "$", "phpv", "=", "phpversion", "(", ")", ";", "if", "(", "$", "phpv", ">=", "self", "::", "$", "php_accept", ")", "{", "return", "(", "json_encode", "(", "array", "(", "\"code\...
Check the php version @return string If php version is compatible
[ "Check", "the", "php", "version" ]
02bb46ce6aa3a52908ff4608bd14264608bb38d1
https://github.com/iumio/framework-setup/blob/02bb46ce6aa3a52908ff4608bd14264608bb38d1/Tools.php#L59-L70
197,340
iumio/framework-setup
Tools.php
Tools.checkFrameworkBuildVersion
final public static function checkFrameworkBuildVersion() { $f = json_decode(file_get_contents(__DIR__."/../../elements/config_files/core/framework.config.json")); if (!property_exists($f, 'installation')) { return (json_encode(array("code" => 500, "results" => "NOK", "fv" => "unknow", ...
php
final public static function checkFrameworkBuildVersion() { $f = json_decode(file_get_contents(__DIR__."/../../elements/config_files/core/framework.config.json")); if (!property_exists($f, 'installation')) { return (json_encode(array("code" => 500, "results" => "NOK", "fv" => "unknow", ...
[ "final", "public", "static", "function", "checkFrameworkBuildVersion", "(", ")", "{", "$", "f", "=", "json_decode", "(", "file_get_contents", "(", "__DIR__", ".", "\"/../../elements/config_files/core/framework.config.json\"", ")", ")", ";", "if", "(", "!", "property_e...
Check the iumio Framework version @return string If iumio Framework version is compatible
[ "Check", "the", "iumio", "Framework", "version" ]
02bb46ce6aa3a52908ff4608bd14264608bb38d1
https://github.com/iumio/framework-setup/blob/02bb46ce6aa3a52908ff4608bd14264608bb38d1/Tools.php#L75-L104
197,341
iumio/framework-setup
Tools.php
Tools.isDirEmpty
final public static function isDirEmpty($dir) { if (!is_readable($dir)) { return (null); } $handle = opendir($dir); while (false !== ($entry = readdir($handle))) { if ($entry != "." && $entry != "..") { return (false); } } ...
php
final public static function isDirEmpty($dir) { if (!is_readable($dir)) { return (null); } $handle = opendir($dir); while (false !== ($entry = readdir($handle))) { if ($entry != "." && $entry != "..") { return (false); } } ...
[ "final", "public", "static", "function", "isDirEmpty", "(", "$", "dir", ")", "{", "if", "(", "!", "is_readable", "(", "$", "dir", ")", ")", "{", "return", "(", "null", ")", ";", "}", "$", "handle", "=", "opendir", "(", "$", "dir", ")", ";", "whil...
Check if dir is empty or not @param $dir string Dir path @return bool|null If empty or not
[ "Check", "if", "dir", "is", "empty", "or", "not" ]
02bb46ce6aa3a52908ff4608bd14264608bb38d1
https://github.com/iumio/framework-setup/blob/02bb46ce6aa3a52908ff4608bd14264608bb38d1/Tools.php#L149-L161
197,342
iumio/framework-setup
Tools.php
Tools.checkLibrariesRequired
final public static function checkLibrariesRequired() { $base = __DIR__."/../../"; foreach (self::$libs as $lib => $val) { if (!is_dir($base.$lib) || !self::checkIsReadable($base.$lib) || !self::checkIsWritable($base.$lib) || self::isDirEmpty($base.$lib)) { ...
php
final public static function checkLibrariesRequired() { $base = __DIR__."/../../"; foreach (self::$libs as $lib => $val) { if (!is_dir($base.$lib) || !self::checkIsReadable($base.$lib) || !self::checkIsWritable($base.$lib) || self::isDirEmpty($base.$lib)) { ...
[ "final", "public", "static", "function", "checkLibrariesRequired", "(", ")", "{", "$", "base", "=", "__DIR__", ".", "\"/../../\"", ";", "foreach", "(", "self", "::", "$", "libs", "as", "$", "lib", "=>", "$", "val", ")", "{", "if", "(", "!", "is_dir", ...
Check if librairies required are installed @return int Are installed or not
[ "Check", "if", "librairies", "required", "are", "installed" ]
02bb46ce6aa3a52908ff4608bd14264608bb38d1
https://github.com/iumio/framework-setup/blob/02bb46ce6aa3a52908ff4608bd14264608bb38d1/Tools.php#L167-L184
197,343
FuzeWorks/Core
src/FuzeWorks/Configurator.php
Configurator.setParameters
public function setParameters(array $params): self { foreach ($params as $key => $value) { $this->parameters[$key] = $value; } return $this; }
php
public function setParameters(array $params): self { foreach ($params as $key => $value) { $this->parameters[$key] = $value; } return $this; }
[ "public", "function", "setParameters", "(", "array", "$", "params", ")", ":", "self", "{", "foreach", "(", "$", "params", "as", "$", "key", "=>", "$", "value", ")", "{", "$", "this", "->", "parameters", "[", "$", "key", "]", "=", "$", "value", ";",...
Adds new parameters. The %params% will be expanded. @return self
[ "Adds", "new", "parameters", ".", "The", "%params%", "will", "be", "expanded", "." ]
051c64fdaa3a648174cbd54557d05ad553dd826b
https://github.com/FuzeWorks/Core/blob/051c64fdaa3a648174cbd54557d05ad553dd826b/src/FuzeWorks/Configurator.php#L111-L117
197,344
FuzeWorks/Core
src/FuzeWorks/Configurator.php
Configurator.setDebugMode
public function setDebugMode($value): self { if (is_string($value) || is_array($value)) { $value = static::detectDebugMode($value); } elseif (!is_bool($value)) { throw new InvalidArgumentException(sprintf('Value must be either a string, array, or boolean, %s given.', gettype(...
php
public function setDebugMode($value): self { if (is_string($value) || is_array($value)) { $value = static::detectDebugMode($value); } elseif (!is_bool($value)) { throw new InvalidArgumentException(sprintf('Value must be either a string, array, or boolean, %s given.', gettype(...
[ "public", "function", "setDebugMode", "(", "$", "value", ")", ":", "self", "{", "if", "(", "is_string", "(", "$", "value", ")", "||", "is_array", "(", "$", "value", ")", ")", "{", "$", "value", "=", "static", "::", "detectDebugMode", "(", "$", "value...
Set parameter %debugMode%. @param bool|string|array @return self
[ "Set", "parameter", "%debugMode%", "." ]
051c64fdaa3a648174cbd54557d05ad553dd826b
https://github.com/FuzeWorks/Core/blob/051c64fdaa3a648174cbd54557d05ad553dd826b/src/FuzeWorks/Configurator.php#L142-L151
197,345
FuzeWorks/Core
src/FuzeWorks/Configurator.php
Configurator.createContainer
public function createContainer(): Factory { // First set all the directories Core::$appDir = $this->parameters['appDir']; Core::$wwwDir = $this->parameters['wwwDir']; Core::$tempDir = $this->parameters['tempDir']; Core::$logDir = $this->parameters['logDir']; // Then...
php
public function createContainer(): Factory { // First set all the directories Core::$appDir = $this->parameters['appDir']; Core::$wwwDir = $this->parameters['wwwDir']; Core::$tempDir = $this->parameters['tempDir']; Core::$logDir = $this->parameters['logDir']; // Then...
[ "public", "function", "createContainer", "(", ")", ":", "Factory", "{", "// First set all the directories", "Core", "::", "$", "appDir", "=", "$", "this", "->", "parameters", "[", "'appDir'", "]", ";", "Core", "::", "$", "wwwDir", "=", "$", "this", "->", "...
Create the container which holds FuzeWorks. Due to the static nature of FuzeWorks, this is not yet possible. When issue #101 is completed, this should be resolved. @return Factory
[ "Create", "the", "container", "which", "holds", "FuzeWorks", "." ]
051c64fdaa3a648174cbd54557d05ad553dd826b
https://github.com/FuzeWorks/Core/blob/051c64fdaa3a648174cbd54557d05ad553dd826b/src/FuzeWorks/Configurator.php#L194-L227
197,346
phpffcms/ffcms-core
src/Properties.php
Properties.get
public function get(string $configKey, string $configFile = 'default', ?string $parseType = null) { $this->load($configFile); // check if configs for this file is loaded if (!isset($this->data[$configFile])) { return false; } // check if config key is exist ...
php
public function get(string $configKey, string $configFile = 'default', ?string $parseType = null) { $this->load($configFile); // check if configs for this file is loaded if (!isset($this->data[$configFile])) { return false; } // check if config key is exist ...
[ "public", "function", "get", "(", "string", "$", "configKey", ",", "string", "$", "configFile", "=", "'default'", ",", "?", "string", "$", "parseType", "=", "null", ")", "{", "$", "this", "->", "load", "(", "$", "configFile", ")", ";", "// check if confi...
Get config value by config key from configuration file @param string $configKey @param string $configFile @param string|null $parseType @return mixed
[ "Get", "config", "value", "by", "config", "key", "from", "configuration", "file" ]
44a309553ef9f115ccfcfd71f2ac6e381c612082
https://github.com/phpffcms/ffcms-core/blob/44a309553ef9f115ccfcfd71f2ac6e381c612082/src/Properties.php#L61-L96
197,347
phpffcms/ffcms-core
src/Properties.php
Properties.getAll
public function getAll($configFile = 'default'): ?array { $this->load($configFile); if (!Any::isArray($this->data) || !array_key_exists($configFile, $this->data)) { return null; } return $this->data[$configFile]; }
php
public function getAll($configFile = 'default'): ?array { $this->load($configFile); if (!Any::isArray($this->data) || !array_key_exists($configFile, $this->data)) { return null; } return $this->data[$configFile]; }
[ "public", "function", "getAll", "(", "$", "configFile", "=", "'default'", ")", ":", "?", "array", "{", "$", "this", "->", "load", "(", "$", "configFile", ")", ";", "if", "(", "!", "Any", "::", "isArray", "(", "$", "this", "->", "data", ")", "||", ...
Get all configuration data of selected file @param string $configFile @return array|null
[ "Get", "all", "configuration", "data", "of", "selected", "file" ]
44a309553ef9f115ccfcfd71f2ac6e381c612082
https://github.com/phpffcms/ffcms-core/blob/44a309553ef9f115ccfcfd71f2ac6e381c612082/src/Properties.php#L103-L111
197,348
phpffcms/ffcms-core
src/Properties.php
Properties.updateConfig
public function updateConfig(string $configFile, array $newData, ?bool $mergeDeep = false): bool { $this->load($configFile); if (!isset($this->data[$configFile])) { return false; } $oldData = $this->data[$configFile]; $saveData = ($mergeDeep ? Arr::mergeRecursive...
php
public function updateConfig(string $configFile, array $newData, ?bool $mergeDeep = false): bool { $this->load($configFile); if (!isset($this->data[$configFile])) { return false; } $oldData = $this->data[$configFile]; $saveData = ($mergeDeep ? Arr::mergeRecursive...
[ "public", "function", "updateConfig", "(", "string", "$", "configFile", ",", "array", "$", "newData", ",", "?", "bool", "$", "mergeDeep", "=", "false", ")", ":", "bool", "{", "$", "this", "->", "load", "(", "$", "configFile", ")", ";", "if", "(", "!"...
Update configuration data based on key-value array of new data. Do not pass multi-level array on new position without existing keys @param string $configFile @param array $newData @param bool $mergeDeep @return bool
[ "Update", "configuration", "data", "based", "on", "key", "-", "value", "array", "of", "new", "data", ".", "Do", "not", "pass", "multi", "-", "level", "array", "on", "new", "position", "without", "existing", "keys" ]
44a309553ef9f115ccfcfd71f2ac6e381c612082
https://github.com/phpffcms/ffcms-core/blob/44a309553ef9f115ccfcfd71f2ac6e381c612082/src/Properties.php#L120-L130
197,349
phpffcms/ffcms-core
src/Properties.php
Properties.writeConfig
public function writeConfig(string $configFile, array $data): bool { $path = '/Private/Config/' . ucfirst(Str::lowerCase($configFile)) . '.php'; if (!File::exist($path) || !File::writable($path)) { return false; } $saveData = '<?php return ' . Arr::exportVar($data) . ';'...
php
public function writeConfig(string $configFile, array $data): bool { $path = '/Private/Config/' . ucfirst(Str::lowerCase($configFile)) . '.php'; if (!File::exist($path) || !File::writable($path)) { return false; } $saveData = '<?php return ' . Arr::exportVar($data) . ';'...
[ "public", "function", "writeConfig", "(", "string", "$", "configFile", ",", "array", "$", "data", ")", ":", "bool", "{", "$", "path", "=", "'/Private/Config/'", ".", "ucfirst", "(", "Str", "::", "lowerCase", "(", "$", "configFile", ")", ")", ".", "'.php'...
Write configurations data from array to cfg file @param string $configFile @param array $data @return bool
[ "Write", "configurations", "data", "from", "array", "to", "cfg", "file" ]
44a309553ef9f115ccfcfd71f2ac6e381c612082
https://github.com/phpffcms/ffcms-core/blob/44a309553ef9f115ccfcfd71f2ac6e381c612082/src/Properties.php#L138-L150
197,350
ARCANESOFT/SEO
src/Models/Presenters/PagePresenter.php
PagePresenter.renderContent
protected function renderContent(array $replacements) { return $this->getContentReplacer()->replace($this->content, array_merge([ 'app_name' => config('app.name'), 'app_url' => link_to(config('app.url'), config('app.name')), 'mobile' => html()->tel(config('cms.company....
php
protected function renderContent(array $replacements) { return $this->getContentReplacer()->replace($this->content, array_merge([ 'app_name' => config('app.name'), 'app_url' => link_to(config('app.url'), config('app.name')), 'mobile' => html()->tel(config('cms.company....
[ "protected", "function", "renderContent", "(", "array", "$", "replacements", ")", "{", "return", "$", "this", "->", "getContentReplacer", "(", ")", "->", "replace", "(", "$", "this", "->", "content", ",", "array_merge", "(", "[", "'app_name'", "=>", "config"...
Render the content. @param array $replacements @return string
[ "Render", "the", "content", "." ]
ce6d6135d55e8b2fd43cf7923839b4791b7c7ad2
https://github.com/ARCANESOFT/SEO/blob/ce6d6135d55e8b2fd43cf7923839b4791b7c7ad2/src/Models/Presenters/PagePresenter.php#L56-L65
197,351
Vectrex/vxPHP
src/Form/FormElement/FormElement.php
FormElement.setLabel
public function setLabel(LabelElement $label) { $this->label = $label; if(($for = $this->getAttribute('id'))) { $label->setAttribute('for', $for); } return $this; }
php
public function setLabel(LabelElement $label) { $this->label = $label; if(($for = $this->getAttribute('id'))) { $label->setAttribute('for', $for); } return $this; }
[ "public", "function", "setLabel", "(", "LabelElement", "$", "label", ")", "{", "$", "this", "->", "label", "=", "$", "label", ";", "if", "(", "(", "$", "for", "=", "$", "this", "->", "getAttribute", "(", "'id'", ")", ")", ")", "{", "$", "label", ...
assign label element to this form element "for" attribute of label is set if form element has an "id" attribute @param LabelElement $label @return $this
[ "assign", "label", "element", "to", "this", "form", "element", "for", "attribute", "of", "label", "is", "set", "if", "form", "element", "has", "an", "id", "attribute" ]
295c21b00e7ef6085efcdf5b64fabb28d499b5a6
https://github.com/Vectrex/vxPHP/blob/295c21b00e7ef6085efcdf5b64fabb28d499b5a6/src/Form/FormElement/FormElement.php#L196-L207
197,352
Vectrex/vxPHP
src/Form/FormElement/FormElement.php
FormElement.setAttribute
public function setAttribute($attr, $value) { $attr = strtolower($attr); if($attr === 'value') { return $this->setValue($value); } if($attr === 'name') { return $this->setName($value); } if($attr === 'id' && $this->label) { $this->label->setAttribute('for', $value); } if(is_null($...
php
public function setAttribute($attr, $value) { $attr = strtolower($attr); if($attr === 'value') { return $this->setValue($value); } if($attr === 'name') { return $this->setName($value); } if($attr === 'id' && $this->label) { $this->label->setAttribute('for', $value); } if(is_null($...
[ "public", "function", "setAttribute", "(", "$", "attr", ",", "$", "value", ")", "{", "$", "attr", "=", "strtolower", "(", "$", "attr", ")", ";", "if", "(", "$", "attr", "===", "'value'", ")", "{", "return", "$", "this", "->", "setValue", "(", "$", ...
sets miscellaneous attribute of form element attributes 'value', 'name' are treated by calling the according setters setting 'id' will update 'for' when a label element is assigned @param string $attr @param mixed $value @return \vxPHP\Form\FormElement\FormElement
[ "sets", "miscellaneous", "attribute", "of", "form", "element", "attributes", "value", "name", "are", "treated", "by", "calling", "the", "according", "setters", "setting", "id", "will", "update", "for", "when", "a", "label", "element", "is", "assigned" ]
295c21b00e7ef6085efcdf5b64fabb28d499b5a6
https://github.com/Vectrex/vxPHP/blob/295c21b00e7ef6085efcdf5b64fabb28d499b5a6/src/Form/FormElement/FormElement.php#L230-L254
197,353
Vectrex/vxPHP
src/Form/FormElement/FormElement.php
FormElement.setAttributes
public function setAttributes(Array $attributes) { foreach($attributes as $k => $v) { $this->setAttribute($k, $v); } return $this; }
php
public function setAttributes(Array $attributes) { foreach($attributes as $k => $v) { $this->setAttribute($k, $v); } return $this; }
[ "public", "function", "setAttributes", "(", "Array", "$", "attributes", ")", "{", "foreach", "(", "$", "attributes", "as", "$", "k", "=>", "$", "v", ")", "{", "$", "this", "->", "setAttribute", "(", "$", "k", ",", "$", "v", ")", ";", "}", "return",...
sets several attributes with an associative array @param array $attributes @return \vxPHP\Form\FormElement\FormElement
[ "sets", "several", "attributes", "with", "an", "associative", "array" ]
295c21b00e7ef6085efcdf5b64fabb28d499b5a6
https://github.com/Vectrex/vxPHP/blob/295c21b00e7ef6085efcdf5b64fabb28d499b5a6/src/Form/FormElement/FormElement.php#L262-L269
197,354
Vectrex/vxPHP
src/Form/FormElement/FormElement.php
FormElement.getAttribute
public function getAttribute($name) { $key = strtolower($name); if('value' === $key) { return $this->getValue(); } if('name' === $key) { return $this->getName(); } if(array_key_exists($key, $this->attributes)) { return $this->attributes[strtolowe...
php
public function getAttribute($name) { $key = strtolower($name); if('value' === $key) { return $this->getValue(); } if('name' === $key) { return $this->getName(); } if(array_key_exists($key, $this->attributes)) { return $this->attributes[strtolowe...
[ "public", "function", "getAttribute", "(", "$", "name", ")", "{", "$", "key", "=", "strtolower", "(", "$", "name", ")", ";", "if", "(", "'value'", "===", "$", "key", ")", "{", "return", "$", "this", "->", "getValue", "(", ")", ";", "}", "if", "("...
get a single attribute name and value attributes are redirected to the respective getter methods @param $name @return string|null
[ "get", "a", "single", "attribute", "name", "and", "value", "attributes", "are", "redirected", "to", "the", "respective", "getter", "methods" ]
295c21b00e7ef6085efcdf5b64fabb28d499b5a6
https://github.com/Vectrex/vxPHP/blob/295c21b00e7ef6085efcdf5b64fabb28d499b5a6/src/Form/FormElement/FormElement.php#L279-L299
197,355
Vectrex/vxPHP
src/Form/FormElement/FormElement.php
FormElement.isValid
public function isValid() { if(!isset($this->valid)) { $this->valid = $this->applyValidators( $this->applyModifiers($this->getValue()) ); } return $this->valid; }
php
public function isValid() { if(!isset($this->valid)) { $this->valid = $this->applyValidators( $this->applyModifiers($this->getValue()) ); } return $this->valid; }
[ "public", "function", "isValid", "(", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "valid", ")", ")", "{", "$", "this", "->", "valid", "=", "$", "this", "->", "applyValidators", "(", "$", "this", "->", "applyModifiers", "(", "$", "thi...
checks whether modified form element passes validation rules @return boolean $success
[ "checks", "whether", "modified", "form", "element", "passes", "validation", "rules" ]
295c21b00e7ef6085efcdf5b64fabb28d499b5a6
https://github.com/Vectrex/vxPHP/blob/295c21b00e7ef6085efcdf5b64fabb28d499b5a6/src/Form/FormElement/FormElement.php#L410-L420
197,356
Vectrex/vxPHP
src/Form/FormElement/FormElement.php
FormElement.canSubmit
public function canSubmit() { return $this instanceof InputElement && isset($this->attributes['type']) && $this->attributes['type'] == 'submit' || $this instanceof ImageElement || $this instanceof SubmitInputElement || $this instanceof ButtonElement && $this->attributes['type'] == 'submit'; }
php
public function canSubmit() { return $this instanceof InputElement && isset($this->attributes['type']) && $this->attributes['type'] == 'submit' || $this instanceof ImageElement || $this instanceof SubmitInputElement || $this instanceof ButtonElement && $this->attributes['type'] == 'submit'; }
[ "public", "function", "canSubmit", "(", ")", "{", "return", "$", "this", "instanceof", "InputElement", "&&", "isset", "(", "$", "this", "->", "attributes", "[", "'type'", "]", ")", "&&", "$", "this", "->", "attributes", "[", "'type'", "]", "==", "'submit...
check whether element can submit a form @return boolean $result
[ "check", "whether", "element", "can", "submit", "a", "form" ]
295c21b00e7ef6085efcdf5b64fabb28d499b5a6
https://github.com/Vectrex/vxPHP/blob/295c21b00e7ef6085efcdf5b64fabb28d499b5a6/src/Form/FormElement/FormElement.php#L427-L435
197,357
Vectrex/vxPHP
src/Form/FormElement/FormElement.php
FormElement.render
public function render() { if(!$this->template) { throw new \RuntimeException(sprintf("No template for element '%s' defined.", $this->getName())); } $this->html = $this->template->assign('element', $this)->display(); return $this->html; }
php
public function render() { if(!$this->template) { throw new \RuntimeException(sprintf("No template for element '%s' defined.", $this->getName())); } $this->html = $this->template->assign('element', $this)->display(); return $this->html; }
[ "public", "function", "render", "(", ")", "{", "if", "(", "!", "$", "this", "->", "template", ")", "{", "throw", "new", "\\", "RuntimeException", "(", "sprintf", "(", "\"No template for element '%s' defined.\"", ",", "$", "this", "->", "getName", "(", ")", ...
renders form element and returns markup requires a template for rendering @return string @throws \vxPHP\Application\Exception\ApplicationException @throws \vxPHP\Template\Exception\SimpleTemplateException
[ "renders", "form", "element", "and", "returns", "markup", "requires", "a", "template", "for", "rendering" ]
295c21b00e7ef6085efcdf5b64fabb28d499b5a6
https://github.com/Vectrex/vxPHP/blob/295c21b00e7ef6085efcdf5b64fabb28d499b5a6/src/Form/FormElement/FormElement.php#L577-L585
197,358
jmfeurprier/perf-database
lib/perf/Db/ConnectionPool.php
ConnectionPool.prepare
public function prepare($connectionId, Credentials $credentials) { $connection = Connection::fromCredentials($credentials); $this->store($connectionId, $connection); }
php
public function prepare($connectionId, Credentials $credentials) { $connection = Connection::fromCredentials($credentials); $this->store($connectionId, $connection); }
[ "public", "function", "prepare", "(", "$", "connectionId", ",", "Credentials", "$", "credentials", ")", "{", "$", "connection", "=", "Connection", "::", "fromCredentials", "(", "$", "credentials", ")", ";", "$", "this", "->", "store", "(", "$", "connectionId...
Stores a new database connection with provided credentials. @param string $connectionId @param Credentials $credentials @return void
[ "Stores", "a", "new", "database", "connection", "with", "provided", "credentials", "." ]
9b39dc76be9f8a33d02aadc168fdb74d786f0ff2
https://github.com/jmfeurprier/perf-database/blob/9b39dc76be9f8a33d02aadc168fdb74d786f0ff2/lib/perf/Db/ConnectionPool.php#L27-L32
197,359
jmfeurprier/perf-database
lib/perf/Db/ConnectionPool.php
ConnectionPool.store
public function store($connectionId, Connection $connection) { $connectionId = (string) $connectionId; $this->connections[$connectionId] = $connection; }
php
public function store($connectionId, Connection $connection) { $connectionId = (string) $connectionId; $this->connections[$connectionId] = $connection; }
[ "public", "function", "store", "(", "$", "connectionId", ",", "Connection", "$", "connection", ")", "{", "$", "connectionId", "=", "(", "string", ")", "$", "connectionId", ";", "$", "this", "->", "connections", "[", "$", "connectionId", "]", "=", "$", "c...
Stores an existing database connection. @param string $connectionId @param Connection $connection @return void
[ "Stores", "an", "existing", "database", "connection", "." ]
9b39dc76be9f8a33d02aadc168fdb74d786f0ff2
https://github.com/jmfeurprier/perf-database/blob/9b39dc76be9f8a33d02aadc168fdb74d786f0ff2/lib/perf/Db/ConnectionPool.php#L41-L46
197,360
jmfeurprier/perf-database
lib/perf/Db/ConnectionPool.php
ConnectionPool.fetch
public function fetch($connectionId) { $connectionId = (string) $connectionId; if ($this->exist($connectionId)) { return $this->connections[$connectionId]; } throw new \DomainException("Requested database connection '{$connectionId}' does not exist."); }
php
public function fetch($connectionId) { $connectionId = (string) $connectionId; if ($this->exist($connectionId)) { return $this->connections[$connectionId]; } throw new \DomainException("Requested database connection '{$connectionId}' does not exist."); }
[ "public", "function", "fetch", "(", "$", "connectionId", ")", "{", "$", "connectionId", "=", "(", "string", ")", "$", "connectionId", ";", "if", "(", "$", "this", "->", "exist", "(", "$", "connectionId", ")", ")", "{", "return", "$", "this", "->", "c...
Returns the database connection with provided identifier, or throws an exception if not found. @param string $connectionId @return Connection @throws \DomainException
[ "Returns", "the", "database", "connection", "with", "provided", "identifier", "or", "throws", "an", "exception", "if", "not", "found", "." ]
9b39dc76be9f8a33d02aadc168fdb74d786f0ff2
https://github.com/jmfeurprier/perf-database/blob/9b39dc76be9f8a33d02aadc168fdb74d786f0ff2/lib/perf/Db/ConnectionPool.php#L55-L64
197,361
yuncms/yuncms-core
console/controllers/CronController.php
CronController.actionMinute
public function actionMinute() { $this->stdout("Executing minute tasks:" . PHP_EOL, Console::FG_YELLOW); $this->trigger(self::EVENT_ON_MINUTE_RUN); Yii::$app->settings->set('cronLastMinuteRun', time(), 'core'); return ExitCode::OK; }
php
public function actionMinute() { $this->stdout("Executing minute tasks:" . PHP_EOL, Console::FG_YELLOW); $this->trigger(self::EVENT_ON_MINUTE_RUN); Yii::$app->settings->set('cronLastMinuteRun', time(), 'core'); return ExitCode::OK; }
[ "public", "function", "actionMinute", "(", ")", "{", "$", "this", "->", "stdout", "(", "\"Executing minute tasks:\"", ".", "PHP_EOL", ",", "Console", "::", "FG_YELLOW", ")", ";", "$", "this", "->", "trigger", "(", "self", "::", "EVENT_ON_MINUTE_RUN", ")", ";...
Executes minute cron tasks. @throws \yii\base\InvalidConfigException
[ "Executes", "minute", "cron", "tasks", "." ]
bfaf61c38e48979036c3ede3a0f2beb637500df5
https://github.com/yuncms/yuncms-core/blob/bfaf61c38e48979036c3ede3a0f2beb637500df5/console/controllers/CronController.php#L49-L55
197,362
yuncms/yuncms-core
console/controllers/CronController.php
CronController.actionHourly
public function actionHourly() { $this->stdout("Executing hourly tasks:" . PHP_EOL, Console::FG_YELLOW); $this->trigger(self::EVENT_ON_HOURLY_RUN); Yii::$app->settings->set('cronLastHourlyRun', time(), 'core'); return ExitCode::OK; }
php
public function actionHourly() { $this->stdout("Executing hourly tasks:" . PHP_EOL, Console::FG_YELLOW); $this->trigger(self::EVENT_ON_HOURLY_RUN); Yii::$app->settings->set('cronLastHourlyRun', time(), 'core'); return ExitCode::OK; }
[ "public", "function", "actionHourly", "(", ")", "{", "$", "this", "->", "stdout", "(", "\"Executing hourly tasks:\"", ".", "PHP_EOL", ",", "Console", "::", "FG_YELLOW", ")", ";", "$", "this", "->", "trigger", "(", "self", "::", "EVENT_ON_HOURLY_RUN", ")", ";...
Executes hourly cron tasks. @throws \yii\base\InvalidConfigException
[ "Executes", "hourly", "cron", "tasks", "." ]
bfaf61c38e48979036c3ede3a0f2beb637500df5
https://github.com/yuncms/yuncms-core/blob/bfaf61c38e48979036c3ede3a0f2beb637500df5/console/controllers/CronController.php#L61-L67
197,363
yuncms/yuncms-core
console/controllers/CronController.php
CronController.actionDaily
public function actionDaily() { $this->stdout("Executing daily tasks:" . PHP_EOL, Console::FG_YELLOW); $this->trigger(self::EVENT_ON_DAILY_RUN); Yii::$app->settings->set('cronLastDailyRun', time(), 'core'); return ExitCode::OK; }
php
public function actionDaily() { $this->stdout("Executing daily tasks:" . PHP_EOL, Console::FG_YELLOW); $this->trigger(self::EVENT_ON_DAILY_RUN); Yii::$app->settings->set('cronLastDailyRun', time(), 'core'); return ExitCode::OK; }
[ "public", "function", "actionDaily", "(", ")", "{", "$", "this", "->", "stdout", "(", "\"Executing daily tasks:\"", ".", "PHP_EOL", ",", "Console", "::", "FG_YELLOW", ")", ";", "$", "this", "->", "trigger", "(", "self", "::", "EVENT_ON_DAILY_RUN", ")", ";", ...
Executes daily cron tasks. @throws \yii\base\InvalidConfigException
[ "Executes", "daily", "cron", "tasks", "." ]
bfaf61c38e48979036c3ede3a0f2beb637500df5
https://github.com/yuncms/yuncms-core/blob/bfaf61c38e48979036c3ede3a0f2beb637500df5/console/controllers/CronController.php#L73-L79
197,364
yuncms/yuncms-core
console/controllers/CronController.php
CronController.actionMonth
public function actionMonth() { $this->stdout("Executing month tasks:" . PHP_EOL, Console::FG_YELLOW); $this->trigger(self::EVENT_ON_MONTH_RUN); Yii::$app->settings->set('cronLastMonthRun', time(), 'core'); return ExitCode::OK; }
php
public function actionMonth() { $this->stdout("Executing month tasks:" . PHP_EOL, Console::FG_YELLOW); $this->trigger(self::EVENT_ON_MONTH_RUN); Yii::$app->settings->set('cronLastMonthRun', time(), 'core'); return ExitCode::OK; }
[ "public", "function", "actionMonth", "(", ")", "{", "$", "this", "->", "stdout", "(", "\"Executing month tasks:\"", ".", "PHP_EOL", ",", "Console", "::", "FG_YELLOW", ")", ";", "$", "this", "->", "trigger", "(", "self", "::", "EVENT_ON_MONTH_RUN", ")", ";", ...
Executes month cron tasks. @throws \yii\base\InvalidConfigException
[ "Executes", "month", "cron", "tasks", "." ]
bfaf61c38e48979036c3ede3a0f2beb637500df5
https://github.com/yuncms/yuncms-core/blob/bfaf61c38e48979036c3ede3a0f2beb637500df5/console/controllers/CronController.php#L85-L91
197,365
wasinger/adaptimage
src/ResponsiveImages/ResponsiveImageClass.php
ResponsiveImageClass.getImageResizeDefinitionByWidth
public function getImageResizeDefinitionByWidth($width) { if (!key_exists($width, $this->irds)) { throw new WidthNotAllowedException($width); } return $this->irds[$width]; }
php
public function getImageResizeDefinitionByWidth($width) { if (!key_exists($width, $this->irds)) { throw new WidthNotAllowedException($width); } return $this->irds[$width]; }
[ "public", "function", "getImageResizeDefinitionByWidth", "(", "$", "width", ")", "{", "if", "(", "!", "key_exists", "(", "$", "width", ",", "$", "this", "->", "irds", ")", ")", "{", "throw", "new", "WidthNotAllowedException", "(", "$", "width", ")", ";", ...
Get an ImageResizeDefinition for a given width @param int $width @return ImageResizeDefinition
[ "Get", "an", "ImageResizeDefinition", "for", "a", "given", "width" ]
7b529b25081b399451c8bbd56d0cef7daaa83ec4
https://github.com/wasinger/adaptimage/blob/7b529b25081b399451c8bbd56d0cef7daaa83ec4/src/ResponsiveImages/ResponsiveImageClass.php#L181-L187
197,366
wasinger/adaptimage
src/ResponsiveImages/ResponsiveImageClass.php
ResponsiveImageClass.setScaleAlgorithm
public function setScaleAlgorithm($algorithm) { foreach ($this->available_image_widths as $width) { $this->irds[$width]->setScaleAlgorithm($algorithm); } return $this; }
php
public function setScaleAlgorithm($algorithm) { foreach ($this->available_image_widths as $width) { $this->irds[$width]->setScaleAlgorithm($algorithm); } return $this; }
[ "public", "function", "setScaleAlgorithm", "(", "$", "algorithm", ")", "{", "foreach", "(", "$", "this", "->", "available_image_widths", "as", "$", "width", ")", "{", "$", "this", "->", "irds", "[", "$", "width", "]", "->", "setScaleAlgorithm", "(", "$", ...
Set the algorithm used for scaling @param string $algorithm One of the ImageInterface::FILTER_* constants @return $this
[ "Set", "the", "algorithm", "used", "for", "scaling" ]
7b529b25081b399451c8bbd56d0cef7daaa83ec4
https://github.com/wasinger/adaptimage/blob/7b529b25081b399451c8bbd56d0cef7daaa83ec4/src/ResponsiveImages/ResponsiveImageClass.php#L264-L270
197,367
bseddon/XPath20
Value/DurationValue.php
DurationValue.getTotalDays
public function getTotalDays() { // Get a count of days. The 'diff' function generates an interval with a count of days in ->days $dt = new \DateTimeImmutable(); return $dt->add( $this->Value )->diff( $dt )->days; }
php
public function getTotalDays() { // Get a count of days. The 'diff' function generates an interval with a count of days in ->days $dt = new \DateTimeImmutable(); return $dt->add( $this->Value )->diff( $dt )->days; }
[ "public", "function", "getTotalDays", "(", ")", "{", "// Get a count of days. The 'diff' function generates an interval with a count of days in ->days\r", "$", "dt", "=", "new", "\\", "DateTimeImmutable", "(", ")", ";", "return", "$", "dt", "->", "add", "(", "$", "this...
Return the total days of the duration @return int
[ "Return", "the", "total", "days", "of", "the", "duration" ]
69882b6efffaa5470a819d5fdd2f6473ddeb046d
https://github.com/bseddon/XPath20/blob/69882b6efffaa5470a819d5fdd2f6473ddeb046d/Value/DurationValue.php#L323-L328
197,368
bseddon/XPath20
Value/DurationValue.php
DurationValue.hasValue
public static function hasValue( $di ) { $components = array( "s", "i", "h", "d", "m", "y" ); $hasValue = false; foreach( $components as $component ) { $hasValue = isset( $di->$component ) && $di->$component != 0; if ( $hasValue ) break; } return $hasValue; }
php
public static function hasValue( $di ) { $components = array( "s", "i", "h", "d", "m", "y" ); $hasValue = false; foreach( $components as $component ) { $hasValue = isset( $di->$component ) && $di->$component != 0; if ( $hasValue ) break; } return $hasValue; }
[ "public", "static", "function", "hasValue", "(", "$", "di", ")", "{", "$", "components", "=", "array", "(", "\"s\"", ",", "\"i\"", ",", "\"h\"", ",", "\"d\"", ",", "\"m\"", ",", "\"y\"", ")", ";", "$", "hasValue", "=", "false", ";", "foreach", "(", ...
Returns true if the date interval parameter has a non zero value @param \DateInterval $di @return bool
[ "Returns", "true", "if", "the", "date", "interval", "parameter", "has", "a", "non", "zero", "value" ]
69882b6efffaa5470a819d5fdd2f6473ddeb046d
https://github.com/bseddon/XPath20/blob/69882b6efffaa5470a819d5fdd2f6473ddeb046d/Value/DurationValue.php#L422-L432
197,369
koolkode/view-express
src/Tree/AttributeNode.php
AttributeNode.compile
public function compile(ExpressCompiler $compiler, $flags = 0) { try { if($flags & self::FLAG_RAW) { if(empty($this->childNodes)) { $compiler->write("''"); } else { $compiler->write('('); foreach($this->childNodes as $i => $node) { if($i > 0) { ...
php
public function compile(ExpressCompiler $compiler, $flags = 0) { try { if($flags & self::FLAG_RAW) { if(empty($this->childNodes)) { $compiler->write("''"); } else { $compiler->write('('); foreach($this->childNodes as $i => $node) { if($i > 0) { ...
[ "public", "function", "compile", "(", "ExpressCompiler", "$", "compiler", ",", "$", "flags", "=", "0", ")", "{", "try", "{", "if", "(", "$", "flags", "&", "self", "::", "FLAG_RAW", ")", "{", "if", "(", "empty", "(", "$", "this", "->", "childNodes", ...
Compile the attribute value into it's PHP code. @param ExpressCompiler $compiler @param integer $flags Raw mode is used when the element is going to be morphed from a TagBuilder.
[ "Compile", "the", "attribute", "value", "into", "it", "s", "PHP", "code", "." ]
a8ebe6f373b6bfe8b8818d6264535e8fe063a596
https://github.com/koolkode/view-express/blob/a8ebe6f373b6bfe8b8818d6264535e8fe063a596/src/Tree/AttributeNode.php#L91-L134
197,370
mkurc1/DoctrinePrefixBundle
Subscriber/TablePrefixSubscriber.php
TablePrefixSubscriber.loadClassMetadata
public function loadClassMetadata(LoadClassMetadataEventArgs $args) { if (empty($this->prefix)) { return; } /** @var ClassMetadata $classMetadata */ $classMetadata = $args->getClassMetadata(); if (false === strpos($classMetadata->getTableName(), $this->prefix)) ...
php
public function loadClassMetadata(LoadClassMetadataEventArgs $args) { if (empty($this->prefix)) { return; } /** @var ClassMetadata $classMetadata */ $classMetadata = $args->getClassMetadata(); if (false === strpos($classMetadata->getTableName(), $this->prefix)) ...
[ "public", "function", "loadClassMetadata", "(", "LoadClassMetadataEventArgs", "$", "args", ")", "{", "if", "(", "empty", "(", "$", "this", "->", "prefix", ")", ")", "{", "return", ";", "}", "/** @var ClassMetadata $classMetadata */", "$", "classMetadata", "=", "...
Load class meta data event @param LoadClassMetadataEventArgs $args @return void
[ "Load", "class", "meta", "data", "event" ]
eaea50e4d3a81c3b4e2648c425387deceacddac7
https://github.com/mkurc1/DoctrinePrefixBundle/blob/eaea50e4d3a81c3b4e2648c425387deceacddac7/Subscriber/TablePrefixSubscriber.php#L45-L70
197,371
foxslider/cmg-plugin
common/components/Core.php
Core.init
public function init() { parent::init(); // Foxslider Alias Yii::setAlias( 'foxslider', dirname( dirname( dirname( __DIR__ ) ) ) ); // Register components and objects $this->registerComponents(); }
php
public function init() { parent::init(); // Foxslider Alias Yii::setAlias( 'foxslider', dirname( dirname( dirname( __DIR__ ) ) ) ); // Register components and objects $this->registerComponents(); }
[ "public", "function", "init", "(", ")", "{", "parent", "::", "init", "(", ")", ";", "// Foxslider Alias", "Yii", "::", "setAlias", "(", "'foxslider'", ",", "dirname", "(", "dirname", "(", "dirname", "(", "__DIR__", ")", ")", ")", ")", ";", "// Register c...
Initialize the services.
[ "Initialize", "the", "services", "." ]
843f723ebb512ab833feff581beb9714df4e41bd
https://github.com/foxslider/cmg-plugin/blob/843f723ebb512ab833feff581beb9714df4e41bd/common/components/Core.php#L36-L45
197,372
FusePump/cli.php
lib/FusePump/Cli/Inputs.php
Inputs.checkInputs
private function checkInputs($short, $long) { $key = array_search($short, $this->inputs); if ($key === false) { $key = array_search($long, $this->inputs); if ($key === false) { return false; } else { return $key; } ...
php
private function checkInputs($short, $long) { $key = array_search($short, $this->inputs); if ($key === false) { $key = array_search($long, $this->inputs); if ($key === false) { return false; } else { return $key; } ...
[ "private", "function", "checkInputs", "(", "$", "short", ",", "$", "long", ")", "{", "$", "key", "=", "array_search", "(", "$", "short", ",", "$", "this", "->", "inputs", ")", ";", "if", "(", "$", "key", "===", "false", ")", "{", "$", "key", "=",...
Check input for flag @param string $short @param string $long @return bool|mixed
[ "Check", "input", "for", "flag" ]
2cc92f09ce7b2f73d5cbc09f5ae4f31f3f9ae3b4
https://github.com/FusePump/cli.php/blob/2cc92f09ce7b2f73d5cbc09f5ae4f31f3f9ae3b4/lib/FusePump/Cli/Inputs.php#L199-L212
197,373
FusePump/cli.php
lib/FusePump/Cli/Inputs.php
Inputs.checkRequired
private function checkRequired() { // Loop through all params foreach ($this->params as $param) { if (array_key_exists('required', $param) && $param['required'] == true) { if (!array_key_exists($param['name'], $this->pinputs)) { throw new \Exception('P...
php
private function checkRequired() { // Loop through all params foreach ($this->params as $param) { if (array_key_exists('required', $param) && $param['required'] == true) { if (!array_key_exists($param['name'], $this->pinputs)) { throw new \Exception('P...
[ "private", "function", "checkRequired", "(", ")", "{", "// Loop through all params", "foreach", "(", "$", "this", "->", "params", "as", "$", "param", ")", "{", "if", "(", "array_key_exists", "(", "'required'", ",", "$", "param", ")", "&&", "$", "param", "[...
Check required options If a required option is not provided then throw and exception @throws \Exception if required param or option is not present
[ "Check", "required", "options", "If", "a", "required", "option", "is", "not", "provided", "then", "throw", "and", "exception" ]
2cc92f09ce7b2f73d5cbc09f5ae4f31f3f9ae3b4
https://github.com/FusePump/cli.php/blob/2cc92f09ce7b2f73d5cbc09f5ae4f31f3f9ae3b4/lib/FusePump/Cli/Inputs.php#L220-L242
197,374
FusePump/cli.php
lib/FusePump/Cli/Inputs.php
Inputs.confirm
public static function confirm($msg) { echo $msg; $input = trim(fgets(STDIN)); if (strtolower($input) == 'y' || strtolower($input) == 'yes') { return true; } else { return false; } }
php
public static function confirm($msg) { echo $msg; $input = trim(fgets(STDIN)); if (strtolower($input) == 'y' || strtolower($input) == 'yes') { return true; } else { return false; } }
[ "public", "static", "function", "confirm", "(", "$", "msg", ")", "{", "echo", "$", "msg", ";", "$", "input", "=", "trim", "(", "fgets", "(", "STDIN", ")", ")", ";", "if", "(", "strtolower", "(", "$", "input", ")", "==", "'y'", "||", "strtolower", ...
Add a confirmation @param string $msg - question to ask @static @return bool - true if yes, false if anything else
[ "Add", "a", "confirmation" ]
2cc92f09ce7b2f73d5cbc09f5ae4f31f3f9ae3b4
https://github.com/FusePump/cli.php/blob/2cc92f09ce7b2f73d5cbc09f5ae4f31f3f9ae3b4/lib/FusePump/Cli/Inputs.php#L362-L372
197,375
FusePump/cli.php
lib/FusePump/Cli/Inputs.php
Inputs.outputHelp
public function outputHelp($short = false) { echo "Usage: " . $this->getName() . " "; if (!empty($this->params)) { foreach ($this->params as $param) { if ($param['required'] == true) { echo '<' . $param['name'] . '> '; } else { ...
php
public function outputHelp($short = false) { echo "Usage: " . $this->getName() . " "; if (!empty($this->params)) { foreach ($this->params as $param) { if ($param['required'] == true) { echo '<' . $param['name'] . '> '; } else { ...
[ "public", "function", "outputHelp", "(", "$", "short", "=", "false", ")", "{", "echo", "\"Usage: \"", ".", "$", "this", "->", "getName", "(", ")", ".", "\" \"", ";", "if", "(", "!", "empty", "(", "$", "this", "->", "params", ")", ")", "{", "foreach...
Output help text Format: Usage: {{name}} <param> [options] Options: -p, --peppers Add peppers -c, --cheese [type] Add a cheese -m, --mayo Add mayonaise -h, --help Output usage information @param bool $short - if true, short output text
[ "Output", "help", "text" ]
2cc92f09ce7b2f73d5cbc09f5ae4f31f3f9ae3b4
https://github.com/FusePump/cli.php/blob/2cc92f09ce7b2f73d5cbc09f5ae4f31f3f9ae3b4/lib/FusePump/Cli/Inputs.php#L389-L427
197,376
Wedeto/Log
src/Writer/FileWriter.php
FileWriter.writeLine
private function writeLine(string $str) { $now = time(); if ($this->file && $this->file_opened < $now - $this->reopen_interval) { // Close the file after a set interval fclose($this->file); $this->file = null; } if (!$this->file) {...
php
private function writeLine(string $str) { $now = time(); if ($this->file && $this->file_opened < $now - $this->reopen_interval) { // Close the file after a set interval fclose($this->file); $this->file = null; } if (!$this->file) {...
[ "private", "function", "writeLine", "(", "string", "$", "str", ")", "{", "$", "now", "=", "time", "(", ")", ";", "if", "(", "$", "this", "->", "file", "&&", "$", "this", "->", "file_opened", "<", "$", "now", "-", "$", "this", "->", "reopen_interval...
Write a line to the log file @param string $str The line to write
[ "Write", "a", "line", "to", "the", "log", "file" ]
88252c5052089fdcc5dae466d1ad5889bb2b735f
https://github.com/Wedeto/Log/blob/88252c5052089fdcc5dae466d1ad5889bb2b735f/src/Writer/FileWriter.php#L88-L119
197,377
irfantoor/database
src/Database/SQLite.php
SQLite.insertOrUpdate
public function insertOrUpdate($tableORq, $data) { if (is_string($tableORq)) { $this->defaults['table'] = $tableORq; $tableORq = []; } extract($this->defaults); extract($tableORq); if (!$table) throw new Exception("table [$tabel] not defin...
php
public function insertOrUpdate($tableORq, $data) { if (is_string($tableORq)) { $this->defaults['table'] = $tableORq; $tableORq = []; } extract($this->defaults); extract($tableORq); if (!$table) throw new Exception("table [$tabel] not defin...
[ "public", "function", "insertOrUpdate", "(", "$", "tableORq", ",", "$", "data", ")", "{", "if", "(", "is_string", "(", "$", "tableORq", ")", ")", "{", "$", "this", "->", "defaults", "[", "'table'", "]", "=", "$", "tableORq", ";", "$", "tableORq", "="...
inserts or update a record @param array $record
[ "inserts", "or", "update", "a", "record" ]
0e01e2f265b95f17b1a888137c4364714c367128
https://github.com/irfantoor/database/blob/0e01e2f265b95f17b1a888137c4364714c367128/src/Database/SQLite.php#L57-L74
197,378
agentmedia/phine-builtin
src/BuiltIn/Modules/Frontend/HtmlCode.php
HtmlCode.Init
protected function Init() { $htmlCode = ContentHtmlCode::Schema()->ByContent($this->content); $this->code= $htmlCode->GetCode(); return parent::Init(); }
php
protected function Init() { $htmlCode = ContentHtmlCode::Schema()->ByContent($this->content); $this->code= $htmlCode->GetCode(); return parent::Init(); }
[ "protected", "function", "Init", "(", ")", "{", "$", "htmlCode", "=", "ContentHtmlCode", "::", "Schema", "(", ")", "->", "ByContent", "(", "$", "this", "->", "content", ")", ";", "$", "this", "->", "code", "=", "$", "htmlCode", "->", "GetCode", "(", ...
Initializes the html code frontend module @return boolean
[ "Initializes", "the", "html", "code", "frontend", "module" ]
4dd05bc406a71e997bd4eaa16b12e23dbe62a456
https://github.com/agentmedia/phine-builtin/blob/4dd05bc406a71e997bd4eaa16b12e23dbe62a456/src/BuiltIn/Modules/Frontend/HtmlCode.php#L23-L28
197,379
agentmedia/phine-builtin
src/BuiltIn/Modules/Frontend/HtmlCode.php
HtmlCode.BackendName
public function BackendName() { $result = 'code'; if (!$this->content) { return $result; } $htmlCode = ContentHtmlCode::Schema()->ByContent($this->content); $code = Text::Shorten($htmlCode->GetCode()); if ($code) { $result .= ' ...
php
public function BackendName() { $result = 'code'; if (!$this->content) { return $result; } $htmlCode = ContentHtmlCode::Schema()->ByContent($this->content); $code = Text::Shorten($htmlCode->GetCode()); if ($code) { $result .= ' ...
[ "public", "function", "BackendName", "(", ")", "{", "$", "result", "=", "'code'", ";", "if", "(", "!", "$", "this", "->", "content", ")", "{", "return", "$", "result", ";", "}", "$", "htmlCode", "=", "ContentHtmlCode", "::", "Schema", "(", ")", "->",...
The backend name for the code @return string
[ "The", "backend", "name", "for", "the", "code" ]
4dd05bc406a71e997bd4eaa16b12e23dbe62a456
https://github.com/agentmedia/phine-builtin/blob/4dd05bc406a71e997bd4eaa16b12e23dbe62a456/src/BuiltIn/Modules/Frontend/HtmlCode.php#L52-L66
197,380
wb-crowdfusion/crowdfusion
system/core/classes/mvc/filters/PermissionFilterer.php
PermissionFilterer.pass
public function pass() { $action = $this->getParameter('action'); return $this->Permissions->checkPermission($action, $this->getLocal('SiteSlug')); }
php
public function pass() { $action = $this->getParameter('action'); return $this->Permissions->checkPermission($action, $this->getLocal('SiteSlug')); }
[ "public", "function", "pass", "(", ")", "{", "$", "action", "=", "$", "this", "->", "getParameter", "(", "'action'", ")", ";", "return", "$", "this", "->", "Permissions", "->", "checkPermission", "(", "$", "action", ",", "$", "this", "->", "getLocal", ...
Checks if the specified action is granted to the current user Expected Params: action string The action string to check @return boolean True if the user is allowed access
[ "Checks", "if", "the", "specified", "action", "is", "granted", "to", "the", "current", "user" ]
8cad7988f046a6fefbed07d026cb4ae6706c1217
https://github.com/wb-crowdfusion/crowdfusion/blob/8cad7988f046a6fefbed07d026cb4ae6706c1217/system/core/classes/mvc/filters/PermissionFilterer.php#L60-L65
197,381
ScaraMVC/Framework
src/Scara/Validation/ValidationParser.php
ValidationParser.required
public function required($input, $key, $lang) { $lang = $this->custom('required', $lang); if (empty($input[$key])) { return str_replace(':field', $key, $lang); } }
php
public function required($input, $key, $lang) { $lang = $this->custom('required', $lang); if (empty($input[$key])) { return str_replace(':field', $key, $lang); } }
[ "public", "function", "required", "(", "$", "input", ",", "$", "key", ",", "$", "lang", ")", "{", "$", "lang", "=", "$", "this", "->", "custom", "(", "'required'", ",", "$", "lang", ")", ";", "if", "(", "empty", "(", "$", "input", "[", "$", "ke...
Parses a required validation field. @param array $input - Input to be validated @param string $key - Validation key @param string $lang - Language string @return string
[ "Parses", "a", "required", "validation", "field", "." ]
199b08b45fadf5dae14ac4732af03b36e15bbef2
https://github.com/ScaraMVC/Framework/blob/199b08b45fadf5dae14ac4732af03b36e15bbef2/src/Scara/Validation/ValidationParser.php#L57-L63
197,382
ScaraMVC/Framework
src/Scara/Validation/ValidationParser.php
ValidationParser.match
public function match($input, $key, $match, $lang) { $lang = $this->custom('match', $lang); if ($input[$key] !== $input[$match]) { return preg_replace_callback('/(\:field)(.*)(\:match)/i', function ($m) use ($key, $match) { return $key.$m[2].$match; ...
php
public function match($input, $key, $match, $lang) { $lang = $this->custom('match', $lang); if ($input[$key] !== $input[$match]) { return preg_replace_callback('/(\:field)(.*)(\:match)/i', function ($m) use ($key, $match) { return $key.$m[2].$match; ...
[ "public", "function", "match", "(", "$", "input", ",", "$", "key", ",", "$", "match", ",", "$", "lang", ")", "{", "$", "lang", "=", "$", "this", "->", "custom", "(", "'match'", ",", "$", "lang", ")", ";", "if", "(", "$", "input", "[", "$", "k...
Parses a match validation field. @param array $input - Input to be validated @param string $key - Validation key @param string $match - The option looking to be matched up with $key @param string $lang - Language string @return string
[ "Parses", "a", "match", "validation", "field", "." ]
199b08b45fadf5dae14ac4732af03b36e15bbef2
https://github.com/ScaraMVC/Framework/blob/199b08b45fadf5dae14ac4732af03b36e15bbef2/src/Scara/Validation/ValidationParser.php#L75-L84
197,383
ScaraMVC/Framework
src/Scara/Validation/ValidationParser.php
ValidationParser.email
public function email($input, $key, $lang) { $lang = $this->custom('email', $lang); if (filter_var($input[$key], FILTER_VALIDATE_EMAIL) === false) { return str_replace(':field', $key, $lang); } }
php
public function email($input, $key, $lang) { $lang = $this->custom('email', $lang); if (filter_var($input[$key], FILTER_VALIDATE_EMAIL) === false) { return str_replace(':field', $key, $lang); } }
[ "public", "function", "email", "(", "$", "input", ",", "$", "key", ",", "$", "lang", ")", "{", "$", "lang", "=", "$", "this", "->", "custom", "(", "'email'", ",", "$", "lang", ")", ";", "if", "(", "filter_var", "(", "$", "input", "[", "$", "key...
Parses an email validation field. @param array $input - Input to be validated @param string $key - Validation key @param string $lang - Language string @return string
[ "Parses", "an", "email", "validation", "field", "." ]
199b08b45fadf5dae14ac4732af03b36e15bbef2
https://github.com/ScaraMVC/Framework/blob/199b08b45fadf5dae14ac4732af03b36e15bbef2/src/Scara/Validation/ValidationParser.php#L95-L101
197,384
ScaraMVC/Framework
src/Scara/Validation/ValidationParser.php
ValidationParser.url
public function url($input, $key, $lang) { $lang = $this->custom('url', $lang); if (filter_var($input[$key], FILTER_VALIDATE_URL) === false) { return str_replace(':field', $key, $lang); } }
php
public function url($input, $key, $lang) { $lang = $this->custom('url', $lang); if (filter_var($input[$key], FILTER_VALIDATE_URL) === false) { return str_replace(':field', $key, $lang); } }
[ "public", "function", "url", "(", "$", "input", ",", "$", "key", ",", "$", "lang", ")", "{", "$", "lang", "=", "$", "this", "->", "custom", "(", "'url'", ",", "$", "lang", ")", ";", "if", "(", "filter_var", "(", "$", "input", "[", "$", "key", ...
Parses URL validation field. @param array $input - Input to be validated @param string $key - Validation key @param string $lang - Language string @return string
[ "Parses", "URL", "validation", "field", "." ]
199b08b45fadf5dae14ac4732af03b36e15bbef2
https://github.com/ScaraMVC/Framework/blob/199b08b45fadf5dae14ac4732af03b36e15bbef2/src/Scara/Validation/ValidationParser.php#L112-L118
197,385
ScaraMVC/Framework
src/Scara/Validation/ValidationParser.php
ValidationParser.min
public function min($input, $key, $min, $lang) { $lang = $this->custom('min', $lang); if (strlen($input[$key]) < $min) { return preg_replace_callback('/(:field)(.*)(\:num)/i', function ($m) use ($key, $min) { return $key.$m[2].$min; }, $lang); ...
php
public function min($input, $key, $min, $lang) { $lang = $this->custom('min', $lang); if (strlen($input[$key]) < $min) { return preg_replace_callback('/(:field)(.*)(\:num)/i', function ($m) use ($key, $min) { return $key.$m[2].$min; }, $lang); ...
[ "public", "function", "min", "(", "$", "input", ",", "$", "key", ",", "$", "min", ",", "$", "lang", ")", "{", "$", "lang", "=", "$", "this", "->", "custom", "(", "'min'", ",", "$", "lang", ")", ";", "if", "(", "strlen", "(", "$", "input", "["...
Parses a set minimum number of characters. @param array $input - Language string @param string $key - Validation Key @param int $min - The set minimum @param string $lang - Language string @return mixed
[ "Parses", "a", "set", "minimum", "number", "of", "characters", "." ]
199b08b45fadf5dae14ac4732af03b36e15bbef2
https://github.com/ScaraMVC/Framework/blob/199b08b45fadf5dae14ac4732af03b36e15bbef2/src/Scara/Validation/ValidationParser.php#L130-L139
197,386
ScaraMVC/Framework
src/Scara/Validation/ValidationParser.php
ValidationParser.max
public function max($input, $key, $max, $lang) { $lang = $this->custom('max', $lang); if (strlen($input[$key]) > $max) { return preg_replace_callback('/(:field)(.*)(\:num)/i', function ($m) use ($key, $max) { return $key.$m[2].$max; }, $lang); ...
php
public function max($input, $key, $max, $lang) { $lang = $this->custom('max', $lang); if (strlen($input[$key]) > $max) { return preg_replace_callback('/(:field)(.*)(\:num)/i', function ($m) use ($key, $max) { return $key.$m[2].$max; }, $lang); ...
[ "public", "function", "max", "(", "$", "input", ",", "$", "key", ",", "$", "max", ",", "$", "lang", ")", "{", "$", "lang", "=", "$", "this", "->", "custom", "(", "'max'", ",", "$", "lang", ")", ";", "if", "(", "strlen", "(", "$", "input", "["...
Parses a set maximum number of characters. @param $input - Language string @param string $key - Validation Key @param int $max - The set maximum @param string $lang - Language string @return mixed
[ "Parses", "a", "set", "maximum", "number", "of", "characters", "." ]
199b08b45fadf5dae14ac4732af03b36e15bbef2
https://github.com/ScaraMVC/Framework/blob/199b08b45fadf5dae14ac4732af03b36e15bbef2/src/Scara/Validation/ValidationParser.php#L151-L160
197,387
ScaraMVC/Framework
src/Scara/Validation/ValidationParser.php
ValidationParser.from
public function from($input, $key, $rule, $lang) { $lang = $this->custom('from', $lang); $db = new Database(); $cap = $db->getCapsule(); $exp = explode(':', $rule); $table = $cap->table($exp[1]); if ($table->where($exp[2], '=', $input[$key])->count() == 0) { ...
php
public function from($input, $key, $rule, $lang) { $lang = $this->custom('from', $lang); $db = new Database(); $cap = $db->getCapsule(); $exp = explode(':', $rule); $table = $cap->table($exp[1]); if ($table->where($exp[2], '=', $input[$key])->count() == 0) { ...
[ "public", "function", "from", "(", "$", "input", ",", "$", "key", ",", "$", "rule", ",", "$", "lang", ")", "{", "$", "lang", "=", "$", "this", "->", "custom", "(", "'from'", ",", "$", "lang", ")", ";", "$", "db", "=", "new", "Database", "(", ...
Checks if a given field exists in given database table. @param $input - Language string @param string $key - Validation Key @param array $rule - The entire rule (Needed for multi-parsing) @param string $lang - Language string @return mixed
[ "Checks", "if", "a", "given", "field", "exists", "in", "given", "database", "table", "." ]
199b08b45fadf5dae14ac4732af03b36e15bbef2
https://github.com/ScaraMVC/Framework/blob/199b08b45fadf5dae14ac4732af03b36e15bbef2/src/Scara/Validation/ValidationParser.php#L172-L189
197,388
CommonApi/Query
QueryUsageTrait.php
QueryUsageTrait.setQueryController
protected function setQueryController($namespace, $crud_type = 'Read') { $options = $this->setQueryOptions($crud_type); try { $this->query = $this->resource->get('query://' . $namespace, $options); } catch (Exception $e) { throw new RuntimeException($e->getMessage()...
php
protected function setQueryController($namespace, $crud_type = 'Read') { $options = $this->setQueryOptions($crud_type); try { $this->query = $this->resource->get('query://' . $namespace, $options); } catch (Exception $e) { throw new RuntimeException($e->getMessage()...
[ "protected", "function", "setQueryController", "(", "$", "namespace", ",", "$", "crud_type", "=", "'Read'", ")", "{", "$", "options", "=", "$", "this", "->", "setQueryOptions", "(", "$", "crud_type", ")", ";", "try", "{", "$", "this", "->", "query", "=",...
Set Query Controller @param string $namespace @param string $crud_type @return $this @since 1.0.0 @throws \CommonApi\Exception\RuntimeException
[ "Set", "Query", "Controller" ]
0c4bdcd1dc82b1994fdce83cda581573ba56d6e7
https://github.com/CommonApi/Query/blob/0c4bdcd1dc82b1994fdce83cda581573ba56d6e7/QueryUsageTrait.php#L85-L97
197,389
CommonApi/Query
QueryUsageTrait.php
QueryUsageTrait.setQueryOptions
protected function setQueryOptions($crud_type = 'Read') { $options = array(); $crud_type = ucfirst(strtolower($crud_type)); if ($crud_type === 'Create' || $crud_type === 'Read' || $crud_type === 'Update' || $crud_type === 'Delete' ) { } ...
php
protected function setQueryOptions($crud_type = 'Read') { $options = array(); $crud_type = ucfirst(strtolower($crud_type)); if ($crud_type === 'Create' || $crud_type === 'Read' || $crud_type === 'Update' || $crud_type === 'Delete' ) { } ...
[ "protected", "function", "setQueryOptions", "(", "$", "crud_type", "=", "'Read'", ")", "{", "$", "options", "=", "array", "(", ")", ";", "$", "crud_type", "=", "ucfirst", "(", "strtolower", "(", "$", "crud_type", ")", ")", ";", "if", "(", "$", "crud_ty...
Set Query Options @param string $crud_type @return array @since 1.0.0
[ "Set", "Query", "Options" ]
0c4bdcd1dc82b1994fdce83cda581573ba56d6e7
https://github.com/CommonApi/Query/blob/0c4bdcd1dc82b1994fdce83cda581573ba56d6e7/QueryUsageTrait.php#L107-L129
197,390
CommonApi/Query
QueryUsageTrait.php
QueryUsageTrait.setQueryControllerDefaults
protected function setQueryControllerDefaults( $process_events = 0, $query_object = 'item', $get_customfields = 0, $use_special_joins = 0, $use_pagination = 0, $check_view_level_access = 0, $get_item_children = 0 ) { $this->query->setModelRegistry('pro...
php
protected function setQueryControllerDefaults( $process_events = 0, $query_object = 'item', $get_customfields = 0, $use_special_joins = 0, $use_pagination = 0, $check_view_level_access = 0, $get_item_children = 0 ) { $this->query->setModelRegistry('pro...
[ "protected", "function", "setQueryControllerDefaults", "(", "$", "process_events", "=", "0", ",", "$", "query_object", "=", "'item'", ",", "$", "get_customfields", "=", "0", ",", "$", "use_special_joins", "=", "0", ",", "$", "use_pagination", "=", "0", ",", ...
Set Query Controller Default Values @param integer $process_events @param string $query_object @param integer $get_customfields @param integer $use_special_joins @param integer $use_pagination @param integer $check_view_level_access @return $this @since 1.0.0
[ "Set", "Query", "Controller", "Default", "Values" ]
0c4bdcd1dc82b1994fdce83cda581573ba56d6e7
https://github.com/CommonApi/Query/blob/0c4bdcd1dc82b1994fdce83cda581573ba56d6e7/QueryUsageTrait.php#L144-L162
197,391
CommonApi/Query
QueryUsageTrait.php
QueryUsageTrait.setModelRegistryCriteria
protected function setModelRegistryCriteria() { $prefix = $this->query->getModelRegistry('primary_prefix', 'a'); $this->setModelRegistryCatalogTypeIdCriteria($prefix); $this->setModelRegistryExtensionInstanceIdCriteria($prefix); $this->setModelRegistryMenuIdCriteria($prefix); ...
php
protected function setModelRegistryCriteria() { $prefix = $this->query->getModelRegistry('primary_prefix', 'a'); $this->setModelRegistryCatalogTypeIdCriteria($prefix); $this->setModelRegistryExtensionInstanceIdCriteria($prefix); $this->setModelRegistryMenuIdCriteria($prefix); ...
[ "protected", "function", "setModelRegistryCriteria", "(", ")", "{", "$", "prefix", "=", "$", "this", "->", "query", "->", "getModelRegistry", "(", "'primary_prefix'", ",", "'a'", ")", ";", "$", "this", "->", "setModelRegistryCatalogTypeIdCriteria", "(", "$", "pr...
Set Standard Model Registry Criteria @return $this @since 1.0.0
[ "Set", "Standard", "Model", "Registry", "Criteria" ]
0c4bdcd1dc82b1994fdce83cda581573ba56d6e7
https://github.com/CommonApi/Query/blob/0c4bdcd1dc82b1994fdce83cda581573ba56d6e7/QueryUsageTrait.php#L210-L220
197,392
CommonApi/Query
QueryUsageTrait.php
QueryUsageTrait.setStandardFields
protected function setStandardFields($data, array $model_registry = array()) { $fields = $model_registry['fields']; $this->customfieldgroups = $model_registry['customfieldgroups']; $base = $this->processQueryFields($data, $fields); return $this->sortObject($base); }
php
protected function setStandardFields($data, array $model_registry = array()) { $fields = $model_registry['fields']; $this->customfieldgroups = $model_registry['customfieldgroups']; $base = $this->processQueryFields($data, $fields); return $this->sortObject($base); }
[ "protected", "function", "setStandardFields", "(", "$", "data", ",", "array", "$", "model_registry", "=", "array", "(", ")", ")", "{", "$", "fields", "=", "$", "model_registry", "[", "'fields'", "]", ";", "$", "this", "->", "customfieldgroups", "=", "$", ...
Set Standard Fields @param object $data @param array $model_registry @return stdClass @since 1.0.0
[ "Set", "Standard", "Fields" ]
0c4bdcd1dc82b1994fdce83cda581573ba56d6e7
https://github.com/CommonApi/Query/blob/0c4bdcd1dc82b1994fdce83cda581573ba56d6e7/QueryUsageTrait.php#L312-L321
197,393
CommonApi/Query
QueryUsageTrait.php
QueryUsageTrait.setCustomFields
protected function setCustomFields($base, $data, array $model_registry = array()) { if (count($this->customfieldgroups) > 0) { } else { return $base; } foreach ($this->customfieldgroups as $group) { $group_data = $this->processQueryFields(json_decode($data-...
php
protected function setCustomFields($base, $data, array $model_registry = array()) { if (count($this->customfieldgroups) > 0) { } else { return $base; } foreach ($this->customfieldgroups as $group) { $group_data = $this->processQueryFields(json_decode($data-...
[ "protected", "function", "setCustomFields", "(", "$", "base", ",", "$", "data", ",", "array", "$", "model_registry", "=", "array", "(", ")", ")", "{", "if", "(", "count", "(", "$", "this", "->", "customfieldgroups", ")", ">", "0", ")", "{", "}", "els...
Set Custom Fields @param object $base @param object $data @param array $model_registry @return object @since 1.0.0
[ "Set", "Custom", "Fields" ]
0c4bdcd1dc82b1994fdce83cda581573ba56d6e7
https://github.com/CommonApi/Query/blob/0c4bdcd1dc82b1994fdce83cda581573ba56d6e7/QueryUsageTrait.php#L333-L346
197,394
CommonApi/Query
QueryUsageTrait.php
QueryUsageTrait.verifyFieldDefined
protected function verifyFieldDefined($key, $field) { if (count($field) === 0) { throw new RuntimeException( get_class($this) . ' Field: ' . $key . ' not defined ' . ' in QueryUsageTrait::processQueryFields.' ); } retu...
php
protected function verifyFieldDefined($key, $field) { if (count($field) === 0) { throw new RuntimeException( get_class($this) . ' Field: ' . $key . ' not defined ' . ' in QueryUsageTrait::processQueryFields.' ); } retu...
[ "protected", "function", "verifyFieldDefined", "(", "$", "key", ",", "$", "field", ")", "{", "if", "(", "count", "(", "$", "field", ")", "===", "0", ")", "{", "throw", "new", "RuntimeException", "(", "get_class", "(", "$", "this", ")", ".", "' Field: '...
Verify Field is Defined @param string $key @param array $fields @return $this @since 1.0.0 @throws \CommonApi\Exception\RuntimeException
[ "Verify", "Field", "is", "Defined" ]
0c4bdcd1dc82b1994fdce83cda581573ba56d6e7
https://github.com/CommonApi/Query/blob/0c4bdcd1dc82b1994fdce83cda581573ba56d6e7/QueryUsageTrait.php#L391-L403
197,395
CommonApi/Query
QueryUsageTrait.php
QueryUsageTrait.setFieldValue
protected function setFieldValue($key, $data, $default = null) { $value = null; if (isset($data->$key)) { $value = $data->$key; } if ($value === null) { $value = $default; } return $value; }
php
protected function setFieldValue($key, $data, $default = null) { $value = null; if (isset($data->$key)) { $value = $data->$key; } if ($value === null) { $value = $default; } return $value; }
[ "protected", "function", "setFieldValue", "(", "$", "key", ",", "$", "data", ",", "$", "default", "=", "null", ")", "{", "$", "value", "=", "null", ";", "if", "(", "isset", "(", "$", "data", "->", "$", "key", ")", ")", "{", "$", "value", "=", "...
Set Value for Field @param string $key @param object $data @param null|mixed $default @return stdClass @since 1.0.0
[ "Set", "Value", "for", "Field" ]
0c4bdcd1dc82b1994fdce83cda581573ba56d6e7
https://github.com/CommonApi/Query/blob/0c4bdcd1dc82b1994fdce83cda581573ba56d6e7/QueryUsageTrait.php#L452-L465
197,396
CommonApi/Query
QueryUsageTrait.php
QueryUsageTrait.sortObject
protected function sortObject($object) { $sort_array = get_object_vars($object); ksort($sort_array); $new_object = new stdClass(); foreach ($sort_array as $key => $value) { if (is_object($value)) { $value = $this->sortObject($value); } ...
php
protected function sortObject($object) { $sort_array = get_object_vars($object); ksort($sort_array); $new_object = new stdClass(); foreach ($sort_array as $key => $value) { if (is_object($value)) { $value = $this->sortObject($value); } ...
[ "protected", "function", "sortObject", "(", "$", "object", ")", "{", "$", "sort_array", "=", "get_object_vars", "(", "$", "object", ")", ";", "ksort", "(", "$", "sort_array", ")", ";", "$", "new_object", "=", "new", "stdClass", "(", ")", ";", "foreach", ...
Sort an object @param object $object @return object @since 1.0.0
[ "Sort", "an", "object" ]
0c4bdcd1dc82b1994fdce83cda581573ba56d6e7
https://github.com/CommonApi/Query/blob/0c4bdcd1dc82b1994fdce83cda581573ba56d6e7/QueryUsageTrait.php#L494-L511
197,397
OpenConext-Attic/OpenConext-engineblock-metadata
src/X509/X509PrivateKey.php
X509PrivateKey.sign
public function sign($data) { $privateKeyResource = openssl_pkey_get_private('file://' . $this->filePath); $signature = null; openssl_sign($data, $signature, $privateKeyResource); openssl_free_key($privateKeyResource); return $signature; }
php
public function sign($data) { $privateKeyResource = openssl_pkey_get_private('file://' . $this->filePath); $signature = null; openssl_sign($data, $signature, $privateKeyResource); openssl_free_key($privateKeyResource); return $signature; }
[ "public", "function", "sign", "(", "$", "data", ")", "{", "$", "privateKeyResource", "=", "openssl_pkey_get_private", "(", "'file://'", ".", "$", "this", "->", "filePath", ")", ";", "$", "signature", "=", "null", ";", "openssl_sign", "(", "$", "data", ",",...
Sign some data with this private key. Note how we never actually load the private key into memory, we let OpenSSL do this and afterwards immediately tell OpenSSL to forget the key to reduce chances of leakage. @param string $data @return string
[ "Sign", "some", "data", "with", "this", "private", "key", "." ]
236e2f52ef9cf28e71404544a1c4388f63ee535d
https://github.com/OpenConext-Attic/OpenConext-engineblock-metadata/blob/236e2f52ef9cf28e71404544a1c4388f63ee535d/src/X509/X509PrivateKey.php#L62-L72
197,398
gplcart/twocheckout
controllers/Settings.php
Settings.editSettings
public function editSettings() { $this->setTitleEditSettings(); $this->setBreadcrumbEditSettings(); $this->setData('statuses', $this->order->getStatuses()); $this->setData('settings', $this->module->getSettings('twocheckout')); $this->submitSettings(); $this->output...
php
public function editSettings() { $this->setTitleEditSettings(); $this->setBreadcrumbEditSettings(); $this->setData('statuses', $this->order->getStatuses()); $this->setData('settings', $this->module->getSettings('twocheckout')); $this->submitSettings(); $this->output...
[ "public", "function", "editSettings", "(", ")", "{", "$", "this", "->", "setTitleEditSettings", "(", ")", ";", "$", "this", "->", "setBreadcrumbEditSettings", "(", ")", ";", "$", "this", "->", "setData", "(", "'statuses'", ",", "$", "this", "->", "order", ...
Route page callback to display module settings form
[ "Route", "page", "callback", "to", "display", "module", "settings", "form" ]
b1578f866ac29d37720e1d616b8b4783832d5107
https://github.com/gplcart/twocheckout/blob/b1578f866ac29d37720e1d616b8b4783832d5107/controllers/Settings.php#L41-L51
197,399
PaulDevelop/Library.Modeling.Xml
src/class/Tag.php
Tag.toXml
public function toXml() { // init $result = ''; $tagName = ($this->namespace == '' ? '' : $this->namespace.':').$this->name; $attributes = ''; foreach ($this->attributes as $attribute) { $attributes .= ' '.$attribute->Name.'="'.$attribute->Value.'"'; } ...
php
public function toXml() { // init $result = ''; $tagName = ($this->namespace == '' ? '' : $this->namespace.':').$this->name; $attributes = ''; foreach ($this->attributes as $attribute) { $attributes .= ' '.$attribute->Name.'="'.$attribute->Value.'"'; } ...
[ "public", "function", "toXml", "(", ")", "{", "// init", "$", "result", "=", "''", ";", "$", "tagName", "=", "(", "$", "this", "->", "namespace", "==", "''", "?", "''", ":", "$", "this", "->", "namespace", ".", "':'", ")", ".", "$", "this", "->",...
Convert to XML. @return string
[ "Convert", "to", "XML", "." ]
d13d302e1200ca5943169555265c9731c8eddaf5
https://github.com/PaulDevelop/Library.Modeling.Xml/blob/d13d302e1200ca5943169555265c9731c8eddaf5/src/class/Tag.php#L95-L115