id
int32
0
241k
repo
stringlengths
6
63
path
stringlengths
5
140
func_name
stringlengths
3
151
original_string
stringlengths
84
13k
language
stringclasses
1 value
code
stringlengths
84
13k
code_tokens
sequence
docstring
stringlengths
3
47.2k
docstring_tokens
sequence
sha
stringlengths
40
40
url
stringlengths
91
247
0
remi-san/serializer
src/Hydrator/HydratorFactory.php
HydratorFactory.getHydratorClassName
public function getHydratorClassName($fqcn) { $config = new Configuration($fqcn); $config->setAutoGenerateProxies($this->generateProxies); $config->setGeneratedClassesTargetDir($this->cacheDir); return $config->createFactory()->getHydratorClass(); }
php
public function getHydratorClassName($fqcn) { $config = new Configuration($fqcn); $config->setAutoGenerateProxies($this->generateProxies); $config->setGeneratedClassesTargetDir($this->cacheDir); return $config->createFactory()->getHydratorClass(); }
[ "public", "function", "getHydratorClassName", "(", "$", "fqcn", ")", "{", "$", "config", "=", "new", "Configuration", "(", "$", "fqcn", ")", ";", "$", "config", "->", "setAutoGenerateProxies", "(", "$", "this", "->", "generateProxies", ")", ";", "$", "config", "->", "setGeneratedClassesTargetDir", "(", "$", "this", "->", "cacheDir", ")", ";", "return", "$", "config", "->", "createFactory", "(", ")", "->", "getHydratorClass", "(", ")", ";", "}" ]
Gets the hydrator class name. @param string $fqcn @return string
[ "Gets", "the", "hydrator", "class", "name", "." ]
1310963b096860d7bdf9b5d3e3f73d9ca088b69b
https://github.com/remi-san/serializer/blob/1310963b096860d7bdf9b5d3e3f73d9ca088b69b/src/Hydrator/HydratorFactory.php#L53-L60
1
porkchopsandwiches/baseline-silex-application
lib/src/PorkChopSandwiches/Silex/Baseline/Application.php
Application.bootstrapEnvironment
protected function bootstrapEnvironment () { $this["debug"] = !!$this["app.config"]["environment.debug"]; Errorhandler::register(); ExceptionHandler::register($this["debug"]); Request::enableHttpMethodParameterOverride(); }
php
protected function bootstrapEnvironment () { $this["debug"] = !!$this["app.config"]["environment.debug"]; Errorhandler::register(); ExceptionHandler::register($this["debug"]); Request::enableHttpMethodParameterOverride(); }
[ "protected", "function", "bootstrapEnvironment", "(", ")", "{", "$", "this", "[", "\"debug\"", "]", "=", "!", "!", "$", "this", "[", "\"app.config\"", "]", "[", "\"environment.debug\"", "]", ";", "Errorhandler", "::", "register", "(", ")", ";", "ExceptionHandler", "::", "register", "(", "$", "this", "[", "\"debug\"", "]", ")", ";", "Request", "::", "enableHttpMethodParameterOverride", "(", ")", ";", "}" ]
Prepare the environment, registering the Error and Exception handlers, and allowing HTTP method parameter overriding.
[ "Prepare", "the", "environment", "registering", "the", "Error", "and", "Exception", "handlers", "and", "allowing", "HTTP", "method", "parameter", "overriding", "." ]
1375545a6a8555498c39c9e3790e5522f258a749
https://github.com/porkchopsandwiches/baseline-silex-application/blob/1375545a6a8555498c39c9e3790e5522f258a749/lib/src/PorkChopSandwiches/Silex/Baseline/Application.php#L172-L177
2
phunc-org/Phunc
src/ValidLanguage.php
ValidLanguage.valid
public function valid($language) { if (empty($language)) { return false; } if ($language == 'en' || $language == 'de' || $language == 'pl' || $language == 'ru') { return true; } return false; }
php
public function valid($language) { if (empty($language)) { return false; } if ($language == 'en' || $language == 'de' || $language == 'pl' || $language == 'ru') { return true; } return false; }
[ "public", "function", "valid", "(", "$", "language", ")", "{", "if", "(", "empty", "(", "$", "language", ")", ")", "{", "return", "false", ";", "}", "if", "(", "$", "language", "==", "'en'", "||", "$", "language", "==", "'de'", "||", "$", "language", "==", "'pl'", "||", "$", "language", "==", "'ru'", ")", "{", "return", "true", ";", "}", "return", "false", ";", "}" ]
validation of language @param $language @return bool
[ "validation", "of", "language" ]
80c69d5a63e352c8e0c3330e3b8bb1288d0a9256
https://github.com/phunc-org/Phunc/blob/80c69d5a63e352c8e0c3330e3b8bb1288d0a9256/src/ValidLanguage.php#L33-L42
3
themichaelhall/bluemvc-forms
src/Option.php
Option.getHtml
public function getHtml(array $attributes = []): string { return self::buildTag('option', $this->getLabel(), array_merge( [ 'value' => $this->getValue(), 'selected' => $this->isSelected, ], $attributes) ); }
php
public function getHtml(array $attributes = []): string { return self::buildTag('option', $this->getLabel(), array_merge( [ 'value' => $this->getValue(), 'selected' => $this->isSelected, ], $attributes) ); }
[ "public", "function", "getHtml", "(", "array", "$", "attributes", "=", "[", "]", ")", ":", "string", "{", "return", "self", "::", "buildTag", "(", "'option'", ",", "$", "this", "->", "getLabel", "(", ")", ",", "array_merge", "(", "[", "'value'", "=>", "$", "this", "->", "getValue", "(", ")", ",", "'selected'", "=>", "$", "this", "->", "isSelected", ",", "]", ",", "$", "attributes", ")", ")", ";", "}" ]
Returns the option html. @since 1.0.0 @param array $attributes The attributes. @return string The option html.
[ "Returns", "the", "option", "html", "." ]
8f0e29aaf71eba70b50697384b22edaf72f2f45b
https://github.com/themichaelhall/bluemvc-forms/blob/8f0e29aaf71eba70b50697384b22edaf72f2f45b/src/Option.php#L47-L57
4
polderknowledge/entityservice
src/Event/EntityEvent.php
EntityEvent.setEntityClassName
public function setEntityClassName($name) { $trimmedName = trim($name, '\\'); if (!class_exists($trimmedName)) { throw new RuntimeException(sprintf('The class "%s" does not exist.', $trimmedName)); } $this->entityClassName = $trimmedName; return $this; }
php
public function setEntityClassName($name) { $trimmedName = trim($name, '\\'); if (!class_exists($trimmedName)) { throw new RuntimeException(sprintf('The class "%s" does not exist.', $trimmedName)); } $this->entityClassName = $trimmedName; return $this; }
[ "public", "function", "setEntityClassName", "(", "$", "name", ")", "{", "$", "trimmedName", "=", "trim", "(", "$", "name", ",", "'\\\\'", ")", ";", "if", "(", "!", "class_exists", "(", "$", "trimmedName", ")", ")", "{", "throw", "new", "RuntimeException", "(", "sprintf", "(", "'The class \"%s\" does not exist.'", ",", "$", "trimmedName", ")", ")", ";", "}", "$", "this", "->", "entityClassName", "=", "$", "trimmedName", ";", "return", "$", "this", ";", "}" ]
Sets the FQCN of the entity that is used. @param string $name The FQCN of the entity. @return EntityEvent Returns the instance of this class so that chaining can be used. @throws RuntimeException
[ "Sets", "the", "FQCN", "of", "the", "entity", "that", "is", "used", "." ]
f48994b4ea33b1d3b56a24d255cbfb99c1eaaf15
https://github.com/polderknowledge/entityservice/blob/f48994b4ea33b1d3b56a24d255cbfb99c1eaaf15/src/Event/EntityEvent.php#L110-L121
5
Messere/php-value-mask
src/Mask/Mask.php
Mask.maybeAppendWithKey
private function maybeAppendWithKey(string $key, array &$result, array $values): void { if ([] !== $values) { $result[$key] = $values; } }
php
private function maybeAppendWithKey(string $key, array &$result, array $values): void { if ([] !== $values) { $result[$key] = $values; } }
[ "private", "function", "maybeAppendWithKey", "(", "string", "$", "key", ",", "array", "&", "$", "result", ",", "array", "$", "values", ")", ":", "void", "{", "if", "(", "[", "]", "!==", "$", "values", ")", "{", "$", "result", "[", "$", "key", "]", "=", "$", "values", ";", "}", "}" ]
append values to result if not empty @param string $key @param array $result @param array $values
[ "append", "values", "to", "result", "if", "not", "empty" ]
9c972f70f328de734833133a8a2b879adbe31c79
https://github.com/Messere/php-value-mask/blob/9c972f70f328de734833133a8a2b879adbe31c79/src/Mask/Mask.php#L78-L83
6
gossi/trixionary
src/model/Base/Skill.php
Skill.setObject
public function setObject(ChildObject $v = null) { // aggregate_column_relation behavior if (null !== $this->aObject && $v !== $this->aObject) { $this->oldObjectSkillCount = $this->aObject; } if ($v === null) { $this->setObjectId(NULL); } else { $this->setObjectId($v->getId()); } $this->aObject = $v; // Add binding for other direction of this n:n relationship. // If this object has already been added to the ChildObject object, it will not be re-added. if ($v !== null) { $v->addSkill($this); } return $this; }
php
public function setObject(ChildObject $v = null) { // aggregate_column_relation behavior if (null !== $this->aObject && $v !== $this->aObject) { $this->oldObjectSkillCount = $this->aObject; } if ($v === null) { $this->setObjectId(NULL); } else { $this->setObjectId($v->getId()); } $this->aObject = $v; // Add binding for other direction of this n:n relationship. // If this object has already been added to the ChildObject object, it will not be re-added. if ($v !== null) { $v->addSkill($this); } return $this; }
[ "public", "function", "setObject", "(", "ChildObject", "$", "v", "=", "null", ")", "{", "// aggregate_column_relation behavior", "if", "(", "null", "!==", "$", "this", "->", "aObject", "&&", "$", "v", "!==", "$", "this", "->", "aObject", ")", "{", "$", "this", "->", "oldObjectSkillCount", "=", "$", "this", "->", "aObject", ";", "}", "if", "(", "$", "v", "===", "null", ")", "{", "$", "this", "->", "setObjectId", "(", "NULL", ")", ";", "}", "else", "{", "$", "this", "->", "setObjectId", "(", "$", "v", "->", "getId", "(", ")", ")", ";", "}", "$", "this", "->", "aObject", "=", "$", "v", ";", "// Add binding for other direction of this n:n relationship.", "// If this object has already been added to the ChildObject object, it will not be re-added.", "if", "(", "$", "v", "!==", "null", ")", "{", "$", "v", "->", "addSkill", "(", "$", "this", ")", ";", "}", "return", "$", "this", ";", "}" ]
Declares an association between this object and a ChildObject object. @param ChildObject $v @return $this|\gossi\trixionary\model\Skill The current object (for fluent API support) @throws PropelException
[ "Declares", "an", "association", "between", "this", "object", "and", "a", "ChildObject", "object", "." ]
221a6c5322473d7d7f8e322958a3ee46d87da150
https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/Skill.php#L4779-L4801
7
gossi/trixionary
src/model/Base/Skill.php
Skill.getObject
public function getObject(ConnectionInterface $con = null) { if ($this->aObject === null && ($this->object_id !== null)) { $this->aObject = ChildObjectQuery::create()->findPk($this->object_id, $con); /* The following can be used additionally to guarantee the related object contains a reference to this object. This level of coupling may, however, be undesirable since it could result in an only partially populated collection in the referenced object. $this->aObject->addSkills($this); */ } return $this->aObject; }
php
public function getObject(ConnectionInterface $con = null) { if ($this->aObject === null && ($this->object_id !== null)) { $this->aObject = ChildObjectQuery::create()->findPk($this->object_id, $con); /* The following can be used additionally to guarantee the related object contains a reference to this object. This level of coupling may, however, be undesirable since it could result in an only partially populated collection in the referenced object. $this->aObject->addSkills($this); */ } return $this->aObject; }
[ "public", "function", "getObject", "(", "ConnectionInterface", "$", "con", "=", "null", ")", "{", "if", "(", "$", "this", "->", "aObject", "===", "null", "&&", "(", "$", "this", "->", "object_id", "!==", "null", ")", ")", "{", "$", "this", "->", "aObject", "=", "ChildObjectQuery", "::", "create", "(", ")", "->", "findPk", "(", "$", "this", "->", "object_id", ",", "$", "con", ")", ";", "/* The following can be used additionally to\n guarantee the related object contains a reference\n to this object. This level of coupling may, however, be\n undesirable since it could result in an only partially populated collection\n in the referenced object.\n $this->aObject->addSkills($this);\n */", "}", "return", "$", "this", "->", "aObject", ";", "}" ]
Get the associated ChildObject object @param ConnectionInterface $con Optional Connection object. @return ChildObject The associated ChildObject object. @throws PropelException
[ "Get", "the", "associated", "ChildObject", "object" ]
221a6c5322473d7d7f8e322958a3ee46d87da150
https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/Skill.php#L4811-L4825
8
gossi/trixionary
src/model/Base/Skill.php
Skill.setFeaturedPicture
public function setFeaturedPicture(ChildPicture $v = null) { if ($v === null) { $this->setPictureId(NULL); } else { $this->setPictureId($v->getId()); } $this->aFeaturedPicture = $v; // Add binding for other direction of this n:n relationship. // If this object has already been added to the ChildPicture object, it will not be re-added. if ($v !== null) { $v->addFeaturedSkill($this); } return $this; }
php
public function setFeaturedPicture(ChildPicture $v = null) { if ($v === null) { $this->setPictureId(NULL); } else { $this->setPictureId($v->getId()); } $this->aFeaturedPicture = $v; // Add binding for other direction of this n:n relationship. // If this object has already been added to the ChildPicture object, it will not be re-added. if ($v !== null) { $v->addFeaturedSkill($this); } return $this; }
[ "public", "function", "setFeaturedPicture", "(", "ChildPicture", "$", "v", "=", "null", ")", "{", "if", "(", "$", "v", "===", "null", ")", "{", "$", "this", "->", "setPictureId", "(", "NULL", ")", ";", "}", "else", "{", "$", "this", "->", "setPictureId", "(", "$", "v", "->", "getId", "(", ")", ")", ";", "}", "$", "this", "->", "aFeaturedPicture", "=", "$", "v", ";", "// Add binding for other direction of this n:n relationship.", "// If this object has already been added to the ChildPicture object, it will not be re-added.", "if", "(", "$", "v", "!==", "null", ")", "{", "$", "v", "->", "addFeaturedSkill", "(", "$", "this", ")", ";", "}", "return", "$", "this", ";", "}" ]
Declares an association between this object and a ChildPicture object. @param ChildPicture $v @return $this|\gossi\trixionary\model\Skill The current object (for fluent API support) @throws PropelException
[ "Declares", "an", "association", "between", "this", "object", "and", "a", "ChildPicture", "object", "." ]
221a6c5322473d7d7f8e322958a3ee46d87da150
https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/Skill.php#L4936-L4954
9
gossi/trixionary
src/model/Base/Skill.php
Skill.getFeaturedPicture
public function getFeaturedPicture(ConnectionInterface $con = null) { if ($this->aFeaturedPicture === null && ($this->picture_id !== null)) { $this->aFeaturedPicture = ChildPictureQuery::create()->findPk($this->picture_id, $con); /* The following can be used additionally to guarantee the related object contains a reference to this object. This level of coupling may, however, be undesirable since it could result in an only partially populated collection in the referenced object. $this->aFeaturedPicture->addFeaturedSkills($this); */ } return $this->aFeaturedPicture; }
php
public function getFeaturedPicture(ConnectionInterface $con = null) { if ($this->aFeaturedPicture === null && ($this->picture_id !== null)) { $this->aFeaturedPicture = ChildPictureQuery::create()->findPk($this->picture_id, $con); /* The following can be used additionally to guarantee the related object contains a reference to this object. This level of coupling may, however, be undesirable since it could result in an only partially populated collection in the referenced object. $this->aFeaturedPicture->addFeaturedSkills($this); */ } return $this->aFeaturedPicture; }
[ "public", "function", "getFeaturedPicture", "(", "ConnectionInterface", "$", "con", "=", "null", ")", "{", "if", "(", "$", "this", "->", "aFeaturedPicture", "===", "null", "&&", "(", "$", "this", "->", "picture_id", "!==", "null", ")", ")", "{", "$", "this", "->", "aFeaturedPicture", "=", "ChildPictureQuery", "::", "create", "(", ")", "->", "findPk", "(", "$", "this", "->", "picture_id", ",", "$", "con", ")", ";", "/* The following can be used additionally to\n guarantee the related object contains a reference\n to this object. This level of coupling may, however, be\n undesirable since it could result in an only partially populated collection\n in the referenced object.\n $this->aFeaturedPicture->addFeaturedSkills($this);\n */", "}", "return", "$", "this", "->", "aFeaturedPicture", ";", "}" ]
Get the associated ChildPicture object @param ConnectionInterface $con Optional Connection object. @return ChildPicture The associated ChildPicture object. @throws PropelException
[ "Get", "the", "associated", "ChildPicture", "object" ]
221a6c5322473d7d7f8e322958a3ee46d87da150
https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/Skill.php#L4964-L4978
10
gossi/trixionary
src/model/Base/Skill.php
Skill.setKstrukturRoot
public function setKstrukturRoot(ChildKstruktur $v = null) { if ($v === null) { $this->setKstrukturId(NULL); } else { $this->setKstrukturId($v->getId()); } $this->aKstrukturRoot = $v; // Add binding for other direction of this n:n relationship. // If this object has already been added to the ChildKstruktur object, it will not be re-added. if ($v !== null) { $v->addRootSkill($this); } return $this; }
php
public function setKstrukturRoot(ChildKstruktur $v = null) { if ($v === null) { $this->setKstrukturId(NULL); } else { $this->setKstrukturId($v->getId()); } $this->aKstrukturRoot = $v; // Add binding for other direction of this n:n relationship. // If this object has already been added to the ChildKstruktur object, it will not be re-added. if ($v !== null) { $v->addRootSkill($this); } return $this; }
[ "public", "function", "setKstrukturRoot", "(", "ChildKstruktur", "$", "v", "=", "null", ")", "{", "if", "(", "$", "v", "===", "null", ")", "{", "$", "this", "->", "setKstrukturId", "(", "NULL", ")", ";", "}", "else", "{", "$", "this", "->", "setKstrukturId", "(", "$", "v", "->", "getId", "(", ")", ")", ";", "}", "$", "this", "->", "aKstrukturRoot", "=", "$", "v", ";", "// Add binding for other direction of this n:n relationship.", "// If this object has already been added to the ChildKstruktur object, it will not be re-added.", "if", "(", "$", "v", "!==", "null", ")", "{", "$", "v", "->", "addRootSkill", "(", "$", "this", ")", ";", "}", "return", "$", "this", ";", "}" ]
Declares an association between this object and a ChildKstruktur object. @param ChildKstruktur $v @return $this|\gossi\trixionary\model\Skill The current object (for fluent API support) @throws PropelException
[ "Declares", "an", "association", "between", "this", "object", "and", "a", "ChildKstruktur", "object", "." ]
221a6c5322473d7d7f8e322958a3ee46d87da150
https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/Skill.php#L5089-L5107
11
gossi/trixionary
src/model/Base/Skill.php
Skill.getKstrukturRoot
public function getKstrukturRoot(ConnectionInterface $con = null) { if ($this->aKstrukturRoot === null && ($this->kstruktur_id !== null)) { $this->aKstrukturRoot = ChildKstrukturQuery::create()->findPk($this->kstruktur_id, $con); /* The following can be used additionally to guarantee the related object contains a reference to this object. This level of coupling may, however, be undesirable since it could result in an only partially populated collection in the referenced object. $this->aKstrukturRoot->addRootSkills($this); */ } return $this->aKstrukturRoot; }
php
public function getKstrukturRoot(ConnectionInterface $con = null) { if ($this->aKstrukturRoot === null && ($this->kstruktur_id !== null)) { $this->aKstrukturRoot = ChildKstrukturQuery::create()->findPk($this->kstruktur_id, $con); /* The following can be used additionally to guarantee the related object contains a reference to this object. This level of coupling may, however, be undesirable since it could result in an only partially populated collection in the referenced object. $this->aKstrukturRoot->addRootSkills($this); */ } return $this->aKstrukturRoot; }
[ "public", "function", "getKstrukturRoot", "(", "ConnectionInterface", "$", "con", "=", "null", ")", "{", "if", "(", "$", "this", "->", "aKstrukturRoot", "===", "null", "&&", "(", "$", "this", "->", "kstruktur_id", "!==", "null", ")", ")", "{", "$", "this", "->", "aKstrukturRoot", "=", "ChildKstrukturQuery", "::", "create", "(", ")", "->", "findPk", "(", "$", "this", "->", "kstruktur_id", ",", "$", "con", ")", ";", "/* The following can be used additionally to\n guarantee the related object contains a reference\n to this object. This level of coupling may, however, be\n undesirable since it could result in an only partially populated collection\n in the referenced object.\n $this->aKstrukturRoot->addRootSkills($this);\n */", "}", "return", "$", "this", "->", "aKstrukturRoot", ";", "}" ]
Get the associated ChildKstruktur object @param ConnectionInterface $con Optional Connection object. @return ChildKstruktur The associated ChildKstruktur object. @throws PropelException
[ "Get", "the", "associated", "ChildKstruktur", "object" ]
221a6c5322473d7d7f8e322958a3ee46d87da150
https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/Skill.php#L5117-L5131
12
gossi/trixionary
src/model/Base/Skill.php
Skill.setFunctionPhaseRoot
public function setFunctionPhaseRoot(ChildFunctionPhase $v = null) { if ($v === null) { $this->setFunctionPhaseId(NULL); } else { $this->setFunctionPhaseId($v->getId()); } $this->aFunctionPhaseRoot = $v; // Add binding for other direction of this n:n relationship. // If this object has already been added to the ChildFunctionPhase object, it will not be re-added. if ($v !== null) { $v->addRootSkill($this); } return $this; }
php
public function setFunctionPhaseRoot(ChildFunctionPhase $v = null) { if ($v === null) { $this->setFunctionPhaseId(NULL); } else { $this->setFunctionPhaseId($v->getId()); } $this->aFunctionPhaseRoot = $v; // Add binding for other direction of this n:n relationship. // If this object has already been added to the ChildFunctionPhase object, it will not be re-added. if ($v !== null) { $v->addRootSkill($this); } return $this; }
[ "public", "function", "setFunctionPhaseRoot", "(", "ChildFunctionPhase", "$", "v", "=", "null", ")", "{", "if", "(", "$", "v", "===", "null", ")", "{", "$", "this", "->", "setFunctionPhaseId", "(", "NULL", ")", ";", "}", "else", "{", "$", "this", "->", "setFunctionPhaseId", "(", "$", "v", "->", "getId", "(", ")", ")", ";", "}", "$", "this", "->", "aFunctionPhaseRoot", "=", "$", "v", ";", "// Add binding for other direction of this n:n relationship.", "// If this object has already been added to the ChildFunctionPhase object, it will not be re-added.", "if", "(", "$", "v", "!==", "null", ")", "{", "$", "v", "->", "addRootSkill", "(", "$", "this", ")", ";", "}", "return", "$", "this", ";", "}" ]
Declares an association between this object and a ChildFunctionPhase object. @param ChildFunctionPhase $v @return $this|\gossi\trixionary\model\Skill The current object (for fluent API support) @throws PropelException
[ "Declares", "an", "association", "between", "this", "object", "and", "a", "ChildFunctionPhase", "object", "." ]
221a6c5322473d7d7f8e322958a3ee46d87da150
https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/Skill.php#L5140-L5158
13
gossi/trixionary
src/model/Base/Skill.php
Skill.getFunctionPhaseRoot
public function getFunctionPhaseRoot(ConnectionInterface $con = null) { if ($this->aFunctionPhaseRoot === null && ($this->function_phase_id !== null)) { $this->aFunctionPhaseRoot = ChildFunctionPhaseQuery::create()->findPk($this->function_phase_id, $con); /* The following can be used additionally to guarantee the related object contains a reference to this object. This level of coupling may, however, be undesirable since it could result in an only partially populated collection in the referenced object. $this->aFunctionPhaseRoot->addRootSkills($this); */ } return $this->aFunctionPhaseRoot; }
php
public function getFunctionPhaseRoot(ConnectionInterface $con = null) { if ($this->aFunctionPhaseRoot === null && ($this->function_phase_id !== null)) { $this->aFunctionPhaseRoot = ChildFunctionPhaseQuery::create()->findPk($this->function_phase_id, $con); /* The following can be used additionally to guarantee the related object contains a reference to this object. This level of coupling may, however, be undesirable since it could result in an only partially populated collection in the referenced object. $this->aFunctionPhaseRoot->addRootSkills($this); */ } return $this->aFunctionPhaseRoot; }
[ "public", "function", "getFunctionPhaseRoot", "(", "ConnectionInterface", "$", "con", "=", "null", ")", "{", "if", "(", "$", "this", "->", "aFunctionPhaseRoot", "===", "null", "&&", "(", "$", "this", "->", "function_phase_id", "!==", "null", ")", ")", "{", "$", "this", "->", "aFunctionPhaseRoot", "=", "ChildFunctionPhaseQuery", "::", "create", "(", ")", "->", "findPk", "(", "$", "this", "->", "function_phase_id", ",", "$", "con", ")", ";", "/* The following can be used additionally to\n guarantee the related object contains a reference\n to this object. This level of coupling may, however, be\n undesirable since it could result in an only partially populated collection\n in the referenced object.\n $this->aFunctionPhaseRoot->addRootSkills($this);\n */", "}", "return", "$", "this", "->", "aFunctionPhaseRoot", ";", "}" ]
Get the associated ChildFunctionPhase object @param ConnectionInterface $con Optional Connection object. @return ChildFunctionPhase The associated ChildFunctionPhase object. @throws PropelException
[ "Get", "the", "associated", "ChildFunctionPhase", "object" ]
221a6c5322473d7d7f8e322958a3ee46d87da150
https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/Skill.php#L5168-L5182
14
gossi/trixionary
src/model/Base/Skill.php
Skill.initVariations
public function initVariations($overrideExisting = true) { if (null !== $this->collVariations && !$overrideExisting) { return; } $this->collVariations = new ObjectCollection(); $this->collVariations->setModel('\gossi\trixionary\model\Skill'); }
php
public function initVariations($overrideExisting = true) { if (null !== $this->collVariations && !$overrideExisting) { return; } $this->collVariations = new ObjectCollection(); $this->collVariations->setModel('\gossi\trixionary\model\Skill'); }
[ "public", "function", "initVariations", "(", "$", "overrideExisting", "=", "true", ")", "{", "if", "(", "null", "!==", "$", "this", "->", "collVariations", "&&", "!", "$", "overrideExisting", ")", "{", "return", ";", "}", "$", "this", "->", "collVariations", "=", "new", "ObjectCollection", "(", ")", ";", "$", "this", "->", "collVariations", "->", "setModel", "(", "'\\gossi\\trixionary\\model\\Skill'", ")", ";", "}" ]
Initializes the collVariations collection. By default this just sets the collVariations collection to an empty array (like clearcollVariations()); 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 database. @param boolean $overrideExisting If set to true, the method call initializes the collection even if it is not empty @return void
[ "Initializes", "the", "collVariations", "collection", "." ]
221a6c5322473d7d7f8e322958a3ee46d87da150
https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/Skill.php#L5279-L5286
15
gossi/trixionary
src/model/Base/Skill.php
Skill.getVariationsJoinSport
public function getVariationsJoinSport(Criteria $criteria = null, ConnectionInterface $con = null, $joinBehavior = Criteria::LEFT_JOIN) { $query = ChildSkillQuery::create(null, $criteria); $query->joinWith('Sport', $joinBehavior); return $this->getVariations($query, $con); }
php
public function getVariationsJoinSport(Criteria $criteria = null, ConnectionInterface $con = null, $joinBehavior = Criteria::LEFT_JOIN) { $query = ChildSkillQuery::create(null, $criteria); $query->joinWith('Sport', $joinBehavior); return $this->getVariations($query, $con); }
[ "public", "function", "getVariationsJoinSport", "(", "Criteria", "$", "criteria", "=", "null", ",", "ConnectionInterface", "$", "con", "=", "null", ",", "$", "joinBehavior", "=", "Criteria", "::", "LEFT_JOIN", ")", "{", "$", "query", "=", "ChildSkillQuery", "::", "create", "(", "null", ",", "$", "criteria", ")", ";", "$", "query", "->", "joinWith", "(", "'Sport'", ",", "$", "joinBehavior", ")", ";", "return", "$", "this", "->", "getVariations", "(", "$", "query", ",", "$", "con", ")", ";", "}" ]
If this collection has already been initialized with an identical criteria, it returns the collection. Otherwise if this Skill is new, it will return an empty collection; or if this Skill has previously been saved, it will retrieve related Variations from storage. This method is protected by default in order to keep the public api reasonable. You can provide public methods for those you actually need in Skill. @param Criteria $criteria optional Criteria object to narrow the query @param ConnectionInterface $con optional connection object @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) @return ObjectCollection|ChildSkill[] List of ChildSkill objects
[ "If", "this", "collection", "has", "already", "been", "initialized", "with", "an", "identical", "criteria", "it", "returns", "the", "collection", ".", "Otherwise", "if", "this", "Skill", "is", "new", "it", "will", "return", "an", "empty", "collection", ";", "or", "if", "this", "Skill", "has", "previously", "been", "saved", "it", "will", "retrieve", "related", "Variations", "from", "storage", "." ]
221a6c5322473d7d7f8e322958a3ee46d87da150
https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/Skill.php#L5480-L5486
16
gossi/trixionary
src/model/Base/Skill.php
Skill.initMultiples
public function initMultiples($overrideExisting = true) { if (null !== $this->collMultiples && !$overrideExisting) { return; } $this->collMultiples = new ObjectCollection(); $this->collMultiples->setModel('\gossi\trixionary\model\Skill'); }
php
public function initMultiples($overrideExisting = true) { if (null !== $this->collMultiples && !$overrideExisting) { return; } $this->collMultiples = new ObjectCollection(); $this->collMultiples->setModel('\gossi\trixionary\model\Skill'); }
[ "public", "function", "initMultiples", "(", "$", "overrideExisting", "=", "true", ")", "{", "if", "(", "null", "!==", "$", "this", "->", "collMultiples", "&&", "!", "$", "overrideExisting", ")", "{", "return", ";", "}", "$", "this", "->", "collMultiples", "=", "new", "ObjectCollection", "(", ")", ";", "$", "this", "->", "collMultiples", "->", "setModel", "(", "'\\gossi\\trixionary\\model\\Skill'", ")", ";", "}" ]
Initializes the collMultiples collection. By default this just sets the collMultiples collection to an empty array (like clearcollMultiples()); 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 database. @param boolean $overrideExisting If set to true, the method call initializes the collection even if it is not empty @return void
[ "Initializes", "the", "collMultiples", "collection", "." ]
221a6c5322473d7d7f8e322958a3ee46d87da150
https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/Skill.php#L5722-L5729
17
gossi/trixionary
src/model/Base/Skill.php
Skill.getMultiplesJoinFunctionPhaseRoot
public function getMultiplesJoinFunctionPhaseRoot(Criteria $criteria = null, ConnectionInterface $con = null, $joinBehavior = Criteria::LEFT_JOIN) { $query = ChildSkillQuery::create(null, $criteria); $query->joinWith('FunctionPhaseRoot', $joinBehavior); return $this->getMultiples($query, $con); }
php
public function getMultiplesJoinFunctionPhaseRoot(Criteria $criteria = null, ConnectionInterface $con = null, $joinBehavior = Criteria::LEFT_JOIN) { $query = ChildSkillQuery::create(null, $criteria); $query->joinWith('FunctionPhaseRoot', $joinBehavior); return $this->getMultiples($query, $con); }
[ "public", "function", "getMultiplesJoinFunctionPhaseRoot", "(", "Criteria", "$", "criteria", "=", "null", ",", "ConnectionInterface", "$", "con", "=", "null", ",", "$", "joinBehavior", "=", "Criteria", "::", "LEFT_JOIN", ")", "{", "$", "query", "=", "ChildSkillQuery", "::", "create", "(", "null", ",", "$", "criteria", ")", ";", "$", "query", "->", "joinWith", "(", "'FunctionPhaseRoot'", ",", "$", "joinBehavior", ")", ";", "return", "$", "this", "->", "getMultiples", "(", "$", "query", ",", "$", "con", ")", ";", "}" ]
If this collection has already been initialized with an identical criteria, it returns the collection. Otherwise if this Skill is new, it will return an empty collection; or if this Skill has previously been saved, it will retrieve related Multiples from storage. This method is protected by default in order to keep the public api reasonable. You can provide public methods for those you actually need in Skill. @param Criteria $criteria optional Criteria object to narrow the query @param ConnectionInterface $con optional connection object @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) @return ObjectCollection|ChildSkill[] List of ChildSkill objects
[ "If", "this", "collection", "has", "already", "been", "initialized", "with", "an", "identical", "criteria", "it", "returns", "the", "collection", ".", "Otherwise", "if", "this", "Skill", "is", "new", "it", "will", "return", "an", "empty", "collection", ";", "or", "if", "this", "Skill", "has", "previously", "been", "saved", "it", "will", "retrieve", "related", "Multiples", "from", "storage", "." ]
221a6c5322473d7d7f8e322958a3ee46d87da150
https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/Skill.php#L6123-L6129
18
gossi/trixionary
src/model/Base/Skill.php
Skill.initLineagesRelatedBySkillId
public function initLineagesRelatedBySkillId($overrideExisting = true) { if (null !== $this->collLineagesRelatedBySkillId && !$overrideExisting) { return; } $this->collLineagesRelatedBySkillId = new ObjectCollection(); $this->collLineagesRelatedBySkillId->setModel('\gossi\trixionary\model\Lineage'); }
php
public function initLineagesRelatedBySkillId($overrideExisting = true) { if (null !== $this->collLineagesRelatedBySkillId && !$overrideExisting) { return; } $this->collLineagesRelatedBySkillId = new ObjectCollection(); $this->collLineagesRelatedBySkillId->setModel('\gossi\trixionary\model\Lineage'); }
[ "public", "function", "initLineagesRelatedBySkillId", "(", "$", "overrideExisting", "=", "true", ")", "{", "if", "(", "null", "!==", "$", "this", "->", "collLineagesRelatedBySkillId", "&&", "!", "$", "overrideExisting", ")", "{", "return", ";", "}", "$", "this", "->", "collLineagesRelatedBySkillId", "=", "new", "ObjectCollection", "(", ")", ";", "$", "this", "->", "collLineagesRelatedBySkillId", "->", "setModel", "(", "'\\gossi\\trixionary\\model\\Lineage'", ")", ";", "}" ]
Initializes the collLineagesRelatedBySkillId collection. By default this just sets the collLineagesRelatedBySkillId collection to an empty array (like clearcollLineagesRelatedBySkillId()); 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 database. @param boolean $overrideExisting If set to true, the method call initializes the collection even if it is not empty @return void
[ "Initializes", "the", "collLineagesRelatedBySkillId", "collection", "." ]
221a6c5322473d7d7f8e322958a3ee46d87da150
https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/Skill.php#L6165-L6172
19
gossi/trixionary
src/model/Base/Skill.php
Skill.initLineagesRelatedByAncestorId
public function initLineagesRelatedByAncestorId($overrideExisting = true) { if (null !== $this->collLineagesRelatedByAncestorId && !$overrideExisting) { return; } $this->collLineagesRelatedByAncestorId = new ObjectCollection(); $this->collLineagesRelatedByAncestorId->setModel('\gossi\trixionary\model\Lineage'); }
php
public function initLineagesRelatedByAncestorId($overrideExisting = true) { if (null !== $this->collLineagesRelatedByAncestorId && !$overrideExisting) { return; } $this->collLineagesRelatedByAncestorId = new ObjectCollection(); $this->collLineagesRelatedByAncestorId->setModel('\gossi\trixionary\model\Lineage'); }
[ "public", "function", "initLineagesRelatedByAncestorId", "(", "$", "overrideExisting", "=", "true", ")", "{", "if", "(", "null", "!==", "$", "this", "->", "collLineagesRelatedByAncestorId", "&&", "!", "$", "overrideExisting", ")", "{", "return", ";", "}", "$", "this", "->", "collLineagesRelatedByAncestorId", "=", "new", "ObjectCollection", "(", ")", ";", "$", "this", "->", "collLineagesRelatedByAncestorId", "->", "setModel", "(", "'\\gossi\\trixionary\\model\\Lineage'", ")", ";", "}" ]
Initializes the collLineagesRelatedByAncestorId collection. By default this just sets the collLineagesRelatedByAncestorId collection to an empty array (like clearcollLineagesRelatedByAncestorId()); 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 database. @param boolean $overrideExisting If set to true, the method call initializes the collection even if it is not empty @return void
[ "Initializes", "the", "collLineagesRelatedByAncestorId", "collection", "." ]
221a6c5322473d7d7f8e322958a3ee46d87da150
https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/Skill.php#L6383-L6390
20
gossi/trixionary
src/model/Base/Skill.php
Skill.initChildren
public function initChildren($overrideExisting = true) { if (null !== $this->collChildren && !$overrideExisting) { return; } $this->collChildren = new ObjectCollection(); $this->collChildren->setModel('\gossi\trixionary\model\SkillDependency'); }
php
public function initChildren($overrideExisting = true) { if (null !== $this->collChildren && !$overrideExisting) { return; } $this->collChildren = new ObjectCollection(); $this->collChildren->setModel('\gossi\trixionary\model\SkillDependency'); }
[ "public", "function", "initChildren", "(", "$", "overrideExisting", "=", "true", ")", "{", "if", "(", "null", "!==", "$", "this", "->", "collChildren", "&&", "!", "$", "overrideExisting", ")", "{", "return", ";", "}", "$", "this", "->", "collChildren", "=", "new", "ObjectCollection", "(", ")", ";", "$", "this", "->", "collChildren", "->", "setModel", "(", "'\\gossi\\trixionary\\model\\SkillDependency'", ")", ";", "}" ]
Initializes the collChildren collection. By default this just sets the collChildren collection to an empty array (like clearcollChildren()); 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 database. @param boolean $overrideExisting If set to true, the method call initializes the collection even if it is not empty @return void
[ "Initializes", "the", "collChildren", "collection", "." ]
221a6c5322473d7d7f8e322958a3ee46d87da150
https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/Skill.php#L6601-L6608
21
gossi/trixionary
src/model/Base/Skill.php
Skill.initParents
public function initParents($overrideExisting = true) { if (null !== $this->collParents && !$overrideExisting) { return; } $this->collParents = new ObjectCollection(); $this->collParents->setModel('\gossi\trixionary\model\SkillDependency'); }
php
public function initParents($overrideExisting = true) { if (null !== $this->collParents && !$overrideExisting) { return; } $this->collParents = new ObjectCollection(); $this->collParents->setModel('\gossi\trixionary\model\SkillDependency'); }
[ "public", "function", "initParents", "(", "$", "overrideExisting", "=", "true", ")", "{", "if", "(", "null", "!==", "$", "this", "->", "collParents", "&&", "!", "$", "overrideExisting", ")", "{", "return", ";", "}", "$", "this", "->", "collParents", "=", "new", "ObjectCollection", "(", ")", ";", "$", "this", "->", "collParents", "->", "setModel", "(", "'\\gossi\\trixionary\\model\\SkillDependency'", ")", ";", "}" ]
Initializes the collParents collection. By default this just sets the collParents collection to an empty array (like clearcollParents()); 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 database. @param boolean $overrideExisting If set to true, the method call initializes the collection even if it is not empty @return void
[ "Initializes", "the", "collParents", "collection", "." ]
221a6c5322473d7d7f8e322958a3ee46d87da150
https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/Skill.php#L6822-L6829
22
gossi/trixionary
src/model/Base/Skill.php
Skill.initParts
public function initParts($overrideExisting = true) { if (null !== $this->collParts && !$overrideExisting) { return; } $this->collParts = new ObjectCollection(); $this->collParts->setModel('\gossi\trixionary\model\SkillPart'); }
php
public function initParts($overrideExisting = true) { if (null !== $this->collParts && !$overrideExisting) { return; } $this->collParts = new ObjectCollection(); $this->collParts->setModel('\gossi\trixionary\model\SkillPart'); }
[ "public", "function", "initParts", "(", "$", "overrideExisting", "=", "true", ")", "{", "if", "(", "null", "!==", "$", "this", "->", "collParts", "&&", "!", "$", "overrideExisting", ")", "{", "return", ";", "}", "$", "this", "->", "collParts", "=", "new", "ObjectCollection", "(", ")", ";", "$", "this", "->", "collParts", "->", "setModel", "(", "'\\gossi\\trixionary\\model\\SkillPart'", ")", ";", "}" ]
Initializes the collParts collection. By default this just sets the collParts collection to an empty array (like clearcollParts()); 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 database. @param boolean $overrideExisting If set to true, the method call initializes the collection even if it is not empty @return void
[ "Initializes", "the", "collParts", "collection", "." ]
221a6c5322473d7d7f8e322958a3ee46d87da150
https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/Skill.php#L7043-L7050
23
gossi/trixionary
src/model/Base/Skill.php
Skill.initComposites
public function initComposites($overrideExisting = true) { if (null !== $this->collComposites && !$overrideExisting) { return; } $this->collComposites = new ObjectCollection(); $this->collComposites->setModel('\gossi\trixionary\model\SkillPart'); }
php
public function initComposites($overrideExisting = true) { if (null !== $this->collComposites && !$overrideExisting) { return; } $this->collComposites = new ObjectCollection(); $this->collComposites->setModel('\gossi\trixionary\model\SkillPart'); }
[ "public", "function", "initComposites", "(", "$", "overrideExisting", "=", "true", ")", "{", "if", "(", "null", "!==", "$", "this", "->", "collComposites", "&&", "!", "$", "overrideExisting", ")", "{", "return", ";", "}", "$", "this", "->", "collComposites", "=", "new", "ObjectCollection", "(", ")", ";", "$", "this", "->", "collComposites", "->", "setModel", "(", "'\\gossi\\trixionary\\model\\SkillPart'", ")", ";", "}" ]
Initializes the collComposites collection. By default this just sets the collComposites collection to an empty array (like clearcollComposites()); 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 database. @param boolean $overrideExisting If set to true, the method call initializes the collection even if it is not empty @return void
[ "Initializes", "the", "collComposites", "collection", "." ]
221a6c5322473d7d7f8e322958a3ee46d87da150
https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/Skill.php#L7264-L7271
24
gossi/trixionary
src/model/Base/Skill.php
Skill.initSkillGroups
public function initSkillGroups($overrideExisting = true) { if (null !== $this->collSkillGroups && !$overrideExisting) { return; } $this->collSkillGroups = new ObjectCollection(); $this->collSkillGroups->setModel('\gossi\trixionary\model\SkillGroup'); }
php
public function initSkillGroups($overrideExisting = true) { if (null !== $this->collSkillGroups && !$overrideExisting) { return; } $this->collSkillGroups = new ObjectCollection(); $this->collSkillGroups->setModel('\gossi\trixionary\model\SkillGroup'); }
[ "public", "function", "initSkillGroups", "(", "$", "overrideExisting", "=", "true", ")", "{", "if", "(", "null", "!==", "$", "this", "->", "collSkillGroups", "&&", "!", "$", "overrideExisting", ")", "{", "return", ";", "}", "$", "this", "->", "collSkillGroups", "=", "new", "ObjectCollection", "(", ")", ";", "$", "this", "->", "collSkillGroups", "->", "setModel", "(", "'\\gossi\\trixionary\\model\\SkillGroup'", ")", ";", "}" ]
Initializes the collSkillGroups collection. By default this just sets the collSkillGroups collection to an empty array (like clearcollSkillGroups()); 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 database. @param boolean $overrideExisting If set to true, the method call initializes the collection even if it is not empty @return void
[ "Initializes", "the", "collSkillGroups", "collection", "." ]
221a6c5322473d7d7f8e322958a3ee46d87da150
https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/Skill.php#L7485-L7492
25
gossi/trixionary
src/model/Base/Skill.php
Skill.getSkillGroups
public function getSkillGroups(Criteria $criteria = null, ConnectionInterface $con = null) { $partial = $this->collSkillGroupsPartial && !$this->isNew(); if (null === $this->collSkillGroups || null !== $criteria || $partial) { if ($this->isNew() && null === $this->collSkillGroups) { // return empty collection $this->initSkillGroups(); } else { $collSkillGroups = ChildSkillGroupQuery::create(null, $criteria) ->filterBySkill($this) ->find($con); if (null !== $criteria) { if (false !== $this->collSkillGroupsPartial && count($collSkillGroups)) { $this->initSkillGroups(false); foreach ($collSkillGroups as $obj) { if (false == $this->collSkillGroups->contains($obj)) { $this->collSkillGroups->append($obj); } } $this->collSkillGroupsPartial = true; } return $collSkillGroups; } if ($partial && $this->collSkillGroups) { foreach ($this->collSkillGroups as $obj) { if ($obj->isNew()) { $collSkillGroups[] = $obj; } } } $this->collSkillGroups = $collSkillGroups; $this->collSkillGroupsPartial = false; } } return $this->collSkillGroups; }
php
public function getSkillGroups(Criteria $criteria = null, ConnectionInterface $con = null) { $partial = $this->collSkillGroupsPartial && !$this->isNew(); if (null === $this->collSkillGroups || null !== $criteria || $partial) { if ($this->isNew() && null === $this->collSkillGroups) { // return empty collection $this->initSkillGroups(); } else { $collSkillGroups = ChildSkillGroupQuery::create(null, $criteria) ->filterBySkill($this) ->find($con); if (null !== $criteria) { if (false !== $this->collSkillGroupsPartial && count($collSkillGroups)) { $this->initSkillGroups(false); foreach ($collSkillGroups as $obj) { if (false == $this->collSkillGroups->contains($obj)) { $this->collSkillGroups->append($obj); } } $this->collSkillGroupsPartial = true; } return $collSkillGroups; } if ($partial && $this->collSkillGroups) { foreach ($this->collSkillGroups as $obj) { if ($obj->isNew()) { $collSkillGroups[] = $obj; } } } $this->collSkillGroups = $collSkillGroups; $this->collSkillGroupsPartial = false; } } return $this->collSkillGroups; }
[ "public", "function", "getSkillGroups", "(", "Criteria", "$", "criteria", "=", "null", ",", "ConnectionInterface", "$", "con", "=", "null", ")", "{", "$", "partial", "=", "$", "this", "->", "collSkillGroupsPartial", "&&", "!", "$", "this", "->", "isNew", "(", ")", ";", "if", "(", "null", "===", "$", "this", "->", "collSkillGroups", "||", "null", "!==", "$", "criteria", "||", "$", "partial", ")", "{", "if", "(", "$", "this", "->", "isNew", "(", ")", "&&", "null", "===", "$", "this", "->", "collSkillGroups", ")", "{", "// return empty collection", "$", "this", "->", "initSkillGroups", "(", ")", ";", "}", "else", "{", "$", "collSkillGroups", "=", "ChildSkillGroupQuery", "::", "create", "(", "null", ",", "$", "criteria", ")", "->", "filterBySkill", "(", "$", "this", ")", "->", "find", "(", "$", "con", ")", ";", "if", "(", "null", "!==", "$", "criteria", ")", "{", "if", "(", "false", "!==", "$", "this", "->", "collSkillGroupsPartial", "&&", "count", "(", "$", "collSkillGroups", ")", ")", "{", "$", "this", "->", "initSkillGroups", "(", "false", ")", ";", "foreach", "(", "$", "collSkillGroups", "as", "$", "obj", ")", "{", "if", "(", "false", "==", "$", "this", "->", "collSkillGroups", "->", "contains", "(", "$", "obj", ")", ")", "{", "$", "this", "->", "collSkillGroups", "->", "append", "(", "$", "obj", ")", ";", "}", "}", "$", "this", "->", "collSkillGroupsPartial", "=", "true", ";", "}", "return", "$", "collSkillGroups", ";", "}", "if", "(", "$", "partial", "&&", "$", "this", "->", "collSkillGroups", ")", "{", "foreach", "(", "$", "this", "->", "collSkillGroups", "as", "$", "obj", ")", "{", "if", "(", "$", "obj", "->", "isNew", "(", ")", ")", "{", "$", "collSkillGroups", "[", "]", "=", "$", "obj", ";", "}", "}", "}", "$", "this", "->", "collSkillGroups", "=", "$", "collSkillGroups", ";", "$", "this", "->", "collSkillGroupsPartial", "=", "false", ";", "}", "}", "return", "$", "this", "->", "collSkillGroups", ";", "}" ]
Gets an array of ChildSkillGroup 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 cached collection is returned. If this ChildSkill is new, it will return an empty collection or the current collection; the criteria is ignored on a new object. @param Criteria $criteria optional Criteria object to narrow the query @param ConnectionInterface $con optional connection object @return ObjectCollection|ChildSkillGroup[] List of ChildSkillGroup objects @throws PropelException
[ "Gets", "an", "array", "of", "ChildSkillGroup", "objects", "which", "contain", "a", "foreign", "key", "that", "references", "this", "object", "." ]
221a6c5322473d7d7f8e322958a3ee46d87da150
https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/Skill.php#L7508-L7550
26
gossi/trixionary
src/model/Base/Skill.php
Skill.addSkillGroup
public function addSkillGroup(ChildSkillGroup $l) { if ($this->collSkillGroups === null) { $this->initSkillGroups(); $this->collSkillGroupsPartial = true; } if (!$this->collSkillGroups->contains($l)) { $this->doAddSkillGroup($l); } return $this; }
php
public function addSkillGroup(ChildSkillGroup $l) { if ($this->collSkillGroups === null) { $this->initSkillGroups(); $this->collSkillGroupsPartial = true; } if (!$this->collSkillGroups->contains($l)) { $this->doAddSkillGroup($l); } return $this; }
[ "public", "function", "addSkillGroup", "(", "ChildSkillGroup", "$", "l", ")", "{", "if", "(", "$", "this", "->", "collSkillGroups", "===", "null", ")", "{", "$", "this", "->", "initSkillGroups", "(", ")", ";", "$", "this", "->", "collSkillGroupsPartial", "=", "true", ";", "}", "if", "(", "!", "$", "this", "->", "collSkillGroups", "->", "contains", "(", "$", "l", ")", ")", "{", "$", "this", "->", "doAddSkillGroup", "(", "$", "l", ")", ";", "}", "return", "$", "this", ";", "}" ]
Method called to associate a ChildSkillGroup object to this object through the ChildSkillGroup foreign key attribute. @param ChildSkillGroup $l ChildSkillGroup @return $this|\gossi\trixionary\model\Skill The current object (for fluent API support)
[ "Method", "called", "to", "associate", "a", "ChildSkillGroup", "object", "to", "this", "object", "through", "the", "ChildSkillGroup", "foreign", "key", "attribute", "." ]
221a6c5322473d7d7f8e322958a3ee46d87da150
https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/Skill.php#L7629-L7641
27
gossi/trixionary
src/model/Base/Skill.php
Skill.getSkillGroupsJoinGroup
public function getSkillGroupsJoinGroup(Criteria $criteria = null, ConnectionInterface $con = null, $joinBehavior = Criteria::LEFT_JOIN) { $query = ChildSkillGroupQuery::create(null, $criteria); $query->joinWith('Group', $joinBehavior); return $this->getSkillGroups($query, $con); }
php
public function getSkillGroupsJoinGroup(Criteria $criteria = null, ConnectionInterface $con = null, $joinBehavior = Criteria::LEFT_JOIN) { $query = ChildSkillGroupQuery::create(null, $criteria); $query->joinWith('Group', $joinBehavior); return $this->getSkillGroups($query, $con); }
[ "public", "function", "getSkillGroupsJoinGroup", "(", "Criteria", "$", "criteria", "=", "null", ",", "ConnectionInterface", "$", "con", "=", "null", ",", "$", "joinBehavior", "=", "Criteria", "::", "LEFT_JOIN", ")", "{", "$", "query", "=", "ChildSkillGroupQuery", "::", "create", "(", "null", ",", "$", "criteria", ")", ";", "$", "query", "->", "joinWith", "(", "'Group'", ",", "$", "joinBehavior", ")", ";", "return", "$", "this", "->", "getSkillGroups", "(", "$", "query", ",", "$", "con", ")", ";", "}" ]
If this collection has already been initialized with an identical criteria, it returns the collection. Otherwise if this Skill is new, it will return an empty collection; or if this Skill has previously been saved, it will retrieve related SkillGroups from storage. This method is protected by default in order to keep the public api reasonable. You can provide public methods for those you actually need in Skill. @param Criteria $criteria optional Criteria object to narrow the query @param ConnectionInterface $con optional connection object @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) @return ObjectCollection|ChildSkillGroup[] List of ChildSkillGroup objects
[ "If", "this", "collection", "has", "already", "been", "initialized", "with", "an", "identical", "criteria", "it", "returns", "the", "collection", ".", "Otherwise", "if", "this", "Skill", "is", "new", "it", "will", "return", "an", "empty", "collection", ";", "or", "if", "this", "Skill", "has", "previously", "been", "saved", "it", "will", "retrieve", "related", "SkillGroups", "from", "storage", "." ]
221a6c5322473d7d7f8e322958a3ee46d87da150
https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/Skill.php#L7689-L7695
28
gossi/trixionary
src/model/Base/Skill.php
Skill.initPictures
public function initPictures($overrideExisting = true) { if (null !== $this->collPictures && !$overrideExisting) { return; } $this->collPictures = new ObjectCollection(); $this->collPictures->setModel('\gossi\trixionary\model\Picture'); }
php
public function initPictures($overrideExisting = true) { if (null !== $this->collPictures && !$overrideExisting) { return; } $this->collPictures = new ObjectCollection(); $this->collPictures->setModel('\gossi\trixionary\model\Picture'); }
[ "public", "function", "initPictures", "(", "$", "overrideExisting", "=", "true", ")", "{", "if", "(", "null", "!==", "$", "this", "->", "collPictures", "&&", "!", "$", "overrideExisting", ")", "{", "return", ";", "}", "$", "this", "->", "collPictures", "=", "new", "ObjectCollection", "(", ")", ";", "$", "this", "->", "collPictures", "->", "setModel", "(", "'\\gossi\\trixionary\\model\\Picture'", ")", ";", "}" ]
Initializes the collPictures collection. By default this just sets the collPictures collection to an empty array (like clearcollPictures()); 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 database. @param boolean $overrideExisting If set to true, the method call initializes the collection even if it is not empty @return void
[ "Initializes", "the", "collPictures", "collection", "." ]
221a6c5322473d7d7f8e322958a3ee46d87da150
https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/Skill.php#L7731-L7738
29
gossi/trixionary
src/model/Base/Skill.php
Skill.getPictures
public function getPictures(Criteria $criteria = null, ConnectionInterface $con = null) { $partial = $this->collPicturesPartial && !$this->isNew(); if (null === $this->collPictures || null !== $criteria || $partial) { if ($this->isNew() && null === $this->collPictures) { // return empty collection $this->initPictures(); } else { $collPictures = ChildPictureQuery::create(null, $criteria) ->filterBySkill($this) ->find($con); if (null !== $criteria) { if (false !== $this->collPicturesPartial && count($collPictures)) { $this->initPictures(false); foreach ($collPictures as $obj) { if (false == $this->collPictures->contains($obj)) { $this->collPictures->append($obj); } } $this->collPicturesPartial = true; } return $collPictures; } if ($partial && $this->collPictures) { foreach ($this->collPictures as $obj) { if ($obj->isNew()) { $collPictures[] = $obj; } } } $this->collPictures = $collPictures; $this->collPicturesPartial = false; } } return $this->collPictures; }
php
public function getPictures(Criteria $criteria = null, ConnectionInterface $con = null) { $partial = $this->collPicturesPartial && !$this->isNew(); if (null === $this->collPictures || null !== $criteria || $partial) { if ($this->isNew() && null === $this->collPictures) { // return empty collection $this->initPictures(); } else { $collPictures = ChildPictureQuery::create(null, $criteria) ->filterBySkill($this) ->find($con); if (null !== $criteria) { if (false !== $this->collPicturesPartial && count($collPictures)) { $this->initPictures(false); foreach ($collPictures as $obj) { if (false == $this->collPictures->contains($obj)) { $this->collPictures->append($obj); } } $this->collPicturesPartial = true; } return $collPictures; } if ($partial && $this->collPictures) { foreach ($this->collPictures as $obj) { if ($obj->isNew()) { $collPictures[] = $obj; } } } $this->collPictures = $collPictures; $this->collPicturesPartial = false; } } return $this->collPictures; }
[ "public", "function", "getPictures", "(", "Criteria", "$", "criteria", "=", "null", ",", "ConnectionInterface", "$", "con", "=", "null", ")", "{", "$", "partial", "=", "$", "this", "->", "collPicturesPartial", "&&", "!", "$", "this", "->", "isNew", "(", ")", ";", "if", "(", "null", "===", "$", "this", "->", "collPictures", "||", "null", "!==", "$", "criteria", "||", "$", "partial", ")", "{", "if", "(", "$", "this", "->", "isNew", "(", ")", "&&", "null", "===", "$", "this", "->", "collPictures", ")", "{", "// return empty collection", "$", "this", "->", "initPictures", "(", ")", ";", "}", "else", "{", "$", "collPictures", "=", "ChildPictureQuery", "::", "create", "(", "null", ",", "$", "criteria", ")", "->", "filterBySkill", "(", "$", "this", ")", "->", "find", "(", "$", "con", ")", ";", "if", "(", "null", "!==", "$", "criteria", ")", "{", "if", "(", "false", "!==", "$", "this", "->", "collPicturesPartial", "&&", "count", "(", "$", "collPictures", ")", ")", "{", "$", "this", "->", "initPictures", "(", "false", ")", ";", "foreach", "(", "$", "collPictures", "as", "$", "obj", ")", "{", "if", "(", "false", "==", "$", "this", "->", "collPictures", "->", "contains", "(", "$", "obj", ")", ")", "{", "$", "this", "->", "collPictures", "->", "append", "(", "$", "obj", ")", ";", "}", "}", "$", "this", "->", "collPicturesPartial", "=", "true", ";", "}", "return", "$", "collPictures", ";", "}", "if", "(", "$", "partial", "&&", "$", "this", "->", "collPictures", ")", "{", "foreach", "(", "$", "this", "->", "collPictures", "as", "$", "obj", ")", "{", "if", "(", "$", "obj", "->", "isNew", "(", ")", ")", "{", "$", "collPictures", "[", "]", "=", "$", "obj", ";", "}", "}", "}", "$", "this", "->", "collPictures", "=", "$", "collPictures", ";", "$", "this", "->", "collPicturesPartial", "=", "false", ";", "}", "}", "return", "$", "this", "->", "collPictures", ";", "}" ]
Gets an array of ChildPicture 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 cached collection is returned. If this ChildSkill is new, it will return an empty collection or the current collection; the criteria is ignored on a new object. @param Criteria $criteria optional Criteria object to narrow the query @param ConnectionInterface $con optional connection object @return ObjectCollection|ChildPicture[] List of ChildPicture objects @throws PropelException
[ "Gets", "an", "array", "of", "ChildPicture", "objects", "which", "contain", "a", "foreign", "key", "that", "references", "this", "object", "." ]
221a6c5322473d7d7f8e322958a3ee46d87da150
https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/Skill.php#L7754-L7796
30
gossi/trixionary
src/model/Base/Skill.php
Skill.countPictures
public function countPictures(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) { $partial = $this->collPicturesPartial && !$this->isNew(); if (null === $this->collPictures || null !== $criteria || $partial) { if ($this->isNew() && null === $this->collPictures) { return 0; } if ($partial && !$criteria) { return count($this->getPictures()); } $query = ChildPictureQuery::create(null, $criteria); if ($distinct) { $query->distinct(); } return $query ->filterBySkill($this) ->count($con); } return count($this->collPictures); }
php
public function countPictures(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) { $partial = $this->collPicturesPartial && !$this->isNew(); if (null === $this->collPictures || null !== $criteria || $partial) { if ($this->isNew() && null === $this->collPictures) { return 0; } if ($partial && !$criteria) { return count($this->getPictures()); } $query = ChildPictureQuery::create(null, $criteria); if ($distinct) { $query->distinct(); } return $query ->filterBySkill($this) ->count($con); } return count($this->collPictures); }
[ "public", "function", "countPictures", "(", "Criteria", "$", "criteria", "=", "null", ",", "$", "distinct", "=", "false", ",", "ConnectionInterface", "$", "con", "=", "null", ")", "{", "$", "partial", "=", "$", "this", "->", "collPicturesPartial", "&&", "!", "$", "this", "->", "isNew", "(", ")", ";", "if", "(", "null", "===", "$", "this", "->", "collPictures", "||", "null", "!==", "$", "criteria", "||", "$", "partial", ")", "{", "if", "(", "$", "this", "->", "isNew", "(", ")", "&&", "null", "===", "$", "this", "->", "collPictures", ")", "{", "return", "0", ";", "}", "if", "(", "$", "partial", "&&", "!", "$", "criteria", ")", "{", "return", "count", "(", "$", "this", "->", "getPictures", "(", ")", ")", ";", "}", "$", "query", "=", "ChildPictureQuery", "::", "create", "(", "null", ",", "$", "criteria", ")", ";", "if", "(", "$", "distinct", ")", "{", "$", "query", "->", "distinct", "(", ")", ";", "}", "return", "$", "query", "->", "filterBySkill", "(", "$", "this", ")", "->", "count", "(", "$", "con", ")", ";", "}", "return", "count", "(", "$", "this", "->", "collPictures", ")", ";", "}" ]
Returns the number of related Picture objects. @param Criteria $criteria @param boolean $distinct @param ConnectionInterface $con @return int Count of related Picture objects. @throws PropelException
[ "Returns", "the", "number", "of", "related", "Picture", "objects", "." ]
221a6c5322473d7d7f8e322958a3ee46d87da150
https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/Skill.php#L7840-L7863
31
gossi/trixionary
src/model/Base/Skill.php
Skill.addPicture
public function addPicture(ChildPicture $l) { if ($this->collPictures === null) { $this->initPictures(); $this->collPicturesPartial = true; } if (!$this->collPictures->contains($l)) { $this->doAddPicture($l); } return $this; }
php
public function addPicture(ChildPicture $l) { if ($this->collPictures === null) { $this->initPictures(); $this->collPicturesPartial = true; } if (!$this->collPictures->contains($l)) { $this->doAddPicture($l); } return $this; }
[ "public", "function", "addPicture", "(", "ChildPicture", "$", "l", ")", "{", "if", "(", "$", "this", "->", "collPictures", "===", "null", ")", "{", "$", "this", "->", "initPictures", "(", ")", ";", "$", "this", "->", "collPicturesPartial", "=", "true", ";", "}", "if", "(", "!", "$", "this", "->", "collPictures", "->", "contains", "(", "$", "l", ")", ")", "{", "$", "this", "->", "doAddPicture", "(", "$", "l", ")", ";", "}", "return", "$", "this", ";", "}" ]
Method called to associate a ChildPicture object to this object through the ChildPicture foreign key attribute. @param ChildPicture $l ChildPicture @return $this|\gossi\trixionary\model\Skill The current object (for fluent API support)
[ "Method", "called", "to", "associate", "a", "ChildPicture", "object", "to", "this", "object", "through", "the", "ChildPicture", "foreign", "key", "attribute", "." ]
221a6c5322473d7d7f8e322958a3ee46d87da150
https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/Skill.php#L7872-L7884
32
gossi/trixionary
src/model/Base/Skill.php
Skill.initVideos
public function initVideos($overrideExisting = true) { if (null !== $this->collVideos && !$overrideExisting) { return; } $this->collVideos = new ObjectCollection(); $this->collVideos->setModel('\gossi\trixionary\model\Video'); }
php
public function initVideos($overrideExisting = true) { if (null !== $this->collVideos && !$overrideExisting) { return; } $this->collVideos = new ObjectCollection(); $this->collVideos->setModel('\gossi\trixionary\model\Video'); }
[ "public", "function", "initVideos", "(", "$", "overrideExisting", "=", "true", ")", "{", "if", "(", "null", "!==", "$", "this", "->", "collVideos", "&&", "!", "$", "overrideExisting", ")", "{", "return", ";", "}", "$", "this", "->", "collVideos", "=", "new", "ObjectCollection", "(", ")", ";", "$", "this", "->", "collVideos", "->", "setModel", "(", "'\\gossi\\trixionary\\model\\Video'", ")", ";", "}" ]
Initializes the collVideos collection. By default this just sets the collVideos collection to an empty array (like clearcollVideos()); 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 database. @param boolean $overrideExisting If set to true, the method call initializes the collection even if it is not empty @return void
[ "Initializes", "the", "collVideos", "collection", "." ]
221a6c5322473d7d7f8e322958a3ee46d87da150
https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/Skill.php#L7949-L7956
33
gossi/trixionary
src/model/Base/Skill.php
Skill.getVideos
public function getVideos(Criteria $criteria = null, ConnectionInterface $con = null) { $partial = $this->collVideosPartial && !$this->isNew(); if (null === $this->collVideos || null !== $criteria || $partial) { if ($this->isNew() && null === $this->collVideos) { // return empty collection $this->initVideos(); } else { $collVideos = ChildVideoQuery::create(null, $criteria) ->filterBySkill($this) ->find($con); if (null !== $criteria) { if (false !== $this->collVideosPartial && count($collVideos)) { $this->initVideos(false); foreach ($collVideos as $obj) { if (false == $this->collVideos->contains($obj)) { $this->collVideos->append($obj); } } $this->collVideosPartial = true; } return $collVideos; } if ($partial && $this->collVideos) { foreach ($this->collVideos as $obj) { if ($obj->isNew()) { $collVideos[] = $obj; } } } $this->collVideos = $collVideos; $this->collVideosPartial = false; } } return $this->collVideos; }
php
public function getVideos(Criteria $criteria = null, ConnectionInterface $con = null) { $partial = $this->collVideosPartial && !$this->isNew(); if (null === $this->collVideos || null !== $criteria || $partial) { if ($this->isNew() && null === $this->collVideos) { // return empty collection $this->initVideos(); } else { $collVideos = ChildVideoQuery::create(null, $criteria) ->filterBySkill($this) ->find($con); if (null !== $criteria) { if (false !== $this->collVideosPartial && count($collVideos)) { $this->initVideos(false); foreach ($collVideos as $obj) { if (false == $this->collVideos->contains($obj)) { $this->collVideos->append($obj); } } $this->collVideosPartial = true; } return $collVideos; } if ($partial && $this->collVideos) { foreach ($this->collVideos as $obj) { if ($obj->isNew()) { $collVideos[] = $obj; } } } $this->collVideos = $collVideos; $this->collVideosPartial = false; } } return $this->collVideos; }
[ "public", "function", "getVideos", "(", "Criteria", "$", "criteria", "=", "null", ",", "ConnectionInterface", "$", "con", "=", "null", ")", "{", "$", "partial", "=", "$", "this", "->", "collVideosPartial", "&&", "!", "$", "this", "->", "isNew", "(", ")", ";", "if", "(", "null", "===", "$", "this", "->", "collVideos", "||", "null", "!==", "$", "criteria", "||", "$", "partial", ")", "{", "if", "(", "$", "this", "->", "isNew", "(", ")", "&&", "null", "===", "$", "this", "->", "collVideos", ")", "{", "// return empty collection", "$", "this", "->", "initVideos", "(", ")", ";", "}", "else", "{", "$", "collVideos", "=", "ChildVideoQuery", "::", "create", "(", "null", ",", "$", "criteria", ")", "->", "filterBySkill", "(", "$", "this", ")", "->", "find", "(", "$", "con", ")", ";", "if", "(", "null", "!==", "$", "criteria", ")", "{", "if", "(", "false", "!==", "$", "this", "->", "collVideosPartial", "&&", "count", "(", "$", "collVideos", ")", ")", "{", "$", "this", "->", "initVideos", "(", "false", ")", ";", "foreach", "(", "$", "collVideos", "as", "$", "obj", ")", "{", "if", "(", "false", "==", "$", "this", "->", "collVideos", "->", "contains", "(", "$", "obj", ")", ")", "{", "$", "this", "->", "collVideos", "->", "append", "(", "$", "obj", ")", ";", "}", "}", "$", "this", "->", "collVideosPartial", "=", "true", ";", "}", "return", "$", "collVideos", ";", "}", "if", "(", "$", "partial", "&&", "$", "this", "->", "collVideos", ")", "{", "foreach", "(", "$", "this", "->", "collVideos", "as", "$", "obj", ")", "{", "if", "(", "$", "obj", "->", "isNew", "(", ")", ")", "{", "$", "collVideos", "[", "]", "=", "$", "obj", ";", "}", "}", "}", "$", "this", "->", "collVideos", "=", "$", "collVideos", ";", "$", "this", "->", "collVideosPartial", "=", "false", ";", "}", "}", "return", "$", "this", "->", "collVideos", ";", "}" ]
Gets an array of ChildVideo 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 cached collection is returned. If this ChildSkill is new, it will return an empty collection or the current collection; the criteria is ignored on a new object. @param Criteria $criteria optional Criteria object to narrow the query @param ConnectionInterface $con optional connection object @return ObjectCollection|ChildVideo[] List of ChildVideo objects @throws PropelException
[ "Gets", "an", "array", "of", "ChildVideo", "objects", "which", "contain", "a", "foreign", "key", "that", "references", "this", "object", "." ]
221a6c5322473d7d7f8e322958a3ee46d87da150
https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/Skill.php#L7972-L8014
34
gossi/trixionary
src/model/Base/Skill.php
Skill.addVideo
public function addVideo(ChildVideo $l) { if ($this->collVideos === null) { $this->initVideos(); $this->collVideosPartial = true; } if (!$this->collVideos->contains($l)) { $this->doAddVideo($l); } return $this; }
php
public function addVideo(ChildVideo $l) { if ($this->collVideos === null) { $this->initVideos(); $this->collVideosPartial = true; } if (!$this->collVideos->contains($l)) { $this->doAddVideo($l); } return $this; }
[ "public", "function", "addVideo", "(", "ChildVideo", "$", "l", ")", "{", "if", "(", "$", "this", "->", "collVideos", "===", "null", ")", "{", "$", "this", "->", "initVideos", "(", ")", ";", "$", "this", "->", "collVideosPartial", "=", "true", ";", "}", "if", "(", "!", "$", "this", "->", "collVideos", "->", "contains", "(", "$", "l", ")", ")", "{", "$", "this", "->", "doAddVideo", "(", "$", "l", ")", ";", "}", "return", "$", "this", ";", "}" ]
Method called to associate a ChildVideo object to this object through the ChildVideo foreign key attribute. @param ChildVideo $l ChildVideo @return $this|\gossi\trixionary\model\Skill The current object (for fluent API support)
[ "Method", "called", "to", "associate", "a", "ChildVideo", "object", "to", "this", "object", "through", "the", "ChildVideo", "foreign", "key", "attribute", "." ]
221a6c5322473d7d7f8e322958a3ee46d87da150
https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/Skill.php#L8090-L8102
35
gossi/trixionary
src/model/Base/Skill.php
Skill.getVideosJoinReference
public function getVideosJoinReference(Criteria $criteria = null, ConnectionInterface $con = null, $joinBehavior = Criteria::LEFT_JOIN) { $query = ChildVideoQuery::create(null, $criteria); $query->joinWith('Reference', $joinBehavior); return $this->getVideos($query, $con); }
php
public function getVideosJoinReference(Criteria $criteria = null, ConnectionInterface $con = null, $joinBehavior = Criteria::LEFT_JOIN) { $query = ChildVideoQuery::create(null, $criteria); $query->joinWith('Reference', $joinBehavior); return $this->getVideos($query, $con); }
[ "public", "function", "getVideosJoinReference", "(", "Criteria", "$", "criteria", "=", "null", ",", "ConnectionInterface", "$", "con", "=", "null", ",", "$", "joinBehavior", "=", "Criteria", "::", "LEFT_JOIN", ")", "{", "$", "query", "=", "ChildVideoQuery", "::", "create", "(", "null", ",", "$", "criteria", ")", ";", "$", "query", "->", "joinWith", "(", "'Reference'", ",", "$", "joinBehavior", ")", ";", "return", "$", "this", "->", "getVideos", "(", "$", "query", ",", "$", "con", ")", ";", "}" ]
If this collection has already been initialized with an identical criteria, it returns the collection. Otherwise if this Skill is new, it will return an empty collection; or if this Skill has previously been saved, it will retrieve related Videos from storage. This method is protected by default in order to keep the public api reasonable. You can provide public methods for those you actually need in Skill. @param Criteria $criteria optional Criteria object to narrow the query @param ConnectionInterface $con optional connection object @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) @return ObjectCollection|ChildVideo[] List of ChildVideo objects
[ "If", "this", "collection", "has", "already", "been", "initialized", "with", "an", "identical", "criteria", "it", "returns", "the", "collection", ".", "Otherwise", "if", "this", "Skill", "is", "new", "it", "will", "return", "an", "empty", "collection", ";", "or", "if", "this", "Skill", "has", "previously", "been", "saved", "it", "will", "retrieve", "related", "Videos", "from", "storage", "." ]
221a6c5322473d7d7f8e322958a3ee46d87da150
https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/Skill.php#L8150-L8156
36
gossi/trixionary
src/model/Base/Skill.php
Skill.initSkillReferences
public function initSkillReferences($overrideExisting = true) { if (null !== $this->collSkillReferences && !$overrideExisting) { return; } $this->collSkillReferences = new ObjectCollection(); $this->collSkillReferences->setModel('\gossi\trixionary\model\SkillReference'); }
php
public function initSkillReferences($overrideExisting = true) { if (null !== $this->collSkillReferences && !$overrideExisting) { return; } $this->collSkillReferences = new ObjectCollection(); $this->collSkillReferences->setModel('\gossi\trixionary\model\SkillReference'); }
[ "public", "function", "initSkillReferences", "(", "$", "overrideExisting", "=", "true", ")", "{", "if", "(", "null", "!==", "$", "this", "->", "collSkillReferences", "&&", "!", "$", "overrideExisting", ")", "{", "return", ";", "}", "$", "this", "->", "collSkillReferences", "=", "new", "ObjectCollection", "(", ")", ";", "$", "this", "->", "collSkillReferences", "->", "setModel", "(", "'\\gossi\\trixionary\\model\\SkillReference'", ")", ";", "}" ]
Initializes the collSkillReferences collection. By default this just sets the collSkillReferences collection to an empty array (like clearcollSkillReferences()); 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 database. @param boolean $overrideExisting If set to true, the method call initializes the collection even if it is not empty @return void
[ "Initializes", "the", "collSkillReferences", "collection", "." ]
221a6c5322473d7d7f8e322958a3ee46d87da150
https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/Skill.php#L8192-L8199
37
gossi/trixionary
src/model/Base/Skill.php
Skill.countSkillReferences
public function countSkillReferences(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) { $partial = $this->collSkillReferencesPartial && !$this->isNew(); if (null === $this->collSkillReferences || null !== $criteria || $partial) { if ($this->isNew() && null === $this->collSkillReferences) { return 0; } if ($partial && !$criteria) { return count($this->getSkillReferences()); } $query = ChildSkillReferenceQuery::create(null, $criteria); if ($distinct) { $query->distinct(); } return $query ->filterBySkill($this) ->count($con); } return count($this->collSkillReferences); }
php
public function countSkillReferences(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) { $partial = $this->collSkillReferencesPartial && !$this->isNew(); if (null === $this->collSkillReferences || null !== $criteria || $partial) { if ($this->isNew() && null === $this->collSkillReferences) { return 0; } if ($partial && !$criteria) { return count($this->getSkillReferences()); } $query = ChildSkillReferenceQuery::create(null, $criteria); if ($distinct) { $query->distinct(); } return $query ->filterBySkill($this) ->count($con); } return count($this->collSkillReferences); }
[ "public", "function", "countSkillReferences", "(", "Criteria", "$", "criteria", "=", "null", ",", "$", "distinct", "=", "false", ",", "ConnectionInterface", "$", "con", "=", "null", ")", "{", "$", "partial", "=", "$", "this", "->", "collSkillReferencesPartial", "&&", "!", "$", "this", "->", "isNew", "(", ")", ";", "if", "(", "null", "===", "$", "this", "->", "collSkillReferences", "||", "null", "!==", "$", "criteria", "||", "$", "partial", ")", "{", "if", "(", "$", "this", "->", "isNew", "(", ")", "&&", "null", "===", "$", "this", "->", "collSkillReferences", ")", "{", "return", "0", ";", "}", "if", "(", "$", "partial", "&&", "!", "$", "criteria", ")", "{", "return", "count", "(", "$", "this", "->", "getSkillReferences", "(", ")", ")", ";", "}", "$", "query", "=", "ChildSkillReferenceQuery", "::", "create", "(", "null", ",", "$", "criteria", ")", ";", "if", "(", "$", "distinct", ")", "{", "$", "query", "->", "distinct", "(", ")", ";", "}", "return", "$", "query", "->", "filterBySkill", "(", "$", "this", ")", "->", "count", "(", "$", "con", ")", ";", "}", "return", "count", "(", "$", "this", "->", "collSkillReferences", ")", ";", "}" ]
Returns the number of related SkillReference objects. @param Criteria $criteria @param boolean $distinct @param ConnectionInterface $con @return int Count of related SkillReference objects. @throws PropelException
[ "Returns", "the", "number", "of", "related", "SkillReference", "objects", "." ]
221a6c5322473d7d7f8e322958a3ee46d87da150
https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/Skill.php#L8304-L8327
38
gossi/trixionary
src/model/Base/Skill.php
Skill.addSkillReference
public function addSkillReference(ChildSkillReference $l) { if ($this->collSkillReferences === null) { $this->initSkillReferences(); $this->collSkillReferencesPartial = true; } if (!$this->collSkillReferences->contains($l)) { $this->doAddSkillReference($l); } return $this; }
php
public function addSkillReference(ChildSkillReference $l) { if ($this->collSkillReferences === null) { $this->initSkillReferences(); $this->collSkillReferencesPartial = true; } if (!$this->collSkillReferences->contains($l)) { $this->doAddSkillReference($l); } return $this; }
[ "public", "function", "addSkillReference", "(", "ChildSkillReference", "$", "l", ")", "{", "if", "(", "$", "this", "->", "collSkillReferences", "===", "null", ")", "{", "$", "this", "->", "initSkillReferences", "(", ")", ";", "$", "this", "->", "collSkillReferencesPartial", "=", "true", ";", "}", "if", "(", "!", "$", "this", "->", "collSkillReferences", "->", "contains", "(", "$", "l", ")", ")", "{", "$", "this", "->", "doAddSkillReference", "(", "$", "l", ")", ";", "}", "return", "$", "this", ";", "}" ]
Method called to associate a ChildSkillReference object to this object through the ChildSkillReference foreign key attribute. @param ChildSkillReference $l ChildSkillReference @return $this|\gossi\trixionary\model\Skill The current object (for fluent API support)
[ "Method", "called", "to", "associate", "a", "ChildSkillReference", "object", "to", "this", "object", "through", "the", "ChildSkillReference", "foreign", "key", "attribute", "." ]
221a6c5322473d7d7f8e322958a3ee46d87da150
https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/Skill.php#L8336-L8348
39
gossi/trixionary
src/model/Base/Skill.php
Skill.initStructureNodes
public function initStructureNodes($overrideExisting = true) { if (null !== $this->collStructureNodes && !$overrideExisting) { return; } $this->collStructureNodes = new ObjectCollection(); $this->collStructureNodes->setModel('\gossi\trixionary\model\StructureNode'); }
php
public function initStructureNodes($overrideExisting = true) { if (null !== $this->collStructureNodes && !$overrideExisting) { return; } $this->collStructureNodes = new ObjectCollection(); $this->collStructureNodes->setModel('\gossi\trixionary\model\StructureNode'); }
[ "public", "function", "initStructureNodes", "(", "$", "overrideExisting", "=", "true", ")", "{", "if", "(", "null", "!==", "$", "this", "->", "collStructureNodes", "&&", "!", "$", "overrideExisting", ")", "{", "return", ";", "}", "$", "this", "->", "collStructureNodes", "=", "new", "ObjectCollection", "(", ")", ";", "$", "this", "->", "collStructureNodes", "->", "setModel", "(", "'\\gossi\\trixionary\\model\\StructureNode'", ")", ";", "}" ]
Initializes the collStructureNodes collection. By default this just sets the collStructureNodes collection to an empty array (like clearcollStructureNodes()); 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 database. @param boolean $overrideExisting If set to true, the method call initializes the collection even if it is not empty @return void
[ "Initializes", "the", "collStructureNodes", "collection", "." ]
221a6c5322473d7d7f8e322958a3ee46d87da150
https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/Skill.php#L8438-L8445
40
gossi/trixionary
src/model/Base/Skill.php
Skill.getStructureNodes
public function getStructureNodes(Criteria $criteria = null, ConnectionInterface $con = null) { $partial = $this->collStructureNodesPartial && !$this->isNew(); if (null === $this->collStructureNodes || null !== $criteria || $partial) { if ($this->isNew() && null === $this->collStructureNodes) { // return empty collection $this->initStructureNodes(); } else { $collStructureNodes = ChildStructureNodeQuery::create(null, $criteria) ->filterBySkill($this) ->find($con); if (null !== $criteria) { if (false !== $this->collStructureNodesPartial && count($collStructureNodes)) { $this->initStructureNodes(false); foreach ($collStructureNodes as $obj) { if (false == $this->collStructureNodes->contains($obj)) { $this->collStructureNodes->append($obj); } } $this->collStructureNodesPartial = true; } return $collStructureNodes; } if ($partial && $this->collStructureNodes) { foreach ($this->collStructureNodes as $obj) { if ($obj->isNew()) { $collStructureNodes[] = $obj; } } } $this->collStructureNodes = $collStructureNodes; $this->collStructureNodesPartial = false; } } return $this->collStructureNodes; }
php
public function getStructureNodes(Criteria $criteria = null, ConnectionInterface $con = null) { $partial = $this->collStructureNodesPartial && !$this->isNew(); if (null === $this->collStructureNodes || null !== $criteria || $partial) { if ($this->isNew() && null === $this->collStructureNodes) { // return empty collection $this->initStructureNodes(); } else { $collStructureNodes = ChildStructureNodeQuery::create(null, $criteria) ->filterBySkill($this) ->find($con); if (null !== $criteria) { if (false !== $this->collStructureNodesPartial && count($collStructureNodes)) { $this->initStructureNodes(false); foreach ($collStructureNodes as $obj) { if (false == $this->collStructureNodes->contains($obj)) { $this->collStructureNodes->append($obj); } } $this->collStructureNodesPartial = true; } return $collStructureNodes; } if ($partial && $this->collStructureNodes) { foreach ($this->collStructureNodes as $obj) { if ($obj->isNew()) { $collStructureNodes[] = $obj; } } } $this->collStructureNodes = $collStructureNodes; $this->collStructureNodesPartial = false; } } return $this->collStructureNodes; }
[ "public", "function", "getStructureNodes", "(", "Criteria", "$", "criteria", "=", "null", ",", "ConnectionInterface", "$", "con", "=", "null", ")", "{", "$", "partial", "=", "$", "this", "->", "collStructureNodesPartial", "&&", "!", "$", "this", "->", "isNew", "(", ")", ";", "if", "(", "null", "===", "$", "this", "->", "collStructureNodes", "||", "null", "!==", "$", "criteria", "||", "$", "partial", ")", "{", "if", "(", "$", "this", "->", "isNew", "(", ")", "&&", "null", "===", "$", "this", "->", "collStructureNodes", ")", "{", "// return empty collection", "$", "this", "->", "initStructureNodes", "(", ")", ";", "}", "else", "{", "$", "collStructureNodes", "=", "ChildStructureNodeQuery", "::", "create", "(", "null", ",", "$", "criteria", ")", "->", "filterBySkill", "(", "$", "this", ")", "->", "find", "(", "$", "con", ")", ";", "if", "(", "null", "!==", "$", "criteria", ")", "{", "if", "(", "false", "!==", "$", "this", "->", "collStructureNodesPartial", "&&", "count", "(", "$", "collStructureNodes", ")", ")", "{", "$", "this", "->", "initStructureNodes", "(", "false", ")", ";", "foreach", "(", "$", "collStructureNodes", "as", "$", "obj", ")", "{", "if", "(", "false", "==", "$", "this", "->", "collStructureNodes", "->", "contains", "(", "$", "obj", ")", ")", "{", "$", "this", "->", "collStructureNodes", "->", "append", "(", "$", "obj", ")", ";", "}", "}", "$", "this", "->", "collStructureNodesPartial", "=", "true", ";", "}", "return", "$", "collStructureNodes", ";", "}", "if", "(", "$", "partial", "&&", "$", "this", "->", "collStructureNodes", ")", "{", "foreach", "(", "$", "this", "->", "collStructureNodes", "as", "$", "obj", ")", "{", "if", "(", "$", "obj", "->", "isNew", "(", ")", ")", "{", "$", "collStructureNodes", "[", "]", "=", "$", "obj", ";", "}", "}", "}", "$", "this", "->", "collStructureNodes", "=", "$", "collStructureNodes", ";", "$", "this", "->", "collStructureNodesPartial", "=", "false", ";", "}", "}", "return", "$", "this", "->", "collStructureNodes", ";", "}" ]
Gets an array of ChildStructureNode 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 cached collection is returned. If this ChildSkill is new, it will return an empty collection or the current collection; the criteria is ignored on a new object. @param Criteria $criteria optional Criteria object to narrow the query @param ConnectionInterface $con optional connection object @return ObjectCollection|ChildStructureNode[] List of ChildStructureNode objects @throws PropelException
[ "Gets", "an", "array", "of", "ChildStructureNode", "objects", "which", "contain", "a", "foreign", "key", "that", "references", "this", "object", "." ]
221a6c5322473d7d7f8e322958a3ee46d87da150
https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/Skill.php#L8461-L8503
41
gossi/trixionary
src/model/Base/Skill.php
Skill.countStructureNodes
public function countStructureNodes(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) { $partial = $this->collStructureNodesPartial && !$this->isNew(); if (null === $this->collStructureNodes || null !== $criteria || $partial) { if ($this->isNew() && null === $this->collStructureNodes) { return 0; } if ($partial && !$criteria) { return count($this->getStructureNodes()); } $query = ChildStructureNodeQuery::create(null, $criteria); if ($distinct) { $query->distinct(); } return $query ->filterBySkill($this) ->count($con); } return count($this->collStructureNodes); }
php
public function countStructureNodes(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) { $partial = $this->collStructureNodesPartial && !$this->isNew(); if (null === $this->collStructureNodes || null !== $criteria || $partial) { if ($this->isNew() && null === $this->collStructureNodes) { return 0; } if ($partial && !$criteria) { return count($this->getStructureNodes()); } $query = ChildStructureNodeQuery::create(null, $criteria); if ($distinct) { $query->distinct(); } return $query ->filterBySkill($this) ->count($con); } return count($this->collStructureNodes); }
[ "public", "function", "countStructureNodes", "(", "Criteria", "$", "criteria", "=", "null", ",", "$", "distinct", "=", "false", ",", "ConnectionInterface", "$", "con", "=", "null", ")", "{", "$", "partial", "=", "$", "this", "->", "collStructureNodesPartial", "&&", "!", "$", "this", "->", "isNew", "(", ")", ";", "if", "(", "null", "===", "$", "this", "->", "collStructureNodes", "||", "null", "!==", "$", "criteria", "||", "$", "partial", ")", "{", "if", "(", "$", "this", "->", "isNew", "(", ")", "&&", "null", "===", "$", "this", "->", "collStructureNodes", ")", "{", "return", "0", ";", "}", "if", "(", "$", "partial", "&&", "!", "$", "criteria", ")", "{", "return", "count", "(", "$", "this", "->", "getStructureNodes", "(", ")", ")", ";", "}", "$", "query", "=", "ChildStructureNodeQuery", "::", "create", "(", "null", ",", "$", "criteria", ")", ";", "if", "(", "$", "distinct", ")", "{", "$", "query", "->", "distinct", "(", ")", ";", "}", "return", "$", "query", "->", "filterBySkill", "(", "$", "this", ")", "->", "count", "(", "$", "con", ")", ";", "}", "return", "count", "(", "$", "this", "->", "collStructureNodes", ")", ";", "}" ]
Returns the number of related StructureNode objects. @param Criteria $criteria @param boolean $distinct @param ConnectionInterface $con @return int Count of related StructureNode objects. @throws PropelException
[ "Returns", "the", "number", "of", "related", "StructureNode", "objects", "." ]
221a6c5322473d7d7f8e322958a3ee46d87da150
https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/Skill.php#L8547-L8570
42
gossi/trixionary
src/model/Base/Skill.php
Skill.addStructureNode
public function addStructureNode(ChildStructureNode $l) { if ($this->collStructureNodes === null) { $this->initStructureNodes(); $this->collStructureNodesPartial = true; } if (!$this->collStructureNodes->contains($l)) { $this->doAddStructureNode($l); } return $this; }
php
public function addStructureNode(ChildStructureNode $l) { if ($this->collStructureNodes === null) { $this->initStructureNodes(); $this->collStructureNodesPartial = true; } if (!$this->collStructureNodes->contains($l)) { $this->doAddStructureNode($l); } return $this; }
[ "public", "function", "addStructureNode", "(", "ChildStructureNode", "$", "l", ")", "{", "if", "(", "$", "this", "->", "collStructureNodes", "===", "null", ")", "{", "$", "this", "->", "initStructureNodes", "(", ")", ";", "$", "this", "->", "collStructureNodesPartial", "=", "true", ";", "}", "if", "(", "!", "$", "this", "->", "collStructureNodes", "->", "contains", "(", "$", "l", ")", ")", "{", "$", "this", "->", "doAddStructureNode", "(", "$", "l", ")", ";", "}", "return", "$", "this", ";", "}" ]
Method called to associate a ChildStructureNode object to this object through the ChildStructureNode foreign key attribute. @param ChildStructureNode $l ChildStructureNode @return $this|\gossi\trixionary\model\Skill The current object (for fluent API support)
[ "Method", "called", "to", "associate", "a", "ChildStructureNode", "object", "to", "this", "object", "through", "the", "ChildStructureNode", "foreign", "key", "attribute", "." ]
221a6c5322473d7d7f8e322958a3ee46d87da150
https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/Skill.php#L8579-L8591
43
gossi/trixionary
src/model/Base/Skill.php
Skill.initKstruktursRelatedBySkillId
public function initKstruktursRelatedBySkillId($overrideExisting = true) { if (null !== $this->collKstruktursRelatedBySkillId && !$overrideExisting) { return; } $this->collKstruktursRelatedBySkillId = new ObjectCollection(); $this->collKstruktursRelatedBySkillId->setModel('\gossi\trixionary\model\Kstruktur'); }
php
public function initKstruktursRelatedBySkillId($overrideExisting = true) { if (null !== $this->collKstruktursRelatedBySkillId && !$overrideExisting) { return; } $this->collKstruktursRelatedBySkillId = new ObjectCollection(); $this->collKstruktursRelatedBySkillId->setModel('\gossi\trixionary\model\Kstruktur'); }
[ "public", "function", "initKstruktursRelatedBySkillId", "(", "$", "overrideExisting", "=", "true", ")", "{", "if", "(", "null", "!==", "$", "this", "->", "collKstruktursRelatedBySkillId", "&&", "!", "$", "overrideExisting", ")", "{", "return", ";", "}", "$", "this", "->", "collKstruktursRelatedBySkillId", "=", "new", "ObjectCollection", "(", ")", ";", "$", "this", "->", "collKstruktursRelatedBySkillId", "->", "setModel", "(", "'\\gossi\\trixionary\\model\\Kstruktur'", ")", ";", "}" ]
Initializes the collKstruktursRelatedBySkillId collection. By default this just sets the collKstruktursRelatedBySkillId collection to an empty array (like clearcollKstruktursRelatedBySkillId()); 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 database. @param boolean $overrideExisting If set to true, the method call initializes the collection even if it is not empty @return void
[ "Initializes", "the", "collKstruktursRelatedBySkillId", "collection", "." ]
221a6c5322473d7d7f8e322958a3ee46d87da150
https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/Skill.php#L8656-L8663
44
gossi/trixionary
src/model/Base/Skill.php
Skill.getKstruktursRelatedBySkillId
public function getKstruktursRelatedBySkillId(Criteria $criteria = null, ConnectionInterface $con = null) { $partial = $this->collKstruktursRelatedBySkillIdPartial && !$this->isNew(); if (null === $this->collKstruktursRelatedBySkillId || null !== $criteria || $partial) { if ($this->isNew() && null === $this->collKstruktursRelatedBySkillId) { // return empty collection $this->initKstruktursRelatedBySkillId(); } else { $collKstruktursRelatedBySkillId = ChildKstrukturQuery::create(null, $criteria) ->filterBySkillRelatedBySkillId($this) ->find($con); if (null !== $criteria) { if (false !== $this->collKstruktursRelatedBySkillIdPartial && count($collKstruktursRelatedBySkillId)) { $this->initKstruktursRelatedBySkillId(false); foreach ($collKstruktursRelatedBySkillId as $obj) { if (false == $this->collKstruktursRelatedBySkillId->contains($obj)) { $this->collKstruktursRelatedBySkillId->append($obj); } } $this->collKstruktursRelatedBySkillIdPartial = true; } return $collKstruktursRelatedBySkillId; } if ($partial && $this->collKstruktursRelatedBySkillId) { foreach ($this->collKstruktursRelatedBySkillId as $obj) { if ($obj->isNew()) { $collKstruktursRelatedBySkillId[] = $obj; } } } $this->collKstruktursRelatedBySkillId = $collKstruktursRelatedBySkillId; $this->collKstruktursRelatedBySkillIdPartial = false; } } return $this->collKstruktursRelatedBySkillId; }
php
public function getKstruktursRelatedBySkillId(Criteria $criteria = null, ConnectionInterface $con = null) { $partial = $this->collKstruktursRelatedBySkillIdPartial && !$this->isNew(); if (null === $this->collKstruktursRelatedBySkillId || null !== $criteria || $partial) { if ($this->isNew() && null === $this->collKstruktursRelatedBySkillId) { // return empty collection $this->initKstruktursRelatedBySkillId(); } else { $collKstruktursRelatedBySkillId = ChildKstrukturQuery::create(null, $criteria) ->filterBySkillRelatedBySkillId($this) ->find($con); if (null !== $criteria) { if (false !== $this->collKstruktursRelatedBySkillIdPartial && count($collKstruktursRelatedBySkillId)) { $this->initKstruktursRelatedBySkillId(false); foreach ($collKstruktursRelatedBySkillId as $obj) { if (false == $this->collKstruktursRelatedBySkillId->contains($obj)) { $this->collKstruktursRelatedBySkillId->append($obj); } } $this->collKstruktursRelatedBySkillIdPartial = true; } return $collKstruktursRelatedBySkillId; } if ($partial && $this->collKstruktursRelatedBySkillId) { foreach ($this->collKstruktursRelatedBySkillId as $obj) { if ($obj->isNew()) { $collKstruktursRelatedBySkillId[] = $obj; } } } $this->collKstruktursRelatedBySkillId = $collKstruktursRelatedBySkillId; $this->collKstruktursRelatedBySkillIdPartial = false; } } return $this->collKstruktursRelatedBySkillId; }
[ "public", "function", "getKstruktursRelatedBySkillId", "(", "Criteria", "$", "criteria", "=", "null", ",", "ConnectionInterface", "$", "con", "=", "null", ")", "{", "$", "partial", "=", "$", "this", "->", "collKstruktursRelatedBySkillIdPartial", "&&", "!", "$", "this", "->", "isNew", "(", ")", ";", "if", "(", "null", "===", "$", "this", "->", "collKstruktursRelatedBySkillId", "||", "null", "!==", "$", "criteria", "||", "$", "partial", ")", "{", "if", "(", "$", "this", "->", "isNew", "(", ")", "&&", "null", "===", "$", "this", "->", "collKstruktursRelatedBySkillId", ")", "{", "// return empty collection", "$", "this", "->", "initKstruktursRelatedBySkillId", "(", ")", ";", "}", "else", "{", "$", "collKstruktursRelatedBySkillId", "=", "ChildKstrukturQuery", "::", "create", "(", "null", ",", "$", "criteria", ")", "->", "filterBySkillRelatedBySkillId", "(", "$", "this", ")", "->", "find", "(", "$", "con", ")", ";", "if", "(", "null", "!==", "$", "criteria", ")", "{", "if", "(", "false", "!==", "$", "this", "->", "collKstruktursRelatedBySkillIdPartial", "&&", "count", "(", "$", "collKstruktursRelatedBySkillId", ")", ")", "{", "$", "this", "->", "initKstruktursRelatedBySkillId", "(", "false", ")", ";", "foreach", "(", "$", "collKstruktursRelatedBySkillId", "as", "$", "obj", ")", "{", "if", "(", "false", "==", "$", "this", "->", "collKstruktursRelatedBySkillId", "->", "contains", "(", "$", "obj", ")", ")", "{", "$", "this", "->", "collKstruktursRelatedBySkillId", "->", "append", "(", "$", "obj", ")", ";", "}", "}", "$", "this", "->", "collKstruktursRelatedBySkillIdPartial", "=", "true", ";", "}", "return", "$", "collKstruktursRelatedBySkillId", ";", "}", "if", "(", "$", "partial", "&&", "$", "this", "->", "collKstruktursRelatedBySkillId", ")", "{", "foreach", "(", "$", "this", "->", "collKstruktursRelatedBySkillId", "as", "$", "obj", ")", "{", "if", "(", "$", "obj", "->", "isNew", "(", ")", ")", "{", "$", "collKstruktursRelatedBySkillId", "[", "]", "=", "$", "obj", ";", "}", "}", "}", "$", "this", "->", "collKstruktursRelatedBySkillId", "=", "$", "collKstruktursRelatedBySkillId", ";", "$", "this", "->", "collKstruktursRelatedBySkillIdPartial", "=", "false", ";", "}", "}", "return", "$", "this", "->", "collKstruktursRelatedBySkillId", ";", "}" ]
Gets an array of ChildKstruktur 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 cached collection is returned. If this ChildSkill is new, it will return an empty collection or the current collection; the criteria is ignored on a new object. @param Criteria $criteria optional Criteria object to narrow the query @param ConnectionInterface $con optional connection object @return ObjectCollection|ChildKstruktur[] List of ChildKstruktur objects @throws PropelException
[ "Gets", "an", "array", "of", "ChildKstruktur", "objects", "which", "contain", "a", "foreign", "key", "that", "references", "this", "object", "." ]
221a6c5322473d7d7f8e322958a3ee46d87da150
https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/Skill.php#L8679-L8721
45
gossi/trixionary
src/model/Base/Skill.php
Skill.countKstruktursRelatedBySkillId
public function countKstruktursRelatedBySkillId(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) { $partial = $this->collKstruktursRelatedBySkillIdPartial && !$this->isNew(); if (null === $this->collKstruktursRelatedBySkillId || null !== $criteria || $partial) { if ($this->isNew() && null === $this->collKstruktursRelatedBySkillId) { return 0; } if ($partial && !$criteria) { return count($this->getKstruktursRelatedBySkillId()); } $query = ChildKstrukturQuery::create(null, $criteria); if ($distinct) { $query->distinct(); } return $query ->filterBySkillRelatedBySkillId($this) ->count($con); } return count($this->collKstruktursRelatedBySkillId); }
php
public function countKstruktursRelatedBySkillId(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) { $partial = $this->collKstruktursRelatedBySkillIdPartial && !$this->isNew(); if (null === $this->collKstruktursRelatedBySkillId || null !== $criteria || $partial) { if ($this->isNew() && null === $this->collKstruktursRelatedBySkillId) { return 0; } if ($partial && !$criteria) { return count($this->getKstruktursRelatedBySkillId()); } $query = ChildKstrukturQuery::create(null, $criteria); if ($distinct) { $query->distinct(); } return $query ->filterBySkillRelatedBySkillId($this) ->count($con); } return count($this->collKstruktursRelatedBySkillId); }
[ "public", "function", "countKstruktursRelatedBySkillId", "(", "Criteria", "$", "criteria", "=", "null", ",", "$", "distinct", "=", "false", ",", "ConnectionInterface", "$", "con", "=", "null", ")", "{", "$", "partial", "=", "$", "this", "->", "collKstruktursRelatedBySkillIdPartial", "&&", "!", "$", "this", "->", "isNew", "(", ")", ";", "if", "(", "null", "===", "$", "this", "->", "collKstruktursRelatedBySkillId", "||", "null", "!==", "$", "criteria", "||", "$", "partial", ")", "{", "if", "(", "$", "this", "->", "isNew", "(", ")", "&&", "null", "===", "$", "this", "->", "collKstruktursRelatedBySkillId", ")", "{", "return", "0", ";", "}", "if", "(", "$", "partial", "&&", "!", "$", "criteria", ")", "{", "return", "count", "(", "$", "this", "->", "getKstruktursRelatedBySkillId", "(", ")", ")", ";", "}", "$", "query", "=", "ChildKstrukturQuery", "::", "create", "(", "null", ",", "$", "criteria", ")", ";", "if", "(", "$", "distinct", ")", "{", "$", "query", "->", "distinct", "(", ")", ";", "}", "return", "$", "query", "->", "filterBySkillRelatedBySkillId", "(", "$", "this", ")", "->", "count", "(", "$", "con", ")", ";", "}", "return", "count", "(", "$", "this", "->", "collKstruktursRelatedBySkillId", ")", ";", "}" ]
Returns the number of related Kstruktur objects. @param Criteria $criteria @param boolean $distinct @param ConnectionInterface $con @return int Count of related Kstruktur objects. @throws PropelException
[ "Returns", "the", "number", "of", "related", "Kstruktur", "objects", "." ]
221a6c5322473d7d7f8e322958a3ee46d87da150
https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/Skill.php#L8765-L8788
46
gossi/trixionary
src/model/Base/Skill.php
Skill.addKstrukturRelatedBySkillId
public function addKstrukturRelatedBySkillId(ChildKstruktur $l) { if ($this->collKstruktursRelatedBySkillId === null) { $this->initKstruktursRelatedBySkillId(); $this->collKstruktursRelatedBySkillIdPartial = true; } if (!$this->collKstruktursRelatedBySkillId->contains($l)) { $this->doAddKstrukturRelatedBySkillId($l); } return $this; }
php
public function addKstrukturRelatedBySkillId(ChildKstruktur $l) { if ($this->collKstruktursRelatedBySkillId === null) { $this->initKstruktursRelatedBySkillId(); $this->collKstruktursRelatedBySkillIdPartial = true; } if (!$this->collKstruktursRelatedBySkillId->contains($l)) { $this->doAddKstrukturRelatedBySkillId($l); } return $this; }
[ "public", "function", "addKstrukturRelatedBySkillId", "(", "ChildKstruktur", "$", "l", ")", "{", "if", "(", "$", "this", "->", "collKstruktursRelatedBySkillId", "===", "null", ")", "{", "$", "this", "->", "initKstruktursRelatedBySkillId", "(", ")", ";", "$", "this", "->", "collKstruktursRelatedBySkillIdPartial", "=", "true", ";", "}", "if", "(", "!", "$", "this", "->", "collKstruktursRelatedBySkillId", "->", "contains", "(", "$", "l", ")", ")", "{", "$", "this", "->", "doAddKstrukturRelatedBySkillId", "(", "$", "l", ")", ";", "}", "return", "$", "this", ";", "}" ]
Method called to associate a ChildKstruktur object to this object through the ChildKstruktur foreign key attribute. @param ChildKstruktur $l ChildKstruktur @return $this|\gossi\trixionary\model\Skill The current object (for fluent API support)
[ "Method", "called", "to", "associate", "a", "ChildKstruktur", "object", "to", "this", "object", "through", "the", "ChildKstruktur", "foreign", "key", "attribute", "." ]
221a6c5322473d7d7f8e322958a3ee46d87da150
https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/Skill.php#L8797-L8809
47
gossi/trixionary
src/model/Base/Skill.php
Skill.getKstruktursRelatedBySkillIdJoinStructureNode
public function getKstruktursRelatedBySkillIdJoinStructureNode(Criteria $criteria = null, ConnectionInterface $con = null, $joinBehavior = Criteria::LEFT_JOIN) { $query = ChildKstrukturQuery::create(null, $criteria); $query->joinWith('StructureNode', $joinBehavior); return $this->getKstruktursRelatedBySkillId($query, $con); }
php
public function getKstruktursRelatedBySkillIdJoinStructureNode(Criteria $criteria = null, ConnectionInterface $con = null, $joinBehavior = Criteria::LEFT_JOIN) { $query = ChildKstrukturQuery::create(null, $criteria); $query->joinWith('StructureNode', $joinBehavior); return $this->getKstruktursRelatedBySkillId($query, $con); }
[ "public", "function", "getKstruktursRelatedBySkillIdJoinStructureNode", "(", "Criteria", "$", "criteria", "=", "null", ",", "ConnectionInterface", "$", "con", "=", "null", ",", "$", "joinBehavior", "=", "Criteria", "::", "LEFT_JOIN", ")", "{", "$", "query", "=", "ChildKstrukturQuery", "::", "create", "(", "null", ",", "$", "criteria", ")", ";", "$", "query", "->", "joinWith", "(", "'StructureNode'", ",", "$", "joinBehavior", ")", ";", "return", "$", "this", "->", "getKstruktursRelatedBySkillId", "(", "$", "query", ",", "$", "con", ")", ";", "}" ]
If this collection has already been initialized with an identical criteria, it returns the collection. Otherwise if this Skill is new, it will return an empty collection; or if this Skill has previously been saved, it will retrieve related KstruktursRelatedBySkillId from storage. This method is protected by default in order to keep the public api reasonable. You can provide public methods for those you actually need in Skill. @param Criteria $criteria optional Criteria object to narrow the query @param ConnectionInterface $con optional connection object @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) @return ObjectCollection|ChildKstruktur[] List of ChildKstruktur objects
[ "If", "this", "collection", "has", "already", "been", "initialized", "with", "an", "identical", "criteria", "it", "returns", "the", "collection", ".", "Otherwise", "if", "this", "Skill", "is", "new", "it", "will", "return", "an", "empty", "collection", ";", "or", "if", "this", "Skill", "has", "previously", "been", "saved", "it", "will", "retrieve", "related", "KstruktursRelatedBySkillId", "from", "storage", "." ]
221a6c5322473d7d7f8e322958a3ee46d87da150
https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/Skill.php#L8857-L8863
48
gossi/trixionary
src/model/Base/Skill.php
Skill.initFunctionPhasesRelatedBySkillId
public function initFunctionPhasesRelatedBySkillId($overrideExisting = true) { if (null !== $this->collFunctionPhasesRelatedBySkillId && !$overrideExisting) { return; } $this->collFunctionPhasesRelatedBySkillId = new ObjectCollection(); $this->collFunctionPhasesRelatedBySkillId->setModel('\gossi\trixionary\model\FunctionPhase'); }
php
public function initFunctionPhasesRelatedBySkillId($overrideExisting = true) { if (null !== $this->collFunctionPhasesRelatedBySkillId && !$overrideExisting) { return; } $this->collFunctionPhasesRelatedBySkillId = new ObjectCollection(); $this->collFunctionPhasesRelatedBySkillId->setModel('\gossi\trixionary\model\FunctionPhase'); }
[ "public", "function", "initFunctionPhasesRelatedBySkillId", "(", "$", "overrideExisting", "=", "true", ")", "{", "if", "(", "null", "!==", "$", "this", "->", "collFunctionPhasesRelatedBySkillId", "&&", "!", "$", "overrideExisting", ")", "{", "return", ";", "}", "$", "this", "->", "collFunctionPhasesRelatedBySkillId", "=", "new", "ObjectCollection", "(", ")", ";", "$", "this", "->", "collFunctionPhasesRelatedBySkillId", "->", "setModel", "(", "'\\gossi\\trixionary\\model\\FunctionPhase'", ")", ";", "}" ]
Initializes the collFunctionPhasesRelatedBySkillId collection. By default this just sets the collFunctionPhasesRelatedBySkillId collection to an empty array (like clearcollFunctionPhasesRelatedBySkillId()); 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 database. @param boolean $overrideExisting If set to true, the method call initializes the collection even if it is not empty @return void
[ "Initializes", "the", "collFunctionPhasesRelatedBySkillId", "collection", "." ]
221a6c5322473d7d7f8e322958a3ee46d87da150
https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/Skill.php#L8899-L8906
49
gossi/trixionary
src/model/Base/Skill.php
Skill.getFunctionPhasesRelatedBySkillId
public function getFunctionPhasesRelatedBySkillId(Criteria $criteria = null, ConnectionInterface $con = null) { $partial = $this->collFunctionPhasesRelatedBySkillIdPartial && !$this->isNew(); if (null === $this->collFunctionPhasesRelatedBySkillId || null !== $criteria || $partial) { if ($this->isNew() && null === $this->collFunctionPhasesRelatedBySkillId) { // return empty collection $this->initFunctionPhasesRelatedBySkillId(); } else { $collFunctionPhasesRelatedBySkillId = ChildFunctionPhaseQuery::create(null, $criteria) ->filterBySkillRelatedBySkillId($this) ->find($con); if (null !== $criteria) { if (false !== $this->collFunctionPhasesRelatedBySkillIdPartial && count($collFunctionPhasesRelatedBySkillId)) { $this->initFunctionPhasesRelatedBySkillId(false); foreach ($collFunctionPhasesRelatedBySkillId as $obj) { if (false == $this->collFunctionPhasesRelatedBySkillId->contains($obj)) { $this->collFunctionPhasesRelatedBySkillId->append($obj); } } $this->collFunctionPhasesRelatedBySkillIdPartial = true; } return $collFunctionPhasesRelatedBySkillId; } if ($partial && $this->collFunctionPhasesRelatedBySkillId) { foreach ($this->collFunctionPhasesRelatedBySkillId as $obj) { if ($obj->isNew()) { $collFunctionPhasesRelatedBySkillId[] = $obj; } } } $this->collFunctionPhasesRelatedBySkillId = $collFunctionPhasesRelatedBySkillId; $this->collFunctionPhasesRelatedBySkillIdPartial = false; } } return $this->collFunctionPhasesRelatedBySkillId; }
php
public function getFunctionPhasesRelatedBySkillId(Criteria $criteria = null, ConnectionInterface $con = null) { $partial = $this->collFunctionPhasesRelatedBySkillIdPartial && !$this->isNew(); if (null === $this->collFunctionPhasesRelatedBySkillId || null !== $criteria || $partial) { if ($this->isNew() && null === $this->collFunctionPhasesRelatedBySkillId) { // return empty collection $this->initFunctionPhasesRelatedBySkillId(); } else { $collFunctionPhasesRelatedBySkillId = ChildFunctionPhaseQuery::create(null, $criteria) ->filterBySkillRelatedBySkillId($this) ->find($con); if (null !== $criteria) { if (false !== $this->collFunctionPhasesRelatedBySkillIdPartial && count($collFunctionPhasesRelatedBySkillId)) { $this->initFunctionPhasesRelatedBySkillId(false); foreach ($collFunctionPhasesRelatedBySkillId as $obj) { if (false == $this->collFunctionPhasesRelatedBySkillId->contains($obj)) { $this->collFunctionPhasesRelatedBySkillId->append($obj); } } $this->collFunctionPhasesRelatedBySkillIdPartial = true; } return $collFunctionPhasesRelatedBySkillId; } if ($partial && $this->collFunctionPhasesRelatedBySkillId) { foreach ($this->collFunctionPhasesRelatedBySkillId as $obj) { if ($obj->isNew()) { $collFunctionPhasesRelatedBySkillId[] = $obj; } } } $this->collFunctionPhasesRelatedBySkillId = $collFunctionPhasesRelatedBySkillId; $this->collFunctionPhasesRelatedBySkillIdPartial = false; } } return $this->collFunctionPhasesRelatedBySkillId; }
[ "public", "function", "getFunctionPhasesRelatedBySkillId", "(", "Criteria", "$", "criteria", "=", "null", ",", "ConnectionInterface", "$", "con", "=", "null", ")", "{", "$", "partial", "=", "$", "this", "->", "collFunctionPhasesRelatedBySkillIdPartial", "&&", "!", "$", "this", "->", "isNew", "(", ")", ";", "if", "(", "null", "===", "$", "this", "->", "collFunctionPhasesRelatedBySkillId", "||", "null", "!==", "$", "criteria", "||", "$", "partial", ")", "{", "if", "(", "$", "this", "->", "isNew", "(", ")", "&&", "null", "===", "$", "this", "->", "collFunctionPhasesRelatedBySkillId", ")", "{", "// return empty collection", "$", "this", "->", "initFunctionPhasesRelatedBySkillId", "(", ")", ";", "}", "else", "{", "$", "collFunctionPhasesRelatedBySkillId", "=", "ChildFunctionPhaseQuery", "::", "create", "(", "null", ",", "$", "criteria", ")", "->", "filterBySkillRelatedBySkillId", "(", "$", "this", ")", "->", "find", "(", "$", "con", ")", ";", "if", "(", "null", "!==", "$", "criteria", ")", "{", "if", "(", "false", "!==", "$", "this", "->", "collFunctionPhasesRelatedBySkillIdPartial", "&&", "count", "(", "$", "collFunctionPhasesRelatedBySkillId", ")", ")", "{", "$", "this", "->", "initFunctionPhasesRelatedBySkillId", "(", "false", ")", ";", "foreach", "(", "$", "collFunctionPhasesRelatedBySkillId", "as", "$", "obj", ")", "{", "if", "(", "false", "==", "$", "this", "->", "collFunctionPhasesRelatedBySkillId", "->", "contains", "(", "$", "obj", ")", ")", "{", "$", "this", "->", "collFunctionPhasesRelatedBySkillId", "->", "append", "(", "$", "obj", ")", ";", "}", "}", "$", "this", "->", "collFunctionPhasesRelatedBySkillIdPartial", "=", "true", ";", "}", "return", "$", "collFunctionPhasesRelatedBySkillId", ";", "}", "if", "(", "$", "partial", "&&", "$", "this", "->", "collFunctionPhasesRelatedBySkillId", ")", "{", "foreach", "(", "$", "this", "->", "collFunctionPhasesRelatedBySkillId", "as", "$", "obj", ")", "{", "if", "(", "$", "obj", "->", "isNew", "(", ")", ")", "{", "$", "collFunctionPhasesRelatedBySkillId", "[", "]", "=", "$", "obj", ";", "}", "}", "}", "$", "this", "->", "collFunctionPhasesRelatedBySkillId", "=", "$", "collFunctionPhasesRelatedBySkillId", ";", "$", "this", "->", "collFunctionPhasesRelatedBySkillIdPartial", "=", "false", ";", "}", "}", "return", "$", "this", "->", "collFunctionPhasesRelatedBySkillId", ";", "}" ]
Gets an array of ChildFunctionPhase 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 cached collection is returned. If this ChildSkill is new, it will return an empty collection or the current collection; the criteria is ignored on a new object. @param Criteria $criteria optional Criteria object to narrow the query @param ConnectionInterface $con optional connection object @return ObjectCollection|ChildFunctionPhase[] List of ChildFunctionPhase objects @throws PropelException
[ "Gets", "an", "array", "of", "ChildFunctionPhase", "objects", "which", "contain", "a", "foreign", "key", "that", "references", "this", "object", "." ]
221a6c5322473d7d7f8e322958a3ee46d87da150
https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/Skill.php#L8922-L8964
50
gossi/trixionary
src/model/Base/Skill.php
Skill.countFunctionPhasesRelatedBySkillId
public function countFunctionPhasesRelatedBySkillId(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) { $partial = $this->collFunctionPhasesRelatedBySkillIdPartial && !$this->isNew(); if (null === $this->collFunctionPhasesRelatedBySkillId || null !== $criteria || $partial) { if ($this->isNew() && null === $this->collFunctionPhasesRelatedBySkillId) { return 0; } if ($partial && !$criteria) { return count($this->getFunctionPhasesRelatedBySkillId()); } $query = ChildFunctionPhaseQuery::create(null, $criteria); if ($distinct) { $query->distinct(); } return $query ->filterBySkillRelatedBySkillId($this) ->count($con); } return count($this->collFunctionPhasesRelatedBySkillId); }
php
public function countFunctionPhasesRelatedBySkillId(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) { $partial = $this->collFunctionPhasesRelatedBySkillIdPartial && !$this->isNew(); if (null === $this->collFunctionPhasesRelatedBySkillId || null !== $criteria || $partial) { if ($this->isNew() && null === $this->collFunctionPhasesRelatedBySkillId) { return 0; } if ($partial && !$criteria) { return count($this->getFunctionPhasesRelatedBySkillId()); } $query = ChildFunctionPhaseQuery::create(null, $criteria); if ($distinct) { $query->distinct(); } return $query ->filterBySkillRelatedBySkillId($this) ->count($con); } return count($this->collFunctionPhasesRelatedBySkillId); }
[ "public", "function", "countFunctionPhasesRelatedBySkillId", "(", "Criteria", "$", "criteria", "=", "null", ",", "$", "distinct", "=", "false", ",", "ConnectionInterface", "$", "con", "=", "null", ")", "{", "$", "partial", "=", "$", "this", "->", "collFunctionPhasesRelatedBySkillIdPartial", "&&", "!", "$", "this", "->", "isNew", "(", ")", ";", "if", "(", "null", "===", "$", "this", "->", "collFunctionPhasesRelatedBySkillId", "||", "null", "!==", "$", "criteria", "||", "$", "partial", ")", "{", "if", "(", "$", "this", "->", "isNew", "(", ")", "&&", "null", "===", "$", "this", "->", "collFunctionPhasesRelatedBySkillId", ")", "{", "return", "0", ";", "}", "if", "(", "$", "partial", "&&", "!", "$", "criteria", ")", "{", "return", "count", "(", "$", "this", "->", "getFunctionPhasesRelatedBySkillId", "(", ")", ")", ";", "}", "$", "query", "=", "ChildFunctionPhaseQuery", "::", "create", "(", "null", ",", "$", "criteria", ")", ";", "if", "(", "$", "distinct", ")", "{", "$", "query", "->", "distinct", "(", ")", ";", "}", "return", "$", "query", "->", "filterBySkillRelatedBySkillId", "(", "$", "this", ")", "->", "count", "(", "$", "con", ")", ";", "}", "return", "count", "(", "$", "this", "->", "collFunctionPhasesRelatedBySkillId", ")", ";", "}" ]
Returns the number of related FunctionPhase objects. @param Criteria $criteria @param boolean $distinct @param ConnectionInterface $con @return int Count of related FunctionPhase objects. @throws PropelException
[ "Returns", "the", "number", "of", "related", "FunctionPhase", "objects", "." ]
221a6c5322473d7d7f8e322958a3ee46d87da150
https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/Skill.php#L9008-L9031
51
gossi/trixionary
src/model/Base/Skill.php
Skill.addFunctionPhaseRelatedBySkillId
public function addFunctionPhaseRelatedBySkillId(ChildFunctionPhase $l) { if ($this->collFunctionPhasesRelatedBySkillId === null) { $this->initFunctionPhasesRelatedBySkillId(); $this->collFunctionPhasesRelatedBySkillIdPartial = true; } if (!$this->collFunctionPhasesRelatedBySkillId->contains($l)) { $this->doAddFunctionPhaseRelatedBySkillId($l); } return $this; }
php
public function addFunctionPhaseRelatedBySkillId(ChildFunctionPhase $l) { if ($this->collFunctionPhasesRelatedBySkillId === null) { $this->initFunctionPhasesRelatedBySkillId(); $this->collFunctionPhasesRelatedBySkillIdPartial = true; } if (!$this->collFunctionPhasesRelatedBySkillId->contains($l)) { $this->doAddFunctionPhaseRelatedBySkillId($l); } return $this; }
[ "public", "function", "addFunctionPhaseRelatedBySkillId", "(", "ChildFunctionPhase", "$", "l", ")", "{", "if", "(", "$", "this", "->", "collFunctionPhasesRelatedBySkillId", "===", "null", ")", "{", "$", "this", "->", "initFunctionPhasesRelatedBySkillId", "(", ")", ";", "$", "this", "->", "collFunctionPhasesRelatedBySkillIdPartial", "=", "true", ";", "}", "if", "(", "!", "$", "this", "->", "collFunctionPhasesRelatedBySkillId", "->", "contains", "(", "$", "l", ")", ")", "{", "$", "this", "->", "doAddFunctionPhaseRelatedBySkillId", "(", "$", "l", ")", ";", "}", "return", "$", "this", ";", "}" ]
Method called to associate a ChildFunctionPhase object to this object through the ChildFunctionPhase foreign key attribute. @param ChildFunctionPhase $l ChildFunctionPhase @return $this|\gossi\trixionary\model\Skill The current object (for fluent API support)
[ "Method", "called", "to", "associate", "a", "ChildFunctionPhase", "object", "to", "this", "object", "through", "the", "ChildFunctionPhase", "foreign", "key", "attribute", "." ]
221a6c5322473d7d7f8e322958a3ee46d87da150
https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/Skill.php#L9040-L9052
52
gossi/trixionary
src/model/Base/Skill.php
Skill.getFunctionPhasesRelatedBySkillIdJoinStructureNode
public function getFunctionPhasesRelatedBySkillIdJoinStructureNode(Criteria $criteria = null, ConnectionInterface $con = null, $joinBehavior = Criteria::LEFT_JOIN) { $query = ChildFunctionPhaseQuery::create(null, $criteria); $query->joinWith('StructureNode', $joinBehavior); return $this->getFunctionPhasesRelatedBySkillId($query, $con); }
php
public function getFunctionPhasesRelatedBySkillIdJoinStructureNode(Criteria $criteria = null, ConnectionInterface $con = null, $joinBehavior = Criteria::LEFT_JOIN) { $query = ChildFunctionPhaseQuery::create(null, $criteria); $query->joinWith('StructureNode', $joinBehavior); return $this->getFunctionPhasesRelatedBySkillId($query, $con); }
[ "public", "function", "getFunctionPhasesRelatedBySkillIdJoinStructureNode", "(", "Criteria", "$", "criteria", "=", "null", ",", "ConnectionInterface", "$", "con", "=", "null", ",", "$", "joinBehavior", "=", "Criteria", "::", "LEFT_JOIN", ")", "{", "$", "query", "=", "ChildFunctionPhaseQuery", "::", "create", "(", "null", ",", "$", "criteria", ")", ";", "$", "query", "->", "joinWith", "(", "'StructureNode'", ",", "$", "joinBehavior", ")", ";", "return", "$", "this", "->", "getFunctionPhasesRelatedBySkillId", "(", "$", "query", ",", "$", "con", ")", ";", "}" ]
If this collection has already been initialized with an identical criteria, it returns the collection. Otherwise if this Skill is new, it will return an empty collection; or if this Skill has previously been saved, it will retrieve related FunctionPhasesRelatedBySkillId from storage. This method is protected by default in order to keep the public api reasonable. You can provide public methods for those you actually need in Skill. @param Criteria $criteria optional Criteria object to narrow the query @param ConnectionInterface $con optional connection object @param string $joinBehavior optional join type to use (defaults to Criteria::LEFT_JOIN) @return ObjectCollection|ChildFunctionPhase[] List of ChildFunctionPhase objects
[ "If", "this", "collection", "has", "already", "been", "initialized", "with", "an", "identical", "criteria", "it", "returns", "the", "collection", ".", "Otherwise", "if", "this", "Skill", "is", "new", "it", "will", "return", "an", "empty", "collection", ";", "or", "if", "this", "Skill", "has", "previously", "been", "saved", "it", "will", "retrieve", "related", "FunctionPhasesRelatedBySkillId", "from", "storage", "." ]
221a6c5322473d7d7f8e322958a3ee46d87da150
https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/Skill.php#L9100-L9106
53
gossi/trixionary
src/model/Base/Skill.php
Skill.initSkillVersions
public function initSkillVersions($overrideExisting = true) { if (null !== $this->collSkillVersions && !$overrideExisting) { return; } $this->collSkillVersions = new ObjectCollection(); $this->collSkillVersions->setModel('\gossi\trixionary\model\SkillVersion'); }
php
public function initSkillVersions($overrideExisting = true) { if (null !== $this->collSkillVersions && !$overrideExisting) { return; } $this->collSkillVersions = new ObjectCollection(); $this->collSkillVersions->setModel('\gossi\trixionary\model\SkillVersion'); }
[ "public", "function", "initSkillVersions", "(", "$", "overrideExisting", "=", "true", ")", "{", "if", "(", "null", "!==", "$", "this", "->", "collSkillVersions", "&&", "!", "$", "overrideExisting", ")", "{", "return", ";", "}", "$", "this", "->", "collSkillVersions", "=", "new", "ObjectCollection", "(", ")", ";", "$", "this", "->", "collSkillVersions", "->", "setModel", "(", "'\\gossi\\trixionary\\model\\SkillVersion'", ")", ";", "}" ]
Initializes the collSkillVersions collection. By default this just sets the collSkillVersions collection to an empty array (like clearcollSkillVersions()); 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 database. @param boolean $overrideExisting If set to true, the method call initializes the collection even if it is not empty @return void
[ "Initializes", "the", "collSkillVersions", "collection", "." ]
221a6c5322473d7d7f8e322958a3ee46d87da150
https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/Skill.php#L9142-L9149
54
gossi/trixionary
src/model/Base/Skill.php
Skill.getSkillVersions
public function getSkillVersions(Criteria $criteria = null, ConnectionInterface $con = null) { $partial = $this->collSkillVersionsPartial && !$this->isNew(); if (null === $this->collSkillVersions || null !== $criteria || $partial) { if ($this->isNew() && null === $this->collSkillVersions) { // return empty collection $this->initSkillVersions(); } else { $collSkillVersions = ChildSkillVersionQuery::create(null, $criteria) ->filterBySkill($this) ->find($con); if (null !== $criteria) { if (false !== $this->collSkillVersionsPartial && count($collSkillVersions)) { $this->initSkillVersions(false); foreach ($collSkillVersions as $obj) { if (false == $this->collSkillVersions->contains($obj)) { $this->collSkillVersions->append($obj); } } $this->collSkillVersionsPartial = true; } return $collSkillVersions; } if ($partial && $this->collSkillVersions) { foreach ($this->collSkillVersions as $obj) { if ($obj->isNew()) { $collSkillVersions[] = $obj; } } } $this->collSkillVersions = $collSkillVersions; $this->collSkillVersionsPartial = false; } } return $this->collSkillVersions; }
php
public function getSkillVersions(Criteria $criteria = null, ConnectionInterface $con = null) { $partial = $this->collSkillVersionsPartial && !$this->isNew(); if (null === $this->collSkillVersions || null !== $criteria || $partial) { if ($this->isNew() && null === $this->collSkillVersions) { // return empty collection $this->initSkillVersions(); } else { $collSkillVersions = ChildSkillVersionQuery::create(null, $criteria) ->filterBySkill($this) ->find($con); if (null !== $criteria) { if (false !== $this->collSkillVersionsPartial && count($collSkillVersions)) { $this->initSkillVersions(false); foreach ($collSkillVersions as $obj) { if (false == $this->collSkillVersions->contains($obj)) { $this->collSkillVersions->append($obj); } } $this->collSkillVersionsPartial = true; } return $collSkillVersions; } if ($partial && $this->collSkillVersions) { foreach ($this->collSkillVersions as $obj) { if ($obj->isNew()) { $collSkillVersions[] = $obj; } } } $this->collSkillVersions = $collSkillVersions; $this->collSkillVersionsPartial = false; } } return $this->collSkillVersions; }
[ "public", "function", "getSkillVersions", "(", "Criteria", "$", "criteria", "=", "null", ",", "ConnectionInterface", "$", "con", "=", "null", ")", "{", "$", "partial", "=", "$", "this", "->", "collSkillVersionsPartial", "&&", "!", "$", "this", "->", "isNew", "(", ")", ";", "if", "(", "null", "===", "$", "this", "->", "collSkillVersions", "||", "null", "!==", "$", "criteria", "||", "$", "partial", ")", "{", "if", "(", "$", "this", "->", "isNew", "(", ")", "&&", "null", "===", "$", "this", "->", "collSkillVersions", ")", "{", "// return empty collection", "$", "this", "->", "initSkillVersions", "(", ")", ";", "}", "else", "{", "$", "collSkillVersions", "=", "ChildSkillVersionQuery", "::", "create", "(", "null", ",", "$", "criteria", ")", "->", "filterBySkill", "(", "$", "this", ")", "->", "find", "(", "$", "con", ")", ";", "if", "(", "null", "!==", "$", "criteria", ")", "{", "if", "(", "false", "!==", "$", "this", "->", "collSkillVersionsPartial", "&&", "count", "(", "$", "collSkillVersions", ")", ")", "{", "$", "this", "->", "initSkillVersions", "(", "false", ")", ";", "foreach", "(", "$", "collSkillVersions", "as", "$", "obj", ")", "{", "if", "(", "false", "==", "$", "this", "->", "collSkillVersions", "->", "contains", "(", "$", "obj", ")", ")", "{", "$", "this", "->", "collSkillVersions", "->", "append", "(", "$", "obj", ")", ";", "}", "}", "$", "this", "->", "collSkillVersionsPartial", "=", "true", ";", "}", "return", "$", "collSkillVersions", ";", "}", "if", "(", "$", "partial", "&&", "$", "this", "->", "collSkillVersions", ")", "{", "foreach", "(", "$", "this", "->", "collSkillVersions", "as", "$", "obj", ")", "{", "if", "(", "$", "obj", "->", "isNew", "(", ")", ")", "{", "$", "collSkillVersions", "[", "]", "=", "$", "obj", ";", "}", "}", "}", "$", "this", "->", "collSkillVersions", "=", "$", "collSkillVersions", ";", "$", "this", "->", "collSkillVersionsPartial", "=", "false", ";", "}", "}", "return", "$", "this", "->", "collSkillVersions", ";", "}" ]
Gets an array of ChildSkillVersion 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 cached collection is returned. If this ChildSkill is new, it will return an empty collection or the current collection; the criteria is ignored on a new object. @param Criteria $criteria optional Criteria object to narrow the query @param ConnectionInterface $con optional connection object @return ObjectCollection|ChildSkillVersion[] List of ChildSkillVersion objects @throws PropelException
[ "Gets", "an", "array", "of", "ChildSkillVersion", "objects", "which", "contain", "a", "foreign", "key", "that", "references", "this", "object", "." ]
221a6c5322473d7d7f8e322958a3ee46d87da150
https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/Skill.php#L9165-L9207
55
gossi/trixionary
src/model/Base/Skill.php
Skill.countSkillVersions
public function countSkillVersions(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) { $partial = $this->collSkillVersionsPartial && !$this->isNew(); if (null === $this->collSkillVersions || null !== $criteria || $partial) { if ($this->isNew() && null === $this->collSkillVersions) { return 0; } if ($partial && !$criteria) { return count($this->getSkillVersions()); } $query = ChildSkillVersionQuery::create(null, $criteria); if ($distinct) { $query->distinct(); } return $query ->filterBySkill($this) ->count($con); } return count($this->collSkillVersions); }
php
public function countSkillVersions(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) { $partial = $this->collSkillVersionsPartial && !$this->isNew(); if (null === $this->collSkillVersions || null !== $criteria || $partial) { if ($this->isNew() && null === $this->collSkillVersions) { return 0; } if ($partial && !$criteria) { return count($this->getSkillVersions()); } $query = ChildSkillVersionQuery::create(null, $criteria); if ($distinct) { $query->distinct(); } return $query ->filterBySkill($this) ->count($con); } return count($this->collSkillVersions); }
[ "public", "function", "countSkillVersions", "(", "Criteria", "$", "criteria", "=", "null", ",", "$", "distinct", "=", "false", ",", "ConnectionInterface", "$", "con", "=", "null", ")", "{", "$", "partial", "=", "$", "this", "->", "collSkillVersionsPartial", "&&", "!", "$", "this", "->", "isNew", "(", ")", ";", "if", "(", "null", "===", "$", "this", "->", "collSkillVersions", "||", "null", "!==", "$", "criteria", "||", "$", "partial", ")", "{", "if", "(", "$", "this", "->", "isNew", "(", ")", "&&", "null", "===", "$", "this", "->", "collSkillVersions", ")", "{", "return", "0", ";", "}", "if", "(", "$", "partial", "&&", "!", "$", "criteria", ")", "{", "return", "count", "(", "$", "this", "->", "getSkillVersions", "(", ")", ")", ";", "}", "$", "query", "=", "ChildSkillVersionQuery", "::", "create", "(", "null", ",", "$", "criteria", ")", ";", "if", "(", "$", "distinct", ")", "{", "$", "query", "->", "distinct", "(", ")", ";", "}", "return", "$", "query", "->", "filterBySkill", "(", "$", "this", ")", "->", "count", "(", "$", "con", ")", ";", "}", "return", "count", "(", "$", "this", "->", "collSkillVersions", ")", ";", "}" ]
Returns the number of related SkillVersion objects. @param Criteria $criteria @param boolean $distinct @param ConnectionInterface $con @return int Count of related SkillVersion objects. @throws PropelException
[ "Returns", "the", "number", "of", "related", "SkillVersion", "objects", "." ]
221a6c5322473d7d7f8e322958a3ee46d87da150
https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/Skill.php#L9254-L9277
56
gossi/trixionary
src/model/Base/Skill.php
Skill.addSkillVersion
public function addSkillVersion(ChildSkillVersion $l) { if ($this->collSkillVersions === null) { $this->initSkillVersions(); $this->collSkillVersionsPartial = true; } if (!$this->collSkillVersions->contains($l)) { $this->doAddSkillVersion($l); } return $this; }
php
public function addSkillVersion(ChildSkillVersion $l) { if ($this->collSkillVersions === null) { $this->initSkillVersions(); $this->collSkillVersionsPartial = true; } if (!$this->collSkillVersions->contains($l)) { $this->doAddSkillVersion($l); } return $this; }
[ "public", "function", "addSkillVersion", "(", "ChildSkillVersion", "$", "l", ")", "{", "if", "(", "$", "this", "->", "collSkillVersions", "===", "null", ")", "{", "$", "this", "->", "initSkillVersions", "(", ")", ";", "$", "this", "->", "collSkillVersionsPartial", "=", "true", ";", "}", "if", "(", "!", "$", "this", "->", "collSkillVersions", "->", "contains", "(", "$", "l", ")", ")", "{", "$", "this", "->", "doAddSkillVersion", "(", "$", "l", ")", ";", "}", "return", "$", "this", ";", "}" ]
Method called to associate a ChildSkillVersion object to this object through the ChildSkillVersion foreign key attribute. @param ChildSkillVersion $l ChildSkillVersion @return $this|\gossi\trixionary\model\Skill The current object (for fluent API support)
[ "Method", "called", "to", "associate", "a", "ChildSkillVersion", "object", "to", "this", "object", "through", "the", "ChildSkillVersion", "foreign", "key", "attribute", "." ]
221a6c5322473d7d7f8e322958a3ee46d87da150
https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/Skill.php#L9286-L9298
57
gossi/trixionary
src/model/Base/Skill.php
Skill.initSkillsRelatedByParentId
public function initSkillsRelatedByParentId() { $this->collSkillsRelatedByParentId = new ObjectCollection(); $this->collSkillsRelatedByParentIdPartial = true; $this->collSkillsRelatedByParentId->setModel('\gossi\trixionary\model\Skill'); }
php
public function initSkillsRelatedByParentId() { $this->collSkillsRelatedByParentId = new ObjectCollection(); $this->collSkillsRelatedByParentIdPartial = true; $this->collSkillsRelatedByParentId->setModel('\gossi\trixionary\model\Skill'); }
[ "public", "function", "initSkillsRelatedByParentId", "(", ")", "{", "$", "this", "->", "collSkillsRelatedByParentId", "=", "new", "ObjectCollection", "(", ")", ";", "$", "this", "->", "collSkillsRelatedByParentIdPartial", "=", "true", ";", "$", "this", "->", "collSkillsRelatedByParentId", "->", "setModel", "(", "'\\gossi\\trixionary\\model\\Skill'", ")", ";", "}" ]
Initializes the collSkillsRelatedByParentId crossRef collection. By default this just sets the collSkillsRelatedByParentId collection to an empty collection (like clearSkillsRelatedByParentId()); 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 database. @return void
[ "Initializes", "the", "collSkillsRelatedByParentId", "crossRef", "collection", "." ]
221a6c5322473d7d7f8e322958a3ee46d87da150
https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/Skill.php#L9352-L9358
58
gossi/trixionary
src/model/Base/Skill.php
Skill.removeSkillRelatedByParentId
public function removeSkillRelatedByParentId(ChildSkill $skillRelatedByParentId) { if ($this->getSkillsRelatedByParentId()->contains($skillRelatedByParentId)) { $skillDependency = new ChildSkillDependency(); $skillDependency->setSkillRelatedByParentId($skillRelatedByParentId); if ($skillRelatedByParentId->isSkillRelatedByDependencyIdsLoaded()) { //remove the back reference if available $skillRelatedByParentId->getSkillRelatedByDependencyIds()->removeObject($this); } $skillDependency->setSkillRelatedByDependencyId($this); $this->removeChild(clone $skillDependency); $skillDependency->clear(); $this->collSkillsRelatedByParentId->remove($this->collSkillsRelatedByParentId->search($skillRelatedByParentId)); if (null === $this->skillsRelatedByParentIdScheduledForDeletion) { $this->skillsRelatedByParentIdScheduledForDeletion = clone $this->collSkillsRelatedByParentId; $this->skillsRelatedByParentIdScheduledForDeletion->clear(); } $this->skillsRelatedByParentIdScheduledForDeletion->push($skillRelatedByParentId); } return $this; }
php
public function removeSkillRelatedByParentId(ChildSkill $skillRelatedByParentId) { if ($this->getSkillsRelatedByParentId()->contains($skillRelatedByParentId)) { $skillDependency = new ChildSkillDependency(); $skillDependency->setSkillRelatedByParentId($skillRelatedByParentId); if ($skillRelatedByParentId->isSkillRelatedByDependencyIdsLoaded()) { //remove the back reference if available $skillRelatedByParentId->getSkillRelatedByDependencyIds()->removeObject($this); } $skillDependency->setSkillRelatedByDependencyId($this); $this->removeChild(clone $skillDependency); $skillDependency->clear(); $this->collSkillsRelatedByParentId->remove($this->collSkillsRelatedByParentId->search($skillRelatedByParentId)); if (null === $this->skillsRelatedByParentIdScheduledForDeletion) { $this->skillsRelatedByParentIdScheduledForDeletion = clone $this->collSkillsRelatedByParentId; $this->skillsRelatedByParentIdScheduledForDeletion->clear(); } $this->skillsRelatedByParentIdScheduledForDeletion->push($skillRelatedByParentId); } return $this; }
[ "public", "function", "removeSkillRelatedByParentId", "(", "ChildSkill", "$", "skillRelatedByParentId", ")", "{", "if", "(", "$", "this", "->", "getSkillsRelatedByParentId", "(", ")", "->", "contains", "(", "$", "skillRelatedByParentId", ")", ")", "{", "$", "skillDependency", "=", "new", "ChildSkillDependency", "(", ")", ";", "$", "skillDependency", "->", "setSkillRelatedByParentId", "(", "$", "skillRelatedByParentId", ")", ";", "if", "(", "$", "skillRelatedByParentId", "->", "isSkillRelatedByDependencyIdsLoaded", "(", ")", ")", "{", "//remove the back reference if available", "$", "skillRelatedByParentId", "->", "getSkillRelatedByDependencyIds", "(", ")", "->", "removeObject", "(", "$", "this", ")", ";", "}", "$", "skillDependency", "->", "setSkillRelatedByDependencyId", "(", "$", "this", ")", ";", "$", "this", "->", "removeChild", "(", "clone", "$", "skillDependency", ")", ";", "$", "skillDependency", "->", "clear", "(", ")", ";", "$", "this", "->", "collSkillsRelatedByParentId", "->", "remove", "(", "$", "this", "->", "collSkillsRelatedByParentId", "->", "search", "(", "$", "skillRelatedByParentId", ")", ")", ";", "if", "(", "null", "===", "$", "this", "->", "skillsRelatedByParentIdScheduledForDeletion", ")", "{", "$", "this", "->", "skillsRelatedByParentIdScheduledForDeletion", "=", "clone", "$", "this", "->", "collSkillsRelatedByParentId", ";", "$", "this", "->", "skillsRelatedByParentIdScheduledForDeletion", "->", "clear", "(", ")", ";", "}", "$", "this", "->", "skillsRelatedByParentIdScheduledForDeletion", "->", "push", "(", "$", "skillRelatedByParentId", ")", ";", "}", "return", "$", "this", ";", "}" ]
Remove skillRelatedByParentId of this object through the kk_trixionary_skill_dependency cross reference table. @param ChildSkill $skillRelatedByParentId @return ChildSkill The current object (for fluent API support)
[ "Remove", "skillRelatedByParentId", "of", "this", "object", "through", "the", "kk_trixionary_skill_dependency", "cross", "reference", "table", "." ]
221a6c5322473d7d7f8e322958a3ee46d87da150
https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/Skill.php#L9543-L9569
59
gossi/trixionary
src/model/Base/Skill.php
Skill.initSkillsRelatedByDependencyId
public function initSkillsRelatedByDependencyId() { $this->collSkillsRelatedByDependencyId = new ObjectCollection(); $this->collSkillsRelatedByDependencyIdPartial = true; $this->collSkillsRelatedByDependencyId->setModel('\gossi\trixionary\model\Skill'); }
php
public function initSkillsRelatedByDependencyId() { $this->collSkillsRelatedByDependencyId = new ObjectCollection(); $this->collSkillsRelatedByDependencyIdPartial = true; $this->collSkillsRelatedByDependencyId->setModel('\gossi\trixionary\model\Skill'); }
[ "public", "function", "initSkillsRelatedByDependencyId", "(", ")", "{", "$", "this", "->", "collSkillsRelatedByDependencyId", "=", "new", "ObjectCollection", "(", ")", ";", "$", "this", "->", "collSkillsRelatedByDependencyIdPartial", "=", "true", ";", "$", "this", "->", "collSkillsRelatedByDependencyId", "->", "setModel", "(", "'\\gossi\\trixionary\\model\\Skill'", ")", ";", "}" ]
Initializes the collSkillsRelatedByDependencyId crossRef collection. By default this just sets the collSkillsRelatedByDependencyId collection to an empty collection (like clearSkillsRelatedByDependencyId()); 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 database. @return void
[ "Initializes", "the", "collSkillsRelatedByDependencyId", "crossRef", "collection", "." ]
221a6c5322473d7d7f8e322958a3ee46d87da150
https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/Skill.php#L9594-L9600
60
gossi/trixionary
src/model/Base/Skill.php
Skill.removeSkillRelatedByDependencyId
public function removeSkillRelatedByDependencyId(ChildSkill $skillRelatedByDependencyId) { if ($this->getSkillsRelatedByDependencyId()->contains($skillRelatedByDependencyId)) { $skillDependency = new ChildSkillDependency(); $skillDependency->setSkillRelatedByDependencyId($skillRelatedByDependencyId); if ($skillRelatedByDependencyId->isSkillRelatedByParentIdsLoaded()) { //remove the back reference if available $skillRelatedByDependencyId->getSkillRelatedByParentIds()->removeObject($this); } $skillDependency->setSkillRelatedByParentId($this); $this->removeParent(clone $skillDependency); $skillDependency->clear(); $this->collSkillsRelatedByDependencyId->remove($this->collSkillsRelatedByDependencyId->search($skillRelatedByDependencyId)); if (null === $this->skillsRelatedByDependencyIdScheduledForDeletion) { $this->skillsRelatedByDependencyIdScheduledForDeletion = clone $this->collSkillsRelatedByDependencyId; $this->skillsRelatedByDependencyIdScheduledForDeletion->clear(); } $this->skillsRelatedByDependencyIdScheduledForDeletion->push($skillRelatedByDependencyId); } return $this; }
php
public function removeSkillRelatedByDependencyId(ChildSkill $skillRelatedByDependencyId) { if ($this->getSkillsRelatedByDependencyId()->contains($skillRelatedByDependencyId)) { $skillDependency = new ChildSkillDependency(); $skillDependency->setSkillRelatedByDependencyId($skillRelatedByDependencyId); if ($skillRelatedByDependencyId->isSkillRelatedByParentIdsLoaded()) { //remove the back reference if available $skillRelatedByDependencyId->getSkillRelatedByParentIds()->removeObject($this); } $skillDependency->setSkillRelatedByParentId($this); $this->removeParent(clone $skillDependency); $skillDependency->clear(); $this->collSkillsRelatedByDependencyId->remove($this->collSkillsRelatedByDependencyId->search($skillRelatedByDependencyId)); if (null === $this->skillsRelatedByDependencyIdScheduledForDeletion) { $this->skillsRelatedByDependencyIdScheduledForDeletion = clone $this->collSkillsRelatedByDependencyId; $this->skillsRelatedByDependencyIdScheduledForDeletion->clear(); } $this->skillsRelatedByDependencyIdScheduledForDeletion->push($skillRelatedByDependencyId); } return $this; }
[ "public", "function", "removeSkillRelatedByDependencyId", "(", "ChildSkill", "$", "skillRelatedByDependencyId", ")", "{", "if", "(", "$", "this", "->", "getSkillsRelatedByDependencyId", "(", ")", "->", "contains", "(", "$", "skillRelatedByDependencyId", ")", ")", "{", "$", "skillDependency", "=", "new", "ChildSkillDependency", "(", ")", ";", "$", "skillDependency", "->", "setSkillRelatedByDependencyId", "(", "$", "skillRelatedByDependencyId", ")", ";", "if", "(", "$", "skillRelatedByDependencyId", "->", "isSkillRelatedByParentIdsLoaded", "(", ")", ")", "{", "//remove the back reference if available", "$", "skillRelatedByDependencyId", "->", "getSkillRelatedByParentIds", "(", ")", "->", "removeObject", "(", "$", "this", ")", ";", "}", "$", "skillDependency", "->", "setSkillRelatedByParentId", "(", "$", "this", ")", ";", "$", "this", "->", "removeParent", "(", "clone", "$", "skillDependency", ")", ";", "$", "skillDependency", "->", "clear", "(", ")", ";", "$", "this", "->", "collSkillsRelatedByDependencyId", "->", "remove", "(", "$", "this", "->", "collSkillsRelatedByDependencyId", "->", "search", "(", "$", "skillRelatedByDependencyId", ")", ")", ";", "if", "(", "null", "===", "$", "this", "->", "skillsRelatedByDependencyIdScheduledForDeletion", ")", "{", "$", "this", "->", "skillsRelatedByDependencyIdScheduledForDeletion", "=", "clone", "$", "this", "->", "collSkillsRelatedByDependencyId", ";", "$", "this", "->", "skillsRelatedByDependencyIdScheduledForDeletion", "->", "clear", "(", ")", ";", "}", "$", "this", "->", "skillsRelatedByDependencyIdScheduledForDeletion", "->", "push", "(", "$", "skillRelatedByDependencyId", ")", ";", "}", "return", "$", "this", ";", "}" ]
Remove skillRelatedByDependencyId of this object through the kk_trixionary_skill_dependency cross reference table. @param ChildSkill $skillRelatedByDependencyId @return ChildSkill The current object (for fluent API support)
[ "Remove", "skillRelatedByDependencyId", "of", "this", "object", "through", "the", "kk_trixionary_skill_dependency", "cross", "reference", "table", "." ]
221a6c5322473d7d7f8e322958a3ee46d87da150
https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/Skill.php#L9785-L9811
61
gossi/trixionary
src/model/Base/Skill.php
Skill.initSkillsRelatedByCompositeId
public function initSkillsRelatedByCompositeId() { $this->collSkillsRelatedByCompositeId = new ObjectCollection(); $this->collSkillsRelatedByCompositeIdPartial = true; $this->collSkillsRelatedByCompositeId->setModel('\gossi\trixionary\model\Skill'); }
php
public function initSkillsRelatedByCompositeId() { $this->collSkillsRelatedByCompositeId = new ObjectCollection(); $this->collSkillsRelatedByCompositeIdPartial = true; $this->collSkillsRelatedByCompositeId->setModel('\gossi\trixionary\model\Skill'); }
[ "public", "function", "initSkillsRelatedByCompositeId", "(", ")", "{", "$", "this", "->", "collSkillsRelatedByCompositeId", "=", "new", "ObjectCollection", "(", ")", ";", "$", "this", "->", "collSkillsRelatedByCompositeIdPartial", "=", "true", ";", "$", "this", "->", "collSkillsRelatedByCompositeId", "->", "setModel", "(", "'\\gossi\\trixionary\\model\\Skill'", ")", ";", "}" ]
Initializes the collSkillsRelatedByCompositeId crossRef collection. By default this just sets the collSkillsRelatedByCompositeId collection to an empty collection (like clearSkillsRelatedByCompositeId()); 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 database. @return void
[ "Initializes", "the", "collSkillsRelatedByCompositeId", "crossRef", "collection", "." ]
221a6c5322473d7d7f8e322958a3ee46d87da150
https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/Skill.php#L9836-L9842
62
gossi/trixionary
src/model/Base/Skill.php
Skill.removeSkillRelatedByCompositeId
public function removeSkillRelatedByCompositeId(ChildSkill $skillRelatedByCompositeId) { if ($this->getSkillsRelatedByCompositeId()->contains($skillRelatedByCompositeId)) { $skillPart = new ChildSkillPart(); $skillPart->setSkillRelatedByCompositeId($skillRelatedByCompositeId); if ($skillRelatedByCompositeId->isSkillRelatedByPartIdsLoaded()) { //remove the back reference if available $skillRelatedByCompositeId->getSkillRelatedByPartIds()->removeObject($this); } $skillPart->setSkillRelatedByPartId($this); $this->removePart(clone $skillPart); $skillPart->clear(); $this->collSkillsRelatedByCompositeId->remove($this->collSkillsRelatedByCompositeId->search($skillRelatedByCompositeId)); if (null === $this->skillsRelatedByCompositeIdScheduledForDeletion) { $this->skillsRelatedByCompositeIdScheduledForDeletion = clone $this->collSkillsRelatedByCompositeId; $this->skillsRelatedByCompositeIdScheduledForDeletion->clear(); } $this->skillsRelatedByCompositeIdScheduledForDeletion->push($skillRelatedByCompositeId); } return $this; }
php
public function removeSkillRelatedByCompositeId(ChildSkill $skillRelatedByCompositeId) { if ($this->getSkillsRelatedByCompositeId()->contains($skillRelatedByCompositeId)) { $skillPart = new ChildSkillPart(); $skillPart->setSkillRelatedByCompositeId($skillRelatedByCompositeId); if ($skillRelatedByCompositeId->isSkillRelatedByPartIdsLoaded()) { //remove the back reference if available $skillRelatedByCompositeId->getSkillRelatedByPartIds()->removeObject($this); } $skillPart->setSkillRelatedByPartId($this); $this->removePart(clone $skillPart); $skillPart->clear(); $this->collSkillsRelatedByCompositeId->remove($this->collSkillsRelatedByCompositeId->search($skillRelatedByCompositeId)); if (null === $this->skillsRelatedByCompositeIdScheduledForDeletion) { $this->skillsRelatedByCompositeIdScheduledForDeletion = clone $this->collSkillsRelatedByCompositeId; $this->skillsRelatedByCompositeIdScheduledForDeletion->clear(); } $this->skillsRelatedByCompositeIdScheduledForDeletion->push($skillRelatedByCompositeId); } return $this; }
[ "public", "function", "removeSkillRelatedByCompositeId", "(", "ChildSkill", "$", "skillRelatedByCompositeId", ")", "{", "if", "(", "$", "this", "->", "getSkillsRelatedByCompositeId", "(", ")", "->", "contains", "(", "$", "skillRelatedByCompositeId", ")", ")", "{", "$", "skillPart", "=", "new", "ChildSkillPart", "(", ")", ";", "$", "skillPart", "->", "setSkillRelatedByCompositeId", "(", "$", "skillRelatedByCompositeId", ")", ";", "if", "(", "$", "skillRelatedByCompositeId", "->", "isSkillRelatedByPartIdsLoaded", "(", ")", ")", "{", "//remove the back reference if available", "$", "skillRelatedByCompositeId", "->", "getSkillRelatedByPartIds", "(", ")", "->", "removeObject", "(", "$", "this", ")", ";", "}", "$", "skillPart", "->", "setSkillRelatedByPartId", "(", "$", "this", ")", ";", "$", "this", "->", "removePart", "(", "clone", "$", "skillPart", ")", ";", "$", "skillPart", "->", "clear", "(", ")", ";", "$", "this", "->", "collSkillsRelatedByCompositeId", "->", "remove", "(", "$", "this", "->", "collSkillsRelatedByCompositeId", "->", "search", "(", "$", "skillRelatedByCompositeId", ")", ")", ";", "if", "(", "null", "===", "$", "this", "->", "skillsRelatedByCompositeIdScheduledForDeletion", ")", "{", "$", "this", "->", "skillsRelatedByCompositeIdScheduledForDeletion", "=", "clone", "$", "this", "->", "collSkillsRelatedByCompositeId", ";", "$", "this", "->", "skillsRelatedByCompositeIdScheduledForDeletion", "->", "clear", "(", ")", ";", "}", "$", "this", "->", "skillsRelatedByCompositeIdScheduledForDeletion", "->", "push", "(", "$", "skillRelatedByCompositeId", ")", ";", "}", "return", "$", "this", ";", "}" ]
Remove skillRelatedByCompositeId of this object through the kk_trixionary_skill_part cross reference table. @param ChildSkill $skillRelatedByCompositeId @return ChildSkill The current object (for fluent API support)
[ "Remove", "skillRelatedByCompositeId", "of", "this", "object", "through", "the", "kk_trixionary_skill_part", "cross", "reference", "table", "." ]
221a6c5322473d7d7f8e322958a3ee46d87da150
https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/Skill.php#L10027-L10053
63
gossi/trixionary
src/model/Base/Skill.php
Skill.initSkillsRelatedByPartId
public function initSkillsRelatedByPartId() { $this->collSkillsRelatedByPartId = new ObjectCollection(); $this->collSkillsRelatedByPartIdPartial = true; $this->collSkillsRelatedByPartId->setModel('\gossi\trixionary\model\Skill'); }
php
public function initSkillsRelatedByPartId() { $this->collSkillsRelatedByPartId = new ObjectCollection(); $this->collSkillsRelatedByPartIdPartial = true; $this->collSkillsRelatedByPartId->setModel('\gossi\trixionary\model\Skill'); }
[ "public", "function", "initSkillsRelatedByPartId", "(", ")", "{", "$", "this", "->", "collSkillsRelatedByPartId", "=", "new", "ObjectCollection", "(", ")", ";", "$", "this", "->", "collSkillsRelatedByPartIdPartial", "=", "true", ";", "$", "this", "->", "collSkillsRelatedByPartId", "->", "setModel", "(", "'\\gossi\\trixionary\\model\\Skill'", ")", ";", "}" ]
Initializes the collSkillsRelatedByPartId crossRef collection. By default this just sets the collSkillsRelatedByPartId collection to an empty collection (like clearSkillsRelatedByPartId()); 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 database. @return void
[ "Initializes", "the", "collSkillsRelatedByPartId", "crossRef", "collection", "." ]
221a6c5322473d7d7f8e322958a3ee46d87da150
https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/Skill.php#L10078-L10084
64
gossi/trixionary
src/model/Base/Skill.php
Skill.removeSkillRelatedByPartId
public function removeSkillRelatedByPartId(ChildSkill $skillRelatedByPartId) { if ($this->getSkillsRelatedByPartId()->contains($skillRelatedByPartId)) { $skillPart = new ChildSkillPart(); $skillPart->setSkillRelatedByPartId($skillRelatedByPartId); if ($skillRelatedByPartId->isSkillRelatedByCompositeIdsLoaded()) { //remove the back reference if available $skillRelatedByPartId->getSkillRelatedByCompositeIds()->removeObject($this); } $skillPart->setSkillRelatedByCompositeId($this); $this->removeComposite(clone $skillPart); $skillPart->clear(); $this->collSkillsRelatedByPartId->remove($this->collSkillsRelatedByPartId->search($skillRelatedByPartId)); if (null === $this->skillsRelatedByPartIdScheduledForDeletion) { $this->skillsRelatedByPartIdScheduledForDeletion = clone $this->collSkillsRelatedByPartId; $this->skillsRelatedByPartIdScheduledForDeletion->clear(); } $this->skillsRelatedByPartIdScheduledForDeletion->push($skillRelatedByPartId); } return $this; }
php
public function removeSkillRelatedByPartId(ChildSkill $skillRelatedByPartId) { if ($this->getSkillsRelatedByPartId()->contains($skillRelatedByPartId)) { $skillPart = new ChildSkillPart(); $skillPart->setSkillRelatedByPartId($skillRelatedByPartId); if ($skillRelatedByPartId->isSkillRelatedByCompositeIdsLoaded()) { //remove the back reference if available $skillRelatedByPartId->getSkillRelatedByCompositeIds()->removeObject($this); } $skillPart->setSkillRelatedByCompositeId($this); $this->removeComposite(clone $skillPart); $skillPart->clear(); $this->collSkillsRelatedByPartId->remove($this->collSkillsRelatedByPartId->search($skillRelatedByPartId)); if (null === $this->skillsRelatedByPartIdScheduledForDeletion) { $this->skillsRelatedByPartIdScheduledForDeletion = clone $this->collSkillsRelatedByPartId; $this->skillsRelatedByPartIdScheduledForDeletion->clear(); } $this->skillsRelatedByPartIdScheduledForDeletion->push($skillRelatedByPartId); } return $this; }
[ "public", "function", "removeSkillRelatedByPartId", "(", "ChildSkill", "$", "skillRelatedByPartId", ")", "{", "if", "(", "$", "this", "->", "getSkillsRelatedByPartId", "(", ")", "->", "contains", "(", "$", "skillRelatedByPartId", ")", ")", "{", "$", "skillPart", "=", "new", "ChildSkillPart", "(", ")", ";", "$", "skillPart", "->", "setSkillRelatedByPartId", "(", "$", "skillRelatedByPartId", ")", ";", "if", "(", "$", "skillRelatedByPartId", "->", "isSkillRelatedByCompositeIdsLoaded", "(", ")", ")", "{", "//remove the back reference if available", "$", "skillRelatedByPartId", "->", "getSkillRelatedByCompositeIds", "(", ")", "->", "removeObject", "(", "$", "this", ")", ";", "}", "$", "skillPart", "->", "setSkillRelatedByCompositeId", "(", "$", "this", ")", ";", "$", "this", "->", "removeComposite", "(", "clone", "$", "skillPart", ")", ";", "$", "skillPart", "->", "clear", "(", ")", ";", "$", "this", "->", "collSkillsRelatedByPartId", "->", "remove", "(", "$", "this", "->", "collSkillsRelatedByPartId", "->", "search", "(", "$", "skillRelatedByPartId", ")", ")", ";", "if", "(", "null", "===", "$", "this", "->", "skillsRelatedByPartIdScheduledForDeletion", ")", "{", "$", "this", "->", "skillsRelatedByPartIdScheduledForDeletion", "=", "clone", "$", "this", "->", "collSkillsRelatedByPartId", ";", "$", "this", "->", "skillsRelatedByPartIdScheduledForDeletion", "->", "clear", "(", ")", ";", "}", "$", "this", "->", "skillsRelatedByPartIdScheduledForDeletion", "->", "push", "(", "$", "skillRelatedByPartId", ")", ";", "}", "return", "$", "this", ";", "}" ]
Remove skillRelatedByPartId of this object through the kk_trixionary_skill_part cross reference table. @param ChildSkill $skillRelatedByPartId @return ChildSkill The current object (for fluent API support)
[ "Remove", "skillRelatedByPartId", "of", "this", "object", "through", "the", "kk_trixionary_skill_part", "cross", "reference", "table", "." ]
221a6c5322473d7d7f8e322958a3ee46d87da150
https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/Skill.php#L10269-L10295
65
gossi/trixionary
src/model/Base/Skill.php
Skill.initGroups
public function initGroups() { $this->collGroups = new ObjectCollection(); $this->collGroupsPartial = true; $this->collGroups->setModel('\gossi\trixionary\model\Group'); }
php
public function initGroups() { $this->collGroups = new ObjectCollection(); $this->collGroupsPartial = true; $this->collGroups->setModel('\gossi\trixionary\model\Group'); }
[ "public", "function", "initGroups", "(", ")", "{", "$", "this", "->", "collGroups", "=", "new", "ObjectCollection", "(", ")", ";", "$", "this", "->", "collGroupsPartial", "=", "true", ";", "$", "this", "->", "collGroups", "->", "setModel", "(", "'\\gossi\\trixionary\\model\\Group'", ")", ";", "}" ]
Initializes the collGroups crossRef collection. By default this just sets the collGroups collection to an empty collection (like clearGroups()); 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 database. @return void
[ "Initializes", "the", "collGroups", "crossRef", "collection", "." ]
221a6c5322473d7d7f8e322958a3ee46d87da150
https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/Skill.php#L10320-L10326
66
gossi/trixionary
src/model/Base/Skill.php
Skill.getGroups
public function getGroups(Criteria $criteria = null, ConnectionInterface $con = null) { $partial = $this->collGroupsPartial && !$this->isNew(); if (null === $this->collGroups || null !== $criteria || $partial) { if ($this->isNew()) { // return empty collection if (null === $this->collGroups) { $this->initGroups(); } } else { $query = ChildGroupQuery::create(null, $criteria) ->filterBySkill($this); $collGroups = $query->find($con); if (null !== $criteria) { return $collGroups; } if ($partial && $this->collGroups) { //make sure that already added objects gets added to the list of the database. foreach ($this->collGroups as $obj) { if (!$collGroups->contains($obj)) { $collGroups[] = $obj; } } } $this->collGroups = $collGroups; $this->collGroupsPartial = false; } } return $this->collGroups; }
php
public function getGroups(Criteria $criteria = null, ConnectionInterface $con = null) { $partial = $this->collGroupsPartial && !$this->isNew(); if (null === $this->collGroups || null !== $criteria || $partial) { if ($this->isNew()) { // return empty collection if (null === $this->collGroups) { $this->initGroups(); } } else { $query = ChildGroupQuery::create(null, $criteria) ->filterBySkill($this); $collGroups = $query->find($con); if (null !== $criteria) { return $collGroups; } if ($partial && $this->collGroups) { //make sure that already added objects gets added to the list of the database. foreach ($this->collGroups as $obj) { if (!$collGroups->contains($obj)) { $collGroups[] = $obj; } } } $this->collGroups = $collGroups; $this->collGroupsPartial = false; } } return $this->collGroups; }
[ "public", "function", "getGroups", "(", "Criteria", "$", "criteria", "=", "null", ",", "ConnectionInterface", "$", "con", "=", "null", ")", "{", "$", "partial", "=", "$", "this", "->", "collGroupsPartial", "&&", "!", "$", "this", "->", "isNew", "(", ")", ";", "if", "(", "null", "===", "$", "this", "->", "collGroups", "||", "null", "!==", "$", "criteria", "||", "$", "partial", ")", "{", "if", "(", "$", "this", "->", "isNew", "(", ")", ")", "{", "// return empty collection", "if", "(", "null", "===", "$", "this", "->", "collGroups", ")", "{", "$", "this", "->", "initGroups", "(", ")", ";", "}", "}", "else", "{", "$", "query", "=", "ChildGroupQuery", "::", "create", "(", "null", ",", "$", "criteria", ")", "->", "filterBySkill", "(", "$", "this", ")", ";", "$", "collGroups", "=", "$", "query", "->", "find", "(", "$", "con", ")", ";", "if", "(", "null", "!==", "$", "criteria", ")", "{", "return", "$", "collGroups", ";", "}", "if", "(", "$", "partial", "&&", "$", "this", "->", "collGroups", ")", "{", "//make sure that already added objects gets added to the list of the database.", "foreach", "(", "$", "this", "->", "collGroups", "as", "$", "obj", ")", "{", "if", "(", "!", "$", "collGroups", "->", "contains", "(", "$", "obj", ")", ")", "{", "$", "collGroups", "[", "]", "=", "$", "obj", ";", "}", "}", "}", "$", "this", "->", "collGroups", "=", "$", "collGroups", ";", "$", "this", "->", "collGroupsPartial", "=", "false", ";", "}", "}", "return", "$", "this", "->", "collGroups", ";", "}" ]
Gets a collection of ChildGroup objects related by a many-to-many relationship to the current object by way of the kk_trixionary_skill_group cross-reference table. 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 cached collection is returned. If this ChildSkill is new, it will return an empty collection or the current collection; the criteria is ignored on a new object. @param Criteria $criteria Optional query object to filter the query @param ConnectionInterface $con Optional connection object @return ObjectCollection|ChildGroup[] List of ChildGroup objects
[ "Gets", "a", "collection", "of", "ChildGroup", "objects", "related", "by", "a", "many", "-", "to", "-", "many", "relationship", "to", "the", "current", "object", "by", "way", "of", "the", "kk_trixionary_skill_group", "cross", "-", "reference", "table", "." ]
221a6c5322473d7d7f8e322958a3ee46d87da150
https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/Skill.php#L10353-L10386
67
gossi/trixionary
src/model/Base/Skill.php
Skill.countGroups
public function countGroups(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) { $partial = $this->collGroupsPartial && !$this->isNew(); if (null === $this->collGroups || null !== $criteria || $partial) { if ($this->isNew() && null === $this->collGroups) { return 0; } else { if ($partial && !$criteria) { return count($this->getGroups()); } $query = ChildGroupQuery::create(null, $criteria); if ($distinct) { $query->distinct(); } return $query ->filterBySkill($this) ->count($con); } } else { return count($this->collGroups); } }
php
public function countGroups(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) { $partial = $this->collGroupsPartial && !$this->isNew(); if (null === $this->collGroups || null !== $criteria || $partial) { if ($this->isNew() && null === $this->collGroups) { return 0; } else { if ($partial && !$criteria) { return count($this->getGroups()); } $query = ChildGroupQuery::create(null, $criteria); if ($distinct) { $query->distinct(); } return $query ->filterBySkill($this) ->count($con); } } else { return count($this->collGroups); } }
[ "public", "function", "countGroups", "(", "Criteria", "$", "criteria", "=", "null", ",", "$", "distinct", "=", "false", ",", "ConnectionInterface", "$", "con", "=", "null", ")", "{", "$", "partial", "=", "$", "this", "->", "collGroupsPartial", "&&", "!", "$", "this", "->", "isNew", "(", ")", ";", "if", "(", "null", "===", "$", "this", "->", "collGroups", "||", "null", "!==", "$", "criteria", "||", "$", "partial", ")", "{", "if", "(", "$", "this", "->", "isNew", "(", ")", "&&", "null", "===", "$", "this", "->", "collGroups", ")", "{", "return", "0", ";", "}", "else", "{", "if", "(", "$", "partial", "&&", "!", "$", "criteria", ")", "{", "return", "count", "(", "$", "this", "->", "getGroups", "(", ")", ")", ";", "}", "$", "query", "=", "ChildGroupQuery", "::", "create", "(", "null", ",", "$", "criteria", ")", ";", "if", "(", "$", "distinct", ")", "{", "$", "query", "->", "distinct", "(", ")", ";", "}", "return", "$", "query", "->", "filterBySkill", "(", "$", "this", ")", "->", "count", "(", "$", "con", ")", ";", "}", "}", "else", "{", "return", "count", "(", "$", "this", "->", "collGroups", ")", ";", "}", "}" ]
Gets the number of Group objects related by a many-to-many relationship to the current object by way of the kk_trixionary_skill_group cross-reference table. @param Criteria $criteria Optional query object to filter the query @param boolean $distinct Set to true to force count distinct @param ConnectionInterface $con Optional connection object @return int the number of related Group objects
[ "Gets", "the", "number", "of", "Group", "objects", "related", "by", "a", "many", "-", "to", "-", "many", "relationship", "to", "the", "current", "object", "by", "way", "of", "the", "kk_trixionary_skill_group", "cross", "-", "reference", "table", "." ]
221a6c5322473d7d7f8e322958a3ee46d87da150
https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/Skill.php#L10431-L10455
68
gossi/trixionary
src/model/Base/Skill.php
Skill.addGroup
public function addGroup(ChildGroup $group) { if ($this->collGroups === null) { $this->initGroups(); } if (!$this->getGroups()->contains($group)) { // only add it if the **same** object is not already associated $this->collGroups->push($group); $this->doAddGroup($group); } return $this; }
php
public function addGroup(ChildGroup $group) { if ($this->collGroups === null) { $this->initGroups(); } if (!$this->getGroups()->contains($group)) { // only add it if the **same** object is not already associated $this->collGroups->push($group); $this->doAddGroup($group); } return $this; }
[ "public", "function", "addGroup", "(", "ChildGroup", "$", "group", ")", "{", "if", "(", "$", "this", "->", "collGroups", "===", "null", ")", "{", "$", "this", "->", "initGroups", "(", ")", ";", "}", "if", "(", "!", "$", "this", "->", "getGroups", "(", ")", "->", "contains", "(", "$", "group", ")", ")", "{", "// only add it if the **same** object is not already associated", "$", "this", "->", "collGroups", "->", "push", "(", "$", "group", ")", ";", "$", "this", "->", "doAddGroup", "(", "$", "group", ")", ";", "}", "return", "$", "this", ";", "}" ]
Associate a ChildGroup to this object through the kk_trixionary_skill_group cross reference table. @param ChildGroup $group @return ChildSkill The current object (for fluent API support)
[ "Associate", "a", "ChildGroup", "to", "this", "object", "through", "the", "kk_trixionary_skill_group", "cross", "reference", "table", "." ]
221a6c5322473d7d7f8e322958a3ee46d87da150
https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/Skill.php#L10464-L10477
69
gossi/trixionary
src/model/Base/Skill.php
Skill.removeGroup
public function removeGroup(ChildGroup $group) { if ($this->getGroups()->contains($group)) { $skillGroup = new ChildSkillGroup(); $skillGroup->setGroup($group); if ($group->isSkillsLoaded()) { //remove the back reference if available $group->getSkills()->removeObject($this); } $skillGroup->setSkill($this); $this->removeSkillGroup(clone $skillGroup); $skillGroup->clear(); $this->collGroups->remove($this->collGroups->search($group)); if (null === $this->groupsScheduledForDeletion) { $this->groupsScheduledForDeletion = clone $this->collGroups; $this->groupsScheduledForDeletion->clear(); } $this->groupsScheduledForDeletion->push($group); } return $this; }
php
public function removeGroup(ChildGroup $group) { if ($this->getGroups()->contains($group)) { $skillGroup = new ChildSkillGroup(); $skillGroup->setGroup($group); if ($group->isSkillsLoaded()) { //remove the back reference if available $group->getSkills()->removeObject($this); } $skillGroup->setSkill($this); $this->removeSkillGroup(clone $skillGroup); $skillGroup->clear(); $this->collGroups->remove($this->collGroups->search($group)); if (null === $this->groupsScheduledForDeletion) { $this->groupsScheduledForDeletion = clone $this->collGroups; $this->groupsScheduledForDeletion->clear(); } $this->groupsScheduledForDeletion->push($group); } return $this; }
[ "public", "function", "removeGroup", "(", "ChildGroup", "$", "group", ")", "{", "if", "(", "$", "this", "->", "getGroups", "(", ")", "->", "contains", "(", "$", "group", ")", ")", "{", "$", "skillGroup", "=", "new", "ChildSkillGroup", "(", ")", ";", "$", "skillGroup", "->", "setGroup", "(", "$", "group", ")", ";", "if", "(", "$", "group", "->", "isSkillsLoaded", "(", ")", ")", "{", "//remove the back reference if available", "$", "group", "->", "getSkills", "(", ")", "->", "removeObject", "(", "$", "this", ")", ";", "}", "$", "skillGroup", "->", "setSkill", "(", "$", "this", ")", ";", "$", "this", "->", "removeSkillGroup", "(", "clone", "$", "skillGroup", ")", ";", "$", "skillGroup", "->", "clear", "(", ")", ";", "$", "this", "->", "collGroups", "->", "remove", "(", "$", "this", "->", "collGroups", "->", "search", "(", "$", "group", ")", ")", ";", "if", "(", "null", "===", "$", "this", "->", "groupsScheduledForDeletion", ")", "{", "$", "this", "->", "groupsScheduledForDeletion", "=", "clone", "$", "this", "->", "collGroups", ";", "$", "this", "->", "groupsScheduledForDeletion", "->", "clear", "(", ")", ";", "}", "$", "this", "->", "groupsScheduledForDeletion", "->", "push", "(", "$", "group", ")", ";", "}", "return", "$", "this", ";", "}" ]
Remove group of this object through the kk_trixionary_skill_group cross reference table. @param ChildGroup $group @return ChildSkill The current object (for fluent API support)
[ "Remove", "group", "of", "this", "object", "through", "the", "kk_trixionary_skill_group", "cross", "reference", "table", "." ]
221a6c5322473d7d7f8e322958a3ee46d87da150
https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/Skill.php#L10511-L10537
70
gossi/trixionary
src/model/Base/Skill.php
Skill.initReferences
public function initReferences() { $this->collReferences = new ObjectCollection(); $this->collReferencesPartial = true; $this->collReferences->setModel('\gossi\trixionary\model\Reference'); }
php
public function initReferences() { $this->collReferences = new ObjectCollection(); $this->collReferencesPartial = true; $this->collReferences->setModel('\gossi\trixionary\model\Reference'); }
[ "public", "function", "initReferences", "(", ")", "{", "$", "this", "->", "collReferences", "=", "new", "ObjectCollection", "(", ")", ";", "$", "this", "->", "collReferencesPartial", "=", "true", ";", "$", "this", "->", "collReferences", "->", "setModel", "(", "'\\gossi\\trixionary\\model\\Reference'", ")", ";", "}" ]
Initializes the collReferences crossRef collection. By default this just sets the collReferences collection to an empty collection (like clearReferences()); 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 database. @return void
[ "Initializes", "the", "collReferences", "crossRef", "collection", "." ]
221a6c5322473d7d7f8e322958a3ee46d87da150
https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/Skill.php#L10562-L10568
71
gossi/trixionary
src/model/Base/Skill.php
Skill.getReferences
public function getReferences(Criteria $criteria = null, ConnectionInterface $con = null) { $partial = $this->collReferencesPartial && !$this->isNew(); if (null === $this->collReferences || null !== $criteria || $partial) { if ($this->isNew()) { // return empty collection if (null === $this->collReferences) { $this->initReferences(); } } else { $query = ChildReferenceQuery::create(null, $criteria) ->filterBySkill($this); $collReferences = $query->find($con); if (null !== $criteria) { return $collReferences; } if ($partial && $this->collReferences) { //make sure that already added objects gets added to the list of the database. foreach ($this->collReferences as $obj) { if (!$collReferences->contains($obj)) { $collReferences[] = $obj; } } } $this->collReferences = $collReferences; $this->collReferencesPartial = false; } } return $this->collReferences; }
php
public function getReferences(Criteria $criteria = null, ConnectionInterface $con = null) { $partial = $this->collReferencesPartial && !$this->isNew(); if (null === $this->collReferences || null !== $criteria || $partial) { if ($this->isNew()) { // return empty collection if (null === $this->collReferences) { $this->initReferences(); } } else { $query = ChildReferenceQuery::create(null, $criteria) ->filterBySkill($this); $collReferences = $query->find($con); if (null !== $criteria) { return $collReferences; } if ($partial && $this->collReferences) { //make sure that already added objects gets added to the list of the database. foreach ($this->collReferences as $obj) { if (!$collReferences->contains($obj)) { $collReferences[] = $obj; } } } $this->collReferences = $collReferences; $this->collReferencesPartial = false; } } return $this->collReferences; }
[ "public", "function", "getReferences", "(", "Criteria", "$", "criteria", "=", "null", ",", "ConnectionInterface", "$", "con", "=", "null", ")", "{", "$", "partial", "=", "$", "this", "->", "collReferencesPartial", "&&", "!", "$", "this", "->", "isNew", "(", ")", ";", "if", "(", "null", "===", "$", "this", "->", "collReferences", "||", "null", "!==", "$", "criteria", "||", "$", "partial", ")", "{", "if", "(", "$", "this", "->", "isNew", "(", ")", ")", "{", "// return empty collection", "if", "(", "null", "===", "$", "this", "->", "collReferences", ")", "{", "$", "this", "->", "initReferences", "(", ")", ";", "}", "}", "else", "{", "$", "query", "=", "ChildReferenceQuery", "::", "create", "(", "null", ",", "$", "criteria", ")", "->", "filterBySkill", "(", "$", "this", ")", ";", "$", "collReferences", "=", "$", "query", "->", "find", "(", "$", "con", ")", ";", "if", "(", "null", "!==", "$", "criteria", ")", "{", "return", "$", "collReferences", ";", "}", "if", "(", "$", "partial", "&&", "$", "this", "->", "collReferences", ")", "{", "//make sure that already added objects gets added to the list of the database.", "foreach", "(", "$", "this", "->", "collReferences", "as", "$", "obj", ")", "{", "if", "(", "!", "$", "collReferences", "->", "contains", "(", "$", "obj", ")", ")", "{", "$", "collReferences", "[", "]", "=", "$", "obj", ";", "}", "}", "}", "$", "this", "->", "collReferences", "=", "$", "collReferences", ";", "$", "this", "->", "collReferencesPartial", "=", "false", ";", "}", "}", "return", "$", "this", "->", "collReferences", ";", "}" ]
Gets a collection of ChildReference objects related by a many-to-many relationship to the current object by way of the kk_trixionary_skill_reference cross-reference table. 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 cached collection is returned. If this ChildSkill is new, it will return an empty collection or the current collection; the criteria is ignored on a new object. @param Criteria $criteria Optional query object to filter the query @param ConnectionInterface $con Optional connection object @return ObjectCollection|ChildReference[] List of ChildReference objects
[ "Gets", "a", "collection", "of", "ChildReference", "objects", "related", "by", "a", "many", "-", "to", "-", "many", "relationship", "to", "the", "current", "object", "by", "way", "of", "the", "kk_trixionary_skill_reference", "cross", "-", "reference", "table", "." ]
221a6c5322473d7d7f8e322958a3ee46d87da150
https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/Skill.php#L10595-L10628
72
gossi/trixionary
src/model/Base/Skill.php
Skill.countReferences
public function countReferences(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) { $partial = $this->collReferencesPartial && !$this->isNew(); if (null === $this->collReferences || null !== $criteria || $partial) { if ($this->isNew() && null === $this->collReferences) { return 0; } else { if ($partial && !$criteria) { return count($this->getReferences()); } $query = ChildReferenceQuery::create(null, $criteria); if ($distinct) { $query->distinct(); } return $query ->filterBySkill($this) ->count($con); } } else { return count($this->collReferences); } }
php
public function countReferences(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) { $partial = $this->collReferencesPartial && !$this->isNew(); if (null === $this->collReferences || null !== $criteria || $partial) { if ($this->isNew() && null === $this->collReferences) { return 0; } else { if ($partial && !$criteria) { return count($this->getReferences()); } $query = ChildReferenceQuery::create(null, $criteria); if ($distinct) { $query->distinct(); } return $query ->filterBySkill($this) ->count($con); } } else { return count($this->collReferences); } }
[ "public", "function", "countReferences", "(", "Criteria", "$", "criteria", "=", "null", ",", "$", "distinct", "=", "false", ",", "ConnectionInterface", "$", "con", "=", "null", ")", "{", "$", "partial", "=", "$", "this", "->", "collReferencesPartial", "&&", "!", "$", "this", "->", "isNew", "(", ")", ";", "if", "(", "null", "===", "$", "this", "->", "collReferences", "||", "null", "!==", "$", "criteria", "||", "$", "partial", ")", "{", "if", "(", "$", "this", "->", "isNew", "(", ")", "&&", "null", "===", "$", "this", "->", "collReferences", ")", "{", "return", "0", ";", "}", "else", "{", "if", "(", "$", "partial", "&&", "!", "$", "criteria", ")", "{", "return", "count", "(", "$", "this", "->", "getReferences", "(", ")", ")", ";", "}", "$", "query", "=", "ChildReferenceQuery", "::", "create", "(", "null", ",", "$", "criteria", ")", ";", "if", "(", "$", "distinct", ")", "{", "$", "query", "->", "distinct", "(", ")", ";", "}", "return", "$", "query", "->", "filterBySkill", "(", "$", "this", ")", "->", "count", "(", "$", "con", ")", ";", "}", "}", "else", "{", "return", "count", "(", "$", "this", "->", "collReferences", ")", ";", "}", "}" ]
Gets the number of Reference objects related by a many-to-many relationship to the current object by way of the kk_trixionary_skill_reference cross-reference table. @param Criteria $criteria Optional query object to filter the query @param boolean $distinct Set to true to force count distinct @param ConnectionInterface $con Optional connection object @return int the number of related Reference objects
[ "Gets", "the", "number", "of", "Reference", "objects", "related", "by", "a", "many", "-", "to", "-", "many", "relationship", "to", "the", "current", "object", "by", "way", "of", "the", "kk_trixionary_skill_reference", "cross", "-", "reference", "table", "." ]
221a6c5322473d7d7f8e322958a3ee46d87da150
https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/Skill.php#L10673-L10697
73
gossi/trixionary
src/model/Base/Skill.php
Skill.addReference
public function addReference(ChildReference $reference) { if ($this->collReferences === null) { $this->initReferences(); } if (!$this->getReferences()->contains($reference)) { // only add it if the **same** object is not already associated $this->collReferences->push($reference); $this->doAddReference($reference); } return $this; }
php
public function addReference(ChildReference $reference) { if ($this->collReferences === null) { $this->initReferences(); } if (!$this->getReferences()->contains($reference)) { // only add it if the **same** object is not already associated $this->collReferences->push($reference); $this->doAddReference($reference); } return $this; }
[ "public", "function", "addReference", "(", "ChildReference", "$", "reference", ")", "{", "if", "(", "$", "this", "->", "collReferences", "===", "null", ")", "{", "$", "this", "->", "initReferences", "(", ")", ";", "}", "if", "(", "!", "$", "this", "->", "getReferences", "(", ")", "->", "contains", "(", "$", "reference", ")", ")", "{", "// only add it if the **same** object is not already associated", "$", "this", "->", "collReferences", "->", "push", "(", "$", "reference", ")", ";", "$", "this", "->", "doAddReference", "(", "$", "reference", ")", ";", "}", "return", "$", "this", ";", "}" ]
Associate a ChildReference to this object through the kk_trixionary_skill_reference cross reference table. @param ChildReference $reference @return ChildSkill The current object (for fluent API support)
[ "Associate", "a", "ChildReference", "to", "this", "object", "through", "the", "kk_trixionary_skill_reference", "cross", "reference", "table", "." ]
221a6c5322473d7d7f8e322958a3ee46d87da150
https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/Skill.php#L10706-L10719
74
gossi/trixionary
src/model/Base/Skill.php
Skill.removeReference
public function removeReference(ChildReference $reference) { if ($this->getReferences()->contains($reference)) { $skillReference = new ChildSkillReference(); $skillReference->setReference($reference); if ($reference->isSkillsLoaded()) { //remove the back reference if available $reference->getSkills()->removeObject($this); } $skillReference->setSkill($this); $this->removeSkillReference(clone $skillReference); $skillReference->clear(); $this->collReferences->remove($this->collReferences->search($reference)); if (null === $this->referencesScheduledForDeletion) { $this->referencesScheduledForDeletion = clone $this->collReferences; $this->referencesScheduledForDeletion->clear(); } $this->referencesScheduledForDeletion->push($reference); } return $this; }
php
public function removeReference(ChildReference $reference) { if ($this->getReferences()->contains($reference)) { $skillReference = new ChildSkillReference(); $skillReference->setReference($reference); if ($reference->isSkillsLoaded()) { //remove the back reference if available $reference->getSkills()->removeObject($this); } $skillReference->setSkill($this); $this->removeSkillReference(clone $skillReference); $skillReference->clear(); $this->collReferences->remove($this->collReferences->search($reference)); if (null === $this->referencesScheduledForDeletion) { $this->referencesScheduledForDeletion = clone $this->collReferences; $this->referencesScheduledForDeletion->clear(); } $this->referencesScheduledForDeletion->push($reference); } return $this; }
[ "public", "function", "removeReference", "(", "ChildReference", "$", "reference", ")", "{", "if", "(", "$", "this", "->", "getReferences", "(", ")", "->", "contains", "(", "$", "reference", ")", ")", "{", "$", "skillReference", "=", "new", "ChildSkillReference", "(", ")", ";", "$", "skillReference", "->", "setReference", "(", "$", "reference", ")", ";", "if", "(", "$", "reference", "->", "isSkillsLoaded", "(", ")", ")", "{", "//remove the back reference if available", "$", "reference", "->", "getSkills", "(", ")", "->", "removeObject", "(", "$", "this", ")", ";", "}", "$", "skillReference", "->", "setSkill", "(", "$", "this", ")", ";", "$", "this", "->", "removeSkillReference", "(", "clone", "$", "skillReference", ")", ";", "$", "skillReference", "->", "clear", "(", ")", ";", "$", "this", "->", "collReferences", "->", "remove", "(", "$", "this", "->", "collReferences", "->", "search", "(", "$", "reference", ")", ")", ";", "if", "(", "null", "===", "$", "this", "->", "referencesScheduledForDeletion", ")", "{", "$", "this", "->", "referencesScheduledForDeletion", "=", "clone", "$", "this", "->", "collReferences", ";", "$", "this", "->", "referencesScheduledForDeletion", "->", "clear", "(", ")", ";", "}", "$", "this", "->", "referencesScheduledForDeletion", "->", "push", "(", "$", "reference", ")", ";", "}", "return", "$", "this", ";", "}" ]
Remove reference of this object through the kk_trixionary_skill_reference cross reference table. @param ChildReference $reference @return ChildSkill The current object (for fluent API support)
[ "Remove", "reference", "of", "this", "object", "through", "the", "kk_trixionary_skill_reference", "cross", "reference", "table", "." ]
221a6c5322473d7d7f8e322958a3ee46d87da150
https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/Skill.php#L10753-L10779
75
gossi/trixionary
src/model/Base/Skill.php
Skill.updateRelatedObjectSkillCount
protected function updateRelatedObjectSkillCount(ConnectionInterface $con) { if ($object = $this->getObject()) { $object->updateSkillCount($con); } if ($this->oldObjectSkillCount) { $this->oldObjectSkillCount->updateSkillCount($con); $this->oldObjectSkillCount = null; } }
php
protected function updateRelatedObjectSkillCount(ConnectionInterface $con) { if ($object = $this->getObject()) { $object->updateSkillCount($con); } if ($this->oldObjectSkillCount) { $this->oldObjectSkillCount->updateSkillCount($con); $this->oldObjectSkillCount = null; } }
[ "protected", "function", "updateRelatedObjectSkillCount", "(", "ConnectionInterface", "$", "con", ")", "{", "if", "(", "$", "object", "=", "$", "this", "->", "getObject", "(", ")", ")", "{", "$", "object", "->", "updateSkillCount", "(", "$", "con", ")", ";", "}", "if", "(", "$", "this", "->", "oldObjectSkillCount", ")", "{", "$", "this", "->", "oldObjectSkillCount", "->", "updateSkillCount", "(", "$", "con", ")", ";", "$", "this", "->", "oldObjectSkillCount", "=", "null", ";", "}", "}" ]
Update the aggregate column in the related Object object @param ConnectionInterface $con A connection object
[ "Update", "the", "aggregate", "column", "in", "the", "related", "Object", "object" ]
221a6c5322473d7d7f8e322958a3ee46d87da150
https://github.com/gossi/trixionary/blob/221a6c5322473d7d7f8e322958a3ee46d87da150/src/model/Base/Skill.php#L11488-L11497
76
rodchyn/elephant-lang
lib/ParserGenerator/PHP/ParserGenerator/PropagationLink.php
PHP_ParserGenerator_PropagationLink.Plink_add
static function Plink_add(&$plpp, PHP_ParserGenerator_Config $cfp) { $new = new PHP_ParserGenerator_PropagationLink; $new->next = $plpp; $plpp = $new; $new->cfp = $cfp; }
php
static function Plink_add(&$plpp, PHP_ParserGenerator_Config $cfp) { $new = new PHP_ParserGenerator_PropagationLink; $new->next = $plpp; $plpp = $new; $new->cfp = $cfp; }
[ "static", "function", "Plink_add", "(", "&", "$", "plpp", ",", "PHP_ParserGenerator_Config", "$", "cfp", ")", "{", "$", "new", "=", "new", "PHP_ParserGenerator_PropagationLink", ";", "$", "new", "->", "next", "=", "$", "plpp", ";", "$", "plpp", "=", "$", "new", ";", "$", "new", "->", "cfp", "=", "$", "cfp", ";", "}" ]
Add a propagation link to the current list This prepends the configuration passed in to the first parameter which is either 0 or a PHP_ParserGenerator_PropagationLink defining an existing list. @param PHP_ParserGenerator_PropagationLink|null @param PHP_ParserGenerator_Config
[ "Add", "a", "propagation", "link", "to", "the", "current", "list" ]
e0acc26eec1ab4dbfcc90ad79efc23318eaba5cf
https://github.com/rodchyn/elephant-lang/blob/e0acc26eec1ab4dbfcc90ad79efc23318eaba5cf/lib/ParserGenerator/PHP/ParserGenerator/PropagationLink.php#L89-L95
77
rodchyn/elephant-lang
lib/ParserGenerator/PHP/ParserGenerator/PropagationLink.php
PHP_ParserGenerator_PropagationLink.Plink_copy
static function Plink_copy(PHP_ParserGenerator_PropagationLink &$to, PHP_ParserGenerator_PropagationLink $from) { while ($from) { $nextpl = $from->next; $from->next = $to; $to = $from; $from = $nextpl; } }
php
static function Plink_copy(PHP_ParserGenerator_PropagationLink &$to, PHP_ParserGenerator_PropagationLink $from) { while ($from) { $nextpl = $from->next; $from->next = $to; $to = $from; $from = $nextpl; } }
[ "static", "function", "Plink_copy", "(", "PHP_ParserGenerator_PropagationLink", "&", "$", "to", ",", "PHP_ParserGenerator_PropagationLink", "$", "from", ")", "{", "while", "(", "$", "from", ")", "{", "$", "nextpl", "=", "$", "from", "->", "next", ";", "$", "from", "->", "next", "=", "$", "to", ";", "$", "to", "=", "$", "from", ";", "$", "from", "=", "$", "nextpl", ";", "}", "}" ]
Transfer every propagation link on the list "from" to the list "to"
[ "Transfer", "every", "propagation", "link", "on", "the", "list", "from", "to", "the", "list", "to" ]
e0acc26eec1ab4dbfcc90ad79efc23318eaba5cf
https://github.com/rodchyn/elephant-lang/blob/e0acc26eec1ab4dbfcc90ad79efc23318eaba5cf/lib/ParserGenerator/PHP/ParserGenerator/PropagationLink.php#L100-L108
78
rodchyn/elephant-lang
lib/ParserGenerator/PHP/ParserGenerator/PropagationLink.php
PHP_ParserGenerator_PropagationLink.Plink_delete
static function Plink_delete($plp) { while ($plp) { $nextpl = $plp->next; $plp->next = 0; $plp = $nextpl; } }
php
static function Plink_delete($plp) { while ($plp) { $nextpl = $plp->next; $plp->next = 0; $plp = $nextpl; } }
[ "static", "function", "Plink_delete", "(", "$", "plp", ")", "{", "while", "(", "$", "plp", ")", "{", "$", "nextpl", "=", "$", "plp", "->", "next", ";", "$", "plp", "->", "next", "=", "0", ";", "$", "plp", "=", "$", "nextpl", ";", "}", "}" ]
Delete every propagation link on the list @param PHP_ParserGenerator_PropagationLink|0 @return void
[ "Delete", "every", "propagation", "link", "on", "the", "list" ]
e0acc26eec1ab4dbfcc90ad79efc23318eaba5cf
https://github.com/rodchyn/elephant-lang/blob/e0acc26eec1ab4dbfcc90ad79efc23318eaba5cf/lib/ParserGenerator/PHP/ParserGenerator/PropagationLink.php#L117-L124
79
edunola13/core-modules
src/Cache/Cache.php
Cache.setCacheStore
public function setCacheStore($store = "Default"){ if($store == "Default"){ $store= self::$config['defaultStore']; } if($store == 'none'){ $this->store= new CacheNone(); }else{ $config= self::$config['stores'][$store]; switch ($config['driver']) { case 'file': $this->store= new CacheFileSystem($config['folder']); break; case 'database': $this->store= new CacheDataBase($config['connection'], $config['table']); break; case 'apc': $this->store= new CacheApc(); break; case 'memcached': $persistenceId= isset($config['persistenceId']) ? $config['persistenceId'] : NULL; $this->store= new CacheMemCached($config["servers"], $persistenceId); break; case 'redis': $this->store= new CacheRedis($config['schema'], $config['host'], $config['port']); break; default: \Enola\Error::general_error("Cache Configuration", "Driver specified unsupported"); break; } } }
php
public function setCacheStore($store = "Default"){ if($store == "Default"){ $store= self::$config['defaultStore']; } if($store == 'none'){ $this->store= new CacheNone(); }else{ $config= self::$config['stores'][$store]; switch ($config['driver']) { case 'file': $this->store= new CacheFileSystem($config['folder']); break; case 'database': $this->store= new CacheDataBase($config['connection'], $config['table']); break; case 'apc': $this->store= new CacheApc(); break; case 'memcached': $persistenceId= isset($config['persistenceId']) ? $config['persistenceId'] : NULL; $this->store= new CacheMemCached($config["servers"], $persistenceId); break; case 'redis': $this->store= new CacheRedis($config['schema'], $config['host'], $config['port']); break; default: \Enola\Error::general_error("Cache Configuration", "Driver specified unsupported"); break; } } }
[ "public", "function", "setCacheStore", "(", "$", "store", "=", "\"Default\"", ")", "{", "if", "(", "$", "store", "==", "\"Default\"", ")", "{", "$", "store", "=", "self", "::", "$", "config", "[", "'defaultStore'", "]", ";", "}", "if", "(", "$", "store", "==", "'none'", ")", "{", "$", "this", "->", "store", "=", "new", "CacheNone", "(", ")", ";", "}", "else", "{", "$", "config", "=", "self", "::", "$", "config", "[", "'stores'", "]", "[", "$", "store", "]", ";", "switch", "(", "$", "config", "[", "'driver'", "]", ")", "{", "case", "'file'", ":", "$", "this", "->", "store", "=", "new", "CacheFileSystem", "(", "$", "config", "[", "'folder'", "]", ")", ";", "break", ";", "case", "'database'", ":", "$", "this", "->", "store", "=", "new", "CacheDataBase", "(", "$", "config", "[", "'connection'", "]", ",", "$", "config", "[", "'table'", "]", ")", ";", "break", ";", "case", "'apc'", ":", "$", "this", "->", "store", "=", "new", "CacheApc", "(", ")", ";", "break", ";", "case", "'memcached'", ":", "$", "persistenceId", "=", "isset", "(", "$", "config", "[", "'persistenceId'", "]", ")", "?", "$", "config", "[", "'persistenceId'", "]", ":", "NULL", ";", "$", "this", "->", "store", "=", "new", "CacheMemCached", "(", "$", "config", "[", "\"servers\"", "]", ",", "$", "persistenceId", ")", ";", "break", ";", "case", "'redis'", ":", "$", "this", "->", "store", "=", "new", "CacheRedis", "(", "$", "config", "[", "'schema'", "]", ",", "$", "config", "[", "'host'", "]", ",", "$", "config", "[", "'port'", "]", ")", ";", "break", ";", "default", ":", "\\", "Enola", "\\", "Error", "::", "general_error", "(", "\"Cache Configuration\"", ",", "\"Driver specified unsupported\"", ")", ";", "break", ";", "}", "}", "}" ]
Setea el driver indicado @param string $store
[ "Setea", "el", "driver", "indicado" ]
2a2e9b89bb61cc28e548412e1d6c9bbb44bc5364
https://github.com/edunola13/core-modules/blob/2a2e9b89bb61cc28e548412e1d6c9bbb44bc5364/src/Cache/Cache.php#L39-L69
80
dcarrith/lxmpd
src/Dcarrith/LxMPD/LxMPD.php
LxMPD.start
public function start( $binary = null, $conf = null ) { Log::info( 'LxMPD->start', array($binary, $conf)); // Try to spawn a new instance of mpd $result = exec($binary.' '.$conf.' 2>&1', $output, $code); Log::info( 'LxMPD->start - result', array($result)); Log::info( 'LxMPD->start - output', array($output)); Log::info( 'LxMPD->start - code', array($code)); return $result; }
php
public function start( $binary = null, $conf = null ) { Log::info( 'LxMPD->start', array($binary, $conf)); // Try to spawn a new instance of mpd $result = exec($binary.' '.$conf.' 2>&1', $output, $code); Log::info( 'LxMPD->start - result', array($result)); Log::info( 'LxMPD->start - output', array($output)); Log::info( 'LxMPD->start - code', array($code)); return $result; }
[ "public", "function", "start", "(", "$", "binary", "=", "null", ",", "$", "conf", "=", "null", ")", "{", "Log", "::", "info", "(", "'LxMPD->start'", ",", "array", "(", "$", "binary", ",", "$", "conf", ")", ")", ";", "// Try to spawn a new instance of mpd", "$", "result", "=", "exec", "(", "$", "binary", ".", "' '", ".", "$", "conf", ".", "' 2>&1'", ",", "$", "output", ",", "$", "code", ")", ";", "Log", "::", "info", "(", "'LxMPD->start - result'", ",", "array", "(", "$", "result", ")", ")", ";", "Log", "::", "info", "(", "'LxMPD->start - output'", ",", "array", "(", "$", "output", ")", ")", ";", "Log", "::", "info", "(", "'LxMPD->start - code'", ",", "array", "(", "$", "code", ")", ")", ";", "return", "$", "result", ";", "}" ]
Start up MPD. @param $binary The path to the MPD binary @param $conf The path to the user's MPD conf file @return result
[ "Start", "up", "MPD", "." ]
337708f6fec08c2ca9dfeb6ca88c47f5479be860
https://github.com/dcarrith/lxmpd/blob/337708f6fec08c2ca9dfeb6ca88c47f5479be860/src/Dcarrith/LxMPD/LxMPD.php#L112-L124
81
dcarrith/lxmpd
src/Dcarrith/LxMPD/LxMPD.php
LxMPD.authenticate
public function authenticate() { // Check whether the socket is already connected if( !$this->connection->established ) { // Throw an MPDException along with the connection errors throw new MPDException( 'The connection to MPD has not been established', self::MPD_CONNECTION_NOT_ESTABLISHED ); } // Send the connection password if( $this->connection->hasPassword() ) { // Authenticate to MPD if( !$this->password( $this->connection->password )) { // We might as well not be connected $this->connection->close(); // If the password fails, then we're not going to be able to do much throw new MPDException( 'MPD did not like the provided password', self::MPD_BAD_PASSWORD ); } } else { // We might as well not be connected $this->connection->close(); // If we don't have a password, then we're not going to be able to do much throw new MPDException( 'Must supply a password to authenticate to MPD', self::MPD_NO_PASSWORD ); } // Password must have been accepted return true; }
php
public function authenticate() { // Check whether the socket is already connected if( !$this->connection->established ) { // Throw an MPDException along with the connection errors throw new MPDException( 'The connection to MPD has not been established', self::MPD_CONNECTION_NOT_ESTABLISHED ); } // Send the connection password if( $this->connection->hasPassword() ) { // Authenticate to MPD if( !$this->password( $this->connection->password )) { // We might as well not be connected $this->connection->close(); // If the password fails, then we're not going to be able to do much throw new MPDException( 'MPD did not like the provided password', self::MPD_BAD_PASSWORD ); } } else { // We might as well not be connected $this->connection->close(); // If we don't have a password, then we're not going to be able to do much throw new MPDException( 'Must supply a password to authenticate to MPD', self::MPD_NO_PASSWORD ); } // Password must have been accepted return true; }
[ "public", "function", "authenticate", "(", ")", "{", "// Check whether the socket is already connected", "if", "(", "!", "$", "this", "->", "connection", "->", "established", ")", "{", "// Throw an MPDException along with the connection errors", "throw", "new", "MPDException", "(", "'The connection to MPD has not been established'", ",", "self", "::", "MPD_CONNECTION_NOT_ESTABLISHED", ")", ";", "}", "// Send the connection password", "if", "(", "$", "this", "->", "connection", "->", "hasPassword", "(", ")", ")", "{", "// Authenticate to MPD", "if", "(", "!", "$", "this", "->", "password", "(", "$", "this", "->", "connection", "->", "password", ")", ")", "{", "// We might as well not be connected", "$", "this", "->", "connection", "->", "close", "(", ")", ";", "// If the password fails, then we're not going to be able to do much", "throw", "new", "MPDException", "(", "'MPD did not like the provided password'", ",", "self", "::", "MPD_BAD_PASSWORD", ")", ";", "}", "}", "else", "{", "// We might as well not be connected", "$", "this", "->", "connection", "->", "close", "(", ")", ";", "// If we don't have a password, then we're not going to be able to do much", "throw", "new", "MPDException", "(", "'Must supply a password to authenticate to MPD'", ",", "self", "::", "MPD_NO_PASSWORD", ")", ";", "}", "// Password must have been accepted", "return", "true", ";", "}" ]
Authenticate to the MPD server @return bool
[ "Authenticate", "to", "the", "MPD", "server" ]
337708f6fec08c2ca9dfeb6ca88c47f5479be860
https://github.com/dcarrith/lxmpd/blob/337708f6fec08c2ca9dfeb6ca88c47f5479be860/src/Dcarrith/LxMPD/LxMPD.php#L130-L163
82
dcarrith/lxmpd
src/Dcarrith/LxMPD/LxMPD.php
LxMPD.write
private function write( $data ) { if( !$this->connection->established ) { Log::info('LxMPD connection is NOT established', array($data)); $this->connection->establish(); } if( !fputs( $this->connection->socket, "$data\n" ) ) { Log::info('LxMPD write fputs seems to have failed writing to socket', array($data)); throw new MPDException( 'Failed to write to MPD socket', self::MPD_WRITE_FAILED ); } return true; }
php
private function write( $data ) { if( !$this->connection->established ) { Log::info('LxMPD connection is NOT established', array($data)); $this->connection->establish(); } if( !fputs( $this->connection->socket, "$data\n" ) ) { Log::info('LxMPD write fputs seems to have failed writing to socket', array($data)); throw new MPDException( 'Failed to write to MPD socket', self::MPD_WRITE_FAILED ); } return true; }
[ "private", "function", "write", "(", "$", "data", ")", "{", "if", "(", "!", "$", "this", "->", "connection", "->", "established", ")", "{", "Log", "::", "info", "(", "'LxMPD connection is NOT established'", ",", "array", "(", "$", "data", ")", ")", ";", "$", "this", "->", "connection", "->", "establish", "(", ")", ";", "}", "if", "(", "!", "fputs", "(", "$", "this", "->", "connection", "->", "socket", ",", "\"$data\\n\"", ")", ")", "{", "Log", "::", "info", "(", "'LxMPD write fputs seems to have failed writing to socket'", ",", "array", "(", "$", "data", ")", ")", ";", "throw", "new", "MPDException", "(", "'Failed to write to MPD socket'", ",", "self", "::", "MPD_WRITE_FAILED", ")", ";", "}", "return", "true", ";", "}" ]
Writes data to the MPD socket @param string $data The data to be written @return bool
[ "Writes", "data", "to", "the", "MPD", "socket" ]
337708f6fec08c2ca9dfeb6ca88c47f5479be860
https://github.com/dcarrith/lxmpd/blob/337708f6fec08c2ca9dfeb6ca88c47f5479be860/src/Dcarrith/LxMPD/LxMPD.php#L170-L187
83
dcarrith/lxmpd
src/Dcarrith/LxMPD/LxMPD.php
LxMPD.read
private function read() { // Check for a connection if( !$this->connection->established ) { $this->connection->establish(); } // Set up the array to use for storing the read in MPD response $response = array(); // This will be used in case there is an empty array as the response $ok = false; // Get the stream meta-data $info = stream_get_meta_data( $this->connection->socket ); //Log::info('LxMPD->read : stream_get_meta_data for this->connection->socket', array($info)); // Wait for output to finish or time out while( !feof( $this->connection->socket ) && !$info['timed_out'] ) { try { $line = trim( fgets( $this->connection->socket )); //Log::info('LxMPD->read : line', array($line)); $info = stream_get_meta_data( $this->connection->socket ); //Log::info('LxMPD->read : stream_get_meta_data for this->connection->socket', array($info)); // We get empty lines sometimes. Ignore them. if( empty( $line ) ) { continue; } else if( strcmp( self::MPD_OK, $line ) == 0 ) { $ok = true; break; } else if( strncmp( self::MPD_ERROR, $line, strlen( self::MPD_ERROR ) ) == 0 && preg_match( '/^ACK \[(.*?)\@(.*?)\] \{(.*?)\} (.*?)$/', $line, $matches ) ) { // First item in matches will be the errorConstant // Second item in matches will be the index of the failed command // Third item in matches will be the original command that was run // Fourth item in matches will be the error message list( $constant, $index, $command, $error ) = $matches; Log::info('LxMPD write constant', array($constant)); //Log::info('LxMPD write index', array($index)); //Log::info('LxMPD write command', array($command)); //Log::info('LxMPD write error', array($error)); throw new MPDException( 'Command failed: '.$error, self::MPD_COMMAND_FAILED ); } else { $response[] = $line; } } catch (Exception $e) { Log::info('LxMPD->read : Exception occurred', $e); } } if( $info['timed_out'] ) { $this->connection->close(); throw new MPDException( 'Command timed out', self::MPD_TIMEOUT ); } else { if( !count($response) ) { $response = $ok; } return $response; } }
php
private function read() { // Check for a connection if( !$this->connection->established ) { $this->connection->establish(); } // Set up the array to use for storing the read in MPD response $response = array(); // This will be used in case there is an empty array as the response $ok = false; // Get the stream meta-data $info = stream_get_meta_data( $this->connection->socket ); //Log::info('LxMPD->read : stream_get_meta_data for this->connection->socket', array($info)); // Wait for output to finish or time out while( !feof( $this->connection->socket ) && !$info['timed_out'] ) { try { $line = trim( fgets( $this->connection->socket )); //Log::info('LxMPD->read : line', array($line)); $info = stream_get_meta_data( $this->connection->socket ); //Log::info('LxMPD->read : stream_get_meta_data for this->connection->socket', array($info)); // We get empty lines sometimes. Ignore them. if( empty( $line ) ) { continue; } else if( strcmp( self::MPD_OK, $line ) == 0 ) { $ok = true; break; } else if( strncmp( self::MPD_ERROR, $line, strlen( self::MPD_ERROR ) ) == 0 && preg_match( '/^ACK \[(.*?)\@(.*?)\] \{(.*?)\} (.*?)$/', $line, $matches ) ) { // First item in matches will be the errorConstant // Second item in matches will be the index of the failed command // Third item in matches will be the original command that was run // Fourth item in matches will be the error message list( $constant, $index, $command, $error ) = $matches; Log::info('LxMPD write constant', array($constant)); //Log::info('LxMPD write index', array($index)); //Log::info('LxMPD write command', array($command)); //Log::info('LxMPD write error', array($error)); throw new MPDException( 'Command failed: '.$error, self::MPD_COMMAND_FAILED ); } else { $response[] = $line; } } catch (Exception $e) { Log::info('LxMPD->read : Exception occurred', $e); } } if( $info['timed_out'] ) { $this->connection->close(); throw new MPDException( 'Command timed out', self::MPD_TIMEOUT ); } else { if( !count($response) ) { $response = $ok; } return $response; } }
[ "private", "function", "read", "(", ")", "{", "// Check for a connection", "if", "(", "!", "$", "this", "->", "connection", "->", "established", ")", "{", "$", "this", "->", "connection", "->", "establish", "(", ")", ";", "}", "// Set up the array to use for storing the read in MPD response", "$", "response", "=", "array", "(", ")", ";", "// This will be used in case there is an empty array as the response", "$", "ok", "=", "false", ";", "// Get the stream meta-data", "$", "info", "=", "stream_get_meta_data", "(", "$", "this", "->", "connection", "->", "socket", ")", ";", "//Log::info('LxMPD->read : stream_get_meta_data for this->connection->socket', array($info));", "// Wait for output to finish or time out", "while", "(", "!", "feof", "(", "$", "this", "->", "connection", "->", "socket", ")", "&&", "!", "$", "info", "[", "'timed_out'", "]", ")", "{", "try", "{", "$", "line", "=", "trim", "(", "fgets", "(", "$", "this", "->", "connection", "->", "socket", ")", ")", ";", "//Log::info('LxMPD->read : line', array($line));", "$", "info", "=", "stream_get_meta_data", "(", "$", "this", "->", "connection", "->", "socket", ")", ";", "//Log::info('LxMPD->read : stream_get_meta_data for this->connection->socket', array($info));", "// We get empty lines sometimes. Ignore them.", "if", "(", "empty", "(", "$", "line", ")", ")", "{", "continue", ";", "}", "else", "if", "(", "strcmp", "(", "self", "::", "MPD_OK", ",", "$", "line", ")", "==", "0", ")", "{", "$", "ok", "=", "true", ";", "break", ";", "}", "else", "if", "(", "strncmp", "(", "self", "::", "MPD_ERROR", ",", "$", "line", ",", "strlen", "(", "self", "::", "MPD_ERROR", ")", ")", "==", "0", "&&", "preg_match", "(", "'/^ACK \\[(.*?)\\@(.*?)\\] \\{(.*?)\\} (.*?)$/'", ",", "$", "line", ",", "$", "matches", ")", ")", "{", "// First item in matches will be the errorConstant", "// Second item in matches will be the index of the failed command", "// Third item in matches will be the original command that was run", "// Fourth item in matches will be the error message", "list", "(", "$", "constant", ",", "$", "index", ",", "$", "command", ",", "$", "error", ")", "=", "$", "matches", ";", "Log", "::", "info", "(", "'LxMPD write constant'", ",", "array", "(", "$", "constant", ")", ")", ";", "//Log::info('LxMPD write index', array($index));", "//Log::info('LxMPD write command', array($command));", "//Log::info('LxMPD write error', array($error));", "throw", "new", "MPDException", "(", "'Command failed: '", ".", "$", "error", ",", "self", "::", "MPD_COMMAND_FAILED", ")", ";", "}", "else", "{", "$", "response", "[", "]", "=", "$", "line", ";", "}", "}", "catch", "(", "Exception", "$", "e", ")", "{", "Log", "::", "info", "(", "'LxMPD->read : Exception occurred'", ",", "$", "e", ")", ";", "}", "}", "if", "(", "$", "info", "[", "'timed_out'", "]", ")", "{", "$", "this", "->", "connection", "->", "close", "(", ")", ";", "throw", "new", "MPDException", "(", "'Command timed out'", ",", "self", "::", "MPD_TIMEOUT", ")", ";", "}", "else", "{", "if", "(", "!", "count", "(", "$", "response", ")", ")", "{", "$", "response", "=", "$", "ok", ";", "}", "return", "$", "response", ";", "}", "}" ]
Reads data from the MPD socket @return array Array of lines of data
[ "Reads", "data", "from", "the", "MPD", "socket" ]
337708f6fec08c2ca9dfeb6ca88c47f5479be860
https://github.com/dcarrith/lxmpd/blob/337708f6fec08c2ca9dfeb6ca88c47f5479be860/src/Dcarrith/LxMPD/LxMPD.php#L193-L275
84
dcarrith/lxmpd
src/Dcarrith/LxMPD/LxMPD.php
LxMPD.runCommand
public function runCommand( $command, $args = array(), $timeout = 86400 ) { // Convert a string args to an array if(!is_array($args)) $args = array($args); // Set a timeout so it's always set to either the default or the passed in parameter $timeout = ( isset( $timeout ) ? intval( $timeout ) : $this->connection->timeout ); // Trim and then cast the command to a string, just to make sure $toWrite = strval( trim( $command )); // If the args is an array, then first escape double quotes in every element, then implode to strings delimted by enclosing quotes if( is_array( $args ) && ( count( $args ) > 0 )) { // This was causing an array to string conversion during the status command //$toWrite .= ' "' . implode('" "', str_replace( '"', '\"', $args )) . '"'; // We need to escape any args that contain double quotes $args = array_map(function($element) { if(is_array($element)) { return array(str_replace('"', '\"', current($element))); } else { return str_replace('"', '\"', $element); } }, array_filter($args, function($element) { // Filter out any array elements that are also arrays return !is_array($element); })); // Make sure the args array is not now an empty array (in case it was filtered above) if (count($args) > 0) { $toWrite .= ' "' . implode('" "', $args) . '"'; } } //Log::info( 'LxMPD runCommand toWrite', array($toWrite)); // Write command to MPD socket $this->write( $toWrite ); // Set the timeout in seconds $this->connection->setStreamTimeout( $timeout ); // Read the response from the MPD socket $response = $this->read(); // Set the timeout in seconds $this->connection->setStreamTimeout( $timeout ); //Log::info( 'LxMPD runCommand response', array($response)); //Log::info( 'LxMPD runCommand command', array($command)); //Log::info( 'LxMPD runCommand args', array($args)); // Return the parsed response array return $this->parse( $response, $command, $args ); }
php
public function runCommand( $command, $args = array(), $timeout = 86400 ) { // Convert a string args to an array if(!is_array($args)) $args = array($args); // Set a timeout so it's always set to either the default or the passed in parameter $timeout = ( isset( $timeout ) ? intval( $timeout ) : $this->connection->timeout ); // Trim and then cast the command to a string, just to make sure $toWrite = strval( trim( $command )); // If the args is an array, then first escape double quotes in every element, then implode to strings delimted by enclosing quotes if( is_array( $args ) && ( count( $args ) > 0 )) { // This was causing an array to string conversion during the status command //$toWrite .= ' "' . implode('" "', str_replace( '"', '\"', $args )) . '"'; // We need to escape any args that contain double quotes $args = array_map(function($element) { if(is_array($element)) { return array(str_replace('"', '\"', current($element))); } else { return str_replace('"', '\"', $element); } }, array_filter($args, function($element) { // Filter out any array elements that are also arrays return !is_array($element); })); // Make sure the args array is not now an empty array (in case it was filtered above) if (count($args) > 0) { $toWrite .= ' "' . implode('" "', $args) . '"'; } } //Log::info( 'LxMPD runCommand toWrite', array($toWrite)); // Write command to MPD socket $this->write( $toWrite ); // Set the timeout in seconds $this->connection->setStreamTimeout( $timeout ); // Read the response from the MPD socket $response = $this->read(); // Set the timeout in seconds $this->connection->setStreamTimeout( $timeout ); //Log::info( 'LxMPD runCommand response', array($response)); //Log::info( 'LxMPD runCommand command', array($command)); //Log::info( 'LxMPD runCommand args', array($args)); // Return the parsed response array return $this->parse( $response, $command, $args ); }
[ "public", "function", "runCommand", "(", "$", "command", ",", "$", "args", "=", "array", "(", ")", ",", "$", "timeout", "=", "86400", ")", "{", "// Convert a string args to an array", "if", "(", "!", "is_array", "(", "$", "args", ")", ")", "$", "args", "=", "array", "(", "$", "args", ")", ";", "// Set a timeout so it's always set to either the default or the passed in parameter", "$", "timeout", "=", "(", "isset", "(", "$", "timeout", ")", "?", "intval", "(", "$", "timeout", ")", ":", "$", "this", "->", "connection", "->", "timeout", ")", ";", "// Trim and then cast the command to a string, just to make sure", "$", "toWrite", "=", "strval", "(", "trim", "(", "$", "command", ")", ")", ";", "// If the args is an array, then first escape double quotes in every element, then implode to strings delimted by enclosing quotes", "if", "(", "is_array", "(", "$", "args", ")", "&&", "(", "count", "(", "$", "args", ")", ">", "0", ")", ")", "{", "// This was causing an array to string conversion during the status command", "//$toWrite .= ' \"' . implode('\" \"', str_replace( '\"', '\\\"', $args )) . '\"';", "// We need to escape any args that contain double quotes", "$", "args", "=", "array_map", "(", "function", "(", "$", "element", ")", "{", "if", "(", "is_array", "(", "$", "element", ")", ")", "{", "return", "array", "(", "str_replace", "(", "'\"'", ",", "'\\\"'", ",", "current", "(", "$", "element", ")", ")", ")", ";", "}", "else", "{", "return", "str_replace", "(", "'\"'", ",", "'\\\"'", ",", "$", "element", ")", ";", "}", "}", ",", "array_filter", "(", "$", "args", ",", "function", "(", "$", "element", ")", "{", "// Filter out any array elements that are also arrays", "return", "!", "is_array", "(", "$", "element", ")", ";", "}", ")", ")", ";", "// Make sure the args array is not now an empty array (in case it was filtered above)", "if", "(", "count", "(", "$", "args", ")", ">", "0", ")", "{", "$", "toWrite", ".=", "' \"'", ".", "implode", "(", "'\" \"'", ",", "$", "args", ")", ".", "'\"'", ";", "}", "}", "//Log::info( 'LxMPD runCommand toWrite', array($toWrite));", "// Write command to MPD socket", "$", "this", "->", "write", "(", "$", "toWrite", ")", ";", "// Set the timeout in seconds", "$", "this", "->", "connection", "->", "setStreamTimeout", "(", "$", "timeout", ")", ";", "// Read the response from the MPD socket", "$", "response", "=", "$", "this", "->", "read", "(", ")", ";", "// Set the timeout in seconds", "$", "this", "->", "connection", "->", "setStreamTimeout", "(", "$", "timeout", ")", ";", "//Log::info( 'LxMPD runCommand response', array($response));", "//Log::info( 'LxMPD runCommand command', array($command));", "//Log::info( 'LxMPD runCommand args', array($args));", "// Return the parsed response array", "return", "$", "this", "->", "parse", "(", "$", "response", ",", "$", "command", ",", "$", "args", ")", ";", "}" ]
Runs a given command with arguments @param string $command The command to execute @param string|array $args The command's argument(s) @param int $timeout The script's timeout, in seconds @return array Array of parsed output
[ "Runs", "a", "given", "command", "with", "arguments" ]
337708f6fec08c2ca9dfeb6ca88c47f5479be860
https://github.com/dcarrith/lxmpd/blob/337708f6fec08c2ca9dfeb6ca88c47f5479be860/src/Dcarrith/LxMPD/LxMPD.php#L284-L346
85
dcarrith/lxmpd
src/Dcarrith/LxMPD/LxMPD.php
LxMPD.parse
private function parse( $response, $command = '', $args = array() ) { // This is the array for storing all the parsed output $parsed = array(); // If the response is a boolean, and the command is one that expects a boolean response, then return the response if( is_bool($response) ) { if( in_array( $command, $this->_responseShouldBeBoolean )) { return $response; } else { // If the command isn't expecting a boolean result, then we need to set the response back to an empty array $response = array(); } } // If the response from MPD was an empty array, then just return the empty parsed array if( !count( $response ) ) { return $parsed; } switch( $command ) { // This will parse out a list of something like artists or albums into a simple array of values case 'list' : case 'listplaylist' : case 'listplaylists' : foreach( $response as $line ) { // Get the key value pairs from the line of output preg_match('/(.*?):\s(.*)/', $line, $matches); if( count($matches) != 3 ) { continue; } // Put the cleaned up matched pieces into the variables we'll be using list( $subject, $key, $value ) = $matches; // listplaylists requires special treatment if( $command == "listplaylists") { // We only care about the elements with the key 'playlist' if( $key == "playlist" ) { // We only need an array of playlist names $parsed[] = $value; } } else { // For playlists that aren't the current playlist, we only need an array of values $parsed[] = $value; } } return $parsed; break; // listplaylistinfo // playlistinfo // statistics // stats // idle default : $items = array(); foreach( $response as $line ) { // Get the key value pairs from the line of output preg_match('/(.*?):\s(.*)/', $line, $matches); // Put the cleaned up matched pieces into the variables we'll be using list( $subject, $key, $value ) = $matches; // The response output from certain commands like statistics and stats will never // meet this condition, so therefore the items array will always be built as an // associative array with key => value pairs. The response output from commands // like list, or list if( array_key_exists( $key, $items ) ) { // Append the track array onto the array of parsedOutput to be returned $parsed[] = $items; // Initialize a new track to compile $items = array( $key => $value ); } else { // Set the key value pair in the track array $items[ $key ] = $value; } } if( in_array( $command, $this->_expectArrayOutput ) ) { // Append the last items array onto the array of parsedOutput to return $parsed[] = $items; } else { $parsed = $items; } // If the output contains one or more tracks, then we can filter and report on missing tags if needed if( in_array( $command, $this->_outputContainsTracks )) { if( $this->_tagFiltering ) { $parsed = $this->filterOutUnwantedTags( $parsed ); } if( $this->_throwMissingTagExceptions ) { $this->reportOnMissingTags( $command, $parsed ); } } return $parsed; break; } return false; }
php
private function parse( $response, $command = '', $args = array() ) { // This is the array for storing all the parsed output $parsed = array(); // If the response is a boolean, and the command is one that expects a boolean response, then return the response if( is_bool($response) ) { if( in_array( $command, $this->_responseShouldBeBoolean )) { return $response; } else { // If the command isn't expecting a boolean result, then we need to set the response back to an empty array $response = array(); } } // If the response from MPD was an empty array, then just return the empty parsed array if( !count( $response ) ) { return $parsed; } switch( $command ) { // This will parse out a list of something like artists or albums into a simple array of values case 'list' : case 'listplaylist' : case 'listplaylists' : foreach( $response as $line ) { // Get the key value pairs from the line of output preg_match('/(.*?):\s(.*)/', $line, $matches); if( count($matches) != 3 ) { continue; } // Put the cleaned up matched pieces into the variables we'll be using list( $subject, $key, $value ) = $matches; // listplaylists requires special treatment if( $command == "listplaylists") { // We only care about the elements with the key 'playlist' if( $key == "playlist" ) { // We only need an array of playlist names $parsed[] = $value; } } else { // For playlists that aren't the current playlist, we only need an array of values $parsed[] = $value; } } return $parsed; break; // listplaylistinfo // playlistinfo // statistics // stats // idle default : $items = array(); foreach( $response as $line ) { // Get the key value pairs from the line of output preg_match('/(.*?):\s(.*)/', $line, $matches); // Put the cleaned up matched pieces into the variables we'll be using list( $subject, $key, $value ) = $matches; // The response output from certain commands like statistics and stats will never // meet this condition, so therefore the items array will always be built as an // associative array with key => value pairs. The response output from commands // like list, or list if( array_key_exists( $key, $items ) ) { // Append the track array onto the array of parsedOutput to be returned $parsed[] = $items; // Initialize a new track to compile $items = array( $key => $value ); } else { // Set the key value pair in the track array $items[ $key ] = $value; } } if( in_array( $command, $this->_expectArrayOutput ) ) { // Append the last items array onto the array of parsedOutput to return $parsed[] = $items; } else { $parsed = $items; } // If the output contains one or more tracks, then we can filter and report on missing tags if needed if( in_array( $command, $this->_outputContainsTracks )) { if( $this->_tagFiltering ) { $parsed = $this->filterOutUnwantedTags( $parsed ); } if( $this->_throwMissingTagExceptions ) { $this->reportOnMissingTags( $command, $parsed ); } } return $parsed; break; } return false; }
[ "private", "function", "parse", "(", "$", "response", ",", "$", "command", "=", "''", ",", "$", "args", "=", "array", "(", ")", ")", "{", "// This is the array for storing all the parsed output", "$", "parsed", "=", "array", "(", ")", ";", "// If the response is a boolean, and the command is one that expects a boolean response, then return the response", "if", "(", "is_bool", "(", "$", "response", ")", ")", "{", "if", "(", "in_array", "(", "$", "command", ",", "$", "this", "->", "_responseShouldBeBoolean", ")", ")", "{", "return", "$", "response", ";", "}", "else", "{", "// If the command isn't expecting a boolean result, then we need to set the response back to an empty array", "$", "response", "=", "array", "(", ")", ";", "}", "}", "// If the response from MPD was an empty array, then just return the empty parsed array", "if", "(", "!", "count", "(", "$", "response", ")", ")", "{", "return", "$", "parsed", ";", "}", "switch", "(", "$", "command", ")", "{", "// This will parse out a list of something like artists or albums into a simple array of values", "case", "'list'", ":", "case", "'listplaylist'", ":", "case", "'listplaylists'", ":", "foreach", "(", "$", "response", "as", "$", "line", ")", "{", "// Get the key value pairs from the line of output", "preg_match", "(", "'/(.*?):\\s(.*)/'", ",", "$", "line", ",", "$", "matches", ")", ";", "if", "(", "count", "(", "$", "matches", ")", "!=", "3", ")", "{", "continue", ";", "}", "// Put the cleaned up matched pieces into the variables we'll be using", "list", "(", "$", "subject", ",", "$", "key", ",", "$", "value", ")", "=", "$", "matches", ";", "// listplaylists requires special treatment", "if", "(", "$", "command", "==", "\"listplaylists\"", ")", "{", "// We only care about the elements with the key 'playlist'", "if", "(", "$", "key", "==", "\"playlist\"", ")", "{", "// We only need an array of playlist names", "$", "parsed", "[", "]", "=", "$", "value", ";", "}", "}", "else", "{", "// For playlists that aren't the current playlist, we only need an array of values", "$", "parsed", "[", "]", "=", "$", "value", ";", "}", "}", "return", "$", "parsed", ";", "break", ";", "// listplaylistinfo", "// playlistinfo", "// statistics", "// stats", "// idle", "default", ":", "$", "items", "=", "array", "(", ")", ";", "foreach", "(", "$", "response", "as", "$", "line", ")", "{", "// Get the key value pairs from the line of output", "preg_match", "(", "'/(.*?):\\s(.*)/'", ",", "$", "line", ",", "$", "matches", ")", ";", "// Put the cleaned up matched pieces into the variables we'll be using", "list", "(", "$", "subject", ",", "$", "key", ",", "$", "value", ")", "=", "$", "matches", ";", "// The response output from certain commands like statistics and stats will never", "// meet this condition, so therefore the items array will always be built as an", "// associative array with key => value pairs. The response output from commands", "// like list, or list", "if", "(", "array_key_exists", "(", "$", "key", ",", "$", "items", ")", ")", "{", "// Append the track array onto the array of parsedOutput to be returned", "$", "parsed", "[", "]", "=", "$", "items", ";", "// Initialize a new track to compile", "$", "items", "=", "array", "(", "$", "key", "=>", "$", "value", ")", ";", "}", "else", "{", "// Set the key value pair in the track array", "$", "items", "[", "$", "key", "]", "=", "$", "value", ";", "}", "}", "if", "(", "in_array", "(", "$", "command", ",", "$", "this", "->", "_expectArrayOutput", ")", ")", "{", "// Append the last items array onto the array of parsedOutput to return", "$", "parsed", "[", "]", "=", "$", "items", ";", "}", "else", "{", "$", "parsed", "=", "$", "items", ";", "}", "// If the output contains one or more tracks, then we can filter and report on missing tags if needed", "if", "(", "in_array", "(", "$", "command", ",", "$", "this", "->", "_outputContainsTracks", ")", ")", "{", "if", "(", "$", "this", "->", "_tagFiltering", ")", "{", "$", "parsed", "=", "$", "this", "->", "filterOutUnwantedTags", "(", "$", "parsed", ")", ";", "}", "if", "(", "$", "this", "->", "_throwMissingTagExceptions", ")", "{", "$", "this", "->", "reportOnMissingTags", "(", "$", "command", ",", "$", "parsed", ")", ";", "}", "}", "return", "$", "parsed", ";", "break", ";", "}", "return", "false", ";", "}" ]
Parses an array of output lines from MPD into a common array format @param array $response the output read from the connection to MPD @return mixed (string || array)
[ "Parses", "an", "array", "of", "output", "lines", "from", "MPD", "into", "a", "common", "array", "format" ]
337708f6fec08c2ca9dfeb6ca88c47f5479be860
https://github.com/dcarrith/lxmpd/blob/337708f6fec08c2ca9dfeb6ca88c47f5479be860/src/Dcarrith/LxMPD/LxMPD.php#L353-L484
86
dcarrith/lxmpd
src/Dcarrith/LxMPD/LxMPD.php
LxMPD.reportOnMissingTags
public function reportOnMissingTags( $command, $tracks ) { // getEssentialTags combines the essential ID3 as well as MPD-specific tags $essentialTags = $this->getEssentialTags(); // Loop through the tracks array so we can replace each track with a simple array of missing tags $incompleteTracks = array_filter( array_map( function( $track ) use ( $essentialTags ) { // Flip the essential tags array so the values are keys. // Take the diff_key of that and $track so we're left with only tags that are in the essentialTags array, but not in $track. // Flip the result of that back around so the keys are values again. $missingTags = array_flip( array_diff_key( array_flip( $essentialTags ), $track )); // If there are missing tags, then return the array element using the MPD track Id as the key so we can retrieve more info later. return (count($missingTags) ? (array($track['Id'] => $missingTags)) : array()); }, $tracks), function( $missing ) { // Filter out any empty arrays so we're only left with the arrays of the incomplete tracks return (count($missing)); }); // If we have any tracks that are missing essential tags, then throw an exception to alert the user if( count($incompleteTracks) ) { $detailedMessage = ""; // Loop through the incomplete tracks so we can retrieve more info about each track and build the exception message foreach( $incompleteTracks as $incompleteTrack ) { // Get the id from the incompleteTrack array $id = key($incompleteTrack); // Retrieve more information about the track that's missing tags $track = $this->playlistid( $id ); // Get the name of the artist $artist = $track['Artist']; // Get the name of the album $album = $track['Album']; // Complile a detailed message about the track $detailedMessage .= "Track #".$id." from the artist '".$artist.",' specifically, the album '".$album."', is missing tag".((count($incompleteTrack) > 1) ? "s: " : ": ").implode( ", ", current($incompleteTrack) ).". "; } // There must be some essential tags missing from one or more tracks in the playlist throw new MPDException( 'The command "'.$command.'" has retrieved some tracks that are missing essential tag elements. Please clean up any deficient id3 tags and try again. The essentials tags are as follows: '.implode(", ", $essentialID3Tags).'. Details: '.$detailedMessage, self::ESSENTIAL_TAGS_MISSING ); } }
php
public function reportOnMissingTags( $command, $tracks ) { // getEssentialTags combines the essential ID3 as well as MPD-specific tags $essentialTags = $this->getEssentialTags(); // Loop through the tracks array so we can replace each track with a simple array of missing tags $incompleteTracks = array_filter( array_map( function( $track ) use ( $essentialTags ) { // Flip the essential tags array so the values are keys. // Take the diff_key of that and $track so we're left with only tags that are in the essentialTags array, but not in $track. // Flip the result of that back around so the keys are values again. $missingTags = array_flip( array_diff_key( array_flip( $essentialTags ), $track )); // If there are missing tags, then return the array element using the MPD track Id as the key so we can retrieve more info later. return (count($missingTags) ? (array($track['Id'] => $missingTags)) : array()); }, $tracks), function( $missing ) { // Filter out any empty arrays so we're only left with the arrays of the incomplete tracks return (count($missing)); }); // If we have any tracks that are missing essential tags, then throw an exception to alert the user if( count($incompleteTracks) ) { $detailedMessage = ""; // Loop through the incomplete tracks so we can retrieve more info about each track and build the exception message foreach( $incompleteTracks as $incompleteTrack ) { // Get the id from the incompleteTrack array $id = key($incompleteTrack); // Retrieve more information about the track that's missing tags $track = $this->playlistid( $id ); // Get the name of the artist $artist = $track['Artist']; // Get the name of the album $album = $track['Album']; // Complile a detailed message about the track $detailedMessage .= "Track #".$id." from the artist '".$artist.",' specifically, the album '".$album."', is missing tag".((count($incompleteTrack) > 1) ? "s: " : ": ").implode( ", ", current($incompleteTrack) ).". "; } // There must be some essential tags missing from one or more tracks in the playlist throw new MPDException( 'The command "'.$command.'" has retrieved some tracks that are missing essential tag elements. Please clean up any deficient id3 tags and try again. The essentials tags are as follows: '.implode(", ", $essentialID3Tags).'. Details: '.$detailedMessage, self::ESSENTIAL_TAGS_MISSING ); } }
[ "public", "function", "reportOnMissingTags", "(", "$", "command", ",", "$", "tracks", ")", "{", "// getEssentialTags combines the essential ID3 as well as MPD-specific tags", "$", "essentialTags", "=", "$", "this", "->", "getEssentialTags", "(", ")", ";", "// Loop through the tracks array so we can replace each track with a simple array of missing tags", "$", "incompleteTracks", "=", "array_filter", "(", "array_map", "(", "function", "(", "$", "track", ")", "use", "(", "$", "essentialTags", ")", "{", "// Flip the essential tags array so the values are keys.", "// Take the diff_key of that and $track so we're left with only tags that are in the essentialTags array, but not in $track.", "// Flip the result of that back around so the keys are values again.", "$", "missingTags", "=", "array_flip", "(", "array_diff_key", "(", "array_flip", "(", "$", "essentialTags", ")", ",", "$", "track", ")", ")", ";", "// If there are missing tags, then return the array element using the MPD track Id as the key so we can retrieve more info later.", "return", "(", "count", "(", "$", "missingTags", ")", "?", "(", "array", "(", "$", "track", "[", "'Id'", "]", "=>", "$", "missingTags", ")", ")", ":", "array", "(", ")", ")", ";", "}", ",", "$", "tracks", ")", ",", "function", "(", "$", "missing", ")", "{", "// Filter out any empty arrays so we're only left with the arrays of the incomplete tracks", "return", "(", "count", "(", "$", "missing", ")", ")", ";", "}", ")", ";", "// If we have any tracks that are missing essential tags, then throw an exception to alert the user", "if", "(", "count", "(", "$", "incompleteTracks", ")", ")", "{", "$", "detailedMessage", "=", "\"\"", ";", "// Loop through the incomplete tracks so we can retrieve more info about each track and build the exception message", "foreach", "(", "$", "incompleteTracks", "as", "$", "incompleteTrack", ")", "{", "// Get the id from the incompleteTrack array", "$", "id", "=", "key", "(", "$", "incompleteTrack", ")", ";", "// Retrieve more information about the track that's missing tags", "$", "track", "=", "$", "this", "->", "playlistid", "(", "$", "id", ")", ";", "// Get the name of the artist", "$", "artist", "=", "$", "track", "[", "'Artist'", "]", ";", "// Get the name of the album", "$", "album", "=", "$", "track", "[", "'Album'", "]", ";", "// Complile a detailed message about the track", "$", "detailedMessage", ".=", "\"Track #\"", ".", "$", "id", ".", "\" from the artist '\"", ".", "$", "artist", ".", "\",' specifically, the album '\"", ".", "$", "album", ".", "\"', is missing tag\"", ".", "(", "(", "count", "(", "$", "incompleteTrack", ")", ">", "1", ")", "?", "\"s: \"", ":", "\": \"", ")", ".", "implode", "(", "\", \"", ",", "current", "(", "$", "incompleteTrack", ")", ")", ".", "\". \"", ";", "}", "// There must be some essential tags missing from one or more tracks in the playlist", "throw", "new", "MPDException", "(", "'The command \"'", ".", "$", "command", ".", "'\" has retrieved some tracks that are missing essential tag elements. Please clean up any deficient id3 tags and try again. The essentials tags are as follows: '", ".", "implode", "(", "\", \"", ",", "$", "essentialID3Tags", ")", ".", "'. Details: '", ".", "$", "detailedMessage", ",", "self", "::", "ESSENTIAL_TAGS_MISSING", ")", ";", "}", "}" ]
reportOnMissingTags will find any tracks that are missing essentials tags and throws an exception that contains enough information to track down the missing tags so the user can fill them in with the id3 editor of their choice @param string $command is the command that was run which we want to pass through to the exception message @param array $tracks is the array of tracks to loop through @throws MPDException @return void
[ "reportOnMissingTags", "will", "find", "any", "tracks", "that", "are", "missing", "essentials", "tags", "and", "throws", "an", "exception", "that", "contains", "enough", "information", "to", "track", "down", "the", "missing", "tags", "so", "the", "user", "can", "fill", "them", "in", "with", "the", "id3", "editor", "of", "their", "choice" ]
337708f6fec08c2ca9dfeb6ca88c47f5479be860
https://github.com/dcarrith/lxmpd/blob/337708f6fec08c2ca9dfeb6ca88c47f5479be860/src/Dcarrith/LxMPD/LxMPD.php#L592-L641
87
eghojansu/nutrition
src/Security/Authentication.php
Authentication.handleAttempt
public function handleAttempt($executeNow, $username, $password, $toRoute) { if ($executeNow) { try { if ($this->attempt($username, $password)) { Base::instance()->reroute($toRoute); } } catch (Exception $e) { return $e->getMessage(); } } return null; }
php
public function handleAttempt($executeNow, $username, $password, $toRoute) { if ($executeNow) { try { if ($this->attempt($username, $password)) { Base::instance()->reroute($toRoute); } } catch (Exception $e) { return $e->getMessage(); } } return null; }
[ "public", "function", "handleAttempt", "(", "$", "executeNow", ",", "$", "username", ",", "$", "password", ",", "$", "toRoute", ")", "{", "if", "(", "$", "executeNow", ")", "{", "try", "{", "if", "(", "$", "this", "->", "attempt", "(", "$", "username", ",", "$", "password", ")", ")", "{", "Base", "::", "instance", "(", ")", "->", "reroute", "(", "$", "toRoute", ")", ";", "}", "}", "catch", "(", "Exception", "$", "e", ")", "{", "return", "$", "e", "->", "getMessage", "(", ")", ";", "}", "}", "return", "null", ";", "}" ]
Handle authentication attempt @param bool $executeNow should we execute now? @param string $username @param string $password @param string $toRoute redirect to this route on success @return string|null error message
[ "Handle", "authentication", "attempt" ]
3941c62aeb6dafda55349a38dd4107d521f8964a
https://github.com/eghojansu/nutrition/blob/3941c62aeb6dafda55349a38dd4107d521f8964a/src/Security/Authentication.php#L63-L76
88
xloit/xloit-datetime
src/DateFormatter.php
DateFormatter.safeCreateDateTimeZone
public static function safeCreateDateTimeZone($timezone) { if ($timezone === null) { // Don't return null... return new DateTimeZone(date_default_timezone_get()); } if ($timezone instanceof DateTimeZone) { return $timezone; } /** @noinspection PhpUsageOfSilenceOperatorInspection */ $tz = @timezone_open((string) $timezone); if ($tz === false) { throw new Exception\InvalidArgumentException( sprintf( 'Unknown or bad timezone (%s)', is_scalar($timezone) ? $timezone : gettype($timezone) ) ); } return $tz; }
php
public static function safeCreateDateTimeZone($timezone) { if ($timezone === null) { // Don't return null... return new DateTimeZone(date_default_timezone_get()); } if ($timezone instanceof DateTimeZone) { return $timezone; } /** @noinspection PhpUsageOfSilenceOperatorInspection */ $tz = @timezone_open((string) $timezone); if ($tz === false) { throw new Exception\InvalidArgumentException( sprintf( 'Unknown or bad timezone (%s)', is_scalar($timezone) ? $timezone : gettype($timezone) ) ); } return $tz; }
[ "public", "static", "function", "safeCreateDateTimeZone", "(", "$", "timezone", ")", "{", "if", "(", "$", "timezone", "===", "null", ")", "{", "// Don't return null...", "return", "new", "DateTimeZone", "(", "date_default_timezone_get", "(", ")", ")", ";", "}", "if", "(", "$", "timezone", "instanceof", "DateTimeZone", ")", "{", "return", "$", "timezone", ";", "}", "/** @noinspection PhpUsageOfSilenceOperatorInspection */", "$", "tz", "=", "@", "timezone_open", "(", "(", "string", ")", "$", "timezone", ")", ";", "if", "(", "$", "tz", "===", "false", ")", "{", "throw", "new", "Exception", "\\", "InvalidArgumentException", "(", "sprintf", "(", "'Unknown or bad timezone (%s)'", ",", "is_scalar", "(", "$", "timezone", ")", "?", "$", "timezone", ":", "gettype", "(", "$", "timezone", ")", ")", ")", ";", "}", "return", "$", "tz", ";", "}" ]
Creates a DateTimeZone from a string or a DateTimeZone. @link \Carbon\Carbon::safeCreateDateTimeZone($object); @param DateTimeZone|string|null $timezone @return DateTimeZone @throws \Xloit\DateTime\Exception\InvalidArgumentException
[ "Creates", "a", "DateTimeZone", "from", "a", "string", "or", "a", "DateTimeZone", "." ]
daa62a461e5ae72e46f0071db8e9eb9b1bee54a1
https://github.com/xloit/xloit-datetime/blob/daa62a461e5ae72e46f0071db8e9eb9b1bee54a1/src/DateFormatter.php#L135-L158
89
frogsystem/metamorphosis
src/frogsystem/metamorphosis/Constrains/HuggableTrait.php
HuggableTrait.hug
public function hug(Huggable $huggable) { // add huggable to the list of hugged objects and return the hug if (!in_array($huggable, $this->hugged)) { $this->hugged[] = $huggable; $huggable->hug($this); } }
php
public function hug(Huggable $huggable) { // add huggable to the list of hugged objects and return the hug if (!in_array($huggable, $this->hugged)) { $this->hugged[] = $huggable; $huggable->hug($this); } }
[ "public", "function", "hug", "(", "Huggable", "$", "huggable", ")", "{", "// add huggable to the list of hugged objects and return the hug", "if", "(", "!", "in_array", "(", "$", "huggable", ",", "$", "this", "->", "hugged", ")", ")", "{", "$", "this", "->", "hugged", "[", "]", "=", "$", "huggable", ";", "$", "huggable", "->", "hug", "(", "$", "this", ")", ";", "}", "}" ]
Hugs this object. All hugs are mutual. An object that is hugged MUST in turn hug the other object back by calling hug() on the first parameter. All objects MUST implement a mechanism to prevent an infinite loop of hugging. @param Huggable $huggable The object that is hugging this object.
[ "Hugs", "this", "object", "." ]
27bceaab2a21c6c88b39037e2117d9ff7eb6c814
https://github.com/frogsystem/metamorphosis/blob/27bceaab2a21c6c88b39037e2117d9ff7eb6c814/src/frogsystem/metamorphosis/Constrains/HuggableTrait.php#L28-L35
90
aedart/installed-version
src/Reader.php
Reader.readVersionFromLocation
protected function readVersionFromLocation(string $location, string $package) : ?string { // Get the installed packages $installed = $this->getInstalledPackages($location); if(empty($installed)){ return null; } // Search for package foreach ($installed as $installedPackage){ $version = $this->readFromSource($installedPackage, $package); if(isset($version)){ return $version; } } // Nothing found in this package return null; }
php
protected function readVersionFromLocation(string $location, string $package) : ?string { // Get the installed packages $installed = $this->getInstalledPackages($location); if(empty($installed)){ return null; } // Search for package foreach ($installed as $installedPackage){ $version = $this->readFromSource($installedPackage, $package); if(isset($version)){ return $version; } } // Nothing found in this package return null; }
[ "protected", "function", "readVersionFromLocation", "(", "string", "$", "location", ",", "string", "$", "package", ")", ":", "?", "string", "{", "// Get the installed packages", "$", "installed", "=", "$", "this", "->", "getInstalledPackages", "(", "$", "location", ")", ";", "if", "(", "empty", "(", "$", "installed", ")", ")", "{", "return", "null", ";", "}", "// Search for package", "foreach", "(", "$", "installed", "as", "$", "installedPackage", ")", "{", "$", "version", "=", "$", "this", "->", "readFromSource", "(", "$", "installedPackage", ",", "$", "package", ")", ";", "if", "(", "isset", "(", "$", "version", ")", ")", "{", "return", "$", "version", ";", "}", "}", "// Nothing found in this package", "return", "null", ";", "}" ]
Attempts to read the version from the given location @param string $location @param string $package @return null|string Version or null if no version found for package
[ "Attempts", "to", "read", "the", "version", "from", "the", "given", "location" ]
4c7d5976ceec47ee4970fdc35e01be968d6a7547
https://github.com/aedart/installed-version/blob/4c7d5976ceec47ee4970fdc35e01be968d6a7547/src/Reader.php#L89-L107
91
aedart/installed-version
src/Reader.php
Reader.readFromSource
protected function readFromSource(array $source, string $package) : ?string { // Abort if no name property if(!isset($source['name'])){ return null; } // Abort if name is not the same a package name if($source['name'] != $package){ return null; } // At this point it means that the package matches. // We check for a version property. if(isset($source['version'])){ return $source['version']; } // This means that no version property existed - which // could mean that the source is an actual composer file. // Therefore, we check if there is an branch alias // specified. (dev-master assumed) if(isset($source['extra']['branch-alias']['dev-master'])){ return $source['extra']['branch-alias']['dev-master']; } // Sadly, if reached here then there is no version available // nor a branch alias. Therefore, we can only return a default // version... return self::DEFAULT_VERSION; }
php
protected function readFromSource(array $source, string $package) : ?string { // Abort if no name property if(!isset($source['name'])){ return null; } // Abort if name is not the same a package name if($source['name'] != $package){ return null; } // At this point it means that the package matches. // We check for a version property. if(isset($source['version'])){ return $source['version']; } // This means that no version property existed - which // could mean that the source is an actual composer file. // Therefore, we check if there is an branch alias // specified. (dev-master assumed) if(isset($source['extra']['branch-alias']['dev-master'])){ return $source['extra']['branch-alias']['dev-master']; } // Sadly, if reached here then there is no version available // nor a branch alias. Therefore, we can only return a default // version... return self::DEFAULT_VERSION; }
[ "protected", "function", "readFromSource", "(", "array", "$", "source", ",", "string", "$", "package", ")", ":", "?", "string", "{", "// Abort if no name property", "if", "(", "!", "isset", "(", "$", "source", "[", "'name'", "]", ")", ")", "{", "return", "null", ";", "}", "// Abort if name is not the same a package name", "if", "(", "$", "source", "[", "'name'", "]", "!=", "$", "package", ")", "{", "return", "null", ";", "}", "// At this point it means that the package matches.", "// We check for a version property.", "if", "(", "isset", "(", "$", "source", "[", "'version'", "]", ")", ")", "{", "return", "$", "source", "[", "'version'", "]", ";", "}", "// This means that no version property existed - which", "// could mean that the source is an actual composer file.", "// Therefore, we check if there is an branch alias", "// specified. (dev-master assumed)", "if", "(", "isset", "(", "$", "source", "[", "'extra'", "]", "[", "'branch-alias'", "]", "[", "'dev-master'", "]", ")", ")", "{", "return", "$", "source", "[", "'extra'", "]", "[", "'branch-alias'", "]", "[", "'dev-master'", "]", ";", "}", "// Sadly, if reached here then there is no version available", "// nor a branch alias. Therefore, we can only return a default", "// version...", "return", "self", "::", "DEFAULT_VERSION", ";", "}" ]
Attempts to read a "version" property on the source and return it. @param array $source Composer file or installed package @param string $package Name of package we are looking for @return string|null Version or null if not found
[ "Attempts", "to", "read", "a", "version", "property", "on", "the", "source", "and", "return", "it", "." ]
4c7d5976ceec47ee4970fdc35e01be968d6a7547
https://github.com/aedart/installed-version/blob/4c7d5976ceec47ee4970fdc35e01be968d6a7547/src/Reader.php#L118-L148
92
aedart/installed-version
src/Reader.php
Reader.getInstalledPackages
protected function getInstalledPackages(string $location) : array { if(isset($this->installedPackages[$location])){ return $this->installedPackages[$location]; } $installedFile = $location . 'installed.json'; if(!file_exists($installedFile)){ return []; } return $this->installedPackages[$location] = $this->loadJsonFile($installedFile); }
php
protected function getInstalledPackages(string $location) : array { if(isset($this->installedPackages[$location])){ return $this->installedPackages[$location]; } $installedFile = $location . 'installed.json'; if(!file_exists($installedFile)){ return []; } return $this->installedPackages[$location] = $this->loadJsonFile($installedFile); }
[ "protected", "function", "getInstalledPackages", "(", "string", "$", "location", ")", ":", "array", "{", "if", "(", "isset", "(", "$", "this", "->", "installedPackages", "[", "$", "location", "]", ")", ")", "{", "return", "$", "this", "->", "installedPackages", "[", "$", "location", "]", ";", "}", "$", "installedFile", "=", "$", "location", ".", "'installed.json'", ";", "if", "(", "!", "file_exists", "(", "$", "installedFile", ")", ")", "{", "return", "[", "]", ";", "}", "return", "$", "this", "->", "installedPackages", "[", "$", "location", "]", "=", "$", "this", "->", "loadJsonFile", "(", "$", "installedFile", ")", ";", "}" ]
Returns the "installed" packages found at the given location @param string $location @return array
[ "Returns", "the", "installed", "packages", "found", "at", "the", "given", "location" ]
4c7d5976ceec47ee4970fdc35e01be968d6a7547
https://github.com/aedart/installed-version/blob/4c7d5976ceec47ee4970fdc35e01be968d6a7547/src/Reader.php#L158-L170
93
webriq/core
module/Paragraph/src/Grid/Paragraph/Model/Paragraph/Structure/Lead.php
Lead.setImageWidth
public function setImageWidth( $width ) { $this->imageWidth = empty( $width ) ? null : (int) $width; return $this; }
php
public function setImageWidth( $width ) { $this->imageWidth = empty( $width ) ? null : (int) $width; return $this; }
[ "public", "function", "setImageWidth", "(", "$", "width", ")", "{", "$", "this", "->", "imageWidth", "=", "empty", "(", "$", "width", ")", "?", "null", ":", "(", "int", ")", "$", "width", ";", "return", "$", "this", ";", "}" ]
Set image width attribute @param int $width @return Lead
[ "Set", "image", "width", "attribute" ]
cfeb6e8a4732561c2215ec94e736c07f9b8bc990
https://github.com/webriq/core/blob/cfeb6e8a4732561c2215ec94e736c07f9b8bc990/module/Paragraph/src/Grid/Paragraph/Model/Paragraph/Structure/Lead.php#L87-L91
94
webriq/core
module/Paragraph/src/Grid/Paragraph/Model/Paragraph/Structure/Lead.php
Lead.setImageHeight
public function setImageHeight( $height ) { $this->imageHeight = empty( $height ) ? null : (int) $height; return $this; }
php
public function setImageHeight( $height ) { $this->imageHeight = empty( $height ) ? null : (int) $height; return $this; }
[ "public", "function", "setImageHeight", "(", "$", "height", ")", "{", "$", "this", "->", "imageHeight", "=", "empty", "(", "$", "height", ")", "?", "null", ":", "(", "int", ")", "$", "height", ";", "return", "$", "this", ";", "}" ]
Set image height attribute @param int $height @return Lead
[ "Set", "image", "height", "attribute" ]
cfeb6e8a4732561c2215ec94e736c07f9b8bc990
https://github.com/webriq/core/blob/cfeb6e8a4732561c2215ec94e736c07f9b8bc990/module/Paragraph/src/Grid/Paragraph/Model/Paragraph/Structure/Lead.php#L109-L113
95
webriq/core
module/Paragraph/src/Grid/Paragraph/Model/Paragraph/Structure/Lead.php
Lead.setRootImage
public function setRootImage( $value ) { $content = $this->getDependentContent(); if ( $content ) { $content->leadImage = $value; } return $this; }
php
public function setRootImage( $value ) { $content = $this->getDependentContent(); if ( $content ) { $content->leadImage = $value; } return $this; }
[ "public", "function", "setRootImage", "(", "$", "value", ")", "{", "$", "content", "=", "$", "this", "->", "getDependentContent", "(", ")", ";", "if", "(", "$", "content", ")", "{", "$", "content", "->", "leadImage", "=", "$", "value", ";", "}", "return", "$", "this", ";", "}" ]
Set root's lead-image @param string $value @return \Paragraph\Model\Paragraph\Structure\Lead
[ "Set", "root", "s", "lead", "-", "image" ]
cfeb6e8a4732561c2215ec94e736c07f9b8bc990
https://github.com/webriq/core/blob/cfeb6e8a4732561c2215ec94e736c07f9b8bc990/module/Paragraph/src/Grid/Paragraph/Model/Paragraph/Structure/Lead.php#L190-L200
96
webriq/core
module/Paragraph/src/Grid/Paragraph/Model/Paragraph/Structure/Lead.php
Lead.setRootText
public function setRootText( $value ) { $content = $this->getDependentContent(); if ( $content ) { $content->leadText = $value; } return $this; }
php
public function setRootText( $value ) { $content = $this->getDependentContent(); if ( $content ) { $content->leadText = $value; } return $this; }
[ "public", "function", "setRootText", "(", "$", "value", ")", "{", "$", "content", "=", "$", "this", "->", "getDependentContent", "(", ")", ";", "if", "(", "$", "content", ")", "{", "$", "content", "->", "leadText", "=", "$", "value", ";", "}", "return", "$", "this", ";", "}" ]
Set root's lead-text @param string $value @return \Paragraph\Model\Paragraph\Structure\Lead
[ "Set", "root", "s", "lead", "-", "text" ]
cfeb6e8a4732561c2215ec94e736c07f9b8bc990
https://github.com/webriq/core/blob/cfeb6e8a4732561c2215ec94e736c07f9b8bc990/module/Paragraph/src/Grid/Paragraph/Model/Paragraph/Structure/Lead.php#L225-L235
97
fsi-open/metadata
lib/FSi/Component/Metadata/Driver/DriverChain.php
DriverChain.addDriver
public function addDriver(DriverInterface $driver, $namespace) { if (!isset($this->drivers[$namespace])) $this->drivers[$namespace] = array(); $this->drivers[$namespace][] = $driver; return $this; }
php
public function addDriver(DriverInterface $driver, $namespace) { if (!isset($this->drivers[$namespace])) $this->drivers[$namespace] = array(); $this->drivers[$namespace][] = $driver; return $this; }
[ "public", "function", "addDriver", "(", "DriverInterface", "$", "driver", ",", "$", "namespace", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "drivers", "[", "$", "namespace", "]", ")", ")", "$", "this", "->", "drivers", "[", "$", "namespace", "]", "=", "array", "(", ")", ";", "$", "this", "->", "drivers", "[", "$", "namespace", "]", "[", "]", "=", "$", "driver", ";", "return", "$", "this", ";", "}" ]
Add new driver to the chain @param \FSi\Component\Metadata\Driver\DriverInterface $driver @param string $namespace @return \FSi\Component\Metadata\Driver\DriverChain
[ "Add", "new", "driver", "to", "the", "chain" ]
65c36bdab257d19d58e264b2b36bcf97a144075f
https://github.com/fsi-open/metadata/blob/65c36bdab257d19d58e264b2b36bcf97a144075f/lib/FSi/Component/Metadata/Driver/DriverChain.php#L43-L48
98
DevGroup-ru/dotplant-entity-structure
src/helpers/PaginationHelper.php
PaginationHelper.getPageRange
protected static function getPageRange() { $currentPage = static::$pagination->getPage(); $pageCount = static::$pagination->getPageCount(); $beginPage = max(0, $currentPage - (int) (static::$params['maxButtonCount'] / 2)); if (($endPage = $beginPage + static::$params['maxButtonCount'] - 1) >= $pageCount) { $endPage = $pageCount - 1; $beginPage = max(0, $endPage - static::$params['maxButtonCount'] + 1); } return [$beginPage, $endPage]; }
php
protected static function getPageRange() { $currentPage = static::$pagination->getPage(); $pageCount = static::$pagination->getPageCount(); $beginPage = max(0, $currentPage - (int) (static::$params['maxButtonCount'] / 2)); if (($endPage = $beginPage + static::$params['maxButtonCount'] - 1) >= $pageCount) { $endPage = $pageCount - 1; $beginPage = max(0, $endPage - static::$params['maxButtonCount'] + 1); } return [$beginPage, $endPage]; }
[ "protected", "static", "function", "getPageRange", "(", ")", "{", "$", "currentPage", "=", "static", "::", "$", "pagination", "->", "getPage", "(", ")", ";", "$", "pageCount", "=", "static", "::", "$", "pagination", "->", "getPageCount", "(", ")", ";", "$", "beginPage", "=", "max", "(", "0", ",", "$", "currentPage", "-", "(", "int", ")", "(", "static", "::", "$", "params", "[", "'maxButtonCount'", "]", "/", "2", ")", ")", ";", "if", "(", "(", "$", "endPage", "=", "$", "beginPage", "+", "static", "::", "$", "params", "[", "'maxButtonCount'", "]", "-", "1", ")", ">=", "$", "pageCount", ")", "{", "$", "endPage", "=", "$", "pageCount", "-", "1", ";", "$", "beginPage", "=", "max", "(", "0", ",", "$", "endPage", "-", "static", "::", "$", "params", "[", "'maxButtonCount'", "]", "+", "1", ")", ";", "}", "return", "[", "$", "beginPage", ",", "$", "endPage", "]", ";", "}" ]
Get a pagination range @return array
[ "Get", "a", "pagination", "range" ]
43e3354b5ebf9171e9afef38d82dccb02357bfed
https://github.com/DevGroup-ru/dotplant-entity-structure/blob/43e3354b5ebf9171e9afef38d82dccb02357bfed/src/helpers/PaginationHelper.php#L95-L105
99
DevGroup-ru/dotplant-entity-structure
src/helpers/PaginationHelper.php
PaginationHelper.buildPageItem
protected static function buildPageItem($label, $page, $class, $disabled, $active) { $classes = [$class]; if ($active) { $classes[] = static::$params['activePageCssClass']; } if ($disabled) { $classes[] = static::$params['disabledPageCssClass']; } return [ 'label' => $label, 'url' => static::$pagination->createUrl($page), 'class' => implode(' ', $classes), ]; }
php
protected static function buildPageItem($label, $page, $class, $disabled, $active) { $classes = [$class]; if ($active) { $classes[] = static::$params['activePageCssClass']; } if ($disabled) { $classes[] = static::$params['disabledPageCssClass']; } return [ 'label' => $label, 'url' => static::$pagination->createUrl($page), 'class' => implode(' ', $classes), ]; }
[ "protected", "static", "function", "buildPageItem", "(", "$", "label", ",", "$", "page", ",", "$", "class", ",", "$", "disabled", ",", "$", "active", ")", "{", "$", "classes", "=", "[", "$", "class", "]", ";", "if", "(", "$", "active", ")", "{", "$", "classes", "[", "]", "=", "static", "::", "$", "params", "[", "'activePageCssClass'", "]", ";", "}", "if", "(", "$", "disabled", ")", "{", "$", "classes", "[", "]", "=", "static", "::", "$", "params", "[", "'disabledPageCssClass'", "]", ";", "}", "return", "[", "'label'", "=>", "$", "label", ",", "'url'", "=>", "static", "::", "$", "pagination", "->", "createUrl", "(", "$", "page", ")", ",", "'class'", "=>", "implode", "(", "' '", ",", "$", "classes", ")", ",", "]", ";", "}" ]
Build a page link array @param string $label @param int $page @param string $class @param boolean $disabled @param boolean $active @return array
[ "Build", "a", "page", "link", "array" ]
43e3354b5ebf9171e9afef38d82dccb02357bfed
https://github.com/DevGroup-ru/dotplant-entity-structure/blob/43e3354b5ebf9171e9afef38d82dccb02357bfed/src/helpers/PaginationHelper.php#L116-L130