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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
239,900 | Clastic/BackofficeBundle | Form/TabHelper.php | TabHelper.createTab | public function createTab($name, $label, $options = array())
{
$options = array_replace(
$options,
array(
'label' => $label,
'inherit_data' => true,
));
$tab = $this->formBuilder->create($name, TabsTabType::class, $options);
... | php | public function createTab($name, $label, $options = array())
{
$options = array_replace(
$options,
array(
'label' => $label,
'inherit_data' => true,
));
$tab = $this->formBuilder->create($name, TabsTabType::class, $options);
... | [
"public",
"function",
"createTab",
"(",
"$",
"name",
",",
"$",
"label",
",",
"$",
"options",
"=",
"array",
"(",
")",
")",
"{",
"$",
"options",
"=",
"array_replace",
"(",
"$",
"options",
",",
"array",
"(",
"'label'",
"=>",
"$",
"label",
",",
"'inherit... | Create a new tab and nest it under the tabs.
@param string $name
@param string $label
@param array $options
@return FormBuilderInterface The created tab. | [
"Create",
"a",
"new",
"tab",
"and",
"nest",
"it",
"under",
"the",
"tabs",
"."
] | f40b2589a56ef37507d22788c3e8faa996e71758 | https://github.com/Clastic/BackofficeBundle/blob/f40b2589a56ef37507d22788c3e8faa996e71758/Form/TabHelper.php#L54-L67 |
239,901 | mooti/framework | src/Application/Rest/BaseController.php | BaseController.render | public function render($content, Response $response)
{
$response->setStatusCode(Response::HTTP_OK);
$response->headers->set('Content-Type', 'application/json');
$response->setContent(json_encode($content));
return $response;
} | php | public function render($content, Response $response)
{
$response->setStatusCode(Response::HTTP_OK);
$response->headers->set('Content-Type', 'application/json');
$response->setContent(json_encode($content));
return $response;
} | [
"public",
"function",
"render",
"(",
"$",
"content",
",",
"Response",
"$",
"response",
")",
"{",
"$",
"response",
"->",
"setStatusCode",
"(",
"Response",
"::",
"HTTP_OK",
")",
";",
"$",
"response",
"->",
"headers",
"->",
"set",
"(",
"'Content-Type'",
",",
... | Renders any given content as a json string
@param mixed $content This can be serializable data type.
@param Response $response The response object
@return Response $response | [
"Renders",
"any",
"given",
"content",
"as",
"a",
"json",
"string"
] | 078da6699c5c6c7ac4e5a3d36751d645ad8aa93e | https://github.com/mooti/framework/blob/078da6699c5c6c7ac4e5a3d36751d645ad8aa93e/src/Application/Rest/BaseController.php#L32-L39 |
239,902 | magicphp/framework | src/magicphp/session.class.php | Session.Start | public static function Start($sName, $sSessionDiretory = null){
$oThis = self::CreateInstanceIfNotExists();
if(!empty($sName)){
$sName = md5($sName);
if(!is_null($sSessionDiretory)){
@session_save_path($sSessionDiretory);
... | php | public static function Start($sName, $sSessionDiretory = null){
$oThis = self::CreateInstanceIfNotExists();
if(!empty($sName)){
$sName = md5($sName);
if(!is_null($sSessionDiretory)){
@session_save_path($sSessionDiretory);
... | [
"public",
"static",
"function",
"Start",
"(",
"$",
"sName",
",",
"$",
"sSessionDiretory",
"=",
"null",
")",
"{",
"$",
"oThis",
"=",
"self",
"::",
"CreateInstanceIfNotExists",
"(",
")",
";",
"if",
"(",
"!",
"empty",
"(",
"$",
"sName",
")",
")",
"{",
"... | Function to start session
@static
@access public
@param string $sName Session name
@param string $sSessionDiretory Storage directory sessions
@return boolean | [
"Function",
"to",
"start",
"session"
] | 199934b61c46ec596c27d4fb0355b216dde51d58 | https://github.com/magicphp/framework/blob/199934b61c46ec596c27d4fb0355b216dde51d58/src/magicphp/session.class.php#L61-L134 |
239,903 | magicphp/framework | src/magicphp/session.class.php | Session.Login | public static function Login($mId, $sUsername, $sName, $iTimeout = 3600, $bRoot = false){
$oThis = self::CreateInstanceIfNotExists();
if($oThis->bStarted){
$iTimeout = time()+$iTimeout;
$oThis->aAuth = array("id" => $mId, "name" => $sName, "username" => $sUsernam... | php | public static function Login($mId, $sUsername, $sName, $iTimeout = 3600, $bRoot = false){
$oThis = self::CreateInstanceIfNotExists();
if($oThis->bStarted){
$iTimeout = time()+$iTimeout;
$oThis->aAuth = array("id" => $mId, "name" => $sName, "username" => $sUsernam... | [
"public",
"static",
"function",
"Login",
"(",
"$",
"mId",
",",
"$",
"sUsername",
",",
"$",
"sName",
",",
"$",
"iTimeout",
"=",
"3600",
",",
"$",
"bRoot",
"=",
"false",
")",
"{",
"$",
"oThis",
"=",
"self",
"::",
"CreateInstanceIfNotExists",
"(",
")",
... | Function to perform the login session
@static
@access public
@param mixed $mId User ID
@param string $sUsername Username
@param string $sName Name
@param integer $iTimeout Maximum time of permanence in the session
@param boolean $bRoot Defines the user as root
@return void | [
"Function",
"to",
"perform",
"the",
"login",
"session"
] | 199934b61c46ec596c27d4fb0355b216dde51d58 | https://github.com/magicphp/framework/blob/199934b61c46ec596c27d4fb0355b216dde51d58/src/magicphp/session.class.php#L160-L176 |
239,904 | magicphp/framework | src/magicphp/session.class.php | Session.Logout | public static function Logout(){
$oThis = self::CreateInstanceIfNotExists();
if($oThis->bStarted){
session_unset();
unset($_SESSION[$oThis->sName]["authentication"]);
unset($oThis->aAuth);
}
} | php | public static function Logout(){
$oThis = self::CreateInstanceIfNotExists();
if($oThis->bStarted){
session_unset();
unset($_SESSION[$oThis->sName]["authentication"]);
unset($oThis->aAuth);
}
} | [
"public",
"static",
"function",
"Logout",
"(",
")",
"{",
"$",
"oThis",
"=",
"self",
"::",
"CreateInstanceIfNotExists",
"(",
")",
";",
"if",
"(",
"$",
"oThis",
"->",
"bStarted",
")",
"{",
"session_unset",
"(",
")",
";",
"unset",
"(",
"$",
"_SESSION",
"[... | Function to logout
@static
@access public
@return void | [
"Function",
"to",
"logout"
] | 199934b61c46ec596c27d4fb0355b216dde51d58 | https://github.com/magicphp/framework/blob/199934b61c46ec596c27d4fb0355b216dde51d58/src/magicphp/session.class.php#L185-L193 |
239,905 | magicphp/framework | src/magicphp/session.class.php | Session.CheckAuthentication | public static function CheckAuthentication(){
$oThis = self::CreateInstanceIfNotExists();
$bReturn = ($oThis->bStarted) ? (!empty($oThis->aAuth["id"]) && !empty($oThis->aAuth["username"]) && ((intval($oThis->aAuth["timeout"]) > time()) || (intval($oThis->aAuth["timeout"]) <= 0))) : false;
... | php | public static function CheckAuthentication(){
$oThis = self::CreateInstanceIfNotExists();
$bReturn = ($oThis->bStarted) ? (!empty($oThis->aAuth["id"]) && !empty($oThis->aAuth["username"]) && ((intval($oThis->aAuth["timeout"]) > time()) || (intval($oThis->aAuth["timeout"]) <= 0))) : false;
... | [
"public",
"static",
"function",
"CheckAuthentication",
"(",
")",
"{",
"$",
"oThis",
"=",
"self",
"::",
"CreateInstanceIfNotExists",
"(",
")",
";",
"$",
"bReturn",
"=",
"(",
"$",
"oThis",
"->",
"bStarted",
")",
"?",
"(",
"!",
"empty",
"(",
"$",
"oThis",
... | Function to check the authentication session
@static
@access public
@return boolean | [
"Function",
"to",
"check",
"the",
"authentication",
"session"
] | 199934b61c46ec596c27d4fb0355b216dde51d58 | https://github.com/magicphp/framework/blob/199934b61c46ec596c27d4fb0355b216dde51d58/src/magicphp/session.class.php#L202-L206 |
239,906 | magicphp/framework | src/magicphp/session.class.php | Session.Has | public static function Has($sKey){
$oThis = self::CreateInstanceIfNotExists();
if($oThis->bStarted)
return array_key_exists($sKey, $_SESSION[$oThis->sName]);
else
return false;
} | php | public static function Has($sKey){
$oThis = self::CreateInstanceIfNotExists();
if($oThis->bStarted)
return array_key_exists($sKey, $_SESSION[$oThis->sName]);
else
return false;
} | [
"public",
"static",
"function",
"Has",
"(",
"$",
"sKey",
")",
"{",
"$",
"oThis",
"=",
"self",
"::",
"CreateInstanceIfNotExists",
"(",
")",
";",
"if",
"(",
"$",
"oThis",
"->",
"bStarted",
")",
"return",
"array_key_exists",
"(",
"$",
"sKey",
",",
"$",
"_... | Function to check existence of record in the session
@static
@param string $sKey Search Key
@return boolean | [
"Function",
"to",
"check",
"existence",
"of",
"record",
"in",
"the",
"session"
] | 199934b61c46ec596c27d4fb0355b216dde51d58 | https://github.com/magicphp/framework/blob/199934b61c46ec596c27d4fb0355b216dde51d58/src/magicphp/session.class.php#L215-L222 |
239,907 | magicphp/framework | src/magicphp/session.class.php | Session.Set | public static function Set($sKey, $mValue){
$oThis = self::CreateInstanceIfNotExists();
if($oThis->bStarted){
if($sKey != "name" && $sKey != "id" && $sKey != "authentication"){
$_SESSION[$oThis->sName][$sKey] = $mValue;
return true;
... | php | public static function Set($sKey, $mValue){
$oThis = self::CreateInstanceIfNotExists();
if($oThis->bStarted){
if($sKey != "name" && $sKey != "id" && $sKey != "authentication"){
$_SESSION[$oThis->sName][$sKey] = $mValue;
return true;
... | [
"public",
"static",
"function",
"Set",
"(",
"$",
"sKey",
",",
"$",
"mValue",
")",
"{",
"$",
"oThis",
"=",
"self",
"::",
"CreateInstanceIfNotExists",
"(",
")",
";",
"if",
"(",
"$",
"oThis",
"->",
"bStarted",
")",
"{",
"if",
"(",
"$",
"sKey",
"!=",
"... | Function to set data in a session
@static
@access public
@param string $sKey Search Key
@param mixed $mValue Data to be stored
@return boolean | [
"Function",
"to",
"set",
"data",
"in",
"a",
"session"
] | 199934b61c46ec596c27d4fb0355b216dde51d58 | https://github.com/magicphp/framework/blob/199934b61c46ec596c27d4fb0355b216dde51d58/src/magicphp/session.class.php#L233-L248 |
239,908 | magicphp/framework | src/magicphp/session.class.php | Session.Get | public static function Get($sKey){
$oThis = self::CreateInstanceIfNotExists();
if($oThis->bStarted)
return (!empty($_SESSION[$oThis->sName][$sKey])) ? $_SESSION[$oThis->sName][$sKey] : false;
else
return null;
} | php | public static function Get($sKey){
$oThis = self::CreateInstanceIfNotExists();
if($oThis->bStarted)
return (!empty($_SESSION[$oThis->sName][$sKey])) ? $_SESSION[$oThis->sName][$sKey] : false;
else
return null;
} | [
"public",
"static",
"function",
"Get",
"(",
"$",
"sKey",
")",
"{",
"$",
"oThis",
"=",
"self",
"::",
"CreateInstanceIfNotExists",
"(",
")",
";",
"if",
"(",
"$",
"oThis",
"->",
"bStarted",
")",
"return",
"(",
"!",
"empty",
"(",
"$",
"_SESSION",
"[",
"$... | Function to return information stored in session
@static
@access public
@param string $sKey Search Key
@return mixed | [
"Function",
"to",
"return",
"information",
"stored",
"in",
"session"
] | 199934b61c46ec596c27d4fb0355b216dde51d58 | https://github.com/magicphp/framework/blob/199934b61c46ec596c27d4fb0355b216dde51d58/src/magicphp/session.class.php#L258-L265 |
239,909 | indigophp-archive/codeception-fuel-module | fuel/fuel/core/classes/cache.php | Cache.forge | public static function forge($identifier, $config = array())
{
// load the default config
$defaults = \Config::get('cache', array());
// $config can be either an array of config settings or the name of the storage driver
if ( ! empty($config) and ! is_array($config) and ! is_null($config))
{
$config = ar... | php | public static function forge($identifier, $config = array())
{
// load the default config
$defaults = \Config::get('cache', array());
// $config can be either an array of config settings or the name of the storage driver
if ( ! empty($config) and ! is_array($config) and ! is_null($config))
{
$config = ar... | [
"public",
"static",
"function",
"forge",
"(",
"$",
"identifier",
",",
"$",
"config",
"=",
"array",
"(",
")",
")",
"{",
"// load the default config",
"$",
"defaults",
"=",
"\\",
"Config",
"::",
"get",
"(",
"'cache'",
",",
"array",
"(",
")",
")",
";",
"/... | Creates a new cache instance.
@param mixed The identifier of the cache, can be anything but empty
@param array|string Either an array of settings or the storage driver to be used
@return Cache_Storage_Driver The new cache object | [
"Creates",
"a",
"new",
"cache",
"instance",
"."
] | 0973b7cbd540a0e89cc5bb7af94627f77f09bf49 | https://github.com/indigophp-archive/codeception-fuel-module/blob/0973b7cbd540a0e89cc5bb7af94627f77f09bf49/fuel/fuel/core/classes/cache.php#L38-L64 |
239,910 | FlexPress/component-routing | src/FlexPress/Components/Routing/Router.php | Router.route | public function route()
{
$this->routes->rewind();
while ($this->routes->valid()) {
$route = $this->routes->current();
if ($route->run()) {
return;
}
$this->routes->next();
}
throw new \RuntimeException("FlexPress route... | php | public function route()
{
$this->routes->rewind();
while ($this->routes->valid()) {
$route = $this->routes->current();
if ($route->run()) {
return;
}
$this->routes->next();
}
throw new \RuntimeException("FlexPress route... | [
"public",
"function",
"route",
"(",
")",
"{",
"$",
"this",
"->",
"routes",
"->",
"rewind",
"(",
")",
";",
"while",
"(",
"$",
"this",
"->",
"routes",
"->",
"valid",
"(",
")",
")",
"{",
"$",
"route",
"=",
"$",
"this",
"->",
"routes",
"->",
"current... | Runs through all the routes and runs them
@author Tim Perry | [
"Runs",
"through",
"all",
"the",
"routes",
"and",
"runs",
"them"
] | c1a0c6f1f4522a54e21ee18a8b24adfc1cc28f56 | https://github.com/FlexPress/component-routing/blob/c1a0c6f1f4522a54e21ee18a8b24adfc1cc28f56/src/FlexPress/Components/Routing/Router.php#L37-L50 |
239,911 | FlexPress/component-routing | src/FlexPress/Components/Routing/Router.php | Router.replaceFilterFunctions | protected function replaceFilterFunctions(array $conditions)
{
foreach ($conditions as $key => $condition) {
if (is_string($condition)) {
$conditions[$key] = $this->filters[$condition];
}
}
return $conditions;
} | php | protected function replaceFilterFunctions(array $conditions)
{
foreach ($conditions as $key => $condition) {
if (is_string($condition)) {
$conditions[$key] = $this->filters[$condition];
}
}
return $conditions;
} | [
"protected",
"function",
"replaceFilterFunctions",
"(",
"array",
"$",
"conditions",
")",
"{",
"foreach",
"(",
"$",
"conditions",
"as",
"$",
"key",
"=>",
"$",
"condition",
")",
"{",
"if",
"(",
"is_string",
"(",
"$",
"condition",
")",
")",
"{",
"$",
"condi... | Replaces the string reference
@param $conditions
@return string
@author Tim Perry | [
"Replaces",
"the",
"string",
"reference"
] | c1a0c6f1f4522a54e21ee18a8b24adfc1cc28f56 | https://github.com/FlexPress/component-routing/blob/c1a0c6f1f4522a54e21ee18a8b24adfc1cc28f56/src/FlexPress/Components/Routing/Router.php#L94-L107 |
239,912 | seanmorris/theme | source/Theme.php | Theme.resolveList | public static function resolveList($renderKey, $stopClass = null, $type = null)
{
$viewListList = static::resolve($renderKey, $stopClass, $type);
$finalList = [];
foreach($viewListList as $theme => $viewList)
{
foreach($viewList as $view)
{
if(is_array($view))
{
$finalList = array_merge($fi... | php | public static function resolveList($renderKey, $stopClass = null, $type = null)
{
$viewListList = static::resolve($renderKey, $stopClass, $type);
$finalList = [];
foreach($viewListList as $theme => $viewList)
{
foreach($viewList as $view)
{
if(is_array($view))
{
$finalList = array_merge($fi... | [
"public",
"static",
"function",
"resolveList",
"(",
"$",
"renderKey",
",",
"$",
"stopClass",
"=",
"null",
",",
"$",
"type",
"=",
"null",
")",
"{",
"$",
"viewListList",
"=",
"static",
"::",
"resolve",
"(",
"$",
"renderKey",
",",
"$",
"stopClass",
",",
"... | Resolves a list of classes or other string values
for a given renderKey.
@param string $renderKey string to resolve values for.
@param string $stopClass stop searching the calling context if this class is found.
@param string $type type of list to resolve.
@return list of string classes or string values mapped from r... | [
"Resolves",
"a",
"list",
"of",
"classes",
"or",
"other",
"string",
"values",
"for",
"a",
"given",
"renderKey",
"."
] | 97554e153312026c7db4af8ae3653d20fe9d117d | https://github.com/seanmorris/theme/blob/97554e153312026c7db4af8ae3653d20fe9d117d/source/Theme.php#L35-L56 |
239,913 | seanmorris/theme | source/Theme.php | Theme.resolveFirst | public static function resolveFirst($renderKey, $stopClass = null, $type = null)
{
$viewListList = static::resolve($renderKey, $stopClass, $type);
$viewList = current($viewListList);
if(!$viewList)
{
return;
}
$view = current($viewList);
return $view;
} | php | public static function resolveFirst($renderKey, $stopClass = null, $type = null)
{
$viewListList = static::resolve($renderKey, $stopClass, $type);
$viewList = current($viewListList);
if(!$viewList)
{
return;
}
$view = current($viewList);
return $view;
} | [
"public",
"static",
"function",
"resolveFirst",
"(",
"$",
"renderKey",
",",
"$",
"stopClass",
"=",
"null",
",",
"$",
"type",
"=",
"null",
")",
"{",
"$",
"viewListList",
"=",
"static",
"::",
"resolve",
"(",
"$",
"renderKey",
",",
"$",
"stopClass",
",",
... | Resolves a single class or other string value
for a given renderKey.
@param string $renderKey string to resolve values for.
@param string $stopClass stop searching the calling context if this class is found.
@param string $type type of list to resolve.
@return string class or string value mapped from renderKey | [
"Resolves",
"a",
"single",
"class",
"or",
"other",
"string",
"value",
"for",
"a",
"given",
"renderKey",
"."
] | 97554e153312026c7db4af8ae3653d20fe9d117d | https://github.com/seanmorris/theme/blob/97554e153312026c7db4af8ae3653d20fe9d117d/source/Theme.php#L68-L81 |
239,914 | seanmorris/theme | source/Theme.php | Theme.render | public static function render($object, array $vars = [], $type = null)
{
if($view = static::resolveFirst($object, null, $type))
{
return new $view(['object' => $object] + $vars);
}
} | php | public static function render($object, array $vars = [], $type = null)
{
if($view = static::resolveFirst($object, null, $type))
{
return new $view(['object' => $object] + $vars);
}
} | [
"public",
"static",
"function",
"render",
"(",
"$",
"object",
",",
"array",
"$",
"vars",
"=",
"[",
"]",
",",
"$",
"type",
"=",
"null",
")",
"{",
"if",
"(",
"$",
"view",
"=",
"static",
"::",
"resolveFirst",
"(",
"$",
"object",
",",
"null",
",",
"$... | Render a given object with a view provided by the theme.
@param object $renderKey string to resolve values for.
@param array $vars additional variables passed on to view
@param type string type of view to return
@return object View object ready to be rendered.. | [
"Render",
"a",
"given",
"object",
"with",
"a",
"view",
"provided",
"by",
"the",
"theme",
"."
] | 97554e153312026c7db4af8ae3653d20fe9d117d | https://github.com/seanmorris/theme/blob/97554e153312026c7db4af8ae3653d20fe9d117d/source/Theme.php#L258-L264 |
239,915 | seanmorris/theme | source/Theme.php | Theme.wrap | public static function wrap($body, $vars = [])
{
if(isset(static::$wrap))
{
if($body instanceof \SeanMorris\Theme\View)
{
$body = $body->render();
}
foreach(static::$wrap as $wrapper)
{
$body = new $wrapper(['body' => $body] + $vars);
}
}
return $body;
} | php | public static function wrap($body, $vars = [])
{
if(isset(static::$wrap))
{
if($body instanceof \SeanMorris\Theme\View)
{
$body = $body->render();
}
foreach(static::$wrap as $wrapper)
{
$body = new $wrapper(['body' => $body] + $vars);
}
}
return $body;
} | [
"public",
"static",
"function",
"wrap",
"(",
"$",
"body",
",",
"$",
"vars",
"=",
"[",
"]",
")",
"{",
"if",
"(",
"isset",
"(",
"static",
"::",
"$",
"wrap",
")",
")",
"{",
"if",
"(",
"$",
"body",
"instanceof",
"\\",
"SeanMorris",
"\\",
"Theme",
"\\... | Wrap text with the default trim.
@param string $body Value to be wrapped.
@return object Wrap view with body. | [
"Wrap",
"text",
"with",
"the",
"default",
"trim",
"."
] | 97554e153312026c7db4af8ae3653d20fe9d117d | https://github.com/seanmorris/theme/blob/97554e153312026c7db4af8ae3653d20fe9d117d/source/Theme.php#L289-L305 |
239,916 | seanmorris/theme | source/Theme.php | Theme.selectType | protected static function selectType($views, $type)
{
if(!is_array($views))
{
return $views;
}
if($type === FALSE)
{
return $views;
}
if(!$type)
{
return current($views);
}
if(!isset($views[$type]))
{
return null;
}
return $views[$type];
} | php | protected static function selectType($views, $type)
{
if(!is_array($views))
{
return $views;
}
if($type === FALSE)
{
return $views;
}
if(!$type)
{
return current($views);
}
if(!isset($views[$type]))
{
return null;
}
return $views[$type];
} | [
"protected",
"static",
"function",
"selectType",
"(",
"$",
"views",
",",
"$",
"type",
")",
"{",
"if",
"(",
"!",
"is_array",
"(",
"$",
"views",
")",
")",
"{",
"return",
"$",
"views",
";",
"}",
"if",
"(",
"$",
"type",
"===",
"FALSE",
")",
"{",
"ret... | Selects view type when provided and available
@param array|object|bool $views List of views by type if available, single view class, or FALSE if no view found.
@param string $type Type of view to select.
@return object View object ready to be rendered.. | [
"Selects",
"view",
"type",
"when",
"provided",
"and",
"available"
] | 97554e153312026c7db4af8ae3653d20fe9d117d | https://github.com/seanmorris/theme/blob/97554e153312026c7db4af8ae3653d20fe9d117d/source/Theme.php#L316-L339 |
239,917 | spoom-php/sql | src/extension/Expression/Statement.php | Statement.supportFilter | protected function supportFilter( array $list = [], bool $enable = true ) {
foreach( $list as $type ) {
if( !$enable ) unset( $this->_filter[ $type ] );
else if( !isset( $this->_filter[ $type ] ) ) $this->_filter[ $type ] = [];
}
return $this;
} | php | protected function supportFilter( array $list = [], bool $enable = true ) {
foreach( $list as $type ) {
if( !$enable ) unset( $this->_filter[ $type ] );
else if( !isset( $this->_filter[ $type ] ) ) $this->_filter[ $type ] = [];
}
return $this;
} | [
"protected",
"function",
"supportFilter",
"(",
"array",
"$",
"list",
"=",
"[",
"]",
",",
"bool",
"$",
"enable",
"=",
"true",
")",
"{",
"foreach",
"(",
"$",
"list",
"as",
"$",
"type",
")",
"{",
"if",
"(",
"!",
"$",
"enable",
")",
"unset",
"(",
"$"... | Add or remove support for a filter type
@param array $list List of types
@param bool $enable
@return $this | [
"Add",
"or",
"remove",
"support",
"for",
"a",
"filter",
"type"
] | 575440c4909ee12851f7d208f4a3998fc4c26f37 | https://github.com/spoom-php/sql/blob/575440c4909ee12851f7d208f4a3998fc4c26f37/src/extension/Expression/Statement.php#L427-L434 |
239,918 | spoom-php/sql | src/extension/Expression/Statement.php | Statement.supportCustom | protected function supportCustom( array $list = [], bool $enable = true ) {
foreach( $list as $name ) {
if( !$enable ) unset( $this->_custom[ $name ] );
else if( !isset( $this->_custom[ $name ] ) ) $this->_custom[ $name ] = [];
}
return $this;
} | php | protected function supportCustom( array $list = [], bool $enable = true ) {
foreach( $list as $name ) {
if( !$enable ) unset( $this->_custom[ $name ] );
else if( !isset( $this->_custom[ $name ] ) ) $this->_custom[ $name ] = [];
}
return $this;
} | [
"protected",
"function",
"supportCustom",
"(",
"array",
"$",
"list",
"=",
"[",
"]",
",",
"bool",
"$",
"enable",
"=",
"true",
")",
"{",
"foreach",
"(",
"$",
"list",
"as",
"$",
"name",
")",
"{",
"if",
"(",
"!",
"$",
"enable",
")",
"unset",
"(",
"$"... | Add or remove support for a custom
@param array $list List of customs
@param bool $enable
@return $this | [
"Add",
"or",
"remove",
"support",
"for",
"a",
"custom"
] | 575440c4909ee12851f7d208f4a3998fc4c26f37 | https://github.com/spoom-php/sql/blob/575440c4909ee12851f7d208f4a3998fc4c26f37/src/extension/Expression/Statement.php#L443-L450 |
239,919 | leodido/conversio | library/Conversion.php | Conversion.setAdapter | public function setAdapter($adapter)
{
if (!is_string($adapter) && !$adapter instanceof ConversionAlgorithmInterface) {
throw new Exception\InvalidArgumentException(sprintf(
'"%s" expects a string or an instance of ConversionAlgorithmInterface; received "%s"',
__M... | php | public function setAdapter($adapter)
{
if (!is_string($adapter) && !$adapter instanceof ConversionAlgorithmInterface) {
throw new Exception\InvalidArgumentException(sprintf(
'"%s" expects a string or an instance of ConversionAlgorithmInterface; received "%s"',
__M... | [
"public",
"function",
"setAdapter",
"(",
"$",
"adapter",
")",
"{",
"if",
"(",
"!",
"is_string",
"(",
"$",
"adapter",
")",
"&&",
"!",
"$",
"adapter",
"instanceof",
"ConversionAlgorithmInterface",
")",
"{",
"throw",
"new",
"Exception",
"\\",
"InvalidArgumentExce... | Sets conversion adapter
@param string|ConversionAlgorithmInterface $adapter Adapter to use
@return $this
@throws Exception\InvalidArgumentException
@throws Exception\RuntimeException | [
"Sets",
"conversion",
"adapter"
] | ebbb626b0cf2a44729af6d46d753b5a4b06d9835 | https://github.com/leodido/conversio/blob/ebbb626b0cf2a44729af6d46d753b5a4b06d9835/library/Conversion.php#L62-L91 |
239,920 | leodido/conversio | library/Conversion.php | Conversion.getAdapter | public function getAdapter()
{
if (!$this->adapter) {
throw new Exception\RuntimeException(sprintf(
'"%s" unable to load adapter; adapter not found',
__METHOD__
));
}
if (method_exists($this->adapter, 'setOptions')) {
$this-... | php | public function getAdapter()
{
if (!$this->adapter) {
throw new Exception\RuntimeException(sprintf(
'"%s" unable to load adapter; adapter not found',
__METHOD__
));
}
if (method_exists($this->adapter, 'setOptions')) {
$this-... | [
"public",
"function",
"getAdapter",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"adapter",
")",
"{",
"throw",
"new",
"Exception",
"\\",
"RuntimeException",
"(",
"sprintf",
"(",
"'\"%s\" unable to load adapter; adapter not found'",
",",
"__METHOD__",
")",
"... | Returns the current adapter
@return ConversionAlgorithmInterface
@throws Exception\RuntimeException | [
"Returns",
"the",
"current",
"adapter"
] | ebbb626b0cf2a44729af6d46d753b5a4b06d9835 | https://github.com/leodido/conversio/blob/ebbb626b0cf2a44729af6d46d753b5a4b06d9835/library/Conversion.php#L99-L112 |
239,921 | leodido/conversio | library/Conversion.php | Conversion.setAdapterOptions | public function setAdapterOptions($options)
{
if (!is_array($options) && !$options instanceof AbstractOptions) {
throw new Exception\InvalidArgumentException(sprintf(
'"%s" expects an array or a valid instance of "%s"; received "%s"',
__METHOD__,
'... | php | public function setAdapterOptions($options)
{
if (!is_array($options) && !$options instanceof AbstractOptions) {
throw new Exception\InvalidArgumentException(sprintf(
'"%s" expects an array or a valid instance of "%s"; received "%s"',
__METHOD__,
'... | [
"public",
"function",
"setAdapterOptions",
"(",
"$",
"options",
")",
"{",
"if",
"(",
"!",
"is_array",
"(",
"$",
"options",
")",
"&&",
"!",
"$",
"options",
"instanceof",
"AbstractOptions",
")",
"{",
"throw",
"new",
"Exception",
"\\",
"InvalidArgumentException",... | Set adapter options
@param array|AbstractOptions $options
@return $this | [
"Set",
"adapter",
"options"
] | ebbb626b0cf2a44729af6d46d753b5a4b06d9835 | https://github.com/leodido/conversio/blob/ebbb626b0cf2a44729af6d46d753b5a4b06d9835/library/Conversion.php#L130-L144 |
239,922 | leodido/conversio | library/Conversion.php | Conversion.getAbstractOptions | protected function getAbstractOptions()
{
$optClass = self::getOptionsFullQualifiedClassName($this->adapter);
// Does the option class exist?
if (!class_exists($optClass)) {
throw new Exception\DomainException(
sprintf(
'"%s" expects that an op... | php | protected function getAbstractOptions()
{
$optClass = self::getOptionsFullQualifiedClassName($this->adapter);
// Does the option class exist?
if (!class_exists($optClass)) {
throw new Exception\DomainException(
sprintf(
'"%s" expects that an op... | [
"protected",
"function",
"getAbstractOptions",
"(",
")",
"{",
"$",
"optClass",
"=",
"self",
"::",
"getOptionsFullQualifiedClassName",
"(",
"$",
"this",
"->",
"adapter",
")",
";",
"// Does the option class exist?",
"if",
"(",
"!",
"class_exists",
"(",
"$",
"optClas... | Instantiate and retrieve the options of the current adapter
It also checks that an appropriate options class exists.
@return AbstractOptions | [
"Instantiate",
"and",
"retrieve",
"the",
"options",
"of",
"the",
"current",
"adapter"
] | ebbb626b0cf2a44729af6d46d753b5a4b06d9835 | https://github.com/leodido/conversio/blob/ebbb626b0cf2a44729af6d46d753b5a4b06d9835/library/Conversion.php#L176-L199 |
239,923 | leodido/conversio | library/Conversion.php | Conversion.getOptions | public function getOptions($option = null)
{
$this->getAdapterOptions();
if ($option !== null) {
if (!isset($this->options[$option])) {
throw new Exception\RuntimeException(sprintf(
'Options "%s" not found',
$option
... | php | public function getOptions($option = null)
{
$this->getAdapterOptions();
if ($option !== null) {
if (!isset($this->options[$option])) {
throw new Exception\RuntimeException(sprintf(
'Options "%s" not found',
$option
... | [
"public",
"function",
"getOptions",
"(",
"$",
"option",
"=",
"null",
")",
"{",
"$",
"this",
"->",
"getAdapterOptions",
"(",
")",
";",
"if",
"(",
"$",
"option",
"!==",
"null",
")",
"{",
"if",
"(",
"!",
"isset",
"(",
"$",
"this",
"->",
"options",
"["... | Get individual or all options from underlying adapter options object
@param string|null $option
@return mixed|array | [
"Get",
"individual",
"or",
"all",
"options",
"from",
"underlying",
"adapter",
"options",
"object"
] | ebbb626b0cf2a44729af6d46d753b5a4b06d9835 | https://github.com/leodido/conversio/blob/ebbb626b0cf2a44729af6d46d753b5a4b06d9835/library/Conversion.php#L235-L248 |
239,924 | leodido/conversio | library/Conversion.php | Conversion.getOptionsFullQualifiedClassName | public static function getOptionsFullQualifiedClassName($adapter)
{
if (!$adapter) {
throw new Exception\InvalidArgumentException(sprintf(
'"%s" unable to load adapter; adapter not found',
__METHOD__
));
}
if (!$adapter instanceof Conve... | php | public static function getOptionsFullQualifiedClassName($adapter)
{
if (!$adapter) {
throw new Exception\InvalidArgumentException(sprintf(
'"%s" unable to load adapter; adapter not found',
__METHOD__
));
}
if (!$adapter instanceof Conve... | [
"public",
"static",
"function",
"getOptionsFullQualifiedClassName",
"(",
"$",
"adapter",
")",
"{",
"if",
"(",
"!",
"$",
"adapter",
")",
"{",
"throw",
"new",
"Exception",
"\\",
"InvalidArgumentException",
"(",
"sprintf",
"(",
"'\"%s\" unable to load adapter; adapter no... | Recreate the full qualified class name of options class for the supplied adapter
@param ConversionAlgorithmInterface|null $adapter
@return string
@throws Exception\InvalidArgumentException | [
"Recreate",
"the",
"full",
"qualified",
"class",
"name",
"of",
"options",
"class",
"for",
"the",
"supplied",
"adapter"
] | ebbb626b0cf2a44729af6d46d753b5a4b06d9835 | https://github.com/leodido/conversio/blob/ebbb626b0cf2a44729af6d46d753b5a4b06d9835/library/Conversion.php#L268-L287 |
239,925 | MESD/JasperReportViewerBundle | Util/FormCompletenessChecker.php | FormCompletenessChecker.isComplete | public static function isComplete(Form $form)
{
//Set the return value to true by default
$ret = true;
//Foreach child of the form
foreach($form->all() as $child) {
//If the child is required, check that its set
if ($child->isRequired()) {
if ... | php | public static function isComplete(Form $form)
{
//Set the return value to true by default
$ret = true;
//Foreach child of the form
foreach($form->all() as $child) {
//If the child is required, check that its set
if ($child->isRequired()) {
if ... | [
"public",
"static",
"function",
"isComplete",
"(",
"Form",
"$",
"form",
")",
"{",
"//Set the return value to true by default",
"$",
"ret",
"=",
"true",
";",
"//Foreach child of the form",
"foreach",
"(",
"$",
"form",
"->",
"all",
"(",
")",
"as",
"$",
"child",
... | Checks if the required fields of a form have values
@param Form $form The form to check
@return boolean Whether the required fields are set | [
"Checks",
"if",
"the",
"required",
"fields",
"of",
"a",
"form",
"have",
"values"
] | d51ff079ba79b35c549a7ac472a305d416060d86 | https://github.com/MESD/JasperReportViewerBundle/blob/d51ff079ba79b35c549a7ac472a305d416060d86/Util/FormCompletenessChecker.php#L21-L39 |
239,926 | koinephp/Core | lib/Koine/KoineString.php | KoineString.at | public function at($start = null, $length = null)
{
return new self(mb_substr((string) $this, $start, $length, 'UTF-8'));
} | php | public function at($start = null, $length = null)
{
return new self(mb_substr((string) $this, $start, $length, 'UTF-8'));
} | [
"public",
"function",
"at",
"(",
"$",
"start",
"=",
"null",
",",
"$",
"length",
"=",
"null",
")",
"{",
"return",
"new",
"self",
"(",
"mb_substr",
"(",
"(",
"string",
")",
"$",
"this",
",",
"$",
"start",
",",
"$",
"length",
",",
"'UTF-8'",
")",
")... | Returns part of a string
Known bug in php 5.3.3
@see https://bugs.php.net/bug.php?id=62703
@param int start
@param int $length the length of the string from the starting point
@return KoineString | [
"Returns",
"part",
"of",
"a",
"string",
"Known",
"bug",
"in",
"php",
"5",
".",
"3",
".",
"3"
] | 9b9543f1b4699fd515590f2f94654bad098821ff | https://github.com/koinephp/Core/blob/9b9543f1b4699fd515590f2f94654bad098821ff/lib/Koine/KoineString.php#L161-L164 |
239,927 | joegreen88/zf1-component-http | src/Zend/Http/Response/Stream.php | Zend_Http_Response_Stream.fromStream | public static function fromStream($response_str, $stream)
{
$code = self::extractCode($response_str);
$headers = self::extractHeaders($response_str);
$version = self::extractVersion($response_str);
$message = self::extractMessage($response_str);
return new self($code, $he... | php | public static function fromStream($response_str, $stream)
{
$code = self::extractCode($response_str);
$headers = self::extractHeaders($response_str);
$version = self::extractVersion($response_str);
$message = self::extractMessage($response_str);
return new self($code, $he... | [
"public",
"static",
"function",
"fromStream",
"(",
"$",
"response_str",
",",
"$",
"stream",
")",
"{",
"$",
"code",
"=",
"self",
"::",
"extractCode",
"(",
"$",
"response_str",
")",
";",
"$",
"headers",
"=",
"self",
"::",
"extractHeaders",
"(",
"$",
"respo... | Create a new Zend_Http_Response_Stream object from a string
@param string $response_str
@param resource $stream
@return Zend_Http_Response_Stream | [
"Create",
"a",
"new",
"Zend_Http_Response_Stream",
"object",
"from",
"a",
"string"
] | 39e834e8f0393cf4223d099a0acaab5fa05e9ad4 | https://github.com/joegreen88/zf1-component-http/blob/39e834e8f0393cf4223d099a0acaab5fa05e9ad4/src/Zend/Http/Response/Stream.php#L156-L164 |
239,928 | joegreen88/zf1-component-http | src/Zend/Http/Response/Stream.php | Zend_Http_Response_Stream.readStream | protected function readStream()
{
if(!is_resource($this->stream)) {
return '';
}
if(isset($headers['content-length'])) {
$this->body = stream_get_contents($this->stream, $headers['content-length']);
} else {
$this->body = stream_get_contents($this... | php | protected function readStream()
{
if(!is_resource($this->stream)) {
return '';
}
if(isset($headers['content-length'])) {
$this->body = stream_get_contents($this->stream, $headers['content-length']);
} else {
$this->body = stream_get_contents($this... | [
"protected",
"function",
"readStream",
"(",
")",
"{",
"if",
"(",
"!",
"is_resource",
"(",
"$",
"this",
"->",
"stream",
")",
")",
"{",
"return",
"''",
";",
"}",
"if",
"(",
"isset",
"(",
"$",
"headers",
"[",
"'content-length'",
"]",
")",
")",
"{",
"$... | Read stream content and return it as string
Function reads the remainder of the body from the stream and closes the stream.
@return string | [
"Read",
"stream",
"content",
"and",
"return",
"it",
"as",
"string"
] | 39e834e8f0393cf4223d099a0acaab5fa05e9ad4 | https://github.com/joegreen88/zf1-component-http/blob/39e834e8f0393cf4223d099a0acaab5fa05e9ad4/src/Zend/Http/Response/Stream.php#L209-L222 |
239,929 | phlexible/phlexible | src/Phlexible/Bundle/UserBundle/Controller/RolesController.php | RolesController.listAction | public function listAction()
{
$roleHierarchy = $this->container->getParameter('security.role_hierarchy.roles');
$roles = [];
foreach (array_keys($roleHierarchy) as $role) {
$roles[] = ['id' => $role, 'name' => $role];
}
return new JsonResponse($roles);
} | php | public function listAction()
{
$roleHierarchy = $this->container->getParameter('security.role_hierarchy.roles');
$roles = [];
foreach (array_keys($roleHierarchy) as $role) {
$roles[] = ['id' => $role, 'name' => $role];
}
return new JsonResponse($roles);
} | [
"public",
"function",
"listAction",
"(",
")",
"{",
"$",
"roleHierarchy",
"=",
"$",
"this",
"->",
"container",
"->",
"getParameter",
"(",
"'security.role_hierarchy.roles'",
")",
";",
"$",
"roles",
"=",
"[",
"]",
";",
"foreach",
"(",
"array_keys",
"(",
"$",
... | List roles.
@return JsonResponse
@Route("", name="users_roles_list")
@Method("GET")
@ApiDoc(
description="Returns a list of roles"
) | [
"List",
"roles",
"."
] | 132f24924c9bb0dbb6c1ea84db0a463f97fa3893 | https://github.com/phlexible/phlexible/blob/132f24924c9bb0dbb6c1ea84db0a463f97fa3893/src/Phlexible/Bundle/UserBundle/Controller/RolesController.php#L40-L50 |
239,930 | agalbourdin/agl-core | src/Data/Ini.php | Ini.loadFile | public function loadFile($pFile, $pParseKeys = false)
{
$this->_content = parse_ini_file($pFile, true);
if ($pParseKeys) {
$this->_parseKeys($this->_content);
}
return $this;
} | php | public function loadFile($pFile, $pParseKeys = false)
{
$this->_content = parse_ini_file($pFile, true);
if ($pParseKeys) {
$this->_parseKeys($this->_content);
}
return $this;
} | [
"public",
"function",
"loadFile",
"(",
"$",
"pFile",
",",
"$",
"pParseKeys",
"=",
"false",
")",
"{",
"$",
"this",
"->",
"_content",
"=",
"parse_ini_file",
"(",
"$",
"pFile",
",",
"true",
")",
";",
"if",
"(",
"$",
"pParseKeys",
")",
"{",
"$",
"this",
... | Load the INI file content into the _content variable, as a
multidimensional array.
@var bool $pParseKeys Parse the keys to create multidimensional arrays
@return Ini | [
"Load",
"the",
"INI",
"file",
"content",
"into",
"the",
"_content",
"variable",
"as",
"a",
"multidimensional",
"array",
"."
] | 1db556f9a49488aa9fab6887fefb7141a79ad97d | https://github.com/agalbourdin/agl-core/blob/1db556f9a49488aa9fab6887fefb7141a79ad97d/src/Data/Ini.php#L68-L76 |
239,931 | veridu/idos-sdk-php | src/idOS/SDK.php | SDK.create | public static function create(
AuthInterface $authentication,
bool $throwsExceptions = false,
string $baseUrl = 'https://api.idos.io/1.0/'
) : self {
return new static(
$authentication,
new Client(),
$throwsExceptions,
$baseUrl
... | php | public static function create(
AuthInterface $authentication,
bool $throwsExceptions = false,
string $baseUrl = 'https://api.idos.io/1.0/'
) : self {
return new static(
$authentication,
new Client(),
$throwsExceptions,
$baseUrl
... | [
"public",
"static",
"function",
"create",
"(",
"AuthInterface",
"$",
"authentication",
",",
"bool",
"$",
"throwsExceptions",
"=",
"false",
",",
"string",
"$",
"baseUrl",
"=",
"'https://api.idos.io/1.0/'",
")",
":",
"self",
"{",
"return",
"new",
"static",
"(",
... | Creates the SDK instance.
@param \idOS\Auth\AuthInterface $authentication
@param bool $throwsExceptions
@param string $baseUrl
@return self instance | [
"Creates",
"the",
"SDK",
"instance",
"."
] | e56757bed10404756f2f0485a4b7f55794192008 | https://github.com/veridu/idos-sdk-php/blob/e56757bed10404756f2f0485a4b7f55794192008/src/idOS/SDK.php#L47-L58 |
239,932 | veridu/idos-sdk-php | src/idOS/SDK.php | SDK.getEndpointClassName | protected function getEndpointClassName(string $name) : string {
$className = sprintf(
'%s\\%s\\%s',
'idOS',
'Endpoint',
ucfirst($name)
);
if (! class_exists($className)) {
throw new \RuntimeException(
sprintf(
... | php | protected function getEndpointClassName(string $name) : string {
$className = sprintf(
'%s\\%s\\%s',
'idOS',
'Endpoint',
ucfirst($name)
);
if (! class_exists($className)) {
throw new \RuntimeException(
sprintf(
... | [
"protected",
"function",
"getEndpointClassName",
"(",
"string",
"$",
"name",
")",
":",
"string",
"{",
"$",
"className",
"=",
"sprintf",
"(",
"'%s\\\\%s\\\\%s'",
",",
"'idOS'",
",",
"'Endpoint'",
",",
"ucfirst",
"(",
"$",
"name",
")",
")",
";",
"if",
"(",
... | Returns the name of the endpoint class.
@param string $name
@return string className | [
"Returns",
"the",
"name",
"of",
"the",
"endpoint",
"class",
"."
] | e56757bed10404756f2f0485a4b7f55794192008 | https://github.com/veridu/idos-sdk-php/blob/e56757bed10404756f2f0485a4b7f55794192008/src/idOS/SDK.php#L213-L232 |
239,933 | vincenttouzet/AdminConfigurationBundle | Configuration/AdminConfigurationBuilder.php | AdminConfigurationBuilder.addSection | public function addSection($name, $label, $position=0)
{
$sectionManager = $this->container->get('admin.configuration.configsection_manager');
$section = $sectionManager->getRepository()->findOneByName($name);
if (!$section) {
$section = new ConfigSection();
$section-... | php | public function addSection($name, $label, $position=0)
{
$sectionManager = $this->container->get('admin.configuration.configsection_manager');
$section = $sectionManager->getRepository()->findOneByName($name);
if (!$section) {
$section = new ConfigSection();
$section-... | [
"public",
"function",
"addSection",
"(",
"$",
"name",
",",
"$",
"label",
",",
"$",
"position",
"=",
"0",
")",
"{",
"$",
"sectionManager",
"=",
"$",
"this",
"->",
"container",
"->",
"get",
"(",
"'admin.configuration.configsection_manager'",
")",
";",
"$",
"... | Add a ConfigSection
If a ConfigSection with the same name exists then it does nothing
@param string $name Name
@param string $label Label
@param integer $position Position
@return boolean | [
"Add",
"a",
"ConfigSection",
"If",
"a",
"ConfigSection",
"with",
"the",
"same",
"name",
"exists",
"then",
"it",
"does",
"nothing"
] | 8e7edd0810d88aa1d1be4bd303bcc14cbfd0caeb | https://github.com/vincenttouzet/AdminConfigurationBundle/blob/8e7edd0810d88aa1d1be4bd303bcc14cbfd0caeb/Configuration/AdminConfigurationBuilder.php#L66-L81 |
239,934 | vincenttouzet/AdminConfigurationBundle | Configuration/AdminConfigurationBuilder.php | AdminConfigurationBuilder.addGroup | public function addGroup($sectionName, $name, $label, $position=0)
{
$groupManager = $this->container->get('admin.configuration.configgroup_manager');
$sectionManager = $this->container->get('admin.configuration.configsection_manager');
$group = $groupManager->getRepository()->findOneBySecti... | php | public function addGroup($sectionName, $name, $label, $position=0)
{
$groupManager = $this->container->get('admin.configuration.configgroup_manager');
$sectionManager = $this->container->get('admin.configuration.configsection_manager');
$group = $groupManager->getRepository()->findOneBySecti... | [
"public",
"function",
"addGroup",
"(",
"$",
"sectionName",
",",
"$",
"name",
",",
"$",
"label",
",",
"$",
"position",
"=",
"0",
")",
"{",
"$",
"groupManager",
"=",
"$",
"this",
"->",
"container",
"->",
"get",
"(",
"'admin.configuration.configgroup_manager'",... | Add a ConfigGroup
If a ConfigGroup with this name and within this section already exist then it does nothing
@param string $sectionName Section name
@param string $name Group name
@param string $label Group label
@param integer $position Group position
@return boolean | [
"Add",
"a",
"ConfigGroup",
"If",
"a",
"ConfigGroup",
"with",
"this",
"name",
"and",
"within",
"this",
"section",
"already",
"exist",
"then",
"it",
"does",
"nothing"
] | 8e7edd0810d88aa1d1be4bd303bcc14cbfd0caeb | https://github.com/vincenttouzet/AdminConfigurationBundle/blob/8e7edd0810d88aa1d1be4bd303bcc14cbfd0caeb/Configuration/AdminConfigurationBuilder.php#L94-L115 |
239,935 | vincenttouzet/AdminConfigurationBundle | Configuration/AdminConfigurationBuilder.php | AdminConfigurationBuilder.addType | public function addType($identifier, $label, $formType, $options = array())
{
$typeManager = $this->container->get('admin.configuration.configtype_manager');
$type = $typeManager->getRepository()->findOneByIdentifier($identifier);
if (!$type) {
$type = new ConfigType();
... | php | public function addType($identifier, $label, $formType, $options = array())
{
$typeManager = $this->container->get('admin.configuration.configtype_manager');
$type = $typeManager->getRepository()->findOneByIdentifier($identifier);
if (!$type) {
$type = new ConfigType();
... | [
"public",
"function",
"addType",
"(",
"$",
"identifier",
",",
"$",
"label",
",",
"$",
"formType",
",",
"$",
"options",
"=",
"array",
"(",
")",
")",
"{",
"$",
"typeManager",
"=",
"$",
"this",
"->",
"container",
"->",
"get",
"(",
"'admin.configuration.conf... | Add a ConfigType
If a ConfigType with this identifier already exists then it does nothing
@param string $identifier Type identifier
@param string $label Type label
@param string $formType Form type
@param array $options Form options
@return boolean | [
"Add",
"a",
"ConfigType",
"If",
"a",
"ConfigType",
"with",
"this",
"identifier",
"already",
"exists",
"then",
"it",
"does",
"nothing"
] | 8e7edd0810d88aa1d1be4bd303bcc14cbfd0caeb | https://github.com/vincenttouzet/AdminConfigurationBundle/blob/8e7edd0810d88aa1d1be4bd303bcc14cbfd0caeb/Configuration/AdminConfigurationBuilder.php#L128-L146 |
239,936 | budkit/budkit-framework | src/Budkit/Session/Store.php | Store.getUploadProgress | final public static function getUploadProgress($formName)
{
$key = ini_get("session.upload_progress.prefix") . $formName;
if (!empty($_SESSION[$key])) {
$current = $_SESSION[$key]["bytes_processed"];
$total = $_SESSION[$key]["content_length"];
return $current < $... | php | final public static function getUploadProgress($formName)
{
$key = ini_get("session.upload_progress.prefix") . $formName;
if (!empty($_SESSION[$key])) {
$current = $_SESSION[$key]["bytes_processed"];
$total = $_SESSION[$key]["content_length"];
return $current < $... | [
"final",
"public",
"static",
"function",
"getUploadProgress",
"(",
"$",
"formName",
")",
"{",
"$",
"key",
"=",
"ini_get",
"(",
"\"session.upload_progress.prefix\"",
")",
".",
"$",
"formName",
";",
"if",
"(",
"!",
"empty",
"(",
"$",
"_SESSION",
"[",
"$",
"k... | Gets the Upload progressName
@param type $formName
@return int | [
"Gets",
"the",
"Upload",
"progressName"
] | 0635061815fe07a8c63f9514b845d199b3c0d485 | https://github.com/budkit/budkit-framework/blob/0635061815fe07a8c63f9514b845d199b3c0d485/src/Budkit/Session/Store.php#L115-L126 |
239,937 | budkit/budkit-framework | src/Budkit/Session/Store.php | Store.start | final public function start($killPrevious = FALSE)
{
//starts this session if not creates a new one
//$self = (!isset($this) || !is_a($this, "Library\Session")) ? self::getInstance() : $this;
//@TODO Check if there is an existing session!
//If there is any previous and killprevious ... | php | final public function start($killPrevious = FALSE)
{
//starts this session if not creates a new one
//$self = (!isset($this) || !is_a($this, "Library\Session")) ? self::getInstance() : $this;
//@TODO Check if there is an existing session!
//If there is any previous and killprevious ... | [
"final",
"public",
"function",
"start",
"(",
"$",
"killPrevious",
"=",
"FALSE",
")",
"{",
"//starts this session if not creates a new one",
"//$self = (!isset($this) || !is_a($this, \"Library\\Session\")) ? self::getInstance() : $this;",
"//@TODO Check if there is an existing session!",
... | Starts a session
@param type $killPrevious
@return void | [
"Starts",
"a",
"session"
] | 0635061815fe07a8c63f9514b845d199b3c0d485 | https://github.com/budkit/budkit-framework/blob/0635061815fe07a8c63f9514b845d199b3c0d485/src/Budkit/Session/Store.php#L134-L150 |
239,938 | budkit/budkit-framework | src/Budkit/Session/Store.php | Store.getSplash | final public function getSplash()
{
$userIp = md5($this->input->serialize($this->input->getVar('REMOTE_ADDR', \IS\STRING, '', 'server')));
$userAgent = md5($this->input->serialize($this->input->getVar('HTTP_USER_AGENT', \IS\STRING, '', 'server')));
$userDomain = md5($this->input->serialize(... | php | final public function getSplash()
{
$userIp = md5($this->input->serialize($this->input->getVar('REMOTE_ADDR', \IS\STRING, '', 'server')));
$userAgent = md5($this->input->serialize($this->input->getVar('HTTP_USER_AGENT', \IS\STRING, '', 'server')));
$userDomain = md5($this->input->serialize(... | [
"final",
"public",
"function",
"getSplash",
"(",
")",
"{",
"$",
"userIp",
"=",
"md5",
"(",
"$",
"this",
"->",
"input",
"->",
"serialize",
"(",
"$",
"this",
"->",
"input",
"->",
"getVar",
"(",
"'REMOTE_ADDR'",
",",
"\\",
"IS",
"\\",
"STRING",
",",
"''... | Gets session parameters and develop a 'splash'
@return type | [
"Gets",
"session",
"parameters",
"and",
"develop",
"a",
"splash"
] | 0635061815fe07a8c63f9514b845d199b3c0d485 | https://github.com/budkit/budkit-framework/blob/0635061815fe07a8c63f9514b845d199b3c0d485/src/Budkit/Session/Store.php#L157-L175 |
239,939 | budkit/budkit-framework | src/Budkit/Session/Store.php | Store.create | final public function create()
{
$self = $this;
$splash = $self->getSplash();
$sessId = $this->generateId($splash);
session_id($sessId); //Must be called before the sesion start to generate the Id
session_cache_limiter('none');
session_name(md5($self->cookie . $sp... | php | final public function create()
{
$self = $this;
$splash = $self->getSplash();
$sessId = $this->generateId($splash);
session_id($sessId); //Must be called before the sesion start to generate the Id
session_cache_limiter('none');
session_name(md5($self->cookie . $sp... | [
"final",
"public",
"function",
"create",
"(",
")",
"{",
"$",
"self",
"=",
"$",
"this",
";",
"$",
"splash",
"=",
"$",
"self",
"->",
"getSplash",
"(",
")",
";",
"$",
"sessId",
"=",
"$",
"this",
"->",
"generateId",
"(",
"$",
"splash",
")",
";",
"ses... | Creates a new session.
Will only create a session if none is found
The 'default' and 'auth' namespaces are also added
The 'auth' namespace is locked and unwrittable,
@return void | [
"Creates",
"a",
"new",
"session",
"."
] | 0635061815fe07a8c63f9514b845d199b3c0d485 | https://github.com/budkit/budkit-framework/blob/0635061815fe07a8c63f9514b845d199b3c0d485/src/Budkit/Session/Store.php#L186-L212 |
239,940 | budkit/budkit-framework | src/Budkit/Session/Store.php | Store.getAuthority | final public function getAuthority()
{
$self = $this;
$auth = $self->get("handler", "auth");
//$authority = \Platform\Authorize::getInstance();
if (is_a($auth, Authenticate::class)) {
if (isset($auth->authenticated)) {
//Read Rights if we have a userId
... | php | final public function getAuthority()
{
$self = $this;
$auth = $self->get("handler", "auth");
//$authority = \Platform\Authorize::getInstance();
if (is_a($auth, Authenticate::class)) {
if (isset($auth->authenticated)) {
//Read Rights if we have a userId
... | [
"final",
"public",
"function",
"getAuthority",
"(",
")",
"{",
"$",
"self",
"=",
"$",
"this",
";",
"$",
"auth",
"=",
"$",
"self",
"->",
"get",
"(",
"\"handler\"",
",",
"\"auth\"",
")",
";",
"//$authority = \\Platform\\Authorize::getInstance();",
"if",
"(",
"i... | Reads the authenticated user's right,
@return Authority | [
"Reads",
"the",
"authenticated",
"user",
"s",
"right"
] | 0635061815fe07a8c63f9514b845d199b3c0d485 | https://github.com/budkit/budkit-framework/blob/0635061815fe07a8c63f9514b845d199b3c0d485/src/Budkit/Session/Store.php#L219-L235 |
239,941 | budkit/budkit-framework | src/Budkit/Session/Store.php | Store.isAuthenticated | final public function isAuthenticated()
{
$self = $this;
$auth = $self->get("handler", "auth");
if (is_a($auth, Authenticate::class)) {
if (isset($auth->authenticated)) {
return (bool)$auth->authenticated;
}
}
return false;
} | php | final public function isAuthenticated()
{
$self = $this;
$auth = $self->get("handler", "auth");
if (is_a($auth, Authenticate::class)) {
if (isset($auth->authenticated)) {
return (bool)$auth->authenticated;
}
}
return false;
} | [
"final",
"public",
"function",
"isAuthenticated",
"(",
")",
"{",
"$",
"self",
"=",
"$",
"this",
";",
"$",
"auth",
"=",
"$",
"self",
"->",
"get",
"(",
"\"handler\"",
",",
"\"auth\"",
")",
";",
"if",
"(",
"is_a",
"(",
"$",
"auth",
",",
"Authenticate",
... | Determines whether a user has been
Authenticated to this browser;
@return boolean True or false depending on auth status | [
"Determines",
"whether",
"a",
"user",
"has",
"been",
"Authenticated",
"to",
"this",
"browser",
";"
] | 0635061815fe07a8c63f9514b845d199b3c0d485 | https://github.com/budkit/budkit-framework/blob/0635061815fe07a8c63f9514b845d199b3c0d485/src/Budkit/Session/Store.php#L243-L256 |
239,942 | budkit/budkit-framework | src/Budkit/Session/Store.php | Store.generateId | final public function generateId($splash)
{
$encryptor = $this->encryptor;
$input = $this->input;
$sessId = md5($encryptor->getKey() . $input->serialize($splash));
return $sessId;
} | php | final public function generateId($splash)
{
$encryptor = $this->encryptor;
$input = $this->input;
$sessId = md5($encryptor->getKey() . $input->serialize($splash));
return $sessId;
} | [
"final",
"public",
"function",
"generateId",
"(",
"$",
"splash",
")",
"{",
"$",
"encryptor",
"=",
"$",
"this",
"->",
"encryptor",
";",
"$",
"input",
"=",
"$",
"this",
"->",
"input",
";",
"$",
"sessId",
"=",
"md5",
"(",
"$",
"encryptor",
"->",
"getKey... | Generates the session Id
@param type $splash
@return type | [
"Generates",
"the",
"session",
"Id"
] | 0635061815fe07a8c63f9514b845d199b3c0d485 | https://github.com/budkit/budkit-framework/blob/0635061815fe07a8c63f9514b845d199b3c0d485/src/Budkit/Session/Store.php#L332-L340 |
239,943 | budkit/budkit-framework | src/Budkit/Session/Store.php | Store.read | final public function read($id = Null)
{
$self = $this;
$input = $this->input;
$uri = $this->uri;
//$dbo = Database::getInstance();
$splash = $self->getSplash();
//Do we have a cookie?
$sessCookie = md5($self->cookie . $splash['agent'] . $splash['ip'] . $s... | php | final public function read($id = Null)
{
$self = $this;
$input = $this->input;
$uri = $this->uri;
//$dbo = Database::getInstance();
$splash = $self->getSplash();
//Do we have a cookie?
$sessCookie = md5($self->cookie . $splash['agent'] . $splash['ip'] . $s... | [
"final",
"public",
"function",
"read",
"(",
"$",
"id",
"=",
"Null",
")",
"{",
"$",
"self",
"=",
"$",
"this",
";",
"$",
"input",
"=",
"$",
"this",
"->",
"input",
";",
"$",
"uri",
"=",
"$",
"this",
"->",
"uri",
";",
"//$dbo = Database::getInstance();",... | Reads session data from session stores
@param string $id
@return Boolean False on failed and session ID on success | [
"Reads",
"session",
"data",
"from",
"session",
"stores"
] | 0635061815fe07a8c63f9514b845d199b3c0d485 | https://github.com/budkit/budkit-framework/blob/0635061815fe07a8c63f9514b845d199b3c0d485/src/Budkit/Session/Store.php#L348-L433 |
239,944 | budkit/budkit-framework | src/Budkit/Session/Store.php | Store.update | final public function update($sessId, $userdata = array())
{
if (empty($sessId)) {
return false;
}
$self = $this;
//updates a started session for exp time
//stores data for the registry
$now = time();
$newExpires = $now + $self->life;
$... | php | final public function update($sessId, $userdata = array())
{
if (empty($sessId)) {
return false;
}
$self = $this;
//updates a started session for exp time
//stores data for the registry
$now = time();
$newExpires = $now + $self->life;
$... | [
"final",
"public",
"function",
"update",
"(",
"$",
"sessId",
",",
"$",
"userdata",
"=",
"array",
"(",
")",
")",
"{",
"if",
"(",
"empty",
"(",
"$",
"sessId",
")",
")",
"{",
"return",
"false",
";",
"}",
"$",
"self",
"=",
"$",
"this",
";",
"//update... | Updates a user session store on state change
@param type $sessId
@param type $userdata
@return type | [
"Updates",
"a",
"user",
"session",
"store",
"on",
"state",
"change"
] | 0635061815fe07a8c63f9514b845d199b3c0d485 | https://github.com/budkit/budkit-framework/blob/0635061815fe07a8c63f9514b845d199b3c0d485/src/Budkit/Session/Store.php#L442-L478 |
239,945 | budkit/budkit-framework | src/Budkit/Session/Store.php | Store.restart | final public function restart()
{
$id = $this->getId();
$this->destroy($id);
$this->create();
$this->gc();
} | php | final public function restart()
{
$id = $this->getId();
$this->destroy($id);
$this->create();
$this->gc();
} | [
"final",
"public",
"function",
"restart",
"(",
")",
"{",
"$",
"id",
"=",
"$",
"this",
"->",
"getId",
"(",
")",
";",
"$",
"this",
"->",
"destroy",
"(",
"$",
"id",
")",
";",
"$",
"this",
"->",
"create",
"(",
")",
";",
"$",
"this",
"->",
"gc",
"... | Destroys any previous session and starts a new one
Hopefully
@return void | [
"Destroys",
"any",
"previous",
"session",
"and",
"starts",
"a",
"new",
"one",
"Hopefully"
] | 0635061815fe07a8c63f9514b845d199b3c0d485 | https://github.com/budkit/budkit-framework/blob/0635061815fe07a8c63f9514b845d199b3c0d485/src/Budkit/Session/Store.php#L486-L494 |
239,946 | budkit/budkit-framework | src/Budkit/Session/Store.php | Store.destroy | final public function destroy($id = "")
{
$id = !empty($id) ? $id : $this->getId();
$now = time();
if (empty($id)) {
return false;
}
setcookie(session_name(), '', $now - 42000, '/');
if (session_id()) {
@session_unset();
@sessio... | php | final public function destroy($id = "")
{
$id = !empty($id) ? $id : $this->getId();
$now = time();
if (empty($id)) {
return false;
}
setcookie(session_name(), '', $now - 42000, '/');
if (session_id()) {
@session_unset();
@sessio... | [
"final",
"public",
"function",
"destroy",
"(",
"$",
"id",
"=",
"\"\"",
")",
"{",
"$",
"id",
"=",
"!",
"empty",
"(",
"$",
"id",
")",
"?",
"$",
"id",
":",
"$",
"this",
"->",
"getId",
"(",
")",
";",
"$",
"now",
"=",
"time",
"(",
")",
";",
"if"... | Destroys a redundant session
@param type $id
@param type $restart | [
"Destroys",
"a",
"redundant",
"session"
] | 0635061815fe07a8c63f9514b845d199b3c0d485 | https://github.com/budkit/budkit-framework/blob/0635061815fe07a8c63f9514b845d199b3c0d485/src/Budkit/Session/Store.php#L502-L522 |
239,947 | budkit/budkit-framework | src/Budkit/Session/Store.php | Store.write | final public function write($sessId, $data = array())
{
//Writes user data to the db;
$self = $this;
//expires
$expires = time() + $self->life;
//Sets the cookie
//$output->setCookie($self->cookie, $sessId."0".$data['token'], $expires);
//$output->setCookie... | php | final public function write($sessId, $data = array())
{
//Writes user data to the db;
$self = $this;
//expires
$expires = time() + $self->life;
//Sets the cookie
//$output->setCookie($self->cookie, $sessId."0".$data['token'], $expires);
//$output->setCookie... | [
"final",
"public",
"function",
"write",
"(",
"$",
"sessId",
",",
"$",
"data",
"=",
"array",
"(",
")",
")",
"{",
"//Writes user data to the db;",
"$",
"self",
"=",
"$",
"this",
";",
"//expires",
"$",
"expires",
"=",
"time",
"(",
")",
"+",
"$",
"self",
... | Writes data to session stores
@param type $data
@param type $sessId
@return type | [
"Writes",
"data",
"to",
"session",
"stores"
] | 0635061815fe07a8c63f9514b845d199b3c0d485 | https://github.com/budkit/budkit-framework/blob/0635061815fe07a8c63f9514b845d199b3c0d485/src/Budkit/Session/Store.php#L531-L560 |
239,948 | budkit/budkit-framework | src/Budkit/Session/Store.php | Store.lock | final public function lock($namespace)
{
//locks a namespace in this session to prevent editing
if (empty($namespace)) {
//@TODO throw an exception,
//we don't know what namespace this is
return false;
}
$session = $this;
//unlocks a namesp... | php | final public function lock($namespace)
{
//locks a namespace in this session to prevent editing
if (empty($namespace)) {
//@TODO throw an exception,
//we don't know what namespace this is
return false;
}
$session = $this;
//unlocks a namesp... | [
"final",
"public",
"function",
"lock",
"(",
"$",
"namespace",
")",
"{",
"//locks a namespace in this session to prevent editing",
"if",
"(",
"empty",
"(",
"$",
"namespace",
")",
")",
"{",
"//@TODO throw an exception,",
"//we don't know what namespace this is",
"return",
"... | Locks a namespaced registry to prevent further edits
@param type $namespace
@return type | [
"Locks",
"a",
"namespaced",
"registry",
"to",
"prevent",
"further",
"edits"
] | 0635061815fe07a8c63f9514b845d199b3c0d485 | https://github.com/budkit/budkit-framework/blob/0635061815fe07a8c63f9514b845d199b3c0d485/src/Budkit/Session/Store.php#L652-L668 |
239,949 | budkit/budkit-framework | src/Budkit/Session/Store.php | Store.isLocked | final public function isLocked($namespace)
{
if (empty($namespace)) {
return true; //just say its locked
}
//checks if a namespace in this session is locked
$session = $this;
//unlocks a namespace
if (isset($session->registry[$namespace])) {
... | php | final public function isLocked($namespace)
{
if (empty($namespace)) {
return true; //just say its locked
}
//checks if a namespace in this session is locked
$session = $this;
//unlocks a namespace
if (isset($session->registry[$namespace])) {
... | [
"final",
"public",
"function",
"isLocked",
"(",
"$",
"namespace",
")",
"{",
"if",
"(",
"empty",
"(",
"$",
"namespace",
")",
")",
"{",
"return",
"true",
";",
"//just say its locked",
"}",
"//checks if a namespace in this session is locked",
"$",
"session",
"=",
"... | Determines whether a namespaced registry is locked
@param type $namespace
@return type | [
"Determines",
"whether",
"a",
"namespaced",
"registry",
"is",
"locked"
] | 0635061815fe07a8c63f9514b845d199b3c0d485 | https://github.com/budkit/budkit-framework/blob/0635061815fe07a8c63f9514b845d199b3c0d485/src/Budkit/Session/Store.php#L676-L691 |
239,950 | budkit/budkit-framework | src/Budkit/Session/Store.php | Store.get | final public function get($varname, $namespace = 'default')
{
//gets a registry var, stored in a namespace of this session id
$session = $this;
if (!isset($namespace) || empty($namespace)) {
//@TODO Throw an exception, we need a name or use the default;
return false;... | php | final public function get($varname, $namespace = 'default')
{
//gets a registry var, stored in a namespace of this session id
$session = $this;
if (!isset($namespace) || empty($namespace)) {
//@TODO Throw an exception, we need a name or use the default;
return false;... | [
"final",
"public",
"function",
"get",
"(",
"$",
"varname",
",",
"$",
"namespace",
"=",
"'default'",
")",
"{",
"//gets a registry var, stored in a namespace of this session id",
"$",
"session",
"=",
"$",
"this",
";",
"if",
"(",
"!",
"isset",
"(",
"$",
"namespace"... | Gets a namespaced registry value, stored in the session
@param type $varname
@param type $namespace
@return type | [
"Gets",
"a",
"namespaced",
"registry",
"value",
"stored",
"in",
"the",
"session"
] | 0635061815fe07a8c63f9514b845d199b3c0d485 | https://github.com/budkit/budkit-framework/blob/0635061815fe07a8c63f9514b845d199b3c0d485/src/Budkit/Session/Store.php#L739-L753 |
239,951 | budkit/budkit-framework | src/Budkit/Session/Store.php | Store.set | final public function set($varname, $value = NULL, $namespace = 'default')
{
//stores a value to a varname in a namespace of this session
$session = $this;
if (!isset($namespace) || empty($namespace)) {
//@TODO Throw an exception, we need a name or use the default;
t... | php | final public function set($varname, $value = NULL, $namespace = 'default')
{
//stores a value to a varname in a namespace of this session
$session = $this;
if (!isset($namespace) || empty($namespace)) {
//@TODO Throw an exception, we need a name or use the default;
t... | [
"final",
"public",
"function",
"set",
"(",
"$",
"varname",
",",
"$",
"value",
"=",
"NULL",
",",
"$",
"namespace",
"=",
"'default'",
")",
"{",
"//stores a value to a varname in a namespace of this session",
"$",
"session",
"=",
"$",
"this",
";",
"if",
"(",
"!",... | Sets a value for storage in a namespaced registry
@param type $varname
@param type $value
@param type $namespace
@return Session | [
"Sets",
"a",
"value",
"for",
"storage",
"in",
"a",
"namespaced",
"registry"
] | 0635061815fe07a8c63f9514b845d199b3c0d485 | https://github.com/budkit/budkit-framework/blob/0635061815fe07a8c63f9514b845d199b3c0d485/src/Budkit/Session/Store.php#L763-L791 |
239,952 | budkit/budkit-framework | src/Budkit/Session/Store.php | Store.remove | final public function remove($varname = '', $namespace = 'default')
{
//if the registry is empty and the namespace is not default
//delete the registry;
//stores a value to a varname in a namespace of this session
$session = $this;
//echo $namespace;
//@TODO, check ... | php | final public function remove($varname = '', $namespace = 'default')
{
//if the registry is empty and the namespace is not default
//delete the registry;
//stores a value to a varname in a namespace of this session
$session = $this;
//echo $namespace;
//@TODO, check ... | [
"final",
"public",
"function",
"remove",
"(",
"$",
"varname",
"=",
"''",
",",
"$",
"namespace",
"=",
"'default'",
")",
"{",
"//if the registry is empty and the namespace is not default",
"//delete the registry;",
"//stores a value to a varname in a namespace of this session",
"... | Removes a value from the session registry
@param type $varname
@param type $value
@param type $namespace | [
"Removes",
"a",
"value",
"from",
"the",
"session",
"registry"
] | 0635061815fe07a8c63f9514b845d199b3c0d485 | https://github.com/budkit/budkit-framework/blob/0635061815fe07a8c63f9514b845d199b3c0d485/src/Budkit/Session/Store.php#L800-L818 |
239,953 | netcore/translations | src/Controllers/LanguagesController.php | LanguagesController.copyFallbackTranslations | private function copyFallbackTranslations($newLocale)
{
\DB::transaction(function () use ($newLocale) {
$existingTranslations = Translation::get();
$fallbackLanguage = Language::whereIsFallback(1)->first();
if ($fallbackLanguage) {
$fallbackIsoCode = $fa... | php | private function copyFallbackTranslations($newLocale)
{
\DB::transaction(function () use ($newLocale) {
$existingTranslations = Translation::get();
$fallbackLanguage = Language::whereIsFallback(1)->first();
if ($fallbackLanguage) {
$fallbackIsoCode = $fa... | [
"private",
"function",
"copyFallbackTranslations",
"(",
"$",
"newLocale",
")",
"{",
"\\",
"DB",
"::",
"transaction",
"(",
"function",
"(",
")",
"use",
"(",
"$",
"newLocale",
")",
"{",
"$",
"existingTranslations",
"=",
"Translation",
"::",
"get",
"(",
")",
... | Copies translations from fallback language to new language
@param $newLocale | [
"Copies",
"translations",
"from",
"fallback",
"language",
"to",
"new",
"language"
] | 0f0c8d8b4748ee161921bfdc30683391c4fe7d7e | https://github.com/netcore/translations/blob/0f0c8d8b4748ee161921bfdc30683391c4fe7d7e/src/Controllers/LanguagesController.php#L178-L223 |
239,954 | integratedfordevelopers/integrated-page-bundle | Services/UrlResolver.php | UrlResolver.getContentTypePageUrl | public function getContentTypePageUrl(ContentTypePage $page, ContentInterface $document)
{
return $this->router->generate(
$this->getRouteName($page),
$this->getRoutingParamaters($page, $document)
);
} | php | public function getContentTypePageUrl(ContentTypePage $page, ContentInterface $document)
{
return $this->router->generate(
$this->getRouteName($page),
$this->getRoutingParamaters($page, $document)
);
} | [
"public",
"function",
"getContentTypePageUrl",
"(",
"ContentTypePage",
"$",
"page",
",",
"ContentInterface",
"$",
"document",
")",
"{",
"return",
"$",
"this",
"->",
"router",
"->",
"generate",
"(",
"$",
"this",
"->",
"getRouteName",
"(",
"$",
"page",
")",
",... | todo INTEGRATED-440 add Slug and getReferenceByRelationIdto ContentInterface
@param ContentTypePage $page
@param ContentInterface $document
@return string | [
"todo",
"INTEGRATED",
"-",
"440",
"add",
"Slug",
"and",
"getReferenceByRelationIdto",
"ContentInterface"
] | a1a8640c2b5af2ef6e2f7806fcffa7009bb5294e | https://github.com/integratedfordevelopers/integrated-page-bundle/blob/a1a8640c2b5af2ef6e2f7806fcffa7009bb5294e/Services/UrlResolver.php#L127-L133 |
239,955 | victorhaggqvist/sl-api-client-php | src/SL/Client.php | Client.slReseplanerare2Trip | public function slReseplanerare2Trip($originId, $destId, array $options = []) {
$params = [
'key' => $this->slReseplanerare2key,
'originId' => $originId,
'destId' => $destId
];
$params = array_merge($params, $options);
$url = $this->SlReseplanerare2UR... | php | public function slReseplanerare2Trip($originId, $destId, array $options = []) {
$params = [
'key' => $this->slReseplanerare2key,
'originId' => $originId,
'destId' => $destId
];
$params = array_merge($params, $options);
$url = $this->SlReseplanerare2UR... | [
"public",
"function",
"slReseplanerare2Trip",
"(",
"$",
"originId",
",",
"$",
"destId",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"$",
"params",
"=",
"[",
"'key'",
"=>",
"$",
"this",
"->",
"slReseplanerare2key",
",",
"'originId'",
"=>",
"$",... | SL Reseplanerare 2 -> Trip
See https://www.trafiklab.se/api/sl-reseplanerare-2
@link https://www.trafiklab.se/api/sl-reseplanerare-2
@param string $originId SiteID from
@param string $destId SiteID to
@param array $options Any extra options
@return mixed | [
"SL",
"Reseplanerare",
"2",
"-",
">",
"Trip"
] | e9d2f09931b6c50196adaae71cb201cc96e90de0 | https://github.com/victorhaggqvist/sl-api-client-php/blob/e9d2f09931b6c50196adaae71cb201cc96e90de0/src/SL/Client.php#L105-L121 |
239,956 | victorhaggqvist/sl-api-client-php | src/SL/Client.php | Client.slReseplanerare2Geometry | public function slReseplanerare2Geometry($ref) {
$url = $this->SlReseplanerare2URL.'/geometry.json';
$params = [
'key' => $this->slReseplanerare2key,
'ref' => $ref
];
$request = $this->client->request('GET', $url, [
'query' => $params
]);
... | php | public function slReseplanerare2Geometry($ref) {
$url = $this->SlReseplanerare2URL.'/geometry.json';
$params = [
'key' => $this->slReseplanerare2key,
'ref' => $ref
];
$request = $this->client->request('GET', $url, [
'query' => $params
]);
... | [
"public",
"function",
"slReseplanerare2Geometry",
"(",
"$",
"ref",
")",
"{",
"$",
"url",
"=",
"$",
"this",
"->",
"SlReseplanerare2URL",
".",
"'/geometry.json'",
";",
"$",
"params",
"=",
"[",
"'key'",
"=>",
"$",
"this",
"->",
"slReseplanerare2key",
",",
"'ref... | SL Reseplanerare 2 -> Geometry
See https://www.trafiklab.se/api/sl-reseplanerare-2
@link https://www.trafiklab.se/api/sl-reseplanerare-2
@param string $ref
@return mixed | [
"SL",
"Reseplanerare",
"2",
"-",
">",
"Geometry"
] | e9d2f09931b6c50196adaae71cb201cc96e90de0 | https://github.com/victorhaggqvist/sl-api-client-php/blob/e9d2f09931b6c50196adaae71cb201cc96e90de0/src/SL/Client.php#L132-L146 |
239,957 | victorhaggqvist/sl-api-client-php | src/SL/Client.php | Client.slReseplanerare2JourneyDetail | public function slReseplanerare2JourneyDetail($ref) {
$url = $this->SlReseplanerare2URL.'/journeydetail.json';
$params = [
'key' => $this->slReseplanerare2key,
'ref' => $ref
];
$request = $this->client->request('GET', $url, [
'query' => $params
... | php | public function slReseplanerare2JourneyDetail($ref) {
$url = $this->SlReseplanerare2URL.'/journeydetail.json';
$params = [
'key' => $this->slReseplanerare2key,
'ref' => $ref
];
$request = $this->client->request('GET', $url, [
'query' => $params
... | [
"public",
"function",
"slReseplanerare2JourneyDetail",
"(",
"$",
"ref",
")",
"{",
"$",
"url",
"=",
"$",
"this",
"->",
"SlReseplanerare2URL",
".",
"'/journeydetail.json'",
";",
"$",
"params",
"=",
"[",
"'key'",
"=>",
"$",
"this",
"->",
"slReseplanerare2key",
",... | SL Reseplanerare 2 -> JourneyDetail
See https://www.trafiklab.se/api/sl-reseplanerare-2
@link https://www.trafiklab.se/api/sl-reseplanerare-2
@param string $ref
@return mixed | [
"SL",
"Reseplanerare",
"2",
"-",
">",
"JourneyDetail"
] | e9d2f09931b6c50196adaae71cb201cc96e90de0 | https://github.com/victorhaggqvist/sl-api-client-php/blob/e9d2f09931b6c50196adaae71cb201cc96e90de0/src/SL/Client.php#L157-L172 |
239,958 | konservs/brilliant.framework | libraries/HTML/BHTML.php | BHTML.out_head | public function out_head(){
$this->frameworks_process();
if($this->lazyload){
$this->lazyload_prepare();
}
//Outputing
$tab=' ';
echo($tab.'<title>'.$this->title.'</title>'.PHP_EOL);
if(!empty($this->link_canonical)){
echo($tab.'<link rel="canonical" href="'.$this->link_canonical.'" />'.PHP_EOL);
... | php | public function out_head(){
$this->frameworks_process();
if($this->lazyload){
$this->lazyload_prepare();
}
//Outputing
$tab=' ';
echo($tab.'<title>'.$this->title.'</title>'.PHP_EOL);
if(!empty($this->link_canonical)){
echo($tab.'<link rel="canonical" href="'.$this->link_canonical.'" />'.PHP_EOL);
... | [
"public",
"function",
"out_head",
"(",
")",
"{",
"$",
"this",
"->",
"frameworks_process",
"(",
")",
";",
"if",
"(",
"$",
"this",
"->",
"lazyload",
")",
"{",
"$",
"this",
"->",
"lazyload_prepare",
"(",
")",
";",
"}",
"//Outputing",
"$",
"tab",
"=",
"'... | Output the head of the document | [
"Output",
"the",
"head",
"of",
"the",
"document"
] | 95f03f1917f746fee98bea8a906ba0588c87762d | https://github.com/konservs/brilliant.framework/blob/95f03f1917f746fee98bea8a906ba0588c87762d/libraries/HTML/BHTML.php#L371-L418 |
239,959 | nofw/error | src/Psr3ErrorHandler.php | Psr3ErrorHandler.getLevel | private function getLevel(\Throwable $t, array $context): string
{
// Check if the severity matches a PSR-3 log level
if (
false === $this->ignoreSeverity &&
isset($context[Context::SEVERITY]) &&
is_string($context[Context::SEVERITY]) &&
$this->validat... | php | private function getLevel(\Throwable $t, array $context): string
{
// Check if the severity matches a PSR-3 log level
if (
false === $this->ignoreSeverity &&
isset($context[Context::SEVERITY]) &&
is_string($context[Context::SEVERITY]) &&
$this->validat... | [
"private",
"function",
"getLevel",
"(",
"\\",
"Throwable",
"$",
"t",
",",
"array",
"$",
"context",
")",
":",
"string",
"{",
"// Check if the severity matches a PSR-3 log level",
"if",
"(",
"false",
"===",
"$",
"this",
"->",
"ignoreSeverity",
"&&",
"isset",
"(",
... | Determines the level for the error. | [
"Determines",
"the",
"level",
"for",
"the",
"error",
"."
] | 3cf05913c13d41ae336aeb8cb3a4451bf9cac2b5 | https://github.com/nofw/error/blob/3cf05913c13d41ae336aeb8cb3a4451bf9cac2b5/src/Psr3ErrorHandler.php#L111-L139 |
239,960 | sios13/simox | src/Database/Database.php | Database.buildQuery | public function buildQuery( $table_name, $type, $params = null )
{
if ( $type == "find" )
{
$sub_sql = isset($params["sub_sql"]) ? $params["sub_sql"] : null;
$sql = "SELECT * FROM $table_name";
if ( isset($sub_sql) )
{
... | php | public function buildQuery( $table_name, $type, $params = null )
{
if ( $type == "find" )
{
$sub_sql = isset($params["sub_sql"]) ? $params["sub_sql"] : null;
$sql = "SELECT * FROM $table_name";
if ( isset($sub_sql) )
{
... | [
"public",
"function",
"buildQuery",
"(",
"$",
"table_name",
",",
"$",
"type",
",",
"$",
"params",
"=",
"null",
")",
"{",
"if",
"(",
"$",
"type",
"==",
"\"find\"",
")",
"{",
"$",
"sub_sql",
"=",
"isset",
"(",
"$",
"params",
"[",
"\"sub_sql\"",
"]",
... | Builds a query, returns a query object | [
"Builds",
"a",
"query",
"returns",
"a",
"query",
"object"
] | 8be964949ef179aba7eceb3fc6439815a1af2ad2 | https://github.com/sios13/simox/blob/8be964949ef179aba7eceb3fc6439815a1af2ad2/src/Database/Database.php#L25-L87 |
239,961 | easy-system/es-container | src/Parameters/ParametersTrait.php | ParametersTrait.getParam | public function getParam($key, $default = null)
{
if (isset($this->parameters[$key])) {
return $this->parameters[$key];
}
return $default;
} | php | public function getParam($key, $default = null)
{
if (isset($this->parameters[$key])) {
return $this->parameters[$key];
}
return $default;
} | [
"public",
"function",
"getParam",
"(",
"$",
"key",
",",
"$",
"default",
"=",
"null",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"parameters",
"[",
"$",
"key",
"]",
")",
")",
"{",
"return",
"$",
"this",
"->",
"parameters",
"[",
"$",
"ke... | Gets the parameter.
@param int|string $key The key of parameter
@param mixed $default The default value of parameter
@return mixed Returns parameter value if any, $default otherwise | [
"Gets",
"the",
"parameter",
"."
] | 0e917d8ff2c3622f53b82d34436295539858be7d | https://github.com/easy-system/es-container/blob/0e917d8ff2c3622f53b82d34436295539858be7d/src/Parameters/ParametersTrait.php#L63-L70 |
239,962 | phlexible/tree-bundle | Controller/LinkController.php | LinkController.recurseLinkNodes | private function recurseLinkNodes(array $nodes, $language, $mode, TreeNodeInterface $targetNode = null)
{
$elementService = $this->get('phlexible_element.element_service');
$iconResolver = $this->get('phlexible_element.icon_resolver');
$data = [];
foreach ($nodes as $node) {
... | php | private function recurseLinkNodes(array $nodes, $language, $mode, TreeNodeInterface $targetNode = null)
{
$elementService = $this->get('phlexible_element.element_service');
$iconResolver = $this->get('phlexible_element.icon_resolver');
$data = [];
foreach ($nodes as $node) {
... | [
"private",
"function",
"recurseLinkNodes",
"(",
"array",
"$",
"nodes",
",",
"$",
"language",
",",
"$",
"mode",
",",
"TreeNodeInterface",
"$",
"targetNode",
"=",
"null",
")",
"{",
"$",
"elementService",
"=",
"$",
"this",
"->",
"get",
"(",
"'phlexible_element.... | Recurse over tree nodes.
@param array $nodes
@param string $language
@param int $mode
@param TreeNodeInterface $targetNode
@return array | [
"Recurse",
"over",
"tree",
"nodes",
"."
] | 0fd07efdf1edf2d0f74f71519c476d534457701c | https://github.com/phlexible/tree-bundle/blob/0fd07efdf1edf2d0f74f71519c476d534457701c/Controller/LinkController.php#L431-L483 |
239,963 | phlexible/tree-bundle | Controller/LinkController.php | LinkController.recursiveTreeStrip | private function recursiveTreeStrip(array $data)
{
if (count($data) === 1 && !empty($data[0]['children'])) {
return $this->recursiveTreeStrip($data[0]['children']);
}
return $data;
} | php | private function recursiveTreeStrip(array $data)
{
if (count($data) === 1 && !empty($data[0]['children'])) {
return $this->recursiveTreeStrip($data[0]['children']);
}
return $data;
} | [
"private",
"function",
"recursiveTreeStrip",
"(",
"array",
"$",
"data",
")",
"{",
"if",
"(",
"count",
"(",
"$",
"data",
")",
"===",
"1",
"&&",
"!",
"empty",
"(",
"$",
"data",
"[",
"0",
"]",
"[",
"'children'",
"]",
")",
")",
"{",
"return",
"$",
"t... | Strip all disabled nodes recursivly.
@param array $data
@return array | [
"Strip",
"all",
"disabled",
"nodes",
"recursivly",
"."
] | 0fd07efdf1edf2d0f74f71519c476d534457701c | https://github.com/phlexible/tree-bundle/blob/0fd07efdf1edf2d0f74f71519c476d534457701c/Controller/LinkController.php#L492-L499 |
239,964 | joomlatools/joomlatools-platform-categories | administrator/components/com_categories/controllers/categories.php | CategoriesControllerCategories.getModel | public function getModel($name = 'Category', $prefix = 'CategoriesModel', $config = array('ignore_request' => true))
{
return parent::getModel($name, $prefix, $config);
} | php | public function getModel($name = 'Category', $prefix = 'CategoriesModel', $config = array('ignore_request' => true))
{
return parent::getModel($name, $prefix, $config);
} | [
"public",
"function",
"getModel",
"(",
"$",
"name",
"=",
"'Category'",
",",
"$",
"prefix",
"=",
"'CategoriesModel'",
",",
"$",
"config",
"=",
"array",
"(",
"'ignore_request'",
"=>",
"true",
")",
")",
"{",
"return",
"parent",
"::",
"getModel",
"(",
"$",
"... | Proxy for getModel
@param string $name The model name. Optional.
@param string $prefix The class prefix. Optional.
@param array $config The array of possible config values. Optional.
@return JModelLegacy The model.
@since 1.6 | [
"Proxy",
"for",
"getModel"
] | 9fe50b6c4ebe6ebfcf98e50067922fcf4a76d350 | https://github.com/joomlatools/joomlatools-platform-categories/blob/9fe50b6c4ebe6ebfcf98e50067922fcf4a76d350/administrator/components/com_categories/controllers/categories.php#L32-L35 |
239,965 | joomlatools/joomlatools-platform-categories | administrator/components/com_categories/controllers/categories.php | CategoriesControllerCategories.rebuild | public function rebuild()
{
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));
$extension = $this->input->get('extension');
$this->setRedirect(JRoute::_('index.php?option=com_categories&view=categories&extension=' . $extension, false));
/** @var CategoriesModelCategory $model */
$model = $this->g... | php | public function rebuild()
{
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));
$extension = $this->input->get('extension');
$this->setRedirect(JRoute::_('index.php?option=com_categories&view=categories&extension=' . $extension, false));
/** @var CategoriesModelCategory $model */
$model = $this->g... | [
"public",
"function",
"rebuild",
"(",
")",
"{",
"JSession",
"::",
"checkToken",
"(",
")",
"or",
"jexit",
"(",
"JText",
"::",
"_",
"(",
"'JINVALID_TOKEN'",
")",
")",
";",
"$",
"extension",
"=",
"$",
"this",
"->",
"input",
"->",
"get",
"(",
"'extension'"... | Rebuild the nested set tree.
@return bool False on failure or error, true on success.
@since 1.6 | [
"Rebuild",
"the",
"nested",
"set",
"tree",
"."
] | 9fe50b6c4ebe6ebfcf98e50067922fcf4a76d350 | https://github.com/joomlatools/joomlatools-platform-categories/blob/9fe50b6c4ebe6ebfcf98e50067922fcf4a76d350/administrator/components/com_categories/controllers/categories.php#L44-L66 |
239,966 | joomlatools/joomlatools-platform-categories | administrator/components/com_categories/controllers/categories.php | CategoriesControllerCategories.saveorder | public function saveorder()
{
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));
JLog::add('CategoriesControllerCategories::saveorder() is deprecated. Function will be removed in 4.0', JLog::WARNING, 'deprecated');
// Get the arrays from the Request
$order = $this->input->post->get('order', null, '... | php | public function saveorder()
{
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));
JLog::add('CategoriesControllerCategories::saveorder() is deprecated. Function will be removed in 4.0', JLog::WARNING, 'deprecated');
// Get the arrays from the Request
$order = $this->input->post->get('order', null, '... | [
"public",
"function",
"saveorder",
"(",
")",
"{",
"JSession",
"::",
"checkToken",
"(",
")",
"or",
"jexit",
"(",
"JText",
"::",
"_",
"(",
"'JINVALID_TOKEN'",
")",
")",
";",
"JLog",
"::",
"add",
"(",
"'CategoriesControllerCategories::saveorder() is deprecated. Funct... | Save the manual order inputs from the categories list page.
@return void
@since 1.6
@see JControllerAdmin::saveorder()
@deprecated 4.0 | [
"Save",
"the",
"manual",
"order",
"inputs",
"from",
"the",
"categories",
"list",
"page",
"."
] | 9fe50b6c4ebe6ebfcf98e50067922fcf4a76d350 | https://github.com/joomlatools/joomlatools-platform-categories/blob/9fe50b6c4ebe6ebfcf98e50067922fcf4a76d350/administrator/components/com_categories/controllers/categories.php#L77-L99 |
239,967 | joomlatools/joomlatools-platform-categories | administrator/components/com_categories/controllers/categories.php | CategoriesControllerCategories.delete | public function delete()
{
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));
// Get items to remove from the request.
$cid = $this->input->get('cid', array(), 'array');
$extension = $this->input->getCmd('extension', null);
if (!is_array($cid) || count($cid) < 1)
{
JError::raiseWarning(500, ... | php | public function delete()
{
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));
// Get items to remove from the request.
$cid = $this->input->get('cid', array(), 'array');
$extension = $this->input->getCmd('extension', null);
if (!is_array($cid) || count($cid) < 1)
{
JError::raiseWarning(500, ... | [
"public",
"function",
"delete",
"(",
")",
"{",
"JSession",
"::",
"checkToken",
"(",
")",
"or",
"jexit",
"(",
"JText",
"::",
"_",
"(",
"'JINVALID_TOKEN'",
")",
")",
";",
"// Get items to remove from the request.",
"$",
"cid",
"=",
"$",
"this",
"->",
"input",
... | Deletes and returns correctly.
@return void
@since 3.1.2 | [
"Deletes",
"and",
"returns",
"correctly",
"."
] | 9fe50b6c4ebe6ebfcf98e50067922fcf4a76d350 | https://github.com/joomlatools/joomlatools-platform-categories/blob/9fe50b6c4ebe6ebfcf98e50067922fcf4a76d350/administrator/components/com_categories/controllers/categories.php#L108-L141 |
239,968 | joomlatools/joomlatools-platform-categories | administrator/components/com_categories/controllers/categories.php | CategoriesControllerCategories.checkin | public function checkin()
{
// Process parent checkin method.
$result = parent::checkin();
// Overrride the redirect Uri.
$redirectUri = 'index.php?option=' . $this->option . '&view=' . $this->view_list . '&extension=' . $this->input->get('extension', '', 'CMD');
$this->setRedirect(JRoute::_($redirectUri, f... | php | public function checkin()
{
// Process parent checkin method.
$result = parent::checkin();
// Overrride the redirect Uri.
$redirectUri = 'index.php?option=' . $this->option . '&view=' . $this->view_list . '&extension=' . $this->input->get('extension', '', 'CMD');
$this->setRedirect(JRoute::_($redirectUri, f... | [
"public",
"function",
"checkin",
"(",
")",
"{",
"// Process parent checkin method.",
"$",
"result",
"=",
"parent",
"::",
"checkin",
"(",
")",
";",
"// Overrride the redirect Uri.",
"$",
"redirectUri",
"=",
"'index.php?option='",
".",
"$",
"this",
"->",
"option",
"... | Check in of one or more records.
Overrides JControllerAdmin::checkin to redirect to URL with extension.
@return boolean True on success
@since 3.6.0 | [
"Check",
"in",
"of",
"one",
"or",
"more",
"records",
"."
] | 9fe50b6c4ebe6ebfcf98e50067922fcf4a76d350 | https://github.com/joomlatools/joomlatools-platform-categories/blob/9fe50b6c4ebe6ebfcf98e50067922fcf4a76d350/administrator/components/com_categories/controllers/categories.php#L152-L162 |
239,969 | xinc-develop/xinc-core | src/Plugin/Property/Plugin.php | Plugin.parsePropertyFile | public function parsePropertyFile(BuildInterface $build, $fileName)
{
$activeProperty = false;
$trimNextLine = false;
$arr = array();
$fh = fopen($fileName, 'r');
if (is_resource($fh)) {
while ($line = fgets($fh)) {
if (preg_match('/^[!#].*/', $lin... | php | public function parsePropertyFile(BuildInterface $build, $fileName)
{
$activeProperty = false;
$trimNextLine = false;
$arr = array();
$fh = fopen($fileName, 'r');
if (is_resource($fh)) {
while ($line = fgets($fh)) {
if (preg_match('/^[!#].*/', $lin... | [
"public",
"function",
"parsePropertyFile",
"(",
"BuildInterface",
"$",
"build",
",",
"$",
"fileName",
")",
"{",
"$",
"activeProperty",
"=",
"false",
";",
"$",
"trimNextLine",
"=",
"false",
";",
"$",
"arr",
"=",
"array",
"(",
")",
";",
"$",
"fh",
"=",
"... | loads properties from a property file.
@param BuildInterface $build
@param string $fileName | [
"loads",
"properties",
"from",
"a",
"property",
"file",
"."
] | 4bb69a6afe19e1186950a3122cbfe0989823e0d6 | https://github.com/xinc-develop/xinc-core/blob/4bb69a6afe19e1186950a3122cbfe0989823e0d6/src/Plugin/Property/Plugin.php#L44-L92 |
239,970 | znframework/package-services | Restful.php | Restful._customRequest | protected function _customRequest($url, $data, $type)
{
$response = $this->curl->init($this->url ?? $url)
->option('returntransfer', true)
->option('customrequest', strtoupper($type))
->option('ssl_verifypeer', $this->sslVerifyPeer)
... | php | protected function _customRequest($url, $data, $type)
{
$response = $this->curl->init($this->url ?? $url)
->option('returntransfer', true)
->option('customrequest', strtoupper($type))
->option('ssl_verifypeer', $this->sslVerifyPeer)
... | [
"protected",
"function",
"_customRequest",
"(",
"$",
"url",
",",
"$",
"data",
",",
"$",
"type",
")",
"{",
"$",
"response",
"=",
"$",
"this",
"->",
"curl",
"->",
"init",
"(",
"$",
"this",
"->",
"url",
"??",
"$",
"url",
")",
"->",
"option",
"(",
"'... | Protected Custom Request | [
"Protected",
"Custom",
"Request"
] | d603667191e2e386cbc2119836c5bed9e3ade141 | https://github.com/znframework/package-services/blob/d603667191e2e386cbc2119836c5bed9e3ade141/Restful.php#L288-L298 |
239,971 | uthando-cms/uthando-session-manager | src/UthandoSessionManager/Session/SaveHandler/DbTableGateway.php | DbTableGateway.gc | public function gc($maxlifetime)
{
$platform = $this->tableGateway->getAdapter()->getPlatform();
$where = new Where();
$where->lessThan(
$this->options->getModifiedColumn(),
new Expression('(' . time() . ' - ' . $platform->quoteIdentifier($this->options->getLifetimeC... | php | public function gc($maxlifetime)
{
$platform = $this->tableGateway->getAdapter()->getPlatform();
$where = new Where();
$where->lessThan(
$this->options->getModifiedColumn(),
new Expression('(' . time() . ' - ' . $platform->quoteIdentifier($this->options->getLifetimeC... | [
"public",
"function",
"gc",
"(",
"$",
"maxlifetime",
")",
"{",
"$",
"platform",
"=",
"$",
"this",
"->",
"tableGateway",
"->",
"getAdapter",
"(",
")",
"->",
"getPlatform",
"(",
")",
";",
"$",
"where",
"=",
"new",
"Where",
"(",
")",
";",
"$",
"where",
... | Garbage Collection
Only delete sessions that have expired.
@param int $maxlifetime
@return true | [
"Garbage",
"Collection",
"Only",
"delete",
"sessions",
"that",
"have",
"expired",
"."
] | 3bfb0a478d6101d6e6748d8528a2a7fee44af408 | https://github.com/uthando-cms/uthando-session-manager/blob/3bfb0a478d6101d6e6748d8528a2a7fee44af408/src/UthandoSessionManager/Session/SaveHandler/DbTableGateway.php#L31-L60 |
239,972 | setrun/setrun-component-user | src/repositories/UserRepository.php | UserRepository.save | public function save(User $user) : bool
{
if (!$user->save()) {
throw new \RuntimeException($this->i18n->t('setrun/user', 'Saving error'));
}
return true;
} | php | public function save(User $user) : bool
{
if (!$user->save()) {
throw new \RuntimeException($this->i18n->t('setrun/user', 'Saving error'));
}
return true;
} | [
"public",
"function",
"save",
"(",
"User",
"$",
"user",
")",
":",
"bool",
"{",
"if",
"(",
"!",
"$",
"user",
"->",
"save",
"(",
")",
")",
"{",
"throw",
"new",
"\\",
"RuntimeException",
"(",
"$",
"this",
"->",
"i18n",
"->",
"t",
"(",
"'setrun/user'",... | Save user.
@param User $user
@return bool | [
"Save",
"user",
"."
] | 6aca4c62f099918032b66da1f94d7565694a0735 | https://github.com/setrun/setrun-component-user/blob/6aca4c62f099918032b66da1f94d7565694a0735/src/repositories/UserRepository.php#L138-L144 |
239,973 | setrun/setrun-component-user | src/repositories/UserRepository.php | UserRepository.remove | public function remove(User $user) : bool
{
if (!$user->delete()) {
throw new \RuntimeException($this->i18n->t('setrun/user', 'Removing error'));
}
return true;
} | php | public function remove(User $user) : bool
{
if (!$user->delete()) {
throw new \RuntimeException($this->i18n->t('setrun/user', 'Removing error'));
}
return true;
} | [
"public",
"function",
"remove",
"(",
"User",
"$",
"user",
")",
":",
"bool",
"{",
"if",
"(",
"!",
"$",
"user",
"->",
"delete",
"(",
")",
")",
"{",
"throw",
"new",
"\\",
"RuntimeException",
"(",
"$",
"this",
"->",
"i18n",
"->",
"t",
"(",
"'setrun/use... | Remove user.
@param User $user
@return bool | [
"Remove",
"user",
"."
] | 6aca4c62f099918032b66da1f94d7565694a0735 | https://github.com/setrun/setrun-component-user/blob/6aca4c62f099918032b66da1f94d7565694a0735/src/repositories/UserRepository.php#L151-L157 |
239,974 | setrun/setrun-component-user | src/repositories/UserRepository.php | UserRepository.getBy | public function getBy(array $condition) : User
{
if (!$user = User::find()->andWhere($condition)->limit(1)->one()) {
throw new NotFoundException($this->i18n->t('setrun/user', 'User not found'));
}
return $user;
} | php | public function getBy(array $condition) : User
{
if (!$user = User::find()->andWhere($condition)->limit(1)->one()) {
throw new NotFoundException($this->i18n->t('setrun/user', 'User not found'));
}
return $user;
} | [
"public",
"function",
"getBy",
"(",
"array",
"$",
"condition",
")",
":",
"User",
"{",
"if",
"(",
"!",
"$",
"user",
"=",
"User",
"::",
"find",
"(",
")",
"->",
"andWhere",
"(",
"$",
"condition",
")",
"->",
"limit",
"(",
"1",
")",
"->",
"one",
"(",
... | Get user by condition.
@param array $condition
@return User|array | [
"Get",
"user",
"by",
"condition",
"."
] | 6aca4c62f099918032b66da1f94d7565694a0735 | https://github.com/setrun/setrun-component-user/blob/6aca4c62f099918032b66da1f94d7565694a0735/src/repositories/UserRepository.php#L164-L170 |
239,975 | jakecleary/ultrapress-library | src/Ultra/View/View.php | View.load | private static function load($path)
{
$path = str_replace('.', '/', $path);
$path = FULL_PATH . $path;
if(substr($path, -4) != '.php')
{
$path = $path . '.php';
}
return $path;
} | php | private static function load($path)
{
$path = str_replace('.', '/', $path);
$path = FULL_PATH . $path;
if(substr($path, -4) != '.php')
{
$path = $path . '.php';
}
return $path;
} | [
"private",
"static",
"function",
"load",
"(",
"$",
"path",
")",
"{",
"$",
"path",
"=",
"str_replace",
"(",
"'.'",
",",
"'/'",
",",
"$",
"path",
")",
";",
"$",
"path",
"=",
"FULL_PATH",
".",
"$",
"path",
";",
"if",
"(",
"substr",
"(",
"$",
"path",... | Grab a file, while specifying an optional subdirectory of views.
@param string $file The path of file relative to /
@return string The full path to the file | [
"Grab",
"a",
"file",
"while",
"specifying",
"an",
"optional",
"subdirectory",
"of",
"views",
"."
] | 84ca5d1dae8eb16de8c886787575ea41f9332ae2 | https://github.com/jakecleary/ultrapress-library/blob/84ca5d1dae8eb16de8c886787575ea41f9332ae2/src/Ultra/View/View.php#L18-L30 |
239,976 | jakecleary/ultrapress-library | src/Ultra/View/View.php | View.get | public static function get($file, $data = [])
{
$path = self::load('views.' . $file);
extract($data, EXTR_SKIP);
include $path;
} | php | public static function get($file, $data = [])
{
$path = self::load('views.' . $file);
extract($data, EXTR_SKIP);
include $path;
} | [
"public",
"static",
"function",
"get",
"(",
"$",
"file",
",",
"$",
"data",
"=",
"[",
"]",
")",
"{",
"$",
"path",
"=",
"self",
"::",
"load",
"(",
"'views.'",
".",
"$",
"file",
")",
";",
"extract",
"(",
"$",
"data",
",",
"EXTR_SKIP",
")",
";",
"i... | Include a view with data.
@param string $file The template you want to display
@param object $item The optional data of the current object in the loop | [
"Include",
"a",
"view",
"with",
"data",
"."
] | 84ca5d1dae8eb16de8c886787575ea41f9332ae2 | https://github.com/jakecleary/ultrapress-library/blob/84ca5d1dae8eb16de8c886787575ea41f9332ae2/src/Ultra/View/View.php#L38-L45 |
239,977 | jakecleary/ultrapress-library | src/Ultra/View/View.php | View.parse | private static function parse($file, $data)
{
$file = file_get_contents($file, FILE_USE_INCLUDE_PATH);
// Go through each variable and replace the values
foreach($data as $key => $value)
{
$pattern = '{{{' . $key . '}}}';
$file = preg_replace($pattern, $value... | php | private static function parse($file, $data)
{
$file = file_get_contents($file, FILE_USE_INCLUDE_PATH);
// Go through each variable and replace the values
foreach($data as $key => $value)
{
$pattern = '{{{' . $key . '}}}';
$file = preg_replace($pattern, $value... | [
"private",
"static",
"function",
"parse",
"(",
"$",
"file",
",",
"$",
"data",
")",
"{",
"$",
"file",
"=",
"file_get_contents",
"(",
"$",
"file",
",",
"FILE_USE_INCLUDE_PATH",
")",
";",
"// Go through each variable and replace the values",
"foreach",
"(",
"$",
"d... | Parse a template with some data.
@param string $file The template file we want the data to be put into
@param array $data The data structure
@return string|boolean The filled-put template OR false | [
"Parse",
"a",
"template",
"with",
"some",
"data",
"."
] | 84ca5d1dae8eb16de8c886787575ea41f9332ae2 | https://github.com/jakecleary/ultrapress-library/blob/84ca5d1dae8eb16de8c886787575ea41f9332ae2/src/Ultra/View/View.php#L69-L86 |
239,978 | kiler129/CherryHttp | src/IO/Exception/BufferOverflowException.php | BufferOverflowException.setOverflowMagnitude | public function setOverflowMagnitude($magnitude)
{
if ($magnitude < 0) {
throw new \LogicException('Overflow magnitude cannot be negative.');
}
if (!is_numeric($magnitude)) {
throw new \InvalidArgumentException('Overflow magnitude should be a number.');
}
... | php | public function setOverflowMagnitude($magnitude)
{
if ($magnitude < 0) {
throw new \LogicException('Overflow magnitude cannot be negative.');
}
if (!is_numeric($magnitude)) {
throw new \InvalidArgumentException('Overflow magnitude should be a number.');
}
... | [
"public",
"function",
"setOverflowMagnitude",
"(",
"$",
"magnitude",
")",
"{",
"if",
"(",
"$",
"magnitude",
"<",
"0",
")",
"{",
"throw",
"new",
"\\",
"LogicException",
"(",
"'Overflow magnitude cannot be negative.'",
")",
";",
"}",
"if",
"(",
"!",
"is_numeric"... | Sets how big overflow is.
@param number $magnitude Positive number.
@throws \InvalidArgumentException Non-numeric magnitude specified.
@throws \LogicException Negative magnitude specified. | [
"Sets",
"how",
"big",
"overflow",
"is",
"."
] | 05927f26183cbd6fd5ccb0853befecdea279308d | https://github.com/kiler129/CherryHttp/blob/05927f26183cbd6fd5ccb0853befecdea279308d/src/IO/Exception/BufferOverflowException.php#L42-L53 |
239,979 | mooti/framework | src/Config/AbstractConfig.php | AbstractConfig.getFilepath | public function getFilepath()
{
if (isset($this->dirPath)) {
$filepath = $this->dirPath .'/'.$this->filename;
} else {
$fileSystem = $this->createNew(FileSystem::class);
$filepath = $fileSystem->getCurrentWorkingDirectory() .'/'.$this->filename;
}
... | php | public function getFilepath()
{
if (isset($this->dirPath)) {
$filepath = $this->dirPath .'/'.$this->filename;
} else {
$fileSystem = $this->createNew(FileSystem::class);
$filepath = $fileSystem->getCurrentWorkingDirectory() .'/'.$this->filename;
}
... | [
"public",
"function",
"getFilepath",
"(",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"dirPath",
")",
")",
"{",
"$",
"filepath",
"=",
"$",
"this",
"->",
"dirPath",
".",
"'/'",
".",
"$",
"this",
"->",
"filename",
";",
"}",
"else",
"{",
"... | Get the full file path of the config file
@return string The full file path | [
"Get",
"the",
"full",
"file",
"path",
"of",
"the",
"config",
"file"
] | 078da6699c5c6c7ac4e5a3d36751d645ad8aa93e | https://github.com/mooti/framework/blob/078da6699c5c6c7ac4e5a3d36751d645ad8aa93e/src/Config/AbstractConfig.php#L113-L122 |
239,980 | mooti/framework | src/Config/AbstractConfig.php | AbstractConfig.validateConfig | public function validateConfig(array $rules, array $configData)
{
$validator = $this->createNew(Validator::class);
if ($validator->isValid($rules, $configData) == false) {
throw new DataValidationException('The config is invalid: ' . print_r($validator->getErrors(), 1));
... | php | public function validateConfig(array $rules, array $configData)
{
$validator = $this->createNew(Validator::class);
if ($validator->isValid($rules, $configData) == false) {
throw new DataValidationException('The config is invalid: ' . print_r($validator->getErrors(), 1));
... | [
"public",
"function",
"validateConfig",
"(",
"array",
"$",
"rules",
",",
"array",
"$",
"configData",
")",
"{",
"$",
"validator",
"=",
"$",
"this",
"->",
"createNew",
"(",
"Validator",
"::",
"class",
")",
";",
"if",
"(",
"$",
"validator",
"->",
"isValid",... | Validate some config data
@param array $rules The config rules
@param array $configData The config data
@throws Mooti\Framework\Exception\DataValidationException | [
"Validate",
"some",
"config",
"data"
] | 078da6699c5c6c7ac4e5a3d36751d645ad8aa93e | https://github.com/mooti/framework/blob/078da6699c5c6c7ac4e5a3d36751d645ad8aa93e/src/Config/AbstractConfig.php#L132-L139 |
239,981 | mooti/framework | src/Config/AbstractConfig.php | AbstractConfig.open | public function open()
{
$fileSystem = $this->createNew(FileSystem::class);
$filepath = $this->getFilepath();
$contents = $fileSystem->fileGetContents($filepath);
$this->configData = json_decode($contents, true);
if (isset($this->configData) == false) {
throw ... | php | public function open()
{
$fileSystem = $this->createNew(FileSystem::class);
$filepath = $this->getFilepath();
$contents = $fileSystem->fileGetContents($filepath);
$this->configData = json_decode($contents, true);
if (isset($this->configData) == false) {
throw ... | [
"public",
"function",
"open",
"(",
")",
"{",
"$",
"fileSystem",
"=",
"$",
"this",
"->",
"createNew",
"(",
"FileSystem",
"::",
"class",
")",
";",
"$",
"filepath",
"=",
"$",
"this",
"->",
"getFilepath",
"(",
")",
";",
"$",
"contents",
"=",
"$",
"fileSy... | Open the config file and populate the config data
@throws Mooti\Framework\Exception\MalformedDataException | [
"Open",
"the",
"config",
"file",
"and",
"populate",
"the",
"config",
"data"
] | 078da6699c5c6c7ac4e5a3d36751d645ad8aa93e | https://github.com/mooti/framework/blob/078da6699c5c6c7ac4e5a3d36751d645ad8aa93e/src/Config/AbstractConfig.php#L146-L160 |
239,982 | mooti/framework | src/Config/AbstractConfig.php | AbstractConfig.save | public function save()
{
$filepath = $this->getFilepath();
$this->validateConfig($this->rules, $this->configData);
$fileSystem = $this->createNew(FileSystem::class);
$fileSystem->filePutContents($filepath, json_encode($this->configData, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES));
... | php | public function save()
{
$filepath = $this->getFilepath();
$this->validateConfig($this->rules, $this->configData);
$fileSystem = $this->createNew(FileSystem::class);
$fileSystem->filePutContents($filepath, json_encode($this->configData, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES));
... | [
"public",
"function",
"save",
"(",
")",
"{",
"$",
"filepath",
"=",
"$",
"this",
"->",
"getFilepath",
"(",
")",
";",
"$",
"this",
"->",
"validateConfig",
"(",
"$",
"this",
"->",
"rules",
",",
"$",
"this",
"->",
"configData",
")",
";",
"$",
"fileSystem... | Save the config file based on the config data | [
"Save",
"the",
"config",
"file",
"based",
"on",
"the",
"config",
"data"
] | 078da6699c5c6c7ac4e5a3d36751d645ad8aa93e | https://github.com/mooti/framework/blob/078da6699c5c6c7ac4e5a3d36751d645ad8aa93e/src/Config/AbstractConfig.php#L166-L172 |
239,983 | mcfedr/youtubelivestreamsbundle | src/Mcfedr/YouTube/LiveStreamsBundle/Streams/YouTubeStreamsLoader.php | YouTubeStreamsLoader.getStreams | public function getStreams($channelId = null)
{
if (!$channelId) {
$channelId = $this->channelId;
}
if (!$channelId) {
throw new MissingChannelIdException("You must specify the channel id");
}
if ($this->cache) {
$data = $this->cache->fet... | php | public function getStreams($channelId = null)
{
if (!$channelId) {
$channelId = $this->channelId;
}
if (!$channelId) {
throw new MissingChannelIdException("You must specify the channel id");
}
if ($this->cache) {
$data = $this->cache->fet... | [
"public",
"function",
"getStreams",
"(",
"$",
"channelId",
"=",
"null",
")",
"{",
"if",
"(",
"!",
"$",
"channelId",
")",
"{",
"$",
"channelId",
"=",
"$",
"this",
"->",
"channelId",
";",
"}",
"if",
"(",
"!",
"$",
"channelId",
")",
"{",
"throw",
"new... | Get the list of videos from YouTube
@param string $channelId
@throws \Mcfedr\YouTube\LiveStreamsBundle\Exception\MissingChannelIdException
@return array | [
"Get",
"the",
"list",
"of",
"videos",
"from",
"YouTube"
] | 4a82d3b4e2722a629654c6c2a0aeaa178bb4a6cb | https://github.com/mcfedr/youtubelivestreamsbundle/blob/4a82d3b4e2722a629654c6c2a0aeaa178bb4a6cb/src/Mcfedr/YouTube/LiveStreamsBundle/Streams/YouTubeStreamsLoader.php#L55-L130 |
239,984 | jakecleary/ultrapress-library | src/Ultra/Config/Config.php | Config.get | public static function get($file, $key = false, $force = false)
{
$item = self::read($file, $force);
if($item === false)
{
return false;
}
if($key != false && isset($item[$key]))
{
return $item[$key];
}
return $item;
} | php | public static function get($file, $key = false, $force = false)
{
$item = self::read($file, $force);
if($item === false)
{
return false;
}
if($key != false && isset($item[$key]))
{
return $item[$key];
}
return $item;
} | [
"public",
"static",
"function",
"get",
"(",
"$",
"file",
",",
"$",
"key",
"=",
"false",
",",
"$",
"force",
"=",
"false",
")",
"{",
"$",
"item",
"=",
"self",
"::",
"read",
"(",
"$",
"file",
",",
"$",
"force",
")",
";",
"if",
"(",
"$",
"item",
... | Get the key from a config file.
@param string $file The name of the config file
@param string $key The name of the array key
@param boolean $force = false Force read the config from file
@return * $data The data stored in that key | [
"Get",
"the",
"key",
"from",
"a",
"config",
"file",
"."
] | 84ca5d1dae8eb16de8c886787575ea41f9332ae2 | https://github.com/jakecleary/ultrapress-library/blob/84ca5d1dae8eb16de8c886787575ea41f9332ae2/src/Ultra/Config/Config.php#L72-L87 |
239,985 | AlcyZ/Alcys-ORM | src/Core/Db/Facade/JoinFacade.php | JoinFacade.inner | public function inner($table, array $optionalTables = array())
{
$preparedTablesArray = $this->_getPreparedTableObjects($table, $optionalTables);
$this->join->inner($preparedTablesArray['table'], $preparedTablesArray['optionalTables']);
return $this;
} | php | public function inner($table, array $optionalTables = array())
{
$preparedTablesArray = $this->_getPreparedTableObjects($table, $optionalTables);
$this->join->inner($preparedTablesArray['table'], $preparedTablesArray['optionalTables']);
return $this;
} | [
"public",
"function",
"inner",
"(",
"$",
"table",
",",
"array",
"$",
"optionalTables",
"=",
"array",
"(",
")",
")",
"{",
"$",
"preparedTablesArray",
"=",
"$",
"this",
"->",
"_getPreparedTableObjects",
"(",
"$",
"table",
",",
"$",
"optionalTables",
")",
";"... | Join the expected table with an inner join.
In the second argument can pass optional tables for the join operation.
@param string $table Name of the table for the join.
@param array $optionalTables (Optional) Array with table names as elements
@return $this The same instance to concatenate methods. | [
"Join",
"the",
"expected",
"table",
"with",
"an",
"inner",
"join",
".",
"In",
"the",
"second",
"argument",
"can",
"pass",
"optional",
"tables",
"for",
"the",
"join",
"operation",
"."
] | dd30946ad35ab06cba2167cf6dfa02b733614720 | https://github.com/AlcyZ/Alcys-ORM/blob/dd30946ad35ab06cba2167cf6dfa02b733614720/src/Core/Db/Facade/JoinFacade.php#L77-L83 |
239,986 | AlcyZ/Alcys-ORM | src/Core/Db/Facade/JoinFacade.php | JoinFacade.left | public function left($table, array $optionalTables = array())
{
$preparedTablesArray = $this->_getPreparedTableObjects($table, $optionalTables);
$this->join->left($preparedTablesArray['table'], $preparedTablesArray['optionalTables']);
return $this;
} | php | public function left($table, array $optionalTables = array())
{
$preparedTablesArray = $this->_getPreparedTableObjects($table, $optionalTables);
$this->join->left($preparedTablesArray['table'], $preparedTablesArray['optionalTables']);
return $this;
} | [
"public",
"function",
"left",
"(",
"$",
"table",
",",
"array",
"$",
"optionalTables",
"=",
"array",
"(",
")",
")",
"{",
"$",
"preparedTablesArray",
"=",
"$",
"this",
"->",
"_getPreparedTableObjects",
"(",
"$",
"table",
",",
"$",
"optionalTables",
")",
";",... | Join the expected table with a left join.
In the second argument can pass optional tables for the join operation.
@param string $table Name of the table for the join.
@param array $optionalTables (Optional) Array with table names as elements
@return $this The same instance to concatenate methods. | [
"Join",
"the",
"expected",
"table",
"with",
"a",
"left",
"join",
".",
"In",
"the",
"second",
"argument",
"can",
"pass",
"optional",
"tables",
"for",
"the",
"join",
"operation",
"."
] | dd30946ad35ab06cba2167cf6dfa02b733614720 | https://github.com/AlcyZ/Alcys-ORM/blob/dd30946ad35ab06cba2167cf6dfa02b733614720/src/Core/Db/Facade/JoinFacade.php#L95-L101 |
239,987 | AlcyZ/Alcys-ORM | src/Core/Db/Facade/JoinFacade.php | JoinFacade.right | public function right($table, array $optionalTables = array())
{
$preparedTablesArray = $this->_getPreparedTableObjects($table, $optionalTables);
$this->join->right($preparedTablesArray['table'], $preparedTablesArray['optionalTables']);
return $this;
} | php | public function right($table, array $optionalTables = array())
{
$preparedTablesArray = $this->_getPreparedTableObjects($table, $optionalTables);
$this->join->right($preparedTablesArray['table'], $preparedTablesArray['optionalTables']);
return $this;
} | [
"public",
"function",
"right",
"(",
"$",
"table",
",",
"array",
"$",
"optionalTables",
"=",
"array",
"(",
")",
")",
"{",
"$",
"preparedTablesArray",
"=",
"$",
"this",
"->",
"_getPreparedTableObjects",
"(",
"$",
"table",
",",
"$",
"optionalTables",
")",
";"... | Join the expected table with a right join.
In the second argument can pass optional tables for the join operation.
@param string $table Name of the table for the join.
@param array $optionalTables (Optional) Array with table names as elements
@return $this The same instance to concatenate methods. | [
"Join",
"the",
"expected",
"table",
"with",
"a",
"right",
"join",
".",
"In",
"the",
"second",
"argument",
"can",
"pass",
"optional",
"tables",
"for",
"the",
"join",
"operation",
"."
] | dd30946ad35ab06cba2167cf6dfa02b733614720 | https://github.com/AlcyZ/Alcys-ORM/blob/dd30946ad35ab06cba2167cf6dfa02b733614720/src/Core/Db/Facade/JoinFacade.php#L113-L119 |
239,988 | AlcyZ/Alcys-ORM | src/Core/Db/Facade/JoinFacade.php | JoinFacade.leftOuter | public function leftOuter($table, array $optionalTables = array())
{
$preparedTablesArray = $this->_getPreparedTableObjects($table, $optionalTables);
$this->join->leftOuter($preparedTablesArray['table'], $preparedTablesArray['optionalTables']);
return $this;
} | php | public function leftOuter($table, array $optionalTables = array())
{
$preparedTablesArray = $this->_getPreparedTableObjects($table, $optionalTables);
$this->join->leftOuter($preparedTablesArray['table'], $preparedTablesArray['optionalTables']);
return $this;
} | [
"public",
"function",
"leftOuter",
"(",
"$",
"table",
",",
"array",
"$",
"optionalTables",
"=",
"array",
"(",
")",
")",
"{",
"$",
"preparedTablesArray",
"=",
"$",
"this",
"->",
"_getPreparedTableObjects",
"(",
"$",
"table",
",",
"$",
"optionalTables",
")",
... | Join the expected table with a left outer join.
In the second argument can pass optional tables for the join operation.
@param string $table Name of the table for the join.
@param array $optionalTables (Optional) Array with table names as elements
@return $this The same instance to concatenate methods. | [
"Join",
"the",
"expected",
"table",
"with",
"a",
"left",
"outer",
"join",
".",
"In",
"the",
"second",
"argument",
"can",
"pass",
"optional",
"tables",
"for",
"the",
"join",
"operation",
"."
] | dd30946ad35ab06cba2167cf6dfa02b733614720 | https://github.com/AlcyZ/Alcys-ORM/blob/dd30946ad35ab06cba2167cf6dfa02b733614720/src/Core/Db/Facade/JoinFacade.php#L131-L137 |
239,989 | AlcyZ/Alcys-ORM | src/Core/Db/Facade/JoinFacade.php | JoinFacade.rightOuter | public function rightOuter($table, array $optionalTables = array())
{
$preparedTablesArray = $this->_getPreparedTableObjects($table, $optionalTables);
$this->join->rightOuter($preparedTablesArray['table'], $preparedTablesArray['optionalTables']);
return $this;
} | php | public function rightOuter($table, array $optionalTables = array())
{
$preparedTablesArray = $this->_getPreparedTableObjects($table, $optionalTables);
$this->join->rightOuter($preparedTablesArray['table'], $preparedTablesArray['optionalTables']);
return $this;
} | [
"public",
"function",
"rightOuter",
"(",
"$",
"table",
",",
"array",
"$",
"optionalTables",
"=",
"array",
"(",
")",
")",
"{",
"$",
"preparedTablesArray",
"=",
"$",
"this",
"->",
"_getPreparedTableObjects",
"(",
"$",
"table",
",",
"$",
"optionalTables",
")",
... | Join the expected table with a right outer join.
In the second argument can pass optional tables for the join operation.
@param string $table Name of the table for the join.
@param array $optionalTables (Optional) Array with table names as elements
@return $this The same instance to concatenate methods. | [
"Join",
"the",
"expected",
"table",
"with",
"a",
"right",
"outer",
"join",
".",
"In",
"the",
"second",
"argument",
"can",
"pass",
"optional",
"tables",
"for",
"the",
"join",
"operation",
"."
] | dd30946ad35ab06cba2167cf6dfa02b733614720 | https://github.com/AlcyZ/Alcys-ORM/blob/dd30946ad35ab06cba2167cf6dfa02b733614720/src/Core/Db/Facade/JoinFacade.php#L149-L155 |
239,990 | AlcyZ/Alcys-ORM | src/Core/Db/Facade/JoinFacade.php | JoinFacade._getPreparedTableObjects | private function _getPreparedTableObjects($table, array $optionalTables)
{
$tableObj = $this->factory->references('Table', $table);
$optionalTablesObj = array();
foreach($optionalTables as $tbl)
{
$optionalTablesObj[] = $this->factory->references('Table', $tbl);
}
return array('table' => $tabl... | php | private function _getPreparedTableObjects($table, array $optionalTables)
{
$tableObj = $this->factory->references('Table', $table);
$optionalTablesObj = array();
foreach($optionalTables as $tbl)
{
$optionalTablesObj[] = $this->factory->references('Table', $tbl);
}
return array('table' => $tabl... | [
"private",
"function",
"_getPreparedTableObjects",
"(",
"$",
"table",
",",
"array",
"$",
"optionalTables",
")",
"{",
"$",
"tableObj",
"=",
"$",
"this",
"->",
"factory",
"->",
"references",
"(",
"'Table'",
",",
"$",
"table",
")",
";",
"$",
"optionalTablesObj"... | Create table objects from the passed arguments.
An array will return with the key 'table' for the main table and 'optionalTables' for optional tables.
When no optional tables are passed, the key 'optionalTables' return an empty array.
@param string $table Name of the main table.
@param array $optionalTables ... | [
"Create",
"table",
"objects",
"from",
"the",
"passed",
"arguments",
".",
"An",
"array",
"will",
"return",
"with",
"the",
"key",
"table",
"for",
"the",
"main",
"table",
"and",
"optionalTables",
"for",
"optional",
"tables",
".",
"When",
"no",
"optional",
"tabl... | dd30946ad35ab06cba2167cf6dfa02b733614720 | https://github.com/AlcyZ/Alcys-ORM/blob/dd30946ad35ab06cba2167cf6dfa02b733614720/src/Core/Db/Facade/JoinFacade.php#L237-L247 |
239,991 | AlcyZ/Alcys-ORM | src/Core/Db/Facade/JoinFacade.php | JoinFacade._checkOnArguments | private function _checkOnArguments(array $firstColumn, array $secondColumn)
{
if(!array_key_exists('column', $firstColumn) || !array_key_exists('table', $firstColumn) ||
!array_key_exists('column', $secondColumn) || !array_key_exists('table', $secondColumn)
)
{
throw new \InvalidArgumentException('Both a... | php | private function _checkOnArguments(array $firstColumn, array $secondColumn)
{
if(!array_key_exists('column', $firstColumn) || !array_key_exists('table', $firstColumn) ||
!array_key_exists('column', $secondColumn) || !array_key_exists('table', $secondColumn)
)
{
throw new \InvalidArgumentException('Both a... | [
"private",
"function",
"_checkOnArguments",
"(",
"array",
"$",
"firstColumn",
",",
"array",
"$",
"secondColumn",
")",
"{",
"if",
"(",
"!",
"array_key_exists",
"(",
"'column'",
",",
"$",
"firstColumn",
")",
"||",
"!",
"array_key_exists",
"(",
"'table'",
",",
... | Check the passed arguments of the on method. If they don't have keys equivalent to column and table,
an invalid argument exception will thrown.
@param array $firstColumn First argument of on method.
@param array $secondColumn Second argument of on method. | [
"Check",
"the",
"passed",
"arguments",
"of",
"the",
"on",
"method",
".",
"If",
"they",
"don",
"t",
"have",
"keys",
"equivalent",
"to",
"column",
"and",
"table",
"an",
"invalid",
"argument",
"exception",
"will",
"thrown",
"."
] | dd30946ad35ab06cba2167cf6dfa02b733614720 | https://github.com/AlcyZ/Alcys-ORM/blob/dd30946ad35ab06cba2167cf6dfa02b733614720/src/Core/Db/Facade/JoinFacade.php#L257-L265 |
239,992 | weew/kernel | src/Weew/Kernel/Kernel.php | Kernel.createEach | protected function createEach() {
foreach ($this->providers as $class => &$data) {
if ( ! array_get($data, 'instance')) {
$instance = $this->getProviderInvoker()
->create($class, $this->getSharedArguments());
array_set($data, 'instance', $instance)... | php | protected function createEach() {
foreach ($this->providers as $class => &$data) {
if ( ! array_get($data, 'instance')) {
$instance = $this->getProviderInvoker()
->create($class, $this->getSharedArguments());
array_set($data, 'instance', $instance)... | [
"protected",
"function",
"createEach",
"(",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"providers",
"as",
"$",
"class",
"=>",
"&",
"$",
"data",
")",
"{",
"if",
"(",
"!",
"array_get",
"(",
"$",
"data",
",",
"'instance'",
")",
")",
"{",
"$",
"insta... | Instantiate all providers. | [
"Instantiate",
"all",
"providers",
"."
] | 4dada4aa36ed1f5bebad2a2864941c68fa568a58 | https://github.com/weew/kernel/blob/4dada4aa36ed1f5bebad2a2864941c68fa568a58/src/Weew/Kernel/Kernel.php#L49-L60 |
239,993 | weew/kernel | src/Weew/Kernel/Kernel.php | Kernel.configureEach | protected function configureEach() {
foreach ($this->providers as $class => &$data) {
if ( ! array_contains(array_get($data, 'tags'), ProviderTag::CONFIGURED)) {
$this->create();
array_add($data, 'tags', ProviderTag::CONFIGURED);
$instance = array_get... | php | protected function configureEach() {
foreach ($this->providers as $class => &$data) {
if ( ! array_contains(array_get($data, 'tags'), ProviderTag::CONFIGURED)) {
$this->create();
array_add($data, 'tags', ProviderTag::CONFIGURED);
$instance = array_get... | [
"protected",
"function",
"configureEach",
"(",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"providers",
"as",
"$",
"class",
"=>",
"&",
"$",
"data",
")",
"{",
"if",
"(",
"!",
"array_contains",
"(",
"array_get",
"(",
"$",
"data",
",",
"'tags'",
")",
"... | Configure all providers.
@return void | [
"Configure",
"all",
"providers",
"."
] | 4dada4aa36ed1f5bebad2a2864941c68fa568a58 | https://github.com/weew/kernel/blob/4dada4aa36ed1f5bebad2a2864941c68fa568a58/src/Weew/Kernel/Kernel.php#L76-L93 |
239,994 | weew/kernel | src/Weew/Kernel/Kernel.php | Kernel.initializeEach | protected function initializeEach() {
foreach ($this->providers as $class => &$data) {
if ( ! array_contains(array_get($data, 'tags'), ProviderTag::INITIALIZED)) {
$this->configure();
array_add($data, 'tags', ProviderTag::INITIALIZED);
$instance = arr... | php | protected function initializeEach() {
foreach ($this->providers as $class => &$data) {
if ( ! array_contains(array_get($data, 'tags'), ProviderTag::INITIALIZED)) {
$this->configure();
array_add($data, 'tags', ProviderTag::INITIALIZED);
$instance = arr... | [
"protected",
"function",
"initializeEach",
"(",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"providers",
"as",
"$",
"class",
"=>",
"&",
"$",
"data",
")",
"{",
"if",
"(",
"!",
"array_contains",
"(",
"array_get",
"(",
"$",
"data",
",",
"'tags'",
")",
... | Initialize all providers.
@return void | [
"Initialize",
"all",
"providers",
"."
] | 4dada4aa36ed1f5bebad2a2864941c68fa568a58 | https://github.com/weew/kernel/blob/4dada4aa36ed1f5bebad2a2864941c68fa568a58/src/Weew/Kernel/Kernel.php#L109-L126 |
239,995 | weew/kernel | src/Weew/Kernel/Kernel.php | Kernel.bootEach | protected function bootEach() {
foreach ($this->providers as $class => &$data) {
if ( ! array_contains(array_get($data, 'tags'), ProviderTag::BOOTED)) {
$this->initialize();
array_add($data, 'tags', ProviderTag::BOOTED);
$instance = array_get($data, '... | php | protected function bootEach() {
foreach ($this->providers as $class => &$data) {
if ( ! array_contains(array_get($data, 'tags'), ProviderTag::BOOTED)) {
$this->initialize();
array_add($data, 'tags', ProviderTag::BOOTED);
$instance = array_get($data, '... | [
"protected",
"function",
"bootEach",
"(",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"providers",
"as",
"$",
"class",
"=>",
"&",
"$",
"data",
")",
"{",
"if",
"(",
"!",
"array_contains",
"(",
"array_get",
"(",
"$",
"data",
",",
"'tags'",
")",
",",
... | Boot all providers.
@return void | [
"Boot",
"all",
"providers",
"."
] | 4dada4aa36ed1f5bebad2a2864941c68fa568a58 | https://github.com/weew/kernel/blob/4dada4aa36ed1f5bebad2a2864941c68fa568a58/src/Weew/Kernel/Kernel.php#L142-L159 |
239,996 | weew/kernel | src/Weew/Kernel/Kernel.php | Kernel.shutdownEach | protected function shutdownEach() {
foreach ($this->providers as $class => &$data) {
if ( ! array_contains(array_get($data, 'tags'), ProviderTag::SHUTDOWN)) {
$this->boot();
array_add($data, 'tags', ProviderTag::SHUTDOWN);
$instance = array_get($data,... | php | protected function shutdownEach() {
foreach ($this->providers as $class => &$data) {
if ( ! array_contains(array_get($data, 'tags'), ProviderTag::SHUTDOWN)) {
$this->boot();
array_add($data, 'tags', ProviderTag::SHUTDOWN);
$instance = array_get($data,... | [
"protected",
"function",
"shutdownEach",
"(",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"providers",
"as",
"$",
"class",
"=>",
"&",
"$",
"data",
")",
"{",
"if",
"(",
"!",
"array_contains",
"(",
"array_get",
"(",
"$",
"data",
",",
"'tags'",
")",
",... | Shutdown all providers. | [
"Shutdown",
"all",
"providers",
"."
] | 4dada4aa36ed1f5bebad2a2864941c68fa568a58 | https://github.com/weew/kernel/blob/4dada4aa36ed1f5bebad2a2864941c68fa568a58/src/Weew/Kernel/Kernel.php#L177-L194 |
239,997 | antaresproject/tester | src/Adapter/MessageAdapter.php | MessageAdapter.add | public function add($message, $code, $type)
{
$default = ['message' => $message, 'code' => $code, 'type' => $type];
if ($type == 'error' && is_numeric($code) && $code >= 0) {
$default['descriptor'] = array_search($code, $this->codes['codes']);
}
if ($this->domain !== self... | php | public function add($message, $code, $type)
{
$default = ['message' => $message, 'code' => $code, 'type' => $type];
if ($type == 'error' && is_numeric($code) && $code >= 0) {
$default['descriptor'] = array_search($code, $this->codes['codes']);
}
if ($this->domain !== self... | [
"public",
"function",
"add",
"(",
"$",
"message",
",",
"$",
"code",
",",
"$",
"type",
")",
"{",
"$",
"default",
"=",
"[",
"'message'",
"=>",
"$",
"message",
",",
"'code'",
"=>",
"$",
"code",
",",
"'type'",
"=>",
"$",
"type",
"]",
";",
"if",
"(",
... | add message to container;
@param String $message
@param numeric $code
@param String $type
@return \Antares\Tester\Adapter\ResponseAdapter | [
"add",
"message",
"to",
"container",
";"
] | 23e9b4dd7880475769486a8c8f979ab6530c99df | https://github.com/antaresproject/tester/blob/23e9b4dd7880475769486a8c8f979ab6530c99df/src/Adapter/MessageAdapter.php#L91-L102 |
239,998 | 20centcroak/DBManagement | src/DbManagementTable.php | DbManagementTable.populate | public function populate(DbManagement $db, DbManagementObject $DbManagementObject, $query)
{
$keys = array_values($DbManagementObject->getKeys());
$db->add($query, $keys);
$array = array_values($DbManagementObject->getValues());
$db->query($query, $array);
return $db... | php | public function populate(DbManagement $db, DbManagementObject $DbManagementObject, $query)
{
$keys = array_values($DbManagementObject->getKeys());
$db->add($query, $keys);
$array = array_values($DbManagementObject->getValues());
$db->query($query, $array);
return $db... | [
"public",
"function",
"populate",
"(",
"DbManagement",
"$",
"db",
",",
"DbManagementObject",
"$",
"DbManagementObject",
",",
"$",
"query",
")",
"{",
"$",
"keys",
"=",
"array_values",
"(",
"$",
"DbManagementObject",
"->",
"getKeys",
"(",
")",
")",
";",
"$",
... | add an Object to the table in the database
@param DbManagement $db the database connector
@param DbManagementObject $DbManagementObject the DbManagementObject containing all needed data to populate database
@param String $query the query to populate database
@thro... | [
"add",
"an",
"Object",
"to",
"the",
"table",
"in",
"the",
"database"
] | 1c137bb284712c2830e8cf792237adcc1d86d6f4 | https://github.com/20centcroak/DBManagement/blob/1c137bb284712c2830e8cf792237adcc1d86d6f4/src/DbManagementTable.php#L23-L30 |
239,999 | 20centcroak/DBManagement | src/DbManagementTable.php | DbManagementTable.getData | public function getData(DbManagement $db, $query, $params, DbManagementObject $DbManagementObject)
{
$keys = $DbManagementObject->getKeys();
//parse params to check their validity and
//use the conventions to sort and filter results
$parsed = $this->parseParams($params, $key... | php | public function getData(DbManagement $db, $query, $params, DbManagementObject $DbManagementObject)
{
$keys = $DbManagementObject->getKeys();
//parse params to check their validity and
//use the conventions to sort and filter results
$parsed = $this->parseParams($params, $key... | [
"public",
"function",
"getData",
"(",
"DbManagement",
"$",
"db",
",",
"$",
"query",
",",
"$",
"params",
",",
"DbManagementObject",
"$",
"DbManagementObject",
")",
"{",
"$",
"keys",
"=",
"$",
"DbManagementObject",
"->",
"getKeys",
"(",
")",
";",
"//parse para... | get data from the table in the database according to the params and the expected DbManagementObject
@param DbManagement $db the database connector
@param String $query the query to select data in database
@param array $params parameters fo... | [
"get",
"data",
"from",
"the",
"table",
"in",
"the",
"database",
"according",
"to",
"the",
"params",
"and",
"the",
"expected",
"DbManagementObject"
] | 1c137bb284712c2830e8cf792237adcc1d86d6f4 | https://github.com/20centcroak/DBManagement/blob/1c137bb284712c2830e8cf792237adcc1d86d6f4/src/DbManagementTable.php#L41-L104 |
Subsets and Splits
Yii Code Samples
Gathers all records from test, train, and validation sets that contain the word 'yii', providing a basic filtered view of the dataset relevant to Yii-related content.