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
201,500
netgen/site-legacy-bundle
bundle/Command/SymlinkLegacyCommand.php
SymlinkLegacyCommand.symlinkLegacyExtensionOverride
protected function symlinkLegacyExtensionOverride(string $legacyExtensionPath, OutputInterface $output): void { $legacyRootDir = $this->getContainer()->getParameter('ezpublish_legacy.root_dir'); // If settings/override folder exists in "root_*", obviously we cannot use the one in "root", //...
php
protected function symlinkLegacyExtensionOverride(string $legacyExtensionPath, OutputInterface $output): void { $legacyRootDir = $this->getContainer()->getParameter('ezpublish_legacy.root_dir'); // If settings/override folder exists in "root_*", obviously we cannot use the one in "root", //...
[ "protected", "function", "symlinkLegacyExtensionOverride", "(", "string", "$", "legacyExtensionPath", ",", "OutputInterface", "$", "output", ")", ":", "void", "{", "$", "legacyRootDir", "=", "$", "this", "->", "getContainer", "(", ")", "->", "getParameter", "(", ...
Symlinks override folder from a legacy extension.
[ "Symlinks", "override", "folder", "from", "a", "legacy", "extension", "." ]
943224cdee28cfb9ef07854c11c91d060456b394
https://github.com/netgen/site-legacy-bundle/blob/943224cdee28cfb9ef07854c11c91d060456b394/bundle/Command/SymlinkLegacyCommand.php#L145-L162
201,501
svpernova09/HomesteadSkeleton
src/Commands/HomesteadCreateCommand.php
HomesteadCreateCommand.getRootPath
public function getRootPath() { $appPath = app_path(); $folders = explode(DIRECTORY_SEPARATOR, $appPath); array_pop($folders); $rootPath = implode(DIRECTORY_SEPARATOR, $folders); return $rootPath . '/'; }
php
public function getRootPath() { $appPath = app_path(); $folders = explode(DIRECTORY_SEPARATOR, $appPath); array_pop($folders); $rootPath = implode(DIRECTORY_SEPARATOR, $folders); return $rootPath . '/'; }
[ "public", "function", "getRootPath", "(", ")", "{", "$", "appPath", "=", "app_path", "(", ")", ";", "$", "folders", "=", "explode", "(", "DIRECTORY_SEPARATOR", ",", "$", "appPath", ")", ";", "array_pop", "(", "$", "folders", ")", ";", "$", "rootPath", ...
Return path to the Laravel project root @return string
[ "Return", "path", "to", "the", "Laravel", "project", "root" ]
b617713bb516fc10a190db91df1524d47b1de0b9
https://github.com/svpernova09/HomesteadSkeleton/blob/b617713bb516fc10a190db91df1524d47b1de0b9/src/Commands/HomesteadCreateCommand.php#L105-L113
201,502
anime-db/catalog-bundle
src/Controller/LabelController.php
LabelController.indexAction
public function indexAction(Request $request) { $response = $this->getCacheTimeKeeper()->getResponse('AnimeDbCatalogBundle:Label'); // response was not modified for this request if ($response->isNotModified($request)) { return $response; } /* @var $rep Label */ ...
php
public function indexAction(Request $request) { $response = $this->getCacheTimeKeeper()->getResponse('AnimeDbCatalogBundle:Label'); // response was not modified for this request if ($response->isNotModified($request)) { return $response; } /* @var $rep Label */ ...
[ "public", "function", "indexAction", "(", "Request", "$", "request", ")", "{", "$", "response", "=", "$", "this", "->", "getCacheTimeKeeper", "(", ")", "->", "getResponse", "(", "'AnimeDbCatalogBundle:Label'", ")", ";", "// response was not modified for this request",...
Edit labels. @param Request $request @return Response
[ "Edit", "labels", "." ]
631b6f92a654e91bee84f46218c52cf42bdb8606
https://github.com/anime-db/catalog-bundle/blob/631b6f92a654e91bee84f46218c52cf42bdb8606/src/Controller/LabelController.php#L31-L53
201,503
aVigorousDev/numbers
src/drmyersii/Numbers.php
Numbers.MakeWords
private function MakeWords($chunks) { $words = array(); $index = 0; foreach ($chunks as $chunk) { $one = isset($chunk{0}) ? intval($chunk{0}) : null; $ten = isset($chunk{1}) ? intval($chunk{1}) : null; $hundred = isset($chunk{2}) ? intval($chunk{2}) : null; if ($index > 0) { $words[] ...
php
private function MakeWords($chunks) { $words = array(); $index = 0; foreach ($chunks as $chunk) { $one = isset($chunk{0}) ? intval($chunk{0}) : null; $ten = isset($chunk{1}) ? intval($chunk{1}) : null; $hundred = isset($chunk{2}) ? intval($chunk{2}) : null; if ($index > 0) { $words[] ...
[ "private", "function", "MakeWords", "(", "$", "chunks", ")", "{", "$", "words", "=", "array", "(", ")", ";", "$", "index", "=", "0", ";", "foreach", "(", "$", "chunks", "as", "$", "chunk", ")", "{", "$", "one", "=", "isset", "(", "$", "chunk", ...
Takes an array of number chunks in string form and generates the corresponding word forms of those chunks. It then reorganizes the chunks into the correct order. @param $chunks array[string] @return string
[ "Takes", "an", "array", "of", "number", "chunks", "in", "string", "form", "and", "generates", "the", "corresponding", "word", "forms", "of", "those", "chunks", ".", "It", "then", "reorganizes", "the", "chunks", "into", "the", "correct", "order", "." ]
02124e75286758d216a22d1d963946dab9e8582b
https://github.com/aVigorousDev/numbers/blob/02124e75286758d216a22d1d963946dab9e8582b/src/drmyersii/Numbers.php#L105-L165
201,504
attogram/shared-media-orm
src/Attogram/SharedMedia/Orm/Base/MediaQuery.php
MediaQuery.filterByMime
public function filterByMime($mime = null, $comparison = null) { if (null === $comparison) { if (is_array($mime)) { $comparison = Criteria::IN; } } return $this->addUsingAlias(MediaTableMap::COL_MIME, $mime, $comparison); }
php
public function filterByMime($mime = null, $comparison = null) { if (null === $comparison) { if (is_array($mime)) { $comparison = Criteria::IN; } } return $this->addUsingAlias(MediaTableMap::COL_MIME, $mime, $comparison); }
[ "public", "function", "filterByMime", "(", "$", "mime", "=", "null", ",", "$", "comparison", "=", "null", ")", "{", "if", "(", "null", "===", "$", "comparison", ")", "{", "if", "(", "is_array", "(", "$", "mime", ")", ")", "{", "$", "comparison", "=...
Filter the query on the mime column Example usage: <code> $query->filterByMime('fooValue'); // WHERE mime = 'fooValue' $query->filterByMime('%fooValue%', Criteria::LIKE); // WHERE mime LIKE '%fooValue%' </code> @param string $mime The value to use as filter. @param string $comparison Operator to use for the...
[ "Filter", "the", "query", "on", "the", "mime", "column" ]
81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8
https://github.com/attogram/shared-media-orm/blob/81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8/src/Attogram/SharedMedia/Orm/Base/MediaQuery.php#L611-L620
201,505
attogram/shared-media-orm
src/Attogram/SharedMedia/Orm/Base/MediaQuery.php
MediaQuery.filterBySha1
public function filterBySha1($sha1 = null, $comparison = null) { if (null === $comparison) { if (is_array($sha1)) { $comparison = Criteria::IN; } } return $this->addUsingAlias(MediaTableMap::COL_SHA1, $sha1, $comparison); }
php
public function filterBySha1($sha1 = null, $comparison = null) { if (null === $comparison) { if (is_array($sha1)) { $comparison = Criteria::IN; } } return $this->addUsingAlias(MediaTableMap::COL_SHA1, $sha1, $comparison); }
[ "public", "function", "filterBySha1", "(", "$", "sha1", "=", "null", ",", "$", "comparison", "=", "null", ")", "{", "if", "(", "null", "===", "$", "comparison", ")", "{", "if", "(", "is_array", "(", "$", "sha1", ")", ")", "{", "$", "comparison", "=...
Filter the query on the sha1 column Example usage: <code> $query->filterBySha1('fooValue'); // WHERE sha1 = 'fooValue' $query->filterBySha1('%fooValue%', Criteria::LIKE); // WHERE sha1 LIKE '%fooValue%' </code> @param string $sha1 The value to use as filter. @param string $comparison Operator to use for the...
[ "Filter", "the", "query", "on", "the", "sha1", "column" ]
81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8
https://github.com/attogram/shared-media-orm/blob/81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8/src/Attogram/SharedMedia/Orm/Base/MediaQuery.php#L759-L768
201,506
attogram/shared-media-orm
src/Attogram/SharedMedia/Orm/Base/MediaQuery.php
MediaQuery.filterByThumburl
public function filterByThumburl($thumburl = null, $comparison = null) { if (null === $comparison) { if (is_array($thumburl)) { $comparison = Criteria::IN; } } return $this->addUsingAlias(MediaTableMap::COL_THUMBURL, $thumburl, $comparison); }
php
public function filterByThumburl($thumburl = null, $comparison = null) { if (null === $comparison) { if (is_array($thumburl)) { $comparison = Criteria::IN; } } return $this->addUsingAlias(MediaTableMap::COL_THUMBURL, $thumburl, $comparison); }
[ "public", "function", "filterByThumburl", "(", "$", "thumburl", "=", "null", ",", "$", "comparison", "=", "null", ")", "{", "if", "(", "null", "===", "$", "comparison", ")", "{", "if", "(", "is_array", "(", "$", "thumburl", ")", ")", "{", "$", "compa...
Filter the query on the thumburl column Example usage: <code> $query->filterByThumburl('fooValue'); // WHERE thumburl = 'fooValue' $query->filterByThumburl('%fooValue%', Criteria::LIKE); // WHERE thumburl LIKE '%fooValue%' </code> @param string $thumburl The value to use as filter. @param string $comparison...
[ "Filter", "the", "query", "on", "the", "thumburl", "column" ]
81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8
https://github.com/attogram/shared-media-orm/blob/81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8/src/Attogram/SharedMedia/Orm/Base/MediaQuery.php#L784-L793
201,507
attogram/shared-media-orm
src/Attogram/SharedMedia/Orm/Base/MediaQuery.php
MediaQuery.filterByThumbmime
public function filterByThumbmime($thumbmime = null, $comparison = null) { if (null === $comparison) { if (is_array($thumbmime)) { $comparison = Criteria::IN; } } return $this->addUsingAlias(MediaTableMap::COL_THUMBMIME, $thumbmime, $comparison); ...
php
public function filterByThumbmime($thumbmime = null, $comparison = null) { if (null === $comparison) { if (is_array($thumbmime)) { $comparison = Criteria::IN; } } return $this->addUsingAlias(MediaTableMap::COL_THUMBMIME, $thumbmime, $comparison); ...
[ "public", "function", "filterByThumbmime", "(", "$", "thumbmime", "=", "null", ",", "$", "comparison", "=", "null", ")", "{", "if", "(", "null", "===", "$", "comparison", ")", "{", "if", "(", "is_array", "(", "$", "thumbmime", ")", ")", "{", "$", "co...
Filter the query on the thumbmime column Example usage: <code> $query->filterByThumbmime('fooValue'); // WHERE thumbmime = 'fooValue' $query->filterByThumbmime('%fooValue%', Criteria::LIKE); // WHERE thumbmime LIKE '%fooValue%' </code> @param string $thumbmime The value to use as filter. @param string $comp...
[ "Filter", "the", "query", "on", "the", "thumbmime", "column" ]
81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8
https://github.com/attogram/shared-media-orm/blob/81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8/src/Attogram/SharedMedia/Orm/Base/MediaQuery.php#L809-L818
201,508
attogram/shared-media-orm
src/Attogram/SharedMedia/Orm/Base/MediaQuery.php
MediaQuery.filterByThumbwidth
public function filterByThumbwidth($thumbwidth = null, $comparison = null) { if (is_array($thumbwidth)) { $useMinMax = false; if (isset($thumbwidth['min'])) { $this->addUsingAlias(MediaTableMap::COL_THUMBWIDTH, $thumbwidth['min'], Criteria::GREATER_EQUAL); ...
php
public function filterByThumbwidth($thumbwidth = null, $comparison = null) { if (is_array($thumbwidth)) { $useMinMax = false; if (isset($thumbwidth['min'])) { $this->addUsingAlias(MediaTableMap::COL_THUMBWIDTH, $thumbwidth['min'], Criteria::GREATER_EQUAL); ...
[ "public", "function", "filterByThumbwidth", "(", "$", "thumbwidth", "=", "null", ",", "$", "comparison", "=", "null", ")", "{", "if", "(", "is_array", "(", "$", "thumbwidth", ")", ")", "{", "$", "useMinMax", "=", "false", ";", "if", "(", "isset", "(", ...
Filter the query on the thumbwidth column Example usage: <code> $query->filterByThumbwidth(1234); // WHERE thumbwidth = 1234 $query->filterByThumbwidth(array(12, 34)); // WHERE thumbwidth IN (12, 34) $query->filterByThumbwidth(array('min' => 12)); // WHERE thumbwidth > 12 </code> @param mixed $thumbwidth The valu...
[ "Filter", "the", "query", "on", "the", "thumbwidth", "column" ]
81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8
https://github.com/attogram/shared-media-orm/blob/81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8/src/Attogram/SharedMedia/Orm/Base/MediaQuery.php#L838-L859
201,509
attogram/shared-media-orm
src/Attogram/SharedMedia/Orm/Base/MediaQuery.php
MediaQuery.filterByThumbheight
public function filterByThumbheight($thumbheight = null, $comparison = null) { if (is_array($thumbheight)) { $useMinMax = false; if (isset($thumbheight['min'])) { $this->addUsingAlias(MediaTableMap::COL_THUMBHEIGHT, $thumbheight['min'], Criteria::GREATER_EQUAL); ...
php
public function filterByThumbheight($thumbheight = null, $comparison = null) { if (is_array($thumbheight)) { $useMinMax = false; if (isset($thumbheight['min'])) { $this->addUsingAlias(MediaTableMap::COL_THUMBHEIGHT, $thumbheight['min'], Criteria::GREATER_EQUAL); ...
[ "public", "function", "filterByThumbheight", "(", "$", "thumbheight", "=", "null", ",", "$", "comparison", "=", "null", ")", "{", "if", "(", "is_array", "(", "$", "thumbheight", ")", ")", "{", "$", "useMinMax", "=", "false", ";", "if", "(", "isset", "(...
Filter the query on the thumbheight column Example usage: <code> $query->filterByThumbheight(1234); // WHERE thumbheight = 1234 $query->filterByThumbheight(array(12, 34)); // WHERE thumbheight IN (12, 34) $query->filterByThumbheight(array('min' => 12)); // WHERE thumbheight > 12 </code> @param mixed $thumbheight ...
[ "Filter", "the", "query", "on", "the", "thumbheight", "column" ]
81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8
https://github.com/attogram/shared-media-orm/blob/81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8/src/Attogram/SharedMedia/Orm/Base/MediaQuery.php#L879-L900
201,510
attogram/shared-media-orm
src/Attogram/SharedMedia/Orm/Base/MediaQuery.php
MediaQuery.filterByThumbsize
public function filterByThumbsize($thumbsize = null, $comparison = null) { if (is_array($thumbsize)) { $useMinMax = false; if (isset($thumbsize['min'])) { $this->addUsingAlias(MediaTableMap::COL_THUMBSIZE, $thumbsize['min'], Criteria::GREATER_EQUAL); $...
php
public function filterByThumbsize($thumbsize = null, $comparison = null) { if (is_array($thumbsize)) { $useMinMax = false; if (isset($thumbsize['min'])) { $this->addUsingAlias(MediaTableMap::COL_THUMBSIZE, $thumbsize['min'], Criteria::GREATER_EQUAL); $...
[ "public", "function", "filterByThumbsize", "(", "$", "thumbsize", "=", "null", ",", "$", "comparison", "=", "null", ")", "{", "if", "(", "is_array", "(", "$", "thumbsize", ")", ")", "{", "$", "useMinMax", "=", "false", ";", "if", "(", "isset", "(", "...
Filter the query on the thumbsize column Example usage: <code> $query->filterByThumbsize(1234); // WHERE thumbsize = 1234 $query->filterByThumbsize(array(12, 34)); // WHERE thumbsize IN (12, 34) $query->filterByThumbsize(array('min' => 12)); // WHERE thumbsize > 12 </code> @param mixed $thumbsize The value to use...
[ "Filter", "the", "query", "on", "the", "thumbsize", "column" ]
81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8
https://github.com/attogram/shared-media-orm/blob/81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8/src/Attogram/SharedMedia/Orm/Base/MediaQuery.php#L920-L941
201,511
attogram/shared-media-orm
src/Attogram/SharedMedia/Orm/Base/MediaQuery.php
MediaQuery.filterByDescriptionurl
public function filterByDescriptionurl($descriptionurl = null, $comparison = null) { if (null === $comparison) { if (is_array($descriptionurl)) { $comparison = Criteria::IN; } } return $this->addUsingAlias(MediaTableMap::COL_DESCRIPTIONURL, $descripti...
php
public function filterByDescriptionurl($descriptionurl = null, $comparison = null) { if (null === $comparison) { if (is_array($descriptionurl)) { $comparison = Criteria::IN; } } return $this->addUsingAlias(MediaTableMap::COL_DESCRIPTIONURL, $descripti...
[ "public", "function", "filterByDescriptionurl", "(", "$", "descriptionurl", "=", "null", ",", "$", "comparison", "=", "null", ")", "{", "if", "(", "null", "===", "$", "comparison", ")", "{", "if", "(", "is_array", "(", "$", "descriptionurl", ")", ")", "{...
Filter the query on the descriptionurl column Example usage: <code> $query->filterByDescriptionurl('fooValue'); // WHERE descriptionurl = 'fooValue' $query->filterByDescriptionurl('%fooValue%', Criteria::LIKE); // WHERE descriptionurl LIKE '%fooValue%' </code> @param string $descriptionurl The value to use as f...
[ "Filter", "the", "query", "on", "the", "descriptionurl", "column" ]
81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8
https://github.com/attogram/shared-media-orm/blob/81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8/src/Attogram/SharedMedia/Orm/Base/MediaQuery.php#L957-L966
201,512
attogram/shared-media-orm
src/Attogram/SharedMedia/Orm/Base/MediaQuery.php
MediaQuery.filterByDescriptionurlshort
public function filterByDescriptionurlshort($descriptionurlshort = null, $comparison = null) { if (null === $comparison) { if (is_array($descriptionurlshort)) { $comparison = Criteria::IN; } } return $this->addUsingAlias(MediaTableMap::COL_DESCRIPTION...
php
public function filterByDescriptionurlshort($descriptionurlshort = null, $comparison = null) { if (null === $comparison) { if (is_array($descriptionurlshort)) { $comparison = Criteria::IN; } } return $this->addUsingAlias(MediaTableMap::COL_DESCRIPTION...
[ "public", "function", "filterByDescriptionurlshort", "(", "$", "descriptionurlshort", "=", "null", ",", "$", "comparison", "=", "null", ")", "{", "if", "(", "null", "===", "$", "comparison", ")", "{", "if", "(", "is_array", "(", "$", "descriptionurlshort", "...
Filter the query on the descriptionurlshort column Example usage: <code> $query->filterByDescriptionurlshort('fooValue'); // WHERE descriptionurlshort = 'fooValue' $query->filterByDescriptionurlshort('%fooValue%', Criteria::LIKE); // WHERE descriptionurlshort LIKE '%fooValue%' </code> @param string $description...
[ "Filter", "the", "query", "on", "the", "descriptionurlshort", "column" ]
81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8
https://github.com/attogram/shared-media-orm/blob/81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8/src/Attogram/SharedMedia/Orm/Base/MediaQuery.php#L982-L991
201,513
attogram/shared-media-orm
src/Attogram/SharedMedia/Orm/Base/MediaQuery.php
MediaQuery.filterByImagedescription
public function filterByImagedescription($imagedescription = null, $comparison = null) { if (null === $comparison) { if (is_array($imagedescription)) { $comparison = Criteria::IN; } } return $this->addUsingAlias(MediaTableMap::COL_IMAGEDESCRIPTION, $i...
php
public function filterByImagedescription($imagedescription = null, $comparison = null) { if (null === $comparison) { if (is_array($imagedescription)) { $comparison = Criteria::IN; } } return $this->addUsingAlias(MediaTableMap::COL_IMAGEDESCRIPTION, $i...
[ "public", "function", "filterByImagedescription", "(", "$", "imagedescription", "=", "null", ",", "$", "comparison", "=", "null", ")", "{", "if", "(", "null", "===", "$", "comparison", ")", "{", "if", "(", "is_array", "(", "$", "imagedescription", ")", ")"...
Filter the query on the imagedescription column Example usage: <code> $query->filterByImagedescription('fooValue'); // WHERE imagedescription = 'fooValue' $query->filterByImagedescription('%fooValue%', Criteria::LIKE); // WHERE imagedescription LIKE '%fooValue%' </code> @param string $imagedescription The value...
[ "Filter", "the", "query", "on", "the", "imagedescription", "column" ]
81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8
https://github.com/attogram/shared-media-orm/blob/81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8/src/Attogram/SharedMedia/Orm/Base/MediaQuery.php#L1007-L1016
201,514
attogram/shared-media-orm
src/Attogram/SharedMedia/Orm/Base/MediaQuery.php
MediaQuery.filterByDatetimeoriginal
public function filterByDatetimeoriginal($datetimeoriginal = null, $comparison = null) { if (null === $comparison) { if (is_array($datetimeoriginal)) { $comparison = Criteria::IN; } } return $this->addUsingAlias(MediaTableMap::COL_DATETIMEORIGINAL, $d...
php
public function filterByDatetimeoriginal($datetimeoriginal = null, $comparison = null) { if (null === $comparison) { if (is_array($datetimeoriginal)) { $comparison = Criteria::IN; } } return $this->addUsingAlias(MediaTableMap::COL_DATETIMEORIGINAL, $d...
[ "public", "function", "filterByDatetimeoriginal", "(", "$", "datetimeoriginal", "=", "null", ",", "$", "comparison", "=", "null", ")", "{", "if", "(", "null", "===", "$", "comparison", ")", "{", "if", "(", "is_array", "(", "$", "datetimeoriginal", ")", ")"...
Filter the query on the datetimeoriginal column Example usage: <code> $query->filterByDatetimeoriginal('fooValue'); // WHERE datetimeoriginal = 'fooValue' $query->filterByDatetimeoriginal('%fooValue%', Criteria::LIKE); // WHERE datetimeoriginal LIKE '%fooValue%' </code> @param string $datetimeoriginal The value...
[ "Filter", "the", "query", "on", "the", "datetimeoriginal", "column" ]
81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8
https://github.com/attogram/shared-media-orm/blob/81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8/src/Attogram/SharedMedia/Orm/Base/MediaQuery.php#L1032-L1041
201,515
attogram/shared-media-orm
src/Attogram/SharedMedia/Orm/Base/MediaQuery.php
MediaQuery.filterByArtist
public function filterByArtist($artist = null, $comparison = null) { if (null === $comparison) { if (is_array($artist)) { $comparison = Criteria::IN; } } return $this->addUsingAlias(MediaTableMap::COL_ARTIST, $artist, $comparison); }
php
public function filterByArtist($artist = null, $comparison = null) { if (null === $comparison) { if (is_array($artist)) { $comparison = Criteria::IN; } } return $this->addUsingAlias(MediaTableMap::COL_ARTIST, $artist, $comparison); }
[ "public", "function", "filterByArtist", "(", "$", "artist", "=", "null", ",", "$", "comparison", "=", "null", ")", "{", "if", "(", "null", "===", "$", "comparison", ")", "{", "if", "(", "is_array", "(", "$", "artist", ")", ")", "{", "$", "comparison"...
Filter the query on the artist column Example usage: <code> $query->filterByArtist('fooValue'); // WHERE artist = 'fooValue' $query->filterByArtist('%fooValue%', Criteria::LIKE); // WHERE artist LIKE '%fooValue%' </code> @param string $artist The value to use as filter. @param string $comparison Operator to...
[ "Filter", "the", "query", "on", "the", "artist", "column" ]
81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8
https://github.com/attogram/shared-media-orm/blob/81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8/src/Attogram/SharedMedia/Orm/Base/MediaQuery.php#L1057-L1066
201,516
attogram/shared-media-orm
src/Attogram/SharedMedia/Orm/Base/MediaQuery.php
MediaQuery.filterByLicenseshortname
public function filterByLicenseshortname($licenseshortname = null, $comparison = null) { if (null === $comparison) { if (is_array($licenseshortname)) { $comparison = Criteria::IN; } } return $this->addUsingAlias(MediaTableMap::COL_LICENSESHORTNAME, $l...
php
public function filterByLicenseshortname($licenseshortname = null, $comparison = null) { if (null === $comparison) { if (is_array($licenseshortname)) { $comparison = Criteria::IN; } } return $this->addUsingAlias(MediaTableMap::COL_LICENSESHORTNAME, $l...
[ "public", "function", "filterByLicenseshortname", "(", "$", "licenseshortname", "=", "null", ",", "$", "comparison", "=", "null", ")", "{", "if", "(", "null", "===", "$", "comparison", ")", "{", "if", "(", "is_array", "(", "$", "licenseshortname", ")", ")"...
Filter the query on the licenseshortname column Example usage: <code> $query->filterByLicenseshortname('fooValue'); // WHERE licenseshortname = 'fooValue' $query->filterByLicenseshortname('%fooValue%', Criteria::LIKE); // WHERE licenseshortname LIKE '%fooValue%' </code> @param string $licenseshortname The value...
[ "Filter", "the", "query", "on", "the", "licenseshortname", "column" ]
81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8
https://github.com/attogram/shared-media-orm/blob/81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8/src/Attogram/SharedMedia/Orm/Base/MediaQuery.php#L1082-L1091
201,517
attogram/shared-media-orm
src/Attogram/SharedMedia/Orm/Base/MediaQuery.php
MediaQuery.filterByUsageterms
public function filterByUsageterms($usageterms = null, $comparison = null) { if (null === $comparison) { if (is_array($usageterms)) { $comparison = Criteria::IN; } } return $this->addUsingAlias(MediaTableMap::COL_USAGETERMS, $usageterms, $comparison);...
php
public function filterByUsageterms($usageterms = null, $comparison = null) { if (null === $comparison) { if (is_array($usageterms)) { $comparison = Criteria::IN; } } return $this->addUsingAlias(MediaTableMap::COL_USAGETERMS, $usageterms, $comparison);...
[ "public", "function", "filterByUsageterms", "(", "$", "usageterms", "=", "null", ",", "$", "comparison", "=", "null", ")", "{", "if", "(", "null", "===", "$", "comparison", ")", "{", "if", "(", "is_array", "(", "$", "usageterms", ")", ")", "{", "$", ...
Filter the query on the usageterms column Example usage: <code> $query->filterByUsageterms('fooValue'); // WHERE usageterms = 'fooValue' $query->filterByUsageterms('%fooValue%', Criteria::LIKE); // WHERE usageterms LIKE '%fooValue%' </code> @param string $usageterms The value to use as filter. @param string...
[ "Filter", "the", "query", "on", "the", "usageterms", "column" ]
81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8
https://github.com/attogram/shared-media-orm/blob/81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8/src/Attogram/SharedMedia/Orm/Base/MediaQuery.php#L1107-L1116
201,518
attogram/shared-media-orm
src/Attogram/SharedMedia/Orm/Base/MediaQuery.php
MediaQuery.filterByAttributionrequired
public function filterByAttributionrequired($attributionrequired = null, $comparison = null) { if (null === $comparison) { if (is_array($attributionrequired)) { $comparison = Criteria::IN; } } return $this->addUsingAlias(MediaTableMap::COL_ATTRIBUTION...
php
public function filterByAttributionrequired($attributionrequired = null, $comparison = null) { if (null === $comparison) { if (is_array($attributionrequired)) { $comparison = Criteria::IN; } } return $this->addUsingAlias(MediaTableMap::COL_ATTRIBUTION...
[ "public", "function", "filterByAttributionrequired", "(", "$", "attributionrequired", "=", "null", ",", "$", "comparison", "=", "null", ")", "{", "if", "(", "null", "===", "$", "comparison", ")", "{", "if", "(", "is_array", "(", "$", "attributionrequired", "...
Filter the query on the attributionrequired column Example usage: <code> $query->filterByAttributionrequired('fooValue'); // WHERE attributionrequired = 'fooValue' $query->filterByAttributionrequired('%fooValue%', Criteria::LIKE); // WHERE attributionrequired LIKE '%fooValue%' </code> @param string $attribution...
[ "Filter", "the", "query", "on", "the", "attributionrequired", "column" ]
81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8
https://github.com/attogram/shared-media-orm/blob/81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8/src/Attogram/SharedMedia/Orm/Base/MediaQuery.php#L1132-L1141
201,519
attogram/shared-media-orm
src/Attogram/SharedMedia/Orm/Base/MediaQuery.php
MediaQuery.filterByRestrictions
public function filterByRestrictions($restrictions = null, $comparison = null) { if (null === $comparison) { if (is_array($restrictions)) { $comparison = Criteria::IN; } } return $this->addUsingAlias(MediaTableMap::COL_RESTRICTIONS, $restrictions, $co...
php
public function filterByRestrictions($restrictions = null, $comparison = null) { if (null === $comparison) { if (is_array($restrictions)) { $comparison = Criteria::IN; } } return $this->addUsingAlias(MediaTableMap::COL_RESTRICTIONS, $restrictions, $co...
[ "public", "function", "filterByRestrictions", "(", "$", "restrictions", "=", "null", ",", "$", "comparison", "=", "null", ")", "{", "if", "(", "null", "===", "$", "comparison", ")", "{", "if", "(", "is_array", "(", "$", "restrictions", ")", ")", "{", "...
Filter the query on the restrictions column Example usage: <code> $query->filterByRestrictions('fooValue'); // WHERE restrictions = 'fooValue' $query->filterByRestrictions('%fooValue%', Criteria::LIKE); // WHERE restrictions LIKE '%fooValue%' </code> @param string $restrictions The value to use as filter. @para...
[ "Filter", "the", "query", "on", "the", "restrictions", "column" ]
81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8
https://github.com/attogram/shared-media-orm/blob/81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8/src/Attogram/SharedMedia/Orm/Base/MediaQuery.php#L1157-L1166
201,520
attogram/shared-media-orm
src/Attogram/SharedMedia/Orm/Base/MediaQuery.php
MediaQuery.filterByTimestamp
public function filterByTimestamp($timestamp = null, $comparison = null) { if (is_array($timestamp)) { $useMinMax = false; if (isset($timestamp['min'])) { $this->addUsingAlias(MediaTableMap::COL_TIMESTAMP, $timestamp['min'], Criteria::GREATER_EQUAL); $...
php
public function filterByTimestamp($timestamp = null, $comparison = null) { if (is_array($timestamp)) { $useMinMax = false; if (isset($timestamp['min'])) { $this->addUsingAlias(MediaTableMap::COL_TIMESTAMP, $timestamp['min'], Criteria::GREATER_EQUAL); $...
[ "public", "function", "filterByTimestamp", "(", "$", "timestamp", "=", "null", ",", "$", "comparison", "=", "null", ")", "{", "if", "(", "is_array", "(", "$", "timestamp", ")", ")", "{", "$", "useMinMax", "=", "false", ";", "if", "(", "isset", "(", "...
Filter the query on the timestamp column Example usage: <code> $query->filterByTimestamp('2011-03-14'); // WHERE timestamp = '2011-03-14' $query->filterByTimestamp('now'); // WHERE timestamp = '2011-03-14' $query->filterByTimestamp(array('max' => 'yesterday')); // WHERE timestamp > '2011-03-13' </code> @param mix...
[ "Filter", "the", "query", "on", "the", "timestamp", "column" ]
81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8
https://github.com/attogram/shared-media-orm/blob/81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8/src/Attogram/SharedMedia/Orm/Base/MediaQuery.php#L1188-L1209
201,521
attogram/shared-media-orm
src/Attogram/SharedMedia/Orm/Base/MediaQuery.php
MediaQuery.filterByUser
public function filterByUser($user = null, $comparison = null) { if (null === $comparison) { if (is_array($user)) { $comparison = Criteria::IN; } } return $this->addUsingAlias(MediaTableMap::COL_USER, $user, $comparison); }
php
public function filterByUser($user = null, $comparison = null) { if (null === $comparison) { if (is_array($user)) { $comparison = Criteria::IN; } } return $this->addUsingAlias(MediaTableMap::COL_USER, $user, $comparison); }
[ "public", "function", "filterByUser", "(", "$", "user", "=", "null", ",", "$", "comparison", "=", "null", ")", "{", "if", "(", "null", "===", "$", "comparison", ")", "{", "if", "(", "is_array", "(", "$", "user", ")", ")", "{", "$", "comparison", "=...
Filter the query on the user column Example usage: <code> $query->filterByUser('fooValue'); // WHERE user = 'fooValue' $query->filterByUser('%fooValue%', Criteria::LIKE); // WHERE user LIKE '%fooValue%' </code> @param string $user The value to use as filter. @param string $comparison Operator to use for the...
[ "Filter", "the", "query", "on", "the", "user", "column" ]
81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8
https://github.com/attogram/shared-media-orm/blob/81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8/src/Attogram/SharedMedia/Orm/Base/MediaQuery.php#L1225-L1234
201,522
attogram/shared-media-orm
src/Attogram/SharedMedia/Orm/Base/MediaQuery.php
MediaQuery.filterByMissing
public function filterByMissing($missing = null, $comparison = null) { if (is_string($missing)) { $missing = in_array(strtolower($missing), array('false', 'off', '-', 'no', 'n', '0', '')) ? false : true; } return $this->addUsingAlias(MediaTableMap::COL_MISSING, $missing, $compar...
php
public function filterByMissing($missing = null, $comparison = null) { if (is_string($missing)) { $missing = in_array(strtolower($missing), array('false', 'off', '-', 'no', 'n', '0', '')) ? false : true; } return $this->addUsingAlias(MediaTableMap::COL_MISSING, $missing, $compar...
[ "public", "function", "filterByMissing", "(", "$", "missing", "=", "null", ",", "$", "comparison", "=", "null", ")", "{", "if", "(", "is_string", "(", "$", "missing", ")", ")", "{", "$", "missing", "=", "in_array", "(", "strtolower", "(", "$", "missing...
Filter the query on the missing column Example usage: <code> $query->filterByMissing(true); // WHERE missing = true $query->filterByMissing('yes'); // WHERE missing = true </code> @param boolean|string $missing The value to use as filter. Non-boolean arguments are converted using the following rules: * 1, '1', 't...
[ "Filter", "the", "query", "on", "the", "missing", "column" ]
81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8
https://github.com/attogram/shared-media-orm/blob/81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8/src/Attogram/SharedMedia/Orm/Base/MediaQuery.php#L1295-L1302
201,523
attogram/shared-media-orm
src/Attogram/SharedMedia/Orm/Base/MediaQuery.php
MediaQuery.filterByKnown
public function filterByKnown($known = null, $comparison = null) { if (is_string($known)) { $known = in_array(strtolower($known), array('false', 'off', '-', 'no', 'n', '0', '')) ? false : true; } return $this->addUsingAlias(MediaTableMap::COL_KNOWN, $known, $comparison); }
php
public function filterByKnown($known = null, $comparison = null) { if (is_string($known)) { $known = in_array(strtolower($known), array('false', 'off', '-', 'no', 'n', '0', '')) ? false : true; } return $this->addUsingAlias(MediaTableMap::COL_KNOWN, $known, $comparison); }
[ "public", "function", "filterByKnown", "(", "$", "known", "=", "null", ",", "$", "comparison", "=", "null", ")", "{", "if", "(", "is_string", "(", "$", "known", ")", ")", "{", "$", "known", "=", "in_array", "(", "strtolower", "(", "$", "known", ")", ...
Filter the query on the known column Example usage: <code> $query->filterByKnown(true); // WHERE known = true $query->filterByKnown('yes'); // WHERE known = true </code> @param boolean|string $known The value to use as filter. Non-boolean arguments are converted using the following rules: * 1, '1', 'true', 'on',...
[ "Filter", "the", "query", "on", "the", "known", "column" ]
81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8
https://github.com/attogram/shared-media-orm/blob/81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8/src/Attogram/SharedMedia/Orm/Base/MediaQuery.php#L1322-L1329
201,524
attogram/shared-media-orm
src/Attogram/SharedMedia/Orm/Base/MediaQuery.php
MediaQuery.filterByImagerepository
public function filterByImagerepository($imagerepository = null, $comparison = null) { if (null === $comparison) { if (is_array($imagerepository)) { $comparison = Criteria::IN; } } return $this->addUsingAlias(MediaTableMap::COL_IMAGEREPOSITORY, $image...
php
public function filterByImagerepository($imagerepository = null, $comparison = null) { if (null === $comparison) { if (is_array($imagerepository)) { $comparison = Criteria::IN; } } return $this->addUsingAlias(MediaTableMap::COL_IMAGEREPOSITORY, $image...
[ "public", "function", "filterByImagerepository", "(", "$", "imagerepository", "=", "null", ",", "$", "comparison", "=", "null", ")", "{", "if", "(", "null", "===", "$", "comparison", ")", "{", "if", "(", "is_array", "(", "$", "imagerepository", ")", ")", ...
Filter the query on the imagerepository column Example usage: <code> $query->filterByImagerepository('fooValue'); // WHERE imagerepository = 'fooValue' $query->filterByImagerepository('%fooValue%', Criteria::LIKE); // WHERE imagerepository LIKE '%fooValue%' </code> @param string $imagerepository The value to us...
[ "Filter", "the", "query", "on", "the", "imagerepository", "column" ]
81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8
https://github.com/attogram/shared-media-orm/blob/81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8/src/Attogram/SharedMedia/Orm/Base/MediaQuery.php#L1345-L1354
201,525
attogram/shared-media-orm
src/Attogram/SharedMedia/Orm/Base/MediaQuery.php
MediaQuery.useC2MQuery
public function useC2MQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { return $this ->joinC2M($relationAlias, $joinType) ->useQuery($relationAlias ? $relationAlias : 'C2M', '\Attogram\SharedMedia\Orm\C2MQuery'); }
php
public function useC2MQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN) { return $this ->joinC2M($relationAlias, $joinType) ->useQuery($relationAlias ? $relationAlias : 'C2M', '\Attogram\SharedMedia\Orm\C2MQuery'); }
[ "public", "function", "useC2MQuery", "(", "$", "relationAlias", "=", "null", ",", "$", "joinType", "=", "Criteria", "::", "INNER_JOIN", ")", "{", "return", "$", "this", "->", "joinC2M", "(", "$", "relationAlias", ",", "$", "joinType", ")", "->", "useQuery"...
Use the C2M relation C2M 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 \Attogram\SharedMedia\Orm\C2MQuery A secondary query ...
[ "Use", "the", "C2M", "relation", "C2M", "object" ]
81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8
https://github.com/attogram/shared-media-orm/blob/81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8/src/Attogram/SharedMedia/Orm/Base/MediaQuery.php#L1585-L1590
201,526
attogram/shared-media-orm
src/Attogram/SharedMedia/Orm/Base/MediaQuery.php
MediaQuery.filterByM2P
public function filterByM2P($m2P, $comparison = null) { if ($m2P instanceof \Attogram\SharedMedia\Orm\M2P) { return $this ->addUsingAlias(MediaTableMap::COL_ID, $m2P->getMediaId(), $comparison); } elseif ($m2P instanceof ObjectCollection) { return $this ...
php
public function filterByM2P($m2P, $comparison = null) { if ($m2P instanceof \Attogram\SharedMedia\Orm\M2P) { return $this ->addUsingAlias(MediaTableMap::COL_ID, $m2P->getMediaId(), $comparison); } elseif ($m2P instanceof ObjectCollection) { return $this ...
[ "public", "function", "filterByM2P", "(", "$", "m2P", ",", "$", "comparison", "=", "null", ")", "{", "if", "(", "$", "m2P", "instanceof", "\\", "Attogram", "\\", "SharedMedia", "\\", "Orm", "\\", "M2P", ")", "{", "return", "$", "this", "->", "addUsingA...
Filter the query by a related \Attogram\SharedMedia\Orm\M2P object @param \Attogram\SharedMedia\Orm\M2P|ObjectCollection $m2P the related object to use as filter @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL @return ChildMediaQuery The current query, for fluid interf...
[ "Filter", "the", "query", "by", "a", "related", "\\", "Attogram", "\\", "SharedMedia", "\\", "Orm", "\\", "M2P", "object" ]
81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8
https://github.com/attogram/shared-media-orm/blob/81b5ef7d749b1e50f51e95747ce24cf8ce6f21d8/src/Attogram/SharedMedia/Orm/Base/MediaQuery.php#L1600-L1613
201,527
Blipfoto/php-sdk
src/Blipfoto/Api/OAuth.php
OAuth.authorize
public function authorize($redirect_uri, $scope = Client::SCOPE_READ) { header('Location: ' . $this->getAuthorizeUri($redirect_uri, $scope)); exit; }
php
public function authorize($redirect_uri, $scope = Client::SCOPE_READ) { header('Location: ' . $this->getAuthorizeUri($redirect_uri, $scope)); exit; }
[ "public", "function", "authorize", "(", "$", "redirect_uri", ",", "$", "scope", "=", "Client", "::", "SCOPE_READ", ")", "{", "header", "(", "'Location: '", ".", "$", "this", "->", "getAuthorizeUri", "(", "$", "redirect_uri", ",", "$", "scope", ")", ")", ...
Begin authorization. @param string $redirect_uri @param string $scope (optional) @redirect
[ "Begin", "authorization", "." ]
04f770ac7427e79d15f97b993c787651079cdeb4
https://github.com/Blipfoto/php-sdk/blob/04f770ac7427e79d15f97b993c787651079cdeb4/src/Blipfoto/Api/OAuth.php#L34-L37
201,528
Blipfoto/php-sdk
src/Blipfoto/Api/OAuth.php
OAuth.getAuthorizeUri
public function getAuthorizeUri($redirect_uri, $scope = Client::SCOPE_READ) { $state = sha1(mt_rand()); $_SESSION[$this->oauth_key] = [ 'redirect_uri' => $redirect_uri, 'scope' => $scope, 'state' => $state, ]; return $this->client->authorizationEndpoint() . '?' . http_build_query([ 'response_...
php
public function getAuthorizeUri($redirect_uri, $scope = Client::SCOPE_READ) { $state = sha1(mt_rand()); $_SESSION[$this->oauth_key] = [ 'redirect_uri' => $redirect_uri, 'scope' => $scope, 'state' => $state, ]; return $this->client->authorizationEndpoint() . '?' . http_build_query([ 'response_...
[ "public", "function", "getAuthorizeUri", "(", "$", "redirect_uri", ",", "$", "scope", "=", "Client", "::", "SCOPE_READ", ")", "{", "$", "state", "=", "sha1", "(", "mt_rand", "(", ")", ")", ";", "$", "_SESSION", "[", "$", "this", "->", "oauth_key", "]",...
Generate and return the authorization URI. @param string $redirect_uri @param string $scope (optional) @return string
[ "Generate", "and", "return", "the", "authorization", "URI", "." ]
04f770ac7427e79d15f97b993c787651079cdeb4
https://github.com/Blipfoto/php-sdk/blob/04f770ac7427e79d15f97b993c787651079cdeb4/src/Blipfoto/Api/OAuth.php#L46-L64
201,529
Blipfoto/php-sdk
src/Blipfoto/Api/OAuth.php
OAuth.getAuthorizationCode
public function getAuthorizationCode() { if (isset($_GET['error'])) { throw new OAuthException($_GET['error'], 1); } elseif (!isset($_GET['code']) || !isset($_GET['state'])) { throw new OAuthException('Invalid parameters', 2); } elseif (!isset($_SESSION[$this->oauth_key]['state'])) { throw new OAuthExc...
php
public function getAuthorizationCode() { if (isset($_GET['error'])) { throw new OAuthException($_GET['error'], 1); } elseif (!isset($_GET['code']) || !isset($_GET['state'])) { throw new OAuthException('Invalid parameters', 2); } elseif (!isset($_SESSION[$this->oauth_key]['state'])) { throw new OAuthExc...
[ "public", "function", "getAuthorizationCode", "(", ")", "{", "if", "(", "isset", "(", "$", "_GET", "[", "'error'", "]", ")", ")", "{", "throw", "new", "OAuthException", "(", "$", "_GET", "[", "'error'", "]", ",", "1", ")", ";", "}", "elseif", "(", ...
Obtain an authorization code. @return string @throws OAuthException
[ "Obtain", "an", "authorization", "code", "." ]
04f770ac7427e79d15f97b993c787651079cdeb4
https://github.com/Blipfoto/php-sdk/blob/04f770ac7427e79d15f97b993c787651079cdeb4/src/Blipfoto/Api/OAuth.php#L72-L85
201,530
Blipfoto/php-sdk
src/Blipfoto/Api/OAuth.php
OAuth.getToken
public function getToken($authorization_code = null) { if ($authorization_code == null) { $authorization_code = $this->getAuthorizationCode(); } $params = $_SESSION[$this->oauth_key]; unset($_SESSION[$this->oauth_key]); $response = $this->client->post('oauth/token', [ 'client_id' => $this->client->i...
php
public function getToken($authorization_code = null) { if ($authorization_code == null) { $authorization_code = $this->getAuthorizationCode(); } $params = $_SESSION[$this->oauth_key]; unset($_SESSION[$this->oauth_key]); $response = $this->client->post('oauth/token', [ 'client_id' => $this->client->i...
[ "public", "function", "getToken", "(", "$", "authorization_code", "=", "null", ")", "{", "if", "(", "$", "authorization_code", "==", "null", ")", "{", "$", "authorization_code", "=", "$", "this", "->", "getAuthorizationCode", "(", ")", ";", "}", "$", "para...
Swap an authorization code for a token. @param string $authorization_code (optional) @return array
[ "Swap", "an", "authorization", "code", "for", "a", "token", "." ]
04f770ac7427e79d15f97b993c787651079cdeb4
https://github.com/Blipfoto/php-sdk/blob/04f770ac7427e79d15f97b993c787651079cdeb4/src/Blipfoto/Api/OAuth.php#L93-L110
201,531
Vectrex/vxPHP
src/Database/Adapter/Mysql.php
Mysql.getEnumValues
public function getEnumValues($tableName, $columnName) { // check whether column exists if(!$this->columnExists($tableName, $columnName)) { throw new \PDOException(sprintf("Unknown column '%s' in table '%s'.", $columnName, $tableName)); } // wrong data type $dataType = $this->tableStructureCache[$t...
php
public function getEnumValues($tableName, $columnName) { // check whether column exists if(!$this->columnExists($tableName, $columnName)) { throw new \PDOException(sprintf("Unknown column '%s' in table '%s'.", $columnName, $tableName)); } // wrong data type $dataType = $this->tableStructureCache[$t...
[ "public", "function", "getEnumValues", "(", "$", "tableName", ",", "$", "columnName", ")", "{", "// check whether column exists", "if", "(", "!", "$", "this", "->", "columnExists", "(", "$", "tableName", ",", "$", "columnName", ")", ")", "{", "throw", "new",...
return all possible options of an enum or set attribute @param string $tableName @param string $columnName @return array @throws \PDOException
[ "return", "all", "possible", "options", "of", "an", "enum", "or", "set", "attribute" ]
295c21b00e7ef6085efcdf5b64fabb28d499b5a6
https://github.com/Vectrex/vxPHP/blob/295c21b00e7ef6085efcdf5b64fabb28d499b5a6/src/Database/Adapter/Mysql.php#L157-L187
201,532
libreworks/caridea-container
src/Objects.php
Objects.publish
public function publish(\Caridea\Event\Event $event) { foreach (iterator_to_array($this->listeners) as $listener) { $listener->notify($event); } }
php
public function publish(\Caridea\Event\Event $event) { foreach (iterator_to_array($this->listeners) as $listener) { $listener->notify($event); } }
[ "public", "function", "publish", "(", "\\", "Caridea", "\\", "Event", "\\", "Event", "$", "event", ")", "{", "foreach", "(", "iterator_to_array", "(", "$", "this", "->", "listeners", ")", "as", "$", "listener", ")", "{", "$", "listener", "->", "notify", ...
Queues an event to be sent to Listeners. @param \Caridea\Event\Event $event The event to publish
[ "Queues", "an", "event", "to", "be", "sent", "to", "Listeners", "." ]
b93087ff5bf49f5885025da691575093335bfe8f
https://github.com/libreworks/caridea-container/blob/b93087ff5bf49f5885025da691575093335bfe8f/src/Objects.php#L134-L139
201,533
bartonlp/site-class
includes/database-engines/dbMysql.class.php
dbMysql.maketbodyrows
public function maketbodyrows($query, $rowdesc, $callback=null, &$retresult=false, $delim=false) { // $rowdesc is the <tr>...</tr> for this row // <tr><td>fieldname</td>...</tr> list($result, $num) = $this->query($query, true); if(!$num) { return false; } if($retresult !== false) $...
php
public function maketbodyrows($query, $rowdesc, $callback=null, &$retresult=false, $delim=false) { // $rowdesc is the <tr>...</tr> for this row // <tr><td>fieldname</td>...</tr> list($result, $num) = $this->query($query, true); if(!$num) { return false; } if($retresult !== false) $...
[ "public", "function", "maketbodyrows", "(", "$", "query", ",", "$", "rowdesc", ",", "$", "callback", "=", "null", ",", "&", "$", "retresult", "=", "false", ",", "$", "delim", "=", "false", ")", "{", "// $rowdesc is the <tr>...</tr> for this row", "// <tr><td>f...
Make Tbody Row Make a table row given the query and a template of the row Call back function looks like: callback(&$row, &$rowdesc) it can modify $row and $rowdesc and returns true if we should skip (continue) or false to process. @param string $query the mysql query @param string $rowdesc the tbody row description @p...
[ "Make", "Tbody", "Row" ]
9095b101701ef0ae12ea9a2b4587a18072d04438
https://github.com/bartonlp/site-class/blob/9095b101701ef0ae12ea9a2b4587a18072d04438/includes/database-engines/dbMysql.class.php#L209-L259
201,534
bartonlp/site-class
includes/database-engines/dbMysql.class.php
dbMysql.maketable
public function maketable($query, array $extra=null) { $table = "<table"; if($extra['attr']) { $attr = $extra['attr']; foreach($attr as $k=>$v) { $table .= " $k='$v'"; } } $table .= ">\n<thead>\n<tr>%<th>*</th>%</tr>\n</thead>"; $rowdesc = "<tr><td>*</td></tr>"; $delim ...
php
public function maketable($query, array $extra=null) { $table = "<table"; if($extra['attr']) { $attr = $extra['attr']; foreach($attr as $k=>$v) { $table .= " $k='$v'"; } } $table .= ">\n<thead>\n<tr>%<th>*</th>%</tr>\n</thead>"; $rowdesc = "<tr><td>*</td></tr>"; $delim ...
[ "public", "function", "maketable", "(", "$", "query", ",", "array", "$", "extra", "=", "null", ")", "{", "$", "table", "=", "\"<table\"", ";", "if", "(", "$", "extra", "[", "'attr'", "]", ")", "{", "$", "attr", "=", "$", "extra", "[", "'attr'", "...
Make a full table @param string $query : the table query @param array $extra : optional. $extra is an optional assoc array: $extra['callback'], $extra['callback2'], $extra['footer'] and $extra['attr']. $extra['attr'] is an assoc array that can have attributes for the <table> tag, like 'id', 'title', 'class', 'style' e...
[ "Make", "a", "full", "table" ]
9095b101701ef0ae12ea9a2b4587a18072d04438
https://github.com/bartonlp/site-class/blob/9095b101701ef0ae12ea9a2b4587a18072d04438/includes/database-engines/dbMysql.class.php#L436-L472
201,535
Dhii/validation-base
src/Exception/ValidationFailedException.php
ValidationFailedException._initParent
protected function _initParent($message = '', $code = 0, RootException $previous = null) { parent::__construct($message, $code, $previous); }
php
protected function _initParent($message = '', $code = 0, RootException $previous = null) { parent::__construct($message, $code, $previous); }
[ "protected", "function", "_initParent", "(", "$", "message", "=", "''", ",", "$", "code", "=", "0", ",", "RootException", "$", "previous", "=", "null", ")", "{", "parent", "::", "__construct", "(", "$", "message", ",", "$", "code", ",", "$", "previous"...
Calls the parent constructor. @param string $message The error message. @param int $code The error code. @param RootException $previous The inner exception, if any. @since [*next-version*]
[ "Calls", "the", "parent", "constructor", "." ]
9e75c5f886a2403c6989c36c2d4ffcfae158172e
https://github.com/Dhii/validation-base/blob/9e75c5f886a2403c6989c36c2d4ffcfae158172e/src/Exception/ValidationFailedException.php#L97-L100
201,536
danielgp/common-lib
source/CommonPermissions.php
CommonPermissions.explainPerms
public function explainPerms($permissionNumber) { $firstFlag = $this->matchFirstFlagSingle($permissionNumber); $permissionsString = substr(sprintf('%o', $permissionNumber), -4); $numericalPermissions = $this->numericalPermissionsArray(); return [ 'Permission...
php
public function explainPerms($permissionNumber) { $firstFlag = $this->matchFirstFlagSingle($permissionNumber); $permissionsString = substr(sprintf('%o', $permissionNumber), -4); $numericalPermissions = $this->numericalPermissionsArray(); return [ 'Permission...
[ "public", "function", "explainPerms", "(", "$", "permissionNumber", ")", "{", "$", "firstFlag", "=", "$", "this", "->", "matchFirstFlagSingle", "(", "$", "permissionNumber", ")", ";", "$", "permissionsString", "=", "substr", "(", "sprintf", "(", "'%o'", ",", ...
Returns an array with meaningfull content of permissions @param int $permissionNumber @return array
[ "Returns", "an", "array", "with", "meaningfull", "content", "of", "permissions" ]
627b99b4408414c7cd21a6c8016f6468dc9216b2
https://github.com/danielgp/common-lib/blob/627b99b4408414c7cd21a6c8016f6468dc9216b2/source/CommonPermissions.php#L45-L65
201,537
jitesoft/php-container
src/Injector.php
Injector.create
public function create(string $className, array $bindings = []) { try { $class = new ReflectionClass($className); } catch (ReflectionException $ex) { throw new ContainerException('Failed to create reflection class from given class name.'); } $out = null; ...
php
public function create(string $className, array $bindings = []) { try { $class = new ReflectionClass($className); } catch (ReflectionException $ex) { throw new ContainerException('Failed to create reflection class from given class name.'); } $out = null; ...
[ "public", "function", "create", "(", "string", "$", "className", ",", "array", "$", "bindings", "=", "[", "]", ")", "{", "try", "{", "$", "class", "=", "new", "ReflectionClass", "(", "$", "className", ")", ";", "}", "catch", "(", "ReflectionException", ...
Create a instance of given class name. The injector will try to handle constructor injection, if it fails, it will throw an exception. If a binding array is passed through this method and a container already exists, the bindings will take precedence over the container. @param string $className @param array $bindings ...
[ "Create", "a", "instance", "of", "given", "class", "name", ".", "The", "injector", "will", "try", "to", "handle", "constructor", "injection", "if", "it", "fails", "it", "will", "throw", "an", "exception", "." ]
e24af8e089f5b46219316f9a9c0e0b2193c256b7
https://github.com/jitesoft/php-container/blob/e24af8e089f5b46219316f9a9c0e0b2193c256b7/src/Injector.php#L56-L90
201,538
lasallecms/lasallecms-l5-lasallecmsapi-pkg
src/Repositories/Traits/PrepareForPersist.php
PrepareForPersist.prepareTitleForPersist
public function prepareTitleForPersist($title) { // Strip whitespace (or other characters) from the beginning and end of a string $transformedTitle = trim($title); // Strip HTML and PHP tags from a string $transformedTitle = strip_tags($transformedTitle); // Strip tags, opt...
php
public function prepareTitleForPersist($title) { // Strip whitespace (or other characters) from the beginning and end of a string $transformedTitle = trim($title); // Strip HTML and PHP tags from a string $transformedTitle = strip_tags($transformedTitle); // Strip tags, opt...
[ "public", "function", "prepareTitleForPersist", "(", "$", "title", ")", "{", "// Strip whitespace (or other characters) from the beginning and end of a string", "$", "transformedTitle", "=", "trim", "(", "$", "title", ")", ";", "// Strip HTML and PHP tags from a string", "$", ...
Transform title for persist. @param text $title @return text
[ "Transform", "title", "for", "persist", "." ]
05083be19645d52be86d8ba4f322773db348a11d
https://github.com/lasallecms/lasallecms-l5-lasallecmsapi-pkg/blob/05083be19645d52be86d8ba4f322773db348a11d/src/Repositories/Traits/PrepareForPersist.php#L188-L204
201,539
lasallecms/lasallecms-l5-lasallecmsapi-pkg
src/Repositories/Traits/PrepareForPersist.php
PrepareForPersist.prepareDescriptionForPersist
public function prepareDescriptionForPersist($description) { $description = html_entity_decode($description); $description = strip_tags($description); $description = filter_var($description, FILTER_SANITIZE_STRING); // remove the encoded blank chars $description = str_replac...
php
public function prepareDescriptionForPersist($description) { $description = html_entity_decode($description); $description = strip_tags($description); $description = filter_var($description, FILTER_SANITIZE_STRING); // remove the encoded blank chars $description = str_replac...
[ "public", "function", "prepareDescriptionForPersist", "(", "$", "description", ")", "{", "$", "description", "=", "html_entity_decode", "(", "$", "description", ")", ";", "$", "description", "=", "strip_tags", "(", "$", "description", ")", ";", "$", "description...
Transform description for persist. @param string $descriptions @return text
[ "Transform", "description", "for", "persist", "." ]
05083be19645d52be86d8ba4f322773db348a11d
https://github.com/lasallecms/lasallecms-l5-lasallecmsapi-pkg/blob/05083be19645d52be86d8ba4f322773db348a11d/src/Repositories/Traits/PrepareForPersist.php#L213-L224
201,540
lasallecms/lasallecms-l5-lasallecmsapi-pkg
src/Repositories/Traits/PrepareForPersist.php
PrepareForPersist.prepareSlugForPersist
public function prepareSlugForPersist($title, $slug, $id=false) { $separator = '-'; if ($slug == "") { // No slug.. so this is a "create" form; or, the slug was deleted accidentally and so needs to be regenerated // Convert all dashes/underscores into separator ...
php
public function prepareSlugForPersist($title, $slug, $id=false) { $separator = '-'; if ($slug == "") { // No slug.. so this is a "create" form; or, the slug was deleted accidentally and so needs to be regenerated // Convert all dashes/underscores into separator ...
[ "public", "function", "prepareSlugForPersist", "(", "$", "title", ",", "$", "slug", ",", "$", "id", "=", "false", ")", "{", "$", "separator", "=", "'-'", ";", "if", "(", "$", "slug", "==", "\"\"", ")", "{", "// No slug.. so this is a \"create\" form; or, the...
Prepare slug for persist. @param text $title @param text $slug @param int $id The id of the record (eg, of the posts table) that is currently being edited @return text
[ "Prepare", "slug", "for", "persist", "." ]
05083be19645d52be86d8ba4f322773db348a11d
https://github.com/lasallecms/lasallecms-l5-lasallecmsapi-pkg/blob/05083be19645d52be86d8ba4f322773db348a11d/src/Repositories/Traits/PrepareForPersist.php#L235-L312
201,541
lasallecms/lasallecms-l5-lasallecmsapi-pkg
src/Repositories/Traits/PrepareForPersist.php
PrepareForPersist.isManuallyChangedSlugInEditForm
public function isManuallyChangedSlugInEditForm($slug, $id=false) { // If there is no $id, then there's nothing to figure out! if (!$id) return false; $record = DB::table($this->model->table) ->where('id', $id) ->first() ; if ($record->slug == $slug)...
php
public function isManuallyChangedSlugInEditForm($slug, $id=false) { // If there is no $id, then there's nothing to figure out! if (!$id) return false; $record = DB::table($this->model->table) ->where('id', $id) ->first() ; if ($record->slug == $slug)...
[ "public", "function", "isManuallyChangedSlugInEditForm", "(", "$", "slug", ",", "$", "id", "=", "false", ")", "{", "// If there is no $id, then there's nothing to figure out!", "if", "(", "!", "$", "id", ")", "return", "false", ";", "$", "record", "=", "DB", "::...
Was the slug changed in the edit form? @param text $slug @param int $id The id of the record (eg, of the posts table) that is currently being edited @return bool
[ "Was", "the", "slug", "changed", "in", "the", "edit", "form?" ]
05083be19645d52be86d8ba4f322773db348a11d
https://github.com/lasallecms/lasallecms-l5-lasallecmsapi-pkg/blob/05083be19645d52be86d8ba4f322773db348a11d/src/Repositories/Traits/PrepareForPersist.php#L322-L342
201,542
lasallecms/lasallecms-l5-lasallecmsapi-pkg
src/Repositories/Traits/PrepareForPersist.php
PrepareForPersist.doesSlugAlreadyExist
public function doesSlugAlreadyExist($slug) { $rowCount = DB::table($this->model->table) ->where('slug', $slug) ->count(); if ($rowCount > 0) return $rowCount; return 0; }
php
public function doesSlugAlreadyExist($slug) { $rowCount = DB::table($this->model->table) ->where('slug', $slug) ->count(); if ($rowCount > 0) return $rowCount; return 0; }
[ "public", "function", "doesSlugAlreadyExist", "(", "$", "slug", ")", "{", "$", "rowCount", "=", "DB", "::", "table", "(", "$", "this", "->", "model", "->", "table", ")", "->", "where", "(", "'slug'", ",", "$", "slug", ")", "->", "count", "(", ")", ...
Does the slug already exist in the table? @param text $slug @return int
[ "Does", "the", "slug", "already", "exist", "in", "the", "table?" ]
05083be19645d52be86d8ba4f322773db348a11d
https://github.com/lasallecms/lasallecms-l5-lasallecmsapi-pkg/blob/05083be19645d52be86d8ba4f322773db348a11d/src/Repositories/Traits/PrepareForPersist.php#L351-L359
201,543
lasallecms/lasallecms-l5-lasallecmsapi-pkg
src/Repositories/Traits/PrepareForPersist.php
PrepareForPersist.prepareCanonicalURLForPersist
public function prepareCanonicalURLForPersist($slug) { $baseURL = rtrim(config('app.url'), "/"); if ($this->model->table == "posts") $type = "blog"; // July 15, 2015: do *NOT* want type! //return $baseURL.'/'.$type.'/'.$slug; return $baseURL.'/'.$slug; }
php
public function prepareCanonicalURLForPersist($slug) { $baseURL = rtrim(config('app.url'), "/"); if ($this->model->table == "posts") $type = "blog"; // July 15, 2015: do *NOT* want type! //return $baseURL.'/'.$type.'/'.$slug; return $baseURL.'/'.$slug; }
[ "public", "function", "prepareCanonicalURLForPersist", "(", "$", "slug", ")", "{", "$", "baseURL", "=", "rtrim", "(", "config", "(", "'app.url'", ")", ",", "\"/\"", ")", ";", "if", "(", "$", "this", "->", "model", "->", "table", "==", "\"posts\"", ")", ...
Transform canonical_url for persist. @param text $slug @return text
[ "Transform", "canonical_url", "for", "persist", "." ]
05083be19645d52be86d8ba4f322773db348a11d
https://github.com/lasallecms/lasallecms-l5-lasallecmsapi-pkg/blob/05083be19645d52be86d8ba4f322773db348a11d/src/Repositories/Traits/PrepareForPersist.php#L368-L379
201,544
lasallecms/lasallecms-l5-lasallecmsapi-pkg
src/Repositories/Traits/PrepareForPersist.php
PrepareForPersist.prepareURLForPersist
public function prepareURLForPersist($url) { if (substr($url, 0, 7 ) == "http://") return $url; if (substr($url, 0, 8 ) == "https://") return $url; $washedUrl = "http://"; $washedUrl .= $url; return $url; }
php
public function prepareURLForPersist($url) { if (substr($url, 0, 7 ) == "http://") return $url; if (substr($url, 0, 8 ) == "https://") return $url; $washedUrl = "http://"; $washedUrl .= $url; return $url; }
[ "public", "function", "prepareURLForPersist", "(", "$", "url", ")", "{", "if", "(", "substr", "(", "$", "url", ",", "0", ",", "7", ")", "==", "\"http://\"", ")", "return", "$", "url", ";", "if", "(", "substr", "(", "$", "url", ",", "0", ",", "8",...
Wash URL for persist. Does *not* test for a .com or .ca or other TLD @param text $url @return text
[ "Wash", "URL", "for", "persist", "." ]
05083be19645d52be86d8ba4f322773db348a11d
https://github.com/lasallecms/lasallecms-l5-lasallecmsapi-pkg/blob/05083be19645d52be86d8ba4f322773db348a11d/src/Repositories/Traits/PrepareForPersist.php#L390-L400
201,545
lasallecms/lasallecms-l5-lasallecmsapi-pkg
src/Repositories/Traits/PrepareForPersist.php
PrepareForPersist.prepareExcerptForPersist
public function prepareExcerptForPersist($excerpt="", $content) { $chars_to_excerpt = config('lasallecmsapi.how_many_initial_chars_of_content_field_for_excerpt'); if ($excerpt == "") { $excerpt = $content; $excerpt = html_entity_decode($excerpt); $excerp...
php
public function prepareExcerptForPersist($excerpt="", $content) { $chars_to_excerpt = config('lasallecmsapi.how_many_initial_chars_of_content_field_for_excerpt'); if ($excerpt == "") { $excerpt = $content; $excerpt = html_entity_decode($excerpt); $excerp...
[ "public", "function", "prepareExcerptForPersist", "(", "$", "excerpt", "=", "\"\"", ",", "$", "content", ")", "{", "$", "chars_to_excerpt", "=", "config", "(", "'lasallecmsapi.how_many_initial_chars_of_content_field_for_excerpt'", ")", ";", "if", "(", "$", "excerpt", ...
Transform excerpt for persist. @param text $excerpt @return text
[ "Transform", "excerpt", "for", "persist", "." ]
05083be19645d52be86d8ba4f322773db348a11d
https://github.com/lasallecms/lasallecms-l5-lasallecmsapi-pkg/blob/05083be19645d52be86d8ba4f322773db348a11d/src/Repositories/Traits/PrepareForPersist.php#L422-L453
201,546
lasallecms/lasallecms-l5-lasallecmsapi-pkg
src/Repositories/Traits/PrepareForPersist.php
PrepareForPersist.prepareMetaDescriptionForPersist
public function prepareMetaDescriptionForPersist($meta_description="", $excerpt) { if ($meta_description == "") return $excerpt; $meta_description = html_entity_decode($meta_description); $meta_description = strip_tags($meta_description); $meta_description = filter_var($meta_descrip...
php
public function prepareMetaDescriptionForPersist($meta_description="", $excerpt) { if ($meta_description == "") return $excerpt; $meta_description = html_entity_decode($meta_description); $meta_description = strip_tags($meta_description); $meta_description = filter_var($meta_descrip...
[ "public", "function", "prepareMetaDescriptionForPersist", "(", "$", "meta_description", "=", "\"\"", ",", "$", "excerpt", ")", "{", "if", "(", "$", "meta_description", "==", "\"\"", ")", "return", "$", "excerpt", ";", "$", "meta_description", "=", "html_entity_d...
Transform meta_description for persist. @param text $meta_description @param text $excerpt @return text
[ "Transform", "meta_description", "for", "persist", "." ]
05083be19645d52be86d8ba4f322773db348a11d
https://github.com/lasallecms/lasallecms-l5-lasallecmsapi-pkg/blob/05083be19645d52be86d8ba4f322773db348a11d/src/Repositories/Traits/PrepareForPersist.php#L463-L476
201,547
lasallecms/lasallecms-l5-lasallecmsapi-pkg
src/Repositories/Traits/PrepareForPersist.php
PrepareForPersist.prepareCompositeTitleForPersist
public function prepareCompositeTitleForPersist($fieldsToConcatenate, $data) { $composite_title = ""; // count to determine spacing between fields $count = count($fieldsToConcatenate); $i = 1; foreach ($fieldsToConcatenate as $fieldToConcatenate) { // I...
php
public function prepareCompositeTitleForPersist($fieldsToConcatenate, $data) { $composite_title = ""; // count to determine spacing between fields $count = count($fieldsToConcatenate); $i = 1; foreach ($fieldsToConcatenate as $fieldToConcatenate) { // I...
[ "public", "function", "prepareCompositeTitleForPersist", "(", "$", "fieldsToConcatenate", ",", "$", "data", ")", "{", "$", "composite_title", "=", "\"\"", ";", "// count to determine spacing between fields", "$", "count", "=", "count", "(", "$", "fieldsToConcatenate", ...
Concatenate fields for the composite Title field @param array $fieldsToConcatenate @param array $data @return string
[ "Concatenate", "fields", "for", "the", "composite", "Title", "field" ]
05083be19645d52be86d8ba4f322773db348a11d
https://github.com/lasallecms/lasallecms-l5-lasallecmsapi-pkg/blob/05083be19645d52be86d8ba4f322773db348a11d/src/Repositories/Traits/PrepareForPersist.php#L593-L619
201,548
lasallecms/lasallecms-l5-lasallecmsapi-pkg
src/Repositories/Traits/PrepareForPersist.php
PrepareForPersist.prepareRelatedTableForPersist
public function prepareRelatedTableForPersist($field, $data) { // If the field is nullable, then having associated records is optional. if ( ( ($data == "") || ($data == null) || (!$data) || (empty($data)) ) && ...
php
public function prepareRelatedTableForPersist($field, $data) { // If the field is nullable, then having associated records is optional. if ( ( ($data == "") || ($data == null) || (!$data) || (empty($data)) ) && ...
[ "public", "function", "prepareRelatedTableForPersist", "(", "$", "field", ",", "$", "data", ")", "{", "// If the field is nullable, then having associated records is optional.", "if", "(", "(", "(", "$", "data", "==", "\"\"", ")", "||", "(", "$", "data", "==", "nu...
Prepare foreign key field for persist. This is for "one" relationships only, where there is an actual field for the related table's ID in the primary table. Basically, the purpose here is to set the data to "null" when there is no value, and the field is nullable. @param array $fields @param array $data @ret...
[ "Prepare", "foreign", "key", "field", "for", "persist", "." ]
05083be19645d52be86d8ba4f322773db348a11d
https://github.com/lasallecms/lasallecms-l5-lasallecmsapi-pkg/blob/05083be19645d52be86d8ba4f322773db348a11d/src/Repositories/Traits/PrepareForPersist.php#L635-L651
201,549
lasallecms/lasallecms-l5-lasallecmsapi-pkg
src/Repositories/Traits/PrepareForPersist.php
PrepareForPersist.genericWashText
public function genericWashText($text) { // http://php.net/manual/en/function.strip-tags.php $text = strip_tags($text); // http://php.net/manual/en/filter.filters.sanitize.php $text = filter_var($text, FILTER_SANITIZE_STRING); // remove the encoded blank chars $text = ...
php
public function genericWashText($text) { // http://php.net/manual/en/function.strip-tags.php $text = strip_tags($text); // http://php.net/manual/en/filter.filters.sanitize.php $text = filter_var($text, FILTER_SANITIZE_STRING); // remove the encoded blank chars $text = ...
[ "public", "function", "genericWashText", "(", "$", "text", ")", "{", "// http://php.net/manual/en/function.strip-tags.php", "$", "text", "=", "strip_tags", "(", "$", "text", ")", ";", "// http://php.net/manual/en/filter.filters.sanitize.php", "$", "text", "=", "filter_var...
A generic wash of plain ol' text. The hope is to rid a string of HTML tags and PHP tags My admin form automation does not call this method, but I concocted it for my email package, and thought, gee, it would be nice to have it in this class for other custom form field processing. @param string $text @return string
[ "A", "generic", "wash", "of", "plain", "ol", "text", "." ]
05083be19645d52be86d8ba4f322773db348a11d
https://github.com/lasallecms/lasallecms-l5-lasallecmsapi-pkg/blob/05083be19645d52be86d8ba4f322773db348a11d/src/Repositories/Traits/PrepareForPersist.php#L665-L683
201,550
lasallecms/lasallecms-l5-lasallecmsapi-pkg
src/Repositories/Traits/PrepareForPersist.php
PrepareForPersist.genericCreateSlug
public function genericCreateSlug($text) { // Define a separator $separator = '-'; // Convert all dashes/underscores into separator $flip = $separator == '-' ? '_' : '-'; // Wash the $text, although it should already be washed $slug = $this->genericWashText($text); ...
php
public function genericCreateSlug($text) { // Define a separator $separator = '-'; // Convert all dashes/underscores into separator $flip = $separator == '-' ? '_' : '-'; // Wash the $text, although it should already be washed $slug = $this->genericWashText($text); ...
[ "public", "function", "genericCreateSlug", "(", "$", "text", ")", "{", "// Define a separator", "$", "separator", "=", "'-'", ";", "// Convert all dashes/underscores into separator", "$", "flip", "=", "$", "separator", "==", "'-'", "?", "'_'", ":", "'-'", ";", "...
A generic method to create a slug based on any string. The prepareSlugForPersis() method creates a slug from the "title" field. This method let's you create a slug from any string, not just from the "title" field. My admin form automation does not call this method, but I concocted it for my email package, and thought...
[ "A", "generic", "method", "to", "create", "a", "slug", "based", "on", "any", "string", "." ]
05083be19645d52be86d8ba4f322773db348a11d
https://github.com/lasallecms/lasallecms-l5-lasallecmsapi-pkg/blob/05083be19645d52be86d8ba4f322773db348a11d/src/Repositories/Traits/PrepareForPersist.php#L697-L717
201,551
nattreid/tracking
src/Model/Tracking/TrackingMapper.php
TrackingMapper.onlineUsers
public function onlineUsers(): int { $builder = $this->builder() ->addSelect('COUNT(DISTINCT([uid])) count') ->andWhere('[inserted] > %dt', (new \DateTime)->modify('-' . $this->onlineTime . ' minute')) ->andWhere('[timeOnPage] IS NOT null'); return $this->execute($builder)->fetch()->count; }
php
public function onlineUsers(): int { $builder = $this->builder() ->addSelect('COUNT(DISTINCT([uid])) count') ->andWhere('[inserted] > %dt', (new \DateTime)->modify('-' . $this->onlineTime . ' minute')) ->andWhere('[timeOnPage] IS NOT null'); return $this->execute($builder)->fetch()->count; }
[ "public", "function", "onlineUsers", "(", ")", ":", "int", "{", "$", "builder", "=", "$", "this", "->", "builder", "(", ")", "->", "addSelect", "(", "'COUNT(DISTINCT([uid])) count'", ")", "->", "andWhere", "(", "'[inserted] > %dt'", ",", "(", "new", "\\", ...
Vrati online uzivatele @return int @throws QueryException
[ "Vrati", "online", "uzivatele" ]
5fc7c993c08774945405c79a393584ef2ed589f7
https://github.com/nattreid/tracking/blob/5fc7c993c08774945405c79a393584ef2ed589f7/src/Model/Tracking/TrackingMapper.php#L105-L112
201,552
nattreid/tracking
src/Model/Tracking/TrackingMapper.php
TrackingMapper.findVisitsHours
public function findVisitsHours(Range $interval, bool $useTime = false): ?Result { $date = $useTime ? '%dt' : 'DATE(%dt)'; $subQuery = 'SELECT ' . 'DATE_FORMAT([inserted], "%%Y-%%m-%%d %%H:00:00") datefield, ' . 'COUNT([uid]) visits ' . 'FROM %table ' . 'WHERE ' . ($useTime ? '[inserted]' : 'DATE([ins...
php
public function findVisitsHours(Range $interval, bool $useTime = false): ?Result { $date = $useTime ? '%dt' : 'DATE(%dt)'; $subQuery = 'SELECT ' . 'DATE_FORMAT([inserted], "%%Y-%%m-%%d %%H:00:00") datefield, ' . 'COUNT([uid]) visits ' . 'FROM %table ' . 'WHERE ' . ($useTime ? '[inserted]' : 'DATE([ins...
[ "public", "function", "findVisitsHours", "(", "Range", "$", "interval", ",", "bool", "$", "useTime", "=", "false", ")", ":", "?", "Result", "{", "$", "date", "=", "$", "useTime", "?", "'%dt'", ":", "'DATE(%dt)'", ";", "$", "subQuery", "=", "'SELECT '", ...
Vrati navstevy po hodinach @param Range $interval @param bool $useTime ma se pouzit cas v intervalu @return Result|null @throws QueryException
[ "Vrati", "navstevy", "po", "hodinach" ]
5fc7c993c08774945405c79a393584ef2ed589f7
https://github.com/nattreid/tracking/blob/5fc7c993c08774945405c79a393584ef2ed589f7/src/Model/Tracking/TrackingMapper.php#L121-L132
201,553
mwyatt/core
src/Iterator/Model/User.php
User.getByNameFirst
public function getByNameFirst($value) { $users = []; foreach ($this as $user) { if ($user->get('nameFirst')) { $users[] = $user; } } return new $this($users); }
php
public function getByNameFirst($value) { $users = []; foreach ($this as $user) { if ($user->get('nameFirst')) { $users[] = $user; } } return new $this($users); }
[ "public", "function", "getByNameFirst", "(", "$", "value", ")", "{", "$", "users", "=", "[", "]", ";", "foreach", "(", "$", "this", "as", "$", "user", ")", "{", "if", "(", "$", "user", "->", "get", "(", "'nameFirst'", ")", ")", "{", "$", "users",...
example usage of more specific iterator will tidy the controllers even further @param string $value @return array users
[ "example", "usage", "of", "more", "specific", "iterator", "will", "tidy", "the", "controllers", "even", "further" ]
8ea9d67cc84fe6aff17a469c703d5492dbcd93ed
https://github.com/mwyatt/core/blob/8ea9d67cc84fe6aff17a469c703d5492dbcd93ed/src/Iterator/Model/User.php#L15-L24
201,554
RhubarbPHP/Module.Leaf.Table
src/Leaves/Table.php
Table.inflateColumns
protected function inflateColumns($columns) { $inflatedColumns = []; foreach ($columns as $key => $value) { $tableColumn = $value; $label = !is_numeric($key) ? $key : null; if (is_string($tableColumn)) { $value = (string)$value; ...
php
protected function inflateColumns($columns) { $inflatedColumns = []; foreach ($columns as $key => $value) { $tableColumn = $value; $label = !is_numeric($key) ? $key : null; if (is_string($tableColumn)) { $value = (string)$value; ...
[ "protected", "function", "inflateColumns", "(", "$", "columns", ")", "{", "$", "inflatedColumns", "=", "[", "]", ";", "foreach", "(", "$", "columns", "as", "$", "key", "=>", "$", "value", ")", "{", "$", "tableColumn", "=", "$", "value", ";", "$", "la...
Expands the columns array, creating TableColumn objects where needed. @param array $columns @return TableColumn[]
[ "Expands", "the", "columns", "array", "creating", "TableColumn", "objects", "where", "needed", "." ]
1de09307177cc809ca6b2a50093ccad06ab49e45
https://github.com/RhubarbPHP/Module.Leaf.Table/blob/1de09307177cc809ca6b2a50093ccad06ab49e45/src/Leaves/Table.php#L343-L378
201,555
RhubarbPHP/Module.Leaf.Table
src/Leaves/Table.php
Table.getDataForPresenter
protected function getDataForPresenter($dataKey, $viewIndex = false) { if (!isset($this->currentRow[$dataKey])) { return $this->model->getBoundValue($dataKey, $viewIndex); } $value = $this->currentRow[$dataKey]; if ($value instanceof Model) { return $value->...
php
protected function getDataForPresenter($dataKey, $viewIndex = false) { if (!isset($this->currentRow[$dataKey])) { return $this->model->getBoundValue($dataKey, $viewIndex); } $value = $this->currentRow[$dataKey]; if ($value instanceof Model) { return $value->...
[ "protected", "function", "getDataForPresenter", "(", "$", "dataKey", ",", "$", "viewIndex", "=", "false", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "currentRow", "[", "$", "dataKey", "]", ")", ")", "{", "return", "$", "this", "->", "...
Provides model data to the requesting presenter. This implementation ensures the LeafColumns are able to receive data from the row's model @param string $dataKey @param bool|int $viewIndex @return mixed
[ "Provides", "model", "data", "to", "the", "requesting", "presenter", "." ]
1de09307177cc809ca6b2a50093ccad06ab49e45
https://github.com/RhubarbPHP/Module.Leaf.Table/blob/1de09307177cc809ca6b2a50093ccad06ab49e45/src/Leaves/Table.php#L389-L402
201,556
mwyatt/core
src/AbstractView.php
AbstractView.getTemplate
public function getTemplate($templatePath) { $absoluteTemplateFilePath = $this->getTemplateFilePath($templatePath); if (!$absoluteTemplateFilePath) { return; } extract($this->getArrayCopy()); ob_start(); include $absoluteTemplateFilePath; $content ...
php
public function getTemplate($templatePath) { $absoluteTemplateFilePath = $this->getTemplateFilePath($templatePath); if (!$absoluteTemplateFilePath) { return; } extract($this->getArrayCopy()); ob_start(); include $absoluteTemplateFilePath; $content ...
[ "public", "function", "getTemplate", "(", "$", "templatePath", ")", "{", "$", "absoluteTemplateFilePath", "=", "$", "this", "->", "getTemplateFilePath", "(", "$", "templatePath", ")", ";", "if", "(", "!", "$", "absoluteTemplateFilePath", ")", "{", "return", ";...
converts stored key values in iterator to output from template path requested @param string $templatePath @return string
[ "converts", "stored", "key", "values", "in", "iterator", "to", "output", "from", "template", "path", "requested" ]
8ea9d67cc84fe6aff17a469c703d5492dbcd93ed
https://github.com/mwyatt/core/blob/8ea9d67cc84fe6aff17a469c703d5492dbcd93ed/src/AbstractView.php#L47-L59
201,557
praxigento/mobi_mod_downline
Block/Adminhtml/Customer/Edit/Tabs/Mobi/Info.php
Info.loadCustomerData
private function loadCustomerData() { $custId = $this->registry->registry(\Magento\Customer\Controller\RegistryConstants::CURRENT_CUSTOMER_ID); if ($custId) { $query = $this->qLoad->build(); $conn = $query->getConnection(); $bind = [ QLoad::BND_CUS...
php
private function loadCustomerData() { $custId = $this->registry->registry(\Magento\Customer\Controller\RegistryConstants::CURRENT_CUSTOMER_ID); if ($custId) { $query = $this->qLoad->build(); $conn = $query->getConnection(); $bind = [ QLoad::BND_CUS...
[ "private", "function", "loadCustomerData", "(", ")", "{", "$", "custId", "=", "$", "this", "->", "registry", "->", "registry", "(", "\\", "Magento", "\\", "Customer", "\\", "Controller", "\\", "RegistryConstants", "::", "CURRENT_CUSTOMER_ID", ")", ";", "if", ...
Load block's working data before rendering.
[ "Load", "block", "s", "working", "data", "before", "rendering", "." ]
0f3c276dfff1aa029f9fd205ccfc56f207a2e75b
https://github.com/praxigento/mobi_mod_downline/blob/0f3c276dfff1aa029f9fd205ccfc56f207a2e75b/Block/Adminhtml/Customer/Edit/Tabs/Mobi/Info.php#L146-L158
201,558
pixelpolishers/makedocs
src/MakeDocs/Generator/SourceFile.php
SourceFile.getContent
public function getContent() { foreach ($this->dom->documentElement->childNodes as $node) { if ($node->nodeName == 'content') { return $node; } } return null; }
php
public function getContent() { foreach ($this->dom->documentElement->childNodes as $node) { if ($node->nodeName == 'content') { return $node; } } return null; }
[ "public", "function", "getContent", "(", ")", "{", "foreach", "(", "$", "this", "->", "dom", "->", "documentElement", "->", "childNodes", "as", "$", "node", ")", "{", "if", "(", "$", "node", "->", "nodeName", "==", "'content'", ")", "{", "return", "$",...
Gets the content section. @return DOMElement
[ "Gets", "the", "content", "section", "." ]
1fa243b52565b5de417ef2dbdfbcae9896b6b483
https://github.com/pixelpolishers/makedocs/blob/1fa243b52565b5de417ef2dbdfbcae9896b6b483/src/MakeDocs/Generator/SourceFile.php#L63-L72
201,559
freialib/hlin.tools
src/Logger/File.php
FileLogger.log
function log($message, $type = null, $explicit = false) { try { $time = date('Y-m-d|H:i:s'); if ($type === null) { $this->appendToFile(date('Y/m/d'), "[$time] $message", $explicit); } else { // type !== null $this->appendToFile($type, "[$time] $message", $explicit); } } catch (\Exception $e...
php
function log($message, $type = null, $explicit = false) { try { $time = date('Y-m-d|H:i:s'); if ($type === null) { $this->appendToFile(date('Y/m/d'), "[$time] $message", $explicit); } else { // type !== null $this->appendToFile($type, "[$time] $message", $explicit); } } catch (\Exception $e...
[ "function", "log", "(", "$", "message", ",", "$", "type", "=", "null", ",", "$", "explicit", "=", "false", ")", "{", "try", "{", "$", "time", "=", "date", "(", "'Y-m-d|H:i:s'", ")", ";", "if", "(", "$", "type", "===", "null", ")", "{", "$", "th...
Logs a message. The type can be used as a hint to the logger on how to log the message. If the logger doesn't understand the type a file with the type name will be created as default behavior. Types should not use illegal file characters.
[ "Logs", "a", "message", ".", "The", "type", "can", "be", "used", "as", "a", "hint", "to", "the", "logger", "on", "how", "to", "log", "the", "message", ".", "If", "the", "logger", "doesn", "t", "understand", "the", "type", "a", "file", "with", "the", ...
42ad9e9fe081918d2ee5d52b72d174ccdcf7cbe7
https://github.com/freialib/hlin.tools/blob/42ad9e9fe081918d2ee5d52b72d174ccdcf7cbe7/src/Logger/File.php#L56-L69
201,560
freialib/hlin.tools
src/Logger/File.php
FileLogger.appendToFile
protected function appendToFile($logfile, $logstring, $explicit = false) { $class = \hlin\PHP::unn(__CLASS__); # logging signatures are intended to prevent duplication PER REQUEST # on a per logger instance basis, not cull duplicate messages per log $sig = crc32($logstring); $filesig = crc32($sig.$logfile)...
php
protected function appendToFile($logfile, $logstring, $explicit = false) { $class = \hlin\PHP::unn(__CLASS__); # logging signatures are intended to prevent duplication PER REQUEST # on a per logger instance basis, not cull duplicate messages per log $sig = crc32($logstring); $filesig = crc32($sig.$logfile)...
[ "protected", "function", "appendToFile", "(", "$", "logfile", ",", "$", "logstring", ",", "$", "explicit", "=", "false", ")", "{", "$", "class", "=", "\\", "hlin", "\\", "PHP", "::", "unn", "(", "__CLASS__", ")", ";", "# logging signatures are intended to pr...
Appeds to the logfile. The logfile is relative to the logs directory. If the logfile doesn't exist yet the system will create it. The '.log' extention is automatically appended, along with a single newline character.
[ "Appeds", "to", "the", "logfile", ".", "The", "logfile", "is", "relative", "to", "the", "logs", "directory", ".", "If", "the", "logfile", "doesn", "t", "exist", "yet", "the", "system", "will", "create", "it", ".", "The", ".", "log", "extention", "is", ...
42ad9e9fe081918d2ee5d52b72d174ccdcf7cbe7
https://github.com/freialib/hlin.tools/blob/42ad9e9fe081918d2ee5d52b72d174ccdcf7cbe7/src/Logger/File.php#L89-L159
201,561
RocketPropelledTortoise/Core
src/Entities/Field.php
Field.setValueAttribute
public function setValueAttribute($value) { if (!$this->isValid($value)) { throw new InvalidValueException("The value in the field '" . get_class($this) . "' is invalid"); } $this->attributes['value'] = $this->prepareValue($value); }
php
public function setValueAttribute($value) { if (!$this->isValid($value)) { throw new InvalidValueException("The value in the field '" . get_class($this) . "' is invalid"); } $this->attributes['value'] = $this->prepareValue($value); }
[ "public", "function", "setValueAttribute", "(", "$", "value", ")", "{", "if", "(", "!", "$", "this", "->", "isValid", "(", "$", "value", ")", ")", "{", "throw", "new", "InvalidValueException", "(", "\"The value in the field '\"", ".", "get_class", "(", "$", ...
Validate and set the value @param mixed $value
[ "Validate", "and", "set", "the", "value" ]
78b65663fc463e21e494257140ddbed0a9ccb3c3
https://github.com/RocketPropelledTortoise/Core/blob/78b65663fc463e21e494257140ddbed0a9ccb3c3/src/Entities/Field.php#L50-L57
201,562
danielgp/browser-agent-info
source/BrowserAgentInfosByDanielGP.php
BrowserAgentInfosByDanielGP.getArchitectureFromUserAgent
public function getArchitectureFromUserAgent($userAgent, $targetToAnalyze = 'os') { switch ($targetToAnalyze) { case 'browser': $aReturn = $this->getArchitectureFromUserAgentBrowser($userAgent); break; case 'os': $aReturn = $this->getAr...
php
public function getArchitectureFromUserAgent($userAgent, $targetToAnalyze = 'os') { switch ($targetToAnalyze) { case 'browser': $aReturn = $this->getArchitectureFromUserAgentBrowser($userAgent); break; case 'os': $aReturn = $this->getAr...
[ "public", "function", "getArchitectureFromUserAgent", "(", "$", "userAgent", ",", "$", "targetToAnalyze", "=", "'os'", ")", "{", "switch", "(", "$", "targetToAnalyze", ")", "{", "case", "'browser'", ":", "$", "aReturn", "=", "$", "this", "->", "getArchitecture...
Return CPU architecture details from given user agent @param string $userAgent @param string $targetToAnalyze @return array
[ "Return", "CPU", "architecture", "details", "from", "given", "user", "agent" ]
5e4b2c01793ee47ce517be2c799d64abe78d7f8a
https://github.com/danielgp/browser-agent-info/blob/5e4b2c01793ee47ce517be2c799d64abe78d7f8a/source/BrowserAgentInfosByDanielGP.php#L59-L73
201,563
danielgp/browser-agent-info
source/BrowserAgentInfosByDanielGP.php
BrowserAgentInfosByDanielGP.getClientBrowser
private function getClientBrowser(\DeviceDetector\DeviceDetector $deviceDetectorClass, $userAgent) { $this->autoPopulateSuperGlobals(); $browserInfoArray = [ 'architecture' => $this->getArchitectureFromUserAgent($userAgent, 'browser'), 'connection' => $this->brServerGloba...
php
private function getClientBrowser(\DeviceDetector\DeviceDetector $deviceDetectorClass, $userAgent) { $this->autoPopulateSuperGlobals(); $browserInfoArray = [ 'architecture' => $this->getArchitectureFromUserAgent($userAgent, 'browser'), 'connection' => $this->brServerGloba...
[ "private", "function", "getClientBrowser", "(", "\\", "DeviceDetector", "\\", "DeviceDetector", "$", "deviceDetectorClass", ",", "$", "userAgent", ")", "{", "$", "this", "->", "autoPopulateSuperGlobals", "(", ")", ";", "$", "browserInfoArray", "=", "[", "'architec...
Provides details about browser @param \DeviceDetector\DeviceDetector $deviceDetectorClass @param string $userAgent @return array
[ "Provides", "details", "about", "browser" ]
5e4b2c01793ee47ce517be2c799d64abe78d7f8a
https://github.com/danielgp/browser-agent-info/blob/5e4b2c01793ee47ce517be2c799d64abe78d7f8a/source/BrowserAgentInfosByDanielGP.php#L82-L97
201,564
danielgp/browser-agent-info
source/BrowserAgentInfosByDanielGP.php
BrowserAgentInfosByDanielGP.getClientBrowserAccepted
private function getClientBrowserAccepted() { $this->autoPopulateSuperGlobals(); $sReturn = [ 'accept' => $this->brServerGlobals->server->get('HTTP_ACCEPT'), 'accept_encoding' => $this->brServerGlobals->server->get('HTTP_ACCEPT_ENCODING'), ]; if (!is_...
php
private function getClientBrowserAccepted() { $this->autoPopulateSuperGlobals(); $sReturn = [ 'accept' => $this->brServerGlobals->server->get('HTTP_ACCEPT'), 'accept_encoding' => $this->brServerGlobals->server->get('HTTP_ACCEPT_ENCODING'), ]; if (!is_...
[ "private", "function", "getClientBrowserAccepted", "(", ")", "{", "$", "this", "->", "autoPopulateSuperGlobals", "(", ")", ";", "$", "sReturn", "=", "[", "'accept'", "=>", "$", "this", "->", "brServerGlobals", "->", "server", "->", "get", "(", "'HTTP_ACCEPT'",...
Returns accepted things setting from the client browser @return array
[ "Returns", "accepted", "things", "setting", "from", "the", "client", "browser" ]
5e4b2c01793ee47ce517be2c799d64abe78d7f8a
https://github.com/danielgp/browser-agent-info/blob/5e4b2c01793ee47ce517be2c799d64abe78d7f8a/source/BrowserAgentInfosByDanielGP.php#L104-L119
201,565
danielgp/browser-agent-info
source/BrowserAgentInfosByDanielGP.php
BrowserAgentInfosByDanielGP.getClientBrowserDetails
public function getClientBrowserDetails($returnType = ['Browser', 'Device', 'OS'], $tmpFolder = null) { $userAgent = $this->getUserAgentByCommonLib(); $devDetectClass = new \DeviceDetector\DeviceDetector($userAgent); if (is_null($tmpFolder)) { $tmpFolder = '../../tmp/Doctrin...
php
public function getClientBrowserDetails($returnType = ['Browser', 'Device', 'OS'], $tmpFolder = null) { $userAgent = $this->getUserAgentByCommonLib(); $devDetectClass = new \DeviceDetector\DeviceDetector($userAgent); if (is_null($tmpFolder)) { $tmpFolder = '../../tmp/Doctrin...
[ "public", "function", "getClientBrowserDetails", "(", "$", "returnType", "=", "[", "'Browser'", ",", "'Device'", ",", "'OS'", "]", ",", "$", "tmpFolder", "=", "null", ")", "{", "$", "userAgent", "=", "$", "this", "->", "getUserAgentByCommonLib", "(", ")", ...
Provides various details about browser based on user agent @param array $returnType @return array
[ "Provides", "various", "details", "about", "browser", "based", "on", "user", "agent" ]
5e4b2c01793ee47ce517be2c799d64abe78d7f8a
https://github.com/danielgp/browser-agent-info/blob/5e4b2c01793ee47ce517be2c799d64abe78d7f8a/source/BrowserAgentInfosByDanielGP.php#L127-L143
201,566
danielgp/browser-agent-info
source/BrowserAgentInfosByDanielGP.php
BrowserAgentInfosByDanielGP.getClientBrowserDevice
private function getClientBrowserDevice(\DeviceDetector\DeviceDetector $deviceDetectorClass) { $this->autoPopulateSuperGlobals(); $clientIp = $this->brServerGlobals->getClientIp(); return [ 'brand' => $deviceDetectorClass->getDeviceName(), 'ip' => $clientIp...
php
private function getClientBrowserDevice(\DeviceDetector\DeviceDetector $deviceDetectorClass) { $this->autoPopulateSuperGlobals(); $clientIp = $this->brServerGlobals->getClientIp(); return [ 'brand' => $deviceDetectorClass->getDeviceName(), 'ip' => $clientIp...
[ "private", "function", "getClientBrowserDevice", "(", "\\", "DeviceDetector", "\\", "DeviceDetector", "$", "deviceDetectorClass", ")", "{", "$", "this", "->", "autoPopulateSuperGlobals", "(", ")", ";", "$", "clientIp", "=", "$", "this", "->", "brServerGlobals", "-...
Returns client device details from client browser @param class $deviceDetectorClass @return array
[ "Returns", "client", "device", "details", "from", "client", "browser" ]
5e4b2c01793ee47ce517be2c799d64abe78d7f8a
https://github.com/danielgp/browser-agent-info/blob/5e4b2c01793ee47ce517be2c799d64abe78d7f8a/source/BrowserAgentInfosByDanielGP.php#L175-L188
201,567
danielgp/browser-agent-info
source/BrowserAgentInfosByDanielGP.php
BrowserAgentInfosByDanielGP.getClientBrowserOperatingSystem
private function getClientBrowserOperatingSystem(\DeviceDetector\DeviceDetector $deviceDetectorClass, $userAgent) { $aReturn = $deviceDetectorClass->getOs(); $aReturn['architecture'] = $this->getArchitectureFromUserAgent($userAgent, 'os'); $operatingSystem = new \Devi...
php
private function getClientBrowserOperatingSystem(\DeviceDetector\DeviceDetector $deviceDetectorClass, $userAgent) { $aReturn = $deviceDetectorClass->getOs(); $aReturn['architecture'] = $this->getArchitectureFromUserAgent($userAgent, 'os'); $operatingSystem = new \Devi...
[ "private", "function", "getClientBrowserOperatingSystem", "(", "\\", "DeviceDetector", "\\", "DeviceDetector", "$", "deviceDetectorClass", ",", "$", "userAgent", ")", "{", "$", "aReturn", "=", "$", "deviceDetectorClass", "->", "getOs", "(", ")", ";", "$", "aReturn...
Returns client operating system details from client browser @param class $deviceDetectorClass @param string $userAgent @return array
[ "Returns", "client", "operating", "system", "details", "from", "client", "browser" ]
5e4b2c01793ee47ce517be2c799d64abe78d7f8a
https://github.com/danielgp/browser-agent-info/blob/5e4b2c01793ee47ce517be2c799d64abe78d7f8a/source/BrowserAgentInfosByDanielGP.php#L204-L213
201,568
danielgp/browser-agent-info
source/BrowserAgentInfosByDanielGP.php
BrowserAgentInfosByDanielGP.getUserAgentByCommonLib
public function getUserAgentByCommonLib() { $this->autoPopulateSuperGlobals(); if (!is_null($this->brServerGlobals->get('ua'))) { return $this->brServerGlobals->get('ua'); } return $this->getUserAgentByCommonLibDetection(); }
php
public function getUserAgentByCommonLib() { $this->autoPopulateSuperGlobals(); if (!is_null($this->brServerGlobals->get('ua'))) { return $this->brServerGlobals->get('ua'); } return $this->getUserAgentByCommonLibDetection(); }
[ "public", "function", "getUserAgentByCommonLib", "(", ")", "{", "$", "this", "->", "autoPopulateSuperGlobals", "(", ")", ";", "if", "(", "!", "is_null", "(", "$", "this", "->", "brServerGlobals", "->", "get", "(", "'ua'", ")", ")", ")", "{", "return", "$...
Captures the user agent @return string
[ "Captures", "the", "user", "agent" ]
5e4b2c01793ee47ce517be2c799d64abe78d7f8a
https://github.com/danielgp/browser-agent-info/blob/5e4b2c01793ee47ce517be2c799d64abe78d7f8a/source/BrowserAgentInfosByDanielGP.php#L231-L238
201,569
mosbth/phpmvc-comment
src/Comment/CommentController.php
CommentController.viewAction
public function viewAction() { $comments = new \Phpmvc\Comment\CommentsInSession(); $comments->setDI($this->di); $all = $comments->findAll(); $this->views->add('comment/comments', [ 'comments' => $all, ]); }
php
public function viewAction() { $comments = new \Phpmvc\Comment\CommentsInSession(); $comments->setDI($this->di); $all = $comments->findAll(); $this->views->add('comment/comments', [ 'comments' => $all, ]); }
[ "public", "function", "viewAction", "(", ")", "{", "$", "comments", "=", "new", "\\", "Phpmvc", "\\", "Comment", "\\", "CommentsInSession", "(", ")", ";", "$", "comments", "->", "setDI", "(", "$", "this", "->", "di", ")", ";", "$", "all", "=", "$", ...
View all comments. @return void
[ "View", "all", "comments", "." ]
ea5c43e8bb3f723d6fb69c892500d26c7390eb37
https://github.com/mosbth/phpmvc-comment/blob/ea5c43e8bb3f723d6fb69c892500d26c7390eb37/src/Comment/CommentController.php#L20-L30
201,570
mosbth/phpmvc-comment
src/Comment/CommentController.php
CommentController.removeAllAction
public function removeAllAction() { $isPosted = $this->request->getPost('doRemoveAll'); if (!$isPosted) { $this->response->redirect($this->request->getPost('redirect')); } $comments = new \Phpmvc\Comment\CommentsInSession(); $comments->setDI($this->di); ...
php
public function removeAllAction() { $isPosted = $this->request->getPost('doRemoveAll'); if (!$isPosted) { $this->response->redirect($this->request->getPost('redirect')); } $comments = new \Phpmvc\Comment\CommentsInSession(); $comments->setDI($this->di); ...
[ "public", "function", "removeAllAction", "(", ")", "{", "$", "isPosted", "=", "$", "this", "->", "request", "->", "getPost", "(", "'doRemoveAll'", ")", ";", "if", "(", "!", "$", "isPosted", ")", "{", "$", "this", "->", "response", "->", "redirect", "("...
Remove all comments. @return void
[ "Remove", "all", "comments", "." ]
ea5c43e8bb3f723d6fb69c892500d26c7390eb37
https://github.com/mosbth/phpmvc-comment/blob/ea5c43e8bb3f723d6fb69c892500d26c7390eb37/src/Comment/CommentController.php#L71-L85
201,571
PenoaksDev/Milky-Framework
src/Milky/Http/Routing/UrlGenerator.php
UrlGenerator.addQueryString
protected function addQueryString( $uri, array $parameters ) { // If the URI has a fragment, we will move it to the end of this URI since it will // need to come after any query string that may be added to the URL else it is // not going to be available. We will remove it then append it back on here. if ( !is_...
php
protected function addQueryString( $uri, array $parameters ) { // If the URI has a fragment, we will move it to the end of this URI since it will // need to come after any query string that may be added to the URL else it is // not going to be available. We will remove it then append it back on here. if ( !is_...
[ "protected", "function", "addQueryString", "(", "$", "uri", ",", "array", "$", "parameters", ")", "{", "// If the URI has a fragment, we will move it to the end of this URI since it will", "// need to come after any query string that may be added to the URL else it is", "// not going to ...
Add a query string to the URI. @param string $uri @param array $parameters @return mixed|string
[ "Add", "a", "query", "string", "to", "the", "URI", "." ]
8afd7156610a70371aa5b1df50b8a212bf7b142c
https://github.com/PenoaksDev/Milky-Framework/blob/8afd7156610a70371aa5b1df50b8a212bf7b142c/src/Milky/Http/Routing/UrlGenerator.php#L435-L448
201,572
PenoaksDev/Milky-Framework
src/Milky/Http/Routing/UrlGenerator.php
UrlGenerator.getRouteScheme
protected function getRouteScheme( $route ) { if ( $route->httpOnly() ) { return $this->getScheme( false ); } elseif ( $route->httpsOnly() ) { return $this->getScheme( true ); } return $this->getScheme( null ); }
php
protected function getRouteScheme( $route ) { if ( $route->httpOnly() ) { return $this->getScheme( false ); } elseif ( $route->httpsOnly() ) { return $this->getScheme( true ); } return $this->getScheme( null ); }
[ "protected", "function", "getRouteScheme", "(", "$", "route", ")", "{", "if", "(", "$", "route", "->", "httpOnly", "(", ")", ")", "{", "return", "$", "this", "->", "getScheme", "(", "false", ")", ";", "}", "elseif", "(", "$", "route", "->", "httpsOnl...
Get the scheme for the given route. @param Route $route @return string
[ "Get", "the", "scheme", "for", "the", "given", "route", "." ]
8afd7156610a70371aa5b1df50b8a212bf7b142c
https://github.com/PenoaksDev/Milky-Framework/blob/8afd7156610a70371aa5b1df50b8a212bf7b142c/src/Milky/Http/Routing/UrlGenerator.php#L608-L620
201,573
PenoaksDev/Milky-Framework
src/Milky/Http/Routing/UrlGenerator.php
UrlGenerator.isValidUrl
public function isValidUrl( $path ) { if ( Str::startsWith( $path, ['#', '//', 'mailto:', 'tel:', 'http://', 'https://'] ) ) return true; return filter_var( $path, FILTER_VALIDATE_URL ) !== false; }
php
public function isValidUrl( $path ) { if ( Str::startsWith( $path, ['#', '//', 'mailto:', 'tel:', 'http://', 'https://'] ) ) return true; return filter_var( $path, FILTER_VALIDATE_URL ) !== false; }
[ "public", "function", "isValidUrl", "(", "$", "path", ")", "{", "if", "(", "Str", "::", "startsWith", "(", "$", "path", ",", "[", "'#'", ",", "'//'", ",", "'mailto:'", ",", "'tel:'", ",", "'http://'", ",", "'https://'", "]", ")", ")", "return", "true...
Determine if the given path is a valid URL. @param string $path @return bool
[ "Determine", "if", "the", "given", "path", "is", "a", "valid", "URL", "." ]
8afd7156610a70371aa5b1df50b8a212bf7b142c
https://github.com/PenoaksDev/Milky-Framework/blob/8afd7156610a70371aa5b1df50b8a212bf7b142c/src/Milky/Http/Routing/UrlGenerator.php#L693-L699
201,574
xelax90/learning-context-client
src/LearningContextClient/ContextData.php
ContextData.genNonce
protected function genNonce() { $chars = '1234567890abcdefghijklmnopqrstuvwxyz'; $rnd_string = ''; $num_chars = strlen($chars); $size = mt_rand(41, 59); for($i=0; $i<$size; $i++) { $rnd_string .= $chars[mt_rand(0, $num_chars - 1)]; } return $rnd_string; }
php
protected function genNonce() { $chars = '1234567890abcdefghijklmnopqrstuvwxyz'; $rnd_string = ''; $num_chars = strlen($chars); $size = mt_rand(41, 59); for($i=0; $i<$size; $i++) { $rnd_string .= $chars[mt_rand(0, $num_chars - 1)]; } return $rnd_string; }
[ "protected", "function", "genNonce", "(", ")", "{", "$", "chars", "=", "'1234567890abcdefghijklmnopqrstuvwxyz'", ";", "$", "rnd_string", "=", "''", ";", "$", "num_chars", "=", "strlen", "(", "$", "chars", ")", ";", "$", "size", "=", "mt_rand", "(", "41", ...
Generating a random string which will be used as nonce @return string
[ "Generating", "a", "random", "string", "which", "will", "be", "used", "as", "nonce" ]
f167584eaa3dcfd6f1a48497fcc9c4b98411c601
https://github.com/xelax90/learning-context-client/blob/f167584eaa3dcfd6f1a48497fcc9c4b98411c601/src/LearningContextClient/ContextData.php#L49-L58
201,575
xelax90/learning-context-client
src/LearningContextClient/ContextData.php
ContextData.genHash
protected function genHash($data, $nonce) { $token = $this->getConfig()->getStorage()->getAccessToken()->getAccessToken(); return sha1(urlencode($data) . $this->getConfig()->getAppId() . urlencode(sha1($token)) . urlencode($nonce) . $this->getConfig()->getAppSecret() . $token); }
php
protected function genHash($data, $nonce) { $token = $this->getConfig()->getStorage()->getAccessToken()->getAccessToken(); return sha1(urlencode($data) . $this->getConfig()->getAppId() . urlencode(sha1($token)) . urlencode($nonce) . $this->getConfig()->getAppSecret() . $token); }
[ "protected", "function", "genHash", "(", "$", "data", ",", "$", "nonce", ")", "{", "$", "token", "=", "$", "this", "->", "getConfig", "(", ")", "->", "getStorage", "(", ")", "->", "getAccessToken", "(", ")", "->", "getAccessToken", "(", ")", ";", "re...
Generating the required hash value from the data, nonce and the other information that is nearly static @param string $data @param string $nonce @return string
[ "Generating", "the", "required", "hash", "value", "from", "the", "data", "nonce", "and", "the", "other", "information", "that", "is", "nearly", "static" ]
f167584eaa3dcfd6f1a48497fcc9c4b98411c601
https://github.com/xelax90/learning-context-client/blob/f167584eaa3dcfd6f1a48497fcc9c4b98411c601/src/LearningContextClient/ContextData.php#L66-L69
201,576
smalldb/smalldb-rest
class/Router.php
Router.handle
public function handle($server, $get, $post) { $smalldb = null; // Convert current path to array and to string (result: $path is array, $path_str is string) $path = trim(isset($server['PATH_INFO']) ? $server['PATH_INFO'] : '', '/'); $path = ($path == '' ? array() : explode('/', $path)); // Get '!action' ...
php
public function handle($server, $get, $post) { $smalldb = null; // Convert current path to array and to string (result: $path is array, $path_str is string) $path = trim(isset($server['PATH_INFO']) ? $server['PATH_INFO'] : '', '/'); $path = ($path == '' ? array() : explode('/', $path)); // Get '!action' ...
[ "public", "function", "handle", "(", "$", "server", ",", "$", "get", ",", "$", "post", ")", "{", "$", "smalldb", "=", "null", ";", "// Convert current path to array and to string (result: $path is array, $path_str is string)", "$", "path", "=", "trim", "(", "isset",...
Interpret the HTTP request
[ "Interpret", "the", "HTTP", "request" ]
ff393ee39060b4524d41835921e86ed40af006fe
https://github.com/smalldb/smalldb-rest/blob/ff393ee39060b4524d41835921e86ed40af006fe/class/Router.php#L42-L89
201,577
BapCat/Remodel
src/GrammarWrapper.php
GrammarWrapper.compileSelect
public function compileSelect(Builder $query) { $this->beforeGet($query); return $this->grammar->compileSelect($query); }
php
public function compileSelect(Builder $query) { $this->beforeGet($query); return $this->grammar->compileSelect($query); }
[ "public", "function", "compileSelect", "(", "Builder", "$", "query", ")", "{", "$", "this", "->", "beforeGet", "(", "$", "query", ")", ";", "return", "$", "this", "->", "grammar", "->", "compileSelect", "(", "$", "query", ")", ";", "}" ]
Compile a select query into SQL @param Builder $query @return string
[ "Compile", "a", "select", "query", "into", "SQL" ]
80fcdec8bca22b88c5af9a0a93622c796cf3e7b1
https://github.com/BapCat/Remodel/blob/80fcdec8bca22b88c5af9a0a93622c796cf3e7b1/src/GrammarWrapper.php#L64-L67
201,578
BapCat/Remodel
src/GrammarWrapper.php
GrammarWrapper.compileInsert
public function compileInsert(Builder $query, array $values) { foreach($values as &$row) { $this->beforePut($row); } unset($row); $this->remapWheres($query); $sql = $this->grammar->compileInsert($query, $values); if($this->replace_into) { $sql = preg_replace('/^insert into/i', 're...
php
public function compileInsert(Builder $query, array $values) { foreach($values as &$row) { $this->beforePut($row); } unset($row); $this->remapWheres($query); $sql = $this->grammar->compileInsert($query, $values); if($this->replace_into) { $sql = preg_replace('/^insert into/i', 're...
[ "public", "function", "compileInsert", "(", "Builder", "$", "query", ",", "array", "$", "values", ")", "{", "foreach", "(", "$", "values", "as", "&", "$", "row", ")", "{", "$", "this", "->", "beforePut", "(", "$", "row", ")", ";", "}", "unset", "("...
Compile an insert statement into SQL @param Builder $query @param mixed[] $values @return string
[ "Compile", "an", "insert", "statement", "into", "SQL" ]
80fcdec8bca22b88c5af9a0a93622c796cf3e7b1
https://github.com/BapCat/Remodel/blob/80fcdec8bca22b88c5af9a0a93622c796cf3e7b1/src/GrammarWrapper.php#L88-L104
201,579
BapCat/Remodel
src/GrammarWrapper.php
GrammarWrapper.compileInsertGetId
public function compileInsertGetId(Builder $query, $values, $sequence) { $this->beforePut($values); $this->remapWheres($query); $sql = $this->grammar->compileInsertGetId($query, $values, $sequence); if($this->replace_into) { $sql = preg_replace('/^insert into/i', 'replace into', $sql); $thi...
php
public function compileInsertGetId(Builder $query, $values, $sequence) { $this->beforePut($values); $this->remapWheres($query); $sql = $this->grammar->compileInsertGetId($query, $values, $sequence); if($this->replace_into) { $sql = preg_replace('/^insert into/i', 'replace into', $sql); $thi...
[ "public", "function", "compileInsertGetId", "(", "Builder", "$", "query", ",", "$", "values", ",", "$", "sequence", ")", "{", "$", "this", "->", "beforePut", "(", "$", "values", ")", ";", "$", "this", "->", "remapWheres", "(", "$", "query", ")", ";", ...
Compile an insert and get ID statement into SQL @param Builder $query @param mixed[] $values @param string $sequence @return string
[ "Compile", "an", "insert", "and", "get", "ID", "statement", "into", "SQL" ]
80fcdec8bca22b88c5af9a0a93622c796cf3e7b1
https://github.com/BapCat/Remodel/blob/80fcdec8bca22b88c5af9a0a93622c796cf3e7b1/src/GrammarWrapper.php#L115-L126
201,580
BapCat/Remodel
src/GrammarWrapper.php
GrammarWrapper.compileUpdate
public function compileUpdate(Builder $query, $values) { $this->beforePut($values); $this->remapWheres($query); return $this->grammar->compileUpdate($query, $values); }
php
public function compileUpdate(Builder $query, $values) { $this->beforePut($values); $this->remapWheres($query); return $this->grammar->compileUpdate($query, $values); }
[ "public", "function", "compileUpdate", "(", "Builder", "$", "query", ",", "$", "values", ")", "{", "$", "this", "->", "beforePut", "(", "$", "values", ")", ";", "$", "this", "->", "remapWheres", "(", "$", "query", ")", ";", "return", "$", "this", "->...
Compile an update statement into SQL @param Builder $query @param array $values @return string
[ "Compile", "an", "update", "statement", "into", "SQL" ]
80fcdec8bca22b88c5af9a0a93622c796cf3e7b1
https://github.com/BapCat/Remodel/blob/80fcdec8bca22b88c5af9a0a93622c796cf3e7b1/src/GrammarWrapper.php#L136-L140
201,581
BapCat/Remodel
src/GrammarWrapper.php
GrammarWrapper.compileDelete
public function compileDelete(Builder $query) { $this->remapWheres($query); return $this->grammar->compileDelete($query); }
php
public function compileDelete(Builder $query) { $this->remapWheres($query); return $this->grammar->compileDelete($query); }
[ "public", "function", "compileDelete", "(", "Builder", "$", "query", ")", "{", "$", "this", "->", "remapWheres", "(", "$", "query", ")", ";", "return", "$", "this", "->", "grammar", "->", "compileDelete", "(", "$", "query", ")", ";", "}" ]
Compile a delete statement into SQL @param Builder $query @return string
[ "Compile", "a", "delete", "statement", "into", "SQL" ]
80fcdec8bca22b88c5af9a0a93622c796cf3e7b1
https://github.com/BapCat/Remodel/blob/80fcdec8bca22b88c5af9a0a93622c796cf3e7b1/src/GrammarWrapper.php#L149-L152
201,582
Torann/skosh-generator
src/Console/Application.php
Application.registerEvents
private function registerEvents() { foreach ($this->getSetting('events', []) as $event => $listeners) { foreach ($listeners as $listener) { Event::bind($event, $listener); } } }
php
private function registerEvents() { foreach ($this->getSetting('events', []) as $event => $listeners) { foreach ($listeners as $listener) { Event::bind($event, $listener); } } }
[ "private", "function", "registerEvents", "(", ")", "{", "foreach", "(", "$", "this", "->", "getSetting", "(", "'events'", ",", "[", "]", ")", "as", "$", "event", "=>", "$", "listeners", ")", "{", "foreach", "(", "$", "listeners", "as", "$", "listener",...
Register custom events.
[ "Register", "custom", "events", "." ]
ea60e037d92398d7c146eb2349735d5692e3c48c
https://github.com/Torann/skosh-generator/blob/ea60e037d92398d7c146eb2349735d5692e3c48c/src/Console/Application.php#L87-L94
201,583
mossphp/moss-storage
Moss/Storage/Query/AbstractQuery.php
AbstractQuery.resetBinds
protected function resetBinds($prefix = null) { if ($prefix === null) { $this->builder->setParameters([]); return; } $params = (array) $this->builder->getParameters(); $types = (array) $this->builder->getParameterTypes(); foreach (array_keys($params...
php
protected function resetBinds($prefix = null) { if ($prefix === null) { $this->builder->setParameters([]); return; } $params = (array) $this->builder->getParameters(); $types = (array) $this->builder->getParameterTypes(); foreach (array_keys($params...
[ "protected", "function", "resetBinds", "(", "$", "prefix", "=", "null", ")", "{", "if", "(", "$", "prefix", "===", "null", ")", "{", "$", "this", "->", "builder", "->", "setParameters", "(", "[", "]", ")", ";", "return", ";", "}", "$", "params", "=...
Removes bound values by their prefix If prefix is null - clears all bound values @param null|string $prefix
[ "Removes", "bound", "values", "by", "their", "prefix", "If", "prefix", "is", "null", "-", "clears", "all", "bound", "values" ]
0d123e7ae6bbfce1e2a18e73bf70997277b430c1
https://github.com/mossphp/moss-storage/blob/0d123e7ae6bbfce1e2a18e73bf70997277b430c1/Moss/Storage/Query/AbstractQuery.php#L127-L145
201,584
PenoaksDev/Milky-Framework
src/Milky/Database/Schema/Blueprint.php
Blueprint.addFluentIndexes
protected function addFluentIndexes() { foreach ( $this->columns as $column ) { foreach ( ['primary', 'unique', 'index'] as $index ) { // If the index has been specified on the given column, but is simply // equal to "true" (boolean), no name has been specified for this // index, so we will simpl...
php
protected function addFluentIndexes() { foreach ( $this->columns as $column ) { foreach ( ['primary', 'unique', 'index'] as $index ) { // If the index has been specified on the given column, but is simply // equal to "true" (boolean), no name has been specified for this // index, so we will simpl...
[ "protected", "function", "addFluentIndexes", "(", ")", "{", "foreach", "(", "$", "this", "->", "columns", "as", "$", "column", ")", "{", "foreach", "(", "[", "'primary'", ",", "'unique'", ",", "'index'", "]", "as", "$", "index", ")", "{", "// If the inde...
Add the index commands fluently specified on columns. @return void
[ "Add", "the", "index", "commands", "fluently", "specified", "on", "columns", "." ]
8afd7156610a70371aa5b1df50b8a212bf7b142c
https://github.com/PenoaksDev/Milky-Framework/blob/8afd7156610a70371aa5b1df50b8a212bf7b142c/src/Milky/Database/Schema/Blueprint.php#L144-L171
201,585
DreadLabs/VantomasWebsite
src/CodeSnippet/SyntaxHighlighterBrush.php
SyntaxHighlighterBrush.fromIdentifierOrAlias
public static function fromIdentifierOrAlias($identifierOrAlias) { $alias = $identifierOrAlias; $identifier = 'Plain'; if (isset(self::$aliasToIdentifierMap[$identifierOrAlias])) { $identifier = self::$aliasToIdentifierMap[$identifierOrAlias]; } return new stati...
php
public static function fromIdentifierOrAlias($identifierOrAlias) { $alias = $identifierOrAlias; $identifier = 'Plain'; if (isset(self::$aliasToIdentifierMap[$identifierOrAlias])) { $identifier = self::$aliasToIdentifierMap[$identifierOrAlias]; } return new stati...
[ "public", "static", "function", "fromIdentifierOrAlias", "(", "$", "identifierOrAlias", ")", "{", "$", "alias", "=", "$", "identifierOrAlias", ";", "$", "identifier", "=", "'Plain'", ";", "if", "(", "isset", "(", "self", "::", "$", "aliasToIdentifierMap", "[",...
Instantiates the brush by identifier or alias. @param string $identifierOrAlias @return BrushInterface
[ "Instantiates", "the", "brush", "by", "identifier", "or", "alias", "." ]
7f85f2b45bdf5ed9fa9d320c805c416bf99cd668
https://github.com/DreadLabs/VantomasWebsite/blob/7f85f2b45bdf5ed9fa9d320c805c416bf99cd668/src/CodeSnippet/SyntaxHighlighterBrush.php#L74-L84
201,586
nails/module-blog
admin/controllers/Settings.php
Settings.permissions
public static function permissions(): array { $permissions = parent::permissions(); // Fetch the blogs, each blog should have its own permission $ci =& get_instance(); $ci->load->model('blog/blog_model'); $blogs = $ci->blog_model->getAll(); $out = array(); ...
php
public static function permissions(): array { $permissions = parent::permissions(); // Fetch the blogs, each blog should have its own permission $ci =& get_instance(); $ci->load->model('blog/blog_model'); $blogs = $ci->blog_model->getAll(); $out = array(); ...
[ "public", "static", "function", "permissions", "(", ")", ":", "array", "{", "$", "permissions", "=", "parent", "::", "permissions", "(", ")", ";", "// Fetch the blogs, each blog should have its own permission", "$", "ci", "=", "&", "get_instance", "(", ")", ";", ...
Returns an array of permissions which can be configured for the user @return array
[ "Returns", "an", "array", "of", "permissions", "which", "can", "be", "configured", "for", "the", "user" ]
7b369c5209f4343fff7c7e2a22c237d5a95c8c24
https://github.com/nails/module-blog/blob/7b369c5209f4343fff7c7e2a22c237d5a95c8c24/admin/controllers/Settings.php#L52-L70
201,587
porkchopsandwiches/doctrine-utilities
lib/src/PorkChopSandwiches/Doctrine/Utilities/EntityManager/Generator.php
Generator.manufacture
static public function manufacture ($conn, Cache $cache_driver, Reader $annotation_reader, array $entity_paths, $autogenerate_strategy = false, $ensure_production_settings = false, $doctrine_annotations_file_path = self::DOCTRINE_ANNOTATIONS_FILE_PATH, $proxy_namespace = "Doctrine\\Proxies", $proxy_dir = "/lib/src/Doct...
php
static public function manufacture ($conn, Cache $cache_driver, Reader $annotation_reader, array $entity_paths, $autogenerate_strategy = false, $ensure_production_settings = false, $doctrine_annotations_file_path = self::DOCTRINE_ANNOTATIONS_FILE_PATH, $proxy_namespace = "Doctrine\\Proxies", $proxy_dir = "/lib/src/Doct...
[ "static", "public", "function", "manufacture", "(", "$", "conn", ",", "Cache", "$", "cache_driver", ",", "Reader", "$", "annotation_reader", ",", "array", "$", "entity_paths", ",", "$", "autogenerate_strategy", "=", "false", ",", "$", "ensure_production_settings",...
Manufactures an EntityManager instance using the passed configuration. @param array|Connection $conn @param Cache $cache_driver @param Reader $annotation_reader @param array $entity_paths @param boolean [$autogenerate_strategy] @param boolean [$ensure_production_settings] @param string [$doctrine_...
[ "Manufactures", "an", "EntityManager", "instance", "using", "the", "passed", "configuration", "." ]
cc5e4268bac36c68af62d69d9512a0dd01ee310f
https://github.com/porkchopsandwiches/doctrine-utilities/blob/cc5e4268bac36c68af62d69d9512a0dd01ee310f/lib/src/PorkChopSandwiches/Doctrine/Utilities/EntityManager/Generator.php#L45-L93
201,588
azhai/code-refactor
src/CodeRefactor/CodeBlock.php
CodeBlock.insertStmts
public function insertStmts(array $stmts, $offset = 0, $remove = 0) { if (false === $offset) { $offset = count($this->stmts); } elseif (false === $remove) { $remove = count($this->stmts); } array_splice($this->stmts, $offset, $remove, $stmts); return $...
php
public function insertStmts(array $stmts, $offset = 0, $remove = 0) { if (false === $offset) { $offset = count($this->stmts); } elseif (false === $remove) { $remove = count($this->stmts); } array_splice($this->stmts, $offset, $remove, $stmts); return $...
[ "public", "function", "insertStmts", "(", "array", "$", "stmts", ",", "$", "offset", "=", "0", ",", "$", "remove", "=", "0", ")", "{", "if", "(", "false", "===", "$", "offset", ")", "{", "$", "offset", "=", "count", "(", "$", "this", "->", "stmts...
Insert or replace some statements.
[ "Insert", "or", "replace", "some", "statements", "." ]
cddb437d72f8239957daeba8211dda5e9366d6ca
https://github.com/azhai/code-refactor/blob/cddb437d72f8239957daeba8211dda5e9366d6ca/src/CodeRefactor/CodeBlock.php#L42-L51
201,589
bseddon/XPath20
XPath2NodeIterator/XPath2NodeIteratorDebugView.php
XPath2NodeIteratorDebugView.getItems
public function getItems() { /** * @var array $res */ $res = array(); foreach ( $this->iter as /** @var XPathItem $item */ $item ) { if ( count( $res ) == 10) break; $res[] = $item->CloneInstance(); } return $res; }
php
public function getItems() { /** * @var array $res */ $res = array(); foreach ( $this->iter as /** @var XPathItem $item */ $item ) { if ( count( $res ) == 10) break; $res[] = $item->CloneInstance(); } return $res; }
[ "public", "function", "getItems", "(", ")", "{", "/**\r\n\t\t * @var array $res\r\n\t\t */", "$", "res", "=", "array", "(", ")", ";", "foreach", "(", "$", "this", "->", "iter", "as", "/** @var XPathItem $item */", "$", "item", ")", "{", "if", "(", "count", "...
Return the first 10 items of the iterator @var XPathItem[] $Items
[ "Return", "the", "first", "10", "items", "of", "the", "iterator" ]
69882b6efffaa5470a819d5fdd2f6473ddeb046d
https://github.com/bseddon/XPath20/blob/69882b6efffaa5470a819d5fdd2f6473ddeb046d/XPath2NodeIterator/XPath2NodeIteratorDebugView.php#L60-L75
201,590
CroudTech/laravel-repositories
src/BaseRepository.php
BaseRepository.findBy
public function findBy($field, $value) { $model_class = $this->getModelName(); return $model_class::where($field, $value)->first(); }
php
public function findBy($field, $value) { $model_class = $this->getModelName(); return $model_class::where($field, $value)->first(); }
[ "public", "function", "findBy", "(", "$", "field", ",", "$", "value", ")", "{", "$", "model_class", "=", "$", "this", "->", "getModelName", "(", ")", ";", "return", "$", "model_class", "::", "where", "(", "$", "field", ",", "$", "value", ")", "->", ...
Find a record by a custom field @method findBy @param string $field The field to search by @param mixed $value The field value @return Model | null
[ "Find", "a", "record", "by", "a", "custom", "field" ]
3146285be911728fe7b00cf27d2494ad22b773dc
https://github.com/CroudTech/laravel-repositories/blob/3146285be911728fe7b00cf27d2494ad22b773dc/src/BaseRepository.php#L115-L119
201,591
CroudTech/laravel-repositories
src/BaseRepository.php
BaseRepository.create
public function create(array $data) : Model { $model_class = $this->getModelName(); return $this->postCreate($data, $model_class::create($this->preCreate($this->parseData($data)))); }
php
public function create(array $data) : Model { $model_class = $this->getModelName(); return $this->postCreate($data, $model_class::create($this->preCreate($this->parseData($data)))); }
[ "public", "function", "create", "(", "array", "$", "data", ")", ":", "Model", "{", "$", "model_class", "=", "$", "this", "->", "getModelName", "(", ")", ";", "return", "$", "this", "->", "postCreate", "(", "$", "data", ",", "$", "model_class", "::", ...
Create and return the model object @method create @param array $data array @return Model
[ "Create", "and", "return", "the", "model", "object" ]
3146285be911728fe7b00cf27d2494ad22b773dc
https://github.com/CroudTech/laravel-repositories/blob/3146285be911728fe7b00cf27d2494ad22b773dc/src/BaseRepository.php#L128-L132
201,592
CroudTech/laravel-repositories
src/BaseRepository.php
BaseRepository.delete
public function delete($id) { if ($record = $this->find($id)) { if ($this->preDelete($id, $record)) { return $this->postDelete($id, $record->delete(), $record); } } else { $this->throwModelNotFoundException($id); } }
php
public function delete($id) { if ($record = $this->find($id)) { if ($this->preDelete($id, $record)) { return $this->postDelete($id, $record->delete(), $record); } } else { $this->throwModelNotFoundException($id); } }
[ "public", "function", "delete", "(", "$", "id", ")", "{", "if", "(", "$", "record", "=", "$", "this", "->", "find", "(", "$", "id", ")", ")", "{", "if", "(", "$", "this", "->", "preDelete", "(", "$", "id", ",", "$", "record", ")", ")", "{", ...
Delete a record by ID @method delete @param integer $id The ID of the record @return boolean
[ "Delete", "a", "record", "by", "ID" ]
3146285be911728fe7b00cf27d2494ad22b773dc
https://github.com/CroudTech/laravel-repositories/blob/3146285be911728fe7b00cf27d2494ad22b773dc/src/BaseRepository.php#L208-L217
201,593
CroudTech/laravel-repositories
src/BaseRepository.php
BaseRepository.parseData
public function parseData(array $data) : array { if ($this->getTransformer() instanceof RequestTransformerContract) { return $this->getTransformer()->transformRequestData($data); } return $data; }
php
public function parseData(array $data) : array { if ($this->getTransformer() instanceof RequestTransformerContract) { return $this->getTransformer()->transformRequestData($data); } return $data; }
[ "public", "function", "parseData", "(", "array", "$", "data", ")", ":", "array", "{", "if", "(", "$", "this", "->", "getTransformer", "(", ")", "instanceof", "RequestTransformerContract", ")", "{", "return", "$", "this", "->", "getTransformer", "(", ")", "...
Parse the data using the 'request' method of the transformer if it exists @method parseData @param array $data The data to parse @return array The parsed data
[ "Parse", "the", "data", "using", "the", "request", "method", "of", "the", "transformer", "if", "it", "exists" ]
3146285be911728fe7b00cf27d2494ad22b773dc
https://github.com/CroudTech/laravel-repositories/blob/3146285be911728fe7b00cf27d2494ad22b773dc/src/BaseRepository.php#L290-L297
201,594
CroudTech/laravel-repositories
src/BaseRepository.php
BaseRepository.transformItem
public function transformItem(Model $item, $includes = [], TransformerContract $transformer = null) { $this->fractal_manager->parseIncludes($includes); $transformer = is_null($transformer) ? $this->getTransformer() : $transformer; $resource = new Item($item, $transformer, $this->getModelName...
php
public function transformItem(Model $item, $includes = [], TransformerContract $transformer = null) { $this->fractal_manager->parseIncludes($includes); $transformer = is_null($transformer) ? $this->getTransformer() : $transformer; $resource = new Item($item, $transformer, $this->getModelName...
[ "public", "function", "transformItem", "(", "Model", "$", "item", ",", "$", "includes", "=", "[", "]", ",", "TransformerContract", "$", "transformer", "=", "null", ")", "{", "$", "this", "->", "fractal_manager", "->", "parseIncludes", "(", "$", "includes", ...
Pass a model through the transformer @method transformItem @param Model $item The model to transform @param array $includes Any transformer includes to use @param TransformerContract $transformer Override the transformer @return array
[ "Pass", "a", "model", "through", "the", "transformer" ]
3146285be911728fe7b00cf27d2494ad22b773dc
https://github.com/CroudTech/laravel-repositories/blob/3146285be911728fe7b00cf27d2494ad22b773dc/src/BaseRepository.php#L340-L346
201,595
CroudTech/laravel-repositories
src/BaseRepository.php
BaseRepository.newQuery
public function newQuery() : QueryBuilder { $model = $this->container->make($this->getModelName()); if (!$model instanceof Model) { throw new RepositoryException("Class {$this->model()} must be an instance of " . Model::class); } return $model->newQuery(); }
php
public function newQuery() : QueryBuilder { $model = $this->container->make($this->getModelName()); if (!$model instanceof Model) { throw new RepositoryException("Class {$this->model()} must be an instance of " . Model::class); } return $model->newQuery(); }
[ "public", "function", "newQuery", "(", ")", ":", "QueryBuilder", "{", "$", "model", "=", "$", "this", "->", "container", "->", "make", "(", "$", "this", "->", "getModelName", "(", ")", ")", ";", "if", "(", "!", "$", "model", "instanceof", "Model", ")...
Create a new query instance @method newQuery @return QueryBuilder [description]
[ "Create", "a", "new", "query", "instance" ]
3146285be911728fe7b00cf27d2494ad22b773dc
https://github.com/CroudTech/laravel-repositories/blob/3146285be911728fe7b00cf27d2494ad22b773dc/src/BaseRepository.php#L387-L396
201,596
CroudTech/laravel-repositories
src/BaseRepository.php
BaseRepository.throwModelNotFoundException
protected function throwModelNotFoundException($id) { throw new ModelNotFoundException('Model not found for ID ' . $id . ' on table ' . $this->container->make($this->getModelName())->getTable()); }
php
protected function throwModelNotFoundException($id) { throw new ModelNotFoundException('Model not found for ID ' . $id . ' on table ' . $this->container->make($this->getModelName())->getTable()); }
[ "protected", "function", "throwModelNotFoundException", "(", "$", "id", ")", "{", "throw", "new", "ModelNotFoundException", "(", "'Model not found for ID '", ".", "$", "id", ".", "' on table '", ".", "$", "this", "->", "container", "->", "make", "(", "$", "this"...
Throw an exception when a model is not found @method throwModelNotFoundException @param integer $id
[ "Throw", "an", "exception", "when", "a", "model", "is", "not", "found" ]
3146285be911728fe7b00cf27d2494ad22b773dc
https://github.com/CroudTech/laravel-repositories/blob/3146285be911728fe7b00cf27d2494ad22b773dc/src/BaseRepository.php#L404-L407
201,597
MindyPHP/OrmNestedSet
TreeQuerySet.php
TreeQuerySet.parent
public function parent() { return $this->filter([ 'lft__lt' => $this->getModel()->lft, 'rgt__gt' => $this->getModel()->rgt, 'level' => $this->getModel()->level - 1, 'root' => $this->getModel()->root, ]); }
php
public function parent() { return $this->filter([ 'lft__lt' => $this->getModel()->lft, 'rgt__gt' => $this->getModel()->rgt, 'level' => $this->getModel()->level - 1, 'root' => $this->getModel()->root, ]); }
[ "public", "function", "parent", "(", ")", "{", "return", "$", "this", "->", "filter", "(", "[", "'lft__lt'", "=>", "$", "this", "->", "getModel", "(", ")", "->", "lft", ",", "'rgt__gt'", "=>", "$", "this", "->", "getModel", "(", ")", "->", "rgt", "...
Named scope. Gets parent of node. @return QuerySet
[ "Named", "scope", ".", "Gets", "parent", "of", "node", "." ]
8231c55f9b95314789983c0b0ec83a9eb70adf79
https://github.com/MindyPHP/OrmNestedSet/blob/8231c55f9b95314789983c0b0ec83a9eb70adf79/TreeQuerySet.php#L125-L133
201,598
MindyPHP/OrmNestedSet
TreeQuerySet.php
TreeQuerySet.rebuildLftRgt
protected function rebuildLftRgt(string $table) { $builder = QueryBuilderFactory::getQueryBuilder($this->getConnection()); $subQuerySql = (clone $builder) ->clear() ->select('tt.parent_id') ->table($table, 'tt') ->where('tt.parent_id=t.id') ...
php
protected function rebuildLftRgt(string $table) { $builder = QueryBuilderFactory::getQueryBuilder($this->getConnection()); $subQuerySql = (clone $builder) ->clear() ->select('tt.parent_id') ->table($table, 'tt') ->where('tt.parent_id=t.id') ...
[ "protected", "function", "rebuildLftRgt", "(", "string", "$", "table", ")", "{", "$", "builder", "=", "QueryBuilderFactory", "::", "getQueryBuilder", "(", "$", "this", "->", "getConnection", "(", ")", ")", ";", "$", "subQuerySql", "=", "(", "clone", "$", "...
Find and delete broken branches without root, parent and with incorrect lft, rgt. sql: SELECT id, root, lft, rgt, (rgt-lft-1) AS move FROM tbl t WHERE NOT t.lft = (t.rgt-1) AND NOT id IN ( SELECT tc.parent_id FROM tbl tc WHERE tc.parent_id = t.id ) ORDER BY rgt DESC @param $table @throws \Doctrine\DBAL\DBALException...
[ "Find", "and", "delete", "broken", "branches", "without", "root", "parent", "and", "with", "incorrect", "lft", "rgt", "." ]
8231c55f9b95314789983c0b0ec83a9eb70adf79
https://github.com/MindyPHP/OrmNestedSet/blob/8231c55f9b95314789983c0b0ec83a9eb70adf79/TreeQuerySet.php#L347-L434
201,599
MindyPHP/OrmNestedSet
TreeQuerySet.php
TreeQuerySet.toHierarchy
public function toHierarchy($collection): array { // Trees mapped $trees = []; if (count($collection) > 0) { // Node Stack. Used to help building the hierarchy $stack = []; foreach ($collection as $item) { $item[$this->treeKey] = []; ...
php
public function toHierarchy($collection): array { // Trees mapped $trees = []; if (count($collection) > 0) { // Node Stack. Used to help building the hierarchy $stack = []; foreach ($collection as $item) { $item[$this->treeKey] = []; ...
[ "public", "function", "toHierarchy", "(", "$", "collection", ")", ":", "array", "{", "// Trees mapped", "$", "trees", "=", "[", "]", ";", "if", "(", "count", "(", "$", "collection", ")", ">", "0", ")", "{", "// Node Stack. Used to help building the hierarchy",...
Make hierarchy array by level. @param $collection Model[] @return array
[ "Make", "hierarchy", "array", "by", "level", "." ]
8231c55f9b95314789983c0b0ec83a9eb70adf79
https://github.com/MindyPHP/OrmNestedSet/blob/8231c55f9b95314789983c0b0ec83a9eb70adf79/TreeQuerySet.php#L505-L537