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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
18,300 | redaigbaria/oauth2 | src/Entity/EntityTrait.php | EntityTrait.hydrate | public function hydrate(array $properties)
{
foreach ($properties as $prop => $val) {
if (property_exists($this, $prop)) {
$this->{$prop} = $val;
}
}
return $this;
} | php | public function hydrate(array $properties)
{
foreach ($properties as $prop => $val) {
if (property_exists($this, $prop)) {
$this->{$prop} = $val;
}
}
return $this;
} | [
"public",
"function",
"hydrate",
"(",
"array",
"$",
"properties",
")",
"{",
"foreach",
"(",
"$",
"properties",
"as",
"$",
"prop",
"=>",
"$",
"val",
")",
"{",
"if",
"(",
"property_exists",
"(",
"$",
"this",
",",
"$",
"prop",
")",
")",
"{",
"$",
"thi... | Hydrate an entity with properites
@param array $properties
@return self | [
"Hydrate",
"an",
"entity",
"with",
"properites"
] | 54cca4aaaff6a095cbf1c8010f2fe2cc7de4e45a | https://github.com/redaigbaria/oauth2/blob/54cca4aaaff6a095cbf1c8010f2fe2cc7de4e45a/src/Entity/EntityTrait.php#L23-L32 |
18,301 | titon/db | src/Titon/Db/Query/Join.php | Join.from | public function from($table, $alias = null) {
$this->_table = (string) $table;
$this->asAlias($alias);
return $this;
} | php | public function from($table, $alias = null) {
$this->_table = (string) $table;
$this->asAlias($alias);
return $this;
} | [
"public",
"function",
"from",
"(",
"$",
"table",
",",
"$",
"alias",
"=",
"null",
")",
"{",
"$",
"this",
"->",
"_table",
"=",
"(",
"string",
")",
"$",
"table",
";",
"$",
"this",
"->",
"asAlias",
"(",
"$",
"alias",
")",
";",
"return",
"$",
"this",
... | Set the table to join against.
@param string $table
@param string $alias
@return $this | [
"Set",
"the",
"table",
"to",
"join",
"against",
"."
] | fbc5159d1ce9d2139759c9367565986981485604 | https://github.com/titon/db/blob/fbc5159d1ce9d2139759c9367565986981485604/src/Titon/Db/Query/Join.php#L91-L96 |
18,302 | titon/db | src/Titon/Db/Query/Join.php | Join.on | public function on($foreignKey, $key = null) {
if (is_array($foreignKey)) {
$this->_conditions = array_replace($this->_conditions, $foreignKey);
} else {
$this->_conditions[$foreignKey] = $key;
}
return $this;
} | php | public function on($foreignKey, $key = null) {
if (is_array($foreignKey)) {
$this->_conditions = array_replace($this->_conditions, $foreignKey);
} else {
$this->_conditions[$foreignKey] = $key;
}
return $this;
} | [
"public",
"function",
"on",
"(",
"$",
"foreignKey",
",",
"$",
"key",
"=",
"null",
")",
"{",
"if",
"(",
"is_array",
"(",
"$",
"foreignKey",
")",
")",
"{",
"$",
"this",
"->",
"_conditions",
"=",
"array_replace",
"(",
"$",
"this",
"->",
"_conditions",
"... | Set the conditions to join on.
@param string $foreignKey
@param string $key
@return $this | [
"Set",
"the",
"conditions",
"to",
"join",
"on",
"."
] | fbc5159d1ce9d2139759c9367565986981485604 | https://github.com/titon/db/blob/fbc5159d1ce9d2139759c9367565986981485604/src/Titon/Db/Query/Join.php#L141-L149 |
18,303 | Lansoweb/LosReCaptcha | src/ConfigProvider.php | ConfigProvider.getViewHelperConfig | public function getViewHelperConfig()
{
return [
'aliases' => [
'losrecaptcha/recaptcha' => Form\View\Helper\Captcha\ReCaptcha::class,
'losrecaptcha/invisible' => Form\View\Helper\Captcha\Invisible::class,
],
'factories' => [
... | php | public function getViewHelperConfig()
{
return [
'aliases' => [
'losrecaptcha/recaptcha' => Form\View\Helper\Captcha\ReCaptcha::class,
'losrecaptcha/invisible' => Form\View\Helper\Captcha\Invisible::class,
],
'factories' => [
... | [
"public",
"function",
"getViewHelperConfig",
"(",
")",
"{",
"return",
"[",
"'aliases'",
"=>",
"[",
"'losrecaptcha/recaptcha'",
"=>",
"Form",
"\\",
"View",
"\\",
"Helper",
"\\",
"Captcha",
"\\",
"ReCaptcha",
"::",
"class",
",",
"'losrecaptcha/invisible'",
"=>",
"... | Return zend-view helper configuration.
@return array | [
"Return",
"zend",
"-",
"view",
"helper",
"configuration",
"."
] | 8df866995501db087c3850f97fd2b6547632e6ed | https://github.com/Lansoweb/LosReCaptcha/blob/8df866995501db087c3850f97fd2b6547632e6ed/src/ConfigProvider.php#L23-L35 |
18,304 | xinix-technology/norm | src/Norm/Filter/Filter.php | Filter.fromSchema | public static function fromSchema($schema, $preFilter = array(), $postFilter = array())
{
$rules = array();
foreach ($preFilter as $key => $filter) {
$filter = explode('|', $filter);
foreach ($filter as $f) {
$rules[$key][] = trim($f);
}
... | php | public static function fromSchema($schema, $preFilter = array(), $postFilter = array())
{
$rules = array();
foreach ($preFilter as $key => $filter) {
$filter = explode('|', $filter);
foreach ($filter as $f) {
$rules[$key][] = trim($f);
}
... | [
"public",
"static",
"function",
"fromSchema",
"(",
"$",
"schema",
",",
"$",
"preFilter",
"=",
"array",
"(",
")",
",",
"$",
"postFilter",
"=",
"array",
"(",
")",
")",
"{",
"$",
"rules",
"=",
"array",
"(",
")",
";",
"foreach",
"(",
"$",
"preFilter",
... | Static method to create instance of filter from database schema configuration.
@param array $schema Database schema configuration
@param array $preFilter Filters that will be run before the filter
@param array $postFilter Filters that will be run after the filter
@return \Norm\Filter\Filter | [
"Static",
"method",
"to",
"create",
"instance",
"of",
"filter",
"from",
"database",
"schema",
"configuration",
"."
] | c357f7d3a75d05324dd84b8f6a968a094c53d603 | https://github.com/xinix-technology/norm/blob/c357f7d3a75d05324dd84b8f6a968a094c53d603/src/Norm/Filter/Filter.php#L51-L83 |
18,305 | slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContaoQuery.php | BaseRemoteHistoryContaoQuery.create | public static function create($modelAlias = null, $criteria = null)
{
if ($criteria instanceof RemoteHistoryContaoQuery) {
return $criteria;
}
$query = new RemoteHistoryContaoQuery(null, null, $modelAlias);
if ($criteria instanceof Criteria) {
$query->mergeWi... | php | public static function create($modelAlias = null, $criteria = null)
{
if ($criteria instanceof RemoteHistoryContaoQuery) {
return $criteria;
}
$query = new RemoteHistoryContaoQuery(null, null, $modelAlias);
if ($criteria instanceof Criteria) {
$query->mergeWi... | [
"public",
"static",
"function",
"create",
"(",
"$",
"modelAlias",
"=",
"null",
",",
"$",
"criteria",
"=",
"null",
")",
"{",
"if",
"(",
"$",
"criteria",
"instanceof",
"RemoteHistoryContaoQuery",
")",
"{",
"return",
"$",
"criteria",
";",
"}",
"$",
"query",
... | Returns a new RemoteHistoryContaoQuery object.
@param string $modelAlias The alias of a model in the query
@param RemoteHistoryContaoQuery|Criteria $criteria Optional Criteria to build the query from
@return RemoteHistoryContaoQuery | [
"Returns",
"a",
"new",
"RemoteHistoryContaoQuery",
"object",
"."
] | 2ba86d96f1f41f9424e2229c4e2b13017e973f89 | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContaoQuery.php#L139-L151 |
18,306 | slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContaoQuery.php | BaseRemoteHistoryContaoQuery.filterByRemoteAppId | public function filterByRemoteAppId($remoteAppId = null, $comparison = null)
{
if (is_array($remoteAppId)) {
$useMinMax = false;
if (isset($remoteAppId['min'])) {
$this->addUsingAlias(RemoteHistoryContaoPeer::REMOTE_APP_ID, $remoteAppId['min'], Criteria::GREATER_EQUAL... | php | public function filterByRemoteAppId($remoteAppId = null, $comparison = null)
{
if (is_array($remoteAppId)) {
$useMinMax = false;
if (isset($remoteAppId['min'])) {
$this->addUsingAlias(RemoteHistoryContaoPeer::REMOTE_APP_ID, $remoteAppId['min'], Criteria::GREATER_EQUAL... | [
"public",
"function",
"filterByRemoteAppId",
"(",
"$",
"remoteAppId",
"=",
"null",
",",
"$",
"comparison",
"=",
"null",
")",
"{",
"if",
"(",
"is_array",
"(",
"$",
"remoteAppId",
")",
")",
"{",
"$",
"useMinMax",
"=",
"false",
";",
"if",
"(",
"isset",
"(... | Filter the query on the remote_app_id column
Example usage:
<code>
$query->filterByRemoteAppId(1234); // WHERE remote_app_id = 1234
$query->filterByRemoteAppId(array(12, 34)); // WHERE remote_app_id IN (12, 34)
$query->filterByRemoteAppId(array('min' => 12)); // WHERE remote_app_id >= 12
$query->filterByRemoteAppId(ar... | [
"Filter",
"the",
"query",
"on",
"the",
"remote_app_id",
"column"
] | 2ba86d96f1f41f9424e2229c4e2b13017e973f89 | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContaoQuery.php#L367-L388 |
18,307 | slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContaoQuery.php | BaseRemoteHistoryContaoQuery.filterByApiversion | public function filterByApiversion($apiversion = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($apiversion)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $apiversion)) {
$apiversion = str_replace('*', '%', $apiv... | php | public function filterByApiversion($apiversion = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($apiversion)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $apiversion)) {
$apiversion = str_replace('*', '%', $apiv... | [
"public",
"function",
"filterByApiversion",
"(",
"$",
"apiversion",
"=",
"null",
",",
"$",
"comparison",
"=",
"null",
")",
"{",
"if",
"(",
"null",
"===",
"$",
"comparison",
")",
"{",
"if",
"(",
"is_array",
"(",
"$",
"apiversion",
")",
")",
"{",
"$",
... | Filter the query on the apiVersion column
Example usage:
<code>
$query->filterByApiversion('fooValue'); // WHERE apiVersion = 'fooValue'
$query->filterByApiversion('%fooValue%'); // WHERE apiVersion LIKE '%fooValue%'
</code>
@param string $apiversion The value to use as filter.
Accepts wildcards (* and % trigge... | [
"Filter",
"the",
"query",
"on",
"the",
"apiVersion",
"column"
] | 2ba86d96f1f41f9424e2229c4e2b13017e973f89 | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContaoQuery.php#L405-L417 |
18,308 | slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContaoQuery.php | BaseRemoteHistoryContaoQuery.filterByConfigDisplayerrors | public function filterByConfigDisplayerrors($configDisplayerrors = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($configDisplayerrors)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $configDisplayerrors)) {
$conf... | php | public function filterByConfigDisplayerrors($configDisplayerrors = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($configDisplayerrors)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $configDisplayerrors)) {
$conf... | [
"public",
"function",
"filterByConfigDisplayerrors",
"(",
"$",
"configDisplayerrors",
"=",
"null",
",",
"$",
"comparison",
"=",
"null",
")",
"{",
"if",
"(",
"null",
"===",
"$",
"comparison",
")",
"{",
"if",
"(",
"is_array",
"(",
"$",
"configDisplayerrors",
"... | Filter the query on the config_displayErrors column
Example usage:
<code>
$query->filterByConfigDisplayerrors('fooValue'); // WHERE config_displayErrors = 'fooValue'
$query->filterByConfigDisplayerrors('%fooValue%'); // WHERE config_displayErrors LIKE '%fooValue%'
</code>
@param string $configDisplayerrors The ... | [
"Filter",
"the",
"query",
"on",
"the",
"config_displayErrors",
"column"
] | 2ba86d96f1f41f9424e2229c4e2b13017e973f89 | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContaoQuery.php#L492-L504 |
18,309 | slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContaoQuery.php | BaseRemoteHistoryContaoQuery.filterByConfigBypasscache | public function filterByConfigBypasscache($configBypasscache = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($configBypasscache)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $configBypasscache)) {
$configBypass... | php | public function filterByConfigBypasscache($configBypasscache = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($configBypasscache)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $configBypasscache)) {
$configBypass... | [
"public",
"function",
"filterByConfigBypasscache",
"(",
"$",
"configBypasscache",
"=",
"null",
",",
"$",
"comparison",
"=",
"null",
")",
"{",
"if",
"(",
"null",
"===",
"$",
"comparison",
")",
"{",
"if",
"(",
"is_array",
"(",
"$",
"configBypasscache",
")",
... | Filter the query on the config_bypassCache column
Example usage:
<code>
$query->filterByConfigBypasscache('fooValue'); // WHERE config_bypassCache = 'fooValue'
$query->filterByConfigBypasscache('%fooValue%'); // WHERE config_bypassCache LIKE '%fooValue%'
</code>
@param string $configBypasscache The value to use... | [
"Filter",
"the",
"query",
"on",
"the",
"config_bypassCache",
"column"
] | 2ba86d96f1f41f9424e2229c4e2b13017e973f89 | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContaoQuery.php#L521-L533 |
18,310 | slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContaoQuery.php | BaseRemoteHistoryContaoQuery.filterByConfigMinifymarkup | public function filterByConfigMinifymarkup($configMinifymarkup = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($configMinifymarkup)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $configMinifymarkup)) {
$configMi... | php | public function filterByConfigMinifymarkup($configMinifymarkup = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($configMinifymarkup)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $configMinifymarkup)) {
$configMi... | [
"public",
"function",
"filterByConfigMinifymarkup",
"(",
"$",
"configMinifymarkup",
"=",
"null",
",",
"$",
"comparison",
"=",
"null",
")",
"{",
"if",
"(",
"null",
"===",
"$",
"comparison",
")",
"{",
"if",
"(",
"is_array",
"(",
"$",
"configMinifymarkup",
")",... | Filter the query on the config_minifyMarkup column
Example usage:
<code>
$query->filterByConfigMinifymarkup('fooValue'); // WHERE config_minifyMarkup = 'fooValue'
$query->filterByConfigMinifymarkup('%fooValue%'); // WHERE config_minifyMarkup LIKE '%fooValue%'
</code>
@param string $configMinifymarkup The value ... | [
"Filter",
"the",
"query",
"on",
"the",
"config_minifyMarkup",
"column"
] | 2ba86d96f1f41f9424e2229c4e2b13017e973f89 | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContaoQuery.php#L550-L562 |
18,311 | slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContaoQuery.php | BaseRemoteHistoryContaoQuery.filterByConfigDebugmode | public function filterByConfigDebugmode($configDebugmode = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($configDebugmode)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $configDebugmode)) {
$configDebugmode = st... | php | public function filterByConfigDebugmode($configDebugmode = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($configDebugmode)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $configDebugmode)) {
$configDebugmode = st... | [
"public",
"function",
"filterByConfigDebugmode",
"(",
"$",
"configDebugmode",
"=",
"null",
",",
"$",
"comparison",
"=",
"null",
")",
"{",
"if",
"(",
"null",
"===",
"$",
"comparison",
")",
"{",
"if",
"(",
"is_array",
"(",
"$",
"configDebugmode",
")",
")",
... | Filter the query on the config_debugMode column
Example usage:
<code>
$query->filterByConfigDebugmode('fooValue'); // WHERE config_debugMode = 'fooValue'
$query->filterByConfigDebugmode('%fooValue%'); // WHERE config_debugMode LIKE '%fooValue%'
</code>
@param string $configDebugmode The value to use as filter.
... | [
"Filter",
"the",
"query",
"on",
"the",
"config_debugMode",
"column"
] | 2ba86d96f1f41f9424e2229c4e2b13017e973f89 | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContaoQuery.php#L579-L591 |
18,312 | slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContaoQuery.php | BaseRemoteHistoryContaoQuery.filterByConfigMaintenancemode | public function filterByConfigMaintenancemode($configMaintenancemode = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($configMaintenancemode)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $configMaintenancemode)) {
... | php | public function filterByConfigMaintenancemode($configMaintenancemode = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($configMaintenancemode)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $configMaintenancemode)) {
... | [
"public",
"function",
"filterByConfigMaintenancemode",
"(",
"$",
"configMaintenancemode",
"=",
"null",
",",
"$",
"comparison",
"=",
"null",
")",
"{",
"if",
"(",
"null",
"===",
"$",
"comparison",
")",
"{",
"if",
"(",
"is_array",
"(",
"$",
"configMaintenancemode... | Filter the query on the config_maintenanceMode column
Example usage:
<code>
$query->filterByConfigMaintenancemode('fooValue'); // WHERE config_maintenanceMode = 'fooValue'
$query->filterByConfigMaintenancemode('%fooValue%'); // WHERE config_maintenanceMode LIKE '%fooValue%'
</code>
@param string $configMaintena... | [
"Filter",
"the",
"query",
"on",
"the",
"config_maintenanceMode",
"column"
] | 2ba86d96f1f41f9424e2229c4e2b13017e973f89 | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContaoQuery.php#L608-L620 |
18,313 | slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContaoQuery.php | BaseRemoteHistoryContaoQuery.filterByConfigGzipscripts | public function filterByConfigGzipscripts($configGzipscripts = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($configGzipscripts)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $configGzipscripts)) {
$configGzipsc... | php | public function filterByConfigGzipscripts($configGzipscripts = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($configGzipscripts)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $configGzipscripts)) {
$configGzipsc... | [
"public",
"function",
"filterByConfigGzipscripts",
"(",
"$",
"configGzipscripts",
"=",
"null",
",",
"$",
"comparison",
"=",
"null",
")",
"{",
"if",
"(",
"null",
"===",
"$",
"comparison",
")",
"{",
"if",
"(",
"is_array",
"(",
"$",
"configGzipscripts",
")",
... | Filter the query on the config_gzipScripts column
Example usage:
<code>
$query->filterByConfigGzipscripts('fooValue'); // WHERE config_gzipScripts = 'fooValue'
$query->filterByConfigGzipscripts('%fooValue%'); // WHERE config_gzipScripts LIKE '%fooValue%'
</code>
@param string $configGzipscripts The value to use... | [
"Filter",
"the",
"query",
"on",
"the",
"config_gzipScripts",
"column"
] | 2ba86d96f1f41f9424e2229c4e2b13017e973f89 | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContaoQuery.php#L637-L649 |
18,314 | slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContaoQuery.php | BaseRemoteHistoryContaoQuery.filterByConfigRewriteurl | public function filterByConfigRewriteurl($configRewriteurl = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($configRewriteurl)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $configRewriteurl)) {
$configRewriteurl... | php | public function filterByConfigRewriteurl($configRewriteurl = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($configRewriteurl)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $configRewriteurl)) {
$configRewriteurl... | [
"public",
"function",
"filterByConfigRewriteurl",
"(",
"$",
"configRewriteurl",
"=",
"null",
",",
"$",
"comparison",
"=",
"null",
")",
"{",
"if",
"(",
"null",
"===",
"$",
"comparison",
")",
"{",
"if",
"(",
"is_array",
"(",
"$",
"configRewriteurl",
")",
")"... | Filter the query on the config_rewriteURL column
Example usage:
<code>
$query->filterByConfigRewriteurl('fooValue'); // WHERE config_rewriteURL = 'fooValue'
$query->filterByConfigRewriteurl('%fooValue%'); // WHERE config_rewriteURL LIKE '%fooValue%'
</code>
@param string $configRewriteurl The value to use as fi... | [
"Filter",
"the",
"query",
"on",
"the",
"config_rewriteURL",
"column"
] | 2ba86d96f1f41f9424e2229c4e2b13017e973f89 | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContaoQuery.php#L666-L678 |
18,315 | slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContaoQuery.php | BaseRemoteHistoryContaoQuery.filterByConfigAdminemail | public function filterByConfigAdminemail($configAdminemail = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($configAdminemail)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $configAdminemail)) {
$configAdminemail... | php | public function filterByConfigAdminemail($configAdminemail = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($configAdminemail)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $configAdminemail)) {
$configAdminemail... | [
"public",
"function",
"filterByConfigAdminemail",
"(",
"$",
"configAdminemail",
"=",
"null",
",",
"$",
"comparison",
"=",
"null",
")",
"{",
"if",
"(",
"null",
"===",
"$",
"comparison",
")",
"{",
"if",
"(",
"is_array",
"(",
"$",
"configAdminemail",
")",
")"... | Filter the query on the config_adminEmail column
Example usage:
<code>
$query->filterByConfigAdminemail('fooValue'); // WHERE config_adminEmail = 'fooValue'
$query->filterByConfigAdminemail('%fooValue%'); // WHERE config_adminEmail LIKE '%fooValue%'
</code>
@param string $configAdminemail The value to use as fi... | [
"Filter",
"the",
"query",
"on",
"the",
"config_adminEmail",
"column"
] | 2ba86d96f1f41f9424e2229c4e2b13017e973f89 | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContaoQuery.php#L695-L707 |
18,316 | slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContaoQuery.php | BaseRemoteHistoryContaoQuery.filterByConfigCachemode | public function filterByConfigCachemode($configCachemode = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($configCachemode)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $configCachemode)) {
$configCachemode = st... | php | public function filterByConfigCachemode($configCachemode = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($configCachemode)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $configCachemode)) {
$configCachemode = st... | [
"public",
"function",
"filterByConfigCachemode",
"(",
"$",
"configCachemode",
"=",
"null",
",",
"$",
"comparison",
"=",
"null",
")",
"{",
"if",
"(",
"null",
"===",
"$",
"comparison",
")",
"{",
"if",
"(",
"is_array",
"(",
"$",
"configCachemode",
")",
")",
... | Filter the query on the config_cacheMode column
Example usage:
<code>
$query->filterByConfigCachemode('fooValue'); // WHERE config_cacheMode = 'fooValue'
$query->filterByConfigCachemode('%fooValue%'); // WHERE config_cacheMode LIKE '%fooValue%'
</code>
@param string $configCachemode The value to use as filter.
... | [
"Filter",
"the",
"query",
"on",
"the",
"config_cacheMode",
"column"
] | 2ba86d96f1f41f9424e2229c4e2b13017e973f89 | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContaoQuery.php#L724-L736 |
18,317 | slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContaoQuery.php | BaseRemoteHistoryContaoQuery.filterByStatuscode | public function filterByStatuscode($statuscode = null, $comparison = null)
{
if (is_array($statuscode)) {
$useMinMax = false;
if (isset($statuscode['min'])) {
$this->addUsingAlias(RemoteHistoryContaoPeer::STATUSCODE, $statuscode['min'], Criteria::GREATER_EQUAL);
... | php | public function filterByStatuscode($statuscode = null, $comparison = null)
{
if (is_array($statuscode)) {
$useMinMax = false;
if (isset($statuscode['min'])) {
$this->addUsingAlias(RemoteHistoryContaoPeer::STATUSCODE, $statuscode['min'], Criteria::GREATER_EQUAL);
... | [
"public",
"function",
"filterByStatuscode",
"(",
"$",
"statuscode",
"=",
"null",
",",
"$",
"comparison",
"=",
"null",
")",
"{",
"if",
"(",
"is_array",
"(",
"$",
"statuscode",
")",
")",
"{",
"$",
"useMinMax",
"=",
"false",
";",
"if",
"(",
"isset",
"(",
... | Filter the query on the statuscode column
Example usage:
<code>
$query->filterByStatuscode(1234); // WHERE statuscode = 1234
$query->filterByStatuscode(array(12, 34)); // WHERE statuscode IN (12, 34)
$query->filterByStatuscode(array('min' => 12)); // WHERE statuscode >= 12
$query->filterByStatuscode(array('max' => 12)... | [
"Filter",
"the",
"query",
"on",
"the",
"statuscode",
"column"
] | 2ba86d96f1f41f9424e2229c4e2b13017e973f89 | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContaoQuery.php#L757-L778 |
18,318 | slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContaoQuery.php | BaseRemoteHistoryContaoQuery.filterByExtensions | public function filterByExtensions($extensions = null, $comparison = null)
{
if (is_object($extensions)) {
$extensions = serialize($extensions);
}
return $this->addUsingAlias(RemoteHistoryContaoPeer::EXTENSIONS, $extensions, $comparison);
} | php | public function filterByExtensions($extensions = null, $comparison = null)
{
if (is_object($extensions)) {
$extensions = serialize($extensions);
}
return $this->addUsingAlias(RemoteHistoryContaoPeer::EXTENSIONS, $extensions, $comparison);
} | [
"public",
"function",
"filterByExtensions",
"(",
"$",
"extensions",
"=",
"null",
",",
"$",
"comparison",
"=",
"null",
")",
"{",
"if",
"(",
"is_object",
"(",
"$",
"extensions",
")",
")",
"{",
"$",
"extensions",
"=",
"serialize",
"(",
"$",
"extensions",
")... | Filter the query on the extensions column
@param mixed $extensions The value to use as filter
@param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
@return RemoteHistoryContaoQuery The current query, for fluid interface | [
"Filter",
"the",
"query",
"on",
"the",
"extensions",
"column"
] | 2ba86d96f1f41f9424e2229c4e2b13017e973f89 | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContaoQuery.php#L788-L795 |
18,319 | slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContaoQuery.php | BaseRemoteHistoryContaoQuery.filterByLog | public function filterByLog($log = null, $comparison = null)
{
if (is_object($log)) {
$log = serialize($log);
}
return $this->addUsingAlias(RemoteHistoryContaoPeer::LOG, $log, $comparison);
} | php | public function filterByLog($log = null, $comparison = null)
{
if (is_object($log)) {
$log = serialize($log);
}
return $this->addUsingAlias(RemoteHistoryContaoPeer::LOG, $log, $comparison);
} | [
"public",
"function",
"filterByLog",
"(",
"$",
"log",
"=",
"null",
",",
"$",
"comparison",
"=",
"null",
")",
"{",
"if",
"(",
"is_object",
"(",
"$",
"log",
")",
")",
"{",
"$",
"log",
"=",
"serialize",
"(",
"$",
"log",
")",
";",
"}",
"return",
"$",... | Filter the query on the log column
@param mixed $log The value to use as filter
@param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
@return RemoteHistoryContaoQuery The current query, for fluid interface | [
"Filter",
"the",
"query",
"on",
"the",
"log",
"column"
] | 2ba86d96f1f41f9424e2229c4e2b13017e973f89 | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContaoQuery.php#L805-L812 |
18,320 | slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContaoQuery.php | BaseRemoteHistoryContaoQuery.filterByPHP | public function filterByPHP($pHP = null, $comparison = null)
{
if (is_object($pHP)) {
$pHP = serialize($pHP);
}
return $this->addUsingAlias(RemoteHistoryContaoPeer::PHP, $pHP, $comparison);
} | php | public function filterByPHP($pHP = null, $comparison = null)
{
if (is_object($pHP)) {
$pHP = serialize($pHP);
}
return $this->addUsingAlias(RemoteHistoryContaoPeer::PHP, $pHP, $comparison);
} | [
"public",
"function",
"filterByPHP",
"(",
"$",
"pHP",
"=",
"null",
",",
"$",
"comparison",
"=",
"null",
")",
"{",
"if",
"(",
"is_object",
"(",
"$",
"pHP",
")",
")",
"{",
"$",
"pHP",
"=",
"serialize",
"(",
"$",
"pHP",
")",
";",
"}",
"return",
"$",... | Filter the query on the php column
@param mixed $pHP The value to use as filter
@param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
@return RemoteHistoryContaoQuery The current query, for fluid interface | [
"Filter",
"the",
"query",
"on",
"the",
"php",
"column"
] | 2ba86d96f1f41f9424e2229c4e2b13017e973f89 | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContaoQuery.php#L822-L829 |
18,321 | slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContaoQuery.php | BaseRemoteHistoryContaoQuery.filterByMySQL | public function filterByMySQL($mySQL = null, $comparison = null)
{
if (is_object($mySQL)) {
$mySQL = serialize($mySQL);
}
return $this->addUsingAlias(RemoteHistoryContaoPeer::MYSQL, $mySQL, $comparison);
} | php | public function filterByMySQL($mySQL = null, $comparison = null)
{
if (is_object($mySQL)) {
$mySQL = serialize($mySQL);
}
return $this->addUsingAlias(RemoteHistoryContaoPeer::MYSQL, $mySQL, $comparison);
} | [
"public",
"function",
"filterByMySQL",
"(",
"$",
"mySQL",
"=",
"null",
",",
"$",
"comparison",
"=",
"null",
")",
"{",
"if",
"(",
"is_object",
"(",
"$",
"mySQL",
")",
")",
"{",
"$",
"mySQL",
"=",
"serialize",
"(",
"$",
"mySQL",
")",
";",
"}",
"retur... | Filter the query on the mysql column
@param mixed $mySQL The value to use as filter
@param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
@return RemoteHistoryContaoQuery The current query, for fluid interface | [
"Filter",
"the",
"query",
"on",
"the",
"mysql",
"column"
] | 2ba86d96f1f41f9424e2229c4e2b13017e973f89 | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContaoQuery.php#L839-L846 |
18,322 | slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContaoQuery.php | BaseRemoteHistoryContaoQuery.useRemoteAppQuery | public function useRemoteAppQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
return $this
->joinRemoteApp($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'RemoteApp', '\Slashworks\AppBundle\Model\RemoteAppQuery');
} | php | public function useRemoteAppQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
return $this
->joinRemoteApp($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'RemoteApp', '\Slashworks\AppBundle\Model\RemoteAppQuery');
} | [
"public",
"function",
"useRemoteAppQuery",
"(",
"$",
"relationAlias",
"=",
"null",
",",
"$",
"joinType",
"=",
"Criteria",
"::",
"INNER_JOIN",
")",
"{",
"return",
"$",
"this",
"->",
"joinRemoteApp",
"(",
"$",
"relationAlias",
",",
"$",
"joinType",
")",
"->",
... | Use the RemoteApp relation RemoteApp object
@see useQuery()
@param string $relationAlias optional alias for the relation,
to be used as main alias in the secondary query
@param string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
@return \Slashworks\AppBundle\Model\Remot... | [
"Use",
"the",
"RemoteApp",
"relation",
"RemoteApp",
"object"
] | 2ba86d96f1f41f9424e2229c4e2b13017e973f89 | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteHistoryContaoQuery.php#L917-L922 |
18,323 | xinix-technology/norm | src/Norm/Type/Collection.php | Collection.compare | public function compare($another)
{
if ($another instanceof Collection) {
$another = $another->toArray();
}
$me = $this->toArray();
if ($me == $another) {
return 0;
} else {
return 1;
}
} | php | public function compare($another)
{
if ($another instanceof Collection) {
$another = $another->toArray();
}
$me = $this->toArray();
if ($me == $another) {
return 0;
} else {
return 1;
}
} | [
"public",
"function",
"compare",
"(",
"$",
"another",
")",
"{",
"if",
"(",
"$",
"another",
"instanceof",
"Collection",
")",
"{",
"$",
"another",
"=",
"$",
"another",
"->",
"toArray",
"(",
")",
";",
"}",
"$",
"me",
"=",
"$",
"this",
"->",
"toArray",
... | Perform comparison between this implementation and another implementation of `\Norm\Type\Collection` or an array.
@param mixed $another
@return int | [
"Perform",
"comparison",
"between",
"this",
"implementation",
"and",
"another",
"implementation",
"of",
"\\",
"Norm",
"\\",
"Type",
"\\",
"Collection",
"or",
"an",
"array",
"."
] | c357f7d3a75d05324dd84b8f6a968a094c53d603 | https://github.com/xinix-technology/norm/blob/c357f7d3a75d05324dd84b8f6a968a094c53d603/src/Norm/Type/Collection.php#L186-L199 |
18,324 | qcubed/orm | src/Query/Condition/ConditionBase.php | ConditionBase.getWhereClause | public function getWhereClause(Builder $objBuilder, $blnProcessOnce = false)
{
if ($blnProcessOnce && $this->blnProcessed) {
return null;
}
$this->blnProcessed = true;
try {
$objConditionBuilder = new PartialBuilder($objBuilder);
$this->updateQue... | php | public function getWhereClause(Builder $objBuilder, $blnProcessOnce = false)
{
if ($blnProcessOnce && $this->blnProcessed) {
return null;
}
$this->blnProcessed = true;
try {
$objConditionBuilder = new PartialBuilder($objBuilder);
$this->updateQue... | [
"public",
"function",
"getWhereClause",
"(",
"Builder",
"$",
"objBuilder",
",",
"$",
"blnProcessOnce",
"=",
"false",
")",
"{",
"if",
"(",
"$",
"blnProcessOnce",
"&&",
"$",
"this",
"->",
"blnProcessed",
")",
"{",
"return",
"null",
";",
"}",
"$",
"this",
"... | Used internally by QCubed Query to get an individual where clause for a given condition
Mostly used for conditional joins.
@param Builder $objBuilder
@param bool|false $blnProcessOnce
@return null|string
@throws \Exception
@throws Caller | [
"Used",
"internally",
"by",
"QCubed",
"Query",
"to",
"get",
"an",
"individual",
"where",
"clause",
"for",
"a",
"given",
"condition",
"Mostly",
"used",
"for",
"conditional",
"joins",
"."
] | f320eba671f20874b1f3809c5293f8c02d5b1204 | https://github.com/qcubed/orm/blob/f320eba671f20874b1f3809c5293f8c02d5b1204/src/Query/Condition/ConditionBase.php#L46-L63 |
18,325 | Chill-project/Main | Form/Type/CenterType.php | CenterType.buildForm | public function buildForm(FormBuilderInterface $builder, array $options)
{
if ($this->getParent() === 'hidden') {
$builder->addModelTransformer($this->transformer);
}
} | php | public function buildForm(FormBuilderInterface $builder, array $options)
{
if ($this->getParent() === 'hidden') {
$builder->addModelTransformer($this->transformer);
}
} | [
"public",
"function",
"buildForm",
"(",
"FormBuilderInterface",
"$",
"builder",
",",
"array",
"$",
"options",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"getParent",
"(",
")",
"===",
"'hidden'",
")",
"{",
"$",
"builder",
"->",
"addModelTransformer",
"(",
"$",... | add a data transformer if user can reach only one center
@param FormBuilderInterface $builder
@param array $options | [
"add",
"a",
"data",
"transformer",
"if",
"user",
"can",
"reach",
"only",
"one",
"center"
] | 384cb6c793072a4f1047dc5cafc2157ee2419f60 | https://github.com/Chill-project/Main/blob/384cb6c793072a4f1047dc5cafc2157ee2419f60/Form/Type/CenterType.php#L111-L116 |
18,326 | Chill-project/Main | Form/Type/CenterType.php | CenterType.prepareReachableCenterByUser | private function prepareReachableCenterByUser()
{
$groupCenters = $this->user->getGroupCenters();
foreach ($groupCenters as $groupCenter) {
$center = $groupCenter->getCenter();
if (!array_key_exists($center->getId(),
$th... | php | private function prepareReachableCenterByUser()
{
$groupCenters = $this->user->getGroupCenters();
foreach ($groupCenters as $groupCenter) {
$center = $groupCenter->getCenter();
if (!array_key_exists($center->getId(),
$th... | [
"private",
"function",
"prepareReachableCenterByUser",
"(",
")",
"{",
"$",
"groupCenters",
"=",
"$",
"this",
"->",
"user",
"->",
"getGroupCenters",
"(",
")",
";",
"foreach",
"(",
"$",
"groupCenters",
"as",
"$",
"groupCenter",
")",
"{",
"$",
"center",
"=",
... | populate reachableCenters as an associative array where
keys are center.id and value are center entities. | [
"populate",
"reachableCenters",
"as",
"an",
"associative",
"array",
"where",
"keys",
"are",
"center",
".",
"id",
"and",
"value",
"are",
"center",
"entities",
"."
] | 384cb6c793072a4f1047dc5cafc2157ee2419f60 | https://github.com/Chill-project/Main/blob/384cb6c793072a4f1047dc5cafc2157ee2419f60/Form/Type/CenterType.php#L123-L136 |
18,327 | webforge-labs/psc-cms | lib/Psc/System/SimpleRarArchive.php | SimpleRarArchive.extractTo | public function extractTo(WebforgeDir $dir = NULL) {
if (!isset($dir))
$dir = $this->rar->getDirectory();
else
$dir->create();
$this->exec('x', array('y'), (string) $dir);
return $this;
} | php | public function extractTo(WebforgeDir $dir = NULL) {
if (!isset($dir))
$dir = $this->rar->getDirectory();
else
$dir->create();
$this->exec('x', array('y'), (string) $dir);
return $this;
} | [
"public",
"function",
"extractTo",
"(",
"WebforgeDir",
"$",
"dir",
"=",
"NULL",
")",
"{",
"if",
"(",
"!",
"isset",
"(",
"$",
"dir",
")",
")",
"$",
"dir",
"=",
"$",
"this",
"->",
"rar",
"->",
"getDirectory",
"(",
")",
";",
"else",
"$",
"dir",
"->"... | Entpackt alle Dateien des Archives in ein Verzeichnis
wird das Verzeichnis nicht angegeben, so wird das Verzeichnis genommen in dem sich das Archiv befindet
existiert das Verzeichnis nicht, wird es angelegt | [
"Entpackt",
"alle",
"Dateien",
"des",
"Archives",
"in",
"ein",
"Verzeichnis"
] | 467bfa2547e6b4fa487d2d7f35fa6cc618dbc763 | https://github.com/webforge-labs/psc-cms/blob/467bfa2547e6b4fa487d2d7f35fa6cc618dbc763/lib/Psc/System/SimpleRarArchive.php#L38-L46 |
18,328 | jfusion/org.jfusion.framework | src/Installer/Plugin.php | Plugin.copy | function copy($name, $new_name, $update = false)
{
//replace not-allowed characters with _
$new_name = preg_replace('/([^a-zA-Z0-9_])/', '_', $new_name);
//initialise response element
$result = array();
$result['status'] = false;
if ($name && $new_name) {
//check to see if an integration was selected
... | php | function copy($name, $new_name, $update = false)
{
//replace not-allowed characters with _
$new_name = preg_replace('/([^a-zA-Z0-9_])/', '_', $new_name);
//initialise response element
$result = array();
$result['status'] = false;
if ($name && $new_name) {
//check to see if an integration was selected
... | [
"function",
"copy",
"(",
"$",
"name",
",",
"$",
"new_name",
",",
"$",
"update",
"=",
"false",
")",
"{",
"//replace not-allowed characters with _",
"$",
"new_name",
"=",
"preg_replace",
"(",
"'/([^a-zA-Z0-9_])/'",
",",
"'_'",
",",
"$",
"new_name",
")",
";",
"... | handles copying JFusion plugins
@param string $name name of the JFusion plugin used
@param string $new_name name of the copied plugin
@param boolean $update mark if we updating a copied plugin
@throws RuntimeException
@return boolean | [
"handles",
"copying",
"JFusion",
"plugins"
] | 65771963f23ccabcf1f867eb17c9452299cfe683 | https://github.com/jfusion/org.jfusion.framework/blob/65771963f23ccabcf1f867eb17c9452299cfe683/src/Installer/Plugin.php#L332-L396 |
18,329 | jfusion/org.jfusion.framework | src/Installer/Plugin.php | Plugin.getManifest | function getManifest($dir)
{
$file = $dir . '/jfusion.xml';
$this->installer->setPath('manifest', $file);
// If we cannot load the xml file return null
$xml = JFusionFramework::getXml($file);
if (!($xml instanceof SimpleXMLElement) || ($xml->getName() != 'extension')) {
... | php | function getManifest($dir)
{
$file = $dir . '/jfusion.xml';
$this->installer->setPath('manifest', $file);
// If we cannot load the xml file return null
$xml = JFusionFramework::getXml($file);
if (!($xml instanceof SimpleXMLElement) || ($xml->getName() != 'extension')) {
... | [
"function",
"getManifest",
"(",
"$",
"dir",
")",
"{",
"$",
"file",
"=",
"$",
"dir",
".",
"'/jfusion.xml'",
";",
"$",
"this",
"->",
"installer",
"->",
"setPath",
"(",
"'manifest'",
",",
"$",
"file",
")",
";",
"// If we cannot load the xml file return null",
"... | load manifest file with installation information
@param string $dir Directory
@return SimpleXMLElement object (or null) | [
"load",
"manifest",
"file",
"with",
"installation",
"information"
] | 65771963f23ccabcf1f867eb17c9452299cfe683 | https://github.com/jfusion/org.jfusion.framework/blob/65771963f23ccabcf1f867eb17c9452299cfe683/src/Installer/Plugin.php#L405-L432 |
18,330 | jfusion/org.jfusion.framework | src/Installer/Plugin.php | Plugin.getFiles | function getFiles($folder, $name)
{
$filesArray = array();
$files = Folder::files($folder, null, false, true);
$path = JFusionFramework::getPluginPath($name);
foreach ($files as $file) {
$file = str_replace($path . '/', '', $file);
$file = str_replace($path . '\\'... | php | function getFiles($folder, $name)
{
$filesArray = array();
$files = Folder::files($folder, null, false, true);
$path = JFusionFramework::getPluginPath($name);
foreach ($files as $file) {
$file = str_replace($path . '/', '', $file);
$file = str_replace($path . '\\'... | [
"function",
"getFiles",
"(",
"$",
"folder",
",",
"$",
"name",
")",
"{",
"$",
"filesArray",
"=",
"array",
"(",
")",
";",
"$",
"files",
"=",
"Folder",
"::",
"files",
"(",
"$",
"folder",
",",
"null",
",",
"false",
",",
"true",
")",
";",
"$",
"path",... | get files function
@param string $folder folder name
@param string $name name
@return array files | [
"get",
"files",
"function"
] | 65771963f23ccabcf1f867eb17c9452299cfe683 | https://github.com/jfusion/org.jfusion.framework/blob/65771963f23ccabcf1f867eb17c9452299cfe683/src/Installer/Plugin.php#L442-L462 |
18,331 | phug-php/formatter | src/Phug/Formatter/Element/AbstractAssignmentContainerElement.php | AbstractAssignmentContainerElement.addAssignment | public function addAssignment(AssignmentElement $element)
{
$element->setContainer($this);
$this->getAssignments()->attach($element);
return $this;
} | php | public function addAssignment(AssignmentElement $element)
{
$element->setContainer($this);
$this->getAssignments()->attach($element);
return $this;
} | [
"public",
"function",
"addAssignment",
"(",
"AssignmentElement",
"$",
"element",
")",
"{",
"$",
"element",
"->",
"setContainer",
"(",
"$",
"this",
")",
";",
"$",
"this",
"->",
"getAssignments",
"(",
")",
"->",
"attach",
"(",
"$",
"element",
")",
";",
"re... | Add assignment to the markup.
@param AssignmentElement $element
@return $this | [
"Add",
"assignment",
"to",
"the",
"markup",
"."
] | 3f9286a169a0d45b8b8acc1fae64e880ebdb567e | https://github.com/phug-php/formatter/blob/3f9286a169a0d45b8b8acc1fae64e880ebdb567e/src/Phug/Formatter/Element/AbstractAssignmentContainerElement.php#L20-L26 |
18,332 | phug-php/formatter | src/Phug/Formatter/Element/AbstractAssignmentContainerElement.php | AbstractAssignmentContainerElement.getAssignmentsByName | public function getAssignmentsByName($name)
{
$result = [];
foreach ($this->getAssignments() as $assignment) {
/* @var AssignmentElement $assignment */
if ($assignment->getName() === $name) {
$result[] = $assignment;
}
}
return $r... | php | public function getAssignmentsByName($name)
{
$result = [];
foreach ($this->getAssignments() as $assignment) {
/* @var AssignmentElement $assignment */
if ($assignment->getName() === $name) {
$result[] = $assignment;
}
}
return $r... | [
"public",
"function",
"getAssignmentsByName",
"(",
"$",
"name",
")",
"{",
"$",
"result",
"=",
"[",
"]",
";",
"foreach",
"(",
"$",
"this",
"->",
"getAssignments",
"(",
")",
"as",
"$",
"assignment",
")",
"{",
"/* @var AssignmentElement $assignment */",
"if",
"... | Return markup assignments list of a specific name.
@param $name
@return AssignmentElement[] | [
"Return",
"markup",
"assignments",
"list",
"of",
"a",
"specific",
"name",
"."
] | 3f9286a169a0d45b8b8acc1fae64e880ebdb567e | https://github.com/phug-php/formatter/blob/3f9286a169a0d45b8b8acc1fae64e880ebdb567e/src/Phug/Formatter/Element/AbstractAssignmentContainerElement.php#L63-L75 |
18,333 | qcubed/orm | src/Codegen/TypeTable.php | TypeTable.literal | public static function literal($mixColValue)
{
if (is_null($mixColValue)) {
return 'null';
} elseif (is_integer($mixColValue)) {
return $mixColValue;
} elseif (is_bool($mixColValue)) {
return ($mixColValue ? 'true' : 'false');
} elseif (is_float($m... | php | public static function literal($mixColValue)
{
if (is_null($mixColValue)) {
return 'null';
} elseif (is_integer($mixColValue)) {
return $mixColValue;
} elseif (is_bool($mixColValue)) {
return ($mixColValue ? 'true' : 'false');
} elseif (is_float($m... | [
"public",
"static",
"function",
"literal",
"(",
"$",
"mixColValue",
")",
"{",
"if",
"(",
"is_null",
"(",
"$",
"mixColValue",
")",
")",
"{",
"return",
"'null'",
";",
"}",
"elseif",
"(",
"is_integer",
"(",
"$",
"mixColValue",
")",
")",
"{",
"return",
"$"... | Returns the string that will be used to represent the literal value given when codegenning a type table
@param mixed $mixColValue
@return string | [
"Returns",
"the",
"string",
"that",
"will",
"be",
"used",
"to",
"represent",
"the",
"literal",
"value",
"given",
"when",
"codegenning",
"a",
"type",
"table"
] | f320eba671f20874b1f3809c5293f8c02d5b1204 | https://github.com/qcubed/orm/blob/f320eba671f20874b1f3809c5293f8c02d5b1204/src/Codegen/TypeTable.php#L99-L115 |
18,334 | dunkelfrosch/phpcoverfish | src/PHPCoverFish/Common/CoverFishOutput.php | CoverFishOutput.writeFinalCheckResults | private function writeFinalCheckResults(CoverFishResult $coverFishResult)
{
if (false === $this->scanFailure) {
$this->writeFileResult(self::FILE_PASS, null);
} else {
$this->writeFileResult(self::FILE_FAILURE, $coverFishResult->getFailureStream());
}
$this->... | php | private function writeFinalCheckResults(CoverFishResult $coverFishResult)
{
if (false === $this->scanFailure) {
$this->writeFileResult(self::FILE_PASS, null);
} else {
$this->writeFileResult(self::FILE_FAILURE, $coverFishResult->getFailureStream());
}
$this->... | [
"private",
"function",
"writeFinalCheckResults",
"(",
"CoverFishResult",
"$",
"coverFishResult",
")",
"{",
"if",
"(",
"false",
"===",
"$",
"this",
"->",
"scanFailure",
")",
"{",
"$",
"this",
"->",
"writeFileResult",
"(",
"self",
"::",
"FILE_PASS",
",",
"null",... | write single file check result
@param CoverFishResult $coverFishResult | [
"write",
"single",
"file",
"check",
"result"
] | 779bd399ec8f4cadb3b7854200695c5eb3f5a8ad | https://github.com/dunkelfrosch/phpcoverfish/blob/779bd399ec8f4cadb3b7854200695c5eb3f5a8ad/src/PHPCoverFish/Common/CoverFishOutput.php#L217-L226 |
18,335 | dunkelfrosch/phpcoverfish | src/PHPCoverFish/Common/CoverFishOutput.php | CoverFishOutput.writeJsonFailureStream | private function writeJsonFailureStream(
CoverFishResult $coverFishResult,
CoverFishPHPUnitTest $unitTest,
CoverFishMessageError $mappingError,
$coverLine
) {
$this->jsonResult['errorCount'] = $coverFishResult->getFailureCount();
$this->jsonResult['errorMessage'] = $m... | php | private function writeJsonFailureStream(
CoverFishResult $coverFishResult,
CoverFishPHPUnitTest $unitTest,
CoverFishMessageError $mappingError,
$coverLine
) {
$this->jsonResult['errorCount'] = $coverFishResult->getFailureCount();
$this->jsonResult['errorMessage'] = $m... | [
"private",
"function",
"writeJsonFailureStream",
"(",
"CoverFishResult",
"$",
"coverFishResult",
",",
"CoverFishPHPUnitTest",
"$",
"unitTest",
",",
"CoverFishMessageError",
"$",
"mappingError",
",",
"$",
"coverLine",
")",
"{",
"$",
"this",
"->",
"jsonResult",
"[",
"... | write single json error line
@param CoverFishResult $coverFishResult
@param CoverFishPHPUnitTest $unitTest
@param CoverFishMessageError $mappingError
@param $coverLine | [
"write",
"single",
"json",
"error",
"line"
] | 779bd399ec8f4cadb3b7854200695c5eb3f5a8ad | https://github.com/dunkelfrosch/phpcoverfish/blob/779bd399ec8f4cadb3b7854200695c5eb3f5a8ad/src/PHPCoverFish/Common/CoverFishOutput.php#L236-L249 |
18,336 | dunkelfrosch/phpcoverfish | src/PHPCoverFish/Common/CoverFishOutput.php | CoverFishOutput.getMacroLineInfo | protected function getMacroLineInfo($failureCount, CoverFishPHPUnitTest $unitTest)
{
$lineInfoMacro = '%sError #%s in method "%s" (L:~%s)';
if ($this->outputLevel > 1) {
$lineInfoMacro = '%sError #%s in method "%s", Line ~%s';
}
return sprintf($lineInfoMacro,
... | php | protected function getMacroLineInfo($failureCount, CoverFishPHPUnitTest $unitTest)
{
$lineInfoMacro = '%sError #%s in method "%s" (L:~%s)';
if ($this->outputLevel > 1) {
$lineInfoMacro = '%sError #%s in method "%s", Line ~%s';
}
return sprintf($lineInfoMacro,
... | [
"protected",
"function",
"getMacroLineInfo",
"(",
"$",
"failureCount",
",",
"CoverFishPHPUnitTest",
"$",
"unitTest",
")",
"{",
"$",
"lineInfoMacro",
"=",
"'%sError #%s in method \"%s\" (L:~%s)'",
";",
"if",
"(",
"$",
"this",
"->",
"outputLevel",
">",
"1",
")",
"{"... | message block macro, line 01, message title
@param int $failureCount
@param CoverFishPHPUnitTest $unitTest
@return string | [
"message",
"block",
"macro",
"line",
"01",
"message",
"title"
] | 779bd399ec8f4cadb3b7854200695c5eb3f5a8ad | https://github.com/dunkelfrosch/phpcoverfish/blob/779bd399ec8f4cadb3b7854200695c5eb3f5a8ad/src/PHPCoverFish/Common/CoverFishOutput.php#L269-L289 |
18,337 | dunkelfrosch/phpcoverfish | src/PHPCoverFish/Common/CoverFishOutput.php | CoverFishOutput.getMacroCoverErrorMessage | protected function getMacroCoverErrorMessage(CoverFishMessageError $mappingError)
{
$lineMessageMacro = '%s%s: %s ';
if ($this->outputLevel > 1) {
$lineMessageMacro = '%s%s: %s (ErrorCode: %s)';
}
return sprintf($lineMessageMacro,
$this->setIndent(self::MACRO... | php | protected function getMacroCoverErrorMessage(CoverFishMessageError $mappingError)
{
$lineMessageMacro = '%s%s: %s ';
if ($this->outputLevel > 1) {
$lineMessageMacro = '%s%s: %s (ErrorCode: %s)';
}
return sprintf($lineMessageMacro,
$this->setIndent(self::MACRO... | [
"protected",
"function",
"getMacroCoverErrorMessage",
"(",
"CoverFishMessageError",
"$",
"mappingError",
")",
"{",
"$",
"lineMessageMacro",
"=",
"'%s%s: %s '",
";",
"if",
"(",
"$",
"this",
"->",
"outputLevel",
">",
"1",
")",
"{",
"$",
"lineMessageMacro",
"=",
"'... | message block macro, line 04, error message
@param CoverFishMessageError $mappingError
@return string | [
"message",
"block",
"macro",
"line",
"04",
"error",
"message"
] | 779bd399ec8f4cadb3b7854200695c5eb3f5a8ad | https://github.com/dunkelfrosch/phpcoverfish/blob/779bd399ec8f4cadb3b7854200695c5eb3f5a8ad/src/PHPCoverFish/Common/CoverFishOutput.php#L340-L356 |
18,338 | webforge-labs/psc-cms | lib/Psc/JS/Helper.php | Helper.convertHashMap | public static function convertHashMap(\stdClass $object, $quote = self::QUOTE_SINGLE) {
$hash = '{';
$vars = get_object_vars($object);
if (count($vars) > 0) {
foreach ($vars as $key =>$value) {
$hash .= sprintf('"%s": %s,', $key, self::convertValue($value,$quote)); // json encode kanns au... | php | public static function convertHashMap(\stdClass $object, $quote = self::QUOTE_SINGLE) {
$hash = '{';
$vars = get_object_vars($object);
if (count($vars) > 0) {
foreach ($vars as $key =>$value) {
$hash .= sprintf('"%s": %s,', $key, self::convertValue($value,$quote)); // json encode kanns au... | [
"public",
"static",
"function",
"convertHashMap",
"(",
"\\",
"stdClass",
"$",
"object",
",",
"$",
"quote",
"=",
"self",
"::",
"QUOTE_SINGLE",
")",
"{",
"$",
"hash",
"=",
"'{'",
";",
"$",
"vars",
"=",
"get_object_vars",
"(",
"$",
"object",
")",
";",
"if... | Wandelt ein Object in ein Javascript Object-Literal um
@return string | [
"Wandelt",
"ein",
"Object",
"in",
"ein",
"Javascript",
"Object",
"-",
"Literal",
"um"
] | 467bfa2547e6b4fa487d2d7f35fa6cc618dbc763 | https://github.com/webforge-labs/psc-cms/blob/467bfa2547e6b4fa487d2d7f35fa6cc618dbc763/lib/Psc/JS/Helper.php#L91-L104 |
18,339 | webforge-labs/psc-cms | lib/Psc/JS/Helper.php | Helper.requireLoad | public static function requireLoad(Array $requirements, Array $alias, $jsCode) {
return sprintf(
"requireLoad([%s], function (main%s) { // main is unshifted automatically\n %s\n});",
self::buildRequirements($requirements),
count($alias) > 0 ? ', '.implode(', ', $alias) : '',
self::convertJS... | php | public static function requireLoad(Array $requirements, Array $alias, $jsCode) {
return sprintf(
"requireLoad([%s], function (main%s) { // main is unshifted automatically\n %s\n});",
self::buildRequirements($requirements),
count($alias) > 0 ? ', '.implode(', ', $alias) : '',
self::convertJS... | [
"public",
"static",
"function",
"requireLoad",
"(",
"Array",
"$",
"requirements",
",",
"Array",
"$",
"alias",
",",
"$",
"jsCode",
")",
"{",
"return",
"sprintf",
"(",
"\"requireLoad([%s], function (main%s) { // main is unshifted automatically\\n %s\\n});\"",
",",
"self",
... | This function loads inline script in blocking mode
the application has to inject window.requireLoad
this is a blocking way to load, because there is the requireLoad() function which is directly called,
which concatenates the job to the boot.getLoader() the jobs can then be loaded with boot.getLoader().finished() | [
"This",
"function",
"loads",
"inline",
"script",
"in",
"blocking",
"mode"
] | 467bfa2547e6b4fa487d2d7f35fa6cc618dbc763 | https://github.com/webforge-labs/psc-cms/blob/467bfa2547e6b4fa487d2d7f35fa6cc618dbc763/lib/Psc/JS/Helper.php#L157-L164 |
18,340 | webforge-labs/psc-cms | lib/Psc/JS/Helper.php | Helper.bootLoad | public static function bootLoad(Array $requirements, $alias = array(), $jsCode) {
return self::requirejs('boot', 'boot', sprintf(
"boot.getLoader().onRequire([%s], function (%s) {\n %s\n });",
self::buildRequirements($requirements),
implode(', ', $alias),
self::convertJSCode($jsCode)
... | php | public static function bootLoad(Array $requirements, $alias = array(), $jsCode) {
return self::requirejs('boot', 'boot', sprintf(
"boot.getLoader().onRequire([%s], function (%s) {\n %s\n });",
self::buildRequirements($requirements),
implode(', ', $alias),
self::convertJSCode($jsCode)
... | [
"public",
"static",
"function",
"bootLoad",
"(",
"Array",
"$",
"requirements",
",",
"$",
"alias",
"=",
"array",
"(",
")",
",",
"$",
"jsCode",
")",
"{",
"return",
"self",
"::",
"requirejs",
"(",
"'boot'",
",",
"'boot'",
",",
"sprintf",
"(",
"\"boot.getLoa... | This function loads inline script in an HTML-page
this is NON blocking way to load, because there the require is nested here
use it in inline scripts which are directly loaded from the HTML on the index page (and only there)
boot is required
boot should have .getLoader() to attach the requirements and loading callbac... | [
"This",
"function",
"loads",
"inline",
"script",
"in",
"an",
"HTML",
"-",
"page"
] | 467bfa2547e6b4fa487d2d7f35fa6cc618dbc763 | https://github.com/webforge-labs/psc-cms/blob/467bfa2547e6b4fa487d2d7f35fa6cc618dbc763/lib/Psc/JS/Helper.php#L176-L183 |
18,341 | Chill-project/Main | Form/Type/AppendScopeChoiceTypeTrait.php | AppendScopeChoiceTypeTrait.appendScopeChoices | protected function appendScopeChoices(FormBuilderInterface $builder,
Role $role, Center $center, User $user,
AuthorizationHelper $authorizationHelper,
TranslatableStringHelper $translatableStringHelper,
ObjectManager $om, $name = 'scope')
{
$reachableScopes ... | php | protected function appendScopeChoices(FormBuilderInterface $builder,
Role $role, Center $center, User $user,
AuthorizationHelper $authorizationHelper,
TranslatableStringHelper $translatableStringHelper,
ObjectManager $om, $name = 'scope')
{
$reachableScopes ... | [
"protected",
"function",
"appendScopeChoices",
"(",
"FormBuilderInterface",
"$",
"builder",
",",
"Role",
"$",
"role",
",",
"Center",
"$",
"center",
",",
"User",
"$",
"user",
",",
"AuthorizationHelper",
"$",
"authorizationHelper",
",",
"TranslatableStringHelper",
"$"... | Append a scope choice field, with the scopes reachable by given
user for the given role and center.
The field is added on event FormEvents::PRE_SET_DATA
@param FormBuilderInterface $builder
@param Role $role
@param Center $center
@param User $user
@param AuthorizationHelper $authorizationHelper
@param TranslatableStr... | [
"Append",
"a",
"scope",
"choice",
"field",
"with",
"the",
"scopes",
"reachable",
"by",
"given",
"user",
"for",
"the",
"given",
"role",
"and",
"center",
"."
] | 384cb6c793072a4f1047dc5cafc2157ee2419f60 | https://github.com/Chill-project/Main/blob/384cb6c793072a4f1047dc5cafc2157ee2419f60/Form/Type/AppendScopeChoiceTypeTrait.php#L100-L131 |
18,342 | laraning/surveyor | src/Traits/UsesProfiles.php | UsesProfiles.hasProfile | public function hasProfile($profiles) : bool
{
$profiles = (array) $profiles;
return count(array_intersect($this->profiles->pluck('code')->toArray(), $profiles)) > 0;
} | php | public function hasProfile($profiles) : bool
{
$profiles = (array) $profiles;
return count(array_intersect($this->profiles->pluck('code')->toArray(), $profiles)) > 0;
} | [
"public",
"function",
"hasProfile",
"(",
"$",
"profiles",
")",
":",
"bool",
"{",
"$",
"profiles",
"=",
"(",
"array",
")",
"$",
"profiles",
";",
"return",
"count",
"(",
"array_intersect",
"(",
"$",
"this",
"->",
"profiles",
"->",
"pluck",
"(",
"'code'",
... | Matches at least one user profile.
@param array $profiles The user profile string array.
@return bool True in case it finds at least one. | [
"Matches",
"at",
"least",
"one",
"user",
"profile",
"."
] | d845b74d20f9a4a307991019502c1b14b1730e86 | https://github.com/laraning/surveyor/blob/d845b74d20f9a4a307991019502c1b14b1730e86/src/Traits/UsesProfiles.php#L23-L28 |
18,343 | laraning/surveyor | src/Traits/UsesProfiles.php | UsesProfiles.hasAllProfiles | public function hasAllProfiles($profiles) : bool
{
$profiles = (array) $profiles;
return count(array_intersect($this->profiles->pluck('code')->toArray(), $profiles)) == count($profiles);
} | php | public function hasAllProfiles($profiles) : bool
{
$profiles = (array) $profiles;
return count(array_intersect($this->profiles->pluck('code')->toArray(), $profiles)) == count($profiles);
} | [
"public",
"function",
"hasAllProfiles",
"(",
"$",
"profiles",
")",
":",
"bool",
"{",
"$",
"profiles",
"=",
"(",
"array",
")",
"$",
"profiles",
";",
"return",
"count",
"(",
"array_intersect",
"(",
"$",
"this",
"->",
"profiles",
"->",
"pluck",
"(",
"'code'... | Matches ALL user profiles.
@param array $profiles The user profile string array.
@return bool True in case it finds ALL of them. | [
"Matches",
"ALL",
"user",
"profiles",
"."
] | d845b74d20f9a4a307991019502c1b14b1730e86 | https://github.com/laraning/surveyor/blob/d845b74d20f9a4a307991019502c1b14b1730e86/src/Traits/UsesProfiles.php#L37-L42 |
18,344 | laraning/surveyor | src/Traits/UsesProfiles.php | UsesProfiles.assignProfiles | public function assignProfiles($profiles) : void
{
$profiles = (array) $profiles;
foreach ($profiles as $profile) {
$electedProfile = Profile::where('code', $profile)->first();
// Profile exists and not assigned to user?
if (!is_null($electedProfile) && !$this->h... | php | public function assignProfiles($profiles) : void
{
$profiles = (array) $profiles;
foreach ($profiles as $profile) {
$electedProfile = Profile::where('code', $profile)->first();
// Profile exists and not assigned to user?
if (!is_null($electedProfile) && !$this->h... | [
"public",
"function",
"assignProfiles",
"(",
"$",
"profiles",
")",
":",
"void",
"{",
"$",
"profiles",
"=",
"(",
"array",
")",
"$",
"profiles",
";",
"foreach",
"(",
"$",
"profiles",
"as",
"$",
"profile",
")",
"{",
"$",
"electedProfile",
"=",
"Profile",
... | Assigns profiles to the current model.
@param string|array $profiles The profile name(s) from the profiles table.
@return void | [
"Assigns",
"profiles",
"to",
"the",
"current",
"model",
"."
] | d845b74d20f9a4a307991019502c1b14b1730e86 | https://github.com/laraning/surveyor/blob/d845b74d20f9a4a307991019502c1b14b1730e86/src/Traits/UsesProfiles.php#L51-L68 |
18,345 | RobinDumontChaponet/TransitiveCore | src/simple/Front.php | Front.getContent | public function getContent(string $contentType = null): string
{
/*
if(null == $contentType)
$contentType = $this->contentType;
*/
switch($contentType) {
case 'application/vnd.transitive.document+json':
return $this->route->getDocument();
break;
... | php | public function getContent(string $contentType = null): string
{
/*
if(null == $contentType)
$contentType = $this->contentType;
*/
switch($contentType) {
case 'application/vnd.transitive.document+json':
return $this->route->getDocument();
break;
... | [
"public",
"function",
"getContent",
"(",
"string",
"$",
"contentType",
"=",
"null",
")",
":",
"string",
"{",
"/*\n if(null == $contentType)\n $contentType = $this->contentType;\n*/",
"switch",
"(",
"$",
"contentType",
")",
"{",
"case",
"'application/vnd.tr... | Return processed content from current route.
@return string
@param string $contentType = null | [
"Return",
"processed",
"content",
"from",
"current",
"route",
"."
] | b83dd6fe0e49b8773de0f60861e5a5c306e2a38d | https://github.com/RobinDumontChaponet/TransitiveCore/blob/b83dd6fe0e49b8773de0f60861e5a5c306e2a38d/src/simple/Front.php#L182-L249 |
18,346 | alphayax/phpdoc_md | src/models/ClassMd.php | ClassMd.computeType | protected function computeType(){
if( interface_exists( $this->class, false)){
$this->type = 'Interface';
return;
}
if( trait_exists( $this->class, false)){
$this->type = 'Trait';
return;
}
$this->type = 'Class';
} | php | protected function computeType(){
if( interface_exists( $this->class, false)){
$this->type = 'Interface';
return;
}
if( trait_exists( $this->class, false)){
$this->type = 'Trait';
return;
}
$this->type = 'Class';
} | [
"protected",
"function",
"computeType",
"(",
")",
"{",
"if",
"(",
"interface_exists",
"(",
"$",
"this",
"->",
"class",
",",
"false",
")",
")",
"{",
"$",
"this",
"->",
"type",
"=",
"'Interface'",
";",
"return",
";",
"}",
"if",
"(",
"trait_exists",
"(",
... | Determine the type of class | [
"Determine",
"the",
"type",
"of",
"class"
] | 326da10b837161591a32ab4f36f9b2f4feabbe65 | https://github.com/alphayax/phpdoc_md/blob/326da10b837161591a32ab4f36f9b2f4feabbe65/src/models/ClassMd.php#L53-L63 |
18,347 | slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseApiLogPeer.php | BaseApiLogPeer.doSelectOne | public static function doSelectOne(Criteria $criteria, PropelPDO $con = null)
{
$critcopy = clone $criteria;
$critcopy->setLimit(1);
$objects = ApiLogPeer::doSelect($critcopy, $con);
if ($objects) {
return $objects[0];
}
return null;
} | php | public static function doSelectOne(Criteria $criteria, PropelPDO $con = null)
{
$critcopy = clone $criteria;
$critcopy->setLimit(1);
$objects = ApiLogPeer::doSelect($critcopy, $con);
if ($objects) {
return $objects[0];
}
return null;
} | [
"public",
"static",
"function",
"doSelectOne",
"(",
"Criteria",
"$",
"criteria",
",",
"PropelPDO",
"$",
"con",
"=",
"null",
")",
"{",
"$",
"critcopy",
"=",
"clone",
"$",
"criteria",
";",
"$",
"critcopy",
"->",
"setLimit",
"(",
"1",
")",
";",
"$",
"obje... | Selects one object from the DB.
@param Criteria $criteria object used to create the SELECT statement.
@param PropelPDO $con
@return ApiLog
@throws PropelException Any exceptions caught during processing will be
rethrown wrapped into a PropelException. | [
"Selects",
"one",
"object",
"from",
"the",
"DB",
"."
] | 2ba86d96f1f41f9424e2229c4e2b13017e973f89 | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseApiLogPeer.php#L236-L246 |
18,348 | slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseApiLogPeer.php | BaseApiLogPeer.doSelect | public static function doSelect(Criteria $criteria, PropelPDO $con = null)
{
return ApiLogPeer::populateObjects(ApiLogPeer::doSelectStmt($criteria, $con));
} | php | public static function doSelect(Criteria $criteria, PropelPDO $con = null)
{
return ApiLogPeer::populateObjects(ApiLogPeer::doSelectStmt($criteria, $con));
} | [
"public",
"static",
"function",
"doSelect",
"(",
"Criteria",
"$",
"criteria",
",",
"PropelPDO",
"$",
"con",
"=",
"null",
")",
"{",
"return",
"ApiLogPeer",
"::",
"populateObjects",
"(",
"ApiLogPeer",
"::",
"doSelectStmt",
"(",
"$",
"criteria",
",",
"$",
"con"... | Selects several row from the DB.
@param Criteria $criteria The Criteria object used to build the SELECT statement.
@param PropelPDO $con
@return array Array of selected Objects
@throws PropelException Any exceptions caught during processing will be
rethrown wrapped into a PropelException. | [
"Selects",
"several",
"row",
"from",
"the",
"DB",
"."
] | 2ba86d96f1f41f9424e2229c4e2b13017e973f89 | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseApiLogPeer.php#L256-L259 |
18,349 | aedart/laravel-helpers | src/Traits/Auth/PasswordTrait.php | PasswordTrait.getDefaultPassword | public function getDefaultPassword(): ?PasswordBroker
{
// By default, the Password Facade does not return the
// any actual password broker, but rather an
// instance of \Illuminate\Auth\Passwords\PasswordBrokerManager.
// Therefore, we make sure only to obtain its
// "defau... | php | public function getDefaultPassword(): ?PasswordBroker
{
// By default, the Password Facade does not return the
// any actual password broker, but rather an
// instance of \Illuminate\Auth\Passwords\PasswordBrokerManager.
// Therefore, we make sure only to obtain its
// "defau... | [
"public",
"function",
"getDefaultPassword",
"(",
")",
":",
"?",
"PasswordBroker",
"{",
"// By default, the Password Facade does not return the",
"// any actual password broker, but rather an",
"// instance of \\Illuminate\\Auth\\Passwords\\PasswordBrokerManager.",
"// Therefore, we make sure... | Get a default password value, if any is available
@return PasswordBroker|null A default password value or Null if no default value is available | [
"Get",
"a",
"default",
"password",
"value",
"if",
"any",
"is",
"available"
] | 8b81a2d6658f3f8cb62b6be2c34773aaa2df219a | https://github.com/aedart/laravel-helpers/blob/8b81a2d6658f3f8cb62b6be2c34773aaa2df219a/src/Traits/Auth/PasswordTrait.php#L76-L89 |
18,350 | webforge-labs/psc-cms | lib/Psc/UI/FormInputSet.php | FormInputSet.html | public function html() {
if (!$this->isMorphed())
$this->morph();
$html = NULL;
foreach ($this->elements as $el) {
$html .= $el->html()."\n";
}
return $html;
} | php | public function html() {
if (!$this->isMorphed())
$this->morph();
$html = NULL;
foreach ($this->elements as $el) {
$html .= $el->html()."\n";
}
return $html;
} | [
"public",
"function",
"html",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"isMorphed",
"(",
")",
")",
"$",
"this",
"->",
"morph",
"(",
")",
";",
"$",
"html",
"=",
"NULL",
";",
"foreach",
"(",
"$",
"this",
"->",
"elements",
"as",
"$",
"el"... | Wenn noch nicht gemorphed, wird das getan | [
"Wenn",
"noch",
"nicht",
"gemorphed",
"wird",
"das",
"getan"
] | 467bfa2547e6b4fa487d2d7f35fa6cc618dbc763 | https://github.com/webforge-labs/psc-cms/blob/467bfa2547e6b4fa487d2d7f35fa6cc618dbc763/lib/Psc/UI/FormInputSet.php#L77-L87 |
18,351 | factorio-item-browser/export-data | src/Registry/ModRegistry.php | ModRegistry.set | public function set(Mod $mod): void
{
$this->loadMods();
$this->mods[$mod->getName()] = $mod;
} | php | public function set(Mod $mod): void
{
$this->loadMods();
$this->mods[$mod->getName()] = $mod;
} | [
"public",
"function",
"set",
"(",
"Mod",
"$",
"mod",
")",
":",
"void",
"{",
"$",
"this",
"->",
"loadMods",
"(",
")",
";",
"$",
"this",
"->",
"mods",
"[",
"$",
"mod",
"->",
"getName",
"(",
")",
"]",
"=",
"$",
"mod",
";",
"}"
] | Sets a mod into the registry.
@param Mod $mod | [
"Sets",
"a",
"mod",
"into",
"the",
"registry",
"."
] | 1413b2eed0fbfed0521457ac7ef0d668ac30c212 | https://github.com/factorio-item-browser/export-data/blob/1413b2eed0fbfed0521457ac7ef0d668ac30c212/src/Registry/ModRegistry.php#L54-L58 |
18,352 | factorio-item-browser/export-data | src/Registry/ModRegistry.php | ModRegistry.get | public function get(string $modName): ?Mod
{
$this->loadMods();
return $this->mods[$modName] ?? null;
} | php | public function get(string $modName): ?Mod
{
$this->loadMods();
return $this->mods[$modName] ?? null;
} | [
"public",
"function",
"get",
"(",
"string",
"$",
"modName",
")",
":",
"?",
"Mod",
"{",
"$",
"this",
"->",
"loadMods",
"(",
")",
";",
"return",
"$",
"this",
"->",
"mods",
"[",
"$",
"modName",
"]",
"??",
"null",
";",
"}"
] | Returns a mod from the registry.
@param string $modName
@return Mod|null | [
"Returns",
"a",
"mod",
"from",
"the",
"registry",
"."
] | 1413b2eed0fbfed0521457ac7ef0d668ac30c212 | https://github.com/factorio-item-browser/export-data/blob/1413b2eed0fbfed0521457ac7ef0d668ac30c212/src/Registry/ModRegistry.php#L65-L69 |
18,353 | factorio-item-browser/export-data | src/Registry/ModRegistry.php | ModRegistry.saveMods | public function saveMods(): void
{
$mods = [];
foreach ($this->mods as $mod) {
$mods[] = $mod->writeData();
}
$this->saveContent(self::HASH_FILE_MODS, $this->encodeContent($mods));
} | php | public function saveMods(): void
{
$mods = [];
foreach ($this->mods as $mod) {
$mods[] = $mod->writeData();
}
$this->saveContent(self::HASH_FILE_MODS, $this->encodeContent($mods));
} | [
"public",
"function",
"saveMods",
"(",
")",
":",
"void",
"{",
"$",
"mods",
"=",
"[",
"]",
";",
"foreach",
"(",
"$",
"this",
"->",
"mods",
"as",
"$",
"mod",
")",
"{",
"$",
"mods",
"[",
"]",
"=",
"$",
"mod",
"->",
"writeData",
"(",
")",
";",
"}... | Saves the currently known mod to the adapter. | [
"Saves",
"the",
"currently",
"known",
"mod",
"to",
"the",
"adapter",
"."
] | 1413b2eed0fbfed0521457ac7ef0d668ac30c212 | https://github.com/factorio-item-browser/export-data/blob/1413b2eed0fbfed0521457ac7ef0d668ac30c212/src/Registry/ModRegistry.php#L84-L91 |
18,354 | factorio-item-browser/export-data | src/Registry/ModRegistry.php | ModRegistry.loadMods | protected function loadMods(): void
{
if (!$this->isLoaded) {
$this->mods = [];
foreach ($this->decodeContent((string) $this->loadContent(self::HASH_FILE_MODS)) as $modData) {
if (is_array($modData)) {
$mod = new Mod();
$mod->re... | php | protected function loadMods(): void
{
if (!$this->isLoaded) {
$this->mods = [];
foreach ($this->decodeContent((string) $this->loadContent(self::HASH_FILE_MODS)) as $modData) {
if (is_array($modData)) {
$mod = new Mod();
$mod->re... | [
"protected",
"function",
"loadMods",
"(",
")",
":",
"void",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"isLoaded",
")",
"{",
"$",
"this",
"->",
"mods",
"=",
"[",
"]",
";",
"foreach",
"(",
"$",
"this",
"->",
"decodeContent",
"(",
"(",
"string",
")",
... | Loads the mods from the file. | [
"Loads",
"the",
"mods",
"from",
"the",
"file",
"."
] | 1413b2eed0fbfed0521457ac7ef0d668ac30c212 | https://github.com/factorio-item-browser/export-data/blob/1413b2eed0fbfed0521457ac7ef0d668ac30c212/src/Registry/ModRegistry.php#L96-L109 |
18,355 | webforge-labs/psc-cms | lib/Psc/Code/Numbers.php | Numbers.toRoman | public static function toRoman($num) {
$conv = array(
10 => array('X', 'C', 'M'),
5 => array('V', 'L', 'D'),
1 => array('I', 'X', 'C'));
$roman = '';
if ($num < 0) {
return '';
}
$num = (int) $num;
... | php | public static function toRoman($num) {
$conv = array(
10 => array('X', 'C', 'M'),
5 => array('V', 'L', 'D'),
1 => array('I', 'X', 'C'));
$roman = '';
if ($num < 0) {
return '';
}
$num = (int) $num;
... | [
"public",
"static",
"function",
"toRoman",
"(",
"$",
"num",
")",
"{",
"$",
"conv",
"=",
"array",
"(",
"10",
"=>",
"array",
"(",
"'X'",
",",
"'C'",
",",
"'M'",
")",
",",
"5",
"=>",
"array",
"(",
"'V'",
",",
"'L'",
",",
"'D'",
")",
",",
"1",
"=... | Converts a number to its roman numeral representation
@param integer $num An integer between 0 and 3999
inclusive that should be converted
to a roman numeral integers higher than
3999 are supported from version 0.1.2
Note:
For an accurate result the integer shouldn't be higher
than 5 999 999. Higher integers ... | [
"Converts",
"a",
"number",
"to",
"its",
"roman",
"numeral",
"representation"
] | 467bfa2547e6b4fa487d2d7f35fa6cc618dbc763 | https://github.com/webforge-labs/psc-cms/blob/467bfa2547e6b4fa487d2d7f35fa6cc618dbc763/lib/Psc/Code/Numbers.php#L63-L103 |
18,356 | askupasoftware/amarkal | Extensions/WordPress/Options/OptionsPage.php | OptionsPage.register | public function register()
{
// This is the initial activation, save the defaults to the db
if(!$this->options->exists())
{
$this->reset();
}
// Only preprocess if this is the currently viewed page
if( $this->page->get_slug() == filter_input(INPUT... | php | public function register()
{
// This is the initial activation, save the defaults to the db
if(!$this->options->exists())
{
$this->reset();
}
// Only preprocess if this is the currently viewed page
if( $this->page->get_slug() == filter_input(INPUT... | [
"public",
"function",
"register",
"(",
")",
"{",
"// This is the initial activation, save the defaults to the db",
"if",
"(",
"!",
"$",
"this",
"->",
"options",
"->",
"exists",
"(",
")",
")",
"{",
"$",
"this",
"->",
"reset",
"(",
")",
";",
"}",
"// Only prepro... | Register the options page. | [
"Register",
"the",
"options",
"page",
"."
] | fe8283e2d6847ef697abec832da7ee741a85058c | https://github.com/askupasoftware/amarkal/blob/fe8283e2d6847ef697abec832da7ee741a85058c/Extensions/WordPress/Options/OptionsPage.php#L85-L102 |
18,357 | askupasoftware/amarkal | Extensions/WordPress/Options/OptionsPage.php | OptionsPage.create_page | private function create_page()
{
$self = $this;
$page = new \Amarkal\Extensions\WordPress\Admin\AdminPage(array(
'title' => $this->config->sidebar_title,
'icon' => $this->config->sidebar_icon,
'class' => $this->config->sidebar_icon_class,
... | php | private function create_page()
{
$self = $this;
$page = new \Amarkal\Extensions\WordPress\Admin\AdminPage(array(
'title' => $this->config->sidebar_title,
'icon' => $this->config->sidebar_icon,
'class' => $this->config->sidebar_icon_class,
... | [
"private",
"function",
"create_page",
"(",
")",
"{",
"$",
"self",
"=",
"$",
"this",
";",
"$",
"page",
"=",
"new",
"\\",
"Amarkal",
"\\",
"Extensions",
"\\",
"WordPress",
"\\",
"Admin",
"\\",
"AdminPage",
"(",
"array",
"(",
"'title'",
"=>",
"$",
"this",... | Create a new AdminPage.
@return \Amarkal\Extensions\WordPress\Admin\AdminPage | [
"Create",
"a",
"new",
"AdminPage",
"."
] | fe8283e2d6847ef697abec832da7ee741a85058c | https://github.com/askupasoftware/amarkal/blob/fe8283e2d6847ef697abec832da7ee741a85058c/Extensions/WordPress/Options/OptionsPage.php#L109-L127 |
18,358 | askupasoftware/amarkal | Extensions/WordPress/Options/OptionsPage.php | OptionsPage.render | private function render()
{
$this->do_action('afw_options_pre_render');
$layout = new Layout\Layout( $this->config );
$layout->render(true);
add_filter('admin_footer_text', array( __CLASS__, 'footer_credits' ) );
$this->do_action('afw_options_post_render');
} | php | private function render()
{
$this->do_action('afw_options_pre_render');
$layout = new Layout\Layout( $this->config );
$layout->render(true);
add_filter('admin_footer_text', array( __CLASS__, 'footer_credits' ) );
$this->do_action('afw_options_post_render');
} | [
"private",
"function",
"render",
"(",
")",
"{",
"$",
"this",
"->",
"do_action",
"(",
"'afw_options_pre_render'",
")",
";",
"$",
"layout",
"=",
"new",
"Layout",
"\\",
"Layout",
"(",
"$",
"this",
"->",
"config",
")",
";",
"$",
"layout",
"->",
"render",
"... | Internally used to render the page.
Called by AdminPage to generate the admin page's content. | [
"Internally",
"used",
"to",
"render",
"the",
"page",
".",
"Called",
"by",
"AdminPage",
"to",
"generate",
"the",
"admin",
"page",
"s",
"content",
"."
] | fe8283e2d6847ef697abec832da7ee741a85058c | https://github.com/askupasoftware/amarkal/blob/fe8283e2d6847ef697abec832da7ee741a85058c/Extensions/WordPress/Options/OptionsPage.php#L133-L140 |
18,359 | askupasoftware/amarkal | Extensions/WordPress/Options/OptionsPage.php | OptionsPage.preprocess | private function preprocess()
{
$this->do_action('afw_options_pre_process');
Notifier::reset();
State::set('errors', array());
$this->update();
$this->do_action('afw_options_post_process');
} | php | private function preprocess()
{
$this->do_action('afw_options_pre_process');
Notifier::reset();
State::set('errors', array());
$this->update();
$this->do_action('afw_options_post_process');
} | [
"private",
"function",
"preprocess",
"(",
")",
"{",
"$",
"this",
"->",
"do_action",
"(",
"'afw_options_pre_process'",
")",
";",
"Notifier",
"::",
"reset",
"(",
")",
";",
"State",
"::",
"set",
"(",
"'errors'",
",",
"array",
"(",
")",
")",
";",
"$",
"thi... | Internally used to update the options page's components. | [
"Internally",
"used",
"to",
"update",
"the",
"options",
"page",
"s",
"components",
"."
] | fe8283e2d6847ef697abec832da7ee741a85058c | https://github.com/askupasoftware/amarkal/blob/fe8283e2d6847ef697abec832da7ee741a85058c/Extensions/WordPress/Options/OptionsPage.php#L145-L152 |
18,360 | askupasoftware/amarkal | Extensions/WordPress/Options/OptionsPage.php | OptionsPage.set_errors | private function set_errors( $errors )
{
if( count( $errors ) == 0 )
{
return;
}
$errors_array = array();
foreach( $this->config->get_sections() as $section )
{
foreach( $section->get_fields() as $component )
{
... | php | private function set_errors( $errors )
{
if( count( $errors ) == 0 )
{
return;
}
$errors_array = array();
foreach( $this->config->get_sections() as $section )
{
foreach( $section->get_fields() as $component )
{
... | [
"private",
"function",
"set_errors",
"(",
"$",
"errors",
")",
"{",
"if",
"(",
"count",
"(",
"$",
"errors",
")",
"==",
"0",
")",
"{",
"return",
";",
"}",
"$",
"errors_array",
"=",
"array",
"(",
")",
";",
"foreach",
"(",
"$",
"this",
"->",
"config",
... | Set the state with the given errors.
@param array $errors | [
"Set",
"the",
"state",
"with",
"the",
"given",
"errors",
"."
] | fe8283e2d6847ef697abec832da7ee741a85058c | https://github.com/askupasoftware/amarkal/blob/fe8283e2d6847ef697abec832da7ee741a85058c/Extensions/WordPress/Options/OptionsPage.php#L188-L210 |
18,361 | askupasoftware/amarkal | Extensions/WordPress/Options/OptionsPage.php | OptionsPage.set_global_variable | private function set_global_variable()
{
$var_name = "";
if( null != $this->config->global_variable )
{
$var_name = $this->config->global_variable;
}
else
{
$var_name = $this->page->get_slug().'_options';
}
$GL... | php | private function set_global_variable()
{
$var_name = "";
if( null != $this->config->global_variable )
{
$var_name = $this->config->global_variable;
}
else
{
$var_name = $this->page->get_slug().'_options';
}
$GL... | [
"private",
"function",
"set_global_variable",
"(",
")",
"{",
"$",
"var_name",
"=",
"\"\"",
";",
"if",
"(",
"null",
"!=",
"$",
"this",
"->",
"config",
"->",
"global_variable",
")",
"{",
"$",
"var_name",
"=",
"$",
"this",
"->",
"config",
"->",
"global_vari... | Set a global variable containing the option values to be used throughout
the program. | [
"Set",
"a",
"global",
"variable",
"containing",
"the",
"option",
"values",
"to",
"be",
"used",
"throughout",
"the",
"program",
"."
] | fe8283e2d6847ef697abec832da7ee741a85058c | https://github.com/askupasoftware/amarkal/blob/fe8283e2d6847ef697abec832da7ee741a85058c/Extensions/WordPress/Options/OptionsPage.php#L255-L269 |
18,362 | titon/db | src/Titon/Db/Behavior/FilterBehavior.php | FilterBehavior.filter | public function filter($field, $filter, array $options = []) {
if (!in_array($filter, [self::HTML, self::NEWLINES, self::WHITESPACE, self::XSS])) {
throw new InvalidArgumentException(sprintf('Filter %s does not exist', $filter));
}
$this->_filters[$field][$filter] = $options;
... | php | public function filter($field, $filter, array $options = []) {
if (!in_array($filter, [self::HTML, self::NEWLINES, self::WHITESPACE, self::XSS])) {
throw new InvalidArgumentException(sprintf('Filter %s does not exist', $filter));
}
$this->_filters[$field][$filter] = $options;
... | [
"public",
"function",
"filter",
"(",
"$",
"field",
",",
"$",
"filter",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
"{",
"if",
"(",
"!",
"in_array",
"(",
"$",
"filter",
",",
"[",
"self",
"::",
"HTML",
",",
"self",
"::",
"NEWLINES",
",",
"sel... | Define a filter for a specific field.
@param string $field
@param string $filter
@param array $options
@return $this
@throws \Titon\Db\Exception\InvalidArgumentException | [
"Define",
"a",
"filter",
"for",
"a",
"specific",
"field",
"."
] | fbc5159d1ce9d2139759c9367565986981485604 | https://github.com/titon/db/blob/fbc5159d1ce9d2139759c9367565986981485604/src/Titon/Db/Behavior/FilterBehavior.php#L44-L52 |
18,363 | tbreuss/pvc | src/Config.php | Config.get | public function get(string $name, $default = null)
{
$path = explode('.', $name);
$current = $this->data;
foreach ($path as $field) {
if (isset($current) && isset($current[$field])) {
$current = $current[$field];
} elseif (is_array($current) && isset($... | php | public function get(string $name, $default = null)
{
$path = explode('.', $name);
$current = $this->data;
foreach ($path as $field) {
if (isset($current) && isset($current[$field])) {
$current = $current[$field];
} elseif (is_array($current) && isset($... | [
"public",
"function",
"get",
"(",
"string",
"$",
"name",
",",
"$",
"default",
"=",
"null",
")",
"{",
"$",
"path",
"=",
"explode",
"(",
"'.'",
",",
"$",
"name",
")",
";",
"$",
"current",
"=",
"$",
"this",
"->",
"data",
";",
"foreach",
"(",
"$",
... | Get value by using dot notation for nested arrays.
@example $value = $this->get('foo.bar.baz');
@param string $name
@param mixed $default
@return mixed | [
"Get",
"value",
"by",
"using",
"dot",
"notation",
"for",
"nested",
"arrays",
"."
] | ae100351010a8c9f645ccb918f70a26e167de7a7 | https://github.com/tbreuss/pvc/blob/ae100351010a8c9f645ccb918f70a26e167de7a7/src/Config.php#L32-L46 |
18,364 | arsengoian/viper-framework | src/Viper/Core/Routing/Router.php | Router.registerCustomRouteClass | public static function registerCustomRouteClass(string $routeKey, string $routeClass) {
self::checkRegisterAvailability();
if (!class_exists($routeClass))
throw new AppLogicException('Class '.$routeClass.' does not exist');
self::$customRouteClasses[$routeKey] = $routeClass;
} | php | public static function registerCustomRouteClass(string $routeKey, string $routeClass) {
self::checkRegisterAvailability();
if (!class_exists($routeClass))
throw new AppLogicException('Class '.$routeClass.' does not exist');
self::$customRouteClasses[$routeKey] = $routeClass;
} | [
"public",
"static",
"function",
"registerCustomRouteClass",
"(",
"string",
"$",
"routeKey",
",",
"string",
"$",
"routeClass",
")",
"{",
"self",
"::",
"checkRegisterAvailability",
"(",
")",
";",
"if",
"(",
"!",
"class_exists",
"(",
"$",
"routeClass",
")",
")",
... | Can't set custom actions. Only parsable from URL | [
"Can",
"t",
"set",
"custom",
"actions",
".",
"Only",
"parsable",
"from",
"URL"
] | 22796c5cc219cae3ca0b4af370a347ba2acab0f2 | https://github.com/arsengoian/viper-framework/blob/22796c5cc219cae3ca0b4af370a347ba2acab0f2/src/Viper/Core/Routing/Router.php#L59-L64 |
18,365 | EvanDotPro/EdpGithub | src/EdpGithub/Http/Client.php | Client.getHttpClient | public function getHttpClient($path)
{
$this->httpClient = new Http\Client();
$this->httpClient->setAdapter($this->getHttpAdapter());
$this->httpClient->setUri($this->options['base_url'] . $path);
return $this->httpClient;
} | php | public function getHttpClient($path)
{
$this->httpClient = new Http\Client();
$this->httpClient->setAdapter($this->getHttpAdapter());
$this->httpClient->setUri($this->options['base_url'] . $path);
return $this->httpClient;
} | [
"public",
"function",
"getHttpClient",
"(",
"$",
"path",
")",
"{",
"$",
"this",
"->",
"httpClient",
"=",
"new",
"Http",
"\\",
"Client",
"(",
")",
";",
"$",
"this",
"->",
"httpClient",
"->",
"setAdapter",
"(",
"$",
"this",
"->",
"getHttpAdapter",
"(",
"... | Get Http Client
@param string $path
@return Http\Client | [
"Get",
"Http",
"Client"
] | 51f3e33e02edbef011103e3c2c1629d46af011a3 | https://github.com/EvanDotPro/EdpGithub/blob/51f3e33e02edbef011103e3c2c1629d46af011a3/src/EdpGithub/Http/Client.php#L151-L158 |
18,366 | EvanDotPro/EdpGithub | src/EdpGithub/Http/Client.php | Client.getHttpAdapter | public function getHttpAdapter()
{
if (null === $this->httpAdapter) {
$this->httpAdapter = new Http\Client\Adapter\Curl();
$this->httpAdapter->setOptions(array(
'curloptions' => array(
CURLOPT_SSL_VERIFYPEER => false,
),
... | php | public function getHttpAdapter()
{
if (null === $this->httpAdapter) {
$this->httpAdapter = new Http\Client\Adapter\Curl();
$this->httpAdapter->setOptions(array(
'curloptions' => array(
CURLOPT_SSL_VERIFYPEER => false,
),
... | [
"public",
"function",
"getHttpAdapter",
"(",
")",
"{",
"if",
"(",
"null",
"===",
"$",
"this",
"->",
"httpAdapter",
")",
"{",
"$",
"this",
"->",
"httpAdapter",
"=",
"new",
"Http",
"\\",
"Client",
"\\",
"Adapter",
"\\",
"Curl",
"(",
")",
";",
"$",
"thi... | Get Http Adapter
@return Http\Client\Adapter\Curl | [
"Get",
"Http",
"Adapter"
] | 51f3e33e02edbef011103e3c2c1629d46af011a3 | https://github.com/EvanDotPro/EdpGithub/blob/51f3e33e02edbef011103e3c2c1629d46af011a3/src/EdpGithub/Http/Client.php#L164-L176 |
18,367 | netgen/ngopengraph | classes/ngopengraphbase.php | ngOpenGraphBase.getInstance | static function getInstance( eZContentObjectAttribute $objectAttribute )
{
$datatypeString = $objectAttribute->attribute( 'data_type_string' );
$dataTypeHandlers = self::$ogIni->variable( 'OpenGraph', 'DataTypeHandlers' );
if ( array_key_exists( $datatypeString, $dataTypeHandlers ) )
... | php | static function getInstance( eZContentObjectAttribute $objectAttribute )
{
$datatypeString = $objectAttribute->attribute( 'data_type_string' );
$dataTypeHandlers = self::$ogIni->variable( 'OpenGraph', 'DataTypeHandlers' );
if ( array_key_exists( $datatypeString, $dataTypeHandlers ) )
... | [
"static",
"function",
"getInstance",
"(",
"eZContentObjectAttribute",
"$",
"objectAttribute",
")",
"{",
"$",
"datatypeString",
"=",
"$",
"objectAttribute",
"->",
"attribute",
"(",
"'data_type_string'",
")",
";",
"$",
"dataTypeHandlers",
"=",
"self",
"::",
"$",
"og... | Gets the instance of Open Graph attribute handler for the attribute
@param eZContentObjectAttribute $objectAttribute
@return ngOpenGraphBase | [
"Gets",
"the",
"instance",
"of",
"Open",
"Graph",
"attribute",
"handler",
"for",
"the",
"attribute"
] | 68a99862f240ee74174ea9b888a9a33743142e27 | https://github.com/netgen/ngopengraph/blob/68a99862f240ee74174ea9b888a9a33743142e27/classes/ngopengraphbase.php#L22-L36 |
18,368 | rayrutjes/domain-foundation | src/Domain/AggregateRoot/EventSourcedAggregateRoot.php | EventSourcedAggregateRoot.commitChanges | final public function commitChanges()
{
if (null !== $this->changes) {
$this->lastCommittedEventSequenceNumber = $this->changes->lastSequenceNumber();
$this->changes->commit();
}
} | php | final public function commitChanges()
{
if (null !== $this->changes) {
$this->lastCommittedEventSequenceNumber = $this->changes->lastSequenceNumber();
$this->changes->commit();
}
} | [
"final",
"public",
"function",
"commitChanges",
"(",
")",
"{",
"if",
"(",
"null",
"!==",
"$",
"this",
"->",
"changes",
")",
"{",
"$",
"this",
"->",
"lastCommittedEventSequenceNumber",
"=",
"$",
"this",
"->",
"changes",
"->",
"lastSequenceNumber",
"(",
")",
... | Clears all recorded events. | [
"Clears",
"all",
"recorded",
"events",
"."
] | 2bce7cd6a6612f718e70e3176589c1abf39d1a3e | https://github.com/rayrutjes/domain-foundation/blob/2bce7cd6a6612f718e70e3176589c1abf39d1a3e/src/Domain/AggregateRoot/EventSourcedAggregateRoot.php#L78-L84 |
18,369 | rayrutjes/domain-foundation | src/Domain/AggregateRoot/EventSourcedAggregateRoot.php | EventSourcedAggregateRoot.applyChange | final protected function applyChange(Serializable $payload)
{
$this->apply($payload);
$this->changes()->addEventFromPayload($payload);
} | php | final protected function applyChange(Serializable $payload)
{
$this->apply($payload);
$this->changes()->addEventFromPayload($payload);
} | [
"final",
"protected",
"function",
"applyChange",
"(",
"Serializable",
"$",
"payload",
")",
"{",
"$",
"this",
"->",
"apply",
"(",
"$",
"payload",
")",
";",
"$",
"this",
"->",
"changes",
"(",
")",
"->",
"addEventFromPayload",
"(",
"$",
"payload",
")",
";",... | Mutate the state of the aggregate by applying a domain event.
Keep track of the change until it has been successfully committed.
@param Serializable $payload | [
"Mutate",
"the",
"state",
"of",
"the",
"aggregate",
"by",
"applying",
"a",
"domain",
"event",
".",
"Keep",
"track",
"of",
"the",
"change",
"until",
"it",
"has",
"been",
"successfully",
"committed",
"."
] | 2bce7cd6a6612f718e70e3176589c1abf39d1a3e | https://github.com/rayrutjes/domain-foundation/blob/2bce7cd6a6612f718e70e3176589c1abf39d1a3e/src/Domain/AggregateRoot/EventSourcedAggregateRoot.php#L92-L96 |
18,370 | rayrutjes/domain-foundation | src/Domain/AggregateRoot/EventSourcedAggregateRoot.php | EventSourcedAggregateRoot.replayChange | final private function replayChange(Event $event)
{
$this->apply($event->payload());
$this->lastCommittedEventSequenceNumber = $event->sequenceNumber();
} | php | final private function replayChange(Event $event)
{
$this->apply($event->payload());
$this->lastCommittedEventSequenceNumber = $event->sequenceNumber();
} | [
"final",
"private",
"function",
"replayChange",
"(",
"Event",
"$",
"event",
")",
"{",
"$",
"this",
"->",
"apply",
"(",
"$",
"event",
"->",
"payload",
"(",
")",
")",
";",
"$",
"this",
"->",
"lastCommittedEventSequenceNumber",
"=",
"$",
"event",
"->",
"seq... | Mutate the state of the aggregate by applying the domain event contained into the message.
Synchronize the aggregate version with the one provided by the message.
@param Event $event | [
"Mutate",
"the",
"state",
"of",
"the",
"aggregate",
"by",
"applying",
"the",
"domain",
"event",
"contained",
"into",
"the",
"message",
".",
"Synchronize",
"the",
"aggregate",
"version",
"with",
"the",
"one",
"provided",
"by",
"the",
"message",
"."
] | 2bce7cd6a6612f718e70e3176589c1abf39d1a3e | https://github.com/rayrutjes/domain-foundation/blob/2bce7cd6a6612f718e70e3176589c1abf39d1a3e/src/Domain/AggregateRoot/EventSourcedAggregateRoot.php#L104-L108 |
18,371 | rayrutjes/domain-foundation | src/Domain/AggregateRoot/EventSourcedAggregateRoot.php | EventSourcedAggregateRoot.apply | final private function apply(Serializable $payload)
{
$method = $this->applyMethod($payload);
$this->$method($payload);
} | php | final private function apply(Serializable $payload)
{
$method = $this->applyMethod($payload);
$this->$method($payload);
} | [
"final",
"private",
"function",
"apply",
"(",
"Serializable",
"$",
"payload",
")",
"{",
"$",
"method",
"=",
"$",
"this",
"->",
"applyMethod",
"(",
"$",
"payload",
")",
";",
"$",
"this",
"->",
"$",
"method",
"(",
"$",
"payload",
")",
";",
"}"
] | Mutate the state of the aggregate by applying a domain event.
@param Serializable $payload | [
"Mutate",
"the",
"state",
"of",
"the",
"aggregate",
"by",
"applying",
"a",
"domain",
"event",
"."
] | 2bce7cd6a6612f718e70e3176589c1abf39d1a3e | https://github.com/rayrutjes/domain-foundation/blob/2bce7cd6a6612f718e70e3176589c1abf39d1a3e/src/Domain/AggregateRoot/EventSourcedAggregateRoot.php#L115-L119 |
18,372 | rayrutjes/domain-foundation | src/Domain/AggregateRoot/EventSourcedAggregateRoot.php | EventSourcedAggregateRoot.applyMethod | protected function applyMethod(Serializable $payload)
{
$className = get_class($payload);
return 'apply'.substr($className, strrpos($className, '\\') + 1);
} | php | protected function applyMethod(Serializable $payload)
{
$className = get_class($payload);
return 'apply'.substr($className, strrpos($className, '\\') + 1);
} | [
"protected",
"function",
"applyMethod",
"(",
"Serializable",
"$",
"payload",
")",
"{",
"$",
"className",
"=",
"get_class",
"(",
"$",
"payload",
")",
";",
"return",
"'apply'",
".",
"substr",
"(",
"$",
"className",
",",
"strrpos",
"(",
"$",
"className",
",",... | Returns method to call for applying a given domain event to the aggregate.
This can be overridden to suit your custom naming convention.
@param Serializable $payload
@return string | [
"Returns",
"method",
"to",
"call",
"for",
"applying",
"a",
"given",
"domain",
"event",
"to",
"the",
"aggregate",
".",
"This",
"can",
"be",
"overridden",
"to",
"suit",
"your",
"custom",
"naming",
"convention",
"."
] | 2bce7cd6a6612f718e70e3176589c1abf39d1a3e | https://github.com/rayrutjes/domain-foundation/blob/2bce7cd6a6612f718e70e3176589c1abf39d1a3e/src/Domain/AggregateRoot/EventSourcedAggregateRoot.php#L129-L134 |
18,373 | rayrutjes/domain-foundation | src/Domain/AggregateRoot/EventSourcedAggregateRoot.php | EventSourcedAggregateRoot.changes | final private function changes()
{
if (null === $this->changes) {
$lastCommittedEventSequenceNumber = $this->lastCommittedEventSequenceNumber();
$this->changes = new DefaultEventContainer($this->identifier(), $lastCommittedEventSequenceNumber);
}
return $this->chang... | php | final private function changes()
{
if (null === $this->changes) {
$lastCommittedEventSequenceNumber = $this->lastCommittedEventSequenceNumber();
$this->changes = new DefaultEventContainer($this->identifier(), $lastCommittedEventSequenceNumber);
}
return $this->chang... | [
"final",
"private",
"function",
"changes",
"(",
")",
"{",
"if",
"(",
"null",
"===",
"$",
"this",
"->",
"changes",
")",
"{",
"$",
"lastCommittedEventSequenceNumber",
"=",
"$",
"this",
"->",
"lastCommittedEventSequenceNumber",
"(",
")",
";",
"$",
"this",
"->",... | Return the event container containing the uncommitted changes.
If there are no pending changes to be committed, a new event container
will be initialized.
@return EventContainer | [
"Return",
"the",
"event",
"container",
"containing",
"the",
"uncommitted",
"changes",
".",
"If",
"there",
"are",
"no",
"pending",
"changes",
"to",
"be",
"committed",
"a",
"new",
"event",
"container",
"will",
"be",
"initialized",
"."
] | 2bce7cd6a6612f718e70e3176589c1abf39d1a3e | https://github.com/rayrutjes/domain-foundation/blob/2bce7cd6a6612f718e70e3176589c1abf39d1a3e/src/Domain/AggregateRoot/EventSourcedAggregateRoot.php#L143-L152 |
18,374 | rayrutjes/domain-foundation | src/Domain/AggregateRoot/EventSourcedAggregateRoot.php | EventSourcedAggregateRoot.loadFromHistory | final public static function loadFromHistory(EventStream $eventStream)
{
$aggregate = new static();
while ($eventStream->hasNext()) {
$aggregate->replayChange($eventStream->next());
}
return $aggregate;
} | php | final public static function loadFromHistory(EventStream $eventStream)
{
$aggregate = new static();
while ($eventStream->hasNext()) {
$aggregate->replayChange($eventStream->next());
}
return $aggregate;
} | [
"final",
"public",
"static",
"function",
"loadFromHistory",
"(",
"EventStream",
"$",
"eventStream",
")",
"{",
"$",
"aggregate",
"=",
"new",
"static",
"(",
")",
";",
"while",
"(",
"$",
"eventStream",
"->",
"hasNext",
"(",
")",
")",
"{",
"$",
"aggregate",
... | Roll-out all events to reconstitute the state of the aggregate.
@param EventStream $eventStream
@return static | [
"Roll",
"-",
"out",
"all",
"events",
"to",
"reconstitute",
"the",
"state",
"of",
"the",
"aggregate",
"."
] | 2bce7cd6a6612f718e70e3176589c1abf39d1a3e | https://github.com/rayrutjes/domain-foundation/blob/2bce7cd6a6612f718e70e3176589c1abf39d1a3e/src/Domain/AggregateRoot/EventSourcedAggregateRoot.php#L161-L170 |
18,375 | webforge-labs/psc-cms | lib/Psc/Doctrine/EntityRelation.php | EntityRelation.setRelationType | public function setRelationType($type, $direction = 'bidirectional', $whoIsOwningSide = 'source') {
// zuerst setzen wir die direction, denn wenn type nicht gesetzt ist, macht die nichts
$this->setDirection($direction);
// dann setzen wir den type, dies setzt dann bei one to many und many to one d... | php | public function setRelationType($type, $direction = 'bidirectional', $whoIsOwningSide = 'source') {
// zuerst setzen wir die direction, denn wenn type nicht gesetzt ist, macht die nichts
$this->setDirection($direction);
// dann setzen wir den type, dies setzt dann bei one to many und many to one d... | [
"public",
"function",
"setRelationType",
"(",
"$",
"type",
",",
"$",
"direction",
"=",
"'bidirectional'",
",",
"$",
"whoIsOwningSide",
"=",
"'source'",
")",
"{",
"// zuerst setzen wir die direction, denn wenn type nicht gesetzt ist, macht die nichts",
"$",
"this",
"->",
"... | Setzt alle Eigenschaften der Relation gleichzeitig
$whoIsOwningSide wird bei MANY_TO_ONE und ONE_TO_MANY ignoriert (denn dort ist es immer automatisch die MANY Seite)
ist $direction nicht bidirectional wird die inverse side der Relation nicht automatisch gesetzt | [
"Setzt",
"alle",
"Eigenschaften",
"der",
"Relation",
"gleichzeitig"
] | 467bfa2547e6b4fa487d2d7f35fa6cc618dbc763 | https://github.com/webforge-labs/psc-cms/blob/467bfa2547e6b4fa487d2d7f35fa6cc618dbc763/lib/Psc/Doctrine/EntityRelation.php#L193-L207 |
18,376 | webforge-labs/psc-cms | lib/Psc/Doctrine/EntityRelation.php | EntityRelation.setJoinColumnNullable | public function setJoinColumnNullable($bool) {
$this->nullable = $bool;
$this->getJoinColumn()->setNullable($bool);
return $this;
} | php | public function setJoinColumnNullable($bool) {
$this->nullable = $bool;
$this->getJoinColumn()->setNullable($bool);
return $this;
} | [
"public",
"function",
"setJoinColumnNullable",
"(",
"$",
"bool",
")",
"{",
"$",
"this",
"->",
"nullable",
"=",
"$",
"bool",
";",
"$",
"this",
"->",
"getJoinColumn",
"(",
")",
"->",
"setNullable",
"(",
"$",
"bool",
")",
";",
"return",
"$",
"this",
";",
... | Achtung dies erzeugt die JoinColumn und sollte nur benutzt werdne, wenn die Relation schon korrekt gesetzt ist | [
"Achtung",
"dies",
"erzeugt",
"die",
"JoinColumn",
"und",
"sollte",
"nur",
"benutzt",
"werdne",
"wenn",
"die",
"Relation",
"schon",
"korrekt",
"gesetzt",
"ist"
] | 467bfa2547e6b4fa487d2d7f35fa6cc618dbc763 | https://github.com/webforge-labs/psc-cms/blob/467bfa2547e6b4fa487d2d7f35fa6cc618dbc763/lib/Psc/Doctrine/EntityRelation.php#L536-L540 |
18,377 | ipunkt/laravel-package-manager | src/Providers/Traits/PackagePath.php | PackagePath.packagePath | private function packagePath(string $relativePath): string
{
$packagePath = rtrim(str_replace('/', DIRECTORY_SEPARATOR, $this->packagePath), DIRECTORY_SEPARATOR);
$relativePath = ltrim(str_replace('/', DIRECTORY_SEPARATOR, $relativePath), DIRECTORY_SEPARATOR);
return realpath($packagePath . DI... | php | private function packagePath(string $relativePath): string
{
$packagePath = rtrim(str_replace('/', DIRECTORY_SEPARATOR, $this->packagePath), DIRECTORY_SEPARATOR);
$relativePath = ltrim(str_replace('/', DIRECTORY_SEPARATOR, $relativePath), DIRECTORY_SEPARATOR);
return realpath($packagePath . DI... | [
"private",
"function",
"packagePath",
"(",
"string",
"$",
"relativePath",
")",
":",
"string",
"{",
"$",
"packagePath",
"=",
"rtrim",
"(",
"str_replace",
"(",
"'/'",
",",
"DIRECTORY_SEPARATOR",
",",
"$",
"this",
"->",
"packagePath",
")",
",",
"DIRECTORY_SEPARAT... | give relative path from package root and return absolute path
@param string $relativePath
@return string | [
"give",
"relative",
"path",
"from",
"package",
"root",
"and",
"return",
"absolute",
"path"
] | 6ecfc9d933c37927e52c441d5019126be69e5817 | https://github.com/ipunkt/laravel-package-manager/blob/6ecfc9d933c37927e52c441d5019126be69e5817/src/Providers/Traits/PackagePath.php#L22-L28 |
18,378 | silverbusters/silverstripe-simplelistfield | model/fieldtypes/SimpleListFieldDB.php | SimpleListFieldDB.getList | public function getList(){
// define an unique key
$key = $this->name.'_'.md5($this->value);
if( isset(self::$listobj[$key]) ){
return self::$listobj[$key];
}
if($this->value){
self::$listobj[$key] = json_decode($this->value);
}
else{
self::$listobj[$key] = false;
}
return self::$li... | php | public function getList(){
// define an unique key
$key = $this->name.'_'.md5($this->value);
if( isset(self::$listobj[$key]) ){
return self::$listobj[$key];
}
if($this->value){
self::$listobj[$key] = json_decode($this->value);
}
else{
self::$listobj[$key] = false;
}
return self::$li... | [
"public",
"function",
"getList",
"(",
")",
"{",
"// define an unique key",
"$",
"key",
"=",
"$",
"this",
"->",
"name",
".",
"'_'",
".",
"md5",
"(",
"$",
"this",
"->",
"value",
")",
";",
"if",
"(",
"isset",
"(",
"self",
"::",
"$",
"listobj",
"[",
"$... | Get the list | [
"Get",
"the",
"list"
] | c883e13b1b877d74e266edf2a646661039803440 | https://github.com/silverbusters/silverstripe-simplelistfield/blob/c883e13b1b877d74e266edf2a646661039803440/model/fieldtypes/SimpleListFieldDB.php#L20-L36 |
18,379 | silverbusters/silverstripe-simplelistfield | model/fieldtypes/SimpleListFieldDB.php | SimpleListFieldDB.getHeading | public function getHeading(){
$list = $this->getList();
if( isset($list->heading) && $list->heading ){
return Convert::html2raw($list->heading);
}
return null;
} | php | public function getHeading(){
$list = $this->getList();
if( isset($list->heading) && $list->heading ){
return Convert::html2raw($list->heading);
}
return null;
} | [
"public",
"function",
"getHeading",
"(",
")",
"{",
"$",
"list",
"=",
"$",
"this",
"->",
"getList",
"(",
")",
";",
"if",
"(",
"isset",
"(",
"$",
"list",
"->",
"heading",
")",
"&&",
"$",
"list",
"->",
"heading",
")",
"{",
"return",
"Convert",
"::",
... | Get list heading | [
"Get",
"list",
"heading"
] | c883e13b1b877d74e266edf2a646661039803440 | https://github.com/silverbusters/silverstripe-simplelistfield/blob/c883e13b1b877d74e266edf2a646661039803440/model/fieldtypes/SimpleListFieldDB.php#L59-L67 |
18,380 | silverbusters/silverstripe-simplelistfield | model/fieldtypes/SimpleListFieldDB.php | SimpleListFieldDB.getItems | public function getItems(){
$list = $this->getList();
if( isset($list->items) && !empty($list->items) )
{
$arrayList = new ArrayList();
foreach($list->items as $id => $item){
$item->ID = $id;
$arrayList->push( new ArrayData($item) );
}
return $arrayList;
}
return false;
... | php | public function getItems(){
$list = $this->getList();
if( isset($list->items) && !empty($list->items) )
{
$arrayList = new ArrayList();
foreach($list->items as $id => $item){
$item->ID = $id;
$arrayList->push( new ArrayData($item) );
}
return $arrayList;
}
return false;
... | [
"public",
"function",
"getItems",
"(",
")",
"{",
"$",
"list",
"=",
"$",
"this",
"->",
"getList",
"(",
")",
";",
"if",
"(",
"isset",
"(",
"$",
"list",
"->",
"items",
")",
"&&",
"!",
"empty",
"(",
"$",
"list",
"->",
"items",
")",
")",
"{",
"$",
... | Get list items | [
"Get",
"list",
"items"
] | c883e13b1b877d74e266edf2a646661039803440 | https://github.com/silverbusters/silverstripe-simplelistfield/blob/c883e13b1b877d74e266edf2a646661039803440/model/fieldtypes/SimpleListFieldDB.php#L72-L89 |
18,381 | thiagodp/json | lib/JSON.php | JSON.encode | static function encode( $data, $getterPrefixForObjectMethods = 'get', $ignoreNulls = false ) {
$type = gettype( $data );
$isObject = false;
switch ( $type ) {
case 'string' : return '"' . self::fixString( $data ) . '"';
case 'number' : ; // continue
case 'integer' : ; // continue
case 'float' : ; //... | php | static function encode( $data, $getterPrefixForObjectMethods = 'get', $ignoreNulls = false ) {
$type = gettype( $data );
$isObject = false;
switch ( $type ) {
case 'string' : return '"' . self::fixString( $data ) . '"';
case 'number' : ; // continue
case 'integer' : ; // continue
case 'float' : ; //... | [
"static",
"function",
"encode",
"(",
"$",
"data",
",",
"$",
"getterPrefixForObjectMethods",
"=",
"'get'",
",",
"$",
"ignoreNulls",
"=",
"false",
")",
"{",
"$",
"type",
"=",
"gettype",
"(",
"$",
"data",
")",
";",
"$",
"isObject",
"=",
"false",
";",
"swi... | Encodes a variable into JSON format.
@param mixed $data Data to be encoded.
@param string $getterPrefixForObjectMethods Prefix used for getter methods.
OPTIONAL. Defaults to 'get'.
@param bool $ignoreNulls Ignore null values when encoding.
OPTIONAL. Defaults to false.
@return string | [
"Encodes",
"a",
"variable",
"into",
"JSON",
"format",
"."
] | 058e07a47ef28983fceb94f98d7edf08983f08ef | https://github.com/thiagodp/json/blob/058e07a47ef28983fceb94f98d7edf08983f08ef/lib/JSON.php#L64-L106 |
18,382 | thiagodp/json | lib/JSON.php | JSON.decode | static function decode(
$json,
$convertObjectsToArrays = false,
$recursionDepth = 512, // same as PHP default
$options = 0
) {
// Just use PHP's decode function
return json_decode( $json, $convertObjectsToArrays, $recursionDepth, $options );
} | php | static function decode(
$json,
$convertObjectsToArrays = false,
$recursionDepth = 512, // same as PHP default
$options = 0
) {
// Just use PHP's decode function
return json_decode( $json, $convertObjectsToArrays, $recursionDepth, $options );
} | [
"static",
"function",
"decode",
"(",
"$",
"json",
",",
"$",
"convertObjectsToArrays",
"=",
"false",
",",
"$",
"recursionDepth",
"=",
"512",
",",
"// same as PHP default",
"$",
"options",
"=",
"0",
")",
"{",
"// Just use PHP's decode function",
"return",
"json_deco... | Decodes a JSON content into an object or an array.
@see http://php.net/manual/en/function.json-decode.php
@param string $json The JSON content.
@param bool $convertObjectsToArrays When true, converts objects to arrays.
@param int $recursionDepth Recursion depth.
@param int $options Bit mask of JSON option... | [
"Decodes",
"a",
"JSON",
"content",
"into",
"an",
"object",
"or",
"an",
"array",
"."
] | 058e07a47ef28983fceb94f98d7edf08983f08ef | https://github.com/thiagodp/json/blob/058e07a47ef28983fceb94f98d7edf08983f08ef/lib/JSON.php#L125-L133 |
18,383 | yuncms/framework | src/authclient/WeChat.php | WeChat.refreshAccessToken | public function refreshAccessToken(OAuthToken $token)
{
$params = [
'grant_type' => 'refresh_token'
];
$params = array_merge($token->getParams(), $params);
$request = $this->createRequest()
->setMethod('POST')
->setUrl($this->refreshTokenUrl)
... | php | public function refreshAccessToken(OAuthToken $token)
{
$params = [
'grant_type' => 'refresh_token'
];
$params = array_merge($token->getParams(), $params);
$request = $this->createRequest()
->setMethod('POST')
->setUrl($this->refreshTokenUrl)
... | [
"public",
"function",
"refreshAccessToken",
"(",
"OAuthToken",
"$",
"token",
")",
"{",
"$",
"params",
"=",
"[",
"'grant_type'",
"=>",
"'refresh_token'",
"]",
";",
"$",
"params",
"=",
"array_merge",
"(",
"$",
"token",
"->",
"getParams",
"(",
")",
",",
"$",
... | Gets new auth token to replace expired one.
@param OAuthToken $token expired auth token.
@return OAuthToken new auth token.
@throws \yii\authclient\InvalidResponseException | [
"Gets",
"new",
"auth",
"token",
"to",
"replace",
"expired",
"one",
"."
] | af42e28ea4ae15ab8eead3f6d119f93863b94154 | https://github.com/yuncms/framework/blob/af42e28ea4ae15ab8eead3f6d119f93863b94154/src/authclient/WeChat.php#L144-L164 |
18,384 | nooku/nooku-installer | src/Nooku/Composer/Installer/JoomlaExtension.php | JoomlaExtension._initialize | protected function _initialize()
{
$config = $this->_config->get('joomla');
if(is_null($config) || !is_array($config)) {
$config = array();
}
$defaults = array(
'name' => 'root',
'username' => 'root',
'groups' => array(8),
... | php | protected function _initialize()
{
$config = $this->_config->get('joomla');
if(is_null($config) || !is_array($config)) {
$config = array();
}
$defaults = array(
'name' => 'root',
'username' => 'root',
'groups' => array(8),
... | [
"protected",
"function",
"_initialize",
"(",
")",
"{",
"$",
"config",
"=",
"$",
"this",
"->",
"_config",
"->",
"get",
"(",
"'joomla'",
")",
";",
"if",
"(",
"is_null",
"(",
"$",
"config",
")",
"||",
"!",
"is_array",
"(",
"$",
"config",
")",
")",
"{"... | Initializes extension installer.
@return void | [
"Initializes",
"extension",
"installer",
"."
] | 2aa82ed08983bccd51905426cfff4980ba960d89 | https://github.com/nooku/nooku-installer/blob/2aa82ed08983bccd51905426cfff4980ba960d89/src/Nooku/Composer/Installer/JoomlaExtension.php#L60-L79 |
18,385 | nooku/nooku-installer | src/Nooku/Composer/Installer/JoomlaExtension.php | JoomlaExtension._getElementFromManifest | protected function _getElementFromManifest($manifest, $manifestPath)
{
$element = '';
$type = (string) $manifest->attributes()->type;
switch($type)
{
case 'component':
$name = strtolower((string) $manifest->name);
$element = preg_rep... | php | protected function _getElementFromManifest($manifest, $manifestPath)
{
$element = '';
$type = (string) $manifest->attributes()->type;
switch($type)
{
case 'component':
$name = strtolower((string) $manifest->name);
$element = preg_rep... | [
"protected",
"function",
"_getElementFromManifest",
"(",
"$",
"manifest",
",",
"$",
"manifestPath",
")",
"{",
"$",
"element",
"=",
"''",
";",
"$",
"type",
"=",
"(",
"string",
")",
"$",
"manifest",
"->",
"attributes",
"(",
")",
"->",
"type",
";",
"switch"... | Load the element name from the installation manifest.
@param $manifest
@return mixed|string | [
"Load",
"the",
"element",
"name",
"from",
"the",
"installation",
"manifest",
"."
] | 2aa82ed08983bccd51905426cfff4980ba960d89 | https://github.com/nooku/nooku-installer/blob/2aa82ed08983bccd51905426cfff4980ba960d89/src/Nooku/Composer/Installer/JoomlaExtension.php#L173-L225 |
18,386 | webforge-labs/psc-cms | lib/Psc/Code/Generate/GClass.php | GClass.setName | public function setName($name) {
if (mb_strpos($name,'\\') !== FALSE) {
$this->setNamespace(Code::getNamespace($name));
$this->name = Code::getClassName($name);
} else {
$this->name = $name;
$this->namespace = NULL;
}
return $this;
} | php | public function setName($name) {
if (mb_strpos($name,'\\') !== FALSE) {
$this->setNamespace(Code::getNamespace($name));
$this->name = Code::getClassName($name);
} else {
$this->name = $name;
$this->namespace = NULL;
}
return $this;
} | [
"public",
"function",
"setName",
"(",
"$",
"name",
")",
"{",
"if",
"(",
"mb_strpos",
"(",
"$",
"name",
",",
"'\\\\'",
")",
"!==",
"FALSE",
")",
"{",
"$",
"this",
"->",
"setNamespace",
"(",
"Code",
"::",
"getNamespace",
"(",
"$",
"name",
")",
")",
"... | Setzt den Namen der Klasse
Namespace wird immer mitgesetzt! D. h. übergibt man hier nur den ShortName wird der Namespace auf NULL gesetzt
Wenn man nur den Namen der Klasse und nicht den Namespace wechseln will, muss man setClassName() nehmen
@param string FQN; | [
"Setzt",
"den",
"Namen",
"der",
"Klasse"
] | 467bfa2547e6b4fa487d2d7f35fa6cc618dbc763 | https://github.com/webforge-labs/psc-cms/blob/467bfa2547e6b4fa487d2d7f35fa6cc618dbc763/lib/Psc/Code/Generate/GClass.php#L652-L661 |
18,387 | webforge-labs/psc-cms | lib/Psc/Code/Generate/GClass.php | GClass.removeInterface | public function removeInterface(GClass $class) {
if (array_key_exists($n = $class->getFQN(), $this->interfaces)) {
unset($this->interfaces[$n]);
}
return $this;
} | php | public function removeInterface(GClass $class) {
if (array_key_exists($n = $class->getFQN(), $this->interfaces)) {
unset($this->interfaces[$n]);
}
return $this;
} | [
"public",
"function",
"removeInterface",
"(",
"GClass",
"$",
"class",
")",
"{",
"if",
"(",
"array_key_exists",
"(",
"$",
"n",
"=",
"$",
"class",
"->",
"getFQN",
"(",
")",
",",
"$",
"this",
"->",
"interfaces",
")",
")",
"{",
"unset",
"(",
"$",
"this",... | Entfernt das Interface aus der Klasse
@chainable | [
"Entfernt",
"das",
"Interface",
"aus",
"der",
"Klasse"
] | 467bfa2547e6b4fa487d2d7f35fa6cc618dbc763 | https://github.com/webforge-labs/psc-cms/blob/467bfa2547e6b4fa487d2d7f35fa6cc618dbc763/lib/Psc/Code/Generate/GClass.php#L804-L809 |
18,388 | lode/fem | src/login_github.php | login_github.get_config | protected static function get_config() {
$config_file = \alsvanzelf\fem\ROOT_DIR.'config/github.ini';
if (file_exists($config_file) == false) {
$exception = bootstrap::get_library('exception');
throw new $exception('no github application config found');
}
return parse_ini_file($config_file);
} | php | protected static function get_config() {
$config_file = \alsvanzelf\fem\ROOT_DIR.'config/github.ini';
if (file_exists($config_file) == false) {
$exception = bootstrap::get_library('exception');
throw new $exception('no github application config found');
}
return parse_ini_file($config_file);
} | [
"protected",
"static",
"function",
"get_config",
"(",
")",
"{",
"$",
"config_file",
"=",
"\\",
"alsvanzelf",
"\\",
"fem",
"\\",
"ROOT_DIR",
".",
"'config/github.ini'",
";",
"if",
"(",
"file_exists",
"(",
"$",
"config_file",
")",
"==",
"false",
")",
"{",
"$... | collects a config containing the github app codes from a ini file
@return array with 'client_id', 'client_secret', 'callback_url' values | [
"collects",
"a",
"config",
"containing",
"the",
"github",
"app",
"codes",
"from",
"a",
"ini",
"file"
] | c1c466c1a904d99452b341c5ae7cbc3e22b106e1 | https://github.com/lode/fem/blob/c1c466c1a904d99452b341c5ae7cbc3e22b106e1/src/login_github.php#L63-L71 |
18,389 | lode/fem | src/login_github.php | login_github.get_by_info | public static function get_by_info($info, $update_oauth_token=true) {
$mysql = bootstrap::get_library('mysql');
// find via the oauth token
$sql = "SELECT * FROM `login_github` WHERE `oauth_token` = '%s';";
$login = $mysql::select('row', $sql, $info['oauth_token']);
if (!empty($login)) {
return new static($l... | php | public static function get_by_info($info, $update_oauth_token=true) {
$mysql = bootstrap::get_library('mysql');
// find via the oauth token
$sql = "SELECT * FROM `login_github` WHERE `oauth_token` = '%s';";
$login = $mysql::select('row', $sql, $info['oauth_token']);
if (!empty($login)) {
return new static($l... | [
"public",
"static",
"function",
"get_by_info",
"(",
"$",
"info",
",",
"$",
"update_oauth_token",
"=",
"true",
")",
"{",
"$",
"mysql",
"=",
"bootstrap",
"::",
"get_library",
"(",
"'mysql'",
")",
";",
"// find via the oauth token",
"$",
"sql",
"=",
"\"SELECT * F... | checks whether the login match one on file
and returns the found login
$info needs to contain both 'oauth_token' and 'github_username'
use ::get_by_oauth_token() if only the 'oauth_token' is known
magic alert: also update the token on file if the token is different but the username is found
to do manually, set $updat... | [
"checks",
"whether",
"the",
"login",
"match",
"one",
"on",
"file",
"and",
"returns",
"the",
"found",
"login"
] | c1c466c1a904d99452b341c5ae7cbc3e22b106e1 | https://github.com/lode/fem/blob/c1c466c1a904d99452b341c5ae7cbc3e22b106e1/src/login_github.php#L87-L112 |
18,390 | lode/fem | src/login_github.php | login_github.get_by_user_id | public static function get_by_user_id($user_id) {
$mysql = bootstrap::get_library('mysql');
$sql = "SELECT * FROM `login_github` WHERE `user_id` = %d;";
$login = $mysql::select('row', $sql, $user_id);
if (empty($login)) {
return false;
}
return new static($login['id']);
} | php | public static function get_by_user_id($user_id) {
$mysql = bootstrap::get_library('mysql');
$sql = "SELECT * FROM `login_github` WHERE `user_id` = %d;";
$login = $mysql::select('row', $sql, $user_id);
if (empty($login)) {
return false;
}
return new static($login['id']);
} | [
"public",
"static",
"function",
"get_by_user_id",
"(",
"$",
"user_id",
")",
"{",
"$",
"mysql",
"=",
"bootstrap",
"::",
"get_library",
"(",
"'mysql'",
")",
";",
"$",
"sql",
"=",
"\"SELECT * FROM `login_github` WHERE `user_id` = %d;\"",
";",
"$",
"login",
"=",
"$"... | checks whether the given user id match a login on file
and returns the found login
@param int $user_id
@return $this|boolean false when the user id is not found | [
"checks",
"whether",
"the",
"given",
"user",
"id",
"match",
"a",
"login",
"on",
"file",
"and",
"returns",
"the",
"found",
"login"
] | c1c466c1a904d99452b341c5ae7cbc3e22b106e1 | https://github.com/lode/fem/blob/c1c466c1a904d99452b341c5ae7cbc3e22b106e1/src/login_github.php#L121-L131 |
18,391 | lode/fem | src/login_github.php | login_github.get_by_github_username | public static function get_by_github_username($github_username) {
$mysql = bootstrap::get_library('mysql');
$sql = "SELECT * FROM `login_github` WHERE `github_username` = '%s';";
$login = $mysql::select('row', $sql, $github_username);
if (empty($login)) {
return false;
}
return new static($login['id']);
} | php | public static function get_by_github_username($github_username) {
$mysql = bootstrap::get_library('mysql');
$sql = "SELECT * FROM `login_github` WHERE `github_username` = '%s';";
$login = $mysql::select('row', $sql, $github_username);
if (empty($login)) {
return false;
}
return new static($login['id']);
} | [
"public",
"static",
"function",
"get_by_github_username",
"(",
"$",
"github_username",
")",
"{",
"$",
"mysql",
"=",
"bootstrap",
"::",
"get_library",
"(",
"'mysql'",
")",
";",
"$",
"sql",
"=",
"\"SELECT * FROM `login_github` WHERE `github_username` = '%s';\"",
";",
"$... | checks whether the given github username match one on file
and returns the found login
@param string $github_username
@return $this|boolean false when the username is not found | [
"checks",
"whether",
"the",
"given",
"github",
"username",
"match",
"one",
"on",
"file",
"and",
"returns",
"the",
"found",
"login"
] | c1c466c1a904d99452b341c5ae7cbc3e22b106e1 | https://github.com/lode/fem/blob/c1c466c1a904d99452b341c5ae7cbc3e22b106e1/src/login_github.php#L140-L150 |
18,392 | lode/fem | src/login_github.php | login_github.get_by_oauth_token | public static function get_by_oauth_token($oauth_token) {
$mysql = bootstrap::get_library('mysql');
$sql = "SELECT * FROM `login_github` WHERE `oauth_token` = '%s';";
$login = $mysql::select('row', $sql, $oauth_token);
if (empty($login)) {
return false;
}
return new static($login['id']);
} | php | public static function get_by_oauth_token($oauth_token) {
$mysql = bootstrap::get_library('mysql');
$sql = "SELECT * FROM `login_github` WHERE `oauth_token` = '%s';";
$login = $mysql::select('row', $sql, $oauth_token);
if (empty($login)) {
return false;
}
return new static($login['id']);
} | [
"public",
"static",
"function",
"get_by_oauth_token",
"(",
"$",
"oauth_token",
")",
"{",
"$",
"mysql",
"=",
"bootstrap",
"::",
"get_library",
"(",
"'mysql'",
")",
";",
"$",
"sql",
"=",
"\"SELECT * FROM `login_github` WHERE `oauth_token` = '%s';\"",
";",
"$",
"login"... | checks whether the given oauth token match one on file
and returns the found login
@param string $oauth_token
@return $this|boolean false when the token is not found | [
"checks",
"whether",
"the",
"given",
"oauth",
"token",
"match",
"one",
"on",
"file",
"and",
"returns",
"the",
"found",
"login"
] | c1c466c1a904d99452b341c5ae7cbc3e22b106e1 | https://github.com/lode/fem/blob/c1c466c1a904d99452b341c5ae7cbc3e22b106e1/src/login_github.php#L159-L169 |
18,393 | lode/fem | src/login_github.php | login_github.signup | public static function signup($user_id, $info) {
if (empty($info['github_username']) || empty($info['oauth_token']) || empty($info['scope'])) {
$exception = bootstrap::get_library('exception');
throw new $exception('all info from ::is_valid() is needed for signup');
}
$mysql = bootstrap::get_library('mysql');
... | php | public static function signup($user_id, $info) {
if (empty($info['github_username']) || empty($info['oauth_token']) || empty($info['scope'])) {
$exception = bootstrap::get_library('exception');
throw new $exception('all info from ::is_valid() is needed for signup');
}
$mysql = bootstrap::get_library('mysql');
... | [
"public",
"static",
"function",
"signup",
"(",
"$",
"user_id",
",",
"$",
"info",
")",
"{",
"if",
"(",
"empty",
"(",
"$",
"info",
"[",
"'github_username'",
"]",
")",
"||",
"empty",
"(",
"$",
"info",
"[",
"'oauth_token'",
"]",
")",
"||",
"empty",
"(",
... | adds a new login connection between a local user and a github account
@param int $user_id
@param array $info as returned by ::is_valid()
@return $this | [
"adds",
"a",
"new",
"login",
"connection",
"between",
"a",
"local",
"user",
"and",
"a",
"github",
"account"
] | c1c466c1a904d99452b341c5ae7cbc3e22b106e1 | https://github.com/lode/fem/blob/c1c466c1a904d99452b341c5ae7cbc3e22b106e1/src/login_github.php#L178-L196 |
18,394 | lode/fem | src/login_github.php | login_github.update_oauth_token | public function update_oauth_token($new_oauth_token) {
$mysql = bootstrap::get_library('mysql');
$sql = "UPDATE `login_github` SET `oauth_token` = '%s' WHERE `id` = %d;";
$binds = [$new_oauth_token, $this->id];
$mysql::query($sql, $binds);
} | php | public function update_oauth_token($new_oauth_token) {
$mysql = bootstrap::get_library('mysql');
$sql = "UPDATE `login_github` SET `oauth_token` = '%s' WHERE `id` = %d;";
$binds = [$new_oauth_token, $this->id];
$mysql::query($sql, $binds);
} | [
"public",
"function",
"update_oauth_token",
"(",
"$",
"new_oauth_token",
")",
"{",
"$",
"mysql",
"=",
"bootstrap",
"::",
"get_library",
"(",
"'mysql'",
")",
";",
"$",
"sql",
"=",
"\"UPDATE `login_github` SET `oauth_token` = '%s' WHERE `id` = %d;\"",
";",
"$",
"binds",... | updates the oauth token for the login
@param string $new_oauth_token
@return void | [
"updates",
"the",
"oauth",
"token",
"for",
"the",
"login"
] | c1c466c1a904d99452b341c5ae7cbc3e22b106e1 | https://github.com/lode/fem/blob/c1c466c1a904d99452b341c5ae7cbc3e22b106e1/src/login_github.php#L237-L243 |
18,395 | lode/fem | src/login_github.php | login_github.request_authorization | public static function request_authorization($scope=null, $callback_url=null) {
$config = static::get_config();
if (!empty($callback_url) && strpos($callback_url, $config['callback_url']) !== 0) {
$exception = bootstrap::get_library('exception');
throw new $exception('custom callback url needs to start with def... | php | public static function request_authorization($scope=null, $callback_url=null) {
$config = static::get_config();
if (!empty($callback_url) && strpos($callback_url, $config['callback_url']) !== 0) {
$exception = bootstrap::get_library('exception');
throw new $exception('custom callback url needs to start with def... | [
"public",
"static",
"function",
"request_authorization",
"(",
"$",
"scope",
"=",
"null",
",",
"$",
"callback_url",
"=",
"null",
")",
"{",
"$",
"config",
"=",
"static",
"::",
"get_config",
"(",
")",
";",
"if",
"(",
"!",
"empty",
"(",
"$",
"callback_url",
... | send a user to github to authorize our application
@param string $scope defaults to the scope of the previous authorization
or no scopes at all if authorization is never done yet
see https://developer.github.com/v3/oauth/#parameters
@param string $callback_url defaults to what is set in the config
@return voi... | [
"send",
"a",
"user",
"to",
"github",
"to",
"authorize",
"our",
"application"
] | c1c466c1a904d99452b341c5ae7cbc3e22b106e1 | https://github.com/lode/fem/blob/c1c466c1a904d99452b341c5ae7cbc3e22b106e1/src/login_github.php#L254-L284 |
18,396 | lode/fem | src/login_github.php | login_github.is_valid | public static function is_valid($callback_data, $extended=true) {
$exception = bootstrap::get_library('exception');
if (empty($callback_data['state'])) {
throw new $exception('state expected in oauth callback');
}
$session = bootstrap::get_library('session');
$session::start($session::TYPE_TEMPORARY);
if ($... | php | public static function is_valid($callback_data, $extended=true) {
$exception = bootstrap::get_library('exception');
if (empty($callback_data['state'])) {
throw new $exception('state expected in oauth callback');
}
$session = bootstrap::get_library('session');
$session::start($session::TYPE_TEMPORARY);
if ($... | [
"public",
"static",
"function",
"is_valid",
"(",
"$",
"callback_data",
",",
"$",
"extended",
"=",
"true",
")",
"{",
"$",
"exception",
"=",
"bootstrap",
"::",
"get_library",
"(",
"'exception'",
")",
";",
"if",
"(",
"empty",
"(",
"$",
"callback_data",
"[",
... | checks whether an oauth callback contains a valid state and code
magic alert: this also does a lot more validation and info gathering
to do manually, set $extended to false and call ::is_valid_extended() or ..
.. call ::exchange_for_oauth_token(), ::verify_scope(), ::get_user_info() and ::verify_user()
can return an ... | [
"checks",
"whether",
"an",
"oauth",
"callback",
"contains",
"a",
"valid",
"state",
"and",
"code"
] | c1c466c1a904d99452b341c5ae7cbc3e22b106e1 | https://github.com/lode/fem/blob/c1c466c1a904d99452b341c5ae7cbc3e22b106e1/src/login_github.php#L300-L321 |
18,397 | lode/fem | src/login_github.php | login_github.exchange_for_oauth_token | public static function exchange_for_oauth_token($code) {
$config = static::get_config();
$url = 'https://github.com/login/oauth/access_token';
$options = [
'body' => [ // 'json' || 'body' || 'query'
'client_id' => $config['client_id'],
'client_secret' => $config['client_secret'],
'code' ... | php | public static function exchange_for_oauth_token($code) {
$config = static::get_config();
$url = 'https://github.com/login/oauth/access_token';
$options = [
'body' => [ // 'json' || 'body' || 'query'
'client_id' => $config['client_id'],
'client_secret' => $config['client_secret'],
'code' ... | [
"public",
"static",
"function",
"exchange_for_oauth_token",
"(",
"$",
"code",
")",
"{",
"$",
"config",
"=",
"static",
"::",
"get_config",
"(",
")",
";",
"$",
"url",
"=",
"'https://github.com/login/oauth/access_token'",
";",
"$",
"options",
"=",
"[",
"'body'",
... | exchange the temporary code for a lasting oauth token
@param string $code
@return string
@throws exception if the exchange fails | [
"exchange",
"the",
"temporary",
"code",
"for",
"a",
"lasting",
"oauth",
"token"
] | c1c466c1a904d99452b341c5ae7cbc3e22b106e1 | https://github.com/lode/fem/blob/c1c466c1a904d99452b341c5ae7cbc3e22b106e1/src/login_github.php#L368-L395 |
18,398 | lode/fem | src/login_github.php | login_github.verify_scope | public static function verify_scope($received_scope, $requested_scope='user:email') {
if (strpos($received_scope, $requested_scope) !== false) {
return true;
}
if (strpos($requested_scope, ':')) {
$parent_requested_scope = substr($requested_scope, 0, strpos($requested_scope, ':'));
if (strpos($received_scope... | php | public static function verify_scope($received_scope, $requested_scope='user:email') {
if (strpos($received_scope, $requested_scope) !== false) {
return true;
}
if (strpos($requested_scope, ':')) {
$parent_requested_scope = substr($requested_scope, 0, strpos($requested_scope, ':'));
if (strpos($received_scope... | [
"public",
"static",
"function",
"verify_scope",
"(",
"$",
"received_scope",
",",
"$",
"requested_scope",
"=",
"'user:email'",
")",
"{",
"if",
"(",
"strpos",
"(",
"$",
"received_scope",
",",
"$",
"requested_scope",
")",
"!==",
"false",
")",
"{",
"return",
"tr... | checks whether the received scope meets the requested scope
@param string $received_scope
@param string $requested_scope defaults to 'user:email'
@return boolean | [
"checks",
"whether",
"the",
"received",
"scope",
"meets",
"the",
"requested",
"scope"
] | c1c466c1a904d99452b341c5ae7cbc3e22b106e1 | https://github.com/lode/fem/blob/c1c466c1a904d99452b341c5ae7cbc3e22b106e1/src/login_github.php#L404-L417 |
18,399 | lode/fem | src/login_github.php | login_github.get_user_info | public static function get_user_info($oauth_token) {
$url = 'https://api.github.com/user';
$options = [
'headers' => [
'Accept' => 'application/json',
'Authorization' => 'token '.$oauth_token,
],
];
$http = new \GuzzleHttp\Client();
return $http->get($url, $options)->json();
} | php | public static function get_user_info($oauth_token) {
$url = 'https://api.github.com/user';
$options = [
'headers' => [
'Accept' => 'application/json',
'Authorization' => 'token '.$oauth_token,
],
];
$http = new \GuzzleHttp\Client();
return $http->get($url, $options)->json();
} | [
"public",
"static",
"function",
"get_user_info",
"(",
"$",
"oauth_token",
")",
"{",
"$",
"url",
"=",
"'https://api.github.com/user'",
";",
"$",
"options",
"=",
"[",
"'headers'",
"=>",
"[",
"'Accept'",
"=>",
"'application/json'",
",",
"'Authorization'",
"=>",
"'t... | gets a users github account details for a given oauth token
@param string $oauth_token
@return array can be expected to contain a 'login' key with the github username | [
"gets",
"a",
"users",
"github",
"account",
"details",
"for",
"a",
"given",
"oauth",
"token"
] | c1c466c1a904d99452b341c5ae7cbc3e22b106e1 | https://github.com/lode/fem/blob/c1c466c1a904d99452b341c5ae7cbc3e22b106e1/src/login_github.php#L425-L436 |
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.