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
204,000
alphacomm/alpharpc
src/AlphaRPC/Manager/WorkerHandler/Worker.php
Worker.addAction
public function addAction($action) { if ($action instanceof Action) { $action = $action->getName(); } $this->actionList[] = $action; $this->valid = null; return $this; }
php
public function addAction($action) { if ($action instanceof Action) { $action = $action->getName(); } $this->actionList[] = $action; $this->valid = null; return $this; }
[ "public", "function", "addAction", "(", "$", "action", ")", "{", "if", "(", "$", "action", "instanceof", "Action", ")", "{", "$", "action", "=", "$", "action", "->", "getName", "(", ")", ";", "}", "$", "this", "->", "actionList", "[", "]", "=", "$"...
Adds a action name to the list of actions the worker listens to. @param Action $action @return Worker
[ "Adds", "a", "action", "name", "to", "the", "list", "of", "actions", "the", "worker", "listens", "to", "." ]
cf162854500554c4ba8d39f2675de35a49c30ed0
https://github.com/alphacomm/alpharpc/blob/cf162854500554c4ba8d39f2675de35a49c30ed0/src/AlphaRPC/Manager/WorkerHandler/Worker.php#L126-L135
204,001
Synapse-Cmf/synapse-cmf
src/Synapse/Cmf/Framework/Media/Image/Entity/Image.php
Image.getFormattedImage
public function getFormattedImage($format) { $formatName = $format instanceof FormatInterface ? $format->getName() : $format ; return $this->formattedImages ->filter(function (FormattedImageInterface $formattedImage) use ($formatName) { re...
php
public function getFormattedImage($format) { $formatName = $format instanceof FormatInterface ? $format->getName() : $format ; return $this->formattedImages ->filter(function (FormattedImageInterface $formattedImage) use ($formatName) { re...
[ "public", "function", "getFormattedImage", "(", "$", "format", ")", "{", "$", "formatName", "=", "$", "format", "instanceof", "FormatInterface", "?", "$", "format", "->", "getName", "(", ")", ":", "$", "format", ";", "return", "$", "this", "->", "formatted...
Returns image formatted for given format name or FormatInterface object. @param string|FormatInterface $format @return FormattedImageInterface|null
[ "Returns", "image", "formatted", "for", "given", "format", "name", "or", "FormatInterface", "object", "." ]
d8122a4150a83d5607289724425cf35c56a5e880
https://github.com/Synapse-Cmf/synapse-cmf/blob/d8122a4150a83d5607289724425cf35c56a5e880/src/Synapse/Cmf/Framework/Media/Image/Entity/Image.php#L213-L228
204,002
Synapse-Cmf/synapse-cmf
src/Synapse/Cmf/Framework/Media/Image/Entity/Image.php
Image.getFormatWebPath
public function getFormatWebPath($format = null) { if (!$format = $format ?: $this->defaultFormat) { return $this->getWebPath(); } return ($formattedImage = $this->getFormattedImage($format)) ? $formattedImage->getWebPath() : $this->getWebPath() ;...
php
public function getFormatWebPath($format = null) { if (!$format = $format ?: $this->defaultFormat) { return $this->getWebPath(); } return ($formattedImage = $this->getFormattedImage($format)) ? $formattedImage->getWebPath() : $this->getWebPath() ;...
[ "public", "function", "getFormatWebPath", "(", "$", "format", "=", "null", ")", "{", "if", "(", "!", "$", "format", "=", "$", "format", "?", ":", "$", "this", "->", "defaultFormat", ")", "{", "return", "$", "this", "->", "getWebPath", "(", ")", ";", ...
Returns requested format web path, or original one, if format doesnt exists. @param string|FormatInterface $format @return string
[ "Returns", "requested", "format", "web", "path", "or", "original", "one", "if", "format", "doesnt", "exists", "." ]
d8122a4150a83d5607289724425cf35c56a5e880
https://github.com/Synapse-Cmf/synapse-cmf/blob/d8122a4150a83d5607289724425cf35c56a5e880/src/Synapse/Cmf/Framework/Media/Image/Entity/Image.php#L237-L247
204,003
nasumilu/geometry
src/MultiSurface.php
MultiSurface.getArea
public function getArea(): float { $event = new MeasurementOpEvent($this); $this->fireOperationEvent(MeasurementOpEvent::AREA_EVENT, $event); return $event->getResults(); }
php
public function getArea(): float { $event = new MeasurementOpEvent($this); $this->fireOperationEvent(MeasurementOpEvent::AREA_EVENT, $event); return $event->getResults(); }
[ "public", "function", "getArea", "(", ")", ":", "float", "{", "$", "event", "=", "new", "MeasurementOpEvent", "(", "$", "this", ")", ";", "$", "this", "->", "fireOperationEvent", "(", "MeasurementOpEvent", "::", "AREA_EVENT", ",", "$", "event", ")", ";", ...
Gets the area of this MultiSurface, as measured in the spatial reference system of this Surface. @return float
[ "Gets", "the", "area", "of", "this", "MultiSurface", "as", "measured", "in", "the", "spatial", "reference", "system", "of", "this", "Surface", "." ]
000fafe3e61f1d0682952ad236b7486dded65eae
https://github.com/nasumilu/geometry/blob/000fafe3e61f1d0682952ad236b7486dded65eae/src/MultiSurface.php#L65-L69
204,004
nasumilu/geometry
src/MultiSurface.php
MultiSurface.getPointOnSurface
public function getPointOnSurface(): Point { $event = new ProcessOpEvent($this); $this->fireOperationEvent(ProcessOpEvent::POINT_ON_SURFACE_EVENT, $event); return $event->getResults(); }
php
public function getPointOnSurface(): Point { $event = new ProcessOpEvent($this); $this->fireOperationEvent(ProcessOpEvent::POINT_ON_SURFACE_EVENT, $event); return $event->getResults(); }
[ "public", "function", "getPointOnSurface", "(", ")", ":", "Point", "{", "$", "event", "=", "new", "ProcessOpEvent", "(", "$", "this", ")", ";", "$", "this", "->", "fireOperationEvent", "(", "ProcessOpEvent", "::", "POINT_ON_SURFACE_EVENT", ",", "$", "event", ...
Gets a Point guaranteed to be on the MultiSurface. @return \Nasumilu\Geometry\Geometry
[ "Gets", "a", "Point", "guaranteed", "to", "be", "on", "the", "MultiSurface", "." ]
000fafe3e61f1d0682952ad236b7486dded65eae
https://github.com/nasumilu/geometry/blob/000fafe3e61f1d0682952ad236b7486dded65eae/src/MultiSurface.php#L88-L92
204,005
siriusphp/filtration
src/Filtrator.php
Filtrator.add
function add($selector, $callbackOrFilterName = null, $options = null, $recursive = false, $priority = 0) { /** * $selector is actually an array with filters * * @example $filtrator->add(array( * 'title' => array('trim', array('truncate', '{"limit":100}')) ...
php
function add($selector, $callbackOrFilterName = null, $options = null, $recursive = false, $priority = 0) { /** * $selector is actually an array with filters * * @example $filtrator->add(array( * 'title' => array('trim', array('truncate', '{"limit":100}')) ...
[ "function", "add", "(", "$", "selector", ",", "$", "callbackOrFilterName", "=", "null", ",", "$", "options", "=", "null", ",", "$", "recursive", "=", "false", ",", "$", "priority", "=", "0", ")", "{", "/**\n * $selector is actually an array with filters\...
Add a filter to the filters stack @example // normal callback $filtrator->add('title', '\strip_tags'); // anonymous function $filtrator->add('title', function($value){ return $value . '!!!'; }); // filter class from the library registered on the $filtersMap $filtrator->add('title', 'normalizedate', array('format' => '...
[ "Add", "a", "filter", "to", "the", "filters", "stack" ]
9f96592484f6d326e8bb8d5957be604a1622d08f
https://github.com/siriusphp/filtration/blob/9f96592484f6d326e8bb8d5957be604a1622d08f/src/Filtrator.php#L58-L124
204,006
siriusphp/filtration
src/Filtrator.php
Filtrator.remove
function remove($selector, $callbackOrName = true) { if (array_key_exists($selector, $this->filters)) { if ($callbackOrName === true) { unset($this->filters[$selector]); } else { if (! is_object($callbackOrName)) { $filter = $this->...
php
function remove($selector, $callbackOrName = true) { if (array_key_exists($selector, $this->filters)) { if ($callbackOrName === true) { unset($this->filters[$selector]); } else { if (! is_object($callbackOrName)) { $filter = $this->...
[ "function", "remove", "(", "$", "selector", ",", "$", "callbackOrName", "=", "true", ")", "{", "if", "(", "array_key_exists", "(", "$", "selector", ",", "$", "this", "->", "filters", ")", ")", "{", "if", "(", "$", "callbackOrName", "===", "true", ")", ...
Remove a filter from the stack @param string $selector @param bool|callable|string|TRUE $callbackOrName @throws \InvalidArgumentException @return \Sirius\Filtration\Filtrator
[ "Remove", "a", "filter", "from", "the", "stack" ]
9f96592484f6d326e8bb8d5957be604a1622d08f
https://github.com/siriusphp/filtration/blob/9f96592484f6d326e8bb8d5957be604a1622d08f/src/Filtrator.php#L183-L200
204,007
siriusphp/filtration
src/Filtrator.php
Filtrator.filter
function filter($data = array()) { if (! is_array($data)) { return $data; } // first apply the filters to the ROOT if (isset($this->filters[self::SELECTOR_ROOT])) { /* @var $rootFilters FilterSet */ $rootFilters = $this->filters[self::SELECTOR_ROOT...
php
function filter($data = array()) { if (! is_array($data)) { return $data; } // first apply the filters to the ROOT if (isset($this->filters[self::SELECTOR_ROOT])) { /* @var $rootFilters FilterSet */ $rootFilters = $this->filters[self::SELECTOR_ROOT...
[ "function", "filter", "(", "$", "data", "=", "array", "(", ")", ")", "{", "if", "(", "!", "is_array", "(", "$", "data", ")", ")", "{", "return", "$", "data", ";", "}", "// first apply the filters to the ROOT", "if", "(", "isset", "(", "$", "this", "-...
Apply filters to an array @param array $data @return array
[ "Apply", "filters", "to", "an", "array" ]
9f96592484f6d326e8bb8d5957be604a1622d08f
https://github.com/siriusphp/filtration/blob/9f96592484f6d326e8bb8d5957be604a1622d08f/src/Filtrator.php#L218-L233
204,008
siriusphp/filtration
src/Filtrator.php
Filtrator.filterItem
function filterItem($data, $valueIdentifier) { $value = Utils::arrayGetByPath($data, $valueIdentifier); $value = $this->applyFilters($value, $valueIdentifier, $data); if (is_array($value)) { foreach (array_keys($value) as $k) { $value[$k] = $this->filterItem($data...
php
function filterItem($data, $valueIdentifier) { $value = Utils::arrayGetByPath($data, $valueIdentifier); $value = $this->applyFilters($value, $valueIdentifier, $data); if (is_array($value)) { foreach (array_keys($value) as $k) { $value[$k] = $this->filterItem($data...
[ "function", "filterItem", "(", "$", "data", ",", "$", "valueIdentifier", ")", "{", "$", "value", "=", "Utils", "::", "arrayGetByPath", "(", "$", "data", ",", "$", "valueIdentifier", ")", ";", "$", "value", "=", "$", "this", "->", "applyFilters", "(", "...
Apply filters on a single item in the array @param array $data @param string $valueIdentifier @return mixed
[ "Apply", "filters", "on", "a", "single", "item", "in", "the", "array" ]
9f96592484f6d326e8bb8d5957be604a1622d08f
https://github.com/siriusphp/filtration/blob/9f96592484f6d326e8bb8d5957be604a1622d08f/src/Filtrator.php#L242-L252
204,009
siriusphp/filtration
src/Filtrator.php
Filtrator.applyFilters
function applyFilters($value, $valueIdentifier, $context) { foreach ($this->filters as $selector => $filterSet) { /* @var $filterSet FilterSet */ if ($selector != self::SELECTOR_ROOT && $this->itemMatchesSelector($valueIdentifier, $selector)) { $value = $filterSet->ap...
php
function applyFilters($value, $valueIdentifier, $context) { foreach ($this->filters as $selector => $filterSet) { /* @var $filterSet FilterSet */ if ($selector != self::SELECTOR_ROOT && $this->itemMatchesSelector($valueIdentifier, $selector)) { $value = $filterSet->ap...
[ "function", "applyFilters", "(", "$", "value", ",", "$", "valueIdentifier", ",", "$", "context", ")", "{", "foreach", "(", "$", "this", "->", "filters", "as", "$", "selector", "=>", "$", "filterSet", ")", "{", "/* @var $filterSet FilterSet */", "if", "(", ...
Apply filters to a single value @param mixed $value value of the item @param string $valueIdentifier array element path (eg: 'key' or 'key[0][subkey]') @param mixed $context @return mixed
[ "Apply", "filters", "to", "a", "single", "value" ]
9f96592484f6d326e8bb8d5957be604a1622d08f
https://github.com/siriusphp/filtration/blob/9f96592484f6d326e8bb8d5957be604a1622d08f/src/Filtrator.php#L264-L273
204,010
siriusphp/filtration
src/Filtrator.php
Filtrator.itemMatchesSelector
protected function itemMatchesSelector($item, $selector) { // the selector is a simple path identifier // NOT something like key[*][subkey] if (strpos($selector, '*') === false) { return $item === $selector; } $regex = '/' . str_replace('*', '[^\]]+', str_replace(...
php
protected function itemMatchesSelector($item, $selector) { // the selector is a simple path identifier // NOT something like key[*][subkey] if (strpos($selector, '*') === false) { return $item === $selector; } $regex = '/' . str_replace('*', '[^\]]+', str_replace(...
[ "protected", "function", "itemMatchesSelector", "(", "$", "item", ",", "$", "selector", ")", "{", "// the selector is a simple path identifier", "// NOT something like key[*][subkey]", "if", "(", "strpos", "(", "$", "selector", ",", "'*'", ")", "===", "false", ")", ...
Checks if an item matches a selector @example $this->('key[subkey]', 'key[*]') -> true; $this->('key[subkey]', 'subkey') -> false; @param string $item @param string $selector @return boolean number
[ "Checks", "if", "an", "item", "matches", "a", "selector" ]
9f96592484f6d326e8bb8d5957be604a1622d08f
https://github.com/siriusphp/filtration/blob/9f96592484f6d326e8bb8d5957be604a1622d08f/src/Filtrator.php#L285-L300
204,011
scarwu/Pack
src/Pack/HTML.php
HTML.get
public function get($html = null) { if (null === $html) { if (file_exists($this->_path)) { $html = file_get_contents($this->_path); } } $this->_path = null; return $this->parse($html); }
php
public function get($html = null) { if (null === $html) { if (file_exists($this->_path)) { $html = file_get_contents($this->_path); } } $this->_path = null; return $this->parse($html); }
[ "public", "function", "get", "(", "$", "html", "=", "null", ")", "{", "if", "(", "null", "===", "$", "html", ")", "{", "if", "(", "file_exists", "(", "$", "this", "->", "_path", ")", ")", "{", "$", "html", "=", "file_get_contents", "(", "$", "thi...
Get Packed HTML @param string @param string
[ "Get", "Packed", "HTML" ]
284e3273b18ac963f597893059c0b0d34fa15695
https://github.com/scarwu/Pack/blob/284e3273b18ac963f597893059c0b0d34fa15695/src/Pack/HTML.php#L41-L52
204,012
Etenil/assegai
src/assegai/modules/mail/services/ses/utilities/hadoopstep.class.php
CFHadoopStep.run_hive_script
public static function run_hive_script($script, $args = null) { if (!$args) $args = array(); $args = is_array($args) ? $args : array($args); $args = array_merge(array('--run-hive-script', '--args', '-f', $script), $args); return self::hive_pig_script('hive', $args); }
php
public static function run_hive_script($script, $args = null) { if (!$args) $args = array(); $args = is_array($args) ? $args : array($args); $args = array_merge(array('--run-hive-script', '--args', '-f', $script), $args); return self::hive_pig_script('hive', $args); }
[ "public", "static", "function", "run_hive_script", "(", "$", "script", ",", "$", "args", "=", "null", ")", "{", "if", "(", "!", "$", "args", ")", "$", "args", "=", "array", "(", ")", ";", "$", "args", "=", "is_array", "(", "$", "args", ")", "?", ...
Step that runs a Hive script on your job flow. @param string $script (Required) The script to run with `script-runner.jar`. @param array $args (Optional) An indexed array of arguments to pass to the script. @return array A standard array that is intended to be passed into a <CFStepConfig> object. @link http://hive.apa...
[ "Step", "that", "runs", "a", "Hive", "script", "on", "your", "job", "flow", "." ]
d43cce1a88f1c332f60dd0a4374b17764852af9e
https://github.com/Etenil/assegai/blob/d43cce1a88f1c332f60dd0a4374b17764852af9e/src/assegai/modules/mail/services/ses/utilities/hadoopstep.class.php#L62-L69
204,013
Etenil/assegai
src/assegai/modules/mail/services/ses/utilities/hadoopstep.class.php
CFHadoopStep.run_pig_script
public static function run_pig_script($script, $args = null) { if (!$args) $args = array(); $args = is_array($args) ? $args : array($args); $args = array_merge(array('--run-pig-script', '--args', '-f', $script), $args); return self::hive_pig_script('pig', $args); }
php
public static function run_pig_script($script, $args = null) { if (!$args) $args = array(); $args = is_array($args) ? $args : array($args); $args = array_merge(array('--run-pig-script', '--args', '-f', $script), $args); return self::hive_pig_script('pig', $args); }
[ "public", "static", "function", "run_pig_script", "(", "$", "script", ",", "$", "args", "=", "null", ")", "{", "if", "(", "!", "$", "args", ")", "$", "args", "=", "array", "(", ")", ";", "$", "args", "=", "is_array", "(", "$", "args", ")", "?", ...
Step that runs a Pig script on your job flow. @param string $script (Required) The script to run with `script-runner.jar`. @param array $args (Optional) An indexed array of arguments to pass to the script. @return array A standard array that is intended to be passed into a <CFStepConfig> object. @link http://pig.apach...
[ "Step", "that", "runs", "a", "Pig", "script", "on", "your", "job", "flow", "." ]
d43cce1a88f1c332f60dd0a4374b17764852af9e
https://github.com/Etenil/assegai/blob/d43cce1a88f1c332f60dd0a4374b17764852af9e/src/assegai/modules/mail/services/ses/utilities/hadoopstep.class.php#L90-L97
204,014
lrezek/Arachnid
src/LRezek/Arachnid/Meta/Reflection.php
Reflection.normalizeProperty
public static function normalizeProperty($property) { //Remove an underscore, so you can do get_date() if(substr($property,0,1) == '_') { $property = substr($property, 1); } $property = lcfirst($property); // //Deal with famil-'ies', make it 'family' // ...
php
public static function normalizeProperty($property) { //Remove an underscore, so you can do get_date() if(substr($property,0,1) == '_') { $property = substr($property, 1); } $property = lcfirst($property); // //Deal with famil-'ies', make it 'family' // ...
[ "public", "static", "function", "normalizeProperty", "(", "$", "property", ")", "{", "//Remove an underscore, so you can do get_date()", "if", "(", "substr", "(", "$", "property", ",", "0", ",", "1", ")", "==", "'_'", ")", "{", "$", "property", "=", "substr", ...
Normalizes a property name, by making it lowercase and stripping off "ies" or "s" @param string $property Property name to sigularize. @return string Singularized property name.
[ "Normalizes", "a", "property", "name", "by", "making", "it", "lowercase", "and", "stripping", "off", "ies", "or", "s" ]
fbfc2c6f9d1dbfeef6f677813c12c570d5ea750a
https://github.com/lrezek/Arachnid/blob/fbfc2c6f9d1dbfeef6f677813c12c570d5ea750a/src/LRezek/Arachnid/Meta/Reflection.php#L38-L60
204,015
composer-synchronizer/composer-synchronizer
src/Helpers.php
Helpers.copy
public static function copy(string $source, string $dest, bool $override = false): void { if (is_file($source)) { self::copyFile($source, $dest, $override); return; } if ( ! is_dir($source)) { Helpers::consoleMessage("File or directory '%s' not found.", [$source]); return; } $sourceHandle = ope...
php
public static function copy(string $source, string $dest, bool $override = false): void { if (is_file($source)) { self::copyFile($source, $dest, $override); return; } if ( ! is_dir($source)) { Helpers::consoleMessage("File or directory '%s' not found.", [$source]); return; } $sourceHandle = ope...
[ "public", "static", "function", "copy", "(", "string", "$", "source", ",", "string", "$", "dest", ",", "bool", "$", "override", "=", "false", ")", ":", "void", "{", "if", "(", "is_file", "(", "$", "source", ")", ")", "{", "self", "::", "copyFile", ...
Copies files recursively and automatically creates nested directories
[ "Copies", "files", "recursively", "and", "automatically", "creates", "nested", "directories" ]
ca1c2f4dd05e0142148c030dba63b5081edb2bc3
https://github.com/composer-synchronizer/composer-synchronizer/blob/ca1c2f4dd05e0142148c030dba63b5081edb2bc3/src/Helpers.php#L78-L115
204,016
Dhii/output-renderer-abstract
src/CaptureOutputCapableTrait.php
CaptureOutputCapableTrait._captureOutput
protected function _captureOutput(callable $callable, $args = null) { // Default if (is_null($args)) { $args = []; } ob_start(); $this->_invokeCallable($callable, $args); $output = ob_get_clean(); return $output; }
php
protected function _captureOutput(callable $callable, $args = null) { // Default if (is_null($args)) { $args = []; } ob_start(); $this->_invokeCallable($callable, $args); $output = ob_get_clean(); return $output; }
[ "protected", "function", "_captureOutput", "(", "callable", "$", "callable", ",", "$", "args", "=", "null", ")", "{", "// Default", "if", "(", "is_null", "(", "$", "args", ")", ")", "{", "$", "args", "=", "[", "]", ";", "}", "ob_start", "(", ")", "...
Invokes the given callable, and returns the output as a string. @since [*next-version*] @param callable $callable The callable that may produce output. @param array|stdClass|Traversable|null $args The arguments to invoke the callable with. Defaults to empty array. @throws InvalidArgumentEx...
[ "Invokes", "the", "given", "callable", "and", "returns", "the", "output", "as", "a", "string", "." ]
0f6e5eed940025332dd1986d6c771e10f7197b1a
https://github.com/Dhii/output-renderer-abstract/blob/0f6e5eed940025332dd1986d6c771e10f7197b1a/src/CaptureOutputCapableTrait.php#L32-L44
204,017
diasbruno/stc
lib/stc/DataValidator.php
DataValidator.walker
private function walker($keys, &$arr) { if (count($keys) == 0) { return true; } $current = array_shift($keys); return (is_array($arr) ? array_key_exists($current, $arr) : false) && ((is_array($arr[$current])) ? $this->walker($keys, $arr[$current]) : ...
php
private function walker($keys, &$arr) { if (count($keys) == 0) { return true; } $current = array_shift($keys); return (is_array($arr) ? array_key_exists($current, $arr) : false) && ((is_array($arr[$current])) ? $this->walker($keys, $arr[$current]) : ...
[ "private", "function", "walker", "(", "$", "keys", ",", "&", "$", "arr", ")", "{", "if", "(", "count", "(", "$", "keys", ")", "==", "0", ")", "{", "return", "true", ";", "}", "$", "current", "=", "array_shift", "(", "$", "keys", ")", ";", "retu...
Recursive walker to check. @param $keys array | List of keys. @param $arr array | A hash list to check. @return bool
[ "Recursive", "walker", "to", "check", "." ]
43f62c3b28167bff76274f954e235413a9e9c707
https://github.com/diasbruno/stc/blob/43f62c3b28167bff76274f954e235413a9e9c707/lib/stc/DataValidator.php#L33-L47
204,018
diasbruno/stc
lib/stc/DataValidator.php
DataValidator.validate
public function validate(&$arr) { if (count($this->list) == 0) { return true; } $ok = true; foreach ($this->list as $key => $value) { $list = explode('.', $value); $ok = $ok && $this->walker($list, $arr); } return $ok; }
php
public function validate(&$arr) { if (count($this->list) == 0) { return true; } $ok = true; foreach ($this->list as $key => $value) { $list = explode('.', $value); $ok = $ok && $this->walker($list, $arr); } return $ok; }
[ "public", "function", "validate", "(", "&", "$", "arr", ")", "{", "if", "(", "count", "(", "$", "this", "->", "list", ")", "==", "0", ")", "{", "return", "true", ";", "}", "$", "ok", "=", "true", ";", "foreach", "(", "$", "this", "->", "list", ...
Tries to validate a hash list. @param $arr array | The array to check. @return bool
[ "Tries", "to", "validate", "a", "hash", "list", "." ]
43f62c3b28167bff76274f954e235413a9e9c707
https://github.com/diasbruno/stc/blob/43f62c3b28167bff76274f954e235413a9e9c707/lib/stc/DataValidator.php#L54-L68
204,019
opis/events
src/EventDispatcher.php
EventDispatcher.handle
public function handle(string $event, callable $callback, int $priority = 0): Route { return $this->collection->createRoute($event, $callback)->set('priority', $priority); }
php
public function handle(string $event, callable $callback, int $priority = 0): Route { return $this->collection->createRoute($event, $callback)->set('priority', $priority); }
[ "public", "function", "handle", "(", "string", "$", "event", ",", "callable", "$", "callback", ",", "int", "$", "priority", "=", "0", ")", ":", "Route", "{", "return", "$", "this", "->", "collection", "->", "createRoute", "(", "$", "event", ",", "$", ...
Handle an event @param string $event Event's name @param callable $callback Callback @param int $priority (optional) Event's priority @return Route
[ "Handle", "an", "event" ]
97f34bd0334975580ee915661c79880061c1bf1a
https://github.com/opis/events/blob/97f34bd0334975580ee915661c79880061c1bf1a/src/EventDispatcher.php#L54-L57
204,020
opis/events
src/EventDispatcher.php
EventDispatcher.emit
public function emit(string $name, bool $cancelable = false): Event { return $this->dispatch(new Event($name, $cancelable)); }
php
public function emit(string $name, bool $cancelable = false): Event { return $this->dispatch(new Event($name, $cancelable)); }
[ "public", "function", "emit", "(", "string", "$", "name", ",", "bool", "$", "cancelable", "=", "false", ")", ":", "Event", "{", "return", "$", "this", "->", "dispatch", "(", "new", "Event", "(", "$", "name", ",", "$", "cancelable", ")", ")", ";", "...
Emits an event @param string $name Event's name @param boolean $cancelable (optional) Cancelable event @return Event
[ "Emits", "an", "event" ]
97f34bd0334975580ee915661c79880061c1bf1a
https://github.com/opis/events/blob/97f34bd0334975580ee915661c79880061c1bf1a/src/EventDispatcher.php#L67-L70
204,021
schpill/thin
src/Facebook.php
Facebook.getFacebookHelper
public function getFacebookHelper() { $redirectHelper = new FacebookRedirectLoginHelper( $this->getRedirectUrl(), $this->appId, $this->appSecret ); $redirectHelper->disableSessionStatusCheck(); return $redirectHelp...
php
public function getFacebookHelper() { $redirectHelper = new FacebookRedirectLoginHelper( $this->getRedirectUrl(), $this->appId, $this->appSecret ); $redirectHelper->disableSessionStatusCheck(); return $redirectHelp...
[ "public", "function", "getFacebookHelper", "(", ")", "{", "$", "redirectHelper", "=", "new", "FacebookRedirectLoginHelper", "(", "$", "this", "->", "getRedirectUrl", "(", ")", ",", "$", "this", "->", "appId", ",", "$", "this", "->", "appSecret", ")", ";", ...
Get Facebook Redirect Login Helper. @return FacebookRedirectLoginHelper
[ "Get", "Facebook", "Redirect", "Login", "Helper", "." ]
a9102d9d6f70e8b0f6be93153f70849f46489ee1
https://github.com/schpill/thin/blob/a9102d9d6f70e8b0f6be93153f70849f46489ee1/src/Facebook.php#L114-L125
204,022
schpill/thin
src/Facebook.php
Facebook.getLoginUrl
public function getLoginUrl($scope = array(), $version = null) { $scope = $this->getScope($scope); return $this->getFacebookHelper()->getLoginUrl($scope, $version); }
php
public function getLoginUrl($scope = array(), $version = null) { $scope = $this->getScope($scope); return $this->getFacebookHelper()->getLoginUrl($scope, $version); }
[ "public", "function", "getLoginUrl", "(", "$", "scope", "=", "array", "(", ")", ",", "$", "version", "=", "null", ")", "{", "$", "scope", "=", "$", "this", "->", "getScope", "(", "$", "scope", ")", ";", "return", "$", "this", "->", "getFacebookHelper...
Get Login Url. @param array $scope @param null $version @return string
[ "Get", "Login", "Url", "." ]
a9102d9d6f70e8b0f6be93153f70849f46489ee1
https://github.com/schpill/thin/blob/a9102d9d6f70e8b0f6be93153f70849f46489ee1/src/Facebook.php#L207-L212
204,023
schpill/thin
src/Facebook.php
Facebook.getCallback
public function getCallback() { $token = $this->getAccessToken(); if ( ! empty($token)) { $this->putSessionToken($token); return true; } return false; }
php
public function getCallback() { $token = $this->getAccessToken(); if ( ! empty($token)) { $this->putSessionToken($token); return true; } return false; }
[ "public", "function", "getCallback", "(", ")", "{", "$", "token", "=", "$", "this", "->", "getAccessToken", "(", ")", ";", "if", "(", "!", "empty", "(", "$", "token", ")", ")", "{", "$", "this", "->", "putSessionToken", "(", "$", "token", ")", ";",...
Get callback from facebook. @return boolean
[ "Get", "callback", "from", "facebook", "." ]
a9102d9d6f70e8b0f6be93153f70849f46489ee1
https://github.com/schpill/thin/blob/a9102d9d6f70e8b0f6be93153f70849f46489ee1/src/Facebook.php#L304-L314
204,024
schpill/thin
src/Facebook.php
Facebook.api
public function api($method, $path, $parameters = null, $version = null, $etag = null) { $session = new FacebookSession($this->getAccessToken()); $request = with(new FacebookRequest($session, $method, $path, $parameters, $version, $etag)) ->execute() ->ge...
php
public function api($method, $path, $parameters = null, $version = null, $etag = null) { $session = new FacebookSession($this->getAccessToken()); $request = with(new FacebookRequest($session, $method, $path, $parameters, $version, $etag)) ->execute() ->ge...
[ "public", "function", "api", "(", "$", "method", ",", "$", "path", ",", "$", "parameters", "=", "null", ",", "$", "version", "=", "null", ",", "$", "etag", "=", "null", ")", "{", "$", "session", "=", "new", "FacebookSession", "(", "$", "this", "->"...
Facebook API Call. @param string $method The request method. @param string $path The end points path. @param mixed $parameters Parameters. @param string $version The specified version of Api. @param mixed $etag @return mixed
[ "Facebook", "API", "Call", "." ]
a9102d9d6f70e8b0f6be93153f70849f46489ee1
https://github.com/schpill/thin/blob/a9102d9d6f70e8b0f6be93153f70849f46489ee1/src/Facebook.php#L357-L366
204,025
schpill/thin
src/Facebook.php
Facebook.get
public function get($path, $parameters = null, $version = null, $etag = null) { return $this->api('GET', $path, $parameters, $version, $etag); }
php
public function get($path, $parameters = null, $version = null, $etag = null) { return $this->api('GET', $path, $parameters, $version, $etag); }
[ "public", "function", "get", "(", "$", "path", ",", "$", "parameters", "=", "null", ",", "$", "version", "=", "null", ",", "$", "etag", "=", "null", ")", "{", "return", "$", "this", "->", "api", "(", "'GET'", ",", "$", "path", ",", "$", "paramete...
Facebook API Request with "GET" method. @param string $path @param string|null|mixed $parameters @param string|null|mixed $version @param string|null|mixed $etag @return mixed
[ "Facebook", "API", "Request", "with", "GET", "method", "." ]
a9102d9d6f70e8b0f6be93153f70849f46489ee1
https://github.com/schpill/thin/blob/a9102d9d6f70e8b0f6be93153f70849f46489ee1/src/Facebook.php#L377-L380
204,026
schpill/thin
src/Facebook.php
Facebook.post
public function post($path, $parameters = null, $version = null, $etag = null) { return $this->api('POST', $path, $parameters, $version, $etag); }
php
public function post($path, $parameters = null, $version = null, $etag = null) { return $this->api('POST', $path, $parameters, $version, $etag); }
[ "public", "function", "post", "(", "$", "path", ",", "$", "parameters", "=", "null", ",", "$", "version", "=", "null", ",", "$", "etag", "=", "null", ")", "{", "return", "$", "this", "->", "api", "(", "'POST'", ",", "$", "path", ",", "$", "parame...
Facebook API Request with "POST" method. @param string $path @param string|null|mixed $parameters @param string|null|mixed $version @param string|null|mixed $etag @return mixed
[ "Facebook", "API", "Request", "with", "POST", "method", "." ]
a9102d9d6f70e8b0f6be93153f70849f46489ee1
https://github.com/schpill/thin/blob/a9102d9d6f70e8b0f6be93153f70849f46489ee1/src/Facebook.php#L391-L394
204,027
schpill/thin
src/Facebook.php
Facebook.delete
public function delete($path, $parameters = null, $version = null, $etag = null) { return $this->api('DELETE', $path, $parameters, $version, $etag); }
php
public function delete($path, $parameters = null, $version = null, $etag = null) { return $this->api('DELETE', $path, $parameters, $version, $etag); }
[ "public", "function", "delete", "(", "$", "path", ",", "$", "parameters", "=", "null", ",", "$", "version", "=", "null", ",", "$", "etag", "=", "null", ")", "{", "return", "$", "this", "->", "api", "(", "'DELETE'", ",", "$", "path", ",", "$", "pa...
Facebook API Request with "DELETE" method. @param string $path @param string|null|mixed $parameters @param string|null|mixed $version @param string|null|mixed $etag @return mixed
[ "Facebook", "API", "Request", "with", "DELETE", "method", "." ]
a9102d9d6f70e8b0f6be93153f70849f46489ee1
https://github.com/schpill/thin/blob/a9102d9d6f70e8b0f6be93153f70849f46489ee1/src/Facebook.php#L405-L408
204,028
schpill/thin
src/Facebook.php
Facebook.put
public function put($path, $parameters = null, $version = null, $etag = null) { return $this->api('PUT', $path, $parameters, $version, $etag); }
php
public function put($path, $parameters = null, $version = null, $etag = null) { return $this->api('PUT', $path, $parameters, $version, $etag); }
[ "public", "function", "put", "(", "$", "path", ",", "$", "parameters", "=", "null", ",", "$", "version", "=", "null", ",", "$", "etag", "=", "null", ")", "{", "return", "$", "this", "->", "api", "(", "'PUT'", ",", "$", "path", ",", "$", "paramete...
Facebook API Request with "PUT" method. @param string $path @param string|null|mixed $parameters @param string|null|mixed $version @param string|null|mixed $etag @return mixed
[ "Facebook", "API", "Request", "with", "PUT", "method", "." ]
a9102d9d6f70e8b0f6be93153f70849f46489ee1
https://github.com/schpill/thin/blob/a9102d9d6f70e8b0f6be93153f70849f46489ee1/src/Facebook.php#L419-L422
204,029
schpill/thin
src/Facebook.php
Facebook.patch
public function patch($path, $parameters = null, $version = null, $etag = null) { return $this->api('PATCH', $path, $parameters, $version, $etag); }
php
public function patch($path, $parameters = null, $version = null, $etag = null) { return $this->api('PATCH', $path, $parameters, $version, $etag); }
[ "public", "function", "patch", "(", "$", "path", ",", "$", "parameters", "=", "null", ",", "$", "version", "=", "null", ",", "$", "etag", "=", "null", ")", "{", "return", "$", "this", "->", "api", "(", "'PATCH'", ",", "$", "path", ",", "$", "para...
Facebook API Request with "PATCH" method. @param string $path @param string|null|mixed $parameters @param string|null|mixed $version @param string|null|mixed $etag @return mixed
[ "Facebook", "API", "Request", "with", "PATCH", "method", "." ]
a9102d9d6f70e8b0f6be93153f70849f46489ee1
https://github.com/schpill/thin/blob/a9102d9d6f70e8b0f6be93153f70849f46489ee1/src/Facebook.php#L433-L436
204,030
schpill/thin
src/Facebook.php
Facebook.getProfile
public function getProfile($parameters = [], $version = null, $etag = null) { return $this->get('/me', $parameters, $version, $etag); }
php
public function getProfile($parameters = [], $version = null, $etag = null) { return $this->get('/me', $parameters, $version, $etag); }
[ "public", "function", "getProfile", "(", "$", "parameters", "=", "[", "]", ",", "$", "version", "=", "null", ",", "$", "etag", "=", "null", ")", "{", "return", "$", "this", "->", "get", "(", "'/me'", ",", "$", "parameters", ",", "$", "version", ","...
Get user profile. @param array $parameters @param null $version @param null $etag @return mixed
[ "Get", "user", "profile", "." ]
a9102d9d6f70e8b0f6be93153f70849f46489ee1
https://github.com/schpill/thin/blob/a9102d9d6f70e8b0f6be93153f70849f46489ee1/src/Facebook.php#L446-L449
204,031
infusephp/auth
src/Libs/Strategy/TraditionalStrategy.php
TraditionalStrategy.verifyPassword
public function verifyPassword(UserInterface $user, $password) { if (!$password) { return false; } $hashedPassword = $user->getHashedPassword(); if (!$hashedPassword) { return false; } return password_verify($password, $hashedPassword); }
php
public function verifyPassword(UserInterface $user, $password) { if (!$password) { return false; } $hashedPassword = $user->getHashedPassword(); if (!$hashedPassword) { return false; } return password_verify($password, $hashedPassword); }
[ "public", "function", "verifyPassword", "(", "UserInterface", "$", "user", ",", "$", "password", ")", "{", "if", "(", "!", "$", "password", ")", "{", "return", "false", ";", "}", "$", "hashedPassword", "=", "$", "user", "->", "getHashedPassword", "(", ")...
Checks if a given password matches the user's password. @param UserInterface $user @param string $password @return bool
[ "Checks", "if", "a", "given", "password", "matches", "the", "user", "s", "password", "." ]
720280b4b2635572f331afe8d082e3e88cf54eb7
https://github.com/infusephp/auth/blob/720280b4b2635572f331afe8d082e3e88cf54eb7/src/Libs/Strategy/TraditionalStrategy.php#L142-L154
204,032
infusephp/auth
src/Libs/Strategy/TraditionalStrategy.php
TraditionalStrategy.getRateLimiter
function getRateLimiter() { if ($this->rateLimiter) { return $this->rateLimiter; } $app = $this->auth->getApp(); $class = $app['config']->get('auth.loginRateLimiter', NullRateLimiter::class); $this->rateLimiter = new $class(); if (method_exists($this->ra...
php
function getRateLimiter() { if ($this->rateLimiter) { return $this->rateLimiter; } $app = $this->auth->getApp(); $class = $app['config']->get('auth.loginRateLimiter', NullRateLimiter::class); $this->rateLimiter = new $class(); if (method_exists($this->ra...
[ "function", "getRateLimiter", "(", ")", "{", "if", "(", "$", "this", "->", "rateLimiter", ")", "{", "return", "$", "this", "->", "rateLimiter", ";", "}", "$", "app", "=", "$", "this", "->", "auth", "->", "getApp", "(", ")", ";", "$", "class", "=", ...
Gets the login rate limiter. @return \Infuse\Auth\Interfaces\LoginRateLimiterInterface
[ "Gets", "the", "login", "rate", "limiter", "." ]
720280b4b2635572f331afe8d082e3e88cf54eb7
https://github.com/infusephp/auth/blob/720280b4b2635572f331afe8d082e3e88cf54eb7/src/Libs/Strategy/TraditionalStrategy.php#L161-L176
204,033
infusephp/auth
src/Libs/Strategy/TraditionalStrategy.php
TraditionalStrategy.buildUsernameWhere
private function buildUsernameWhere($username) { $userClass = $this->auth->getUserClass(); $conditions = array_map( function ($prop, $username) { return $prop." = '".$username."'"; }, $userClass::$usernameProperties, array_fill(0, count($userClass::$usernamePrope...
php
private function buildUsernameWhere($username) { $userClass = $this->auth->getUserClass(); $conditions = array_map( function ($prop, $username) { return $prop." = '".$username."'"; }, $userClass::$usernameProperties, array_fill(0, count($userClass::$usernamePrope...
[ "private", "function", "buildUsernameWhere", "(", "$", "username", ")", "{", "$", "userClass", "=", "$", "this", "->", "auth", "->", "getUserClass", "(", ")", ";", "$", "conditions", "=", "array_map", "(", "function", "(", "$", "prop", ",", "$", "usernam...
Builds a query string for matching the username. @param string $username username to match @return string
[ "Builds", "a", "query", "string", "for", "matching", "the", "username", "." ]
720280b4b2635572f331afe8d082e3e88cf54eb7
https://github.com/infusephp/auth/blob/720280b4b2635572f331afe8d082e3e88cf54eb7/src/Libs/Strategy/TraditionalStrategy.php#L185-L196
204,034
simpleapisecurity/php
src/Encryption.php
Encryption.encryptMessage
public static function encryptMessage($message, $key, $hashKey = '') { // Test the key for string validity. Helpers::isString($message, 'Encryption', 'encryptMessage'); Helpers::isString($key, 'Encryption', 'encryptMessage'); Helpers::isString($hashKey, 'Encryption', 'encryptMessage'...
php
public static function encryptMessage($message, $key, $hashKey = '') { // Test the key for string validity. Helpers::isString($message, 'Encryption', 'encryptMessage'); Helpers::isString($key, 'Encryption', 'encryptMessage'); Helpers::isString($hashKey, 'Encryption', 'encryptMessage'...
[ "public", "static", "function", "encryptMessage", "(", "$", "message", ",", "$", "key", ",", "$", "hashKey", "=", "''", ")", "{", "// Test the key for string validity.", "Helpers", "::", "isString", "(", "$", "message", ",", "'Encryption'", ",", "'encryptMessage...
Returns an encrypted message in the form of a JSON string. @param string $message The message to be encrypted. @param string $key The key to encrypt the message with. @param string $hashKey The key to hash the key with. @return string The JSON string for the encrypted message. @throws Exceptions\EncryptionException @t...
[ "Returns", "an", "encrypted", "message", "in", "the", "form", "of", "a", "JSON", "string", "." ]
e6cebf3213f4d7be54aa3a188d95a00113e3fda0
https://github.com/simpleapisecurity/php/blob/e6cebf3213f4d7be54aa3a188d95a00113e3fda0/src/Encryption.php#L38-L57
204,035
simpleapisecurity/php
src/Encryption.php
Encryption.decryptMessage
public static function decryptMessage($message, $key, $hashKey = '') { // Test the message and key for string validity. Helpers::isString($message, 'Encryption', 'decryptMessage'); Helpers::isString($key, 'Encryption', 'decryptMessage'); Helpers::isString($hashKey, 'Encryption', 'dec...
php
public static function decryptMessage($message, $key, $hashKey = '') { // Test the message and key for string validity. Helpers::isString($message, 'Encryption', 'decryptMessage'); Helpers::isString($key, 'Encryption', 'decryptMessage'); Helpers::isString($hashKey, 'Encryption', 'dec...
[ "public", "static", "function", "decryptMessage", "(", "$", "message", ",", "$", "key", ",", "$", "hashKey", "=", "''", ")", "{", "// Test the message and key for string validity.", "Helpers", "::", "isString", "(", "$", "message", ",", "'Encryption'", ",", "'de...
Returns the encrypted message in plaintext format. @param string $message The encrypted message portion. @param string $key The encryption key used with the message. @param string $hashKey The key to hash the key with. @return string The encrypted message in plaintext format. @throws Exceptions\DecryptionException @th...
[ "Returns", "the", "encrypted", "message", "in", "plaintext", "format", "." ]
e6cebf3213f4d7be54aa3a188d95a00113e3fda0
https://github.com/simpleapisecurity/php/blob/e6cebf3213f4d7be54aa3a188d95a00113e3fda0/src/Encryption.php#L70-L89
204,036
simpleapisecurity/php
src/Encryption.php
Encryption.signMessage
public static function signMessage($message, $key, $hashKey = '') { # Test the message and key for string validity. Helpers::isString($message, 'Encryption', 'signMessage'); Helpers::isString($key, 'Encryption', 'signMessage'); Helpers::isString($hashKey, 'Encryption', 'signMessage')...
php
public static function signMessage($message, $key, $hashKey = '') { # Test the message and key for string validity. Helpers::isString($message, 'Encryption', 'signMessage'); Helpers::isString($key, 'Encryption', 'signMessage'); Helpers::isString($hashKey, 'Encryption', 'signMessage')...
[ "public", "static", "function", "signMessage", "(", "$", "message", ",", "$", "key", ",", "$", "hashKey", "=", "''", ")", "{", "# Test the message and key for string validity.", "Helpers", "::", "isString", "(", "$", "message", ",", "'Encryption'", ",", "'signMe...
Returns a signed message to the client for authentication. @param string $message The message to be signed. @param string $key The signing key used with the message. @param string $hashKey The key to hash the key with. @return string A JSON string including the signing information and message. @throws Exceptions\Inval...
[ "Returns", "a", "signed", "message", "to", "the", "client", "for", "authentication", "." ]
e6cebf3213f4d7be54aa3a188d95a00113e3fda0
https://github.com/simpleapisecurity/php/blob/e6cebf3213f4d7be54aa3a188d95a00113e3fda0/src/Encryption.php#L129-L146
204,037
simpleapisecurity/php
src/Encryption.php
Encryption.verifyMessage
public static function verifyMessage($message, $key, $hashKey = '') { # Test the message and key for string validity. Helpers::isString($message, 'Encryption', 'verifyMessage'); Helpers::isString($key, 'Encryption', 'verifyMessage'); Helpers::isString($hashKey, 'Encryption', 'verifyM...
php
public static function verifyMessage($message, $key, $hashKey = '') { # Test the message and key for string validity. Helpers::isString($message, 'Encryption', 'verifyMessage'); Helpers::isString($key, 'Encryption', 'verifyMessage'); Helpers::isString($hashKey, 'Encryption', 'verifyM...
[ "public", "static", "function", "verifyMessage", "(", "$", "message", ",", "$", "key", ",", "$", "hashKey", "=", "''", ")", "{", "# Test the message and key for string validity.", "Helpers", "::", "isString", "(", "$", "message", ",", "'Encryption'", ",", "'veri...
Validates a message signature and returns the signed message. @param string $message The signed message JSON string. @param string $key The signing key used with the message. @param string $hashKey The key to hash the key with. @return string A string returning the output of the signed message. @throws Exceptions\Inva...
[ "Validates", "a", "message", "signature", "and", "returns", "the", "signed", "message", "." ]
e6cebf3213f4d7be54aa3a188d95a00113e3fda0
https://github.com/simpleapisecurity/php/blob/e6cebf3213f4d7be54aa3a188d95a00113e3fda0/src/Encryption.php#L158-L179
204,038
simpleapisecurity/php
src/Encryption.php
Encryption.encryptSignMessage
public static function encryptSignMessage($message, $encryptionKey, $signatureKey, $hashKey = '') { # Test the message and key for string validity. Helpers::isString($message, 'Encryption', 'encryptSignMessage'); Helpers::isString($encryptionKey, 'Encryption', 'encryptSignMessage'); ...
php
public static function encryptSignMessage($message, $encryptionKey, $signatureKey, $hashKey = '') { # Test the message and key for string validity. Helpers::isString($message, 'Encryption', 'encryptSignMessage'); Helpers::isString($encryptionKey, 'Encryption', 'encryptSignMessage'); ...
[ "public", "static", "function", "encryptSignMessage", "(", "$", "message", ",", "$", "encryptionKey", ",", "$", "signatureKey", ",", "$", "hashKey", "=", "''", ")", "{", "# Test the message and key for string validity.", "Helpers", "::", "isString", "(", "$", "mes...
Sign and encrypt a message for security. @param string $message The message to be encrypted and signed for transport. @param string $encryptionKey The encryption key used with the message. @param string $signatureKey The signing key used with the message. @param string $hashKey The key to hash the key with. @return st...
[ "Sign", "and", "encrypt", "a", "message", "for", "security", "." ]
e6cebf3213f4d7be54aa3a188d95a00113e3fda0
https://github.com/simpleapisecurity/php/blob/e6cebf3213f4d7be54aa3a188d95a00113e3fda0/src/Encryption.php#L191-L202
204,039
simpleapisecurity/php
src/Encryption.php
Encryption.decryptVerifyMessage
public static function decryptVerifyMessage($message, $encryptionKey, $signatureKey, $hashKey = '') { # Test the message and key for string validity. Helpers::isString($message, 'Encryption', 'decryptVerifyMessage'); Helpers::isString($encryptionKey, 'Encryption', 'decryptVerifyMessage'); ...
php
public static function decryptVerifyMessage($message, $encryptionKey, $signatureKey, $hashKey = '') { # Test the message and key for string validity. Helpers::isString($message, 'Encryption', 'decryptVerifyMessage'); Helpers::isString($encryptionKey, 'Encryption', 'decryptVerifyMessage'); ...
[ "public", "static", "function", "decryptVerifyMessage", "(", "$", "message", ",", "$", "encryptionKey", ",", "$", "signatureKey", ",", "$", "hashKey", "=", "''", ")", "{", "# Test the message and key for string validity.", "Helpers", "::", "isString", "(", "$", "m...
Verify and decrypt a message for security. @param string $message The message to be encrypted and signed for transport. @param string $encryptionKey The encryption key used with the message. @param string $signatureKey The signing key used with the message. @param string $hashKey The key to hash the key with. @return ...
[ "Verify", "and", "decrypt", "a", "message", "for", "security", "." ]
e6cebf3213f4d7be54aa3a188d95a00113e3fda0
https://github.com/simpleapisecurity/php/blob/e6cebf3213f4d7be54aa3a188d95a00113e3fda0/src/Encryption.php#L215-L226
204,040
anklimsk/cakephp-console-installer
View/Helper/CheckResultHelper.php
CheckResultHelper.getStateElement
public function getStateElement($state = null) { if (is_bool($state) && ($state === true)) { $state = 2; } switch ((int)$state) { case 2: $stateText = $this->Html->tag('span', '', ['class' => 'fas fa-check']); $titleText = __d('cake_installer', 'Ok'); $labelClass = 'label-success'; break; ...
php
public function getStateElement($state = null) { if (is_bool($state) && ($state === true)) { $state = 2; } switch ((int)$state) { case 2: $stateText = $this->Html->tag('span', '', ['class' => 'fas fa-check']); $titleText = __d('cake_installer', 'Ok'); $labelClass = 'label-success'; break; ...
[ "public", "function", "getStateElement", "(", "$", "state", "=", "null", ")", "{", "if", "(", "is_bool", "(", "$", "state", ")", "&&", "(", "$", "state", "===", "true", ")", ")", "{", "$", "state", "=", "2", ";", "}", "switch", "(", "(", "int", ...
Build HTML element with status icon from status value @param int $state State for build HTML elemeth. Integer value: - `0` - Bad; - `1` - Warning; - `2` - Success. @return string Result HTML element with status text
[ "Build", "HTML", "element", "with", "status", "icon", "from", "status", "value" ]
76136550e856ff4f8fd3634b77633f86510f63e9
https://github.com/anklimsk/cakephp-console-installer/blob/76136550e856ff4f8fd3634b77633f86510f63e9/View/Helper/CheckResultHelper.php#L38-L63
204,041
anklimsk/cakephp-console-installer
View/Helper/CheckResultHelper.php
CheckResultHelper.getStateItemClass
public function getStateItemClass($state = null) { if (is_bool($state) && ($state === true)) { $state = 2; } switch ((int)$state) { case 2: $classItem = ''; break; case 1: $classItem = 'list-group-item-warning'; break; default: $classItem = 'list-group-item-danger'; } return ...
php
public function getStateItemClass($state = null) { if (is_bool($state) && ($state === true)) { $state = 2; } switch ((int)$state) { case 2: $classItem = ''; break; case 1: $classItem = 'list-group-item-warning'; break; default: $classItem = 'list-group-item-danger'; } return ...
[ "public", "function", "getStateItemClass", "(", "$", "state", "=", "null", ")", "{", "if", "(", "is_bool", "(", "$", "state", ")", "&&", "(", "$", "state", "===", "true", ")", ")", "{", "$", "state", "=", "2", ";", "}", "switch", "(", "(", "int",...
Return class for list element from status value @param int $state State for build HTML elemeth. Integer value: - `0` - Bad; - `1` - Warning; - `2` - Success. @return string Return class name
[ "Return", "class", "for", "list", "element", "from", "status", "value" ]
76136550e856ff4f8fd3634b77633f86510f63e9
https://github.com/anklimsk/cakephp-console-installer/blob/76136550e856ff4f8fd3634b77633f86510f63e9/View/Helper/CheckResultHelper.php#L75-L92
204,042
anklimsk/cakephp-console-installer
View/Helper/CheckResultHelper.php
CheckResultHelper.getStateList
public function getStateList($list = null) { $result = ''; if (empty($list)) { return $result; } $listText = ''; foreach ($list as $listItem) { $classItem = ''; if (is_array($listItem)) { if (!isset($listItem['textItem'])) { continue; } $textItem = $listItem['textItem']; if (is...
php
public function getStateList($list = null) { $result = ''; if (empty($list)) { return $result; } $listText = ''; foreach ($list as $listItem) { $classItem = ''; if (is_array($listItem)) { if (!isset($listItem['textItem'])) { continue; } $textItem = $listItem['textItem']; if (is...
[ "public", "function", "getStateList", "(", "$", "list", "=", "null", ")", "{", "$", "result", "=", "''", ";", "if", "(", "empty", "(", "$", "list", ")", ")", "{", "return", "$", "result", ";", "}", "$", "listText", "=", "''", ";", "foreach", "(",...
Return list of states @param array $list List of states for rendering in format: - key `textItem`, value - text of list item; - key `classItem`, value - class of list item. @return string Return list of states
[ "Return", "list", "of", "states" ]
76136550e856ff4f8fd3634b77633f86510f63e9
https://github.com/anklimsk/cakephp-console-installer/blob/76136550e856ff4f8fd3634b77633f86510f63e9/View/Helper/CheckResultHelper.php#L102-L133
204,043
fxpio/fxp-gluon
Twig/Extension/PropertyPathExtension.php
PropertyPathExtension.propertyPath
public function propertyPath($data, $propertyPath) { if (null !== $propertyPath && !$propertyPath instanceof PropertyPathInterface) { $propertyPath = new PropertyPath($propertyPath); } if ($propertyPath instanceof PropertyPathInterface && (\is_object($data) || $data instanceof \...
php
public function propertyPath($data, $propertyPath) { if (null !== $propertyPath && !$propertyPath instanceof PropertyPathInterface) { $propertyPath = new PropertyPath($propertyPath); } if ($propertyPath instanceof PropertyPathInterface && (\is_object($data) || $data instanceof \...
[ "public", "function", "propertyPath", "(", "$", "data", ",", "$", "propertyPath", ")", "{", "if", "(", "null", "!==", "$", "propertyPath", "&&", "!", "$", "propertyPath", "instanceof", "PropertyPathInterface", ")", "{", "$", "propertyPath", "=", "new", "Prop...
Get the data defined by property path. @param mixed $data The data @param PropertyPathInterface|string|null $propertyPath The property path @return mixed
[ "Get", "the", "data", "defined", "by", "property", "path", "." ]
0548b7d598ef4b0785b5df3b849a10f439b2dc65
https://github.com/fxpio/fxp-gluon/blob/0548b7d598ef4b0785b5df3b849a10f439b2dc65/Twig/Extension/PropertyPathExtension.php#L59-L70
204,044
pmdevelopment/tool-bundle
Components/Helper/FileUtilityHelper.php
FileUtilityHelper.getIconByExtension
public static function getIconByExtension($extension) { if ('pdf' === $extension) { return 'file-pdf-o'; } if (true === in_array($extension, self::extensionsArchive())) { return 'file-archive-o'; } if (true === in_array($extension, self::extensionsIm...
php
public static function getIconByExtension($extension) { if ('pdf' === $extension) { return 'file-pdf-o'; } if (true === in_array($extension, self::extensionsArchive())) { return 'file-archive-o'; } if (true === in_array($extension, self::extensionsIm...
[ "public", "static", "function", "getIconByExtension", "(", "$", "extension", ")", "{", "if", "(", "'pdf'", "===", "$", "extension", ")", "{", "return", "'file-pdf-o'", ";", "}", "if", "(", "true", "===", "in_array", "(", "$", "extension", ",", "self", ":...
Get FontAwesome Icon By Extension @param string $extension @return null|string
[ "Get", "FontAwesome", "Icon", "By", "Extension" ]
2cbc9f82c5b33fd7a9d389edd3676e9f70ea8129
https://github.com/pmdevelopment/tool-bundle/blob/2cbc9f82c5b33fd7a9d389edd3676e9f70ea8129/Components/Helper/FileUtilityHelper.php#L147-L186
204,045
Vyki/mva-dbm
src/Mva/Dbm/Connection.php
Connection.getQuery
public function getQuery() { if (!$this->query) { $this->query = new Query($this->driver, $this->preprocessor); } return $this->query; }
php
public function getQuery() { if (!$this->query) { $this->query = new Query($this->driver, $this->preprocessor); } return $this->query; }
[ "public", "function", "getQuery", "(", ")", "{", "if", "(", "!", "$", "this", "->", "query", ")", "{", "$", "this", "->", "query", "=", "new", "Query", "(", "$", "this", "->", "driver", ",", "$", "this", "->", "preprocessor", ")", ";", "}", "retu...
Returns parameter builder @return Query
[ "Returns", "parameter", "builder" ]
587d840e0620331a9f63a6867f3400a293a9d3c6
https://github.com/Vyki/mva-dbm/blob/587d840e0620331a9f63a6867f3400a293a9d3c6/src/Mva/Dbm/Connection.php#L84-L91
204,046
Vyki/mva-dbm
src/Mva/Dbm/Connection.php
Connection.createDriver
private function createDriver(array $config) { if (empty($config['driver'])) { throw new InvalidStateException('Undefined driver'); } elseif ($config['driver'] instanceof IDriver) { return $config['driver']; } else { $name = ucfirst($config['driver']); $class = "Mva\\Dbm\\Driver\\{$name}\\{$name}Driv...
php
private function createDriver(array $config) { if (empty($config['driver'])) { throw new InvalidStateException('Undefined driver'); } elseif ($config['driver'] instanceof IDriver) { return $config['driver']; } else { $name = ucfirst($config['driver']); $class = "Mva\\Dbm\\Driver\\{$name}\\{$name}Driv...
[ "private", "function", "createDriver", "(", "array", "$", "config", ")", "{", "if", "(", "empty", "(", "$", "config", "[", "'driver'", "]", ")", ")", "{", "throw", "new", "InvalidStateException", "(", "'Undefined driver'", ")", ";", "}", "elseif", "(", "...
Creates a IDriver instance. @param array $config @return Driver\IDriver
[ "Creates", "a", "IDriver", "instance", "." ]
587d840e0620331a9f63a6867f3400a293a9d3c6
https://github.com/Vyki/mva-dbm/blob/587d840e0620331a9f63a6867f3400a293a9d3c6/src/Mva/Dbm/Connection.php#L126-L137
204,047
MetaModels/attribute_translatedurl
src/Helper/UpgradeHandler.php
UpgradeHandler.ensureIndexNameAttIdLanguage
private function ensureIndexNameAttIdLanguage() { if (!($this->database->tableExists('tl_metamodel_translatedurl'))) { return; } // Renamed in 2.0.0-alpha2 (due to database.sql => dca movement). if (!$this->database->indexExists('att_lang', 'tl_metamodel_translatedurl', ...
php
private function ensureIndexNameAttIdLanguage() { if (!($this->database->tableExists('tl_metamodel_translatedurl'))) { return; } // Renamed in 2.0.0-alpha2 (due to database.sql => dca movement). if (!$this->database->indexExists('att_lang', 'tl_metamodel_translatedurl', ...
[ "private", "function", "ensureIndexNameAttIdLanguage", "(", ")", "{", "if", "(", "!", "(", "$", "this", "->", "database", "->", "tableExists", "(", "'tl_metamodel_translatedurl'", ")", ")", ")", "{", "return", ";", "}", "// Renamed in 2.0.0-alpha2 (due to database.s...
Ensure that the index types are correct. @return void
[ "Ensure", "that", "the", "index", "types", "are", "correct", "." ]
ad6b4967244614be49d382934043c766b5fa08d8
https://github.com/MetaModels/attribute_translatedurl/blob/ad6b4967244614be49d382934043c766b5fa08d8/src/Helper/UpgradeHandler.php#L65-L81
204,048
MetaModels/attribute_translatedurl
src/Helper/UpgradeHandler.php
UpgradeHandler.ensureHrefDefaultsToNull
private function ensureHrefDefaultsToNull() { if (!($this->database->tableExists('tl_metamodel_translatedurl'))) { return; } foreach ($this->database->listFields('tl_metamodel_translatedurl', true) as $field) { if ('href' == $field['name'] && $field['type'] != 'index...
php
private function ensureHrefDefaultsToNull() { if (!($this->database->tableExists('tl_metamodel_translatedurl'))) { return; } foreach ($this->database->listFields('tl_metamodel_translatedurl', true) as $field) { if ('href' == $field['name'] && $field['type'] != 'index...
[ "private", "function", "ensureHrefDefaultsToNull", "(", ")", "{", "if", "(", "!", "(", "$", "this", "->", "database", "->", "tableExists", "(", "'tl_metamodel_translatedurl'", ")", ")", ")", "{", "return", ";", "}", "foreach", "(", "$", "this", "->", "data...
Ensure the default value for the href column is correct. @return void
[ "Ensure", "the", "default", "value", "for", "the", "href", "column", "is", "correct", "." ]
ad6b4967244614be49d382934043c766b5fa08d8
https://github.com/MetaModels/attribute_translatedurl/blob/ad6b4967244614be49d382934043c766b5fa08d8/src/Helper/UpgradeHandler.php#L88-L107
204,049
salernolabs/camelize
src/Uncamel.php
Uncamel.uncamelize
public function uncamelize($input) { $input = trim($input); if (empty($input)) { throw new \Exception("Can not uncamelize an empty string."); } $output = ''; for ($i = 0; $i < mb_strlen($input); ++$i) { $character = mb_substr($input,...
php
public function uncamelize($input) { $input = trim($input); if (empty($input)) { throw new \Exception("Can not uncamelize an empty string."); } $output = ''; for ($i = 0; $i < mb_strlen($input); ++$i) { $character = mb_substr($input,...
[ "public", "function", "uncamelize", "(", "$", "input", ")", "{", "$", "input", "=", "trim", "(", "$", "input", ")", ";", "if", "(", "empty", "(", "$", "input", ")", ")", "{", "throw", "new", "\\", "Exception", "(", "\"Can not uncamelize an empty string.\...
Uncamelize a string @param $input @return string
[ "Uncamelize", "a", "string" ]
6098e9827fd21509592fc7062b653582d0dd00d1
https://github.com/salernolabs/camelize/blob/6098e9827fd21509592fc7062b653582d0dd00d1/src/Uncamel.php#L55-L103
204,050
phPoirot/ApiClient
AccessTokenObject.php
AccessTokenObject.setExpiresIn
function setExpiresIn($expiry) { $this->expiresIn = $expiry; $this->datetimeExpiration = $this->getDateTimeExpiration(); return $this; }
php
function setExpiresIn($expiry) { $this->expiresIn = $expiry; $this->datetimeExpiration = $this->getDateTimeExpiration(); return $this; }
[ "function", "setExpiresIn", "(", "$", "expiry", ")", "{", "$", "this", "->", "expiresIn", "=", "$", "expiry", ";", "$", "this", "->", "datetimeExpiration", "=", "$", "this", "->", "getDateTimeExpiration", "(", ")", ";", "return", "$", "this", ";", "}" ]
Set Expiry DateTime @param \DateTime $expiry @return $this
[ "Set", "Expiry", "DateTime" ]
4753197be9f961ab1d915371a87757dbd8efcf9a
https://github.com/phPoirot/ApiClient/blob/4753197be9f961ab1d915371a87757dbd8efcf9a/AccessTokenObject.php#L112-L117
204,051
stackpr/quipxml
src/Contact/QuipContact.php
QuipContact.loadEmpty
static public function loadEmpty($defaults = NULL) { $defaults = array_merge(array( 'FN' => '', ), (array) $defaults); $ical = implode("\n", array( 'BEGIN:VCARD', 'VERSION:3.0', 'PRODID:QuipContact', 'N:', 'FN:' . QuipContactVcfFormatter::escape($defaults['FN']), 'E...
php
static public function loadEmpty($defaults = NULL) { $defaults = array_merge(array( 'FN' => '', ), (array) $defaults); $ical = implode("\n", array( 'BEGIN:VCARD', 'VERSION:3.0', 'PRODID:QuipContact', 'N:', 'FN:' . QuipContactVcfFormatter::escape($defaults['FN']), 'E...
[ "static", "public", "function", "loadEmpty", "(", "$", "defaults", "=", "NULL", ")", "{", "$", "defaults", "=", "array_merge", "(", "array", "(", "'FN'", "=>", "''", ",", ")", ",", "(", "array", ")", "$", "defaults", ")", ";", "$", "ical", "=", "im...
Initialize an empty contact. @param array $defaults @return \QuipXml\Xml\QuipXmlElement
[ "Initialize", "an", "empty", "contact", "." ]
472e0d98a90aa0a283aac933158d830311480ff8
https://github.com/stackpr/quipxml/blob/472e0d98a90aa0a283aac933158d830311480ff8/src/Contact/QuipContact.php#L45-L58
204,052
AntonyThorpe/consumer
src/BulkLoaderResult.php
BulkLoaderResult.getUpdated
public function getUpdated() { $set = new ArrayList(); foreach ($this->updated as $arrItem) { $set->push(ArrayData::create($arrItem)); } return $set; }
php
public function getUpdated() { $set = new ArrayList(); foreach ($this->updated as $arrItem) { $set->push(ArrayData::create($arrItem)); } return $set; }
[ "public", "function", "getUpdated", "(", ")", "{", "$", "set", "=", "new", "ArrayList", "(", ")", ";", "foreach", "(", "$", "this", "->", "updated", "as", "$", "arrItem", ")", "{", "$", "set", "->", "push", "(", "ArrayData", "::", "create", "(", "$...
Return all updated objects @return \SilverStripe\ORM\ArrayList
[ "Return", "all", "updated", "objects" ]
c9f464b901c09ab0bfbb62c94589637363af7bf0
https://github.com/AntonyThorpe/consumer/blob/c9f464b901c09ab0bfbb62c94589637363af7bf0/src/BulkLoaderResult.php#L122-L129
204,053
AntonyThorpe/consumer
src/BulkLoaderResult.php
BulkLoaderResult.getDeleted
public function getDeleted() { $set = new ArrayList(); foreach ($this->deleted as $arrItem) { $set->push(ArrayData::create($arrItem)); } return $set; }
php
public function getDeleted() { $set = new ArrayList(); foreach ($this->deleted as $arrItem) { $set->push(ArrayData::create($arrItem)); } return $set; }
[ "public", "function", "getDeleted", "(", ")", "{", "$", "set", "=", "new", "ArrayList", "(", ")", ";", "foreach", "(", "$", "this", "->", "deleted", "as", "$", "arrItem", ")", "{", "$", "set", "->", "push", "(", "ArrayData", "::", "create", "(", "$...
Return all deleted objects @return \SilverStripe\ORM\ArrayList
[ "Return", "all", "deleted", "objects" ]
c9f464b901c09ab0bfbb62c94589637363af7bf0
https://github.com/AntonyThorpe/consumer/blob/c9f464b901c09ab0bfbb62c94589637363af7bf0/src/BulkLoaderResult.php#L135-L142
204,054
AntonyThorpe/consumer
src/BulkLoaderResult.php
BulkLoaderResult.getData
public function getData() { $data = new ArrayList(); if ($this->CreatedCount()) { $data->push(ArrayData::create(array("Title" => _t('Consumer.CREATED', 'Created')))); $data->merge($this->getCreated()); } if ($this->UpdatedCount()) { $data->push(Arr...
php
public function getData() { $data = new ArrayList(); if ($this->CreatedCount()) { $data->push(ArrayData::create(array("Title" => _t('Consumer.CREATED', 'Created')))); $data->merge($this->getCreated()); } if ($this->UpdatedCount()) { $data->push(Arr...
[ "public", "function", "getData", "(", ")", "{", "$", "data", "=", "new", "ArrayList", "(", ")", ";", "if", "(", "$", "this", "->", "CreatedCount", "(", ")", ")", "{", "$", "data", "->", "push", "(", "ArrayData", "::", "create", "(", "array", "(", ...
Prepare the boby for an email or build task @return \SilverStripe\ORM\ArrayList
[ "Prepare", "the", "boby", "for", "an", "email", "or", "build", "task" ]
c9f464b901c09ab0bfbb62c94589637363af7bf0
https://github.com/AntonyThorpe/consumer/blob/c9f464b901c09ab0bfbb62c94589637363af7bf0/src/BulkLoaderResult.php#L148-L164
204,055
AntonyThorpe/consumer
src/BulkLoaderResult.php
BulkLoaderResult.getChangedFields
protected function getChangedFields($obj) { $changedFields = $obj->getChangedFields(true, 2); foreach ($changedFields as $key => $value) { $changedFields[$key]['before'] = '(' . gettype($value['before']) . ') ' . $value['before']; $changedFields[$key]['after'] = '(' . gettype...
php
protected function getChangedFields($obj) { $changedFields = $obj->getChangedFields(true, 2); foreach ($changedFields as $key => $value) { $changedFields[$key]['before'] = '(' . gettype($value['before']) . ') ' . $value['before']; $changedFields[$key]['after'] = '(' . gettype...
[ "protected", "function", "getChangedFields", "(", "$", "obj", ")", "{", "$", "changedFields", "=", "$", "obj", "->", "getChangedFields", "(", "true", ",", "2", ")", ";", "foreach", "(", "$", "changedFields", "as", "$", "key", "=>", "$", "value", ")", "...
Modelled on the getChangedFields of DataObject, with the addition of the variable's type @param \SilverStripe\ORM\DataObject $obj @return array The before/after changes of each field
[ "Modelled", "on", "the", "getChangedFields", "of", "DataObject", "with", "the", "addition", "of", "the", "variable", "s", "type" ]
c9f464b901c09ab0bfbb62c94589637363af7bf0
https://github.com/AntonyThorpe/consumer/blob/c9f464b901c09ab0bfbb62c94589637363af7bf0/src/BulkLoaderResult.php#L209-L218
204,056
mojopollo/laravel-helpers
src/Mojopollo/Helpers/FileHelper.php
FileHelper.directoryFiles
public function directoryFiles($path) { $contents = []; // Scan directory $directoryFiles = scandir($path); foreach ($directoryFiles as $index => $filePath) { // Ommit . and .. if ( ! in_array($filePath, ['.', '..'])) { // Check if this is a directory if (is_dir($path...
php
public function directoryFiles($path) { $contents = []; // Scan directory $directoryFiles = scandir($path); foreach ($directoryFiles as $index => $filePath) { // Ommit . and .. if ( ! in_array($filePath, ['.', '..'])) { // Check if this is a directory if (is_dir($path...
[ "public", "function", "directoryFiles", "(", "$", "path", ")", "{", "$", "contents", "=", "[", "]", ";", "// Scan directory", "$", "directoryFiles", "=", "scandir", "(", "$", "path", ")", ";", "foreach", "(", "$", "directoryFiles", "as", "$", "index", "=...
Return an array of files with their full paths contained in a directory and its subdirectories @param string $path path to directtory @return array full paths of directory files
[ "Return", "an", "array", "of", "files", "with", "their", "full", "paths", "contained", "in", "a", "directory", "and", "its", "subdirectories" ]
0becb5e0f4202a0f489fb5e384c01dacb8f29dc5
https://github.com/mojopollo/laravel-helpers/blob/0becb5e0f4202a0f489fb5e384c01dacb8f29dc5/src/Mojopollo/Helpers/FileHelper.php#L12-L39
204,057
ben-gibson/foursquare-venue-client
src/Client.php
Client.simple
public static function simple(Configuration $configuration, VenueFactory $venueFactory) { return new static( $configuration, new HttpMethodsClient(HttpClientDiscovery::find(), MessageFactoryDiscovery::find()), $venueFactory ); }
php
public static function simple(Configuration $configuration, VenueFactory $venueFactory) { return new static( $configuration, new HttpMethodsClient(HttpClientDiscovery::find(), MessageFactoryDiscovery::find()), $venueFactory ); }
[ "public", "static", "function", "simple", "(", "Configuration", "$", "configuration", ",", "VenueFactory", "$", "venueFactory", ")", "{", "return", "new", "static", "(", "$", "configuration", ",", "new", "HttpMethodsClient", "(", "HttpClientDiscovery", "::", "find...
Convenience factory method creating a standard Client configuration. @param Configuration $configuration @param VenueFactory $venueFactory @return static
[ "Convenience", "factory", "method", "creating", "a", "standard", "Client", "configuration", "." ]
ce5e7c308f87d5ccc28ab8d27a9cb51bd106d969
https://github.com/ben-gibson/foursquare-venue-client/blob/ce5e7c308f87d5ccc28ab8d27a9cb51bd106d969/src/Client.php#L50-L57
204,058
ben-gibson/foursquare-venue-client
src/Client.php
Client.getVenue
public function getVenue(Identifier $identifier) { $url = $this->getUrl(sprintf('venues/%s', urlencode($identifier))); $response = $this->httpClient->get($url, $this->getDefaultHeaders()); $content = $this->parseResponse($response); if (!isset($content->response->venue)) { ...
php
public function getVenue(Identifier $identifier) { $url = $this->getUrl(sprintf('venues/%s', urlencode($identifier))); $response = $this->httpClient->get($url, $this->getDefaultHeaders()); $content = $this->parseResponse($response); if (!isset($content->response->venue)) { ...
[ "public", "function", "getVenue", "(", "Identifier", "$", "identifier", ")", "{", "$", "url", "=", "$", "this", "->", "getUrl", "(", "sprintf", "(", "'venues/%s'", ",", "urlencode", "(", "$", "identifier", ")", ")", ")", ";", "$", "response", "=", "$",...
Get a venue by its unique identifier. @param Identifier $identifier The venue identifier. @return Venue
[ "Get", "a", "venue", "by", "its", "unique", "identifier", "." ]
ce5e7c308f87d5ccc28ab8d27a9cb51bd106d969
https://github.com/ben-gibson/foursquare-venue-client/blob/ce5e7c308f87d5ccc28ab8d27a9cb51bd106d969/src/Client.php#L66-L79
204,059
ben-gibson/foursquare-venue-client
src/Client.php
Client.search
public function search(Search $options) { $url = $this->getUrl('venues/search', $options->parametrise()); $response = $this->httpClient->get($url, $this->getDefaultHeaders()); $content = $this->parseResponse($response); if (!isset($content->response->venues)) { throw I...
php
public function search(Search $options) { $url = $this->getUrl('venues/search', $options->parametrise()); $response = $this->httpClient->get($url, $this->getDefaultHeaders()); $content = $this->parseResponse($response); if (!isset($content->response->venues)) { throw I...
[ "public", "function", "search", "(", "Search", "$", "options", ")", "{", "$", "url", "=", "$", "this", "->", "getUrl", "(", "'venues/search'", ",", "$", "options", "->", "parametrise", "(", ")", ")", ";", "$", "response", "=", "$", "this", "->", "htt...
Search venues. @param Search $options The search options. @return Venue[]
[ "Search", "venues", "." ]
ce5e7c308f87d5ccc28ab8d27a9cb51bd106d969
https://github.com/ben-gibson/foursquare-venue-client/blob/ce5e7c308f87d5ccc28ab8d27a9cb51bd106d969/src/Client.php#L88-L103
204,060
ben-gibson/foursquare-venue-client
src/Client.php
Client.explore
public function explore(Explore $options) { $url = $this->getUrl('venues/explore', $options->parametrise()); $response = $this->httpClient->get($url, $this->getDefaultHeaders()); $content = $this->parseResponse($response); if (!isset($content->response->groups[0]->items)) { ...
php
public function explore(Explore $options) { $url = $this->getUrl('venues/explore', $options->parametrise()); $response = $this->httpClient->get($url, $this->getDefaultHeaders()); $content = $this->parseResponse($response); if (!isset($content->response->groups[0]->items)) { ...
[ "public", "function", "explore", "(", "Explore", "$", "options", ")", "{", "$", "url", "=", "$", "this", "->", "getUrl", "(", "'venues/explore'", ",", "$", "options", "->", "parametrise", "(", ")", ")", ";", "$", "response", "=", "$", "this", "->", "...
Explore venues. @param Explore $options The explore options. @return Venue[]
[ "Explore", "venues", "." ]
ce5e7c308f87d5ccc28ab8d27a9cb51bd106d969
https://github.com/ben-gibson/foursquare-venue-client/blob/ce5e7c308f87d5ccc28ab8d27a9cb51bd106d969/src/Client.php#L112-L127
204,061
ben-gibson/foursquare-venue-client
src/Client.php
Client.parseResponse
private function parseResponse(ResponseInterface $response) { if ($response->getStatusCode() >= 400 && $response->getStatusCode() < 500) { throw new ClientErrorException($response); } if ($response->getStatusCode() >= 500 && $response->getStatusCode() < 600) { throw ...
php
private function parseResponse(ResponseInterface $response) { if ($response->getStatusCode() >= 400 && $response->getStatusCode() < 500) { throw new ClientErrorException($response); } if ($response->getStatusCode() >= 500 && $response->getStatusCode() < 600) { throw ...
[ "private", "function", "parseResponse", "(", "ResponseInterface", "$", "response", ")", "{", "if", "(", "$", "response", "->", "getStatusCode", "(", ")", ">=", "400", "&&", "$", "response", "->", "getStatusCode", "(", ")", "<", "500", ")", "{", "throw", ...
Parse a response. @param ResponseInterface $response The response to parse. @throws ClientErrorException Thrown when a 4xx response status is returned. @throws ServerErrorException Thrown when a 5xx response status is returned. @throws InvalidResponseException Thrown when an invalid response body is encountered. @re...
[ "Parse", "a", "response", "." ]
ce5e7c308f87d5ccc28ab8d27a9cb51bd106d969
https://github.com/ben-gibson/foursquare-venue-client/blob/ce5e7c308f87d5ccc28ab8d27a9cb51bd106d969/src/Client.php#L164-L183
204,062
ben-gibson/foursquare-venue-client
src/Client.php
Client.getUrl
private function getUrl($path, $parameters = []) { $url = sprintf( '%s/v%d/%s?client_id=%s&client_secret=%s&v=%s%s', $this->configuration->getBasePath(), urlencode($this->configuration->getVersion()), trim($path, '/'), urlencode($this->configuratio...
php
private function getUrl($path, $parameters = []) { $url = sprintf( '%s/v%d/%s?client_id=%s&client_secret=%s&v=%s%s', $this->configuration->getBasePath(), urlencode($this->configuration->getVersion()), trim($path, '/'), urlencode($this->configuratio...
[ "private", "function", "getUrl", "(", "$", "path", ",", "$", "parameters", "=", "[", "]", ")", "{", "$", "url", "=", "sprintf", "(", "'%s/v%d/%s?client_id=%s&client_secret=%s&v=%s%s'", ",", "$", "this", "->", "configuration", "->", "getBasePath", "(", ")", "...
Get the API url for a given path. @param string $path The path. @param array $parameters The query parameters to include. @return string
[ "Get", "the", "API", "url", "for", "a", "given", "path", "." ]
ce5e7c308f87d5ccc28ab8d27a9cb51bd106d969
https://github.com/ben-gibson/foursquare-venue-client/blob/ce5e7c308f87d5ccc28ab8d27a9cb51bd106d969/src/Client.php#L193-L207
204,063
ben-gibson/foursquare-venue-client
src/Client.php
Client.parseParameters
private function parseParameters(array $parameters) { if (empty($parameters)) { return ''; } $parameters = implode('&', array_map( function ($value, $key) { return sprintf('%s=%s', $key, urlencode($value)); }, $parameters, ...
php
private function parseParameters(array $parameters) { if (empty($parameters)) { return ''; } $parameters = implode('&', array_map( function ($value, $key) { return sprintf('%s=%s', $key, urlencode($value)); }, $parameters, ...
[ "private", "function", "parseParameters", "(", "array", "$", "parameters", ")", "{", "if", "(", "empty", "(", "$", "parameters", ")", ")", "{", "return", "''", ";", "}", "$", "parameters", "=", "implode", "(", "'&'", ",", "array_map", "(", "function", ...
Parse an array of parameters to their string representation. @param array $parameters @return string
[ "Parse", "an", "array", "of", "parameters", "to", "their", "string", "representation", "." ]
ce5e7c308f87d5ccc28ab8d27a9cb51bd106d969
https://github.com/ben-gibson/foursquare-venue-client/blob/ce5e7c308f87d5ccc28ab8d27a9cb51bd106d969/src/Client.php#L228-L243
204,064
bruno-barros/w.eloquent-framework
src/weloquent/Plugins/PluginsLoader.php
PluginsLoader.bootRequired
public static function bootRequired() { // on test do not load plugins if(self::isUnableToRunPlugins()) { return; } foreach (self::$required as $plugin) { require_once __DIR__ . DS . $plugin; } }
php
public static function bootRequired() { // on test do not load plugins if(self::isUnableToRunPlugins()) { return; } foreach (self::$required as $plugin) { require_once __DIR__ . DS . $plugin; } }
[ "public", "static", "function", "bootRequired", "(", ")", "{", "// on test do not load plugins", "if", "(", "self", "::", "isUnableToRunPlugins", "(", ")", ")", "{", "return", ";", "}", "foreach", "(", "self", "::", "$", "required", "as", "$", "plugin", ")",...
Load required plugins
[ "Load", "required", "plugins" ]
d252dcb1ba1b6b1cecf67877d7d6d3ba57ebedbd
https://github.com/bruno-barros/w.eloquent-framework/blob/d252dcb1ba1b6b1cecf67877d7d6d3ba57ebedbd/src/weloquent/Plugins/PluginsLoader.php#L46-L59
204,065
bruno-barros/w.eloquent-framework
src/weloquent/Plugins/PluginsLoader.php
PluginsLoader.loadFromPath
public static function loadFromPath($path) { // on test do not load plugins if(self::isUnableToRunPlugins()) { return; } if (!file_exists($path)) { throw new InvalidArgumentException("The path [{$path}] doesn't exist to load plugins."); } $plugins = require $path; foreach ($plugins as $plugi...
php
public static function loadFromPath($path) { // on test do not load plugins if(self::isUnableToRunPlugins()) { return; } if (!file_exists($path)) { throw new InvalidArgumentException("The path [{$path}] doesn't exist to load plugins."); } $plugins = require $path; foreach ($plugins as $plugi...
[ "public", "static", "function", "loadFromPath", "(", "$", "path", ")", "{", "// on test do not load plugins", "if", "(", "self", "::", "isUnableToRunPlugins", "(", ")", ")", "{", "return", ";", "}", "if", "(", "!", "file_exists", "(", "$", "path", ")", ")"...
Require plugins based on an array of paths @param $path
[ "Require", "plugins", "based", "on", "an", "array", "of", "paths" ]
d252dcb1ba1b6b1cecf67877d7d6d3ba57ebedbd
https://github.com/bruno-barros/w.eloquent-framework/blob/d252dcb1ba1b6b1cecf67877d7d6d3ba57ebedbd/src/weloquent/Plugins/PluginsLoader.php#L66-L94
204,066
romeOz/rock-cache
src/Memcached.php
Memcached.setTags
protected function setTags($key, array $tags = []) { if (empty($tags)) { return; } foreach ($this->prepareTags($tags) as $tag) { if (($keys = $this->storage->get($tag)) !== false) { $keys = $this->unserialize($keys); if (in_array($key,...
php
protected function setTags($key, array $tags = []) { if (empty($tags)) { return; } foreach ($this->prepareTags($tags) as $tag) { if (($keys = $this->storage->get($tag)) !== false) { $keys = $this->unserialize($keys); if (in_array($key,...
[ "protected", "function", "setTags", "(", "$", "key", ",", "array", "$", "tags", "=", "[", "]", ")", "{", "if", "(", "empty", "(", "$", "tags", ")", ")", "{", "return", ";", "}", "foreach", "(", "$", "this", "->", "prepareTags", "(", "$", "tags", ...
Sets a tags @param string $key key of cache @param array $tags list of tags
[ "Sets", "a", "tags" ]
bbd146ee323e8cc1fb11dc1803215c3656e02c57
https://github.com/romeOz/rock-cache/blob/bbd146ee323e8cc1fb11dc1803215c3656e02c57/src/Memcached.php#L275-L293
204,067
3ev/wordpress-core
src/Tev/Term/Repository/TermRepository.php
TermRepository.getByTaxonomy
public function getByTaxonomy($taxonomy) { if (!($taxonomy instanceof Taxonomy)) { $taxonomy = $this->taxonomyFactory->create($taxonomy); } return $this->convertTermsArray(get_terms($taxonomy->getName(), array( 'hide_empty' => false )), $taxonomy); }
php
public function getByTaxonomy($taxonomy) { if (!($taxonomy instanceof Taxonomy)) { $taxonomy = $this->taxonomyFactory->create($taxonomy); } return $this->convertTermsArray(get_terms($taxonomy->getName(), array( 'hide_empty' => false )), $taxonomy); }
[ "public", "function", "getByTaxonomy", "(", "$", "taxonomy", ")", "{", "if", "(", "!", "(", "$", "taxonomy", "instanceof", "Taxonomy", ")", ")", "{", "$", "taxonomy", "=", "$", "this", "->", "taxonomyFactory", "->", "create", "(", "$", "taxonomy", ")", ...
Get all terms in the given taxonomy. @param string|\Tev\Taxonomy\Model\Taxonomy $taxonomy Taxonomy object or name @return \Tev\Term\Model\Term[]
[ "Get", "all", "terms", "in", "the", "given", "taxonomy", "." ]
da674fbec5bf3d5bd2a2141680a4c141113eb6b0
https://github.com/3ev/wordpress-core/blob/da674fbec5bf3d5bd2a2141680a4c141113eb6b0/src/Tev/Term/Repository/TermRepository.php#L51-L60
204,068
3ev/wordpress-core
src/Tev/Term/Repository/TermRepository.php
TermRepository.convertTermsArray
private function convertTermsArray($terms, Taxonomy $taxonomy) { $res = array(); foreach ($terms as $t) { $res[] = $this->termFactory->create($t, $taxonomy); } return $res; }
php
private function convertTermsArray($terms, Taxonomy $taxonomy) { $res = array(); foreach ($terms as $t) { $res[] = $this->termFactory->create($t, $taxonomy); } return $res; }
[ "private", "function", "convertTermsArray", "(", "$", "terms", ",", "Taxonomy", "$", "taxonomy", ")", "{", "$", "res", "=", "array", "(", ")", ";", "foreach", "(", "$", "terms", "as", "$", "t", ")", "{", "$", "res", "[", "]", "=", "$", "this", "-...
Convert an array of Wordpress term objects to array of Term objects. @param \stdClass[] $terms Wordpress term objects @param \Tev\Taxonomy\Model\Taxonomy $taxonomy Parent taxonomy @return \Tev\Term\Model\Term[] Term objects
[ "Convert", "an", "array", "of", "Wordpress", "term", "objects", "to", "array", "of", "Term", "objects", "." ]
da674fbec5bf3d5bd2a2141680a4c141113eb6b0
https://github.com/3ev/wordpress-core/blob/da674fbec5bf3d5bd2a2141680a4c141113eb6b0/src/Tev/Term/Repository/TermRepository.php#L69-L78
204,069
acacha/forge-publish
src/Console/Commands/Traits/ChecksSSHConnection.php
ChecksSSHConnection.checkSSHConnection
protected function checkSSHConnection($server = null, $ssh_config_file = null, $verbose = false) { $server = $server ? $server : $this->hostNameForConfigFile(); $ssh_config_file = $ssh_config_file ? $ssh_config_file : $this->sshConfigFile(); if ($verbose) { $this->info("timeout ...
php
protected function checkSSHConnection($server = null, $ssh_config_file = null, $verbose = false) { $server = $server ? $server : $this->hostNameForConfigFile(); $ssh_config_file = $ssh_config_file ? $ssh_config_file : $this->sshConfigFile(); if ($verbose) { $this->info("timeout ...
[ "protected", "function", "checkSSHConnection", "(", "$", "server", "=", "null", ",", "$", "ssh_config_file", "=", "null", ",", "$", "verbose", "=", "false", ")", "{", "$", "server", "=", "$", "server", "?", "$", "server", ":", "$", "this", "->", "hostN...
Check SSH connection. @return bool
[ "Check", "SSH", "connection", "." ]
010779e3d2297c763b82dc3fbde992edffb3a6c6
https://github.com/acacha/forge-publish/blob/010779e3d2297c763b82dc3fbde992edffb3a6c6/src/Console/Commands/Traits/ChecksSSHConnection.php#L50-L63
204,070
acacha/forge-publish
src/Console/Commands/Traits/ChecksSSHConnection.php
ChecksSSHConnection.abortIfNoSSHConnection
protected function abortIfNoSSHConnection($server = null) { $server = $server ? $server : $this->hostNameForConfigFile(); if (!$this->checkSSHConnection($server)) { $this->error("SSH connection to server $server doesn't works. Please run php artisan publish:init or publish:ssh"); ...
php
protected function abortIfNoSSHConnection($server = null) { $server = $server ? $server : $this->hostNameForConfigFile(); if (!$this->checkSSHConnection($server)) { $this->error("SSH connection to server $server doesn't works. Please run php artisan publish:init or publish:ssh"); ...
[ "protected", "function", "abortIfNoSSHConnection", "(", "$", "server", "=", "null", ")", "{", "$", "server", "=", "$", "server", "?", "$", "server", ":", "$", "this", "->", "hostNameForConfigFile", "(", ")", ";", "if", "(", "!", "$", "this", "->", "che...
Abort if no SSH connection. @return bool
[ "Abort", "if", "no", "SSH", "connection", "." ]
010779e3d2297c763b82dc3fbde992edffb3a6c6
https://github.com/acacha/forge-publish/blob/010779e3d2297c763b82dc3fbde992edffb3a6c6/src/Console/Commands/Traits/ChecksSSHConnection.php#L70-L77
204,071
schpill/thin
src/Load/Ini.php
Ini._processKey
protected function _processKey($config, $key, $value) { if (strpos($key, $this->_nestSeparator) !== false) { $parts = explode($this->_nestSeparator, $key, 2); if (strlen(Arrays::first($parts)) && strlen(Arrays::last($parts))) { if (!isset($config[A...
php
protected function _processKey($config, $key, $value) { if (strpos($key, $this->_nestSeparator) !== false) { $parts = explode($this->_nestSeparator, $key, 2); if (strlen(Arrays::first($parts)) && strlen(Arrays::last($parts))) { if (!isset($config[A...
[ "protected", "function", "_processKey", "(", "$", "config", ",", "$", "key", ",", "$", "value", ")", "{", "if", "(", "strpos", "(", "$", "key", ",", "$", "this", "->", "_nestSeparator", ")", "!==", "false", ")", "{", "$", "parts", "=", "explode", "...
Assign the key's value to the property list. Handles the nest separator for sub-properties. @param array $config @param string $key @param string $value @throws Exception @return array
[ "Assign", "the", "key", "s", "value", "to", "the", "property", "list", ".", "Handles", "the", "nest", "separator", "for", "sub", "-", "properties", "." ]
a9102d9d6f70e8b0f6be93153f70849f46489ee1
https://github.com/schpill/thin/blob/a9102d9d6f70e8b0f6be93153f70849f46489ee1/src/Load/Ini.php#L253-L280
204,072
phonetworks/pho-compiler
src/Pho/Compiler/Inspector.php
Inspector.assertParity
public function assertParity(): void { $ignored_classes = []; $object_exists = false; $actor_exists = false; $locator = new ClassFileLocator($this->folder); foreach ($locator as $file) { $filename = str_replace($this->folder . DIRECTORY_SEPARATOR, '', $file->getRe...
php
public function assertParity(): void { $ignored_classes = []; $object_exists = false; $actor_exists = false; $locator = new ClassFileLocator($this->folder); foreach ($locator as $file) { $filename = str_replace($this->folder . DIRECTORY_SEPARATOR, '', $file->getRe...
[ "public", "function", "assertParity", "(", ")", ":", "void", "{", "$", "ignored_classes", "=", "[", "]", ";", "$", "object_exists", "=", "false", ";", "$", "actor_exists", "=", "false", ";", "$", "locator", "=", "new", "ClassFileLocator", "(", "$", "this...
Validates the compiled schema directory. @return void @throws Exceptions\MissingObjectImparityException if there is no object node found. @throws Exceptions\MissingActorImparityException if there is no actor node found. @throws Exceptions\AbsentEdgeDirImparityException if the node does not have a directory for its ed...
[ "Validates", "the", "compiled", "schema", "directory", "." ]
9131c3ac55d163069aaf6808b7339345151c7280
https://github.com/phonetworks/pho-compiler/blob/9131c3ac55d163069aaf6808b7339345151c7280/src/Pho/Compiler/Inspector.php#L63-L117
204,073
phonetworks/pho-compiler
src/Pho/Compiler/Inspector.php
Inspector.checkEdgeDir
protected function checkEdgeDir(string $node_name): void { $dirname = $this->folder.DIRECTORY_SEPARATOR.$node_name."Out"; if(!file_exists($dirname)) { throw new Exceptions\AbsentEdgeDirImparityException($dirname, $node_name); } }
php
protected function checkEdgeDir(string $node_name): void { $dirname = $this->folder.DIRECTORY_SEPARATOR.$node_name."Out"; if(!file_exists($dirname)) { throw new Exceptions\AbsentEdgeDirImparityException($dirname, $node_name); } }
[ "protected", "function", "checkEdgeDir", "(", "string", "$", "node_name", ")", ":", "void", "{", "$", "dirname", "=", "$", "this", "->", "folder", ".", "DIRECTORY_SEPARATOR", ".", "$", "node_name", ".", "\"Out\"", ";", "if", "(", "!", "file_exists", "(", ...
Checks if the node has a directory for its edges. @param string $node_name The name of the node. @return void @throws Exceptions\AbsentEdgeDirImparityException if the node does not have a directory for its edges.
[ "Checks", "if", "the", "node", "has", "a", "directory", "for", "its", "edges", "." ]
9131c3ac55d163069aaf6808b7339345151c7280
https://github.com/phonetworks/pho-compiler/blob/9131c3ac55d163069aaf6808b7339345151c7280/src/Pho/Compiler/Inspector.php#L128-L134
204,074
interactivesolutions/honeycomb-scripts
src/app/commands/service/HCServiceTranslations.php
HCServiceTranslations.optimize
public function optimize (stdClass $data) { $data->translationFilePrefix = $this->stringWithUnderscore ($data->serviceURL); $data->translationFilePrefix = $this->stringWithUnderscore ($data->translationFilePrefix); $data->translationsLocation = $this->getTranslationPrefix ($data) . $data->t...
php
public function optimize (stdClass $data) { $data->translationFilePrefix = $this->stringWithUnderscore ($data->serviceURL); $data->translationFilePrefix = $this->stringWithUnderscore ($data->translationFilePrefix); $data->translationsLocation = $this->getTranslationPrefix ($data) . $data->t...
[ "public", "function", "optimize", "(", "stdClass", "$", "data", ")", "{", "$", "data", "->", "translationFilePrefix", "=", "$", "this", "->", "stringWithUnderscore", "(", "$", "data", "->", "serviceURL", ")", ";", "$", "data", "->", "translationFilePrefix", ...
Optimizing Translations data @param stdClass $data @return stdClass
[ "Optimizing", "Translations", "data" ]
be2428ded5219dc612ecc51f43aa4dedff3d034d
https://github.com/interactivesolutions/honeycomb-scripts/blob/be2428ded5219dc612ecc51f43aa4dedff3d034d/src/app/commands/service/HCServiceTranslations.php#L21-L29
204,075
interactivesolutions/honeycomb-scripts
src/app/commands/service/HCServiceTranslations.php
HCServiceTranslations.getServiceProviderNameSpace
private function getServiceProviderNameSpace (stdClass $item) { return json_decode (file_get_contents ($item->rootDirectory . 'app/' . HCNewService::CONFIG_PATH))->general->serviceProviderNameSpace; }
php
private function getServiceProviderNameSpace (stdClass $item) { return json_decode (file_get_contents ($item->rootDirectory . 'app/' . HCNewService::CONFIG_PATH))->general->serviceProviderNameSpace; }
[ "private", "function", "getServiceProviderNameSpace", "(", "stdClass", "$", "item", ")", "{", "return", "json_decode", "(", "file_get_contents", "(", "$", "item", "->", "rootDirectory", ".", "'app/'", ".", "HCNewService", "::", "CONFIG_PATH", ")", ")", "->", "ge...
Getting service provider namespace @param $item @return mixed
[ "Getting", "service", "provider", "namespace" ]
be2428ded5219dc612ecc51f43aa4dedff3d034d
https://github.com/interactivesolutions/honeycomb-scripts/blob/be2428ded5219dc612ecc51f43aa4dedff3d034d/src/app/commands/service/HCServiceTranslations.php#L52-L55
204,076
interactivesolutions/honeycomb-scripts
src/app/commands/service/HCServiceTranslations.php
HCServiceTranslations.generate
public function generate (stdClass $service) { $this->createFileFromTemplate ([ "destination" => $service->rootDirectory . 'resources/lang/en/' . $service->translationFilePrefix . '.php', "templateDestination" => __DIR__ . '/../templates/service/translations.hctpl', ...
php
public function generate (stdClass $service) { $this->createFileFromTemplate ([ "destination" => $service->rootDirectory . 'resources/lang/en/' . $service->translationFilePrefix . '.php', "templateDestination" => __DIR__ . '/../templates/service/translations.hctpl', ...
[ "public", "function", "generate", "(", "stdClass", "$", "service", ")", "{", "$", "this", "->", "createFileFromTemplate", "(", "[", "\"destination\"", "=>", "$", "service", "->", "rootDirectory", ".", "'resources/lang/en/'", ".", "$", "service", "->", "translati...
Creating translation file @param $service @return string
[ "Creating", "translation", "file" ]
be2428ded5219dc612ecc51f43aa4dedff3d034d
https://github.com/interactivesolutions/honeycomb-scripts/blob/be2428ded5219dc612ecc51f43aa4dedff3d034d/src/app/commands/service/HCServiceTranslations.php#L63-L74
204,077
interactivesolutions/honeycomb-scripts
src/app/commands/service/HCServiceTranslations.php
HCServiceTranslations.gatherTranslations
private function gatherTranslations (stdClass $service) { $output = ''; $tpl = file_get_contents (__DIR__ . '/../templates/shared/array.element.hctpl'); $line = str_replace ('{key}', 'page_title', $tpl); $line = str_replace ('{value}', $service->serviceName, $line); $output ...
php
private function gatherTranslations (stdClass $service) { $output = ''; $tpl = file_get_contents (__DIR__ . '/../templates/shared/array.element.hctpl'); $line = str_replace ('{key}', 'page_title', $tpl); $line = str_replace ('{value}', $service->serviceName, $line); $output ...
[ "private", "function", "gatherTranslations", "(", "stdClass", "$", "service", ")", "{", "$", "output", "=", "''", ";", "$", "tpl", "=", "file_get_contents", "(", "__DIR__", ".", "'/../templates/shared/array.element.hctpl'", ")", ";", "$", "line", "=", "str_repla...
Gathering available translations @param $service @return string
[ "Gathering", "available", "translations" ]
be2428ded5219dc612ecc51f43aa4dedff3d034d
https://github.com/interactivesolutions/honeycomb-scripts/blob/be2428ded5219dc612ecc51f43aa4dedff3d034d/src/app/commands/service/HCServiceTranslations.php#L82-L96
204,078
interactivesolutions/honeycomb-scripts
src/app/commands/service/HCServiceTranslations.php
HCServiceTranslations.gatherTranslationsFromModel
private function gatherTranslationsFromModel (stdClass $model, string $tpl, array $skip) { $output = ''; if (array_key_exists ('columns', $model) && !empty($model->columns)) foreach ($model->columns as $column) { if (in_array ($column->Field, $skip)) ...
php
private function gatherTranslationsFromModel (stdClass $model, string $tpl, array $skip) { $output = ''; if (array_key_exists ('columns', $model) && !empty($model->columns)) foreach ($model->columns as $column) { if (in_array ($column->Field, $skip)) ...
[ "private", "function", "gatherTranslationsFromModel", "(", "stdClass", "$", "model", ",", "string", "$", "tpl", ",", "array", "$", "skip", ")", "{", "$", "output", "=", "''", ";", "if", "(", "array_key_exists", "(", "'columns'", ",", "$", "model", ")", "...
Gathering fields from specific model @param stdClass $model @param string $tpl @param array $skip @return string
[ "Gathering", "fields", "from", "specific", "model" ]
be2428ded5219dc612ecc51f43aa4dedff3d034d
https://github.com/interactivesolutions/honeycomb-scripts/blob/be2428ded5219dc612ecc51f43aa4dedff3d034d/src/app/commands/service/HCServiceTranslations.php#L106-L122
204,079
juliangut/doctrine-manager-builder
src/RelationalBuilder.php
RelationalBuilder.getQueryCacheDriver
public function getQueryCacheDriver() { if (!$this->queryCacheDriver instanceof CacheProvider) { $this->queryCacheDriver = $this->getCacheDriver( (string) $this->getOption('query_cache_namespace'), $this->getOption('query_cache_driver') ); } ...
php
public function getQueryCacheDriver() { if (!$this->queryCacheDriver instanceof CacheProvider) { $this->queryCacheDriver = $this->getCacheDriver( (string) $this->getOption('query_cache_namespace'), $this->getOption('query_cache_driver') ); } ...
[ "public", "function", "getQueryCacheDriver", "(", ")", "{", "if", "(", "!", "$", "this", "->", "queryCacheDriver", "instanceof", "CacheProvider", ")", "{", "$", "this", "->", "queryCacheDriver", "=", "$", "this", "->", "getCacheDriver", "(", "(", "string", "...
Retrieve query cache driver. @throws \InvalidArgumentException @return CacheProvider
[ "Retrieve", "query", "cache", "driver", "." ]
9c63bc689e4084f06be4d119f2c56f6040453d0e
https://github.com/juliangut/doctrine-manager-builder/blob/9c63bc689e4084f06be4d119f2c56f6040453d0e/src/RelationalBuilder.php#L289-L299
204,080
juliangut/doctrine-manager-builder
src/RelationalBuilder.php
RelationalBuilder.getResultCacheDriver
public function getResultCacheDriver() { if (!$this->resultCacheDriver instanceof CacheProvider) { $this->resultCacheDriver = $this->getCacheDriver( (string) $this->getOption('result_cache_namespace'), $this->getOption('result_cache_driver') ); ...
php
public function getResultCacheDriver() { if (!$this->resultCacheDriver instanceof CacheProvider) { $this->resultCacheDriver = $this->getCacheDriver( (string) $this->getOption('result_cache_namespace'), $this->getOption('result_cache_driver') ); ...
[ "public", "function", "getResultCacheDriver", "(", ")", "{", "if", "(", "!", "$", "this", "->", "resultCacheDriver", "instanceof", "CacheProvider", ")", "{", "$", "this", "->", "resultCacheDriver", "=", "$", "this", "->", "getCacheDriver", "(", "(", "string", ...
Retrieve result cache driver. @throws \InvalidArgumentException @return CacheProvider
[ "Retrieve", "result", "cache", "driver", "." ]
9c63bc689e4084f06be4d119f2c56f6040453d0e
https://github.com/juliangut/doctrine-manager-builder/blob/9c63bc689e4084f06be4d119f2c56f6040453d0e/src/RelationalBuilder.php#L318-L328
204,081
juliangut/doctrine-manager-builder
src/RelationalBuilder.php
RelationalBuilder.getHydratorCacheDriver
public function getHydratorCacheDriver() { if (!$this->hydratorCacheDriver instanceof CacheProvider) { $this->hydratorCacheDriver = $this->getCacheDriver( (string) $this->getOption('hydrator_cache_namespace'), $this->getOption('hydrator_cache_driver') ...
php
public function getHydratorCacheDriver() { if (!$this->hydratorCacheDriver instanceof CacheProvider) { $this->hydratorCacheDriver = $this->getCacheDriver( (string) $this->getOption('hydrator_cache_namespace'), $this->getOption('hydrator_cache_driver') ...
[ "public", "function", "getHydratorCacheDriver", "(", ")", "{", "if", "(", "!", "$", "this", "->", "hydratorCacheDriver", "instanceof", "CacheProvider", ")", "{", "$", "this", "->", "hydratorCacheDriver", "=", "$", "this", "->", "getCacheDriver", "(", "(", "str...
Retrieve hydrator cache driver. @throws \InvalidArgumentException @return CacheProvider
[ "Retrieve", "hydrator", "cache", "driver", "." ]
9c63bc689e4084f06be4d119f2c56f6040453d0e
https://github.com/juliangut/doctrine-manager-builder/blob/9c63bc689e4084f06be4d119f2c56f6040453d0e/src/RelationalBuilder.php#L347-L357
204,082
juliangut/doctrine-manager-builder
src/RelationalBuilder.php
RelationalBuilder.getCacheDriver
protected function getCacheDriver($cacheNamespace, CacheProvider $cacheDriver = null) { if (!$cacheDriver instanceof CacheProvider) { $cacheDriver = clone $this->getMetadataCacheDriver(); $cacheDriver->setNamespace($cacheNamespace); } if ($cacheDriver->getNamespace()...
php
protected function getCacheDriver($cacheNamespace, CacheProvider $cacheDriver = null) { if (!$cacheDriver instanceof CacheProvider) { $cacheDriver = clone $this->getMetadataCacheDriver(); $cacheDriver->setNamespace($cacheNamespace); } if ($cacheDriver->getNamespace()...
[ "protected", "function", "getCacheDriver", "(", "$", "cacheNamespace", ",", "CacheProvider", "$", "cacheDriver", "=", "null", ")", "{", "if", "(", "!", "$", "cacheDriver", "instanceof", "CacheProvider", ")", "{", "$", "cacheDriver", "=", "clone", "$", "this", ...
Get cache driver. @param string $cacheNamespace @param CacheProvider|null $cacheDriver @return CacheProvider
[ "Get", "cache", "driver", "." ]
9c63bc689e4084f06be4d119f2c56f6040453d0e
https://github.com/juliangut/doctrine-manager-builder/blob/9c63bc689e4084f06be4d119f2c56f6040453d0e/src/RelationalBuilder.php#L377-L389
204,083
juliangut/doctrine-manager-builder
src/RelationalBuilder.php
RelationalBuilder.getNamingStrategy
protected function getNamingStrategy() { if (!$this->namingStrategy instanceof NamingStrategy) { $namingStrategy = $this->getOption('naming_strategy'); if (!$namingStrategy instanceof NamingStrategy) { $namingStrategy = new UnderscoreNamingStrategy(CASE_LOWER); ...
php
protected function getNamingStrategy() { if (!$this->namingStrategy instanceof NamingStrategy) { $namingStrategy = $this->getOption('naming_strategy'); if (!$namingStrategy instanceof NamingStrategy) { $namingStrategy = new UnderscoreNamingStrategy(CASE_LOWER); ...
[ "protected", "function", "getNamingStrategy", "(", ")", "{", "if", "(", "!", "$", "this", "->", "namingStrategy", "instanceof", "NamingStrategy", ")", "{", "$", "namingStrategy", "=", "$", "this", "->", "getOption", "(", "'naming_strategy'", ")", ";", "if", ...
Retrieve naming strategy. @return NamingStrategy
[ "Retrieve", "naming", "strategy", "." ]
9c63bc689e4084f06be4d119f2c56f6040453d0e
https://github.com/juliangut/doctrine-manager-builder/blob/9c63bc689e4084f06be4d119f2c56f6040453d0e/src/RelationalBuilder.php#L396-L409
204,084
juliangut/doctrine-manager-builder
src/RelationalBuilder.php
RelationalBuilder.getQuoteStrategy
protected function getQuoteStrategy() { if (!$this->quoteStrategy instanceof QuoteStrategy) { $quoteStrategy = $this->getOption('quote_strategy'); if (!$quoteStrategy instanceof QuoteStrategy) { $quoteStrategy = new DefaultQuoteStrategy; } $t...
php
protected function getQuoteStrategy() { if (!$this->quoteStrategy instanceof QuoteStrategy) { $quoteStrategy = $this->getOption('quote_strategy'); if (!$quoteStrategy instanceof QuoteStrategy) { $quoteStrategy = new DefaultQuoteStrategy; } $t...
[ "protected", "function", "getQuoteStrategy", "(", ")", "{", "if", "(", "!", "$", "this", "->", "quoteStrategy", "instanceof", "QuoteStrategy", ")", "{", "$", "quoteStrategy", "=", "$", "this", "->", "getOption", "(", "'quote_strategy'", ")", ";", "if", "(", ...
Retrieve quote strategy. @throws \InvalidArgumentException @return QuoteStrategy
[ "Retrieve", "quote", "strategy", "." ]
9c63bc689e4084f06be4d119f2c56f6040453d0e
https://github.com/juliangut/doctrine-manager-builder/blob/9c63bc689e4084f06be4d119f2c56f6040453d0e/src/RelationalBuilder.php#L418-L431
204,085
juliangut/doctrine-manager-builder
src/RelationalBuilder.php
RelationalBuilder.getSecondLevelCacheConfiguration
protected function getSecondLevelCacheConfiguration() { if (!$this->secondCacheConfig instanceof CacheConfiguration) { $secondCacheConfig = $this->getOption('second_level_cache_configuration'); if ($secondCacheConfig instanceof CacheConfiguration) { $this->secondCach...
php
protected function getSecondLevelCacheConfiguration() { if (!$this->secondCacheConfig instanceof CacheConfiguration) { $secondCacheConfig = $this->getOption('second_level_cache_configuration'); if ($secondCacheConfig instanceof CacheConfiguration) { $this->secondCach...
[ "protected", "function", "getSecondLevelCacheConfiguration", "(", ")", "{", "if", "(", "!", "$", "this", "->", "secondCacheConfig", "instanceof", "CacheConfiguration", ")", "{", "$", "secondCacheConfig", "=", "$", "this", "->", "getOption", "(", "'second_level_cache...
Retrieve second level cache configuration. @return CacheConfiguration|null
[ "Retrieve", "second", "level", "cache", "configuration", "." ]
9c63bc689e4084f06be4d119f2c56f6040453d0e
https://github.com/juliangut/doctrine-manager-builder/blob/9c63bc689e4084f06be4d119f2c56f6040453d0e/src/RelationalBuilder.php#L438-L449
204,086
juliangut/doctrine-manager-builder
src/RelationalBuilder.php
RelationalBuilder.getSQLLogger
protected function getSQLLogger() { if (!$this->SQLLogger instanceof SQLLogger) { $sqlLogger = $this->getOption('sql_logger'); if ($sqlLogger instanceof SQLLogger) { $this->SQLLogger = $sqlLogger; } } return $this->SQLLogger; }
php
protected function getSQLLogger() { if (!$this->SQLLogger instanceof SQLLogger) { $sqlLogger = $this->getOption('sql_logger'); if ($sqlLogger instanceof SQLLogger) { $this->SQLLogger = $sqlLogger; } } return $this->SQLLogger; }
[ "protected", "function", "getSQLLogger", "(", ")", "{", "if", "(", "!", "$", "this", "->", "SQLLogger", "instanceof", "SQLLogger", ")", "{", "$", "sqlLogger", "=", "$", "this", "->", "getOption", "(", "'sql_logger'", ")", ";", "if", "(", "$", "sqlLogger"...
Retrieve SQL logger. @return SQLLogger|null
[ "Retrieve", "SQL", "logger", "." ]
9c63bc689e4084f06be4d119f2c56f6040453d0e
https://github.com/juliangut/doctrine-manager-builder/blob/9c63bc689e4084f06be4d119f2c56f6040453d0e/src/RelationalBuilder.php#L456-L467
204,087
juliangut/doctrine-manager-builder
src/RelationalBuilder.php
RelationalBuilder.getCustomStringFunctions
protected function getCustomStringFunctions() { $functions = (array) $this->getOption('custom_string_functions'); return array_filter( $functions, function ($name) { return is_string($name); }, ARRAY_FILTER_USE_KEY ); }
php
protected function getCustomStringFunctions() { $functions = (array) $this->getOption('custom_string_functions'); return array_filter( $functions, function ($name) { return is_string($name); }, ARRAY_FILTER_USE_KEY ); }
[ "protected", "function", "getCustomStringFunctions", "(", ")", "{", "$", "functions", "=", "(", "array", ")", "$", "this", "->", "getOption", "(", "'custom_string_functions'", ")", ";", "return", "array_filter", "(", "$", "functions", ",", "function", "(", "$"...
Retrieve custom DQL string functions. @return array
[ "Retrieve", "custom", "DQL", "string", "functions", "." ]
9c63bc689e4084f06be4d119f2c56f6040453d0e
https://github.com/juliangut/doctrine-manager-builder/blob/9c63bc689e4084f06be4d119f2c56f6040453d0e/src/RelationalBuilder.php#L474-L485
204,088
juliangut/doctrine-manager-builder
src/RelationalBuilder.php
RelationalBuilder.getCustomNumericFunctions
protected function getCustomNumericFunctions() { $functions = (array) $this->getOption('custom_numeric_functions'); return array_filter( $functions, function ($name) { return is_string($name); }, ARRAY_FILTER_USE_KEY ); }
php
protected function getCustomNumericFunctions() { $functions = (array) $this->getOption('custom_numeric_functions'); return array_filter( $functions, function ($name) { return is_string($name); }, ARRAY_FILTER_USE_KEY ); }
[ "protected", "function", "getCustomNumericFunctions", "(", ")", "{", "$", "functions", "=", "(", "array", ")", "$", "this", "->", "getOption", "(", "'custom_numeric_functions'", ")", ";", "return", "array_filter", "(", "$", "functions", ",", "function", "(", "...
Retrieve custom DQL numeric functions. @return array
[ "Retrieve", "custom", "DQL", "numeric", "functions", "." ]
9c63bc689e4084f06be4d119f2c56f6040453d0e
https://github.com/juliangut/doctrine-manager-builder/blob/9c63bc689e4084f06be4d119f2c56f6040453d0e/src/RelationalBuilder.php#L492-L503
204,089
juliangut/doctrine-manager-builder
src/RelationalBuilder.php
RelationalBuilder.getCustomDateTimeFunctions
protected function getCustomDateTimeFunctions() { $functions = (array) $this->getOption('custom_datetime_functions'); return array_filter( $functions, function ($name) { return is_string($name); }, ARRAY_FILTER_USE_KEY ); }
php
protected function getCustomDateTimeFunctions() { $functions = (array) $this->getOption('custom_datetime_functions'); return array_filter( $functions, function ($name) { return is_string($name); }, ARRAY_FILTER_USE_KEY ); }
[ "protected", "function", "getCustomDateTimeFunctions", "(", ")", "{", "$", "functions", "=", "(", "array", ")", "$", "this", "->", "getOption", "(", "'custom_datetime_functions'", ")", ";", "return", "array_filter", "(", "$", "functions", ",", "function", "(", ...
Retrieve custom DQL date time functions. @return array
[ "Retrieve", "custom", "DQL", "date", "time", "functions", "." ]
9c63bc689e4084f06be4d119f2c56f6040453d0e
https://github.com/juliangut/doctrine-manager-builder/blob/9c63bc689e4084f06be4d119f2c56f6040453d0e/src/RelationalBuilder.php#L510-L521
204,090
juliangut/doctrine-manager-builder
src/RelationalBuilder.php
RelationalBuilder.getCustomTypes
protected function getCustomTypes() { $types = (array) $this->getOption('custom_types'); return array_filter( $types, function ($name) { return is_string($name); }, ARRAY_FILTER_USE_KEY ); }
php
protected function getCustomTypes() { $types = (array) $this->getOption('custom_types'); return array_filter( $types, function ($name) { return is_string($name); }, ARRAY_FILTER_USE_KEY ); }
[ "protected", "function", "getCustomTypes", "(", ")", "{", "$", "types", "=", "(", "array", ")", "$", "this", "->", "getOption", "(", "'custom_types'", ")", ";", "return", "array_filter", "(", "$", "types", ",", "function", "(", "$", "name", ")", "{", "...
Retrieve custom DBAL types. @return array
[ "Retrieve", "custom", "DBAL", "types", "." ]
9c63bc689e4084f06be4d119f2c56f6040453d0e
https://github.com/juliangut/doctrine-manager-builder/blob/9c63bc689e4084f06be4d119f2c56f6040453d0e/src/RelationalBuilder.php#L528-L539
204,091
juliangut/doctrine-manager-builder
src/RelationalBuilder.php
RelationalBuilder.getCustomMappingTypes
protected function getCustomMappingTypes() { $mappingTypes = (array) $this->getOption('custom_mapping_types'); return array_filter( $mappingTypes, function ($name) { return is_string($name); }, ARRAY_FILTER_USE_KEY ); }
php
protected function getCustomMappingTypes() { $mappingTypes = (array) $this->getOption('custom_mapping_types'); return array_filter( $mappingTypes, function ($name) { return is_string($name); }, ARRAY_FILTER_USE_KEY ); }
[ "protected", "function", "getCustomMappingTypes", "(", ")", "{", "$", "mappingTypes", "=", "(", "array", ")", "$", "this", "->", "getOption", "(", "'custom_mapping_types'", ")", ";", "return", "array_filter", "(", "$", "mappingTypes", ",", "function", "(", "$"...
Retrieve custom DBAL mapping types. @return array
[ "Retrieve", "custom", "DBAL", "mapping", "types", "." ]
9c63bc689e4084f06be4d119f2c56f6040453d0e
https://github.com/juliangut/doctrine-manager-builder/blob/9c63bc689e4084f06be4d119f2c56f6040453d0e/src/RelationalBuilder.php#L546-L557
204,092
juliangut/doctrine-manager-builder
src/RelationalBuilder.php
RelationalBuilder.getCustomFilters
protected function getCustomFilters() { $filters = (array) $this->getOption('custom_filters'); return array_filter( $filters, function ($name) { return is_string($name); }, ARRAY_FILTER_USE_KEY ); }
php
protected function getCustomFilters() { $filters = (array) $this->getOption('custom_filters'); return array_filter( $filters, function ($name) { return is_string($name); }, ARRAY_FILTER_USE_KEY ); }
[ "protected", "function", "getCustomFilters", "(", ")", "{", "$", "filters", "=", "(", "array", ")", "$", "this", "->", "getOption", "(", "'custom_filters'", ")", ";", "return", "array_filter", "(", "$", "filters", ",", "function", "(", "$", "name", ")", ...
Get custom registered filters. @return array
[ "Get", "custom", "registered", "filters", "." ]
9c63bc689e4084f06be4d119f2c56f6040453d0e
https://github.com/juliangut/doctrine-manager-builder/blob/9c63bc689e4084f06be4d119f2c56f6040453d0e/src/RelationalBuilder.php#L564-L575
204,093
juliangut/doctrine-manager-builder
src/RelationalBuilder.php
RelationalBuilder.getConsoleHelperSet
protected function getConsoleHelperSet() { /* @var EntityManager $entityManager */ $entityManager = $this->getManager(); return new HelperSet([ 'db' => new ConnectionHelper($entityManager->getConnection()), 'em' => new EntityManagerHelper($entityManager), ]);...
php
protected function getConsoleHelperSet() { /* @var EntityManager $entityManager */ $entityManager = $this->getManager(); return new HelperSet([ 'db' => new ConnectionHelper($entityManager->getConnection()), 'em' => new EntityManagerHelper($entityManager), ]);...
[ "protected", "function", "getConsoleHelperSet", "(", ")", "{", "/* @var EntityManager $entityManager */", "$", "entityManager", "=", "$", "this", "->", "getManager", "(", ")", ";", "return", "new", "HelperSet", "(", "[", "'db'", "=>", "new", "ConnectionHelper", "(...
Get console helper set. @return \Symfony\Component\Console\Helper\HelperSet
[ "Get", "console", "helper", "set", "." ]
9c63bc689e4084f06be4d119f2c56f6040453d0e
https://github.com/juliangut/doctrine-manager-builder/blob/9c63bc689e4084f06be4d119f2c56f6040453d0e/src/RelationalBuilder.php#L651-L660
204,094
Phauthentic/password-hashers
src/AbstractPasswordHasher.php
AbstractPasswordHasher.setSalt
public function setSalt(string $salt, string $position = self::SALT_AFTER): self { $this->checkSaltPositionArgument($position); $this->salt = $salt; $this->saltPosition = $position; return $this; }
php
public function setSalt(string $salt, string $position = self::SALT_AFTER): self { $this->checkSaltPositionArgument($position); $this->salt = $salt; $this->saltPosition = $position; return $this; }
[ "public", "function", "setSalt", "(", "string", "$", "salt", ",", "string", "$", "position", "=", "self", "::", "SALT_AFTER", ")", ":", "self", "{", "$", "this", "->", "checkSaltPositionArgument", "(", "$", "position", ")", ";", "$", "this", "->", "salt"...
Sets the salt if any was used @return $this
[ "Sets", "the", "salt", "if", "any", "was", "used" ]
c0679d51c941d8808ae143a20e63daab2d4388ec
https://github.com/Phauthentic/password-hashers/blob/c0679d51c941d8808ae143a20e63daab2d4388ec/src/AbstractPasswordHasher.php#L46-L53
204,095
Phauthentic/password-hashers
src/AbstractPasswordHasher.php
AbstractPasswordHasher.checkSaltPositionArgument
protected function checkSaltPositionArgument($position): void { if (!in_array($position, [self::SALT_BEFORE, self::SALT_AFTER])) { throw new InvalidArgumentException(sprintf( '`%s` is an invalud argument, it has to be `` or ``', $position, self::SA...
php
protected function checkSaltPositionArgument($position): void { if (!in_array($position, [self::SALT_BEFORE, self::SALT_AFTER])) { throw new InvalidArgumentException(sprintf( '`%s` is an invalud argument, it has to be `` or ``', $position, self::SA...
[ "protected", "function", "checkSaltPositionArgument", "(", "$", "position", ")", ":", "void", "{", "if", "(", "!", "in_array", "(", "$", "position", ",", "[", "self", "::", "SALT_BEFORE", ",", "self", "::", "SALT_AFTER", "]", ")", ")", "{", "throw", "new...
Checks the salt position argument @return void
[ "Checks", "the", "salt", "position", "argument" ]
c0679d51c941d8808ae143a20e63daab2d4388ec
https://github.com/Phauthentic/password-hashers/blob/c0679d51c941d8808ae143a20e63daab2d4388ec/src/AbstractPasswordHasher.php#L60-L70
204,096
PhoxPHP/Glider
src/Platform/Pdo/PdoProvider.php
PdoProvider.queryBuilder
public function queryBuilder(ConnectionInterface $connection, String $connectionId=null) : QueryBuilderProvider { return new PdoQueryBuilder($connection, $connectionId); }
php
public function queryBuilder(ConnectionInterface $connection, String $connectionId=null) : QueryBuilderProvider { return new PdoQueryBuilder($connection, $connectionId); }
[ "public", "function", "queryBuilder", "(", "ConnectionInterface", "$", "connection", ",", "String", "$", "connectionId", "=", "null", ")", ":", "QueryBuilderProvider", "{", "return", "new", "PdoQueryBuilder", "(", "$", "connection", ",", "$", "connectionId", ")", ...
We're using pdo query builder. {@inheritDoc}
[ "We", "re", "using", "pdo", "query", "builder", "." ]
17aaf3b7bb6e70ea3ae1f04e30a7690e884bf042
https://github.com/PhoxPHP/Glider/blob/17aaf3b7bb6e70ea3ae1f04e30a7690e884bf042/src/Platform/Pdo/PdoProvider.php#L99-L102
204,097
gplcart/file_manager
handlers/validators/Copy.php
Copy.validateDestinationNameCopy
protected function validateDestinationNameCopy() { $destination = $this->getSubmitted('destination'); if ($destination !== '' && preg_match('/^[\w-]+[\w-\/]*[\w-]+$|^[\w-]$/', $destination) !== 1) { $this->setErrorInvalid('destination', $this->translation->text('Destination')); ...
php
protected function validateDestinationNameCopy() { $destination = $this->getSubmitted('destination'); if ($destination !== '' && preg_match('/^[\w-]+[\w-\/]*[\w-]+$|^[\w-]$/', $destination) !== 1) { $this->setErrorInvalid('destination', $this->translation->text('Destination')); ...
[ "protected", "function", "validateDestinationNameCopy", "(", ")", "{", "$", "destination", "=", "$", "this", "->", "getSubmitted", "(", "'destination'", ")", ";", "if", "(", "$", "destination", "!==", "''", "&&", "preg_match", "(", "'/^[\\w-]+[\\w-\\/]*[\\w-]+$|^[...
Validates a directory name
[ "Validates", "a", "directory", "name" ]
45424e93eafea75d31af6410ac9cf110f08e500a
https://github.com/gplcart/file_manager/blob/45424e93eafea75d31af6410ac9cf110f08e500a/handlers/validators/Copy.php#L59-L66
204,098
gplcart/file_manager
handlers/validators/Copy.php
Copy.validateDestinationDirectoryCopy
protected function validateDestinationDirectoryCopy() { if ($this->isError()) { return null; } $initial_path = $this->scanner->getInitialPath(true); $directory = gplcart_path_normalize("$initial_path/" . $this->getSubmitted('destination')); if (!file_exists($dir...
php
protected function validateDestinationDirectoryCopy() { if ($this->isError()) { return null; } $initial_path = $this->scanner->getInitialPath(true); $directory = gplcart_path_normalize("$initial_path/" . $this->getSubmitted('destination')); if (!file_exists($dir...
[ "protected", "function", "validateDestinationDirectoryCopy", "(", ")", "{", "if", "(", "$", "this", "->", "isError", "(", ")", ")", "{", "return", "null", ";", "}", "$", "initial_path", "=", "$", "this", "->", "scanner", "->", "getInitialPath", "(", "true"...
Validates a destination directory @return bool
[ "Validates", "a", "destination", "directory" ]
45424e93eafea75d31af6410ac9cf110f08e500a
https://github.com/gplcart/file_manager/blob/45424e93eafea75d31af6410ac9cf110f08e500a/handlers/validators/Copy.php#L72-L98
204,099
gplcart/file_manager
handlers/validators/Copy.php
Copy.validateDestinationExistanceCopy
protected function validateDestinationExistanceCopy() { if ($this->isError()) { return null; } $destinations = array(); $directory = $this->getSubmitted('directory'); $error = null; foreach ((array) $this->getSubmitted('files') as $index => $file) { ...
php
protected function validateDestinationExistanceCopy() { if ($this->isError()) { return null; } $destinations = array(); $directory = $this->getSubmitted('directory'); $error = null; foreach ((array) $this->getSubmitted('files') as $index => $file) { ...
[ "protected", "function", "validateDestinationExistanceCopy", "(", ")", "{", "if", "(", "$", "this", "->", "isError", "(", ")", ")", "{", "return", "null", ";", "}", "$", "destinations", "=", "array", "(", ")", ";", "$", "directory", "=", "$", "this", "...
Validates file destinations @return boolean
[ "Validates", "file", "destinations" ]
45424e93eafea75d31af6410ac9cf110f08e500a
https://github.com/gplcart/file_manager/blob/45424e93eafea75d31af6410ac9cf110f08e500a/handlers/validators/Copy.php#L104-L139