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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
9,800 | Ocelot-Framework/ocelot-mvc | src/Web/Servlet/DispatcherServlet.php | DispatcherServlet.getHandlerAdapter | protected function getHandlerAdapter($handler)
{
foreach ($this->handlerAdapters as $ha) {
if ($ha->supports($handler)) {
return $ha;
}
}
throw new \Exception("No adapter for handler [".get_class($handler)."]: The DispatcherServlet configuration needs ... | php | protected function getHandlerAdapter($handler)
{
foreach ($this->handlerAdapters as $ha) {
if ($ha->supports($handler)) {
return $ha;
}
}
throw new \Exception("No adapter for handler [".get_class($handler)."]: The DispatcherServlet configuration needs ... | [
"protected",
"function",
"getHandlerAdapter",
"(",
"$",
"handler",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"handlerAdapters",
"as",
"$",
"ha",
")",
"{",
"if",
"(",
"$",
"ha",
"->",
"supports",
"(",
"$",
"handler",
")",
")",
"{",
"return",
"$",
"... | Return the HandlerAdapter for this handler object.
@param mixed $handler the handler object to find an adapter for
@return HandlerAdapter The handler adapter for the given handler
@throws \Exception if no HandlerAdapter can be found for the handler. | [
"Return",
"the",
"HandlerAdapter",
"for",
"this",
"handler",
"object",
"."
] | 42a08208c6cebb87b363a0479331bafb7ec257c6 | https://github.com/Ocelot-Framework/ocelot-mvc/blob/42a08208c6cebb87b363a0479331bafb7ec257c6/src/Web/Servlet/DispatcherServlet.php#L382-L390 |
9,801 | Ocelot-Framework/ocelot-mvc | src/Web/Servlet/DispatcherServlet.php | DispatcherServlet.processDispatchResult | protected function processDispatchResult(Request $request, Response $response, HandlerExecutionChain $mappedHandler, ModelAndView $mv = null, \Exception $ex = null)
{
// TODO: Render Exception
if ($mv != null && !$mv->wasCleared()) {
$this->render($mv, $request, $response);
}
... | php | protected function processDispatchResult(Request $request, Response $response, HandlerExecutionChain $mappedHandler, ModelAndView $mv = null, \Exception $ex = null)
{
// TODO: Render Exception
if ($mv != null && !$mv->wasCleared()) {
$this->render($mv, $request, $response);
}
... | [
"protected",
"function",
"processDispatchResult",
"(",
"Request",
"$",
"request",
",",
"Response",
"$",
"response",
",",
"HandlerExecutionChain",
"$",
"mappedHandler",
",",
"ModelAndView",
"$",
"mv",
"=",
"null",
",",
"\\",
"Exception",
"$",
"ex",
"=",
"null",
... | Handle the result of a handler selection and handler invocation, which is
either a ModelAndView or an Exception to be resolved to a ModelAndView
@param Request $request current HTTP request
@param Response $response current HTTP response
@param HandlerExecutionChain $mappedHandler ... | [
"Handle",
"the",
"result",
"of",
"a",
"handler",
"selection",
"and",
"handler",
"invocation",
"which",
"is",
"either",
"a",
"ModelAndView",
"or",
"an",
"Exception",
"to",
"be",
"resolved",
"to",
"a",
"ModelAndView"
] | 42a08208c6cebb87b363a0479331bafb7ec257c6 | https://github.com/Ocelot-Framework/ocelot-mvc/blob/42a08208c6cebb87b363a0479331bafb7ec257c6/src/Web/Servlet/DispatcherServlet.php#L402-L411 |
9,802 | Ocelot-Framework/ocelot-mvc | src/Web/Servlet/DispatcherServlet.php | DispatcherServlet.render | protected function render(ModelAndView $mv, Request $request, Response $response)
{
$view = null;
if ($mv->isReference()) {
$view = resolveViewName($mv->getViewName(), $mv->getModelMap(), null, $request);
if ($view == null) {
throw new \Exception("Could not re... | php | protected function render(ModelAndView $mv, Request $request, Response $response)
{
$view = null;
if ($mv->isReference()) {
$view = resolveViewName($mv->getViewName(), $mv->getModelMap(), null, $request);
if ($view == null) {
throw new \Exception("Could not re... | [
"protected",
"function",
"render",
"(",
"ModelAndView",
"$",
"mv",
",",
"Request",
"$",
"request",
",",
"Response",
"$",
"response",
")",
"{",
"$",
"view",
"=",
"null",
";",
"if",
"(",
"$",
"mv",
"->",
"isReference",
"(",
")",
")",
"{",
"$",
"view",
... | Render the given ModelAndView.
@param ModelAndView $mv the ModelAndView to render
@param Request $request current HTTP servlet request
@param Response $response current HTTP servlet response
@throws \Exception if there's a problem rendering the view
@return void | [
"Render",
"the",
"given",
"ModelAndView",
"."
] | 42a08208c6cebb87b363a0479331bafb7ec257c6 | https://github.com/Ocelot-Framework/ocelot-mvc/blob/42a08208c6cebb87b363a0479331bafb7ec257c6/src/Web/Servlet/DispatcherServlet.php#L421-L441 |
9,803 | Ocelot-Framework/ocelot-mvc | src/Web/Servlet/DispatcherServlet.php | DispatcherServlet.triggerAfterCompletion | protected function triggerAfterCompletion(Request $request, Response $response, HandlerExecutionChain $mappedHandler, \Exception $ex)
{
if ($mappedHandler != null) {
$mappedHandler->triggerAfterCompletion($request, $response, $ex);
}
throw $ex;
} | php | protected function triggerAfterCompletion(Request $request, Response $response, HandlerExecutionChain $mappedHandler, \Exception $ex)
{
if ($mappedHandler != null) {
$mappedHandler->triggerAfterCompletion($request, $response, $ex);
}
throw $ex;
} | [
"protected",
"function",
"triggerAfterCompletion",
"(",
"Request",
"$",
"request",
",",
"Response",
"$",
"response",
",",
"HandlerExecutionChain",
"$",
"mappedHandler",
",",
"\\",
"Exception",
"$",
"ex",
")",
"{",
"if",
"(",
"$",
"mappedHandler",
"!=",
"null",
... | Triggers after completion of the mappedHandler, if any
@param Request $request current HTTP request
@param Response $response current HTTP response
@param HandlerExecutionChain $mappedHandler the mapped HandlerExecutionChain
@param \Exception $ex the thrown Ex... | [
"Triggers",
"after",
"completion",
"of",
"the",
"mappedHandler",
"if",
"any"
] | 42a08208c6cebb87b363a0479331bafb7ec257c6 | https://github.com/Ocelot-Framework/ocelot-mvc/blob/42a08208c6cebb87b363a0479331bafb7ec257c6/src/Web/Servlet/DispatcherServlet.php#L471-L477 |
9,804 | wasabi-cms/core | src/Mailer/UserMailer.php | UserMailer.verifyEmail | public function verifyEmail(User $user, $token)
{
$this->_prepareEmail($user, __d('wasabi_core', 'Verify your email address'));
$this->_email->template('Wasabi/Core.User/verify');
$this->_email->viewVars([
'user' => $user,
'verifyEmailLink' => [
'plugi... | php | public function verifyEmail(User $user, $token)
{
$this->_prepareEmail($user, __d('wasabi_core', 'Verify your email address'));
$this->_email->template('Wasabi/Core.User/verify');
$this->_email->viewVars([
'user' => $user,
'verifyEmailLink' => [
'plugi... | [
"public",
"function",
"verifyEmail",
"(",
"User",
"$",
"user",
",",
"$",
"token",
")",
"{",
"$",
"this",
"->",
"_prepareEmail",
"(",
"$",
"user",
",",
"__d",
"(",
"'wasabi_core'",
",",
"'Verify your email address'",
")",
")",
";",
"$",
"this",
"->",
"_em... | Send a "verify" email to the user, so that he can verify his email address.
@param User $user The user who should verify his email address.
@param string $token The verification token.
@return void | [
"Send",
"a",
"verify",
"email",
"to",
"the",
"user",
"so",
"that",
"he",
"can",
"verify",
"his",
"email",
"address",
"."
] | 0eadbb64d2fc201bacc63c93814adeca70e08f90 | https://github.com/wasabi-cms/core/blob/0eadbb64d2fc201bacc63c93814adeca70e08f90/src/Mailer/UserMailer.php#L31-L45 |
9,805 | wasabi-cms/core | src/Mailer/UserMailer.php | UserMailer.verifyAndResetPasswordEmail | public function verifyAndResetPasswordEmail(User $user, $token)
{
$this->_prepareEmail($user, __d('wasabi_core', 'Verify your email address'));
$this->_email->template('Wasabi/Core.User/verify');
$this->_email->viewVars([
'user' => $user,
'verifyEmailLink' => [
... | php | public function verifyAndResetPasswordEmail(User $user, $token)
{
$this->_prepareEmail($user, __d('wasabi_core', 'Verify your email address'));
$this->_email->template('Wasabi/Core.User/verify');
$this->_email->viewVars([
'user' => $user,
'verifyEmailLink' => [
... | [
"public",
"function",
"verifyAndResetPasswordEmail",
"(",
"User",
"$",
"user",
",",
"$",
"token",
")",
"{",
"$",
"this",
"->",
"_prepareEmail",
"(",
"$",
"user",
",",
"__d",
"(",
"'wasabi_core'",
",",
"'Verify your email address'",
")",
")",
";",
"$",
"this"... | Send a "verify" email to the user that contains a link to verify his email address and setup his password.
This mail is sent, whenever an Admin creates a new user via the backend.
@param User $user The user who wants to reset his password.
@param string $token The verify and reset token.
@return void | [
"Send",
"a",
"verify",
"email",
"to",
"the",
"user",
"that",
"contains",
"a",
"link",
"to",
"verify",
"his",
"email",
"address",
"and",
"setup",
"his",
"password",
".",
"This",
"mail",
"is",
"sent",
"whenever",
"an",
"Admin",
"creates",
"a",
"new",
"user... | 0eadbb64d2fc201bacc63c93814adeca70e08f90 | https://github.com/wasabi-cms/core/blob/0eadbb64d2fc201bacc63c93814adeca70e08f90/src/Mailer/UserMailer.php#L55-L69 |
9,806 | wasabi-cms/core | src/Mailer/UserMailer.php | UserMailer.verifiedEmail | public function verifiedEmail(User $user)
{
$this->_prepareEmail($user, __d('wasabi_core', 'Email address verified'));
$this->_email->template('Wasabi/Core.User/verfied');
$this->_email->viewVars([
'user' => $user,
'instanceName' => Wasabi::getInstanceName()
]... | php | public function verifiedEmail(User $user)
{
$this->_prepareEmail($user, __d('wasabi_core', 'Email address verified'));
$this->_email->template('Wasabi/Core.User/verfied');
$this->_email->viewVars([
'user' => $user,
'instanceName' => Wasabi::getInstanceName()
]... | [
"public",
"function",
"verifiedEmail",
"(",
"User",
"$",
"user",
")",
"{",
"$",
"this",
"->",
"_prepareEmail",
"(",
"$",
"user",
",",
"__d",
"(",
"'wasabi_core'",
",",
"'Email address verified'",
")",
")",
";",
"$",
"this",
"->",
"_email",
"->",
"template"... | Send a "verified" email to the user, when his email address has been verified.
@param User $user The user who has verified his email address.
@return void | [
"Send",
"a",
"verified",
"email",
"to",
"the",
"user",
"when",
"his",
"email",
"address",
"has",
"been",
"verified",
"."
] | 0eadbb64d2fc201bacc63c93814adeca70e08f90 | https://github.com/wasabi-cms/core/blob/0eadbb64d2fc201bacc63c93814adeca70e08f90/src/Mailer/UserMailer.php#L77-L85 |
9,807 | wasabi-cms/core | src/Mailer/UserMailer.php | UserMailer._prepareEmail | protected function _prepareEmail(User $user, $subject)
{
$this->layout('Wasabi/Core.responsive');
$this->_email->transport('default');
$this->_email->emailFormat('both');
$this->_email->from(Wasabi::getSenderEmail(), Wasabi::getSenderName());
$this->_email->to($user->email, $... | php | protected function _prepareEmail(User $user, $subject)
{
$this->layout('Wasabi/Core.responsive');
$this->_email->transport('default');
$this->_email->emailFormat('both');
$this->_email->from(Wasabi::getSenderEmail(), Wasabi::getSenderName());
$this->_email->to($user->email, $... | [
"protected",
"function",
"_prepareEmail",
"(",
"User",
"$",
"user",
",",
"$",
"subject",
")",
"{",
"$",
"this",
"->",
"layout",
"(",
"'Wasabi/Core.responsive'",
")",
";",
"$",
"this",
"->",
"_email",
"->",
"transport",
"(",
"'default'",
")",
";",
"$",
"t... | Prepare the UserMailer Email instance.
@param User $user The user to send the email to.
@param string $subject The subject of the email.
@return void | [
"Prepare",
"the",
"UserMailer",
"Email",
"instance",
"."
] | 0eadbb64d2fc201bacc63c93814adeca70e08f90 | https://github.com/wasabi-cms/core/blob/0eadbb64d2fc201bacc63c93814adeca70e08f90/src/Mailer/UserMailer.php#L165-L178 |
9,808 | wasabi-cms/core | src/Mailer/UserMailer.php | UserMailer.send | public function send($action, $args = [], $headers = [])
{
$results = [];
try {
$results = parent::send($action, $args, $headers);
} catch (\Exception $e) {
Log::write(LOG_CRIT, 'Emails cannot be sent: ' . $e->getMessage(), $this->_email);
}
return $... | php | public function send($action, $args = [], $headers = [])
{
$results = [];
try {
$results = parent::send($action, $args, $headers);
} catch (\Exception $e) {
Log::write(LOG_CRIT, 'Emails cannot be sent: ' . $e->getMessage(), $this->_email);
}
return $... | [
"public",
"function",
"send",
"(",
"$",
"action",
",",
"$",
"args",
"=",
"[",
"]",
",",
"$",
"headers",
"=",
"[",
"]",
")",
"{",
"$",
"results",
"=",
"[",
"]",
";",
"try",
"{",
"$",
"results",
"=",
"parent",
"::",
"send",
"(",
"$",
"action",
... | Wrap the original send to catch erros and log them.
@param string $action The name of the mailer action to trigger.
@param array $args Arguments to pass to the triggered mailer action.
@param array $headers Headers to set.
@throws \Cake\Mailer\Exception\MissingActionException
@throws \BadMethodCallException
@return ar... | [
"Wrap",
"the",
"original",
"send",
"to",
"catch",
"erros",
"and",
"log",
"them",
"."
] | 0eadbb64d2fc201bacc63c93814adeca70e08f90 | https://github.com/wasabi-cms/core/blob/0eadbb64d2fc201bacc63c93814adeca70e08f90/src/Mailer/UserMailer.php#L190-L201 |
9,809 | matryoshka-model/mongo-wrapper | library/Paginator/MongoPaginatorAdapter.php | MongoPaginatorAdapter.getItems | public function getItems($offset, $itemCountPerPage)
{
$this->cursor->skip($offset);
$this->cursor->limit($itemCountPerPage);
$resultSet = clone $this->resultSetPrototype;
$resultSet->initialize($this->cursor);
return $resultSet;
} | php | public function getItems($offset, $itemCountPerPage)
{
$this->cursor->skip($offset);
$this->cursor->limit($itemCountPerPage);
$resultSet = clone $this->resultSetPrototype;
$resultSet->initialize($this->cursor);
return $resultSet;
} | [
"public",
"function",
"getItems",
"(",
"$",
"offset",
",",
"$",
"itemCountPerPage",
")",
"{",
"$",
"this",
"->",
"cursor",
"->",
"skip",
"(",
"$",
"offset",
")",
";",
"$",
"this",
"->",
"cursor",
"->",
"limit",
"(",
"$",
"itemCountPerPage",
")",
";",
... | Returns an result set of items for a page.
@param int $offset Page offset
@param int $itemCountPerPage Number of items per page
@return HydratingResultSet | [
"Returns",
"an",
"result",
"set",
"of",
"items",
"for",
"a",
"page",
"."
] | d69511d7f7fc58e708c771ea0cd3c8ba7e8a155a | https://github.com/matryoshka-model/mongo-wrapper/blob/d69511d7f7fc58e708c771ea0cd3c8ba7e8a155a/library/Paginator/MongoPaginatorAdapter.php#L66-L75 |
9,810 | deasilworks/cef | src/EntityDataManager.php | EntityDataManager.getModel | public function getModel()
{
$collection = $this->getCollection();
/** @var EntityDataModel $model */
$model = $collection->getModel();
$model->setEntityManager($this);
return $model;
} | php | public function getModel()
{
$collection = $this->getCollection();
/** @var EntityDataModel $model */
$model = $collection->getModel();
$model->setEntityManager($this);
return $model;
} | [
"public",
"function",
"getModel",
"(",
")",
"{",
"$",
"collection",
"=",
"$",
"this",
"->",
"getCollection",
"(",
")",
";",
"/** @var EntityDataModel $model */",
"$",
"model",
"=",
"$",
"collection",
"->",
"getModel",
"(",
")",
";",
"$",
"model",
"->",
"se... | Get the model associated with the collection.
@return EntityDataModel | [
"Get",
"the",
"model",
"associated",
"with",
"the",
"collection",
"."
] | 18c65f2b123512bba2208975dc655354f57670be | https://github.com/deasilworks/cef/blob/18c65f2b123512bba2208975dc655354f57670be/src/EntityDataManager.php#L90-L99 |
9,811 | deasilworks/cef | src/EntityDataManager.php | EntityDataManager.getStatementManager | public function getStatementManager($statementClass = Simple::class)
{
/** @var StatementManager $statementManager */
$statementManager = new $statementClass($this->config, $this);
$collectionClass = $this->getCollectionClass();
if (!$statementManager instanceof StatementManager) {... | php | public function getStatementManager($statementClass = Simple::class)
{
/** @var StatementManager $statementManager */
$statementManager = new $statementClass($this->config, $this);
$collectionClass = $this->getCollectionClass();
if (!$statementManager instanceof StatementManager) {... | [
"public",
"function",
"getStatementManager",
"(",
"$",
"statementClass",
"=",
"Simple",
"::",
"class",
")",
"{",
"/** @var StatementManager $statementManager */",
"$",
"statementManager",
"=",
"new",
"$",
"statementClass",
"(",
"$",
"this",
"->",
"config",
",",
"$",... | Statement Manager Factory.
@param string $statementClass
@throws \Exception
@return StatementManager | [
"Statement",
"Manager",
"Factory",
"."
] | 18c65f2b123512bba2208975dc655354f57670be | https://github.com/deasilworks/cef/blob/18c65f2b123512bba2208975dc655354f57670be/src/EntityDataManager.php#L130-L144 |
9,812 | tadcka/Routing | RouteAwareTrait.php | RouteAwareTrait.getRouteFromRequest | protected function getRouteFromRequest(Request $request)
{
$attributes = $request->attributes->get('_route_params');
if (isset($attributes[RouteObjectInterface::ROUTE_OBJECT])
&& ($attributes[RouteObjectInterface::ROUTE_OBJECT] instanceof RouteInterface)
) {
return $... | php | protected function getRouteFromRequest(Request $request)
{
$attributes = $request->attributes->get('_route_params');
if (isset($attributes[RouteObjectInterface::ROUTE_OBJECT])
&& ($attributes[RouteObjectInterface::ROUTE_OBJECT] instanceof RouteInterface)
) {
return $... | [
"protected",
"function",
"getRouteFromRequest",
"(",
"Request",
"$",
"request",
")",
"{",
"$",
"attributes",
"=",
"$",
"request",
"->",
"attributes",
"->",
"get",
"(",
"'_route_params'",
")",
";",
"if",
"(",
"isset",
"(",
"$",
"attributes",
"[",
"RouteObject... | Get route from request.
@param Request $request
@return null|RouteInterface | [
"Get",
"route",
"from",
"request",
"."
] | b2280bac33eb76eec76ecc8d665c70092f3cbba9 | https://github.com/tadcka/Routing/blob/b2280bac33eb76eec76ecc8d665c70092f3cbba9/RouteAwareTrait.php#L32-L43 |
9,813 | padosoft/io | src/DirHelper.php | DirHelper.collapseDotFolder | protected static function collapseDotFolder($root, $part, &$canonicalParts)
{
if ('.' === $part) {
return;
}
// Collapse ".." with the previous part, if one exists
// Don't collapse ".." if the previous part is also ".."
if ('..' === $part && count($canonicalParts... | php | protected static function collapseDotFolder($root, $part, &$canonicalParts)
{
if ('.' === $part) {
return;
}
// Collapse ".." with the previous part, if one exists
// Don't collapse ".." if the previous part is also ".."
if ('..' === $part && count($canonicalParts... | [
"protected",
"static",
"function",
"collapseDotFolder",
"(",
"$",
"root",
",",
"$",
"part",
",",
"&",
"$",
"canonicalParts",
")",
"{",
"if",
"(",
"'.'",
"===",
"$",
"part",
")",
"{",
"return",
";",
"}",
"// Collapse \"..\" with the previous part, if one exists",... | Collapse dot folder '.', '..', if possible
@param string $root
@param $part
@param $canonicalParts | [
"Collapse",
"dot",
"folder",
".",
"..",
"if",
"possible"
] | 788eef6d9b00d28bb17f7fa1e78489df0075259e | https://github.com/padosoft/io/blob/788eef6d9b00d28bb17f7fa1e78489df0075259e/src/DirHelper.php#L521-L538 |
9,814 | padosoft/io | src/DirHelper.php | DirHelper.isDirEmpty | public static function isDirEmpty(string $path) : bool
{
//che if no such dir, not a dir, not readable
if (!self::isReadable($path)) {
return false;
}
$result = true;
$handle = opendir($path);
while (false !== ($entry = readdir($handle))) {
if... | php | public static function isDirEmpty(string $path) : bool
{
//che if no such dir, not a dir, not readable
if (!self::isReadable($path)) {
return false;
}
$result = true;
$handle = opendir($path);
while (false !== ($entry = readdir($handle))) {
if... | [
"public",
"static",
"function",
"isDirEmpty",
"(",
"string",
"$",
"path",
")",
":",
"bool",
"{",
"//che if no such dir, not a dir, not readable",
"if",
"(",
"!",
"self",
"::",
"isReadable",
"(",
"$",
"path",
")",
")",
"{",
"return",
"false",
";",
"}",
"$",
... | Check if a directory is empty in efficent way.
Check hidden files too.
@param string $path
@return bool | [
"Check",
"if",
"a",
"directory",
"is",
"empty",
"in",
"efficent",
"way",
".",
"Check",
"hidden",
"files",
"too",
"."
] | 788eef6d9b00d28bb17f7fa1e78489df0075259e | https://github.com/padosoft/io/blob/788eef6d9b00d28bb17f7fa1e78489df0075259e/src/DirHelper.php#L592-L609 |
9,815 | factorio-item-browser/api-database | src/Repository/ModRepository.php | ModRepository.findByNamesWithDependencies | public function findByNamesWithDependencies(array $modNames): array
{
$result = [];
if (count($modNames) > 0) {
$queryBuilder = $this->entityManager->createQueryBuilder();
$queryBuilder->select(['m', 'd', 'dm'])
->from(Mod::class, 'm')
... | php | public function findByNamesWithDependencies(array $modNames): array
{
$result = [];
if (count($modNames) > 0) {
$queryBuilder = $this->entityManager->createQueryBuilder();
$queryBuilder->select(['m', 'd', 'dm'])
->from(Mod::class, 'm')
... | [
"public",
"function",
"findByNamesWithDependencies",
"(",
"array",
"$",
"modNames",
")",
":",
"array",
"{",
"$",
"result",
"=",
"[",
"]",
";",
"if",
"(",
"count",
"(",
"$",
"modNames",
")",
">",
"0",
")",
"{",
"$",
"queryBuilder",
"=",
"$",
"this",
"... | Finds all mods with the specified names, fetching their dependencies as well.
@param array|string[] $modNames
@return array|Mod[] | [
"Finds",
"all",
"mods",
"with",
"the",
"specified",
"names",
"fetching",
"their",
"dependencies",
"as",
"well",
"."
] | c3a27e5673462a58b5afafc0ea0e0002f6db9803 | https://github.com/factorio-item-browser/api-database/blob/c3a27e5673462a58b5afafc0ea0e0002f6db9803/src/Repository/ModRepository.php#L23-L38 |
9,816 | factorio-item-browser/api-database | src/Repository/ModRepository.php | ModRepository.count | public function count(array $modCombinationIds = []): int
{
$queryBuilder = $this->entityManager->createQueryBuilder();
$queryBuilder->select('COUNT(DISTINCT m.id) AS numberOfMods')
->from(Mod::class, 'm');
if (count($modCombinationIds) > 0) {
$queryBuilder-... | php | public function count(array $modCombinationIds = []): int
{
$queryBuilder = $this->entityManager->createQueryBuilder();
$queryBuilder->select('COUNT(DISTINCT m.id) AS numberOfMods')
->from(Mod::class, 'm');
if (count($modCombinationIds) > 0) {
$queryBuilder-... | [
"public",
"function",
"count",
"(",
"array",
"$",
"modCombinationIds",
"=",
"[",
"]",
")",
":",
"int",
"{",
"$",
"queryBuilder",
"=",
"$",
"this",
"->",
"entityManager",
"->",
"createQueryBuilder",
"(",
")",
";",
"$",
"queryBuilder",
"->",
"select",
"(",
... | Counts the mods.
@param array|int[] $modCombinationIds
@return int | [
"Counts",
"the",
"mods",
"."
] | c3a27e5673462a58b5afafc0ea0e0002f6db9803 | https://github.com/factorio-item-browser/api-database/blob/c3a27e5673462a58b5afafc0ea0e0002f6db9803/src/Repository/ModRepository.php#L58-L76 |
9,817 | indigophp-archive/guardian | src/SessionAuth.php | SessionAuth.getCurrentCaller | public function getCurrentCaller()
{
if (is_null($this->currentCaller)) {
$loginToken = $this->session->getLoginToken();
try {
$this->currentCaller = $this->identifier->identifyByLoginToken($loginToken);
} catch (IdentificationFailed $e) {
... | php | public function getCurrentCaller()
{
if (is_null($this->currentCaller)) {
$loginToken = $this->session->getLoginToken();
try {
$this->currentCaller = $this->identifier->identifyByLoginToken($loginToken);
} catch (IdentificationFailed $e) {
... | [
"public",
"function",
"getCurrentCaller",
"(",
")",
"{",
"if",
"(",
"is_null",
"(",
"$",
"this",
"->",
"currentCaller",
")",
")",
"{",
"$",
"loginToken",
"=",
"$",
"this",
"->",
"session",
"->",
"getLoginToken",
"(",
")",
";",
"try",
"{",
"$",
"this",
... | Returns the current caller
@return HasLoginToken | [
"Returns",
"the",
"current",
"caller"
] | 244b1c3be1cc3da428c9dea03e80f9d74593830a | https://github.com/indigophp-archive/guardian/blob/244b1c3be1cc3da428c9dea03e80f9d74593830a/src/SessionAuth.php#L97-L112 |
9,818 | g105b/phpcsv | src/Csv.php | Csv.checkIdField | private function checkIdField() {
if(is_null($this->headers)) {
return;
}
if(in_array($this->idField, $this->headers)) {
return;
}
foreach($this->headers as $header) {
if(strtolower($this->idField) == strtolower($header)) {
$this->setIdField($header);
}
}
} | php | private function checkIdField() {
if(is_null($this->headers)) {
return;
}
if(in_array($this->idField, $this->headers)) {
return;
}
foreach($this->headers as $header) {
if(strtolower($this->idField) == strtolower($header)) {
$this->setIdField($header);
}
}
} | [
"private",
"function",
"checkIdField",
"(",
")",
"{",
"if",
"(",
"is_null",
"(",
"$",
"this",
"->",
"headers",
")",
")",
"{",
"return",
";",
"}",
"if",
"(",
"in_array",
"(",
"$",
"this",
"->",
"idField",
",",
"$",
"this",
"->",
"headers",
")",
")",... | Check the header line for variations on the default ID field name, fixing
the case of the ID field. | [
"Check",
"the",
"header",
"line",
"for",
"variations",
"on",
"the",
"default",
"ID",
"field",
"name",
"fixing",
"the",
"case",
"of",
"the",
"ID",
"field",
"."
] | 07515f794c7fc4406dbfd3e87ce96ea5bc1483d5 | https://github.com/g105b/phpcsv/blob/07515f794c7fc4406dbfd3e87ce96ea5bc1483d5/src/Csv.php#L111-L124 |
9,819 | g105b/phpcsv | src/Csv.php | Csv.toAssociative | public function toAssociative($data) {
foreach ($data as $i => $value) {
$headerName = $this->headers[$i];
$data[$headerName] = $value;
unset($data[$i]);
}
return $data;
} | php | public function toAssociative($data) {
foreach ($data as $i => $value) {
$headerName = $this->headers[$i];
$data[$headerName] = $value;
unset($data[$i]);
}
return $data;
} | [
"public",
"function",
"toAssociative",
"(",
"$",
"data",
")",
"{",
"foreach",
"(",
"$",
"data",
"as",
"$",
"i",
"=>",
"$",
"value",
")",
"{",
"$",
"headerName",
"=",
"$",
"this",
"->",
"headers",
"[",
"$",
"i",
"]",
";",
"$",
"data",
"[",
"$",
... | Converts an indexed array of data into an associative array with field names.
@param array $data Indexed array of data representing row
@return array Associative array of data with field names | [
"Converts",
"an",
"indexed",
"array",
"of",
"data",
"into",
"an",
"associative",
"array",
"with",
"field",
"names",
"."
] | 07515f794c7fc4406dbfd3e87ce96ea5bc1483d5 | https://github.com/g105b/phpcsv/blob/07515f794c7fc4406dbfd3e87ce96ea5bc1483d5/src/Csv.php#L176-L184 |
9,820 | g105b/phpcsv | src/Csv.php | Csv.toIndexed | public function toIndexed($data, $fillMissing = false) {
foreach ($data as $key => $value) {
if(!in_array($key, $this->headers)) {
throw new InvalidFieldException($key);
}
$headerIndex = (int)array_search($key, $this->headers);
$data[$headerIndex] = $value;
unset($data[$key]);
}
ksort($data);
if($fil... | php | public function toIndexed($data, $fillMissing = false) {
foreach ($data as $key => $value) {
if(!in_array($key, $this->headers)) {
throw new InvalidFieldException($key);
}
$headerIndex = (int)array_search($key, $this->headers);
$data[$headerIndex] = $value;
unset($data[$key]);
}
ksort($data);
if($fil... | [
"public",
"function",
"toIndexed",
"(",
"$",
"data",
",",
"$",
"fillMissing",
"=",
"false",
")",
"{",
"foreach",
"(",
"$",
"data",
"as",
"$",
"key",
"=>",
"$",
"value",
")",
"{",
"if",
"(",
"!",
"in_array",
"(",
"$",
"key",
",",
"$",
"this",
"->"... | Converts an associative array into an indexed array, according to the
currently stored headers.
@param array $data Associative array of data representing row
@param bool $fillMissing True to fill missing indices
@return array Indexed array of data in order of columns | [
"Converts",
"an",
"associative",
"array",
"into",
"an",
"indexed",
"array",
"according",
"to",
"the",
"currently",
"stored",
"headers",
"."
] | 07515f794c7fc4406dbfd3e87ce96ea5bc1483d5 | https://github.com/g105b/phpcsv/blob/07515f794c7fc4406dbfd3e87ce96ea5bc1483d5/src/Csv.php#L195-L211 |
9,821 | g105b/phpcsv | src/Csv.php | Csv.fillMissing | private function fillMissing($data, $existingData = []) {
if($this->isAssoc($data)) {
foreach ($this->headers as $header) {
if(!isset($data[$header])) {
$replaceWith = isset($existingData[$header])
? $existingData[$header]
: "";
$data[$header] = $replaceWith;
}
}
}
else {
end($this->hea... | php | private function fillMissing($data, $existingData = []) {
if($this->isAssoc($data)) {
foreach ($this->headers as $header) {
if(!isset($data[$header])) {
$replaceWith = isset($existingData[$header])
? $existingData[$header]
: "";
$data[$header] = $replaceWith;
}
}
}
else {
end($this->hea... | [
"private",
"function",
"fillMissing",
"(",
"$",
"data",
",",
"$",
"existingData",
"=",
"[",
"]",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"isAssoc",
"(",
"$",
"data",
")",
")",
"{",
"foreach",
"(",
"$",
"this",
"->",
"headers",
"as",
"$",
"header",
... | Fills any missing keys with blank fields, or merging with an existing data
set if provided.
@param array $data Indexed or associative array containing row data
@param array $existingData Indexed or associative array of existing data to
fill in blank fields with
@return array Array in the same format (indexed or assoc... | [
"Fills",
"any",
"missing",
"keys",
"with",
"blank",
"fields",
"or",
"merging",
"with",
"an",
"existing",
"data",
"set",
"if",
"provided",
"."
] | 07515f794c7fc4406dbfd3e87ce96ea5bc1483d5 | https://github.com/g105b/phpcsv/blob/07515f794c7fc4406dbfd3e87ce96ea5bc1483d5/src/Csv.php#L224-L249 |
9,822 | g105b/phpcsv | src/Csv.php | Csv.get | public function get($index = null, $fetchFields = []) {
$this->lock();
if(is_null($index)) {
$index = $this->file->key();
}
else {
if(!(is_int($index) || ctype_digit($index))
|| $index < 0) {
throw new InvalidIndexException($index);
}
$index = (int)$index;
}
if($index <= $this->file->key() + 1) {
... | php | public function get($index = null, $fetchFields = []) {
$this->lock();
if(is_null($index)) {
$index = $this->file->key();
}
else {
if(!(is_int($index) || ctype_digit($index))
|| $index < 0) {
throw new InvalidIndexException($index);
}
$index = (int)$index;
}
if($index <= $this->file->key() + 1) {
... | [
"public",
"function",
"get",
"(",
"$",
"index",
"=",
"null",
",",
"$",
"fetchFields",
"=",
"[",
"]",
")",
"{",
"$",
"this",
"->",
"lock",
"(",
")",
";",
"if",
"(",
"is_null",
"(",
"$",
"index",
")",
")",
"{",
"$",
"index",
"=",
"$",
"this",
"... | Returns the row at the given index, or the current file pointer position if
not supplied. Optionally supply the headers to retrieve, ignoring any others.
@param null|int $index Zero-based row number (0 is the first row after the
header row)
@param array $fetchFields NOT IMPLEMENTED List of fields to include in
resulti... | [
"Returns",
"the",
"row",
"at",
"the",
"given",
"index",
"or",
"the",
"current",
"file",
"pointer",
"position",
"if",
"not",
"supplied",
".",
"Optionally",
"supply",
"the",
"headers",
"to",
"retrieve",
"ignoring",
"any",
"others",
"."
] | 07515f794c7fc4406dbfd3e87ce96ea5bc1483d5 | https://github.com/g105b/phpcsv/blob/07515f794c7fc4406dbfd3e87ce96ea5bc1483d5/src/Csv.php#L267-L299 |
9,823 | g105b/phpcsv | src/Csv.php | Csv.getAll | public function getAll() {
$this->file->rewind();
$data = [];
while(false !== $row = $this->get()) {
$data []= $row;
}
return $data;
} | php | public function getAll() {
$this->file->rewind();
$data = [];
while(false !== $row = $this->get()) {
$data []= $row;
}
return $data;
} | [
"public",
"function",
"getAll",
"(",
")",
"{",
"$",
"this",
"->",
"file",
"->",
"rewind",
"(",
")",
";",
"$",
"data",
"=",
"[",
"]",
";",
"while",
"(",
"false",
"!==",
"$",
"row",
"=",
"$",
"this",
"->",
"get",
"(",
")",
")",
"{",
"$",
"data"... | Returns an array of all rows.
@return array Indexed array, containing associative arrays of row data | [
"Returns",
"an",
"array",
"of",
"all",
"rows",
"."
] | 07515f794c7fc4406dbfd3e87ce96ea5bc1483d5 | https://github.com/g105b/phpcsv/blob/07515f794c7fc4406dbfd3e87ce96ea5bc1483d5/src/Csv.php#L306-L315 |
9,824 | g105b/phpcsv | src/Csv.php | Csv.getBy | public function getBy($fieldName, $fieldValue, $fetchFields = []) {
$result = $this->getAllBy($fieldName, $fieldValue, $fetchFields, 1);
if(isset($result[0])) {
return $result[0];
}
else {
return null;
}
} | php | public function getBy($fieldName, $fieldValue, $fetchFields = []) {
$result = $this->getAllBy($fieldName, $fieldValue, $fetchFields, 1);
if(isset($result[0])) {
return $result[0];
}
else {
return null;
}
} | [
"public",
"function",
"getBy",
"(",
"$",
"fieldName",
",",
"$",
"fieldValue",
",",
"$",
"fetchFields",
"=",
"[",
"]",
")",
"{",
"$",
"result",
"=",
"$",
"this",
"->",
"getAllBy",
"(",
"$",
"fieldName",
",",
"$",
"fieldValue",
",",
"$",
"fetchFields",
... | Returns the first element in the matching rows, without iterating over the
whole data.
@param string $fieldName Name of field to match on
@param string $fieldValue Value of field to match
@param string $fetchFields NOT IMPLEMENTED List of fields to include
@return array|null Associative array of first matching row, o... | [
"Returns",
"the",
"first",
"element",
"in",
"the",
"matching",
"rows",
"without",
"iterating",
"over",
"the",
"whole",
"data",
"."
] | 07515f794c7fc4406dbfd3e87ce96ea5bc1483d5 | https://github.com/g105b/phpcsv/blob/07515f794c7fc4406dbfd3e87ce96ea5bc1483d5/src/Csv.php#L359-L367 |
9,825 | g105b/phpcsv | src/Csv.php | Csv.getIdField | public function getIdField() {
if(!empty($this->headers)
&& !in_array($this->idField, $this->headers)) {
throw new InvalidFieldException($this->idField);
}
return $this->idField;
} | php | public function getIdField() {
if(!empty($this->headers)
&& !in_array($this->idField, $this->headers)) {
throw new InvalidFieldException($this->idField);
}
return $this->idField;
} | [
"public",
"function",
"getIdField",
"(",
")",
"{",
"if",
"(",
"!",
"empty",
"(",
"$",
"this",
"->",
"headers",
")",
"&&",
"!",
"in_array",
"(",
"$",
"this",
"->",
"idField",
",",
"$",
"this",
"->",
"headers",
")",
")",
"{",
"throw",
"new",
"Invalid... | Retrieves the internally set field used for ID. By default, this is "ID",
but if there is no field with that name then this function returns null.
@return string|null Name of field, or null if the default field does not
exist in the CSV | [
"Retrieves",
"the",
"internally",
"set",
"field",
"used",
"for",
"ID",
".",
"By",
"default",
"this",
"is",
"ID",
"but",
"if",
"there",
"is",
"no",
"field",
"with",
"that",
"name",
"then",
"this",
"function",
"returns",
"null",
"."
] | 07515f794c7fc4406dbfd3e87ce96ea5bc1483d5 | https://github.com/g105b/phpcsv/blob/07515f794c7fc4406dbfd3e87ce96ea5bc1483d5/src/Csv.php#L388-L395 |
9,826 | g105b/phpcsv | src/Csv.php | Csv.add | public function add($row) {
$this->changesMade = true;
$rowColumns = $row;
$rowAssociative = $row;
$this->lock();
if($this->isAssoc($row)) {
if(!$this->headers) {
$this->headers = array_keys($row);
$this->file->fputcsv($this->headers);
}
$rowColumns = $this->toIndexed($row, true);
}
else {
$rowAs... | php | public function add($row) {
$this->changesMade = true;
$rowColumns = $row;
$rowAssociative = $row;
$this->lock();
if($this->isAssoc($row)) {
if(!$this->headers) {
$this->headers = array_keys($row);
$this->file->fputcsv($this->headers);
}
$rowColumns = $this->toIndexed($row, true);
}
else {
$rowAs... | [
"public",
"function",
"add",
"(",
"$",
"row",
")",
"{",
"$",
"this",
"->",
"changesMade",
"=",
"true",
";",
"$",
"rowColumns",
"=",
"$",
"row",
";",
"$",
"rowAssociative",
"=",
"$",
"row",
";",
"$",
"this",
"->",
"lock",
"(",
")",
";",
"if",
"(",... | Adds a single row to the CSV file, the values according to associative
array keys matching the currently stored headers. If there are no headers
stored, the headers will take the form of the current associative array's
keys, in the order they exist in the array.
@param array $row Associative array containing key-value... | [
"Adds",
"a",
"single",
"row",
"to",
"the",
"CSV",
"file",
"the",
"values",
"according",
"to",
"associative",
"array",
"keys",
"matching",
"the",
"currently",
"stored",
"headers",
".",
"If",
"there",
"are",
"no",
"headers",
"stored",
"the",
"headers",
"will",... | 07515f794c7fc4406dbfd3e87ce96ea5bc1483d5 | https://github.com/g105b/phpcsv/blob/07515f794c7fc4406dbfd3e87ce96ea5bc1483d5/src/Csv.php#L423-L453 |
9,827 | g105b/phpcsv | src/Csv.php | Csv.isAssoc | private function isAssoc($array) {
$allIntegerKeys = true;
foreach ($array as $key => $value) {
if(!is_integer($key)) {
$allIntegerKeys = false;
break;
}
}
return $allIntegerKeys === false;
} | php | private function isAssoc($array) {
$allIntegerKeys = true;
foreach ($array as $key => $value) {
if(!is_integer($key)) {
$allIntegerKeys = false;
break;
}
}
return $allIntegerKeys === false;
} | [
"private",
"function",
"isAssoc",
"(",
"$",
"array",
")",
"{",
"$",
"allIntegerKeys",
"=",
"true",
";",
"foreach",
"(",
"$",
"array",
"as",
"$",
"key",
"=>",
"$",
"value",
")",
"{",
"if",
"(",
"!",
"is_integer",
"(",
"$",
"key",
")",
")",
"{",
"$... | Checks whether a given array is associative or indexed.
@param array $array The input array to check
@return bool True if input array is associative, false if the input array is
indexed | [
"Checks",
"whether",
"a",
"given",
"array",
"is",
"associative",
"or",
"indexed",
"."
] | 07515f794c7fc4406dbfd3e87ce96ea5bc1483d5 | https://github.com/g105b/phpcsv/blob/07515f794c7fc4406dbfd3e87ce96ea5bc1483d5/src/Csv.php#L463-L473 |
9,828 | subcosm/observatory | src/ObserverQueue.php | ObserverQueue.attach | public function attach(ObserverInterface $observer): void
{
$key = spl_object_hash($observer);
if ( array_key_exists($key, $this->observers) ) {
throw new ObservatoryException(
'Provided observer already known, hash: '.$key
);
}
$this->observ... | php | public function attach(ObserverInterface $observer): void
{
$key = spl_object_hash($observer);
if ( array_key_exists($key, $this->observers) ) {
throw new ObservatoryException(
'Provided observer already known, hash: '.$key
);
}
$this->observ... | [
"public",
"function",
"attach",
"(",
"ObserverInterface",
"$",
"observer",
")",
":",
"void",
"{",
"$",
"key",
"=",
"spl_object_hash",
"(",
"$",
"observer",
")",
";",
"if",
"(",
"array_key_exists",
"(",
"$",
"key",
",",
"$",
"this",
"->",
"observers",
")"... | attaches an observer to the observable.
@param ObserverInterface $observer
@throws ObservatoryException when the provided observer is already known
@return void | [
"attaches",
"an",
"observer",
"to",
"the",
"observable",
"."
] | 7c8c4eb0193fff9a2f40c33b2d3eb344314852e9 | https://github.com/subcosm/observatory/blob/7c8c4eb0193fff9a2f40c33b2d3eb344314852e9/src/ObserverQueue.php#L30-L41 |
9,829 | subcosm/observatory | src/ObserverQueue.php | ObserverQueue.detach | public function detach(ObserverInterface $observer): void
{
$key = spl_object_hash($observer);
unset($this->observers[$key]);
} | php | public function detach(ObserverInterface $observer): void
{
$key = spl_object_hash($observer);
unset($this->observers[$key]);
} | [
"public",
"function",
"detach",
"(",
"ObserverInterface",
"$",
"observer",
")",
":",
"void",
"{",
"$",
"key",
"=",
"spl_object_hash",
"(",
"$",
"observer",
")",
";",
"unset",
"(",
"$",
"this",
"->",
"observers",
"[",
"$",
"key",
"]",
")",
";",
"}"
] | detaches an observer from the observable.
@param ObserverInterface $observer
@return void | [
"detaches",
"an",
"observer",
"from",
"the",
"observable",
"."
] | 7c8c4eb0193fff9a2f40c33b2d3eb344314852e9 | https://github.com/subcosm/observatory/blob/7c8c4eb0193fff9a2f40c33b2d3eb344314852e9/src/ObserverQueue.php#L49-L54 |
9,830 | phossa2/libs | src/Phossa2/Route/Dispatcher.php | Dispatcher.isDispatched | protected function isDispatched()/*# : bool */
{
$param = ['result' => $this->result];
if ($this->trigger(self::EVENT_BEFORE_DISPATCH, $param) &&
$this->executeHandler() &&
$this->trigger(self::EVENT_AFTER_DISPATCH, $param)
) {
return true;
}
... | php | protected function isDispatched()/*# : bool */
{
$param = ['result' => $this->result];
if ($this->trigger(self::EVENT_BEFORE_DISPATCH, $param) &&
$this->executeHandler() &&
$this->trigger(self::EVENT_AFTER_DISPATCH, $param)
) {
return true;
}
... | [
"protected",
"function",
"isDispatched",
"(",
")",
"/*# : bool */",
"{",
"$",
"param",
"=",
"[",
"'result'",
"=>",
"$",
"this",
"->",
"result",
"]",
";",
"if",
"(",
"$",
"this",
"->",
"trigger",
"(",
"self",
"::",
"EVENT_BEFORE_DISPATCH",
",",
"$",
"para... | Real dispatching process
@return bool
@access protected | [
"Real",
"dispatching",
"process"
] | 921e485c8cc29067f279da2cdd06f47a9bddd115 | https://github.com/phossa2/libs/blob/921e485c8cc29067f279da2cdd06f47a9bddd115/src/Phossa2/Route/Dispatcher.php#L211-L221 |
9,831 | phossa2/libs | src/Phossa2/Route/Dispatcher.php | Dispatcher.executeHandler | protected function executeHandler()/*# : bool */
{
try {
$handler = $this->result->getHandler();
$callable = $this->getResolver()->resolve($handler);
if ($this->result->getRoute()) {
return $this->callableWithRoute($callable);
} else {
... | php | protected function executeHandler()/*# : bool */
{
try {
$handler = $this->result->getHandler();
$callable = $this->getResolver()->resolve($handler);
if ($this->result->getRoute()) {
return $this->callableWithRoute($callable);
} else {
... | [
"protected",
"function",
"executeHandler",
"(",
")",
"/*# : bool */",
"{",
"try",
"{",
"$",
"handler",
"=",
"$",
"this",
"->",
"result",
"->",
"getHandler",
"(",
")",
";",
"$",
"callable",
"=",
"$",
"this",
"->",
"getResolver",
"(",
")",
"->",
"resolve",... | Execute handler of the result
IF HANDLER NOT EXECUTED, REMOVE IT !!
@return bool true if handler executed
@access protected | [
"Execute",
"handler",
"of",
"the",
"result"
] | 921e485c8cc29067f279da2cdd06f47a9bddd115 | https://github.com/phossa2/libs/blob/921e485c8cc29067f279da2cdd06f47a9bddd115/src/Phossa2/Route/Dispatcher.php#L231-L247 |
9,832 | phossa2/libs | src/Phossa2/Route/Dispatcher.php | Dispatcher.callableWithRoute | protected function callableWithRoute(callable $callable)/*# : bool */
{
/* @var EventCapableAbstract $route */
$route = $this->result->getRoute();
$param = ['result' => $this->result];
if ($route->trigger(Route::EVENT_BEFORE_HANDLER, $param)) {
call_user_func($callable, $... | php | protected function callableWithRoute(callable $callable)/*# : bool */
{
/* @var EventCapableAbstract $route */
$route = $this->result->getRoute();
$param = ['result' => $this->result];
if ($route->trigger(Route::EVENT_BEFORE_HANDLER, $param)) {
call_user_func($callable, $... | [
"protected",
"function",
"callableWithRoute",
"(",
"callable",
"$",
"callable",
")",
"/*# : bool */",
"{",
"/* @var EventCapableAbstract $route */",
"$",
"route",
"=",
"$",
"this",
"->",
"result",
"->",
"getRoute",
"(",
")",
";",
"$",
"param",
"=",
"[",
"'result... | Execute the callable with route events
IF HANDLER NOT EXECUTED, REMOVE IT !!
@param callable $callable
@return bool true if callable executed
@access protected | [
"Execute",
"the",
"callable",
"with",
"route",
"events"
] | 921e485c8cc29067f279da2cdd06f47a9bddd115 | https://github.com/phossa2/libs/blob/921e485c8cc29067f279da2cdd06f47a9bddd115/src/Phossa2/Route/Dispatcher.php#L258-L270 |
9,833 | phossa2/libs | src/Phossa2/Route/Dispatcher.php | Dispatcher.defaultHandler | protected function defaultHandler()/*# : bool */
{
$status = $this->result->getStatus();
$handler = $this->result->getHandler() ?: $this->getHandler($status);
if ($handler) {
$param = ['result' => $this->result];
$callable = $this->getResolver()->resolve($handler);
... | php | protected function defaultHandler()/*# : bool */
{
$status = $this->result->getStatus();
$handler = $this->result->getHandler() ?: $this->getHandler($status);
if ($handler) {
$param = ['result' => $this->result];
$callable = $this->getResolver()->resolve($handler);
... | [
"protected",
"function",
"defaultHandler",
"(",
")",
"/*# : bool */",
"{",
"$",
"status",
"=",
"$",
"this",
"->",
"result",
"->",
"getStatus",
"(",
")",
";",
"$",
"handler",
"=",
"$",
"this",
"->",
"result",
"->",
"getHandler",
"(",
")",
"?",
":",
"$",... | Execute dispatcher level handler
@return bool
@access protected | [
"Execute",
"dispatcher",
"level",
"handler"
] | 921e485c8cc29067f279da2cdd06f47a9bddd115 | https://github.com/phossa2/libs/blob/921e485c8cc29067f279da2cdd06f47a9bddd115/src/Phossa2/Route/Dispatcher.php#L278-L292 |
9,834 | titon/model | src/Titon/Model/Relation/ManyToOne.php | ManyToOne.link | public function link(Model $model) {
$this->getLinked()->flush()->append($model);
$this->getPrimaryModel()->set($this->getPrimaryForeignKey(), $model->id());
return $this;
} | php | public function link(Model $model) {
$this->getLinked()->flush()->append($model);
$this->getPrimaryModel()->set($this->getPrimaryForeignKey(), $model->id());
return $this;
} | [
"public",
"function",
"link",
"(",
"Model",
"$",
"model",
")",
"{",
"$",
"this",
"->",
"getLinked",
"(",
")",
"->",
"flush",
"(",
")",
"->",
"append",
"(",
"$",
"model",
")",
";",
"$",
"this",
"->",
"getPrimaryModel",
"(",
")",
"->",
"set",
"(",
... | Only one record at a time can be linked in a belongs to relation.
Also include the ID from the foreign model as an attribute on the primary model.
@param \Titon\Model\Model $model
@return $this | [
"Only",
"one",
"record",
"at",
"a",
"time",
"can",
"be",
"linked",
"in",
"a",
"belongs",
"to",
"relation",
".",
"Also",
"include",
"the",
"ID",
"from",
"the",
"foreign",
"model",
"as",
"an",
"attribute",
"on",
"the",
"primary",
"model",
"."
] | 274e3810c2cfbb6818a388daaa462ff05de99cbd | https://github.com/titon/model/blob/274e3810c2cfbb6818a388daaa462ff05de99cbd/src/Titon/Model/Relation/ManyToOne.php#L75-L81 |
9,835 | titon/model | src/Titon/Model/Relation/ManyToOne.php | ManyToOne.unlink | public function unlink(Model $model) {
$this->getUnlinked()->flush()->append($model);
$this->getPrimaryModel()->set($this->getPrimaryForeignKey(), null);
return $this;
} | php | public function unlink(Model $model) {
$this->getUnlinked()->flush()->append($model);
$this->getPrimaryModel()->set($this->getPrimaryForeignKey(), null);
return $this;
} | [
"public",
"function",
"unlink",
"(",
"Model",
"$",
"model",
")",
"{",
"$",
"this",
"->",
"getUnlinked",
"(",
")",
"->",
"flush",
"(",
")",
"->",
"append",
"(",
"$",
"model",
")",
";",
"$",
"this",
"->",
"getPrimaryModel",
"(",
")",
"->",
"set",
"("... | Only one record at a time can be unlinked in a belongs to relation.
Also reset the foreign key attribute in the primary model.
@param \Titon\Model\Model $model
@return $this | [
"Only",
"one",
"record",
"at",
"a",
"time",
"can",
"be",
"unlinked",
"in",
"a",
"belongs",
"to",
"relation",
".",
"Also",
"reset",
"the",
"foreign",
"key",
"attribute",
"in",
"the",
"primary",
"model",
"."
] | 274e3810c2cfbb6818a388daaa462ff05de99cbd | https://github.com/titon/model/blob/274e3810c2cfbb6818a388daaa462ff05de99cbd/src/Titon/Model/Relation/ManyToOne.php#L140-L146 |
9,836 | PSESD/cascade-core-types | TypeTask/models/ObjectTask.php | ObjectTask.setCompletedStatus | public function setCompletedStatus($value)
{
if (empty($value)) {
$this->completed = null;
} elseif (empty($this->completed)) {
$this->completed = DateHelper::date($this->dbDateFormat . " " . $this->dbTimeFormat, time());
}
} | php | public function setCompletedStatus($value)
{
if (empty($value)) {
$this->completed = null;
} elseif (empty($this->completed)) {
$this->completed = DateHelper::date($this->dbDateFormat . " " . $this->dbTimeFormat, time());
}
} | [
"public",
"function",
"setCompletedStatus",
"(",
"$",
"value",
")",
"{",
"if",
"(",
"empty",
"(",
"$",
"value",
")",
")",
"{",
"$",
"this",
"->",
"completed",
"=",
"null",
";",
"}",
"elseif",
"(",
"empty",
"(",
"$",
"this",
"->",
"completed",
")",
... | Set completed status.
@param [[@doctodo param_type:value]] $value [[@doctodo param_description:value]] | [
"Set",
"completed",
"status",
"."
] | 5a2bc524bd89545f0f28230e34518c9f92e7db1f | https://github.com/PSESD/cascade-core-types/blob/5a2bc524bd89545f0f28230e34518c9f92e7db1f/TypeTask/models/ObjectTask.php#L169-L176 |
9,837 | oschildt/SmartFactory | src/SmartFactory/FactoryBuilder.php | FactoryBuilder.bindClass | static public function bindClass($interface_or_class, $class, $init_function = null)
{
if (empty($class)) {
throw new \Exception("Bound class is empty!");
}
if (empty($interface_or_class)) {
throw new \Exception("Bound interface or class is empty!");
... | php | static public function bindClass($interface_or_class, $class, $init_function = null)
{
if (empty($class)) {
throw new \Exception("Bound class is empty!");
}
if (empty($interface_or_class)) {
throw new \Exception("Bound interface or class is empty!");
... | [
"static",
"public",
"function",
"bindClass",
"(",
"$",
"interface_or_class",
",",
"$",
"class",
",",
"$",
"init_function",
"=",
"null",
")",
"{",
"if",
"(",
"empty",
"(",
"$",
"class",
")",
")",
"{",
"throw",
"new",
"\\",
"Exception",
"(",
"\"Bound class... | Binds a class to an interface or a parent class.
The key point of this approach is the definition common interfaces
and implementation of them in classes. When an object that supoorts an
interface is requested, an instance of the corresponding bound class
is created. When you want to change the class, you need just bi... | [
"Binds",
"a",
"class",
"to",
"an",
"interface",
"or",
"a",
"parent",
"class",
"."
] | efd289961a720d5f3103a3c696e2beee16e9644d | https://github.com/oschildt/SmartFactory/blob/efd289961a720d5f3103a3c696e2beee16e9644d/src/SmartFactory/FactoryBuilder.php#L97-L146 |
9,838 | marando/phpSOFA | src/Marando/IAU/iauBp00.php | iauBp00.Bp00 | public static function Bp00($date1, $date2, array &$rb, array &$rp,
array &$rbp) {
/* J2000.0 obliquity (Lieske et al. 1977) */
$EPS0 = 84381.448 * DAS2R;
$t;
$dpsibi;
$depsbi;
$dra0;
$psia77;
$oma77;
$chia;
$dpsipr;
$depspr;
$psia;
$oma;
$rbw = [];
... | php | public static function Bp00($date1, $date2, array &$rb, array &$rp,
array &$rbp) {
/* J2000.0 obliquity (Lieske et al. 1977) */
$EPS0 = 84381.448 * DAS2R;
$t;
$dpsibi;
$depsbi;
$dra0;
$psia77;
$oma77;
$chia;
$dpsipr;
$depspr;
$psia;
$oma;
$rbw = [];
... | [
"public",
"static",
"function",
"Bp00",
"(",
"$",
"date1",
",",
"$",
"date2",
",",
"array",
"&",
"$",
"rb",
",",
"array",
"&",
"$",
"rp",
",",
"array",
"&",
"$",
"rbp",
")",
"{",
"/* J2000.0 obliquity (Lieske et al. 1977) */",
"$",
"EPS0",
"=",
"84381.44... | - - - - - - - -
i a u B p 0 0
- - - - - - - -
Frame bias and precession, IAU 2000.
This function is part of the International Astronomical Union's
SOFA (Standards Of Fundamental Astronomy) software collection.
Status: canonical model.
Given:
date1,date2 double TT as a 2-part Julian Date (Note 1)
Returned... | [
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"i",
"a",
"u",
"B",
"p",
"0",
"0",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-"
] | 757fa49fe335ae1210eaa7735473fd4388b13f07 | https://github.com/marando/phpSOFA/blob/757fa49fe335ae1210eaa7735473fd4388b13f07/src/Marando/IAU/iauBp00.php#L86-L139 |
9,839 | XTAIN/JoomlaBundle | Debug/Debug.php | Debug.enable | public static function enable($errorReportingLevel = null, $displayErrors = true)
{
if (static::$enabled) {
return;
}
static::$enabled = true;
if (null !== $errorReportingLevel) {
error_reporting($errorReportingLevel);
} else {
error_repo... | php | public static function enable($errorReportingLevel = null, $displayErrors = true)
{
if (static::$enabled) {
return;
}
static::$enabled = true;
if (null !== $errorReportingLevel) {
error_reporting($errorReportingLevel);
} else {
error_repo... | [
"public",
"static",
"function",
"enable",
"(",
"$",
"errorReportingLevel",
"=",
"null",
",",
"$",
"displayErrors",
"=",
"true",
")",
"{",
"if",
"(",
"static",
"::",
"$",
"enabled",
")",
"{",
"return",
";",
"}",
"static",
"::",
"$",
"enabled",
"=",
"tru... | Enables the debug tools.
This method registers an error handler and an exception handler.
If the Symfony ClassLoader component is available, a special
class loader is also registered.
@param int $errorReportingLevel The level of error reporting you want
@param bool $displayErrors Whether to display errors (fo... | [
"Enables",
"the",
"debug",
"tools",
"."
] | 3d39e1278deba77c5a2197ad91973964ed2a38bd | https://github.com/XTAIN/JoomlaBundle/blob/3d39e1278deba77c5a2197ad91973964ed2a38bd/Debug/Debug.php#L27-L55 |
9,840 | slickframework/mvc | src/Renderer/HtmlExtension.php | HtmlExtension.addCss | public function addCss($file, $path='/css', $attr = [])
{
$attr = array_merge(['rel' => 'stylesheet'], $attr);
$output = [];
foreach ($attr as $name => $value) {
$output[] = "{$name}=\"{$value}\"";
}
$attr = implode(' ', $output);
$file = str_replace('//',... | php | public function addCss($file, $path='/css', $attr = [])
{
$attr = array_merge(['rel' => 'stylesheet'], $attr);
$output = [];
foreach ($attr as $name => $value) {
$output[] = "{$name}=\"{$value}\"";
}
$attr = implode(' ', $output);
$file = str_replace('//',... | [
"public",
"function",
"addCss",
"(",
"$",
"file",
",",
"$",
"path",
"=",
"'/css'",
",",
"$",
"attr",
"=",
"[",
"]",
")",
"{",
"$",
"attr",
"=",
"array_merge",
"(",
"[",
"'rel'",
"=>",
"'stylesheet'",
"]",
",",
"$",
"attr",
")",
";",
"$",
"output"... | Creates an HTML style tag
@param string $file
@param string $path
@param array $attr
@return string | [
"Creates",
"an",
"HTML",
"style",
"tag"
] | 91a6c512f8aaa5a7fb9c1a96f8012d2274dc30ab | https://github.com/slickframework/mvc/blob/91a6c512f8aaa5a7fb9c1a96f8012d2274dc30ab/src/Renderer/HtmlExtension.php#L107-L117 |
9,841 | GroundSix/password | src/Validators/PasswordBlacklistValidator.php | PasswordBlacklistValidator.getBlacklistPasswords | private function getBlacklistPasswords(): Generator
{
$fh = fopen($this->file, 'rb');
while (($password = fgets($fh)) !== false) {
yield trim($password);
}
fclose($fh);
} | php | private function getBlacklistPasswords(): Generator
{
$fh = fopen($this->file, 'rb');
while (($password = fgets($fh)) !== false) {
yield trim($password);
}
fclose($fh);
} | [
"private",
"function",
"getBlacklistPasswords",
"(",
")",
":",
"Generator",
"{",
"$",
"fh",
"=",
"fopen",
"(",
"$",
"this",
"->",
"file",
",",
"'rb'",
")",
";",
"while",
"(",
"(",
"$",
"password",
"=",
"fgets",
"(",
"$",
"fh",
")",
")",
"!==",
"fal... | Iterates over and yields each blacklisted password
@return Generator | [
"Iterates",
"over",
"and",
"yields",
"each",
"blacklisted",
"password"
] | 83241a362051c28f09cd7cdcd0fbd03918ce0a5b | https://github.com/GroundSix/password/blob/83241a362051c28f09cd7cdcd0fbd03918ce0a5b/src/Validators/PasswordBlacklistValidator.php#L41-L50 |
9,842 | rb-cohen/ical-php | src/Ical/Component/Event.php | Event.between | public function between(DateTime $start, DateTime $end) {
$this->start($start)
->end($end);
return $this;
} | php | public function between(DateTime $start, DateTime $end) {
$this->start($start)
->end($end);
return $this;
} | [
"public",
"function",
"between",
"(",
"DateTime",
"$",
"start",
",",
"DateTime",
"$",
"end",
")",
"{",
"$",
"this",
"->",
"start",
"(",
"$",
"start",
")",
"->",
"end",
"(",
"$",
"end",
")",
";",
"return",
"$",
"this",
";",
"}"
] | Shortcut from start and end dates
@param \DateTime $start
@param \DateTime $end
@return \Ical\Component\Event | [
"Shortcut",
"from",
"start",
"and",
"end",
"dates"
] | d041dc3aba67b4924c0a54ba19196ff88fc19f1f | https://github.com/rb-cohen/ical-php/blob/d041dc3aba67b4924c0a54ba19196ff88fc19f1f/src/Ical/Component/Event.php#L63-L68 |
9,843 | rb-cohen/ical-php | src/Ical/Component/Event.php | Event.on | public function on(DateTime $on) {
if ($on->format('His') !== '000000') {
throw new RuntimeException('One day events must start at midnight');
}
$fin = clone $on;
$fin->add(new \DateInterval('P1D'));
$this->start($on)
->end($fin)
->al... | php | public function on(DateTime $on) {
if ($on->format('His') !== '000000') {
throw new RuntimeException('One day events must start at midnight');
}
$fin = clone $on;
$fin->add(new \DateInterval('P1D'));
$this->start($on)
->end($fin)
->al... | [
"public",
"function",
"on",
"(",
"DateTime",
"$",
"on",
")",
"{",
"if",
"(",
"$",
"on",
"->",
"format",
"(",
"'His'",
")",
"!==",
"'000000'",
")",
"{",
"throw",
"new",
"RuntimeException",
"(",
"'One day events must start at midnight'",
")",
";",
"}",
"$",
... | One day helper
Sets event to a single day
@param \DateTime $on
@return \Ical\Component\Event | [
"One",
"day",
"helper",
"Sets",
"event",
"to",
"a",
"single",
"day"
] | d041dc3aba67b4924c0a54ba19196ff88fc19f1f | https://github.com/rb-cohen/ical-php/blob/d041dc3aba67b4924c0a54ba19196ff88fc19f1f/src/Ical/Component/Event.php#L77-L90 |
9,844 | mijohansen/php-gae-util | src/Fetch.php | Fetch.secureUrl | static public function secureUrl($url, $params = []) {
if (is_array($url)) {
$url = implode("/", $url);
}
$headers = [
"Authorization: Bearer " . JWT::getInternalToken()
];
$opts = [
"http" => [
"method" => "GET",
... | php | static public function secureUrl($url, $params = []) {
if (is_array($url)) {
$url = implode("/", $url);
}
$headers = [
"Authorization: Bearer " . JWT::getInternalToken()
];
$opts = [
"http" => [
"method" => "GET",
... | [
"static",
"public",
"function",
"secureUrl",
"(",
"$",
"url",
",",
"$",
"params",
"=",
"[",
"]",
")",
"{",
"if",
"(",
"is_array",
"(",
"$",
"url",
")",
")",
"{",
"$",
"url",
"=",
"implode",
"(",
"\"/\"",
",",
"$",
"url",
")",
";",
"}",
"$",
"... | Fetching an url secured by the Internal accesstoken.
Should be using guzzle just like other Google Api stuff
@param $url
@param array $params
@return mixed
@throws \Exception | [
"Fetching",
"an",
"url",
"secured",
"by",
"the",
"Internal",
"accesstoken",
".",
"Should",
"be",
"using",
"guzzle",
"just",
"like",
"other",
"Google",
"Api",
"stuff"
] | dfa7a1a4d61aa435351d6a5b1b120c0e23d81dde | https://github.com/mijohansen/php-gae-util/blob/dfa7a1a4d61aa435351d6a5b1b120c0e23d81dde/src/Fetch.php#L22-L47 |
9,845 | mijohansen/php-gae-util | src/Fetch.php | Fetch.secureUrlCached | static public function secureUrlCached($url, $params = []) {
if (is_array($url)) {
$url = implode("/", $url);
}
$cacheKey = Cached::keymaker(__METHOD__, $url, $params);
$cached = new Cached($cacheKey);
if (!$cached->exists()) {
$result = self::secureUrl($u... | php | static public function secureUrlCached($url, $params = []) {
if (is_array($url)) {
$url = implode("/", $url);
}
$cacheKey = Cached::keymaker(__METHOD__, $url, $params);
$cached = new Cached($cacheKey);
if (!$cached->exists()) {
$result = self::secureUrl($u... | [
"static",
"public",
"function",
"secureUrlCached",
"(",
"$",
"url",
",",
"$",
"params",
"=",
"[",
"]",
")",
"{",
"if",
"(",
"is_array",
"(",
"$",
"url",
")",
")",
"{",
"$",
"url",
"=",
"implode",
"(",
"\"/\"",
",",
"$",
"url",
")",
";",
"}",
"$... | Wrapper that caches hits towards an service. Internal or otherwise.
@param $url
@param array $params
@return mixed|\the
@throws \Exception | [
"Wrapper",
"that",
"caches",
"hits",
"towards",
"an",
"service",
".",
"Internal",
"or",
"otherwise",
"."
] | dfa7a1a4d61aa435351d6a5b1b120c0e23d81dde | https://github.com/mijohansen/php-gae-util/blob/dfa7a1a4d61aa435351d6a5b1b120c0e23d81dde/src/Fetch.php#L57-L69 |
9,846 | mijohansen/php-gae-util | src/Fetch.php | Fetch.internalService | static public function internalService($application_id, $service, $path, $params = []) {
$url = "https://$service-dot-$application_id.appspot.com" . $path;
return self::secureUrl($url, $params);
} | php | static public function internalService($application_id, $service, $path, $params = []) {
$url = "https://$service-dot-$application_id.appspot.com" . $path;
return self::secureUrl($url, $params);
} | [
"static",
"public",
"function",
"internalService",
"(",
"$",
"application_id",
",",
"$",
"service",
",",
"$",
"path",
",",
"$",
"params",
"=",
"[",
"]",
")",
"{",
"$",
"url",
"=",
"\"https://$service-dot-$application_id.appspot.com\"",
".",
"$",
"path",
";",
... | For internal service on Google App Engine. Basically just expands application and service
to the correct domain on App Engine. This url is the fastest url to use internally on
App engine, so this method is prefered for service to service communication.
@param $application_id
@param $service
@param $path
@param array $... | [
"For",
"internal",
"service",
"on",
"Google",
"App",
"Engine",
".",
"Basically",
"just",
"expands",
"application",
"and",
"service",
"to",
"the",
"correct",
"domain",
"on",
"App",
"Engine",
".",
"This",
"url",
"is",
"the",
"fastest",
"url",
"to",
"use",
"i... | dfa7a1a4d61aa435351d6a5b1b120c0e23d81dde | https://github.com/mijohansen/php-gae-util/blob/dfa7a1a4d61aa435351d6a5b1b120c0e23d81dde/src/Fetch.php#L83-L86 |
9,847 | itavero/AMNL-Mollie | lib/AMNL/Mollie/Client.php | Client.checkResponseForError | protected function checkResponseForError(\SimpleXMLElement $response)
{
if ($response->item != null && ((string) $response->item['type']) == 'error') {
throw new MollieServerErrorException((string) $response->item->message, intval($response->item->errorcode));
}
} | php | protected function checkResponseForError(\SimpleXMLElement $response)
{
if ($response->item != null && ((string) $response->item['type']) == 'error') {
throw new MollieServerErrorException((string) $response->item->message, intval($response->item->errorcode));
}
} | [
"protected",
"function",
"checkResponseForError",
"(",
"\\",
"SimpleXMLElement",
"$",
"response",
")",
"{",
"if",
"(",
"$",
"response",
"->",
"item",
"!=",
"null",
"&&",
"(",
"(",
"string",
")",
"$",
"response",
"->",
"item",
"[",
"'type'",
"]",
")",
"==... | Check if the given response contains an error, if so, it will
throw an exception.
@param \SimpleXMLElement $response
@throws \AMNL\Mollie\Exception\MollieServerErrorException | [
"Check",
"if",
"the",
"given",
"response",
"contains",
"an",
"error",
"if",
"so",
"it",
"will",
"throw",
"an",
"exception",
"."
] | 6254720a980eae86ac1f4340a54f2a13a3a5b74b | https://github.com/itavero/AMNL-Mollie/blob/6254720a980eae86ac1f4340a54f2a13a3a5b74b/lib/AMNL/Mollie/Client.php#L142-L147 |
9,848 | asbsoft/yii2-common_2_170212 | web/BaseRoutesBuilder.php | BaseRoutesBuilder.buildRoutes | public static function buildRoutes($routeConfig, $app = null)
{
$app = empty($app) ? Yii::$app : $app;
$rules = static::collectRoutes($routeConfig, $app);
$app->urlManager->addRules($rules, $routeConfig['append']);
} | php | public static function buildRoutes($routeConfig, $app = null)
{
$app = empty($app) ? Yii::$app : $app;
$rules = static::collectRoutes($routeConfig, $app);
$app->urlManager->addRules($rules, $routeConfig['append']);
} | [
"public",
"static",
"function",
"buildRoutes",
"(",
"$",
"routeConfig",
",",
"$",
"app",
"=",
"null",
")",
"{",
"$",
"app",
"=",
"empty",
"(",
"$",
"app",
")",
"?",
"Yii",
"::",
"$",
"app",
":",
"$",
"app",
";",
"$",
"rules",
"=",
"static",
"::",... | Build routes by routes config.
@param array $routeConfig
@param yii\base\Application $app | [
"Build",
"routes",
"by",
"routes",
"config",
"."
] | 6c58012ff89225d7d4e42b200cf39e009e9d9dac | https://github.com/asbsoft/yii2-common_2_170212/blob/6c58012ff89225d7d4e42b200cf39e009e9d9dac/web/BaseRoutesBuilder.php#L33-L38 |
9,849 | asbsoft/yii2-common_2_170212 | web/BaseRoutesBuilder.php | BaseRoutesBuilder.collectRoutes | public static function collectRoutes($routeConfig, $app = null)
{
$app = empty($app) ? Yii::$app : $app;
$rules = [];
if (isset($routeConfig['urlPrefix']) && $routeConfig['urlPrefix'] !== false && is_file($routeConfig['fileRoutes'])) {
//!! config file use var $routeConfig:
... | php | public static function collectRoutes($routeConfig, $app = null)
{
$app = empty($app) ? Yii::$app : $app;
$rules = [];
if (isset($routeConfig['urlPrefix']) && $routeConfig['urlPrefix'] !== false && is_file($routeConfig['fileRoutes'])) {
//!! config file use var $routeConfig:
... | [
"public",
"static",
"function",
"collectRoutes",
"(",
"$",
"routeConfig",
",",
"$",
"app",
"=",
"null",
")",
"{",
"$",
"app",
"=",
"empty",
"(",
"$",
"app",
")",
"?",
"Yii",
"::",
"$",
"app",
":",
"$",
"app",
";",
"$",
"rules",
"=",
"[",
"]",
"... | Collect routes by routes config.
@param array $routeConfig
@param yii\base\Application $app
@return yii\web\UrlRuleInterface[] rules for UrlManager | [
"Collect",
"routes",
"by",
"routes",
"config",
"."
] | 6c58012ff89225d7d4e42b200cf39e009e9d9dac | https://github.com/asbsoft/yii2-common_2_170212/blob/6c58012ff89225d7d4e42b200cf39e009e9d9dac/web/BaseRoutesBuilder.php#L46-L74 |
9,850 | asbsoft/yii2-common_2_170212 | web/BaseRoutesBuilder.php | BaseRoutesBuilder.properRule | public static function properRule($rule, $link)
{
if (isset($rule->pattern)) {
if (preg_match($rule->pattern, $link) > 0) return true;
}
if ($rule instanceof GroupUrlRule) {
foreach ($rule->rules as $nextRule) {
if (preg_match($nextRule->pattern, $link... | php | public static function properRule($rule, $link)
{
if (isset($rule->pattern)) {
if (preg_match($rule->pattern, $link) > 0) return true;
}
if ($rule instanceof GroupUrlRule) {
foreach ($rule->rules as $nextRule) {
if (preg_match($nextRule->pattern, $link... | [
"public",
"static",
"function",
"properRule",
"(",
"$",
"rule",
",",
"$",
"link",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"rule",
"->",
"pattern",
")",
")",
"{",
"if",
"(",
"preg_match",
"(",
"$",
"rule",
"->",
"pattern",
",",
"$",
"link",
")",
"... | Check if link will recognize by route's rule.
@return boolean true if found $rule correspond to $link | [
"Check",
"if",
"link",
"will",
"recognize",
"by",
"route",
"s",
"rule",
"."
] | 6c58012ff89225d7d4e42b200cf39e009e9d9dac | https://github.com/asbsoft/yii2-common_2_170212/blob/6c58012ff89225d7d4e42b200cf39e009e9d9dac/web/BaseRoutesBuilder.php#L138-L149 |
9,851 | n0m4dz/laracasa | Zend/Gdata/YouTube/VideoQuery.php | Zend_Gdata_YouTube_VideoQuery.setFeedType | public function setFeedType($feedType, $videoId = null, $entry = null)
{
switch ($feedType) {
case 'top rated':
$this->_url = Zend_Gdata_YouTube::STANDARD_TOP_RATED_URI;
break;
case 'most viewed':
$this->_url = Zend_Gdata_YouTube::STANDARD_MOST_VIEWED_URI;... | php | public function setFeedType($feedType, $videoId = null, $entry = null)
{
switch ($feedType) {
case 'top rated':
$this->_url = Zend_Gdata_YouTube::STANDARD_TOP_RATED_URI;
break;
case 'most viewed':
$this->_url = Zend_Gdata_YouTube::STANDARD_MOST_VIEWED_URI;... | [
"public",
"function",
"setFeedType",
"(",
"$",
"feedType",
",",
"$",
"videoId",
"=",
"null",
",",
"$",
"entry",
"=",
"null",
")",
"{",
"switch",
"(",
"$",
"feedType",
")",
"{",
"case",
"'top rated'",
":",
"$",
"this",
"->",
"_url",
"=",
"Zend_Gdata_You... | Sets the type of feed this query should be used to search
@param string $feedType The type of feed
@param string $videoId The ID of the video associated with this query
@param string $entry The ID of the entry associated with this query | [
"Sets",
"the",
"type",
"of",
"feed",
"this",
"query",
"should",
"be",
"used",
"to",
"search"
] | 6141f0c16c7d4453275e3b74be5041f336085c91 | https://github.com/n0m4dz/laracasa/blob/6141f0c16c7d4453275e3b74be5041f336085c91/Zend/Gdata/YouTube/VideoQuery.php#L63-L116 |
9,852 | n0m4dz/laracasa | Zend/Gdata/YouTube/VideoQuery.php | Zend_Gdata_YouTube_VideoQuery.setLocation | public function setLocation($value)
{
switch($value) {
case null:
unset($this->_params['location']);
default:
$parameters = explode(',', $value);
if (count($parameters) != 2) {
require_once 'Zend/Gdata/App/InvalidArg... | php | public function setLocation($value)
{
switch($value) {
case null:
unset($this->_params['location']);
default:
$parameters = explode(',', $value);
if (count($parameters) != 2) {
require_once 'Zend/Gdata/App/InvalidArg... | [
"public",
"function",
"setLocation",
"(",
"$",
"value",
")",
"{",
"switch",
"(",
"$",
"value",
")",
"{",
"case",
"null",
":",
"unset",
"(",
"$",
"this",
"->",
"_params",
"[",
"'location'",
"]",
")",
";",
"default",
":",
"$",
"parameters",
"=",
"explo... | Sets the location parameter for the query
@param string $value
@throws Zend_Gdata_App_InvalidArgumentException
@return Zend_Gdata_YouTube_VideoQuery Provides a fluent interface | [
"Sets",
"the",
"location",
"parameter",
"for",
"the",
"query"
] | 6141f0c16c7d4453275e3b74be5041f336085c91 | https://github.com/n0m4dz/laracasa/blob/6141f0c16c7d4453275e3b74be5041f336085c91/Zend/Gdata/YouTube/VideoQuery.php#L125-L154 |
9,853 | n0m4dz/laracasa | Zend/Gdata/YouTube/VideoQuery.php | Zend_Gdata_YouTube_VideoQuery.setTime | public function setTime($value = null)
{
switch ($value) {
case 'today':
$this->_params['time'] = 'today';
break;
case 'this_week':
$this->_params['time'] = 'this_week';
break;
case 'this_month':
... | php | public function setTime($value = null)
{
switch ($value) {
case 'today':
$this->_params['time'] = 'today';
break;
case 'this_week':
$this->_params['time'] = 'this_week';
break;
case 'this_month':
... | [
"public",
"function",
"setTime",
"(",
"$",
"value",
"=",
"null",
")",
"{",
"switch",
"(",
"$",
"value",
")",
"{",
"case",
"'today'",
":",
"$",
"this",
"->",
"_params",
"[",
"'time'",
"]",
"=",
"'today'",
";",
"break",
";",
"case",
"'this_week'",
":",... | Sets the time period over which this query should apply
@param string $value
@throws Zend_Gdata_App_InvalidArgumentException
@return Zend_Gdata_YouTube_VideoQuery Provides a fluent interface | [
"Sets",
"the",
"time",
"period",
"over",
"which",
"this",
"query",
"should",
"apply"
] | 6141f0c16c7d4453275e3b74be5041f336085c91 | https://github.com/n0m4dz/laracasa/blob/6141f0c16c7d4453275e3b74be5041f336085c91/Zend/Gdata/YouTube/VideoQuery.php#L209-L233 |
9,854 | n0m4dz/laracasa | Zend/Gdata/YouTube/VideoQuery.php | Zend_Gdata_YouTube_VideoQuery.setUploader | public function setUploader($value = null)
{
switch ($value) {
case 'partner':
$this->_params['uploader'] = 'partner';
break;
case null:
unset($this->_params['uploader']);
break;
default:
requ... | php | public function setUploader($value = null)
{
switch ($value) {
case 'partner':
$this->_params['uploader'] = 'partner';
break;
case null:
unset($this->_params['uploader']);
break;
default:
requ... | [
"public",
"function",
"setUploader",
"(",
"$",
"value",
"=",
"null",
")",
"{",
"switch",
"(",
"$",
"value",
")",
"{",
"case",
"'partner'",
":",
"$",
"this",
"->",
"_params",
"[",
"'uploader'",
"]",
"=",
"'partner'",
";",
"break",
";",
"case",
"null",
... | Sets the value of the uploader parameter
@param string $value The value of the uploader parameter. Currently this
can only be set to the value of 'partner'.
@throws Zend_Gdata_App_InvalidArgumentException
@return Zend_Gdata_YouTube_VideoQuery Provides a fluent interface | [
"Sets",
"the",
"value",
"of",
"the",
"uploader",
"parameter"
] | 6141f0c16c7d4453275e3b74be5041f336085c91 | https://github.com/n0m4dz/laracasa/blob/6141f0c16c7d4453275e3b74be5041f336085c91/Zend/Gdata/YouTube/VideoQuery.php#L243-L258 |
9,855 | n0m4dz/laracasa | Zend/Gdata/YouTube/VideoQuery.php | Zend_Gdata_YouTube_VideoQuery.setFormat | public function setFormat($value = null)
{
if ($value != null) {
$this->_params['format'] = $value;
} else {
unset($this->_params['format']);
}
return $this;
} | php | public function setFormat($value = null)
{
if ($value != null) {
$this->_params['format'] = $value;
} else {
unset($this->_params['format']);
}
return $this;
} | [
"public",
"function",
"setFormat",
"(",
"$",
"value",
"=",
"null",
")",
"{",
"if",
"(",
"$",
"value",
"!=",
"null",
")",
"{",
"$",
"this",
"->",
"_params",
"[",
"'format'",
"]",
"=",
"$",
"value",
";",
"}",
"else",
"{",
"unset",
"(",
"$",
"this",... | Sets the param to return videos of a specific format
@param string $value
@return Zend_Gdata_YouTube_VideoQuery Provides a fluent interface | [
"Sets",
"the",
"param",
"to",
"return",
"videos",
"of",
"a",
"specific",
"format"
] | 6141f0c16c7d4453275e3b74be5041f336085c91 | https://github.com/n0m4dz/laracasa/blob/6141f0c16c7d4453275e3b74be5041f336085c91/Zend/Gdata/YouTube/VideoQuery.php#L282-L290 |
9,856 | n0m4dz/laracasa | Zend/Gdata/YouTube/VideoQuery.php | Zend_Gdata_YouTube_VideoQuery.setRacy | public function setRacy($value = null)
{
switch ($value) {
case 'include':
$this->_params['racy'] = $value;
break;
case 'exclude':
$this->_params['racy'] = $value;
break;
case null:
unset($thi... | php | public function setRacy($value = null)
{
switch ($value) {
case 'include':
$this->_params['racy'] = $value;
break;
case 'exclude':
$this->_params['racy'] = $value;
break;
case null:
unset($thi... | [
"public",
"function",
"setRacy",
"(",
"$",
"value",
"=",
"null",
")",
"{",
"switch",
"(",
"$",
"value",
")",
"{",
"case",
"'include'",
":",
"$",
"this",
"->",
"_params",
"[",
"'racy'",
"]",
"=",
"$",
"value",
";",
"break",
";",
"case",
"'exclude'",
... | Sets whether or not to include racy videos in the search results
@param string $value
@return Zend_Gdata_YouTube_VideoQuery Provides a fluent interface | [
"Sets",
"whether",
"or",
"not",
"to",
"include",
"racy",
"videos",
"in",
"the",
"search",
"results"
] | 6141f0c16c7d4453275e3b74be5041f336085c91 | https://github.com/n0m4dz/laracasa/blob/6141f0c16c7d4453275e3b74be5041f336085c91/Zend/Gdata/YouTube/VideoQuery.php#L298-L312 |
9,857 | n0m4dz/laracasa | Zend/Gdata/YouTube/VideoQuery.php | Zend_Gdata_YouTube_VideoQuery.setSafeSearch | public function setSafeSearch($value)
{
switch ($value) {
case 'none':
$this->_params['safeSearch'] = 'none';
break;
case 'moderate':
$this->_params['safeSearch'] = 'moderate';
break;
case 'strict':
... | php | public function setSafeSearch($value)
{
switch ($value) {
case 'none':
$this->_params['safeSearch'] = 'none';
break;
case 'moderate':
$this->_params['safeSearch'] = 'moderate';
break;
case 'strict':
... | [
"public",
"function",
"setSafeSearch",
"(",
"$",
"value",
")",
"{",
"switch",
"(",
"$",
"value",
")",
"{",
"case",
"'none'",
":",
"$",
"this",
"->",
"_params",
"[",
"'safeSearch'",
"]",
"=",
"'none'",
";",
"break",
";",
"case",
"'moderate'",
":",
"$",
... | Set the safeSearch parameter
@param string $value The value of the parameter, currently only 'none',
'moderate' or 'strict' are allowed values.
@throws Zend_Gdata_App_InvalidArgumentException
@return Zend_Gdata_YouTube_VideoQuery Provides a fluent interface | [
"Set",
"the",
"safeSearch",
"parameter"
] | 6141f0c16c7d4453275e3b74be5041f336085c91 | https://github.com/n0m4dz/laracasa/blob/6141f0c16c7d4453275e3b74be5041f336085c91/Zend/Gdata/YouTube/VideoQuery.php#L336-L356 |
9,858 | n0m4dz/laracasa | Zend/Gdata/YouTube/VideoQuery.php | Zend_Gdata_YouTube_VideoQuery.getQueryString | public function getQueryString($majorProtocolVersion = null,
$minorProtocolVersion = null)
{
$queryArray = array();
foreach ($this->_params as $name => $value) {
if (substr($name, 0, 1) == '_') {
continue;
}
switch($name) {
... | php | public function getQueryString($majorProtocolVersion = null,
$minorProtocolVersion = null)
{
$queryArray = array();
foreach ($this->_params as $name => $value) {
if (substr($name, 0, 1) == '_') {
continue;
}
switch($name) {
... | [
"public",
"function",
"getQueryString",
"(",
"$",
"majorProtocolVersion",
"=",
"null",
",",
"$",
"minorProtocolVersion",
"=",
"null",
")",
"{",
"$",
"queryArray",
"=",
"array",
"(",
")",
";",
"foreach",
"(",
"$",
"this",
"->",
"_params",
"as",
"$",
"name",... | Generate the query string from the URL parameters, optionally modifying
them based on protocol version.
@param integer $majorProtocolVersion The major protocol version
@param integer $minorProtocolVersion The minor protocol version
@throws Zend_Gdata_App_VersionException
@return string querystring | [
"Generate",
"the",
"query",
"string",
"from",
"the",
"URL",
"parameters",
"optionally",
"modifying",
"them",
"based",
"on",
"protocol",
"version",
"."
] | 6141f0c16c7d4453275e3b74be5041f336085c91 | https://github.com/n0m4dz/laracasa/blob/6141f0c16c7d4453275e3b74be5041f336085c91/Zend/Gdata/YouTube/VideoQuery.php#L454-L514 |
9,859 | n0m4dz/laracasa | Zend/Gdata/YouTube/VideoQuery.php | Zend_Gdata_YouTube_VideoQuery.getQueryUrl | public function getQueryUrl($majorProtocolVersion = null,
$minorProtocolVersion = null)
{
if (isset($this->_url)) {
$url = $this->_url;
} else {
$url = Zend_Gdata_YouTube::VIDEO_URI;
}
if ($this->getCategory() !== null) {
$url .= '/-/' . $t... | php | public function getQueryUrl($majorProtocolVersion = null,
$minorProtocolVersion = null)
{
if (isset($this->_url)) {
$url = $this->_url;
} else {
$url = Zend_Gdata_YouTube::VIDEO_URI;
}
if ($this->getCategory() !== null) {
$url .= '/-/' . $t... | [
"public",
"function",
"getQueryUrl",
"(",
"$",
"majorProtocolVersion",
"=",
"null",
",",
"$",
"minorProtocolVersion",
"=",
"null",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"_url",
")",
")",
"{",
"$",
"url",
"=",
"$",
"this",
"->",
"_url",
... | Returns the generated full query URL, optionally modifying it based on
the protocol version.
@param integer $majorProtocolVersion The major protocol version
@param integer $minorProtocolVersion The minor protocol version
@return string The URL | [
"Returns",
"the",
"generated",
"full",
"query",
"URL",
"optionally",
"modifying",
"it",
"based",
"on",
"the",
"protocol",
"version",
"."
] | 6141f0c16c7d4453275e3b74be5041f336085c91 | https://github.com/n0m4dz/laracasa/blob/6141f0c16c7d4453275e3b74be5041f336085c91/Zend/Gdata/YouTube/VideoQuery.php#L524-L538 |
9,860 | marando/phpSOFA | src/Marando/IAU/iauGst00b.php | iauGst00b.Gst00b | public static function Gst00b($uta, $utb) {
$gmst00;
$ee00b;
$gst;
$gmst00 = IAU::Gmst00($uta, $utb, $uta, $utb);
$ee00b = IAU::Ee00b($uta, $utb);
$gst = IAU::Anp($gmst00 + $ee00b);
return $gst;
} | php | public static function Gst00b($uta, $utb) {
$gmst00;
$ee00b;
$gst;
$gmst00 = IAU::Gmst00($uta, $utb, $uta, $utb);
$ee00b = IAU::Ee00b($uta, $utb);
$gst = IAU::Anp($gmst00 + $ee00b);
return $gst;
} | [
"public",
"static",
"function",
"Gst00b",
"(",
"$",
"uta",
",",
"$",
"utb",
")",
"{",
"$",
"gmst00",
";",
"$",
"ee00b",
";",
"$",
"gst",
";",
"$",
"gmst00",
"=",
"IAU",
"::",
"Gmst00",
"(",
"$",
"uta",
",",
"$",
"utb",
",",
"$",
"uta",
",",
"... | - - - - - - - - - -
i a u G s t 0 0 b
- - - - - - - - - -
Greenwich apparent sidereal time (consistent with IAU 2000
resolutions but using the truncated nutation model IAU 2000B).
This function is part of the International Astronomical Union's
SOFA (Standards Of Fundamental Astronomy) software collection.
Status: s... | [
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"i",
"a",
"u",
"G",
"s",
"t",
"0",
"0",
"b",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-",
"-"
] | 757fa49fe335ae1210eaa7735473fd4388b13f07 | https://github.com/marando/phpSOFA/blob/757fa49fe335ae1210eaa7735473fd4388b13f07/src/Marando/IAU/iauGst00b.php#L94-L104 |
9,861 | tasoftch/config | src/ConfigurableTrait.php | ConfigurableTrait.setConfiguration | public function setConfiguration($config) {
if(!($config instanceof Config))
$config = new Config($config);
$this->config = $config;
} | php | public function setConfiguration($config) {
if(!($config instanceof Config))
$config = new Config($config);
$this->config = $config;
} | [
"public",
"function",
"setConfiguration",
"(",
"$",
"config",
")",
"{",
"if",
"(",
"!",
"(",
"$",
"config",
"instanceof",
"Config",
")",
")",
"$",
"config",
"=",
"new",
"Config",
"(",
"$",
"config",
")",
";",
"$",
"this",
"->",
"config",
"=",
"$",
... | Sets the configuration of the instance
@param iterable|Config $config | [
"Sets",
"the",
"configuration",
"of",
"the",
"instance"
] | 4937668bd7d56150edf3a77de5d529db6f6a4a80 | https://github.com/tasoftch/config/blob/4937668bd7d56150edf3a77de5d529db6f6a4a80/src/ConfigurableTrait.php#L40-L44 |
9,862 | sndatabase/core | src/Result.php | Result.setFetchMode | public function setFetchMode($mode, $complement_info = null, array $ctor_args = array()) {
$this->fetchMode = new FetchMode($mode, $complement_info, $ctor_args);
} | php | public function setFetchMode($mode, $complement_info = null, array $ctor_args = array()) {
$this->fetchMode = new FetchMode($mode, $complement_info, $ctor_args);
} | [
"public",
"function",
"setFetchMode",
"(",
"$",
"mode",
",",
"$",
"complement_info",
"=",
"null",
",",
"array",
"$",
"ctor_args",
"=",
"array",
"(",
")",
")",
"{",
"$",
"this",
"->",
"fetchMode",
"=",
"new",
"FetchMode",
"(",
"$",
"mode",
",",
"$",
"... | Sets fetch mode for this result set
@param int $mode Fetch mode : combinaison of constants DB::FETCH_*
@param mixed $complement_info For some modes : additionnal information
@param array $ctor_args For DB::FETCH_CLASS : constructor argument list
@see FetchMode | [
"Sets",
"fetch",
"mode",
"for",
"this",
"result",
"set"
] | 8645b71f1cb437a845fcf12ae742655dd874b229 | https://github.com/sndatabase/core/blob/8645b71f1cb437a845fcf12ae742655dd874b229/src/Result.php#L100-L102 |
9,863 | sndatabase/core | src/Result.php | Result.setCursorMode | public function setCursorMode($mode) {
switch($mode) {
case DB::CURSOR_FIRST:
case DB::CURSOR_PREV:
case DB::CURSOR_NEXT:
case DB::CURSOR_LAST:
$this->cursorMode = $mode;
break;
default:
throw new \Invali... | php | public function setCursorMode($mode) {
switch($mode) {
case DB::CURSOR_FIRST:
case DB::CURSOR_PREV:
case DB::CURSOR_NEXT:
case DB::CURSOR_LAST:
$this->cursorMode = $mode;
break;
default:
throw new \Invali... | [
"public",
"function",
"setCursorMode",
"(",
"$",
"mode",
")",
"{",
"switch",
"(",
"$",
"mode",
")",
"{",
"case",
"DB",
"::",
"CURSOR_FIRST",
":",
"case",
"DB",
"::",
"CURSOR_PREV",
":",
"case",
"DB",
"::",
"CURSOR_NEXT",
":",
"case",
"DB",
"::",
"CURSO... | Sets cursor fetching mode for next fetch
@param int $mode Constant DB::CURSOR_*
@throws \InvalidArgumentException | [
"Sets",
"cursor",
"fetching",
"mode",
"for",
"next",
"fetch"
] | 8645b71f1cb437a845fcf12ae742655dd874b229 | https://github.com/sndatabase/core/blob/8645b71f1cb437a845fcf12ae742655dd874b229/src/Result.php#L109-L120 |
9,864 | sndatabase/core | src/Result.php | Result.prefetch | final private function prefetch() {
static $prefetched = false;
if(!$prefetched) {
$prefetched = true;
while($row = $this->doFetch()) $this->prefetched[] = $row;
}
} | php | final private function prefetch() {
static $prefetched = false;
if(!$prefetched) {
$prefetched = true;
while($row = $this->doFetch()) $this->prefetched[] = $row;
}
} | [
"final",
"private",
"function",
"prefetch",
"(",
")",
"{",
"static",
"$",
"prefetched",
"=",
"false",
";",
"if",
"(",
"!",
"$",
"prefetched",
")",
"{",
"$",
"prefetched",
"=",
"true",
";",
"while",
"(",
"$",
"row",
"=",
"$",
"this",
"->",
"doFetch",
... | Prefetch method allows to load in memory all the rows quickly and allows for a faster acces with scrollable possibilities.
@staticvar boolean $prefetched Variable checking if prefetch has already been done. If so, won't be done a second time. | [
"Prefetch",
"method",
"allows",
"to",
"load",
"in",
"memory",
"all",
"the",
"rows",
"quickly",
"and",
"allows",
"for",
"a",
"faster",
"acces",
"with",
"scrollable",
"possibilities",
"."
] | 8645b71f1cb437a845fcf12ae742655dd874b229 | https://github.com/sndatabase/core/blob/8645b71f1cb437a845fcf12ae742655dd874b229/src/Result.php#L132-L138 |
9,865 | sndatabase/core | src/Result.php | Result.parseFetched | final private function parseFetched(array $row, FetchMode $fetchmode) {
foreach($row as $tag => $value) {
if(isset($this->parameters[$tag])) {
$param =& $this->parameters[$tag]['param'];
$type = $this->parameters[$tag]['type'];
$param = $this->connecti... | php | final private function parseFetched(array $row, FetchMode $fetchmode) {
foreach($row as $tag => $value) {
if(isset($this->parameters[$tag])) {
$param =& $this->parameters[$tag]['param'];
$type = $this->parameters[$tag]['type'];
$param = $this->connecti... | [
"final",
"private",
"function",
"parseFetched",
"(",
"array",
"$",
"row",
",",
"FetchMode",
"$",
"fetchmode",
")",
"{",
"foreach",
"(",
"$",
"row",
"as",
"$",
"tag",
"=>",
"$",
"value",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"parameter... | Parse a fetched row, using fetch mode.
This method also populates bound columns.
@param array $row Fetched row to parse
@param FetchMode $fetchmode Fetch mode to use
@return mixed Fetched row, after transformation and parsing based on fetch mode | [
"Parse",
"a",
"fetched",
"row",
"using",
"fetch",
"mode",
".",
"This",
"method",
"also",
"populates",
"bound",
"columns",
"."
] | 8645b71f1cb437a845fcf12ae742655dd874b229 | https://github.com/sndatabase/core/blob/8645b71f1cb437a845fcf12ae742655dd874b229/src/Result.php#L147-L185 |
9,866 | sndatabase/core | src/Result.php | Result.fetch | public function fetch($mode = null, $complement_info = null, array $ctor_args = array()) {
$fetchmode = is_null($mode) ? $this->fetchMode : new FetchMode($mode, $complement_info, $ctor_args);
/* @var $fetchmode FetchMode */
switch($this->cursorMode) {
case DB::CURSOR_FIRST:
... | php | public function fetch($mode = null, $complement_info = null, array $ctor_args = array()) {
$fetchmode = is_null($mode) ? $this->fetchMode : new FetchMode($mode, $complement_info, $ctor_args);
/* @var $fetchmode FetchMode */
switch($this->cursorMode) {
case DB::CURSOR_FIRST:
... | [
"public",
"function",
"fetch",
"(",
"$",
"mode",
"=",
"null",
",",
"$",
"complement_info",
"=",
"null",
",",
"array",
"$",
"ctor_args",
"=",
"array",
"(",
")",
")",
"{",
"$",
"fetchmode",
"=",
"is_null",
"(",
"$",
"mode",
")",
"?",
"$",
"this",
"->... | Fetches next row
@param int|null $mode New fetch mode. If null, the result set default fetch mode is used.
@param mixed $complement_info For some fetch modes, additionnal information
@param array $ctor_args For DB::FETCH_CLASS : list of constructor arguments
@return mixed|boolean Fetched row, false if none left.
@see R... | [
"Fetches",
"next",
"row"
] | 8645b71f1cb437a845fcf12ae742655dd874b229 | https://github.com/sndatabase/core/blob/8645b71f1cb437a845fcf12ae742655dd874b229/src/Result.php#L195-L214 |
9,867 | sndatabase/core | src/Result.php | Result.fetchAll | public function fetchAll($mode = null, $complement_info = null, array $ctor_args = array()) {
$fetchmode = is_null($mode) ? $this->fetchMode : new FetchMode($mode, $complement_info, $ctor_args);
/* @var $fetchmode FetchMode */
$rows = array();
foreach($this->prefetched as $row) {
... | php | public function fetchAll($mode = null, $complement_info = null, array $ctor_args = array()) {
$fetchmode = is_null($mode) ? $this->fetchMode : new FetchMode($mode, $complement_info, $ctor_args);
/* @var $fetchmode FetchMode */
$rows = array();
foreach($this->prefetched as $row) {
... | [
"public",
"function",
"fetchAll",
"(",
"$",
"mode",
"=",
"null",
",",
"$",
"complement_info",
"=",
"null",
",",
"array",
"$",
"ctor_args",
"=",
"array",
"(",
")",
")",
"{",
"$",
"fetchmode",
"=",
"is_null",
"(",
"$",
"mode",
")",
"?",
"$",
"this",
... | Fetches all found rows as an array
@param int|null $mode Fetch mode to use. If null, will use the result set default fetch mode
@param mixed $complement_info For some fetch modes, additionnal information
@param array $ctor_args For DB::FETCH_CLASS : list of constructor arguments
@return array list of fetched rows
@see ... | [
"Fetches",
"all",
"found",
"rows",
"as",
"an",
"array"
] | 8645b71f1cb437a845fcf12ae742655dd874b229 | https://github.com/sndatabase/core/blob/8645b71f1cb437a845fcf12ae742655dd874b229/src/Result.php#L224-L238 |
9,868 | dotfilesphp/core | ApplicationFactory.php | ApplicationFactory.loadDirectoryFromAutoloader | private function loadDirectoryFromAutoloader()
{
$spl = spl_autoload_functions();
$dirs = array();
foreach ($spl as $item) {
$object = $item[0];
if (!$object instanceof ClassLoader) {
continue;
}
$temp = array_merge($object->ge... | php | private function loadDirectoryFromAutoloader()
{
$spl = spl_autoload_functions();
$dirs = array();
foreach ($spl as $item) {
$object = $item[0];
if (!$object instanceof ClassLoader) {
continue;
}
$temp = array_merge($object->ge... | [
"private",
"function",
"loadDirectoryFromAutoloader",
"(",
")",
"{",
"$",
"spl",
"=",
"spl_autoload_functions",
"(",
")",
";",
"$",
"dirs",
"=",
"array",
"(",
")",
";",
"foreach",
"(",
"$",
"spl",
"as",
"$",
"item",
")",
"{",
"$",
"object",
"=",
"$",
... | Load available plugins directory.
@return array | [
"Load",
"available",
"plugins",
"directory",
"."
] | d55e44449cf67e9d56a22863447fd782c88d9b2d | https://github.com/dotfilesphp/core/blob/d55e44449cf67e9d56a22863447fd782c88d9b2d/ApplicationFactory.php#L233-L258 |
9,869 | dotfilesphp/core | ApplicationFactory.php | ApplicationFactory.loadPlugins | private function loadPlugins(): void
{
$finder = Finder::create();
$finder
->name('*Plugin.php')
;
if (is_dir($dir = __DIR__.'/../Plugins')) {
$finder->in(__DIR__.'/../Plugins');
}
$dirs = $this->loadDirectoryFromAutoloader();
$finder->... | php | private function loadPlugins(): void
{
$finder = Finder::create();
$finder
->name('*Plugin.php')
;
if (is_dir($dir = __DIR__.'/../Plugins')) {
$finder->in(__DIR__.'/../Plugins');
}
$dirs = $this->loadDirectoryFromAutoloader();
$finder->... | [
"private",
"function",
"loadPlugins",
"(",
")",
":",
"void",
"{",
"$",
"finder",
"=",
"Finder",
"::",
"create",
"(",
")",
";",
"$",
"finder",
"->",
"name",
"(",
"'*Plugin.php'",
")",
";",
"if",
"(",
"is_dir",
"(",
"$",
"dir",
"=",
"__DIR__",
".",
"... | Load available plugins. | [
"Load",
"available",
"plugins",
"."
] | d55e44449cf67e9d56a22863447fd782c88d9b2d | https://github.com/dotfilesphp/core/blob/d55e44449cf67e9d56a22863447fd782c88d9b2d/ApplicationFactory.php#L304-L324 |
9,870 | dotfilesphp/core | ApplicationFactory.php | ApplicationFactory.registerPlugin | private function registerPlugin(Plugin $plugin): void
{
if ($this->hasPlugin($plugin->getName())) {
return;
}
$this->plugins[$plugin->getName()] = $plugin;
} | php | private function registerPlugin(Plugin $plugin): void
{
if ($this->hasPlugin($plugin->getName())) {
return;
}
$this->plugins[$plugin->getName()] = $plugin;
} | [
"private",
"function",
"registerPlugin",
"(",
"Plugin",
"$",
"plugin",
")",
":",
"void",
"{",
"if",
"(",
"$",
"this",
"->",
"hasPlugin",
"(",
"$",
"plugin",
"->",
"getName",
"(",
")",
")",
")",
"{",
"return",
";",
"}",
"$",
"this",
"->",
"plugins",
... | Register plugin.
@param Plugin $plugin | [
"Register",
"plugin",
"."
] | d55e44449cf67e9d56a22863447fd782c88d9b2d | https://github.com/dotfilesphp/core/blob/d55e44449cf67e9d56a22863447fd782c88d9b2d/ApplicationFactory.php#L346-L353 |
9,871 | gossi/trixionary | src/model/Base/VideoQuery.php | VideoQuery.filterByIsTutorial | public function filterByIsTutorial($isTutorial = null, $comparison = null)
{
if (is_string($isTutorial)) {
$isTutorial = in_array(strtolower($isTutorial), array('false', 'off', '-', 'no', 'n', '0', '')) ? false : true;
}
return $this->addUsingAlias(VideoTableMap::COL_IS_TUTORIAL... | php | public function filterByIsTutorial($isTutorial = null, $comparison = null)
{
if (is_string($isTutorial)) {
$isTutorial = in_array(strtolower($isTutorial), array('false', 'off', '-', 'no', 'n', '0', '')) ? false : true;
}
return $this->addUsingAlias(VideoTableMap::COL_IS_TUTORIAL... | [
"public",
"function",
"filterByIsTutorial",
"(",
"$",
"isTutorial",
"=",
"null",
",",
"$",
"comparison",
"=",
"null",
")",
"{",
"if",
"(",
"is_string",
"(",
"$",
"isTutorial",
")",
")",
"{",
"$",
"isTutorial",
"=",
"in_array",
"(",
"strtolower",
"(",
"$"... | Filter the query on the is_tutorial column
Example usage:
<code>
$query->filterByIsTutorial(true); // WHERE is_tutorial = true
$query->filterByIsTutorial('yes'); // WHERE is_tutorial = true
</code>
@param boolean|string $isTutorial The value to use as filter.
Non-boolean arguments are converted using the followin... | [
"Filter",
"the",
"query",
"on",
"the",
"is_tutorial",
"column"
] | 221a6c5322473d7d7f8e322958a3ee46d87da150 | https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/VideoQuery.php#L464-L471 |
9,872 | gossi/trixionary | src/model/Base/VideoQuery.php | VideoQuery.filterByAthleteId | public function filterByAthleteId($athleteId = null, $comparison = null)
{
if (is_array($athleteId)) {
$useMinMax = false;
if (isset($athleteId['min'])) {
$this->addUsingAlias(VideoTableMap::COL_ATHLETE_ID, $athleteId['min'], Criteria::GREATER_EQUAL);
... | php | public function filterByAthleteId($athleteId = null, $comparison = null)
{
if (is_array($athleteId)) {
$useMinMax = false;
if (isset($athleteId['min'])) {
$this->addUsingAlias(VideoTableMap::COL_ATHLETE_ID, $athleteId['min'], Criteria::GREATER_EQUAL);
... | [
"public",
"function",
"filterByAthleteId",
"(",
"$",
"athleteId",
"=",
"null",
",",
"$",
"comparison",
"=",
"null",
")",
"{",
"if",
"(",
"is_array",
"(",
"$",
"athleteId",
")",
")",
"{",
"$",
"useMinMax",
"=",
"false",
";",
"if",
"(",
"isset",
"(",
"... | Filter the query on the athlete_id column
Example usage:
<code>
$query->filterByAthleteId(1234); // WHERE athlete_id = 1234
$query->filterByAthleteId(array(12, 34)); // WHERE athlete_id IN (12, 34)
$query->filterByAthleteId(array('min' => 12)); // WHERE athlete_id > 12
</code>
@param mixed $athleteId The value to... | [
"Filter",
"the",
"query",
"on",
"the",
"athlete_id",
"column"
] | 221a6c5322473d7d7f8e322958a3ee46d87da150 | https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/VideoQuery.php#L520-L541 |
9,873 | gossi/trixionary | src/model/Base/VideoQuery.php | VideoQuery.filterByUploaderId | public function filterByUploaderId($uploaderId = null, $comparison = null)
{
if (is_array($uploaderId)) {
$useMinMax = false;
if (isset($uploaderId['min'])) {
$this->addUsingAlias(VideoTableMap::COL_UPLOADER_ID, $uploaderId['min'], Criteria::GREATER_EQUAL);
... | php | public function filterByUploaderId($uploaderId = null, $comparison = null)
{
if (is_array($uploaderId)) {
$useMinMax = false;
if (isset($uploaderId['min'])) {
$this->addUsingAlias(VideoTableMap::COL_UPLOADER_ID, $uploaderId['min'], Criteria::GREATER_EQUAL);
... | [
"public",
"function",
"filterByUploaderId",
"(",
"$",
"uploaderId",
"=",
"null",
",",
"$",
"comparison",
"=",
"null",
")",
"{",
"if",
"(",
"is_array",
"(",
"$",
"uploaderId",
")",
")",
"{",
"$",
"useMinMax",
"=",
"false",
";",
"if",
"(",
"isset",
"(",
... | Filter the query on the uploader_id column
Example usage:
<code>
$query->filterByUploaderId(1234); // WHERE uploader_id = 1234
$query->filterByUploaderId(array(12, 34)); // WHERE uploader_id IN (12, 34)
$query->filterByUploaderId(array('min' => 12)); // WHERE uploader_id > 12
</code>
@param mixed $uploaderId The ... | [
"Filter",
"the",
"query",
"on",
"the",
"uploader_id",
"column"
] | 221a6c5322473d7d7f8e322958a3ee46d87da150 | https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/VideoQuery.php#L561-L582 |
9,874 | gossi/trixionary | src/model/Base/VideoQuery.php | VideoQuery.filterByReferenceId | public function filterByReferenceId($referenceId = null, $comparison = null)
{
if (is_array($referenceId)) {
$useMinMax = false;
if (isset($referenceId['min'])) {
$this->addUsingAlias(VideoTableMap::COL_REFERENCE_ID, $referenceId['min'], Criteria::GREATER_EQUAL);
... | php | public function filterByReferenceId($referenceId = null, $comparison = null)
{
if (is_array($referenceId)) {
$useMinMax = false;
if (isset($referenceId['min'])) {
$this->addUsingAlias(VideoTableMap::COL_REFERENCE_ID, $referenceId['min'], Criteria::GREATER_EQUAL);
... | [
"public",
"function",
"filterByReferenceId",
"(",
"$",
"referenceId",
"=",
"null",
",",
"$",
"comparison",
"=",
"null",
")",
"{",
"if",
"(",
"is_array",
"(",
"$",
"referenceId",
")",
")",
"{",
"$",
"useMinMax",
"=",
"false",
";",
"if",
"(",
"isset",
"(... | Filter the query on the reference_id column
Example usage:
<code>
$query->filterByReferenceId(1234); // WHERE reference_id = 1234
$query->filterByReferenceId(array(12, 34)); // WHERE reference_id IN (12, 34)
$query->filterByReferenceId(array('min' => 12)); // WHERE reference_id > 12
</code>
@see filterByReferen... | [
"Filter",
"the",
"query",
"on",
"the",
"reference_id",
"column"
] | 221a6c5322473d7d7f8e322958a3ee46d87da150 | https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/VideoQuery.php#L647-L668 |
9,875 | gossi/trixionary | src/model/Base/VideoQuery.php | VideoQuery.filterByPosterUrl | public function filterByPosterUrl($posterUrl = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($posterUrl)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $posterUrl)) {
$posterUrl = str_replace('*', '%', $posterUrl... | php | public function filterByPosterUrl($posterUrl = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($posterUrl)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $posterUrl)) {
$posterUrl = str_replace('*', '%', $posterUrl... | [
"public",
"function",
"filterByPosterUrl",
"(",
"$",
"posterUrl",
"=",
"null",
",",
"$",
"comparison",
"=",
"null",
")",
"{",
"if",
"(",
"null",
"===",
"$",
"comparison",
")",
"{",
"if",
"(",
"is_array",
"(",
"$",
"posterUrl",
")",
")",
"{",
"$",
"co... | Filter the query on the poster_url column
Example usage:
<code>
$query->filterByPosterUrl('fooValue'); // WHERE poster_url = 'fooValue'
$query->filterByPosterUrl('%fooValue%'); // WHERE poster_url LIKE '%fooValue%'
</code>
@param string $posterUrl The value to use as filter.
Accepts wildcards (* and % trigger a... | [
"Filter",
"the",
"query",
"on",
"the",
"poster_url",
"column"
] | 221a6c5322473d7d7f8e322958a3ee46d87da150 | https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/VideoQuery.php#L685-L697 |
9,876 | gossi/trixionary | src/model/Base/VideoQuery.php | VideoQuery.filterByProvider | public function filterByProvider($provider = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($provider)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $provider)) {
$provider = str_replace('*', '%', $provider);
... | php | public function filterByProvider($provider = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($provider)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $provider)) {
$provider = str_replace('*', '%', $provider);
... | [
"public",
"function",
"filterByProvider",
"(",
"$",
"provider",
"=",
"null",
",",
"$",
"comparison",
"=",
"null",
")",
"{",
"if",
"(",
"null",
"===",
"$",
"comparison",
")",
"{",
"if",
"(",
"is_array",
"(",
"$",
"provider",
")",
")",
"{",
"$",
"compa... | Filter the query on the provider column
Example usage:
<code>
$query->filterByProvider('fooValue'); // WHERE provider = 'fooValue'
$query->filterByProvider('%fooValue%'); // WHERE provider LIKE '%fooValue%'
</code>
@param string $provider The value to use as filter.
Accepts wildcards (* and % trigger a LIKE)
@p... | [
"Filter",
"the",
"query",
"on",
"the",
"provider",
"column"
] | 221a6c5322473d7d7f8e322958a3ee46d87da150 | https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/VideoQuery.php#L714-L726 |
9,877 | gossi/trixionary | src/model/Base/VideoQuery.php | VideoQuery.filterByProviderId | public function filterByProviderId($providerId = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($providerId)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $providerId)) {
$providerId = str_replace('*', '%', $prov... | php | public function filterByProviderId($providerId = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($providerId)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $providerId)) {
$providerId = str_replace('*', '%', $prov... | [
"public",
"function",
"filterByProviderId",
"(",
"$",
"providerId",
"=",
"null",
",",
"$",
"comparison",
"=",
"null",
")",
"{",
"if",
"(",
"null",
"===",
"$",
"comparison",
")",
"{",
"if",
"(",
"is_array",
"(",
"$",
"providerId",
")",
")",
"{",
"$",
... | Filter the query on the provider_id column
Example usage:
<code>
$query->filterByProviderId('fooValue'); // WHERE provider_id = 'fooValue'
$query->filterByProviderId('%fooValue%'); // WHERE provider_id LIKE '%fooValue%'
</code>
@param string $providerId The value to use as filter.
Accepts wildcards (* and % tri... | [
"Filter",
"the",
"query",
"on",
"the",
"provider_id",
"column"
] | 221a6c5322473d7d7f8e322958a3ee46d87da150 | https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/VideoQuery.php#L743-L755 |
9,878 | gossi/trixionary | src/model/Base/VideoQuery.php | VideoQuery.filterByPlayerUrl | public function filterByPlayerUrl($playerUrl = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($playerUrl)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $playerUrl)) {
$playerUrl = str_replace('*', '%', $playerUrl... | php | public function filterByPlayerUrl($playerUrl = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($playerUrl)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $playerUrl)) {
$playerUrl = str_replace('*', '%', $playerUrl... | [
"public",
"function",
"filterByPlayerUrl",
"(",
"$",
"playerUrl",
"=",
"null",
",",
"$",
"comparison",
"=",
"null",
")",
"{",
"if",
"(",
"null",
"===",
"$",
"comparison",
")",
"{",
"if",
"(",
"is_array",
"(",
"$",
"playerUrl",
")",
")",
"{",
"$",
"co... | Filter the query on the player_url column
Example usage:
<code>
$query->filterByPlayerUrl('fooValue'); // WHERE player_url = 'fooValue'
$query->filterByPlayerUrl('%fooValue%'); // WHERE player_url LIKE '%fooValue%'
</code>
@param string $playerUrl The value to use as filter.
Accepts wildcards (* and % trigger a... | [
"Filter",
"the",
"query",
"on",
"the",
"player_url",
"column"
] | 221a6c5322473d7d7f8e322958a3ee46d87da150 | https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/VideoQuery.php#L772-L784 |
9,879 | gossi/trixionary | src/model/Base/VideoQuery.php | VideoQuery.filterByWidth | public function filterByWidth($width = null, $comparison = null)
{
if (is_array($width)) {
$useMinMax = false;
if (isset($width['min'])) {
$this->addUsingAlias(VideoTableMap::COL_WIDTH, $width['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
... | php | public function filterByWidth($width = null, $comparison = null)
{
if (is_array($width)) {
$useMinMax = false;
if (isset($width['min'])) {
$this->addUsingAlias(VideoTableMap::COL_WIDTH, $width['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
... | [
"public",
"function",
"filterByWidth",
"(",
"$",
"width",
"=",
"null",
",",
"$",
"comparison",
"=",
"null",
")",
"{",
"if",
"(",
"is_array",
"(",
"$",
"width",
")",
")",
"{",
"$",
"useMinMax",
"=",
"false",
";",
"if",
"(",
"isset",
"(",
"$",
"width... | Filter the query on the width column
Example usage:
<code>
$query->filterByWidth(1234); // WHERE width = 1234
$query->filterByWidth(array(12, 34)); // WHERE width IN (12, 34)
$query->filterByWidth(array('min' => 12)); // WHERE width > 12
</code>
@param mixed $width The value to use as filter.
Use scalar values fo... | [
"Filter",
"the",
"query",
"on",
"the",
"width",
"column"
] | 221a6c5322473d7d7f8e322958a3ee46d87da150 | https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/VideoQuery.php#L804-L825 |
9,880 | gossi/trixionary | src/model/Base/VideoQuery.php | VideoQuery.filterByHeight | public function filterByHeight($height = null, $comparison = null)
{
if (is_array($height)) {
$useMinMax = false;
if (isset($height['min'])) {
$this->addUsingAlias(VideoTableMap::COL_HEIGHT, $height['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
... | php | public function filterByHeight($height = null, $comparison = null)
{
if (is_array($height)) {
$useMinMax = false;
if (isset($height['min'])) {
$this->addUsingAlias(VideoTableMap::COL_HEIGHT, $height['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
... | [
"public",
"function",
"filterByHeight",
"(",
"$",
"height",
"=",
"null",
",",
"$",
"comparison",
"=",
"null",
")",
"{",
"if",
"(",
"is_array",
"(",
"$",
"height",
")",
")",
"{",
"$",
"useMinMax",
"=",
"false",
";",
"if",
"(",
"isset",
"(",
"$",
"he... | Filter the query on the height column
Example usage:
<code>
$query->filterByHeight(1234); // WHERE height = 1234
$query->filterByHeight(array(12, 34)); // WHERE height IN (12, 34)
$query->filterByHeight(array('min' => 12)); // WHERE height > 12
</code>
@param mixed $height The value to use as filter.
Use scalar v... | [
"Filter",
"the",
"query",
"on",
"the",
"height",
"column"
] | 221a6c5322473d7d7f8e322958a3ee46d87da150 | https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/VideoQuery.php#L845-L866 |
9,881 | gossi/trixionary | src/model/Base/VideoQuery.php | VideoQuery.useFeaturedSkillQuery | public function useFeaturedSkillQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
return $this
->joinFeaturedSkill($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'FeaturedSkill', '\gossi\trixionary\model\SkillQuery');
} | php | public function useFeaturedSkillQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
return $this
->joinFeaturedSkill($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'FeaturedSkill', '\gossi\trixionary\model\SkillQuery');
} | [
"public",
"function",
"useFeaturedSkillQuery",
"(",
"$",
"relationAlias",
"=",
"null",
",",
"$",
"joinType",
"=",
"Criteria",
"::",
"LEFT_JOIN",
")",
"{",
"return",
"$",
"this",
"->",
"joinFeaturedSkill",
"(",
"$",
"relationAlias",
",",
"$",
"joinType",
")",
... | Use the FeaturedSkill relation Skill 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 \gossi\trixionary\model\SkillQuery A seco... | [
"Use",
"the",
"FeaturedSkill",
"relation",
"Skill",
"object"
] | 221a6c5322473d7d7f8e322958a3ee46d87da150 | https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/VideoQuery.php#L1088-L1093 |
9,882 | gossi/trixionary | src/model/Base/VideoQuery.php | VideoQuery.useFeaturedTutorialSkillQuery | public function useFeaturedTutorialSkillQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
return $this
->joinFeaturedTutorialSkill($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'FeaturedTutorialSkill', '\gossi\trixionary\model\SkillQuery');
... | php | public function useFeaturedTutorialSkillQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
return $this
->joinFeaturedTutorialSkill($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'FeaturedTutorialSkill', '\gossi\trixionary\model\SkillQuery');
... | [
"public",
"function",
"useFeaturedTutorialSkillQuery",
"(",
"$",
"relationAlias",
"=",
"null",
",",
"$",
"joinType",
"=",
"Criteria",
"::",
"LEFT_JOIN",
")",
"{",
"return",
"$",
"this",
"->",
"joinFeaturedTutorialSkill",
"(",
"$",
"relationAlias",
",",
"$",
"joi... | Use the FeaturedTutorialSkill relation Skill 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 \gossi\trixionary\model\SkillQuer... | [
"Use",
"the",
"FeaturedTutorialSkill",
"relation",
"Skill",
"object"
] | 221a6c5322473d7d7f8e322958a3ee46d87da150 | https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/VideoQuery.php#L1161-L1166 |
9,883 | WellCommerce/DataSet | Pagination/DataSetPagination.php | DataSetPagination.getPages | protected function getPages($totalPages, $currentPage)
{
$range = range(1, $totalPages);
$pages = [];
foreach ($range as $page) {
$pages[] = [
'number' => $page,
'active' => (int)$page === (int)$currentPage
];
}
return ... | php | protected function getPages($totalPages, $currentPage)
{
$range = range(1, $totalPages);
$pages = [];
foreach ($range as $page) {
$pages[] = [
'number' => $page,
'active' => (int)$page === (int)$currentPage
];
}
return ... | [
"protected",
"function",
"getPages",
"(",
"$",
"totalPages",
",",
"$",
"currentPage",
")",
"{",
"$",
"range",
"=",
"range",
"(",
"1",
",",
"$",
"totalPages",
")",
";",
"$",
"pages",
"=",
"[",
"]",
";",
"foreach",
"(",
"$",
"range",
"as",
"$",
"page... | Returns an array containing all page numbers
@param int $totalPages
@param int $currentPage
@return array | [
"Returns",
"an",
"array",
"containing",
"all",
"page",
"numbers"
] | 18720dc5416f245d22c502ceafce1a1b2db2b905 | https://github.com/WellCommerce/DataSet/blob/18720dc5416f245d22c502ceafce1a1b2db2b905/Pagination/DataSetPagination.php#L81-L93 |
9,884 | WellCommerce/DataSet | Pagination/DataSetPagination.php | DataSetPagination.getNextPage | protected function getNextPage($totalPages, $offset, $limit)
{
$nextPage = ($offset / $limit) + 2;
if ($nextPage > $totalPages) {
return null;
}
return $nextPage;
} | php | protected function getNextPage($totalPages, $offset, $limit)
{
$nextPage = ($offset / $limit) + 2;
if ($nextPage > $totalPages) {
return null;
}
return $nextPage;
} | [
"protected",
"function",
"getNextPage",
"(",
"$",
"totalPages",
",",
"$",
"offset",
",",
"$",
"limit",
")",
"{",
"$",
"nextPage",
"=",
"(",
"$",
"offset",
"/",
"$",
"limit",
")",
"+",
"2",
";",
"if",
"(",
"$",
"nextPage",
">",
"$",
"totalPages",
")... | Returns the next page or false if last page
@param int $totalPages
@param int $offset
@param int $limit
@return null|int | [
"Returns",
"the",
"next",
"page",
"or",
"false",
"if",
"last",
"page"
] | 18720dc5416f245d22c502ceafce1a1b2db2b905 | https://github.com/WellCommerce/DataSet/blob/18720dc5416f245d22c502ceafce1a1b2db2b905/Pagination/DataSetPagination.php#L104-L112 |
9,885 | gmo/cache | src/DoctrineProxy.php | DoctrineProxy.set | public function set($key, $value, $expiration = 0)
{
$this->cache->save($key, $value, $expiration);
} | php | public function set($key, $value, $expiration = 0)
{
$this->cache->save($key, $value, $expiration);
} | [
"public",
"function",
"set",
"(",
"$",
"key",
",",
"$",
"value",
",",
"$",
"expiration",
"=",
"0",
")",
"{",
"$",
"this",
"->",
"cache",
"->",
"save",
"(",
"$",
"key",
",",
"$",
"value",
",",
"$",
"expiration",
")",
";",
"}"
] | Puts data into cache.
@param string $key
@param mixed $value
@param int $expiration Sets a specific lifetime for this cache entry (0 => infinite lifeTime). | [
"Puts",
"data",
"into",
"cache",
"."
] | c42ba5571bc0e2fca47c98e4e05e96e44dcd9bfd | https://github.com/gmo/cache/blob/c42ba5571bc0e2fca47c98e4e05e96e44dcd9bfd/src/DoctrineProxy.php#L49-L52 |
9,886 | gmo/cache | src/DoctrineProxy.php | DoctrineProxy.increment | public function increment($key, $value = 1, $expiration = 0)
{
$new = intval($this->get($key));
$new += $value;
$this->set($key, $new, $expiration);
} | php | public function increment($key, $value = 1, $expiration = 0)
{
$new = intval($this->get($key));
$new += $value;
$this->set($key, $new, $expiration);
} | [
"public",
"function",
"increment",
"(",
"$",
"key",
",",
"$",
"value",
"=",
"1",
",",
"$",
"expiration",
"=",
"0",
")",
"{",
"$",
"new",
"=",
"intval",
"(",
"$",
"this",
"->",
"get",
"(",
"$",
"key",
")",
")",
";",
"$",
"new",
"+=",
"$",
"val... | Increment a key.
Note: This is not atomic. It is faked in PHP.
@param string $key
@param int $value
@param int $expiration | [
"Increment",
"a",
"key",
"."
] | c42ba5571bc0e2fca47c98e4e05e96e44dcd9bfd | https://github.com/gmo/cache/blob/c42ba5571bc0e2fca47c98e4e05e96e44dcd9bfd/src/DoctrineProxy.php#L88-L93 |
9,887 | gmo/cache | src/DoctrineProxy.php | DoctrineProxy.decrement | public function decrement($key, $value = 1, $expiration = 0)
{
$new = intval($this->get($key));
$new -= $value;
$this->set($key, $new, $expiration);
} | php | public function decrement($key, $value = 1, $expiration = 0)
{
$new = intval($this->get($key));
$new -= $value;
$this->set($key, $new, $expiration);
} | [
"public",
"function",
"decrement",
"(",
"$",
"key",
",",
"$",
"value",
"=",
"1",
",",
"$",
"expiration",
"=",
"0",
")",
"{",
"$",
"new",
"=",
"intval",
"(",
"$",
"this",
"->",
"get",
"(",
"$",
"key",
")",
")",
";",
"$",
"new",
"-=",
"$",
"val... | Decrement a key.
Note: This is not atomic. It is faked in PHP.
@param string $key
@param int $value
@param int $expiration | [
"Decrement",
"a",
"key",
"."
] | c42ba5571bc0e2fca47c98e4e05e96e44dcd9bfd | https://github.com/gmo/cache/blob/c42ba5571bc0e2fca47c98e4e05e96e44dcd9bfd/src/DoctrineProxy.php#L104-L109 |
9,888 | DatingVIP/IRC | src/DatingVIP/IRC/Connection.php | Connection.recv | protected function recv() {
if (($line = fgets($this->handle)) &&
($line = trim($line))) {
if ($this->logger) {
$this->logger
->onReceive($line);
}
return $line;
}
throw new \RuntimeException(
"failed to receive data from {$this->server}");
} | php | protected function recv() {
if (($line = fgets($this->handle)) &&
($line = trim($line))) {
if ($this->logger) {
$this->logger
->onReceive($line);
}
return $line;
}
throw new \RuntimeException(
"failed to receive data from {$this->server}");
} | [
"protected",
"function",
"recv",
"(",
")",
"{",
"if",
"(",
"(",
"$",
"line",
"=",
"fgets",
"(",
"$",
"this",
"->",
"handle",
")",
")",
"&&",
"(",
"$",
"line",
"=",
"trim",
"(",
"$",
"line",
")",
")",
")",
"{",
"if",
"(",
"$",
"this",
"->",
... | Recv response from server
@return string
@throws \RuntimeException
@access synchronized | [
"Recv",
"response",
"from",
"server"
] | c09add1317210cd772529146fc617130db957c16 | https://github.com/DatingVIP/IRC/blob/c09add1317210cd772529146fc617130db957c16/src/DatingVIP/IRC/Connection.php#L69-L82 |
9,889 | vinala/kernel | src/Http/Input.php | Input.register | public static function register()
{
self::$list = [];
//
self::$list['post'] = !isset($_POST) ?: $_POST;
self::$list['get'] = !isset($_GET) ?: $_GET;
self::$list['session'] = !isset($_SESSION) ?: $_SESSION;
self::$list['cookie'] = !isset($_COOKIE) ?: $_COOKIE;
... | php | public static function register()
{
self::$list = [];
//
self::$list['post'] = !isset($_POST) ?: $_POST;
self::$list['get'] = !isset($_GET) ?: $_GET;
self::$list['session'] = !isset($_SESSION) ?: $_SESSION;
self::$list['cookie'] = !isset($_COOKIE) ?: $_COOKIE;
... | [
"public",
"static",
"function",
"register",
"(",
")",
"{",
"self",
"::",
"$",
"list",
"=",
"[",
"]",
";",
"//",
"self",
"::",
"$",
"list",
"[",
"'post'",
"]",
"=",
"!",
"isset",
"(",
"$",
"_POST",
")",
"?",
":",
"$",
"_POST",
";",
"self",
"::",... | regsiter all http input vars.
@return array | [
"regsiter",
"all",
"http",
"input",
"vars",
"."
] | 346c8a4dca48fd1ab88fdc9f7004ecb7bce6a67a | https://github.com/vinala/kernel/blob/346c8a4dca48fd1ab88fdc9f7004ecb7bce6a67a/src/Http/Input.php#L22-L36 |
9,890 | adrenalinkin/entity-helper-bundle | Helper/EntityHelper.php | EntityHelper.createEntity | public function createEntity($className, array $fields = [])
{
$metadata = $this->getEntityMetadata($className);
if (is_null($metadata)) {
return null;
}
$reflection = $metadata->getReflectionClass();
try {
$entity = $reflection->newInstance();
... | php | public function createEntity($className, array $fields = [])
{
$metadata = $this->getEntityMetadata($className);
if (is_null($metadata)) {
return null;
}
$reflection = $metadata->getReflectionClass();
try {
$entity = $reflection->newInstance();
... | [
"public",
"function",
"createEntity",
"(",
"$",
"className",
",",
"array",
"$",
"fields",
"=",
"[",
"]",
")",
"{",
"$",
"metadata",
"=",
"$",
"this",
"->",
"getEntityMetadata",
"(",
"$",
"className",
")",
";",
"if",
"(",
"is_null",
"(",
"$",
"metadata"... | Create instance of the class, which managed by Doctrine, by received class name
@param string $className
@param array $fields
@return object|null | [
"Create",
"instance",
"of",
"the",
"class",
"which",
"managed",
"by",
"Doctrine",
"by",
"received",
"class",
"name"
] | 92ef8e87e59e2ef1dff29969ace9a6430d9d007a | https://github.com/adrenalinkin/entity-helper-bundle/blob/92ef8e87e59e2ef1dff29969ace9a6430d9d007a/Helper/EntityHelper.php#L62-L95 |
9,891 | adrenalinkin/entity-helper-bundle | Helper/EntityHelper.php | EntityHelper.getEntityClassFull | public function getEntityClassFull($entity)
{
$entity = $this->toString($entity);
if (isset($this->cache[$entity])) {
return $entity;
}
if ($this->managed || $this->isManagedByDoctrine($entity)) {
/** @var \Doctrine\Common\Persistence\Mapping\ClassMetadata $... | php | public function getEntityClassFull($entity)
{
$entity = $this->toString($entity);
if (isset($this->cache[$entity])) {
return $entity;
}
if ($this->managed || $this->isManagedByDoctrine($entity)) {
/** @var \Doctrine\Common\Persistence\Mapping\ClassMetadata $... | [
"public",
"function",
"getEntityClassFull",
"(",
"$",
"entity",
")",
"{",
"$",
"entity",
"=",
"$",
"this",
"->",
"toString",
"(",
"$",
"entity",
")",
";",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"cache",
"[",
"$",
"entity",
"]",
")",
")",
"{",
... | Returns full name of the received entity or class name.
@param object|string $entity Entity object or just entity name in the full or shot notation
@return string For example 'AcmeBundle\Entity\User' | [
"Returns",
"full",
"name",
"of",
"the",
"received",
"entity",
"or",
"class",
"name",
"."
] | 92ef8e87e59e2ef1dff29969ace9a6430d9d007a | https://github.com/adrenalinkin/entity-helper-bundle/blob/92ef8e87e59e2ef1dff29969ace9a6430d9d007a/Helper/EntityHelper.php#L104-L123 |
9,892 | adrenalinkin/entity-helper-bundle | Helper/EntityHelper.php | EntityHelper.getEntityClassShort | public function getEntityClassShort($entity)
{
$cacheKey = 'short';
$entity = $this->getEntityClassFull($entity);
$short = $this->getFromCache($entity, $cacheKey);
if (false !== $short) {
return $short;
}
foreach ($this->entityManager->getConfigurat... | php | public function getEntityClassShort($entity)
{
$cacheKey = 'short';
$entity = $this->getEntityClassFull($entity);
$short = $this->getFromCache($entity, $cacheKey);
if (false !== $short) {
return $short;
}
foreach ($this->entityManager->getConfigurat... | [
"public",
"function",
"getEntityClassShort",
"(",
"$",
"entity",
")",
"{",
"$",
"cacheKey",
"=",
"'short'",
";",
"$",
"entity",
"=",
"$",
"this",
"->",
"getEntityClassFull",
"(",
"$",
"entity",
")",
";",
"$",
"short",
"=",
"$",
"this",
"->",
"getFromCach... | Returns short name of the received entity or class name.
@param string|object $entity Entity object or just entity name in the full or shot notation
@return string For example 'AcmeBundle:User' | [
"Returns",
"short",
"name",
"of",
"the",
"received",
"entity",
"or",
"class",
"name",
"."
] | 92ef8e87e59e2ef1dff29969ace9a6430d9d007a | https://github.com/adrenalinkin/entity-helper-bundle/blob/92ef8e87e59e2ef1dff29969ace9a6430d9d007a/Helper/EntityHelper.php#L132-L154 |
9,893 | adrenalinkin/entity-helper-bundle | Helper/EntityHelper.php | EntityHelper.getEntityMetadata | public function getEntityMetadata($entity)
{
if (!$this->isManagedByDoctrine($entity)) {
return null;
}
$cacheKey = 'metadata';
$entity = $this->getEntityClassFull($entity);
$metadata = $this->getFromCache($entity, $cacheKey);
if (false !== $metadata) ... | php | public function getEntityMetadata($entity)
{
if (!$this->isManagedByDoctrine($entity)) {
return null;
}
$cacheKey = 'metadata';
$entity = $this->getEntityClassFull($entity);
$metadata = $this->getFromCache($entity, $cacheKey);
if (false !== $metadata) ... | [
"public",
"function",
"getEntityMetadata",
"(",
"$",
"entity",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"isManagedByDoctrine",
"(",
"$",
"entity",
")",
")",
"{",
"return",
"null",
";",
"}",
"$",
"cacheKey",
"=",
"'metadata'",
";",
"$",
"entity",
"=... | Returns ClassMetadata object for received entity
@param string|object $entity Entity object or just entity name in the full or shot notation
@return \Doctrine\ORM\Mapping\ClassMetadata|null | [
"Returns",
"ClassMetadata",
"object",
"for",
"received",
"entity"
] | 92ef8e87e59e2ef1dff29969ace9a6430d9d007a | https://github.com/adrenalinkin/entity-helper-bundle/blob/92ef8e87e59e2ef1dff29969ace9a6430d9d007a/Helper/EntityHelper.php#L221-L239 |
9,894 | adrenalinkin/entity-helper-bundle | Helper/EntityHelper.php | EntityHelper.isManagedByDoctrine | public function isManagedByDoctrine($entity)
{
$cacheKey = 'managed';
$entity = $this->toString($entity);
$isManaged = $this->getFromCache($entity, $cacheKey, null);
if (null !== $isManaged) {
return $isManaged;
}
try {
$this->managed = $... | php | public function isManagedByDoctrine($entity)
{
$cacheKey = 'managed';
$entity = $this->toString($entity);
$isManaged = $this->getFromCache($entity, $cacheKey, null);
if (null !== $isManaged) {
return $isManaged;
}
try {
$this->managed = $... | [
"public",
"function",
"isManagedByDoctrine",
"(",
"$",
"entity",
")",
"{",
"$",
"cacheKey",
"=",
"'managed'",
";",
"$",
"entity",
"=",
"$",
"this",
"->",
"toString",
"(",
"$",
"entity",
")",
";",
"$",
"isManaged",
"=",
"$",
"this",
"->",
"getFromCache",
... | Returns is received entity managed by doctrine or not
@param object|string $entity Entity object or just entity name in the full or shot notation
@return bool | [
"Returns",
"is",
"received",
"entity",
"managed",
"by",
"doctrine",
"or",
"not"
] | 92ef8e87e59e2ef1dff29969ace9a6430d9d007a | https://github.com/adrenalinkin/entity-helper-bundle/blob/92ef8e87e59e2ef1dff29969ace9a6430d9d007a/Helper/EntityHelper.php#L248-L268 |
9,895 | adrenalinkin/entity-helper-bundle | Helper/EntityHelper.php | EntityHelper.getFromCache | private function getFromCache($className, $property, $default = false)
{
return empty($this->cache[$className][$property]) ? $default : $this->cache[$className][$property];
} | php | private function getFromCache($className, $property, $default = false)
{
return empty($this->cache[$className][$property]) ? $default : $this->cache[$className][$property];
} | [
"private",
"function",
"getFromCache",
"(",
"$",
"className",
",",
"$",
"property",
",",
"$",
"default",
"=",
"false",
")",
"{",
"return",
"empty",
"(",
"$",
"this",
"->",
"cache",
"[",
"$",
"className",
"]",
"[",
"$",
"property",
"]",
")",
"?",
"$",... | Returns appropriated property value form the local cache if exists. Otherwise return default value.
@param string $className Entity entity class name in the FULL notation only
@param string $property Name of the property
@param bool|mixed $default Value which should be return be default when requested data
... | [
"Returns",
"appropriated",
"property",
"value",
"form",
"the",
"local",
"cache",
"if",
"exists",
".",
"Otherwise",
"return",
"default",
"value",
"."
] | 92ef8e87e59e2ef1dff29969ace9a6430d9d007a | https://github.com/adrenalinkin/entity-helper-bundle/blob/92ef8e87e59e2ef1dff29969ace9a6430d9d007a/Helper/EntityHelper.php#L280-L283 |
9,896 | liverbool/dos-resource-bundle | Templating/PageBuilder.php | PageBuilder.setOptions | public function setOptions(array $options = array())
{
$options['inited'] = true;
// Resolve merged options
$resolver = new OptionsResolver();
$this->configureOptions($resolver);
$options = $resolver->resolve($options);
$this->options = array_merge($this->options, $o... | php | public function setOptions(array $options = array())
{
$options['inited'] = true;
// Resolve merged options
$resolver = new OptionsResolver();
$this->configureOptions($resolver);
$options = $resolver->resolve($options);
$this->options = array_merge($this->options, $o... | [
"public",
"function",
"setOptions",
"(",
"array",
"$",
"options",
"=",
"array",
"(",
")",
")",
"{",
"$",
"options",
"[",
"'inited'",
"]",
"=",
"true",
";",
"// Resolve merged options",
"$",
"resolver",
"=",
"new",
"OptionsResolver",
"(",
")",
";",
"$",
"... | Set page options.
@param array $options | [
"Set",
"page",
"options",
"."
] | c8607a46c2cea80cc138994be74f4dea3c197abc | https://github.com/liverbool/dos-resource-bundle/blob/c8607a46c2cea80cc138994be74f4dea3c197abc/Templating/PageBuilder.php#L47-L91 |
9,897 | singlequote/docblock-parser | src/DocblockParser.php | DocblockParser.parse | private function parse()
{
$this->rawDocblock = $this->reflection->getDocComment();
$raw = str_replace("\r\n", "\n", $this->rawDocblock);
$lines = explode("\n", $raw);
$matches = null;
switch (count($lines)) {
case 1:
if (!preg_match('#\\/\\*\\*([... | php | private function parse()
{
$this->rawDocblock = $this->reflection->getDocComment();
$raw = str_replace("\r\n", "\n", $this->rawDocblock);
$lines = explode("\n", $raw);
$matches = null;
switch (count($lines)) {
case 1:
if (!preg_match('#\\/\\*\\*([... | [
"private",
"function",
"parse",
"(",
")",
"{",
"$",
"this",
"->",
"rawDocblock",
"=",
"$",
"this",
"->",
"reflection",
"->",
"getDocComment",
"(",
")",
";",
"$",
"raw",
"=",
"str_replace",
"(",
"\"\\r\\n\"",
",",
"\"\\n\"",
",",
"$",
"this",
"->",
"raw... | Parse the docblock. | [
"Parse",
"the",
"docblock",
"."
] | ab72023b6b1eaf9005b7166f1259e85741c2b79f | https://github.com/singlequote/docblock-parser/blob/ab72023b6b1eaf9005b7166f1259e85741c2b79f/src/DocblockParser.php#L50-L72 |
9,898 | singlequote/docblock-parser | src/DocblockParser.php | DocblockParser.parseLines | private function parseLines($lines)
{
foreach ($lines as $line) {
$line = preg_replace('#^[ \t\*]*#', '', $line);
if (strlen($line) < 2) {
continue;
}
if (preg_match('#@([^ ]+)(.*)#', $line, $matches)) {
$tag_name = $matches[1];... | php | private function parseLines($lines)
{
foreach ($lines as $line) {
$line = preg_replace('#^[ \t\*]*#', '', $line);
if (strlen($line) < 2) {
continue;
}
if (preg_match('#@([^ ]+)(.*)#', $line, $matches)) {
$tag_name = $matches[1];... | [
"private",
"function",
"parseLines",
"(",
"$",
"lines",
")",
"{",
"foreach",
"(",
"$",
"lines",
"as",
"$",
"line",
")",
"{",
"$",
"line",
"=",
"preg_replace",
"(",
"'#^[ \\t\\*]*#'",
",",
"''",
",",
"$",
"line",
")",
";",
"if",
"(",
"strlen",
"(",
... | Parse the lines from the docblock.
@param string[] $lines - all lines from the docblock | [
"Parse",
"the",
"lines",
"from",
"the",
"docblock",
"."
] | ab72023b6b1eaf9005b7166f1259e85741c2b79f | https://github.com/singlequote/docblock-parser/blob/ab72023b6b1eaf9005b7166f1259e85741c2b79f/src/DocblockParser.php#L79-L103 |
9,899 | singlequote/docblock-parser | src/DocblockParser.php | DocblockParser.getTag | public function getTag(string $name, $default = null)
{
return isset($this->tags[$name]) ? $this->tags[$name] : $default;
} | php | public function getTag(string $name, $default = null)
{
return isset($this->tags[$name]) ? $this->tags[$name] : $default;
} | [
"public",
"function",
"getTag",
"(",
"string",
"$",
"name",
",",
"$",
"default",
"=",
"null",
")",
"{",
"return",
"isset",
"(",
"$",
"this",
"->",
"tags",
"[",
"$",
"name",
"]",
")",
"?",
"$",
"this",
"->",
"tags",
"[",
"$",
"name",
"]",
":",
"... | Get a tag by name.
@param string $name - name of the tag to get
@param null $default - default value if the tag does not exist
@return mixed|null | [
"Get",
"a",
"tag",
"by",
"name",
"."
] | ab72023b6b1eaf9005b7166f1259e85741c2b79f | https://github.com/singlequote/docblock-parser/blob/ab72023b6b1eaf9005b7166f1259e85741c2b79f/src/DocblockParser.php#L204-L207 |
Subsets and Splits
Yii Code Samples
Gathers all records from test, train, and validation sets that contain the word 'yii', providing a basic filtered view of the dataset relevant to Yii-related content.