repository_name stringlengths 5 67 | func_path_in_repository stringlengths 4 234 | func_name stringlengths 0 314 | whole_func_string stringlengths 52 3.87M | language stringclasses 6
values | func_code_string stringlengths 52 3.87M | func_code_tokens listlengths 15 672k | func_documentation_string stringlengths 1 47.2k | func_documentation_tokens listlengths 1 3.92k | split_name stringclasses 1
value | func_code_url stringlengths 85 339 |
|---|---|---|---|---|---|---|---|---|---|---|
necrox87/yii2-nudity-detector | NudityDetector.php | NudityDetector.quantifyYCbCr | public function quantifyYCbCr() {
// Init some vars
$inc = $this->iteratorIncrement;
$width = $this->width();
$height = $this->height();
list($Cb1, $Cb2, $Cr1, $Cr2) = $this->boundsCbCr;
$white = $this->excludeWhite;
$black = $this->excludeBlack;
$total =... | php | public function quantifyYCbCr() {
// Init some vars
$inc = $this->iteratorIncrement;
$width = $this->width();
$height = $this->height();
list($Cb1, $Cb2, $Cr1, $Cr2) = $this->boundsCbCr;
$white = $this->excludeWhite;
$black = $this->excludeBlack;
$total =... | [
"public",
"function",
"quantifyYCbCr",
"(",
")",
"{",
"// Init some vars",
"$",
"inc",
"=",
"$",
"this",
"->",
"iteratorIncrement",
";",
"$",
"width",
"=",
"$",
"this",
"->",
"width",
"(",
")",
";",
"$",
"height",
"=",
"$",
"this",
"->",
"height",
"(",... | Quantify flesh color amount using YCbCr color model
@return float | [
"Quantify",
"flesh",
"color",
"amount",
"using",
"YCbCr",
"color",
"model"
] | train | https://github.com/necrox87/yii2-nudity-detector/blob/59474b1480f5ed53a17f06551318d30c3765d143/NudityDetector.php#L57-L87 |
necrox87/yii2-nudity-detector | NudityDetector.php | NudityDetector.isPorn | public function isPorn($threshold = FALSE) {
return $threshold === FALSE
? $this->quantifyYCbCr() >= $this->threshold
: $this->quantifyYCbCr() >= $threshold;
} | php | public function isPorn($threshold = FALSE) {
return $threshold === FALSE
? $this->quantifyYCbCr() >= $this->threshold
: $this->quantifyYCbCr() >= $threshold;
} | [
"public",
"function",
"isPorn",
"(",
"$",
"threshold",
"=",
"FALSE",
")",
"{",
"return",
"$",
"threshold",
"===",
"FALSE",
"?",
"$",
"this",
"->",
"quantifyYCbCr",
"(",
")",
">=",
"$",
"this",
"->",
"threshold",
":",
"$",
"this",
"->",
"quantifyYCbCr",
... | Check if image is of pornographic content
@param float $threshold | [
"Check",
"if",
"image",
"is",
"of",
"pornographic",
"content"
] | train | https://github.com/necrox87/yii2-nudity-detector/blob/59474b1480f5ed53a17f06551318d30c3765d143/NudityDetector.php#L94-L98 |
phpmob/changmin | src/PhpMob/CmsBundle/Provider/TranslationLocaleProvider.php | TranslationLocaleProvider.getDefinedLocalesCodes | public function getDefinedLocalesCodes(): array
{
$locales = $this->localeRepository->findAll();
$locales = array_map(
function (LocaleInterface $locale) {
return $locale->getCode();
},
$locales
);
return array_unique(array_merge([... | php | public function getDefinedLocalesCodes(): array
{
$locales = $this->localeRepository->findAll();
$locales = array_map(
function (LocaleInterface $locale) {
return $locale->getCode();
},
$locales
);
return array_unique(array_merge([... | [
"public",
"function",
"getDefinedLocalesCodes",
"(",
")",
":",
"array",
"{",
"$",
"locales",
"=",
"$",
"this",
"->",
"localeRepository",
"->",
"findAll",
"(",
")",
";",
"$",
"locales",
"=",
"array_map",
"(",
"function",
"(",
"LocaleInterface",
"$",
"locale",... | {@inheritdoc} | [
"{"
] | train | https://github.com/phpmob/changmin/blob/bfebb1561229094d1c138574abab75f2f1d17d66/src/PhpMob/CmsBundle/Provider/TranslationLocaleProvider.php#L48-L59 |
nyeholt/silverstripe-external-content | code/model/ExternalContentItem.php | ExternalContentItem.Link | function Link($action = null) {
$cur = Controller::curr();
if ($cur instanceof ExternalContentPage_Controller) {
return $cur->data()->LinkFor($this, 'view');
}
return ExternalContentPage_Controller::URL_STUB . '/view/' . $this->ID;
} | php | function Link($action = null) {
$cur = Controller::curr();
if ($cur instanceof ExternalContentPage_Controller) {
return $cur->data()->LinkFor($this, 'view');
}
return ExternalContentPage_Controller::URL_STUB . '/view/' . $this->ID;
} | [
"function",
"Link",
"(",
"$",
"action",
"=",
"null",
")",
"{",
"$",
"cur",
"=",
"Controller",
"::",
"curr",
"(",
")",
";",
"if",
"(",
"$",
"cur",
"instanceof",
"ExternalContentPage_Controller",
")",
"{",
"return",
"$",
"cur",
"->",
"data",
"(",
")",
... | Return a URL that simply links back to the externalcontentadmin
class' 'view' action
@param $action
@return String | [
"Return",
"a",
"URL",
"that",
"simply",
"links",
"back",
"to",
"the",
"externalcontentadmin",
"class",
"view",
"action"
] | train | https://github.com/nyeholt/silverstripe-external-content/blob/1c6da8c56ef717225ff904e1522aff94ed051601/code/model/ExternalContentItem.php#L141-L147 |
nyeholt/silverstripe-external-content | code/model/ExternalContentItem.php | ExternalContentItem.DownloadLink | public function DownloadLink() {
// get the base URL, prepend with the external content
// controller /download action and add this object's id
$cur = Controller::curr();
if ($cur instanceof ExternalContentPage_Controller) {
return $cur->data()->LinkFor($this, 'download');
}
return ExternalContentPage_Co... | php | public function DownloadLink() {
// get the base URL, prepend with the external content
// controller /download action and add this object's id
$cur = Controller::curr();
if ($cur instanceof ExternalContentPage_Controller) {
return $cur->data()->LinkFor($this, 'download');
}
return ExternalContentPage_Co... | [
"public",
"function",
"DownloadLink",
"(",
")",
"{",
"// get the base URL, prepend with the external content",
"// controller /download action and add this object's id",
"$",
"cur",
"=",
"Controller",
"::",
"curr",
"(",
")",
";",
"if",
"(",
"$",
"cur",
"instanceof",
"Exte... | Where this can be downloaded from
@return string | [
"Where",
"this",
"can",
"be",
"downloaded",
"from"
] | train | https://github.com/nyeholt/silverstripe-external-content/blob/1c6da8c56ef717225ff904e1522aff94ed051601/code/model/ExternalContentItem.php#L169-L177 |
nyeholt/silverstripe-external-content | code/model/ExternalContentItem.php | ExternalContentItem.stageChildren | public function stageChildren($showAll = false) {
if ($this->Title != 'Content Root' && $this->source) {
$children = new ArrayList();
$item = new ExternalContentItem($this->source, $this->Title . '1');
$item->Title = $this->Title . '1';
$item->MenuTitle = $item->Title;
$children->push($item);
retur... | php | public function stageChildren($showAll = false) {
if ($this->Title != 'Content Root' && $this->source) {
$children = new ArrayList();
$item = new ExternalContentItem($this->source, $this->Title . '1');
$item->Title = $this->Title . '1';
$item->MenuTitle = $item->Title;
$children->push($item);
retur... | [
"public",
"function",
"stageChildren",
"(",
"$",
"showAll",
"=",
"false",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"Title",
"!=",
"'Content Root'",
"&&",
"$",
"this",
"->",
"source",
")",
"{",
"$",
"children",
"=",
"new",
"ArrayList",
"(",
")",
";",
"... | Overridden to load all children from a remote content
source instead of this node directly
@param boolean $showAll
@return ArrayList | [
"Overridden",
"to",
"load",
"all",
"children",
"from",
"a",
"remote",
"content",
"source",
"instead",
"of",
"this",
"node",
"directly"
] | train | https://github.com/nyeholt/silverstripe-external-content/blob/1c6da8c56ef717225ff904e1522aff94ed051601/code/model/ExternalContentItem.php#L230-L240 |
nyeholt/silverstripe-external-content | code/model/ExternalContentItem.php | ExternalContentItem.Children | public function Children() {
if (!$this->children) {
$this->children = new ArrayList();
$kids = $this->stageChildren();
if ($kids) {
foreach ($kids as $child) {
if ($child->canView()) {
$this->children->push($child);
}
}
}
}
return $this->children;
} | php | public function Children() {
if (!$this->children) {
$this->children = new ArrayList();
$kids = $this->stageChildren();
if ($kids) {
foreach ($kids as $child) {
if ($child->canView()) {
$this->children->push($child);
}
}
}
}
return $this->children;
} | [
"public",
"function",
"Children",
"(",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"children",
")",
"{",
"$",
"this",
"->",
"children",
"=",
"new",
"ArrayList",
"(",
")",
";",
"$",
"kids",
"=",
"$",
"this",
"->",
"stageChildren",
"(",
")",
";",
... | Handle a children call by retrieving from stageChildren | [
"Handle",
"a",
"children",
"call",
"by",
"retrieving",
"from",
"stageChildren"
] | train | https://github.com/nyeholt/silverstripe-external-content/blob/1c6da8c56ef717225ff904e1522aff94ed051601/code/model/ExternalContentItem.php#L245-L258 |
nyeholt/silverstripe-external-content | code/model/ExternalContentItem.php | ExternalContentItem.getCMSFields | public function getCMSFields() {
$fields = parent::getCMSFields();
$fields->removeByName('ParentID');
if (count($this->remoteProperties)) {
$mapping = $this->editableFieldMapping();
foreach ($this->remoteProperties as $name => $value) {
$field = null;
if (isset($mapping[$name])) {
$field = $ma... | php | public function getCMSFields() {
$fields = parent::getCMSFields();
$fields->removeByName('ParentID');
if (count($this->remoteProperties)) {
$mapping = $this->editableFieldMapping();
foreach ($this->remoteProperties as $name => $value) {
$field = null;
if (isset($mapping[$name])) {
$field = $ma... | [
"public",
"function",
"getCMSFields",
"(",
")",
"{",
"$",
"fields",
"=",
"parent",
"::",
"getCMSFields",
"(",
")",
";",
"$",
"fields",
"->",
"removeByName",
"(",
"'ParentID'",
")",
";",
"if",
"(",
"count",
"(",
"$",
"this",
"->",
"remoteProperties",
")",... | For now just show a field that says this can't be edited
@see sapphire/core/model/DataObject#getCMSFields($params) | [
"For",
"now",
"just",
"show",
"a",
"field",
"that",
"says",
"this",
"can",
"t",
"be",
"edited"
] | train | https://github.com/nyeholt/silverstripe-external-content/blob/1c6da8c56ef717225ff904e1522aff94ed051601/code/model/ExternalContentItem.php#L265-L303 |
nyeholt/silverstripe-external-content | code/model/ExternalContentItem.php | ExternalContentItem.setCastedField | function setCastedField($fieldName, $val) {
$mapping = $this->editableFieldMapping();
if (isset($mapping[$fieldName])) {
$this->$fieldName = $val;
}
} | php | function setCastedField($fieldName, $val) {
$mapping = $this->editableFieldMapping();
if (isset($mapping[$fieldName])) {
$this->$fieldName = $val;
}
} | [
"function",
"setCastedField",
"(",
"$",
"fieldName",
",",
"$",
"val",
")",
"{",
"$",
"mapping",
"=",
"$",
"this",
"->",
"editableFieldMapping",
"(",
")",
";",
"if",
"(",
"isset",
"(",
"$",
"mapping",
"[",
"$",
"fieldName",
"]",
")",
")",
"{",
"$",
... | Save content from a form into a field on this data object.
Since the data comes straight from a form it can't be trusted and will need to be validated / escaped.' | [
"Save",
"content",
"from",
"a",
"form",
"into",
"a",
"field",
"on",
"this",
"data",
"object",
".",
"Since",
"the",
"data",
"comes",
"straight",
"from",
"a",
"form",
"it",
"can",
"t",
"be",
"trusted",
"and",
"will",
"need",
"to",
"be",
"validated",
"/",... | train | https://github.com/nyeholt/silverstripe-external-content/blob/1c6da8c56ef717225ff904e1522aff94ed051601/code/model/ExternalContentItem.php#L461-L466 |
nyeholt/silverstripe-external-content | code/model/ExternalContentItem.php | ExternalContentItem.getTreeTitle | function getTreeTitle() {
$title = $this->Title;
if (!$title) {
$title = $this->Name;
}
$treeTitle = sprintf(
"<span class=\"jstree-pageicon\"></span><span class=\"item\">%s</span>",
Convert::raw2xml(str_replace(array("\n","\r"),"", $title))
);
return $treeTitle;
} | php | function getTreeTitle() {
$title = $this->Title;
if (!$title) {
$title = $this->Name;
}
$treeTitle = sprintf(
"<span class=\"jstree-pageicon\"></span><span class=\"item\">%s</span>",
Convert::raw2xml(str_replace(array("\n","\r"),"", $title))
);
return $treeTitle;
} | [
"function",
"getTreeTitle",
"(",
")",
"{",
"$",
"title",
"=",
"$",
"this",
"->",
"Title",
";",
"if",
"(",
"!",
"$",
"title",
")",
"{",
"$",
"title",
"=",
"$",
"this",
"->",
"Name",
";",
"}",
"$",
"treeTitle",
"=",
"sprintf",
"(",
"\"<span class=\\\... | getTreeTitle will return two <span> html DOM elements, an empty <span> with
the class 'jstree-pageicon' in front, following by a <span> wrapping around its
MenutTitle
@return string a html string ready to be directly used in a template | [
"getTreeTitle",
"will",
"return",
"two",
"<span",
">",
"html",
"DOM",
"elements",
"an",
"empty",
"<span",
">",
"with",
"the",
"class",
"jstree",
"-",
"pageicon",
"in",
"front",
"following",
"by",
"a",
"<span",
">",
"wrapping",
"around",
"its",
"MenutTitle"
] | train | https://github.com/nyeholt/silverstripe-external-content/blob/1c6da8c56ef717225ff904e1522aff94ed051601/code/model/ExternalContentItem.php#L498-L509 |
Double-Opt-in/php-client-api | src/Config/ConfigFactory.php | ConfigFactory.fromArray | public static function fromArray(array $data)
{
if ( ! array_key_exists('client_id', $data))
throw new ClientConfigurationException('Configuration file has no client_id set');
if ( ! array_key_exists('client_secret', $data))
throw new ClientConfigurationException('Configuration file has no client_secret set'... | php | public static function fromArray(array $data)
{
if ( ! array_key_exists('client_id', $data))
throw new ClientConfigurationException('Configuration file has no client_id set');
if ( ! array_key_exists('client_secret', $data))
throw new ClientConfigurationException('Configuration file has no client_secret set'... | [
"public",
"static",
"function",
"fromArray",
"(",
"array",
"$",
"data",
")",
"{",
"if",
"(",
"!",
"array_key_exists",
"(",
"'client_id'",
",",
"$",
"data",
")",
")",
"throw",
"new",
"ClientConfigurationException",
"(",
"'Configuration file has no client_id set'",
... | creates a configuration from array
array(
'api' => '', // optional
'client_id' => '...',
'client_secret' => '...',
'site_token' => '',
'cache_file' => '..',
)
@param array $data
@return ClientConfig
@throws ClientConfigurationException | [
"creates",
"a",
"configuration",
"from",
"array"
] | train | https://github.com/Double-Opt-in/php-client-api/blob/2f17da58ec20a408bbd55b2cdd053bc689f995f4/src/Config/ConfigFactory.php#L30-L53 |
Double-Opt-in/php-client-api | src/Config/ConfigFactory.php | ConfigFactory.fromFile | public static function fromFile($filename)
{
$filename = realpath($filename);
if ($filename === false)
throw new ClientConfigurationException('Configuration file ' . $filename . ' does not exists');
return static::fromArray(include $filename);
} | php | public static function fromFile($filename)
{
$filename = realpath($filename);
if ($filename === false)
throw new ClientConfigurationException('Configuration file ' . $filename . ' does not exists');
return static::fromArray(include $filename);
} | [
"public",
"static",
"function",
"fromFile",
"(",
"$",
"filename",
")",
"{",
"$",
"filename",
"=",
"realpath",
"(",
"$",
"filename",
")",
";",
"if",
"(",
"$",
"filename",
"===",
"false",
")",
"throw",
"new",
"ClientConfigurationException",
"(",
"'Configuratio... | creates a configuration from a php file returning an array
@param string $filename
@return ClientConfig
@throws ClientConfigurationException | [
"creates",
"a",
"configuration",
"from",
"a",
"php",
"file",
"returning",
"an",
"array"
] | train | https://github.com/Double-Opt-in/php-client-api/blob/2f17da58ec20a408bbd55b2cdd053bc689f995f4/src/Config/ConfigFactory.php#L63-L70 |
aedart/laravel-helpers | src/Traits/Database/SchemaTrait.php | SchemaTrait.getSchema | public function getSchema(): ?Builder
{
if (!$this->hasSchema()) {
$this->setSchema($this->getDefaultSchema());
}
return $this->schema;
} | php | public function getSchema(): ?Builder
{
if (!$this->hasSchema()) {
$this->setSchema($this->getDefaultSchema());
}
return $this->schema;
} | [
"public",
"function",
"getSchema",
"(",
")",
":",
"?",
"Builder",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"hasSchema",
"(",
")",
")",
"{",
"$",
"this",
"->",
"setSchema",
"(",
"$",
"this",
"->",
"getDefaultSchema",
"(",
")",
")",
";",
"}",
"return"... | Get schema
If no schema has been set, this method will
set and return a default schema, if any such
value is available
@see getDefaultSchema()
@return Builder|null schema or null if none schema has been set | [
"Get",
"schema"
] | train | https://github.com/aedart/laravel-helpers/blob/8b81a2d6658f3f8cb62b6be2c34773aaa2df219a/src/Traits/Database/SchemaTrait.php#L54-L60 |
aedart/laravel-helpers | src/Traits/Database/SchemaTrait.php | SchemaTrait.getDefaultSchema | public function getDefaultSchema(): ?Builder
{
// By default, the schema facade depends upon a
// database connection being available. Therefore,
// we need to ensure that this is true, before
// attempting to return the facade-root
$manager = DB::getFacadeRoot();
if ... | php | public function getDefaultSchema(): ?Builder
{
// By default, the schema facade depends upon a
// database connection being available. Therefore,
// we need to ensure that this is true, before
// attempting to return the facade-root
$manager = DB::getFacadeRoot();
if ... | [
"public",
"function",
"getDefaultSchema",
"(",
")",
":",
"?",
"Builder",
"{",
"// By default, the schema facade depends upon a",
"// database connection being available. Therefore,",
"// we need to ensure that this is true, before",
"// attempting to return the facade-root",
"$",
"manage... | Get a default schema value, if any is available
@return Builder|null A default schema value or Null if no default value is available | [
"Get",
"a",
"default",
"schema",
"value",
"if",
"any",
"is",
"available"
] | train | https://github.com/aedart/laravel-helpers/blob/8b81a2d6658f3f8cb62b6be2c34773aaa2df219a/src/Traits/Database/SchemaTrait.php#L77-L88 |
yuncms/framework | src/notifications/migrations/m180410_092547_create_notification_settings_table.php | m180410_092547_create_notification_settings_table.safeUp | public function safeUp()
{
$tableOptions = null;
if ($this->db->driverName === 'mysql') {
// http://stackoverflow.com/questions/766809/whats-the-difference-between-utf8-general-ci-and-utf8-unicode-ci
$tableOptions = 'CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE=Inn... | php | public function safeUp()
{
$tableOptions = null;
if ($this->db->driverName === 'mysql') {
// http://stackoverflow.com/questions/766809/whats-the-difference-between-utf8-general-ci-and-utf8-unicode-ci
$tableOptions = 'CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE=Inn... | [
"public",
"function",
"safeUp",
"(",
")",
"{",
"$",
"tableOptions",
"=",
"null",
";",
"if",
"(",
"$",
"this",
"->",
"db",
"->",
"driverName",
"===",
"'mysql'",
")",
"{",
"// http://stackoverflow.com/questions/766809/whats-the-difference-between-utf8-general-ci-and-utf8-... | {@inheritdoc} | [
"{"
] | train | https://github.com/yuncms/framework/blob/af42e28ea4ae15ab8eead3f6d119f93863b94154/src/notifications/migrations/m180410_092547_create_notification_settings_table.php#L18-L37 |
phrest/sdk | src/Request/RequestOptions.php | RequestOptions.addParameter | public function addParameter($param, $value = true)
{
if (!is_scalar($param))
{
throw new \Exception("Parameter filter must be scalar");
}
if (!isset($this->parameters))
{
$this->parameters = [];
}
return $this->addGetParam($param, $value);
} | php | public function addParameter($param, $value = true)
{
if (!is_scalar($param))
{
throw new \Exception("Parameter filter must be scalar");
}
if (!isset($this->parameters))
{
$this->parameters = [];
}
return $this->addGetParam($param, $value);
} | [
"public",
"function",
"addParameter",
"(",
"$",
"param",
",",
"$",
"value",
"=",
"true",
")",
"{",
"if",
"(",
"!",
"is_scalar",
"(",
"$",
"param",
")",
")",
"{",
"throw",
"new",
"\\",
"Exception",
"(",
"\"Parameter filter must be scalar\"",
")",
";",
"}"... | Use addGetParam/addPostParam accordingly
@param $param
@param bool $value
@return $this
@throws \Exception
@deprecated | [
"Use",
"addGetParam",
"/",
"addPostParam",
"accordingly"
] | train | https://github.com/phrest/sdk/blob/e9f2812ad517b07ca4d284512b530f615305eb47/src/Request/RequestOptions.php#L32-L45 |
phrest/sdk | src/Request/RequestOptions.php | RequestOptions.addGetParam | public function addGetParam($param, $value = true)
{
// Validate
if (!is_scalar($param))
{
throw new \Exception("Param name must be scalar");
}
// Filter
if (is_string($value))
{
$value = trim($value);
}
// Set
$this->queryParams[trim($param)] = $value;
retur... | php | public function addGetParam($param, $value = true)
{
// Validate
if (!is_scalar($param))
{
throw new \Exception("Param name must be scalar");
}
// Filter
if (is_string($value))
{
$value = trim($value);
}
// Set
$this->queryParams[trim($param)] = $value;
retur... | [
"public",
"function",
"addGetParam",
"(",
"$",
"param",
",",
"$",
"value",
"=",
"true",
")",
"{",
"// Validate",
"if",
"(",
"!",
"is_scalar",
"(",
"$",
"param",
")",
")",
"{",
"throw",
"new",
"\\",
"Exception",
"(",
"\"Param name must be scalar\"",
")",
... | Add a GET parameter
@param $param
@param mixed $value
@return $this
@throws \Exception | [
"Add",
"a",
"GET",
"parameter"
] | train | https://github.com/phrest/sdk/blob/e9f2812ad517b07ca4d284512b530f615305eb47/src/Request/RequestOptions.php#L70-L88 |
phrest/sdk | src/Request/RequestOptions.php | RequestOptions.addPostParam | public function addPostParam($param, $value = true)
{
// Validate
if (!is_scalar($param))
{
throw new \Exception("Param name must be scalar");
}
// Filter
if (is_string($value))
{
$value = trim($value);
}
// Set
$this->postParams[trim($param)] = $value;
retur... | php | public function addPostParam($param, $value = true)
{
// Validate
if (!is_scalar($param))
{
throw new \Exception("Param name must be scalar");
}
// Filter
if (is_string($value))
{
$value = trim($value);
}
// Set
$this->postParams[trim($param)] = $value;
retur... | [
"public",
"function",
"addPostParam",
"(",
"$",
"param",
",",
"$",
"value",
"=",
"true",
")",
"{",
"// Validate",
"if",
"(",
"!",
"is_scalar",
"(",
"$",
"param",
")",
")",
"{",
"throw",
"new",
"\\",
"Exception",
"(",
"\"Param name must be scalar\"",
")",
... | Add a POST parameter
@param $param
@param bool $value
@return $this
@throws \Exception | [
"Add",
"a",
"POST",
"parameter"
] | train | https://github.com/phrest/sdk/blob/e9f2812ad517b07ca4d284512b530f615305eb47/src/Request/RequestOptions.php#L99-L117 |
phrest/sdk | src/Request/RequestOptions.php | RequestOptions.setSearchTerm | public function setSearchTerm($searchTerm)
{
if (!is_scalar($searchTerm))
{
throw new \Exception("Search term must be a string");
}
$this->searchTerm = trim($searchTerm);
return $this;
} | php | public function setSearchTerm($searchTerm)
{
if (!is_scalar($searchTerm))
{
throw new \Exception("Search term must be a string");
}
$this->searchTerm = trim($searchTerm);
return $this;
} | [
"public",
"function",
"setSearchTerm",
"(",
"$",
"searchTerm",
")",
"{",
"if",
"(",
"!",
"is_scalar",
"(",
"$",
"searchTerm",
")",
")",
"{",
"throw",
"new",
"\\",
"Exception",
"(",
"\"Search term must be a string\"",
")",
";",
"}",
"$",
"this",
"->",
"sear... | Set a search term for the request
@param $searchTerm
@return $this
@throws \Exception | [
"Set",
"a",
"search",
"term",
"for",
"the",
"request"
] | train | https://github.com/phrest/sdk/blob/e9f2812ad517b07ca4d284512b530f615305eb47/src/Request/RequestOptions.php#L137-L147 |
phrest/sdk | src/Request/RequestOptions.php | RequestOptions.getGetParams | public function getGetParams()
{
if (isset($this->searchTerm))
{
$this->queryParams['q'] = $this->searchTerm;
}
return $this->queryParams;
} | php | public function getGetParams()
{
if (isset($this->searchTerm))
{
$this->queryParams['q'] = $this->searchTerm;
}
return $this->queryParams;
} | [
"public",
"function",
"getGetParams",
"(",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"searchTerm",
")",
")",
"{",
"$",
"this",
"->",
"queryParams",
"[",
"'q'",
"]",
"=",
"$",
"this",
"->",
"searchTerm",
";",
"}",
"return",
"$",
"this",
... | Get the request GET params
@return array | [
"Get",
"the",
"request",
"GET",
"params"
] | train | https://github.com/phrest/sdk/blob/e9f2812ad517b07ca4d284512b530f615305eb47/src/Request/RequestOptions.php#L166-L174 |
phrest/sdk | src/Request/RequestOptions.php | RequestOptions.toArray | public function toArray()
{
$params = [];
if (isset($this->searchTerm))
{
$params['q'] = $this->searchTerm;
}
if (isset($this->parameters))
{
foreach ($this->parameters as $paramKey => $paramVal)
{
$params[$paramKey] = $paramVal;
}
}
return $params;
... | php | public function toArray()
{
$params = [];
if (isset($this->searchTerm))
{
$params['q'] = $this->searchTerm;
}
if (isset($this->parameters))
{
foreach ($this->parameters as $paramKey => $paramVal)
{
$params[$paramKey] = $paramVal;
}
}
return $params;
... | [
"public",
"function",
"toArray",
"(",
")",
"{",
"$",
"params",
"=",
"[",
"]",
";",
"if",
"(",
"isset",
"(",
"$",
"this",
"->",
"searchTerm",
")",
")",
"{",
"$",
"params",
"[",
"'q'",
"]",
"=",
"$",
"this",
"->",
"searchTerm",
";",
"}",
"if",
"(... | This should no longer be needed
todo remove
@return array
@deprecated | [
"This",
"should",
"no",
"longer",
"be",
"needed",
"todo",
"remove"
] | train | https://github.com/phrest/sdk/blob/e9f2812ad517b07ca4d284512b530f615305eb47/src/Request/RequestOptions.php#L193-L211 |
mgallegos/decima-file | src/Mgallegos/DecimaFile/File/Repositories/File/EloquentFile.php | EloquentFile.byTypeAndByOrganization | public function byTypeAndByOrganization($type , $organizationId, $databaseConnectionName = null)
{
if(empty($databaseConnectionName))
{
$databaseConnectionName = $this->databaseConnectionName;
}
return $this->File->setConnection($databaseConnectionName)
->where('type', '=', $type)
-... | php | public function byTypeAndByOrganization($type , $organizationId, $databaseConnectionName = null)
{
if(empty($databaseConnectionName))
{
$databaseConnectionName = $this->databaseConnectionName;
}
return $this->File->setConnection($databaseConnectionName)
->where('type', '=', $type)
-... | [
"public",
"function",
"byTypeAndByOrganization",
"(",
"$",
"type",
",",
"$",
"organizationId",
",",
"$",
"databaseConnectionName",
"=",
"null",
")",
"{",
"if",
"(",
"empty",
"(",
"$",
"databaseConnectionName",
")",
")",
"{",
"$",
"databaseConnectionName",
"=",
... | Retrieve ... by organization
@param int $id Organization id
@return Illuminate\Database\Eloquent\Collection | [
"Retrieve",
"...",
"by",
"organization"
] | train | https://github.com/mgallegos/decima-file/blob/94c26ab40f5c4dd12e913e73376c24db27588f0b/src/Mgallegos/DecimaFile/File/Repositories/File/EloquentFile.php#L94-L105 |
mgallegos/decima-file | src/Mgallegos/DecimaFile/File/Repositories/File/EloquentFile.php | EloquentFile.byParentId | public function byParentId($id, $organizationId, $databaseConnectionName = null)
{
if(empty($databaseConnectionName))
{
$databaseConnectionName = $this->databaseConnectionName;
}
return $this->File->setConnection($databaseConnectionName)
->where('parent_file_id', '=', $id)
->where('... | php | public function byParentId($id, $organizationId, $databaseConnectionName = null)
{
if(empty($databaseConnectionName))
{
$databaseConnectionName = $this->databaseConnectionName;
}
return $this->File->setConnection($databaseConnectionName)
->where('parent_file_id', '=', $id)
->where('... | [
"public",
"function",
"byParentId",
"(",
"$",
"id",
",",
"$",
"organizationId",
",",
"$",
"databaseConnectionName",
"=",
"null",
")",
"{",
"if",
"(",
"empty",
"(",
"$",
"databaseConnectionName",
")",
")",
"{",
"$",
"databaseConnectionName",
"=",
"$",
"this",... | Retrieve ... by parent
@param int $id parent id
@return Illuminate\Database\Eloquent\Collection | [
"Retrieve",
"...",
"by",
"parent"
] | train | https://github.com/mgallegos/decima-file/blob/94c26ab40f5c4dd12e913e73376c24db27588f0b/src/Mgallegos/DecimaFile/File/Repositories/File/EloquentFile.php#L114-L125 |
mgallegos/decima-file | src/Mgallegos/DecimaFile/File/Repositories/File/EloquentFile.php | EloquentFile.byParentByFolderNameAndByOrganization | public function byParentByFolderNameAndByOrganization($parentId , $parent_name , $organizationId, $databaseConnectionName = null)
{
if(empty($databaseConnectionName))
{
$databaseConnectionName = $this->databaseConnectionName;
}
return $this->File->setConnection($databaseConnectionName)
->... | php | public function byParentByFolderNameAndByOrganization($parentId , $parent_name , $organizationId, $databaseConnectionName = null)
{
if(empty($databaseConnectionName))
{
$databaseConnectionName = $this->databaseConnectionName;
}
return $this->File->setConnection($databaseConnectionName)
->... | [
"public",
"function",
"byParentByFolderNameAndByOrganization",
"(",
"$",
"parentId",
",",
"$",
"parent_name",
",",
"$",
"organizationId",
",",
"$",
"databaseConnectionName",
"=",
"null",
")",
"{",
"if",
"(",
"empty",
"(",
"$",
"databaseConnectionName",
")",
")",
... | Retrieve ... by parent
@param int $id parent id
@return Illuminate\Database\Eloquent\Collection | [
"Retrieve",
"...",
"by",
"parent"
] | train | https://github.com/mgallegos/decima-file/blob/94c26ab40f5c4dd12e913e73376c24db27588f0b/src/Mgallegos/DecimaFile/File/Repositories/File/EloquentFile.php#L154-L167 |
mgallegos/decima-file | src/Mgallegos/DecimaFile/File/Repositories/File/EloquentFile.php | EloquentFile.byFileNameAndByOrganization | public function byFileNameAndByOrganization($file_name, $organizationId, $databaseConnectionName = null)
{
if(empty($databaseConnectionName))
{
$databaseConnectionName = $this->databaseConnectionName;
}
return $this->File->setConnection($databaseConnectionName)
->where('name', '=', $file_... | php | public function byFileNameAndByOrganization($file_name, $organizationId, $databaseConnectionName = null)
{
if(empty($databaseConnectionName))
{
$databaseConnectionName = $this->databaseConnectionName;
}
return $this->File->setConnection($databaseConnectionName)
->where('name', '=', $file_... | [
"public",
"function",
"byFileNameAndByOrganization",
"(",
"$",
"file_name",
",",
"$",
"organizationId",
",",
"$",
"databaseConnectionName",
"=",
"null",
")",
"{",
"if",
"(",
"empty",
"(",
"$",
"databaseConnectionName",
")",
")",
"{",
"$",
"databaseConnectionName",... | Retrieve ... by parent
@param int $id parent id
@return Illuminate\Database\Eloquent\Collection | [
"Retrieve",
"...",
"by",
"parent"
] | train | https://github.com/mgallegos/decima-file/blob/94c26ab40f5c4dd12e913e73376c24db27588f0b/src/Mgallegos/DecimaFile/File/Repositories/File/EloquentFile.php#L176-L187 |
mgallegos/decima-file | src/Mgallegos/DecimaFile/File/Repositories/File/EloquentFile.php | EloquentFile.byKeyAndPublic | public function byKeyAndPublic($key, $isPublic, $databaseConnectionName = null)
{
if(empty($databaseConnectionName))
{
$databaseConnectionName = $this->databaseConnectionName;
}
return $this->File->setConnection($databaseConnectionName)
->where('key', '=', $key)
->where('is_pu... | php | public function byKeyAndPublic($key, $isPublic, $databaseConnectionName = null)
{
if(empty($databaseConnectionName))
{
$databaseConnectionName = $this->databaseConnectionName;
}
return $this->File->setConnection($databaseConnectionName)
->where('key', '=', $key)
->where('is_pu... | [
"public",
"function",
"byKeyAndPublic",
"(",
"$",
"key",
",",
"$",
"isPublic",
",",
"$",
"databaseConnectionName",
"=",
"null",
")",
"{",
"if",
"(",
"empty",
"(",
"$",
"databaseConnectionName",
")",
")",
"{",
"$",
"databaseConnectionName",
"=",
"$",
"this",
... | Retrieve ... by parent
@param int $id parent id
@return Illuminate\Database\Eloquent\Collection | [
"Retrieve",
"...",
"by",
"parent"
] | train | https://github.com/mgallegos/decima-file/blob/94c26ab40f5c4dd12e913e73376c24db27588f0b/src/Mgallegos/DecimaFile/File/Repositories/File/EloquentFile.php#L196-L207 |
mgallegos/decima-file | src/Mgallegos/DecimaFile/File/Repositories/File/EloquentFile.php | EloquentFile.bySystemReferenceTypeBySystemReferenceIdAndByOrganization | public function bySystemReferenceTypeBySystemReferenceIdAndByOrganization($systemReferenceType , $systemReferenceId, $organizationId, $databaseConnectionName = null)
{
if(empty($databaseConnectionName))
{
$databaseConnectionName = $this->databaseConnectionName;
}
return $this->File->setCo... | php | public function bySystemReferenceTypeBySystemReferenceIdAndByOrganization($systemReferenceType , $systemReferenceId, $organizationId, $databaseConnectionName = null)
{
if(empty($databaseConnectionName))
{
$databaseConnectionName = $this->databaseConnectionName;
}
return $this->File->setCo... | [
"public",
"function",
"bySystemReferenceTypeBySystemReferenceIdAndByOrganization",
"(",
"$",
"systemReferenceType",
",",
"$",
"systemReferenceId",
",",
"$",
"organizationId",
",",
"$",
"databaseConnectionName",
"=",
"null",
")",
"{",
"if",
"(",
"empty",
"(",
"$",
"dat... | Retrieve files by system reference type and system reference id
@param int $id parent id
@return Illuminate\Database\Eloquent\Collection | [
"Retrieve",
"files",
"by",
"system",
"reference",
"type",
"and",
"system",
"reference",
"id"
] | train | https://github.com/mgallegos/decima-file/blob/94c26ab40f5c4dd12e913e73376c24db27588f0b/src/Mgallegos/DecimaFile/File/Repositories/File/EloquentFile.php#L236-L248 |
mgallegos/decima-file | src/Mgallegos/DecimaFile/File/Repositories/File/EloquentFile.php | EloquentFile.create | public function create(array $data, $databaseConnectionName = null)
{
if(empty($databaseConnectionName))
{
$databaseConnectionName = $this->databaseConnectionName;
}
$File = new File();
$File->setConnection($databaseConnectionName);
$File->fill($data)->save();
return $File;
} | php | public function create(array $data, $databaseConnectionName = null)
{
if(empty($databaseConnectionName))
{
$databaseConnectionName = $this->databaseConnectionName;
}
$File = new File();
$File->setConnection($databaseConnectionName);
$File->fill($data)->save();
return $File;
} | [
"public",
"function",
"create",
"(",
"array",
"$",
"data",
",",
"$",
"databaseConnectionName",
"=",
"null",
")",
"{",
"if",
"(",
"empty",
"(",
"$",
"databaseConnectionName",
")",
")",
"{",
"$",
"databaseConnectionName",
"=",
"$",
"this",
"->",
"databaseConne... | Create a new ...
@param array $data
An array as follows: array('field0'=>$field0, 'field1'=>$field1
);
@return boolean | [
"Create",
"a",
"new",
"..."
] | train | https://github.com/mgallegos/decima-file/blob/94c26ab40f5c4dd12e913e73376c24db27588f0b/src/Mgallegos/DecimaFile/File/Repositories/File/EloquentFile.php#L259-L271 |
mgallegos/decima-file | src/Mgallegos/DecimaFile/File/Repositories/File/EloquentFile.php | EloquentFile.update | public function update(array $data, $File = null, $databaseConnectionName = null)
{
if(empty($databaseConnectionName))
{
$databaseConnectionName = $this->databaseConnectionName;
}
if(empty($File))
{
$File = $this->byId($data['id'], $databaseConnectionName);
}
foreach ($data a... | php | public function update(array $data, $File = null, $databaseConnectionName = null)
{
if(empty($databaseConnectionName))
{
$databaseConnectionName = $this->databaseConnectionName;
}
if(empty($File))
{
$File = $this->byId($data['id'], $databaseConnectionName);
}
foreach ($data a... | [
"public",
"function",
"update",
"(",
"array",
"$",
"data",
",",
"$",
"File",
"=",
"null",
",",
"$",
"databaseConnectionName",
"=",
"null",
")",
"{",
"if",
"(",
"empty",
"(",
"$",
"databaseConnectionName",
")",
")",
"{",
"$",
"databaseConnectionName",
"=",
... | Update an existing ...
@param array $data
An array as follows: array('field0'=>$field0, 'field1'=>$field1
);
@param Mgallegos\DecimaAccounting\Account $File
@return boolean | [
"Update",
"an",
"existing",
"..."
] | train | https://github.com/mgallegos/decima-file/blob/94c26ab40f5c4dd12e913e73376c24db27588f0b/src/Mgallegos/DecimaFile/File/Repositories/File/EloquentFile.php#L284-L302 |
webforge-labs/psc-cms | lib/Psc/UI/Component/JavaScriptBase.php | JavaScriptBase.createJooseSnippet | protected function createJooseSnippet($jooseClass, $constructParams = NULL, Array $dependencies = array()) {
return JooseSnippet::create($jooseClass, $constructParams, $dependencies);
} | php | protected function createJooseSnippet($jooseClass, $constructParams = NULL, Array $dependencies = array()) {
return JooseSnippet::create($jooseClass, $constructParams, $dependencies);
} | [
"protected",
"function",
"createJooseSnippet",
"(",
"$",
"jooseClass",
",",
"$",
"constructParams",
"=",
"NULL",
",",
"Array",
"$",
"dependencies",
"=",
"array",
"(",
")",
")",
"{",
"return",
"JooseSnippet",
"::",
"create",
"(",
"$",
"jooseClass",
",",
"$",
... | Erstellt ein Snippet welches mit %self% auf die Componente als jQuery Objekt zugreifen kann
@return Psc\JS\Snippet | [
"Erstellt",
"ein",
"Snippet",
"welches",
"mit",
"%self%",
"auf",
"die",
"Componente",
"als",
"jQuery",
"Objekt",
"zugreifen",
"kann"
] | train | https://github.com/webforge-labs/psc-cms/blob/467bfa2547e6b4fa487d2d7f35fa6cc618dbc763/lib/Psc/UI/Component/JavaScriptBase.php#L28-L30 |
webforge-labs/psc-cms | lib/Psc/UI/Component/JavaScriptBase.php | JavaScriptBase.widgetSelector | protected function widgetSelector(\Psc\HTML\Tag $tag = NULL, $subSelector = NULL) {
$jQuery = \Psc\JS\jQuery::getClassSelector($tag ?: $this->html);
if (isset($subSelector)) {
$jQuery .= sprintf(".find(%s)", \Psc\JS\Helper::convertString($subSelector));
}
return $this->jsExpr($jQuery);
... | php | protected function widgetSelector(\Psc\HTML\Tag $tag = NULL, $subSelector = NULL) {
$jQuery = \Psc\JS\jQuery::getClassSelector($tag ?: $this->html);
if (isset($subSelector)) {
$jQuery .= sprintf(".find(%s)", \Psc\JS\Helper::convertString($subSelector));
}
return $this->jsExpr($jQuery);
... | [
"protected",
"function",
"widgetSelector",
"(",
"\\",
"Psc",
"\\",
"HTML",
"\\",
"Tag",
"$",
"tag",
"=",
"NULL",
",",
"$",
"subSelector",
"=",
"NULL",
")",
"{",
"$",
"jQuery",
"=",
"\\",
"Psc",
"\\",
"JS",
"\\",
"jQuery",
"::",
"getClassSelector",
"(",... | denn das hier hat nix mit joose zu tun | [
"denn",
"das",
"hier",
"hat",
"nix",
"mit",
"joose",
"zu",
"tun"
] | train | https://github.com/webforge-labs/psc-cms/blob/467bfa2547e6b4fa487d2d7f35fa6cc618dbc763/lib/Psc/UI/Component/JavaScriptBase.php#L34-L42 |
steeffeen/FancyManiaLinks | FML/Script/ScriptLabel.php | ScriptLabel.getEventLabels | public static function getEventLabels()
{
return array(self::ENTRYSUBMIT, self::KEYPRESS, self::MOUSECLICK, self::MOUSEOUT, self::MOUSEOVER);
} | php | public static function getEventLabels()
{
return array(self::ENTRYSUBMIT, self::KEYPRESS, self::MOUSECLICK, self::MOUSEOUT, self::MOUSEOVER);
} | [
"public",
"static",
"function",
"getEventLabels",
"(",
")",
"{",
"return",
"array",
"(",
"self",
"::",
"ENTRYSUBMIT",
",",
"self",
"::",
"KEYPRESS",
",",
"self",
"::",
"MOUSECLICK",
",",
"self",
"::",
"MOUSEOUT",
",",
"self",
"::",
"MOUSEOVER",
")",
";",
... | Get the possible event label names
@return string[] | [
"Get",
"the",
"possible",
"event",
"label",
"names"
] | train | https://github.com/steeffeen/FancyManiaLinks/blob/227b0759306f0a3c75873ba50276e4163a93bfa6/FML/Script/ScriptLabel.php#L188-L191 |
yuncms/framework | src/admin/widgets/Toolbar.php | Toolbar.renderItems | public function renderItems()
{
$items = [];
foreach ($this->items as $i => $item) {
if (isset($item['visible']) && !$item['visible']) {
continue;
}
$items[] = $this->renderItem($item);
}
return implode("\n", $items);
} | php | public function renderItems()
{
$items = [];
foreach ($this->items as $i => $item) {
if (isset($item['visible']) && !$item['visible']) {
continue;
}
$items[] = $this->renderItem($item);
}
return implode("\n", $items);
} | [
"public",
"function",
"renderItems",
"(",
")",
"{",
"$",
"items",
"=",
"[",
"]",
";",
"foreach",
"(",
"$",
"this",
"->",
"items",
"as",
"$",
"i",
"=>",
"$",
"item",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"item",
"[",
"'visible'",
"]",
")",
"&&... | Renders widget items. | [
"Renders",
"widget",
"items",
"."
] | train | https://github.com/yuncms/framework/blob/af42e28ea4ae15ab8eead3f6d119f93863b94154/src/admin/widgets/Toolbar.php#L129-L139 |
yuncms/framework | src/admin/widgets/Toolbar.php | Toolbar.renderItem | public function renderItem($item)
{
if (is_string($item)) {
return $item;
}
if (!isset($item['label'])) {
throw new InvalidConfigException("The 'label' option is required.");
}
$encodeLabel = isset($item['encode']) ? $item['encode'] : $this->encodeLabe... | php | public function renderItem($item)
{
if (is_string($item)) {
return $item;
}
if (!isset($item['label'])) {
throw new InvalidConfigException("The 'label' option is required.");
}
$encodeLabel = isset($item['encode']) ? $item['encode'] : $this->encodeLabe... | [
"public",
"function",
"renderItem",
"(",
"$",
"item",
")",
"{",
"if",
"(",
"is_string",
"(",
"$",
"item",
")",
")",
"{",
"return",
"$",
"item",
";",
"}",
"if",
"(",
"!",
"isset",
"(",
"$",
"item",
"[",
"'label'",
"]",
")",
")",
"{",
"throw",
"n... | Renders a widget's item.
@param string|array $item the item to render.
@return string the rendering result.
@throws InvalidConfigException | [
"Renders",
"a",
"widget",
"s",
"item",
"."
] | train | https://github.com/yuncms/framework/blob/af42e28ea4ae15ab8eead3f6d119f93863b94154/src/admin/widgets/Toolbar.php#L147-L173 |
refinery29/league-lazy-event | src/LazyListener.php | LazyListener.getListener | public function getListener()
{
if ($this->listener === null) {
try {
$listener = $this->container->get($this->alias);
} catch (Container\ContainerExceptionInterface $exception) {
throw new \BadMethodCallException(sprintf(
'Unable t... | php | public function getListener()
{
if ($this->listener === null) {
try {
$listener = $this->container->get($this->alias);
} catch (Container\ContainerExceptionInterface $exception) {
throw new \BadMethodCallException(sprintf(
'Unable t... | [
"public",
"function",
"getListener",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"listener",
"===",
"null",
")",
"{",
"try",
"{",
"$",
"listener",
"=",
"$",
"this",
"->",
"container",
"->",
"get",
"(",
"$",
"this",
"->",
"alias",
")",
";",
"}",
... | @throws BadMethodCallException
@return ListenerInterface | [
"@throws",
"BadMethodCallException"
] | train | https://github.com/refinery29/league-lazy-event/blob/6b363991f9d8e30e0912a83bf3cb0bf208066c54/src/LazyListener.php#L50-L66 |
refinery29/league-lazy-event | src/LazyListener.php | LazyListener.ensureListener | private function ensureListener($listener)
{
if ($listener instanceof ListenerInterface) {
return $listener;
}
if (is_callable($listener)) {
return CallbackListener::fromCallable($listener);
}
throw new \BadMethodCallException('Fetched listener neith... | php | private function ensureListener($listener)
{
if ($listener instanceof ListenerInterface) {
return $listener;
}
if (is_callable($listener)) {
return CallbackListener::fromCallable($listener);
}
throw new \BadMethodCallException('Fetched listener neith... | [
"private",
"function",
"ensureListener",
"(",
"$",
"listener",
")",
"{",
"if",
"(",
"$",
"listener",
"instanceof",
"ListenerInterface",
")",
"{",
"return",
"$",
"listener",
";",
"}",
"if",
"(",
"is_callable",
"(",
"$",
"listener",
")",
")",
"{",
"return",
... | @param ListenerInterface|callable $listener
@throws \BadMethodCallException
@return ListenerInterface | [
"@param",
"ListenerInterface|callable",
"$listener"
] | train | https://github.com/refinery29/league-lazy-event/blob/6b363991f9d8e30e0912a83bf3cb0bf208066c54/src/LazyListener.php#L75-L86 |
aedart/laravel-helpers | src/Traits/Database/DBManagerTrait.php | DBManagerTrait.getDbManager | public function getDbManager(): ?DatabaseManager
{
if (!$this->hasDbManager()) {
$this->setDbManager($this->getDefaultDbManager());
}
return $this->dbManager;
} | php | public function getDbManager(): ?DatabaseManager
{
if (!$this->hasDbManager()) {
$this->setDbManager($this->getDefaultDbManager());
}
return $this->dbManager;
} | [
"public",
"function",
"getDbManager",
"(",
")",
":",
"?",
"DatabaseManager",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"hasDbManager",
"(",
")",
")",
"{",
"$",
"this",
"->",
"setDbManager",
"(",
"$",
"this",
"->",
"getDefaultDbManager",
"(",
")",
")",
";... | Get db manager
If no db manager has been set, this method will
set and return a default db manager, if any such
value is available
@see getDefaultDbManager()
@return DatabaseManager|null db manager or null if none db manager has been set | [
"Get",
"db",
"manager"
] | train | https://github.com/aedart/laravel-helpers/blob/8b81a2d6658f3f8cb62b6be2c34773aaa2df219a/src/Traits/Database/DBManagerTrait.php#L53-L59 |
fyuze/framework | src/Fyuze/Http/Message/Stream.php | Stream.read | public function read($length)
{
if (false === $this->isReadable()) {
throw new RuntimeException('The current stream is not readable.');
}
// @todo find out how to make fread fail
if (false === $content = fread($this->stream, $length)) {
// @codeCoverageIgnore... | php | public function read($length)
{
if (false === $this->isReadable()) {
throw new RuntimeException('The current stream is not readable.');
}
// @todo find out how to make fread fail
if (false === $content = fread($this->stream, $length)) {
// @codeCoverageIgnore... | [
"public",
"function",
"read",
"(",
"$",
"length",
")",
"{",
"if",
"(",
"false",
"===",
"$",
"this",
"->",
"isReadable",
"(",
")",
")",
"{",
"throw",
"new",
"RuntimeException",
"(",
"'The current stream is not readable.'",
")",
";",
"}",
"// @todo find out how ... | {@inheritdoc}
@param int $length Read up to $length bytes from the object and return
them. Fewer than $length bytes may be returned if underlying stream
call returns fewer bytes.
@return string Returns the data read from the stream, or an empty string
if no bytes are available.
@throws \RuntimeException if an error oc... | [
"{",
"@inheritdoc",
"}"
] | train | https://github.com/fyuze/framework/blob/89b3984f7225e24bfcdafb090ee197275b3222c9/src/Fyuze/Http/Message/Stream.php#L226-L240 |
fyuze/framework | src/Fyuze/Http/Message/Stream.php | Stream.getMetadata | public function getMetadata($key = null)
{
$meta = stream_get_meta_data($this->stream);
if ($key === null) {
return $meta;
}
if (array_key_exists($key, $meta)) {
return $meta[$key];
}
return null;
} | php | public function getMetadata($key = null)
{
$meta = stream_get_meta_data($this->stream);
if ($key === null) {
return $meta;
}
if (array_key_exists($key, $meta)) {
return $meta[$key];
}
return null;
} | [
"public",
"function",
"getMetadata",
"(",
"$",
"key",
"=",
"null",
")",
"{",
"$",
"meta",
"=",
"stream_get_meta_data",
"(",
"$",
"this",
"->",
"stream",
")",
";",
"if",
"(",
"$",
"key",
"===",
"null",
")",
"{",
"return",
"$",
"meta",
";",
"}",
"if"... | {@inheritdoc}
@link http://php.net/manual/en/function.stream-get-meta-data.php
@param string $key Specific metadata to retrieve.
@return array|mixed|null Returns an associative array if no key is
provided. Returns a specific key value if a key is provided and the
value is found, or null if the key is not found. | [
"{",
"@inheritdoc",
"}"
] | train | https://github.com/fyuze/framework/blob/89b3984f7225e24bfcdafb090ee197275b3222c9/src/Fyuze/Http/Message/Stream.php#L272-L285 |
periaptio/empress-generator | src/Generators/ModelRelationshipsGenerator.php | ModelRelationshipsGenerator.detectOneToOne | private function detectOneToOne($constraint, $primaryColumns)
{
$foreignColumns = $constraint->getLocalColumns();
sort($foreignColumns);
return $primaryColumns === $foreignColumns;
} | php | private function detectOneToOne($constraint, $primaryColumns)
{
$foreignColumns = $constraint->getLocalColumns();
sort($foreignColumns);
return $primaryColumns === $foreignColumns;
} | [
"private",
"function",
"detectOneToOne",
"(",
"$",
"constraint",
",",
"$",
"primaryColumns",
")",
"{",
"$",
"foreignColumns",
"=",
"$",
"constraint",
"->",
"getLocalColumns",
"(",
")",
";",
"sort",
"(",
"$",
"foreignColumns",
")",
";",
"return",
"$",
"primar... | if FK is also a primary key, and there is only one primary key
we know this will be a one to one relationship
@param object $constraint
@param array $primaryFields
@return boolean | [
"if",
"FK",
"is",
"also",
"a",
"primary",
"key",
"and",
"there",
"is",
"only",
"one",
"primary",
"key",
"we",
"know",
"this",
"will",
"be",
"a",
"one",
"to",
"one",
"relationship"
] | train | https://github.com/periaptio/empress-generator/blob/749fb4b12755819e9c97377ebfb446ee0822168a/src/Generators/ModelRelationshipsGenerator.php#L183-L189 |
slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php | BaseRemoteApp.applyDefaultValues | public function applyDefaultValues()
{
$this->type = 'contao';
$this->api_auth_type = 'none';
$this->activated = false;
$this->includelog = false;
$this->website_hash = '';
$this->notification_recipient = '';
$this->notification_sender = '';
$this->not... | php | public function applyDefaultValues()
{
$this->type = 'contao';
$this->api_auth_type = 'none';
$this->activated = false;
$this->includelog = false;
$this->website_hash = '';
$this->notification_recipient = '';
$this->notification_sender = '';
$this->not... | [
"public",
"function",
"applyDefaultValues",
"(",
")",
"{",
"$",
"this",
"->",
"type",
"=",
"'contao'",
";",
"$",
"this",
"->",
"api_auth_type",
"=",
"'none'",
";",
"$",
"this",
"->",
"activated",
"=",
"false",
";",
"$",
"this",
"->",
"includelog",
"=",
... | Applies default values to this object.
This method should be called from the object's constructor (or
equivalent initialization method).
@see __construct() | [
"Applies",
"default",
"values",
"to",
"this",
"object",
".",
"This",
"method",
"should",
"be",
"called",
"from",
"the",
"object",
"s",
"constructor",
"(",
"or",
"equivalent",
"initialization",
"method",
")",
"."
] | train | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php#L263-L274 |
slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php | BaseRemoteApp.getLastRun | public function getLastRun($format = null)
{
if ($this->last_run === null) {
return null;
}
if ($this->last_run === '0000-00-00 00:00:00') {
// while technically this is not a default value of null,
// this seems to be closest in meaning.
retu... | php | public function getLastRun($format = null)
{
if ($this->last_run === null) {
return null;
}
if ($this->last_run === '0000-00-00 00:00:00') {
// while technically this is not a default value of null,
// this seems to be closest in meaning.
retu... | [
"public",
"function",
"getLastRun",
"(",
"$",
"format",
"=",
"null",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"last_run",
"===",
"null",
")",
"{",
"return",
"null",
";",
"}",
"if",
"(",
"$",
"this",
"->",
"last_run",
"===",
"'0000-00-00 00:00:00'",
")",... | Get the [optionally formatted] temporal [last_run] column value.
@param string $format The date/time format string (either date()-style or strftime()-style).
If format is null, then the raw DateTime object will be returned.
@return mixed Formatted date/time value as string or DateTime object (if format is null), null... | [
"Get",
"the",
"[",
"optionally",
"formatted",
"]",
"temporal",
"[",
"last_run",
"]",
"column",
"value",
"."
] | train | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php#L482-L511 |
slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php | BaseRemoteApp.setType | public function setType($v)
{
if ($v !== null) {
$v = (string) $v;
}
if ($this->type !== $v) {
$this->type = $v;
$this->modifiedColumns[] = RemoteAppPeer::TYPE;
}
return $this;
} | php | public function setType($v)
{
if ($v !== null) {
$v = (string) $v;
}
if ($this->type !== $v) {
$this->type = $v;
$this->modifiedColumns[] = RemoteAppPeer::TYPE;
}
return $this;
} | [
"public",
"function",
"setType",
"(",
"$",
"v",
")",
"{",
"if",
"(",
"$",
"v",
"!==",
"null",
")",
"{",
"$",
"v",
"=",
"(",
"string",
")",
"$",
"v",
";",
"}",
"if",
"(",
"$",
"this",
"->",
"type",
"!==",
"$",
"v",
")",
"{",
"$",
"this",
"... | Set the value of [type] column.
@param string $v new value
@return RemoteApp The current object (for fluent API support) | [
"Set",
"the",
"value",
"of",
"[",
"type",
"]",
"column",
"."
] | train | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php#L617-L630 |
slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php | BaseRemoteApp.setDomain | public function setDomain($v)
{
if ($v !== null) {
$v = (string) $v;
}
if ($this->domain !== $v) {
$this->domain = $v;
$this->modifiedColumns[] = RemoteAppPeer::DOMAIN;
}
return $this;
} | php | public function setDomain($v)
{
if ($v !== null) {
$v = (string) $v;
}
if ($this->domain !== $v) {
$this->domain = $v;
$this->modifiedColumns[] = RemoteAppPeer::DOMAIN;
}
return $this;
} | [
"public",
"function",
"setDomain",
"(",
"$",
"v",
")",
"{",
"if",
"(",
"$",
"v",
"!==",
"null",
")",
"{",
"$",
"v",
"=",
"(",
"string",
")",
"$",
"v",
";",
"}",
"if",
"(",
"$",
"this",
"->",
"domain",
"!==",
"$",
"v",
")",
"{",
"$",
"this",... | Set the value of [domain] column.
@param string $v new value
@return RemoteApp The current object (for fluent API support) | [
"Set",
"the",
"value",
"of",
"[",
"domain",
"]",
"column",
"."
] | train | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php#L659-L672 |
slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php | BaseRemoteApp.setApiUrl | public function setApiUrl($v)
{
if ($v !== null) {
$v = (string) $v;
}
if ($this->api_url !== $v) {
$this->api_url = $v;
$this->modifiedColumns[] = RemoteAppPeer::API_URL;
}
return $this;
} | php | public function setApiUrl($v)
{
if ($v !== null) {
$v = (string) $v;
}
if ($this->api_url !== $v) {
$this->api_url = $v;
$this->modifiedColumns[] = RemoteAppPeer::API_URL;
}
return $this;
} | [
"public",
"function",
"setApiUrl",
"(",
"$",
"v",
")",
"{",
"if",
"(",
"$",
"v",
"!==",
"null",
")",
"{",
"$",
"v",
"=",
"(",
"string",
")",
"$",
"v",
";",
"}",
"if",
"(",
"$",
"this",
"->",
"api_url",
"!==",
"$",
"v",
")",
"{",
"$",
"this"... | Set the value of [api_url] column.
@param string $v new value
@return RemoteApp The current object (for fluent API support) | [
"Set",
"the",
"value",
"of",
"[",
"api_url",
"]",
"column",
"."
] | train | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php#L680-L693 |
slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php | BaseRemoteApp.setApiAuthHttpUser | public function setApiAuthHttpUser($v)
{
if ($v !== null) {
$v = (string) $v;
}
if ($this->api_auth_http_user !== $v) {
$this->api_auth_http_user = $v;
$this->modifiedColumns[] = RemoteAppPeer::API_AUTH_HTTP_USER;
}
return $this;
} | php | public function setApiAuthHttpUser($v)
{
if ($v !== null) {
$v = (string) $v;
}
if ($this->api_auth_http_user !== $v) {
$this->api_auth_http_user = $v;
$this->modifiedColumns[] = RemoteAppPeer::API_AUTH_HTTP_USER;
}
return $this;
} | [
"public",
"function",
"setApiAuthHttpUser",
"(",
"$",
"v",
")",
"{",
"if",
"(",
"$",
"v",
"!==",
"null",
")",
"{",
"$",
"v",
"=",
"(",
"string",
")",
"$",
"v",
";",
"}",
"if",
"(",
"$",
"this",
"->",
"api_auth_http_user",
"!==",
"$",
"v",
")",
... | Set the value of [api_auth_http_user] column.
@param string $v new value
@return RemoteApp The current object (for fluent API support) | [
"Set",
"the",
"value",
"of",
"[",
"api_auth_http_user",
"]",
"column",
"."
] | train | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php#L701-L714 |
slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php | BaseRemoteApp.setApiAuthHttpPassword | public function setApiAuthHttpPassword($v)
{
if ($v !== null) {
$v = (string) $v;
}
if ($this->api_auth_http_password !== $v) {
$this->api_auth_http_password = $v;
$this->modifiedColumns[] = RemoteAppPeer::API_AUTH_HTTP_PASSWORD;
}
retur... | php | public function setApiAuthHttpPassword($v)
{
if ($v !== null) {
$v = (string) $v;
}
if ($this->api_auth_http_password !== $v) {
$this->api_auth_http_password = $v;
$this->modifiedColumns[] = RemoteAppPeer::API_AUTH_HTTP_PASSWORD;
}
retur... | [
"public",
"function",
"setApiAuthHttpPassword",
"(",
"$",
"v",
")",
"{",
"if",
"(",
"$",
"v",
"!==",
"null",
")",
"{",
"$",
"v",
"=",
"(",
"string",
")",
"$",
"v",
";",
"}",
"if",
"(",
"$",
"this",
"->",
"api_auth_http_password",
"!==",
"$",
"v",
... | Set the value of [api_auth_http_password] column.
@param string $v new value
@return RemoteApp The current object (for fluent API support) | [
"Set",
"the",
"value",
"of",
"[",
"api_auth_http_password",
"]",
"column",
"."
] | train | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php#L722-L735 |
slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php | BaseRemoteApp.setApiAuthType | public function setApiAuthType($v)
{
if ($v !== null) {
$v = (string) $v;
}
if ($this->api_auth_type !== $v) {
$this->api_auth_type = $v;
$this->modifiedColumns[] = RemoteAppPeer::API_AUTH_TYPE;
}
return $this;
} | php | public function setApiAuthType($v)
{
if ($v !== null) {
$v = (string) $v;
}
if ($this->api_auth_type !== $v) {
$this->api_auth_type = $v;
$this->modifiedColumns[] = RemoteAppPeer::API_AUTH_TYPE;
}
return $this;
} | [
"public",
"function",
"setApiAuthType",
"(",
"$",
"v",
")",
"{",
"if",
"(",
"$",
"v",
"!==",
"null",
")",
"{",
"$",
"v",
"=",
"(",
"string",
")",
"$",
"v",
";",
"}",
"if",
"(",
"$",
"this",
"->",
"api_auth_type",
"!==",
"$",
"v",
")",
"{",
"$... | Set the value of [api_auth_type] column.
@param string $v new value
@return RemoteApp The current object (for fluent API support) | [
"Set",
"the",
"value",
"of",
"[",
"api_auth_type",
"]",
"column",
"."
] | train | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php#L743-L756 |
slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php | BaseRemoteApp.setApiAuthUser | public function setApiAuthUser($v)
{
if ($v !== null) {
$v = (string) $v;
}
if ($this->api_auth_user !== $v) {
$this->api_auth_user = $v;
$this->modifiedColumns[] = RemoteAppPeer::API_AUTH_USER;
}
return $this;
} | php | public function setApiAuthUser($v)
{
if ($v !== null) {
$v = (string) $v;
}
if ($this->api_auth_user !== $v) {
$this->api_auth_user = $v;
$this->modifiedColumns[] = RemoteAppPeer::API_AUTH_USER;
}
return $this;
} | [
"public",
"function",
"setApiAuthUser",
"(",
"$",
"v",
")",
"{",
"if",
"(",
"$",
"v",
"!==",
"null",
")",
"{",
"$",
"v",
"=",
"(",
"string",
")",
"$",
"v",
";",
"}",
"if",
"(",
"$",
"this",
"->",
"api_auth_user",
"!==",
"$",
"v",
")",
"{",
"$... | Set the value of [api_auth_user] column.
@param string $v new value
@return RemoteApp The current object (for fluent API support) | [
"Set",
"the",
"value",
"of",
"[",
"api_auth_user",
"]",
"column",
"."
] | train | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php#L764-L777 |
slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php | BaseRemoteApp.setApiAuthPassword | public function setApiAuthPassword($v)
{
if ($v !== null) {
$v = (string) $v;
}
if ($this->api_auth_password !== $v) {
$this->api_auth_password = $v;
$this->modifiedColumns[] = RemoteAppPeer::API_AUTH_PASSWORD;
}
return $this;
} | php | public function setApiAuthPassword($v)
{
if ($v !== null) {
$v = (string) $v;
}
if ($this->api_auth_password !== $v) {
$this->api_auth_password = $v;
$this->modifiedColumns[] = RemoteAppPeer::API_AUTH_PASSWORD;
}
return $this;
} | [
"public",
"function",
"setApiAuthPassword",
"(",
"$",
"v",
")",
"{",
"if",
"(",
"$",
"v",
"!==",
"null",
")",
"{",
"$",
"v",
"=",
"(",
"string",
")",
"$",
"v",
";",
"}",
"if",
"(",
"$",
"this",
"->",
"api_auth_password",
"!==",
"$",
"v",
")",
"... | Set the value of [api_auth_password] column.
@param string $v new value
@return RemoteApp The current object (for fluent API support) | [
"Set",
"the",
"value",
"of",
"[",
"api_auth_password",
"]",
"column",
"."
] | train | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php#L785-L798 |
slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php | BaseRemoteApp.setApiAuthToken | public function setApiAuthToken($v)
{
if ($v !== null) {
$v = (string) $v;
}
if ($this->api_auth_token !== $v) {
$this->api_auth_token = $v;
$this->modifiedColumns[] = RemoteAppPeer::API_AUTH_TOKEN;
}
return $this;
} | php | public function setApiAuthToken($v)
{
if ($v !== null) {
$v = (string) $v;
}
if ($this->api_auth_token !== $v) {
$this->api_auth_token = $v;
$this->modifiedColumns[] = RemoteAppPeer::API_AUTH_TOKEN;
}
return $this;
} | [
"public",
"function",
"setApiAuthToken",
"(",
"$",
"v",
")",
"{",
"if",
"(",
"$",
"v",
"!==",
"null",
")",
"{",
"$",
"v",
"=",
"(",
"string",
")",
"$",
"v",
";",
"}",
"if",
"(",
"$",
"this",
"->",
"api_auth_token",
"!==",
"$",
"v",
")",
"{",
... | Set the value of [api_auth_token] column.
@param string $v new value
@return RemoteApp The current object (for fluent API support) | [
"Set",
"the",
"value",
"of",
"[",
"api_auth_token",
"]",
"column",
"."
] | train | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php#L806-L819 |
slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php | BaseRemoteApp.setApiAuthUrlUserKey | public function setApiAuthUrlUserKey($v)
{
if ($v !== null) {
$v = (string) $v;
}
if ($this->api_auth_url_user_key !== $v) {
$this->api_auth_url_user_key = $v;
$this->modifiedColumns[] = RemoteAppPeer::API_AUTH_URL_USER_KEY;
}
return $th... | php | public function setApiAuthUrlUserKey($v)
{
if ($v !== null) {
$v = (string) $v;
}
if ($this->api_auth_url_user_key !== $v) {
$this->api_auth_url_user_key = $v;
$this->modifiedColumns[] = RemoteAppPeer::API_AUTH_URL_USER_KEY;
}
return $th... | [
"public",
"function",
"setApiAuthUrlUserKey",
"(",
"$",
"v",
")",
"{",
"if",
"(",
"$",
"v",
"!==",
"null",
")",
"{",
"$",
"v",
"=",
"(",
"string",
")",
"$",
"v",
";",
"}",
"if",
"(",
"$",
"this",
"->",
"api_auth_url_user_key",
"!==",
"$",
"v",
")... | Set the value of [api_auth_url_user_key] column.
@param string $v new value
@return RemoteApp The current object (for fluent API support) | [
"Set",
"the",
"value",
"of",
"[",
"api_auth_url_user_key",
"]",
"column",
"."
] | train | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php#L827-L840 |
slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php | BaseRemoteApp.setApiAuthUrlPwKey | public function setApiAuthUrlPwKey($v)
{
if ($v !== null) {
$v = (string) $v;
}
if ($this->api_auth_url_pw_key !== $v) {
$this->api_auth_url_pw_key = $v;
$this->modifiedColumns[] = RemoteAppPeer::API_AUTH_URL_PW_KEY;
}
return $this;
... | php | public function setApiAuthUrlPwKey($v)
{
if ($v !== null) {
$v = (string) $v;
}
if ($this->api_auth_url_pw_key !== $v) {
$this->api_auth_url_pw_key = $v;
$this->modifiedColumns[] = RemoteAppPeer::API_AUTH_URL_PW_KEY;
}
return $this;
... | [
"public",
"function",
"setApiAuthUrlPwKey",
"(",
"$",
"v",
")",
"{",
"if",
"(",
"$",
"v",
"!==",
"null",
")",
"{",
"$",
"v",
"=",
"(",
"string",
")",
"$",
"v",
";",
"}",
"if",
"(",
"$",
"this",
"->",
"api_auth_url_pw_key",
"!==",
"$",
"v",
")",
... | Set the value of [api_auth_url_pw_key] column.
@param string $v new value
@return RemoteApp The current object (for fluent API support) | [
"Set",
"the",
"value",
"of",
"[",
"api_auth_url_pw_key",
"]",
"column",
"."
] | train | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php#L848-L861 |
slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php | BaseRemoteApp.setCron | public function setCron($v)
{
if ($v !== null) {
$v = (string) $v;
}
if ($this->cron !== $v) {
$this->cron = $v;
$this->modifiedColumns[] = RemoteAppPeer::CRON;
}
return $this;
} | php | public function setCron($v)
{
if ($v !== null) {
$v = (string) $v;
}
if ($this->cron !== $v) {
$this->cron = $v;
$this->modifiedColumns[] = RemoteAppPeer::CRON;
}
return $this;
} | [
"public",
"function",
"setCron",
"(",
"$",
"v",
")",
"{",
"if",
"(",
"$",
"v",
"!==",
"null",
")",
"{",
"$",
"v",
"=",
"(",
"string",
")",
"$",
"v",
";",
"}",
"if",
"(",
"$",
"this",
"->",
"cron",
"!==",
"$",
"v",
")",
"{",
"$",
"this",
"... | Set the value of [cron] column.
@param string $v new value
@return RemoteApp The current object (for fluent API support) | [
"Set",
"the",
"value",
"of",
"[",
"cron",
"]",
"column",
"."
] | train | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php#L869-L882 |
slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php | BaseRemoteApp.setCustomerId | public function setCustomerId($v)
{
if ($v !== null && is_numeric($v)) {
$v = (int) $v;
}
if ($this->customer_id !== $v) {
$this->customer_id = $v;
$this->modifiedColumns[] = RemoteAppPeer::CUSTOMER_ID;
}
if ($this->aCustomer !== null && ... | php | public function setCustomerId($v)
{
if ($v !== null && is_numeric($v)) {
$v = (int) $v;
}
if ($this->customer_id !== $v) {
$this->customer_id = $v;
$this->modifiedColumns[] = RemoteAppPeer::CUSTOMER_ID;
}
if ($this->aCustomer !== null && ... | [
"public",
"function",
"setCustomerId",
"(",
"$",
"v",
")",
"{",
"if",
"(",
"$",
"v",
"!==",
"null",
"&&",
"is_numeric",
"(",
"$",
"v",
")",
")",
"{",
"$",
"v",
"=",
"(",
"int",
")",
"$",
"v",
";",
"}",
"if",
"(",
"$",
"this",
"->",
"customer_... | Set the value of [customer_id] column.
@param int $v new value
@return RemoteApp The current object (for fluent API support) | [
"Set",
"the",
"value",
"of",
"[",
"customer_id",
"]",
"column",
"."
] | train | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php#L890-L907 |
slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php | BaseRemoteApp.setActivated | public function setActivated($v)
{
if ($v !== null) {
if (is_string($v)) {
$v = in_array(strtolower($v), array('false', 'off', '-', 'no', 'n', '0', '')) ? false : true;
} else {
$v = (boolean) $v;
}
}
if ($this->activated !... | php | public function setActivated($v)
{
if ($v !== null) {
if (is_string($v)) {
$v = in_array(strtolower($v), array('false', 'off', '-', 'no', 'n', '0', '')) ? false : true;
} else {
$v = (boolean) $v;
}
}
if ($this->activated !... | [
"public",
"function",
"setActivated",
"(",
"$",
"v",
")",
"{",
"if",
"(",
"$",
"v",
"!==",
"null",
")",
"{",
"if",
"(",
"is_string",
"(",
"$",
"v",
")",
")",
"{",
"$",
"v",
"=",
"in_array",
"(",
"strtolower",
"(",
"$",
"v",
")",
",",
"array",
... | Sets the value of the [activated] column.
Non-boolean arguments are converted using the following rules:
* 1, '1', 'true', 'on', and 'yes' are converted to boolean true
* 0, '0', 'false', 'off', and 'no' are converted to boolean false
Check on string values is case insensitive (so 'FaLsE' is seen as 'false').
@para... | [
"Sets",
"the",
"value",
"of",
"the",
"[",
"activated",
"]",
"column",
".",
"Non",
"-",
"boolean",
"arguments",
"are",
"converted",
"using",
"the",
"following",
"rules",
":",
"*",
"1",
"1",
"true",
"on",
"and",
"yes",
"are",
"converted",
"to",
"boolean",
... | train | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php#L919-L936 |
slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php | BaseRemoteApp.setNotes | public function setNotes($v)
{
if ($v !== null) {
$v = (string) $v;
}
if ($this->notes !== $v) {
$this->notes = $v;
$this->modifiedColumns[] = RemoteAppPeer::NOTES;
}
return $this;
} | php | public function setNotes($v)
{
if ($v !== null) {
$v = (string) $v;
}
if ($this->notes !== $v) {
$this->notes = $v;
$this->modifiedColumns[] = RemoteAppPeer::NOTES;
}
return $this;
} | [
"public",
"function",
"setNotes",
"(",
"$",
"v",
")",
"{",
"if",
"(",
"$",
"v",
"!==",
"null",
")",
"{",
"$",
"v",
"=",
"(",
"string",
")",
"$",
"v",
";",
"}",
"if",
"(",
"$",
"this",
"->",
"notes",
"!==",
"$",
"v",
")",
"{",
"$",
"this",
... | Set the value of [notes] column.
@param string $v new value
@return RemoteApp The current object (for fluent API support) | [
"Set",
"the",
"value",
"of",
"[",
"notes",
"]",
"column",
"."
] | train | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php#L944-L957 |
slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php | BaseRemoteApp.setLastRun | public function setLastRun($v)
{
$dt = PropelDateTime::newInstance($v, null, 'DateTime');
if ($this->last_run !== null || $dt !== null) {
$currentDateAsString = ($this->last_run !== null && $tmpDt = new DateTime($this->last_run)) ? $tmpDt->format('Y-m-d H:i:s') : null;
$newDa... | php | public function setLastRun($v)
{
$dt = PropelDateTime::newInstance($v, null, 'DateTime');
if ($this->last_run !== null || $dt !== null) {
$currentDateAsString = ($this->last_run !== null && $tmpDt = new DateTime($this->last_run)) ? $tmpDt->format('Y-m-d H:i:s') : null;
$newDa... | [
"public",
"function",
"setLastRun",
"(",
"$",
"v",
")",
"{",
"$",
"dt",
"=",
"PropelDateTime",
"::",
"newInstance",
"(",
"$",
"v",
",",
"null",
",",
"'DateTime'",
")",
";",
"if",
"(",
"$",
"this",
"->",
"last_run",
"!==",
"null",
"||",
"$",
"dt",
"... | Sets the value of [last_run] column to a normalized version of the date/time value specified.
@param mixed $v string, integer (timestamp), or DateTime value.
Empty strings are treated as null.
@return RemoteApp The current object (for fluent API support) | [
"Sets",
"the",
"value",
"of",
"[",
"last_run",
"]",
"column",
"to",
"a",
"normalized",
"version",
"of",
"the",
"date",
"/",
"time",
"value",
"specified",
"."
] | train | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php#L966-L980 |
slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php | BaseRemoteApp.setIncludelog | public function setIncludelog($v)
{
if ($v !== null) {
if (is_string($v)) {
$v = in_array(strtolower($v), array('false', 'off', '-', 'no', 'n', '0', '')) ? false : true;
} else {
$v = (boolean) $v;
}
}
if ($this->includelog... | php | public function setIncludelog($v)
{
if ($v !== null) {
if (is_string($v)) {
$v = in_array(strtolower($v), array('false', 'off', '-', 'no', 'n', '0', '')) ? false : true;
} else {
$v = (boolean) $v;
}
}
if ($this->includelog... | [
"public",
"function",
"setIncludelog",
"(",
"$",
"v",
")",
"{",
"if",
"(",
"$",
"v",
"!==",
"null",
")",
"{",
"if",
"(",
"is_string",
"(",
"$",
"v",
")",
")",
"{",
"$",
"v",
"=",
"in_array",
"(",
"strtolower",
"(",
"$",
"v",
")",
",",
"array",
... | Sets the value of the [includelog] column.
Non-boolean arguments are converted using the following rules:
* 1, '1', 'true', 'on', and 'yes' are converted to boolean true
* 0, '0', 'false', 'off', and 'no' are converted to boolean false
Check on string values is case insensitive (so 'FaLsE' is seen as 'false').
@par... | [
"Sets",
"the",
"value",
"of",
"the",
"[",
"includelog",
"]",
"column",
".",
"Non",
"-",
"boolean",
"arguments",
"are",
"converted",
"using",
"the",
"following",
"rules",
":",
"*",
"1",
"1",
"true",
"on",
"and",
"yes",
"are",
"converted",
"to",
"boolean",... | train | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php#L992-L1009 |
slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php | BaseRemoteApp.setPublicKey | public function setPublicKey($v)
{
if ($v !== null) {
$v = (string) $v;
}
if ($this->public_key !== $v) {
$this->public_key = $v;
$this->modifiedColumns[] = RemoteAppPeer::PUBLIC_KEY;
}
return $this;
} | php | public function setPublicKey($v)
{
if ($v !== null) {
$v = (string) $v;
}
if ($this->public_key !== $v) {
$this->public_key = $v;
$this->modifiedColumns[] = RemoteAppPeer::PUBLIC_KEY;
}
return $this;
} | [
"public",
"function",
"setPublicKey",
"(",
"$",
"v",
")",
"{",
"if",
"(",
"$",
"v",
"!==",
"null",
")",
"{",
"$",
"v",
"=",
"(",
"string",
")",
"$",
"v",
";",
"}",
"if",
"(",
"$",
"this",
"->",
"public_key",
"!==",
"$",
"v",
")",
"{",
"$",
... | Set the value of [public_key] column.
@param string $v new value
@return RemoteApp The current object (for fluent API support) | [
"Set",
"the",
"value",
"of",
"[",
"public_key",
"]",
"column",
"."
] | train | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php#L1017-L1030 |
slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php | BaseRemoteApp.setWebsiteHash | public function setWebsiteHash($v)
{
if ($v !== null) {
$v = (string) $v;
}
if ($this->website_hash !== $v) {
$this->website_hash = $v;
$this->modifiedColumns[] = RemoteAppPeer::WEBSITE_HASH;
}
return $this;
} | php | public function setWebsiteHash($v)
{
if ($v !== null) {
$v = (string) $v;
}
if ($this->website_hash !== $v) {
$this->website_hash = $v;
$this->modifiedColumns[] = RemoteAppPeer::WEBSITE_HASH;
}
return $this;
} | [
"public",
"function",
"setWebsiteHash",
"(",
"$",
"v",
")",
"{",
"if",
"(",
"$",
"v",
"!==",
"null",
")",
"{",
"$",
"v",
"=",
"(",
"string",
")",
"$",
"v",
";",
"}",
"if",
"(",
"$",
"this",
"->",
"website_hash",
"!==",
"$",
"v",
")",
"{",
"$"... | Set the value of [website_hash] column.
@param string $v new value
@return RemoteApp The current object (for fluent API support) | [
"Set",
"the",
"value",
"of",
"[",
"website_hash",
"]",
"column",
"."
] | train | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php#L1038-L1051 |
slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php | BaseRemoteApp.setNotificationRecipient | public function setNotificationRecipient($v)
{
if ($v !== null) {
$v = (string) $v;
}
if ($this->notification_recipient !== $v) {
$this->notification_recipient = $v;
$this->modifiedColumns[] = RemoteAppPeer::NOTIFICATION_RECIPIENT;
}
ret... | php | public function setNotificationRecipient($v)
{
if ($v !== null) {
$v = (string) $v;
}
if ($this->notification_recipient !== $v) {
$this->notification_recipient = $v;
$this->modifiedColumns[] = RemoteAppPeer::NOTIFICATION_RECIPIENT;
}
ret... | [
"public",
"function",
"setNotificationRecipient",
"(",
"$",
"v",
")",
"{",
"if",
"(",
"$",
"v",
"!==",
"null",
")",
"{",
"$",
"v",
"=",
"(",
"string",
")",
"$",
"v",
";",
"}",
"if",
"(",
"$",
"this",
"->",
"notification_recipient",
"!==",
"$",
"v",... | Set the value of [notification_recipient] column.
@param string $v new value
@return RemoteApp The current object (for fluent API support) | [
"Set",
"the",
"value",
"of",
"[",
"notification_recipient",
"]",
"column",
"."
] | train | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php#L1059-L1072 |
slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php | BaseRemoteApp.setNotificationSender | public function setNotificationSender($v)
{
if ($v !== null) {
$v = (string) $v;
}
if ($this->notification_sender !== $v) {
$this->notification_sender = $v;
$this->modifiedColumns[] = RemoteAppPeer::NOTIFICATION_SENDER;
}
return $this;
... | php | public function setNotificationSender($v)
{
if ($v !== null) {
$v = (string) $v;
}
if ($this->notification_sender !== $v) {
$this->notification_sender = $v;
$this->modifiedColumns[] = RemoteAppPeer::NOTIFICATION_SENDER;
}
return $this;
... | [
"public",
"function",
"setNotificationSender",
"(",
"$",
"v",
")",
"{",
"if",
"(",
"$",
"v",
"!==",
"null",
")",
"{",
"$",
"v",
"=",
"(",
"string",
")",
"$",
"v",
";",
"}",
"if",
"(",
"$",
"this",
"->",
"notification_sender",
"!==",
"$",
"v",
")"... | Set the value of [notification_sender] column.
@param string $v new value
@return RemoteApp The current object (for fluent API support) | [
"Set",
"the",
"value",
"of",
"[",
"notification_sender",
"]",
"column",
"."
] | train | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php#L1080-L1093 |
slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php | BaseRemoteApp.setNotificationChange | public function setNotificationChange($v)
{
if ($v !== null) {
if (is_string($v)) {
$v = in_array(strtolower($v), array('false', 'off', '-', 'no', 'n', '0', '')) ? false : true;
} else {
$v = (boolean) $v;
}
}
if ($this->no... | php | public function setNotificationChange($v)
{
if ($v !== null) {
if (is_string($v)) {
$v = in_array(strtolower($v), array('false', 'off', '-', 'no', 'n', '0', '')) ? false : true;
} else {
$v = (boolean) $v;
}
}
if ($this->no... | [
"public",
"function",
"setNotificationChange",
"(",
"$",
"v",
")",
"{",
"if",
"(",
"$",
"v",
"!==",
"null",
")",
"{",
"if",
"(",
"is_string",
"(",
"$",
"v",
")",
")",
"{",
"$",
"v",
"=",
"in_array",
"(",
"strtolower",
"(",
"$",
"v",
")",
",",
"... | Sets the value of the [notification_change] column.
Non-boolean arguments are converted using the following rules:
* 1, '1', 'true', 'on', and 'yes' are converted to boolean true
* 0, '0', 'false', 'off', and 'no' are converted to boolean false
Check on string values is case insensitive (so 'FaLsE' is seen as 'false... | [
"Sets",
"the",
"value",
"of",
"the",
"[",
"notification_change",
"]",
"column",
".",
"Non",
"-",
"boolean",
"arguments",
"are",
"converted",
"using",
"the",
"following",
"rules",
":",
"*",
"1",
"1",
"true",
"on",
"and",
"yes",
"are",
"converted",
"to",
"... | train | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php#L1105-L1122 |
slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php | BaseRemoteApp.setNotificationError | public function setNotificationError($v)
{
if ($v !== null) {
if (is_string($v)) {
$v = in_array(strtolower($v), array('false', 'off', '-', 'no', 'n', '0', '')) ? false : true;
} else {
$v = (boolean) $v;
}
}
if ($this->not... | php | public function setNotificationError($v)
{
if ($v !== null) {
if (is_string($v)) {
$v = in_array(strtolower($v), array('false', 'off', '-', 'no', 'n', '0', '')) ? false : true;
} else {
$v = (boolean) $v;
}
}
if ($this->not... | [
"public",
"function",
"setNotificationError",
"(",
"$",
"v",
")",
"{",
"if",
"(",
"$",
"v",
"!==",
"null",
")",
"{",
"if",
"(",
"is_string",
"(",
"$",
"v",
")",
")",
"{",
"$",
"v",
"=",
"in_array",
"(",
"strtolower",
"(",
"$",
"v",
")",
",",
"a... | Sets the value of the [notification_error] column.
Non-boolean arguments are converted using the following rules:
* 1, '1', 'true', 'on', and 'yes' are converted to boolean true
* 0, '0', 'false', 'off', and 'no' are converted to boolean false
Check on string values is case insensitive (so 'FaLsE' is seen as 'false'... | [
"Sets",
"the",
"value",
"of",
"the",
"[",
"notification_error",
"]",
"column",
".",
"Non",
"-",
"boolean",
"arguments",
"are",
"converted",
"using",
"the",
"following",
"rules",
":",
"*",
"1",
"1",
"true",
"on",
"and",
"yes",
"are",
"converted",
"to",
"b... | train | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php#L1134-L1151 |
slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php | BaseRemoteApp.hasOnlyDefaultValues | public function hasOnlyDefaultValues()
{
if ($this->type !== 'contao') {
return false;
}
if ($this->api_auth_type !== 'none') {
return false;
}
if ($this->activated !== false) {
return false;
}
... | php | public function hasOnlyDefaultValues()
{
if ($this->type !== 'contao') {
return false;
}
if ($this->api_auth_type !== 'none') {
return false;
}
if ($this->activated !== false) {
return false;
}
... | [
"public",
"function",
"hasOnlyDefaultValues",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"type",
"!==",
"'contao'",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"$",
"this",
"->",
"api_auth_type",
"!==",
"'none'",
")",
"{",
"return",
"false",
";... | Indicates whether the columns in this object are only set to default values.
This method can be used in conjunction with isModified() to indicate whether an object is both
modified _and_ has some values set which are non-default.
@return boolean Whether the columns in this object are only been set with default values... | [
"Indicates",
"whether",
"the",
"columns",
"in",
"this",
"object",
"are",
"only",
"set",
"to",
"default",
"values",
"."
] | train | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php#L1161-L1201 |
slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php | BaseRemoteApp.hydrate | public function hydrate($row, $startcol = 0, $rehydrate = false)
{
try {
$this->id = ($row[$startcol + 0] !== null) ? (int) $row[$startcol + 0] : null;
$this->type = ($row[$startcol + 1] !== null) ? (string) $row[$startcol + 1] : null;
$this->name = ($row[$startcol + 2] ... | php | public function hydrate($row, $startcol = 0, $rehydrate = false)
{
try {
$this->id = ($row[$startcol + 0] !== null) ? (int) $row[$startcol + 0] : null;
$this->type = ($row[$startcol + 1] !== null) ? (string) $row[$startcol + 1] : null;
$this->name = ($row[$startcol + 2] ... | [
"public",
"function",
"hydrate",
"(",
"$",
"row",
",",
"$",
"startcol",
"=",
"0",
",",
"$",
"rehydrate",
"=",
"false",
")",
"{",
"try",
"{",
"$",
"this",
"->",
"id",
"=",
"(",
"$",
"row",
"[",
"$",
"startcol",
"+",
"0",
"]",
"!==",
"null",
")",... | Hydrates (populates) the object variables with values from the database resultset.
An offset (0-based "start column") is specified so that objects can be hydrated
with a subset of the columns in the resultset rows. This is needed, for example,
for results of JOIN queries where the resultset row includes columns from ... | [
"Hydrates",
"(",
"populates",
")",
"the",
"object",
"variables",
"with",
"values",
"from",
"the",
"database",
"resultset",
"."
] | train | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php#L1217-L1260 |
slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php | BaseRemoteApp.ensureConsistency | public function ensureConsistency()
{
if ($this->aCustomer !== null && $this->customer_id !== $this->aCustomer->getId()) {
$this->aCustomer = null;
}
} | php | public function ensureConsistency()
{
if ($this->aCustomer !== null && $this->customer_id !== $this->aCustomer->getId()) {
$this->aCustomer = null;
}
} | [
"public",
"function",
"ensureConsistency",
"(",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"aCustomer",
"!==",
"null",
"&&",
"$",
"this",
"->",
"customer_id",
"!==",
"$",
"this",
"->",
"aCustomer",
"->",
"getId",
"(",
")",
")",
"{",
"$",
"this",
"->",
"... | Checks and repairs the internal consistency of the object.
This method is executed after an already-instantiated object is re-hydrated
from the database. It exists to check any foreign keys to make sure that
the objects related to the current object are correct based on foreign key.
You can override this method in t... | [
"Checks",
"and",
"repairs",
"the",
"internal",
"consistency",
"of",
"the",
"object",
"."
] | train | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php#L1275-L1281 |
slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php | BaseRemoteApp.doSave | protected function doSave(PropelPDO $con)
{
$affectedRows = 0; // initialize var to track total num of affected rows
if (!$this->alreadyInSave) {
$this->alreadyInSave = true;
// We call the save method on the following object(s) if they
// were passed to this obj... | php | protected function doSave(PropelPDO $con)
{
$affectedRows = 0; // initialize var to track total num of affected rows
if (!$this->alreadyInSave) {
$this->alreadyInSave = true;
// We call the save method on the following object(s) if they
// were passed to this obj... | [
"protected",
"function",
"doSave",
"(",
"PropelPDO",
"$",
"con",
")",
"{",
"$",
"affectedRows",
"=",
"0",
";",
"// initialize var to track total num of affected rows",
"if",
"(",
"!",
"$",
"this",
"->",
"alreadyInSave",
")",
"{",
"$",
"this",
"->",
"alreadyInSav... | Performs the work of inserting or updating the row in the database.
If the object is new, it inserts it; otherwise an update is performed.
All related objects are also updated in this method.
@param PropelPDO $con
@return int The number of rows affected by this insert/update and any referring fk objects' ... | [
"Performs",
"the",
"work",
"of",
"inserting",
"or",
"updating",
"the",
"row",
"in",
"the",
"database",
"."
] | train | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php#L1432-L1500 |
slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php | BaseRemoteApp.doInsert | protected function doInsert(PropelPDO $con)
{
$modifiedColumns = array();
$index = 0;
$this->modifiedColumns[] = RemoteAppPeer::ID;
if (null !== $this->id) {
throw new PropelException('Cannot insert a value for auto-increment primary key (' . RemoteAppPeer::ID . ')');
... | php | protected function doInsert(PropelPDO $con)
{
$modifiedColumns = array();
$index = 0;
$this->modifiedColumns[] = RemoteAppPeer::ID;
if (null !== $this->id) {
throw new PropelException('Cannot insert a value for auto-increment primary key (' . RemoteAppPeer::ID . ')');
... | [
"protected",
"function",
"doInsert",
"(",
"PropelPDO",
"$",
"con",
")",
"{",
"$",
"modifiedColumns",
"=",
"array",
"(",
")",
";",
"$",
"index",
"=",
"0",
";",
"$",
"this",
"->",
"modifiedColumns",
"[",
"]",
"=",
"RemoteAppPeer",
"::",
"ID",
";",
"if",
... | Insert the row in the database.
@param PropelPDO $con
@throws PropelException
@see doSave() | [
"Insert",
"the",
"row",
"in",
"the",
"database",
"."
] | train | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php#L1510-L1698 |
slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php | BaseRemoteApp.doValidate | protected function doValidate($columns = null)
{
if (!$this->alreadyInValidation) {
$this->alreadyInValidation = true;
$retval = null;
$failureMap = array();
// We call the validate method on the following object(s) if they
// were passed to thi... | php | protected function doValidate($columns = null)
{
if (!$this->alreadyInValidation) {
$this->alreadyInValidation = true;
$retval = null;
$failureMap = array();
// We call the validate method on the following object(s) if they
// were passed to thi... | [
"protected",
"function",
"doValidate",
"(",
"$",
"columns",
"=",
"null",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"alreadyInValidation",
")",
"{",
"$",
"this",
"->",
"alreadyInValidation",
"=",
"true",
";",
"$",
"retval",
"=",
"null",
";",
"$",
"fa... | This function performs the validation work for complex object models.
In addition to checking the current object, all related objects will
also be validated. If all pass then <code>true</code> is returned; otherwise
an aggregated array of ValidationFailed objects will be returned.
@param array $columns Array of colu... | [
"This",
"function",
"performs",
"the",
"validation",
"work",
"for",
"complex",
"object",
"models",
"."
] | train | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php#L1767-L1814 |
slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php | BaseRemoteApp.getByPosition | public function getByPosition($pos)
{
switch ($pos) {
case 0:
return $this->getId();
break;
case 1:
return $this->getType();
break;
case 2:
return $this->getName();
break;
... | php | public function getByPosition($pos)
{
switch ($pos) {
case 0:
return $this->getId();
break;
case 1:
return $this->getType();
break;
case 2:
return $this->getName();
break;
... | [
"public",
"function",
"getByPosition",
"(",
"$",
"pos",
")",
"{",
"switch",
"(",
"$",
"pos",
")",
"{",
"case",
"0",
":",
"return",
"$",
"this",
"->",
"getId",
"(",
")",
";",
"break",
";",
"case",
"1",
":",
"return",
"$",
"this",
"->",
"getType",
... | Retrieves a field from the object by Position as specified in the xml schema.
Zero-based.
@param int $pos position in xml schema
@return mixed Value of field at $pos | [
"Retrieves",
"a",
"field",
"from",
"the",
"object",
"by",
"Position",
"as",
"specified",
"in",
"the",
"xml",
"schema",
".",
"Zero",
"-",
"based",
"."
] | train | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php#L1841-L1923 |
slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php | BaseRemoteApp.toArray | public function toArray($keyType = BasePeer::TYPE_PHPNAME, $includeLazyLoadColumns = true, $alreadyDumpedObjects = array(), $includeForeignObjects = false)
{
if (isset($alreadyDumpedObjects['RemoteApp'][$this->getPrimaryKey()])) {
return '*RECURSION*';
}
$alreadyDumpedObjects['Re... | php | public function toArray($keyType = BasePeer::TYPE_PHPNAME, $includeLazyLoadColumns = true, $alreadyDumpedObjects = array(), $includeForeignObjects = false)
{
if (isset($alreadyDumpedObjects['RemoteApp'][$this->getPrimaryKey()])) {
return '*RECURSION*';
}
$alreadyDumpedObjects['Re... | [
"public",
"function",
"toArray",
"(",
"$",
"keyType",
"=",
"BasePeer",
"::",
"TYPE_PHPNAME",
",",
"$",
"includeLazyLoadColumns",
"=",
"true",
",",
"$",
"alreadyDumpedObjects",
"=",
"array",
"(",
")",
",",
"$",
"includeForeignObjects",
"=",
"false",
")",
"{",
... | Exports the object as an array.
You can specify the key type of the array by passing one of the class
type constants.
@param string $keyType (optional) One of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME,
BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM.
Defau... | [
"Exports",
"the",
"object",
"as",
"an",
"array",
"."
] | train | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php#L1940-L1992 |
slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php | BaseRemoteApp.setByPosition | public function setByPosition($pos, $value)
{
switch ($pos) {
case 0:
$this->setId($value);
break;
case 1:
$this->setType($value);
break;
case 2:
$this->setName($value);
break;... | php | public function setByPosition($pos, $value)
{
switch ($pos) {
case 0:
$this->setId($value);
break;
case 1:
$this->setType($value);
break;
case 2:
$this->setName($value);
break;... | [
"public",
"function",
"setByPosition",
"(",
"$",
"pos",
",",
"$",
"value",
")",
"{",
"switch",
"(",
"$",
"pos",
")",
"{",
"case",
"0",
":",
"$",
"this",
"->",
"setId",
"(",
"$",
"value",
")",
";",
"break",
";",
"case",
"1",
":",
"$",
"this",
"-... | Sets a field from the object by Position as specified in the xml schema.
Zero-based.
@param int $pos position in xml schema
@param mixed $value field value
@return void | [
"Sets",
"a",
"field",
"from",
"the",
"object",
"by",
"Position",
"as",
"specified",
"in",
"the",
"xml",
"schema",
".",
"Zero",
"-",
"based",
"."
] | train | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php#L2020-L2099 |
slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php | BaseRemoteApp.fromArray | public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME)
{
$keys = RemoteAppPeer::getFieldNames($keyType);
if (array_key_exists($keys[0], $arr)) $this->setId($arr[$keys[0]]);
if (array_key_exists($keys[1], $arr)) $this->setType($arr[$keys[1]]);
if (array_key_exists($keys[2... | php | public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME)
{
$keys = RemoteAppPeer::getFieldNames($keyType);
if (array_key_exists($keys[0], $arr)) $this->setId($arr[$keys[0]]);
if (array_key_exists($keys[1], $arr)) $this->setType($arr[$keys[1]]);
if (array_key_exists($keys[2... | [
"public",
"function",
"fromArray",
"(",
"$",
"arr",
",",
"$",
"keyType",
"=",
"BasePeer",
"::",
"TYPE_PHPNAME",
")",
"{",
"$",
"keys",
"=",
"RemoteAppPeer",
"::",
"getFieldNames",
"(",
"$",
"keyType",
")",
";",
"if",
"(",
"array_key_exists",
"(",
"$",
"k... | Populates the object using an array.
This is particularly useful when populating an object from one of the
request arrays (e.g. $_POST). This method goes through the column
names, checking to see whether a matching key exists in populated
array. If so the setByName() method is called for that column.
You can specify... | [
"Populates",
"the",
"object",
"using",
"an",
"array",
"."
] | train | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php#L2118-L2147 |
slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php | BaseRemoteApp.buildCriteria | public function buildCriteria()
{
$criteria = new Criteria(RemoteAppPeer::DATABASE_NAME);
if ($this->isColumnModified(RemoteAppPeer::ID)) $criteria->add(RemoteAppPeer::ID, $this->id);
if ($this->isColumnModified(RemoteAppPeer::TYPE)) $criteria->add(RemoteAppPeer::TYPE, $this->type);
... | php | public function buildCriteria()
{
$criteria = new Criteria(RemoteAppPeer::DATABASE_NAME);
if ($this->isColumnModified(RemoteAppPeer::ID)) $criteria->add(RemoteAppPeer::ID, $this->id);
if ($this->isColumnModified(RemoteAppPeer::TYPE)) $criteria->add(RemoteAppPeer::TYPE, $this->type);
... | [
"public",
"function",
"buildCriteria",
"(",
")",
"{",
"$",
"criteria",
"=",
"new",
"Criteria",
"(",
"RemoteAppPeer",
"::",
"DATABASE_NAME",
")",
";",
"if",
"(",
"$",
"this",
"->",
"isColumnModified",
"(",
"RemoteAppPeer",
"::",
"ID",
")",
")",
"$",
"criter... | Build a Criteria object containing the values of all modified columns in this object.
@return Criteria The Criteria object containing all modified values. | [
"Build",
"a",
"Criteria",
"object",
"containing",
"the",
"values",
"of",
"all",
"modified",
"columns",
"in",
"this",
"object",
"."
] | train | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php#L2154-L2185 |
slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php | BaseRemoteApp.copyInto | public function copyInto($copyObj, $deepCopy = false, $makeNew = true)
{
$copyObj->setType($this->getType());
$copyObj->setName($this->getName());
$copyObj->setDomain($this->getDomain());
$copyObj->setApiUrl($this->getApiUrl());
$copyObj->setApiAuthHttpUser($this->getApiAuthH... | php | public function copyInto($copyObj, $deepCopy = false, $makeNew = true)
{
$copyObj->setType($this->getType());
$copyObj->setName($this->getName());
$copyObj->setDomain($this->getDomain());
$copyObj->setApiUrl($this->getApiUrl());
$copyObj->setApiAuthHttpUser($this->getApiAuthH... | [
"public",
"function",
"copyInto",
"(",
"$",
"copyObj",
",",
"$",
"deepCopy",
"=",
"false",
",",
"$",
"makeNew",
"=",
"true",
")",
"{",
"$",
"copyObj",
"->",
"setType",
"(",
"$",
"this",
"->",
"getType",
"(",
")",
")",
";",
"$",
"copyObj",
"->",
"se... | Sets contents of passed object to values from current object.
If desired, this method can also make copies of all associated (fkey referrers)
objects.
@param object $copyObj An object of RemoteApp (or compatible) type.
@param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
@pa... | [
"Sets",
"contents",
"of",
"passed",
"object",
"to",
"values",
"from",
"current",
"object",
"."
] | train | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php#L2244-L2298 |
slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php | BaseRemoteApp.initApiLogs | public function initApiLogs($overrideExisting = true)
{
if (null !== $this->collApiLogs && !$overrideExisting) {
return;
}
$this->collApiLogs = new PropelObjectCollection();
$this->collApiLogs->setModel('ApiLog');
} | php | public function initApiLogs($overrideExisting = true)
{
if (null !== $this->collApiLogs && !$overrideExisting) {
return;
}
$this->collApiLogs = new PropelObjectCollection();
$this->collApiLogs->setModel('ApiLog');
} | [
"public",
"function",
"initApiLogs",
"(",
"$",
"overrideExisting",
"=",
"true",
")",
"{",
"if",
"(",
"null",
"!==",
"$",
"this",
"->",
"collApiLogs",
"&&",
"!",
"$",
"overrideExisting",
")",
"{",
"return",
";",
"}",
"$",
"this",
"->",
"collApiLogs",
"=",... | Initializes the collApiLogs collection.
By default this just sets the collApiLogs collection to an empty array (like clearcollApiLogs());
however, you may wish to override this method in your stub class to provide setting appropriate
to your application -- for example, setting the initial array to the values stored in... | [
"Initializes",
"the",
"collApiLogs",
"collection",
"."
] | train | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php#L2450-L2457 |
slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php | BaseRemoteApp.getApiLogs | public function getApiLogs($criteria = null, PropelPDO $con = null)
{
$partial = $this->collApiLogsPartial && !$this->isNew();
if (null === $this->collApiLogs || null !== $criteria || $partial) {
if ($this->isNew() && null === $this->collApiLogs) {
// return empty collec... | php | public function getApiLogs($criteria = null, PropelPDO $con = null)
{
$partial = $this->collApiLogsPartial && !$this->isNew();
if (null === $this->collApiLogs || null !== $criteria || $partial) {
if ($this->isNew() && null === $this->collApiLogs) {
// return empty collec... | [
"public",
"function",
"getApiLogs",
"(",
"$",
"criteria",
"=",
"null",
",",
"PropelPDO",
"$",
"con",
"=",
"null",
")",
"{",
"$",
"partial",
"=",
"$",
"this",
"->",
"collApiLogsPartial",
"&&",
"!",
"$",
"this",
"->",
"isNew",
"(",
")",
";",
"if",
"(",... | Gets an array of ApiLog objects which contain a foreign key that references this object.
If the $criteria is not null, it is used to always fetch the results from the database.
Otherwise the results are fetched from the database the first time, then cached.
Next time the same method is called without $criteria, the ca... | [
"Gets",
"an",
"array",
"of",
"ApiLog",
"objects",
"which",
"contain",
"a",
"foreign",
"key",
"that",
"references",
"this",
"object",
"."
] | train | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php#L2473-L2516 |
slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php | BaseRemoteApp.setApiLogs | public function setApiLogs(PropelCollection $apiLogs, PropelPDO $con = null)
{
$apiLogsToDelete = $this->getApiLogs(new Criteria(), $con)->diff($apiLogs);
$this->apiLogsScheduledForDeletion = $apiLogsToDelete;
foreach ($apiLogsToDelete as $apiLogRemoved) {
$apiLogRemoved->setR... | php | public function setApiLogs(PropelCollection $apiLogs, PropelPDO $con = null)
{
$apiLogsToDelete = $this->getApiLogs(new Criteria(), $con)->diff($apiLogs);
$this->apiLogsScheduledForDeletion = $apiLogsToDelete;
foreach ($apiLogsToDelete as $apiLogRemoved) {
$apiLogRemoved->setR... | [
"public",
"function",
"setApiLogs",
"(",
"PropelCollection",
"$",
"apiLogs",
",",
"PropelPDO",
"$",
"con",
"=",
"null",
")",
"{",
"$",
"apiLogsToDelete",
"=",
"$",
"this",
"->",
"getApiLogs",
"(",
"new",
"Criteria",
"(",
")",
",",
"$",
"con",
")",
"->",
... | Sets a collection of ApiLog objects related by a one-to-many relationship
to the current object.
It will also schedule objects for deletion based on a diff between old objects (aka persisted)
and new objects from the given Propel collection.
@param PropelCollection $apiLogs A Propel collection.
@param PropelPDO $con O... | [
"Sets",
"a",
"collection",
"of",
"ApiLog",
"objects",
"related",
"by",
"a",
"one",
"-",
"to",
"-",
"many",
"relationship",
"to",
"the",
"current",
"object",
".",
"It",
"will",
"also",
"schedule",
"objects",
"for",
"deletion",
"based",
"on",
"a",
"diff",
... | train | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php#L2528-L2548 |
slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php | BaseRemoteApp.countApiLogs | public function countApiLogs(Criteria $criteria = null, $distinct = false, PropelPDO $con = null)
{
$partial = $this->collApiLogsPartial && !$this->isNew();
if (null === $this->collApiLogs || null !== $criteria || $partial) {
if ($this->isNew() && null === $this->collApiLogs) {
... | php | public function countApiLogs(Criteria $criteria = null, $distinct = false, PropelPDO $con = null)
{
$partial = $this->collApiLogsPartial && !$this->isNew();
if (null === $this->collApiLogs || null !== $criteria || $partial) {
if ($this->isNew() && null === $this->collApiLogs) {
... | [
"public",
"function",
"countApiLogs",
"(",
"Criteria",
"$",
"criteria",
"=",
"null",
",",
"$",
"distinct",
"=",
"false",
",",
"PropelPDO",
"$",
"con",
"=",
"null",
")",
"{",
"$",
"partial",
"=",
"$",
"this",
"->",
"collApiLogsPartial",
"&&",
"!",
"$",
... | Returns the number of related ApiLog objects.
@param Criteria $criteria
@param boolean $distinct
@param PropelPDO $con
@return int Count of related ApiLog objects.
@throws PropelException | [
"Returns",
"the",
"number",
"of",
"related",
"ApiLog",
"objects",
"."
] | train | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php#L2559-L2581 |
slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php | BaseRemoteApp.addApiLog | public function addApiLog(ApiLog $l)
{
if ($this->collApiLogs === null) {
$this->initApiLogs();
$this->collApiLogsPartial = true;
}
if (!in_array($l, $this->collApiLogs->getArrayCopy(), true)) { // only add it if the **same** object is not already associated
... | php | public function addApiLog(ApiLog $l)
{
if ($this->collApiLogs === null) {
$this->initApiLogs();
$this->collApiLogsPartial = true;
}
if (!in_array($l, $this->collApiLogs->getArrayCopy(), true)) { // only add it if the **same** object is not already associated
... | [
"public",
"function",
"addApiLog",
"(",
"ApiLog",
"$",
"l",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"collApiLogs",
"===",
"null",
")",
"{",
"$",
"this",
"->",
"initApiLogs",
"(",
")",
";",
"$",
"this",
"->",
"collApiLogsPartial",
"=",
"true",
";",
"}... | Method called to associate a ApiLog object to this object
through the ApiLog foreign key attribute.
@param ApiLog $l ApiLog
@return RemoteApp The current object (for fluent API support) | [
"Method",
"called",
"to",
"associate",
"a",
"ApiLog",
"object",
"to",
"this",
"object",
"through",
"the",
"ApiLog",
"foreign",
"key",
"attribute",
"."
] | train | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php#L2590-L2606 |
slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php | BaseRemoteApp.initRemoteHistoryContaos | public function initRemoteHistoryContaos($overrideExisting = true)
{
if (null !== $this->collRemoteHistoryContaos && !$overrideExisting) {
return;
}
$this->collRemoteHistoryContaos = new PropelObjectCollection();
$this->collRemoteHistoryContaos->setModel('RemoteHistoryCon... | php | public function initRemoteHistoryContaos($overrideExisting = true)
{
if (null !== $this->collRemoteHistoryContaos && !$overrideExisting) {
return;
}
$this->collRemoteHistoryContaos = new PropelObjectCollection();
$this->collRemoteHistoryContaos->setModel('RemoteHistoryCon... | [
"public",
"function",
"initRemoteHistoryContaos",
"(",
"$",
"overrideExisting",
"=",
"true",
")",
"{",
"if",
"(",
"null",
"!==",
"$",
"this",
"->",
"collRemoteHistoryContaos",
"&&",
"!",
"$",
"overrideExisting",
")",
"{",
"return",
";",
"}",
"$",
"this",
"->... | Initializes the collRemoteHistoryContaos collection.
By default this just sets the collRemoteHistoryContaos collection to an empty array (like clearcollRemoteHistoryContaos());
however, you may wish to override this method in your stub class to provide setting appropriate
to your application -- for example, setting th... | [
"Initializes",
"the",
"collRemoteHistoryContaos",
"collection",
"."
] | train | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php#L2675-L2682 |
slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php | BaseRemoteApp.getRemoteHistoryContaos | public function getRemoteHistoryContaos($criteria = null, PropelPDO $con = null)
{
$partial = $this->collRemoteHistoryContaosPartial && !$this->isNew();
if (null === $this->collRemoteHistoryContaos || null !== $criteria || $partial) {
if ($this->isNew() && null === $this->collRemoteHist... | php | public function getRemoteHistoryContaos($criteria = null, PropelPDO $con = null)
{
$partial = $this->collRemoteHistoryContaosPartial && !$this->isNew();
if (null === $this->collRemoteHistoryContaos || null !== $criteria || $partial) {
if ($this->isNew() && null === $this->collRemoteHist... | [
"public",
"function",
"getRemoteHistoryContaos",
"(",
"$",
"criteria",
"=",
"null",
",",
"PropelPDO",
"$",
"con",
"=",
"null",
")",
"{",
"$",
"partial",
"=",
"$",
"this",
"->",
"collRemoteHistoryContaosPartial",
"&&",
"!",
"$",
"this",
"->",
"isNew",
"(",
... | Gets an array of RemoteHistoryContao objects which contain a foreign key that references this object.
If the $criteria is not null, it is used to always fetch the results from the database.
Otherwise the results are fetched from the database the first time, then cached.
Next time the same method is called without $cri... | [
"Gets",
"an",
"array",
"of",
"RemoteHistoryContao",
"objects",
"which",
"contain",
"a",
"foreign",
"key",
"that",
"references",
"this",
"object",
"."
] | train | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php#L2698-L2741 |
slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php | BaseRemoteApp.setRemoteHistoryContaos | public function setRemoteHistoryContaos(PropelCollection $remoteHistoryContaos, PropelPDO $con = null)
{
$remoteHistoryContaosToDelete = $this->getRemoteHistoryContaos(new Criteria(), $con)->diff($remoteHistoryContaos);
$this->remoteHistoryContaosScheduledForDeletion = $remoteHistoryContaosToDelet... | php | public function setRemoteHistoryContaos(PropelCollection $remoteHistoryContaos, PropelPDO $con = null)
{
$remoteHistoryContaosToDelete = $this->getRemoteHistoryContaos(new Criteria(), $con)->diff($remoteHistoryContaos);
$this->remoteHistoryContaosScheduledForDeletion = $remoteHistoryContaosToDelet... | [
"public",
"function",
"setRemoteHistoryContaos",
"(",
"PropelCollection",
"$",
"remoteHistoryContaos",
",",
"PropelPDO",
"$",
"con",
"=",
"null",
")",
"{",
"$",
"remoteHistoryContaosToDelete",
"=",
"$",
"this",
"->",
"getRemoteHistoryContaos",
"(",
"new",
"Criteria",
... | Sets a collection of RemoteHistoryContao objects related by a one-to-many relationship
to the current object.
It will also schedule objects for deletion based on a diff between old objects (aka persisted)
and new objects from the given Propel collection.
@param PropelCollection $remoteHistoryContaos A Propel collectio... | [
"Sets",
"a",
"collection",
"of",
"RemoteHistoryContao",
"objects",
"related",
"by",
"a",
"one",
"-",
"to",
"-",
"many",
"relationship",
"to",
"the",
"current",
"object",
".",
"It",
"will",
"also",
"schedule",
"objects",
"for",
"deletion",
"based",
"on",
"a",... | train | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php#L2753-L2773 |
slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php | BaseRemoteApp.countRemoteHistoryContaos | public function countRemoteHistoryContaos(Criteria $criteria = null, $distinct = false, PropelPDO $con = null)
{
$partial = $this->collRemoteHistoryContaosPartial && !$this->isNew();
if (null === $this->collRemoteHistoryContaos || null !== $criteria || $partial) {
if ($this->isNew() && n... | php | public function countRemoteHistoryContaos(Criteria $criteria = null, $distinct = false, PropelPDO $con = null)
{
$partial = $this->collRemoteHistoryContaosPartial && !$this->isNew();
if (null === $this->collRemoteHistoryContaos || null !== $criteria || $partial) {
if ($this->isNew() && n... | [
"public",
"function",
"countRemoteHistoryContaos",
"(",
"Criteria",
"$",
"criteria",
"=",
"null",
",",
"$",
"distinct",
"=",
"false",
",",
"PropelPDO",
"$",
"con",
"=",
"null",
")",
"{",
"$",
"partial",
"=",
"$",
"this",
"->",
"collRemoteHistoryContaosPartial"... | Returns the number of related RemoteHistoryContao objects.
@param Criteria $criteria
@param boolean $distinct
@param PropelPDO $con
@return int Count of related RemoteHistoryContao objects.
@throws PropelException | [
"Returns",
"the",
"number",
"of",
"related",
"RemoteHistoryContao",
"objects",
"."
] | train | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php#L2784-L2806 |
slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php | BaseRemoteApp.addRemoteHistoryContao | public function addRemoteHistoryContao(RemoteHistoryContao $l)
{
if ($this->collRemoteHistoryContaos === null) {
$this->initRemoteHistoryContaos();
$this->collRemoteHistoryContaosPartial = true;
}
if (!in_array($l, $this->collRemoteHistoryContaos->getArrayCopy(), tru... | php | public function addRemoteHistoryContao(RemoteHistoryContao $l)
{
if ($this->collRemoteHistoryContaos === null) {
$this->initRemoteHistoryContaos();
$this->collRemoteHistoryContaosPartial = true;
}
if (!in_array($l, $this->collRemoteHistoryContaos->getArrayCopy(), tru... | [
"public",
"function",
"addRemoteHistoryContao",
"(",
"RemoteHistoryContao",
"$",
"l",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"collRemoteHistoryContaos",
"===",
"null",
")",
"{",
"$",
"this",
"->",
"initRemoteHistoryContaos",
"(",
")",
";",
"$",
"this",
"->",
... | Method called to associate a RemoteHistoryContao object to this object
through the RemoteHistoryContao foreign key attribute.
@param RemoteHistoryContao $l RemoteHistoryContao
@return RemoteApp The current object (for fluent API support) | [
"Method",
"called",
"to",
"associate",
"a",
"RemoteHistoryContao",
"object",
"to",
"this",
"object",
"through",
"the",
"RemoteHistoryContao",
"foreign",
"key",
"attribute",
"."
] | train | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php#L2815-L2831 |
slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php | BaseRemoteApp.clear | public function clear()
{
$this->id = null;
$this->type = null;
$this->name = null;
$this->domain = null;
$this->api_url = null;
$this->api_auth_http_user = null;
$this->api_auth_http_password = null;
$this->api_auth_type = null;
$this->api_aut... | php | public function clear()
{
$this->id = null;
$this->type = null;
$this->name = null;
$this->domain = null;
$this->api_url = null;
$this->api_auth_http_user = null;
$this->api_auth_http_password = null;
$this->api_auth_type = null;
$this->api_aut... | [
"public",
"function",
"clear",
"(",
")",
"{",
"$",
"this",
"->",
"id",
"=",
"null",
";",
"$",
"this",
"->",
"type",
"=",
"null",
";",
"$",
"this",
"->",
"name",
"=",
"null",
";",
"$",
"this",
"->",
"domain",
"=",
"null",
";",
"$",
"this",
"->",... | Clears the current object and sets all attributes to their default values | [
"Clears",
"the",
"current",
"object",
"and",
"sets",
"all",
"attributes",
"to",
"their",
"default",
"values"
] | train | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php#L2864-L2899 |
slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php | BaseRemoteApp.clearAllReferences | public function clearAllReferences($deep = false)
{
if ($deep && !$this->alreadyInClearAllReferencesDeep) {
$this->alreadyInClearAllReferencesDeep = true;
if ($this->collApiLogs) {
foreach ($this->collApiLogs as $o) {
$o->clearAllReferences($deep);... | php | public function clearAllReferences($deep = false)
{
if ($deep && !$this->alreadyInClearAllReferencesDeep) {
$this->alreadyInClearAllReferencesDeep = true;
if ($this->collApiLogs) {
foreach ($this->collApiLogs as $o) {
$o->clearAllReferences($deep);... | [
"public",
"function",
"clearAllReferences",
"(",
"$",
"deep",
"=",
"false",
")",
"{",
"if",
"(",
"$",
"deep",
"&&",
"!",
"$",
"this",
"->",
"alreadyInClearAllReferencesDeep",
")",
"{",
"$",
"this",
"->",
"alreadyInClearAllReferencesDeep",
"=",
"true",
";",
"... | Resets all references to other model objects or collections of model objects.
This method is a user-space workaround for PHP's inability to garbage collect
objects with circular references (even in PHP 5.3). This is currently necessary
when using Propel in certain daemon or large-volume/high-memory operations.
@param... | [
"Resets",
"all",
"references",
"to",
"other",
"model",
"objects",
"or",
"collections",
"of",
"model",
"objects",
"."
] | train | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseRemoteApp.php#L2910-L2940 |
drsdre/yii2-xmlsoccer | commands/XmlSoccerController.php | XmlSoccerController.actionImportLeagues | public function actionImportLeagues()
{
$client = new Client([
'apiKey' => $this->apiKey
]);
$leagues = $client->getAllLeagues();
$count = 0;
foreach ($leagues as $league) {
$dbLeague = Yii::createObject([
'class' => $this->leagueClass... | php | public function actionImportLeagues()
{
$client = new Client([
'apiKey' => $this->apiKey
]);
$leagues = $client->getAllLeagues();
$count = 0;
foreach ($leagues as $league) {
$dbLeague = Yii::createObject([
'class' => $this->leagueClass... | [
"public",
"function",
"actionImportLeagues",
"(",
")",
"{",
"$",
"client",
"=",
"new",
"Client",
"(",
"[",
"'apiKey'",
"=>",
"$",
"this",
"->",
"apiKey",
"]",
")",
";",
"$",
"leagues",
"=",
"$",
"client",
"->",
"getAllLeagues",
"(",
")",
";",
"$",
"c... | Import all leagues from XMLSoccer interface
@return integer Exit code
@throws \yii\base\InvalidConfigException | [
"Import",
"all",
"leagues",
"from",
"XMLSoccer",
"interface"
] | train | https://github.com/drsdre/yii2-xmlsoccer/blob/a746edee6269ed0791bac6c6165a946adc30d994/commands/XmlSoccerController.php#L82-L138 |
drsdre/yii2-xmlsoccer | commands/XmlSoccerController.php | XmlSoccerController.actionShowLeagues | public function actionShowLeagues()
{
$leagues = call_user_func([$this->leagueClass, 'find']);
/* @var $leagues \yii\db\ActiveQuery */
if (!$leagues->count('id')) {
$this->stdout("No leagues found. Import by ");
$this->stdout("{$this->id}/import-leagues", Console::BO... | php | public function actionShowLeagues()
{
$leagues = call_user_func([$this->leagueClass, 'find']);
/* @var $leagues \yii\db\ActiveQuery */
if (!$leagues->count('id')) {
$this->stdout("No leagues found. Import by ");
$this->stdout("{$this->id}/import-leagues", Console::BO... | [
"public",
"function",
"actionShowLeagues",
"(",
")",
"{",
"$",
"leagues",
"=",
"call_user_func",
"(",
"[",
"$",
"this",
"->",
"leagueClass",
",",
"'find'",
"]",
")",
";",
"/* @var $leagues \\yii\\db\\ActiveQuery */",
"if",
"(",
"!",
"$",
"leagues",
"->",
"coun... | Show all leagues
@return integer Exit code
@throws \Exception | [
"Show",
"all",
"leagues"
] | train | https://github.com/drsdre/yii2-xmlsoccer/blob/a746edee6269ed0791bac6c6165a946adc30d994/commands/XmlSoccerController.php#L146-L177 |
drsdre/yii2-xmlsoccer | commands/XmlSoccerController.php | XmlSoccerController.actionCreateLeague | public function actionCreateLeague($league_id, $seasonDateString = null)
{
$league = call_user_func([$this->leagueClass, 'findOne'], $league_id);
/* @var $league \drsdre\yii\xmlsoccer\models\League */
if (empty($seasonDateString)) {
$year = intval(date('y'));
$seasonD... | php | public function actionCreateLeague($league_id, $seasonDateString = null)
{
$league = call_user_func([$this->leagueClass, 'findOne'], $league_id);
/* @var $league \drsdre\yii\xmlsoccer\models\League */
if (empty($seasonDateString)) {
$year = intval(date('y'));
$seasonD... | [
"public",
"function",
"actionCreateLeague",
"(",
"$",
"league_id",
",",
"$",
"seasonDateString",
"=",
"null",
")",
"{",
"$",
"league",
"=",
"call_user_func",
"(",
"[",
"$",
"this",
"->",
"leagueClass",
",",
"'findOne'",
"]",
",",
"$",
"league_id",
")",
";"... | Create specific league by id. This method imports all league relevant data from interface to db.
If league id is not known, please execute
```sh
$ ./yii xml-soccer/show-leagues
```
@param integer $league_id League id to import all data from
@param string|null $seasonDateString Season date string to import data from. D... | [
"Create",
"specific",
"league",
"by",
"id",
".",
"This",
"method",
"imports",
"all",
"league",
"relevant",
"data",
"from",
"interface",
"to",
"db",
".",
"If",
"league",
"id",
"is",
"not",
"known",
"please",
"execute",
"sh",
"$",
".",
"/",
"yii",
"xml",
... | train | https://github.com/drsdre/yii2-xmlsoccer/blob/a746edee6269ed0791bac6c6165a946adc30d994/commands/XmlSoccerController.php#L191-L462 |
drsdre/yii2-xmlsoccer | commands/XmlSoccerController.php | XmlSoccerController.actionUpdateScore | public function actionUpdateScore()
{
$client = new Client([
'apiKey' => $this->apiKey
]);
$liveScoreData = $client->getLiveScore();
foreach ($liveScoreData as $match) {
$dbMatch = call_user_func(
[$this->matchClass, 'findOne'],
... | php | public function actionUpdateScore()
{
$client = new Client([
'apiKey' => $this->apiKey
]);
$liveScoreData = $client->getLiveScore();
foreach ($liveScoreData as $match) {
$dbMatch = call_user_func(
[$this->matchClass, 'findOne'],
... | [
"public",
"function",
"actionUpdateScore",
"(",
")",
"{",
"$",
"client",
"=",
"new",
"Client",
"(",
"[",
"'apiKey'",
"=>",
"$",
"this",
"->",
"apiKey",
"]",
")",
";",
"$",
"liveScoreData",
"=",
"$",
"client",
"->",
"getLiveScore",
"(",
")",
";",
"forea... | Update Scores from LiveScore
@return integer Exit code
@throws \yii\base\InvalidConfigException | [
"Update",
"Scores",
"from",
"LiveScore"
] | train | https://github.com/drsdre/yii2-xmlsoccer/blob/a746edee6269ed0791bac6c6165a946adc30d994/commands/XmlSoccerController.php#L470-L601 |
Chill-project/Main | Command/LoadCountriesCommand.php | LoadCountriesCommand.execute | protected function execute(InputInterface $input, OutputInterface $output)
{
$countries = static::prepareCountryList($this->getContainer()->getParameter('chill_main.available_languages'));
$em = $this->getContainer()->get('doctrine.orm.entity_manager');
foreach($countries as $countr... | php | protected function execute(InputInterface $input, OutputInterface $output)
{
$countries = static::prepareCountryList($this->getContainer()->getParameter('chill_main.available_languages'));
$em = $this->getContainer()->get('doctrine.orm.entity_manager');
foreach($countries as $countr... | [
"protected",
"function",
"execute",
"(",
"InputInterface",
"$",
"input",
",",
"OutputInterface",
"$",
"output",
")",
"{",
"$",
"countries",
"=",
"static",
"::",
"prepareCountryList",
"(",
"$",
"this",
"->",
"getContainer",
"(",
")",
"->",
"getParameter",
"(",
... | /*
(non-PHPdoc)
@see \Symfony\Component\Console\Command\Command::execute() | [
"/",
"*",
"(",
"non",
"-",
"PHPdoc",
")"
] | train | https://github.com/Chill-project/Main/blob/384cb6c793072a4f1047dc5cafc2157ee2419f60/Command/LoadCountriesCommand.php#L32-L49 |
VincentChalnot/SidusAdminBundle | Controller/AbstractAdminController.php | AbstractAdminController.bindDataGridRequest | protected function bindDataGridRequest(DataGrid $dataGrid, Request $request, array $formOptions = [])
{
$formOptions = array_merge(
[
'method' => $request->getMethod(),
'csrf_protection' => false,
'action' => $this->getCurrentUri($request),
... | php | protected function bindDataGridRequest(DataGrid $dataGrid, Request $request, array $formOptions = [])
{
$formOptions = array_merge(
[
'method' => $request->getMethod(),
'csrf_protection' => false,
'action' => $this->getCurrentUri($request),
... | [
"protected",
"function",
"bindDataGridRequest",
"(",
"DataGrid",
"$",
"dataGrid",
",",
"Request",
"$",
"request",
",",
"array",
"$",
"formOptions",
"=",
"[",
"]",
")",
"{",
"$",
"formOptions",
"=",
"array_merge",
"(",
"[",
"'method'",
"=>",
"$",
"request",
... | @param DataGrid $dataGrid
@param Request $request
@param array $formOptions
@throws \Exception | [
"@param",
"DataGrid",
"$dataGrid",
"@param",
"Request",
"$request",
"@param",
"array",
"$formOptions"
] | train | https://github.com/VincentChalnot/SidusAdminBundle/blob/3366f3f1525435860cf275ed2f1f0b58cf6eea18/Controller/AbstractAdminController.php#L85-L101 |
VincentChalnot/SidusAdminBundle | Controller/AbstractAdminController.php | AbstractAdminController.getForm | protected function getForm(Request $request, $data, array $options = []): FormInterface
{
$action = $this->admin->getCurrentAction();
$dataId = $data && method_exists($data, 'getId') ? $data->getId() : null;
$defaultOptions = $this->getDefaultFormOptions($request, $dataId, $action);
... | php | protected function getForm(Request $request, $data, array $options = []): FormInterface
{
$action = $this->admin->getCurrentAction();
$dataId = $data && method_exists($data, 'getId') ? $data->getId() : null;
$defaultOptions = $this->getDefaultFormOptions($request, $dataId, $action);
... | [
"protected",
"function",
"getForm",
"(",
"Request",
"$",
"request",
",",
"$",
"data",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
":",
"FormInterface",
"{",
"$",
"action",
"=",
"$",
"this",
"->",
"admin",
"->",
"getCurrentAction",
"(",
")",
";",
... | @param Request $request
@param mixed $data
@param array $options
@throws \UnexpectedValueException
@throws \InvalidArgumentException
@throws \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException
@return FormInterface | [
"@param",
"Request",
"$request",
"@param",
"mixed",
"$data",
"@param",
"array",
"$options"
] | train | https://github.com/VincentChalnot/SidusAdminBundle/blob/3366f3f1525435860cf275ed2f1f0b58cf6eea18/Controller/AbstractAdminController.php#L114-L121 |
VincentChalnot/SidusAdminBundle | Controller/AbstractAdminController.php | AbstractAdminController.getFormBuilder | protected function getFormBuilder(Action $action, $data, array $options = []): FormBuilderInterface
{
if (!$action->getFormType()) {
throw new \UnexpectedValueException("Missing parameter 'form_type' for action '{$action->getCode()}'");
}
return $this->get('form.factory')->creat... | php | protected function getFormBuilder(Action $action, $data, array $options = []): FormBuilderInterface
{
if (!$action->getFormType()) {
throw new \UnexpectedValueException("Missing parameter 'form_type' for action '{$action->getCode()}'");
}
return $this->get('form.factory')->creat... | [
"protected",
"function",
"getFormBuilder",
"(",
"Action",
"$",
"action",
",",
"$",
"data",
",",
"array",
"$",
"options",
"=",
"[",
"]",
")",
":",
"FormBuilderInterface",
"{",
"if",
"(",
"!",
"$",
"action",
"->",
"getFormType",
"(",
")",
")",
"{",
"thro... | @param Action $action
@param mixed $data
@param array $options
@throws \UnexpectedValueException
@throws \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException
@return FormBuilderInterface | [
"@param",
"Action",
"$action",
"@param",
"mixed",
"$data",
"@param",
"array",
"$options"
] | train | https://github.com/VincentChalnot/SidusAdminBundle/blob/3366f3f1525435860cf275ed2f1f0b58cf6eea18/Controller/AbstractAdminController.php#L133-L145 |
VincentChalnot/SidusAdminBundle | Controller/AbstractAdminController.php | AbstractAdminController.saveEntity | protected function saveEntity($data)
{
$entityManager = $this->getManagerForEntity($data);
$entityManager->persist($data);
$entityManager->flush();
$action = $this->admin->getCurrentAction();
$this->addFlash('success', $this->translate("admin.flash.{$action->getCode()}.succe... | php | protected function saveEntity($data)
{
$entityManager = $this->getManagerForEntity($data);
$entityManager->persist($data);
$entityManager->flush();
$action = $this->admin->getCurrentAction();
$this->addFlash('success', $this->translate("admin.flash.{$action->getCode()}.succe... | [
"protected",
"function",
"saveEntity",
"(",
"$",
"data",
")",
"{",
"$",
"entityManager",
"=",
"$",
"this",
"->",
"getManagerForEntity",
"(",
"$",
"data",
")",
";",
"$",
"entityManager",
"->",
"persist",
"(",
"$",
"data",
")",
";",
"$",
"entityManager",
"... | @param mixed $data
@throws \Exception | [
"@param",
"mixed",
"$data"
] | train | https://github.com/VincentChalnot/SidusAdminBundle/blob/3366f3f1525435860cf275ed2f1f0b58cf6eea18/Controller/AbstractAdminController.php#L152-L160 |
VincentChalnot/SidusAdminBundle | Controller/AbstractAdminController.php | AbstractAdminController.deleteEntity | protected function deleteEntity($data)
{
$entityManager = $this->getManagerForEntity($data);
$entityManager->remove($data);
$entityManager->flush();
$action = $this->admin->getCurrentAction();
$this->addFlash('success', $this->translate("admin.flash.{$action->getCode()}.succ... | php | protected function deleteEntity($data)
{
$entityManager = $this->getManagerForEntity($data);
$entityManager->remove($data);
$entityManager->flush();
$action = $this->admin->getCurrentAction();
$this->addFlash('success', $this->translate("admin.flash.{$action->getCode()}.succ... | [
"protected",
"function",
"deleteEntity",
"(",
"$",
"data",
")",
"{",
"$",
"entityManager",
"=",
"$",
"this",
"->",
"getManagerForEntity",
"(",
"$",
"data",
")",
";",
"$",
"entityManager",
"->",
"remove",
"(",
"$",
"data",
")",
";",
"$",
"entityManager",
... | @param mixed $data
@throws \Exception | [
"@param",
"mixed",
"$data"
] | train | https://github.com/VincentChalnot/SidusAdminBundle/blob/3366f3f1525435860cf275ed2f1f0b58cf6eea18/Controller/AbstractAdminController.php#L167-L175 |
VincentChalnot/SidusAdminBundle | Controller/AbstractAdminController.php | AbstractAdminController.getDefaultFormOptions | protected function getDefaultFormOptions(Request $request, $dataId, Action $action = null)
{
if (!$action) {
$action = $this->admin->getCurrentAction();
}
$dataId = $dataId ?: 'new';
return array_merge(
$action->getFormOptions(),
[
... | php | protected function getDefaultFormOptions(Request $request, $dataId, Action $action = null)
{
if (!$action) {
$action = $this->admin->getCurrentAction();
}
$dataId = $dataId ?: 'new';
return array_merge(
$action->getFormOptions(),
[
... | [
"protected",
"function",
"getDefaultFormOptions",
"(",
"Request",
"$",
"request",
",",
"$",
"dataId",
",",
"Action",
"$",
"action",
"=",
"null",
")",
"{",
"if",
"(",
"!",
"$",
"action",
")",
"{",
"$",
"action",
"=",
"$",
"this",
"->",
"admin",
"->",
... | @param Request $request
@param string $dataId
@param Action|null $action
@throws \InvalidArgumentException
@return array | [
"@param",
"Request",
"$request",
"@param",
"string",
"$dataId",
"@param",
"Action|null",
"$action"
] | train | https://github.com/VincentChalnot/SidusAdminBundle/blob/3366f3f1525435860cf275ed2f1f0b58cf6eea18/Controller/AbstractAdminController.php#L186-L204 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.