repository_name stringlengths 5 67 | func_path_in_repository stringlengths 4 234 | func_name stringlengths 0 314 | whole_func_string stringlengths 52 3.87M | language stringclasses 6
values | func_code_string stringlengths 52 3.87M | func_code_tokens listlengths 15 672k | func_documentation_string stringlengths 1 47.2k | func_documentation_tokens listlengths 1 3.92k | split_name stringclasses 1
value | func_code_url stringlengths 85 339 |
|---|---|---|---|---|---|---|---|---|---|---|
webforge-labs/psc-cms | lib/PHPWord/PHPWord.php | PHPWord.addFontStyle | public function addFontStyle($styleName, $styleFont, $styleParagraph = null) {
PHPWord_Style::addFontStyle($styleName, $styleFont, $styleParagraph);
} | php | public function addFontStyle($styleName, $styleFont, $styleParagraph = null) {
PHPWord_Style::addFontStyle($styleName, $styleFont, $styleParagraph);
} | [
"public",
"function",
"addFontStyle",
"(",
"$",
"styleName",
",",
"$",
"styleFont",
",",
"$",
"styleParagraph",
"=",
"null",
")",
"{",
"PHPWord_Style",
"::",
"addFontStyle",
"(",
"$",
"styleName",
",",
"$",
"styleFont",
",",
"$",
"styleParagraph",
")",
";",
... | Adds a font style definition to styles.xml
@param $styleName string
@param $styles array | [
"Adds",
"a",
"font",
"style",
"definition",
"to",
"styles",
".",
"xml"
] | train | https://github.com/webforge-labs/psc-cms/blob/467bfa2547e6b4fa487d2d7f35fa6cc618dbc763/lib/PHPWord/PHPWord.php#L157-L159 |
webforge-labs/psc-cms | lib/PHPWord/PHPWord.php | PHPWord.addTableStyle | public function addTableStyle($styleName, $styleTable, $styleFirstRow = null) {
PHPWord_Style::addTableStyle($styleName, $styleTable, $styleFirstRow);
} | php | public function addTableStyle($styleName, $styleTable, $styleFirstRow = null) {
PHPWord_Style::addTableStyle($styleName, $styleTable, $styleFirstRow);
} | [
"public",
"function",
"addTableStyle",
"(",
"$",
"styleName",
",",
"$",
"styleTable",
",",
"$",
"styleFirstRow",
"=",
"null",
")",
"{",
"PHPWord_Style",
"::",
"addTableStyle",
"(",
"$",
"styleName",
",",
"$",
"styleTable",
",",
"$",
"styleFirstRow",
")",
";"... | Adds a table style definition to styles.xml
@param $styleName string
@param $styles array | [
"Adds",
"a",
"table",
"style",
"definition",
"to",
"styles",
".",
"xml"
] | train | https://github.com/webforge-labs/psc-cms/blob/467bfa2547e6b4fa487d2d7f35fa6cc618dbc763/lib/PHPWord/PHPWord.php#L167-L169 |
webforge-labs/psc-cms | lib/PHPWord/PHPWord.php | PHPWord.addTitleStyle | public function addTitleStyle($titleCount, $styleFont, $styleParagraph = null) {
PHPWord_Style::addTitleStyle($titleCount, $styleFont, $styleParagraph);
} | php | public function addTitleStyle($titleCount, $styleFont, $styleParagraph = null) {
PHPWord_Style::addTitleStyle($titleCount, $styleFont, $styleParagraph);
} | [
"public",
"function",
"addTitleStyle",
"(",
"$",
"titleCount",
",",
"$",
"styleFont",
",",
"$",
"styleParagraph",
"=",
"null",
")",
"{",
"PHPWord_Style",
"::",
"addTitleStyle",
"(",
"$",
"titleCount",
",",
"$",
"styleFont",
",",
"$",
"styleParagraph",
")",
"... | Adds a heading style definition to styles.xml
@param $titleCount int
@param $styles array | [
"Adds",
"a",
"heading",
"style",
"definition",
"to",
"styles",
".",
"xml"
] | train | https://github.com/webforge-labs/psc-cms/blob/467bfa2547e6b4fa487d2d7f35fa6cc618dbc763/lib/PHPWord/PHPWord.php#L177-L179 |
webforge-labs/psc-cms | lib/PHPWord/PHPWord.php | PHPWord.loadTemplate | public function loadTemplate($strFilename) {
if(file_exists($strFilename)) {
$template = new PHPWord_Template($strFilename);
return $template;
} else {
trigger_error('Template file '.$strFilename.' not found.', E_ERROR);
}
} | php | public function loadTemplate($strFilename) {
if(file_exists($strFilename)) {
$template = new PHPWord_Template($strFilename);
return $template;
} else {
trigger_error('Template file '.$strFilename.' not found.', E_ERROR);
}
} | [
"public",
"function",
"loadTemplate",
"(",
"$",
"strFilename",
")",
"{",
"if",
"(",
"file_exists",
"(",
"$",
"strFilename",
")",
")",
"{",
"$",
"template",
"=",
"new",
"PHPWord_Template",
"(",
"$",
"strFilename",
")",
";",
"return",
"$",
"template",
";",
... | Load a Template File
@param string $strFilename
@return PHPWord_Template | [
"Load",
"a",
"Template",
"File"
] | train | https://github.com/webforge-labs/psc-cms/blob/467bfa2547e6b4fa487d2d7f35fa6cc618dbc763/lib/PHPWord/PHPWord.php#L213-L220 |
egeloen/IvorySerializerBundle | CacheWarmer/SerializerCacheWarmer.php | SerializerCacheWarmer.warmUp | public function warmUp($cacheDir)
{
if (!$this->loader instanceof MappedClassMetadataLoaderInterface) {
return;
}
foreach ($this->loader->getMappedClasses() as $class) {
$this->factory->getClassMetadata($class);
}
$this->pool->commit();
} | php | public function warmUp($cacheDir)
{
if (!$this->loader instanceof MappedClassMetadataLoaderInterface) {
return;
}
foreach ($this->loader->getMappedClasses() as $class) {
$this->factory->getClassMetadata($class);
}
$this->pool->commit();
} | [
"public",
"function",
"warmUp",
"(",
"$",
"cacheDir",
")",
"{",
"if",
"(",
"!",
"$",
"this",
"->",
"loader",
"instanceof",
"MappedClassMetadataLoaderInterface",
")",
"{",
"return",
";",
"}",
"foreach",
"(",
"$",
"this",
"->",
"loader",
"->",
"getMappedClasse... | {@inheritdoc} | [
"{"
] | train | https://github.com/egeloen/IvorySerializerBundle/blob/a2bdd912bf715c61b823cf7257ee232d5c823dd3/CacheWarmer/SerializerCacheWarmer.php#L58-L69 |
steeffeen/FancyManiaLinks | FML/Script/Features/Menu.php | Menu.addItem | public function addItem(Control $item, Control $control, $isStartElement = false)
{
$menuElement = new MenuElement($item, $control);
$this->addElement($menuElement, $isStartElement);
return $this;
} | php | public function addItem(Control $item, Control $control, $isStartElement = false)
{
$menuElement = new MenuElement($item, $control);
$this->addElement($menuElement, $isStartElement);
return $this;
} | [
"public",
"function",
"addItem",
"(",
"Control",
"$",
"item",
",",
"Control",
"$",
"control",
",",
"$",
"isStartElement",
"=",
"false",
")",
"{",
"$",
"menuElement",
"=",
"new",
"MenuElement",
"(",
"$",
"item",
",",
"$",
"control",
")",
";",
"$",
"this... | Add a Menu item
@api
@param Control $item Item Control in the Menu bar
@param Control $control Toggled Menu Control
@param bool $isStartElement (optional) Whether the Menu should start with this Element
@return static | [
"Add",
"a",
"Menu",
"item"
] | train | https://github.com/steeffeen/FancyManiaLinks/blob/227b0759306f0a3c75873ba50276e4163a93bfa6/FML/Script/Features/Menu.php#L70-L75 |
steeffeen/FancyManiaLinks | FML/Script/Features/Menu.php | Menu.addElement | public function addElement(MenuElement $menuElement, $isStartElement = false)
{
if (!in_array($menuElement, $this->elements, true)) {
array_push($this->elements, $menuElement);
if ($isStartElement) {
// new start element
$this->setStartElement($menuEle... | php | public function addElement(MenuElement $menuElement, $isStartElement = false)
{
if (!in_array($menuElement, $this->elements, true)) {
array_push($this->elements, $menuElement);
if ($isStartElement) {
// new start element
$this->setStartElement($menuEle... | [
"public",
"function",
"addElement",
"(",
"MenuElement",
"$",
"menuElement",
",",
"$",
"isStartElement",
"=",
"false",
")",
"{",
"if",
"(",
"!",
"in_array",
"(",
"$",
"menuElement",
",",
"$",
"this",
"->",
"elements",
",",
"true",
")",
")",
"{",
"array_pu... | Add a Menu Element
@api
@param MenuElement $menuElement Menu Element
@param bool $isStartElement (optional) Whether the Menu should start with this Element
@return static | [
"Add",
"a",
"Menu",
"Element"
] | train | https://github.com/steeffeen/FancyManiaLinks/blob/227b0759306f0a3c75873ba50276e4163a93bfa6/FML/Script/Features/Menu.php#L85-L99 |
steeffeen/FancyManiaLinks | FML/Script/Features/Menu.php | Menu.setStartElement | public function setStartElement(MenuElement $startElement = null)
{
$this->startElement = $startElement;
if ($startElement && !in_array($startElement, $this->elements, true)) {
array_push($this->elements, $startElement);
}
return $this;
} | php | public function setStartElement(MenuElement $startElement = null)
{
$this->startElement = $startElement;
if ($startElement && !in_array($startElement, $this->elements, true)) {
array_push($this->elements, $startElement);
}
return $this;
} | [
"public",
"function",
"setStartElement",
"(",
"MenuElement",
"$",
"startElement",
"=",
"null",
")",
"{",
"$",
"this",
"->",
"startElement",
"=",
"$",
"startElement",
";",
"if",
"(",
"$",
"startElement",
"&&",
"!",
"in_array",
"(",
"$",
"startElement",
",",
... | Set the Element to start with
@api
@param MenuElement $startElement Start Element
@return static | [
"Set",
"the",
"Element",
"to",
"start",
"with"
] | train | https://github.com/steeffeen/FancyManiaLinks/blob/227b0759306f0a3c75873ba50276e4163a93bfa6/FML/Script/Features/Menu.php#L119-L126 |
steeffeen/FancyManiaLinks | FML/Script/Features/Menu.php | Menu.getElementsArrayText | protected function getElementsArrayText()
{
$elements = array();
foreach ($this->elements as $element) {
$elementId = $element->getItem()
->getId();
$elements[$elementId] = $element->getControl()
... | php | protected function getElementsArrayText()
{
$elements = array();
foreach ($this->elements as $element) {
$elementId = $element->getItem()
->getId();
$elements[$elementId] = $element->getControl()
... | [
"protected",
"function",
"getElementsArrayText",
"(",
")",
"{",
"$",
"elements",
"=",
"array",
"(",
")",
";",
"foreach",
"(",
"$",
"this",
"->",
"elements",
"as",
"$",
"element",
")",
"{",
"$",
"elementId",
"=",
"$",
"element",
"->",
"getItem",
"(",
")... | Build the array text for the Elements
@return string | [
"Build",
"the",
"array",
"text",
"for",
"the",
"Elements"
] | train | https://github.com/steeffeen/FancyManiaLinks/blob/227b0759306f0a3c75873ba50276e4163a93bfa6/FML/Script/Features/Menu.php#L172-L182 |
benmanu/silverstripe-knowledgebase | code/extensions/FAQRelatedArticlesExtension.php | FAQRelatedArticlesExtension.getTagNameList | public function getTagNameList()
{
$tags = $this->owner->Tags();
$names = [];
foreach ($tags as $tag) {
$names[] = $tag->Name;
}
return implode(', ', $names);
} | php | public function getTagNameList()
{
$tags = $this->owner->Tags();
$names = [];
foreach ($tags as $tag) {
$names[] = $tag->Name;
}
return implode(', ', $names);
} | [
"public",
"function",
"getTagNameList",
"(",
")",
"{",
"$",
"tags",
"=",
"$",
"this",
"->",
"owner",
"->",
"Tags",
"(",
")",
";",
"$",
"names",
"=",
"[",
"]",
";",
"foreach",
"(",
"$",
"tags",
"as",
"$",
"tag",
")",
"{",
"$",
"names",
"[",
"]",... | Helper to get a comma separated list of all the associated tags.
@return string | [
"Helper",
"to",
"get",
"a",
"comma",
"separated",
"list",
"of",
"all",
"the",
"associated",
"tags",
"."
] | train | https://github.com/benmanu/silverstripe-knowledgebase/blob/db19bfd4836f43da17ab52e8b53e72a11be64210/code/extensions/FAQRelatedArticlesExtension.php#L45-L55 |
benmanu/silverstripe-knowledgebase | code/extensions/FAQRelatedArticlesExtension.php | FAQRelatedArticlesExtension.getRelatedFAQs | public function getRelatedFAQs($limit = null)
{
$tags = $this->owner->Tags();
if ($tags->count() == 0) {
return null;
}
// find any FAQ that has one of the same tags
$faqs = FAQ::get()
->innerJoin('FAQ_Tags', '"FAQ"."ID" = "FAQ_Tags"."FAQID"')
... | php | public function getRelatedFAQs($limit = null)
{
$tags = $this->owner->Tags();
if ($tags->count() == 0) {
return null;
}
// find any FAQ that has one of the same tags
$faqs = FAQ::get()
->innerJoin('FAQ_Tags', '"FAQ"."ID" = "FAQ_Tags"."FAQID"')
... | [
"public",
"function",
"getRelatedFAQs",
"(",
"$",
"limit",
"=",
"null",
")",
"{",
"$",
"tags",
"=",
"$",
"this",
"->",
"owner",
"->",
"Tags",
"(",
")",
";",
"if",
"(",
"$",
"tags",
"->",
"count",
"(",
")",
"==",
"0",
")",
"{",
"return",
"null",
... | Helper to get all the FAQ articles that are tagged with the same
tags.
@return DataList|null | [
"Helper",
"to",
"get",
"all",
"the",
"FAQ",
"articles",
"that",
"are",
"tagged",
"with",
"the",
"same",
"tags",
"."
] | train | https://github.com/benmanu/silverstripe-knowledgebase/blob/db19bfd4836f43da17ab52e8b53e72a11be64210/code/extensions/FAQRelatedArticlesExtension.php#L63-L83 |
2amigos/yiifoundation | widgets/Dropdown.php | Dropdown.init | public function init()
{
$this->assets = array(
'js' => YII_DEBUG ? 'foundation/foundation.dropdown.js' : 'foundation.min.js'
);
Html::addCssClass($this->htmlOptions, Enum::DROPDOWN_LIST);
ArrayHelper::addValue('data-dropdown-content', '-', $this->htmlOptions);
... | php | public function init()
{
$this->assets = array(
'js' => YII_DEBUG ? 'foundation/foundation.dropdown.js' : 'foundation.min.js'
);
Html::addCssClass($this->htmlOptions, Enum::DROPDOWN_LIST);
ArrayHelper::addValue('data-dropdown-content', '-', $this->htmlOptions);
... | [
"public",
"function",
"init",
"(",
")",
"{",
"$",
"this",
"->",
"assets",
"=",
"array",
"(",
"'js'",
"=>",
"YII_DEBUG",
"?",
"'foundation/foundation.dropdown.js'",
":",
"'foundation.min.js'",
")",
";",
"Html",
"::",
"addCssClass",
"(",
"$",
"this",
"->",
"ht... | Initializes the widget | [
"Initializes",
"the",
"widget"
] | train | https://github.com/2amigos/yiifoundation/blob/49bed0d3ca1a9bac9299000e48a2661bdc8f9a29/widgets/Dropdown.php#L53-L67 |
2amigos/yiifoundation | widgets/Dropdown.php | Dropdown.renderItems | protected function renderItems()
{
$lines = array();
if ($this->type === Enum::DROPDOWN_CONTENT) {
$lines[] = $this->dropdownContent;
}
if ($this->type === Enum::DROPDOWN_LIST) {
foreach ($this->items as $item) {
if (is_string($item)) {
... | php | protected function renderItems()
{
$lines = array();
if ($this->type === Enum::DROPDOWN_CONTENT) {
$lines[] = $this->dropdownContent;
}
if ($this->type === Enum::DROPDOWN_LIST) {
foreach ($this->items as $item) {
if (is_string($item)) {
... | [
"protected",
"function",
"renderItems",
"(",
")",
"{",
"$",
"lines",
"=",
"array",
"(",
")",
";",
"if",
"(",
"$",
"this",
"->",
"type",
"===",
"Enum",
"::",
"DROPDOWN_CONTENT",
")",
"{",
"$",
"lines",
"[",
"]",
"=",
"$",
"this",
"->",
"dropdownConten... | Renders dropdown items
@return string
@throws InvalidConfigException | [
"Renders",
"dropdown",
"items"
] | train | https://github.com/2amigos/yiifoundation/blob/49bed0d3ca1a9bac9299000e48a2661bdc8f9a29/widgets/Dropdown.php#L82-L109 |
JBZoo/Less | src/Driver/Gpeasy.php | Gpeasy.setImportPath | public function setImportPath($fullPath, $relPath = null)
{
$this->_initCompiler();
$relPath = $relPath ?: $this->_options->get('root_url');
if (!FS::isDir($fullPath)) {
throw new Exception('Undefined import path: ' . $fullPath);
}
$importPaths = \Less_Parser::... | php | public function setImportPath($fullPath, $relPath = null)
{
$this->_initCompiler();
$relPath = $relPath ?: $this->_options->get('root_url');
if (!FS::isDir($fullPath)) {
throw new Exception('Undefined import path: ' . $fullPath);
}
$importPaths = \Less_Parser::... | [
"public",
"function",
"setImportPath",
"(",
"$",
"fullPath",
",",
"$",
"relPath",
"=",
"null",
")",
"{",
"$",
"this",
"->",
"_initCompiler",
"(",
")",
";",
"$",
"relPath",
"=",
"$",
"relPath",
"?",
":",
"$",
"this",
"->",
"_options",
"->",
"get",
"("... | {@inheritdoc} | [
"{"
] | train | https://github.com/JBZoo/Less/blob/9e9c41e3c7b76222c0d81379dead222413f2f042/src/Driver/Gpeasy.php#L102-L117 |
ClanCats/Core | src/bundles/Session/CCSession.php | CCSession.valid_fingerprint | public static function valid_fingerprint( $fingerprint = null, $name = null )
{
return Manager::create( $name )->valid_fingerprint( $fingerprint );
} | php | public static function valid_fingerprint( $fingerprint = null, $name = null )
{
return Manager::create( $name )->valid_fingerprint( $fingerprint );
} | [
"public",
"static",
"function",
"valid_fingerprint",
"(",
"$",
"fingerprint",
"=",
"null",
",",
"$",
"name",
"=",
"null",
")",
"{",
"return",
"Manager",
"::",
"create",
"(",
"$",
"name",
")",
"->",
"valid_fingerprint",
"(",
"$",
"fingerprint",
")",
";",
... | Check if the given fingerprint or the default fingerprint
parameter matches the curent session fingerprint.
@param string $manager
@return string | [
"Check",
"if",
"the",
"given",
"fingerprint",
"or",
"the",
"default",
"fingerprint",
"parameter",
"matches",
"the",
"curent",
"session",
"fingerprint",
"."
] | train | https://github.com/ClanCats/Core/blob/9f6ec72c1a439de4b253d0223f1029f7f85b6ef8/src/bundles/Session/CCSession.php#L43-L46 |
ClanCats/Core | src/bundles/Session/CCSession.php | CCSession.set | public static function set( $key, $value, $manager = null )
{
return Manager::create( $manager )->set( $key, $value );
} | php | public static function set( $key, $value, $manager = null )
{
return Manager::create( $manager )->set( $key, $value );
} | [
"public",
"static",
"function",
"set",
"(",
"$",
"key",
",",
"$",
"value",
",",
"$",
"manager",
"=",
"null",
")",
"{",
"return",
"Manager",
"::",
"create",
"(",
"$",
"manager",
")",
"->",
"set",
"(",
"$",
"key",
",",
"$",
"value",
")",
";",
"}"
] | Set a value on the session
@param string $key
@param string $value
@param string $manager
@return Session\Manager | [
"Set",
"a",
"value",
"on",
"the",
"session"
] | train | https://github.com/ClanCats/Core/blob/9f6ec72c1a439de4b253d0223f1029f7f85b6ef8/src/bundles/Session/CCSession.php#L82-L85 |
ClanCats/Core | src/bundles/Session/CCSession.php | CCSession.add | public static function add( $key, $value, $manager = null )
{
return Manager::create( $manager )->add( $key, $value );
} | php | public static function add( $key, $value, $manager = null )
{
return Manager::create( $manager )->add( $key, $value );
} | [
"public",
"static",
"function",
"add",
"(",
"$",
"key",
",",
"$",
"value",
",",
"$",
"manager",
"=",
"null",
")",
"{",
"return",
"Manager",
"::",
"create",
"(",
"$",
"manager",
")",
"->",
"add",
"(",
"$",
"key",
",",
"$",
"value",
")",
";",
"}"
] | Similar to add but forces the element to be an array
and appends an item.
@param string $key
@param string $value
@param string $manager
@return Session\Manager | [
"Similar",
"to",
"add",
"but",
"forces",
"the",
"element",
"to",
"be",
"an",
"array",
"and",
"appends",
"an",
"item",
"."
] | train | https://github.com/ClanCats/Core/blob/9f6ec72c1a439de4b253d0223f1029f7f85b6ef8/src/bundles/Session/CCSession.php#L96-L99 |
webforge-labs/psc-cms | lib/Psc/Doctrine/UniqueEntityHydrator.php | UniqueEntityHydrator.getEntity | public function getEntity(Array $fieldsData) {
$qb = $this->getQueryBuilder();
$qFields = array_keys($this->queryFields);
// short track querying if standard case: only id
if ($qFields === array('id')) {
// this saves a query, because the qb->getQuery is executed everytime, ever ever
re... | php | public function getEntity(Array $fieldsData) {
$qb = $this->getQueryBuilder();
$qFields = array_keys($this->queryFields);
// short track querying if standard case: only id
if ($qFields === array('id')) {
// this saves a query, because the qb->getQuery is executed everytime, ever ever
re... | [
"public",
"function",
"getEntity",
"(",
"Array",
"$",
"fieldsData",
")",
"{",
"$",
"qb",
"=",
"$",
"this",
"->",
"getQueryBuilder",
"(",
")",
";",
"$",
"qFields",
"=",
"array_keys",
"(",
"$",
"this",
"->",
"queryFields",
")",
";",
"// short track querying ... | Hydriert das Entity aus einem Array mit Daten für Primary Keys oder Unique Constraints
es wird NULL zurückgegeben wenn kein UniqueConstraint und kein Primary Key matched
@return Psc\Doctrine\Entity|NULL
@TODO Psc\Doctrine\QueryException fangen und erklären was fehlt / was geegeben ist | [
"Hydriert",
"das",
"Entity",
"aus",
"einem",
"Array",
"mit",
"Daten",
"für",
"Primary",
"Keys",
"oder",
"Unique",
"Constraints"
] | train | https://github.com/webforge-labs/psc-cms/blob/467bfa2547e6b4fa487d2d7f35fa6cc618dbc763/lib/Psc/Doctrine/UniqueEntityHydrator.php#L46-L79 |
slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseUserCustomerRelationPeer.php | BaseUserCustomerRelationPeer.getFieldNames | public static function getFieldNames($type = BasePeer::TYPE_PHPNAME)
{
if (!array_key_exists($type, UserCustomerRelationPeer::$fieldNames)) {
throw new PropelException('Method getFieldNames() expects the parameter $type to be one of the class constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUD... | php | public static function getFieldNames($type = BasePeer::TYPE_PHPNAME)
{
if (!array_key_exists($type, UserCustomerRelationPeer::$fieldNames)) {
throw new PropelException('Method getFieldNames() expects the parameter $type to be one of the class constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUD... | [
"public",
"static",
"function",
"getFieldNames",
"(",
"$",
"type",
"=",
"BasePeer",
"::",
"TYPE_PHPNAME",
")",
"{",
"if",
"(",
"!",
"array_key_exists",
"(",
"$",
"type",
",",
"UserCustomerRelationPeer",
"::",
"$",
"fieldNames",
")",
")",
"{",
"throw",
"new",... | Returns an array of field names.
@param string $type The type of fieldnames to return:
One of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME
BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM
@return array A list of field names
@throws PropelException - i... | [
"Returns",
"an",
"array",
"of",
"field",
"names",
"."
] | train | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseUserCustomerRelationPeer.php#L123-L130 |
slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseUserCustomerRelationPeer.php | BaseUserCustomerRelationPeer.addSelectColumns | public static function addSelectColumns(Criteria $criteria, $alias = null)
{
if (null === $alias) {
$criteria->addSelectColumn(UserCustomerRelationPeer::ID);
$criteria->addSelectColumn(UserCustomerRelationPeer::USER_ID);
$criteria->addSelectColumn(UserCustomerRelationPeer... | php | public static function addSelectColumns(Criteria $criteria, $alias = null)
{
if (null === $alias) {
$criteria->addSelectColumn(UserCustomerRelationPeer::ID);
$criteria->addSelectColumn(UserCustomerRelationPeer::USER_ID);
$criteria->addSelectColumn(UserCustomerRelationPeer... | [
"public",
"static",
"function",
"addSelectColumns",
"(",
"Criteria",
"$",
"criteria",
",",
"$",
"alias",
"=",
"null",
")",
"{",
"if",
"(",
"null",
"===",
"$",
"alias",
")",
"{",
"$",
"criteria",
"->",
"addSelectColumn",
"(",
"UserCustomerRelationPeer",
"::",... | Add all the columns needed to create a new object.
Note: any columns that were marked with lazyLoad="true" in the
XML schema will not be added to the select list and only loaded
on demand.
@param Criteria $criteria object containing the columns to add.
@param string $alias optional table alias
@throws ... | [
"Add",
"all",
"the",
"columns",
"needed",
"to",
"create",
"a",
"new",
"object",
"."
] | train | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseUserCustomerRelationPeer.php#L161-L172 |
slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseUserCustomerRelationPeer.php | BaseUserCustomerRelationPeer.getInstanceFromPool | public static function getInstanceFromPool($key)
{
if (Propel::isInstancePoolingEnabled()) {
if (isset(UserCustomerRelationPeer::$instances[$key])) {
return UserCustomerRelationPeer::$instances[$key];
}
}
return null; // just to be explicit
} | php | public static function getInstanceFromPool($key)
{
if (Propel::isInstancePoolingEnabled()) {
if (isset(UserCustomerRelationPeer::$instances[$key])) {
return UserCustomerRelationPeer::$instances[$key];
}
}
return null; // just to be explicit
} | [
"public",
"static",
"function",
"getInstanceFromPool",
"(",
"$",
"key",
")",
"{",
"if",
"(",
"Propel",
"::",
"isInstancePoolingEnabled",
"(",
")",
")",
"{",
"if",
"(",
"isset",
"(",
"UserCustomerRelationPeer",
"::",
"$",
"instances",
"[",
"$",
"key",
"]",
... | Retrieves a string version of the primary key from the DB resultset row that can be used to uniquely identify a row in this table.
For tables with a single-column primary key, that simple pkey value will be returned. For tables with
a multi-column primary key, a serialize()d version of the primary key will be returne... | [
"Retrieves",
"a",
"string",
"version",
"of",
"the",
"primary",
"key",
"from",
"the",
"DB",
"resultset",
"row",
"that",
"can",
"be",
"used",
"to",
"uniquely",
"identify",
"a",
"row",
"in",
"this",
"table",
"."
] | train | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseUserCustomerRelationPeer.php#L343-L352 |
slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseUserCustomerRelationPeer.php | BaseUserCustomerRelationPeer.getPrimaryKeyHashFromRow | public static function getPrimaryKeyHashFromRow($row, $startcol = 0)
{
// If the PK cannot be derived from the row, return null.
if ($row[$startcol] === null) {
return null;
}
return (string) $row[$startcol];
} | php | public static function getPrimaryKeyHashFromRow($row, $startcol = 0)
{
// If the PK cannot be derived from the row, return null.
if ($row[$startcol] === null) {
return null;
}
return (string) $row[$startcol];
} | [
"public",
"static",
"function",
"getPrimaryKeyHashFromRow",
"(",
"$",
"row",
",",
"$",
"startcol",
"=",
"0",
")",
"{",
"// If the PK cannot be derived from the row, return null.",
"if",
"(",
"$",
"row",
"[",
"$",
"startcol",
"]",
"===",
"null",
")",
"{",
"return... | Retrieves a string version of the primary key from the DB resultset row that can be used to uniquely identify a row in this table.
For tables with a single-column primary key, that simple pkey value will be returned. For tables with
a multi-column primary key, a serialize()d version of the primary key will be returne... | [
"Retrieves",
"a",
"string",
"version",
"of",
"the",
"primary",
"key",
"from",
"the",
"DB",
"resultset",
"row",
"that",
"can",
"be",
"used",
"to",
"uniquely",
"identify",
"a",
"row",
"in",
"this",
"table",
"."
] | train | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseUserCustomerRelationPeer.php#L387-L395 |
slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseUserCustomerRelationPeer.php | BaseUserCustomerRelationPeer.buildTableMap | public static function buildTableMap()
{
$dbMap = Propel::getDatabaseMap(BaseUserCustomerRelationPeer::DATABASE_NAME);
if (!$dbMap->hasTable(BaseUserCustomerRelationPeer::TABLE_NAME)) {
$dbMap->addTableObject(new \Slashworks\AppBundle\Model\map\UserCustomerRelationTableMap());
}
} | php | public static function buildTableMap()
{
$dbMap = Propel::getDatabaseMap(BaseUserCustomerRelationPeer::DATABASE_NAME);
if (!$dbMap->hasTable(BaseUserCustomerRelationPeer::TABLE_NAME)) {
$dbMap->addTableObject(new \Slashworks\AppBundle\Model\map\UserCustomerRelationTableMap());
}
} | [
"public",
"static",
"function",
"buildTableMap",
"(",
")",
"{",
"$",
"dbMap",
"=",
"Propel",
"::",
"getDatabaseMap",
"(",
"BaseUserCustomerRelationPeer",
"::",
"DATABASE_NAME",
")",
";",
"if",
"(",
"!",
"$",
"dbMap",
"->",
"hasTable",
"(",
"BaseUserCustomerRelat... | Add a TableMap instance to the database for this peer class. | [
"Add",
"a",
"TableMap",
"instance",
"to",
"the",
"database",
"for",
"this",
"peer",
"class",
"."
] | train | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseUserCustomerRelationPeer.php#L1117-L1123 |
slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseUserCustomerRelationPeer.php | BaseUserCustomerRelationPeer.doDeleteAll | public static function doDeleteAll(PropelPDO $con = null)
{
if ($con === null) {
$con = Propel::getConnection(UserCustomerRelationPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
}
$affectedRows = 0; // initialize var to track total num of affected rows
try {
/... | php | public static function doDeleteAll(PropelPDO $con = null)
{
if ($con === null) {
$con = Propel::getConnection(UserCustomerRelationPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
}
$affectedRows = 0; // initialize var to track total num of affected rows
try {
/... | [
"public",
"static",
"function",
"doDeleteAll",
"(",
"PropelPDO",
"$",
"con",
"=",
"null",
")",
"{",
"if",
"(",
"$",
"con",
"===",
"null",
")",
"{",
"$",
"con",
"=",
"Propel",
"::",
"getConnection",
"(",
"UserCustomerRelationPeer",
"::",
"DATABASE_NAME",
",... | Deletes all rows from the user_customer_relation table.
@param PropelPDO $con the connection to use
@return int The number of affected rows (if supported by underlying database driver).
@throws PropelException | [
"Deletes",
"all",
"rows",
"from",
"the",
"user_customer_relation",
"table",
"."
] | train | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseUserCustomerRelationPeer.php#L1225-L1248 |
slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseUserCustomerRelationPeer.php | BaseUserCustomerRelationPeer.doDelete | public static function doDelete($values, PropelPDO $con = null)
{
if ($con === null) {
$con = Propel::getConnection(UserCustomerRelationPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
}
if ($values instanceof Criteria) {
// invalidate the cache for all objects of th... | php | public static function doDelete($values, PropelPDO $con = null)
{
if ($con === null) {
$con = Propel::getConnection(UserCustomerRelationPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
}
if ($values instanceof Criteria) {
// invalidate the cache for all objects of th... | [
"public",
"static",
"function",
"doDelete",
"(",
"$",
"values",
",",
"PropelPDO",
"$",
"con",
"=",
"null",
")",
"{",
"if",
"(",
"$",
"con",
"===",
"null",
")",
"{",
"$",
"con",
"=",
"Propel",
"::",
"getConnection",
"(",
"UserCustomerRelationPeer",
"::",
... | Performs a DELETE on the database, given a UserCustomerRelation or Criteria object OR a primary key value.
@param mixed $values Criteria or UserCustomerRelation object or primary key or array of primary keys
which is used to create the DELETE statement
@param PropelPDO $con the connection to use
@return int ... | [
"Performs",
"a",
"DELETE",
"on",
"the",
"database",
"given",
"a",
"UserCustomerRelation",
"or",
"Criteria",
"object",
"OR",
"a",
"primary",
"key",
"value",
"."
] | train | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseUserCustomerRelationPeer.php#L1261-L1307 |
slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseUserCustomerRelationPeer.php | BaseUserCustomerRelationPeer.doValidate | public static function doValidate($obj, $cols = null)
{
$columns = array();
if ($cols) {
$dbMap = Propel::getDatabaseMap(UserCustomerRelationPeer::DATABASE_NAME);
$tableMap = $dbMap->getTable(UserCustomerRelationPeer::TABLE_NAME);
if (! is_array($cols)) {
... | php | public static function doValidate($obj, $cols = null)
{
$columns = array();
if ($cols) {
$dbMap = Propel::getDatabaseMap(UserCustomerRelationPeer::DATABASE_NAME);
$tableMap = $dbMap->getTable(UserCustomerRelationPeer::TABLE_NAME);
if (! is_array($cols)) {
... | [
"public",
"static",
"function",
"doValidate",
"(",
"$",
"obj",
",",
"$",
"cols",
"=",
"null",
")",
"{",
"$",
"columns",
"=",
"array",
"(",
")",
";",
"if",
"(",
"$",
"cols",
")",
"{",
"$",
"dbMap",
"=",
"Propel",
"::",
"getDatabaseMap",
"(",
"UserCu... | Validates all modified columns of given UserCustomerRelation object.
If parameter $columns is either a single column name or an array of column names
than only those columns are validated.
NOTICE: This does not apply to primary or foreign keys for now.
@param UserCustomerRelation $obj The object to validate.
@param ... | [
"Validates",
"all",
"modified",
"columns",
"of",
"given",
"UserCustomerRelation",
"object",
".",
"If",
"parameter",
"$columns",
"is",
"either",
"a",
"single",
"column",
"name",
"or",
"an",
"array",
"of",
"column",
"names",
"than",
"only",
"those",
"columns",
"... | train | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseUserCustomerRelationPeer.php#L1321-L1344 |
slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseUserCustomerRelationPeer.php | BaseUserCustomerRelationPeer.retrieveByPK | public static function retrieveByPK($pk, PropelPDO $con = null)
{
if (null !== ($obj = UserCustomerRelationPeer::getInstanceFromPool((string) $pk))) {
return $obj;
}
if ($con === null) {
$con = Propel::getConnection(UserCustomerRelationPeer::DATABASE_NAME, Propel::C... | php | public static function retrieveByPK($pk, PropelPDO $con = null)
{
if (null !== ($obj = UserCustomerRelationPeer::getInstanceFromPool((string) $pk))) {
return $obj;
}
if ($con === null) {
$con = Propel::getConnection(UserCustomerRelationPeer::DATABASE_NAME, Propel::C... | [
"public",
"static",
"function",
"retrieveByPK",
"(",
"$",
"pk",
",",
"PropelPDO",
"$",
"con",
"=",
"null",
")",
"{",
"if",
"(",
"null",
"!==",
"(",
"$",
"obj",
"=",
"UserCustomerRelationPeer",
"::",
"getInstanceFromPool",
"(",
"(",
"string",
")",
"$",
"p... | Retrieve a single object by pkey.
@param int $pk the primary key.
@param PropelPDO $con the connection to use
@return UserCustomerRelation | [
"Retrieve",
"a",
"single",
"object",
"by",
"pkey",
"."
] | train | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseUserCustomerRelationPeer.php#L1353-L1370 |
slashworks/control-bundle | src/Slashworks/AppBundle/Model/om/BaseUserCustomerRelationPeer.php | BaseUserCustomerRelationPeer.retrieveByPKs | public static function retrieveByPKs($pks, PropelPDO $con = null)
{
if ($con === null) {
$con = Propel::getConnection(UserCustomerRelationPeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
$objs = null;
if (empty($pks)) {
$objs = array();
} else {
... | php | public static function retrieveByPKs($pks, PropelPDO $con = null)
{
if ($con === null) {
$con = Propel::getConnection(UserCustomerRelationPeer::DATABASE_NAME, Propel::CONNECTION_READ);
}
$objs = null;
if (empty($pks)) {
$objs = array();
} else {
... | [
"public",
"static",
"function",
"retrieveByPKs",
"(",
"$",
"pks",
",",
"PropelPDO",
"$",
"con",
"=",
"null",
")",
"{",
"if",
"(",
"$",
"con",
"===",
"null",
")",
"{",
"$",
"con",
"=",
"Propel",
"::",
"getConnection",
"(",
"UserCustomerRelationPeer",
"::"... | Retrieve multiple objects by pkey.
@param array $pks List of primary keys
@param PropelPDO $con the connection to use
@return UserCustomerRelation[]
@throws PropelException Any exceptions caught during processing will be
rethrown wrapped into a PropelException. | [
"Retrieve",
"multiple",
"objects",
"by",
"pkey",
"."
] | train | https://github.com/slashworks/control-bundle/blob/2ba86d96f1f41f9424e2229c4e2b13017e973f89/src/Slashworks/AppBundle/Model/om/BaseUserCustomerRelationPeer.php#L1381-L1397 |
webforge-labs/psc-cms | lib/PHPWord/PHPWord/Section/Settings.php | PHPWord_Section_Settings.setSettingValue | public function setSettingValue($key, $value) {
if($key == '_orientation' && $value == 'landscape') {
$this->setLandscape();
} elseif($key == '_orientation' && is_null($value)) {
$this->setPortrait();
} elseif($key == '_borderSize') {
$this->setBorderSize($value);
} elseif($key == '_borderColor') {
... | php | public function setSettingValue($key, $value) {
if($key == '_orientation' && $value == 'landscape') {
$this->setLandscape();
} elseif($key == '_orientation' && is_null($value)) {
$this->setPortrait();
} elseif($key == '_borderSize') {
$this->setBorderSize($value);
} elseif($key == '_borderColor') {
... | [
"public",
"function",
"setSettingValue",
"(",
"$",
"key",
",",
"$",
"value",
")",
"{",
"if",
"(",
"$",
"key",
"==",
"'_orientation'",
"&&",
"$",
"value",
"==",
"'landscape'",
")",
"{",
"$",
"this",
"->",
"setLandscape",
"(",
")",
";",
"}",
"elseif",
... | Set Setting Value
@param string $key
@param string $value | [
"Set",
"Setting",
"Value"
] | train | https://github.com/webforge-labs/psc-cms/blob/467bfa2547e6b4fa487d2d7f35fa6cc618dbc763/lib/PHPWord/PHPWord/Section/Settings.php#L184-L196 |
webforge-labs/psc-cms | lib/PHPWord/PHPWord/Section/Settings.php | PHPWord_Section_Settings.setLandscape | public function setLandscape() {
$this->_orientation = 'landscape';
$this->_pageSizeW = $this->_defaultPageSizeH;
$this->_pageSizeH = $this->_defaultPageSizeW;
} | php | public function setLandscape() {
$this->_orientation = 'landscape';
$this->_pageSizeW = $this->_defaultPageSizeH;
$this->_pageSizeH = $this->_defaultPageSizeW;
} | [
"public",
"function",
"setLandscape",
"(",
")",
"{",
"$",
"this",
"->",
"_orientation",
"=",
"'landscape'",
";",
"$",
"this",
"->",
"_pageSizeW",
"=",
"$",
"this",
"->",
"_defaultPageSizeH",
";",
"$",
"this",
"->",
"_pageSizeH",
"=",
"$",
"this",
"->",
"... | Set Landscape Orientation | [
"Set",
"Landscape",
"Orientation"
] | train | https://github.com/webforge-labs/psc-cms/blob/467bfa2547e6b4fa487d2d7f35fa6cc618dbc763/lib/PHPWord/PHPWord/Section/Settings.php#L277-L281 |
webforge-labs/psc-cms | lib/PHPWord/PHPWord/Section/Settings.php | PHPWord_Section_Settings.setPortrait | public function setPortrait() {
$this->_orientation = null;
$this->_pageSizeW = $this->_defaultPageSizeW;
$this->_pageSizeH = $this->_defaultPageSizeH;
} | php | public function setPortrait() {
$this->_orientation = null;
$this->_pageSizeW = $this->_defaultPageSizeW;
$this->_pageSizeH = $this->_defaultPageSizeH;
} | [
"public",
"function",
"setPortrait",
"(",
")",
"{",
"$",
"this",
"->",
"_orientation",
"=",
"null",
";",
"$",
"this",
"->",
"_pageSizeW",
"=",
"$",
"this",
"->",
"_defaultPageSizeW",
";",
"$",
"this",
"->",
"_pageSizeH",
"=",
"$",
"this",
"->",
"_default... | Set Portrait Orientation | [
"Set",
"Portrait",
"Orientation"
] | train | https://github.com/webforge-labs/psc-cms/blob/467bfa2547e6b4fa487d2d7f35fa6cc618dbc763/lib/PHPWord/PHPWord/Section/Settings.php#L286-L290 |
webforge-labs/psc-cms | lib/PHPWord/PHPWord/Section/Settings.php | PHPWord_Section_Settings.getBorderSize | public function getBorderSize() {
$t = $this->getBorderTopSize();
$l = $this->getBorderLeftSize();
$r = $this->getBorderRightSize();
$b = $this->getBorderBottomSize();
return array($t, $l, $r, $b);
} | php | public function getBorderSize() {
$t = $this->getBorderTopSize();
$l = $this->getBorderLeftSize();
$r = $this->getBorderRightSize();
$b = $this->getBorderBottomSize();
return array($t, $l, $r, $b);
} | [
"public",
"function",
"getBorderSize",
"(",
")",
"{",
"$",
"t",
"=",
"$",
"this",
"->",
"getBorderTopSize",
"(",
")",
";",
"$",
"l",
"=",
"$",
"this",
"->",
"getBorderLeftSize",
"(",
")",
";",
"$",
"r",
"=",
"$",
"this",
"->",
"getBorderRightSize",
"... | Get Border Size
@return array | [
"Get",
"Border",
"Size"
] | train | https://github.com/webforge-labs/psc-cms/blob/467bfa2547e6b4fa487d2d7f35fa6cc618dbc763/lib/PHPWord/PHPWord/Section/Settings.php#L336-L343 |
webforge-labs/psc-cms | lib/PHPWord/PHPWord/Section/Settings.php | PHPWord_Section_Settings.setBorderColor | public function setBorderColor($pValue = null) {
$this->_borderTopColor = $pValue;
$this->_borderLeftColor = $pValue;
$this->_borderRightColor = $pValue;
$this->_borderBottomColor = $pValue;
} | php | public function setBorderColor($pValue = null) {
$this->_borderTopColor = $pValue;
$this->_borderLeftColor = $pValue;
$this->_borderRightColor = $pValue;
$this->_borderBottomColor = $pValue;
} | [
"public",
"function",
"setBorderColor",
"(",
"$",
"pValue",
"=",
"null",
")",
"{",
"$",
"this",
"->",
"_borderTopColor",
"=",
"$",
"pValue",
";",
"$",
"this",
"->",
"_borderLeftColor",
"=",
"$",
"pValue",
";",
"$",
"this",
"->",
"_borderRightColor",
"=",
... | Set Border Color
@param string $pValue | [
"Set",
"Border",
"Color"
] | train | https://github.com/webforge-labs/psc-cms/blob/467bfa2547e6b4fa487d2d7f35fa6cc618dbc763/lib/PHPWord/PHPWord/Section/Settings.php#L350-L355 |
webforge-labs/psc-cms | lib/PHPWord/PHPWord/Section/Settings.php | PHPWord_Section_Settings.getBorderColor | public function getBorderColor() {
$t = $this->getBorderTopColor();
$l = $this->getBorderLeftColor();
$r = $this->getBorderRightColor();
$b = $this->getBorderBottomColor();
return array($t, $l, $r, $b);
} | php | public function getBorderColor() {
$t = $this->getBorderTopColor();
$l = $this->getBorderLeftColor();
$r = $this->getBorderRightColor();
$b = $this->getBorderBottomColor();
return array($t, $l, $r, $b);
} | [
"public",
"function",
"getBorderColor",
"(",
")",
"{",
"$",
"t",
"=",
"$",
"this",
"->",
"getBorderTopColor",
"(",
")",
";",
"$",
"l",
"=",
"$",
"this",
"->",
"getBorderLeftColor",
"(",
")",
";",
"$",
"r",
"=",
"$",
"this",
"->",
"getBorderRightColor",... | Get Border Color
@return array | [
"Get",
"Border",
"Color"
] | train | https://github.com/webforge-labs/psc-cms/blob/467bfa2547e6b4fa487d2d7f35fa6cc618dbc763/lib/PHPWord/PHPWord/Section/Settings.php#L362-L369 |
miisieq/InfaktClient | src/Infakt/Infakt.php | Infakt.getRepository | public function getRepository(string $className): AbstractObjectRepository
{
$className = 'Infakt\\Repository\\'.substr($className, strrpos($className, '\\') + 1).'Repository';
if (!class_exists($className)) {
throw new LogicException("There is no repository to work with class $classNam... | php | public function getRepository(string $className): AbstractObjectRepository
{
$className = 'Infakt\\Repository\\'.substr($className, strrpos($className, '\\') + 1).'Repository';
if (!class_exists($className)) {
throw new LogicException("There is no repository to work with class $classNam... | [
"public",
"function",
"getRepository",
"(",
"string",
"$",
"className",
")",
":",
"AbstractObjectRepository",
"{",
"$",
"className",
"=",
"'Infakt\\\\Repository\\\\'",
".",
"substr",
"(",
"$",
"className",
",",
"strrpos",
"(",
"$",
"className",
",",
"'\\\\'",
")... | Return object repository for a specific model class name.
@param $className
@throws LogicException
@return AbstractObjectRepository | [
"Return",
"object",
"repository",
"for",
"a",
"specific",
"model",
"class",
"name",
"."
] | train | https://github.com/miisieq/InfaktClient/blob/5f0ae58c7be32580f3c92c2a7e7a7808d83d4e81/src/Infakt/Infakt.php#L53-L62 |
miisieq/InfaktClient | src/Infakt/Infakt.php | Infakt.get | public function get(string $query): ResponseInterface
{
return $this->client->request('get', $this->buildQuery($query), ['headers' => $this->getAuthorizationHeader()]);
} | php | public function get(string $query): ResponseInterface
{
return $this->client->request('get', $this->buildQuery($query), ['headers' => $this->getAuthorizationHeader()]);
} | [
"public",
"function",
"get",
"(",
"string",
"$",
"query",
")",
":",
"ResponseInterface",
"{",
"return",
"$",
"this",
"->",
"client",
"->",
"request",
"(",
"'get'",
",",
"$",
"this",
"->",
"buildQuery",
"(",
"$",
"query",
")",
",",
"[",
"'headers'",
"=>... | Send HTTP GET request.
@param string $query
@return \Psr\Http\Message\ResponseInterface | [
"Send",
"HTTP",
"GET",
"request",
"."
] | train | https://github.com/miisieq/InfaktClient/blob/5f0ae58c7be32580f3c92c2a7e7a7808d83d4e81/src/Infakt/Infakt.php#L71-L74 |
miisieq/InfaktClient | src/Infakt/Infakt.php | Infakt.post | public function post(string $query, ?string $body = null): ResponseInterface
{
$options = [
'headers' => $this->getAuthorizationHeader(),
];
if ($body) {
$options['body'] = $body;
}
return $this->client->request('post', $this->buildQuery($query), $op... | php | public function post(string $query, ?string $body = null): ResponseInterface
{
$options = [
'headers' => $this->getAuthorizationHeader(),
];
if ($body) {
$options['body'] = $body;
}
return $this->client->request('post', $this->buildQuery($query), $op... | [
"public",
"function",
"post",
"(",
"string",
"$",
"query",
",",
"?",
"string",
"$",
"body",
"=",
"null",
")",
":",
"ResponseInterface",
"{",
"$",
"options",
"=",
"[",
"'headers'",
"=>",
"$",
"this",
"->",
"getAuthorizationHeader",
"(",
")",
",",
"]",
"... | Send HTTP POST request.
@param string $query
@param null|string $body
@return \Psr\Http\Message\ResponseInterface | [
"Send",
"HTTP",
"POST",
"request",
"."
] | train | https://github.com/miisieq/InfaktClient/blob/5f0ae58c7be32580f3c92c2a7e7a7808d83d4e81/src/Infakt/Infakt.php#L96-L107 |
ARCANEDEV/Sanitizer | src/SanitizerServiceProvider.php | SanitizerServiceProvider.registerSanitizer | private function registerSanitizer()
{
$this->singleton(Contracts\Sanitizer::class, function ($app) {
/** @var \Illuminate\Contracts\Config\Repository $config */
$config = $app['config'];
return new Factory($config->get('sanitizer.filters'));
});
$this... | php | private function registerSanitizer()
{
$this->singleton(Contracts\Sanitizer::class, function ($app) {
/** @var \Illuminate\Contracts\Config\Repository $config */
$config = $app['config'];
return new Factory($config->get('sanitizer.filters'));
});
$this... | [
"private",
"function",
"registerSanitizer",
"(",
")",
"{",
"$",
"this",
"->",
"singleton",
"(",
"Contracts",
"\\",
"Sanitizer",
"::",
"class",
",",
"function",
"(",
"$",
"app",
")",
"{",
"/** @var \\Illuminate\\Contracts\\Config\\Repository $config */",
"$",
"conf... | Register Helpers. | [
"Register",
"Helpers",
"."
] | train | https://github.com/ARCANEDEV/Sanitizer/blob/e21990ce6d881366d52a7f4e5040b07cc3ecca96/src/SanitizerServiceProvider.php#L81-L91 |
digitalkaoz/versioneye-php | src/Output/Github.php | Github.hook | public function hook(OutputInterface $output, array $response)
{
$this->printBoolean($output, 'OK', $response['success'], true === $response['success']);
} | php | public function hook(OutputInterface $output, array $response)
{
$this->printBoolean($output, 'OK', $response['success'], true === $response['success']);
} | [
"public",
"function",
"hook",
"(",
"OutputInterface",
"$",
"output",
",",
"array",
"$",
"response",
")",
"{",
"$",
"this",
"->",
"printBoolean",
"(",
"$",
"output",
",",
"'OK'",
",",
"$",
"response",
"[",
"'success'",
"]",
",",
"true",
"===",
"$",
"res... | output for hook api.
@param OutputInterface $output
@param array $response | [
"output",
"for",
"hook",
"api",
"."
] | train | https://github.com/digitalkaoz/versioneye-php/blob/7b8eb9cdc83e01138dda0e709c07e3beb6aad136/src/Output/Github.php#L31-L34 |
digitalkaoz/versioneye-php | src/Output/Github.php | Github.delete | public function delete(OutputInterface $output, array $response)
{
$this->printBoolean($output, 'OK', $response['success'], true === $response['success']);
} | php | public function delete(OutputInterface $output, array $response)
{
$this->printBoolean($output, 'OK', $response['success'], true === $response['success']);
} | [
"public",
"function",
"delete",
"(",
"OutputInterface",
"$",
"output",
",",
"array",
"$",
"response",
")",
"{",
"$",
"this",
"->",
"printBoolean",
"(",
"$",
"output",
",",
"'OK'",
",",
"$",
"response",
"[",
"'success'",
"]",
",",
"true",
"===",
"$",
"r... | output for delete api.
@param OutputInterface $output
@param array $response | [
"output",
"for",
"delete",
"api",
"."
] | train | https://github.com/digitalkaoz/versioneye-php/blob/7b8eb9cdc83e01138dda0e709c07e3beb6aad136/src/Output/Github.php#L42-L45 |
GrahamDeprecated/CMS-Core | src/Seeds/UsersGroupsTableSeeder.php | UsersGroupsTableSeeder.run | public function run()
{
DB::table('users_groups')->delete();
$this->matchUser('admin@dsmg.co.uk', 'Admins');
$this->matchUser('semiadmin@dsmg.co.uk', 'Moderators');
$this->matchUser('semiadmin@dsmg.co.uk', 'Bloggers');
$this->matchUser('semiadmin@dsmg.co.uk', 'Editors');
... | php | public function run()
{
DB::table('users_groups')->delete();
$this->matchUser('admin@dsmg.co.uk', 'Admins');
$this->matchUser('semiadmin@dsmg.co.uk', 'Moderators');
$this->matchUser('semiadmin@dsmg.co.uk', 'Bloggers');
$this->matchUser('semiadmin@dsmg.co.uk', 'Editors');
... | [
"public",
"function",
"run",
"(",
")",
"{",
"DB",
"::",
"table",
"(",
"'users_groups'",
")",
"->",
"delete",
"(",
")",
";",
"$",
"this",
"->",
"matchUser",
"(",
"'admin@dsmg.co.uk'",
",",
"'Admins'",
")",
";",
"$",
"this",
"->",
"matchUser",
"(",
"'sem... | Run the database seeding.
@return void | [
"Run",
"the",
"database",
"seeding",
"."
] | train | https://github.com/GrahamDeprecated/CMS-Core/blob/5603e2bfa2fac6cf46ca3ed62d21518f2f653675/src/Seeds/UsersGroupsTableSeeder.php#L39-L51 |
GrahamDeprecated/CMS-Core | src/Seeds/UsersGroupsTableSeeder.php | UsersGroupsTableSeeder.matchUser | protected function matchUser($email, $group)
{
return Credentials::getUserProvider()->findByLogin($email)->addGroup(Credentials::getGroupProvider()->findByName($group));
} | php | protected function matchUser($email, $group)
{
return Credentials::getUserProvider()->findByLogin($email)->addGroup(Credentials::getGroupProvider()->findByName($group));
} | [
"protected",
"function",
"matchUser",
"(",
"$",
"email",
",",
"$",
"group",
")",
"{",
"return",
"Credentials",
"::",
"getUserProvider",
"(",
")",
"->",
"findByLogin",
"(",
"$",
"email",
")",
"->",
"addGroup",
"(",
"Credentials",
"::",
"getGroupProvider",
"("... | Add the user by email to a group.
@param string $email
@param string $group
@return void | [
"Add",
"the",
"user",
"by",
"email",
"to",
"a",
"group",
"."
] | train | https://github.com/GrahamDeprecated/CMS-Core/blob/5603e2bfa2fac6cf46ca3ed62d21518f2f653675/src/Seeds/UsersGroupsTableSeeder.php#L60-L63 |
qcubed/orm | src/Codegen/CodegenBase.php | CodegenBase.prefixFromType | public static function prefixFromType($strType)
{
switch ($strType) {
case Type::ARRAY_TYPE:
return "obj";
case Type::BOOLEAN:
return "bln";
case Type::DATE_TIME:
return "dtt";
case Type::FLOAT:
r... | php | public static function prefixFromType($strType)
{
switch ($strType) {
case Type::ARRAY_TYPE:
return "obj";
case Type::BOOLEAN:
return "bln";
case Type::DATE_TIME:
return "dtt";
case Type::FLOAT:
r... | [
"public",
"static",
"function",
"prefixFromType",
"(",
"$",
"strType",
")",
"{",
"switch",
"(",
"$",
"strType",
")",
"{",
"case",
"Type",
"::",
"ARRAY_TYPE",
":",
"return",
"\"obj\"",
";",
"case",
"Type",
"::",
"BOOLEAN",
":",
"return",
"\"bln\"",
";",
"... | Returns prefix for variable according to variable type
@param string $strType The type of variable for which the prefix is needed
@return string The variable prefix
@was QString::PrefixFromType | [
"Returns",
"prefix",
"for",
"variable",
"according",
"to",
"variable",
"type"
] | train | https://github.com/qcubed/orm/blob/f320eba671f20874b1f3809c5293f8c02d5b1204/src/Codegen/CodegenBase.php#L177-L197 |
qcubed/orm | src/Codegen/CodegenBase.php | CodegenBase.getInstalledTemplatePaths | public function getInstalledTemplatePaths()
{
$dir = QCUBED_CONFIG_DIR . '/templates';
$paths = [];
if ($dir !== false) { // does the active directory exist?
foreach (scandir($dir) as $strFileName) {
if (substr($strFileName, -8) == '.inc.php') {
... | php | public function getInstalledTemplatePaths()
{
$dir = QCUBED_CONFIG_DIR . '/templates';
$paths = [];
if ($dir !== false) { // does the active directory exist?
foreach (scandir($dir) as $strFileName) {
if (substr($strFileName, -8) == '.inc.php') {
... | [
"public",
"function",
"getInstalledTemplatePaths",
"(",
")",
"{",
"$",
"dir",
"=",
"QCUBED_CONFIG_DIR",
".",
"'/templates'",
";",
"$",
"paths",
"=",
"[",
"]",
";",
"if",
"(",
"$",
"dir",
"!==",
"false",
")",
"{",
"// does the active directory exist?",
"foreach... | Return an array of paths to template files. This base class versions searches a config directory for pointers
to template files to use. This allows qcubed repos to inject templates into the codegen process.
This process is similar to how the control registry works. | [
"Return",
"an",
"array",
"of",
"paths",
"to",
"template",
"files",
".",
"This",
"base",
"class",
"versions",
"searches",
"a",
"config",
"directory",
"for",
"pointers",
"to",
"template",
"files",
"to",
"use",
".",
"This",
"allows",
"qcubed",
"repos",
"to",
... | train | https://github.com/qcubed/orm/blob/f320eba671f20874b1f3809c5293f8c02d5b1204/src/Codegen/CodegenBase.php#L205-L223 |
qcubed/orm | src/Codegen/CodegenBase.php | CodegenBase.getSettingsXml | public static function getSettingsXml()
{
$strCrLf = "\r\n";
$strToReturn = sprintf('<codegen>%s', $strCrLf);
$strToReturn .= sprintf(' <name application="%s"/>%s', Codegen::$ApplicationName, $strCrLf);
$strToReturn .= sprintf(' <render preferredRenderMethod="%s"/>%s', Codegen::$Pre... | php | public static function getSettingsXml()
{
$strCrLf = "\r\n";
$strToReturn = sprintf('<codegen>%s', $strCrLf);
$strToReturn .= sprintf(' <name application="%s"/>%s', Codegen::$ApplicationName, $strCrLf);
$strToReturn .= sprintf(' <render preferredRenderMethod="%s"/>%s', Codegen::$Pre... | [
"public",
"static",
"function",
"getSettingsXml",
"(",
")",
"{",
"$",
"strCrLf",
"=",
"\"\\r\\n\"",
";",
"$",
"strToReturn",
"=",
"sprintf",
"(",
"'<codegen>%s'",
",",
"$",
"strCrLf",
")",
";",
"$",
"strToReturn",
".=",
"sprintf",
"(",
"'\t<name application=\"... | Gets the settings in codegen_settings.xml file and returns its text without comments
@return string | [
"Gets",
"the",
"settings",
"in",
"codegen_settings",
".",
"xml",
"file",
"and",
"returns",
"its",
"text",
"without",
"comments"
] | train | https://github.com/qcubed/orm/blob/f320eba671f20874b1f3809c5293f8c02d5b1204/src/Codegen/CodegenBase.php#L230-L246 |
qcubed/orm | src/Codegen/CodegenBase.php | CodegenBase.run | public static function run($strSettingsXmlFilePath)
{
if (!defined('QCUBED_CODE_GENERATING')) {
define('QCUBED_CODE_GENERATING', true);
}
Codegen::$CodeGenArray = array();
Codegen::$SettingsFilePath = $strSettingsXmlFilePath;
if (!file_exists($strSettingsXmlFile... | php | public static function run($strSettingsXmlFilePath)
{
if (!defined('QCUBED_CODE_GENERATING')) {
define('QCUBED_CODE_GENERATING', true);
}
Codegen::$CodeGenArray = array();
Codegen::$SettingsFilePath = $strSettingsXmlFilePath;
if (!file_exists($strSettingsXmlFile... | [
"public",
"static",
"function",
"run",
"(",
"$",
"strSettingsXmlFilePath",
")",
"{",
"if",
"(",
"!",
"defined",
"(",
"'QCUBED_CODE_GENERATING'",
")",
")",
"{",
"define",
"(",
"'QCUBED_CODE_GENERATING'",
",",
"true",
")",
";",
"}",
"Codegen",
"::",
"$",
"Code... | The function which actually performs the steps for code generation
Code generation begins here.
@param string $strSettingsXmlFilePath Path to the settings file | [
"The",
"function",
"which",
"actually",
"performs",
"the",
"steps",
"for",
"code",
"generation",
"Code",
"generation",
"begins",
"here",
"."
] | train | https://github.com/qcubed/orm/blob/f320eba671f20874b1f3809c5293f8c02d5b1204/src/Codegen/CodegenBase.php#L253-L315 |
qcubed/orm | src/Codegen/CodegenBase.php | CodegenBase.lookupSetting | static public function lookupSetting($objNode, $strTagName, $strAttributeName = null, $strType = Type::STRING)
{
if ($strTagName) {
$objNode = $objNode->$strTagName;
}
if ($strAttributeName) {
switch ($strType) {
case Type::INTEGER:
... | php | static public function lookupSetting($objNode, $strTagName, $strAttributeName = null, $strType = Type::STRING)
{
if ($strTagName) {
$objNode = $objNode->$strTagName;
}
if ($strAttributeName) {
switch ($strType) {
case Type::INTEGER:
... | [
"static",
"public",
"function",
"lookupSetting",
"(",
"$",
"objNode",
",",
"$",
"strTagName",
",",
"$",
"strAttributeName",
"=",
"null",
",",
"$",
"strType",
"=",
"Type",
"::",
"STRING",
")",
"{",
"if",
"(",
"$",
"strTagName",
")",
"{",
"$",
"objNode",
... | This will lookup either the node value (if no attributename is passed in) or the attribute value
for a given Tag. Node Searches only apply from the root level of the configuration XML being passed in
(e.g. it will not be able to lookup the tag name of a grandchild of the root node)
If No Tag Name is passed in, then a... | [
"This",
"will",
"lookup",
"either",
"the",
"node",
"value",
"(",
"if",
"no",
"attributename",
"is",
"passed",
"in",
")",
"or",
"the",
"attribute",
"value",
"for",
"a",
"given",
"Tag",
".",
"Node",
"Searches",
"only",
"apply",
"from",
"the",
"root",
"leve... | train | https://github.com/qcubed/orm/blob/f320eba671f20874b1f3809c5293f8c02d5b1204/src/Codegen/CodegenBase.php#L330-L360 |
qcubed/orm | src/Codegen/CodegenBase.php | CodegenBase.generateFiles | public function generateFiles($strTemplatePrefix, $mixArgumentArray)
{
// If you are editing core templates, and getting EOF errors only on the travis build, this may be your problem. Scan your files and remove short tags.
if (Codegen::DEBUG_MODE && ini_get('short_open_tag')) {
_p("Warni... | php | public function generateFiles($strTemplatePrefix, $mixArgumentArray)
{
// If you are editing core templates, and getting EOF errors only on the travis build, this may be your problem. Scan your files and remove short tags.
if (Codegen::DEBUG_MODE && ini_get('short_open_tag')) {
_p("Warni... | [
"public",
"function",
"generateFiles",
"(",
"$",
"strTemplatePrefix",
",",
"$",
"mixArgumentArray",
")",
"{",
"// If you are editing core templates, and getting EOF errors only on the travis build, this may be your problem. Scan your files and remove short tags.",
"if",
"(",
"Codegen",
... | Given a template prefix (e.g. db_orm_, db_type_, rest_, soap_, etc.), pull
all the _*.tpl templates from any subfolders of the template prefix
in Codegen::TemplatesPath and Codegen::TemplatesPathCustom,
and call GenerateFile() on each one. If there are any template files that reside
in BOTH TemplatesPath AND Templates... | [
"Given",
"a",
"template",
"prefix",
"(",
"e",
".",
"g",
".",
"db_orm_",
"db_type_",
"rest_",
"soap_",
"etc",
".",
")",
"pull",
"all",
"the",
"_",
"*",
".",
"tpl",
"templates",
"from",
"any",
"subfolders",
"of",
"the",
"template",
"prefix",
"in",
"Codeg... | train | https://github.com/qcubed/orm/blob/f320eba671f20874b1f3809c5293f8c02d5b1204/src/Codegen/CodegenBase.php#L402-L440 |
qcubed/orm | src/Codegen/CodegenBase.php | CodegenBase.getTemplateSettings | protected function getTemplateSettings($strTemplateFilePath, &$strTemplate = null)
{
if ($strTemplate === null) {
$strTemplate = file_get_contents($strTemplateFilePath);
}
$strError = 'Template\'s first line must be <template OverwriteFlag="boolean" TargetDirectory="string" Direc... | php | protected function getTemplateSettings($strTemplateFilePath, &$strTemplate = null)
{
if ($strTemplate === null) {
$strTemplate = file_get_contents($strTemplateFilePath);
}
$strError = 'Template\'s first line must be <template OverwriteFlag="boolean" TargetDirectory="string" Direc... | [
"protected",
"function",
"getTemplateSettings",
"(",
"$",
"strTemplateFilePath",
",",
"&",
"$",
"strTemplate",
"=",
"null",
")",
"{",
"if",
"(",
"$",
"strTemplate",
"===",
"null",
")",
"{",
"$",
"strTemplate",
"=",
"file_get_contents",
"(",
"$",
"strTemplateFi... | Returns the settings of the template file as SimpleXMLElement object
@param null|string $strTemplateFilePath Path to the file
@param null|string $strTemplate Text of the template (if $strTemplateFilePath is null, this field must be string)
@deprecated
@return \SimpleXMLElement
@throws \Exception | [
"Returns",
"the",
"settings",
"of",
"the",
"template",
"file",
"as",
"SimpleXMLElement",
"object"
] | train | https://github.com/qcubed/orm/blob/f320eba671f20874b1f3809c5293f8c02d5b1204/src/Codegen/CodegenBase.php#L479-L505 |
qcubed/orm | src/Codegen/CodegenBase.php | CodegenBase.generateFile | public function generateFile($strModuleSubPath, $strTemplateFilePath, $mixArgumentArray, $blnSave = true)
{
// Setup Debug/Exception Message
if (Codegen::DEBUG_MODE) {
echo("Evaluating $strTemplateFilePath<br/>");
}
// Check to see if the template file exists, and if it ... | php | public function generateFile($strModuleSubPath, $strTemplateFilePath, $mixArgumentArray, $blnSave = true)
{
// Setup Debug/Exception Message
if (Codegen::DEBUG_MODE) {
echo("Evaluating $strTemplateFilePath<br/>");
}
// Check to see if the template file exists, and if it ... | [
"public",
"function",
"generateFile",
"(",
"$",
"strModuleSubPath",
",",
"$",
"strTemplateFilePath",
",",
"$",
"mixArgumentArray",
",",
"$",
"blnSave",
"=",
"true",
")",
"{",
"// Setup Debug/Exception Message",
"if",
"(",
"Codegen",
"::",
"DEBUG_MODE",
")",
"{",
... | Generates a php code using a template file
@param string $strModuleSubPath
@param string $strTemplateFilePath Path to the template file
@param mixed[] $mixArgumentArray
@param boolean $blnSave whether or not to actually perform the save
@throws Caller
@throws \Exception
@return mixed returns the evaluated template or... | [
"Generates",
"a",
"php",
"code",
"using",
"a",
"template",
"file"
] | train | https://github.com/qcubed/orm/blob/f320eba671f20874b1f3809c5293f8c02d5b1204/src/Codegen/CodegenBase.php#L519-L588 |
qcubed/orm | src/Codegen/CodegenBase.php | CodegenBase.setGeneratedFilePermissions | protected function setGeneratedFilePermissions($strFilePath)
{
// CHMOD to full read/write permissions (applicable only to nonwindows)
// Need to ignore error handling for this call just in case
if (strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN') {
$e = new Error\Handler();
... | php | protected function setGeneratedFilePermissions($strFilePath)
{
// CHMOD to full read/write permissions (applicable only to nonwindows)
// Need to ignore error handling for this call just in case
if (strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN') {
$e = new Error\Handler();
... | [
"protected",
"function",
"setGeneratedFilePermissions",
"(",
"$",
"strFilePath",
")",
"{",
"// CHMOD to full read/write permissions (applicable only to nonwindows)",
"// Need to ignore error handling for this call just in case",
"if",
"(",
"strtoupper",
"(",
"substr",
"(",
"PHP_OS",
... | Sets the file permissions (Linux only) for a file generated by the Code Generator
@param string $strFilePath Path of the generated file
@throws Caller | [
"Sets",
"the",
"file",
"permissions",
"(",
"Linux",
"only",
")",
"for",
"a",
"file",
"generated",
"by",
"the",
"Code",
"Generator",
"@param",
"string",
"$strFilePath",
"Path",
"of",
"the",
"generated",
"file"
] | train | https://github.com/qcubed/orm/blob/f320eba671f20874b1f3809c5293f8c02d5b1204/src/Codegen/CodegenBase.php#L596-L604 |
qcubed/orm | src/Codegen/CodegenBase.php | CodegenBase.evaluatePHP | protected function evaluatePHP($strFilename, $mixArgumentArray, &$templateSettings = null)
{
// Get all the arguments and set them locally
if ($mixArgumentArray) {
foreach ($mixArgumentArray as $strName => $mixValue) {
$$strName = $mixValue;
}
}
... | php | protected function evaluatePHP($strFilename, $mixArgumentArray, &$templateSettings = null)
{
// Get all the arguments and set them locally
if ($mixArgumentArray) {
foreach ($mixArgumentArray as $strName => $mixValue) {
$$strName = $mixValue;
}
}
... | [
"protected",
"function",
"evaluatePHP",
"(",
"$",
"strFilename",
",",
"$",
"mixArgumentArray",
",",
"&",
"$",
"templateSettings",
"=",
"null",
")",
"{",
"// Get all the arguments and set them locally",
"if",
"(",
"$",
"mixArgumentArray",
")",
"{",
"foreach",
"(",
... | Returns the evaluated PHP
@param $strFilename
@param $mixArgumentArray
@param null $templateSettings
@return mixed|string | [
"Returns",
"the",
"evaluated",
"PHP"
] | train | https://github.com/qcubed/orm/blob/f320eba671f20874b1f3809c5293f8c02d5b1204/src/Codegen/CodegenBase.php#L614-L653 |
qcubed/orm | src/Codegen/CodegenBase.php | CodegenBase.modelClassName | protected function modelClassName($strTableName)
{
$strTableName = $this->stripPrefixFromTable($strTableName);
return sprintf('%s%s%s',
$this->strClassPrefix,
QString::camelCaseFromUnderscore($strTableName),
$this->strClassSuffix);
} | php | protected function modelClassName($strTableName)
{
$strTableName = $this->stripPrefixFromTable($strTableName);
return sprintf('%s%s%s',
$this->strClassPrefix,
QString::camelCaseFromUnderscore($strTableName),
$this->strClassSuffix);
} | [
"protected",
"function",
"modelClassName",
"(",
"$",
"strTableName",
")",
"{",
"$",
"strTableName",
"=",
"$",
"this",
"->",
"stripPrefixFromTable",
"(",
"$",
"strTableName",
")",
";",
"return",
"sprintf",
"(",
"'%s%s%s'",
",",
"$",
"this",
"->",
"strClassPrefi... | Given a table name, returns the name of the class for the corresponding model object.
@param string $strTableName
@return string | [
"Given",
"a",
"table",
"name",
"returns",
"the",
"name",
"of",
"the",
"class",
"for",
"the",
"corresponding",
"model",
"object",
"."
] | train | https://github.com/qcubed/orm/blob/f320eba671f20874b1f3809c5293f8c02d5b1204/src/Codegen/CodegenBase.php#L669-L676 |
qcubed/orm | src/Codegen/CodegenBase.php | CodegenBase.modelVariableName | public function modelVariableName($strTableName)
{
$strTableName = $this->stripPrefixFromTable($strTableName);
return Codegen::prefixFromType(Type::OBJECT) .
QString::camelCaseFromUnderscore($strTableName);
} | php | public function modelVariableName($strTableName)
{
$strTableName = $this->stripPrefixFromTable($strTableName);
return Codegen::prefixFromType(Type::OBJECT) .
QString::camelCaseFromUnderscore($strTableName);
} | [
"public",
"function",
"modelVariableName",
"(",
"$",
"strTableName",
")",
"{",
"$",
"strTableName",
"=",
"$",
"this",
"->",
"stripPrefixFromTable",
"(",
"$",
"strTableName",
")",
";",
"return",
"Codegen",
"::",
"prefixFromType",
"(",
"Type",
"::",
"OBJECT",
")... | Given a table name, returns a variable name that will be used to represent the corresponding model object.
@param string $strTableName
@return string | [
"Given",
"a",
"table",
"name",
"returns",
"a",
"variable",
"name",
"that",
"will",
"be",
"used",
"to",
"represent",
"the",
"corresponding",
"model",
"object",
"."
] | train | https://github.com/qcubed/orm/blob/f320eba671f20874b1f3809c5293f8c02d5b1204/src/Codegen/CodegenBase.php#L683-L688 |
qcubed/orm | src/Codegen/CodegenBase.php | CodegenBase.modelColumnVariableName | protected function modelColumnVariableName(SqlColumn $objColumn)
{
return Codegen::prefixFromType($objColumn->VariableType) .
QString::camelCaseFromUnderscore($objColumn->Name);
} | php | protected function modelColumnVariableName(SqlColumn $objColumn)
{
return Codegen::prefixFromType($objColumn->VariableType) .
QString::camelCaseFromUnderscore($objColumn->Name);
} | [
"protected",
"function",
"modelColumnVariableName",
"(",
"SqlColumn",
"$",
"objColumn",
")",
"{",
"return",
"Codegen",
"::",
"prefixFromType",
"(",
"$",
"objColumn",
"->",
"VariableType",
")",
".",
"QString",
"::",
"camelCaseFromUnderscore",
"(",
"$",
"objColumn",
... | Given a column, returns the name of the variable used to represent the column's value inside
the model object.
@param SqlColumn $objColumn
@return string | [
"Given",
"a",
"column",
"returns",
"the",
"name",
"of",
"the",
"variable",
"used",
"to",
"represent",
"the",
"column",
"s",
"value",
"inside",
"the",
"model",
"object",
"."
] | train | https://github.com/qcubed/orm/blob/f320eba671f20874b1f3809c5293f8c02d5b1204/src/Codegen/CodegenBase.php#L722-L726 |
qcubed/orm | src/Codegen/CodegenBase.php | CodegenBase.modelReferenceColumnName | protected function modelReferenceColumnName($strColumnName)
{
$intNameLength = strlen($strColumnName);
// Does the column name for this reference column end in "_id"?
if (($intNameLength > 3) && (substr($strColumnName, $intNameLength - 3) == "_id")) {
// It ends in "_id" but we ... | php | protected function modelReferenceColumnName($strColumnName)
{
$intNameLength = strlen($strColumnName);
// Does the column name for this reference column end in "_id"?
if (($intNameLength > 3) && (substr($strColumnName, $intNameLength - 3) == "_id")) {
// It ends in "_id" but we ... | [
"protected",
"function",
"modelReferenceColumnName",
"(",
"$",
"strColumnName",
")",
"{",
"$",
"intNameLength",
"=",
"strlen",
"(",
"$",
"strColumnName",
")",
";",
"// Does the column name for this reference column end in \"_id\"?",
"if",
"(",
"(",
"$",
"intNameLength",
... | Given the name of a column that is a foreign key to another table, returns a kind of
virtual column name that would refer to the object pointed to. This new name is used to refer to the object
version of the column by json and other encodings, and derivatives
of this name are used to represent a variable and property n... | [
"Given",
"the",
"name",
"of",
"a",
"column",
"that",
"is",
"a",
"foreign",
"key",
"to",
"another",
"table",
"returns",
"a",
"kind",
"of",
"virtual",
"column",
"name",
"that",
"would",
"refer",
"to",
"the",
"object",
"pointed",
"to",
".",
"This",
"new",
... | train | https://github.com/qcubed/orm/blob/f320eba671f20874b1f3809c5293f8c02d5b1204/src/Codegen/CodegenBase.php#L760-L780 |
qcubed/orm | src/Codegen/CodegenBase.php | CodegenBase.modelReferenceVariableName | protected function modelReferenceVariableName($strColumnName)
{
$strColumnName = $this->modelReferenceColumnName($strColumnName);
return Codegen::prefixFromType(Type::OBJECT) .
QString::camelCaseFromUnderscore($strColumnName);
} | php | protected function modelReferenceVariableName($strColumnName)
{
$strColumnName = $this->modelReferenceColumnName($strColumnName);
return Codegen::prefixFromType(Type::OBJECT) .
QString::camelCaseFromUnderscore($strColumnName);
} | [
"protected",
"function",
"modelReferenceVariableName",
"(",
"$",
"strColumnName",
")",
"{",
"$",
"strColumnName",
"=",
"$",
"this",
"->",
"modelReferenceColumnName",
"(",
"$",
"strColumnName",
")",
";",
"return",
"Codegen",
"::",
"prefixFromType",
"(",
"Type",
"::... | Given a column name to a foreign key, returns the name of the variable that will represent the foreign object
stored in the model.
@param string $strColumnName
@return string | [
"Given",
"a",
"column",
"name",
"to",
"a",
"foreign",
"key",
"returns",
"the",
"name",
"of",
"the",
"variable",
"that",
"will",
"represent",
"the",
"foreign",
"object",
"stored",
"in",
"the",
"model",
"."
] | train | https://github.com/qcubed/orm/blob/f320eba671f20874b1f3809c5293f8c02d5b1204/src/Codegen/CodegenBase.php#L789-L794 |
qcubed/orm | src/Codegen/CodegenBase.php | CodegenBase.modelConnectorControlName | public static function modelConnectorControlName(ColumnInterface $objColumn)
{
if (($o = $objColumn->Options) && isset ($o['Name'])) { // Did developer default?
return $o['Name'];
}
return QString::wordsFromCamelCase(Codegen::modelConnectorPropertyName($objColumn));
} | php | public static function modelConnectorControlName(ColumnInterface $objColumn)
{
if (($o = $objColumn->Options) && isset ($o['Name'])) { // Did developer default?
return $o['Name'];
}
return QString::wordsFromCamelCase(Codegen::modelConnectorPropertyName($objColumn));
} | [
"public",
"static",
"function",
"modelConnectorControlName",
"(",
"ColumnInterface",
"$",
"objColumn",
")",
"{",
"if",
"(",
"(",
"$",
"o",
"=",
"$",
"objColumn",
"->",
"Options",
")",
"&&",
"isset",
"(",
"$",
"o",
"[",
"'Name'",
"]",
")",
")",
"{",
"//... | Returns the control label name as used in the ModelConnector corresponding to this column or table.
@param ColumnInterface $objColumn
@return string | [
"Returns",
"the",
"control",
"label",
"name",
"as",
"used",
"in",
"the",
"ModelConnector",
"corresponding",
"to",
"this",
"column",
"or",
"table",
"."
] | train | https://github.com/qcubed/orm/blob/f320eba671f20874b1f3809c5293f8c02d5b1204/src/Codegen/CodegenBase.php#L868-L874 |
qcubed/orm | src/Codegen/CodegenBase.php | CodegenBase.modelConnectorPropertyName | public static function modelConnectorPropertyName(ColumnInterface $objColumn)
{
if ($objColumn instanceof SqlColumn) {
if ($objColumn->Reference) {
return $objColumn->Reference->PropertyName;
} else {
return $objColumn->PropertyName;
}
... | php | public static function modelConnectorPropertyName(ColumnInterface $objColumn)
{
if ($objColumn instanceof SqlColumn) {
if ($objColumn->Reference) {
return $objColumn->Reference->PropertyName;
} else {
return $objColumn->PropertyName;
}
... | [
"public",
"static",
"function",
"modelConnectorPropertyName",
"(",
"ColumnInterface",
"$",
"objColumn",
")",
"{",
"if",
"(",
"$",
"objColumn",
"instanceof",
"SqlColumn",
")",
"{",
"if",
"(",
"$",
"objColumn",
"->",
"Reference",
")",
"{",
"return",
"$",
"objCol... | The property name used in the ModelConnector for the given column, virtual column or table
@param ColumnInterface $objColumn
@return string
@throws \Exception | [
"The",
"property",
"name",
"used",
"in",
"the",
"ModelConnector",
"for",
"the",
"given",
"column",
"virtual",
"column",
"or",
"table"
] | train | https://github.com/qcubed/orm/blob/f320eba671f20874b1f3809c5293f8c02d5b1204/src/Codegen/CodegenBase.php#L884-L903 |
qcubed/orm | src/Codegen/CodegenBase.php | CodegenBase.modelConnectorVariableName | public function modelConnectorVariableName(ColumnInterface $objColumn)
{
$strPropName = static::modelConnectorPropertyName($objColumn);
$objControlHelper = $this->getControlCodeGenerator($objColumn);
return $objControlHelper->varName($strPropName);
} | php | public function modelConnectorVariableName(ColumnInterface $objColumn)
{
$strPropName = static::modelConnectorPropertyName($objColumn);
$objControlHelper = $this->getControlCodeGenerator($objColumn);
return $objControlHelper->varName($strPropName);
} | [
"public",
"function",
"modelConnectorVariableName",
"(",
"ColumnInterface",
"$",
"objColumn",
")",
"{",
"$",
"strPropName",
"=",
"static",
"::",
"modelConnectorPropertyName",
"(",
"$",
"objColumn",
")",
";",
"$",
"objControlHelper",
"=",
"$",
"this",
"->",
"getCon... | Return a variable name corresponding to the given column, including virtual columns like
ReverseReference and QManyToMany references.
@param ColumnInterface $objColumn
@return string | [
"Return",
"a",
"variable",
"name",
"corresponding",
"to",
"the",
"given",
"column",
"including",
"virtual",
"columns",
"like",
"ReverseReference",
"and",
"QManyToMany",
"references",
"."
] | train | https://github.com/qcubed/orm/blob/f320eba671f20874b1f3809c5293f8c02d5b1204/src/Codegen/CodegenBase.php#L911-L916 |
qcubed/orm | src/Codegen/CodegenBase.php | CodegenBase.modelConnectorLabelVariableName | public function modelConnectorLabelVariableName(ColumnInterface $objColumn)
{
$strPropName = static::modelConnectorPropertyName($objColumn);
return \QCubed\Codegen\Generator\Label::instance()->varName($strPropName);
} | php | public function modelConnectorLabelVariableName(ColumnInterface $objColumn)
{
$strPropName = static::modelConnectorPropertyName($objColumn);
return \QCubed\Codegen\Generator\Label::instance()->varName($strPropName);
} | [
"public",
"function",
"modelConnectorLabelVariableName",
"(",
"ColumnInterface",
"$",
"objColumn",
")",
"{",
"$",
"strPropName",
"=",
"static",
"::",
"modelConnectorPropertyName",
"(",
"$",
"objColumn",
")",
";",
"return",
"\\",
"QCubed",
"\\",
"Codegen",
"\\",
"G... | Returns a variable name for the "label" version of a control, which would be the read-only version
of viewing the data in the column.
@param ColumnInterface $objColumn
@return string | [
"Returns",
"a",
"variable",
"name",
"for",
"the",
"label",
"version",
"of",
"a",
"control",
"which",
"would",
"be",
"the",
"read",
"-",
"only",
"version",
"of",
"viewing",
"the",
"data",
"in",
"the",
"column",
"."
] | train | https://github.com/qcubed/orm/blob/f320eba671f20874b1f3809c5293f8c02d5b1204/src/Codegen/CodegenBase.php#L924-L928 |
qcubed/orm | src/Codegen/CodegenBase.php | CodegenBase.modelConnectorControlClass | protected function modelConnectorControlClass(ColumnInterface $objColumn)
{
// Is the class specified by the developer?
if ($o = $objColumn->Options) {
if (isset ($o['FormGen']) && $o['FormGen'] == \QCubed\ModelConnector\Options::FORMGEN_LABEL_ONLY) {
return '\\QCubed\\C... | php | protected function modelConnectorControlClass(ColumnInterface $objColumn)
{
// Is the class specified by the developer?
if ($o = $objColumn->Options) {
if (isset ($o['FormGen']) && $o['FormGen'] == \QCubed\ModelConnector\Options::FORMGEN_LABEL_ONLY) {
return '\\QCubed\\C... | [
"protected",
"function",
"modelConnectorControlClass",
"(",
"ColumnInterface",
"$",
"objColumn",
")",
"{",
"// Is the class specified by the developer?",
"if",
"(",
"$",
"o",
"=",
"$",
"objColumn",
"->",
"Options",
")",
"{",
"if",
"(",
"isset",
"(",
"$",
"o",
"[... | Returns the class for the control that will be created to edit the given column,
including the 'virtual' columns of reverse references (many to one) and many-to-many references.
@param ColumnInterface $objColumn
@return string Class name of control which can handle this column's data
@throws \Exception | [
"Returns",
"the",
"class",
"for",
"the",
"control",
"that",
"will",
"be",
"created",
"to",
"edit",
"the",
"given",
"column",
"including",
"the",
"virtual",
"columns",
"of",
"reverse",
"references",
"(",
"many",
"to",
"one",
")",
"and",
"many",
"-",
"to",
... | train | https://github.com/qcubed/orm/blob/f320eba671f20874b1f3809c5293f8c02d5b1204/src/Codegen/CodegenBase.php#L939-L988 |
qcubed/orm | src/Codegen/CodegenBase.php | CodegenBase.dataListControlName | public static function dataListControlName(SqlTable $objTable)
{
if (($o = $objTable->Options) && isset ($o['Name'])) { // Did developer default?
return $o['Name'];
}
return QString::wordsFromCamelCase($objTable->ClassNamePlural);
} | php | public static function dataListControlName(SqlTable $objTable)
{
if (($o = $objTable->Options) && isset ($o['Name'])) { // Did developer default?
return $o['Name'];
}
return QString::wordsFromCamelCase($objTable->ClassNamePlural);
} | [
"public",
"static",
"function",
"dataListControlName",
"(",
"SqlTable",
"$",
"objTable",
")",
"{",
"if",
"(",
"(",
"$",
"o",
"=",
"$",
"objTable",
"->",
"Options",
")",
"&&",
"isset",
"(",
"$",
"o",
"[",
"'Name'",
"]",
")",
")",
"{",
"// Did developer ... | Returns the control label name as used in the data list panel corresponding to this column.
@param SqlTable $objTable
@return string | [
"Returns",
"the",
"control",
"label",
"name",
"as",
"used",
"in",
"the",
"data",
"list",
"panel",
"corresponding",
"to",
"this",
"column",
"."
] | train | https://github.com/qcubed/orm/blob/f320eba671f20874b1f3809c5293f8c02d5b1204/src/Codegen/CodegenBase.php#L1011-L1017 |
qcubed/orm | src/Codegen/CodegenBase.php | CodegenBase.dataListItemName | public static function dataListItemName(SqlTable $objTable)
{
if (($o = $objTable->Options) && isset ($o['ItemName'])) { // Did developer override?
return $o['ItemName'];
}
return QString::wordsFromCamelCase($objTable->ClassName);
} | php | public static function dataListItemName(SqlTable $objTable)
{
if (($o = $objTable->Options) && isset ($o['ItemName'])) { // Did developer override?
return $o['ItemName'];
}
return QString::wordsFromCamelCase($objTable->ClassName);
} | [
"public",
"static",
"function",
"dataListItemName",
"(",
"SqlTable",
"$",
"objTable",
")",
"{",
"if",
"(",
"(",
"$",
"o",
"=",
"$",
"objTable",
"->",
"Options",
")",
"&&",
"isset",
"(",
"$",
"o",
"[",
"'ItemName'",
"]",
")",
")",
"{",
"// Did developer... | Returns the name of an item in the data list as will be displayed in the edit panel.
@param SqlTable $objTable
@return string | [
"Returns",
"the",
"name",
"of",
"an",
"item",
"in",
"the",
"data",
"list",
"as",
"will",
"be",
"displayed",
"in",
"the",
"edit",
"panel",
"."
] | train | https://github.com/qcubed/orm/blob/f320eba671f20874b1f3809c5293f8c02d5b1204/src/Codegen/CodegenBase.php#L1026-L1032 |
qcubed/orm | src/Codegen/CodegenBase.php | CodegenBase.getControlCodeGenerator | public function getControlCodeGenerator($objColumn)
{
$strControlClass = $this->modelConnectorControlClass($objColumn);
if (method_exists($strControlClass, 'getCodeGenerator')) {
return $strControlClass::getCodeGenerator();
} else {
throw new Caller("Class " . $strCo... | php | public function getControlCodeGenerator($objColumn)
{
$strControlClass = $this->modelConnectorControlClass($objColumn);
if (method_exists($strControlClass, 'getCodeGenerator')) {
return $strControlClass::getCodeGenerator();
} else {
throw new Caller("Class " . $strCo... | [
"public",
"function",
"getControlCodeGenerator",
"(",
"$",
"objColumn",
")",
"{",
"$",
"strControlClass",
"=",
"$",
"this",
"->",
"modelConnectorControlClass",
"(",
"$",
"objColumn",
")",
";",
"if",
"(",
"method_exists",
"(",
"$",
"strControlClass",
",",
"'getCo... | Returns the class for the control that will be created to edit the given column,
including the 'virtual' columns of reverse references (many to one) and many-to-many references.
@param ColumnInterface $objColumn
@return \QCubed\Codegen\Generator\GeneratorBase helper object
@throws \Exception | [
"Returns",
"the",
"class",
"for",
"the",
"control",
"that",
"will",
"be",
"created",
"to",
"edit",
"the",
"given",
"column",
"including",
"the",
"virtual",
"columns",
"of",
"reverse",
"references",
"(",
"many",
"to",
"one",
")",
"and",
"many",
"-",
"to",
... | train | https://github.com/qcubed/orm/blob/f320eba671f20874b1f3809c5293f8c02d5b1204/src/Codegen/CodegenBase.php#L1061-L1070 |
qcubed/orm | src/Codegen/CodegenBase.php | CodegenBase.calculateObjectDescription | protected function calculateObjectDescription($strTableName, $strColumnName, $strReferencedTableName, $blnPluralize)
{
// Strip Prefixes (if applicable)
$strTableName = $this->stripPrefixFromTable($strTableName);
$strReferencedTableName = $this->stripPrefixFromTable($strReferencedTableName);... | php | protected function calculateObjectDescription($strTableName, $strColumnName, $strReferencedTableName, $blnPluralize)
{
// Strip Prefixes (if applicable)
$strTableName = $this->stripPrefixFromTable($strTableName);
$strReferencedTableName = $this->stripPrefixFromTable($strReferencedTableName);... | [
"protected",
"function",
"calculateObjectDescription",
"(",
"$",
"strTableName",
",",
"$",
"strColumnName",
",",
"$",
"strReferencedTableName",
",",
"$",
"blnPluralize",
")",
"{",
"// Strip Prefixes (if applicable)",
"$",
"strTableName",
"=",
"$",
"this",
"->",
"strip... | TODO: These functions need to be documented heavily with information from "lexical analysis on fk names.txt" | [
"TODO",
":",
"These",
"functions",
"need",
"to",
"be",
"documented",
"heavily",
"with",
"information",
"from",
"lexical",
"analysis",
"on",
"fk",
"names",
".",
"txt"
] | train | https://github.com/qcubed/orm/blob/f320eba671f20874b1f3809c5293f8c02d5b1204/src/Codegen/CodegenBase.php#L1102-L1175 |
qcubed/orm | src/Codegen/CodegenBase.php | CodegenBase.calculateObjectDescriptionForAssociation | protected function calculateObjectDescriptionForAssociation(
$strAssociationTableName,
$strTableName,
$strReferencedTableName,
$blnPluralize
) {
// Strip Prefixes (if applicable)
$strTableName = $this->stripPrefixFromTable($strTableName);
$strAssociationTableN... | php | protected function calculateObjectDescriptionForAssociation(
$strAssociationTableName,
$strTableName,
$strReferencedTableName,
$blnPluralize
) {
// Strip Prefixes (if applicable)
$strTableName = $this->stripPrefixFromTable($strTableName);
$strAssociationTableN... | [
"protected",
"function",
"calculateObjectDescriptionForAssociation",
"(",
"$",
"strAssociationTableName",
",",
"$",
"strTableName",
",",
"$",
"strReferencedTableName",
",",
"$",
"blnPluralize",
")",
"{",
"// Strip Prefixes (if applicable)",
"$",
"strTableName",
"=",
"$",
... | this is called for ReverseReference Object Descriptions for association tables (many-to-many) | [
"this",
"is",
"called",
"for",
"ReverseReference",
"Object",
"Descriptions",
"for",
"association",
"tables",
"(",
"many",
"-",
"to",
"-",
"many",
")"
] | train | https://github.com/qcubed/orm/blob/f320eba671f20874b1f3809c5293f8c02d5b1204/src/Codegen/CodegenBase.php#L1178-L1257 |
qcubed/orm | src/Codegen/CodegenBase.php | CodegenBase.calculateGraphPrefixArray | protected function calculateGraphPrefixArray($objForeignKeyArray)
{
// Analyze Column Names to determine GraphPrefixArray
if ((strpos(strtolower($objForeignKeyArray[0]->ColumnNameArray[0]), 'parent') !== false) ||
(strpos(strtolower($objForeignKeyArray[1]->ColumnNameArray[0]), 'child') !... | php | protected function calculateGraphPrefixArray($objForeignKeyArray)
{
// Analyze Column Names to determine GraphPrefixArray
if ((strpos(strtolower($objForeignKeyArray[0]->ColumnNameArray[0]), 'parent') !== false) ||
(strpos(strtolower($objForeignKeyArray[1]->ColumnNameArray[0]), 'child') !... | [
"protected",
"function",
"calculateGraphPrefixArray",
"(",
"$",
"objForeignKeyArray",
")",
"{",
"// Analyze Column Names to determine GraphPrefixArray",
"if",
"(",
"(",
"strpos",
"(",
"strtolower",
"(",
"$",
"objForeignKeyArray",
"[",
"0",
"]",
"->",
"ColumnNameArray",
... | This is called by AnalyzeAssociationTable to calculate the GraphPrefixArray for a self-referencing association table (e.g. directed graph) | [
"This",
"is",
"called",
"by",
"AnalyzeAssociationTable",
"to",
"calculate",
"the",
"GraphPrefixArray",
"for",
"a",
"self",
"-",
"referencing",
"association",
"table",
"(",
"e",
".",
"g",
".",
"directed",
"graph",
")"
] | train | https://github.com/qcubed/orm/blob/f320eba671f20874b1f3809c5293f8c02d5b1204/src/Codegen/CodegenBase.php#L1260-L1282 |
qcubed/orm | src/Codegen/CodegenBase.php | CodegenBase.variableTypeFromDbType | protected function variableTypeFromDbType($strDbType)
{
switch ($strDbType) {
case Database\FieldType::BIT:
return Type::BOOLEAN;
case Database\FieldType::BLOB:
return Type::STRING;
case Database\FieldType::CHAR:
return Type... | php | protected function variableTypeFromDbType($strDbType)
{
switch ($strDbType) {
case Database\FieldType::BIT:
return Type::BOOLEAN;
case Database\FieldType::BLOB:
return Type::STRING;
case Database\FieldType::CHAR:
return Type... | [
"protected",
"function",
"variableTypeFromDbType",
"(",
"$",
"strDbType",
")",
"{",
"switch",
"(",
"$",
"strDbType",
")",
"{",
"case",
"Database",
"\\",
"FieldType",
"::",
"BIT",
":",
"return",
"Type",
"::",
"BOOLEAN",
";",
"case",
"Database",
"\\",
"FieldTy... | Returns the variable type corresponding to the database column type
@param string $strDbType
@return string
@throws \Exception | [
"Returns",
"the",
"variable",
"type",
"corresponding",
"to",
"the",
"database",
"column",
"type"
] | train | https://github.com/qcubed/orm/blob/f320eba671f20874b1f3809c5293f8c02d5b1204/src/Codegen/CodegenBase.php#L1290-L1316 |
qcubed/orm | src/Codegen/CodegenBase.php | CodegenBase.pluralize | protected function pluralize($strName)
{
// Special Rules go Here
switch (true) {
case (strtolower($strName) == 'play'):
return $strName . 's';
}
$intLength = strlen($strName);
if (substr($strName, $intLength - 1) == "y") {
return subs... | php | protected function pluralize($strName)
{
// Special Rules go Here
switch (true) {
case (strtolower($strName) == 'play'):
return $strName . 's';
}
$intLength = strlen($strName);
if (substr($strName, $intLength - 1) == "y") {
return subs... | [
"protected",
"function",
"pluralize",
"(",
"$",
"strName",
")",
"{",
"// Special Rules go Here",
"switch",
"(",
"true",
")",
"{",
"case",
"(",
"strtolower",
"(",
"$",
"strName",
")",
"==",
"'play'",
")",
":",
"return",
"$",
"strName",
".",
"'s'",
";",
"}... | Return the plural of the given name. Override this and return the plural version of particular names
if this generic version isn't working for you.
@param string $strName
@return string | [
"Return",
"the",
"plural",
"of",
"the",
"given",
"name",
".",
"Override",
"this",
"and",
"return",
"the",
"plural",
"version",
"of",
"particular",
"names",
"if",
"this",
"generic",
"version",
"isn",
"t",
"working",
"for",
"you",
"."
] | train | https://github.com/qcubed/orm/blob/f320eba671f20874b1f3809c5293f8c02d5b1204/src/Codegen/CodegenBase.php#L1325-L1354 |
webforge-labs/psc-cms | lib/Psc/Doctrine/UniqueConstraint.php | UniqueConstraint.getDataHelper | public function getDataHelper() {
$keys = $this->getKeys();
$data = function () use ($keys) {
$args = func_get_args();
$argsNum = count($args);
if ($argsNum > count($keys)+1 || $argsNum < count($keys)) {
throw new \InvalidArgumentException('Es ist eine Anzahl von '.count($keys).'(... | php | public function getDataHelper() {
$keys = $this->getKeys();
$data = function () use ($keys) {
$args = func_get_args();
$argsNum = count($args);
if ($argsNum > count($keys)+1 || $argsNum < count($keys)) {
throw new \InvalidArgumentException('Es ist eine Anzahl von '.count($keys).'(... | [
"public",
"function",
"getDataHelper",
"(",
")",
"{",
"$",
"keys",
"=",
"$",
"this",
"->",
"getKeys",
"(",
")",
";",
"$",
"data",
"=",
"function",
"(",
")",
"use",
"(",
"$",
"keys",
")",
"{",
"$",
"args",
"=",
"func_get_args",
"(",
")",
";",
"$",... | Gibt einen Helper zurück, der die Daten des Unique-Keys für z. B. UniqueConstraintValidator vorbereitet
der Helper hat soviele Parameter wie es Keys im UnqiueConstraint gibt. Die Reihenfolge der Argumente ist die Reihenfolge der Keys
@see Test::testHelperGeneration()
@return Closure | [
"Gibt",
"einen",
"Helper",
"zurück",
"der",
"die",
"Daten",
"des",
"Unique",
"-",
"Keys",
"für",
"z",
".",
"B",
".",
"UniqueConstraintValidator",
"vorbereitet"
] | train | https://github.com/webforge-labs/psc-cms/blob/467bfa2547e6b4fa487d2d7f35fa6cc618dbc763/lib/Psc/Doctrine/UniqueConstraint.php#L65-L87 |
Sedona-Solutions/sedona-sbo | src/Sedona/SBOGeneratorBundle/Datatable/Data/DatatableData.php | DatatableData.setColumns | private function setColumns()
{
$this->datatableQuery->setSelectColumns($this->selectColumns);
$this->datatableQuery->setAllColumns($this->allColumns);
$this->datatableQuery->setJoins($this->joins);
$this->datatableQuery->setSearchColumns($this->searchColumns);
$this->datatab... | php | private function setColumns()
{
$this->datatableQuery->setSelectColumns($this->selectColumns);
$this->datatableQuery->setAllColumns($this->allColumns);
$this->datatableQuery->setJoins($this->joins);
$this->datatableQuery->setSearchColumns($this->searchColumns);
$this->datatab... | [
"private",
"function",
"setColumns",
"(",
")",
"{",
"$",
"this",
"->",
"datatableQuery",
"->",
"setSelectColumns",
"(",
"$",
"this",
"->",
"selectColumns",
")",
";",
"$",
"this",
"->",
"datatableQuery",
"->",
"setAllColumns",
"(",
"$",
"this",
"->",
"allColu... | Set columns.
@return $this | [
"Set",
"columns",
"."
] | train | https://github.com/Sedona-Solutions/sedona-sbo/blob/8548be4170d191cb1a3e263577aaaab49f04d5ce/src/Sedona/SBOGeneratorBundle/Datatable/Data/DatatableData.php#L27-L36 |
Sedona-Solutions/sedona-sbo | src/Sedona/SBOGeneratorBundle/Datatable/Data/DatatableData.php | DatatableData.buildQuery | private function buildQuery()
{
$this->datatableQuery->setSelectFrom();
$this->datatableQuery->setLeftJoins();
$this->datatableQuery->setWhere();
$this->datatableQuery->setWhereCallbacks();
$this->datatableQuery->setOrderBy();
$this->datatableQuery->setLimit();
... | php | private function buildQuery()
{
$this->datatableQuery->setSelectFrom();
$this->datatableQuery->setLeftJoins();
$this->datatableQuery->setWhere();
$this->datatableQuery->setWhereCallbacks();
$this->datatableQuery->setOrderBy();
$this->datatableQuery->setLimit();
... | [
"private",
"function",
"buildQuery",
"(",
")",
"{",
"$",
"this",
"->",
"datatableQuery",
"->",
"setSelectFrom",
"(",
")",
";",
"$",
"this",
"->",
"datatableQuery",
"->",
"setLeftJoins",
"(",
")",
";",
"$",
"this",
"->",
"datatableQuery",
"->",
"setWhere",
... | Build query.
@return $this | [
"Build",
"query",
"."
] | train | https://github.com/Sedona-Solutions/sedona-sbo/blob/8548be4170d191cb1a3e263577aaaab49f04d5ce/src/Sedona/SBOGeneratorBundle/Datatable/Data/DatatableData.php#L43-L53 |
Sedona-Solutions/sedona-sbo | src/Sedona/SBOGeneratorBundle/Datatable/Data/DatatableData.php | DatatableData.getResponse | public function getResponse()
{
$this->setColumns();
$this->buildQuery();
$fresults = new Paginator($this->datatableQuery->execute(), true);
$output = array('data' => array());
$outputHeader = array(
'draw' => (integer) $this->requestParams['draw'],
... | php | public function getResponse()
{
$this->setColumns();
$this->buildQuery();
$fresults = new Paginator($this->datatableQuery->execute(), true);
$output = array('data' => array());
$outputHeader = array(
'draw' => (integer) $this->requestParams['draw'],
... | [
"public",
"function",
"getResponse",
"(",
")",
"{",
"$",
"this",
"->",
"setColumns",
"(",
")",
";",
"$",
"this",
"->",
"buildQuery",
"(",
")",
";",
"$",
"fresults",
"=",
"new",
"Paginator",
"(",
"$",
"this",
"->",
"datatableQuery",
"->",
"execute",
"("... | {@inheritdoc} | [
"{"
] | train | https://github.com/Sedona-Solutions/sedona-sbo/blob/8548be4170d191cb1a3e263577aaaab49f04d5ce/src/Sedona/SBOGeneratorBundle/Datatable/Data/DatatableData.php#L62-L92 |
austinkregel/Warden | src/Warden/Traits/Wardenable.php | Wardenable.toArray | public function toArray()
{
$attr = !empty($this->getWarden()) ? $this->getWarden() : null;
if (empty($attr)) {
$attr = empty($this->getVisible()) ? $this->getFillable() : $this->getVisible();
}
$returnable = [];
$f_model = \FormModel::using('plain')->withModel($... | php | public function toArray()
{
$attr = !empty($this->getWarden()) ? $this->getWarden() : null;
if (empty($attr)) {
$attr = empty($this->getVisible()) ? $this->getFillable() : $this->getVisible();
}
$returnable = [];
$f_model = \FormModel::using('plain')->withModel($... | [
"public",
"function",
"toArray",
"(",
")",
"{",
"$",
"attr",
"=",
"!",
"empty",
"(",
"$",
"this",
"->",
"getWarden",
"(",
")",
")",
"?",
"$",
"this",
"->",
"getWarden",
"(",
")",
":",
"null",
";",
"if",
"(",
"empty",
"(",
"$",
"attr",
")",
")",... | Parses the warden config.
@return array | [
"Parses",
"the",
"warden",
"config",
"."
] | train | https://github.com/austinkregel/Warden/blob/6f5a98bd79a488f0f300f4851061ac6f7d19f8a3/src/Warden/Traits/Wardenable.php#L36-L61 |
mimicreative/yii2-datatables | src/actions/DataTableAction.php | DataTableAction.applyFilter | public function applyFilter(ActiveQuery $query, $columns, $search)
{
if ($this->applyFilter !== null) {
return call_user_func($this->applyFilter, $query, $columns, $search);
}
/** @var \yii\db\ActiveRecord $modelClass */
$modelClass = $query->modelClass;
... | php | public function applyFilter(ActiveQuery $query, $columns, $search)
{
if ($this->applyFilter !== null) {
return call_user_func($this->applyFilter, $query, $columns, $search);
}
/** @var \yii\db\ActiveRecord $modelClass */
$modelClass = $query->modelClass;
... | [
"public",
"function",
"applyFilter",
"(",
"ActiveQuery",
"$",
"query",
",",
"$",
"columns",
",",
"$",
"search",
")",
"{",
"if",
"(",
"$",
"this",
"->",
"applyFilter",
"!==",
"null",
")",
"{",
"return",
"call_user_func",
"(",
"$",
"this",
"->",
"applyFilt... | @param ActiveQuery $query
@param array $columns
@param array $search
@return ActiveQuery
@throws InvalidConfigException | [
"@param",
"ActiveQuery",
"$query",
"@param",
"array",
"$columns",
"@param",
"array",
"$search"
] | train | https://github.com/mimicreative/yii2-datatables/blob/8d27b3a6f642e07c98785aeedd0400902416aa75/src/actions/DataTableAction.php#L155-L182 |
ClanCats/Core | src/bundles/Mail/CCMail.php | CCMail.cc | public function cc( $email, $name = null )
{
if ( !is_array( $email ) )
{
$email = array( $email => $name );
}
foreach( $email as $address => $name )
{
if ( is_numeric( $address ) && is_string( $name ) )
{
$this->cc[$name] = null;
}
else
{
$this->cc[$address] = $name;
}
}... | php | public function cc( $email, $name = null )
{
if ( !is_array( $email ) )
{
$email = array( $email => $name );
}
foreach( $email as $address => $name )
{
if ( is_numeric( $address ) && is_string( $name ) )
{
$this->cc[$name] = null;
}
else
{
$this->cc[$address] = $name;
}
}... | [
"public",
"function",
"cc",
"(",
"$",
"email",
",",
"$",
"name",
"=",
"null",
")",
"{",
"if",
"(",
"!",
"is_array",
"(",
"$",
"email",
")",
")",
"{",
"$",
"email",
"=",
"array",
"(",
"$",
"email",
"=>",
"$",
"name",
")",
";",
"}",
"foreach",
... | Add Carbon copies
Works like the 'to' function.
@param string $email
@param string $name
@return self | [
"Add",
"Carbon",
"copies"
] | train | https://github.com/ClanCats/Core/blob/9f6ec72c1a439de4b253d0223f1029f7f85b6ef8/src/bundles/Mail/CCMail.php#L196-L216 |
ClanCats/Core | src/bundles/Mail/CCMail.php | CCMail.attachment | public function attachment( $path, $name )
{
if ( !is_array( $path ) )
{
$path = array( $path => $name );
}
foreach( $path as $file => $name )
{
if ( is_numeric( $file ) && is_string( $name ) )
{
$this->attachments[$name] = null;
}
else
{
$this->attachments[$file] = $name;
}
... | php | public function attachment( $path, $name )
{
if ( !is_array( $path ) )
{
$path = array( $path => $name );
}
foreach( $path as $file => $name )
{
if ( is_numeric( $file ) && is_string( $name ) )
{
$this->attachments[$name] = null;
}
else
{
$this->attachments[$file] = $name;
}
... | [
"public",
"function",
"attachment",
"(",
"$",
"path",
",",
"$",
"name",
")",
"{",
"if",
"(",
"!",
"is_array",
"(",
"$",
"path",
")",
")",
"{",
"$",
"path",
"=",
"array",
"(",
"$",
"path",
"=>",
"$",
"name",
")",
";",
"}",
"foreach",
"(",
"$",
... | Add a recipient
$mail->attachment( '/path/to/my/file.zip' );
$mail->attachment( '/some/image.jpg', 'your_photo.jpg' );
$mail->attachment( array( '/some/other/image.jpg' => 'wallpaper.jpg' ) );
@param string $path The path to your file
@param string $name
@return self | [
"Add",
"a",
"recipient"
] | train | https://github.com/ClanCats/Core/blob/9f6ec72c1a439de4b253d0223f1029f7f85b6ef8/src/bundles/Mail/CCMail.php#L241-L261 |
ClanCats/Core | src/bundles/Mail/CCMail.php | CCMail.render | public function render()
{
$message = $this->message;
reset( $this->to );
// default view parameters for the message and the layout
$params = array(
'mail' => $this,
'to_email' => key($this->to),
'to_name' => $this->to[ key($this->to) ],
);
// if the message is a view
if ( $message in... | php | public function render()
{
$message = $this->message;
reset( $this->to );
// default view parameters for the message and the layout
$params = array(
'mail' => $this,
'to_email' => key($this->to),
'to_name' => $this->to[ key($this->to) ],
);
// if the message is a view
if ( $message in... | [
"public",
"function",
"render",
"(",
")",
"{",
"$",
"message",
"=",
"$",
"this",
"->",
"message",
";",
"reset",
"(",
"$",
"this",
"->",
"to",
")",
";",
"// default view parameters for the message and the layout",
"$",
"params",
"=",
"array",
"(",
"'mail'",
"... | Render the message
@return string | [
"Render",
"the",
"message"
] | train | https://github.com/ClanCats/Core/blob/9f6ec72c1a439de4b253d0223f1029f7f85b6ef8/src/bundles/Mail/CCMail.php#L323-L354 |
ClanCats/Core | src/bundles/Mail/CCMail.php | CCMail.send | public function send()
{
// load the mail configuration
$config = \CCConfig::create( 'mail' );
// when mailing is disabled do nothing just return
if ( $config->disabled === true )
{
return;
}
// we cannot send a mail without recipients
if ( empty( $this->to ) )
{
throw new Exception( "Can... | php | public function send()
{
// load the mail configuration
$config = \CCConfig::create( 'mail' );
// when mailing is disabled do nothing just return
if ( $config->disabled === true )
{
return;
}
// we cannot send a mail without recipients
if ( empty( $this->to ) )
{
throw new Exception( "Can... | [
"public",
"function",
"send",
"(",
")",
"{",
"// load the mail configuration",
"$",
"config",
"=",
"\\",
"CCConfig",
"::",
"create",
"(",
"'mail'",
")",
";",
"// when mailing is disabled do nothing just return",
"if",
"(",
"$",
"config",
"->",
"disabled",
"===",
"... | Prepare the message for sending to the transport
@return void | [
"Prepare",
"the",
"message",
"for",
"sending",
"to",
"the",
"transport"
] | train | https://github.com/ClanCats/Core/blob/9f6ec72c1a439de4b253d0223f1029f7f85b6ef8/src/bundles/Mail/CCMail.php#L361-L399 |
ClanCats/Core | src/bundles/Mail/CCMail.php | CCMail.transport | protected function transport( $transporter = null )
{
if ( !is_null( $transporter ) )
{
$transporter = Transporter::create( $transporter );
}
else
{
$transporter = $this->transporter;
}
// pass the current mail to the transporter
$transporter->send( $this );
} | php | protected function transport( $transporter = null )
{
if ( !is_null( $transporter ) )
{
$transporter = Transporter::create( $transporter );
}
else
{
$transporter = $this->transporter;
}
// pass the current mail to the transporter
$transporter->send( $this );
} | [
"protected",
"function",
"transport",
"(",
"$",
"transporter",
"=",
"null",
")",
"{",
"if",
"(",
"!",
"is_null",
"(",
"$",
"transporter",
")",
")",
"{",
"$",
"transporter",
"=",
"Transporter",
"::",
"create",
"(",
"$",
"transporter",
")",
";",
"}",
"el... | Transport the message
@param string $transport Use a diffrent transporter
@return void | [
"Transport",
"the",
"message"
] | train | https://github.com/ClanCats/Core/blob/9f6ec72c1a439de4b253d0223f1029f7f85b6ef8/src/bundles/Mail/CCMail.php#L407-L420 |
tomphp/siren-php | src/ActionBuilder.php | ActionBuilder.addField | public function addField(
$fieldOrName,
$classes = [],
string $type = null,
$value = null,
string $title = null
) : self {
if (!$fieldOrName instanceof Field) {
$fieldOrName = new Field(
$fieldOrName,
is_array($classes) ? $c... | php | public function addField(
$fieldOrName,
$classes = [],
string $type = null,
$value = null,
string $title = null
) : self {
if (!$fieldOrName instanceof Field) {
$fieldOrName = new Field(
$fieldOrName,
is_array($classes) ? $c... | [
"public",
"function",
"addField",
"(",
"$",
"fieldOrName",
",",
"$",
"classes",
"=",
"[",
"]",
",",
"string",
"$",
"type",
"=",
"null",
",",
"$",
"value",
"=",
"null",
",",
"string",
"$",
"title",
"=",
"null",
")",
":",
"self",
"{",
"if",
"(",
"!... | @param Field|string $fieldOrName
@param string[]|null $classes
@param string|null $type
@param mixed $value
@param string|null $title
@return $this | [
"@param",
"Field|string",
"$fieldOrName",
"@param",
"string",
"[]",
"|null",
"$classes",
"@param",
"string|null",
"$type",
"@param",
"mixed",
"$value",
"@param",
"string|null",
"$title"
] | train | https://github.com/tomphp/siren-php/blob/22bdce3d7d87693df29011a5139dbad349c875db/src/ActionBuilder.php#L96-L116 |
datasift/php_webdriver | src/php/DataSift/WebDriver/WebDriverBase.php | WebDriverBase.returnExceptionToThrow | public function returnExceptionToThrow($status_code)
{
static $map = array (
1 => 'E4xx_IndexOutOfBoundsWebDriverError',
2 => 'E4xx_NoCollectionWebDriverError',
3 => 'E4xx_NoStringWebDriverError',
4 => 'E4xx_NoStringLengthWebDriverError',
5 =>... | php | public function returnExceptionToThrow($status_code)
{
static $map = array (
1 => 'E4xx_IndexOutOfBoundsWebDriverError',
2 => 'E4xx_NoCollectionWebDriverError',
3 => 'E4xx_NoStringWebDriverError',
4 => 'E4xx_NoStringLengthWebDriverError',
5 =>... | [
"public",
"function",
"returnExceptionToThrow",
"(",
"$",
"status_code",
")",
"{",
"static",
"$",
"map",
"=",
"array",
"(",
"1",
"=>",
"'E4xx_IndexOutOfBoundsWebDriverError'",
",",
"2",
"=>",
"'E4xx_NoCollectionWebDriverError'",
",",
"3",
"=>",
"'E4xx_NoStringWebDrive... | Returns the name of the exception class to throw
@param int $status_code the status code returned from webdriver
@return string the name of the exception class to throw, or null if no error occurred | [
"Returns",
"the",
"name",
"of",
"the",
"exception",
"class",
"to",
"throw"
] | train | https://github.com/datasift/php_webdriver/blob/efca991198616b53c8f40b59ad05306e2b10e7f0/src/php/DataSift/WebDriver/WebDriverBase.php#L45-L96 |
datasift/php_webdriver | src/php/DataSift/WebDriver/WebDriverBase.php | WebDriverBase.curl | protected function curl(
$http_method,
$command,
$params = null,
$extra_opts = array()
)
{
// catch problems with the definition of allowed methods in
// child classes
if ($params && is_array($params) && $http_method !== 'POST') {
throw new E5x... | php | protected function curl(
$http_method,
$command,
$params = null,
$extra_opts = array()
)
{
// catch problems with the definition of allowed methods in
// child classes
if ($params && is_array($params) && $http_method !== 'POST') {
throw new E5x... | [
"protected",
"function",
"curl",
"(",
"$",
"http_method",
",",
"$",
"command",
",",
"$",
"params",
"=",
"null",
",",
"$",
"extra_opts",
"=",
"array",
"(",
")",
")",
"{",
"// catch problems with the definition of allowed methods in",
"// child classes",
"if",
"(",
... | Curl request to webdriver server.
$http_method 'GET', 'POST', or 'DELETE'
$command If not defined in methods() this function will throw.
$params If an array(), they will be posted as JSON parameters
If a number or string, "/$params" is appended to url
$extra_opts key=>value pairs of curl options to pass ... | [
"Curl",
"request",
"to",
"webdriver",
"server",
"."
] | train | https://github.com/datasift/php_webdriver/blob/efca991198616b53c8f40b59ad05306e2b10e7f0/src/php/DataSift/WebDriver/WebDriverBase.php#L145-L252 |
datasift/php_webdriver | src/php/DataSift/WebDriver/WebDriverBase.php | WebDriverBase.getHttpVerb | private function getHttpVerb($webdriver_command)
{
$methods = $this->getMethods();
if (!isset($methods[$webdriver_command])) {
throw new E5xx_BadMethodCallWebDriverError(sprintf(
'%s is not a valid webdriver command.',
$webdriver_command
));
... | php | private function getHttpVerb($webdriver_command)
{
$methods = $this->getMethods();
if (!isset($methods[$webdriver_command])) {
throw new E5xx_BadMethodCallWebDriverError(sprintf(
'%s is not a valid webdriver command.',
$webdriver_command
));
... | [
"private",
"function",
"getHttpVerb",
"(",
"$",
"webdriver_command",
")",
"{",
"$",
"methods",
"=",
"$",
"this",
"->",
"getMethods",
"(",
")",
";",
"if",
"(",
"!",
"isset",
"(",
"$",
"methods",
"[",
"$",
"webdriver_command",
"]",
")",
")",
"{",
"throw"... | determine the HTTP verb to use for a given webdriver command
@param string $webdriver_command the webdriver command to use
@return string the HTTP verb to use | [
"determine",
"the",
"HTTP",
"verb",
"to",
"use",
"for",
"a",
"given",
"webdriver",
"command"
] | train | https://github.com/datasift/php_webdriver/blob/efca991198616b53c8f40b59ad05306e2b10e7f0/src/php/DataSift/WebDriver/WebDriverBase.php#L311-L324 |
boekkooi/tactician-amqp | src/Middleware/CommandTransformerMiddleware.php | CommandTransformerMiddleware.execute | public function execute($command, callable $next)
{
if (!is_object($command) || !in_array(get_class($command), $this->commands, true)) {
return $next($command);
}
$message = $this->transformer->transformCommandToMessage($command);
if (!$message instanceof Message) {
... | php | public function execute($command, callable $next)
{
if (!is_object($command) || !in_array(get_class($command), $this->commands, true)) {
return $next($command);
}
$message = $this->transformer->transformCommandToMessage($command);
if (!$message instanceof Message) {
... | [
"public",
"function",
"execute",
"(",
"$",
"command",
",",
"callable",
"$",
"next",
")",
"{",
"if",
"(",
"!",
"is_object",
"(",
"$",
"command",
")",
"||",
"!",
"in_array",
"(",
"get_class",
"(",
"$",
"command",
")",
",",
"$",
"this",
"->",
"commands"... | {@inheritdoc} | [
"{"
] | train | https://github.com/boekkooi/tactician-amqp/blob/55cbb8b9e20aab7891e6a6090b248377c599360e/src/Middleware/CommandTransformerMiddleware.php#L59-L71 |
webforge-labs/psc-cms | lib/Psc/CMS/ProjectsFactory.php | ProjectsFactory.getProjectPaths | public function getProjectPaths($name, $mode = self::MODE_SRC) {
if (!array_key_exists($name, $this->paths)) {
$this->paths[$name] = array();
}
$defaultPaths = array();
if ($mode === self::MODE_SRC) {
$defaultPaths[PSC::PATH_SRC] = './base/src/';
$defaultPaths[PSC::PATH_HTDOCS] = ... | php | public function getProjectPaths($name, $mode = self::MODE_SRC) {
if (!array_key_exists($name, $this->paths)) {
$this->paths[$name] = array();
}
$defaultPaths = array();
if ($mode === self::MODE_SRC) {
$defaultPaths[PSC::PATH_SRC] = './base/src/';
$defaultPaths[PSC::PATH_HTDOCS] = ... | [
"public",
"function",
"getProjectPaths",
"(",
"$",
"name",
",",
"$",
"mode",
"=",
"self",
"::",
"MODE_SRC",
")",
"{",
"if",
"(",
"!",
"array_key_exists",
"(",
"$",
"name",
",",
"$",
"this",
"->",
"paths",
")",
")",
"{",
"$",
"this",
"->",
"paths",
... | Gibt ALLE Pfade für das Projekt zurück
wenn vorher pfade mit setProjectPath gesetzt wurden, werden diese nie überschrieben (auch wenn der modus ein anderer ist)
alle anderen Pfade werden mit defaults gesetzt (je nach modus) | [
"Gibt",
"ALLE",
"Pfade",
"für",
"das",
"Projekt",
"zurück"
] | train | https://github.com/webforge-labs/psc-cms/blob/467bfa2547e6b4fa487d2d7f35fa6cc618dbc763/lib/Psc/CMS/ProjectsFactory.php#L66-L101 |
webforge-labs/psc-cms | lib/Psc/CMS/ProjectsFactory.php | ProjectsFactory.getProjectInstance | public function getProjectInstance($name, Dir $root, Configuration $hostConfig, Array $paths, $mode = Project::MODE_SRC, $staging = FALSE) {
$c = array_key_exists($name, $this->projectsClasses) ? $this->projectsClasses[$name] : 'Psc\CMS\Project';
return new $c($name, $root, $hostConfig, $paths, $mode, $sta... | php | public function getProjectInstance($name, Dir $root, Configuration $hostConfig, Array $paths, $mode = Project::MODE_SRC, $staging = FALSE) {
$c = array_key_exists($name, $this->projectsClasses) ? $this->projectsClasses[$name] : 'Psc\CMS\Project';
return new $c($name, $root, $hostConfig, $paths, $mode, $sta... | [
"public",
"function",
"getProjectInstance",
"(",
"$",
"name",
",",
"Dir",
"$",
"root",
",",
"Configuration",
"$",
"hostConfig",
",",
"Array",
"$",
"paths",
",",
"$",
"mode",
"=",
"Project",
"::",
"MODE_SRC",
",",
"$",
"staging",
"=",
"FALSE",
")",
"{",
... | Interne Methode für die Erstellung eines Projektes
nicht diese Methode nehmen um ein Projekt zu erhalten. Dann getProject() nehmen | [
"Interne",
"Methode",
"für",
"die",
"Erstellung",
"eines",
"Projektes"
] | train | https://github.com/webforge-labs/psc-cms/blob/467bfa2547e6b4fa487d2d7f35fa6cc618dbc763/lib/Psc/CMS/ProjectsFactory.php#L123-L127 |
webforge-labs/psc-cms | lib/Psc/CMS/ProjectsFactory.php | ProjectsFactory.getProjectRoot | public function getProjectRoot($name, $mode = Project::MODE_SRC) {
/* root
entweder ist projects.$name.root in der host-config gesetzt, oder es wird angenommen
dass das projekt in
CONFIG[projects.root]/$name/Umsetzung
ist
wenn der Mode PHAR ist, wird das Phar base Directo... | php | public function getProjectRoot($name, $mode = Project::MODE_SRC) {
/* root
entweder ist projects.$name.root in der host-config gesetzt, oder es wird angenommen
dass das projekt in
CONFIG[projects.root]/$name/Umsetzung
ist
wenn der Mode PHAR ist, wird das Phar base Directo... | [
"public",
"function",
"getProjectRoot",
"(",
"$",
"name",
",",
"$",
"mode",
"=",
"Project",
"::",
"MODE_SRC",
")",
"{",
"/* root\n \n entweder ist projects.$name.root in der host-config gesetzt, oder es wird angenommen\n dass das projekt in\n CONFIG[projects.root]/$... | Macht keine Checks ob das Projekt existiert
@return Dir | [
"Macht",
"keine",
"Checks",
"ob",
"das",
"Projekt",
"existiert"
] | train | https://github.com/webforge-labs/psc-cms/blob/467bfa2547e6b4fa487d2d7f35fa6cc618dbc763/lib/Psc/CMS/ProjectsFactory.php#L134-L155 |
webforge-labs/psc-cms | lib/Psc/CMS/ProjectsFactory.php | ProjectsFactory.getProjectsRoot | public function getProjectsRoot() {
if (!isset($this->projectsRoot)) {
$this->projectsRoot = new Dir($this->hostConfig->req('projects.root'));
}
return $this->projectsRoot;
} | php | public function getProjectsRoot() {
if (!isset($this->projectsRoot)) {
$this->projectsRoot = new Dir($this->hostConfig->req('projects.root'));
}
return $this->projectsRoot;
} | [
"public",
"function",
"getProjectsRoot",
"(",
")",
"{",
"if",
"(",
"!",
"isset",
"(",
"$",
"this",
"->",
"projectsRoot",
")",
")",
"{",
"$",
"this",
"->",
"projectsRoot",
"=",
"new",
"Dir",
"(",
"$",
"this",
"->",
"hostConfig",
"->",
"req",
"(",
"'pr... | Gibt das Verzeichnis zurück in dem sich die psc-Projekte befinden
insbesondere sollte dor psc-cms als Verzeichnis drin liegen mit dem Repository fürs CMS
@return Dir | [
"Gibt",
"das",
"Verzeichnis",
"zurück",
"in",
"dem",
"sich",
"die",
"psc",
"-",
"Projekte",
"befinden"
] | train | https://github.com/webforge-labs/psc-cms/blob/467bfa2547e6b4fa487d2d7f35fa6cc618dbc763/lib/Psc/CMS/ProjectsFactory.php#L169-L175 |
spiral-modules/scaffolder | source/Scaffolder/Configs/ScaffolderConfig.php | ScaffolderConfig.className | public function className(string $element, string $name): string
{
list($namespace, $name) = $this->parseName($name);
return Inflector::classify($name) . $this->elementPostfix($element);
} | php | public function className(string $element, string $name): string
{
list($namespace, $name) = $this->parseName($name);
return Inflector::classify($name) . $this->elementPostfix($element);
} | [
"public",
"function",
"className",
"(",
"string",
"$",
"element",
",",
"string",
"$",
"name",
")",
":",
"string",
"{",
"list",
"(",
"$",
"namespace",
",",
"$",
"name",
")",
"=",
"$",
"this",
"->",
"parseName",
"(",
"$",
"name",
")",
";",
"return",
... | @param string $element
@param string $name
@return string | [
"@param",
"string",
"$element",
"@param",
"string",
"$name"
] | train | https://github.com/spiral-modules/scaffolder/blob/9be9dd0da6e4b02232db24e797fe5c288afbbddf/source/Scaffolder/Configs/ScaffolderConfig.php#L65-L70 |
spiral-modules/scaffolder | source/Scaffolder/Configs/ScaffolderConfig.php | ScaffolderConfig.classNamespace | public function classNamespace(string $element, string $name = ''): string
{
$localNamespace = trim($this->getOption($element, 'namespace', ''), '\\');
list($namespace, $name) = $this->parseName($name);
if (!empty($namespace)) {
$localNamespace .= '\\' . Inflector::classify($nam... | php | public function classNamespace(string $element, string $name = ''): string
{
$localNamespace = trim($this->getOption($element, 'namespace', ''), '\\');
list($namespace, $name) = $this->parseName($name);
if (!empty($namespace)) {
$localNamespace .= '\\' . Inflector::classify($nam... | [
"public",
"function",
"classNamespace",
"(",
"string",
"$",
"element",
",",
"string",
"$",
"name",
"=",
"''",
")",
":",
"string",
"{",
"$",
"localNamespace",
"=",
"trim",
"(",
"$",
"this",
"->",
"getOption",
"(",
"$",
"element",
",",
"'namespace'",
",",
... | @param string $element
@param string $name
@return string | [
"@param",
"string",
"$element",
"@param",
"string",
"$name"
] | train | https://github.com/spiral-modules/scaffolder/blob/9be9dd0da6e4b02232db24e797fe5c288afbbddf/source/Scaffolder/Configs/ScaffolderConfig.php#L78-L92 |
spiral-modules/scaffolder | source/Scaffolder/Configs/ScaffolderConfig.php | ScaffolderConfig.classFilename | public function classFilename(string $element, string $name): string
{
$namespace = $this->classNamespace($element, $name);
$namespace = substr($namespace, strlen($this->baseNamespace()));
$directory = $this->baseDirectory() . '/' . str_replace('\\', '/', $namespace);
return rtrim(... | php | public function classFilename(string $element, string $name): string
{
$namespace = $this->classNamespace($element, $name);
$namespace = substr($namespace, strlen($this->baseNamespace()));
$directory = $this->baseDirectory() . '/' . str_replace('\\', '/', $namespace);
return rtrim(... | [
"public",
"function",
"classFilename",
"(",
"string",
"$",
"element",
",",
"string",
"$",
"name",
")",
":",
"string",
"{",
"$",
"namespace",
"=",
"$",
"this",
"->",
"classNamespace",
"(",
"$",
"element",
",",
"$",
"name",
")",
";",
"$",
"namespace",
"=... | @param string $element
@param string $name
@return string | [
"@param",
"string",
"$element",
"@param",
"string",
"$name"
] | train | https://github.com/spiral-modules/scaffolder/blob/9be9dd0da6e4b02232db24e797fe5c288afbbddf/source/Scaffolder/Configs/ScaffolderConfig.php#L100-L108 |
spiral-modules/scaffolder | source/Scaffolder/Configs/ScaffolderConfig.php | ScaffolderConfig.getOption | private function getOption(string $element, string $section, $default = null)
{
if (!isset($this->config['declarations'][$element])) {
throw new ScaffolderException("Undefined declaration '{$element}'.");
}
if (array_key_exists($section, $this->config['declarations'][$element]))... | php | private function getOption(string $element, string $section, $default = null)
{
if (!isset($this->config['declarations'][$element])) {
throw new ScaffolderException("Undefined declaration '{$element}'.");
}
if (array_key_exists($section, $this->config['declarations'][$element]))... | [
"private",
"function",
"getOption",
"(",
"string",
"$",
"element",
",",
"string",
"$",
"section",
",",
"$",
"default",
"=",
"null",
")",
"{",
"if",
"(",
"!",
"isset",
"(",
"$",
"this",
"->",
"config",
"[",
"'declarations'",
"]",
"[",
"$",
"element",
... | @param string $element
@param string $section
@param mixed $default
@return mixed | [
"@param",
"string",
"$element",
"@param",
"string",
"$section",
"@param",
"mixed",
"$default"
] | train | https://github.com/spiral-modules/scaffolder/blob/9be9dd0da6e4b02232db24e797fe5c288afbbddf/source/Scaffolder/Configs/ScaffolderConfig.php#L159-L170 |
spiral-modules/scaffolder | source/Scaffolder/Configs/ScaffolderConfig.php | ScaffolderConfig.parseName | private function parseName(string $name): array
{
$name = str_replace('/', '\\', $name);
if (strpos($name, '\\') !== false) {
$names = explode('\\', $name);
$class = array_pop($names);
return [join('\\', $names), $class];
}
//No user namespace
... | php | private function parseName(string $name): array
{
$name = str_replace('/', '\\', $name);
if (strpos($name, '\\') !== false) {
$names = explode('\\', $name);
$class = array_pop($names);
return [join('\\', $names), $class];
}
//No user namespace
... | [
"private",
"function",
"parseName",
"(",
"string",
"$",
"name",
")",
":",
"array",
"{",
"$",
"name",
"=",
"str_replace",
"(",
"'/'",
",",
"'\\\\'",
",",
"$",
"name",
")",
";",
"if",
"(",
"strpos",
"(",
"$",
"name",
",",
"'\\\\'",
")",
"!==",
"false... | Split user name into namespace and class name.
@param string $name
@return array [namespace, name] | [
"Split",
"user",
"name",
"into",
"namespace",
"and",
"class",
"name",
"."
] | train | https://github.com/spiral-modules/scaffolder/blob/9be9dd0da6e4b02232db24e797fe5c288afbbddf/source/Scaffolder/Configs/ScaffolderConfig.php#L179-L192 |
weew/url | src/Weew/Url/Url.php | Url.match | public function match($pattern, array $patterns = []) {
return $this->matcher->match(
$this->addLeadingSlash($pattern), $this->getPath(), $patterns
);
} | php | public function match($pattern, array $patterns = []) {
return $this->matcher->match(
$this->addLeadingSlash($pattern), $this->getPath(), $patterns
);
} | [
"public",
"function",
"match",
"(",
"$",
"pattern",
",",
"array",
"$",
"patterns",
"=",
"[",
"]",
")",
"{",
"return",
"$",
"this",
"->",
"matcher",
"->",
"match",
"(",
"$",
"this",
"->",
"addLeadingSlash",
"(",
"$",
"pattern",
")",
",",
"$",
"this",
... | @param string $pattern
@param array $patterns
@return bool | [
"@param",
"string",
"$pattern",
"@param",
"array",
"$patterns"
] | train | https://github.com/weew/url/blob/117be15e899cc343f22f04f5eb9e92e2164c56c1/src/Weew/Url/Url.php#L232-L236 |
weew/url | src/Weew/Url/Url.php | Url.parse | public function parse($pattern, array $patterns = []) {
return $this->matcher->parse(
$pattern, $this->getPath(), $patterns
);
} | php | public function parse($pattern, array $patterns = []) {
return $this->matcher->parse(
$pattern, $this->getPath(), $patterns
);
} | [
"public",
"function",
"parse",
"(",
"$",
"pattern",
",",
"array",
"$",
"patterns",
"=",
"[",
"]",
")",
"{",
"return",
"$",
"this",
"->",
"matcher",
"->",
"parse",
"(",
"$",
"pattern",
",",
"$",
"this",
"->",
"getPath",
"(",
")",
",",
"$",
"patterns... | @param string $pattern
@param array $patterns
@return IDictionary | [
"@param",
"string",
"$pattern",
"@param",
"array",
"$patterns"
] | train | https://github.com/weew/url/blob/117be15e899cc343f22f04f5eb9e92e2164c56c1/src/Weew/Url/Url.php#L244-L248 |
4devs/ElfinderPhpConnector | Driver/PhotatoesDriver.php | PhotatoesDriver.getRootFileInfo | public function getRootFileInfo()
{
$root = new FileInfo($this->driverOptions['rootName'], $this->getDriverId(), time());
$root->setVolumeid($this->getDriverId().'_');
$root->setDirs(1);
return $root;
} | php | public function getRootFileInfo()
{
$root = new FileInfo($this->driverOptions['rootName'], $this->getDriverId(), time());
$root->setVolumeid($this->getDriverId().'_');
$root->setDirs(1);
return $root;
} | [
"public",
"function",
"getRootFileInfo",
"(",
")",
"{",
"$",
"root",
"=",
"new",
"FileInfo",
"(",
"$",
"this",
"->",
"driverOptions",
"[",
"'rootName'",
"]",
",",
"$",
"this",
"->",
"getDriverId",
"(",
")",
",",
"time",
"(",
")",
")",
";",
"$",
"root... | {@inheritdoc} | [
"{"
] | train | https://github.com/4devs/ElfinderPhpConnector/blob/510e295dcafeaa0f796986ad87b3ed5f6b0d9338/Driver/PhotatoesDriver.php#L51-L58 |
4devs/ElfinderPhpConnector | Driver/PhotatoesDriver.php | PhotatoesDriver.open | public function open(Response $response, $target = '', $tree = false, $init = false)
{
$this->getGallery($response, $target);
$root = $this->getRootFileInfo();
if ($init) {
}
if (!$target || $root->getName() == $target) {
$this->getGalleryList($response);
... | php | public function open(Response $response, $target = '', $tree = false, $init = false)
{
$this->getGallery($response, $target);
$root = $this->getRootFileInfo();
if ($init) {
}
if (!$target || $root->getName() == $target) {
$this->getGalleryList($response);
... | [
"public",
"function",
"open",
"(",
"Response",
"$",
"response",
",",
"$",
"target",
"=",
"''",
",",
"$",
"tree",
"=",
"false",
",",
"$",
"init",
"=",
"false",
")",
"{",
"$",
"this",
"->",
"getGallery",
"(",
"$",
"response",
",",
"$",
"target",
")",... | {@inheritdoc} | [
"{"
] | train | https://github.com/4devs/ElfinderPhpConnector/blob/510e295dcafeaa0f796986ad87b3ed5f6b0d9338/Driver/PhotatoesDriver.php#L63-L78 |
4devs/ElfinderPhpConnector | Driver/PhotatoesDriver.php | PhotatoesDriver.getGalleryList | private function getGalleryList(Response $response)
{
$list = $this->manager->getGalleryList();
foreach ($list as $gallery) {
/* @var \FDevs\Photatoes\Gallery $gallery */
$file = $this->prepareGallery($gallery);
$response->addFile($file);
$response->ad... | php | private function getGalleryList(Response $response)
{
$list = $this->manager->getGalleryList();
foreach ($list as $gallery) {
/* @var \FDevs\Photatoes\Gallery $gallery */
$file = $this->prepareGallery($gallery);
$response->addFile($file);
$response->ad... | [
"private",
"function",
"getGalleryList",
"(",
"Response",
"$",
"response",
")",
"{",
"$",
"list",
"=",
"$",
"this",
"->",
"manager",
"->",
"getGalleryList",
"(",
")",
";",
"foreach",
"(",
"$",
"list",
"as",
"$",
"gallery",
")",
"{",
"/* @var \\FDevs\\Phota... | get Gallery list.
@param Response $response | [
"get",
"Gallery",
"list",
"."
] | train | https://github.com/4devs/ElfinderPhpConnector/blob/510e295dcafeaa0f796986ad87b3ed5f6b0d9338/Driver/PhotatoesDriver.php#L160-L169 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.