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
sequence | docstring
stringlengths 3
47.2k
| docstring_tokens
sequence | sha
stringlengths 40
40
| url
stringlengths 91
247
|
---|---|---|---|---|---|---|---|---|---|---|---|
6,600 | mtils/beetree | src/BeeTree/Eloquent/AdjacencyList/WholeTreeModelTrait.php | WholeTreeModelTrait.get | public function get($id, $rootId=NULL, array $columns=[])
{
$columns = $this->pickColumns($columns);
$columnsId = $this->getColumnsCacheId($columns);
if (isset($this->_hierachyCache[$columnsId][$id])) {
return $this->_hierachyCache[$columnsId][$id];
}
// If we have a root id, fill the cache by fetching the whole tree
if ($rootId) {
$this->tree($rootId, $columns);
}
// After retrieving the tree, look if it is now in cache
if (isset($this->_hierachyCache[$columnsId][$id])) {
return $this->_hierachyCache[$columnsId][$id];
}
$result = $this->queryTreeById($id)
->get($this->toSelectColumns($columns));
$this->fillNodeCache($columnsId, $result);
if (isset($this->_hierachyCache[$columnsId][$id])) {
return $this->_hierachyCache[$columnsId][$id];
}
} | php | public function get($id, $rootId=NULL, array $columns=[])
{
$columns = $this->pickColumns($columns);
$columnsId = $this->getColumnsCacheId($columns);
if (isset($this->_hierachyCache[$columnsId][$id])) {
return $this->_hierachyCache[$columnsId][$id];
}
// If we have a root id, fill the cache by fetching the whole tree
if ($rootId) {
$this->tree($rootId, $columns);
}
// After retrieving the tree, look if it is now in cache
if (isset($this->_hierachyCache[$columnsId][$id])) {
return $this->_hierachyCache[$columnsId][$id];
}
$result = $this->queryTreeById($id)
->get($this->toSelectColumns($columns));
$this->fillNodeCache($columnsId, $result);
if (isset($this->_hierachyCache[$columnsId][$id])) {
return $this->_hierachyCache[$columnsId][$id];
}
} | [
"public",
"function",
"get",
"(",
"$",
"id",
",",
"$",
"rootId",
"=",
"NULL",
",",
"array",
"$",
"columns",
"=",
"[",
"]",
")",
"{",
"$",
"columns",
"=",
"$",
"this",
"->",
"pickColumns",
"(",
"$",
"columns",
")",
";",
"$",
"columnsId",
"=",
"$",
"this",
"->",
"getColumnsCacheId",
"(",
"$",
"columns",
")",
";",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"_hierachyCache",
"[",
"$",
"columnsId",
"]",
"[",
"$",
"id",
"]",
")",
")",
"{",
"return",
"$",
"this",
"->",
"_hierachyCache",
"[",
"$",
"columnsId",
"]",
"[",
"$",
"id",
"]",
";",
"}",
"// If we have a root id, fill the cache by fetching the whole tree",
"if",
"(",
"$",
"rootId",
")",
"{",
"$",
"this",
"->",
"tree",
"(",
"$",
"rootId",
",",
"$",
"columns",
")",
";",
"}",
"// After retrieving the tree, look if it is now in cache",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"_hierachyCache",
"[",
"$",
"columnsId",
"]",
"[",
"$",
"id",
"]",
")",
")",
"{",
"return",
"$",
"this",
"->",
"_hierachyCache",
"[",
"$",
"columnsId",
"]",
"[",
"$",
"id",
"]",
";",
"}",
"$",
"result",
"=",
"$",
"this",
"->",
"queryTreeById",
"(",
"$",
"id",
")",
"->",
"get",
"(",
"$",
"this",
"->",
"toSelectColumns",
"(",
"$",
"columns",
")",
")",
";",
"$",
"this",
"->",
"fillNodeCache",
"(",
"$",
"columnsId",
",",
"$",
"result",
")",
";",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"_hierachyCache",
"[",
"$",
"columnsId",
"]",
"[",
"$",
"id",
"]",
")",
")",
"{",
"return",
"$",
"this",
"->",
"_hierachyCache",
"[",
"$",
"columnsId",
"]",
"[",
"$",
"id",
"]",
";",
"}",
"}"
] | Retrieve a tree by its ID
@param mixed $id The id of this node, which is the same as node->getIdentifier()
@param mixed $rootId The rootId of the tree, optional to speed up the initial query
@return \BeeTree\Contracts\Node | [
"Retrieve",
"a",
"tree",
"by",
"its",
"ID"
] | 4a68fc94ec14d5faef773b1628c9060db7bf1ce2 | https://github.com/mtils/beetree/blob/4a68fc94ec14d5faef773b1628c9060db7bf1ce2/src/BeeTree/Eloquent/AdjacencyList/WholeTreeModelTrait.php#L54-L82 |
6,601 | anklimsk/cakephp-basic-functions | Vendor/langcode-conv/zendframework/zend-filter/src/Encrypt.php | Encrypt.getAdapterInstance | public function getAdapterInstance()
{
if ($this->adapter instanceof Encrypt\EncryptionAlgorithmInterface) {
return $this->adapter;
}
$adapter = $this->adapter;
$options = $this->getOptions();
if (! class_exists($adapter)) {
$adapter = __CLASS__ . '\\' . ucfirst($adapter);
if (! class_exists($adapter)) {
throw new Exception\RuntimeException(sprintf(
'%s unable to load adapter; class "%s" not found',
__METHOD__,
$this->adapter
));
}
}
$this->adapter = new $adapter($options);
if (! $this->adapter instanceof Encrypt\EncryptionAlgorithmInterface) {
throw new Exception\InvalidArgumentException(sprintf(
'Encryption adapter "%s" does not implement %s\\EncryptionAlgorithmInterface',
$adapter,
__CLASS__
));
}
return $this->adapter;
} | php | public function getAdapterInstance()
{
if ($this->adapter instanceof Encrypt\EncryptionAlgorithmInterface) {
return $this->adapter;
}
$adapter = $this->adapter;
$options = $this->getOptions();
if (! class_exists($adapter)) {
$adapter = __CLASS__ . '\\' . ucfirst($adapter);
if (! class_exists($adapter)) {
throw new Exception\RuntimeException(sprintf(
'%s unable to load adapter; class "%s" not found',
__METHOD__,
$this->adapter
));
}
}
$this->adapter = new $adapter($options);
if (! $this->adapter instanceof Encrypt\EncryptionAlgorithmInterface) {
throw new Exception\InvalidArgumentException(sprintf(
'Encryption adapter "%s" does not implement %s\\EncryptionAlgorithmInterface',
$adapter,
__CLASS__
));
}
return $this->adapter;
} | [
"public",
"function",
"getAdapterInstance",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"adapter",
"instanceof",
"Encrypt",
"\\",
"EncryptionAlgorithmInterface",
")",
"{",
"return",
"$",
"this",
"->",
"adapter",
";",
"}",
"$",
"adapter",
"=",
"$",
"this",
"->",
"adapter",
";",
"$",
"options",
"=",
"$",
"this",
"->",
"getOptions",
"(",
")",
";",
"if",
"(",
"!",
"class_exists",
"(",
"$",
"adapter",
")",
")",
"{",
"$",
"adapter",
"=",
"__CLASS__",
".",
"'\\\\'",
".",
"ucfirst",
"(",
"$",
"adapter",
")",
";",
"if",
"(",
"!",
"class_exists",
"(",
"$",
"adapter",
")",
")",
"{",
"throw",
"new",
"Exception",
"\\",
"RuntimeException",
"(",
"sprintf",
"(",
"'%s unable to load adapter; class \"%s\" not found'",
",",
"__METHOD__",
",",
"$",
"this",
"->",
"adapter",
")",
")",
";",
"}",
"}",
"$",
"this",
"->",
"adapter",
"=",
"new",
"$",
"adapter",
"(",
"$",
"options",
")",
";",
"if",
"(",
"!",
"$",
"this",
"->",
"adapter",
"instanceof",
"Encrypt",
"\\",
"EncryptionAlgorithmInterface",
")",
"{",
"throw",
"new",
"Exception",
"\\",
"InvalidArgumentException",
"(",
"sprintf",
"(",
"'Encryption adapter \"%s\" does not implement %s\\\\EncryptionAlgorithmInterface'",
",",
"$",
"adapter",
",",
"__CLASS__",
")",
")",
";",
"}",
"return",
"$",
"this",
"->",
"adapter",
";",
"}"
] | Returns the adapter instance
@throws Exception\RuntimeException
@throws Exception\InvalidArgumentException
@return Encrypt\EncryptionAlgorithmInterface | [
"Returns",
"the",
"adapter",
"instance"
] | 7554e8b0b420fd3155593af7bf76b7ccbdc8701e | https://github.com/anklimsk/cakephp-basic-functions/blob/7554e8b0b420fd3155593af7bf76b7ccbdc8701e/Vendor/langcode-conv/zendframework/zend-filter/src/Encrypt.php#L48-L76 |
6,602 | indigophp-archive/codeception-fuel-module | fuel/fuel/packages/orm/classes/observer/updatedat.php | Observer_UpdatedAt.before_update | public function before_update(Model $obj)
{
// If there are any relations loop through and check if any of them have been changed
$relation_changed = false;
foreach ( $this->_relations as $relation)
{
if ($this->relation_changed($obj, $relation))
{
$relation_changed = true;
break;
}
}
$objClassName = get_class($obj);
$objProperties = $objClassName::properties();
if ($obj->is_changed(array_keys($objProperties)) or $relation_changed)
{
$obj->{$this->_property} = $this->_mysql_timestamp ? \Date::time()->format('mysql') : \Date::time()->get_timestamp();
}
} | php | public function before_update(Model $obj)
{
// If there are any relations loop through and check if any of them have been changed
$relation_changed = false;
foreach ( $this->_relations as $relation)
{
if ($this->relation_changed($obj, $relation))
{
$relation_changed = true;
break;
}
}
$objClassName = get_class($obj);
$objProperties = $objClassName::properties();
if ($obj->is_changed(array_keys($objProperties)) or $relation_changed)
{
$obj->{$this->_property} = $this->_mysql_timestamp ? \Date::time()->format('mysql') : \Date::time()->get_timestamp();
}
} | [
"public",
"function",
"before_update",
"(",
"Model",
"$",
"obj",
")",
"{",
"// If there are any relations loop through and check if any of them have been changed",
"$",
"relation_changed",
"=",
"false",
";",
"foreach",
"(",
"$",
"this",
"->",
"_relations",
"as",
"$",
"relation",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"relation_changed",
"(",
"$",
"obj",
",",
"$",
"relation",
")",
")",
"{",
"$",
"relation_changed",
"=",
"true",
";",
"break",
";",
"}",
"}",
"$",
"objClassName",
"=",
"get_class",
"(",
"$",
"obj",
")",
";",
"$",
"objProperties",
"=",
"$",
"objClassName",
"::",
"properties",
"(",
")",
";",
"if",
"(",
"$",
"obj",
"->",
"is_changed",
"(",
"array_keys",
"(",
"$",
"objProperties",
")",
")",
"or",
"$",
"relation_changed",
")",
"{",
"$",
"obj",
"->",
"{",
"$",
"this",
"->",
"_property",
"}",
"=",
"$",
"this",
"->",
"_mysql_timestamp",
"?",
"\\",
"Date",
"::",
"time",
"(",
")",
"->",
"format",
"(",
"'mysql'",
")",
":",
"\\",
"Date",
"::",
"time",
"(",
")",
"->",
"get_timestamp",
"(",
")",
";",
"}",
"}"
] | Set the UpdatedAt property to the current time.
@param Model Model object subject of this observer method | [
"Set",
"the",
"UpdatedAt",
"property",
"to",
"the",
"current",
"time",
"."
] | 0973b7cbd540a0e89cc5bb7af94627f77f09bf49 | https://github.com/indigophp-archive/codeception-fuel-module/blob/0973b7cbd540a0e89cc5bb7af94627f77f09bf49/fuel/fuel/packages/orm/classes/observer/updatedat.php#L77-L97 |
6,603 | indigophp-archive/codeception-fuel-module | fuel/fuel/packages/orm/classes/observer/updatedat.php | Observer_UpdatedAt.relation_changed | protected function relation_changed(Model $obj, $relation)
{
// Check that the relation exists
if ($obj->relations($relation) === false)
{
throw new \InvalidArgumentException('Unknown relation '.$relation);
}
// If the relation is not loaded then ignore it.
if ( ! $obj->is_fetched($relation))
{
return false;
}
$relation_object = $obj->relations($relation);
// Check if whe have a singular relation
if ($relation_object->is_singular())
{
// If so check that one model
return $obj->{$relation}->is_changed();
}
// Else we have an array of related objects so start checking them all
foreach ($obj->{$relation} as $related_model)
{
if ($related_model->is_changed())
{
return true;
}
}
return false;
} | php | protected function relation_changed(Model $obj, $relation)
{
// Check that the relation exists
if ($obj->relations($relation) === false)
{
throw new \InvalidArgumentException('Unknown relation '.$relation);
}
// If the relation is not loaded then ignore it.
if ( ! $obj->is_fetched($relation))
{
return false;
}
$relation_object = $obj->relations($relation);
// Check if whe have a singular relation
if ($relation_object->is_singular())
{
// If so check that one model
return $obj->{$relation}->is_changed();
}
// Else we have an array of related objects so start checking them all
foreach ($obj->{$relation} as $related_model)
{
if ($related_model->is_changed())
{
return true;
}
}
return false;
} | [
"protected",
"function",
"relation_changed",
"(",
"Model",
"$",
"obj",
",",
"$",
"relation",
")",
"{",
"// Check that the relation exists",
"if",
"(",
"$",
"obj",
"->",
"relations",
"(",
"$",
"relation",
")",
"===",
"false",
")",
"{",
"throw",
"new",
"\\",
"InvalidArgumentException",
"(",
"'Unknown relation '",
".",
"$",
"relation",
")",
";",
"}",
"// If the relation is not loaded then ignore it.",
"if",
"(",
"!",
"$",
"obj",
"->",
"is_fetched",
"(",
"$",
"relation",
")",
")",
"{",
"return",
"false",
";",
"}",
"$",
"relation_object",
"=",
"$",
"obj",
"->",
"relations",
"(",
"$",
"relation",
")",
";",
"// Check if whe have a singular relation",
"if",
"(",
"$",
"relation_object",
"->",
"is_singular",
"(",
")",
")",
"{",
"// If so check that one model",
"return",
"$",
"obj",
"->",
"{",
"$",
"relation",
"}",
"->",
"is_changed",
"(",
")",
";",
"}",
"// Else we have an array of related objects so start checking them all",
"foreach",
"(",
"$",
"obj",
"->",
"{",
"$",
"relation",
"}",
"as",
"$",
"related_model",
")",
"{",
"if",
"(",
"$",
"related_model",
"->",
"is_changed",
"(",
")",
")",
"{",
"return",
"true",
";",
"}",
"}",
"return",
"false",
";",
"}"
] | Checks to see if any models in the given relation are changed. This function is lazy so will return true as soon
as it finds something that has changed.
@param Model $obj
@param string $relation
@return bool | [
"Checks",
"to",
"see",
"if",
"any",
"models",
"in",
"the",
"given",
"relation",
"are",
"changed",
".",
"This",
"function",
"is",
"lazy",
"so",
"will",
"return",
"true",
"as",
"soon",
"as",
"it",
"finds",
"something",
"that",
"has",
"changed",
"."
] | 0973b7cbd540a0e89cc5bb7af94627f77f09bf49 | https://github.com/indigophp-archive/codeception-fuel-module/blob/0973b7cbd540a0e89cc5bb7af94627f77f09bf49/fuel/fuel/packages/orm/classes/observer/updatedat.php#L108-L141 |
6,604 | affinitidev/silex-config | Source/Cache/CacheProducer.php | CacheProducer.produce | public function produce()
{
$cacheFactory = null;
foreach($this->cacheFactories as $factory)
{
if(false === $factory instanceof CacheFactoryInterface) {
throw new \InvalidArgumentException("Array of Cache Factories must contain valid CacheFactory objects.");
}
if($this->type == $factory->getType()) {
$cacheFactory = $factory;
break;
}
}
if(null === $cacheFactory)
{
throw ConfigException::cacheFactoryNotFound($this->type);
}
$cache = $cacheFactory->newInstance($this->app);
if(false === $cache instanceof CacheInterface) {
throw new \InvalidArgumentException("Cache factory must produce a valid CacheInterface object.");
}
return $cache;
} | php | public function produce()
{
$cacheFactory = null;
foreach($this->cacheFactories as $factory)
{
if(false === $factory instanceof CacheFactoryInterface) {
throw new \InvalidArgumentException("Array of Cache Factories must contain valid CacheFactory objects.");
}
if($this->type == $factory->getType()) {
$cacheFactory = $factory;
break;
}
}
if(null === $cacheFactory)
{
throw ConfigException::cacheFactoryNotFound($this->type);
}
$cache = $cacheFactory->newInstance($this->app);
if(false === $cache instanceof CacheInterface) {
throw new \InvalidArgumentException("Cache factory must produce a valid CacheInterface object.");
}
return $cache;
} | [
"public",
"function",
"produce",
"(",
")",
"{",
"$",
"cacheFactory",
"=",
"null",
";",
"foreach",
"(",
"$",
"this",
"->",
"cacheFactories",
"as",
"$",
"factory",
")",
"{",
"if",
"(",
"false",
"===",
"$",
"factory",
"instanceof",
"CacheFactoryInterface",
")",
"{",
"throw",
"new",
"\\",
"InvalidArgumentException",
"(",
"\"Array of Cache Factories must contain valid CacheFactory objects.\"",
")",
";",
"}",
"if",
"(",
"$",
"this",
"->",
"type",
"==",
"$",
"factory",
"->",
"getType",
"(",
")",
")",
"{",
"$",
"cacheFactory",
"=",
"$",
"factory",
";",
"break",
";",
"}",
"}",
"if",
"(",
"null",
"===",
"$",
"cacheFactory",
")",
"{",
"throw",
"ConfigException",
"::",
"cacheFactoryNotFound",
"(",
"$",
"this",
"->",
"type",
")",
";",
"}",
"$",
"cache",
"=",
"$",
"cacheFactory",
"->",
"newInstance",
"(",
"$",
"this",
"->",
"app",
")",
";",
"if",
"(",
"false",
"===",
"$",
"cache",
"instanceof",
"CacheInterface",
")",
"{",
"throw",
"new",
"\\",
"InvalidArgumentException",
"(",
"\"Cache factory must produce a valid CacheInterface object.\"",
")",
";",
"}",
"return",
"$",
"cache",
";",
"}"
] | Produces a CacheInterface object.
@return \Affiniti\Config\Cache\CacheInterface
@throws \InvalidArgumentException
@throws \Affiniti\Config\Exception\CacheFactoryNotFound | [
"Produces",
"a",
"CacheInterface",
"object",
"."
] | 6c9cd170b26a6d30f31334ccfaca203304ad8f72 | https://github.com/affinitidev/silex-config/blob/6c9cd170b26a6d30f31334ccfaca203304ad8f72/Source/Cache/CacheProducer.php#L50-L77 |
6,605 | jhorlima/wp-mocabonita | src/tools/MbPage.php | MbPage.setSubPage | public function setSubPage(MbPage $mbPage)
{
$this->subPages[$mbPage->getSlug()] = $mbPage;
$mbPage->setParentPage($this);
return $mbPage;
} | php | public function setSubPage(MbPage $mbPage)
{
$this->subPages[$mbPage->getSlug()] = $mbPage;
$mbPage->setParentPage($this);
return $mbPage;
} | [
"public",
"function",
"setSubPage",
"(",
"MbPage",
"$",
"mbPage",
")",
"{",
"$",
"this",
"->",
"subPages",
"[",
"$",
"mbPage",
"->",
"getSlug",
"(",
")",
"]",
"=",
"$",
"mbPage",
";",
"$",
"mbPage",
"->",
"setParentPage",
"(",
"$",
"this",
")",
";",
"return",
"$",
"mbPage",
";",
"}"
] | Set sub page
@param MbPage $mbPage
@return MbPage subpage | [
"Set",
"sub",
"page"
] | a864b40d5452bc9b892f02a6bb28c02639f25fa8 | https://github.com/jhorlima/wp-mocabonita/blob/a864b40d5452bc9b892f02a6bb28c02639f25fa8/src/tools/MbPage.php#L362-L369 |
6,606 | jhorlima/wp-mocabonita | src/tools/MbPage.php | MbPage.addSubPage | public function addSubPage($name, $slug = null)
{
$subpage = self::create($name)->setSlug(is_null($slug) ? $name : $slug);
$this->setSubPage($subpage);
return $subpage;
} | php | public function addSubPage($name, $slug = null)
{
$subpage = self::create($name)->setSlug(is_null($slug) ? $name : $slug);
$this->setSubPage($subpage);
return $subpage;
} | [
"public",
"function",
"addSubPage",
"(",
"$",
"name",
",",
"$",
"slug",
"=",
"null",
")",
"{",
"$",
"subpage",
"=",
"self",
"::",
"create",
"(",
"$",
"name",
")",
"->",
"setSlug",
"(",
"is_null",
"(",
"$",
"slug",
")",
"?",
"$",
"name",
":",
"$",
"slug",
")",
";",
"$",
"this",
"->",
"setSubPage",
"(",
"$",
"subpage",
")",
";",
"return",
"$",
"subpage",
";",
"}"
] | Add sub page
@param string $name
@param string $slug
@return MbPage subpage | [
"Add",
"sub",
"page"
] | a864b40d5452bc9b892f02a6bb28c02639f25fa8 | https://github.com/jhorlima/wp-mocabonita/blob/a864b40d5452bc9b892f02a6bb28c02639f25fa8/src/tools/MbPage.php#L379-L386 |
6,607 | jhorlima/wp-mocabonita | src/tools/MbPage.php | MbPage.getController | public function getController()
{
if ($this->controller instanceof MbController) {
return $this->controller;
}
if (is_string($this->controller)) {
$this->controller = MbController::create($this->controller);
} else {
throw new MbException("No Controller has been set for the page {$this->getName()}.");
}
return $this->controller;
} | php | public function getController()
{
if ($this->controller instanceof MbController) {
return $this->controller;
}
if (is_string($this->controller)) {
$this->controller = MbController::create($this->controller);
} else {
throw new MbException("No Controller has been set for the page {$this->getName()}.");
}
return $this->controller;
} | [
"public",
"function",
"getController",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"controller",
"instanceof",
"MbController",
")",
"{",
"return",
"$",
"this",
"->",
"controller",
";",
"}",
"if",
"(",
"is_string",
"(",
"$",
"this",
"->",
"controller",
")",
")",
"{",
"$",
"this",
"->",
"controller",
"=",
"MbController",
"::",
"create",
"(",
"$",
"this",
"->",
"controller",
")",
";",
"}",
"else",
"{",
"throw",
"new",
"MbException",
"(",
"\"No Controller has been set for the page {$this->getName()}.\"",
")",
";",
"}",
"return",
"$",
"this",
"->",
"controller",
";",
"}"
] | Get page controller
@throws MbException
@return MbController | [
"Get",
"page",
"controller"
] | a864b40d5452bc9b892f02a6bb28c02639f25fa8 | https://github.com/jhorlima/wp-mocabonita/blob/a864b40d5452bc9b892f02a6bb28c02639f25fa8/src/tools/MbPage.php#L443-L456 |
6,608 | jhorlima/wp-mocabonita | src/tools/MbPage.php | MbPage.addMbAction | public function addMbAction($actionName, $action = null)
{
$mbAction = new MbAction($this, $actionName);
$mbAction->actionResolver($action);
return $this->setMbAction($mbAction);
} | php | public function addMbAction($actionName, $action = null)
{
$mbAction = new MbAction($this, $actionName);
$mbAction->actionResolver($action);
return $this->setMbAction($mbAction);
} | [
"public",
"function",
"addMbAction",
"(",
"$",
"actionName",
",",
"$",
"action",
"=",
"null",
")",
"{",
"$",
"mbAction",
"=",
"new",
"MbAction",
"(",
"$",
"this",
",",
"$",
"actionName",
")",
";",
"$",
"mbAction",
"->",
"actionResolver",
"(",
"$",
"action",
")",
";",
"return",
"$",
"this",
"->",
"setMbAction",
"(",
"$",
"mbAction",
")",
";",
"}"
] | add new MbAction
@param string $actionName
@param string|callable|mixed $action
@return MbAction | [
"add",
"new",
"MbAction"
] | a864b40d5452bc9b892f02a6bb28c02639f25fa8 | https://github.com/jhorlima/wp-mocabonita/blob/a864b40d5452bc9b892f02a6bb28c02639f25fa8/src/tools/MbPage.php#L531-L537 |
6,609 | jhorlima/wp-mocabonita | src/tools/MbPage.php | MbPage.addMenuWordpress | public function addMenuWordpress()
{
if ($this->isHideMenu()) {
add_submenu_page(
null,
$this->getName(),
$this->getName(),
$this->getCapability(),
$this->getSlug(),
[MocaBonita::getInstance(), 'sendContent']
);
} elseif ($this->isMainMenu()) {
add_menu_page(
$this->getName(),
$this->getName(),
$this->getCapability(),
$this->getSlug(),
[MocaBonita::getInstance(), 'sendContent'],
$this->getDashicon(),
$this->getMenuPosition()
);
} elseif ($this->isSubMenu()) {
add_submenu_page(
$this->getParentPage()->getSlug(),
$this->getName(),
$this->getName(),
$this->getCapability(),
$this->getSlug(),
[MocaBonita::getInstance(), 'sendContent']
);
if ($this->getParentPage()->isRemovePageSubmenu()) {
remove_submenu_page($this->getParentPage()->getSlug(), $this->getParentPage()->getSlug());
$this->getParentPage()->setRemovePageSubmenu(false);
}
}
} | php | public function addMenuWordpress()
{
if ($this->isHideMenu()) {
add_submenu_page(
null,
$this->getName(),
$this->getName(),
$this->getCapability(),
$this->getSlug(),
[MocaBonita::getInstance(), 'sendContent']
);
} elseif ($this->isMainMenu()) {
add_menu_page(
$this->getName(),
$this->getName(),
$this->getCapability(),
$this->getSlug(),
[MocaBonita::getInstance(), 'sendContent'],
$this->getDashicon(),
$this->getMenuPosition()
);
} elseif ($this->isSubMenu()) {
add_submenu_page(
$this->getParentPage()->getSlug(),
$this->getName(),
$this->getName(),
$this->getCapability(),
$this->getSlug(),
[MocaBonita::getInstance(), 'sendContent']
);
if ($this->getParentPage()->isRemovePageSubmenu()) {
remove_submenu_page($this->getParentPage()->getSlug(), $this->getParentPage()->getSlug());
$this->getParentPage()->setRemovePageSubmenu(false);
}
}
} | [
"public",
"function",
"addMenuWordpress",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"isHideMenu",
"(",
")",
")",
"{",
"add_submenu_page",
"(",
"null",
",",
"$",
"this",
"->",
"getName",
"(",
")",
",",
"$",
"this",
"->",
"getName",
"(",
")",
",",
"$",
"this",
"->",
"getCapability",
"(",
")",
",",
"$",
"this",
"->",
"getSlug",
"(",
")",
",",
"[",
"MocaBonita",
"::",
"getInstance",
"(",
")",
",",
"'sendContent'",
"]",
")",
";",
"}",
"elseif",
"(",
"$",
"this",
"->",
"isMainMenu",
"(",
")",
")",
"{",
"add_menu_page",
"(",
"$",
"this",
"->",
"getName",
"(",
")",
",",
"$",
"this",
"->",
"getName",
"(",
")",
",",
"$",
"this",
"->",
"getCapability",
"(",
")",
",",
"$",
"this",
"->",
"getSlug",
"(",
")",
",",
"[",
"MocaBonita",
"::",
"getInstance",
"(",
")",
",",
"'sendContent'",
"]",
",",
"$",
"this",
"->",
"getDashicon",
"(",
")",
",",
"$",
"this",
"->",
"getMenuPosition",
"(",
")",
")",
";",
"}",
"elseif",
"(",
"$",
"this",
"->",
"isSubMenu",
"(",
")",
")",
"{",
"add_submenu_page",
"(",
"$",
"this",
"->",
"getParentPage",
"(",
")",
"->",
"getSlug",
"(",
")",
",",
"$",
"this",
"->",
"getName",
"(",
")",
",",
"$",
"this",
"->",
"getName",
"(",
")",
",",
"$",
"this",
"->",
"getCapability",
"(",
")",
",",
"$",
"this",
"->",
"getSlug",
"(",
")",
",",
"[",
"MocaBonita",
"::",
"getInstance",
"(",
")",
",",
"'sendContent'",
"]",
")",
";",
"if",
"(",
"$",
"this",
"->",
"getParentPage",
"(",
")",
"->",
"isRemovePageSubmenu",
"(",
")",
")",
"{",
"remove_submenu_page",
"(",
"$",
"this",
"->",
"getParentPage",
"(",
")",
"->",
"getSlug",
"(",
")",
",",
"$",
"this",
"->",
"getParentPage",
"(",
")",
"->",
"getSlug",
"(",
")",
")",
";",
"$",
"this",
"->",
"getParentPage",
"(",
")",
"->",
"setRemovePageSubmenu",
"(",
"false",
")",
";",
"}",
"}",
"}"
] | Add Menu in Wordpress
@return void
@throws MbException | [
"Add",
"Menu",
"in",
"Wordpress"
] | a864b40d5452bc9b892f02a6bb28c02639f25fa8 | https://github.com/jhorlima/wp-mocabonita/blob/a864b40d5452bc9b892f02a6bb28c02639f25fa8/src/tools/MbPage.php#L569-L611 |
6,610 | cityware/city-snmp | src/MIBS/System.php | System.getAll | public function getAll() {
$system = array();
$system['contact'] = $this->contact();
$system['description'] = $this->description();
$system['location'] = $this->location();
$system['name'] = $this->name();
//$system['services'] = $this->services();
$system['uptime'] = $this->uptime();
return $system;
} | php | public function getAll() {
$system = array();
$system['contact'] = $this->contact();
$system['description'] = $this->description();
$system['location'] = $this->location();
$system['name'] = $this->name();
//$system['services'] = $this->services();
$system['uptime'] = $this->uptime();
return $system;
} | [
"public",
"function",
"getAll",
"(",
")",
"{",
"$",
"system",
"=",
"array",
"(",
")",
";",
"$",
"system",
"[",
"'contact'",
"]",
"=",
"$",
"this",
"->",
"contact",
"(",
")",
";",
"$",
"system",
"[",
"'description'",
"]",
"=",
"$",
"this",
"->",
"description",
"(",
")",
";",
"$",
"system",
"[",
"'location'",
"]",
"=",
"$",
"this",
"->",
"location",
"(",
")",
";",
"$",
"system",
"[",
"'name'",
"]",
"=",
"$",
"this",
"->",
"name",
"(",
")",
";",
"//$system['services'] = $this->services();",
"$",
"system",
"[",
"'uptime'",
"]",
"=",
"$",
"this",
"->",
"uptime",
"(",
")",
";",
"return",
"$",
"system",
";",
"}"
] | Gets all system values as an associate array
The keys of the array are contact, description, location,
name, services, uptime
@return array All system values as an associate array | [
"Gets",
"all",
"system",
"values",
"as",
"an",
"associate",
"array"
] | 831b7485b6c932a84f081d5ceeb9c5f4e7a8641d | https://github.com/cityware/city-snmp/blob/831b7485b6c932a84f081d5ceeb9c5f4e7a8641d/src/MIBS/System.php#L129-L140 |
6,611 | zepi/turbo-base | Zepi/Web/AccessControl/src/EventHandler/Login.php | Login.createForm | protected function createForm(Framework $framework, WebRequest $request, Response $response)
{
// Create the form
$form = new Form('login', $request->getFullRoute('login'), 'post');
// Add the user data group
$errorBox = new ErrorBox(
'login-errors',
1
);
$form->addPart($errorBox);
$origin = '';
if ($request->hasParam('_origin')) {
$origin = $request->getParam('_origin');
}
$helpText = '';
if ($this->getSetting('accesscontrol.allowRenewPassword')) {
$helpText = $this->translate('Lost your password? <a href="%link%">Renew it here.</a>', '\\Zepi\\Web\\AccessControl', array(
'link' => $request->getFullRoute('request-new-password')
));
}
// Add the user data group
$group = new Group(
'user-data',
$this->translate('User data', '\\Zepi\\Web\\AccessControl'),
array(
new Text(
'username',
$this->translate('Username', '\\Zepi\\Web\\AccessControl'),
true
),
new Password(
'password',
$this->translate('Password', '\\Zepi\\Web\\AccessControl'),
true,
'',
$helpText
),
new Hidden(
'origin',
$origin
)
),
10
);
$form->addPart($group);
// Add the submit button
$buttonGroup = new ButtonGroup(
'buttons',
array(
new Submit(
'submit',
$this->translate('Login', '\\Zepi\\Web\\AccessControl')
)
),
100
);
$form->addPart($buttonGroup);
return $form;
} | php | protected function createForm(Framework $framework, WebRequest $request, Response $response)
{
// Create the form
$form = new Form('login', $request->getFullRoute('login'), 'post');
// Add the user data group
$errorBox = new ErrorBox(
'login-errors',
1
);
$form->addPart($errorBox);
$origin = '';
if ($request->hasParam('_origin')) {
$origin = $request->getParam('_origin');
}
$helpText = '';
if ($this->getSetting('accesscontrol.allowRenewPassword')) {
$helpText = $this->translate('Lost your password? <a href="%link%">Renew it here.</a>', '\\Zepi\\Web\\AccessControl', array(
'link' => $request->getFullRoute('request-new-password')
));
}
// Add the user data group
$group = new Group(
'user-data',
$this->translate('User data', '\\Zepi\\Web\\AccessControl'),
array(
new Text(
'username',
$this->translate('Username', '\\Zepi\\Web\\AccessControl'),
true
),
new Password(
'password',
$this->translate('Password', '\\Zepi\\Web\\AccessControl'),
true,
'',
$helpText
),
new Hidden(
'origin',
$origin
)
),
10
);
$form->addPart($group);
// Add the submit button
$buttonGroup = new ButtonGroup(
'buttons',
array(
new Submit(
'submit',
$this->translate('Login', '\\Zepi\\Web\\AccessControl')
)
),
100
);
$form->addPart($buttonGroup);
return $form;
} | [
"protected",
"function",
"createForm",
"(",
"Framework",
"$",
"framework",
",",
"WebRequest",
"$",
"request",
",",
"Response",
"$",
"response",
")",
"{",
"// Create the form",
"$",
"form",
"=",
"new",
"Form",
"(",
"'login'",
",",
"$",
"request",
"->",
"getFullRoute",
"(",
"'login'",
")",
",",
"'post'",
")",
";",
"// Add the user data group",
"$",
"errorBox",
"=",
"new",
"ErrorBox",
"(",
"'login-errors'",
",",
"1",
")",
";",
"$",
"form",
"->",
"addPart",
"(",
"$",
"errorBox",
")",
";",
"$",
"origin",
"=",
"''",
";",
"if",
"(",
"$",
"request",
"->",
"hasParam",
"(",
"'_origin'",
")",
")",
"{",
"$",
"origin",
"=",
"$",
"request",
"->",
"getParam",
"(",
"'_origin'",
")",
";",
"}",
"$",
"helpText",
"=",
"''",
";",
"if",
"(",
"$",
"this",
"->",
"getSetting",
"(",
"'accesscontrol.allowRenewPassword'",
")",
")",
"{",
"$",
"helpText",
"=",
"$",
"this",
"->",
"translate",
"(",
"'Lost your password? <a href=\"%link%\">Renew it here.</a>'",
",",
"'\\\\Zepi\\\\Web\\\\AccessControl'",
",",
"array",
"(",
"'link'",
"=>",
"$",
"request",
"->",
"getFullRoute",
"(",
"'request-new-password'",
")",
")",
")",
";",
"}",
"// Add the user data group",
"$",
"group",
"=",
"new",
"Group",
"(",
"'user-data'",
",",
"$",
"this",
"->",
"translate",
"(",
"'User data'",
",",
"'\\\\Zepi\\\\Web\\\\AccessControl'",
")",
",",
"array",
"(",
"new",
"Text",
"(",
"'username'",
",",
"$",
"this",
"->",
"translate",
"(",
"'Username'",
",",
"'\\\\Zepi\\\\Web\\\\AccessControl'",
")",
",",
"true",
")",
",",
"new",
"Password",
"(",
"'password'",
",",
"$",
"this",
"->",
"translate",
"(",
"'Password'",
",",
"'\\\\Zepi\\\\Web\\\\AccessControl'",
")",
",",
"true",
",",
"''",
",",
"$",
"helpText",
")",
",",
"new",
"Hidden",
"(",
"'origin'",
",",
"$",
"origin",
")",
")",
",",
"10",
")",
";",
"$",
"form",
"->",
"addPart",
"(",
"$",
"group",
")",
";",
"// Add the submit button",
"$",
"buttonGroup",
"=",
"new",
"ButtonGroup",
"(",
"'buttons'",
",",
"array",
"(",
"new",
"Submit",
"(",
"'submit'",
",",
"$",
"this",
"->",
"translate",
"(",
"'Login'",
",",
"'\\\\Zepi\\\\Web\\\\AccessControl'",
")",
")",
")",
",",
"100",
")",
";",
"$",
"form",
"->",
"addPart",
"(",
"$",
"buttonGroup",
")",
";",
"return",
"$",
"form",
";",
"}"
] | Returns the Form object for the login form
@access protected
@param \Zepi\Turbo\Framework $framework
@param \Zepi\Turbo\Request\WebRequest $request
@param \Zepi\Turbo\Response\Response $response
@return \Zepi\Web\UserInterface\Form\Form | [
"Returns",
"the",
"Form",
"object",
"for",
"the",
"login",
"form"
] | 9a36d8c7649317f55f91b2adf386bd1f04ec02a3 | https://github.com/zepi/turbo-base/blob/9a36d8c7649317f55f91b2adf386bd1f04ec02a3/Zepi/Web/AccessControl/src/EventHandler/Login.php#L228-L292 |
6,612 | gossi/trixionary | src/model/Base/SkillQuery.php | SkillQuery.filterByHistory | public function filterByHistory($history = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($history)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $history)) {
$history = str_replace('*', '%', $history);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(SkillTableMap::COL_HISTORY, $history, $comparison);
} | php | public function filterByHistory($history = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($history)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $history)) {
$history = str_replace('*', '%', $history);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(SkillTableMap::COL_HISTORY, $history, $comparison);
} | [
"public",
"function",
"filterByHistory",
"(",
"$",
"history",
"=",
"null",
",",
"$",
"comparison",
"=",
"null",
")",
"{",
"if",
"(",
"null",
"===",
"$",
"comparison",
")",
"{",
"if",
"(",
"is_array",
"(",
"$",
"history",
")",
")",
"{",
"$",
"comparison",
"=",
"Criteria",
"::",
"IN",
";",
"}",
"elseif",
"(",
"preg_match",
"(",
"'/[\\%\\*]/'",
",",
"$",
"history",
")",
")",
"{",
"$",
"history",
"=",
"str_replace",
"(",
"'*'",
",",
"'%'",
",",
"$",
"history",
")",
";",
"$",
"comparison",
"=",
"Criteria",
"::",
"LIKE",
";",
"}",
"}",
"return",
"$",
"this",
"->",
"addUsingAlias",
"(",
"SkillTableMap",
"::",
"COL_HISTORY",
",",
"$",
"history",
",",
"$",
"comparison",
")",
";",
"}"
] | Filter the query on the history column
Example usage:
<code>
$query->filterByHistory('fooValue'); // WHERE history = 'fooValue'
$query->filterByHistory('%fooValue%'); // WHERE history LIKE '%fooValue%'
</code>
@param string $history The value to use as filter.
Accepts wildcards (* and % trigger a LIKE)
@param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
@return $this|ChildSkillQuery The current query, for fluid interface | [
"Filter",
"the",
"query",
"on",
"the",
"history",
"column"
] | 221a6c5322473d7d7f8e322958a3ee46d87da150 | https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/SkillQuery.php#L722-L734 |
6,613 | gossi/trixionary | src/model/Base/SkillQuery.php | SkillQuery.filterByMovementDescription | public function filterByMovementDescription($movementDescription = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($movementDescription)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $movementDescription)) {
$movementDescription = str_replace('*', '%', $movementDescription);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(SkillTableMap::COL_MOVEMENT_DESCRIPTION, $movementDescription, $comparison);
} | php | public function filterByMovementDescription($movementDescription = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($movementDescription)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $movementDescription)) {
$movementDescription = str_replace('*', '%', $movementDescription);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(SkillTableMap::COL_MOVEMENT_DESCRIPTION, $movementDescription, $comparison);
} | [
"public",
"function",
"filterByMovementDescription",
"(",
"$",
"movementDescription",
"=",
"null",
",",
"$",
"comparison",
"=",
"null",
")",
"{",
"if",
"(",
"null",
"===",
"$",
"comparison",
")",
"{",
"if",
"(",
"is_array",
"(",
"$",
"movementDescription",
")",
")",
"{",
"$",
"comparison",
"=",
"Criteria",
"::",
"IN",
";",
"}",
"elseif",
"(",
"preg_match",
"(",
"'/[\\%\\*]/'",
",",
"$",
"movementDescription",
")",
")",
"{",
"$",
"movementDescription",
"=",
"str_replace",
"(",
"'*'",
",",
"'%'",
",",
"$",
"movementDescription",
")",
";",
"$",
"comparison",
"=",
"Criteria",
"::",
"LIKE",
";",
"}",
"}",
"return",
"$",
"this",
"->",
"addUsingAlias",
"(",
"SkillTableMap",
"::",
"COL_MOVEMENT_DESCRIPTION",
",",
"$",
"movementDescription",
",",
"$",
"comparison",
")",
";",
"}"
] | Filter the query on the movement_description column
Example usage:
<code>
$query->filterByMovementDescription('fooValue'); // WHERE movement_description = 'fooValue'
$query->filterByMovementDescription('%fooValue%'); // WHERE movement_description LIKE '%fooValue%'
</code>
@param string $movementDescription The value to use as filter.
Accepts wildcards (* and % trigger a LIKE)
@param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
@return $this|ChildSkillQuery The current query, for fluid interface | [
"Filter",
"the",
"query",
"on",
"the",
"movement_description",
"column"
] | 221a6c5322473d7d7f8e322958a3ee46d87da150 | https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/SkillQuery.php#L982-L994 |
6,614 | gossi/trixionary | src/model/Base/SkillQuery.php | SkillQuery.filterByMultiplier | public function filterByMultiplier($multiplier = null, $comparison = null)
{
if (is_array($multiplier)) {
$useMinMax = false;
if (isset($multiplier['min'])) {
$this->addUsingAlias(SkillTableMap::COL_MULTIPLIER, $multiplier['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($multiplier['max'])) {
$this->addUsingAlias(SkillTableMap::COL_MULTIPLIER, $multiplier['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(SkillTableMap::COL_MULTIPLIER, $multiplier, $comparison);
} | php | public function filterByMultiplier($multiplier = null, $comparison = null)
{
if (is_array($multiplier)) {
$useMinMax = false;
if (isset($multiplier['min'])) {
$this->addUsingAlias(SkillTableMap::COL_MULTIPLIER, $multiplier['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($multiplier['max'])) {
$this->addUsingAlias(SkillTableMap::COL_MULTIPLIER, $multiplier['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(SkillTableMap::COL_MULTIPLIER, $multiplier, $comparison);
} | [
"public",
"function",
"filterByMultiplier",
"(",
"$",
"multiplier",
"=",
"null",
",",
"$",
"comparison",
"=",
"null",
")",
"{",
"if",
"(",
"is_array",
"(",
"$",
"multiplier",
")",
")",
"{",
"$",
"useMinMax",
"=",
"false",
";",
"if",
"(",
"isset",
"(",
"$",
"multiplier",
"[",
"'min'",
"]",
")",
")",
"{",
"$",
"this",
"->",
"addUsingAlias",
"(",
"SkillTableMap",
"::",
"COL_MULTIPLIER",
",",
"$",
"multiplier",
"[",
"'min'",
"]",
",",
"Criteria",
"::",
"GREATER_EQUAL",
")",
";",
"$",
"useMinMax",
"=",
"true",
";",
"}",
"if",
"(",
"isset",
"(",
"$",
"multiplier",
"[",
"'max'",
"]",
")",
")",
"{",
"$",
"this",
"->",
"addUsingAlias",
"(",
"SkillTableMap",
"::",
"COL_MULTIPLIER",
",",
"$",
"multiplier",
"[",
"'max'",
"]",
",",
"Criteria",
"::",
"LESS_EQUAL",
")",
";",
"$",
"useMinMax",
"=",
"true",
";",
"}",
"if",
"(",
"$",
"useMinMax",
")",
"{",
"return",
"$",
"this",
";",
"}",
"if",
"(",
"null",
"===",
"$",
"comparison",
")",
"{",
"$",
"comparison",
"=",
"Criteria",
"::",
"IN",
";",
"}",
"}",
"return",
"$",
"this",
"->",
"addUsingAlias",
"(",
"SkillTableMap",
"::",
"COL_MULTIPLIER",
",",
"$",
"multiplier",
",",
"$",
"comparison",
")",
";",
"}"
] | Filter the query on the multiplier column
Example usage:
<code>
$query->filterByMultiplier(1234); // WHERE multiplier = 1234
$query->filterByMultiplier(array(12, 34)); // WHERE multiplier IN (12, 34)
$query->filterByMultiplier(array('min' => 12)); // WHERE multiplier > 12
</code>
@param mixed $multiplier The value to use as filter.
Use scalar values for equality.
Use array values for in_array() equivalent.
Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
@param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
@return $this|ChildSkillQuery The current query, for fluid interface | [
"Filter",
"the",
"query",
"on",
"the",
"multiplier",
"column"
] | 221a6c5322473d7d7f8e322958a3ee46d87da150 | https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/SkillQuery.php#L1269-L1290 |
6,615 | gossi/trixionary | src/model/Base/SkillQuery.php | SkillQuery.filterByObjectId | public function filterByObjectId($objectId = null, $comparison = null)
{
if (is_array($objectId)) {
$useMinMax = false;
if (isset($objectId['min'])) {
$this->addUsingAlias(SkillTableMap::COL_OBJECT_ID, $objectId['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($objectId['max'])) {
$this->addUsingAlias(SkillTableMap::COL_OBJECT_ID, $objectId['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(SkillTableMap::COL_OBJECT_ID, $objectId, $comparison);
} | php | public function filterByObjectId($objectId = null, $comparison = null)
{
if (is_array($objectId)) {
$useMinMax = false;
if (isset($objectId['min'])) {
$this->addUsingAlias(SkillTableMap::COL_OBJECT_ID, $objectId['min'], Criteria::GREATER_EQUAL);
$useMinMax = true;
}
if (isset($objectId['max'])) {
$this->addUsingAlias(SkillTableMap::COL_OBJECT_ID, $objectId['max'], Criteria::LESS_EQUAL);
$useMinMax = true;
}
if ($useMinMax) {
return $this;
}
if (null === $comparison) {
$comparison = Criteria::IN;
}
}
return $this->addUsingAlias(SkillTableMap::COL_OBJECT_ID, $objectId, $comparison);
} | [
"public",
"function",
"filterByObjectId",
"(",
"$",
"objectId",
"=",
"null",
",",
"$",
"comparison",
"=",
"null",
")",
"{",
"if",
"(",
"is_array",
"(",
"$",
"objectId",
")",
")",
"{",
"$",
"useMinMax",
"=",
"false",
";",
"if",
"(",
"isset",
"(",
"$",
"objectId",
"[",
"'min'",
"]",
")",
")",
"{",
"$",
"this",
"->",
"addUsingAlias",
"(",
"SkillTableMap",
"::",
"COL_OBJECT_ID",
",",
"$",
"objectId",
"[",
"'min'",
"]",
",",
"Criteria",
"::",
"GREATER_EQUAL",
")",
";",
"$",
"useMinMax",
"=",
"true",
";",
"}",
"if",
"(",
"isset",
"(",
"$",
"objectId",
"[",
"'max'",
"]",
")",
")",
"{",
"$",
"this",
"->",
"addUsingAlias",
"(",
"SkillTableMap",
"::",
"COL_OBJECT_ID",
",",
"$",
"objectId",
"[",
"'max'",
"]",
",",
"Criteria",
"::",
"LESS_EQUAL",
")",
";",
"$",
"useMinMax",
"=",
"true",
";",
"}",
"if",
"(",
"$",
"useMinMax",
")",
"{",
"return",
"$",
"this",
";",
"}",
"if",
"(",
"null",
"===",
"$",
"comparison",
")",
"{",
"$",
"comparison",
"=",
"Criteria",
"::",
"IN",
";",
"}",
"}",
"return",
"$",
"this",
"->",
"addUsingAlias",
"(",
"SkillTableMap",
"::",
"COL_OBJECT_ID",
",",
"$",
"objectId",
",",
"$",
"comparison",
")",
";",
"}"
] | Filter the query on the object_id column
Example usage:
<code>
$query->filterByObjectId(1234); // WHERE object_id = 1234
$query->filterByObjectId(array(12, 34)); // WHERE object_id IN (12, 34)
$query->filterByObjectId(array('min' => 12)); // WHERE object_id > 12
</code>
@see filterByObject()
@param mixed $objectId The value to use as filter.
Use scalar values for equality.
Use array values for in_array() equivalent.
Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
@param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
@return $this|ChildSkillQuery The current query, for fluid interface | [
"Filter",
"the",
"query",
"on",
"the",
"object_id",
"column"
] | 221a6c5322473d7d7f8e322958a3ee46d87da150 | https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/SkillQuery.php#L1609-L1630 |
6,616 | gossi/trixionary | src/model/Base/SkillQuery.php | SkillQuery.filterBySport | public function filterBySport($sport, $comparison = null)
{
if ($sport instanceof \gossi\trixionary\model\Sport) {
return $this
->addUsingAlias(SkillTableMap::COL_SPORT_ID, $sport->getId(), $comparison);
} elseif ($sport instanceof ObjectCollection) {
if (null === $comparison) {
$comparison = Criteria::IN;
}
return $this
->addUsingAlias(SkillTableMap::COL_SPORT_ID, $sport->toKeyValue('PrimaryKey', 'Id'), $comparison);
} else {
throw new PropelException('filterBySport() only accepts arguments of type \gossi\trixionary\model\Sport or Collection');
}
} | php | public function filterBySport($sport, $comparison = null)
{
if ($sport instanceof \gossi\trixionary\model\Sport) {
return $this
->addUsingAlias(SkillTableMap::COL_SPORT_ID, $sport->getId(), $comparison);
} elseif ($sport instanceof ObjectCollection) {
if (null === $comparison) {
$comparison = Criteria::IN;
}
return $this
->addUsingAlias(SkillTableMap::COL_SPORT_ID, $sport->toKeyValue('PrimaryKey', 'Id'), $comparison);
} else {
throw new PropelException('filterBySport() only accepts arguments of type \gossi\trixionary\model\Sport or Collection');
}
} | [
"public",
"function",
"filterBySport",
"(",
"$",
"sport",
",",
"$",
"comparison",
"=",
"null",
")",
"{",
"if",
"(",
"$",
"sport",
"instanceof",
"\\",
"gossi",
"\\",
"trixionary",
"\\",
"model",
"\\",
"Sport",
")",
"{",
"return",
"$",
"this",
"->",
"addUsingAlias",
"(",
"SkillTableMap",
"::",
"COL_SPORT_ID",
",",
"$",
"sport",
"->",
"getId",
"(",
")",
",",
"$",
"comparison",
")",
";",
"}",
"elseif",
"(",
"$",
"sport",
"instanceof",
"ObjectCollection",
")",
"{",
"if",
"(",
"null",
"===",
"$",
"comparison",
")",
"{",
"$",
"comparison",
"=",
"Criteria",
"::",
"IN",
";",
"}",
"return",
"$",
"this",
"->",
"addUsingAlias",
"(",
"SkillTableMap",
"::",
"COL_SPORT_ID",
",",
"$",
"sport",
"->",
"toKeyValue",
"(",
"'PrimaryKey'",
",",
"'Id'",
")",
",",
"$",
"comparison",
")",
";",
"}",
"else",
"{",
"throw",
"new",
"PropelException",
"(",
"'filterBySport() only accepts arguments of type \\gossi\\trixionary\\model\\Sport or Collection'",
")",
";",
"}",
"}"
] | Filter the query by a related \gossi\trixionary\model\Sport object
@param \gossi\trixionary\model\Sport|ObjectCollection $sport The related object(s) to use as filter
@param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
@throws \Propel\Runtime\Exception\PropelException
@return ChildSkillQuery The current query, for fluid interface | [
"Filter",
"the",
"query",
"by",
"a",
"related",
"\\",
"gossi",
"\\",
"trixionary",
"\\",
"model",
"\\",
"Sport",
"object"
] | 221a6c5322473d7d7f8e322958a3ee46d87da150 | https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/SkillQuery.php#L1755-L1770 |
6,617 | gossi/trixionary | src/model/Base/SkillQuery.php | SkillQuery.useVariationOfQuery | public function useVariationOfQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
return $this
->joinVariationOf($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'VariationOf', '\gossi\trixionary\model\SkillQuery');
} | php | public function useVariationOfQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
return $this
->joinVariationOf($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'VariationOf', '\gossi\trixionary\model\SkillQuery');
} | [
"public",
"function",
"useVariationOfQuery",
"(",
"$",
"relationAlias",
"=",
"null",
",",
"$",
"joinType",
"=",
"Criteria",
"::",
"LEFT_JOIN",
")",
"{",
"return",
"$",
"this",
"->",
"joinVariationOf",
"(",
"$",
"relationAlias",
",",
"$",
"joinType",
")",
"->",
"useQuery",
"(",
"$",
"relationAlias",
"?",
"$",
"relationAlias",
":",
"'VariationOf'",
",",
"'\\gossi\\trixionary\\model\\SkillQuery'",
")",
";",
"}"
] | Use the VariationOf 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 secondary query class using the current class as primary query | [
"Use",
"the",
"VariationOf",
"relation",
"Skill",
"object"
] | 221a6c5322473d7d7f8e322958a3ee46d87da150 | https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/SkillQuery.php#L1892-L1897 |
6,618 | gossi/trixionary | src/model/Base/SkillQuery.php | SkillQuery.useMultipleOfQuery | public function useMultipleOfQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
return $this
->joinMultipleOf($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'MultipleOf', '\gossi\trixionary\model\SkillQuery');
} | php | public function useMultipleOfQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
return $this
->joinMultipleOf($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'MultipleOf', '\gossi\trixionary\model\SkillQuery');
} | [
"public",
"function",
"useMultipleOfQuery",
"(",
"$",
"relationAlias",
"=",
"null",
",",
"$",
"joinType",
"=",
"Criteria",
"::",
"LEFT_JOIN",
")",
"{",
"return",
"$",
"this",
"->",
"joinMultipleOf",
"(",
"$",
"relationAlias",
",",
"$",
"joinType",
")",
"->",
"useQuery",
"(",
"$",
"relationAlias",
"?",
"$",
"relationAlias",
":",
"'MultipleOf'",
",",
"'\\gossi\\trixionary\\model\\SkillQuery'",
")",
";",
"}"
] | Use the MultipleOf 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 secondary query class using the current class as primary query | [
"Use",
"the",
"MultipleOf",
"relation",
"Skill",
"object"
] | 221a6c5322473d7d7f8e322958a3ee46d87da150 | https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/SkillQuery.php#L1969-L1974 |
6,619 | gossi/trixionary | src/model/Base/SkillQuery.php | SkillQuery.useStartPositionQuery | public function useStartPositionQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
return $this
->joinStartPosition($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'StartPosition', '\gossi\trixionary\model\PositionQuery');
} | php | public function useStartPositionQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
return $this
->joinStartPosition($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'StartPosition', '\gossi\trixionary\model\PositionQuery');
} | [
"public",
"function",
"useStartPositionQuery",
"(",
"$",
"relationAlias",
"=",
"null",
",",
"$",
"joinType",
"=",
"Criteria",
"::",
"LEFT_JOIN",
")",
"{",
"return",
"$",
"this",
"->",
"joinStartPosition",
"(",
"$",
"relationAlias",
",",
"$",
"joinType",
")",
"->",
"useQuery",
"(",
"$",
"relationAlias",
"?",
"$",
"relationAlias",
":",
"'StartPosition'",
",",
"'\\gossi\\trixionary\\model\\PositionQuery'",
")",
";",
"}"
] | Use the StartPosition relation Position 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\PositionQuery A secondary query class using the current class as primary query | [
"Use",
"the",
"StartPosition",
"relation",
"Position",
"object"
] | 221a6c5322473d7d7f8e322958a3ee46d87da150 | https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/SkillQuery.php#L2123-L2128 |
6,620 | gossi/trixionary | src/model/Base/SkillQuery.php | SkillQuery.useEndPositionQuery | public function useEndPositionQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
return $this
->joinEndPosition($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'EndPosition', '\gossi\trixionary\model\PositionQuery');
} | php | public function useEndPositionQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
return $this
->joinEndPosition($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'EndPosition', '\gossi\trixionary\model\PositionQuery');
} | [
"public",
"function",
"useEndPositionQuery",
"(",
"$",
"relationAlias",
"=",
"null",
",",
"$",
"joinType",
"=",
"Criteria",
"::",
"LEFT_JOIN",
")",
"{",
"return",
"$",
"this",
"->",
"joinEndPosition",
"(",
"$",
"relationAlias",
",",
"$",
"joinType",
")",
"->",
"useQuery",
"(",
"$",
"relationAlias",
"?",
"$",
"relationAlias",
":",
"'EndPosition'",
",",
"'\\gossi\\trixionary\\model\\PositionQuery'",
")",
";",
"}"
] | Use the EndPosition relation Position 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\PositionQuery A secondary query class using the current class as primary query | [
"Use",
"the",
"EndPosition",
"relation",
"Position",
"object"
] | 221a6c5322473d7d7f8e322958a3ee46d87da150 | https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/SkillQuery.php#L2200-L2205 |
6,621 | gossi/trixionary | src/model/Base/SkillQuery.php | SkillQuery.useFeaturedPictureQuery | public function useFeaturedPictureQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
return $this
->joinFeaturedPicture($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'FeaturedPicture', '\gossi\trixionary\model\PictureQuery');
} | php | public function useFeaturedPictureQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
return $this
->joinFeaturedPicture($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'FeaturedPicture', '\gossi\trixionary\model\PictureQuery');
} | [
"public",
"function",
"useFeaturedPictureQuery",
"(",
"$",
"relationAlias",
"=",
"null",
",",
"$",
"joinType",
"=",
"Criteria",
"::",
"LEFT_JOIN",
")",
"{",
"return",
"$",
"this",
"->",
"joinFeaturedPicture",
"(",
"$",
"relationAlias",
",",
"$",
"joinType",
")",
"->",
"useQuery",
"(",
"$",
"relationAlias",
"?",
"$",
"relationAlias",
":",
"'FeaturedPicture'",
",",
"'\\gossi\\trixionary\\model\\PictureQuery'",
")",
";",
"}"
] | Use the FeaturedPicture relation Picture 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\PictureQuery A secondary query class using the current class as primary query | [
"Use",
"the",
"FeaturedPicture",
"relation",
"Picture",
"object"
] | 221a6c5322473d7d7f8e322958a3ee46d87da150 | https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/SkillQuery.php#L2277-L2282 |
6,622 | gossi/trixionary | src/model/Base/SkillQuery.php | SkillQuery.useFeaturedVideoQuery | public function useFeaturedVideoQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
return $this
->joinFeaturedVideo($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'FeaturedVideo', '\gossi\trixionary\model\VideoQuery');
} | php | public function useFeaturedVideoQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
return $this
->joinFeaturedVideo($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'FeaturedVideo', '\gossi\trixionary\model\VideoQuery');
} | [
"public",
"function",
"useFeaturedVideoQuery",
"(",
"$",
"relationAlias",
"=",
"null",
",",
"$",
"joinType",
"=",
"Criteria",
"::",
"LEFT_JOIN",
")",
"{",
"return",
"$",
"this",
"->",
"joinFeaturedVideo",
"(",
"$",
"relationAlias",
",",
"$",
"joinType",
")",
"->",
"useQuery",
"(",
"$",
"relationAlias",
"?",
"$",
"relationAlias",
":",
"'FeaturedVideo'",
",",
"'\\gossi\\trixionary\\model\\VideoQuery'",
")",
";",
"}"
] | Use the FeaturedVideo relation Video 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\VideoQuery A secondary query class using the current class as primary query | [
"Use",
"the",
"FeaturedVideo",
"relation",
"Video",
"object"
] | 221a6c5322473d7d7f8e322958a3ee46d87da150 | https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/SkillQuery.php#L2354-L2359 |
6,623 | gossi/trixionary | src/model/Base/SkillQuery.php | SkillQuery.useFeaturedTutorialQuery | public function useFeaturedTutorialQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
return $this
->joinFeaturedTutorial($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'FeaturedTutorial', '\gossi\trixionary\model\VideoQuery');
} | php | public function useFeaturedTutorialQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
return $this
->joinFeaturedTutorial($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'FeaturedTutorial', '\gossi\trixionary\model\VideoQuery');
} | [
"public",
"function",
"useFeaturedTutorialQuery",
"(",
"$",
"relationAlias",
"=",
"null",
",",
"$",
"joinType",
"=",
"Criteria",
"::",
"LEFT_JOIN",
")",
"{",
"return",
"$",
"this",
"->",
"joinFeaturedTutorial",
"(",
"$",
"relationAlias",
",",
"$",
"joinType",
")",
"->",
"useQuery",
"(",
"$",
"relationAlias",
"?",
"$",
"relationAlias",
":",
"'FeaturedTutorial'",
",",
"'\\gossi\\trixionary\\model\\VideoQuery'",
")",
";",
"}"
] | Use the FeaturedTutorial relation Video 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\VideoQuery A secondary query class using the current class as primary query | [
"Use",
"the",
"FeaturedTutorial",
"relation",
"Video",
"object"
] | 221a6c5322473d7d7f8e322958a3ee46d87da150 | https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/SkillQuery.php#L2431-L2436 |
6,624 | gossi/trixionary | src/model/Base/SkillQuery.php | SkillQuery.useKstrukturRootQuery | public function useKstrukturRootQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
return $this
->joinKstrukturRoot($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'KstrukturRoot', '\gossi\trixionary\model\KstrukturQuery');
} | php | public function useKstrukturRootQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
return $this
->joinKstrukturRoot($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'KstrukturRoot', '\gossi\trixionary\model\KstrukturQuery');
} | [
"public",
"function",
"useKstrukturRootQuery",
"(",
"$",
"relationAlias",
"=",
"null",
",",
"$",
"joinType",
"=",
"Criteria",
"::",
"LEFT_JOIN",
")",
"{",
"return",
"$",
"this",
"->",
"joinKstrukturRoot",
"(",
"$",
"relationAlias",
",",
"$",
"joinType",
")",
"->",
"useQuery",
"(",
"$",
"relationAlias",
"?",
"$",
"relationAlias",
":",
"'KstrukturRoot'",
",",
"'\\gossi\\trixionary\\model\\KstrukturQuery'",
")",
";",
"}"
] | Use the KstrukturRoot relation Kstruktur 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\KstrukturQuery A secondary query class using the current class as primary query | [
"Use",
"the",
"KstrukturRoot",
"relation",
"Kstruktur",
"object"
] | 221a6c5322473d7d7f8e322958a3ee46d87da150 | https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/SkillQuery.php#L2508-L2513 |
6,625 | gossi/trixionary | src/model/Base/SkillQuery.php | SkillQuery.useFunctionPhaseRootQuery | public function useFunctionPhaseRootQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
return $this
->joinFunctionPhaseRoot($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'FunctionPhaseRoot', '\gossi\trixionary\model\FunctionPhaseQuery');
} | php | public function useFunctionPhaseRootQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
return $this
->joinFunctionPhaseRoot($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'FunctionPhaseRoot', '\gossi\trixionary\model\FunctionPhaseQuery');
} | [
"public",
"function",
"useFunctionPhaseRootQuery",
"(",
"$",
"relationAlias",
"=",
"null",
",",
"$",
"joinType",
"=",
"Criteria",
"::",
"LEFT_JOIN",
")",
"{",
"return",
"$",
"this",
"->",
"joinFunctionPhaseRoot",
"(",
"$",
"relationAlias",
",",
"$",
"joinType",
")",
"->",
"useQuery",
"(",
"$",
"relationAlias",
"?",
"$",
"relationAlias",
":",
"'FunctionPhaseRoot'",
",",
"'\\gossi\\trixionary\\model\\FunctionPhaseQuery'",
")",
";",
"}"
] | Use the FunctionPhaseRoot relation FunctionPhase 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\FunctionPhaseQuery A secondary query class using the current class as primary query | [
"Use",
"the",
"FunctionPhaseRoot",
"relation",
"FunctionPhase",
"object"
] | 221a6c5322473d7d7f8e322958a3ee46d87da150 | https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/SkillQuery.php#L2585-L2590 |
6,626 | gossi/trixionary | src/model/Base/SkillQuery.php | SkillQuery.useVariationQuery | public function useVariationQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
return $this
->joinVariation($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'Variation', '\gossi\trixionary\model\SkillQuery');
} | php | public function useVariationQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
return $this
->joinVariation($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'Variation', '\gossi\trixionary\model\SkillQuery');
} | [
"public",
"function",
"useVariationQuery",
"(",
"$",
"relationAlias",
"=",
"null",
",",
"$",
"joinType",
"=",
"Criteria",
"::",
"LEFT_JOIN",
")",
"{",
"return",
"$",
"this",
"->",
"joinVariation",
"(",
"$",
"relationAlias",
",",
"$",
"joinType",
")",
"->",
"useQuery",
"(",
"$",
"relationAlias",
"?",
"$",
"relationAlias",
":",
"'Variation'",
",",
"'\\gossi\\trixionary\\model\\SkillQuery'",
")",
";",
"}"
] | Use the Variation 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 secondary query class using the current class as primary query | [
"Use",
"the",
"Variation",
"relation",
"Skill",
"object"
] | 221a6c5322473d7d7f8e322958a3ee46d87da150 | https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/SkillQuery.php#L2658-L2663 |
6,627 | gossi/trixionary | src/model/Base/SkillQuery.php | SkillQuery.useMultipleQuery | public function useMultipleQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
return $this
->joinMultiple($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'Multiple', '\gossi\trixionary\model\SkillQuery');
} | php | public function useMultipleQuery($relationAlias = null, $joinType = Criteria::LEFT_JOIN)
{
return $this
->joinMultiple($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'Multiple', '\gossi\trixionary\model\SkillQuery');
} | [
"public",
"function",
"useMultipleQuery",
"(",
"$",
"relationAlias",
"=",
"null",
",",
"$",
"joinType",
"=",
"Criteria",
"::",
"LEFT_JOIN",
")",
"{",
"return",
"$",
"this",
"->",
"joinMultiple",
"(",
"$",
"relationAlias",
",",
"$",
"joinType",
")",
"->",
"useQuery",
"(",
"$",
"relationAlias",
"?",
"$",
"relationAlias",
":",
"'Multiple'",
",",
"'\\gossi\\trixionary\\model\\SkillQuery'",
")",
";",
"}"
] | Use the Multiple 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 secondary query class using the current class as primary query | [
"Use",
"the",
"Multiple",
"relation",
"Skill",
"object"
] | 221a6c5322473d7d7f8e322958a3ee46d87da150 | https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/SkillQuery.php#L2731-L2736 |
6,628 | gossi/trixionary | src/model/Base/SkillQuery.php | SkillQuery.useLineageRelatedBySkillIdQuery | public function useLineageRelatedBySkillIdQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
return $this
->joinLineageRelatedBySkillId($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'LineageRelatedBySkillId', '\gossi\trixionary\model\LineageQuery');
} | php | public function useLineageRelatedBySkillIdQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
return $this
->joinLineageRelatedBySkillId($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'LineageRelatedBySkillId', '\gossi\trixionary\model\LineageQuery');
} | [
"public",
"function",
"useLineageRelatedBySkillIdQuery",
"(",
"$",
"relationAlias",
"=",
"null",
",",
"$",
"joinType",
"=",
"Criteria",
"::",
"INNER_JOIN",
")",
"{",
"return",
"$",
"this",
"->",
"joinLineageRelatedBySkillId",
"(",
"$",
"relationAlias",
",",
"$",
"joinType",
")",
"->",
"useQuery",
"(",
"$",
"relationAlias",
"?",
"$",
"relationAlias",
":",
"'LineageRelatedBySkillId'",
",",
"'\\gossi\\trixionary\\model\\LineageQuery'",
")",
";",
"}"
] | Use the LineageRelatedBySkillId relation Lineage 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\LineageQuery A secondary query class using the current class as primary query | [
"Use",
"the",
"LineageRelatedBySkillId",
"relation",
"Lineage",
"object"
] | 221a6c5322473d7d7f8e322958a3ee46d87da150 | https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/SkillQuery.php#L2804-L2809 |
6,629 | gossi/trixionary | src/model/Base/SkillQuery.php | SkillQuery.useLineageRelatedByAncestorIdQuery | public function useLineageRelatedByAncestorIdQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
return $this
->joinLineageRelatedByAncestorId($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'LineageRelatedByAncestorId', '\gossi\trixionary\model\LineageQuery');
} | php | public function useLineageRelatedByAncestorIdQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
return $this
->joinLineageRelatedByAncestorId($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'LineageRelatedByAncestorId', '\gossi\trixionary\model\LineageQuery');
} | [
"public",
"function",
"useLineageRelatedByAncestorIdQuery",
"(",
"$",
"relationAlias",
"=",
"null",
",",
"$",
"joinType",
"=",
"Criteria",
"::",
"INNER_JOIN",
")",
"{",
"return",
"$",
"this",
"->",
"joinLineageRelatedByAncestorId",
"(",
"$",
"relationAlias",
",",
"$",
"joinType",
")",
"->",
"useQuery",
"(",
"$",
"relationAlias",
"?",
"$",
"relationAlias",
":",
"'LineageRelatedByAncestorId'",
",",
"'\\gossi\\trixionary\\model\\LineageQuery'",
")",
";",
"}"
] | Use the LineageRelatedByAncestorId relation Lineage 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\LineageQuery A secondary query class using the current class as primary query | [
"Use",
"the",
"LineageRelatedByAncestorId",
"relation",
"Lineage",
"object"
] | 221a6c5322473d7d7f8e322958a3ee46d87da150 | https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/SkillQuery.php#L2877-L2882 |
6,630 | gossi/trixionary | src/model/Base/SkillQuery.php | SkillQuery.useChildQuery | public function useChildQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
return $this
->joinChild($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'Child', '\gossi\trixionary\model\SkillDependencyQuery');
} | php | public function useChildQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
return $this
->joinChild($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'Child', '\gossi\trixionary\model\SkillDependencyQuery');
} | [
"public",
"function",
"useChildQuery",
"(",
"$",
"relationAlias",
"=",
"null",
",",
"$",
"joinType",
"=",
"Criteria",
"::",
"INNER_JOIN",
")",
"{",
"return",
"$",
"this",
"->",
"joinChild",
"(",
"$",
"relationAlias",
",",
"$",
"joinType",
")",
"->",
"useQuery",
"(",
"$",
"relationAlias",
"?",
"$",
"relationAlias",
":",
"'Child'",
",",
"'\\gossi\\trixionary\\model\\SkillDependencyQuery'",
")",
";",
"}"
] | Use the Child relation SkillDependency 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\SkillDependencyQuery A secondary query class using the current class as primary query | [
"Use",
"the",
"Child",
"relation",
"SkillDependency",
"object"
] | 221a6c5322473d7d7f8e322958a3ee46d87da150 | https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/SkillQuery.php#L2950-L2955 |
6,631 | gossi/trixionary | src/model/Base/SkillQuery.php | SkillQuery.useParentQuery | public function useParentQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
return $this
->joinParent($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'Parent', '\gossi\trixionary\model\SkillDependencyQuery');
} | php | public function useParentQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
return $this
->joinParent($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'Parent', '\gossi\trixionary\model\SkillDependencyQuery');
} | [
"public",
"function",
"useParentQuery",
"(",
"$",
"relationAlias",
"=",
"null",
",",
"$",
"joinType",
"=",
"Criteria",
"::",
"INNER_JOIN",
")",
"{",
"return",
"$",
"this",
"->",
"joinParent",
"(",
"$",
"relationAlias",
",",
"$",
"joinType",
")",
"->",
"useQuery",
"(",
"$",
"relationAlias",
"?",
"$",
"relationAlias",
":",
"'Parent'",
",",
"'\\gossi\\trixionary\\model\\SkillDependencyQuery'",
")",
";",
"}"
] | Use the Parent relation SkillDependency 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\SkillDependencyQuery A secondary query class using the current class as primary query | [
"Use",
"the",
"Parent",
"relation",
"SkillDependency",
"object"
] | 221a6c5322473d7d7f8e322958a3ee46d87da150 | https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/SkillQuery.php#L3023-L3028 |
6,632 | gossi/trixionary | src/model/Base/SkillQuery.php | SkillQuery.usePartQuery | public function usePartQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
return $this
->joinPart($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'Part', '\gossi\trixionary\model\SkillPartQuery');
} | php | public function usePartQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
return $this
->joinPart($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'Part', '\gossi\trixionary\model\SkillPartQuery');
} | [
"public",
"function",
"usePartQuery",
"(",
"$",
"relationAlias",
"=",
"null",
",",
"$",
"joinType",
"=",
"Criteria",
"::",
"INNER_JOIN",
")",
"{",
"return",
"$",
"this",
"->",
"joinPart",
"(",
"$",
"relationAlias",
",",
"$",
"joinType",
")",
"->",
"useQuery",
"(",
"$",
"relationAlias",
"?",
"$",
"relationAlias",
":",
"'Part'",
",",
"'\\gossi\\trixionary\\model\\SkillPartQuery'",
")",
";",
"}"
] | Use the Part relation SkillPart 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\SkillPartQuery A secondary query class using the current class as primary query | [
"Use",
"the",
"Part",
"relation",
"SkillPart",
"object"
] | 221a6c5322473d7d7f8e322958a3ee46d87da150 | https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/SkillQuery.php#L3096-L3101 |
6,633 | gossi/trixionary | src/model/Base/SkillQuery.php | SkillQuery.useCompositeQuery | public function useCompositeQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
return $this
->joinComposite($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'Composite', '\gossi\trixionary\model\SkillPartQuery');
} | php | public function useCompositeQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
return $this
->joinComposite($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'Composite', '\gossi\trixionary\model\SkillPartQuery');
} | [
"public",
"function",
"useCompositeQuery",
"(",
"$",
"relationAlias",
"=",
"null",
",",
"$",
"joinType",
"=",
"Criteria",
"::",
"INNER_JOIN",
")",
"{",
"return",
"$",
"this",
"->",
"joinComposite",
"(",
"$",
"relationAlias",
",",
"$",
"joinType",
")",
"->",
"useQuery",
"(",
"$",
"relationAlias",
"?",
"$",
"relationAlias",
":",
"'Composite'",
",",
"'\\gossi\\trixionary\\model\\SkillPartQuery'",
")",
";",
"}"
] | Use the Composite relation SkillPart 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\SkillPartQuery A secondary query class using the current class as primary query | [
"Use",
"the",
"Composite",
"relation",
"SkillPart",
"object"
] | 221a6c5322473d7d7f8e322958a3ee46d87da150 | https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/SkillQuery.php#L3169-L3174 |
6,634 | gossi/trixionary | src/model/Base/SkillQuery.php | SkillQuery.filterBySkillGroup | public function filterBySkillGroup($skillGroup, $comparison = null)
{
if ($skillGroup instanceof \gossi\trixionary\model\SkillGroup) {
return $this
->addUsingAlias(SkillTableMap::COL_ID, $skillGroup->getSkillId(), $comparison);
} elseif ($skillGroup instanceof ObjectCollection) {
return $this
->useSkillGroupQuery()
->filterByPrimaryKeys($skillGroup->getPrimaryKeys())
->endUse();
} else {
throw new PropelException('filterBySkillGroup() only accepts arguments of type \gossi\trixionary\model\SkillGroup or Collection');
}
} | php | public function filterBySkillGroup($skillGroup, $comparison = null)
{
if ($skillGroup instanceof \gossi\trixionary\model\SkillGroup) {
return $this
->addUsingAlias(SkillTableMap::COL_ID, $skillGroup->getSkillId(), $comparison);
} elseif ($skillGroup instanceof ObjectCollection) {
return $this
->useSkillGroupQuery()
->filterByPrimaryKeys($skillGroup->getPrimaryKeys())
->endUse();
} else {
throw new PropelException('filterBySkillGroup() only accepts arguments of type \gossi\trixionary\model\SkillGroup or Collection');
}
} | [
"public",
"function",
"filterBySkillGroup",
"(",
"$",
"skillGroup",
",",
"$",
"comparison",
"=",
"null",
")",
"{",
"if",
"(",
"$",
"skillGroup",
"instanceof",
"\\",
"gossi",
"\\",
"trixionary",
"\\",
"model",
"\\",
"SkillGroup",
")",
"{",
"return",
"$",
"this",
"->",
"addUsingAlias",
"(",
"SkillTableMap",
"::",
"COL_ID",
",",
"$",
"skillGroup",
"->",
"getSkillId",
"(",
")",
",",
"$",
"comparison",
")",
";",
"}",
"elseif",
"(",
"$",
"skillGroup",
"instanceof",
"ObjectCollection",
")",
"{",
"return",
"$",
"this",
"->",
"useSkillGroupQuery",
"(",
")",
"->",
"filterByPrimaryKeys",
"(",
"$",
"skillGroup",
"->",
"getPrimaryKeys",
"(",
")",
")",
"->",
"endUse",
"(",
")",
";",
"}",
"else",
"{",
"throw",
"new",
"PropelException",
"(",
"'filterBySkillGroup() only accepts arguments of type \\gossi\\trixionary\\model\\SkillGroup or Collection'",
")",
";",
"}",
"}"
] | Filter the query by a related \gossi\trixionary\model\SkillGroup object
@param \gossi\trixionary\model\SkillGroup|ObjectCollection $skillGroup the related object to use as filter
@param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
@return ChildSkillQuery The current query, for fluid interface | [
"Filter",
"the",
"query",
"by",
"a",
"related",
"\\",
"gossi",
"\\",
"trixionary",
"\\",
"model",
"\\",
"SkillGroup",
"object"
] | 221a6c5322473d7d7f8e322958a3ee46d87da150 | https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/SkillQuery.php#L3184-L3197 |
6,635 | gossi/trixionary | src/model/Base/SkillQuery.php | SkillQuery.usePictureQuery | public function usePictureQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
return $this
->joinPicture($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'Picture', '\gossi\trixionary\model\PictureQuery');
} | php | public function usePictureQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
return $this
->joinPicture($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'Picture', '\gossi\trixionary\model\PictureQuery');
} | [
"public",
"function",
"usePictureQuery",
"(",
"$",
"relationAlias",
"=",
"null",
",",
"$",
"joinType",
"=",
"Criteria",
"::",
"INNER_JOIN",
")",
"{",
"return",
"$",
"this",
"->",
"joinPicture",
"(",
"$",
"relationAlias",
",",
"$",
"joinType",
")",
"->",
"useQuery",
"(",
"$",
"relationAlias",
"?",
"$",
"relationAlias",
":",
"'Picture'",
",",
"'\\gossi\\trixionary\\model\\PictureQuery'",
")",
";",
"}"
] | Use the Picture relation Picture 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\PictureQuery A secondary query class using the current class as primary query | [
"Use",
"the",
"Picture",
"relation",
"Picture",
"object"
] | 221a6c5322473d7d7f8e322958a3ee46d87da150 | https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/SkillQuery.php#L3315-L3320 |
6,636 | gossi/trixionary | src/model/Base/SkillQuery.php | SkillQuery.useVideoQuery | public function useVideoQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
return $this
->joinVideo($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'Video', '\gossi\trixionary\model\VideoQuery');
} | php | public function useVideoQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
return $this
->joinVideo($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'Video', '\gossi\trixionary\model\VideoQuery');
} | [
"public",
"function",
"useVideoQuery",
"(",
"$",
"relationAlias",
"=",
"null",
",",
"$",
"joinType",
"=",
"Criteria",
"::",
"INNER_JOIN",
")",
"{",
"return",
"$",
"this",
"->",
"joinVideo",
"(",
"$",
"relationAlias",
",",
"$",
"joinType",
")",
"->",
"useQuery",
"(",
"$",
"relationAlias",
"?",
"$",
"relationAlias",
":",
"'Video'",
",",
"'\\gossi\\trixionary\\model\\VideoQuery'",
")",
";",
"}"
] | Use the Video relation Video 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\VideoQuery A secondary query class using the current class as primary query | [
"Use",
"the",
"Video",
"relation",
"Video",
"object"
] | 221a6c5322473d7d7f8e322958a3ee46d87da150 | https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/SkillQuery.php#L3388-L3393 |
6,637 | gossi/trixionary | src/model/Base/SkillQuery.php | SkillQuery.filterBySkillReference | public function filterBySkillReference($skillReference, $comparison = null)
{
if ($skillReference instanceof \gossi\trixionary\model\SkillReference) {
return $this
->addUsingAlias(SkillTableMap::COL_ID, $skillReference->getSkillId(), $comparison);
} elseif ($skillReference instanceof ObjectCollection) {
return $this
->useSkillReferenceQuery()
->filterByPrimaryKeys($skillReference->getPrimaryKeys())
->endUse();
} else {
throw new PropelException('filterBySkillReference() only accepts arguments of type \gossi\trixionary\model\SkillReference or Collection');
}
} | php | public function filterBySkillReference($skillReference, $comparison = null)
{
if ($skillReference instanceof \gossi\trixionary\model\SkillReference) {
return $this
->addUsingAlias(SkillTableMap::COL_ID, $skillReference->getSkillId(), $comparison);
} elseif ($skillReference instanceof ObjectCollection) {
return $this
->useSkillReferenceQuery()
->filterByPrimaryKeys($skillReference->getPrimaryKeys())
->endUse();
} else {
throw new PropelException('filterBySkillReference() only accepts arguments of type \gossi\trixionary\model\SkillReference or Collection');
}
} | [
"public",
"function",
"filterBySkillReference",
"(",
"$",
"skillReference",
",",
"$",
"comparison",
"=",
"null",
")",
"{",
"if",
"(",
"$",
"skillReference",
"instanceof",
"\\",
"gossi",
"\\",
"trixionary",
"\\",
"model",
"\\",
"SkillReference",
")",
"{",
"return",
"$",
"this",
"->",
"addUsingAlias",
"(",
"SkillTableMap",
"::",
"COL_ID",
",",
"$",
"skillReference",
"->",
"getSkillId",
"(",
")",
",",
"$",
"comparison",
")",
";",
"}",
"elseif",
"(",
"$",
"skillReference",
"instanceof",
"ObjectCollection",
")",
"{",
"return",
"$",
"this",
"->",
"useSkillReferenceQuery",
"(",
")",
"->",
"filterByPrimaryKeys",
"(",
"$",
"skillReference",
"->",
"getPrimaryKeys",
"(",
")",
")",
"->",
"endUse",
"(",
")",
";",
"}",
"else",
"{",
"throw",
"new",
"PropelException",
"(",
"'filterBySkillReference() only accepts arguments of type \\gossi\\trixionary\\model\\SkillReference or Collection'",
")",
";",
"}",
"}"
] | Filter the query by a related \gossi\trixionary\model\SkillReference object
@param \gossi\trixionary\model\SkillReference|ObjectCollection $skillReference the related object to use as filter
@param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
@return ChildSkillQuery The current query, for fluid interface | [
"Filter",
"the",
"query",
"by",
"a",
"related",
"\\",
"gossi",
"\\",
"trixionary",
"\\",
"model",
"\\",
"SkillReference",
"object"
] | 221a6c5322473d7d7f8e322958a3ee46d87da150 | https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/SkillQuery.php#L3403-L3416 |
6,638 | gossi/trixionary | src/model/Base/SkillQuery.php | SkillQuery.useKstrukturRelatedBySkillIdQuery | public function useKstrukturRelatedBySkillIdQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
return $this
->joinKstrukturRelatedBySkillId($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'KstrukturRelatedBySkillId', '\gossi\trixionary\model\KstrukturQuery');
} | php | public function useKstrukturRelatedBySkillIdQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
return $this
->joinKstrukturRelatedBySkillId($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'KstrukturRelatedBySkillId', '\gossi\trixionary\model\KstrukturQuery');
} | [
"public",
"function",
"useKstrukturRelatedBySkillIdQuery",
"(",
"$",
"relationAlias",
"=",
"null",
",",
"$",
"joinType",
"=",
"Criteria",
"::",
"INNER_JOIN",
")",
"{",
"return",
"$",
"this",
"->",
"joinKstrukturRelatedBySkillId",
"(",
"$",
"relationAlias",
",",
"$",
"joinType",
")",
"->",
"useQuery",
"(",
"$",
"relationAlias",
"?",
"$",
"relationAlias",
":",
"'KstrukturRelatedBySkillId'",
",",
"'\\gossi\\trixionary\\model\\KstrukturQuery'",
")",
";",
"}"
] | Use the KstrukturRelatedBySkillId relation Kstruktur 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\KstrukturQuery A secondary query class using the current class as primary query | [
"Use",
"the",
"KstrukturRelatedBySkillId",
"relation",
"Kstruktur",
"object"
] | 221a6c5322473d7d7f8e322958a3ee46d87da150 | https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/SkillQuery.php#L3607-L3612 |
6,639 | gossi/trixionary | src/model/Base/SkillQuery.php | SkillQuery.useFunctionPhaseRelatedBySkillIdQuery | public function useFunctionPhaseRelatedBySkillIdQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
return $this
->joinFunctionPhaseRelatedBySkillId($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'FunctionPhaseRelatedBySkillId', '\gossi\trixionary\model\FunctionPhaseQuery');
} | php | public function useFunctionPhaseRelatedBySkillIdQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
return $this
->joinFunctionPhaseRelatedBySkillId($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'FunctionPhaseRelatedBySkillId', '\gossi\trixionary\model\FunctionPhaseQuery');
} | [
"public",
"function",
"useFunctionPhaseRelatedBySkillIdQuery",
"(",
"$",
"relationAlias",
"=",
"null",
",",
"$",
"joinType",
"=",
"Criteria",
"::",
"INNER_JOIN",
")",
"{",
"return",
"$",
"this",
"->",
"joinFunctionPhaseRelatedBySkillId",
"(",
"$",
"relationAlias",
",",
"$",
"joinType",
")",
"->",
"useQuery",
"(",
"$",
"relationAlias",
"?",
"$",
"relationAlias",
":",
"'FunctionPhaseRelatedBySkillId'",
",",
"'\\gossi\\trixionary\\model\\FunctionPhaseQuery'",
")",
";",
"}"
] | Use the FunctionPhaseRelatedBySkillId relation FunctionPhase 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\FunctionPhaseQuery A secondary query class using the current class as primary query | [
"Use",
"the",
"FunctionPhaseRelatedBySkillId",
"relation",
"FunctionPhase",
"object"
] | 221a6c5322473d7d7f8e322958a3ee46d87da150 | https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/SkillQuery.php#L3680-L3685 |
6,640 | gossi/trixionary | src/model/Base/SkillQuery.php | SkillQuery.filterBySkillVersion | public function filterBySkillVersion($skillVersion, $comparison = null)
{
if ($skillVersion instanceof \gossi\trixionary\model\SkillVersion) {
return $this
->addUsingAlias(SkillTableMap::COL_ID, $skillVersion->getId(), $comparison);
} elseif ($skillVersion instanceof ObjectCollection) {
return $this
->useSkillVersionQuery()
->filterByPrimaryKeys($skillVersion->getPrimaryKeys())
->endUse();
} else {
throw new PropelException('filterBySkillVersion() only accepts arguments of type \gossi\trixionary\model\SkillVersion or Collection');
}
} | php | public function filterBySkillVersion($skillVersion, $comparison = null)
{
if ($skillVersion instanceof \gossi\trixionary\model\SkillVersion) {
return $this
->addUsingAlias(SkillTableMap::COL_ID, $skillVersion->getId(), $comparison);
} elseif ($skillVersion instanceof ObjectCollection) {
return $this
->useSkillVersionQuery()
->filterByPrimaryKeys($skillVersion->getPrimaryKeys())
->endUse();
} else {
throw new PropelException('filterBySkillVersion() only accepts arguments of type \gossi\trixionary\model\SkillVersion or Collection');
}
} | [
"public",
"function",
"filterBySkillVersion",
"(",
"$",
"skillVersion",
",",
"$",
"comparison",
"=",
"null",
")",
"{",
"if",
"(",
"$",
"skillVersion",
"instanceof",
"\\",
"gossi",
"\\",
"trixionary",
"\\",
"model",
"\\",
"SkillVersion",
")",
"{",
"return",
"$",
"this",
"->",
"addUsingAlias",
"(",
"SkillTableMap",
"::",
"COL_ID",
",",
"$",
"skillVersion",
"->",
"getId",
"(",
")",
",",
"$",
"comparison",
")",
";",
"}",
"elseif",
"(",
"$",
"skillVersion",
"instanceof",
"ObjectCollection",
")",
"{",
"return",
"$",
"this",
"->",
"useSkillVersionQuery",
"(",
")",
"->",
"filterByPrimaryKeys",
"(",
"$",
"skillVersion",
"->",
"getPrimaryKeys",
"(",
")",
")",
"->",
"endUse",
"(",
")",
";",
"}",
"else",
"{",
"throw",
"new",
"PropelException",
"(",
"'filterBySkillVersion() only accepts arguments of type \\gossi\\trixionary\\model\\SkillVersion or Collection'",
")",
";",
"}",
"}"
] | Filter the query by a related \gossi\trixionary\model\SkillVersion object
@param \gossi\trixionary\model\SkillVersion|ObjectCollection $skillVersion the related object to use as filter
@param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
@return ChildSkillQuery The current query, for fluid interface | [
"Filter",
"the",
"query",
"by",
"a",
"related",
"\\",
"gossi",
"\\",
"trixionary",
"\\",
"model",
"\\",
"SkillVersion",
"object"
] | 221a6c5322473d7d7f8e322958a3ee46d87da150 | https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/SkillQuery.php#L3695-L3708 |
6,641 | gossi/trixionary | src/model/Base/SkillQuery.php | SkillQuery.useSkillVersionQuery | public function useSkillVersionQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
return $this
->joinSkillVersion($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'SkillVersion', '\gossi\trixionary\model\SkillVersionQuery');
} | php | public function useSkillVersionQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
{
return $this
->joinSkillVersion($relationAlias, $joinType)
->useQuery($relationAlias ? $relationAlias : 'SkillVersion', '\gossi\trixionary\model\SkillVersionQuery');
} | [
"public",
"function",
"useSkillVersionQuery",
"(",
"$",
"relationAlias",
"=",
"null",
",",
"$",
"joinType",
"=",
"Criteria",
"::",
"INNER_JOIN",
")",
"{",
"return",
"$",
"this",
"->",
"joinSkillVersion",
"(",
"$",
"relationAlias",
",",
"$",
"joinType",
")",
"->",
"useQuery",
"(",
"$",
"relationAlias",
"?",
"$",
"relationAlias",
":",
"'SkillVersion'",
",",
"'\\gossi\\trixionary\\model\\SkillVersionQuery'",
")",
";",
"}"
] | Use the SkillVersion relation SkillVersion 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\SkillVersionQuery A secondary query class using the current class as primary query | [
"Use",
"the",
"SkillVersion",
"relation",
"SkillVersion",
"object"
] | 221a6c5322473d7d7f8e322958a3ee46d87da150 | https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/SkillQuery.php#L3753-L3758 |
6,642 | gossi/trixionary | src/model/Base/SkillQuery.php | SkillQuery.filterByGroup | public function filterByGroup($group, $comparison = Criteria::EQUAL)
{
return $this
->useSkillGroupQuery()
->filterByGroup($group, $comparison)
->endUse();
} | php | public function filterByGroup($group, $comparison = Criteria::EQUAL)
{
return $this
->useSkillGroupQuery()
->filterByGroup($group, $comparison)
->endUse();
} | [
"public",
"function",
"filterByGroup",
"(",
"$",
"group",
",",
"$",
"comparison",
"=",
"Criteria",
"::",
"EQUAL",
")",
"{",
"return",
"$",
"this",
"->",
"useSkillGroupQuery",
"(",
")",
"->",
"filterByGroup",
"(",
"$",
"group",
",",
"$",
"comparison",
")",
"->",
"endUse",
"(",
")",
";",
"}"
] | Filter the query by a related Group object
using the kk_trixionary_skill_group table as cross reference
@param Group $group the related object to use as filter
@param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
@return ChildSkillQuery The current query, for fluid interface | [
"Filter",
"the",
"query",
"by",
"a",
"related",
"Group",
"object",
"using",
"the",
"kk_trixionary_skill_group",
"table",
"as",
"cross",
"reference"
] | 221a6c5322473d7d7f8e322958a3ee46d87da150 | https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/SkillQuery.php#L3837-L3843 |
6,643 | gossi/trixionary | src/model/Base/SkillQuery.php | SkillQuery.filterByReference | public function filterByReference($reference, $comparison = Criteria::EQUAL)
{
return $this
->useSkillReferenceQuery()
->filterByReference($reference, $comparison)
->endUse();
} | php | public function filterByReference($reference, $comparison = Criteria::EQUAL)
{
return $this
->useSkillReferenceQuery()
->filterByReference($reference, $comparison)
->endUse();
} | [
"public",
"function",
"filterByReference",
"(",
"$",
"reference",
",",
"$",
"comparison",
"=",
"Criteria",
"::",
"EQUAL",
")",
"{",
"return",
"$",
"this",
"->",
"useSkillReferenceQuery",
"(",
")",
"->",
"filterByReference",
"(",
"$",
"reference",
",",
"$",
"comparison",
")",
"->",
"endUse",
"(",
")",
";",
"}"
] | Filter the query by a related Reference object
using the kk_trixionary_skill_reference table as cross reference
@param Reference $reference the related object to use as filter
@param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
@return ChildSkillQuery The current query, for fluid interface | [
"Filter",
"the",
"query",
"by",
"a",
"related",
"Reference",
"object",
"using",
"the",
"kk_trixionary_skill_reference",
"table",
"as",
"cross",
"reference"
] | 221a6c5322473d7d7f8e322958a3ee46d87da150 | https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/SkillQuery.php#L3854-L3860 |
6,644 | gossi/trixionary | src/model/Base/SkillQuery.php | SkillQuery.findRelatedObjectSkillCounts | protected function findRelatedObjectSkillCounts($con)
{
$criteria = clone $this;
if ($this->useAliasInSQL) {
$alias = $this->getModelAlias();
$criteria->removeAlias($alias);
} else {
$alias = '';
}
$this->objectSkillCounts = \gossi\trixionary\model\ObjectQuery::create()
->joinSkill($alias)
->mergeWith($criteria)
->find($con);
} | php | protected function findRelatedObjectSkillCounts($con)
{
$criteria = clone $this;
if ($this->useAliasInSQL) {
$alias = $this->getModelAlias();
$criteria->removeAlias($alias);
} else {
$alias = '';
}
$this->objectSkillCounts = \gossi\trixionary\model\ObjectQuery::create()
->joinSkill($alias)
->mergeWith($criteria)
->find($con);
} | [
"protected",
"function",
"findRelatedObjectSkillCounts",
"(",
"$",
"con",
")",
"{",
"$",
"criteria",
"=",
"clone",
"$",
"this",
";",
"if",
"(",
"$",
"this",
"->",
"useAliasInSQL",
")",
"{",
"$",
"alias",
"=",
"$",
"this",
"->",
"getModelAlias",
"(",
")",
";",
"$",
"criteria",
"->",
"removeAlias",
"(",
"$",
"alias",
")",
";",
"}",
"else",
"{",
"$",
"alias",
"=",
"''",
";",
"}",
"$",
"this",
"->",
"objectSkillCounts",
"=",
"\\",
"gossi",
"\\",
"trixionary",
"\\",
"model",
"\\",
"ObjectQuery",
"::",
"create",
"(",
")",
"->",
"joinSkill",
"(",
"$",
"alias",
")",
"->",
"mergeWith",
"(",
"$",
"criteria",
")",
"->",
"find",
"(",
"$",
"con",
")",
";",
"}"
] | Finds the related Object objects and keep them for later
@param ConnectionInterface $con A connection object | [
"Finds",
"the",
"related",
"Object",
"objects",
"and",
"keep",
"them",
"for",
"later"
] | 221a6c5322473d7d7f8e322958a3ee46d87da150 | https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/SkillQuery.php#L4030-L4043 |
6,645 | Aureja/JobQueue | src/JobQueue.php | JobQueue.run | public function run($queue)
{
$configuration = $this->getConfiguration($queue);
if (null === $configuration) {
return;
}
try {
$job = $this->getJob($configuration);
$configuration->increaseOrderNr();
$this->saveJobState($configuration, JobState::STATE_RUNNING);
$report = $this->reportManager->create($configuration);
$state = $job->run($report);
if (JobState::STATE_FINISHED === $state) {
$configuration->setNextStart(new \DateTime('+' . $configuration->getPeriod() . ' seconds'));
$report->setSuccessful(true);
}
$report->setEndedAt();
$this->saveJobState($configuration, $state);
} catch (JobFactoryException $e) {
$this->saveJobState($configuration, JobState::STATE_FAILED);
}
} | php | public function run($queue)
{
$configuration = $this->getConfiguration($queue);
if (null === $configuration) {
return;
}
try {
$job = $this->getJob($configuration);
$configuration->increaseOrderNr();
$this->saveJobState($configuration, JobState::STATE_RUNNING);
$report = $this->reportManager->create($configuration);
$state = $job->run($report);
if (JobState::STATE_FINISHED === $state) {
$configuration->setNextStart(new \DateTime('+' . $configuration->getPeriod() . ' seconds'));
$report->setSuccessful(true);
}
$report->setEndedAt();
$this->saveJobState($configuration, $state);
} catch (JobFactoryException $e) {
$this->saveJobState($configuration, JobState::STATE_FAILED);
}
} | [
"public",
"function",
"run",
"(",
"$",
"queue",
")",
"{",
"$",
"configuration",
"=",
"$",
"this",
"->",
"getConfiguration",
"(",
"$",
"queue",
")",
";",
"if",
"(",
"null",
"===",
"$",
"configuration",
")",
"{",
"return",
";",
"}",
"try",
"{",
"$",
"job",
"=",
"$",
"this",
"->",
"getJob",
"(",
"$",
"configuration",
")",
";",
"$",
"configuration",
"->",
"increaseOrderNr",
"(",
")",
";",
"$",
"this",
"->",
"saveJobState",
"(",
"$",
"configuration",
",",
"JobState",
"::",
"STATE_RUNNING",
")",
";",
"$",
"report",
"=",
"$",
"this",
"->",
"reportManager",
"->",
"create",
"(",
"$",
"configuration",
")",
";",
"$",
"state",
"=",
"$",
"job",
"->",
"run",
"(",
"$",
"report",
")",
";",
"if",
"(",
"JobState",
"::",
"STATE_FINISHED",
"===",
"$",
"state",
")",
"{",
"$",
"configuration",
"->",
"setNextStart",
"(",
"new",
"\\",
"DateTime",
"(",
"'+'",
".",
"$",
"configuration",
"->",
"getPeriod",
"(",
")",
".",
"' seconds'",
")",
")",
";",
"$",
"report",
"->",
"setSuccessful",
"(",
"true",
")",
";",
"}",
"$",
"report",
"->",
"setEndedAt",
"(",
")",
";",
"$",
"this",
"->",
"saveJobState",
"(",
"$",
"configuration",
",",
"$",
"state",
")",
";",
"}",
"catch",
"(",
"JobFactoryException",
"$",
"e",
")",
"{",
"$",
"this",
"->",
"saveJobState",
"(",
"$",
"configuration",
",",
"JobState",
"::",
"STATE_FAILED",
")",
";",
"}",
"}"
] | Run job queue.
@param string $queue | [
"Run",
"job",
"queue",
"."
] | 0e488ca123d3105cf791173e3147ede1bcf39018 | https://github.com/Aureja/JobQueue/blob/0e488ca123d3105cf791173e3147ede1bcf39018/src/JobQueue.php#L89-L117 |
6,646 | Aureja/JobQueue | src/JobQueue.php | JobQueue.saveJobState | private function saveJobState(JobConfigurationInterface $configuration, $state)
{
$configuration->setState($state);
$this->configurationManager->add($configuration, true);
$this->eventDispatcher->dispatch(JobQueueEvents::CHANGE_JOB_STATE, new JobEvent($configuration));
} | php | private function saveJobState(JobConfigurationInterface $configuration, $state)
{
$configuration->setState($state);
$this->configurationManager->add($configuration, true);
$this->eventDispatcher->dispatch(JobQueueEvents::CHANGE_JOB_STATE, new JobEvent($configuration));
} | [
"private",
"function",
"saveJobState",
"(",
"JobConfigurationInterface",
"$",
"configuration",
",",
"$",
"state",
")",
"{",
"$",
"configuration",
"->",
"setState",
"(",
"$",
"state",
")",
";",
"$",
"this",
"->",
"configurationManager",
"->",
"add",
"(",
"$",
"configuration",
",",
"true",
")",
";",
"$",
"this",
"->",
"eventDispatcher",
"->",
"dispatch",
"(",
"JobQueueEvents",
"::",
"CHANGE_JOB_STATE",
",",
"new",
"JobEvent",
"(",
"$",
"configuration",
")",
")",
";",
"}"
] | Save job state.
@param JobConfigurationInterface $configuration
@param string $state | [
"Save",
"job",
"state",
"."
] | 0e488ca123d3105cf791173e3147ede1bcf39018 | https://github.com/Aureja/JobQueue/blob/0e488ca123d3105cf791173e3147ede1bcf39018/src/JobQueue.php#L213-L219 |
6,647 | itavero/AMNL-Mollie | lib/AMNL/Mollie/Paysafecard/PaysafecardGateway.php | PaysafecardGateway.checkPayment | public function checkPayment($transaction_id)
{
// Check arguments
if (null === $transaction_id || !is_string($transaction_id) || strlen(trim($transaction_id)) == 0) {
throw new \InvalidArgumentException('Transaction ID should be a string.');
}
// Params
$params = array(
'partnerid' => $this->partnerId,
'transaction_id' => $transaction_id,
);
// Do request
$response = $this->request('check-status/', $params);
// Gather data
if ($response->order === null) {
throw new MollieException('Unexpected response');
}
$transactionId = (string) $response->order->transaction_id;
$amount = (int) $response->order->amount;
$paid = ((string) $response->order->paid == 'true');
$status = (string) $response->order->status;
// Return TransactionStatus
return new TransactionStatus($amount, $paid, $transactionId, $status);
} | php | public function checkPayment($transaction_id)
{
// Check arguments
if (null === $transaction_id || !is_string($transaction_id) || strlen(trim($transaction_id)) == 0) {
throw new \InvalidArgumentException('Transaction ID should be a string.');
}
// Params
$params = array(
'partnerid' => $this->partnerId,
'transaction_id' => $transaction_id,
);
// Do request
$response = $this->request('check-status/', $params);
// Gather data
if ($response->order === null) {
throw new MollieException('Unexpected response');
}
$transactionId = (string) $response->order->transaction_id;
$amount = (int) $response->order->amount;
$paid = ((string) $response->order->paid == 'true');
$status = (string) $response->order->status;
// Return TransactionStatus
return new TransactionStatus($amount, $paid, $transactionId, $status);
} | [
"public",
"function",
"checkPayment",
"(",
"$",
"transaction_id",
")",
"{",
"// Check arguments",
"if",
"(",
"null",
"===",
"$",
"transaction_id",
"||",
"!",
"is_string",
"(",
"$",
"transaction_id",
")",
"||",
"strlen",
"(",
"trim",
"(",
"$",
"transaction_id",
")",
")",
"==",
"0",
")",
"{",
"throw",
"new",
"\\",
"InvalidArgumentException",
"(",
"'Transaction ID should be a string.'",
")",
";",
"}",
"// Params",
"$",
"params",
"=",
"array",
"(",
"'partnerid'",
"=>",
"$",
"this",
"->",
"partnerId",
",",
"'transaction_id'",
"=>",
"$",
"transaction_id",
",",
")",
";",
"// Do request",
"$",
"response",
"=",
"$",
"this",
"->",
"request",
"(",
"'check-status/'",
",",
"$",
"params",
")",
";",
"// Gather data",
"if",
"(",
"$",
"response",
"->",
"order",
"===",
"null",
")",
"{",
"throw",
"new",
"MollieException",
"(",
"'Unexpected response'",
")",
";",
"}",
"$",
"transactionId",
"=",
"(",
"string",
")",
"$",
"response",
"->",
"order",
"->",
"transaction_id",
";",
"$",
"amount",
"=",
"(",
"int",
")",
"$",
"response",
"->",
"order",
"->",
"amount",
";",
"$",
"paid",
"=",
"(",
"(",
"string",
")",
"$",
"response",
"->",
"order",
"->",
"paid",
"==",
"'true'",
")",
";",
"$",
"status",
"=",
"(",
"string",
")",
"$",
"response",
"->",
"order",
"->",
"status",
";",
"// Return TransactionStatus",
"return",
"new",
"TransactionStatus",
"(",
"$",
"amount",
",",
"$",
"paid",
",",
"$",
"transactionId",
",",
"$",
"status",
")",
";",
"}"
] | Check the state of a transaction
@param string $transaction_id Transaction ID
@return \AMNL\Mollie\IDeal\TransactionStatus
@throws \InvalidArgumentException
@throws MollieException | [
"Check",
"the",
"state",
"of",
"a",
"transaction"
] | 6254720a980eae86ac1f4340a54f2a13a3a5b74b | https://github.com/itavero/AMNL-Mollie/blob/6254720a980eae86ac1f4340a54f2a13a3a5b74b/lib/AMNL/Mollie/Paysafecard/PaysafecardGateway.php#L48-L75 |
6,648 | itavero/AMNL-Mollie | lib/AMNL/Mollie/Paysafecard/PaysafecardGateway.php | PaysafecardGateway.preparePayment | public function preparePayment($amount, $report_url, $return_url, $customer_ref, array $options = null)
{
// Check arguments
if (!filter_var($amount, FILTER_VALIDATE_INT) || $amount < 100) {
throw new \InvalidArgumentException('Amount should be in eurocents and at least 100 cents.');
}
if (!filter_var($report_url, FILTER_VALIDATE_URL)) {
throw new \InvalidArgumentException('Report URL should be a valid URL.');
}
if (!filter_var($return_url, FILTER_VALIDATE_URL)) {
throw new \InvalidArgumentException('Return URL should be a valid URL.');
}
if ($report_url == $return_url) {
throw new \InvalidArgumentException('Report URL and Return URL should not be the same.');
}
if (preg_match('/[A-Z\s]/', $customer_ref) > 0) {
throw new \InvalidArgumentException('Customer reference (description) may not contain any capital letters or whitespace.');
}
// Params
$params = array(
'partnerid' => $this->partnerId,
'amount' => $amount,
'customer_ref' => $customer_ref,
'reporturl' => $report_url,
'returnurl' => $return_url,
);
// Profile Key
if ($this->profileKey != null) {
$params['profile_key'] = $this->profileKey;
}
// Do request
$response = $this->request('prepare/', $params);
// Gather data
if ($response->order === null) {
throw new MollieException('Unexpected response');
}
$transactionId = (string) $response->order->transaction_id;
$amount = (int) $response->order->amount;
$destination = (string) $response->order->URL;
// Return ProviderResponse
return new ProviderResponse($transactionId, $amount, $destination);
} | php | public function preparePayment($amount, $report_url, $return_url, $customer_ref, array $options = null)
{
// Check arguments
if (!filter_var($amount, FILTER_VALIDATE_INT) || $amount < 100) {
throw new \InvalidArgumentException('Amount should be in eurocents and at least 100 cents.');
}
if (!filter_var($report_url, FILTER_VALIDATE_URL)) {
throw new \InvalidArgumentException('Report URL should be a valid URL.');
}
if (!filter_var($return_url, FILTER_VALIDATE_URL)) {
throw new \InvalidArgumentException('Return URL should be a valid URL.');
}
if ($report_url == $return_url) {
throw new \InvalidArgumentException('Report URL and Return URL should not be the same.');
}
if (preg_match('/[A-Z\s]/', $customer_ref) > 0) {
throw new \InvalidArgumentException('Customer reference (description) may not contain any capital letters or whitespace.');
}
// Params
$params = array(
'partnerid' => $this->partnerId,
'amount' => $amount,
'customer_ref' => $customer_ref,
'reporturl' => $report_url,
'returnurl' => $return_url,
);
// Profile Key
if ($this->profileKey != null) {
$params['profile_key'] = $this->profileKey;
}
// Do request
$response = $this->request('prepare/', $params);
// Gather data
if ($response->order === null) {
throw new MollieException('Unexpected response');
}
$transactionId = (string) $response->order->transaction_id;
$amount = (int) $response->order->amount;
$destination = (string) $response->order->URL;
// Return ProviderResponse
return new ProviderResponse($transactionId, $amount, $destination);
} | [
"public",
"function",
"preparePayment",
"(",
"$",
"amount",
",",
"$",
"report_url",
",",
"$",
"return_url",
",",
"$",
"customer_ref",
",",
"array",
"$",
"options",
"=",
"null",
")",
"{",
"// Check arguments",
"if",
"(",
"!",
"filter_var",
"(",
"$",
"amount",
",",
"FILTER_VALIDATE_INT",
")",
"||",
"$",
"amount",
"<",
"100",
")",
"{",
"throw",
"new",
"\\",
"InvalidArgumentException",
"(",
"'Amount should be in eurocents and at least 100 cents.'",
")",
";",
"}",
"if",
"(",
"!",
"filter_var",
"(",
"$",
"report_url",
",",
"FILTER_VALIDATE_URL",
")",
")",
"{",
"throw",
"new",
"\\",
"InvalidArgumentException",
"(",
"'Report URL should be a valid URL.'",
")",
";",
"}",
"if",
"(",
"!",
"filter_var",
"(",
"$",
"return_url",
",",
"FILTER_VALIDATE_URL",
")",
")",
"{",
"throw",
"new",
"\\",
"InvalidArgumentException",
"(",
"'Return URL should be a valid URL.'",
")",
";",
"}",
"if",
"(",
"$",
"report_url",
"==",
"$",
"return_url",
")",
"{",
"throw",
"new",
"\\",
"InvalidArgumentException",
"(",
"'Report URL and Return URL should not be the same.'",
")",
";",
"}",
"if",
"(",
"preg_match",
"(",
"'/[A-Z\\s]/'",
",",
"$",
"customer_ref",
")",
">",
"0",
")",
"{",
"throw",
"new",
"\\",
"InvalidArgumentException",
"(",
"'Customer reference (description) may not contain any capital letters or whitespace.'",
")",
";",
"}",
"// Params",
"$",
"params",
"=",
"array",
"(",
"'partnerid'",
"=>",
"$",
"this",
"->",
"partnerId",
",",
"'amount'",
"=>",
"$",
"amount",
",",
"'customer_ref'",
"=>",
"$",
"customer_ref",
",",
"'reporturl'",
"=>",
"$",
"report_url",
",",
"'returnurl'",
"=>",
"$",
"return_url",
",",
")",
";",
"// Profile Key",
"if",
"(",
"$",
"this",
"->",
"profileKey",
"!=",
"null",
")",
"{",
"$",
"params",
"[",
"'profile_key'",
"]",
"=",
"$",
"this",
"->",
"profileKey",
";",
"}",
"// Do request",
"$",
"response",
"=",
"$",
"this",
"->",
"request",
"(",
"'prepare/'",
",",
"$",
"params",
")",
";",
"// Gather data",
"if",
"(",
"$",
"response",
"->",
"order",
"===",
"null",
")",
"{",
"throw",
"new",
"MollieException",
"(",
"'Unexpected response'",
")",
";",
"}",
"$",
"transactionId",
"=",
"(",
"string",
")",
"$",
"response",
"->",
"order",
"->",
"transaction_id",
";",
"$",
"amount",
"=",
"(",
"int",
")",
"$",
"response",
"->",
"order",
"->",
"amount",
";",
"$",
"destination",
"=",
"(",
"string",
")",
"$",
"response",
"->",
"order",
"->",
"URL",
";",
"// Return ProviderResponse",
"return",
"new",
"ProviderResponse",
"(",
"$",
"transactionId",
",",
"$",
"amount",
",",
"$",
"destination",
")",
";",
"}"
] | Request a new payment
@param int $amount Amount in eurocents
@param string $report_url URL to call when the state of the payment changes
@param string $return_url URL to user is send to after the payment process
@param string $customer_ref Unique customer reference
@param array $options NOT USED FOR PAYSAFECARD
@return \AMNL\Mollie\ProviderResponse
@throws \InvalidArgumentException
@throws MollieException | [
"Request",
"a",
"new",
"payment"
] | 6254720a980eae86ac1f4340a54f2a13a3a5b74b | https://github.com/itavero/AMNL-Mollie/blob/6254720a980eae86ac1f4340a54f2a13a3a5b74b/lib/AMNL/Mollie/Paysafecard/PaysafecardGateway.php#L89-L135 |
6,649 | lasallecrm/lasallecrm-l5-lasallecrmapi-pkg | src/Repositories/People_emailRepository.php | People_emailRepository.createNewRecord | public function createNewRecord($data) {
$people_email = new $this->model;
$people_email['people_id'] = $data['people_id'];
$people_email['email_id'] = $data['email_id'];
if ($people_email->save()) {
// Return the new ID
return $people_email->id;
}
return false;
} | php | public function createNewRecord($data) {
$people_email = new $this->model;
$people_email['people_id'] = $data['people_id'];
$people_email['email_id'] = $data['email_id'];
if ($people_email->save()) {
// Return the new ID
return $people_email->id;
}
return false;
} | [
"public",
"function",
"createNewRecord",
"(",
"$",
"data",
")",
"{",
"$",
"people_email",
"=",
"new",
"$",
"this",
"->",
"model",
";",
"$",
"people_email",
"[",
"'people_id'",
"]",
"=",
"$",
"data",
"[",
"'people_id'",
"]",
";",
"$",
"people_email",
"[",
"'email_id'",
"]",
"=",
"$",
"data",
"[",
"'email_id'",
"]",
";",
"if",
"(",
"$",
"people_email",
"->",
"save",
"(",
")",
")",
"{",
"// Return the new ID",
"return",
"$",
"people_email",
"->",
"id",
";",
"}",
"return",
"false",
";",
"}"
] | INSERT INTO 'people_email'
@param array $data The data to be saved, which is already validated, washed, & prepped.
@return mixed The new list_email.id when save is successful, false when save fails | [
"INSERT",
"INTO",
"people_email"
] | 6ef0eb3a9158fd2bc31b0aa570d94eddb96e10cb | https://github.com/lasallecrm/lasallecrm-l5-lasallecrmapi-pkg/blob/6ef0eb3a9158fd2bc31b0aa570d94eddb96e10cb/src/Repositories/People_emailRepository.php#L71-L84 |
6,650 | jannisfink/config | src/cache/ConfigurationCache.php | ConfigurationCache.isCached | public static function isCached($identifier, $accessor) {
return array_key_exists($identifier, self::$cache) && array_key_exists($accessor, self::$cache[$identifier]);
} | php | public static function isCached($identifier, $accessor) {
return array_key_exists($identifier, self::$cache) && array_key_exists($accessor, self::$cache[$identifier]);
} | [
"public",
"static",
"function",
"isCached",
"(",
"$",
"identifier",
",",
"$",
"accessor",
")",
"{",
"return",
"array_key_exists",
"(",
"$",
"identifier",
",",
"self",
"::",
"$",
"cache",
")",
"&&",
"array_key_exists",
"(",
"$",
"accessor",
",",
"self",
"::",
"$",
"cache",
"[",
"$",
"identifier",
"]",
")",
";",
"}"
] | Check, if the cache has stored a value for the given identifier and accessor.
@param $identifier string identifier of the configuration loader
@param $accessor string accessor of the configuration loader
@return bool true, if the cache has an entry for given identifier and accessor | [
"Check",
"if",
"the",
"cache",
"has",
"stored",
"a",
"value",
"for",
"the",
"given",
"identifier",
"and",
"accessor",
"."
] | 54dc18c6125c971c46ded9f9484f6802112aab44 | https://github.com/jannisfink/config/blob/54dc18c6125c971c46ded9f9484f6802112aab44/src/cache/ConfigurationCache.php#L37-L39 |
6,651 | jannisfink/config | src/cache/ConfigurationCache.php | ConfigurationCache.addToCache | public static function addToCache($identifier, $accessor, array $data) {
if (self::isCached($identifier, $accessor)) {
throw new \Exception("Data for identifier '$identifier' and accessor '$accessor' is already present in
this cache");
}
if (!in_array($identifier, self::$cache)) {
self::$cache[$identifier] = [];
}
self::$cache[$identifier][$accessor] = $data;
} | php | public static function addToCache($identifier, $accessor, array $data) {
if (self::isCached($identifier, $accessor)) {
throw new \Exception("Data for identifier '$identifier' and accessor '$accessor' is already present in
this cache");
}
if (!in_array($identifier, self::$cache)) {
self::$cache[$identifier] = [];
}
self::$cache[$identifier][$accessor] = $data;
} | [
"public",
"static",
"function",
"addToCache",
"(",
"$",
"identifier",
",",
"$",
"accessor",
",",
"array",
"$",
"data",
")",
"{",
"if",
"(",
"self",
"::",
"isCached",
"(",
"$",
"identifier",
",",
"$",
"accessor",
")",
")",
"{",
"throw",
"new",
"\\",
"Exception",
"(",
"\"Data for identifier '$identifier' and accessor '$accessor' is already present in\n this cache\"",
")",
";",
"}",
"if",
"(",
"!",
"in_array",
"(",
"$",
"identifier",
",",
"self",
"::",
"$",
"cache",
")",
")",
"{",
"self",
"::",
"$",
"cache",
"[",
"$",
"identifier",
"]",
"=",
"[",
"]",
";",
"}",
"self",
"::",
"$",
"cache",
"[",
"$",
"identifier",
"]",
"[",
"$",
"accessor",
"]",
"=",
"$",
"data",
";",
"}"
] | Add new data to the cache.
@param $identifier string identifier of the configuration loader
@param $accessor string accessor of the configuration loader
@param $data array data for this accessor/identifier pair
@throws \Exception if some data is already stored for the given identifier/accessor pair. | [
"Add",
"new",
"data",
"to",
"the",
"cache",
"."
] | 54dc18c6125c971c46ded9f9484f6802112aab44 | https://github.com/jannisfink/config/blob/54dc18c6125c971c46ded9f9484f6802112aab44/src/cache/ConfigurationCache.php#L50-L61 |
6,652 | jannisfink/config | src/cache/ConfigurationCache.php | ConfigurationCache.getCached | public static function getCached($identifier, $accessor) {
if (!self::isCached($identifier, $accessor)) {
return false;
}
return self::$cache[$identifier][$accessor];
} | php | public static function getCached($identifier, $accessor) {
if (!self::isCached($identifier, $accessor)) {
return false;
}
return self::$cache[$identifier][$accessor];
} | [
"public",
"static",
"function",
"getCached",
"(",
"$",
"identifier",
",",
"$",
"accessor",
")",
"{",
"if",
"(",
"!",
"self",
"::",
"isCached",
"(",
"$",
"identifier",
",",
"$",
"accessor",
")",
")",
"{",
"return",
"false",
";",
"}",
"return",
"self",
"::",
"$",
"cache",
"[",
"$",
"identifier",
"]",
"[",
"$",
"accessor",
"]",
";",
"}"
] | Access a given data set of this cache.
@param $identifier string identifier of the configuration loader
@param $accessor string accessor of the configuration loader
@return array|bool the cached data, false, if no such data exists | [
"Access",
"a",
"given",
"data",
"set",
"of",
"this",
"cache",
"."
] | 54dc18c6125c971c46ded9f9484f6802112aab44 | https://github.com/jannisfink/config/blob/54dc18c6125c971c46ded9f9484f6802112aab44/src/cache/ConfigurationCache.php#L70-L76 |
6,653 | prototypemvc/prototypemvc | Core/Validate.php | validate.isDate | public static function isDate($input = false, $format = 'Y-m-d H:i:s') {
if ($input && Date::isDate($input)) {
return true;
}
return false;
} | php | public static function isDate($input = false, $format = 'Y-m-d H:i:s') {
if ($input && Date::isDate($input)) {
return true;
}
return false;
} | [
"public",
"static",
"function",
"isDate",
"(",
"$",
"input",
"=",
"false",
",",
"$",
"format",
"=",
"'Y-m-d H:i:s'",
")",
"{",
"if",
"(",
"$",
"input",
"&&",
"Date",
"::",
"isDate",
"(",
"$",
"input",
")",
")",
"{",
"return",
"true",
";",
"}",
"return",
"false",
";",
"}"
] | Check if input is a valid date.
@param string input
@param string format
@return boolean | [
"Check",
"if",
"input",
"is",
"a",
"valid",
"date",
"."
] | 039e238857d4b627e40ba681a376583b0821cd36 | https://github.com/prototypemvc/prototypemvc/blob/039e238857d4b627e40ba681a376583b0821cd36/Core/Validate.php#L57-L65 |
6,654 | prototypemvc/prototypemvc | Core/Validate.php | validate.isMac | public static function isMac($input = false) {
if ($input && !filter_var($input, FILTER_VALIDATE_MAC) === false) {
return true;
}
return false;
} | php | public static function isMac($input = false) {
if ($input && !filter_var($input, FILTER_VALIDATE_MAC) === false) {
return true;
}
return false;
} | [
"public",
"static",
"function",
"isMac",
"(",
"$",
"input",
"=",
"false",
")",
"{",
"if",
"(",
"$",
"input",
"&&",
"!",
"filter_var",
"(",
"$",
"input",
",",
"FILTER_VALIDATE_MAC",
")",
"===",
"false",
")",
"{",
"return",
"true",
";",
"}",
"return",
"false",
";",
"}"
] | Check if given input is a valid MAC address.
@param string input
@return boolean | [
"Check",
"if",
"given",
"input",
"is",
"a",
"valid",
"MAC",
"address",
"."
] | 039e238857d4b627e40ba681a376583b0821cd36 | https://github.com/prototypemvc/prototypemvc/blob/039e238857d4b627e40ba681a376583b0821cd36/Core/Validate.php#L72-L80 |
6,655 | prototypemvc/prototypemvc | Core/Validate.php | validate.isEmail | public static function isEmail($input = false) {
if ($input && !filter_var($input, FILTER_VALIDATE_EMAIL) === false) {
return true;
}
return false;
} | php | public static function isEmail($input = false) {
if ($input && !filter_var($input, FILTER_VALIDATE_EMAIL) === false) {
return true;
}
return false;
} | [
"public",
"static",
"function",
"isEmail",
"(",
"$",
"input",
"=",
"false",
")",
"{",
"if",
"(",
"$",
"input",
"&&",
"!",
"filter_var",
"(",
"$",
"input",
",",
"FILTER_VALIDATE_EMAIL",
")",
"===",
"false",
")",
"{",
"return",
"true",
";",
"}",
"return",
"false",
";",
"}"
] | Check if given input is a valid e-mail address.
@param string input
@return boolean | [
"Check",
"if",
"given",
"input",
"is",
"a",
"valid",
"e",
"-",
"mail",
"address",
"."
] | 039e238857d4b627e40ba681a376583b0821cd36 | https://github.com/prototypemvc/prototypemvc/blob/039e238857d4b627e40ba681a376583b0821cd36/Core/Validate.php#L87-L95 |
6,656 | prototypemvc/prototypemvc | Core/Validate.php | validate.isIp | public static function isIp($input = false) {
if ($input && !filter_var($input, FILTER_VALIDATE_IP) === false) {
return true;
}
return false;
} | php | public static function isIp($input = false) {
if ($input && !filter_var($input, FILTER_VALIDATE_IP) === false) {
return true;
}
return false;
} | [
"public",
"static",
"function",
"isIp",
"(",
"$",
"input",
"=",
"false",
")",
"{",
"if",
"(",
"$",
"input",
"&&",
"!",
"filter_var",
"(",
"$",
"input",
",",
"FILTER_VALIDATE_IP",
")",
"===",
"false",
")",
"{",
"return",
"true",
";",
"}",
"return",
"false",
";",
"}"
] | Check if given input is a valid IP address.
@param mixed input
@return boolean | [
"Check",
"if",
"given",
"input",
"is",
"a",
"valid",
"IP",
"address",
"."
] | 039e238857d4b627e40ba681a376583b0821cd36 | https://github.com/prototypemvc/prototypemvc/blob/039e238857d4b627e40ba681a376583b0821cd36/Core/Validate.php#L142-L150 |
6,657 | prototypemvc/prototypemvc | Core/Validate.php | validate.isLength | public static function isLength($string = false, $minLength = 0, $maxLength = false) {
if ($string && strlen($string) >= $minLength) {
if (!$maxLength || strlen($string) <= $maxLength) {
return true;
}
}
return false;
} | php | public static function isLength($string = false, $minLength = 0, $maxLength = false) {
if ($string && strlen($string) >= $minLength) {
if (!$maxLength || strlen($string) <= $maxLength) {
return true;
}
}
return false;
} | [
"public",
"static",
"function",
"isLength",
"(",
"$",
"string",
"=",
"false",
",",
"$",
"minLength",
"=",
"0",
",",
"$",
"maxLength",
"=",
"false",
")",
"{",
"if",
"(",
"$",
"string",
"&&",
"strlen",
"(",
"$",
"string",
")",
">=",
"$",
"minLength",
")",
"{",
"if",
"(",
"!",
"$",
"maxLength",
"||",
"strlen",
"(",
"$",
"string",
")",
"<=",
"$",
"maxLength",
")",
"{",
"return",
"true",
";",
"}",
"}",
"return",
"false",
";",
"}"
] | Check the length of a string.
@param string input
@param int min value
@param int max value
@example isLength('hello world', 2) - returns true, 9 is longer then 2
@example isLength('hello world', 2, 5) - returns false, 9 is longer then 5
@return boolean | [
"Check",
"the",
"length",
"of",
"a",
"string",
"."
] | 039e238857d4b627e40ba681a376583b0821cd36 | https://github.com/prototypemvc/prototypemvc/blob/039e238857d4b627e40ba681a376583b0821cd36/Core/Validate.php#L176-L187 |
6,658 | prototypemvc/prototypemvc | Core/Validate.php | validate.isType | public static function isType($input = false, $type = false) {
if ($input && $type && Data::type($input) == $type) {
return true;
}
return false;
} | php | public static function isType($input = false, $type = false) {
if ($input && $type && Data::type($input) == $type) {
return true;
}
return false;
} | [
"public",
"static",
"function",
"isType",
"(",
"$",
"input",
"=",
"false",
",",
"$",
"type",
"=",
"false",
")",
"{",
"if",
"(",
"$",
"input",
"&&",
"$",
"type",
"&&",
"Data",
"::",
"type",
"(",
"$",
"input",
")",
"==",
"$",
"type",
")",
"{",
"return",
"true",
";",
"}",
"return",
"false",
";",
"}"
] | Check if given input is of given type.
@param mixed input
@param string type
@example isType('some text', 'string') - will return true
@example isType('some text', 'object') - will return false
@return boolean | [
"Check",
"if",
"given",
"input",
"is",
"of",
"given",
"type",
"."
] | 039e238857d4b627e40ba681a376583b0821cd36 | https://github.com/prototypemvc/prototypemvc/blob/039e238857d4b627e40ba681a376583b0821cd36/Core/Validate.php#L252-L260 |
6,659 | prototypemvc/prototypemvc | Core/Validate.php | validate.isUrl | public static function isUrl($input = false) {
if ($input && !filter_var($input, FILTER_VALIDATE_URL) === false) {
return true;
}
return false;
} | php | public static function isUrl($input = false) {
if ($input && !filter_var($input, FILTER_VALIDATE_URL) === false) {
return true;
}
return false;
} | [
"public",
"static",
"function",
"isUrl",
"(",
"$",
"input",
"=",
"false",
")",
"{",
"if",
"(",
"$",
"input",
"&&",
"!",
"filter_var",
"(",
"$",
"input",
",",
"FILTER_VALIDATE_URL",
")",
"===",
"false",
")",
"{",
"return",
"true",
";",
"}",
"return",
"false",
";",
"}"
] | Check if given input is a valid URL.
@param mixed input
@return boolean | [
"Check",
"if",
"given",
"input",
"is",
"a",
"valid",
"URL",
"."
] | 039e238857d4b627e40ba681a376583b0821cd36 | https://github.com/prototypemvc/prototypemvc/blob/039e238857d4b627e40ba681a376583b0821cd36/Core/Validate.php#L267-L275 |
6,660 | prototypemvc/prototypemvc | Core/Validate.php | validate.isZip | public static function isZip($input = false) {
if($input) {
if(File::isFile($input) && File::extension($input) === 'zip') {
return true;
}
}
return false;
} | php | public static function isZip($input = false) {
if($input) {
if(File::isFile($input) && File::extension($input) === 'zip') {
return true;
}
}
return false;
} | [
"public",
"static",
"function",
"isZip",
"(",
"$",
"input",
"=",
"false",
")",
"{",
"if",
"(",
"$",
"input",
")",
"{",
"if",
"(",
"File",
"::",
"isFile",
"(",
"$",
"input",
")",
"&&",
"File",
"::",
"extension",
"(",
"$",
"input",
")",
"===",
"'zip'",
")",
"{",
"return",
"true",
";",
"}",
"}",
"return",
"false",
";",
"}"
] | Check if given input is a ZIP file.
@param string path to file
@return boolean | [
"Check",
"if",
"given",
"input",
"is",
"a",
"ZIP",
"file",
"."
] | 039e238857d4b627e40ba681a376583b0821cd36 | https://github.com/prototypemvc/prototypemvc/blob/039e238857d4b627e40ba681a376583b0821cd36/Core/Validate.php#L282-L293 |
6,661 | wazoomie/support | Location.php | Location.add | public function add($latitude, $longitude)
{
$this->latitude += $latitude;
$this->longitude += $longitude;
return $this;
} | php | public function add($latitude, $longitude)
{
$this->latitude += $latitude;
$this->longitude += $longitude;
return $this;
} | [
"public",
"function",
"add",
"(",
"$",
"latitude",
",",
"$",
"longitude",
")",
"{",
"$",
"this",
"->",
"latitude",
"+=",
"$",
"latitude",
";",
"$",
"this",
"->",
"longitude",
"+=",
"$",
"longitude",
";",
"return",
"$",
"this",
";",
"}"
] | Increase the latitude and longitude of the Location.
@param $latitude
@param $longitude
@return $this | [
"Increase",
"the",
"latitude",
"and",
"longitude",
"of",
"the",
"Location",
"."
] | e0a853558a2dc5acd3dc20ee8071e2ebda283bb7 | https://github.com/wazoomie/support/blob/e0a853558a2dc5acd3dc20ee8071e2ebda283bb7/Location.php#L111-L116 |
6,662 | wazoomie/support | Location.php | Location.subtract | public function subtract($latitude, $longitude)
{
$this->latitude -= $latitude;
$this->longitude -= $longitude;
return $this;
} | php | public function subtract($latitude, $longitude)
{
$this->latitude -= $latitude;
$this->longitude -= $longitude;
return $this;
} | [
"public",
"function",
"subtract",
"(",
"$",
"latitude",
",",
"$",
"longitude",
")",
"{",
"$",
"this",
"->",
"latitude",
"-=",
"$",
"latitude",
";",
"$",
"this",
"->",
"longitude",
"-=",
"$",
"longitude",
";",
"return",
"$",
"this",
";",
"}"
] | Decrease the latitude and longitude of the Location.
@param $latitude
@param $longitude
@return $this | [
"Decrease",
"the",
"latitude",
"and",
"longitude",
"of",
"the",
"Location",
"."
] | e0a853558a2dc5acd3dc20ee8071e2ebda283bb7 | https://github.com/wazoomie/support/blob/e0a853558a2dc5acd3dc20ee8071e2ebda283bb7/Location.php#L126-L131 |
6,663 | wazoomie/support | Location.php | Location.distance | public function distance(Location $otherLocation)
{
$theta = $this->longitude - $otherLocation->getLongitude();
$distance = (sin(deg2rad($this->latitude))
* sin(deg2rad($otherLocation->getLatitude())))
+ (cos(deg2rad($this->latitude))
* cos(deg2rad($otherLocation->getLatitude()))
* cos(deg2rad($theta)));
$distance = acos($distance);
$distance = rad2deg($distance);
return (float) $distance * 60 * 1.1515;
} | php | public function distance(Location $otherLocation)
{
$theta = $this->longitude - $otherLocation->getLongitude();
$distance = (sin(deg2rad($this->latitude))
* sin(deg2rad($otherLocation->getLatitude())))
+ (cos(deg2rad($this->latitude))
* cos(deg2rad($otherLocation->getLatitude()))
* cos(deg2rad($theta)));
$distance = acos($distance);
$distance = rad2deg($distance);
return (float) $distance * 60 * 1.1515;
} | [
"public",
"function",
"distance",
"(",
"Location",
"$",
"otherLocation",
")",
"{",
"$",
"theta",
"=",
"$",
"this",
"->",
"longitude",
"-",
"$",
"otherLocation",
"->",
"getLongitude",
"(",
")",
";",
"$",
"distance",
"=",
"(",
"sin",
"(",
"deg2rad",
"(",
"$",
"this",
"->",
"latitude",
")",
")",
"*",
"sin",
"(",
"deg2rad",
"(",
"$",
"otherLocation",
"->",
"getLatitude",
"(",
")",
")",
")",
")",
"+",
"(",
"cos",
"(",
"deg2rad",
"(",
"$",
"this",
"->",
"latitude",
")",
")",
"*",
"cos",
"(",
"deg2rad",
"(",
"$",
"otherLocation",
"->",
"getLatitude",
"(",
")",
")",
")",
"*",
"cos",
"(",
"deg2rad",
"(",
"$",
"theta",
")",
")",
")",
";",
"$",
"distance",
"=",
"acos",
"(",
"$",
"distance",
")",
";",
"$",
"distance",
"=",
"rad2deg",
"(",
"$",
"distance",
")",
";",
"return",
"(",
"float",
")",
"$",
"distance",
"*",
"60",
"*",
"1.1515",
";",
"}"
] | Get the distance between the Location and a given Location.
@param Location $otherLocation
@return float | [
"Get",
"the",
"distance",
"between",
"the",
"Location",
"and",
"a",
"given",
"Location",
"."
] | e0a853558a2dc5acd3dc20ee8071e2ebda283bb7 | https://github.com/wazoomie/support/blob/e0a853558a2dc5acd3dc20ee8071e2ebda283bb7/Location.php#L140-L152 |
6,664 | agalbourdin/agl-core | src/Agl.php | Agl.run | public static function run($pCache = false, $pDebug = false, $pConfigPath = NULL)
{
if (self::$_instance === NULL) {
self::$_instance = new self($pCache, $pDebug, $pConfigPath);
} else {
throw new Exception("The application has already been initialized - use app() to get access to it");
}
} | php | public static function run($pCache = false, $pDebug = false, $pConfigPath = NULL)
{
if (self::$_instance === NULL) {
self::$_instance = new self($pCache, $pDebug, $pConfigPath);
} else {
throw new Exception("The application has already been initialized - use app() to get access to it");
}
} | [
"public",
"static",
"function",
"run",
"(",
"$",
"pCache",
"=",
"false",
",",
"$",
"pDebug",
"=",
"false",
",",
"$",
"pConfigPath",
"=",
"NULL",
")",
"{",
"if",
"(",
"self",
"::",
"$",
"_instance",
"===",
"NULL",
")",
"{",
"self",
"::",
"$",
"_instance",
"=",
"new",
"self",
"(",
"$",
"pCache",
",",
"$",
"pDebug",
",",
"$",
"pConfigPath",
")",
";",
"}",
"else",
"{",
"throw",
"new",
"Exception",
"(",
"\"The application has already been initialized - use app() to get access to it\"",
")",
";",
"}",
"}"
] | Create an instance of Agl and initialize it.
@param bool $pCache
@param bool $pDebug
@param null|string $pConfigPath Optional custom configuration path | [
"Create",
"an",
"instance",
"of",
"Agl",
"and",
"initialize",
"it",
"."
] | 1db556f9a49488aa9fab6887fefb7141a79ad97d | https://github.com/agalbourdin/agl-core/blob/1db556f9a49488aa9fab6887fefb7141a79ad97d/src/Agl.php#L97-L104 |
6,665 | agalbourdin/agl-core | src/Agl.php | Agl.loadModuleLib | public static function loadModuleLib($pPath, $pLib)
{
$file = $pPath
. DS
. self::AGL_LIB_DIR
. DS
. $pLib;
require_once($file);
return true;
} | php | public static function loadModuleLib($pPath, $pLib)
{
$file = $pPath
. DS
. self::AGL_LIB_DIR
. DS
. $pLib;
require_once($file);
return true;
} | [
"public",
"static",
"function",
"loadModuleLib",
"(",
"$",
"pPath",
",",
"$",
"pLib",
")",
"{",
"$",
"file",
"=",
"$",
"pPath",
".",
"DS",
".",
"self",
"::",
"AGL_LIB_DIR",
".",
"DS",
".",
"$",
"pLib",
";",
"require_once",
"(",
"$",
"file",
")",
";",
"return",
"true",
";",
"}"
] | Load a library linked to a More module.
@param $pPath Absolute path to the module directory
@param string $pLib The library filename, relative to the module path
@return bool | [
"Load",
"a",
"library",
"linked",
"to",
"a",
"More",
"module",
"."
] | 1db556f9a49488aa9fab6887fefb7141a79ad97d | https://github.com/agalbourdin/agl-core/blob/1db556f9a49488aa9fab6887fefb7141a79ad97d/src/Agl.php#L268-L279 |
6,666 | agalbourdin/agl-core | src/Agl.php | Agl.getConfig | public function getConfig($pPath, $pForceGlobalArray = false)
{
if ($this->_config === NULL) {
$this->_config = new Config();
}
return $this->_config->getConfig($pPath, $pForceGlobalArray);
} | php | public function getConfig($pPath, $pForceGlobalArray = false)
{
if ($this->_config === NULL) {
$this->_config = new Config();
}
return $this->_config->getConfig($pPath, $pForceGlobalArray);
} | [
"public",
"function",
"getConfig",
"(",
"$",
"pPath",
",",
"$",
"pForceGlobalArray",
"=",
"false",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"_config",
"===",
"NULL",
")",
"{",
"$",
"this",
"->",
"_config",
"=",
"new",
"Config",
"(",
")",
";",
"}",
"return",
"$",
"this",
"->",
"_config",
"->",
"getConfig",
"(",
"$",
"pPath",
",",
"$",
"pForceGlobalArray",
")",
";",
"}"
] | Retrieve a value in the Agl XML configuration file.
@param string $pPath The configuration path to retrieve
@param array $pForceGlobalArray Return the results in a multidimensional
array
@return mixed The configuration value corresponding to the path | [
"Retrieve",
"a",
"value",
"in",
"the",
"Agl",
"XML",
"configuration",
"file",
"."
] | 1db556f9a49488aa9fab6887fefb7141a79ad97d | https://github.com/agalbourdin/agl-core/blob/1db556f9a49488aa9fab6887fefb7141a79ad97d/src/Agl.php#L409-L416 |
6,667 | Nobiles2/pcc-3-deklaracja | PCC3/ZalacznikORDZU.php | ZalacznikORDZU.setPozycjeSzczegolowe | public function setPozycjeSzczegolowe(\KCH\PCC3\ZalacznikORDZU\PozycjeSzczegoloweAnonymousType $pozycjeSzczegolowe)
{
$this->pozycjeSzczegolowe = $pozycjeSzczegolowe;
return $this;
} | php | public function setPozycjeSzczegolowe(\KCH\PCC3\ZalacznikORDZU\PozycjeSzczegoloweAnonymousType $pozycjeSzczegolowe)
{
$this->pozycjeSzczegolowe = $pozycjeSzczegolowe;
return $this;
} | [
"public",
"function",
"setPozycjeSzczegolowe",
"(",
"\\",
"KCH",
"\\",
"PCC3",
"\\",
"ZalacznikORDZU",
"\\",
"PozycjeSzczegoloweAnonymousType",
"$",
"pozycjeSzczegolowe",
")",
"{",
"$",
"this",
"->",
"pozycjeSzczegolowe",
"=",
"$",
"pozycjeSzczegolowe",
";",
"return",
"$",
"this",
";",
"}"
] | Sets a new pozycjeSzczegolowe
@param \KCH\PCC3\ZalacznikORDZU\PozycjeSzczegoloweAnonymousType
$pozycjeSzczegolowe
@return self | [
"Sets",
"a",
"new",
"pozycjeSzczegolowe"
] | 8c36b2bc70f7ab0ebc8a0d68a0326f4c20e35106 | https://github.com/Nobiles2/pcc-3-deklaracja/blob/8c36b2bc70f7ab0ebc8a0d68a0326f4c20e35106/PCC3/ZalacznikORDZU.php#L61-L65 |
6,668 | aedart/model | src/Traits/Strings/MediaTypeTrait.php | MediaTypeTrait.getMediaType | public function getMediaType() : ?string
{
if ( ! $this->hasMediaType()) {
$this->setMediaType($this->getDefaultMediaType());
}
return $this->mediaType;
} | php | public function getMediaType() : ?string
{
if ( ! $this->hasMediaType()) {
$this->setMediaType($this->getDefaultMediaType());
}
return $this->mediaType;
} | [
"public",
"function",
"getMediaType",
"(",
")",
":",
"?",
"string",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"hasMediaType",
"(",
")",
")",
"{",
"$",
"this",
"->",
"setMediaType",
"(",
"$",
"this",
"->",
"getDefaultMediaType",
"(",
")",
")",
";",
"}",
"return",
"$",
"this",
"->",
"mediaType",
";",
"}"
] | Get media type
If no "media type" value has been set, this method will
set and return a default "media type" value,
if any such value is available
@see getDefaultMediaType()
@return string|null media type or null if no media type has been set | [
"Get",
"media",
"type"
] | 9a562c1c53a276d01ace0ab71f5305458bea542f | https://github.com/aedart/model/blob/9a562c1c53a276d01ace0ab71f5305458bea542f/src/Traits/Strings/MediaTypeTrait.php#L48-L54 |
6,669 | easy-system/es-controller-plugins | src/Plugin/Json.php | Json.encode | public function encode($data, $options = 0, $depth = 512)
{
$server = $this->getServer();
$response = $server->getResponse(false);
$json = json_encode($data, $options, $depth);
if (false === $json) {
throw new RuntimeException(
json_last_error_msg(),
json_last_error()
);
}
$response->getBody()->write($json);
$result = $response->withHeader(
'Content-Type',
'application/json;charset=utf-8'
);
return $result;
} | php | public function encode($data, $options = 0, $depth = 512)
{
$server = $this->getServer();
$response = $server->getResponse(false);
$json = json_encode($data, $options, $depth);
if (false === $json) {
throw new RuntimeException(
json_last_error_msg(),
json_last_error()
);
}
$response->getBody()->write($json);
$result = $response->withHeader(
'Content-Type',
'application/json;charset=utf-8'
);
return $result;
} | [
"public",
"function",
"encode",
"(",
"$",
"data",
",",
"$",
"options",
"=",
"0",
",",
"$",
"depth",
"=",
"512",
")",
"{",
"$",
"server",
"=",
"$",
"this",
"->",
"getServer",
"(",
")",
";",
"$",
"response",
"=",
"$",
"server",
"->",
"getResponse",
"(",
"false",
")",
";",
"$",
"json",
"=",
"json_encode",
"(",
"$",
"data",
",",
"$",
"options",
",",
"$",
"depth",
")",
";",
"if",
"(",
"false",
"===",
"$",
"json",
")",
"{",
"throw",
"new",
"RuntimeException",
"(",
"json_last_error_msg",
"(",
")",
",",
"json_last_error",
"(",
")",
")",
";",
"}",
"$",
"response",
"->",
"getBody",
"(",
")",
"->",
"write",
"(",
"$",
"json",
")",
";",
"$",
"result",
"=",
"$",
"response",
"->",
"withHeader",
"(",
"'Content-Type'",
",",
"'application/json;charset=utf-8'",
")",
";",
"return",
"$",
"result",
";",
"}"
] | Encodes data and returns the response.
@param mixed $data The data to encode
@param int $options The bitmask of options
@param int $depth The maximum depth
@throws \RuntimeException If encoding fails
@return \Psr\Http\Message\ResponseInterface The response | [
"Encodes",
"data",
"and",
"returns",
"the",
"response",
"."
] | b1f58b0e62bb24d936aac15d34002826af7ee9b6 | https://github.com/easy-system/es-controller-plugins/blob/b1f58b0e62bb24d936aac15d34002826af7ee9b6/src/Plugin/Json.php#L33-L51 |
6,670 | easy-system/es-controller-plugins | src/Plugin/Json.php | Json.decode | public function decode($json, $assoc = false, $depth = 512, $options = 0)
{
$result = json_decode((string) $json, (bool) $assoc, (int) $depth, (int) $options);
if (null === $result && JSON_ERROR_NONE !== json_last_error()) {
throw new RuntimeException(
json_last_error_msg(),
json_last_error()
);
}
return $result;
} | php | public function decode($json, $assoc = false, $depth = 512, $options = 0)
{
$result = json_decode((string) $json, (bool) $assoc, (int) $depth, (int) $options);
if (null === $result && JSON_ERROR_NONE !== json_last_error()) {
throw new RuntimeException(
json_last_error_msg(),
json_last_error()
);
}
return $result;
} | [
"public",
"function",
"decode",
"(",
"$",
"json",
",",
"$",
"assoc",
"=",
"false",
",",
"$",
"depth",
"=",
"512",
",",
"$",
"options",
"=",
"0",
")",
"{",
"$",
"result",
"=",
"json_decode",
"(",
"(",
"string",
")",
"$",
"json",
",",
"(",
"bool",
")",
"$",
"assoc",
",",
"(",
"int",
")",
"$",
"depth",
",",
"(",
"int",
")",
"$",
"options",
")",
";",
"if",
"(",
"null",
"===",
"$",
"result",
"&&",
"JSON_ERROR_NONE",
"!==",
"json_last_error",
"(",
")",
")",
"{",
"throw",
"new",
"RuntimeException",
"(",
"json_last_error_msg",
"(",
")",
",",
"json_last_error",
"(",
")",
")",
";",
"}",
"return",
"$",
"result",
";",
"}"
] | Decodes json.
@param string $json The json string being decoded
@param bool $assoc When true, returned objects will be converted into
associative arrays
@param int $depth User specified recursion depth
@param int $options Bitmask of JSON decode options
@throws \RuntimeException If decoding fails
@return mixed Returns the value encoded in json in appropriate PHP type | [
"Decodes",
"json",
"."
] | b1f58b0e62bb24d936aac15d34002826af7ee9b6 | https://github.com/easy-system/es-controller-plugins/blob/b1f58b0e62bb24d936aac15d34002826af7ee9b6/src/Plugin/Json.php#L66-L77 |
6,671 | agencms/core | src/Field.php | Field.string | public static function string(string $key = null, string $name = null)
{
$instance = self::init('string', $key, $name);
$instance->minLength(0);
$instance->maxLength(0);
return $instance;
} | php | public static function string(string $key = null, string $name = null)
{
$instance = self::init('string', $key, $name);
$instance->minLength(0);
$instance->maxLength(0);
return $instance;
} | [
"public",
"static",
"function",
"string",
"(",
"string",
"$",
"key",
"=",
"null",
",",
"string",
"$",
"name",
"=",
"null",
")",
"{",
"$",
"instance",
"=",
"self",
"::",
"init",
"(",
"'string'",
",",
"$",
"key",
",",
"$",
"name",
")",
";",
"$",
"instance",
"->",
"minLength",
"(",
"0",
")",
";",
"$",
"instance",
"->",
"maxLength",
"(",
"0",
")",
";",
"return",
"$",
"instance",
";",
"}"
] | Helper methods to initialise a new field of specific types.
These should be used to initialise a new field.
@param string $key
@param string $name
@return Agencms\Core\Field | [
"Helper",
"methods",
"to",
"initialise",
"a",
"new",
"field",
"of",
"specific",
"types",
".",
"These",
"should",
"be",
"used",
"to",
"initialise",
"a",
"new",
"field",
"."
] | 67a20e1889fb4f8548a38b66ff0abf72194bb49e | https://github.com/agencms/core/blob/67a20e1889fb4f8548a38b66ff0abf72194bb49e/src/Field.php#L70-L78 |
6,672 | agencms/core | src/Field.php | Field.key | public function key(string $key = null)
{
if ($key) {
$this->field['key'] = $key;
return $this;
}
return $this->field['key'];
} | php | public function key(string $key = null)
{
if ($key) {
$this->field['key'] = $key;
return $this;
}
return $this->field['key'];
} | [
"public",
"function",
"key",
"(",
"string",
"$",
"key",
"=",
"null",
")",
"{",
"if",
"(",
"$",
"key",
")",
"{",
"$",
"this",
"->",
"field",
"[",
"'key'",
"]",
"=",
"$",
"key",
";",
"return",
"$",
"this",
";",
"}",
"return",
"$",
"this",
"->",
"field",
"[",
"'key'",
"]",
";",
"}"
] | Set or get the key of a field. Returns chainable instance if a key is
supplied, otherwise returns a string of the key.
@param string $key
@return Agencms\Core\Field or string | [
"Set",
"or",
"get",
"the",
"key",
"of",
"a",
"field",
".",
"Returns",
"chainable",
"instance",
"if",
"a",
"key",
"is",
"supplied",
"otherwise",
"returns",
"a",
"string",
"of",
"the",
"key",
"."
] | 67a20e1889fb4f8548a38b66ff0abf72194bb49e | https://github.com/agencms/core/blob/67a20e1889fb4f8548a38b66ff0abf72194bb49e/src/Field.php#L252-L261 |
6,673 | agencms/core | src/Field.php | Field.addOption | public function addOption(Option ...$choices)
{
collect($choices)->map(function ($choice) {
$this->field['choices']->push($choice->get());
});
return $this;
} | php | public function addOption(Option ...$choices)
{
collect($choices)->map(function ($choice) {
$this->field['choices']->push($choice->get());
});
return $this;
} | [
"public",
"function",
"addOption",
"(",
"Option",
"...",
"$",
"choices",
")",
"{",
"collect",
"(",
"$",
"choices",
")",
"->",
"map",
"(",
"function",
"(",
"$",
"choice",
")",
"{",
"$",
"this",
"->",
"field",
"[",
"'choices'",
"]",
"->",
"push",
"(",
"$",
"choice",
"->",
"get",
"(",
")",
")",
";",
"}",
")",
";",
"return",
"$",
"this",
";",
"}"
] | Set the available choices for a select field as an array of key value pairs
@param Option $choices
@return Agencms\Core\Field | [
"Set",
"the",
"available",
"choices",
"for",
"a",
"select",
"field",
"as",
"an",
"array",
"of",
"key",
"value",
"pairs"
] | 67a20e1889fb4f8548a38b66ff0abf72194bb49e | https://github.com/agencms/core/blob/67a20e1889fb4f8548a38b66ff0abf72194bb49e/src/Field.php#L335-L342 |
6,674 | agencms/core | src/Field.php | Field.addOptions | public function addOptions(array $choices)
{
collect($choices)->map(function ($choice) {
$this->field['choices']->push($choice);
});
return $this;
} | php | public function addOptions(array $choices)
{
collect($choices)->map(function ($choice) {
$this->field['choices']->push($choice);
});
return $this;
} | [
"public",
"function",
"addOptions",
"(",
"array",
"$",
"choices",
")",
"{",
"collect",
"(",
"$",
"choices",
")",
"->",
"map",
"(",
"function",
"(",
"$",
"choice",
")",
"{",
"$",
"this",
"->",
"field",
"[",
"'choices'",
"]",
"->",
"push",
"(",
"$",
"choice",
")",
";",
"}",
")",
";",
"return",
"$",
"this",
";",
"}"
] | Set the available choices for a select field as an array of key value pairs
taken directly from a supplied array
@param array $choices
@return Agencms\Core\Field | [
"Set",
"the",
"available",
"choices",
"for",
"a",
"select",
"field",
"as",
"an",
"array",
"of",
"key",
"value",
"pairs",
"taken",
"directly",
"from",
"a",
"supplied",
"array"
] | 67a20e1889fb4f8548a38b66ff0abf72194bb49e | https://github.com/agencms/core/blob/67a20e1889fb4f8548a38b66ff0abf72194bb49e/src/Field.php#L351-L358 |
6,675 | agencms/core | src/Field.php | Field.ratio | public function ratio(int $width, int $height, bool $resize = false)
{
$this->field['ratio'] = "{$width}:{$height}";
if ($resize) {
$this->field['imagesize'] = "{$width},{$height}";
}
return $this;
} | php | public function ratio(int $width, int $height, bool $resize = false)
{
$this->field['ratio'] = "{$width}:{$height}";
if ($resize) {
$this->field['imagesize'] = "{$width},{$height}";
}
return $this;
} | [
"public",
"function",
"ratio",
"(",
"int",
"$",
"width",
",",
"int",
"$",
"height",
",",
"bool",
"$",
"resize",
"=",
"false",
")",
"{",
"$",
"this",
"->",
"field",
"[",
"'ratio'",
"]",
"=",
"\"{$width}:{$height}\"",
";",
"if",
"(",
"$",
"resize",
")",
"{",
"$",
"this",
"->",
"field",
"[",
"'imagesize'",
"]",
"=",
"\"{$width},{$height}\"",
";",
"}",
"return",
"$",
"this",
";",
"}"
] | Set the desired image ratio to be requested from the CMS. The UI will
automatically resize any uploaded image to match this ratio.
@param int $width
@param int $height
@param bool $resize
@return Agencms\Core\Field | [
"Set",
"the",
"desired",
"image",
"ratio",
"to",
"be",
"requested",
"from",
"the",
"CMS",
".",
"The",
"UI",
"will",
"automatically",
"resize",
"any",
"uploaded",
"image",
"to",
"match",
"this",
"ratio",
"."
] | 67a20e1889fb4f8548a38b66ff0abf72194bb49e | https://github.com/agencms/core/blob/67a20e1889fb4f8548a38b66ff0abf72194bb49e/src/Field.php#L448-L457 |
6,676 | Hexmedia/Administrator-Bundle | DependencyInjection/HexmediaAdministratorExtension.php | HexmediaAdministratorExtension.loadConfiguration | protected function loadConfiguration(array $configs, ContainerBuilder $container)
{
$configuration = new Configuration();
$config = $this->processConfiguration($configuration, $configs);
$container->setParameter("hexmedia.seo.options", $config['seo']);
if (!isset($config['ga']['domain'])) {
$config['ga']['domain'] = $container->getParameter("domain");
}
$container->setParameter("hexmedia.ga.options", $config['ga']);
} | php | protected function loadConfiguration(array $configs, ContainerBuilder $container)
{
$configuration = new Configuration();
$config = $this->processConfiguration($configuration, $configs);
$container->setParameter("hexmedia.seo.options", $config['seo']);
if (!isset($config['ga']['domain'])) {
$config['ga']['domain'] = $container->getParameter("domain");
}
$container->setParameter("hexmedia.ga.options", $config['ga']);
} | [
"protected",
"function",
"loadConfiguration",
"(",
"array",
"$",
"configs",
",",
"ContainerBuilder",
"$",
"container",
")",
"{",
"$",
"configuration",
"=",
"new",
"Configuration",
"(",
")",
";",
"$",
"config",
"=",
"$",
"this",
"->",
"processConfiguration",
"(",
"$",
"configuration",
",",
"$",
"configs",
")",
";",
"$",
"container",
"->",
"setParameter",
"(",
"\"hexmedia.seo.options\"",
",",
"$",
"config",
"[",
"'seo'",
"]",
")",
";",
"if",
"(",
"!",
"isset",
"(",
"$",
"config",
"[",
"'ga'",
"]",
"[",
"'domain'",
"]",
")",
")",
"{",
"$",
"config",
"[",
"'ga'",
"]",
"[",
"'domain'",
"]",
"=",
"$",
"container",
"->",
"getParameter",
"(",
"\"domain\"",
")",
";",
"}",
"$",
"container",
"->",
"setParameter",
"(",
"\"hexmedia.ga.options\"",
",",
"$",
"config",
"[",
"'ga'",
"]",
")",
";",
"}"
] | Loads the configuration in, with any defaults
@param array $configs
@param \Symfony\Component\DependencyInjection\ContainerBuilder $container | [
"Loads",
"the",
"configuration",
"in",
"with",
"any",
"defaults"
] | ac76cf3d226cd645a0976cfb6f3e6b058fa89890 | https://github.com/Hexmedia/Administrator-Bundle/blob/ac76cf3d226cd645a0976cfb6f3e6b058fa89890/DependencyInjection/HexmediaAdministratorExtension.php#L38-L50 |
6,677 | HouseOfAgile/dacorp-extra-bundle | Services/DacorpMediaManager.php | DacorpMediaManager.manageSimpleMediaFor | public function manageSimpleMediaFor($parentContent, $editId, $itemId, $oneFileName, $userId, $parentType)
{
$newEditId = $this->fileManager->generateItemId($userId, $itemId);
//just take the only attachment, which should be the first
return $this->manageSimpleMedia($parentContent, $editId, $newEditId, $oneFileName, $parentType);
} | php | public function manageSimpleMediaFor($parentContent, $editId, $itemId, $oneFileName, $userId, $parentType)
{
$newEditId = $this->fileManager->generateItemId($userId, $itemId);
//just take the only attachment, which should be the first
return $this->manageSimpleMedia($parentContent, $editId, $newEditId, $oneFileName, $parentType);
} | [
"public",
"function",
"manageSimpleMediaFor",
"(",
"$",
"parentContent",
",",
"$",
"editId",
",",
"$",
"itemId",
",",
"$",
"oneFileName",
",",
"$",
"userId",
",",
"$",
"parentType",
")",
"{",
"$",
"newEditId",
"=",
"$",
"this",
"->",
"fileManager",
"->",
"generateItemId",
"(",
"$",
"userId",
",",
"$",
"itemId",
")",
";",
"//just take the only attachment, which should be the first",
"return",
"$",
"this",
"->",
"manageSimpleMedia",
"(",
"$",
"parentContent",
",",
"$",
"editId",
",",
"$",
"newEditId",
",",
"$",
"oneFileName",
",",
"$",
"parentType",
")",
";",
"}"
] | For Entity with OneToOne relation to media
@param $parentContent
@param $editId
@param $itemId
@param $userId
@param array $newAttachmentList | [
"For",
"Entity",
"with",
"OneToOne",
"relation",
"to",
"media"
] | 99fe024791e7833058908a2e5544bde948031524 | https://github.com/HouseOfAgile/dacorp-extra-bundle/blob/99fe024791e7833058908a2e5544bde948031524/Services/DacorpMediaManager.php#L177-L182 |
6,678 | tasoftch/config | src/Controller/TransformationController.php | TransformationController.removeTransformers | public function removeTransformers(string $key, string $prefix = NULL) {
$id = $prefix ? "$prefix.$key" : $key;
if(isset($this->transformers[$id]))
unset($this->transformers[$id]);
} | php | public function removeTransformers(string $key, string $prefix = NULL) {
$id = $prefix ? "$prefix.$key" : $key;
if(isset($this->transformers[$id]))
unset($this->transformers[$id]);
} | [
"public",
"function",
"removeTransformers",
"(",
"string",
"$",
"key",
",",
"string",
"$",
"prefix",
"=",
"NULL",
")",
"{",
"$",
"id",
"=",
"$",
"prefix",
"?",
"\"$prefix.$key\"",
":",
"$",
"key",
";",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"transformers",
"[",
"$",
"id",
"]",
")",
")",
"unset",
"(",
"$",
"this",
"->",
"transformers",
"[",
"$",
"id",
"]",
")",
";",
"}"
] | Removes registered transformers identified by key and prefix
@param string $key
@param string|NULL $prefix | [
"Removes",
"registered",
"transformers",
"identified",
"by",
"key",
"and",
"prefix"
] | 4937668bd7d56150edf3a77de5d529db6f6a4a80 | https://github.com/tasoftch/config/blob/4937668bd7d56150edf3a77de5d529db6f6a4a80/src/Controller/TransformationController.php#L68-L72 |
6,679 | tentwofour/twig | src/Ten24/Twig/Extension/EmailEncodingExtension.php | EmailEncodingExtension.encodeText | protected function encodeText($text)
{
$encoded_text = '';
for ($i = 0; $i < strlen($text); $i++) {
$char = $text{$i};
$r = rand(0, 100);
# roughly 10% raw, 45% hex, 45% dec
# '@' *must* be encoded. I insist.
if ($r > 90 && $char != '@') {
$encoded_text .= $char;
} else if ($r < 45) {
$encoded_text .= '&#x'.dechex(ord($char)).';';
} else {
$encoded_text .= '&#'.ord($char).';';
}
}
return $encoded_text;
} | php | protected function encodeText($text)
{
$encoded_text = '';
for ($i = 0; $i < strlen($text); $i++) {
$char = $text{$i};
$r = rand(0, 100);
# roughly 10% raw, 45% hex, 45% dec
# '@' *must* be encoded. I insist.
if ($r > 90 && $char != '@') {
$encoded_text .= $char;
} else if ($r < 45) {
$encoded_text .= '&#x'.dechex(ord($char)).';';
} else {
$encoded_text .= '&#'.ord($char).';';
}
}
return $encoded_text;
} | [
"protected",
"function",
"encodeText",
"(",
"$",
"text",
")",
"{",
"$",
"encoded_text",
"=",
"''",
";",
"for",
"(",
"$",
"i",
"=",
"0",
";",
"$",
"i",
"<",
"strlen",
"(",
"$",
"text",
")",
";",
"$",
"i",
"++",
")",
"{",
"$",
"char",
"=",
"$",
"text",
"{",
"$",
"i",
"}",
";",
"$",
"r",
"=",
"rand",
"(",
"0",
",",
"100",
")",
";",
"# roughly 10% raw, 45% hex, 45% dec",
"# '@' *must* be encoded. I insist.",
"if",
"(",
"$",
"r",
">",
"90",
"&&",
"$",
"char",
"!=",
"'@'",
")",
"{",
"$",
"encoded_text",
".=",
"$",
"char",
";",
"}",
"else",
"if",
"(",
"$",
"r",
"<",
"45",
")",
"{",
"$",
"encoded_text",
".=",
"'&#x'",
".",
"dechex",
"(",
"ord",
"(",
"$",
"char",
")",
")",
".",
"';'",
";",
"}",
"else",
"{",
"$",
"encoded_text",
".=",
"'&#'",
".",
"ord",
"(",
"$",
"char",
")",
".",
"';'",
";",
"}",
"}",
"return",
"$",
"encoded_text",
";",
"}"
] | Thanks to SF 1.2 UrlHelper.php
@param $text
@return string | [
"Thanks",
"to",
"SF",
"1",
".",
"2",
"UrlHelper",
".",
"php"
] | 4e3dba68508a242ac0b16fa3b02239178c4151f0 | https://github.com/tentwofour/twig/blob/4e3dba68508a242ac0b16fa3b02239178c4151f0/src/Ten24/Twig/Extension/EmailEncodingExtension.php#L36-L56 |
6,680 | znframework/package-console | Run.php | Run.titleCase | protected static function titleCase($command)
{
$words = explode('-', $command);
$words = array_map(function($data){ return mb_convert_case($data, MB_CASE_TITLE);}, $words);
return implode('', $words);
} | php | protected static function titleCase($command)
{
$words = explode('-', $command);
$words = array_map(function($data){ return mb_convert_case($data, MB_CASE_TITLE);}, $words);
return implode('', $words);
} | [
"protected",
"static",
"function",
"titleCase",
"(",
"$",
"command",
")",
"{",
"$",
"words",
"=",
"explode",
"(",
"'-'",
",",
"$",
"command",
")",
";",
"$",
"words",
"=",
"array_map",
"(",
"function",
"(",
"$",
"data",
")",
"{",
"return",
"mb_convert_case",
"(",
"$",
"data",
",",
"MB_CASE_TITLE",
")",
";",
"}",
",",
"$",
"words",
")",
";",
"return",
"implode",
"(",
"''",
",",
"$",
"words",
")",
";",
"}"
] | Protected title case | [
"Protected",
"title",
"case"
] | fde428da8b9d926ea4256c235f542e6225c5d788 | https://github.com/znframework/package-console/blob/fde428da8b9d926ea4256c235f542e6225c5d788/Run.php#L100-L107 |
6,681 | znframework/package-console | Run.php | Run.arrayRemoveFirst | protected static function arrayRemoveFirst(Array $array, Int $count = 1) : Array
{
for( $i = 0; $i < $count; $i++ )
{
array_shift($array);
}
return $array;
} | php | protected static function arrayRemoveFirst(Array $array, Int $count = 1) : Array
{
for( $i = 0; $i < $count; $i++ )
{
array_shift($array);
}
return $array;
} | [
"protected",
"static",
"function",
"arrayRemoveFirst",
"(",
"Array",
"$",
"array",
",",
"Int",
"$",
"count",
"=",
"1",
")",
":",
"Array",
"{",
"for",
"(",
"$",
"i",
"=",
"0",
";",
"$",
"i",
"<",
"$",
"count",
";",
"$",
"i",
"++",
")",
"{",
"array_shift",
"(",
"$",
"array",
")",
";",
"}",
"return",
"$",
"array",
";",
"}"
] | Array Remove First
@param array & $array
@param int $count = 1
@return array | [
"Array",
"Remove",
"First"
] | fde428da8b9d926ea4256c235f542e6225c5d788 | https://github.com/znframework/package-console/blob/fde428da8b9d926ea4256c235f542e6225c5d788/Run.php#L118-L126 |
6,682 | jenolan/jPHPLibrary | src/jShutdownManager.php | jShutdownManager.isRegistered | static public function isRegistered( $callBack = null, $returnPriority = false )
{
if( null === $callBack )
{
return self::$_registered;
}
if( is_int( $callBack ) )
{
return isset( self::$_registeredCallbacks[ $callBack ] ) ? ( $returnPriority ? self::$_registeredCallbacks[ $callBack ][ 1 ] : true ) : false;
}
foreach( self::$_registeredCallbacks as $cb )
{
if( $cb[ 0 ] === $callBack )
{
return $returnPriority ? $cb[ 1 ] : true;
}
}
return false;
} | php | static public function isRegistered( $callBack = null, $returnPriority = false )
{
if( null === $callBack )
{
return self::$_registered;
}
if( is_int( $callBack ) )
{
return isset( self::$_registeredCallbacks[ $callBack ] ) ? ( $returnPriority ? self::$_registeredCallbacks[ $callBack ][ 1 ] : true ) : false;
}
foreach( self::$_registeredCallbacks as $cb )
{
if( $cb[ 0 ] === $callBack )
{
return $returnPriority ? $cb[ 1 ] : true;
}
}
return false;
} | [
"static",
"public",
"function",
"isRegistered",
"(",
"$",
"callBack",
"=",
"null",
",",
"$",
"returnPriority",
"=",
"false",
")",
"{",
"if",
"(",
"null",
"===",
"$",
"callBack",
")",
"{",
"return",
"self",
"::",
"$",
"_registered",
";",
"}",
"if",
"(",
"is_int",
"(",
"$",
"callBack",
")",
")",
"{",
"return",
"isset",
"(",
"self",
"::",
"$",
"_registeredCallbacks",
"[",
"$",
"callBack",
"]",
")",
"?",
"(",
"$",
"returnPriority",
"?",
"self",
"::",
"$",
"_registeredCallbacks",
"[",
"$",
"callBack",
"]",
"[",
"1",
"]",
":",
"true",
")",
":",
"false",
";",
"}",
"foreach",
"(",
"self",
"::",
"$",
"_registeredCallbacks",
"as",
"$",
"cb",
")",
"{",
"if",
"(",
"$",
"cb",
"[",
"0",
"]",
"===",
"$",
"callBack",
")",
"{",
"return",
"$",
"returnPriority",
"?",
"$",
"cb",
"[",
"1",
"]",
":",
"true",
";",
"}",
"}",
"return",
"false",
";",
"}"
] | Check that given callable is registered by shutdown manager. It also allow to check that jShutdownManager is registered itself
@param callback $callBack check that the given callback (or id of registered callback return by register method) is registered (if null then check that smvcShutdownManager itself is registered)
@param bool $returnPriority if true the actual priority level of the callback will be return instead of bool (be aware it may return 0 in such case that doesn't mean false)
@return bool or integer if $returnPriority is passed to true | [
"Check",
"that",
"given",
"callable",
"is",
"registered",
"by",
"shutdown",
"manager",
".",
"It",
"also",
"allow",
"to",
"check",
"that",
"jShutdownManager",
"is",
"registered",
"itself"
] | e9a201c87e029e9ad7f60bb57ca7daace127ff50 | https://github.com/jenolan/jPHPLibrary/blob/e9a201c87e029e9ad7f60bb57ca7daace127ff50/src/jShutdownManager.php#L29-L47 |
6,683 | jenolan/jPHPLibrary | src/jShutdownManager.php | jShutdownManager.register | static public function register( $callBack, $priority = 0 )
{
if( !self::$_registered )
{
register_shutdown_function( array( __class__, '_registered_shutdown' ) );
self::$_registered = true;
}
$params = func_get_args();
self::$_registeredCallbacks[ ++self::$_id ] = array( $callBack, (int) $priority, self::$_id,
array_slice( $params, 2 )
);
return self::$_id;
} | php | static public function register( $callBack, $priority = 0 )
{
if( !self::$_registered )
{
register_shutdown_function( array( __class__, '_registered_shutdown' ) );
self::$_registered = true;
}
$params = func_get_args();
self::$_registeredCallbacks[ ++self::$_id ] = array( $callBack, (int) $priority, self::$_id,
array_slice( $params, 2 )
);
return self::$_id;
} | [
"static",
"public",
"function",
"register",
"(",
"$",
"callBack",
",",
"$",
"priority",
"=",
"0",
")",
"{",
"if",
"(",
"!",
"self",
"::",
"$",
"_registered",
")",
"{",
"register_shutdown_function",
"(",
"array",
"(",
"__class__",
",",
"'_registered_shutdown'",
")",
")",
";",
"self",
"::",
"$",
"_registered",
"=",
"true",
";",
"}",
"$",
"params",
"=",
"func_get_args",
"(",
")",
";",
"self",
"::",
"$",
"_registeredCallbacks",
"[",
"++",
"self",
"::",
"$",
"_id",
"]",
"=",
"array",
"(",
"$",
"callBack",
",",
"(",
"int",
")",
"$",
"priority",
",",
"self",
"::",
"$",
"_id",
",",
"array_slice",
"(",
"$",
"params",
",",
"2",
")",
")",
";",
"return",
"self",
"::",
"$",
"_id",
";",
"}"
] | register a callback function to be executed as a shutdown fucntion
@param callback $callBack the callback to register, if already registered then it
@param int $priority the priority level of the callback (higher level means later call)
@param mixed $param you can add as many optionnal parameter as you want to the callback
@return int internal callback id | [
"register",
"a",
"callback",
"function",
"to",
"be",
"executed",
"as",
"a",
"shutdown",
"fucntion"
] | e9a201c87e029e9ad7f60bb57ca7daace127ff50 | https://github.com/jenolan/jPHPLibrary/blob/e9a201c87e029e9ad7f60bb57ca7daace127ff50/src/jShutdownManager.php#L56-L68 |
6,684 | jenolan/jPHPLibrary | src/jShutdownManager.php | jShutdownManager.unregister | static public function unregister( $callBack )
{
if( is_null( $callBack ) )
{
self::$_registeredCallbacks = array();
return true;
}
if( is_int( $callBack ) )
{
if( !isset( self::$_registered[ $callBack ] ) )
{
return false;
}
unset( self::$_registered[ $callBack ] );
return true;
}
foreach( self::$_registeredCallbacks as $k => $cb )
{
if( $cb[ 0 ] === $callBack )
{
unset( self::$_registeredCallbacks[ $k ] );
return true;
}
}
return false;
} | php | static public function unregister( $callBack )
{
if( is_null( $callBack ) )
{
self::$_registeredCallbacks = array();
return true;
}
if( is_int( $callBack ) )
{
if( !isset( self::$_registered[ $callBack ] ) )
{
return false;
}
unset( self::$_registered[ $callBack ] );
return true;
}
foreach( self::$_registeredCallbacks as $k => $cb )
{
if( $cb[ 0 ] === $callBack )
{
unset( self::$_registeredCallbacks[ $k ] );
return true;
}
}
return false;
} | [
"static",
"public",
"function",
"unregister",
"(",
"$",
"callBack",
")",
"{",
"if",
"(",
"is_null",
"(",
"$",
"callBack",
")",
")",
"{",
"self",
"::",
"$",
"_registeredCallbacks",
"=",
"array",
"(",
")",
";",
"return",
"true",
";",
"}",
"if",
"(",
"is_int",
"(",
"$",
"callBack",
")",
")",
"{",
"if",
"(",
"!",
"isset",
"(",
"self",
"::",
"$",
"_registered",
"[",
"$",
"callBack",
"]",
")",
")",
"{",
"return",
"false",
";",
"}",
"unset",
"(",
"self",
"::",
"$",
"_registered",
"[",
"$",
"callBack",
"]",
")",
";",
"return",
"true",
";",
"}",
"foreach",
"(",
"self",
"::",
"$",
"_registeredCallbacks",
"as",
"$",
"k",
"=>",
"$",
"cb",
")",
"{",
"if",
"(",
"$",
"cb",
"[",
"0",
"]",
"===",
"$",
"callBack",
")",
"{",
"unset",
"(",
"self",
"::",
"$",
"_registeredCallbacks",
"[",
"$",
"k",
"]",
")",
";",
"return",
"true",
";",
"}",
"}",
"return",
"false",
";",
"}"
] | unregister previously registered callback
@param callback $callBack the callback to unregister (or the callback id returned by register method )
/!\ if null is given then will unregister all previously registered callback.
@return bool return true if successfully removed else return false | [
"unregister",
"previously",
"registered",
"callback"
] | e9a201c87e029e9ad7f60bb57ca7daace127ff50 | https://github.com/jenolan/jPHPLibrary/blob/e9a201c87e029e9ad7f60bb57ca7daace127ff50/src/jShutdownManager.php#L76-L101 |
6,685 | jenolan/jPHPLibrary | src/jShutdownManager.php | jShutdownManager.shutdown | static public function shutdown( $status = 0, $byPassCallBacks = false )
{
self::$_byPassCallBacks = $byPassCallBacks;
exit( $status ? $status : 0 );
} | php | static public function shutdown( $status = 0, $byPassCallBacks = false )
{
self::$_byPassCallBacks = $byPassCallBacks;
exit( $status ? $status : 0 );
} | [
"static",
"public",
"function",
"shutdown",
"(",
"$",
"status",
"=",
"0",
",",
"$",
"byPassCallBacks",
"=",
"false",
")",
"{",
"self",
"::",
"$",
"_byPassCallBacks",
"=",
"$",
"byPassCallBacks",
";",
"exit",
"(",
"$",
"status",
"?",
"$",
"status",
":",
"0",
")",
";",
"}"
] | shutdown the script by calling exit.
@param mixed $status may be a string as in die or a status code (@see exit)
@param bool $byPassCallBacks if true then will do a normal exit without calling any of the registered callbacks | [
"shutdown",
"the",
"script",
"by",
"calling",
"exit",
"."
] | e9a201c87e029e9ad7f60bb57ca7daace127ff50 | https://github.com/jenolan/jPHPLibrary/blob/e9a201c87e029e9ad7f60bb57ca7daace127ff50/src/jShutdownManager.php#L108-L112 |
6,686 | jenolan/jPHPLibrary | src/jShutdownManager.php | jShutdownManager._registered_shutdown | static public function _registered_shutdown()
{
if( self::$_byPassCallBacks )
{
return;
}
#- first sort the stack
uasort( self::$_registeredCallbacks, array( __class__, '_compare' ) );
foreach( self::$_registeredCallbacks as $cb )
{
call_user_func_array( $cb[ 0 ], $cb[ 3 ] );
}
} | php | static public function _registered_shutdown()
{
if( self::$_byPassCallBacks )
{
return;
}
#- first sort the stack
uasort( self::$_registeredCallbacks, array( __class__, '_compare' ) );
foreach( self::$_registeredCallbacks as $cb )
{
call_user_func_array( $cb[ 0 ], $cb[ 3 ] );
}
} | [
"static",
"public",
"function",
"_registered_shutdown",
"(",
")",
"{",
"if",
"(",
"self",
"::",
"$",
"_byPassCallBacks",
")",
"{",
"return",
";",
"}",
"#- first sort the stack",
"uasort",
"(",
"self",
"::",
"$",
"_registeredCallbacks",
",",
"array",
"(",
"__class__",
",",
"'_compare'",
")",
")",
";",
"foreach",
"(",
"self",
"::",
"$",
"_registeredCallbacks",
"as",
"$",
"cb",
")",
"{",
"call_user_func_array",
"(",
"$",
"cb",
"[",
"0",
"]",
",",
"$",
"cb",
"[",
"3",
"]",
")",
";",
"}",
"}"
] | THIS IS NOT INTENTED TO BE CALLED OTHER THAN INTERNALLY
the only reason for this to be public is that it's a necessity for register_shutdown_function to see it
there's no reason at all for you to call this
@internal | [
"THIS",
"IS",
"NOT",
"INTENTED",
"TO",
"BE",
"CALLED",
"OTHER",
"THAN",
"INTERNALLY",
"the",
"only",
"reason",
"for",
"this",
"to",
"be",
"public",
"is",
"that",
"it",
"s",
"a",
"necessity",
"for",
"register_shutdown_function",
"to",
"see",
"it",
"there",
"s",
"no",
"reason",
"at",
"all",
"for",
"you",
"to",
"call",
"this"
] | e9a201c87e029e9ad7f60bb57ca7daace127ff50 | https://github.com/jenolan/jPHPLibrary/blob/e9a201c87e029e9ad7f60bb57ca7daace127ff50/src/jShutdownManager.php#L120-L132 |
6,687 | jivoo/core | src/Paths.php | Paths.p | public function p($ipath, $context = null)
{
$ipath = Utilities::convertPath($ipath);
if (!isset($context)) {
$context = $this->basePath;
}
if ($ipath == '') {
return $context;
}
$splits = explode('/', $ipath, 2);
$key = $splits[0];
$path = '';
if (isset($splits[1])) {
$path = $splits[1];
}
if ($key == '.') {
return self::combinePaths($context, $path);
}
return self::combinePaths($this->__get($key), $path);
} | php | public function p($ipath, $context = null)
{
$ipath = Utilities::convertPath($ipath);
if (!isset($context)) {
$context = $this->basePath;
}
if ($ipath == '') {
return $context;
}
$splits = explode('/', $ipath, 2);
$key = $splits[0];
$path = '';
if (isset($splits[1])) {
$path = $splits[1];
}
if ($key == '.') {
return self::combinePaths($context, $path);
}
return self::combinePaths($this->__get($key), $path);
} | [
"public",
"function",
"p",
"(",
"$",
"ipath",
",",
"$",
"context",
"=",
"null",
")",
"{",
"$",
"ipath",
"=",
"Utilities",
"::",
"convertPath",
"(",
"$",
"ipath",
")",
";",
"if",
"(",
"!",
"isset",
"(",
"$",
"context",
")",
")",
"{",
"$",
"context",
"=",
"$",
"this",
"->",
"basePath",
";",
"}",
"if",
"(",
"$",
"ipath",
"==",
"''",
")",
"{",
"return",
"$",
"context",
";",
"}",
"$",
"splits",
"=",
"explode",
"(",
"'/'",
",",
"$",
"ipath",
",",
"2",
")",
";",
"$",
"key",
"=",
"$",
"splits",
"[",
"0",
"]",
";",
"$",
"path",
"=",
"''",
";",
"if",
"(",
"isset",
"(",
"$",
"splits",
"[",
"1",
"]",
")",
")",
"{",
"$",
"path",
"=",
"$",
"splits",
"[",
"1",
"]",
";",
"}",
"if",
"(",
"$",
"key",
"==",
"'.'",
")",
"{",
"return",
"self",
"::",
"combinePaths",
"(",
"$",
"context",
",",
"$",
"path",
")",
";",
"}",
"return",
"self",
"::",
"combinePaths",
"(",
"$",
"this",
"->",
"__get",
"(",
"$",
"key",
")",
",",
"$",
"path",
")",
";",
"}"
] | Convert an internal path.
@param string $ipath Internal path, e.g. 'key/followed/by/subpath'.
@param string $context Optional context for relative paths (paths starting
with './'). The default is the {@see $basePath}. | [
"Convert",
"an",
"internal",
"path",
"."
] | 4ef3445068f0ff9c0a6512cb741831a847013b76 | https://github.com/jivoo/core/blob/4ef3445068f0ff9c0a6512cb741831a847013b76/src/Paths.php#L108-L127 |
6,688 | stakhanovist/worker | library/Processor/ForwardProcessor.php | ForwardProcessor.process | public function process(MessageInterface $message)
{
return $this->worker->forward()->dispatch($message->getContent(), $message->getMetadata());
} | php | public function process(MessageInterface $message)
{
return $this->worker->forward()->dispatch($message->getContent(), $message->getMetadata());
} | [
"public",
"function",
"process",
"(",
"MessageInterface",
"$",
"message",
")",
"{",
"return",
"$",
"this",
"->",
"worker",
"->",
"forward",
"(",
")",
"->",
"dispatch",
"(",
"$",
"message",
"->",
"getContent",
"(",
")",
",",
"$",
"message",
"->",
"getMetadata",
"(",
")",
")",
";",
"}"
] | Processes a message and returns the result.
@param MessageInterface $message The message to process
@return mixed The result. | [
"Processes",
"a",
"message",
"and",
"returns",
"the",
"result",
"."
] | 63f6aaeb06986a7c39b5e5c4be742b92942b5d3f | https://github.com/stakhanovist/worker/blob/63f6aaeb06986a7c39b5e5c4be742b92942b5d3f/library/Processor/ForwardProcessor.php#L54-L57 |
6,689 | unimatrix/cake | src/Model/Behavior/SluggableBehavior.php | SluggableBehavior.slug | private function slug($value = null) {
// generate slug
$slug = strtolower(Text::slug($value, $this->_config['replacement']));
// unique slug?
if($this->_config['unique']) {
// does the slug already exist?
$field = $this->_table->getAlias() . '.slug';
$conditions = [$field => $slug];
$suffix = '';
$i = 0;
// loop till unique slug is found
while ($this->_table->exists($conditions)) {
$i++;
$suffix = $this->_config['replacement'] . $i;
$conditions[$field] = $slug . $suffix;
}
// got suffix? append it
if($suffix)
$slug .= $suffix;
}
// return slug
return $slug;
} | php | private function slug($value = null) {
// generate slug
$slug = strtolower(Text::slug($value, $this->_config['replacement']));
// unique slug?
if($this->_config['unique']) {
// does the slug already exist?
$field = $this->_table->getAlias() . '.slug';
$conditions = [$field => $slug];
$suffix = '';
$i = 0;
// loop till unique slug is found
while ($this->_table->exists($conditions)) {
$i++;
$suffix = $this->_config['replacement'] . $i;
$conditions[$field] = $slug . $suffix;
}
// got suffix? append it
if($suffix)
$slug .= $suffix;
}
// return slug
return $slug;
} | [
"private",
"function",
"slug",
"(",
"$",
"value",
"=",
"null",
")",
"{",
"// generate slug",
"$",
"slug",
"=",
"strtolower",
"(",
"Text",
"::",
"slug",
"(",
"$",
"value",
",",
"$",
"this",
"->",
"_config",
"[",
"'replacement'",
"]",
")",
")",
";",
"// unique slug?",
"if",
"(",
"$",
"this",
"->",
"_config",
"[",
"'unique'",
"]",
")",
"{",
"// does the slug already exist?",
"$",
"field",
"=",
"$",
"this",
"->",
"_table",
"->",
"getAlias",
"(",
")",
".",
"'.slug'",
";",
"$",
"conditions",
"=",
"[",
"$",
"field",
"=>",
"$",
"slug",
"]",
";",
"$",
"suffix",
"=",
"''",
";",
"$",
"i",
"=",
"0",
";",
"// loop till unique slug is found",
"while",
"(",
"$",
"this",
"->",
"_table",
"->",
"exists",
"(",
"$",
"conditions",
")",
")",
"{",
"$",
"i",
"++",
";",
"$",
"suffix",
"=",
"$",
"this",
"->",
"_config",
"[",
"'replacement'",
"]",
".",
"$",
"i",
";",
"$",
"conditions",
"[",
"$",
"field",
"]",
"=",
"$",
"slug",
".",
"$",
"suffix",
";",
"}",
"// got suffix? append it",
"if",
"(",
"$",
"suffix",
")",
"$",
"slug",
".=",
"$",
"suffix",
";",
"}",
"// return slug",
"return",
"$",
"slug",
";",
"}"
] | Slug a field passed in the default config with its replacement.
@param string $value The string that needs to be processed
@return string | [
"Slug",
"a",
"field",
"passed",
"in",
"the",
"default",
"config",
"with",
"its",
"replacement",
"."
] | 23003aba497822bd473fdbf60514052dda1874fc | https://github.com/unimatrix/cake/blob/23003aba497822bd473fdbf60514052dda1874fc/src/Model/Behavior/SluggableBehavior.php#L57-L83 |
6,690 | unimatrix/cake | src/Model/Behavior/SluggableBehavior.php | SluggableBehavior.beforeSave | public function beforeSave(Event $event, Entity $entity) {
if(!$entity->get('slug') || $this->_config['overwrite'])
$entity->set('slug', $this->slug($entity->get($this->_config['field'])));
} | php | public function beforeSave(Event $event, Entity $entity) {
if(!$entity->get('slug') || $this->_config['overwrite'])
$entity->set('slug', $this->slug($entity->get($this->_config['field'])));
} | [
"public",
"function",
"beforeSave",
"(",
"Event",
"$",
"event",
",",
"Entity",
"$",
"entity",
")",
"{",
"if",
"(",
"!",
"$",
"entity",
"->",
"get",
"(",
"'slug'",
")",
"||",
"$",
"this",
"->",
"_config",
"[",
"'overwrite'",
"]",
")",
"$",
"entity",
"->",
"set",
"(",
"'slug'",
",",
"$",
"this",
"->",
"slug",
"(",
"$",
"entity",
"->",
"get",
"(",
"$",
"this",
"->",
"_config",
"[",
"'field'",
"]",
")",
")",
")",
";",
"}"
] | BeforeSave handle.
@param \Cake\Event\Event $event The beforeSave event that was fired.
@param \Cake\ORM\Entity $entity The entity that is going to be saved.
@return void | [
"BeforeSave",
"handle",
"."
] | 23003aba497822bd473fdbf60514052dda1874fc | https://github.com/unimatrix/cake/blob/23003aba497822bd473fdbf60514052dda1874fc/src/Model/Behavior/SluggableBehavior.php#L91-L94 |
6,691 | skgroup/php-rbac | src/Role.php | Role.isGranted | public function isGranted($permission, Array $params = null)
{
if ($this->checkPermissionCurrent($permission, $params)) {
return true;
}
if ($this->checkPermissionRecursive($permission, $params)) {
return true;
}
return false;
} | php | public function isGranted($permission, Array $params = null)
{
if ($this->checkPermissionCurrent($permission, $params)) {
return true;
}
if ($this->checkPermissionRecursive($permission, $params)) {
return true;
}
return false;
} | [
"public",
"function",
"isGranted",
"(",
"$",
"permission",
",",
"Array",
"$",
"params",
"=",
"null",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"checkPermissionCurrent",
"(",
"$",
"permission",
",",
"$",
"params",
")",
")",
"{",
"return",
"true",
";",
"}",
"if",
"(",
"$",
"this",
"->",
"checkPermissionRecursive",
"(",
"$",
"permission",
",",
"$",
"params",
")",
")",
"{",
"return",
"true",
";",
"}",
"return",
"false",
";",
"}"
] | Checks if a permission exists for this role or any child roles.
@param string $permission
@param array $params
@return bool | [
"Checks",
"if",
"a",
"permission",
"exists",
"for",
"this",
"role",
"or",
"any",
"child",
"roles",
"."
] | 89b08cacda9b1376b8f07d16038d2eade6dfb9e8 | https://github.com/skgroup/php-rbac/blob/89b08cacda9b1376b8f07d16038d2eade6dfb9e8/src/Role.php#L93-L104 |
6,692 | skgroup/php-rbac | src/Role.php | Role.getPermissions | public function getPermissions()
{
$mode = \RecursiveIteratorIterator::CHILD_FIRST;
$iterator = $this->createRecursiveIterator($mode);
$permissions = [];
/** @var $child RoleInterface */
foreach ($iterator as $child) {
$permissions = array_replace_recursive($permissions, $child->getPermissions());
}
return array_replace_recursive($permissions, $this->permissions);
} | php | public function getPermissions()
{
$mode = \RecursiveIteratorIterator::CHILD_FIRST;
$iterator = $this->createRecursiveIterator($mode);
$permissions = [];
/** @var $child RoleInterface */
foreach ($iterator as $child) {
$permissions = array_replace_recursive($permissions, $child->getPermissions());
}
return array_replace_recursive($permissions, $this->permissions);
} | [
"public",
"function",
"getPermissions",
"(",
")",
"{",
"$",
"mode",
"=",
"\\",
"RecursiveIteratorIterator",
"::",
"CHILD_FIRST",
";",
"$",
"iterator",
"=",
"$",
"this",
"->",
"createRecursiveIterator",
"(",
"$",
"mode",
")",
";",
"$",
"permissions",
"=",
"[",
"]",
";",
"/** @var $child RoleInterface */",
"foreach",
"(",
"$",
"iterator",
"as",
"$",
"child",
")",
"{",
"$",
"permissions",
"=",
"array_replace_recursive",
"(",
"$",
"permissions",
",",
"$",
"child",
"->",
"getPermissions",
"(",
")",
")",
";",
"}",
"return",
"array_replace_recursive",
"(",
"$",
"permissions",
",",
"$",
"this",
"->",
"permissions",
")",
";",
"}"
] | Returns permissions from the Role.
@return PermissionInterface[] | [
"Returns",
"permissions",
"from",
"the",
"Role",
"."
] | 89b08cacda9b1376b8f07d16038d2eade6dfb9e8 | https://github.com/skgroup/php-rbac/blob/89b08cacda9b1376b8f07d16038d2eade6dfb9e8/src/Role.php#L111-L124 |
6,693 | mvqn/ucrm-module-core | src/UCRM/Plugins/Log.php | Log.write | public static function write(string $message, string $eol = "\r\n"): string
{
$log_file =
Plugin::dataPath().
DIRECTORY_SEPARATOR."plugin.log";
if(!file_exists(dirname($log_file)))
mkdir(dirname($log_file));
$line = sprintf(
"[%s] %s",
//(new DateTimeImmutable())->format("Y-m-d G:i:s.u"),
(new \DateTime())->format(self::TIMESTAMP_FORMAT),
$message
);
file_put_contents(
$log_file,
$line.$eol,
FILE_APPEND | LOCK_EX
);
return $line;
} | php | public static function write(string $message, string $eol = "\r\n"): string
{
$log_file =
Plugin::dataPath().
DIRECTORY_SEPARATOR."plugin.log";
if(!file_exists(dirname($log_file)))
mkdir(dirname($log_file));
$line = sprintf(
"[%s] %s",
//(new DateTimeImmutable())->format("Y-m-d G:i:s.u"),
(new \DateTime())->format(self::TIMESTAMP_FORMAT),
$message
);
file_put_contents(
$log_file,
$line.$eol,
FILE_APPEND | LOCK_EX
);
return $line;
} | [
"public",
"static",
"function",
"write",
"(",
"string",
"$",
"message",
",",
"string",
"$",
"eol",
"=",
"\"\\r\\n\"",
")",
":",
"string",
"{",
"$",
"log_file",
"=",
"Plugin",
"::",
"dataPath",
"(",
")",
".",
"DIRECTORY_SEPARATOR",
".",
"\"plugin.log\"",
";",
"if",
"(",
"!",
"file_exists",
"(",
"dirname",
"(",
"$",
"log_file",
")",
")",
")",
"mkdir",
"(",
"dirname",
"(",
"$",
"log_file",
")",
")",
";",
"$",
"line",
"=",
"sprintf",
"(",
"\"[%s] %s\"",
",",
"//(new DateTimeImmutable())->format(\"Y-m-d G:i:s.u\"),",
"(",
"new",
"\\",
"DateTime",
"(",
")",
")",
"->",
"format",
"(",
"self",
"::",
"TIMESTAMP_FORMAT",
")",
",",
"$",
"message",
")",
";",
"file_put_contents",
"(",
"$",
"log_file",
",",
"$",
"line",
".",
"$",
"eol",
",",
"FILE_APPEND",
"|",
"LOCK_EX",
")",
";",
"return",
"$",
"line",
";",
"}"
] | Writes a message to this Plugin's log file.
@param string $message The message to be appended to this Plugin's log file.
@param string $eol
@return string Returns the same message that was logged. | [
"Writes",
"a",
"message",
"to",
"this",
"Plugin",
"s",
"log",
"file",
"."
] | 520a0d74574a5065c8fde5835681a72a85399a62 | https://github.com/mvqn/ucrm-module-core/blob/520a0d74574a5065c8fde5835681a72a85399a62/src/UCRM/Plugins/Log.php#L21-L44 |
6,694 | mvqn/ucrm-module-core | src/UCRM/Plugins/Log.php | Log.clear | public static function clear(): void
{
$log_file =
Plugin::dataPath().
DIRECTORY_SEPARATOR."plugin.log";
if(!file_exists(dirname($log_file)))
mkdir(dirname($log_file));
file_put_contents(
$log_file,
"",
LOCK_EX
);
} | php | public static function clear(): void
{
$log_file =
Plugin::dataPath().
DIRECTORY_SEPARATOR."plugin.log";
if(!file_exists(dirname($log_file)))
mkdir(dirname($log_file));
file_put_contents(
$log_file,
"",
LOCK_EX
);
} | [
"public",
"static",
"function",
"clear",
"(",
")",
":",
"void",
"{",
"$",
"log_file",
"=",
"Plugin",
"::",
"dataPath",
"(",
")",
".",
"DIRECTORY_SEPARATOR",
".",
"\"plugin.log\"",
";",
"if",
"(",
"!",
"file_exists",
"(",
"dirname",
"(",
"$",
"log_file",
")",
")",
")",
"mkdir",
"(",
"dirname",
"(",
"$",
"log_file",
")",
")",
";",
"file_put_contents",
"(",
"$",
"log_file",
",",
"\"\"",
",",
"LOCK_EX",
")",
";",
"}"
] | Clears this Plugin's log file. | [
"Clears",
"this",
"Plugin",
"s",
"log",
"file",
"."
] | 520a0d74574a5065c8fde5835681a72a85399a62 | https://github.com/mvqn/ucrm-module-core/blob/520a0d74574a5065c8fde5835681a72a85399a62/src/UCRM/Plugins/Log.php#L73-L87 |
6,695 | mvqn/ucrm-module-core | src/UCRM/Plugins/Log.php | Log.lines | public static function lines(int $tail = 0): ?array
{
$log_file =
Plugin::dataPath().
DIRECTORY_SEPARATOR."plugin.log";
if(!file_exists($log_file))
throw new RequiredFileNotFoundException(
"A plugin.log file could not be found at '".$log_file."'.");
$lines = preg_split("/[\r\n|\r|\n]+/", file_get_contents($log_file));
// Remove the final empty line...
if($lines[count($lines) - 1] === "")
unset($lines[count($lines) - 1]);
if($tail < 0)
return null;
if($tail === 0)
return $lines;
return array_slice($lines, -$tail, $tail);
} | php | public static function lines(int $tail = 0): ?array
{
$log_file =
Plugin::dataPath().
DIRECTORY_SEPARATOR."plugin.log";
if(!file_exists($log_file))
throw new RequiredFileNotFoundException(
"A plugin.log file could not be found at '".$log_file."'.");
$lines = preg_split("/[\r\n|\r|\n]+/", file_get_contents($log_file));
// Remove the final empty line...
if($lines[count($lines) - 1] === "")
unset($lines[count($lines) - 1]);
if($tail < 0)
return null;
if($tail === 0)
return $lines;
return array_slice($lines, -$tail, $tail);
} | [
"public",
"static",
"function",
"lines",
"(",
"int",
"$",
"tail",
"=",
"0",
")",
":",
"?",
"array",
"{",
"$",
"log_file",
"=",
"Plugin",
"::",
"dataPath",
"(",
")",
".",
"DIRECTORY_SEPARATOR",
".",
"\"plugin.log\"",
";",
"if",
"(",
"!",
"file_exists",
"(",
"$",
"log_file",
")",
")",
"throw",
"new",
"RequiredFileNotFoundException",
"(",
"\"A plugin.log file could not be found at '\"",
".",
"$",
"log_file",
".",
"\"'.\"",
")",
";",
"$",
"lines",
"=",
"preg_split",
"(",
"\"/[\\r\\n|\\r|\\n]+/\"",
",",
"file_get_contents",
"(",
"$",
"log_file",
")",
")",
";",
"// Remove the final empty line...",
"if",
"(",
"$",
"lines",
"[",
"count",
"(",
"$",
"lines",
")",
"-",
"1",
"]",
"===",
"\"\"",
")",
"unset",
"(",
"$",
"lines",
"[",
"count",
"(",
"$",
"lines",
")",
"-",
"1",
"]",
")",
";",
"if",
"(",
"$",
"tail",
"<",
"0",
")",
"return",
"null",
";",
"if",
"(",
"$",
"tail",
"===",
"0",
")",
"return",
"$",
"lines",
";",
"return",
"array_slice",
"(",
"$",
"lines",
",",
"-",
"$",
"tail",
",",
"$",
"tail",
")",
";",
"}"
] | Reads the specified number of trailing lines from this Plugin's log file.
@param int $tail The number of lines at the end of the file for which to return. 0 = All Lines (default)
@return array|null An array of the requested lines.
@throws RequiredFileNotFoundException Thrown when a plugin.log file cannot be found. | [
"Reads",
"the",
"specified",
"number",
"of",
"trailing",
"lines",
"from",
"this",
"Plugin",
"s",
"log",
"file",
"."
] | 520a0d74574a5065c8fde5835681a72a85399a62 | https://github.com/mvqn/ucrm-module-core/blob/520a0d74574a5065c8fde5835681a72a85399a62/src/UCRM/Plugins/Log.php#L96-L119 |
6,696 | SysCodeSoft/Sofi-HTTP-Message | src/message/Request.php | Request.createFromString | public static function createFromString($Line)
{
// explode the string into lines.
$lines = explode("\n", $Line);
// extract the method and uri
list( $method, $uri ) = explode(' ', array_shift($lines));
$headers = [];
foreach ($lines as $line) {
// clean the line
$line = trim($line);
if (strpos($line, ': ') !== false) {
list( $key, $value ) = explode(': ', $line);
$headers[$key] = $value;
}
}
$reqBody = new \Sofi\HTTP\RequestBody();
$headers = \Sofi\HTTP\Headers::createFromArray($headers);
$cookies = \Sofi\HTTP\Cookies::parseHeader($headers->get('cookie'));
return new static($method, new \Sofi\HTTP\message\Uri($uri), $headers, $cookies, $_SERVER, $reqBody);
} | php | public static function createFromString($Line)
{
// explode the string into lines.
$lines = explode("\n", $Line);
// extract the method and uri
list( $method, $uri ) = explode(' ', array_shift($lines));
$headers = [];
foreach ($lines as $line) {
// clean the line
$line = trim($line);
if (strpos($line, ': ') !== false) {
list( $key, $value ) = explode(': ', $line);
$headers[$key] = $value;
}
}
$reqBody = new \Sofi\HTTP\RequestBody();
$headers = \Sofi\HTTP\Headers::createFromArray($headers);
$cookies = \Sofi\HTTP\Cookies::parseHeader($headers->get('cookie'));
return new static($method, new \Sofi\HTTP\message\Uri($uri), $headers, $cookies, $_SERVER, $reqBody);
} | [
"public",
"static",
"function",
"createFromString",
"(",
"$",
"Line",
")",
"{",
"// explode the string into lines.",
"$",
"lines",
"=",
"explode",
"(",
"\"\\n\"",
",",
"$",
"Line",
")",
";",
"// extract the method and uri",
"list",
"(",
"$",
"method",
",",
"$",
"uri",
")",
"=",
"explode",
"(",
"' '",
",",
"array_shift",
"(",
"$",
"lines",
")",
")",
";",
"$",
"headers",
"=",
"[",
"]",
";",
"foreach",
"(",
"$",
"lines",
"as",
"$",
"line",
")",
"{",
"// clean the line",
"$",
"line",
"=",
"trim",
"(",
"$",
"line",
")",
";",
"if",
"(",
"strpos",
"(",
"$",
"line",
",",
"': '",
")",
"!==",
"false",
")",
"{",
"list",
"(",
"$",
"key",
",",
"$",
"value",
")",
"=",
"explode",
"(",
"': '",
",",
"$",
"line",
")",
";",
"$",
"headers",
"[",
"$",
"key",
"]",
"=",
"$",
"value",
";",
"}",
"}",
"$",
"reqBody",
"=",
"new",
"\\",
"Sofi",
"\\",
"HTTP",
"\\",
"RequestBody",
"(",
")",
";",
"$",
"headers",
"=",
"\\",
"Sofi",
"\\",
"HTTP",
"\\",
"Headers",
"::",
"createFromArray",
"(",
"$",
"headers",
")",
";",
"$",
"cookies",
"=",
"\\",
"Sofi",
"\\",
"HTTP",
"\\",
"Cookies",
"::",
"parseHeader",
"(",
"$",
"headers",
"->",
"get",
"(",
"'cookie'",
")",
")",
";",
"return",
"new",
"static",
"(",
"$",
"method",
",",
"new",
"\\",
"Sofi",
"\\",
"HTTP",
"\\",
"message",
"\\",
"Uri",
"(",
"$",
"uri",
")",
",",
"$",
"headers",
",",
"$",
"cookies",
",",
"$",
"_SERVER",
",",
"$",
"reqBody",
")",
";",
"}"
] | Create new headers collection with data extracted from string
@param string $Line
@return self | [
"Create",
"new",
"headers",
"collection",
"with",
"data",
"extracted",
"from",
"string"
] | dd2161d117d15268641310b0092479b714a46651 | https://github.com/SysCodeSoft/Sofi-HTTP-Message/blob/dd2161d117d15268641310b0092479b714a46651/src/message/Request.php#L152-L177 |
6,697 | n0m4dz/laracasa | Zend/Gdata/Spreadsheets/CellQuery.php | Zend_Gdata_Spreadsheets_CellQuery.setMinRow | public function setMinRow($value)
{
if ($value != null) {
$this->_params['min-row'] = $value;
} else {
unset($this->_params['min-row']);
}
return $this;
} | php | public function setMinRow($value)
{
if ($value != null) {
$this->_params['min-row'] = $value;
} else {
unset($this->_params['min-row']);
}
return $this;
} | [
"public",
"function",
"setMinRow",
"(",
"$",
"value",
")",
"{",
"if",
"(",
"$",
"value",
"!=",
"null",
")",
"{",
"$",
"this",
"->",
"_params",
"[",
"'min-row'",
"]",
"=",
"$",
"value",
";",
"}",
"else",
"{",
"unset",
"(",
"$",
"this",
"->",
"_params",
"[",
"'min-row'",
"]",
")",
";",
"}",
"return",
"$",
"this",
";",
"}"
] | Sets the min-row attribute for this query.
@param string $value
@return Zend_Gdata_Spreadsheets_CellQuery Provides a fluent interface | [
"Sets",
"the",
"min",
"-",
"row",
"attribute",
"for",
"this",
"query",
"."
] | 6141f0c16c7d4453275e3b74be5041f336085c91 | https://github.com/n0m4dz/laracasa/blob/6141f0c16c7d4453275e3b74be5041f336085c91/Zend/Gdata/Spreadsheets/CellQuery.php#L182-L190 |
6,698 | n0m4dz/laracasa | Zend/Gdata/Spreadsheets/CellQuery.php | Zend_Gdata_Spreadsheets_CellQuery.setMaxRow | public function setMaxRow($value)
{
if ($value != null) {
$this->_params['max-row'] = $value;
} else {
unset($this->_params['max-row']);
}
return $this;
} | php | public function setMaxRow($value)
{
if ($value != null) {
$this->_params['max-row'] = $value;
} else {
unset($this->_params['max-row']);
}
return $this;
} | [
"public",
"function",
"setMaxRow",
"(",
"$",
"value",
")",
"{",
"if",
"(",
"$",
"value",
"!=",
"null",
")",
"{",
"$",
"this",
"->",
"_params",
"[",
"'max-row'",
"]",
"=",
"$",
"value",
";",
"}",
"else",
"{",
"unset",
"(",
"$",
"this",
"->",
"_params",
"[",
"'max-row'",
"]",
")",
";",
"}",
"return",
"$",
"this",
";",
"}"
] | Sets the max-row attribute for this query.
@param string $value
@return Zend_Gdata_Spreadsheets_CellQuery Provides a fluent interface | [
"Sets",
"the",
"max",
"-",
"row",
"attribute",
"for",
"this",
"query",
"."
] | 6141f0c16c7d4453275e3b74be5041f336085c91 | https://github.com/n0m4dz/laracasa/blob/6141f0c16c7d4453275e3b74be5041f336085c91/Zend/Gdata/Spreadsheets/CellQuery.php#L212-L220 |
6,699 | n0m4dz/laracasa | Zend/Gdata/Spreadsheets/CellQuery.php | Zend_Gdata_Spreadsheets_CellQuery.setMinCol | public function setMinCol($value)
{
if ($value != null) {
$this->_params['min-col'] = $value;
} else {
unset($this->_params['min-col']);
}
return $this;
} | php | public function setMinCol($value)
{
if ($value != null) {
$this->_params['min-col'] = $value;
} else {
unset($this->_params['min-col']);
}
return $this;
} | [
"public",
"function",
"setMinCol",
"(",
"$",
"value",
")",
"{",
"if",
"(",
"$",
"value",
"!=",
"null",
")",
"{",
"$",
"this",
"->",
"_params",
"[",
"'min-col'",
"]",
"=",
"$",
"value",
";",
"}",
"else",
"{",
"unset",
"(",
"$",
"this",
"->",
"_params",
"[",
"'min-col'",
"]",
")",
";",
"}",
"return",
"$",
"this",
";",
"}"
] | Sets the min-col attribute for this query.
@param string $value
@return Zend_Gdata_Spreadsheets_CellQuery Provides a fluent interface | [
"Sets",
"the",
"min",
"-",
"col",
"attribute",
"for",
"this",
"query",
"."
] | 6141f0c16c7d4453275e3b74be5041f336085c91 | https://github.com/n0m4dz/laracasa/blob/6141f0c16c7d4453275e3b74be5041f336085c91/Zend/Gdata/Spreadsheets/CellQuery.php#L242-L250 |
Subsets and Splits